@univerjs-pro/thread-comment-datasource 0.12.2 → 0.12.3
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/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +11 -11
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1e852c=_0x1aed;(function(_0x583bd5,_0x1799a1){const _0x2acdf0=_0x1aed,_0x1d9cc9=_0x583bd5();while(!![]){try{const _0x9320e6=-parseInt(_0x2acdf0(0xe7))/0x1*(-parseInt(_0x2acdf0(0xa2))/0x2)+parseInt(_0x2acdf0(0xc4))/0x3+parseInt(_0x2acdf0(0x9e))/0x4+parseInt(_0x2acdf0(0xd1))/0x5+parseInt(_0x2acdf0(0xb0))/0x6+-parseInt(_0x2acdf0(0xf0))/0x7*(parseInt(_0x2acdf0(0xd0))/0x8)+parseInt(_0x2acdf0(0xdb))/0x9*(-parseInt(_0x2acdf0(0xb4))/0xa);if(_0x9320e6===_0x1799a1)break;else _0x1d9cc9['push'](_0x1d9cc9['shift']());}catch(_0x2abe2b){_0x1d9cc9['push'](_0x1d9cc9['shift']());}}}(_0x56d9,0x4c1f6));Object[_0x1e852c(0xcf)](exports,Symbol[_0x1e852c(0xc7)],{'value':_0x1e852c(0xa0)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4ffc35=>(_0x4ffc35[_0x4ffc35[_0x1e852c(0xb6)]=0x0]=_0x1e852c(0xb6),_0x4ffc35[_0x4ffc35[_0x1e852c(0xcd)]=0x1]=_0x1e852c(0xcd),_0x4ffc35[_0x4ffc35[_0x1e852c(0xf8)]=-0x1]=_0x1e852c(0xf8),_0x4ffc35))(I||{}),v=(_0x59c3c5=>(_0x59c3c5[_0x59c3c5['Unknown']=0x0]=_0x1e852c(0x9d),_0x59c3c5[_0x59c3c5[_0x1e852c(0xe4)]=0x1]='Add',_0x59c3c5[_0x59c3c5['Reply']=0x2]='Reply',_0x59c3c5[_0x59c3c5['Edit']=0x3]='Edit',_0x59c3c5[_0x59c3c5[_0x1e852c(0xc9)]=0x4]='Delete',_0x59c3c5[_0x59c3c5[_0x1e852c(0xf4)]=0x5]='Solve',_0x59c3c5[_0x59c3c5[_0x1e852c(0xf8)]=-0x1]=_0x1e852c(0xf8),_0x59c3c5))(v||{});const f=_0xf604a6=>c['dayjs'](new Date(+_0xf604a6))[_0x1e852c(0xec)](_0x1e852c(0xbb)),R=async(_0x4c568d,_0x5a2d50)=>{const _0x22d23f=_0x1e852c,_0x426046=_0x4c568d[_0x22d23f(0xd7)](c['UserManagerService']),_0xadade=_0x4c568d['get'](P[_0x22d23f(0xd4)]);_0x5a2d50['forEach'](_0x16b205=>{const _0x133a51=_0x22d23f;_0x426046[_0x133a51(0x8e)](_0x16b205)&&_0x5a2d50[_0x133a51(0xcb)](_0x16b205);}),_0x5a2d50[_0x22d23f(0xd5)]&&(await _0xadade['get'](_0x22d23f(0xf2),{'params':{'userIDs':[..._0x5a2d50]}}))[_0x22d23f(0xf5)][_0x22d23f(0xe3)][_0x22d23f(0xa3)](_0x51c5ed=>{_0x51c5ed&&_0x426046['addUser'](_0x51c5ed);});};var $=Object[_0x1e852c(0xaf)],E=(_0x1fb24a,_0x522a7f,_0x2fac06,_0x4d056a)=>{const _0x56a544=_0x1e852c;for(var _0x47f8ed=_0x4d056a>0x1?void 0x0:_0x4d056a?$(_0x522a7f,_0x2fac06):_0x522a7f,_0x378de1=_0x1fb24a[_0x56a544(0xb1)]-0x1,_0x1d70c2;_0x378de1>=0x0;_0x378de1--)(_0x1d70c2=_0x1fb24a[_0x378de1])&&(_0x47f8ed=_0x1d70c2(_0x47f8ed)||_0x47f8ed);return _0x47f8ed;},S=(_0x22116e,_0x129e5b)=>(_0x319285,_0xceaf50)=>_0x129e5b(_0x319285,_0xceaf50,_0x22116e);function _0x56d9(){const _0x5c4191=['saveCommentToSnapshot','users','Add','subscribe','_initUserSync','1VwWwtx','_httpService','code','userId','resolved','format','CommentService','values','Edit','21nkFdTU','merge','/universer-api/user/list','_init','Solve','body','createTimestamp','addUser','UNRECOGNIZED','UniverLicensePlugin','onStarting','getMemberID','deleteComment','post','_threadCommentModel','type','pipe','rangeId','onReady','Plugin','UniverThreadCommentDataSourcePlugin','map','_threadCommentDataSourceService','commentUpdate$','Disposable','symbol','getUser','_injector','Injector','IConfigService','getComment','/reply','/solved','root','rangeType','_userService','_commentService','user','bufferTime','resolveComment','thread-comment-data-source.config','Unknown','680028uvxoQE','COMMENT','Module','error','473954ESNFte','forEach','customRanges','parentId','solved','getUnit','CustomRangeType','_configService','updateComment','ref','unitId','threadId','DependentOn','getOwnPropertyDescriptor','1585242IsxLqT','length','disposeWithMe','/list','10xfwxjw','addComment','OpenOrReOpen','IThreadCommentDataSourceService','find','requireSession','slice','YYYY/MM/DD\x20HH:mm','_config','userID','ThreadCommentModel','replyId','UserManagerService','add','getCurrentUser','Inject','969447iRdbhF','CollaborationSessionService','_threadCommentDataSource','toStringTag','_sessionService','Delete','UniverCollaborationClientPlugin','delete','Reply','Solved','/delete','defineProperty','741896LKVCZS','724490WrEHxn','comments','personId','HTTPService','size','syncUpdateMutationToColla','get','UniverInstanceType','parse','stringify','4943061CuGPky','/universer-api/comment/unit/','filter','replies','listComments','content','comment'];_0x56d9=function(){return _0x5c4191;};return _0x56d9();}let _=class extends c[_0x1e852c(0x8c)]{constructor(_0x1ad158,_0x5d73e8,_0x10cbec,_0x41468d){const _0x45b227=_0x1e852c;super(),this['_commentService']=_0x1ad158,this[_0x45b227(0xfe)]=_0x5d73e8,this[_0x45b227(0x97)]=_0x10cbec,this[_0x45b227(0x8f)]=_0x41468d,this[_0x45b227(0xf3)](),this[_0x45b227(0xe6)]();}['_initUserSync'](){const _0x28aa54=_0x1e852c;this[_0x28aa54(0xb2)](this[_0x28aa54(0xfe)]['commentUpdate$'][_0x28aa54(0x100)](j[_0x28aa54(0x9a)](0x10))[_0x28aa54(0xe5)](_0x4f18dc=>{const _0x2bede5=new Set();_0x4f18dc['forEach'](_0x41bc73=>{const _0x4f2c9a=_0x1aed;switch(_0x41bc73[_0x4f2c9a(0xff)]){case _0x4f2c9a(0xc1):{const _0x24e787=_0x41bc73['payload'][_0x4f2c9a(0xd3)];_0x2bede5[_0x4f2c9a(0xc1)](_0x24e787);break;}}}),R(this['_injector'],_0x2bede5);}));}[_0x1e852c(0xf3)](){const _0x36843c=_0x1e852c;this[_0x36843c(0xb2)](this[_0x36843c(0x98)][_0x36843c(0x8b)][_0x36843c(0xe5)](async _0x5c6a04=>{const _0x4335c0=_0x36843c;var _0x50f4ce,_0x2e3d99,_0x444129,_0x30fd74;const _0x1b720e=(_0x50f4ce=this[_0x4335c0(0xfe)][_0x4335c0(0xa7)](_0x5c6a04[_0x4335c0(0xac)])[_0x4335c0(0xb8)](_0x11256c=>_0x11256c[_0x4335c0(0xad)]===_0x5c6a04['threadId']))==null?void 0x0:_0x50f4ce[_0x4335c0(0x95)];if(!_0x1b720e)return;const {unitId:_0x279c70,subUnitId:_0x2f9319}=_0x1b720e;switch(_0x5c6a04['user']&&this[_0x4335c0(0x97)][_0x4335c0(0xf7)](_0x5c6a04[_0x4335c0(0x99)]),_0x5c6a04[_0x4335c0(0xff)]){case v[_0x4335c0(0xe4)]:break;case v[_0x4335c0(0xcc)]:{this[_0x4335c0(0xfe)][_0x4335c0(0xb5)](_0x279c70,_0x2f9319,{'unitId':_0x279c70,'subUnitId':_0x2f9319,'ref':'','id':_0x5c6a04[_0x4335c0(0xbf)],'dT':f(+_0x5c6a04['createTimestamp']),'threadId':_0x5c6a04[_0x4335c0(0xad)],'personId':(_0x444129=(_0x2e3d99=_0x5c6a04[_0x4335c0(0x99)])==null?void 0x0:_0x2e3d99[_0x4335c0(0xbd)])!=null?_0x444129:_0x5c6a04[_0x4335c0(0xea)],'text':JSON[_0x4335c0(0xd9)](_0x5c6a04[_0x4335c0(0xe0)]),'parentId':_0x1b720e['id']});break;}case v[_0x4335c0(0xc9)]:{const _0x1a5ba4=this[_0x4335c0(0xfe)][_0x4335c0(0x92)](_0x279c70,_0x2f9319,_0x5c6a04[_0x4335c0(0xbf)]);_0x1a5ba4&&_0x1a5ba4[_0x4335c0(0xa5)]&&this[_0x4335c0(0xfe)][_0x4335c0(0xfc)](_0x279c70,_0x2f9319,_0x5c6a04[_0x4335c0(0xbf)]);break;}case v[_0x4335c0(0xef)]:{this['_threadCommentModel'][_0x4335c0(0xaa)](_0x279c70,_0x2f9319,{'commentId':_0x5c6a04[_0x4335c0(0xbf)],'text':JSON[_0x4335c0(0xd9)](_0x5c6a04[_0x4335c0(0xe0)])});break;}case v[_0x4335c0(0xf4)]:{const _0x83f994=(_0x30fd74=this[_0x4335c0(0xfe)][_0x4335c0(0xa7)](_0x5c6a04[_0x4335c0(0xac)])[_0x4335c0(0xb8)](_0x268d01=>_0x268d01[_0x4335c0(0xad)]===_0x5c6a04[_0x4335c0(0xad)]))==null?void 0x0:_0x30fd74['root'];_0x83f994&&this[_0x4335c0(0xfe)][_0x4335c0(0x9b)](_0x279c70,_0x2f9319,_0x83f994['id'],_0x5c6a04[_0x4335c0(0xa6)]===I[_0x4335c0(0xcd)]);break;}}}));}};_=E([S(0x0,c[_0x1e852c(0xc3)](b[_0x1e852c(0xed)])),S(0x1,c[_0x1e852c(0xc3)](M[_0x1e852c(0xbe)])),S(0x2,c['Inject'](c[_0x1e852c(0xc0)])),S(0x3,c[_0x1e852c(0xc3)](c[_0x1e852c(0x90)]))],_);const q=_0x1e852c(0x9c),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x5f50a0,_0xccf826,_0x3b3ed0,_0x5b3adc)=>{const _0x551804=_0x1e852c;for(var _0x2169fc=_0x5b3adc>0x1?void 0x0:_0x5b3adc?A(_0xccf826,_0x3b3ed0):_0xccf826,_0x135827=_0x5f50a0[_0x551804(0xb1)]-0x1,_0x1affa8;_0x135827>=0x0;_0x135827--)(_0x1affa8=_0x5f50a0[_0x135827])&&(_0x2169fc=_0x1affa8(_0x2169fc)||_0x2169fc);return _0x2169fc;},C=(_0x2a0317,_0x250465)=>(_0x854252,_0xdd4ec6)=>_0x250465(_0x854252,_0xdd4ec6,_0x2a0317);function Y(_0x40a5cb,_0x14ec5d){const _0x5b76d5=_0x1e852c,_0x210bcc=_0x40a5cb[_0x5b76d5(0xde)][0x0];return{..._0x14ec5d,'id':_0x210bcc[_0x5b76d5(0xbf)],'resolved':_0x40a5cb[_0x5b76d5(0xa6)]===0x1,'dT':f(_0x210bcc[_0x5b76d5(0xf6)]),'personId':_0x210bcc[_0x5b76d5(0xea)],'threadId':_0x210bcc[_0x5b76d5(0xad)]};}function G(_0x276209,_0x4d01e8,_0x2fb708){const _0x1aaab7=_0x1e852c;var _0x15b83f,_0x1f3920;if(((_0x1f3920=(_0x15b83f=_0x276209==null?void 0x0:_0x276209[_0x1aaab7(0xde)])==null?void 0x0:_0x15b83f[_0x1aaab7(0xb1)])!=null?_0x1f3920:0x0)>0x0){const _0x41d41f=(_0x3a4a1d,_0x1f1f1c)=>({'id':_0x3a4a1d[_0x1aaab7(0xbf)],'threadId':_0x3a4a1d[_0x1aaab7(0xad)],'dT':f(_0x3a4a1d['createTimestamp']),'personId':_0x3a4a1d['userId'],'resolved':_0x276209[_0x1aaab7(0xa6)]===I['Solved'],'unitId':_0x4d01e8,'subUnitId':_0x2fb708,'text':JSON[_0x1aaab7(0xd9)](_0x3a4a1d[_0x1aaab7(0xe0)]),'parentId':_0x1f1f1c}),_0x492df7=_0x41d41f(_0x276209['replies'][0x0]);return{..._0x492df7,'children':_0x276209[_0x1aaab7(0xde)][_0x1aaab7(0xba)](0x1)[_0x1aaab7(0x89)](_0x639a4f=>_0x41d41f(_0x639a4f,_0x492df7['id']))};}return null;}let p=class{constructor(_0x34a515,_0x5c86ba,_0x309ca4){const _0x3eb59d=_0x1e852c;this[_0x3eb59d(0xe8)]=_0x34a515,this[_0x3eb59d(0x97)]=_0x5c86ba,this['_sessionService']=_0x309ca4;}async['addComment'](_0x321d0b){const _0x2492e7=_0x1e852c;var _0x2e0ee2,_0x4b7e1f;const {parentId:_0x210438,unitId:_0x3ce1df,text:_0x50e1de,threadId:_0xdd2fc4}=_0x321d0b,_0x29b420=(_0x4b7e1f=(_0x2e0ee2=_0x50e1de[_0x2492e7(0xa4)])==null?void 0x0:_0x2e0ee2['filter'](_0x2462a6=>_0x2462a6[_0x2492e7(0x96)]===c[_0x2492e7(0xa8)]['COMMENT'])['map'](_0x3c9b6b=>_0x3c9b6b[_0x2492e7(0x101)]))!=null?_0x4b7e1f:[],_0x243b19=JSON[_0x2492e7(0xda)](_0x50e1de),_0x7b8061=(await this[_0x2492e7(0xc8)]['requireSession'](_0x3ce1df))[_0x2492e7(0xfb)]();if(_0x210438){const _0x577e42={'memberId':_0x7b8061,'unitId':_0x3ce1df,'content':_0x243b19,'mention':_0x29b420,'threadId':_0xdd2fc4},_0x488236=(await this[_0x2492e7(0xe8)][_0x2492e7(0xfd)](_0x2492e7(0xdc)+_0x3ce1df+_0x2492e7(0x93),{'body':_0x577e42}))[_0x2492e7(0xf5)]['reply'];return{..._0x321d0b,'id':_0x488236[_0x2492e7(0xbf)],'dT':c['dayjs'](+_0x488236[_0x2492e7(0xf6)])[_0x2492e7(0xec)](_0x2492e7(0xbb)),'personId':_0x488236[_0x2492e7(0xea)]};}else{const _0x2920e0={'memberId':_0x7b8061,'unitId':_0x3ce1df,'content':_0x243b19,'mention':_0x29b420},_0x564e80=await this[_0x2492e7(0xe8)][_0x2492e7(0xfd)](_0x2492e7(0xdc)+_0x3ce1df+'/add',{'body':_0x2920e0});return Y(_0x564e80['body'][_0x2492e7(0xe1)],_0x321d0b);}}async[_0x1e852c(0xaa)](_0x48be23){const _0x16ca5c=_0x1e852c;var _0x29aa2b,_0x1c7b03;const {text:_0x28ff12,unitId:_0x3d5292}=_0x48be23,_0x4d0e1f=(_0x1c7b03=(_0x29aa2b=_0x28ff12['customRanges'])==null?void 0x0:_0x29aa2b['filter'](_0x49b6f3=>_0x49b6f3[_0x16ca5c(0x96)]===c[_0x16ca5c(0xa8)][_0x16ca5c(0x9f)])['map'](_0x393bf8=>_0x393bf8['rangeId']))!=null?_0x1c7b03:[],_0x5e2897=JSON[_0x16ca5c(0xda)](_0x28ff12),_0xa0e47=_0x48be23[_0x16ca5c(0xad)],_0x2dfec6=_0x48be23['id'],_0x44c82b={'memberId':(await this[_0x16ca5c(0xc8)][_0x16ca5c(0xb9)](_0x3d5292))[_0x16ca5c(0xfb)](),'unitId':_0x3d5292,'threadId':_0xa0e47,'mention':_0x4d0e1f,'content':_0x5e2897,'replyId':_0x2dfec6},_0x5d4a6d=await this['_httpService'][_0x16ca5c(0xfd)](_0x16ca5c(0xdc)+_0x3d5292+'/edit',{'body':_0x44c82b});return!_0x5d4a6d[_0x16ca5c(0xf5)][_0x16ca5c(0xa1)]||_0x5d4a6d[_0x16ca5c(0xf5)]['error'][_0x16ca5c(0xe9)]===0x1;}async[_0x1e852c(0x9b)](_0x4a041a){const _0x42db8c=_0x1e852c,{unitId:_0x2a2c6b}=_0x4a041a,_0x73dea6=_0x4a041a['threadId'],_0x357720={'memberId':this['_userService'][_0x42db8c(0xc2)]()[_0x42db8c(0xbd)],'unitId':_0x2a2c6b,'threadId':_0x73dea6,'solved':_0x4a041a[_0x42db8c(0xeb)]?I[_0x42db8c(0xcd)]:I[_0x42db8c(0xb6)]},_0x363441=await this[_0x42db8c(0xe8)][_0x42db8c(0xfd)](_0x42db8c(0xdc)+_0x2a2c6b+_0x42db8c(0x94),{'body':_0x357720});return!_0x363441[_0x42db8c(0xf5)][_0x42db8c(0xa1)]||_0x363441[_0x42db8c(0xf5)][_0x42db8c(0xa1)][_0x42db8c(0xe9)]===0x1;}async[_0x1e852c(0xfc)](_0x4f18e1,_0x214cc2,_0x4a8365,_0x45c2b3){const _0x5e9611=_0x1e852c,_0x253db6={'memberId':(await this[_0x5e9611(0xc8)][_0x5e9611(0xb9)](_0x4f18e1))[_0x5e9611(0xfb)](),'threadId':_0x4a8365,'replyId':_0x45c2b3,'unitId':_0x4f18e1},_0x577fcb=await this[_0x5e9611(0xe8)][_0x5e9611(0xfd)](_0x5e9611(0xdc)+_0x4f18e1+_0x5e9611(0xce),{'body':_0x253db6});return!_0x577fcb['body'][_0x5e9611(0xa1)]||_0x577fcb[_0x5e9611(0xf5)][_0x5e9611(0xa1)][_0x5e9611(0xe9)]===0x1;}async[_0x1e852c(0xdf)](_0x51cedf,_0x2fc03e,_0x529abf){const _0x46060f=_0x1e852c,_0x23cbda={'unitId':_0x51cedf,'threadId':_0x529abf},_0x4e8577=await this[_0x46060f(0xe8)][_0x46060f(0xfd)](_0x46060f(0xdc)+_0x51cedf+_0x46060f(0xb3),{'body':_0x23cbda}),_0x12b7b5=_0x529abf[_0x46060f(0x89)](_0x23954d=>G(_0x4e8577[_0x46060f(0xf5)][_0x46060f(0xd2)][_0x23954d],_0x51cedf,_0x2fc03e))[_0x46060f(0xdd)](Boolean);return Object[_0x46060f(0xee)](_0x4e8577[_0x46060f(0xf5)]['users'])['forEach'](_0x10a83f=>{const _0x3f2d8d=_0x46060f;this[_0x3f2d8d(0x97)]['addUser'](_0x10a83f);}),_0x12b7b5;}[_0x1e852c(0xe2)](_0x3c1574){const _0x4d53a2=_0x1e852c;return{'id':_0x3c1574['id'],'threadId':_0x3c1574['threadId'],'ref':_0x3c1574[_0x4d53a2(0xab)]};}};function _0x1aed(_0xcaff65,_0x27381f){const _0x56d978=_0x56d9();return _0x1aed=function(_0x1aedd0,_0x14a72c){_0x1aedd0=_0x1aedd0-0x88;let _0x26ab86=_0x56d978[_0x1aedd0];return _0x26ab86;},_0x1aed(_0xcaff65,_0x27381f);}p=x([C(0x0,c[_0x1e852c(0xc3)](P[_0x1e852c(0xd4)])),C(0x1,c['Inject'](c[_0x1e852c(0xc0)])),C(0x2,c[_0x1e852c(0xc3)](b[_0x1e852c(0xc5)]))],p);var H=Object[_0x1e852c(0xaf)],J=(_0xa8d2fc,_0x2cfd3e,_0x2bcf7f,_0x59fb2e)=>{const _0x5148d0=_0x1e852c;for(var _0x631705=_0x59fb2e>0x1?void 0x0:_0x59fb2e?H(_0x2cfd3e,_0x2bcf7f):_0x2cfd3e,_0x3744ec=_0xa8d2fc[_0x5148d0(0xb1)]-0x1,_0xdf4285;_0x3744ec>=0x0;_0x3744ec--)(_0xdf4285=_0xa8d2fc[_0x3744ec])&&(_0x631705=_0xdf4285(_0x631705)||_0x631705);return _0x631705;},y=(_0x2cd91f,_0x2370fb)=>(_0x49a6bb,_0xf6e529)=>_0x2370fb(_0x49a6bb,_0xf6e529,_0x2cd91f);let g=class extends c[_0x1e852c(0x8c)]{constructor(_0x3a51c6,_0x1739cf){const _0x3c2487=_0x1e852c;super(),this[_0x3c2487(0x8a)]=_0x3a51c6,this[_0x3c2487(0xc6)]=_0x1739cf,this['_initDataSource']();}['_initDataSource'](){const _0x1e176c=_0x1e852c;this[_0x1e176c(0x8a)]['dataSource']=this[_0x1e176c(0xc6)],this[_0x1e176c(0x8a)][_0x1e176c(0xd6)]=!0x1;}};g=J([y(0x0,M[_0x1e852c(0xb7)]),y(0x1,c[_0x1e852c(0xc3)](p))],g);var F=Object[_0x1e852c(0xcf)],L=Object[_0x1e852c(0xaf)],Z=(_0x38c1cc,_0x1eb39f,_0x5c92ba)=>_0x1eb39f in _0x38c1cc?F(_0x38c1cc,_0x1eb39f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c92ba}):_0x38c1cc[_0x1eb39f]=_0x5c92ba,W=(_0x18efa0,_0x4c453f,_0x547512,_0x5dbe95)=>{const _0x575069=_0x1e852c;for(var _0x4e139d=_0x5dbe95>0x1?void 0x0:_0x5dbe95?L(_0x4c453f,_0x547512):_0x4c453f,_0x3589a9=_0x18efa0[_0x575069(0xb1)]-0x1,_0x2f5080;_0x3589a9>=0x0;_0x3589a9--)(_0x2f5080=_0x18efa0[_0x3589a9])&&(_0x4e139d=_0x2f5080(_0x4e139d)||_0x4e139d);return _0x4e139d;},O=(_0x360033,_0x32f845)=>(_0x4ea5a7,_0x2ce4db)=>_0x32f845(_0x4ea5a7,_0x2ce4db,_0x360033),N=(_0x3a7f67,_0x5a11ce,_0x585d3c)=>Z(_0x3a7f67,typeof _0x5a11ce!=_0x1e852c(0x8d)?_0x5a11ce+'':_0x5a11ce,_0x585d3c);exports[_0x1e852c(0x88)]=class extends c[_0x1e852c(0x103)]{constructor(_0x4b5850=D,_0x4af86a,_0x34acf4){const _0x430734=_0x1e852c;super(),this[_0x430734(0xbc)]=_0x4b5850,this[_0x430734(0x8f)]=_0x4af86a,this[_0x430734(0xa9)]=_0x34acf4;const {..._0x3ada9f}=c[_0x430734(0xf1)]({},D,this[_0x430734(0xbc)]);this['_configService']['setConfig'](q,_0x3ada9f);}[_0x1e852c(0xfa)](){[[p],[g],[_]]['forEach'](_0x5e3804=>{const _0x3a2fd9=_0x1aed;this[_0x3a2fd9(0x8f)]['add'](_0x5e3804);});}[_0x1e852c(0x102)](){const _0x5084ac=_0x1e852c;this['_injector'][_0x5084ac(0xd7)](g),this[_0x5084ac(0x8f)][_0x5084ac(0xd7)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x1e852c(0x88)],'type',c[_0x1e852c(0xd8)]['UNIVER_UNKNOWN']),exports[_0x1e852c(0x88)]=W([c[_0x1e852c(0xae)](w['UniverThreadCommentUIPlugin'],b[_0x1e852c(0xca)],T[_0x1e852c(0xf9)]),O(0x1,c[_0x1e852c(0xc3)](c[_0x1e852c(0x90)])),O(0x2,c[_0x1e852c(0x91)])],exports[_0x1e852c(0x88)]);
|
|
1
|
+
'use strict';const _0x15a997=_0x5748;(function(_0x35cf59,_0x2adf24){const _0x92dd60=_0x5748,_0x1e1910=_0x35cf59();while(!![]){try{const _0x5371ae=-parseInt(_0x92dd60(0x226))/0x1*(parseInt(_0x92dd60(0x1c2))/0x2)+parseInt(_0x92dd60(0x210))/0x3*(parseInt(_0x92dd60(0x1dd))/0x4)+-parseInt(_0x92dd60(0x1e9))/0x5*(-parseInt(_0x92dd60(0x1c6))/0x6)+parseInt(_0x92dd60(0x1c5))/0x7+parseInt(_0x92dd60(0x1b8))/0x8+parseInt(_0x92dd60(0x22a))/0x9+parseInt(_0x92dd60(0x228))/0xa*(-parseInt(_0x92dd60(0x1fe))/0xb);if(_0x5371ae===_0x2adf24)break;else _0x1e1910['push'](_0x1e1910['shift']());}catch(_0x3b58bd){_0x1e1910['push'](_0x1e1910['shift']());}}}(_0x532b,0xb16b5));Object[_0x15a997(0x1f5)](exports,Symbol[_0x15a997(0x1e7)],{'value':_0x15a997(0x1b2)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x165252=>(_0x165252[_0x165252[_0x15a997(0x220)]=0x0]=_0x15a997(0x220),_0x165252[_0x165252[_0x15a997(0x1f7)]=0x1]='Solved',_0x165252[_0x165252[_0x15a997(0x1f8)]=-0x1]=_0x15a997(0x1f8),_0x165252))(I||{}),v=(_0x10786b=>(_0x10786b[_0x10786b['Unknown']=0x0]=_0x15a997(0x223),_0x10786b[_0x10786b['Add']=0x1]=_0x15a997(0x227),_0x10786b[_0x10786b[_0x15a997(0x21b)]=0x2]='Reply',_0x10786b[_0x10786b['Edit']=0x3]='Edit',_0x10786b[_0x10786b['Delete']=0x4]='Delete',_0x10786b[_0x10786b[_0x15a997(0x1bd)]=0x5]=_0x15a997(0x1bd),_0x10786b[_0x10786b[_0x15a997(0x1f8)]=-0x1]=_0x15a997(0x1f8),_0x10786b))(v||{});const f=_0x5497e3=>c[_0x15a997(0x205)](new Date(+_0x5497e3))[_0x15a997(0x22b)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x281528,_0x26248f)=>{const _0x5d36e1=_0x15a997,_0x5fe2e9=_0x281528[_0x5d36e1(0x1ea)](c['UserManagerService']),_0x436a23=_0x281528[_0x5d36e1(0x1ea)](P[_0x5d36e1(0x1d3)]);_0x26248f[_0x5d36e1(0x1fd)](_0x16ef47=>{const _0x53a1ef=_0x5d36e1;_0x5fe2e9[_0x53a1ef(0x1d9)](_0x16ef47)&&_0x26248f['delete'](_0x16ef47);}),_0x26248f[_0x5d36e1(0x1c1)]&&(await _0x436a23['get'](_0x5d36e1(0x1d5),{'params':{'userIDs':[..._0x26248f]}}))[_0x5d36e1(0x219)]['users'][_0x5d36e1(0x1fd)](_0x38440c=>{const _0x376eee=_0x5d36e1;_0x38440c&&_0x5fe2e9[_0x376eee(0x1fb)](_0x38440c);});};var $=Object[_0x15a997(0x1bb)],E=(_0x1a8947,_0x2c5bad,_0x5d5441,_0x447673)=>{const _0x52edeb=_0x15a997;for(var _0x59610a=_0x447673>0x1?void 0x0:_0x447673?$(_0x2c5bad,_0x5d5441):_0x2c5bad,_0x1a3f55=_0x1a8947[_0x52edeb(0x217)]-0x1,_0x5b82bb;_0x1a3f55>=0x0;_0x1a3f55--)(_0x5b82bb=_0x1a8947[_0x1a3f55])&&(_0x59610a=_0x5b82bb(_0x59610a)||_0x59610a);return _0x59610a;},S=(_0x47042b,_0x17272b)=>(_0x49da53,_0x463677)=>_0x17272b(_0x49da53,_0x463677,_0x47042b);let _=class extends c[_0x15a997(0x1e1)]{constructor(_0x4f17f0,_0x1827dc,_0x45c786,_0x13f1ce){const _0x15cb68=_0x15a997;super(),this[_0x15cb68(0x218)]=_0x4f17f0,this[_0x15cb68(0x202)]=_0x1827dc,this[_0x15cb68(0x21a)]=_0x45c786,this['_injector']=_0x13f1ce,this['_init'](),this[_0x15cb68(0x214)]();}[_0x15a997(0x214)](){const _0x475779=_0x15a997;this[_0x475779(0x222)](this[_0x475779(0x202)][_0x475779(0x204)][_0x475779(0x1f3)](j[_0x475779(0x211)](0x10))[_0x475779(0x21c)](_0xa83222=>{const _0x4e2246=_0x475779,_0x358653=new Set();_0xa83222[_0x4e2246(0x1fd)](_0x575efc=>{const _0x59be20=_0x4e2246;switch(_0x575efc[_0x59be20(0x1be)]){case'add':{const _0x214152=_0x575efc[_0x59be20(0x21f)]['personId'];_0x358653[_0x59be20(0x1e8)](_0x214152);break;}}}),R(this[_0x4e2246(0x1c3)],_0x358653);}));}['_init'](){const _0x1bf17f=_0x15a997;this[_0x1bf17f(0x222)](this[_0x1bf17f(0x218)]['commentUpdate$'][_0x1bf17f(0x21c)](async _0x3c33c8=>{const _0x5d29fe=_0x1bf17f;var _0x565205,_0x2484a8,_0x3b47e6,_0x1deccb;const _0x192599=(_0x565205=this[_0x5d29fe(0x202)]['getUnit'](_0x3c33c8[_0x5d29fe(0x1dc)])['find'](_0x547349=>_0x547349[_0x5d29fe(0x1c7)]===_0x3c33c8[_0x5d29fe(0x1c7)]))==null?void 0x0:_0x565205[_0x5d29fe(0x216)];if(!_0x192599)return;const {unitId:_0x437549,subUnitId:_0x1d1c08}=_0x192599;switch(_0x3c33c8[_0x5d29fe(0x215)]&&this[_0x5d29fe(0x21a)][_0x5d29fe(0x1fb)](_0x3c33c8[_0x5d29fe(0x215)]),_0x3c33c8[_0x5d29fe(0x1be)]){case v['Add']:break;case v[_0x5d29fe(0x21b)]:{this[_0x5d29fe(0x202)][_0x5d29fe(0x1e3)](_0x437549,_0x1d1c08,{'unitId':_0x437549,'subUnitId':_0x1d1c08,'ref':'','id':_0x3c33c8[_0x5d29fe(0x20f)],'dT':f(+_0x3c33c8[_0x5d29fe(0x1cb)]),'threadId':_0x3c33c8['threadId'],'personId':(_0x3b47e6=(_0x2484a8=_0x3c33c8['user'])==null?void 0x0:_0x2484a8['userID'])!=null?_0x3b47e6:_0x3c33c8[_0x5d29fe(0x20a)],'text':JSON[_0x5d29fe(0x1e5)](_0x3c33c8[_0x5d29fe(0x225)]),'parentId':_0x192599['id']});break;}case v[_0x5d29fe(0x209)]:{const _0x4366c0=this['_threadCommentModel'][_0x5d29fe(0x213)](_0x437549,_0x1d1c08,_0x3c33c8[_0x5d29fe(0x20f)]);_0x4366c0&&_0x4366c0[_0x5d29fe(0x203)]&&this[_0x5d29fe(0x202)][_0x5d29fe(0x206)](_0x437549,_0x1d1c08,_0x3c33c8[_0x5d29fe(0x20f)]);break;}case v[_0x5d29fe(0x20e)]:{this[_0x5d29fe(0x202)][_0x5d29fe(0x1fa)](_0x437549,_0x1d1c08,{'commentId':_0x3c33c8[_0x5d29fe(0x20f)],'text':JSON[_0x5d29fe(0x1e5)](_0x3c33c8[_0x5d29fe(0x225)])});break;}case v[_0x5d29fe(0x1bd)]:{const _0xe369b4=(_0x1deccb=this['_threadCommentModel'][_0x5d29fe(0x1d8)](_0x3c33c8[_0x5d29fe(0x1dc)])[_0x5d29fe(0x1d6)](_0x2f62bf=>_0x2f62bf[_0x5d29fe(0x1c7)]===_0x3c33c8[_0x5d29fe(0x1c7)]))==null?void 0x0:_0x1deccb[_0x5d29fe(0x216)];_0xe369b4&&this[_0x5d29fe(0x202)][_0x5d29fe(0x1e4)](_0x437549,_0x1d1c08,_0xe369b4['id'],_0x3c33c8[_0x5d29fe(0x212)]===I[_0x5d29fe(0x1f7)]);break;}}}));}};_=E([S(0x0,c[_0x15a997(0x1de)](b[_0x15a997(0x1df)])),S(0x1,c[_0x15a997(0x1de)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x15a997(0x1de)](c[_0x15a997(0x207)]))],_);const q=_0x15a997(0x21d),D={};function _0x5748(_0x3577b2,_0x44bd10){const _0x532b7b=_0x532b();return _0x5748=function(_0x5748d6,_0x4215c9){_0x5748d6=_0x5748d6-0x1b1;let _0x1fb448=_0x532b7b[_0x5748d6];return _0x1fb448;},_0x5748(_0x3577b2,_0x44bd10);}var A=Object[_0x15a997(0x1bb)],x=(_0xb35001,_0x7a4f67,_0x50ed9f,_0x288d63)=>{for(var _0x4a6863=_0x288d63>0x1?void 0x0:_0x288d63?A(_0x7a4f67,_0x50ed9f):_0x7a4f67,_0x99ac6=_0xb35001['length']-0x1,_0x1d2f38;_0x99ac6>=0x0;_0x99ac6--)(_0x1d2f38=_0xb35001[_0x99ac6])&&(_0x4a6863=_0x1d2f38(_0x4a6863)||_0x4a6863);return _0x4a6863;},C=(_0x5c9e53,_0x52ca93)=>(_0x140e1b,_0x2bae03)=>_0x52ca93(_0x140e1b,_0x2bae03,_0x5c9e53);function Y(_0x301fbc,_0x79c39b){const _0x5cb637=_0x15a997,_0x51c106=_0x301fbc['replies'][0x0];return{..._0x79c39b,'id':_0x51c106[_0x5cb637(0x20f)],'resolved':_0x301fbc[_0x5cb637(0x212)]===0x1,'dT':f(_0x51c106[_0x5cb637(0x1cb)]),'personId':_0x51c106[_0x5cb637(0x20a)],'threadId':_0x51c106[_0x5cb637(0x1c7)]};}function G(_0x2f6f72,_0x397559,_0x252094){const _0x2f6bd4=_0x15a997;var _0x314d53,_0x2d1d7e;if(((_0x2d1d7e=(_0x314d53=_0x2f6f72==null?void 0x0:_0x2f6f72[_0x2f6bd4(0x208)])==null?void 0x0:_0x314d53['length'])!=null?_0x2d1d7e:0x0)>0x0){const _0x284399=(_0x34fa9d,_0x177cb1)=>({'id':_0x34fa9d[_0x2f6bd4(0x20f)],'threadId':_0x34fa9d['threadId'],'dT':f(_0x34fa9d[_0x2f6bd4(0x1cb)]),'personId':_0x34fa9d[_0x2f6bd4(0x20a)],'resolved':_0x2f6f72[_0x2f6bd4(0x212)]===I[_0x2f6bd4(0x1f7)],'unitId':_0x397559,'subUnitId':_0x252094,'text':JSON[_0x2f6bd4(0x1e5)](_0x34fa9d['content']),'parentId':_0x177cb1}),_0x4e418f=_0x284399(_0x2f6f72[_0x2f6bd4(0x208)][0x0]);return{..._0x4e418f,'children':_0x2f6f72[_0x2f6bd4(0x208)][_0x2f6bd4(0x1f6)](0x1)[_0x2f6bd4(0x1cd)](_0x52ac40=>_0x284399(_0x52ac40,_0x4e418f['id']))};}return null;}let p=class{constructor(_0x553c17,_0x5b40dd,_0x3f9a89){const _0x34400f=_0x15a997;this[_0x34400f(0x1ce)]=_0x553c17,this[_0x34400f(0x21a)]=_0x5b40dd,this[_0x34400f(0x1b4)]=_0x3f9a89;}async[_0x15a997(0x1e3)](_0x2732ce){const _0x54b979=_0x15a997;var _0x5ca4e8,_0x300f1b;const {parentId:_0x2bf8d0,unitId:_0x387365,text:_0xf197a5,threadId:_0x2e6526}=_0x2732ce,_0xcfa58c=(_0x300f1b=(_0x5ca4e8=_0xf197a5['customRanges'])==null?void 0x0:_0x5ca4e8['filter'](_0x5cf4dd=>_0x5cf4dd[_0x54b979(0x1bc)]===c[_0x54b979(0x1d1)]['COMMENT'])[_0x54b979(0x1cd)](_0x52233c=>_0x52233c['rangeId']))!=null?_0x300f1b:[],_0x5eb873=JSON['stringify'](_0xf197a5),_0x25b0cc=(await this[_0x54b979(0x1b4)][_0x54b979(0x1e6)](_0x387365))['getMemberID']();if(_0x2bf8d0){const _0x456e8d={'memberId':_0x25b0cc,'unitId':_0x387365,'content':_0x5eb873,'mention':_0xcfa58c,'threadId':_0x2e6526},_0x5bcfea=(await this['_httpService'][_0x54b979(0x1c9)](_0x54b979(0x1cf)+_0x387365+_0x54b979(0x22c),{'body':_0x456e8d}))[_0x54b979(0x219)][_0x54b979(0x1d2)];return{..._0x2732ce,'id':_0x5bcfea[_0x54b979(0x20f)],'dT':c[_0x54b979(0x205)](+_0x5bcfea[_0x54b979(0x1cb)])[_0x54b979(0x22b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5bcfea[_0x54b979(0x20a)]};}else{const _0x5c20fc={'memberId':_0x25b0cc,'unitId':_0x387365,'content':_0x5eb873,'mention':_0xcfa58c},_0x46eee9=await this[_0x54b979(0x1ce)]['post']('/universer-api/comment/unit/'+_0x387365+_0x54b979(0x1db),{'body':_0x5c20fc});return Y(_0x46eee9[_0x54b979(0x219)][_0x54b979(0x1ef)],_0x2732ce);}}async['updateComment'](_0x3de5be){const _0xb392aa=_0x15a997;var _0x31c4d0,_0x354d48;const {text:_0x1ca0cf,unitId:_0x5cb877}=_0x3de5be,_0xbd752b=(_0x354d48=(_0x31c4d0=_0x1ca0cf[_0xb392aa(0x1ee)])==null?void 0x0:_0x31c4d0[_0xb392aa(0x1b6)](_0x186152=>_0x186152[_0xb392aa(0x1bc)]===c[_0xb392aa(0x1d1)][_0xb392aa(0x1f1)])[_0xb392aa(0x1cd)](_0x480d16=>_0x480d16[_0xb392aa(0x20c)]))!=null?_0x354d48:[],_0x4687c2=JSON[_0xb392aa(0x1d7)](_0x1ca0cf),_0x6629b1=_0x3de5be[_0xb392aa(0x1c7)],_0x4c6345=_0x3de5be['id'],_0x2386e9={'memberId':(await this['_sessionService']['requireSession'](_0x5cb877))['getMemberID'](),'unitId':_0x5cb877,'threadId':_0x6629b1,'mention':_0xbd752b,'content':_0x4687c2,'replyId':_0x4c6345},_0x42db5f=await this[_0xb392aa(0x1ce)][_0xb392aa(0x1c9)](_0xb392aa(0x1cf)+_0x5cb877+'/edit',{'body':_0x2386e9});return!_0x42db5f['body'][_0xb392aa(0x1f0)]||_0x42db5f[_0xb392aa(0x219)][_0xb392aa(0x1f0)]['code']===0x1;}async[_0x15a997(0x1e4)](_0x3fbdd0){const _0x265b15=_0x15a997,{unitId:_0x171b5e}=_0x3fbdd0,_0xa76af=_0x3fbdd0[_0x265b15(0x1c7)],_0x5a0cea={'memberId':this['_userService'][_0x265b15(0x1ec)]()[_0x265b15(0x201)],'unitId':_0x171b5e,'threadId':_0xa76af,'solved':_0x3fbdd0[_0x265b15(0x1fc)]?I[_0x265b15(0x1f7)]:I[_0x265b15(0x220)]},_0x3ee6a2=await this[_0x265b15(0x1ce)]['post'](_0x265b15(0x1cf)+_0x171b5e+'/solved',{'body':_0x5a0cea});return!_0x3ee6a2[_0x265b15(0x219)][_0x265b15(0x1f0)]||_0x3ee6a2[_0x265b15(0x219)][_0x265b15(0x1f0)][_0x265b15(0x221)]===0x1;}async[_0x15a997(0x206)](_0xa6a345,_0x400ecf,_0x1a1fff,_0x1ce96a){const _0x2c35f9=_0x15a997,_0x29e94c={'memberId':(await this[_0x2c35f9(0x1b4)][_0x2c35f9(0x1e6)](_0xa6a345))['getMemberID'](),'threadId':_0x1a1fff,'replyId':_0x1ce96a,'unitId':_0xa6a345},_0x2c25b1=await this[_0x2c35f9(0x1ce)][_0x2c35f9(0x1c9)](_0x2c35f9(0x1cf)+_0xa6a345+_0x2c35f9(0x1ed),{'body':_0x29e94c});return!_0x2c25b1['body'][_0x2c35f9(0x1f0)]||_0x2c25b1[_0x2c35f9(0x219)][_0x2c35f9(0x1f0)][_0x2c35f9(0x221)]===0x1;}async[_0x15a997(0x1c0)](_0x204f8d,_0x4bcd05,_0x5ba462){const _0xf936df=_0x15a997,_0x362418={'unitId':_0x204f8d,'threadId':_0x5ba462},_0x49c38b=await this[_0xf936df(0x1ce)][_0xf936df(0x1c9)]('/universer-api/comment/unit/'+_0x204f8d+_0xf936df(0x1ff),{'body':_0x362418}),_0x5c048b=_0x5ba462[_0xf936df(0x1cd)](_0x22d230=>G(_0x49c38b['body'][_0xf936df(0x1b9)][_0x22d230],_0x204f8d,_0x4bcd05))['filter'](Boolean);return Object[_0xf936df(0x1d4)](_0x49c38b[_0xf936df(0x219)][_0xf936df(0x1f9)])[_0xf936df(0x1fd)](_0x520919=>{const _0x4d99d1=_0xf936df;this[_0x4d99d1(0x21a)][_0x4d99d1(0x1fb)](_0x520919);}),_0x5c048b;}[_0x15a997(0x1ca)](_0x460596){const _0xf438fe=_0x15a997;return{'id':_0x460596['id'],'threadId':_0x460596['threadId'],'ref':_0x460596[_0xf438fe(0x1eb)]};}};p=x([C(0x0,c[_0x15a997(0x1de)](P[_0x15a997(0x1d3)])),C(0x1,c['Inject'](c[_0x15a997(0x1c4)])),C(0x2,c[_0x15a997(0x1de)](b[_0x15a997(0x1f4)]))],p);function _0x532b(){const _0x4c4cdf=['stringify','getUnit','getUser','_config','/add','unitId','8ULQCoo','Inject','CommentService','onStarting','Disposable','_configService','addComment','resolveComment','parse','requireSession','toStringTag','add','5VWgTKH','get','ref','getCurrentUser','/delete','customRanges','comment','error','COMMENT','_initDataSource','pipe','CollaborationSessionService','defineProperty','slice','Solved','UNRECOGNIZED','users','updateComment','addUser','resolved','forEach','34166BrflDe','/list','UniverCollaborationClientPlugin','userID','_threadCommentModel','parentId','commentUpdate$','dayjs','deleteComment','Injector','replies','Delete','userId','setConfig','rangeId','DependentOn','Edit','replyId','1109154MVUlAy','bufferTime','solved','getComment','_initUserSync','user','root','length','_commentService','body','_userService','Reply','subscribe','thread-comment-data-source.config','IThreadCommentDataSourceService','payload','OpenOrReOpen','code','disposeWithMe','Unknown','IConfigService','content','2339nxZRDo','Add','5790QCinHI','Plugin','5297175rBKDCy','format','/reply','UniverLicensePlugin','_threadCommentDataSource','Module','UNIVER_UNKNOWN','_sessionService','_threadCommentDataSourceService','filter','symbol','7240376EdIoxV','comments','UniverInstanceType','getOwnPropertyDescriptor','rangeType','Solve','type','UniverThreadCommentUIPlugin','listComments','size','802XaGiKL','_injector','UserManagerService','1219253jdtqVj','6334710Gzdsoe','threadId','dataSource','post','saveCommentToSnapshot','createTimestamp','pluginName','map','_httpService','/universer-api/comment/unit/','UniverThreadCommentDataSourcePlugin','CustomRangeType','reply','HTTPService','values','/universer-api/user/list','find'];_0x532b=function(){return _0x4c4cdf;};return _0x532b();}var H=Object[_0x15a997(0x1bb)],J=(_0x5d6208,_0x3a4fc0,_0x56173f,_0x575b5f)=>{const _0x6c855a=_0x15a997;for(var _0x5c0feb=_0x575b5f>0x1?void 0x0:_0x575b5f?H(_0x3a4fc0,_0x56173f):_0x3a4fc0,_0x4d7b3b=_0x5d6208[_0x6c855a(0x217)]-0x1,_0x8051f4;_0x4d7b3b>=0x0;_0x4d7b3b--)(_0x8051f4=_0x5d6208[_0x4d7b3b])&&(_0x5c0feb=_0x8051f4(_0x5c0feb)||_0x5c0feb);return _0x5c0feb;},y=(_0x2fd9ab,_0x385d7f)=>(_0x278747,_0x1c1ab1)=>_0x385d7f(_0x278747,_0x1c1ab1,_0x2fd9ab);let g=class extends c[_0x15a997(0x1e1)]{constructor(_0x309199,_0x31eefa){const _0x4a6a33=_0x15a997;super(),this['_threadCommentDataSourceService']=_0x309199,this[_0x4a6a33(0x1b1)]=_0x31eefa,this[_0x4a6a33(0x1f2)]();}['_initDataSource'](){const _0xf4b7ec=_0x15a997;this[_0xf4b7ec(0x1b5)][_0xf4b7ec(0x1c8)]=this[_0xf4b7ec(0x1b1)],this[_0xf4b7ec(0x1b5)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x15a997(0x21e)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x15a997(0x1f5)],L=Object[_0x15a997(0x1bb)],Z=(_0x21cbca,_0x5295dc,_0x23292a)=>_0x5295dc in _0x21cbca?F(_0x21cbca,_0x5295dc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23292a}):_0x21cbca[_0x5295dc]=_0x23292a,W=(_0x3b9afe,_0x3b1a61,_0x1043ef,_0x348d42)=>{const _0x278083=_0x15a997;for(var _0x29ba33=_0x348d42>0x1?void 0x0:_0x348d42?L(_0x3b1a61,_0x1043ef):_0x3b1a61,_0x364840=_0x3b9afe[_0x278083(0x217)]-0x1,_0x5b4049;_0x364840>=0x0;_0x364840--)(_0x5b4049=_0x3b9afe[_0x364840])&&(_0x29ba33=_0x5b4049(_0x29ba33)||_0x29ba33);return _0x29ba33;},O=(_0x587ef7,_0x54df89)=>(_0x25f1ab,_0x12a783)=>_0x54df89(_0x25f1ab,_0x12a783,_0x587ef7),N=(_0x58736f,_0x3f3aae,_0x29c8a8)=>Z(_0x58736f,typeof _0x3f3aae!=_0x15a997(0x1b7)?_0x3f3aae+'':_0x3f3aae,_0x29c8a8);exports[_0x15a997(0x1d0)]=class extends c[_0x15a997(0x229)]{constructor(_0x3154db=D,_0x4f94bd,_0xa0573b){const _0x441c93=_0x15a997;super(),this['_config']=_0x3154db,this[_0x441c93(0x1c3)]=_0x4f94bd,this[_0x441c93(0x1e2)]=_0xa0573b;const {..._0x59a8f6}=c['merge']({},D,this[_0x441c93(0x1da)]);this[_0x441c93(0x1e2)][_0x441c93(0x20b)](q,_0x59a8f6);}[_0x15a997(0x1e0)](){const _0x34aa84=_0x15a997;[[p],[g],[_]][_0x34aa84(0x1fd)](_0x1e7e9e=>{const _0x2ef6d0=_0x34aa84;this[_0x2ef6d0(0x1c3)][_0x2ef6d0(0x1e8)](_0x1e7e9e);});}['onReady'](){const _0x5b8e85=_0x15a997;this[_0x5b8e85(0x1c3)][_0x5b8e85(0x1ea)](g),this[_0x5b8e85(0x1c3)][_0x5b8e85(0x1ea)](_);}},N(exports[_0x15a997(0x1d0)],_0x15a997(0x1cc),U),N(exports[_0x15a997(0x1d0)],_0x15a997(0x1be),c[_0x15a997(0x1ba)][_0x15a997(0x1b3)]),exports[_0x15a997(0x1d0)]=W([c[_0x15a997(0x20d)](w[_0x15a997(0x1bf)],b[_0x15a997(0x200)],T[_0x15a997(0x22d)]),O(0x1,c[_0x15a997(0x1de)](c['Injector'])),O(0x2,c[_0x15a997(0x224)])],exports[_0x15a997(0x1d0)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xae48e8=_0x4a6a;(function(_0x34c849,_0x10de2b){const _0x474d5e=_0x4a6a,_0x3e0b68=_0x34c849();while(!![]){try{const _0x2d5f54=-parseInt(_0x474d5e(0xec))/0x1*(parseInt(_0x474d5e(0xe0))/0x2)+parseInt(_0x474d5e(0xf1))/0x3+parseInt(_0x474d5e(0xe6))/0x4*(-parseInt(_0x474d5e(0xdb))/0x5)+parseInt(_0x474d5e(0xb1))/0x6+-parseInt(_0x474d5e(0xc7))/0x7*(-parseInt(_0x474d5e(0xb5))/0x8)+-parseInt(_0x474d5e(0xb2))/0x9*(-parseInt(_0x474d5e(0xd9))/0xa)+-parseInt(_0x474d5e(0xc9))/0xb*(parseInt(_0x474d5e(0xff))/0xc);if(_0x2d5f54===_0x10de2b)break;else _0x3e0b68['push'](_0x3e0b68['shift']());}catch(_0x2b72e5){_0x3e0b68['push'](_0x3e0b68['shift']());}}}(_0x6ed9,0x23880));import{CommentService as _0x4294c9,CollaborationSessionService as _0x12024f,UniverCollaborationClientPlugin as _0x490620}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x48719b}from'@univerjs-pro/license';import{dayjs as _0x112222,UserManagerService as _0x4a6b5e,Inject as _0x4293fe,Injector as _0x5f09c2,Disposable as _0x490269,CustomRangeType as _0x435b6d,UniverInstanceType as _0x2f7f9b,DependentOn as _0x5afa64,IConfigService as _0x254ac8,Plugin as _0x1d5852,merge as _0x2ffa71}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1f9c3f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x29a48e,IThreadCommentDataSourceService as _0x41df09}from'@univerjs/thread-comment';function _0x4a6a(_0x1eb5d0,_0x5beb7c){const _0x6ed95d=_0x6ed9();return _0x4a6a=function(_0x4a6a89,_0x2bf3b6){_0x4a6a89=_0x4a6a89-0xa6;let _0x1252a7=_0x6ed95d[_0x4a6a89];return _0x1252a7;},_0x4a6a(_0x1eb5d0,_0x5beb7c);}import{bufferTime as _0x350851}from'rxjs';import{HTTPService as _0x1f0c3e}from'@univerjs/network';const W=_0xae48e8(0xf4);var I=(_0x30d18c=>(_0x30d18c[_0x30d18c[_0xae48e8(0xba)]=0x0]=_0xae48e8(0xba),_0x30d18c[_0x30d18c['Solved']=0x1]=_0xae48e8(0x108),_0x30d18c[_0x30d18c[_0xae48e8(0xe8)]=-0x1]=_0xae48e8(0xe8),_0x30d18c))(I||{}),v=(_0x67ce74=>(_0x67ce74[_0x67ce74['Unknown']=0x0]=_0xae48e8(0x106),_0x67ce74[_0x67ce74['Add']=0x1]=_0xae48e8(0x10a),_0x67ce74[_0x67ce74[_0xae48e8(0xf7)]=0x2]='Reply',_0x67ce74[_0x67ce74[_0xae48e8(0xd4)]=0x3]=_0xae48e8(0xd4),_0x67ce74[_0x67ce74['Delete']=0x4]=_0xae48e8(0xc0),_0x67ce74[_0x67ce74[_0xae48e8(0xa8)]=0x5]=_0xae48e8(0xa8),_0x67ce74[_0x67ce74['UNRECOGNIZED']=-0x1]=_0xae48e8(0xe8),_0x67ce74))(v||{});const y=_0x1f20f9=>_0x112222(new Date(+_0x1f20f9))[_0xae48e8(0xcf)](_0xae48e8(0xea)),B=async(_0x5123a5,_0x174e65)=>{const _0x299d7a=_0xae48e8,_0x1aa93c=_0x5123a5['get'](_0x4a6b5e),_0x2be18a=_0x5123a5['get'](_0x1f0c3e);_0x174e65[_0x299d7a(0x104)](_0x2d3d5c=>{const _0x2e135e=_0x299d7a;_0x1aa93c[_0x2e135e(0xa7)](_0x2d3d5c)&&_0x174e65[_0x2e135e(0xbc)](_0x2d3d5c);}),_0x174e65[_0x299d7a(0xb9)]&&(await _0x2be18a[_0x299d7a(0xdc)](_0x299d7a(0xbf),{'params':{'userIDs':[..._0x174e65]}}))['body'][_0x299d7a(0xcd)][_0x299d7a(0x104)](_0x45a1f4=>{const _0x222e60=_0x299d7a;_0x45a1f4&&_0x1aa93c[_0x222e60(0xca)](_0x45a1f4);});};var K=Object[_0xae48e8(0xc5)],V=(_0x4f3f3c,_0xc88767,_0x4a144d,_0x180a10)=>{const _0x42355c=_0xae48e8;for(var _0x15e2a8=_0x180a10>0x1?void 0x0:_0x180a10?K(_0xc88767,_0x4a144d):_0xc88767,_0x1a8ce7=_0x4f3f3c[_0x42355c(0x101)]-0x1,_0x34c274;_0x1a8ce7>=0x0;_0x1a8ce7--)(_0x34c274=_0x4f3f3c[_0x1a8ce7])&&(_0x15e2a8=_0x34c274(_0x15e2a8)||_0x15e2a8);return _0x15e2a8;},p=(_0x2269b7,_0x354442)=>(_0x4b5aed,_0x8473dd)=>_0x354442(_0x4b5aed,_0x8473dd,_0x2269b7);let _=class extends _0x490269{constructor(_0x21dab8,_0x44d787,_0x423357,_0xb7e4ac){const _0x32c25a=_0xae48e8;super(),this[_0x32c25a(0x100)]=_0x21dab8,this[_0x32c25a(0xb7)]=_0x44d787,this[_0x32c25a(0xe7)]=_0x423357,this['_injector']=_0xb7e4ac,this[_0x32c25a(0xef)](),this[_0x32c25a(0xd6)]();}[_0xae48e8(0xd6)](){const _0x317d70=_0xae48e8;this[_0x317d70(0xbb)](this[_0x317d70(0xb7)]['commentUpdate$']['pipe'](_0x350851(0x10))['subscribe'](_0x5c19cd=>{const _0x30aaf5=_0x317d70,_0x468230=new Set();_0x5c19cd[_0x30aaf5(0x104)](_0x55ae96=>{const _0x2200f7=_0x30aaf5;switch(_0x55ae96['type']){case _0x2200f7(0xb4):{const _0x4104f0=_0x55ae96[_0x2200f7(0xdd)]['personId'];_0x468230[_0x2200f7(0xb4)](_0x4104f0);break;}}}),B(this['_injector'],_0x468230);}));}['_init'](){const _0x369bfd=_0xae48e8;this[_0x369bfd(0xbb)](this['_commentService'][_0x369bfd(0xde)]['subscribe'](async _0x1ce3c8=>{const _0x1a29cb=_0x369bfd;var _0x3df353,_0x460914,_0x9a8e37,_0x5837ad;const _0x47d013=(_0x3df353=this[_0x1a29cb(0xb7)][_0x1a29cb(0xae)](_0x1ce3c8[_0x1a29cb(0xab)])[_0x1a29cb(0xe4)](_0x414284=>_0x414284[_0x1a29cb(0xd5)]===_0x1ce3c8[_0x1a29cb(0xd5)]))==null?void 0x0:_0x3df353[_0x1a29cb(0xfd)];if(!_0x47d013)return;const {unitId:_0x347b30,subUnitId:_0x24dbe6}=_0x47d013;switch(_0x1ce3c8[_0x1a29cb(0xfc)]&&this[_0x1a29cb(0xe7)][_0x1a29cb(0xca)](_0x1ce3c8['user']),_0x1ce3c8[_0x1a29cb(0x105)]){case v[_0x1a29cb(0x10a)]:break;case v[_0x1a29cb(0xf7)]:{this['_threadCommentModel'][_0x1a29cb(0xe3)](_0x347b30,_0x24dbe6,{'unitId':_0x347b30,'subUnitId':_0x24dbe6,'ref':'','id':_0x1ce3c8['replyId'],'dT':y(+_0x1ce3c8['createTimestamp']),'threadId':_0x1ce3c8[_0x1a29cb(0xd5)],'personId':(_0x9a8e37=(_0x460914=_0x1ce3c8['user'])==null?void 0x0:_0x460914['userID'])!=null?_0x9a8e37:_0x1ce3c8[_0x1a29cb(0xc1)],'text':JSON[_0x1a29cb(0xda)](_0x1ce3c8[_0x1a29cb(0xac)]),'parentId':_0x47d013['id']});break;}case v[_0x1a29cb(0xc0)]:{const _0x5d7137=this[_0x1a29cb(0xb7)][_0x1a29cb(0xcc)](_0x347b30,_0x24dbe6,_0x1ce3c8[_0x1a29cb(0x103)]);_0x5d7137&&_0x5d7137['parentId']&&this[_0x1a29cb(0xb7)][_0x1a29cb(0xed)](_0x347b30,_0x24dbe6,_0x1ce3c8[_0x1a29cb(0x103)]);break;}case v['Edit']:{this[_0x1a29cb(0xb7)][_0x1a29cb(0x107)](_0x347b30,_0x24dbe6,{'commentId':_0x1ce3c8[_0x1a29cb(0x103)],'text':JSON[_0x1a29cb(0xda)](_0x1ce3c8['content'])});break;}case v[_0x1a29cb(0xa8)]:{const _0xa3f900=(_0x5837ad=this[_0x1a29cb(0xb7)][_0x1a29cb(0xae)](_0x1ce3c8[_0x1a29cb(0xab)])['find'](_0x2300ea=>_0x2300ea[_0x1a29cb(0xd5)]===_0x1ce3c8[_0x1a29cb(0xd5)]))==null?void 0x0:_0x5837ad[_0x1a29cb(0xfd)];_0xa3f900&&this[_0x1a29cb(0xb7)][_0x1a29cb(0xbe)](_0x347b30,_0x24dbe6,_0xa3f900['id'],_0x1ce3c8[_0x1a29cb(0xa9)]===I[_0x1a29cb(0x108)]);break;}}}));}};_=V([p(0x0,_0x4293fe(_0x4294c9)),p(0x1,_0x4293fe(_0x29a48e)),p(0x2,_0x4293fe(_0x4a6b5e)),p(0x3,_0x4293fe(_0x5f09c2))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0xae48e8(0xc5)],Q=(_0x1bc445,_0x976867,_0x5f2c61,_0x3f1647)=>{for(var _0x56146e=_0x3f1647>0x1?void 0x0:_0x3f1647?k(_0x976867,_0x5f2c61):_0x976867,_0x3c1514=_0x1bc445['length']-0x1,_0x2ae76c;_0x3c1514>=0x0;_0x3c1514--)(_0x2ae76c=_0x1bc445[_0x3c1514])&&(_0x56146e=_0x2ae76c(_0x56146e)||_0x56146e);return _0x56146e;},b=(_0x27caf9,_0x3d1875)=>(_0x4b89da,_0x2b4606)=>_0x3d1875(_0x4b89da,_0x2b4606,_0x27caf9);function X(_0x48eda6,_0x3f99a0){const _0x1405f1=_0xae48e8,_0x438ea8=_0x48eda6[_0x1405f1(0xf0)][0x0];return{..._0x3f99a0,'id':_0x438ea8['replyId'],'resolved':_0x48eda6['solved']===0x1,'dT':y(_0x438ea8[_0x1405f1(0xf8)]),'personId':_0x438ea8[_0x1405f1(0xc1)],'threadId':_0x438ea8[_0x1405f1(0xd5)]};}function ee(_0x5c3ae4,_0x3494c0,_0x2c70d3){const _0x19de92=_0xae48e8;var _0x4d3db6,_0xe146e9;if(((_0xe146e9=(_0x4d3db6=_0x5c3ae4==null?void 0x0:_0x5c3ae4[_0x19de92(0xf0)])==null?void 0x0:_0x4d3db6[_0x19de92(0x101)])!=null?_0xe146e9:0x0)>0x0){const _0x573bb7=(_0x15d944,_0x26e7b1)=>({'id':_0x15d944[_0x19de92(0x103)],'threadId':_0x15d944['threadId'],'dT':y(_0x15d944['createTimestamp']),'personId':_0x15d944['userId'],'resolved':_0x5c3ae4[_0x19de92(0xa9)]===I['Solved'],'unitId':_0x3494c0,'subUnitId':_0x2c70d3,'text':JSON['parse'](_0x15d944[_0x19de92(0xac)]),'parentId':_0x26e7b1}),_0x551ec8=_0x573bb7(_0x5c3ae4[_0x19de92(0xf0)][0x0]);return{..._0x551ec8,'children':_0x5c3ae4['replies'][_0x19de92(0xa6)](0x1)[_0x19de92(0xee)](_0x3b74f9=>_0x573bb7(_0x3b74f9,_0x551ec8['id']))};}return null;}function _0x6ed9(){const _0x2a08d2=['/list','150qtiKpT','parse','75255EDCiRg','get','payload','commentUpdate$','requireSession','2048dFLKum','_injector','_threadCommentDataSourceService','addComment','find','_threadCommentDataSource','64FkGudo','_userService','UNRECOGNIZED','saveCommentToSnapshot','YYYY/MM/DD\x20HH:mm','listComments','12SSKLbs','deleteComment','map','_init','replies','260622MWvtXl','post','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','comments','Reply','createTimestamp','dataSource','rangeType','_configService','user','root','filter','48keSAco','_commentService','length','/add','replyId','forEach','type','Unknown','updateComment','Solved','_initDataSource','Add','slice','getUser','Solve','solved','_config','unitId','content','UNIVER_UNKNOWN','getUnit','getMemberID','defineProperty','868992PGUdsN','136179NnLRpW','_httpService','add','24FDayxI','onStarting','_threadCommentModel','body','size','OpenOrReOpen','disposeWithMe','delete','_sessionService','resolveComment','/universer-api/user/list','Delete','userId','rangeId','syncUpdateMutationToColla','resolved','getOwnPropertyDescriptor','customRanges','82481mqyXCZ','/reply','262295veSzsV','addUser','/solved','getComment','users','ref','format','reply','/universer-api/comment/unit/','code','COMMENT','Edit','threadId','_initUserSync','error'];_0x6ed9=function(){return _0x2a08d2;};return _0x6ed9();}let S=class{constructor(_0x5f3117,_0x509651,_0x1874bf){const _0x4619dc=_0xae48e8;this[_0x4619dc(0xb3)]=_0x5f3117,this[_0x4619dc(0xe7)]=_0x509651,this[_0x4619dc(0xbd)]=_0x1874bf;}async['addComment'](_0x4921cb){const _0x5580de=_0xae48e8;var _0x309e5b,_0xfbfba1;const {parentId:_0x29aa91,unitId:_0x20be5f,text:_0x1d027b,threadId:_0x3d6a0b}=_0x4921cb,_0x19f2e5=(_0xfbfba1=(_0x309e5b=_0x1d027b[_0x5580de(0xc6)])==null?void 0x0:_0x309e5b['filter'](_0x1e0417=>_0x1e0417[_0x5580de(0xfa)]===_0x435b6d[_0x5580de(0xd3)])['map'](_0x1fb682=>_0x1fb682[_0x5580de(0xc2)]))!=null?_0xfbfba1:[],_0x14402e=JSON['stringify'](_0x1d027b),_0xf6e0a6=(await this[_0x5580de(0xbd)][_0x5580de(0xdf)](_0x20be5f))[_0x5580de(0xaf)]();if(_0x29aa91){const _0x5cacfd={'memberId':_0xf6e0a6,'unitId':_0x20be5f,'content':_0x14402e,'mention':_0x19f2e5,'threadId':_0x3d6a0b},_0x16fee3=(await this['_httpService'][_0x5580de(0xf2)](_0x5580de(0xd1)+_0x20be5f+_0x5580de(0xc8),{'body':_0x5cacfd}))[_0x5580de(0xb8)][_0x5580de(0xd0)];return{..._0x4921cb,'id':_0x16fee3[_0x5580de(0x103)],'dT':_0x112222(+_0x16fee3[_0x5580de(0xf8)])[_0x5580de(0xcf)](_0x5580de(0xea)),'personId':_0x16fee3['userId']};}else{const _0x1f7910={'memberId':_0xf6e0a6,'unitId':_0x20be5f,'content':_0x14402e,'mention':_0x19f2e5},_0x25906c=await this[_0x5580de(0xb3)][_0x5580de(0xf2)](_0x5580de(0xd1)+_0x20be5f+_0x5580de(0x102),{'body':_0x1f7910});return X(_0x25906c[_0x5580de(0xb8)]['comment'],_0x4921cb);}}async[_0xae48e8(0x107)](_0x3aed10){const _0x4f1bbf=_0xae48e8;var _0x5f4ba3,_0xaeba8e;const {text:_0x3bb053,unitId:_0xd2ce68}=_0x3aed10,_0x103757=(_0xaeba8e=(_0x5f4ba3=_0x3bb053['customRanges'])==null?void 0x0:_0x5f4ba3[_0x4f1bbf(0xfe)](_0x1d09a8=>_0x1d09a8[_0x4f1bbf(0xfa)]===_0x435b6d[_0x4f1bbf(0xd3)])[_0x4f1bbf(0xee)](_0x6cd4a6=>_0x6cd4a6[_0x4f1bbf(0xc2)]))!=null?_0xaeba8e:[],_0x3e9165=JSON['stringify'](_0x3bb053),_0x444a88=_0x3aed10[_0x4f1bbf(0xd5)],_0x362784=_0x3aed10['id'],_0x49aac6={'memberId':(await this[_0x4f1bbf(0xbd)][_0x4f1bbf(0xdf)](_0xd2ce68))['getMemberID'](),'unitId':_0xd2ce68,'threadId':_0x444a88,'mention':_0x103757,'content':_0x3e9165,'replyId':_0x362784},_0xd5b3b8=await this[_0x4f1bbf(0xb3)][_0x4f1bbf(0xf2)]('/universer-api/comment/unit/'+_0xd2ce68+'/edit',{'body':_0x49aac6});return!_0xd5b3b8[_0x4f1bbf(0xb8)][_0x4f1bbf(0xd7)]||_0xd5b3b8[_0x4f1bbf(0xb8)][_0x4f1bbf(0xd7)][_0x4f1bbf(0xd2)]===0x1;}async[_0xae48e8(0xbe)](_0x57b468){const _0x494714=_0xae48e8,{unitId:_0x43bfb4}=_0x57b468,_0x2a078f=_0x57b468[_0x494714(0xd5)],_0x109614={'memberId':this[_0x494714(0xe7)][_0x494714(0xf5)]()['userID'],'unitId':_0x43bfb4,'threadId':_0x2a078f,'solved':_0x57b468[_0x494714(0xc4)]?I['Solved']:I[_0x494714(0xba)]},_0xa513b7=await this[_0x494714(0xb3)]['post'](_0x494714(0xd1)+_0x43bfb4+_0x494714(0xcb),{'body':_0x109614});return!_0xa513b7[_0x494714(0xb8)][_0x494714(0xd7)]||_0xa513b7[_0x494714(0xb8)]['error'][_0x494714(0xd2)]===0x1;}async['deleteComment'](_0x91399b,_0x265efe,_0x17c895,_0x53c485){const _0x1f1b71=_0xae48e8,_0x1c648e={'memberId':(await this[_0x1f1b71(0xbd)][_0x1f1b71(0xdf)](_0x91399b))[_0x1f1b71(0xaf)](),'threadId':_0x17c895,'replyId':_0x53c485,'unitId':_0x91399b},_0x2d0f66=await this['_httpService'][_0x1f1b71(0xf2)]('/universer-api/comment/unit/'+_0x91399b+'/delete',{'body':_0x1c648e});return!_0x2d0f66[_0x1f1b71(0xb8)][_0x1f1b71(0xd7)]||_0x2d0f66[_0x1f1b71(0xb8)]['error']['code']===0x1;}async[_0xae48e8(0xeb)](_0x18df81,_0x3f8fa6,_0x3c87ba){const _0x19ba03=_0xae48e8,_0x3db1c8={'unitId':_0x18df81,'threadId':_0x3c87ba},_0xfa71dd=await this[_0x19ba03(0xb3)][_0x19ba03(0xf2)]('/universer-api/comment/unit/'+_0x18df81+_0x19ba03(0xd8),{'body':_0x3db1c8}),_0x148e5a=_0x3c87ba[_0x19ba03(0xee)](_0x3b1e66=>ee(_0xfa71dd['body'][_0x19ba03(0xf6)][_0x3b1e66],_0x18df81,_0x3f8fa6))[_0x19ba03(0xfe)](Boolean);return Object[_0x19ba03(0xf3)](_0xfa71dd[_0x19ba03(0xb8)]['users'])['forEach'](_0x48a2f4=>{const _0x2751d4=_0x19ba03;this[_0x2751d4(0xe7)][_0x2751d4(0xca)](_0x48a2f4);}),_0x148e5a;}[_0xae48e8(0xe9)](_0x51f8ab){const _0x384089=_0xae48e8;return{'id':_0x51f8ab['id'],'threadId':_0x51f8ab[_0x384089(0xd5)],'ref':_0x51f8ab[_0x384089(0xce)]};}};S=Q([b(0x0,_0x4293fe(_0x1f0c3e)),b(0x1,_0x4293fe(_0x4a6b5e)),b(0x2,_0x4293fe(_0x12024f))],S);var re=Object[_0xae48e8(0xc5)],te=(_0x868595,_0x49a3e5,_0x7f37b3,_0x199247)=>{const _0x414813=_0xae48e8;for(var _0x51e3e4=_0x199247>0x1?void 0x0:_0x199247?re(_0x49a3e5,_0x7f37b3):_0x49a3e5,_0x32cd78=_0x868595[_0x414813(0x101)]-0x1,_0x168ab8;_0x32cd78>=0x0;_0x32cd78--)(_0x168ab8=_0x868595[_0x32cd78])&&(_0x51e3e4=_0x168ab8(_0x51e3e4)||_0x51e3e4);return _0x51e3e4;},M=(_0x5e3719,_0x3dce69)=>(_0x1f8e11,_0x5740ce)=>_0x3dce69(_0x1f8e11,_0x5740ce,_0x5e3719);let f=class extends _0x490269{constructor(_0x268d57,_0x200ef0){const _0x2d4a05=_0xae48e8;super(),this[_0x2d4a05(0xe2)]=_0x268d57,this[_0x2d4a05(0xe5)]=_0x200ef0,this[_0x2d4a05(0x109)]();}[_0xae48e8(0x109)](){const _0x43b95a=_0xae48e8;this['_threadCommentDataSourceService'][_0x43b95a(0xf9)]=this[_0x43b95a(0xe5)],this['_threadCommentDataSourceService'][_0x43b95a(0xc3)]=!0x1;}};f=te([M(0x0,_0x41df09),M(0x1,_0x4293fe(S))],f);var se=Object[_0xae48e8(0xb0)],oe=Object[_0xae48e8(0xc5)],ne=(_0xd724d0,_0x39fb83,_0x500f7c)=>_0x39fb83 in _0xd724d0?se(_0xd724d0,_0x39fb83,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x500f7c}):_0xd724d0[_0x39fb83]=_0x500f7c,ie=(_0x280339,_0x316153,_0x1fdac7,_0xd3543d)=>{const _0xa3e1e3=_0xae48e8;for(var _0x3b6a72=_0xd3543d>0x1?void 0x0:_0xd3543d?oe(_0x316153,_0x1fdac7):_0x316153,_0x256d40=_0x280339[_0xa3e1e3(0x101)]-0x1,_0xe878d1;_0x256d40>=0x0;_0x256d40--)(_0xe878d1=_0x280339[_0x256d40])&&(_0x3b6a72=_0xe878d1(_0x3b6a72)||_0x3b6a72);return _0x3b6a72;},N=(_0x5d1322,_0x263669)=>(_0x5c5359,_0xa2f7a1)=>_0x263669(_0x5c5359,_0xa2f7a1,_0x5d1322),$=(_0xdda9e0,_0x3f5d3a,_0x2d715c)=>ne(_0xdda9e0,typeof _0x3f5d3a!='symbol'?_0x3f5d3a+'':_0x3f5d3a,_0x2d715c);let g=class extends _0x1d5852{constructor(_0x3cbd37=O,_0x2dddcf,_0xe4bfcb){const _0x519874=_0xae48e8;super(),this['_config']=_0x3cbd37,this['_injector']=_0x2dddcf,this[_0x519874(0xfb)]=_0xe4bfcb;const {..._0x46b64e}=_0x2ffa71({},O,this[_0x519874(0xaa)]);this[_0x519874(0xfb)]['setConfig'](z,_0x46b64e);}[_0xae48e8(0xb6)](){[[S],[f],[_]]['forEach'](_0x381175=>{const _0x4d152f=_0x4a6a;this['_injector'][_0x4d152f(0xb4)](_0x381175);});}['onReady'](){const _0x1ef97b=_0xae48e8;this[_0x1ef97b(0xe1)][_0x1ef97b(0xdc)](f),this[_0x1ef97b(0xe1)][_0x1ef97b(0xdc)](_);}};$(g,'pluginName',W),$(g,'type',_0x2f7f9b[_0xae48e8(0xad)]),g=ie([_0x5afa64(_0x1f9c3f,_0x490620,_0x48719b),N(0x1,_0x4293fe(_0x5f09c2)),N(0x2,_0x254ac8)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3b7ea6=_0x5f2a;(function(_0x283cf7,_0x46fba3){const _0x6d5814=_0x5f2a,_0x146e4a=_0x283cf7();while(!![]){try{const _0x48feeb=-parseInt(_0x6d5814(0x10e))/0x1*(-parseInt(_0x6d5814(0xe7))/0x2)+-parseInt(_0x6d5814(0x112))/0x3*(-parseInt(_0x6d5814(0x119))/0x4)+-parseInt(_0x6d5814(0x116))/0x5*(parseInt(_0x6d5814(0xf7))/0x6)+-parseInt(_0x6d5814(0xbc))/0x7+parseInt(_0x6d5814(0x118))/0x8*(-parseInt(_0x6d5814(0x106))/0x9)+parseInt(_0x6d5814(0xfe))/0xa+-parseInt(_0x6d5814(0xfc))/0xb;if(_0x48feeb===_0x46fba3)break;else _0x146e4a['push'](_0x146e4a['shift']());}catch(_0x4aa755){_0x146e4a['push'](_0x146e4a['shift']());}}}(_0x33ad,0x276c2));import{CommentService as _0x470bf5,CollaborationSessionService as _0x3a4aed,UniverCollaborationClientPlugin as _0x5ecb4e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2d5534}from'@univerjs-pro/license';function _0x5f2a(_0x1a7afe,_0x5db058){const _0x33ad5d=_0x33ad();return _0x5f2a=function(_0x5f2a9e,_0x4773ad){_0x5f2a9e=_0x5f2a9e-0xb7;let _0x448c39=_0x33ad5d[_0x5f2a9e];return _0x448c39;},_0x5f2a(_0x1a7afe,_0x5db058);}import{dayjs as _0x595df9,UserManagerService as _0x5458cd,Inject as _0x28ae67,Injector as _0x44647b,Disposable as _0x5ac438,CustomRangeType as _0x325494,UniverInstanceType as _0x3366af,DependentOn as _0x31c2de,IConfigService as _0x3c3efa,Plugin as _0x59bcbe,merge as _0x4f527c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52729f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2e7a6e,IThreadCommentDataSourceService as _0x482fdc}from'@univerjs/thread-comment';import{bufferTime as _0x466a99}from'rxjs';import{HTTPService as _0x568a11}from'@univerjs/network';const W=_0x3b7ea6(0xc1);var I=(_0x4105a8=>(_0x4105a8[_0x4105a8['OpenOrReOpen']=0x0]=_0x3b7ea6(0x105),_0x4105a8[_0x4105a8[_0x3b7ea6(0xd4)]=0x1]=_0x3b7ea6(0xd4),_0x4105a8[_0x4105a8[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x4105a8))(I||{}),v=(_0x2e3b70=>(_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xcc)]=0x0]='Unknown',_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc0)]=0x1]=_0x3b7ea6(0xc0),_0x2e3b70[_0x2e3b70['Reply']=0x2]=_0x3b7ea6(0xb9),_0x2e3b70[_0x2e3b70['Edit']=0x3]=_0x3b7ea6(0xdd),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xf0)]=0x4]=_0x3b7ea6(0xf0),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc3)]=0x5]=_0x3b7ea6(0xc3),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x2e3b70))(v||{});const y=_0x3d6e20=>_0x595df9(new Date(+_0x3d6e20))[_0x3b7ea6(0xe5)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1e3f5f,_0x14e3f4)=>{const _0x2499b7=_0x3b7ea6,_0x19398d=_0x1e3f5f['get'](_0x5458cd),_0x296854=_0x1e3f5f[_0x2499b7(0xfa)](_0x568a11);_0x14e3f4['forEach'](_0x303083=>{const _0x20c0fd=_0x2499b7;_0x19398d[_0x20c0fd(0xbf)](_0x303083)&&_0x14e3f4[_0x20c0fd(0xf9)](_0x303083);}),_0x14e3f4[_0x2499b7(0xed)]&&(await _0x296854[_0x2499b7(0xfa)](_0x2499b7(0x115),{'params':{'userIDs':[..._0x14e3f4]}}))['body'][_0x2499b7(0xec)]['forEach'](_0x308462=>{const _0x12b557=_0x2499b7;_0x308462&&_0x19398d[_0x12b557(0xd9)](_0x308462);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x55a740,_0x472917,_0x5ab5b7,_0x564069)=>{const _0x320701=_0x3b7ea6;for(var _0xed6a3e=_0x564069>0x1?void 0x0:_0x564069?K(_0x472917,_0x5ab5b7):_0x472917,_0x4a0ac7=_0x55a740[_0x320701(0xf1)]-0x1,_0x5b64c4;_0x4a0ac7>=0x0;_0x4a0ac7--)(_0x5b64c4=_0x55a740[_0x4a0ac7])&&(_0xed6a3e=_0x5b64c4(_0xed6a3e)||_0xed6a3e);return _0xed6a3e;},p=(_0x2acd49,_0x29790c)=>(_0x23de51,_0x1fb4f4)=>_0x29790c(_0x23de51,_0x1fb4f4,_0x2acd49);let _=class extends _0x5ac438{constructor(_0x59bb49,_0x35bcf7,_0x583288,_0x241f1d){const _0x2ed31a=_0x3b7ea6;super(),this[_0x2ed31a(0x10c)]=_0x59bb49,this[_0x2ed31a(0xf5)]=_0x35bcf7,this[_0x2ed31a(0x113)]=_0x583288,this[_0x2ed31a(0xee)]=_0x241f1d,this[_0x2ed31a(0x110)](),this['_initUserSync']();}[_0x3b7ea6(0x100)](){const _0x36266e=_0x3b7ea6;this[_0x36266e(0x11d)](this['_threadCommentModel'][_0x36266e(0xb7)][_0x36266e(0xef)](_0x466a99(0x10))[_0x36266e(0xc7)](_0x36c9ce=>{const _0x4b5914=_0x36266e,_0x2ed94f=new Set();_0x36c9ce[_0x4b5914(0xea)](_0x54ac1b=>{const _0x51df4c=_0x4b5914;switch(_0x54ac1b[_0x51df4c(0xe4)]){case _0x51df4c(0x10b):{const _0x13d840=_0x54ac1b['payload'][_0x51df4c(0xf6)];_0x2ed94f['add'](_0x13d840);break;}}}),B(this[_0x4b5914(0xee)],_0x2ed94f);}));}['_init'](){const _0x3f5275=_0x3b7ea6;this['disposeWithMe'](this[_0x3f5275(0x10c)][_0x3f5275(0xb7)][_0x3f5275(0xc7)](async _0x4430b7=>{const _0xb0ca1a=_0x3f5275;var _0x9b3c3f,_0x3faf20,_0xb07964,_0x3e0545;const _0x46a076=(_0x9b3c3f=this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf3)](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x37fa0f=>_0x37fa0f[_0xb0ca1a(0x11c)]===_0x4430b7['threadId']))==null?void 0x0:_0x9b3c3f['root'];if(!_0x46a076)return;const {unitId:_0x4636d2,subUnitId:_0x2214ff}=_0x46a076;switch(_0x4430b7[_0xb0ca1a(0x10a)]&&this['_userService'][_0xb0ca1a(0xd9)](_0x4430b7[_0xb0ca1a(0x10a)]),_0x4430b7[_0xb0ca1a(0xe4)]){case v[_0xb0ca1a(0xc0)]:break;case v['Reply']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xdc)](_0x4636d2,_0x2214ff,{'unitId':_0x4636d2,'subUnitId':_0x2214ff,'ref':'','id':_0x4430b7['replyId'],'dT':y(+_0x4430b7[_0xb0ca1a(0xcb)]),'threadId':_0x4430b7[_0xb0ca1a(0x11c)],'personId':(_0xb07964=(_0x3faf20=_0x4430b7[_0xb0ca1a(0x10a)])==null?void 0x0:_0x3faf20[_0xb0ca1a(0x107)])!=null?_0xb07964:_0x4430b7[_0xb0ca1a(0xd7)],'text':JSON['parse'](_0x4430b7[_0xb0ca1a(0xbe)]),'parentId':_0x46a076['id']});break;}case v[_0xb0ca1a(0xf0)]:{const _0x1fc21b=this[_0xb0ca1a(0xf5)]['getComment'](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);_0x1fc21b&&_0x1fc21b[_0xb0ca1a(0x104)]&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0x11a)](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);break;}case v['Edit']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xb8)](_0x4636d2,_0x2214ff,{'commentId':_0x4430b7[_0xb0ca1a(0x101)],'text':JSON[_0xb0ca1a(0xc6)](_0x4430b7[_0xb0ca1a(0xbe)])});break;}case v[_0xb0ca1a(0xc3)]:{const _0x37eb1e=(_0x3e0545=this[_0xb0ca1a(0xf5)]['getUnit'](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x176e72=>_0x176e72[_0xb0ca1a(0x11c)]===_0x4430b7[_0xb0ca1a(0x11c)]))==null?void 0x0:_0x3e0545['root'];_0x37eb1e&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf4)](_0x4636d2,_0x2214ff,_0x37eb1e['id'],_0x4430b7[_0xb0ca1a(0xeb)]===I[_0xb0ca1a(0xd4)]);break;}}}));}};function _0x33ad(){const _0xfa4135=['_injector','pipe','Delete','length','code','getUnit','resolveComment','_threadCommentModel','personId','462MsFwhA','resolved','delete','get','_threadCommentDataSourceService','499026QHqcSv','/list','277920zILiob','listComments','_initUserSync','replyId','getMemberID','_configService','parentId','OpenOrReOpen','17163VKLgkr','userID','error','post','user','add','_commentService','_threadCommentDataSource','57993WWaqIB','syncUpdateMutationToColla','_init','saveCommentToSnapshot','6093zsLgaG','_userService','/delete','/universer-api/user/list','14205EGlZoX','map','144xWSrgm','596IFinBc','deleteComment','stringify','threadId','disposeWithMe','COMMENT','/universer-api/comment/unit/','commentUpdate$','updateComment','Reply','body','/add','311269JQnICV','setConfig','content','getUser','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','Solve','_httpService','_config','parse','subscribe','UNRECOGNIZED','_initDataSource','comments','createTimestamp','Unknown','/reply','slice','_sessionService','values','replies','unitId','filter','Solved','customRanges','pluginName','userId','ref','addUser','find','/solved','addComment','Edit','onReady','comment','rangeType','requireSession','onStarting','/edit','type','format','rangeId','6QohJIs','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','solved','users','size'];_0x33ad=function(){return _0xfa4135;};return _0x33ad();}_=V([p(0x0,_0x28ae67(_0x470bf5)),p(0x1,_0x28ae67(_0x2e7a6e)),p(0x2,_0x28ae67(_0x5458cd)),p(0x3,_0x28ae67(_0x44647b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x3b7ea6(0xe9)],Q=(_0x1937be,_0x594851,_0x40c47c,_0x380bd7)=>{for(var _0xbf1e64=_0x380bd7>0x1?void 0x0:_0x380bd7?k(_0x594851,_0x40c47c):_0x594851,_0x210a3e=_0x1937be['length']-0x1,_0x3ad3ef;_0x210a3e>=0x0;_0x210a3e--)(_0x3ad3ef=_0x1937be[_0x210a3e])&&(_0xbf1e64=_0x3ad3ef(_0xbf1e64)||_0xbf1e64);return _0xbf1e64;},b=(_0x4aeb2b,_0x4b65cf)=>(_0x267662,_0x77c4da)=>_0x4b65cf(_0x267662,_0x77c4da,_0x4aeb2b);function X(_0x1bfc6f,_0x496a2c){const _0x155726=_0x3b7ea6,_0x504f6c=_0x1bfc6f[_0x155726(0xd1)][0x0];return{..._0x496a2c,'id':_0x504f6c[_0x155726(0x101)],'resolved':_0x1bfc6f[_0x155726(0xeb)]===0x1,'dT':y(_0x504f6c[_0x155726(0xcb)]),'personId':_0x504f6c['userId'],'threadId':_0x504f6c[_0x155726(0x11c)]};}function ee(_0x5dbdc0,_0x5250e6,_0x2c0a8f){const _0x1134aa=_0x3b7ea6;var _0x3591e1,_0x58ee36;if(((_0x58ee36=(_0x3591e1=_0x5dbdc0==null?void 0x0:_0x5dbdc0[_0x1134aa(0xd1)])==null?void 0x0:_0x3591e1[_0x1134aa(0xf1)])!=null?_0x58ee36:0x0)>0x0){const _0x266b3f=(_0x5b6109,_0x3a124d)=>({'id':_0x5b6109[_0x1134aa(0x101)],'threadId':_0x5b6109[_0x1134aa(0x11c)],'dT':y(_0x5b6109['createTimestamp']),'personId':_0x5b6109[_0x1134aa(0xd7)],'resolved':_0x5dbdc0[_0x1134aa(0xeb)]===I[_0x1134aa(0xd4)],'unitId':_0x5250e6,'subUnitId':_0x2c0a8f,'text':JSON[_0x1134aa(0xc6)](_0x5b6109[_0x1134aa(0xbe)]),'parentId':_0x3a124d}),_0x35a508=_0x266b3f(_0x5dbdc0[_0x1134aa(0xd1)][0x0]);return{..._0x35a508,'children':_0x5dbdc0[_0x1134aa(0xd1)][_0x1134aa(0xce)](0x1)[_0x1134aa(0x117)](_0x5e937b=>_0x266b3f(_0x5e937b,_0x35a508['id']))};}return null;}let S=class{constructor(_0x3a7f5a,_0x3d747e,_0x3aad76){const _0x478ea6=_0x3b7ea6;this['_httpService']=_0x3a7f5a,this[_0x478ea6(0x113)]=_0x3d747e,this[_0x478ea6(0xcf)]=_0x3aad76;}async[_0x3b7ea6(0xdc)](_0x486127){const _0x151f9b=_0x3b7ea6;var _0x59e20e,_0x581230;const {parentId:_0x4c2cf1,unitId:_0x224636,text:_0x1d4c9c,threadId:_0x4f7eec}=_0x486127,_0x29a171=(_0x581230=(_0x59e20e=_0x1d4c9c[_0x151f9b(0xd5)])==null?void 0x0:_0x59e20e['filter'](_0x239ea0=>_0x239ea0[_0x151f9b(0xe0)]===_0x325494[_0x151f9b(0x11e)])['map'](_0x437cb2=>_0x437cb2[_0x151f9b(0xe6)]))!=null?_0x581230:[],_0x2b35d1=JSON[_0x151f9b(0x11b)](_0x1d4c9c),_0x45145e=(await this[_0x151f9b(0xcf)][_0x151f9b(0xe1)](_0x224636))[_0x151f9b(0x102)]();if(_0x4c2cf1){const _0x4098e0={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171,'threadId':_0x4f7eec},_0x39797a=(await this['_httpService'][_0x151f9b(0x109)]('/universer-api/comment/unit/'+_0x224636+_0x151f9b(0xcd),{'body':_0x4098e0}))['body']['reply'];return{..._0x486127,'id':_0x39797a[_0x151f9b(0x101)],'dT':_0x595df9(+_0x39797a['createTimestamp'])[_0x151f9b(0xe5)](_0x151f9b(0xe8)),'personId':_0x39797a[_0x151f9b(0xd7)]};}else{const _0x56e93b={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171},_0x560e94=await this[_0x151f9b(0xc4)][_0x151f9b(0x109)](_0x151f9b(0x11f)+_0x224636+_0x151f9b(0xbb),{'body':_0x56e93b});return X(_0x560e94['body'][_0x151f9b(0xdf)],_0x486127);}}async[_0x3b7ea6(0xb8)](_0x2d2cae){const _0x540afd=_0x3b7ea6;var _0x3f4b8c,_0x433ab3;const {text:_0x4f45d0,unitId:_0x59d4c3}=_0x2d2cae,_0x2fac39=(_0x433ab3=(_0x3f4b8c=_0x4f45d0[_0x540afd(0xd5)])==null?void 0x0:_0x3f4b8c[_0x540afd(0xd3)](_0x4d1f20=>_0x4d1f20[_0x540afd(0xe0)]===_0x325494[_0x540afd(0x11e)])[_0x540afd(0x117)](_0x5e5d95=>_0x5e5d95[_0x540afd(0xe6)]))!=null?_0x433ab3:[],_0x476e2f=JSON[_0x540afd(0x11b)](_0x4f45d0),_0x1e40cd=_0x2d2cae[_0x540afd(0x11c)],_0x45cbc4=_0x2d2cae['id'],_0x5d94a2={'memberId':(await this[_0x540afd(0xcf)][_0x540afd(0xe1)](_0x59d4c3))['getMemberID'](),'unitId':_0x59d4c3,'threadId':_0x1e40cd,'mention':_0x2fac39,'content':_0x476e2f,'replyId':_0x45cbc4},_0x132de1=await this[_0x540afd(0xc4)]['post'](_0x540afd(0x11f)+_0x59d4c3+_0x540afd(0xe3),{'body':_0x5d94a2});return!_0x132de1['body'][_0x540afd(0x108)]||_0x132de1[_0x540afd(0xba)][_0x540afd(0x108)]['code']===0x1;}async['resolveComment'](_0x5d8666){const _0x3e014f=_0x3b7ea6,{unitId:_0x43f062}=_0x5d8666,_0x423ce3=_0x5d8666[_0x3e014f(0x11c)],_0x3f8100={'memberId':this[_0x3e014f(0x113)]['getCurrentUser']()[_0x3e014f(0x107)],'unitId':_0x43f062,'threadId':_0x423ce3,'solved':_0x5d8666[_0x3e014f(0xf8)]?I[_0x3e014f(0xd4)]:I[_0x3e014f(0x105)]},_0x32155c=await this[_0x3e014f(0xc4)][_0x3e014f(0x109)](_0x3e014f(0x11f)+_0x43f062+_0x3e014f(0xdb),{'body':_0x3f8100});return!_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]||_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]['code']===0x1;}async[_0x3b7ea6(0x11a)](_0x1414ea,_0x4845dd,_0x2e9fdb,_0x4d0a4c){const _0x4ae809=_0x3b7ea6,_0x6f1db={'memberId':(await this[_0x4ae809(0xcf)][_0x4ae809(0xe1)](_0x1414ea))[_0x4ae809(0x102)](),'threadId':_0x2e9fdb,'replyId':_0x4d0a4c,'unitId':_0x1414ea},_0x5be884=await this[_0x4ae809(0xc4)][_0x4ae809(0x109)]('/universer-api/comment/unit/'+_0x1414ea+_0x4ae809(0x114),{'body':_0x6f1db});return!_0x5be884[_0x4ae809(0xba)]['error']||_0x5be884[_0x4ae809(0xba)][_0x4ae809(0x108)][_0x4ae809(0xf2)]===0x1;}async[_0x3b7ea6(0xff)](_0x574952,_0x40bf25,_0x364d30){const _0x2a19a5=_0x3b7ea6,_0x3760a1={'unitId':_0x574952,'threadId':_0x364d30},_0x280d86=await this[_0x2a19a5(0xc4)][_0x2a19a5(0x109)]('/universer-api/comment/unit/'+_0x574952+_0x2a19a5(0xfd),{'body':_0x3760a1}),_0x585d06=_0x364d30[_0x2a19a5(0x117)](_0x2e852a=>ee(_0x280d86[_0x2a19a5(0xba)][_0x2a19a5(0xca)][_0x2e852a],_0x574952,_0x40bf25))[_0x2a19a5(0xd3)](Boolean);return Object[_0x2a19a5(0xd0)](_0x280d86['body'][_0x2a19a5(0xec)])[_0x2a19a5(0xea)](_0x6acb74=>{const _0x316bec=_0x2a19a5;this[_0x316bec(0x113)][_0x316bec(0xd9)](_0x6acb74);}),_0x585d06;}[_0x3b7ea6(0x111)](_0xd032ca){const _0x5564a1=_0x3b7ea6;return{'id':_0xd032ca['id'],'threadId':_0xd032ca['threadId'],'ref':_0xd032ca[_0x5564a1(0xd8)]};}};S=Q([b(0x0,_0x28ae67(_0x568a11)),b(0x1,_0x28ae67(_0x5458cd)),b(0x2,_0x28ae67(_0x3a4aed))],S);var re=Object[_0x3b7ea6(0xe9)],te=(_0x15046b,_0x3e2467,_0xca2b8a,_0x374fe8)=>{const _0x20f4ec=_0x3b7ea6;for(var _0x13f899=_0x374fe8>0x1?void 0x0:_0x374fe8?re(_0x3e2467,_0xca2b8a):_0x3e2467,_0x2cad7a=_0x15046b[_0x20f4ec(0xf1)]-0x1,_0x28d9e3;_0x2cad7a>=0x0;_0x2cad7a--)(_0x28d9e3=_0x15046b[_0x2cad7a])&&(_0x13f899=_0x28d9e3(_0x13f899)||_0x13f899);return _0x13f899;},M=(_0x21d738,_0x2a29de)=>(_0x2454bc,_0x324117)=>_0x2a29de(_0x2454bc,_0x324117,_0x21d738);let f=class extends _0x5ac438{constructor(_0x17697d,_0x1ecef1){const _0x4ae032=_0x3b7ea6;super(),this[_0x4ae032(0xfb)]=_0x17697d,this[_0x4ae032(0x10d)]=_0x1ecef1,this[_0x4ae032(0xc9)]();}[_0x3b7ea6(0xc9)](){const _0x54f0f5=_0x3b7ea6;this['_threadCommentDataSourceService']['dataSource']=this[_0x54f0f5(0x10d)],this[_0x54f0f5(0xfb)][_0x54f0f5(0x10f)]=!0x1;}};f=te([M(0x0,_0x482fdc),M(0x1,_0x28ae67(S))],f);var se=Object[_0x3b7ea6(0xc2)],oe=Object[_0x3b7ea6(0xe9)],ne=(_0x112089,_0x405bc4,_0x452caf)=>_0x405bc4 in _0x112089?se(_0x112089,_0x405bc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x452caf}):_0x112089[_0x405bc4]=_0x452caf,ie=(_0xf9d878,_0x57d109,_0x505f1b,_0x215772)=>{const _0xe616f3=_0x3b7ea6;for(var _0x121ce1=_0x215772>0x1?void 0x0:_0x215772?oe(_0x57d109,_0x505f1b):_0x57d109,_0x5bcf89=_0xf9d878[_0xe616f3(0xf1)]-0x1,_0x20bf0f;_0x5bcf89>=0x0;_0x5bcf89--)(_0x20bf0f=_0xf9d878[_0x5bcf89])&&(_0x121ce1=_0x20bf0f(_0x121ce1)||_0x121ce1);return _0x121ce1;},N=(_0x3a12eb,_0x2c1df4)=>(_0xc25808,_0x32a293)=>_0x2c1df4(_0xc25808,_0x32a293,_0x3a12eb),$=(_0x34edef,_0x32ea1e,_0x278cfc)=>ne(_0x34edef,typeof _0x32ea1e!='symbol'?_0x32ea1e+'':_0x32ea1e,_0x278cfc);let g=class extends _0x59bcbe{constructor(_0x268b0e=O,_0x41015c,_0x58833f){const _0x4bb2a2=_0x3b7ea6;super(),this[_0x4bb2a2(0xc5)]=_0x268b0e,this[_0x4bb2a2(0xee)]=_0x41015c,this[_0x4bb2a2(0x103)]=_0x58833f;const {..._0xdd0711}=_0x4f527c({},O,this[_0x4bb2a2(0xc5)]);this[_0x4bb2a2(0x103)][_0x4bb2a2(0xbd)](z,_0xdd0711);}[_0x3b7ea6(0xe2)](){const _0x5ed5ac=_0x3b7ea6;[[S],[f],[_]][_0x5ed5ac(0xea)](_0x173cc4=>{const _0x302ebb=_0x5ed5ac;this[_0x302ebb(0xee)][_0x302ebb(0x10b)](_0x173cc4);});}[_0x3b7ea6(0xde)](){const _0x50740b=_0x3b7ea6;this[_0x50740b(0xee)][_0x50740b(0xfa)](f),this[_0x50740b(0xee)]['get'](_);}};$(g,_0x3b7ea6(0xd6),W),$(g,'type',_0x3366af['UNIVER_UNKNOWN']),g=ie([_0x31c2de(_0x52729f,_0x5ecb4e,_0x2d5534),N(0x1,_0x28ae67(_0x44647b)),N(0x2,_0x3c3efa)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xae48e8=_0x4a6a;(function(_0x34c849,_0x10de2b){const _0x474d5e=_0x4a6a,_0x3e0b68=_0x34c849();while(!![]){try{const _0x2d5f54=-parseInt(_0x474d5e(0xec))/0x1*(parseInt(_0x474d5e(0xe0))/0x2)+parseInt(_0x474d5e(0xf1))/0x3+parseInt(_0x474d5e(0xe6))/0x4*(-parseInt(_0x474d5e(0xdb))/0x5)+parseInt(_0x474d5e(0xb1))/0x6+-parseInt(_0x474d5e(0xc7))/0x7*(-parseInt(_0x474d5e(0xb5))/0x8)+-parseInt(_0x474d5e(0xb2))/0x9*(-parseInt(_0x474d5e(0xd9))/0xa)+-parseInt(_0x474d5e(0xc9))/0xb*(parseInt(_0x474d5e(0xff))/0xc);if(_0x2d5f54===_0x10de2b)break;else _0x3e0b68['push'](_0x3e0b68['shift']());}catch(_0x2b72e5){_0x3e0b68['push'](_0x3e0b68['shift']());}}}(_0x6ed9,0x23880));import{CommentService as _0x4294c9,CollaborationSessionService as _0x12024f,UniverCollaborationClientPlugin as _0x490620}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x48719b}from'@univerjs-pro/license';import{dayjs as _0x112222,UserManagerService as _0x4a6b5e,Inject as _0x4293fe,Injector as _0x5f09c2,Disposable as _0x490269,CustomRangeType as _0x435b6d,UniverInstanceType as _0x2f7f9b,DependentOn as _0x5afa64,IConfigService as _0x254ac8,Plugin as _0x1d5852,merge as _0x2ffa71}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1f9c3f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x29a48e,IThreadCommentDataSourceService as _0x41df09}from'@univerjs/thread-comment';function _0x4a6a(_0x1eb5d0,_0x5beb7c){const _0x6ed95d=_0x6ed9();return _0x4a6a=function(_0x4a6a89,_0x2bf3b6){_0x4a6a89=_0x4a6a89-0xa6;let _0x1252a7=_0x6ed95d[_0x4a6a89];return _0x1252a7;},_0x4a6a(_0x1eb5d0,_0x5beb7c);}import{bufferTime as _0x350851}from'rxjs';import{HTTPService as _0x1f0c3e}from'@univerjs/network';const W=_0xae48e8(0xf4);var I=(_0x30d18c=>(_0x30d18c[_0x30d18c[_0xae48e8(0xba)]=0x0]=_0xae48e8(0xba),_0x30d18c[_0x30d18c['Solved']=0x1]=_0xae48e8(0x108),_0x30d18c[_0x30d18c[_0xae48e8(0xe8)]=-0x1]=_0xae48e8(0xe8),_0x30d18c))(I||{}),v=(_0x67ce74=>(_0x67ce74[_0x67ce74['Unknown']=0x0]=_0xae48e8(0x106),_0x67ce74[_0x67ce74['Add']=0x1]=_0xae48e8(0x10a),_0x67ce74[_0x67ce74[_0xae48e8(0xf7)]=0x2]='Reply',_0x67ce74[_0x67ce74[_0xae48e8(0xd4)]=0x3]=_0xae48e8(0xd4),_0x67ce74[_0x67ce74['Delete']=0x4]=_0xae48e8(0xc0),_0x67ce74[_0x67ce74[_0xae48e8(0xa8)]=0x5]=_0xae48e8(0xa8),_0x67ce74[_0x67ce74['UNRECOGNIZED']=-0x1]=_0xae48e8(0xe8),_0x67ce74))(v||{});const y=_0x1f20f9=>_0x112222(new Date(+_0x1f20f9))[_0xae48e8(0xcf)](_0xae48e8(0xea)),B=async(_0x5123a5,_0x174e65)=>{const _0x299d7a=_0xae48e8,_0x1aa93c=_0x5123a5['get'](_0x4a6b5e),_0x2be18a=_0x5123a5['get'](_0x1f0c3e);_0x174e65[_0x299d7a(0x104)](_0x2d3d5c=>{const _0x2e135e=_0x299d7a;_0x1aa93c[_0x2e135e(0xa7)](_0x2d3d5c)&&_0x174e65[_0x2e135e(0xbc)](_0x2d3d5c);}),_0x174e65[_0x299d7a(0xb9)]&&(await _0x2be18a[_0x299d7a(0xdc)](_0x299d7a(0xbf),{'params':{'userIDs':[..._0x174e65]}}))['body'][_0x299d7a(0xcd)][_0x299d7a(0x104)](_0x45a1f4=>{const _0x222e60=_0x299d7a;_0x45a1f4&&_0x1aa93c[_0x222e60(0xca)](_0x45a1f4);});};var K=Object[_0xae48e8(0xc5)],V=(_0x4f3f3c,_0xc88767,_0x4a144d,_0x180a10)=>{const _0x42355c=_0xae48e8;for(var _0x15e2a8=_0x180a10>0x1?void 0x0:_0x180a10?K(_0xc88767,_0x4a144d):_0xc88767,_0x1a8ce7=_0x4f3f3c[_0x42355c(0x101)]-0x1,_0x34c274;_0x1a8ce7>=0x0;_0x1a8ce7--)(_0x34c274=_0x4f3f3c[_0x1a8ce7])&&(_0x15e2a8=_0x34c274(_0x15e2a8)||_0x15e2a8);return _0x15e2a8;},p=(_0x2269b7,_0x354442)=>(_0x4b5aed,_0x8473dd)=>_0x354442(_0x4b5aed,_0x8473dd,_0x2269b7);let _=class extends _0x490269{constructor(_0x21dab8,_0x44d787,_0x423357,_0xb7e4ac){const _0x32c25a=_0xae48e8;super(),this[_0x32c25a(0x100)]=_0x21dab8,this[_0x32c25a(0xb7)]=_0x44d787,this[_0x32c25a(0xe7)]=_0x423357,this['_injector']=_0xb7e4ac,this[_0x32c25a(0xef)](),this[_0x32c25a(0xd6)]();}[_0xae48e8(0xd6)](){const _0x317d70=_0xae48e8;this[_0x317d70(0xbb)](this[_0x317d70(0xb7)]['commentUpdate$']['pipe'](_0x350851(0x10))['subscribe'](_0x5c19cd=>{const _0x30aaf5=_0x317d70,_0x468230=new Set();_0x5c19cd[_0x30aaf5(0x104)](_0x55ae96=>{const _0x2200f7=_0x30aaf5;switch(_0x55ae96['type']){case _0x2200f7(0xb4):{const _0x4104f0=_0x55ae96[_0x2200f7(0xdd)]['personId'];_0x468230[_0x2200f7(0xb4)](_0x4104f0);break;}}}),B(this['_injector'],_0x468230);}));}['_init'](){const _0x369bfd=_0xae48e8;this[_0x369bfd(0xbb)](this['_commentService'][_0x369bfd(0xde)]['subscribe'](async _0x1ce3c8=>{const _0x1a29cb=_0x369bfd;var _0x3df353,_0x460914,_0x9a8e37,_0x5837ad;const _0x47d013=(_0x3df353=this[_0x1a29cb(0xb7)][_0x1a29cb(0xae)](_0x1ce3c8[_0x1a29cb(0xab)])[_0x1a29cb(0xe4)](_0x414284=>_0x414284[_0x1a29cb(0xd5)]===_0x1ce3c8[_0x1a29cb(0xd5)]))==null?void 0x0:_0x3df353[_0x1a29cb(0xfd)];if(!_0x47d013)return;const {unitId:_0x347b30,subUnitId:_0x24dbe6}=_0x47d013;switch(_0x1ce3c8[_0x1a29cb(0xfc)]&&this[_0x1a29cb(0xe7)][_0x1a29cb(0xca)](_0x1ce3c8['user']),_0x1ce3c8[_0x1a29cb(0x105)]){case v[_0x1a29cb(0x10a)]:break;case v[_0x1a29cb(0xf7)]:{this['_threadCommentModel'][_0x1a29cb(0xe3)](_0x347b30,_0x24dbe6,{'unitId':_0x347b30,'subUnitId':_0x24dbe6,'ref':'','id':_0x1ce3c8['replyId'],'dT':y(+_0x1ce3c8['createTimestamp']),'threadId':_0x1ce3c8[_0x1a29cb(0xd5)],'personId':(_0x9a8e37=(_0x460914=_0x1ce3c8['user'])==null?void 0x0:_0x460914['userID'])!=null?_0x9a8e37:_0x1ce3c8[_0x1a29cb(0xc1)],'text':JSON[_0x1a29cb(0xda)](_0x1ce3c8[_0x1a29cb(0xac)]),'parentId':_0x47d013['id']});break;}case v[_0x1a29cb(0xc0)]:{const _0x5d7137=this[_0x1a29cb(0xb7)][_0x1a29cb(0xcc)](_0x347b30,_0x24dbe6,_0x1ce3c8[_0x1a29cb(0x103)]);_0x5d7137&&_0x5d7137['parentId']&&this[_0x1a29cb(0xb7)][_0x1a29cb(0xed)](_0x347b30,_0x24dbe6,_0x1ce3c8[_0x1a29cb(0x103)]);break;}case v['Edit']:{this[_0x1a29cb(0xb7)][_0x1a29cb(0x107)](_0x347b30,_0x24dbe6,{'commentId':_0x1ce3c8[_0x1a29cb(0x103)],'text':JSON[_0x1a29cb(0xda)](_0x1ce3c8['content'])});break;}case v[_0x1a29cb(0xa8)]:{const _0xa3f900=(_0x5837ad=this[_0x1a29cb(0xb7)][_0x1a29cb(0xae)](_0x1ce3c8[_0x1a29cb(0xab)])['find'](_0x2300ea=>_0x2300ea[_0x1a29cb(0xd5)]===_0x1ce3c8[_0x1a29cb(0xd5)]))==null?void 0x0:_0x5837ad[_0x1a29cb(0xfd)];_0xa3f900&&this[_0x1a29cb(0xb7)][_0x1a29cb(0xbe)](_0x347b30,_0x24dbe6,_0xa3f900['id'],_0x1ce3c8[_0x1a29cb(0xa9)]===I[_0x1a29cb(0x108)]);break;}}}));}};_=V([p(0x0,_0x4293fe(_0x4294c9)),p(0x1,_0x4293fe(_0x29a48e)),p(0x2,_0x4293fe(_0x4a6b5e)),p(0x3,_0x4293fe(_0x5f09c2))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0xae48e8(0xc5)],Q=(_0x1bc445,_0x976867,_0x5f2c61,_0x3f1647)=>{for(var _0x56146e=_0x3f1647>0x1?void 0x0:_0x3f1647?k(_0x976867,_0x5f2c61):_0x976867,_0x3c1514=_0x1bc445['length']-0x1,_0x2ae76c;_0x3c1514>=0x0;_0x3c1514--)(_0x2ae76c=_0x1bc445[_0x3c1514])&&(_0x56146e=_0x2ae76c(_0x56146e)||_0x56146e);return _0x56146e;},b=(_0x27caf9,_0x3d1875)=>(_0x4b89da,_0x2b4606)=>_0x3d1875(_0x4b89da,_0x2b4606,_0x27caf9);function X(_0x48eda6,_0x3f99a0){const _0x1405f1=_0xae48e8,_0x438ea8=_0x48eda6[_0x1405f1(0xf0)][0x0];return{..._0x3f99a0,'id':_0x438ea8['replyId'],'resolved':_0x48eda6['solved']===0x1,'dT':y(_0x438ea8[_0x1405f1(0xf8)]),'personId':_0x438ea8[_0x1405f1(0xc1)],'threadId':_0x438ea8[_0x1405f1(0xd5)]};}function ee(_0x5c3ae4,_0x3494c0,_0x2c70d3){const _0x19de92=_0xae48e8;var _0x4d3db6,_0xe146e9;if(((_0xe146e9=(_0x4d3db6=_0x5c3ae4==null?void 0x0:_0x5c3ae4[_0x19de92(0xf0)])==null?void 0x0:_0x4d3db6[_0x19de92(0x101)])!=null?_0xe146e9:0x0)>0x0){const _0x573bb7=(_0x15d944,_0x26e7b1)=>({'id':_0x15d944[_0x19de92(0x103)],'threadId':_0x15d944['threadId'],'dT':y(_0x15d944['createTimestamp']),'personId':_0x15d944['userId'],'resolved':_0x5c3ae4[_0x19de92(0xa9)]===I['Solved'],'unitId':_0x3494c0,'subUnitId':_0x2c70d3,'text':JSON['parse'](_0x15d944[_0x19de92(0xac)]),'parentId':_0x26e7b1}),_0x551ec8=_0x573bb7(_0x5c3ae4[_0x19de92(0xf0)][0x0]);return{..._0x551ec8,'children':_0x5c3ae4['replies'][_0x19de92(0xa6)](0x1)[_0x19de92(0xee)](_0x3b74f9=>_0x573bb7(_0x3b74f9,_0x551ec8['id']))};}return null;}function _0x6ed9(){const _0x2a08d2=['/list','150qtiKpT','parse','75255EDCiRg','get','payload','commentUpdate$','requireSession','2048dFLKum','_injector','_threadCommentDataSourceService','addComment','find','_threadCommentDataSource','64FkGudo','_userService','UNRECOGNIZED','saveCommentToSnapshot','YYYY/MM/DD\x20HH:mm','listComments','12SSKLbs','deleteComment','map','_init','replies','260622MWvtXl','post','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','comments','Reply','createTimestamp','dataSource','rangeType','_configService','user','root','filter','48keSAco','_commentService','length','/add','replyId','forEach','type','Unknown','updateComment','Solved','_initDataSource','Add','slice','getUser','Solve','solved','_config','unitId','content','UNIVER_UNKNOWN','getUnit','getMemberID','defineProperty','868992PGUdsN','136179NnLRpW','_httpService','add','24FDayxI','onStarting','_threadCommentModel','body','size','OpenOrReOpen','disposeWithMe','delete','_sessionService','resolveComment','/universer-api/user/list','Delete','userId','rangeId','syncUpdateMutationToColla','resolved','getOwnPropertyDescriptor','customRanges','82481mqyXCZ','/reply','262295veSzsV','addUser','/solved','getComment','users','ref','format','reply','/universer-api/comment/unit/','code','COMMENT','Edit','threadId','_initUserSync','error'];_0x6ed9=function(){return _0x2a08d2;};return _0x6ed9();}let S=class{constructor(_0x5f3117,_0x509651,_0x1874bf){const _0x4619dc=_0xae48e8;this[_0x4619dc(0xb3)]=_0x5f3117,this[_0x4619dc(0xe7)]=_0x509651,this[_0x4619dc(0xbd)]=_0x1874bf;}async['addComment'](_0x4921cb){const _0x5580de=_0xae48e8;var _0x309e5b,_0xfbfba1;const {parentId:_0x29aa91,unitId:_0x20be5f,text:_0x1d027b,threadId:_0x3d6a0b}=_0x4921cb,_0x19f2e5=(_0xfbfba1=(_0x309e5b=_0x1d027b[_0x5580de(0xc6)])==null?void 0x0:_0x309e5b['filter'](_0x1e0417=>_0x1e0417[_0x5580de(0xfa)]===_0x435b6d[_0x5580de(0xd3)])['map'](_0x1fb682=>_0x1fb682[_0x5580de(0xc2)]))!=null?_0xfbfba1:[],_0x14402e=JSON['stringify'](_0x1d027b),_0xf6e0a6=(await this[_0x5580de(0xbd)][_0x5580de(0xdf)](_0x20be5f))[_0x5580de(0xaf)]();if(_0x29aa91){const _0x5cacfd={'memberId':_0xf6e0a6,'unitId':_0x20be5f,'content':_0x14402e,'mention':_0x19f2e5,'threadId':_0x3d6a0b},_0x16fee3=(await this['_httpService'][_0x5580de(0xf2)](_0x5580de(0xd1)+_0x20be5f+_0x5580de(0xc8),{'body':_0x5cacfd}))[_0x5580de(0xb8)][_0x5580de(0xd0)];return{..._0x4921cb,'id':_0x16fee3[_0x5580de(0x103)],'dT':_0x112222(+_0x16fee3[_0x5580de(0xf8)])[_0x5580de(0xcf)](_0x5580de(0xea)),'personId':_0x16fee3['userId']};}else{const _0x1f7910={'memberId':_0xf6e0a6,'unitId':_0x20be5f,'content':_0x14402e,'mention':_0x19f2e5},_0x25906c=await this[_0x5580de(0xb3)][_0x5580de(0xf2)](_0x5580de(0xd1)+_0x20be5f+_0x5580de(0x102),{'body':_0x1f7910});return X(_0x25906c[_0x5580de(0xb8)]['comment'],_0x4921cb);}}async[_0xae48e8(0x107)](_0x3aed10){const _0x4f1bbf=_0xae48e8;var _0x5f4ba3,_0xaeba8e;const {text:_0x3bb053,unitId:_0xd2ce68}=_0x3aed10,_0x103757=(_0xaeba8e=(_0x5f4ba3=_0x3bb053['customRanges'])==null?void 0x0:_0x5f4ba3[_0x4f1bbf(0xfe)](_0x1d09a8=>_0x1d09a8[_0x4f1bbf(0xfa)]===_0x435b6d[_0x4f1bbf(0xd3)])[_0x4f1bbf(0xee)](_0x6cd4a6=>_0x6cd4a6[_0x4f1bbf(0xc2)]))!=null?_0xaeba8e:[],_0x3e9165=JSON['stringify'](_0x3bb053),_0x444a88=_0x3aed10[_0x4f1bbf(0xd5)],_0x362784=_0x3aed10['id'],_0x49aac6={'memberId':(await this[_0x4f1bbf(0xbd)][_0x4f1bbf(0xdf)](_0xd2ce68))['getMemberID'](),'unitId':_0xd2ce68,'threadId':_0x444a88,'mention':_0x103757,'content':_0x3e9165,'replyId':_0x362784},_0xd5b3b8=await this[_0x4f1bbf(0xb3)][_0x4f1bbf(0xf2)]('/universer-api/comment/unit/'+_0xd2ce68+'/edit',{'body':_0x49aac6});return!_0xd5b3b8[_0x4f1bbf(0xb8)][_0x4f1bbf(0xd7)]||_0xd5b3b8[_0x4f1bbf(0xb8)][_0x4f1bbf(0xd7)][_0x4f1bbf(0xd2)]===0x1;}async[_0xae48e8(0xbe)](_0x57b468){const _0x494714=_0xae48e8,{unitId:_0x43bfb4}=_0x57b468,_0x2a078f=_0x57b468[_0x494714(0xd5)],_0x109614={'memberId':this[_0x494714(0xe7)][_0x494714(0xf5)]()['userID'],'unitId':_0x43bfb4,'threadId':_0x2a078f,'solved':_0x57b468[_0x494714(0xc4)]?I['Solved']:I[_0x494714(0xba)]},_0xa513b7=await this[_0x494714(0xb3)]['post'](_0x494714(0xd1)+_0x43bfb4+_0x494714(0xcb),{'body':_0x109614});return!_0xa513b7[_0x494714(0xb8)][_0x494714(0xd7)]||_0xa513b7[_0x494714(0xb8)]['error'][_0x494714(0xd2)]===0x1;}async['deleteComment'](_0x91399b,_0x265efe,_0x17c895,_0x53c485){const _0x1f1b71=_0xae48e8,_0x1c648e={'memberId':(await this[_0x1f1b71(0xbd)][_0x1f1b71(0xdf)](_0x91399b))[_0x1f1b71(0xaf)](),'threadId':_0x17c895,'replyId':_0x53c485,'unitId':_0x91399b},_0x2d0f66=await this['_httpService'][_0x1f1b71(0xf2)]('/universer-api/comment/unit/'+_0x91399b+'/delete',{'body':_0x1c648e});return!_0x2d0f66[_0x1f1b71(0xb8)][_0x1f1b71(0xd7)]||_0x2d0f66[_0x1f1b71(0xb8)]['error']['code']===0x1;}async[_0xae48e8(0xeb)](_0x18df81,_0x3f8fa6,_0x3c87ba){const _0x19ba03=_0xae48e8,_0x3db1c8={'unitId':_0x18df81,'threadId':_0x3c87ba},_0xfa71dd=await this[_0x19ba03(0xb3)][_0x19ba03(0xf2)]('/universer-api/comment/unit/'+_0x18df81+_0x19ba03(0xd8),{'body':_0x3db1c8}),_0x148e5a=_0x3c87ba[_0x19ba03(0xee)](_0x3b1e66=>ee(_0xfa71dd['body'][_0x19ba03(0xf6)][_0x3b1e66],_0x18df81,_0x3f8fa6))[_0x19ba03(0xfe)](Boolean);return Object[_0x19ba03(0xf3)](_0xfa71dd[_0x19ba03(0xb8)]['users'])['forEach'](_0x48a2f4=>{const _0x2751d4=_0x19ba03;this[_0x2751d4(0xe7)][_0x2751d4(0xca)](_0x48a2f4);}),_0x148e5a;}[_0xae48e8(0xe9)](_0x51f8ab){const _0x384089=_0xae48e8;return{'id':_0x51f8ab['id'],'threadId':_0x51f8ab[_0x384089(0xd5)],'ref':_0x51f8ab[_0x384089(0xce)]};}};S=Q([b(0x0,_0x4293fe(_0x1f0c3e)),b(0x1,_0x4293fe(_0x4a6b5e)),b(0x2,_0x4293fe(_0x12024f))],S);var re=Object[_0xae48e8(0xc5)],te=(_0x868595,_0x49a3e5,_0x7f37b3,_0x199247)=>{const _0x414813=_0xae48e8;for(var _0x51e3e4=_0x199247>0x1?void 0x0:_0x199247?re(_0x49a3e5,_0x7f37b3):_0x49a3e5,_0x32cd78=_0x868595[_0x414813(0x101)]-0x1,_0x168ab8;_0x32cd78>=0x0;_0x32cd78--)(_0x168ab8=_0x868595[_0x32cd78])&&(_0x51e3e4=_0x168ab8(_0x51e3e4)||_0x51e3e4);return _0x51e3e4;},M=(_0x5e3719,_0x3dce69)=>(_0x1f8e11,_0x5740ce)=>_0x3dce69(_0x1f8e11,_0x5740ce,_0x5e3719);let f=class extends _0x490269{constructor(_0x268d57,_0x200ef0){const _0x2d4a05=_0xae48e8;super(),this[_0x2d4a05(0xe2)]=_0x268d57,this[_0x2d4a05(0xe5)]=_0x200ef0,this[_0x2d4a05(0x109)]();}[_0xae48e8(0x109)](){const _0x43b95a=_0xae48e8;this['_threadCommentDataSourceService'][_0x43b95a(0xf9)]=this[_0x43b95a(0xe5)],this['_threadCommentDataSourceService'][_0x43b95a(0xc3)]=!0x1;}};f=te([M(0x0,_0x41df09),M(0x1,_0x4293fe(S))],f);var se=Object[_0xae48e8(0xb0)],oe=Object[_0xae48e8(0xc5)],ne=(_0xd724d0,_0x39fb83,_0x500f7c)=>_0x39fb83 in _0xd724d0?se(_0xd724d0,_0x39fb83,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x500f7c}):_0xd724d0[_0x39fb83]=_0x500f7c,ie=(_0x280339,_0x316153,_0x1fdac7,_0xd3543d)=>{const _0xa3e1e3=_0xae48e8;for(var _0x3b6a72=_0xd3543d>0x1?void 0x0:_0xd3543d?oe(_0x316153,_0x1fdac7):_0x316153,_0x256d40=_0x280339[_0xa3e1e3(0x101)]-0x1,_0xe878d1;_0x256d40>=0x0;_0x256d40--)(_0xe878d1=_0x280339[_0x256d40])&&(_0x3b6a72=_0xe878d1(_0x3b6a72)||_0x3b6a72);return _0x3b6a72;},N=(_0x5d1322,_0x263669)=>(_0x5c5359,_0xa2f7a1)=>_0x263669(_0x5c5359,_0xa2f7a1,_0x5d1322),$=(_0xdda9e0,_0x3f5d3a,_0x2d715c)=>ne(_0xdda9e0,typeof _0x3f5d3a!='symbol'?_0x3f5d3a+'':_0x3f5d3a,_0x2d715c);let g=class extends _0x1d5852{constructor(_0x3cbd37=O,_0x2dddcf,_0xe4bfcb){const _0x519874=_0xae48e8;super(),this['_config']=_0x3cbd37,this['_injector']=_0x2dddcf,this[_0x519874(0xfb)]=_0xe4bfcb;const {..._0x46b64e}=_0x2ffa71({},O,this[_0x519874(0xaa)]);this[_0x519874(0xfb)]['setConfig'](z,_0x46b64e);}[_0xae48e8(0xb6)](){[[S],[f],[_]]['forEach'](_0x381175=>{const _0x4d152f=_0x4a6a;this['_injector'][_0x4d152f(0xb4)](_0x381175);});}['onReady'](){const _0x1ef97b=_0xae48e8;this[_0x1ef97b(0xe1)][_0x1ef97b(0xdc)](f),this[_0x1ef97b(0xe1)][_0x1ef97b(0xdc)](_);}};$(g,'pluginName',W),$(g,'type',_0x2f7f9b[_0xae48e8(0xad)]),g=ie([_0x5afa64(_0x1f9c3f,_0x490620,_0x48719b),N(0x1,_0x4293fe(_0x5f09c2)),N(0x2,_0x254ac8)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3b7ea6=_0x5f2a;(function(_0x283cf7,_0x46fba3){const _0x6d5814=_0x5f2a,_0x146e4a=_0x283cf7();while(!![]){try{const _0x48feeb=-parseInt(_0x6d5814(0x10e))/0x1*(-parseInt(_0x6d5814(0xe7))/0x2)+-parseInt(_0x6d5814(0x112))/0x3*(-parseInt(_0x6d5814(0x119))/0x4)+-parseInt(_0x6d5814(0x116))/0x5*(parseInt(_0x6d5814(0xf7))/0x6)+-parseInt(_0x6d5814(0xbc))/0x7+parseInt(_0x6d5814(0x118))/0x8*(-parseInt(_0x6d5814(0x106))/0x9)+parseInt(_0x6d5814(0xfe))/0xa+-parseInt(_0x6d5814(0xfc))/0xb;if(_0x48feeb===_0x46fba3)break;else _0x146e4a['push'](_0x146e4a['shift']());}catch(_0x4aa755){_0x146e4a['push'](_0x146e4a['shift']());}}}(_0x33ad,0x276c2));import{CommentService as _0x470bf5,CollaborationSessionService as _0x3a4aed,UniverCollaborationClientPlugin as _0x5ecb4e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2d5534}from'@univerjs-pro/license';function _0x5f2a(_0x1a7afe,_0x5db058){const _0x33ad5d=_0x33ad();return _0x5f2a=function(_0x5f2a9e,_0x4773ad){_0x5f2a9e=_0x5f2a9e-0xb7;let _0x448c39=_0x33ad5d[_0x5f2a9e];return _0x448c39;},_0x5f2a(_0x1a7afe,_0x5db058);}import{dayjs as _0x595df9,UserManagerService as _0x5458cd,Inject as _0x28ae67,Injector as _0x44647b,Disposable as _0x5ac438,CustomRangeType as _0x325494,UniverInstanceType as _0x3366af,DependentOn as _0x31c2de,IConfigService as _0x3c3efa,Plugin as _0x59bcbe,merge as _0x4f527c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52729f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2e7a6e,IThreadCommentDataSourceService as _0x482fdc}from'@univerjs/thread-comment';import{bufferTime as _0x466a99}from'rxjs';import{HTTPService as _0x568a11}from'@univerjs/network';const W=_0x3b7ea6(0xc1);var I=(_0x4105a8=>(_0x4105a8[_0x4105a8['OpenOrReOpen']=0x0]=_0x3b7ea6(0x105),_0x4105a8[_0x4105a8[_0x3b7ea6(0xd4)]=0x1]=_0x3b7ea6(0xd4),_0x4105a8[_0x4105a8[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x4105a8))(I||{}),v=(_0x2e3b70=>(_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xcc)]=0x0]='Unknown',_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc0)]=0x1]=_0x3b7ea6(0xc0),_0x2e3b70[_0x2e3b70['Reply']=0x2]=_0x3b7ea6(0xb9),_0x2e3b70[_0x2e3b70['Edit']=0x3]=_0x3b7ea6(0xdd),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xf0)]=0x4]=_0x3b7ea6(0xf0),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc3)]=0x5]=_0x3b7ea6(0xc3),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x2e3b70))(v||{});const y=_0x3d6e20=>_0x595df9(new Date(+_0x3d6e20))[_0x3b7ea6(0xe5)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1e3f5f,_0x14e3f4)=>{const _0x2499b7=_0x3b7ea6,_0x19398d=_0x1e3f5f['get'](_0x5458cd),_0x296854=_0x1e3f5f[_0x2499b7(0xfa)](_0x568a11);_0x14e3f4['forEach'](_0x303083=>{const _0x20c0fd=_0x2499b7;_0x19398d[_0x20c0fd(0xbf)](_0x303083)&&_0x14e3f4[_0x20c0fd(0xf9)](_0x303083);}),_0x14e3f4[_0x2499b7(0xed)]&&(await _0x296854[_0x2499b7(0xfa)](_0x2499b7(0x115),{'params':{'userIDs':[..._0x14e3f4]}}))['body'][_0x2499b7(0xec)]['forEach'](_0x308462=>{const _0x12b557=_0x2499b7;_0x308462&&_0x19398d[_0x12b557(0xd9)](_0x308462);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x55a740,_0x472917,_0x5ab5b7,_0x564069)=>{const _0x320701=_0x3b7ea6;for(var _0xed6a3e=_0x564069>0x1?void 0x0:_0x564069?K(_0x472917,_0x5ab5b7):_0x472917,_0x4a0ac7=_0x55a740[_0x320701(0xf1)]-0x1,_0x5b64c4;_0x4a0ac7>=0x0;_0x4a0ac7--)(_0x5b64c4=_0x55a740[_0x4a0ac7])&&(_0xed6a3e=_0x5b64c4(_0xed6a3e)||_0xed6a3e);return _0xed6a3e;},p=(_0x2acd49,_0x29790c)=>(_0x23de51,_0x1fb4f4)=>_0x29790c(_0x23de51,_0x1fb4f4,_0x2acd49);let _=class extends _0x5ac438{constructor(_0x59bb49,_0x35bcf7,_0x583288,_0x241f1d){const _0x2ed31a=_0x3b7ea6;super(),this[_0x2ed31a(0x10c)]=_0x59bb49,this[_0x2ed31a(0xf5)]=_0x35bcf7,this[_0x2ed31a(0x113)]=_0x583288,this[_0x2ed31a(0xee)]=_0x241f1d,this[_0x2ed31a(0x110)](),this['_initUserSync']();}[_0x3b7ea6(0x100)](){const _0x36266e=_0x3b7ea6;this[_0x36266e(0x11d)](this['_threadCommentModel'][_0x36266e(0xb7)][_0x36266e(0xef)](_0x466a99(0x10))[_0x36266e(0xc7)](_0x36c9ce=>{const _0x4b5914=_0x36266e,_0x2ed94f=new Set();_0x36c9ce[_0x4b5914(0xea)](_0x54ac1b=>{const _0x51df4c=_0x4b5914;switch(_0x54ac1b[_0x51df4c(0xe4)]){case _0x51df4c(0x10b):{const _0x13d840=_0x54ac1b['payload'][_0x51df4c(0xf6)];_0x2ed94f['add'](_0x13d840);break;}}}),B(this[_0x4b5914(0xee)],_0x2ed94f);}));}['_init'](){const _0x3f5275=_0x3b7ea6;this['disposeWithMe'](this[_0x3f5275(0x10c)][_0x3f5275(0xb7)][_0x3f5275(0xc7)](async _0x4430b7=>{const _0xb0ca1a=_0x3f5275;var _0x9b3c3f,_0x3faf20,_0xb07964,_0x3e0545;const _0x46a076=(_0x9b3c3f=this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf3)](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x37fa0f=>_0x37fa0f[_0xb0ca1a(0x11c)]===_0x4430b7['threadId']))==null?void 0x0:_0x9b3c3f['root'];if(!_0x46a076)return;const {unitId:_0x4636d2,subUnitId:_0x2214ff}=_0x46a076;switch(_0x4430b7[_0xb0ca1a(0x10a)]&&this['_userService'][_0xb0ca1a(0xd9)](_0x4430b7[_0xb0ca1a(0x10a)]),_0x4430b7[_0xb0ca1a(0xe4)]){case v[_0xb0ca1a(0xc0)]:break;case v['Reply']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xdc)](_0x4636d2,_0x2214ff,{'unitId':_0x4636d2,'subUnitId':_0x2214ff,'ref':'','id':_0x4430b7['replyId'],'dT':y(+_0x4430b7[_0xb0ca1a(0xcb)]),'threadId':_0x4430b7[_0xb0ca1a(0x11c)],'personId':(_0xb07964=(_0x3faf20=_0x4430b7[_0xb0ca1a(0x10a)])==null?void 0x0:_0x3faf20[_0xb0ca1a(0x107)])!=null?_0xb07964:_0x4430b7[_0xb0ca1a(0xd7)],'text':JSON['parse'](_0x4430b7[_0xb0ca1a(0xbe)]),'parentId':_0x46a076['id']});break;}case v[_0xb0ca1a(0xf0)]:{const _0x1fc21b=this[_0xb0ca1a(0xf5)]['getComment'](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);_0x1fc21b&&_0x1fc21b[_0xb0ca1a(0x104)]&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0x11a)](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);break;}case v['Edit']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xb8)](_0x4636d2,_0x2214ff,{'commentId':_0x4430b7[_0xb0ca1a(0x101)],'text':JSON[_0xb0ca1a(0xc6)](_0x4430b7[_0xb0ca1a(0xbe)])});break;}case v[_0xb0ca1a(0xc3)]:{const _0x37eb1e=(_0x3e0545=this[_0xb0ca1a(0xf5)]['getUnit'](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x176e72=>_0x176e72[_0xb0ca1a(0x11c)]===_0x4430b7[_0xb0ca1a(0x11c)]))==null?void 0x0:_0x3e0545['root'];_0x37eb1e&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf4)](_0x4636d2,_0x2214ff,_0x37eb1e['id'],_0x4430b7[_0xb0ca1a(0xeb)]===I[_0xb0ca1a(0xd4)]);break;}}}));}};function _0x33ad(){const _0xfa4135=['_injector','pipe','Delete','length','code','getUnit','resolveComment','_threadCommentModel','personId','462MsFwhA','resolved','delete','get','_threadCommentDataSourceService','499026QHqcSv','/list','277920zILiob','listComments','_initUserSync','replyId','getMemberID','_configService','parentId','OpenOrReOpen','17163VKLgkr','userID','error','post','user','add','_commentService','_threadCommentDataSource','57993WWaqIB','syncUpdateMutationToColla','_init','saveCommentToSnapshot','6093zsLgaG','_userService','/delete','/universer-api/user/list','14205EGlZoX','map','144xWSrgm','596IFinBc','deleteComment','stringify','threadId','disposeWithMe','COMMENT','/universer-api/comment/unit/','commentUpdate$','updateComment','Reply','body','/add','311269JQnICV','setConfig','content','getUser','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','Solve','_httpService','_config','parse','subscribe','UNRECOGNIZED','_initDataSource','comments','createTimestamp','Unknown','/reply','slice','_sessionService','values','replies','unitId','filter','Solved','customRanges','pluginName','userId','ref','addUser','find','/solved','addComment','Edit','onReady','comment','rangeType','requireSession','onStarting','/edit','type','format','rangeId','6QohJIs','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','solved','users','size'];_0x33ad=function(){return _0xfa4135;};return _0x33ad();}_=V([p(0x0,_0x28ae67(_0x470bf5)),p(0x1,_0x28ae67(_0x2e7a6e)),p(0x2,_0x28ae67(_0x5458cd)),p(0x3,_0x28ae67(_0x44647b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x3b7ea6(0xe9)],Q=(_0x1937be,_0x594851,_0x40c47c,_0x380bd7)=>{for(var _0xbf1e64=_0x380bd7>0x1?void 0x0:_0x380bd7?k(_0x594851,_0x40c47c):_0x594851,_0x210a3e=_0x1937be['length']-0x1,_0x3ad3ef;_0x210a3e>=0x0;_0x210a3e--)(_0x3ad3ef=_0x1937be[_0x210a3e])&&(_0xbf1e64=_0x3ad3ef(_0xbf1e64)||_0xbf1e64);return _0xbf1e64;},b=(_0x4aeb2b,_0x4b65cf)=>(_0x267662,_0x77c4da)=>_0x4b65cf(_0x267662,_0x77c4da,_0x4aeb2b);function X(_0x1bfc6f,_0x496a2c){const _0x155726=_0x3b7ea6,_0x504f6c=_0x1bfc6f[_0x155726(0xd1)][0x0];return{..._0x496a2c,'id':_0x504f6c[_0x155726(0x101)],'resolved':_0x1bfc6f[_0x155726(0xeb)]===0x1,'dT':y(_0x504f6c[_0x155726(0xcb)]),'personId':_0x504f6c['userId'],'threadId':_0x504f6c[_0x155726(0x11c)]};}function ee(_0x5dbdc0,_0x5250e6,_0x2c0a8f){const _0x1134aa=_0x3b7ea6;var _0x3591e1,_0x58ee36;if(((_0x58ee36=(_0x3591e1=_0x5dbdc0==null?void 0x0:_0x5dbdc0[_0x1134aa(0xd1)])==null?void 0x0:_0x3591e1[_0x1134aa(0xf1)])!=null?_0x58ee36:0x0)>0x0){const _0x266b3f=(_0x5b6109,_0x3a124d)=>({'id':_0x5b6109[_0x1134aa(0x101)],'threadId':_0x5b6109[_0x1134aa(0x11c)],'dT':y(_0x5b6109['createTimestamp']),'personId':_0x5b6109[_0x1134aa(0xd7)],'resolved':_0x5dbdc0[_0x1134aa(0xeb)]===I[_0x1134aa(0xd4)],'unitId':_0x5250e6,'subUnitId':_0x2c0a8f,'text':JSON[_0x1134aa(0xc6)](_0x5b6109[_0x1134aa(0xbe)]),'parentId':_0x3a124d}),_0x35a508=_0x266b3f(_0x5dbdc0[_0x1134aa(0xd1)][0x0]);return{..._0x35a508,'children':_0x5dbdc0[_0x1134aa(0xd1)][_0x1134aa(0xce)](0x1)[_0x1134aa(0x117)](_0x5e937b=>_0x266b3f(_0x5e937b,_0x35a508['id']))};}return null;}let S=class{constructor(_0x3a7f5a,_0x3d747e,_0x3aad76){const _0x478ea6=_0x3b7ea6;this['_httpService']=_0x3a7f5a,this[_0x478ea6(0x113)]=_0x3d747e,this[_0x478ea6(0xcf)]=_0x3aad76;}async[_0x3b7ea6(0xdc)](_0x486127){const _0x151f9b=_0x3b7ea6;var _0x59e20e,_0x581230;const {parentId:_0x4c2cf1,unitId:_0x224636,text:_0x1d4c9c,threadId:_0x4f7eec}=_0x486127,_0x29a171=(_0x581230=(_0x59e20e=_0x1d4c9c[_0x151f9b(0xd5)])==null?void 0x0:_0x59e20e['filter'](_0x239ea0=>_0x239ea0[_0x151f9b(0xe0)]===_0x325494[_0x151f9b(0x11e)])['map'](_0x437cb2=>_0x437cb2[_0x151f9b(0xe6)]))!=null?_0x581230:[],_0x2b35d1=JSON[_0x151f9b(0x11b)](_0x1d4c9c),_0x45145e=(await this[_0x151f9b(0xcf)][_0x151f9b(0xe1)](_0x224636))[_0x151f9b(0x102)]();if(_0x4c2cf1){const _0x4098e0={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171,'threadId':_0x4f7eec},_0x39797a=(await this['_httpService'][_0x151f9b(0x109)]('/universer-api/comment/unit/'+_0x224636+_0x151f9b(0xcd),{'body':_0x4098e0}))['body']['reply'];return{..._0x486127,'id':_0x39797a[_0x151f9b(0x101)],'dT':_0x595df9(+_0x39797a['createTimestamp'])[_0x151f9b(0xe5)](_0x151f9b(0xe8)),'personId':_0x39797a[_0x151f9b(0xd7)]};}else{const _0x56e93b={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171},_0x560e94=await this[_0x151f9b(0xc4)][_0x151f9b(0x109)](_0x151f9b(0x11f)+_0x224636+_0x151f9b(0xbb),{'body':_0x56e93b});return X(_0x560e94['body'][_0x151f9b(0xdf)],_0x486127);}}async[_0x3b7ea6(0xb8)](_0x2d2cae){const _0x540afd=_0x3b7ea6;var _0x3f4b8c,_0x433ab3;const {text:_0x4f45d0,unitId:_0x59d4c3}=_0x2d2cae,_0x2fac39=(_0x433ab3=(_0x3f4b8c=_0x4f45d0[_0x540afd(0xd5)])==null?void 0x0:_0x3f4b8c[_0x540afd(0xd3)](_0x4d1f20=>_0x4d1f20[_0x540afd(0xe0)]===_0x325494[_0x540afd(0x11e)])[_0x540afd(0x117)](_0x5e5d95=>_0x5e5d95[_0x540afd(0xe6)]))!=null?_0x433ab3:[],_0x476e2f=JSON[_0x540afd(0x11b)](_0x4f45d0),_0x1e40cd=_0x2d2cae[_0x540afd(0x11c)],_0x45cbc4=_0x2d2cae['id'],_0x5d94a2={'memberId':(await this[_0x540afd(0xcf)][_0x540afd(0xe1)](_0x59d4c3))['getMemberID'](),'unitId':_0x59d4c3,'threadId':_0x1e40cd,'mention':_0x2fac39,'content':_0x476e2f,'replyId':_0x45cbc4},_0x132de1=await this[_0x540afd(0xc4)]['post'](_0x540afd(0x11f)+_0x59d4c3+_0x540afd(0xe3),{'body':_0x5d94a2});return!_0x132de1['body'][_0x540afd(0x108)]||_0x132de1[_0x540afd(0xba)][_0x540afd(0x108)]['code']===0x1;}async['resolveComment'](_0x5d8666){const _0x3e014f=_0x3b7ea6,{unitId:_0x43f062}=_0x5d8666,_0x423ce3=_0x5d8666[_0x3e014f(0x11c)],_0x3f8100={'memberId':this[_0x3e014f(0x113)]['getCurrentUser']()[_0x3e014f(0x107)],'unitId':_0x43f062,'threadId':_0x423ce3,'solved':_0x5d8666[_0x3e014f(0xf8)]?I[_0x3e014f(0xd4)]:I[_0x3e014f(0x105)]},_0x32155c=await this[_0x3e014f(0xc4)][_0x3e014f(0x109)](_0x3e014f(0x11f)+_0x43f062+_0x3e014f(0xdb),{'body':_0x3f8100});return!_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]||_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]['code']===0x1;}async[_0x3b7ea6(0x11a)](_0x1414ea,_0x4845dd,_0x2e9fdb,_0x4d0a4c){const _0x4ae809=_0x3b7ea6,_0x6f1db={'memberId':(await this[_0x4ae809(0xcf)][_0x4ae809(0xe1)](_0x1414ea))[_0x4ae809(0x102)](),'threadId':_0x2e9fdb,'replyId':_0x4d0a4c,'unitId':_0x1414ea},_0x5be884=await this[_0x4ae809(0xc4)][_0x4ae809(0x109)]('/universer-api/comment/unit/'+_0x1414ea+_0x4ae809(0x114),{'body':_0x6f1db});return!_0x5be884[_0x4ae809(0xba)]['error']||_0x5be884[_0x4ae809(0xba)][_0x4ae809(0x108)][_0x4ae809(0xf2)]===0x1;}async[_0x3b7ea6(0xff)](_0x574952,_0x40bf25,_0x364d30){const _0x2a19a5=_0x3b7ea6,_0x3760a1={'unitId':_0x574952,'threadId':_0x364d30},_0x280d86=await this[_0x2a19a5(0xc4)][_0x2a19a5(0x109)]('/universer-api/comment/unit/'+_0x574952+_0x2a19a5(0xfd),{'body':_0x3760a1}),_0x585d06=_0x364d30[_0x2a19a5(0x117)](_0x2e852a=>ee(_0x280d86[_0x2a19a5(0xba)][_0x2a19a5(0xca)][_0x2e852a],_0x574952,_0x40bf25))[_0x2a19a5(0xd3)](Boolean);return Object[_0x2a19a5(0xd0)](_0x280d86['body'][_0x2a19a5(0xec)])[_0x2a19a5(0xea)](_0x6acb74=>{const _0x316bec=_0x2a19a5;this[_0x316bec(0x113)][_0x316bec(0xd9)](_0x6acb74);}),_0x585d06;}[_0x3b7ea6(0x111)](_0xd032ca){const _0x5564a1=_0x3b7ea6;return{'id':_0xd032ca['id'],'threadId':_0xd032ca['threadId'],'ref':_0xd032ca[_0x5564a1(0xd8)]};}};S=Q([b(0x0,_0x28ae67(_0x568a11)),b(0x1,_0x28ae67(_0x5458cd)),b(0x2,_0x28ae67(_0x3a4aed))],S);var re=Object[_0x3b7ea6(0xe9)],te=(_0x15046b,_0x3e2467,_0xca2b8a,_0x374fe8)=>{const _0x20f4ec=_0x3b7ea6;for(var _0x13f899=_0x374fe8>0x1?void 0x0:_0x374fe8?re(_0x3e2467,_0xca2b8a):_0x3e2467,_0x2cad7a=_0x15046b[_0x20f4ec(0xf1)]-0x1,_0x28d9e3;_0x2cad7a>=0x0;_0x2cad7a--)(_0x28d9e3=_0x15046b[_0x2cad7a])&&(_0x13f899=_0x28d9e3(_0x13f899)||_0x13f899);return _0x13f899;},M=(_0x21d738,_0x2a29de)=>(_0x2454bc,_0x324117)=>_0x2a29de(_0x2454bc,_0x324117,_0x21d738);let f=class extends _0x5ac438{constructor(_0x17697d,_0x1ecef1){const _0x4ae032=_0x3b7ea6;super(),this[_0x4ae032(0xfb)]=_0x17697d,this[_0x4ae032(0x10d)]=_0x1ecef1,this[_0x4ae032(0xc9)]();}[_0x3b7ea6(0xc9)](){const _0x54f0f5=_0x3b7ea6;this['_threadCommentDataSourceService']['dataSource']=this[_0x54f0f5(0x10d)],this[_0x54f0f5(0xfb)][_0x54f0f5(0x10f)]=!0x1;}};f=te([M(0x0,_0x482fdc),M(0x1,_0x28ae67(S))],f);var se=Object[_0x3b7ea6(0xc2)],oe=Object[_0x3b7ea6(0xe9)],ne=(_0x112089,_0x405bc4,_0x452caf)=>_0x405bc4 in _0x112089?se(_0x112089,_0x405bc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x452caf}):_0x112089[_0x405bc4]=_0x452caf,ie=(_0xf9d878,_0x57d109,_0x505f1b,_0x215772)=>{const _0xe616f3=_0x3b7ea6;for(var _0x121ce1=_0x215772>0x1?void 0x0:_0x215772?oe(_0x57d109,_0x505f1b):_0x57d109,_0x5bcf89=_0xf9d878[_0xe616f3(0xf1)]-0x1,_0x20bf0f;_0x5bcf89>=0x0;_0x5bcf89--)(_0x20bf0f=_0xf9d878[_0x5bcf89])&&(_0x121ce1=_0x20bf0f(_0x121ce1)||_0x121ce1);return _0x121ce1;},N=(_0x3a12eb,_0x2c1df4)=>(_0xc25808,_0x32a293)=>_0x2c1df4(_0xc25808,_0x32a293,_0x3a12eb),$=(_0x34edef,_0x32ea1e,_0x278cfc)=>ne(_0x34edef,typeof _0x32ea1e!='symbol'?_0x32ea1e+'':_0x32ea1e,_0x278cfc);let g=class extends _0x59bcbe{constructor(_0x268b0e=O,_0x41015c,_0x58833f){const _0x4bb2a2=_0x3b7ea6;super(),this[_0x4bb2a2(0xc5)]=_0x268b0e,this[_0x4bb2a2(0xee)]=_0x41015c,this[_0x4bb2a2(0x103)]=_0x58833f;const {..._0xdd0711}=_0x4f527c({},O,this[_0x4bb2a2(0xc5)]);this[_0x4bb2a2(0x103)][_0x4bb2a2(0xbd)](z,_0xdd0711);}[_0x3b7ea6(0xe2)](){const _0x5ed5ac=_0x3b7ea6;[[S],[f],[_]][_0x5ed5ac(0xea)](_0x173cc4=>{const _0x302ebb=_0x5ed5ac;this[_0x302ebb(0xee)][_0x302ebb(0x10b)](_0x173cc4);});}[_0x3b7ea6(0xde)](){const _0x50740b=_0x3b7ea6;this[_0x50740b(0xee)][_0x50740b(0xfa)](f),this[_0x50740b(0xee)]['get'](_);}};$(g,_0x3b7ea6(0xd6),W),$(g,'type',_0x3366af['UNIVER_UNKNOWN']),g=ie([_0x31c2de(_0x52729f,_0x5ecb4e,_0x2d5534),N(0x1,_0x28ae67(_0x44647b)),N(0x2,_0x3c3efa)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x36b8(_0x2864a1,_0x162230){const _0x18b0aa=_0x18b0();return _0x36b8=function(_0x36b8a1,_0x6148fc){_0x36b8a1=_0x36b8a1-0x1f3;let _0x1ecaef=_0x18b0aa[_0x36b8a1];return _0x1ecaef;},_0x36b8(_0x2864a1,_0x162230);}(function(_0x55b05b,_0x5f2a8e){const _0x8ebc=_0x36b8,_0x5c2b94=_0x55b05b();while(!![]){try{const _0x56a7af=parseInt(_0x8ebc(0x24d))/0x1*(-parseInt(_0x8ebc(0x246))/0x2)+parseInt(_0x8ebc(0x268))/0x3*(parseInt(_0x8ebc(0x243))/0x4)+parseInt(_0x8ebc(0x23e))/0x5+-parseInt(_0x8ebc(0x22d))/0x6+-parseInt(_0x8ebc(0x264))/0x7+-parseInt(_0x8ebc(0x24c))/0x8*(parseInt(_0x8ebc(0x249))/0x9)+-parseInt(_0x8ebc(0x209))/0xa*(-parseInt(_0x8ebc(0x25c))/0xb);if(_0x56a7af===_0x5f2a8e)break;else _0x5c2b94['push'](_0x5c2b94['shift']());}catch(_0x82221a){_0x5c2b94['push'](_0x5c2b94['shift']());}}}(_0x18b0,0x8d972),function(_0x167a8f,_0x4b7fd7){const _0x540fbb=_0x36b8;typeof exports==_0x540fbb(0x256)&&typeof module<'u'?_0x4b7fd7(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x540fbb(0x1f3)&&define['amd']?define([_0x540fbb(0x26e),_0x540fbb(0x239),'@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0x540fbb(0x22f),_0x540fbb(0x24a),_0x540fbb(0x20b)],_0x4b7fd7):(_0x167a8f=typeof globalThis<'u'?globalThis:_0x167a8f||self,_0x4b7fd7(_0x167a8f['UniverProThreadCommentDatasource']={},_0x167a8f[_0x540fbb(0x25d)],_0x167a8f[_0x540fbb(0x20d)],_0x167a8f[_0x540fbb(0x272)],_0x167a8f[_0x540fbb(0x220)],_0x167a8f[_0x540fbb(0x25e)],_0x167a8f[_0x540fbb(0x24a)],_0x167a8f['UniverNetwork']));}(this,function(_0x5838ea,_0x1cabcb,_0x250cd7,_0x559f35,_0x5e4b71,_0x3beb1d,_0x17826c,_0x2c1229){'use strict';const _0x4ac278=_0x36b8;const _0x47eccf=_0x4ac278(0x206);var _0x2203ca=(_0x2ad0e1=>(_0x2ad0e1[_0x2ad0e1[_0x4ac278(0x1fd)]=0x0]=_0x4ac278(0x1fd),_0x2ad0e1[_0x2ad0e1[_0x4ac278(0x240)]=0x1]=_0x4ac278(0x240),_0x2ad0e1[_0x2ad0e1[_0x4ac278(0x1f4)]=-0x1]=_0x4ac278(0x1f4),_0x2ad0e1))(_0x2203ca||{}),_0x49f46a=(_0xca68a2=>(_0xca68a2[_0xca68a2[_0x4ac278(0x203)]=0x0]=_0x4ac278(0x203),_0xca68a2[_0xca68a2[_0x4ac278(0x262)]=0x1]=_0x4ac278(0x262),_0xca68a2[_0xca68a2[_0x4ac278(0x260)]=0x2]=_0x4ac278(0x260),_0xca68a2[_0xca68a2[_0x4ac278(0x218)]=0x3]='Edit',_0xca68a2[_0xca68a2['Delete']=0x4]='Delete',_0xca68a2[_0xca68a2[_0x4ac278(0x251)]=0x5]=_0x4ac278(0x251),_0xca68a2[_0xca68a2[_0x4ac278(0x1f4)]=-0x1]='UNRECOGNIZED',_0xca68a2))(_0x49f46a||{});const _0x423bfe=_0x32b763=>_0x559f35[_0x4ac278(0x271)](new Date(+_0x32b763))['format'](_0x4ac278(0x211)),_0x1d1730=async(_0x3fdba2,_0x181d51)=>{const _0x4ad18a=_0x4ac278,_0x35f481=_0x3fdba2[_0x4ad18a(0x23d)](_0x559f35[_0x4ad18a(0x223)]),_0x4e5f62=_0x3fdba2[_0x4ad18a(0x23d)](_0x2c1229[_0x4ad18a(0x236)]);_0x181d51[_0x4ad18a(0x242)](_0x4e2405=>{_0x35f481['getUser'](_0x4e2405)&&_0x181d51['delete'](_0x4e2405);}),_0x181d51[_0x4ad18a(0x21e)]&&(await _0x4e5f62[_0x4ad18a(0x23d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x181d51]}}))[_0x4ad18a(0x261)][_0x4ad18a(0x238)][_0x4ad18a(0x242)](_0x99cff1=>{_0x99cff1&&_0x35f481['addUser'](_0x99cff1);});};var _0xd2f529=Object[_0x4ac278(0x221)],_0x2fefef=(_0x20774b,_0xdc6e9c,_0x179cb4,_0x4166b2)=>{for(var _0x3620b4=_0x4166b2>0x1?void 0x0:_0x4166b2?_0xd2f529(_0xdc6e9c,_0x179cb4):_0xdc6e9c,_0x24c46c=_0x20774b['length']-0x1,_0x541eca;_0x24c46c>=0x0;_0x24c46c--)(_0x541eca=_0x20774b[_0x24c46c])&&(_0x3620b4=_0x541eca(_0x3620b4)||_0x3620b4);return _0x3620b4;},_0x23f3f0=(_0x5a91ae,_0x4b300a)=>(_0xbd31f2,_0x4b5ab1)=>_0x4b300a(_0xbd31f2,_0x4b5ab1,_0x5a91ae);let _0x23ae1a=class extends _0x559f35[_0x4ac278(0x265)]{constructor(_0x55ee03,_0x24a5b7,_0x4dc5ca,_0x1959e0){const _0x36d06c=_0x4ac278;super(),this['_commentService']=_0x55ee03,this['_threadCommentModel']=_0x24a5b7,this[_0x36d06c(0x226)]=_0x4dc5ca,this[_0x36d06c(0x244)]=_0x1959e0,this[_0x36d06c(0x23f)](),this[_0x36d06c(0x255)]();}['_initUserSync'](){const _0x3e1836=_0x4ac278;this['disposeWithMe'](this[_0x3e1836(0x259)][_0x3e1836(0x22e)][_0x3e1836(0x231)](_0x17826c[_0x3e1836(0x21b)](0x10))[_0x3e1836(0x26a)](_0x270b6c=>{const _0x1affe0=_0x3e1836,_0x14a6ee=new Set();_0x270b6c['forEach'](_0x491b66=>{const _0x2329c3=_0x36b8;switch(_0x491b66[_0x2329c3(0x213)]){case _0x2329c3(0x22a):{const _0x177f82=_0x491b66[_0x2329c3(0x200)][_0x2329c3(0x1f6)];_0x14a6ee[_0x2329c3(0x22a)](_0x177f82);break;}}}),_0x1d1730(this[_0x1affe0(0x244)],_0x14a6ee);}));}[_0x4ac278(0x23f)](){const _0x2a97fb=_0x4ac278;this[_0x2a97fb(0x207)](this['_commentService'][_0x2a97fb(0x22e)]['subscribe'](async _0x19fc28=>{const _0x1c3bff=_0x2a97fb;var _0x5eb4cc,_0x103b8e,_0x127401,_0x980d2c;const _0x205e2f=(_0x5eb4cc=this[_0x1c3bff(0x259)][_0x1c3bff(0x201)](_0x19fc28[_0x1c3bff(0x25f)])[_0x1c3bff(0x21a)](_0x1ca51b=>_0x1ca51b[_0x1c3bff(0x1ff)]===_0x19fc28['threadId']))==null?void 0x0:_0x5eb4cc[_0x1c3bff(0x235)];if(!_0x205e2f)return;const {unitId:_0x169979,subUnitId:_0x195d5c}=_0x205e2f;switch(_0x19fc28[_0x1c3bff(0x21f)]&&this[_0x1c3bff(0x226)][_0x1c3bff(0x26f)](_0x19fc28['user']),_0x19fc28['type']){case _0x49f46a[_0x1c3bff(0x262)]:break;case _0x49f46a[_0x1c3bff(0x260)]:{this[_0x1c3bff(0x259)]['addComment'](_0x169979,_0x195d5c,{'unitId':_0x169979,'subUnitId':_0x195d5c,'ref':'','id':_0x19fc28[_0x1c3bff(0x214)],'dT':_0x423bfe(+_0x19fc28['createTimestamp']),'threadId':_0x19fc28[_0x1c3bff(0x1ff)],'personId':(_0x127401=(_0x103b8e=_0x19fc28[_0x1c3bff(0x21f)])==null?void 0x0:_0x103b8e[_0x1c3bff(0x26b)])!=null?_0x127401:_0x19fc28[_0x1c3bff(0x24b)],'text':JSON[_0x1c3bff(0x252)](_0x19fc28[_0x1c3bff(0x1f9)]),'parentId':_0x205e2f['id']});break;}case _0x49f46a[_0x1c3bff(0x245)]:{const _0x1c44ad=this[_0x1c3bff(0x259)]['getComment'](_0x169979,_0x195d5c,_0x19fc28[_0x1c3bff(0x214)]);_0x1c44ad&&_0x1c44ad[_0x1c3bff(0x1fc)]&&this[_0x1c3bff(0x259)]['deleteComment'](_0x169979,_0x195d5c,_0x19fc28[_0x1c3bff(0x214)]);break;}case _0x49f46a[_0x1c3bff(0x218)]:{this[_0x1c3bff(0x259)][_0x1c3bff(0x23a)](_0x169979,_0x195d5c,{'commentId':_0x19fc28['replyId'],'text':JSON['parse'](_0x19fc28[_0x1c3bff(0x1f9)])});break;}case _0x49f46a[_0x1c3bff(0x251)]:{const _0xcee4f7=(_0x980d2c=this['_threadCommentModel'][_0x1c3bff(0x201)](_0x19fc28['unitId'])[_0x1c3bff(0x21a)](_0x5ab72a=>_0x5ab72a[_0x1c3bff(0x1ff)]===_0x19fc28[_0x1c3bff(0x1ff)]))==null?void 0x0:_0x980d2c[_0x1c3bff(0x235)];_0xcee4f7&&this[_0x1c3bff(0x259)][_0x1c3bff(0x1fa)](_0x169979,_0x195d5c,_0xcee4f7['id'],_0x19fc28[_0x1c3bff(0x270)]===_0x2203ca[_0x1c3bff(0x240)]);break;}}}));}};_0x23ae1a=_0x2fefef([_0x23f3f0(0x0,_0x559f35['Inject'](_0x1cabcb['CommentService'])),_0x23f3f0(0x1,_0x559f35[_0x4ac278(0x228)](_0x3beb1d[_0x4ac278(0x24f)])),_0x23f3f0(0x2,_0x559f35[_0x4ac278(0x228)](_0x559f35[_0x4ac278(0x223)])),_0x23f3f0(0x3,_0x559f35['Inject'](_0x559f35[_0x4ac278(0x23c)]))],_0x23ae1a);const _0xaaf712=_0x4ac278(0x204),_0x4845e7={};var _0x4a873b=Object[_0x4ac278(0x221)],_0x40934f=(_0x1d24d6,_0x3c6da3,_0x2858c1,_0x39d05c)=>{const _0x4c8c90=_0x4ac278;for(var _0x5a3787=_0x39d05c>0x1?void 0x0:_0x39d05c?_0x4a873b(_0x3c6da3,_0x2858c1):_0x3c6da3,_0x96b7d3=_0x1d24d6[_0x4c8c90(0x263)]-0x1,_0x2b6171;_0x96b7d3>=0x0;_0x96b7d3--)(_0x2b6171=_0x1d24d6[_0x96b7d3])&&(_0x5a3787=_0x2b6171(_0x5a3787)||_0x5a3787);return _0x5a3787;},_0x57eacf=(_0x25af5a,_0x39178b)=>(_0x5dbd57,_0x2ff018)=>_0x39178b(_0x5dbd57,_0x2ff018,_0x25af5a);function _0x354760(_0x1ce131,_0xf07070){const _0x4178a7=_0x4ac278,_0x21afc3=_0x1ce131[_0x4178a7(0x216)][0x0];return{..._0xf07070,'id':_0x21afc3[_0x4178a7(0x214)],'resolved':_0x1ce131[_0x4178a7(0x270)]===0x1,'dT':_0x423bfe(_0x21afc3['createTimestamp']),'personId':_0x21afc3[_0x4178a7(0x24b)],'threadId':_0x21afc3['threadId']};}function _0x5ea654(_0x5b7aeb,_0x4f54ab,_0x2121e5){const _0x393be9=_0x4ac278;var _0x30a8ce,_0x17acda;if(((_0x17acda=(_0x30a8ce=_0x5b7aeb==null?void 0x0:_0x5b7aeb[_0x393be9(0x216)])==null?void 0x0:_0x30a8ce[_0x393be9(0x263)])!=null?_0x17acda:0x0)>0x0){const _0xbac0a1=(_0x9ef73b,_0x2536f7)=>({'id':_0x9ef73b[_0x393be9(0x214)],'threadId':_0x9ef73b[_0x393be9(0x1ff)],'dT':_0x423bfe(_0x9ef73b['createTimestamp']),'personId':_0x9ef73b[_0x393be9(0x24b)],'resolved':_0x5b7aeb[_0x393be9(0x270)]===_0x2203ca[_0x393be9(0x240)],'unitId':_0x4f54ab,'subUnitId':_0x2121e5,'text':JSON[_0x393be9(0x252)](_0x9ef73b[_0x393be9(0x1f9)]),'parentId':_0x2536f7}),_0x40a35d=_0xbac0a1(_0x5b7aeb[_0x393be9(0x216)][0x0]);return{..._0x40a35d,'children':_0x5b7aeb[_0x393be9(0x216)][_0x393be9(0x267)](0x1)[_0x393be9(0x1fe)](_0x60c671=>_0xbac0a1(_0x60c671,_0x40a35d['id']))};}return null;}let _0x3b779e=class{constructor(_0x21166d,_0x30ed2e,_0x1370d1){const _0x50121e=_0x4ac278;this[_0x50121e(0x21d)]=_0x21166d,this['_userService']=_0x30ed2e,this[_0x50121e(0x233)]=_0x1370d1;}async[_0x4ac278(0x20c)](_0x368a2c){const _0x27dbd4=_0x4ac278;var _0x39f5b7,_0x22cf5f;const {parentId:_0xf9b6d,unitId:_0x24276f,text:_0x2bdd3f,threadId:_0xd8ea25}=_0x368a2c,_0x269f9a=(_0x22cf5f=(_0x39f5b7=_0x2bdd3f[_0x27dbd4(0x224)])==null?void 0x0:_0x39f5b7['filter'](_0x520814=>_0x520814[_0x27dbd4(0x26c)]===_0x559f35[_0x27dbd4(0x237)][_0x27dbd4(0x257)])[_0x27dbd4(0x1fe)](_0x59e389=>_0x59e389[_0x27dbd4(0x248)]))!=null?_0x22cf5f:[],_0x40b66e=JSON['stringify'](_0x2bdd3f),_0x4e6d74=(await this[_0x27dbd4(0x233)][_0x27dbd4(0x1f5)](_0x24276f))[_0x27dbd4(0x229)]();if(_0xf9b6d){const _0x28134b={'memberId':_0x4e6d74,'unitId':_0x24276f,'content':_0x40b66e,'mention':_0x269f9a,'threadId':_0xd8ea25},_0x48b707=(await this[_0x27dbd4(0x21d)][_0x27dbd4(0x20e)]('/universer-api/comment/unit/'+_0x24276f+'/reply',{'body':_0x28134b}))[_0x27dbd4(0x261)][_0x27dbd4(0x247)];return{..._0x368a2c,'id':_0x48b707[_0x27dbd4(0x214)],'dT':_0x559f35['dayjs'](+_0x48b707[_0x27dbd4(0x26d)])[_0x27dbd4(0x210)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x48b707[_0x27dbd4(0x24b)]};}else{const _0x36486b={'memberId':_0x4e6d74,'unitId':_0x24276f,'content':_0x40b66e,'mention':_0x269f9a},_0x1d74fb=await this['_httpService']['post'](_0x27dbd4(0x254)+_0x24276f+_0x27dbd4(0x232),{'body':_0x36486b});return _0x354760(_0x1d74fb[_0x27dbd4(0x261)]['comment'],_0x368a2c);}}async['updateComment'](_0x49ca29){const _0x2ebe4c=_0x4ac278;var _0x15b504,_0x11a934;const {text:_0x151d3c,unitId:_0x4eafba}=_0x49ca29,_0x4e6f45=(_0x11a934=(_0x15b504=_0x151d3c[_0x2ebe4c(0x224)])==null?void 0x0:_0x15b504['filter'](_0x50bd94=>_0x50bd94[_0x2ebe4c(0x26c)]===_0x559f35[_0x2ebe4c(0x237)][_0x2ebe4c(0x257)])[_0x2ebe4c(0x1fe)](_0x3feff3=>_0x3feff3[_0x2ebe4c(0x248)]))!=null?_0x11a934:[],_0x5d670e=JSON['stringify'](_0x151d3c),_0x23a358=_0x49ca29[_0x2ebe4c(0x1ff)],_0x388669=_0x49ca29['id'],_0x2bd58a={'memberId':(await this[_0x2ebe4c(0x233)]['requireSession'](_0x4eafba))[_0x2ebe4c(0x229)](),'unitId':_0x4eafba,'threadId':_0x23a358,'mention':_0x4e6f45,'content':_0x5d670e,'replyId':_0x388669},_0x202d40=await this[_0x2ebe4c(0x21d)][_0x2ebe4c(0x20e)]('/universer-api/comment/unit/'+_0x4eafba+_0x2ebe4c(0x24e),{'body':_0x2bd58a});return!_0x202d40['body'][_0x2ebe4c(0x225)]||_0x202d40['body'][_0x2ebe4c(0x225)][_0x2ebe4c(0x269)]===0x1;}async[_0x4ac278(0x1fa)](_0x49f0a2){const _0x33f1a8=_0x4ac278,{unitId:_0x2a83b6}=_0x49f0a2,_0xdba305=_0x49f0a2[_0x33f1a8(0x1ff)],_0x128b27={'memberId':this['_userService']['getCurrentUser']()[_0x33f1a8(0x26b)],'unitId':_0x2a83b6,'threadId':_0xdba305,'solved':_0x49f0a2[_0x33f1a8(0x250)]?_0x2203ca[_0x33f1a8(0x240)]:_0x2203ca['OpenOrReOpen']},_0x5970db=await this[_0x33f1a8(0x21d)][_0x33f1a8(0x20e)](_0x33f1a8(0x254)+_0x2a83b6+_0x33f1a8(0x20a),{'body':_0x128b27});return!_0x5970db[_0x33f1a8(0x261)][_0x33f1a8(0x225)]||_0x5970db[_0x33f1a8(0x261)]['error'][_0x33f1a8(0x269)]===0x1;}async['deleteComment'](_0x5aed5c,_0x160bae,_0x51e99f,_0x3e1b1a){const _0x2774b2=_0x4ac278,_0x810b5c={'memberId':(await this[_0x2774b2(0x233)][_0x2774b2(0x1f5)](_0x5aed5c))[_0x2774b2(0x229)](),'threadId':_0x51e99f,'replyId':_0x3e1b1a,'unitId':_0x5aed5c},_0x5a39b5=await this[_0x2774b2(0x21d)][_0x2774b2(0x20e)]('/universer-api/comment/unit/'+_0x5aed5c+_0x2774b2(0x266),{'body':_0x810b5c});return!_0x5a39b5[_0x2774b2(0x261)]['error']||_0x5a39b5[_0x2774b2(0x261)][_0x2774b2(0x225)][_0x2774b2(0x269)]===0x1;}async[_0x4ac278(0x253)](_0x280644,_0x5de97,_0x23c4a7){const _0x58fcc2=_0x4ac278,_0x5f5b9a={'unitId':_0x280644,'threadId':_0x23c4a7},_0x110e3e=await this['_httpService'][_0x58fcc2(0x20e)](_0x58fcc2(0x254)+_0x280644+_0x58fcc2(0x227),{'body':_0x5f5b9a}),_0x2c9269=_0x23c4a7[_0x58fcc2(0x1fe)](_0x43eff0=>_0x5ea654(_0x110e3e[_0x58fcc2(0x261)][_0x58fcc2(0x234)][_0x43eff0],_0x280644,_0x5de97))[_0x58fcc2(0x205)](Boolean);return Object['values'](_0x110e3e[_0x58fcc2(0x261)][_0x58fcc2(0x238)])[_0x58fcc2(0x242)](_0x5aed71=>{const _0x571b1d=_0x58fcc2;this[_0x571b1d(0x226)][_0x571b1d(0x26f)](_0x5aed71);}),_0x2c9269;}[_0x4ac278(0x20f)](_0x51023d){const _0x228ff6=_0x4ac278;return{'id':_0x51023d['id'],'threadId':_0x51023d['threadId'],'ref':_0x51023d[_0x228ff6(0x202)]};}};_0x3b779e=_0x40934f([_0x57eacf(0x0,_0x559f35[_0x4ac278(0x228)](_0x2c1229['HTTPService'])),_0x57eacf(0x1,_0x559f35[_0x4ac278(0x228)](_0x559f35[_0x4ac278(0x223)])),_0x57eacf(0x2,_0x559f35['Inject'](_0x1cabcb[_0x4ac278(0x25a)]))],_0x3b779e);var _0x132f02=Object[_0x4ac278(0x221)],_0xbfaa64=(_0x2d04b7,_0xf1f7ea,_0x378e8e,_0x23aaa0)=>{const _0x4b2ada=_0x4ac278;for(var _0x5c501c=_0x23aaa0>0x1?void 0x0:_0x23aaa0?_0x132f02(_0xf1f7ea,_0x378e8e):_0xf1f7ea,_0x521e59=_0x2d04b7[_0x4b2ada(0x263)]-0x1,_0x15fe00;_0x521e59>=0x0;_0x521e59--)(_0x15fe00=_0x2d04b7[_0x521e59])&&(_0x5c501c=_0x15fe00(_0x5c501c)||_0x5c501c);return _0x5c501c;},_0x323d31=(_0x47e460,_0x42b945)=>(_0x18f404,_0x3c6a05)=>_0x42b945(_0x18f404,_0x3c6a05,_0x47e460);let _0x1aed25=class extends _0x559f35[_0x4ac278(0x265)]{constructor(_0x447f48,_0x1a652d){const _0x24d3ee=_0x4ac278;super(),this[_0x24d3ee(0x1f8)]=_0x447f48,this['_threadCommentDataSource']=_0x1a652d,this[_0x24d3ee(0x22c)]();}[_0x4ac278(0x22c)](){const _0x4c53c1=_0x4ac278;this['_threadCommentDataSourceService'][_0x4c53c1(0x258)]=this['_threadCommentDataSource'],this[_0x4c53c1(0x1f8)][_0x4c53c1(0x219)]=!0x1;}};_0x1aed25=_0xbfaa64([_0x323d31(0x0,_0x3beb1d['IThreadCommentDataSourceService']),_0x323d31(0x1,_0x559f35[_0x4ac278(0x228)](_0x3b779e))],_0x1aed25);var _0x59f3fe=Object['defineProperty'],_0x30548d=Object[_0x4ac278(0x221)],_0x4d403c=(_0x32f7a7,_0x15ec43,_0x11208b)=>_0x15ec43 in _0x32f7a7?_0x59f3fe(_0x32f7a7,_0x15ec43,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11208b}):_0x32f7a7[_0x15ec43]=_0x11208b,_0x19a716=(_0x4ac8b5,_0x4ec567,_0x179ef5,_0x1c7c3f)=>{const _0x1988f5=_0x4ac278;for(var _0x3d4ffd=_0x1c7c3f>0x1?void 0x0:_0x1c7c3f?_0x30548d(_0x4ec567,_0x179ef5):_0x4ec567,_0xf5c8c9=_0x4ac8b5[_0x1988f5(0x263)]-0x1,_0x50c1ca;_0xf5c8c9>=0x0;_0xf5c8c9--)(_0x50c1ca=_0x4ac8b5[_0xf5c8c9])&&(_0x3d4ffd=_0x50c1ca(_0x3d4ffd)||_0x3d4ffd);return _0x3d4ffd;},_0x57d374=(_0x28afed,_0xf8ccd1)=>(_0x23a7c2,_0x124750)=>_0xf8ccd1(_0x23a7c2,_0x124750,_0x28afed),_0x288689=(_0x118a1b,_0x1e9549,_0x165351)=>_0x4d403c(_0x118a1b,typeof _0x1e9549!='symbol'?_0x1e9549+'':_0x1e9549,_0x165351);_0x5838ea[_0x4ac278(0x230)]=class extends _0x559f35['Plugin']{constructor(_0x31f90a=_0x4845e7,_0x9ed0e1,_0x1bea2a){const _0x3044d6=_0x4ac278;super(),this[_0x3044d6(0x212)]=_0x31f90a,this['_injector']=_0x9ed0e1,this[_0x3044d6(0x215)]=_0x1bea2a;const {..._0x2a882f}=_0x559f35[_0x3044d6(0x23b)]({},_0x4845e7,this[_0x3044d6(0x212)]);this[_0x3044d6(0x215)][_0x3044d6(0x22b)](_0xaaf712,_0x2a882f);}[_0x4ac278(0x208)](){const _0x513e0d=_0x4ac278;[[_0x3b779e],[_0x1aed25],[_0x23ae1a]][_0x513e0d(0x242)](_0x224b23=>{const _0x220e1c=_0x513e0d;this[_0x220e1c(0x244)]['add'](_0x224b23);});}[_0x4ac278(0x25b)](){const _0x38eff1=_0x4ac278;this[_0x38eff1(0x244)][_0x38eff1(0x23d)](_0x1aed25),this['_injector']['get'](_0x23ae1a);}},_0x288689(_0x5838ea[_0x4ac278(0x230)],'pluginName',_0x47eccf),_0x288689(_0x5838ea[_0x4ac278(0x230)],_0x4ac278(0x213),_0x559f35[_0x4ac278(0x217)]['UNIVER_UNKNOWN']),_0x5838ea[_0x4ac278(0x230)]=_0x19a716([_0x559f35['DependentOn'](_0x5e4b71[_0x4ac278(0x1fb)],_0x1cabcb[_0x4ac278(0x241)],_0x250cd7[_0x4ac278(0x1f7)]),_0x57d374(0x1,_0x559f35[_0x4ac278(0x228)](_0x559f35[_0x4ac278(0x23c)])),_0x57d374(0x2,_0x559f35[_0x4ac278(0x21c)])],_0x5838ea[_0x4ac278(0x230)]),Object['defineProperty'](_0x5838ea,Symbol[_0x4ac278(0x222)],{'value':'Module'});}));function _0x18b0(){const _0xde38e1=['/edit','ThreadCommentModel','resolved','Solve','parse','listComments','/universer-api/comment/unit/','_initUserSync','object','COMMENT','dataSource','_threadCommentModel','CollaborationSessionService','onReady','11mNivqM','UniverProCollaborationClient','UniverThreadComment','unitId','Reply','body','Add','length','2832578oZtnie','Disposable','/delete','slice','368013UPrsQw','code','subscribe','userID','rangeType','createTimestamp','exports','addUser','solved','dayjs','UniverCore','function','UNRECOGNIZED','requireSession','personId','UniverLicensePlugin','_threadCommentDataSourceService','content','resolveComment','UniverThreadCommentUIPlugin','parentId','OpenOrReOpen','map','threadId','payload','getUnit','ref','Unknown','thread-comment-data-source.config','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','onStarting','30840fbHwAq','/solved','@univerjs/network','addComment','UniverProLicense','post','saveCommentToSnapshot','format','YYYY/MM/DD\x20HH:mm','_config','type','replyId','_configService','replies','UniverInstanceType','Edit','syncUpdateMutationToColla','find','bufferTime','IConfigService','_httpService','size','user','UniverThreadCommentUi','getOwnPropertyDescriptor','toStringTag','UserManagerService','customRanges','error','_userService','/list','Inject','getMemberID','add','setConfig','_initDataSource','2047392tvIELd','commentUpdate$','@univerjs/thread-comment','UniverThreadCommentDataSourcePlugin','pipe','/add','_sessionService','comments','root','HTTPService','CustomRangeType','users','@univerjs-pro/collaboration-client','updateComment','merge','Injector','get','2049005OPALIS','_init','Solved','UniverCollaborationClientPlugin','forEach','32JVMHIm','_injector','Delete','34bDnOEG','reply','rangeId','36Itbesx','rxjs','userId','26088uFsQSD','3257GBMZdw'];_0x18b0=function(){return _0xde38e1;};return _0x18b0();}
|
|
1
|
+
function _0x257b(_0x2edf39,_0x31084c){const _0x3ff652=_0x3ff6();return _0x257b=function(_0x257b18,_0x10e1f4){_0x257b18=_0x257b18-0x1c7;let _0x4fe5c9=_0x3ff652[_0x257b18];return _0x4fe5c9;},_0x257b(_0x2edf39,_0x31084c);}function _0x3ff6(){const _0x5e816a=['delete','_init','onReady','10wLvSJy','getUnit','exports','resolveComment','/delete','IThreadCommentDataSourceService','Injector','addComment','object','_config','173868fyoVSl','UNRECOGNIZED','customRanges','/universer-api/user/list','setConfig','/universer-api/comment/unit/','user','Reply','getMemberID','UniverProCollaborationClient','CustomRangeType','UniverThreadComment','reply','ref','unitId','threadId','getOwnPropertyDescriptor','map','rxjs','/edit','rangeId','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','addUser','CollaborationSessionService','_initDataSource','216787pnsVSD','IConfigService','solved','UniverThreadCommentUi','@univerjs/thread-comment-ui','personId','body','_threadCommentModel','Add','/list','150MgzQiG','Delete','CommentService','/solved','_sessionService','format','pluginName','forEach','createTimestamp','7471360vDBnWK','HTTPService','deleteComment','@univerjs/network','OpenOrReOpen','Module','Unknown','parentId','_commentService','defineProperty','2630466PBVnzZ','filter','UniverLicensePlugin','resolved','thread-comment-data-source.config','type','comments','dayjs','code','listComments','add','slice','bufferTime','function','COMMENT','/add','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','10787562rtvPWF','merge','_configService','Inject','dataSource','userID','pipe','post','root','@univerjs-pro/license','error','@univerjs/core','subscribe','syncUpdateMutationToColla','UniverProLicense','commentUpdate$','parse','userId','_httpService','Disposable','Edit','1465270qKziDz','get','users','stringify','values','UserManagerService','payload','find','amd','symbol','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','DependentOn','requireSession','size','Plugin','UniverInstanceType','updateComment','Solve','65ZeVMOj','getUser','replyId','length','_initUserSync','@univerjs-pro/collaboration-client','Solved','replies','230503kSVOCG','comment','_userService','_injector','rangeType','disposeWithMe'];_0x3ff6=function(){return _0x5e816a;};return _0x3ff6();}(function(_0x4c20ba,_0x24cf92){const _0x1334c7=_0x257b,_0x5e2b50=_0x4c20ba();while(!![]){try{const _0x31660c=parseInt(_0x1334c7(0x1e8))/0x1+parseInt(_0x1334c7(0x22c))/0x2+-parseInt(_0x1334c7(0x205))/0x3+-parseInt(_0x1334c7(0x1cc))/0x4*(parseInt(_0x1334c7(0x23f))/0x5)+parseInt(_0x1334c7(0x1f2))/0x6*(parseInt(_0x1334c7(0x247))/0x7)+-parseInt(_0x1334c7(0x1fb))/0x8+-parseInt(_0x1334c7(0x217))/0x9*(-parseInt(_0x1334c7(0x250))/0xa);if(_0x31660c===_0x24cf92)break;else _0x5e2b50['push'](_0x5e2b50['shift']());}catch(_0x1448c3){_0x5e2b50['push'](_0x5e2b50['shift']());}}}(_0x3ff6,0x915fc),function(_0x2138b7,_0x22b525){const _0xe1e551=_0x257b;typeof exports==_0xe1e551(0x1ca)&&typeof module<'u'?_0x22b525(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xe1e551(0x212)&&define[_0xe1e551(0x234)]?define([_0xe1e551(0x252),_0xe1e551(0x244),_0xe1e551(0x220),_0xe1e551(0x222),_0xe1e551(0x1ec),'@univerjs/thread-comment','rxjs',_0xe1e551(0x1fe)],_0x22b525):(_0x2138b7=typeof globalThis<'u'?globalThis:_0x2138b7||self,_0x22b525(_0x2138b7['UniverProThreadCommentDatasource']={},_0x2138b7[_0xe1e551(0x1d5)],_0x2138b7[_0xe1e551(0x225)],_0x2138b7['UniverCore'],_0x2138b7[_0xe1e551(0x1eb)],_0x2138b7[_0xe1e551(0x1d7)],_0x2138b7[_0xe1e551(0x1de)],_0x2138b7['UniverNetwork']));}(this,function(_0x389f2b,_0x268431,_0x198b16,_0xa92e6,_0x203d16,_0x2437b5,_0x2d260e,_0x1524a4){'use strict';const _0x593213=_0x257b;const _0x3cc975=_0x593213(0x237);var _0x4656cb=(_0x440c2d=>(_0x440c2d[_0x440c2d[_0x593213(0x1ff)]=0x0]='OpenOrReOpen',_0x440c2d[_0x440c2d[_0x593213(0x245)]=0x1]=_0x593213(0x245),_0x440c2d[_0x440c2d['UNRECOGNIZED']=-0x1]=_0x593213(0x1cd),_0x440c2d))(_0x4656cb||{}),_0x11237e=(_0x5adf41=>(_0x5adf41[_0x5adf41[_0x593213(0x201)]=0x0]='Unknown',_0x5adf41[_0x5adf41[_0x593213(0x1f0)]=0x1]=_0x593213(0x1f0),_0x5adf41[_0x5adf41[_0x593213(0x1d3)]=0x2]='Reply',_0x5adf41[_0x5adf41[_0x593213(0x22b)]=0x3]='Edit',_0x5adf41[_0x5adf41[_0x593213(0x1f3)]=0x4]=_0x593213(0x1f3),_0x5adf41[_0x5adf41[_0x593213(0x23e)]=0x5]=_0x593213(0x23e),_0x5adf41[_0x5adf41[_0x593213(0x1cd)]=-0x1]=_0x593213(0x1cd),_0x5adf41))(_0x11237e||{});const _0x3993c6=_0x36e3e0=>_0xa92e6['dayjs'](new Date(+_0x36e3e0))[_0x593213(0x1f7)](_0x593213(0x1e3)),_0x48e0e6=async(_0x16125f,_0x3e13a4)=>{const _0x531044=_0x593213,_0x24c7fa=_0x16125f[_0x531044(0x22d)](_0xa92e6[_0x531044(0x231)]),_0x33fb2c=_0x16125f[_0x531044(0x22d)](_0x1524a4[_0x531044(0x1fc)]);_0x3e13a4['forEach'](_0x3e9da1=>{const _0x157dae=_0x531044;_0x24c7fa[_0x157dae(0x240)](_0x3e9da1)&&_0x3e13a4[_0x157dae(0x24d)](_0x3e9da1);}),_0x3e13a4[_0x531044(0x23a)]&&(await _0x33fb2c[_0x531044(0x22d)](_0x531044(0x1cf),{'params':{'userIDs':[..._0x3e13a4]}}))['body'][_0x531044(0x22e)][_0x531044(0x1f9)](_0x27090b=>{_0x27090b&&_0x24c7fa['addUser'](_0x27090b);});};var _0x21964f=Object[_0x593213(0x1dc)],_0x4c8e28=(_0xaedd71,_0x5a111f,_0x542856,_0x2d8dfc)=>{const _0x2dc28d=_0x593213;for(var _0x47d22f=_0x2d8dfc>0x1?void 0x0:_0x2d8dfc?_0x21964f(_0x5a111f,_0x542856):_0x5a111f,_0x14fb77=_0xaedd71[_0x2dc28d(0x242)]-0x1,_0x3381f4;_0x14fb77>=0x0;_0x14fb77--)(_0x3381f4=_0xaedd71[_0x14fb77])&&(_0x47d22f=_0x3381f4(_0x47d22f)||_0x47d22f);return _0x47d22f;},_0x9d97ee=(_0x193981,_0x496e4b)=>(_0xff3690,_0xdf6322)=>_0x496e4b(_0xff3690,_0xdf6322,_0x193981);let _0x862e64=class extends _0xa92e6[_0x593213(0x22a)]{constructor(_0x5b045d,_0x19ff15,_0xc63f01,_0x48542e){const _0x58d619=_0x593213;super(),this['_commentService']=_0x5b045d,this[_0x58d619(0x1ef)]=_0x19ff15,this[_0x58d619(0x249)]=_0xc63f01,this[_0x58d619(0x24a)]=_0x48542e,this['_init'](),this['_initUserSync']();}[_0x593213(0x243)](){const _0x2e2be2=_0x593213;this['disposeWithMe'](this[_0x2e2be2(0x1ef)][_0x2e2be2(0x226)][_0x2e2be2(0x21d)](_0x2d260e[_0x2e2be2(0x211)](0x10))[_0x2e2be2(0x223)](_0x52160b=>{const _0x3df8ed=_0x2e2be2,_0x1fb321=new Set();_0x52160b[_0x3df8ed(0x1f9)](_0x16efb7=>{const _0x5c02c2=_0x3df8ed;switch(_0x16efb7[_0x5c02c2(0x20a)]){case'add':{const _0x44c595=_0x16efb7[_0x5c02c2(0x232)][_0x5c02c2(0x1ed)];_0x1fb321['add'](_0x44c595);break;}}}),_0x48e0e6(this[_0x3df8ed(0x24a)],_0x1fb321);}));}[_0x593213(0x24e)](){const _0xa31507=_0x593213;this[_0xa31507(0x24c)](this[_0xa31507(0x203)][_0xa31507(0x226)][_0xa31507(0x223)](async _0x56a656=>{const _0x363870=_0xa31507;var _0x1b18a6,_0x6665f7,_0x4da948,_0x405840;const _0x585a6a=(_0x1b18a6=this[_0x363870(0x1ef)][_0x363870(0x251)](_0x56a656['unitId'])[_0x363870(0x233)](_0x26931e=>_0x26931e['threadId']===_0x56a656[_0x363870(0x1db)]))==null?void 0x0:_0x1b18a6['root'];if(!_0x585a6a)return;const {unitId:_0x36db4d,subUnitId:_0x14699d}=_0x585a6a;switch(_0x56a656[_0x363870(0x1d2)]&&this[_0x363870(0x249)][_0x363870(0x1e5)](_0x56a656['user']),_0x56a656[_0x363870(0x20a)]){case _0x11237e[_0x363870(0x1f0)]:break;case _0x11237e['Reply']:{this[_0x363870(0x1ef)]['addComment'](_0x36db4d,_0x14699d,{'unitId':_0x36db4d,'subUnitId':_0x14699d,'ref':'','id':_0x56a656[_0x363870(0x241)],'dT':_0x3993c6(+_0x56a656[_0x363870(0x1fa)]),'threadId':_0x56a656[_0x363870(0x1db)],'personId':(_0x4da948=(_0x6665f7=_0x56a656[_0x363870(0x1d2)])==null?void 0x0:_0x6665f7[_0x363870(0x21c)])!=null?_0x4da948:_0x56a656[_0x363870(0x228)],'text':JSON[_0x363870(0x227)](_0x56a656[_0x363870(0x236)]),'parentId':_0x585a6a['id']});break;}case _0x11237e[_0x363870(0x1f3)]:{const _0x222c4=this[_0x363870(0x1ef)]['getComment'](_0x36db4d,_0x14699d,_0x56a656['replyId']);_0x222c4&&_0x222c4[_0x363870(0x202)]&&this[_0x363870(0x1ef)][_0x363870(0x1fd)](_0x36db4d,_0x14699d,_0x56a656['replyId']);break;}case _0x11237e[_0x363870(0x22b)]:{this[_0x363870(0x1ef)]['updateComment'](_0x36db4d,_0x14699d,{'commentId':_0x56a656[_0x363870(0x241)],'text':JSON[_0x363870(0x227)](_0x56a656[_0x363870(0x236)])});break;}case _0x11237e[_0x363870(0x23e)]:{const _0x4bc996=(_0x405840=this[_0x363870(0x1ef)][_0x363870(0x251)](_0x56a656[_0x363870(0x1da)])[_0x363870(0x233)](_0x4fd80b=>_0x4fd80b[_0x363870(0x1db)]===_0x56a656[_0x363870(0x1db)]))==null?void 0x0:_0x405840[_0x363870(0x21f)];_0x4bc996&&this[_0x363870(0x1ef)][_0x363870(0x253)](_0x36db4d,_0x14699d,_0x4bc996['id'],_0x56a656[_0x363870(0x1ea)]===_0x4656cb[_0x363870(0x245)]);break;}}}));}};_0x862e64=_0x4c8e28([_0x9d97ee(0x0,_0xa92e6[_0x593213(0x21a)](_0x268431[_0x593213(0x1f4)])),_0x9d97ee(0x1,_0xa92e6[_0x593213(0x21a)](_0x2437b5['ThreadCommentModel'])),_0x9d97ee(0x2,_0xa92e6[_0x593213(0x21a)](_0xa92e6[_0x593213(0x231)])),_0x9d97ee(0x3,_0xa92e6[_0x593213(0x21a)](_0xa92e6['Injector']))],_0x862e64);const _0x1ad1d7=_0x593213(0x209),_0x440bb2={};var _0x5547ec=Object['getOwnPropertyDescriptor'],_0x59c3c0=(_0xa556be,_0x321ca2,_0x5261f3,_0x3367f9)=>{const _0x1b03ca=_0x593213;for(var _0x452ac4=_0x3367f9>0x1?void 0x0:_0x3367f9?_0x5547ec(_0x321ca2,_0x5261f3):_0x321ca2,_0x13db4c=_0xa556be[_0x1b03ca(0x242)]-0x1,_0x5f3500;_0x13db4c>=0x0;_0x13db4c--)(_0x5f3500=_0xa556be[_0x13db4c])&&(_0x452ac4=_0x5f3500(_0x452ac4)||_0x452ac4);return _0x452ac4;},_0x456707=(_0x514e41,_0x179e7c)=>(_0x3bfc3d,_0x51e36c)=>_0x179e7c(_0x3bfc3d,_0x51e36c,_0x514e41);function _0x595c81(_0x3e1be3,_0x2c7b7f){const _0x3a8e28=_0x593213,_0x5e5353=_0x3e1be3[_0x3a8e28(0x246)][0x0];return{..._0x2c7b7f,'id':_0x5e5353[_0x3a8e28(0x241)],'resolved':_0x3e1be3[_0x3a8e28(0x1ea)]===0x1,'dT':_0x3993c6(_0x5e5353[_0x3a8e28(0x1fa)]),'personId':_0x5e5353['userId'],'threadId':_0x5e5353[_0x3a8e28(0x1db)]};}function _0x4278a4(_0x57fc8a,_0x223a49,_0x47afef){const _0x32b4ab=_0x593213;var _0x36012f,_0x63dc8f;if(((_0x63dc8f=(_0x36012f=_0x57fc8a==null?void 0x0:_0x57fc8a['replies'])==null?void 0x0:_0x36012f['length'])!=null?_0x63dc8f:0x0)>0x0){const _0x2a978a=(_0x4130eb,_0x619b78)=>({'id':_0x4130eb[_0x32b4ab(0x241)],'threadId':_0x4130eb[_0x32b4ab(0x1db)],'dT':_0x3993c6(_0x4130eb[_0x32b4ab(0x1fa)]),'personId':_0x4130eb[_0x32b4ab(0x228)],'resolved':_0x57fc8a[_0x32b4ab(0x1ea)]===_0x4656cb[_0x32b4ab(0x245)],'unitId':_0x223a49,'subUnitId':_0x47afef,'text':JSON[_0x32b4ab(0x227)](_0x4130eb['content']),'parentId':_0x619b78}),_0x4c034d=_0x2a978a(_0x57fc8a[_0x32b4ab(0x246)][0x0]);return{..._0x4c034d,'children':_0x57fc8a[_0x32b4ab(0x246)][_0x32b4ab(0x210)](0x1)[_0x32b4ab(0x1dd)](_0x2fb18c=>_0x2a978a(_0x2fb18c,_0x4c034d['id']))};}return null;}let _0xf6b40f=class{constructor(_0x50ac40,_0x435a35,_0x1fff76){const _0x43ccac=_0x593213;this['_httpService']=_0x50ac40,this[_0x43ccac(0x249)]=_0x435a35,this[_0x43ccac(0x1f6)]=_0x1fff76;}async[_0x593213(0x1c9)](_0x1ea2f5){const _0x2a63c4=_0x593213;var _0x92c0bd,_0x1e5354;const {parentId:_0x55e23f,unitId:_0x416c36,text:_0x3c6355,threadId:_0x5dbd10}=_0x1ea2f5,_0x29f371=(_0x1e5354=(_0x92c0bd=_0x3c6355[_0x2a63c4(0x1ce)])==null?void 0x0:_0x92c0bd[_0x2a63c4(0x206)](_0x1cff8e=>_0x1cff8e['rangeType']===_0xa92e6[_0x2a63c4(0x1d6)][_0x2a63c4(0x213)])[_0x2a63c4(0x1dd)](_0x3af89d=>_0x3af89d[_0x2a63c4(0x1e0)]))!=null?_0x1e5354:[],_0xc9fa09=JSON['stringify'](_0x3c6355),_0x5d7d42=(await this['_sessionService'][_0x2a63c4(0x239)](_0x416c36))[_0x2a63c4(0x1d4)]();if(_0x55e23f){const _0x38de80={'memberId':_0x5d7d42,'unitId':_0x416c36,'content':_0xc9fa09,'mention':_0x29f371,'threadId':_0x5dbd10},_0x5ac00c=(await this[_0x2a63c4(0x229)][_0x2a63c4(0x21e)](_0x2a63c4(0x1d1)+_0x416c36+'/reply',{'body':_0x38de80}))[_0x2a63c4(0x1ee)][_0x2a63c4(0x1d8)];return{..._0x1ea2f5,'id':_0x5ac00c[_0x2a63c4(0x241)],'dT':_0xa92e6[_0x2a63c4(0x20c)](+_0x5ac00c[_0x2a63c4(0x1fa)])[_0x2a63c4(0x1f7)](_0x2a63c4(0x1e3)),'personId':_0x5ac00c[_0x2a63c4(0x228)]};}else{const _0x1243a8={'memberId':_0x5d7d42,'unitId':_0x416c36,'content':_0xc9fa09,'mention':_0x29f371},_0x3135db=await this[_0x2a63c4(0x229)][_0x2a63c4(0x21e)](_0x2a63c4(0x1d1)+_0x416c36+_0x2a63c4(0x214),{'body':_0x1243a8});return _0x595c81(_0x3135db[_0x2a63c4(0x1ee)][_0x2a63c4(0x248)],_0x1ea2f5);}}async[_0x593213(0x23d)](_0x1bcec6){const _0x3e9cf9=_0x593213;var _0x214a24,_0x5066d8;const {text:_0x5322e1,unitId:_0x3cb955}=_0x1bcec6,_0x31e9f1=(_0x5066d8=(_0x214a24=_0x5322e1['customRanges'])==null?void 0x0:_0x214a24[_0x3e9cf9(0x206)](_0x48c1ed=>_0x48c1ed[_0x3e9cf9(0x24b)]===_0xa92e6[_0x3e9cf9(0x1d6)][_0x3e9cf9(0x213)])[_0x3e9cf9(0x1dd)](_0x4fe6fa=>_0x4fe6fa['rangeId']))!=null?_0x5066d8:[],_0x4c4e27=JSON[_0x3e9cf9(0x22f)](_0x5322e1),_0xf9f2c4=_0x1bcec6[_0x3e9cf9(0x1db)],_0x55e83c=_0x1bcec6['id'],_0x1a1916={'memberId':(await this[_0x3e9cf9(0x1f6)][_0x3e9cf9(0x239)](_0x3cb955))['getMemberID'](),'unitId':_0x3cb955,'threadId':_0xf9f2c4,'mention':_0x31e9f1,'content':_0x4c4e27,'replyId':_0x55e83c},_0x41423d=await this[_0x3e9cf9(0x229)][_0x3e9cf9(0x21e)](_0x3e9cf9(0x1d1)+_0x3cb955+_0x3e9cf9(0x1df),{'body':_0x1a1916});return!_0x41423d[_0x3e9cf9(0x1ee)][_0x3e9cf9(0x221)]||_0x41423d[_0x3e9cf9(0x1ee)][_0x3e9cf9(0x221)][_0x3e9cf9(0x20d)]===0x1;}async[_0x593213(0x253)](_0x347245){const _0x3897f0=_0x593213,{unitId:_0x2e6b3d}=_0x347245,_0x4251ef=_0x347245[_0x3897f0(0x1db)],_0x3b0e00={'memberId':this[_0x3897f0(0x249)]['getCurrentUser']()[_0x3897f0(0x21c)],'unitId':_0x2e6b3d,'threadId':_0x4251ef,'solved':_0x347245[_0x3897f0(0x208)]?_0x4656cb['Solved']:_0x4656cb[_0x3897f0(0x1ff)]},_0x300dcd=await this['_httpService'][_0x3897f0(0x21e)](_0x3897f0(0x1d1)+_0x2e6b3d+_0x3897f0(0x1f5),{'body':_0x3b0e00});return!_0x300dcd[_0x3897f0(0x1ee)][_0x3897f0(0x221)]||_0x300dcd[_0x3897f0(0x1ee)][_0x3897f0(0x221)][_0x3897f0(0x20d)]===0x1;}async[_0x593213(0x1fd)](_0x3f137b,_0x29e5e4,_0x51b05c,_0x3096dc){const _0x3ad491=_0x593213,_0x4b255c={'memberId':(await this[_0x3ad491(0x1f6)][_0x3ad491(0x239)](_0x3f137b))['getMemberID'](),'threadId':_0x51b05c,'replyId':_0x3096dc,'unitId':_0x3f137b},_0x1d7cd4=await this[_0x3ad491(0x229)][_0x3ad491(0x21e)](_0x3ad491(0x1d1)+_0x3f137b+_0x3ad491(0x254),{'body':_0x4b255c});return!_0x1d7cd4[_0x3ad491(0x1ee)][_0x3ad491(0x221)]||_0x1d7cd4['body'][_0x3ad491(0x221)][_0x3ad491(0x20d)]===0x1;}async[_0x593213(0x20e)](_0x64c3b3,_0x299b77,_0xfc454b){const _0xc82b67=_0x593213,_0x12b6dc={'unitId':_0x64c3b3,'threadId':_0xfc454b},_0x1ead42=await this[_0xc82b67(0x229)]['post']('/universer-api/comment/unit/'+_0x64c3b3+_0xc82b67(0x1f1),{'body':_0x12b6dc}),_0x50f23a=_0xfc454b[_0xc82b67(0x1dd)](_0x5b706e=>_0x4278a4(_0x1ead42['body'][_0xc82b67(0x20b)][_0x5b706e],_0x64c3b3,_0x299b77))[_0xc82b67(0x206)](Boolean);return Object[_0xc82b67(0x230)](_0x1ead42[_0xc82b67(0x1ee)][_0xc82b67(0x22e)])[_0xc82b67(0x1f9)](_0x56b0d6=>{const _0x463e72=_0xc82b67;this[_0x463e72(0x249)][_0x463e72(0x1e5)](_0x56b0d6);}),_0x50f23a;}['saveCommentToSnapshot'](_0x1733fd){const _0x1ea7eb=_0x593213;return{'id':_0x1733fd['id'],'threadId':_0x1733fd['threadId'],'ref':_0x1733fd[_0x1ea7eb(0x1d9)]};}};_0xf6b40f=_0x59c3c0([_0x456707(0x0,_0xa92e6[_0x593213(0x21a)](_0x1524a4[_0x593213(0x1fc)])),_0x456707(0x1,_0xa92e6[_0x593213(0x21a)](_0xa92e6[_0x593213(0x231)])),_0x456707(0x2,_0xa92e6[_0x593213(0x21a)](_0x268431[_0x593213(0x1e6)]))],_0xf6b40f);var _0x5992e2=Object[_0x593213(0x1dc)],_0x134d50=(_0x429f9c,_0x31fc94,_0x5af2c8,_0x443d68)=>{const _0x5b9b1b=_0x593213;for(var _0x1f797c=_0x443d68>0x1?void 0x0:_0x443d68?_0x5992e2(_0x31fc94,_0x5af2c8):_0x31fc94,_0x54ffd8=_0x429f9c[_0x5b9b1b(0x242)]-0x1,_0x4d3b0d;_0x54ffd8>=0x0;_0x54ffd8--)(_0x4d3b0d=_0x429f9c[_0x54ffd8])&&(_0x1f797c=_0x4d3b0d(_0x1f797c)||_0x1f797c);return _0x1f797c;},_0x3d9f78=(_0x22605c,_0x57c8f7)=>(_0x93928e,_0x579fa6)=>_0x57c8f7(_0x93928e,_0x579fa6,_0x22605c);let _0x5a2af2=class extends _0xa92e6[_0x593213(0x22a)]{constructor(_0x5d557f,_0x115a10){const _0x62b6cb=_0x593213;super(),this[_0x62b6cb(0x216)]=_0x5d557f,this[_0x62b6cb(0x1e4)]=_0x115a10,this[_0x62b6cb(0x1e7)]();}['_initDataSource'](){const _0x28ae58=_0x593213;this[_0x28ae58(0x216)][_0x28ae58(0x21b)]=this[_0x28ae58(0x1e4)],this['_threadCommentDataSourceService'][_0x28ae58(0x224)]=!0x1;}};_0x5a2af2=_0x134d50([_0x3d9f78(0x0,_0x2437b5[_0x593213(0x1c7)]),_0x3d9f78(0x1,_0xa92e6[_0x593213(0x21a)](_0xf6b40f))],_0x5a2af2);var _0x22255f=Object[_0x593213(0x204)],_0xd6f677=Object[_0x593213(0x1dc)],_0x4373c9=(_0x1d2281,_0x4dc788,_0x1d7ec1)=>_0x4dc788 in _0x1d2281?_0x22255f(_0x1d2281,_0x4dc788,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d7ec1}):_0x1d2281[_0x4dc788]=_0x1d7ec1,_0x43b263=(_0x47e61d,_0x111354,_0x28579e,_0x467b8f)=>{const _0x15fc5d=_0x593213;for(var _0x20a4e9=_0x467b8f>0x1?void 0x0:_0x467b8f?_0xd6f677(_0x111354,_0x28579e):_0x111354,_0x3d3c2=_0x47e61d[_0x15fc5d(0x242)]-0x1,_0x28d6f8;_0x3d3c2>=0x0;_0x3d3c2--)(_0x28d6f8=_0x47e61d[_0x3d3c2])&&(_0x20a4e9=_0x28d6f8(_0x20a4e9)||_0x20a4e9);return _0x20a4e9;},_0x3d2c34=(_0x5f3c13,_0x214544)=>(_0x4e4bfb,_0x34e4a4)=>_0x214544(_0x4e4bfb,_0x34e4a4,_0x5f3c13),_0x4a64e6=(_0x1c52c1,_0x2d9e6f,_0x4031d4)=>_0x4373c9(_0x1c52c1,typeof _0x2d9e6f!=_0x593213(0x235)?_0x2d9e6f+'':_0x2d9e6f,_0x4031d4);_0x389f2b[_0x593213(0x1e1)]=class extends _0xa92e6[_0x593213(0x23b)]{constructor(_0x31cb9a=_0x440bb2,_0x297b52,_0x436ed2){const _0x41401c=_0x593213;super(),this[_0x41401c(0x1cb)]=_0x31cb9a,this[_0x41401c(0x24a)]=_0x297b52,this[_0x41401c(0x219)]=_0x436ed2;const {..._0x46adeb}=_0xa92e6[_0x41401c(0x218)]({},_0x440bb2,this[_0x41401c(0x1cb)]);this[_0x41401c(0x219)][_0x41401c(0x1d0)](_0x1ad1d7,_0x46adeb);}['onStarting'](){const _0x628fa0=_0x593213;[[_0xf6b40f],[_0x5a2af2],[_0x862e64]][_0x628fa0(0x1f9)](_0x15a2f4=>{const _0xa199be=_0x628fa0;this[_0xa199be(0x24a)][_0xa199be(0x20f)](_0x15a2f4);});}[_0x593213(0x24f)](){const _0x330277=_0x593213;this[_0x330277(0x24a)]['get'](_0x5a2af2),this[_0x330277(0x24a)][_0x330277(0x22d)](_0x862e64);}},_0x4a64e6(_0x389f2b[_0x593213(0x1e1)],_0x593213(0x1f8),_0x3cc975),_0x4a64e6(_0x389f2b[_0x593213(0x1e1)],_0x593213(0x20a),_0xa92e6[_0x593213(0x23c)]['UNIVER_UNKNOWN']),_0x389f2b['UniverThreadCommentDataSourcePlugin']=_0x43b263([_0xa92e6[_0x593213(0x238)](_0x203d16[_0x593213(0x215)],_0x268431[_0x593213(0x1e2)],_0x198b16[_0x593213(0x207)]),_0x3d2c34(0x1,_0xa92e6['Inject'](_0xa92e6[_0x593213(0x1c8)])),_0x3d2c34(0x2,_0xa92e6[_0x593213(0x1e9)])],_0x389f2b[_0x593213(0x1e1)]),Object[_0x593213(0x204)](_0x389f2b,Symbol['toStringTag'],{'value':_0x593213(0x200)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.12.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.12.
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.12.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.12.3",
|
|
49
|
+
"@univerjs-pro/license": "0.12.3",
|
|
50
|
+
"@univerjs/core": "0.12.3",
|
|
51
|
+
"@univerjs/network": "0.12.3",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.12.3",
|
|
53
|
+
"@univerjs/thread-comment": "0.12.3",
|
|
54
|
+
"@univerjs/protocol": "0.1.47"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.2.
|
|
60
|
-
"vitest": "^
|
|
61
|
-
"@univerjs-infra/shared": "0.12.
|
|
59
|
+
"vite": "^7.2.4",
|
|
60
|
+
"vitest": "^4.0.14",
|
|
61
|
+
"@univerjs-infra/shared": "0.12.3"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|