@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20260108-47c73e3 → 0.15.0-insiders.20260108-7b9120d
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 +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x312a7d=_0x35da;function _0x35da(_0x4874e9,_0x61138f){_0x4874e9=_0x4874e9-0x17d;const _0x446c33=_0x446c();let _0x35dafc=_0x446c33[_0x4874e9];return _0x35dafc;}(function(_0x536a05,_0x2ea5b6){const _0x16ac23=_0x35da,_0x3f9a69=_0x536a05();while(!![]){try{const _0x52b06b=-parseInt(_0x16ac23(0x17e))/0x1+-parseInt(_0x16ac23(0x1f1))/0x2*(-parseInt(_0x16ac23(0x1d0))/0x3)+parseInt(_0x16ac23(0x1a7))/0x4+-parseInt(_0x16ac23(0x1ee))/0x5+-parseInt(_0x16ac23(0x181))/0x6*(parseInt(_0x16ac23(0x18f))/0x7)+-parseInt(_0x16ac23(0x18a))/0x8+parseInt(_0x16ac23(0x1bc))/0x9;if(_0x52b06b===_0x2ea5b6)break;else _0x3f9a69['push'](_0x3f9a69['shift']());}catch(_0x268693){_0x3f9a69['push'](_0x3f9a69['shift']());}}}(_0x446c,0x2d0ff));Object[_0x312a7d(0x1e3)](exports,Symbol[_0x312a7d(0x1c7)],{'value':_0x312a7d(0x190)});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=_0x312a7d(0x1b3);var I=(_0x16f94d=>(_0x16f94d[_0x16f94d[_0x312a7d(0x1d1)]=0x0]=_0x312a7d(0x1d1),_0x16f94d[_0x16f94d['Solved']=0x1]=_0x312a7d(0x1a2),_0x16f94d[_0x16f94d[_0x312a7d(0x1dc)]=-0x1]=_0x312a7d(0x1dc),_0x16f94d))(I||{}),v=(_0x56a688=>(_0x56a688[_0x56a688[_0x312a7d(0x187)]=0x0]='Unknown',_0x56a688[_0x56a688[_0x312a7d(0x1ec)]=0x1]=_0x312a7d(0x1ec),_0x56a688[_0x56a688[_0x312a7d(0x1c3)]=0x2]='Reply',_0x56a688[_0x56a688[_0x312a7d(0x193)]=0x3]=_0x312a7d(0x193),_0x56a688[_0x56a688[_0x312a7d(0x188)]=0x4]=_0x312a7d(0x188),_0x56a688[_0x56a688[_0x312a7d(0x1c8)]=0x5]=_0x312a7d(0x1c8),_0x56a688[_0x56a688[_0x312a7d(0x1dc)]=-0x1]='UNRECOGNIZED',_0x56a688))(v||{});const f=_0x36b702=>c['dayjs'](new Date(+_0x36b702))[_0x312a7d(0x1ae)](_0x312a7d(0x19c)),R=async(_0x12bd34,_0x48c5e3)=>{const _0x133b84=_0x312a7d,_0x1f47d2=_0x12bd34['get'](c[_0x133b84(0x1a4)]),_0x3a31b5=_0x12bd34[_0x133b84(0x1f4)](P[_0x133b84(0x1de)]);_0x48c5e3[_0x133b84(0x1ef)](_0x17d063=>{const _0x370ff3=_0x133b84;_0x1f47d2['getUser'](_0x17d063)&&_0x48c5e3[_0x370ff3(0x1cf)](_0x17d063);}),_0x48c5e3['size']&&(await _0x3a31b5[_0x133b84(0x1f4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x48c5e3]}}))[_0x133b84(0x1f2)][_0x133b84(0x1c1)][_0x133b84(0x1ef)](_0x54c650=>{const _0x3608a1=_0x133b84;_0x54c650&&_0x1f47d2[_0x3608a1(0x18e)](_0x54c650);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5d3f95,_0x3669bb,_0x3aa592,_0x405786)=>{const _0x5f1ad0=_0x312a7d;for(var _0x34674d=_0x405786>0x1?void 0x0:_0x405786?$(_0x3669bb,_0x3aa592):_0x3669bb,_0x4a5d88=_0x5d3f95[_0x5f1ad0(0x1e0)]-0x1,_0x5597eb;_0x4a5d88>=0x0;_0x4a5d88--)(_0x5597eb=_0x5d3f95[_0x4a5d88])&&(_0x34674d=_0x5597eb(_0x34674d)||_0x34674d);return _0x34674d;},S=(_0x3ff4d6,_0x57f580)=>(_0x9f36bf,_0x103e77)=>_0x57f580(_0x9f36bf,_0x103e77,_0x3ff4d6);let _=class extends c['Disposable']{constructor(_0x87ad02,_0x5e4271,_0x2835fc,_0x17793f){const _0x1b87ef=_0x312a7d;super(),this['_commentService']=_0x87ad02,this[_0x1b87ef(0x1b0)]=_0x5e4271,this['_userService']=_0x2835fc,this[_0x1b87ef(0x1c5)]=_0x17793f,this[_0x1b87ef(0x185)](),this['_initUserSync']();}[_0x312a7d(0x199)](){const _0x36eec5=_0x312a7d;this[_0x36eec5(0x1e1)](this['_threadCommentModel'][_0x36eec5(0x1b2)][_0x36eec5(0x1b7)](j[_0x36eec5(0x191)](0x10))['subscribe'](_0x11eb9b=>{const _0x328872=_0x36eec5,_0x4cef1e=new Set();_0x11eb9b[_0x328872(0x1ef)](_0x11ba41=>{const _0xacd924=_0x328872;if(_0x11ba41[_0xacd924(0x1e4)]===_0xacd924(0x1da)){const _0x2f0490=_0x11ba41[_0xacd924(0x189)][_0xacd924(0x19f)];_0x4cef1e[_0xacd924(0x1da)](_0x2f0490);}}),R(this[_0x328872(0x1c5)],_0x4cef1e);}));}['_init'](){const _0x54ea06=_0x312a7d;this[_0x54ea06(0x1e1)](this[_0x54ea06(0x1ba)][_0x54ea06(0x1b2)][_0x54ea06(0x1b8)](async _0x4b0d8c=>{const _0x13d2f2=_0x54ea06;var _0x34e16b,_0xc038d6,_0x52c7ff,_0xa85705;const _0x308572=(_0x34e16b=this[_0x13d2f2(0x1b0)][_0x13d2f2(0x182)](_0x4b0d8c[_0x13d2f2(0x1ab)])[_0x13d2f2(0x18d)](_0xeac1e2=>_0xeac1e2['threadId']===_0x4b0d8c['threadId']))==null?void 0x0:_0x34e16b[_0x13d2f2(0x1ac)];if(!_0x308572)return;const {unitId:_0x3cff36,subUnitId:_0x566c27}=_0x308572;switch(_0x4b0d8c[_0x13d2f2(0x1e5)]&&this[_0x13d2f2(0x1ce)][_0x13d2f2(0x18e)](_0x4b0d8c[_0x13d2f2(0x1e5)]),_0x4b0d8c[_0x13d2f2(0x1e4)]){case v[_0x13d2f2(0x1ec)]:break;case v[_0x13d2f2(0x1c3)]:{this[_0x13d2f2(0x1b0)][_0x13d2f2(0x1e2)](_0x3cff36,_0x566c27,{'unitId':_0x3cff36,'subUnitId':_0x566c27,'ref':'','id':_0x4b0d8c[_0x13d2f2(0x1a5)],'dT':f(+_0x4b0d8c[_0x13d2f2(0x1f5)]),'threadId':_0x4b0d8c[_0x13d2f2(0x1d9)],'personId':(_0x52c7ff=(_0xc038d6=_0x4b0d8c[_0x13d2f2(0x1e5)])==null?void 0x0:_0xc038d6[_0x13d2f2(0x1a1)])!=null?_0x52c7ff:_0x4b0d8c[_0x13d2f2(0x1b9)],'text':JSON['parse'](_0x4b0d8c['content']),'parentId':_0x308572['id']});break;}case v['Delete']:{const _0x50e35e=this[_0x13d2f2(0x1b0)][_0x13d2f2(0x1bf)](_0x3cff36,_0x566c27,_0x4b0d8c['replyId']);_0x50e35e&&_0x50e35e[_0x13d2f2(0x1c9)]&&this[_0x13d2f2(0x1b0)][_0x13d2f2(0x1e9)](_0x3cff36,_0x566c27,_0x4b0d8c['replyId']);break;}case v[_0x13d2f2(0x193)]:{this['_threadCommentModel'][_0x13d2f2(0x1dd)](_0x3cff36,_0x566c27,{'commentId':_0x4b0d8c[_0x13d2f2(0x1a5)],'text':JSON[_0x13d2f2(0x1bd)](_0x4b0d8c[_0x13d2f2(0x1c4)])});break;}case v[_0x13d2f2(0x1c8)]:{const _0x528223=(_0xa85705=this[_0x13d2f2(0x1b0)][_0x13d2f2(0x182)](_0x4b0d8c[_0x13d2f2(0x1ab)])[_0x13d2f2(0x18d)](_0x1cee00=>_0x1cee00[_0x13d2f2(0x1d9)]===_0x4b0d8c[_0x13d2f2(0x1d9)]))==null?void 0x0:_0xa85705[_0x13d2f2(0x1ac)];_0x528223&&this['_threadCommentModel']['resolveComment'](_0x3cff36,_0x566c27,_0x528223['id'],_0x4b0d8c[_0x13d2f2(0x19e)]===I['Solved']);break;}}}));}};function _0x446c(){const _0x33b490=['UserManagerService','replyId','Disposable','1433564ignqQs','UniverInstanceType','CommentService','Inject','unitId','root','stringify','format','CollaborationSessionService','_threadCommentModel','pluginName','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getMemberID','error','IThreadCommentDataSourceService','pipe','subscribe','userId','_commentService','listComments','3221784TEJnSc','parse','map','getComment','_sessionService','users','_config','Reply','content','_injector','values','toStringTag','Solve','parentId','CustomRangeType','onReady','/list','_httpService','_userService','delete','3miBsUj','OpenOrReOpen','slice','requireSession','/edit','post','COMMENT','ref','getOwnPropertyDescriptor','threadId','add','resolveComment','UNRECOGNIZED','updateComment','HTTPService','filter','length','disposeWithMe','addComment','defineProperty','type','user','getCurrentUser','customRanges','UniverThreadCommentDataSourcePlugin','deleteComment','/universer-api/comment/unit/','/add','Add','rangeId','779780bNDuST','forEach','_initDataSource','178318jhfFsP','body','onStarting','get','createTimestamp','ThreadCommentModel','216879esOKPz','comment','Plugin','402978bBSugb','getUnit','UniverCollaborationClientPlugin','replies','_init','UNIVER_UNKNOWN','Unknown','Delete','payload','1447624UEfCzB','_configService','UniverLicensePlugin','find','addUser','7UxIxUs','Module','bufferTime','_threadCommentDataSourceService','Edit','_threadCommentDataSource','code','/reply','DependentOn','comments','_initUserSync','setConfig','Injector','YYYY/MM/DD\x20HH:mm','/delete','solved','personId','rangeType','userID','Solved','saveCommentToSnapshot'];_0x446c=function(){return _0x33b490;};return _0x446c();}_=E([S(0x0,c['Inject'](b[_0x312a7d(0x1a9)])),S(0x1,c[_0x312a7d(0x1aa)](M[_0x312a7d(0x17d)])),S(0x2,c[_0x312a7d(0x1aa)](c[_0x312a7d(0x1a4)])),S(0x3,c[_0x312a7d(0x1aa)](c[_0x312a7d(0x19b)]))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xc457f6,_0x26f483,_0x508b25,_0xc4a330)=>{const _0x3a6033=_0x312a7d;for(var _0x2ab26c=_0xc4a330>0x1?void 0x0:_0xc4a330?A(_0x26f483,_0x508b25):_0x26f483,_0x3181b6=_0xc457f6[_0x3a6033(0x1e0)]-0x1,_0x8b619a;_0x3181b6>=0x0;_0x3181b6--)(_0x8b619a=_0xc457f6[_0x3181b6])&&(_0x2ab26c=_0x8b619a(_0x2ab26c)||_0x2ab26c);return _0x2ab26c;},C=(_0x1661c8,_0x3d5e35)=>(_0x26d45d,_0x590765)=>_0x3d5e35(_0x26d45d,_0x590765,_0x1661c8);function Y(_0x225266,_0x5a12db){const _0x42c309=_0x312a7d,_0x35d71b=_0x225266['replies'][0x0];return{..._0x5a12db,'id':_0x35d71b[_0x42c309(0x1a5)],'resolved':_0x225266[_0x42c309(0x19e)]===0x1,'dT':f(_0x35d71b['createTimestamp']),'personId':_0x35d71b[_0x42c309(0x1b9)],'threadId':_0x35d71b[_0x42c309(0x1d9)]};}function G(_0x3678f3,_0x204116,_0x106b59){const _0x2219da=_0x312a7d;var _0x184cdf,_0x2a8649;if(((_0x2a8649=(_0x184cdf=_0x3678f3==null?void 0x0:_0x3678f3[_0x2219da(0x184)])==null?void 0x0:_0x184cdf['length'])!=null?_0x2a8649:0x0)>0x0){const _0x258901=(_0x28e83e,_0x2fa0e3)=>({'id':_0x28e83e[_0x2219da(0x1a5)],'threadId':_0x28e83e['threadId'],'dT':f(_0x28e83e[_0x2219da(0x1f5)]),'personId':_0x28e83e[_0x2219da(0x1b9)],'resolved':_0x3678f3['solved']===I['Solved'],'unitId':_0x204116,'subUnitId':_0x106b59,'text':JSON['parse'](_0x28e83e[_0x2219da(0x1c4)]),'parentId':_0x2fa0e3}),_0x2f4065=_0x258901(_0x3678f3[_0x2219da(0x184)][0x0]);return{..._0x2f4065,'children':_0x3678f3[_0x2219da(0x184)][_0x2219da(0x1d2)](0x1)[_0x2219da(0x1be)](_0x4961fb=>_0x258901(_0x4961fb,_0x2f4065['id']))};}return null;}let p=class{constructor(_0x41c45b,_0x574cbb,_0x4fa163){const _0x37c9f2=_0x312a7d;this[_0x37c9f2(0x1cd)]=_0x41c45b,this[_0x37c9f2(0x1ce)]=_0x574cbb,this[_0x37c9f2(0x1c0)]=_0x4fa163;}async[_0x312a7d(0x1e2)](_0x33332d){const _0x5a7a0b=_0x312a7d;var _0x545a42,_0x4afc3c;const {parentId:_0x57fb70,unitId:_0x45cec5,text:_0x10fdfe,threadId:_0x4920b2}=_0x33332d,_0xd2f7ed=(_0x4afc3c=(_0x545a42=_0x10fdfe[_0x5a7a0b(0x1e7)])==null?void 0x0:_0x545a42[_0x5a7a0b(0x1df)](_0x34faf6=>_0x34faf6[_0x5a7a0b(0x1a0)]===c[_0x5a7a0b(0x1ca)][_0x5a7a0b(0x1d6)])[_0x5a7a0b(0x1be)](_0x297b5d=>_0x297b5d[_0x5a7a0b(0x1ed)]))!=null?_0x4afc3c:[],_0xa87a4a=JSON[_0x5a7a0b(0x1ad)](_0x10fdfe),_0x3e2602=(await this[_0x5a7a0b(0x1c0)][_0x5a7a0b(0x1d3)](_0x45cec5))[_0x5a7a0b(0x1b4)]();if(_0x57fb70){const _0x5f5236={'memberId':_0x3e2602,'unitId':_0x45cec5,'content':_0xa87a4a,'mention':_0xd2f7ed,'threadId':_0x4920b2},_0x5114e5=(await this[_0x5a7a0b(0x1cd)]['post'](_0x5a7a0b(0x1ea)+_0x45cec5+_0x5a7a0b(0x196),{'body':_0x5f5236}))[_0x5a7a0b(0x1f2)]['reply'];return{..._0x33332d,'id':_0x5114e5['replyId'],'dT':c['dayjs'](+_0x5114e5[_0x5a7a0b(0x1f5)])[_0x5a7a0b(0x1ae)](_0x5a7a0b(0x19c)),'personId':_0x5114e5[_0x5a7a0b(0x1b9)]};}else{const _0x16d311={'memberId':_0x3e2602,'unitId':_0x45cec5,'content':_0xa87a4a,'mention':_0xd2f7ed},_0x23abf0=await this[_0x5a7a0b(0x1cd)][_0x5a7a0b(0x1d5)]('/universer-api/comment/unit/'+_0x45cec5+_0x5a7a0b(0x1eb),{'body':_0x16d311});return Y(_0x23abf0[_0x5a7a0b(0x1f2)][_0x5a7a0b(0x17f)],_0x33332d);}}async[_0x312a7d(0x1dd)](_0x1982f0){const _0x44dbca=_0x312a7d;var _0x586e07,_0x90c0af;const {text:_0x138951,unitId:_0x5ddc58}=_0x1982f0,_0x541b75=(_0x90c0af=(_0x586e07=_0x138951[_0x44dbca(0x1e7)])==null?void 0x0:_0x586e07[_0x44dbca(0x1df)](_0x39f706=>_0x39f706[_0x44dbca(0x1a0)]===c['CustomRangeType']['COMMENT'])[_0x44dbca(0x1be)](_0x1b0a41=>_0x1b0a41[_0x44dbca(0x1ed)]))!=null?_0x90c0af:[],_0x1a1b35=JSON[_0x44dbca(0x1ad)](_0x138951),_0x1360d9=_0x1982f0['threadId'],_0x39d310=_0x1982f0['id'],_0xd17656={'memberId':(await this['_sessionService'][_0x44dbca(0x1d3)](_0x5ddc58))[_0x44dbca(0x1b4)](),'unitId':_0x5ddc58,'threadId':_0x1360d9,'mention':_0x541b75,'content':_0x1a1b35,'replyId':_0x39d310},_0x2cb8ab=await this['_httpService']['post'](_0x44dbca(0x1ea)+_0x5ddc58+_0x44dbca(0x1d4),{'body':_0xd17656});return!_0x2cb8ab['body'][_0x44dbca(0x1b5)]||_0x2cb8ab['body'][_0x44dbca(0x1b5)][_0x44dbca(0x195)]===0x1;}async[_0x312a7d(0x1db)](_0x3365fe){const _0x3829cc=_0x312a7d,{unitId:_0x4dcf10}=_0x3365fe,_0x56a492=_0x3365fe[_0x3829cc(0x1d9)],_0x19edd0={'memberId':this[_0x3829cc(0x1ce)][_0x3829cc(0x1e6)]()[_0x3829cc(0x1a1)],'unitId':_0x4dcf10,'threadId':_0x56a492,'solved':_0x3365fe['resolved']?I[_0x3829cc(0x1a2)]:I[_0x3829cc(0x1d1)]},_0x520b78=await this['_httpService'][_0x3829cc(0x1d5)](_0x3829cc(0x1ea)+_0x4dcf10+'/solved',{'body':_0x19edd0});return!_0x520b78[_0x3829cc(0x1f2)]['error']||_0x520b78[_0x3829cc(0x1f2)][_0x3829cc(0x1b5)][_0x3829cc(0x195)]===0x1;}async['deleteComment'](_0x899d9d,_0x528dce,_0x3e7883,_0x4f61e5){const _0x20e3a3=_0x312a7d,_0x374047={'memberId':(await this['_sessionService'][_0x20e3a3(0x1d3)](_0x899d9d))[_0x20e3a3(0x1b4)](),'threadId':_0x3e7883,'replyId':_0x4f61e5,'unitId':_0x899d9d},_0x47b925=await this[_0x20e3a3(0x1cd)][_0x20e3a3(0x1d5)](_0x20e3a3(0x1ea)+_0x899d9d+_0x20e3a3(0x19d),{'body':_0x374047});return!_0x47b925[_0x20e3a3(0x1f2)][_0x20e3a3(0x1b5)]||_0x47b925[_0x20e3a3(0x1f2)]['error'][_0x20e3a3(0x195)]===0x1;}async[_0x312a7d(0x1bb)](_0x14f98e,_0x401aff,_0x153806){const _0x47c80c=_0x312a7d,_0x4ffab7={'unitId':_0x14f98e,'threadId':_0x153806},_0xfa44e5=await this[_0x47c80c(0x1cd)][_0x47c80c(0x1d5)](_0x47c80c(0x1ea)+_0x14f98e+_0x47c80c(0x1cc),{'body':_0x4ffab7}),_0x1f83aa=_0x153806[_0x47c80c(0x1be)](_0x3639b0=>G(_0xfa44e5['body'][_0x47c80c(0x198)][_0x3639b0],_0x14f98e,_0x401aff))['filter'](Boolean);return Object[_0x47c80c(0x1c6)](_0xfa44e5[_0x47c80c(0x1f2)][_0x47c80c(0x1c1)])[_0x47c80c(0x1ef)](_0x2e2a5b=>{this['_userService']['addUser'](_0x2e2a5b);}),_0x1f83aa;}[_0x312a7d(0x1a3)](_0x5f07f6){const _0x4108e=_0x312a7d;return{'id':_0x5f07f6['id'],'threadId':_0x5f07f6[_0x4108e(0x1d9)],'ref':_0x5f07f6[_0x4108e(0x1d7)]};}};p=x([C(0x0,c[_0x312a7d(0x1aa)](P['HTTPService'])),C(0x1,c[_0x312a7d(0x1aa)](c[_0x312a7d(0x1a4)])),C(0x2,c[_0x312a7d(0x1aa)](b[_0x312a7d(0x1af)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0xe0d7dd,_0x3c38f7,_0x1110c1,_0x57f315)=>{const _0x58d039=_0x312a7d;for(var _0x5210cd=_0x57f315>0x1?void 0x0:_0x57f315?H(_0x3c38f7,_0x1110c1):_0x3c38f7,_0x362af1=_0xe0d7dd[_0x58d039(0x1e0)]-0x1,_0x204c19;_0x362af1>=0x0;_0x362af1--)(_0x204c19=_0xe0d7dd[_0x362af1])&&(_0x5210cd=_0x204c19(_0x5210cd)||_0x5210cd);return _0x5210cd;},y=(_0x4068a1,_0x3a20e1)=>(_0x255e1a,_0x2b51f9)=>_0x3a20e1(_0x255e1a,_0x2b51f9,_0x4068a1);let g=class extends c[_0x312a7d(0x1a6)]{constructor(_0x563be5,_0x1f03ab){super(),this['_threadCommentDataSourceService']=_0x563be5,this['_threadCommentDataSource']=_0x1f03ab,this['_initDataSource']();}[_0x312a7d(0x1f0)](){const _0xe32eb4=_0x312a7d;this[_0xe32eb4(0x192)]['dataSource']=this[_0xe32eb4(0x194)],this[_0xe32eb4(0x192)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x312a7d(0x1b6)]),y(0x1,c[_0x312a7d(0x1aa)](p))],g);var F=Object[_0x312a7d(0x1e3)],L=Object[_0x312a7d(0x1d8)],Z=(_0x3dc2d6,_0x68216c,_0x1cea65)=>_0x68216c in _0x3dc2d6?F(_0x3dc2d6,_0x68216c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1cea65}):_0x3dc2d6[_0x68216c]=_0x1cea65,W=(_0x97637d,_0x1fe9f1,_0x289f6c,_0x4279e9)=>{const _0x47fe67=_0x312a7d;for(var _0x5db1b4=_0x4279e9>0x1?void 0x0:_0x4279e9?L(_0x1fe9f1,_0x289f6c):_0x1fe9f1,_0x4feb43=_0x97637d[_0x47fe67(0x1e0)]-0x1,_0xa2371c;_0x4feb43>=0x0;_0x4feb43--)(_0xa2371c=_0x97637d[_0x4feb43])&&(_0x5db1b4=_0xa2371c(_0x5db1b4)||_0x5db1b4);return _0x5db1b4;},O=(_0x339c32,_0x4c702a)=>(_0x55ef38,_0x1dd6d3)=>_0x4c702a(_0x55ef38,_0x1dd6d3,_0x339c32),N=(_0x97dd1a,_0x20e301,_0x344b67)=>Z(_0x97dd1a,typeof _0x20e301!='symbol'?_0x20e301+'':_0x20e301,_0x344b67);exports[_0x312a7d(0x1e8)]=class extends c[_0x312a7d(0x180)]{constructor(_0x527c82=D,_0x1dc148,_0x4d8b41){const _0x373d8f=_0x312a7d;super(),this[_0x373d8f(0x1c2)]=_0x527c82,this[_0x373d8f(0x1c5)]=_0x1dc148,this[_0x373d8f(0x18b)]=_0x4d8b41;const {..._0x385558}=c['merge']({},D,this[_0x373d8f(0x1c2)]);this[_0x373d8f(0x18b)][_0x373d8f(0x19a)](q,_0x385558);}[_0x312a7d(0x1f3)](){const _0xbfacaa=_0x312a7d;[[p],[g],[_]][_0xbfacaa(0x1ef)](_0x467209=>{const _0x2a44b7=_0xbfacaa;this[_0x2a44b7(0x1c5)][_0x2a44b7(0x1da)](_0x467209);});}[_0x312a7d(0x1cb)](){const _0x370668=_0x312a7d;this[_0x370668(0x1c5)][_0x370668(0x1f4)](g),this[_0x370668(0x1c5)][_0x370668(0x1f4)](_);}},N(exports[_0x312a7d(0x1e8)],_0x312a7d(0x1b1),U),N(exports[_0x312a7d(0x1e8)],_0x312a7d(0x1e4),c[_0x312a7d(0x1a8)][_0x312a7d(0x186)]),exports[_0x312a7d(0x1e8)]=W([c[_0x312a7d(0x197)](w['UniverThreadCommentUIPlugin'],b[_0x312a7d(0x183)],T[_0x312a7d(0x18c)]),O(0x1,c[_0x312a7d(0x1aa)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x312a7d(0x1e8)]);
|
|
1
|
+
'use strict';const _0x4d9893=_0x407f;(function(_0x2db744,_0x5a0601){const _0x35927b=_0x407f,_0x2caa14=_0x2db744();while(!![]){try{const _0x297afa=-parseInt(_0x35927b(0xe4))/0x1*(parseInt(_0x35927b(0xa4))/0x2)+-parseInt(_0x35927b(0xb7))/0x3*(parseInt(_0x35927b(0xbf))/0x4)+-parseInt(_0x35927b(0xa6))/0x5*(-parseInt(_0x35927b(0xc5))/0x6)+parseInt(_0x35927b(0xb1))/0x7+parseInt(_0x35927b(0xef))/0x8*(-parseInt(_0x35927b(0xc7))/0x9)+parseInt(_0x35927b(0x9c))/0xa*(parseInt(_0x35927b(0x8b))/0xb)+-parseInt(_0x35927b(0x9f))/0xc*(-parseInt(_0x35927b(0x98))/0xd);if(_0x297afa===_0x5a0601)break;else _0x2caa14['push'](_0x2caa14['shift']());}catch(_0x542340){_0x2caa14['push'](_0x2caa14['shift']());}}}(_0x921f,0x3a3de));Object[_0x4d9893(0x90)](exports,Symbol[_0x4d9893(0xbd)],{'value':_0x4d9893(0x102)});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=_0x4d9893(0xd8);var I=(_0x4e79c8=>(_0x4e79c8[_0x4e79c8[_0x4d9893(0xdd)]=0x0]=_0x4d9893(0xdd),_0x4e79c8[_0x4e79c8[_0x4d9893(0xda)]=0x1]=_0x4d9893(0xda),_0x4e79c8[_0x4e79c8[_0x4d9893(0xd7)]=-0x1]=_0x4d9893(0xd7),_0x4e79c8))(I||{}),v=(_0x351327=>(_0x351327[_0x351327[_0x4d9893(0xdf)]=0x0]=_0x4d9893(0xdf),_0x351327[_0x351327[_0x4d9893(0xd1)]=0x1]=_0x4d9893(0xd1),_0x351327[_0x351327['Reply']=0x2]=_0x4d9893(0xe7),_0x351327[_0x351327[_0x4d9893(0xc6)]=0x3]='Edit',_0x351327[_0x351327[_0x4d9893(0x8f)]=0x4]=_0x4d9893(0x8f),_0x351327[_0x351327['Solve']=0x5]=_0x4d9893(0xf3),_0x351327[_0x351327[_0x4d9893(0xd7)]=-0x1]=_0x4d9893(0xd7),_0x351327))(v||{});const f=_0x4d5ffd=>c[_0x4d9893(0xff)](new Date(+_0x4d5ffd))[_0x4d9893(0xa0)](_0x4d9893(0xf9)),R=async(_0x3f046a,_0x3aa57b)=>{const _0x430cef=_0x4d9893,_0x14728c=_0x3f046a[_0x430cef(0xec)](c[_0x430cef(0xce)]),_0x1726e0=_0x3f046a['get'](P[_0x430cef(0xc8)]);_0x3aa57b[_0x430cef(0x96)](_0x1dc39d=>{const _0x99a700=_0x430cef;_0x14728c['getUser'](_0x1dc39d)&&_0x3aa57b[_0x99a700(0xd5)](_0x1dc39d);}),_0x3aa57b['size']&&(await _0x1726e0[_0x430cef(0xec)](_0x430cef(0xfb),{'params':{'userIDs':[..._0x3aa57b]}}))[_0x430cef(0xe5)][_0x430cef(0xfe)][_0x430cef(0x96)](_0x4da15a=>{const _0x4bcdeb=_0x430cef;_0x4da15a&&_0x14728c[_0x4bcdeb(0x9b)](_0x4da15a);});};var $=Object[_0x4d9893(0xac)],E=(_0x3fba8f,_0x4e47de,_0x5f52d4,_0x24ac4f)=>{const _0x192cc5=_0x4d9893;for(var _0x1151bd=_0x24ac4f>0x1?void 0x0:_0x24ac4f?$(_0x4e47de,_0x5f52d4):_0x4e47de,_0x48a210=_0x3fba8f[_0x192cc5(0xfa)]-0x1,_0x17725b;_0x48a210>=0x0;_0x48a210--)(_0x17725b=_0x3fba8f[_0x48a210])&&(_0x1151bd=_0x17725b(_0x1151bd)||_0x1151bd);return _0x1151bd;},S=(_0x2f102c,_0x387088)=>(_0xff1df9,_0x149e5a)=>_0x387088(_0xff1df9,_0x149e5a,_0x2f102c);function _0x921f(){const _0x5d1b2b=['11kQFiOt','UNIVER_UNKNOWN','map','CollaborationSessionService','Delete','defineProperty','DependentOn','onReady','COMMENT','createTimestamp','/add','forEach','IThreadCommentDataSourceService','39wADHmi','customRanges','setConfig','addUser','2389190kxMcFk','merge','/reply','1906584VIhPDS','format','_sessionService','_config','_threadCommentDataSourceService','591410JuelGh','/edit','55FMjDZp','Disposable','_injector','type','commentUpdate$','parse','getOwnPropertyDescriptor','addComment','find','post','_threadCommentModel','641263YUuhGA','payload','rangeType','Injector','userId','requireSession','145785PLMJpy','_commentService','resolveComment','personId','subscribe','_userService','toStringTag','unitId','16VRxnIN','pluginName','ref','getMemberID','slice','bufferTime','8322JukZym','Edit','18YHUapA','HTTPService','_httpService','CustomRangeType','Plugin','replies','/list','UserManagerService','/delete','getUnit','Add','user','getComment','updateComment','delete','UniverInstanceType','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','Solved','add','disposeWithMe','OpenOrReOpen','userID','Unknown','UniverThreadCommentUIPlugin','_init','/universer-api/comment/unit/','Inject','1RFdoyD','body','onStarting','Reply','root','saveCommentToSnapshot','comment','stringify','get','resolved','solved','375152NwBBJS','rangeId','reply','replyId','Solve','filter','UniverThreadCommentDataSourcePlugin','code','_initDataSource','content','YYYY/MM/DD\x20HH:mm','length','/universer-api/user/list','_configService','syncUpdateMutationToColla','users','dayjs','CommentService','/solved','Module','threadId','ThreadCommentModel','error','_threadCommentDataSource'];_0x921f=function(){return _0x5d1b2b;};return _0x921f();}let _=class extends c[_0x4d9893(0xa7)]{constructor(_0x44759e,_0x387b7e,_0x348ac1,_0x5d6a2f){const _0x43380a=_0x4d9893;super(),this[_0x43380a(0xb8)]=_0x44759e,this[_0x43380a(0xb0)]=_0x387b7e,this[_0x43380a(0xbc)]=_0x348ac1,this['_injector']=_0x5d6a2f,this[_0x43380a(0xe1)](),this[_0x43380a(0xd9)]();}[_0x4d9893(0xd9)](){const _0x9fab5a=_0x4d9893;this[_0x9fab5a(0xdc)](this[_0x9fab5a(0xb0)][_0x9fab5a(0xaa)]['pipe'](j[_0x9fab5a(0xc4)](0x10))[_0x9fab5a(0xbb)](_0x471725=>{const _0xde650b=_0x9fab5a,_0x196b88=new Set();_0x471725[_0xde650b(0x96)](_0x48d556=>{const _0x19d077=_0xde650b;if(_0x48d556['type']===_0x19d077(0xdb)){const _0x176226=_0x48d556[_0x19d077(0xb2)][_0x19d077(0xba)];_0x196b88[_0x19d077(0xdb)](_0x176226);}}),R(this[_0xde650b(0xa8)],_0x196b88);}));}[_0x4d9893(0xe1)](){const _0xd4feb7=_0x4d9893;this[_0xd4feb7(0xdc)](this[_0xd4feb7(0xb8)][_0xd4feb7(0xaa)][_0xd4feb7(0xbb)](async _0x52b5e7=>{const _0x4ed3dc=_0xd4feb7;var _0x246e1e,_0x139422,_0x5e4f3f,_0x365713;const _0x3c242e=(_0x246e1e=this[_0x4ed3dc(0xb0)]['getUnit'](_0x52b5e7[_0x4ed3dc(0xbe)])[_0x4ed3dc(0xae)](_0x5daeab=>_0x5daeab['threadId']===_0x52b5e7[_0x4ed3dc(0x103)]))==null?void 0x0:_0x246e1e['root'];if(!_0x3c242e)return;const {unitId:_0x3be60c,subUnitId:_0x9b6069}=_0x3c242e;switch(_0x52b5e7[_0x4ed3dc(0xd2)]&&this[_0x4ed3dc(0xbc)][_0x4ed3dc(0x9b)](_0x52b5e7[_0x4ed3dc(0xd2)]),_0x52b5e7[_0x4ed3dc(0xa9)]){case v[_0x4ed3dc(0xd1)]:break;case v[_0x4ed3dc(0xe7)]:{this[_0x4ed3dc(0xb0)][_0x4ed3dc(0xad)](_0x3be60c,_0x9b6069,{'unitId':_0x3be60c,'subUnitId':_0x9b6069,'ref':'','id':_0x52b5e7[_0x4ed3dc(0xf2)],'dT':f(+_0x52b5e7[_0x4ed3dc(0x94)]),'threadId':_0x52b5e7['threadId'],'personId':(_0x5e4f3f=(_0x139422=_0x52b5e7[_0x4ed3dc(0xd2)])==null?void 0x0:_0x139422[_0x4ed3dc(0xde)])!=null?_0x5e4f3f:_0x52b5e7[_0x4ed3dc(0xb5)],'text':JSON['parse'](_0x52b5e7[_0x4ed3dc(0xf8)]),'parentId':_0x3c242e['id']});break;}case v[_0x4ed3dc(0x8f)]:{const _0x38fbfe=this['_threadCommentModel'][_0x4ed3dc(0xd3)](_0x3be60c,_0x9b6069,_0x52b5e7[_0x4ed3dc(0xf2)]);_0x38fbfe&&_0x38fbfe['parentId']&&this['_threadCommentModel']['deleteComment'](_0x3be60c,_0x9b6069,_0x52b5e7[_0x4ed3dc(0xf2)]);break;}case v[_0x4ed3dc(0xc6)]:{this['_threadCommentModel'][_0x4ed3dc(0xd4)](_0x3be60c,_0x9b6069,{'commentId':_0x52b5e7['replyId'],'text':JSON[_0x4ed3dc(0xab)](_0x52b5e7[_0x4ed3dc(0xf8)])});break;}case v[_0x4ed3dc(0xf3)]:{const _0x119d25=(_0x365713=this[_0x4ed3dc(0xb0)][_0x4ed3dc(0xd0)](_0x52b5e7['unitId'])[_0x4ed3dc(0xae)](_0x3d4071=>_0x3d4071[_0x4ed3dc(0x103)]===_0x52b5e7[_0x4ed3dc(0x103)]))==null?void 0x0:_0x365713[_0x4ed3dc(0xe8)];_0x119d25&&this[_0x4ed3dc(0xb0)][_0x4ed3dc(0xb9)](_0x3be60c,_0x9b6069,_0x119d25['id'],_0x52b5e7['solved']===I[_0x4ed3dc(0xda)]);break;}}}));}};_=E([S(0x0,c[_0x4d9893(0xe3)](b[_0x4d9893(0x100)])),S(0x1,c[_0x4d9893(0xe3)](M[_0x4d9893(0x104)])),S(0x2,c[_0x4d9893(0xe3)](c['UserManagerService'])),S(0x3,c[_0x4d9893(0xe3)](c[_0x4d9893(0xb4)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x4d9893(0xac)],x=(_0xb4f27,_0x176743,_0x1e6580,_0x1a631a)=>{const _0x31b142=_0x4d9893;for(var _0x823a17=_0x1a631a>0x1?void 0x0:_0x1a631a?A(_0x176743,_0x1e6580):_0x176743,_0x5f92b6=_0xb4f27[_0x31b142(0xfa)]-0x1,_0x499f40;_0x5f92b6>=0x0;_0x5f92b6--)(_0x499f40=_0xb4f27[_0x5f92b6])&&(_0x823a17=_0x499f40(_0x823a17)||_0x823a17);return _0x823a17;},C=(_0x2e273b,_0xc84b20)=>(_0x1c5206,_0x4150a3)=>_0xc84b20(_0x1c5206,_0x4150a3,_0x2e273b);function Y(_0x2b3d36,_0x34f3c0){const _0x18baff=_0x4d9893,_0x2963f1=_0x2b3d36[_0x18baff(0xcc)][0x0];return{..._0x34f3c0,'id':_0x2963f1[_0x18baff(0xf2)],'resolved':_0x2b3d36[_0x18baff(0xee)]===0x1,'dT':f(_0x2963f1['createTimestamp']),'personId':_0x2963f1[_0x18baff(0xb5)],'threadId':_0x2963f1[_0x18baff(0x103)]};}function G(_0x1ce70a,_0x4a624d,_0x37d2b7){const _0x4dc731=_0x4d9893;var _0x13856e,_0x428fb4;if(((_0x428fb4=(_0x13856e=_0x1ce70a==null?void 0x0:_0x1ce70a[_0x4dc731(0xcc)])==null?void 0x0:_0x13856e[_0x4dc731(0xfa)])!=null?_0x428fb4:0x0)>0x0){const _0x183633=(_0x13a4c8,_0x2cfd87)=>({'id':_0x13a4c8[_0x4dc731(0xf2)],'threadId':_0x13a4c8['threadId'],'dT':f(_0x13a4c8[_0x4dc731(0x94)]),'personId':_0x13a4c8[_0x4dc731(0xb5)],'resolved':_0x1ce70a[_0x4dc731(0xee)]===I['Solved'],'unitId':_0x4a624d,'subUnitId':_0x37d2b7,'text':JSON[_0x4dc731(0xab)](_0x13a4c8[_0x4dc731(0xf8)]),'parentId':_0x2cfd87}),_0xa8d8b=_0x183633(_0x1ce70a[_0x4dc731(0xcc)][0x0]);return{..._0xa8d8b,'children':_0x1ce70a['replies'][_0x4dc731(0xc3)](0x1)['map'](_0x5bcf61=>_0x183633(_0x5bcf61,_0xa8d8b['id']))};}return null;}let p=class{constructor(_0x23a115,_0x469d62,_0x58dfe8){const _0x5a855e=_0x4d9893;this[_0x5a855e(0xc9)]=_0x23a115,this[_0x5a855e(0xbc)]=_0x469d62,this[_0x5a855e(0xa1)]=_0x58dfe8;}async[_0x4d9893(0xad)](_0xe90edb){const _0x104126=_0x4d9893;var _0x41252e,_0x4e750a;const {parentId:_0x4993e8,unitId:_0xe68ae,text:_0x42f2cf,threadId:_0x480deb}=_0xe90edb,_0x4a17d4=(_0x4e750a=(_0x41252e=_0x42f2cf[_0x104126(0x99)])==null?void 0x0:_0x41252e[_0x104126(0xf4)](_0x22910a=>_0x22910a[_0x104126(0xb3)]===c[_0x104126(0xca)][_0x104126(0x93)])[_0x104126(0x8d)](_0x2219ba=>_0x2219ba[_0x104126(0xf0)]))!=null?_0x4e750a:[],_0x558257=JSON[_0x104126(0xeb)](_0x42f2cf),_0x31edc4=(await this['_sessionService'][_0x104126(0xb6)](_0xe68ae))[_0x104126(0xc2)]();if(_0x4993e8){const _0x22ce4f={'memberId':_0x31edc4,'unitId':_0xe68ae,'content':_0x558257,'mention':_0x4a17d4,'threadId':_0x480deb},_0x153804=(await this[_0x104126(0xc9)][_0x104126(0xaf)]('/universer-api/comment/unit/'+_0xe68ae+_0x104126(0x9e),{'body':_0x22ce4f}))['body'][_0x104126(0xf1)];return{..._0xe90edb,'id':_0x153804[_0x104126(0xf2)],'dT':c[_0x104126(0xff)](+_0x153804['createTimestamp'])[_0x104126(0xa0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x153804['userId']};}else{const _0x3d70d7={'memberId':_0x31edc4,'unitId':_0xe68ae,'content':_0x558257,'mention':_0x4a17d4},_0xd674a3=await this['_httpService']['post'](_0x104126(0xe2)+_0xe68ae+_0x104126(0x95),{'body':_0x3d70d7});return Y(_0xd674a3[_0x104126(0xe5)][_0x104126(0xea)],_0xe90edb);}}async[_0x4d9893(0xd4)](_0x5deba7){const _0x4951a0=_0x4d9893;var _0x220723,_0x103887;const {text:_0x149e3e,unitId:_0x18162b}=_0x5deba7,_0x35526c=(_0x103887=(_0x220723=_0x149e3e[_0x4951a0(0x99)])==null?void 0x0:_0x220723[_0x4951a0(0xf4)](_0x3aca50=>_0x3aca50[_0x4951a0(0xb3)]===c[_0x4951a0(0xca)][_0x4951a0(0x93)])['map'](_0x5a3aac=>_0x5a3aac[_0x4951a0(0xf0)]))!=null?_0x103887:[],_0x12fd05=JSON[_0x4951a0(0xeb)](_0x149e3e),_0x455a2d=_0x5deba7[_0x4951a0(0x103)],_0x351a33=_0x5deba7['id'],_0xc454f9={'memberId':(await this[_0x4951a0(0xa1)]['requireSession'](_0x18162b))[_0x4951a0(0xc2)](),'unitId':_0x18162b,'threadId':_0x455a2d,'mention':_0x35526c,'content':_0x12fd05,'replyId':_0x351a33},_0x269bd1=await this[_0x4951a0(0xc9)][_0x4951a0(0xaf)]('/universer-api/comment/unit/'+_0x18162b+_0x4951a0(0xa5),{'body':_0xc454f9});return!_0x269bd1[_0x4951a0(0xe5)][_0x4951a0(0x105)]||_0x269bd1[_0x4951a0(0xe5)][_0x4951a0(0x105)][_0x4951a0(0xf6)]===0x1;}async[_0x4d9893(0xb9)](_0x2cdd35){const _0x4d532d=_0x4d9893,{unitId:_0x575162}=_0x2cdd35,_0x33bcfe=_0x2cdd35[_0x4d532d(0x103)],_0x1fca14={'memberId':this[_0x4d532d(0xbc)]['getCurrentUser']()[_0x4d532d(0xde)],'unitId':_0x575162,'threadId':_0x33bcfe,'solved':_0x2cdd35[_0x4d532d(0xed)]?I[_0x4d532d(0xda)]:I['OpenOrReOpen']},_0x30238c=await this['_httpService'][_0x4d532d(0xaf)](_0x4d532d(0xe2)+_0x575162+_0x4d532d(0x101),{'body':_0x1fca14});return!_0x30238c[_0x4d532d(0xe5)][_0x4d532d(0x105)]||_0x30238c['body']['error']['code']===0x1;}async['deleteComment'](_0x135afc,_0x58b731,_0xcbd6d,_0x5de782){const _0xf19fd1=_0x4d9893,_0xb6c32f={'memberId':(await this[_0xf19fd1(0xa1)][_0xf19fd1(0xb6)](_0x135afc))[_0xf19fd1(0xc2)](),'threadId':_0xcbd6d,'replyId':_0x5de782,'unitId':_0x135afc},_0x254ffe=await this[_0xf19fd1(0xc9)][_0xf19fd1(0xaf)](_0xf19fd1(0xe2)+_0x135afc+_0xf19fd1(0xcf),{'body':_0xb6c32f});return!_0x254ffe['body'][_0xf19fd1(0x105)]||_0x254ffe[_0xf19fd1(0xe5)][_0xf19fd1(0x105)]['code']===0x1;}async['listComments'](_0x56ce51,_0x34936d,_0x233ba7){const _0x1a3374=_0x4d9893,_0x4381b8={'unitId':_0x56ce51,'threadId':_0x233ba7},_0x4f77cf=await this[_0x1a3374(0xc9)][_0x1a3374(0xaf)](_0x1a3374(0xe2)+_0x56ce51+_0x1a3374(0xcd),{'body':_0x4381b8}),_0x106c1f=_0x233ba7[_0x1a3374(0x8d)](_0x1ed7ca=>G(_0x4f77cf[_0x1a3374(0xe5)]['comments'][_0x1ed7ca],_0x56ce51,_0x34936d))[_0x1a3374(0xf4)](Boolean);return Object['values'](_0x4f77cf[_0x1a3374(0xe5)]['users'])[_0x1a3374(0x96)](_0x57f93d=>{const _0x474b77=_0x1a3374;this[_0x474b77(0xbc)][_0x474b77(0x9b)](_0x57f93d);}),_0x106c1f;}[_0x4d9893(0xe9)](_0x53c864){const _0x264a9b=_0x4d9893;return{'id':_0x53c864['id'],'threadId':_0x53c864[_0x264a9b(0x103)],'ref':_0x53c864[_0x264a9b(0xc1)]};}};p=x([C(0x0,c[_0x4d9893(0xe3)](P['HTTPService'])),C(0x1,c[_0x4d9893(0xe3)](c[_0x4d9893(0xce)])),C(0x2,c[_0x4d9893(0xe3)](b[_0x4d9893(0x8e)]))],p);var H=Object[_0x4d9893(0xac)],J=(_0xb2e016,_0x28ccb5,_0x30b31a,_0x18cf60)=>{for(var _0x337311=_0x18cf60>0x1?void 0x0:_0x18cf60?H(_0x28ccb5,_0x30b31a):_0x28ccb5,_0x84fc9d=_0xb2e016['length']-0x1,_0x53d6bd;_0x84fc9d>=0x0;_0x84fc9d--)(_0x53d6bd=_0xb2e016[_0x84fc9d])&&(_0x337311=_0x53d6bd(_0x337311)||_0x337311);return _0x337311;},y=(_0x22d07a,_0x17de8b)=>(_0x451ecf,_0x214645)=>_0x17de8b(_0x451ecf,_0x214645,_0x22d07a);let g=class extends c['Disposable']{constructor(_0x1ac588,_0x537c11){const _0x2f87cb=_0x4d9893;super(),this[_0x2f87cb(0xa3)]=_0x1ac588,this[_0x2f87cb(0x8a)]=_0x537c11,this[_0x2f87cb(0xf7)]();}[_0x4d9893(0xf7)](){const _0x59b1b2=_0x4d9893;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x59b1b2(0xa3)][_0x59b1b2(0xfd)]=!0x1;}};g=J([y(0x0,M[_0x4d9893(0x97)]),y(0x1,c[_0x4d9893(0xe3)](p))],g);var F=Object['defineProperty'],L=Object[_0x4d9893(0xac)],Z=(_0x2a47a6,_0x31d8f9,_0x317c98)=>_0x31d8f9 in _0x2a47a6?F(_0x2a47a6,_0x31d8f9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x317c98}):_0x2a47a6[_0x31d8f9]=_0x317c98,W=(_0x2ceab3,_0x28bd59,_0x17c8a4,_0x24fc32)=>{const _0x558aaa=_0x4d9893;for(var _0x5c38ae=_0x24fc32>0x1?void 0x0:_0x24fc32?L(_0x28bd59,_0x17c8a4):_0x28bd59,_0x4f995b=_0x2ceab3[_0x558aaa(0xfa)]-0x1,_0x54fdf8;_0x4f995b>=0x0;_0x4f995b--)(_0x54fdf8=_0x2ceab3[_0x4f995b])&&(_0x5c38ae=_0x54fdf8(_0x5c38ae)||_0x5c38ae);return _0x5c38ae;},O=(_0x462731,_0x2b18c3)=>(_0x1a2e56,_0x2038cc)=>_0x2b18c3(_0x1a2e56,_0x2038cc,_0x462731),N=(_0x1a88ae,_0x118b64,_0x213e65)=>Z(_0x1a88ae,typeof _0x118b64!='symbol'?_0x118b64+'':_0x118b64,_0x213e65);function _0x407f(_0x1bf611,_0x4a5ccf){_0x1bf611=_0x1bf611-0x8a;const _0x921fea=_0x921f();let _0x407f39=_0x921fea[_0x1bf611];return _0x407f39;}exports[_0x4d9893(0xf5)]=class extends c[_0x4d9893(0xcb)]{constructor(_0x47a1e2=D,_0x3f3adb,_0x4d9de7){const _0x4ecd55=_0x4d9893;super(),this[_0x4ecd55(0xa2)]=_0x47a1e2,this['_injector']=_0x3f3adb,this['_configService']=_0x4d9de7;const {..._0x37a6f6}=c[_0x4ecd55(0x9d)]({},D,this[_0x4ecd55(0xa2)]);this[_0x4ecd55(0xfc)][_0x4ecd55(0x9a)](q,_0x37a6f6);}[_0x4d9893(0xe6)](){[[p],[g],[_]]['forEach'](_0x4b0da5=>{const _0x2a58fe=_0x407f;this[_0x2a58fe(0xa8)]['add'](_0x4b0da5);});}[_0x4d9893(0x92)](){const _0x5a07aa=_0x4d9893;this['_injector']['get'](g),this[_0x5a07aa(0xa8)][_0x5a07aa(0xec)](_);}},N(exports[_0x4d9893(0xf5)],_0x4d9893(0xc0),U),N(exports[_0x4d9893(0xf5)],'type',c[_0x4d9893(0xd6)][_0x4d9893(0x8c)]),exports[_0x4d9893(0xf5)]=W([c[_0x4d9893(0x91)](w[_0x4d9893(0xe0)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x4d9893(0xe3)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x4d9893(0xf5)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x433b96=_0x2d2d;(function(_0x50bea8,_0xbb9379){const _0x47d297=_0x2d2d,_0x42fc46=_0x50bea8();while(!![]){try{const _0x4726c5=parseInt(_0x47d297(0x152))/0x1*(parseInt(_0x47d297(0x10b))/0x2)+parseInt(_0x47d297(0x11e))/0x3+parseInt(_0x47d297(0x147))/0x4*(parseInt(_0x47d297(0x117))/0x5)+parseInt(_0x47d297(0x162))/0x6*(-parseInt(_0x47d297(0x122))/0x7)+-parseInt(_0x47d297(0x153))/0x8+parseInt(_0x47d297(0x111))/0x9*(parseInt(_0x47d297(0x13f))/0xa)+parseInt(_0x47d297(0x12c))/0xb*(-parseInt(_0x47d297(0x15d))/0xc);if(_0x4726c5===_0xbb9379)break;else _0x42fc46['push'](_0x42fc46['shift']());}catch(_0x31e359){_0x42fc46['push'](_0x42fc46['shift']());}}}(_0x3c1b,0x48652));import{CommentService as _0x27be94,CollaborationSessionService as _0x23c102,UniverCollaborationClientPlugin as _0x47447c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51e432}from'@univerjs-pro/license';import{dayjs as _0x502aa8,UserManagerService as _0x3e832f,Inject as _0x19a2f3,Injector as _0x1c9719,Disposable as _0x35f606,CustomRangeType as _0x2671e9,UniverInstanceType as _0x1a8c17,DependentOn as _0x5d048e,IConfigService as _0x3e7a47,Plugin as _0x5ee83e,merge as _0x1eba46}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x48228f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x541f7f,IThreadCommentDataSourceService as _0x22dd5c}from'@univerjs/thread-comment';import{bufferTime as _0x5655f9}from'rxjs';import{HTTPService as _0x588861}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x40dae8=>(_0x40dae8[_0x40dae8[_0x433b96(0x169)]=0x0]=_0x433b96(0x169),_0x40dae8[_0x40dae8[_0x433b96(0x142)]=0x1]=_0x433b96(0x142),_0x40dae8[_0x40dae8['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x40dae8))(I||{}),v=(_0x273244=>(_0x273244[_0x273244[_0x433b96(0x114)]=0x0]=_0x433b96(0x114),_0x273244[_0x273244[_0x433b96(0x104)]=0x1]=_0x433b96(0x104),_0x273244[_0x273244[_0x433b96(0x131)]=0x2]=_0x433b96(0x131),_0x273244[_0x273244[_0x433b96(0x115)]=0x3]='Edit',_0x273244[_0x273244[_0x433b96(0x103)]=0x4]=_0x433b96(0x103),_0x273244[_0x273244[_0x433b96(0x140)]=0x5]=_0x433b96(0x140),_0x273244[_0x273244['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x273244))(v||{});const y=_0x51a32e=>_0x502aa8(new Date(+_0x51a32e))['format'](_0x433b96(0x10f)),B=async(_0x14d92c,_0x49c8e0)=>{const _0x4dd617=_0x433b96,_0x9fe6e8=_0x14d92c[_0x4dd617(0x138)](_0x3e832f),_0x44f06c=_0x14d92c[_0x4dd617(0x138)](_0x588861);_0x49c8e0[_0x4dd617(0x15e)](_0x4f8176=>{const _0x369fa5=_0x4dd617;_0x9fe6e8[_0x369fa5(0x13b)](_0x4f8176)&&_0x49c8e0[_0x369fa5(0x11b)](_0x4f8176);}),_0x49c8e0[_0x4dd617(0x156)]&&(await _0x44f06c['get'](_0x4dd617(0x123),{'params':{'userIDs':[..._0x49c8e0]}}))[_0x4dd617(0x161)][_0x4dd617(0x157)]['forEach'](_0x16cc0b=>{_0x16cc0b&&_0x9fe6e8['addUser'](_0x16cc0b);});};var K=Object[_0x433b96(0x14c)],V=(_0x10f3ee,_0x2e2253,_0x59214d,_0x2b6314)=>{for(var _0x57118e=_0x2b6314>0x1?void 0x0:_0x2b6314?K(_0x2e2253,_0x59214d):_0x2e2253,_0x55461d=_0x10f3ee['length']-0x1,_0x1b5262;_0x55461d>=0x0;_0x55461d--)(_0x1b5262=_0x10f3ee[_0x55461d])&&(_0x57118e=_0x1b5262(_0x57118e)||_0x57118e);return _0x57118e;},p=(_0x5cf432,_0x5a478f)=>(_0x3e1be0,_0x4cf1b0)=>_0x5a478f(_0x3e1be0,_0x4cf1b0,_0x5cf432);let _=class extends _0x35f606{constructor(_0x25c1f3,_0x266fc4,_0x441f07,_0x4e875f){const _0x773ae4=_0x433b96;super(),this[_0x773ae4(0x108)]=_0x25c1f3,this[_0x773ae4(0x143)]=_0x266fc4,this[_0x773ae4(0x145)]=_0x441f07,this[_0x773ae4(0x13c)]=_0x4e875f,this[_0x773ae4(0x12f)](),this[_0x773ae4(0x135)]();}[_0x433b96(0x135)](){const _0x47686c=_0x433b96;this['disposeWithMe'](this[_0x47686c(0x143)][_0x47686c(0x163)]['pipe'](_0x5655f9(0x10))[_0x47686c(0x144)](_0x23662b=>{const _0x4f1827=_0x47686c,_0x879589=new Set();_0x23662b[_0x4f1827(0x15e)](_0x44ec6b=>{const _0x3b3520=_0x4f1827;if(_0x44ec6b[_0x3b3520(0x130)]===_0x3b3520(0x116)){const _0x527aea=_0x44ec6b[_0x3b3520(0x166)]['personId'];_0x879589[_0x3b3520(0x116)](_0x527aea);}}),B(this[_0x4f1827(0x13c)],_0x879589);}));}[_0x433b96(0x12f)](){const _0x489d87=_0x433b96;this['disposeWithMe'](this['_commentService'][_0x489d87(0x163)][_0x489d87(0x144)](async _0x13ba43=>{const _0x40975b=_0x489d87;var _0x36b484,_0x1c9635,_0x26b4c2,_0x1267b7;const _0x56dc6d=(_0x36b484=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43['unitId'])[_0x40975b(0x150)](_0x52439b=>_0x52439b[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x36b484[_0x40975b(0x110)];if(!_0x56dc6d)return;const {unitId:_0xbddecb,subUnitId:_0x581a2a}=_0x56dc6d;switch(_0x13ba43['user']&&this['_userService'][_0x40975b(0x139)](_0x13ba43[_0x40975b(0x11c)]),_0x13ba43[_0x40975b(0x130)]){case v['Add']:break;case v['Reply']:{this[_0x40975b(0x143)][_0x40975b(0x12b)](_0xbddecb,_0x581a2a,{'unitId':_0xbddecb,'subUnitId':_0x581a2a,'ref':'','id':_0x13ba43[_0x40975b(0x165)],'dT':y(+_0x13ba43[_0x40975b(0x155)]),'threadId':_0x13ba43[_0x40975b(0x12e)],'personId':(_0x26b4c2=(_0x1c9635=_0x13ba43[_0x40975b(0x11c)])==null?void 0x0:_0x1c9635['userID'])!=null?_0x26b4c2:_0x13ba43[_0x40975b(0x149)],'text':JSON[_0x40975b(0x14e)](_0x13ba43[_0x40975b(0x10c)]),'parentId':_0x56dc6d['id']});break;}case v[_0x40975b(0x103)]:{const _0x2eb9c1=this[_0x40975b(0x143)][_0x40975b(0x121)](_0xbddecb,_0x581a2a,_0x13ba43[_0x40975b(0x165)]);_0x2eb9c1&&_0x2eb9c1[_0x40975b(0x167)]&&this[_0x40975b(0x143)][_0x40975b(0x146)](_0xbddecb,_0x581a2a,_0x13ba43['replyId']);break;}case v[_0x40975b(0x115)]:{this['_threadCommentModel']['updateComment'](_0xbddecb,_0x581a2a,{'commentId':_0x13ba43[_0x40975b(0x165)],'text':JSON[_0x40975b(0x14e)](_0x13ba43['content'])});break;}case v[_0x40975b(0x140)]:{const _0x56638a=(_0x1267b7=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43[_0x40975b(0x10d)])[_0x40975b(0x150)](_0x116310=>_0x116310[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x1267b7[_0x40975b(0x110)];_0x56638a&&this[_0x40975b(0x143)][_0x40975b(0x136)](_0xbddecb,_0x581a2a,_0x56638a['id'],_0x13ba43[_0x40975b(0x15b)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x19a2f3(_0x27be94)),p(0x1,_0x19a2f3(_0x541f7f)),p(0x2,_0x19a2f3(_0x3e832f)),p(0x3,_0x19a2f3(_0x1c9719))],_);const z=_0x433b96(0x133),O={};var k=Object[_0x433b96(0x14c)],Q=(_0x3f5b43,_0x1d6a02,_0x4fe5fb,_0x3de444)=>{const _0x39f9c5=_0x433b96;for(var _0x348d3e=_0x3de444>0x1?void 0x0:_0x3de444?k(_0x1d6a02,_0x4fe5fb):_0x1d6a02,_0x2ba7c8=_0x3f5b43[_0x39f9c5(0x105)]-0x1,_0x5b29ec;_0x2ba7c8>=0x0;_0x2ba7c8--)(_0x5b29ec=_0x3f5b43[_0x2ba7c8])&&(_0x348d3e=_0x5b29ec(_0x348d3e)||_0x348d3e);return _0x348d3e;},b=(_0x2b7581,_0x346c15)=>(_0x2926e0,_0x11b43a)=>_0x346c15(_0x2926e0,_0x11b43a,_0x2b7581);function X(_0x1a6340,_0xaf4e7){const _0x3d962d=_0x433b96,_0x10e3a4=_0x1a6340[_0x3d962d(0x137)][0x0];return{..._0xaf4e7,'id':_0x10e3a4[_0x3d962d(0x165)],'resolved':_0x1a6340['solved']===0x1,'dT':y(_0x10e3a4['createTimestamp']),'personId':_0x10e3a4[_0x3d962d(0x149)],'threadId':_0x10e3a4[_0x3d962d(0x12e)]};}function ee(_0x16cba8,_0x193cb6,_0x58d4e7){const _0x37937c=_0x433b96;var _0x24ea70,_0x5b362c;if(((_0x5b362c=(_0x24ea70=_0x16cba8==null?void 0x0:_0x16cba8[_0x37937c(0x137)])==null?void 0x0:_0x24ea70[_0x37937c(0x105)])!=null?_0x5b362c:0x0)>0x0){const _0x27a919=(_0x488fc2,_0x7e0f8d)=>({'id':_0x488fc2['replyId'],'threadId':_0x488fc2[_0x37937c(0x12e)],'dT':y(_0x488fc2[_0x37937c(0x155)]),'personId':_0x488fc2['userId'],'resolved':_0x16cba8[_0x37937c(0x15b)]===I['Solved'],'unitId':_0x193cb6,'subUnitId':_0x58d4e7,'text':JSON[_0x37937c(0x14e)](_0x488fc2[_0x37937c(0x10c)]),'parentId':_0x7e0f8d}),_0x107c7d=_0x27a919(_0x16cba8[_0x37937c(0x137)][0x0]);return{..._0x107c7d,'children':_0x16cba8[_0x37937c(0x137)][_0x37937c(0x168)](0x1)['map'](_0x1e08bc=>_0x27a919(_0x1e08bc,_0x107c7d['id']))};}return null;}function _0x3c1b(){const _0x2e1a90=['Delete','Add','length','_config','filter','_commentService','format','rangeType','18VgaRom','content','unitId','values','YYYY/MM/DD\x20HH:mm','root','9SVmUEB','saveCommentToSnapshot','code','Unknown','Edit','add','5RNgFst','map','comments','getCurrentUser','delete','user','UNRECOGNIZED','1129521mAfFll','getUnit','reply','getComment','525yoKHhZ','/universer-api/user/list','COMMENT','listComments','stringify','ref','_initDataSource','pluginName','resolved','addComment','67749NFxljc','_configService','threadId','_init','type','Reply','/delete','thread-comment-data-source.config','/add','_initUserSync','resolveComment','replies','get','addUser','userID','getUser','_injector','setConfig','UNIVER_UNKNOWN','3002530ZXmUzJ','Solve','rangeId','Solved','_threadCommentModel','subscribe','_userService','deleteComment','531064ZYWPlg','/reply','userId','_httpService','getMemberID','getOwnPropertyDescriptor','post','parse','customRanges','find','/edit','31227gXTnXh','4117336iRvNMz','_threadCommentDataSourceService','createTimestamp','size','users','syncUpdateMutationToColla','_sessionService','error','solved','/universer-api/comment/unit/','396mNynyT','forEach','_threadCommentDataSource','/list','body','6090LoMMXa','commentUpdate$','requireSession','replyId','payload','parentId','slice','OpenOrReOpen'];_0x3c1b=function(){return _0x2e1a90;};return _0x3c1b();}let S=class{constructor(_0x56ebf8,_0x1f435e,_0x34fb4f){const _0x713bf=_0x433b96;this[_0x713bf(0x14a)]=_0x56ebf8,this[_0x713bf(0x145)]=_0x1f435e,this[_0x713bf(0x159)]=_0x34fb4f;}async[_0x433b96(0x12b)](_0x1e0166){const _0x33e0e9=_0x433b96;var _0x218879,_0x1a5ad3;const {parentId:_0x3e0de8,unitId:_0x5354e5,text:_0x547d21,threadId:_0x4eb96d}=_0x1e0166,_0x210e39=(_0x1a5ad3=(_0x218879=_0x547d21[_0x33e0e9(0x14f)])==null?void 0x0:_0x218879[_0x33e0e9(0x107)](_0x5ac22e=>_0x5ac22e[_0x33e0e9(0x10a)]===_0x2671e9[_0x33e0e9(0x124)])[_0x33e0e9(0x118)](_0x4a523b=>_0x4a523b['rangeId']))!=null?_0x1a5ad3:[],_0x3ba879=JSON['stringify'](_0x547d21),_0xda0c44=(await this[_0x33e0e9(0x159)][_0x33e0e9(0x164)](_0x5354e5))[_0x33e0e9(0x14b)]();if(_0x3e0de8){const _0x1e7e36={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39,'threadId':_0x4eb96d},_0x45eb26=(await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x148),{'body':_0x1e7e36}))[_0x33e0e9(0x161)][_0x33e0e9(0x120)];return{..._0x1e0166,'id':_0x45eb26[_0x33e0e9(0x165)],'dT':_0x502aa8(+_0x45eb26[_0x33e0e9(0x155)])[_0x33e0e9(0x109)](_0x33e0e9(0x10f)),'personId':_0x45eb26['userId']};}else{const _0x2b6205={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39},_0x496b40=await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x134),{'body':_0x2b6205});return X(_0x496b40[_0x33e0e9(0x161)]['comment'],_0x1e0166);}}async['updateComment'](_0x1349ba){const _0x383eaf=_0x433b96;var _0x552fab,_0x529c60;const {text:_0x293243,unitId:_0x38ea43}=_0x1349ba,_0x20e1dc=(_0x529c60=(_0x552fab=_0x293243[_0x383eaf(0x14f)])==null?void 0x0:_0x552fab['filter'](_0x12a5cc=>_0x12a5cc[_0x383eaf(0x10a)]===_0x2671e9[_0x383eaf(0x124)])[_0x383eaf(0x118)](_0x531ac0=>_0x531ac0[_0x383eaf(0x141)]))!=null?_0x529c60:[],_0x307461=JSON[_0x383eaf(0x126)](_0x293243),_0x24494d=_0x1349ba['threadId'],_0x44d4b3=_0x1349ba['id'],_0x241784={'memberId':(await this[_0x383eaf(0x159)]['requireSession'](_0x38ea43))['getMemberID'](),'unitId':_0x38ea43,'threadId':_0x24494d,'mention':_0x20e1dc,'content':_0x307461,'replyId':_0x44d4b3},_0x4999e7=await this[_0x383eaf(0x14a)][_0x383eaf(0x14d)](_0x383eaf(0x15c)+_0x38ea43+_0x383eaf(0x151),{'body':_0x241784});return!_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)]||_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)][_0x383eaf(0x113)]===0x1;}async['resolveComment'](_0x1ac0c1){const _0x2dc82c=_0x433b96,{unitId:_0x1d17ed}=_0x1ac0c1,_0xc49917=_0x1ac0c1[_0x2dc82c(0x12e)],_0x41b141={'memberId':this[_0x2dc82c(0x145)][_0x2dc82c(0x11a)]()[_0x2dc82c(0x13a)],'unitId':_0x1d17ed,'threadId':_0xc49917,'solved':_0x1ac0c1[_0x2dc82c(0x12a)]?I['Solved']:I[_0x2dc82c(0x169)]},_0x58df3f=await this[_0x2dc82c(0x14a)]['post'](_0x2dc82c(0x15c)+_0x1d17ed+'/solved',{'body':_0x41b141});return!_0x58df3f[_0x2dc82c(0x161)][_0x2dc82c(0x15a)]||_0x58df3f[_0x2dc82c(0x161)]['error'][_0x2dc82c(0x113)]===0x1;}async[_0x433b96(0x146)](_0x228c3d,_0xbb5bb9,_0x5343dc,_0x5b9a01){const _0xc5baf3=_0x433b96,_0x520b22={'memberId':(await this[_0xc5baf3(0x159)][_0xc5baf3(0x164)](_0x228c3d))['getMemberID'](),'threadId':_0x5343dc,'replyId':_0x5b9a01,'unitId':_0x228c3d},_0x53ca17=await this[_0xc5baf3(0x14a)][_0xc5baf3(0x14d)](_0xc5baf3(0x15c)+_0x228c3d+_0xc5baf3(0x132),{'body':_0x520b22});return!_0x53ca17['body']['error']||_0x53ca17['body'][_0xc5baf3(0x15a)][_0xc5baf3(0x113)]===0x1;}async[_0x433b96(0x125)](_0x11f100,_0x390026,_0x25f4a4){const _0x2d1cde=_0x433b96,_0x5a04f1={'unitId':_0x11f100,'threadId':_0x25f4a4},_0x5d105d=await this['_httpService'][_0x2d1cde(0x14d)](_0x2d1cde(0x15c)+_0x11f100+_0x2d1cde(0x160),{'body':_0x5a04f1}),_0x3f0bba=_0x25f4a4[_0x2d1cde(0x118)](_0x133227=>ee(_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x119)][_0x133227],_0x11f100,_0x390026))[_0x2d1cde(0x107)](Boolean);return Object[_0x2d1cde(0x10e)](_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x157)])['forEach'](_0x1c123b=>{const _0x434c66=_0x2d1cde;this['_userService'][_0x434c66(0x139)](_0x1c123b);}),_0x3f0bba;}[_0x433b96(0x112)](_0x226f37){const _0x4711dd=_0x433b96;return{'id':_0x226f37['id'],'threadId':_0x226f37[_0x4711dd(0x12e)],'ref':_0x226f37[_0x4711dd(0x127)]};}};S=Q([b(0x0,_0x19a2f3(_0x588861)),b(0x1,_0x19a2f3(_0x3e832f)),b(0x2,_0x19a2f3(_0x23c102))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x25486c,_0x2b1918,_0xe538fb,_0x460f47)=>{const _0x1e7bc4=_0x433b96;for(var _0x28ce06=_0x460f47>0x1?void 0x0:_0x460f47?re(_0x2b1918,_0xe538fb):_0x2b1918,_0x12bd81=_0x25486c[_0x1e7bc4(0x105)]-0x1,_0x837542;_0x12bd81>=0x0;_0x12bd81--)(_0x837542=_0x25486c[_0x12bd81])&&(_0x28ce06=_0x837542(_0x28ce06)||_0x28ce06);return _0x28ce06;},M=(_0x51aa06,_0x3ec4df)=>(_0x2f426d,_0x2b5afd)=>_0x3ec4df(_0x2f426d,_0x2b5afd,_0x51aa06);let f=class extends _0x35f606{constructor(_0x3d6206,_0xe8f24e){const _0x87d9b=_0x433b96;super(),this[_0x87d9b(0x154)]=_0x3d6206,this['_threadCommentDataSource']=_0xe8f24e,this['_initDataSource']();}[_0x433b96(0x128)](){const _0x4759ad=_0x433b96;this[_0x4759ad(0x154)]['dataSource']=this[_0x4759ad(0x15f)],this['_threadCommentDataSourceService'][_0x4759ad(0x158)]=!0x1;}};f=te([M(0x0,_0x22dd5c),M(0x1,_0x19a2f3(S))],f);function _0x2d2d(_0x2a3eac,_0x2cd947){_0x2a3eac=_0x2a3eac-0x103;const _0x3c1b51=_0x3c1b();let _0x2d2d46=_0x3c1b51[_0x2a3eac];return _0x2d2d46;}var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3dc511,_0x16befb,_0x2177aa)=>_0x16befb in _0x3dc511?se(_0x3dc511,_0x16befb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2177aa}):_0x3dc511[_0x16befb]=_0x2177aa,ie=(_0x378558,_0x40153c,_0x2e7d75,_0x1cf7df)=>{const _0x4f9018=_0x433b96;for(var _0x3962bf=_0x1cf7df>0x1?void 0x0:_0x1cf7df?oe(_0x40153c,_0x2e7d75):_0x40153c,_0x391e69=_0x378558[_0x4f9018(0x105)]-0x1,_0x4a6900;_0x391e69>=0x0;_0x391e69--)(_0x4a6900=_0x378558[_0x391e69])&&(_0x3962bf=_0x4a6900(_0x3962bf)||_0x3962bf);return _0x3962bf;},N=(_0x46a19f,_0x429be6)=>(_0x4ed3d9,_0x3891c9)=>_0x429be6(_0x4ed3d9,_0x3891c9,_0x46a19f),$=(_0x200737,_0x18b45a,_0xd171c6)=>ne(_0x200737,typeof _0x18b45a!='symbol'?_0x18b45a+'':_0x18b45a,_0xd171c6);let g=class extends _0x5ee83e{constructor(_0x546da7=O,_0x10b821,_0x6bb5ba){const _0x55bfec=_0x433b96;super(),this[_0x55bfec(0x106)]=_0x546da7,this[_0x55bfec(0x13c)]=_0x10b821,this[_0x55bfec(0x12d)]=_0x6bb5ba;const {..._0x5ef9c9}=_0x1eba46({},O,this[_0x55bfec(0x106)]);this[_0x55bfec(0x12d)][_0x55bfec(0x13d)](z,_0x5ef9c9);}['onStarting'](){const _0x204933=_0x433b96;[[S],[f],[_]][_0x204933(0x15e)](_0x174d8e=>{const _0x353bc6=_0x204933;this[_0x353bc6(0x13c)][_0x353bc6(0x116)](_0x174d8e);});}['onReady'](){const _0x247d36=_0x433b96;this[_0x247d36(0x13c)][_0x247d36(0x138)](f),this[_0x247d36(0x13c)][_0x247d36(0x138)](_);}};$(g,_0x433b96(0x129),W),$(g,_0x433b96(0x130),_0x1a8c17[_0x433b96(0x13e)]),g=ie([_0x5d048e(_0x48228f,_0x47447c,_0x51e432),N(0x1,_0x19a2f3(_0x1c9719)),N(0x2,_0x3e7a47)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5502ef=_0x6c3d;(function(_0x19a02a,_0x3148c0){const _0x3b5673=_0x6c3d,_0x32203f=_0x19a02a();while(!![]){try{const _0xeea4f4=parseInt(_0x3b5673(0xf4))/0x1*(-parseInt(_0x3b5673(0x109))/0x2)+-parseInt(_0x3b5673(0x108))/0x3*(parseInt(_0x3b5673(0x130))/0x4)+parseInt(_0x3b5673(0xff))/0x5+parseInt(_0x3b5673(0xeb))/0x6*(-parseInt(_0x3b5673(0xf5))/0x7)+-parseInt(_0x3b5673(0x11e))/0x8+parseInt(_0x3b5673(0xd7))/0x9+parseInt(_0x3b5673(0xf7))/0xa*(parseInt(_0x3b5673(0xef))/0xb);if(_0xeea4f4===_0x3148c0)break;else _0x32203f['push'](_0x32203f['shift']());}catch(_0x3a312f){_0x32203f['push'](_0x32203f['shift']());}}}(_0x4c9d,0x1fca8));import{CommentService as _0x384589,CollaborationSessionService as _0x4648a7,UniverCollaborationClientPlugin as _0xbacb1d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4273b7}from'@univerjs-pro/license';import{dayjs as _0x46326d,UserManagerService as _0x27db51,Inject as _0x4bcd01,Injector as _0x3fde1a,Disposable as _0x57944e,CustomRangeType as _0x486a80,UniverInstanceType as _0x486682,DependentOn as _0x56a696,IConfigService as _0x2e8d6c,Plugin as _0x2cdc95,merge as _0x1425e8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11d26e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x82c273,IThreadCommentDataSourceService as _0x49bb57}from'@univerjs/thread-comment';function _0x6c3d(_0x37e9de,_0x2cddf4){_0x37e9de=_0x37e9de-0xd3;const _0x4c9d6f=_0x4c9d();let _0x6c3d0f=_0x4c9d6f[_0x37e9de];return _0x6c3d0f;}import{bufferTime as _0x30b318}from'rxjs';function _0x4c9d(){const _0x15b6e7=['dataSource','resolved','_httpService','thread-comment-data-source.config','Solve','_config','rangeId','threadId','comment','_sessionService','_threadCommentDataSourceService','OpenOrReOpen','personId','replies','users','6vBTVin','commentUpdate$','code','_initUserSync','6798ibJrAG','userID','createTimestamp','map','solved','75930itfKTx','1306613ydaNvL','customRanges','4730VfOyJz','pipe','content','filter','Delete','pluginName','Edit','addUser','716215fHxlLQ','forEach','root','values','body','updateComment','Add','find','/add','12CGkRVB','2MKkafv','disposeWithMe','_threadCommentDataSource','_threadCommentModel','rangeType','unitId','size','replyId','reply','parentId','/list','slice','YYYY/MM/DD\x20HH:mm','Reply','getCurrentUser','/universer-api/comment/unit/','_injector','/solved','Unknown','Solved','format','1813040rVTUOU','addComment','defineProperty','getComment','deleteComment','_initDataSource','userId','getMemberID','UNRECOGNIZED','user','requireSession','resolveComment','COMMENT','post','add','get','_init','getOwnPropertyDescriptor','17552hYYdbV','/universer-api/user/list','onReady','subscribe','_configService','_userService','/edit','error','saveCommentToSnapshot','1812870MuZphA','syncUpdateMutationToColla','parse','type','length'];_0x4c9d=function(){return _0x15b6e7;};return _0x4c9d();}import{HTTPService as _0x4487a0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5b6a11=>(_0x5b6a11[_0x5b6a11[_0x5502ef(0xe7)]=0x0]=_0x5502ef(0xe7),_0x5b6a11[_0x5b6a11[_0x5502ef(0x11c)]=0x1]=_0x5502ef(0x11c),_0x5b6a11[_0x5b6a11[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x5b6a11))(I||{}),v=(_0x18381d=>(_0x18381d[_0x18381d['Unknown']=0x0]=_0x5502ef(0x11b),_0x18381d[_0x18381d[_0x5502ef(0x105)]=0x1]=_0x5502ef(0x105),_0x18381d[_0x18381d['Reply']=0x2]=_0x5502ef(0x116),_0x18381d[_0x18381d[_0x5502ef(0xfd)]=0x3]=_0x5502ef(0xfd),_0x18381d[_0x18381d[_0x5502ef(0xfb)]=0x4]=_0x5502ef(0xfb),_0x18381d[_0x18381d[_0x5502ef(0xe0)]=0x5]=_0x5502ef(0xe0),_0x18381d[_0x18381d[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x18381d))(v||{});const y=_0x2c1584=>_0x46326d(new Date(+_0x2c1584))[_0x5502ef(0x11d)](_0x5502ef(0x115)),B=async(_0x657c59,_0x1db819)=>{const _0x4cfbaa=_0x5502ef,_0x27bcdb=_0x657c59[_0x4cfbaa(0x12d)](_0x27db51),_0x1680cc=_0x657c59[_0x4cfbaa(0x12d)](_0x4487a0);_0x1db819[_0x4cfbaa(0x100)](_0x156408=>{_0x27bcdb['getUser'](_0x156408)&&_0x1db819['delete'](_0x156408);}),_0x1db819[_0x4cfbaa(0x10f)]&&(await _0x1680cc[_0x4cfbaa(0x12d)](_0x4cfbaa(0x131),{'params':{'userIDs':[..._0x1db819]}}))[_0x4cfbaa(0x103)][_0x4cfbaa(0xea)][_0x4cfbaa(0x100)](_0x1edb5f=>{const _0x2b0e2e=_0x4cfbaa;_0x1edb5f&&_0x27bcdb[_0x2b0e2e(0xfe)](_0x1edb5f);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3d0357,_0x1f97d5,_0x38f3c8,_0xcd4924)=>{const _0x9ede38=_0x5502ef;for(var _0x580322=_0xcd4924>0x1?void 0x0:_0xcd4924?K(_0x1f97d5,_0x38f3c8):_0x1f97d5,_0x5ce02e=_0x3d0357[_0x9ede38(0xdb)]-0x1,_0x20cd4b;_0x5ce02e>=0x0;_0x5ce02e--)(_0x20cd4b=_0x3d0357[_0x5ce02e])&&(_0x580322=_0x20cd4b(_0x580322)||_0x580322);return _0x580322;},p=(_0x3be05e,_0x1c1942)=>(_0x55356e,_0x3166af)=>_0x1c1942(_0x55356e,_0x3166af,_0x3be05e);let _=class extends _0x57944e{constructor(_0x26567a,_0x253629,_0x1923ca,_0x347c33){const _0x2d40d5=_0x5502ef;super(),this['_commentService']=_0x26567a,this[_0x2d40d5(0x10c)]=_0x253629,this['_userService']=_0x1923ca,this[_0x2d40d5(0x119)]=_0x347c33,this[_0x2d40d5(0x12e)](),this[_0x2d40d5(0xee)]();}[_0x5502ef(0xee)](){const _0x4c71d0=_0x5502ef;this[_0x4c71d0(0x10a)](this[_0x4c71d0(0x10c)][_0x4c71d0(0xec)][_0x4c71d0(0xf8)](_0x30b318(0x10))[_0x4c71d0(0x133)](_0x1ba8b2=>{const _0x533292=new Set();_0x1ba8b2['forEach'](_0xf9b475=>{const _0xb3b3cf=_0x6c3d;if(_0xf9b475[_0xb3b3cf(0xda)]===_0xb3b3cf(0x12c)){const _0x5ac8dd=_0xf9b475['payload'][_0xb3b3cf(0xe8)];_0x533292[_0xb3b3cf(0x12c)](_0x5ac8dd);}}),B(this['_injector'],_0x533292);}));}[_0x5502ef(0x12e)](){const _0x113680=_0x5502ef;this[_0x113680(0x10a)](this['_commentService'][_0x113680(0xec)][_0x113680(0x133)](async _0x54feed=>{const _0x15d514=_0x113680;var _0x501ab7,_0x3af9f0,_0xac0b7b,_0x43d864;const _0x1cc4a0=(_0x501ab7=this[_0x15d514(0x10c)]['getUnit'](_0x54feed['unitId'])[_0x15d514(0x106)](_0xc4bc9e=>_0xc4bc9e[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x501ab7[_0x15d514(0x101)];if(!_0x1cc4a0)return;const {unitId:_0x296b6e,subUnitId:_0x4879cf}=_0x1cc4a0;switch(_0x54feed[_0x15d514(0x127)]&&this['_userService'][_0x15d514(0xfe)](_0x54feed[_0x15d514(0x127)]),_0x54feed['type']){case v[_0x15d514(0x105)]:break;case v[_0x15d514(0x116)]:{this[_0x15d514(0x10c)][_0x15d514(0x11f)](_0x296b6e,_0x4879cf,{'unitId':_0x296b6e,'subUnitId':_0x4879cf,'ref':'','id':_0x54feed[_0x15d514(0x110)],'dT':y(+_0x54feed[_0x15d514(0xf1)]),'threadId':_0x54feed[_0x15d514(0xe3)],'personId':(_0xac0b7b=(_0x3af9f0=_0x54feed[_0x15d514(0x127)])==null?void 0x0:_0x3af9f0[_0x15d514(0xf0)])!=null?_0xac0b7b:_0x54feed[_0x15d514(0x124)],'text':JSON[_0x15d514(0xd9)](_0x54feed['content']),'parentId':_0x1cc4a0['id']});break;}case v[_0x15d514(0xfb)]:{const _0x5c5bff=this[_0x15d514(0x10c)][_0x15d514(0x121)](_0x296b6e,_0x4879cf,_0x54feed['replyId']);_0x5c5bff&&_0x5c5bff[_0x15d514(0x112)]&&this[_0x15d514(0x10c)][_0x15d514(0x122)](_0x296b6e,_0x4879cf,_0x54feed[_0x15d514(0x110)]);break;}case v[_0x15d514(0xfd)]:{this['_threadCommentModel'][_0x15d514(0x104)](_0x296b6e,_0x4879cf,{'commentId':_0x54feed['replyId'],'text':JSON[_0x15d514(0xd9)](_0x54feed['content'])});break;}case v[_0x15d514(0xe0)]:{const _0x417757=(_0x43d864=this['_threadCommentModel']['getUnit'](_0x54feed[_0x15d514(0x10e)])[_0x15d514(0x106)](_0x45d009=>_0x45d009[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x43d864[_0x15d514(0x101)];_0x417757&&this[_0x15d514(0x10c)][_0x15d514(0x129)](_0x296b6e,_0x4879cf,_0x417757['id'],_0x54feed[_0x15d514(0xf3)]===I[_0x15d514(0x11c)]);break;}}}));}};_=V([p(0x0,_0x4bcd01(_0x384589)),p(0x1,_0x4bcd01(_0x82c273)),p(0x2,_0x4bcd01(_0x27db51)),p(0x3,_0x4bcd01(_0x3fde1a))],_);const z=_0x5502ef(0xdf),O={};var k=Object[_0x5502ef(0x12f)],Q=(_0x1115d8,_0x2b2626,_0x81fe15,_0x21201c)=>{const _0x5c29ad=_0x5502ef;for(var _0x43afe1=_0x21201c>0x1?void 0x0:_0x21201c?k(_0x2b2626,_0x81fe15):_0x2b2626,_0x396ed7=_0x1115d8[_0x5c29ad(0xdb)]-0x1,_0x2d5ddb;_0x396ed7>=0x0;_0x396ed7--)(_0x2d5ddb=_0x1115d8[_0x396ed7])&&(_0x43afe1=_0x2d5ddb(_0x43afe1)||_0x43afe1);return _0x43afe1;},b=(_0x53fa4b,_0xd2d989)=>(_0x1948ef,_0x1ab021)=>_0xd2d989(_0x1948ef,_0x1ab021,_0x53fa4b);function X(_0x27783f,_0x55f584){const _0x5d6b52=_0x5502ef,_0x126ec8=_0x27783f[_0x5d6b52(0xe9)][0x0];return{..._0x55f584,'id':_0x126ec8[_0x5d6b52(0x110)],'resolved':_0x27783f['solved']===0x1,'dT':y(_0x126ec8[_0x5d6b52(0xf1)]),'personId':_0x126ec8[_0x5d6b52(0x124)],'threadId':_0x126ec8[_0x5d6b52(0xe3)]};}function ee(_0x3cd999,_0x416f6d,_0x143aba){const _0x9db4b=_0x5502ef;var _0x31695b,_0x219fa7;if(((_0x219fa7=(_0x31695b=_0x3cd999==null?void 0x0:_0x3cd999[_0x9db4b(0xe9)])==null?void 0x0:_0x31695b[_0x9db4b(0xdb)])!=null?_0x219fa7:0x0)>0x0){const _0x40d3b5=(_0x34abc9,_0x4b6350)=>({'id':_0x34abc9[_0x9db4b(0x110)],'threadId':_0x34abc9['threadId'],'dT':y(_0x34abc9[_0x9db4b(0xf1)]),'personId':_0x34abc9['userId'],'resolved':_0x3cd999[_0x9db4b(0xf3)]===I[_0x9db4b(0x11c)],'unitId':_0x416f6d,'subUnitId':_0x143aba,'text':JSON['parse'](_0x34abc9[_0x9db4b(0xf9)]),'parentId':_0x4b6350}),_0x314cc4=_0x40d3b5(_0x3cd999[_0x9db4b(0xe9)][0x0]);return{..._0x314cc4,'children':_0x3cd999['replies'][_0x9db4b(0x114)](0x1)[_0x9db4b(0xf2)](_0xd26377=>_0x40d3b5(_0xd26377,_0x314cc4['id']))};}return null;}let S=class{constructor(_0x25b219,_0x279756,_0x4a54b6){const _0x4e93a9=_0x5502ef;this[_0x4e93a9(0xde)]=_0x25b219,this[_0x4e93a9(0xd3)]=_0x279756,this[_0x4e93a9(0xe5)]=_0x4a54b6;}async[_0x5502ef(0x11f)](_0x2198b3){const _0x2d5ec8=_0x5502ef;var _0xd23009,_0x15427d;const {parentId:_0x25a4e2,unitId:_0x3acb94,text:_0x41ec0b,threadId:_0x276f2a}=_0x2198b3,_0x596727=(_0x15427d=(_0xd23009=_0x41ec0b[_0x2d5ec8(0xf6)])==null?void 0x0:_0xd23009[_0x2d5ec8(0xfa)](_0x4148b3=>_0x4148b3[_0x2d5ec8(0x10d)]===_0x486a80[_0x2d5ec8(0x12a)])[_0x2d5ec8(0xf2)](_0x496d93=>_0x496d93['rangeId']))!=null?_0x15427d:[],_0x667b60=JSON['stringify'](_0x41ec0b),_0x4d26d3=(await this[_0x2d5ec8(0xe5)]['requireSession'](_0x3acb94))['getMemberID']();if(_0x25a4e2){const _0x25f7e4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727,'threadId':_0x276f2a},_0x41eeac=(await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+'/reply',{'body':_0x25f7e4}))[_0x2d5ec8(0x103)][_0x2d5ec8(0x111)];return{..._0x2198b3,'id':_0x41eeac[_0x2d5ec8(0x110)],'dT':_0x46326d(+_0x41eeac[_0x2d5ec8(0xf1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x41eeac[_0x2d5ec8(0x124)]};}else{const _0x5a2af4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727},_0x46c442=await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+_0x2d5ec8(0x107),{'body':_0x5a2af4});return X(_0x46c442[_0x2d5ec8(0x103)][_0x2d5ec8(0xe4)],_0x2198b3);}}async['updateComment'](_0x2d15d4){const _0x1cb45b=_0x5502ef;var _0x21da22,_0x38e3a1;const {text:_0x18b35a,unitId:_0x3a3216}=_0x2d15d4,_0x2dd3d7=(_0x38e3a1=(_0x21da22=_0x18b35a['customRanges'])==null?void 0x0:_0x21da22[_0x1cb45b(0xfa)](_0x49c750=>_0x49c750[_0x1cb45b(0x10d)]===_0x486a80[_0x1cb45b(0x12a)])[_0x1cb45b(0xf2)](_0x5a9771=>_0x5a9771[_0x1cb45b(0xe2)]))!=null?_0x38e3a1:[],_0x77ccb4=JSON['stringify'](_0x18b35a),_0x1e8672=_0x2d15d4[_0x1cb45b(0xe3)],_0x43e31c=_0x2d15d4['id'],_0x33c30d={'memberId':(await this[_0x1cb45b(0xe5)][_0x1cb45b(0x128)](_0x3a3216))['getMemberID'](),'unitId':_0x3a3216,'threadId':_0x1e8672,'mention':_0x2dd3d7,'content':_0x77ccb4,'replyId':_0x43e31c},_0x3954f5=await this[_0x1cb45b(0xde)][_0x1cb45b(0x12b)](_0x1cb45b(0x118)+_0x3a3216+_0x1cb45b(0xd4),{'body':_0x33c30d});return!_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)]||_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)][_0x1cb45b(0xed)]===0x1;}async[_0x5502ef(0x129)](_0x42cf16){const _0x134633=_0x5502ef,{unitId:_0x1011b6}=_0x42cf16,_0x741f78=_0x42cf16['threadId'],_0xf28209={'memberId':this[_0x134633(0xd3)][_0x134633(0x117)]()[_0x134633(0xf0)],'unitId':_0x1011b6,'threadId':_0x741f78,'solved':_0x42cf16[_0x134633(0xdd)]?I[_0x134633(0x11c)]:I['OpenOrReOpen']},_0x2cb7f5=await this[_0x134633(0xde)][_0x134633(0x12b)]('/universer-api/comment/unit/'+_0x1011b6+_0x134633(0x11a),{'body':_0xf28209});return!_0x2cb7f5['body'][_0x134633(0xd5)]||_0x2cb7f5[_0x134633(0x103)][_0x134633(0xd5)][_0x134633(0xed)]===0x1;}async[_0x5502ef(0x122)](_0x199ca0,_0x3ffdfe,_0x4a3a36,_0x77629f){const _0x392413=_0x5502ef,_0x4f2ac3={'memberId':(await this[_0x392413(0xe5)][_0x392413(0x128)](_0x199ca0))[_0x392413(0x125)](),'threadId':_0x4a3a36,'replyId':_0x77629f,'unitId':_0x199ca0},_0x57f60f=await this['_httpService'][_0x392413(0x12b)](_0x392413(0x118)+_0x199ca0+'/delete',{'body':_0x4f2ac3});return!_0x57f60f['body'][_0x392413(0xd5)]||_0x57f60f[_0x392413(0x103)]['error'][_0x392413(0xed)]===0x1;}async['listComments'](_0x1cf0e6,_0x549585,_0x5e5a69){const _0x2f1732=_0x5502ef,_0x4d5a9a={'unitId':_0x1cf0e6,'threadId':_0x5e5a69},_0x416232=await this[_0x2f1732(0xde)][_0x2f1732(0x12b)](_0x2f1732(0x118)+_0x1cf0e6+_0x2f1732(0x113),{'body':_0x4d5a9a}),_0x412e8=_0x5e5a69[_0x2f1732(0xf2)](_0x3095d7=>ee(_0x416232[_0x2f1732(0x103)]['comments'][_0x3095d7],_0x1cf0e6,_0x549585))[_0x2f1732(0xfa)](Boolean);return Object[_0x2f1732(0x102)](_0x416232[_0x2f1732(0x103)][_0x2f1732(0xea)])[_0x2f1732(0x100)](_0x507473=>{const _0x4dd1fa=_0x2f1732;this['_userService'][_0x4dd1fa(0xfe)](_0x507473);}),_0x412e8;}[_0x5502ef(0xd6)](_0xd406e){const _0x1a094f=_0x5502ef;return{'id':_0xd406e['id'],'threadId':_0xd406e[_0x1a094f(0xe3)],'ref':_0xd406e['ref']};}};S=Q([b(0x0,_0x4bcd01(_0x4487a0)),b(0x1,_0x4bcd01(_0x27db51)),b(0x2,_0x4bcd01(_0x4648a7))],S);var re=Object[_0x5502ef(0x12f)],te=(_0x4fe564,_0x305496,_0x494da1,_0x523969)=>{const _0x5da8ff=_0x5502ef;for(var _0x5b9584=_0x523969>0x1?void 0x0:_0x523969?re(_0x305496,_0x494da1):_0x305496,_0x1a059a=_0x4fe564[_0x5da8ff(0xdb)]-0x1,_0x2fc531;_0x1a059a>=0x0;_0x1a059a--)(_0x2fc531=_0x4fe564[_0x1a059a])&&(_0x5b9584=_0x2fc531(_0x5b9584)||_0x5b9584);return _0x5b9584;},M=(_0x438c9b,_0xa6f0f6)=>(_0x41f0ff,_0x27bac4)=>_0xa6f0f6(_0x41f0ff,_0x27bac4,_0x438c9b);let f=class extends _0x57944e{constructor(_0x1c140a,_0x2a37df){const _0x400922=_0x5502ef;super(),this[_0x400922(0xe6)]=_0x1c140a,this[_0x400922(0x10b)]=_0x2a37df,this['_initDataSource']();}[_0x5502ef(0x123)](){const _0x295691=_0x5502ef;this[_0x295691(0xe6)][_0x295691(0xdc)]=this['_threadCommentDataSource'],this[_0x295691(0xe6)][_0x295691(0xd8)]=!0x1;}};f=te([M(0x0,_0x49bb57),M(0x1,_0x4bcd01(S))],f);var se=Object[_0x5502ef(0x120)],oe=Object[_0x5502ef(0x12f)],ne=(_0x2b2d8a,_0x490009,_0x446ff8)=>_0x490009 in _0x2b2d8a?se(_0x2b2d8a,_0x490009,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x446ff8}):_0x2b2d8a[_0x490009]=_0x446ff8,ie=(_0x2cfb48,_0x4d72e5,_0x2ca01f,_0x1df935)=>{for(var _0x5c1628=_0x1df935>0x1?void 0x0:_0x1df935?oe(_0x4d72e5,_0x2ca01f):_0x4d72e5,_0x4765db=_0x2cfb48['length']-0x1,_0x28be5e;_0x4765db>=0x0;_0x4765db--)(_0x28be5e=_0x2cfb48[_0x4765db])&&(_0x5c1628=_0x28be5e(_0x5c1628)||_0x5c1628);return _0x5c1628;},N=(_0xa8815c,_0x157fe2)=>(_0x4400e0,_0x59cee3)=>_0x157fe2(_0x4400e0,_0x59cee3,_0xa8815c),$=(_0x30c66c,_0x30f413,_0x1ea869)=>ne(_0x30c66c,typeof _0x30f413!='symbol'?_0x30f413+'':_0x30f413,_0x1ea869);let g=class extends _0x2cdc95{constructor(_0x1df3a3=O,_0x77e181,_0x2fd41e){const _0x6b2442=_0x5502ef;super(),this[_0x6b2442(0xe1)]=_0x1df3a3,this[_0x6b2442(0x119)]=_0x77e181,this[_0x6b2442(0x134)]=_0x2fd41e;const {..._0x50a352}=_0x1425e8({},O,this[_0x6b2442(0xe1)]);this[_0x6b2442(0x134)]['setConfig'](z,_0x50a352);}['onStarting'](){const _0x11dcc8=_0x5502ef;[[S],[f],[_]][_0x11dcc8(0x100)](_0x461bc1=>{const _0xdd882d=_0x11dcc8;this[_0xdd882d(0x119)]['add'](_0x461bc1);});}[_0x5502ef(0x132)](){const _0xe778b5=_0x5502ef;this[_0xe778b5(0x119)]['get'](f),this[_0xe778b5(0x119)][_0xe778b5(0x12d)](_);}};$(g,_0x5502ef(0xfc),W),$(g,_0x5502ef(0xda),_0x486682['UNIVER_UNKNOWN']),g=ie([_0x56a696(_0x11d26e,_0xbacb1d,_0x4273b7),N(0x1,_0x4bcd01(_0x3fde1a)),N(0x2,_0x2e8d6c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x433b96=_0x2d2d;(function(_0x50bea8,_0xbb9379){const _0x47d297=_0x2d2d,_0x42fc46=_0x50bea8();while(!![]){try{const _0x4726c5=parseInt(_0x47d297(0x152))/0x1*(parseInt(_0x47d297(0x10b))/0x2)+parseInt(_0x47d297(0x11e))/0x3+parseInt(_0x47d297(0x147))/0x4*(parseInt(_0x47d297(0x117))/0x5)+parseInt(_0x47d297(0x162))/0x6*(-parseInt(_0x47d297(0x122))/0x7)+-parseInt(_0x47d297(0x153))/0x8+parseInt(_0x47d297(0x111))/0x9*(parseInt(_0x47d297(0x13f))/0xa)+parseInt(_0x47d297(0x12c))/0xb*(-parseInt(_0x47d297(0x15d))/0xc);if(_0x4726c5===_0xbb9379)break;else _0x42fc46['push'](_0x42fc46['shift']());}catch(_0x31e359){_0x42fc46['push'](_0x42fc46['shift']());}}}(_0x3c1b,0x48652));import{CommentService as _0x27be94,CollaborationSessionService as _0x23c102,UniverCollaborationClientPlugin as _0x47447c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51e432}from'@univerjs-pro/license';import{dayjs as _0x502aa8,UserManagerService as _0x3e832f,Inject as _0x19a2f3,Injector as _0x1c9719,Disposable as _0x35f606,CustomRangeType as _0x2671e9,UniverInstanceType as _0x1a8c17,DependentOn as _0x5d048e,IConfigService as _0x3e7a47,Plugin as _0x5ee83e,merge as _0x1eba46}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x48228f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x541f7f,IThreadCommentDataSourceService as _0x22dd5c}from'@univerjs/thread-comment';import{bufferTime as _0x5655f9}from'rxjs';import{HTTPService as _0x588861}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x40dae8=>(_0x40dae8[_0x40dae8[_0x433b96(0x169)]=0x0]=_0x433b96(0x169),_0x40dae8[_0x40dae8[_0x433b96(0x142)]=0x1]=_0x433b96(0x142),_0x40dae8[_0x40dae8['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x40dae8))(I||{}),v=(_0x273244=>(_0x273244[_0x273244[_0x433b96(0x114)]=0x0]=_0x433b96(0x114),_0x273244[_0x273244[_0x433b96(0x104)]=0x1]=_0x433b96(0x104),_0x273244[_0x273244[_0x433b96(0x131)]=0x2]=_0x433b96(0x131),_0x273244[_0x273244[_0x433b96(0x115)]=0x3]='Edit',_0x273244[_0x273244[_0x433b96(0x103)]=0x4]=_0x433b96(0x103),_0x273244[_0x273244[_0x433b96(0x140)]=0x5]=_0x433b96(0x140),_0x273244[_0x273244['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x273244))(v||{});const y=_0x51a32e=>_0x502aa8(new Date(+_0x51a32e))['format'](_0x433b96(0x10f)),B=async(_0x14d92c,_0x49c8e0)=>{const _0x4dd617=_0x433b96,_0x9fe6e8=_0x14d92c[_0x4dd617(0x138)](_0x3e832f),_0x44f06c=_0x14d92c[_0x4dd617(0x138)](_0x588861);_0x49c8e0[_0x4dd617(0x15e)](_0x4f8176=>{const _0x369fa5=_0x4dd617;_0x9fe6e8[_0x369fa5(0x13b)](_0x4f8176)&&_0x49c8e0[_0x369fa5(0x11b)](_0x4f8176);}),_0x49c8e0[_0x4dd617(0x156)]&&(await _0x44f06c['get'](_0x4dd617(0x123),{'params':{'userIDs':[..._0x49c8e0]}}))[_0x4dd617(0x161)][_0x4dd617(0x157)]['forEach'](_0x16cc0b=>{_0x16cc0b&&_0x9fe6e8['addUser'](_0x16cc0b);});};var K=Object[_0x433b96(0x14c)],V=(_0x10f3ee,_0x2e2253,_0x59214d,_0x2b6314)=>{for(var _0x57118e=_0x2b6314>0x1?void 0x0:_0x2b6314?K(_0x2e2253,_0x59214d):_0x2e2253,_0x55461d=_0x10f3ee['length']-0x1,_0x1b5262;_0x55461d>=0x0;_0x55461d--)(_0x1b5262=_0x10f3ee[_0x55461d])&&(_0x57118e=_0x1b5262(_0x57118e)||_0x57118e);return _0x57118e;},p=(_0x5cf432,_0x5a478f)=>(_0x3e1be0,_0x4cf1b0)=>_0x5a478f(_0x3e1be0,_0x4cf1b0,_0x5cf432);let _=class extends _0x35f606{constructor(_0x25c1f3,_0x266fc4,_0x441f07,_0x4e875f){const _0x773ae4=_0x433b96;super(),this[_0x773ae4(0x108)]=_0x25c1f3,this[_0x773ae4(0x143)]=_0x266fc4,this[_0x773ae4(0x145)]=_0x441f07,this[_0x773ae4(0x13c)]=_0x4e875f,this[_0x773ae4(0x12f)](),this[_0x773ae4(0x135)]();}[_0x433b96(0x135)](){const _0x47686c=_0x433b96;this['disposeWithMe'](this[_0x47686c(0x143)][_0x47686c(0x163)]['pipe'](_0x5655f9(0x10))[_0x47686c(0x144)](_0x23662b=>{const _0x4f1827=_0x47686c,_0x879589=new Set();_0x23662b[_0x4f1827(0x15e)](_0x44ec6b=>{const _0x3b3520=_0x4f1827;if(_0x44ec6b[_0x3b3520(0x130)]===_0x3b3520(0x116)){const _0x527aea=_0x44ec6b[_0x3b3520(0x166)]['personId'];_0x879589[_0x3b3520(0x116)](_0x527aea);}}),B(this[_0x4f1827(0x13c)],_0x879589);}));}[_0x433b96(0x12f)](){const _0x489d87=_0x433b96;this['disposeWithMe'](this['_commentService'][_0x489d87(0x163)][_0x489d87(0x144)](async _0x13ba43=>{const _0x40975b=_0x489d87;var _0x36b484,_0x1c9635,_0x26b4c2,_0x1267b7;const _0x56dc6d=(_0x36b484=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43['unitId'])[_0x40975b(0x150)](_0x52439b=>_0x52439b[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x36b484[_0x40975b(0x110)];if(!_0x56dc6d)return;const {unitId:_0xbddecb,subUnitId:_0x581a2a}=_0x56dc6d;switch(_0x13ba43['user']&&this['_userService'][_0x40975b(0x139)](_0x13ba43[_0x40975b(0x11c)]),_0x13ba43[_0x40975b(0x130)]){case v['Add']:break;case v['Reply']:{this[_0x40975b(0x143)][_0x40975b(0x12b)](_0xbddecb,_0x581a2a,{'unitId':_0xbddecb,'subUnitId':_0x581a2a,'ref':'','id':_0x13ba43[_0x40975b(0x165)],'dT':y(+_0x13ba43[_0x40975b(0x155)]),'threadId':_0x13ba43[_0x40975b(0x12e)],'personId':(_0x26b4c2=(_0x1c9635=_0x13ba43[_0x40975b(0x11c)])==null?void 0x0:_0x1c9635['userID'])!=null?_0x26b4c2:_0x13ba43[_0x40975b(0x149)],'text':JSON[_0x40975b(0x14e)](_0x13ba43[_0x40975b(0x10c)]),'parentId':_0x56dc6d['id']});break;}case v[_0x40975b(0x103)]:{const _0x2eb9c1=this[_0x40975b(0x143)][_0x40975b(0x121)](_0xbddecb,_0x581a2a,_0x13ba43[_0x40975b(0x165)]);_0x2eb9c1&&_0x2eb9c1[_0x40975b(0x167)]&&this[_0x40975b(0x143)][_0x40975b(0x146)](_0xbddecb,_0x581a2a,_0x13ba43['replyId']);break;}case v[_0x40975b(0x115)]:{this['_threadCommentModel']['updateComment'](_0xbddecb,_0x581a2a,{'commentId':_0x13ba43[_0x40975b(0x165)],'text':JSON[_0x40975b(0x14e)](_0x13ba43['content'])});break;}case v[_0x40975b(0x140)]:{const _0x56638a=(_0x1267b7=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43[_0x40975b(0x10d)])[_0x40975b(0x150)](_0x116310=>_0x116310[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x1267b7[_0x40975b(0x110)];_0x56638a&&this[_0x40975b(0x143)][_0x40975b(0x136)](_0xbddecb,_0x581a2a,_0x56638a['id'],_0x13ba43[_0x40975b(0x15b)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x19a2f3(_0x27be94)),p(0x1,_0x19a2f3(_0x541f7f)),p(0x2,_0x19a2f3(_0x3e832f)),p(0x3,_0x19a2f3(_0x1c9719))],_);const z=_0x433b96(0x133),O={};var k=Object[_0x433b96(0x14c)],Q=(_0x3f5b43,_0x1d6a02,_0x4fe5fb,_0x3de444)=>{const _0x39f9c5=_0x433b96;for(var _0x348d3e=_0x3de444>0x1?void 0x0:_0x3de444?k(_0x1d6a02,_0x4fe5fb):_0x1d6a02,_0x2ba7c8=_0x3f5b43[_0x39f9c5(0x105)]-0x1,_0x5b29ec;_0x2ba7c8>=0x0;_0x2ba7c8--)(_0x5b29ec=_0x3f5b43[_0x2ba7c8])&&(_0x348d3e=_0x5b29ec(_0x348d3e)||_0x348d3e);return _0x348d3e;},b=(_0x2b7581,_0x346c15)=>(_0x2926e0,_0x11b43a)=>_0x346c15(_0x2926e0,_0x11b43a,_0x2b7581);function X(_0x1a6340,_0xaf4e7){const _0x3d962d=_0x433b96,_0x10e3a4=_0x1a6340[_0x3d962d(0x137)][0x0];return{..._0xaf4e7,'id':_0x10e3a4[_0x3d962d(0x165)],'resolved':_0x1a6340['solved']===0x1,'dT':y(_0x10e3a4['createTimestamp']),'personId':_0x10e3a4[_0x3d962d(0x149)],'threadId':_0x10e3a4[_0x3d962d(0x12e)]};}function ee(_0x16cba8,_0x193cb6,_0x58d4e7){const _0x37937c=_0x433b96;var _0x24ea70,_0x5b362c;if(((_0x5b362c=(_0x24ea70=_0x16cba8==null?void 0x0:_0x16cba8[_0x37937c(0x137)])==null?void 0x0:_0x24ea70[_0x37937c(0x105)])!=null?_0x5b362c:0x0)>0x0){const _0x27a919=(_0x488fc2,_0x7e0f8d)=>({'id':_0x488fc2['replyId'],'threadId':_0x488fc2[_0x37937c(0x12e)],'dT':y(_0x488fc2[_0x37937c(0x155)]),'personId':_0x488fc2['userId'],'resolved':_0x16cba8[_0x37937c(0x15b)]===I['Solved'],'unitId':_0x193cb6,'subUnitId':_0x58d4e7,'text':JSON[_0x37937c(0x14e)](_0x488fc2[_0x37937c(0x10c)]),'parentId':_0x7e0f8d}),_0x107c7d=_0x27a919(_0x16cba8[_0x37937c(0x137)][0x0]);return{..._0x107c7d,'children':_0x16cba8[_0x37937c(0x137)][_0x37937c(0x168)](0x1)['map'](_0x1e08bc=>_0x27a919(_0x1e08bc,_0x107c7d['id']))};}return null;}function _0x3c1b(){const _0x2e1a90=['Delete','Add','length','_config','filter','_commentService','format','rangeType','18VgaRom','content','unitId','values','YYYY/MM/DD\x20HH:mm','root','9SVmUEB','saveCommentToSnapshot','code','Unknown','Edit','add','5RNgFst','map','comments','getCurrentUser','delete','user','UNRECOGNIZED','1129521mAfFll','getUnit','reply','getComment','525yoKHhZ','/universer-api/user/list','COMMENT','listComments','stringify','ref','_initDataSource','pluginName','resolved','addComment','67749NFxljc','_configService','threadId','_init','type','Reply','/delete','thread-comment-data-source.config','/add','_initUserSync','resolveComment','replies','get','addUser','userID','getUser','_injector','setConfig','UNIVER_UNKNOWN','3002530ZXmUzJ','Solve','rangeId','Solved','_threadCommentModel','subscribe','_userService','deleteComment','531064ZYWPlg','/reply','userId','_httpService','getMemberID','getOwnPropertyDescriptor','post','parse','customRanges','find','/edit','31227gXTnXh','4117336iRvNMz','_threadCommentDataSourceService','createTimestamp','size','users','syncUpdateMutationToColla','_sessionService','error','solved','/universer-api/comment/unit/','396mNynyT','forEach','_threadCommentDataSource','/list','body','6090LoMMXa','commentUpdate$','requireSession','replyId','payload','parentId','slice','OpenOrReOpen'];_0x3c1b=function(){return _0x2e1a90;};return _0x3c1b();}let S=class{constructor(_0x56ebf8,_0x1f435e,_0x34fb4f){const _0x713bf=_0x433b96;this[_0x713bf(0x14a)]=_0x56ebf8,this[_0x713bf(0x145)]=_0x1f435e,this[_0x713bf(0x159)]=_0x34fb4f;}async[_0x433b96(0x12b)](_0x1e0166){const _0x33e0e9=_0x433b96;var _0x218879,_0x1a5ad3;const {parentId:_0x3e0de8,unitId:_0x5354e5,text:_0x547d21,threadId:_0x4eb96d}=_0x1e0166,_0x210e39=(_0x1a5ad3=(_0x218879=_0x547d21[_0x33e0e9(0x14f)])==null?void 0x0:_0x218879[_0x33e0e9(0x107)](_0x5ac22e=>_0x5ac22e[_0x33e0e9(0x10a)]===_0x2671e9[_0x33e0e9(0x124)])[_0x33e0e9(0x118)](_0x4a523b=>_0x4a523b['rangeId']))!=null?_0x1a5ad3:[],_0x3ba879=JSON['stringify'](_0x547d21),_0xda0c44=(await this[_0x33e0e9(0x159)][_0x33e0e9(0x164)](_0x5354e5))[_0x33e0e9(0x14b)]();if(_0x3e0de8){const _0x1e7e36={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39,'threadId':_0x4eb96d},_0x45eb26=(await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x148),{'body':_0x1e7e36}))[_0x33e0e9(0x161)][_0x33e0e9(0x120)];return{..._0x1e0166,'id':_0x45eb26[_0x33e0e9(0x165)],'dT':_0x502aa8(+_0x45eb26[_0x33e0e9(0x155)])[_0x33e0e9(0x109)](_0x33e0e9(0x10f)),'personId':_0x45eb26['userId']};}else{const _0x2b6205={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39},_0x496b40=await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x134),{'body':_0x2b6205});return X(_0x496b40[_0x33e0e9(0x161)]['comment'],_0x1e0166);}}async['updateComment'](_0x1349ba){const _0x383eaf=_0x433b96;var _0x552fab,_0x529c60;const {text:_0x293243,unitId:_0x38ea43}=_0x1349ba,_0x20e1dc=(_0x529c60=(_0x552fab=_0x293243[_0x383eaf(0x14f)])==null?void 0x0:_0x552fab['filter'](_0x12a5cc=>_0x12a5cc[_0x383eaf(0x10a)]===_0x2671e9[_0x383eaf(0x124)])[_0x383eaf(0x118)](_0x531ac0=>_0x531ac0[_0x383eaf(0x141)]))!=null?_0x529c60:[],_0x307461=JSON[_0x383eaf(0x126)](_0x293243),_0x24494d=_0x1349ba['threadId'],_0x44d4b3=_0x1349ba['id'],_0x241784={'memberId':(await this[_0x383eaf(0x159)]['requireSession'](_0x38ea43))['getMemberID'](),'unitId':_0x38ea43,'threadId':_0x24494d,'mention':_0x20e1dc,'content':_0x307461,'replyId':_0x44d4b3},_0x4999e7=await this[_0x383eaf(0x14a)][_0x383eaf(0x14d)](_0x383eaf(0x15c)+_0x38ea43+_0x383eaf(0x151),{'body':_0x241784});return!_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)]||_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)][_0x383eaf(0x113)]===0x1;}async['resolveComment'](_0x1ac0c1){const _0x2dc82c=_0x433b96,{unitId:_0x1d17ed}=_0x1ac0c1,_0xc49917=_0x1ac0c1[_0x2dc82c(0x12e)],_0x41b141={'memberId':this[_0x2dc82c(0x145)][_0x2dc82c(0x11a)]()[_0x2dc82c(0x13a)],'unitId':_0x1d17ed,'threadId':_0xc49917,'solved':_0x1ac0c1[_0x2dc82c(0x12a)]?I['Solved']:I[_0x2dc82c(0x169)]},_0x58df3f=await this[_0x2dc82c(0x14a)]['post'](_0x2dc82c(0x15c)+_0x1d17ed+'/solved',{'body':_0x41b141});return!_0x58df3f[_0x2dc82c(0x161)][_0x2dc82c(0x15a)]||_0x58df3f[_0x2dc82c(0x161)]['error'][_0x2dc82c(0x113)]===0x1;}async[_0x433b96(0x146)](_0x228c3d,_0xbb5bb9,_0x5343dc,_0x5b9a01){const _0xc5baf3=_0x433b96,_0x520b22={'memberId':(await this[_0xc5baf3(0x159)][_0xc5baf3(0x164)](_0x228c3d))['getMemberID'](),'threadId':_0x5343dc,'replyId':_0x5b9a01,'unitId':_0x228c3d},_0x53ca17=await this[_0xc5baf3(0x14a)][_0xc5baf3(0x14d)](_0xc5baf3(0x15c)+_0x228c3d+_0xc5baf3(0x132),{'body':_0x520b22});return!_0x53ca17['body']['error']||_0x53ca17['body'][_0xc5baf3(0x15a)][_0xc5baf3(0x113)]===0x1;}async[_0x433b96(0x125)](_0x11f100,_0x390026,_0x25f4a4){const _0x2d1cde=_0x433b96,_0x5a04f1={'unitId':_0x11f100,'threadId':_0x25f4a4},_0x5d105d=await this['_httpService'][_0x2d1cde(0x14d)](_0x2d1cde(0x15c)+_0x11f100+_0x2d1cde(0x160),{'body':_0x5a04f1}),_0x3f0bba=_0x25f4a4[_0x2d1cde(0x118)](_0x133227=>ee(_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x119)][_0x133227],_0x11f100,_0x390026))[_0x2d1cde(0x107)](Boolean);return Object[_0x2d1cde(0x10e)](_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x157)])['forEach'](_0x1c123b=>{const _0x434c66=_0x2d1cde;this['_userService'][_0x434c66(0x139)](_0x1c123b);}),_0x3f0bba;}[_0x433b96(0x112)](_0x226f37){const _0x4711dd=_0x433b96;return{'id':_0x226f37['id'],'threadId':_0x226f37[_0x4711dd(0x12e)],'ref':_0x226f37[_0x4711dd(0x127)]};}};S=Q([b(0x0,_0x19a2f3(_0x588861)),b(0x1,_0x19a2f3(_0x3e832f)),b(0x2,_0x19a2f3(_0x23c102))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x25486c,_0x2b1918,_0xe538fb,_0x460f47)=>{const _0x1e7bc4=_0x433b96;for(var _0x28ce06=_0x460f47>0x1?void 0x0:_0x460f47?re(_0x2b1918,_0xe538fb):_0x2b1918,_0x12bd81=_0x25486c[_0x1e7bc4(0x105)]-0x1,_0x837542;_0x12bd81>=0x0;_0x12bd81--)(_0x837542=_0x25486c[_0x12bd81])&&(_0x28ce06=_0x837542(_0x28ce06)||_0x28ce06);return _0x28ce06;},M=(_0x51aa06,_0x3ec4df)=>(_0x2f426d,_0x2b5afd)=>_0x3ec4df(_0x2f426d,_0x2b5afd,_0x51aa06);let f=class extends _0x35f606{constructor(_0x3d6206,_0xe8f24e){const _0x87d9b=_0x433b96;super(),this[_0x87d9b(0x154)]=_0x3d6206,this['_threadCommentDataSource']=_0xe8f24e,this['_initDataSource']();}[_0x433b96(0x128)](){const _0x4759ad=_0x433b96;this[_0x4759ad(0x154)]['dataSource']=this[_0x4759ad(0x15f)],this['_threadCommentDataSourceService'][_0x4759ad(0x158)]=!0x1;}};f=te([M(0x0,_0x22dd5c),M(0x1,_0x19a2f3(S))],f);function _0x2d2d(_0x2a3eac,_0x2cd947){_0x2a3eac=_0x2a3eac-0x103;const _0x3c1b51=_0x3c1b();let _0x2d2d46=_0x3c1b51[_0x2a3eac];return _0x2d2d46;}var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3dc511,_0x16befb,_0x2177aa)=>_0x16befb in _0x3dc511?se(_0x3dc511,_0x16befb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2177aa}):_0x3dc511[_0x16befb]=_0x2177aa,ie=(_0x378558,_0x40153c,_0x2e7d75,_0x1cf7df)=>{const _0x4f9018=_0x433b96;for(var _0x3962bf=_0x1cf7df>0x1?void 0x0:_0x1cf7df?oe(_0x40153c,_0x2e7d75):_0x40153c,_0x391e69=_0x378558[_0x4f9018(0x105)]-0x1,_0x4a6900;_0x391e69>=0x0;_0x391e69--)(_0x4a6900=_0x378558[_0x391e69])&&(_0x3962bf=_0x4a6900(_0x3962bf)||_0x3962bf);return _0x3962bf;},N=(_0x46a19f,_0x429be6)=>(_0x4ed3d9,_0x3891c9)=>_0x429be6(_0x4ed3d9,_0x3891c9,_0x46a19f),$=(_0x200737,_0x18b45a,_0xd171c6)=>ne(_0x200737,typeof _0x18b45a!='symbol'?_0x18b45a+'':_0x18b45a,_0xd171c6);let g=class extends _0x5ee83e{constructor(_0x546da7=O,_0x10b821,_0x6bb5ba){const _0x55bfec=_0x433b96;super(),this[_0x55bfec(0x106)]=_0x546da7,this[_0x55bfec(0x13c)]=_0x10b821,this[_0x55bfec(0x12d)]=_0x6bb5ba;const {..._0x5ef9c9}=_0x1eba46({},O,this[_0x55bfec(0x106)]);this[_0x55bfec(0x12d)][_0x55bfec(0x13d)](z,_0x5ef9c9);}['onStarting'](){const _0x204933=_0x433b96;[[S],[f],[_]][_0x204933(0x15e)](_0x174d8e=>{const _0x353bc6=_0x204933;this[_0x353bc6(0x13c)][_0x353bc6(0x116)](_0x174d8e);});}['onReady'](){const _0x247d36=_0x433b96;this[_0x247d36(0x13c)][_0x247d36(0x138)](f),this[_0x247d36(0x13c)][_0x247d36(0x138)](_);}};$(g,_0x433b96(0x129),W),$(g,_0x433b96(0x130),_0x1a8c17[_0x433b96(0x13e)]),g=ie([_0x5d048e(_0x48228f,_0x47447c,_0x51e432),N(0x1,_0x19a2f3(_0x1c9719)),N(0x2,_0x3e7a47)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5502ef=_0x6c3d;(function(_0x19a02a,_0x3148c0){const _0x3b5673=_0x6c3d,_0x32203f=_0x19a02a();while(!![]){try{const _0xeea4f4=parseInt(_0x3b5673(0xf4))/0x1*(-parseInt(_0x3b5673(0x109))/0x2)+-parseInt(_0x3b5673(0x108))/0x3*(parseInt(_0x3b5673(0x130))/0x4)+parseInt(_0x3b5673(0xff))/0x5+parseInt(_0x3b5673(0xeb))/0x6*(-parseInt(_0x3b5673(0xf5))/0x7)+-parseInt(_0x3b5673(0x11e))/0x8+parseInt(_0x3b5673(0xd7))/0x9+parseInt(_0x3b5673(0xf7))/0xa*(parseInt(_0x3b5673(0xef))/0xb);if(_0xeea4f4===_0x3148c0)break;else _0x32203f['push'](_0x32203f['shift']());}catch(_0x3a312f){_0x32203f['push'](_0x32203f['shift']());}}}(_0x4c9d,0x1fca8));import{CommentService as _0x384589,CollaborationSessionService as _0x4648a7,UniverCollaborationClientPlugin as _0xbacb1d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4273b7}from'@univerjs-pro/license';import{dayjs as _0x46326d,UserManagerService as _0x27db51,Inject as _0x4bcd01,Injector as _0x3fde1a,Disposable as _0x57944e,CustomRangeType as _0x486a80,UniverInstanceType as _0x486682,DependentOn as _0x56a696,IConfigService as _0x2e8d6c,Plugin as _0x2cdc95,merge as _0x1425e8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11d26e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x82c273,IThreadCommentDataSourceService as _0x49bb57}from'@univerjs/thread-comment';function _0x6c3d(_0x37e9de,_0x2cddf4){_0x37e9de=_0x37e9de-0xd3;const _0x4c9d6f=_0x4c9d();let _0x6c3d0f=_0x4c9d6f[_0x37e9de];return _0x6c3d0f;}import{bufferTime as _0x30b318}from'rxjs';function _0x4c9d(){const _0x15b6e7=['dataSource','resolved','_httpService','thread-comment-data-source.config','Solve','_config','rangeId','threadId','comment','_sessionService','_threadCommentDataSourceService','OpenOrReOpen','personId','replies','users','6vBTVin','commentUpdate$','code','_initUserSync','6798ibJrAG','userID','createTimestamp','map','solved','75930itfKTx','1306613ydaNvL','customRanges','4730VfOyJz','pipe','content','filter','Delete','pluginName','Edit','addUser','716215fHxlLQ','forEach','root','values','body','updateComment','Add','find','/add','12CGkRVB','2MKkafv','disposeWithMe','_threadCommentDataSource','_threadCommentModel','rangeType','unitId','size','replyId','reply','parentId','/list','slice','YYYY/MM/DD\x20HH:mm','Reply','getCurrentUser','/universer-api/comment/unit/','_injector','/solved','Unknown','Solved','format','1813040rVTUOU','addComment','defineProperty','getComment','deleteComment','_initDataSource','userId','getMemberID','UNRECOGNIZED','user','requireSession','resolveComment','COMMENT','post','add','get','_init','getOwnPropertyDescriptor','17552hYYdbV','/universer-api/user/list','onReady','subscribe','_configService','_userService','/edit','error','saveCommentToSnapshot','1812870MuZphA','syncUpdateMutationToColla','parse','type','length'];_0x4c9d=function(){return _0x15b6e7;};return _0x4c9d();}import{HTTPService as _0x4487a0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5b6a11=>(_0x5b6a11[_0x5b6a11[_0x5502ef(0xe7)]=0x0]=_0x5502ef(0xe7),_0x5b6a11[_0x5b6a11[_0x5502ef(0x11c)]=0x1]=_0x5502ef(0x11c),_0x5b6a11[_0x5b6a11[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x5b6a11))(I||{}),v=(_0x18381d=>(_0x18381d[_0x18381d['Unknown']=0x0]=_0x5502ef(0x11b),_0x18381d[_0x18381d[_0x5502ef(0x105)]=0x1]=_0x5502ef(0x105),_0x18381d[_0x18381d['Reply']=0x2]=_0x5502ef(0x116),_0x18381d[_0x18381d[_0x5502ef(0xfd)]=0x3]=_0x5502ef(0xfd),_0x18381d[_0x18381d[_0x5502ef(0xfb)]=0x4]=_0x5502ef(0xfb),_0x18381d[_0x18381d[_0x5502ef(0xe0)]=0x5]=_0x5502ef(0xe0),_0x18381d[_0x18381d[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x18381d))(v||{});const y=_0x2c1584=>_0x46326d(new Date(+_0x2c1584))[_0x5502ef(0x11d)](_0x5502ef(0x115)),B=async(_0x657c59,_0x1db819)=>{const _0x4cfbaa=_0x5502ef,_0x27bcdb=_0x657c59[_0x4cfbaa(0x12d)](_0x27db51),_0x1680cc=_0x657c59[_0x4cfbaa(0x12d)](_0x4487a0);_0x1db819[_0x4cfbaa(0x100)](_0x156408=>{_0x27bcdb['getUser'](_0x156408)&&_0x1db819['delete'](_0x156408);}),_0x1db819[_0x4cfbaa(0x10f)]&&(await _0x1680cc[_0x4cfbaa(0x12d)](_0x4cfbaa(0x131),{'params':{'userIDs':[..._0x1db819]}}))[_0x4cfbaa(0x103)][_0x4cfbaa(0xea)][_0x4cfbaa(0x100)](_0x1edb5f=>{const _0x2b0e2e=_0x4cfbaa;_0x1edb5f&&_0x27bcdb[_0x2b0e2e(0xfe)](_0x1edb5f);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3d0357,_0x1f97d5,_0x38f3c8,_0xcd4924)=>{const _0x9ede38=_0x5502ef;for(var _0x580322=_0xcd4924>0x1?void 0x0:_0xcd4924?K(_0x1f97d5,_0x38f3c8):_0x1f97d5,_0x5ce02e=_0x3d0357[_0x9ede38(0xdb)]-0x1,_0x20cd4b;_0x5ce02e>=0x0;_0x5ce02e--)(_0x20cd4b=_0x3d0357[_0x5ce02e])&&(_0x580322=_0x20cd4b(_0x580322)||_0x580322);return _0x580322;},p=(_0x3be05e,_0x1c1942)=>(_0x55356e,_0x3166af)=>_0x1c1942(_0x55356e,_0x3166af,_0x3be05e);let _=class extends _0x57944e{constructor(_0x26567a,_0x253629,_0x1923ca,_0x347c33){const _0x2d40d5=_0x5502ef;super(),this['_commentService']=_0x26567a,this[_0x2d40d5(0x10c)]=_0x253629,this['_userService']=_0x1923ca,this[_0x2d40d5(0x119)]=_0x347c33,this[_0x2d40d5(0x12e)](),this[_0x2d40d5(0xee)]();}[_0x5502ef(0xee)](){const _0x4c71d0=_0x5502ef;this[_0x4c71d0(0x10a)](this[_0x4c71d0(0x10c)][_0x4c71d0(0xec)][_0x4c71d0(0xf8)](_0x30b318(0x10))[_0x4c71d0(0x133)](_0x1ba8b2=>{const _0x533292=new Set();_0x1ba8b2['forEach'](_0xf9b475=>{const _0xb3b3cf=_0x6c3d;if(_0xf9b475[_0xb3b3cf(0xda)]===_0xb3b3cf(0x12c)){const _0x5ac8dd=_0xf9b475['payload'][_0xb3b3cf(0xe8)];_0x533292[_0xb3b3cf(0x12c)](_0x5ac8dd);}}),B(this['_injector'],_0x533292);}));}[_0x5502ef(0x12e)](){const _0x113680=_0x5502ef;this[_0x113680(0x10a)](this['_commentService'][_0x113680(0xec)][_0x113680(0x133)](async _0x54feed=>{const _0x15d514=_0x113680;var _0x501ab7,_0x3af9f0,_0xac0b7b,_0x43d864;const _0x1cc4a0=(_0x501ab7=this[_0x15d514(0x10c)]['getUnit'](_0x54feed['unitId'])[_0x15d514(0x106)](_0xc4bc9e=>_0xc4bc9e[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x501ab7[_0x15d514(0x101)];if(!_0x1cc4a0)return;const {unitId:_0x296b6e,subUnitId:_0x4879cf}=_0x1cc4a0;switch(_0x54feed[_0x15d514(0x127)]&&this['_userService'][_0x15d514(0xfe)](_0x54feed[_0x15d514(0x127)]),_0x54feed['type']){case v[_0x15d514(0x105)]:break;case v[_0x15d514(0x116)]:{this[_0x15d514(0x10c)][_0x15d514(0x11f)](_0x296b6e,_0x4879cf,{'unitId':_0x296b6e,'subUnitId':_0x4879cf,'ref':'','id':_0x54feed[_0x15d514(0x110)],'dT':y(+_0x54feed[_0x15d514(0xf1)]),'threadId':_0x54feed[_0x15d514(0xe3)],'personId':(_0xac0b7b=(_0x3af9f0=_0x54feed[_0x15d514(0x127)])==null?void 0x0:_0x3af9f0[_0x15d514(0xf0)])!=null?_0xac0b7b:_0x54feed[_0x15d514(0x124)],'text':JSON[_0x15d514(0xd9)](_0x54feed['content']),'parentId':_0x1cc4a0['id']});break;}case v[_0x15d514(0xfb)]:{const _0x5c5bff=this[_0x15d514(0x10c)][_0x15d514(0x121)](_0x296b6e,_0x4879cf,_0x54feed['replyId']);_0x5c5bff&&_0x5c5bff[_0x15d514(0x112)]&&this[_0x15d514(0x10c)][_0x15d514(0x122)](_0x296b6e,_0x4879cf,_0x54feed[_0x15d514(0x110)]);break;}case v[_0x15d514(0xfd)]:{this['_threadCommentModel'][_0x15d514(0x104)](_0x296b6e,_0x4879cf,{'commentId':_0x54feed['replyId'],'text':JSON[_0x15d514(0xd9)](_0x54feed['content'])});break;}case v[_0x15d514(0xe0)]:{const _0x417757=(_0x43d864=this['_threadCommentModel']['getUnit'](_0x54feed[_0x15d514(0x10e)])[_0x15d514(0x106)](_0x45d009=>_0x45d009[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x43d864[_0x15d514(0x101)];_0x417757&&this[_0x15d514(0x10c)][_0x15d514(0x129)](_0x296b6e,_0x4879cf,_0x417757['id'],_0x54feed[_0x15d514(0xf3)]===I[_0x15d514(0x11c)]);break;}}}));}};_=V([p(0x0,_0x4bcd01(_0x384589)),p(0x1,_0x4bcd01(_0x82c273)),p(0x2,_0x4bcd01(_0x27db51)),p(0x3,_0x4bcd01(_0x3fde1a))],_);const z=_0x5502ef(0xdf),O={};var k=Object[_0x5502ef(0x12f)],Q=(_0x1115d8,_0x2b2626,_0x81fe15,_0x21201c)=>{const _0x5c29ad=_0x5502ef;for(var _0x43afe1=_0x21201c>0x1?void 0x0:_0x21201c?k(_0x2b2626,_0x81fe15):_0x2b2626,_0x396ed7=_0x1115d8[_0x5c29ad(0xdb)]-0x1,_0x2d5ddb;_0x396ed7>=0x0;_0x396ed7--)(_0x2d5ddb=_0x1115d8[_0x396ed7])&&(_0x43afe1=_0x2d5ddb(_0x43afe1)||_0x43afe1);return _0x43afe1;},b=(_0x53fa4b,_0xd2d989)=>(_0x1948ef,_0x1ab021)=>_0xd2d989(_0x1948ef,_0x1ab021,_0x53fa4b);function X(_0x27783f,_0x55f584){const _0x5d6b52=_0x5502ef,_0x126ec8=_0x27783f[_0x5d6b52(0xe9)][0x0];return{..._0x55f584,'id':_0x126ec8[_0x5d6b52(0x110)],'resolved':_0x27783f['solved']===0x1,'dT':y(_0x126ec8[_0x5d6b52(0xf1)]),'personId':_0x126ec8[_0x5d6b52(0x124)],'threadId':_0x126ec8[_0x5d6b52(0xe3)]};}function ee(_0x3cd999,_0x416f6d,_0x143aba){const _0x9db4b=_0x5502ef;var _0x31695b,_0x219fa7;if(((_0x219fa7=(_0x31695b=_0x3cd999==null?void 0x0:_0x3cd999[_0x9db4b(0xe9)])==null?void 0x0:_0x31695b[_0x9db4b(0xdb)])!=null?_0x219fa7:0x0)>0x0){const _0x40d3b5=(_0x34abc9,_0x4b6350)=>({'id':_0x34abc9[_0x9db4b(0x110)],'threadId':_0x34abc9['threadId'],'dT':y(_0x34abc9[_0x9db4b(0xf1)]),'personId':_0x34abc9['userId'],'resolved':_0x3cd999[_0x9db4b(0xf3)]===I[_0x9db4b(0x11c)],'unitId':_0x416f6d,'subUnitId':_0x143aba,'text':JSON['parse'](_0x34abc9[_0x9db4b(0xf9)]),'parentId':_0x4b6350}),_0x314cc4=_0x40d3b5(_0x3cd999[_0x9db4b(0xe9)][0x0]);return{..._0x314cc4,'children':_0x3cd999['replies'][_0x9db4b(0x114)](0x1)[_0x9db4b(0xf2)](_0xd26377=>_0x40d3b5(_0xd26377,_0x314cc4['id']))};}return null;}let S=class{constructor(_0x25b219,_0x279756,_0x4a54b6){const _0x4e93a9=_0x5502ef;this[_0x4e93a9(0xde)]=_0x25b219,this[_0x4e93a9(0xd3)]=_0x279756,this[_0x4e93a9(0xe5)]=_0x4a54b6;}async[_0x5502ef(0x11f)](_0x2198b3){const _0x2d5ec8=_0x5502ef;var _0xd23009,_0x15427d;const {parentId:_0x25a4e2,unitId:_0x3acb94,text:_0x41ec0b,threadId:_0x276f2a}=_0x2198b3,_0x596727=(_0x15427d=(_0xd23009=_0x41ec0b[_0x2d5ec8(0xf6)])==null?void 0x0:_0xd23009[_0x2d5ec8(0xfa)](_0x4148b3=>_0x4148b3[_0x2d5ec8(0x10d)]===_0x486a80[_0x2d5ec8(0x12a)])[_0x2d5ec8(0xf2)](_0x496d93=>_0x496d93['rangeId']))!=null?_0x15427d:[],_0x667b60=JSON['stringify'](_0x41ec0b),_0x4d26d3=(await this[_0x2d5ec8(0xe5)]['requireSession'](_0x3acb94))['getMemberID']();if(_0x25a4e2){const _0x25f7e4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727,'threadId':_0x276f2a},_0x41eeac=(await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+'/reply',{'body':_0x25f7e4}))[_0x2d5ec8(0x103)][_0x2d5ec8(0x111)];return{..._0x2198b3,'id':_0x41eeac[_0x2d5ec8(0x110)],'dT':_0x46326d(+_0x41eeac[_0x2d5ec8(0xf1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x41eeac[_0x2d5ec8(0x124)]};}else{const _0x5a2af4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727},_0x46c442=await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+_0x2d5ec8(0x107),{'body':_0x5a2af4});return X(_0x46c442[_0x2d5ec8(0x103)][_0x2d5ec8(0xe4)],_0x2198b3);}}async['updateComment'](_0x2d15d4){const _0x1cb45b=_0x5502ef;var _0x21da22,_0x38e3a1;const {text:_0x18b35a,unitId:_0x3a3216}=_0x2d15d4,_0x2dd3d7=(_0x38e3a1=(_0x21da22=_0x18b35a['customRanges'])==null?void 0x0:_0x21da22[_0x1cb45b(0xfa)](_0x49c750=>_0x49c750[_0x1cb45b(0x10d)]===_0x486a80[_0x1cb45b(0x12a)])[_0x1cb45b(0xf2)](_0x5a9771=>_0x5a9771[_0x1cb45b(0xe2)]))!=null?_0x38e3a1:[],_0x77ccb4=JSON['stringify'](_0x18b35a),_0x1e8672=_0x2d15d4[_0x1cb45b(0xe3)],_0x43e31c=_0x2d15d4['id'],_0x33c30d={'memberId':(await this[_0x1cb45b(0xe5)][_0x1cb45b(0x128)](_0x3a3216))['getMemberID'](),'unitId':_0x3a3216,'threadId':_0x1e8672,'mention':_0x2dd3d7,'content':_0x77ccb4,'replyId':_0x43e31c},_0x3954f5=await this[_0x1cb45b(0xde)][_0x1cb45b(0x12b)](_0x1cb45b(0x118)+_0x3a3216+_0x1cb45b(0xd4),{'body':_0x33c30d});return!_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)]||_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)][_0x1cb45b(0xed)]===0x1;}async[_0x5502ef(0x129)](_0x42cf16){const _0x134633=_0x5502ef,{unitId:_0x1011b6}=_0x42cf16,_0x741f78=_0x42cf16['threadId'],_0xf28209={'memberId':this[_0x134633(0xd3)][_0x134633(0x117)]()[_0x134633(0xf0)],'unitId':_0x1011b6,'threadId':_0x741f78,'solved':_0x42cf16[_0x134633(0xdd)]?I[_0x134633(0x11c)]:I['OpenOrReOpen']},_0x2cb7f5=await this[_0x134633(0xde)][_0x134633(0x12b)]('/universer-api/comment/unit/'+_0x1011b6+_0x134633(0x11a),{'body':_0xf28209});return!_0x2cb7f5['body'][_0x134633(0xd5)]||_0x2cb7f5[_0x134633(0x103)][_0x134633(0xd5)][_0x134633(0xed)]===0x1;}async[_0x5502ef(0x122)](_0x199ca0,_0x3ffdfe,_0x4a3a36,_0x77629f){const _0x392413=_0x5502ef,_0x4f2ac3={'memberId':(await this[_0x392413(0xe5)][_0x392413(0x128)](_0x199ca0))[_0x392413(0x125)](),'threadId':_0x4a3a36,'replyId':_0x77629f,'unitId':_0x199ca0},_0x57f60f=await this['_httpService'][_0x392413(0x12b)](_0x392413(0x118)+_0x199ca0+'/delete',{'body':_0x4f2ac3});return!_0x57f60f['body'][_0x392413(0xd5)]||_0x57f60f[_0x392413(0x103)]['error'][_0x392413(0xed)]===0x1;}async['listComments'](_0x1cf0e6,_0x549585,_0x5e5a69){const _0x2f1732=_0x5502ef,_0x4d5a9a={'unitId':_0x1cf0e6,'threadId':_0x5e5a69},_0x416232=await this[_0x2f1732(0xde)][_0x2f1732(0x12b)](_0x2f1732(0x118)+_0x1cf0e6+_0x2f1732(0x113),{'body':_0x4d5a9a}),_0x412e8=_0x5e5a69[_0x2f1732(0xf2)](_0x3095d7=>ee(_0x416232[_0x2f1732(0x103)]['comments'][_0x3095d7],_0x1cf0e6,_0x549585))[_0x2f1732(0xfa)](Boolean);return Object[_0x2f1732(0x102)](_0x416232[_0x2f1732(0x103)][_0x2f1732(0xea)])[_0x2f1732(0x100)](_0x507473=>{const _0x4dd1fa=_0x2f1732;this['_userService'][_0x4dd1fa(0xfe)](_0x507473);}),_0x412e8;}[_0x5502ef(0xd6)](_0xd406e){const _0x1a094f=_0x5502ef;return{'id':_0xd406e['id'],'threadId':_0xd406e[_0x1a094f(0xe3)],'ref':_0xd406e['ref']};}};S=Q([b(0x0,_0x4bcd01(_0x4487a0)),b(0x1,_0x4bcd01(_0x27db51)),b(0x2,_0x4bcd01(_0x4648a7))],S);var re=Object[_0x5502ef(0x12f)],te=(_0x4fe564,_0x305496,_0x494da1,_0x523969)=>{const _0x5da8ff=_0x5502ef;for(var _0x5b9584=_0x523969>0x1?void 0x0:_0x523969?re(_0x305496,_0x494da1):_0x305496,_0x1a059a=_0x4fe564[_0x5da8ff(0xdb)]-0x1,_0x2fc531;_0x1a059a>=0x0;_0x1a059a--)(_0x2fc531=_0x4fe564[_0x1a059a])&&(_0x5b9584=_0x2fc531(_0x5b9584)||_0x5b9584);return _0x5b9584;},M=(_0x438c9b,_0xa6f0f6)=>(_0x41f0ff,_0x27bac4)=>_0xa6f0f6(_0x41f0ff,_0x27bac4,_0x438c9b);let f=class extends _0x57944e{constructor(_0x1c140a,_0x2a37df){const _0x400922=_0x5502ef;super(),this[_0x400922(0xe6)]=_0x1c140a,this[_0x400922(0x10b)]=_0x2a37df,this['_initDataSource']();}[_0x5502ef(0x123)](){const _0x295691=_0x5502ef;this[_0x295691(0xe6)][_0x295691(0xdc)]=this['_threadCommentDataSource'],this[_0x295691(0xe6)][_0x295691(0xd8)]=!0x1;}};f=te([M(0x0,_0x49bb57),M(0x1,_0x4bcd01(S))],f);var se=Object[_0x5502ef(0x120)],oe=Object[_0x5502ef(0x12f)],ne=(_0x2b2d8a,_0x490009,_0x446ff8)=>_0x490009 in _0x2b2d8a?se(_0x2b2d8a,_0x490009,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x446ff8}):_0x2b2d8a[_0x490009]=_0x446ff8,ie=(_0x2cfb48,_0x4d72e5,_0x2ca01f,_0x1df935)=>{for(var _0x5c1628=_0x1df935>0x1?void 0x0:_0x1df935?oe(_0x4d72e5,_0x2ca01f):_0x4d72e5,_0x4765db=_0x2cfb48['length']-0x1,_0x28be5e;_0x4765db>=0x0;_0x4765db--)(_0x28be5e=_0x2cfb48[_0x4765db])&&(_0x5c1628=_0x28be5e(_0x5c1628)||_0x5c1628);return _0x5c1628;},N=(_0xa8815c,_0x157fe2)=>(_0x4400e0,_0x59cee3)=>_0x157fe2(_0x4400e0,_0x59cee3,_0xa8815c),$=(_0x30c66c,_0x30f413,_0x1ea869)=>ne(_0x30c66c,typeof _0x30f413!='symbol'?_0x30f413+'':_0x30f413,_0x1ea869);let g=class extends _0x2cdc95{constructor(_0x1df3a3=O,_0x77e181,_0x2fd41e){const _0x6b2442=_0x5502ef;super(),this[_0x6b2442(0xe1)]=_0x1df3a3,this[_0x6b2442(0x119)]=_0x77e181,this[_0x6b2442(0x134)]=_0x2fd41e;const {..._0x50a352}=_0x1425e8({},O,this[_0x6b2442(0xe1)]);this[_0x6b2442(0x134)]['setConfig'](z,_0x50a352);}['onStarting'](){const _0x11dcc8=_0x5502ef;[[S],[f],[_]][_0x11dcc8(0x100)](_0x461bc1=>{const _0xdd882d=_0x11dcc8;this[_0xdd882d(0x119)]['add'](_0x461bc1);});}[_0x5502ef(0x132)](){const _0xe778b5=_0x5502ef;this[_0xe778b5(0x119)]['get'](f),this[_0xe778b5(0x119)][_0xe778b5(0x12d)](_);}};$(g,_0x5502ef(0xfc),W),$(g,_0x5502ef(0xda),_0x486682['UNIVER_UNKNOWN']),g=ie([_0x56a696(_0x11d26e,_0xbacb1d,_0x4273b7),N(0x1,_0x4bcd01(_0x3fde1a)),N(0x2,_0x2e8d6c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1f33(){const _0x107e8b=['length','UniverNetwork','slice','_sessionService','@univerjs/network','Solved','@univerjs/core','4640140KpGVvO','userID','IThreadCommentDataSourceService','UniverThreadComment','Plugin','exports','Reply','requireSession','createTimestamp','map','userId','thread-comment-data-source.config','user','690VUbmuM','Injector','rangeType','addComment','Add','Delete','updateComment','addUser','getMemberID','format','find','rangeId','Unknown','reply','@univerjs-pro/collaboration-client','getCurrentUser','UniverThreadCommentUIPlugin','disposeWithMe','replies','listComments','@univerjs/thread-comment-ui','UniverInstanceType','post','onStarting','customRanges','IConfigService','UNRECOGNIZED','_threadCommentModel','_threadCommentDataSourceService','merge','Inject','function','_initDataSource','_init','symbol','Disposable','getOwnPropertyDescriptor','UniverLicensePlugin','_initUserSync','threadId','7mHleSS','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','UNIVER_UNKNOWN','Edit','_userService','deleteComment','UniverProThreadCommentDatasource','parentId','4469220AjGuiB','commentUpdate$','getComment','_configService','type','setConfig','_injector','comment','unitId','stringify','resolved','6YEceSN','defineProperty','/universer-api/comment/unit/','pipe','Module','_commentService','getUnit','root','saveCommentToSnapshot','_httpService','replyId','users','pluginName','Solve','parse','7088319ABYSxM','1154076eFjGXH','UserManagerService','@univerjs-pro/license','content','66770psolFu','UniverThreadCommentUi','payload','bufferTime','UniverCollaborationClientPlugin','_threadCommentDataSource','delete','1212633IUONVw','amd','12273312wjSbsf','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','dayjs','CollaborationSessionService','syncUpdateMutationToColla','/solved','COMMENT','getUser','CustomRangeType','resolveComment','error','get','/delete','UniverProCollaborationClient','solved','/add','OpenOrReOpen','code','body','filter','HTTPService','size','values','/universer-api/user/list','rxjs','subscribe','add','forEach'];_0x1f33=function(){return _0x107e8b;};return _0x1f33();}function _0x582e(_0x3753b7,_0x57123b){_0x3753b7=_0x3753b7-0x78;const _0x1f33e0=_0x1f33();let _0x582ee8=_0x1f33e0[_0x3753b7];return _0x582ee8;}(function(_0x579a82,_0x324de7){const _0x151030=_0x582e,_0x3aa813=_0x579a82();while(!![]){try{const _0x4243f3=-parseInt(_0x151030(0xff))/0x1+parseInt(_0x151030(0xef))/0x2*(parseInt(_0x151030(0x7f))/0x3)+parseInt(_0x151030(0xe4))/0x4+parseInt(_0x151030(0x78))/0x5*(parseInt(_0x151030(0xb3))/0x6)+parseInt(_0x151030(0xdb))/0x7*(-parseInt(_0x151030(0x81))/0x8)+-parseInt(_0x151030(0xfe))/0x9+parseInt(_0x151030(0xa6))/0xa;if(_0x4243f3===_0x324de7)break;else _0x3aa813['push'](_0x3aa813['shift']());}catch(_0xbe3822){_0x3aa813['push'](_0x3aa813['shift']());}}}(_0x1f33,0xd0747),function(_0x32a14e,_0x4dcfb2){const _0x2cdec8=_0x582e;typeof exports=='object'&&typeof module<'u'?_0x4dcfb2(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==_0x2cdec8(0xd2)&&define[_0x2cdec8(0x80)]?define([_0x2cdec8(0xab),_0x2cdec8(0xc1),_0x2cdec8(0x101),_0x2cdec8(0xa5),_0x2cdec8(0xc7),'@univerjs/thread-comment',_0x2cdec8(0x9b),_0x2cdec8(0xa3)],_0x4dcfb2):(_0x32a14e=typeof globalThis<'u'?globalThis:_0x32a14e||self,_0x4dcfb2(_0x32a14e[_0x2cdec8(0xe2)]={},_0x32a14e[_0x2cdec8(0x90)],_0x32a14e['UniverProLicense'],_0x32a14e['UniverCore'],_0x32a14e[_0x2cdec8(0x79)],_0x32a14e[_0x2cdec8(0xa9)],_0x32a14e[_0x2cdec8(0x9b)],_0x32a14e[_0x2cdec8(0xa0)]));}(this,function(_0x4a4542,_0x501f4a,_0x584cca,_0x53986e,_0x4f5fb3,_0x1a4962,_0x3d414f,_0x48fb19){'use strict';const _0x199a38=_0x582e;const _0x441cd2=_0x199a38(0x83);var _0x20079d=(_0x95e3a3=>(_0x95e3a3[_0x95e3a3['OpenOrReOpen']=0x0]=_0x199a38(0x93),_0x95e3a3[_0x95e3a3['Solved']=0x1]=_0x199a38(0xa4),_0x95e3a3[_0x95e3a3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x95e3a3))(_0x20079d||{}),_0x3f92a6=(_0x16fed5=>(_0x16fed5[_0x16fed5[_0x199a38(0xbf)]=0x0]='Unknown',_0x16fed5[_0x16fed5[_0x199a38(0xb7)]=0x1]=_0x199a38(0xb7),_0x16fed5[_0x16fed5[_0x199a38(0xac)]=0x2]='Reply',_0x16fed5[_0x16fed5['Edit']=0x3]=_0x199a38(0xdf),_0x16fed5[_0x16fed5[_0x199a38(0xb8)]=0x4]=_0x199a38(0xb8),_0x16fed5[_0x16fed5[_0x199a38(0xfc)]=0x5]=_0x199a38(0xfc),_0x16fed5[_0x16fed5[_0x199a38(0xcd)]=-0x1]=_0x199a38(0xcd),_0x16fed5))(_0x3f92a6||{});const _0x562824=_0x2753aa=>_0x53986e[_0x199a38(0x85)](new Date(+_0x2753aa))[_0x199a38(0xbc)]('YYYY/MM/DD\x20HH:mm'),_0x59941d=async(_0x228d71,_0x71ed38)=>{const _0x22733a=_0x199a38,_0x18d562=_0x228d71['get'](_0x53986e[_0x22733a(0x100)]),_0x3a94e7=_0x228d71[_0x22733a(0x8e)](_0x48fb19[_0x22733a(0x97)]);_0x71ed38[_0x22733a(0x9e)](_0x1bfe7a=>{const _0x4864a9=_0x22733a;_0x18d562[_0x4864a9(0x8a)](_0x1bfe7a)&&_0x71ed38[_0x4864a9(0x7e)](_0x1bfe7a);}),_0x71ed38[_0x22733a(0x98)]&&(await _0x3a94e7[_0x22733a(0x8e)](_0x22733a(0x9a),{'params':{'userIDs':[..._0x71ed38]}}))[_0x22733a(0x95)][_0x22733a(0xfa)][_0x22733a(0x9e)](_0x2335b5=>{_0x2335b5&&_0x18d562['addUser'](_0x2335b5);});};var _0x3cd064=Object['getOwnPropertyDescriptor'],_0x30e1ac=(_0x386fbb,_0x472e44,_0x1272bd,_0x2f3d40)=>{const _0x234e03=_0x199a38;for(var _0x3cf980=_0x2f3d40>0x1?void 0x0:_0x2f3d40?_0x3cd064(_0x472e44,_0x1272bd):_0x472e44,_0x29e929=_0x386fbb[_0x234e03(0x9f)]-0x1,_0x447d5d;_0x29e929>=0x0;_0x29e929--)(_0x447d5d=_0x386fbb[_0x29e929])&&(_0x3cf980=_0x447d5d(_0x3cf980)||_0x3cf980);return _0x3cf980;},_0x5e6e71=(_0x5ec0e5,_0x13b158)=>(_0x531336,_0x3b4fc2)=>_0x13b158(_0x531336,_0x3b4fc2,_0x5ec0e5);let _0x246c49=class extends _0x53986e[_0x199a38(0xd6)]{constructor(_0x3dfd3d,_0x57b6ff,_0x404660,_0x57aac6){const _0x144b80=_0x199a38;super(),this[_0x144b80(0xf4)]=_0x3dfd3d,this[_0x144b80(0xce)]=_0x57b6ff,this[_0x144b80(0xe0)]=_0x404660,this[_0x144b80(0xea)]=_0x57aac6,this[_0x144b80(0xd4)](),this[_0x144b80(0xd9)]();}['_initUserSync'](){const _0x2369c0=_0x199a38;this[_0x2369c0(0xc4)](this[_0x2369c0(0xce)]['commentUpdate$'][_0x2369c0(0xf2)](_0x3d414f[_0x2369c0(0x7b)](0x10))['subscribe'](_0x90874a=>{const _0x16f46f=_0x2369c0,_0x50677d=new Set();_0x90874a['forEach'](_0x1e3dd8=>{const _0x1a0a0c=_0x582e;if(_0x1e3dd8[_0x1a0a0c(0xe8)]===_0x1a0a0c(0x9d)){const _0x38ec4c=_0x1e3dd8[_0x1a0a0c(0x7a)]['personId'];_0x50677d['add'](_0x38ec4c);}}),_0x59941d(this[_0x16f46f(0xea)],_0x50677d);}));}[_0x199a38(0xd4)](){const _0x162355=_0x199a38;this[_0x162355(0xc4)](this['_commentService'][_0x162355(0xe5)][_0x162355(0x9c)](async _0x4fe4f9=>{const _0x49ca5d=_0x162355;var _0x54e34a,_0x172506,_0x32bd75,_0x3e172d;const _0x4daa16=(_0x54e34a=this[_0x49ca5d(0xce)][_0x49ca5d(0xf5)](_0x4fe4f9[_0x49ca5d(0xec)])[_0x49ca5d(0xbd)](_0xdd264c=>_0xdd264c['threadId']===_0x4fe4f9[_0x49ca5d(0xda)]))==null?void 0x0:_0x54e34a[_0x49ca5d(0xf6)];if(!_0x4daa16)return;const {unitId:_0x36df04,subUnitId:_0x191161}=_0x4daa16;switch(_0x4fe4f9[_0x49ca5d(0xb2)]&&this[_0x49ca5d(0xe0)]['addUser'](_0x4fe4f9[_0x49ca5d(0xb2)]),_0x4fe4f9[_0x49ca5d(0xe8)]){case _0x3f92a6['Add']:break;case _0x3f92a6[_0x49ca5d(0xac)]:{this[_0x49ca5d(0xce)]['addComment'](_0x36df04,_0x191161,{'unitId':_0x36df04,'subUnitId':_0x191161,'ref':'','id':_0x4fe4f9[_0x49ca5d(0xf9)],'dT':_0x562824(+_0x4fe4f9['createTimestamp']),'threadId':_0x4fe4f9[_0x49ca5d(0xda)],'personId':(_0x32bd75=(_0x172506=_0x4fe4f9['user'])==null?void 0x0:_0x172506[_0x49ca5d(0xa7)])!=null?_0x32bd75:_0x4fe4f9['userId'],'text':JSON[_0x49ca5d(0xfd)](_0x4fe4f9[_0x49ca5d(0x102)]),'parentId':_0x4daa16['id']});break;}case _0x3f92a6['Delete']:{const _0x6f349f=this[_0x49ca5d(0xce)][_0x49ca5d(0xe6)](_0x36df04,_0x191161,_0x4fe4f9[_0x49ca5d(0xf9)]);_0x6f349f&&_0x6f349f[_0x49ca5d(0xe3)]&&this['_threadCommentModel']['deleteComment'](_0x36df04,_0x191161,_0x4fe4f9[_0x49ca5d(0xf9)]);break;}case _0x3f92a6[_0x49ca5d(0xdf)]:{this[_0x49ca5d(0xce)][_0x49ca5d(0xb9)](_0x36df04,_0x191161,{'commentId':_0x4fe4f9[_0x49ca5d(0xf9)],'text':JSON[_0x49ca5d(0xfd)](_0x4fe4f9[_0x49ca5d(0x102)])});break;}case _0x3f92a6[_0x49ca5d(0xfc)]:{const _0x533d26=(_0x3e172d=this[_0x49ca5d(0xce)][_0x49ca5d(0xf5)](_0x4fe4f9[_0x49ca5d(0xec)])[_0x49ca5d(0xbd)](_0x5aae4a=>_0x5aae4a[_0x49ca5d(0xda)]===_0x4fe4f9[_0x49ca5d(0xda)]))==null?void 0x0:_0x3e172d['root'];_0x533d26&&this['_threadCommentModel'][_0x49ca5d(0x8c)](_0x36df04,_0x191161,_0x533d26['id'],_0x4fe4f9[_0x49ca5d(0x91)]===_0x20079d[_0x49ca5d(0xa4)]);break;}}}));}};_0x246c49=_0x30e1ac([_0x5e6e71(0x0,_0x53986e[_0x199a38(0xd1)](_0x501f4a['CommentService'])),_0x5e6e71(0x1,_0x53986e[_0x199a38(0xd1)](_0x1a4962['ThreadCommentModel'])),_0x5e6e71(0x2,_0x53986e['Inject'](_0x53986e['UserManagerService'])),_0x5e6e71(0x3,_0x53986e[_0x199a38(0xd1)](_0x53986e[_0x199a38(0xb4)]))],_0x246c49);const _0x589732=_0x199a38(0xb1),_0x31c2b6={};var _0x2ffc2d=Object[_0x199a38(0xd7)],_0x1f7dc1=(_0x1f0d35,_0x3fbf7f,_0x35abbd,_0x1aefcf)=>{const _0x32f169=_0x199a38;for(var _0x20c7ef=_0x1aefcf>0x1?void 0x0:_0x1aefcf?_0x2ffc2d(_0x3fbf7f,_0x35abbd):_0x3fbf7f,_0x225cbe=_0x1f0d35[_0x32f169(0x9f)]-0x1,_0x4082a9;_0x225cbe>=0x0;_0x225cbe--)(_0x4082a9=_0x1f0d35[_0x225cbe])&&(_0x20c7ef=_0x4082a9(_0x20c7ef)||_0x20c7ef);return _0x20c7ef;},_0x10de0c=(_0x31d8b1,_0x490da4)=>(_0x4b95f1,_0x3bbe5d)=>_0x490da4(_0x4b95f1,_0x3bbe5d,_0x31d8b1);function _0x5ab333(_0x1e3f7a,_0x26da89){const _0x4b460c=_0x199a38,_0x48fa98=_0x1e3f7a['replies'][0x0];return{..._0x26da89,'id':_0x48fa98[_0x4b460c(0xf9)],'resolved':_0x1e3f7a[_0x4b460c(0x91)]===0x1,'dT':_0x562824(_0x48fa98['createTimestamp']),'personId':_0x48fa98[_0x4b460c(0xb0)],'threadId':_0x48fa98[_0x4b460c(0xda)]};}function _0xc5c0fb(_0x523585,_0x17bf95,_0x12046c){const _0x27a5e9=_0x199a38;var _0x2d009e,_0x5d1e51;if(((_0x5d1e51=(_0x2d009e=_0x523585==null?void 0x0:_0x523585[_0x27a5e9(0xc5)])==null?void 0x0:_0x2d009e['length'])!=null?_0x5d1e51:0x0)>0x0){const _0x3ea207=(_0x5c8c71,_0xfe9a97)=>({'id':_0x5c8c71[_0x27a5e9(0xf9)],'threadId':_0x5c8c71[_0x27a5e9(0xda)],'dT':_0x562824(_0x5c8c71[_0x27a5e9(0xae)]),'personId':_0x5c8c71['userId'],'resolved':_0x523585['solved']===_0x20079d[_0x27a5e9(0xa4)],'unitId':_0x17bf95,'subUnitId':_0x12046c,'text':JSON[_0x27a5e9(0xfd)](_0x5c8c71[_0x27a5e9(0x102)]),'parentId':_0xfe9a97}),_0x18ea42=_0x3ea207(_0x523585[_0x27a5e9(0xc5)][0x0]);return{..._0x18ea42,'children':_0x523585[_0x27a5e9(0xc5)][_0x27a5e9(0xa1)](0x1)[_0x27a5e9(0xaf)](_0x31af71=>_0x3ea207(_0x31af71,_0x18ea42['id']))};}return null;}let _0xbcb1ca=class{constructor(_0x1d200e,_0x2974d3,_0x5da352){const _0x4ffd02=_0x199a38;this[_0x4ffd02(0xf8)]=_0x1d200e,this['_userService']=_0x2974d3,this['_sessionService']=_0x5da352;}async[_0x199a38(0xb6)](_0x26580b){const _0x9c01b6=_0x199a38;var _0x3cc582,_0x6d9d53;const {parentId:_0x16724a,unitId:_0x577a9e,text:_0x1290f8,threadId:_0x1e4fc7}=_0x26580b,_0x586c87=(_0x6d9d53=(_0x3cc582=_0x1290f8[_0x9c01b6(0xcb)])==null?void 0x0:_0x3cc582[_0x9c01b6(0x96)](_0x50f98f=>_0x50f98f['rangeType']===_0x53986e[_0x9c01b6(0x8b)]['COMMENT'])[_0x9c01b6(0xaf)](_0x1d4d26=>_0x1d4d26[_0x9c01b6(0xbe)]))!=null?_0x6d9d53:[],_0x4f2073=JSON[_0x9c01b6(0xed)](_0x1290f8),_0x59214e=(await this['_sessionService']['requireSession'](_0x577a9e))[_0x9c01b6(0xbb)]();if(_0x16724a){const _0x2cc79a={'memberId':_0x59214e,'unitId':_0x577a9e,'content':_0x4f2073,'mention':_0x586c87,'threadId':_0x1e4fc7},_0x14e025=(await this[_0x9c01b6(0xf8)][_0x9c01b6(0xc9)](_0x9c01b6(0xf1)+_0x577a9e+'/reply',{'body':_0x2cc79a}))[_0x9c01b6(0x95)][_0x9c01b6(0xc0)];return{..._0x26580b,'id':_0x14e025[_0x9c01b6(0xf9)],'dT':_0x53986e[_0x9c01b6(0x85)](+_0x14e025['createTimestamp'])[_0x9c01b6(0xbc)](_0x9c01b6(0xdc)),'personId':_0x14e025[_0x9c01b6(0xb0)]};}else{const _0x3420f6={'memberId':_0x59214e,'unitId':_0x577a9e,'content':_0x4f2073,'mention':_0x586c87},_0x620387=await this[_0x9c01b6(0xf8)]['post']('/universer-api/comment/unit/'+_0x577a9e+_0x9c01b6(0x92),{'body':_0x3420f6});return _0x5ab333(_0x620387[_0x9c01b6(0x95)][_0x9c01b6(0xeb)],_0x26580b);}}async['updateComment'](_0xea97f3){const _0x43560e=_0x199a38;var _0x5eadf5,_0x57f3d3;const {text:_0x181c3e,unitId:_0x2e2b9c}=_0xea97f3,_0x297f34=(_0x57f3d3=(_0x5eadf5=_0x181c3e[_0x43560e(0xcb)])==null?void 0x0:_0x5eadf5[_0x43560e(0x96)](_0x4de9df=>_0x4de9df[_0x43560e(0xb5)]===_0x53986e[_0x43560e(0x8b)][_0x43560e(0x89)])['map'](_0x1fb03e=>_0x1fb03e[_0x43560e(0xbe)]))!=null?_0x57f3d3:[],_0x1b1ee3=JSON[_0x43560e(0xed)](_0x181c3e),_0x1a7c3b=_0xea97f3[_0x43560e(0xda)],_0x4ae534=_0xea97f3['id'],_0x3dbcb5={'memberId':(await this[_0x43560e(0xa2)][_0x43560e(0xad)](_0x2e2b9c))['getMemberID'](),'unitId':_0x2e2b9c,'threadId':_0x1a7c3b,'mention':_0x297f34,'content':_0x1b1ee3,'replyId':_0x4ae534},_0x1aee11=await this['_httpService'][_0x43560e(0xc9)]('/universer-api/comment/unit/'+_0x2e2b9c+'/edit',{'body':_0x3dbcb5});return!_0x1aee11[_0x43560e(0x95)][_0x43560e(0x8d)]||_0x1aee11['body'][_0x43560e(0x8d)]['code']===0x1;}async[_0x199a38(0x8c)](_0x1c5429){const _0x2256f6=_0x199a38,{unitId:_0x52f904}=_0x1c5429,_0x44b4b4=_0x1c5429[_0x2256f6(0xda)],_0x3573a5={'memberId':this[_0x2256f6(0xe0)][_0x2256f6(0xc2)]()[_0x2256f6(0xa7)],'unitId':_0x52f904,'threadId':_0x44b4b4,'solved':_0x1c5429[_0x2256f6(0xee)]?_0x20079d[_0x2256f6(0xa4)]:_0x20079d[_0x2256f6(0x93)]},_0x44b53f=await this['_httpService']['post'](_0x2256f6(0xf1)+_0x52f904+_0x2256f6(0x88),{'body':_0x3573a5});return!_0x44b53f['body'][_0x2256f6(0x8d)]||_0x44b53f[_0x2256f6(0x95)][_0x2256f6(0x8d)][_0x2256f6(0x94)]===0x1;}async[_0x199a38(0xe1)](_0x3f960f,_0x414229,_0x3b454d,_0x3b8877){const _0x1bb46a=_0x199a38,_0x10ae95={'memberId':(await this[_0x1bb46a(0xa2)][_0x1bb46a(0xad)](_0x3f960f))[_0x1bb46a(0xbb)](),'threadId':_0x3b454d,'replyId':_0x3b8877,'unitId':_0x3f960f},_0x5d2854=await this[_0x1bb46a(0xf8)][_0x1bb46a(0xc9)](_0x1bb46a(0xf1)+_0x3f960f+_0x1bb46a(0x8f),{'body':_0x10ae95});return!_0x5d2854['body'][_0x1bb46a(0x8d)]||_0x5d2854[_0x1bb46a(0x95)][_0x1bb46a(0x8d)][_0x1bb46a(0x94)]===0x1;}async[_0x199a38(0xc6)](_0x501390,_0x268888,_0x38cab3){const _0x5a7685=_0x199a38,_0x1f28cd={'unitId':_0x501390,'threadId':_0x38cab3},_0xc05d10=await this['_httpService'][_0x5a7685(0xc9)]('/universer-api/comment/unit/'+_0x501390+_0x5a7685(0x82),{'body':_0x1f28cd}),_0x5658fa=_0x38cab3[_0x5a7685(0xaf)](_0x341cec=>_0xc5c0fb(_0xc05d10[_0x5a7685(0x95)]['comments'][_0x341cec],_0x501390,_0x268888))[_0x5a7685(0x96)](Boolean);return Object[_0x5a7685(0x99)](_0xc05d10['body'][_0x5a7685(0xfa)])[_0x5a7685(0x9e)](_0x334fd7=>{const _0x49f1b3=_0x5a7685;this[_0x49f1b3(0xe0)][_0x49f1b3(0xba)](_0x334fd7);}),_0x5658fa;}[_0x199a38(0xf7)](_0x48cbde){return{'id':_0x48cbde['id'],'threadId':_0x48cbde['threadId'],'ref':_0x48cbde['ref']};}};_0xbcb1ca=_0x1f7dc1([_0x10de0c(0x0,_0x53986e[_0x199a38(0xd1)](_0x48fb19[_0x199a38(0x97)])),_0x10de0c(0x1,_0x53986e[_0x199a38(0xd1)](_0x53986e[_0x199a38(0x100)])),_0x10de0c(0x2,_0x53986e['Inject'](_0x501f4a[_0x199a38(0x86)]))],_0xbcb1ca);var _0x3414c2=Object[_0x199a38(0xd7)],_0x2a2eaa=(_0x5844b4,_0x4333bf,_0x58fd22,_0x5875e4)=>{const _0x561cea=_0x199a38;for(var _0x4a4cbf=_0x5875e4>0x1?void 0x0:_0x5875e4?_0x3414c2(_0x4333bf,_0x58fd22):_0x4333bf,_0x1ba85b=_0x5844b4[_0x561cea(0x9f)]-0x1,_0x4973bd;_0x1ba85b>=0x0;_0x1ba85b--)(_0x4973bd=_0x5844b4[_0x1ba85b])&&(_0x4a4cbf=_0x4973bd(_0x4a4cbf)||_0x4a4cbf);return _0x4a4cbf;},_0x5e848e=(_0x1bc583,_0x174fd5)=>(_0x49f65c,_0x358bd4)=>_0x174fd5(_0x49f65c,_0x358bd4,_0x1bc583);let _0x20e4fb=class extends _0x53986e['Disposable']{constructor(_0xa289c8,_0x5e704c){const _0x4c19f1=_0x199a38;super(),this['_threadCommentDataSourceService']=_0xa289c8,this[_0x4c19f1(0x7d)]=_0x5e704c,this[_0x4c19f1(0xd3)]();}[_0x199a38(0xd3)](){const _0x2c6f14=_0x199a38;this[_0x2c6f14(0xcf)]['dataSource']=this[_0x2c6f14(0x7d)],this[_0x2c6f14(0xcf)][_0x2c6f14(0x87)]=!0x1;}};_0x20e4fb=_0x2a2eaa([_0x5e848e(0x0,_0x1a4962[_0x199a38(0xa8)]),_0x5e848e(0x1,_0x53986e[_0x199a38(0xd1)](_0xbcb1ca))],_0x20e4fb);var _0x488a60=Object[_0x199a38(0xf0)],_0x2eaa5b=Object[_0x199a38(0xd7)],_0xfc78ae=(_0x18aae8,_0x38e869,_0x154aaa)=>_0x38e869 in _0x18aae8?_0x488a60(_0x18aae8,_0x38e869,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x154aaa}):_0x18aae8[_0x38e869]=_0x154aaa,_0x27ad72=(_0x4189b0,_0x2b6c9b,_0x2f98f0,_0xedac97)=>{const _0x448617=_0x199a38;for(var _0xf21309=_0xedac97>0x1?void 0x0:_0xedac97?_0x2eaa5b(_0x2b6c9b,_0x2f98f0):_0x2b6c9b,_0x541a06=_0x4189b0[_0x448617(0x9f)]-0x1,_0x1bc148;_0x541a06>=0x0;_0x541a06--)(_0x1bc148=_0x4189b0[_0x541a06])&&(_0xf21309=_0x1bc148(_0xf21309)||_0xf21309);return _0xf21309;},_0xa2fd97=(_0x285850,_0x3261a2)=>(_0x3f439d,_0x28e9db)=>_0x3261a2(_0x3f439d,_0x28e9db,_0x285850),_0x10c982=(_0xf21544,_0x3f3185,_0x574279)=>_0xfc78ae(_0xf21544,typeof _0x3f3185!=_0x199a38(0xd5)?_0x3f3185+'':_0x3f3185,_0x574279);_0x4a4542[_0x199a38(0xdd)]=class extends _0x53986e[_0x199a38(0xaa)]{constructor(_0x22d9e4=_0x31c2b6,_0x5ca4d7,_0x4703ee){const _0x43377d=_0x199a38;super(),this['_config']=_0x22d9e4,this[_0x43377d(0xea)]=_0x5ca4d7,this['_configService']=_0x4703ee;const {..._0xd04789}=_0x53986e[_0x43377d(0xd0)]({},_0x31c2b6,this[_0x43377d(0x84)]);this[_0x43377d(0xe7)][_0x43377d(0xe9)](_0x589732,_0xd04789);}[_0x199a38(0xca)](){[[_0xbcb1ca],[_0x20e4fb],[_0x246c49]]['forEach'](_0x5e152e=>{const _0x594ae2=_0x582e;this[_0x594ae2(0xea)][_0x594ae2(0x9d)](_0x5e152e);});}['onReady'](){const _0x49f46f=_0x199a38;this[_0x49f46f(0xea)][_0x49f46f(0x8e)](_0x20e4fb),this[_0x49f46f(0xea)]['get'](_0x246c49);}},_0x10c982(_0x4a4542[_0x199a38(0xdd)],_0x199a38(0xfb),_0x441cd2),_0x10c982(_0x4a4542[_0x199a38(0xdd)],_0x199a38(0xe8),_0x53986e[_0x199a38(0xc8)][_0x199a38(0xde)]),_0x4a4542['UniverThreadCommentDataSourcePlugin']=_0x27ad72([_0x53986e['DependentOn'](_0x4f5fb3[_0x199a38(0xc3)],_0x501f4a[_0x199a38(0x7c)],_0x584cca[_0x199a38(0xd8)]),_0xa2fd97(0x1,_0x53986e[_0x199a38(0xd1)](_0x53986e[_0x199a38(0xb4)])),_0xa2fd97(0x2,_0x53986e[_0x199a38(0xcc)])],_0x4a4542[_0x199a38(0xdd)]),Object[_0x199a38(0xf0)](_0x4a4542,Symbol['toStringTag'],{'value':_0x199a38(0xf3)});}));
|
|
1
|
+
(function(_0x1f52f5,_0x3d9e5f){const _0x42616d=_0x3960,_0x171adc=_0x1f52f5();while(!![]){try{const _0x4b393f=parseInt(_0x42616d(0x1b1))/0x1+parseInt(_0x42616d(0x1cb))/0x2*(-parseInt(_0x42616d(0x1c3))/0x3)+parseInt(_0x42616d(0x16e))/0x4+parseInt(_0x42616d(0x18a))/0x5+-parseInt(_0x42616d(0x18e))/0x6+parseInt(_0x42616d(0x162))/0x7*(parseInt(_0x42616d(0x19c))/0x8)+-parseInt(_0x42616d(0x172))/0x9;if(_0x4b393f===_0x3d9e5f)break;else _0x171adc['push'](_0x171adc['shift']());}catch(_0x5c365a){_0x171adc['push'](_0x171adc['shift']());}}}(_0x3d7c,0x5b6a0),function(_0x2a9e4f,_0x270940){const _0xfb450a=_0x3960;typeof exports=='object'&&typeof module<'u'?_0x270940(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==_0xfb450a(0x1cd)&&define[_0xfb450a(0x17d)]?define([_0xfb450a(0x1d5),_0xfb450a(0x17f),_0xfb450a(0x17e),_0xfb450a(0x18b),'@univerjs/thread-comment-ui',_0xfb450a(0x1ce),_0xfb450a(0x1b2),'@univerjs/network'],_0x270940):(_0x2a9e4f=typeof globalThis<'u'?globalThis:_0x2a9e4f||self,_0x270940(_0x2a9e4f[_0xfb450a(0x1b4)]={},_0x2a9e4f[_0xfb450a(0x1b3)],_0x2a9e4f[_0xfb450a(0x15c)],_0x2a9e4f['UniverCore'],_0x2a9e4f[_0xfb450a(0x1c2)],_0x2a9e4f[_0xfb450a(0x198)],_0x2a9e4f[_0xfb450a(0x1b2)],_0x2a9e4f['UniverNetwork']));}(this,function(_0x498946,_0x50192b,_0x54c7b5,_0xd19589,_0x47ef7c,_0xf14448,_0x505807,_0x3a4598){'use strict';const _0xfcf55d=_0x3960;const _0x12c6bd=_0xfcf55d(0x1d8);var _0xa67b23=(_0x228496=>(_0x228496[_0x228496[_0xfcf55d(0x1c9)]=0x0]=_0xfcf55d(0x1c9),_0x228496[_0x228496[_0xfcf55d(0x164)]=0x1]=_0xfcf55d(0x164),_0x228496[_0x228496[_0xfcf55d(0x165)]=-0x1]=_0xfcf55d(0x165),_0x228496))(_0xa67b23||{}),_0x2f9f97=(_0x58c0a0=>(_0x58c0a0[_0x58c0a0[_0xfcf55d(0x186)]=0x0]='Unknown',_0x58c0a0[_0x58c0a0[_0xfcf55d(0x1ba)]=0x1]=_0xfcf55d(0x1ba),_0x58c0a0[_0x58c0a0[_0xfcf55d(0x1d9)]=0x2]='Reply',_0x58c0a0[_0x58c0a0[_0xfcf55d(0x187)]=0x3]=_0xfcf55d(0x187),_0x58c0a0[_0x58c0a0[_0xfcf55d(0x1db)]=0x4]=_0xfcf55d(0x1db),_0x58c0a0[_0x58c0a0[_0xfcf55d(0x17b)]=0x5]=_0xfcf55d(0x17b),_0x58c0a0[_0x58c0a0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x58c0a0))(_0x2f9f97||{});const _0x4211b3=_0x5f2993=>_0xd19589[_0xfcf55d(0x1c0)](new Date(+_0x5f2993))[_0xfcf55d(0x197)](_0xfcf55d(0x1ae)),_0x17d597=async(_0x47ab1e,_0x1b7606)=>{const _0x3ef546=_0xfcf55d,_0x18a070=_0x47ab1e['get'](_0xd19589[_0x3ef546(0x1d4)]),_0x584e56=_0x47ab1e['get'](_0x3a4598[_0x3ef546(0x1be)]);_0x1b7606[_0x3ef546(0x1bf)](_0x250a77=>{const _0x4040f9=_0x3ef546;_0x18a070['getUser'](_0x250a77)&&_0x1b7606[_0x4040f9(0x1bb)](_0x250a77);}),_0x1b7606['size']&&(await _0x584e56['get'](_0x3ef546(0x1a7),{'params':{'userIDs':[..._0x1b7606]}}))[_0x3ef546(0x1b5)]['users'][_0x3ef546(0x1bf)](_0x585d0e=>{const _0x42110c=_0x3ef546;_0x585d0e&&_0x18a070[_0x42110c(0x1a2)](_0x585d0e);});};var _0x3a78c3=Object[_0xfcf55d(0x185)],_0x62b0d3=(_0x4d798c,_0x31d490,_0x3a4ffa,_0x37e4a5)=>{const _0x3773d1=_0xfcf55d;for(var _0x2a7d94=_0x37e4a5>0x1?void 0x0:_0x37e4a5?_0x3a78c3(_0x31d490,_0x3a4ffa):_0x31d490,_0x4f44e5=_0x4d798c[_0x3773d1(0x16b)]-0x1,_0x1aa333;_0x4f44e5>=0x0;_0x4f44e5--)(_0x1aa333=_0x4d798c[_0x4f44e5])&&(_0x2a7d94=_0x1aa333(_0x2a7d94)||_0x2a7d94);return _0x2a7d94;},_0xf156e5=(_0x2205f4,_0x285d89)=>(_0x3c56bf,_0xf264ce)=>_0x285d89(_0x3c56bf,_0xf264ce,_0x2205f4);let _0x496ab1=class extends _0xd19589[_0xfcf55d(0x1d2)]{constructor(_0x14dec3,_0x5c982b,_0x1924cb,_0x16bc93){const _0x48e37f=_0xfcf55d;super(),this[_0x48e37f(0x188)]=_0x14dec3,this['_threadCommentModel']=_0x5c982b,this['_userService']=_0x1924cb,this[_0x48e37f(0x1b6)]=_0x16bc93,this[_0x48e37f(0x180)](),this['_initUserSync']();}[_0xfcf55d(0x1c7)](){const _0x4161dd=_0xfcf55d;this[_0x4161dd(0x1ab)](this[_0x4161dd(0x196)][_0x4161dd(0x193)]['pipe'](_0x505807[_0x4161dd(0x19b)](0x10))[_0x4161dd(0x161)](_0x34f599=>{const _0x4602f3=_0x4161dd,_0x28f8f7=new Set();_0x34f599[_0x4602f3(0x1bf)](_0x1a7006=>{const _0x2d2f46=_0x4602f3;if(_0x1a7006[_0x2d2f46(0x19e)]==='add'){const _0x39230a=_0x1a7006[_0x2d2f46(0x184)]['personId'];_0x28f8f7[_0x2d2f46(0x1d7)](_0x39230a);}}),_0x17d597(this[_0x4602f3(0x1b6)],_0x28f8f7);}));}[_0xfcf55d(0x180)](){const _0x135740=_0xfcf55d;this[_0x135740(0x1ab)](this[_0x135740(0x188)][_0x135740(0x193)][_0x135740(0x161)](async _0x43dcdb=>{const _0x3bf6a9=_0x135740;var _0x356a9d,_0x59e9b1,_0x49cfac,_0x4f676f;const _0x50e5ee=(_0x356a9d=this[_0x3bf6a9(0x196)]['getUnit'](_0x43dcdb[_0x3bf6a9(0x170)])[_0x3bf6a9(0x15e)](_0x3cdf11=>_0x3cdf11[_0x3bf6a9(0x15a)]===_0x43dcdb[_0x3bf6a9(0x15a)]))==null?void 0x0:_0x356a9d[_0x3bf6a9(0x17c)];if(!_0x50e5ee)return;const {unitId:_0x23fca2,subUnitId:_0x59efba}=_0x50e5ee;switch(_0x43dcdb[_0x3bf6a9(0x1c5)]&&this[_0x3bf6a9(0x1a6)][_0x3bf6a9(0x1a2)](_0x43dcdb['user']),_0x43dcdb[_0x3bf6a9(0x19e)]){case _0x2f9f97[_0x3bf6a9(0x1ba)]:break;case _0x2f9f97[_0x3bf6a9(0x1d9)]:{this[_0x3bf6a9(0x196)]['addComment'](_0x23fca2,_0x59efba,{'unitId':_0x23fca2,'subUnitId':_0x59efba,'ref':'','id':_0x43dcdb[_0x3bf6a9(0x1b7)],'dT':_0x4211b3(+_0x43dcdb[_0x3bf6a9(0x16a)]),'threadId':_0x43dcdb[_0x3bf6a9(0x15a)],'personId':(_0x49cfac=(_0x59e9b1=_0x43dcdb[_0x3bf6a9(0x1c5)])==null?void 0x0:_0x59e9b1['userID'])!=null?_0x49cfac:_0x43dcdb['userId'],'text':JSON[_0x3bf6a9(0x18d)](_0x43dcdb[_0x3bf6a9(0x192)]),'parentId':_0x50e5ee['id']});break;}case _0x2f9f97[_0x3bf6a9(0x1db)]:{const _0x237356=this['_threadCommentModel'][_0x3bf6a9(0x178)](_0x23fca2,_0x59efba,_0x43dcdb[_0x3bf6a9(0x1b7)]);_0x237356&&_0x237356[_0x3bf6a9(0x191)]&&this[_0x3bf6a9(0x196)][_0x3bf6a9(0x166)](_0x23fca2,_0x59efba,_0x43dcdb[_0x3bf6a9(0x1b7)]);break;}case _0x2f9f97[_0x3bf6a9(0x187)]:{this[_0x3bf6a9(0x196)][_0x3bf6a9(0x1dc)](_0x23fca2,_0x59efba,{'commentId':_0x43dcdb['replyId'],'text':JSON['parse'](_0x43dcdb[_0x3bf6a9(0x192)])});break;}case _0x2f9f97['Solve']:{const _0x2d99f2=(_0x4f676f=this[_0x3bf6a9(0x196)][_0x3bf6a9(0x1bc)](_0x43dcdb[_0x3bf6a9(0x170)])[_0x3bf6a9(0x15e)](_0x4dba37=>_0x4dba37['threadId']===_0x43dcdb[_0x3bf6a9(0x15a)]))==null?void 0x0:_0x4f676f[_0x3bf6a9(0x17c)];_0x2d99f2&&this[_0x3bf6a9(0x196)][_0x3bf6a9(0x1a9)](_0x23fca2,_0x59efba,_0x2d99f2['id'],_0x43dcdb[_0x3bf6a9(0x1a4)]===_0xa67b23['Solved']);break;}}}));}};_0x496ab1=_0x62b0d3([_0xf156e5(0x0,_0xd19589[_0xfcf55d(0x183)](_0x50192b[_0xfcf55d(0x1bd)])),_0xf156e5(0x1,_0xd19589[_0xfcf55d(0x183)](_0xf14448['ThreadCommentModel'])),_0xf156e5(0x2,_0xd19589[_0xfcf55d(0x183)](_0xd19589[_0xfcf55d(0x1d4)])),_0xf156e5(0x3,_0xd19589['Inject'](_0xd19589[_0xfcf55d(0x1aa)]))],_0x496ab1);const _0x5ee21c=_0xfcf55d(0x1da),_0x1e6a65={};var _0x537144=Object[_0xfcf55d(0x185)],_0x144496=(_0x17c3ee,_0xb7f796,_0x39f4d4,_0x1899ad)=>{for(var _0x349baa=_0x1899ad>0x1?void 0x0:_0x1899ad?_0x537144(_0xb7f796,_0x39f4d4):_0xb7f796,_0x31ca6d=_0x17c3ee['length']-0x1,_0x1bcc9b;_0x31ca6d>=0x0;_0x31ca6d--)(_0x1bcc9b=_0x17c3ee[_0x31ca6d])&&(_0x349baa=_0x1bcc9b(_0x349baa)||_0x349baa);return _0x349baa;},_0x406750=(_0x4d43f5,_0x4c0d6a)=>(_0x15f70a,_0x12ce64)=>_0x4c0d6a(_0x15f70a,_0x12ce64,_0x4d43f5);function _0x4bf53f(_0x459b4c,_0x4a9667){const _0xbfc9d8=_0xfcf55d,_0x95d346=_0x459b4c[_0xbfc9d8(0x194)][0x0];return{..._0x4a9667,'id':_0x95d346[_0xbfc9d8(0x1b7)],'resolved':_0x459b4c[_0xbfc9d8(0x1a4)]===0x1,'dT':_0x4211b3(_0x95d346['createTimestamp']),'personId':_0x95d346[_0xbfc9d8(0x16d)],'threadId':_0x95d346[_0xbfc9d8(0x15a)]};}function _0x47d274(_0x3eb4c1,_0x2492bd,_0x241db7){const _0xda18ff=_0xfcf55d;var _0x115e52,_0xbdb76f;if(((_0xbdb76f=(_0x115e52=_0x3eb4c1==null?void 0x0:_0x3eb4c1[_0xda18ff(0x194)])==null?void 0x0:_0x115e52[_0xda18ff(0x16b)])!=null?_0xbdb76f:0x0)>0x0){const _0x44d5de=(_0x133123,_0x2193d7)=>({'id':_0x133123[_0xda18ff(0x1b7)],'threadId':_0x133123[_0xda18ff(0x15a)],'dT':_0x4211b3(_0x133123[_0xda18ff(0x16a)]),'personId':_0x133123['userId'],'resolved':_0x3eb4c1[_0xda18ff(0x1a4)]===_0xa67b23['Solved'],'unitId':_0x2492bd,'subUnitId':_0x241db7,'text':JSON[_0xda18ff(0x18d)](_0x133123[_0xda18ff(0x192)]),'parentId':_0x2193d7}),_0x110b80=_0x44d5de(_0x3eb4c1['replies'][0x0]);return{..._0x110b80,'children':_0x3eb4c1['replies']['slice'](0x1)[_0xda18ff(0x1a0)](_0xb74aa=>_0x44d5de(_0xb74aa,_0x110b80['id']))};}return null;}let _0x4e6efe=class{constructor(_0x268fe9,_0x9dbb3c,_0x435b33){const _0x2576b7=_0xfcf55d;this[_0x2576b7(0x1ad)]=_0x268fe9,this[_0x2576b7(0x1a6)]=_0x9dbb3c,this['_sessionService']=_0x435b33;}async['addComment'](_0x4b4536){const _0x3d6465=_0xfcf55d;var _0x5d5528,_0x40f24c;const {parentId:_0x484ebe,unitId:_0x49ec91,text:_0xc20f9b,threadId:_0x490aee}=_0x4b4536,_0x53cc86=(_0x40f24c=(_0x5d5528=_0xc20f9b[_0x3d6465(0x167)])==null?void 0x0:_0x5d5528['filter'](_0x3e06dc=>_0x3e06dc['rangeType']===_0xd19589['CustomRangeType'][_0x3d6465(0x17a)])['map'](_0x1f010a=>_0x1f010a[_0x3d6465(0x1ca)]))!=null?_0x40f24c:[],_0xb89b88=JSON[_0x3d6465(0x19d)](_0xc20f9b),_0x78cea3=(await this[_0x3d6465(0x163)][_0x3d6465(0x1a5)](_0x49ec91))[_0x3d6465(0x1b8)]();if(_0x484ebe){const _0x4e6c35={'memberId':_0x78cea3,'unitId':_0x49ec91,'content':_0xb89b88,'mention':_0x53cc86,'threadId':_0x490aee},_0xeee47e=(await this[_0x3d6465(0x1ad)]['post'](_0x3d6465(0x16f)+_0x49ec91+_0x3d6465(0x1ac),{'body':_0x4e6c35}))[_0x3d6465(0x1b5)][_0x3d6465(0x16c)];return{..._0x4b4536,'id':_0xeee47e[_0x3d6465(0x1b7)],'dT':_0xd19589['dayjs'](+_0xeee47e['createTimestamp'])[_0x3d6465(0x197)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xeee47e[_0x3d6465(0x16d)]};}else{const _0x5d2ea1={'memberId':_0x78cea3,'unitId':_0x49ec91,'content':_0xb89b88,'mention':_0x53cc86},_0x295f49=await this[_0x3d6465(0x1ad)][_0x3d6465(0x1b0)](_0x3d6465(0x16f)+_0x49ec91+_0x3d6465(0x169),{'body':_0x5d2ea1});return _0x4bf53f(_0x295f49[_0x3d6465(0x1b5)]['comment'],_0x4b4536);}}async[_0xfcf55d(0x1dc)](_0x410686){const _0x467f70=_0xfcf55d;var _0xbe61fc,_0x26e82e;const {text:_0xedb227,unitId:_0xf608f9}=_0x410686,_0x9b3a5=(_0x26e82e=(_0xbe61fc=_0xedb227[_0x467f70(0x167)])==null?void 0x0:_0xbe61fc['filter'](_0x33eaca=>_0x33eaca[_0x467f70(0x1d3)]===_0xd19589['CustomRangeType']['COMMENT'])['map'](_0x524053=>_0x524053[_0x467f70(0x1ca)]))!=null?_0x26e82e:[],_0x2c0132=JSON[_0x467f70(0x19d)](_0xedb227),_0x3db96e=_0x410686[_0x467f70(0x15a)],_0x40cc12=_0x410686['id'],_0x2e7910={'memberId':(await this['_sessionService'][_0x467f70(0x1a5)](_0xf608f9))[_0x467f70(0x1b8)](),'unitId':_0xf608f9,'threadId':_0x3db96e,'mention':_0x9b3a5,'content':_0x2c0132,'replyId':_0x40cc12},_0x255aef=await this['_httpService'][_0x467f70(0x1b0)](_0x467f70(0x16f)+_0xf608f9+'/edit',{'body':_0x2e7910});return!_0x255aef['body']['error']||_0x255aef[_0x467f70(0x1b5)][_0x467f70(0x1c6)]['code']===0x1;}async[_0xfcf55d(0x1a9)](_0x34c2db){const _0x5220c4=_0xfcf55d,{unitId:_0x134437}=_0x34c2db,_0x1eac8b=_0x34c2db[_0x5220c4(0x15a)],_0x35f0c7={'memberId':this['_userService'][_0x5220c4(0x1cf)]()[_0x5220c4(0x177)],'unitId':_0x134437,'threadId':_0x1eac8b,'solved':_0x34c2db[_0x5220c4(0x1a8)]?_0xa67b23[_0x5220c4(0x164)]:_0xa67b23[_0x5220c4(0x1c9)]},_0x4d0bd4=await this[_0x5220c4(0x1ad)][_0x5220c4(0x1b0)]('/universer-api/comment/unit/'+_0x134437+_0x5220c4(0x1c1),{'body':_0x35f0c7});return!_0x4d0bd4['body'][_0x5220c4(0x1c6)]||_0x4d0bd4[_0x5220c4(0x1b5)]['error'][_0x5220c4(0x160)]===0x1;}async['deleteComment'](_0x4db55c,_0x20c560,_0x2189bc,_0x54aa66){const _0x15e535=_0xfcf55d,_0x57b319={'memberId':(await this[_0x15e535(0x163)]['requireSession'](_0x4db55c))['getMemberID'](),'threadId':_0x2189bc,'replyId':_0x54aa66,'unitId':_0x4db55c},_0x35e2fb=await this[_0x15e535(0x1ad)][_0x15e535(0x1b0)]('/universer-api/comment/unit/'+_0x4db55c+_0x15e535(0x173),{'body':_0x57b319});return!_0x35e2fb['body'][_0x15e535(0x1c6)]||_0x35e2fb['body'][_0x15e535(0x1c6)][_0x15e535(0x160)]===0x1;}async[_0xfcf55d(0x18c)](_0x5ab79c,_0x49c689,_0x168910){const _0x38466c=_0xfcf55d,_0x7c33b5={'unitId':_0x5ab79c,'threadId':_0x168910},_0x4d25d2=await this[_0x38466c(0x1ad)][_0x38466c(0x1b0)](_0x38466c(0x16f)+_0x5ab79c+_0x38466c(0x1a1),{'body':_0x7c33b5}),_0x4e10a2=_0x168910['map'](_0x3858c6=>_0x47d274(_0x4d25d2['body']['comments'][_0x3858c6],_0x5ab79c,_0x49c689))[_0x38466c(0x15b)](Boolean);return Object[_0x38466c(0x181)](_0x4d25d2['body'][_0x38466c(0x171)])['forEach'](_0x17c864=>{const _0x1e5459=_0x38466c;this[_0x1e5459(0x1a6)][_0x1e5459(0x1a2)](_0x17c864);}),_0x4e10a2;}[_0xfcf55d(0x189)](_0x4f1eaf){const _0x159aea=_0xfcf55d;return{'id':_0x4f1eaf['id'],'threadId':_0x4f1eaf[_0x159aea(0x15a)],'ref':_0x4f1eaf[_0x159aea(0x176)]};}};_0x4e6efe=_0x144496([_0x406750(0x0,_0xd19589[_0xfcf55d(0x183)](_0x3a4598[_0xfcf55d(0x1be)])),_0x406750(0x1,_0xd19589[_0xfcf55d(0x183)](_0xd19589[_0xfcf55d(0x1d4)])),_0x406750(0x2,_0xd19589[_0xfcf55d(0x183)](_0x50192b[_0xfcf55d(0x19f)]))],_0x4e6efe);var _0x3d7009=Object['getOwnPropertyDescriptor'],_0x44f3c4=(_0x55ece0,_0x11b5c0,_0x5221f3,_0x3e4cc6)=>{for(var _0x34de91=_0x3e4cc6>0x1?void 0x0:_0x3e4cc6?_0x3d7009(_0x11b5c0,_0x5221f3):_0x11b5c0,_0x49ac18=_0x55ece0['length']-0x1,_0x36b61c;_0x49ac18>=0x0;_0x49ac18--)(_0x36b61c=_0x55ece0[_0x49ac18])&&(_0x34de91=_0x36b61c(_0x34de91)||_0x34de91);return _0x34de91;},_0x21eb5f=(_0x14a501,_0x250d68)=>(_0x22a682,_0x5d9711)=>_0x250d68(_0x22a682,_0x5d9711,_0x14a501);let _0x4e316c=class extends _0xd19589[_0xfcf55d(0x1d2)]{constructor(_0x341908,_0x17f5b8){const _0x575838=_0xfcf55d;super(),this[_0x575838(0x15f)]=_0x341908,this[_0x575838(0x179)]=_0x17f5b8,this['_initDataSource']();}[_0xfcf55d(0x190)](){const _0x2dc6ac=_0xfcf55d;this[_0x2dc6ac(0x15f)]['dataSource']=this['_threadCommentDataSource'],this[_0x2dc6ac(0x15f)]['syncUpdateMutationToColla']=!0x1;}};_0x4e316c=_0x44f3c4([_0x21eb5f(0x0,_0xf14448[_0xfcf55d(0x195)]),_0x21eb5f(0x1,_0xd19589[_0xfcf55d(0x183)](_0x4e6efe))],_0x4e316c);var _0x442aba=Object[_0xfcf55d(0x1c8)],_0x4d4302=Object[_0xfcf55d(0x185)],_0x1ce4c0=(_0x2a6bac,_0x27e4d7,_0x38aad3)=>_0x27e4d7 in _0x2a6bac?_0x442aba(_0x2a6bac,_0x27e4d7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38aad3}):_0x2a6bac[_0x27e4d7]=_0x38aad3,_0x5a4ad2=(_0xd5df8e,_0x4acab5,_0x1c5d5f,_0x7a790d)=>{for(var _0x18f887=_0x7a790d>0x1?void 0x0:_0x7a790d?_0x4d4302(_0x4acab5,_0x1c5d5f):_0x4acab5,_0x5c5336=_0xd5df8e['length']-0x1,_0x1e1584;_0x5c5336>=0x0;_0x5c5336--)(_0x1e1584=_0xd5df8e[_0x5c5336])&&(_0x18f887=_0x1e1584(_0x18f887)||_0x18f887);return _0x18f887;},_0xdb5df0=(_0x5b982f,_0x244341)=>(_0x47caa1,_0x238a19)=>_0x244341(_0x47caa1,_0x238a19,_0x5b982f),_0x4a35ae=(_0x4c5399,_0x1d47e2,_0x340b5d)=>_0x1ce4c0(_0x4c5399,typeof _0x1d47e2!=_0xfcf55d(0x1d0)?_0x1d47e2+'':_0x1d47e2,_0x340b5d);_0x498946[_0xfcf55d(0x1b9)]=class extends _0xd19589[_0xfcf55d(0x19a)]{constructor(_0x3da852=_0x1e6a65,_0x437775,_0x3dbe58){const _0x4cf8b0=_0xfcf55d;super(),this['_config']=_0x3da852,this[_0x4cf8b0(0x1b6)]=_0x437775,this[_0x4cf8b0(0x1d1)]=_0x3dbe58;const {..._0x3fa239}=_0xd19589[_0x4cf8b0(0x15d)]({},_0x1e6a65,this[_0x4cf8b0(0x182)]);this[_0x4cf8b0(0x1d1)][_0x4cf8b0(0x1c4)](_0x5ee21c,_0x3fa239);}[_0xfcf55d(0x1af)](){const _0x2be5c0=_0xfcf55d;[[_0x4e6efe],[_0x4e316c],[_0x496ab1]][_0x2be5c0(0x1bf)](_0x22021d=>{const _0x28831c=_0x2be5c0;this[_0x28831c(0x1b6)]['add'](_0x22021d);});}['onReady'](){const _0x3a7a49=_0xfcf55d;this[_0x3a7a49(0x1b6)]['get'](_0x4e316c),this[_0x3a7a49(0x1b6)]['get'](_0x496ab1);}},_0x4a35ae(_0x498946[_0xfcf55d(0x1b9)],_0xfcf55d(0x1cc),_0x12c6bd),_0x4a35ae(_0x498946[_0xfcf55d(0x1b9)],_0xfcf55d(0x19e),_0xd19589[_0xfcf55d(0x199)][_0xfcf55d(0x168)]),_0x498946[_0xfcf55d(0x1b9)]=_0x5a4ad2([_0xd19589[_0xfcf55d(0x1a3)](_0x47ef7c['UniverThreadCommentUIPlugin'],_0x50192b['UniverCollaborationClientPlugin'],_0x54c7b5[_0xfcf55d(0x174)]),_0xdb5df0(0x1,_0xd19589[_0xfcf55d(0x183)](_0xd19589[_0xfcf55d(0x1aa)])),_0xdb5df0(0x2,_0xd19589[_0xfcf55d(0x18f)])],_0x498946[_0xfcf55d(0x1b9)]),Object[_0xfcf55d(0x1c8)](_0x498946,Symbol[_0xfcf55d(0x175)],{'value':_0xfcf55d(0x1d6)});}));function _0x3960(_0x30b5d9,_0x5b6936){_0x30b5d9=_0x30b5d9-0x15a;const _0x3d7ced=_0x3d7c();let _0x396072=_0x3d7ced[_0x30b5d9];return _0x396072;}function _0x3d7c(){const _0x4c0843=['15xxgRpE','setConfig','user','error','_initUserSync','defineProperty','OpenOrReOpen','rangeId','197038qbQecU','pluginName','function','@univerjs/thread-comment','getCurrentUser','symbol','_configService','Disposable','rangeType','UserManagerService','exports','Module','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','thread-comment-data-source.config','Delete','updateComment','threadId','filter','UniverProLicense','merge','find','_threadCommentDataSourceService','code','subscribe','111853hPFHPc','_sessionService','Solved','UNRECOGNIZED','deleteComment','customRanges','UNIVER_UNKNOWN','/add','createTimestamp','length','reply','userId','1809068QtGhfa','/universer-api/comment/unit/','unitId','users','5948568ibVTqg','/delete','UniverLicensePlugin','toStringTag','ref','userID','getComment','_threadCommentDataSource','COMMENT','Solve','root','amd','@univerjs-pro/license','@univerjs-pro/collaboration-client','_init','values','_config','Inject','payload','getOwnPropertyDescriptor','Unknown','Edit','_commentService','saveCommentToSnapshot','2942510xRepFK','@univerjs/core','listComments','parse','1493370kOXYTr','IConfigService','_initDataSource','parentId','content','commentUpdate$','replies','IThreadCommentDataSourceService','_threadCommentModel','format','UniverThreadComment','UniverInstanceType','Plugin','bufferTime','256oSKjdW','stringify','type','CollaborationSessionService','map','/list','addUser','DependentOn','solved','requireSession','_userService','/universer-api/user/list','resolved','resolveComment','Injector','disposeWithMe','/reply','_httpService','YYYY/MM/DD\x20HH:mm','onStarting','post','224777Tbopsk','rxjs','UniverProCollaborationClient','UniverProThreadCommentDatasource','body','_injector','replyId','getMemberID','UniverThreadCommentDataSourcePlugin','Add','delete','getUnit','CommentService','HTTPService','forEach','dayjs','/solved','UniverThreadCommentUi'];_0x3d7c=function(){return _0x4c0843;};return _0x3d7c();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.0-insiders.20260108-
|
|
3
|
+
"version": "0.15.0-insiders.20260108-7b9120d",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260108-
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260108-7b9120d",
|
|
49
|
+
"@univerjs-pro/license": "0.15.0-insiders.20260108-7b9120d",
|
|
50
|
+
"@univerjs/core": "0.15.0-insiders.20260108-7b9120d",
|
|
51
|
+
"@univerjs/network": "0.15.0-insiders.20260108-7b9120d",
|
|
49
52
|
"@univerjs/protocol": "0.1.48",
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/thread-comment": "0.15.0-insiders.20260108-
|
|
52
|
-
"@univerjs/core": "0.15.0-insiders.20260108-47c73e3",
|
|
53
|
-
"@univerjs-pro/license": "0.15.0-insiders.20260108-47c73e3",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260108-47c73e3"
|
|
53
|
+
"@univerjs/thread-comment": "0.15.0-insiders.20260108-7b9120d",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260108-7b9120d"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|