@univerjs-pro/thread-comment-datasource 0.9.1 → 0.9.2-nightly.202507111607

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 CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x1e9314=_0x5e46;(function(_0x2f3e2e,_0x5bcc74){const _0x12000a=_0x5e46,_0x894438=_0x2f3e2e();while(!![]){try{const _0x4e5094=-parseInt(_0x12000a(0x108))/0x1+parseInt(_0x12000a(0x159))/0x2+-parseInt(_0x12000a(0x152))/0x3+parseInt(_0x12000a(0x121))/0x4+parseInt(_0x12000a(0x160))/0x5*(parseInt(_0x12000a(0x10f))/0x6)+-parseInt(_0x12000a(0x136))/0x7+parseInt(_0x12000a(0x137))/0x8*(parseInt(_0x12000a(0x10d))/0x9);if(_0x4e5094===_0x5bcc74)break;else _0x894438['push'](_0x894438['shift']());}catch(_0x1e257b){_0x894438['push'](_0x894438['shift']());}}}(_0x361b,0x6e79e));Object[_0x1e9314(0x176)](exports,Symbol[_0x1e9314(0x118)],{'value':_0x1e9314(0x163)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x1e9314(0x12d);var I=(_0x152616=>(_0x152616[_0x152616['OpenOrReOpen']=0x0]=_0x1e9314(0x144),_0x152616[_0x152616[_0x1e9314(0x149)]=0x1]=_0x1e9314(0x149),_0x152616[_0x152616[_0x1e9314(0x17a)]=-0x1]=_0x1e9314(0x17a),_0x152616))(I||{}),v=(_0x59e69d=>(_0x59e69d[_0x59e69d['Unknown']=0x0]='Unknown',_0x59e69d[_0x59e69d[_0x1e9314(0x140)]=0x1]=_0x1e9314(0x140),_0x59e69d[_0x59e69d[_0x1e9314(0x12a)]=0x2]=_0x1e9314(0x12a),_0x59e69d[_0x59e69d[_0x1e9314(0x126)]=0x3]=_0x1e9314(0x126),_0x59e69d[_0x59e69d['Delete']=0x4]=_0x1e9314(0x165),_0x59e69d[_0x59e69d['Solve']=0x5]=_0x1e9314(0x148),_0x59e69d[_0x59e69d[_0x1e9314(0x17a)]=-0x1]='UNRECOGNIZED',_0x59e69d))(v||{});function _0x361b(){const _0x2b5e44=['unitId','IThreadCommentDataSourceService','_init','customRanges','defineProperty','syncUpdateMutationToColla','ref','reply','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','/add','error','ThreadCommentModel','size','resolveComment','_threadCommentDataSource','updateComment','createTimestamp','330474VGRbXF','Disposable','_config','pluginName','getUnit','54VTFVhi','UniverLicensePlugin','1486920zpOsmr','addUser','subscribe','user','forEach','type','_configService','setConfig','UserManagerService','toStringTag','_sessionService','post','delete','CustomRangeType','_userService','/delete','parse','COMMENT','615252RSTUQN','CollaborationSessionService','rangeType','UniverThreadCommentDataSourcePlugin','/reply','Edit','/universer-api/user/list','CommentService','getUser','Reply','find','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','payload','Plugin','getOwnPropertyDescriptor','_threadCommentDataSourceService','solved','getMemberID','replyId','2469159kGeSTq','1255288gYgemx','listComments','onReady','commentUpdate$','values','resolved','merge','disposeWithMe','content','Add','Injector','getCurrentUser','dataSource','OpenOrReOpen','code','IConfigService','bufferTime','Solve','Solved','stringify','threadId','userID','/universer-api/comment/unit/','_commentService','root','/edit','getComment','2389800kZaJPf','UniverThreadCommentUIPlugin','DependentOn','_initUserSync','deleteComment','requireSession','_httpService','187164uGhpdf','filter','length','addComment','get','rangeId','_injector','15OhihrX','Inject','personId','Module','/solved','Delete','users','dayjs','comment','_threadCommentModel','userId','body','comments','format','_initDataSource','add','HTTPService','/list'];_0x361b=function(){return _0x2b5e44;};return _0x361b();}const f=_0x11c072=>c[_0x1e9314(0x167)](new Date(+_0x11c072))[_0x1e9314(0x16d)](_0x1e9314(0x17b)),R=async(_0x1a9db0,_0x49001f)=>{const _0x3fb6a3=_0x1e9314,_0x3cf243=_0x1a9db0['get'](c[_0x3fb6a3(0x117)]),_0x723248=_0x1a9db0['get'](P[_0x3fb6a3(0x170)]);_0x49001f[_0x3fb6a3(0x113)](_0x5d4083=>{const _0x6698b=_0x3fb6a3;_0x3cf243[_0x6698b(0x129)](_0x5d4083)&&_0x49001f[_0x6698b(0x11b)](_0x5d4083);}),_0x49001f[_0x3fb6a3(0x103)]&&(await _0x723248['get'](_0x3fb6a3(0x127),{'params':{'userIDs':[..._0x49001f]}}))[_0x3fb6a3(0x16b)][_0x3fb6a3(0x166)]['forEach'](_0x2d17ea=>{const _0x5ef07e=_0x3fb6a3;_0x2d17ea&&_0x3cf243[_0x5ef07e(0x110)](_0x2d17ea);});};var $=Object[_0x1e9314(0x131)],E=(_0x277d53,_0x4059f5,_0x25497e,_0x4e01ce)=>{const _0x44b582=_0x1e9314;for(var _0x309280=_0x4e01ce>0x1?void 0x0:_0x4e01ce?$(_0x4059f5,_0x25497e):_0x4059f5,_0x239c95=_0x277d53[_0x44b582(0x15b)]-0x1,_0x3dccd1;_0x239c95>=0x0;_0x239c95--)(_0x3dccd1=_0x277d53[_0x239c95])&&(_0x309280=_0x3dccd1(_0x309280)||_0x309280);return _0x309280;},S=(_0x1deb17,_0x550c41)=>(_0x5cd719,_0x52dd6b)=>_0x550c41(_0x5cd719,_0x52dd6b,_0x1deb17);let p=class extends c['Disposable']{constructor(_0x168490,_0x2eb82e,_0x5b667e,_0x56a0c6){const _0x226415=_0x1e9314;super(),this['_commentService']=_0x168490,this['_threadCommentModel']=_0x2eb82e,this['_userService']=_0x5b667e,this[_0x226415(0x15f)]=_0x56a0c6,this[_0x226415(0x174)](),this['_initUserSync']();}[_0x1e9314(0x155)](){const _0x214f82=_0x1e9314;this[_0x214f82(0x13e)](this[_0x214f82(0x169)][_0x214f82(0x13a)]['pipe'](w[_0x214f82(0x147)](0x10))[_0x214f82(0x111)](_0x79a2ac=>{const _0x346ee6=_0x214f82,_0x18cee4=new Set();_0x79a2ac[_0x346ee6(0x113)](_0x2fdf93=>{const _0x2ad8a6=_0x346ee6;switch(_0x2fdf93[_0x2ad8a6(0x114)]){case _0x2ad8a6(0x16f):{const _0x564a96=_0x2fdf93[_0x2ad8a6(0x12f)][_0x2ad8a6(0x162)];_0x18cee4[_0x2ad8a6(0x16f)](_0x564a96);break;}}}),R(this[_0x346ee6(0x15f)],_0x18cee4);}));}[_0x1e9314(0x174)](){const _0x2ad317=_0x1e9314;this[_0x2ad317(0x13e)](this[_0x2ad317(0x14e)][_0x2ad317(0x13a)]['subscribe'](async _0x313fc=>{const _0x575d42=_0x2ad317;var _0x59c769,_0x5a0af7,_0x3c7571,_0x25e750;const _0x1a6435=(_0x59c769=this[_0x575d42(0x169)]['getUnit'](_0x313fc[_0x575d42(0x172)])[_0x575d42(0x12b)](_0x41e380=>_0x41e380[_0x575d42(0x14b)]===_0x313fc['threadId']))==null?void 0x0:_0x59c769[_0x575d42(0x14f)];if(!_0x1a6435)return;const {unitId:_0x1c96c1,subUnitId:_0xd22d7a}=_0x1a6435;switch(_0x313fc[_0x575d42(0x112)]&&this[_0x575d42(0x11d)][_0x575d42(0x110)](_0x313fc[_0x575d42(0x112)]),_0x313fc[_0x575d42(0x114)]){case v[_0x575d42(0x140)]:break;case v[_0x575d42(0x12a)]:{this[_0x575d42(0x169)][_0x575d42(0x15c)](_0x1c96c1,_0xd22d7a,{'unitId':_0x1c96c1,'subUnitId':_0xd22d7a,'ref':'','id':_0x313fc[_0x575d42(0x135)],'dT':f(+_0x313fc[_0x575d42(0x107)]),'threadId':_0x313fc['threadId'],'personId':(_0x3c7571=(_0x5a0af7=_0x313fc[_0x575d42(0x112)])==null?void 0x0:_0x5a0af7['userID'])!=null?_0x3c7571:_0x313fc['userId'],'text':JSON[_0x575d42(0x11f)](_0x313fc[_0x575d42(0x13f)]),'parentId':_0x1a6435['id']});break;}case v[_0x575d42(0x165)]:{const _0x45d0af=this[_0x575d42(0x169)][_0x575d42(0x151)](_0x1c96c1,_0xd22d7a,_0x313fc[_0x575d42(0x135)]);_0x45d0af&&_0x45d0af['parentId']&&this['_threadCommentModel'][_0x575d42(0x156)](_0x1c96c1,_0xd22d7a,_0x313fc[_0x575d42(0x135)]);break;}case v[_0x575d42(0x126)]:{this['_threadCommentModel'][_0x575d42(0x106)](_0x1c96c1,_0xd22d7a,{'commentId':_0x313fc[_0x575d42(0x135)],'text':JSON[_0x575d42(0x11f)](_0x313fc[_0x575d42(0x13f)])});break;}case v[_0x575d42(0x148)]:{const _0x21484e=(_0x25e750=this[_0x575d42(0x169)][_0x575d42(0x10c)](_0x313fc['unitId'])[_0x575d42(0x12b)](_0x598ef0=>_0x598ef0[_0x575d42(0x14b)]===_0x313fc['threadId']))==null?void 0x0:_0x25e750[_0x575d42(0x14f)];_0x21484e&&this[_0x575d42(0x169)][_0x575d42(0x104)](_0x1c96c1,_0xd22d7a,_0x21484e['id'],_0x313fc['solved']===I[_0x575d42(0x149)]);break;}}}));}};p=E([S(0x0,c[_0x1e9314(0x161)](b[_0x1e9314(0x128)])),S(0x1,c[_0x1e9314(0x161)](M[_0x1e9314(0x102)])),S(0x2,c[_0x1e9314(0x161)](c[_0x1e9314(0x117)])),S(0x3,c['Inject'](c[_0x1e9314(0x141)]))],p);const q='thread-comment-data-source.config',D={};function _0x5e46(_0x703422,_0x1222bb){const _0x361b1c=_0x361b();return _0x5e46=function(_0x5e464b,_0x101627){_0x5e464b=_0x5e464b-0x101;let _0x52190c=_0x361b1c[_0x5e464b];return _0x52190c;},_0x5e46(_0x703422,_0x1222bb);}var A=Object[_0x1e9314(0x131)],x=(_0x5bb9fd,_0x182c85,_0x29efe6,_0x540375)=>{const _0x48174f=_0x1e9314;for(var _0x152e8c=_0x540375>0x1?void 0x0:_0x540375?A(_0x182c85,_0x29efe6):_0x182c85,_0x3452a3=_0x5bb9fd[_0x48174f(0x15b)]-0x1,_0x15c249;_0x3452a3>=0x0;_0x3452a3--)(_0x15c249=_0x5bb9fd[_0x3452a3])&&(_0x152e8c=_0x15c249(_0x152e8c)||_0x152e8c);return _0x152e8c;},_=(_0x451dde,_0x23c884)=>(_0x3b305e,_0x13e2a8)=>_0x23c884(_0x3b305e,_0x13e2a8,_0x451dde);function Y(_0x31fcbc,_0x325e65){const _0x2ccb0d=_0x1e9314,_0x20904a=_0x31fcbc[_0x2ccb0d(0x12c)][0x0];return{..._0x325e65,'id':_0x20904a['replyId'],'resolved':_0x31fcbc[_0x2ccb0d(0x133)]===0x1,'dT':f(_0x20904a[_0x2ccb0d(0x107)]),'personId':_0x20904a[_0x2ccb0d(0x16a)],'threadId':_0x20904a[_0x2ccb0d(0x14b)]};}function G(_0x495cb5,_0x32700c,_0x2f965f){const _0x3161ef=_0x1e9314;var _0x26a3f4,_0x3578b5;if(((_0x3578b5=(_0x26a3f4=_0x495cb5==null?void 0x0:_0x495cb5[_0x3161ef(0x12c)])==null?void 0x0:_0x26a3f4[_0x3161ef(0x15b)])!=null?_0x3578b5:0x0)>0x0){const _0x131d98=(_0x4d1d2f,_0x1c2e85)=>({'id':_0x4d1d2f['replyId'],'threadId':_0x4d1d2f[_0x3161ef(0x14b)],'dT':f(_0x4d1d2f[_0x3161ef(0x107)]),'personId':_0x4d1d2f[_0x3161ef(0x16a)],'resolved':_0x495cb5[_0x3161ef(0x133)]===I[_0x3161ef(0x149)],'unitId':_0x32700c,'subUnitId':_0x2f965f,'text':JSON['parse'](_0x4d1d2f[_0x3161ef(0x13f)]),'parentId':_0x1c2e85}),_0x50a9e8=_0x131d98(_0x495cb5[_0x3161ef(0x12c)][0x0]);return{..._0x50a9e8,'children':_0x495cb5[_0x3161ef(0x12c)]['slice'](0x1)[_0x3161ef(0x12e)](_0x1adb2c=>_0x131d98(_0x1adb2c,_0x50a9e8['id']))};}return null;}let g=class{constructor(_0x43fd45,_0x19efc9,_0x1b6283,_0x1de839){const _0x53f835=_0x1e9314;this[_0x53f835(0x158)]=_0x43fd45,this['_userService']=_0x19efc9,this['_sessionService']=_0x1b6283,this['_injector']=_0x1de839;}async[_0x1e9314(0x15c)](_0x34bfa7){const _0x5729e0=_0x1e9314;var _0x3e943a,_0x346153;const {parentId:_0x3ba379,unitId:_0x2d8a91,text:_0x2baf1a,threadId:_0xdf2e29}=_0x34bfa7,_0x5a68e4=(_0x346153=(_0x3e943a=_0x2baf1a[_0x5729e0(0x175)])==null?void 0x0:_0x3e943a[_0x5729e0(0x15a)](_0x406dd9=>_0x406dd9[_0x5729e0(0x123)]===c[_0x5729e0(0x11c)][_0x5729e0(0x120)])['map'](_0x459204=>_0x459204[_0x5729e0(0x15e)]))!=null?_0x346153:[],_0x1a009a=JSON[_0x5729e0(0x14a)](_0x2baf1a),_0x4fe5ed=(await this[_0x5729e0(0x119)][_0x5729e0(0x157)](_0x2d8a91))[_0x5729e0(0x134)]();if(_0x3ba379){const _0x4b6451={'memberId':_0x4fe5ed,'unitId':_0x2d8a91,'content':_0x1a009a,'mention':_0x5a68e4,'threadId':_0xdf2e29},_0x5f2120=(await this[_0x5729e0(0x158)][_0x5729e0(0x11a)](_0x5729e0(0x14d)+_0x2d8a91+_0x5729e0(0x125),{'body':_0x4b6451}))[_0x5729e0(0x16b)][_0x5729e0(0x179)];return{..._0x34bfa7,'id':_0x5f2120['replyId'],'dT':c[_0x5729e0(0x167)](+_0x5f2120['createTimestamp'])[_0x5729e0(0x16d)](_0x5729e0(0x17b)),'personId':_0x5f2120[_0x5729e0(0x16a)]};}else{const _0x574e4d={'memberId':_0x4fe5ed,'unitId':_0x2d8a91,'content':_0x1a009a,'mention':_0x5a68e4},_0x2def8f=await this[_0x5729e0(0x158)][_0x5729e0(0x11a)](_0x5729e0(0x14d)+_0x2d8a91+_0x5729e0(0x17c),{'body':_0x574e4d});return Y(_0x2def8f[_0x5729e0(0x16b)][_0x5729e0(0x168)],_0x34bfa7);}}async['updateComment'](_0x2c8b22){const _0x424515=_0x1e9314;var _0x476746,_0x345e05;const {text:_0xc23e54,unitId:_0x2f54fc}=_0x2c8b22,_0x19e6d3=(_0x345e05=(_0x476746=_0xc23e54['customRanges'])==null?void 0x0:_0x476746[_0x424515(0x15a)](_0x47b28f=>_0x47b28f['rangeType']===c[_0x424515(0x11c)][_0x424515(0x120)])[_0x424515(0x12e)](_0x5089f7=>_0x5089f7[_0x424515(0x15e)]))!=null?_0x345e05:[],_0x5b511d=JSON['stringify'](_0xc23e54),_0x11d3d6=_0x2c8b22['threadId'],_0x285f34=_0x2c8b22['id'],_0x3ff0a1={'memberId':(await this[_0x424515(0x119)]['requireSession'](_0x2f54fc))[_0x424515(0x134)](),'unitId':_0x2f54fc,'threadId':_0x11d3d6,'mention':_0x19e6d3,'content':_0x5b511d,'replyId':_0x285f34},_0x58b1bb=await this['_httpService'][_0x424515(0x11a)](_0x424515(0x14d)+_0x2f54fc+_0x424515(0x150),{'body':_0x3ff0a1});return!_0x58b1bb['body'][_0x424515(0x101)]||_0x58b1bb['body'][_0x424515(0x101)][_0x424515(0x145)]===0x1;}async['resolveComment'](_0x28562d){const _0x42ded9=_0x1e9314,{unitId:_0x58828a}=_0x28562d,_0x8ce24f=_0x28562d[_0x42ded9(0x14b)],_0x569ab5={'memberId':this[_0x42ded9(0x11d)][_0x42ded9(0x142)]()[_0x42ded9(0x14c)],'unitId':_0x58828a,'threadId':_0x8ce24f,'solved':_0x28562d[_0x42ded9(0x13c)]?I[_0x42ded9(0x149)]:I['OpenOrReOpen']},_0x488e42=await this[_0x42ded9(0x158)]['post']('/universer-api/comment/unit/'+_0x58828a+_0x42ded9(0x164),{'body':_0x569ab5});return!_0x488e42[_0x42ded9(0x16b)]['error']||_0x488e42[_0x42ded9(0x16b)][_0x42ded9(0x101)][_0x42ded9(0x145)]===0x1;}async[_0x1e9314(0x156)](_0x4c64f3,_0xd7e628,_0x148e08,_0x4a2007){const _0x216d06=_0x1e9314,_0xb4866c={'memberId':(await this['_sessionService']['requireSession'](_0x4c64f3))[_0x216d06(0x134)](),'threadId':_0x148e08,'replyId':_0x4a2007,'unitId':_0x4c64f3},_0x3df7e6=await this[_0x216d06(0x158)][_0x216d06(0x11a)](_0x216d06(0x14d)+_0x4c64f3+_0x216d06(0x11e),{'body':_0xb4866c});return!_0x3df7e6['body'][_0x216d06(0x101)]||_0x3df7e6[_0x216d06(0x16b)]['error']['code']===0x1;}async[_0x1e9314(0x138)](_0x44f603,_0x52d27c,_0x1bc3f5){const _0x3c214c=_0x1e9314,_0x3cea4e={'unitId':_0x44f603,'threadId':_0x1bc3f5},_0x1ca529=await this[_0x3c214c(0x158)][_0x3c214c(0x11a)](_0x3c214c(0x14d)+_0x44f603+_0x3c214c(0x171),{'body':_0x3cea4e}),_0xcf90b7=_0x1bc3f5[_0x3c214c(0x12e)](_0x2c8fbb=>G(_0x1ca529[_0x3c214c(0x16b)][_0x3c214c(0x16c)][_0x2c8fbb],_0x44f603,_0x52d27c))[_0x3c214c(0x15a)](Boolean);return Object[_0x3c214c(0x13b)](_0x1ca529['body'][_0x3c214c(0x166)])[_0x3c214c(0x113)](_0x413bb5=>{const _0x5639dc=_0x3c214c;this['_userService'][_0x5639dc(0x110)](_0x413bb5);}),_0xcf90b7;}['saveCommentToSnapshot'](_0x58fa41){const _0x35c243=_0x1e9314;return{'id':_0x58fa41['id'],'threadId':_0x58fa41[_0x35c243(0x14b)],'ref':_0x58fa41[_0x35c243(0x178)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x1e9314(0x161)](c[_0x1e9314(0x117)])),_(0x2,c[_0x1e9314(0x161)](b[_0x1e9314(0x122)])),_(0x3,c[_0x1e9314(0x161)](c[_0x1e9314(0x141)]))],g);var H=Object[_0x1e9314(0x131)],J=(_0x108360,_0x20e6ff,_0x5de8b2,_0x4612b1)=>{for(var _0x1dcb8d=_0x4612b1>0x1?void 0x0:_0x4612b1?H(_0x20e6ff,_0x5de8b2):_0x20e6ff,_0x277fc4=_0x108360['length']-0x1,_0x147591;_0x277fc4>=0x0;_0x277fc4--)(_0x147591=_0x108360[_0x277fc4])&&(_0x1dcb8d=_0x147591(_0x1dcb8d)||_0x1dcb8d);return _0x1dcb8d;},y=(_0x3b11a5,_0x40c937)=>(_0x15e444,_0x3b300)=>_0x40c937(_0x15e444,_0x3b300,_0x3b11a5);let C=class extends c[_0x1e9314(0x109)]{constructor(_0x372c23,_0xadee69){const _0x3fb0c9=_0x1e9314;super(),this[_0x3fb0c9(0x132)]=_0x372c23,this['_threadCommentDataSource']=_0xadee69,this[_0x3fb0c9(0x16e)]();}[_0x1e9314(0x16e)](){const _0x114202=_0x1e9314;this[_0x114202(0x132)][_0x114202(0x143)]=this[_0x114202(0x105)],this[_0x114202(0x132)][_0x114202(0x177)]=!0x1;}};C=J([y(0x0,M[_0x1e9314(0x173)]),y(0x1,c[_0x1e9314(0x161)](g))],C);var F=Object[_0x1e9314(0x176)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5b730d,_0x3eabf9,_0x4932ba)=>_0x3eabf9 in _0x5b730d?F(_0x5b730d,_0x3eabf9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4932ba}):_0x5b730d[_0x3eabf9]=_0x4932ba,W=(_0x5b2431,_0x112437,_0x2091a9,_0x4d53ce)=>{for(var _0x159d67=_0x4d53ce>0x1?void 0x0:_0x4d53ce?L(_0x112437,_0x2091a9):_0x112437,_0x37459a=_0x5b2431['length']-0x1,_0x3e93bf;_0x37459a>=0x0;_0x37459a--)(_0x3e93bf=_0x5b2431[_0x37459a])&&(_0x159d67=_0x3e93bf(_0x159d67)||_0x159d67);return _0x159d67;},O=(_0x52e4d2,_0x3a7278)=>(_0x55e56d,_0x1373e1)=>_0x3a7278(_0x55e56d,_0x1373e1,_0x52e4d2),N=(_0x1b026e,_0x2c1c43,_0x2188fe)=>Z(_0x1b026e,typeof _0x2c1c43!='symbol'?_0x2c1c43+'':_0x2c1c43,_0x2188fe);exports[_0x1e9314(0x124)]=class extends c[_0x1e9314(0x130)]{constructor(_0x2d1009=D,_0x32c2de,_0x463977){const _0x1096bd=_0x1e9314;super(),this[_0x1096bd(0x10a)]=_0x2d1009,this[_0x1096bd(0x15f)]=_0x32c2de,this[_0x1096bd(0x115)]=_0x463977;const {..._0x454c70}=c[_0x1096bd(0x13d)]({},D,this[_0x1096bd(0x10a)]);this[_0x1096bd(0x115)][_0x1096bd(0x116)](q,_0x454c70);}['onStarting'](){const _0x27d8a0=_0x1e9314;[[g],[C],[p]][_0x27d8a0(0x113)](_0x563cac=>{const _0x4db930=_0x27d8a0;this[_0x4db930(0x15f)][_0x4db930(0x16f)](_0x563cac);});}[_0x1e9314(0x139)](){const _0x8b67ce=_0x1e9314;this['_injector'][_0x8b67ce(0x15d)](C),this[_0x8b67ce(0x15f)]['get'](p);}},N(exports[_0x1e9314(0x124)],_0x1e9314(0x10b),U),N(exports[_0x1e9314(0x124)],'type',c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x1e9314(0x124)]=W([c[_0x1e9314(0x154)](j[_0x1e9314(0x153)],b['UniverCollaborationClientPlugin'],T[_0x1e9314(0x10e)]),O(0x1,c[_0x1e9314(0x161)](c['Injector'])),O(0x2,c[_0x1e9314(0x146)])],exports[_0x1e9314(0x124)]);
1
+ 'use strict';const _0xbafa75=_0x4e7e;(function(_0x1ac6bb,_0x3bc651){const _0x2709d4=_0x4e7e,_0x3d623c=_0x1ac6bb();while(!![]){try{const _0x36e050=parseInt(_0x2709d4(0x1c6))/0x1*(parseInt(_0x2709d4(0x1f8))/0x2)+parseInt(_0x2709d4(0x1fe))/0x3*(-parseInt(_0x2709d4(0x1ea))/0x4)+parseInt(_0x2709d4(0x1c4))/0x5+parseInt(_0x2709d4(0x1f2))/0x6+-parseInt(_0x2709d4(0x1fa))/0x7+-parseInt(_0x2709d4(0x207))/0x8+parseInt(_0x2709d4(0x1b0))/0x9;if(_0x36e050===_0x3bc651)break;else _0x3d623c['push'](_0x3d623c['shift']());}catch(_0x3ff825){_0x3d623c['push'](_0x3d623c['shift']());}}}(_0x5c09,0xafa32));function _0x5c09(){const _0x319448=['/universer-api/comment/unit/','addComment','/universer-api/user/list','1338706fGUwPu','getCurrentUser','3507287hYMcdo','length','bufferTime','getOwnPropertyDescriptor','328191RfiOWl','/solved','body','merge','onReady','get','YYYY/MM/DD\x20HH:mm','setConfig','_initUserSync','6670488mdwWsS','UniverCollaborationClientPlugin','IThreadCommentDataSourceService','Edit','updateComment','COMMENT','Delete','Unknown','personId','content','syncUpdateMutationToColla','error','_threadCommentDataSourceService','Plugin','getComment','threadId','thread-comment-data-source.config','stringify','HTTPService','user','deleteComment','requireSession','pipe','delete','UniverLicensePlugin','users','_injector','DependentOn','subscribe','Injector','post','8783415fsDqCw','symbol','userID','slice','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','replyId','_commentService','type','disposeWithMe','reply','getMemberID','Disposable','/edit','parse','ref','comment','_httpService','format','Module','714475ECatFq','solved','1WTObUm','_userService','resolved','/list','CustomRangeType','comments','UniverThreadCommentDataSourcePlugin','find','dayjs','toStringTag','Inject','customRanges','add','_init','code','_threadCommentModel','defineProperty','UniverThreadCommentUIPlugin','dataSource','UNRECOGNIZED','/add','getUnit','_configService','resolveComment','map','Solved','unitId','_threadCommentDataSource','createTimestamp','values','_sessionService','root','filter','addUser','Reply','Solve','8iDTSlI','saveCommentToSnapshot','_initDataSource','OpenOrReOpen','userId','forEach','ThreadCommentModel','replies','2909238fZdHpP','getUser','UserManagerService'];_0x5c09=function(){return _0x319448;};return _0x5c09();}Object[_0xbafa75(0x1d6)](exports,Symbol[_0xbafa75(0x1cf)],{'value':_0xbafa75(0x1c3)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0xbafa75(0x1b4);var I=(_0x52e5a7=>(_0x52e5a7[_0x52e5a7[_0xbafa75(0x1ed)]=0x0]=_0xbafa75(0x1ed),_0x52e5a7[_0x52e5a7[_0xbafa75(0x1df)]=0x1]=_0xbafa75(0x1df),_0x52e5a7[_0x52e5a7[_0xbafa75(0x1d9)]=-0x1]=_0xbafa75(0x1d9),_0x52e5a7))(I||{}),v=(_0x750e3d=>(_0x750e3d[_0x750e3d[_0xbafa75(0x20e)]=0x0]=_0xbafa75(0x20e),_0x750e3d[_0x750e3d['Add']=0x1]='Add',_0x750e3d[_0x750e3d[_0xbafa75(0x1e8)]=0x2]=_0xbafa75(0x1e8),_0x750e3d[_0x750e3d[_0xbafa75(0x20a)]=0x3]=_0xbafa75(0x20a),_0x750e3d[_0x750e3d[_0xbafa75(0x20d)]=0x4]='Delete',_0x750e3d[_0x750e3d[_0xbafa75(0x1e9)]=0x5]='Solve',_0x750e3d[_0x750e3d[_0xbafa75(0x1d9)]=-0x1]=_0xbafa75(0x1d9),_0x750e3d))(v||{});const f=_0xc1fcb4=>c['dayjs'](new Date(+_0xc1fcb4))[_0xbafa75(0x1c2)](_0xbafa75(0x204)),R=async(_0x413a95,_0x467491)=>{const _0x41f51f=_0xbafa75,_0x2b1e4d=_0x413a95[_0x41f51f(0x203)](c[_0x41f51f(0x1f4)]),_0x2bcc2a=_0x413a95[_0x41f51f(0x203)](P['HTTPService']);_0x467491[_0x41f51f(0x1ef)](_0x1a970c=>{const _0x1c1151=_0x41f51f;_0x2b1e4d[_0x1c1151(0x1f3)](_0x1a970c)&&_0x467491[_0x1c1151(0x21e)](_0x1a970c);}),_0x467491['size']&&(await _0x2bcc2a[_0x41f51f(0x203)](_0x41f51f(0x1f7),{'params':{'userIDs':[..._0x467491]}}))[_0x41f51f(0x200)]['users'][_0x41f51f(0x1ef)](_0x4b45dc=>{_0x4b45dc&&_0x2b1e4d['addUser'](_0x4b45dc);});};var $=Object[_0xbafa75(0x1fd)],E=(_0x4b6377,_0x57c27c,_0x1fadc8,_0x7455e0)=>{const _0x5e7b09=_0xbafa75;for(var _0x3c7d2b=_0x7455e0>0x1?void 0x0:_0x7455e0?$(_0x57c27c,_0x1fadc8):_0x57c27c,_0x1dbbd4=_0x4b6377[_0x5e7b09(0x1fb)]-0x1,_0x3b91af;_0x1dbbd4>=0x0;_0x1dbbd4--)(_0x3b91af=_0x4b6377[_0x1dbbd4])&&(_0x3c7d2b=_0x3b91af(_0x3c7d2b)||_0x3c7d2b);return _0x3c7d2b;},S=(_0x43a5b9,_0x520431)=>(_0x4dbcfd,_0x15e9cd)=>_0x520431(_0x4dbcfd,_0x15e9cd,_0x43a5b9);let p=class extends c['Disposable']{constructor(_0x2c548d,_0x131167,_0x39d568,_0x1e70dd){const _0x336bbc=_0xbafa75;super(),this[_0x336bbc(0x1b7)]=_0x2c548d,this[_0x336bbc(0x1d5)]=_0x131167,this[_0x336bbc(0x1c7)]=_0x39d568,this['_injector']=_0x1e70dd,this[_0x336bbc(0x1d3)](),this[_0x336bbc(0x206)]();}[_0xbafa75(0x206)](){const _0xeeb2ea=_0xbafa75;this[_0xeeb2ea(0x1b9)](this[_0xeeb2ea(0x1d5)]['commentUpdate$'][_0xeeb2ea(0x21d)](w[_0xeeb2ea(0x1fc)](0x10))[_0xeeb2ea(0x223)](_0x35263b=>{const _0x535785=_0xeeb2ea,_0x553401=new Set();_0x35263b[_0x535785(0x1ef)](_0x353349=>{const _0x4df454=_0x535785;switch(_0x353349[_0x4df454(0x1b8)]){case _0x4df454(0x1d2):{const _0x38a98c=_0x353349['payload'][_0x4df454(0x20f)];_0x553401[_0x4df454(0x1d2)](_0x38a98c);break;}}}),R(this[_0x535785(0x221)],_0x553401);}));}[_0xbafa75(0x1d3)](){const _0x4eac4d=_0xbafa75;this[_0x4eac4d(0x1b9)](this['_commentService']['commentUpdate$'][_0x4eac4d(0x223)](async _0x1bc851=>{const _0x48aeb4=_0x4eac4d;var _0x580318,_0x40c3ed,_0xb7e349,_0x42a7b6;const _0x31bdaf=(_0x580318=this[_0x48aeb4(0x1d5)][_0x48aeb4(0x1db)](_0x1bc851['unitId'])['find'](_0x513b40=>_0x513b40[_0x48aeb4(0x216)]===_0x1bc851[_0x48aeb4(0x216)]))==null?void 0x0:_0x580318[_0x48aeb4(0x1e5)];if(!_0x31bdaf)return;const {unitId:_0x3eddb6,subUnitId:_0x6f4c43}=_0x31bdaf;switch(_0x1bc851[_0x48aeb4(0x21a)]&&this[_0x48aeb4(0x1c7)][_0x48aeb4(0x1e7)](_0x1bc851[_0x48aeb4(0x21a)]),_0x1bc851['type']){case v['Add']:break;case v['Reply']:{this[_0x48aeb4(0x1d5)][_0x48aeb4(0x1f6)](_0x3eddb6,_0x6f4c43,{'unitId':_0x3eddb6,'subUnitId':_0x6f4c43,'ref':'','id':_0x1bc851[_0x48aeb4(0x1b6)],'dT':f(+_0x1bc851[_0x48aeb4(0x1e2)]),'threadId':_0x1bc851[_0x48aeb4(0x216)],'personId':(_0xb7e349=(_0x40c3ed=_0x1bc851[_0x48aeb4(0x21a)])==null?void 0x0:_0x40c3ed['userID'])!=null?_0xb7e349:_0x1bc851[_0x48aeb4(0x1ee)],'text':JSON[_0x48aeb4(0x1be)](_0x1bc851['content']),'parentId':_0x31bdaf['id']});break;}case v['Delete']:{const _0x434f62=this[_0x48aeb4(0x1d5)][_0x48aeb4(0x215)](_0x3eddb6,_0x6f4c43,_0x1bc851[_0x48aeb4(0x1b6)]);_0x434f62&&_0x434f62['parentId']&&this[_0x48aeb4(0x1d5)][_0x48aeb4(0x21b)](_0x3eddb6,_0x6f4c43,_0x1bc851[_0x48aeb4(0x1b6)]);break;}case v[_0x48aeb4(0x20a)]:{this[_0x48aeb4(0x1d5)][_0x48aeb4(0x20b)](_0x3eddb6,_0x6f4c43,{'commentId':_0x1bc851['replyId'],'text':JSON[_0x48aeb4(0x1be)](_0x1bc851[_0x48aeb4(0x210)])});break;}case v[_0x48aeb4(0x1e9)]:{const _0x4b69d3=(_0x42a7b6=this[_0x48aeb4(0x1d5)][_0x48aeb4(0x1db)](_0x1bc851[_0x48aeb4(0x1e0)])[_0x48aeb4(0x1cd)](_0x143784=>_0x143784[_0x48aeb4(0x216)]===_0x1bc851[_0x48aeb4(0x216)]))==null?void 0x0:_0x42a7b6[_0x48aeb4(0x1e5)];_0x4b69d3&&this['_threadCommentModel'][_0x48aeb4(0x1dd)](_0x3eddb6,_0x6f4c43,_0x4b69d3['id'],_0x1bc851[_0x48aeb4(0x1c5)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0xbafa75(0x1d0)](M[_0xbafa75(0x1f0)])),S(0x2,c[_0xbafa75(0x1d0)](c[_0xbafa75(0x1f4)])),S(0x3,c['Inject'](c[_0xbafa75(0x224)]))],p);const q=_0xbafa75(0x217),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x348770,_0x207dec,_0x462cec,_0x4d2697)=>{for(var _0x236f95=_0x4d2697>0x1?void 0x0:_0x4d2697?A(_0x207dec,_0x462cec):_0x207dec,_0x438a96=_0x348770['length']-0x1,_0x302dd9;_0x438a96>=0x0;_0x438a96--)(_0x302dd9=_0x348770[_0x438a96])&&(_0x236f95=_0x302dd9(_0x236f95)||_0x236f95);return _0x236f95;},_=(_0x3d27f5,_0x1141bb)=>(_0x17084f,_0x49eb33)=>_0x1141bb(_0x17084f,_0x49eb33,_0x3d27f5);function _0x4e7e(_0x68357e,_0x1ffce2){const _0x5c0964=_0x5c09();return _0x4e7e=function(_0x4e7e13,_0x223676){_0x4e7e13=_0x4e7e13-0x1b0;let _0x4ab7d5=_0x5c0964[_0x4e7e13];return _0x4ab7d5;},_0x4e7e(_0x68357e,_0x1ffce2);}function Y(_0x2a47ad,_0x5deb8c){const _0x211525=_0xbafa75,_0x521cf6=_0x2a47ad[_0x211525(0x1f1)][0x0];return{..._0x5deb8c,'id':_0x521cf6[_0x211525(0x1b6)],'resolved':_0x2a47ad[_0x211525(0x1c5)]===0x1,'dT':f(_0x521cf6[_0x211525(0x1e2)]),'personId':_0x521cf6[_0x211525(0x1ee)],'threadId':_0x521cf6['threadId']};}function G(_0x5994be,_0x4c44d8,_0x345f64){const _0x35456d=_0xbafa75;var _0x204b77,_0x466ad2;if(((_0x466ad2=(_0x204b77=_0x5994be==null?void 0x0:_0x5994be['replies'])==null?void 0x0:_0x204b77['length'])!=null?_0x466ad2:0x0)>0x0){const _0x3331aa=(_0x48aab0,_0x57ba5e)=>({'id':_0x48aab0[_0x35456d(0x1b6)],'threadId':_0x48aab0[_0x35456d(0x216)],'dT':f(_0x48aab0[_0x35456d(0x1e2)]),'personId':_0x48aab0[_0x35456d(0x1ee)],'resolved':_0x5994be[_0x35456d(0x1c5)]===I['Solved'],'unitId':_0x4c44d8,'subUnitId':_0x345f64,'text':JSON[_0x35456d(0x1be)](_0x48aab0[_0x35456d(0x210)]),'parentId':_0x57ba5e}),_0x38654=_0x3331aa(_0x5994be[_0x35456d(0x1f1)][0x0]);return{..._0x38654,'children':_0x5994be[_0x35456d(0x1f1)][_0x35456d(0x1b3)](0x1)['map'](_0x45e5bf=>_0x3331aa(_0x45e5bf,_0x38654['id']))};}return null;}let g=class{constructor(_0x275958,_0x404fb2,_0xe63467,_0x2f2f57){const _0x300520=_0xbafa75;this['_httpService']=_0x275958,this[_0x300520(0x1c7)]=_0x404fb2,this[_0x300520(0x1e4)]=_0xe63467,this[_0x300520(0x221)]=_0x2f2f57;}async[_0xbafa75(0x1f6)](_0x8ce363){const _0x2f2220=_0xbafa75;var _0x511feb,_0x5a806d;const {parentId:_0x2d2f65,unitId:_0x199afd,text:_0x1415e0,threadId:_0x214a92}=_0x8ce363,_0x36ba48=(_0x5a806d=(_0x511feb=_0x1415e0[_0x2f2220(0x1d1)])==null?void 0x0:_0x511feb[_0x2f2220(0x1e6)](_0x30a650=>_0x30a650['rangeType']===c[_0x2f2220(0x1ca)]['COMMENT'])[_0x2f2220(0x1de)](_0x5a81ff=>_0x5a81ff['rangeId']))!=null?_0x5a806d:[],_0x5141fe=JSON[_0x2f2220(0x218)](_0x1415e0),_0x3213cb=(await this['_sessionService'][_0x2f2220(0x21c)](_0x199afd))[_0x2f2220(0x1bb)]();if(_0x2d2f65){const _0x4e8156={'memberId':_0x3213cb,'unitId':_0x199afd,'content':_0x5141fe,'mention':_0x36ba48,'threadId':_0x214a92},_0x4f9529=(await this[_0x2f2220(0x1c1)]['post'](_0x2f2220(0x1f5)+_0x199afd+'/reply',{'body':_0x4e8156}))[_0x2f2220(0x200)][_0x2f2220(0x1ba)];return{..._0x8ce363,'id':_0x4f9529[_0x2f2220(0x1b6)],'dT':c[_0x2f2220(0x1ce)](+_0x4f9529[_0x2f2220(0x1e2)])[_0x2f2220(0x1c2)](_0x2f2220(0x204)),'personId':_0x4f9529[_0x2f2220(0x1ee)]};}else{const _0x42a5f1={'memberId':_0x3213cb,'unitId':_0x199afd,'content':_0x5141fe,'mention':_0x36ba48},_0x41b297=await this[_0x2f2220(0x1c1)][_0x2f2220(0x225)](_0x2f2220(0x1f5)+_0x199afd+_0x2f2220(0x1da),{'body':_0x42a5f1});return Y(_0x41b297[_0x2f2220(0x200)][_0x2f2220(0x1c0)],_0x8ce363);}}async[_0xbafa75(0x20b)](_0x149ada){const _0x50c326=_0xbafa75;var _0x58959d,_0x48e04c;const {text:_0x2d8eb7,unitId:_0x2bef8d}=_0x149ada,_0x4db81=(_0x48e04c=(_0x58959d=_0x2d8eb7[_0x50c326(0x1d1)])==null?void 0x0:_0x58959d[_0x50c326(0x1e6)](_0x29ce07=>_0x29ce07['rangeType']===c[_0x50c326(0x1ca)][_0x50c326(0x20c)])['map'](_0x21ea97=>_0x21ea97['rangeId']))!=null?_0x48e04c:[],_0x4ac806=JSON['stringify'](_0x2d8eb7),_0x4d3bc0=_0x149ada[_0x50c326(0x216)],_0x493e4e=_0x149ada['id'],_0x375d30={'memberId':(await this[_0x50c326(0x1e4)][_0x50c326(0x21c)](_0x2bef8d))[_0x50c326(0x1bb)](),'unitId':_0x2bef8d,'threadId':_0x4d3bc0,'mention':_0x4db81,'content':_0x4ac806,'replyId':_0x493e4e},_0x3c0ca8=await this[_0x50c326(0x1c1)][_0x50c326(0x225)]('/universer-api/comment/unit/'+_0x2bef8d+_0x50c326(0x1bd),{'body':_0x375d30});return!_0x3c0ca8['body'][_0x50c326(0x212)]||_0x3c0ca8['body']['error'][_0x50c326(0x1d4)]===0x1;}async['resolveComment'](_0x592adb){const _0x2b8c53=_0xbafa75,{unitId:_0xd8086}=_0x592adb,_0x3acb21=_0x592adb[_0x2b8c53(0x216)],_0x29ac2b={'memberId':this[_0x2b8c53(0x1c7)][_0x2b8c53(0x1f9)]()[_0x2b8c53(0x1b2)],'unitId':_0xd8086,'threadId':_0x3acb21,'solved':_0x592adb[_0x2b8c53(0x1c8)]?I[_0x2b8c53(0x1df)]:I[_0x2b8c53(0x1ed)]},_0xe7c0c6=await this[_0x2b8c53(0x1c1)][_0x2b8c53(0x225)](_0x2b8c53(0x1f5)+_0xd8086+_0x2b8c53(0x1ff),{'body':_0x29ac2b});return!_0xe7c0c6[_0x2b8c53(0x200)]['error']||_0xe7c0c6[_0x2b8c53(0x200)][_0x2b8c53(0x212)][_0x2b8c53(0x1d4)]===0x1;}async[_0xbafa75(0x21b)](_0x398629,_0x5df622,_0x4a2256,_0x510288){const _0x470f65=_0xbafa75,_0x25bb3e={'memberId':(await this[_0x470f65(0x1e4)][_0x470f65(0x21c)](_0x398629))[_0x470f65(0x1bb)](),'threadId':_0x4a2256,'replyId':_0x510288,'unitId':_0x398629},_0x131534=await this['_httpService'][_0x470f65(0x225)](_0x470f65(0x1f5)+_0x398629+'/delete',{'body':_0x25bb3e});return!_0x131534[_0x470f65(0x200)][_0x470f65(0x212)]||_0x131534[_0x470f65(0x200)]['error'][_0x470f65(0x1d4)]===0x1;}async['listComments'](_0x363647,_0x3db533,_0x2e2a23){const _0x299382=_0xbafa75,_0xf1254a={'unitId':_0x363647,'threadId':_0x2e2a23},_0x22ba52=await this[_0x299382(0x1c1)][_0x299382(0x225)](_0x299382(0x1f5)+_0x363647+_0x299382(0x1c9),{'body':_0xf1254a}),_0x5ba63c=_0x2e2a23[_0x299382(0x1de)](_0x155565=>G(_0x22ba52['body'][_0x299382(0x1cb)][_0x155565],_0x363647,_0x3db533))[_0x299382(0x1e6)](Boolean);return Object[_0x299382(0x1e3)](_0x22ba52['body'][_0x299382(0x220)])['forEach'](_0x7bab7c=>{const _0x2e49cb=_0x299382;this[_0x2e49cb(0x1c7)][_0x2e49cb(0x1e7)](_0x7bab7c);}),_0x5ba63c;}[_0xbafa75(0x1eb)](_0x1c6675){const _0x29382b=_0xbafa75;return{'id':_0x1c6675['id'],'threadId':_0x1c6675[_0x29382b(0x216)],'ref':_0x1c6675[_0x29382b(0x1bf)]};}};g=x([_(0x0,c['Inject'](P[_0xbafa75(0x219)])),_(0x1,c['Inject'](c[_0xbafa75(0x1f4)])),_(0x2,c[_0xbafa75(0x1d0)](b['CollaborationSessionService'])),_(0x3,c[_0xbafa75(0x1d0)](c[_0xbafa75(0x224)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x2ae542,_0xe0f66b,_0x44bb57,_0x57acde)=>{const _0x274a54=_0xbafa75;for(var _0x3871d8=_0x57acde>0x1?void 0x0:_0x57acde?H(_0xe0f66b,_0x44bb57):_0xe0f66b,_0x2ea932=_0x2ae542[_0x274a54(0x1fb)]-0x1,_0x199dcc;_0x2ea932>=0x0;_0x2ea932--)(_0x199dcc=_0x2ae542[_0x2ea932])&&(_0x3871d8=_0x199dcc(_0x3871d8)||_0x3871d8);return _0x3871d8;},y=(_0x183a6d,_0x245926)=>(_0x3530b5,_0x39c741)=>_0x245926(_0x3530b5,_0x39c741,_0x183a6d);let C=class extends c[_0xbafa75(0x1bc)]{constructor(_0x3964e1,_0x58aec3){const _0x36b4de=_0xbafa75;super(),this[_0x36b4de(0x213)]=_0x3964e1,this['_threadCommentDataSource']=_0x58aec3,this['_initDataSource']();}[_0xbafa75(0x1ec)](){const _0x3a256e=_0xbafa75;this['_threadCommentDataSourceService'][_0x3a256e(0x1d8)]=this[_0x3a256e(0x1e1)],this[_0x3a256e(0x213)][_0x3a256e(0x211)]=!0x1;}};C=J([y(0x0,M[_0xbafa75(0x209)]),y(0x1,c['Inject'](g))],C);var F=Object[_0xbafa75(0x1d6)],L=Object[_0xbafa75(0x1fd)],Z=(_0xe08e0e,_0x80f52a,_0x1d61e4)=>_0x80f52a in _0xe08e0e?F(_0xe08e0e,_0x80f52a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d61e4}):_0xe08e0e[_0x80f52a]=_0x1d61e4,W=(_0x46bb2d,_0x328d0c,_0x370a4f,_0x48c7d2)=>{const _0x34f59e=_0xbafa75;for(var _0x59ccc4=_0x48c7d2>0x1?void 0x0:_0x48c7d2?L(_0x328d0c,_0x370a4f):_0x328d0c,_0x2653bd=_0x46bb2d[_0x34f59e(0x1fb)]-0x1,_0x41a4f1;_0x2653bd>=0x0;_0x2653bd--)(_0x41a4f1=_0x46bb2d[_0x2653bd])&&(_0x59ccc4=_0x41a4f1(_0x59ccc4)||_0x59ccc4);return _0x59ccc4;},O=(_0xc263a3,_0x2e8218)=>(_0x35e540,_0x611a81)=>_0x2e8218(_0x35e540,_0x611a81,_0xc263a3),N=(_0x27fd25,_0x5922c0,_0x4a9734)=>Z(_0x27fd25,typeof _0x5922c0!=_0xbafa75(0x1b1)?_0x5922c0+'':_0x5922c0,_0x4a9734);exports[_0xbafa75(0x1cc)]=class extends c[_0xbafa75(0x214)]{constructor(_0x3edf71=D,_0x3b61f1,_0x44e162){const _0xbd8aae=_0xbafa75;super(),this['_config']=_0x3edf71,this['_injector']=_0x3b61f1,this[_0xbd8aae(0x1dc)]=_0x44e162;const {..._0x8abb45}=c[_0xbd8aae(0x201)]({},D,this['_config']);this[_0xbd8aae(0x1dc)][_0xbd8aae(0x205)](q,_0x8abb45);}['onStarting'](){const _0x2da54d=_0xbafa75;[[g],[C],[p]][_0x2da54d(0x1ef)](_0x129c0c=>{const _0x268210=_0x2da54d;this[_0x268210(0x221)][_0x268210(0x1d2)](_0x129c0c);});}[_0xbafa75(0x202)](){const _0x14d737=_0xbafa75;this[_0x14d737(0x221)][_0x14d737(0x203)](C),this['_injector'][_0x14d737(0x203)](p);}},N(exports[_0xbafa75(0x1cc)],'pluginName',U),N(exports[_0xbafa75(0x1cc)],_0xbafa75(0x1b8),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0xbafa75(0x1cc)]=W([c[_0xbafa75(0x222)](j[_0xbafa75(0x1d7)],b[_0xbafa75(0x208)],T[_0xbafa75(0x21f)]),O(0x1,c['Inject'](c[_0xbafa75(0x224)])),O(0x2,c[_0xbafa75(0x1b5)])],exports[_0xbafa75(0x1cc)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x15af(_0x1519cd,_0x2e06c6){const _0x1cb5e7=_0x1cb5();return _0x15af=function(_0x15af2c,_0x5d3c68){_0x15af2c=_0x15af2c-0x1a9;let _0x1ed7ba=_0x1cb5e7[_0x15af2c];return _0x1ed7ba;},_0x15af(_0x1519cd,_0x2e06c6);}const _0x5bf03e=_0x15af;(function(_0x345d13,_0x4eb6c8){const _0x59fd78=_0x15af,_0x2f5581=_0x345d13();while(!![]){try{const _0x55b865=-parseInt(_0x59fd78(0x1c4))/0x1*(parseInt(_0x59fd78(0x1e7))/0x2)+-parseInt(_0x59fd78(0x1f3))/0x3+-parseInt(_0x59fd78(0x1a9))/0x4+parseInt(_0x59fd78(0x201))/0x5+parseInt(_0x59fd78(0x1c5))/0x6+parseInt(_0x59fd78(0x1cb))/0x7+-parseInt(_0x59fd78(0x200))/0x8;if(_0x55b865===_0x4eb6c8)break;else _0x2f5581['push'](_0x2f5581['shift']());}catch(_0x2ee43f){_0x2f5581['push'](_0x2f5581['shift']());}}}(_0x1cb5,0xd6be2));import{CommentService as _0x210c37,CollaborationSessionService as _0x220e28,UniverCollaborationClientPlugin as _0x1095dd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf4a461}from'@univerjs-pro/license';function _0x1cb5(){const _0x2331af=['Delete','forEach','getUnit','/list','commentUpdate$','defineProperty','COMMENT','UNRECOGNIZED','rangeId','size','replies','replyId','length','1245212BggkpG','resolved','add','_commentService','YYYY/MM/DD\x20HH:mm','get','_threadCommentDataSource','_httpService','UNIVER_UNKNOWN','symbol','map','values','addUser','comment','onStarting','comments','type','thread-comment-data-source.config','onReady','Solve','dataSource','_threadCommentDataSourceService','OpenOrReOpen','userID','_configService','post','updateComment','527TOcWJj','8607570ErrZfg','body','threadId','ref','Edit','_userService','1768179MNmVAH','rangeType','reply','_injector','pluginName','_initUserSync','parse','user','_init','_initDataSource','unitId','/universer-api/comment/unit/','getComment','parentId','deleteComment','solved','/edit','format','root','find','users','getMemberID','syncUpdateMutationToColla','customRanges','slice','subscribe','delete','resolveComment','382nProKU','getOwnPropertyDescriptor','Solved','content','createTimestamp','filter','code','error','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','Unknown','4299519TCVrll','getCurrentUser','requireSession','_threadCommentModel','_config','Add','/add','saveCommentToSnapshot','addComment','stringify','_sessionService','Reply','/universer-api/user/list','795960EnqPlm','5685110mJsRJb'];_0x1cb5=function(){return _0x2331af;};return _0x1cb5();}import{dayjs as _0x2bfba6,UserManagerService as _0x48dccf,Inject as _0xc780c5,Injector as _0x394220,Disposable as _0x5da964,CustomRangeType as _0x1bd652,UniverInstanceType as _0x27d52f,DependentOn as _0x5b752f,IConfigService as _0x1aa97b,Plugin as _0x4175ae,merge as _0x29f660}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ce1e2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5208a,IThreadCommentDataSourceService as _0x51bd43}from'@univerjs/thread-comment';import{bufferTime as _0x3dce6d}from'rxjs';import{HTTPService as _0x2353b4}from'@univerjs/network';const W=_0x5bf03e(0x1f0);var I=(_0x244959=>(_0x244959[_0x244959[_0x5bf03e(0x1bf)]=0x0]=_0x5bf03e(0x1bf),_0x244959[_0x244959[_0x5bf03e(0x1e9)]=0x1]=_0x5bf03e(0x1e9),_0x244959[_0x244959[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0x244959))(I||{}),v=(_0xb1669d=>(_0xb1669d[_0xb1669d[_0x5bf03e(0x1f2)]=0x0]=_0x5bf03e(0x1f2),_0xb1669d[_0xb1669d[_0x5bf03e(0x1f8)]=0x1]=_0x5bf03e(0x1f8),_0xb1669d[_0xb1669d[_0x5bf03e(0x1fe)]=0x2]=_0x5bf03e(0x1fe),_0xb1669d[_0xb1669d[_0x5bf03e(0x1c9)]=0x3]='Edit',_0xb1669d[_0xb1669d[_0x5bf03e(0x202)]=0x4]=_0x5bf03e(0x202),_0xb1669d[_0xb1669d['Solve']=0x5]=_0x5bf03e(0x1bc),_0xb1669d[_0xb1669d[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0xb1669d))(v||{});const D=_0x38cee2=>_0x2bfba6(new Date(+_0x38cee2))[_0x5bf03e(0x1dc)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1cfc19,_0x25af0b)=>{const _0x5e5260=_0x5bf03e,_0x18d93e=_0x1cfc19['get'](_0x48dccf),_0x40ee04=_0x1cfc19[_0x5e5260(0x1ae)](_0x2353b4);_0x25af0b[_0x5e5260(0x203)](_0x36f700=>{const _0xfb8e08=_0x5e5260;_0x18d93e['getUser'](_0x36f700)&&_0x25af0b[_0xfb8e08(0x1e5)](_0x36f700);}),_0x25af0b[_0x5e5260(0x20b)]&&(await _0x40ee04[_0x5e5260(0x1ae)](_0x5e5260(0x1ff),{'params':{'userIDs':[..._0x25af0b]}}))[_0x5e5260(0x1c6)][_0x5e5260(0x1df)]['forEach'](_0x5e43f0=>{const _0x46243d=_0x5e5260;_0x5e43f0&&_0x18d93e[_0x46243d(0x1b5)](_0x5e43f0);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x20bdc8,_0x37d360,_0xde6f02,_0x1616e9)=>{const _0x108a23=_0x5bf03e;for(var _0x1c5c74=_0x1616e9>0x1?void 0x0:_0x1616e9?K(_0x37d360,_0xde6f02):_0x37d360,_0xca633a=_0x20bdc8[_0x108a23(0x20e)]-0x1,_0x25bd6d;_0xca633a>=0x0;_0xca633a--)(_0x25bd6d=_0x20bdc8[_0xca633a])&&(_0x1c5c74=_0x25bd6d(_0x1c5c74)||_0x1c5c74);return _0x1c5c74;},p=(_0x312205,_0x1ee512)=>(_0xaf8f32,_0x129af2)=>_0x1ee512(_0xaf8f32,_0x129af2,_0x312205);let S=class extends _0x5da964{constructor(_0x44a03a,_0x16edca,_0x39bc82,_0x4fa082){const _0x34bce1=_0x5bf03e;super(),this[_0x34bce1(0x1ac)]=_0x44a03a,this[_0x34bce1(0x1f6)]=_0x16edca,this['_userService']=_0x39bc82,this['_injector']=_0x4fa082,this[_0x34bce1(0x1d3)](),this[_0x34bce1(0x1d0)]();}[_0x5bf03e(0x1d0)](){const _0x341f6d=_0x5bf03e;this['disposeWithMe'](this[_0x341f6d(0x1f6)][_0x341f6d(0x206)]['pipe'](_0x3dce6d(0x10))[_0x341f6d(0x1e4)](_0x377ae3=>{const _0x5754f9=_0x341f6d,_0x20e697=new Set();_0x377ae3[_0x5754f9(0x203)](_0x5a7286=>{const _0x506def=_0x5754f9;switch(_0x5a7286['type']){case _0x506def(0x1ab):{const _0x5e3632=_0x5a7286['payload']['personId'];_0x20e697[_0x506def(0x1ab)](_0x5e3632);break;}}}),B(this[_0x5754f9(0x1ce)],_0x20e697);}));}['_init'](){const _0x5a4610=_0x5bf03e;this['disposeWithMe'](this[_0x5a4610(0x1ac)][_0x5a4610(0x206)][_0x5a4610(0x1e4)](async _0xf45214=>{const _0x33bb2e=_0x5a4610;var _0x2b852c,_0x50d7a9,_0x2a5ea1,_0x25fc25;const _0x38fe38=(_0x2b852c=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])[_0x33bb2e(0x1de)](_0x393a87=>_0x393a87['threadId']===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x2b852c[_0x33bb2e(0x1dd)];if(!_0x38fe38)return;const {unitId:_0x5e09ee,subUnitId:_0x31cb78}=_0x38fe38;switch(_0xf45214[_0x33bb2e(0x1d2)]&&this['_userService'][_0x33bb2e(0x1b5)](_0xf45214[_0x33bb2e(0x1d2)]),_0xf45214[_0x33bb2e(0x1b9)]){case v['Add']:break;case v[_0x33bb2e(0x1fe)]:{this[_0x33bb2e(0x1f6)]['addComment'](_0x5e09ee,_0x31cb78,{'unitId':_0x5e09ee,'subUnitId':_0x31cb78,'ref':'','id':_0xf45214[_0x33bb2e(0x20d)],'dT':D(+_0xf45214[_0x33bb2e(0x1eb)]),'threadId':_0xf45214[_0x33bb2e(0x1c7)],'personId':(_0x2a5ea1=(_0x50d7a9=_0xf45214['user'])==null?void 0x0:_0x50d7a9[_0x33bb2e(0x1c0)])!=null?_0x2a5ea1:_0xf45214[_0x33bb2e(0x1ef)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)]),'parentId':_0x38fe38['id']});break;}case v[_0x33bb2e(0x202)]:{const _0x73e2cd=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d7)](_0x5e09ee,_0x31cb78,_0xf45214['replyId']);_0x73e2cd&&_0x73e2cd[_0x33bb2e(0x1d8)]&&this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d9)](_0x5e09ee,_0x31cb78,_0xf45214[_0x33bb2e(0x20d)]);break;}case v[_0x33bb2e(0x1c9)]:{this['_threadCommentModel'][_0x33bb2e(0x1c3)](_0x5e09ee,_0x31cb78,{'commentId':_0xf45214[_0x33bb2e(0x20d)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)])});break;}case v['Solve']:{const _0x586f1c=(_0x25fc25=this['_threadCommentModel'][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])['find'](_0x47b0ba=>_0x47b0ba[_0x33bb2e(0x1c7)]===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x25fc25[_0x33bb2e(0x1dd)];_0x586f1c&&this[_0x33bb2e(0x1f6)]['resolveComment'](_0x5e09ee,_0x31cb78,_0x586f1c['id'],_0xf45214[_0x33bb2e(0x1da)]===I[_0x33bb2e(0x1e9)]);break;}}}));}};S=V([p(0x0,_0xc780c5(_0x210c37)),p(0x1,_0xc780c5(_0x5208a)),p(0x2,_0xc780c5(_0x48dccf)),p(0x3,_0xc780c5(_0x394220))],S);const z=_0x5bf03e(0x1ba),M={};var k=Object[_0x5bf03e(0x1e8)],Q=(_0x327b80,_0x56553b,_0x4eda03,_0x4db94d)=>{const _0x2bef10=_0x5bf03e;for(var _0x5c7386=_0x4db94d>0x1?void 0x0:_0x4db94d?k(_0x56553b,_0x4eda03):_0x56553b,_0x1f6ea3=_0x327b80[_0x2bef10(0x20e)]-0x1,_0x4c936b;_0x1f6ea3>=0x0;_0x1f6ea3--)(_0x4c936b=_0x327b80[_0x1f6ea3])&&(_0x5c7386=_0x4c936b(_0x5c7386)||_0x5c7386);return _0x5c7386;},_=(_0x388db6,_0x22d905)=>(_0xd30b02,_0x393e89)=>_0x22d905(_0xd30b02,_0x393e89,_0x388db6);function X(_0x29e57f,_0x5ae59b){const _0xf84ef1=_0x5bf03e,_0x592c0f=_0x29e57f[_0xf84ef1(0x20c)][0x0];return{..._0x5ae59b,'id':_0x592c0f[_0xf84ef1(0x20d)],'resolved':_0x29e57f[_0xf84ef1(0x1da)]===0x1,'dT':D(_0x592c0f[_0xf84ef1(0x1eb)]),'personId':_0x592c0f[_0xf84ef1(0x1ef)],'threadId':_0x592c0f['threadId']};}function ee(_0x35f872,_0x29cbcc,_0x45bad0){const _0x353495=_0x5bf03e;var _0x555605,_0x1df5ef;if(((_0x1df5ef=(_0x555605=_0x35f872==null?void 0x0:_0x35f872[_0x353495(0x20c)])==null?void 0x0:_0x555605[_0x353495(0x20e)])!=null?_0x1df5ef:0x0)>0x0){const _0x32af3f=(_0x475295,_0x4b3bc0)=>({'id':_0x475295[_0x353495(0x20d)],'threadId':_0x475295[_0x353495(0x1c7)],'dT':D(_0x475295[_0x353495(0x1eb)]),'personId':_0x475295[_0x353495(0x1ef)],'resolved':_0x35f872[_0x353495(0x1da)]===I[_0x353495(0x1e9)],'unitId':_0x29cbcc,'subUnitId':_0x45bad0,'text':JSON[_0x353495(0x1d1)](_0x475295[_0x353495(0x1ea)]),'parentId':_0x4b3bc0}),_0x1d4391=_0x32af3f(_0x35f872[_0x353495(0x20c)][0x0]);return{..._0x1d4391,'children':_0x35f872[_0x353495(0x20c)][_0x353495(0x1e3)](0x1)['map'](_0x18a175=>_0x32af3f(_0x18a175,_0x1d4391['id']))};}return null;}let f=class{constructor(_0x53f406,_0x1d89ff,_0xeb5d11,_0x1b3914){const _0x5a8022=_0x5bf03e;this['_httpService']=_0x53f406,this[_0x5a8022(0x1ca)]=_0x1d89ff,this[_0x5a8022(0x1fd)]=_0xeb5d11,this[_0x5a8022(0x1ce)]=_0x1b3914;}async[_0x5bf03e(0x1fb)](_0x4b7126){const _0x3324f2=_0x5bf03e;var _0x2c0177,_0x2c9e64;const {parentId:_0xea5e6c,unitId:_0x1ab178,text:_0x55e48e,threadId:_0xcd0d4b}=_0x4b7126,_0x5a6654=(_0x2c9e64=(_0x2c0177=_0x55e48e[_0x3324f2(0x1e2)])==null?void 0x0:_0x2c0177[_0x3324f2(0x1ec)](_0x169a59=>_0x169a59[_0x3324f2(0x1cc)]===_0x1bd652['COMMENT'])[_0x3324f2(0x1b3)](_0x384d59=>_0x384d59[_0x3324f2(0x20a)]))!=null?_0x2c9e64:[],_0x3656ee=JSON[_0x3324f2(0x1fc)](_0x55e48e),_0x555e36=(await this['_sessionService'][_0x3324f2(0x1f5)](_0x1ab178))[_0x3324f2(0x1e0)]();if(_0xea5e6c){const _0x1c3ed8={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654,'threadId':_0xcd0d4b},_0x57dbb7=(await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+'/reply',{'body':_0x1c3ed8}))[_0x3324f2(0x1c6)][_0x3324f2(0x1cd)];return{..._0x4b7126,'id':_0x57dbb7[_0x3324f2(0x20d)],'dT':_0x2bfba6(+_0x57dbb7[_0x3324f2(0x1eb)])[_0x3324f2(0x1dc)](_0x3324f2(0x1ad)),'personId':_0x57dbb7[_0x3324f2(0x1ef)]};}else{const _0x1f4c66={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654},_0x51d893=await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+_0x3324f2(0x1f9),{'body':_0x1f4c66});return X(_0x51d893['body'][_0x3324f2(0x1b6)],_0x4b7126);}}async[_0x5bf03e(0x1c3)](_0xa79ba){const _0x194343=_0x5bf03e;var _0x4f9d1a,_0x2c822c;const {text:_0x30482c,unitId:_0x491b2f}=_0xa79ba,_0x41775d=(_0x2c822c=(_0x4f9d1a=_0x30482c['customRanges'])==null?void 0x0:_0x4f9d1a['filter'](_0xd7bd87=>_0xd7bd87[_0x194343(0x1cc)]===_0x1bd652[_0x194343(0x208)])[_0x194343(0x1b3)](_0x45f868=>_0x45f868[_0x194343(0x20a)]))!=null?_0x2c822c:[],_0x39bcb6=JSON[_0x194343(0x1fc)](_0x30482c),_0x107c06=_0xa79ba[_0x194343(0x1c7)],_0x48c58b=_0xa79ba['id'],_0x14bea9={'memberId':(await this[_0x194343(0x1fd)][_0x194343(0x1f5)](_0x491b2f))[_0x194343(0x1e0)](),'unitId':_0x491b2f,'threadId':_0x107c06,'mention':_0x41775d,'content':_0x39bcb6,'replyId':_0x48c58b},_0x2f1b2e=await this['_httpService'][_0x194343(0x1c2)]('/universer-api/comment/unit/'+_0x491b2f+_0x194343(0x1db),{'body':_0x14bea9});return!_0x2f1b2e['body'][_0x194343(0x1ee)]||_0x2f1b2e['body'][_0x194343(0x1ee)][_0x194343(0x1ed)]===0x1;}async[_0x5bf03e(0x1e6)](_0x19380d){const _0x4c2e14=_0x5bf03e,{unitId:_0x226eb3}=_0x19380d,_0x220999=_0x19380d[_0x4c2e14(0x1c7)],_0x869398={'memberId':this['_userService'][_0x4c2e14(0x1f4)]()[_0x4c2e14(0x1c0)],'unitId':_0x226eb3,'threadId':_0x220999,'solved':_0x19380d[_0x4c2e14(0x1aa)]?I[_0x4c2e14(0x1e9)]:I[_0x4c2e14(0x1bf)]},_0x3f3afb=await this[_0x4c2e14(0x1b0)][_0x4c2e14(0x1c2)](_0x4c2e14(0x1d6)+_0x226eb3+'/solved',{'body':_0x869398});return!_0x3f3afb[_0x4c2e14(0x1c6)][_0x4c2e14(0x1ee)]||_0x3f3afb[_0x4c2e14(0x1c6)]['error']['code']===0x1;}async['deleteComment'](_0x1d1fed,_0x5b24c0,_0x458bf2,_0x37a8d6){const _0x5e448e=_0x5bf03e,_0x4a0dd0={'memberId':(await this[_0x5e448e(0x1fd)]['requireSession'](_0x1d1fed))['getMemberID'](),'threadId':_0x458bf2,'replyId':_0x37a8d6,'unitId':_0x1d1fed},_0x48b2c7=await this[_0x5e448e(0x1b0)][_0x5e448e(0x1c2)](_0x5e448e(0x1d6)+_0x1d1fed+_0x5e448e(0x1f1),{'body':_0x4a0dd0});return!_0x48b2c7['body'][_0x5e448e(0x1ee)]||_0x48b2c7[_0x5e448e(0x1c6)]['error'][_0x5e448e(0x1ed)]===0x1;}async['listComments'](_0x283833,_0x229f4a,_0x449010){const _0x3e6ed4=_0x5bf03e,_0x469d54={'unitId':_0x283833,'threadId':_0x449010},_0x3b84a4=await this[_0x3e6ed4(0x1b0)][_0x3e6ed4(0x1c2)](_0x3e6ed4(0x1d6)+_0x283833+_0x3e6ed4(0x205),{'body':_0x469d54}),_0x4b2575=_0x449010[_0x3e6ed4(0x1b3)](_0x3b38f6=>ee(_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1b8)][_0x3b38f6],_0x283833,_0x229f4a))[_0x3e6ed4(0x1ec)](Boolean);return Object[_0x3e6ed4(0x1b4)](_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1df)])[_0x3e6ed4(0x203)](_0x4dd442=>{const _0x28239b=_0x3e6ed4;this['_userService'][_0x28239b(0x1b5)](_0x4dd442);}),_0x4b2575;}[_0x5bf03e(0x1fa)](_0x4faf28){const _0x4e2ed0=_0x5bf03e;return{'id':_0x4faf28['id'],'threadId':_0x4faf28['threadId'],'ref':_0x4faf28[_0x4e2ed0(0x1c8)]};}};f=Q([_(0x0,_0xc780c5(_0x2353b4)),_(0x1,_0xc780c5(_0x48dccf)),_(0x2,_0xc780c5(_0x220e28)),_(0x3,_0xc780c5(_0x394220))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2fdda9,_0xfef264,_0x9014a5,_0x33ac1e)=>{const _0x35d59d=_0x5bf03e;for(var _0x78004f=_0x33ac1e>0x1?void 0x0:_0x33ac1e?re(_0xfef264,_0x9014a5):_0xfef264,_0x3ceeaf=_0x2fdda9[_0x35d59d(0x20e)]-0x1,_0x4416f8;_0x3ceeaf>=0x0;_0x3ceeaf--)(_0x4416f8=_0x2fdda9[_0x3ceeaf])&&(_0x78004f=_0x4416f8(_0x78004f)||_0x78004f);return _0x78004f;},N=(_0x26ff3f,_0x24cc19)=>(_0xbb7509,_0x34b1af)=>_0x24cc19(_0xbb7509,_0x34b1af,_0x26ff3f);let g=class extends _0x5da964{constructor(_0x2f98bf,_0x5d88e1){const _0x4520be=_0x5bf03e;super(),this[_0x4520be(0x1be)]=_0x2f98bf,this[_0x4520be(0x1af)]=_0x5d88e1,this['_initDataSource']();}[_0x5bf03e(0x1d4)](){const _0xe3c2a1=_0x5bf03e;this[_0xe3c2a1(0x1be)][_0xe3c2a1(0x1bd)]=this[_0xe3c2a1(0x1af)],this['_threadCommentDataSourceService'][_0xe3c2a1(0x1e1)]=!0x1;}};g=te([N(0x0,_0x51bd43),N(0x1,_0xc780c5(f))],g);var se=Object[_0x5bf03e(0x207)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xeed73c,_0x2f4b7e,_0x577f20)=>_0x2f4b7e in _0xeed73c?se(_0xeed73c,_0x2f4b7e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x577f20}):_0xeed73c[_0x2f4b7e]=_0x577f20,ie=(_0x56191b,_0x3fcbe9,_0x212778,_0x54c9d2)=>{const _0x580589=_0x5bf03e;for(var _0x20f033=_0x54c9d2>0x1?void 0x0:_0x54c9d2?oe(_0x3fcbe9,_0x212778):_0x3fcbe9,_0x44d354=_0x56191b[_0x580589(0x20e)]-0x1,_0x1a87bd;_0x44d354>=0x0;_0x44d354--)(_0x1a87bd=_0x56191b[_0x44d354])&&(_0x20f033=_0x1a87bd(_0x20f033)||_0x20f033);return _0x20f033;},w=(_0x47190c,_0x3b3699)=>(_0x37fba2,_0x5ef8e4)=>_0x3b3699(_0x37fba2,_0x5ef8e4,_0x47190c),$=(_0x17ba0b,_0x3c483f,_0x13ed47)=>ne(_0x17ba0b,typeof _0x3c483f!=_0x5bf03e(0x1b2)?_0x3c483f+'':_0x3c483f,_0x13ed47);let b=class extends _0x4175ae{constructor(_0x13bf0e=M,_0x341dc6,_0x22d683){const _0x4a18fa=_0x5bf03e;super(),this['_config']=_0x13bf0e,this[_0x4a18fa(0x1ce)]=_0x341dc6,this[_0x4a18fa(0x1c1)]=_0x22d683;const {..._0x5516d0}=_0x29f660({},M,this[_0x4a18fa(0x1f7)]);this[_0x4a18fa(0x1c1)]['setConfig'](z,_0x5516d0);}[_0x5bf03e(0x1b7)](){const _0x35f776=_0x5bf03e;[[f],[g],[S]][_0x35f776(0x203)](_0x1b919b=>{const _0x2d9448=_0x35f776;this[_0x2d9448(0x1ce)][_0x2d9448(0x1ab)](_0x1b919b);});}[_0x5bf03e(0x1bb)](){const _0x2396ab=_0x5bf03e;this['_injector'][_0x2396ab(0x1ae)](g),this[_0x2396ab(0x1ce)][_0x2396ab(0x1ae)](S);}};$(b,_0x5bf03e(0x1cf),W),$(b,'type',_0x27d52f[_0x5bf03e(0x1b1)]),b=ie([_0x5b752f(_0x1ce1e2,_0x1095dd,_0xf4a461),w(0x1,_0xc780c5(_0x394220)),w(0x2,_0x1aa97b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x391085=_0x1132;(function(_0x380ac1,_0x106dff){const _0x2d1ff7=_0x1132,_0x47c228=_0x380ac1();while(!![]){try{const _0x4eac5f=parseInt(_0x2d1ff7(0x151))/0x1+-parseInt(_0x2d1ff7(0x10a))/0x2+parseInt(_0x2d1ff7(0x11f))/0x3+parseInt(_0x2d1ff7(0x147))/0x4+parseInt(_0x2d1ff7(0x102))/0x5+-parseInt(_0x2d1ff7(0x130))/0x6+parseInt(_0x2d1ff7(0x11d))/0x7*(-parseInt(_0x2d1ff7(0x12a))/0x8);if(_0x4eac5f===_0x106dff)break;else _0x47c228['push'](_0x47c228['shift']());}catch(_0x5af8da){_0x47c228['push'](_0x47c228['shift']());}}}(_0x5e17,0xc08a0));import{CommentService as _0x5f4e5e,CollaborationSessionService as _0x1fc687,UniverCollaborationClientPlugin as _0xf1e801}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x30c31e}from'@univerjs-pro/license';import{dayjs as _0x519154,UserManagerService as _0x42cfae,Inject as _0x139a48,Injector as _0x4598ff,Disposable as _0x40c267,CustomRangeType as _0x2c96ff,UniverInstanceType as _0x47b158,DependentOn as _0x3bde12,IConfigService as _0x5c9166,Plugin as _0x263ac2,merge as _0x1ea02d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x13dc44}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38d485,IThreadCommentDataSourceService as _0x4c028a}from'@univerjs/thread-comment';import{bufferTime as _0x5a6ebf}from'rxjs';import{HTTPService as _0x43fbe3}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x51d6a9=>(_0x51d6a9[_0x51d6a9[_0x391085(0x121)]=0x0]=_0x391085(0x121),_0x51d6a9[_0x51d6a9[_0x391085(0x14b)]=0x1]=_0x391085(0x14b),_0x51d6a9[_0x51d6a9['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x51d6a9))(I||{}),v=(_0x126df6=>(_0x126df6[_0x126df6[_0x391085(0x12c)]=0x0]='Unknown',_0x126df6[_0x126df6[_0x391085(0x10c)]=0x1]=_0x391085(0x10c),_0x126df6[_0x126df6[_0x391085(0x155)]=0x2]='Reply',_0x126df6[_0x126df6[_0x391085(0x149)]=0x3]='Edit',_0x126df6[_0x126df6[_0x391085(0x129)]=0x4]=_0x391085(0x129),_0x126df6[_0x126df6[_0x391085(0x13b)]=0x5]='Solve',_0x126df6[_0x126df6[_0x391085(0x14e)]=-0x1]=_0x391085(0x14e),_0x126df6))(v||{});const D=_0x4fbdf3=>_0x519154(new Date(+_0x4fbdf3))[_0x391085(0x135)](_0x391085(0x120)),B=async(_0x124e0c,_0x2fd746)=>{const _0x4f57b0=_0x391085,_0x3d6887=_0x124e0c['get'](_0x42cfae),_0x411833=_0x124e0c[_0x4f57b0(0x10d)](_0x43fbe3);_0x2fd746[_0x4f57b0(0x14a)](_0x3dc7cf=>{const _0x280b86=_0x4f57b0;_0x3d6887[_0x280b86(0x164)](_0x3dc7cf)&&_0x2fd746['delete'](_0x3dc7cf);}),_0x2fd746['size']&&(await _0x411833[_0x4f57b0(0x10d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fd746]}}))[_0x4f57b0(0x15b)][_0x4f57b0(0x141)][_0x4f57b0(0x14a)](_0x2d970d=>{const _0x202d22=_0x4f57b0;_0x2d970d&&_0x3d6887[_0x202d22(0x165)](_0x2d970d);});};var K=Object[_0x391085(0x127)],V=(_0x2578ba,_0x14d0c1,_0x214cca,_0x432258)=>{const _0x14a4c3=_0x391085;for(var _0x2b1908=_0x432258>0x1?void 0x0:_0x432258?K(_0x14d0c1,_0x214cca):_0x14d0c1,_0x53c4ba=_0x2578ba[_0x14a4c3(0x124)]-0x1,_0xff6cff;_0x53c4ba>=0x0;_0x53c4ba--)(_0xff6cff=_0x2578ba[_0x53c4ba])&&(_0x2b1908=_0xff6cff(_0x2b1908)||_0x2b1908);return _0x2b1908;},p=(_0x4e7a7c,_0xa899e0)=>(_0xac0133,_0x527b70)=>_0xa899e0(_0xac0133,_0x527b70,_0x4e7a7c);let S=class extends _0x40c267{constructor(_0x44e463,_0x3dccea,_0x4fe521,_0x5295a5){const _0x2876a1=_0x391085;super(),this[_0x2876a1(0x150)]=_0x44e463,this[_0x2876a1(0x145)]=_0x3dccea,this['_userService']=_0x4fe521,this[_0x2876a1(0x128)]=_0x5295a5,this[_0x2876a1(0x146)](),this[_0x2876a1(0x142)]();}[_0x391085(0x142)](){const _0x1cd282=_0x391085;this['disposeWithMe'](this[_0x1cd282(0x145)]['commentUpdate$'][_0x1cd282(0x143)](_0x5a6ebf(0x10))[_0x1cd282(0x14c)](_0xc082f4=>{const _0xb6c36f=_0x1cd282,_0x455cd3=new Set();_0xc082f4[_0xb6c36f(0x14a)](_0x380c7f=>{const _0x122779=_0xb6c36f;switch(_0x380c7f[_0x122779(0x15f)]){case'add':{const _0x36b4dc=_0x380c7f[_0x122779(0x112)][_0x122779(0x153)];_0x455cd3['add'](_0x36b4dc);break;}}}),B(this['_injector'],_0x455cd3);}));}[_0x391085(0x146)](){const _0x4a359a=_0x391085;this[_0x4a359a(0x133)](this[_0x4a359a(0x150)][_0x4a359a(0x134)][_0x4a359a(0x14c)](async _0x3ceaf7=>{const _0x5453d7=_0x4a359a;var _0xdfba1a,_0x2ecca9,_0x5c7b23,_0x21a944;const _0x546c5=(_0xdfba1a=this['_threadCommentModel'][_0x5453d7(0x160)](_0x3ceaf7[_0x5453d7(0x117)])['find'](_0x2c7d7a=>_0x2c7d7a['threadId']===_0x3ceaf7[_0x5453d7(0x152)]))==null?void 0x0:_0xdfba1a['root'];if(!_0x546c5)return;const {unitId:_0xdefbb2,subUnitId:_0x65d083}=_0x546c5;switch(_0x3ceaf7['user']&&this[_0x5453d7(0x11b)][_0x5453d7(0x165)](_0x3ceaf7['user']),_0x3ceaf7[_0x5453d7(0x15f)]){case v['Add']:break;case v['Reply']:{this[_0x5453d7(0x145)][_0x5453d7(0x15a)](_0xdefbb2,_0x65d083,{'unitId':_0xdefbb2,'subUnitId':_0x65d083,'ref':'','id':_0x3ceaf7[_0x5453d7(0x11a)],'dT':D(+_0x3ceaf7['createTimestamp']),'threadId':_0x3ceaf7[_0x5453d7(0x152)],'personId':(_0x5c7b23=(_0x2ecca9=_0x3ceaf7[_0x5453d7(0x13f)])==null?void 0x0:_0x2ecca9[_0x5453d7(0x109)])!=null?_0x5c7b23:_0x3ceaf7[_0x5453d7(0x126)],'text':JSON[_0x5453d7(0x15d)](_0x3ceaf7[_0x5453d7(0x106)]),'parentId':_0x546c5['id']});break;}case v[_0x5453d7(0x129)]:{const _0xc1554a=this[_0x5453d7(0x145)][_0x5453d7(0x115)](_0xdefbb2,_0x65d083,_0x3ceaf7[_0x5453d7(0x11a)]);_0xc1554a&&_0xc1554a[_0x5453d7(0x15e)]&&this[_0x5453d7(0x145)][_0x5453d7(0x10e)](_0xdefbb2,_0x65d083,_0x3ceaf7[_0x5453d7(0x11a)]);break;}case v[_0x5453d7(0x149)]:{this[_0x5453d7(0x145)][_0x5453d7(0x12e)](_0xdefbb2,_0x65d083,{'commentId':_0x3ceaf7[_0x5453d7(0x11a)],'text':JSON[_0x5453d7(0x15d)](_0x3ceaf7[_0x5453d7(0x106)])});break;}case v[_0x5453d7(0x13b)]:{const _0xa9aef6=(_0x21a944=this[_0x5453d7(0x145)][_0x5453d7(0x160)](_0x3ceaf7[_0x5453d7(0x117)])[_0x5453d7(0x116)](_0x50f199=>_0x50f199['threadId']===_0x3ceaf7[_0x5453d7(0x152)]))==null?void 0x0:_0x21a944[_0x5453d7(0x148)];_0xa9aef6&&this[_0x5453d7(0x145)][_0x5453d7(0x138)](_0xdefbb2,_0x65d083,_0xa9aef6['id'],_0x3ceaf7[_0x5453d7(0x13d)]===I[_0x5453d7(0x14b)]);break;}}}));}};S=V([p(0x0,_0x139a48(_0x5f4e5e)),p(0x1,_0x139a48(_0x38d485)),p(0x2,_0x139a48(_0x42cfae)),p(0x3,_0x139a48(_0x4598ff))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x391085(0x127)],Q=(_0x47b180,_0x288def,_0x60361f,_0x10710c)=>{for(var _0x4b6d90=_0x10710c>0x1?void 0x0:_0x10710c?k(_0x288def,_0x60361f):_0x288def,_0x5904ca=_0x47b180['length']-0x1,_0x1eb111;_0x5904ca>=0x0;_0x5904ca--)(_0x1eb111=_0x47b180[_0x5904ca])&&(_0x4b6d90=_0x1eb111(_0x4b6d90)||_0x4b6d90);return _0x4b6d90;},_=(_0x5c1b24,_0x1ddd97)=>(_0x1c9ea4,_0x3a2b1a)=>_0x1ddd97(_0x1c9ea4,_0x3a2b1a,_0x5c1b24);function _0x5e17(){const _0x2df189=['5951956zJWiWU','root','Edit','forEach','Solved','subscribe','/edit','UNRECOGNIZED','dataSource','_commentService','1385566PRWrSc','threadId','personId','requireSession','Reply','_initDataSource','onReady','_sessionService','code','addComment','body','syncUpdateMutationToColla','parse','parentId','type','getUnit','_config','pluginName','_threadCommentDataSource','getUser','addUser','2713205riUNHe','comment','/add','saveCommentToSnapshot','content','_configService','filter','userID','2501216ELHxBl','/universer-api/comment/unit/','Add','get','deleteComment','createTimestamp','listComments','/list','payload','customRanges','post','getComment','find','unitId','replies','values','replyId','_userService','getCurrentUser','791uyCcHR','/reply','1422309CFhMih','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','map','/delete','length','defineProperty','userId','getOwnPropertyDescriptor','_injector','Delete','126304CdafgE','symbol','Unknown','comments','updateComment','COMMENT','402042OZibRm','_threadCommentDataSourceService','error','disposeWithMe','commentUpdate$','format','getMemberID','_httpService','resolveComment','slice','/solved','Solve','rangeId','solved','reply','user','rangeType','users','_initUserSync','pipe','resolved','_threadCommentModel','_init'];_0x5e17=function(){return _0x2df189;};return _0x5e17();}function X(_0x76297c,_0x14565a){const _0x52fe49=_0x391085,_0x48f7a2=_0x76297c[_0x52fe49(0x118)][0x0];return{..._0x14565a,'id':_0x48f7a2['replyId'],'resolved':_0x76297c[_0x52fe49(0x13d)]===0x1,'dT':D(_0x48f7a2[_0x52fe49(0x10f)]),'personId':_0x48f7a2[_0x52fe49(0x126)],'threadId':_0x48f7a2[_0x52fe49(0x152)]};}function ee(_0x77d7d7,_0x4a0a85,_0x140a9e){const _0x245998=_0x391085;var _0x345f8d,_0x1477d1;if(((_0x1477d1=(_0x345f8d=_0x77d7d7==null?void 0x0:_0x77d7d7[_0x245998(0x118)])==null?void 0x0:_0x345f8d['length'])!=null?_0x1477d1:0x0)>0x0){const _0x34e14f=(_0x15c04b,_0x17f38a)=>({'id':_0x15c04b[_0x245998(0x11a)],'threadId':_0x15c04b[_0x245998(0x152)],'dT':D(_0x15c04b[_0x245998(0x10f)]),'personId':_0x15c04b[_0x245998(0x126)],'resolved':_0x77d7d7[_0x245998(0x13d)]===I['Solved'],'unitId':_0x4a0a85,'subUnitId':_0x140a9e,'text':JSON[_0x245998(0x15d)](_0x15c04b['content']),'parentId':_0x17f38a}),_0x521885=_0x34e14f(_0x77d7d7[_0x245998(0x118)][0x0]);return{..._0x521885,'children':_0x77d7d7[_0x245998(0x118)][_0x245998(0x139)](0x1)[_0x245998(0x122)](_0x1b30fe=>_0x34e14f(_0x1b30fe,_0x521885['id']))};}return null;}let f=class{constructor(_0x12ed92,_0x4a99b3,_0x4d031a,_0x36f528){const _0x1ff5ed=_0x391085;this[_0x1ff5ed(0x137)]=_0x12ed92,this[_0x1ff5ed(0x11b)]=_0x4a99b3,this[_0x1ff5ed(0x158)]=_0x4d031a,this[_0x1ff5ed(0x128)]=_0x36f528;}async[_0x391085(0x15a)](_0x27b8ba){const _0x2dc707=_0x391085;var _0x5d0b24,_0x2fc7eb;const {parentId:_0x45eecb,unitId:_0x55a4eb,text:_0x5c07c4,threadId:_0x4b36c1}=_0x27b8ba,_0x7192ab=(_0x2fc7eb=(_0x5d0b24=_0x5c07c4[_0x2dc707(0x113)])==null?void 0x0:_0x5d0b24[_0x2dc707(0x108)](_0xdddbe1=>_0xdddbe1[_0x2dc707(0x140)]===_0x2c96ff[_0x2dc707(0x12f)])[_0x2dc707(0x122)](_0x23d29d=>_0x23d29d['rangeId']))!=null?_0x2fc7eb:[],_0x509668=JSON['stringify'](_0x5c07c4),_0x1735ca=(await this['_sessionService'][_0x2dc707(0x154)](_0x55a4eb))[_0x2dc707(0x136)]();if(_0x45eecb){const _0x49be41={'memberId':_0x1735ca,'unitId':_0x55a4eb,'content':_0x509668,'mention':_0x7192ab,'threadId':_0x4b36c1},_0x314417=(await this['_httpService']['post'](_0x2dc707(0x10b)+_0x55a4eb+_0x2dc707(0x11e),{'body':_0x49be41}))[_0x2dc707(0x15b)][_0x2dc707(0x13e)];return{..._0x27b8ba,'id':_0x314417[_0x2dc707(0x11a)],'dT':_0x519154(+_0x314417[_0x2dc707(0x10f)])[_0x2dc707(0x135)](_0x2dc707(0x120)),'personId':_0x314417[_0x2dc707(0x126)]};}else{const _0x1b2866={'memberId':_0x1735ca,'unitId':_0x55a4eb,'content':_0x509668,'mention':_0x7192ab},_0x24389f=await this[_0x2dc707(0x137)][_0x2dc707(0x114)](_0x2dc707(0x10b)+_0x55a4eb+_0x2dc707(0x104),{'body':_0x1b2866});return X(_0x24389f[_0x2dc707(0x15b)][_0x2dc707(0x103)],_0x27b8ba);}}async['updateComment'](_0x810133){const _0x3f49ea=_0x391085;var _0x46e787,_0x3effb2;const {text:_0x3527ef,unitId:_0x5f16d8}=_0x810133,_0x3828a2=(_0x3effb2=(_0x46e787=_0x3527ef['customRanges'])==null?void 0x0:_0x46e787[_0x3f49ea(0x108)](_0x1206f1=>_0x1206f1[_0x3f49ea(0x140)]===_0x2c96ff[_0x3f49ea(0x12f)])[_0x3f49ea(0x122)](_0x472fc7=>_0x472fc7[_0x3f49ea(0x13c)]))!=null?_0x3effb2:[],_0x33881f=JSON['stringify'](_0x3527ef),_0x13b2a4=_0x810133[_0x3f49ea(0x152)],_0x3acbee=_0x810133['id'],_0x3d4621={'memberId':(await this[_0x3f49ea(0x158)][_0x3f49ea(0x154)](_0x5f16d8))[_0x3f49ea(0x136)](),'unitId':_0x5f16d8,'threadId':_0x13b2a4,'mention':_0x3828a2,'content':_0x33881f,'replyId':_0x3acbee},_0x5f5f7d=await this['_httpService']['post'](_0x3f49ea(0x10b)+_0x5f16d8+_0x3f49ea(0x14d),{'body':_0x3d4621});return!_0x5f5f7d[_0x3f49ea(0x15b)][_0x3f49ea(0x132)]||_0x5f5f7d[_0x3f49ea(0x15b)]['error'][_0x3f49ea(0x159)]===0x1;}async[_0x391085(0x138)](_0x143e3b){const _0x4e45b7=_0x391085,{unitId:_0x5d47cf}=_0x143e3b,_0x24e15f=_0x143e3b[_0x4e45b7(0x152)],_0x2012ba={'memberId':this['_userService'][_0x4e45b7(0x11c)]()['userID'],'unitId':_0x5d47cf,'threadId':_0x24e15f,'solved':_0x143e3b[_0x4e45b7(0x144)]?I['Solved']:I[_0x4e45b7(0x121)]},_0x58fc1d=await this[_0x4e45b7(0x137)][_0x4e45b7(0x114)]('/universer-api/comment/unit/'+_0x5d47cf+_0x4e45b7(0x13a),{'body':_0x2012ba});return!_0x58fc1d[_0x4e45b7(0x15b)][_0x4e45b7(0x132)]||_0x58fc1d['body'][_0x4e45b7(0x132)]['code']===0x1;}async[_0x391085(0x10e)](_0x25ac2a,_0x26978f,_0x4a42fa,_0x502032){const _0x2ed384=_0x391085,_0x429b5c={'memberId':(await this['_sessionService'][_0x2ed384(0x154)](_0x25ac2a))[_0x2ed384(0x136)](),'threadId':_0x4a42fa,'replyId':_0x502032,'unitId':_0x25ac2a},_0x5d838a=await this['_httpService']['post'](_0x2ed384(0x10b)+_0x25ac2a+_0x2ed384(0x123),{'body':_0x429b5c});return!_0x5d838a[_0x2ed384(0x15b)][_0x2ed384(0x132)]||_0x5d838a[_0x2ed384(0x15b)][_0x2ed384(0x132)][_0x2ed384(0x159)]===0x1;}async[_0x391085(0x110)](_0x255131,_0x597563,_0x3f0423){const _0x27cf02=_0x391085,_0x36a937={'unitId':_0x255131,'threadId':_0x3f0423},_0x4434c8=await this['_httpService'][_0x27cf02(0x114)]('/universer-api/comment/unit/'+_0x255131+_0x27cf02(0x111),{'body':_0x36a937}),_0x215a58=_0x3f0423[_0x27cf02(0x122)](_0x518a59=>ee(_0x4434c8[_0x27cf02(0x15b)][_0x27cf02(0x12d)][_0x518a59],_0x255131,_0x597563))[_0x27cf02(0x108)](Boolean);return Object[_0x27cf02(0x119)](_0x4434c8['body']['users'])[_0x27cf02(0x14a)](_0x195fa1=>{const _0x1dc902=_0x27cf02;this[_0x1dc902(0x11b)][_0x1dc902(0x165)](_0x195fa1);}),_0x215a58;}[_0x391085(0x105)](_0x671665){const _0x35398b=_0x391085;return{'id':_0x671665['id'],'threadId':_0x671665[_0x35398b(0x152)],'ref':_0x671665['ref']};}};f=Q([_(0x0,_0x139a48(_0x43fbe3)),_(0x1,_0x139a48(_0x42cfae)),_(0x2,_0x139a48(_0x1fc687)),_(0x3,_0x139a48(_0x4598ff))],f);var re=Object[_0x391085(0x127)],te=(_0x5da441,_0x4647ee,_0x458a62,_0x120f0e)=>{for(var _0xcf99d1=_0x120f0e>0x1?void 0x0:_0x120f0e?re(_0x4647ee,_0x458a62):_0x4647ee,_0x4cd40d=_0x5da441['length']-0x1,_0x2e0969;_0x4cd40d>=0x0;_0x4cd40d--)(_0x2e0969=_0x5da441[_0x4cd40d])&&(_0xcf99d1=_0x2e0969(_0xcf99d1)||_0xcf99d1);return _0xcf99d1;},N=(_0x588920,_0x39ecd3)=>(_0x212088,_0x43b4af)=>_0x39ecd3(_0x212088,_0x43b4af,_0x588920);let g=class extends _0x40c267{constructor(_0x164d0c,_0x2b1b97){const _0x5b70ef=_0x391085;super(),this[_0x5b70ef(0x131)]=_0x164d0c,this['_threadCommentDataSource']=_0x2b1b97,this[_0x5b70ef(0x156)]();}[_0x391085(0x156)](){const _0x400af2=_0x391085;this[_0x400af2(0x131)][_0x400af2(0x14f)]=this[_0x400af2(0x163)],this[_0x400af2(0x131)][_0x400af2(0x15c)]=!0x1;}};function _0x1132(_0xda36e0,_0x203d27){const _0x5e17eb=_0x5e17();return _0x1132=function(_0x1132af,_0x266979){_0x1132af=_0x1132af-0x102;let _0x25d195=_0x5e17eb[_0x1132af];return _0x25d195;},_0x1132(_0xda36e0,_0x203d27);}g=te([N(0x0,_0x4c028a),N(0x1,_0x139a48(f))],g);var se=Object[_0x391085(0x125)],oe=Object[_0x391085(0x127)],ne=(_0x10d1e9,_0x190595,_0x14519b)=>_0x190595 in _0x10d1e9?se(_0x10d1e9,_0x190595,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14519b}):_0x10d1e9[_0x190595]=_0x14519b,ie=(_0x1a1ac1,_0x3c1205,_0x524017,_0xa8403c)=>{const _0x5c30f2=_0x391085;for(var _0x3070a8=_0xa8403c>0x1?void 0x0:_0xa8403c?oe(_0x3c1205,_0x524017):_0x3c1205,_0x4f5237=_0x1a1ac1[_0x5c30f2(0x124)]-0x1,_0x1d606b;_0x4f5237>=0x0;_0x4f5237--)(_0x1d606b=_0x1a1ac1[_0x4f5237])&&(_0x3070a8=_0x1d606b(_0x3070a8)||_0x3070a8);return _0x3070a8;},w=(_0x565486,_0x18c333)=>(_0x4f1b58,_0xfc6b0e)=>_0x18c333(_0x4f1b58,_0xfc6b0e,_0x565486),$=(_0x474861,_0x19e606,_0x32eb85)=>ne(_0x474861,typeof _0x19e606!=_0x391085(0x12b)?_0x19e606+'':_0x19e606,_0x32eb85);let b=class extends _0x263ac2{constructor(_0x119a29=M,_0x281d79,_0x5b4a7c){const _0xbf4cae=_0x391085;super(),this['_config']=_0x119a29,this['_injector']=_0x281d79,this[_0xbf4cae(0x107)]=_0x5b4a7c;const {..._0x128263}=_0x1ea02d({},M,this[_0xbf4cae(0x161)]);this['_configService']['setConfig'](z,_0x128263);}['onStarting'](){const _0x230462=_0x391085;[[f],[g],[S]][_0x230462(0x14a)](_0x179e6a=>{const _0x246cb1=_0x230462;this[_0x246cb1(0x128)]['add'](_0x179e6a);});}[_0x391085(0x157)](){const _0x270aaf=_0x391085;this['_injector'][_0x270aaf(0x10d)](g),this['_injector'][_0x270aaf(0x10d)](S);}};$(b,_0x391085(0x162),W),$(b,_0x391085(0x15f),_0x47b158['UNIVER_UNKNOWN']),b=ie([_0x3bde12(_0x13dc44,_0xf1e801,_0x30c31e),w(0x1,_0x139a48(_0x4598ff)),w(0x2,_0x5c9166)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x15af(_0x1519cd,_0x2e06c6){const _0x1cb5e7=_0x1cb5();return _0x15af=function(_0x15af2c,_0x5d3c68){_0x15af2c=_0x15af2c-0x1a9;let _0x1ed7ba=_0x1cb5e7[_0x15af2c];return _0x1ed7ba;},_0x15af(_0x1519cd,_0x2e06c6);}const _0x5bf03e=_0x15af;(function(_0x345d13,_0x4eb6c8){const _0x59fd78=_0x15af,_0x2f5581=_0x345d13();while(!![]){try{const _0x55b865=-parseInt(_0x59fd78(0x1c4))/0x1*(parseInt(_0x59fd78(0x1e7))/0x2)+-parseInt(_0x59fd78(0x1f3))/0x3+-parseInt(_0x59fd78(0x1a9))/0x4+parseInt(_0x59fd78(0x201))/0x5+parseInt(_0x59fd78(0x1c5))/0x6+parseInt(_0x59fd78(0x1cb))/0x7+-parseInt(_0x59fd78(0x200))/0x8;if(_0x55b865===_0x4eb6c8)break;else _0x2f5581['push'](_0x2f5581['shift']());}catch(_0x2ee43f){_0x2f5581['push'](_0x2f5581['shift']());}}}(_0x1cb5,0xd6be2));import{CommentService as _0x210c37,CollaborationSessionService as _0x220e28,UniverCollaborationClientPlugin as _0x1095dd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf4a461}from'@univerjs-pro/license';function _0x1cb5(){const _0x2331af=['Delete','forEach','getUnit','/list','commentUpdate$','defineProperty','COMMENT','UNRECOGNIZED','rangeId','size','replies','replyId','length','1245212BggkpG','resolved','add','_commentService','YYYY/MM/DD\x20HH:mm','get','_threadCommentDataSource','_httpService','UNIVER_UNKNOWN','symbol','map','values','addUser','comment','onStarting','comments','type','thread-comment-data-source.config','onReady','Solve','dataSource','_threadCommentDataSourceService','OpenOrReOpen','userID','_configService','post','updateComment','527TOcWJj','8607570ErrZfg','body','threadId','ref','Edit','_userService','1768179MNmVAH','rangeType','reply','_injector','pluginName','_initUserSync','parse','user','_init','_initDataSource','unitId','/universer-api/comment/unit/','getComment','parentId','deleteComment','solved','/edit','format','root','find','users','getMemberID','syncUpdateMutationToColla','customRanges','slice','subscribe','delete','resolveComment','382nProKU','getOwnPropertyDescriptor','Solved','content','createTimestamp','filter','code','error','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','Unknown','4299519TCVrll','getCurrentUser','requireSession','_threadCommentModel','_config','Add','/add','saveCommentToSnapshot','addComment','stringify','_sessionService','Reply','/universer-api/user/list','795960EnqPlm','5685110mJsRJb'];_0x1cb5=function(){return _0x2331af;};return _0x1cb5();}import{dayjs as _0x2bfba6,UserManagerService as _0x48dccf,Inject as _0xc780c5,Injector as _0x394220,Disposable as _0x5da964,CustomRangeType as _0x1bd652,UniverInstanceType as _0x27d52f,DependentOn as _0x5b752f,IConfigService as _0x1aa97b,Plugin as _0x4175ae,merge as _0x29f660}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ce1e2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5208a,IThreadCommentDataSourceService as _0x51bd43}from'@univerjs/thread-comment';import{bufferTime as _0x3dce6d}from'rxjs';import{HTTPService as _0x2353b4}from'@univerjs/network';const W=_0x5bf03e(0x1f0);var I=(_0x244959=>(_0x244959[_0x244959[_0x5bf03e(0x1bf)]=0x0]=_0x5bf03e(0x1bf),_0x244959[_0x244959[_0x5bf03e(0x1e9)]=0x1]=_0x5bf03e(0x1e9),_0x244959[_0x244959[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0x244959))(I||{}),v=(_0xb1669d=>(_0xb1669d[_0xb1669d[_0x5bf03e(0x1f2)]=0x0]=_0x5bf03e(0x1f2),_0xb1669d[_0xb1669d[_0x5bf03e(0x1f8)]=0x1]=_0x5bf03e(0x1f8),_0xb1669d[_0xb1669d[_0x5bf03e(0x1fe)]=0x2]=_0x5bf03e(0x1fe),_0xb1669d[_0xb1669d[_0x5bf03e(0x1c9)]=0x3]='Edit',_0xb1669d[_0xb1669d[_0x5bf03e(0x202)]=0x4]=_0x5bf03e(0x202),_0xb1669d[_0xb1669d['Solve']=0x5]=_0x5bf03e(0x1bc),_0xb1669d[_0xb1669d[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0xb1669d))(v||{});const D=_0x38cee2=>_0x2bfba6(new Date(+_0x38cee2))[_0x5bf03e(0x1dc)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1cfc19,_0x25af0b)=>{const _0x5e5260=_0x5bf03e,_0x18d93e=_0x1cfc19['get'](_0x48dccf),_0x40ee04=_0x1cfc19[_0x5e5260(0x1ae)](_0x2353b4);_0x25af0b[_0x5e5260(0x203)](_0x36f700=>{const _0xfb8e08=_0x5e5260;_0x18d93e['getUser'](_0x36f700)&&_0x25af0b[_0xfb8e08(0x1e5)](_0x36f700);}),_0x25af0b[_0x5e5260(0x20b)]&&(await _0x40ee04[_0x5e5260(0x1ae)](_0x5e5260(0x1ff),{'params':{'userIDs':[..._0x25af0b]}}))[_0x5e5260(0x1c6)][_0x5e5260(0x1df)]['forEach'](_0x5e43f0=>{const _0x46243d=_0x5e5260;_0x5e43f0&&_0x18d93e[_0x46243d(0x1b5)](_0x5e43f0);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x20bdc8,_0x37d360,_0xde6f02,_0x1616e9)=>{const _0x108a23=_0x5bf03e;for(var _0x1c5c74=_0x1616e9>0x1?void 0x0:_0x1616e9?K(_0x37d360,_0xde6f02):_0x37d360,_0xca633a=_0x20bdc8[_0x108a23(0x20e)]-0x1,_0x25bd6d;_0xca633a>=0x0;_0xca633a--)(_0x25bd6d=_0x20bdc8[_0xca633a])&&(_0x1c5c74=_0x25bd6d(_0x1c5c74)||_0x1c5c74);return _0x1c5c74;},p=(_0x312205,_0x1ee512)=>(_0xaf8f32,_0x129af2)=>_0x1ee512(_0xaf8f32,_0x129af2,_0x312205);let S=class extends _0x5da964{constructor(_0x44a03a,_0x16edca,_0x39bc82,_0x4fa082){const _0x34bce1=_0x5bf03e;super(),this[_0x34bce1(0x1ac)]=_0x44a03a,this[_0x34bce1(0x1f6)]=_0x16edca,this['_userService']=_0x39bc82,this['_injector']=_0x4fa082,this[_0x34bce1(0x1d3)](),this[_0x34bce1(0x1d0)]();}[_0x5bf03e(0x1d0)](){const _0x341f6d=_0x5bf03e;this['disposeWithMe'](this[_0x341f6d(0x1f6)][_0x341f6d(0x206)]['pipe'](_0x3dce6d(0x10))[_0x341f6d(0x1e4)](_0x377ae3=>{const _0x5754f9=_0x341f6d,_0x20e697=new Set();_0x377ae3[_0x5754f9(0x203)](_0x5a7286=>{const _0x506def=_0x5754f9;switch(_0x5a7286['type']){case _0x506def(0x1ab):{const _0x5e3632=_0x5a7286['payload']['personId'];_0x20e697[_0x506def(0x1ab)](_0x5e3632);break;}}}),B(this[_0x5754f9(0x1ce)],_0x20e697);}));}['_init'](){const _0x5a4610=_0x5bf03e;this['disposeWithMe'](this[_0x5a4610(0x1ac)][_0x5a4610(0x206)][_0x5a4610(0x1e4)](async _0xf45214=>{const _0x33bb2e=_0x5a4610;var _0x2b852c,_0x50d7a9,_0x2a5ea1,_0x25fc25;const _0x38fe38=(_0x2b852c=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])[_0x33bb2e(0x1de)](_0x393a87=>_0x393a87['threadId']===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x2b852c[_0x33bb2e(0x1dd)];if(!_0x38fe38)return;const {unitId:_0x5e09ee,subUnitId:_0x31cb78}=_0x38fe38;switch(_0xf45214[_0x33bb2e(0x1d2)]&&this['_userService'][_0x33bb2e(0x1b5)](_0xf45214[_0x33bb2e(0x1d2)]),_0xf45214[_0x33bb2e(0x1b9)]){case v['Add']:break;case v[_0x33bb2e(0x1fe)]:{this[_0x33bb2e(0x1f6)]['addComment'](_0x5e09ee,_0x31cb78,{'unitId':_0x5e09ee,'subUnitId':_0x31cb78,'ref':'','id':_0xf45214[_0x33bb2e(0x20d)],'dT':D(+_0xf45214[_0x33bb2e(0x1eb)]),'threadId':_0xf45214[_0x33bb2e(0x1c7)],'personId':(_0x2a5ea1=(_0x50d7a9=_0xf45214['user'])==null?void 0x0:_0x50d7a9[_0x33bb2e(0x1c0)])!=null?_0x2a5ea1:_0xf45214[_0x33bb2e(0x1ef)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)]),'parentId':_0x38fe38['id']});break;}case v[_0x33bb2e(0x202)]:{const _0x73e2cd=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d7)](_0x5e09ee,_0x31cb78,_0xf45214['replyId']);_0x73e2cd&&_0x73e2cd[_0x33bb2e(0x1d8)]&&this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d9)](_0x5e09ee,_0x31cb78,_0xf45214[_0x33bb2e(0x20d)]);break;}case v[_0x33bb2e(0x1c9)]:{this['_threadCommentModel'][_0x33bb2e(0x1c3)](_0x5e09ee,_0x31cb78,{'commentId':_0xf45214[_0x33bb2e(0x20d)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)])});break;}case v['Solve']:{const _0x586f1c=(_0x25fc25=this['_threadCommentModel'][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])['find'](_0x47b0ba=>_0x47b0ba[_0x33bb2e(0x1c7)]===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x25fc25[_0x33bb2e(0x1dd)];_0x586f1c&&this[_0x33bb2e(0x1f6)]['resolveComment'](_0x5e09ee,_0x31cb78,_0x586f1c['id'],_0xf45214[_0x33bb2e(0x1da)]===I[_0x33bb2e(0x1e9)]);break;}}}));}};S=V([p(0x0,_0xc780c5(_0x210c37)),p(0x1,_0xc780c5(_0x5208a)),p(0x2,_0xc780c5(_0x48dccf)),p(0x3,_0xc780c5(_0x394220))],S);const z=_0x5bf03e(0x1ba),M={};var k=Object[_0x5bf03e(0x1e8)],Q=(_0x327b80,_0x56553b,_0x4eda03,_0x4db94d)=>{const _0x2bef10=_0x5bf03e;for(var _0x5c7386=_0x4db94d>0x1?void 0x0:_0x4db94d?k(_0x56553b,_0x4eda03):_0x56553b,_0x1f6ea3=_0x327b80[_0x2bef10(0x20e)]-0x1,_0x4c936b;_0x1f6ea3>=0x0;_0x1f6ea3--)(_0x4c936b=_0x327b80[_0x1f6ea3])&&(_0x5c7386=_0x4c936b(_0x5c7386)||_0x5c7386);return _0x5c7386;},_=(_0x388db6,_0x22d905)=>(_0xd30b02,_0x393e89)=>_0x22d905(_0xd30b02,_0x393e89,_0x388db6);function X(_0x29e57f,_0x5ae59b){const _0xf84ef1=_0x5bf03e,_0x592c0f=_0x29e57f[_0xf84ef1(0x20c)][0x0];return{..._0x5ae59b,'id':_0x592c0f[_0xf84ef1(0x20d)],'resolved':_0x29e57f[_0xf84ef1(0x1da)]===0x1,'dT':D(_0x592c0f[_0xf84ef1(0x1eb)]),'personId':_0x592c0f[_0xf84ef1(0x1ef)],'threadId':_0x592c0f['threadId']};}function ee(_0x35f872,_0x29cbcc,_0x45bad0){const _0x353495=_0x5bf03e;var _0x555605,_0x1df5ef;if(((_0x1df5ef=(_0x555605=_0x35f872==null?void 0x0:_0x35f872[_0x353495(0x20c)])==null?void 0x0:_0x555605[_0x353495(0x20e)])!=null?_0x1df5ef:0x0)>0x0){const _0x32af3f=(_0x475295,_0x4b3bc0)=>({'id':_0x475295[_0x353495(0x20d)],'threadId':_0x475295[_0x353495(0x1c7)],'dT':D(_0x475295[_0x353495(0x1eb)]),'personId':_0x475295[_0x353495(0x1ef)],'resolved':_0x35f872[_0x353495(0x1da)]===I[_0x353495(0x1e9)],'unitId':_0x29cbcc,'subUnitId':_0x45bad0,'text':JSON[_0x353495(0x1d1)](_0x475295[_0x353495(0x1ea)]),'parentId':_0x4b3bc0}),_0x1d4391=_0x32af3f(_0x35f872[_0x353495(0x20c)][0x0]);return{..._0x1d4391,'children':_0x35f872[_0x353495(0x20c)][_0x353495(0x1e3)](0x1)['map'](_0x18a175=>_0x32af3f(_0x18a175,_0x1d4391['id']))};}return null;}let f=class{constructor(_0x53f406,_0x1d89ff,_0xeb5d11,_0x1b3914){const _0x5a8022=_0x5bf03e;this['_httpService']=_0x53f406,this[_0x5a8022(0x1ca)]=_0x1d89ff,this[_0x5a8022(0x1fd)]=_0xeb5d11,this[_0x5a8022(0x1ce)]=_0x1b3914;}async[_0x5bf03e(0x1fb)](_0x4b7126){const _0x3324f2=_0x5bf03e;var _0x2c0177,_0x2c9e64;const {parentId:_0xea5e6c,unitId:_0x1ab178,text:_0x55e48e,threadId:_0xcd0d4b}=_0x4b7126,_0x5a6654=(_0x2c9e64=(_0x2c0177=_0x55e48e[_0x3324f2(0x1e2)])==null?void 0x0:_0x2c0177[_0x3324f2(0x1ec)](_0x169a59=>_0x169a59[_0x3324f2(0x1cc)]===_0x1bd652['COMMENT'])[_0x3324f2(0x1b3)](_0x384d59=>_0x384d59[_0x3324f2(0x20a)]))!=null?_0x2c9e64:[],_0x3656ee=JSON[_0x3324f2(0x1fc)](_0x55e48e),_0x555e36=(await this['_sessionService'][_0x3324f2(0x1f5)](_0x1ab178))[_0x3324f2(0x1e0)]();if(_0xea5e6c){const _0x1c3ed8={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654,'threadId':_0xcd0d4b},_0x57dbb7=(await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+'/reply',{'body':_0x1c3ed8}))[_0x3324f2(0x1c6)][_0x3324f2(0x1cd)];return{..._0x4b7126,'id':_0x57dbb7[_0x3324f2(0x20d)],'dT':_0x2bfba6(+_0x57dbb7[_0x3324f2(0x1eb)])[_0x3324f2(0x1dc)](_0x3324f2(0x1ad)),'personId':_0x57dbb7[_0x3324f2(0x1ef)]};}else{const _0x1f4c66={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654},_0x51d893=await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+_0x3324f2(0x1f9),{'body':_0x1f4c66});return X(_0x51d893['body'][_0x3324f2(0x1b6)],_0x4b7126);}}async[_0x5bf03e(0x1c3)](_0xa79ba){const _0x194343=_0x5bf03e;var _0x4f9d1a,_0x2c822c;const {text:_0x30482c,unitId:_0x491b2f}=_0xa79ba,_0x41775d=(_0x2c822c=(_0x4f9d1a=_0x30482c['customRanges'])==null?void 0x0:_0x4f9d1a['filter'](_0xd7bd87=>_0xd7bd87[_0x194343(0x1cc)]===_0x1bd652[_0x194343(0x208)])[_0x194343(0x1b3)](_0x45f868=>_0x45f868[_0x194343(0x20a)]))!=null?_0x2c822c:[],_0x39bcb6=JSON[_0x194343(0x1fc)](_0x30482c),_0x107c06=_0xa79ba[_0x194343(0x1c7)],_0x48c58b=_0xa79ba['id'],_0x14bea9={'memberId':(await this[_0x194343(0x1fd)][_0x194343(0x1f5)](_0x491b2f))[_0x194343(0x1e0)](),'unitId':_0x491b2f,'threadId':_0x107c06,'mention':_0x41775d,'content':_0x39bcb6,'replyId':_0x48c58b},_0x2f1b2e=await this['_httpService'][_0x194343(0x1c2)]('/universer-api/comment/unit/'+_0x491b2f+_0x194343(0x1db),{'body':_0x14bea9});return!_0x2f1b2e['body'][_0x194343(0x1ee)]||_0x2f1b2e['body'][_0x194343(0x1ee)][_0x194343(0x1ed)]===0x1;}async[_0x5bf03e(0x1e6)](_0x19380d){const _0x4c2e14=_0x5bf03e,{unitId:_0x226eb3}=_0x19380d,_0x220999=_0x19380d[_0x4c2e14(0x1c7)],_0x869398={'memberId':this['_userService'][_0x4c2e14(0x1f4)]()[_0x4c2e14(0x1c0)],'unitId':_0x226eb3,'threadId':_0x220999,'solved':_0x19380d[_0x4c2e14(0x1aa)]?I[_0x4c2e14(0x1e9)]:I[_0x4c2e14(0x1bf)]},_0x3f3afb=await this[_0x4c2e14(0x1b0)][_0x4c2e14(0x1c2)](_0x4c2e14(0x1d6)+_0x226eb3+'/solved',{'body':_0x869398});return!_0x3f3afb[_0x4c2e14(0x1c6)][_0x4c2e14(0x1ee)]||_0x3f3afb[_0x4c2e14(0x1c6)]['error']['code']===0x1;}async['deleteComment'](_0x1d1fed,_0x5b24c0,_0x458bf2,_0x37a8d6){const _0x5e448e=_0x5bf03e,_0x4a0dd0={'memberId':(await this[_0x5e448e(0x1fd)]['requireSession'](_0x1d1fed))['getMemberID'](),'threadId':_0x458bf2,'replyId':_0x37a8d6,'unitId':_0x1d1fed},_0x48b2c7=await this[_0x5e448e(0x1b0)][_0x5e448e(0x1c2)](_0x5e448e(0x1d6)+_0x1d1fed+_0x5e448e(0x1f1),{'body':_0x4a0dd0});return!_0x48b2c7['body'][_0x5e448e(0x1ee)]||_0x48b2c7[_0x5e448e(0x1c6)]['error'][_0x5e448e(0x1ed)]===0x1;}async['listComments'](_0x283833,_0x229f4a,_0x449010){const _0x3e6ed4=_0x5bf03e,_0x469d54={'unitId':_0x283833,'threadId':_0x449010},_0x3b84a4=await this[_0x3e6ed4(0x1b0)][_0x3e6ed4(0x1c2)](_0x3e6ed4(0x1d6)+_0x283833+_0x3e6ed4(0x205),{'body':_0x469d54}),_0x4b2575=_0x449010[_0x3e6ed4(0x1b3)](_0x3b38f6=>ee(_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1b8)][_0x3b38f6],_0x283833,_0x229f4a))[_0x3e6ed4(0x1ec)](Boolean);return Object[_0x3e6ed4(0x1b4)](_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1df)])[_0x3e6ed4(0x203)](_0x4dd442=>{const _0x28239b=_0x3e6ed4;this['_userService'][_0x28239b(0x1b5)](_0x4dd442);}),_0x4b2575;}[_0x5bf03e(0x1fa)](_0x4faf28){const _0x4e2ed0=_0x5bf03e;return{'id':_0x4faf28['id'],'threadId':_0x4faf28['threadId'],'ref':_0x4faf28[_0x4e2ed0(0x1c8)]};}};f=Q([_(0x0,_0xc780c5(_0x2353b4)),_(0x1,_0xc780c5(_0x48dccf)),_(0x2,_0xc780c5(_0x220e28)),_(0x3,_0xc780c5(_0x394220))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2fdda9,_0xfef264,_0x9014a5,_0x33ac1e)=>{const _0x35d59d=_0x5bf03e;for(var _0x78004f=_0x33ac1e>0x1?void 0x0:_0x33ac1e?re(_0xfef264,_0x9014a5):_0xfef264,_0x3ceeaf=_0x2fdda9[_0x35d59d(0x20e)]-0x1,_0x4416f8;_0x3ceeaf>=0x0;_0x3ceeaf--)(_0x4416f8=_0x2fdda9[_0x3ceeaf])&&(_0x78004f=_0x4416f8(_0x78004f)||_0x78004f);return _0x78004f;},N=(_0x26ff3f,_0x24cc19)=>(_0xbb7509,_0x34b1af)=>_0x24cc19(_0xbb7509,_0x34b1af,_0x26ff3f);let g=class extends _0x5da964{constructor(_0x2f98bf,_0x5d88e1){const _0x4520be=_0x5bf03e;super(),this[_0x4520be(0x1be)]=_0x2f98bf,this[_0x4520be(0x1af)]=_0x5d88e1,this['_initDataSource']();}[_0x5bf03e(0x1d4)](){const _0xe3c2a1=_0x5bf03e;this[_0xe3c2a1(0x1be)][_0xe3c2a1(0x1bd)]=this[_0xe3c2a1(0x1af)],this['_threadCommentDataSourceService'][_0xe3c2a1(0x1e1)]=!0x1;}};g=te([N(0x0,_0x51bd43),N(0x1,_0xc780c5(f))],g);var se=Object[_0x5bf03e(0x207)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xeed73c,_0x2f4b7e,_0x577f20)=>_0x2f4b7e in _0xeed73c?se(_0xeed73c,_0x2f4b7e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x577f20}):_0xeed73c[_0x2f4b7e]=_0x577f20,ie=(_0x56191b,_0x3fcbe9,_0x212778,_0x54c9d2)=>{const _0x580589=_0x5bf03e;for(var _0x20f033=_0x54c9d2>0x1?void 0x0:_0x54c9d2?oe(_0x3fcbe9,_0x212778):_0x3fcbe9,_0x44d354=_0x56191b[_0x580589(0x20e)]-0x1,_0x1a87bd;_0x44d354>=0x0;_0x44d354--)(_0x1a87bd=_0x56191b[_0x44d354])&&(_0x20f033=_0x1a87bd(_0x20f033)||_0x20f033);return _0x20f033;},w=(_0x47190c,_0x3b3699)=>(_0x37fba2,_0x5ef8e4)=>_0x3b3699(_0x37fba2,_0x5ef8e4,_0x47190c),$=(_0x17ba0b,_0x3c483f,_0x13ed47)=>ne(_0x17ba0b,typeof _0x3c483f!=_0x5bf03e(0x1b2)?_0x3c483f+'':_0x3c483f,_0x13ed47);let b=class extends _0x4175ae{constructor(_0x13bf0e=M,_0x341dc6,_0x22d683){const _0x4a18fa=_0x5bf03e;super(),this['_config']=_0x13bf0e,this[_0x4a18fa(0x1ce)]=_0x341dc6,this[_0x4a18fa(0x1c1)]=_0x22d683;const {..._0x5516d0}=_0x29f660({},M,this[_0x4a18fa(0x1f7)]);this[_0x4a18fa(0x1c1)]['setConfig'](z,_0x5516d0);}[_0x5bf03e(0x1b7)](){const _0x35f776=_0x5bf03e;[[f],[g],[S]][_0x35f776(0x203)](_0x1b919b=>{const _0x2d9448=_0x35f776;this[_0x2d9448(0x1ce)][_0x2d9448(0x1ab)](_0x1b919b);});}[_0x5bf03e(0x1bb)](){const _0x2396ab=_0x5bf03e;this['_injector'][_0x2396ab(0x1ae)](g),this[_0x2396ab(0x1ce)][_0x2396ab(0x1ae)](S);}};$(b,_0x5bf03e(0x1cf),W),$(b,'type',_0x27d52f[_0x5bf03e(0x1b1)]),b=ie([_0x5b752f(_0x1ce1e2,_0x1095dd,_0xf4a461),w(0x1,_0xc780c5(_0x394220)),w(0x2,_0x1aa97b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x391085=_0x1132;(function(_0x380ac1,_0x106dff){const _0x2d1ff7=_0x1132,_0x47c228=_0x380ac1();while(!![]){try{const _0x4eac5f=parseInt(_0x2d1ff7(0x151))/0x1+-parseInt(_0x2d1ff7(0x10a))/0x2+parseInt(_0x2d1ff7(0x11f))/0x3+parseInt(_0x2d1ff7(0x147))/0x4+parseInt(_0x2d1ff7(0x102))/0x5+-parseInt(_0x2d1ff7(0x130))/0x6+parseInt(_0x2d1ff7(0x11d))/0x7*(-parseInt(_0x2d1ff7(0x12a))/0x8);if(_0x4eac5f===_0x106dff)break;else _0x47c228['push'](_0x47c228['shift']());}catch(_0x5af8da){_0x47c228['push'](_0x47c228['shift']());}}}(_0x5e17,0xc08a0));import{CommentService as _0x5f4e5e,CollaborationSessionService as _0x1fc687,UniverCollaborationClientPlugin as _0xf1e801}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x30c31e}from'@univerjs-pro/license';import{dayjs as _0x519154,UserManagerService as _0x42cfae,Inject as _0x139a48,Injector as _0x4598ff,Disposable as _0x40c267,CustomRangeType as _0x2c96ff,UniverInstanceType as _0x47b158,DependentOn as _0x3bde12,IConfigService as _0x5c9166,Plugin as _0x263ac2,merge as _0x1ea02d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x13dc44}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38d485,IThreadCommentDataSourceService as _0x4c028a}from'@univerjs/thread-comment';import{bufferTime as _0x5a6ebf}from'rxjs';import{HTTPService as _0x43fbe3}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x51d6a9=>(_0x51d6a9[_0x51d6a9[_0x391085(0x121)]=0x0]=_0x391085(0x121),_0x51d6a9[_0x51d6a9[_0x391085(0x14b)]=0x1]=_0x391085(0x14b),_0x51d6a9[_0x51d6a9['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x51d6a9))(I||{}),v=(_0x126df6=>(_0x126df6[_0x126df6[_0x391085(0x12c)]=0x0]='Unknown',_0x126df6[_0x126df6[_0x391085(0x10c)]=0x1]=_0x391085(0x10c),_0x126df6[_0x126df6[_0x391085(0x155)]=0x2]='Reply',_0x126df6[_0x126df6[_0x391085(0x149)]=0x3]='Edit',_0x126df6[_0x126df6[_0x391085(0x129)]=0x4]=_0x391085(0x129),_0x126df6[_0x126df6[_0x391085(0x13b)]=0x5]='Solve',_0x126df6[_0x126df6[_0x391085(0x14e)]=-0x1]=_0x391085(0x14e),_0x126df6))(v||{});const D=_0x4fbdf3=>_0x519154(new Date(+_0x4fbdf3))[_0x391085(0x135)](_0x391085(0x120)),B=async(_0x124e0c,_0x2fd746)=>{const _0x4f57b0=_0x391085,_0x3d6887=_0x124e0c['get'](_0x42cfae),_0x411833=_0x124e0c[_0x4f57b0(0x10d)](_0x43fbe3);_0x2fd746[_0x4f57b0(0x14a)](_0x3dc7cf=>{const _0x280b86=_0x4f57b0;_0x3d6887[_0x280b86(0x164)](_0x3dc7cf)&&_0x2fd746['delete'](_0x3dc7cf);}),_0x2fd746['size']&&(await _0x411833[_0x4f57b0(0x10d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fd746]}}))[_0x4f57b0(0x15b)][_0x4f57b0(0x141)][_0x4f57b0(0x14a)](_0x2d970d=>{const _0x202d22=_0x4f57b0;_0x2d970d&&_0x3d6887[_0x202d22(0x165)](_0x2d970d);});};var K=Object[_0x391085(0x127)],V=(_0x2578ba,_0x14d0c1,_0x214cca,_0x432258)=>{const _0x14a4c3=_0x391085;for(var _0x2b1908=_0x432258>0x1?void 0x0:_0x432258?K(_0x14d0c1,_0x214cca):_0x14d0c1,_0x53c4ba=_0x2578ba[_0x14a4c3(0x124)]-0x1,_0xff6cff;_0x53c4ba>=0x0;_0x53c4ba--)(_0xff6cff=_0x2578ba[_0x53c4ba])&&(_0x2b1908=_0xff6cff(_0x2b1908)||_0x2b1908);return _0x2b1908;},p=(_0x4e7a7c,_0xa899e0)=>(_0xac0133,_0x527b70)=>_0xa899e0(_0xac0133,_0x527b70,_0x4e7a7c);let S=class extends _0x40c267{constructor(_0x44e463,_0x3dccea,_0x4fe521,_0x5295a5){const _0x2876a1=_0x391085;super(),this[_0x2876a1(0x150)]=_0x44e463,this[_0x2876a1(0x145)]=_0x3dccea,this['_userService']=_0x4fe521,this[_0x2876a1(0x128)]=_0x5295a5,this[_0x2876a1(0x146)](),this[_0x2876a1(0x142)]();}[_0x391085(0x142)](){const _0x1cd282=_0x391085;this['disposeWithMe'](this[_0x1cd282(0x145)]['commentUpdate$'][_0x1cd282(0x143)](_0x5a6ebf(0x10))[_0x1cd282(0x14c)](_0xc082f4=>{const _0xb6c36f=_0x1cd282,_0x455cd3=new Set();_0xc082f4[_0xb6c36f(0x14a)](_0x380c7f=>{const _0x122779=_0xb6c36f;switch(_0x380c7f[_0x122779(0x15f)]){case'add':{const _0x36b4dc=_0x380c7f[_0x122779(0x112)][_0x122779(0x153)];_0x455cd3['add'](_0x36b4dc);break;}}}),B(this['_injector'],_0x455cd3);}));}[_0x391085(0x146)](){const _0x4a359a=_0x391085;this[_0x4a359a(0x133)](this[_0x4a359a(0x150)][_0x4a359a(0x134)][_0x4a359a(0x14c)](async _0x3ceaf7=>{const _0x5453d7=_0x4a359a;var _0xdfba1a,_0x2ecca9,_0x5c7b23,_0x21a944;const _0x546c5=(_0xdfba1a=this['_threadCommentModel'][_0x5453d7(0x160)](_0x3ceaf7[_0x5453d7(0x117)])['find'](_0x2c7d7a=>_0x2c7d7a['threadId']===_0x3ceaf7[_0x5453d7(0x152)]))==null?void 0x0:_0xdfba1a['root'];if(!_0x546c5)return;const {unitId:_0xdefbb2,subUnitId:_0x65d083}=_0x546c5;switch(_0x3ceaf7['user']&&this[_0x5453d7(0x11b)][_0x5453d7(0x165)](_0x3ceaf7['user']),_0x3ceaf7[_0x5453d7(0x15f)]){case v['Add']:break;case v['Reply']:{this[_0x5453d7(0x145)][_0x5453d7(0x15a)](_0xdefbb2,_0x65d083,{'unitId':_0xdefbb2,'subUnitId':_0x65d083,'ref':'','id':_0x3ceaf7[_0x5453d7(0x11a)],'dT':D(+_0x3ceaf7['createTimestamp']),'threadId':_0x3ceaf7[_0x5453d7(0x152)],'personId':(_0x5c7b23=(_0x2ecca9=_0x3ceaf7[_0x5453d7(0x13f)])==null?void 0x0:_0x2ecca9[_0x5453d7(0x109)])!=null?_0x5c7b23:_0x3ceaf7[_0x5453d7(0x126)],'text':JSON[_0x5453d7(0x15d)](_0x3ceaf7[_0x5453d7(0x106)]),'parentId':_0x546c5['id']});break;}case v[_0x5453d7(0x129)]:{const _0xc1554a=this[_0x5453d7(0x145)][_0x5453d7(0x115)](_0xdefbb2,_0x65d083,_0x3ceaf7[_0x5453d7(0x11a)]);_0xc1554a&&_0xc1554a[_0x5453d7(0x15e)]&&this[_0x5453d7(0x145)][_0x5453d7(0x10e)](_0xdefbb2,_0x65d083,_0x3ceaf7[_0x5453d7(0x11a)]);break;}case v[_0x5453d7(0x149)]:{this[_0x5453d7(0x145)][_0x5453d7(0x12e)](_0xdefbb2,_0x65d083,{'commentId':_0x3ceaf7[_0x5453d7(0x11a)],'text':JSON[_0x5453d7(0x15d)](_0x3ceaf7[_0x5453d7(0x106)])});break;}case v[_0x5453d7(0x13b)]:{const _0xa9aef6=(_0x21a944=this[_0x5453d7(0x145)][_0x5453d7(0x160)](_0x3ceaf7[_0x5453d7(0x117)])[_0x5453d7(0x116)](_0x50f199=>_0x50f199['threadId']===_0x3ceaf7[_0x5453d7(0x152)]))==null?void 0x0:_0x21a944[_0x5453d7(0x148)];_0xa9aef6&&this[_0x5453d7(0x145)][_0x5453d7(0x138)](_0xdefbb2,_0x65d083,_0xa9aef6['id'],_0x3ceaf7[_0x5453d7(0x13d)]===I[_0x5453d7(0x14b)]);break;}}}));}};S=V([p(0x0,_0x139a48(_0x5f4e5e)),p(0x1,_0x139a48(_0x38d485)),p(0x2,_0x139a48(_0x42cfae)),p(0x3,_0x139a48(_0x4598ff))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x391085(0x127)],Q=(_0x47b180,_0x288def,_0x60361f,_0x10710c)=>{for(var _0x4b6d90=_0x10710c>0x1?void 0x0:_0x10710c?k(_0x288def,_0x60361f):_0x288def,_0x5904ca=_0x47b180['length']-0x1,_0x1eb111;_0x5904ca>=0x0;_0x5904ca--)(_0x1eb111=_0x47b180[_0x5904ca])&&(_0x4b6d90=_0x1eb111(_0x4b6d90)||_0x4b6d90);return _0x4b6d90;},_=(_0x5c1b24,_0x1ddd97)=>(_0x1c9ea4,_0x3a2b1a)=>_0x1ddd97(_0x1c9ea4,_0x3a2b1a,_0x5c1b24);function _0x5e17(){const _0x2df189=['5951956zJWiWU','root','Edit','forEach','Solved','subscribe','/edit','UNRECOGNIZED','dataSource','_commentService','1385566PRWrSc','threadId','personId','requireSession','Reply','_initDataSource','onReady','_sessionService','code','addComment','body','syncUpdateMutationToColla','parse','parentId','type','getUnit','_config','pluginName','_threadCommentDataSource','getUser','addUser','2713205riUNHe','comment','/add','saveCommentToSnapshot','content','_configService','filter','userID','2501216ELHxBl','/universer-api/comment/unit/','Add','get','deleteComment','createTimestamp','listComments','/list','payload','customRanges','post','getComment','find','unitId','replies','values','replyId','_userService','getCurrentUser','791uyCcHR','/reply','1422309CFhMih','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','map','/delete','length','defineProperty','userId','getOwnPropertyDescriptor','_injector','Delete','126304CdafgE','symbol','Unknown','comments','updateComment','COMMENT','402042OZibRm','_threadCommentDataSourceService','error','disposeWithMe','commentUpdate$','format','getMemberID','_httpService','resolveComment','slice','/solved','Solve','rangeId','solved','reply','user','rangeType','users','_initUserSync','pipe','resolved','_threadCommentModel','_init'];_0x5e17=function(){return _0x2df189;};return _0x5e17();}function X(_0x76297c,_0x14565a){const _0x52fe49=_0x391085,_0x48f7a2=_0x76297c[_0x52fe49(0x118)][0x0];return{..._0x14565a,'id':_0x48f7a2['replyId'],'resolved':_0x76297c[_0x52fe49(0x13d)]===0x1,'dT':D(_0x48f7a2[_0x52fe49(0x10f)]),'personId':_0x48f7a2[_0x52fe49(0x126)],'threadId':_0x48f7a2[_0x52fe49(0x152)]};}function ee(_0x77d7d7,_0x4a0a85,_0x140a9e){const _0x245998=_0x391085;var _0x345f8d,_0x1477d1;if(((_0x1477d1=(_0x345f8d=_0x77d7d7==null?void 0x0:_0x77d7d7[_0x245998(0x118)])==null?void 0x0:_0x345f8d['length'])!=null?_0x1477d1:0x0)>0x0){const _0x34e14f=(_0x15c04b,_0x17f38a)=>({'id':_0x15c04b[_0x245998(0x11a)],'threadId':_0x15c04b[_0x245998(0x152)],'dT':D(_0x15c04b[_0x245998(0x10f)]),'personId':_0x15c04b[_0x245998(0x126)],'resolved':_0x77d7d7[_0x245998(0x13d)]===I['Solved'],'unitId':_0x4a0a85,'subUnitId':_0x140a9e,'text':JSON[_0x245998(0x15d)](_0x15c04b['content']),'parentId':_0x17f38a}),_0x521885=_0x34e14f(_0x77d7d7[_0x245998(0x118)][0x0]);return{..._0x521885,'children':_0x77d7d7[_0x245998(0x118)][_0x245998(0x139)](0x1)[_0x245998(0x122)](_0x1b30fe=>_0x34e14f(_0x1b30fe,_0x521885['id']))};}return null;}let f=class{constructor(_0x12ed92,_0x4a99b3,_0x4d031a,_0x36f528){const _0x1ff5ed=_0x391085;this[_0x1ff5ed(0x137)]=_0x12ed92,this[_0x1ff5ed(0x11b)]=_0x4a99b3,this[_0x1ff5ed(0x158)]=_0x4d031a,this[_0x1ff5ed(0x128)]=_0x36f528;}async[_0x391085(0x15a)](_0x27b8ba){const _0x2dc707=_0x391085;var _0x5d0b24,_0x2fc7eb;const {parentId:_0x45eecb,unitId:_0x55a4eb,text:_0x5c07c4,threadId:_0x4b36c1}=_0x27b8ba,_0x7192ab=(_0x2fc7eb=(_0x5d0b24=_0x5c07c4[_0x2dc707(0x113)])==null?void 0x0:_0x5d0b24[_0x2dc707(0x108)](_0xdddbe1=>_0xdddbe1[_0x2dc707(0x140)]===_0x2c96ff[_0x2dc707(0x12f)])[_0x2dc707(0x122)](_0x23d29d=>_0x23d29d['rangeId']))!=null?_0x2fc7eb:[],_0x509668=JSON['stringify'](_0x5c07c4),_0x1735ca=(await this['_sessionService'][_0x2dc707(0x154)](_0x55a4eb))[_0x2dc707(0x136)]();if(_0x45eecb){const _0x49be41={'memberId':_0x1735ca,'unitId':_0x55a4eb,'content':_0x509668,'mention':_0x7192ab,'threadId':_0x4b36c1},_0x314417=(await this['_httpService']['post'](_0x2dc707(0x10b)+_0x55a4eb+_0x2dc707(0x11e),{'body':_0x49be41}))[_0x2dc707(0x15b)][_0x2dc707(0x13e)];return{..._0x27b8ba,'id':_0x314417[_0x2dc707(0x11a)],'dT':_0x519154(+_0x314417[_0x2dc707(0x10f)])[_0x2dc707(0x135)](_0x2dc707(0x120)),'personId':_0x314417[_0x2dc707(0x126)]};}else{const _0x1b2866={'memberId':_0x1735ca,'unitId':_0x55a4eb,'content':_0x509668,'mention':_0x7192ab},_0x24389f=await this[_0x2dc707(0x137)][_0x2dc707(0x114)](_0x2dc707(0x10b)+_0x55a4eb+_0x2dc707(0x104),{'body':_0x1b2866});return X(_0x24389f[_0x2dc707(0x15b)][_0x2dc707(0x103)],_0x27b8ba);}}async['updateComment'](_0x810133){const _0x3f49ea=_0x391085;var _0x46e787,_0x3effb2;const {text:_0x3527ef,unitId:_0x5f16d8}=_0x810133,_0x3828a2=(_0x3effb2=(_0x46e787=_0x3527ef['customRanges'])==null?void 0x0:_0x46e787[_0x3f49ea(0x108)](_0x1206f1=>_0x1206f1[_0x3f49ea(0x140)]===_0x2c96ff[_0x3f49ea(0x12f)])[_0x3f49ea(0x122)](_0x472fc7=>_0x472fc7[_0x3f49ea(0x13c)]))!=null?_0x3effb2:[],_0x33881f=JSON['stringify'](_0x3527ef),_0x13b2a4=_0x810133[_0x3f49ea(0x152)],_0x3acbee=_0x810133['id'],_0x3d4621={'memberId':(await this[_0x3f49ea(0x158)][_0x3f49ea(0x154)](_0x5f16d8))[_0x3f49ea(0x136)](),'unitId':_0x5f16d8,'threadId':_0x13b2a4,'mention':_0x3828a2,'content':_0x33881f,'replyId':_0x3acbee},_0x5f5f7d=await this['_httpService']['post'](_0x3f49ea(0x10b)+_0x5f16d8+_0x3f49ea(0x14d),{'body':_0x3d4621});return!_0x5f5f7d[_0x3f49ea(0x15b)][_0x3f49ea(0x132)]||_0x5f5f7d[_0x3f49ea(0x15b)]['error'][_0x3f49ea(0x159)]===0x1;}async[_0x391085(0x138)](_0x143e3b){const _0x4e45b7=_0x391085,{unitId:_0x5d47cf}=_0x143e3b,_0x24e15f=_0x143e3b[_0x4e45b7(0x152)],_0x2012ba={'memberId':this['_userService'][_0x4e45b7(0x11c)]()['userID'],'unitId':_0x5d47cf,'threadId':_0x24e15f,'solved':_0x143e3b[_0x4e45b7(0x144)]?I['Solved']:I[_0x4e45b7(0x121)]},_0x58fc1d=await this[_0x4e45b7(0x137)][_0x4e45b7(0x114)]('/universer-api/comment/unit/'+_0x5d47cf+_0x4e45b7(0x13a),{'body':_0x2012ba});return!_0x58fc1d[_0x4e45b7(0x15b)][_0x4e45b7(0x132)]||_0x58fc1d['body'][_0x4e45b7(0x132)]['code']===0x1;}async[_0x391085(0x10e)](_0x25ac2a,_0x26978f,_0x4a42fa,_0x502032){const _0x2ed384=_0x391085,_0x429b5c={'memberId':(await this['_sessionService'][_0x2ed384(0x154)](_0x25ac2a))[_0x2ed384(0x136)](),'threadId':_0x4a42fa,'replyId':_0x502032,'unitId':_0x25ac2a},_0x5d838a=await this['_httpService']['post'](_0x2ed384(0x10b)+_0x25ac2a+_0x2ed384(0x123),{'body':_0x429b5c});return!_0x5d838a[_0x2ed384(0x15b)][_0x2ed384(0x132)]||_0x5d838a[_0x2ed384(0x15b)][_0x2ed384(0x132)][_0x2ed384(0x159)]===0x1;}async[_0x391085(0x110)](_0x255131,_0x597563,_0x3f0423){const _0x27cf02=_0x391085,_0x36a937={'unitId':_0x255131,'threadId':_0x3f0423},_0x4434c8=await this['_httpService'][_0x27cf02(0x114)]('/universer-api/comment/unit/'+_0x255131+_0x27cf02(0x111),{'body':_0x36a937}),_0x215a58=_0x3f0423[_0x27cf02(0x122)](_0x518a59=>ee(_0x4434c8[_0x27cf02(0x15b)][_0x27cf02(0x12d)][_0x518a59],_0x255131,_0x597563))[_0x27cf02(0x108)](Boolean);return Object[_0x27cf02(0x119)](_0x4434c8['body']['users'])[_0x27cf02(0x14a)](_0x195fa1=>{const _0x1dc902=_0x27cf02;this[_0x1dc902(0x11b)][_0x1dc902(0x165)](_0x195fa1);}),_0x215a58;}[_0x391085(0x105)](_0x671665){const _0x35398b=_0x391085;return{'id':_0x671665['id'],'threadId':_0x671665[_0x35398b(0x152)],'ref':_0x671665['ref']};}};f=Q([_(0x0,_0x139a48(_0x43fbe3)),_(0x1,_0x139a48(_0x42cfae)),_(0x2,_0x139a48(_0x1fc687)),_(0x3,_0x139a48(_0x4598ff))],f);var re=Object[_0x391085(0x127)],te=(_0x5da441,_0x4647ee,_0x458a62,_0x120f0e)=>{for(var _0xcf99d1=_0x120f0e>0x1?void 0x0:_0x120f0e?re(_0x4647ee,_0x458a62):_0x4647ee,_0x4cd40d=_0x5da441['length']-0x1,_0x2e0969;_0x4cd40d>=0x0;_0x4cd40d--)(_0x2e0969=_0x5da441[_0x4cd40d])&&(_0xcf99d1=_0x2e0969(_0xcf99d1)||_0xcf99d1);return _0xcf99d1;},N=(_0x588920,_0x39ecd3)=>(_0x212088,_0x43b4af)=>_0x39ecd3(_0x212088,_0x43b4af,_0x588920);let g=class extends _0x40c267{constructor(_0x164d0c,_0x2b1b97){const _0x5b70ef=_0x391085;super(),this[_0x5b70ef(0x131)]=_0x164d0c,this['_threadCommentDataSource']=_0x2b1b97,this[_0x5b70ef(0x156)]();}[_0x391085(0x156)](){const _0x400af2=_0x391085;this[_0x400af2(0x131)][_0x400af2(0x14f)]=this[_0x400af2(0x163)],this[_0x400af2(0x131)][_0x400af2(0x15c)]=!0x1;}};function _0x1132(_0xda36e0,_0x203d27){const _0x5e17eb=_0x5e17();return _0x1132=function(_0x1132af,_0x266979){_0x1132af=_0x1132af-0x102;let _0x25d195=_0x5e17eb[_0x1132af];return _0x25d195;},_0x1132(_0xda36e0,_0x203d27);}g=te([N(0x0,_0x4c028a),N(0x1,_0x139a48(f))],g);var se=Object[_0x391085(0x125)],oe=Object[_0x391085(0x127)],ne=(_0x10d1e9,_0x190595,_0x14519b)=>_0x190595 in _0x10d1e9?se(_0x10d1e9,_0x190595,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14519b}):_0x10d1e9[_0x190595]=_0x14519b,ie=(_0x1a1ac1,_0x3c1205,_0x524017,_0xa8403c)=>{const _0x5c30f2=_0x391085;for(var _0x3070a8=_0xa8403c>0x1?void 0x0:_0xa8403c?oe(_0x3c1205,_0x524017):_0x3c1205,_0x4f5237=_0x1a1ac1[_0x5c30f2(0x124)]-0x1,_0x1d606b;_0x4f5237>=0x0;_0x4f5237--)(_0x1d606b=_0x1a1ac1[_0x4f5237])&&(_0x3070a8=_0x1d606b(_0x3070a8)||_0x3070a8);return _0x3070a8;},w=(_0x565486,_0x18c333)=>(_0x4f1b58,_0xfc6b0e)=>_0x18c333(_0x4f1b58,_0xfc6b0e,_0x565486),$=(_0x474861,_0x19e606,_0x32eb85)=>ne(_0x474861,typeof _0x19e606!=_0x391085(0x12b)?_0x19e606+'':_0x19e606,_0x32eb85);let b=class extends _0x263ac2{constructor(_0x119a29=M,_0x281d79,_0x5b4a7c){const _0xbf4cae=_0x391085;super(),this['_config']=_0x119a29,this['_injector']=_0x281d79,this[_0xbf4cae(0x107)]=_0x5b4a7c;const {..._0x128263}=_0x1ea02d({},M,this[_0xbf4cae(0x161)]);this['_configService']['setConfig'](z,_0x128263);}['onStarting'](){const _0x230462=_0x391085;[[f],[g],[S]][_0x230462(0x14a)](_0x179e6a=>{const _0x246cb1=_0x230462;this[_0x246cb1(0x128)]['add'](_0x179e6a);});}[_0x391085(0x157)](){const _0x270aaf=_0x391085;this['_injector'][_0x270aaf(0x10d)](g),this['_injector'][_0x270aaf(0x10d)](S);}};$(b,_0x391085(0x162),W),$(b,_0x391085(0x15f),_0x47b158['UNIVER_UNKNOWN']),b=ie([_0x3bde12(_0x13dc44,_0xf1e801,_0x30c31e),w(0x1,_0x139a48(_0x4598ff)),w(0x2,_0x5c9166)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3622(_0x1e2cb5,_0x46c6a0){const _0x181acb=_0x181a();return _0x3622=function(_0x36228b,_0x3499ef){_0x36228b=_0x36228b-0x1a1;let _0x17ff40=_0x181acb[_0x36228b];return _0x17ff40;},_0x3622(_0x1e2cb5,_0x46c6a0);}(function(_0xdb2ffd,_0x484c73){const _0x550ebb=_0x3622,_0x564bf1=_0xdb2ffd();while(!![]){try{const _0x29c10f=-parseInt(_0x550ebb(0x1fb))/0x1*(-parseInt(_0x550ebb(0x1ab))/0x2)+-parseInt(_0x550ebb(0x1ae))/0x3+-parseInt(_0x550ebb(0x1eb))/0x4*(parseInt(_0x550ebb(0x211))/0x5)+parseInt(_0x550ebb(0x1a4))/0x6+-parseInt(_0x550ebb(0x1b9))/0x7+-parseInt(_0x550ebb(0x1fe))/0x8+parseInt(_0x550ebb(0x1db))/0x9;if(_0x29c10f===_0x484c73)break;else _0x564bf1['push'](_0x564bf1['shift']());}catch(_0x1f6048){_0x564bf1['push'](_0x564bf1['shift']());}}}(_0x181a,0xcf493),function(_0x40f899,_0x3fccb3){const _0x365f25=_0x3622;typeof exports=='object'&&typeof module<'u'?_0x3fccb3(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x365f25(0x212)&&define[_0x365f25(0x1f8)]?define(['exports',_0x365f25(0x1b1),'@univerjs-pro/license','@univerjs/core',_0x365f25(0x1e0),_0x365f25(0x215),'rxjs','@univerjs/network'],_0x3fccb3):(_0x40f899=typeof globalThis<'u'?globalThis:_0x40f899||self,_0x3fccb3(_0x40f899[_0x365f25(0x210)]={},_0x40f899[_0x365f25(0x216)],_0x40f899[_0x365f25(0x1ec)],_0x40f899[_0x365f25(0x1cf)],_0x40f899['UniverThreadCommentUi'],_0x40f899[_0x365f25(0x1c2)],_0x40f899[_0x365f25(0x1c1)],_0x40f899[_0x365f25(0x21c)]));}(this,function(_0x42ffda,_0x1f6c36,_0x20cd49,_0x593136,_0x1d8ca7,_0x3d1e2c,_0x5d43a5,_0x31a79b){'use strict';const _0xff7c46=_0x3622;const _0x211e0a=_0xff7c46(0x1d1);var _0x2614a7=(_0x384200=>(_0x384200[_0x384200['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x384200[_0x384200[_0xff7c46(0x1a5)]=0x1]=_0xff7c46(0x1a5),_0x384200[_0x384200['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x384200))(_0x2614a7||{}),_0x3fd1be=(_0x12f6a0=>(_0x12f6a0[_0x12f6a0[_0xff7c46(0x1b4)]=0x0]=_0xff7c46(0x1b4),_0x12f6a0[_0x12f6a0[_0xff7c46(0x224)]=0x1]=_0xff7c46(0x224),_0x12f6a0[_0x12f6a0[_0xff7c46(0x1a7)]=0x2]=_0xff7c46(0x1a7),_0x12f6a0[_0x12f6a0['Edit']=0x3]=_0xff7c46(0x21d),_0x12f6a0[_0x12f6a0[_0xff7c46(0x1f4)]=0x4]=_0xff7c46(0x1f4),_0x12f6a0[_0x12f6a0['Solve']=0x5]=_0xff7c46(0x202),_0x12f6a0[_0x12f6a0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x12f6a0))(_0x3fd1be||{});const _0x3fcb9d=_0x7fbc80=>_0x593136['dayjs'](new Date(+_0x7fbc80))[_0xff7c46(0x213)](_0xff7c46(0x214)),_0x1ce138=async(_0x8ffdcf,_0x68a2eb)=>{const _0x7eaac1=_0xff7c46,_0x3d24b8=_0x8ffdcf[_0x7eaac1(0x1bd)](_0x593136[_0x7eaac1(0x21f)]),_0x1e31ca=_0x8ffdcf['get'](_0x31a79b['HTTPService']);_0x68a2eb[_0x7eaac1(0x1a9)](_0x175a7a=>{const _0x7d4469=_0x7eaac1;_0x3d24b8[_0x7d4469(0x1ff)](_0x175a7a)&&_0x68a2eb['delete'](_0x175a7a);}),_0x68a2eb[_0x7eaac1(0x201)]&&(await _0x1e31ca[_0x7eaac1(0x1bd)](_0x7eaac1(0x1a6),{'params':{'userIDs':[..._0x68a2eb]}}))[_0x7eaac1(0x200)]['users'][_0x7eaac1(0x1a9)](_0x29770d=>{_0x29770d&&_0x3d24b8['addUser'](_0x29770d);});};var _0x31486e=Object[_0xff7c46(0x1b6)],_0x5b35e0=(_0x39c387,_0x4c0a13,_0x5e378b,_0x5a3ab4)=>{const _0x56d6fa=_0xff7c46;for(var _0x7a97c6=_0x5a3ab4>0x1?void 0x0:_0x5a3ab4?_0x31486e(_0x4c0a13,_0x5e378b):_0x4c0a13,_0x14c32d=_0x39c387[_0x56d6fa(0x1c5)]-0x1,_0x4296b4;_0x14c32d>=0x0;_0x14c32d--)(_0x4296b4=_0x39c387[_0x14c32d])&&(_0x7a97c6=_0x4296b4(_0x7a97c6)||_0x7a97c6);return _0x7a97c6;},_0x27dd48=(_0x1ca601,_0x5daa51)=>(_0x40d32e,_0x1edf39)=>_0x5daa51(_0x40d32e,_0x1edf39,_0x1ca601);let _0x13f5da=class extends _0x593136['Disposable']{constructor(_0x99fb8b,_0x1a1cff,_0x1dac8b,_0x5df93a){const _0x3ea74a=_0xff7c46;super(),this[_0x3ea74a(0x227)]=_0x99fb8b,this[_0x3ea74a(0x1fa)]=_0x1a1cff,this[_0x3ea74a(0x1d5)]=_0x1dac8b,this[_0x3ea74a(0x204)]=_0x5df93a,this[_0x3ea74a(0x1f1)](),this[_0x3ea74a(0x1ee)]();}['_initUserSync'](){const _0x50aa7c=_0xff7c46;this[_0x50aa7c(0x1f2)](this['_threadCommentModel'][_0x50aa7c(0x1e1)][_0x50aa7c(0x1e2)](_0x5d43a5['bufferTime'](0x10))[_0x50aa7c(0x223)](_0x18be80=>{const _0x33ee7d=_0x50aa7c,_0x335a8e=new Set();_0x18be80['forEach'](_0xb25225=>{const _0x309d95=_0x3622;switch(_0xb25225['type']){case _0x309d95(0x1c4):{const _0x31eb09=_0xb25225[_0x309d95(0x1a8)][_0x309d95(0x218)];_0x335a8e['add'](_0x31eb09);break;}}}),_0x1ce138(this[_0x33ee7d(0x204)],_0x335a8e);}));}[_0xff7c46(0x1f1)](){const _0x48dfd4=_0xff7c46;this[_0x48dfd4(0x1f2)](this['_commentService'][_0x48dfd4(0x1e1)][_0x48dfd4(0x223)](async _0xff9059=>{const _0x328489=_0x48dfd4;var _0x56ac70,_0x311519,_0x285a1a,_0x39ae17;const _0x89a12a=(_0x56ac70=this[_0x328489(0x1fa)][_0x328489(0x1dc)](_0xff9059[_0x328489(0x226)])[_0x328489(0x1ba)](_0x5d0ce1=>_0x5d0ce1['threadId']===_0xff9059[_0x328489(0x1d2)]))==null?void 0x0:_0x56ac70['root'];if(!_0x89a12a)return;const {unitId:_0xdb7052,subUnitId:_0xf3aea6}=_0x89a12a;switch(_0xff9059[_0x328489(0x1c6)]&&this[_0x328489(0x1d5)][_0x328489(0x1ed)](_0xff9059[_0x328489(0x1c6)]),_0xff9059[_0x328489(0x21e)]){case _0x3fd1be[_0x328489(0x224)]:break;case _0x3fd1be['Reply']:{this[_0x328489(0x1fa)][_0x328489(0x1e8)](_0xdb7052,_0xf3aea6,{'unitId':_0xdb7052,'subUnitId':_0xf3aea6,'ref':'','id':_0xff9059[_0x328489(0x1b8)],'dT':_0x3fcb9d(+_0xff9059[_0x328489(0x1d8)]),'threadId':_0xff9059[_0x328489(0x1d2)],'personId':(_0x285a1a=(_0x311519=_0xff9059['user'])==null?void 0x0:_0x311519[_0x328489(0x1ef)])!=null?_0x285a1a:_0xff9059[_0x328489(0x1c0)],'text':JSON[_0x328489(0x1d4)](_0xff9059[_0x328489(0x1d3)]),'parentId':_0x89a12a['id']});break;}case _0x3fd1be[_0x328489(0x1f4)]:{const _0x4d3fdc=this[_0x328489(0x1fa)][_0x328489(0x1c3)](_0xdb7052,_0xf3aea6,_0xff9059[_0x328489(0x1b8)]);_0x4d3fdc&&_0x4d3fdc[_0x328489(0x1f0)]&&this[_0x328489(0x1fa)][_0x328489(0x20f)](_0xdb7052,_0xf3aea6,_0xff9059[_0x328489(0x1b8)]);break;}case _0x3fd1be[_0x328489(0x21d)]:{this[_0x328489(0x1fa)][_0x328489(0x207)](_0xdb7052,_0xf3aea6,{'commentId':_0xff9059['replyId'],'text':JSON[_0x328489(0x1d4)](_0xff9059[_0x328489(0x1d3)])});break;}case _0x3fd1be[_0x328489(0x202)]:{const _0x476795=(_0x39ae17=this['_threadCommentModel']['getUnit'](_0xff9059[_0x328489(0x226)])['find'](_0x11f5b6=>_0x11f5b6['threadId']===_0xff9059[_0x328489(0x1d2)]))==null?void 0x0:_0x39ae17[_0x328489(0x1b0)];_0x476795&&this[_0x328489(0x1fa)][_0x328489(0x206)](_0xdb7052,_0xf3aea6,_0x476795['id'],_0xff9059[_0x328489(0x20d)]===_0x2614a7[_0x328489(0x1a5)]);break;}}}));}};_0x13f5da=_0x5b35e0([_0x27dd48(0x0,_0x593136[_0xff7c46(0x1ad)](_0x1f6c36[_0xff7c46(0x20a)])),_0x27dd48(0x1,_0x593136[_0xff7c46(0x1ad)](_0x3d1e2c[_0xff7c46(0x1ca)])),_0x27dd48(0x2,_0x593136[_0xff7c46(0x1ad)](_0x593136[_0xff7c46(0x21f)])),_0x27dd48(0x3,_0x593136[_0xff7c46(0x1ad)](_0x593136['Injector']))],_0x13f5da);const _0x56aa3b=_0xff7c46(0x1e5),_0x367ff1={};var _0x499845=Object[_0xff7c46(0x1b6)],_0x37003b=(_0x386b66,_0x1b14d7,_0x38acb1,_0x18b3c3)=>{for(var _0x5eb927=_0x18b3c3>0x1?void 0x0:_0x18b3c3?_0x499845(_0x1b14d7,_0x38acb1):_0x1b14d7,_0x3d8143=_0x386b66['length']-0x1,_0x297b23;_0x3d8143>=0x0;_0x3d8143--)(_0x297b23=_0x386b66[_0x3d8143])&&(_0x5eb927=_0x297b23(_0x5eb927)||_0x5eb927);return _0x5eb927;},_0x121997=(_0x19fd09,_0x1ff08c)=>(_0x52d0cc,_0xf2687f)=>_0x1ff08c(_0x52d0cc,_0xf2687f,_0x19fd09);function _0xa9e9a(_0x5e805e,_0x37cea4){const _0x35c037=_0xff7c46,_0x27fadc=_0x5e805e[_0x35c037(0x1ce)][0x0];return{..._0x37cea4,'id':_0x27fadc[_0x35c037(0x1b8)],'resolved':_0x5e805e[_0x35c037(0x20d)]===0x1,'dT':_0x3fcb9d(_0x27fadc[_0x35c037(0x1d8)]),'personId':_0x27fadc[_0x35c037(0x1c0)],'threadId':_0x27fadc[_0x35c037(0x1d2)]};}function _0x1e201c(_0x57a03d,_0x279abe,_0x1fd7b8){const _0x22ef3f=_0xff7c46;var _0x5e21ac,_0x5ac466;if(((_0x5ac466=(_0x5e21ac=_0x57a03d==null?void 0x0:_0x57a03d[_0x22ef3f(0x1ce)])==null?void 0x0:_0x5e21ac[_0x22ef3f(0x1c5)])!=null?_0x5ac466:0x0)>0x0){const _0x1a8560=(_0x51b871,_0x5cfa58)=>({'id':_0x51b871[_0x22ef3f(0x1b8)],'threadId':_0x51b871[_0x22ef3f(0x1d2)],'dT':_0x3fcb9d(_0x51b871[_0x22ef3f(0x1d8)]),'personId':_0x51b871[_0x22ef3f(0x1c0)],'resolved':_0x57a03d['solved']===_0x2614a7[_0x22ef3f(0x1a5)],'unitId':_0x279abe,'subUnitId':_0x1fd7b8,'text':JSON[_0x22ef3f(0x1d4)](_0x51b871[_0x22ef3f(0x1d3)]),'parentId':_0x5cfa58}),_0x22a2ae=_0x1a8560(_0x57a03d[_0x22ef3f(0x1ce)][0x0]);return{..._0x22a2ae,'children':_0x57a03d['replies']['slice'](0x1)[_0x22ef3f(0x1e7)](_0x290dcf=>_0x1a8560(_0x290dcf,_0x22a2ae['id']))};}return null;}let _0x33920d=class{constructor(_0x531e9a,_0x2842a5,_0x3c5c6b,_0x27d920){const _0x32687b=_0xff7c46;this[_0x32687b(0x1d0)]=_0x531e9a,this[_0x32687b(0x1d5)]=_0x2842a5,this[_0x32687b(0x1e9)]=_0x3c5c6b,this[_0x32687b(0x204)]=_0x27d920;}async[_0xff7c46(0x1e8)](_0x3c07b7){const _0x17c58f=_0xff7c46;var _0x567a27,_0x58ee70;const {parentId:_0x5021c8,unitId:_0x200d5a,text:_0x2bcf3e,threadId:_0x223cc4}=_0x3c07b7,_0xb991e6=(_0x58ee70=(_0x567a27=_0x2bcf3e[_0x17c58f(0x1cc)])==null?void 0x0:_0x567a27[_0x17c58f(0x1b7)](_0x275bdc=>_0x275bdc[_0x17c58f(0x1f6)]===_0x593136[_0x17c58f(0x20c)][_0x17c58f(0x21b)])[_0x17c58f(0x1e7)](_0x3669d6=>_0x3669d6['rangeId']))!=null?_0x58ee70:[],_0x12cd7d=JSON[_0x17c58f(0x219)](_0x2bcf3e),_0x5a3467=(await this[_0x17c58f(0x1e9)][_0x17c58f(0x1ac)](_0x200d5a))['getMemberID']();if(_0x5021c8){const _0x23a4ef={'memberId':_0x5a3467,'unitId':_0x200d5a,'content':_0x12cd7d,'mention':_0xb991e6,'threadId':_0x223cc4},_0x210201=(await this[_0x17c58f(0x1d0)][_0x17c58f(0x1c7)](_0x17c58f(0x1aa)+_0x200d5a+_0x17c58f(0x225),{'body':_0x23a4ef}))[_0x17c58f(0x200)][_0x17c58f(0x1f3)];return{..._0x3c07b7,'id':_0x210201[_0x17c58f(0x1b8)],'dT':_0x593136[_0x17c58f(0x20e)](+_0x210201[_0x17c58f(0x1d8)])[_0x17c58f(0x213)](_0x17c58f(0x214)),'personId':_0x210201[_0x17c58f(0x1c0)]};}else{const _0x1c41c8={'memberId':_0x5a3467,'unitId':_0x200d5a,'content':_0x12cd7d,'mention':_0xb991e6},_0x329da7=await this[_0x17c58f(0x1d0)][_0x17c58f(0x1c7)]('/universer-api/comment/unit/'+_0x200d5a+_0x17c58f(0x203),{'body':_0x1c41c8});return _0xa9e9a(_0x329da7[_0x17c58f(0x200)]['comment'],_0x3c07b7);}}async['updateComment'](_0x24aeec){const _0x2a7192=_0xff7c46;var _0x280d3b,_0x4bc8b0;const {text:_0x4149b8,unitId:_0x3eacb4}=_0x24aeec,_0x11cb9c=(_0x4bc8b0=(_0x280d3b=_0x4149b8[_0x2a7192(0x1cc)])==null?void 0x0:_0x280d3b[_0x2a7192(0x1b7)](_0x58b531=>_0x58b531[_0x2a7192(0x1f6)]===_0x593136[_0x2a7192(0x20c)][_0x2a7192(0x21b)])[_0x2a7192(0x1e7)](_0x3dd139=>_0x3dd139[_0x2a7192(0x1bb)]))!=null?_0x4bc8b0:[],_0x294e79=JSON[_0x2a7192(0x219)](_0x4149b8),_0x34a5c7=_0x24aeec[_0x2a7192(0x1d2)],_0x564a69=_0x24aeec['id'],_0x4800a9={'memberId':(await this[_0x2a7192(0x1e9)]['requireSession'](_0x3eacb4))[_0x2a7192(0x1a3)](),'unitId':_0x3eacb4,'threadId':_0x34a5c7,'mention':_0x11cb9c,'content':_0x294e79,'replyId':_0x564a69},_0xd4fb0f=await this[_0x2a7192(0x1d0)][_0x2a7192(0x1c7)](_0x2a7192(0x1aa)+_0x3eacb4+'/edit',{'body':_0x4800a9});return!_0xd4fb0f[_0x2a7192(0x200)][_0x2a7192(0x1e3)]||_0xd4fb0f[_0x2a7192(0x200)][_0x2a7192(0x1e3)][_0x2a7192(0x20b)]===0x1;}async[_0xff7c46(0x206)](_0x55355f){const _0x488a5b=_0xff7c46,{unitId:_0x30874e}=_0x55355f,_0x1089c4=_0x55355f[_0x488a5b(0x1d2)],_0x2d8c1f={'memberId':this['_userService'][_0x488a5b(0x1c8)]()[_0x488a5b(0x1ef)],'unitId':_0x30874e,'threadId':_0x1089c4,'solved':_0x55355f[_0x488a5b(0x1b3)]?_0x2614a7[_0x488a5b(0x1a5)]:_0x2614a7['OpenOrReOpen']},_0x410849=await this[_0x488a5b(0x1d0)][_0x488a5b(0x1c7)]('/universer-api/comment/unit/'+_0x30874e+_0x488a5b(0x1cd),{'body':_0x2d8c1f});return!_0x410849[_0x488a5b(0x200)]['error']||_0x410849[_0x488a5b(0x200)]['error'][_0x488a5b(0x20b)]===0x1;}async['deleteComment'](_0x2e848d,_0xa74a4f,_0x158a51,_0x42afad){const _0x321495=_0xff7c46,_0x19ffb4={'memberId':(await this[_0x321495(0x1e9)][_0x321495(0x1ac)](_0x2e848d))[_0x321495(0x1a3)](),'threadId':_0x158a51,'replyId':_0x42afad,'unitId':_0x2e848d},_0x4ee411=await this[_0x321495(0x1d0)][_0x321495(0x1c7)](_0x321495(0x1aa)+_0x2e848d+_0x321495(0x1df),{'body':_0x19ffb4});return!_0x4ee411[_0x321495(0x200)][_0x321495(0x1e3)]||_0x4ee411[_0x321495(0x200)][_0x321495(0x1e3)]['code']===0x1;}async[_0xff7c46(0x220)](_0x36ef29,_0x54236e,_0x2e1bcf){const _0x762d43=_0xff7c46,_0x2de55e={'unitId':_0x36ef29,'threadId':_0x2e1bcf},_0x36c7d5=await this[_0x762d43(0x1d0)][_0x762d43(0x1c7)](_0x762d43(0x1aa)+_0x36ef29+_0x762d43(0x1e6),{'body':_0x2de55e}),_0x335f97=_0x2e1bcf[_0x762d43(0x1e7)](_0xcd4e6f=>_0x1e201c(_0x36c7d5['body'][_0x762d43(0x222)][_0xcd4e6f],_0x36ef29,_0x54236e))[_0x762d43(0x1b7)](Boolean);return Object['values'](_0x36c7d5[_0x762d43(0x200)][_0x762d43(0x1f5)])['forEach'](_0x144d16=>{const _0x33eb81=_0x762d43;this[_0x33eb81(0x1d5)][_0x33eb81(0x1ed)](_0x144d16);}),_0x335f97;}[_0xff7c46(0x1c9)](_0x54028a){const _0x3ee006=_0xff7c46;return{'id':_0x54028a['id'],'threadId':_0x54028a[_0x3ee006(0x1d2)],'ref':_0x54028a['ref']};}};_0x33920d=_0x37003b([_0x121997(0x0,_0x593136[_0xff7c46(0x1ad)](_0x31a79b[_0xff7c46(0x1d6)])),_0x121997(0x1,_0x593136['Inject'](_0x593136[_0xff7c46(0x21f)])),_0x121997(0x2,_0x593136[_0xff7c46(0x1ad)](_0x1f6c36[_0xff7c46(0x1dd)])),_0x121997(0x3,_0x593136[_0xff7c46(0x1ad)](_0x593136['Injector']))],_0x33920d);var _0x3e13f1=Object[_0xff7c46(0x1b6)],_0x4ae154=(_0x4ecb74,_0x3dfef1,_0x46e467,_0x58bf01)=>{const _0x5b8239=_0xff7c46;for(var _0x449f1d=_0x58bf01>0x1?void 0x0:_0x58bf01?_0x3e13f1(_0x3dfef1,_0x46e467):_0x3dfef1,_0x5566a0=_0x4ecb74[_0x5b8239(0x1c5)]-0x1,_0x5ed04d;_0x5566a0>=0x0;_0x5566a0--)(_0x5ed04d=_0x4ecb74[_0x5566a0])&&(_0x449f1d=_0x5ed04d(_0x449f1d)||_0x449f1d);return _0x449f1d;},_0x21c94c=(_0x116d77,_0x3a8159)=>(_0x31254c,_0x459ef4)=>_0x3a8159(_0x31254c,_0x459ef4,_0x116d77);let _0x4f56af=class extends _0x593136[_0xff7c46(0x1ea)]{constructor(_0x5b7e55,_0x1005cb){const _0xc1a51e=_0xff7c46;super(),this[_0xc1a51e(0x1bc)]=_0x5b7e55,this['_threadCommentDataSource']=_0x1005cb,this[_0xc1a51e(0x217)]();}[_0xff7c46(0x217)](){const _0x1f950f=_0xff7c46;this[_0x1f950f(0x1bc)][_0x1f950f(0x1b5)]=this[_0x1f950f(0x1de)],this[_0x1f950f(0x1bc)][_0x1f950f(0x1a2)]=!0x1;}};_0x4f56af=_0x4ae154([_0x21c94c(0x0,_0x3d1e2c[_0xff7c46(0x21a)]),_0x21c94c(0x1,_0x593136[_0xff7c46(0x1ad)](_0x33920d))],_0x4f56af);var _0x18b3bb=Object[_0xff7c46(0x205)],_0x3c2ce7=Object[_0xff7c46(0x1b6)],_0x24b042=(_0x12091c,_0x3fef45,_0x208b79)=>_0x3fef45 in _0x12091c?_0x18b3bb(_0x12091c,_0x3fef45,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x208b79}):_0x12091c[_0x3fef45]=_0x208b79,_0x2f2e2c=(_0xddc872,_0x4ef00c,_0x100f7f,_0x3f92af)=>{const _0x840ddb=_0xff7c46;for(var _0x51d41e=_0x3f92af>0x1?void 0x0:_0x3f92af?_0x3c2ce7(_0x4ef00c,_0x100f7f):_0x4ef00c,_0x45a571=_0xddc872[_0x840ddb(0x1c5)]-0x1,_0x21833e;_0x45a571>=0x0;_0x45a571--)(_0x21833e=_0xddc872[_0x45a571])&&(_0x51d41e=_0x21833e(_0x51d41e)||_0x51d41e);return _0x51d41e;},_0x4a261f=(_0x6d1a06,_0x5edd60)=>(_0x129c70,_0x46a653)=>_0x5edd60(_0x129c70,_0x46a653,_0x6d1a06),_0x5078de=(_0x563df4,_0x54ff2a,_0x2b62d6)=>_0x24b042(_0x563df4,typeof _0x54ff2a!=_0xff7c46(0x1f7)?_0x54ff2a+'':_0x54ff2a,_0x2b62d6);_0x42ffda['UniverThreadCommentDataSourcePlugin']=class extends _0x593136[_0xff7c46(0x1fc)]{constructor(_0x1cf7ee=_0x367ff1,_0xc92118,_0x43a457){const _0x5edf24=_0xff7c46;super(),this[_0x5edf24(0x1d9)]=_0x1cf7ee,this[_0x5edf24(0x204)]=_0xc92118,this['_configService']=_0x43a457;const {..._0x2c12d7}=_0x593136[_0x5edf24(0x1bf)]({},_0x367ff1,this[_0x5edf24(0x1d9)]);this[_0x5edf24(0x1da)][_0x5edf24(0x1fd)](_0x56aa3b,_0x2c12d7);}[_0xff7c46(0x1cb)](){const _0x178b1a=_0xff7c46;[[_0x33920d],[_0x4f56af],[_0x13f5da]][_0x178b1a(0x1a9)](_0x3ce8c2=>{const _0x5a9dd6=_0x178b1a;this[_0x5a9dd6(0x204)][_0x5a9dd6(0x1c4)](_0x3ce8c2);});}['onReady'](){const _0x58261e=_0xff7c46;this[_0x58261e(0x204)][_0x58261e(0x1bd)](_0x4f56af),this[_0x58261e(0x204)][_0x58261e(0x1bd)](_0x13f5da);}},_0x5078de(_0x42ffda[_0xff7c46(0x1b2)],_0xff7c46(0x208),_0x211e0a),_0x5078de(_0x42ffda['UniverThreadCommentDataSourcePlugin'],_0xff7c46(0x21e),_0x593136['UniverInstanceType'][_0xff7c46(0x1af)]),_0x42ffda[_0xff7c46(0x1b2)]=_0x2f2e2c([_0x593136[_0xff7c46(0x221)](_0x1d8ca7[_0xff7c46(0x1d7)],_0x1f6c36[_0xff7c46(0x1f9)],_0x20cd49[_0xff7c46(0x209)]),_0x4a261f(0x1,_0x593136[_0xff7c46(0x1ad)](_0x593136[_0xff7c46(0x1e4)])),_0x4a261f(0x2,_0x593136['IConfigService'])],_0x42ffda[_0xff7c46(0x1b2)]),Object['defineProperty'](_0x42ffda,Symbol[_0xff7c46(0x1be)],{'value':_0xff7c46(0x1a1)});}));function _0x181a(){const _0x3c426=['UniverProLicense','addUser','_initUserSync','userID','parentId','_init','disposeWithMe','reply','Delete','users','rangeType','symbol','amd','UniverCollaborationClientPlugin','_threadCommentModel','1FkdVPm','Plugin','setConfig','12843648ruNMBx','getUser','body','size','Solve','/add','_injector','defineProperty','resolveComment','updateComment','pluginName','UniverLicensePlugin','CommentService','code','CustomRangeType','solved','dayjs','deleteComment','UniverProThreadCommentDatasource','421815sOrIsY','function','format','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment','UniverProCollaborationClient','_initDataSource','personId','stringify','IThreadCommentDataSourceService','COMMENT','UniverNetwork','Edit','type','UserManagerService','listComments','DependentOn','comments','subscribe','Add','/reply','unitId','_commentService','Module','syncUpdateMutationToColla','getMemberID','8448882qzLATW','Solved','/universer-api/user/list','Reply','payload','forEach','/universer-api/comment/unit/','2505842tPXPCL','requireSession','Inject','4352877lRwIQu','UNIVER_UNKNOWN','root','@univerjs-pro/collaboration-client','UniverThreadCommentDataSourcePlugin','resolved','Unknown','dataSource','getOwnPropertyDescriptor','filter','replyId','384657sSodAU','find','rangeId','_threadCommentDataSourceService','get','toStringTag','merge','userId','rxjs','UniverThreadComment','getComment','add','length','user','post','getCurrentUser','saveCommentToSnapshot','ThreadCommentModel','onStarting','customRanges','/solved','replies','UniverCore','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','content','parse','_userService','HTTPService','UniverThreadCommentUIPlugin','createTimestamp','_config','_configService','14731137ECENxj','getUnit','CollaborationSessionService','_threadCommentDataSource','/delete','@univerjs/thread-comment-ui','commentUpdate$','pipe','error','Injector','thread-comment-data-source.config','/list','map','addComment','_sessionService','Disposable','16TauciR'];_0x181a=function(){return _0x3c426;};return _0x181a();}
1
+ function _0xb5ff(_0x2950c4,_0x485374){const _0x4ba960=_0x4ba9();return _0xb5ff=function(_0xb5ff06,_0x47ea7e){_0xb5ff06=_0xb5ff06-0xa5;let _0x9329da=_0x4ba960[_0xb5ff06];return _0x9329da;},_0xb5ff(_0x2950c4,_0x485374);}(function(_0x1dee9a,_0x47f710){const _0x2b3e32=_0xb5ff,_0x20e539=_0x1dee9a();while(!![]){try{const _0x122eb7=parseInt(_0x2b3e32(0xf4))/0x1+-parseInt(_0x2b3e32(0xd9))/0x2+parseInt(_0x2b3e32(0xd8))/0x3+-parseInt(_0x2b3e32(0x12b))/0x4*(-parseInt(_0x2b3e32(0xeb))/0x5)+parseInt(_0x2b3e32(0xa5))/0x6+-parseInt(_0x2b3e32(0xc1))/0x7*(-parseInt(_0x2b3e32(0xa7))/0x8)+-parseInt(_0x2b3e32(0xed))/0x9;if(_0x122eb7===_0x47f710)break;else _0x20e539['push'](_0x20e539['shift']());}catch(_0x3601a8){_0x20e539['push'](_0x20e539['shift']());}}}(_0x4ba9,0x57e8b),function(_0x586ca1,_0x2b454f){const _0x129ad1=_0xb5ff;typeof exports==_0x129ad1(0xe1)&&typeof module<'u'?_0x2b454f(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x129ad1(0xe5)&&define['amd']?define([_0x129ad1(0xcc),_0x129ad1(0xba),_0x129ad1(0xbb),'@univerjs/core',_0x129ad1(0xc5),_0x129ad1(0xc0),_0x129ad1(0x100),_0x129ad1(0xe8)],_0x2b454f):(_0x586ca1=typeof globalThis<'u'?globalThis:_0x586ca1||self,_0x2b454f(_0x586ca1[_0x129ad1(0xe4)]={},_0x586ca1['UniverProCollaborationClient'],_0x586ca1['UniverProLicense'],_0x586ca1['UniverCore'],_0x586ca1[_0x129ad1(0xe7)],_0x586ca1[_0x129ad1(0xef)],_0x586ca1['rxjs'],_0x586ca1['UniverNetwork']));}(this,function(_0x1824fb,_0xca3e5c,_0x587bb1,_0xab9f20,_0xd8be23,_0x5bed43,_0x541ab7,_0xc5c16c){'use strict';const _0xe9f3a4=_0xb5ff;const _0x356f80=_0xe9f3a4(0xb2);var _0x426f9e=(_0x316a4e=>(_0x316a4e[_0x316a4e['OpenOrReOpen']=0x0]=_0xe9f3a4(0x116),_0x316a4e[_0x316a4e[_0xe9f3a4(0xee)]=0x1]=_0xe9f3a4(0xee),_0x316a4e[_0x316a4e[_0xe9f3a4(0xfd)]=-0x1]=_0xe9f3a4(0xfd),_0x316a4e))(_0x426f9e||{}),_0x596dec=(_0x267c10=>(_0x267c10[_0x267c10['Unknown']=0x0]=_0xe9f3a4(0xf8),_0x267c10[_0x267c10[_0xe9f3a4(0xdc)]=0x1]=_0xe9f3a4(0xdc),_0x267c10[_0x267c10['Reply']=0x2]=_0xe9f3a4(0xc6),_0x267c10[_0x267c10[_0xe9f3a4(0xea)]=0x3]=_0xe9f3a4(0xea),_0x267c10[_0x267c10['Delete']=0x4]=_0xe9f3a4(0x109),_0x267c10[_0x267c10[_0xe9f3a4(0xbe)]=0x5]=_0xe9f3a4(0xbe),_0x267c10[_0x267c10[_0xe9f3a4(0xfd)]=-0x1]=_0xe9f3a4(0xfd),_0x267c10))(_0x596dec||{});const _0x8a87c6=_0x5f3597=>_0xab9f20[_0xe9f3a4(0x10a)](new Date(+_0x5f3597))[_0xe9f3a4(0x11b)](_0xe9f3a4(0xd0)),_0x304fdf=async(_0x465e77,_0x30d6c1)=>{const _0x3ab4c6=_0xe9f3a4,_0x32a284=_0x465e77[_0x3ab4c6(0x10d)](_0xab9f20[_0x3ab4c6(0x108)]),_0x228d6c=_0x465e77[_0x3ab4c6(0x10d)](_0xc5c16c[_0x3ab4c6(0x120)]);_0x30d6c1[_0x3ab4c6(0x110)](_0x1b522d=>{const _0xea251a=_0x3ab4c6;_0x32a284[_0xea251a(0x10c)](_0x1b522d)&&_0x30d6c1[_0xea251a(0x104)](_0x1b522d);}),_0x30d6c1[_0x3ab4c6(0xac)]&&(await _0x228d6c[_0x3ab4c6(0x10d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x30d6c1]}}))[_0x3ab4c6(0xb5)]['users']['forEach'](_0x220bd0=>{const _0x300052=_0x3ab4c6;_0x220bd0&&_0x32a284[_0x300052(0x11c)](_0x220bd0);});};var _0x27d704=Object[_0xe9f3a4(0x128)],_0x1c6669=(_0x397e2b,_0x44a2e2,_0x4446fd,_0x2ea5c1)=>{const _0x2463aa=_0xe9f3a4;for(var _0x588980=_0x2ea5c1>0x1?void 0x0:_0x2ea5c1?_0x27d704(_0x44a2e2,_0x4446fd):_0x44a2e2,_0x586b31=_0x397e2b[_0x2463aa(0xf6)]-0x1,_0x4d3558;_0x586b31>=0x0;_0x586b31--)(_0x4d3558=_0x397e2b[_0x586b31])&&(_0x588980=_0x4d3558(_0x588980)||_0x588980);return _0x588980;},_0x273b00=(_0x500dfe,_0x210789)=>(_0x5c7890,_0xca9bd1)=>_0x210789(_0x5c7890,_0xca9bd1,_0x500dfe);let _0x356766=class extends _0xab9f20[_0xe9f3a4(0x119)]{constructor(_0x420523,_0x387c51,_0x50cfc9,_0x2265fe){const _0x47c9f0=_0xe9f3a4;super(),this[_0x47c9f0(0xfc)]=_0x420523,this[_0x47c9f0(0x127)]=_0x387c51,this['_userService']=_0x50cfc9,this['_injector']=_0x2265fe,this['_init'](),this[_0x47c9f0(0xdd)]();}[_0xe9f3a4(0xdd)](){const _0x3448b5=_0xe9f3a4;this[_0x3448b5(0x111)](this[_0x3448b5(0x127)][_0x3448b5(0xfe)][_0x3448b5(0xe2)](_0x541ab7[_0x3448b5(0xb0)](0x10))['subscribe'](_0x433e69=>{const _0x57d482=_0x3448b5,_0x33790d=new Set();_0x433e69['forEach'](_0x2354cb=>{const _0x11b9e7=_0xb5ff;switch(_0x2354cb[_0x11b9e7(0xdb)]){case _0x11b9e7(0x101):{const _0x57d86e=_0x2354cb[_0x11b9e7(0x12c)][_0x11b9e7(0x11f)];_0x33790d[_0x11b9e7(0x101)](_0x57d86e);break;}}}),_0x304fdf(this[_0x57d482(0xbf)],_0x33790d);}));}[_0xe9f3a4(0xae)](){const _0x5d96a3=_0xe9f3a4;this[_0x5d96a3(0x111)](this[_0x5d96a3(0xfc)][_0x5d96a3(0xfe)][_0x5d96a3(0x114)](async _0x32316d=>{const _0x39a633=_0x5d96a3;var _0x3f65a8,_0x59a9ad,_0xe813c4,_0x51d637;const _0x3d2158=(_0x3f65a8=this[_0x39a633(0x127)][_0x39a633(0xe9)](_0x32316d['unitId'])[_0x39a633(0xc2)](_0x4c7c87=>_0x4c7c87[_0x39a633(0xcf)]===_0x32316d['threadId']))==null?void 0x0:_0x3f65a8[_0x39a633(0xbd)];if(!_0x3d2158)return;const {unitId:_0x5adeb4,subUnitId:_0x54f828}=_0x3d2158;switch(_0x32316d['user']&&this[_0x39a633(0xad)]['addUser'](_0x32316d['user']),_0x32316d[_0x39a633(0xdb)]){case _0x596dec[_0x39a633(0xdc)]:break;case _0x596dec['Reply']:{this['_threadCommentModel'][_0x39a633(0xf5)](_0x5adeb4,_0x54f828,{'unitId':_0x5adeb4,'subUnitId':_0x54f828,'ref':'','id':_0x32316d[_0x39a633(0xa8)],'dT':_0x8a87c6(+_0x32316d[_0x39a633(0x112)]),'threadId':_0x32316d[_0x39a633(0xcf)],'personId':(_0xe813c4=(_0x59a9ad=_0x32316d[_0x39a633(0x10b)])==null?void 0x0:_0x59a9ad[_0x39a633(0x129)])!=null?_0xe813c4:_0x32316d[_0x39a633(0xcd)],'text':JSON[_0x39a633(0xb9)](_0x32316d[_0x39a633(0x11a)]),'parentId':_0x3d2158['id']});break;}case _0x596dec[_0x39a633(0x109)]:{const _0x3bcc7c=this['_threadCommentModel']['getComment'](_0x5adeb4,_0x54f828,_0x32316d[_0x39a633(0xa8)]);_0x3bcc7c&&_0x3bcc7c['parentId']&&this[_0x39a633(0x127)][_0x39a633(0x118)](_0x5adeb4,_0x54f828,_0x32316d['replyId']);break;}case _0x596dec[_0x39a633(0xea)]:{this[_0x39a633(0x127)][_0x39a633(0xd7)](_0x5adeb4,_0x54f828,{'commentId':_0x32316d[_0x39a633(0xa8)],'text':JSON[_0x39a633(0xb9)](_0x32316d[_0x39a633(0x11a)])});break;}case _0x596dec[_0x39a633(0xbe)]:{const _0x528fd6=(_0x51d637=this['_threadCommentModel'][_0x39a633(0xe9)](_0x32316d[_0x39a633(0x11e)])[_0x39a633(0xc2)](_0x224478=>_0x224478['threadId']===_0x32316d[_0x39a633(0xcf)]))==null?void 0x0:_0x51d637[_0x39a633(0xbd)];_0x528fd6&&this[_0x39a633(0x127)][_0x39a633(0xc9)](_0x5adeb4,_0x54f828,_0x528fd6['id'],_0x32316d[_0x39a633(0xa6)]===_0x426f9e[_0x39a633(0xee)]);break;}}}));}};_0x356766=_0x1c6669([_0x273b00(0x0,_0xab9f20[_0xe9f3a4(0x105)](_0xca3e5c[_0xe9f3a4(0xe6)])),_0x273b00(0x1,_0xab9f20['Inject'](_0x5bed43[_0xe9f3a4(0xfb)])),_0x273b00(0x2,_0xab9f20[_0xe9f3a4(0x105)](_0xab9f20['UserManagerService'])),_0x273b00(0x3,_0xab9f20[_0xe9f3a4(0x105)](_0xab9f20['Injector']))],_0x356766);const _0x31b4e8=_0xe9f3a4(0xd5),_0x54e5b0={};var _0x5761c0=Object['getOwnPropertyDescriptor'],_0x3c7761=(_0x8840e7,_0x57a2cf,_0x10f7af,_0x97f61f)=>{const _0x440f40=_0xe9f3a4;for(var _0x184689=_0x97f61f>0x1?void 0x0:_0x97f61f?_0x5761c0(_0x57a2cf,_0x10f7af):_0x57a2cf,_0x42a98c=_0x8840e7[_0x440f40(0xf6)]-0x1,_0x1b3536;_0x42a98c>=0x0;_0x42a98c--)(_0x1b3536=_0x8840e7[_0x42a98c])&&(_0x184689=_0x1b3536(_0x184689)||_0x184689);return _0x184689;},_0x36abe4=(_0x49e4e2,_0x292312)=>(_0x377697,_0x574acb)=>_0x292312(_0x377697,_0x574acb,_0x49e4e2);function _0x38e97a(_0x281f52,_0x347328){const _0x3d4dfb=_0xe9f3a4,_0x23b276=_0x281f52[_0x3d4dfb(0xc8)][0x0];return{..._0x347328,'id':_0x23b276[_0x3d4dfb(0xa8)],'resolved':_0x281f52[_0x3d4dfb(0xa6)]===0x1,'dT':_0x8a87c6(_0x23b276[_0x3d4dfb(0x112)]),'personId':_0x23b276['userId'],'threadId':_0x23b276[_0x3d4dfb(0xcf)]};}function _0x2a36a4(_0x4d7536,_0xf1f796,_0x5e7f81){const _0x54533a=_0xe9f3a4;var _0x586161,_0x37acb3;if(((_0x37acb3=(_0x586161=_0x4d7536==null?void 0x0:_0x4d7536[_0x54533a(0xc8)])==null?void 0x0:_0x586161[_0x54533a(0xf6)])!=null?_0x37acb3:0x0)>0x0){const _0x2fedf3=(_0x57e0e1,_0x28e0e0)=>({'id':_0x57e0e1[_0x54533a(0xa8)],'threadId':_0x57e0e1['threadId'],'dT':_0x8a87c6(_0x57e0e1[_0x54533a(0x112)]),'personId':_0x57e0e1['userId'],'resolved':_0x4d7536[_0x54533a(0xa6)]===_0x426f9e[_0x54533a(0xee)],'unitId':_0xf1f796,'subUnitId':_0x5e7f81,'text':JSON[_0x54533a(0xb9)](_0x57e0e1[_0x54533a(0x11a)]),'parentId':_0x28e0e0}),_0x421e3e=_0x2fedf3(_0x4d7536[_0x54533a(0xc8)][0x0]);return{..._0x421e3e,'children':_0x4d7536[_0x54533a(0xc8)][_0x54533a(0x125)](0x1)[_0x54533a(0xde)](_0x3bab27=>_0x2fedf3(_0x3bab27,_0x421e3e['id']))};}return null;}let _0x2d33a4=class{constructor(_0x18df07,_0xacb44c,_0xff1e15,_0x2ccc0d){const _0x94cffe=_0xe9f3a4;this[_0x94cffe(0xec)]=_0x18df07,this[_0x94cffe(0xad)]=_0xacb44c,this[_0x94cffe(0xbc)]=_0xff1e15,this[_0x94cffe(0xbf)]=_0x2ccc0d;}async['addComment'](_0x305f15){const _0x488e51=_0xe9f3a4;var _0x49d6f7,_0x1ffe6a;const {parentId:_0x49fcb1,unitId:_0x7398eb,text:_0xfb04cb,threadId:_0x432e91}=_0x305f15,_0x5d0cc5=(_0x1ffe6a=(_0x49d6f7=_0xfb04cb['customRanges'])==null?void 0x0:_0x49d6f7[_0x488e51(0x12a)](_0x4744af=>_0x4744af['rangeType']===_0xab9f20[_0x488e51(0xda)][_0x488e51(0x124)])[_0x488e51(0xde)](_0x2096bd=>_0x2096bd['rangeId']))!=null?_0x1ffe6a:[],_0x201a73=JSON[_0x488e51(0xc3)](_0xfb04cb),_0x2ecd09=(await this[_0x488e51(0xbc)]['requireSession'](_0x7398eb))['getMemberID']();if(_0x49fcb1){const _0x35ccec={'memberId':_0x2ecd09,'unitId':_0x7398eb,'content':_0x201a73,'mention':_0x5d0cc5,'threadId':_0x432e91},_0x663406=(await this[_0x488e51(0xec)][_0x488e51(0x122)]('/universer-api/comment/unit/'+_0x7398eb+_0x488e51(0xdf),{'body':_0x35ccec}))['body']['reply'];return{..._0x305f15,'id':_0x663406[_0x488e51(0xa8)],'dT':_0xab9f20[_0x488e51(0x10a)](+_0x663406['createTimestamp'])[_0x488e51(0x11b)](_0x488e51(0xd0)),'personId':_0x663406[_0x488e51(0xcd)]};}else{const _0x5edd3a={'memberId':_0x2ecd09,'unitId':_0x7398eb,'content':_0x201a73,'mention':_0x5d0cc5},_0x3eddc9=await this[_0x488e51(0xec)][_0x488e51(0x122)](_0x488e51(0x126)+_0x7398eb+_0x488e51(0xca),{'body':_0x5edd3a});return _0x38e97a(_0x3eddc9[_0x488e51(0xb5)][_0x488e51(0xd4)],_0x305f15);}}async[_0xe9f3a4(0xd7)](_0x228b8b){const _0x3951bb=_0xe9f3a4;var _0x198b19,_0x549f43;const {text:_0x116267,unitId:_0x14781f}=_0x228b8b,_0x234d04=(_0x549f43=(_0x198b19=_0x116267[_0x3951bb(0xf0)])==null?void 0x0:_0x198b19[_0x3951bb(0x12a)](_0x246a7f=>_0x246a7f[_0x3951bb(0x102)]===_0xab9f20[_0x3951bb(0xda)][_0x3951bb(0x124)])[_0x3951bb(0xde)](_0x1fe575=>_0x1fe575[_0x3951bb(0x11d)]))!=null?_0x549f43:[],_0x3a69ae=JSON[_0x3951bb(0xc3)](_0x116267),_0x5db571=_0x228b8b[_0x3951bb(0xcf)],_0x21c9eb=_0x228b8b['id'],_0x331793={'memberId':(await this[_0x3951bb(0xbc)][_0x3951bb(0x123)](_0x14781f))[_0x3951bb(0xce)](),'unitId':_0x14781f,'threadId':_0x5db571,'mention':_0x234d04,'content':_0x3a69ae,'replyId':_0x21c9eb},_0x2d9859=await this[_0x3951bb(0xec)][_0x3951bb(0x122)](_0x3951bb(0x126)+_0x14781f+_0x3951bb(0xe0),{'body':_0x331793});return!_0x2d9859['body'][_0x3951bb(0x113)]||_0x2d9859[_0x3951bb(0xb5)][_0x3951bb(0x113)][_0x3951bb(0x10e)]===0x1;}async[_0xe9f3a4(0xc9)](_0x4d084e){const _0x256ba1=_0xe9f3a4,{unitId:_0x1a2a1e}=_0x4d084e,_0x522c4f=_0x4d084e[_0x256ba1(0xcf)],_0x59d72f={'memberId':this['_userService'][_0x256ba1(0xb8)]()[_0x256ba1(0x129)],'unitId':_0x1a2a1e,'threadId':_0x522c4f,'solved':_0x4d084e[_0x256ba1(0xd2)]?_0x426f9e[_0x256ba1(0xee)]:_0x426f9e[_0x256ba1(0x116)]},_0x29ec4f=await this[_0x256ba1(0xec)]['post'](_0x256ba1(0x126)+_0x1a2a1e+'/solved',{'body':_0x59d72f});return!_0x29ec4f[_0x256ba1(0xb5)][_0x256ba1(0x113)]||_0x29ec4f['body'][_0x256ba1(0x113)][_0x256ba1(0x10e)]===0x1;}async['deleteComment'](_0x4b6fca,_0x4b5021,_0x2f36bb,_0x1b6390){const _0x46ddc6=_0xe9f3a4,_0x403742={'memberId':(await this['_sessionService'][_0x46ddc6(0x123)](_0x4b6fca))[_0x46ddc6(0xce)](),'threadId':_0x2f36bb,'replyId':_0x1b6390,'unitId':_0x4b6fca},_0xec3413=await this['_httpService'][_0x46ddc6(0x122)](_0x46ddc6(0x126)+_0x4b6fca+_0x46ddc6(0xa9),{'body':_0x403742});return!_0xec3413[_0x46ddc6(0xb5)][_0x46ddc6(0x113)]||_0xec3413[_0x46ddc6(0xb5)]['error'][_0x46ddc6(0x10e)]===0x1;}async['listComments'](_0x462a12,_0x35ff38,_0x555ec7){const _0x27344c=_0xe9f3a4,_0x16c530={'unitId':_0x462a12,'threadId':_0x555ec7},_0x594387=await this[_0x27344c(0xec)]['post'](_0x27344c(0x126)+_0x462a12+_0x27344c(0xc7),{'body':_0x16c530}),_0x575260=_0x555ec7[_0x27344c(0xde)](_0x4bf743=>_0x2a36a4(_0x594387['body'][_0x27344c(0x107)][_0x4bf743],_0x462a12,_0x35ff38))[_0x27344c(0x12a)](Boolean);return Object[_0x27344c(0x121)](_0x594387[_0x27344c(0xb5)][_0x27344c(0xe3)])[_0x27344c(0x110)](_0x3e33b6=>{const _0x36339e=_0x27344c;this[_0x36339e(0xad)][_0x36339e(0x11c)](_0x3e33b6);}),_0x575260;}[_0xe9f3a4(0x10f)](_0x4b1572){const _0x2ff207=_0xe9f3a4;return{'id':_0x4b1572['id'],'threadId':_0x4b1572[_0x2ff207(0xcf)],'ref':_0x4b1572[_0x2ff207(0x106)]};}};_0x2d33a4=_0x3c7761([_0x36abe4(0x0,_0xab9f20[_0xe9f3a4(0x105)](_0xc5c16c[_0xe9f3a4(0x120)])),_0x36abe4(0x1,_0xab9f20[_0xe9f3a4(0x105)](_0xab9f20[_0xe9f3a4(0x108)])),_0x36abe4(0x2,_0xab9f20['Inject'](_0xca3e5c[_0xe9f3a4(0xd3)])),_0x36abe4(0x3,_0xab9f20['Inject'](_0xab9f20[_0xe9f3a4(0xb6)]))],_0x2d33a4);var _0x261192=Object['getOwnPropertyDescriptor'],_0x53c2f9=(_0x489e64,_0x103186,_0x5ea6a3,_0x273a14)=>{const _0x5c2b49=_0xe9f3a4;for(var _0x15b68b=_0x273a14>0x1?void 0x0:_0x273a14?_0x261192(_0x103186,_0x5ea6a3):_0x103186,_0x45919e=_0x489e64[_0x5c2b49(0xf6)]-0x1,_0x2bb198;_0x45919e>=0x0;_0x45919e--)(_0x2bb198=_0x489e64[_0x45919e])&&(_0x15b68b=_0x2bb198(_0x15b68b)||_0x15b68b);return _0x15b68b;},_0x1fb187=(_0x51214c,_0x1e84a1)=>(_0x511209,_0x460259)=>_0x1e84a1(_0x511209,_0x460259,_0x51214c);let _0x41e2a1=class extends _0xab9f20[_0xe9f3a4(0x119)]{constructor(_0xbd22fc,_0x4fdeac){const _0x869cfd=_0xe9f3a4;super(),this[_0x869cfd(0xd6)]=_0xbd22fc,this[_0x869cfd(0xcb)]=_0x4fdeac,this[_0x869cfd(0xaa)]();}[_0xe9f3a4(0xaa)](){const _0x13c5f9=_0xe9f3a4;this[_0x13c5f9(0xd6)]['dataSource']=this[_0x13c5f9(0xcb)],this[_0x13c5f9(0xd6)]['syncUpdateMutationToColla']=!0x1;}};_0x41e2a1=_0x53c2f9([_0x1fb187(0x0,_0x5bed43[_0xe9f3a4(0xff)]),_0x1fb187(0x1,_0xab9f20[_0xe9f3a4(0x105)](_0x2d33a4))],_0x41e2a1);var _0x125f2e=Object[_0xe9f3a4(0xf7)],_0x2955bb=Object[_0xe9f3a4(0x128)],_0x231f7e=(_0x2ba0c6,_0x3d1a79,_0x2cb45f)=>_0x3d1a79 in _0x2ba0c6?_0x125f2e(_0x2ba0c6,_0x3d1a79,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2cb45f}):_0x2ba0c6[_0x3d1a79]=_0x2cb45f,_0x489996=(_0x5ed791,_0x110c6d,_0x2b34a0,_0x4a2710)=>{const _0x3fd8e2=_0xe9f3a4;for(var _0x506f52=_0x4a2710>0x1?void 0x0:_0x4a2710?_0x2955bb(_0x110c6d,_0x2b34a0):_0x110c6d,_0x4a35da=_0x5ed791[_0x3fd8e2(0xf6)]-0x1,_0x28dc07;_0x4a35da>=0x0;_0x4a35da--)(_0x28dc07=_0x5ed791[_0x4a35da])&&(_0x506f52=_0x28dc07(_0x506f52)||_0x506f52);return _0x506f52;},_0x152736=(_0x3484b0,_0x2f13ac)=>(_0x2f37e9,_0x4805d2)=>_0x2f13ac(_0x2f37e9,_0x4805d2,_0x3484b0),_0x3aa028=(_0x1567a8,_0x210649,_0xbf7559)=>_0x231f7e(_0x1567a8,typeof _0x210649!=_0xe9f3a4(0xfa)?_0x210649+'':_0x210649,_0xbf7559);_0x1824fb[_0xe9f3a4(0x103)]=class extends _0xab9f20[_0xe9f3a4(0xb3)]{constructor(_0x260acc=_0x54e5b0,_0x1a444d,_0x29cf61){const _0x2f2fdb=_0xe9f3a4;super(),this[_0x2f2fdb(0xb1)]=_0x260acc,this[_0x2f2fdb(0xbf)]=_0x1a444d,this[_0x2f2fdb(0xf9)]=_0x29cf61;const {..._0x9e3cb1}=_0xab9f20[_0x2f2fdb(0x117)]({},_0x54e5b0,this[_0x2f2fdb(0xb1)]);this['_configService']['setConfig'](_0x31b4e8,_0x9e3cb1);}[_0xe9f3a4(0xf3)](){const _0x526b89=_0xe9f3a4;[[_0x2d33a4],[_0x41e2a1],[_0x356766]][_0x526b89(0x110)](_0x134292=>{const _0x3933cf=_0x526b89;this[_0x3933cf(0xbf)][_0x3933cf(0x101)](_0x134292);});}[_0xe9f3a4(0x115)](){const _0x4bff9c=_0xe9f3a4;this[_0x4bff9c(0xbf)]['get'](_0x41e2a1),this['_injector'][_0x4bff9c(0x10d)](_0x356766);}},_0x3aa028(_0x1824fb[_0xe9f3a4(0x103)],_0xe9f3a4(0xc4),_0x356f80),_0x3aa028(_0x1824fb[_0xe9f3a4(0x103)],_0xe9f3a4(0xdb),_0xab9f20[_0xe9f3a4(0xb4)][_0xe9f3a4(0xd1)]),_0x1824fb[_0xe9f3a4(0x103)]=_0x489996([_0xab9f20[_0xe9f3a4(0xab)](_0xd8be23['UniverThreadCommentUIPlugin'],_0xca3e5c[_0xe9f3a4(0xf2)],_0x587bb1['UniverLicensePlugin']),_0x152736(0x1,_0xab9f20[_0xe9f3a4(0x105)](_0xab9f20[_0xe9f3a4(0xb6)])),_0x152736(0x2,_0xab9f20[_0xe9f3a4(0xf1)])],_0x1824fb[_0xe9f3a4(0x103)]),Object[_0xe9f3a4(0xf7)](_0x1824fb,Symbol[_0xe9f3a4(0xaf)],{'value':_0xe9f3a4(0xb7)});}));function _0x4ba9(){const _0x5d0903=['symbol','ThreadCommentModel','_commentService','UNRECOGNIZED','commentUpdate$','IThreadCommentDataSourceService','rxjs','add','rangeType','UniverThreadCommentDataSourcePlugin','delete','Inject','ref','comments','UserManagerService','Delete','dayjs','user','getUser','get','code','saveCommentToSnapshot','forEach','disposeWithMe','createTimestamp','error','subscribe','onReady','OpenOrReOpen','merge','deleteComment','Disposable','content','format','addUser','rangeId','unitId','personId','HTTPService','values','post','requireSession','COMMENT','slice','/universer-api/comment/unit/','_threadCommentModel','getOwnPropertyDescriptor','userID','filter','4XbtsNi','payload','2472798kNNZdY','solved','1784UYNzSk','replyId','/delete','_initDataSource','DependentOn','size','_userService','_init','toStringTag','bufferTime','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Plugin','UniverInstanceType','body','Injector','Module','getCurrentUser','parse','@univerjs-pro/collaboration-client','@univerjs-pro/license','_sessionService','root','Solve','_injector','@univerjs/thread-comment','7707LToQRJ','find','stringify','pluginName','@univerjs/thread-comment-ui','Reply','/list','replies','resolveComment','/add','_threadCommentDataSource','exports','userId','getMemberID','threadId','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','resolved','CollaborationSessionService','comment','thread-comment-data-source.config','_threadCommentDataSourceService','updateComment','249828qIWRuw','507922JXbjQT','CustomRangeType','type','Add','_initUserSync','map','/reply','/edit','object','pipe','users','UniverProThreadCommentDatasource','function','CommentService','UniverThreadCommentUi','@univerjs/network','getUnit','Edit','261735fRafxj','_httpService','7163748svHdRL','Solved','UniverThreadComment','customRanges','IConfigService','UniverCollaborationClientPlugin','onStarting','616729TPJFHK','addComment','length','defineProperty','Unknown','_configService'];_0x4ba9=function(){return _0x5d0903;};return _0x4ba9();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.1",
3
+ "version": "0.9.2-nightly.202507111607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.1",
49
- "@univerjs-pro/license": "0.9.1",
50
- "@univerjs/protocol": "0.1.47-alpha.0",
51
- "@univerjs/thread-comment": "0.9.1",
52
- "@univerjs/thread-comment-ui": "0.9.1",
53
- "@univerjs/core": "0.9.1",
54
- "@univerjs/network": "0.9.1"
48
+ "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507111607",
49
+ "@univerjs-pro/license": "0.9.2-nightly.202507111607",
50
+ "@univerjs/network": "0.9.2-nightly.202507111607",
51
+ "@univerjs/thread-comment": "0.9.2-nightly.202507111607",
52
+ "@univerjs/thread-comment-ui": "0.9.2-nightly.202507111607",
53
+ "@univerjs/core": "0.9.2-nightly.202507111607",
54
+ "@univerjs/protocol": "0.1.47-alpha.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.9.1"
61
+ "@univerjs-infra/shared": "0.9.2"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",