@univerjs-pro/thread-comment-datasource 0.9.4-nightly.202507290757 → 0.10.0-nightly.202507310307
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x46ea9f=_0x52c6;(function(_0x3f87ae,_0x4889e0){const _0x57fd15=_0x52c6,_0x27c6d8=_0x3f87ae();while(!![]){try{const _0x21d126=parseInt(_0x57fd15(0x1ee))/0x1+-parseInt(_0x57fd15(0x1c3))/0x2*(-parseInt(_0x57fd15(0x19e))/0x3)+parseInt(_0x57fd15(0x1e0))/0x4*(parseInt(_0x57fd15(0x1a3))/0x5)+-parseInt(_0x57fd15(0x19d))/0x6*(parseInt(_0x57fd15(0x1ba))/0x7)+parseInt(_0x57fd15(0x1d7))/0x8+-parseInt(_0x57fd15(0x1b7))/0x9*(parseInt(_0x57fd15(0x1ec))/0xa)+-parseInt(_0x57fd15(0x1b3))/0xb;if(_0x21d126===_0x4889e0)break;else _0x27c6d8['push'](_0x27c6d8['shift']());}catch(_0x20f4f6){_0x27c6d8['push'](_0x27c6d8['shift']());}}}(_0x14f8,0x78396));Object[_0x46ea9f(0x1d0)](exports,Symbol['toStringTag'],{'value':_0x46ea9f(0x1ca)});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=_0x46ea9f(0x1af);var I=(_0x5eabe6=>(_0x5eabe6[_0x5eabe6[_0x46ea9f(0x1b1)]=0x0]=_0x46ea9f(0x1b1),_0x5eabe6[_0x5eabe6[_0x46ea9f(0x1f2)]=0x1]=_0x46ea9f(0x1f2),_0x5eabe6[_0x5eabe6['UNRECOGNIZED']=-0x1]=_0x46ea9f(0x1d2),_0x5eabe6))(I||{}),v=(_0x358b55=>(_0x358b55[_0x358b55['Unknown']=0x0]=_0x46ea9f(0x1bb),_0x358b55[_0x358b55[_0x46ea9f(0x1cc)]=0x1]=_0x46ea9f(0x1cc),_0x358b55[_0x358b55['Reply']=0x2]=_0x46ea9f(0x1f5),_0x358b55[_0x358b55[_0x46ea9f(0x1c6)]=0x3]=_0x46ea9f(0x1c6),_0x358b55[_0x358b55[_0x46ea9f(0x1db)]=0x4]='Delete',_0x358b55[_0x358b55[_0x46ea9f(0x1f8)]=0x5]=_0x46ea9f(0x1f8),_0x358b55[_0x358b55['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x358b55))(v||{});const f=_0x46d4e0=>c['dayjs'](new Date(+_0x46d4e0))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x9c74c,_0x3b9fa9)=>{const _0xc88ff2=_0x46ea9f,_0x4980ce=_0x9c74c['get'](c['UserManagerService']),_0x5452cc=_0x9c74c[_0xc88ff2(0x1bd)](P[_0xc88ff2(0x195)]);_0x3b9fa9['forEach'](_0x364c44=>{const _0x2f9839=_0xc88ff2;_0x4980ce[_0x2f9839(0x1a5)](_0x364c44)&&_0x3b9fa9[_0x2f9839(0x1b0)](_0x364c44);}),_0x3b9fa9[_0xc88ff2(0x1eb)]&&(await _0x5452cc[_0xc88ff2(0x1bd)](_0xc88ff2(0x1c5),{'params':{'userIDs':[..._0x3b9fa9]}}))[_0xc88ff2(0x189)][_0xc88ff2(0x185)][_0xc88ff2(0x1f0)](_0x51b101=>{const _0x5e52bd=_0xc88ff2;_0x51b101&&_0x4980ce[_0x5e52bd(0x1aa)](_0x51b101);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x29e8d8,_0x21665f,_0x2d7b0c,_0x582420)=>{const _0x93c9c0=_0x46ea9f;for(var _0x5f3dc8=_0x582420>0x1?void 0x0:_0x582420?$(_0x21665f,_0x2d7b0c):_0x21665f,_0x120084=_0x29e8d8[_0x93c9c0(0x1e5)]-0x1,_0x2d96f8;_0x120084>=0x0;_0x120084--)(_0x2d96f8=_0x29e8d8[_0x120084])&&(_0x5f3dc8=_0x2d96f8(_0x5f3dc8)||_0x5f3dc8);return _0x5f3dc8;},S=(_0x571aab,_0x55a032)=>(_0x23327d,_0xd95672)=>_0x55a032(_0x23327d,_0xd95672,_0x571aab);function _0x52c6(_0x37df04,_0x17983d){const _0x14f834=_0x14f8();return _0x52c6=function(_0x52c6d0,_0x2ef85f){_0x52c6d0=_0x52c6d0-0x184;let _0x2a2d9f=_0x14f834[_0x52c6d0];return _0x2a2d9f;},_0x52c6(_0x37df04,_0x17983d);}let _=class extends c[_0x46ea9f(0x1ce)]{constructor(_0x1a7384,_0x548dea,_0x52d99d,_0x49935b){const _0x1534e9=_0x46ea9f;super(),this[_0x1534e9(0x188)]=_0x1a7384,this[_0x1534e9(0x1e1)]=_0x548dea,this[_0x1534e9(0x198)]=_0x52d99d,this[_0x1534e9(0x1b2)]=_0x49935b,this['_init'](),this[_0x1534e9(0x1ac)]();}['_initUserSync'](){const _0x4af199=_0x46ea9f;this[_0x4af199(0x1d9)](this[_0x4af199(0x1e1)][_0x4af199(0x18b)][_0x4af199(0x1e7)](j[_0x4af199(0x187)](0x10))[_0x4af199(0x1d5)](_0x39f82e=>{const _0x4a45e4=_0x4af199,_0x5129fd=new Set();_0x39f82e[_0x4a45e4(0x1f0)](_0x325c17=>{const _0x148609=_0x4a45e4;switch(_0x325c17[_0x148609(0x1cf)]){case _0x148609(0x1b4):{const _0x4f4e60=_0x325c17[_0x148609(0x1d4)][_0x148609(0x19b)];_0x5129fd['add'](_0x4f4e60);break;}}}),R(this[_0x4a45e4(0x1b2)],_0x5129fd);}));}[_0x46ea9f(0x1a9)](){const _0x5e6ec8=_0x46ea9f;this[_0x5e6ec8(0x1d9)](this[_0x5e6ec8(0x188)][_0x5e6ec8(0x18b)][_0x5e6ec8(0x1d5)](async _0x2ff537=>{const _0x24567d=_0x5e6ec8;var _0xb3e1b7,_0xa7c448,_0x17e164,_0x1410b8;const _0x5d600d=(_0xb3e1b7=this[_0x24567d(0x1e1)][_0x24567d(0x19f)](_0x2ff537['unitId'])[_0x24567d(0x1c0)](_0x4c3149=>_0x4c3149['threadId']===_0x2ff537[_0x24567d(0x1d1)]))==null?void 0x0:_0xb3e1b7['root'];if(!_0x5d600d)return;const {unitId:_0x35cf0,subUnitId:_0x42b804}=_0x5d600d;switch(_0x2ff537['user']&&this[_0x24567d(0x198)][_0x24567d(0x1aa)](_0x2ff537['user']),_0x2ff537['type']){case v[_0x24567d(0x1cc)]:break;case v[_0x24567d(0x1f5)]:{this[_0x24567d(0x1e1)][_0x24567d(0x1a0)](_0x35cf0,_0x42b804,{'unitId':_0x35cf0,'subUnitId':_0x42b804,'ref':'','id':_0x2ff537['replyId'],'dT':f(+_0x2ff537[_0x24567d(0x1c1)]),'threadId':_0x2ff537['threadId'],'personId':(_0x17e164=(_0xa7c448=_0x2ff537['user'])==null?void 0x0:_0xa7c448[_0x24567d(0x1a2)])!=null?_0x17e164:_0x2ff537[_0x24567d(0x1f4)],'text':JSON[_0x24567d(0x199)](_0x2ff537['content']),'parentId':_0x5d600d['id']});break;}case v['Delete']:{const _0x35245c=this[_0x24567d(0x1e1)]['getComment'](_0x35cf0,_0x42b804,_0x2ff537[_0x24567d(0x1ed)]);_0x35245c&&_0x35245c[_0x24567d(0x193)]&&this[_0x24567d(0x1e1)]['deleteComment'](_0x35cf0,_0x42b804,_0x2ff537['replyId']);break;}case v[_0x24567d(0x1c6)]:{this[_0x24567d(0x1e1)]['updateComment'](_0x35cf0,_0x42b804,{'commentId':_0x2ff537['replyId'],'text':JSON['parse'](_0x2ff537[_0x24567d(0x18a)])});break;}case v[_0x24567d(0x1f8)]:{const _0x3d193d=(_0x1410b8=this[_0x24567d(0x1e1)][_0x24567d(0x19f)](_0x2ff537[_0x24567d(0x1df)])[_0x24567d(0x1c0)](_0x1323f1=>_0x1323f1['threadId']===_0x2ff537[_0x24567d(0x1d1)]))==null?void 0x0:_0x1410b8[_0x24567d(0x1d3)];_0x3d193d&&this[_0x24567d(0x1e1)][_0x24567d(0x1a6)](_0x35cf0,_0x42b804,_0x3d193d['id'],_0x2ff537['solved']===I[_0x24567d(0x1f2)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x46ea9f(0x1b6)])),S(0x1,c[_0x46ea9f(0x192)](M[_0x46ea9f(0x1a4)])),S(0x2,c['Inject'](c[_0x46ea9f(0x1c4)])),S(0x3,c[_0x46ea9f(0x192)](c[_0x46ea9f(0x184)]))],_);const q=_0x46ea9f(0x1dc),D={};var A=Object[_0x46ea9f(0x1bc)],x=(_0x3d1b94,_0x4e0e81,_0x13ecbd,_0x27c93d)=>{const _0x1af105=_0x46ea9f;for(var _0x1664c0=_0x27c93d>0x1?void 0x0:_0x27c93d?A(_0x4e0e81,_0x13ecbd):_0x4e0e81,_0x3be72f=_0x3d1b94[_0x1af105(0x1e5)]-0x1,_0x5c67e4;_0x3be72f>=0x0;_0x3be72f--)(_0x5c67e4=_0x3d1b94[_0x3be72f])&&(_0x1664c0=_0x5c67e4(_0x1664c0)||_0x1664c0);return _0x1664c0;},C=(_0x2c6b04,_0x43dd2a)=>(_0x176b12,_0x2b0a83)=>_0x43dd2a(_0x176b12,_0x2b0a83,_0x2c6b04);function Y(_0x149563,_0x194167){const _0x1b7e46=_0x46ea9f,_0x4bf5aa=_0x149563['replies'][0x0];return{..._0x194167,'id':_0x4bf5aa['replyId'],'resolved':_0x149563[_0x1b7e46(0x1bf)]===0x1,'dT':f(_0x4bf5aa[_0x1b7e46(0x1c1)]),'personId':_0x4bf5aa[_0x1b7e46(0x1f4)],'threadId':_0x4bf5aa['threadId']};}function G(_0x837d8b,_0x4e394f,_0x3eadcc){const _0x18a17c=_0x46ea9f;var _0x5979a0,_0x583e68;if(((_0x583e68=(_0x5979a0=_0x837d8b==null?void 0x0:_0x837d8b[_0x18a17c(0x1e2)])==null?void 0x0:_0x5979a0[_0x18a17c(0x1e5)])!=null?_0x583e68:0x0)>0x0){const _0x1c46ab=(_0xcf3c47,_0x2a86e8)=>({'id':_0xcf3c47[_0x18a17c(0x1ed)],'threadId':_0xcf3c47[_0x18a17c(0x1d1)],'dT':f(_0xcf3c47[_0x18a17c(0x1c1)]),'personId':_0xcf3c47[_0x18a17c(0x1f4)],'resolved':_0x837d8b[_0x18a17c(0x1bf)]===I[_0x18a17c(0x1f2)],'unitId':_0x4e394f,'subUnitId':_0x3eadcc,'text':JSON[_0x18a17c(0x199)](_0xcf3c47['content']),'parentId':_0x2a86e8}),_0x3f8302=_0x1c46ab(_0x837d8b['replies'][0x0]);return{..._0x3f8302,'children':_0x837d8b[_0x18a17c(0x1e2)]['slice'](0x1)[_0x18a17c(0x1f6)](_0x34caf1=>_0x1c46ab(_0x34caf1,_0x3f8302['id']))};}return null;}function _0x14f8(){const _0x5e9249=['length','YYYY/MM/DD\x20HH:mm','pipe','filter','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','size','58980yBpZnl','replyId','541011MqpnJZ','format','forEach','onStarting','Solved','_config','userId','Reply','map','/list','Solve','customRanges','UniverInstanceType','Injector','users','_sessionService','bufferTime','_commentService','body','content','commentUpdate$','_threadCommentDataSourceService','_threadCommentDataSource','pluginName','post','getCurrentUser','/add','Inject','parentId','getMemberID','HTTPService','error','_initDataSource','_userService','parse','_httpService','personId','stringify','15834nmNDIl','3WWvbaw','getUnit','addComment','UniverLicensePlugin','userID','5OTPCkm','ThreadCommentModel','getUser','resolveComment','_configService','dataSource','_init','addUser','/universer-api/comment/unit/','_initUserSync','requireSession','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','delete','OpenOrReOpen','_injector','6149209GxLtGT','add','code','CommentService','333HgGULN','UniverThreadCommentUIPlugin','symbol','2135jHutRc','Unknown','getOwnPropertyDescriptor','get','onReady','solved','find','createTimestamp','UniverCollaborationClientPlugin','1087342qSiWfK','UserManagerService','/universer-api/user/list','Edit','dayjs','CustomRangeType','comments','Module','comment','Add','merge','Disposable','type','defineProperty','threadId','UNRECOGNIZED','root','payload','subscribe','/solved','4779160QGJEYG','values','disposeWithMe','rangeId','Delete','thread-comment-data-source.config','updateComment','COMMENT','unitId','1570004ipUpYY','_threadCommentModel','replies','rangeType','Plugin'];_0x14f8=function(){return _0x5e9249;};return _0x14f8();}let p=class{constructor(_0x4fd72f,_0x28463e,_0x452359){const _0x376717=_0x46ea9f;this[_0x376717(0x19a)]=_0x4fd72f,this['_userService']=_0x28463e,this[_0x376717(0x186)]=_0x452359;}async['addComment'](_0x36041f){const _0x33944e=_0x46ea9f;var _0x2037c6,_0x21ca2e;const {parentId:_0x29b7c3,unitId:_0x3d6210,text:_0x591fe6,threadId:_0x4816b2}=_0x36041f,_0x34ade7=(_0x21ca2e=(_0x2037c6=_0x591fe6['customRanges'])==null?void 0x0:_0x2037c6['filter'](_0x2bd5e8=>_0x2bd5e8[_0x33944e(0x1e3)]===c[_0x33944e(0x1c8)]['COMMENT'])[_0x33944e(0x1f6)](_0x1743db=>_0x1743db[_0x33944e(0x1da)]))!=null?_0x21ca2e:[],_0x48727b=JSON['stringify'](_0x591fe6),_0x2c8b57=(await this[_0x33944e(0x186)][_0x33944e(0x1ad)](_0x3d6210))[_0x33944e(0x194)]();if(_0x29b7c3){const _0x25f177={'memberId':_0x2c8b57,'unitId':_0x3d6210,'content':_0x48727b,'mention':_0x34ade7,'threadId':_0x4816b2},_0x231572=(await this[_0x33944e(0x19a)]['post']('/universer-api/comment/unit/'+_0x3d6210+'/reply',{'body':_0x25f177}))[_0x33944e(0x189)]['reply'];return{..._0x36041f,'id':_0x231572['replyId'],'dT':c[_0x33944e(0x1c7)](+_0x231572['createTimestamp'])[_0x33944e(0x1ef)](_0x33944e(0x1e6)),'personId':_0x231572[_0x33944e(0x1f4)]};}else{const _0x908660={'memberId':_0x2c8b57,'unitId':_0x3d6210,'content':_0x48727b,'mention':_0x34ade7},_0x58b3c3=await this[_0x33944e(0x19a)][_0x33944e(0x18f)](_0x33944e(0x1ab)+_0x3d6210+_0x33944e(0x191),{'body':_0x908660});return Y(_0x58b3c3[_0x33944e(0x189)][_0x33944e(0x1cb)],_0x36041f);}}async[_0x46ea9f(0x1dd)](_0x2317c1){const _0x4c5eb7=_0x46ea9f;var _0x590a8b,_0x52622b;const {text:_0x2c90b7,unitId:_0x57e752}=_0x2317c1,_0x3b4419=(_0x52622b=(_0x590a8b=_0x2c90b7[_0x4c5eb7(0x1f9)])==null?void 0x0:_0x590a8b[_0x4c5eb7(0x1e8)](_0x4ed0c2=>_0x4ed0c2['rangeType']===c[_0x4c5eb7(0x1c8)][_0x4c5eb7(0x1de)])[_0x4c5eb7(0x1f6)](_0x348c56=>_0x348c56[_0x4c5eb7(0x1da)]))!=null?_0x52622b:[],_0x569795=JSON[_0x4c5eb7(0x19c)](_0x2c90b7),_0xb3cbb5=_0x2317c1[_0x4c5eb7(0x1d1)],_0x41724f=_0x2317c1['id'],_0x436fcf={'memberId':(await this[_0x4c5eb7(0x186)]['requireSession'](_0x57e752))[_0x4c5eb7(0x194)](),'unitId':_0x57e752,'threadId':_0xb3cbb5,'mention':_0x3b4419,'content':_0x569795,'replyId':_0x41724f},_0x5e43a7=await this[_0x4c5eb7(0x19a)][_0x4c5eb7(0x18f)]('/universer-api/comment/unit/'+_0x57e752+'/edit',{'body':_0x436fcf});return!_0x5e43a7['body']['error']||_0x5e43a7[_0x4c5eb7(0x189)][_0x4c5eb7(0x196)][_0x4c5eb7(0x1b5)]===0x1;}async['resolveComment'](_0x3f5350){const _0x15172f=_0x46ea9f,{unitId:_0x2b3ba3}=_0x3f5350,_0x3d7d1e=_0x3f5350[_0x15172f(0x1d1)],_0x21057a={'memberId':this[_0x15172f(0x198)][_0x15172f(0x190)]()[_0x15172f(0x1a2)],'unitId':_0x2b3ba3,'threadId':_0x3d7d1e,'solved':_0x3f5350['resolved']?I[_0x15172f(0x1f2)]:I['OpenOrReOpen']},_0x5e7ec5=await this['_httpService']['post'](_0x15172f(0x1ab)+_0x2b3ba3+_0x15172f(0x1d6),{'body':_0x21057a});return!_0x5e7ec5[_0x15172f(0x189)][_0x15172f(0x196)]||_0x5e7ec5[_0x15172f(0x189)]['error']['code']===0x1;}async['deleteComment'](_0x594d61,_0x38e5c3,_0x34dbe5,_0x4fcadc){const _0x524e6a=_0x46ea9f,_0x52a4a1={'memberId':(await this['_sessionService']['requireSession'](_0x594d61))['getMemberID'](),'threadId':_0x34dbe5,'replyId':_0x4fcadc,'unitId':_0x594d61},_0x2b752a=await this[_0x524e6a(0x19a)][_0x524e6a(0x18f)](_0x524e6a(0x1ab)+_0x594d61+'/delete',{'body':_0x52a4a1});return!_0x2b752a['body'][_0x524e6a(0x196)]||_0x2b752a[_0x524e6a(0x189)]['error']['code']===0x1;}async['listComments'](_0x1ec326,_0x4c8df0,_0x2f4dd3){const _0x569201=_0x46ea9f,_0x403c3c={'unitId':_0x1ec326,'threadId':_0x2f4dd3},_0x264067=await this[_0x569201(0x19a)][_0x569201(0x18f)]('/universer-api/comment/unit/'+_0x1ec326+_0x569201(0x1f7),{'body':_0x403c3c}),_0x2745be=_0x2f4dd3[_0x569201(0x1f6)](_0x283461=>G(_0x264067[_0x569201(0x189)][_0x569201(0x1c9)][_0x283461],_0x1ec326,_0x4c8df0))[_0x569201(0x1e8)](Boolean);return Object[_0x569201(0x1d8)](_0x264067[_0x569201(0x189)]['users'])['forEach'](_0x18e2e4=>{const _0x48b0cd=_0x569201;this[_0x48b0cd(0x198)][_0x48b0cd(0x1aa)](_0x18e2e4);}),_0x2745be;}[_0x46ea9f(0x1ea)](_0x40cd8e){const _0x3c223f=_0x46ea9f;return{'id':_0x40cd8e['id'],'threadId':_0x40cd8e[_0x3c223f(0x1d1)],'ref':_0x40cd8e['ref']};}};p=x([C(0x0,c['Inject'](P[_0x46ea9f(0x195)])),C(0x1,c['Inject'](c[_0x46ea9f(0x1c4)])),C(0x2,c['Inject'](b['CollaborationSessionService']))],p);var H=Object[_0x46ea9f(0x1bc)],J=(_0x25d567,_0x1a11ff,_0x16d2f9,_0x1f877a)=>{const _0x367753=_0x46ea9f;for(var _0x5198ec=_0x1f877a>0x1?void 0x0:_0x1f877a?H(_0x1a11ff,_0x16d2f9):_0x1a11ff,_0x3359dd=_0x25d567[_0x367753(0x1e5)]-0x1,_0x245c79;_0x3359dd>=0x0;_0x3359dd--)(_0x245c79=_0x25d567[_0x3359dd])&&(_0x5198ec=_0x245c79(_0x5198ec)||_0x5198ec);return _0x5198ec;},y=(_0x8b87f6,_0x3d108d)=>(_0x112a7f,_0x1b1849)=>_0x3d108d(_0x112a7f,_0x1b1849,_0x8b87f6);let g=class extends c[_0x46ea9f(0x1ce)]{constructor(_0x1d69fd,_0x26c073){const _0x533c26=_0x46ea9f;super(),this[_0x533c26(0x18c)]=_0x1d69fd,this[_0x533c26(0x18d)]=_0x26c073,this[_0x533c26(0x197)]();}[_0x46ea9f(0x197)](){const _0x538122=_0x46ea9f;this['_threadCommentDataSourceService'][_0x538122(0x1a8)]=this['_threadCommentDataSource'],this[_0x538122(0x18c)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x46ea9f(0x192)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x102305,_0x28cc25,_0x5e0209)=>_0x28cc25 in _0x102305?F(_0x102305,_0x28cc25,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e0209}):_0x102305[_0x28cc25]=_0x5e0209,W=(_0x70e7f7,_0x45f96d,_0x3765ed,_0x4991c1)=>{for(var _0x1bde35=_0x4991c1>0x1?void 0x0:_0x4991c1?L(_0x45f96d,_0x3765ed):_0x45f96d,_0x82f9cb=_0x70e7f7['length']-0x1,_0x2ef1eb;_0x82f9cb>=0x0;_0x82f9cb--)(_0x2ef1eb=_0x70e7f7[_0x82f9cb])&&(_0x1bde35=_0x2ef1eb(_0x1bde35)||_0x1bde35);return _0x1bde35;},O=(_0xe86a82,_0x241ba7)=>(_0x21dc17,_0xa91f42)=>_0x241ba7(_0x21dc17,_0xa91f42,_0xe86a82),N=(_0x3f4983,_0x358a5e,_0x319a39)=>Z(_0x3f4983,typeof _0x358a5e!=_0x46ea9f(0x1b9)?_0x358a5e+'':_0x358a5e,_0x319a39);exports[_0x46ea9f(0x1e9)]=class extends c[_0x46ea9f(0x1e4)]{constructor(_0x38bcfc=D,_0x592bd7,_0x566e31){const _0x32288a=_0x46ea9f;super(),this[_0x32288a(0x1f3)]=_0x38bcfc,this[_0x32288a(0x1b2)]=_0x592bd7,this[_0x32288a(0x1a7)]=_0x566e31;const {..._0x1d04a9}=c[_0x32288a(0x1cd)]({},D,this['_config']);this[_0x32288a(0x1a7)][_0x32288a(0x1ae)](q,_0x1d04a9);}[_0x46ea9f(0x1f1)](){[[p],[g],[_]]['forEach'](_0x242fbb=>{const _0x435dfc=_0x52c6;this['_injector'][_0x435dfc(0x1b4)](_0x242fbb);});}[_0x46ea9f(0x1be)](){const _0x534ced=_0x46ea9f;this[_0x534ced(0x1b2)]['get'](g),this[_0x534ced(0x1b2)]['get'](_);}},N(exports[_0x46ea9f(0x1e9)],_0x46ea9f(0x18e),U),N(exports[_0x46ea9f(0x1e9)],_0x46ea9f(0x1cf),c[_0x46ea9f(0x1fa)]['UNIVER_UNKNOWN']),exports[_0x46ea9f(0x1e9)]=W([c['DependentOn'](w[_0x46ea9f(0x1b8)],b[_0x46ea9f(0x1c2)],T[_0x46ea9f(0x1a1)]),O(0x1,c[_0x46ea9f(0x192)](c[_0x46ea9f(0x184)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x3ef7ad=_0x1810;function _0x356e(){const _0x298e08=['Solved','_threadCommentDataSourceService','disposeWithMe','defineProperty','getUser','CollaborationSessionService','size','COMMENT','getMemberID','rangeId','subscribe','40xaEoRn','dataSource','customRanges','find','Unknown','Injector','Delete','OpenOrReOpen','rangeType','_commentService','IConfigService','HTTPService','reply','parentId','get','userID','personId','_config','dayjs','stringify','CustomRangeType','Reply','getCurrentUser','slice','resolveComment','replyId','users','toStringTag','Add','merge','syncUpdateMutationToColla','forEach','Solve','/reply','_initUserSync','/delete','_userService','UniverThreadCommentUIPlugin','add','map','DependentOn','_initDataSource','replies','5397898qOdkPc','filter','saveCommentToSnapshot','parse','payload','post','UniverThreadCommentDataSourcePlugin','listComments','Inject','/universer-api/user/list','deleteComment','comments','threadId','/solved','addUser','type','symbol','ref','root','onStarting','_init','getComment','/universer-api/comment/unit/','_sessionService','Disposable','/edit','4065xgJLuJ','ThreadCommentModel','441700zScEly','/add','addComment','pluginName','createTimestamp','UniverLicensePlugin','body','144ulwNcV','475208prvEVj','code','UserManagerService','1149224TXmxFS','solved','Edit','_httpService','unitId','getUnit','_configService','IThreadCommentDataSourceService','_injector','9IaVggK','delete','2853132FjBTeK','UNRECOGNIZED','2892aGVOZg','values','_threadCommentModel','getOwnPropertyDescriptor','userId','length','requireSession','error','pipe','updateComment','format','content','71085YQmICL'];_0x356e=function(){return _0x298e08;};return _0x356e();}(function(_0x19ae5a,_0x59f571){const _0x38fbbf=_0x1810,_0x58c749=_0x19ae5a();while(!![]){try{const _0x18ca86=parseInt(_0x38fbbf(0xe1))/0x1+-parseInt(_0x38fbbf(0xe9))/0x2+-parseInt(_0x38fbbf(0x80))/0x3+parseInt(_0x38fbbf(0x82))/0x4*(-parseInt(_0x38fbbf(0xdf))/0x5)+-parseInt(_0x38fbbf(0xe8))/0x6*(-parseInt(_0x38fbbf(0x8e))/0x7)+parseInt(_0x38fbbf(0x75))/0x8*(-parseInt(_0x38fbbf(0x7e))/0x9)+parseInt(_0x38fbbf(0x9a))/0xa*(parseInt(_0x38fbbf(0xc5))/0xb);if(_0x18ca86===_0x59f571)break;else _0x58c749['push'](_0x58c749['shift']());}catch(_0x2c3306){_0x58c749['push'](_0x58c749['shift']());}}}(_0x356e,0xb1c80));Object[_0x3ef7ad(0x92)](exports,Symbol[_0x3ef7ad(0xb5)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1b8fe7=>(_0x1b8fe7[_0x1b8fe7[_0x3ef7ad(0xa1)]=0x0]=_0x3ef7ad(0xa1),_0x1b8fe7[_0x1b8fe7['Solved']=0x1]=_0x3ef7ad(0x8f),_0x1b8fe7[_0x1b8fe7['UNRECOGNIZED']=-0x1]=_0x3ef7ad(0x81),_0x1b8fe7))(I||{}),v=(_0x46c568=>(_0x46c568[_0x46c568[_0x3ef7ad(0x9e)]=0x0]=_0x3ef7ad(0x9e),_0x46c568[_0x46c568[_0x3ef7ad(0xb6)]=0x1]=_0x3ef7ad(0xb6),_0x46c568[_0x46c568['Reply']=0x2]='Reply',_0x46c568[_0x46c568['Edit']=0x3]=_0x3ef7ad(0x77),_0x46c568[_0x46c568['Delete']=0x4]=_0x3ef7ad(0xa0),_0x46c568[_0x46c568[_0x3ef7ad(0xba)]=0x5]=_0x3ef7ad(0xba),_0x46c568[_0x46c568[_0x3ef7ad(0x81)]=-0x1]=_0x3ef7ad(0x81),_0x46c568))(v||{});const f=_0x1bc425=>c[_0x3ef7ad(0xac)](new Date(+_0x1bc425))[_0x3ef7ad(0x8c)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x10e1aa,_0xa7ed71)=>{const _0x33a7ba=_0x3ef7ad,_0x4281a9=_0x10e1aa[_0x33a7ba(0xa8)](c['UserManagerService']),_0x282597=_0x10e1aa[_0x33a7ba(0xa8)](P[_0x33a7ba(0xa5)]);_0xa7ed71[_0x33a7ba(0xb9)](_0x46c5b3=>{const _0x5128d7=_0x33a7ba;_0x4281a9[_0x5128d7(0x93)](_0x46c5b3)&&_0xa7ed71[_0x5128d7(0x7f)](_0x46c5b3);}),_0xa7ed71[_0x33a7ba(0x95)]&&(await _0x282597[_0x33a7ba(0xa8)](_0x33a7ba(0xce),{'params':{'userIDs':[..._0xa7ed71]}}))['body'][_0x33a7ba(0xb4)]['forEach'](_0x71b86b=>{_0x71b86b&&_0x4281a9['addUser'](_0x71b86b);});};var $=Object[_0x3ef7ad(0x85)],E=(_0x303c66,_0x5786dd,_0x39a38b,_0x3d2ccb)=>{const _0x239471=_0x3ef7ad;for(var _0x4f7aff=_0x3d2ccb>0x1?void 0x0:_0x3d2ccb?$(_0x5786dd,_0x39a38b):_0x5786dd,_0x258cae=_0x303c66[_0x239471(0x87)]-0x1,_0x221a5b;_0x258cae>=0x0;_0x258cae--)(_0x221a5b=_0x303c66[_0x258cae])&&(_0x4f7aff=_0x221a5b(_0x4f7aff)||_0x4f7aff);return _0x4f7aff;},S=(_0x49b3dd,_0xda6c42)=>(_0x3c57d0,_0xd07097)=>_0xda6c42(_0x3c57d0,_0xd07097,_0x49b3dd);let _=class extends c[_0x3ef7ad(0xdd)]{constructor(_0x1912e4,_0x555aa8,_0x31ad8c,_0x56359d){const _0x3b4fa0=_0x3ef7ad;super(),this[_0x3b4fa0(0xa3)]=_0x1912e4,this[_0x3b4fa0(0x84)]=_0x555aa8,this[_0x3b4fa0(0xbe)]=_0x31ad8c,this[_0x3b4fa0(0x7d)]=_0x56359d,this[_0x3b4fa0(0xd9)](),this[_0x3b4fa0(0xbc)]();}[_0x3ef7ad(0xbc)](){const _0x5ab135=_0x3ef7ad;this[_0x5ab135(0x91)](this[_0x5ab135(0x84)]['commentUpdate$'][_0x5ab135(0x8a)](j['bufferTime'](0x10))[_0x5ab135(0x99)](_0x24452a=>{const _0x2976e0=_0x5ab135,_0x1f31bd=new Set();_0x24452a[_0x2976e0(0xb9)](_0x37fa2b=>{const _0x232b4c=_0x2976e0;switch(_0x37fa2b[_0x232b4c(0xd4)]){case _0x232b4c(0xc0):{const _0x31166d=_0x37fa2b[_0x232b4c(0xc9)][_0x232b4c(0xaa)];_0x1f31bd[_0x232b4c(0xc0)](_0x31166d);break;}}}),R(this[_0x2976e0(0x7d)],_0x1f31bd);}));}[_0x3ef7ad(0xd9)](){const _0x1ec1f9=_0x3ef7ad;this[_0x1ec1f9(0x91)](this['_commentService']['commentUpdate$'][_0x1ec1f9(0x99)](async _0x561abd=>{const _0x4cc5d6=_0x1ec1f9;var _0x23c562,_0x3dbeb3,_0x83ddf7,_0x3a5eaf;const _0xd0712b=(_0x23c562=this['_threadCommentModel'][_0x4cc5d6(0x7a)](_0x561abd[_0x4cc5d6(0x79)])[_0x4cc5d6(0x9d)](_0x30f0a8=>_0x30f0a8['threadId']===_0x561abd[_0x4cc5d6(0xd1)]))==null?void 0x0:_0x23c562[_0x4cc5d6(0xd7)];if(!_0xd0712b)return;const {unitId:_0x10ecc2,subUnitId:_0x54574e}=_0xd0712b;switch(_0x561abd['user']&&this['_userService'][_0x4cc5d6(0xd3)](_0x561abd['user']),_0x561abd['type']){case v[_0x4cc5d6(0xb6)]:break;case v[_0x4cc5d6(0xaf)]:{this['_threadCommentModel'][_0x4cc5d6(0xe3)](_0x10ecc2,_0x54574e,{'unitId':_0x10ecc2,'subUnitId':_0x54574e,'ref':'','id':_0x561abd[_0x4cc5d6(0xb3)],'dT':f(+_0x561abd['createTimestamp']),'threadId':_0x561abd[_0x4cc5d6(0xd1)],'personId':(_0x83ddf7=(_0x3dbeb3=_0x561abd['user'])==null?void 0x0:_0x3dbeb3[_0x4cc5d6(0xa9)])!=null?_0x83ddf7:_0x561abd['userId'],'text':JSON['parse'](_0x561abd['content']),'parentId':_0xd0712b['id']});break;}case v[_0x4cc5d6(0xa0)]:{const _0x2e28f9=this[_0x4cc5d6(0x84)][_0x4cc5d6(0xda)](_0x10ecc2,_0x54574e,_0x561abd['replyId']);_0x2e28f9&&_0x2e28f9[_0x4cc5d6(0xa7)]&&this[_0x4cc5d6(0x84)][_0x4cc5d6(0xcf)](_0x10ecc2,_0x54574e,_0x561abd[_0x4cc5d6(0xb3)]);break;}case v[_0x4cc5d6(0x77)]:{this[_0x4cc5d6(0x84)]['updateComment'](_0x10ecc2,_0x54574e,{'commentId':_0x561abd[_0x4cc5d6(0xb3)],'text':JSON[_0x4cc5d6(0xc8)](_0x561abd['content'])});break;}case v['Solve']:{const _0x2adfd8=(_0x3a5eaf=this[_0x4cc5d6(0x84)][_0x4cc5d6(0x7a)](_0x561abd[_0x4cc5d6(0x79)])[_0x4cc5d6(0x9d)](_0x30b9d4=>_0x30b9d4[_0x4cc5d6(0xd1)]===_0x561abd[_0x4cc5d6(0xd1)]))==null?void 0x0:_0x3a5eaf[_0x4cc5d6(0xd7)];_0x2adfd8&&this[_0x4cc5d6(0x84)][_0x4cc5d6(0xb2)](_0x10ecc2,_0x54574e,_0x2adfd8['id'],_0x561abd[_0x4cc5d6(0x76)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x3ef7ad(0xcd)](b['CommentService'])),S(0x1,c['Inject'](M[_0x3ef7ad(0xe0)])),S(0x2,c[_0x3ef7ad(0xcd)](c[_0x3ef7ad(0x74)])),S(0x3,c[_0x3ef7ad(0xcd)](c[_0x3ef7ad(0x9f)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x3ef7ad(0x85)],x=(_0x749cbb,_0x17af7b,_0x1f9e3e,_0x3f894b)=>{for(var _0x3def08=_0x3f894b>0x1?void 0x0:_0x3f894b?A(_0x17af7b,_0x1f9e3e):_0x17af7b,_0x112c85=_0x749cbb['length']-0x1,_0x15c1de;_0x112c85>=0x0;_0x112c85--)(_0x15c1de=_0x749cbb[_0x112c85])&&(_0x3def08=_0x15c1de(_0x3def08)||_0x3def08);return _0x3def08;},C=(_0x2c1b9f,_0x3f7cd3)=>(_0x50f944,_0x20c917)=>_0x3f7cd3(_0x50f944,_0x20c917,_0x2c1b9f);function Y(_0x541646,_0x4b1072){const _0x1a8b9b=_0x3ef7ad,_0x25fa24=_0x541646[_0x1a8b9b(0xc4)][0x0];return{..._0x4b1072,'id':_0x25fa24[_0x1a8b9b(0xb3)],'resolved':_0x541646['solved']===0x1,'dT':f(_0x25fa24[_0x1a8b9b(0xe5)]),'personId':_0x25fa24['userId'],'threadId':_0x25fa24['threadId']};}function G(_0x2b4b33,_0x6d47f5,_0x356e82){const _0x53f6e0=_0x3ef7ad;var _0x463e50,_0x252538;if(((_0x252538=(_0x463e50=_0x2b4b33==null?void 0x0:_0x2b4b33['replies'])==null?void 0x0:_0x463e50[_0x53f6e0(0x87)])!=null?_0x252538:0x0)>0x0){const _0x3432a9=(_0x547114,_0x30d137)=>({'id':_0x547114[_0x53f6e0(0xb3)],'threadId':_0x547114[_0x53f6e0(0xd1)],'dT':f(_0x547114[_0x53f6e0(0xe5)]),'personId':_0x547114[_0x53f6e0(0x86)],'resolved':_0x2b4b33[_0x53f6e0(0x76)]===I[_0x53f6e0(0x8f)],'unitId':_0x6d47f5,'subUnitId':_0x356e82,'text':JSON[_0x53f6e0(0xc8)](_0x547114[_0x53f6e0(0x8d)]),'parentId':_0x30d137}),_0x2f9887=_0x3432a9(_0x2b4b33[_0x53f6e0(0xc4)][0x0]);return{..._0x2f9887,'children':_0x2b4b33[_0x53f6e0(0xc4)][_0x53f6e0(0xb1)](0x1)[_0x53f6e0(0xc1)](_0x3f6fb3=>_0x3432a9(_0x3f6fb3,_0x2f9887['id']))};}return null;}let p=class{constructor(_0x30b065,_0x2a6f2c,_0x407050){const _0x43bb17=_0x3ef7ad;this[_0x43bb17(0x78)]=_0x30b065,this[_0x43bb17(0xbe)]=_0x2a6f2c,this[_0x43bb17(0xdc)]=_0x407050;}async[_0x3ef7ad(0xe3)](_0x594a88){const _0x26af6d=_0x3ef7ad;var _0x52fd5a,_0x6baf97;const {parentId:_0x10a72f,unitId:_0x2fa69,text:_0x32e815,threadId:_0x37bb9c}=_0x594a88,_0x586034=(_0x6baf97=(_0x52fd5a=_0x32e815[_0x26af6d(0x9c)])==null?void 0x0:_0x52fd5a[_0x26af6d(0xc6)](_0x191f33=>_0x191f33[_0x26af6d(0xa2)]===c[_0x26af6d(0xae)][_0x26af6d(0x96)])[_0x26af6d(0xc1)](_0x4f5f2f=>_0x4f5f2f[_0x26af6d(0x98)]))!=null?_0x6baf97:[],_0x4e092c=JSON['stringify'](_0x32e815),_0x1253ed=(await this[_0x26af6d(0xdc)][_0x26af6d(0x88)](_0x2fa69))[_0x26af6d(0x97)]();if(_0x10a72f){const _0x6bcd95={'memberId':_0x1253ed,'unitId':_0x2fa69,'content':_0x4e092c,'mention':_0x586034,'threadId':_0x37bb9c},_0x2ea588=(await this['_httpService'][_0x26af6d(0xca)]('/universer-api/comment/unit/'+_0x2fa69+_0x26af6d(0xbb),{'body':_0x6bcd95}))['body'][_0x26af6d(0xa6)];return{..._0x594a88,'id':_0x2ea588[_0x26af6d(0xb3)],'dT':c[_0x26af6d(0xac)](+_0x2ea588[_0x26af6d(0xe5)])[_0x26af6d(0x8c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2ea588[_0x26af6d(0x86)]};}else{const _0x284764={'memberId':_0x1253ed,'unitId':_0x2fa69,'content':_0x4e092c,'mention':_0x586034},_0x27fd69=await this[_0x26af6d(0x78)][_0x26af6d(0xca)]('/universer-api/comment/unit/'+_0x2fa69+_0x26af6d(0xe2),{'body':_0x284764});return Y(_0x27fd69[_0x26af6d(0xe7)]['comment'],_0x594a88);}}async[_0x3ef7ad(0x8b)](_0x45240b){const _0x3b2364=_0x3ef7ad;var _0x9df5e2,_0x54cb8e;const {text:_0x165d1f,unitId:_0x499815}=_0x45240b,_0x25da36=(_0x54cb8e=(_0x9df5e2=_0x165d1f[_0x3b2364(0x9c)])==null?void 0x0:_0x9df5e2[_0x3b2364(0xc6)](_0x288abe=>_0x288abe['rangeType']===c['CustomRangeType'][_0x3b2364(0x96)])['map'](_0x4105d3=>_0x4105d3[_0x3b2364(0x98)]))!=null?_0x54cb8e:[],_0x20be9c=JSON[_0x3b2364(0xad)](_0x165d1f),_0x17945a=_0x45240b['threadId'],_0x2e722e=_0x45240b['id'],_0x51e836={'memberId':(await this[_0x3b2364(0xdc)][_0x3b2364(0x88)](_0x499815))[_0x3b2364(0x97)](),'unitId':_0x499815,'threadId':_0x17945a,'mention':_0x25da36,'content':_0x20be9c,'replyId':_0x2e722e},_0x25a807=await this[_0x3b2364(0x78)]['post']('/universer-api/comment/unit/'+_0x499815+_0x3b2364(0xde),{'body':_0x51e836});return!_0x25a807[_0x3b2364(0xe7)]['error']||_0x25a807[_0x3b2364(0xe7)]['error']['code']===0x1;}async[_0x3ef7ad(0xb2)](_0x516845){const _0x505a4d=_0x3ef7ad,{unitId:_0xd7c5c9}=_0x516845,_0x8e4c47=_0x516845['threadId'],_0x1f889e={'memberId':this[_0x505a4d(0xbe)][_0x505a4d(0xb0)]()['userID'],'unitId':_0xd7c5c9,'threadId':_0x8e4c47,'solved':_0x516845['resolved']?I['Solved']:I[_0x505a4d(0xa1)]},_0x31253b=await this[_0x505a4d(0x78)][_0x505a4d(0xca)]('/universer-api/comment/unit/'+_0xd7c5c9+_0x505a4d(0xd2),{'body':_0x1f889e});return!_0x31253b[_0x505a4d(0xe7)][_0x505a4d(0x89)]||_0x31253b['body'][_0x505a4d(0x89)][_0x505a4d(0xea)]===0x1;}async['deleteComment'](_0x3199c2,_0xf1fd63,_0x5ee6d4,_0x190432){const _0x5e00ee=_0x3ef7ad,_0x2cc18e={'memberId':(await this[_0x5e00ee(0xdc)]['requireSession'](_0x3199c2))[_0x5e00ee(0x97)](),'threadId':_0x5ee6d4,'replyId':_0x190432,'unitId':_0x3199c2},_0xc6d40e=await this[_0x5e00ee(0x78)][_0x5e00ee(0xca)](_0x5e00ee(0xdb)+_0x3199c2+_0x5e00ee(0xbd),{'body':_0x2cc18e});return!_0xc6d40e[_0x5e00ee(0xe7)][_0x5e00ee(0x89)]||_0xc6d40e['body']['error'][_0x5e00ee(0xea)]===0x1;}async[_0x3ef7ad(0xcc)](_0x53a07b,_0x54d2c7,_0x231863){const _0x17ef7e=_0x3ef7ad,_0x3d64e2={'unitId':_0x53a07b,'threadId':_0x231863},_0x1396fa=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x53a07b+'/list',{'body':_0x3d64e2}),_0x57880a=_0x231863['map'](_0xd195c6=>G(_0x1396fa['body'][_0x17ef7e(0xd0)][_0xd195c6],_0x53a07b,_0x54d2c7))['filter'](Boolean);return Object[_0x17ef7e(0x83)](_0x1396fa[_0x17ef7e(0xe7)][_0x17ef7e(0xb4)])[_0x17ef7e(0xb9)](_0x485004=>{const _0x5b94d5=_0x17ef7e;this[_0x5b94d5(0xbe)][_0x5b94d5(0xd3)](_0x485004);}),_0x57880a;}[_0x3ef7ad(0xc7)](_0x2fae8e){const _0x9efcc6=_0x3ef7ad;return{'id':_0x2fae8e['id'],'threadId':_0x2fae8e[_0x9efcc6(0xd1)],'ref':_0x2fae8e[_0x9efcc6(0xd6)]};}};function _0x1810(_0x4f3283,_0xae002){const _0x356e89=_0x356e();return _0x1810=function(_0x181034,_0xee880c){_0x181034=_0x181034-0x74;let _0x2f7552=_0x356e89[_0x181034];return _0x2f7552;},_0x1810(_0x4f3283,_0xae002);}p=x([C(0x0,c[_0x3ef7ad(0xcd)](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x3ef7ad(0x94)]))],p);var H=Object[_0x3ef7ad(0x85)],J=(_0x47d3cf,_0x4e912d,_0x12b446,_0x4f39b8)=>{for(var _0x3b9688=_0x4f39b8>0x1?void 0x0:_0x4f39b8?H(_0x4e912d,_0x12b446):_0x4e912d,_0x5a1c4c=_0x47d3cf['length']-0x1,_0x291296;_0x5a1c4c>=0x0;_0x5a1c4c--)(_0x291296=_0x47d3cf[_0x5a1c4c])&&(_0x3b9688=_0x291296(_0x3b9688)||_0x3b9688);return _0x3b9688;},y=(_0x341554,_0x495648)=>(_0x250d21,_0x25f3e5)=>_0x495648(_0x250d21,_0x25f3e5,_0x341554);let g=class extends c[_0x3ef7ad(0xdd)]{constructor(_0x403dad,_0x537844){const _0x27d553=_0x3ef7ad;super(),this['_threadCommentDataSourceService']=_0x403dad,this['_threadCommentDataSource']=_0x537844,this[_0x27d553(0xc3)]();}[_0x3ef7ad(0xc3)](){const _0x397f81=_0x3ef7ad;this[_0x397f81(0x90)][_0x397f81(0x9b)]=this['_threadCommentDataSource'],this[_0x397f81(0x90)][_0x397f81(0xb8)]=!0x1;}};g=J([y(0x0,M[_0x3ef7ad(0x7c)]),y(0x1,c[_0x3ef7ad(0xcd)](p))],g);var F=Object[_0x3ef7ad(0x92)],L=Object[_0x3ef7ad(0x85)],Z=(_0x996038,_0x481729,_0x33b8c0)=>_0x481729 in _0x996038?F(_0x996038,_0x481729,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x33b8c0}):_0x996038[_0x481729]=_0x33b8c0,W=(_0x343053,_0x509f03,_0x9c6431,_0x4263a3)=>{const _0x41e7b5=_0x3ef7ad;for(var _0x47bca6=_0x4263a3>0x1?void 0x0:_0x4263a3?L(_0x509f03,_0x9c6431):_0x509f03,_0xb5b212=_0x343053[_0x41e7b5(0x87)]-0x1,_0x5a4e8c;_0xb5b212>=0x0;_0xb5b212--)(_0x5a4e8c=_0x343053[_0xb5b212])&&(_0x47bca6=_0x5a4e8c(_0x47bca6)||_0x47bca6);return _0x47bca6;},O=(_0x22dd5d,_0x38b3dc)=>(_0x61a21f,_0x796135)=>_0x38b3dc(_0x61a21f,_0x796135,_0x22dd5d),N=(_0x52511d,_0x2317b7,_0x3ba2f3)=>Z(_0x52511d,typeof _0x2317b7!=_0x3ef7ad(0xd5)?_0x2317b7+'':_0x2317b7,_0x3ba2f3);exports[_0x3ef7ad(0xcb)]=class extends c['Plugin']{constructor(_0x431f48=D,_0x507c22,_0x670c30){const _0x3ec25d=_0x3ef7ad;super(),this[_0x3ec25d(0xab)]=_0x431f48,this[_0x3ec25d(0x7d)]=_0x507c22,this[_0x3ec25d(0x7b)]=_0x670c30;const {..._0x43ab56}=c[_0x3ec25d(0xb7)]({},D,this['_config']);this[_0x3ec25d(0x7b)]['setConfig'](q,_0x43ab56);}[_0x3ef7ad(0xd8)](){const _0x54b030=_0x3ef7ad;[[p],[g],[_]][_0x54b030(0xb9)](_0x5592e7=>{const _0x4b9616=_0x54b030;this['_injector'][_0x4b9616(0xc0)](_0x5592e7);});}['onReady'](){const _0x127db1=_0x3ef7ad;this[_0x127db1(0x7d)]['get'](g),this[_0x127db1(0x7d)][_0x127db1(0xa8)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3ef7ad(0xe4),U),N(exports[_0x3ef7ad(0xcb)],_0x3ef7ad(0xd4),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3ef7ad(0xc2)](w[_0x3ef7ad(0xbf)],b['UniverCollaborationClientPlugin'],T[_0x3ef7ad(0xe6)]),O(0x1,c[_0x3ef7ad(0xcd)](c[_0x3ef7ad(0x9f)])),O(0x2,c[_0x3ef7ad(0xa4)])],exports[_0x3ef7ad(0xcb)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x243a(_0x50dc7e,_0x2ffada){const _0x290111=_0x2901();return _0x243a=function(_0x243a27,_0x4c55b7){_0x243a27=_0x243a27-0xe6;let _0x4305bb=_0x290111[_0x243a27];return _0x4305bb;},_0x243a(_0x50dc7e,_0x2ffada);}const _0x956842=_0x243a;(function(_0x5079eb,_0x1c2770){const _0x137e76=_0x243a,_0x23b293=_0x5079eb();while(!![]){try{const _0x55df3c=parseInt(_0x137e76(0x13a))/0x1*(parseInt(_0x137e76(0xec))/0x2)+parseInt(_0x137e76(0x132))/0x3*(parseInt(_0x137e76(0x11e))/0x4)+-parseInt(_0x137e76(0xea))/0x5+parseInt(_0x137e76(0x11f))/0x6*(parseInt(_0x137e76(0xf2))/0x7)+-parseInt(_0x137e76(0x14e))/0x8*(-parseInt(_0x137e76(0x118))/0x9)+parseInt(_0x137e76(0x10b))/0xa*(parseInt(_0x137e76(0xfa))/0xb)+parseInt(_0x137e76(0x125))/0xc*(-parseInt(_0x137e76(0x12d))/0xd);if(_0x55df3c===_0x1c2770)break;else _0x23b293['push'](_0x23b293['shift']());}catch(_0x5a687d){_0x23b293['push'](_0x23b293['shift']());}}}(_0x2901,0x9f485));import{CommentService as _0x403a4b,CollaborationSessionService as _0x5904f9,UniverCollaborationClientPlugin as _0x3802b1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x17a341}from'@univerjs-pro/license';import{dayjs as _0x3e920d,UserManagerService as _0x55f5e7,Inject as _0x388faa,Injector as _0x469aaf,Disposable as _0x3fbff2,CustomRangeType as _0x558957,UniverInstanceType as _0x16ec5a,DependentOn as _0x23d00e,IConfigService as _0x1759fb,Plugin as _0x16d0b0,merge as _0x32f0bd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b75f2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x411c90,IThreadCommentDataSourceService as _0x2efa6a}from'@univerjs/thread-comment';import{bufferTime as _0x2e0e87}from'rxjs';import{HTTPService as _0x59a722}from'@univerjs/network';const W=_0x956842(0xe6);var I=(_0x530b6e=>(_0x530b6e[_0x530b6e[_0x956842(0x11c)]=0x0]=_0x956842(0x11c),_0x530b6e[_0x530b6e[_0x956842(0x11d)]=0x1]=_0x956842(0x11d),_0x530b6e[_0x530b6e[_0x956842(0x110)]=-0x1]='UNRECOGNIZED',_0x530b6e))(I||{}),v=(_0x1ec410=>(_0x1ec410[_0x1ec410[_0x956842(0xef)]=0x0]=_0x956842(0xef),_0x1ec410[_0x1ec410[_0x956842(0x127)]=0x1]='Add',_0x1ec410[_0x1ec410[_0x956842(0x142)]=0x2]='Reply',_0x1ec410[_0x1ec410[_0x956842(0x116)]=0x3]=_0x956842(0x116),_0x1ec410[_0x1ec410['Delete']=0x4]=_0x956842(0x105),_0x1ec410[_0x1ec410['Solve']=0x5]='Solve',_0x1ec410[_0x1ec410['UNRECOGNIZED']=-0x1]=_0x956842(0x110),_0x1ec410))(v||{});const y=_0x1ed2c=>_0x3e920d(new Date(+_0x1ed2c))['format'](_0x956842(0x146)),B=async(_0x427779,_0x3dc734)=>{const _0xba1855=_0x956842,_0x4c81d4=_0x427779['get'](_0x55f5e7),_0x4da8b4=_0x427779[_0xba1855(0x104)](_0x59a722);_0x3dc734[_0xba1855(0xf9)](_0x2f6e96=>{const _0x5db7fb=_0xba1855;_0x4c81d4[_0x5db7fb(0xfb)](_0x2f6e96)&&_0x3dc734[_0x5db7fb(0x12b)](_0x2f6e96);}),_0x3dc734[_0xba1855(0x139)]&&(await _0x4da8b4[_0xba1855(0x104)](_0xba1855(0x13e),{'params':{'userIDs':[..._0x3dc734]}}))[_0xba1855(0xe7)][_0xba1855(0x114)][_0xba1855(0xf9)](_0x28eb97=>{const _0x87b5d7=_0xba1855;_0x28eb97&&_0x4c81d4[_0x87b5d7(0xee)](_0x28eb97);});};function _0x2901(){const _0x48b080=['623718QKajwB','_httpService','rangeId','thread-comment-data-source.config','OpenOrReOpen','Solved','4btnRLq','415542oIynic','replyId','onStarting','customRanges','symbol','_initUserSync','57768WKSNZD','threadId','Add','syncUpdateMutationToColla','_threadCommentDataSourceService','COMMENT','delete','_sessionService','923HtBIIo','_config','Solve','listComments','/delete','885480piMWoC','_userService','disposeWithMe','post','type','pipe','_commentService','size','11mlWGhU','values','resolveComment','content','/universer-api/user/list','getUnit','/solved','error','Reply','UNIVER_UNKNOWN','addComment','/edit','YYYY/MM/DD\x20HH:mm','updateComment','deleteComment','format','_threadCommentModel','solved','parentId','payload','80ZsIGZc','createTimestamp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','onReady','map','2331295mWHlbM','userID','47198vgyGVD','getOwnPropertyDescriptor','addUser','Unknown','_initDataSource','find','7piVRtL','_threadCommentDataSource','replies','defineProperty','add','stringify','requireSession','forEach','44KTHrcO','getUser','commentUpdate$','comment','code','parse','personId','subscribe','length','root','get','Delete','user','ref','userId','filter','getMemberID','358620MbbeEp','_configService','unitId','_injector','_init','UNRECOGNIZED','getCurrentUser','comments','getComment','users','/universer-api/comment/unit/','Edit','pluginName'];_0x2901=function(){return _0x48b080;};return _0x2901();}var K=Object[_0x956842(0xed)],V=(_0x39eb99,_0x109956,_0x307906,_0x333a6d)=>{for(var _0x4973ff=_0x333a6d>0x1?void 0x0:_0x333a6d?K(_0x109956,_0x307906):_0x109956,_0x2052a6=_0x39eb99['length']-0x1,_0x2f23c5;_0x2052a6>=0x0;_0x2052a6--)(_0x2f23c5=_0x39eb99[_0x2052a6])&&(_0x4973ff=_0x2f23c5(_0x4973ff)||_0x4973ff);return _0x4973ff;},p=(_0xa5c78e,_0x2ed838)=>(_0x2019fc,_0xef746d)=>_0x2ed838(_0x2019fc,_0xef746d,_0xa5c78e);let _=class extends _0x3fbff2{constructor(_0x5d3458,_0x1875b5,_0x4dddbb,_0x240d49){const _0x1a3d24=_0x956842;super(),this[_0x1a3d24(0x138)]=_0x5d3458,this['_threadCommentModel']=_0x1875b5,this[_0x1a3d24(0x133)]=_0x4dddbb,this['_injector']=_0x240d49,this[_0x1a3d24(0x10f)](),this[_0x1a3d24(0x124)]();}[_0x956842(0x124)](){const _0x4662b4=_0x956842;this[_0x4662b4(0x134)](this['_threadCommentModel']['commentUpdate$'][_0x4662b4(0x137)](_0x2e0e87(0x10))[_0x4662b4(0x101)](_0x52e62c=>{const _0xcffc11=_0x4662b4,_0x2d98cf=new Set();_0x52e62c[_0xcffc11(0xf9)](_0x262d99=>{const _0x4e8b2f=_0xcffc11;switch(_0x262d99[_0x4e8b2f(0x136)]){case _0x4e8b2f(0xf6):{const _0x3bd4a8=_0x262d99[_0x4e8b2f(0x14d)][_0x4e8b2f(0x100)];_0x2d98cf['add'](_0x3bd4a8);break;}}}),B(this['_injector'],_0x2d98cf);}));}['_init'](){const _0x35069c=_0x956842;this[_0x35069c(0x134)](this['_commentService'][_0x35069c(0xfc)][_0x35069c(0x101)](async _0x941f38=>{const _0xe8fb09=_0x35069c;var _0x40e9d0,_0x4794c5,_0x21d1a5,_0x3d2411;const _0x222bc8=(_0x40e9d0=this[_0xe8fb09(0x14a)][_0xe8fb09(0x13f)](_0x941f38[_0xe8fb09(0x10d)])[_0xe8fb09(0xf1)](_0x72d09=>_0x72d09[_0xe8fb09(0x126)]===_0x941f38['threadId']))==null?void 0x0:_0x40e9d0[_0xe8fb09(0x103)];if(!_0x222bc8)return;const {unitId:_0xdc874d,subUnitId:_0xe4fe24}=_0x222bc8;switch(_0x941f38[_0xe8fb09(0x106)]&&this['_userService'][_0xe8fb09(0xee)](_0x941f38['user']),_0x941f38[_0xe8fb09(0x136)]){case v['Add']:break;case v['Reply']:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x144)](_0xdc874d,_0xe4fe24,{'unitId':_0xdc874d,'subUnitId':_0xe4fe24,'ref':'','id':_0x941f38['replyId'],'dT':y(+_0x941f38[_0xe8fb09(0x14f)]),'threadId':_0x941f38['threadId'],'personId':(_0x21d1a5=(_0x4794c5=_0x941f38[_0xe8fb09(0x106)])==null?void 0x0:_0x4794c5[_0xe8fb09(0xeb)])!=null?_0x21d1a5:_0x941f38[_0xe8fb09(0x108)],'text':JSON[_0xe8fb09(0xff)](_0x941f38[_0xe8fb09(0x13d)]),'parentId':_0x222bc8['id']});break;}case v[_0xe8fb09(0x105)]:{const _0x4f27dc=this[_0xe8fb09(0x14a)][_0xe8fb09(0x113)](_0xdc874d,_0xe4fe24,_0x941f38[_0xe8fb09(0x120)]);_0x4f27dc&&_0x4f27dc[_0xe8fb09(0x14c)]&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x148)](_0xdc874d,_0xe4fe24,_0x941f38['replyId']);break;}case v[_0xe8fb09(0x116)]:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x147)](_0xdc874d,_0xe4fe24,{'commentId':_0x941f38[_0xe8fb09(0x120)],'text':JSON[_0xe8fb09(0xff)](_0x941f38['content'])});break;}case v[_0xe8fb09(0x12f)]:{const _0x23a64f=(_0x3d2411=this[_0xe8fb09(0x14a)]['getUnit'](_0x941f38['unitId'])['find'](_0x52ecb5=>_0x52ecb5[_0xe8fb09(0x126)]===_0x941f38[_0xe8fb09(0x126)]))==null?void 0x0:_0x3d2411['root'];_0x23a64f&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x13c)](_0xdc874d,_0xe4fe24,_0x23a64f['id'],_0x941f38[_0xe8fb09(0x14b)]===I[_0xe8fb09(0x11d)]);break;}}}));}};_=V([p(0x0,_0x388faa(_0x403a4b)),p(0x1,_0x388faa(_0x411c90)),p(0x2,_0x388faa(_0x55f5e7)),p(0x3,_0x388faa(_0x469aaf))],_);const z=_0x956842(0x11b),O={};var k=Object[_0x956842(0xed)],Q=(_0x302ede,_0x3d65f6,_0x8f7c97,_0x51c1e0)=>{for(var _0xf13b86=_0x51c1e0>0x1?void 0x0:_0x51c1e0?k(_0x3d65f6,_0x8f7c97):_0x3d65f6,_0x1c01c6=_0x302ede['length']-0x1,_0x5a5ce4;_0x1c01c6>=0x0;_0x1c01c6--)(_0x5a5ce4=_0x302ede[_0x1c01c6])&&(_0xf13b86=_0x5a5ce4(_0xf13b86)||_0xf13b86);return _0xf13b86;},b=(_0x1ef184,_0x4c3b75)=>(_0x347115,_0x3f53b4)=>_0x4c3b75(_0x347115,_0x3f53b4,_0x1ef184);function X(_0x4c380b,_0x59cce5){const _0x2ae662=_0x956842,_0x13d7a8=_0x4c380b[_0x2ae662(0xf4)][0x0];return{..._0x59cce5,'id':_0x13d7a8[_0x2ae662(0x120)],'resolved':_0x4c380b[_0x2ae662(0x14b)]===0x1,'dT':y(_0x13d7a8['createTimestamp']),'personId':_0x13d7a8[_0x2ae662(0x108)],'threadId':_0x13d7a8['threadId']};}function ee(_0x57b8dd,_0x336cd5,_0x3ad42c){const _0xaa05fa=_0x956842;var _0x4b699c,_0x1621c5;if(((_0x1621c5=(_0x4b699c=_0x57b8dd==null?void 0x0:_0x57b8dd['replies'])==null?void 0x0:_0x4b699c[_0xaa05fa(0x102)])!=null?_0x1621c5:0x0)>0x0){const _0x258ccc=(_0x3ee5ac,_0x1e6995)=>({'id':_0x3ee5ac[_0xaa05fa(0x120)],'threadId':_0x3ee5ac['threadId'],'dT':y(_0x3ee5ac[_0xaa05fa(0x14f)]),'personId':_0x3ee5ac[_0xaa05fa(0x108)],'resolved':_0x57b8dd[_0xaa05fa(0x14b)]===I[_0xaa05fa(0x11d)],'unitId':_0x336cd5,'subUnitId':_0x3ad42c,'text':JSON[_0xaa05fa(0xff)](_0x3ee5ac[_0xaa05fa(0x13d)]),'parentId':_0x1e6995}),_0xc7b3eb=_0x258ccc(_0x57b8dd['replies'][0x0]);return{..._0xc7b3eb,'children':_0x57b8dd[_0xaa05fa(0xf4)]['slice'](0x1)[_0xaa05fa(0xe9)](_0x4dcd08=>_0x258ccc(_0x4dcd08,_0xc7b3eb['id']))};}return null;}let S=class{constructor(_0x124ede,_0x2637eb,_0x20918a){const _0x6518f3=_0x956842;this['_httpService']=_0x124ede,this[_0x6518f3(0x133)]=_0x2637eb,this[_0x6518f3(0x12c)]=_0x20918a;}async[_0x956842(0x144)](_0x31fd1c){const _0x3f9f13=_0x956842;var _0x204986,_0xca1818;const {parentId:_0x1c2f71,unitId:_0x1b9b5c,text:_0x2c7406,threadId:_0x4752ef}=_0x31fd1c,_0x275b9c=(_0xca1818=(_0x204986=_0x2c7406[_0x3f9f13(0x122)])==null?void 0x0:_0x204986[_0x3f9f13(0x109)](_0x55cfd8=>_0x55cfd8['rangeType']===_0x558957[_0x3f9f13(0x12a)])[_0x3f9f13(0xe9)](_0x227f18=>_0x227f18['rangeId']))!=null?_0xca1818:[],_0xf87d93=JSON[_0x3f9f13(0xf7)](_0x2c7406),_0x41b0f3=(await this[_0x3f9f13(0x12c)][_0x3f9f13(0xf8)](_0x1b9b5c))['getMemberID']();if(_0x1c2f71){const _0x334645={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c,'threadId':_0x4752ef},_0x4b45fa=(await this[_0x3f9f13(0x119)]['post']('/universer-api/comment/unit/'+_0x1b9b5c+'/reply',{'body':_0x334645}))[_0x3f9f13(0xe7)]['reply'];return{..._0x31fd1c,'id':_0x4b45fa[_0x3f9f13(0x120)],'dT':_0x3e920d(+_0x4b45fa[_0x3f9f13(0x14f)])[_0x3f9f13(0x149)](_0x3f9f13(0x146)),'personId':_0x4b45fa['userId']};}else{const _0x1c8531={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c},_0x53880d=await this[_0x3f9f13(0x119)][_0x3f9f13(0x135)]('/universer-api/comment/unit/'+_0x1b9b5c+'/add',{'body':_0x1c8531});return X(_0x53880d[_0x3f9f13(0xe7)][_0x3f9f13(0xfd)],_0x31fd1c);}}async[_0x956842(0x147)](_0x4a18c5){const _0x42f38f=_0x956842;var _0x26e246,_0x1a8df5;const {text:_0x56ecca,unitId:_0xf0e616}=_0x4a18c5,_0x4ec138=(_0x1a8df5=(_0x26e246=_0x56ecca[_0x42f38f(0x122)])==null?void 0x0:_0x26e246[_0x42f38f(0x109)](_0x5b3388=>_0x5b3388['rangeType']===_0x558957['COMMENT'])['map'](_0x345545=>_0x345545[_0x42f38f(0x11a)]))!=null?_0x1a8df5:[],_0x345d78=JSON[_0x42f38f(0xf7)](_0x56ecca),_0x55c176=_0x4a18c5['threadId'],_0x5ab3b5=_0x4a18c5['id'],_0x113690={'memberId':(await this[_0x42f38f(0x12c)]['requireSession'](_0xf0e616))[_0x42f38f(0x10a)](),'unitId':_0xf0e616,'threadId':_0x55c176,'mention':_0x4ec138,'content':_0x345d78,'replyId':_0x5ab3b5},_0x549625=await this[_0x42f38f(0x119)][_0x42f38f(0x135)](_0x42f38f(0x115)+_0xf0e616+_0x42f38f(0x145),{'body':_0x113690});return!_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)]||_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)][_0x42f38f(0xfe)]===0x1;}async[_0x956842(0x13c)](_0x385737){const _0x324e5c=_0x956842,{unitId:_0x2b620f}=_0x385737,_0x13b3b4=_0x385737[_0x324e5c(0x126)],_0x5b351c={'memberId':this[_0x324e5c(0x133)][_0x324e5c(0x111)]()[_0x324e5c(0xeb)],'unitId':_0x2b620f,'threadId':_0x13b3b4,'solved':_0x385737['resolved']?I[_0x324e5c(0x11d)]:I['OpenOrReOpen']},_0x1f4c16=await this[_0x324e5c(0x119)][_0x324e5c(0x135)]('/universer-api/comment/unit/'+_0x2b620f+_0x324e5c(0x140),{'body':_0x5b351c});return!_0x1f4c16[_0x324e5c(0xe7)]['error']||_0x1f4c16[_0x324e5c(0xe7)][_0x324e5c(0x141)][_0x324e5c(0xfe)]===0x1;}async['deleteComment'](_0x4270ad,_0x29fd95,_0xaad581,_0x3d79cd){const _0x44ff0e=_0x956842,_0x3a0cd0={'memberId':(await this[_0x44ff0e(0x12c)][_0x44ff0e(0xf8)](_0x4270ad))['getMemberID'](),'threadId':_0xaad581,'replyId':_0x3d79cd,'unitId':_0x4270ad},_0x395fd6=await this[_0x44ff0e(0x119)][_0x44ff0e(0x135)](_0x44ff0e(0x115)+_0x4270ad+_0x44ff0e(0x131),{'body':_0x3a0cd0});return!_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]||_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]['code']===0x1;}async[_0x956842(0x130)](_0x5498c0,_0x5eb2b6,_0x2d5c00){const _0x28e2d9=_0x956842,_0x1137ab={'unitId':_0x5498c0,'threadId':_0x2d5c00},_0xf1d849=await this['_httpService']['post'](_0x28e2d9(0x115)+_0x5498c0+'/list',{'body':_0x1137ab}),_0x24fac9=_0x2d5c00[_0x28e2d9(0xe9)](_0x264b43=>ee(_0xf1d849['body'][_0x28e2d9(0x112)][_0x264b43],_0x5498c0,_0x5eb2b6))['filter'](Boolean);return Object[_0x28e2d9(0x13b)](_0xf1d849[_0x28e2d9(0xe7)][_0x28e2d9(0x114)])['forEach'](_0x5c7149=>{const _0x59a7a7=_0x28e2d9;this['_userService'][_0x59a7a7(0xee)](_0x5c7149);}),_0x24fac9;}['saveCommentToSnapshot'](_0x44f4d7){const _0x4d650c=_0x956842;return{'id':_0x44f4d7['id'],'threadId':_0x44f4d7[_0x4d650c(0x126)],'ref':_0x44f4d7[_0x4d650c(0x107)]};}};S=Q([b(0x0,_0x388faa(_0x59a722)),b(0x1,_0x388faa(_0x55f5e7)),b(0x2,_0x388faa(_0x5904f9))],S);var re=Object[_0x956842(0xed)],te=(_0x28e891,_0x1eecb4,_0x18e04b,_0x4ba75d)=>{const _0x204eb6=_0x956842;for(var _0x1e4226=_0x4ba75d>0x1?void 0x0:_0x4ba75d?re(_0x1eecb4,_0x18e04b):_0x1eecb4,_0x53c6eb=_0x28e891[_0x204eb6(0x102)]-0x1,_0xf586cd;_0x53c6eb>=0x0;_0x53c6eb--)(_0xf586cd=_0x28e891[_0x53c6eb])&&(_0x1e4226=_0xf586cd(_0x1e4226)||_0x1e4226);return _0x1e4226;},M=(_0x313d98,_0x5b8d07)=>(_0x3b1760,_0x2ef73a)=>_0x5b8d07(_0x3b1760,_0x2ef73a,_0x313d98);let f=class extends _0x3fbff2{constructor(_0x229eca,_0x4e2365){const _0x50bb22=_0x956842;super(),this['_threadCommentDataSourceService']=_0x229eca,this[_0x50bb22(0xf3)]=_0x4e2365,this[_0x50bb22(0xf0)]();}[_0x956842(0xf0)](){const _0x1e648b=_0x956842;this[_0x1e648b(0x129)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1e648b(0x128)]=!0x1;}};f=te([M(0x0,_0x2efa6a),M(0x1,_0x388faa(S))],f);var se=Object[_0x956842(0xf5)],oe=Object[_0x956842(0xed)],ne=(_0x247e7d,_0x4462e6,_0x394e7e)=>_0x4462e6 in _0x247e7d?se(_0x247e7d,_0x4462e6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x394e7e}):_0x247e7d[_0x4462e6]=_0x394e7e,ie=(_0x314c32,_0x17d4cc,_0x5828f0,_0x37f6de)=>{const _0x385a6a=_0x956842;for(var _0x357c99=_0x37f6de>0x1?void 0x0:_0x37f6de?oe(_0x17d4cc,_0x5828f0):_0x17d4cc,_0x195918=_0x314c32[_0x385a6a(0x102)]-0x1,_0x3d119f;_0x195918>=0x0;_0x195918--)(_0x3d119f=_0x314c32[_0x195918])&&(_0x357c99=_0x3d119f(_0x357c99)||_0x357c99);return _0x357c99;},N=(_0x4dfbab,_0x436cf6)=>(_0xacb57,_0x24b764)=>_0x436cf6(_0xacb57,_0x24b764,_0x4dfbab),$=(_0x37a608,_0x4fe0b5,_0xda5cba)=>ne(_0x37a608,typeof _0x4fe0b5!=_0x956842(0x123)?_0x4fe0b5+'':_0x4fe0b5,_0xda5cba);let g=class extends _0x16d0b0{constructor(_0x56a7ed=O,_0x15a610,_0x572da2){const _0x2ff10a=_0x956842;super(),this[_0x2ff10a(0x12e)]=_0x56a7ed,this[_0x2ff10a(0x10e)]=_0x15a610,this[_0x2ff10a(0x10c)]=_0x572da2;const {..._0x496091}=_0x32f0bd({},O,this[_0x2ff10a(0x12e)]);this[_0x2ff10a(0x10c)]['setConfig'](z,_0x496091);}[_0x956842(0x121)](){[[S],[f],[_]]['forEach'](_0x5b2cfd=>{const _0x18cbe0=_0x243a;this[_0x18cbe0(0x10e)][_0x18cbe0(0xf6)](_0x5b2cfd);});}[_0x956842(0xe8)](){const _0x1a50d7=_0x956842;this['_injector']['get'](f),this[_0x1a50d7(0x10e)][_0x1a50d7(0x104)](_);}};$(g,_0x956842(0x117),W),$(g,_0x956842(0x136),_0x16ec5a[_0x956842(0x143)]),g=ie([_0x23d00e(_0x4b75f2,_0x3802b1,_0x17a341),N(0x1,_0x388faa(_0x469aaf)),N(0x2,_0x1759fb)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2482b5=_0x36f5;(function(_0xf1335b,_0x1e66f9){const _0x3b88e6=_0x36f5,_0x1d9984=_0xf1335b();while(!![]){try{const _0x43c6fe=-parseInt(_0x3b88e6(0x225))/0x1+parseInt(_0x3b88e6(0x1fc))/0x2*(parseInt(_0x3b88e6(0x244))/0x3)+-parseInt(_0x3b88e6(0x21a))/0x4*(-parseInt(_0x3b88e6(0x23e))/0x5)+parseInt(_0x3b88e6(0x229))/0x6+parseInt(_0x3b88e6(0x1f9))/0x7+parseInt(_0x3b88e6(0x240))/0x8+-parseInt(_0x3b88e6(0x208))/0x9;if(_0x43c6fe===_0x1e66f9)break;else _0x1d9984['push'](_0x1d9984['shift']());}catch(_0x2ea407){_0x1d9984['push'](_0x1d9984['shift']());}}}(_0x30b3,0x891ac));function _0x30b3(){const _0x4fa12f=['Delete','UNRECOGNIZED','4776290WrAOWT','/list','8201728AKXjWL','getCurrentUser','/add','userID','15MXOVqQ','get','add','subscribe','threadId','Solved','OpenOrReOpen','Unknown','_threadCommentDataSourceService','_init','format','getUser','ref','rangeType','dataSource','type','saveCommentToSnapshot','unitId','parse','/solved','root','_commentService','addUser','content','_httpService','1070755FtPsgk','onReady','_sessionService','210396nxmMJr','deleteComment','_threadCommentDataSource','disposeWithMe','requireSession','syncUpdateMutationToColla','map','Reply','listComments','replies','forEach','createTimestamp','15225912GAfFzj','setConfig','Add','slice','defineProperty','Edit','replyId','_injector','filter','_initUserSync','_config','_initDataSource','stringify','comments','code','COMMENT','getComment','_threadCommentModel','4wNRoPK','getMemberID','personId','commentUpdate$','userId','/delete','symbol','/universer-api/comment/unit/','user','_userService','values','431867DAfKgI','size','/reply','length','154716OeLVTs','getUnit','customRanges','comment','Solve','/universer-api/user/list','solved','updateComment','error','_configService','find','getOwnPropertyDescriptor','users','body','resolveComment','UNIVER_UNKNOWN','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','addComment'];_0x30b3=function(){return _0x4fa12f;};return _0x30b3();}import{CommentService as _0x48a9f5,CollaborationSessionService as _0x385d7c,UniverCollaborationClientPlugin as _0x1aa4b3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26258d}from'@univerjs-pro/license';import{dayjs as _0x1fe5ef,UserManagerService as _0x3f1b78,Inject as _0x1289ff,Injector as _0x378ce5,Disposable as _0x1663e6,CustomRangeType as _0x261728,UniverInstanceType as _0x5abae1,DependentOn as _0x15259c,IConfigService as _0xa1e2a6,Plugin as _0x1215a8,merge as _0x4f79b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43a799}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x49d49f,IThreadCommentDataSourceService as _0x555c27}from'@univerjs/thread-comment';import{bufferTime as _0x292fec}from'rxjs';function _0x36f5(_0x46d50a,_0xed5230){const _0x30b3c7=_0x30b3();return _0x36f5=function(_0x36f55e,_0x2b6a04){_0x36f55e=_0x36f55e-0x1f0;let _0x2887ba=_0x30b3c7[_0x36f55e];return _0x2887ba;},_0x36f5(_0x46d50a,_0xed5230);}import{HTTPService as _0x4193ea}from'@univerjs/network';const W=_0x2482b5(0x239);var I=(_0x3bb1e9=>(_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x24a)]=0x0]=_0x2482b5(0x24a),_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x249)]=0x1]='Solved',_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3bb1e9))(I||{}),v=(_0x3cb929=>(_0x3cb929[_0x3cb929['Unknown']=0x0]=_0x2482b5(0x24b),_0x3cb929[_0x3cb929['Add']=0x1]=_0x2482b5(0x20a),_0x3cb929[_0x3cb929['Reply']=0x2]=_0x2482b5(0x203),_0x3cb929[_0x3cb929['Edit']=0x3]=_0x2482b5(0x20d),_0x3cb929[_0x3cb929[_0x2482b5(0x23c)]=0x4]=_0x2482b5(0x23c),_0x3cb929[_0x3cb929[_0x2482b5(0x22d)]=0x5]=_0x2482b5(0x22d),_0x3cb929[_0x3cb929[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3cb929))(v||{});const y=_0x32c642=>_0x1fe5ef(new Date(+_0x32c642))[_0x2482b5(0x24e)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x949c69,_0x2111f5)=>{const _0x22bfed=_0x2482b5,_0x51129b=_0x949c69[_0x22bfed(0x245)](_0x3f1b78),_0x2b40db=_0x949c69['get'](_0x4193ea);_0x2111f5[_0x22bfed(0x206)](_0x47794d=>{const _0x17e38b=_0x22bfed;_0x51129b[_0x17e38b(0x24f)](_0x47794d)&&_0x2111f5['delete'](_0x47794d);}),_0x2111f5[_0x22bfed(0x226)]&&(await _0x2b40db[_0x22bfed(0x245)](_0x22bfed(0x22e),{'params':{'userIDs':[..._0x2111f5]}}))[_0x22bfed(0x236)][_0x22bfed(0x235)]['forEach'](_0x5c565c=>{_0x5c565c&&_0x51129b['addUser'](_0x5c565c);});};var K=Object[_0x2482b5(0x234)],V=(_0x5ac750,_0xd338f0,_0x182ff9,_0x466841)=>{const _0x51e246=_0x2482b5;for(var _0x592327=_0x466841>0x1?void 0x0:_0x466841?K(_0xd338f0,_0x182ff9):_0xd338f0,_0x50dd29=_0x5ac750[_0x51e246(0x228)]-0x1,_0x25d153;_0x50dd29>=0x0;_0x50dd29--)(_0x25d153=_0x5ac750[_0x50dd29])&&(_0x592327=_0x25d153(_0x592327)||_0x592327);return _0x592327;},p=(_0x32fadb,_0x1de72e)=>(_0x2af5c7,_0x2798f6)=>_0x1de72e(_0x2af5c7,_0x2798f6,_0x32fadb);let _=class extends _0x1663e6{constructor(_0x40cd04,_0x3d6d90,_0x43e864,_0x16f732){const _0x260579=_0x2482b5;super(),this[_0x260579(0x1f5)]=_0x40cd04,this['_threadCommentModel']=_0x3d6d90,this[_0x260579(0x223)]=_0x43e864,this['_injector']=_0x16f732,this[_0x260579(0x24d)](),this[_0x260579(0x211)]();}[_0x2482b5(0x211)](){const _0x1d08f4=_0x2482b5;this['disposeWithMe'](this[_0x1d08f4(0x219)][_0x1d08f4(0x21d)]['pipe'](_0x292fec(0x10))[_0x1d08f4(0x247)](_0x597c20=>{const _0x4acf03=_0x1d08f4,_0xe03f25=new Set();_0x597c20[_0x4acf03(0x206)](_0xd568bd=>{const _0x5b6480=_0x4acf03;switch(_0xd568bd['type']){case'add':{const _0x162b3e=_0xd568bd['payload'][_0x5b6480(0x21c)];_0xe03f25[_0x5b6480(0x246)](_0x162b3e);break;}}}),B(this[_0x4acf03(0x20f)],_0xe03f25);}));}[_0x2482b5(0x24d)](){const _0x786df1=_0x2482b5;this[_0x786df1(0x1ff)](this[_0x786df1(0x1f5)][_0x786df1(0x21d)][_0x786df1(0x247)](async _0x43234c=>{const _0x369663=_0x786df1;var _0x10b72a,_0x1225b6,_0x1165f2,_0x3bed3d;const _0x33eea7=(_0x10b72a=this[_0x369663(0x219)]['getUnit'](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x5c2d53=>_0x5c2d53['threadId']===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x10b72a[_0x369663(0x1f4)];if(!_0x33eea7)return;const {unitId:_0x493a78,subUnitId:_0x5af512}=_0x33eea7;switch(_0x43234c['user']&&this['_userService'][_0x369663(0x1f6)](_0x43234c[_0x369663(0x222)]),_0x43234c[_0x369663(0x253)]){case v[_0x369663(0x20a)]:break;case v[_0x369663(0x203)]:{this[_0x369663(0x219)]['addComment'](_0x493a78,_0x5af512,{'unitId':_0x493a78,'subUnitId':_0x5af512,'ref':'','id':_0x43234c[_0x369663(0x20e)],'dT':y(+_0x43234c['createTimestamp']),'threadId':_0x43234c[_0x369663(0x248)],'personId':(_0x1165f2=(_0x1225b6=_0x43234c[_0x369663(0x222)])==null?void 0x0:_0x1225b6[_0x369663(0x243)])!=null?_0x1165f2:_0x43234c['userId'],'text':JSON[_0x369663(0x1f2)](_0x43234c[_0x369663(0x1f7)]),'parentId':_0x33eea7['id']});break;}case v[_0x369663(0x23c)]:{const _0x24db09=this[_0x369663(0x219)][_0x369663(0x218)](_0x493a78,_0x5af512,_0x43234c[_0x369663(0x20e)]);_0x24db09&&_0x24db09['parentId']&&this[_0x369663(0x219)]['deleteComment'](_0x493a78,_0x5af512,_0x43234c['replyId']);break;}case v['Edit']:{this[_0x369663(0x219)][_0x369663(0x230)](_0x493a78,_0x5af512,{'commentId':_0x43234c[_0x369663(0x20e)],'text':JSON[_0x369663(0x1f2)](_0x43234c['content'])});break;}case v[_0x369663(0x22d)]:{const _0x489c03=(_0x3bed3d=this[_0x369663(0x219)][_0x369663(0x22a)](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x9c06ca=>_0x9c06ca[_0x369663(0x248)]===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x3bed3d[_0x369663(0x1f4)];_0x489c03&&this[_0x369663(0x219)][_0x369663(0x237)](_0x493a78,_0x5af512,_0x489c03['id'],_0x43234c[_0x369663(0x22f)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1289ff(_0x48a9f5)),p(0x1,_0x1289ff(_0x49d49f)),p(0x2,_0x1289ff(_0x3f1b78)),p(0x3,_0x1289ff(_0x378ce5))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x2482b5(0x234)],Q=(_0xa7119c,_0x332659,_0x2815c1,_0x137673)=>{const _0x29e9a6=_0x2482b5;for(var _0x1fba62=_0x137673>0x1?void 0x0:_0x137673?k(_0x332659,_0x2815c1):_0x332659,_0x2f2138=_0xa7119c[_0x29e9a6(0x228)]-0x1,_0x53cb04;_0x2f2138>=0x0;_0x2f2138--)(_0x53cb04=_0xa7119c[_0x2f2138])&&(_0x1fba62=_0x53cb04(_0x1fba62)||_0x1fba62);return _0x1fba62;},b=(_0x185208,_0xbd1c9f)=>(_0x2328c8,_0x57fbd8)=>_0xbd1c9f(_0x2328c8,_0x57fbd8,_0x185208);function X(_0x3b7d98,_0x11b8b2){const _0x1ee499=_0x2482b5,_0x1f49b4=_0x3b7d98[_0x1ee499(0x205)][0x0];return{..._0x11b8b2,'id':_0x1f49b4[_0x1ee499(0x20e)],'resolved':_0x3b7d98[_0x1ee499(0x22f)]===0x1,'dT':y(_0x1f49b4[_0x1ee499(0x207)]),'personId':_0x1f49b4[_0x1ee499(0x21e)],'threadId':_0x1f49b4[_0x1ee499(0x248)]};}function ee(_0x5851ba,_0x8d91de,_0x57b405){const _0x33de5d=_0x2482b5;var _0x32bdfb,_0x5221af;if(((_0x5221af=(_0x32bdfb=_0x5851ba==null?void 0x0:_0x5851ba[_0x33de5d(0x205)])==null?void 0x0:_0x32bdfb[_0x33de5d(0x228)])!=null?_0x5221af:0x0)>0x0){const _0x30f85e=(_0x9a3d55,_0x209e05)=>({'id':_0x9a3d55[_0x33de5d(0x20e)],'threadId':_0x9a3d55[_0x33de5d(0x248)],'dT':y(_0x9a3d55[_0x33de5d(0x207)]),'personId':_0x9a3d55[_0x33de5d(0x21e)],'resolved':_0x5851ba[_0x33de5d(0x22f)]===I[_0x33de5d(0x249)],'unitId':_0x8d91de,'subUnitId':_0x57b405,'text':JSON[_0x33de5d(0x1f2)](_0x9a3d55[_0x33de5d(0x1f7)]),'parentId':_0x209e05}),_0x2e0a10=_0x30f85e(_0x5851ba['replies'][0x0]);return{..._0x2e0a10,'children':_0x5851ba['replies'][_0x33de5d(0x20b)](0x1)['map'](_0x4455e7=>_0x30f85e(_0x4455e7,_0x2e0a10['id']))};}return null;}let S=class{constructor(_0x296e7d,_0x5154a8,_0x172d19){const _0x34ac29=_0x2482b5;this['_httpService']=_0x296e7d,this[_0x34ac29(0x223)]=_0x5154a8,this[_0x34ac29(0x1fb)]=_0x172d19;}async[_0x2482b5(0x23b)](_0x421dab){const _0x247af1=_0x2482b5;var _0x660813,_0x5f107c;const {parentId:_0x5ad9d1,unitId:_0xeeb610,text:_0xc12cb7,threadId:_0x562bcd}=_0x421dab,_0x31995d=(_0x5f107c=(_0x660813=_0xc12cb7[_0x247af1(0x22b)])==null?void 0x0:_0x660813[_0x247af1(0x210)](_0x20ae9e=>_0x20ae9e[_0x247af1(0x251)]===_0x261728[_0x247af1(0x217)])['map'](_0x2a1201=>_0x2a1201['rangeId']))!=null?_0x5f107c:[],_0x4260b5=JSON[_0x247af1(0x214)](_0xc12cb7),_0x54e567=(await this[_0x247af1(0x1fb)][_0x247af1(0x200)](_0xeeb610))[_0x247af1(0x21b)]();if(_0x5ad9d1){const _0x17f1a2={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d,'threadId':_0x562bcd},_0x5fb4cd=(await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x227),{'body':_0x17f1a2}))['body']['reply'];return{..._0x421dab,'id':_0x5fb4cd[_0x247af1(0x20e)],'dT':_0x1fe5ef(+_0x5fb4cd[_0x247af1(0x207)])[_0x247af1(0x24e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5fb4cd[_0x247af1(0x21e)]};}else{const _0x42a2a8={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d},_0x13b663=await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x242),{'body':_0x42a2a8});return X(_0x13b663['body'][_0x247af1(0x22c)],_0x421dab);}}async['updateComment'](_0x31c808){const _0x53ffca=_0x2482b5;var _0x53a46d,_0x4a9e08;const {text:_0x217b9a,unitId:_0xec6bc5}=_0x31c808,_0x378b97=(_0x4a9e08=(_0x53a46d=_0x217b9a['customRanges'])==null?void 0x0:_0x53a46d['filter'](_0x392a59=>_0x392a59[_0x53ffca(0x251)]===_0x261728[_0x53ffca(0x217)])[_0x53ffca(0x202)](_0x7b95a8=>_0x7b95a8['rangeId']))!=null?_0x4a9e08:[],_0x3bb85b=JSON[_0x53ffca(0x214)](_0x217b9a),_0x1cd503=_0x31c808['threadId'],_0x3d6525=_0x31c808['id'],_0x495519={'memberId':(await this[_0x53ffca(0x1fb)][_0x53ffca(0x200)](_0xec6bc5))[_0x53ffca(0x21b)](),'unitId':_0xec6bc5,'threadId':_0x1cd503,'mention':_0x378b97,'content':_0x3bb85b,'replyId':_0x3d6525},_0x1c8f61=await this['_httpService'][_0x53ffca(0x23a)](_0x53ffca(0x221)+_0xec6bc5+'/edit',{'body':_0x495519});return!_0x1c8f61[_0x53ffca(0x236)]['error']||_0x1c8f61[_0x53ffca(0x236)][_0x53ffca(0x231)][_0x53ffca(0x216)]===0x1;}async[_0x2482b5(0x237)](_0x1d68fe){const _0x1d590f=_0x2482b5,{unitId:_0x5790af}=_0x1d68fe,_0x113752=_0x1d68fe[_0x1d590f(0x248)],_0x446d51={'memberId':this[_0x1d590f(0x223)][_0x1d590f(0x241)]()['userID'],'unitId':_0x5790af,'threadId':_0x113752,'solved':_0x1d68fe['resolved']?I[_0x1d590f(0x249)]:I['OpenOrReOpen']},_0x40ce4f=await this[_0x1d590f(0x1f8)]['post'](_0x1d590f(0x221)+_0x5790af+_0x1d590f(0x1f3),{'body':_0x446d51});return!_0x40ce4f[_0x1d590f(0x236)]['error']||_0x40ce4f[_0x1d590f(0x236)][_0x1d590f(0x231)][_0x1d590f(0x216)]===0x1;}async[_0x2482b5(0x1fd)](_0x2618dd,_0x33f536,_0x3b2d3a,_0x1152dc){const _0x3d1dd9=_0x2482b5,_0x2e0cf5={'memberId':(await this[_0x3d1dd9(0x1fb)]['requireSession'](_0x2618dd))[_0x3d1dd9(0x21b)](),'threadId':_0x3b2d3a,'replyId':_0x1152dc,'unitId':_0x2618dd},_0x5251c8=await this[_0x3d1dd9(0x1f8)]['post'](_0x3d1dd9(0x221)+_0x2618dd+_0x3d1dd9(0x21f),{'body':_0x2e0cf5});return!_0x5251c8[_0x3d1dd9(0x236)]['error']||_0x5251c8['body'][_0x3d1dd9(0x231)][_0x3d1dd9(0x216)]===0x1;}async[_0x2482b5(0x204)](_0x1781af,_0x37c90d,_0x47b7f2){const _0x1a247a=_0x2482b5,_0x5be237={'unitId':_0x1781af,'threadId':_0x47b7f2},_0x52acac=await this[_0x1a247a(0x1f8)][_0x1a247a(0x23a)](_0x1a247a(0x221)+_0x1781af+_0x1a247a(0x23f),{'body':_0x5be237}),_0x15e0d4=_0x47b7f2[_0x1a247a(0x202)](_0x53d206=>ee(_0x52acac[_0x1a247a(0x236)][_0x1a247a(0x215)][_0x53d206],_0x1781af,_0x37c90d))[_0x1a247a(0x210)](Boolean);return Object[_0x1a247a(0x224)](_0x52acac[_0x1a247a(0x236)]['users'])[_0x1a247a(0x206)](_0x3fa766=>{const _0x4a9bcf=_0x1a247a;this[_0x4a9bcf(0x223)][_0x4a9bcf(0x1f6)](_0x3fa766);}),_0x15e0d4;}[_0x2482b5(0x1f0)](_0x41145b){const _0x2a8400=_0x2482b5;return{'id':_0x41145b['id'],'threadId':_0x41145b['threadId'],'ref':_0x41145b[_0x2a8400(0x250)]};}};S=Q([b(0x0,_0x1289ff(_0x4193ea)),b(0x1,_0x1289ff(_0x3f1b78)),b(0x2,_0x1289ff(_0x385d7c))],S);var re=Object[_0x2482b5(0x234)],te=(_0x584608,_0x5b4ed9,_0x1f21ad,_0x403030)=>{const _0x42290c=_0x2482b5;for(var _0xa6baee=_0x403030>0x1?void 0x0:_0x403030?re(_0x5b4ed9,_0x1f21ad):_0x5b4ed9,_0x5adadf=_0x584608[_0x42290c(0x228)]-0x1,_0x13ac6b;_0x5adadf>=0x0;_0x5adadf--)(_0x13ac6b=_0x584608[_0x5adadf])&&(_0xa6baee=_0x13ac6b(_0xa6baee)||_0xa6baee);return _0xa6baee;},M=(_0x3edce6,_0x5a1c40)=>(_0x46f74a,_0x892a5d)=>_0x5a1c40(_0x46f74a,_0x892a5d,_0x3edce6);let f=class extends _0x1663e6{constructor(_0x110fd5,_0x51bcf8){const _0x238d49=_0x2482b5;super(),this[_0x238d49(0x24c)]=_0x110fd5,this[_0x238d49(0x1fe)]=_0x51bcf8,this[_0x238d49(0x213)]();}[_0x2482b5(0x213)](){const _0x27311d=_0x2482b5;this[_0x27311d(0x24c)][_0x27311d(0x252)]=this[_0x27311d(0x1fe)],this[_0x27311d(0x24c)][_0x27311d(0x201)]=!0x1;}};f=te([M(0x0,_0x555c27),M(0x1,_0x1289ff(S))],f);var se=Object[_0x2482b5(0x20c)],oe=Object[_0x2482b5(0x234)],ne=(_0x48c421,_0x1e0d2c,_0x484901)=>_0x1e0d2c in _0x48c421?se(_0x48c421,_0x1e0d2c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x484901}):_0x48c421[_0x1e0d2c]=_0x484901,ie=(_0x2627ee,_0x591dff,_0x2b577f,_0xa0fc13)=>{const _0x3b7da2=_0x2482b5;for(var _0x1fd065=_0xa0fc13>0x1?void 0x0:_0xa0fc13?oe(_0x591dff,_0x2b577f):_0x591dff,_0x24a656=_0x2627ee[_0x3b7da2(0x228)]-0x1,_0xb2f445;_0x24a656>=0x0;_0x24a656--)(_0xb2f445=_0x2627ee[_0x24a656])&&(_0x1fd065=_0xb2f445(_0x1fd065)||_0x1fd065);return _0x1fd065;},N=(_0x45a63c,_0x10070b)=>(_0x5dd389,_0x81c684)=>_0x10070b(_0x5dd389,_0x81c684,_0x45a63c),$=(_0x867e6c,_0x5cf70e,_0x440c9f)=>ne(_0x867e6c,typeof _0x5cf70e!=_0x2482b5(0x220)?_0x5cf70e+'':_0x5cf70e,_0x440c9f);let g=class extends _0x1215a8{constructor(_0xca22b9=O,_0x506ba6,_0x37c07c){const _0x3a2bd2=_0x2482b5;super(),this[_0x3a2bd2(0x212)]=_0xca22b9,this[_0x3a2bd2(0x20f)]=_0x506ba6,this[_0x3a2bd2(0x232)]=_0x37c07c;const {..._0x259999}=_0x4f79b5({},O,this['_config']);this['_configService'][_0x3a2bd2(0x209)](z,_0x259999);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x1f323f=>{const _0x1fe196=_0x36f5;this[_0x1fe196(0x20f)][_0x1fe196(0x246)](_0x1f323f);});}[_0x2482b5(0x1fa)](){const _0x3eed37=_0x2482b5;this[_0x3eed37(0x20f)]['get'](f),this[_0x3eed37(0x20f)][_0x3eed37(0x245)](_);}};$(g,'pluginName',W),$(g,_0x2482b5(0x253),_0x5abae1[_0x2482b5(0x238)]),g=ie([_0x15259c(_0x43a799,_0x1aa4b3,_0x26258d),N(0x1,_0x1289ff(_0x378ce5)),N(0x2,_0xa1e2a6)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x243a(_0x50dc7e,_0x2ffada){const _0x290111=_0x2901();return _0x243a=function(_0x243a27,_0x4c55b7){_0x243a27=_0x243a27-0xe6;let _0x4305bb=_0x290111[_0x243a27];return _0x4305bb;},_0x243a(_0x50dc7e,_0x2ffada);}const _0x956842=_0x243a;(function(_0x5079eb,_0x1c2770){const _0x137e76=_0x243a,_0x23b293=_0x5079eb();while(!![]){try{const _0x55df3c=parseInt(_0x137e76(0x13a))/0x1*(parseInt(_0x137e76(0xec))/0x2)+parseInt(_0x137e76(0x132))/0x3*(parseInt(_0x137e76(0x11e))/0x4)+-parseInt(_0x137e76(0xea))/0x5+parseInt(_0x137e76(0x11f))/0x6*(parseInt(_0x137e76(0xf2))/0x7)+-parseInt(_0x137e76(0x14e))/0x8*(-parseInt(_0x137e76(0x118))/0x9)+parseInt(_0x137e76(0x10b))/0xa*(parseInt(_0x137e76(0xfa))/0xb)+parseInt(_0x137e76(0x125))/0xc*(-parseInt(_0x137e76(0x12d))/0xd);if(_0x55df3c===_0x1c2770)break;else _0x23b293['push'](_0x23b293['shift']());}catch(_0x5a687d){_0x23b293['push'](_0x23b293['shift']());}}}(_0x2901,0x9f485));import{CommentService as _0x403a4b,CollaborationSessionService as _0x5904f9,UniverCollaborationClientPlugin as _0x3802b1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x17a341}from'@univerjs-pro/license';import{dayjs as _0x3e920d,UserManagerService as _0x55f5e7,Inject as _0x388faa,Injector as _0x469aaf,Disposable as _0x3fbff2,CustomRangeType as _0x558957,UniverInstanceType as _0x16ec5a,DependentOn as _0x23d00e,IConfigService as _0x1759fb,Plugin as _0x16d0b0,merge as _0x32f0bd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b75f2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x411c90,IThreadCommentDataSourceService as _0x2efa6a}from'@univerjs/thread-comment';import{bufferTime as _0x2e0e87}from'rxjs';import{HTTPService as _0x59a722}from'@univerjs/network';const W=_0x956842(0xe6);var I=(_0x530b6e=>(_0x530b6e[_0x530b6e[_0x956842(0x11c)]=0x0]=_0x956842(0x11c),_0x530b6e[_0x530b6e[_0x956842(0x11d)]=0x1]=_0x956842(0x11d),_0x530b6e[_0x530b6e[_0x956842(0x110)]=-0x1]='UNRECOGNIZED',_0x530b6e))(I||{}),v=(_0x1ec410=>(_0x1ec410[_0x1ec410[_0x956842(0xef)]=0x0]=_0x956842(0xef),_0x1ec410[_0x1ec410[_0x956842(0x127)]=0x1]='Add',_0x1ec410[_0x1ec410[_0x956842(0x142)]=0x2]='Reply',_0x1ec410[_0x1ec410[_0x956842(0x116)]=0x3]=_0x956842(0x116),_0x1ec410[_0x1ec410['Delete']=0x4]=_0x956842(0x105),_0x1ec410[_0x1ec410['Solve']=0x5]='Solve',_0x1ec410[_0x1ec410['UNRECOGNIZED']=-0x1]=_0x956842(0x110),_0x1ec410))(v||{});const y=_0x1ed2c=>_0x3e920d(new Date(+_0x1ed2c))['format'](_0x956842(0x146)),B=async(_0x427779,_0x3dc734)=>{const _0xba1855=_0x956842,_0x4c81d4=_0x427779['get'](_0x55f5e7),_0x4da8b4=_0x427779[_0xba1855(0x104)](_0x59a722);_0x3dc734[_0xba1855(0xf9)](_0x2f6e96=>{const _0x5db7fb=_0xba1855;_0x4c81d4[_0x5db7fb(0xfb)](_0x2f6e96)&&_0x3dc734[_0x5db7fb(0x12b)](_0x2f6e96);}),_0x3dc734[_0xba1855(0x139)]&&(await _0x4da8b4[_0xba1855(0x104)](_0xba1855(0x13e),{'params':{'userIDs':[..._0x3dc734]}}))[_0xba1855(0xe7)][_0xba1855(0x114)][_0xba1855(0xf9)](_0x28eb97=>{const _0x87b5d7=_0xba1855;_0x28eb97&&_0x4c81d4[_0x87b5d7(0xee)](_0x28eb97);});};function _0x2901(){const _0x48b080=['623718QKajwB','_httpService','rangeId','thread-comment-data-source.config','OpenOrReOpen','Solved','4btnRLq','415542oIynic','replyId','onStarting','customRanges','symbol','_initUserSync','57768WKSNZD','threadId','Add','syncUpdateMutationToColla','_threadCommentDataSourceService','COMMENT','delete','_sessionService','923HtBIIo','_config','Solve','listComments','/delete','885480piMWoC','_userService','disposeWithMe','post','type','pipe','_commentService','size','11mlWGhU','values','resolveComment','content','/universer-api/user/list','getUnit','/solved','error','Reply','UNIVER_UNKNOWN','addComment','/edit','YYYY/MM/DD\x20HH:mm','updateComment','deleteComment','format','_threadCommentModel','solved','parentId','payload','80ZsIGZc','createTimestamp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','onReady','map','2331295mWHlbM','userID','47198vgyGVD','getOwnPropertyDescriptor','addUser','Unknown','_initDataSource','find','7piVRtL','_threadCommentDataSource','replies','defineProperty','add','stringify','requireSession','forEach','44KTHrcO','getUser','commentUpdate$','comment','code','parse','personId','subscribe','length','root','get','Delete','user','ref','userId','filter','getMemberID','358620MbbeEp','_configService','unitId','_injector','_init','UNRECOGNIZED','getCurrentUser','comments','getComment','users','/universer-api/comment/unit/','Edit','pluginName'];_0x2901=function(){return _0x48b080;};return _0x2901();}var K=Object[_0x956842(0xed)],V=(_0x39eb99,_0x109956,_0x307906,_0x333a6d)=>{for(var _0x4973ff=_0x333a6d>0x1?void 0x0:_0x333a6d?K(_0x109956,_0x307906):_0x109956,_0x2052a6=_0x39eb99['length']-0x1,_0x2f23c5;_0x2052a6>=0x0;_0x2052a6--)(_0x2f23c5=_0x39eb99[_0x2052a6])&&(_0x4973ff=_0x2f23c5(_0x4973ff)||_0x4973ff);return _0x4973ff;},p=(_0xa5c78e,_0x2ed838)=>(_0x2019fc,_0xef746d)=>_0x2ed838(_0x2019fc,_0xef746d,_0xa5c78e);let _=class extends _0x3fbff2{constructor(_0x5d3458,_0x1875b5,_0x4dddbb,_0x240d49){const _0x1a3d24=_0x956842;super(),this[_0x1a3d24(0x138)]=_0x5d3458,this['_threadCommentModel']=_0x1875b5,this[_0x1a3d24(0x133)]=_0x4dddbb,this['_injector']=_0x240d49,this[_0x1a3d24(0x10f)](),this[_0x1a3d24(0x124)]();}[_0x956842(0x124)](){const _0x4662b4=_0x956842;this[_0x4662b4(0x134)](this['_threadCommentModel']['commentUpdate$'][_0x4662b4(0x137)](_0x2e0e87(0x10))[_0x4662b4(0x101)](_0x52e62c=>{const _0xcffc11=_0x4662b4,_0x2d98cf=new Set();_0x52e62c[_0xcffc11(0xf9)](_0x262d99=>{const _0x4e8b2f=_0xcffc11;switch(_0x262d99[_0x4e8b2f(0x136)]){case _0x4e8b2f(0xf6):{const _0x3bd4a8=_0x262d99[_0x4e8b2f(0x14d)][_0x4e8b2f(0x100)];_0x2d98cf['add'](_0x3bd4a8);break;}}}),B(this['_injector'],_0x2d98cf);}));}['_init'](){const _0x35069c=_0x956842;this[_0x35069c(0x134)](this['_commentService'][_0x35069c(0xfc)][_0x35069c(0x101)](async _0x941f38=>{const _0xe8fb09=_0x35069c;var _0x40e9d0,_0x4794c5,_0x21d1a5,_0x3d2411;const _0x222bc8=(_0x40e9d0=this[_0xe8fb09(0x14a)][_0xe8fb09(0x13f)](_0x941f38[_0xe8fb09(0x10d)])[_0xe8fb09(0xf1)](_0x72d09=>_0x72d09[_0xe8fb09(0x126)]===_0x941f38['threadId']))==null?void 0x0:_0x40e9d0[_0xe8fb09(0x103)];if(!_0x222bc8)return;const {unitId:_0xdc874d,subUnitId:_0xe4fe24}=_0x222bc8;switch(_0x941f38[_0xe8fb09(0x106)]&&this['_userService'][_0xe8fb09(0xee)](_0x941f38['user']),_0x941f38[_0xe8fb09(0x136)]){case v['Add']:break;case v['Reply']:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x144)](_0xdc874d,_0xe4fe24,{'unitId':_0xdc874d,'subUnitId':_0xe4fe24,'ref':'','id':_0x941f38['replyId'],'dT':y(+_0x941f38[_0xe8fb09(0x14f)]),'threadId':_0x941f38['threadId'],'personId':(_0x21d1a5=(_0x4794c5=_0x941f38[_0xe8fb09(0x106)])==null?void 0x0:_0x4794c5[_0xe8fb09(0xeb)])!=null?_0x21d1a5:_0x941f38[_0xe8fb09(0x108)],'text':JSON[_0xe8fb09(0xff)](_0x941f38[_0xe8fb09(0x13d)]),'parentId':_0x222bc8['id']});break;}case v[_0xe8fb09(0x105)]:{const _0x4f27dc=this[_0xe8fb09(0x14a)][_0xe8fb09(0x113)](_0xdc874d,_0xe4fe24,_0x941f38[_0xe8fb09(0x120)]);_0x4f27dc&&_0x4f27dc[_0xe8fb09(0x14c)]&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x148)](_0xdc874d,_0xe4fe24,_0x941f38['replyId']);break;}case v[_0xe8fb09(0x116)]:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x147)](_0xdc874d,_0xe4fe24,{'commentId':_0x941f38[_0xe8fb09(0x120)],'text':JSON[_0xe8fb09(0xff)](_0x941f38['content'])});break;}case v[_0xe8fb09(0x12f)]:{const _0x23a64f=(_0x3d2411=this[_0xe8fb09(0x14a)]['getUnit'](_0x941f38['unitId'])['find'](_0x52ecb5=>_0x52ecb5[_0xe8fb09(0x126)]===_0x941f38[_0xe8fb09(0x126)]))==null?void 0x0:_0x3d2411['root'];_0x23a64f&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x13c)](_0xdc874d,_0xe4fe24,_0x23a64f['id'],_0x941f38[_0xe8fb09(0x14b)]===I[_0xe8fb09(0x11d)]);break;}}}));}};_=V([p(0x0,_0x388faa(_0x403a4b)),p(0x1,_0x388faa(_0x411c90)),p(0x2,_0x388faa(_0x55f5e7)),p(0x3,_0x388faa(_0x469aaf))],_);const z=_0x956842(0x11b),O={};var k=Object[_0x956842(0xed)],Q=(_0x302ede,_0x3d65f6,_0x8f7c97,_0x51c1e0)=>{for(var _0xf13b86=_0x51c1e0>0x1?void 0x0:_0x51c1e0?k(_0x3d65f6,_0x8f7c97):_0x3d65f6,_0x1c01c6=_0x302ede['length']-0x1,_0x5a5ce4;_0x1c01c6>=0x0;_0x1c01c6--)(_0x5a5ce4=_0x302ede[_0x1c01c6])&&(_0xf13b86=_0x5a5ce4(_0xf13b86)||_0xf13b86);return _0xf13b86;},b=(_0x1ef184,_0x4c3b75)=>(_0x347115,_0x3f53b4)=>_0x4c3b75(_0x347115,_0x3f53b4,_0x1ef184);function X(_0x4c380b,_0x59cce5){const _0x2ae662=_0x956842,_0x13d7a8=_0x4c380b[_0x2ae662(0xf4)][0x0];return{..._0x59cce5,'id':_0x13d7a8[_0x2ae662(0x120)],'resolved':_0x4c380b[_0x2ae662(0x14b)]===0x1,'dT':y(_0x13d7a8['createTimestamp']),'personId':_0x13d7a8[_0x2ae662(0x108)],'threadId':_0x13d7a8['threadId']};}function ee(_0x57b8dd,_0x336cd5,_0x3ad42c){const _0xaa05fa=_0x956842;var _0x4b699c,_0x1621c5;if(((_0x1621c5=(_0x4b699c=_0x57b8dd==null?void 0x0:_0x57b8dd['replies'])==null?void 0x0:_0x4b699c[_0xaa05fa(0x102)])!=null?_0x1621c5:0x0)>0x0){const _0x258ccc=(_0x3ee5ac,_0x1e6995)=>({'id':_0x3ee5ac[_0xaa05fa(0x120)],'threadId':_0x3ee5ac['threadId'],'dT':y(_0x3ee5ac[_0xaa05fa(0x14f)]),'personId':_0x3ee5ac[_0xaa05fa(0x108)],'resolved':_0x57b8dd[_0xaa05fa(0x14b)]===I[_0xaa05fa(0x11d)],'unitId':_0x336cd5,'subUnitId':_0x3ad42c,'text':JSON[_0xaa05fa(0xff)](_0x3ee5ac[_0xaa05fa(0x13d)]),'parentId':_0x1e6995}),_0xc7b3eb=_0x258ccc(_0x57b8dd['replies'][0x0]);return{..._0xc7b3eb,'children':_0x57b8dd[_0xaa05fa(0xf4)]['slice'](0x1)[_0xaa05fa(0xe9)](_0x4dcd08=>_0x258ccc(_0x4dcd08,_0xc7b3eb['id']))};}return null;}let S=class{constructor(_0x124ede,_0x2637eb,_0x20918a){const _0x6518f3=_0x956842;this['_httpService']=_0x124ede,this[_0x6518f3(0x133)]=_0x2637eb,this[_0x6518f3(0x12c)]=_0x20918a;}async[_0x956842(0x144)](_0x31fd1c){const _0x3f9f13=_0x956842;var _0x204986,_0xca1818;const {parentId:_0x1c2f71,unitId:_0x1b9b5c,text:_0x2c7406,threadId:_0x4752ef}=_0x31fd1c,_0x275b9c=(_0xca1818=(_0x204986=_0x2c7406[_0x3f9f13(0x122)])==null?void 0x0:_0x204986[_0x3f9f13(0x109)](_0x55cfd8=>_0x55cfd8['rangeType']===_0x558957[_0x3f9f13(0x12a)])[_0x3f9f13(0xe9)](_0x227f18=>_0x227f18['rangeId']))!=null?_0xca1818:[],_0xf87d93=JSON[_0x3f9f13(0xf7)](_0x2c7406),_0x41b0f3=(await this[_0x3f9f13(0x12c)][_0x3f9f13(0xf8)](_0x1b9b5c))['getMemberID']();if(_0x1c2f71){const _0x334645={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c,'threadId':_0x4752ef},_0x4b45fa=(await this[_0x3f9f13(0x119)]['post']('/universer-api/comment/unit/'+_0x1b9b5c+'/reply',{'body':_0x334645}))[_0x3f9f13(0xe7)]['reply'];return{..._0x31fd1c,'id':_0x4b45fa[_0x3f9f13(0x120)],'dT':_0x3e920d(+_0x4b45fa[_0x3f9f13(0x14f)])[_0x3f9f13(0x149)](_0x3f9f13(0x146)),'personId':_0x4b45fa['userId']};}else{const _0x1c8531={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c},_0x53880d=await this[_0x3f9f13(0x119)][_0x3f9f13(0x135)]('/universer-api/comment/unit/'+_0x1b9b5c+'/add',{'body':_0x1c8531});return X(_0x53880d[_0x3f9f13(0xe7)][_0x3f9f13(0xfd)],_0x31fd1c);}}async[_0x956842(0x147)](_0x4a18c5){const _0x42f38f=_0x956842;var _0x26e246,_0x1a8df5;const {text:_0x56ecca,unitId:_0xf0e616}=_0x4a18c5,_0x4ec138=(_0x1a8df5=(_0x26e246=_0x56ecca[_0x42f38f(0x122)])==null?void 0x0:_0x26e246[_0x42f38f(0x109)](_0x5b3388=>_0x5b3388['rangeType']===_0x558957['COMMENT'])['map'](_0x345545=>_0x345545[_0x42f38f(0x11a)]))!=null?_0x1a8df5:[],_0x345d78=JSON[_0x42f38f(0xf7)](_0x56ecca),_0x55c176=_0x4a18c5['threadId'],_0x5ab3b5=_0x4a18c5['id'],_0x113690={'memberId':(await this[_0x42f38f(0x12c)]['requireSession'](_0xf0e616))[_0x42f38f(0x10a)](),'unitId':_0xf0e616,'threadId':_0x55c176,'mention':_0x4ec138,'content':_0x345d78,'replyId':_0x5ab3b5},_0x549625=await this[_0x42f38f(0x119)][_0x42f38f(0x135)](_0x42f38f(0x115)+_0xf0e616+_0x42f38f(0x145),{'body':_0x113690});return!_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)]||_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)][_0x42f38f(0xfe)]===0x1;}async[_0x956842(0x13c)](_0x385737){const _0x324e5c=_0x956842,{unitId:_0x2b620f}=_0x385737,_0x13b3b4=_0x385737[_0x324e5c(0x126)],_0x5b351c={'memberId':this[_0x324e5c(0x133)][_0x324e5c(0x111)]()[_0x324e5c(0xeb)],'unitId':_0x2b620f,'threadId':_0x13b3b4,'solved':_0x385737['resolved']?I[_0x324e5c(0x11d)]:I['OpenOrReOpen']},_0x1f4c16=await this[_0x324e5c(0x119)][_0x324e5c(0x135)]('/universer-api/comment/unit/'+_0x2b620f+_0x324e5c(0x140),{'body':_0x5b351c});return!_0x1f4c16[_0x324e5c(0xe7)]['error']||_0x1f4c16[_0x324e5c(0xe7)][_0x324e5c(0x141)][_0x324e5c(0xfe)]===0x1;}async['deleteComment'](_0x4270ad,_0x29fd95,_0xaad581,_0x3d79cd){const _0x44ff0e=_0x956842,_0x3a0cd0={'memberId':(await this[_0x44ff0e(0x12c)][_0x44ff0e(0xf8)](_0x4270ad))['getMemberID'](),'threadId':_0xaad581,'replyId':_0x3d79cd,'unitId':_0x4270ad},_0x395fd6=await this[_0x44ff0e(0x119)][_0x44ff0e(0x135)](_0x44ff0e(0x115)+_0x4270ad+_0x44ff0e(0x131),{'body':_0x3a0cd0});return!_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]||_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]['code']===0x1;}async[_0x956842(0x130)](_0x5498c0,_0x5eb2b6,_0x2d5c00){const _0x28e2d9=_0x956842,_0x1137ab={'unitId':_0x5498c0,'threadId':_0x2d5c00},_0xf1d849=await this['_httpService']['post'](_0x28e2d9(0x115)+_0x5498c0+'/list',{'body':_0x1137ab}),_0x24fac9=_0x2d5c00[_0x28e2d9(0xe9)](_0x264b43=>ee(_0xf1d849['body'][_0x28e2d9(0x112)][_0x264b43],_0x5498c0,_0x5eb2b6))['filter'](Boolean);return Object[_0x28e2d9(0x13b)](_0xf1d849[_0x28e2d9(0xe7)][_0x28e2d9(0x114)])['forEach'](_0x5c7149=>{const _0x59a7a7=_0x28e2d9;this['_userService'][_0x59a7a7(0xee)](_0x5c7149);}),_0x24fac9;}['saveCommentToSnapshot'](_0x44f4d7){const _0x4d650c=_0x956842;return{'id':_0x44f4d7['id'],'threadId':_0x44f4d7[_0x4d650c(0x126)],'ref':_0x44f4d7[_0x4d650c(0x107)]};}};S=Q([b(0x0,_0x388faa(_0x59a722)),b(0x1,_0x388faa(_0x55f5e7)),b(0x2,_0x388faa(_0x5904f9))],S);var re=Object[_0x956842(0xed)],te=(_0x28e891,_0x1eecb4,_0x18e04b,_0x4ba75d)=>{const _0x204eb6=_0x956842;for(var _0x1e4226=_0x4ba75d>0x1?void 0x0:_0x4ba75d?re(_0x1eecb4,_0x18e04b):_0x1eecb4,_0x53c6eb=_0x28e891[_0x204eb6(0x102)]-0x1,_0xf586cd;_0x53c6eb>=0x0;_0x53c6eb--)(_0xf586cd=_0x28e891[_0x53c6eb])&&(_0x1e4226=_0xf586cd(_0x1e4226)||_0x1e4226);return _0x1e4226;},M=(_0x313d98,_0x5b8d07)=>(_0x3b1760,_0x2ef73a)=>_0x5b8d07(_0x3b1760,_0x2ef73a,_0x313d98);let f=class extends _0x3fbff2{constructor(_0x229eca,_0x4e2365){const _0x50bb22=_0x956842;super(),this['_threadCommentDataSourceService']=_0x229eca,this[_0x50bb22(0xf3)]=_0x4e2365,this[_0x50bb22(0xf0)]();}[_0x956842(0xf0)](){const _0x1e648b=_0x956842;this[_0x1e648b(0x129)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1e648b(0x128)]=!0x1;}};f=te([M(0x0,_0x2efa6a),M(0x1,_0x388faa(S))],f);var se=Object[_0x956842(0xf5)],oe=Object[_0x956842(0xed)],ne=(_0x247e7d,_0x4462e6,_0x394e7e)=>_0x4462e6 in _0x247e7d?se(_0x247e7d,_0x4462e6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x394e7e}):_0x247e7d[_0x4462e6]=_0x394e7e,ie=(_0x314c32,_0x17d4cc,_0x5828f0,_0x37f6de)=>{const _0x385a6a=_0x956842;for(var _0x357c99=_0x37f6de>0x1?void 0x0:_0x37f6de?oe(_0x17d4cc,_0x5828f0):_0x17d4cc,_0x195918=_0x314c32[_0x385a6a(0x102)]-0x1,_0x3d119f;_0x195918>=0x0;_0x195918--)(_0x3d119f=_0x314c32[_0x195918])&&(_0x357c99=_0x3d119f(_0x357c99)||_0x357c99);return _0x357c99;},N=(_0x4dfbab,_0x436cf6)=>(_0xacb57,_0x24b764)=>_0x436cf6(_0xacb57,_0x24b764,_0x4dfbab),$=(_0x37a608,_0x4fe0b5,_0xda5cba)=>ne(_0x37a608,typeof _0x4fe0b5!=_0x956842(0x123)?_0x4fe0b5+'':_0x4fe0b5,_0xda5cba);let g=class extends _0x16d0b0{constructor(_0x56a7ed=O,_0x15a610,_0x572da2){const _0x2ff10a=_0x956842;super(),this[_0x2ff10a(0x12e)]=_0x56a7ed,this[_0x2ff10a(0x10e)]=_0x15a610,this[_0x2ff10a(0x10c)]=_0x572da2;const {..._0x496091}=_0x32f0bd({},O,this[_0x2ff10a(0x12e)]);this[_0x2ff10a(0x10c)]['setConfig'](z,_0x496091);}[_0x956842(0x121)](){[[S],[f],[_]]['forEach'](_0x5b2cfd=>{const _0x18cbe0=_0x243a;this[_0x18cbe0(0x10e)][_0x18cbe0(0xf6)](_0x5b2cfd);});}[_0x956842(0xe8)](){const _0x1a50d7=_0x956842;this['_injector']['get'](f),this[_0x1a50d7(0x10e)][_0x1a50d7(0x104)](_);}};$(g,_0x956842(0x117),W),$(g,_0x956842(0x136),_0x16ec5a[_0x956842(0x143)]),g=ie([_0x23d00e(_0x4b75f2,_0x3802b1,_0x17a341),N(0x1,_0x388faa(_0x469aaf)),N(0x2,_0x1759fb)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2482b5=_0x36f5;(function(_0xf1335b,_0x1e66f9){const _0x3b88e6=_0x36f5,_0x1d9984=_0xf1335b();while(!![]){try{const _0x43c6fe=-parseInt(_0x3b88e6(0x225))/0x1+parseInt(_0x3b88e6(0x1fc))/0x2*(parseInt(_0x3b88e6(0x244))/0x3)+-parseInt(_0x3b88e6(0x21a))/0x4*(-parseInt(_0x3b88e6(0x23e))/0x5)+parseInt(_0x3b88e6(0x229))/0x6+parseInt(_0x3b88e6(0x1f9))/0x7+parseInt(_0x3b88e6(0x240))/0x8+-parseInt(_0x3b88e6(0x208))/0x9;if(_0x43c6fe===_0x1e66f9)break;else _0x1d9984['push'](_0x1d9984['shift']());}catch(_0x2ea407){_0x1d9984['push'](_0x1d9984['shift']());}}}(_0x30b3,0x891ac));function _0x30b3(){const _0x4fa12f=['Delete','UNRECOGNIZED','4776290WrAOWT','/list','8201728AKXjWL','getCurrentUser','/add','userID','15MXOVqQ','get','add','subscribe','threadId','Solved','OpenOrReOpen','Unknown','_threadCommentDataSourceService','_init','format','getUser','ref','rangeType','dataSource','type','saveCommentToSnapshot','unitId','parse','/solved','root','_commentService','addUser','content','_httpService','1070755FtPsgk','onReady','_sessionService','210396nxmMJr','deleteComment','_threadCommentDataSource','disposeWithMe','requireSession','syncUpdateMutationToColla','map','Reply','listComments','replies','forEach','createTimestamp','15225912GAfFzj','setConfig','Add','slice','defineProperty','Edit','replyId','_injector','filter','_initUserSync','_config','_initDataSource','stringify','comments','code','COMMENT','getComment','_threadCommentModel','4wNRoPK','getMemberID','personId','commentUpdate$','userId','/delete','symbol','/universer-api/comment/unit/','user','_userService','values','431867DAfKgI','size','/reply','length','154716OeLVTs','getUnit','customRanges','comment','Solve','/universer-api/user/list','solved','updateComment','error','_configService','find','getOwnPropertyDescriptor','users','body','resolveComment','UNIVER_UNKNOWN','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','addComment'];_0x30b3=function(){return _0x4fa12f;};return _0x30b3();}import{CommentService as _0x48a9f5,CollaborationSessionService as _0x385d7c,UniverCollaborationClientPlugin as _0x1aa4b3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26258d}from'@univerjs-pro/license';import{dayjs as _0x1fe5ef,UserManagerService as _0x3f1b78,Inject as _0x1289ff,Injector as _0x378ce5,Disposable as _0x1663e6,CustomRangeType as _0x261728,UniverInstanceType as _0x5abae1,DependentOn as _0x15259c,IConfigService as _0xa1e2a6,Plugin as _0x1215a8,merge as _0x4f79b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43a799}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x49d49f,IThreadCommentDataSourceService as _0x555c27}from'@univerjs/thread-comment';import{bufferTime as _0x292fec}from'rxjs';function _0x36f5(_0x46d50a,_0xed5230){const _0x30b3c7=_0x30b3();return _0x36f5=function(_0x36f55e,_0x2b6a04){_0x36f55e=_0x36f55e-0x1f0;let _0x2887ba=_0x30b3c7[_0x36f55e];return _0x2887ba;},_0x36f5(_0x46d50a,_0xed5230);}import{HTTPService as _0x4193ea}from'@univerjs/network';const W=_0x2482b5(0x239);var I=(_0x3bb1e9=>(_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x24a)]=0x0]=_0x2482b5(0x24a),_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x249)]=0x1]='Solved',_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3bb1e9))(I||{}),v=(_0x3cb929=>(_0x3cb929[_0x3cb929['Unknown']=0x0]=_0x2482b5(0x24b),_0x3cb929[_0x3cb929['Add']=0x1]=_0x2482b5(0x20a),_0x3cb929[_0x3cb929['Reply']=0x2]=_0x2482b5(0x203),_0x3cb929[_0x3cb929['Edit']=0x3]=_0x2482b5(0x20d),_0x3cb929[_0x3cb929[_0x2482b5(0x23c)]=0x4]=_0x2482b5(0x23c),_0x3cb929[_0x3cb929[_0x2482b5(0x22d)]=0x5]=_0x2482b5(0x22d),_0x3cb929[_0x3cb929[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3cb929))(v||{});const y=_0x32c642=>_0x1fe5ef(new Date(+_0x32c642))[_0x2482b5(0x24e)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x949c69,_0x2111f5)=>{const _0x22bfed=_0x2482b5,_0x51129b=_0x949c69[_0x22bfed(0x245)](_0x3f1b78),_0x2b40db=_0x949c69['get'](_0x4193ea);_0x2111f5[_0x22bfed(0x206)](_0x47794d=>{const _0x17e38b=_0x22bfed;_0x51129b[_0x17e38b(0x24f)](_0x47794d)&&_0x2111f5['delete'](_0x47794d);}),_0x2111f5[_0x22bfed(0x226)]&&(await _0x2b40db[_0x22bfed(0x245)](_0x22bfed(0x22e),{'params':{'userIDs':[..._0x2111f5]}}))[_0x22bfed(0x236)][_0x22bfed(0x235)]['forEach'](_0x5c565c=>{_0x5c565c&&_0x51129b['addUser'](_0x5c565c);});};var K=Object[_0x2482b5(0x234)],V=(_0x5ac750,_0xd338f0,_0x182ff9,_0x466841)=>{const _0x51e246=_0x2482b5;for(var _0x592327=_0x466841>0x1?void 0x0:_0x466841?K(_0xd338f0,_0x182ff9):_0xd338f0,_0x50dd29=_0x5ac750[_0x51e246(0x228)]-0x1,_0x25d153;_0x50dd29>=0x0;_0x50dd29--)(_0x25d153=_0x5ac750[_0x50dd29])&&(_0x592327=_0x25d153(_0x592327)||_0x592327);return _0x592327;},p=(_0x32fadb,_0x1de72e)=>(_0x2af5c7,_0x2798f6)=>_0x1de72e(_0x2af5c7,_0x2798f6,_0x32fadb);let _=class extends _0x1663e6{constructor(_0x40cd04,_0x3d6d90,_0x43e864,_0x16f732){const _0x260579=_0x2482b5;super(),this[_0x260579(0x1f5)]=_0x40cd04,this['_threadCommentModel']=_0x3d6d90,this[_0x260579(0x223)]=_0x43e864,this['_injector']=_0x16f732,this[_0x260579(0x24d)](),this[_0x260579(0x211)]();}[_0x2482b5(0x211)](){const _0x1d08f4=_0x2482b5;this['disposeWithMe'](this[_0x1d08f4(0x219)][_0x1d08f4(0x21d)]['pipe'](_0x292fec(0x10))[_0x1d08f4(0x247)](_0x597c20=>{const _0x4acf03=_0x1d08f4,_0xe03f25=new Set();_0x597c20[_0x4acf03(0x206)](_0xd568bd=>{const _0x5b6480=_0x4acf03;switch(_0xd568bd['type']){case'add':{const _0x162b3e=_0xd568bd['payload'][_0x5b6480(0x21c)];_0xe03f25[_0x5b6480(0x246)](_0x162b3e);break;}}}),B(this[_0x4acf03(0x20f)],_0xe03f25);}));}[_0x2482b5(0x24d)](){const _0x786df1=_0x2482b5;this[_0x786df1(0x1ff)](this[_0x786df1(0x1f5)][_0x786df1(0x21d)][_0x786df1(0x247)](async _0x43234c=>{const _0x369663=_0x786df1;var _0x10b72a,_0x1225b6,_0x1165f2,_0x3bed3d;const _0x33eea7=(_0x10b72a=this[_0x369663(0x219)]['getUnit'](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x5c2d53=>_0x5c2d53['threadId']===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x10b72a[_0x369663(0x1f4)];if(!_0x33eea7)return;const {unitId:_0x493a78,subUnitId:_0x5af512}=_0x33eea7;switch(_0x43234c['user']&&this['_userService'][_0x369663(0x1f6)](_0x43234c[_0x369663(0x222)]),_0x43234c[_0x369663(0x253)]){case v[_0x369663(0x20a)]:break;case v[_0x369663(0x203)]:{this[_0x369663(0x219)]['addComment'](_0x493a78,_0x5af512,{'unitId':_0x493a78,'subUnitId':_0x5af512,'ref':'','id':_0x43234c[_0x369663(0x20e)],'dT':y(+_0x43234c['createTimestamp']),'threadId':_0x43234c[_0x369663(0x248)],'personId':(_0x1165f2=(_0x1225b6=_0x43234c[_0x369663(0x222)])==null?void 0x0:_0x1225b6[_0x369663(0x243)])!=null?_0x1165f2:_0x43234c['userId'],'text':JSON[_0x369663(0x1f2)](_0x43234c[_0x369663(0x1f7)]),'parentId':_0x33eea7['id']});break;}case v[_0x369663(0x23c)]:{const _0x24db09=this[_0x369663(0x219)][_0x369663(0x218)](_0x493a78,_0x5af512,_0x43234c[_0x369663(0x20e)]);_0x24db09&&_0x24db09['parentId']&&this[_0x369663(0x219)]['deleteComment'](_0x493a78,_0x5af512,_0x43234c['replyId']);break;}case v['Edit']:{this[_0x369663(0x219)][_0x369663(0x230)](_0x493a78,_0x5af512,{'commentId':_0x43234c[_0x369663(0x20e)],'text':JSON[_0x369663(0x1f2)](_0x43234c['content'])});break;}case v[_0x369663(0x22d)]:{const _0x489c03=(_0x3bed3d=this[_0x369663(0x219)][_0x369663(0x22a)](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x9c06ca=>_0x9c06ca[_0x369663(0x248)]===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x3bed3d[_0x369663(0x1f4)];_0x489c03&&this[_0x369663(0x219)][_0x369663(0x237)](_0x493a78,_0x5af512,_0x489c03['id'],_0x43234c[_0x369663(0x22f)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1289ff(_0x48a9f5)),p(0x1,_0x1289ff(_0x49d49f)),p(0x2,_0x1289ff(_0x3f1b78)),p(0x3,_0x1289ff(_0x378ce5))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x2482b5(0x234)],Q=(_0xa7119c,_0x332659,_0x2815c1,_0x137673)=>{const _0x29e9a6=_0x2482b5;for(var _0x1fba62=_0x137673>0x1?void 0x0:_0x137673?k(_0x332659,_0x2815c1):_0x332659,_0x2f2138=_0xa7119c[_0x29e9a6(0x228)]-0x1,_0x53cb04;_0x2f2138>=0x0;_0x2f2138--)(_0x53cb04=_0xa7119c[_0x2f2138])&&(_0x1fba62=_0x53cb04(_0x1fba62)||_0x1fba62);return _0x1fba62;},b=(_0x185208,_0xbd1c9f)=>(_0x2328c8,_0x57fbd8)=>_0xbd1c9f(_0x2328c8,_0x57fbd8,_0x185208);function X(_0x3b7d98,_0x11b8b2){const _0x1ee499=_0x2482b5,_0x1f49b4=_0x3b7d98[_0x1ee499(0x205)][0x0];return{..._0x11b8b2,'id':_0x1f49b4[_0x1ee499(0x20e)],'resolved':_0x3b7d98[_0x1ee499(0x22f)]===0x1,'dT':y(_0x1f49b4[_0x1ee499(0x207)]),'personId':_0x1f49b4[_0x1ee499(0x21e)],'threadId':_0x1f49b4[_0x1ee499(0x248)]};}function ee(_0x5851ba,_0x8d91de,_0x57b405){const _0x33de5d=_0x2482b5;var _0x32bdfb,_0x5221af;if(((_0x5221af=(_0x32bdfb=_0x5851ba==null?void 0x0:_0x5851ba[_0x33de5d(0x205)])==null?void 0x0:_0x32bdfb[_0x33de5d(0x228)])!=null?_0x5221af:0x0)>0x0){const _0x30f85e=(_0x9a3d55,_0x209e05)=>({'id':_0x9a3d55[_0x33de5d(0x20e)],'threadId':_0x9a3d55[_0x33de5d(0x248)],'dT':y(_0x9a3d55[_0x33de5d(0x207)]),'personId':_0x9a3d55[_0x33de5d(0x21e)],'resolved':_0x5851ba[_0x33de5d(0x22f)]===I[_0x33de5d(0x249)],'unitId':_0x8d91de,'subUnitId':_0x57b405,'text':JSON[_0x33de5d(0x1f2)](_0x9a3d55[_0x33de5d(0x1f7)]),'parentId':_0x209e05}),_0x2e0a10=_0x30f85e(_0x5851ba['replies'][0x0]);return{..._0x2e0a10,'children':_0x5851ba['replies'][_0x33de5d(0x20b)](0x1)['map'](_0x4455e7=>_0x30f85e(_0x4455e7,_0x2e0a10['id']))};}return null;}let S=class{constructor(_0x296e7d,_0x5154a8,_0x172d19){const _0x34ac29=_0x2482b5;this['_httpService']=_0x296e7d,this[_0x34ac29(0x223)]=_0x5154a8,this[_0x34ac29(0x1fb)]=_0x172d19;}async[_0x2482b5(0x23b)](_0x421dab){const _0x247af1=_0x2482b5;var _0x660813,_0x5f107c;const {parentId:_0x5ad9d1,unitId:_0xeeb610,text:_0xc12cb7,threadId:_0x562bcd}=_0x421dab,_0x31995d=(_0x5f107c=(_0x660813=_0xc12cb7[_0x247af1(0x22b)])==null?void 0x0:_0x660813[_0x247af1(0x210)](_0x20ae9e=>_0x20ae9e[_0x247af1(0x251)]===_0x261728[_0x247af1(0x217)])['map'](_0x2a1201=>_0x2a1201['rangeId']))!=null?_0x5f107c:[],_0x4260b5=JSON[_0x247af1(0x214)](_0xc12cb7),_0x54e567=(await this[_0x247af1(0x1fb)][_0x247af1(0x200)](_0xeeb610))[_0x247af1(0x21b)]();if(_0x5ad9d1){const _0x17f1a2={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d,'threadId':_0x562bcd},_0x5fb4cd=(await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x227),{'body':_0x17f1a2}))['body']['reply'];return{..._0x421dab,'id':_0x5fb4cd[_0x247af1(0x20e)],'dT':_0x1fe5ef(+_0x5fb4cd[_0x247af1(0x207)])[_0x247af1(0x24e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5fb4cd[_0x247af1(0x21e)]};}else{const _0x42a2a8={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d},_0x13b663=await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x242),{'body':_0x42a2a8});return X(_0x13b663['body'][_0x247af1(0x22c)],_0x421dab);}}async['updateComment'](_0x31c808){const _0x53ffca=_0x2482b5;var _0x53a46d,_0x4a9e08;const {text:_0x217b9a,unitId:_0xec6bc5}=_0x31c808,_0x378b97=(_0x4a9e08=(_0x53a46d=_0x217b9a['customRanges'])==null?void 0x0:_0x53a46d['filter'](_0x392a59=>_0x392a59[_0x53ffca(0x251)]===_0x261728[_0x53ffca(0x217)])[_0x53ffca(0x202)](_0x7b95a8=>_0x7b95a8['rangeId']))!=null?_0x4a9e08:[],_0x3bb85b=JSON[_0x53ffca(0x214)](_0x217b9a),_0x1cd503=_0x31c808['threadId'],_0x3d6525=_0x31c808['id'],_0x495519={'memberId':(await this[_0x53ffca(0x1fb)][_0x53ffca(0x200)](_0xec6bc5))[_0x53ffca(0x21b)](),'unitId':_0xec6bc5,'threadId':_0x1cd503,'mention':_0x378b97,'content':_0x3bb85b,'replyId':_0x3d6525},_0x1c8f61=await this['_httpService'][_0x53ffca(0x23a)](_0x53ffca(0x221)+_0xec6bc5+'/edit',{'body':_0x495519});return!_0x1c8f61[_0x53ffca(0x236)]['error']||_0x1c8f61[_0x53ffca(0x236)][_0x53ffca(0x231)][_0x53ffca(0x216)]===0x1;}async[_0x2482b5(0x237)](_0x1d68fe){const _0x1d590f=_0x2482b5,{unitId:_0x5790af}=_0x1d68fe,_0x113752=_0x1d68fe[_0x1d590f(0x248)],_0x446d51={'memberId':this[_0x1d590f(0x223)][_0x1d590f(0x241)]()['userID'],'unitId':_0x5790af,'threadId':_0x113752,'solved':_0x1d68fe['resolved']?I[_0x1d590f(0x249)]:I['OpenOrReOpen']},_0x40ce4f=await this[_0x1d590f(0x1f8)]['post'](_0x1d590f(0x221)+_0x5790af+_0x1d590f(0x1f3),{'body':_0x446d51});return!_0x40ce4f[_0x1d590f(0x236)]['error']||_0x40ce4f[_0x1d590f(0x236)][_0x1d590f(0x231)][_0x1d590f(0x216)]===0x1;}async[_0x2482b5(0x1fd)](_0x2618dd,_0x33f536,_0x3b2d3a,_0x1152dc){const _0x3d1dd9=_0x2482b5,_0x2e0cf5={'memberId':(await this[_0x3d1dd9(0x1fb)]['requireSession'](_0x2618dd))[_0x3d1dd9(0x21b)](),'threadId':_0x3b2d3a,'replyId':_0x1152dc,'unitId':_0x2618dd},_0x5251c8=await this[_0x3d1dd9(0x1f8)]['post'](_0x3d1dd9(0x221)+_0x2618dd+_0x3d1dd9(0x21f),{'body':_0x2e0cf5});return!_0x5251c8[_0x3d1dd9(0x236)]['error']||_0x5251c8['body'][_0x3d1dd9(0x231)][_0x3d1dd9(0x216)]===0x1;}async[_0x2482b5(0x204)](_0x1781af,_0x37c90d,_0x47b7f2){const _0x1a247a=_0x2482b5,_0x5be237={'unitId':_0x1781af,'threadId':_0x47b7f2},_0x52acac=await this[_0x1a247a(0x1f8)][_0x1a247a(0x23a)](_0x1a247a(0x221)+_0x1781af+_0x1a247a(0x23f),{'body':_0x5be237}),_0x15e0d4=_0x47b7f2[_0x1a247a(0x202)](_0x53d206=>ee(_0x52acac[_0x1a247a(0x236)][_0x1a247a(0x215)][_0x53d206],_0x1781af,_0x37c90d))[_0x1a247a(0x210)](Boolean);return Object[_0x1a247a(0x224)](_0x52acac[_0x1a247a(0x236)]['users'])[_0x1a247a(0x206)](_0x3fa766=>{const _0x4a9bcf=_0x1a247a;this[_0x4a9bcf(0x223)][_0x4a9bcf(0x1f6)](_0x3fa766);}),_0x15e0d4;}[_0x2482b5(0x1f0)](_0x41145b){const _0x2a8400=_0x2482b5;return{'id':_0x41145b['id'],'threadId':_0x41145b['threadId'],'ref':_0x41145b[_0x2a8400(0x250)]};}};S=Q([b(0x0,_0x1289ff(_0x4193ea)),b(0x1,_0x1289ff(_0x3f1b78)),b(0x2,_0x1289ff(_0x385d7c))],S);var re=Object[_0x2482b5(0x234)],te=(_0x584608,_0x5b4ed9,_0x1f21ad,_0x403030)=>{const _0x42290c=_0x2482b5;for(var _0xa6baee=_0x403030>0x1?void 0x0:_0x403030?re(_0x5b4ed9,_0x1f21ad):_0x5b4ed9,_0x5adadf=_0x584608[_0x42290c(0x228)]-0x1,_0x13ac6b;_0x5adadf>=0x0;_0x5adadf--)(_0x13ac6b=_0x584608[_0x5adadf])&&(_0xa6baee=_0x13ac6b(_0xa6baee)||_0xa6baee);return _0xa6baee;},M=(_0x3edce6,_0x5a1c40)=>(_0x46f74a,_0x892a5d)=>_0x5a1c40(_0x46f74a,_0x892a5d,_0x3edce6);let f=class extends _0x1663e6{constructor(_0x110fd5,_0x51bcf8){const _0x238d49=_0x2482b5;super(),this[_0x238d49(0x24c)]=_0x110fd5,this[_0x238d49(0x1fe)]=_0x51bcf8,this[_0x238d49(0x213)]();}[_0x2482b5(0x213)](){const _0x27311d=_0x2482b5;this[_0x27311d(0x24c)][_0x27311d(0x252)]=this[_0x27311d(0x1fe)],this[_0x27311d(0x24c)][_0x27311d(0x201)]=!0x1;}};f=te([M(0x0,_0x555c27),M(0x1,_0x1289ff(S))],f);var se=Object[_0x2482b5(0x20c)],oe=Object[_0x2482b5(0x234)],ne=(_0x48c421,_0x1e0d2c,_0x484901)=>_0x1e0d2c in _0x48c421?se(_0x48c421,_0x1e0d2c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x484901}):_0x48c421[_0x1e0d2c]=_0x484901,ie=(_0x2627ee,_0x591dff,_0x2b577f,_0xa0fc13)=>{const _0x3b7da2=_0x2482b5;for(var _0x1fd065=_0xa0fc13>0x1?void 0x0:_0xa0fc13?oe(_0x591dff,_0x2b577f):_0x591dff,_0x24a656=_0x2627ee[_0x3b7da2(0x228)]-0x1,_0xb2f445;_0x24a656>=0x0;_0x24a656--)(_0xb2f445=_0x2627ee[_0x24a656])&&(_0x1fd065=_0xb2f445(_0x1fd065)||_0x1fd065);return _0x1fd065;},N=(_0x45a63c,_0x10070b)=>(_0x5dd389,_0x81c684)=>_0x10070b(_0x5dd389,_0x81c684,_0x45a63c),$=(_0x867e6c,_0x5cf70e,_0x440c9f)=>ne(_0x867e6c,typeof _0x5cf70e!=_0x2482b5(0x220)?_0x5cf70e+'':_0x5cf70e,_0x440c9f);let g=class extends _0x1215a8{constructor(_0xca22b9=O,_0x506ba6,_0x37c07c){const _0x3a2bd2=_0x2482b5;super(),this[_0x3a2bd2(0x212)]=_0xca22b9,this[_0x3a2bd2(0x20f)]=_0x506ba6,this[_0x3a2bd2(0x232)]=_0x37c07c;const {..._0x259999}=_0x4f79b5({},O,this['_config']);this['_configService'][_0x3a2bd2(0x209)](z,_0x259999);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x1f323f=>{const _0x1fe196=_0x36f5;this[_0x1fe196(0x20f)][_0x1fe196(0x246)](_0x1f323f);});}[_0x2482b5(0x1fa)](){const _0x3eed37=_0x2482b5;this[_0x3eed37(0x20f)]['get'](f),this[_0x3eed37(0x20f)][_0x3eed37(0x245)](_);}};$(g,'pluginName',W),$(g,_0x2482b5(0x253),_0x5abae1[_0x2482b5(0x238)]),g=ie([_0x15259c(_0x43a799,_0x1aa4b3,_0x26258d),N(0x1,_0x1289ff(_0x378ce5)),N(0x2,_0xa1e2a6)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x39cc1a,_0x45617c){const _0x5c8131=_0x462d,_0x4b4f3f=_0x39cc1a();while(!![]){try{const _0x5c6f71=parseInt(_0x5c8131(0x165))/0x1*(-parseInt(_0x5c8131(0x173))/0x2)+parseInt(_0x5c8131(0x196))/0x3+-parseInt(_0x5c8131(0x1e5))/0x4*(parseInt(_0x5c8131(0x1a3))/0x5)+parseInt(_0x5c8131(0x1da))/0x6+parseInt(_0x5c8131(0x17f))/0x7*(-parseInt(_0x5c8131(0x1d0))/0x8)+-parseInt(_0x5c8131(0x1c5))/0x9+parseInt(_0x5c8131(0x198))/0xa;if(_0x5c6f71===_0x45617c)break;else _0x4b4f3f['push'](_0x4b4f3f['shift']());}catch(_0x5c3571){_0x4b4f3f['push'](_0x4b4f3f['shift']());}}}(_0x39f1,0x6043a),function(_0x5a1200,_0x105947){const _0x51106f=_0x462d;typeof exports=='object'&&typeof module<'u'?_0x105947(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==_0x51106f(0x1c3)&&define[_0x51106f(0x19e)]?define([_0x51106f(0x1ac),_0x51106f(0x188),'@univerjs-pro/license',_0x51106f(0x1cb),_0x51106f(0x1c4),_0x51106f(0x1bd),_0x51106f(0x16e),_0x51106f(0x1b8)],_0x105947):(_0x5a1200=typeof globalThis<'u'?globalThis:_0x5a1200||self,_0x105947(_0x5a1200[_0x51106f(0x18e)]={},_0x5a1200[_0x51106f(0x1b5)],_0x5a1200['UniverProLicense'],_0x5a1200[_0x51106f(0x19d)],_0x5a1200[_0x51106f(0x1e2)],_0x5a1200[_0x51106f(0x17b)],_0x5a1200['rxjs'],_0x5a1200[_0x51106f(0x192)]));}(this,function(_0x9ebc8f,_0x4fd8e6,_0xab9414,_0x5be78c,_0x5edfa9,_0x571e47,_0x555bb1,_0x266f01){'use strict';const _0x41b6fe=_0x462d;const _0xf917b9='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x43500a=(_0x341cbc=>(_0x341cbc[_0x341cbc[_0x41b6fe(0x183)]=0x0]='OpenOrReOpen',_0x341cbc[_0x341cbc[_0x41b6fe(0x1ec)]=0x1]=_0x41b6fe(0x1ec),_0x341cbc[_0x341cbc[_0x41b6fe(0x1d4)]=-0x1]=_0x41b6fe(0x1d4),_0x341cbc))(_0x43500a||{}),_0x71578d=(_0x506646=>(_0x506646[_0x506646[_0x41b6fe(0x1a8)]=0x0]='Unknown',_0x506646[_0x506646[_0x41b6fe(0x1d9)]=0x1]=_0x41b6fe(0x1d9),_0x506646[_0x506646[_0x41b6fe(0x187)]=0x2]='Reply',_0x506646[_0x506646[_0x41b6fe(0x1e6)]=0x3]='Edit',_0x506646[_0x506646['Delete']=0x4]='Delete',_0x506646[_0x506646['Solve']=0x5]=_0x41b6fe(0x1d8),_0x506646[_0x506646[_0x41b6fe(0x1d4)]=-0x1]='UNRECOGNIZED',_0x506646))(_0x71578d||{});const _0x225ec6=_0x55d7ff=>_0x5be78c['dayjs'](new Date(+_0x55d7ff))[_0x41b6fe(0x16a)](_0x41b6fe(0x194)),_0x48a595=async(_0x1d2451,_0x3e6838)=>{const _0x5eafc9=_0x41b6fe,_0x370d50=_0x1d2451[_0x5eafc9(0x1b1)](_0x5be78c[_0x5eafc9(0x17d)]),_0x4bab78=_0x1d2451[_0x5eafc9(0x1b1)](_0x266f01[_0x5eafc9(0x1a1)]);_0x3e6838[_0x5eafc9(0x1c7)](_0x81645a=>{const _0x41e0e8=_0x5eafc9;_0x370d50[_0x41e0e8(0x1cf)](_0x81645a)&&_0x3e6838[_0x41e0e8(0x176)](_0x81645a);}),_0x3e6838[_0x5eafc9(0x19b)]&&(await _0x4bab78[_0x5eafc9(0x1b1)](_0x5eafc9(0x1e4),{'params':{'userIDs':[..._0x3e6838]}}))[_0x5eafc9(0x1b3)]['users'][_0x5eafc9(0x1c7)](_0x48907e=>{const _0x33545c=_0x5eafc9;_0x48907e&&_0x370d50[_0x33545c(0x1d2)](_0x48907e);});};var _0x50a793=Object[_0x41b6fe(0x193)],_0x5e342e=(_0x313618,_0x5c1f43,_0x1d38e3,_0x8ae266)=>{const _0x5cf8dc=_0x41b6fe;for(var _0x340ef2=_0x8ae266>0x1?void 0x0:_0x8ae266?_0x50a793(_0x5c1f43,_0x1d38e3):_0x5c1f43,_0x4714b3=_0x313618[_0x5cf8dc(0x1a0)]-0x1,_0x5e4677;_0x4714b3>=0x0;_0x4714b3--)(_0x5e4677=_0x313618[_0x4714b3])&&(_0x340ef2=_0x5e4677(_0x340ef2)||_0x340ef2);return _0x340ef2;},_0x436241=(_0x3cb9d3,_0xd50054)=>(_0x360105,_0x5defc7)=>_0xd50054(_0x360105,_0x5defc7,_0x3cb9d3);let _0x4b488f=class extends _0x5be78c['Disposable']{constructor(_0x4e442d,_0x4b0c5f,_0x464b54,_0x380f47){const _0x16627f=_0x41b6fe;super(),this[_0x16627f(0x1b0)]=_0x4e442d,this[_0x16627f(0x1db)]=_0x4b0c5f,this[_0x16627f(0x1eb)]=_0x464b54,this[_0x16627f(0x1df)]=_0x380f47,this[_0x16627f(0x1ad)](),this[_0x16627f(0x175)]();}[_0x41b6fe(0x175)](){const _0x4fe006=_0x41b6fe;this[_0x4fe006(0x1a7)](this[_0x4fe006(0x1db)][_0x4fe006(0x1dc)]['pipe'](_0x555bb1[_0x4fe006(0x182)](0x10))['subscribe'](_0x393da0=>{const _0x883710=_0x4fe006,_0x57d579=new Set();_0x393da0[_0x883710(0x1c7)](_0x287115=>{const _0x2d528d=_0x883710;switch(_0x287115[_0x2d528d(0x1b4)]){case'add':{const _0x36fec3=_0x287115[_0x2d528d(0x195)][_0x2d528d(0x1ea)];_0x57d579[_0x2d528d(0x1d5)](_0x36fec3);break;}}}),_0x48a595(this['_injector'],_0x57d579);}));}[_0x41b6fe(0x1ad)](){const _0x3e7747=_0x41b6fe;this[_0x3e7747(0x1a7)](this[_0x3e7747(0x1b0)][_0x3e7747(0x1dc)]['subscribe'](async _0x1feac6=>{const _0x6cc4c=_0x3e7747;var _0x2ac56a,_0x588d49,_0x5cb461,_0x58be09;const _0xed0d54=(_0x2ac56a=this[_0x6cc4c(0x1db)][_0x6cc4c(0x184)](_0x1feac6[_0x6cc4c(0x1a2)])[_0x6cc4c(0x1e7)](_0x41db1e=>_0x41db1e[_0x6cc4c(0x18a)]===_0x1feac6[_0x6cc4c(0x18a)]))==null?void 0x0:_0x2ac56a[_0x6cc4c(0x16b)];if(!_0xed0d54)return;const {unitId:_0x3fdd82,subUnitId:_0x5883ab}=_0xed0d54;switch(_0x1feac6[_0x6cc4c(0x17a)]&&this[_0x6cc4c(0x1eb)][_0x6cc4c(0x1d2)](_0x1feac6['user']),_0x1feac6['type']){case _0x71578d['Add']:break;case _0x71578d[_0x6cc4c(0x187)]:{this[_0x6cc4c(0x1db)][_0x6cc4c(0x166)](_0x3fdd82,_0x5883ab,{'unitId':_0x3fdd82,'subUnitId':_0x5883ab,'ref':'','id':_0x1feac6['replyId'],'dT':_0x225ec6(+_0x1feac6[_0x6cc4c(0x18b)]),'threadId':_0x1feac6['threadId'],'personId':(_0x5cb461=(_0x588d49=_0x1feac6[_0x6cc4c(0x17a)])==null?void 0x0:_0x588d49[_0x6cc4c(0x197)])!=null?_0x5cb461:_0x1feac6[_0x6cc4c(0x1c8)],'text':JSON[_0x6cc4c(0x16c)](_0x1feac6[_0x6cc4c(0x171)]),'parentId':_0xed0d54['id']});break;}case _0x71578d[_0x6cc4c(0x177)]:{const _0x4dd7e4=this['_threadCommentModel'][_0x6cc4c(0x1b9)](_0x3fdd82,_0x5883ab,_0x1feac6[_0x6cc4c(0x1cd)]);_0x4dd7e4&&_0x4dd7e4[_0x6cc4c(0x189)]&&this[_0x6cc4c(0x1db)]['deleteComment'](_0x3fdd82,_0x5883ab,_0x1feac6[_0x6cc4c(0x1cd)]);break;}case _0x71578d['Edit']:{this[_0x6cc4c(0x1db)][_0x6cc4c(0x17c)](_0x3fdd82,_0x5883ab,{'commentId':_0x1feac6[_0x6cc4c(0x1cd)],'text':JSON[_0x6cc4c(0x16c)](_0x1feac6[_0x6cc4c(0x171)])});break;}case _0x71578d[_0x6cc4c(0x1d8)]:{const _0x42fd89=(_0x58be09=this[_0x6cc4c(0x1db)]['getUnit'](_0x1feac6['unitId'])['find'](_0xd31639=>_0xd31639[_0x6cc4c(0x18a)]===_0x1feac6[_0x6cc4c(0x18a)]))==null?void 0x0:_0x58be09[_0x6cc4c(0x16b)];_0x42fd89&&this['_threadCommentModel'][_0x6cc4c(0x16d)](_0x3fdd82,_0x5883ab,_0x42fd89['id'],_0x1feac6[_0x6cc4c(0x1e1)]===_0x43500a[_0x6cc4c(0x1ec)]);break;}}}));}};_0x4b488f=_0x5e342e([_0x436241(0x0,_0x5be78c[_0x41b6fe(0x170)](_0x4fd8e6['CommentService'])),_0x436241(0x1,_0x5be78c['Inject'](_0x571e47[_0x41b6fe(0x1d1)])),_0x436241(0x2,_0x5be78c[_0x41b6fe(0x170)](_0x5be78c[_0x41b6fe(0x17d)])),_0x436241(0x3,_0x5be78c[_0x41b6fe(0x170)](_0x5be78c[_0x41b6fe(0x169)]))],_0x4b488f);const _0x4e0bc2='thread-comment-data-source.config',_0xdef13d={};var _0x24732e=Object[_0x41b6fe(0x193)],_0x44a202=(_0xb9cd7a,_0x491af4,_0x2caf8e,_0x4b212f)=>{const _0x3ea1ce=_0x41b6fe;for(var _0x197a31=_0x4b212f>0x1?void 0x0:_0x4b212f?_0x24732e(_0x491af4,_0x2caf8e):_0x491af4,_0x55a111=_0xb9cd7a[_0x3ea1ce(0x1a0)]-0x1,_0x30c9a3;_0x55a111>=0x0;_0x55a111--)(_0x30c9a3=_0xb9cd7a[_0x55a111])&&(_0x197a31=_0x30c9a3(_0x197a31)||_0x197a31);return _0x197a31;},_0x4612ba=(_0x418da1,_0x584b47)=>(_0x29615a,_0x204619)=>_0x584b47(_0x29615a,_0x204619,_0x418da1);function _0x4a7584(_0x3ec253,_0x3ed5ea){const _0x50180e=_0x41b6fe,_0x13d49f=_0x3ec253[_0x50180e(0x167)][0x0];return{..._0x3ed5ea,'id':_0x13d49f[_0x50180e(0x1cd)],'resolved':_0x3ec253['solved']===0x1,'dT':_0x225ec6(_0x13d49f[_0x50180e(0x18b)]),'personId':_0x13d49f[_0x50180e(0x1c8)],'threadId':_0x13d49f['threadId']};}function _0x4c6026(_0x5deef6,_0x4451f4,_0x568b51){const _0x2e7211=_0x41b6fe;var _0x3c89fe,_0x49aeef;if(((_0x49aeef=(_0x3c89fe=_0x5deef6==null?void 0x0:_0x5deef6[_0x2e7211(0x167)])==null?void 0x0:_0x3c89fe[_0x2e7211(0x1a0)])!=null?_0x49aeef:0x0)>0x0){const _0x3e7a41=(_0x1bf6d9,_0x5d9694)=>({'id':_0x1bf6d9['replyId'],'threadId':_0x1bf6d9[_0x2e7211(0x18a)],'dT':_0x225ec6(_0x1bf6d9[_0x2e7211(0x18b)]),'personId':_0x1bf6d9['userId'],'resolved':_0x5deef6['solved']===_0x43500a[_0x2e7211(0x1ec)],'unitId':_0x4451f4,'subUnitId':_0x568b51,'text':JSON[_0x2e7211(0x16c)](_0x1bf6d9[_0x2e7211(0x171)]),'parentId':_0x5d9694}),_0x4d8ff2=_0x3e7a41(_0x5deef6[_0x2e7211(0x167)][0x0]);return{..._0x4d8ff2,'children':_0x5deef6[_0x2e7211(0x167)][_0x2e7211(0x181)](0x1)[_0x2e7211(0x191)](_0x16b312=>_0x3e7a41(_0x16b312,_0x4d8ff2['id']))};}return null;}let _0x44ed28=class{constructor(_0x300bb5,_0x5813da,_0x5801c1){const _0xfaedc0=_0x41b6fe;this[_0xfaedc0(0x18c)]=_0x300bb5,this['_userService']=_0x5813da,this[_0xfaedc0(0x1d6)]=_0x5801c1;}async[_0x41b6fe(0x166)](_0xefa031){const _0xd93711=_0x41b6fe;var _0x163902,_0x5ba9f7;const {parentId:_0x178b9b,unitId:_0x51aebf,text:_0x4d7967,threadId:_0x2f817d}=_0xefa031,_0x299439=(_0x5ba9f7=(_0x163902=_0x4d7967[_0xd93711(0x1be)])==null?void 0x0:_0x163902[_0xd93711(0x19f)](_0x45fe3f=>_0x45fe3f[_0xd93711(0x1ca)]===_0x5be78c[_0xd93711(0x1de)][_0xd93711(0x1e9)])[_0xd93711(0x191)](_0x567828=>_0x567828[_0xd93711(0x178)]))!=null?_0x5ba9f7:[],_0x39ade9=JSON[_0xd93711(0x1ba)](_0x4d7967),_0xff666e=(await this['_sessionService'][_0xd93711(0x180)](_0x51aebf))[_0xd93711(0x1b6)]();if(_0x178b9b){const _0x116259={'memberId':_0xff666e,'unitId':_0x51aebf,'content':_0x39ade9,'mention':_0x299439,'threadId':_0x2f817d},_0x87291f=(await this[_0xd93711(0x18c)]['post'](_0xd93711(0x190)+_0x51aebf+_0xd93711(0x19a),{'body':_0x116259}))[_0xd93711(0x1b3)][_0xd93711(0x1ae)];return{..._0xefa031,'id':_0x87291f[_0xd93711(0x1cd)],'dT':_0x5be78c[_0xd93711(0x1e8)](+_0x87291f[_0xd93711(0x18b)])[_0xd93711(0x16a)](_0xd93711(0x194)),'personId':_0x87291f[_0xd93711(0x1c8)]};}else{const _0x5af5fa={'memberId':_0xff666e,'unitId':_0x51aebf,'content':_0x39ade9,'mention':_0x299439},_0xb485da=await this[_0xd93711(0x18c)]['post']('/universer-api/comment/unit/'+_0x51aebf+_0xd93711(0x1d7),{'body':_0x5af5fa});return _0x4a7584(_0xb485da[_0xd93711(0x1b3)][_0xd93711(0x1c9)],_0xefa031);}}async[_0x41b6fe(0x17c)](_0x4708db){const _0xbc8f44=_0x41b6fe;var _0x2478c1,_0x196910;const {text:_0x26064d,unitId:_0x36940d}=_0x4708db,_0x5d2f05=(_0x196910=(_0x2478c1=_0x26064d[_0xbc8f44(0x1be)])==null?void 0x0:_0x2478c1['filter'](_0x534966=>_0x534966[_0xbc8f44(0x1ca)]===_0x5be78c[_0xbc8f44(0x1de)][_0xbc8f44(0x1e9)])['map'](_0x4983ba=>_0x4983ba[_0xbc8f44(0x178)]))!=null?_0x196910:[],_0x5d64eb=JSON['stringify'](_0x26064d),_0x143052=_0x4708db[_0xbc8f44(0x18a)],_0x3b15f9=_0x4708db['id'],_0x9ea0da={'memberId':(await this[_0xbc8f44(0x1d6)]['requireSession'](_0x36940d))[_0xbc8f44(0x1b6)](),'unitId':_0x36940d,'threadId':_0x143052,'mention':_0x5d2f05,'content':_0x5d64eb,'replyId':_0x3b15f9},_0x5619f2=await this['_httpService'][_0xbc8f44(0x17e)](_0xbc8f44(0x190)+_0x36940d+_0xbc8f44(0x199),{'body':_0x9ea0da});return!_0x5619f2[_0xbc8f44(0x1b3)][_0xbc8f44(0x185)]||_0x5619f2[_0xbc8f44(0x1b3)][_0xbc8f44(0x185)][_0xbc8f44(0x1a9)]===0x1;}async[_0x41b6fe(0x16d)](_0x3abb84){const _0x5208b0=_0x41b6fe,{unitId:_0x191d8a}=_0x3abb84,_0x543f70=_0x3abb84['threadId'],_0x3f1fcd={'memberId':this[_0x5208b0(0x1eb)]['getCurrentUser']()[_0x5208b0(0x197)],'unitId':_0x191d8a,'threadId':_0x543f70,'solved':_0x3abb84[_0x5208b0(0x1ce)]?_0x43500a['Solved']:_0x43500a[_0x5208b0(0x183)]},_0x2674ba=await this[_0x5208b0(0x18c)][_0x5208b0(0x17e)]('/universer-api/comment/unit/'+_0x191d8a+_0x5208b0(0x186),{'body':_0x3f1fcd});return!_0x2674ba['body'][_0x5208b0(0x185)]||_0x2674ba['body'][_0x5208b0(0x185)]['code']===0x1;}async[_0x41b6fe(0x1a5)](_0x38546d,_0x5ba380,_0x17b163,_0xec12db){const _0x1178df=_0x41b6fe,_0x54fc96={'memberId':(await this[_0x1178df(0x1d6)][_0x1178df(0x180)](_0x38546d))[_0x1178df(0x1b6)](),'threadId':_0x17b163,'replyId':_0xec12db,'unitId':_0x38546d},_0x2fc559=await this[_0x1178df(0x18c)][_0x1178df(0x17e)](_0x1178df(0x190)+_0x38546d+_0x1178df(0x168),{'body':_0x54fc96});return!_0x2fc559[_0x1178df(0x1b3)]['error']||_0x2fc559[_0x1178df(0x1b3)][_0x1178df(0x185)][_0x1178df(0x1a9)]===0x1;}async['listComments'](_0x300352,_0x2bb518,_0x564c48){const _0xf5c193=_0x41b6fe,_0x516a11={'unitId':_0x300352,'threadId':_0x564c48},_0x2b506c=await this[_0xf5c193(0x18c)][_0xf5c193(0x17e)](_0xf5c193(0x190)+_0x300352+_0xf5c193(0x1b2),{'body':_0x516a11}),_0x12f94c=_0x564c48['map'](_0x43b469=>_0x4c6026(_0x2b506c[_0xf5c193(0x1b3)]['comments'][_0x43b469],_0x300352,_0x2bb518))[_0xf5c193(0x19f)](Boolean);return Object[_0xf5c193(0x1cc)](_0x2b506c[_0xf5c193(0x1b3)][_0xf5c193(0x1b7)])[_0xf5c193(0x1c7)](_0x19f253=>{const _0x4055a7=_0xf5c193;this[_0x4055a7(0x1eb)]['addUser'](_0x19f253);}),_0x12f94c;}[_0x41b6fe(0x1af)](_0x42679c){const _0x148556=_0x41b6fe;return{'id':_0x42679c['id'],'threadId':_0x42679c[_0x148556(0x18a)],'ref':_0x42679c['ref']};}};_0x44ed28=_0x44a202([_0x4612ba(0x0,_0x5be78c[_0x41b6fe(0x170)](_0x266f01['HTTPService'])),_0x4612ba(0x1,_0x5be78c[_0x41b6fe(0x170)](_0x5be78c[_0x41b6fe(0x17d)])),_0x4612ba(0x2,_0x5be78c['Inject'](_0x4fd8e6[_0x41b6fe(0x1ab)]))],_0x44ed28);var _0x52a247=Object['getOwnPropertyDescriptor'],_0xfe3176=(_0x4eaac4,_0x5efdd9,_0x1af157,_0x2e01e7)=>{const _0x5ed3df=_0x41b6fe;for(var _0x517d59=_0x2e01e7>0x1?void 0x0:_0x2e01e7?_0x52a247(_0x5efdd9,_0x1af157):_0x5efdd9,_0x58c101=_0x4eaac4[_0x5ed3df(0x1a0)]-0x1,_0x430452;_0x58c101>=0x0;_0x58c101--)(_0x430452=_0x4eaac4[_0x58c101])&&(_0x517d59=_0x430452(_0x517d59)||_0x517d59);return _0x517d59;},_0x56dc7d=(_0x5c1b49,_0x5fc2da)=>(_0x5955b4,_0x103e6a)=>_0x5fc2da(_0x5955b4,_0x103e6a,_0x5c1b49);let _0x246e4e=class extends _0x5be78c[_0x41b6fe(0x19c)]{constructor(_0xfe1792,_0x5d5187){const _0xcfb4fe=_0x41b6fe;super(),this[_0xcfb4fe(0x1bf)]=_0xfe1792,this[_0xcfb4fe(0x1a4)]=_0x5d5187,this[_0xcfb4fe(0x1aa)]();}['_initDataSource'](){const _0x3e4c50=_0x41b6fe;this[_0x3e4c50(0x1bf)]['dataSource']=this['_threadCommentDataSource'],this[_0x3e4c50(0x1bf)][_0x3e4c50(0x1e3)]=!0x1;}};_0x246e4e=_0xfe3176([_0x56dc7d(0x0,_0x571e47[_0x41b6fe(0x16f)]),_0x56dc7d(0x1,_0x5be78c[_0x41b6fe(0x170)](_0x44ed28))],_0x246e4e);var _0x58cfbf=Object[_0x41b6fe(0x1dd)],_0x13444f=Object[_0x41b6fe(0x193)],_0x49bdba=(_0xb7f334,_0x506a36,_0x21a4b4)=>_0x506a36 in _0xb7f334?_0x58cfbf(_0xb7f334,_0x506a36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21a4b4}):_0xb7f334[_0x506a36]=_0x21a4b4,_0x4c452d=(_0x3f42a2,_0x5229f3,_0x6ef864,_0x50cb9d)=>{const _0x177f64=_0x41b6fe;for(var _0x2abffa=_0x50cb9d>0x1?void 0x0:_0x50cb9d?_0x13444f(_0x5229f3,_0x6ef864):_0x5229f3,_0x36dff3=_0x3f42a2[_0x177f64(0x1a0)]-0x1,_0x1383c5;_0x36dff3>=0x0;_0x36dff3--)(_0x1383c5=_0x3f42a2[_0x36dff3])&&(_0x2abffa=_0x1383c5(_0x2abffa)||_0x2abffa);return _0x2abffa;},_0x4580d1=(_0x7a3fcb,_0x48e29b)=>(_0x43928a,_0x14070f)=>_0x48e29b(_0x43928a,_0x14070f,_0x7a3fcb),_0x3430a1=(_0x19197b,_0x4d4072,_0x499049)=>_0x49bdba(_0x19197b,typeof _0x4d4072!=_0x41b6fe(0x1c6)?_0x4d4072+'':_0x4d4072,_0x499049);_0x9ebc8f[_0x41b6fe(0x179)]=class extends _0x5be78c[_0x41b6fe(0x1c1)]{constructor(_0x5b946d=_0xdef13d,_0x3a612d,_0x3c3ee8){const _0xf7211c=_0x41b6fe;super(),this[_0xf7211c(0x1bb)]=_0x5b946d,this[_0xf7211c(0x1df)]=_0x3a612d,this[_0xf7211c(0x1c0)]=_0x3c3ee8;const {..._0xef50e2}=_0x5be78c[_0xf7211c(0x1e0)]({},_0xdef13d,this['_config']);this['_configService'][_0xf7211c(0x18f)](_0x4e0bc2,_0xef50e2);}[_0x41b6fe(0x1a6)](){[[_0x44ed28],[_0x246e4e],[_0x4b488f]]['forEach'](_0x7f0fe1=>{const _0x2085c8=_0x462d;this[_0x2085c8(0x1df)][_0x2085c8(0x1d5)](_0x7f0fe1);});}[_0x41b6fe(0x1bc)](){const _0x42adb1=_0x41b6fe;this[_0x42adb1(0x1df)][_0x42adb1(0x1b1)](_0x246e4e),this[_0x42adb1(0x1df)]['get'](_0x4b488f);}},_0x3430a1(_0x9ebc8f[_0x41b6fe(0x179)],'pluginName',_0xf917b9),_0x3430a1(_0x9ebc8f[_0x41b6fe(0x179)],_0x41b6fe(0x1b4),_0x5be78c[_0x41b6fe(0x1d3)]['UNIVER_UNKNOWN']),_0x9ebc8f['UniverThreadCommentDataSourcePlugin']=_0x4c452d([_0x5be78c[_0x41b6fe(0x1ed)](_0x5edfa9[_0x41b6fe(0x18d)],_0x4fd8e6['UniverCollaborationClientPlugin'],_0xab9414[_0x41b6fe(0x1c2)]),_0x4580d1(0x1,_0x5be78c['Inject'](_0x5be78c['Injector'])),_0x4580d1(0x2,_0x5be78c[_0x41b6fe(0x172)])],_0x9ebc8f[_0x41b6fe(0x179)]),Object[_0x41b6fe(0x1dd)](_0x9ebc8f,Symbol[_0x41b6fe(0x174)],{'value':'Module'});}));function _0x462d(_0x42352c,_0x27a22f){const _0x39f160=_0x39f1();return _0x462d=function(_0x462d1c,_0x2dae7b){_0x462d1c=_0x462d1c-0x165;let _0x197b95=_0x39f160[_0x462d1c];return _0x197b95;},_0x462d(_0x42352c,_0x27a22f);}function _0x39f1(){const _0x178986=['UniverThreadCommentUIPlugin','UniverProThreadCommentDatasource','setConfig','/universer-api/comment/unit/','map','UniverNetwork','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','payload','2129073hNjRKk','userID','7685040hojojq','/edit','/reply','size','Disposable','UniverCore','amd','filter','length','HTTPService','unitId','5VMkRFi','_threadCommentDataSource','deleteComment','onStarting','disposeWithMe','Unknown','code','_initDataSource','CollaborationSessionService','exports','_init','reply','saveCommentToSnapshot','_commentService','get','/list','body','type','UniverProCollaborationClient','getMemberID','users','@univerjs/network','getComment','stringify','_config','onReady','@univerjs/thread-comment','customRanges','_threadCommentDataSourceService','_configService','Plugin','UniverLicensePlugin','function','@univerjs/thread-comment-ui','2236122xHhELI','symbol','forEach','userId','comment','rangeType','@univerjs/core','values','replyId','resolved','getUser','1768072gSaDsi','ThreadCommentModel','addUser','UniverInstanceType','UNRECOGNIZED','add','_sessionService','/add','Solve','Add','2174286qwKRZk','_threadCommentModel','commentUpdate$','defineProperty','CustomRangeType','_injector','merge','solved','UniverThreadCommentUi','syncUpdateMutationToColla','/universer-api/user/list','1335988IEHKwB','Edit','find','dayjs','COMMENT','personId','_userService','Solved','DependentOn','58rfvCcM','addComment','replies','/delete','Injector','format','root','parse','resolveComment','rxjs','IThreadCommentDataSourceService','Inject','content','IConfigService','22166lUKgIl','toStringTag','_initUserSync','delete','Delete','rangeId','UniverThreadCommentDataSourcePlugin','user','UniverThreadComment','updateComment','UserManagerService','post','7tzzpCP','requireSession','slice','bufferTime','OpenOrReOpen','getUnit','error','/solved','Reply','@univerjs-pro/collaboration-client','parentId','threadId','createTimestamp','_httpService'];_0x39f1=function(){return _0x178986;};return _0x39f1();}
|
|
1
|
+
(function(_0x4bb6f3,_0x56517d){const _0x4f464c=_0x58a9,_0xc00b49=_0x4bb6f3();while(!![]){try{const _0x3eddc3=-parseInt(_0x4f464c(0xe7))/0x1*(parseInt(_0x4f464c(0x96))/0x2)+parseInt(_0x4f464c(0x94))/0x3+parseInt(_0x4f464c(0xa3))/0x4+parseInt(_0x4f464c(0xc0))/0x5+parseInt(_0x4f464c(0xb9))/0x6*(-parseInt(_0x4f464c(0xd2))/0x7)+-parseInt(_0x4f464c(0xeb))/0x8+-parseInt(_0x4f464c(0x108))/0x9*(parseInt(_0x4f464c(0x10d))/0xa);if(_0x3eddc3===_0x56517d)break;else _0xc00b49['push'](_0xc00b49['shift']());}catch(_0x49a6a4){_0xc00b49['push'](_0xc00b49['shift']());}}}(_0x2d01,0xe7372),function(_0x1e4f0c,_0x13f434){const _0x13e87d=_0x58a9;typeof exports==_0x13e87d(0xb1)&&typeof module<'u'?_0x13f434(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==_0x13e87d(0xca)&&define[_0x13e87d(0xc5)]?define([_0x13e87d(0x117),_0x13e87d(0xd4),_0x13e87d(0xb2),_0x13e87d(0xb8),_0x13e87d(0xbe),_0x13e87d(0x10b),_0x13e87d(0xf1),_0x13e87d(0xed)],_0x13f434):(_0x1e4f0c=typeof globalThis<'u'?globalThis:_0x1e4f0c||self,_0x13f434(_0x1e4f0c[_0x13e87d(0xd3)]={},_0x1e4f0c[_0x13e87d(0xaa)],_0x1e4f0c[_0x13e87d(0xba)],_0x1e4f0c[_0x13e87d(0xd5)],_0x1e4f0c['UniverThreadCommentUi'],_0x1e4f0c[_0x13e87d(0xd0)],_0x1e4f0c[_0x13e87d(0xf1)],_0x1e4f0c[_0x13e87d(0x8a)]));}(this,function(_0x2bc380,_0x53b012,_0x4c8cf5,_0x414820,_0x25e18d,_0x10ac41,_0x49ee10,_0x1d4abe){'use strict';const _0x566886=_0x58a9;const _0x2c7336=_0x566886(0xc9);var _0x1b7f69=(_0x1300f4=>(_0x1300f4[_0x1300f4['OpenOrReOpen']=0x0]=_0x566886(0xdf),_0x1300f4[_0x1300f4[_0x566886(0x116)]=0x1]=_0x566886(0x116),_0x1300f4[_0x1300f4[_0x566886(0xe6)]=-0x1]=_0x566886(0xe6),_0x1300f4))(_0x1b7f69||{}),_0x16fa13=(_0x50c303=>(_0x50c303[_0x50c303[_0x566886(0x9a)]=0x0]='Unknown',_0x50c303[_0x50c303['Add']=0x1]=_0x566886(0xde),_0x50c303[_0x50c303[_0x566886(0xec)]=0x2]=_0x566886(0xec),_0x50c303[_0x50c303[_0x566886(0xe1)]=0x3]=_0x566886(0xe1),_0x50c303[_0x50c303[_0x566886(0xd6)]=0x4]=_0x566886(0xd6),_0x50c303[_0x50c303[_0x566886(0xea)]=0x5]=_0x566886(0xea),_0x50c303[_0x50c303[_0x566886(0xe6)]=-0x1]=_0x566886(0xe6),_0x50c303))(_0x16fa13||{});const _0x15adae=_0x4e121c=>_0x414820[_0x566886(0xfc)](new Date(+_0x4e121c))[_0x566886(0x10f)]('YYYY/MM/DD\x20HH:mm'),_0x38aa63=async(_0x4574eb,_0x135a8d)=>{const _0x4c2b9b=_0x566886,_0x59a7b9=_0x4574eb[_0x4c2b9b(0x9d)](_0x414820[_0x4c2b9b(0xbb)]),_0xe699a3=_0x4574eb['get'](_0x1d4abe[_0x4c2b9b(0xa5)]);_0x135a8d[_0x4c2b9b(0x113)](_0x354baf=>{const _0x186147=_0x4c2b9b;_0x59a7b9[_0x186147(0x9b)](_0x354baf)&&_0x135a8d[_0x186147(0xfd)](_0x354baf);}),_0x135a8d[_0x4c2b9b(0x90)]&&(await _0xe699a3[_0x4c2b9b(0x9d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x135a8d]}}))[_0x4c2b9b(0xbd)][_0x4c2b9b(0x95)][_0x4c2b9b(0x113)](_0x3b3090=>{_0x3b3090&&_0x59a7b9['addUser'](_0x3b3090);});};var _0x3d790c=Object['getOwnPropertyDescriptor'],_0x39f729=(_0x4056b4,_0x6ce4c0,_0x2be89a,_0x354722)=>{const _0x37bc0b=_0x566886;for(var _0x1804a9=_0x354722>0x1?void 0x0:_0x354722?_0x3d790c(_0x6ce4c0,_0x2be89a):_0x6ce4c0,_0x249abc=_0x4056b4[_0x37bc0b(0x97)]-0x1,_0x5d7746;_0x249abc>=0x0;_0x249abc--)(_0x5d7746=_0x4056b4[_0x249abc])&&(_0x1804a9=_0x5d7746(_0x1804a9)||_0x1804a9);return _0x1804a9;},_0x2fd080=(_0x2e7d04,_0x1871e3)=>(_0x130eca,_0x43cc63)=>_0x1871e3(_0x130eca,_0x43cc63,_0x2e7d04);let _0x24dc3e=class extends _0x414820[_0x566886(0xd1)]{constructor(_0x25150d,_0x547ae3,_0x31a4dd,_0x12dd60){const _0x8ba5b5=_0x566886;super(),this[_0x8ba5b5(0xe0)]=_0x25150d,this[_0x8ba5b5(0x100)]=_0x547ae3,this[_0x8ba5b5(0x8b)]=_0x31a4dd,this[_0x8ba5b5(0x10c)]=_0x12dd60,this[_0x8ba5b5(0xb6)](),this[_0x8ba5b5(0xf3)]();}[_0x566886(0xf3)](){const _0x105bb7=_0x566886;this['disposeWithMe'](this[_0x105bb7(0x100)]['commentUpdate$']['pipe'](_0x49ee10[_0x105bb7(0xce)](0x10))[_0x105bb7(0xe9)](_0x9397f7=>{const _0xa1650b=_0x105bb7,_0x20b653=new Set();_0x9397f7[_0xa1650b(0x113)](_0x1c4e13=>{const _0x3636d4=_0xa1650b;switch(_0x1c4e13['type']){case'add':{const _0x49668=_0x1c4e13[_0x3636d4(0xd9)][_0x3636d4(0x92)];_0x20b653[_0x3636d4(0xbc)](_0x49668);break;}}}),_0x38aa63(this[_0xa1650b(0x10c)],_0x20b653);}));}[_0x566886(0xb6)](){const _0xe91912=_0x566886;this[_0xe91912(0xc1)](this[_0xe91912(0xe0)][_0xe91912(0xcf)][_0xe91912(0xe9)](async _0x3844ad=>{const _0x35568c=_0xe91912;var _0x1423c4,_0x42003d,_0x4adae1,_0x472626;const _0x37886a=(_0x1423c4=this[_0x35568c(0x100)][_0x35568c(0xa7)](_0x3844ad[_0x35568c(0xdc)])[_0x35568c(0x8e)](_0x1ea1c3=>_0x1ea1c3['threadId']===_0x3844ad[_0x35568c(0xa6)]))==null?void 0x0:_0x1423c4[_0x35568c(0xf8)];if(!_0x37886a)return;const {unitId:_0x17d5c1,subUnitId:_0x3d529c}=_0x37886a;switch(_0x3844ad[_0x35568c(0x8c)]&&this[_0x35568c(0x8b)]['addUser'](_0x3844ad[_0x35568c(0x8c)]),_0x3844ad['type']){case _0x16fa13['Add']:break;case _0x16fa13[_0x35568c(0xec)]:{this['_threadCommentModel'][_0x35568c(0xb0)](_0x17d5c1,_0x3d529c,{'unitId':_0x17d5c1,'subUnitId':_0x3d529c,'ref':'','id':_0x3844ad[_0x35568c(0xa8)],'dT':_0x15adae(+_0x3844ad[_0x35568c(0xc6)]),'threadId':_0x3844ad[_0x35568c(0xa6)],'personId':(_0x4adae1=(_0x42003d=_0x3844ad[_0x35568c(0x8c)])==null?void 0x0:_0x42003d[_0x35568c(0x109)])!=null?_0x4adae1:_0x3844ad[_0x35568c(0x111)],'text':JSON[_0x35568c(0xb4)](_0x3844ad[_0x35568c(0x10e)]),'parentId':_0x37886a['id']});break;}case _0x16fa13[_0x35568c(0xd6)]:{const _0x47f6d2=this[_0x35568c(0x100)][_0x35568c(0x9f)](_0x17d5c1,_0x3d529c,_0x3844ad[_0x35568c(0xa8)]);_0x47f6d2&&_0x47f6d2['parentId']&&this[_0x35568c(0x100)][_0x35568c(0xe3)](_0x17d5c1,_0x3d529c,_0x3844ad[_0x35568c(0xa8)]);break;}case _0x16fa13[_0x35568c(0xe1)]:{this[_0x35568c(0x100)]['updateComment'](_0x17d5c1,_0x3d529c,{'commentId':_0x3844ad[_0x35568c(0xa8)],'text':JSON['parse'](_0x3844ad[_0x35568c(0x10e)])});break;}case _0x16fa13[_0x35568c(0xea)]:{const _0x245fff=(_0x472626=this[_0x35568c(0x100)][_0x35568c(0xa7)](_0x3844ad['unitId'])[_0x35568c(0x8e)](_0x36f10b=>_0x36f10b[_0x35568c(0xa6)]===_0x3844ad[_0x35568c(0xa6)]))==null?void 0x0:_0x472626[_0x35568c(0xf8)];_0x245fff&&this['_threadCommentModel'][_0x35568c(0xe4)](_0x17d5c1,_0x3d529c,_0x245fff['id'],_0x3844ad[_0x35568c(0x106)]===_0x1b7f69[_0x35568c(0x116)]);break;}}}));}};_0x24dc3e=_0x39f729([_0x2fd080(0x0,_0x414820['Inject'](_0x53b012[_0x566886(0xf4)])),_0x2fd080(0x1,_0x414820[_0x566886(0xd8)](_0x10ac41['ThreadCommentModel'])),_0x2fd080(0x2,_0x414820[_0x566886(0xd8)](_0x414820['UserManagerService'])),_0x2fd080(0x3,_0x414820[_0x566886(0xd8)](_0x414820[_0x566886(0x89)]))],_0x24dc3e);const _0x2a6279=_0x566886(0x103),_0x117104={};var _0x11f49f=Object['getOwnPropertyDescriptor'],_0x5ead18=(_0x5839da,_0x41b626,_0x1bccbb,_0x476326)=>{const _0x4e3ddc=_0x566886;for(var _0x138a06=_0x476326>0x1?void 0x0:_0x476326?_0x11f49f(_0x41b626,_0x1bccbb):_0x41b626,_0x1f663e=_0x5839da[_0x4e3ddc(0x97)]-0x1,_0x5ee8e9;_0x1f663e>=0x0;_0x1f663e--)(_0x5ee8e9=_0x5839da[_0x1f663e])&&(_0x138a06=_0x5ee8e9(_0x138a06)||_0x138a06);return _0x138a06;},_0x25e81a=(_0x2d1df5,_0x43bcc8)=>(_0x4723b6,_0x4a6631)=>_0x43bcc8(_0x4723b6,_0x4a6631,_0x2d1df5);function _0x1b2dde(_0x3e8e07,_0x622ee6){const _0x31e5c6=_0x566886,_0x317a27=_0x3e8e07[_0x31e5c6(0xb7)][0x0];return{..._0x622ee6,'id':_0x317a27[_0x31e5c6(0xa8)],'resolved':_0x3e8e07[_0x31e5c6(0x106)]===0x1,'dT':_0x15adae(_0x317a27[_0x31e5c6(0xc6)]),'personId':_0x317a27[_0x31e5c6(0x111)],'threadId':_0x317a27[_0x31e5c6(0xa6)]};}function _0x1810b0(_0x683738,_0x5931d0,_0xb1f1b4){const _0x54b259=_0x566886;var _0x257e62,_0x6ebb6e;if(((_0x6ebb6e=(_0x257e62=_0x683738==null?void 0x0:_0x683738['replies'])==null?void 0x0:_0x257e62['length'])!=null?_0x6ebb6e:0x0)>0x0){const _0x4a393b=(_0x451ff6,_0x29d2e9)=>({'id':_0x451ff6['replyId'],'threadId':_0x451ff6[_0x54b259(0xa6)],'dT':_0x15adae(_0x451ff6[_0x54b259(0xc6)]),'personId':_0x451ff6[_0x54b259(0x111)],'resolved':_0x683738[_0x54b259(0x106)]===_0x1b7f69['Solved'],'unitId':_0x5931d0,'subUnitId':_0xb1f1b4,'text':JSON[_0x54b259(0xb4)](_0x451ff6[_0x54b259(0x10e)]),'parentId':_0x29d2e9}),_0x490f57=_0x4a393b(_0x683738[_0x54b259(0xb7)][0x0]);return{..._0x490f57,'children':_0x683738[_0x54b259(0xb7)][_0x54b259(0xa1)](0x1)['map'](_0x41ca94=>_0x4a393b(_0x41ca94,_0x490f57['id']))};}return null;}let _0x562ee2=class{constructor(_0x5eaf97,_0x164cb8,_0x36c211){const _0x2b9e4b=_0x566886;this[_0x2b9e4b(0xee)]=_0x5eaf97,this['_userService']=_0x164cb8,this[_0x2b9e4b(0x9c)]=_0x36c211;}async[_0x566886(0xb0)](_0x286846){const _0x50f5dc=_0x566886;var _0xfde29a,_0x1d9aa4;const {parentId:_0x4f4988,unitId:_0x5e4493,text:_0x4dea55,threadId:_0x4d65ec}=_0x286846,_0x1a56c9=(_0x1d9aa4=(_0xfde29a=_0x4dea55[_0x50f5dc(0xf5)])==null?void 0x0:_0xfde29a[_0x50f5dc(0xc8)](_0x4315fc=>_0x4315fc[_0x50f5dc(0xf6)]===_0x414820[_0x50f5dc(0xff)][_0x50f5dc(0xf7)])[_0x50f5dc(0x102)](_0x15134b=>_0x15134b[_0x50f5dc(0xcb)]))!=null?_0x1d9aa4:[],_0x54caef=JSON['stringify'](_0x4dea55),_0x59a99c=(await this[_0x50f5dc(0x9c)]['requireSession'](_0x5e4493))[_0x50f5dc(0x118)]();if(_0x4f4988){const _0x41fa8a={'memberId':_0x59a99c,'unitId':_0x5e4493,'content':_0x54caef,'mention':_0x1a56c9,'threadId':_0x4d65ec},_0xd36cab=(await this[_0x50f5dc(0xee)]['post'](_0x50f5dc(0xbf)+_0x5e4493+_0x50f5dc(0xc4),{'body':_0x41fa8a}))['body']['reply'];return{..._0x286846,'id':_0xd36cab['replyId'],'dT':_0x414820['dayjs'](+_0xd36cab[_0x50f5dc(0xc6)])[_0x50f5dc(0x10f)](_0x50f5dc(0xf9)),'personId':_0xd36cab[_0x50f5dc(0x111)]};}else{const _0xaa460c={'memberId':_0x59a99c,'unitId':_0x5e4493,'content':_0x54caef,'mention':_0x1a56c9},_0x2e25ac=await this[_0x50f5dc(0xee)][_0x50f5dc(0xcc)]('/universer-api/comment/unit/'+_0x5e4493+_0x50f5dc(0x115),{'body':_0xaa460c});return _0x1b2dde(_0x2e25ac['body'][_0x50f5dc(0x98)],_0x286846);}}async[_0x566886(0x107)](_0x66d491){const _0x4c4aee=_0x566886;var _0xaf11ef,_0x13ffa3;const {text:_0x438216,unitId:_0x2e6f26}=_0x66d491,_0x1871fa=(_0x13ffa3=(_0xaf11ef=_0x438216[_0x4c4aee(0xf5)])==null?void 0x0:_0xaf11ef[_0x4c4aee(0xc8)](_0x354ff8=>_0x354ff8[_0x4c4aee(0xf6)]===_0x414820[_0x4c4aee(0xff)][_0x4c4aee(0xf7)])[_0x4c4aee(0x102)](_0xe830ac=>_0xe830ac[_0x4c4aee(0xcb)]))!=null?_0x13ffa3:[],_0x7870dd=JSON[_0x4c4aee(0xe8)](_0x438216),_0x5cf523=_0x66d491[_0x4c4aee(0xa6)],_0x4f9391=_0x66d491['id'],_0x2f45b5={'memberId':(await this['_sessionService'][_0x4c4aee(0x99)](_0x2e6f26))[_0x4c4aee(0x118)](),'unitId':_0x2e6f26,'threadId':_0x5cf523,'mention':_0x1871fa,'content':_0x7870dd,'replyId':_0x4f9391},_0x2e2896=await this['_httpService'][_0x4c4aee(0xcc)](_0x4c4aee(0xbf)+_0x2e6f26+_0x4c4aee(0xab),{'body':_0x2f45b5});return!_0x2e2896[_0x4c4aee(0xbd)][_0x4c4aee(0x8d)]||_0x2e2896[_0x4c4aee(0xbd)][_0x4c4aee(0x8d)][_0x4c4aee(0x110)]===0x1;}async[_0x566886(0xe4)](_0x565539){const _0x5b2148=_0x566886,{unitId:_0x1e95af}=_0x565539,_0x319ee1=_0x565539[_0x5b2148(0xa6)],_0x20442c={'memberId':this[_0x5b2148(0x8b)][_0x5b2148(0xc3)]()['userID'],'unitId':_0x1e95af,'threadId':_0x319ee1,'solved':_0x565539[_0x5b2148(0xe2)]?_0x1b7f69['Solved']:_0x1b7f69[_0x5b2148(0xdf)]},_0x36a62f=await this['_httpService'][_0x5b2148(0xcc)](_0x5b2148(0xbf)+_0x1e95af+_0x5b2148(0xcd),{'body':_0x20442c});return!_0x36a62f[_0x5b2148(0xbd)][_0x5b2148(0x8d)]||_0x36a62f[_0x5b2148(0xbd)]['error'][_0x5b2148(0x110)]===0x1;}async['deleteComment'](_0x4893c1,_0x50255b,_0x3ab335,_0x1bfc47){const _0x3966cc=_0x566886,_0x5c798b={'memberId':(await this[_0x3966cc(0x9c)][_0x3966cc(0x99)](_0x4893c1))[_0x3966cc(0x118)](),'threadId':_0x3ab335,'replyId':_0x1bfc47,'unitId':_0x4893c1},_0x3b0377=await this[_0x3966cc(0xee)][_0x3966cc(0xcc)]('/universer-api/comment/unit/'+_0x4893c1+_0x3966cc(0xfb),{'body':_0x5c798b});return!_0x3b0377['body']['error']||_0x3b0377[_0x3966cc(0xbd)][_0x3966cc(0x8d)][_0x3966cc(0x110)]===0x1;}async[_0x566886(0xa9)](_0x223c04,_0x7753f,_0x481dda){const _0x41b97a=_0x566886,_0x2cafb8={'unitId':_0x223c04,'threadId':_0x481dda},_0x54bff7=await this[_0x41b97a(0xee)][_0x41b97a(0xcc)]('/universer-api/comment/unit/'+_0x223c04+_0x41b97a(0xf2),{'body':_0x2cafb8}),_0x168b6f=_0x481dda[_0x41b97a(0x102)](_0x4b433b=>_0x1810b0(_0x54bff7[_0x41b97a(0xbd)][_0x41b97a(0x104)][_0x4b433b],_0x223c04,_0x7753f))[_0x41b97a(0xc8)](Boolean);return Object[_0x41b97a(0xfe)](_0x54bff7[_0x41b97a(0xbd)][_0x41b97a(0x95)])[_0x41b97a(0x113)](_0x18786f=>{const _0x3a79b2=_0x41b97a;this[_0x3a79b2(0x8b)][_0x3a79b2(0xc2)](_0x18786f);}),_0x168b6f;}[_0x566886(0x112)](_0x58de2c){const _0x4a8057=_0x566886;return{'id':_0x58de2c['id'],'threadId':_0x58de2c[_0x4a8057(0xa6)],'ref':_0x58de2c[_0x4a8057(0xa4)]};}};_0x562ee2=_0x5ead18([_0x25e81a(0x0,_0x414820['Inject'](_0x1d4abe[_0x566886(0xa5)])),_0x25e81a(0x1,_0x414820[_0x566886(0xd8)](_0x414820[_0x566886(0xbb)])),_0x25e81a(0x2,_0x414820['Inject'](_0x53b012['CollaborationSessionService']))],_0x562ee2);var _0x51228f=Object[_0x566886(0xf0)],_0x4b2b0c=(_0x4552ef,_0x58ef64,_0x494a91,_0x16c152)=>{const _0x13d891=_0x566886;for(var _0x2c076a=_0x16c152>0x1?void 0x0:_0x16c152?_0x51228f(_0x58ef64,_0x494a91):_0x58ef64,_0x1f2c87=_0x4552ef[_0x13d891(0x97)]-0x1,_0x54cfdd;_0x1f2c87>=0x0;_0x1f2c87--)(_0x54cfdd=_0x4552ef[_0x1f2c87])&&(_0x2c076a=_0x54cfdd(_0x2c076a)||_0x2c076a);return _0x2c076a;},_0x127a96=(_0x145adf,_0x35845f)=>(_0xbfaca5,_0x4ba41f)=>_0x35845f(_0xbfaca5,_0x4ba41f,_0x145adf);let _0x5ad152=class extends _0x414820[_0x566886(0xd1)]{constructor(_0x353e4d,_0xd84170){const _0x16af18=_0x566886;super(),this['_threadCommentDataSourceService']=_0x353e4d,this[_0x16af18(0xdd)]=_0xd84170,this['_initDataSource']();}['_initDataSource'](){const _0x28019e=_0x566886;this[_0x28019e(0xd7)][_0x28019e(0xfa)]=this[_0x28019e(0xdd)],this[_0x28019e(0xd7)][_0x28019e(0x8f)]=!0x1;}};_0x5ad152=_0x4b2b0c([_0x127a96(0x0,_0x10ac41[_0x566886(0xda)]),_0x127a96(0x1,_0x414820[_0x566886(0xd8)](_0x562ee2))],_0x5ad152);var _0x2f4229=Object[_0x566886(0x91)],_0x25bc1d=Object['getOwnPropertyDescriptor'],_0x5b079a=(_0x551cba,_0x2d7a4e,_0x3664bc)=>_0x2d7a4e in _0x551cba?_0x2f4229(_0x551cba,_0x2d7a4e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3664bc}):_0x551cba[_0x2d7a4e]=_0x3664bc,_0x3fcb36=(_0x4f6312,_0x4f2242,_0x57f670,_0x1c3760)=>{for(var _0x37f123=_0x1c3760>0x1?void 0x0:_0x1c3760?_0x25bc1d(_0x4f2242,_0x57f670):_0x4f2242,_0xc33027=_0x4f6312['length']-0x1,_0x57a939;_0xc33027>=0x0;_0xc33027--)(_0x57a939=_0x4f6312[_0xc33027])&&(_0x37f123=_0x57a939(_0x37f123)||_0x37f123);return _0x37f123;},_0x37ce43=(_0x55ba91,_0x5d8b80)=>(_0x1f5a67,_0x2720a3)=>_0x5d8b80(_0x1f5a67,_0x2720a3,_0x55ba91),_0x172062=(_0x18354d,_0x3d0d40,_0x1d73ef)=>_0x5b079a(_0x18354d,typeof _0x3d0d40!=_0x566886(0xad)?_0x3d0d40+'':_0x3d0d40,_0x1d73ef);_0x2bc380[_0x566886(0xa2)]=class extends _0x414820[_0x566886(0xac)]{constructor(_0xa7fee4=_0x117104,_0x5cd79b,_0x208784){const _0x1adae0=_0x566886;super(),this[_0x1adae0(0xae)]=_0xa7fee4,this[_0x1adae0(0x10c)]=_0x5cd79b,this['_configService']=_0x208784;const {..._0xf3fe6c}=_0x414820[_0x1adae0(0xe5)]({},_0x117104,this[_0x1adae0(0xae)]);this[_0x1adae0(0xc7)][_0x1adae0(0xef)](_0x2a6279,_0xf3fe6c);}[_0x566886(0x101)](){const _0x16a83a=_0x566886;[[_0x562ee2],[_0x5ad152],[_0x24dc3e]][_0x16a83a(0x113)](_0x1b0096=>{const _0x5e470b=_0x16a83a;this[_0x5e470b(0x10c)]['add'](_0x1b0096);});}[_0x566886(0x105)](){const _0x14a2b1=_0x566886;this[_0x14a2b1(0x10c)][_0x14a2b1(0x9d)](_0x5ad152),this[_0x14a2b1(0x10c)][_0x14a2b1(0x9d)](_0x24dc3e);}},_0x172062(_0x2bc380[_0x566886(0xa2)],_0x566886(0xb3),_0x2c7336),_0x172062(_0x2bc380[_0x566886(0xa2)],_0x566886(0xa0),_0x414820['UniverInstanceType'][_0x566886(0xdb)]),_0x2bc380[_0x566886(0xa2)]=_0x3fcb36([_0x414820[_0x566886(0x9e)](_0x25e18d[_0x566886(0x10a)],_0x53b012['UniverCollaborationClientPlugin'],_0x4c8cf5[_0x566886(0xaf)]),_0x37ce43(0x1,_0x414820[_0x566886(0xd8)](_0x414820['Injector'])),_0x37ce43(0x2,_0x414820[_0x566886(0xb5)])],_0x2bc380[_0x566886(0xa2)]),Object[_0x566886(0x91)](_0x2bc380,Symbol[_0x566886(0x93)],{'value':_0x566886(0x114)});}));function _0x58a9(_0x1c0fac,_0x432ecf){const _0x2d01c9=_0x2d01();return _0x58a9=function(_0x58a911,_0x56cc3d){_0x58a911=_0x58a911-0x89;let _0x437819=_0x2d01c9[_0x58a911];return _0x437819;},_0x58a9(_0x1c0fac,_0x432ecf);}function _0x2d01(){const _0x55f5b2=['UniverProCollaborationClient','/edit','Plugin','symbol','_config','UniverLicensePlugin','addComment','object','@univerjs-pro/license','pluginName','parse','IConfigService','_init','replies','@univerjs/core','150jjdQTE','UniverProLicense','UserManagerService','add','body','@univerjs/thread-comment-ui','/universer-api/comment/unit/','7464710QxfEDF','disposeWithMe','addUser','getCurrentUser','/reply','amd','createTimestamp','_configService','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','function','rangeId','post','/solved','bufferTime','commentUpdate$','UniverThreadComment','Disposable','281939VBYXuf','UniverProThreadCommentDatasource','@univerjs-pro/collaboration-client','UniverCore','Delete','_threadCommentDataSourceService','Inject','payload','IThreadCommentDataSourceService','UNIVER_UNKNOWN','unitId','_threadCommentDataSource','Add','OpenOrReOpen','_commentService','Edit','resolved','deleteComment','resolveComment','merge','UNRECOGNIZED','1TEjvBD','stringify','subscribe','Solve','9220720UbvTFu','Reply','@univerjs/network','_httpService','setConfig','getOwnPropertyDescriptor','rxjs','/list','_initUserSync','CommentService','customRanges','rangeType','COMMENT','root','YYYY/MM/DD\x20HH:mm','dataSource','/delete','dayjs','delete','values','CustomRangeType','_threadCommentModel','onStarting','map','thread-comment-data-source.config','comments','onReady','solved','updateComment','4381839FXZLtb','userID','UniverThreadCommentUIPlugin','@univerjs/thread-comment','_injector','10HawkNO','content','format','code','userId','saveCommentToSnapshot','forEach','Module','/add','Solved','exports','getMemberID','Injector','UniverNetwork','_userService','user','error','find','syncUpdateMutationToColla','size','defineProperty','personId','toStringTag','5418195VGFSyD','users','300858BGaWZb','length','comment','requireSession','Unknown','getUser','_sessionService','get','DependentOn','getComment','type','slice','UniverThreadCommentDataSourcePlugin','1779464qGcgvH','ref','HTTPService','threadId','getUnit','replyId','listComments'];_0x2d01=function(){return _0x55f5b2;};return _0x2d01();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0-nightly.202507310307",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/core": "0.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.0-nightly.202507310307",
|
|
49
|
+
"@univerjs-pro/license": "0.10.0-nightly.202507310307",
|
|
50
|
+
"@univerjs/core": "0.10.0-nightly.202507310307",
|
|
51
|
+
"@univerjs/network": "0.10.0-nightly.202507310307",
|
|
51
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs/thread-comment": "0.
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.
|
|
54
|
-
"@univerjs-pro/collaboration-client": "0.9.4-nightly.202507290757"
|
|
53
|
+
"@univerjs/thread-comment": "0.10.0-nightly.202507310307",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.0-nightly.202507310307"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^7.0.6",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|