@univerjs-pro/thread-comment-datasource 0.6.10-experimental.20250421-e4eb9bc → 0.6.10-experimental.20250427-173dc06
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 _0x588ebe=_0x4453;(function(_0x1b26e3,_0x282bcf){const _0x5a62c5=_0x4453,_0x4ea96e=_0x1b26e3();while(!![]){try{const _0x5819dc=-parseInt(_0x5a62c5(0xc7))/0x1+parseInt(_0x5a62c5(0xd2))/0x2+parseInt(_0x5a62c5(0xe7))/0x3+parseInt(_0x5a62c5(0xc9))/0x4+parseInt(_0x5a62c5(0x95))/0x5+parseInt(_0x5a62c5(0x74))/0x6*(-parseInt(_0x5a62c5(0xa5))/0x7)+parseInt(_0x5a62c5(0xb0))/0x8*(-parseInt(_0x5a62c5(0xbb))/0x9);if(_0x5819dc===_0x282bcf)break;else _0x4ea96e['push'](_0x4ea96e['shift']());}catch(_0x546a4d){_0x4ea96e['push'](_0x4ea96e['shift']());}}}(_0x38b1,0xa32cf));Object[_0x588ebe(0xcd)](exports,Symbol['toStringTag'],{'value':_0x588ebe(0xd6)});const b=require(_0x588ebe(0xa8)),T=require(_0x588ebe(0x7b)),c=require(_0x588ebe(0x76)),j=require(_0x588ebe(0xbe)),M=require(_0x588ebe(0xe5)),w=require(_0x588ebe(0xa7)),P=require(_0x588ebe(0xcc)),U=_0x588ebe(0x77);function _0x4453(_0x5c3ccf,_0x7e319f){const _0x38b17b=_0x38b1();return _0x4453=function(_0x44536,_0xac7f3b){_0x44536=_0x44536-0x66;let _0x52845c=_0x38b17b[_0x44536];return _0x52845c;},_0x4453(_0x5c3ccf,_0x7e319f);}var I=(_0x4e2ba8=>(_0x4e2ba8[_0x4e2ba8[_0x588ebe(0x97)]=0x0]=_0x588ebe(0x97),_0x4e2ba8[_0x4e2ba8[_0x588ebe(0x84)]=0x1]=_0x588ebe(0x84),_0x4e2ba8[_0x4e2ba8['UNRECOGNIZED']=-0x1]=_0x588ebe(0x70),_0x4e2ba8))(I||{}),v=(_0x26f3d6=>(_0x26f3d6[_0x26f3d6[_0x588ebe(0x69)]=0x0]=_0x588ebe(0x69),_0x26f3d6[_0x26f3d6['Add']=0x1]=_0x588ebe(0xdc),_0x26f3d6[_0x26f3d6['Reply']=0x2]='Reply',_0x26f3d6[_0x26f3d6[_0x588ebe(0xc2)]=0x3]=_0x588ebe(0xc2),_0x26f3d6[_0x26f3d6[_0x588ebe(0xb1)]=0x4]='Delete',_0x26f3d6[_0x26f3d6[_0x588ebe(0x86)]=0x5]='Solve',_0x26f3d6[_0x26f3d6[_0x588ebe(0x70)]=-0x1]=_0x588ebe(0x70),_0x26f3d6))(v||{});const f=_0x415986=>c[_0x588ebe(0xba)](new Date(+_0x415986))['format'](_0x588ebe(0xdb)),R=async(_0x165d8e,_0x3a9554)=>{const _0x296b1f=_0x588ebe,_0x37acbb=_0x165d8e['get'](c[_0x296b1f(0x9b)]),_0x34c100=_0x165d8e[_0x296b1f(0xca)](P[_0x296b1f(0xc1)]);_0x3a9554[_0x296b1f(0x6f)](_0x4ba3d4=>{const _0x423f7c=_0x296b1f;_0x37acbb['getUser'](_0x4ba3d4)&&_0x3a9554[_0x423f7c(0xa3)](_0x4ba3d4);}),_0x3a9554[_0x296b1f(0xd0)]&&(await _0x34c100[_0x296b1f(0xca)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3a9554]}}))[_0x296b1f(0xce)][_0x296b1f(0xb5)][_0x296b1f(0x6f)](_0x209b07=>{const _0x9cb877=_0x296b1f;_0x209b07&&_0x37acbb[_0x9cb877(0x96)](_0x209b07);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x4b75cf,_0x14cdf9,_0x18924a,_0x2a5351)=>{for(var _0x400ee4=_0x2a5351>0x1?void 0x0:_0x2a5351?$(_0x14cdf9,_0x18924a):_0x14cdf9,_0x3acf77=_0x4b75cf['length']-0x1,_0x488b88;_0x3acf77>=0x0;_0x3acf77--)(_0x488b88=_0x4b75cf[_0x3acf77])&&(_0x400ee4=_0x488b88(_0x400ee4)||_0x400ee4);return _0x400ee4;},S=(_0x535a50,_0x1263bc)=>(_0x22b249,_0x4e416e)=>_0x1263bc(_0x22b249,_0x4e416e,_0x535a50);let p=class extends c[_0x588ebe(0xc8)]{constructor(_0x87bdaa,_0x416a42,_0xd8c281,_0x2bfa25){const _0x318912=_0x588ebe;super(),this['_commentService']=_0x87bdaa,this[_0x318912(0xa1)]=_0x416a42,this[_0x318912(0xd9)]=_0xd8c281,this[_0x318912(0x9d)]=_0x2bfa25,this[_0x318912(0xc6)](),this['_initUserSync']();}[_0x588ebe(0x7e)](){const _0x1132b1=_0x588ebe;this[_0x1132b1(0xd5)](this[_0x1132b1(0xa1)]['commentUpdate$'][_0x1132b1(0x9f)](w[_0x1132b1(0x88)](0x10))['subscribe'](_0x53b44d=>{const _0x4a163c=_0x1132b1,_0x34d77d=new Set();_0x53b44d[_0x4a163c(0x6f)](_0x17fdc2=>{const _0x53f26b=_0x4a163c;switch(_0x17fdc2[_0x53f26b(0x90)]){case'add':{const _0x2c64e7=_0x17fdc2[_0x53f26b(0x8e)][_0x53f26b(0xa2)];_0x34d77d[_0x53f26b(0x83)](_0x2c64e7);break;}}}),R(this['_injector'],_0x34d77d);}));}[_0x588ebe(0xc6)](){const _0x1dc675=_0x588ebe;this[_0x1dc675(0xd5)](this[_0x1dc675(0x6b)][_0x1dc675(0x8b)][_0x1dc675(0x9c)](async _0x36faea=>{const _0x5e3fbf=_0x1dc675;var _0x5b7388,_0x22626d,_0x5bc60e,_0x540c08;const _0x47469e=(_0x5b7388=this[_0x5e3fbf(0xa1)][_0x5e3fbf(0x85)](_0x36faea[_0x5e3fbf(0xac)])[_0x5e3fbf(0xc4)](_0x4e0b9d=>_0x4e0b9d[_0x5e3fbf(0x9e)]===_0x36faea['threadId']))==null?void 0x0:_0x5b7388[_0x5e3fbf(0xb6)];if(!_0x47469e)return;const {unitId:_0x70bea8,subUnitId:_0x40f93a}=_0x47469e;switch(_0x36faea[_0x5e3fbf(0xaf)]&&this[_0x5e3fbf(0xd9)][_0x5e3fbf(0x96)](_0x36faea[_0x5e3fbf(0xaf)]),_0x36faea[_0x5e3fbf(0x90)]){case v['Add']:break;case v[_0x5e3fbf(0xd8)]:{this[_0x5e3fbf(0xa1)][_0x5e3fbf(0xd1)](_0x70bea8,_0x40f93a,{'unitId':_0x70bea8,'subUnitId':_0x40f93a,'ref':'','id':_0x36faea[_0x5e3fbf(0x94)],'dT':f(+_0x36faea[_0x5e3fbf(0xd4)]),'threadId':_0x36faea[_0x5e3fbf(0x9e)],'personId':(_0x5bc60e=(_0x22626d=_0x36faea[_0x5e3fbf(0xaf)])==null?void 0x0:_0x22626d[_0x5e3fbf(0xbf)])!=null?_0x5bc60e:_0x36faea[_0x5e3fbf(0xdd)],'text':JSON['parse'](_0x36faea[_0x5e3fbf(0xbd)]),'parentId':_0x47469e['id']});break;}case v[_0x5e3fbf(0xb1)]:{const _0x48163b=this[_0x5e3fbf(0xa1)][_0x5e3fbf(0xcf)](_0x70bea8,_0x40f93a,_0x36faea['replyId']);_0x48163b&&_0x48163b[_0x5e3fbf(0x87)]&&this[_0x5e3fbf(0xa1)][_0x5e3fbf(0xe1)](_0x70bea8,_0x40f93a,_0x36faea[_0x5e3fbf(0x94)]);break;}case v[_0x5e3fbf(0xc2)]:{this[_0x5e3fbf(0xa1)]['updateComment'](_0x70bea8,_0x40f93a,{'commentId':_0x36faea[_0x5e3fbf(0x94)],'text':JSON[_0x5e3fbf(0x92)](_0x36faea[_0x5e3fbf(0xbd)])});break;}case v[_0x5e3fbf(0x86)]:{const _0x1fdcb6=(_0x540c08=this[_0x5e3fbf(0xa1)]['getUnit'](_0x36faea['unitId'])[_0x5e3fbf(0xc4)](_0x1dd8ff=>_0x1dd8ff[_0x5e3fbf(0x9e)]===_0x36faea[_0x5e3fbf(0x9e)]))==null?void 0x0:_0x540c08[_0x5e3fbf(0xb6)];_0x1fdcb6&&this['_threadCommentModel'][_0x5e3fbf(0x73)](_0x70bea8,_0x40f93a,_0x1fdcb6['id'],_0x36faea['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x588ebe(0x79)])),S(0x1,c[_0x588ebe(0xb8)](M[_0x588ebe(0xbc)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x588ebe(0xb8)](c[_0x588ebe(0xa4)]))],p);const q=_0x588ebe(0x99),D={};function _0x38b1(){const _0x3aaf74=['unitId','_httpService','ref','user','460632wjyioD','Delete','map','reply','length','users','root','saveCommentToSnapshot','Inject','_threadCommentDataSourceService','dayjs','126RbdQHh','ThreadCommentModel','content','@univerjs/thread-comment-ui','userID','syncUpdateMutationToColla','HTTPService','Edit','stringify','find','/solved','_init','861183jQynnH','Disposable','2879476WaxIAd','get','getOwnPropertyDescriptor','@univerjs/network','defineProperty','body','getComment','size','addComment','1346760DjbxQU','setConfig','createTimestamp','disposeWithMe','Module','code','Reply','_userService','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','Add','userId','filter','error','customRanges','deleteComment','UniverThreadCommentUIPlugin','resolved','slice','@univerjs/thread-comment','_sessionService','283113cgRkoV','UNIVER_UNKNOWN','updateComment','merge','onReady','Unknown','/list','_commentService','getMemberID','replies','UniverThreadCommentDataSourcePlugin','forEach','UNRECOGNIZED','CustomRangeType','dataSource','resolveComment','390YpBZkJ','solved','@univerjs/core','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','CommentService','_config','@univerjs-pro/license','_threadCommentDataSource','onStarting','_initUserSync','/universer-api/comment/unit/','_initDataSource','UniverInstanceType','Plugin','add','Solved','getUnit','Solve','parentId','bufferTime','DependentOn','rangeType','commentUpdate$','IConfigService','comments','payload','_configService','type','IThreadCommentDataSourceService','parse','/reply','replyId','5027005HpwUCi','addUser','OpenOrReOpen','comment','thread-comment-data-source.config','COMMENT','UserManagerService','subscribe','_injector','threadId','pipe','pluginName','_threadCommentModel','personId','delete','Injector','16947dohZQk','UniverCollaborationClientPlugin','rxjs','@univerjs-pro/collaboration-client','format','/add','post'];_0x38b1=function(){return _0x3aaf74;};return _0x38b1();}var A=Object[_0x588ebe(0xcb)],x=(_0x3add89,_0x28e5df,_0x3a29c6,_0x3529ed)=>{for(var _0x569efb=_0x3529ed>0x1?void 0x0:_0x3529ed?A(_0x28e5df,_0x3a29c6):_0x28e5df,_0x3feb76=_0x3add89['length']-0x1,_0x588548;_0x3feb76>=0x0;_0x3feb76--)(_0x588548=_0x3add89[_0x3feb76])&&(_0x569efb=_0x588548(_0x569efb)||_0x569efb);return _0x569efb;},_=(_0x496b09,_0xc9157b)=>(_0x43f90f,_0x4bf5c0)=>_0xc9157b(_0x43f90f,_0x4bf5c0,_0x496b09);function Y(_0x5c1752,_0x262721){const _0x309f2d=_0x588ebe,_0x20dd18=_0x5c1752['replies'][0x0];return{..._0x262721,'id':_0x20dd18[_0x309f2d(0x94)],'resolved':_0x5c1752[_0x309f2d(0x75)]===0x1,'dT':f(_0x20dd18[_0x309f2d(0xd4)]),'personId':_0x20dd18[_0x309f2d(0xdd)],'threadId':_0x20dd18['threadId']};}function G(_0x26aa7b,_0x594217,_0x49e656){const _0xb292e0=_0x588ebe;var _0x2a9b78,_0x935e43;if(((_0x935e43=(_0x2a9b78=_0x26aa7b==null?void 0x0:_0x26aa7b[_0xb292e0(0x6d)])==null?void 0x0:_0x2a9b78[_0xb292e0(0xb4)])!=null?_0x935e43:0x0)>0x0){const _0x4fc694=(_0x10aa47,_0x49c4e5)=>({'id':_0x10aa47[_0xb292e0(0x94)],'threadId':_0x10aa47[_0xb292e0(0x9e)],'dT':f(_0x10aa47[_0xb292e0(0xd4)]),'personId':_0x10aa47[_0xb292e0(0xdd)],'resolved':_0x26aa7b['solved']===I['Solved'],'unitId':_0x594217,'subUnitId':_0x49e656,'text':JSON[_0xb292e0(0x92)](_0x10aa47['content']),'parentId':_0x49c4e5}),_0x4ae3d0=_0x4fc694(_0x26aa7b[_0xb292e0(0x6d)][0x0]);return{..._0x4ae3d0,'children':_0x26aa7b[_0xb292e0(0x6d)][_0xb292e0(0xe4)](0x1)[_0xb292e0(0xb2)](_0x252c5e=>_0x4fc694(_0x252c5e,_0x4ae3d0['id']))};}return null;}let g=class{constructor(_0x532c7f,_0x4c5e2a,_0x3a069f,_0x5e0f6e){const _0x3faaa1=_0x588ebe;this[_0x3faaa1(0xad)]=_0x532c7f,this[_0x3faaa1(0xd9)]=_0x4c5e2a,this[_0x3faaa1(0xe6)]=_0x3a069f,this[_0x3faaa1(0x9d)]=_0x5e0f6e;}async[_0x588ebe(0xd1)](_0x105458){const _0x20578f=_0x588ebe;var _0x26062f,_0x1b67d0;const {parentId:_0x3f21d3,unitId:_0x18bdf2,text:_0x230829,threadId:_0x4936fc}=_0x105458,_0x359f1c=(_0x1b67d0=(_0x26062f=_0x230829['customRanges'])==null?void 0x0:_0x26062f[_0x20578f(0xde)](_0xee861b=>_0xee861b[_0x20578f(0x8a)]===c['CustomRangeType'][_0x20578f(0x9a)])[_0x20578f(0xb2)](_0x1daa85=>_0x1daa85['rangeId']))!=null?_0x1b67d0:[],_0x3ec544=JSON[_0x20578f(0xc3)](_0x230829),_0x494ce2=(await this['_sessionService']['requireSession'](_0x18bdf2))[_0x20578f(0x6c)]();if(_0x3f21d3){const _0x37a387={'memberId':_0x494ce2,'unitId':_0x18bdf2,'content':_0x3ec544,'mention':_0x359f1c,'threadId':_0x4936fc},_0x52e5bc=(await this['_httpService']['post'](_0x20578f(0x7f)+_0x18bdf2+_0x20578f(0x93),{'body':_0x37a387}))[_0x20578f(0xce)][_0x20578f(0xb3)];return{..._0x105458,'id':_0x52e5bc['replyId'],'dT':c[_0x20578f(0xba)](+_0x52e5bc[_0x20578f(0xd4)])[_0x20578f(0xa9)](_0x20578f(0xdb)),'personId':_0x52e5bc['userId']};}else{const _0x3f29c2={'memberId':_0x494ce2,'unitId':_0x18bdf2,'content':_0x3ec544,'mention':_0x359f1c},_0x25b6f0=await this[_0x20578f(0xad)][_0x20578f(0xab)](_0x20578f(0x7f)+_0x18bdf2+_0x20578f(0xaa),{'body':_0x3f29c2});return Y(_0x25b6f0[_0x20578f(0xce)][_0x20578f(0x98)],_0x105458);}}async[_0x588ebe(0x66)](_0x16c6e1){const _0x38bf09=_0x588ebe;var _0x485c7a,_0x2c29f6;const {text:_0x1fcac6,unitId:_0x30c0c8}=_0x16c6e1,_0x52bfeb=(_0x2c29f6=(_0x485c7a=_0x1fcac6[_0x38bf09(0xe0)])==null?void 0x0:_0x485c7a['filter'](_0x2d1998=>_0x2d1998[_0x38bf09(0x8a)]===c[_0x38bf09(0x71)][_0x38bf09(0x9a)])[_0x38bf09(0xb2)](_0x2f8744=>_0x2f8744['rangeId']))!=null?_0x2c29f6:[],_0x9cba72=JSON['stringify'](_0x1fcac6),_0x144b21=_0x16c6e1[_0x38bf09(0x9e)],_0x440eb8=_0x16c6e1['id'],_0x4791d1={'memberId':(await this[_0x38bf09(0xe6)]['requireSession'](_0x30c0c8))[_0x38bf09(0x6c)](),'unitId':_0x30c0c8,'threadId':_0x144b21,'mention':_0x52bfeb,'content':_0x9cba72,'replyId':_0x440eb8},_0x3a7c11=await this['_httpService'][_0x38bf09(0xab)](_0x38bf09(0x7f)+_0x30c0c8+'/edit',{'body':_0x4791d1});return!_0x3a7c11[_0x38bf09(0xce)][_0x38bf09(0xdf)]||_0x3a7c11['body'][_0x38bf09(0xdf)][_0x38bf09(0xd7)]===0x1;}async[_0x588ebe(0x73)](_0x431c33){const _0x9a293c=_0x588ebe,{unitId:_0x462d41}=_0x431c33,_0x59cf0a=_0x431c33[_0x9a293c(0x9e)],_0x4e2c8d={'memberId':this[_0x9a293c(0xd9)][_0x9a293c(0x78)]()['userID'],'unitId':_0x462d41,'threadId':_0x59cf0a,'solved':_0x431c33[_0x9a293c(0xe3)]?I['Solved']:I[_0x9a293c(0x97)]},_0x5857bd=await this[_0x9a293c(0xad)][_0x9a293c(0xab)](_0x9a293c(0x7f)+_0x462d41+_0x9a293c(0xc5),{'body':_0x4e2c8d});return!_0x5857bd[_0x9a293c(0xce)][_0x9a293c(0xdf)]||_0x5857bd[_0x9a293c(0xce)]['error'][_0x9a293c(0xd7)]===0x1;}async[_0x588ebe(0xe1)](_0x1f3267,_0x384497,_0x555856,_0x2693c9){const _0x413ca2=_0x588ebe,_0x4e2cea={'memberId':(await this[_0x413ca2(0xe6)]['requireSession'](_0x1f3267))[_0x413ca2(0x6c)](),'threadId':_0x555856,'replyId':_0x2693c9,'unitId':_0x1f3267},_0x26a223=await this[_0x413ca2(0xad)][_0x413ca2(0xab)]('/universer-api/comment/unit/'+_0x1f3267+'/delete',{'body':_0x4e2cea});return!_0x26a223[_0x413ca2(0xce)][_0x413ca2(0xdf)]||_0x26a223[_0x413ca2(0xce)][_0x413ca2(0xdf)][_0x413ca2(0xd7)]===0x1;}async['listComments'](_0x1ff5dd,_0xa70cf8,_0x48bb25){const _0xbe0e05=_0x588ebe,_0x481894={'unitId':_0x1ff5dd,'threadId':_0x48bb25},_0x10aa69=await this[_0xbe0e05(0xad)][_0xbe0e05(0xab)](_0xbe0e05(0x7f)+_0x1ff5dd+_0xbe0e05(0x6a),{'body':_0x481894}),_0x4691ad=_0x48bb25['map'](_0x37d9d0=>G(_0x10aa69[_0xbe0e05(0xce)][_0xbe0e05(0x8d)][_0x37d9d0],_0x1ff5dd,_0xa70cf8))['filter'](Boolean);return Object['values'](_0x10aa69['body'][_0xbe0e05(0xb5)])[_0xbe0e05(0x6f)](_0x197c04=>{const _0x5e1978=_0xbe0e05;this[_0x5e1978(0xd9)][_0x5e1978(0x96)](_0x197c04);}),_0x4691ad;}[_0x588ebe(0xb7)](_0x3f225f){const _0x31d037=_0x588ebe;return{'id':_0x3f225f['id'],'threadId':_0x3f225f[_0x31d037(0x9e)],'ref':_0x3f225f[_0x31d037(0xae)]};}};g=x([_(0x0,c[_0x588ebe(0xb8)](P['HTTPService'])),_(0x1,c[_0x588ebe(0xb8)](c[_0x588ebe(0x9b)])),_(0x2,c[_0x588ebe(0xb8)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x588ebe(0xcb)],J=(_0xa9998e,_0x5ad9ff,_0x316dd1,_0x5b71b2)=>{const _0xb31b5=_0x588ebe;for(var _0x300de9=_0x5b71b2>0x1?void 0x0:_0x5b71b2?H(_0x5ad9ff,_0x316dd1):_0x5ad9ff,_0x58dfd3=_0xa9998e[_0xb31b5(0xb4)]-0x1,_0xd978a8;_0x58dfd3>=0x0;_0x58dfd3--)(_0xd978a8=_0xa9998e[_0x58dfd3])&&(_0x300de9=_0xd978a8(_0x300de9)||_0x300de9);return _0x300de9;},y=(_0x19d6ab,_0x3a5426)=>(_0x404c4e,_0x201ba4)=>_0x3a5426(_0x404c4e,_0x201ba4,_0x19d6ab);let C=class extends c['Disposable']{constructor(_0x1b7e14,_0x10de43){const _0x2e0736=_0x588ebe;super(),this['_threadCommentDataSourceService']=_0x1b7e14,this[_0x2e0736(0x7c)]=_0x10de43,this[_0x2e0736(0x80)]();}[_0x588ebe(0x80)](){const _0xe4d7b6=_0x588ebe;this[_0xe4d7b6(0xb9)][_0xe4d7b6(0x72)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xe4d7b6(0xc0)]=!0x1;}};C=J([y(0x0,M[_0x588ebe(0x91)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x588ebe(0xcb)],Z=(_0x343ad8,_0x354d76,_0x46ad6a)=>_0x354d76 in _0x343ad8?F(_0x343ad8,_0x354d76,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46ad6a}):_0x343ad8[_0x354d76]=_0x46ad6a,W=(_0x16cc39,_0x501cc8,_0x340f30,_0x28bc83)=>{for(var _0x67d02=_0x28bc83>0x1?void 0x0:_0x28bc83?L(_0x501cc8,_0x340f30):_0x501cc8,_0x304ade=_0x16cc39['length']-0x1,_0x535761;_0x304ade>=0x0;_0x304ade--)(_0x535761=_0x16cc39[_0x304ade])&&(_0x67d02=_0x535761(_0x67d02)||_0x67d02);return _0x67d02;},O=(_0x83089c,_0x2835ed)=>(_0x39a071,_0x3c4ab3)=>_0x2835ed(_0x39a071,_0x3c4ab3,_0x83089c),N=(_0x4c224b,_0xcae11,_0x49fbe2)=>Z(_0x4c224b,typeof _0xcae11!='symbol'?_0xcae11+'':_0xcae11,_0x49fbe2);exports[_0x588ebe(0x6e)]=class extends c[_0x588ebe(0x82)]{constructor(_0x9ec111=D,_0x2fc8f4,_0x256fe7){const _0x5986e4=_0x588ebe;super(),this[_0x5986e4(0x7a)]=_0x9ec111,this[_0x5986e4(0x9d)]=_0x2fc8f4,this['_configService']=_0x256fe7;const {..._0x475427}=c[_0x5986e4(0x67)]({},D,this[_0x5986e4(0x7a)]);this[_0x5986e4(0x8f)][_0x5986e4(0xd3)](q,_0x475427);}[_0x588ebe(0x7d)](){const _0x12d6ab=_0x588ebe;[[g],[C],[p]][_0x12d6ab(0x6f)](_0x1997a5=>{const _0x214cd8=_0x12d6ab;this[_0x214cd8(0x9d)][_0x214cd8(0x83)](_0x1997a5);});}[_0x588ebe(0x68)](){const _0x27c84f=_0x588ebe;this[_0x27c84f(0x9d)][_0x27c84f(0xca)](C),this[_0x27c84f(0x9d)]['get'](p);}},N(exports[_0x588ebe(0x6e)],_0x588ebe(0xa0),U),N(exports[_0x588ebe(0x6e)],_0x588ebe(0x90),c[_0x588ebe(0x81)][_0x588ebe(0xe8)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x588ebe(0x89)](j[_0x588ebe(0xe2)],b[_0x588ebe(0xa6)],T[_0x588ebe(0xda)]),O(0x1,c[_0x588ebe(0xb8)](c[_0x588ebe(0xa4)])),O(0x2,c[_0x588ebe(0x8c)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x1a6f1b=_0x1534;(function(_0x59e5da,_0x4e9d46){const _0x2e9d0e=_0x1534,_0x223d06=_0x59e5da();while(!![]){try{const _0x545217=-parseInt(_0x2e9d0e(0x1aa))/0x1+-parseInt(_0x2e9d0e(0x1fb))/0x2+parseInt(_0x2e9d0e(0x1d3))/0x3*(parseInt(_0x2e9d0e(0x18f))/0x4)+parseInt(_0x2e9d0e(0x1ae))/0x5+parseInt(_0x2e9d0e(0x193))/0x6*(parseInt(_0x2e9d0e(0x1b1))/0x7)+parseInt(_0x2e9d0e(0x1e3))/0x8+-parseInt(_0x2e9d0e(0x1a8))/0x9*(parseInt(_0x2e9d0e(0x19b))/0xa);if(_0x545217===_0x4e9d46)break;else _0x223d06['push'](_0x223d06['shift']());}catch(_0x17f545){_0x223d06['push'](_0x223d06['shift']());}}}(_0x390c,0xf12b0));Object[_0x1a6f1b(0x1f2)](exports,Symbol['toStringTag'],{'value':_0x1a6f1b(0x209)});const b=require(_0x1a6f1b(0x1c0)),T=require(_0x1a6f1b(0x1fa)),c=require(_0x1a6f1b(0x1b4)),j=require(_0x1a6f1b(0x195)),M=require(_0x1a6f1b(0x204)),w=require('rxjs'),P=require(_0x1a6f1b(0x1a0)),U=_0x1a6f1b(0x1d6);var I=(_0x4af670=>(_0x4af670[_0x4af670[_0x1a6f1b(0x203)]=0x0]=_0x1a6f1b(0x203),_0x4af670[_0x4af670[_0x1a6f1b(0x1bd)]=0x1]='Solved',_0x4af670[_0x4af670[_0x1a6f1b(0x20a)]=-0x1]=_0x1a6f1b(0x20a),_0x4af670))(I||{}),v=(_0x237a76=>(_0x237a76[_0x237a76['Unknown']=0x0]='Unknown',_0x237a76[_0x237a76[_0x1a6f1b(0x1d7)]=0x1]=_0x1a6f1b(0x1d7),_0x237a76[_0x237a76[_0x1a6f1b(0x1fe)]=0x2]=_0x1a6f1b(0x1fe),_0x237a76[_0x237a76[_0x1a6f1b(0x1eb)]=0x3]=_0x1a6f1b(0x1eb),_0x237a76[_0x237a76[_0x1a6f1b(0x1b7)]=0x4]=_0x1a6f1b(0x1b7),_0x237a76[_0x237a76['Solve']=0x5]=_0x1a6f1b(0x1c6),_0x237a76[_0x237a76['UNRECOGNIZED']=-0x1]=_0x1a6f1b(0x20a),_0x237a76))(v||{});const f=_0x9a3485=>c['dayjs'](new Date(+_0x9a3485))[_0x1a6f1b(0x202)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3ee487,_0x1bda93)=>{const _0x120582=_0x1a6f1b,_0x2faf62=_0x3ee487[_0x120582(0x1bc)](c['UserManagerService']),_0x41f594=_0x3ee487[_0x120582(0x1bc)](P[_0x120582(0x19a)]);_0x1bda93[_0x120582(0x1f9)](_0x6d68c4=>{const _0x45b19a=_0x120582;_0x2faf62['getUser'](_0x6d68c4)&&_0x1bda93[_0x45b19a(0x1b8)](_0x6d68c4);}),_0x1bda93[_0x120582(0x206)]&&(await _0x41f594['get'](_0x120582(0x1e0),{'params':{'userIDs':[..._0x1bda93]}}))[_0x120582(0x1b6)][_0x120582(0x200)][_0x120582(0x1f9)](_0x24fae7=>{const _0x173b36=_0x120582;_0x24fae7&&_0x2faf62[_0x173b36(0x1ac)](_0x24fae7);});};var $=Object[_0x1a6f1b(0x1e6)],E=(_0x1f078d,_0x1a82af,_0x32f941,_0xb388ec)=>{const _0x35e4a8=_0x1a6f1b;for(var _0x53785d=_0xb388ec>0x1?void 0x0:_0xb388ec?$(_0x1a82af,_0x32f941):_0x1a82af,_0x241258=_0x1f078d[_0x35e4a8(0x1f7)]-0x1,_0x52e0b4;_0x241258>=0x0;_0x241258--)(_0x52e0b4=_0x1f078d[_0x241258])&&(_0x53785d=_0x52e0b4(_0x53785d)||_0x53785d);return _0x53785d;},S=(_0x1a1338,_0x3d8dca)=>(_0x451a08,_0x30154b)=>_0x3d8dca(_0x451a08,_0x30154b,_0x1a1338);let p=class extends c[_0x1a6f1b(0x1e9)]{constructor(_0x3e1ddc,_0x1a9735,_0x3e2ca2,_0x326365){const _0x269046=_0x1a6f1b;super(),this[_0x269046(0x1f5)]=_0x3e1ddc,this[_0x269046(0x192)]=_0x1a9735,this[_0x269046(0x1b9)]=_0x3e2ca2,this[_0x269046(0x207)]=_0x326365,this[_0x269046(0x19f)](),this[_0x269046(0x1dc)]();}[_0x1a6f1b(0x1dc)](){const _0x28db43=_0x1a6f1b;this[_0x28db43(0x1cd)](this[_0x28db43(0x192)][_0x28db43(0x1e4)][_0x28db43(0x1d5)](w[_0x28db43(0x199)](0x10))[_0x28db43(0x1e2)](_0x56b24d=>{const _0x280235=_0x28db43,_0x3c3e25=new Set();_0x56b24d[_0x280235(0x1f9)](_0x23fb86=>{const _0x4b7717=_0x280235;switch(_0x23fb86[_0x4b7717(0x1ec)]){case'add':{const _0x520342=_0x23fb86[_0x4b7717(0x1a5)]['personId'];_0x3c3e25[_0x4b7717(0x1d0)](_0x520342);break;}}}),R(this[_0x280235(0x207)],_0x3c3e25);}));}['_init'](){const _0x232198=_0x1a6f1b;this['disposeWithMe'](this[_0x232198(0x1f5)]['commentUpdate$']['subscribe'](async _0x489599=>{const _0x4f2bcf=_0x232198;var _0x392960,_0x348545,_0x5947ef,_0x38a7e1;const _0x5373c8=(_0x392960=this[_0x4f2bcf(0x192)][_0x4f2bcf(0x1b2)](_0x489599[_0x4f2bcf(0x1cf)])[_0x4f2bcf(0x1c2)](_0x5bfda6=>_0x5bfda6['threadId']===_0x489599[_0x4f2bcf(0x1da)]))==null?void 0x0:_0x392960['root'];if(!_0x5373c8)return;const {unitId:_0x33c318,subUnitId:_0x501217}=_0x5373c8;switch(_0x489599[_0x4f2bcf(0x1af)]&&this['_userService'][_0x4f2bcf(0x1ac)](_0x489599[_0x4f2bcf(0x1af)]),_0x489599['type']){case v[_0x4f2bcf(0x1d7)]:break;case v[_0x4f2bcf(0x1fe)]:{this['_threadCommentModel'][_0x4f2bcf(0x1c3)](_0x33c318,_0x501217,{'unitId':_0x33c318,'subUnitId':_0x501217,'ref':'','id':_0x489599[_0x4f2bcf(0x1c7)],'dT':f(+_0x489599[_0x4f2bcf(0x1b3)]),'threadId':_0x489599[_0x4f2bcf(0x1da)],'personId':(_0x5947ef=(_0x348545=_0x489599[_0x4f2bcf(0x1af)])==null?void 0x0:_0x348545[_0x4f2bcf(0x19d)])!=null?_0x5947ef:_0x489599['userId'],'text':JSON[_0x4f2bcf(0x1ce)](_0x489599['content']),'parentId':_0x5373c8['id']});break;}case v[_0x4f2bcf(0x1b7)]:{const _0xa3b76f=this['_threadCommentModel'][_0x4f2bcf(0x194)](_0x33c318,_0x501217,_0x489599[_0x4f2bcf(0x1c7)]);_0xa3b76f&&_0xa3b76f['parentId']&&this[_0x4f2bcf(0x192)][_0x4f2bcf(0x1dd)](_0x33c318,_0x501217,_0x489599['replyId']);break;}case v['Edit']:{this[_0x4f2bcf(0x192)][_0x4f2bcf(0x1e1)](_0x33c318,_0x501217,{'commentId':_0x489599[_0x4f2bcf(0x1c7)],'text':JSON[_0x4f2bcf(0x1ce)](_0x489599['content'])});break;}case v[_0x4f2bcf(0x1c6)]:{const _0x3830c3=(_0x38a7e1=this['_threadCommentModel']['getUnit'](_0x489599[_0x4f2bcf(0x1cf)])[_0x4f2bcf(0x1c2)](_0x537a2b=>_0x537a2b[_0x4f2bcf(0x1da)]===_0x489599[_0x4f2bcf(0x1da)]))==null?void 0x0:_0x38a7e1[_0x4f2bcf(0x1c5)];_0x3830c3&&this[_0x4f2bcf(0x192)][_0x4f2bcf(0x19c)](_0x33c318,_0x501217,_0x3830c3['id'],_0x489599[_0x4f2bcf(0x1e5)]===I[_0x4f2bcf(0x1bd)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x1a6f1b(0x190)])),S(0x1,c[_0x1a6f1b(0x1a4)](M[_0x1a6f1b(0x1f1)])),S(0x2,c['Inject'](c[_0x1a6f1b(0x1ad)])),S(0x3,c['Inject'](c[_0x1a6f1b(0x1d4)]))],p);function _0x390c(){const _0x42db94=['@univerjs/network','_sessionService','syncUpdateMutationToColla','map','Inject','payload','ref','getMemberID','98181DmoFOA','UniverInstanceType','1906090tTHlJD','rangeType','addUser','UserManagerService','8300345pTfXFR','user','dayjs','7pELnAf','getUnit','createTimestamp','@univerjs/core','rangeId','body','Delete','delete','_userService','comments','_threadCommentDataSource','get','Solved','userId','content','@univerjs-pro/collaboration-client','UniverCollaborationClientPlugin','find','addComment','CollaborationSessionService','root','Solve','replyId','IThreadCommentDataSourceService','/delete','UniverThreadCommentDataSourcePlugin','_initDataSource','filter','disposeWithMe','parse','unitId','add','saveCommentToSnapshot','post','4741788VYgxFp','Injector','pipe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','getCurrentUser','IConfigService','threadId','/edit','_initUserSync','deleteComment','error','onStarting','/universer-api/user/list','updateComment','subscribe','13063296mlbUJT','commentUpdate$','solved','getOwnPropertyDescriptor','UniverThreadCommentUIPlugin','_configService','Disposable','onReady','Edit','type','_config','listComments','customRanges','pluginName','ThreadCommentModel','defineProperty','stringify','symbol','_commentService','slice','length','CustomRangeType','forEach','@univerjs-pro/license','3542174MRylKd','/reply','resolved','Reply','setConfig','users','/universer-api/comment/unit/','format','OpenOrReOpen','@univerjs/thread-comment','/add','size','_injector','_httpService','Module','UNRECOGNIZED','/solved','4KCdeTf','CommentService','replies','_threadCommentModel','7192110HVlhKs','getComment','@univerjs/thread-comment-ui','requireSession','code','DependentOn','bufferTime','HTTPService','1290LdyUmB','resolveComment','userID','_threadCommentDataSourceService','_init'];_0x390c=function(){return _0x42db94;};return _0x390c();}const q='thread-comment-data-source.config',D={};var A=Object[_0x1a6f1b(0x1e6)],x=(_0x2b2286,_0x1aaf1d,_0x23f7d9,_0x391e99)=>{for(var _0x53f73f=_0x391e99>0x1?void 0x0:_0x391e99?A(_0x1aaf1d,_0x23f7d9):_0x1aaf1d,_0x4e8abf=_0x2b2286['length']-0x1,_0x25212a;_0x4e8abf>=0x0;_0x4e8abf--)(_0x25212a=_0x2b2286[_0x4e8abf])&&(_0x53f73f=_0x25212a(_0x53f73f)||_0x53f73f);return _0x53f73f;},_=(_0x516d0b,_0x553464)=>(_0x17f5cd,_0x561065)=>_0x553464(_0x17f5cd,_0x561065,_0x516d0b);function Y(_0x3e93ec,_0x1d5fc3){const _0x54f5e3=_0x1a6f1b,_0x51c8b7=_0x3e93ec[_0x54f5e3(0x191)][0x0];return{..._0x1d5fc3,'id':_0x51c8b7[_0x54f5e3(0x1c7)],'resolved':_0x3e93ec['solved']===0x1,'dT':f(_0x51c8b7[_0x54f5e3(0x1b3)]),'personId':_0x51c8b7[_0x54f5e3(0x1be)],'threadId':_0x51c8b7[_0x54f5e3(0x1da)]};}function G(_0xa7274e,_0x44834b,_0x35ead0){const _0x7cd571=_0x1a6f1b;var _0x12314c,_0x2b3830;if(((_0x2b3830=(_0x12314c=_0xa7274e==null?void 0x0:_0xa7274e[_0x7cd571(0x191)])==null?void 0x0:_0x12314c[_0x7cd571(0x1f7)])!=null?_0x2b3830:0x0)>0x0){const _0x20efb6=(_0x3a2b9f,_0x368615)=>({'id':_0x3a2b9f[_0x7cd571(0x1c7)],'threadId':_0x3a2b9f[_0x7cd571(0x1da)],'dT':f(_0x3a2b9f[_0x7cd571(0x1b3)]),'personId':_0x3a2b9f[_0x7cd571(0x1be)],'resolved':_0xa7274e[_0x7cd571(0x1e5)]===I[_0x7cd571(0x1bd)],'unitId':_0x44834b,'subUnitId':_0x35ead0,'text':JSON['parse'](_0x3a2b9f[_0x7cd571(0x1bf)]),'parentId':_0x368615}),_0x1fd7d3=_0x20efb6(_0xa7274e[_0x7cd571(0x191)][0x0]);return{..._0x1fd7d3,'children':_0xa7274e[_0x7cd571(0x191)][_0x7cd571(0x1f6)](0x1)[_0x7cd571(0x1a3)](_0x1f02ec=>_0x20efb6(_0x1f02ec,_0x1fd7d3['id']))};}return null;}function _0x1534(_0x15a231,_0x3abd78){const _0x390ca1=_0x390c();return _0x1534=function(_0x153495,_0xf99667){_0x153495=_0x153495-0x18e;let _0x42c5f3=_0x390ca1[_0x153495];return _0x42c5f3;},_0x1534(_0x15a231,_0x3abd78);}let g=class{constructor(_0x4fca5d,_0x5aa123,_0xa445e6,_0x843693){const _0x13befd=_0x1a6f1b;this[_0x13befd(0x208)]=_0x4fca5d,this[_0x13befd(0x1b9)]=_0x5aa123,this['_sessionService']=_0xa445e6,this[_0x13befd(0x207)]=_0x843693;}async[_0x1a6f1b(0x1c3)](_0x34fbf6){const _0xda3233=_0x1a6f1b;var _0x5cbe37,_0x56e0eb;const {parentId:_0x6724e8,unitId:_0x3153a9,text:_0x1e2506,threadId:_0x96ea7b}=_0x34fbf6,_0x5e3d0c=(_0x56e0eb=(_0x5cbe37=_0x1e2506[_0xda3233(0x1ef)])==null?void 0x0:_0x5cbe37[_0xda3233(0x1cc)](_0x2baf6a=>_0x2baf6a[_0xda3233(0x1ab)]===c[_0xda3233(0x1f8)]['COMMENT'])[_0xda3233(0x1a3)](_0xd90677=>_0xd90677[_0xda3233(0x1b5)]))!=null?_0x56e0eb:[],_0x2c5841=JSON[_0xda3233(0x1f3)](_0x1e2506),_0x4b17f4=(await this[_0xda3233(0x1a1)][_0xda3233(0x196)](_0x3153a9))[_0xda3233(0x1a7)]();if(_0x6724e8){const _0x130534={'memberId':_0x4b17f4,'unitId':_0x3153a9,'content':_0x2c5841,'mention':_0x5e3d0c,'threadId':_0x96ea7b},_0x4acd50=(await this[_0xda3233(0x208)][_0xda3233(0x1d2)](_0xda3233(0x201)+_0x3153a9+_0xda3233(0x1fc),{'body':_0x130534}))[_0xda3233(0x1b6)]['reply'];return{..._0x34fbf6,'id':_0x4acd50[_0xda3233(0x1c7)],'dT':c[_0xda3233(0x1b0)](+_0x4acd50[_0xda3233(0x1b3)])[_0xda3233(0x202)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4acd50['userId']};}else{const _0x386295={'memberId':_0x4b17f4,'unitId':_0x3153a9,'content':_0x2c5841,'mention':_0x5e3d0c},_0x22dff8=await this[_0xda3233(0x208)][_0xda3233(0x1d2)](_0xda3233(0x201)+_0x3153a9+_0xda3233(0x205),{'body':_0x386295});return Y(_0x22dff8[_0xda3233(0x1b6)]['comment'],_0x34fbf6);}}async[_0x1a6f1b(0x1e1)](_0x11297c){const _0x3b4cda=_0x1a6f1b;var _0x29c8d0,_0xb928c5;const {text:_0x25e7a1,unitId:_0xa11d60}=_0x11297c,_0x34ed5d=(_0xb928c5=(_0x29c8d0=_0x25e7a1[_0x3b4cda(0x1ef)])==null?void 0x0:_0x29c8d0[_0x3b4cda(0x1cc)](_0x2acc19=>_0x2acc19['rangeType']===c[_0x3b4cda(0x1f8)]['COMMENT'])[_0x3b4cda(0x1a3)](_0x1b3411=>_0x1b3411['rangeId']))!=null?_0xb928c5:[],_0x1609b0=JSON[_0x3b4cda(0x1f3)](_0x25e7a1),_0x1403e2=_0x11297c['threadId'],_0x241ac2=_0x11297c['id'],_0x5795da={'memberId':(await this[_0x3b4cda(0x1a1)][_0x3b4cda(0x196)](_0xa11d60))[_0x3b4cda(0x1a7)](),'unitId':_0xa11d60,'threadId':_0x1403e2,'mention':_0x34ed5d,'content':_0x1609b0,'replyId':_0x241ac2},_0x23b398=await this['_httpService'][_0x3b4cda(0x1d2)]('/universer-api/comment/unit/'+_0xa11d60+_0x3b4cda(0x1db),{'body':_0x5795da});return!_0x23b398[_0x3b4cda(0x1b6)]['error']||_0x23b398[_0x3b4cda(0x1b6)][_0x3b4cda(0x1de)][_0x3b4cda(0x197)]===0x1;}async[_0x1a6f1b(0x19c)](_0x3cfafc){const _0x476f6f=_0x1a6f1b,{unitId:_0x26e266}=_0x3cfafc,_0x241a34=_0x3cfafc[_0x476f6f(0x1da)],_0x30a288={'memberId':this[_0x476f6f(0x1b9)][_0x476f6f(0x1d8)]()[_0x476f6f(0x19d)],'unitId':_0x26e266,'threadId':_0x241a34,'solved':_0x3cfafc[_0x476f6f(0x1fd)]?I[_0x476f6f(0x1bd)]:I[_0x476f6f(0x203)]},_0x16a9a0=await this[_0x476f6f(0x208)]['post'](_0x476f6f(0x201)+_0x26e266+_0x476f6f(0x18e),{'body':_0x30a288});return!_0x16a9a0[_0x476f6f(0x1b6)][_0x476f6f(0x1de)]||_0x16a9a0['body'][_0x476f6f(0x1de)][_0x476f6f(0x197)]===0x1;}async[_0x1a6f1b(0x1dd)](_0x2baf35,_0x24eaeb,_0x19e4e4,_0x2d30de){const _0x65f37b=_0x1a6f1b,_0x742a0={'memberId':(await this[_0x65f37b(0x1a1)][_0x65f37b(0x196)](_0x2baf35))['getMemberID'](),'threadId':_0x19e4e4,'replyId':_0x2d30de,'unitId':_0x2baf35},_0x1ffc5a=await this[_0x65f37b(0x208)]['post'](_0x65f37b(0x201)+_0x2baf35+_0x65f37b(0x1c9),{'body':_0x742a0});return!_0x1ffc5a[_0x65f37b(0x1b6)][_0x65f37b(0x1de)]||_0x1ffc5a[_0x65f37b(0x1b6)][_0x65f37b(0x1de)][_0x65f37b(0x197)]===0x1;}async[_0x1a6f1b(0x1ee)](_0x272902,_0x19d78b,_0xe9f6fa){const _0x5c4b9d=_0x1a6f1b,_0x582509={'unitId':_0x272902,'threadId':_0xe9f6fa},_0x10f557=await this[_0x5c4b9d(0x208)]['post'](_0x5c4b9d(0x201)+_0x272902+'/list',{'body':_0x582509}),_0x439354=_0xe9f6fa[_0x5c4b9d(0x1a3)](_0x2e43e3=>G(_0x10f557['body'][_0x5c4b9d(0x1ba)][_0x2e43e3],_0x272902,_0x19d78b))['filter'](Boolean);return Object['values'](_0x10f557['body'][_0x5c4b9d(0x200)])[_0x5c4b9d(0x1f9)](_0x11e53f=>{const _0x280744=_0x5c4b9d;this[_0x280744(0x1b9)][_0x280744(0x1ac)](_0x11e53f);}),_0x439354;}[_0x1a6f1b(0x1d1)](_0x5daa68){const _0x1f6530=_0x1a6f1b;return{'id':_0x5daa68['id'],'threadId':_0x5daa68[_0x1f6530(0x1da)],'ref':_0x5daa68[_0x1f6530(0x1a6)]};}};g=x([_(0x0,c[_0x1a6f1b(0x1a4)](P[_0x1a6f1b(0x19a)])),_(0x1,c[_0x1a6f1b(0x1a4)](c['UserManagerService'])),_(0x2,c[_0x1a6f1b(0x1a4)](b[_0x1a6f1b(0x1c4)])),_(0x3,c['Inject'](c[_0x1a6f1b(0x1d4)]))],g);var H=Object[_0x1a6f1b(0x1e6)],J=(_0x4ad6cc,_0x3731d0,_0x5d0774,_0x31edd0)=>{for(var _0x1efe07=_0x31edd0>0x1?void 0x0:_0x31edd0?H(_0x3731d0,_0x5d0774):_0x3731d0,_0x5a3429=_0x4ad6cc['length']-0x1,_0x3a60a7;_0x5a3429>=0x0;_0x5a3429--)(_0x3a60a7=_0x4ad6cc[_0x5a3429])&&(_0x1efe07=_0x3a60a7(_0x1efe07)||_0x1efe07);return _0x1efe07;},y=(_0x18f00e,_0x52d433)=>(_0x387aed,_0x1969af)=>_0x52d433(_0x387aed,_0x1969af,_0x18f00e);let C=class extends c['Disposable']{constructor(_0x34d37e,_0x4788b0){const _0x2b5387=_0x1a6f1b;super(),this[_0x2b5387(0x19e)]=_0x34d37e,this['_threadCommentDataSource']=_0x4788b0,this[_0x2b5387(0x1cb)]();}[_0x1a6f1b(0x1cb)](){const _0x5baae5=_0x1a6f1b;this[_0x5baae5(0x19e)]['dataSource']=this[_0x5baae5(0x1bb)],this[_0x5baae5(0x19e)][_0x5baae5(0x1a2)]=!0x1;}};C=J([y(0x0,M[_0x1a6f1b(0x1c8)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x1a6f1b(0x1e6)],Z=(_0x2d3976,_0x32de77,_0x27e1cd)=>_0x32de77 in _0x2d3976?F(_0x2d3976,_0x32de77,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x27e1cd}):_0x2d3976[_0x32de77]=_0x27e1cd,W=(_0x2eef22,_0x464cf7,_0x4c4f09,_0x408315)=>{const _0x5d1bc5=_0x1a6f1b;for(var _0x524981=_0x408315>0x1?void 0x0:_0x408315?L(_0x464cf7,_0x4c4f09):_0x464cf7,_0x4597c7=_0x2eef22[_0x5d1bc5(0x1f7)]-0x1,_0xcab78a;_0x4597c7>=0x0;_0x4597c7--)(_0xcab78a=_0x2eef22[_0x4597c7])&&(_0x524981=_0xcab78a(_0x524981)||_0x524981);return _0x524981;},O=(_0x2b19ed,_0x3d9d6a)=>(_0x33ca58,_0xd0d7b7)=>_0x3d9d6a(_0x33ca58,_0xd0d7b7,_0x2b19ed),N=(_0x113010,_0x7e3d7c,_0x4871f3)=>Z(_0x113010,typeof _0x7e3d7c!=_0x1a6f1b(0x1f4)?_0x7e3d7c+'':_0x7e3d7c,_0x4871f3);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x3ced79=D,_0x2c0f05,_0x5c6b29){const _0x404331=_0x1a6f1b;super(),this[_0x404331(0x1ed)]=_0x3ced79,this[_0x404331(0x207)]=_0x2c0f05,this[_0x404331(0x1e8)]=_0x5c6b29;const {..._0x483682}=c['merge']({},D,this['_config']);this[_0x404331(0x1e8)][_0x404331(0x1ff)](q,_0x483682);}[_0x1a6f1b(0x1df)](){[[g],[C],[p]]['forEach'](_0x65c04f=>{const _0x3cdb38=_0x1534;this[_0x3cdb38(0x207)][_0x3cdb38(0x1d0)](_0x65c04f);});}[_0x1a6f1b(0x1ea)](){const _0x44fef3=_0x1a6f1b;this[_0x44fef3(0x207)][_0x44fef3(0x1bc)](C),this[_0x44fef3(0x207)]['get'](p);}},N(exports[_0x1a6f1b(0x1ca)],_0x1a6f1b(0x1f0),U),N(exports[_0x1a6f1b(0x1ca)],_0x1a6f1b(0x1ec),c[_0x1a6f1b(0x1a9)]['UNIVER_UNKNOWN']),exports[_0x1a6f1b(0x1ca)]=W([c[_0x1a6f1b(0x198)](j[_0x1a6f1b(0x1e7)],b[_0x1a6f1b(0x1c1)],T['UniverLicensePlugin']),O(0x1,c[_0x1a6f1b(0x1a4)](c[_0x1a6f1b(0x1d4)])),O(0x2,c[_0x1a6f1b(0x1d9)])],exports[_0x1a6f1b(0x1ca)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x166c12=_0x10f6;(function(_0x1a6a5e,_0x24319e){const _0x2e1f0c=_0x10f6,_0xdc54c=_0x1a6a5e();while(!![]){try{const _0x30adae=-parseInt(_0x2e1f0c(0x196))/0x1+parseInt(_0x2e1f0c(0x1f3))/0x2*(parseInt(_0x2e1f0c(0x19a))/0x3)+-parseInt(_0x2e1f0c(0x1ce))/0x4+-parseInt(_0x2e1f0c(0x1a6))/0x5+parseInt(_0x2e1f0c(0x1aa))/0x6+-parseInt(_0x2e1f0c(0x19b))/0x7*(-parseInt(_0x2e1f0c(0x1e7))/0x8)+parseInt(_0x2e1f0c(0x1de))/0x9;if(_0x30adae===_0x24319e)break;else _0xdc54c['push'](_0xdc54c['shift']());}catch(_0x5e5e95){_0xdc54c['push'](_0xdc54c['shift']());}}}(_0x3b23,0xacab1));import{CommentService as _0x25df25,CollaborationSessionService as _0x1cbde6,UniverCollaborationClientPlugin as _0x4b2720}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1bfdd1}from'@univerjs-pro/license';import{dayjs as _0x3cecb5,UserManagerService as _0xc83dbe,Inject as _0x8fdc81,Injector as _0x37caba,Disposable as _0x18908b,CustomRangeType as _0xf7bfe6,UniverInstanceType as _0x4acfe4,DependentOn as _0x648336,IConfigService as _0x4f6915,Plugin as _0x2b8ea1,merge as _0x984593}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a2862}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2fa9d4,IThreadCommentDataSourceService as _0x360ed4}from'@univerjs/thread-comment';function _0x3b23(){const _0x11dc9c=['onReady','user','/universer-api/comment/unit/','addComment','254682RxgyPF','getOwnPropertyDescriptor','Unknown','Solved','18boxwqC','105oewPtB','deleteComment','saveCommentToSnapshot','/solved','comments','error','Edit','slice','customRanges','filter','_sessionService','4760075PzwSIl','_userService','setConfig','find','251904PJVoka','replies','reply','length','addUser','Solve','syncUpdateMutationToColla','Reply','defineProperty','COMMENT','resolved','_threadCommentDataSource','pluginName','_configService','userID','thread-comment-data-source.config','parse','replyId','forEach','_httpService','pipe','subscribe','users','_init','dataSource','unitId','symbol','_threadCommentModel','Delete','_initUserSync','content','/list','get','parentId','Add','threadId','4843388LFUyRx','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','values','root','body','requireSession','rangeId','solved','_injector','type','code','_threadCommentDataSourceService','getUser','format','OpenOrReOpen','11679363tWsTKq','getUnit','stringify','listComments','_config','_commentService','delete','updateComment','/reply','488416kMvqye','onStarting','post','userId','/universer-api/user/list','personId','map','resolveComment','ref','getMemberID','commentUpdate$','getCurrentUser','289774kogfea','createTimestamp','disposeWithMe','size','rangeType','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_initDataSource'];_0x3b23=function(){return _0x11dc9c;};return _0x3b23();}import{bufferTime as _0x51f2cb}from'rxjs';import{HTTPService as _0x57fadc}from'@univerjs/network';const W=_0x166c12(0x1cf);var I=(_0x3b6987=>(_0x3b6987[_0x3b6987[_0x166c12(0x1dd)]=0x0]=_0x166c12(0x1dd),_0x3b6987[_0x3b6987['Solved']=0x1]=_0x166c12(0x199),_0x3b6987[_0x3b6987[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x3b6987))(I||{}),v=(_0x5855b0=>(_0x5855b0[_0x5855b0[_0x166c12(0x198)]=0x0]=_0x166c12(0x198),_0x5855b0[_0x5855b0['Add']=0x1]=_0x166c12(0x1cc),_0x5855b0[_0x5855b0[_0x166c12(0x1b1)]=0x2]=_0x166c12(0x1b1),_0x5855b0[_0x5855b0[_0x166c12(0x1a1)]=0x3]='Edit',_0x5855b0[_0x5855b0[_0x166c12(0x1c6)]=0x4]=_0x166c12(0x1c6),_0x5855b0[_0x5855b0['Solve']=0x5]=_0x166c12(0x1af),_0x5855b0[_0x5855b0[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x5855b0))(v||{});const D=_0x3cd454=>_0x3cecb5(new Date(+_0x3cd454))[_0x166c12(0x1dc)](_0x166c12(0x1f9)),B=async(_0x36e145,_0xb19bb2)=>{const _0x43792d=_0x166c12,_0x4553f7=_0x36e145[_0x43792d(0x1ca)](_0xc83dbe),_0x5a2ed8=_0x36e145[_0x43792d(0x1ca)](_0x57fadc);_0xb19bb2[_0x43792d(0x1bc)](_0x9aba20=>{const _0x2c17f0=_0x43792d;_0x4553f7[_0x2c17f0(0x1db)](_0x9aba20)&&_0xb19bb2[_0x2c17f0(0x1e4)](_0x9aba20);}),_0xb19bb2[_0x43792d(0x1f6)]&&(await _0x5a2ed8[_0x43792d(0x1ca)](_0x43792d(0x1eb),{'params':{'userIDs':[..._0xb19bb2]}}))['body'][_0x43792d(0x1c0)][_0x43792d(0x1bc)](_0x1fa17e=>{const _0x2c68b1=_0x43792d;_0x1fa17e&&_0x4553f7[_0x2c68b1(0x1ae)](_0x1fa17e);});};var K=Object[_0x166c12(0x197)],V=(_0x4d23cd,_0xa427dc,_0x48082a,_0x1c2e22)=>{const _0x2d02d5=_0x166c12;for(var _0x21a7ca=_0x1c2e22>0x1?void 0x0:_0x1c2e22?K(_0xa427dc,_0x48082a):_0xa427dc,_0x10936c=_0x4d23cd[_0x2d02d5(0x1ad)]-0x1,_0x453bbb;_0x10936c>=0x0;_0x10936c--)(_0x453bbb=_0x4d23cd[_0x10936c])&&(_0x21a7ca=_0x453bbb(_0x21a7ca)||_0x21a7ca);return _0x21a7ca;},p=(_0x55630d,_0x37a088)=>(_0x155671,_0x396802)=>_0x37a088(_0x155671,_0x396802,_0x55630d);let S=class extends _0x18908b{constructor(_0x29a138,_0x2106e2,_0x4fcc7e,_0x251864){const _0x3e0b62=_0x166c12;super(),this[_0x3e0b62(0x1e3)]=_0x29a138,this[_0x3e0b62(0x1c5)]=_0x2106e2,this[_0x3e0b62(0x1a7)]=_0x4fcc7e,this[_0x3e0b62(0x1d7)]=_0x251864,this[_0x3e0b62(0x1c1)](),this[_0x3e0b62(0x1c7)]();}[_0x166c12(0x1c7)](){const _0x2c8663=_0x166c12;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x2c8663(0x1be)](_0x51f2cb(0x10))[_0x2c8663(0x1bf)](_0x50bb92=>{const _0x38242d=_0x2c8663,_0x3b47f0=new Set();_0x50bb92[_0x38242d(0x1bc)](_0x7709b4=>{const _0x43aef5=_0x38242d;switch(_0x7709b4[_0x43aef5(0x1d8)]){case'add':{const _0x3f9fa3=_0x7709b4['payload'][_0x43aef5(0x1ec)];_0x3b47f0['add'](_0x3f9fa3);break;}}}),B(this[_0x38242d(0x1d7)],_0x3b47f0);}));}[_0x166c12(0x1c1)](){const _0x24e48e=_0x166c12;this[_0x24e48e(0x1f5)](this[_0x24e48e(0x1e3)][_0x24e48e(0x1f1)][_0x24e48e(0x1bf)](async _0x4f670f=>{const _0x2b94df=_0x24e48e;var _0x46d6ed,_0x5cd8a7,_0x3e5c43,_0x63985b;const _0x887d46=(_0x46d6ed=this[_0x2b94df(0x1c5)][_0x2b94df(0x1df)](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x47934d=>_0x47934d[_0x2b94df(0x1cd)]===_0x4f670f[_0x2b94df(0x1cd)]))==null?void 0x0:_0x46d6ed[_0x2b94df(0x1d2)];if(!_0x887d46)return;const {unitId:_0x30791d,subUnitId:_0x11c418}=_0x887d46;switch(_0x4f670f['user']&&this['_userService'][_0x2b94df(0x1ae)](_0x4f670f['user']),_0x4f670f['type']){case v[_0x2b94df(0x1cc)]:break;case v['Reply']:{this[_0x2b94df(0x1c5)]['addComment'](_0x30791d,_0x11c418,{'unitId':_0x30791d,'subUnitId':_0x11c418,'ref':'','id':_0x4f670f[_0x2b94df(0x1bb)],'dT':D(+_0x4f670f[_0x2b94df(0x1f4)]),'threadId':_0x4f670f[_0x2b94df(0x1cd)],'personId':(_0x3e5c43=(_0x5cd8a7=_0x4f670f[_0x2b94df(0x193)])==null?void 0x0:_0x5cd8a7[_0x2b94df(0x1b8)])!=null?_0x3e5c43:_0x4f670f['userId'],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f[_0x2b94df(0x1c8)]),'parentId':_0x887d46['id']});break;}case v['Delete']:{const _0x352c5b=this[_0x2b94df(0x1c5)][_0x2b94df(0x1d0)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);_0x352c5b&&_0x352c5b[_0x2b94df(0x1cb)]&&this[_0x2b94df(0x1c5)][_0x2b94df(0x19c)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);break;}case v[_0x2b94df(0x1a1)]:{this['_threadCommentModel'][_0x2b94df(0x1e5)](_0x30791d,_0x11c418,{'commentId':_0x4f670f[_0x2b94df(0x1bb)],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f['content'])});break;}case v['Solve']:{const _0x349091=(_0x63985b=this[_0x2b94df(0x1c5)]['getUnit'](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x2e22bd=>_0x2e22bd[_0x2b94df(0x1cd)]===_0x4f670f['threadId']))==null?void 0x0:_0x63985b[_0x2b94df(0x1d2)];_0x349091&&this['_threadCommentModel']['resolveComment'](_0x30791d,_0x11c418,_0x349091['id'],_0x4f670f[_0x2b94df(0x1d6)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x8fdc81(_0x25df25)),p(0x1,_0x8fdc81(_0x2fa9d4)),p(0x2,_0x8fdc81(_0xc83dbe)),p(0x3,_0x8fdc81(_0x37caba))],S);const z=_0x166c12(0x1b9),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x236902,_0x351f7f,_0x1e3934,_0x4045e9)=>{const _0x5c55fa=_0x166c12;for(var _0x25ab4e=_0x4045e9>0x1?void 0x0:_0x4045e9?k(_0x351f7f,_0x1e3934):_0x351f7f,_0x2683be=_0x236902[_0x5c55fa(0x1ad)]-0x1,_0x31e114;_0x2683be>=0x0;_0x2683be--)(_0x31e114=_0x236902[_0x2683be])&&(_0x25ab4e=_0x31e114(_0x25ab4e)||_0x25ab4e);return _0x25ab4e;},_=(_0x125859,_0x5f2eb7)=>(_0x2f76a9,_0x281263)=>_0x5f2eb7(_0x2f76a9,_0x281263,_0x125859);function X(_0x3b08f7,_0x13f5a3){const _0x3183d8=_0x166c12,_0x37241b=_0x3b08f7['replies'][0x0];return{..._0x13f5a3,'id':_0x37241b[_0x3183d8(0x1bb)],'resolved':_0x3b08f7[_0x3183d8(0x1d6)]===0x1,'dT':D(_0x37241b['createTimestamp']),'personId':_0x37241b['userId'],'threadId':_0x37241b[_0x3183d8(0x1cd)]};}function ee(_0x39875d,_0x446a43,_0x730daf){const _0x196f1b=_0x166c12;var _0x4b5366,_0x5b39d7;if(((_0x5b39d7=(_0x4b5366=_0x39875d==null?void 0x0:_0x39875d[_0x196f1b(0x1ab)])==null?void 0x0:_0x4b5366[_0x196f1b(0x1ad)])!=null?_0x5b39d7:0x0)>0x0){const _0x3aaf1a=(_0x3fdef4,_0x1f6668)=>({'id':_0x3fdef4[_0x196f1b(0x1bb)],'threadId':_0x3fdef4[_0x196f1b(0x1cd)],'dT':D(_0x3fdef4[_0x196f1b(0x1f4)]),'personId':_0x3fdef4[_0x196f1b(0x1ea)],'resolved':_0x39875d[_0x196f1b(0x1d6)]===I[_0x196f1b(0x199)],'unitId':_0x446a43,'subUnitId':_0x730daf,'text':JSON[_0x196f1b(0x1ba)](_0x3fdef4[_0x196f1b(0x1c8)]),'parentId':_0x1f6668}),_0x4de25=_0x3aaf1a(_0x39875d[_0x196f1b(0x1ab)][0x0]);return{..._0x4de25,'children':_0x39875d[_0x196f1b(0x1ab)][_0x196f1b(0x1a2)](0x1)[_0x196f1b(0x1ed)](_0x2bda2d=>_0x3aaf1a(_0x2bda2d,_0x4de25['id']))};}return null;}let f=class{constructor(_0x7acca5,_0x3cc23d,_0x252b3e,_0x3160aa){this['_httpService']=_0x7acca5,this['_userService']=_0x3cc23d,this['_sessionService']=_0x252b3e,this['_injector']=_0x3160aa;}async[_0x166c12(0x195)](_0x13047e){const _0x3e8564=_0x166c12;var _0x295c93,_0x223f4f;const {parentId:_0x593255,unitId:_0x404c6d,text:_0x4134fe,threadId:_0xf7c514}=_0x13047e,_0x2f09a9=(_0x223f4f=(_0x295c93=_0x4134fe['customRanges'])==null?void 0x0:_0x295c93[_0x3e8564(0x1a4)](_0x1462bd=>_0x1462bd[_0x3e8564(0x1f7)]===_0xf7bfe6[_0x3e8564(0x1b3)])['map'](_0x4e0a3c=>_0x4e0a3c[_0x3e8564(0x1d5)]))!=null?_0x223f4f:[],_0x2338d5=JSON['stringify'](_0x4134fe),_0x42ad00=(await this[_0x3e8564(0x1a5)][_0x3e8564(0x1d4)](_0x404c6d))[_0x3e8564(0x1f0)]();if(_0x593255){const _0x88937f={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9,'threadId':_0xf7c514},_0x46636e=(await this[_0x3e8564(0x1bd)]['post'](_0x3e8564(0x194)+_0x404c6d+_0x3e8564(0x1e6),{'body':_0x88937f}))[_0x3e8564(0x1d3)][_0x3e8564(0x1ac)];return{..._0x13047e,'id':_0x46636e[_0x3e8564(0x1bb)],'dT':_0x3cecb5(+_0x46636e[_0x3e8564(0x1f4)])[_0x3e8564(0x1dc)](_0x3e8564(0x1f9)),'personId':_0x46636e['userId']};}else{const _0x3484fa={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9},_0x359bdb=await this[_0x3e8564(0x1bd)][_0x3e8564(0x1e9)](_0x3e8564(0x194)+_0x404c6d+'/add',{'body':_0x3484fa});return X(_0x359bdb[_0x3e8564(0x1d3)]['comment'],_0x13047e);}}async[_0x166c12(0x1e5)](_0xb7e253){const _0x1d18a8=_0x166c12;var _0x2a10f0,_0x41f84c;const {text:_0x261ae8,unitId:_0x2c0912}=_0xb7e253,_0x4e98b7=(_0x41f84c=(_0x2a10f0=_0x261ae8[_0x1d18a8(0x1a3)])==null?void 0x0:_0x2a10f0[_0x1d18a8(0x1a4)](_0x4b9621=>_0x4b9621[_0x1d18a8(0x1f7)]===_0xf7bfe6[_0x1d18a8(0x1b3)])[_0x1d18a8(0x1ed)](_0x51d2ef=>_0x51d2ef[_0x1d18a8(0x1d5)]))!=null?_0x41f84c:[],_0x1a323f=JSON[_0x1d18a8(0x1e0)](_0x261ae8),_0x2f4aa7=_0xb7e253[_0x1d18a8(0x1cd)],_0xf016b6=_0xb7e253['id'],_0xaab2ff={'memberId':(await this[_0x1d18a8(0x1a5)][_0x1d18a8(0x1d4)](_0x2c0912))['getMemberID'](),'unitId':_0x2c0912,'threadId':_0x2f4aa7,'mention':_0x4e98b7,'content':_0x1a323f,'replyId':_0xf016b6},_0x451c78=await this[_0x1d18a8(0x1bd)]['post'](_0x1d18a8(0x194)+_0x2c0912+'/edit',{'body':_0xaab2ff});return!_0x451c78[_0x1d18a8(0x1d3)][_0x1d18a8(0x1a0)]||_0x451c78[_0x1d18a8(0x1d3)]['error']['code']===0x1;}async[_0x166c12(0x1ee)](_0x2406e4){const _0x20bb96=_0x166c12,{unitId:_0x35fd9b}=_0x2406e4,_0x20540d=_0x2406e4[_0x20bb96(0x1cd)],_0x402c96={'memberId':this[_0x20bb96(0x1a7)][_0x20bb96(0x1f2)]()['userID'],'unitId':_0x35fd9b,'threadId':_0x20540d,'solved':_0x2406e4[_0x20bb96(0x1b4)]?I[_0x20bb96(0x199)]:I[_0x20bb96(0x1dd)]},_0x4cb16d=await this['_httpService'][_0x20bb96(0x1e9)]('/universer-api/comment/unit/'+_0x35fd9b+_0x20bb96(0x19e),{'body':_0x402c96});return!_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]||_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]['code']===0x1;}async[_0x166c12(0x19c)](_0x4124e3,_0x28a65b,_0xe062f3,_0x5548bd){const _0x57a811=_0x166c12,_0x47a5a0={'memberId':(await this[_0x57a811(0x1a5)][_0x57a811(0x1d4)](_0x4124e3))[_0x57a811(0x1f0)](),'threadId':_0xe062f3,'replyId':_0x5548bd,'unitId':_0x4124e3},_0x16c1c5=await this[_0x57a811(0x1bd)][_0x57a811(0x1e9)](_0x57a811(0x194)+_0x4124e3+'/delete',{'body':_0x47a5a0});return!_0x16c1c5[_0x57a811(0x1d3)]['error']||_0x16c1c5[_0x57a811(0x1d3)][_0x57a811(0x1a0)][_0x57a811(0x1d9)]===0x1;}async[_0x166c12(0x1e1)](_0x3ade55,_0x2746f5,_0x40018a){const _0x35bb43=_0x166c12,_0x18ff18={'unitId':_0x3ade55,'threadId':_0x40018a},_0x599aef=await this[_0x35bb43(0x1bd)][_0x35bb43(0x1e9)](_0x35bb43(0x194)+_0x3ade55+_0x35bb43(0x1c9),{'body':_0x18ff18}),_0x5485d8=_0x40018a['map'](_0x5a5e72=>ee(_0x599aef[_0x35bb43(0x1d3)][_0x35bb43(0x19f)][_0x5a5e72],_0x3ade55,_0x2746f5))[_0x35bb43(0x1a4)](Boolean);return Object[_0x35bb43(0x1d1)](_0x599aef['body'][_0x35bb43(0x1c0)])[_0x35bb43(0x1bc)](_0x649fec=>{const _0x1748d4=_0x35bb43;this[_0x1748d4(0x1a7)]['addUser'](_0x649fec);}),_0x5485d8;}[_0x166c12(0x19d)](_0x26b0fb){const _0xc11efc=_0x166c12;return{'id':_0x26b0fb['id'],'threadId':_0x26b0fb['threadId'],'ref':_0x26b0fb[_0xc11efc(0x1ef)]};}};f=Q([_(0x0,_0x8fdc81(_0x57fadc)),_(0x1,_0x8fdc81(_0xc83dbe)),_(0x2,_0x8fdc81(_0x1cbde6)),_(0x3,_0x8fdc81(_0x37caba))],f);function _0x10f6(_0x2bd15d,_0x137b0f){const _0x3b23c0=_0x3b23();return _0x10f6=function(_0x10f67c,_0xbc0d10){_0x10f67c=_0x10f67c-0x191;let _0x50d7b3=_0x3b23c0[_0x10f67c];return _0x50d7b3;},_0x10f6(_0x2bd15d,_0x137b0f);}var re=Object[_0x166c12(0x197)],te=(_0x291ffd,_0x10ef46,_0x2a468e,_0x1bbc9a)=>{const _0x5b87ed=_0x166c12;for(var _0xd0ef29=_0x1bbc9a>0x1?void 0x0:_0x1bbc9a?re(_0x10ef46,_0x2a468e):_0x10ef46,_0x14e5f6=_0x291ffd[_0x5b87ed(0x1ad)]-0x1,_0x33050f;_0x14e5f6>=0x0;_0x14e5f6--)(_0x33050f=_0x291ffd[_0x14e5f6])&&(_0xd0ef29=_0x33050f(_0xd0ef29)||_0xd0ef29);return _0xd0ef29;},N=(_0x4d2f7b,_0x19b1f8)=>(_0x12a140,_0x38bb8e)=>_0x19b1f8(_0x12a140,_0x38bb8e,_0x4d2f7b);let g=class extends _0x18908b{constructor(_0x3028cd,_0xb3add5){const _0x35c5df=_0x166c12;super(),this['_threadCommentDataSourceService']=_0x3028cd,this['_threadCommentDataSource']=_0xb3add5,this[_0x35c5df(0x191)]();}[_0x166c12(0x191)](){const _0x54824e=_0x166c12;this[_0x54824e(0x1da)][_0x54824e(0x1c2)]=this[_0x54824e(0x1b5)],this[_0x54824e(0x1da)][_0x54824e(0x1b0)]=!0x1;}};g=te([N(0x0,_0x360ed4),N(0x1,_0x8fdc81(f))],g);var se=Object[_0x166c12(0x1b2)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x382198,_0x385d53,_0x504c66)=>_0x385d53 in _0x382198?se(_0x382198,_0x385d53,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x504c66}):_0x382198[_0x385d53]=_0x504c66,ie=(_0x5618b5,_0x4abda7,_0x3b5b9a,_0x4315cf)=>{const _0x4ec47e=_0x166c12;for(var _0x534d0f=_0x4315cf>0x1?void 0x0:_0x4315cf?oe(_0x4abda7,_0x3b5b9a):_0x4abda7,_0x45acdc=_0x5618b5[_0x4ec47e(0x1ad)]-0x1,_0xd5032d;_0x45acdc>=0x0;_0x45acdc--)(_0xd5032d=_0x5618b5[_0x45acdc])&&(_0x534d0f=_0xd5032d(_0x534d0f)||_0x534d0f);return _0x534d0f;},w=(_0x36e1f1,_0x1a0080)=>(_0x14349a,_0xa97861)=>_0x1a0080(_0x14349a,_0xa97861,_0x36e1f1),$=(_0x561fa8,_0x4efdc5,_0x1e05d7)=>ne(_0x561fa8,typeof _0x4efdc5!=_0x166c12(0x1c4)?_0x4efdc5+'':_0x4efdc5,_0x1e05d7);let b=class extends _0x2b8ea1{constructor(_0x114f27=M,_0x560757,_0x133b78){const _0x538311=_0x166c12;super(),this[_0x538311(0x1e2)]=_0x114f27,this[_0x538311(0x1d7)]=_0x560757,this[_0x538311(0x1b7)]=_0x133b78;const {..._0x339ec6}=_0x984593({},M,this[_0x538311(0x1e2)]);this[_0x538311(0x1b7)][_0x538311(0x1a8)](z,_0x339ec6);}[_0x166c12(0x1e8)](){const _0x265e7d=_0x166c12;[[f],[g],[S]][_0x265e7d(0x1bc)](_0x4d52c6=>{const _0x31f9a9=_0x265e7d;this[_0x31f9a9(0x1d7)]['add'](_0x4d52c6);});}[_0x166c12(0x192)](){const _0x45d4c6=_0x166c12;this[_0x45d4c6(0x1d7)][_0x45d4c6(0x1ca)](g),this[_0x45d4c6(0x1d7)]['get'](S);}};$(b,_0x166c12(0x1b6),W),$(b,_0x166c12(0x1d8),_0x4acfe4['UNIVER_UNKNOWN']),b=ie([_0x648336(_0x3a2862,_0x4b2720,_0x1bfdd1),w(0x1,_0x8fdc81(_0x37caba)),w(0x2,_0x4f6915)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1a4f39=_0x3f69;(function(_0x448f0c,_0x4a1b98){const _0x1aa76f=_0x3f69,_0x10b186=_0x448f0c();while(!![]){try{const _0x360528=parseInt(_0x1aa76f(0x1fa))/0x1*(parseInt(_0x1aa76f(0x237))/0x2)+-parseInt(_0x1aa76f(0x211))/0x3*(parseInt(_0x1aa76f(0x1e0))/0x4)+parseInt(_0x1aa76f(0x234))/0x5+-parseInt(_0x1aa76f(0x1fb))/0x6*(-parseInt(_0x1aa76f(0x233))/0x7)+parseInt(_0x1aa76f(0x1dc))/0x8+parseInt(_0x1aa76f(0x1ec))/0x9*(-parseInt(_0x1aa76f(0x20c))/0xa)+parseInt(_0x1aa76f(0x20d))/0xb;if(_0x360528===_0x4a1b98)break;else _0x10b186['push'](_0x10b186['shift']());}catch(_0x323f05){_0x10b186['push'](_0x10b186['shift']());}}}(_0x1abb,0x5c62f));import{CommentService as _0x21648d,CollaborationSessionService as _0x499419,UniverCollaborationClientPlugin as _0xa54819}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ab811}from'@univerjs-pro/license';import{dayjs as _0x2b8e76,UserManagerService as _0x4c5420,Inject as _0x4a6f8f,Injector as _0x207069,Disposable as _0x1f3a56,CustomRangeType as _0x501a89,UniverInstanceType as _0x310c25,DependentOn as _0x2fada2,IConfigService as _0xef0cf5,Plugin as _0x4dc647,merge as _0x4d4e96}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa1e590}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x364cf5,IThreadCommentDataSourceService as _0x5ac943}from'@univerjs/thread-comment';import{bufferTime as _0x4391a3}from'rxjs';import{HTTPService as _0x349c83}from'@univerjs/network';const W=_0x1a4f39(0x22e);var I=(_0x16140d=>(_0x16140d[_0x16140d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x16140d[_0x16140d[_0x1a4f39(0x23d)]=0x1]='Solved',_0x16140d[_0x16140d[_0x1a4f39(0x232)]=-0x1]=_0x1a4f39(0x232),_0x16140d))(I||{}),v=(_0x383bab=>(_0x383bab[_0x383bab[_0x1a4f39(0x1f2)]=0x0]=_0x1a4f39(0x1f2),_0x383bab[_0x383bab['Add']=0x1]='Add',_0x383bab[_0x383bab[_0x1a4f39(0x1e6)]=0x2]=_0x1a4f39(0x1e6),_0x383bab[_0x383bab[_0x1a4f39(0x213)]=0x3]=_0x1a4f39(0x213),_0x383bab[_0x383bab[_0x1a4f39(0x231)]=0x4]=_0x1a4f39(0x231),_0x383bab[_0x383bab[_0x1a4f39(0x20e)]=0x5]='Solve',_0x383bab[_0x383bab['UNRECOGNIZED']=-0x1]=_0x1a4f39(0x232),_0x383bab))(v||{});const D=_0x29709c=>_0x2b8e76(new Date(+_0x29709c))['format'](_0x1a4f39(0x23f)),B=async(_0x4e6447,_0x2711c9)=>{const _0x220d95=_0x1a4f39,_0x2461bb=_0x4e6447['get'](_0x4c5420),_0x2c31d8=_0x4e6447[_0x220d95(0x228)](_0x349c83);_0x2711c9[_0x220d95(0x1de)](_0x45526f=>{const _0x183b33=_0x220d95;_0x2461bb['getUser'](_0x45526f)&&_0x2711c9[_0x183b33(0x1e2)](_0x45526f);}),_0x2711c9[_0x220d95(0x1d9)]&&(await _0x2c31d8[_0x220d95(0x228)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2711c9]}}))['body'][_0x220d95(0x1eb)][_0x220d95(0x1de)](_0x44e857=>{_0x44e857&&_0x2461bb['addUser'](_0x44e857);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1b1b61,_0xe7397e,_0x2d541b,_0x3cd3f8)=>{const _0x4e4788=_0x1a4f39;for(var _0x2a22e3=_0x3cd3f8>0x1?void 0x0:_0x3cd3f8?K(_0xe7397e,_0x2d541b):_0xe7397e,_0x3df3e8=_0x1b1b61[_0x4e4788(0x1da)]-0x1,_0x1af98d;_0x3df3e8>=0x0;_0x3df3e8--)(_0x1af98d=_0x1b1b61[_0x3df3e8])&&(_0x2a22e3=_0x1af98d(_0x2a22e3)||_0x2a22e3);return _0x2a22e3;},p=(_0x25f8b5,_0x3a8d99)=>(_0x28aadb,_0x39f8c0)=>_0x3a8d99(_0x28aadb,_0x39f8c0,_0x25f8b5);let S=class extends _0x1f3a56{constructor(_0xd5d980,_0x2b62cb,_0x1a3a7f,_0x128ae3){const _0x13d225=_0x1a4f39;super(),this[_0x13d225(0x1e3)]=_0xd5d980,this[_0x13d225(0x223)]=_0x2b62cb,this[_0x13d225(0x1e1)]=_0x1a3a7f,this[_0x13d225(0x236)]=_0x128ae3,this[_0x13d225(0x217)](),this[_0x13d225(0x1ff)]();}[_0x1a4f39(0x1ff)](){const _0x383450=_0x1a4f39;this[_0x383450(0x1e5)](this['_threadCommentModel'][_0x383450(0x1dd)][_0x383450(0x224)](_0x4391a3(0x10))[_0x383450(0x22d)](_0x25bd5d=>{const _0x52b826=_0x383450,_0x2e51c1=new Set();_0x25bd5d['forEach'](_0x356646=>{const _0x4f41bf=_0x3f69;switch(_0x356646[_0x4f41bf(0x210)]){case _0x4f41bf(0x23b):{const _0x20f616=_0x356646[_0x4f41bf(0x235)][_0x4f41bf(0x23e)];_0x2e51c1[_0x4f41bf(0x23b)](_0x20f616);break;}}}),B(this[_0x52b826(0x236)],_0x2e51c1);}));}[_0x1a4f39(0x217)](){const _0x48de07=_0x1a4f39;this['disposeWithMe'](this[_0x48de07(0x1e3)][_0x48de07(0x1dd)][_0x48de07(0x22d)](async _0x38f520=>{const _0x3ad472=_0x48de07;var _0xb323ae,_0x1b95ca,_0x1e2f22,_0x4edfab;const _0x462854=(_0xb323ae=this['_threadCommentModel'][_0x3ad472(0x1db)](_0x38f520['unitId'])[_0x3ad472(0x21f)](_0x472813=>_0x472813['threadId']===_0x38f520[_0x3ad472(0x20b)]))==null?void 0x0:_0xb323ae[_0x3ad472(0x1f7)];if(!_0x462854)return;const {unitId:_0x54045d,subUnitId:_0x2e4715}=_0x462854;switch(_0x38f520[_0x3ad472(0x240)]&&this[_0x3ad472(0x1e1)][_0x3ad472(0x230)](_0x38f520['user']),_0x38f520['type']){case v[_0x3ad472(0x1f0)]:break;case v[_0x3ad472(0x1e6)]:{this['_threadCommentModel'][_0x3ad472(0x229)](_0x54045d,_0x2e4715,{'unitId':_0x54045d,'subUnitId':_0x2e4715,'ref':'','id':_0x38f520[_0x3ad472(0x227)],'dT':D(+_0x38f520[_0x3ad472(0x212)]),'threadId':_0x38f520['threadId'],'personId':(_0x1e2f22=(_0x1b95ca=_0x38f520[_0x3ad472(0x240)])==null?void 0x0:_0x1b95ca['userID'])!=null?_0x1e2f22:_0x38f520[_0x3ad472(0x214)],'text':JSON[_0x3ad472(0x208)](_0x38f520[_0x3ad472(0x20f)]),'parentId':_0x462854['id']});break;}case v[_0x3ad472(0x231)]:{const _0x1de659=this[_0x3ad472(0x223)]['getComment'](_0x54045d,_0x2e4715,_0x38f520['replyId']);_0x1de659&&_0x1de659[_0x3ad472(0x1fd)]&&this[_0x3ad472(0x223)][_0x3ad472(0x22b)](_0x54045d,_0x2e4715,_0x38f520[_0x3ad472(0x227)]);break;}case v[_0x3ad472(0x213)]:{this[_0x3ad472(0x223)][_0x3ad472(0x206)](_0x54045d,_0x2e4715,{'commentId':_0x38f520['replyId'],'text':JSON[_0x3ad472(0x208)](_0x38f520[_0x3ad472(0x20f)])});break;}case v[_0x3ad472(0x20e)]:{const _0x168a89=(_0x4edfab=this['_threadCommentModel'][_0x3ad472(0x1db)](_0x38f520[_0x3ad472(0x21a)])[_0x3ad472(0x21f)](_0x10affe=>_0x10affe[_0x3ad472(0x20b)]===_0x38f520[_0x3ad472(0x20b)]))==null?void 0x0:_0x4edfab[_0x3ad472(0x1f7)];_0x168a89&&this[_0x3ad472(0x223)]['resolveComment'](_0x54045d,_0x2e4715,_0x168a89['id'],_0x38f520['solved']===I[_0x3ad472(0x23d)]);break;}}}));}};S=V([p(0x0,_0x4a6f8f(_0x21648d)),p(0x1,_0x4a6f8f(_0x364cf5)),p(0x2,_0x4a6f8f(_0x4c5420)),p(0x3,_0x4a6f8f(_0x207069))],S);const z=_0x1a4f39(0x23c),M={};var k=Object[_0x1a4f39(0x23a)],Q=(_0xb18e31,_0x28f269,_0x1bc98d,_0x58a842)=>{const _0x5b37f3=_0x1a4f39;for(var _0x1445e9=_0x58a842>0x1?void 0x0:_0x58a842?k(_0x28f269,_0x1bc98d):_0x28f269,_0x363065=_0xb18e31[_0x5b37f3(0x1da)]-0x1,_0x4e8e80;_0x363065>=0x0;_0x363065--)(_0x4e8e80=_0xb18e31[_0x363065])&&(_0x1445e9=_0x4e8e80(_0x1445e9)||_0x1445e9);return _0x1445e9;},_=(_0x300f41,_0x5d7410)=>(_0x26ade8,_0x2474dd)=>_0x5d7410(_0x26ade8,_0x2474dd,_0x300f41);function X(_0xf357f3,_0x2d4351){const _0xf5705a=_0x1a4f39,_0x46ec63=_0xf357f3['replies'][0x0];return{..._0x2d4351,'id':_0x46ec63['replyId'],'resolved':_0xf357f3[_0xf5705a(0x21e)]===0x1,'dT':D(_0x46ec63[_0xf5705a(0x212)]),'personId':_0x46ec63['userId'],'threadId':_0x46ec63['threadId']};}function ee(_0x52dc3a,_0x5f2cea,_0x5107f7){const _0x3a4c37=_0x1a4f39;var _0x539e0a,_0x1db9a2;if(((_0x1db9a2=(_0x539e0a=_0x52dc3a==null?void 0x0:_0x52dc3a[_0x3a4c37(0x221)])==null?void 0x0:_0x539e0a[_0x3a4c37(0x1da)])!=null?_0x1db9a2:0x0)>0x0){const _0x44f629=(_0x217fb9,_0x1eaa0c)=>({'id':_0x217fb9[_0x3a4c37(0x227)],'threadId':_0x217fb9[_0x3a4c37(0x20b)],'dT':D(_0x217fb9['createTimestamp']),'personId':_0x217fb9['userId'],'resolved':_0x52dc3a[_0x3a4c37(0x21e)]===I[_0x3a4c37(0x23d)],'unitId':_0x5f2cea,'subUnitId':_0x5107f7,'text':JSON[_0x3a4c37(0x208)](_0x217fb9[_0x3a4c37(0x20f)]),'parentId':_0x1eaa0c}),_0x4903d7=_0x44f629(_0x52dc3a[_0x3a4c37(0x221)][0x0]);return{..._0x4903d7,'children':_0x52dc3a['replies'][_0x3a4c37(0x1f8)](0x1)[_0x3a4c37(0x1f9)](_0x3f4073=>_0x44f629(_0x3f4073,_0x4903d7['id']))};}return null;}let f=class{constructor(_0x303b56,_0x1673ba,_0x292d56,_0x286c30){const _0x52747d=_0x1a4f39;this[_0x52747d(0x222)]=_0x303b56,this[_0x52747d(0x1e1)]=_0x1673ba,this[_0x52747d(0x216)]=_0x292d56,this['_injector']=_0x286c30;}async[_0x1a4f39(0x229)](_0x1ff44e){const _0x12ddd0=_0x1a4f39;var _0x38521f,_0x20b866;const {parentId:_0x351793,unitId:_0x55780f,text:_0x1a5f7b,threadId:_0x25128a}=_0x1ff44e,_0x30a65c=(_0x20b866=(_0x38521f=_0x1a5f7b[_0x12ddd0(0x219)])==null?void 0x0:_0x38521f[_0x12ddd0(0x1f1)](_0x5ecb74=>_0x5ecb74[_0x12ddd0(0x21d)]===_0x501a89['COMMENT'])[_0x12ddd0(0x1f9)](_0x468fcf=>_0x468fcf['rangeId']))!=null?_0x20b866:[],_0x16112c=JSON['stringify'](_0x1a5f7b),_0x340d85=(await this[_0x12ddd0(0x216)][_0x12ddd0(0x1f6)](_0x55780f))[_0x12ddd0(0x218)]();if(_0x351793){const _0x3621ba={'memberId':_0x340d85,'unitId':_0x55780f,'content':_0x16112c,'mention':_0x30a65c,'threadId':_0x25128a},_0x3a7f61=(await this['_httpService'][_0x12ddd0(0x1f5)]('/universer-api/comment/unit/'+_0x55780f+'/reply',{'body':_0x3621ba}))[_0x12ddd0(0x1e8)][_0x12ddd0(0x1ef)];return{..._0x1ff44e,'id':_0x3a7f61[_0x12ddd0(0x227)],'dT':_0x2b8e76(+_0x3a7f61[_0x12ddd0(0x212)])['format'](_0x12ddd0(0x23f)),'personId':_0x3a7f61[_0x12ddd0(0x214)]};}else{const _0x8ca7f4={'memberId':_0x340d85,'unitId':_0x55780f,'content':_0x16112c,'mention':_0x30a65c},_0x1f3898=await this[_0x12ddd0(0x222)][_0x12ddd0(0x1f5)]('/universer-api/comment/unit/'+_0x55780f+_0x12ddd0(0x209),{'body':_0x8ca7f4});return X(_0x1f3898['body'][_0x12ddd0(0x1ee)],_0x1ff44e);}}async[_0x1a4f39(0x206)](_0x4cb473){const _0x589dc1=_0x1a4f39;var _0x43e6d8,_0x4f45db;const {text:_0x28e08a,unitId:_0x4755af}=_0x4cb473,_0x275731=(_0x4f45db=(_0x43e6d8=_0x28e08a[_0x589dc1(0x219)])==null?void 0x0:_0x43e6d8[_0x589dc1(0x1f1)](_0x1763e6=>_0x1763e6[_0x589dc1(0x21d)]===_0x501a89[_0x589dc1(0x1df)])[_0x589dc1(0x1f9)](_0x2ee045=>_0x2ee045['rangeId']))!=null?_0x4f45db:[],_0x27ef4d=JSON['stringify'](_0x28e08a),_0x3ef281=_0x4cb473[_0x589dc1(0x20b)],_0x232235=_0x4cb473['id'],_0x1f92fe={'memberId':(await this['_sessionService'][_0x589dc1(0x1f6)](_0x4755af))['getMemberID'](),'unitId':_0x4755af,'threadId':_0x3ef281,'mention':_0x275731,'content':_0x27ef4d,'replyId':_0x232235},_0x1587aa=await this[_0x589dc1(0x222)][_0x589dc1(0x1f5)](_0x589dc1(0x201)+_0x4755af+'/edit',{'body':_0x1f92fe});return!_0x1587aa[_0x589dc1(0x1e8)]['error']||_0x1587aa[_0x589dc1(0x1e8)][_0x589dc1(0x203)][_0x589dc1(0x200)]===0x1;}async[_0x1a4f39(0x225)](_0x54eb4b){const _0x509bab=_0x1a4f39,{unitId:_0x4d2778}=_0x54eb4b,_0x3bdba3=_0x54eb4b['threadId'],_0x46ce71={'memberId':this[_0x509bab(0x1e1)][_0x509bab(0x226)]()[_0x509bab(0x22c)],'unitId':_0x4d2778,'threadId':_0x3bdba3,'solved':_0x54eb4b[_0x509bab(0x205)]?I[_0x509bab(0x23d)]:I[_0x509bab(0x1f4)]},_0x2c4237=await this[_0x509bab(0x222)][_0x509bab(0x1f5)](_0x509bab(0x201)+_0x4d2778+_0x509bab(0x20a),{'body':_0x46ce71});return!_0x2c4237['body'][_0x509bab(0x203)]||_0x2c4237[_0x509bab(0x1e8)][_0x509bab(0x203)][_0x509bab(0x200)]===0x1;}async['deleteComment'](_0xc0331c,_0x792ccc,_0x344c50,_0x3e48bd){const _0x509962=_0x1a4f39,_0x3e15ff={'memberId':(await this[_0x509962(0x216)][_0x509962(0x1f6)](_0xc0331c))[_0x509962(0x218)](),'threadId':_0x344c50,'replyId':_0x3e48bd,'unitId':_0xc0331c},_0x6cf676=await this[_0x509962(0x222)][_0x509962(0x1f5)](_0x509962(0x201)+_0xc0331c+_0x509962(0x1fe),{'body':_0x3e15ff});return!_0x6cf676[_0x509962(0x1e8)][_0x509962(0x203)]||_0x6cf676[_0x509962(0x1e8)][_0x509962(0x203)][_0x509962(0x200)]===0x1;}async[_0x1a4f39(0x1e4)](_0x1ef227,_0x4b4f34,_0x4cdbf5){const _0x1e5764=_0x1a4f39,_0x1b4d17={'unitId':_0x1ef227,'threadId':_0x4cdbf5},_0x181a90=await this[_0x1e5764(0x222)][_0x1e5764(0x1f5)]('/universer-api/comment/unit/'+_0x1ef227+_0x1e5764(0x204),{'body':_0x1b4d17}),_0x510547=_0x4cdbf5[_0x1e5764(0x1f9)](_0x3aca8f=>ee(_0x181a90[_0x1e5764(0x1e8)][_0x1e5764(0x215)][_0x3aca8f],_0x1ef227,_0x4b4f34))[_0x1e5764(0x1f1)](Boolean);return Object[_0x1e5764(0x239)](_0x181a90[_0x1e5764(0x1e8)][_0x1e5764(0x1eb)])[_0x1e5764(0x1de)](_0x20ab6d=>{const _0x4ff48a=_0x1e5764;this['_userService'][_0x4ff48a(0x230)](_0x20ab6d);}),_0x510547;}[_0x1a4f39(0x1e9)](_0x2d7f34){const _0x5a50fe=_0x1a4f39;return{'id':_0x2d7f34['id'],'threadId':_0x2d7f34[_0x5a50fe(0x20b)],'ref':_0x2d7f34['ref']};}};f=Q([_(0x0,_0x4a6f8f(_0x349c83)),_(0x1,_0x4a6f8f(_0x4c5420)),_(0x2,_0x4a6f8f(_0x499419)),_(0x3,_0x4a6f8f(_0x207069))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x581473,_0x384b7c,_0x172561,_0x32ff18)=>{const _0x30c93e=_0x1a4f39;for(var _0x23d7de=_0x32ff18>0x1?void 0x0:_0x32ff18?re(_0x384b7c,_0x172561):_0x384b7c,_0x3721ac=_0x581473[_0x30c93e(0x1da)]-0x1,_0x52cc24;_0x3721ac>=0x0;_0x3721ac--)(_0x52cc24=_0x581473[_0x3721ac])&&(_0x23d7de=_0x52cc24(_0x23d7de)||_0x23d7de);return _0x23d7de;},N=(_0x21c2a9,_0x31b8f0)=>(_0x52dfa0,_0x49dde3)=>_0x31b8f0(_0x52dfa0,_0x49dde3,_0x21c2a9);let g=class extends _0x1f3a56{constructor(_0x15c270,_0x54ff68){const _0x12b771=_0x1a4f39;super(),this[_0x12b771(0x22a)]=_0x15c270,this[_0x12b771(0x1f3)]=_0x54ff68,this['_initDataSource']();}['_initDataSource'](){const _0x4577ea=_0x1a4f39;this[_0x4577ea(0x22a)][_0x4577ea(0x21c)]=this[_0x4577ea(0x1f3)],this['_threadCommentDataSourceService'][_0x4577ea(0x202)]=!0x1;}};g=te([N(0x0,_0x5ac943),N(0x1,_0x4a6f8f(f))],g);function _0x3f69(_0x23781f,_0x1a9ccf){const _0x1abb49=_0x1abb();return _0x3f69=function(_0x3f69e0,_0x34d682){_0x3f69e0=_0x3f69e0-0x1d9;let _0x490d19=_0x1abb49[_0x3f69e0];return _0x490d19;},_0x3f69(_0x23781f,_0x1a9ccf);}var se=Object[_0x1a4f39(0x1ea)],oe=Object[_0x1a4f39(0x23a)],ne=(_0x15b297,_0x274258,_0x169842)=>_0x274258 in _0x15b297?se(_0x15b297,_0x274258,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x169842}):_0x15b297[_0x274258]=_0x169842,ie=(_0x77843e,_0x380d20,_0x543fde,_0x1ed95c)=>{const _0x4ec5c1=_0x1a4f39;for(var _0x195059=_0x1ed95c>0x1?void 0x0:_0x1ed95c?oe(_0x380d20,_0x543fde):_0x380d20,_0x3bf36f=_0x77843e[_0x4ec5c1(0x1da)]-0x1,_0x58067e;_0x3bf36f>=0x0;_0x3bf36f--)(_0x58067e=_0x77843e[_0x3bf36f])&&(_0x195059=_0x58067e(_0x195059)||_0x195059);return _0x195059;},w=(_0x53ddf1,_0x22549f)=>(_0x21a43a,_0x59ece9)=>_0x22549f(_0x21a43a,_0x59ece9,_0x53ddf1),$=(_0x5c19cc,_0x22360f,_0x4d098b)=>ne(_0x5c19cc,typeof _0x22360f!=_0x1a4f39(0x21b)?_0x22360f+'':_0x22360f,_0x4d098b);let b=class extends _0x4dc647{constructor(_0x34cd7a=M,_0xc7c2bc,_0x36ee49){const _0x45c7e3=_0x1a4f39;super(),this[_0x45c7e3(0x22f)]=_0x34cd7a,this['_injector']=_0xc7c2bc,this[_0x45c7e3(0x220)]=_0x36ee49;const {..._0x6e6bb8}=_0x4d4e96({},M,this[_0x45c7e3(0x22f)]);this[_0x45c7e3(0x220)][_0x45c7e3(0x207)](z,_0x6e6bb8);}[_0x1a4f39(0x1e7)](){const _0x1d4dd5=_0x1a4f39;[[f],[g],[S]][_0x1d4dd5(0x1de)](_0x29a198=>{const _0x43f866=_0x1d4dd5;this[_0x43f866(0x236)]['add'](_0x29a198);});}[_0x1a4f39(0x238)](){const _0x4b63e9=_0x1a4f39;this[_0x4b63e9(0x236)][_0x4b63e9(0x228)](g),this[_0x4b63e9(0x236)][_0x4b63e9(0x228)](S);}};$(b,_0x1a4f39(0x1ed),W),$(b,_0x1a4f39(0x210),_0x310c25[_0x1a4f39(0x1fc)]),b=ie([_0x2fada2(_0xa1e590,_0xa54819,_0x4ab811),w(0x1,_0x4a6f8f(_0x207069)),w(0x2,_0xef0cf5)],b);function _0x1abb(){const _0x496063=['comments','_sessionService','_init','getMemberID','customRanges','unitId','symbol','dataSource','rangeType','solved','find','_configService','replies','_httpService','_threadCommentModel','pipe','resolveComment','getCurrentUser','replyId','get','addComment','_threadCommentDataSourceService','deleteComment','userID','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','addUser','Delete','UNRECOGNIZED','7QAJHbA','2227240vdsdkG','payload','_injector','44oexIpt','onReady','values','getOwnPropertyDescriptor','add','thread-comment-data-source.config','Solved','personId','YYYY/MM/DD\x20HH:mm','user','size','length','getUnit','653128ZHTpSi','commentUpdate$','forEach','COMMENT','52RzjLnA','_userService','delete','_commentService','listComments','disposeWithMe','Reply','onStarting','body','saveCommentToSnapshot','defineProperty','users','124353PQsaNr','pluginName','comment','reply','Add','filter','Unknown','_threadCommentDataSource','OpenOrReOpen','post','requireSession','root','slice','map','7841rJdjFE','3662466XRgjNQ','UNIVER_UNKNOWN','parentId','/delete','_initUserSync','code','/universer-api/comment/unit/','syncUpdateMutationToColla','error','/list','resolved','updateComment','setConfig','parse','/add','/solved','threadId','430eziQup','676511ZomDhE','Solve','content','type','92067PHtjXf','createTimestamp','Edit','userId'];_0x1abb=function(){return _0x496063;};return _0x1abb();}export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x166c12=_0x10f6;(function(_0x1a6a5e,_0x24319e){const _0x2e1f0c=_0x10f6,_0xdc54c=_0x1a6a5e();while(!![]){try{const _0x30adae=-parseInt(_0x2e1f0c(0x196))/0x1+parseInt(_0x2e1f0c(0x1f3))/0x2*(parseInt(_0x2e1f0c(0x19a))/0x3)+-parseInt(_0x2e1f0c(0x1ce))/0x4+-parseInt(_0x2e1f0c(0x1a6))/0x5+parseInt(_0x2e1f0c(0x1aa))/0x6+-parseInt(_0x2e1f0c(0x19b))/0x7*(-parseInt(_0x2e1f0c(0x1e7))/0x8)+parseInt(_0x2e1f0c(0x1de))/0x9;if(_0x30adae===_0x24319e)break;else _0xdc54c['push'](_0xdc54c['shift']());}catch(_0x5e5e95){_0xdc54c['push'](_0xdc54c['shift']());}}}(_0x3b23,0xacab1));import{CommentService as _0x25df25,CollaborationSessionService as _0x1cbde6,UniverCollaborationClientPlugin as _0x4b2720}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1bfdd1}from'@univerjs-pro/license';import{dayjs as _0x3cecb5,UserManagerService as _0xc83dbe,Inject as _0x8fdc81,Injector as _0x37caba,Disposable as _0x18908b,CustomRangeType as _0xf7bfe6,UniverInstanceType as _0x4acfe4,DependentOn as _0x648336,IConfigService as _0x4f6915,Plugin as _0x2b8ea1,merge as _0x984593}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a2862}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2fa9d4,IThreadCommentDataSourceService as _0x360ed4}from'@univerjs/thread-comment';function _0x3b23(){const _0x11dc9c=['onReady','user','/universer-api/comment/unit/','addComment','254682RxgyPF','getOwnPropertyDescriptor','Unknown','Solved','18boxwqC','105oewPtB','deleteComment','saveCommentToSnapshot','/solved','comments','error','Edit','slice','customRanges','filter','_sessionService','4760075PzwSIl','_userService','setConfig','find','251904PJVoka','replies','reply','length','addUser','Solve','syncUpdateMutationToColla','Reply','defineProperty','COMMENT','resolved','_threadCommentDataSource','pluginName','_configService','userID','thread-comment-data-source.config','parse','replyId','forEach','_httpService','pipe','subscribe','users','_init','dataSource','unitId','symbol','_threadCommentModel','Delete','_initUserSync','content','/list','get','parentId','Add','threadId','4843388LFUyRx','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','values','root','body','requireSession','rangeId','solved','_injector','type','code','_threadCommentDataSourceService','getUser','format','OpenOrReOpen','11679363tWsTKq','getUnit','stringify','listComments','_config','_commentService','delete','updateComment','/reply','488416kMvqye','onStarting','post','userId','/universer-api/user/list','personId','map','resolveComment','ref','getMemberID','commentUpdate$','getCurrentUser','289774kogfea','createTimestamp','disposeWithMe','size','rangeType','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_initDataSource'];_0x3b23=function(){return _0x11dc9c;};return _0x3b23();}import{bufferTime as _0x51f2cb}from'rxjs';import{HTTPService as _0x57fadc}from'@univerjs/network';const W=_0x166c12(0x1cf);var I=(_0x3b6987=>(_0x3b6987[_0x3b6987[_0x166c12(0x1dd)]=0x0]=_0x166c12(0x1dd),_0x3b6987[_0x3b6987['Solved']=0x1]=_0x166c12(0x199),_0x3b6987[_0x3b6987[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x3b6987))(I||{}),v=(_0x5855b0=>(_0x5855b0[_0x5855b0[_0x166c12(0x198)]=0x0]=_0x166c12(0x198),_0x5855b0[_0x5855b0['Add']=0x1]=_0x166c12(0x1cc),_0x5855b0[_0x5855b0[_0x166c12(0x1b1)]=0x2]=_0x166c12(0x1b1),_0x5855b0[_0x5855b0[_0x166c12(0x1a1)]=0x3]='Edit',_0x5855b0[_0x5855b0[_0x166c12(0x1c6)]=0x4]=_0x166c12(0x1c6),_0x5855b0[_0x5855b0['Solve']=0x5]=_0x166c12(0x1af),_0x5855b0[_0x5855b0[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x5855b0))(v||{});const D=_0x3cd454=>_0x3cecb5(new Date(+_0x3cd454))[_0x166c12(0x1dc)](_0x166c12(0x1f9)),B=async(_0x36e145,_0xb19bb2)=>{const _0x43792d=_0x166c12,_0x4553f7=_0x36e145[_0x43792d(0x1ca)](_0xc83dbe),_0x5a2ed8=_0x36e145[_0x43792d(0x1ca)](_0x57fadc);_0xb19bb2[_0x43792d(0x1bc)](_0x9aba20=>{const _0x2c17f0=_0x43792d;_0x4553f7[_0x2c17f0(0x1db)](_0x9aba20)&&_0xb19bb2[_0x2c17f0(0x1e4)](_0x9aba20);}),_0xb19bb2[_0x43792d(0x1f6)]&&(await _0x5a2ed8[_0x43792d(0x1ca)](_0x43792d(0x1eb),{'params':{'userIDs':[..._0xb19bb2]}}))['body'][_0x43792d(0x1c0)][_0x43792d(0x1bc)](_0x1fa17e=>{const _0x2c68b1=_0x43792d;_0x1fa17e&&_0x4553f7[_0x2c68b1(0x1ae)](_0x1fa17e);});};var K=Object[_0x166c12(0x197)],V=(_0x4d23cd,_0xa427dc,_0x48082a,_0x1c2e22)=>{const _0x2d02d5=_0x166c12;for(var _0x21a7ca=_0x1c2e22>0x1?void 0x0:_0x1c2e22?K(_0xa427dc,_0x48082a):_0xa427dc,_0x10936c=_0x4d23cd[_0x2d02d5(0x1ad)]-0x1,_0x453bbb;_0x10936c>=0x0;_0x10936c--)(_0x453bbb=_0x4d23cd[_0x10936c])&&(_0x21a7ca=_0x453bbb(_0x21a7ca)||_0x21a7ca);return _0x21a7ca;},p=(_0x55630d,_0x37a088)=>(_0x155671,_0x396802)=>_0x37a088(_0x155671,_0x396802,_0x55630d);let S=class extends _0x18908b{constructor(_0x29a138,_0x2106e2,_0x4fcc7e,_0x251864){const _0x3e0b62=_0x166c12;super(),this[_0x3e0b62(0x1e3)]=_0x29a138,this[_0x3e0b62(0x1c5)]=_0x2106e2,this[_0x3e0b62(0x1a7)]=_0x4fcc7e,this[_0x3e0b62(0x1d7)]=_0x251864,this[_0x3e0b62(0x1c1)](),this[_0x3e0b62(0x1c7)]();}[_0x166c12(0x1c7)](){const _0x2c8663=_0x166c12;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x2c8663(0x1be)](_0x51f2cb(0x10))[_0x2c8663(0x1bf)](_0x50bb92=>{const _0x38242d=_0x2c8663,_0x3b47f0=new Set();_0x50bb92[_0x38242d(0x1bc)](_0x7709b4=>{const _0x43aef5=_0x38242d;switch(_0x7709b4[_0x43aef5(0x1d8)]){case'add':{const _0x3f9fa3=_0x7709b4['payload'][_0x43aef5(0x1ec)];_0x3b47f0['add'](_0x3f9fa3);break;}}}),B(this[_0x38242d(0x1d7)],_0x3b47f0);}));}[_0x166c12(0x1c1)](){const _0x24e48e=_0x166c12;this[_0x24e48e(0x1f5)](this[_0x24e48e(0x1e3)][_0x24e48e(0x1f1)][_0x24e48e(0x1bf)](async _0x4f670f=>{const _0x2b94df=_0x24e48e;var _0x46d6ed,_0x5cd8a7,_0x3e5c43,_0x63985b;const _0x887d46=(_0x46d6ed=this[_0x2b94df(0x1c5)][_0x2b94df(0x1df)](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x47934d=>_0x47934d[_0x2b94df(0x1cd)]===_0x4f670f[_0x2b94df(0x1cd)]))==null?void 0x0:_0x46d6ed[_0x2b94df(0x1d2)];if(!_0x887d46)return;const {unitId:_0x30791d,subUnitId:_0x11c418}=_0x887d46;switch(_0x4f670f['user']&&this['_userService'][_0x2b94df(0x1ae)](_0x4f670f['user']),_0x4f670f['type']){case v[_0x2b94df(0x1cc)]:break;case v['Reply']:{this[_0x2b94df(0x1c5)]['addComment'](_0x30791d,_0x11c418,{'unitId':_0x30791d,'subUnitId':_0x11c418,'ref':'','id':_0x4f670f[_0x2b94df(0x1bb)],'dT':D(+_0x4f670f[_0x2b94df(0x1f4)]),'threadId':_0x4f670f[_0x2b94df(0x1cd)],'personId':(_0x3e5c43=(_0x5cd8a7=_0x4f670f[_0x2b94df(0x193)])==null?void 0x0:_0x5cd8a7[_0x2b94df(0x1b8)])!=null?_0x3e5c43:_0x4f670f['userId'],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f[_0x2b94df(0x1c8)]),'parentId':_0x887d46['id']});break;}case v['Delete']:{const _0x352c5b=this[_0x2b94df(0x1c5)][_0x2b94df(0x1d0)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);_0x352c5b&&_0x352c5b[_0x2b94df(0x1cb)]&&this[_0x2b94df(0x1c5)][_0x2b94df(0x19c)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);break;}case v[_0x2b94df(0x1a1)]:{this['_threadCommentModel'][_0x2b94df(0x1e5)](_0x30791d,_0x11c418,{'commentId':_0x4f670f[_0x2b94df(0x1bb)],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f['content'])});break;}case v['Solve']:{const _0x349091=(_0x63985b=this[_0x2b94df(0x1c5)]['getUnit'](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x2e22bd=>_0x2e22bd[_0x2b94df(0x1cd)]===_0x4f670f['threadId']))==null?void 0x0:_0x63985b[_0x2b94df(0x1d2)];_0x349091&&this['_threadCommentModel']['resolveComment'](_0x30791d,_0x11c418,_0x349091['id'],_0x4f670f[_0x2b94df(0x1d6)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x8fdc81(_0x25df25)),p(0x1,_0x8fdc81(_0x2fa9d4)),p(0x2,_0x8fdc81(_0xc83dbe)),p(0x3,_0x8fdc81(_0x37caba))],S);const z=_0x166c12(0x1b9),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x236902,_0x351f7f,_0x1e3934,_0x4045e9)=>{const _0x5c55fa=_0x166c12;for(var _0x25ab4e=_0x4045e9>0x1?void 0x0:_0x4045e9?k(_0x351f7f,_0x1e3934):_0x351f7f,_0x2683be=_0x236902[_0x5c55fa(0x1ad)]-0x1,_0x31e114;_0x2683be>=0x0;_0x2683be--)(_0x31e114=_0x236902[_0x2683be])&&(_0x25ab4e=_0x31e114(_0x25ab4e)||_0x25ab4e);return _0x25ab4e;},_=(_0x125859,_0x5f2eb7)=>(_0x2f76a9,_0x281263)=>_0x5f2eb7(_0x2f76a9,_0x281263,_0x125859);function X(_0x3b08f7,_0x13f5a3){const _0x3183d8=_0x166c12,_0x37241b=_0x3b08f7['replies'][0x0];return{..._0x13f5a3,'id':_0x37241b[_0x3183d8(0x1bb)],'resolved':_0x3b08f7[_0x3183d8(0x1d6)]===0x1,'dT':D(_0x37241b['createTimestamp']),'personId':_0x37241b['userId'],'threadId':_0x37241b[_0x3183d8(0x1cd)]};}function ee(_0x39875d,_0x446a43,_0x730daf){const _0x196f1b=_0x166c12;var _0x4b5366,_0x5b39d7;if(((_0x5b39d7=(_0x4b5366=_0x39875d==null?void 0x0:_0x39875d[_0x196f1b(0x1ab)])==null?void 0x0:_0x4b5366[_0x196f1b(0x1ad)])!=null?_0x5b39d7:0x0)>0x0){const _0x3aaf1a=(_0x3fdef4,_0x1f6668)=>({'id':_0x3fdef4[_0x196f1b(0x1bb)],'threadId':_0x3fdef4[_0x196f1b(0x1cd)],'dT':D(_0x3fdef4[_0x196f1b(0x1f4)]),'personId':_0x3fdef4[_0x196f1b(0x1ea)],'resolved':_0x39875d[_0x196f1b(0x1d6)]===I[_0x196f1b(0x199)],'unitId':_0x446a43,'subUnitId':_0x730daf,'text':JSON[_0x196f1b(0x1ba)](_0x3fdef4[_0x196f1b(0x1c8)]),'parentId':_0x1f6668}),_0x4de25=_0x3aaf1a(_0x39875d[_0x196f1b(0x1ab)][0x0]);return{..._0x4de25,'children':_0x39875d[_0x196f1b(0x1ab)][_0x196f1b(0x1a2)](0x1)[_0x196f1b(0x1ed)](_0x2bda2d=>_0x3aaf1a(_0x2bda2d,_0x4de25['id']))};}return null;}let f=class{constructor(_0x7acca5,_0x3cc23d,_0x252b3e,_0x3160aa){this['_httpService']=_0x7acca5,this['_userService']=_0x3cc23d,this['_sessionService']=_0x252b3e,this['_injector']=_0x3160aa;}async[_0x166c12(0x195)](_0x13047e){const _0x3e8564=_0x166c12;var _0x295c93,_0x223f4f;const {parentId:_0x593255,unitId:_0x404c6d,text:_0x4134fe,threadId:_0xf7c514}=_0x13047e,_0x2f09a9=(_0x223f4f=(_0x295c93=_0x4134fe['customRanges'])==null?void 0x0:_0x295c93[_0x3e8564(0x1a4)](_0x1462bd=>_0x1462bd[_0x3e8564(0x1f7)]===_0xf7bfe6[_0x3e8564(0x1b3)])['map'](_0x4e0a3c=>_0x4e0a3c[_0x3e8564(0x1d5)]))!=null?_0x223f4f:[],_0x2338d5=JSON['stringify'](_0x4134fe),_0x42ad00=(await this[_0x3e8564(0x1a5)][_0x3e8564(0x1d4)](_0x404c6d))[_0x3e8564(0x1f0)]();if(_0x593255){const _0x88937f={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9,'threadId':_0xf7c514},_0x46636e=(await this[_0x3e8564(0x1bd)]['post'](_0x3e8564(0x194)+_0x404c6d+_0x3e8564(0x1e6),{'body':_0x88937f}))[_0x3e8564(0x1d3)][_0x3e8564(0x1ac)];return{..._0x13047e,'id':_0x46636e[_0x3e8564(0x1bb)],'dT':_0x3cecb5(+_0x46636e[_0x3e8564(0x1f4)])[_0x3e8564(0x1dc)](_0x3e8564(0x1f9)),'personId':_0x46636e['userId']};}else{const _0x3484fa={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9},_0x359bdb=await this[_0x3e8564(0x1bd)][_0x3e8564(0x1e9)](_0x3e8564(0x194)+_0x404c6d+'/add',{'body':_0x3484fa});return X(_0x359bdb[_0x3e8564(0x1d3)]['comment'],_0x13047e);}}async[_0x166c12(0x1e5)](_0xb7e253){const _0x1d18a8=_0x166c12;var _0x2a10f0,_0x41f84c;const {text:_0x261ae8,unitId:_0x2c0912}=_0xb7e253,_0x4e98b7=(_0x41f84c=(_0x2a10f0=_0x261ae8[_0x1d18a8(0x1a3)])==null?void 0x0:_0x2a10f0[_0x1d18a8(0x1a4)](_0x4b9621=>_0x4b9621[_0x1d18a8(0x1f7)]===_0xf7bfe6[_0x1d18a8(0x1b3)])[_0x1d18a8(0x1ed)](_0x51d2ef=>_0x51d2ef[_0x1d18a8(0x1d5)]))!=null?_0x41f84c:[],_0x1a323f=JSON[_0x1d18a8(0x1e0)](_0x261ae8),_0x2f4aa7=_0xb7e253[_0x1d18a8(0x1cd)],_0xf016b6=_0xb7e253['id'],_0xaab2ff={'memberId':(await this[_0x1d18a8(0x1a5)][_0x1d18a8(0x1d4)](_0x2c0912))['getMemberID'](),'unitId':_0x2c0912,'threadId':_0x2f4aa7,'mention':_0x4e98b7,'content':_0x1a323f,'replyId':_0xf016b6},_0x451c78=await this[_0x1d18a8(0x1bd)]['post'](_0x1d18a8(0x194)+_0x2c0912+'/edit',{'body':_0xaab2ff});return!_0x451c78[_0x1d18a8(0x1d3)][_0x1d18a8(0x1a0)]||_0x451c78[_0x1d18a8(0x1d3)]['error']['code']===0x1;}async[_0x166c12(0x1ee)](_0x2406e4){const _0x20bb96=_0x166c12,{unitId:_0x35fd9b}=_0x2406e4,_0x20540d=_0x2406e4[_0x20bb96(0x1cd)],_0x402c96={'memberId':this[_0x20bb96(0x1a7)][_0x20bb96(0x1f2)]()['userID'],'unitId':_0x35fd9b,'threadId':_0x20540d,'solved':_0x2406e4[_0x20bb96(0x1b4)]?I[_0x20bb96(0x199)]:I[_0x20bb96(0x1dd)]},_0x4cb16d=await this['_httpService'][_0x20bb96(0x1e9)]('/universer-api/comment/unit/'+_0x35fd9b+_0x20bb96(0x19e),{'body':_0x402c96});return!_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]||_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]['code']===0x1;}async[_0x166c12(0x19c)](_0x4124e3,_0x28a65b,_0xe062f3,_0x5548bd){const _0x57a811=_0x166c12,_0x47a5a0={'memberId':(await this[_0x57a811(0x1a5)][_0x57a811(0x1d4)](_0x4124e3))[_0x57a811(0x1f0)](),'threadId':_0xe062f3,'replyId':_0x5548bd,'unitId':_0x4124e3},_0x16c1c5=await this[_0x57a811(0x1bd)][_0x57a811(0x1e9)](_0x57a811(0x194)+_0x4124e3+'/delete',{'body':_0x47a5a0});return!_0x16c1c5[_0x57a811(0x1d3)]['error']||_0x16c1c5[_0x57a811(0x1d3)][_0x57a811(0x1a0)][_0x57a811(0x1d9)]===0x1;}async[_0x166c12(0x1e1)](_0x3ade55,_0x2746f5,_0x40018a){const _0x35bb43=_0x166c12,_0x18ff18={'unitId':_0x3ade55,'threadId':_0x40018a},_0x599aef=await this[_0x35bb43(0x1bd)][_0x35bb43(0x1e9)](_0x35bb43(0x194)+_0x3ade55+_0x35bb43(0x1c9),{'body':_0x18ff18}),_0x5485d8=_0x40018a['map'](_0x5a5e72=>ee(_0x599aef[_0x35bb43(0x1d3)][_0x35bb43(0x19f)][_0x5a5e72],_0x3ade55,_0x2746f5))[_0x35bb43(0x1a4)](Boolean);return Object[_0x35bb43(0x1d1)](_0x599aef['body'][_0x35bb43(0x1c0)])[_0x35bb43(0x1bc)](_0x649fec=>{const _0x1748d4=_0x35bb43;this[_0x1748d4(0x1a7)]['addUser'](_0x649fec);}),_0x5485d8;}[_0x166c12(0x19d)](_0x26b0fb){const _0xc11efc=_0x166c12;return{'id':_0x26b0fb['id'],'threadId':_0x26b0fb['threadId'],'ref':_0x26b0fb[_0xc11efc(0x1ef)]};}};f=Q([_(0x0,_0x8fdc81(_0x57fadc)),_(0x1,_0x8fdc81(_0xc83dbe)),_(0x2,_0x8fdc81(_0x1cbde6)),_(0x3,_0x8fdc81(_0x37caba))],f);function _0x10f6(_0x2bd15d,_0x137b0f){const _0x3b23c0=_0x3b23();return _0x10f6=function(_0x10f67c,_0xbc0d10){_0x10f67c=_0x10f67c-0x191;let _0x50d7b3=_0x3b23c0[_0x10f67c];return _0x50d7b3;},_0x10f6(_0x2bd15d,_0x137b0f);}var re=Object[_0x166c12(0x197)],te=(_0x291ffd,_0x10ef46,_0x2a468e,_0x1bbc9a)=>{const _0x5b87ed=_0x166c12;for(var _0xd0ef29=_0x1bbc9a>0x1?void 0x0:_0x1bbc9a?re(_0x10ef46,_0x2a468e):_0x10ef46,_0x14e5f6=_0x291ffd[_0x5b87ed(0x1ad)]-0x1,_0x33050f;_0x14e5f6>=0x0;_0x14e5f6--)(_0x33050f=_0x291ffd[_0x14e5f6])&&(_0xd0ef29=_0x33050f(_0xd0ef29)||_0xd0ef29);return _0xd0ef29;},N=(_0x4d2f7b,_0x19b1f8)=>(_0x12a140,_0x38bb8e)=>_0x19b1f8(_0x12a140,_0x38bb8e,_0x4d2f7b);let g=class extends _0x18908b{constructor(_0x3028cd,_0xb3add5){const _0x35c5df=_0x166c12;super(),this['_threadCommentDataSourceService']=_0x3028cd,this['_threadCommentDataSource']=_0xb3add5,this[_0x35c5df(0x191)]();}[_0x166c12(0x191)](){const _0x54824e=_0x166c12;this[_0x54824e(0x1da)][_0x54824e(0x1c2)]=this[_0x54824e(0x1b5)],this[_0x54824e(0x1da)][_0x54824e(0x1b0)]=!0x1;}};g=te([N(0x0,_0x360ed4),N(0x1,_0x8fdc81(f))],g);var se=Object[_0x166c12(0x1b2)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x382198,_0x385d53,_0x504c66)=>_0x385d53 in _0x382198?se(_0x382198,_0x385d53,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x504c66}):_0x382198[_0x385d53]=_0x504c66,ie=(_0x5618b5,_0x4abda7,_0x3b5b9a,_0x4315cf)=>{const _0x4ec47e=_0x166c12;for(var _0x534d0f=_0x4315cf>0x1?void 0x0:_0x4315cf?oe(_0x4abda7,_0x3b5b9a):_0x4abda7,_0x45acdc=_0x5618b5[_0x4ec47e(0x1ad)]-0x1,_0xd5032d;_0x45acdc>=0x0;_0x45acdc--)(_0xd5032d=_0x5618b5[_0x45acdc])&&(_0x534d0f=_0xd5032d(_0x534d0f)||_0x534d0f);return _0x534d0f;},w=(_0x36e1f1,_0x1a0080)=>(_0x14349a,_0xa97861)=>_0x1a0080(_0x14349a,_0xa97861,_0x36e1f1),$=(_0x561fa8,_0x4efdc5,_0x1e05d7)=>ne(_0x561fa8,typeof _0x4efdc5!=_0x166c12(0x1c4)?_0x4efdc5+'':_0x4efdc5,_0x1e05d7);let b=class extends _0x2b8ea1{constructor(_0x114f27=M,_0x560757,_0x133b78){const _0x538311=_0x166c12;super(),this[_0x538311(0x1e2)]=_0x114f27,this[_0x538311(0x1d7)]=_0x560757,this[_0x538311(0x1b7)]=_0x133b78;const {..._0x339ec6}=_0x984593({},M,this[_0x538311(0x1e2)]);this[_0x538311(0x1b7)][_0x538311(0x1a8)](z,_0x339ec6);}[_0x166c12(0x1e8)](){const _0x265e7d=_0x166c12;[[f],[g],[S]][_0x265e7d(0x1bc)](_0x4d52c6=>{const _0x31f9a9=_0x265e7d;this[_0x31f9a9(0x1d7)]['add'](_0x4d52c6);});}[_0x166c12(0x192)](){const _0x45d4c6=_0x166c12;this[_0x45d4c6(0x1d7)][_0x45d4c6(0x1ca)](g),this[_0x45d4c6(0x1d7)]['get'](S);}};$(b,_0x166c12(0x1b6),W),$(b,_0x166c12(0x1d8),_0x4acfe4['UNIVER_UNKNOWN']),b=ie([_0x648336(_0x3a2862,_0x4b2720,_0x1bfdd1),w(0x1,_0x8fdc81(_0x37caba)),w(0x2,_0x4f6915)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1a4f39=_0x3f69;(function(_0x448f0c,_0x4a1b98){const _0x1aa76f=_0x3f69,_0x10b186=_0x448f0c();while(!![]){try{const _0x360528=parseInt(_0x1aa76f(0x1fa))/0x1*(parseInt(_0x1aa76f(0x237))/0x2)+-parseInt(_0x1aa76f(0x211))/0x3*(parseInt(_0x1aa76f(0x1e0))/0x4)+parseInt(_0x1aa76f(0x234))/0x5+-parseInt(_0x1aa76f(0x1fb))/0x6*(-parseInt(_0x1aa76f(0x233))/0x7)+parseInt(_0x1aa76f(0x1dc))/0x8+parseInt(_0x1aa76f(0x1ec))/0x9*(-parseInt(_0x1aa76f(0x20c))/0xa)+parseInt(_0x1aa76f(0x20d))/0xb;if(_0x360528===_0x4a1b98)break;else _0x10b186['push'](_0x10b186['shift']());}catch(_0x323f05){_0x10b186['push'](_0x10b186['shift']());}}}(_0x1abb,0x5c62f));import{CommentService as _0x21648d,CollaborationSessionService as _0x499419,UniverCollaborationClientPlugin as _0xa54819}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ab811}from'@univerjs-pro/license';import{dayjs as _0x2b8e76,UserManagerService as _0x4c5420,Inject as _0x4a6f8f,Injector as _0x207069,Disposable as _0x1f3a56,CustomRangeType as _0x501a89,UniverInstanceType as _0x310c25,DependentOn as _0x2fada2,IConfigService as _0xef0cf5,Plugin as _0x4dc647,merge as _0x4d4e96}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa1e590}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x364cf5,IThreadCommentDataSourceService as _0x5ac943}from'@univerjs/thread-comment';import{bufferTime as _0x4391a3}from'rxjs';import{HTTPService as _0x349c83}from'@univerjs/network';const W=_0x1a4f39(0x22e);var I=(_0x16140d=>(_0x16140d[_0x16140d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x16140d[_0x16140d[_0x1a4f39(0x23d)]=0x1]='Solved',_0x16140d[_0x16140d[_0x1a4f39(0x232)]=-0x1]=_0x1a4f39(0x232),_0x16140d))(I||{}),v=(_0x383bab=>(_0x383bab[_0x383bab[_0x1a4f39(0x1f2)]=0x0]=_0x1a4f39(0x1f2),_0x383bab[_0x383bab['Add']=0x1]='Add',_0x383bab[_0x383bab[_0x1a4f39(0x1e6)]=0x2]=_0x1a4f39(0x1e6),_0x383bab[_0x383bab[_0x1a4f39(0x213)]=0x3]=_0x1a4f39(0x213),_0x383bab[_0x383bab[_0x1a4f39(0x231)]=0x4]=_0x1a4f39(0x231),_0x383bab[_0x383bab[_0x1a4f39(0x20e)]=0x5]='Solve',_0x383bab[_0x383bab['UNRECOGNIZED']=-0x1]=_0x1a4f39(0x232),_0x383bab))(v||{});const D=_0x29709c=>_0x2b8e76(new Date(+_0x29709c))['format'](_0x1a4f39(0x23f)),B=async(_0x4e6447,_0x2711c9)=>{const _0x220d95=_0x1a4f39,_0x2461bb=_0x4e6447['get'](_0x4c5420),_0x2c31d8=_0x4e6447[_0x220d95(0x228)](_0x349c83);_0x2711c9[_0x220d95(0x1de)](_0x45526f=>{const _0x183b33=_0x220d95;_0x2461bb['getUser'](_0x45526f)&&_0x2711c9[_0x183b33(0x1e2)](_0x45526f);}),_0x2711c9[_0x220d95(0x1d9)]&&(await _0x2c31d8[_0x220d95(0x228)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2711c9]}}))['body'][_0x220d95(0x1eb)][_0x220d95(0x1de)](_0x44e857=>{_0x44e857&&_0x2461bb['addUser'](_0x44e857);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1b1b61,_0xe7397e,_0x2d541b,_0x3cd3f8)=>{const _0x4e4788=_0x1a4f39;for(var _0x2a22e3=_0x3cd3f8>0x1?void 0x0:_0x3cd3f8?K(_0xe7397e,_0x2d541b):_0xe7397e,_0x3df3e8=_0x1b1b61[_0x4e4788(0x1da)]-0x1,_0x1af98d;_0x3df3e8>=0x0;_0x3df3e8--)(_0x1af98d=_0x1b1b61[_0x3df3e8])&&(_0x2a22e3=_0x1af98d(_0x2a22e3)||_0x2a22e3);return _0x2a22e3;},p=(_0x25f8b5,_0x3a8d99)=>(_0x28aadb,_0x39f8c0)=>_0x3a8d99(_0x28aadb,_0x39f8c0,_0x25f8b5);let S=class extends _0x1f3a56{constructor(_0xd5d980,_0x2b62cb,_0x1a3a7f,_0x128ae3){const _0x13d225=_0x1a4f39;super(),this[_0x13d225(0x1e3)]=_0xd5d980,this[_0x13d225(0x223)]=_0x2b62cb,this[_0x13d225(0x1e1)]=_0x1a3a7f,this[_0x13d225(0x236)]=_0x128ae3,this[_0x13d225(0x217)](),this[_0x13d225(0x1ff)]();}[_0x1a4f39(0x1ff)](){const _0x383450=_0x1a4f39;this[_0x383450(0x1e5)](this['_threadCommentModel'][_0x383450(0x1dd)][_0x383450(0x224)](_0x4391a3(0x10))[_0x383450(0x22d)](_0x25bd5d=>{const _0x52b826=_0x383450,_0x2e51c1=new Set();_0x25bd5d['forEach'](_0x356646=>{const _0x4f41bf=_0x3f69;switch(_0x356646[_0x4f41bf(0x210)]){case _0x4f41bf(0x23b):{const _0x20f616=_0x356646[_0x4f41bf(0x235)][_0x4f41bf(0x23e)];_0x2e51c1[_0x4f41bf(0x23b)](_0x20f616);break;}}}),B(this[_0x52b826(0x236)],_0x2e51c1);}));}[_0x1a4f39(0x217)](){const _0x48de07=_0x1a4f39;this['disposeWithMe'](this[_0x48de07(0x1e3)][_0x48de07(0x1dd)][_0x48de07(0x22d)](async _0x38f520=>{const _0x3ad472=_0x48de07;var _0xb323ae,_0x1b95ca,_0x1e2f22,_0x4edfab;const _0x462854=(_0xb323ae=this['_threadCommentModel'][_0x3ad472(0x1db)](_0x38f520['unitId'])[_0x3ad472(0x21f)](_0x472813=>_0x472813['threadId']===_0x38f520[_0x3ad472(0x20b)]))==null?void 0x0:_0xb323ae[_0x3ad472(0x1f7)];if(!_0x462854)return;const {unitId:_0x54045d,subUnitId:_0x2e4715}=_0x462854;switch(_0x38f520[_0x3ad472(0x240)]&&this[_0x3ad472(0x1e1)][_0x3ad472(0x230)](_0x38f520['user']),_0x38f520['type']){case v[_0x3ad472(0x1f0)]:break;case v[_0x3ad472(0x1e6)]:{this['_threadCommentModel'][_0x3ad472(0x229)](_0x54045d,_0x2e4715,{'unitId':_0x54045d,'subUnitId':_0x2e4715,'ref':'','id':_0x38f520[_0x3ad472(0x227)],'dT':D(+_0x38f520[_0x3ad472(0x212)]),'threadId':_0x38f520['threadId'],'personId':(_0x1e2f22=(_0x1b95ca=_0x38f520[_0x3ad472(0x240)])==null?void 0x0:_0x1b95ca['userID'])!=null?_0x1e2f22:_0x38f520[_0x3ad472(0x214)],'text':JSON[_0x3ad472(0x208)](_0x38f520[_0x3ad472(0x20f)]),'parentId':_0x462854['id']});break;}case v[_0x3ad472(0x231)]:{const _0x1de659=this[_0x3ad472(0x223)]['getComment'](_0x54045d,_0x2e4715,_0x38f520['replyId']);_0x1de659&&_0x1de659[_0x3ad472(0x1fd)]&&this[_0x3ad472(0x223)][_0x3ad472(0x22b)](_0x54045d,_0x2e4715,_0x38f520[_0x3ad472(0x227)]);break;}case v[_0x3ad472(0x213)]:{this[_0x3ad472(0x223)][_0x3ad472(0x206)](_0x54045d,_0x2e4715,{'commentId':_0x38f520['replyId'],'text':JSON[_0x3ad472(0x208)](_0x38f520[_0x3ad472(0x20f)])});break;}case v[_0x3ad472(0x20e)]:{const _0x168a89=(_0x4edfab=this['_threadCommentModel'][_0x3ad472(0x1db)](_0x38f520[_0x3ad472(0x21a)])[_0x3ad472(0x21f)](_0x10affe=>_0x10affe[_0x3ad472(0x20b)]===_0x38f520[_0x3ad472(0x20b)]))==null?void 0x0:_0x4edfab[_0x3ad472(0x1f7)];_0x168a89&&this[_0x3ad472(0x223)]['resolveComment'](_0x54045d,_0x2e4715,_0x168a89['id'],_0x38f520['solved']===I[_0x3ad472(0x23d)]);break;}}}));}};S=V([p(0x0,_0x4a6f8f(_0x21648d)),p(0x1,_0x4a6f8f(_0x364cf5)),p(0x2,_0x4a6f8f(_0x4c5420)),p(0x3,_0x4a6f8f(_0x207069))],S);const z=_0x1a4f39(0x23c),M={};var k=Object[_0x1a4f39(0x23a)],Q=(_0xb18e31,_0x28f269,_0x1bc98d,_0x58a842)=>{const _0x5b37f3=_0x1a4f39;for(var _0x1445e9=_0x58a842>0x1?void 0x0:_0x58a842?k(_0x28f269,_0x1bc98d):_0x28f269,_0x363065=_0xb18e31[_0x5b37f3(0x1da)]-0x1,_0x4e8e80;_0x363065>=0x0;_0x363065--)(_0x4e8e80=_0xb18e31[_0x363065])&&(_0x1445e9=_0x4e8e80(_0x1445e9)||_0x1445e9);return _0x1445e9;},_=(_0x300f41,_0x5d7410)=>(_0x26ade8,_0x2474dd)=>_0x5d7410(_0x26ade8,_0x2474dd,_0x300f41);function X(_0xf357f3,_0x2d4351){const _0xf5705a=_0x1a4f39,_0x46ec63=_0xf357f3['replies'][0x0];return{..._0x2d4351,'id':_0x46ec63['replyId'],'resolved':_0xf357f3[_0xf5705a(0x21e)]===0x1,'dT':D(_0x46ec63[_0xf5705a(0x212)]),'personId':_0x46ec63['userId'],'threadId':_0x46ec63['threadId']};}function ee(_0x52dc3a,_0x5f2cea,_0x5107f7){const _0x3a4c37=_0x1a4f39;var _0x539e0a,_0x1db9a2;if(((_0x1db9a2=(_0x539e0a=_0x52dc3a==null?void 0x0:_0x52dc3a[_0x3a4c37(0x221)])==null?void 0x0:_0x539e0a[_0x3a4c37(0x1da)])!=null?_0x1db9a2:0x0)>0x0){const _0x44f629=(_0x217fb9,_0x1eaa0c)=>({'id':_0x217fb9[_0x3a4c37(0x227)],'threadId':_0x217fb9[_0x3a4c37(0x20b)],'dT':D(_0x217fb9['createTimestamp']),'personId':_0x217fb9['userId'],'resolved':_0x52dc3a[_0x3a4c37(0x21e)]===I[_0x3a4c37(0x23d)],'unitId':_0x5f2cea,'subUnitId':_0x5107f7,'text':JSON[_0x3a4c37(0x208)](_0x217fb9[_0x3a4c37(0x20f)]),'parentId':_0x1eaa0c}),_0x4903d7=_0x44f629(_0x52dc3a[_0x3a4c37(0x221)][0x0]);return{..._0x4903d7,'children':_0x52dc3a['replies'][_0x3a4c37(0x1f8)](0x1)[_0x3a4c37(0x1f9)](_0x3f4073=>_0x44f629(_0x3f4073,_0x4903d7['id']))};}return null;}let f=class{constructor(_0x303b56,_0x1673ba,_0x292d56,_0x286c30){const _0x52747d=_0x1a4f39;this[_0x52747d(0x222)]=_0x303b56,this[_0x52747d(0x1e1)]=_0x1673ba,this[_0x52747d(0x216)]=_0x292d56,this['_injector']=_0x286c30;}async[_0x1a4f39(0x229)](_0x1ff44e){const _0x12ddd0=_0x1a4f39;var _0x38521f,_0x20b866;const {parentId:_0x351793,unitId:_0x55780f,text:_0x1a5f7b,threadId:_0x25128a}=_0x1ff44e,_0x30a65c=(_0x20b866=(_0x38521f=_0x1a5f7b[_0x12ddd0(0x219)])==null?void 0x0:_0x38521f[_0x12ddd0(0x1f1)](_0x5ecb74=>_0x5ecb74[_0x12ddd0(0x21d)]===_0x501a89['COMMENT'])[_0x12ddd0(0x1f9)](_0x468fcf=>_0x468fcf['rangeId']))!=null?_0x20b866:[],_0x16112c=JSON['stringify'](_0x1a5f7b),_0x340d85=(await this[_0x12ddd0(0x216)][_0x12ddd0(0x1f6)](_0x55780f))[_0x12ddd0(0x218)]();if(_0x351793){const _0x3621ba={'memberId':_0x340d85,'unitId':_0x55780f,'content':_0x16112c,'mention':_0x30a65c,'threadId':_0x25128a},_0x3a7f61=(await this['_httpService'][_0x12ddd0(0x1f5)]('/universer-api/comment/unit/'+_0x55780f+'/reply',{'body':_0x3621ba}))[_0x12ddd0(0x1e8)][_0x12ddd0(0x1ef)];return{..._0x1ff44e,'id':_0x3a7f61[_0x12ddd0(0x227)],'dT':_0x2b8e76(+_0x3a7f61[_0x12ddd0(0x212)])['format'](_0x12ddd0(0x23f)),'personId':_0x3a7f61[_0x12ddd0(0x214)]};}else{const _0x8ca7f4={'memberId':_0x340d85,'unitId':_0x55780f,'content':_0x16112c,'mention':_0x30a65c},_0x1f3898=await this[_0x12ddd0(0x222)][_0x12ddd0(0x1f5)]('/universer-api/comment/unit/'+_0x55780f+_0x12ddd0(0x209),{'body':_0x8ca7f4});return X(_0x1f3898['body'][_0x12ddd0(0x1ee)],_0x1ff44e);}}async[_0x1a4f39(0x206)](_0x4cb473){const _0x589dc1=_0x1a4f39;var _0x43e6d8,_0x4f45db;const {text:_0x28e08a,unitId:_0x4755af}=_0x4cb473,_0x275731=(_0x4f45db=(_0x43e6d8=_0x28e08a[_0x589dc1(0x219)])==null?void 0x0:_0x43e6d8[_0x589dc1(0x1f1)](_0x1763e6=>_0x1763e6[_0x589dc1(0x21d)]===_0x501a89[_0x589dc1(0x1df)])[_0x589dc1(0x1f9)](_0x2ee045=>_0x2ee045['rangeId']))!=null?_0x4f45db:[],_0x27ef4d=JSON['stringify'](_0x28e08a),_0x3ef281=_0x4cb473[_0x589dc1(0x20b)],_0x232235=_0x4cb473['id'],_0x1f92fe={'memberId':(await this['_sessionService'][_0x589dc1(0x1f6)](_0x4755af))['getMemberID'](),'unitId':_0x4755af,'threadId':_0x3ef281,'mention':_0x275731,'content':_0x27ef4d,'replyId':_0x232235},_0x1587aa=await this[_0x589dc1(0x222)][_0x589dc1(0x1f5)](_0x589dc1(0x201)+_0x4755af+'/edit',{'body':_0x1f92fe});return!_0x1587aa[_0x589dc1(0x1e8)]['error']||_0x1587aa[_0x589dc1(0x1e8)][_0x589dc1(0x203)][_0x589dc1(0x200)]===0x1;}async[_0x1a4f39(0x225)](_0x54eb4b){const _0x509bab=_0x1a4f39,{unitId:_0x4d2778}=_0x54eb4b,_0x3bdba3=_0x54eb4b['threadId'],_0x46ce71={'memberId':this[_0x509bab(0x1e1)][_0x509bab(0x226)]()[_0x509bab(0x22c)],'unitId':_0x4d2778,'threadId':_0x3bdba3,'solved':_0x54eb4b[_0x509bab(0x205)]?I[_0x509bab(0x23d)]:I[_0x509bab(0x1f4)]},_0x2c4237=await this[_0x509bab(0x222)][_0x509bab(0x1f5)](_0x509bab(0x201)+_0x4d2778+_0x509bab(0x20a),{'body':_0x46ce71});return!_0x2c4237['body'][_0x509bab(0x203)]||_0x2c4237[_0x509bab(0x1e8)][_0x509bab(0x203)][_0x509bab(0x200)]===0x1;}async['deleteComment'](_0xc0331c,_0x792ccc,_0x344c50,_0x3e48bd){const _0x509962=_0x1a4f39,_0x3e15ff={'memberId':(await this[_0x509962(0x216)][_0x509962(0x1f6)](_0xc0331c))[_0x509962(0x218)](),'threadId':_0x344c50,'replyId':_0x3e48bd,'unitId':_0xc0331c},_0x6cf676=await this[_0x509962(0x222)][_0x509962(0x1f5)](_0x509962(0x201)+_0xc0331c+_0x509962(0x1fe),{'body':_0x3e15ff});return!_0x6cf676[_0x509962(0x1e8)][_0x509962(0x203)]||_0x6cf676[_0x509962(0x1e8)][_0x509962(0x203)][_0x509962(0x200)]===0x1;}async[_0x1a4f39(0x1e4)](_0x1ef227,_0x4b4f34,_0x4cdbf5){const _0x1e5764=_0x1a4f39,_0x1b4d17={'unitId':_0x1ef227,'threadId':_0x4cdbf5},_0x181a90=await this[_0x1e5764(0x222)][_0x1e5764(0x1f5)]('/universer-api/comment/unit/'+_0x1ef227+_0x1e5764(0x204),{'body':_0x1b4d17}),_0x510547=_0x4cdbf5[_0x1e5764(0x1f9)](_0x3aca8f=>ee(_0x181a90[_0x1e5764(0x1e8)][_0x1e5764(0x215)][_0x3aca8f],_0x1ef227,_0x4b4f34))[_0x1e5764(0x1f1)](Boolean);return Object[_0x1e5764(0x239)](_0x181a90[_0x1e5764(0x1e8)][_0x1e5764(0x1eb)])[_0x1e5764(0x1de)](_0x20ab6d=>{const _0x4ff48a=_0x1e5764;this['_userService'][_0x4ff48a(0x230)](_0x20ab6d);}),_0x510547;}[_0x1a4f39(0x1e9)](_0x2d7f34){const _0x5a50fe=_0x1a4f39;return{'id':_0x2d7f34['id'],'threadId':_0x2d7f34[_0x5a50fe(0x20b)],'ref':_0x2d7f34['ref']};}};f=Q([_(0x0,_0x4a6f8f(_0x349c83)),_(0x1,_0x4a6f8f(_0x4c5420)),_(0x2,_0x4a6f8f(_0x499419)),_(0x3,_0x4a6f8f(_0x207069))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x581473,_0x384b7c,_0x172561,_0x32ff18)=>{const _0x30c93e=_0x1a4f39;for(var _0x23d7de=_0x32ff18>0x1?void 0x0:_0x32ff18?re(_0x384b7c,_0x172561):_0x384b7c,_0x3721ac=_0x581473[_0x30c93e(0x1da)]-0x1,_0x52cc24;_0x3721ac>=0x0;_0x3721ac--)(_0x52cc24=_0x581473[_0x3721ac])&&(_0x23d7de=_0x52cc24(_0x23d7de)||_0x23d7de);return _0x23d7de;},N=(_0x21c2a9,_0x31b8f0)=>(_0x52dfa0,_0x49dde3)=>_0x31b8f0(_0x52dfa0,_0x49dde3,_0x21c2a9);let g=class extends _0x1f3a56{constructor(_0x15c270,_0x54ff68){const _0x12b771=_0x1a4f39;super(),this[_0x12b771(0x22a)]=_0x15c270,this[_0x12b771(0x1f3)]=_0x54ff68,this['_initDataSource']();}['_initDataSource'](){const _0x4577ea=_0x1a4f39;this[_0x4577ea(0x22a)][_0x4577ea(0x21c)]=this[_0x4577ea(0x1f3)],this['_threadCommentDataSourceService'][_0x4577ea(0x202)]=!0x1;}};g=te([N(0x0,_0x5ac943),N(0x1,_0x4a6f8f(f))],g);function _0x3f69(_0x23781f,_0x1a9ccf){const _0x1abb49=_0x1abb();return _0x3f69=function(_0x3f69e0,_0x34d682){_0x3f69e0=_0x3f69e0-0x1d9;let _0x490d19=_0x1abb49[_0x3f69e0];return _0x490d19;},_0x3f69(_0x23781f,_0x1a9ccf);}var se=Object[_0x1a4f39(0x1ea)],oe=Object[_0x1a4f39(0x23a)],ne=(_0x15b297,_0x274258,_0x169842)=>_0x274258 in _0x15b297?se(_0x15b297,_0x274258,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x169842}):_0x15b297[_0x274258]=_0x169842,ie=(_0x77843e,_0x380d20,_0x543fde,_0x1ed95c)=>{const _0x4ec5c1=_0x1a4f39;for(var _0x195059=_0x1ed95c>0x1?void 0x0:_0x1ed95c?oe(_0x380d20,_0x543fde):_0x380d20,_0x3bf36f=_0x77843e[_0x4ec5c1(0x1da)]-0x1,_0x58067e;_0x3bf36f>=0x0;_0x3bf36f--)(_0x58067e=_0x77843e[_0x3bf36f])&&(_0x195059=_0x58067e(_0x195059)||_0x195059);return _0x195059;},w=(_0x53ddf1,_0x22549f)=>(_0x21a43a,_0x59ece9)=>_0x22549f(_0x21a43a,_0x59ece9,_0x53ddf1),$=(_0x5c19cc,_0x22360f,_0x4d098b)=>ne(_0x5c19cc,typeof _0x22360f!=_0x1a4f39(0x21b)?_0x22360f+'':_0x22360f,_0x4d098b);let b=class extends _0x4dc647{constructor(_0x34cd7a=M,_0xc7c2bc,_0x36ee49){const _0x45c7e3=_0x1a4f39;super(),this[_0x45c7e3(0x22f)]=_0x34cd7a,this['_injector']=_0xc7c2bc,this[_0x45c7e3(0x220)]=_0x36ee49;const {..._0x6e6bb8}=_0x4d4e96({},M,this[_0x45c7e3(0x22f)]);this[_0x45c7e3(0x220)][_0x45c7e3(0x207)](z,_0x6e6bb8);}[_0x1a4f39(0x1e7)](){const _0x1d4dd5=_0x1a4f39;[[f],[g],[S]][_0x1d4dd5(0x1de)](_0x29a198=>{const _0x43f866=_0x1d4dd5;this[_0x43f866(0x236)]['add'](_0x29a198);});}[_0x1a4f39(0x238)](){const _0x4b63e9=_0x1a4f39;this[_0x4b63e9(0x236)][_0x4b63e9(0x228)](g),this[_0x4b63e9(0x236)][_0x4b63e9(0x228)](S);}};$(b,_0x1a4f39(0x1ed),W),$(b,_0x1a4f39(0x210),_0x310c25[_0x1a4f39(0x1fc)]),b=ie([_0x2fada2(_0xa1e590,_0xa54819,_0x4ab811),w(0x1,_0x4a6f8f(_0x207069)),w(0x2,_0xef0cf5)],b);function _0x1abb(){const _0x496063=['comments','_sessionService','_init','getMemberID','customRanges','unitId','symbol','dataSource','rangeType','solved','find','_configService','replies','_httpService','_threadCommentModel','pipe','resolveComment','getCurrentUser','replyId','get','addComment','_threadCommentDataSourceService','deleteComment','userID','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','addUser','Delete','UNRECOGNIZED','7QAJHbA','2227240vdsdkG','payload','_injector','44oexIpt','onReady','values','getOwnPropertyDescriptor','add','thread-comment-data-source.config','Solved','personId','YYYY/MM/DD\x20HH:mm','user','size','length','getUnit','653128ZHTpSi','commentUpdate$','forEach','COMMENT','52RzjLnA','_userService','delete','_commentService','listComments','disposeWithMe','Reply','onStarting','body','saveCommentToSnapshot','defineProperty','users','124353PQsaNr','pluginName','comment','reply','Add','filter','Unknown','_threadCommentDataSource','OpenOrReOpen','post','requireSession','root','slice','map','7841rJdjFE','3662466XRgjNQ','UNIVER_UNKNOWN','parentId','/delete','_initUserSync','code','/universer-api/comment/unit/','syncUpdateMutationToColla','error','/list','resolved','updateComment','setConfig','parse','/add','/solved','threadId','430eziQup','676511ZomDhE','Solve','content','type','92067PHtjXf','createTimestamp','Edit','userId'];_0x1abb=function(){return _0x496063;};return _0x1abb();}export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x372f(){const _0x590e33=['Solved','commentUpdate$','disposeWithMe','UniverThreadCommentUIPlugin','_threadCommentModel','getComment','object','dataSource','5042828quSwyU','COMMENT','forEach','find','rxjs','UNRECOGNIZED','userID','_sessionService','/solved','UniverNetwork','92287wmeItZ','_httpService','2680948QdMEQU','_threadCommentDataSource','UserManagerService','@univerjs-pro/collaboration-client','rangeType','OpenOrReOpen','UniverProCollaborationClient','add','thread-comment-data-source.config','resolveComment','subscribe','5351255SuSdJK','length','@univerjs/thread-comment-ui','Inject','onStarting','root','getUser','syncUpdateMutationToColla','getCurrentUser','/universer-api/comment/unit/','map','toStringTag','Injector','addComment','addUser','comments','Module','rangeId','@univerjs/network','error','createTimestamp','Plugin','updateComment','Solve','Edit','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','UniverInstanceType','personId','_injector','exports','content','27959712jqOiYs','get','IThreadCommentDataSourceService','body','3008460FzIMrj','Unknown','_init','CollaborationSessionService','saveCommentToSnapshot','Delete','UniverCollaborationClientPlugin','resolved','format','UniverProThreadCommentDatasource','user','UniverCore','Reply','getOwnPropertyDescriptor','_userService','filter','replies','getUnit','requireSession','HTTPService','394854XQylbt','parse','users','replyId','/reply','reply','code','dayjs','_commentService','post','_configService','UniverThreadCommentDataSourcePlugin','CustomRangeType','pluginName','/delete','_threadCommentDataSourceService','@univerjs/thread-comment','defineProperty','userId','getMemberID','_config','@univerjs-pro/license','_initDataSource','/universer-api/user/list','bufferTime','parentId','onReady','size','@univerjs/core','CommentService','Add','/edit','listComments','/list','customRanges','function','UniverProLicense','stringify','6WgahoO','threadId','deleteComment','type','pipe','YYYY/MM/DD\x20HH:mm'];_0x372f=function(){return _0x590e33;};return _0x372f();}function _0x2a14(_0x33dc94,_0x2b2f88){const _0x372fcc=_0x372f();return _0x2a14=function(_0x2a14f5,_0x557e30){_0x2a14f5=_0x2a14f5-0x9a;let _0x55e630=_0x372fcc[_0x2a14f5];return _0x55e630;},_0x2a14(_0x33dc94,_0x2b2f88);}(function(_0x1b3363,_0x560d02){const _0x55eb81=_0x2a14,_0x8d180=_0x1b3363();while(!![]){try{const _0x1ae9b0=parseInt(_0x55eb81(0x10c))/0x1*(parseInt(_0x55eb81(0xf4))/0x2)+-parseInt(_0x55eb81(0xce))/0x3+-parseInt(_0x55eb81(0x10e))/0x4+-parseInt(_0x55eb81(0x119))/0x5+-parseInt(_0x55eb81(0xba))/0x6+-parseInt(_0x55eb81(0x102))/0x7+parseInt(_0x55eb81(0xb6))/0x8;if(_0x1ae9b0===_0x560d02)break;else _0x8d180['push'](_0x8d180['shift']());}catch(_0x49633a){_0x8d180['push'](_0x8d180['shift']());}}}(_0x372f,0xa5811),function(_0x2496d8,_0x3384ba){const _0x346e50=_0x2a14;typeof exports==_0x346e50(0x100)&&typeof module<'u'?_0x3384ba(exports,require(_0x346e50(0x111)),require('@univerjs-pro/license'),require(_0x346e50(0xea)),require(_0x346e50(0x11b)),require(_0x346e50(0xde)),require(_0x346e50(0x106)),require(_0x346e50(0xa7))):typeof define==_0x346e50(0xf1)&&define['amd']?define([_0x346e50(0xb4),_0x346e50(0x111),_0x346e50(0xe3),_0x346e50(0xea),'@univerjs/thread-comment-ui',_0x346e50(0xde),_0x346e50(0x106),_0x346e50(0xa7)],_0x3384ba):(_0x2496d8=typeof globalThis<'u'?globalThis:_0x2496d8||self,_0x3384ba(_0x2496d8[_0x346e50(0xc3)]={},_0x2496d8[_0x346e50(0x114)],_0x2496d8[_0x346e50(0xf2)],_0x2496d8[_0x346e50(0xc5)],_0x2496d8['UniverThreadCommentUi'],_0x2496d8['UniverThreadComment'],_0x2496d8['rxjs'],_0x2496d8[_0x346e50(0x10b)]));}(this,function(_0x2b4972,_0x153186,_0x1b4088,_0xf0a7f9,_0x56cf0c,_0x37eabe,_0x7a0ece,_0x5e599c){'use strict';const _0x3d86cd=_0x2a14;const _0x3399c7=_0x3d86cd(0xaf);var _0x5b6eb6=(_0x3aa485=>(_0x3aa485[_0x3aa485[_0x3d86cd(0x113)]=0x0]=_0x3d86cd(0x113),_0x3aa485[_0x3aa485[_0x3d86cd(0xfa)]=0x1]=_0x3d86cd(0xfa),_0x3aa485[_0x3aa485[_0x3d86cd(0x107)]=-0x1]=_0x3d86cd(0x107),_0x3aa485))(_0x5b6eb6||{}),_0x33bd75=(_0x3921ad=>(_0x3921ad[_0x3921ad['Unknown']=0x0]=_0x3d86cd(0xbb),_0x3921ad[_0x3921ad['Add']=0x1]=_0x3d86cd(0xec),_0x3921ad[_0x3921ad[_0x3d86cd(0xc6)]=0x2]='Reply',_0x3921ad[_0x3921ad[_0x3d86cd(0xad)]=0x3]=_0x3d86cd(0xad),_0x3921ad[_0x3921ad['Delete']=0x4]=_0x3d86cd(0xbf),_0x3921ad[_0x3921ad[_0x3d86cd(0xac)]=0x5]=_0x3d86cd(0xac),_0x3921ad[_0x3921ad[_0x3d86cd(0x107)]=-0x1]=_0x3d86cd(0x107),_0x3921ad))(_0x33bd75||{});const _0x20ca0e=_0x25d397=>_0xf0a7f9['dayjs'](new Date(+_0x25d397))[_0x3d86cd(0xc2)](_0x3d86cd(0xf9)),_0x4c1372=async(_0x509cf1,_0x42709a)=>{const _0x455a3c=_0x3d86cd,_0x11499d=_0x509cf1[_0x455a3c(0xb7)](_0xf0a7f9['UserManagerService']),_0x19eba2=_0x509cf1[_0x455a3c(0xb7)](_0x5e599c[_0x455a3c(0xcd)]);_0x42709a[_0x455a3c(0x104)](_0x380394=>{const _0x40b87f=_0x455a3c;_0x11499d[_0x40b87f(0x9b)](_0x380394)&&_0x42709a['delete'](_0x380394);}),_0x42709a[_0x455a3c(0xe9)]&&(await _0x19eba2['get'](_0x455a3c(0xe5),{'params':{'userIDs':[..._0x42709a]}}))[_0x455a3c(0xb9)][_0x455a3c(0xd0)]['forEach'](_0x426edb=>{_0x426edb&&_0x11499d['addUser'](_0x426edb);});};var _0x14eec8=Object[_0x3d86cd(0xc7)],_0x29e126=(_0x34d875,_0x28c33c,_0x55e814,_0x55e996)=>{const _0x18a99e=_0x3d86cd;for(var _0x4acb32=_0x55e996>0x1?void 0x0:_0x55e996?_0x14eec8(_0x28c33c,_0x55e814):_0x28c33c,_0x1604db=_0x34d875[_0x18a99e(0x11a)]-0x1,_0x37b7ed;_0x1604db>=0x0;_0x1604db--)(_0x37b7ed=_0x34d875[_0x1604db])&&(_0x4acb32=_0x37b7ed(_0x4acb32)||_0x4acb32);return _0x4acb32;},_0x35aace=(_0x158e64,_0x33f52f)=>(_0x1aac22,_0xf24474)=>_0x33f52f(_0x1aac22,_0xf24474,_0x158e64);let _0x1e2814=class extends _0xf0a7f9['Disposable']{constructor(_0x2d07fa,_0x10a8cb,_0x32728a,_0x505b9c){const _0x2b420f=_0x3d86cd;super(),this['_commentService']=_0x2d07fa,this[_0x2b420f(0xfe)]=_0x10a8cb,this[_0x2b420f(0xc8)]=_0x32728a,this['_injector']=_0x505b9c,this[_0x2b420f(0xbc)](),this['_initUserSync']();}['_initUserSync'](){const _0x3f9b27=_0x3d86cd;this['disposeWithMe'](this['_threadCommentModel'][_0x3f9b27(0xfb)][_0x3f9b27(0xf8)](_0x7a0ece[_0x3f9b27(0xe6)](0x10))[_0x3f9b27(0x118)](_0x516c42=>{const _0x375199=_0x3f9b27,_0x55f854=new Set();_0x516c42[_0x375199(0x104)](_0x502f40=>{const _0x27e027=_0x375199;switch(_0x502f40[_0x27e027(0xf7)]){case _0x27e027(0x115):{const _0x246af=_0x502f40['payload'][_0x27e027(0xb2)];_0x55f854[_0x27e027(0x115)](_0x246af);break;}}}),_0x4c1372(this[_0x375199(0xb3)],_0x55f854);}));}[_0x3d86cd(0xbc)](){const _0x1a96a9=_0x3d86cd;this[_0x1a96a9(0xfc)](this[_0x1a96a9(0xd6)][_0x1a96a9(0xfb)][_0x1a96a9(0x118)](async _0x438949=>{const _0x5d7087=_0x1a96a9;var _0x503679,_0x6b4dc6,_0x7dd254,_0xc98db2;const _0x16520a=(_0x503679=this[_0x5d7087(0xfe)][_0x5d7087(0xcb)](_0x438949['unitId'])['find'](_0x549b8b=>_0x549b8b['threadId']===_0x438949[_0x5d7087(0xf5)]))==null?void 0x0:_0x503679[_0x5d7087(0x9a)];if(!_0x16520a)return;const {unitId:_0x4fe338,subUnitId:_0x36b010}=_0x16520a;switch(_0x438949[_0x5d7087(0xc4)]&&this[_0x5d7087(0xc8)]['addUser'](_0x438949[_0x5d7087(0xc4)]),_0x438949['type']){case _0x33bd75['Add']:break;case _0x33bd75[_0x5d7087(0xc6)]:{this[_0x5d7087(0xfe)][_0x5d7087(0xa2)](_0x4fe338,_0x36b010,{'unitId':_0x4fe338,'subUnitId':_0x36b010,'ref':'','id':_0x438949[_0x5d7087(0xd1)],'dT':_0x20ca0e(+_0x438949['createTimestamp']),'threadId':_0x438949[_0x5d7087(0xf5)],'personId':(_0x7dd254=(_0x6b4dc6=_0x438949[_0x5d7087(0xc4)])==null?void 0x0:_0x6b4dc6[_0x5d7087(0x108)])!=null?_0x7dd254:_0x438949[_0x5d7087(0xe0)],'text':JSON['parse'](_0x438949[_0x5d7087(0xb5)]),'parentId':_0x16520a['id']});break;}case _0x33bd75[_0x5d7087(0xbf)]:{const _0x117af7=this[_0x5d7087(0xfe)][_0x5d7087(0xff)](_0x4fe338,_0x36b010,_0x438949['replyId']);_0x117af7&&_0x117af7[_0x5d7087(0xe7)]&&this[_0x5d7087(0xfe)][_0x5d7087(0xf6)](_0x4fe338,_0x36b010,_0x438949[_0x5d7087(0xd1)]);break;}case _0x33bd75[_0x5d7087(0xad)]:{this[_0x5d7087(0xfe)][_0x5d7087(0xab)](_0x4fe338,_0x36b010,{'commentId':_0x438949['replyId'],'text':JSON[_0x5d7087(0xcf)](_0x438949[_0x5d7087(0xb5)])});break;}case _0x33bd75[_0x5d7087(0xac)]:{const _0x492a5f=(_0xc98db2=this[_0x5d7087(0xfe)][_0x5d7087(0xcb)](_0x438949['unitId'])[_0x5d7087(0x105)](_0xcd27fc=>_0xcd27fc[_0x5d7087(0xf5)]===_0x438949[_0x5d7087(0xf5)]))==null?void 0x0:_0xc98db2['root'];_0x492a5f&&this[_0x5d7087(0xfe)][_0x5d7087(0x117)](_0x4fe338,_0x36b010,_0x492a5f['id'],_0x438949[_0x5d7087(0xb0)]===_0x5b6eb6[_0x5d7087(0xfa)]);break;}}}));}};_0x1e2814=_0x29e126([_0x35aace(0x0,_0xf0a7f9[_0x3d86cd(0x11c)](_0x153186[_0x3d86cd(0xeb)])),_0x35aace(0x1,_0xf0a7f9[_0x3d86cd(0x11c)](_0x37eabe[_0x3d86cd(0xae)])),_0x35aace(0x2,_0xf0a7f9[_0x3d86cd(0x11c)](_0xf0a7f9[_0x3d86cd(0x110)])),_0x35aace(0x3,_0xf0a7f9['Inject'](_0xf0a7f9['Injector']))],_0x1e2814);const _0x3bf006=_0x3d86cd(0x116),_0x402ac2={};var _0x4667ab=Object[_0x3d86cd(0xc7)],_0x4ea974=(_0x5b5222,_0x4b2e6c,_0x2ee8ca,_0x358616)=>{const _0x550c56=_0x3d86cd;for(var _0x11a6a7=_0x358616>0x1?void 0x0:_0x358616?_0x4667ab(_0x4b2e6c,_0x2ee8ca):_0x4b2e6c,_0x19932d=_0x5b5222[_0x550c56(0x11a)]-0x1,_0x51fe66;_0x19932d>=0x0;_0x19932d--)(_0x51fe66=_0x5b5222[_0x19932d])&&(_0x11a6a7=_0x51fe66(_0x11a6a7)||_0x11a6a7);return _0x11a6a7;},_0x146181=(_0x50793d,_0x4d0d64)=>(_0x5499df,_0x30573c)=>_0x4d0d64(_0x5499df,_0x30573c,_0x50793d);function _0x5b3df(_0x25fd8a,_0x4c01e5){const _0x449767=_0x3d86cd,_0x35f691=_0x25fd8a[_0x449767(0xca)][0x0];return{..._0x4c01e5,'id':_0x35f691['replyId'],'resolved':_0x25fd8a[_0x449767(0xb0)]===0x1,'dT':_0x20ca0e(_0x35f691['createTimestamp']),'personId':_0x35f691[_0x449767(0xe0)],'threadId':_0x35f691[_0x449767(0xf5)]};}function _0x1b50fd(_0x5cab63,_0x4233de,_0x3d4381){const _0x459306=_0x3d86cd;var _0x2b7e1b,_0x271e9d;if(((_0x271e9d=(_0x2b7e1b=_0x5cab63==null?void 0x0:_0x5cab63[_0x459306(0xca)])==null?void 0x0:_0x2b7e1b[_0x459306(0x11a)])!=null?_0x271e9d:0x0)>0x0){const _0x26659a=(_0x30018a,_0x1e736f)=>({'id':_0x30018a['replyId'],'threadId':_0x30018a[_0x459306(0xf5)],'dT':_0x20ca0e(_0x30018a['createTimestamp']),'personId':_0x30018a[_0x459306(0xe0)],'resolved':_0x5cab63['solved']===_0x5b6eb6[_0x459306(0xfa)],'unitId':_0x4233de,'subUnitId':_0x3d4381,'text':JSON['parse'](_0x30018a[_0x459306(0xb5)]),'parentId':_0x1e736f}),_0x4adcf4=_0x26659a(_0x5cab63[_0x459306(0xca)][0x0]);return{..._0x4adcf4,'children':_0x5cab63[_0x459306(0xca)]['slice'](0x1)[_0x459306(0x9f)](_0x18e4a4=>_0x26659a(_0x18e4a4,_0x4adcf4['id']))};}return null;}let _0x3f497e=class{constructor(_0xc9e66a,_0xe5ca1a,_0x573e5,_0x38c9c0){const _0x419c04=_0x3d86cd;this['_httpService']=_0xc9e66a,this[_0x419c04(0xc8)]=_0xe5ca1a,this[_0x419c04(0x109)]=_0x573e5,this['_injector']=_0x38c9c0;}async[_0x3d86cd(0xa2)](_0x5d8c69){const _0x4b338e=_0x3d86cd;var _0x54dc35,_0xa9dcf4;const {parentId:_0x2c27b7,unitId:_0x142643,text:_0x3c53d6,threadId:_0x493157}=_0x5d8c69,_0x5fd3b1=(_0xa9dcf4=(_0x54dc35=_0x3c53d6['customRanges'])==null?void 0x0:_0x54dc35[_0x4b338e(0xc9)](_0x2bc785=>_0x2bc785[_0x4b338e(0x112)]===_0xf0a7f9['CustomRangeType'][_0x4b338e(0x103)])['map'](_0x46475f=>_0x46475f[_0x4b338e(0xa6)]))!=null?_0xa9dcf4:[],_0x573a7c=JSON[_0x4b338e(0xf3)](_0x3c53d6),_0x19d95d=(await this['_sessionService']['requireSession'](_0x142643))['getMemberID']();if(_0x2c27b7){const _0xfed5ea={'memberId':_0x19d95d,'unitId':_0x142643,'content':_0x573a7c,'mention':_0x5fd3b1,'threadId':_0x493157},_0xfc6870=(await this[_0x4b338e(0x10d)][_0x4b338e(0xd7)](_0x4b338e(0x9e)+_0x142643+_0x4b338e(0xd2),{'body':_0xfed5ea}))[_0x4b338e(0xb9)][_0x4b338e(0xd3)];return{..._0x5d8c69,'id':_0xfc6870[_0x4b338e(0xd1)],'dT':_0xf0a7f9[_0x4b338e(0xd5)](+_0xfc6870[_0x4b338e(0xa9)])[_0x4b338e(0xc2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xfc6870[_0x4b338e(0xe0)]};}else{const _0x3cf0d3={'memberId':_0x19d95d,'unitId':_0x142643,'content':_0x573a7c,'mention':_0x5fd3b1},_0x589b86=await this['_httpService'][_0x4b338e(0xd7)](_0x4b338e(0x9e)+_0x142643+'/add',{'body':_0x3cf0d3});return _0x5b3df(_0x589b86['body']['comment'],_0x5d8c69);}}async[_0x3d86cd(0xab)](_0x1ca750){const _0x4ecc68=_0x3d86cd;var _0x468908,_0x36528a;const {text:_0x1fe948,unitId:_0x26ae73}=_0x1ca750,_0x4276a4=(_0x36528a=(_0x468908=_0x1fe948[_0x4ecc68(0xf0)])==null?void 0x0:_0x468908[_0x4ecc68(0xc9)](_0x3c99cd=>_0x3c99cd[_0x4ecc68(0x112)]===_0xf0a7f9[_0x4ecc68(0xda)][_0x4ecc68(0x103)])[_0x4ecc68(0x9f)](_0x37cb3a=>_0x37cb3a[_0x4ecc68(0xa6)]))!=null?_0x36528a:[],_0x362617=JSON[_0x4ecc68(0xf3)](_0x1fe948),_0x2fe78a=_0x1ca750[_0x4ecc68(0xf5)],_0x48197b=_0x1ca750['id'],_0x3056a7={'memberId':(await this['_sessionService'][_0x4ecc68(0xcc)](_0x26ae73))[_0x4ecc68(0xe1)](),'unitId':_0x26ae73,'threadId':_0x2fe78a,'mention':_0x4276a4,'content':_0x362617,'replyId':_0x48197b},_0x102b76=await this[_0x4ecc68(0x10d)][_0x4ecc68(0xd7)](_0x4ecc68(0x9e)+_0x26ae73+_0x4ecc68(0xed),{'body':_0x3056a7});return!_0x102b76[_0x4ecc68(0xb9)][_0x4ecc68(0xa8)]||_0x102b76[_0x4ecc68(0xb9)][_0x4ecc68(0xa8)][_0x4ecc68(0xd4)]===0x1;}async[_0x3d86cd(0x117)](_0x2b4462){const _0x622d38=_0x3d86cd,{unitId:_0x23d565}=_0x2b4462,_0x1dd722=_0x2b4462['threadId'],_0x31429={'memberId':this[_0x622d38(0xc8)][_0x622d38(0x9d)]()[_0x622d38(0x108)],'unitId':_0x23d565,'threadId':_0x1dd722,'solved':_0x2b4462[_0x622d38(0xc1)]?_0x5b6eb6[_0x622d38(0xfa)]:_0x5b6eb6[_0x622d38(0x113)]},_0x544c18=await this[_0x622d38(0x10d)][_0x622d38(0xd7)](_0x622d38(0x9e)+_0x23d565+_0x622d38(0x10a),{'body':_0x31429});return!_0x544c18[_0x622d38(0xb9)][_0x622d38(0xa8)]||_0x544c18[_0x622d38(0xb9)][_0x622d38(0xa8)][_0x622d38(0xd4)]===0x1;}async['deleteComment'](_0x35c070,_0x2bf17f,_0x244851,_0x34b591){const _0x38ba82=_0x3d86cd,_0x53b487={'memberId':(await this[_0x38ba82(0x109)]['requireSession'](_0x35c070))[_0x38ba82(0xe1)](),'threadId':_0x244851,'replyId':_0x34b591,'unitId':_0x35c070},_0x458674=await this[_0x38ba82(0x10d)][_0x38ba82(0xd7)](_0x38ba82(0x9e)+_0x35c070+_0x38ba82(0xdc),{'body':_0x53b487});return!_0x458674[_0x38ba82(0xb9)][_0x38ba82(0xa8)]||_0x458674[_0x38ba82(0xb9)][_0x38ba82(0xa8)][_0x38ba82(0xd4)]===0x1;}async[_0x3d86cd(0xee)](_0x121a30,_0xabb2e3,_0x25f6aa){const _0x1fb4c4=_0x3d86cd,_0x2f6026={'unitId':_0x121a30,'threadId':_0x25f6aa},_0x4e2f21=await this[_0x1fb4c4(0x10d)][_0x1fb4c4(0xd7)](_0x1fb4c4(0x9e)+_0x121a30+_0x1fb4c4(0xef),{'body':_0x2f6026}),_0x5dc5a9=_0x25f6aa[_0x1fb4c4(0x9f)](_0x4b8982=>_0x1b50fd(_0x4e2f21['body'][_0x1fb4c4(0xa4)][_0x4b8982],_0x121a30,_0xabb2e3))[_0x1fb4c4(0xc9)](Boolean);return Object['values'](_0x4e2f21[_0x1fb4c4(0xb9)]['users'])[_0x1fb4c4(0x104)](_0x29ab4d=>{const _0x16b03e=_0x1fb4c4;this[_0x16b03e(0xc8)][_0x16b03e(0xa3)](_0x29ab4d);}),_0x5dc5a9;}[_0x3d86cd(0xbe)](_0x26ed38){const _0x3c514e=_0x3d86cd;return{'id':_0x26ed38['id'],'threadId':_0x26ed38[_0x3c514e(0xf5)],'ref':_0x26ed38['ref']};}};_0x3f497e=_0x4ea974([_0x146181(0x0,_0xf0a7f9['Inject'](_0x5e599c['HTTPService'])),_0x146181(0x1,_0xf0a7f9['Inject'](_0xf0a7f9[_0x3d86cd(0x110)])),_0x146181(0x2,_0xf0a7f9['Inject'](_0x153186[_0x3d86cd(0xbd)])),_0x146181(0x3,_0xf0a7f9[_0x3d86cd(0x11c)](_0xf0a7f9[_0x3d86cd(0xa1)]))],_0x3f497e);var _0x1e29e8=Object[_0x3d86cd(0xc7)],_0x3b5ad9=(_0x1e2374,_0x3f9146,_0x4b49f5,_0x3fec1c)=>{const _0x62f8c9=_0x3d86cd;for(var _0x62be45=_0x3fec1c>0x1?void 0x0:_0x3fec1c?_0x1e29e8(_0x3f9146,_0x4b49f5):_0x3f9146,_0x185969=_0x1e2374[_0x62f8c9(0x11a)]-0x1,_0x433971;_0x185969>=0x0;_0x185969--)(_0x433971=_0x1e2374[_0x185969])&&(_0x62be45=_0x433971(_0x62be45)||_0x62be45);return _0x62be45;},_0x495dbf=(_0x2deb35,_0x51dc29)=>(_0x18e373,_0x1a6a96)=>_0x51dc29(_0x18e373,_0x1a6a96,_0x2deb35);let _0x32f0ff=class extends _0xf0a7f9['Disposable']{constructor(_0x21fc35,_0x38e540){const _0x2a2a67=_0x3d86cd;super(),this['_threadCommentDataSourceService']=_0x21fc35,this[_0x2a2a67(0x10f)]=_0x38e540,this[_0x2a2a67(0xe4)]();}[_0x3d86cd(0xe4)](){const _0x51503a=_0x3d86cd;this[_0x51503a(0xdd)][_0x51503a(0x101)]=this[_0x51503a(0x10f)],this[_0x51503a(0xdd)][_0x51503a(0x9c)]=!0x1;}};_0x32f0ff=_0x3b5ad9([_0x495dbf(0x0,_0x37eabe[_0x3d86cd(0xb8)]),_0x495dbf(0x1,_0xf0a7f9[_0x3d86cd(0x11c)](_0x3f497e))],_0x32f0ff);var _0x2d7605=Object[_0x3d86cd(0xdf)],_0x547fa0=Object[_0x3d86cd(0xc7)],_0x24a756=(_0x4d58e1,_0x27856a,_0x52ec5f)=>_0x27856a in _0x4d58e1?_0x2d7605(_0x4d58e1,_0x27856a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x52ec5f}):_0x4d58e1[_0x27856a]=_0x52ec5f,_0x3e8b14=(_0x3c40cc,_0x5627fe,_0x41db16,_0x2371d4)=>{const _0x50dcfb=_0x3d86cd;for(var _0x2a1fdf=_0x2371d4>0x1?void 0x0:_0x2371d4?_0x547fa0(_0x5627fe,_0x41db16):_0x5627fe,_0x3c8c53=_0x3c40cc[_0x50dcfb(0x11a)]-0x1,_0x2c3f12;_0x3c8c53>=0x0;_0x3c8c53--)(_0x2c3f12=_0x3c40cc[_0x3c8c53])&&(_0x2a1fdf=_0x2c3f12(_0x2a1fdf)||_0x2a1fdf);return _0x2a1fdf;},_0x5c866c=(_0x44c042,_0x14eeba)=>(_0x1c0148,_0x55c8e6)=>_0x14eeba(_0x1c0148,_0x55c8e6,_0x44c042),_0x533b80=(_0x2bce90,_0x4ceeab,_0x3e1ffc)=>_0x24a756(_0x2bce90,typeof _0x4ceeab!='symbol'?_0x4ceeab+'':_0x4ceeab,_0x3e1ffc);_0x2b4972['UniverThreadCommentDataSourcePlugin']=class extends _0xf0a7f9[_0x3d86cd(0xaa)]{constructor(_0x54dcd6=_0x402ac2,_0x4f4fab,_0x16d95e){const _0x2bb48b=_0x3d86cd;super(),this[_0x2bb48b(0xe2)]=_0x54dcd6,this[_0x2bb48b(0xb3)]=_0x4f4fab,this[_0x2bb48b(0xd8)]=_0x16d95e;const {..._0x32238f}=_0xf0a7f9['merge']({},_0x402ac2,this[_0x2bb48b(0xe2)]);this[_0x2bb48b(0xd8)]['setConfig'](_0x3bf006,_0x32238f);}[_0x3d86cd(0x11d)](){const _0x94bd36=_0x3d86cd;[[_0x3f497e],[_0x32f0ff],[_0x1e2814]][_0x94bd36(0x104)](_0x19b09c=>{this['_injector']['add'](_0x19b09c);});}[_0x3d86cd(0xe8)](){const _0x56fb42=_0x3d86cd;this[_0x56fb42(0xb3)][_0x56fb42(0xb7)](_0x32f0ff),this[_0x56fb42(0xb3)]['get'](_0x1e2814);}},_0x533b80(_0x2b4972['UniverThreadCommentDataSourcePlugin'],_0x3d86cd(0xdb),_0x3399c7),_0x533b80(_0x2b4972[_0x3d86cd(0xd9)],_0x3d86cd(0xf7),_0xf0a7f9[_0x3d86cd(0xb1)]['UNIVER_UNKNOWN']),_0x2b4972['UniverThreadCommentDataSourcePlugin']=_0x3e8b14([_0xf0a7f9['DependentOn'](_0x56cf0c[_0x3d86cd(0xfd)],_0x153186[_0x3d86cd(0xc0)],_0x1b4088['UniverLicensePlugin']),_0x5c866c(0x1,_0xf0a7f9[_0x3d86cd(0x11c)](_0xf0a7f9[_0x3d86cd(0xa1)])),_0x5c866c(0x2,_0xf0a7f9['IConfigService'])],_0x2b4972[_0x3d86cd(0xd9)]),Object['defineProperty'](_0x2b4972,Symbol[_0x3d86cd(0xa0)],{'value':_0x3d86cd(0xa5)});}));
|
|
1
|
+
function _0x9c66(_0x4fd26b,_0x24227b){const _0x1bc199=_0x1bc1();return _0x9c66=function(_0x9c6674,_0x50a6fc){_0x9c6674=_0x9c6674-0x16b;let _0x558e0c=_0x1bc199[_0x9c6674];return _0x558e0c;},_0x9c66(_0x4fd26b,_0x24227b);}(function(_0x522af9,_0xa63a84){const _0x4f66a4=_0x9c66,_0x46b7a6=_0x522af9();while(!![]){try{const _0xc66557=parseInt(_0x4f66a4(0x1be))/0x1+parseInt(_0x4f66a4(0x17b))/0x2+-parseInt(_0x4f66a4(0x1d6))/0x3*(-parseInt(_0x4f66a4(0x1c2))/0x4)+-parseInt(_0x4f66a4(0x1d9))/0x5+-parseInt(_0x4f66a4(0x199))/0x6*(parseInt(_0x4f66a4(0x1a2))/0x7)+-parseInt(_0x4f66a4(0x1b9))/0x8*(parseInt(_0x4f66a4(0x16d))/0x9)+parseInt(_0x4f66a4(0x1e8))/0xa;if(_0xc66557===_0xa63a84)break;else _0x46b7a6['push'](_0x46b7a6['shift']());}catch(_0x41d989){_0x46b7a6['push'](_0x46b7a6['shift']());}}}(_0x1bc1,0x8d443),function(_0xd15df2,_0x1070ac){const _0x248ba7=_0x9c66;typeof exports==_0x248ba7(0x1b1)&&typeof module<'u'?_0x1070ac(exports,require(_0x248ba7(0x189)),require('@univerjs-pro/license'),require(_0x248ba7(0x1e1)),require(_0x248ba7(0x1c6)),require('@univerjs/thread-comment'),require(_0x248ba7(0x18d)),require('@univerjs/network')):typeof define==_0x248ba7(0x1af)&&define[_0x248ba7(0x1b7)]?define([_0x248ba7(0x182),_0x248ba7(0x189),_0x248ba7(0x1df),'@univerjs/core',_0x248ba7(0x1c6),_0x248ba7(0x1cd),_0x248ba7(0x18d),_0x248ba7(0x1e3)],_0x1070ac):(_0xd15df2=typeof globalThis<'u'?globalThis:_0xd15df2||self,_0x1070ac(_0xd15df2['UniverProThreadCommentDatasource']={},_0xd15df2[_0x248ba7(0x184)],_0xd15df2[_0x248ba7(0x19e)],_0xd15df2[_0x248ba7(0x1b4)],_0xd15df2['UniverThreadCommentUi'],_0xd15df2[_0x248ba7(0x1de)],_0xd15df2[_0x248ba7(0x18d)],_0xd15df2[_0x248ba7(0x1e7)]));}(this,function(_0x1ad1c5,_0x3da2f6,_0x12ab7f,_0x730e63,_0xbcf123,_0x252d16,_0x4aee38,_0x9c1422){'use strict';const _0x526347=_0x9c66;const _0x388432='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x288c1b=(_0x156b16=>(_0x156b16[_0x156b16['OpenOrReOpen']=0x0]=_0x526347(0x1f2),_0x156b16[_0x156b16[_0x526347(0x1ce)]=0x1]=_0x526347(0x1ce),_0x156b16[_0x156b16['UNRECOGNIZED']=-0x1]=_0x526347(0x1ac),_0x156b16))(_0x288c1b||{}),_0x4a2610=(_0x29a46b=>(_0x29a46b[_0x29a46b[_0x526347(0x1d3)]=0x0]='Unknown',_0x29a46b[_0x29a46b['Add']=0x1]=_0x526347(0x17d),_0x29a46b[_0x29a46b[_0x526347(0x19c)]=0x2]=_0x526347(0x19c),_0x29a46b[_0x29a46b[_0x526347(0x18a)]=0x3]=_0x526347(0x18a),_0x29a46b[_0x29a46b[_0x526347(0x17e)]=0x4]='Delete',_0x29a46b[_0x29a46b[_0x526347(0x19d)]=0x5]='Solve',_0x29a46b[_0x29a46b[_0x526347(0x1ac)]=-0x1]=_0x526347(0x1ac),_0x29a46b))(_0x4a2610||{});const _0x595984=_0x37d534=>_0x730e63[_0x526347(0x1bf)](new Date(+_0x37d534))['format'](_0x526347(0x1c5)),_0x31c9ab=async(_0x5666a0,_0x20f92e)=>{const _0x13da37=_0x526347,_0x58bf0b=_0x5666a0['get'](_0x730e63[_0x13da37(0x16b)]),_0x357efa=_0x5666a0[_0x13da37(0x1d7)](_0x9c1422[_0x13da37(0x196)]);_0x20f92e[_0x13da37(0x1cc)](_0x4d2a98=>{const _0x262a75=_0x13da37;_0x58bf0b[_0x262a75(0x1ec)](_0x4d2a98)&&_0x20f92e['delete'](_0x4d2a98);}),_0x20f92e[_0x13da37(0x1a5)]&&(await _0x357efa['get'](_0x13da37(0x1b2),{'params':{'userIDs':[..._0x20f92e]}}))[_0x13da37(0x193)][_0x13da37(0x1da)][_0x13da37(0x1cc)](_0x168bdf=>{const _0x22c44b=_0x13da37;_0x168bdf&&_0x58bf0b[_0x22c44b(0x173)](_0x168bdf);});};var _0x84bd5f=Object[_0x526347(0x1d4)],_0x1653cf=(_0x1bd948,_0x3dcab5,_0xa6a13e,_0x5006f2)=>{for(var _0x2b8169=_0x5006f2>0x1?void 0x0:_0x5006f2?_0x84bd5f(_0x3dcab5,_0xa6a13e):_0x3dcab5,_0x52577f=_0x1bd948['length']-0x1,_0x465f41;_0x52577f>=0x0;_0x52577f--)(_0x465f41=_0x1bd948[_0x52577f])&&(_0x2b8169=_0x465f41(_0x2b8169)||_0x2b8169);return _0x2b8169;},_0x4c634e=(_0x2a4211,_0x32036e)=>(_0x2487ed,_0xd95466)=>_0x32036e(_0x2487ed,_0xd95466,_0x2a4211);let _0x2b9ef5=class extends _0x730e63['Disposable']{constructor(_0xb469f9,_0x119593,_0x43bbc2,_0x19f892){const _0x1abcfe=_0x526347;super(),this[_0x1abcfe(0x179)]=_0xb469f9,this['_threadCommentModel']=_0x119593,this[_0x1abcfe(0x1b8)]=_0x43bbc2,this[_0x1abcfe(0x192)]=_0x19f892,this[_0x1abcfe(0x1d1)](),this[_0x1abcfe(0x177)]();}[_0x526347(0x177)](){const _0x534ecd=_0x526347;this[_0x534ecd(0x1aa)](this['_threadCommentModel']['commentUpdate$'][_0x534ecd(0x1db)](_0x4aee38['bufferTime'](0x10))['subscribe'](_0x320c1b=>{const _0x54e0f4=_0x534ecd,_0x3b73e4=new Set();_0x320c1b['forEach'](_0x1a3ff0=>{const _0x2832d4=_0x9c66;switch(_0x1a3ff0[_0x2832d4(0x198)]){case _0x2832d4(0x1b0):{const _0x2a3409=_0x1a3ff0[_0x2832d4(0x1ea)][_0x2832d4(0x186)];_0x3b73e4[_0x2832d4(0x1b0)](_0x2a3409);break;}}}),_0x31c9ab(this[_0x54e0f4(0x192)],_0x3b73e4);}));}[_0x526347(0x1d1)](){const _0x48a301=_0x526347;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x48a301(0x18e)](async _0x39a193=>{const _0x4c5747=_0x48a301;var _0x194abf,_0x1c6e2e,_0x438718,_0x483b27;const _0x3a3dd2=(_0x194abf=this[_0x4c5747(0x1c1)][_0x4c5747(0x183)](_0x39a193[_0x4c5747(0x1ca)])[_0x4c5747(0x1b3)](_0x1c153a=>_0x1c153a[_0x4c5747(0x188)]===_0x39a193[_0x4c5747(0x188)]))==null?void 0x0:_0x194abf['root'];if(!_0x3a3dd2)return;const {unitId:_0x442273,subUnitId:_0x3ab2d2}=_0x3a3dd2;switch(_0x39a193['user']&&this[_0x4c5747(0x1b8)][_0x4c5747(0x173)](_0x39a193[_0x4c5747(0x1a0)]),_0x39a193[_0x4c5747(0x198)]){case _0x4a2610[_0x4c5747(0x17d)]:break;case _0x4a2610['Reply']:{this[_0x4c5747(0x1c1)][_0x4c5747(0x194)](_0x442273,_0x3ab2d2,{'unitId':_0x442273,'subUnitId':_0x3ab2d2,'ref':'','id':_0x39a193[_0x4c5747(0x1c3)],'dT':_0x595984(+_0x39a193['createTimestamp']),'threadId':_0x39a193[_0x4c5747(0x188)],'personId':(_0x438718=(_0x1c6e2e=_0x39a193[_0x4c5747(0x1a0)])==null?void 0x0:_0x1c6e2e[_0x4c5747(0x1dc)])!=null?_0x438718:_0x39a193[_0x4c5747(0x1a9)],'text':JSON['parse'](_0x39a193[_0x4c5747(0x190)]),'parentId':_0x3a3dd2['id']});break;}case _0x4a2610[_0x4c5747(0x17e)]:{const _0xe50022=this[_0x4c5747(0x1c1)]['getComment'](_0x442273,_0x3ab2d2,_0x39a193['replyId']);_0xe50022&&_0xe50022[_0x4c5747(0x1bb)]&&this[_0x4c5747(0x1c1)][_0x4c5747(0x17f)](_0x442273,_0x3ab2d2,_0x39a193[_0x4c5747(0x1c3)]);break;}case _0x4a2610[_0x4c5747(0x18a)]:{this[_0x4c5747(0x1c1)]['updateComment'](_0x442273,_0x3ab2d2,{'commentId':_0x39a193[_0x4c5747(0x1c3)],'text':JSON[_0x4c5747(0x16f)](_0x39a193[_0x4c5747(0x190)])});break;}case _0x4a2610['Solve']:{const _0xe9729e=(_0x483b27=this[_0x4c5747(0x1c1)][_0x4c5747(0x183)](_0x39a193[_0x4c5747(0x1ca)])[_0x4c5747(0x1b3)](_0x2ed3f1=>_0x2ed3f1[_0x4c5747(0x188)]===_0x39a193[_0x4c5747(0x188)]))==null?void 0x0:_0x483b27[_0x4c5747(0x1bd)];_0xe9729e&&this[_0x4c5747(0x1c1)]['resolveComment'](_0x442273,_0x3ab2d2,_0xe9729e['id'],_0x39a193[_0x4c5747(0x19f)]===_0x288c1b['Solved']);break;}}}));}};_0x2b9ef5=_0x1653cf([_0x4c634e(0x0,_0x730e63[_0x526347(0x1cb)](_0x3da2f6['CommentService'])),_0x4c634e(0x1,_0x730e63[_0x526347(0x1cb)](_0x252d16['ThreadCommentModel'])),_0x4c634e(0x2,_0x730e63[_0x526347(0x1cb)](_0x730e63[_0x526347(0x16b)])),_0x4c634e(0x3,_0x730e63['Inject'](_0x730e63[_0x526347(0x1d2)]))],_0x2b9ef5);const _0x4c86bc=_0x526347(0x1d5),_0x2b3d41={};var _0x1b4bb2=Object[_0x526347(0x1d4)],_0x73a455=(_0x271c44,_0x53911b,_0x5a5fdd,_0x2031ab)=>{for(var _0x3c50e1=_0x2031ab>0x1?void 0x0:_0x2031ab?_0x1b4bb2(_0x53911b,_0x5a5fdd):_0x53911b,_0x280157=_0x271c44['length']-0x1,_0x1e1879;_0x280157>=0x0;_0x280157--)(_0x1e1879=_0x271c44[_0x280157])&&(_0x3c50e1=_0x1e1879(_0x3c50e1)||_0x3c50e1);return _0x3c50e1;},_0x32ffd8=(_0x5ed110,_0x2a26de)=>(_0x545bee,_0x472252)=>_0x2a26de(_0x545bee,_0x472252,_0x5ed110);function _0x53fba0(_0x502790,_0x40d9d5){const _0x41aa7e=_0x526347,_0x25ab48=_0x502790[_0x41aa7e(0x1ae)][0x0];return{..._0x40d9d5,'id':_0x25ab48[_0x41aa7e(0x1c3)],'resolved':_0x502790[_0x41aa7e(0x19f)]===0x1,'dT':_0x595984(_0x25ab48[_0x41aa7e(0x191)]),'personId':_0x25ab48[_0x41aa7e(0x1a9)],'threadId':_0x25ab48[_0x41aa7e(0x188)]};}function _0xeca9b0(_0x43a60e,_0xe941bf,_0x955c1e){const _0x48c7ac=_0x526347;var _0x362de4,_0x250704;if(((_0x250704=(_0x362de4=_0x43a60e==null?void 0x0:_0x43a60e[_0x48c7ac(0x1ae)])==null?void 0x0:_0x362de4[_0x48c7ac(0x19b)])!=null?_0x250704:0x0)>0x0){const _0xd789d2=(_0x4f73f4,_0x2c78b8)=>({'id':_0x4f73f4['replyId'],'threadId':_0x4f73f4[_0x48c7ac(0x188)],'dT':_0x595984(_0x4f73f4[_0x48c7ac(0x191)]),'personId':_0x4f73f4[_0x48c7ac(0x1a9)],'resolved':_0x43a60e[_0x48c7ac(0x19f)]===_0x288c1b[_0x48c7ac(0x1ce)],'unitId':_0xe941bf,'subUnitId':_0x955c1e,'text':JSON[_0x48c7ac(0x16f)](_0x4f73f4['content']),'parentId':_0x2c78b8}),_0x4bac9f=_0xd789d2(_0x43a60e[_0x48c7ac(0x1ae)][0x0]);return{..._0x4bac9f,'children':_0x43a60e[_0x48c7ac(0x1ae)][_0x48c7ac(0x18c)](0x1)[_0x48c7ac(0x1ef)](_0x49319a=>_0xd789d2(_0x49319a,_0x4bac9f['id']))};}return null;}let _0x134674=class{constructor(_0x16fc05,_0x1b09a9,_0x11cfc2,_0x41527b){const _0x5c38db=_0x526347;this[_0x5c38db(0x1c7)]=_0x16fc05,this[_0x5c38db(0x1b8)]=_0x1b09a9,this[_0x5c38db(0x178)]=_0x11cfc2,this['_injector']=_0x41527b;}async['addComment'](_0x228dbe){const _0x29f060=_0x526347;var _0x2c2d4d,_0x4d0083;const {parentId:_0xd6f596,unitId:_0x443eac,text:_0x4d0dd3,threadId:_0x321a12}=_0x228dbe,_0x433ed8=(_0x4d0083=(_0x2c2d4d=_0x4d0dd3[_0x29f060(0x172)])==null?void 0x0:_0x2c2d4d[_0x29f060(0x181)](_0x2643ec=>_0x2643ec['rangeType']===_0x730e63[_0x29f060(0x17c)]['COMMENT'])[_0x29f060(0x1ef)](_0x211d2c=>_0x211d2c[_0x29f060(0x16e)]))!=null?_0x4d0083:[],_0x34e46b=JSON['stringify'](_0x4d0dd3),_0x2f8fce=(await this[_0x29f060(0x178)][_0x29f060(0x1e0)](_0x443eac))[_0x29f060(0x1bc)]();if(_0xd6f596){const _0x4e4cfd={'memberId':_0x2f8fce,'unitId':_0x443eac,'content':_0x34e46b,'mention':_0x433ed8,'threadId':_0x321a12},_0x460305=(await this[_0x29f060(0x1c7)][_0x29f060(0x1f3)]('/universer-api/comment/unit/'+_0x443eac+'/reply',{'body':_0x4e4cfd}))[_0x29f060(0x193)][_0x29f060(0x1c8)];return{..._0x228dbe,'id':_0x460305[_0x29f060(0x1c3)],'dT':_0x730e63[_0x29f060(0x1bf)](+_0x460305[_0x29f060(0x191)])[_0x29f060(0x180)](_0x29f060(0x1c5)),'personId':_0x460305[_0x29f060(0x1a9)]};}else{const _0x1ab6d4={'memberId':_0x2f8fce,'unitId':_0x443eac,'content':_0x34e46b,'mention':_0x433ed8},_0x211b46=await this['_httpService'][_0x29f060(0x1f3)](_0x29f060(0x195)+_0x443eac+_0x29f060(0x1c4),{'body':_0x1ab6d4});return _0x53fba0(_0x211b46['body'][_0x29f060(0x1a1)],_0x228dbe);}}async[_0x526347(0x1d8)](_0x9ee04a){const _0x5afffe=_0x526347;var _0x14a240,_0x4d0b85;const {text:_0x2f52a2,unitId:_0x18d5de}=_0x9ee04a,_0x17836c=(_0x4d0b85=(_0x14a240=_0x2f52a2['customRanges'])==null?void 0x0:_0x14a240[_0x5afffe(0x181)](_0x4224fe=>_0x4224fe[_0x5afffe(0x197)]===_0x730e63[_0x5afffe(0x17c)][_0x5afffe(0x17a)])['map'](_0x102a4e=>_0x102a4e[_0x5afffe(0x16e)]))!=null?_0x4d0b85:[],_0x3c7627=JSON['stringify'](_0x2f52a2),_0x1930cd=_0x9ee04a[_0x5afffe(0x188)],_0x1858e7=_0x9ee04a['id'],_0x2c7c2a={'memberId':(await this['_sessionService'][_0x5afffe(0x1e0)](_0x18d5de))[_0x5afffe(0x1bc)](),'unitId':_0x18d5de,'threadId':_0x1930cd,'mention':_0x17836c,'content':_0x3c7627,'replyId':_0x1858e7},_0xb39811=await this['_httpService'][_0x5afffe(0x1f3)]('/universer-api/comment/unit/'+_0x18d5de+_0x5afffe(0x1ba),{'body':_0x2c7c2a});return!_0xb39811[_0x5afffe(0x193)][_0x5afffe(0x18b)]||_0xb39811[_0x5afffe(0x193)][_0x5afffe(0x18b)][_0x5afffe(0x1eb)]===0x1;}async[_0x526347(0x1a4)](_0x33c2c7){const _0x530386=_0x526347,{unitId:_0x4819b3}=_0x33c2c7,_0x5d7d3a=_0x33c2c7['threadId'],_0x45a40e={'memberId':this['_userService'][_0x530386(0x170)]()['userID'],'unitId':_0x4819b3,'threadId':_0x5d7d3a,'solved':_0x33c2c7[_0x530386(0x174)]?_0x288c1b[_0x530386(0x1ce)]:_0x288c1b[_0x530386(0x1f2)]},_0x5d83ac=await this[_0x530386(0x1c7)]['post'](_0x530386(0x195)+_0x4819b3+_0x530386(0x1ad),{'body':_0x45a40e});return!_0x5d83ac[_0x530386(0x193)][_0x530386(0x18b)]||_0x5d83ac[_0x530386(0x193)][_0x530386(0x18b)][_0x530386(0x1eb)]===0x1;}async[_0x526347(0x17f)](_0x3106d2,_0x45298d,_0x45ab6e,_0x2129af){const _0x37515b=_0x526347,_0x1be74f={'memberId':(await this[_0x37515b(0x178)]['requireSession'](_0x3106d2))[_0x37515b(0x1bc)](),'threadId':_0x45ab6e,'replyId':_0x2129af,'unitId':_0x3106d2},_0x37cefe=await this[_0x37515b(0x1c7)]['post'](_0x37515b(0x195)+_0x3106d2+'/delete',{'body':_0x1be74f});return!_0x37cefe[_0x37515b(0x193)][_0x37515b(0x18b)]||_0x37cefe['body'][_0x37515b(0x18b)][_0x37515b(0x1eb)]===0x1;}async[_0x526347(0x1c0)](_0x221820,_0x4a4e01,_0x4df2e5){const _0x57139a=_0x526347,_0x53095d={'unitId':_0x221820,'threadId':_0x4df2e5},_0x41d8dc=await this['_httpService'][_0x57139a(0x1f3)](_0x57139a(0x195)+_0x221820+_0x57139a(0x176),{'body':_0x53095d}),_0x32c833=_0x4df2e5[_0x57139a(0x1ef)](_0x55021b=>_0xeca9b0(_0x41d8dc[_0x57139a(0x193)][_0x57139a(0x1b5)][_0x55021b],_0x221820,_0x4a4e01))['filter'](Boolean);return Object['values'](_0x41d8dc[_0x57139a(0x193)][_0x57139a(0x1da)])[_0x57139a(0x1cc)](_0x784694=>{const _0x11cf84=_0x57139a;this[_0x11cf84(0x1b8)][_0x11cf84(0x173)](_0x784694);}),_0x32c833;}[_0x526347(0x185)](_0x5813cc){const _0x392bfd=_0x526347;return{'id':_0x5813cc['id'],'threadId':_0x5813cc[_0x392bfd(0x188)],'ref':_0x5813cc[_0x392bfd(0x187)]};}};_0x134674=_0x73a455([_0x32ffd8(0x0,_0x730e63[_0x526347(0x1cb)](_0x9c1422[_0x526347(0x196)])),_0x32ffd8(0x1,_0x730e63[_0x526347(0x1cb)](_0x730e63['UserManagerService'])),_0x32ffd8(0x2,_0x730e63[_0x526347(0x1cb)](_0x3da2f6[_0x526347(0x1a6)])),_0x32ffd8(0x3,_0x730e63['Inject'](_0x730e63[_0x526347(0x1d2)]))],_0x134674);var _0x5aac71=Object['getOwnPropertyDescriptor'],_0x4d99d3=(_0x2c2845,_0x5eab27,_0xeb04d4,_0xe55dc7)=>{for(var _0x10a577=_0xe55dc7>0x1?void 0x0:_0xe55dc7?_0x5aac71(_0x5eab27,_0xeb04d4):_0x5eab27,_0x275a8e=_0x2c2845['length']-0x1,_0x3e958f;_0x275a8e>=0x0;_0x275a8e--)(_0x3e958f=_0x2c2845[_0x275a8e])&&(_0x10a577=_0x3e958f(_0x10a577)||_0x10a577);return _0x10a577;},_0x10e0b1=(_0x4072a1,_0x4f7d28)=>(_0x47c6ed,_0x207660)=>_0x4f7d28(_0x47c6ed,_0x207660,_0x4072a1);let _0x321dd7=class extends _0x730e63[_0x526347(0x1cf)]{constructor(_0x30499d,_0x4635c9){const _0x1ae217=_0x526347;super(),this[_0x1ae217(0x1d0)]=_0x30499d,this[_0x1ae217(0x1ee)]=_0x4635c9,this['_initDataSource']();}[_0x526347(0x1e6)](){const _0x19cb4b=_0x526347;this['_threadCommentDataSourceService']['dataSource']=this[_0x19cb4b(0x1ee)],this[_0x19cb4b(0x1d0)][_0x19cb4b(0x1f0)]=!0x1;}};_0x321dd7=_0x4d99d3([_0x10e0b1(0x0,_0x252d16[_0x526347(0x19a)]),_0x10e0b1(0x1,_0x730e63[_0x526347(0x1cb)](_0x134674))],_0x321dd7);var _0x30189e=Object[_0x526347(0x1e2)],_0x47f719=Object[_0x526347(0x1d4)],_0x238e82=(_0x194c5d,_0xe8a81d,_0x27ce65)=>_0xe8a81d in _0x194c5d?_0x30189e(_0x194c5d,_0xe8a81d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x27ce65}):_0x194c5d[_0xe8a81d]=_0x27ce65,_0x39bd85=(_0x3f5948,_0x283b30,_0x45ef5c,_0x37a999)=>{for(var _0x404e50=_0x37a999>0x1?void 0x0:_0x37a999?_0x47f719(_0x283b30,_0x45ef5c):_0x283b30,_0x2f5d95=_0x3f5948['length']-0x1,_0x18e091;_0x2f5d95>=0x0;_0x2f5d95--)(_0x18e091=_0x3f5948[_0x2f5d95])&&(_0x404e50=_0x18e091(_0x404e50)||_0x404e50);return _0x404e50;},_0x5b49fc=(_0x703ee5,_0x3e0351)=>(_0x488e0e,_0x5dff90)=>_0x3e0351(_0x488e0e,_0x5dff90,_0x703ee5),_0x5f027e=(_0x457aa6,_0x1f7004,_0x4c81bc)=>_0x238e82(_0x457aa6,typeof _0x1f7004!=_0x526347(0x1a3)?_0x1f7004+'':_0x1f7004,_0x4c81bc);_0x1ad1c5[_0x526347(0x1b6)]=class extends _0x730e63['Plugin']{constructor(_0x132335=_0x2b3d41,_0x16a106,_0x55f53c){const _0x20e1ee=_0x526347;super(),this[_0x20e1ee(0x1f1)]=_0x132335,this[_0x20e1ee(0x192)]=_0x16a106,this[_0x20e1ee(0x1a7)]=_0x55f53c;const {..._0x2f1dcd}=_0x730e63['merge']({},_0x2b3d41,this['_config']);this[_0x20e1ee(0x1a7)][_0x20e1ee(0x175)](_0x4c86bc,_0x2f1dcd);}[_0x526347(0x1ed)](){const _0x1c1560=_0x526347;[[_0x134674],[_0x321dd7],[_0x2b9ef5]][_0x1c1560(0x1cc)](_0x26fdef=>{const _0x128c6f=_0x1c1560;this['_injector'][_0x128c6f(0x1b0)](_0x26fdef);});}[_0x526347(0x1a8)](){const _0x3be84c=_0x526347;this[_0x3be84c(0x192)][_0x3be84c(0x1d7)](_0x321dd7),this[_0x3be84c(0x192)][_0x3be84c(0x1d7)](_0x2b9ef5);}},_0x5f027e(_0x1ad1c5[_0x526347(0x1b6)],_0x526347(0x1e4),_0x388432),_0x5f027e(_0x1ad1c5[_0x526347(0x1b6)],_0x526347(0x198),_0x730e63['UniverInstanceType'][_0x526347(0x18f)]),_0x1ad1c5['UniverThreadCommentDataSourcePlugin']=_0x39bd85([_0x730e63[_0x526347(0x1ab)](_0xbcf123[_0x526347(0x1e9)],_0x3da2f6[_0x526347(0x1dd)],_0x12ab7f[_0x526347(0x1c9)]),_0x5b49fc(0x1,_0x730e63['Inject'](_0x730e63['Injector'])),_0x5b49fc(0x2,_0x730e63[_0x526347(0x16c)])],_0x1ad1c5[_0x526347(0x1b6)]),Object['defineProperty'](_0x1ad1c5,Symbol[_0x526347(0x171)],{'value':_0x526347(0x1e5)});}));function _0x1bc1(){const _0x106526=['getOwnPropertyDescriptor','thread-comment-data-source.config','1062MniDIK','get','updateComment','5522055fkxcaW','users','pipe','userID','UniverCollaborationClientPlugin','UniverThreadComment','@univerjs-pro/license','requireSession','@univerjs/core','defineProperty','@univerjs/network','pluginName','Module','_initDataSource','UniverNetwork','2515140Ysmyqf','UniverThreadCommentUIPlugin','payload','code','getUser','onStarting','_threadCommentDataSource','map','syncUpdateMutationToColla','_config','OpenOrReOpen','post','UserManagerService','IConfigService','90nZHoCC','rangeId','parse','getCurrentUser','toStringTag','customRanges','addUser','resolved','setConfig','/list','_initUserSync','_sessionService','_commentService','COMMENT','2070934Ggjjsp','CustomRangeType','Add','Delete','deleteComment','format','filter','exports','getUnit','UniverProCollaborationClient','saveCommentToSnapshot','personId','ref','threadId','@univerjs-pro/collaboration-client','Edit','error','slice','rxjs','subscribe','UNIVER_UNKNOWN','content','createTimestamp','_injector','body','addComment','/universer-api/comment/unit/','HTTPService','rangeType','type','580614DzfkEe','IThreadCommentDataSourceService','length','Reply','Solve','UniverProLicense','solved','user','comment','21LoKiXo','symbol','resolveComment','size','CollaborationSessionService','_configService','onReady','userId','disposeWithMe','DependentOn','UNRECOGNIZED','/solved','replies','function','add','object','/universer-api/user/list','find','UniverCore','comments','UniverThreadCommentDataSourcePlugin','amd','_userService','361664TZPCor','/edit','parentId','getMemberID','root','655942RTBXQm','dayjs','listComments','_threadCommentModel','5452YTWcdn','replyId','/add','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment-ui','_httpService','reply','UniverLicensePlugin','unitId','Inject','forEach','@univerjs/thread-comment','Solved','Disposable','_threadCommentDataSourceService','_init','Injector','Unknown'];_0x1bc1=function(){return _0x106526;};return _0x1bc1();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.10-experimental.
|
|
3
|
+
"version": "0.6.10-experimental.20250427-173dc06",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.10-experimental.
|
|
49
|
-
"@univerjs-pro/license": "0.6.10-experimental.
|
|
50
|
-
"@univerjs/network": "0.6.10-experimental.
|
|
51
|
-
"@univerjs/core": "0.6.10-experimental.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.10-experimental.20250427-173dc06",
|
|
49
|
+
"@univerjs-pro/license": "0.6.10-experimental.20250427-173dc06",
|
|
50
|
+
"@univerjs/network": "0.6.10-experimental.20250427-173dc06",
|
|
51
|
+
"@univerjs/core": "0.6.10-experimental.20250427-173dc06",
|
|
52
52
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
53
|
-
"@univerjs/thread-comment": "0.6.10-experimental.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.6.10-experimental.
|
|
53
|
+
"@univerjs/thread-comment": "0.6.10-experimental.20250427-173dc06",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.10-experimental.20250427-173dc06"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.0",
|
|
60
|
-
"vitest": "^3.1.
|
|
60
|
+
"vitest": "^3.1.2",
|
|
61
61
|
"@univerjs-infra/shared": "0.6.10"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|