@univerjs-pro/thread-comment-datasource 0.3.0-alpha.0 → 0.3.0-nightly.202410101606
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 _0x1f4f70=_0x2fe5;(function(_0x5f4eba,_0x1fec57){const _0x1c694f=_0x2fe5,_0x2a8bf1=_0x5f4eba();while(!![]){try{const _0x56610d=-parseInt(_0x1c694f(0x10e))/0x1*(parseInt(_0x1c694f(0x14b))/0x2)+-parseInt(_0x1c694f(0xed))/0x3+parseInt(_0x1c694f(0x131))/0x4*(-parseInt(_0x1c694f(0xf9))/0x5)+-parseInt(_0x1c694f(0xdf))/0x6+-parseInt(_0x1c694f(0xff))/0x7*(parseInt(_0x1c694f(0xf0))/0x8)+-parseInt(_0x1c694f(0x14c))/0x9*(parseInt(_0x1c694f(0x14e))/0xa)+-parseInt(_0x1c694f(0xf1))/0xb*(-parseInt(_0x1c694f(0x11c))/0xc);if(_0x56610d===_0x1fec57)break;else _0x2a8bf1['push'](_0x2a8bf1['shift']());}catch(_0x308779){_0x2a8bf1['push'](_0x2a8bf1['shift']());}}}(_0x200b,0x943ab));Object['defineProperty'](exports,Symbol[_0x1f4f70(0x14f)],{'value':'Module'});const c=require('@univerjs/core'),g=require('@univerjs/thread-comment'),N=require(_0x1f4f70(0x108)),y=require('@univerjs-pro/collaboration-client'),E=require(_0x1f4f70(0x15f)),q=require('rxjs'),O=require(_0x1f4f70(0x115)),$=require(_0x1f4f70(0x137)),x=_0x1f4f70(0x119);function _0x2fe5(_0x253a93,_0xc2c45a){const _0x200b19=_0x200b();return _0x2fe5=function(_0x2fe5a1,_0x2aff71){_0x2fe5a1=_0x2fe5a1-0xd4;let _0x50abad=_0x200b19[_0x2fe5a1];return _0x50abad;},_0x2fe5(_0x253a93,_0xc2c45a);}var p=(_0xb145e4=>(_0xb145e4[_0xb145e4['OpenOrReOpen']=0x0]=_0x1f4f70(0xd7),_0xb145e4[_0xb145e4[_0x1f4f70(0xd8)]=0x1]=_0x1f4f70(0xd8),_0xb145e4[_0xb145e4[_0x1f4f70(0x124)]=-0x1]=_0x1f4f70(0x124),_0xb145e4))(p||{}),v=(_0x574375=>(_0x574375[_0x574375['Unknown']=0x0]=_0x1f4f70(0x11d),_0x574375[_0x574375['Add']=0x1]=_0x1f4f70(0x13d),_0x574375[_0x574375[_0x1f4f70(0x12b)]=0x2]='Reply',_0x574375[_0x574375[_0x1f4f70(0x142)]=0x3]=_0x1f4f70(0x142),_0x574375[_0x574375[_0x1f4f70(0x14d)]=0x4]=_0x1f4f70(0x14d),_0x574375[_0x574375[_0x1f4f70(0xf7)]=0x5]=_0x1f4f70(0xf7),_0x574375[_0x574375['UNRECOGNIZED']=-0x1]=_0x1f4f70(0x124),_0x574375))(v||{});const P=_0x196e28=>$(new Date(+_0x196e28))[_0x1f4f70(0xf5)](_0x1f4f70(0x13e)),L=async(_0x34be17,_0x161732)=>{const _0x38e9ce=_0x1f4f70,_0x2b11e3=_0x34be17[_0x38e9ce(0x140)](c['UserManagerService']),_0x58f527=_0x34be17[_0x38e9ce(0x140)](O[_0x38e9ce(0xec)]);_0x161732[_0x38e9ce(0xdb)](_0x83a851=>{const _0x1aec5e=_0x38e9ce;_0x2b11e3['getUser'](_0x83a851)&&_0x161732[_0x1aec5e(0x11a)](_0x83a851);}),_0x161732[_0x38e9ce(0x10f)]&&(await _0x58f527[_0x38e9ce(0x140)](_0x38e9ce(0xd6),{'params':{'userIDs':[..._0x161732]}}))[_0x38e9ce(0x155)][_0x38e9ce(0x123)][_0x38e9ce(0xdb)](_0x30558e=>{const _0x3d44a4=_0x38e9ce;_0x30558e&&_0x2b11e3[_0x3d44a4(0x150)](_0x30558e);});};var Y=Object[_0x1f4f70(0x147)],G=Object[_0x1f4f70(0x12c)],H=(_0x1c342b,_0x12a754,_0x744135,_0x130223)=>{const _0x1cf0bf=_0x1f4f70;for(var _0x591627=_0x130223>0x1?void 0x0:_0x130223?G(_0x12a754,_0x744135):_0x12a754,_0x568070=_0x1c342b[_0x1cf0bf(0x15c)]-0x1,_0x153446;_0x568070>=0x0;_0x568070--)(_0x153446=_0x1c342b[_0x568070])&&(_0x591627=(_0x130223?_0x153446(_0x12a754,_0x744135,_0x591627):_0x153446(_0x591627))||_0x591627);return _0x130223&&_0x591627&&Y(_0x12a754,_0x744135,_0x591627),_0x591627;},I=(_0x12441,_0x1708ca)=>(_0x18a20b,_0xa939d9)=>_0x1708ca(_0x18a20b,_0xa939d9,_0x12441);let f=class extends c['Disposable']{constructor(_0x29b248,_0x456bd6,_0x3cb8ec,_0x4a12b8){const _0x402a6b=_0x1f4f70;super(),this[_0x402a6b(0x14a)]=_0x29b248,this[_0x402a6b(0xe2)]=_0x456bd6,this[_0x402a6b(0xe1)]=_0x3cb8ec,this['_injector']=_0x4a12b8,this[_0x402a6b(0x117)](),this[_0x402a6b(0x105)]();}['_initUserSync'](){const _0x22f710=_0x1f4f70;this[_0x22f710(0x114)](this[_0x22f710(0xe2)][_0x22f710(0xea)][_0x22f710(0x101)](q[_0x22f710(0x15d)](0x10))[_0x22f710(0x10c)](_0x521579=>{const _0x1b0f90=_0x22f710,_0x439e12=new Set();_0x521579[_0x1b0f90(0xdb)](_0x553ba5=>{const _0x4a8dfa=_0x1b0f90;switch(_0x553ba5[_0x4a8dfa(0x132)]){case _0x4a8dfa(0x146):{const _0x8c8718=_0x553ba5['payload'][_0x4a8dfa(0xf6)];_0x439e12['add'](_0x8c8718);break;}}}),L(this['_injector'],_0x439e12);}));}[_0x1f4f70(0x117)](){const _0x451e6b=_0x1f4f70;this[_0x451e6b(0x114)](this[_0x451e6b(0x14a)]['commentUpdate$']['subscribe'](async _0x14fab9=>{const _0x2d2396=_0x451e6b;var _0x3b4e4a,_0x2c5c5c;const _0x470c56=this[_0x2d2396(0xe2)]['getThread'](_0x14fab9[_0x2d2396(0x154)],_0x14fab9[_0x2d2396(0x13f)]);if(!_0x470c56)return;const {unitId:_0x1e1445,subUnitId:_0x3dc2bf}=_0x470c56;switch(_0x14fab9[_0x2d2396(0xf2)]&&this[_0x2d2396(0xe1)][_0x2d2396(0x150)](_0x14fab9['user']),_0x14fab9[_0x2d2396(0x132)]){case v[_0x2d2396(0x13d)]:break;case v['Reply']:{this[_0x2d2396(0xe2)][_0x2d2396(0xe9)](_0x1e1445,_0x3dc2bf,{'unitId':_0x1e1445,'subUnitId':_0x3dc2bf,'ref':'','id':_0x14fab9[_0x2d2396(0x116)],'dT':P(+_0x14fab9[_0x2d2396(0xfe)]),'threadId':_0x14fab9['threadId'],'personId':(_0x2c5c5c=(_0x3b4e4a=_0x14fab9[_0x2d2396(0xf2)])==null?void 0x0:_0x3b4e4a[_0x2d2396(0x104)])!=null?_0x2c5c5c:_0x14fab9[_0x2d2396(0xe4)],'text':JSON[_0x2d2396(0x11b)](_0x14fab9[_0x2d2396(0x134)]),'parentId':_0x470c56['id']});break;}case v['Delete']:{const _0x893f86=this[_0x2d2396(0xe2)]['getComment'](_0x1e1445,_0x3dc2bf,_0x14fab9['replyId']);_0x893f86&&_0x893f86[_0x2d2396(0x10b)]&&this[_0x2d2396(0xe2)][_0x2d2396(0xde)](_0x1e1445,_0x3dc2bf,_0x14fab9[_0x2d2396(0x116)]);break;}case v['Edit']:{this[_0x2d2396(0xe2)]['updateComment'](_0x1e1445,_0x3dc2bf,{'commentId':_0x14fab9[_0x2d2396(0x116)],'text':JSON['parse'](_0x14fab9['content'])});break;}case v['Solve']:{const _0x2a2f92=this[_0x2d2396(0xe2)][_0x2d2396(0xe6)](_0x1e1445,_0x14fab9['threadId']);_0x2a2f92&&this[_0x2d2396(0xe2)][_0x2d2396(0x126)](_0x1e1445,_0x3dc2bf,_0x2a2f92['id'],_0x14fab9[_0x2d2396(0x110)]===p['Solved']);break;}}}));}};f=H([c[_0x1f4f70(0x139)](c[_0x1f4f70(0x122)]['Ready'],f),I(0x0,c[_0x1f4f70(0x103)](y[_0x1f4f70(0x12f)])),I(0x1,c[_0x1f4f70(0x103)](g[_0x1f4f70(0x141)])),I(0x2,c[_0x1f4f70(0x103)](c['UserManagerService'])),I(0x3,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x151)]))],f);const A=_0x1f4f70(0xe5),J={};var F=Object[_0x1f4f70(0x147)],Z=Object[_0x1f4f70(0x12c)],W=(_0x502a41,_0x892612,_0x532b6f,_0x2a9337)=>{const _0x1c0d08=_0x1f4f70;for(var _0x3e1d2f=_0x2a9337>0x1?void 0x0:_0x2a9337?Z(_0x892612,_0x532b6f):_0x892612,_0x3e87d9=_0x502a41[_0x1c0d08(0x15c)]-0x1,_0x55c549;_0x3e87d9>=0x0;_0x3e87d9--)(_0x55c549=_0x502a41[_0x3e87d9])&&(_0x3e1d2f=(_0x2a9337?_0x55c549(_0x892612,_0x532b6f,_0x3e1d2f):_0x55c549(_0x3e1d2f))||_0x3e1d2f);return _0x2a9337&&_0x3e1d2f&&F(_0x892612,_0x532b6f,_0x3e1d2f),_0x3e1d2f;},S=(_0x34a40f,_0x5d4992)=>(_0x4626cf,_0x50415b)=>_0x5d4992(_0x4626cf,_0x50415b,_0x34a40f);function _0x200b(){const _0x15b968=['https','@univerjs/thread-comment-ui','/solved','DependentOn','parentId','subscribe','dataSource','8qpOASn','size','solved','/edit','/reply','onStarting','disposeWithMe','@univerjs/network','replyId','_init','host','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','delete','parse','2450892YdKIvh','Unknown','filter','getCurrentUser','_configService','_httpService','LifecycleStages','users','UNRECOGNIZED','slice','resolveComment','getMentions','UniverLicensePlugin','code','href','Reply','getOwnPropertyDescriptor','/delete','IConfigService','CommentService','location','8kJVvqA','type','stringify','content','_threadCommentMentionDataService','IThreadCommentMentionDataService','dayjs','UniverInstanceType','OnLifecycle','syncUpdateMutationToColla','CustomRangeType','name','Add','YYYY/MM/DD\x20HH:mm','threadId','get','ThreadCommentModel','Edit','unit','getMemberID','resolved','add','defineProperty','Starting','_threadCommentMentionDataSource','_commentService','52708zwLmWg','5208561cJYAvr','Delete','20jKyeQp','toStringTag','addUser','Injector','_threadCommentDataSourceService','/list','unitId','body','error','UserManagerService','setConfig','/universer-api/comment/unit/','rangeType','comments','length','bufferTime','listComments','@univerjs-pro/license','UniverCollaborationClientPlugin','UniverThreadCommentUIPlugin','COMMENT','/universer-api/user/list','OpenOrReOpen','Solved','rangeId','Plugin','forEach','values','comment','deleteComment','795402VVuVMW','post','_userService','_threadCommentModel','customRanges','userId','thread-comment-data-source.config','getThread','pluginName','Disposable','addComment','commentUpdate$','_initDataSource','HTTPService','120753jGvpEu','_sessionService','ref','27096ylQyGO','121QZZZuZ','user','protocol','saveCommentToSnapshot','format','personId','Solve','map','25835TQMTpV','subject','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','requireSession','createTimestamp','182ssKVWg','replies','pipe','_config','Inject','userID','_initUserSync','_injector'];_0x200b=function(){return _0x15b968;};return _0x200b();}function z(_0x199b07,_0x39dc64){const _0x15b74c=_0x1f4f70,_0x59b935=_0x199b07[_0x15b74c(0x100)][0x0];return{..._0x39dc64,'id':_0x59b935[_0x15b74c(0x116)],'resolved':_0x199b07[_0x15b74c(0x110)]===0x1,'dT':P(_0x59b935[_0x15b74c(0xfe)]),'personId':_0x59b935['userId'],'threadId':_0x59b935[_0x15b74c(0x13f)]};}function B(_0x5d96ad,_0x3d937f,_0x5d23f9){const _0x244a5d=_0x1f4f70;var _0x336719,_0x2fb343;if(((_0x2fb343=(_0x336719=_0x5d96ad==null?void 0x0:_0x5d96ad[_0x244a5d(0x100)])==null?void 0x0:_0x336719[_0x244a5d(0x15c)])!=null?_0x2fb343:0x0)>0x0){const _0x3fce54=(_0x5b18a5,_0x22a9fd)=>({'id':_0x5b18a5[_0x244a5d(0x116)],'threadId':_0x5b18a5['threadId'],'dT':P(_0x5b18a5[_0x244a5d(0xfe)]),'personId':_0x5b18a5[_0x244a5d(0xe4)],'resolved':_0x5d96ad[_0x244a5d(0x110)]===p['Solved'],'unitId':_0x3d937f,'subUnitId':_0x5d23f9,'text':JSON[_0x244a5d(0x11b)](_0x5b18a5[_0x244a5d(0x134)]),'parentId':_0x22a9fd}),_0x222cd2=_0x3fce54(_0x5d96ad[_0x244a5d(0x100)][0x0]);return{..._0x222cd2,'children':_0x5d96ad['replies'][_0x244a5d(0x125)](0x1)['map'](_0x5ce931=>_0x3fce54(_0x5ce931,_0x222cd2['id']))};}return null;}let C=class{constructor(_0x2f1906,_0xf9f4f,_0x4f5a1b,_0x2ecea6){const _0x1ddb7d=_0x1f4f70;this[_0x1ddb7d(0x121)]=_0x2f1906,this[_0x1ddb7d(0xe1)]=_0xf9f4f,this[_0x1ddb7d(0xee)]=_0x4f5a1b,this[_0x1ddb7d(0x106)]=_0x2ecea6;}async[_0x1f4f70(0xe9)](_0x1ec41e){const _0x3a3c07=_0x1f4f70;var _0x5825fa,_0x480694;const {parentId:_0x43dbc9,unitId:_0x44b3af,text:_0x121ab8,threadId:_0x5696d}=_0x1ec41e,_0x3fcca1=(_0x480694=(_0x5825fa=_0x121ab8[_0x3a3c07(0xe3)])==null?void 0x0:_0x5825fa[_0x3a3c07(0x11e)](_0x5d1bab=>_0x5d1bab[_0x3a3c07(0x15a)]===c['CustomRangeType'][_0x3a3c07(0xd5)])[_0x3a3c07(0xf8)](_0x347ae3=>_0x347ae3[_0x3a3c07(0xd9)]))!=null?_0x480694:[],_0x4e6477=JSON[_0x3a3c07(0x133)](_0x121ab8),_0x130f8b=(await this[_0x3a3c07(0xee)]['requireSession'](_0x44b3af))[_0x3a3c07(0x144)]();if(_0x43dbc9){const _0x1e5ff1={'memberId':_0x130f8b,'unitId':_0x44b3af,'content':_0x4e6477,'mention':_0x3fcca1,'threadId':_0x5696d},_0x51017c=(await this[_0x3a3c07(0x121)]['post'](_0x3a3c07(0x159)+_0x44b3af+_0x3a3c07(0x112),{'body':_0x1e5ff1}))[_0x3a3c07(0x155)]['reply'];return{..._0x1ec41e,'id':_0x51017c[_0x3a3c07(0x116)],'dT':$(+_0x51017c[_0x3a3c07(0xfe)])[_0x3a3c07(0xf5)](_0x3a3c07(0x13e)),'personId':_0x51017c[_0x3a3c07(0xe4)]};}else{const _0x282a10={'memberId':_0x130f8b,'unitId':_0x44b3af,'content':_0x4e6477,'mention':_0x3fcca1},_0x321161=await this[_0x3a3c07(0x121)][_0x3a3c07(0xe0)](_0x3a3c07(0x159)+_0x44b3af+'/add',{'body':_0x282a10});return z(_0x321161['body'][_0x3a3c07(0xdd)],_0x1ec41e);}}async['updateComment'](_0x546713){const _0x46db6b=_0x1f4f70;var _0x194e0c,_0x4c8238;const {text:_0x3cbec8,unitId:_0x106a0c}=_0x546713,_0x347f98=(_0x4c8238=(_0x194e0c=_0x3cbec8[_0x46db6b(0xe3)])==null?void 0x0:_0x194e0c[_0x46db6b(0x11e)](_0x149f6f=>_0x149f6f[_0x46db6b(0x15a)]===c[_0x46db6b(0x13b)][_0x46db6b(0xd5)])[_0x46db6b(0xf8)](_0x6fcef5=>_0x6fcef5[_0x46db6b(0xd9)]))!=null?_0x4c8238:[],_0x124dab=JSON['stringify'](_0x3cbec8),_0x54374e=_0x546713['threadId'],_0x43747f=_0x546713['id'],_0x484082={'memberId':(await this[_0x46db6b(0xee)][_0x46db6b(0xfd)](_0x106a0c))[_0x46db6b(0x144)](),'unitId':_0x106a0c,'threadId':_0x54374e,'mention':_0x347f98,'content':_0x124dab,'replyId':_0x43747f},_0x3afbca=await this[_0x46db6b(0x121)][_0x46db6b(0xe0)](_0x46db6b(0x159)+_0x106a0c+_0x46db6b(0x111),{'body':_0x484082});return!_0x3afbca[_0x46db6b(0x155)]['error']||_0x3afbca[_0x46db6b(0x155)]['error'][_0x46db6b(0x129)]===0x1;}async[_0x1f4f70(0x126)](_0x5e67c6){const _0x57dd42=_0x1f4f70,{unitId:_0x4e1d50}=_0x5e67c6,_0x1643ae=_0x5e67c6[_0x57dd42(0x13f)],_0xe1b05b={'memberId':this['_userService'][_0x57dd42(0x11f)]()[_0x57dd42(0x104)],'unitId':_0x4e1d50,'threadId':_0x1643ae,'solved':_0x5e67c6[_0x57dd42(0x145)]?p[_0x57dd42(0xd8)]:p[_0x57dd42(0xd7)]},_0xb6d441=await this[_0x57dd42(0x121)]['post'](_0x57dd42(0x159)+_0x4e1d50+_0x57dd42(0x109),{'body':_0xe1b05b});return!_0xb6d441[_0x57dd42(0x155)][_0x57dd42(0x156)]||_0xb6d441[_0x57dd42(0x155)][_0x57dd42(0x156)][_0x57dd42(0x129)]===0x1;}async[_0x1f4f70(0xde)](_0x53b67e,_0x399d08,_0x29a222,_0x2b5237){const _0x752201=_0x1f4f70,_0x39c7f8={'memberId':(await this[_0x752201(0xee)][_0x752201(0xfd)](_0x53b67e))['getMemberID'](),'threadId':_0x29a222,'replyId':_0x2b5237,'unitId':_0x53b67e},_0x32b025=await this[_0x752201(0x121)][_0x752201(0xe0)](_0x752201(0x159)+_0x53b67e+_0x752201(0x12d),{'body':_0x39c7f8});return!_0x32b025[_0x752201(0x155)][_0x752201(0x156)]||_0x32b025[_0x752201(0x155)][_0x752201(0x156)][_0x752201(0x129)]===0x1;}async[_0x1f4f70(0x15e)](_0x37a66c,_0x391a87,_0x5a76ce){const _0x152ddf=_0x1f4f70,_0x3bb70f={'unitId':_0x37a66c,'threadId':_0x5a76ce},_0x2607fe=await this['_httpService'][_0x152ddf(0xe0)]('/universer-api/comment/unit/'+_0x37a66c+_0x152ddf(0x153),{'body':_0x3bb70f}),_0x54f28f=_0x5a76ce[_0x152ddf(0xf8)](_0x1f36f7=>B(_0x2607fe[_0x152ddf(0x155)][_0x152ddf(0x15b)][_0x1f36f7],_0x37a66c,_0x391a87))[_0x152ddf(0x11e)](Boolean);return Object[_0x152ddf(0xdc)](_0x2607fe['body'][_0x152ddf(0x123)])[_0x152ddf(0xdb)](_0xae3465=>{const _0x5d86d7=_0x152ddf;this[_0x5d86d7(0xe1)][_0x5d86d7(0x150)](_0xae3465);}),_0x54f28f;}[_0x1f4f70(0xf4)](_0x569a5e){const _0x1a4c32=_0x1f4f70;return{'id':_0x569a5e['id'],'threadId':_0x569a5e[_0x1a4c32(0x13f)],'ref':_0x569a5e[_0x1a4c32(0xef)]};}};C=W([S(0x0,c[_0x1f4f70(0x103)](O[_0x1f4f70(0xec)])),S(0x1,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x157)])),S(0x2,c['Inject'](y['CollaborationSessionService'])),S(0x3,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x151)]))],C);var K=Object[_0x1f4f70(0x147)],V=Object[_0x1f4f70(0x12c)],Q=(_0x251e83,_0x5d9c3a,_0x45b364,_0x6b51f1)=>{const _0x2ebcdb=_0x1f4f70;for(var _0x518d42=_0x6b51f1>0x1?void 0x0:_0x6b51f1?V(_0x5d9c3a,_0x45b364):_0x5d9c3a,_0x4e92c8=_0x251e83[_0x2ebcdb(0x15c)]-0x1,_0x2fe041;_0x4e92c8>=0x0;_0x4e92c8--)(_0x2fe041=_0x251e83[_0x4e92c8])&&(_0x518d42=(_0x6b51f1?_0x2fe041(_0x5d9c3a,_0x45b364,_0x518d42):_0x2fe041(_0x518d42))||_0x518d42);return _0x6b51f1&&_0x518d42&&K(_0x5d9c3a,_0x45b364,_0x518d42),_0x518d42;},X=(_0x2bce3c,_0x4880a2)=>(_0x38c649,_0xc85ed4)=>_0x4880a2(_0x38c649,_0xc85ed4,_0x2bce3c);let D=class{constructor(_0x318c20){const _0x480274=_0x1f4f70;this[_0x480274(0x121)]=_0x318c20;}async[_0x1f4f70(0x127)](_0x3bd3b3,_0x30937e,_0x209581){const _0x410f1f=_0x1f4f70,_0x5d7670=new URL(window[_0x410f1f(0x130)][_0x410f1f(0x12a)])['searchParams'][_0x410f1f(0x140)](_0x410f1f(0x143));if(!_0x5d7670)return[];const _0x5d62fd=window[_0x410f1f(0x130)][_0x410f1f(0x118)],_0x58090d=window[_0x410f1f(0x130)][_0x410f1f(0xf3)]==='https:'?_0x410f1f(0x107):'http';return(await this[_0x410f1f(0x121)][_0x410f1f(0x140)](_0x58090d+'://'+_0x5d62fd+'/universer-api/authz/collaborator',{'params':{'objectID':_0x5d7670,'unitID':_0x5d7670}}))['body']['collaborators'][_0x410f1f(0xf8)](_0x18150a=>{const _0x4daa82=_0x410f1f;var _0x529fbb,_0x223d8b,_0x41be2f,_0x15ef7f,_0x2e6bfd,_0x3e0d42;return{'id':(_0x223d8b=(_0x529fbb=_0x18150a[_0x4daa82(0xfa)])==null?void 0x0:_0x529fbb['userID'])!=null?_0x223d8b:'','label':(_0x15ef7f=(_0x41be2f=_0x18150a['subject'])==null?void 0x0:_0x41be2f[_0x4daa82(0x13c)])!=null?_0x15ef7f:'','icon':(_0x3e0d42=(_0x2e6bfd=_0x18150a[_0x4daa82(0xfa)])==null?void 0x0:_0x2e6bfd['avatar'])!=null?_0x3e0d42:'','type':_0x4daa82(0xf2)};});}};D=Q([X(0x0,c[_0x1f4f70(0x103)](O[_0x1f4f70(0xec)]))],D);var k=Object[_0x1f4f70(0x147)],ee=Object[_0x1f4f70(0x12c)],re=(_0x59503d,_0x7a33a5,_0x3d217e,_0x36b86e)=>{const _0x2516b7=_0x1f4f70;for(var _0x821568=_0x36b86e>0x1?void 0x0:_0x36b86e?ee(_0x7a33a5,_0x3d217e):_0x7a33a5,_0x3655e7=_0x59503d[_0x2516b7(0x15c)]-0x1,_0x22ba7e;_0x3655e7>=0x0;_0x3655e7--)(_0x22ba7e=_0x59503d[_0x3655e7])&&(_0x821568=(_0x36b86e?_0x22ba7e(_0x7a33a5,_0x3d217e,_0x821568):_0x22ba7e(_0x821568))||_0x821568);return _0x36b86e&&_0x821568&&k(_0x7a33a5,_0x3d217e,_0x821568),_0x821568;},_=(_0x4bfada,_0x5a589c)=>(_0x4b4aff,_0x2c52f6)=>_0x5a589c(_0x4b4aff,_0x2c52f6,_0x4bfada);let b=class extends c[_0x1f4f70(0xe8)]{constructor(_0x137a63,_0x4c7ebe,_0x596ee7,_0xd4878c){const _0x671e99=_0x1f4f70;super(),this[_0x671e99(0x152)]=_0x137a63,this['_threadCommentDataSource']=_0x4c7ebe,this[_0x671e99(0x135)]=_0x596ee7,this[_0x671e99(0x149)]=_0xd4878c,this[_0x671e99(0xeb)]();}['_initDataSource'](){const _0x54135f=_0x1f4f70;this['_threadCommentDataSourceService'][_0x54135f(0x10d)]=this[_0x54135f(0xfb)],this[_0x54135f(0x152)][_0x54135f(0x13a)]=!0x1,this['_threadCommentMentionDataService'][_0x54135f(0x10d)]=this[_0x54135f(0x149)];}};b=re([c['OnLifecycle'](c[_0x1f4f70(0x122)][_0x1f4f70(0x148)],b),_(0x0,g['IThreadCommentDataSourceService']),_(0x1,c[_0x1f4f70(0x103)](C)),_(0x2,N[_0x1f4f70(0x136)]),_(0x3,c['Inject'](D))],b);var U=Object[_0x1f4f70(0x147)],te=Object[_0x1f4f70(0x12c)],se=(_0x16684a,_0x59d857,_0x4d571f)=>_0x59d857 in _0x16684a?U(_0x16684a,_0x59d857,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d571f}):_0x16684a[_0x59d857]=_0x4d571f,ne=(_0x50f547,_0x179de3,_0x34aa0b,_0x138d25)=>{const _0x563982=_0x1f4f70;for(var _0x19a44d=_0x138d25>0x1?void 0x0:_0x138d25?te(_0x179de3,_0x34aa0b):_0x179de3,_0x382dd0=_0x50f547[_0x563982(0x15c)]-0x1,_0x1d2146;_0x382dd0>=0x0;_0x382dd0--)(_0x1d2146=_0x50f547[_0x382dd0])&&(_0x19a44d=(_0x138d25?_0x1d2146(_0x179de3,_0x34aa0b,_0x19a44d):_0x1d2146(_0x19a44d))||_0x19a44d);return _0x138d25&&_0x19a44d&&U(_0x179de3,_0x34aa0b,_0x19a44d),_0x19a44d;},T=(_0x29f4a3,_0x2b0673)=>(_0x1f5dec,_0x594d29)=>_0x2b0673(_0x1f5dec,_0x594d29,_0x29f4a3),R=(_0x4625b5,_0x3f5996,_0x4bb510)=>se(_0x4625b5,typeof _0x3f5996!='symbol'?_0x3f5996+'':_0x3f5996,_0x4bb510);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1f4f70(0xda)]{constructor(_0x21bf8c=J,_0x22bcf1,_0x523f96){const _0x330886=_0x1f4f70;super(),this[_0x330886(0x102)]=_0x21bf8c,this[_0x330886(0x106)]=_0x22bcf1,this[_0x330886(0x120)]=_0x523f96;const {..._0x1d3d65}=this[_0x330886(0x102)];this[_0x330886(0x120)][_0x330886(0x158)](A,_0x1d3d65);}[_0x1f4f70(0x113)](){const _0x2eba0e=_0x1f4f70;[[D],[C],[b],[f]][_0x2eba0e(0xdb)](_0x4d4c92=>{const _0x17b872=_0x2eba0e;this[_0x17b872(0x106)]['add'](_0x4d4c92);});}},R(exports['UniverThreadCommentDataSourcePlugin'],_0x1f4f70(0xe7),x),R(exports[_0x1f4f70(0xfc)],_0x1f4f70(0x132),c[_0x1f4f70(0x138)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=ne([c[_0x1f4f70(0x10a)](g['UniverThreadCommentPlugin'],N[_0x1f4f70(0xd4)],y[_0x1f4f70(0x160)],E[_0x1f4f70(0x128)]),T(0x1,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x151)])),T(0x2,c[_0x1f4f70(0x12e)])],exports[_0x1f4f70(0xfc)]);
|
|
1
|
+
'use strict';const _0x4fddd5=_0x574f;(function(_0x145856,_0x3b1e74){const _0x1259f4=_0x574f,_0x3839f1=_0x145856();while(!![]){try{const _0x45b51f=parseInt(_0x1259f4(0xfe))/0x1+-parseInt(_0x1259f4(0xfb))/0x2*(parseInt(_0x1259f4(0x11b))/0x3)+parseInt(_0x1259f4(0x140))/0x4+parseInt(_0x1259f4(0xf9))/0x5*(-parseInt(_0x1259f4(0xd2))/0x6)+-parseInt(_0x1259f4(0x11a))/0x7*(parseInt(_0x1259f4(0x10e))/0x8)+-parseInt(_0x1259f4(0x115))/0x9+-parseInt(_0x1259f4(0xb7))/0xa*(-parseInt(_0x1259f4(0x118))/0xb);if(_0x45b51f===_0x3b1e74)break;else _0x3839f1['push'](_0x3839f1['shift']());}catch(_0x2d1dba){_0x3839f1['push'](_0x3839f1['shift']());}}}(_0x272e,0xd7689));Object[_0x4fddd5(0x134)](exports,Symbol[_0x4fddd5(0xc7)],{'value':_0x4fddd5(0x10c)});const c=require(_0x4fddd5(0x106)),g=require('@univerjs/thread-comment'),N=require(_0x4fddd5(0xc6)),O=require('@univerjs-pro/collaboration-client'),E=require('@univerjs-pro/license'),q=require(_0x4fddd5(0x127)),P=require(_0x4fddd5(0xf8)),$=require('dayjs'),x=_0x4fddd5(0x107);var p=(_0x302052=>(_0x302052[_0x302052['OpenOrReOpen']=0x0]=_0x4fddd5(0xf5),_0x302052[_0x302052['Solved']=0x1]=_0x4fddd5(0x10f),_0x302052[_0x302052[_0x4fddd5(0x133)]=-0x1]='UNRECOGNIZED',_0x302052))(p||{}),v=(_0x92eae9=>(_0x92eae9[_0x92eae9[_0x4fddd5(0x123)]=0x0]=_0x4fddd5(0x123),_0x92eae9[_0x92eae9['Add']=0x1]='Add',_0x92eae9[_0x92eae9['Reply']=0x2]=_0x4fddd5(0xbd),_0x92eae9[_0x92eae9[_0x4fddd5(0x105)]=0x3]=_0x4fddd5(0x105),_0x92eae9[_0x92eae9[_0x4fddd5(0x11f)]=0x4]=_0x4fddd5(0x11f),_0x92eae9[_0x92eae9[_0x4fddd5(0xf2)]=0x5]=_0x4fddd5(0xf2),_0x92eae9[_0x92eae9[_0x4fddd5(0x133)]=-0x1]='UNRECOGNIZED',_0x92eae9))(v||{});const y=_0x441e2d=>$(new Date(+_0x441e2d))[_0x4fddd5(0xce)]('YYYY/MM/DD\x20HH:mm'),Y=async(_0xde5bf3,_0x36719b)=>{const _0x36a656=_0x4fddd5,_0x4e3987=_0xde5bf3[_0x36a656(0x108)](c['UserManagerService']),_0x5a6c73=_0xde5bf3[_0x36a656(0x108)](P[_0x36a656(0xe6)]);_0x36719b['forEach'](_0xf6ef74=>{const _0x44ca6c=_0x36a656;_0x4e3987['getUser'](_0xf6ef74)&&_0x36719b[_0x44ca6c(0x120)](_0xf6ef74);}),_0x36719b[_0x36a656(0xeb)]&&(await _0x5a6c73[_0x36a656(0x108)]('/universer-api/user/list',{'params':{'userIDs':[..._0x36719b]}}))[_0x36a656(0x132)]['users'][_0x36a656(0x122)](_0x213241=>{const _0x32c3ea=_0x36a656;_0x213241&&_0x4e3987[_0x32c3ea(0xc1)](_0x213241);});};var G=Object['defineProperty'],H=Object[_0x4fddd5(0x121)],A=(_0x292b89,_0x59768e,_0x39a0e5,_0x175fb8)=>{const _0x506cc3=_0x4fddd5;for(var _0x239baf=_0x175fb8>0x1?void 0x0:_0x175fb8?H(_0x59768e,_0x39a0e5):_0x59768e,_0x19ba4a=_0x292b89[_0x506cc3(0x126)]-0x1,_0x498cd9;_0x19ba4a>=0x0;_0x19ba4a--)(_0x498cd9=_0x292b89[_0x19ba4a])&&(_0x239baf=(_0x175fb8?_0x498cd9(_0x59768e,_0x39a0e5,_0x239baf):_0x498cd9(_0x239baf))||_0x239baf);return _0x175fb8&&_0x239baf&&G(_0x59768e,_0x39a0e5,_0x239baf),_0x239baf;},I=(_0x5c3568,_0x196f1f)=>(_0x33ac0d,_0x4fd975)=>_0x196f1f(_0x33ac0d,_0x4fd975,_0x5c3568);let f=class extends c['Disposable']{constructor(_0x39d8f9,_0x9573ec,_0x40b82d,_0x1b4781){const _0x464041=_0x4fddd5;super(),this[_0x464041(0xe5)]=_0x39d8f9,this['_threadCommentModel']=_0x9573ec,this[_0x464041(0xf0)]=_0x40b82d,this[_0x464041(0xea)]=_0x1b4781,this['_init'](),this[_0x464041(0xf4)]();}[_0x4fddd5(0xf4)](){const _0x90be7a=_0x4fddd5;this[_0x90be7a(0x125)](this[_0x90be7a(0x13d)][_0x90be7a(0x135)][_0x90be7a(0xb1)](q[_0x90be7a(0xfd)](0x10))[_0x90be7a(0xbb)](_0x59a213=>{const _0x686197=_0x90be7a,_0x13ecf5=new Set();_0x59a213[_0x686197(0x122)](_0x383ec7=>{const _0x462fbe=_0x686197;switch(_0x383ec7[_0x462fbe(0xb5)]){case _0x462fbe(0x101):{const _0x61d96=_0x383ec7[_0x462fbe(0xe1)][_0x462fbe(0x137)];_0x13ecf5[_0x462fbe(0x101)](_0x61d96);break;}}}),Y(this[_0x686197(0xea)],_0x13ecf5);}));}[_0x4fddd5(0x12d)](){const _0x242e9b=_0x4fddd5;this[_0x242e9b(0x125)](this[_0x242e9b(0xe5)]['commentUpdate$'][_0x242e9b(0xbb)](async _0x514193=>{const _0x9bdd63=_0x242e9b;var _0x15c23c,_0x3f0012;const _0x492693=this[_0x9bdd63(0x13d)]['getThread'](_0x514193[_0x9bdd63(0x113)],_0x514193[_0x9bdd63(0x141)]);if(!_0x492693)return;const {unitId:_0x414666,subUnitId:_0x26b07d}=_0x492693;switch(_0x514193[_0x9bdd63(0xe2)]&&this['_userService'][_0x9bdd63(0xc1)](_0x514193[_0x9bdd63(0xe2)]),_0x514193['type']){case v[_0x9bdd63(0xbe)]:break;case v[_0x9bdd63(0xbd)]:{this[_0x9bdd63(0x13d)][_0x9bdd63(0xb9)](_0x414666,_0x26b07d,{'unitId':_0x414666,'subUnitId':_0x26b07d,'ref':'','id':_0x514193[_0x9bdd63(0x12e)],'dT':y(+_0x514193[_0x9bdd63(0xc2)]),'threadId':_0x514193[_0x9bdd63(0x141)],'personId':(_0x3f0012=(_0x15c23c=_0x514193['user'])==null?void 0x0:_0x15c23c[_0x9bdd63(0xe4)])!=null?_0x3f0012:_0x514193[_0x9bdd63(0x131)],'text':JSON[_0x9bdd63(0xdd)](_0x514193[_0x9bdd63(0x114)]),'parentId':_0x492693['id']});break;}case v[_0x9bdd63(0x11f)]:{const _0x1aeb13=this['_threadCommentModel']['getComment'](_0x414666,_0x26b07d,_0x514193[_0x9bdd63(0x12e)]);_0x1aeb13&&_0x1aeb13[_0x9bdd63(0x109)]&&this['_threadCommentModel'][_0x9bdd63(0x10b)](_0x414666,_0x26b07d,_0x514193[_0x9bdd63(0x12e)]);break;}case v[_0x9bdd63(0x105)]:{this['_threadCommentModel'][_0x9bdd63(0xc8)](_0x414666,_0x26b07d,{'commentId':_0x514193['replyId'],'text':JSON['parse'](_0x514193[_0x9bdd63(0x114)])});break;}case v[_0x9bdd63(0xf2)]:{const _0x1d0f56=this['_threadCommentModel'][_0x9bdd63(0x13c)](_0x414666,_0x514193[_0x9bdd63(0x141)]);_0x1d0f56&&this[_0x9bdd63(0x13d)][_0x9bdd63(0xd7)](_0x414666,_0x26b07d,_0x1d0f56['id'],_0x514193[_0x9bdd63(0xdc)]===p[_0x9bdd63(0x10f)]);break;}}}));}};f=A([I(0x0,c[_0x4fddd5(0xd6)](O[_0x4fddd5(0x12f)])),I(0x1,c['Inject'](g[_0x4fddd5(0x12b)])),I(0x2,c['Inject'](c['UserManagerService'])),I(0x3,c[_0x4fddd5(0xd6)](c['Injector']))],f);const J=_0x4fddd5(0xec),L={};var F=Object[_0x4fddd5(0x134)],Z=Object[_0x4fddd5(0x121)],W=(_0x2611f2,_0x321d88,_0x337cee,_0x5cbe39)=>{const _0x7b2a0d=_0x4fddd5;for(var _0x232df8=_0x5cbe39>0x1?void 0x0:_0x5cbe39?Z(_0x321d88,_0x337cee):_0x321d88,_0x354a31=_0x2611f2[_0x7b2a0d(0x126)]-0x1,_0x16737d;_0x354a31>=0x0;_0x354a31--)(_0x16737d=_0x2611f2[_0x354a31])&&(_0x232df8=(_0x5cbe39?_0x16737d(_0x321d88,_0x337cee,_0x232df8):_0x16737d(_0x232df8))||_0x232df8);return _0x5cbe39&&_0x232df8&&F(_0x321d88,_0x337cee,_0x232df8),_0x232df8;},_=(_0x7220d5,_0x56491a)=>(_0x42830d,_0x5efac8)=>_0x56491a(_0x42830d,_0x5efac8,_0x7220d5);function z(_0x1fb473,_0x1da663){const _0x98c9b4=_0x4fddd5,_0x1a17c1=_0x1fb473[_0x98c9b4(0x11c)][0x0];return{..._0x1da663,'id':_0x1a17c1[_0x98c9b4(0x12e)],'resolved':_0x1fb473[_0x98c9b4(0xdc)]===0x1,'dT':y(_0x1a17c1[_0x98c9b4(0xc2)]),'personId':_0x1a17c1['userId'],'threadId':_0x1a17c1['threadId']};}function B(_0x3128e7,_0x244a1a,_0x15d6d9){const _0x4183d3=_0x4fddd5;var _0x1e1182,_0x1f6db5;if(((_0x1f6db5=(_0x1e1182=_0x3128e7==null?void 0x0:_0x3128e7[_0x4183d3(0x11c)])==null?void 0x0:_0x1e1182[_0x4183d3(0x126)])!=null?_0x1f6db5:0x0)>0x0){const _0x37a34b=(_0x4cda78,_0x1844a5)=>({'id':_0x4cda78[_0x4183d3(0x12e)],'threadId':_0x4cda78[_0x4183d3(0x141)],'dT':y(_0x4cda78[_0x4183d3(0xc2)]),'personId':_0x4cda78[_0x4183d3(0x131)],'resolved':_0x3128e7['solved']===p[_0x4183d3(0x10f)],'unitId':_0x244a1a,'subUnitId':_0x15d6d9,'text':JSON[_0x4183d3(0xdd)](_0x4cda78[_0x4183d3(0x114)]),'parentId':_0x1844a5}),_0x188807=_0x37a34b(_0x3128e7[_0x4183d3(0x11c)][0x0]);return{..._0x188807,'children':_0x3128e7[_0x4183d3(0x11c)][_0x4183d3(0xf7)](0x1)[_0x4183d3(0xdf)](_0x138d53=>_0x37a34b(_0x138d53,_0x188807['id']))};}return null;}let b=class{constructor(_0x4b36da,_0x36805c,_0x3b8c87,_0x304095){const _0x47bd47=_0x4fddd5;this[_0x47bd47(0x111)]=_0x4b36da,this['_userService']=_0x36805c,this[_0x47bd47(0x130)]=_0x3b8c87,this[_0x47bd47(0xea)]=_0x304095;}async['addComment'](_0x213c36){const _0x3dcc3e=_0x4fddd5;var _0x28154f,_0x417378;const {parentId:_0x2e3796,unitId:_0x2f3914,text:_0x1e0eb7,threadId:_0x3e7894}=_0x213c36,_0x586070=(_0x417378=(_0x28154f=_0x1e0eb7[_0x3dcc3e(0xf1)])==null?void 0x0:_0x28154f[_0x3dcc3e(0x103)](_0x42a4b6=>_0x42a4b6[_0x3dcc3e(0xd1)]===c[_0x3dcc3e(0x139)][_0x3dcc3e(0xf6)])[_0x3dcc3e(0xdf)](_0x5943ab=>_0x5943ab[_0x3dcc3e(0xbc)]))!=null?_0x417378:[],_0xbef1b0=JSON[_0x3dcc3e(0xda)](_0x1e0eb7),_0x14452f=(await this['_sessionService']['requireSession'](_0x2f3914))[_0x3dcc3e(0x100)]();if(_0x2e3796){const _0x3f3ea2={'memberId':_0x14452f,'unitId':_0x2f3914,'content':_0xbef1b0,'mention':_0x586070,'threadId':_0x3e7894},_0x4eb08b=(await this[_0x3dcc3e(0x111)][_0x3dcc3e(0x13a)](_0x3dcc3e(0x142)+_0x2f3914+_0x3dcc3e(0x138),{'body':_0x3f3ea2}))[_0x3dcc3e(0x132)][_0x3dcc3e(0xcd)];return{..._0x213c36,'id':_0x4eb08b[_0x3dcc3e(0x12e)],'dT':$(+_0x4eb08b[_0x3dcc3e(0xc2)])[_0x3dcc3e(0xce)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4eb08b['userId']};}else{const _0x5eaf29={'memberId':_0x14452f,'unitId':_0x2f3914,'content':_0xbef1b0,'mention':_0x586070},_0x12ba77=await this[_0x3dcc3e(0x111)][_0x3dcc3e(0x13a)](_0x3dcc3e(0x142)+_0x2f3914+'/add',{'body':_0x5eaf29});return z(_0x12ba77[_0x3dcc3e(0x132)][_0x3dcc3e(0x11d)],_0x213c36);}}async[_0x4fddd5(0xc8)](_0x430b2d){const _0x2aed7e=_0x4fddd5;var _0x427ac3,_0x3b3c0c;const {text:_0x39ff85,unitId:_0x5559d8}=_0x430b2d,_0x25bf05=(_0x3b3c0c=(_0x427ac3=_0x39ff85[_0x2aed7e(0xf1)])==null?void 0x0:_0x427ac3[_0x2aed7e(0x103)](_0x3e4c55=>_0x3e4c55[_0x2aed7e(0xd1)]===c[_0x2aed7e(0x139)]['COMMENT'])[_0x2aed7e(0xdf)](_0x28ec93=>_0x28ec93[_0x2aed7e(0xbc)]))!=null?_0x3b3c0c:[],_0x153865=JSON[_0x2aed7e(0xda)](_0x39ff85),_0x363a03=_0x430b2d[_0x2aed7e(0x141)],_0x353b6c=_0x430b2d['id'],_0x2ef501={'memberId':(await this['_sessionService']['requireSession'](_0x5559d8))[_0x2aed7e(0x100)](),'unitId':_0x5559d8,'threadId':_0x363a03,'mention':_0x25bf05,'content':_0x153865,'replyId':_0x353b6c},_0x1e65ec=await this[_0x2aed7e(0x111)]['post']('/universer-api/comment/unit/'+_0x5559d8+_0x2aed7e(0xc9),{'body':_0x2ef501});return!_0x1e65ec[_0x2aed7e(0x132)][_0x2aed7e(0x128)]||_0x1e65ec['body'][_0x2aed7e(0x128)][_0x2aed7e(0x12a)]===0x1;}async[_0x4fddd5(0xd7)](_0x20d0c5){const _0x58f763=_0x4fddd5,{unitId:_0x5253dc}=_0x20d0c5,_0x32db79=_0x20d0c5[_0x58f763(0x141)],_0x268190={'memberId':this[_0x58f763(0xf0)][_0x58f763(0x13f)]()['userID'],'unitId':_0x5253dc,'threadId':_0x32db79,'solved':_0x20d0c5['resolved']?p[_0x58f763(0x10f)]:p[_0x58f763(0xf5)]},_0x7131ef=await this[_0x58f763(0x111)][_0x58f763(0x13a)](_0x58f763(0x142)+_0x5253dc+'/solved',{'body':_0x268190});return!_0x7131ef[_0x58f763(0x132)]['error']||_0x7131ef['body'][_0x58f763(0x128)]['code']===0x1;}async[_0x4fddd5(0x10b)](_0x3d202b,_0x450dad,_0x37def2,_0x3a8197){const _0x11e699=_0x4fddd5,_0x1a60b2={'memberId':(await this[_0x11e699(0x130)][_0x11e699(0xc5)](_0x3d202b))['getMemberID'](),'threadId':_0x37def2,'replyId':_0x3a8197,'unitId':_0x3d202b},_0x4c36a0=await this[_0x11e699(0x111)][_0x11e699(0x13a)]('/universer-api/comment/unit/'+_0x3d202b+_0x11e699(0xe7),{'body':_0x1a60b2});return!_0x4c36a0['body'][_0x11e699(0x128)]||_0x4c36a0[_0x11e699(0x132)][_0x11e699(0x128)][_0x11e699(0x12a)]===0x1;}async[_0x4fddd5(0xb4)](_0x23e23b,_0x15f06a,_0x49d2a3){const _0x4c26f7=_0x4fddd5,_0x2685e9={'unitId':_0x23e23b,'threadId':_0x49d2a3},_0x1524f5=await this['_httpService']['post'](_0x4c26f7(0x142)+_0x23e23b+_0x4c26f7(0xca),{'body':_0x2685e9}),_0x12db09=_0x49d2a3['map'](_0xbaab4a=>B(_0x1524f5[_0x4c26f7(0x132)][_0x4c26f7(0xc0)][_0xbaab4a],_0x23e23b,_0x15f06a))[_0x4c26f7(0x103)](Boolean);return Object[_0x4c26f7(0xcb)](_0x1524f5[_0x4c26f7(0x132)][_0x4c26f7(0xd8)])[_0x4c26f7(0x122)](_0x57c482=>{const _0x648786=_0x4c26f7;this[_0x648786(0xf0)][_0x648786(0xc1)](_0x57c482);}),_0x12db09;}[_0x4fddd5(0x10d)](_0x9258da){const _0x4a97e3=_0x4fddd5;return{'id':_0x9258da['id'],'threadId':_0x9258da['threadId'],'ref':_0x9258da[_0x4a97e3(0xba)]};}};b=W([_(0x0,c[_0x4fddd5(0xd6)](P[_0x4fddd5(0xe6)])),_(0x1,c[_0x4fddd5(0xd6)](c['UserManagerService'])),_(0x2,c[_0x4fddd5(0xd6)](O[_0x4fddd5(0xb3)])),_(0x3,c[_0x4fddd5(0xd6)](c[_0x4fddd5(0xff)]))],b);var K=Object[_0x4fddd5(0x134)],V=Object['getOwnPropertyDescriptor'],Q=(_0x1715a0,_0x173194,_0x4ecf85,_0x155703)=>{const _0x386210=_0x4fddd5;for(var _0x2b7be5=_0x155703>0x1?void 0x0:_0x155703?V(_0x173194,_0x4ecf85):_0x173194,_0x40dffd=_0x1715a0[_0x386210(0x126)]-0x1,_0x24ab87;_0x40dffd>=0x0;_0x40dffd--)(_0x24ab87=_0x1715a0[_0x40dffd])&&(_0x2b7be5=(_0x155703?_0x24ab87(_0x173194,_0x4ecf85,_0x2b7be5):_0x24ab87(_0x2b7be5))||_0x2b7be5);return _0x155703&&_0x2b7be5&&K(_0x173194,_0x4ecf85,_0x2b7be5),_0x2b7be5;},X=(_0x340fb3,_0x495a3b)=>(_0x20eb3c,_0xee6906)=>_0x495a3b(_0x20eb3c,_0xee6906,_0x340fb3);let C=class{constructor(_0x3415f8){const _0x417abf=_0x4fddd5;this[_0x417abf(0x111)]=_0x3415f8;}async[_0x4fddd5(0xd4)](_0x3e6abf,_0x4a18e0,_0x233f65){const _0x411acf=_0x4fddd5,_0x4e46f8=new URL(window[_0x411acf(0x110)][_0x411acf(0x112)])[_0x411acf(0xed)][_0x411acf(0x108)]('unit');if(!_0x4e46f8)return[];const _0x341238=window[_0x411acf(0x110)][_0x411acf(0xcf)],_0x468342=window[_0x411acf(0x110)][_0x411acf(0x102)]===_0x411acf(0xe9)?_0x411acf(0x13e):_0x411acf(0xee);return(await this[_0x411acf(0x111)][_0x411acf(0x108)](_0x468342+_0x411acf(0x13b)+_0x341238+_0x411acf(0xe0),{'params':{'objectID':_0x4e46f8,'unitID':_0x4e46f8}}))['body'][_0x411acf(0xde)][_0x411acf(0xdf)](_0x1780d0=>{const _0x39b40e=_0x411acf;var _0x5c1472,_0x3ce691,_0x45e282,_0x17ed7b,_0x1a9d70,_0x4f2793;return{'id':(_0x3ce691=(_0x5c1472=_0x1780d0[_0x39b40e(0xf3)])==null?void 0x0:_0x5c1472['userID'])!=null?_0x3ce691:'','label':(_0x17ed7b=(_0x45e282=_0x1780d0[_0x39b40e(0xf3)])==null?void 0x0:_0x45e282[_0x39b40e(0x136)])!=null?_0x17ed7b:'','icon':(_0x4f2793=(_0x1a9d70=_0x1780d0[_0x39b40e(0xf3)])==null?void 0x0:_0x1a9d70[_0x39b40e(0xd3)])!=null?_0x4f2793:'','type':'user'};});}};C=Q([X(0x0,c['Inject'](P[_0x4fddd5(0xe6)]))],C);var k=Object[_0x4fddd5(0x134)],ee=Object[_0x4fddd5(0x121)],re=(_0x1f5921,_0xc214ac,_0x820245,_0x1cea17)=>{const _0x5c94a9=_0x4fddd5;for(var _0x32f459=_0x1cea17>0x1?void 0x0:_0x1cea17?ee(_0xc214ac,_0x820245):_0xc214ac,_0x3b19ba=_0x1f5921[_0x5c94a9(0x126)]-0x1,_0x446f1d;_0x3b19ba>=0x0;_0x3b19ba--)(_0x446f1d=_0x1f5921[_0x3b19ba])&&(_0x32f459=(_0x1cea17?_0x446f1d(_0xc214ac,_0x820245,_0x32f459):_0x446f1d(_0x32f459))||_0x32f459);return _0x1cea17&&_0x32f459&&k(_0xc214ac,_0x820245,_0x32f459),_0x32f459;},S=(_0x3a649d,_0x6c8e25)=>(_0x46d672,_0x2fd3fa)=>_0x6c8e25(_0x46d672,_0x2fd3fa,_0x3a649d);function _0x272e(){const _0x422294=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','parentId','UNIVER_UNKNOWN','deleteComment','Module','saveCommentToSnapshot','6232WgptVg','Solved','location','_httpService','href','unitId','content','10600101nXuaZI','_threadCommentDataSourceService','Plugin','209957nzeraT','UniverLicensePlugin','3962wLbHnH','427944dWKHmh','replies','comment','onReady','Delete','delete','getOwnPropertyDescriptor','forEach','Unknown','UniverInstanceType','disposeWithMe','length','rxjs','error','syncUpdateMutationToColla','code','ThreadCommentModel','_configService','_init','replyId','CommentService','_sessionService','userId','body','UNRECOGNIZED','defineProperty','commentUpdate$','name','personId','/reply','CustomRangeType','post','://','getThread','_threadCommentModel','https','getCurrentUser','738312XvJfTY','threadId','/universer-api/comment/unit/','pipe','IThreadCommentDataSourceService','CollaborationSessionService','listComments','type','_threadCommentMentionDataService','1060xwYLJS','IConfigService','addComment','ref','subscribe','rangeId','Reply','Add','UniverThreadCommentDataSourcePlugin','comments','addUser','createTimestamp','DependentOn','pluginName','requireSession','@univerjs/thread-comment-ui','toStringTag','updateComment','/edit','/list','values','_initDataSource','reply','format','host','setConfig','rangeType','90nhFlFA','avatar','getMentions','IThreadCommentMentionDataService','Inject','resolveComment','users','UniverThreadCommentUIPlugin','stringify','_threadCommentDataSource','solved','parse','collaborators','map','/universer-api/authz/collaborator','payload','user','UniverCollaborationClientPlugin','userID','_commentService','HTTPService','/delete','dataSource','https:','_injector','size','thread-comment-data-source.config','searchParams','http','Disposable','_userService','customRanges','Solve','subject','_initUserSync','OpenOrReOpen','COMMENT','slice','@univerjs/network','268900zZzsrt','UniverThreadCommentPlugin','8sRchGj','onStarting','bufferTime','1670508VuNGhN','Injector','getMemberID','add','protocol','filter','_config','Edit','@univerjs/core'];_0x272e=function(){return _0x422294;};return _0x272e();}let D=class extends c[_0x4fddd5(0xef)]{constructor(_0x4d04c8,_0x2d584a,_0x4272e8,_0xe1df49){const _0x1d7a63=_0x4fddd5;super(),this[_0x1d7a63(0x116)]=_0x4d04c8,this[_0x1d7a63(0xdb)]=_0x2d584a,this[_0x1d7a63(0xb6)]=_0x4272e8,this['_threadCommentMentionDataSource']=_0xe1df49,this[_0x1d7a63(0xcc)]();}[_0x4fddd5(0xcc)](){const _0x42bb2b=_0x4fddd5;this['_threadCommentDataSourceService']['dataSource']=this[_0x42bb2b(0xdb)],this[_0x42bb2b(0x116)][_0x42bb2b(0x129)]=!0x1,this[_0x42bb2b(0xb6)][_0x42bb2b(0xe8)]=this['_threadCommentMentionDataSource'];}};D=re([S(0x0,g[_0x4fddd5(0xb2)]),S(0x1,c[_0x4fddd5(0xd6)](b)),S(0x2,N[_0x4fddd5(0xd5)]),S(0x3,c[_0x4fddd5(0xd6)](C))],D);var U=Object['defineProperty'],te=Object[_0x4fddd5(0x121)],se=(_0x1cf49b,_0x275f6f,_0x427d06)=>_0x275f6f in _0x1cf49b?U(_0x1cf49b,_0x275f6f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x427d06}):_0x1cf49b[_0x275f6f]=_0x427d06,ne=(_0x4f9a83,_0x52ac65,_0x1703ef,_0x5988da)=>{for(var _0x143b8c=_0x5988da>0x1?void 0x0:_0x5988da?te(_0x52ac65,_0x1703ef):_0x52ac65,_0x318831=_0x4f9a83['length']-0x1,_0x2b7845;_0x318831>=0x0;_0x318831--)(_0x2b7845=_0x4f9a83[_0x318831])&&(_0x143b8c=(_0x5988da?_0x2b7845(_0x52ac65,_0x1703ef,_0x143b8c):_0x2b7845(_0x143b8c))||_0x143b8c);return _0x5988da&&_0x143b8c&&U(_0x52ac65,_0x1703ef,_0x143b8c),_0x143b8c;},T=(_0x51678a,_0x50e293)=>(_0x36c37b,_0x4938c3)=>_0x50e293(_0x36c37b,_0x4938c3,_0x51678a),R=(_0x1ecc48,_0x815cb4,_0x4fad89)=>se(_0x1ecc48,typeof _0x815cb4!='symbol'?_0x815cb4+'':_0x815cb4,_0x4fad89);function _0x574f(_0x4798cb,_0x3cde22){const _0x272e36=_0x272e();return _0x574f=function(_0x574ff7,_0x7b5218){_0x574ff7=_0x574ff7-0xb1;let _0x221769=_0x272e36[_0x574ff7];return _0x221769;},_0x574f(_0x4798cb,_0x3cde22);}exports[_0x4fddd5(0xbf)]=class extends c[_0x4fddd5(0x117)]{constructor(_0x3ebf98=L,_0x2b556e,_0x567069){const _0xd27f5=_0x4fddd5;super(),this[_0xd27f5(0x104)]=_0x3ebf98,this[_0xd27f5(0xea)]=_0x2b556e,this[_0xd27f5(0x12c)]=_0x567069;const {..._0x136552}=this['_config'];this[_0xd27f5(0x12c)][_0xd27f5(0xd0)](J,_0x136552);}[_0x4fddd5(0xfc)](){const _0x4c0eb0=_0x4fddd5;[[C],[b],[D],[f]]['forEach'](_0x31c1a4=>{const _0x18009b=_0x574f;this[_0x18009b(0xea)][_0x18009b(0x101)](_0x31c1a4);}),this[_0x4c0eb0(0xea)][_0x4c0eb0(0x108)](D);}[_0x4fddd5(0x11e)](){const _0x3c10e1=_0x4fddd5;this[_0x3c10e1(0xea)][_0x3c10e1(0x108)](f);}},R(exports[_0x4fddd5(0xbf)],_0x4fddd5(0xc4),x),R(exports[_0x4fddd5(0xbf)],_0x4fddd5(0xb5),c[_0x4fddd5(0x124)][_0x4fddd5(0x10a)]),exports['UniverThreadCommentDataSourcePlugin']=ne([c[_0x4fddd5(0xc3)](g[_0x4fddd5(0xfa)],N[_0x4fddd5(0xd9)],O[_0x4fddd5(0xe3)],E[_0x4fddd5(0x119)]),T(0x1,c[_0x4fddd5(0xd6)](c[_0x4fddd5(0xff)])),T(0x2,c[_0x4fddd5(0xb8)])],exports[_0x4fddd5(0xbf)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x54d3c0=_0x3961;(function(_0x743aef,_0x3929fb){const _0x4e8eb8=_0x3961,_0x339f79=_0x743aef();while(!![]){try{const _0x2d9ec=-parseInt(_0x4e8eb8(0x228))/0x1+-parseInt(_0x4e8eb8(0x1f7))/0x2*(parseInt(_0x4e8eb8(0x246))/0x3)+-parseInt(_0x4e8eb8(0x243))/0x4+parseInt(_0x4e8eb8(0x218))/0x5+parseInt(_0x4e8eb8(0x1f1))/0x6*(-parseInt(_0x4e8eb8(0x212))/0x7)+-parseInt(_0x4e8eb8(0x1fa))/0x8+parseInt(_0x4e8eb8(0x1fb))/0x9;if(_0x2d9ec===_0x3929fb)break;else _0x339f79['push'](_0x339f79['shift']());}catch(_0x49a61c){_0x339f79['push'](_0x339f79['shift']());}}}(_0x5587,0xc9953));import{UserManagerService as _0x2f3fe0,OnLifecycle as _0x2e269a,LifecycleStages as _0x2dc267,Inject as _0x556ac5,Injector as _0x4900de,Disposable as _0x52739f,CustomRangeType as _0x45bfa5,UniverInstanceType as _0x4408ec,DependentOn as _0x556292,Plugin as _0x1a3cb5,IConfigService as _0x5362db}from'@univerjs/core';import{ThreadCommentModel as _0x4fc152,IThreadCommentDataSourceService as _0x183b75,UniverThreadCommentPlugin as _0x137644}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x1d516f,UniverThreadCommentUIPlugin as _0x125610}from'@univerjs/thread-comment-ui';import{CommentService as _0x47984a,CollaborationSessionService as _0x385840,UniverCollaborationClientPlugin as _0x541cb2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4bd77d}from'@univerjs-pro/license';import{bufferTime as _0x3a43bf}from'rxjs';function _0x3961(_0x2cc6a4,_0x22823d){const _0x558765=_0x5587();return _0x3961=function(_0x3961f9,_0x54171f){_0x3961f9=_0x3961f9-0x1db;let _0x354f26=_0x558765[_0x3961f9];return _0x354f26;},_0x3961(_0x2cc6a4,_0x22823d);}import{HTTPService as _0x4f4d9a}from'@univerjs/network';import _0x3cbc92 from'dayjs';const k=_0x54d3c0(0x234);var v=(_0x2b7f99=>(_0x2b7f99[_0x2b7f99['OpenOrReOpen']=0x0]=_0x54d3c0(0x21a),_0x2b7f99[_0x2b7f99['Solved']=0x1]='Solved',_0x2b7f99[_0x2b7f99[_0x54d3c0(0x1e6)]=-0x1]=_0x54d3c0(0x1e6),_0x2b7f99))(v||{}),p=(_0x1d177f=>(_0x1d177f[_0x1d177f[_0x54d3c0(0x241)]=0x0]=_0x54d3c0(0x241),_0x1d177f[_0x1d177f['Add']=0x1]=_0x54d3c0(0x200),_0x1d177f[_0x1d177f[_0x54d3c0(0x216)]=0x2]=_0x54d3c0(0x216),_0x1d177f[_0x1d177f['Edit']=0x3]='Edit',_0x1d177f[_0x1d177f[_0x54d3c0(0x1e9)]=0x4]=_0x54d3c0(0x1e9),_0x1d177f[_0x1d177f[_0x54d3c0(0x23b)]=0x5]='Solve',_0x1d177f[_0x1d177f[_0x54d3c0(0x1e6)]=-0x1]='UNRECOGNIZED',_0x1d177f))(p||{});const w=_0x5b8fb2=>_0x3cbc92(new Date(+_0x5b8fb2))[_0x54d3c0(0x1e8)](_0x54d3c0(0x21c)),ee=async(_0x36507b,_0x1911fa)=>{const _0x494fa5=_0x54d3c0,_0x2e8ba9=_0x36507b['get'](_0x2f3fe0),_0xfa89a7=_0x36507b[_0x494fa5(0x238)](_0x4f4d9a);_0x1911fa[_0x494fa5(0x1e7)](_0x15ade9=>{const _0x85cfcc=_0x494fa5;_0x2e8ba9['getUser'](_0x15ade9)&&_0x1911fa[_0x85cfcc(0x209)](_0x15ade9);}),_0x1911fa[_0x494fa5(0x20a)]&&(await _0xfa89a7[_0x494fa5(0x238)](_0x494fa5(0x1f4),{'params':{'userIDs':[..._0x1911fa]}}))['body']['users'][_0x494fa5(0x1e7)](_0x3a0f73=>{const _0x1c98a6=_0x494fa5;_0x3a0f73&&_0x2e8ba9[_0x1c98a6(0x222)](_0x3a0f73);});};var re=Object[_0x54d3c0(0x244)],te=Object[_0x54d3c0(0x20c)],se=(_0x30c1f0,_0x39e260,_0x4db4cf,_0x37fa7f)=>{const _0x3c8bbe=_0x54d3c0;for(var _0x250f69=_0x37fa7f>0x1?void 0x0:_0x37fa7f?te(_0x39e260,_0x4db4cf):_0x39e260,_0xda1ff6=_0x30c1f0[_0x3c8bbe(0x202)]-0x1,_0x3e277e;_0xda1ff6>=0x0;_0xda1ff6--)(_0x3e277e=_0x30c1f0[_0xda1ff6])&&(_0x250f69=(_0x37fa7f?_0x3e277e(_0x39e260,_0x4db4cf,_0x250f69):_0x3e277e(_0x250f69))||_0x250f69);return _0x37fa7f&&_0x250f69&&re(_0x39e260,_0x4db4cf,_0x250f69),_0x250f69;},_=(_0x5e9543,_0x1e4f73)=>(_0x188163,_0x49725b)=>_0x1e4f73(_0x188163,_0x49725b,_0x5e9543);let S=class extends _0x52739f{constructor(_0x2b15f1,_0x44f2f7,_0x1f5386,_0x98859c){const _0x5e89dc=_0x54d3c0;super(),this[_0x5e89dc(0x22d)]=_0x2b15f1,this['_threadCommentModel']=_0x44f2f7,this[_0x5e89dc(0x1ea)]=_0x1f5386,this[_0x5e89dc(0x23d)]=_0x98859c,this[_0x5e89dc(0x233)](),this[_0x5e89dc(0x210)]();}[_0x54d3c0(0x210)](){const _0x1c9aef=_0x54d3c0;this[_0x1c9aef(0x235)](this['_threadCommentModel']['commentUpdate$'][_0x1c9aef(0x23f)](_0x3a43bf(0x10))['subscribe'](_0x53ba54=>{const _0x56506c=_0x1c9aef,_0x2edc09=new Set();_0x53ba54[_0x56506c(0x1e7)](_0xf3f471=>{const _0x4444fd=_0x56506c;switch(_0xf3f471[_0x4444fd(0x1eb)]){case _0x4444fd(0x22b):{const _0x4166e8=_0xf3f471[_0x4444fd(0x22a)][_0x4444fd(0x223)];_0x2edc09['add'](_0x4166e8);break;}}}),ee(this['_injector'],_0x2edc09);}));}[_0x54d3c0(0x233)](){const _0x4e79b3=_0x54d3c0;this[_0x4e79b3(0x235)](this[_0x4e79b3(0x22d)]['commentUpdate$']['subscribe'](async _0x3d777b=>{const _0x34e7f1=_0x4e79b3;var _0x4776c4,_0x4226f8;const _0x808d41=this[_0x34e7f1(0x22f)][_0x34e7f1(0x1e1)](_0x3d777b[_0x34e7f1(0x203)],_0x3d777b['threadId']);if(!_0x808d41)return;const {unitId:_0x42dbbf,subUnitId:_0x53a9e6}=_0x808d41;switch(_0x3d777b['user']&&this[_0x34e7f1(0x1ea)][_0x34e7f1(0x222)](_0x3d777b[_0x34e7f1(0x20b)]),_0x3d777b[_0x34e7f1(0x1eb)]){case p[_0x34e7f1(0x200)]:break;case p['Reply']:{this[_0x34e7f1(0x22f)]['addComment'](_0x42dbbf,_0x53a9e6,{'unitId':_0x42dbbf,'subUnitId':_0x53a9e6,'ref':'','id':_0x3d777b[_0x34e7f1(0x205)],'dT':w(+_0x3d777b[_0x34e7f1(0x204)]),'threadId':_0x3d777b[_0x34e7f1(0x1e3)],'personId':(_0x4226f8=(_0x4776c4=_0x3d777b[_0x34e7f1(0x20b)])==null?void 0x0:_0x4776c4['userID'])!=null?_0x4226f8:_0x3d777b[_0x34e7f1(0x21e)],'text':JSON[_0x34e7f1(0x215)](_0x3d777b[_0x34e7f1(0x1f6)]),'parentId':_0x808d41['id']});break;}case p[_0x34e7f1(0x1e9)]:{const _0x487aa0=this[_0x34e7f1(0x22f)][_0x34e7f1(0x1fc)](_0x42dbbf,_0x53a9e6,_0x3d777b[_0x34e7f1(0x205)]);_0x487aa0&&_0x487aa0[_0x34e7f1(0x207)]&&this['_threadCommentModel'][_0x34e7f1(0x231)](_0x42dbbf,_0x53a9e6,_0x3d777b[_0x34e7f1(0x205)]);break;}case p[_0x34e7f1(0x1dd)]:{this['_threadCommentModel'][_0x34e7f1(0x20d)](_0x42dbbf,_0x53a9e6,{'commentId':_0x3d777b[_0x34e7f1(0x205)],'text':JSON[_0x34e7f1(0x215)](_0x3d777b[_0x34e7f1(0x1f6)])});break;}case p[_0x34e7f1(0x23b)]:{const _0x5897f1=this[_0x34e7f1(0x22f)]['getThread'](_0x42dbbf,_0x3d777b['threadId']);_0x5897f1&&this[_0x34e7f1(0x22f)][_0x34e7f1(0x23a)](_0x42dbbf,_0x53a9e6,_0x5897f1['id'],_0x3d777b['solved']===v[_0x34e7f1(0x242)]);break;}}}));}};S=se([_0x2e269a(_0x2dc267['Ready'],S),_(0x0,_0x556ac5(_0x47984a)),_(0x1,_0x556ac5(_0x4fc152)),_(0x2,_0x556ac5(_0x2f3fe0)),_(0x3,_0x556ac5(_0x4900de))],S);const oe=_0x54d3c0(0x225),ne={};var ie=Object[_0x54d3c0(0x244)],ae=Object['getOwnPropertyDescriptor'],ce=(_0x4bfad3,_0x3df789,_0x248f8a,_0x115988)=>{const _0x2eb3af=_0x54d3c0;for(var _0x1704c3=_0x115988>0x1?void 0x0:_0x115988?ae(_0x3df789,_0x248f8a):_0x3df789,_0x8d821c=_0x4bfad3[_0x2eb3af(0x202)]-0x1,_0x5df0c8;_0x8d821c>=0x0;_0x8d821c--)(_0x5df0c8=_0x4bfad3[_0x8d821c])&&(_0x1704c3=(_0x115988?_0x5df0c8(_0x3df789,_0x248f8a,_0x1704c3):_0x5df0c8(_0x1704c3))||_0x1704c3);return _0x115988&&_0x1704c3&&ie(_0x3df789,_0x248f8a,_0x1704c3),_0x1704c3;},f=(_0x1415e1,_0x1f9b9a)=>(_0x43f977,_0x5793f8)=>_0x1f9b9a(_0x43f977,_0x5793f8,_0x1415e1);function de(_0x8e9f3,_0x1ab00d){const _0x41be3a=_0x54d3c0,_0x1077b8=_0x8e9f3[_0x41be3a(0x237)][0x0];return{..._0x1ab00d,'id':_0x1077b8[_0x41be3a(0x205)],'resolved':_0x8e9f3[_0x41be3a(0x1ec)]===0x1,'dT':w(_0x1077b8['createTimestamp']),'personId':_0x1077b8[_0x41be3a(0x21e)],'threadId':_0x1077b8[_0x41be3a(0x1e3)]};}function me(_0x1c5652,_0x13f49d,_0x4493fa){const _0xa103b1=_0x54d3c0;var _0x519195,_0x5e865d;if(((_0x5e865d=(_0x519195=_0x1c5652==null?void 0x0:_0x1c5652[_0xa103b1(0x237)])==null?void 0x0:_0x519195[_0xa103b1(0x202)])!=null?_0x5e865d:0x0)>0x0){const _0x509481=(_0x5e4a1a,_0x2cec4f)=>({'id':_0x5e4a1a['replyId'],'threadId':_0x5e4a1a['threadId'],'dT':w(_0x5e4a1a[_0xa103b1(0x204)]),'personId':_0x5e4a1a[_0xa103b1(0x21e)],'resolved':_0x1c5652[_0xa103b1(0x1ec)]===v[_0xa103b1(0x242)],'unitId':_0x13f49d,'subUnitId':_0x4493fa,'text':JSON['parse'](_0x5e4a1a[_0xa103b1(0x1f6)]),'parentId':_0x2cec4f}),_0x1096c3=_0x509481(_0x1c5652[_0xa103b1(0x237)][0x0]);return{..._0x1096c3,'children':_0x1c5652['replies']['slice'](0x1)[_0xa103b1(0x220)](_0x4ac12d=>_0x509481(_0x4ac12d,_0x1096c3['id']))};}return null;}function _0x5587(){const _0x5bc3ec=['/reply','413UykPja','saveCommentToSnapshot','getMemberID','parse','Reply','values','5803020TsSsOz','_configService','OpenOrReOpen','body','YYYY/MM/DD\x20HH:mm','rangeId','userId','avatar','map','/solved','addUser','personId','rangeType','thread-comment-data-source.config','setConfig','subject','1485635MdJZcs','filter','payload','add','_threadCommentDataSourceService','_commentService','resolved','_threadCommentModel','listComments','deleteComment','reply','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','searchParams','replies','get','host','resolveComment','Solve','dataSource','_injector','code','pipe','pluginName','Unknown','Solved','2696396DEOsbv','defineProperty','error','235470jTcfZv','_config','/universer-api/comment/unit/','userID','Edit','protocol','onStarting','https','getThread','https:','threadId','UNIVER_UNKNOWN','unit','UNRECOGNIZED','forEach','format','Delete','_userService','type','solved','requireSession','location','_threadCommentDataSource','_sessionService','49584ayuSpg','customRanges','collaborators','/universer-api/user/list','users','content','12fwxSQr','COMMENT','symbol','6754656cSPIXR','32648949KqaRCc','getComment','_threadCommentMentionDataService','comment','_httpService','Add','_threadCommentMentionDataSource','length','unitId','createTimestamp','replyId','getMentions','parentId','stringify','delete','size','user','getOwnPropertyDescriptor','updateComment','_initDataSource','post','_initUserSync'];_0x5587=function(){return _0x5bc3ec;};return _0x5587();}let D=class{constructor(_0xdc1351,_0x12b7eb,_0x52b576,_0x337e95){const _0x33843d=_0x54d3c0;this[_0x33843d(0x1ff)]=_0xdc1351,this[_0x33843d(0x1ea)]=_0x12b7eb,this[_0x33843d(0x1f0)]=_0x52b576,this[_0x33843d(0x23d)]=_0x337e95;}async['addComment'](_0x4de92c){const _0x5d72b4=_0x54d3c0;var _0x21da39,_0xc4b3df;const {parentId:_0x50bb55,unitId:_0x58348a,text:_0x2aae63,threadId:_0x2cc5db}=_0x4de92c,_0x452246=(_0xc4b3df=(_0x21da39=_0x2aae63[_0x5d72b4(0x1f2)])==null?void 0x0:_0x21da39[_0x5d72b4(0x229)](_0x2a84ac=>_0x2a84ac[_0x5d72b4(0x224)]===_0x45bfa5[_0x5d72b4(0x1f8)])[_0x5d72b4(0x220)](_0x5c9247=>_0x5c9247['rangeId']))!=null?_0xc4b3df:[],_0x502389=JSON[_0x5d72b4(0x208)](_0x2aae63),_0x31dbf3=(await this[_0x5d72b4(0x1f0)][_0x5d72b4(0x1ed)](_0x58348a))['getMemberID']();if(_0x50bb55){const _0x2dd0fc={'memberId':_0x31dbf3,'unitId':_0x58348a,'content':_0x502389,'mention':_0x452246,'threadId':_0x2cc5db},_0xde95e6=(await this[_0x5d72b4(0x1ff)][_0x5d72b4(0x20f)](_0x5d72b4(0x1db)+_0x58348a+_0x5d72b4(0x211),{'body':_0x2dd0fc}))['body'][_0x5d72b4(0x232)];return{..._0x4de92c,'id':_0xde95e6[_0x5d72b4(0x205)],'dT':_0x3cbc92(+_0xde95e6[_0x5d72b4(0x204)])[_0x5d72b4(0x1e8)](_0x5d72b4(0x21c)),'personId':_0xde95e6['userId']};}else{const _0x3cae33={'memberId':_0x31dbf3,'unitId':_0x58348a,'content':_0x502389,'mention':_0x452246},_0x25a628=await this[_0x5d72b4(0x1ff)]['post'](_0x5d72b4(0x1db)+_0x58348a+'/add',{'body':_0x3cae33});return de(_0x25a628['body'][_0x5d72b4(0x1fe)],_0x4de92c);}}async[_0x54d3c0(0x20d)](_0x65105b){const _0x303d0e=_0x54d3c0;var _0x2a6fd4,_0x2d45e8;const {text:_0x2254c1,unitId:_0x446063}=_0x65105b,_0x3b2b42=(_0x2d45e8=(_0x2a6fd4=_0x2254c1[_0x303d0e(0x1f2)])==null?void 0x0:_0x2a6fd4[_0x303d0e(0x229)](_0x79dc6=>_0x79dc6[_0x303d0e(0x224)]===_0x45bfa5[_0x303d0e(0x1f8)])[_0x303d0e(0x220)](_0x2bc596=>_0x2bc596[_0x303d0e(0x21d)]))!=null?_0x2d45e8:[],_0xf7bf4c=JSON[_0x303d0e(0x208)](_0x2254c1),_0x5084e2=_0x65105b[_0x303d0e(0x1e3)],_0x4733d5=_0x65105b['id'],_0x395395={'memberId':(await this[_0x303d0e(0x1f0)][_0x303d0e(0x1ed)](_0x446063))[_0x303d0e(0x214)](),'unitId':_0x446063,'threadId':_0x5084e2,'mention':_0x3b2b42,'content':_0xf7bf4c,'replyId':_0x4733d5},_0x5b244b=await this[_0x303d0e(0x1ff)][_0x303d0e(0x20f)](_0x303d0e(0x1db)+_0x446063+'/edit',{'body':_0x395395});return!_0x5b244b[_0x303d0e(0x21b)]['error']||_0x5b244b['body']['error'][_0x303d0e(0x23e)]===0x1;}async[_0x54d3c0(0x23a)](_0xe15011){const _0x5cf847=_0x54d3c0,{unitId:_0x330869}=_0xe15011,_0x1b80df=_0xe15011['threadId'],_0x1d9da6={'memberId':this[_0x5cf847(0x1ea)]['getCurrentUser']()['userID'],'unitId':_0x330869,'threadId':_0x1b80df,'solved':_0xe15011[_0x5cf847(0x22e)]?v['Solved']:v[_0x5cf847(0x21a)]},_0x1f712a=await this[_0x5cf847(0x1ff)][_0x5cf847(0x20f)](_0x5cf847(0x1db)+_0x330869+_0x5cf847(0x221),{'body':_0x1d9da6});return!_0x1f712a[_0x5cf847(0x21b)][_0x5cf847(0x245)]||_0x1f712a[_0x5cf847(0x21b)]['error'][_0x5cf847(0x23e)]===0x1;}async['deleteComment'](_0x3d89e1,_0x417032,_0x14c108,_0x59b6c0){const _0x492208=_0x54d3c0,_0x3975f4={'memberId':(await this[_0x492208(0x1f0)][_0x492208(0x1ed)](_0x3d89e1))[_0x492208(0x214)](),'threadId':_0x14c108,'replyId':_0x59b6c0,'unitId':_0x3d89e1},_0xa73f3f=await this[_0x492208(0x1ff)][_0x492208(0x20f)](_0x492208(0x1db)+_0x3d89e1+'/delete',{'body':_0x3975f4});return!_0xa73f3f[_0x492208(0x21b)][_0x492208(0x245)]||_0xa73f3f['body']['error'][_0x492208(0x23e)]===0x1;}async[_0x54d3c0(0x230)](_0x4445ac,_0x59a290,_0x5db401){const _0x3338a2=_0x54d3c0,_0x376a5c={'unitId':_0x4445ac,'threadId':_0x5db401},_0xca403f=await this[_0x3338a2(0x1ff)][_0x3338a2(0x20f)](_0x3338a2(0x1db)+_0x4445ac+'/list',{'body':_0x376a5c}),_0x564394=_0x5db401[_0x3338a2(0x220)](_0x33fa7b=>me(_0xca403f[_0x3338a2(0x21b)]['comments'][_0x33fa7b],_0x4445ac,_0x59a290))['filter'](Boolean);return Object[_0x3338a2(0x217)](_0xca403f[_0x3338a2(0x21b)][_0x3338a2(0x1f5)])[_0x3338a2(0x1e7)](_0x483b19=>{const _0x781742=_0x3338a2;this[_0x781742(0x1ea)][_0x781742(0x222)](_0x483b19);}),_0x564394;}[_0x54d3c0(0x213)](_0x24c489){const _0x502d96=_0x54d3c0;return{'id':_0x24c489['id'],'threadId':_0x24c489[_0x502d96(0x1e3)],'ref':_0x24c489['ref']};}};D=ce([f(0x0,_0x556ac5(_0x4f4d9a)),f(0x1,_0x556ac5(_0x2f3fe0)),f(0x2,_0x556ac5(_0x385840)),f(0x3,_0x556ac5(_0x4900de))],D);var le=Object[_0x54d3c0(0x244)],he=Object[_0x54d3c0(0x20c)],ue=(_0x1d289e,_0x47bab7,_0x487386,_0x2a73b3)=>{const _0x4ecbdc=_0x54d3c0;for(var _0x1cea13=_0x2a73b3>0x1?void 0x0:_0x2a73b3?he(_0x47bab7,_0x487386):_0x47bab7,_0x141e6f=_0x1d289e[_0x4ecbdc(0x202)]-0x1,_0x35fc70;_0x141e6f>=0x0;_0x141e6f--)(_0x35fc70=_0x1d289e[_0x141e6f])&&(_0x1cea13=(_0x2a73b3?_0x35fc70(_0x47bab7,_0x487386,_0x1cea13):_0x35fc70(_0x1cea13))||_0x1cea13);return _0x2a73b3&&_0x1cea13&&le(_0x47bab7,_0x487386,_0x1cea13),_0x1cea13;},pe=(_0x1208af,_0x32ba16)=>(_0xed1875,_0xa44dd0)=>_0x32ba16(_0xed1875,_0xa44dd0,_0x1208af);let C=class{constructor(_0x4ffb5b){const _0x303d84=_0x54d3c0;this[_0x303d84(0x1ff)]=_0x4ffb5b;}async[_0x54d3c0(0x206)](_0xb523a0,_0x20e239,_0x577ac3){const _0x2c1cba=_0x54d3c0,_0x42177b=new URL(window[_0x2c1cba(0x1ee)]['href'])[_0x2c1cba(0x236)][_0x2c1cba(0x238)](_0x2c1cba(0x1e5));if(!_0x42177b)return[];const _0x34039c=window[_0x2c1cba(0x1ee)][_0x2c1cba(0x239)],_0x3282f3=window[_0x2c1cba(0x1ee)][_0x2c1cba(0x1de)]===_0x2c1cba(0x1e2)?_0x2c1cba(0x1e0):'http';return(await this[_0x2c1cba(0x1ff)][_0x2c1cba(0x238)](_0x3282f3+'://'+_0x34039c+'/universer-api/authz/collaborator',{'params':{'objectID':_0x42177b,'unitID':_0x42177b}}))['body'][_0x2c1cba(0x1f3)][_0x2c1cba(0x220)](_0x1bf8c9=>{const _0x42ccb0=_0x2c1cba;var _0x2e518e,_0x274e43,_0x2538ba,_0x5aef57,_0x5cdc62,_0x1fea7c;return{'id':(_0x274e43=(_0x2e518e=_0x1bf8c9['subject'])==null?void 0x0:_0x2e518e[_0x42ccb0(0x1dc)])!=null?_0x274e43:'','label':(_0x5aef57=(_0x2538ba=_0x1bf8c9[_0x42ccb0(0x227)])==null?void 0x0:_0x2538ba['name'])!=null?_0x5aef57:'','icon':(_0x1fea7c=(_0x5cdc62=_0x1bf8c9['subject'])==null?void 0x0:_0x5cdc62[_0x42ccb0(0x21f)])!=null?_0x1fea7c:'','type':_0x42ccb0(0x20b)};});}};C=ue([pe(0x0,_0x556ac5(_0x4f4d9a))],C);var ve=Object[_0x54d3c0(0x244)],_e=Object[_0x54d3c0(0x20c)],fe=(_0xf411fb,_0x2f74ad,_0x485828,_0x7b1e55)=>{const _0x14906c=_0x54d3c0;for(var _0xfcbb4d=_0x7b1e55>0x1?void 0x0:_0x7b1e55?_e(_0x2f74ad,_0x485828):_0x2f74ad,_0x1ddf08=_0xf411fb[_0x14906c(0x202)]-0x1,_0xd2c168;_0x1ddf08>=0x0;_0x1ddf08--)(_0xd2c168=_0xf411fb[_0x1ddf08])&&(_0xfcbb4d=(_0x7b1e55?_0xd2c168(_0x2f74ad,_0x485828,_0xfcbb4d):_0xd2c168(_0xfcbb4d))||_0xfcbb4d);return _0x7b1e55&&_0xfcbb4d&&ve(_0x2f74ad,_0x485828,_0xfcbb4d),_0xfcbb4d;},I=(_0x29b9ed,_0x48ed11)=>(_0x32bbf5,_0x4bc109)=>_0x48ed11(_0x32bbf5,_0x4bc109,_0x29b9ed);let b=class extends _0x52739f{constructor(_0xf89097,_0x2fd09c,_0xba321c,_0x7a5b4d){const _0x1244b2=_0x54d3c0;super(),this[_0x1244b2(0x22c)]=_0xf89097,this[_0x1244b2(0x1ef)]=_0x2fd09c,this[_0x1244b2(0x1fd)]=_0xba321c,this[_0x1244b2(0x201)]=_0x7a5b4d,this[_0x1244b2(0x20e)]();}[_0x54d3c0(0x20e)](){const _0x37842b=_0x54d3c0;this['_threadCommentDataSourceService'][_0x37842b(0x23c)]=this[_0x37842b(0x1ef)],this[_0x37842b(0x22c)]['syncUpdateMutationToColla']=!0x1,this[_0x37842b(0x1fd)][_0x37842b(0x23c)]=this[_0x37842b(0x201)];}};b=fe([_0x2e269a(_0x2dc267['Starting'],b),I(0x0,_0x183b75),I(0x1,_0x556ac5(D)),I(0x2,_0x1d516f),I(0x3,_0x556ac5(C))],b);var Y=Object[_0x54d3c0(0x244)],Ie=Object['getOwnPropertyDescriptor'],Se=(_0x224c38,_0x492ef6,_0x5d39ea)=>_0x492ef6 in _0x224c38?Y(_0x224c38,_0x492ef6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d39ea}):_0x224c38[_0x492ef6]=_0x5d39ea,be=(_0x55a7cb,_0x16f2f9,_0x4b52aa,_0x2d931e)=>{const _0x45dc5c=_0x54d3c0;for(var _0x528292=_0x2d931e>0x1?void 0x0:_0x2d931e?Ie(_0x16f2f9,_0x4b52aa):_0x16f2f9,_0x5af7d5=_0x55a7cb[_0x45dc5c(0x202)]-0x1,_0x152cb7;_0x5af7d5>=0x0;_0x5af7d5--)(_0x152cb7=_0x55a7cb[_0x5af7d5])&&(_0x528292=(_0x2d931e?_0x152cb7(_0x16f2f9,_0x4b52aa,_0x528292):_0x152cb7(_0x528292))||_0x528292);return _0x2d931e&&_0x528292&&Y(_0x16f2f9,_0x4b52aa,_0x528292),_0x528292;},j=(_0x16e984,_0x1b4222)=>(_0x4e5a9f,_0x220bda)=>_0x1b4222(_0x4e5a9f,_0x220bda,_0x16e984),G=(_0x495927,_0x4f5702,_0xbd0703)=>Se(_0x495927,typeof _0x4f5702!=_0x54d3c0(0x1f9)?_0x4f5702+'':_0x4f5702,_0xbd0703);let g=class extends _0x1a3cb5{constructor(_0x1bb7a8=ne,_0xc93fd4,_0x10c50a){const _0x3fb49f=_0x54d3c0;super(),this[_0x3fb49f(0x247)]=_0x1bb7a8,this['_injector']=_0xc93fd4,this[_0x3fb49f(0x219)]=_0x10c50a;const {..._0xbd407f}=this[_0x3fb49f(0x247)];this['_configService'][_0x3fb49f(0x226)](oe,_0xbd407f);}[_0x54d3c0(0x1df)](){const _0x450fff=_0x54d3c0;[[C],[D],[b],[S]][_0x450fff(0x1e7)](_0x51dad5=>{const _0xb81c9e=_0x450fff;this['_injector'][_0xb81c9e(0x22b)](_0x51dad5);});}};G(g,_0x54d3c0(0x240),k),G(g,'type',_0x4408ec[_0x54d3c0(0x1e4)]),g=be([_0x556292(_0x137644,_0x125610,_0x541cb2,_0x4bd77d),j(0x1,_0x556ac5(_0x4900de)),j(0x2,_0x5362db)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x13dde2=_0x1d97;(function(_0x3d6f81,_0x36f6f8){const _0x34c911=_0x1d97,_0xb15042=_0x3d6f81();while(!![]){try{const _0x2c891a=-parseInt(_0x34c911(0xe5))/0x1*(parseInt(_0x34c911(0xbe))/0x2)+parseInt(_0x34c911(0xb3))/0x3+parseInt(_0x34c911(0xca))/0x4*(-parseInt(_0x34c911(0xdc))/0x5)+parseInt(_0x34c911(0xb5))/0x6*(-parseInt(_0x34c911(0xef))/0x7)+parseInt(_0x34c911(0xd0))/0x8+-parseInt(_0x34c911(0x116))/0x9*(parseInt(_0x34c911(0x102))/0xa)+parseInt(_0x34c911(0x107))/0xb;if(_0x2c891a===_0x36f6f8)break;else _0xb15042['push'](_0xb15042['shift']());}catch(_0x6ae904){_0xb15042['push'](_0xb15042['shift']());}}}(_0x4a59,0x871a7));import{UserManagerService as _0xdaed2f,Inject as _0x221299,Injector as _0x53080a,Disposable as _0x156250,CustomRangeType as _0x44569b,UniverInstanceType as _0x1def83,DependentOn as _0x3526f9,Plugin as _0x21977a,IConfigService as _0x183af9}from'@univerjs/core';import{ThreadCommentModel as _0x2b52ee,IThreadCommentDataSourceService as _0x273f0a,UniverThreadCommentPlugin as _0x508da6}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x201138,UniverThreadCommentUIPlugin as _0x178703}from'@univerjs/thread-comment-ui';import{CommentService as _0x2ba92e,CollaborationSessionService as _0x42a2af,UniverCollaborationClientPlugin as _0x2775d9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x56200b}from'@univerjs-pro/license';import{bufferTime as _0x433b2b}from'rxjs';import{HTTPService as _0x8b1593}from'@univerjs/network';import _0x52a6f3 from'dayjs';const Q=_0x13dde2(0xd1);var v=(_0x7cf8bc=>(_0x7cf8bc[_0x7cf8bc[_0x13dde2(0xe4)]=0x0]=_0x13dde2(0xe4),_0x7cf8bc[_0x7cf8bc['Solved']=0x1]='Solved',_0x7cf8bc[_0x7cf8bc[_0x13dde2(0xc4)]=-0x1]=_0x13dde2(0xc4),_0x7cf8bc))(v||{}),p=(_0xeb738d=>(_0xeb738d[_0xeb738d[_0x13dde2(0x11b)]=0x0]='Unknown',_0xeb738d[_0xeb738d[_0x13dde2(0x10a)]=0x1]=_0x13dde2(0x10a),_0xeb738d[_0xeb738d['Reply']=0x2]=_0x13dde2(0x11a),_0xeb738d[_0xeb738d[_0x13dde2(0xe6)]=0x3]=_0x13dde2(0xe6),_0xeb738d[_0xeb738d[_0x13dde2(0xe8)]=0x4]=_0x13dde2(0xe8),_0xeb738d[_0xeb738d['Solve']=0x5]=_0x13dde2(0xb6),_0xeb738d[_0xeb738d[_0x13dde2(0xc4)]=-0x1]=_0x13dde2(0xc4),_0xeb738d))(p||{});const w=_0x29206e=>_0x52a6f3(new Date(+_0x29206e))['format'](_0x13dde2(0xfb)),X=async(_0x5490e8,_0x1efbb6)=>{const _0xc47d99=_0x13dde2,_0x5ef621=_0x5490e8['get'](_0xdaed2f),_0x22eda6=_0x5490e8['get'](_0x8b1593);_0x1efbb6[_0xc47d99(0xb8)](_0x232f70=>{const _0x1c8208=_0xc47d99;_0x5ef621[_0x1c8208(0xeb)](_0x232f70)&&_0x1efbb6[_0x1c8208(0xcf)](_0x232f70);}),_0x1efbb6['size']&&(await _0x22eda6[_0xc47d99(0x10e)](_0xc47d99(0xd6),{'params':{'userIDs':[..._0x1efbb6]}}))[_0xc47d99(0xc8)]['users']['forEach'](_0x86d288=>{const _0x2abdea=_0xc47d99;_0x86d288&&_0x5ef621[_0x2abdea(0x10c)](_0x86d288);});};function _0x4a59(){const _0x26f6f3=['disposeWithMe','href','pluginName','getComment','format','https','_initDataSource','code','2977323pofZgM','deleteComment','6ofRUWd','Solve','collaborators','forEach','/delete','getMemberID','error','userId','customRanges','402834UlSSuE','symbol','addComment','slice','type','searchParams','UNRECOGNIZED','dataSource','_threadCommentDataSource','parse','body','_userService','10252tukhFd','_threadCommentMentionDataService','setConfig','_injector','commentUpdate$','delete','3618760jdFqZp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/comment/unit/','_commentService','_httpService','_configService','/universer-api/user/list','content','map','user','_sessionService','Solved','955kgSDVu','_config','subject','resolveComment','/edit','location','ref','filter','OpenOrReOpen','3Ismmom','Edit','defineProperty','Delete','thread-comment-data-source.config','requireSession','getUser','name','_threadCommentMentionDataSource','length','1985354tzPMjs','rangeType','/universer-api/authz/collaborator','add','values','replies','_threadCommentDataSourceService','parentId','listComments','/add','_init','solved','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','replyId','COMMENT','unitId','getThread','://','60ZNubkm','stringify','_threadCommentModel','avatar','resolved','8787867xYUnqx','comments','host','Add','getOwnPropertyDescriptor','addUser','threadId','get','getMentions','_initUserSync','protocol','rangeId','pipe','createTimestamp','UNIVER_UNKNOWN','469341BnxHvE','reply','post','subscribe','Reply','Unknown','userID'];_0x4a59=function(){return _0x26f6f3;};return _0x4a59();}var k=Object[_0x13dde2(0xe7)],ee=Object[_0x13dde2(0x10b)],re=(_0x30eb6c,_0x14c724,_0x149029,_0x5bc52e)=>{for(var _0x441b5c=_0x5bc52e>0x1?void 0x0:_0x5bc52e?ee(_0x14c724,_0x149029):_0x14c724,_0x10e8ec=_0x30eb6c['length']-0x1,_0xc3601e;_0x10e8ec>=0x0;_0x10e8ec--)(_0xc3601e=_0x30eb6c[_0x10e8ec])&&(_0x441b5c=(_0x5bc52e?_0xc3601e(_0x14c724,_0x149029,_0x441b5c):_0xc3601e(_0x441b5c))||_0x441b5c);return _0x5bc52e&&_0x441b5c&&k(_0x14c724,_0x149029,_0x441b5c),_0x441b5c;},_=(_0x21d0ce,_0xfe748)=>(_0x5385b6,_0x243266)=>_0xfe748(_0x5385b6,_0x243266,_0x21d0ce);let S=class extends _0x156250{constructor(_0x4166e6,_0x116d2d,_0x4068fe,_0x5237ce){const _0x2394a9=_0x13dde2;super(),this[_0x2394a9(0xd3)]=_0x4166e6,this['_threadCommentModel']=_0x116d2d,this[_0x2394a9(0xc9)]=_0x4068fe,this[_0x2394a9(0xcd)]=_0x5237ce,this[_0x2394a9(0xf9)](),this[_0x2394a9(0x110)]();}['_initUserSync'](){const _0x94564e=_0x13dde2;this['disposeWithMe'](this[_0x94564e(0x104)][_0x94564e(0xce)][_0x94564e(0x113)](_0x433b2b(0x10))['subscribe'](_0x4a5da2=>{const _0x28d1e6=_0x94564e,_0x1a7a61=new Set();_0x4a5da2[_0x28d1e6(0xb8)](_0x36ecf2=>{const _0x11a7a5=_0x28d1e6;switch(_0x36ecf2['type']){case'add':{const _0x3bfebe=_0x36ecf2['payload']['personId'];_0x1a7a61[_0x11a7a5(0xf2)](_0x3bfebe);break;}}}),X(this[_0x28d1e6(0xcd)],_0x1a7a61);}));}['_init'](){const _0x46c381=_0x13dde2;this[_0x46c381(0x11d)](this['_commentService'][_0x46c381(0xce)][_0x46c381(0x119)](async _0x2b35db=>{const _0xb58926=_0x46c381;var _0x1c28fa,_0x4c51ef;const _0x40b8f3=this[_0xb58926(0x104)][_0xb58926(0x100)](_0x2b35db[_0xb58926(0xff)],_0x2b35db['threadId']);if(!_0x40b8f3)return;const {unitId:_0xdf5bb8,subUnitId:_0x450c09}=_0x40b8f3;switch(_0x2b35db[_0xb58926(0xd9)]&&this['_userService'][_0xb58926(0x10c)](_0x2b35db[_0xb58926(0xd9)]),_0x2b35db['type']){case p['Add']:break;case p[_0xb58926(0x11a)]:{this['_threadCommentModel'][_0xb58926(0xc0)](_0xdf5bb8,_0x450c09,{'unitId':_0xdf5bb8,'subUnitId':_0x450c09,'ref':'','id':_0x2b35db[_0xb58926(0xfd)],'dT':w(+_0x2b35db[_0xb58926(0x114)]),'threadId':_0x2b35db['threadId'],'personId':(_0x4c51ef=(_0x1c28fa=_0x2b35db[_0xb58926(0xd9)])==null?void 0x0:_0x1c28fa[_0xb58926(0x11c)])!=null?_0x4c51ef:_0x2b35db[_0xb58926(0xbc)],'text':JSON['parse'](_0x2b35db[_0xb58926(0xd7)]),'parentId':_0x40b8f3['id']});break;}case p[_0xb58926(0xe8)]:{const _0x2b6a05=this[_0xb58926(0x104)][_0xb58926(0xae)](_0xdf5bb8,_0x450c09,_0x2b35db['replyId']);_0x2b6a05&&_0x2b6a05[_0xb58926(0xf6)]&&this[_0xb58926(0x104)][_0xb58926(0xb4)](_0xdf5bb8,_0x450c09,_0x2b35db[_0xb58926(0xfd)]);break;}case p[_0xb58926(0xe6)]:{this[_0xb58926(0x104)]['updateComment'](_0xdf5bb8,_0x450c09,{'commentId':_0x2b35db[_0xb58926(0xfd)],'text':JSON[_0xb58926(0xc7)](_0x2b35db['content'])});break;}case p[_0xb58926(0xb6)]:{const _0x266887=this['_threadCommentModel'][_0xb58926(0x100)](_0xdf5bb8,_0x2b35db['threadId']);_0x266887&&this[_0xb58926(0x104)]['resolveComment'](_0xdf5bb8,_0x450c09,_0x266887['id'],_0x2b35db['solved']===v['Solved']);break;}}}));}};S=re([_(0x0,_0x221299(_0x2ba92e)),_(0x1,_0x221299(_0x2b52ee)),_(0x2,_0x221299(_0xdaed2f)),_(0x3,_0x221299(_0x53080a))],S);const te=_0x13dde2(0xe9),se={};var oe=Object[_0x13dde2(0xe7)],ne=Object[_0x13dde2(0x10b)],ie=(_0x42d5cb,_0xbfb09c,_0x469a8c,_0x56c2fb)=>{const _0x32dc12=_0x13dde2;for(var _0x11dd8e=_0x56c2fb>0x1?void 0x0:_0x56c2fb?ne(_0xbfb09c,_0x469a8c):_0xbfb09c,_0x2c23a3=_0x42d5cb[_0x32dc12(0xee)]-0x1,_0x1fed01;_0x2c23a3>=0x0;_0x2c23a3--)(_0x1fed01=_0x42d5cb[_0x2c23a3])&&(_0x11dd8e=(_0x56c2fb?_0x1fed01(_0xbfb09c,_0x469a8c,_0x11dd8e):_0x1fed01(_0x11dd8e))||_0x11dd8e);return _0x56c2fb&&_0x11dd8e&&oe(_0xbfb09c,_0x469a8c,_0x11dd8e),_0x11dd8e;},I=(_0x3c72e8,_0x704234)=>(_0x5c3a92,_0xf8b67c)=>_0x704234(_0x5c3a92,_0xf8b67c,_0x3c72e8);function ae(_0x7fa650,_0x143e40){const _0x10d9a4=_0x13dde2,_0x3e8db6=_0x7fa650[_0x10d9a4(0xf4)][0x0];return{..._0x143e40,'id':_0x3e8db6[_0x10d9a4(0xfd)],'resolved':_0x7fa650[_0x10d9a4(0xfa)]===0x1,'dT':w(_0x3e8db6[_0x10d9a4(0x114)]),'personId':_0x3e8db6[_0x10d9a4(0xbc)],'threadId':_0x3e8db6['threadId']};}function ce(_0x1d5cb2,_0x2e29ac,_0x33227f){const _0x530e0c=_0x13dde2;var _0x849423,_0x55294a;if(((_0x55294a=(_0x849423=_0x1d5cb2==null?void 0x0:_0x1d5cb2[_0x530e0c(0xf4)])==null?void 0x0:_0x849423[_0x530e0c(0xee)])!=null?_0x55294a:0x0)>0x0){const _0x11879e=(_0x3e45d2,_0x757ec2)=>({'id':_0x3e45d2['replyId'],'threadId':_0x3e45d2[_0x530e0c(0x10d)],'dT':w(_0x3e45d2[_0x530e0c(0x114)]),'personId':_0x3e45d2[_0x530e0c(0xbc)],'resolved':_0x1d5cb2[_0x530e0c(0xfa)]===v[_0x530e0c(0xdb)],'unitId':_0x2e29ac,'subUnitId':_0x33227f,'text':JSON[_0x530e0c(0xc7)](_0x3e45d2[_0x530e0c(0xd7)]),'parentId':_0x757ec2}),_0xd49f77=_0x11879e(_0x1d5cb2[_0x530e0c(0xf4)][0x0]);return{..._0xd49f77,'children':_0x1d5cb2[_0x530e0c(0xf4)][_0x530e0c(0xc1)](0x1)[_0x530e0c(0xd8)](_0x19ab9f=>_0x11879e(_0x19ab9f,_0xd49f77['id']))};}return null;}let b=class{constructor(_0x3d4ba5,_0x169e1a,_0x1a8fcb,_0x5f4a0f){const _0x3bde4f=_0x13dde2;this[_0x3bde4f(0xd4)]=_0x3d4ba5,this[_0x3bde4f(0xc9)]=_0x169e1a,this[_0x3bde4f(0xda)]=_0x1a8fcb,this['_injector']=_0x5f4a0f;}async[_0x13dde2(0xc0)](_0x56f1f4){const _0x14aedd=_0x13dde2;var _0x581209,_0xc7038d;const {parentId:_0x8c3721,unitId:_0x4f52c6,text:_0x305e5b,threadId:_0x4deafb}=_0x56f1f4,_0x244d7e=(_0xc7038d=(_0x581209=_0x305e5b[_0x14aedd(0xbd)])==null?void 0x0:_0x581209[_0x14aedd(0xe3)](_0x491d59=>_0x491d59[_0x14aedd(0xf0)]===_0x44569b['COMMENT'])['map'](_0x18c38d=>_0x18c38d[_0x14aedd(0x112)]))!=null?_0xc7038d:[],_0x3ebcb0=JSON['stringify'](_0x305e5b),_0x2cfaef=(await this[_0x14aedd(0xda)][_0x14aedd(0xea)](_0x4f52c6))[_0x14aedd(0xba)]();if(_0x8c3721){const _0x5c375b={'memberId':_0x2cfaef,'unitId':_0x4f52c6,'content':_0x3ebcb0,'mention':_0x244d7e,'threadId':_0x4deafb},_0x4cfac1=(await this[_0x14aedd(0xd4)][_0x14aedd(0x118)](_0x14aedd(0xd2)+_0x4f52c6+'/reply',{'body':_0x5c375b}))['body'][_0x14aedd(0x117)];return{..._0x56f1f4,'id':_0x4cfac1['replyId'],'dT':_0x52a6f3(+_0x4cfac1[_0x14aedd(0x114)])[_0x14aedd(0xaf)](_0x14aedd(0xfb)),'personId':_0x4cfac1[_0x14aedd(0xbc)]};}else{const _0x50de14={'memberId':_0x2cfaef,'unitId':_0x4f52c6,'content':_0x3ebcb0,'mention':_0x244d7e},_0x414f5c=await this[_0x14aedd(0xd4)][_0x14aedd(0x118)](_0x14aedd(0xd2)+_0x4f52c6+_0x14aedd(0xf8),{'body':_0x50de14});return ae(_0x414f5c[_0x14aedd(0xc8)]['comment'],_0x56f1f4);}}async['updateComment'](_0x258704){const _0x4d2e21=_0x13dde2;var _0x56c100,_0x1a94d3;const {text:_0x4f4ea4,unitId:_0x1dedc4}=_0x258704,_0x56a30a=(_0x1a94d3=(_0x56c100=_0x4f4ea4[_0x4d2e21(0xbd)])==null?void 0x0:_0x56c100[_0x4d2e21(0xe3)](_0x484add=>_0x484add[_0x4d2e21(0xf0)]===_0x44569b[_0x4d2e21(0xfe)])[_0x4d2e21(0xd8)](_0x3be8df=>_0x3be8df[_0x4d2e21(0x112)]))!=null?_0x1a94d3:[],_0x32cd6f=JSON[_0x4d2e21(0x103)](_0x4f4ea4),_0x373f12=_0x258704['threadId'],_0x5ad4ae=_0x258704['id'],_0x32d27e={'memberId':(await this[_0x4d2e21(0xda)]['requireSession'](_0x1dedc4))[_0x4d2e21(0xba)](),'unitId':_0x1dedc4,'threadId':_0x373f12,'mention':_0x56a30a,'content':_0x32cd6f,'replyId':_0x5ad4ae},_0x3a092d=await this[_0x4d2e21(0xd4)][_0x4d2e21(0x118)]('/universer-api/comment/unit/'+_0x1dedc4+_0x4d2e21(0xe0),{'body':_0x32d27e});return!_0x3a092d[_0x4d2e21(0xc8)][_0x4d2e21(0xbb)]||_0x3a092d['body'][_0x4d2e21(0xbb)][_0x4d2e21(0xb2)]===0x1;}async[_0x13dde2(0xdf)](_0x19f737){const _0x1f57f0=_0x13dde2,{unitId:_0x5f31f7}=_0x19f737,_0xb3e276=_0x19f737[_0x1f57f0(0x10d)],_0x103c6c={'memberId':this[_0x1f57f0(0xc9)]['getCurrentUser']()[_0x1f57f0(0x11c)],'unitId':_0x5f31f7,'threadId':_0xb3e276,'solved':_0x19f737[_0x1f57f0(0x106)]?v[_0x1f57f0(0xdb)]:v[_0x1f57f0(0xe4)]},_0x115054=await this[_0x1f57f0(0xd4)][_0x1f57f0(0x118)](_0x1f57f0(0xd2)+_0x5f31f7+'/solved',{'body':_0x103c6c});return!_0x115054['body'][_0x1f57f0(0xbb)]||_0x115054['body'][_0x1f57f0(0xbb)]['code']===0x1;}async[_0x13dde2(0xb4)](_0x1aae4d,_0x2a30c9,_0x4815a9,_0x10ae1e){const _0x109652=_0x13dde2,_0x30ba6c={'memberId':(await this[_0x109652(0xda)][_0x109652(0xea)](_0x1aae4d))[_0x109652(0xba)](),'threadId':_0x4815a9,'replyId':_0x10ae1e,'unitId':_0x1aae4d},_0x3696c9=await this[_0x109652(0xd4)][_0x109652(0x118)]('/universer-api/comment/unit/'+_0x1aae4d+_0x109652(0xb9),{'body':_0x30ba6c});return!_0x3696c9[_0x109652(0xc8)]['error']||_0x3696c9['body']['error'][_0x109652(0xb2)]===0x1;}async[_0x13dde2(0xf7)](_0x2ff5b5,_0x2e9a7f,_0x4568d9){const _0x151c43=_0x13dde2,_0xdb570c={'unitId':_0x2ff5b5,'threadId':_0x4568d9},_0xac1fdd=await this['_httpService']['post'](_0x151c43(0xd2)+_0x2ff5b5+'/list',{'body':_0xdb570c}),_0x42b2cd=_0x4568d9[_0x151c43(0xd8)](_0x56a3a7=>ce(_0xac1fdd[_0x151c43(0xc8)][_0x151c43(0x108)][_0x56a3a7],_0x2ff5b5,_0x2e9a7f))[_0x151c43(0xe3)](Boolean);return Object[_0x151c43(0xf3)](_0xac1fdd[_0x151c43(0xc8)]['users'])[_0x151c43(0xb8)](_0x34e5cc=>{const _0x3cd40e=_0x151c43;this[_0x3cd40e(0xc9)]['addUser'](_0x34e5cc);}),_0x42b2cd;}['saveCommentToSnapshot'](_0x5e11c8){const _0x36735c=_0x13dde2;return{'id':_0x5e11c8['id'],'threadId':_0x5e11c8['threadId'],'ref':_0x5e11c8[_0x36735c(0xe2)]};}};b=ie([I(0x0,_0x221299(_0x8b1593)),I(0x1,_0x221299(_0xdaed2f)),I(0x2,_0x221299(_0x42a2af)),I(0x3,_0x221299(_0x53080a))],b);var de=Object[_0x13dde2(0xe7)],me=Object['getOwnPropertyDescriptor'],le=(_0x29d667,_0x275c45,_0x4155a7,_0x41343f)=>{for(var _0x18720e=_0x41343f>0x1?void 0x0:_0x41343f?me(_0x275c45,_0x4155a7):_0x275c45,_0x3af199=_0x29d667['length']-0x1,_0x5978be;_0x3af199>=0x0;_0x3af199--)(_0x5978be=_0x29d667[_0x3af199])&&(_0x18720e=(_0x41343f?_0x5978be(_0x275c45,_0x4155a7,_0x18720e):_0x5978be(_0x18720e))||_0x18720e);return _0x41343f&&_0x18720e&&de(_0x275c45,_0x4155a7,_0x18720e),_0x18720e;},he=(_0x3f1352,_0xeece36)=>(_0x53e28f,_0x13dd31)=>_0xeece36(_0x53e28f,_0x13dd31,_0x3f1352);function _0x1d97(_0x1d59ad,_0x553abf){const _0x4a592c=_0x4a59();return _0x1d97=function(_0x1d97ae,_0x23d52c){_0x1d97ae=_0x1d97ae-0xae;let _0x1e1e52=_0x4a592c[_0x1d97ae];return _0x1e1e52;},_0x1d97(_0x1d59ad,_0x553abf);}let D=class{constructor(_0x4d5b7c){const _0x5dbb60=_0x13dde2;this[_0x5dbb60(0xd4)]=_0x4d5b7c;}async[_0x13dde2(0x10f)](_0x293fa9,_0x1548c6,_0x28050a){const _0x2ed3fc=_0x13dde2,_0x5280c8=new URL(window['location'][_0x2ed3fc(0x11e)])[_0x2ed3fc(0xc3)]['get']('unit');if(!_0x5280c8)return[];const _0x95c952=window['location'][_0x2ed3fc(0x109)],_0x191954=window[_0x2ed3fc(0xe1)][_0x2ed3fc(0x111)]==='https:'?_0x2ed3fc(0xb0):'http';return(await this[_0x2ed3fc(0xd4)][_0x2ed3fc(0x10e)](_0x191954+_0x2ed3fc(0x101)+_0x95c952+_0x2ed3fc(0xf1),{'params':{'objectID':_0x5280c8,'unitID':_0x5280c8}}))[_0x2ed3fc(0xc8)][_0x2ed3fc(0xb7)]['map'](_0x281503=>{const _0x23fade=_0x2ed3fc;var _0x31118e,_0xdb9738,_0x250713,_0x41d00d,_0x5035fe,_0x3002d1;return{'id':(_0xdb9738=(_0x31118e=_0x281503[_0x23fade(0xde)])==null?void 0x0:_0x31118e[_0x23fade(0x11c)])!=null?_0xdb9738:'','label':(_0x41d00d=(_0x250713=_0x281503['subject'])==null?void 0x0:_0x250713[_0x23fade(0xec)])!=null?_0x41d00d:'','icon':(_0x3002d1=(_0x5035fe=_0x281503['subject'])==null?void 0x0:_0x5035fe[_0x23fade(0x105)])!=null?_0x3002d1:'','type':_0x23fade(0xd9)};});}};D=le([he(0x0,_0x221299(_0x8b1593))],D);var ue=Object[_0x13dde2(0xe7)],pe=Object[_0x13dde2(0x10b)],ve=(_0x9b2de,_0x4b3ad7,_0x57cf6c,_0x5261f6)=>{const _0x4737cd=_0x13dde2;for(var _0x48404f=_0x5261f6>0x1?void 0x0:_0x5261f6?pe(_0x4b3ad7,_0x57cf6c):_0x4b3ad7,_0x3e2a27=_0x9b2de[_0x4737cd(0xee)]-0x1,_0x55c420;_0x3e2a27>=0x0;_0x3e2a27--)(_0x55c420=_0x9b2de[_0x3e2a27])&&(_0x48404f=(_0x5261f6?_0x55c420(_0x4b3ad7,_0x57cf6c,_0x48404f):_0x55c420(_0x48404f))||_0x48404f);return _0x5261f6&&_0x48404f&&ue(_0x4b3ad7,_0x57cf6c,_0x48404f),_0x48404f;},f=(_0x254c04,_0x30ae3d)=>(_0x2ebbab,_0x56be10)=>_0x30ae3d(_0x2ebbab,_0x56be10,_0x254c04);let C=class extends _0x156250{constructor(_0x271e74,_0x233c2c,_0x47441a,_0x4b49d8){const _0x52e026=_0x13dde2;super(),this[_0x52e026(0xf5)]=_0x271e74,this[_0x52e026(0xc6)]=_0x233c2c,this[_0x52e026(0xcb)]=_0x47441a,this[_0x52e026(0xed)]=_0x4b49d8,this[_0x52e026(0xb1)]();}[_0x13dde2(0xb1)](){const _0x36b599=_0x13dde2;this['_threadCommentDataSourceService'][_0x36b599(0xc5)]=this[_0x36b599(0xc6)],this[_0x36b599(0xf5)][_0x36b599(0xfc)]=!0x1,this[_0x36b599(0xcb)]['dataSource']=this[_0x36b599(0xed)];}};C=ve([f(0x0,_0x273f0a),f(0x1,_0x221299(b)),f(0x2,_0x201138),f(0x3,_0x221299(D))],C);var E=Object[_0x13dde2(0xe7)],_e=Object[_0x13dde2(0x10b)],Ie=(_0x14d597,_0x748702,_0x550809)=>_0x748702 in _0x14d597?E(_0x14d597,_0x748702,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x550809}):_0x14d597[_0x748702]=_0x550809,fe=(_0x1ee83c,_0x718546,_0xfba923,_0x5b9495)=>{const _0x2dfa30=_0x13dde2;for(var _0x5891e1=_0x5b9495>0x1?void 0x0:_0x5b9495?_e(_0x718546,_0xfba923):_0x718546,_0x15d38b=_0x1ee83c[_0x2dfa30(0xee)]-0x1,_0x5663c6;_0x15d38b>=0x0;_0x15d38b--)(_0x5663c6=_0x1ee83c[_0x15d38b])&&(_0x5891e1=(_0x5b9495?_0x5663c6(_0x718546,_0xfba923,_0x5891e1):_0x5663c6(_0x5891e1))||_0x5891e1);return _0x5b9495&&_0x5891e1&&E(_0x718546,_0xfba923,_0x5891e1),_0x5891e1;},T=(_0x4165ed,_0x3a2c8f)=>(_0x4b64f5,_0x32ac5f)=>_0x3a2c8f(_0x4b64f5,_0x32ac5f,_0x4165ed),x=(_0x1f623a,_0x4de791,_0x4b3721)=>Ie(_0x1f623a,typeof _0x4de791!=_0x13dde2(0xbf)?_0x4de791+'':_0x4de791,_0x4b3721);let g=class extends _0x21977a{constructor(_0xa11add=se,_0x536dee,_0x6c7ac6){const _0x4983c9=_0x13dde2;super(),this[_0x4983c9(0xdd)]=_0xa11add,this[_0x4983c9(0xcd)]=_0x536dee,this[_0x4983c9(0xd5)]=_0x6c7ac6;const {..._0x247299}=this['_config'];this[_0x4983c9(0xd5)][_0x4983c9(0xcc)](te,_0x247299);}['onStarting'](){const _0x5c1ae8=_0x13dde2;[[D],[b],[C],[S]][_0x5c1ae8(0xb8)](_0x2e09d6=>{const _0x5a76ba=_0x5c1ae8;this['_injector'][_0x5a76ba(0xf2)](_0x2e09d6);}),this[_0x5c1ae8(0xcd)][_0x5c1ae8(0x10e)](C);}['onReady'](){const _0x5535e3=_0x13dde2;this['_injector'][_0x5535e3(0x10e)](S);}};x(g,_0x13dde2(0x11f),Q),x(g,_0x13dde2(0xc2),_0x1def83[_0x13dde2(0x115)]),g=fe([_0x3526f9(_0x508da6,_0x178703,_0x2775d9,_0x56200b),T(0x1,_0x221299(_0x53080a)),T(0x2,_0x183af9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Disposable, Injector, UserManagerService } from '@univerjs/core';
|
|
2
|
-
import { CommentService } from '@univerjs-pro/collaboration-client';
|
|
3
2
|
import { ThreadCommentModel } from '@univerjs/thread-comment';
|
|
3
|
+
import { CommentService } from '@univerjs-pro/collaboration-client';
|
|
4
4
|
export declare class ThreadCommentCollaUpdateController extends Disposable {
|
|
5
5
|
private readonly _commentService;
|
|
6
6
|
private readonly _threadCommentModel;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
|
|
|
8
8
|
static type: UniverInstanceType;
|
|
9
9
|
constructor(_config: IUniverThreadCommentDataSourceConfig | undefined, _injector: Injector, _configService: IConfigService);
|
|
10
10
|
onStarting(): void;
|
|
11
|
+
onReady(): void;
|
|
11
12
|
}
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xcdf0(_0x4ea4b9,_0xcc44e5){const _0x5139c2=_0x5139();return _0xcdf0=function(_0xcdf00b,_0x3088d2){_0xcdf00b=_0xcdf00b-0x188;let _0x5ccdda=_0x5139c2[_0xcdf00b];return _0x5ccdda;},_0xcdf0(_0x4ea4b9,_0xcc44e5);}function _0x5139(){const _0x45df11=['_threadCommentDataSourceService','pipe','function','https','setConfig','_initUserSync','OpenOrReOpen','saveCommentToSnapshot','add','getMentions','slice','values','@univerjs/network','UniverThreadCommentUi','UniverThreadCommentDataSourcePlugin','_userService','stringify','@univerjs-pro/license','http','commentUpdate$','Module','UNRECOGNIZED','rangeType','/universer-api/comment/unit/','customRanges','/universer-api/user/list','_httpService','/delete','replies','@univerjs-pro/collaboration-client','solved','delete','CommentService','LifecycleStages','Solve','symbol','threadId','unit','8afABGm','body','CollaborationSessionService','deleteComment','comments','href','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentMentionDataSource','566523YyNIUv','addUser','11035qZSvpu','_threadCommentDataSource','IThreadCommentMentionDataService','getUser','toStringTag','_sessionService','userID','code','createTimestamp','parse','subscribe','_threadCommentMentionDataService','onStarting','@univerjs/thread-comment-ui','length','/universer-api/authz/collaborator','personId','rxjs','YYYY/MM/DD\x20HH:mm','bufferTime','rangeId','508hVuuuB','map','object','/list','10SUnQZp','Reply','resolveComment','getOwnPropertyDescriptor','1017540jtjCTn','_injector','dayjs','_threadCommentModel','reply','_init','OnLifecycle','parentId','COMMENT','589gAoaZS','userId','UniverCore','content','IThreadCommentDataSourceService','314088PqKyby','searchParams','size','ThreadCommentModel','protocol','getCurrentUser','forEach','thread-comment-data-source.config','Unknown','host','_initDataSource','unitId','Solved','Inject','UniverLicense','subject','addComment','182679dPHPRa','UniverNetwork','CustomRangeType','UniverCollaborationClient','format','dataSource','getComment','avatar','DependentOn','Delete','622nUvWnv','listComments','type','error','requireSession','_commentService','get','1506186lZkIIr','UserManagerService','UniverThreadComment','comment','@univerjs/thread-comment','Edit','replyId','Disposable','location','payload','getThread','users','disposeWithMe','Add','amd','UNIVER_UNKNOWN','HTTPService','://','defineProperty','getMemberID','user','UniverThreadCommentPlugin','/edit','UniverThreadCommentUIPlugin','filter','Injector','_config','/solved','_configService','resolved','post'];_0x5139=function(){return _0x45df11;};return _0x5139();}(function(_0x3f5f06,_0x2e4d81){const _0x51cbe9=_0xcdf0,_0x389dd6=_0x3f5f06();while(!![]){try{const _0x4e2194=-parseInt(_0x51cbe9(0x1b4))/0x1*(-parseInt(_0x51cbe9(0x1d4))/0x2)+-parseInt(_0x51cbe9(0x1ab))/0x3+parseInt(_0x51cbe9(0x1a3))/0x4*(parseInt(_0x51cbe9(0x18e))/0x5)+-parseInt(_0x51cbe9(0x1b9))/0x6+parseInt(_0x51cbe9(0x1ca))/0x7*(parseInt(_0x51cbe9(0x220))/0x8)+parseInt(_0x51cbe9(0x18c))/0x9*(-parseInt(_0x51cbe9(0x1a7))/0xa)+parseInt(_0x51cbe9(0x1db))/0xb;if(_0x4e2194===_0x2e4d81)break;else _0x389dd6['push'](_0x389dd6['shift']());}catch(_0x486f7e){_0x389dd6['push'](_0x389dd6['shift']());}}}(_0x5139,0x29ff0),function(_0x3addfc,_0x465b14){const _0x33ad61=_0xcdf0;typeof exports==_0x33ad61(0x1a5)&&typeof module<'u'?_0x465b14(exports,require('@univerjs/core'),require(_0x33ad61(0x1df)),require(_0x33ad61(0x19b)),require('@univerjs-pro/collaboration-client'),require(_0x33ad61(0x20b)),require(_0x33ad61(0x19f)),require(_0x33ad61(0x206)),require(_0x33ad61(0x1ad))):typeof define==_0x33ad61(0x1fc)&&define[_0x33ad61(0x1e9)]?define(['exports','@univerjs/core',_0x33ad61(0x1df),'@univerjs/thread-comment-ui',_0x33ad61(0x217),_0x33ad61(0x20b),'rxjs',_0x33ad61(0x206),_0x33ad61(0x1ad)],_0x465b14):(_0x3addfc=typeof globalThis<'u'?globalThis:_0x3addfc||self,_0x465b14(_0x3addfc['UniverThreadCommentDatasource']={},_0x3addfc[_0x33ad61(0x1b6)],_0x3addfc[_0x33ad61(0x1dd)],_0x3addfc[_0x33ad61(0x207)],_0x3addfc[_0x33ad61(0x1cd)],_0x3addfc[_0x33ad61(0x1c7)],_0x3addfc[_0x33ad61(0x19f)],_0x3addfc[_0x33ad61(0x1cb)],_0x3addfc[_0x33ad61(0x1ad)]));}(this,function(_0xbfcf46,_0x299097,_0x48b9c5,_0x3e94f5,_0x1d92d3,_0x4bcffa,_0x1d4a18,_0x1d7911,_0x4f003a){'use strict';const _0xcfdc78=_0xcdf0;const _0x2662d5=_0xcfdc78(0x18a);var _0x5754f1=(_0x3d7781=>(_0x3d7781[_0x3d7781[_0xcfdc78(0x200)]=0x0]=_0xcfdc78(0x200),_0x3d7781[_0x3d7781[_0xcfdc78(0x1c5)]=0x1]=_0xcfdc78(0x1c5),_0x3d7781[_0x3d7781[_0xcfdc78(0x20f)]=-0x1]=_0xcfdc78(0x20f),_0x3d7781))(_0x5754f1||{}),_0x6617b7=(_0x1a0528=>(_0x1a0528[_0x1a0528['Unknown']=0x0]=_0xcfdc78(0x1c1),_0x1a0528[_0x1a0528['Add']=0x1]=_0xcfdc78(0x1e8),_0x1a0528[_0x1a0528['Reply']=0x2]=_0xcfdc78(0x1a8),_0x1a0528[_0x1a0528[_0xcfdc78(0x1e0)]=0x3]=_0xcfdc78(0x1e0),_0x1a0528[_0x1a0528[_0xcfdc78(0x1d3)]=0x4]='Delete',_0x1a0528[_0x1a0528[_0xcfdc78(0x21c)]=0x5]='Solve',_0x1a0528[_0x1a0528[_0xcfdc78(0x20f)]=-0x1]=_0xcfdc78(0x20f),_0x1a0528))(_0x6617b7||{});const _0x685b06=_0x25dd90=>_0x4f003a(new Date(+_0x25dd90))[_0xcfdc78(0x1ce)](_0xcfdc78(0x1a0)),_0x2c9c90=async(_0x1019ab,_0x4ca21e)=>{const _0x5ee8f6=_0xcfdc78,_0xc93076=_0x1019ab[_0x5ee8f6(0x1da)](_0x299097[_0x5ee8f6(0x1dc)]),_0x28125e=_0x1019ab[_0x5ee8f6(0x1da)](_0x1d7911[_0x5ee8f6(0x1eb)]);_0x4ca21e[_0x5ee8f6(0x1bf)](_0x3cc81b=>{const _0x4c8c8f=_0x5ee8f6;_0xc93076[_0x4c8c8f(0x191)](_0x3cc81b)&&_0x4ca21e[_0x4c8c8f(0x219)](_0x3cc81b);}),_0x4ca21e[_0x5ee8f6(0x1bb)]&&(await _0x28125e['get'](_0x5ee8f6(0x213),{'params':{'userIDs':[..._0x4ca21e]}}))[_0x5ee8f6(0x221)]['users'][_0x5ee8f6(0x1bf)](_0x54d427=>{const _0x18c1bc=_0x5ee8f6;_0x54d427&&_0xc93076[_0x18c1bc(0x18d)](_0x54d427);});};var _0x39e91e=Object[_0xcfdc78(0x1ed)],_0x564452=Object[_0xcfdc78(0x1aa)],_0x279bfe=(_0x4fedc2,_0x2d55db,_0x28c6af,_0xf5b3d9)=>{const _0x107faf=_0xcfdc78;for(var _0x231137=_0xf5b3d9>0x1?void 0x0:_0xf5b3d9?_0x564452(_0x2d55db,_0x28c6af):_0x2d55db,_0x587196=_0x4fedc2[_0x107faf(0x19c)]-0x1,_0x3c355c;_0x587196>=0x0;_0x587196--)(_0x3c355c=_0x4fedc2[_0x587196])&&(_0x231137=(_0xf5b3d9?_0x3c355c(_0x2d55db,_0x28c6af,_0x231137):_0x3c355c(_0x231137))||_0x231137);return _0xf5b3d9&&_0x231137&&_0x39e91e(_0x2d55db,_0x28c6af,_0x231137),_0x231137;},_0x2eb7a9=(_0x483507,_0x58dd81)=>(_0x500ae5,_0x265349)=>_0x58dd81(_0x500ae5,_0x265349,_0x483507);let _0x29a3e2=class extends _0x299097['Disposable']{constructor(_0x43331d,_0x4a2531,_0x26bbaf,_0x403bcb){const _0x4b11ec=_0xcfdc78;super(),this[_0x4b11ec(0x1d9)]=_0x43331d,this[_0x4b11ec(0x1ae)]=_0x4a2531,this[_0x4b11ec(0x209)]=_0x26bbaf,this['_injector']=_0x403bcb,this[_0x4b11ec(0x1b0)](),this[_0x4b11ec(0x1ff)]();}['_initUserSync'](){const _0x37414c=_0xcfdc78;this['disposeWithMe'](this['_threadCommentModel'][_0x37414c(0x20d)][_0x37414c(0x1fb)](_0x1d4a18[_0x37414c(0x1a1)](0x10))['subscribe'](_0x3e813e=>{const _0x311010=new Set();_0x3e813e['forEach'](_0x25f6a4=>{const _0x315289=_0xcdf0;switch(_0x25f6a4['type']){case _0x315289(0x202):{const _0x3213ce=_0x25f6a4[_0x315289(0x1e4)][_0x315289(0x19e)];_0x311010[_0x315289(0x202)](_0x3213ce);break;}}}),_0x2c9c90(this['_injector'],_0x311010);}));}[_0xcfdc78(0x1b0)](){const _0x44a22b=_0xcfdc78;this[_0x44a22b(0x1e7)](this[_0x44a22b(0x1d9)][_0x44a22b(0x20d)][_0x44a22b(0x198)](async _0x899d1d=>{const _0x2a64a6=_0x44a22b;var _0x40abde,_0x7356cd;const _0x55749f=this['_threadCommentModel'][_0x2a64a6(0x1e5)](_0x899d1d[_0x2a64a6(0x1c4)],_0x899d1d[_0x2a64a6(0x21e)]);if(!_0x55749f)return;const {unitId:_0x54a856,subUnitId:_0xbf5e5c}=_0x55749f;switch(_0x899d1d[_0x2a64a6(0x1ef)]&&this['_userService']['addUser'](_0x899d1d[_0x2a64a6(0x1ef)]),_0x899d1d[_0x2a64a6(0x1d6)]){case _0x6617b7[_0x2a64a6(0x1e8)]:break;case _0x6617b7['Reply']:{this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1c9)](_0x54a856,_0xbf5e5c,{'unitId':_0x54a856,'subUnitId':_0xbf5e5c,'ref':'','id':_0x899d1d[_0x2a64a6(0x1e1)],'dT':_0x685b06(+_0x899d1d[_0x2a64a6(0x196)]),'threadId':_0x899d1d['threadId'],'personId':(_0x7356cd=(_0x40abde=_0x899d1d[_0x2a64a6(0x1ef)])==null?void 0x0:_0x40abde['userID'])!=null?_0x7356cd:_0x899d1d['userId'],'text':JSON[_0x2a64a6(0x197)](_0x899d1d[_0x2a64a6(0x1b7)]),'parentId':_0x55749f['id']});break;}case _0x6617b7['Delete']:{const _0x4ea540=this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1d0)](_0x54a856,_0xbf5e5c,_0x899d1d[_0x2a64a6(0x1e1)]);_0x4ea540&&_0x4ea540[_0x2a64a6(0x1b2)]&&this['_threadCommentModel'][_0x2a64a6(0x223)](_0x54a856,_0xbf5e5c,_0x899d1d[_0x2a64a6(0x1e1)]);break;}case _0x6617b7[_0x2a64a6(0x1e0)]:{this[_0x2a64a6(0x1ae)]['updateComment'](_0x54a856,_0xbf5e5c,{'commentId':_0x899d1d[_0x2a64a6(0x1e1)],'text':JSON[_0x2a64a6(0x197)](_0x899d1d[_0x2a64a6(0x1b7)])});break;}case _0x6617b7['Solve']:{const _0x2c1f27=this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1e5)](_0x54a856,_0x899d1d[_0x2a64a6(0x21e)]);_0x2c1f27&&this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1a9)](_0x54a856,_0xbf5e5c,_0x2c1f27['id'],_0x899d1d[_0x2a64a6(0x218)]===_0x5754f1[_0x2a64a6(0x1c5)]);break;}}}));}};_0x29a3e2=_0x279bfe([_0x299097['OnLifecycle'](_0x299097[_0xcfdc78(0x21b)]['Ready'],_0x29a3e2),_0x2eb7a9(0x0,_0x299097['Inject'](_0x1d92d3[_0xcfdc78(0x21a)])),_0x2eb7a9(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x48b9c5[_0xcfdc78(0x1bc)])),_0x2eb7a9(0x2,_0x299097[_0xcfdc78(0x1c6)](_0x299097[_0xcfdc78(0x1dc)])),_0x2eb7a9(0x3,_0x299097[_0xcfdc78(0x1c6)](_0x299097['Injector']))],_0x29a3e2);const _0xb0c2b2=_0xcfdc78(0x1c0),_0x28b8ac={};var _0xeacdaa=Object['defineProperty'],_0x4aed05=Object[_0xcfdc78(0x1aa)],_0x13746a=(_0x8f6be7,_0x84f6b,_0x4e286b,_0x3d088a)=>{for(var _0x2900cc=_0x3d088a>0x1?void 0x0:_0x3d088a?_0x4aed05(_0x84f6b,_0x4e286b):_0x84f6b,_0x48085e=_0x8f6be7['length']-0x1,_0x21d349;_0x48085e>=0x0;_0x48085e--)(_0x21d349=_0x8f6be7[_0x48085e])&&(_0x2900cc=(_0x3d088a?_0x21d349(_0x84f6b,_0x4e286b,_0x2900cc):_0x21d349(_0x2900cc))||_0x2900cc);return _0x3d088a&&_0x2900cc&&_0xeacdaa(_0x84f6b,_0x4e286b,_0x2900cc),_0x2900cc;},_0x18cbb6=(_0x14fb34,_0xa3cb96)=>(_0x27fdbd,_0x353116)=>_0xa3cb96(_0x27fdbd,_0x353116,_0x14fb34);function _0x515303(_0x322e9f,_0x30812d){const _0x4810c6=_0xcfdc78,_0x5e350e=_0x322e9f['replies'][0x0];return{..._0x30812d,'id':_0x5e350e[_0x4810c6(0x1e1)],'resolved':_0x322e9f[_0x4810c6(0x218)]===0x1,'dT':_0x685b06(_0x5e350e[_0x4810c6(0x196)]),'personId':_0x5e350e['userId'],'threadId':_0x5e350e[_0x4810c6(0x21e)]};}function _0x5e3513(_0x278888,_0x57b7b1,_0x199c0e){const _0x1fe1a2=_0xcfdc78;var _0x27a4b9,_0x437ebc;if(((_0x437ebc=(_0x27a4b9=_0x278888==null?void 0x0:_0x278888['replies'])==null?void 0x0:_0x27a4b9['length'])!=null?_0x437ebc:0x0)>0x0){const _0x39eb07=(_0x53ce0c,_0xe24046)=>({'id':_0x53ce0c[_0x1fe1a2(0x1e1)],'threadId':_0x53ce0c['threadId'],'dT':_0x685b06(_0x53ce0c[_0x1fe1a2(0x196)]),'personId':_0x53ce0c[_0x1fe1a2(0x1b5)],'resolved':_0x278888[_0x1fe1a2(0x218)]===_0x5754f1['Solved'],'unitId':_0x57b7b1,'subUnitId':_0x199c0e,'text':JSON[_0x1fe1a2(0x197)](_0x53ce0c[_0x1fe1a2(0x1b7)]),'parentId':_0xe24046}),_0x50a064=_0x39eb07(_0x278888['replies'][0x0]);return{..._0x50a064,'children':_0x278888[_0x1fe1a2(0x216)][_0x1fe1a2(0x204)](0x1)['map'](_0x16ba06=>_0x39eb07(_0x16ba06,_0x50a064['id']))};}return null;}let _0x1636d9=class{constructor(_0x26f118,_0x295494,_0x553e0d,_0x2fd0a0){const _0x5cc699=_0xcfdc78;this[_0x5cc699(0x214)]=_0x26f118,this[_0x5cc699(0x209)]=_0x295494,this[_0x5cc699(0x193)]=_0x553e0d,this[_0x5cc699(0x1ac)]=_0x2fd0a0;}async['addComment'](_0x599164){const _0x4ca69e=_0xcfdc78;var _0x13663f,_0x419305;const {parentId:_0x1411ed,unitId:_0x3c5a22,text:_0x16d268,threadId:_0x4c1c46}=_0x599164,_0x2b3510=(_0x419305=(_0x13663f=_0x16d268[_0x4ca69e(0x212)])==null?void 0x0:_0x13663f[_0x4ca69e(0x1f3)](_0x4fe12d=>_0x4fe12d[_0x4ca69e(0x210)]===_0x299097[_0x4ca69e(0x1cc)][_0x4ca69e(0x1b3)])[_0x4ca69e(0x1a4)](_0x45ee27=>_0x45ee27['rangeId']))!=null?_0x419305:[],_0x47aefc=JSON[_0x4ca69e(0x20a)](_0x16d268),_0x1ae4a5=(await this[_0x4ca69e(0x193)][_0x4ca69e(0x1d8)](_0x3c5a22))[_0x4ca69e(0x1ee)]();if(_0x1411ed){const _0x115c99={'memberId':_0x1ae4a5,'unitId':_0x3c5a22,'content':_0x47aefc,'mention':_0x2b3510,'threadId':_0x4c1c46},_0x9611b=(await this['_httpService'][_0x4ca69e(0x1f9)](_0x4ca69e(0x211)+_0x3c5a22+'/reply',{'body':_0x115c99}))[_0x4ca69e(0x221)][_0x4ca69e(0x1af)];return{..._0x599164,'id':_0x9611b[_0x4ca69e(0x1e1)],'dT':_0x4f003a(+_0x9611b['createTimestamp'])[_0x4ca69e(0x1ce)](_0x4ca69e(0x1a0)),'personId':_0x9611b['userId']};}else{const _0x5c851a={'memberId':_0x1ae4a5,'unitId':_0x3c5a22,'content':_0x47aefc,'mention':_0x2b3510},_0x486139=await this[_0x4ca69e(0x214)][_0x4ca69e(0x1f9)](_0x4ca69e(0x211)+_0x3c5a22+'/add',{'body':_0x5c851a});return _0x515303(_0x486139[_0x4ca69e(0x221)][_0x4ca69e(0x1de)],_0x599164);}}async['updateComment'](_0x5b0dbb){const _0x31c8be=_0xcfdc78;var _0x4bb3b4,_0x5eeb8d;const {text:_0x47c548,unitId:_0x1984e7}=_0x5b0dbb,_0x579c06=(_0x5eeb8d=(_0x4bb3b4=_0x47c548[_0x31c8be(0x212)])==null?void 0x0:_0x4bb3b4[_0x31c8be(0x1f3)](_0x3cc857=>_0x3cc857[_0x31c8be(0x210)]===_0x299097['CustomRangeType'][_0x31c8be(0x1b3)])[_0x31c8be(0x1a4)](_0x1f73e3=>_0x1f73e3[_0x31c8be(0x1a2)]))!=null?_0x5eeb8d:[],_0x4db430=JSON['stringify'](_0x47c548),_0x51d3c1=_0x5b0dbb['threadId'],_0x1e1d91=_0x5b0dbb['id'],_0x5e36dc={'memberId':(await this[_0x31c8be(0x193)]['requireSession'](_0x1984e7))[_0x31c8be(0x1ee)](),'unitId':_0x1984e7,'threadId':_0x51d3c1,'mention':_0x579c06,'content':_0x4db430,'replyId':_0x1e1d91},_0x4d83b7=await this[_0x31c8be(0x214)][_0x31c8be(0x1f9)](_0x31c8be(0x211)+_0x1984e7+_0x31c8be(0x1f1),{'body':_0x5e36dc});return!_0x4d83b7[_0x31c8be(0x221)][_0x31c8be(0x1d7)]||_0x4d83b7['body'][_0x31c8be(0x1d7)][_0x31c8be(0x195)]===0x1;}async[_0xcfdc78(0x1a9)](_0x494960){const _0x233bfe=_0xcfdc78,{unitId:_0xbabc49}=_0x494960,_0x507ada=_0x494960['threadId'],_0x2c041b={'memberId':this[_0x233bfe(0x209)][_0x233bfe(0x1be)]()[_0x233bfe(0x194)],'unitId':_0xbabc49,'threadId':_0x507ada,'solved':_0x494960[_0x233bfe(0x1f8)]?_0x5754f1[_0x233bfe(0x1c5)]:_0x5754f1['OpenOrReOpen']},_0x225960=await this[_0x233bfe(0x214)][_0x233bfe(0x1f9)](_0x233bfe(0x211)+_0xbabc49+_0x233bfe(0x1f6),{'body':_0x2c041b});return!_0x225960[_0x233bfe(0x221)][_0x233bfe(0x1d7)]||_0x225960[_0x233bfe(0x221)][_0x233bfe(0x1d7)][_0x233bfe(0x195)]===0x1;}async[_0xcfdc78(0x223)](_0x29f659,_0x3ba61b,_0x4af766,_0x23e187){const _0x39bea2=_0xcfdc78,_0x4f8b1d={'memberId':(await this[_0x39bea2(0x193)]['requireSession'](_0x29f659))[_0x39bea2(0x1ee)](),'threadId':_0x4af766,'replyId':_0x23e187,'unitId':_0x29f659},_0x2cb9da=await this[_0x39bea2(0x214)][_0x39bea2(0x1f9)](_0x39bea2(0x211)+_0x29f659+_0x39bea2(0x215),{'body':_0x4f8b1d});return!_0x2cb9da[_0x39bea2(0x221)]['error']||_0x2cb9da['body'][_0x39bea2(0x1d7)]['code']===0x1;}async[_0xcfdc78(0x1d5)](_0x1b9d53,_0x51b8dd,_0x595c0e){const _0x7fab57=_0xcfdc78,_0x504412={'unitId':_0x1b9d53,'threadId':_0x595c0e},_0x26b948=await this['_httpService'][_0x7fab57(0x1f9)](_0x7fab57(0x211)+_0x1b9d53+_0x7fab57(0x1a6),{'body':_0x504412}),_0x5a5c7b=_0x595c0e[_0x7fab57(0x1a4)](_0x55915b=>_0x5e3513(_0x26b948[_0x7fab57(0x221)][_0x7fab57(0x188)][_0x55915b],_0x1b9d53,_0x51b8dd))[_0x7fab57(0x1f3)](Boolean);return Object[_0x7fab57(0x205)](_0x26b948[_0x7fab57(0x221)][_0x7fab57(0x1e6)])[_0x7fab57(0x1bf)](_0x33e7db=>{const _0x3bb26a=_0x7fab57;this[_0x3bb26a(0x209)][_0x3bb26a(0x18d)](_0x33e7db);}),_0x5a5c7b;}[_0xcfdc78(0x201)](_0x2fbe85){const _0x45b067=_0xcfdc78;return{'id':_0x2fbe85['id'],'threadId':_0x2fbe85[_0x45b067(0x21e)],'ref':_0x2fbe85['ref']};}};_0x1636d9=_0x13746a([_0x18cbb6(0x0,_0x299097['Inject'](_0x1d7911['HTTPService'])),_0x18cbb6(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x299097[_0xcfdc78(0x1dc)])),_0x18cbb6(0x2,_0x299097[_0xcfdc78(0x1c6)](_0x1d92d3[_0xcfdc78(0x222)])),_0x18cbb6(0x3,_0x299097[_0xcfdc78(0x1c6)](_0x299097[_0xcfdc78(0x1f4)]))],_0x1636d9);var _0x6bc8a=Object[_0xcfdc78(0x1ed)],_0x22e244=Object['getOwnPropertyDescriptor'],_0x2cb860=(_0x3f8ba7,_0x2e064a,_0x59c341,_0x3a07ef)=>{const _0x470f3d=_0xcfdc78;for(var _0x9ff493=_0x3a07ef>0x1?void 0x0:_0x3a07ef?_0x22e244(_0x2e064a,_0x59c341):_0x2e064a,_0x1555eb=_0x3f8ba7[_0x470f3d(0x19c)]-0x1,_0x58029b;_0x1555eb>=0x0;_0x1555eb--)(_0x58029b=_0x3f8ba7[_0x1555eb])&&(_0x9ff493=(_0x3a07ef?_0x58029b(_0x2e064a,_0x59c341,_0x9ff493):_0x58029b(_0x9ff493))||_0x9ff493);return _0x3a07ef&&_0x9ff493&&_0x6bc8a(_0x2e064a,_0x59c341,_0x9ff493),_0x9ff493;},_0x509ad7=(_0x4e9023,_0x35aa70)=>(_0x40974b,_0x2e6e76)=>_0x35aa70(_0x40974b,_0x2e6e76,_0x4e9023);let _0x2d3fce=class{constructor(_0x4916c5){const _0x1bf3bd=_0xcfdc78;this[_0x1bf3bd(0x214)]=_0x4916c5;}async[_0xcfdc78(0x203)](_0x55e6ed,_0x5f5809,_0x5976ea){const _0x2da9a4=_0xcfdc78,_0x31b02c=new URL(window[_0x2da9a4(0x1e3)][_0x2da9a4(0x189)])[_0x2da9a4(0x1ba)][_0x2da9a4(0x1da)](_0x2da9a4(0x21f));if(!_0x31b02c)return[];const _0x396279=window[_0x2da9a4(0x1e3)][_0x2da9a4(0x1c2)],_0x1ed801=window[_0x2da9a4(0x1e3)][_0x2da9a4(0x1bd)]==='https:'?_0x2da9a4(0x1fd):_0x2da9a4(0x20c);return(await this[_0x2da9a4(0x214)]['get'](_0x1ed801+_0x2da9a4(0x1ec)+_0x396279+_0x2da9a4(0x19d),{'params':{'objectID':_0x31b02c,'unitID':_0x31b02c}}))[_0x2da9a4(0x221)]['collaborators']['map'](_0x19d1d7=>{const _0x18e846=_0x2da9a4;var _0x1a6804,_0x40c1ec,_0x36faf3,_0x2387e1,_0xac7402,_0x3d7f02;return{'id':(_0x40c1ec=(_0x1a6804=_0x19d1d7[_0x18e846(0x1c8)])==null?void 0x0:_0x1a6804[_0x18e846(0x194)])!=null?_0x40c1ec:'','label':(_0x2387e1=(_0x36faf3=_0x19d1d7[_0x18e846(0x1c8)])==null?void 0x0:_0x36faf3['name'])!=null?_0x2387e1:'','icon':(_0x3d7f02=(_0xac7402=_0x19d1d7[_0x18e846(0x1c8)])==null?void 0x0:_0xac7402[_0x18e846(0x1d1)])!=null?_0x3d7f02:'','type':_0x18e846(0x1ef)};});}};_0x2d3fce=_0x2cb860([_0x509ad7(0x0,_0x299097[_0xcfdc78(0x1c6)](_0x1d7911[_0xcfdc78(0x1eb)]))],_0x2d3fce);var _0x277968=Object[_0xcfdc78(0x1ed)],_0x361aec=Object[_0xcfdc78(0x1aa)],_0x593468=(_0x421936,_0x5c46a8,_0x6e8929,_0xb0b34)=>{const _0x3c1747=_0xcfdc78;for(var _0x4aa866=_0xb0b34>0x1?void 0x0:_0xb0b34?_0x361aec(_0x5c46a8,_0x6e8929):_0x5c46a8,_0x3d9b54=_0x421936[_0x3c1747(0x19c)]-0x1,_0x5cc9b2;_0x3d9b54>=0x0;_0x3d9b54--)(_0x5cc9b2=_0x421936[_0x3d9b54])&&(_0x4aa866=(_0xb0b34?_0x5cc9b2(_0x5c46a8,_0x6e8929,_0x4aa866):_0x5cc9b2(_0x4aa866))||_0x4aa866);return _0xb0b34&&_0x4aa866&&_0x277968(_0x5c46a8,_0x6e8929,_0x4aa866),_0x4aa866;},_0x56c8ef=(_0x3b82e0,_0x3d011b)=>(_0x4f86ca,_0x34e599)=>_0x3d011b(_0x4f86ca,_0x34e599,_0x3b82e0);let _0x3ed1c2=class extends _0x299097[_0xcfdc78(0x1e2)]{constructor(_0x272243,_0x14a021,_0x480d86,_0x4e6e2f){const _0x8aef0e=_0xcfdc78;super(),this[_0x8aef0e(0x1fa)]=_0x272243,this[_0x8aef0e(0x18f)]=_0x14a021,this[_0x8aef0e(0x199)]=_0x480d86,this[_0x8aef0e(0x18b)]=_0x4e6e2f,this[_0x8aef0e(0x1c3)]();}[_0xcfdc78(0x1c3)](){const _0x5e725=_0xcfdc78;this[_0x5e725(0x1fa)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this['_threadCommentMentionDataService'][_0x5e725(0x1cf)]=this[_0x5e725(0x18b)];}};_0x3ed1c2=_0x593468([_0x299097[_0xcfdc78(0x1b1)](_0x299097[_0xcfdc78(0x21b)]['Starting'],_0x3ed1c2),_0x56c8ef(0x0,_0x48b9c5[_0xcfdc78(0x1b8)]),_0x56c8ef(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x1636d9)),_0x56c8ef(0x2,_0x3e94f5[_0xcfdc78(0x190)]),_0x56c8ef(0x3,_0x299097[_0xcfdc78(0x1c6)](_0x2d3fce))],_0x3ed1c2);var _0x245c5b=Object['defineProperty'],_0x1a5161=Object[_0xcfdc78(0x1aa)],_0x34d169=(_0x9e3e3c,_0x947f81,_0x3a7f60)=>_0x947f81 in _0x9e3e3c?_0x245c5b(_0x9e3e3c,_0x947f81,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a7f60}):_0x9e3e3c[_0x947f81]=_0x3a7f60,_0x1a909b=(_0x4ac5a1,_0xb9fb96,_0x4386d4,_0x35ed27)=>{for(var _0x535575=_0x35ed27>0x1?void 0x0:_0x35ed27?_0x1a5161(_0xb9fb96,_0x4386d4):_0xb9fb96,_0x32d585=_0x4ac5a1['length']-0x1,_0xe50ede;_0x32d585>=0x0;_0x32d585--)(_0xe50ede=_0x4ac5a1[_0x32d585])&&(_0x535575=(_0x35ed27?_0xe50ede(_0xb9fb96,_0x4386d4,_0x535575):_0xe50ede(_0x535575))||_0x535575);return _0x35ed27&&_0x535575&&_0x245c5b(_0xb9fb96,_0x4386d4,_0x535575),_0x535575;},_0x597c4d=(_0x3d2351,_0x18ff01)=>(_0x20dbd2,_0x15b255)=>_0x18ff01(_0x20dbd2,_0x15b255,_0x3d2351),_0x30bd7a=(_0x509b42,_0x1deca4,_0x3d7992)=>_0x34d169(_0x509b42,typeof _0x1deca4!=_0xcfdc78(0x21d)?_0x1deca4+'':_0x1deca4,_0x3d7992);_0xbfcf46['UniverThreadCommentDataSourcePlugin']=class extends _0x299097['Plugin']{constructor(_0x20176c=_0x28b8ac,_0x58cc79,_0x10c7e8){const _0x39387f=_0xcfdc78;super(),this[_0x39387f(0x1f5)]=_0x20176c,this['_injector']=_0x58cc79,this['_configService']=_0x10c7e8;const {..._0xa0801a}=this[_0x39387f(0x1f5)];this[_0x39387f(0x1f7)][_0x39387f(0x1fe)](_0xb0c2b2,_0xa0801a);}[_0xcfdc78(0x19a)](){[[_0x2d3fce],[_0x1636d9],[_0x3ed1c2],[_0x29a3e2]]['forEach'](_0x5d8c86=>{const _0x5e3f12=_0xcdf0;this['_injector'][_0x5e3f12(0x202)](_0x5d8c86);});}},_0x30bd7a(_0xbfcf46['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2662d5),_0x30bd7a(_0xbfcf46['UniverThreadCommentDataSourcePlugin'],_0xcfdc78(0x1d6),_0x299097['UniverInstanceType'][_0xcfdc78(0x1ea)]),_0xbfcf46[_0xcfdc78(0x208)]=_0x1a909b([_0x299097[_0xcfdc78(0x1d2)](_0x48b9c5[_0xcfdc78(0x1f0)],_0x3e94f5[_0xcfdc78(0x1f2)],_0x1d92d3['UniverCollaborationClientPlugin'],_0x4bcffa['UniverLicensePlugin']),_0x597c4d(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x299097['Injector'])),_0x597c4d(0x2,_0x299097['IConfigService'])],_0xbfcf46['UniverThreadCommentDataSourcePlugin']),Object[_0xcfdc78(0x1ed)](_0xbfcf46,Symbol[_0xcfdc78(0x192)],{'value':_0xcfdc78(0x20e)});}));
|
|
1
|
+
function _0x5e7e(){const _0x433b17=['https:','@univerjs/thread-comment-ui','exports','1878JaEedg','_httpService','https','YYYY/MM/DD\x20HH:mm','searchParams','updateComment','2565607KifEaQ','rxjs','Delete','parse','map','/list','dayjs','UniverThreadCommentUIPlugin','Module','http','object','comments','@univerjs/network','customRanges','personId','comment','/universer-api/comment/unit/','@univerjs/core','UniverCore','Injector','UniverLicense','_initUserSync','getMemberID','1910vOZgaE','slice','9048QDrTWp','host','UniverInstanceType','get','2607941lJmjxn','Edit','_userService','UniverThreadComment','rangeId','ref','location','/universer-api/authz/collaborator','deleteComment','UNIVER_UNKNOWN','createTimestamp','collaborators','size','_threadCommentModel','UNRECOGNIZED','ThreadCommentModel','Solve','onReady','_initDataSource','addComment','Reply','replies','_configService','UniverThreadCommentDataSourcePlugin','type','Plugin','dataSource','disposeWithMe','symbol','_config','pipe','14064YSKala','reply','subject','payload','IConfigService','getThread','_threadCommentDataSourceService','pluginName','Solved','_threadCommentDataSource','rangeType','subscribe','resolveComment','CommentService','avatar','UniverCollaborationClient','30GMyhjK','bufferTime','format','/universer-api/user/list','UniverNetwork','content','userID','requireSession','filter','CollaborationSessionService','unitId','addUser','6507sNuXaw','getCurrentUser','name','://','stringify','_threadCommentMentionDataSource','Disposable','defineProperty','users','Add','threadId','_init','add','Inject','syncUpdateMutationToColla','106ASVRgC','Unknown','IThreadCommentDataSourceService','747824qBXLYR','unit','660808BfopHT','post','UniverThreadCommentDatasource','error','getOwnPropertyDescriptor','body','user','UserManagerService','replyId','href','/edit','solved','code','listComments','HTTPService','@univerjs-pro/collaboration-client','saveCommentToSnapshot','CustomRangeType','UniverLicensePlugin','@univerjs-pro/license','userId','_sessionService','delete','length','_threadCommentMentionDataService','_injector','COMMENT','/solved','parentId','OpenOrReOpen','getComment','forEach'];_0x5e7e=function(){return _0x433b17;};return _0x5e7e();}function _0x4287(_0x5918c9,_0x4cc7cc){const _0x5e7e4f=_0x5e7e();return _0x4287=function(_0x428789,_0x401adc){_0x428789=_0x428789-0xd3;let _0x374d5f=_0x5e7e4f[_0x428789];return _0x374d5f;},_0x4287(_0x5918c9,_0x4cc7cc);}(function(_0xaf6f1c,_0x5a37ce){const _0x49fcaa=_0x4287,_0x2a25b2=_0xaf6f1c();while(!![]){try{const _0x2cee3d=-parseInt(_0x49fcaa(0xfc))/0x1+parseInt(_0x49fcaa(0xf7))/0x2*(-parseInt(_0x49fcaa(0x11f))/0x3)+-parseInt(_0x49fcaa(0xfa))/0x4+parseInt(_0x49fcaa(0x13c))/0x5*(parseInt(_0x49fcaa(0x161))/0x6)+parseInt(_0x49fcaa(0x142))/0x7+parseInt(_0x49fcaa(0x13e))/0x8*(parseInt(_0x49fcaa(0xe8))/0x9)+-parseInt(_0x49fcaa(0xdc))/0xa*(parseInt(_0x49fcaa(0x125))/0xb);if(_0x2cee3d===_0x5a37ce)break;else _0x2a25b2['push'](_0x2a25b2['shift']());}catch(_0x4489cf){_0x2a25b2['push'](_0x2a25b2['shift']());}}}(_0x5e7e,0x7b4c7),function(_0xb16af1,_0x114293){const _0x2d12c4=_0x4287;typeof exports==_0x2d12c4(0x12f)&&typeof module<'u'?_0x114293(exports,require(_0x2d12c4(0x136)),require('@univerjs/thread-comment'),require(_0x2d12c4(0x11d)),require(_0x2d12c4(0x10b)),require(_0x2d12c4(0x10f)),require('rxjs'),require(_0x2d12c4(0x131)),require(_0x2d12c4(0x12b))):typeof define=='function'&&define['amd']?define([_0x2d12c4(0x11e),_0x2d12c4(0x136),'@univerjs/thread-comment',_0x2d12c4(0x11d),_0x2d12c4(0x10b),'@univerjs-pro/license',_0x2d12c4(0x126),_0x2d12c4(0x131),_0x2d12c4(0x12b)],_0x114293):(_0xb16af1=typeof globalThis<'u'?globalThis:_0xb16af1||self,_0x114293(_0xb16af1[_0x2d12c4(0xfe)]={},_0xb16af1[_0x2d12c4(0x137)],_0xb16af1[_0x2d12c4(0x145)],_0xb16af1['UniverThreadCommentUi'],_0xb16af1[_0x2d12c4(0xdb)],_0xb16af1[_0x2d12c4(0x139)],_0xb16af1['rxjs'],_0xb16af1[_0x2d12c4(0xe0)],_0xb16af1[_0x2d12c4(0x12b)]));}(this,function(_0x44f0e4,_0x55f941,_0x1c8f4d,_0x2509f9,_0x3510d1,_0x22a343,_0x41d43f,_0x3d7abb,_0x49ecfc){'use strict';const _0x293c7c=_0x4287;const _0x44e02d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x508652=(_0xf4aec3=>(_0xf4aec3[_0xf4aec3[_0x293c7c(0x119)]=0x0]=_0x293c7c(0x119),_0xf4aec3[_0xf4aec3[_0x293c7c(0xd4)]=0x1]=_0x293c7c(0xd4),_0xf4aec3[_0xf4aec3[_0x293c7c(0x150)]=-0x1]='UNRECOGNIZED',_0xf4aec3))(_0x508652||{}),_0x57883f=(_0x146d07=>(_0x146d07[_0x146d07[_0x293c7c(0xf8)]=0x0]=_0x293c7c(0xf8),_0x146d07[_0x146d07[_0x293c7c(0xf1)]=0x1]=_0x293c7c(0xf1),_0x146d07[_0x146d07[_0x293c7c(0x156)]=0x2]=_0x293c7c(0x156),_0x146d07[_0x146d07['Edit']=0x3]=_0x293c7c(0x143),_0x146d07[_0x146d07[_0x293c7c(0x127)]=0x4]=_0x293c7c(0x127),_0x146d07[_0x146d07[_0x293c7c(0x152)]=0x5]=_0x293c7c(0x152),_0x146d07[_0x146d07[_0x293c7c(0x150)]=-0x1]=_0x293c7c(0x150),_0x146d07))(_0x57883f||{});const _0x109d4e=_0xac42e9=>_0x49ecfc(new Date(+_0xac42e9))[_0x293c7c(0xde)](_0x293c7c(0x122)),_0x2c0fef=async(_0x582dd6,_0x5d6ed6)=>{const _0x3e2288=_0x293c7c,_0x45079a=_0x582dd6['get'](_0x55f941[_0x3e2288(0x103)]),_0x35358b=_0x582dd6[_0x3e2288(0x141)](_0x3d7abb[_0x3e2288(0x10a)]);_0x5d6ed6['forEach'](_0x53d635=>{const _0x167d6c=_0x3e2288;_0x45079a['getUser'](_0x53d635)&&_0x5d6ed6[_0x167d6c(0x112)](_0x53d635);}),_0x5d6ed6[_0x3e2288(0x14e)]&&(await _0x35358b[_0x3e2288(0x141)](_0x3e2288(0xdf),{'params':{'userIDs':[..._0x5d6ed6]}}))[_0x3e2288(0x101)][_0x3e2288(0xf0)][_0x3e2288(0x11b)](_0x40c2af=>{const _0x209331=_0x3e2288;_0x40c2af&&_0x45079a[_0x209331(0xe7)](_0x40c2af);});};var _0x300c14=Object[_0x293c7c(0xef)],_0x114ad5=Object[_0x293c7c(0x100)],_0x1d5190=(_0x321439,_0x3f2d5f,_0x11f222,_0x4f053f)=>{const _0x514974=_0x293c7c;for(var _0x1ce9f9=_0x4f053f>0x1?void 0x0:_0x4f053f?_0x114ad5(_0x3f2d5f,_0x11f222):_0x3f2d5f,_0x1cafce=_0x321439[_0x514974(0x113)]-0x1,_0x27cce9;_0x1cafce>=0x0;_0x1cafce--)(_0x27cce9=_0x321439[_0x1cafce])&&(_0x1ce9f9=(_0x4f053f?_0x27cce9(_0x3f2d5f,_0x11f222,_0x1ce9f9):_0x27cce9(_0x1ce9f9))||_0x1ce9f9);return _0x4f053f&&_0x1ce9f9&&_0x300c14(_0x3f2d5f,_0x11f222,_0x1ce9f9),_0x1ce9f9;},_0x5436c4=(_0x38c9f2,_0x58bdd0)=>(_0x3c73bd,_0x468376)=>_0x58bdd0(_0x3c73bd,_0x468376,_0x38c9f2);let _0x25541b=class extends _0x55f941['Disposable']{constructor(_0x572110,_0x1376c0,_0x39ceb7,_0xb9684a){const _0x5df439=_0x293c7c;super(),this['_commentService']=_0x572110,this[_0x5df439(0x14f)]=_0x1376c0,this['_userService']=_0x39ceb7,this[_0x5df439(0x115)]=_0xb9684a,this[_0x5df439(0xf3)](),this[_0x5df439(0x13a)]();}[_0x293c7c(0x13a)](){const _0x35ca3b=_0x293c7c;this[_0x35ca3b(0x15d)](this['_threadCommentModel']['commentUpdate$'][_0x35ca3b(0x160)](_0x41d43f[_0x35ca3b(0xdd)](0x10))[_0x35ca3b(0xd7)](_0x4bf869=>{const _0x4e6073=_0x35ca3b,_0x3d7749=new Set();_0x4bf869[_0x4e6073(0x11b)](_0x13a192=>{const _0x5136aa=_0x4e6073;switch(_0x13a192[_0x5136aa(0x15a)]){case _0x5136aa(0xf4):{const _0x57ff8d=_0x13a192[_0x5136aa(0x164)][_0x5136aa(0x133)];_0x3d7749[_0x5136aa(0xf4)](_0x57ff8d);break;}}}),_0x2c0fef(this['_injector'],_0x3d7749);}));}[_0x293c7c(0xf3)](){const _0x2ae73f=_0x293c7c;this[_0x2ae73f(0x15d)](this['_commentService']['commentUpdate$'][_0x2ae73f(0xd7)](async _0x2a4330=>{const _0x5198f4=_0x2ae73f;var _0x20c2ba,_0x351fbd;const _0x546fae=this[_0x5198f4(0x14f)][_0x5198f4(0x166)](_0x2a4330[_0x5198f4(0xe6)],_0x2a4330['threadId']);if(!_0x546fae)return;const {unitId:_0x3f18e2,subUnitId:_0x31f53e}=_0x546fae;switch(_0x2a4330[_0x5198f4(0x102)]&&this[_0x5198f4(0x144)][_0x5198f4(0xe7)](_0x2a4330[_0x5198f4(0x102)]),_0x2a4330[_0x5198f4(0x15a)]){case _0x57883f[_0x5198f4(0xf1)]:break;case _0x57883f['Reply']:{this[_0x5198f4(0x14f)][_0x5198f4(0x155)](_0x3f18e2,_0x31f53e,{'unitId':_0x3f18e2,'subUnitId':_0x31f53e,'ref':'','id':_0x2a4330[_0x5198f4(0x104)],'dT':_0x109d4e(+_0x2a4330[_0x5198f4(0x14c)]),'threadId':_0x2a4330['threadId'],'personId':(_0x351fbd=(_0x20c2ba=_0x2a4330[_0x5198f4(0x102)])==null?void 0x0:_0x20c2ba[_0x5198f4(0xe2)])!=null?_0x351fbd:_0x2a4330[_0x5198f4(0x110)],'text':JSON[_0x5198f4(0x128)](_0x2a4330[_0x5198f4(0xe1)]),'parentId':_0x546fae['id']});break;}case _0x57883f[_0x5198f4(0x127)]:{const _0x1f8880=this['_threadCommentModel'][_0x5198f4(0x11a)](_0x3f18e2,_0x31f53e,_0x2a4330[_0x5198f4(0x104)]);_0x1f8880&&_0x1f8880[_0x5198f4(0x118)]&&this[_0x5198f4(0x14f)][_0x5198f4(0x14a)](_0x3f18e2,_0x31f53e,_0x2a4330[_0x5198f4(0x104)]);break;}case _0x57883f[_0x5198f4(0x143)]:{this[_0x5198f4(0x14f)][_0x5198f4(0x124)](_0x3f18e2,_0x31f53e,{'commentId':_0x2a4330[_0x5198f4(0x104)],'text':JSON[_0x5198f4(0x128)](_0x2a4330[_0x5198f4(0xe1)])});break;}case _0x57883f[_0x5198f4(0x152)]:{const _0x5b50fa=this[_0x5198f4(0x14f)][_0x5198f4(0x166)](_0x3f18e2,_0x2a4330[_0x5198f4(0xf2)]);_0x5b50fa&&this[_0x5198f4(0x14f)][_0x5198f4(0xd8)](_0x3f18e2,_0x31f53e,_0x5b50fa['id'],_0x2a4330[_0x5198f4(0x107)]===_0x508652[_0x5198f4(0xd4)]);break;}}}));}};_0x25541b=_0x1d5190([_0x5436c4(0x0,_0x55f941[_0x293c7c(0xf5)](_0x3510d1[_0x293c7c(0xd9)])),_0x5436c4(0x1,_0x55f941['Inject'](_0x1c8f4d[_0x293c7c(0x151)])),_0x5436c4(0x2,_0x55f941[_0x293c7c(0xf5)](_0x55f941[_0x293c7c(0x103)])),_0x5436c4(0x3,_0x55f941['Inject'](_0x55f941['Injector']))],_0x25541b);const _0x5a6721='thread-comment-data-source.config',_0xecbc0b={};var _0x4847a0=Object[_0x293c7c(0xef)],_0x51e1e8=Object[_0x293c7c(0x100)],_0x532a74=(_0x2f94bf,_0x2f51fd,_0x29e454,_0x5e3578)=>{const _0x3351d0=_0x293c7c;for(var _0x379b93=_0x5e3578>0x1?void 0x0:_0x5e3578?_0x51e1e8(_0x2f51fd,_0x29e454):_0x2f51fd,_0x3779e1=_0x2f94bf[_0x3351d0(0x113)]-0x1,_0x257785;_0x3779e1>=0x0;_0x3779e1--)(_0x257785=_0x2f94bf[_0x3779e1])&&(_0x379b93=(_0x5e3578?_0x257785(_0x2f51fd,_0x29e454,_0x379b93):_0x257785(_0x379b93))||_0x379b93);return _0x5e3578&&_0x379b93&&_0x4847a0(_0x2f51fd,_0x29e454,_0x379b93),_0x379b93;},_0x3fb6f6=(_0x56c7ef,_0x1b063e)=>(_0x383e4e,_0x97fadb)=>_0x1b063e(_0x383e4e,_0x97fadb,_0x56c7ef);function _0x5d9c85(_0x1e58e1,_0xe02f6d){const _0x547416=_0x293c7c,_0x52ca7c=_0x1e58e1[_0x547416(0x157)][0x0];return{..._0xe02f6d,'id':_0x52ca7c[_0x547416(0x104)],'resolved':_0x1e58e1[_0x547416(0x107)]===0x1,'dT':_0x109d4e(_0x52ca7c[_0x547416(0x14c)]),'personId':_0x52ca7c[_0x547416(0x110)],'threadId':_0x52ca7c[_0x547416(0xf2)]};}function _0xe30bdf(_0x25c487,_0x314f37,_0x5ef148){const _0x531d3e=_0x293c7c;var _0x2e606e,_0x12ebb0;if(((_0x12ebb0=(_0x2e606e=_0x25c487==null?void 0x0:_0x25c487[_0x531d3e(0x157)])==null?void 0x0:_0x2e606e[_0x531d3e(0x113)])!=null?_0x12ebb0:0x0)>0x0){const _0x4c31fa=(_0x1cef93,_0xbc9ced)=>({'id':_0x1cef93['replyId'],'threadId':_0x1cef93[_0x531d3e(0xf2)],'dT':_0x109d4e(_0x1cef93[_0x531d3e(0x14c)]),'personId':_0x1cef93['userId'],'resolved':_0x25c487[_0x531d3e(0x107)]===_0x508652[_0x531d3e(0xd4)],'unitId':_0x314f37,'subUnitId':_0x5ef148,'text':JSON[_0x531d3e(0x128)](_0x1cef93[_0x531d3e(0xe1)]),'parentId':_0xbc9ced}),_0x2eefa2=_0x4c31fa(_0x25c487['replies'][0x0]);return{..._0x2eefa2,'children':_0x25c487['replies'][_0x531d3e(0x13d)](0x1)[_0x531d3e(0x129)](_0x1ebed6=>_0x4c31fa(_0x1ebed6,_0x2eefa2['id']))};}return null;}let _0x92d595=class{constructor(_0x223411,_0x6b665e,_0x20a37f,_0x2f2fd5){const _0x208d25=_0x293c7c;this[_0x208d25(0x120)]=_0x223411,this['_userService']=_0x6b665e,this[_0x208d25(0x111)]=_0x20a37f,this[_0x208d25(0x115)]=_0x2f2fd5;}async['addComment'](_0xb236e){const _0x345675=_0x293c7c;var _0x244601,_0x55bef6;const {parentId:_0x2bf684,unitId:_0x3c074a,text:_0x1ec7a6,threadId:_0xc6f2d7}=_0xb236e,_0x18a902=(_0x55bef6=(_0x244601=_0x1ec7a6[_0x345675(0x132)])==null?void 0x0:_0x244601[_0x345675(0xe4)](_0x180291=>_0x180291[_0x345675(0xd6)]===_0x55f941[_0x345675(0x10d)][_0x345675(0x116)])[_0x345675(0x129)](_0x162354=>_0x162354[_0x345675(0x146)]))!=null?_0x55bef6:[],_0x4f3814=JSON[_0x345675(0xec)](_0x1ec7a6),_0xfcaf71=(await this[_0x345675(0x111)][_0x345675(0xe3)](_0x3c074a))[_0x345675(0x13b)]();if(_0x2bf684){const _0x59990e={'memberId':_0xfcaf71,'unitId':_0x3c074a,'content':_0x4f3814,'mention':_0x18a902,'threadId':_0xc6f2d7},_0x32601a=(await this[_0x345675(0x120)][_0x345675(0xfd)](_0x345675(0x135)+_0x3c074a+'/reply',{'body':_0x59990e}))['body'][_0x345675(0x162)];return{..._0xb236e,'id':_0x32601a[_0x345675(0x104)],'dT':_0x49ecfc(+_0x32601a[_0x345675(0x14c)])[_0x345675(0xde)](_0x345675(0x122)),'personId':_0x32601a[_0x345675(0x110)]};}else{const _0x2fa959={'memberId':_0xfcaf71,'unitId':_0x3c074a,'content':_0x4f3814,'mention':_0x18a902},_0x1ee6e4=await this[_0x345675(0x120)]['post']('/universer-api/comment/unit/'+_0x3c074a+'/add',{'body':_0x2fa959});return _0x5d9c85(_0x1ee6e4[_0x345675(0x101)][_0x345675(0x134)],_0xb236e);}}async[_0x293c7c(0x124)](_0x52d485){const _0x686e4c=_0x293c7c;var _0xfe52ba,_0x2e8c05;const {text:_0x382e7c,unitId:_0x3320be}=_0x52d485,_0x1abc23=(_0x2e8c05=(_0xfe52ba=_0x382e7c['customRanges'])==null?void 0x0:_0xfe52ba[_0x686e4c(0xe4)](_0x3f4c95=>_0x3f4c95[_0x686e4c(0xd6)]===_0x55f941[_0x686e4c(0x10d)][_0x686e4c(0x116)])['map'](_0x14f11c=>_0x14f11c['rangeId']))!=null?_0x2e8c05:[],_0x3e5859=JSON[_0x686e4c(0xec)](_0x382e7c),_0x11c65b=_0x52d485[_0x686e4c(0xf2)],_0x250999=_0x52d485['id'],_0x5306ec={'memberId':(await this['_sessionService']['requireSession'](_0x3320be))[_0x686e4c(0x13b)](),'unitId':_0x3320be,'threadId':_0x11c65b,'mention':_0x1abc23,'content':_0x3e5859,'replyId':_0x250999},_0x1235e7=await this['_httpService']['post'](_0x686e4c(0x135)+_0x3320be+_0x686e4c(0x106),{'body':_0x5306ec});return!_0x1235e7[_0x686e4c(0x101)][_0x686e4c(0xff)]||_0x1235e7[_0x686e4c(0x101)][_0x686e4c(0xff)]['code']===0x1;}async['resolveComment'](_0x5ba4f4){const _0xf9e0a9=_0x293c7c,{unitId:_0x3c789f}=_0x5ba4f4,_0x291a4e=_0x5ba4f4[_0xf9e0a9(0xf2)],_0x24954b={'memberId':this[_0xf9e0a9(0x144)][_0xf9e0a9(0xe9)]()[_0xf9e0a9(0xe2)],'unitId':_0x3c789f,'threadId':_0x291a4e,'solved':_0x5ba4f4['resolved']?_0x508652['Solved']:_0x508652['OpenOrReOpen']},_0x49404b=await this[_0xf9e0a9(0x120)][_0xf9e0a9(0xfd)](_0xf9e0a9(0x135)+_0x3c789f+_0xf9e0a9(0x117),{'body':_0x24954b});return!_0x49404b[_0xf9e0a9(0x101)]['error']||_0x49404b['body']['error'][_0xf9e0a9(0x108)]===0x1;}async['deleteComment'](_0x2a03d9,_0x4f73ce,_0x4790b1,_0x3591e3){const _0x3d945c=_0x293c7c,_0x50ab24={'memberId':(await this[_0x3d945c(0x111)]['requireSession'](_0x2a03d9))['getMemberID'](),'threadId':_0x4790b1,'replyId':_0x3591e3,'unitId':_0x2a03d9},_0x82b6f1=await this['_httpService'][_0x3d945c(0xfd)](_0x3d945c(0x135)+_0x2a03d9+'/delete',{'body':_0x50ab24});return!_0x82b6f1['body'][_0x3d945c(0xff)]||_0x82b6f1[_0x3d945c(0x101)]['error'][_0x3d945c(0x108)]===0x1;}async[_0x293c7c(0x109)](_0x144908,_0x54516e,_0x4d80ff){const _0x50e6f5=_0x293c7c,_0x2d44db={'unitId':_0x144908,'threadId':_0x4d80ff},_0x3b519f=await this[_0x50e6f5(0x120)][_0x50e6f5(0xfd)](_0x50e6f5(0x135)+_0x144908+_0x50e6f5(0x12a),{'body':_0x2d44db}),_0x45aad9=_0x4d80ff[_0x50e6f5(0x129)](_0x123148=>_0xe30bdf(_0x3b519f[_0x50e6f5(0x101)][_0x50e6f5(0x130)][_0x123148],_0x144908,_0x54516e))[_0x50e6f5(0xe4)](Boolean);return Object['values'](_0x3b519f['body'][_0x50e6f5(0xf0)])[_0x50e6f5(0x11b)](_0x3bd846=>{const _0x1e3d96=_0x50e6f5;this[_0x1e3d96(0x144)][_0x1e3d96(0xe7)](_0x3bd846);}),_0x45aad9;}[_0x293c7c(0x10c)](_0x1c2022){const _0x447132=_0x293c7c;return{'id':_0x1c2022['id'],'threadId':_0x1c2022[_0x447132(0xf2)],'ref':_0x1c2022[_0x447132(0x147)]};}};_0x92d595=_0x532a74([_0x3fb6f6(0x0,_0x55f941['Inject'](_0x3d7abb[_0x293c7c(0x10a)])),_0x3fb6f6(0x1,_0x55f941['Inject'](_0x55f941[_0x293c7c(0x103)])),_0x3fb6f6(0x2,_0x55f941[_0x293c7c(0xf5)](_0x3510d1[_0x293c7c(0xe5)])),_0x3fb6f6(0x3,_0x55f941[_0x293c7c(0xf5)](_0x55f941['Injector']))],_0x92d595);var _0x369121=Object[_0x293c7c(0xef)],_0x33c2eb=Object[_0x293c7c(0x100)],_0x1e276e=(_0x11ded8,_0x240e4f,_0xd8a0db,_0x1d62a4)=>{for(var _0x306e21=_0x1d62a4>0x1?void 0x0:_0x1d62a4?_0x33c2eb(_0x240e4f,_0xd8a0db):_0x240e4f,_0x163c53=_0x11ded8['length']-0x1,_0xcccce3;_0x163c53>=0x0;_0x163c53--)(_0xcccce3=_0x11ded8[_0x163c53])&&(_0x306e21=(_0x1d62a4?_0xcccce3(_0x240e4f,_0xd8a0db,_0x306e21):_0xcccce3(_0x306e21))||_0x306e21);return _0x1d62a4&&_0x306e21&&_0x369121(_0x240e4f,_0xd8a0db,_0x306e21),_0x306e21;},_0x22e937=(_0x3c62a3,_0x58d7dc)=>(_0x59a4f4,_0xed0d69)=>_0x58d7dc(_0x59a4f4,_0xed0d69,_0x3c62a3);let _0x4806c0=class{constructor(_0x1a01b6){const _0x3ef537=_0x293c7c;this[_0x3ef537(0x120)]=_0x1a01b6;}async['getMentions'](_0x56f412,_0x493995,_0x302962){const _0x31661d=_0x293c7c,_0x588108=new URL(window[_0x31661d(0x148)][_0x31661d(0x105)])[_0x31661d(0x123)]['get'](_0x31661d(0xfb));if(!_0x588108)return[];const _0x43b584=window[_0x31661d(0x148)][_0x31661d(0x13f)],_0x150c98=window[_0x31661d(0x148)]['protocol']===_0x31661d(0x11c)?_0x31661d(0x121):_0x31661d(0x12e);return(await this['_httpService'][_0x31661d(0x141)](_0x150c98+_0x31661d(0xeb)+_0x43b584+_0x31661d(0x149),{'params':{'objectID':_0x588108,'unitID':_0x588108}}))[_0x31661d(0x101)][_0x31661d(0x14d)][_0x31661d(0x129)](_0x25b899=>{const _0x431a7e=_0x31661d;var _0x142e98,_0x19cc05,_0xc7f2d8,_0x195816,_0x6d541c,_0x5b7858;return{'id':(_0x19cc05=(_0x142e98=_0x25b899[_0x431a7e(0x163)])==null?void 0x0:_0x142e98[_0x431a7e(0xe2)])!=null?_0x19cc05:'','label':(_0x195816=(_0xc7f2d8=_0x25b899[_0x431a7e(0x163)])==null?void 0x0:_0xc7f2d8[_0x431a7e(0xea)])!=null?_0x195816:'','icon':(_0x5b7858=(_0x6d541c=_0x25b899[_0x431a7e(0x163)])==null?void 0x0:_0x6d541c[_0x431a7e(0xda)])!=null?_0x5b7858:'','type':_0x431a7e(0x102)};});}};_0x4806c0=_0x1e276e([_0x22e937(0x0,_0x55f941[_0x293c7c(0xf5)](_0x3d7abb[_0x293c7c(0x10a)]))],_0x4806c0);var _0x3a12ba=Object['defineProperty'],_0x409c36=Object[_0x293c7c(0x100)],_0x3c7197=(_0x19e691,_0x492a57,_0x5ab534,_0x7beea1)=>{for(var _0x460826=_0x7beea1>0x1?void 0x0:_0x7beea1?_0x409c36(_0x492a57,_0x5ab534):_0x492a57,_0x43a170=_0x19e691['length']-0x1,_0x2e89c2;_0x43a170>=0x0;_0x43a170--)(_0x2e89c2=_0x19e691[_0x43a170])&&(_0x460826=(_0x7beea1?_0x2e89c2(_0x492a57,_0x5ab534,_0x460826):_0x2e89c2(_0x460826))||_0x460826);return _0x7beea1&&_0x460826&&_0x3a12ba(_0x492a57,_0x5ab534,_0x460826),_0x460826;},_0x11062e=(_0x182bb8,_0x55faa4)=>(_0x5a80b2,_0x3d57a3)=>_0x55faa4(_0x5a80b2,_0x3d57a3,_0x182bb8);let _0x44c5ef=class extends _0x55f941[_0x293c7c(0xee)]{constructor(_0x59a04f,_0x228b36,_0x1520c3,_0x603e58){const _0x2b1021=_0x293c7c;super(),this[_0x2b1021(0x167)]=_0x59a04f,this['_threadCommentDataSource']=_0x228b36,this[_0x2b1021(0x114)]=_0x1520c3,this[_0x2b1021(0xed)]=_0x603e58,this[_0x2b1021(0x154)]();}['_initDataSource'](){const _0x23fe92=_0x293c7c;this[_0x23fe92(0x167)][_0x23fe92(0x15c)]=this[_0x23fe92(0xd5)],this['_threadCommentDataSourceService'][_0x23fe92(0xf6)]=!0x1,this[_0x23fe92(0x114)]['dataSource']=this[_0x23fe92(0xed)];}};_0x44c5ef=_0x3c7197([_0x11062e(0x0,_0x1c8f4d[_0x293c7c(0xf9)]),_0x11062e(0x1,_0x55f941[_0x293c7c(0xf5)](_0x92d595)),_0x11062e(0x2,_0x2509f9['IThreadCommentMentionDataService']),_0x11062e(0x3,_0x55f941['Inject'](_0x4806c0))],_0x44c5ef);var _0x57c4e3=Object[_0x293c7c(0xef)],_0x50017a=Object[_0x293c7c(0x100)],_0x5d9b2e=(_0x18210f,_0x2f4f90,_0x5d98a6)=>_0x2f4f90 in _0x18210f?_0x57c4e3(_0x18210f,_0x2f4f90,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d98a6}):_0x18210f[_0x2f4f90]=_0x5d98a6,_0x6d0b92=(_0x4a49af,_0x2253a9,_0x1eed10,_0x1421a7)=>{const _0x498ccf=_0x293c7c;for(var _0x2d7fcc=_0x1421a7>0x1?void 0x0:_0x1421a7?_0x50017a(_0x2253a9,_0x1eed10):_0x2253a9,_0x3b2fcf=_0x4a49af[_0x498ccf(0x113)]-0x1,_0x4f41cd;_0x3b2fcf>=0x0;_0x3b2fcf--)(_0x4f41cd=_0x4a49af[_0x3b2fcf])&&(_0x2d7fcc=(_0x1421a7?_0x4f41cd(_0x2253a9,_0x1eed10,_0x2d7fcc):_0x4f41cd(_0x2d7fcc))||_0x2d7fcc);return _0x1421a7&&_0x2d7fcc&&_0x57c4e3(_0x2253a9,_0x1eed10,_0x2d7fcc),_0x2d7fcc;},_0x36feda=(_0x1c3920,_0x44ca51)=>(_0xa6b2f7,_0x2ddf2d)=>_0x44ca51(_0xa6b2f7,_0x2ddf2d,_0x1c3920),_0x5ac85a=(_0x10ee10,_0x39997e,_0xe684e3)=>_0x5d9b2e(_0x10ee10,typeof _0x39997e!=_0x293c7c(0x15e)?_0x39997e+'':_0x39997e,_0xe684e3);_0x44f0e4['UniverThreadCommentDataSourcePlugin']=class extends _0x55f941[_0x293c7c(0x15b)]{constructor(_0x46f8d3=_0xecbc0b,_0x10d168,_0x46c2bc){const _0x3b4344=_0x293c7c;super(),this[_0x3b4344(0x15f)]=_0x46f8d3,this[_0x3b4344(0x115)]=_0x10d168,this[_0x3b4344(0x158)]=_0x46c2bc;const {..._0x301750}=this[_0x3b4344(0x15f)];this[_0x3b4344(0x158)]['setConfig'](_0x5a6721,_0x301750);}['onStarting'](){const _0x5ce16a=_0x293c7c;[[_0x4806c0],[_0x92d595],[_0x44c5ef],[_0x25541b]][_0x5ce16a(0x11b)](_0x1ddef6=>{const _0x10675f=_0x5ce16a;this['_injector'][_0x10675f(0xf4)](_0x1ddef6);}),this[_0x5ce16a(0x115)][_0x5ce16a(0x141)](_0x44c5ef);}[_0x293c7c(0x153)](){const _0x1446a4=_0x293c7c;this[_0x1446a4(0x115)][_0x1446a4(0x141)](_0x25541b);}},_0x5ac85a(_0x44f0e4[_0x293c7c(0x159)],_0x293c7c(0xd3),_0x44e02d),_0x5ac85a(_0x44f0e4['UniverThreadCommentDataSourcePlugin'],'type',_0x55f941[_0x293c7c(0x140)][_0x293c7c(0x14b)]),_0x44f0e4[_0x293c7c(0x159)]=_0x6d0b92([_0x55f941['DependentOn'](_0x1c8f4d['UniverThreadCommentPlugin'],_0x2509f9[_0x293c7c(0x12c)],_0x3510d1['UniverCollaborationClientPlugin'],_0x22a343[_0x293c7c(0x10e)]),_0x36feda(0x1,_0x55f941['Inject'](_0x55f941[_0x293c7c(0x138)])),_0x36feda(0x2,_0x55f941[_0x293c7c(0x165)])],_0x44f0e4['UniverThreadCommentDataSourcePlugin']),Object[_0x293c7c(0xef)](_0x44f0e4,Symbol['toStringTag'],{'value':_0x293c7c(0x12d)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.3.0-
|
|
3
|
+
"version": "0.3.0-nightly.202410101606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,31 +45,31 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"dayjs": ">=1.11.0",
|
|
47
47
|
"rxjs": ">=7.0.0",
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.3.0-
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.3.0-
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.3.0-nightly.202410101606",
|
|
49
|
+
"@univerjs-pro/license": "0.3.0-nightly.202410101606",
|
|
50
|
+
"@univerjs/core": "0.3.0-nightly.202410101606",
|
|
51
|
+
"@univerjs/network": "0.3.0-nightly.202410101606",
|
|
52
|
+
"@univerjs/thread-comment": "0.3.0-nightly.202410101606",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.3.0-nightly.202410101606"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"dayjs": "^1.11.13",
|
|
57
|
-
"@univerjs-pro/collaboration-client": "0.3.0-
|
|
58
|
-
"@univerjs-pro/facade": "0.3.0-
|
|
59
|
-
"@univerjs/
|
|
60
|
-
"@univerjs
|
|
61
|
-
"@univerjs/
|
|
62
|
-
"@univerjs/
|
|
63
|
-
"@univerjs/
|
|
64
|
-
"@univerjs/thread-comment-ui": "0.3.0-
|
|
65
|
-
"@univerjs/uniscript": "0.3.0-
|
|
57
|
+
"@univerjs-pro/collaboration-client": "0.3.0-nightly.202410101606",
|
|
58
|
+
"@univerjs-pro/facade": "0.3.0-nightly.202410101606",
|
|
59
|
+
"@univerjs-pro/license": "0.3.0-nightly.202410101606",
|
|
60
|
+
"@univerjs/network": "0.3.0-nightly.202410101606",
|
|
61
|
+
"@univerjs/core": "0.3.0-nightly.202410101606",
|
|
62
|
+
"@univerjs/protocol": "0.1.39-alpha.24",
|
|
63
|
+
"@univerjs/thread-comment": "0.3.0-nightly.202410101606",
|
|
64
|
+
"@univerjs/thread-comment-ui": "0.3.0-nightly.202410101606",
|
|
65
|
+
"@univerjs/uniscript": "0.3.0-nightly.202410101606"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"rxjs": "^7.8.1",
|
|
69
69
|
"typescript": "^5.6.2",
|
|
70
70
|
"vite": "^5.4.8",
|
|
71
71
|
"vitest": "^2.1.1",
|
|
72
|
-
"@univerjs-infra/shared": "0.3.0
|
|
72
|
+
"@univerjs-infra/shared": "0.3.0"
|
|
73
73
|
},
|
|
74
74
|
"univerSpace": {
|
|
75
75
|
".": {
|
|
@@ -89,7 +89,6 @@
|
|
|
89
89
|
"test:watch": "vitest",
|
|
90
90
|
"coverage": "vitest run --coverage",
|
|
91
91
|
"lint:types": "tsc --noEmit",
|
|
92
|
-
"build": "tsc && vite build"
|
|
93
|
-
"sync:pro:cnpm": "cnpm sync"
|
|
92
|
+
"build": "tsc && vite build"
|
|
94
93
|
}
|
|
95
94
|
}
|