@univerjs-pro/thread-comment-datasource 0.12.2 → 0.12.3-experimental.20251204-1549a8e
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 +10 -10
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 _0x34930f=_0x5ef9;(function(_0x265a4c,_0x4e8e8d){const _0x1741eb=_0x5ef9,_0xdc37c3=_0x265a4c();while(!![]){try{const _0x3d38ab=-parseInt(_0x1741eb(0xd3))/0x1+-parseInt(_0x1741eb(0x96))/0x2*(-parseInt(_0x1741eb(0xa4))/0x3)+parseInt(_0x1741eb(0x7e))/0x4*(-parseInt(_0x1741eb(0xc1))/0x5)+-parseInt(_0x1741eb(0xc3))/0x6+-parseInt(_0x1741eb(0xa1))/0x7+-parseInt(_0x1741eb(0x75))/0x8*(parseInt(_0x1741eb(0x6a))/0x9)+-parseInt(_0x1741eb(0xb4))/0xa*(-parseInt(_0x1741eb(0xb5))/0xb);if(_0x3d38ab===_0x4e8e8d)break;else _0xdc37c3['push'](_0xdc37c3['shift']());}catch(_0x6ab431){_0xdc37c3['push'](_0xdc37c3['shift']());}}}(_0x2384,0x2064f));Object[_0x34930f(0xb9)](exports,Symbol[_0x34930f(0x73)],{'value':'Module'});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=_0x34930f(0x66);var I=(_0x1d950a=>(_0x1d950a[_0x1d950a[_0x34930f(0x6d)]=0x0]=_0x34930f(0x6d),_0x1d950a[_0x1d950a[_0x34930f(0x69)]=0x1]=_0x34930f(0x69),_0x1d950a[_0x1d950a[_0x34930f(0xdc)]=-0x1]=_0x34930f(0xdc),_0x1d950a))(I||{}),v=(_0xafe83a=>(_0xafe83a[_0xafe83a[_0x34930f(0xaa)]=0x0]=_0x34930f(0xaa),_0xafe83a[_0xafe83a[_0x34930f(0xd4)]=0x1]=_0x34930f(0xd4),_0xafe83a[_0xafe83a[_0x34930f(0x89)]=0x2]='Reply',_0xafe83a[_0xafe83a[_0x34930f(0xba)]=0x3]=_0x34930f(0xba),_0xafe83a[_0xafe83a[_0x34930f(0x71)]=0x4]=_0x34930f(0x71),_0xafe83a[_0xafe83a[_0x34930f(0xdf)]=0x5]='Solve',_0xafe83a[_0xafe83a[_0x34930f(0xdc)]=-0x1]='UNRECOGNIZED',_0xafe83a))(v||{});const f=_0x165fb9=>c[_0x34930f(0xb0)](new Date(+_0x165fb9))[_0x34930f(0x78)](_0x34930f(0xca)),R=async(_0x1e5fa4,_0x2a2dbd)=>{const _0xc4337a=_0x34930f,_0x47c496=_0x1e5fa4[_0xc4337a(0x74)](c[_0xc4337a(0x76)]),_0x3d15b5=_0x1e5fa4[_0xc4337a(0x74)](P[_0xc4337a(0xa5)]);_0x2a2dbd['forEach'](_0x519b8c=>{const _0x345e7e=_0xc4337a;_0x47c496[_0x345e7e(0x7b)](_0x519b8c)&&_0x2a2dbd[_0x345e7e(0x9d)](_0x519b8c);}),_0x2a2dbd[_0xc4337a(0x92)]&&(await _0x3d15b5[_0xc4337a(0x74)](_0xc4337a(0xbc),{'params':{'userIDs':[..._0x2a2dbd]}}))['body'][_0xc4337a(0xd1)][_0xc4337a(0xc9)](_0x2650b8=>{const _0x5882ab=_0xc4337a;_0x2650b8&&_0x47c496[_0x5882ab(0x93)](_0x2650b8);});};var $=Object[_0x34930f(0x9e)],E=(_0x53e257,_0x4f4e62,_0x46f487,_0x2de7f3)=>{for(var _0x3b3a96=_0x2de7f3>0x1?void 0x0:_0x2de7f3?$(_0x4f4e62,_0x46f487):_0x4f4e62,_0x180c11=_0x53e257['length']-0x1,_0x231d31;_0x180c11>=0x0;_0x180c11--)(_0x231d31=_0x53e257[_0x180c11])&&(_0x3b3a96=_0x231d31(_0x3b3a96)||_0x3b3a96);return _0x3b3a96;},S=(_0x936dbf,_0x5357fb)=>(_0x480579,_0x448cf1)=>_0x5357fb(_0x480579,_0x448cf1,_0x936dbf);let _=class extends c[_0x34930f(0xd0)]{constructor(_0x4be9ad,_0x117b2d,_0x3d6e05,_0x1ee03b){const _0x149692=_0x34930f;super(),this[_0x149692(0xde)]=_0x4be9ad,this[_0x149692(0xbe)]=_0x117b2d,this[_0x149692(0x90)]=_0x3d6e05,this[_0x149692(0xd7)]=_0x1ee03b,this['_init'](),this[_0x149692(0x95)]();}[_0x34930f(0x95)](){const _0x4ca4fd=_0x34930f;this[_0x4ca4fd(0xae)](this[_0x4ca4fd(0xbe)][_0x4ca4fd(0xb3)][_0x4ca4fd(0xd9)](j[_0x4ca4fd(0x7f)](0x10))[_0x4ca4fd(0xc7)](_0x4a5239=>{const _0x55cec4=_0x4ca4fd,_0x4ec51b=new Set();_0x4a5239[_0x55cec4(0xc9)](_0x1be55b=>{const _0xc306d7=_0x55cec4;switch(_0x1be55b[_0xc306d7(0xa9)]){case _0xc306d7(0x65):{const _0x3dff76=_0x1be55b[_0xc306d7(0xcb)][_0xc306d7(0x7d)];_0x4ec51b[_0xc306d7(0x65)](_0x3dff76);break;}}}),R(this[_0x55cec4(0xd7)],_0x4ec51b);}));}[_0x34930f(0x77)](){const _0x2358df=_0x34930f;this[_0x2358df(0xae)](this[_0x2358df(0xde)]['commentUpdate$'][_0x2358df(0xc7)](async _0x156c3e=>{const _0x28bf9b=_0x2358df;var _0x257424,_0x34e7cc,_0x2baedf,_0x5b843a;const _0x307df5=(_0x257424=this[_0x28bf9b(0xbe)][_0x28bf9b(0xac)](_0x156c3e[_0x28bf9b(0xb8)])[_0x28bf9b(0xbb)](_0x34277d=>_0x34277d[_0x28bf9b(0x99)]===_0x156c3e[_0x28bf9b(0x99)]))==null?void 0x0:_0x257424[_0x28bf9b(0xb2)];if(!_0x307df5)return;const {unitId:_0x3add95,subUnitId:_0x3e3662}=_0x307df5;switch(_0x156c3e[_0x28bf9b(0xd6)]&&this[_0x28bf9b(0x90)][_0x28bf9b(0x93)](_0x156c3e[_0x28bf9b(0xd6)]),_0x156c3e[_0x28bf9b(0xa9)]){case v['Add']:break;case v[_0x28bf9b(0x89)]:{this['_threadCommentModel']['addComment'](_0x3add95,_0x3e3662,{'unitId':_0x3add95,'subUnitId':_0x3e3662,'ref':'','id':_0x156c3e['replyId'],'dT':f(+_0x156c3e[_0x28bf9b(0x97)]),'threadId':_0x156c3e[_0x28bf9b(0x99)],'personId':(_0x2baedf=(_0x34e7cc=_0x156c3e[_0x28bf9b(0xd6)])==null?void 0x0:_0x34e7cc[_0x28bf9b(0xb1)])!=null?_0x2baedf:_0x156c3e['userId'],'text':JSON[_0x28bf9b(0x82)](_0x156c3e['content']),'parentId':_0x307df5['id']});break;}case v[_0x28bf9b(0x71)]:{const _0x5806e7=this[_0x28bf9b(0xbe)][_0x28bf9b(0x79)](_0x3add95,_0x3e3662,_0x156c3e[_0x28bf9b(0xcd)]);_0x5806e7&&_0x5806e7[_0x28bf9b(0xd2)]&&this[_0x28bf9b(0xbe)][_0x28bf9b(0xcc)](_0x3add95,_0x3e3662,_0x156c3e['replyId']);break;}case v[_0x28bf9b(0xba)]:{this[_0x28bf9b(0xbe)][_0x28bf9b(0x86)](_0x3add95,_0x3e3662,{'commentId':_0x156c3e[_0x28bf9b(0xcd)],'text':JSON[_0x28bf9b(0x82)](_0x156c3e[_0x28bf9b(0x9b)])});break;}case v[_0x28bf9b(0xdf)]:{const _0x4ad4c7=(_0x5b843a=this['_threadCommentModel'][_0x28bf9b(0xac)](_0x156c3e['unitId'])['find'](_0x2fc3bf=>_0x2fc3bf[_0x28bf9b(0x99)]===_0x156c3e[_0x28bf9b(0x99)]))==null?void 0x0:_0x5b843a['root'];_0x4ad4c7&&this[_0x28bf9b(0xbe)][_0x28bf9b(0x8b)](_0x3add95,_0x3e3662,_0x4ad4c7['id'],_0x156c3e[_0x28bf9b(0xa0)]===I[_0x28bf9b(0x69)]);break;}}}));}};function _0x2384(){const _0x5523fa=['requireSession','OpenOrReOpen','onReady','Injector','/list','Delete','ThreadCommentModel','toStringTag','get','909080NzMJBP','UserManagerService','_init','format','getComment','body','getUser','_threadCommentDataSource','personId','316xuqjdJ','bufferTime','CollaborationSessionService','replies','parse','rangeType','_httpService','/delete','updateComment','saveCommentToSnapshot','/universer-api/comment/unit/','Reply','thread-comment-data-source.config','resolveComment','comment','listComments','getCurrentUser','map','_userService','rangeId','size','addUser','_configService','_initUserSync','182KaSIIy','createTimestamp','_sessionService','threadId','_threadCommentDataSourceService','content','resolved','delete','getOwnPropertyDescriptor','syncUpdateMutationToColla','solved','675402eLPuOn','stringify','customRanges','7455kRLUCH','HTTPService','/reply','COMMENT','filter','type','Unknown','symbol','getUnit','length','disposeWithMe','getMemberID','dayjs','userID','root','commentUpdate$','97670owHzZm','594vNJIhz','comments','onStarting','unitId','defineProperty','Edit','find','/universer-api/user/list','_config','_threadCommentModel','addComment','UNIVER_UNKNOWN','5315DpNKoP','code','449244oSHaWq','error','Inject','IConfigService','subscribe','UniverThreadCommentDataSourcePlugin','forEach','YYYY/MM/DD\x20HH:mm','payload','deleteComment','replyId','/add','merge','Disposable','users','parentId','138259cYEsWF','Add','CommentService','user','_injector','CustomRangeType','pipe','UniverThreadCommentUIPlugin','post','UNRECOGNIZED','reply','_commentService','Solve','Plugin','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','_initDataSource','Solved','18FTkDTQ','setConfig'];_0x2384=function(){return _0x5523fa;};return _0x2384();}_=E([S(0x0,c['Inject'](b[_0x34930f(0xd5)])),S(0x1,c[_0x34930f(0xc5)](M[_0x34930f(0x72)])),S(0x2,c[_0x34930f(0xc5)](c[_0x34930f(0x76)])),S(0x3,c[_0x34930f(0xc5)](c[_0x34930f(0x6f)]))],_);const q=_0x34930f(0x8a),D={};var A=Object[_0x34930f(0x9e)],x=(_0x104071,_0x196fc3,_0x261e9d,_0x14b53f)=>{const _0x275b10=_0x34930f;for(var _0x45193c=_0x14b53f>0x1?void 0x0:_0x14b53f?A(_0x196fc3,_0x261e9d):_0x196fc3,_0x32266f=_0x104071[_0x275b10(0xad)]-0x1,_0x55224f;_0x32266f>=0x0;_0x32266f--)(_0x55224f=_0x104071[_0x32266f])&&(_0x45193c=_0x55224f(_0x45193c)||_0x45193c);return _0x45193c;},C=(_0x45046e,_0x5cd572)=>(_0x6bcbcb,_0x443ab8)=>_0x5cd572(_0x6bcbcb,_0x443ab8,_0x45046e);function Y(_0x1c6a2c,_0x5285ec){const _0x4e71bf=_0x34930f,_0x2e2d63=_0x1c6a2c[_0x4e71bf(0x81)][0x0];return{..._0x5285ec,'id':_0x2e2d63['replyId'],'resolved':_0x1c6a2c[_0x4e71bf(0xa0)]===0x1,'dT':f(_0x2e2d63[_0x4e71bf(0x97)]),'personId':_0x2e2d63[_0x4e71bf(0x67)],'threadId':_0x2e2d63[_0x4e71bf(0x99)]};}function G(_0x254596,_0x9f09db,_0x19d800){const _0x5d6d7e=_0x34930f;var _0x23499c,_0x204be2;if(((_0x204be2=(_0x23499c=_0x254596==null?void 0x0:_0x254596['replies'])==null?void 0x0:_0x23499c[_0x5d6d7e(0xad)])!=null?_0x204be2:0x0)>0x0){const _0x5c0aaa=(_0x5b28a1,_0xa7ee8)=>({'id':_0x5b28a1[_0x5d6d7e(0xcd)],'threadId':_0x5b28a1[_0x5d6d7e(0x99)],'dT':f(_0x5b28a1[_0x5d6d7e(0x97)]),'personId':_0x5b28a1['userId'],'resolved':_0x254596[_0x5d6d7e(0xa0)]===I[_0x5d6d7e(0x69)],'unitId':_0x9f09db,'subUnitId':_0x19d800,'text':JSON[_0x5d6d7e(0x82)](_0x5b28a1[_0x5d6d7e(0x9b)]),'parentId':_0xa7ee8}),_0x473a26=_0x5c0aaa(_0x254596[_0x5d6d7e(0x81)][0x0]);return{..._0x473a26,'children':_0x254596[_0x5d6d7e(0x81)]['slice'](0x1)[_0x5d6d7e(0x8f)](_0x1ff6f0=>_0x5c0aaa(_0x1ff6f0,_0x473a26['id']))};}return null;}let p=class{constructor(_0x2c4493,_0x172a0f,_0xac1cba){const _0x58a8c8=_0x34930f;this[_0x58a8c8(0x84)]=_0x2c4493,this[_0x58a8c8(0x90)]=_0x172a0f,this[_0x58a8c8(0x98)]=_0xac1cba;}async[_0x34930f(0xbf)](_0x183007){const _0x51dfc0=_0x34930f;var _0xaa8c66,_0x54fb2f;const {parentId:_0x29e38b,unitId:_0x306def,text:_0x447b26,threadId:_0xc655ec}=_0x183007,_0xb9bd8d=(_0x54fb2f=(_0xaa8c66=_0x447b26[_0x51dfc0(0xa3)])==null?void 0x0:_0xaa8c66['filter'](_0x4aa7e0=>_0x4aa7e0[_0x51dfc0(0x83)]===c[_0x51dfc0(0xd8)][_0x51dfc0(0xa7)])[_0x51dfc0(0x8f)](_0xdf0fca=>_0xdf0fca[_0x51dfc0(0x91)]))!=null?_0x54fb2f:[],_0x2249d2=JSON[_0x51dfc0(0xa2)](_0x447b26),_0x14814b=(await this[_0x51dfc0(0x98)]['requireSession'](_0x306def))[_0x51dfc0(0xaf)]();if(_0x29e38b){const _0x26dab7={'memberId':_0x14814b,'unitId':_0x306def,'content':_0x2249d2,'mention':_0xb9bd8d,'threadId':_0xc655ec},_0x22755a=(await this[_0x51dfc0(0x84)]['post'](_0x51dfc0(0x88)+_0x306def+_0x51dfc0(0xa6),{'body':_0x26dab7}))[_0x51dfc0(0x7a)][_0x51dfc0(0xdd)];return{..._0x183007,'id':_0x22755a[_0x51dfc0(0xcd)],'dT':c[_0x51dfc0(0xb0)](+_0x22755a[_0x51dfc0(0x97)])[_0x51dfc0(0x78)](_0x51dfc0(0xca)),'personId':_0x22755a[_0x51dfc0(0x67)]};}else{const _0x203f95={'memberId':_0x14814b,'unitId':_0x306def,'content':_0x2249d2,'mention':_0xb9bd8d},_0x300084=await this[_0x51dfc0(0x84)][_0x51dfc0(0xdb)]('/universer-api/comment/unit/'+_0x306def+_0x51dfc0(0xce),{'body':_0x203f95});return Y(_0x300084[_0x51dfc0(0x7a)][_0x51dfc0(0x8c)],_0x183007);}}async[_0x34930f(0x86)](_0x5eeda0){const _0x485dbc=_0x34930f;var _0x154938,_0x1898ec;const {text:_0x54339c,unitId:_0x46929c}=_0x5eeda0,_0x2dcb7a=(_0x1898ec=(_0x154938=_0x54339c[_0x485dbc(0xa3)])==null?void 0x0:_0x154938[_0x485dbc(0xa8)](_0x19e9ac=>_0x19e9ac[_0x485dbc(0x83)]===c[_0x485dbc(0xd8)][_0x485dbc(0xa7)])[_0x485dbc(0x8f)](_0x27d652=>_0x27d652['rangeId']))!=null?_0x1898ec:[],_0x4c42ae=JSON['stringify'](_0x54339c),_0x5ac114=_0x5eeda0[_0x485dbc(0x99)],_0x6c18b1=_0x5eeda0['id'],_0x4ccf38={'memberId':(await this[_0x485dbc(0x98)][_0x485dbc(0x6c)](_0x46929c))[_0x485dbc(0xaf)](),'unitId':_0x46929c,'threadId':_0x5ac114,'mention':_0x2dcb7a,'content':_0x4c42ae,'replyId':_0x6c18b1},_0x3c6ae3=await this['_httpService'][_0x485dbc(0xdb)]('/universer-api/comment/unit/'+_0x46929c+'/edit',{'body':_0x4ccf38});return!_0x3c6ae3[_0x485dbc(0x7a)][_0x485dbc(0xc4)]||_0x3c6ae3[_0x485dbc(0x7a)][_0x485dbc(0xc4)][_0x485dbc(0xc2)]===0x1;}async[_0x34930f(0x8b)](_0x2439aa){const _0x4bcfbf=_0x34930f,{unitId:_0x1ad332}=_0x2439aa,_0x288c8a=_0x2439aa['threadId'],_0x97f008={'memberId':this['_userService'][_0x4bcfbf(0x8e)]()[_0x4bcfbf(0xb1)],'unitId':_0x1ad332,'threadId':_0x288c8a,'solved':_0x2439aa[_0x4bcfbf(0x9c)]?I[_0x4bcfbf(0x69)]:I[_0x4bcfbf(0x6d)]},_0x3d95fa=await this[_0x4bcfbf(0x84)]['post'](_0x4bcfbf(0x88)+_0x1ad332+'/solved',{'body':_0x97f008});return!_0x3d95fa['body'][_0x4bcfbf(0xc4)]||_0x3d95fa[_0x4bcfbf(0x7a)][_0x4bcfbf(0xc4)][_0x4bcfbf(0xc2)]===0x1;}async[_0x34930f(0xcc)](_0x12dc68,_0x3e4906,_0xa28ae4,_0x521454){const _0x27bd53=_0x34930f,_0x1acd47={'memberId':(await this[_0x27bd53(0x98)][_0x27bd53(0x6c)](_0x12dc68))[_0x27bd53(0xaf)](),'threadId':_0xa28ae4,'replyId':_0x521454,'unitId':_0x12dc68},_0x52c096=await this[_0x27bd53(0x84)][_0x27bd53(0xdb)](_0x27bd53(0x88)+_0x12dc68+_0x27bd53(0x85),{'body':_0x1acd47});return!_0x52c096['body'][_0x27bd53(0xc4)]||_0x52c096[_0x27bd53(0x7a)][_0x27bd53(0xc4)]['code']===0x1;}async[_0x34930f(0x8d)](_0x35a23f,_0x1d7e45,_0x1b9031){const _0x2b995b=_0x34930f,_0x31295b={'unitId':_0x35a23f,'threadId':_0x1b9031},_0x2996e5=await this[_0x2b995b(0x84)]['post'](_0x2b995b(0x88)+_0x35a23f+_0x2b995b(0x70),{'body':_0x31295b}),_0x3ac41b=_0x1b9031[_0x2b995b(0x8f)](_0xaf1911=>G(_0x2996e5[_0x2b995b(0x7a)][_0x2b995b(0xb6)][_0xaf1911],_0x35a23f,_0x1d7e45))['filter'](Boolean);return Object['values'](_0x2996e5[_0x2b995b(0x7a)]['users'])[_0x2b995b(0xc9)](_0x1b76b0=>{const _0x359937=_0x2b995b;this[_0x359937(0x90)][_0x359937(0x93)](_0x1b76b0);}),_0x3ac41b;}[_0x34930f(0x87)](_0x5c444b){return{'id':_0x5c444b['id'],'threadId':_0x5c444b['threadId'],'ref':_0x5c444b['ref']};}};p=x([C(0x0,c[_0x34930f(0xc5)](P['HTTPService'])),C(0x1,c['Inject'](c[_0x34930f(0x76)])),C(0x2,c[_0x34930f(0xc5)](b[_0x34930f(0x80)]))],p);var H=Object[_0x34930f(0x9e)],J=(_0xbf8a55,_0x56ac3b,_0x533b01,_0x5052df)=>{const _0x9e957d=_0x34930f;for(var _0x455b8f=_0x5052df>0x1?void 0x0:_0x5052df?H(_0x56ac3b,_0x533b01):_0x56ac3b,_0x68d6f7=_0xbf8a55[_0x9e957d(0xad)]-0x1,_0x4358a8;_0x68d6f7>=0x0;_0x68d6f7--)(_0x4358a8=_0xbf8a55[_0x68d6f7])&&(_0x455b8f=_0x4358a8(_0x455b8f)||_0x455b8f);return _0x455b8f;},y=(_0x2b385a,_0x2b7a3a)=>(_0x4bd218,_0x56cf90)=>_0x2b7a3a(_0x4bd218,_0x56cf90,_0x2b385a);let g=class extends c['Disposable']{constructor(_0x51d58a,_0x57083f){const _0x5b01ac=_0x34930f;super(),this[_0x5b01ac(0x9a)]=_0x51d58a,this['_threadCommentDataSource']=_0x57083f,this[_0x5b01ac(0x68)]();}[_0x34930f(0x68)](){const _0x115bcb=_0x34930f;this[_0x115bcb(0x9a)]['dataSource']=this[_0x115bcb(0x7c)],this[_0x115bcb(0x9a)][_0x115bcb(0x9f)]=!0x1;}};function _0x5ef9(_0x592789,_0x2f0d59){_0x592789=_0x592789-0x64;const _0x2384c4=_0x2384();let _0x5ef9ce=_0x2384c4[_0x592789];return _0x5ef9ce;}g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x34930f(0xb9)],L=Object[_0x34930f(0x9e)],Z=(_0xd6c83a,_0x317376,_0x216683)=>_0x317376 in _0xd6c83a?F(_0xd6c83a,_0x317376,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x216683}):_0xd6c83a[_0x317376]=_0x216683,W=(_0x5b0324,_0x5b5546,_0x15fa06,_0x28a8ff)=>{const _0x2b855f=_0x34930f;for(var _0x45e4a0=_0x28a8ff>0x1?void 0x0:_0x28a8ff?L(_0x5b5546,_0x15fa06):_0x5b5546,_0xf8edda=_0x5b0324[_0x2b855f(0xad)]-0x1,_0x544144;_0xf8edda>=0x0;_0xf8edda--)(_0x544144=_0x5b0324[_0xf8edda])&&(_0x45e4a0=_0x544144(_0x45e4a0)||_0x45e4a0);return _0x45e4a0;},O=(_0x1b28c1,_0x216dea)=>(_0x452a55,_0x5bf13c)=>_0x216dea(_0x452a55,_0x5bf13c,_0x1b28c1),N=(_0xda4847,_0x31c5d6,_0x3e02da)=>Z(_0xda4847,typeof _0x31c5d6!=_0x34930f(0xab)?_0x31c5d6+'':_0x31c5d6,_0x3e02da);exports[_0x34930f(0xc8)]=class extends c[_0x34930f(0x64)]{constructor(_0x5bf190=D,_0x57bb17,_0x4cc3f4){const _0x353652=_0x34930f;super(),this[_0x353652(0xbd)]=_0x5bf190,this[_0x353652(0xd7)]=_0x57bb17,this[_0x353652(0x94)]=_0x4cc3f4;const {..._0x212b2a}=c[_0x353652(0xcf)]({},D,this['_config']);this[_0x353652(0x94)][_0x353652(0x6b)](q,_0x212b2a);}[_0x34930f(0xb7)](){[[p],[g],[_]]['forEach'](_0x447cd3=>{const _0x79ff0a=_0x5ef9;this[_0x79ff0a(0xd7)]['add'](_0x447cd3);});}[_0x34930f(0x6e)](){const _0x10f4d8=_0x34930f;this[_0x10f4d8(0xd7)][_0x10f4d8(0x74)](g),this['_injector'][_0x10f4d8(0x74)](_);}},N(exports[_0x34930f(0xc8)],'pluginName',U),N(exports[_0x34930f(0xc8)],_0x34930f(0xa9),c['UniverInstanceType'][_0x34930f(0xc0)]),exports[_0x34930f(0xc8)]=W([c['DependentOn'](w[_0x34930f(0xda)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x34930f(0xc5)](c[_0x34930f(0x6f)])),O(0x2,c[_0x34930f(0xc6)])],exports[_0x34930f(0xc8)]);
|
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 _0x22398f=_0x5040;(function(_0x4f4b28,_0x34ad62){const _0x39767b=_0x5040,_0x60b83c=_0x4f4b28();while(!![]){try{const _0x12d028=parseInt(_0x39767b(0x12c))/0x1+parseInt(_0x39767b(0x13a))/0x2+parseInt(_0x39767b(0x109))/0x3*(parseInt(_0x39767b(0x110))/0x4)+-parseInt(_0x39767b(0x11f))/0x5*(parseInt(_0x39767b(0x12f))/0x6)+-parseInt(_0x39767b(0x162))/0x7+parseInt(_0x39767b(0x121))/0x8+parseInt(_0x39767b(0x104))/0x9;if(_0x12d028===_0x34ad62)break;else _0x60b83c['push'](_0x60b83c['shift']());}catch(_0xa72ccb){_0x60b83c['push'](_0x60b83c['shift']());}}}(_0x2ecd,0xe9a5d));import{CommentService as _0x4c6e3d,CollaborationSessionService as _0x369ee5,UniverCollaborationClientPlugin as _0x425f68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32b697}from'@univerjs-pro/license';import{dayjs as _0x595bba,UserManagerService as _0x65ef30,Inject as _0x38c346,Injector as _0x52b3d9,Disposable as _0x3b5549,CustomRangeType as _0x54fedc,UniverInstanceType as _0x49c8b7,DependentOn as _0x3ddd01,IConfigService as _0x3b7d40,Plugin as _0x5eca17,merge as _0x492394}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59c59f}from'@univerjs/thread-comment-ui';function _0x2ecd(){const _0x3e5ae1=['Reply','dataSource','getUser','_httpService','28uDRxFR','Add','defineProperty','reply','_injector','type','listComments','code','rangeId','deleteComment','addUser','onReady','_initDataSource','setConfig','replies','5BYdBAV','addComment','1027776GzcVbv','rangeType','YYYY/MM/DD\x20HH:mm','getMemberID','_threadCommentDataSource','threadId','_initUserSync','replyId','solved','find','/list','17270MkHgCn','parse','payload','2339646MtgcLz','updateComment','getCurrentUser','getOwnPropertyDescriptor','thread-comment-data-source.config','users','post','length','comment','_threadCommentModel','ref','2643554pxiFct','format','body','_init','user','comments','getComment','symbol','error','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','map','_configService','subscribe','forEach','_config','UNIVER_UNKNOWN','/delete','add','Solve','commentUpdate$','getUnit','customRanges','UNRECOGNIZED','/universer-api/comment/unit/','_sessionService','syncUpdateMutationToColla','get','resolveComment','disposeWithMe','values','_commentService','filter','/edit','/add','Delete','Edit','root','_threadCommentDataSourceService','7984550gtQcpH','onStarting','_userService','/reply','stringify','createTimestamp','userId','5742171dsGEdG','Unknown','requireSession','content','COMMENT','163746acrWSf','OpenOrReOpen','Solved'];_0x2ecd=function(){return _0x3e5ae1;};return _0x2ecd();}import{ThreadCommentModel as _0x17e0dc,IThreadCommentDataSourceService as _0x68d5e8}from'@univerjs/thread-comment';import{bufferTime as _0x5f4227}from'rxjs';import{HTTPService as _0x17fd7c}from'@univerjs/network';const W=_0x22398f(0x144);var I=(_0x84c901=>(_0x84c901[_0x84c901['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x84c901[_0x84c901['Solved']=0x1]=_0x22398f(0x10b),_0x84c901[_0x84c901['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x84c901))(I||{}),v=(_0x806411=>(_0x806411[_0x806411['Unknown']=0x0]=_0x22398f(0x105),_0x806411[_0x806411[_0x22398f(0x111)]=0x1]=_0x22398f(0x111),_0x806411[_0x806411['Reply']=0x2]=_0x22398f(0x10c),_0x806411[_0x806411['Edit']=0x3]=_0x22398f(0x15f),_0x806411[_0x806411[_0x22398f(0x15e)]=0x4]='Delete',_0x806411[_0x806411[_0x22398f(0x14e)]=0x5]=_0x22398f(0x14e),_0x806411[_0x806411['UNRECOGNIZED']=-0x1]=_0x22398f(0x152),_0x806411))(v||{});const y=_0x30f352=>_0x595bba(new Date(+_0x30f352))[_0x22398f(0x13b)](_0x22398f(0x123)),B=async(_0x2d8c9e,_0x42e202)=>{const _0x1e3161=_0x22398f,_0x2f00b5=_0x2d8c9e[_0x1e3161(0x156)](_0x65ef30),_0x289847=_0x2d8c9e[_0x1e3161(0x156)](_0x17fd7c);_0x42e202[_0x1e3161(0x149)](_0x29423c=>{const _0x148819=_0x1e3161;_0x2f00b5[_0x148819(0x10e)](_0x29423c)&&_0x42e202['delete'](_0x29423c);}),_0x42e202['size']&&(await _0x289847[_0x1e3161(0x156)]('/universer-api/user/list',{'params':{'userIDs':[..._0x42e202]}}))[_0x1e3161(0x13c)][_0x1e3161(0x134)][_0x1e3161(0x149)](_0x3f32ac=>{const _0x5645bf=_0x1e3161;_0x3f32ac&&_0x2f00b5[_0x5645bf(0x11a)](_0x3f32ac);});};var K=Object[_0x22398f(0x132)],V=(_0xd7d72b,_0x25cbb6,_0x26c574,_0x5b1f7b)=>{const _0x4acb0c=_0x22398f;for(var _0xa6e13c=_0x5b1f7b>0x1?void 0x0:_0x5b1f7b?K(_0x25cbb6,_0x26c574):_0x25cbb6,_0x31031a=_0xd7d72b[_0x4acb0c(0x136)]-0x1,_0x18b925;_0x31031a>=0x0;_0x31031a--)(_0x18b925=_0xd7d72b[_0x31031a])&&(_0xa6e13c=_0x18b925(_0xa6e13c)||_0xa6e13c);return _0xa6e13c;},p=(_0x453677,_0x36fd14)=>(_0x5badfb,_0x3e7757)=>_0x36fd14(_0x5badfb,_0x3e7757,_0x453677);let _=class extends _0x3b5549{constructor(_0x2b7def,_0x5904e4,_0x366d8e,_0x26f235){const _0x524003=_0x22398f;super(),this[_0x524003(0x15a)]=_0x2b7def,this['_threadCommentModel']=_0x5904e4,this['_userService']=_0x366d8e,this['_injector']=_0x26f235,this[_0x524003(0x13d)](),this[_0x524003(0x127)]();}['_initUserSync'](){const _0x167044=_0x22398f;this[_0x167044(0x158)](this[_0x167044(0x138)][_0x167044(0x14f)]['pipe'](_0x5f4227(0x10))[_0x167044(0x148)](_0x87f92e=>{const _0x2c57a3=_0x167044,_0xd880b0=new Set();_0x87f92e[_0x2c57a3(0x149)](_0x50d7ab=>{const _0x2e3680=_0x2c57a3;switch(_0x50d7ab['type']){case _0x2e3680(0x14d):{const _0x2bc49e=_0x50d7ab[_0x2e3680(0x12e)]['personId'];_0xd880b0[_0x2e3680(0x14d)](_0x2bc49e);break;}}}),B(this['_injector'],_0xd880b0);}));}[_0x22398f(0x13d)](){const _0x1d2ff5=_0x22398f;this[_0x1d2ff5(0x158)](this[_0x1d2ff5(0x15a)][_0x1d2ff5(0x14f)][_0x1d2ff5(0x148)](async _0x1b7d9a=>{const _0x3dc995=_0x1d2ff5;var _0x57d41e,_0x377d1f,_0x5e01ae,_0x86516;const _0x278759=(_0x57d41e=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])[_0x3dc995(0x12a)](_0x561be0=>_0x561be0[_0x3dc995(0x126)]===_0x1b7d9a[_0x3dc995(0x126)]))==null?void 0x0:_0x57d41e[_0x3dc995(0x160)];if(!_0x278759)return;const {unitId:_0x4fe0cf,subUnitId:_0x3df732}=_0x278759;switch(_0x1b7d9a[_0x3dc995(0x13e)]&&this[_0x3dc995(0x164)]['addUser'](_0x1b7d9a[_0x3dc995(0x13e)]),_0x1b7d9a[_0x3dc995(0x115)]){case v[_0x3dc995(0x111)]:break;case v['Reply']:{this[_0x3dc995(0x138)][_0x3dc995(0x120)](_0x4fe0cf,_0x3df732,{'unitId':_0x4fe0cf,'subUnitId':_0x3df732,'ref':'','id':_0x1b7d9a[_0x3dc995(0x128)],'dT':y(+_0x1b7d9a['createTimestamp']),'threadId':_0x1b7d9a['threadId'],'personId':(_0x5e01ae=(_0x377d1f=_0x1b7d9a[_0x3dc995(0x13e)])==null?void 0x0:_0x377d1f['userID'])!=null?_0x5e01ae:_0x1b7d9a[_0x3dc995(0x103)],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content']),'parentId':_0x278759['id']});break;}case v[_0x3dc995(0x15e)]:{const _0xc604e5=this[_0x3dc995(0x138)][_0x3dc995(0x140)](_0x4fe0cf,_0x3df732,_0x1b7d9a['replyId']);_0xc604e5&&_0xc604e5['parentId']&&this[_0x3dc995(0x138)]['deleteComment'](_0x4fe0cf,_0x3df732,_0x1b7d9a[_0x3dc995(0x128)]);break;}case v[_0x3dc995(0x15f)]:{this['_threadCommentModel'][_0x3dc995(0x130)](_0x4fe0cf,_0x3df732,{'commentId':_0x1b7d9a['replyId'],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content'])});break;}case v['Solve']:{const _0x3f593e=(_0x86516=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])['find'](_0x66ac4=>_0x66ac4['threadId']===_0x1b7d9a['threadId']))==null?void 0x0:_0x86516['root'];_0x3f593e&&this[_0x3dc995(0x138)]['resolveComment'](_0x4fe0cf,_0x3df732,_0x3f593e['id'],_0x1b7d9a[_0x3dc995(0x129)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x38c346(_0x4c6e3d)),p(0x1,_0x38c346(_0x17e0dc)),p(0x2,_0x38c346(_0x65ef30)),p(0x3,_0x38c346(_0x52b3d9))],_);const z=_0x22398f(0x133),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x119214,_0x28bfee,_0x46b6d9,_0x3c1f98)=>{const _0x4ec814=_0x22398f;for(var _0x32f81c=_0x3c1f98>0x1?void 0x0:_0x3c1f98?k(_0x28bfee,_0x46b6d9):_0x28bfee,_0x4aad35=_0x119214[_0x4ec814(0x136)]-0x1,_0x4891e6;_0x4aad35>=0x0;_0x4aad35--)(_0x4891e6=_0x119214[_0x4aad35])&&(_0x32f81c=_0x4891e6(_0x32f81c)||_0x32f81c);return _0x32f81c;},b=(_0x25040b,_0x386058)=>(_0xe9e97,_0x48a07a)=>_0x386058(_0xe9e97,_0x48a07a,_0x25040b);function X(_0x957d27,_0x27b115){const _0x297ebb=_0x22398f,_0x19508a=_0x957d27[_0x297ebb(0x11e)][0x0];return{..._0x27b115,'id':_0x19508a[_0x297ebb(0x128)],'resolved':_0x957d27['solved']===0x1,'dT':y(_0x19508a['createTimestamp']),'personId':_0x19508a['userId'],'threadId':_0x19508a[_0x297ebb(0x126)]};}function ee(_0x26415c,_0x3ea2e6,_0x35cfc8){const _0x996f7e=_0x22398f;var _0x25858a,_0x37b8c2;if(((_0x37b8c2=(_0x25858a=_0x26415c==null?void 0x0:_0x26415c[_0x996f7e(0x11e)])==null?void 0x0:_0x25858a['length'])!=null?_0x37b8c2:0x0)>0x0){const _0x1eed74=(_0x2a15af,_0xd67f88)=>({'id':_0x2a15af[_0x996f7e(0x128)],'threadId':_0x2a15af['threadId'],'dT':y(_0x2a15af[_0x996f7e(0x167)]),'personId':_0x2a15af[_0x996f7e(0x103)],'resolved':_0x26415c[_0x996f7e(0x129)]===I[_0x996f7e(0x10b)],'unitId':_0x3ea2e6,'subUnitId':_0x35cfc8,'text':JSON[_0x996f7e(0x12d)](_0x2a15af[_0x996f7e(0x107)]),'parentId':_0xd67f88}),_0x839f48=_0x1eed74(_0x26415c[_0x996f7e(0x11e)][0x0]);return{..._0x839f48,'children':_0x26415c['replies']['slice'](0x1)[_0x996f7e(0x146)](_0x106235=>_0x1eed74(_0x106235,_0x839f48['id']))};}return null;}let S=class{constructor(_0xead164,_0x3140d6,_0x21a18b){const _0x50f2e8=_0x22398f;this[_0x50f2e8(0x10f)]=_0xead164,this['_userService']=_0x3140d6,this['_sessionService']=_0x21a18b;}async[_0x22398f(0x120)](_0xfd4413){const _0x39c1c2=_0x22398f;var _0x58771c,_0x283feb;const {parentId:_0x43d403,unitId:_0x540d64,text:_0x2999aa,threadId:_0x387a0b}=_0xfd4413,_0x18c856=(_0x283feb=(_0x58771c=_0x2999aa[_0x39c1c2(0x151)])==null?void 0x0:_0x58771c['filter'](_0x235baa=>_0x235baa['rangeType']===_0x54fedc[_0x39c1c2(0x108)])['map'](_0x1cf657=>_0x1cf657[_0x39c1c2(0x118)]))!=null?_0x283feb:[],_0x19fc66=JSON[_0x39c1c2(0x166)](_0x2999aa),_0x6a3080=(await this[_0x39c1c2(0x154)][_0x39c1c2(0x106)](_0x540d64))['getMemberID']();if(_0x43d403){const _0x24f808={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856,'threadId':_0x387a0b},_0x35fa9d=(await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x165),{'body':_0x24f808}))['body'][_0x39c1c2(0x113)];return{..._0xfd4413,'id':_0x35fa9d[_0x39c1c2(0x128)],'dT':_0x595bba(+_0x35fa9d[_0x39c1c2(0x167)])[_0x39c1c2(0x13b)](_0x39c1c2(0x123)),'personId':_0x35fa9d['userId']};}else{const _0x1b6da5={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856},_0x8ee2a1=await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x15d),{'body':_0x1b6da5});return X(_0x8ee2a1['body'][_0x39c1c2(0x137)],_0xfd4413);}}async[_0x22398f(0x130)](_0x2d7d26){const _0x55e1b8=_0x22398f;var _0x31a5c5,_0x54559f;const {text:_0x2ed0cc,unitId:_0xefaa95}=_0x2d7d26,_0x12ba40=(_0x54559f=(_0x31a5c5=_0x2ed0cc[_0x55e1b8(0x151)])==null?void 0x0:_0x31a5c5[_0x55e1b8(0x15b)](_0x166f18=>_0x166f18[_0x55e1b8(0x122)]===_0x54fedc[_0x55e1b8(0x108)])['map'](_0x54a5e6=>_0x54a5e6['rangeId']))!=null?_0x54559f:[],_0x56af7=JSON[_0x55e1b8(0x166)](_0x2ed0cc),_0x19a079=_0x2d7d26[_0x55e1b8(0x126)],_0x58a80c=_0x2d7d26['id'],_0x4a9d16={'memberId':(await this[_0x55e1b8(0x154)][_0x55e1b8(0x106)](_0xefaa95))[_0x55e1b8(0x124)](),'unitId':_0xefaa95,'threadId':_0x19a079,'mention':_0x12ba40,'content':_0x56af7,'replyId':_0x58a80c},_0x31e128=await this[_0x55e1b8(0x10f)][_0x55e1b8(0x135)](_0x55e1b8(0x153)+_0xefaa95+_0x55e1b8(0x15c),{'body':_0x4a9d16});return!_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)]||_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)][_0x55e1b8(0x117)]===0x1;}async[_0x22398f(0x157)](_0x14b3ef){const _0x549c35=_0x22398f,{unitId:_0x805ce4}=_0x14b3ef,_0xa0fdbd=_0x14b3ef[_0x549c35(0x126)],_0x28fcca={'memberId':this[_0x549c35(0x164)][_0x549c35(0x131)]()['userID'],'unitId':_0x805ce4,'threadId':_0xa0fdbd,'solved':_0x14b3ef[_0x549c35(0x145)]?I[_0x549c35(0x10b)]:I[_0x549c35(0x10a)]},_0x389a26=await this[_0x549c35(0x10f)][_0x549c35(0x135)](_0x549c35(0x153)+_0x805ce4+'/solved',{'body':_0x28fcca});return!_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)]||_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)][_0x549c35(0x117)]===0x1;}async[_0x22398f(0x119)](_0x55f35b,_0x552a0a,_0x5f366a,_0x2a0af3){const _0x28a78c=_0x22398f,_0x58f45e={'memberId':(await this[_0x28a78c(0x154)]['requireSession'](_0x55f35b))['getMemberID'](),'threadId':_0x5f366a,'replyId':_0x2a0af3,'unitId':_0x55f35b},_0x52b6d2=await this[_0x28a78c(0x10f)][_0x28a78c(0x135)](_0x28a78c(0x153)+_0x55f35b+_0x28a78c(0x14c),{'body':_0x58f45e});return!_0x52b6d2['body'][_0x28a78c(0x142)]||_0x52b6d2[_0x28a78c(0x13c)]['error'][_0x28a78c(0x117)]===0x1;}async[_0x22398f(0x116)](_0x5b871d,_0xc2a3f7,_0x33c314){const _0x590f42=_0x22398f,_0x45cdd8={'unitId':_0x5b871d,'threadId':_0x33c314},_0x3f63f5=await this[_0x590f42(0x10f)][_0x590f42(0x135)](_0x590f42(0x153)+_0x5b871d+_0x590f42(0x12b),{'body':_0x45cdd8}),_0x97d513=_0x33c314[_0x590f42(0x146)](_0x272bae=>ee(_0x3f63f5['body'][_0x590f42(0x13f)][_0x272bae],_0x5b871d,_0xc2a3f7))[_0x590f42(0x15b)](Boolean);return Object[_0x590f42(0x159)](_0x3f63f5[_0x590f42(0x13c)][_0x590f42(0x134)])[_0x590f42(0x149)](_0x26bbd1=>{const _0x526b63=_0x590f42;this[_0x526b63(0x164)][_0x526b63(0x11a)](_0x26bbd1);}),_0x97d513;}['saveCommentToSnapshot'](_0x13f30b){const _0x2486e2=_0x22398f;return{'id':_0x13f30b['id'],'threadId':_0x13f30b[_0x2486e2(0x126)],'ref':_0x13f30b[_0x2486e2(0x139)]};}};S=Q([b(0x0,_0x38c346(_0x17fd7c)),b(0x1,_0x38c346(_0x65ef30)),b(0x2,_0x38c346(_0x369ee5))],S);var re=Object[_0x22398f(0x132)],te=(_0x2c0b48,_0x17afed,_0x52a24a,_0x140cfe)=>{for(var _0x403a0e=_0x140cfe>0x1?void 0x0:_0x140cfe?re(_0x17afed,_0x52a24a):_0x17afed,_0x3b2bc4=_0x2c0b48['length']-0x1,_0x5d6194;_0x3b2bc4>=0x0;_0x3b2bc4--)(_0x5d6194=_0x2c0b48[_0x3b2bc4])&&(_0x403a0e=_0x5d6194(_0x403a0e)||_0x403a0e);return _0x403a0e;},M=(_0x27b2a8,_0x526449)=>(_0xbddc3c,_0x45e71e)=>_0x526449(_0xbddc3c,_0x45e71e,_0x27b2a8);let f=class extends _0x3b5549{constructor(_0x1e3131,_0x8608f4){const _0x4b9011=_0x22398f;super(),this[_0x4b9011(0x161)]=_0x1e3131,this[_0x4b9011(0x125)]=_0x8608f4,this['_initDataSource']();}[_0x22398f(0x11c)](){const _0x4e886f=_0x22398f;this[_0x4e886f(0x161)][_0x4e886f(0x10d)]=this[_0x4e886f(0x125)],this['_threadCommentDataSourceService'][_0x4e886f(0x155)]=!0x1;}};f=te([M(0x0,_0x68d5e8),M(0x1,_0x38c346(S))],f);var se=Object[_0x22398f(0x112)],oe=Object[_0x22398f(0x132)],ne=(_0x5e0769,_0xad133f,_0x4db905)=>_0xad133f in _0x5e0769?se(_0x5e0769,_0xad133f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4db905}):_0x5e0769[_0xad133f]=_0x4db905,ie=(_0x5a2d6f,_0x5d6b9d,_0x53b5cb,_0x1cfdf8)=>{for(var _0x14d267=_0x1cfdf8>0x1?void 0x0:_0x1cfdf8?oe(_0x5d6b9d,_0x53b5cb):_0x5d6b9d,_0x4929f0=_0x5a2d6f['length']-0x1,_0x1ae553;_0x4929f0>=0x0;_0x4929f0--)(_0x1ae553=_0x5a2d6f[_0x4929f0])&&(_0x14d267=_0x1ae553(_0x14d267)||_0x14d267);return _0x14d267;},N=(_0x3bf783,_0x157144)=>(_0x2a81b4,_0x3d7cf0)=>_0x157144(_0x2a81b4,_0x3d7cf0,_0x3bf783),$=(_0x416d4f,_0x50b02a,_0x5dcc31)=>ne(_0x416d4f,typeof _0x50b02a!=_0x22398f(0x141)?_0x50b02a+'':_0x50b02a,_0x5dcc31);function _0x5040(_0x5477e3,_0xfd7851){_0x5477e3=_0x5477e3-0x103;const _0x2ecd97=_0x2ecd();let _0x50409d=_0x2ecd97[_0x5477e3];return _0x50409d;}let g=class extends _0x5eca17{constructor(_0x922b90=O,_0x333c94,_0x42460c){const _0x4a7057=_0x22398f;super(),this['_config']=_0x922b90,this[_0x4a7057(0x114)]=_0x333c94,this[_0x4a7057(0x147)]=_0x42460c;const {..._0x307efe}=_0x492394({},O,this[_0x4a7057(0x14a)]);this[_0x4a7057(0x147)][_0x4a7057(0x11d)](z,_0x307efe);}[_0x22398f(0x163)](){const _0x56a152=_0x22398f;[[S],[f],[_]][_0x56a152(0x149)](_0x14cf19=>{const _0x46c469=_0x56a152;this['_injector'][_0x46c469(0x14d)](_0x14cf19);});}[_0x22398f(0x11b)](){const _0x5978a0=_0x22398f;this[_0x5978a0(0x114)]['get'](f),this[_0x5978a0(0x114)][_0x5978a0(0x156)](_);}};$(g,'pluginName',W),$(g,_0x22398f(0x115),_0x49c8b7[_0x22398f(0x14b)]),g=ie([_0x3ddd01(_0x59c59f,_0x425f68,_0x32b697),N(0x1,_0x38c346(_0x52b3d9)),N(0x2,_0x3b7d40)],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 _0x22398f=_0x5040;(function(_0x4f4b28,_0x34ad62){const _0x39767b=_0x5040,_0x60b83c=_0x4f4b28();while(!![]){try{const _0x12d028=parseInt(_0x39767b(0x12c))/0x1+parseInt(_0x39767b(0x13a))/0x2+parseInt(_0x39767b(0x109))/0x3*(parseInt(_0x39767b(0x110))/0x4)+-parseInt(_0x39767b(0x11f))/0x5*(parseInt(_0x39767b(0x12f))/0x6)+-parseInt(_0x39767b(0x162))/0x7+parseInt(_0x39767b(0x121))/0x8+parseInt(_0x39767b(0x104))/0x9;if(_0x12d028===_0x34ad62)break;else _0x60b83c['push'](_0x60b83c['shift']());}catch(_0xa72ccb){_0x60b83c['push'](_0x60b83c['shift']());}}}(_0x2ecd,0xe9a5d));import{CommentService as _0x4c6e3d,CollaborationSessionService as _0x369ee5,UniverCollaborationClientPlugin as _0x425f68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32b697}from'@univerjs-pro/license';import{dayjs as _0x595bba,UserManagerService as _0x65ef30,Inject as _0x38c346,Injector as _0x52b3d9,Disposable as _0x3b5549,CustomRangeType as _0x54fedc,UniverInstanceType as _0x49c8b7,DependentOn as _0x3ddd01,IConfigService as _0x3b7d40,Plugin as _0x5eca17,merge as _0x492394}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59c59f}from'@univerjs/thread-comment-ui';function _0x2ecd(){const _0x3e5ae1=['Reply','dataSource','getUser','_httpService','28uDRxFR','Add','defineProperty','reply','_injector','type','listComments','code','rangeId','deleteComment','addUser','onReady','_initDataSource','setConfig','replies','5BYdBAV','addComment','1027776GzcVbv','rangeType','YYYY/MM/DD\x20HH:mm','getMemberID','_threadCommentDataSource','threadId','_initUserSync','replyId','solved','find','/list','17270MkHgCn','parse','payload','2339646MtgcLz','updateComment','getCurrentUser','getOwnPropertyDescriptor','thread-comment-data-source.config','users','post','length','comment','_threadCommentModel','ref','2643554pxiFct','format','body','_init','user','comments','getComment','symbol','error','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','map','_configService','subscribe','forEach','_config','UNIVER_UNKNOWN','/delete','add','Solve','commentUpdate$','getUnit','customRanges','UNRECOGNIZED','/universer-api/comment/unit/','_sessionService','syncUpdateMutationToColla','get','resolveComment','disposeWithMe','values','_commentService','filter','/edit','/add','Delete','Edit','root','_threadCommentDataSourceService','7984550gtQcpH','onStarting','_userService','/reply','stringify','createTimestamp','userId','5742171dsGEdG','Unknown','requireSession','content','COMMENT','163746acrWSf','OpenOrReOpen','Solved'];_0x2ecd=function(){return _0x3e5ae1;};return _0x2ecd();}import{ThreadCommentModel as _0x17e0dc,IThreadCommentDataSourceService as _0x68d5e8}from'@univerjs/thread-comment';import{bufferTime as _0x5f4227}from'rxjs';import{HTTPService as _0x17fd7c}from'@univerjs/network';const W=_0x22398f(0x144);var I=(_0x84c901=>(_0x84c901[_0x84c901['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x84c901[_0x84c901['Solved']=0x1]=_0x22398f(0x10b),_0x84c901[_0x84c901['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x84c901))(I||{}),v=(_0x806411=>(_0x806411[_0x806411['Unknown']=0x0]=_0x22398f(0x105),_0x806411[_0x806411[_0x22398f(0x111)]=0x1]=_0x22398f(0x111),_0x806411[_0x806411['Reply']=0x2]=_0x22398f(0x10c),_0x806411[_0x806411['Edit']=0x3]=_0x22398f(0x15f),_0x806411[_0x806411[_0x22398f(0x15e)]=0x4]='Delete',_0x806411[_0x806411[_0x22398f(0x14e)]=0x5]=_0x22398f(0x14e),_0x806411[_0x806411['UNRECOGNIZED']=-0x1]=_0x22398f(0x152),_0x806411))(v||{});const y=_0x30f352=>_0x595bba(new Date(+_0x30f352))[_0x22398f(0x13b)](_0x22398f(0x123)),B=async(_0x2d8c9e,_0x42e202)=>{const _0x1e3161=_0x22398f,_0x2f00b5=_0x2d8c9e[_0x1e3161(0x156)](_0x65ef30),_0x289847=_0x2d8c9e[_0x1e3161(0x156)](_0x17fd7c);_0x42e202[_0x1e3161(0x149)](_0x29423c=>{const _0x148819=_0x1e3161;_0x2f00b5[_0x148819(0x10e)](_0x29423c)&&_0x42e202['delete'](_0x29423c);}),_0x42e202['size']&&(await _0x289847[_0x1e3161(0x156)]('/universer-api/user/list',{'params':{'userIDs':[..._0x42e202]}}))[_0x1e3161(0x13c)][_0x1e3161(0x134)][_0x1e3161(0x149)](_0x3f32ac=>{const _0x5645bf=_0x1e3161;_0x3f32ac&&_0x2f00b5[_0x5645bf(0x11a)](_0x3f32ac);});};var K=Object[_0x22398f(0x132)],V=(_0xd7d72b,_0x25cbb6,_0x26c574,_0x5b1f7b)=>{const _0x4acb0c=_0x22398f;for(var _0xa6e13c=_0x5b1f7b>0x1?void 0x0:_0x5b1f7b?K(_0x25cbb6,_0x26c574):_0x25cbb6,_0x31031a=_0xd7d72b[_0x4acb0c(0x136)]-0x1,_0x18b925;_0x31031a>=0x0;_0x31031a--)(_0x18b925=_0xd7d72b[_0x31031a])&&(_0xa6e13c=_0x18b925(_0xa6e13c)||_0xa6e13c);return _0xa6e13c;},p=(_0x453677,_0x36fd14)=>(_0x5badfb,_0x3e7757)=>_0x36fd14(_0x5badfb,_0x3e7757,_0x453677);let _=class extends _0x3b5549{constructor(_0x2b7def,_0x5904e4,_0x366d8e,_0x26f235){const _0x524003=_0x22398f;super(),this[_0x524003(0x15a)]=_0x2b7def,this['_threadCommentModel']=_0x5904e4,this['_userService']=_0x366d8e,this['_injector']=_0x26f235,this[_0x524003(0x13d)](),this[_0x524003(0x127)]();}['_initUserSync'](){const _0x167044=_0x22398f;this[_0x167044(0x158)](this[_0x167044(0x138)][_0x167044(0x14f)]['pipe'](_0x5f4227(0x10))[_0x167044(0x148)](_0x87f92e=>{const _0x2c57a3=_0x167044,_0xd880b0=new Set();_0x87f92e[_0x2c57a3(0x149)](_0x50d7ab=>{const _0x2e3680=_0x2c57a3;switch(_0x50d7ab['type']){case _0x2e3680(0x14d):{const _0x2bc49e=_0x50d7ab[_0x2e3680(0x12e)]['personId'];_0xd880b0[_0x2e3680(0x14d)](_0x2bc49e);break;}}}),B(this['_injector'],_0xd880b0);}));}[_0x22398f(0x13d)](){const _0x1d2ff5=_0x22398f;this[_0x1d2ff5(0x158)](this[_0x1d2ff5(0x15a)][_0x1d2ff5(0x14f)][_0x1d2ff5(0x148)](async _0x1b7d9a=>{const _0x3dc995=_0x1d2ff5;var _0x57d41e,_0x377d1f,_0x5e01ae,_0x86516;const _0x278759=(_0x57d41e=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])[_0x3dc995(0x12a)](_0x561be0=>_0x561be0[_0x3dc995(0x126)]===_0x1b7d9a[_0x3dc995(0x126)]))==null?void 0x0:_0x57d41e[_0x3dc995(0x160)];if(!_0x278759)return;const {unitId:_0x4fe0cf,subUnitId:_0x3df732}=_0x278759;switch(_0x1b7d9a[_0x3dc995(0x13e)]&&this[_0x3dc995(0x164)]['addUser'](_0x1b7d9a[_0x3dc995(0x13e)]),_0x1b7d9a[_0x3dc995(0x115)]){case v[_0x3dc995(0x111)]:break;case v['Reply']:{this[_0x3dc995(0x138)][_0x3dc995(0x120)](_0x4fe0cf,_0x3df732,{'unitId':_0x4fe0cf,'subUnitId':_0x3df732,'ref':'','id':_0x1b7d9a[_0x3dc995(0x128)],'dT':y(+_0x1b7d9a['createTimestamp']),'threadId':_0x1b7d9a['threadId'],'personId':(_0x5e01ae=(_0x377d1f=_0x1b7d9a[_0x3dc995(0x13e)])==null?void 0x0:_0x377d1f['userID'])!=null?_0x5e01ae:_0x1b7d9a[_0x3dc995(0x103)],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content']),'parentId':_0x278759['id']});break;}case v[_0x3dc995(0x15e)]:{const _0xc604e5=this[_0x3dc995(0x138)][_0x3dc995(0x140)](_0x4fe0cf,_0x3df732,_0x1b7d9a['replyId']);_0xc604e5&&_0xc604e5['parentId']&&this[_0x3dc995(0x138)]['deleteComment'](_0x4fe0cf,_0x3df732,_0x1b7d9a[_0x3dc995(0x128)]);break;}case v[_0x3dc995(0x15f)]:{this['_threadCommentModel'][_0x3dc995(0x130)](_0x4fe0cf,_0x3df732,{'commentId':_0x1b7d9a['replyId'],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content'])});break;}case v['Solve']:{const _0x3f593e=(_0x86516=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])['find'](_0x66ac4=>_0x66ac4['threadId']===_0x1b7d9a['threadId']))==null?void 0x0:_0x86516['root'];_0x3f593e&&this[_0x3dc995(0x138)]['resolveComment'](_0x4fe0cf,_0x3df732,_0x3f593e['id'],_0x1b7d9a[_0x3dc995(0x129)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x38c346(_0x4c6e3d)),p(0x1,_0x38c346(_0x17e0dc)),p(0x2,_0x38c346(_0x65ef30)),p(0x3,_0x38c346(_0x52b3d9))],_);const z=_0x22398f(0x133),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x119214,_0x28bfee,_0x46b6d9,_0x3c1f98)=>{const _0x4ec814=_0x22398f;for(var _0x32f81c=_0x3c1f98>0x1?void 0x0:_0x3c1f98?k(_0x28bfee,_0x46b6d9):_0x28bfee,_0x4aad35=_0x119214[_0x4ec814(0x136)]-0x1,_0x4891e6;_0x4aad35>=0x0;_0x4aad35--)(_0x4891e6=_0x119214[_0x4aad35])&&(_0x32f81c=_0x4891e6(_0x32f81c)||_0x32f81c);return _0x32f81c;},b=(_0x25040b,_0x386058)=>(_0xe9e97,_0x48a07a)=>_0x386058(_0xe9e97,_0x48a07a,_0x25040b);function X(_0x957d27,_0x27b115){const _0x297ebb=_0x22398f,_0x19508a=_0x957d27[_0x297ebb(0x11e)][0x0];return{..._0x27b115,'id':_0x19508a[_0x297ebb(0x128)],'resolved':_0x957d27['solved']===0x1,'dT':y(_0x19508a['createTimestamp']),'personId':_0x19508a['userId'],'threadId':_0x19508a[_0x297ebb(0x126)]};}function ee(_0x26415c,_0x3ea2e6,_0x35cfc8){const _0x996f7e=_0x22398f;var _0x25858a,_0x37b8c2;if(((_0x37b8c2=(_0x25858a=_0x26415c==null?void 0x0:_0x26415c[_0x996f7e(0x11e)])==null?void 0x0:_0x25858a['length'])!=null?_0x37b8c2:0x0)>0x0){const _0x1eed74=(_0x2a15af,_0xd67f88)=>({'id':_0x2a15af[_0x996f7e(0x128)],'threadId':_0x2a15af['threadId'],'dT':y(_0x2a15af[_0x996f7e(0x167)]),'personId':_0x2a15af[_0x996f7e(0x103)],'resolved':_0x26415c[_0x996f7e(0x129)]===I[_0x996f7e(0x10b)],'unitId':_0x3ea2e6,'subUnitId':_0x35cfc8,'text':JSON[_0x996f7e(0x12d)](_0x2a15af[_0x996f7e(0x107)]),'parentId':_0xd67f88}),_0x839f48=_0x1eed74(_0x26415c[_0x996f7e(0x11e)][0x0]);return{..._0x839f48,'children':_0x26415c['replies']['slice'](0x1)[_0x996f7e(0x146)](_0x106235=>_0x1eed74(_0x106235,_0x839f48['id']))};}return null;}let S=class{constructor(_0xead164,_0x3140d6,_0x21a18b){const _0x50f2e8=_0x22398f;this[_0x50f2e8(0x10f)]=_0xead164,this['_userService']=_0x3140d6,this['_sessionService']=_0x21a18b;}async[_0x22398f(0x120)](_0xfd4413){const _0x39c1c2=_0x22398f;var _0x58771c,_0x283feb;const {parentId:_0x43d403,unitId:_0x540d64,text:_0x2999aa,threadId:_0x387a0b}=_0xfd4413,_0x18c856=(_0x283feb=(_0x58771c=_0x2999aa[_0x39c1c2(0x151)])==null?void 0x0:_0x58771c['filter'](_0x235baa=>_0x235baa['rangeType']===_0x54fedc[_0x39c1c2(0x108)])['map'](_0x1cf657=>_0x1cf657[_0x39c1c2(0x118)]))!=null?_0x283feb:[],_0x19fc66=JSON[_0x39c1c2(0x166)](_0x2999aa),_0x6a3080=(await this[_0x39c1c2(0x154)][_0x39c1c2(0x106)](_0x540d64))['getMemberID']();if(_0x43d403){const _0x24f808={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856,'threadId':_0x387a0b},_0x35fa9d=(await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x165),{'body':_0x24f808}))['body'][_0x39c1c2(0x113)];return{..._0xfd4413,'id':_0x35fa9d[_0x39c1c2(0x128)],'dT':_0x595bba(+_0x35fa9d[_0x39c1c2(0x167)])[_0x39c1c2(0x13b)](_0x39c1c2(0x123)),'personId':_0x35fa9d['userId']};}else{const _0x1b6da5={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856},_0x8ee2a1=await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x15d),{'body':_0x1b6da5});return X(_0x8ee2a1['body'][_0x39c1c2(0x137)],_0xfd4413);}}async[_0x22398f(0x130)](_0x2d7d26){const _0x55e1b8=_0x22398f;var _0x31a5c5,_0x54559f;const {text:_0x2ed0cc,unitId:_0xefaa95}=_0x2d7d26,_0x12ba40=(_0x54559f=(_0x31a5c5=_0x2ed0cc[_0x55e1b8(0x151)])==null?void 0x0:_0x31a5c5[_0x55e1b8(0x15b)](_0x166f18=>_0x166f18[_0x55e1b8(0x122)]===_0x54fedc[_0x55e1b8(0x108)])['map'](_0x54a5e6=>_0x54a5e6['rangeId']))!=null?_0x54559f:[],_0x56af7=JSON[_0x55e1b8(0x166)](_0x2ed0cc),_0x19a079=_0x2d7d26[_0x55e1b8(0x126)],_0x58a80c=_0x2d7d26['id'],_0x4a9d16={'memberId':(await this[_0x55e1b8(0x154)][_0x55e1b8(0x106)](_0xefaa95))[_0x55e1b8(0x124)](),'unitId':_0xefaa95,'threadId':_0x19a079,'mention':_0x12ba40,'content':_0x56af7,'replyId':_0x58a80c},_0x31e128=await this[_0x55e1b8(0x10f)][_0x55e1b8(0x135)](_0x55e1b8(0x153)+_0xefaa95+_0x55e1b8(0x15c),{'body':_0x4a9d16});return!_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)]||_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)][_0x55e1b8(0x117)]===0x1;}async[_0x22398f(0x157)](_0x14b3ef){const _0x549c35=_0x22398f,{unitId:_0x805ce4}=_0x14b3ef,_0xa0fdbd=_0x14b3ef[_0x549c35(0x126)],_0x28fcca={'memberId':this[_0x549c35(0x164)][_0x549c35(0x131)]()['userID'],'unitId':_0x805ce4,'threadId':_0xa0fdbd,'solved':_0x14b3ef[_0x549c35(0x145)]?I[_0x549c35(0x10b)]:I[_0x549c35(0x10a)]},_0x389a26=await this[_0x549c35(0x10f)][_0x549c35(0x135)](_0x549c35(0x153)+_0x805ce4+'/solved',{'body':_0x28fcca});return!_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)]||_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)][_0x549c35(0x117)]===0x1;}async[_0x22398f(0x119)](_0x55f35b,_0x552a0a,_0x5f366a,_0x2a0af3){const _0x28a78c=_0x22398f,_0x58f45e={'memberId':(await this[_0x28a78c(0x154)]['requireSession'](_0x55f35b))['getMemberID'](),'threadId':_0x5f366a,'replyId':_0x2a0af3,'unitId':_0x55f35b},_0x52b6d2=await this[_0x28a78c(0x10f)][_0x28a78c(0x135)](_0x28a78c(0x153)+_0x55f35b+_0x28a78c(0x14c),{'body':_0x58f45e});return!_0x52b6d2['body'][_0x28a78c(0x142)]||_0x52b6d2[_0x28a78c(0x13c)]['error'][_0x28a78c(0x117)]===0x1;}async[_0x22398f(0x116)](_0x5b871d,_0xc2a3f7,_0x33c314){const _0x590f42=_0x22398f,_0x45cdd8={'unitId':_0x5b871d,'threadId':_0x33c314},_0x3f63f5=await this[_0x590f42(0x10f)][_0x590f42(0x135)](_0x590f42(0x153)+_0x5b871d+_0x590f42(0x12b),{'body':_0x45cdd8}),_0x97d513=_0x33c314[_0x590f42(0x146)](_0x272bae=>ee(_0x3f63f5['body'][_0x590f42(0x13f)][_0x272bae],_0x5b871d,_0xc2a3f7))[_0x590f42(0x15b)](Boolean);return Object[_0x590f42(0x159)](_0x3f63f5[_0x590f42(0x13c)][_0x590f42(0x134)])[_0x590f42(0x149)](_0x26bbd1=>{const _0x526b63=_0x590f42;this[_0x526b63(0x164)][_0x526b63(0x11a)](_0x26bbd1);}),_0x97d513;}['saveCommentToSnapshot'](_0x13f30b){const _0x2486e2=_0x22398f;return{'id':_0x13f30b['id'],'threadId':_0x13f30b[_0x2486e2(0x126)],'ref':_0x13f30b[_0x2486e2(0x139)]};}};S=Q([b(0x0,_0x38c346(_0x17fd7c)),b(0x1,_0x38c346(_0x65ef30)),b(0x2,_0x38c346(_0x369ee5))],S);var re=Object[_0x22398f(0x132)],te=(_0x2c0b48,_0x17afed,_0x52a24a,_0x140cfe)=>{for(var _0x403a0e=_0x140cfe>0x1?void 0x0:_0x140cfe?re(_0x17afed,_0x52a24a):_0x17afed,_0x3b2bc4=_0x2c0b48['length']-0x1,_0x5d6194;_0x3b2bc4>=0x0;_0x3b2bc4--)(_0x5d6194=_0x2c0b48[_0x3b2bc4])&&(_0x403a0e=_0x5d6194(_0x403a0e)||_0x403a0e);return _0x403a0e;},M=(_0x27b2a8,_0x526449)=>(_0xbddc3c,_0x45e71e)=>_0x526449(_0xbddc3c,_0x45e71e,_0x27b2a8);let f=class extends _0x3b5549{constructor(_0x1e3131,_0x8608f4){const _0x4b9011=_0x22398f;super(),this[_0x4b9011(0x161)]=_0x1e3131,this[_0x4b9011(0x125)]=_0x8608f4,this['_initDataSource']();}[_0x22398f(0x11c)](){const _0x4e886f=_0x22398f;this[_0x4e886f(0x161)][_0x4e886f(0x10d)]=this[_0x4e886f(0x125)],this['_threadCommentDataSourceService'][_0x4e886f(0x155)]=!0x1;}};f=te([M(0x0,_0x68d5e8),M(0x1,_0x38c346(S))],f);var se=Object[_0x22398f(0x112)],oe=Object[_0x22398f(0x132)],ne=(_0x5e0769,_0xad133f,_0x4db905)=>_0xad133f in _0x5e0769?se(_0x5e0769,_0xad133f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4db905}):_0x5e0769[_0xad133f]=_0x4db905,ie=(_0x5a2d6f,_0x5d6b9d,_0x53b5cb,_0x1cfdf8)=>{for(var _0x14d267=_0x1cfdf8>0x1?void 0x0:_0x1cfdf8?oe(_0x5d6b9d,_0x53b5cb):_0x5d6b9d,_0x4929f0=_0x5a2d6f['length']-0x1,_0x1ae553;_0x4929f0>=0x0;_0x4929f0--)(_0x1ae553=_0x5a2d6f[_0x4929f0])&&(_0x14d267=_0x1ae553(_0x14d267)||_0x14d267);return _0x14d267;},N=(_0x3bf783,_0x157144)=>(_0x2a81b4,_0x3d7cf0)=>_0x157144(_0x2a81b4,_0x3d7cf0,_0x3bf783),$=(_0x416d4f,_0x50b02a,_0x5dcc31)=>ne(_0x416d4f,typeof _0x50b02a!=_0x22398f(0x141)?_0x50b02a+'':_0x50b02a,_0x5dcc31);function _0x5040(_0x5477e3,_0xfd7851){_0x5477e3=_0x5477e3-0x103;const _0x2ecd97=_0x2ecd();let _0x50409d=_0x2ecd97[_0x5477e3];return _0x50409d;}let g=class extends _0x5eca17{constructor(_0x922b90=O,_0x333c94,_0x42460c){const _0x4a7057=_0x22398f;super(),this['_config']=_0x922b90,this[_0x4a7057(0x114)]=_0x333c94,this[_0x4a7057(0x147)]=_0x42460c;const {..._0x307efe}=_0x492394({},O,this[_0x4a7057(0x14a)]);this[_0x4a7057(0x147)][_0x4a7057(0x11d)](z,_0x307efe);}[_0x22398f(0x163)](){const _0x56a152=_0x22398f;[[S],[f],[_]][_0x56a152(0x149)](_0x14cf19=>{const _0x46c469=_0x56a152;this['_injector'][_0x46c469(0x14d)](_0x14cf19);});}[_0x22398f(0x11b)](){const _0x5978a0=_0x22398f;this[_0x5978a0(0x114)]['get'](f),this[_0x5978a0(0x114)][_0x5978a0(0x156)](_);}};$(g,'pluginName',W),$(g,_0x22398f(0x115),_0x49c8b7[_0x22398f(0x14b)]),g=ie([_0x3ddd01(_0x59c59f,_0x425f68,_0x32b697),N(0x1,_0x38c346(_0x52b3d9)),N(0x2,_0x3b7d40)],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 _0x5cab(){const _0x4b7f70=['_configService','symbol','userId','rxjs','Solved','_userService','subscribe','unitId','saveCommentToSnapshot','Unknown','resolveComment','object','1860972majFuy','9809MdaiYf','forEach','UniverThreadCommentUIPlugin','@univerjs/network','UniverProCollaborationClient','@univerjs/thread-comment','CollaborationSessionService','rangeId','find','customRanges','_initDataSource','code','87390twmqYr','solved','post','slice','exports','@univerjs/core','getUnit','@univerjs-pro/collaboration-client','Edit','_injector','/edit','UniverThreadComment','@univerjs-pro/license','Disposable','_initUserSync','syncUpdateMutationToColla','onStarting','amd','users','deleteComment','body','COMMENT','_threadCommentDataSource','delete','replyId','/universer-api/comment/unit/','263455sRKhMl','parentId','values','disposeWithMe','function','Add','UniverProLicense','error','size','ThreadCommentModel','toStringTag','format','HTTPService','46lNDibv','Solve','requireSession','getComment','updateComment','threadId','Module','replies','addComment','_commentService','_init','/universer-api/user/list','pipe','3301753fEyHJl','dayjs','_threadCommentModel','8FoLKbA','OpenOrReOpen','reply','root','Injector','UserManagerService','/list','filter','add','CustomRangeType','content','payload','userID','defineProperty','UniverCollaborationClientPlugin','/reply','personId','merge','length','Reply','addUser','YYYY/MM/DD\x20HH:mm','6519986sCOCjF','listComments','_threadCommentDataSourceService','UniverNetwork','user','createTimestamp','get','20NYetkd','48eNVyKy','UNIVER_UNKNOWN','stringify','_sessionService','UNRECOGNIZED','Plugin','_httpService','Inject','IThreadCommentDataSourceService','type','4021758WlhrZg','Delete','map','UniverThreadCommentDataSourcePlugin','_config','comments','thread-comment-data-source.config','getOwnPropertyDescriptor','getMemberID','/add','522UnHtTW','parse'];_0x5cab=function(){return _0x4b7f70;};return _0x5cab();}function _0x2623(_0x4cbe41,_0x4e365d){_0x4cbe41=_0x4cbe41-0x113;const _0x5cabd5=_0x5cab();let _0x262313=_0x5cabd5[_0x4cbe41];return _0x262313;}(function(_0x2583a6,_0x525749){const _0x585576=_0x2623,_0x2c235a=_0x2583a6();while(!![]){try{const _0x17401e=parseInt(_0x585576(0x178))/0x1*(parseInt(_0x585576(0x127))/0x2)+parseInt(_0x585576(0x177))/0x3+-parseInt(_0x585576(0x154))/0x4*(-parseInt(_0x585576(0x11a))/0x5)+parseInt(_0x585576(0x15f))/0x6+-parseInt(_0x585576(0x134))/0x7*(-parseInt(_0x585576(0x137))/0x8)+parseInt(_0x585576(0x169))/0x9*(parseInt(_0x585576(0x184))/0xa)+-parseInt(_0x585576(0x14d))/0xb*(parseInt(_0x585576(0x155))/0xc);if(_0x17401e===_0x525749)break;else _0x2c235a['push'](_0x2c235a['shift']());}catch(_0x2b9302){_0x2c235a['push'](_0x2c235a['shift']());}}}(_0x5cab,0x5e8f4),function(_0x3fb062,_0x3b8f62){const _0x15b7f9=_0x2623;typeof exports==_0x15b7f9(0x176)&&typeof module<'u'?_0x3b8f62(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==_0x15b7f9(0x11e)&&define[_0x15b7f9(0x195)]?define([_0x15b7f9(0x188),_0x15b7f9(0x18b),_0x15b7f9(0x190),_0x15b7f9(0x189),'@univerjs/thread-comment-ui',_0x15b7f9(0x17d),_0x15b7f9(0x16e),_0x15b7f9(0x17b)],_0x3b8f62):(_0x3fb062=typeof globalThis<'u'?globalThis:_0x3fb062||self,_0x3b8f62(_0x3fb062['UniverProThreadCommentDatasource']={},_0x3fb062[_0x15b7f9(0x17c)],_0x3fb062[_0x15b7f9(0x120)],_0x3fb062['UniverCore'],_0x3fb062['UniverThreadCommentUi'],_0x3fb062[_0x15b7f9(0x18f)],_0x3fb062['rxjs'],_0x3fb062[_0x15b7f9(0x150)]));}(this,function(_0x5cd3d2,_0x33a76f,_0x2a361b,_0x24455d,_0x20fafc,_0x1a507f,_0x54f966,_0x5cfd00){'use strict';const _0xfde14a=_0x2623;const _0x59f24d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x365d72=(_0x32e01c=>(_0x32e01c[_0x32e01c[_0xfde14a(0x138)]=0x0]=_0xfde14a(0x138),_0x32e01c[_0x32e01c['Solved']=0x1]=_0xfde14a(0x16f),_0x32e01c[_0x32e01c[_0xfde14a(0x159)]=-0x1]='UNRECOGNIZED',_0x32e01c))(_0x365d72||{}),_0x3210e3=(_0x275c74=>(_0x275c74[_0x275c74[_0xfde14a(0x174)]=0x0]=_0xfde14a(0x174),_0x275c74[_0x275c74[_0xfde14a(0x11f)]=0x1]=_0xfde14a(0x11f),_0x275c74[_0x275c74[_0xfde14a(0x14a)]=0x2]=_0xfde14a(0x14a),_0x275c74[_0x275c74['Edit']=0x3]=_0xfde14a(0x18c),_0x275c74[_0x275c74[_0xfde14a(0x160)]=0x4]=_0xfde14a(0x160),_0x275c74[_0x275c74[_0xfde14a(0x128)]=0x5]='Solve',_0x275c74[_0x275c74[_0xfde14a(0x159)]=-0x1]='UNRECOGNIZED',_0x275c74))(_0x3210e3||{});const _0x184c02=_0x29fc47=>_0x24455d[_0xfde14a(0x135)](new Date(+_0x29fc47))[_0xfde14a(0x125)](_0xfde14a(0x14c)),_0x488455=async(_0x3b139a,_0x1a967e)=>{const _0x1ea951=_0xfde14a,_0x56ecb6=_0x3b139a[_0x1ea951(0x153)](_0x24455d['UserManagerService']),_0x1a5f1a=_0x3b139a[_0x1ea951(0x153)](_0x5cfd00[_0x1ea951(0x126)]);_0x1a967e[_0x1ea951(0x179)](_0x31ae0a=>{const _0x132f62=_0x1ea951;_0x56ecb6['getUser'](_0x31ae0a)&&_0x1a967e[_0x132f62(0x117)](_0x31ae0a);}),_0x1a967e[_0x1ea951(0x122)]&&(await _0x1a5f1a[_0x1ea951(0x153)](_0x1ea951(0x132),{'params':{'userIDs':[..._0x1a967e]}}))[_0x1ea951(0x114)][_0x1ea951(0x196)]['forEach'](_0x51b8a6=>{const _0x33fad6=_0x1ea951;_0x51b8a6&&_0x56ecb6[_0x33fad6(0x14b)](_0x51b8a6);});};var _0x2af71f=Object[_0xfde14a(0x166)],_0x432a65=(_0x383219,_0x258a97,_0x3d9f4e,_0x5753ce)=>{for(var _0x4dec72=_0x5753ce>0x1?void 0x0:_0x5753ce?_0x2af71f(_0x258a97,_0x3d9f4e):_0x258a97,_0x265429=_0x383219['length']-0x1,_0x587fb0;_0x265429>=0x0;_0x265429--)(_0x587fb0=_0x383219[_0x265429])&&(_0x4dec72=_0x587fb0(_0x4dec72)||_0x4dec72);return _0x4dec72;},_0x28293e=(_0x50d842,_0x2156e8)=>(_0x5b3796,_0x383d5d)=>_0x2156e8(_0x5b3796,_0x383d5d,_0x50d842);let _0x216e98=class extends _0x24455d[_0xfde14a(0x191)]{constructor(_0x35b170,_0x59265e,_0x31c3da,_0x4da7c9){const _0x455f1d=_0xfde14a;super(),this[_0x455f1d(0x130)]=_0x35b170,this[_0x455f1d(0x136)]=_0x59265e,this[_0x455f1d(0x170)]=_0x31c3da,this[_0x455f1d(0x18d)]=_0x4da7c9,this[_0x455f1d(0x131)](),this[_0x455f1d(0x192)]();}[_0xfde14a(0x192)](){const _0x40289b=_0xfde14a;this['disposeWithMe'](this[_0x40289b(0x136)]['commentUpdate$'][_0x40289b(0x133)](_0x54f966['bufferTime'](0x10))[_0x40289b(0x171)](_0x30dc52=>{const _0x4629bd=_0x40289b,_0x139157=new Set();_0x30dc52['forEach'](_0x154a97=>{const _0x567760=_0x2623;switch(_0x154a97[_0x567760(0x15e)]){case _0x567760(0x13f):{const _0x3b1a28=_0x154a97[_0x567760(0x142)][_0x567760(0x147)];_0x139157[_0x567760(0x13f)](_0x3b1a28);break;}}}),_0x488455(this[_0x4629bd(0x18d)],_0x139157);}));}[_0xfde14a(0x131)](){const _0xbc3a53=_0xfde14a;this[_0xbc3a53(0x11d)](this[_0xbc3a53(0x130)]['commentUpdate$'][_0xbc3a53(0x171)](async _0x4b540d=>{const _0x583b50=_0xbc3a53;var _0x3a202f,_0x5236cf,_0x498c83,_0x365366;const _0x497bdc=(_0x3a202f=this[_0x583b50(0x136)][_0x583b50(0x18a)](_0x4b540d[_0x583b50(0x172)])[_0x583b50(0x180)](_0xea29e2=>_0xea29e2[_0x583b50(0x12c)]===_0x4b540d[_0x583b50(0x12c)]))==null?void 0x0:_0x3a202f[_0x583b50(0x13a)];if(!_0x497bdc)return;const {unitId:_0x4410cd,subUnitId:_0x439b9c}=_0x497bdc;switch(_0x4b540d[_0x583b50(0x151)]&&this[_0x583b50(0x170)][_0x583b50(0x14b)](_0x4b540d[_0x583b50(0x151)]),_0x4b540d[_0x583b50(0x15e)]){case _0x3210e3[_0x583b50(0x11f)]:break;case _0x3210e3['Reply']:{this[_0x583b50(0x136)][_0x583b50(0x12f)](_0x4410cd,_0x439b9c,{'unitId':_0x4410cd,'subUnitId':_0x439b9c,'ref':'','id':_0x4b540d['replyId'],'dT':_0x184c02(+_0x4b540d['createTimestamp']),'threadId':_0x4b540d['threadId'],'personId':(_0x498c83=(_0x5236cf=_0x4b540d[_0x583b50(0x151)])==null?void 0x0:_0x5236cf[_0x583b50(0x143)])!=null?_0x498c83:_0x4b540d['userId'],'text':JSON[_0x583b50(0x16a)](_0x4b540d['content']),'parentId':_0x497bdc['id']});break;}case _0x3210e3[_0x583b50(0x160)]:{const _0x4e6dd5=this[_0x583b50(0x136)][_0x583b50(0x12a)](_0x4410cd,_0x439b9c,_0x4b540d['replyId']);_0x4e6dd5&&_0x4e6dd5[_0x583b50(0x11b)]&&this[_0x583b50(0x136)][_0x583b50(0x113)](_0x4410cd,_0x439b9c,_0x4b540d[_0x583b50(0x118)]);break;}case _0x3210e3[_0x583b50(0x18c)]:{this[_0x583b50(0x136)][_0x583b50(0x12b)](_0x4410cd,_0x439b9c,{'commentId':_0x4b540d[_0x583b50(0x118)],'text':JSON[_0x583b50(0x16a)](_0x4b540d[_0x583b50(0x141)])});break;}case _0x3210e3[_0x583b50(0x128)]:{const _0x4c0b90=(_0x365366=this[_0x583b50(0x136)][_0x583b50(0x18a)](_0x4b540d[_0x583b50(0x172)])[_0x583b50(0x180)](_0x2677b9=>_0x2677b9[_0x583b50(0x12c)]===_0x4b540d['threadId']))==null?void 0x0:_0x365366[_0x583b50(0x13a)];_0x4c0b90&&this[_0x583b50(0x136)][_0x583b50(0x175)](_0x4410cd,_0x439b9c,_0x4c0b90['id'],_0x4b540d[_0x583b50(0x185)]===_0x365d72[_0x583b50(0x16f)]);break;}}}));}};_0x216e98=_0x432a65([_0x28293e(0x0,_0x24455d[_0xfde14a(0x15c)](_0x33a76f['CommentService'])),_0x28293e(0x1,_0x24455d[_0xfde14a(0x15c)](_0x1a507f[_0xfde14a(0x123)])),_0x28293e(0x2,_0x24455d[_0xfde14a(0x15c)](_0x24455d[_0xfde14a(0x13c)])),_0x28293e(0x3,_0x24455d[_0xfde14a(0x15c)](_0x24455d['Injector']))],_0x216e98);const _0x1d411b=_0xfde14a(0x165),_0x46ba6f={};var _0x1cbc7f=Object[_0xfde14a(0x166)],_0xcf40fe=(_0x10e6b5,_0x130499,_0x5d6478,_0x3b1d24)=>{const _0x180550=_0xfde14a;for(var _0x5b493b=_0x3b1d24>0x1?void 0x0:_0x3b1d24?_0x1cbc7f(_0x130499,_0x5d6478):_0x130499,_0x458f53=_0x10e6b5[_0x180550(0x149)]-0x1,_0x45913c;_0x458f53>=0x0;_0x458f53--)(_0x45913c=_0x10e6b5[_0x458f53])&&(_0x5b493b=_0x45913c(_0x5b493b)||_0x5b493b);return _0x5b493b;},_0x55462e=(_0xcdb9c8,_0x3e50ac)=>(_0x21de54,_0x57b801)=>_0x3e50ac(_0x21de54,_0x57b801,_0xcdb9c8);function _0x3d26ae(_0x490e0e,_0x2da245){const _0x46d1b8=_0xfde14a,_0x26183e=_0x490e0e['replies'][0x0];return{..._0x2da245,'id':_0x26183e['replyId'],'resolved':_0x490e0e[_0x46d1b8(0x185)]===0x1,'dT':_0x184c02(_0x26183e[_0x46d1b8(0x152)]),'personId':_0x26183e[_0x46d1b8(0x16d)],'threadId':_0x26183e['threadId']};}function _0x1a9fe8(_0x1426de,_0x5f0ed8,_0x199377){const _0x200f0d=_0xfde14a;var _0x2dfd59,_0x45577a;if(((_0x45577a=(_0x2dfd59=_0x1426de==null?void 0x0:_0x1426de[_0x200f0d(0x12e)])==null?void 0x0:_0x2dfd59[_0x200f0d(0x149)])!=null?_0x45577a:0x0)>0x0){const _0x22764d=(_0x3697c7,_0x4f2068)=>({'id':_0x3697c7[_0x200f0d(0x118)],'threadId':_0x3697c7[_0x200f0d(0x12c)],'dT':_0x184c02(_0x3697c7[_0x200f0d(0x152)]),'personId':_0x3697c7['userId'],'resolved':_0x1426de[_0x200f0d(0x185)]===_0x365d72['Solved'],'unitId':_0x5f0ed8,'subUnitId':_0x199377,'text':JSON[_0x200f0d(0x16a)](_0x3697c7['content']),'parentId':_0x4f2068}),_0x4db58f=_0x22764d(_0x1426de[_0x200f0d(0x12e)][0x0]);return{..._0x4db58f,'children':_0x1426de[_0x200f0d(0x12e)][_0x200f0d(0x187)](0x1)[_0x200f0d(0x161)](_0xb52f80=>_0x22764d(_0xb52f80,_0x4db58f['id']))};}return null;}let _0x4ffe36=class{constructor(_0x192e4d,_0x17e34d,_0x40ac7a){const _0xd6ce88=_0xfde14a;this[_0xd6ce88(0x15b)]=_0x192e4d,this[_0xd6ce88(0x170)]=_0x17e34d,this[_0xd6ce88(0x158)]=_0x40ac7a;}async[_0xfde14a(0x12f)](_0x568a6b){const _0x21e025=_0xfde14a;var _0x2cc3e1,_0x438d45;const {parentId:_0x468323,unitId:_0x3dbfce,text:_0x499a84,threadId:_0x480018}=_0x568a6b,_0x537278=(_0x438d45=(_0x2cc3e1=_0x499a84['customRanges'])==null?void 0x0:_0x2cc3e1['filter'](_0x2ce091=>_0x2ce091['rangeType']===_0x24455d[_0x21e025(0x140)][_0x21e025(0x115)])[_0x21e025(0x161)](_0xf8eed3=>_0xf8eed3['rangeId']))!=null?_0x438d45:[],_0x3f9297=JSON[_0x21e025(0x157)](_0x499a84),_0x24af6e=(await this['_sessionService'][_0x21e025(0x129)](_0x3dbfce))[_0x21e025(0x167)]();if(_0x468323){const _0x2620be={'memberId':_0x24af6e,'unitId':_0x3dbfce,'content':_0x3f9297,'mention':_0x537278,'threadId':_0x480018},_0x2f7207=(await this[_0x21e025(0x15b)][_0x21e025(0x186)](_0x21e025(0x119)+_0x3dbfce+_0x21e025(0x146),{'body':_0x2620be}))[_0x21e025(0x114)][_0x21e025(0x139)];return{..._0x568a6b,'id':_0x2f7207[_0x21e025(0x118)],'dT':_0x24455d['dayjs'](+_0x2f7207['createTimestamp'])[_0x21e025(0x125)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2f7207[_0x21e025(0x16d)]};}else{const _0x1fe2a9={'memberId':_0x24af6e,'unitId':_0x3dbfce,'content':_0x3f9297,'mention':_0x537278},_0x4f079c=await this['_httpService'][_0x21e025(0x186)]('/universer-api/comment/unit/'+_0x3dbfce+_0x21e025(0x168),{'body':_0x1fe2a9});return _0x3d26ae(_0x4f079c[_0x21e025(0x114)]['comment'],_0x568a6b);}}async[_0xfde14a(0x12b)](_0x161300){const _0x24000b=_0xfde14a;var _0x145bc9,_0x18f329;const {text:_0x2b35dd,unitId:_0x54a253}=_0x161300,_0x27b9ab=(_0x18f329=(_0x145bc9=_0x2b35dd[_0x24000b(0x181)])==null?void 0x0:_0x145bc9[_0x24000b(0x13e)](_0x8e1e91=>_0x8e1e91['rangeType']===_0x24455d[_0x24000b(0x140)][_0x24000b(0x115)])[_0x24000b(0x161)](_0x3cd327=>_0x3cd327[_0x24000b(0x17f)]))!=null?_0x18f329:[],_0xedcad0=JSON[_0x24000b(0x157)](_0x2b35dd),_0x1e50d1=_0x161300['threadId'],_0x414c82=_0x161300['id'],_0x1d1519={'memberId':(await this[_0x24000b(0x158)][_0x24000b(0x129)](_0x54a253))[_0x24000b(0x167)](),'unitId':_0x54a253,'threadId':_0x1e50d1,'mention':_0x27b9ab,'content':_0xedcad0,'replyId':_0x414c82},_0x16c191=await this[_0x24000b(0x15b)]['post'](_0x24000b(0x119)+_0x54a253+_0x24000b(0x18e),{'body':_0x1d1519});return!_0x16c191[_0x24000b(0x114)]['error']||_0x16c191[_0x24000b(0x114)][_0x24000b(0x121)][_0x24000b(0x183)]===0x1;}async['resolveComment'](_0x309a40){const _0x6c5ccf=_0xfde14a,{unitId:_0x5b49f8}=_0x309a40,_0x21d413=_0x309a40[_0x6c5ccf(0x12c)],_0x2eb30d={'memberId':this[_0x6c5ccf(0x170)]['getCurrentUser']()[_0x6c5ccf(0x143)],'unitId':_0x5b49f8,'threadId':_0x21d413,'solved':_0x309a40['resolved']?_0x365d72[_0x6c5ccf(0x16f)]:_0x365d72[_0x6c5ccf(0x138)]},_0x34fb3a=await this[_0x6c5ccf(0x15b)][_0x6c5ccf(0x186)](_0x6c5ccf(0x119)+_0x5b49f8+'/solved',{'body':_0x2eb30d});return!_0x34fb3a[_0x6c5ccf(0x114)][_0x6c5ccf(0x121)]||_0x34fb3a['body'][_0x6c5ccf(0x121)][_0x6c5ccf(0x183)]===0x1;}async[_0xfde14a(0x113)](_0x2d39df,_0x1714de,_0x4ee616,_0x18afb1){const _0x311759=_0xfde14a,_0x332624={'memberId':(await this[_0x311759(0x158)][_0x311759(0x129)](_0x2d39df))[_0x311759(0x167)](),'threadId':_0x4ee616,'replyId':_0x18afb1,'unitId':_0x2d39df},_0x4c3df9=await this[_0x311759(0x15b)][_0x311759(0x186)](_0x311759(0x119)+_0x2d39df+'/delete',{'body':_0x332624});return!_0x4c3df9['body']['error']||_0x4c3df9[_0x311759(0x114)]['error']['code']===0x1;}async[_0xfde14a(0x14e)](_0x44e791,_0x2d42bd,_0x3bcfb1){const _0x373502=_0xfde14a,_0x110273={'unitId':_0x44e791,'threadId':_0x3bcfb1},_0x21a986=await this[_0x373502(0x15b)][_0x373502(0x186)](_0x373502(0x119)+_0x44e791+_0x373502(0x13d),{'body':_0x110273}),_0x33f14e=_0x3bcfb1['map'](_0x136d7e=>_0x1a9fe8(_0x21a986[_0x373502(0x114)][_0x373502(0x164)][_0x136d7e],_0x44e791,_0x2d42bd))[_0x373502(0x13e)](Boolean);return Object[_0x373502(0x11c)](_0x21a986[_0x373502(0x114)][_0x373502(0x196)])['forEach'](_0xed1745=>{const _0xa16908=_0x373502;this[_0xa16908(0x170)]['addUser'](_0xed1745);}),_0x33f14e;}[_0xfde14a(0x173)](_0x57bba8){return{'id':_0x57bba8['id'],'threadId':_0x57bba8['threadId'],'ref':_0x57bba8['ref']};}};_0x4ffe36=_0xcf40fe([_0x55462e(0x0,_0x24455d[_0xfde14a(0x15c)](_0x5cfd00[_0xfde14a(0x126)])),_0x55462e(0x1,_0x24455d[_0xfde14a(0x15c)](_0x24455d[_0xfde14a(0x13c)])),_0x55462e(0x2,_0x24455d[_0xfde14a(0x15c)](_0x33a76f[_0xfde14a(0x17e)]))],_0x4ffe36);var _0x982ec1=Object[_0xfde14a(0x166)],_0x39520f=(_0x4eb2f6,_0x4388be,_0x3f47bf,_0x2f2855)=>{for(var _0x46c174=_0x2f2855>0x1?void 0x0:_0x2f2855?_0x982ec1(_0x4388be,_0x3f47bf):_0x4388be,_0x23e8df=_0x4eb2f6['length']-0x1,_0x1e6057;_0x23e8df>=0x0;_0x23e8df--)(_0x1e6057=_0x4eb2f6[_0x23e8df])&&(_0x46c174=_0x1e6057(_0x46c174)||_0x46c174);return _0x46c174;},_0x58665d=(_0x3d844e,_0x32ee46)=>(_0x1bd801,_0xfcf938)=>_0x32ee46(_0x1bd801,_0xfcf938,_0x3d844e);let _0x32f4ba=class extends _0x24455d['Disposable']{constructor(_0x4fbcee,_0x2d3575){const _0x594e3a=_0xfde14a;super(),this[_0x594e3a(0x14f)]=_0x4fbcee,this[_0x594e3a(0x116)]=_0x2d3575,this[_0x594e3a(0x182)]();}[_0xfde14a(0x182)](){const _0x4b8192=_0xfde14a;this[_0x4b8192(0x14f)]['dataSource']=this[_0x4b8192(0x116)],this['_threadCommentDataSourceService'][_0x4b8192(0x193)]=!0x1;}};_0x32f4ba=_0x39520f([_0x58665d(0x0,_0x1a507f[_0xfde14a(0x15d)]),_0x58665d(0x1,_0x24455d[_0xfde14a(0x15c)](_0x4ffe36))],_0x32f4ba);var _0x484a12=Object[_0xfde14a(0x144)],_0x297f3b=Object[_0xfde14a(0x166)],_0x365d10=(_0x435374,_0x34ec26,_0x543f99)=>_0x34ec26 in _0x435374?_0x484a12(_0x435374,_0x34ec26,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x543f99}):_0x435374[_0x34ec26]=_0x543f99,_0x28cb7b=(_0x3160dc,_0x107454,_0x27c4f3,_0x3d48c9)=>{for(var _0x427029=_0x3d48c9>0x1?void 0x0:_0x3d48c9?_0x297f3b(_0x107454,_0x27c4f3):_0x107454,_0x1a4276=_0x3160dc['length']-0x1,_0x6a6719;_0x1a4276>=0x0;_0x1a4276--)(_0x6a6719=_0x3160dc[_0x1a4276])&&(_0x427029=_0x6a6719(_0x427029)||_0x427029);return _0x427029;},_0x2cd858=(_0x27edb0,_0x4fde45)=>(_0x50e8a8,_0x5e0eda)=>_0x4fde45(_0x50e8a8,_0x5e0eda,_0x27edb0),_0x462cf7=(_0x3b28c6,_0x78a661,_0x287262)=>_0x365d10(_0x3b28c6,typeof _0x78a661!=_0xfde14a(0x16c)?_0x78a661+'':_0x78a661,_0x287262);_0x5cd3d2['UniverThreadCommentDataSourcePlugin']=class extends _0x24455d[_0xfde14a(0x15a)]{constructor(_0x9df939=_0x46ba6f,_0x4162e1,_0x14a110){const _0x4c211a=_0xfde14a;super(),this[_0x4c211a(0x163)]=_0x9df939,this['_injector']=_0x4162e1,this[_0x4c211a(0x16b)]=_0x14a110;const {..._0xca1693}=_0x24455d[_0x4c211a(0x148)]({},_0x46ba6f,this[_0x4c211a(0x163)]);this[_0x4c211a(0x16b)]['setConfig'](_0x1d411b,_0xca1693);}[_0xfde14a(0x194)](){const _0x394921=_0xfde14a;[[_0x4ffe36],[_0x32f4ba],[_0x216e98]][_0x394921(0x179)](_0x1d1476=>{const _0x4fa2c8=_0x394921;this[_0x4fa2c8(0x18d)][_0x4fa2c8(0x13f)](_0x1d1476);});}['onReady'](){const _0x55a900=_0xfde14a;this[_0x55a900(0x18d)][_0x55a900(0x153)](_0x32f4ba),this['_injector'][_0x55a900(0x153)](_0x216e98);}},_0x462cf7(_0x5cd3d2[_0xfde14a(0x162)],'pluginName',_0x59f24d),_0x462cf7(_0x5cd3d2[_0xfde14a(0x162)],'type',_0x24455d['UniverInstanceType'][_0xfde14a(0x156)]),_0x5cd3d2[_0xfde14a(0x162)]=_0x28cb7b([_0x24455d['DependentOn'](_0x20fafc[_0xfde14a(0x17a)],_0x33a76f[_0xfde14a(0x145)],_0x2a361b['UniverLicensePlugin']),_0x2cd858(0x1,_0x24455d[_0xfde14a(0x15c)](_0x24455d[_0xfde14a(0x13b)])),_0x2cd858(0x2,_0x24455d['IConfigService'])],_0x5cd3d2['UniverThreadCommentDataSourcePlugin']),Object[_0xfde14a(0x144)](_0x5cd3d2,Symbol[_0xfde14a(0x124)],{'value':_0xfde14a(0x12d)});}));
|
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-experimental.20251204-1549a8e",
|
|
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.2",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.12.3-experimental.20251204-1549a8e",
|
|
49
|
+
"@univerjs-pro/license": "0.12.3-experimental.20251204-1549a8e",
|
|
50
|
+
"@univerjs/core": "0.12.3-experimental.20251204-1549a8e",
|
|
52
51
|
"@univerjs/protocol": "0.1.47",
|
|
53
|
-
"@univerjs/thread-comment": "0.12.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.12.
|
|
52
|
+
"@univerjs/thread-comment": "0.12.3-experimental.20251204-1549a8e",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.12.3-experimental.20251204-1549a8e",
|
|
54
|
+
"@univerjs/network": "0.12.3-experimental.20251204-1549a8e"
|
|
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.6",
|
|
60
|
+
"vitest": "^4.0.15",
|
|
61
|
+
"@univerjs-infra/shared": "0.12.3"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|