@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202505291607 → 0.8.0-nightly.202505311606
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 _0x41c014=_0x22d0;(function(_0x1e37d4,_0x26ccfa){const _0x1d0e6a=_0x22d0,_0x4317f3=_0x1e37d4();while(!![]){try{const _0x4f29d7=parseInt(_0x1d0e6a(0x1bb))/0x1+-parseInt(_0x1d0e6a(0x192))/0x2+parseInt(_0x1d0e6a(0x173))/0x3*(parseInt(_0x1d0e6a(0x16b))/0x4)+parseInt(_0x1d0e6a(0x18b))/0x5+parseInt(_0x1d0e6a(0x155))/0x6*(-parseInt(_0x1d0e6a(0x19b))/0x7)+-parseInt(_0x1d0e6a(0x1b0))/0x8+parseInt(_0x1d0e6a(0x1b2))/0x9;if(_0x4f29d7===_0x26ccfa)break;else _0x4317f3['push'](_0x4317f3['shift']());}catch(_0x4f55d4){_0x4317f3['push'](_0x4317f3['shift']());}}}(_0x125a,0xccd48));function _0x22d0(_0x481412,_0x24ba67){const _0x125aa7=_0x125a();return _0x22d0=function(_0x22d0e4,_0x17f954){_0x22d0e4=_0x22d0e4-0x14a;let _0x383db2=_0x125aa7[_0x22d0e4];return _0x383db2;},_0x22d0(_0x481412,_0x24ba67);}Object[_0x41c014(0x1ac)](exports,Symbol[_0x41c014(0x171)],{'value':_0x41c014(0x1c2)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x41c014(0x16d)),c=require(_0x41c014(0x16f)),j=require(_0x41c014(0x150)),M=require(_0x41c014(0x194)),w=require(_0x41c014(0x163)),P=require('@univerjs/network'),U=_0x41c014(0x1a2);function _0x125a(){const _0x200251=['filter','/universer-api/user/list','Disposable','forEach','solved','content','code','UniverLicensePlugin','commentUpdate$','length','get','rxjs','parentId','Injector','rangeType','pluginName','type','updateComment','reply','236FhVwTU','CollaborationSessionService','@univerjs-pro/license','Reply','@univerjs/core','Add','toStringTag','_threadCommentModel','6354YCZkWV','post','parse','error','_init','_sessionService','pipe','ThreadCommentModel','personId','Delete','getUnit','syncUpdateMutationToColla','requireSession','Edit','CustomRangeType','_initDataSource','onReady','UserManagerService','customRanges','getCurrentUser','/reply','/delete','createTimestamp','setConfig','3539455OgCRUt','dataSource','YYYY/MM/DD\x20HH:mm','rangeId','Inject','root','subscribe','1583086eIndCs','_commentService','@univerjs/thread-comment','addUser','comments','replyId','UNRECOGNIZED','Solve','Solved','35VssbSX','_httpService','_initUserSync','/solved','getOwnPropertyDescriptor','merge','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverInstanceType','_threadCommentDataSourceService','users','_userService','disposeWithMe','threadId','symbol','format','HTTPService','defineProperty','payload','dayjs','OpenOrReOpen','9860760NmzBRJ','getMemberID','19298070IPDPZC','userID','UniverThreadCommentDataSourcePlugin','stringify','size','_threadCommentDataSource','onStarting','CommentService','slice','624364cAldct','_injector','userId','getComment','IThreadCommentDataSourceService','COMMENT','map','Module','add','comment','user','resolved','Unknown','_config','/universer-api/comment/unit/','resolveComment','@univerjs/thread-comment-ui','body','values','/add','_configService','885990YImPae','replies','find'];_0x125a=function(){return _0x200251;};return _0x125a();}var I=(_0x199818=>(_0x199818[_0x199818[_0x41c014(0x1af)]=0x0]='OpenOrReOpen',_0x199818[_0x199818[_0x41c014(0x19a)]=0x1]=_0x41c014(0x19a),_0x199818[_0x199818[_0x41c014(0x198)]=-0x1]=_0x41c014(0x198),_0x199818))(I||{}),v=(_0x7c0828=>(_0x7c0828[_0x7c0828[_0x41c014(0x14c)]=0x0]=_0x41c014(0x14c),_0x7c0828[_0x7c0828[_0x41c014(0x170)]=0x1]=_0x41c014(0x170),_0x7c0828[_0x7c0828[_0x41c014(0x16e)]=0x2]='Reply',_0x7c0828[_0x7c0828[_0x41c014(0x180)]=0x3]=_0x41c014(0x180),_0x7c0828[_0x7c0828[_0x41c014(0x17c)]=0x4]='Delete',_0x7c0828[_0x7c0828['Solve']=0x5]='Solve',_0x7c0828[_0x7c0828[_0x41c014(0x198)]=-0x1]=_0x41c014(0x198),_0x7c0828))(v||{});const f=_0x507f62=>c[_0x41c014(0x1ae)](new Date(+_0x507f62))[_0x41c014(0x1aa)](_0x41c014(0x18d)),R=async(_0x51bbae,_0x15bf2b)=>{const _0x21bdb8=_0x41c014,_0x342bf2=_0x51bbae['get'](c[_0x21bdb8(0x184)]),_0x1f76d8=_0x51bbae[_0x21bdb8(0x162)](P[_0x21bdb8(0x1ab)]);_0x15bf2b[_0x21bdb8(0x15b)](_0x22d1c5=>{const _0x1906b7=_0x21bdb8;_0x342bf2[_0x1906b7(0x1a1)](_0x22d1c5)&&_0x15bf2b['delete'](_0x22d1c5);}),_0x15bf2b[_0x21bdb8(0x1b6)]&&(await _0x1f76d8[_0x21bdb8(0x162)](_0x21bdb8(0x159),{'params':{'userIDs':[..._0x15bf2b]}}))[_0x21bdb8(0x151)][_0x21bdb8(0x1a5)]['forEach'](_0xae23fc=>{const _0x42cdf9=_0x21bdb8;_0xae23fc&&_0x342bf2[_0x42cdf9(0x195)](_0xae23fc);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x3ce909,_0x22ba62,_0x51fa83,_0x2cca21)=>{const _0x5c4362=_0x41c014;for(var _0x16a84e=_0x2cca21>0x1?void 0x0:_0x2cca21?$(_0x22ba62,_0x51fa83):_0x22ba62,_0x22c8a3=_0x3ce909[_0x5c4362(0x161)]-0x1,_0x1a2549;_0x22c8a3>=0x0;_0x22c8a3--)(_0x1a2549=_0x3ce909[_0x22c8a3])&&(_0x16a84e=_0x1a2549(_0x16a84e)||_0x16a84e);return _0x16a84e;},S=(_0x3abc32,_0x21cfc9)=>(_0x5a8014,_0x282a24)=>_0x21cfc9(_0x5a8014,_0x282a24,_0x3abc32);let p=class extends c[_0x41c014(0x15a)]{constructor(_0x3216c1,_0x3f929f,_0x3d5ad8,_0x28c2ae){const _0x144949=_0x41c014;super(),this[_0x144949(0x193)]=_0x3216c1,this[_0x144949(0x172)]=_0x3f929f,this[_0x144949(0x1a6)]=_0x3d5ad8,this[_0x144949(0x1bc)]=_0x28c2ae,this['_init'](),this[_0x144949(0x19d)]();}[_0x41c014(0x19d)](){const _0x232e4f=_0x41c014;this[_0x232e4f(0x1a7)](this[_0x232e4f(0x172)]['commentUpdate$'][_0x232e4f(0x179)](w['bufferTime'](0x10))['subscribe'](_0x2a541e=>{const _0x5e3d51=_0x232e4f,_0x1648e6=new Set();_0x2a541e[_0x5e3d51(0x15b)](_0x5c5000=>{const _0x5d95c6=_0x5e3d51;switch(_0x5c5000['type']){case _0x5d95c6(0x1c3):{const _0x578f08=_0x5c5000[_0x5d95c6(0x1ad)][_0x5d95c6(0x17b)];_0x1648e6[_0x5d95c6(0x1c3)](_0x578f08);break;}}}),R(this['_injector'],_0x1648e6);}));}[_0x41c014(0x177)](){const _0x3d5904=_0x41c014;this[_0x3d5904(0x1a7)](this[_0x3d5904(0x193)][_0x3d5904(0x160)][_0x3d5904(0x191)](async _0x529000=>{const _0x1bcaff=_0x3d5904;var _0x23d59d,_0x1ed73d,_0x1ce810,_0x1dc357;const _0x3fa509=(_0x23d59d=this[_0x1bcaff(0x172)][_0x1bcaff(0x17d)](_0x529000['unitId'])['find'](_0x5e8046=>_0x5e8046[_0x1bcaff(0x1a8)]===_0x529000[_0x1bcaff(0x1a8)]))==null?void 0x0:_0x23d59d[_0x1bcaff(0x190)];if(!_0x3fa509)return;const {unitId:_0x543b2f,subUnitId:_0x5713db}=_0x3fa509;switch(_0x529000[_0x1bcaff(0x14a)]&&this[_0x1bcaff(0x1a6)][_0x1bcaff(0x195)](_0x529000[_0x1bcaff(0x14a)]),_0x529000[_0x1bcaff(0x168)]){case v[_0x1bcaff(0x170)]:break;case v['Reply']:{this[_0x1bcaff(0x172)]['addComment'](_0x543b2f,_0x5713db,{'unitId':_0x543b2f,'subUnitId':_0x5713db,'ref':'','id':_0x529000[_0x1bcaff(0x197)],'dT':f(+_0x529000[_0x1bcaff(0x189)]),'threadId':_0x529000[_0x1bcaff(0x1a8)],'personId':(_0x1ce810=(_0x1ed73d=_0x529000[_0x1bcaff(0x14a)])==null?void 0x0:_0x1ed73d['userID'])!=null?_0x1ce810:_0x529000[_0x1bcaff(0x1bd)],'text':JSON['parse'](_0x529000[_0x1bcaff(0x15d)]),'parentId':_0x3fa509['id']});break;}case v['Delete']:{const _0x496354=this[_0x1bcaff(0x172)][_0x1bcaff(0x1be)](_0x543b2f,_0x5713db,_0x529000[_0x1bcaff(0x197)]);_0x496354&&_0x496354[_0x1bcaff(0x164)]&&this[_0x1bcaff(0x172)]['deleteComment'](_0x543b2f,_0x5713db,_0x529000[_0x1bcaff(0x197)]);break;}case v[_0x1bcaff(0x180)]:{this[_0x1bcaff(0x172)][_0x1bcaff(0x169)](_0x543b2f,_0x5713db,{'commentId':_0x529000['replyId'],'text':JSON[_0x1bcaff(0x175)](_0x529000['content'])});break;}case v[_0x1bcaff(0x199)]:{const _0x310b45=(_0x1dc357=this[_0x1bcaff(0x172)][_0x1bcaff(0x17d)](_0x529000['unitId'])[_0x1bcaff(0x157)](_0x48d63b=>_0x48d63b[_0x1bcaff(0x1a8)]===_0x529000[_0x1bcaff(0x1a8)]))==null?void 0x0:_0x1dc357[_0x1bcaff(0x190)];_0x310b45&&this[_0x1bcaff(0x172)][_0x1bcaff(0x14f)](_0x543b2f,_0x5713db,_0x310b45['id'],_0x529000['solved']===I[_0x1bcaff(0x19a)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x41c014(0x1b9)])),S(0x1,c[_0x41c014(0x18f)](M[_0x41c014(0x17a)])),S(0x2,c[_0x41c014(0x18f)](c[_0x41c014(0x184)])),S(0x3,c['Inject'](c[_0x41c014(0x165)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x41c014(0x19f)],x=(_0x498ca5,_0x204027,_0x1239af,_0x3650d8)=>{const _0x5248d8=_0x41c014;for(var _0x3450e1=_0x3650d8>0x1?void 0x0:_0x3650d8?A(_0x204027,_0x1239af):_0x204027,_0x5691d3=_0x498ca5[_0x5248d8(0x161)]-0x1,_0x133df5;_0x5691d3>=0x0;_0x5691d3--)(_0x133df5=_0x498ca5[_0x5691d3])&&(_0x3450e1=_0x133df5(_0x3450e1)||_0x3450e1);return _0x3450e1;},_=(_0x5d2e36,_0x2318ae)=>(_0x40495b,_0x4d378b)=>_0x2318ae(_0x40495b,_0x4d378b,_0x5d2e36);function Y(_0xa084c3,_0x1d4697){const _0x4c0e05=_0x41c014,_0xd82745=_0xa084c3[_0x4c0e05(0x156)][0x0];return{..._0x1d4697,'id':_0xd82745[_0x4c0e05(0x197)],'resolved':_0xa084c3['solved']===0x1,'dT':f(_0xd82745['createTimestamp']),'personId':_0xd82745['userId'],'threadId':_0xd82745['threadId']};}function G(_0x1f2033,_0x25816d,_0x2bb63b){const _0x116f8c=_0x41c014;var _0x3b1e08,_0x3fccb0;if(((_0x3fccb0=(_0x3b1e08=_0x1f2033==null?void 0x0:_0x1f2033['replies'])==null?void 0x0:_0x3b1e08[_0x116f8c(0x161)])!=null?_0x3fccb0:0x0)>0x0){const _0x99ee81=(_0x455770,_0xf02e1e)=>({'id':_0x455770[_0x116f8c(0x197)],'threadId':_0x455770[_0x116f8c(0x1a8)],'dT':f(_0x455770[_0x116f8c(0x189)]),'personId':_0x455770[_0x116f8c(0x1bd)],'resolved':_0x1f2033[_0x116f8c(0x15c)]===I[_0x116f8c(0x19a)],'unitId':_0x25816d,'subUnitId':_0x2bb63b,'text':JSON['parse'](_0x455770['content']),'parentId':_0xf02e1e}),_0x2a00a3=_0x99ee81(_0x1f2033[_0x116f8c(0x156)][0x0]);return{..._0x2a00a3,'children':_0x1f2033['replies'][_0x116f8c(0x1ba)](0x1)[_0x116f8c(0x1c1)](_0x4f0423=>_0x99ee81(_0x4f0423,_0x2a00a3['id']))};}return null;}let g=class{constructor(_0x10abf9,_0x252f9b,_0x169191,_0x56f9d2){const _0x5859e5=_0x41c014;this['_httpService']=_0x10abf9,this[_0x5859e5(0x1a6)]=_0x252f9b,this[_0x5859e5(0x178)]=_0x169191,this[_0x5859e5(0x1bc)]=_0x56f9d2;}async['addComment'](_0x36d9be){const _0x37c665=_0x41c014;var _0xbaf894,_0x19cb44;const {parentId:_0x3295f2,unitId:_0x119fc0,text:_0x2c3149,threadId:_0x2324aa}=_0x36d9be,_0x15accc=(_0x19cb44=(_0xbaf894=_0x2c3149[_0x37c665(0x185)])==null?void 0x0:_0xbaf894[_0x37c665(0x158)](_0xa3886c=>_0xa3886c[_0x37c665(0x166)]===c[_0x37c665(0x181)]['COMMENT'])['map'](_0xab8841=>_0xab8841[_0x37c665(0x18e)]))!=null?_0x19cb44:[],_0x3a5d1b=JSON[_0x37c665(0x1b5)](_0x2c3149),_0x599ef0=(await this[_0x37c665(0x178)][_0x37c665(0x17f)](_0x119fc0))[_0x37c665(0x1b1)]();if(_0x3295f2){const _0x56fe28={'memberId':_0x599ef0,'unitId':_0x119fc0,'content':_0x3a5d1b,'mention':_0x15accc,'threadId':_0x2324aa},_0x1b6e07=(await this['_httpService'][_0x37c665(0x174)](_0x37c665(0x14e)+_0x119fc0+_0x37c665(0x187),{'body':_0x56fe28}))['body'][_0x37c665(0x16a)];return{..._0x36d9be,'id':_0x1b6e07[_0x37c665(0x197)],'dT':c[_0x37c665(0x1ae)](+_0x1b6e07['createTimestamp'])[_0x37c665(0x1aa)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b6e07['userId']};}else{const _0x36b3a4={'memberId':_0x599ef0,'unitId':_0x119fc0,'content':_0x3a5d1b,'mention':_0x15accc},_0x33dd74=await this[_0x37c665(0x19c)][_0x37c665(0x174)](_0x37c665(0x14e)+_0x119fc0+_0x37c665(0x153),{'body':_0x36b3a4});return Y(_0x33dd74[_0x37c665(0x151)][_0x37c665(0x1c4)],_0x36d9be);}}async[_0x41c014(0x169)](_0x4a8bcf){const _0x3c49b9=_0x41c014;var _0x4e4795,_0x12727b;const {text:_0x1607b4,unitId:_0x4f8449}=_0x4a8bcf,_0x58b6d1=(_0x12727b=(_0x4e4795=_0x1607b4[_0x3c49b9(0x185)])==null?void 0x0:_0x4e4795[_0x3c49b9(0x158)](_0x4a0a23=>_0x4a0a23[_0x3c49b9(0x166)]===c['CustomRangeType'][_0x3c49b9(0x1c0)])[_0x3c49b9(0x1c1)](_0xa331ed=>_0xa331ed[_0x3c49b9(0x18e)]))!=null?_0x12727b:[],_0x5be65c=JSON[_0x3c49b9(0x1b5)](_0x1607b4),_0x1fd60c=_0x4a8bcf[_0x3c49b9(0x1a8)],_0x5211b7=_0x4a8bcf['id'],_0x512e19={'memberId':(await this[_0x3c49b9(0x178)]['requireSession'](_0x4f8449))[_0x3c49b9(0x1b1)](),'unitId':_0x4f8449,'threadId':_0x1fd60c,'mention':_0x58b6d1,'content':_0x5be65c,'replyId':_0x5211b7},_0x4bfc8f=await this[_0x3c49b9(0x19c)][_0x3c49b9(0x174)](_0x3c49b9(0x14e)+_0x4f8449+'/edit',{'body':_0x512e19});return!_0x4bfc8f[_0x3c49b9(0x151)][_0x3c49b9(0x176)]||_0x4bfc8f[_0x3c49b9(0x151)][_0x3c49b9(0x176)]['code']===0x1;}async[_0x41c014(0x14f)](_0x2c619c){const _0x46f3ed=_0x41c014,{unitId:_0x3a36ca}=_0x2c619c,_0x599406=_0x2c619c[_0x46f3ed(0x1a8)],_0x2ec666={'memberId':this[_0x46f3ed(0x1a6)][_0x46f3ed(0x186)]()[_0x46f3ed(0x1b3)],'unitId':_0x3a36ca,'threadId':_0x599406,'solved':_0x2c619c[_0x46f3ed(0x14b)]?I[_0x46f3ed(0x19a)]:I[_0x46f3ed(0x1af)]},_0x1a279f=await this['_httpService'][_0x46f3ed(0x174)](_0x46f3ed(0x14e)+_0x3a36ca+_0x46f3ed(0x19e),{'body':_0x2ec666});return!_0x1a279f[_0x46f3ed(0x151)][_0x46f3ed(0x176)]||_0x1a279f[_0x46f3ed(0x151)]['error'][_0x46f3ed(0x15e)]===0x1;}async['deleteComment'](_0x2eb298,_0x1ee570,_0x3acc18,_0x480f6b){const _0xf6156f=_0x41c014,_0x413bd7={'memberId':(await this[_0xf6156f(0x178)]['requireSession'](_0x2eb298))['getMemberID'](),'threadId':_0x3acc18,'replyId':_0x480f6b,'unitId':_0x2eb298},_0xc04d11=await this[_0xf6156f(0x19c)]['post'](_0xf6156f(0x14e)+_0x2eb298+_0xf6156f(0x188),{'body':_0x413bd7});return!_0xc04d11['body'][_0xf6156f(0x176)]||_0xc04d11[_0xf6156f(0x151)][_0xf6156f(0x176)][_0xf6156f(0x15e)]===0x1;}async['listComments'](_0x3d7782,_0x433308,_0x21a6de){const _0x5cfe3a=_0x41c014,_0x20172b={'unitId':_0x3d7782,'threadId':_0x21a6de},_0x1f89b1=await this[_0x5cfe3a(0x19c)][_0x5cfe3a(0x174)](_0x5cfe3a(0x14e)+_0x3d7782+'/list',{'body':_0x20172b}),_0x160adb=_0x21a6de['map'](_0x17143c=>G(_0x1f89b1[_0x5cfe3a(0x151)][_0x5cfe3a(0x196)][_0x17143c],_0x3d7782,_0x433308))[_0x5cfe3a(0x158)](Boolean);return Object[_0x5cfe3a(0x152)](_0x1f89b1['body']['users'])[_0x5cfe3a(0x15b)](_0x39ee05=>{const _0x1c2d2b=_0x5cfe3a;this[_0x1c2d2b(0x1a6)][_0x1c2d2b(0x195)](_0x39ee05);}),_0x160adb;}['saveCommentToSnapshot'](_0x5783ad){const _0x45ef28=_0x41c014;return{'id':_0x5783ad['id'],'threadId':_0x5783ad[_0x45ef28(0x1a8)],'ref':_0x5783ad['ref']};}};g=x([_(0x0,c[_0x41c014(0x18f)](P[_0x41c014(0x1ab)])),_(0x1,c['Inject'](c[_0x41c014(0x184)])),_(0x2,c[_0x41c014(0x18f)](b[_0x41c014(0x16c)])),_(0x3,c[_0x41c014(0x18f)](c[_0x41c014(0x165)]))],g);var H=Object[_0x41c014(0x19f)],J=(_0x1a03ed,_0x55dcef,_0x1c2107,_0x23db9c)=>{for(var _0x78db90=_0x23db9c>0x1?void 0x0:_0x23db9c?H(_0x55dcef,_0x1c2107):_0x55dcef,_0x5ef9d0=_0x1a03ed['length']-0x1,_0x56402f;_0x5ef9d0>=0x0;_0x5ef9d0--)(_0x56402f=_0x1a03ed[_0x5ef9d0])&&(_0x78db90=_0x56402f(_0x78db90)||_0x78db90);return _0x78db90;},y=(_0x5192f2,_0x1f106a)=>(_0x3d05f4,_0x1435a8)=>_0x1f106a(_0x3d05f4,_0x1435a8,_0x5192f2);let C=class extends c[_0x41c014(0x15a)]{constructor(_0x52a629,_0x59e22a){const _0x544cb2=_0x41c014;super(),this[_0x544cb2(0x1a4)]=_0x52a629,this[_0x544cb2(0x1b7)]=_0x59e22a,this[_0x544cb2(0x182)]();}[_0x41c014(0x182)](){const _0xbe1c3a=_0x41c014;this['_threadCommentDataSourceService'][_0xbe1c3a(0x18c)]=this[_0xbe1c3a(0x1b7)],this[_0xbe1c3a(0x1a4)][_0xbe1c3a(0x17e)]=!0x1;}};C=J([y(0x0,M[_0x41c014(0x1bf)]),y(0x1,c[_0x41c014(0x18f)](g))],C);var F=Object[_0x41c014(0x1ac)],L=Object[_0x41c014(0x19f)],Z=(_0x2c9cde,_0x5e414e,_0x1ce9c9)=>_0x5e414e in _0x2c9cde?F(_0x2c9cde,_0x5e414e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ce9c9}):_0x2c9cde[_0x5e414e]=_0x1ce9c9,W=(_0xdeb7f6,_0xbeba82,_0x21fad7,_0x93be8a)=>{for(var _0x5c1bea=_0x93be8a>0x1?void 0x0:_0x93be8a?L(_0xbeba82,_0x21fad7):_0xbeba82,_0x322f91=_0xdeb7f6['length']-0x1,_0x235dc2;_0x322f91>=0x0;_0x322f91--)(_0x235dc2=_0xdeb7f6[_0x322f91])&&(_0x5c1bea=_0x235dc2(_0x5c1bea)||_0x5c1bea);return _0x5c1bea;},O=(_0x25785c,_0x3c455f)=>(_0x312a4c,_0x44985c)=>_0x3c455f(_0x312a4c,_0x44985c,_0x25785c),N=(_0x3abfdc,_0x2495d2,_0x2451b4)=>Z(_0x3abfdc,typeof _0x2495d2!=_0x41c014(0x1a9)?_0x2495d2+'':_0x2495d2,_0x2451b4);exports[_0x41c014(0x1b4)]=class extends c['Plugin']{constructor(_0x55a6e7=D,_0x161fb7,_0x19eacb){const _0x575335=_0x41c014;super(),this[_0x575335(0x14d)]=_0x55a6e7,this['_injector']=_0x161fb7,this[_0x575335(0x154)]=_0x19eacb;const {..._0x3104a9}=c[_0x575335(0x1a0)]({},D,this['_config']);this[_0x575335(0x154)][_0x575335(0x18a)](q,_0x3104a9);}[_0x41c014(0x1b8)](){[[g],[C],[p]]['forEach'](_0x4c9ae0=>{this['_injector']['add'](_0x4c9ae0);});}[_0x41c014(0x183)](){const _0x3a2a53=_0x41c014;this[_0x3a2a53(0x1bc)][_0x3a2a53(0x162)](C),this[_0x3a2a53(0x1bc)][_0x3a2a53(0x162)](p);}},N(exports[_0x41c014(0x1b4)],_0x41c014(0x167),U),N(exports[_0x41c014(0x1b4)],'type',c[_0x41c014(0x1a3)]['UNIVER_UNKNOWN']),exports[_0x41c014(0x1b4)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x41c014(0x15f)]),O(0x1,c[_0x41c014(0x18f)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x1cc326=_0x2488;(function(_0x1e7bf7,_0x76045){const _0x16b439=_0x2488,_0xcb3009=_0x1e7bf7();while(!![]){try{const _0x2d013c=parseInt(_0x16b439(0x225))/0x1+parseInt(_0x16b439(0x1fe))/0x2+-parseInt(_0x16b439(0x224))/0x3*(-parseInt(_0x16b439(0x222))/0x4)+parseInt(_0x16b439(0x1da))/0x5*(-parseInt(_0x16b439(0x226))/0x6)+-parseInt(_0x16b439(0x21b))/0x7*(parseInt(_0x16b439(0x1c1))/0x8)+-parseInt(_0x16b439(0x21e))/0x9*(parseInt(_0x16b439(0x1dc))/0xa)+-parseInt(_0x16b439(0x21d))/0xb;if(_0x2d013c===_0x76045)break;else _0xcb3009['push'](_0xcb3009['shift']());}catch(_0x1e1d3e){_0xcb3009['push'](_0xcb3009['shift']());}}}(_0x58c4,0xd0eda));Object['defineProperty'](exports,Symbol[_0x1cc326(0x22b)],{'value':_0x1cc326(0x1e8)});const b=require(_0x1cc326(0x206)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x1cc326(0x1cb)),M=require(_0x1cc326(0x223)),w=require('rxjs'),P=require(_0x1cc326(0x22e)),U=_0x1cc326(0x1b6);var I=(_0xe1f0bf=>(_0xe1f0bf[_0xe1f0bf[_0x1cc326(0x1cf)]=0x0]=_0x1cc326(0x1cf),_0xe1f0bf[_0xe1f0bf['Solved']=0x1]=_0x1cc326(0x21a),_0xe1f0bf[_0xe1f0bf[_0x1cc326(0x201)]=-0x1]=_0x1cc326(0x201),_0xe1f0bf))(I||{}),v=(_0x3e1181=>(_0x3e1181[_0x3e1181['Unknown']=0x0]=_0x1cc326(0x1f5),_0x3e1181[_0x3e1181[_0x1cc326(0x1be)]=0x1]=_0x1cc326(0x1be),_0x3e1181[_0x3e1181[_0x1cc326(0x21f)]=0x2]=_0x1cc326(0x21f),_0x3e1181[_0x3e1181[_0x1cc326(0x1ca)]=0x3]=_0x1cc326(0x1ca),_0x3e1181[_0x3e1181['Delete']=0x4]=_0x1cc326(0x1f0),_0x3e1181[_0x3e1181['Solve']=0x5]=_0x1cc326(0x1ee),_0x3e1181[_0x3e1181['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e1181))(v||{});const f=_0x44b55c=>c['dayjs'](new Date(+_0x44b55c))[_0x1cc326(0x1b2)](_0x1cc326(0x1f2)),R=async(_0x40aa30,_0x10f7c5)=>{const _0x1e067a=_0x1cc326,_0x4c205f=_0x40aa30['get'](c[_0x1e067a(0x1f3)]),_0x495dce=_0x40aa30[_0x1e067a(0x203)](P['HTTPService']);_0x10f7c5[_0x1e067a(0x1b5)](_0xd19aa3=>{const _0x343a64=_0x1e067a;_0x4c205f[_0x343a64(0x1fa)](_0xd19aa3)&&_0x10f7c5[_0x343a64(0x1ce)](_0xd19aa3);}),_0x10f7c5[_0x1e067a(0x1db)]&&(await _0x495dce[_0x1e067a(0x203)](_0x1e067a(0x1f8),{'params':{'userIDs':[..._0x10f7c5]}}))[_0x1e067a(0x1ed)][_0x1e067a(0x217)][_0x1e067a(0x1b5)](_0x15ecd1=>{const _0x3cad50=_0x1e067a;_0x15ecd1&&_0x4c205f[_0x3cad50(0x1b3)](_0x15ecd1);});};function _0x2488(_0x270ce7,_0x38354f){const _0x58c4af=_0x58c4();return _0x2488=function(_0x248805,_0x502246){_0x248805=_0x248805-0x1b0;let _0x5ce360=_0x58c4af[_0x248805];return _0x5ce360;},_0x2488(_0x270ce7,_0x38354f);}var $=Object[_0x1cc326(0x1e9)],E=(_0x1b0074,_0x1c2f59,_0x168e98,_0x35cb8c)=>{const _0x3644de=_0x1cc326;for(var _0x2ac6fa=_0x35cb8c>0x1?void 0x0:_0x35cb8c?$(_0x1c2f59,_0x168e98):_0x1c2f59,_0x576937=_0x1b0074[_0x3644de(0x208)]-0x1,_0x39a70b;_0x576937>=0x0;_0x576937--)(_0x39a70b=_0x1b0074[_0x576937])&&(_0x2ac6fa=_0x39a70b(_0x2ac6fa)||_0x2ac6fa);return _0x2ac6fa;},S=(_0x3dd708,_0x3dcc82)=>(_0x1d71da,_0x456961)=>_0x3dcc82(_0x1d71da,_0x456961,_0x3dd708);let p=class extends c['Disposable']{constructor(_0x1638c7,_0x24cfcf,_0xd938d3,_0x1c68bd){const _0x36c022=_0x1cc326;super(),this['_commentService']=_0x1638c7,this[_0x36c022(0x20d)]=_0x24cfcf,this['_userService']=_0xd938d3,this['_injector']=_0x1c68bd,this[_0x36c022(0x1d4)](),this[_0x36c022(0x200)]();}[_0x1cc326(0x200)](){const _0x4103c5=_0x1cc326;this['disposeWithMe'](this[_0x4103c5(0x20d)][_0x4103c5(0x1fb)][_0x4103c5(0x1e2)](w['bufferTime'](0x10))[_0x4103c5(0x1c5)](_0x3cb205=>{const _0x45d465=_0x4103c5,_0x1cc0a6=new Set();_0x3cb205['forEach'](_0x215d25=>{const _0x3ad5ff=_0x2488;switch(_0x215d25[_0x3ad5ff(0x229)]){case _0x3ad5ff(0x22f):{const _0x2c3ff6=_0x215d25['payload'][_0x3ad5ff(0x1f1)];_0x1cc0a6['add'](_0x2c3ff6);break;}}}),R(this[_0x45d465(0x20a)],_0x1cc0a6);}));}['_init'](){const _0x28369a=_0x1cc326;this[_0x28369a(0x1e7)](this['_commentService'][_0x28369a(0x1fb)][_0x28369a(0x1c5)](async _0x5ea780=>{const _0x2bec2c=_0x28369a;var _0xf305fe,_0x4963b1,_0x3bef13,_0x4c3c27;const _0x72d20e=(_0xf305fe=this[_0x2bec2c(0x20d)][_0x2bec2c(0x1e5)](_0x5ea780[_0x2bec2c(0x1bb)])[_0x2bec2c(0x1b8)](_0x472df3=>_0x472df3[_0x2bec2c(0x1d9)]===_0x5ea780[_0x2bec2c(0x1d9)]))==null?void 0x0:_0xf305fe[_0x2bec2c(0x1c6)];if(!_0x72d20e)return;const {unitId:_0x483338,subUnitId:_0x4d94d4}=_0x72d20e;switch(_0x5ea780['user']&&this[_0x2bec2c(0x204)][_0x2bec2c(0x1b3)](_0x5ea780[_0x2bec2c(0x22c)]),_0x5ea780[_0x2bec2c(0x229)]){case v[_0x2bec2c(0x1be)]:break;case v[_0x2bec2c(0x21f)]:{this[_0x2bec2c(0x20d)][_0x2bec2c(0x1c8)](_0x483338,_0x4d94d4,{'unitId':_0x483338,'subUnitId':_0x4d94d4,'ref':'','id':_0x5ea780[_0x2bec2c(0x1d7)],'dT':f(+_0x5ea780[_0x2bec2c(0x211)]),'threadId':_0x5ea780[_0x2bec2c(0x1d9)],'personId':(_0x3bef13=(_0x4963b1=_0x5ea780[_0x2bec2c(0x22c)])==null?void 0x0:_0x4963b1[_0x2bec2c(0x20e)])!=null?_0x3bef13:_0x5ea780[_0x2bec2c(0x1c9)],'text':JSON[_0x2bec2c(0x1b9)](_0x5ea780[_0x2bec2c(0x22a)]),'parentId':_0x72d20e['id']});break;}case v[_0x2bec2c(0x1f0)]:{const _0x515ab1=this[_0x2bec2c(0x20d)][_0x2bec2c(0x1cd)](_0x483338,_0x4d94d4,_0x5ea780[_0x2bec2c(0x1d7)]);_0x515ab1&&_0x515ab1['parentId']&&this['_threadCommentModel'][_0x2bec2c(0x227)](_0x483338,_0x4d94d4,_0x5ea780[_0x2bec2c(0x1d7)]);break;}case v[_0x2bec2c(0x1ca)]:{this[_0x2bec2c(0x20d)][_0x2bec2c(0x1e0)](_0x483338,_0x4d94d4,{'commentId':_0x5ea780['replyId'],'text':JSON['parse'](_0x5ea780[_0x2bec2c(0x22a)])});break;}case v[_0x2bec2c(0x1ee)]:{const _0x32a155=(_0x4c3c27=this['_threadCommentModel'][_0x2bec2c(0x1e5)](_0x5ea780['unitId'])[_0x2bec2c(0x1b8)](_0x9b630b=>_0x9b630b[_0x2bec2c(0x1d9)]===_0x5ea780['threadId']))==null?void 0x0:_0x4c3c27[_0x2bec2c(0x1c6)];_0x32a155&&this[_0x2bec2c(0x20d)][_0x2bec2c(0x1d0)](_0x483338,_0x4d94d4,_0x32a155['id'],_0x5ea780[_0x2bec2c(0x1c3)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x1cc326(0x1f7)](b[_0x1cc326(0x1ef)])),S(0x1,c[_0x1cc326(0x1f7)](M[_0x1cc326(0x207)])),S(0x2,c[_0x1cc326(0x1f7)](c[_0x1cc326(0x1f3)])),S(0x3,c['Inject'](c[_0x1cc326(0x1e1)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x1cc326(0x1e9)],x=(_0x5e303b,_0x119924,_0x4b5ab2,_0x266470)=>{const _0x504cc9=_0x1cc326;for(var _0x1c2d27=_0x266470>0x1?void 0x0:_0x266470?A(_0x119924,_0x4b5ab2):_0x119924,_0x492737=_0x5e303b[_0x504cc9(0x208)]-0x1,_0x5b662c;_0x492737>=0x0;_0x492737--)(_0x5b662c=_0x5e303b[_0x492737])&&(_0x1c2d27=_0x5b662c(_0x1c2d27)||_0x1c2d27);return _0x1c2d27;},_=(_0x263202,_0x2224cd)=>(_0x253bce,_0x25f46e)=>_0x2224cd(_0x253bce,_0x25f46e,_0x263202);function Y(_0x393f82,_0x2caa40){const _0x19a6e=_0x1cc326,_0x45edbf=_0x393f82[_0x19a6e(0x202)][0x0];return{..._0x2caa40,'id':_0x45edbf[_0x19a6e(0x1d7)],'resolved':_0x393f82[_0x19a6e(0x1c3)]===0x1,'dT':f(_0x45edbf[_0x19a6e(0x211)]),'personId':_0x45edbf[_0x19a6e(0x1c9)],'threadId':_0x45edbf[_0x19a6e(0x1d9)]};}function G(_0x803dcf,_0x3da555,_0x1ceea4){const _0x22a337=_0x1cc326;var _0x3e1f2f,_0x3e83a0;if(((_0x3e83a0=(_0x3e1f2f=_0x803dcf==null?void 0x0:_0x803dcf[_0x22a337(0x202)])==null?void 0x0:_0x3e1f2f['length'])!=null?_0x3e83a0:0x0)>0x0){const _0x3a272e=(_0x38ceea,_0x1ae59b)=>({'id':_0x38ceea[_0x22a337(0x1d7)],'threadId':_0x38ceea['threadId'],'dT':f(_0x38ceea['createTimestamp']),'personId':_0x38ceea[_0x22a337(0x1c9)],'resolved':_0x803dcf[_0x22a337(0x1c3)]===I[_0x22a337(0x21a)],'unitId':_0x3da555,'subUnitId':_0x1ceea4,'text':JSON[_0x22a337(0x1b9)](_0x38ceea[_0x22a337(0x22a)]),'parentId':_0x1ae59b}),_0x4a5646=_0x3a272e(_0x803dcf[_0x22a337(0x202)][0x0]);return{..._0x4a5646,'children':_0x803dcf[_0x22a337(0x202)][_0x22a337(0x228)](0x1)[_0x22a337(0x1f9)](_0x33e782=>_0x3a272e(_0x33e782,_0x4a5646['id']))};}return null;}function _0x58c4(){const _0x204f76=['slice','type','content','toStringTag','user','CustomRangeType','@univerjs/network','add','dataSource','/list','IConfigService','format','addUser','reply','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','find','parse','UniverThreadCommentUIPlugin','unitId','HTTPService','_initDataSource','Add','listComments','onStarting','3872296JXMKIO','COMMENT','solved','CollaborationSessionService','subscribe','root','_config','addComment','userId','Edit','@univerjs/thread-comment-ui','error','getComment','delete','OpenOrReOpen','resolveComment','comments','IThreadCommentDataSourceService','rangeType','_init','ref','rangeId','replyId','comment','threadId','95ZNcBYZ','size','110sfuPfE','values','post','/universer-api/comment/unit/','updateComment','Injector','pipe','pluginName','code','getUnit','_sessionService','disposeWithMe','Module','getOwnPropertyDescriptor','requireSession','merge','UniverLicensePlugin','body','Solve','CommentService','Delete','personId','YYYY/MM/DD\x20HH:mm','UserManagerService','dayjs','Unknown','/delete','Inject','/universer-api/user/list','map','getUser','commentUpdate$','_configService','UniverCollaborationClientPlugin','3339356XKNHIR','resolved','_initUserSync','UNRECOGNIZED','replies','get','_userService','_threadCommentDataSource','@univerjs-pro/collaboration-client','ThreadCommentModel','length','saveCommentToSnapshot','_injector','_threadCommentDataSourceService','filter','_threadCommentModel','userID','getCurrentUser','customRanges','createTimestamp','_httpService','syncUpdateMutationToColla','getMemberID','/solved','stringify','users','UniverThreadCommentDataSourcePlugin','symbol','Solved','14QbNzdo','Plugin','4324034BKTVrE','871209CiwEsU','Reply','setConfig','/add','4jwkWgA','@univerjs/thread-comment','4249419XTqdDj','1101480eBkzbX','286068ExWYGb','deleteComment'];_0x58c4=function(){return _0x204f76;};return _0x58c4();}let g=class{constructor(_0x1536e0,_0x4c6216,_0x4b9c07,_0x2a08bc){const _0x56d4ec=_0x1cc326;this['_httpService']=_0x1536e0,this[_0x56d4ec(0x204)]=_0x4c6216,this[_0x56d4ec(0x1e6)]=_0x4b9c07,this[_0x56d4ec(0x20a)]=_0x2a08bc;}async[_0x1cc326(0x1c8)](_0x50ddf3){const _0x209163=_0x1cc326;var _0x1877db,_0x6d5ebf;const {parentId:_0x5cbf45,unitId:_0x1cc7f2,text:_0x129a5f,threadId:_0x4dab95}=_0x50ddf3,_0x3b0f6b=(_0x6d5ebf=(_0x1877db=_0x129a5f[_0x209163(0x210)])==null?void 0x0:_0x1877db[_0x209163(0x20c)](_0x53507e=>_0x53507e[_0x209163(0x1d3)]===c[_0x209163(0x22d)]['COMMENT'])[_0x209163(0x1f9)](_0x4b27f6=>_0x4b27f6['rangeId']))!=null?_0x6d5ebf:[],_0x3da3e7=JSON[_0x209163(0x216)](_0x129a5f),_0x43b2cc=(await this['_sessionService'][_0x209163(0x1ea)](_0x1cc7f2))[_0x209163(0x214)]();if(_0x5cbf45){const _0xc56490={'memberId':_0x43b2cc,'unitId':_0x1cc7f2,'content':_0x3da3e7,'mention':_0x3b0f6b,'threadId':_0x4dab95},_0xaf2c5=(await this['_httpService'][_0x209163(0x1de)](_0x209163(0x1df)+_0x1cc7f2+'/reply',{'body':_0xc56490}))[_0x209163(0x1ed)][_0x209163(0x1b4)];return{..._0x50ddf3,'id':_0xaf2c5['replyId'],'dT':c[_0x209163(0x1f4)](+_0xaf2c5[_0x209163(0x211)])[_0x209163(0x1b2)](_0x209163(0x1f2)),'personId':_0xaf2c5['userId']};}else{const _0x4cdfb8={'memberId':_0x43b2cc,'unitId':_0x1cc7f2,'content':_0x3da3e7,'mention':_0x3b0f6b},_0x2dd799=await this[_0x209163(0x212)]['post'](_0x209163(0x1df)+_0x1cc7f2+_0x209163(0x221),{'body':_0x4cdfb8});return Y(_0x2dd799[_0x209163(0x1ed)][_0x209163(0x1d8)],_0x50ddf3);}}async['updateComment'](_0x1842b5){const _0x1b1f56=_0x1cc326;var _0x333de3,_0x1ab8e7;const {text:_0x3da809,unitId:_0x5dbf42}=_0x1842b5,_0x1c880e=(_0x1ab8e7=(_0x333de3=_0x3da809['customRanges'])==null?void 0x0:_0x333de3[_0x1b1f56(0x20c)](_0x3ce2f2=>_0x3ce2f2['rangeType']===c[_0x1b1f56(0x22d)][_0x1b1f56(0x1c2)])[_0x1b1f56(0x1f9)](_0x2de718=>_0x2de718[_0x1b1f56(0x1d6)]))!=null?_0x1ab8e7:[],_0x42674c=JSON[_0x1b1f56(0x216)](_0x3da809),_0x3c0871=_0x1842b5[_0x1b1f56(0x1d9)],_0x1f7ec2=_0x1842b5['id'],_0x272586={'memberId':(await this[_0x1b1f56(0x1e6)]['requireSession'](_0x5dbf42))[_0x1b1f56(0x214)](),'unitId':_0x5dbf42,'threadId':_0x3c0871,'mention':_0x1c880e,'content':_0x42674c,'replyId':_0x1f7ec2},_0x177a42=await this['_httpService'][_0x1b1f56(0x1de)]('/universer-api/comment/unit/'+_0x5dbf42+'/edit',{'body':_0x272586});return!_0x177a42[_0x1b1f56(0x1ed)][_0x1b1f56(0x1cc)]||_0x177a42[_0x1b1f56(0x1ed)][_0x1b1f56(0x1cc)][_0x1b1f56(0x1e4)]===0x1;}async[_0x1cc326(0x1d0)](_0xf4b202){const _0x49b7f2=_0x1cc326,{unitId:_0x486071}=_0xf4b202,_0x58ef00=_0xf4b202[_0x49b7f2(0x1d9)],_0x46dc4a={'memberId':this[_0x49b7f2(0x204)][_0x49b7f2(0x20f)]()[_0x49b7f2(0x20e)],'unitId':_0x486071,'threadId':_0x58ef00,'solved':_0xf4b202[_0x49b7f2(0x1ff)]?I['Solved']:I[_0x49b7f2(0x1cf)]},_0x55157c=await this['_httpService'][_0x49b7f2(0x1de)]('/universer-api/comment/unit/'+_0x486071+_0x49b7f2(0x215),{'body':_0x46dc4a});return!_0x55157c['body'][_0x49b7f2(0x1cc)]||_0x55157c[_0x49b7f2(0x1ed)]['error'][_0x49b7f2(0x1e4)]===0x1;}async[_0x1cc326(0x227)](_0x4ebe09,_0x17bd4b,_0x14b42c,_0xd9472){const _0x415c1a=_0x1cc326,_0x2fcff5={'memberId':(await this[_0x415c1a(0x1e6)][_0x415c1a(0x1ea)](_0x4ebe09))[_0x415c1a(0x214)](),'threadId':_0x14b42c,'replyId':_0xd9472,'unitId':_0x4ebe09},_0x328008=await this[_0x415c1a(0x212)][_0x415c1a(0x1de)]('/universer-api/comment/unit/'+_0x4ebe09+_0x415c1a(0x1f6),{'body':_0x2fcff5});return!_0x328008[_0x415c1a(0x1ed)][_0x415c1a(0x1cc)]||_0x328008['body'][_0x415c1a(0x1cc)][_0x415c1a(0x1e4)]===0x1;}async[_0x1cc326(0x1bf)](_0x23847e,_0x5551a3,_0x9aa56a){const _0x57571b=_0x1cc326,_0x126873={'unitId':_0x23847e,'threadId':_0x9aa56a},_0x1b2f12=await this[_0x57571b(0x212)][_0x57571b(0x1de)]('/universer-api/comment/unit/'+_0x23847e+_0x57571b(0x1b0),{'body':_0x126873}),_0x3d5d7a=_0x9aa56a[_0x57571b(0x1f9)](_0x25a320=>G(_0x1b2f12[_0x57571b(0x1ed)][_0x57571b(0x1d1)][_0x25a320],_0x23847e,_0x5551a3))[_0x57571b(0x20c)](Boolean);return Object[_0x57571b(0x1dd)](_0x1b2f12[_0x57571b(0x1ed)][_0x57571b(0x217)])['forEach'](_0x8e94ab=>{const _0x52a549=_0x57571b;this[_0x52a549(0x204)][_0x52a549(0x1b3)](_0x8e94ab);}),_0x3d5d7a;}[_0x1cc326(0x209)](_0x5eb727){const _0x1e42a2=_0x1cc326;return{'id':_0x5eb727['id'],'threadId':_0x5eb727['threadId'],'ref':_0x5eb727[_0x1e42a2(0x1d5)]};}};g=x([_(0x0,c['Inject'](P[_0x1cc326(0x1bc)])),_(0x1,c[_0x1cc326(0x1f7)](c[_0x1cc326(0x1f3)])),_(0x2,c[_0x1cc326(0x1f7)](b[_0x1cc326(0x1c4)])),_(0x3,c[_0x1cc326(0x1f7)](c[_0x1cc326(0x1e1)]))],g);var H=Object[_0x1cc326(0x1e9)],J=(_0x53a139,_0x559b97,_0x5745bc,_0xfea45e)=>{const _0x4f0bef=_0x1cc326;for(var _0x1a2186=_0xfea45e>0x1?void 0x0:_0xfea45e?H(_0x559b97,_0x5745bc):_0x559b97,_0x46ff92=_0x53a139[_0x4f0bef(0x208)]-0x1,_0x2316b5;_0x46ff92>=0x0;_0x46ff92--)(_0x2316b5=_0x53a139[_0x46ff92])&&(_0x1a2186=_0x2316b5(_0x1a2186)||_0x1a2186);return _0x1a2186;},y=(_0xe1a153,_0x2de42b)=>(_0x1565df,_0x183b8f)=>_0x2de42b(_0x1565df,_0x183b8f,_0xe1a153);let C=class extends c['Disposable']{constructor(_0x46d151,_0x2ebd8c){const _0x231f8d=_0x1cc326;super(),this[_0x231f8d(0x20b)]=_0x46d151,this[_0x231f8d(0x205)]=_0x2ebd8c,this['_initDataSource']();}[_0x1cc326(0x1bd)](){const _0x4495bc=_0x1cc326;this[_0x4495bc(0x20b)][_0x4495bc(0x230)]=this[_0x4495bc(0x205)],this[_0x4495bc(0x20b)][_0x4495bc(0x213)]=!0x1;}};C=J([y(0x0,M[_0x1cc326(0x1d2)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x1cc326(0x1b7)],L=Object[_0x1cc326(0x1e9)],Z=(_0x22fba4,_0x5b6860,_0x5bdbeb)=>_0x5b6860 in _0x22fba4?F(_0x22fba4,_0x5b6860,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bdbeb}):_0x22fba4[_0x5b6860]=_0x5bdbeb,W=(_0x2ae318,_0x488150,_0x9ad07,_0x1aaf94)=>{const _0x16fd41=_0x1cc326;for(var _0x5c913a=_0x1aaf94>0x1?void 0x0:_0x1aaf94?L(_0x488150,_0x9ad07):_0x488150,_0x5846cb=_0x2ae318[_0x16fd41(0x208)]-0x1,_0x55f836;_0x5846cb>=0x0;_0x5846cb--)(_0x55f836=_0x2ae318[_0x5846cb])&&(_0x5c913a=_0x55f836(_0x5c913a)||_0x5c913a);return _0x5c913a;},O=(_0x5df39e,_0x5b2fdb)=>(_0x232daa,_0x2cfe28)=>_0x5b2fdb(_0x232daa,_0x2cfe28,_0x5df39e),N=(_0x2a07b7,_0x3a92d5,_0x5e82c8)=>Z(_0x2a07b7,typeof _0x3a92d5!=_0x1cc326(0x219)?_0x3a92d5+'':_0x3a92d5,_0x5e82c8);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1cc326(0x21c)]{constructor(_0x13abdc=D,_0x5678c2,_0x2f87c6){const _0x203d23=_0x1cc326;super(),this['_config']=_0x13abdc,this['_injector']=_0x5678c2,this['_configService']=_0x2f87c6;const {..._0x18c611}=c[_0x203d23(0x1eb)]({},D,this[_0x203d23(0x1c7)]);this[_0x203d23(0x1fc)][_0x203d23(0x220)](q,_0x18c611);}[_0x1cc326(0x1c0)](){const _0x385060=_0x1cc326;[[g],[C],[p]][_0x385060(0x1b5)](_0x3fbec1=>{const _0x228cd9=_0x385060;this[_0x228cd9(0x20a)][_0x228cd9(0x22f)](_0x3fbec1);});}['onReady'](){const _0x485d92=_0x1cc326;this[_0x485d92(0x20a)][_0x485d92(0x203)](C),this[_0x485d92(0x20a)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1cc326(0x1e3),U),N(exports[_0x1cc326(0x218)],_0x1cc326(0x229),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x1cc326(0x1ba)],b[_0x1cc326(0x1fd)],T[_0x1cc326(0x1ec)]),O(0x1,c[_0x1cc326(0x1f7)](c[_0x1cc326(0x1e1)])),O(0x2,c[_0x1cc326(0x1b1)])],exports[_0x1cc326(0x218)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x33fa(_0x1c886e,_0x452e28){const _0x49c217=_0x49c2();return _0x33fa=function(_0x33faa4,_0x321e0d){_0x33faa4=_0x33faa4-0x1d1;let _0x16ee20=_0x49c217[_0x33faa4];return _0x16ee20;},_0x33fa(_0x1c886e,_0x452e28);}const _0x30aa2c=_0x33fa;(function(_0xea9769,_0x395bf9){const _0x148eef=_0x33fa,_0x2cbc20=_0xea9769();while(!![]){try{const _0x198c31=-parseInt(_0x148eef(0x1f7))/0x1+-parseInt(_0x148eef(0x237))/0x2+-parseInt(_0x148eef(0x1ef))/0x3+parseInt(_0x148eef(0x203))/0x4+parseInt(_0x148eef(0x1da))/0x5*(parseInt(_0x148eef(0x1e5))/0x6)+-parseInt(_0x148eef(0x211))/0x7*(-parseInt(_0x148eef(0x228))/0x8)+-parseInt(_0x148eef(0x22e))/0x9*(-parseInt(_0x148eef(0x21b))/0xa);if(_0x198c31===_0x395bf9)break;else _0x2cbc20['push'](_0x2cbc20['shift']());}catch(_0x1b9a59){_0x2cbc20['push'](_0x2cbc20['shift']());}}}(_0x49c2,0x1c280));import{CommentService as _0x5b8e09,CollaborationSessionService as _0xd8c8d1,UniverCollaborationClientPlugin as _0x3ba722}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x8b69f9}from'@univerjs-pro/license';import{dayjs as _0x5bd086,UserManagerService as _0x3af105,Inject as _0x1fd388,Injector as _0x5b06f7,Disposable as _0x4634a6,CustomRangeType as _0x5e13de,UniverInstanceType as _0xf35a65,DependentOn as _0x47bcf7,IConfigService as _0x1b3fdc,Plugin as _0x4d1e38,merge as _0x5c5bd8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x558701}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x13192f,IThreadCommentDataSourceService as _0x5b38d7}from'@univerjs/thread-comment';import{bufferTime as _0x21e75e}from'rxjs';import{HTTPService as _0x1bc482}from'@univerjs/network';const W=_0x30aa2c(0x21a);var I=(_0x328aec=>(_0x328aec[_0x328aec['OpenOrReOpen']=0x0]=_0x30aa2c(0x216),_0x328aec[_0x328aec[_0x30aa2c(0x1e9)]=0x1]=_0x30aa2c(0x1e9),_0x328aec[_0x328aec[_0x30aa2c(0x213)]=-0x1]='UNRECOGNIZED',_0x328aec))(I||{}),v=(_0x159cd4=>(_0x159cd4[_0x159cd4['Unknown']=0x0]=_0x30aa2c(0x1d9),_0x159cd4[_0x159cd4['Add']=0x1]='Add',_0x159cd4[_0x159cd4[_0x30aa2c(0x1f6)]=0x2]=_0x30aa2c(0x1f6),_0x159cd4[_0x159cd4['Edit']=0x3]=_0x30aa2c(0x1e3),_0x159cd4[_0x159cd4[_0x30aa2c(0x1e7)]=0x4]=_0x30aa2c(0x1e7),_0x159cd4[_0x159cd4[_0x30aa2c(0x225)]=0x5]=_0x30aa2c(0x225),_0x159cd4[_0x159cd4['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x159cd4))(v||{});const D=_0x18fd5f=>_0x5bd086(new Date(+_0x18fd5f))[_0x30aa2c(0x226)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4b36eb,_0x25b7fa)=>{const _0x266432=_0x30aa2c,_0x3ed367=_0x4b36eb[_0x266432(0x202)](_0x3af105),_0x3cff21=_0x4b36eb['get'](_0x1bc482);_0x25b7fa[_0x266432(0x1f9)](_0x2041c5=>{const _0x3f01bd=_0x266432;_0x3ed367[_0x3f01bd(0x1e6)](_0x2041c5)&&_0x25b7fa[_0x3f01bd(0x1e2)](_0x2041c5);}),_0x25b7fa[_0x266432(0x232)]&&(await _0x3cff21[_0x266432(0x202)](_0x266432(0x222),{'params':{'userIDs':[..._0x25b7fa]}}))['body'][_0x266432(0x1de)]['forEach'](_0x3e0516=>{const _0x3f7c8e=_0x266432;_0x3e0516&&_0x3ed367[_0x3f7c8e(0x1f1)](_0x3e0516);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x229ad4,_0x38ad6c,_0x26058e,_0xd45ed1)=>{const _0xa4202f=_0x30aa2c;for(var _0x15866d=_0xd45ed1>0x1?void 0x0:_0xd45ed1?K(_0x38ad6c,_0x26058e):_0x38ad6c,_0x59acf3=_0x229ad4[_0xa4202f(0x227)]-0x1,_0xd39bc8;_0x59acf3>=0x0;_0x59acf3--)(_0xd39bc8=_0x229ad4[_0x59acf3])&&(_0x15866d=_0xd39bc8(_0x15866d)||_0x15866d);return _0x15866d;},p=(_0x37d7c9,_0x2cf06a)=>(_0x45782b,_0x7eddf1)=>_0x2cf06a(_0x45782b,_0x7eddf1,_0x37d7c9);let S=class extends _0x4634a6{constructor(_0x4f5b40,_0x28294e,_0x283e22,_0x278f8f){const _0x55c073=_0x30aa2c;super(),this[_0x55c073(0x235)]=_0x4f5b40,this[_0x55c073(0x20a)]=_0x28294e,this['_userService']=_0x283e22,this[_0x55c073(0x208)]=_0x278f8f,this[_0x55c073(0x1fb)](),this[_0x55c073(0x1d3)]();}[_0x30aa2c(0x1d3)](){const _0x137ef2=_0x30aa2c;this[_0x137ef2(0x1d7)](this[_0x137ef2(0x20a)]['commentUpdate$'][_0x137ef2(0x200)](_0x21e75e(0x10))[_0x137ef2(0x1e0)](_0x14a702=>{const _0x516aac=_0x137ef2,_0x9b35eb=new Set();_0x14a702['forEach'](_0x74f992=>{const _0xfaa96b=_0x33fa;switch(_0x74f992[_0xfaa96b(0x1fe)]){case _0xfaa96b(0x22d):{const _0x5df6b9=_0x74f992['payload'][_0xfaa96b(0x210)];_0x9b35eb[_0xfaa96b(0x22d)](_0x5df6b9);break;}}}),B(this[_0x516aac(0x208)],_0x9b35eb);}));}['_init'](){const _0x49f994=_0x30aa2c;this[_0x49f994(0x1d7)](this[_0x49f994(0x235)][_0x49f994(0x209)]['subscribe'](async _0x8e2ed2=>{const _0x1e3118=_0x49f994;var _0x4f5545,_0x38d98e,_0x279ae2,_0x204ab7;const _0x1ef2ef=(_0x4f5545=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x294019=>_0x294019['threadId']===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x4f5545[_0x1e3118(0x214)];if(!_0x1ef2ef)return;const {unitId:_0x2d248f,subUnitId:_0x38ffb8}=_0x1ef2ef;switch(_0x8e2ed2[_0x1e3118(0x20c)]&&this[_0x1e3118(0x236)][_0x1e3118(0x1f1)](_0x8e2ed2['user']),_0x8e2ed2[_0x1e3118(0x1fe)]){case v[_0x1e3118(0x218)]:break;case v[_0x1e3118(0x1f6)]:{this[_0x1e3118(0x20a)][_0x1e3118(0x206)](_0x2d248f,_0x38ffb8,{'unitId':_0x2d248f,'subUnitId':_0x38ffb8,'ref':'','id':_0x8e2ed2[_0x1e3118(0x233)],'dT':D(+_0x8e2ed2[_0x1e3118(0x230)]),'threadId':_0x8e2ed2[_0x1e3118(0x1dd)],'personId':(_0x279ae2=(_0x38d98e=_0x8e2ed2['user'])==null?void 0x0:_0x38d98e[_0x1e3118(0x1e1)])!=null?_0x279ae2:_0x8e2ed2['userId'],'text':JSON['parse'](_0x8e2ed2['content']),'parentId':_0x1ef2ef['id']});break;}case v[_0x1e3118(0x1e7)]:{const _0x4094dc=this['_threadCommentModel'][_0x1e3118(0x1ee)](_0x2d248f,_0x38ffb8,_0x8e2ed2['replyId']);_0x4094dc&&_0x4094dc[_0x1e3118(0x21c)]&&this['_threadCommentModel'][_0x1e3118(0x1f0)](_0x2d248f,_0x38ffb8,_0x8e2ed2[_0x1e3118(0x233)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x2d248f,_0x38ffb8,{'commentId':_0x8e2ed2['replyId'],'text':JSON[_0x1e3118(0x1e8)](_0x8e2ed2[_0x1e3118(0x1fd)])});break;}case v[_0x1e3118(0x225)]:{const _0x3e64cb=(_0x204ab7=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x4cc301=>_0x4cc301[_0x1e3118(0x1dd)]===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x204ab7[_0x1e3118(0x214)];_0x3e64cb&&this[_0x1e3118(0x20a)][_0x1e3118(0x1d5)](_0x2d248f,_0x38ffb8,_0x3e64cb['id'],_0x8e2ed2[_0x1e3118(0x224)]===I['Solved']);break;}}}));}};function _0x49c2(){const _0x3e4d8c=['setConfig','36MBqhEh','getUser','Delete','parse','Solved','customRanges','requireSession','syncUpdateMutationToColla','dataSource','getComment','508095QTzfWw','deleteComment','addUser','_sessionService','getOwnPropertyDescriptor','pluginName','getMemberID','Reply','7605ZlRMNG','filter','forEach','/add','_init','error','content','type','/reply','pipe','/edit','get','309716lcNqIX','updateComment','comments','addComment','unitId','_injector','commentUpdate$','_threadCommentModel','getUnit','user','post','_threadCommentDataSourceService','COMMENT','personId','63007xniidS','body','UNRECOGNIZED','root','/solved','OpenOrReOpen','userId','Add','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','870OlNaja','parentId','resolved','stringify','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','reply','/universer-api/user/list','/delete','solved','Solve','format','length','184PCXqFt','ref','code','slice','_httpService','add','9Cnehpw','_initDataSource','createTimestamp','getCurrentUser','size','replyId','_config','_commentService','_userService','81214sgLcyk','saveCommentToSnapshot','replies','_initUserSync','_configService','resolveComment','comment','disposeWithMe','onStarting','Unknown','40305Thmsbb','map','rangeId','threadId','users','/list','subscribe','userID','delete','Edit'];_0x49c2=function(){return _0x3e4d8c;};return _0x49c2();}S=V([p(0x0,_0x1fd388(_0x5b8e09)),p(0x1,_0x1fd388(_0x13192f)),p(0x2,_0x1fd388(_0x3af105)),p(0x3,_0x1fd388(_0x5b06f7))],S);const z=_0x30aa2c(0x219),M={};var k=Object[_0x30aa2c(0x1f3)],Q=(_0x3bef0a,_0x5948c2,_0x28126e,_0x20e286)=>{const _0x190324=_0x30aa2c;for(var _0xf30e92=_0x20e286>0x1?void 0x0:_0x20e286?k(_0x5948c2,_0x28126e):_0x5948c2,_0x64c676=_0x3bef0a[_0x190324(0x227)]-0x1,_0x2dc079;_0x64c676>=0x0;_0x64c676--)(_0x2dc079=_0x3bef0a[_0x64c676])&&(_0xf30e92=_0x2dc079(_0xf30e92)||_0xf30e92);return _0xf30e92;},_=(_0x24df89,_0x43b634)=>(_0xf077cc,_0x1f7a25)=>_0x43b634(_0xf077cc,_0x1f7a25,_0x24df89);function X(_0x12d678,_0x1a1cbc){const _0x56a841=_0x30aa2c,_0x23d881=_0x12d678[_0x56a841(0x1d2)][0x0];return{..._0x1a1cbc,'id':_0x23d881[_0x56a841(0x233)],'resolved':_0x12d678[_0x56a841(0x224)]===0x1,'dT':D(_0x23d881[_0x56a841(0x230)]),'personId':_0x23d881[_0x56a841(0x217)],'threadId':_0x23d881[_0x56a841(0x1dd)]};}function ee(_0x574e4a,_0x500a84,_0x31b910){const _0x5357e8=_0x30aa2c;var _0xeb5dc5,_0x4fc02b;if(((_0x4fc02b=(_0xeb5dc5=_0x574e4a==null?void 0x0:_0x574e4a['replies'])==null?void 0x0:_0xeb5dc5[_0x5357e8(0x227)])!=null?_0x4fc02b:0x0)>0x0){const _0x493e94=(_0x2b4474,_0xfc4b76)=>({'id':_0x2b4474[_0x5357e8(0x233)],'threadId':_0x2b4474[_0x5357e8(0x1dd)],'dT':D(_0x2b4474[_0x5357e8(0x230)]),'personId':_0x2b4474['userId'],'resolved':_0x574e4a[_0x5357e8(0x224)]===I[_0x5357e8(0x1e9)],'unitId':_0x500a84,'subUnitId':_0x31b910,'text':JSON['parse'](_0x2b4474['content']),'parentId':_0xfc4b76}),_0x461879=_0x493e94(_0x574e4a[_0x5357e8(0x1d2)][0x0]);return{..._0x461879,'children':_0x574e4a[_0x5357e8(0x1d2)][_0x5357e8(0x22b)](0x1)['map'](_0x238aac=>_0x493e94(_0x238aac,_0x461879['id']))};}return null;}let f=class{constructor(_0x45ab42,_0x35539b,_0x561e2f,_0x21ea1f){const _0x178cac=_0x30aa2c;this[_0x178cac(0x22c)]=_0x45ab42,this[_0x178cac(0x236)]=_0x35539b,this[_0x178cac(0x1f2)]=_0x561e2f,this[_0x178cac(0x208)]=_0x21ea1f;}async[_0x30aa2c(0x206)](_0x5f068c){const _0x5a09d5=_0x30aa2c;var _0x503ef4,_0x21d2f4;const {parentId:_0x5e1f4d,unitId:_0x15f9f1,text:_0x1dcfa5,threadId:_0x3bc39e}=_0x5f068c,_0x2604b3=(_0x21d2f4=(_0x503ef4=_0x1dcfa5[_0x5a09d5(0x1ea)])==null?void 0x0:_0x503ef4['filter'](_0x1ecaf1=>_0x1ecaf1['rangeType']===_0x5e13de[_0x5a09d5(0x20f)])[_0x5a09d5(0x1db)](_0x4958a6=>_0x4958a6['rangeId']))!=null?_0x21d2f4:[],_0x5d17cb=JSON[_0x5a09d5(0x21e)](_0x1dcfa5),_0x284656=(await this[_0x5a09d5(0x1f2)][_0x5a09d5(0x1eb)](_0x15f9f1))[_0x5a09d5(0x1f5)]();if(_0x5e1f4d){const _0x2e7cda={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3,'threadId':_0x3bc39e},_0x198404=(await this[_0x5a09d5(0x22c)][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1ff),{'body':_0x2e7cda}))[_0x5a09d5(0x212)][_0x5a09d5(0x221)];return{..._0x5f068c,'id':_0x198404['replyId'],'dT':_0x5bd086(+_0x198404[_0x5a09d5(0x230)])[_0x5a09d5(0x226)](_0x5a09d5(0x220)),'personId':_0x198404['userId']};}else{const _0x551ac2={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3},_0x1304a4=await this['_httpService'][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1fa),{'body':_0x551ac2});return X(_0x1304a4[_0x5a09d5(0x212)][_0x5a09d5(0x1d6)],_0x5f068c);}}async[_0x30aa2c(0x204)](_0x470dbc){const _0x151804=_0x30aa2c;var _0x297ec0,_0x5c12bf;const {text:_0xdf3d4e,unitId:_0x403ddd}=_0x470dbc,_0x5dd241=(_0x5c12bf=(_0x297ec0=_0xdf3d4e[_0x151804(0x1ea)])==null?void 0x0:_0x297ec0[_0x151804(0x1f8)](_0x191e9a=>_0x191e9a['rangeType']===_0x5e13de['COMMENT'])[_0x151804(0x1db)](_0x54fdc2=>_0x54fdc2[_0x151804(0x1dc)]))!=null?_0x5c12bf:[],_0x2dd41f=JSON[_0x151804(0x21e)](_0xdf3d4e),_0x3a2fa1=_0x470dbc['threadId'],_0x2eaf43=_0x470dbc['id'],_0xc13804={'memberId':(await this[_0x151804(0x1f2)][_0x151804(0x1eb)](_0x403ddd))[_0x151804(0x1f5)](),'unitId':_0x403ddd,'threadId':_0x3a2fa1,'mention':_0x5dd241,'content':_0x2dd41f,'replyId':_0x2eaf43},_0x490816=await this['_httpService']['post'](_0x151804(0x21f)+_0x403ddd+_0x151804(0x201),{'body':_0xc13804});return!_0x490816[_0x151804(0x212)][_0x151804(0x1fc)]||_0x490816[_0x151804(0x212)][_0x151804(0x1fc)][_0x151804(0x22a)]===0x1;}async[_0x30aa2c(0x1d5)](_0x23ea3b){const _0xf79bf3=_0x30aa2c,{unitId:_0x16fd6d}=_0x23ea3b,_0x4817ab=_0x23ea3b['threadId'],_0xe12318={'memberId':this[_0xf79bf3(0x236)][_0xf79bf3(0x231)]()['userID'],'unitId':_0x16fd6d,'threadId':_0x4817ab,'solved':_0x23ea3b[_0xf79bf3(0x21d)]?I[_0xf79bf3(0x1e9)]:I[_0xf79bf3(0x216)]},_0x36f6f8=await this[_0xf79bf3(0x22c)][_0xf79bf3(0x20d)](_0xf79bf3(0x21f)+_0x16fd6d+_0xf79bf3(0x215),{'body':_0xe12318});return!_0x36f6f8['body'][_0xf79bf3(0x1fc)]||_0x36f6f8[_0xf79bf3(0x212)][_0xf79bf3(0x1fc)][_0xf79bf3(0x22a)]===0x1;}async[_0x30aa2c(0x1f0)](_0x621db4,_0x1ed848,_0x31a6b9,_0x486d75){const _0x225c26=_0x30aa2c,_0xeca5e={'memberId':(await this[_0x225c26(0x1f2)][_0x225c26(0x1eb)](_0x621db4))[_0x225c26(0x1f5)](),'threadId':_0x31a6b9,'replyId':_0x486d75,'unitId':_0x621db4},_0x295acb=await this[_0x225c26(0x22c)][_0x225c26(0x20d)](_0x225c26(0x21f)+_0x621db4+_0x225c26(0x223),{'body':_0xeca5e});return!_0x295acb[_0x225c26(0x212)]['error']||_0x295acb[_0x225c26(0x212)][_0x225c26(0x1fc)][_0x225c26(0x22a)]===0x1;}async['listComments'](_0x47a15a,_0x43e008,_0x43b3e9){const _0x5c1d61=_0x30aa2c,_0x32706d={'unitId':_0x47a15a,'threadId':_0x43b3e9},_0x417385=await this['_httpService'][_0x5c1d61(0x20d)](_0x5c1d61(0x21f)+_0x47a15a+_0x5c1d61(0x1df),{'body':_0x32706d}),_0x2ec702=_0x43b3e9[_0x5c1d61(0x1db)](_0xb61162=>ee(_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x205)][_0xb61162],_0x47a15a,_0x43e008))['filter'](Boolean);return Object['values'](_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x1de)])[_0x5c1d61(0x1f9)](_0xf754c6=>{const _0x4d6f6a=_0x5c1d61;this[_0x4d6f6a(0x236)][_0x4d6f6a(0x1f1)](_0xf754c6);}),_0x2ec702;}[_0x30aa2c(0x1d1)](_0x14e26c){const _0x59677e=_0x30aa2c;return{'id':_0x14e26c['id'],'threadId':_0x14e26c[_0x59677e(0x1dd)],'ref':_0x14e26c[_0x59677e(0x229)]};}};f=Q([_(0x0,_0x1fd388(_0x1bc482)),_(0x1,_0x1fd388(_0x3af105)),_(0x2,_0x1fd388(_0xd8c8d1)),_(0x3,_0x1fd388(_0x5b06f7))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x269ac6,_0xbb9e2e,_0x345a1b,_0x389966)=>{for(var _0x2b9a4e=_0x389966>0x1?void 0x0:_0x389966?re(_0xbb9e2e,_0x345a1b):_0xbb9e2e,_0x2962c2=_0x269ac6['length']-0x1,_0x1dc49b;_0x2962c2>=0x0;_0x2962c2--)(_0x1dc49b=_0x269ac6[_0x2962c2])&&(_0x2b9a4e=_0x1dc49b(_0x2b9a4e)||_0x2b9a4e);return _0x2b9a4e;},N=(_0x4a54f0,_0x304681)=>(_0x116c6e,_0x10e270)=>_0x304681(_0x116c6e,_0x10e270,_0x4a54f0);let g=class extends _0x4634a6{constructor(_0x1f5bb9,_0x2fc8e8){const _0x469073=_0x30aa2c;super(),this[_0x469073(0x20e)]=_0x1f5bb9,this['_threadCommentDataSource']=_0x2fc8e8,this[_0x469073(0x22f)]();}[_0x30aa2c(0x22f)](){const _0x94e3c2=_0x30aa2c;this['_threadCommentDataSourceService'][_0x94e3c2(0x1ed)]=this['_threadCommentDataSource'],this[_0x94e3c2(0x20e)][_0x94e3c2(0x1ec)]=!0x1;}};g=te([N(0x0,_0x5b38d7),N(0x1,_0x1fd388(f))],g);var se=Object['defineProperty'],oe=Object[_0x30aa2c(0x1f3)],ne=(_0x8cf9da,_0x42aaac,_0x5c7ad6)=>_0x42aaac in _0x8cf9da?se(_0x8cf9da,_0x42aaac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c7ad6}):_0x8cf9da[_0x42aaac]=_0x5c7ad6,ie=(_0x49fd1d,_0x5e7145,_0x302bb4,_0xca21f2)=>{const _0x33482a=_0x30aa2c;for(var _0x1dc53e=_0xca21f2>0x1?void 0x0:_0xca21f2?oe(_0x5e7145,_0x302bb4):_0x5e7145,_0x24f16f=_0x49fd1d[_0x33482a(0x227)]-0x1,_0x26ab18;_0x24f16f>=0x0;_0x24f16f--)(_0x26ab18=_0x49fd1d[_0x24f16f])&&(_0x1dc53e=_0x26ab18(_0x1dc53e)||_0x1dc53e);return _0x1dc53e;},w=(_0x545fa4,_0x111657)=>(_0x5dbc8f,_0x634620)=>_0x111657(_0x5dbc8f,_0x634620,_0x545fa4),$=(_0x20c701,_0x43285c,_0x2dcfe7)=>ne(_0x20c701,typeof _0x43285c!='symbol'?_0x43285c+'':_0x43285c,_0x2dcfe7);let b=class extends _0x4d1e38{constructor(_0x160139=M,_0x180f6b,_0x44b581){const _0x4ce134=_0x30aa2c;super(),this['_config']=_0x160139,this['_injector']=_0x180f6b,this[_0x4ce134(0x1d4)]=_0x44b581;const {..._0xf7f72a}=_0x5c5bd8({},M,this[_0x4ce134(0x234)]);this[_0x4ce134(0x1d4)][_0x4ce134(0x1e4)](z,_0xf7f72a);}[_0x30aa2c(0x1d8)](){[[f],[g],[S]]['forEach'](_0x1c82fb=>{const _0x2acab6=_0x33fa;this[_0x2acab6(0x208)][_0x2acab6(0x22d)](_0x1c82fb);});}['onReady'](){const _0x39d8dc=_0x30aa2c;this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](g),this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](S);}};$(b,_0x30aa2c(0x1f4),W),$(b,_0x30aa2c(0x1fe),_0xf35a65['UNIVER_UNKNOWN']),b=ie([_0x47bcf7(_0x558701,_0x3ba722,_0x8b69f9),w(0x1,_0x1fd388(_0x5b06f7)),w(0x2,_0x1b3fdc)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2b5fac=_0x5bf1;function _0x269e(){const _0x93f086=['customRanges','getUnit','solved','13911007bplEgo','rangeId','_threadCommentModel','Delete','4NhYCEb','_userService','disposeWithMe','userID','addComment','398001cXrOUp','values','syncUpdateMutationToColla','12oFdjsp','add','user','saveCommentToSnapshot','code','defineProperty','post','10nLouNw','addUser','/reply','thread-comment-data-source.config','OpenOrReOpen','_configService','comment','get','users','map','_threadCommentDataSource','threadId','610461OlAiyV','_init','getMemberID','format','Solve','stringify','_httpService','updateComment','pluginName','Unknown','1231672pCVwbr','/edit','setConfig','requireSession','slice','5QOyYPv','getComment','subscribe','579792OoBaVQ','forEach','content','/list','_sessionService','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','type','delete','resolved','replies','_initDataSource','getCurrentUser','filter','parentId','deleteComment','Solved','userId','personId','replyId','_config','root','UNRECOGNIZED','/universer-api/user/list','onReady','getOwnPropertyDescriptor','/solved','resolveComment','reply','_threadCommentDataSourceService','216XsHLwf','_injector','Reply','Edit','UNIVER_UNKNOWN','createTimestamp','_commentService','Add','172228EYgxpi','1094526tosQWB','_initUserSync','/delete','comments','YYYY/MM/DD\x20HH:mm','find','commentUpdate$','/universer-api/comment/unit/','unitId','length','body'];_0x269e=function(){return _0x93f086;};return _0x269e();}(function(_0x57c658,_0x57cd5b){const _0x38ab5c=_0x5bf1,_0x2adb85=_0x57c658();while(!![]){try{const _0x516d7d=parseInt(_0x38ab5c(0x126))/0x1+parseInt(_0x38ab5c(0x11e))/0x2+-parseInt(_0x38ab5c(0xfe))/0x3*(parseInt(_0x38ab5c(0x160))/0x4)+-parseInt(_0x38ab5c(0x123))/0x5*(parseInt(_0x38ab5c(0x14e))/0x6)+-parseInt(_0x38ab5c(0x14d))/0x7*(-parseInt(_0x38ab5c(0x145))/0x8)+parseInt(_0x38ab5c(0x114))/0x9*(parseInt(_0x38ab5c(0x108))/0xa)+parseInt(_0x38ab5c(0x15c))/0xb*(-parseInt(_0x38ab5c(0x101))/0xc);if(_0x516d7d===_0x57cd5b)break;else _0x2adb85['push'](_0x2adb85['shift']());}catch(_0x4b976c){_0x2adb85['push'](_0x2adb85['shift']());}}}(_0x269e,0x54f88));import{CommentService as _0x1643d3,CollaborationSessionService as _0x4592f,UniverCollaborationClientPlugin as _0x12c884}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x13415b}from'@univerjs-pro/license';import{dayjs as _0x5dd75f,UserManagerService as _0x475b3b,Inject as _0xccccd8,Injector as _0x1b0878,Disposable as _0x527aee,CustomRangeType as _0x1ee0ce,UniverInstanceType as _0x538ad9,DependentOn as _0x1756f4,IConfigService as _0x47c9d3,Plugin as _0x107f9d,merge as _0x2dacfc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b6c56}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x6cf1a6,IThreadCommentDataSourceService as _0x41d95c}from'@univerjs/thread-comment';import{bufferTime as _0x12c025}from'rxjs';import{HTTPService as _0x23c06a}from'@univerjs/network';const W=_0x2b5fac(0x12c);var I=(_0x29b1bd=>(_0x29b1bd[_0x29b1bd['OpenOrReOpen']=0x0]=_0x2b5fac(0x10c),_0x29b1bd[_0x29b1bd[_0x2b5fac(0x137)]=0x1]=_0x2b5fac(0x137),_0x29b1bd[_0x29b1bd[_0x2b5fac(0x13d)]=-0x1]=_0x2b5fac(0x13d),_0x29b1bd))(I||{}),v=(_0x4928fe=>(_0x4928fe[_0x4928fe[_0x2b5fac(0x11d)]=0x0]='Unknown',_0x4928fe[_0x4928fe[_0x2b5fac(0x14c)]=0x1]=_0x2b5fac(0x14c),_0x4928fe[_0x4928fe[_0x2b5fac(0x147)]=0x2]=_0x2b5fac(0x147),_0x4928fe[_0x4928fe[_0x2b5fac(0x148)]=0x3]=_0x2b5fac(0x148),_0x4928fe[_0x4928fe[_0x2b5fac(0x15f)]=0x4]=_0x2b5fac(0x15f),_0x4928fe[_0x4928fe[_0x2b5fac(0x118)]=0x5]=_0x2b5fac(0x118),_0x4928fe[_0x4928fe['UNRECOGNIZED']=-0x1]=_0x2b5fac(0x13d),_0x4928fe))(v||{});const D=_0x5425ad=>_0x5dd75f(new Date(+_0x5425ad))[_0x2b5fac(0x117)](_0x2b5fac(0x152)),B=async(_0x5bd1bc,_0x22f234)=>{const _0x5f0595=_0x2b5fac,_0xfa8faa=_0x5bd1bc['get'](_0x475b3b),_0xc6e68d=_0x5bd1bc[_0x5f0595(0x10f)](_0x23c06a);_0x22f234['forEach'](_0x2e1d15=>{const _0x5ad52f=_0x5f0595;_0xfa8faa['getUser'](_0x2e1d15)&&_0x22f234[_0x5ad52f(0x12f)](_0x2e1d15);}),_0x22f234['size']&&(await _0xc6e68d[_0x5f0595(0x10f)](_0x5f0595(0x13e),{'params':{'userIDs':[..._0x22f234]}}))[_0x5f0595(0x158)][_0x5f0595(0x110)][_0x5f0595(0x127)](_0x36b20d=>{const _0x4dc00e=_0x5f0595;_0x36b20d&&_0xfa8faa[_0x4dc00e(0x109)](_0x36b20d);});};var K=Object[_0x2b5fac(0x140)],V=(_0x5e98ca,_0x5b0da5,_0x3d8529,_0x136388)=>{for(var _0x97c3e3=_0x136388>0x1?void 0x0:_0x136388?K(_0x5b0da5,_0x3d8529):_0x5b0da5,_0x14e9d0=_0x5e98ca['length']-0x1,_0x122917;_0x14e9d0>=0x0;_0x14e9d0--)(_0x122917=_0x5e98ca[_0x14e9d0])&&(_0x97c3e3=_0x122917(_0x97c3e3)||_0x97c3e3);return _0x97c3e3;},p=(_0x64a685,_0x10b575)=>(_0x2e257b,_0x54abce)=>_0x10b575(_0x2e257b,_0x54abce,_0x64a685);let S=class extends _0x527aee{constructor(_0x4a844c,_0x1fee33,_0x1f9472,_0x4bfd8e){const _0x37dcf8=_0x2b5fac;super(),this[_0x37dcf8(0x14b)]=_0x4a844c,this[_0x37dcf8(0x15e)]=_0x1fee33,this[_0x37dcf8(0x161)]=_0x1f9472,this[_0x37dcf8(0x146)]=_0x4bfd8e,this['_init'](),this[_0x37dcf8(0x14f)]();}['_initUserSync'](){const _0x127aef=_0x2b5fac;this[_0x127aef(0x162)](this['_threadCommentModel'][_0x127aef(0x154)]['pipe'](_0x12c025(0x10))[_0x127aef(0x125)](_0x275136=>{const _0x3b2511=_0x127aef,_0x580630=new Set();_0x275136[_0x3b2511(0x127)](_0x37ca96=>{const _0x44b486=_0x3b2511;switch(_0x37ca96[_0x44b486(0x12e)]){case _0x44b486(0x102):{const _0x4e1234=_0x37ca96['payload'][_0x44b486(0x139)];_0x580630[_0x44b486(0x102)](_0x4e1234);break;}}}),B(this[_0x3b2511(0x146)],_0x580630);}));}[_0x2b5fac(0x115)](){const _0xebf3f6=_0x2b5fac;this['disposeWithMe'](this['_commentService'][_0xebf3f6(0x154)][_0xebf3f6(0x125)](async _0x291447=>{const _0x2adbe2=_0xebf3f6;var _0x39c001,_0x41c1f4,_0x2fcac5,_0xe5d448;const _0x4e66ac=(_0x39c001=this['_threadCommentModel'][_0x2adbe2(0x15a)](_0x291447[_0x2adbe2(0x156)])['find'](_0xd6c8c7=>_0xd6c8c7[_0x2adbe2(0x113)]===_0x291447['threadId']))==null?void 0x0:_0x39c001['root'];if(!_0x4e66ac)return;const {unitId:_0x574c50,subUnitId:_0x359dae}=_0x4e66ac;switch(_0x291447['user']&&this[_0x2adbe2(0x161)]['addUser'](_0x291447[_0x2adbe2(0x103)]),_0x291447['type']){case v['Add']:break;case v[_0x2adbe2(0x147)]:{this[_0x2adbe2(0x15e)][_0x2adbe2(0xfd)](_0x574c50,_0x359dae,{'unitId':_0x574c50,'subUnitId':_0x359dae,'ref':'','id':_0x291447[_0x2adbe2(0x13a)],'dT':D(+_0x291447[_0x2adbe2(0x14a)]),'threadId':_0x291447[_0x2adbe2(0x113)],'personId':(_0x2fcac5=(_0x41c1f4=_0x291447[_0x2adbe2(0x103)])==null?void 0x0:_0x41c1f4[_0x2adbe2(0xfc)])!=null?_0x2fcac5:_0x291447[_0x2adbe2(0x138)],'text':JSON[_0x2adbe2(0x12d)](_0x291447[_0x2adbe2(0x128)]),'parentId':_0x4e66ac['id']});break;}case v[_0x2adbe2(0x15f)]:{const _0xdb398c=this[_0x2adbe2(0x15e)][_0x2adbe2(0x124)](_0x574c50,_0x359dae,_0x291447[_0x2adbe2(0x13a)]);_0xdb398c&&_0xdb398c[_0x2adbe2(0x135)]&&this[_0x2adbe2(0x15e)]['deleteComment'](_0x574c50,_0x359dae,_0x291447[_0x2adbe2(0x13a)]);break;}case v[_0x2adbe2(0x148)]:{this['_threadCommentModel'][_0x2adbe2(0x11b)](_0x574c50,_0x359dae,{'commentId':_0x291447['replyId'],'text':JSON[_0x2adbe2(0x12d)](_0x291447[_0x2adbe2(0x128)])});break;}case v[_0x2adbe2(0x118)]:{const _0x3951f8=(_0xe5d448=this[_0x2adbe2(0x15e)][_0x2adbe2(0x15a)](_0x291447[_0x2adbe2(0x156)])[_0x2adbe2(0x153)](_0x270489=>_0x270489['threadId']===_0x291447[_0x2adbe2(0x113)]))==null?void 0x0:_0xe5d448[_0x2adbe2(0x13c)];_0x3951f8&&this[_0x2adbe2(0x15e)][_0x2adbe2(0x142)](_0x574c50,_0x359dae,_0x3951f8['id'],_0x291447['solved']===I[_0x2adbe2(0x137)]);break;}}}));}};S=V([p(0x0,_0xccccd8(_0x1643d3)),p(0x1,_0xccccd8(_0x6cf1a6)),p(0x2,_0xccccd8(_0x475b3b)),p(0x3,_0xccccd8(_0x1b0878))],S);function _0x5bf1(_0x44de78,_0x37bb8e){const _0x269eaf=_0x269e();return _0x5bf1=function(_0x5bf1a0,_0x2cebc3){_0x5bf1a0=_0x5bf1a0-0xfc;let _0x204b92=_0x269eaf[_0x5bf1a0];return _0x204b92;},_0x5bf1(_0x44de78,_0x37bb8e);}const z=_0x2b5fac(0x10b),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x132c17,_0xca42e9,_0x16ce39,_0x3ba40d)=>{const _0x3f1611=_0x2b5fac;for(var _0x3ddbf8=_0x3ba40d>0x1?void 0x0:_0x3ba40d?k(_0xca42e9,_0x16ce39):_0xca42e9,_0x218c93=_0x132c17[_0x3f1611(0x157)]-0x1,_0x43283a;_0x218c93>=0x0;_0x218c93--)(_0x43283a=_0x132c17[_0x218c93])&&(_0x3ddbf8=_0x43283a(_0x3ddbf8)||_0x3ddbf8);return _0x3ddbf8;},_=(_0x48f0aa,_0xb790b5)=>(_0x304586,_0x1c20ca)=>_0xb790b5(_0x304586,_0x1c20ca,_0x48f0aa);function X(_0x48eef3,_0x35a490){const _0x3c2e26=_0x2b5fac,_0x27483b=_0x48eef3[_0x3c2e26(0x131)][0x0];return{..._0x35a490,'id':_0x27483b[_0x3c2e26(0x13a)],'resolved':_0x48eef3[_0x3c2e26(0x15b)]===0x1,'dT':D(_0x27483b[_0x3c2e26(0x14a)]),'personId':_0x27483b[_0x3c2e26(0x138)],'threadId':_0x27483b[_0x3c2e26(0x113)]};}function ee(_0x27c21a,_0x4ccf6c,_0x62e727){const _0x3f3efc=_0x2b5fac;var _0x166a76,_0x2d688c;if(((_0x2d688c=(_0x166a76=_0x27c21a==null?void 0x0:_0x27c21a[_0x3f3efc(0x131)])==null?void 0x0:_0x166a76[_0x3f3efc(0x157)])!=null?_0x2d688c:0x0)>0x0){const _0x30bd7f=(_0x42fbd8,_0x20717c)=>({'id':_0x42fbd8[_0x3f3efc(0x13a)],'threadId':_0x42fbd8[_0x3f3efc(0x113)],'dT':D(_0x42fbd8[_0x3f3efc(0x14a)]),'personId':_0x42fbd8[_0x3f3efc(0x138)],'resolved':_0x27c21a[_0x3f3efc(0x15b)]===I[_0x3f3efc(0x137)],'unitId':_0x4ccf6c,'subUnitId':_0x62e727,'text':JSON[_0x3f3efc(0x12d)](_0x42fbd8[_0x3f3efc(0x128)]),'parentId':_0x20717c}),_0x5de295=_0x30bd7f(_0x27c21a[_0x3f3efc(0x131)][0x0]);return{..._0x5de295,'children':_0x27c21a['replies'][_0x3f3efc(0x122)](0x1)[_0x3f3efc(0x111)](_0xe248bc=>_0x30bd7f(_0xe248bc,_0x5de295['id']))};}return null;}let f=class{constructor(_0x2abf80,_0x1da02e,_0x4c3d9b,_0x2e7f25){const _0x615afb=_0x2b5fac;this[_0x615afb(0x11a)]=_0x2abf80,this[_0x615afb(0x161)]=_0x1da02e,this['_sessionService']=_0x4c3d9b,this[_0x615afb(0x146)]=_0x2e7f25;}async['addComment'](_0x13165b){const _0x463547=_0x2b5fac;var _0x2de4b6,_0x589973;const {parentId:_0x35f11e,unitId:_0x54557a,text:_0x30c8fd,threadId:_0x20b42c}=_0x13165b,_0x19e199=(_0x589973=(_0x2de4b6=_0x30c8fd[_0x463547(0x159)])==null?void 0x0:_0x2de4b6['filter'](_0x560bff=>_0x560bff['rangeType']===_0x1ee0ce['COMMENT'])[_0x463547(0x111)](_0x48c29=>_0x48c29[_0x463547(0x15d)]))!=null?_0x589973:[],_0x19a126=JSON['stringify'](_0x30c8fd),_0x23eefb=(await this['_sessionService'][_0x463547(0x121)](_0x54557a))['getMemberID']();if(_0x35f11e){const _0x428aa0={'memberId':_0x23eefb,'unitId':_0x54557a,'content':_0x19a126,'mention':_0x19e199,'threadId':_0x20b42c},_0x1da836=(await this[_0x463547(0x11a)][_0x463547(0x107)](_0x463547(0x155)+_0x54557a+_0x463547(0x10a),{'body':_0x428aa0}))[_0x463547(0x158)][_0x463547(0x143)];return{..._0x13165b,'id':_0x1da836[_0x463547(0x13a)],'dT':_0x5dd75f(+_0x1da836[_0x463547(0x14a)])[_0x463547(0x117)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1da836[_0x463547(0x138)]};}else{const _0x5af8e8={'memberId':_0x23eefb,'unitId':_0x54557a,'content':_0x19a126,'mention':_0x19e199},_0x584287=await this[_0x463547(0x11a)][_0x463547(0x107)](_0x463547(0x155)+_0x54557a+'/add',{'body':_0x5af8e8});return X(_0x584287[_0x463547(0x158)][_0x463547(0x10e)],_0x13165b);}}async[_0x2b5fac(0x11b)](_0x5a97b7){const _0x55c84e=_0x2b5fac;var _0x982412,_0x36eac2;const {text:_0x90545b,unitId:_0x568535}=_0x5a97b7,_0x18b10a=(_0x36eac2=(_0x982412=_0x90545b[_0x55c84e(0x159)])==null?void 0x0:_0x982412[_0x55c84e(0x134)](_0xc80bc8=>_0xc80bc8['rangeType']===_0x1ee0ce['COMMENT'])[_0x55c84e(0x111)](_0x50aa73=>_0x50aa73['rangeId']))!=null?_0x36eac2:[],_0x50166b=JSON[_0x55c84e(0x119)](_0x90545b),_0x2323d4=_0x5a97b7[_0x55c84e(0x113)],_0x2b2bdd=_0x5a97b7['id'],_0x41178e={'memberId':(await this[_0x55c84e(0x12a)][_0x55c84e(0x121)](_0x568535))['getMemberID'](),'unitId':_0x568535,'threadId':_0x2323d4,'mention':_0x18b10a,'content':_0x50166b,'replyId':_0x2b2bdd},_0xad1fea=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x568535+_0x55c84e(0x11f),{'body':_0x41178e});return!_0xad1fea[_0x55c84e(0x158)]['error']||_0xad1fea[_0x55c84e(0x158)][_0x55c84e(0x12b)]['code']===0x1;}async[_0x2b5fac(0x142)](_0x50be37){const _0x46edd9=_0x2b5fac,{unitId:_0x104c0d}=_0x50be37,_0x31eb37=_0x50be37[_0x46edd9(0x113)],_0x171288={'memberId':this[_0x46edd9(0x161)][_0x46edd9(0x133)]()[_0x46edd9(0xfc)],'unitId':_0x104c0d,'threadId':_0x31eb37,'solved':_0x50be37[_0x46edd9(0x130)]?I['Solved']:I[_0x46edd9(0x10c)]},_0x11c0b3=await this[_0x46edd9(0x11a)][_0x46edd9(0x107)](_0x46edd9(0x155)+_0x104c0d+_0x46edd9(0x141),{'body':_0x171288});return!_0x11c0b3[_0x46edd9(0x158)][_0x46edd9(0x12b)]||_0x11c0b3[_0x46edd9(0x158)][_0x46edd9(0x12b)][_0x46edd9(0x105)]===0x1;}async[_0x2b5fac(0x136)](_0x121ee7,_0x40bd14,_0x5c73b7,_0x24970a){const _0x3f888b=_0x2b5fac,_0x4df111={'memberId':(await this[_0x3f888b(0x12a)][_0x3f888b(0x121)](_0x121ee7))[_0x3f888b(0x116)](),'threadId':_0x5c73b7,'replyId':_0x24970a,'unitId':_0x121ee7},_0x145911=await this['_httpService'][_0x3f888b(0x107)](_0x3f888b(0x155)+_0x121ee7+_0x3f888b(0x150),{'body':_0x4df111});return!_0x145911[_0x3f888b(0x158)][_0x3f888b(0x12b)]||_0x145911[_0x3f888b(0x158)][_0x3f888b(0x12b)][_0x3f888b(0x105)]===0x1;}async['listComments'](_0xd1cb93,_0x52dbe0,_0x23becd){const _0x33f765=_0x2b5fac,_0x50ce29={'unitId':_0xd1cb93,'threadId':_0x23becd},_0x29872d=await this[_0x33f765(0x11a)][_0x33f765(0x107)](_0x33f765(0x155)+_0xd1cb93+_0x33f765(0x129),{'body':_0x50ce29}),_0x327995=_0x23becd['map'](_0x3714ec=>ee(_0x29872d['body'][_0x33f765(0x151)][_0x3714ec],_0xd1cb93,_0x52dbe0))[_0x33f765(0x134)](Boolean);return Object[_0x33f765(0xff)](_0x29872d['body'][_0x33f765(0x110)])[_0x33f765(0x127)](_0x32ec6d=>{const _0x20ae81=_0x33f765;this[_0x20ae81(0x161)]['addUser'](_0x32ec6d);}),_0x327995;}[_0x2b5fac(0x104)](_0x5dd41d){const _0x243945=_0x2b5fac;return{'id':_0x5dd41d['id'],'threadId':_0x5dd41d[_0x243945(0x113)],'ref':_0x5dd41d['ref']};}};f=Q([_(0x0,_0xccccd8(_0x23c06a)),_(0x1,_0xccccd8(_0x475b3b)),_(0x2,_0xccccd8(_0x4592f)),_(0x3,_0xccccd8(_0x1b0878))],f);var re=Object[_0x2b5fac(0x140)],te=(_0x10e7d1,_0x142d30,_0x5ba3f9,_0x363f58)=>{const _0x2c4dae=_0x2b5fac;for(var _0x3c1fd7=_0x363f58>0x1?void 0x0:_0x363f58?re(_0x142d30,_0x5ba3f9):_0x142d30,_0x286c7d=_0x10e7d1[_0x2c4dae(0x157)]-0x1,_0xa01b62;_0x286c7d>=0x0;_0x286c7d--)(_0xa01b62=_0x10e7d1[_0x286c7d])&&(_0x3c1fd7=_0xa01b62(_0x3c1fd7)||_0x3c1fd7);return _0x3c1fd7;},N=(_0x23ee45,_0x52a34e)=>(_0x57f084,_0x4136af)=>_0x52a34e(_0x57f084,_0x4136af,_0x23ee45);let g=class extends _0x527aee{constructor(_0x502bf9,_0x2c82ba){const _0x496a1a=_0x2b5fac;super(),this['_threadCommentDataSourceService']=_0x502bf9,this[_0x496a1a(0x112)]=_0x2c82ba,this[_0x496a1a(0x132)]();}[_0x2b5fac(0x132)](){const _0x42314e=_0x2b5fac;this[_0x42314e(0x144)]['dataSource']=this[_0x42314e(0x112)],this[_0x42314e(0x144)][_0x42314e(0x100)]=!0x1;}};g=te([N(0x0,_0x41d95c),N(0x1,_0xccccd8(f))],g);var se=Object[_0x2b5fac(0x106)],oe=Object[_0x2b5fac(0x140)],ne=(_0xbcb39a,_0x35f1cd,_0xee785d)=>_0x35f1cd in _0xbcb39a?se(_0xbcb39a,_0x35f1cd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xee785d}):_0xbcb39a[_0x35f1cd]=_0xee785d,ie=(_0x450e88,_0x48f20b,_0x14f01f,_0x4b5a12)=>{const _0x3ee6db=_0x2b5fac;for(var _0x2fcadd=_0x4b5a12>0x1?void 0x0:_0x4b5a12?oe(_0x48f20b,_0x14f01f):_0x48f20b,_0x4bb6f4=_0x450e88[_0x3ee6db(0x157)]-0x1,_0x4cefe8;_0x4bb6f4>=0x0;_0x4bb6f4--)(_0x4cefe8=_0x450e88[_0x4bb6f4])&&(_0x2fcadd=_0x4cefe8(_0x2fcadd)||_0x2fcadd);return _0x2fcadd;},w=(_0x37468c,_0x1f5429)=>(_0x541a3d,_0x55fc0d)=>_0x1f5429(_0x541a3d,_0x55fc0d,_0x37468c),$=(_0x4ad1f1,_0x3d93f5,_0x8da227)=>ne(_0x4ad1f1,typeof _0x3d93f5!='symbol'?_0x3d93f5+'':_0x3d93f5,_0x8da227);let b=class extends _0x107f9d{constructor(_0x10935b=M,_0x41f671,_0x401885){const _0x5ee2bd=_0x2b5fac;super(),this[_0x5ee2bd(0x13b)]=_0x10935b,this[_0x5ee2bd(0x146)]=_0x41f671,this[_0x5ee2bd(0x10d)]=_0x401885;const {..._0x513e42}=_0x2dacfc({},M,this[_0x5ee2bd(0x13b)]);this['_configService'][_0x5ee2bd(0x120)](z,_0x513e42);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x31668b=>{const _0x10ea49=_0x5bf1;this[_0x10ea49(0x146)][_0x10ea49(0x102)](_0x31668b);});}[_0x2b5fac(0x13f)](){const _0x507d8c=_0x2b5fac;this[_0x507d8c(0x146)][_0x507d8c(0x10f)](g),this[_0x507d8c(0x146)][_0x507d8c(0x10f)](S);}};$(b,_0x2b5fac(0x11c),W),$(b,'type',_0x538ad9[_0x2b5fac(0x149)]),b=ie([_0x1756f4(_0x1b6c56,_0x12c884,_0x13415b),w(0x1,_0xccccd8(_0x1b0878)),w(0x2,_0x47c9d3)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x33fa(_0x1c886e,_0x452e28){const _0x49c217=_0x49c2();return _0x33fa=function(_0x33faa4,_0x321e0d){_0x33faa4=_0x33faa4-0x1d1;let _0x16ee20=_0x49c217[_0x33faa4];return _0x16ee20;},_0x33fa(_0x1c886e,_0x452e28);}const _0x30aa2c=_0x33fa;(function(_0xea9769,_0x395bf9){const _0x148eef=_0x33fa,_0x2cbc20=_0xea9769();while(!![]){try{const _0x198c31=-parseInt(_0x148eef(0x1f7))/0x1+-parseInt(_0x148eef(0x237))/0x2+-parseInt(_0x148eef(0x1ef))/0x3+parseInt(_0x148eef(0x203))/0x4+parseInt(_0x148eef(0x1da))/0x5*(parseInt(_0x148eef(0x1e5))/0x6)+-parseInt(_0x148eef(0x211))/0x7*(-parseInt(_0x148eef(0x228))/0x8)+-parseInt(_0x148eef(0x22e))/0x9*(-parseInt(_0x148eef(0x21b))/0xa);if(_0x198c31===_0x395bf9)break;else _0x2cbc20['push'](_0x2cbc20['shift']());}catch(_0x1b9a59){_0x2cbc20['push'](_0x2cbc20['shift']());}}}(_0x49c2,0x1c280));import{CommentService as _0x5b8e09,CollaborationSessionService as _0xd8c8d1,UniverCollaborationClientPlugin as _0x3ba722}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x8b69f9}from'@univerjs-pro/license';import{dayjs as _0x5bd086,UserManagerService as _0x3af105,Inject as _0x1fd388,Injector as _0x5b06f7,Disposable as _0x4634a6,CustomRangeType as _0x5e13de,UniverInstanceType as _0xf35a65,DependentOn as _0x47bcf7,IConfigService as _0x1b3fdc,Plugin as _0x4d1e38,merge as _0x5c5bd8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x558701}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x13192f,IThreadCommentDataSourceService as _0x5b38d7}from'@univerjs/thread-comment';import{bufferTime as _0x21e75e}from'rxjs';import{HTTPService as _0x1bc482}from'@univerjs/network';const W=_0x30aa2c(0x21a);var I=(_0x328aec=>(_0x328aec[_0x328aec['OpenOrReOpen']=0x0]=_0x30aa2c(0x216),_0x328aec[_0x328aec[_0x30aa2c(0x1e9)]=0x1]=_0x30aa2c(0x1e9),_0x328aec[_0x328aec[_0x30aa2c(0x213)]=-0x1]='UNRECOGNIZED',_0x328aec))(I||{}),v=(_0x159cd4=>(_0x159cd4[_0x159cd4['Unknown']=0x0]=_0x30aa2c(0x1d9),_0x159cd4[_0x159cd4['Add']=0x1]='Add',_0x159cd4[_0x159cd4[_0x30aa2c(0x1f6)]=0x2]=_0x30aa2c(0x1f6),_0x159cd4[_0x159cd4['Edit']=0x3]=_0x30aa2c(0x1e3),_0x159cd4[_0x159cd4[_0x30aa2c(0x1e7)]=0x4]=_0x30aa2c(0x1e7),_0x159cd4[_0x159cd4[_0x30aa2c(0x225)]=0x5]=_0x30aa2c(0x225),_0x159cd4[_0x159cd4['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x159cd4))(v||{});const D=_0x18fd5f=>_0x5bd086(new Date(+_0x18fd5f))[_0x30aa2c(0x226)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4b36eb,_0x25b7fa)=>{const _0x266432=_0x30aa2c,_0x3ed367=_0x4b36eb[_0x266432(0x202)](_0x3af105),_0x3cff21=_0x4b36eb['get'](_0x1bc482);_0x25b7fa[_0x266432(0x1f9)](_0x2041c5=>{const _0x3f01bd=_0x266432;_0x3ed367[_0x3f01bd(0x1e6)](_0x2041c5)&&_0x25b7fa[_0x3f01bd(0x1e2)](_0x2041c5);}),_0x25b7fa[_0x266432(0x232)]&&(await _0x3cff21[_0x266432(0x202)](_0x266432(0x222),{'params':{'userIDs':[..._0x25b7fa]}}))['body'][_0x266432(0x1de)]['forEach'](_0x3e0516=>{const _0x3f7c8e=_0x266432;_0x3e0516&&_0x3ed367[_0x3f7c8e(0x1f1)](_0x3e0516);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x229ad4,_0x38ad6c,_0x26058e,_0xd45ed1)=>{const _0xa4202f=_0x30aa2c;for(var _0x15866d=_0xd45ed1>0x1?void 0x0:_0xd45ed1?K(_0x38ad6c,_0x26058e):_0x38ad6c,_0x59acf3=_0x229ad4[_0xa4202f(0x227)]-0x1,_0xd39bc8;_0x59acf3>=0x0;_0x59acf3--)(_0xd39bc8=_0x229ad4[_0x59acf3])&&(_0x15866d=_0xd39bc8(_0x15866d)||_0x15866d);return _0x15866d;},p=(_0x37d7c9,_0x2cf06a)=>(_0x45782b,_0x7eddf1)=>_0x2cf06a(_0x45782b,_0x7eddf1,_0x37d7c9);let S=class extends _0x4634a6{constructor(_0x4f5b40,_0x28294e,_0x283e22,_0x278f8f){const _0x55c073=_0x30aa2c;super(),this[_0x55c073(0x235)]=_0x4f5b40,this[_0x55c073(0x20a)]=_0x28294e,this['_userService']=_0x283e22,this[_0x55c073(0x208)]=_0x278f8f,this[_0x55c073(0x1fb)](),this[_0x55c073(0x1d3)]();}[_0x30aa2c(0x1d3)](){const _0x137ef2=_0x30aa2c;this[_0x137ef2(0x1d7)](this[_0x137ef2(0x20a)]['commentUpdate$'][_0x137ef2(0x200)](_0x21e75e(0x10))[_0x137ef2(0x1e0)](_0x14a702=>{const _0x516aac=_0x137ef2,_0x9b35eb=new Set();_0x14a702['forEach'](_0x74f992=>{const _0xfaa96b=_0x33fa;switch(_0x74f992[_0xfaa96b(0x1fe)]){case _0xfaa96b(0x22d):{const _0x5df6b9=_0x74f992['payload'][_0xfaa96b(0x210)];_0x9b35eb[_0xfaa96b(0x22d)](_0x5df6b9);break;}}}),B(this[_0x516aac(0x208)],_0x9b35eb);}));}['_init'](){const _0x49f994=_0x30aa2c;this[_0x49f994(0x1d7)](this[_0x49f994(0x235)][_0x49f994(0x209)]['subscribe'](async _0x8e2ed2=>{const _0x1e3118=_0x49f994;var _0x4f5545,_0x38d98e,_0x279ae2,_0x204ab7;const _0x1ef2ef=(_0x4f5545=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x294019=>_0x294019['threadId']===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x4f5545[_0x1e3118(0x214)];if(!_0x1ef2ef)return;const {unitId:_0x2d248f,subUnitId:_0x38ffb8}=_0x1ef2ef;switch(_0x8e2ed2[_0x1e3118(0x20c)]&&this[_0x1e3118(0x236)][_0x1e3118(0x1f1)](_0x8e2ed2['user']),_0x8e2ed2[_0x1e3118(0x1fe)]){case v[_0x1e3118(0x218)]:break;case v[_0x1e3118(0x1f6)]:{this[_0x1e3118(0x20a)][_0x1e3118(0x206)](_0x2d248f,_0x38ffb8,{'unitId':_0x2d248f,'subUnitId':_0x38ffb8,'ref':'','id':_0x8e2ed2[_0x1e3118(0x233)],'dT':D(+_0x8e2ed2[_0x1e3118(0x230)]),'threadId':_0x8e2ed2[_0x1e3118(0x1dd)],'personId':(_0x279ae2=(_0x38d98e=_0x8e2ed2['user'])==null?void 0x0:_0x38d98e[_0x1e3118(0x1e1)])!=null?_0x279ae2:_0x8e2ed2['userId'],'text':JSON['parse'](_0x8e2ed2['content']),'parentId':_0x1ef2ef['id']});break;}case v[_0x1e3118(0x1e7)]:{const _0x4094dc=this['_threadCommentModel'][_0x1e3118(0x1ee)](_0x2d248f,_0x38ffb8,_0x8e2ed2['replyId']);_0x4094dc&&_0x4094dc[_0x1e3118(0x21c)]&&this['_threadCommentModel'][_0x1e3118(0x1f0)](_0x2d248f,_0x38ffb8,_0x8e2ed2[_0x1e3118(0x233)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x2d248f,_0x38ffb8,{'commentId':_0x8e2ed2['replyId'],'text':JSON[_0x1e3118(0x1e8)](_0x8e2ed2[_0x1e3118(0x1fd)])});break;}case v[_0x1e3118(0x225)]:{const _0x3e64cb=(_0x204ab7=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x4cc301=>_0x4cc301[_0x1e3118(0x1dd)]===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x204ab7[_0x1e3118(0x214)];_0x3e64cb&&this[_0x1e3118(0x20a)][_0x1e3118(0x1d5)](_0x2d248f,_0x38ffb8,_0x3e64cb['id'],_0x8e2ed2[_0x1e3118(0x224)]===I['Solved']);break;}}}));}};function _0x49c2(){const _0x3e4d8c=['setConfig','36MBqhEh','getUser','Delete','parse','Solved','customRanges','requireSession','syncUpdateMutationToColla','dataSource','getComment','508095QTzfWw','deleteComment','addUser','_sessionService','getOwnPropertyDescriptor','pluginName','getMemberID','Reply','7605ZlRMNG','filter','forEach','/add','_init','error','content','type','/reply','pipe','/edit','get','309716lcNqIX','updateComment','comments','addComment','unitId','_injector','commentUpdate$','_threadCommentModel','getUnit','user','post','_threadCommentDataSourceService','COMMENT','personId','63007xniidS','body','UNRECOGNIZED','root','/solved','OpenOrReOpen','userId','Add','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','870OlNaja','parentId','resolved','stringify','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','reply','/universer-api/user/list','/delete','solved','Solve','format','length','184PCXqFt','ref','code','slice','_httpService','add','9Cnehpw','_initDataSource','createTimestamp','getCurrentUser','size','replyId','_config','_commentService','_userService','81214sgLcyk','saveCommentToSnapshot','replies','_initUserSync','_configService','resolveComment','comment','disposeWithMe','onStarting','Unknown','40305Thmsbb','map','rangeId','threadId','users','/list','subscribe','userID','delete','Edit'];_0x49c2=function(){return _0x3e4d8c;};return _0x49c2();}S=V([p(0x0,_0x1fd388(_0x5b8e09)),p(0x1,_0x1fd388(_0x13192f)),p(0x2,_0x1fd388(_0x3af105)),p(0x3,_0x1fd388(_0x5b06f7))],S);const z=_0x30aa2c(0x219),M={};var k=Object[_0x30aa2c(0x1f3)],Q=(_0x3bef0a,_0x5948c2,_0x28126e,_0x20e286)=>{const _0x190324=_0x30aa2c;for(var _0xf30e92=_0x20e286>0x1?void 0x0:_0x20e286?k(_0x5948c2,_0x28126e):_0x5948c2,_0x64c676=_0x3bef0a[_0x190324(0x227)]-0x1,_0x2dc079;_0x64c676>=0x0;_0x64c676--)(_0x2dc079=_0x3bef0a[_0x64c676])&&(_0xf30e92=_0x2dc079(_0xf30e92)||_0xf30e92);return _0xf30e92;},_=(_0x24df89,_0x43b634)=>(_0xf077cc,_0x1f7a25)=>_0x43b634(_0xf077cc,_0x1f7a25,_0x24df89);function X(_0x12d678,_0x1a1cbc){const _0x56a841=_0x30aa2c,_0x23d881=_0x12d678[_0x56a841(0x1d2)][0x0];return{..._0x1a1cbc,'id':_0x23d881[_0x56a841(0x233)],'resolved':_0x12d678[_0x56a841(0x224)]===0x1,'dT':D(_0x23d881[_0x56a841(0x230)]),'personId':_0x23d881[_0x56a841(0x217)],'threadId':_0x23d881[_0x56a841(0x1dd)]};}function ee(_0x574e4a,_0x500a84,_0x31b910){const _0x5357e8=_0x30aa2c;var _0xeb5dc5,_0x4fc02b;if(((_0x4fc02b=(_0xeb5dc5=_0x574e4a==null?void 0x0:_0x574e4a['replies'])==null?void 0x0:_0xeb5dc5[_0x5357e8(0x227)])!=null?_0x4fc02b:0x0)>0x0){const _0x493e94=(_0x2b4474,_0xfc4b76)=>({'id':_0x2b4474[_0x5357e8(0x233)],'threadId':_0x2b4474[_0x5357e8(0x1dd)],'dT':D(_0x2b4474[_0x5357e8(0x230)]),'personId':_0x2b4474['userId'],'resolved':_0x574e4a[_0x5357e8(0x224)]===I[_0x5357e8(0x1e9)],'unitId':_0x500a84,'subUnitId':_0x31b910,'text':JSON['parse'](_0x2b4474['content']),'parentId':_0xfc4b76}),_0x461879=_0x493e94(_0x574e4a[_0x5357e8(0x1d2)][0x0]);return{..._0x461879,'children':_0x574e4a[_0x5357e8(0x1d2)][_0x5357e8(0x22b)](0x1)['map'](_0x238aac=>_0x493e94(_0x238aac,_0x461879['id']))};}return null;}let f=class{constructor(_0x45ab42,_0x35539b,_0x561e2f,_0x21ea1f){const _0x178cac=_0x30aa2c;this[_0x178cac(0x22c)]=_0x45ab42,this[_0x178cac(0x236)]=_0x35539b,this[_0x178cac(0x1f2)]=_0x561e2f,this[_0x178cac(0x208)]=_0x21ea1f;}async[_0x30aa2c(0x206)](_0x5f068c){const _0x5a09d5=_0x30aa2c;var _0x503ef4,_0x21d2f4;const {parentId:_0x5e1f4d,unitId:_0x15f9f1,text:_0x1dcfa5,threadId:_0x3bc39e}=_0x5f068c,_0x2604b3=(_0x21d2f4=(_0x503ef4=_0x1dcfa5[_0x5a09d5(0x1ea)])==null?void 0x0:_0x503ef4['filter'](_0x1ecaf1=>_0x1ecaf1['rangeType']===_0x5e13de[_0x5a09d5(0x20f)])[_0x5a09d5(0x1db)](_0x4958a6=>_0x4958a6['rangeId']))!=null?_0x21d2f4:[],_0x5d17cb=JSON[_0x5a09d5(0x21e)](_0x1dcfa5),_0x284656=(await this[_0x5a09d5(0x1f2)][_0x5a09d5(0x1eb)](_0x15f9f1))[_0x5a09d5(0x1f5)]();if(_0x5e1f4d){const _0x2e7cda={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3,'threadId':_0x3bc39e},_0x198404=(await this[_0x5a09d5(0x22c)][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1ff),{'body':_0x2e7cda}))[_0x5a09d5(0x212)][_0x5a09d5(0x221)];return{..._0x5f068c,'id':_0x198404['replyId'],'dT':_0x5bd086(+_0x198404[_0x5a09d5(0x230)])[_0x5a09d5(0x226)](_0x5a09d5(0x220)),'personId':_0x198404['userId']};}else{const _0x551ac2={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3},_0x1304a4=await this['_httpService'][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1fa),{'body':_0x551ac2});return X(_0x1304a4[_0x5a09d5(0x212)][_0x5a09d5(0x1d6)],_0x5f068c);}}async[_0x30aa2c(0x204)](_0x470dbc){const _0x151804=_0x30aa2c;var _0x297ec0,_0x5c12bf;const {text:_0xdf3d4e,unitId:_0x403ddd}=_0x470dbc,_0x5dd241=(_0x5c12bf=(_0x297ec0=_0xdf3d4e[_0x151804(0x1ea)])==null?void 0x0:_0x297ec0[_0x151804(0x1f8)](_0x191e9a=>_0x191e9a['rangeType']===_0x5e13de['COMMENT'])[_0x151804(0x1db)](_0x54fdc2=>_0x54fdc2[_0x151804(0x1dc)]))!=null?_0x5c12bf:[],_0x2dd41f=JSON[_0x151804(0x21e)](_0xdf3d4e),_0x3a2fa1=_0x470dbc['threadId'],_0x2eaf43=_0x470dbc['id'],_0xc13804={'memberId':(await this[_0x151804(0x1f2)][_0x151804(0x1eb)](_0x403ddd))[_0x151804(0x1f5)](),'unitId':_0x403ddd,'threadId':_0x3a2fa1,'mention':_0x5dd241,'content':_0x2dd41f,'replyId':_0x2eaf43},_0x490816=await this['_httpService']['post'](_0x151804(0x21f)+_0x403ddd+_0x151804(0x201),{'body':_0xc13804});return!_0x490816[_0x151804(0x212)][_0x151804(0x1fc)]||_0x490816[_0x151804(0x212)][_0x151804(0x1fc)][_0x151804(0x22a)]===0x1;}async[_0x30aa2c(0x1d5)](_0x23ea3b){const _0xf79bf3=_0x30aa2c,{unitId:_0x16fd6d}=_0x23ea3b,_0x4817ab=_0x23ea3b['threadId'],_0xe12318={'memberId':this[_0xf79bf3(0x236)][_0xf79bf3(0x231)]()['userID'],'unitId':_0x16fd6d,'threadId':_0x4817ab,'solved':_0x23ea3b[_0xf79bf3(0x21d)]?I[_0xf79bf3(0x1e9)]:I[_0xf79bf3(0x216)]},_0x36f6f8=await this[_0xf79bf3(0x22c)][_0xf79bf3(0x20d)](_0xf79bf3(0x21f)+_0x16fd6d+_0xf79bf3(0x215),{'body':_0xe12318});return!_0x36f6f8['body'][_0xf79bf3(0x1fc)]||_0x36f6f8[_0xf79bf3(0x212)][_0xf79bf3(0x1fc)][_0xf79bf3(0x22a)]===0x1;}async[_0x30aa2c(0x1f0)](_0x621db4,_0x1ed848,_0x31a6b9,_0x486d75){const _0x225c26=_0x30aa2c,_0xeca5e={'memberId':(await this[_0x225c26(0x1f2)][_0x225c26(0x1eb)](_0x621db4))[_0x225c26(0x1f5)](),'threadId':_0x31a6b9,'replyId':_0x486d75,'unitId':_0x621db4},_0x295acb=await this[_0x225c26(0x22c)][_0x225c26(0x20d)](_0x225c26(0x21f)+_0x621db4+_0x225c26(0x223),{'body':_0xeca5e});return!_0x295acb[_0x225c26(0x212)]['error']||_0x295acb[_0x225c26(0x212)][_0x225c26(0x1fc)][_0x225c26(0x22a)]===0x1;}async['listComments'](_0x47a15a,_0x43e008,_0x43b3e9){const _0x5c1d61=_0x30aa2c,_0x32706d={'unitId':_0x47a15a,'threadId':_0x43b3e9},_0x417385=await this['_httpService'][_0x5c1d61(0x20d)](_0x5c1d61(0x21f)+_0x47a15a+_0x5c1d61(0x1df),{'body':_0x32706d}),_0x2ec702=_0x43b3e9[_0x5c1d61(0x1db)](_0xb61162=>ee(_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x205)][_0xb61162],_0x47a15a,_0x43e008))['filter'](Boolean);return Object['values'](_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x1de)])[_0x5c1d61(0x1f9)](_0xf754c6=>{const _0x4d6f6a=_0x5c1d61;this[_0x4d6f6a(0x236)][_0x4d6f6a(0x1f1)](_0xf754c6);}),_0x2ec702;}[_0x30aa2c(0x1d1)](_0x14e26c){const _0x59677e=_0x30aa2c;return{'id':_0x14e26c['id'],'threadId':_0x14e26c[_0x59677e(0x1dd)],'ref':_0x14e26c[_0x59677e(0x229)]};}};f=Q([_(0x0,_0x1fd388(_0x1bc482)),_(0x1,_0x1fd388(_0x3af105)),_(0x2,_0x1fd388(_0xd8c8d1)),_(0x3,_0x1fd388(_0x5b06f7))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x269ac6,_0xbb9e2e,_0x345a1b,_0x389966)=>{for(var _0x2b9a4e=_0x389966>0x1?void 0x0:_0x389966?re(_0xbb9e2e,_0x345a1b):_0xbb9e2e,_0x2962c2=_0x269ac6['length']-0x1,_0x1dc49b;_0x2962c2>=0x0;_0x2962c2--)(_0x1dc49b=_0x269ac6[_0x2962c2])&&(_0x2b9a4e=_0x1dc49b(_0x2b9a4e)||_0x2b9a4e);return _0x2b9a4e;},N=(_0x4a54f0,_0x304681)=>(_0x116c6e,_0x10e270)=>_0x304681(_0x116c6e,_0x10e270,_0x4a54f0);let g=class extends _0x4634a6{constructor(_0x1f5bb9,_0x2fc8e8){const _0x469073=_0x30aa2c;super(),this[_0x469073(0x20e)]=_0x1f5bb9,this['_threadCommentDataSource']=_0x2fc8e8,this[_0x469073(0x22f)]();}[_0x30aa2c(0x22f)](){const _0x94e3c2=_0x30aa2c;this['_threadCommentDataSourceService'][_0x94e3c2(0x1ed)]=this['_threadCommentDataSource'],this[_0x94e3c2(0x20e)][_0x94e3c2(0x1ec)]=!0x1;}};g=te([N(0x0,_0x5b38d7),N(0x1,_0x1fd388(f))],g);var se=Object['defineProperty'],oe=Object[_0x30aa2c(0x1f3)],ne=(_0x8cf9da,_0x42aaac,_0x5c7ad6)=>_0x42aaac in _0x8cf9da?se(_0x8cf9da,_0x42aaac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c7ad6}):_0x8cf9da[_0x42aaac]=_0x5c7ad6,ie=(_0x49fd1d,_0x5e7145,_0x302bb4,_0xca21f2)=>{const _0x33482a=_0x30aa2c;for(var _0x1dc53e=_0xca21f2>0x1?void 0x0:_0xca21f2?oe(_0x5e7145,_0x302bb4):_0x5e7145,_0x24f16f=_0x49fd1d[_0x33482a(0x227)]-0x1,_0x26ab18;_0x24f16f>=0x0;_0x24f16f--)(_0x26ab18=_0x49fd1d[_0x24f16f])&&(_0x1dc53e=_0x26ab18(_0x1dc53e)||_0x1dc53e);return _0x1dc53e;},w=(_0x545fa4,_0x111657)=>(_0x5dbc8f,_0x634620)=>_0x111657(_0x5dbc8f,_0x634620,_0x545fa4),$=(_0x20c701,_0x43285c,_0x2dcfe7)=>ne(_0x20c701,typeof _0x43285c!='symbol'?_0x43285c+'':_0x43285c,_0x2dcfe7);let b=class extends _0x4d1e38{constructor(_0x160139=M,_0x180f6b,_0x44b581){const _0x4ce134=_0x30aa2c;super(),this['_config']=_0x160139,this['_injector']=_0x180f6b,this[_0x4ce134(0x1d4)]=_0x44b581;const {..._0xf7f72a}=_0x5c5bd8({},M,this[_0x4ce134(0x234)]);this[_0x4ce134(0x1d4)][_0x4ce134(0x1e4)](z,_0xf7f72a);}[_0x30aa2c(0x1d8)](){[[f],[g],[S]]['forEach'](_0x1c82fb=>{const _0x2acab6=_0x33fa;this[_0x2acab6(0x208)][_0x2acab6(0x22d)](_0x1c82fb);});}['onReady'](){const _0x39d8dc=_0x30aa2c;this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](g),this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](S);}};$(b,_0x30aa2c(0x1f4),W),$(b,_0x30aa2c(0x1fe),_0xf35a65['UNIVER_UNKNOWN']),b=ie([_0x47bcf7(_0x558701,_0x3ba722,_0x8b69f9),w(0x1,_0x1fd388(_0x5b06f7)),w(0x2,_0x1b3fdc)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2b5fac=_0x5bf1;function _0x269e(){const _0x93f086=['customRanges','getUnit','solved','13911007bplEgo','rangeId','_threadCommentModel','Delete','4NhYCEb','_userService','disposeWithMe','userID','addComment','398001cXrOUp','values','syncUpdateMutationToColla','12oFdjsp','add','user','saveCommentToSnapshot','code','defineProperty','post','10nLouNw','addUser','/reply','thread-comment-data-source.config','OpenOrReOpen','_configService','comment','get','users','map','_threadCommentDataSource','threadId','610461OlAiyV','_init','getMemberID','format','Solve','stringify','_httpService','updateComment','pluginName','Unknown','1231672pCVwbr','/edit','setConfig','requireSession','slice','5QOyYPv','getComment','subscribe','579792OoBaVQ','forEach','content','/list','_sessionService','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','type','delete','resolved','replies','_initDataSource','getCurrentUser','filter','parentId','deleteComment','Solved','userId','personId','replyId','_config','root','UNRECOGNIZED','/universer-api/user/list','onReady','getOwnPropertyDescriptor','/solved','resolveComment','reply','_threadCommentDataSourceService','216XsHLwf','_injector','Reply','Edit','UNIVER_UNKNOWN','createTimestamp','_commentService','Add','172228EYgxpi','1094526tosQWB','_initUserSync','/delete','comments','YYYY/MM/DD\x20HH:mm','find','commentUpdate$','/universer-api/comment/unit/','unitId','length','body'];_0x269e=function(){return _0x93f086;};return _0x269e();}(function(_0x57c658,_0x57cd5b){const _0x38ab5c=_0x5bf1,_0x2adb85=_0x57c658();while(!![]){try{const _0x516d7d=parseInt(_0x38ab5c(0x126))/0x1+parseInt(_0x38ab5c(0x11e))/0x2+-parseInt(_0x38ab5c(0xfe))/0x3*(parseInt(_0x38ab5c(0x160))/0x4)+-parseInt(_0x38ab5c(0x123))/0x5*(parseInt(_0x38ab5c(0x14e))/0x6)+-parseInt(_0x38ab5c(0x14d))/0x7*(-parseInt(_0x38ab5c(0x145))/0x8)+parseInt(_0x38ab5c(0x114))/0x9*(parseInt(_0x38ab5c(0x108))/0xa)+parseInt(_0x38ab5c(0x15c))/0xb*(-parseInt(_0x38ab5c(0x101))/0xc);if(_0x516d7d===_0x57cd5b)break;else _0x2adb85['push'](_0x2adb85['shift']());}catch(_0x4b976c){_0x2adb85['push'](_0x2adb85['shift']());}}}(_0x269e,0x54f88));import{CommentService as _0x1643d3,CollaborationSessionService as _0x4592f,UniverCollaborationClientPlugin as _0x12c884}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x13415b}from'@univerjs-pro/license';import{dayjs as _0x5dd75f,UserManagerService as _0x475b3b,Inject as _0xccccd8,Injector as _0x1b0878,Disposable as _0x527aee,CustomRangeType as _0x1ee0ce,UniverInstanceType as _0x538ad9,DependentOn as _0x1756f4,IConfigService as _0x47c9d3,Plugin as _0x107f9d,merge as _0x2dacfc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b6c56}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x6cf1a6,IThreadCommentDataSourceService as _0x41d95c}from'@univerjs/thread-comment';import{bufferTime as _0x12c025}from'rxjs';import{HTTPService as _0x23c06a}from'@univerjs/network';const W=_0x2b5fac(0x12c);var I=(_0x29b1bd=>(_0x29b1bd[_0x29b1bd['OpenOrReOpen']=0x0]=_0x2b5fac(0x10c),_0x29b1bd[_0x29b1bd[_0x2b5fac(0x137)]=0x1]=_0x2b5fac(0x137),_0x29b1bd[_0x29b1bd[_0x2b5fac(0x13d)]=-0x1]=_0x2b5fac(0x13d),_0x29b1bd))(I||{}),v=(_0x4928fe=>(_0x4928fe[_0x4928fe[_0x2b5fac(0x11d)]=0x0]='Unknown',_0x4928fe[_0x4928fe[_0x2b5fac(0x14c)]=0x1]=_0x2b5fac(0x14c),_0x4928fe[_0x4928fe[_0x2b5fac(0x147)]=0x2]=_0x2b5fac(0x147),_0x4928fe[_0x4928fe[_0x2b5fac(0x148)]=0x3]=_0x2b5fac(0x148),_0x4928fe[_0x4928fe[_0x2b5fac(0x15f)]=0x4]=_0x2b5fac(0x15f),_0x4928fe[_0x4928fe[_0x2b5fac(0x118)]=0x5]=_0x2b5fac(0x118),_0x4928fe[_0x4928fe['UNRECOGNIZED']=-0x1]=_0x2b5fac(0x13d),_0x4928fe))(v||{});const D=_0x5425ad=>_0x5dd75f(new Date(+_0x5425ad))[_0x2b5fac(0x117)](_0x2b5fac(0x152)),B=async(_0x5bd1bc,_0x22f234)=>{const _0x5f0595=_0x2b5fac,_0xfa8faa=_0x5bd1bc['get'](_0x475b3b),_0xc6e68d=_0x5bd1bc[_0x5f0595(0x10f)](_0x23c06a);_0x22f234['forEach'](_0x2e1d15=>{const _0x5ad52f=_0x5f0595;_0xfa8faa['getUser'](_0x2e1d15)&&_0x22f234[_0x5ad52f(0x12f)](_0x2e1d15);}),_0x22f234['size']&&(await _0xc6e68d[_0x5f0595(0x10f)](_0x5f0595(0x13e),{'params':{'userIDs':[..._0x22f234]}}))[_0x5f0595(0x158)][_0x5f0595(0x110)][_0x5f0595(0x127)](_0x36b20d=>{const _0x4dc00e=_0x5f0595;_0x36b20d&&_0xfa8faa[_0x4dc00e(0x109)](_0x36b20d);});};var K=Object[_0x2b5fac(0x140)],V=(_0x5e98ca,_0x5b0da5,_0x3d8529,_0x136388)=>{for(var _0x97c3e3=_0x136388>0x1?void 0x0:_0x136388?K(_0x5b0da5,_0x3d8529):_0x5b0da5,_0x14e9d0=_0x5e98ca['length']-0x1,_0x122917;_0x14e9d0>=0x0;_0x14e9d0--)(_0x122917=_0x5e98ca[_0x14e9d0])&&(_0x97c3e3=_0x122917(_0x97c3e3)||_0x97c3e3);return _0x97c3e3;},p=(_0x64a685,_0x10b575)=>(_0x2e257b,_0x54abce)=>_0x10b575(_0x2e257b,_0x54abce,_0x64a685);let S=class extends _0x527aee{constructor(_0x4a844c,_0x1fee33,_0x1f9472,_0x4bfd8e){const _0x37dcf8=_0x2b5fac;super(),this[_0x37dcf8(0x14b)]=_0x4a844c,this[_0x37dcf8(0x15e)]=_0x1fee33,this[_0x37dcf8(0x161)]=_0x1f9472,this[_0x37dcf8(0x146)]=_0x4bfd8e,this['_init'](),this[_0x37dcf8(0x14f)]();}['_initUserSync'](){const _0x127aef=_0x2b5fac;this[_0x127aef(0x162)](this['_threadCommentModel'][_0x127aef(0x154)]['pipe'](_0x12c025(0x10))[_0x127aef(0x125)](_0x275136=>{const _0x3b2511=_0x127aef,_0x580630=new Set();_0x275136[_0x3b2511(0x127)](_0x37ca96=>{const _0x44b486=_0x3b2511;switch(_0x37ca96[_0x44b486(0x12e)]){case _0x44b486(0x102):{const _0x4e1234=_0x37ca96['payload'][_0x44b486(0x139)];_0x580630[_0x44b486(0x102)](_0x4e1234);break;}}}),B(this[_0x3b2511(0x146)],_0x580630);}));}[_0x2b5fac(0x115)](){const _0xebf3f6=_0x2b5fac;this['disposeWithMe'](this['_commentService'][_0xebf3f6(0x154)][_0xebf3f6(0x125)](async _0x291447=>{const _0x2adbe2=_0xebf3f6;var _0x39c001,_0x41c1f4,_0x2fcac5,_0xe5d448;const _0x4e66ac=(_0x39c001=this['_threadCommentModel'][_0x2adbe2(0x15a)](_0x291447[_0x2adbe2(0x156)])['find'](_0xd6c8c7=>_0xd6c8c7[_0x2adbe2(0x113)]===_0x291447['threadId']))==null?void 0x0:_0x39c001['root'];if(!_0x4e66ac)return;const {unitId:_0x574c50,subUnitId:_0x359dae}=_0x4e66ac;switch(_0x291447['user']&&this[_0x2adbe2(0x161)]['addUser'](_0x291447[_0x2adbe2(0x103)]),_0x291447['type']){case v['Add']:break;case v[_0x2adbe2(0x147)]:{this[_0x2adbe2(0x15e)][_0x2adbe2(0xfd)](_0x574c50,_0x359dae,{'unitId':_0x574c50,'subUnitId':_0x359dae,'ref':'','id':_0x291447[_0x2adbe2(0x13a)],'dT':D(+_0x291447[_0x2adbe2(0x14a)]),'threadId':_0x291447[_0x2adbe2(0x113)],'personId':(_0x2fcac5=(_0x41c1f4=_0x291447[_0x2adbe2(0x103)])==null?void 0x0:_0x41c1f4[_0x2adbe2(0xfc)])!=null?_0x2fcac5:_0x291447[_0x2adbe2(0x138)],'text':JSON[_0x2adbe2(0x12d)](_0x291447[_0x2adbe2(0x128)]),'parentId':_0x4e66ac['id']});break;}case v[_0x2adbe2(0x15f)]:{const _0xdb398c=this[_0x2adbe2(0x15e)][_0x2adbe2(0x124)](_0x574c50,_0x359dae,_0x291447[_0x2adbe2(0x13a)]);_0xdb398c&&_0xdb398c[_0x2adbe2(0x135)]&&this[_0x2adbe2(0x15e)]['deleteComment'](_0x574c50,_0x359dae,_0x291447[_0x2adbe2(0x13a)]);break;}case v[_0x2adbe2(0x148)]:{this['_threadCommentModel'][_0x2adbe2(0x11b)](_0x574c50,_0x359dae,{'commentId':_0x291447['replyId'],'text':JSON[_0x2adbe2(0x12d)](_0x291447[_0x2adbe2(0x128)])});break;}case v[_0x2adbe2(0x118)]:{const _0x3951f8=(_0xe5d448=this[_0x2adbe2(0x15e)][_0x2adbe2(0x15a)](_0x291447[_0x2adbe2(0x156)])[_0x2adbe2(0x153)](_0x270489=>_0x270489['threadId']===_0x291447[_0x2adbe2(0x113)]))==null?void 0x0:_0xe5d448[_0x2adbe2(0x13c)];_0x3951f8&&this[_0x2adbe2(0x15e)][_0x2adbe2(0x142)](_0x574c50,_0x359dae,_0x3951f8['id'],_0x291447['solved']===I[_0x2adbe2(0x137)]);break;}}}));}};S=V([p(0x0,_0xccccd8(_0x1643d3)),p(0x1,_0xccccd8(_0x6cf1a6)),p(0x2,_0xccccd8(_0x475b3b)),p(0x3,_0xccccd8(_0x1b0878))],S);function _0x5bf1(_0x44de78,_0x37bb8e){const _0x269eaf=_0x269e();return _0x5bf1=function(_0x5bf1a0,_0x2cebc3){_0x5bf1a0=_0x5bf1a0-0xfc;let _0x204b92=_0x269eaf[_0x5bf1a0];return _0x204b92;},_0x5bf1(_0x44de78,_0x37bb8e);}const z=_0x2b5fac(0x10b),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x132c17,_0xca42e9,_0x16ce39,_0x3ba40d)=>{const _0x3f1611=_0x2b5fac;for(var _0x3ddbf8=_0x3ba40d>0x1?void 0x0:_0x3ba40d?k(_0xca42e9,_0x16ce39):_0xca42e9,_0x218c93=_0x132c17[_0x3f1611(0x157)]-0x1,_0x43283a;_0x218c93>=0x0;_0x218c93--)(_0x43283a=_0x132c17[_0x218c93])&&(_0x3ddbf8=_0x43283a(_0x3ddbf8)||_0x3ddbf8);return _0x3ddbf8;},_=(_0x48f0aa,_0xb790b5)=>(_0x304586,_0x1c20ca)=>_0xb790b5(_0x304586,_0x1c20ca,_0x48f0aa);function X(_0x48eef3,_0x35a490){const _0x3c2e26=_0x2b5fac,_0x27483b=_0x48eef3[_0x3c2e26(0x131)][0x0];return{..._0x35a490,'id':_0x27483b[_0x3c2e26(0x13a)],'resolved':_0x48eef3[_0x3c2e26(0x15b)]===0x1,'dT':D(_0x27483b[_0x3c2e26(0x14a)]),'personId':_0x27483b[_0x3c2e26(0x138)],'threadId':_0x27483b[_0x3c2e26(0x113)]};}function ee(_0x27c21a,_0x4ccf6c,_0x62e727){const _0x3f3efc=_0x2b5fac;var _0x166a76,_0x2d688c;if(((_0x2d688c=(_0x166a76=_0x27c21a==null?void 0x0:_0x27c21a[_0x3f3efc(0x131)])==null?void 0x0:_0x166a76[_0x3f3efc(0x157)])!=null?_0x2d688c:0x0)>0x0){const _0x30bd7f=(_0x42fbd8,_0x20717c)=>({'id':_0x42fbd8[_0x3f3efc(0x13a)],'threadId':_0x42fbd8[_0x3f3efc(0x113)],'dT':D(_0x42fbd8[_0x3f3efc(0x14a)]),'personId':_0x42fbd8[_0x3f3efc(0x138)],'resolved':_0x27c21a[_0x3f3efc(0x15b)]===I[_0x3f3efc(0x137)],'unitId':_0x4ccf6c,'subUnitId':_0x62e727,'text':JSON[_0x3f3efc(0x12d)](_0x42fbd8[_0x3f3efc(0x128)]),'parentId':_0x20717c}),_0x5de295=_0x30bd7f(_0x27c21a[_0x3f3efc(0x131)][0x0]);return{..._0x5de295,'children':_0x27c21a['replies'][_0x3f3efc(0x122)](0x1)[_0x3f3efc(0x111)](_0xe248bc=>_0x30bd7f(_0xe248bc,_0x5de295['id']))};}return null;}let f=class{constructor(_0x2abf80,_0x1da02e,_0x4c3d9b,_0x2e7f25){const _0x615afb=_0x2b5fac;this[_0x615afb(0x11a)]=_0x2abf80,this[_0x615afb(0x161)]=_0x1da02e,this['_sessionService']=_0x4c3d9b,this[_0x615afb(0x146)]=_0x2e7f25;}async['addComment'](_0x13165b){const _0x463547=_0x2b5fac;var _0x2de4b6,_0x589973;const {parentId:_0x35f11e,unitId:_0x54557a,text:_0x30c8fd,threadId:_0x20b42c}=_0x13165b,_0x19e199=(_0x589973=(_0x2de4b6=_0x30c8fd[_0x463547(0x159)])==null?void 0x0:_0x2de4b6['filter'](_0x560bff=>_0x560bff['rangeType']===_0x1ee0ce['COMMENT'])[_0x463547(0x111)](_0x48c29=>_0x48c29[_0x463547(0x15d)]))!=null?_0x589973:[],_0x19a126=JSON['stringify'](_0x30c8fd),_0x23eefb=(await this['_sessionService'][_0x463547(0x121)](_0x54557a))['getMemberID']();if(_0x35f11e){const _0x428aa0={'memberId':_0x23eefb,'unitId':_0x54557a,'content':_0x19a126,'mention':_0x19e199,'threadId':_0x20b42c},_0x1da836=(await this[_0x463547(0x11a)][_0x463547(0x107)](_0x463547(0x155)+_0x54557a+_0x463547(0x10a),{'body':_0x428aa0}))[_0x463547(0x158)][_0x463547(0x143)];return{..._0x13165b,'id':_0x1da836[_0x463547(0x13a)],'dT':_0x5dd75f(+_0x1da836[_0x463547(0x14a)])[_0x463547(0x117)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1da836[_0x463547(0x138)]};}else{const _0x5af8e8={'memberId':_0x23eefb,'unitId':_0x54557a,'content':_0x19a126,'mention':_0x19e199},_0x584287=await this[_0x463547(0x11a)][_0x463547(0x107)](_0x463547(0x155)+_0x54557a+'/add',{'body':_0x5af8e8});return X(_0x584287[_0x463547(0x158)][_0x463547(0x10e)],_0x13165b);}}async[_0x2b5fac(0x11b)](_0x5a97b7){const _0x55c84e=_0x2b5fac;var _0x982412,_0x36eac2;const {text:_0x90545b,unitId:_0x568535}=_0x5a97b7,_0x18b10a=(_0x36eac2=(_0x982412=_0x90545b[_0x55c84e(0x159)])==null?void 0x0:_0x982412[_0x55c84e(0x134)](_0xc80bc8=>_0xc80bc8['rangeType']===_0x1ee0ce['COMMENT'])[_0x55c84e(0x111)](_0x50aa73=>_0x50aa73['rangeId']))!=null?_0x36eac2:[],_0x50166b=JSON[_0x55c84e(0x119)](_0x90545b),_0x2323d4=_0x5a97b7[_0x55c84e(0x113)],_0x2b2bdd=_0x5a97b7['id'],_0x41178e={'memberId':(await this[_0x55c84e(0x12a)][_0x55c84e(0x121)](_0x568535))['getMemberID'](),'unitId':_0x568535,'threadId':_0x2323d4,'mention':_0x18b10a,'content':_0x50166b,'replyId':_0x2b2bdd},_0xad1fea=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x568535+_0x55c84e(0x11f),{'body':_0x41178e});return!_0xad1fea[_0x55c84e(0x158)]['error']||_0xad1fea[_0x55c84e(0x158)][_0x55c84e(0x12b)]['code']===0x1;}async[_0x2b5fac(0x142)](_0x50be37){const _0x46edd9=_0x2b5fac,{unitId:_0x104c0d}=_0x50be37,_0x31eb37=_0x50be37[_0x46edd9(0x113)],_0x171288={'memberId':this[_0x46edd9(0x161)][_0x46edd9(0x133)]()[_0x46edd9(0xfc)],'unitId':_0x104c0d,'threadId':_0x31eb37,'solved':_0x50be37[_0x46edd9(0x130)]?I['Solved']:I[_0x46edd9(0x10c)]},_0x11c0b3=await this[_0x46edd9(0x11a)][_0x46edd9(0x107)](_0x46edd9(0x155)+_0x104c0d+_0x46edd9(0x141),{'body':_0x171288});return!_0x11c0b3[_0x46edd9(0x158)][_0x46edd9(0x12b)]||_0x11c0b3[_0x46edd9(0x158)][_0x46edd9(0x12b)][_0x46edd9(0x105)]===0x1;}async[_0x2b5fac(0x136)](_0x121ee7,_0x40bd14,_0x5c73b7,_0x24970a){const _0x3f888b=_0x2b5fac,_0x4df111={'memberId':(await this[_0x3f888b(0x12a)][_0x3f888b(0x121)](_0x121ee7))[_0x3f888b(0x116)](),'threadId':_0x5c73b7,'replyId':_0x24970a,'unitId':_0x121ee7},_0x145911=await this['_httpService'][_0x3f888b(0x107)](_0x3f888b(0x155)+_0x121ee7+_0x3f888b(0x150),{'body':_0x4df111});return!_0x145911[_0x3f888b(0x158)][_0x3f888b(0x12b)]||_0x145911[_0x3f888b(0x158)][_0x3f888b(0x12b)][_0x3f888b(0x105)]===0x1;}async['listComments'](_0xd1cb93,_0x52dbe0,_0x23becd){const _0x33f765=_0x2b5fac,_0x50ce29={'unitId':_0xd1cb93,'threadId':_0x23becd},_0x29872d=await this[_0x33f765(0x11a)][_0x33f765(0x107)](_0x33f765(0x155)+_0xd1cb93+_0x33f765(0x129),{'body':_0x50ce29}),_0x327995=_0x23becd['map'](_0x3714ec=>ee(_0x29872d['body'][_0x33f765(0x151)][_0x3714ec],_0xd1cb93,_0x52dbe0))[_0x33f765(0x134)](Boolean);return Object[_0x33f765(0xff)](_0x29872d['body'][_0x33f765(0x110)])[_0x33f765(0x127)](_0x32ec6d=>{const _0x20ae81=_0x33f765;this[_0x20ae81(0x161)]['addUser'](_0x32ec6d);}),_0x327995;}[_0x2b5fac(0x104)](_0x5dd41d){const _0x243945=_0x2b5fac;return{'id':_0x5dd41d['id'],'threadId':_0x5dd41d[_0x243945(0x113)],'ref':_0x5dd41d['ref']};}};f=Q([_(0x0,_0xccccd8(_0x23c06a)),_(0x1,_0xccccd8(_0x475b3b)),_(0x2,_0xccccd8(_0x4592f)),_(0x3,_0xccccd8(_0x1b0878))],f);var re=Object[_0x2b5fac(0x140)],te=(_0x10e7d1,_0x142d30,_0x5ba3f9,_0x363f58)=>{const _0x2c4dae=_0x2b5fac;for(var _0x3c1fd7=_0x363f58>0x1?void 0x0:_0x363f58?re(_0x142d30,_0x5ba3f9):_0x142d30,_0x286c7d=_0x10e7d1[_0x2c4dae(0x157)]-0x1,_0xa01b62;_0x286c7d>=0x0;_0x286c7d--)(_0xa01b62=_0x10e7d1[_0x286c7d])&&(_0x3c1fd7=_0xa01b62(_0x3c1fd7)||_0x3c1fd7);return _0x3c1fd7;},N=(_0x23ee45,_0x52a34e)=>(_0x57f084,_0x4136af)=>_0x52a34e(_0x57f084,_0x4136af,_0x23ee45);let g=class extends _0x527aee{constructor(_0x502bf9,_0x2c82ba){const _0x496a1a=_0x2b5fac;super(),this['_threadCommentDataSourceService']=_0x502bf9,this[_0x496a1a(0x112)]=_0x2c82ba,this[_0x496a1a(0x132)]();}[_0x2b5fac(0x132)](){const _0x42314e=_0x2b5fac;this[_0x42314e(0x144)]['dataSource']=this[_0x42314e(0x112)],this[_0x42314e(0x144)][_0x42314e(0x100)]=!0x1;}};g=te([N(0x0,_0x41d95c),N(0x1,_0xccccd8(f))],g);var se=Object[_0x2b5fac(0x106)],oe=Object[_0x2b5fac(0x140)],ne=(_0xbcb39a,_0x35f1cd,_0xee785d)=>_0x35f1cd in _0xbcb39a?se(_0xbcb39a,_0x35f1cd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xee785d}):_0xbcb39a[_0x35f1cd]=_0xee785d,ie=(_0x450e88,_0x48f20b,_0x14f01f,_0x4b5a12)=>{const _0x3ee6db=_0x2b5fac;for(var _0x2fcadd=_0x4b5a12>0x1?void 0x0:_0x4b5a12?oe(_0x48f20b,_0x14f01f):_0x48f20b,_0x4bb6f4=_0x450e88[_0x3ee6db(0x157)]-0x1,_0x4cefe8;_0x4bb6f4>=0x0;_0x4bb6f4--)(_0x4cefe8=_0x450e88[_0x4bb6f4])&&(_0x2fcadd=_0x4cefe8(_0x2fcadd)||_0x2fcadd);return _0x2fcadd;},w=(_0x37468c,_0x1f5429)=>(_0x541a3d,_0x55fc0d)=>_0x1f5429(_0x541a3d,_0x55fc0d,_0x37468c),$=(_0x4ad1f1,_0x3d93f5,_0x8da227)=>ne(_0x4ad1f1,typeof _0x3d93f5!='symbol'?_0x3d93f5+'':_0x3d93f5,_0x8da227);let b=class extends _0x107f9d{constructor(_0x10935b=M,_0x41f671,_0x401885){const _0x5ee2bd=_0x2b5fac;super(),this[_0x5ee2bd(0x13b)]=_0x10935b,this[_0x5ee2bd(0x146)]=_0x41f671,this[_0x5ee2bd(0x10d)]=_0x401885;const {..._0x513e42}=_0x2dacfc({},M,this[_0x5ee2bd(0x13b)]);this['_configService'][_0x5ee2bd(0x120)](z,_0x513e42);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x31668b=>{const _0x10ea49=_0x5bf1;this[_0x10ea49(0x146)][_0x10ea49(0x102)](_0x31668b);});}[_0x2b5fac(0x13f)](){const _0x507d8c=_0x2b5fac;this[_0x507d8c(0x146)][_0x507d8c(0x10f)](g),this[_0x507d8c(0x146)][_0x507d8c(0x10f)](S);}};$(b,_0x2b5fac(0x11c),W),$(b,'type',_0x538ad9[_0x2b5fac(0x149)]),b=ie([_0x1756f4(_0x1b6c56,_0x12c884,_0x13415b),w(0x1,_0xccccd8(_0x1b0878)),w(0x2,_0x47c9d3)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x10d92e,_0x5f3bc7){const _0x1ace98=_0x3fef,_0x44df9=_0x10d92e();while(!![]){try{const _0x1e0951=-parseInt(_0x1ace98(0x196))/0x1*(-parseInt(_0x1ace98(0x1f1))/0x2)+parseInt(_0x1ace98(0x217))/0x3*(-parseInt(_0x1ace98(0x1c1))/0x4)+-parseInt(_0x1ace98(0x206))/0x5*(parseInt(_0x1ace98(0x20c))/0x6)+parseInt(_0x1ace98(0x1de))/0x7*(parseInt(_0x1ace98(0x1a4))/0x8)+parseInt(_0x1ace98(0x200))/0x9+-parseInt(_0x1ace98(0x204))/0xa*(-parseInt(_0x1ace98(0x1fb))/0xb)+parseInt(_0x1ace98(0x1d6))/0xc*(-parseInt(_0x1ace98(0x1ef))/0xd);if(_0x1e0951===_0x5f3bc7)break;else _0x44df9['push'](_0x44df9['shift']());}catch(_0x569fd1){_0x44df9['push'](_0x44df9['shift']());}}}(_0x1270,0x30496),function(_0x19d879,_0x31c09a){const _0xec39=_0x3fef;typeof exports==_0xec39(0x1c9)&&typeof module<'u'?_0x31c09a(exports,require(_0xec39(0x1b1)),require('@univerjs-pro/license'),require(_0xec39(0x1c8)),require('@univerjs/thread-comment-ui'),require(_0xec39(0x1f8)),require(_0xec39(0x1c5)),require('@univerjs/network')):typeof define=='function'&&define[_0xec39(0x1bb)]?define([_0xec39(0x1d9),_0xec39(0x1b1),_0xec39(0x1f6),'@univerjs/core',_0xec39(0x1e9),_0xec39(0x1f8),_0xec39(0x1c5),_0xec39(0x202)],_0x31c09a):(_0x19d879=typeof globalThis<'u'?globalThis:_0x19d879||self,_0x31c09a(_0x19d879[_0xec39(0x1f9)]={},_0x19d879['UniverProCollaborationClient'],_0x19d879[_0xec39(0x1a0)],_0x19d879[_0xec39(0x1df)],_0x19d879['UniverThreadCommentUi'],_0x19d879[_0xec39(0x1d2)],_0x19d879[_0xec39(0x1c5)],_0x19d879['UniverNetwork']));}(this,function(_0x421825,_0x1cb471,_0x179a7a,_0x514323,_0xe499e8,_0x18ced5,_0x1985e1,_0x2aae81){'use strict';const _0x28189d=_0x3fef;const _0x2d2057=_0x28189d(0x1af);var _0x479a51=(_0x1d3324=>(_0x1d3324[_0x1d3324['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1d3324[_0x1d3324['Solved']=0x1]=_0x28189d(0x208),_0x1d3324[_0x1d3324[_0x28189d(0x19d)]=-0x1]=_0x28189d(0x19d),_0x1d3324))(_0x479a51||{}),_0x4a837d=(_0x18fe0d=>(_0x18fe0d[_0x18fe0d[_0x28189d(0x213)]=0x0]=_0x28189d(0x213),_0x18fe0d[_0x18fe0d[_0x28189d(0x1e7)]=0x1]=_0x28189d(0x1e7),_0x18fe0d[_0x18fe0d[_0x28189d(0x1cf)]=0x2]=_0x28189d(0x1cf),_0x18fe0d[_0x18fe0d[_0x28189d(0x1b0)]=0x3]=_0x28189d(0x1b0),_0x18fe0d[_0x18fe0d['Delete']=0x4]='Delete',_0x18fe0d[_0x18fe0d[_0x28189d(0x1ee)]=0x5]=_0x28189d(0x1ee),_0x18fe0d[_0x18fe0d[_0x28189d(0x19d)]=-0x1]=_0x28189d(0x19d),_0x18fe0d))(_0x4a837d||{});const _0x5d85fb=_0x3db80b=>_0x514323[_0x28189d(0x1e0)](new Date(+_0x3db80b))[_0x28189d(0x1b2)](_0x28189d(0x1ce)),_0x28b767=async(_0x250fcd,_0x3ea770)=>{const _0x519e5e=_0x28189d,_0x4b1c97=_0x250fcd[_0x519e5e(0x209)](_0x514323[_0x519e5e(0x1ea)]),_0x38cbb3=_0x250fcd[_0x519e5e(0x209)](_0x2aae81['HTTPService']);_0x3ea770[_0x519e5e(0x1a8)](_0x45cec3=>{const _0x1a04f0=_0x519e5e;_0x4b1c97[_0x1a04f0(0x1c6)](_0x45cec3)&&_0x3ea770['delete'](_0x45cec3);}),_0x3ea770['size']&&(await _0x38cbb3[_0x519e5e(0x209)](_0x519e5e(0x1d5),{'params':{'userIDs':[..._0x3ea770]}}))[_0x519e5e(0x207)][_0x519e5e(0x1d8)][_0x519e5e(0x1a8)](_0x412172=>{const _0xac1cf2=_0x519e5e;_0x412172&&_0x4b1c97[_0xac1cf2(0x1e3)](_0x412172);});};var _0x1132cd=Object[_0x28189d(0x1b5)],_0x5d5744=(_0x5574f5,_0x202810,_0x543f40,_0x1b0a92)=>{const _0x478757=_0x28189d;for(var _0x175378=_0x1b0a92>0x1?void 0x0:_0x1b0a92?_0x1132cd(_0x202810,_0x543f40):_0x202810,_0x102f61=_0x5574f5[_0x478757(0x1dd)]-0x1,_0xd10611;_0x102f61>=0x0;_0x102f61--)(_0xd10611=_0x5574f5[_0x102f61])&&(_0x175378=_0xd10611(_0x175378)||_0x175378);return _0x175378;},_0x36952b=(_0x33d0b9,_0x52caea)=>(_0x23146,_0x227f97)=>_0x52caea(_0x23146,_0x227f97,_0x33d0b9);let _0x484a95=class extends _0x514323['Disposable']{constructor(_0x418572,_0x5be272,_0x3c2e66,_0x5cc2a0){const _0x235c85=_0x28189d;super(),this[_0x235c85(0x1aa)]=_0x418572,this[_0x235c85(0x19b)]=_0x5be272,this[_0x235c85(0x21b)]=_0x3c2e66,this[_0x235c85(0x194)]=_0x5cc2a0,this['_init'](),this[_0x235c85(0x205)]();}[_0x28189d(0x205)](){const _0x5387ec=_0x28189d;this[_0x5387ec(0x199)](this[_0x5387ec(0x19b)]['commentUpdate$'][_0x5387ec(0x21c)](_0x1985e1[_0x5387ec(0x1e1)](0x10))[_0x5387ec(0x1a2)](_0x538f5f=>{const _0x14553d=_0x5387ec,_0x1d56b7=new Set();_0x538f5f[_0x14553d(0x1a8)](_0x3de6f5=>{const _0x338938=_0x14553d;switch(_0x3de6f5[_0x338938(0x1dc)]){case'add':{const _0x15880e=_0x3de6f5['payload'][_0x338938(0x1d4)];_0x1d56b7[_0x338938(0x1a5)](_0x15880e);break;}}}),_0x28b767(this[_0x14553d(0x194)],_0x1d56b7);}));}['_init'](){const _0x27bbef=_0x28189d;this[_0x27bbef(0x199)](this['_commentService']['commentUpdate$'][_0x27bbef(0x1a2)](async _0x134a66=>{const _0x5c10aa=_0x27bbef;var _0x4c5cf3,_0x347e42,_0x438a32,_0x3ee4a1;const _0x29e3ec=(_0x4c5cf3=this[_0x5c10aa(0x19b)][_0x5c10aa(0x19a)](_0x134a66[_0x5c10aa(0x1ec)])['find'](_0x5e9adb=>_0x5e9adb[_0x5c10aa(0x1c2)]===_0x134a66[_0x5c10aa(0x1c2)]))==null?void 0x0:_0x4c5cf3[_0x5c10aa(0x1ae)];if(!_0x29e3ec)return;const {unitId:_0x396dc7,subUnitId:_0x2a2530}=_0x29e3ec;switch(_0x134a66[_0x5c10aa(0x20b)]&&this[_0x5c10aa(0x21b)]['addUser'](_0x134a66[_0x5c10aa(0x20b)]),_0x134a66['type']){case _0x4a837d[_0x5c10aa(0x1e7)]:break;case _0x4a837d['Reply']:{this[_0x5c10aa(0x19b)][_0x5c10aa(0x1d0)](_0x396dc7,_0x2a2530,{'unitId':_0x396dc7,'subUnitId':_0x2a2530,'ref':'','id':_0x134a66[_0x5c10aa(0x1a1)],'dT':_0x5d85fb(+_0x134a66['createTimestamp']),'threadId':_0x134a66['threadId'],'personId':(_0x438a32=(_0x347e42=_0x134a66[_0x5c10aa(0x20b)])==null?void 0x0:_0x347e42['userID'])!=null?_0x438a32:_0x134a66['userId'],'text':JSON['parse'](_0x134a66[_0x5c10aa(0x1ca)]),'parentId':_0x29e3ec['id']});break;}case _0x4a837d[_0x5c10aa(0x1be)]:{const _0x5ce3f3=this[_0x5c10aa(0x19b)][_0x5c10aa(0x1db)](_0x396dc7,_0x2a2530,_0x134a66[_0x5c10aa(0x1a1)]);_0x5ce3f3&&_0x5ce3f3[_0x5c10aa(0x1bc)]&&this[_0x5c10aa(0x19b)][_0x5c10aa(0x1b7)](_0x396dc7,_0x2a2530,_0x134a66[_0x5c10aa(0x1a1)]);break;}case _0x4a837d[_0x5c10aa(0x1b0)]:{this['_threadCommentModel'][_0x5c10aa(0x1fc)](_0x396dc7,_0x2a2530,{'commentId':_0x134a66['replyId'],'text':JSON[_0x5c10aa(0x20f)](_0x134a66['content'])});break;}case _0x4a837d[_0x5c10aa(0x1ee)]:{const _0x1236a7=(_0x3ee4a1=this[_0x5c10aa(0x19b)]['getUnit'](_0x134a66[_0x5c10aa(0x1ec)])[_0x5c10aa(0x20d)](_0x4767a3=>_0x4767a3[_0x5c10aa(0x1c2)]===_0x134a66[_0x5c10aa(0x1c2)]))==null?void 0x0:_0x3ee4a1[_0x5c10aa(0x1ae)];_0x1236a7&&this['_threadCommentModel'][_0x5c10aa(0x212)](_0x396dc7,_0x2a2530,_0x1236a7['id'],_0x134a66[_0x5c10aa(0x210)]===_0x479a51[_0x5c10aa(0x208)]);break;}}}));}};_0x484a95=_0x5d5744([_0x36952b(0x0,_0x514323[_0x28189d(0x1c4)](_0x1cb471[_0x28189d(0x1e4)])),_0x36952b(0x1,_0x514323[_0x28189d(0x1c4)](_0x18ced5[_0x28189d(0x1f0)])),_0x36952b(0x2,_0x514323[_0x28189d(0x1c4)](_0x514323['UserManagerService'])),_0x36952b(0x3,_0x514323['Inject'](_0x514323[_0x28189d(0x20a)]))],_0x484a95);const _0x434b5c='thread-comment-data-source.config',_0x5ea3e8={};var _0x595551=Object['getOwnPropertyDescriptor'],_0x36943e=(_0x26b29d,_0x5cac30,_0x2a9a84,_0x6a3eca)=>{const _0x2a2476=_0x28189d;for(var _0x3ebea6=_0x6a3eca>0x1?void 0x0:_0x6a3eca?_0x595551(_0x5cac30,_0x2a9a84):_0x5cac30,_0x2dccc2=_0x26b29d[_0x2a2476(0x1dd)]-0x1,_0x294603;_0x2dccc2>=0x0;_0x2dccc2--)(_0x294603=_0x26b29d[_0x2dccc2])&&(_0x3ebea6=_0x294603(_0x3ebea6)||_0x3ebea6);return _0x3ebea6;},_0x1ae31c=(_0x27bb1e,_0x36e48e)=>(_0x1c9bb9,_0x277383)=>_0x36e48e(_0x1c9bb9,_0x277383,_0x27bb1e);function _0xfb3db4(_0x2c17fd,_0x5db41a){const _0x58d3b5=_0x28189d,_0x190958=_0x2c17fd['replies'][0x0];return{..._0x5db41a,'id':_0x190958[_0x58d3b5(0x1a1)],'resolved':_0x2c17fd[_0x58d3b5(0x210)]===0x1,'dT':_0x5d85fb(_0x190958[_0x58d3b5(0x1ad)]),'personId':_0x190958[_0x58d3b5(0x1c0)],'threadId':_0x190958[_0x58d3b5(0x1c2)]};}function _0xd9e2c4(_0x22eb61,_0x3a29b9,_0x16e489){const _0x4b3217=_0x28189d;var _0x23b5c4,_0x3b8806;if(((_0x3b8806=(_0x23b5c4=_0x22eb61==null?void 0x0:_0x22eb61['replies'])==null?void 0x0:_0x23b5c4['length'])!=null?_0x3b8806:0x0)>0x0){const _0x7142e6=(_0x2fc685,_0x5913dc)=>({'id':_0x2fc685[_0x4b3217(0x1a1)],'threadId':_0x2fc685['threadId'],'dT':_0x5d85fb(_0x2fc685['createTimestamp']),'personId':_0x2fc685[_0x4b3217(0x1c0)],'resolved':_0x22eb61[_0x4b3217(0x210)]===_0x479a51[_0x4b3217(0x208)],'unitId':_0x3a29b9,'subUnitId':_0x16e489,'text':JSON[_0x4b3217(0x20f)](_0x2fc685[_0x4b3217(0x1ca)]),'parentId':_0x5913dc}),_0x1a7cf4=_0x7142e6(_0x22eb61[_0x4b3217(0x203)][0x0]);return{..._0x1a7cf4,'children':_0x22eb61[_0x4b3217(0x203)]['slice'](0x1)['map'](_0x1417ff=>_0x7142e6(_0x1417ff,_0x1a7cf4['id']))};}return null;}let _0x368b4e=class{constructor(_0x2995c6,_0x19f702,_0x3a8b05,_0xcbf3d7){const _0x352b5b=_0x28189d;this['_httpService']=_0x2995c6,this[_0x352b5b(0x21b)]=_0x19f702,this[_0x352b5b(0x219)]=_0x3a8b05,this[_0x352b5b(0x194)]=_0xcbf3d7;}async[_0x28189d(0x1d0)](_0xbc0805){const _0x11b9d4=_0x28189d;var _0x308db7,_0x2f2afe;const {parentId:_0x3f4443,unitId:_0x1f73b5,text:_0x255b0d,threadId:_0x52919e}=_0xbc0805,_0x4b1087=(_0x2f2afe=(_0x308db7=_0x255b0d[_0x11b9d4(0x1d1)])==null?void 0x0:_0x308db7[_0x11b9d4(0x1c3)](_0x5c8708=>_0x5c8708[_0x11b9d4(0x1b3)]===_0x514323[_0x11b9d4(0x1ba)]['COMMENT'])[_0x11b9d4(0x21e)](_0x4bef50=>_0x4bef50['rangeId']))!=null?_0x2f2afe:[],_0x5f4a52=JSON[_0x11b9d4(0x218)](_0x255b0d),_0x4a1747=(await this[_0x11b9d4(0x219)]['requireSession'](_0x1f73b5))['getMemberID']();if(_0x3f4443){const _0x26e388={'memberId':_0x4a1747,'unitId':_0x1f73b5,'content':_0x5f4a52,'mention':_0x4b1087,'threadId':_0x52919e},_0x5920b1=(await this['_httpService'][_0x11b9d4(0x1f7)](_0x11b9d4(0x1a7)+_0x1f73b5+_0x11b9d4(0x1a3),{'body':_0x26e388}))[_0x11b9d4(0x207)][_0x11b9d4(0x1ab)];return{..._0xbc0805,'id':_0x5920b1[_0x11b9d4(0x1a1)],'dT':_0x514323[_0x11b9d4(0x1e0)](+_0x5920b1[_0x11b9d4(0x1ad)])[_0x11b9d4(0x1b2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5920b1[_0x11b9d4(0x1c0)]};}else{const _0x230193={'memberId':_0x4a1747,'unitId':_0x1f73b5,'content':_0x5f4a52,'mention':_0x4b1087},_0x2027de=await this['_httpService'][_0x11b9d4(0x1f7)](_0x11b9d4(0x1a7)+_0x1f73b5+'/add',{'body':_0x230193});return _0xfb3db4(_0x2027de['body'][_0x11b9d4(0x215)],_0xbc0805);}}async['updateComment'](_0x429b2f){const _0x4b20c7=_0x28189d;var _0x32c279,_0x5ca74b;const {text:_0xaa25ab,unitId:_0x15f5aa}=_0x429b2f,_0x4abebf=(_0x5ca74b=(_0x32c279=_0xaa25ab[_0x4b20c7(0x1d1)])==null?void 0x0:_0x32c279[_0x4b20c7(0x1c3)](_0x5e6182=>_0x5e6182[_0x4b20c7(0x1b3)]===_0x514323[_0x4b20c7(0x1ba)][_0x4b20c7(0x1fd)])[_0x4b20c7(0x21e)](_0x553122=>_0x553122[_0x4b20c7(0x1c7)]))!=null?_0x5ca74b:[],_0x49b27e=JSON[_0x4b20c7(0x218)](_0xaa25ab),_0x282f2f=_0x429b2f[_0x4b20c7(0x1c2)],_0x2c5703=_0x429b2f['id'],_0x3dd1f2={'memberId':(await this[_0x4b20c7(0x219)][_0x4b20c7(0x1f5)](_0x15f5aa))[_0x4b20c7(0x1da)](),'unitId':_0x15f5aa,'threadId':_0x282f2f,'mention':_0x4abebf,'content':_0x49b27e,'replyId':_0x2c5703},_0xeeac28=await this[_0x4b20c7(0x1bf)][_0x4b20c7(0x1f7)](_0x4b20c7(0x1a7)+_0x15f5aa+_0x4b20c7(0x1bd),{'body':_0x3dd1f2});return!_0xeeac28[_0x4b20c7(0x207)]['error']||_0xeeac28[_0x4b20c7(0x207)][_0x4b20c7(0x1a6)][_0x4b20c7(0x211)]===0x1;}async['resolveComment'](_0x3a601f){const _0x3947d3=_0x28189d,{unitId:_0x21cc05}=_0x3a601f,_0x351086=_0x3a601f['threadId'],_0x5e6b54={'memberId':this[_0x3947d3(0x21b)][_0x3947d3(0x21a)]()[_0x3947d3(0x1cb)],'unitId':_0x21cc05,'threadId':_0x351086,'solved':_0x3a601f[_0x3947d3(0x1ff)]?_0x479a51[_0x3947d3(0x208)]:_0x479a51[_0x3947d3(0x1e2)]},_0x30e977=await this[_0x3947d3(0x1bf)][_0x3947d3(0x1f7)](_0x3947d3(0x1a7)+_0x21cc05+_0x3947d3(0x1d3),{'body':_0x5e6b54});return!_0x30e977[_0x3947d3(0x207)][_0x3947d3(0x1a6)]||_0x30e977['body']['error']['code']===0x1;}async[_0x28189d(0x1b7)](_0x9cf93b,_0x154f2a,_0x4a145b,_0x2ea039){const _0x58673f=_0x28189d,_0x2b5ffe={'memberId':(await this[_0x58673f(0x219)][_0x58673f(0x1f5)](_0x9cf93b))['getMemberID'](),'threadId':_0x4a145b,'replyId':_0x2ea039,'unitId':_0x9cf93b},_0x553091=await this[_0x58673f(0x1bf)][_0x58673f(0x1f7)]('/universer-api/comment/unit/'+_0x9cf93b+_0x58673f(0x1ed),{'body':_0x2b5ffe});return!_0x553091[_0x58673f(0x207)]['error']||_0x553091['body'][_0x58673f(0x1a6)][_0x58673f(0x211)]===0x1;}async[_0x28189d(0x1f3)](_0x49d825,_0x270d98,_0x3b8848){const _0x1d5e2b=_0x28189d,_0x2c74b9={'unitId':_0x49d825,'threadId':_0x3b8848},_0x464fc=await this[_0x1d5e2b(0x1bf)][_0x1d5e2b(0x1f7)](_0x1d5e2b(0x1a7)+_0x49d825+'/list',{'body':_0x2c74b9}),_0x501ccf=_0x3b8848['map'](_0x3c36bb=>_0xd9e2c4(_0x464fc[_0x1d5e2b(0x207)][_0x1d5e2b(0x19e)][_0x3c36bb],_0x49d825,_0x270d98))[_0x1d5e2b(0x1c3)](Boolean);return Object[_0x1d5e2b(0x201)](_0x464fc['body'][_0x1d5e2b(0x1d8)])[_0x1d5e2b(0x1a8)](_0x756690=>{const _0x4f735a=_0x1d5e2b;this[_0x4f735a(0x21b)]['addUser'](_0x756690);}),_0x501ccf;}[_0x28189d(0x1f4)](_0x5c4762){const _0x48d70c=_0x28189d;return{'id':_0x5c4762['id'],'threadId':_0x5c4762[_0x48d70c(0x1c2)],'ref':_0x5c4762[_0x48d70c(0x1f2)]};}};_0x368b4e=_0x36943e([_0x1ae31c(0x0,_0x514323[_0x28189d(0x1c4)](_0x2aae81[_0x28189d(0x1a9)])),_0x1ae31c(0x1,_0x514323[_0x28189d(0x1c4)](_0x514323[_0x28189d(0x1ea)])),_0x1ae31c(0x2,_0x514323[_0x28189d(0x1c4)](_0x1cb471[_0x28189d(0x1b6)])),_0x1ae31c(0x3,_0x514323['Inject'](_0x514323['Injector']))],_0x368b4e);var _0x5211c6=Object['getOwnPropertyDescriptor'],_0x1a741d=(_0x226182,_0x38d2ca,_0x4d4d26,_0x46f64c)=>{for(var _0x377cd9=_0x46f64c>0x1?void 0x0:_0x46f64c?_0x5211c6(_0x38d2ca,_0x4d4d26):_0x38d2ca,_0x384997=_0x226182['length']-0x1,_0x2f6865;_0x384997>=0x0;_0x384997--)(_0x2f6865=_0x226182[_0x384997])&&(_0x377cd9=_0x2f6865(_0x377cd9)||_0x377cd9);return _0x377cd9;},_0x27cb81=(_0x13902a,_0x3d1c56)=>(_0x3665bd,_0x21685c)=>_0x3d1c56(_0x3665bd,_0x21685c,_0x13902a);let _0xaf8918=class extends _0x514323[_0x28189d(0x1eb)]{constructor(_0x2880fc,_0x1f2437){const _0x4980eb=_0x28189d;super(),this[_0x4980eb(0x198)]=_0x2880fc,this[_0x4980eb(0x19f)]=_0x1f2437,this['_initDataSource']();}[_0x28189d(0x1cc)](){const _0x4b87cc=_0x28189d;this[_0x4b87cc(0x198)][_0x4b87cc(0x1fa)]=this[_0x4b87cc(0x19f)],this[_0x4b87cc(0x198)][_0x4b87cc(0x20e)]=!0x1;}};_0xaf8918=_0x1a741d([_0x27cb81(0x0,_0x18ced5[_0x28189d(0x214)]),_0x27cb81(0x1,_0x514323[_0x28189d(0x1c4)](_0x368b4e))],_0xaf8918);var _0x5ca07e=Object['defineProperty'],_0x3521ae=Object['getOwnPropertyDescriptor'],_0x209b12=(_0x286349,_0xbcb4d3,_0x25e96e)=>_0xbcb4d3 in _0x286349?_0x5ca07e(_0x286349,_0xbcb4d3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25e96e}):_0x286349[_0xbcb4d3]=_0x25e96e,_0x43f026=(_0x210834,_0x2fd51e,_0x47e1f1,_0x4c40c1)=>{const _0x5812c6=_0x28189d;for(var _0x205932=_0x4c40c1>0x1?void 0x0:_0x4c40c1?_0x3521ae(_0x2fd51e,_0x47e1f1):_0x2fd51e,_0x353781=_0x210834[_0x5812c6(0x1dd)]-0x1,_0xe496b9;_0x353781>=0x0;_0x353781--)(_0xe496b9=_0x210834[_0x353781])&&(_0x205932=_0xe496b9(_0x205932)||_0x205932);return _0x205932;},_0x2e5afe=(_0x11e490,_0x23544f)=>(_0x4ed19b,_0x3da69c)=>_0x23544f(_0x4ed19b,_0x3da69c,_0x11e490),_0x2e4e97=(_0x17cc6c,_0x701f4a,_0x2fd8f2)=>_0x209b12(_0x17cc6c,typeof _0x701f4a!='symbol'?_0x701f4a+'':_0x701f4a,_0x2fd8f2);_0x421825[_0x28189d(0x1d7)]=class extends _0x514323[_0x28189d(0x1cd)]{constructor(_0x39ae02=_0x5ea3e8,_0x264db9,_0x1c7d8b){const _0x37aef5=_0x28189d;super(),this[_0x37aef5(0x216)]=_0x39ae02,this[_0x37aef5(0x194)]=_0x264db9,this['_configService']=_0x1c7d8b;const {..._0x5c1dba}=_0x514323[_0x37aef5(0x1b8)]({},_0x5ea3e8,this[_0x37aef5(0x216)]);this[_0x37aef5(0x1e5)][_0x37aef5(0x1ac)](_0x434b5c,_0x5c1dba);}[_0x28189d(0x195)](){const _0x26975b=_0x28189d;[[_0x368b4e],[_0xaf8918],[_0x484a95]][_0x26975b(0x1a8)](_0x2a8e41=>{const _0x445af3=_0x26975b;this['_injector'][_0x445af3(0x1a5)](_0x2a8e41);});}['onReady'](){const _0x48d018=_0x28189d;this[_0x48d018(0x194)][_0x48d018(0x209)](_0xaf8918),this[_0x48d018(0x194)]['get'](_0x484a95);}},_0x2e4e97(_0x421825['UniverThreadCommentDataSourcePlugin'],_0x28189d(0x1e8),_0x2d2057),_0x2e4e97(_0x421825[_0x28189d(0x1d7)],_0x28189d(0x1dc),_0x514323[_0x28189d(0x19c)][_0x28189d(0x1fe)]),_0x421825[_0x28189d(0x1d7)]=_0x43f026([_0x514323['DependentOn'](_0xe499e8[_0x28189d(0x1b4)],_0x1cb471[_0x28189d(0x1e6)],_0x179a7a['UniverLicensePlugin']),_0x2e5afe(0x1,_0x514323['Inject'](_0x514323['Injector'])),_0x2e5afe(0x2,_0x514323[_0x28189d(0x197)])],_0x421825[_0x28189d(0x1d7)]),Object[_0x28189d(0x1b9)](_0x421825,Symbol[_0x28189d(0x21d)],{'value':'Module'});}));function _0x3fef(_0x1e648e,_0x708da0){const _0x127084=_0x1270();return _0x3fef=function(_0x3fefe3,_0x13c347){_0x3fefe3=_0x3fefe3-0x194;let _0x41598f=_0x127084[_0x3fefe3];return _0x41598f;},_0x3fef(_0x1e648e,_0x708da0);}function _0x1270(){const _0x368cc7=['/reply','48zxhbCA','add','error','/universer-api/comment/unit/','forEach','HTTPService','_commentService','reply','setConfig','createTimestamp','root','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','@univerjs-pro/collaboration-client','format','rangeType','UniverThreadCommentUIPlugin','getOwnPropertyDescriptor','CollaborationSessionService','deleteComment','merge','defineProperty','CustomRangeType','amd','parentId','/edit','Delete','_httpService','userId','1258540FNUnzo','threadId','filter','Inject','rxjs','getUser','rangeId','@univerjs/core','object','content','userID','_initDataSource','Plugin','YYYY/MM/DD\x20HH:mm','Reply','addComment','customRanges','UniverThreadComment','/solved','personId','/universer-api/user/list','8148LLHEad','UniverThreadCommentDataSourcePlugin','users','exports','getMemberID','getComment','type','length','107093Vvoeky','UniverCore','dayjs','bufferTime','OpenOrReOpen','addUser','CommentService','_configService','UniverCollaborationClientPlugin','Add','pluginName','@univerjs/thread-comment-ui','UserManagerService','Disposable','unitId','/delete','Solve','3627RUUHVD','ThreadCommentModel','38JnfAro','ref','listComments','saveCommentToSnapshot','requireSession','@univerjs-pro/license','post','@univerjs/thread-comment','UniverProThreadCommentDatasource','dataSource','352913IhyNZA','updateComment','COMMENT','UNIVER_UNKNOWN','resolved','1495242jJKxjg','values','@univerjs/network','replies','40OyHQPo','_initUserSync','290775IXfAqJ','body','Solved','get','Injector','user','6bqsDET','find','syncUpdateMutationToColla','parse','solved','code','resolveComment','Unknown','IThreadCommentDataSourceService','comment','_config','3FmJywy','stringify','_sessionService','getCurrentUser','_userService','pipe','toStringTag','map','_injector','onStarting','19671OXilXb','IConfigService','_threadCommentDataSourceService','disposeWithMe','getUnit','_threadCommentModel','UniverInstanceType','UNRECOGNIZED','comments','_threadCommentDataSource','UniverProLicense','replyId','subscribe'];_0x1270=function(){return _0x368cc7;};return _0x1270();}
|
|
1
|
+
function _0xbe30(_0xacda66,_0x44309a){const _0x40e44c=_0x40e4();return _0xbe30=function(_0xbe3068,_0x419201){_0xbe3068=_0xbe3068-0x16d;let _0x5317d7=_0x40e44c[_0xbe3068];return _0x5317d7;},_0xbe30(_0xacda66,_0x44309a);}function _0x40e4(){const _0x139a77=['1653903qVREaI','comments','users','resolved','12717foNjOu','_injector','/list','dayjs','resolveComment','userId','amd','find','/solved','commentUpdate$','onStarting','code','slice','function','UserManagerService','_httpService','_initUserSync','_threadCommentDataSource','customRanges','204353plBFSF','dataSource','symbol','listComments','_sessionService','_threadCommentDataSourceService','HTTPService','@univerjs-pro/collaboration-client','Delete','getComment','syncUpdateMutationToColla','COMMENT','thread-comment-data-source.config','merge','UniverCollaborationClientPlugin','rxjs','post','UNRECOGNIZED','getUnit','body','@univerjs/core','values','UniverProCollaborationClient','rangeId','_configService','_init','CustomRangeType','UNIVER_UNKNOWN','pipe','map','@univerjs/thread-comment','Disposable','_userService','11316uRFYrh','toStringTag','user','UniverThreadCommentUi','createTimestamp','getOwnPropertyDescriptor','8uoiYpZ','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IThreadCommentDataSourceService','Injector','stringify','/add','reply','comment','@univerjs-pro/license','exports','Solve','Module','Inject','filter','Plugin','subscribe','parse','Unknown','root','2150uJZvaH','/reply','_config','getCurrentUser','392qyvBCg','requireSession','forEach','Reply','threadId','UniverCore','solved','UniverInstanceType','defineProperty','replies','@univerjs/thread-comment-ui','personId','1780dANklb','length','_threadCommentModel','UniverNetwork','/universer-api/comment/unit/','OpenOrReOpen','addComment','_initDataSource','getMemberID','58SeyAQI','userID','677820cggQYd','@univerjs/network','DependentOn','UniverThreadCommentDataSourcePlugin','6890741RGevaX','error','updateComment','UniverProLicense','disposeWithMe','UniverThreadCommentUIPlugin','/edit','UniverThreadComment','YYYY/MM/DD\x20HH:mm','rangeType','content','Solved','/delete','setConfig','get','size','add','IConfigService','addUser','replyId','delete','Add','type','format','Edit','_commentService'];_0x40e4=function(){return _0x139a77;};return _0x40e4();}(function(_0xbf97ab,_0x183e2a){const _0x513a30=_0xbe30,_0x5dbe62=_0xbf97ab();while(!![]){try{const _0x5acdc9=parseInt(_0x513a30(0x1c5))/0x1+parseInt(_0x513a30(0x18e))/0x2*(parseInt(_0x513a30(0x1b2))/0x3)+parseInt(_0x513a30(0x185))/0x4*(parseInt(_0x513a30(0x175))/0x5)+parseInt(_0x513a30(0x1e6))/0x6*(parseInt(_0x513a30(0x179))/0x7)+-parseInt(_0x513a30(0x1ec))/0x8*(-parseInt(_0x513a30(0x1ae))/0x9)+-parseInt(_0x513a30(0x190))/0xa+-parseInt(_0x513a30(0x194))/0xb;if(_0x5acdc9===_0x183e2a)break;else _0x5dbe62['push'](_0x5dbe62['shift']());}catch(_0xcc6b4d){_0x5dbe62['push'](_0x5dbe62['shift']());}}}(_0x40e4,0x1bc8c),function(_0x1a179f,_0x5aa839){const _0x56e2f3=_0xbe30;typeof exports=='object'&&typeof module<'u'?_0x5aa839(exports,require(_0x56e2f3(0x1cc)),require(_0x56e2f3(0x1f4)),require(_0x56e2f3(0x1d9)),require(_0x56e2f3(0x183)),require(_0x56e2f3(0x1e3)),require(_0x56e2f3(0x1d4)),require(_0x56e2f3(0x191))):typeof define==_0x56e2f3(0x1bf)&&define[_0x56e2f3(0x1b8)]?define([_0x56e2f3(0x1f5),'@univerjs-pro/collaboration-client',_0x56e2f3(0x1f4),_0x56e2f3(0x1d9),_0x56e2f3(0x183),'@univerjs/thread-comment',_0x56e2f3(0x1d4),_0x56e2f3(0x191)],_0x5aa839):(_0x1a179f=typeof globalThis<'u'?globalThis:_0x1a179f||self,_0x5aa839(_0x1a179f['UniverProThreadCommentDatasource']={},_0x1a179f[_0x56e2f3(0x1db)],_0x1a179f[_0x56e2f3(0x197)],_0x1a179f[_0x56e2f3(0x17e)],_0x1a179f[_0x56e2f3(0x1e9)],_0x1a179f[_0x56e2f3(0x19b)],_0x1a179f[_0x56e2f3(0x1d4)],_0x1a179f[_0x56e2f3(0x188)]));}(this,function(_0x1ebdeb,_0x34e85f,_0x15173a,_0x2a3f7a,_0x656d5b,_0x285807,_0x588bef,_0x27ac35){'use strict';const _0x282bd8=_0xbe30;const _0x3afa6c=_0x282bd8(0x1ed);var _0x1e51c3=(_0x1ea984=>(_0x1ea984[_0x1ea984[_0x282bd8(0x18a)]=0x0]=_0x282bd8(0x18a),_0x1ea984[_0x1ea984[_0x282bd8(0x19f)]=0x1]=_0x282bd8(0x19f),_0x1ea984[_0x1ea984['UNRECOGNIZED']=-0x1]=_0x282bd8(0x1d6),_0x1ea984))(_0x1e51c3||{}),_0x54512f=(_0x44b5f5=>(_0x44b5f5[_0x44b5f5[_0x282bd8(0x173)]=0x0]='Unknown',_0x44b5f5[_0x44b5f5['Add']=0x1]=_0x282bd8(0x1a9),_0x44b5f5[_0x44b5f5['Reply']=0x2]='Reply',_0x44b5f5[_0x44b5f5['Edit']=0x3]=_0x282bd8(0x1ac),_0x44b5f5[_0x44b5f5[_0x282bd8(0x1cd)]=0x4]=_0x282bd8(0x1cd),_0x44b5f5[_0x44b5f5[_0x282bd8(0x1f6)]=0x5]=_0x282bd8(0x1f6),_0x44b5f5[_0x44b5f5[_0x282bd8(0x1d6)]=-0x1]=_0x282bd8(0x1d6),_0x44b5f5))(_0x54512f||{});const _0x45c4b4=_0x1ff108=>_0x2a3f7a[_0x282bd8(0x1b5)](new Date(+_0x1ff108))[_0x282bd8(0x1ab)](_0x282bd8(0x19c)),_0x5df143=async(_0x2cf2a4,_0x158770)=>{const _0x1fbd00=_0x282bd8,_0x466715=_0x2cf2a4['get'](_0x2a3f7a[_0x1fbd00(0x1c0)]),_0x5dde77=_0x2cf2a4[_0x1fbd00(0x1a2)](_0x27ac35[_0x1fbd00(0x1cb)]);_0x158770[_0x1fbd00(0x17b)](_0x92af5e=>{const _0x16b0e0=_0x1fbd00;_0x466715['getUser'](_0x92af5e)&&_0x158770[_0x16b0e0(0x1a8)](_0x92af5e);}),_0x158770[_0x1fbd00(0x1a3)]&&(await _0x5dde77[_0x1fbd00(0x1a2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x158770]}}))[_0x1fbd00(0x1d8)][_0x1fbd00(0x1b0)][_0x1fbd00(0x17b)](_0xa306e1=>{const _0x18cc29=_0x1fbd00;_0xa306e1&&_0x466715[_0x18cc29(0x1a6)](_0xa306e1);});};var _0x5c2ab4=Object[_0x282bd8(0x1eb)],_0x21f4aa=(_0x4429af,_0x4e20cd,_0x552704,_0x1bc459)=>{const _0x29f067=_0x282bd8;for(var _0x46de6e=_0x1bc459>0x1?void 0x0:_0x1bc459?_0x5c2ab4(_0x4e20cd,_0x552704):_0x4e20cd,_0x1f5a75=_0x4429af[_0x29f067(0x186)]-0x1,_0x10f332;_0x1f5a75>=0x0;_0x1f5a75--)(_0x10f332=_0x4429af[_0x1f5a75])&&(_0x46de6e=_0x10f332(_0x46de6e)||_0x46de6e);return _0x46de6e;},_0x3a0ef8=(_0x10a6a3,_0x2716f0)=>(_0x559459,_0x5746cd)=>_0x2716f0(_0x559459,_0x5746cd,_0x10a6a3);let _0x5e4755=class extends _0x2a3f7a[_0x282bd8(0x1e4)]{constructor(_0x29fcc4,_0x457cb7,_0x239fb0,_0x2a4467){const _0xb26113=_0x282bd8;super(),this[_0xb26113(0x1ad)]=_0x29fcc4,this[_0xb26113(0x187)]=_0x457cb7,this[_0xb26113(0x1e5)]=_0x239fb0,this['_injector']=_0x2a4467,this[_0xb26113(0x1de)](),this[_0xb26113(0x1c2)]();}[_0x282bd8(0x1c2)](){const _0x29c3ff=_0x282bd8;this[_0x29c3ff(0x198)](this[_0x29c3ff(0x187)][_0x29c3ff(0x1bb)][_0x29c3ff(0x1e1)](_0x588bef['bufferTime'](0x10))[_0x29c3ff(0x171)](_0x509382=>{const _0xaa802=_0x29c3ff,_0xb4b2bb=new Set();_0x509382[_0xaa802(0x17b)](_0x86993b=>{const _0x2eb3cb=_0xaa802;switch(_0x86993b['type']){case _0x2eb3cb(0x1a4):{const _0x426748=_0x86993b['payload'][_0x2eb3cb(0x184)];_0xb4b2bb[_0x2eb3cb(0x1a4)](_0x426748);break;}}}),_0x5df143(this['_injector'],_0xb4b2bb);}));}[_0x282bd8(0x1de)](){const _0x5524d5=_0x282bd8;this[_0x5524d5(0x198)](this[_0x5524d5(0x1ad)][_0x5524d5(0x1bb)][_0x5524d5(0x171)](async _0x27fbc3=>{const _0x418376=_0x5524d5;var _0x470c1d,_0x3cb661,_0x53ea58,_0x4650c1;const _0x258552=(_0x470c1d=this['_threadCommentModel'][_0x418376(0x1d7)](_0x27fbc3['unitId'])[_0x418376(0x1b9)](_0x22ca51=>_0x22ca51[_0x418376(0x17d)]===_0x27fbc3[_0x418376(0x17d)]))==null?void 0x0:_0x470c1d['root'];if(!_0x258552)return;const {unitId:_0xda1535,subUnitId:_0x2371a2}=_0x258552;switch(_0x27fbc3['user']&&this['_userService'][_0x418376(0x1a6)](_0x27fbc3[_0x418376(0x1e8)]),_0x27fbc3[_0x418376(0x1aa)]){case _0x54512f[_0x418376(0x1a9)]:break;case _0x54512f[_0x418376(0x17c)]:{this[_0x418376(0x187)][_0x418376(0x18b)](_0xda1535,_0x2371a2,{'unitId':_0xda1535,'subUnitId':_0x2371a2,'ref':'','id':_0x27fbc3[_0x418376(0x1a7)],'dT':_0x45c4b4(+_0x27fbc3[_0x418376(0x1ea)]),'threadId':_0x27fbc3[_0x418376(0x17d)],'personId':(_0x53ea58=(_0x3cb661=_0x27fbc3[_0x418376(0x1e8)])==null?void 0x0:_0x3cb661[_0x418376(0x18f)])!=null?_0x53ea58:_0x27fbc3[_0x418376(0x1b7)],'text':JSON[_0x418376(0x172)](_0x27fbc3[_0x418376(0x19e)]),'parentId':_0x258552['id']});break;}case _0x54512f[_0x418376(0x1cd)]:{const _0x201562=this[_0x418376(0x187)][_0x418376(0x1ce)](_0xda1535,_0x2371a2,_0x27fbc3['replyId']);_0x201562&&_0x201562['parentId']&&this[_0x418376(0x187)]['deleteComment'](_0xda1535,_0x2371a2,_0x27fbc3['replyId']);break;}case _0x54512f[_0x418376(0x1ac)]:{this[_0x418376(0x187)]['updateComment'](_0xda1535,_0x2371a2,{'commentId':_0x27fbc3[_0x418376(0x1a7)],'text':JSON[_0x418376(0x172)](_0x27fbc3[_0x418376(0x19e)])});break;}case _0x54512f[_0x418376(0x1f6)]:{const _0x1c1e9d=(_0x4650c1=this[_0x418376(0x187)][_0x418376(0x1d7)](_0x27fbc3['unitId'])[_0x418376(0x1b9)](_0x1dfdf0=>_0x1dfdf0[_0x418376(0x17d)]===_0x27fbc3[_0x418376(0x17d)]))==null?void 0x0:_0x4650c1[_0x418376(0x174)];_0x1c1e9d&&this[_0x418376(0x187)][_0x418376(0x1b6)](_0xda1535,_0x2371a2,_0x1c1e9d['id'],_0x27fbc3['solved']===_0x1e51c3[_0x418376(0x19f)]);break;}}}));}};_0x5e4755=_0x21f4aa([_0x3a0ef8(0x0,_0x2a3f7a[_0x282bd8(0x16e)](_0x34e85f['CommentService'])),_0x3a0ef8(0x1,_0x2a3f7a[_0x282bd8(0x16e)](_0x285807['ThreadCommentModel'])),_0x3a0ef8(0x2,_0x2a3f7a[_0x282bd8(0x16e)](_0x2a3f7a[_0x282bd8(0x1c0)])),_0x3a0ef8(0x3,_0x2a3f7a[_0x282bd8(0x16e)](_0x2a3f7a['Injector']))],_0x5e4755);const _0x58bf77=_0x282bd8(0x1d1),_0x32d97c={};var _0x68c410=Object[_0x282bd8(0x1eb)],_0x11fa35=(_0x2627fb,_0x5de313,_0x825672,_0x35db75)=>{const _0x576ff8=_0x282bd8;for(var _0x140fda=_0x35db75>0x1?void 0x0:_0x35db75?_0x68c410(_0x5de313,_0x825672):_0x5de313,_0x23c5cc=_0x2627fb[_0x576ff8(0x186)]-0x1,_0x22c75c;_0x23c5cc>=0x0;_0x23c5cc--)(_0x22c75c=_0x2627fb[_0x23c5cc])&&(_0x140fda=_0x22c75c(_0x140fda)||_0x140fda);return _0x140fda;},_0x10f0ca=(_0x4b9eec,_0x378331)=>(_0x1a89bb,_0xb0eb04)=>_0x378331(_0x1a89bb,_0xb0eb04,_0x4b9eec);function _0x23b6d1(_0x57ef15,_0x1c69e3){const _0xd9eae=_0x282bd8,_0x3eb7b9=_0x57ef15['replies'][0x0];return{..._0x1c69e3,'id':_0x3eb7b9[_0xd9eae(0x1a7)],'resolved':_0x57ef15[_0xd9eae(0x17f)]===0x1,'dT':_0x45c4b4(_0x3eb7b9[_0xd9eae(0x1ea)]),'personId':_0x3eb7b9[_0xd9eae(0x1b7)],'threadId':_0x3eb7b9[_0xd9eae(0x17d)]};}function _0x269ec9(_0x429fbf,_0xd8c952,_0x31b132){const _0x285b94=_0x282bd8;var _0x3896d4,_0x54b2dc;if(((_0x54b2dc=(_0x3896d4=_0x429fbf==null?void 0x0:_0x429fbf[_0x285b94(0x182)])==null?void 0x0:_0x3896d4[_0x285b94(0x186)])!=null?_0x54b2dc:0x0)>0x0){const _0x3ebbf5=(_0x4955f3,_0x1857b9)=>({'id':_0x4955f3['replyId'],'threadId':_0x4955f3['threadId'],'dT':_0x45c4b4(_0x4955f3['createTimestamp']),'personId':_0x4955f3[_0x285b94(0x1b7)],'resolved':_0x429fbf[_0x285b94(0x17f)]===_0x1e51c3[_0x285b94(0x19f)],'unitId':_0xd8c952,'subUnitId':_0x31b132,'text':JSON['parse'](_0x4955f3[_0x285b94(0x19e)]),'parentId':_0x1857b9}),_0x393040=_0x3ebbf5(_0x429fbf[_0x285b94(0x182)][0x0]);return{..._0x393040,'children':_0x429fbf['replies'][_0x285b94(0x1be)](0x1)[_0x285b94(0x1e2)](_0x2873af=>_0x3ebbf5(_0x2873af,_0x393040['id']))};}return null;}let _0x5b1081=class{constructor(_0x374ab6,_0x3e1b6c,_0x3c4286,_0x35f2a0){const _0x309597=_0x282bd8;this[_0x309597(0x1c1)]=_0x374ab6,this['_userService']=_0x3e1b6c,this['_sessionService']=_0x3c4286,this[_0x309597(0x1b3)]=_0x35f2a0;}async[_0x282bd8(0x18b)](_0x49b6df){const _0x37e3d1=_0x282bd8;var _0x5eb418,_0xab747e;const {parentId:_0x55009b,unitId:_0x45dc31,text:_0x297ba6,threadId:_0x3758b2}=_0x49b6df,_0x4763c7=(_0xab747e=(_0x5eb418=_0x297ba6[_0x37e3d1(0x1c4)])==null?void 0x0:_0x5eb418['filter'](_0x5c2046=>_0x5c2046[_0x37e3d1(0x19d)]===_0x2a3f7a[_0x37e3d1(0x1df)]['COMMENT'])[_0x37e3d1(0x1e2)](_0x48d2cd=>_0x48d2cd[_0x37e3d1(0x1dc)]))!=null?_0xab747e:[],_0xbdea46=JSON[_0x37e3d1(0x1f0)](_0x297ba6),_0x3c7a3a=(await this[_0x37e3d1(0x1c9)][_0x37e3d1(0x17a)](_0x45dc31))[_0x37e3d1(0x18d)]();if(_0x55009b){const _0x21ad27={'memberId':_0x3c7a3a,'unitId':_0x45dc31,'content':_0xbdea46,'mention':_0x4763c7,'threadId':_0x3758b2},_0x140c3e=(await this[_0x37e3d1(0x1c1)][_0x37e3d1(0x1d5)](_0x37e3d1(0x189)+_0x45dc31+_0x37e3d1(0x176),{'body':_0x21ad27}))[_0x37e3d1(0x1d8)][_0x37e3d1(0x1f2)];return{..._0x49b6df,'id':_0x140c3e['replyId'],'dT':_0x2a3f7a[_0x37e3d1(0x1b5)](+_0x140c3e['createTimestamp'])[_0x37e3d1(0x1ab)](_0x37e3d1(0x19c)),'personId':_0x140c3e[_0x37e3d1(0x1b7)]};}else{const _0x4ef2f7={'memberId':_0x3c7a3a,'unitId':_0x45dc31,'content':_0xbdea46,'mention':_0x4763c7},_0x56f115=await this['_httpService'][_0x37e3d1(0x1d5)]('/universer-api/comment/unit/'+_0x45dc31+_0x37e3d1(0x1f1),{'body':_0x4ef2f7});return _0x23b6d1(_0x56f115[_0x37e3d1(0x1d8)][_0x37e3d1(0x1f3)],_0x49b6df);}}async[_0x282bd8(0x196)](_0x2bf621){const _0x3262c9=_0x282bd8;var _0x4f7b1f,_0x3f8bc7;const {text:_0x29bef5,unitId:_0x2c8e92}=_0x2bf621,_0x108402=(_0x3f8bc7=(_0x4f7b1f=_0x29bef5[_0x3262c9(0x1c4)])==null?void 0x0:_0x4f7b1f['filter'](_0x344984=>_0x344984[_0x3262c9(0x19d)]===_0x2a3f7a[_0x3262c9(0x1df)][_0x3262c9(0x1d0)])[_0x3262c9(0x1e2)](_0x48ac70=>_0x48ac70[_0x3262c9(0x1dc)]))!=null?_0x3f8bc7:[],_0x1678cf=JSON['stringify'](_0x29bef5),_0x4c72e6=_0x2bf621[_0x3262c9(0x17d)],_0x345424=_0x2bf621['id'],_0x1766c7={'memberId':(await this[_0x3262c9(0x1c9)][_0x3262c9(0x17a)](_0x2c8e92))[_0x3262c9(0x18d)](),'unitId':_0x2c8e92,'threadId':_0x4c72e6,'mention':_0x108402,'content':_0x1678cf,'replyId':_0x345424},_0x3b420c=await this[_0x3262c9(0x1c1)][_0x3262c9(0x1d5)](_0x3262c9(0x189)+_0x2c8e92+_0x3262c9(0x19a),{'body':_0x1766c7});return!_0x3b420c[_0x3262c9(0x1d8)][_0x3262c9(0x195)]||_0x3b420c[_0x3262c9(0x1d8)][_0x3262c9(0x195)][_0x3262c9(0x1bd)]===0x1;}async['resolveComment'](_0x4170c3){const _0xe9f680=_0x282bd8,{unitId:_0x2e5b4a}=_0x4170c3,_0x1e1e2c=_0x4170c3['threadId'],_0x25c992={'memberId':this[_0xe9f680(0x1e5)][_0xe9f680(0x178)]()['userID'],'unitId':_0x2e5b4a,'threadId':_0x1e1e2c,'solved':_0x4170c3[_0xe9f680(0x1b1)]?_0x1e51c3[_0xe9f680(0x19f)]:_0x1e51c3[_0xe9f680(0x18a)]},_0x543934=await this[_0xe9f680(0x1c1)][_0xe9f680(0x1d5)](_0xe9f680(0x189)+_0x2e5b4a+_0xe9f680(0x1ba),{'body':_0x25c992});return!_0x543934[_0xe9f680(0x1d8)][_0xe9f680(0x195)]||_0x543934[_0xe9f680(0x1d8)][_0xe9f680(0x195)][_0xe9f680(0x1bd)]===0x1;}async['deleteComment'](_0x340ce4,_0xb3bd7f,_0x3cb596,_0x45676f){const _0xd02f5c=_0x282bd8,_0x2d5409={'memberId':(await this[_0xd02f5c(0x1c9)][_0xd02f5c(0x17a)](_0x340ce4))['getMemberID'](),'threadId':_0x3cb596,'replyId':_0x45676f,'unitId':_0x340ce4},_0x29971e=await this[_0xd02f5c(0x1c1)][_0xd02f5c(0x1d5)](_0xd02f5c(0x189)+_0x340ce4+_0xd02f5c(0x1a0),{'body':_0x2d5409});return!_0x29971e['body']['error']||_0x29971e['body']['error'][_0xd02f5c(0x1bd)]===0x1;}async[_0x282bd8(0x1c8)](_0x592485,_0xfd3c25,_0x5544b2){const _0x2e954c=_0x282bd8,_0x39d229={'unitId':_0x592485,'threadId':_0x5544b2},_0x2e500c=await this[_0x2e954c(0x1c1)]['post'](_0x2e954c(0x189)+_0x592485+_0x2e954c(0x1b4),{'body':_0x39d229}),_0x2cb84d=_0x5544b2[_0x2e954c(0x1e2)](_0x3c3fe3=>_0x269ec9(_0x2e500c[_0x2e954c(0x1d8)][_0x2e954c(0x1af)][_0x3c3fe3],_0x592485,_0xfd3c25))[_0x2e954c(0x16f)](Boolean);return Object[_0x2e954c(0x1da)](_0x2e500c[_0x2e954c(0x1d8)][_0x2e954c(0x1b0)])[_0x2e954c(0x17b)](_0x3baa7d=>{const _0x3d87d5=_0x2e954c;this[_0x3d87d5(0x1e5)]['addUser'](_0x3baa7d);}),_0x2cb84d;}['saveCommentToSnapshot'](_0x702faf){const _0x3f7776=_0x282bd8;return{'id':_0x702faf['id'],'threadId':_0x702faf[_0x3f7776(0x17d)],'ref':_0x702faf['ref']};}};_0x5b1081=_0x11fa35([_0x10f0ca(0x0,_0x2a3f7a[_0x282bd8(0x16e)](_0x27ac35[_0x282bd8(0x1cb)])),_0x10f0ca(0x1,_0x2a3f7a[_0x282bd8(0x16e)](_0x2a3f7a[_0x282bd8(0x1c0)])),_0x10f0ca(0x2,_0x2a3f7a[_0x282bd8(0x16e)](_0x34e85f['CollaborationSessionService'])),_0x10f0ca(0x3,_0x2a3f7a[_0x282bd8(0x16e)](_0x2a3f7a[_0x282bd8(0x1ef)]))],_0x5b1081);var _0x46f4f2=Object[_0x282bd8(0x1eb)],_0x5c7074=(_0x22fa66,_0x420b7e,_0x36975f,_0x2b3ff4)=>{const _0x1c5647=_0x282bd8;for(var _0x3825bd=_0x2b3ff4>0x1?void 0x0:_0x2b3ff4?_0x46f4f2(_0x420b7e,_0x36975f):_0x420b7e,_0x455db9=_0x22fa66[_0x1c5647(0x186)]-0x1,_0x3d4310;_0x455db9>=0x0;_0x455db9--)(_0x3d4310=_0x22fa66[_0x455db9])&&(_0x3825bd=_0x3d4310(_0x3825bd)||_0x3825bd);return _0x3825bd;},_0x17f60b=(_0x22e10f,_0x30c346)=>(_0x3a8916,_0x188c2d)=>_0x30c346(_0x3a8916,_0x188c2d,_0x22e10f);let _0x4a2417=class extends _0x2a3f7a[_0x282bd8(0x1e4)]{constructor(_0x4dd089,_0x47384a){const _0xc3bf55=_0x282bd8;super(),this[_0xc3bf55(0x1ca)]=_0x4dd089,this[_0xc3bf55(0x1c3)]=_0x47384a,this['_initDataSource']();}[_0x282bd8(0x18c)](){const _0x1d3f0c=_0x282bd8;this[_0x1d3f0c(0x1ca)][_0x1d3f0c(0x1c6)]=this['_threadCommentDataSource'],this[_0x1d3f0c(0x1ca)][_0x1d3f0c(0x1cf)]=!0x1;}};_0x4a2417=_0x5c7074([_0x17f60b(0x0,_0x285807[_0x282bd8(0x1ee)]),_0x17f60b(0x1,_0x2a3f7a[_0x282bd8(0x16e)](_0x5b1081))],_0x4a2417);var _0x214d82=Object[_0x282bd8(0x181)],_0x2f18de=Object[_0x282bd8(0x1eb)],_0x33af26=(_0x23131f,_0x4d8716,_0xe4d6f4)=>_0x4d8716 in _0x23131f?_0x214d82(_0x23131f,_0x4d8716,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe4d6f4}):_0x23131f[_0x4d8716]=_0xe4d6f4,_0x2b73b1=(_0x3f2aba,_0xa727cf,_0x223ec1,_0x5cbe99)=>{const _0x59af8e=_0x282bd8;for(var _0x12e096=_0x5cbe99>0x1?void 0x0:_0x5cbe99?_0x2f18de(_0xa727cf,_0x223ec1):_0xa727cf,_0x140f5c=_0x3f2aba[_0x59af8e(0x186)]-0x1,_0x48163b;_0x140f5c>=0x0;_0x140f5c--)(_0x48163b=_0x3f2aba[_0x140f5c])&&(_0x12e096=_0x48163b(_0x12e096)||_0x12e096);return _0x12e096;},_0x5c1f70=(_0x290582,_0x5aa093)=>(_0x118466,_0x28586c)=>_0x5aa093(_0x118466,_0x28586c,_0x290582),_0x32ba8d=(_0x3d0220,_0xf307aa,_0x4f6fc8)=>_0x33af26(_0x3d0220,typeof _0xf307aa!=_0x282bd8(0x1c7)?_0xf307aa+'':_0xf307aa,_0x4f6fc8);_0x1ebdeb[_0x282bd8(0x193)]=class extends _0x2a3f7a[_0x282bd8(0x170)]{constructor(_0x592d59=_0x32d97c,_0x1bf543,_0x24d6a8){const _0xbc39ea=_0x282bd8;super(),this[_0xbc39ea(0x177)]=_0x592d59,this[_0xbc39ea(0x1b3)]=_0x1bf543,this[_0xbc39ea(0x1dd)]=_0x24d6a8;const {..._0x17658f}=_0x2a3f7a[_0xbc39ea(0x1d2)]({},_0x32d97c,this[_0xbc39ea(0x177)]);this[_0xbc39ea(0x1dd)][_0xbc39ea(0x1a1)](_0x58bf77,_0x17658f);}[_0x282bd8(0x1bc)](){const _0x36ce5a=_0x282bd8;[[_0x5b1081],[_0x4a2417],[_0x5e4755]][_0x36ce5a(0x17b)](_0x56f7ca=>{const _0xe9f873=_0x36ce5a;this[_0xe9f873(0x1b3)][_0xe9f873(0x1a4)](_0x56f7ca);});}['onReady'](){const _0xb5cfb9=_0x282bd8;this[_0xb5cfb9(0x1b3)][_0xb5cfb9(0x1a2)](_0x4a2417),this['_injector'][_0xb5cfb9(0x1a2)](_0x5e4755);}},_0x32ba8d(_0x1ebdeb[_0x282bd8(0x193)],'pluginName',_0x3afa6c),_0x32ba8d(_0x1ebdeb[_0x282bd8(0x193)],'type',_0x2a3f7a[_0x282bd8(0x180)][_0x282bd8(0x1e0)]),_0x1ebdeb[_0x282bd8(0x193)]=_0x2b73b1([_0x2a3f7a[_0x282bd8(0x192)](_0x656d5b[_0x282bd8(0x199)],_0x34e85f[_0x282bd8(0x1d3)],_0x15173a['UniverLicensePlugin']),_0x5c1f70(0x1,_0x2a3f7a[_0x282bd8(0x16e)](_0x2a3f7a[_0x282bd8(0x1ef)])),_0x5c1f70(0x2,_0x2a3f7a[_0x282bd8(0x1a5)])],_0x1ebdeb['UniverThreadCommentDataSourcePlugin']),Object[_0x282bd8(0x181)](_0x1ebdeb,Symbol[_0x282bd8(0x1e7)],{'value':_0x282bd8(0x16d)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.0-nightly.
|
|
3
|
+
"version": "0.8.0-nightly.202505311606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.8.0-nightly.
|
|
50
|
-
"@univerjs/core": "0.8.0-nightly.
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.8.0-nightly.
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.8.0-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202505311606",
|
|
49
|
+
"@univerjs-pro/license": "0.8.0-nightly.202505311606",
|
|
50
|
+
"@univerjs/core": "0.8.0-nightly.202505311606",
|
|
51
|
+
"@univerjs/network": "0.8.0-nightly.202505311606",
|
|
52
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202505311606",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202505311606",
|
|
54
|
+
"@univerjs/protocol": "0.1.47-alpha.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|