@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202505261607 → 0.8.0-nightly.202505271607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3c8b66=_0x5db2;(function(_0x3f731d,_0x3441a2){const _0x398a16=_0x5db2,_0x1f59f7=_0x3f731d();while(!![]){try{const _0x2f7d38=-parseInt(_0x398a16(0x1a3))/0x1+parseInt(_0x398a16(0x142))/0x2*(parseInt(_0x398a16(0x1b7))/0x3)+parseInt(_0x398a16(0x144))/0x4*(parseInt(_0x398a16(0x162))/0x5)+-parseInt(_0x398a16(0x155))/0x6*(parseInt(_0x398a16(0x1a6))/0x7)+parseInt(_0x398a16(0x180))/0x8+parseInt(_0x398a16(0x182))/0x9+-parseInt(_0x398a16(0x1b0))/0xa*(parseInt(_0x398a16(0x192))/0xb);if(_0x2f7d38===_0x3441a2)break;else _0x1f59f7['push'](_0x1f59f7['shift']());}catch(_0x254243){_0x1f59f7['push'](_0x1f59f7['shift']());}}}(_0x415c,0xb0183));Object[_0x3c8b66(0x1a4)](exports,Symbol[_0x3c8b66(0x1ad)],{'value':_0x3c8b66(0x1c0)});const b=require(_0x3c8b66(0x1b1)),T=require(_0x3c8b66(0x169)),c=require(_0x3c8b66(0x174)),j=require(_0x3c8b66(0x146)),M=require(_0x3c8b66(0x17e)),w=require(_0x3c8b66(0x14d)),P=require(_0x3c8b66(0x1a9)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x415c(){const _0x1611a1=['getOwnPropertyDescriptor','userId','forEach','1137twtnHb','/solved','listComments','/list','/universer-api/comment/unit/','filter','_config','Edit','add','Module','users','/edit','slice','_injector','user','Add','2186YFcoss','CustomRangeType','109148Bjprpf','replyId','@univerjs/thread-comment-ui','find','get','rangeId','_sessionService','stringify','Reply','rxjs','UniverThreadCommentUIPlugin','body','parse','saveCommentToSnapshot','Delete','_configService','disposeWithMe','3673974rAPvNA','commentUpdate$','_threadCommentDataSource','pipe','CommentService','UniverCollaborationClientPlugin','IConfigService','code','requireSession','error','Inject','comment','symbol','235IsYDif','Solve','userID','format','root','resolveComment','_threadCommentModel','@univerjs-pro/license','Unknown','Disposable','pluginName','length','addUser','_initUserSync','Solved','_userService','UNRECOGNIZED','DependentOn','@univerjs/core','Injector','onReady','_commentService','addComment','bufferTime','unitId','replies','map','solved','@univerjs/thread-comment','rangeType','4163928miYGPV','getMemberID','2381994ZHpcrn','setConfig','HTTPService','size','ref','type','getCurrentUser','updateComment','content','dayjs','UniverLicensePlugin','personId','Plugin','UniverThreadCommentDataSourcePlugin','post','subscribe','11MBZgvd','customRanges','resolved','getUser','_threadCommentDataSourceService','_initDataSource','_init','/delete','createTimestamp','onStarting','getUnit','COMMENT','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','UserManagerService','ThreadCommentModel','UniverInstanceType','147588fSIQxp','defineProperty','UNIVER_UNKNOWN','7ybXphP','threadId','merge','@univerjs/network','delete','payload','deleteComment','toStringTag','/add','dataSource','10006930VdSfYv','@univerjs-pro/collaboration-client','values','_httpService'];_0x415c=function(){return _0x1611a1;};return _0x415c();}var I=(_0x2a23f2=>(_0x2a23f2[_0x2a23f2['OpenOrReOpen']=0x0]=_0x3c8b66(0x19e),_0x2a23f2[_0x2a23f2[_0x3c8b66(0x170)]=0x1]='Solved',_0x2a23f2[_0x2a23f2[_0x3c8b66(0x172)]=-0x1]='UNRECOGNIZED',_0x2a23f2))(I||{}),v=(_0x24ffea=>(_0x24ffea[_0x24ffea[_0x3c8b66(0x16a)]=0x0]=_0x3c8b66(0x16a),_0x24ffea[_0x24ffea[_0x3c8b66(0x141)]=0x1]=_0x3c8b66(0x141),_0x24ffea[_0x24ffea['Reply']=0x2]=_0x3c8b66(0x14c),_0x24ffea[_0x24ffea[_0x3c8b66(0x1be)]=0x3]='Edit',_0x24ffea[_0x24ffea['Delete']=0x4]=_0x3c8b66(0x152),_0x24ffea[_0x24ffea[_0x3c8b66(0x163)]=0x5]=_0x3c8b66(0x163),_0x24ffea[_0x24ffea[_0x3c8b66(0x172)]=-0x1]=_0x3c8b66(0x172),_0x24ffea))(v||{});const f=_0x5cb5b9=>c[_0x3c8b66(0x18b)](new Date(+_0x5cb5b9))[_0x3c8b66(0x165)](_0x3c8b66(0x19f)),R=async(_0x57f7e4,_0xdf846)=>{const _0xa0693b=_0x3c8b66,_0x17a03c=_0x57f7e4[_0xa0693b(0x148)](c[_0xa0693b(0x1a0)]),_0x37ec19=_0x57f7e4['get'](P[_0xa0693b(0x184)]);_0xdf846[_0xa0693b(0x1b6)](_0x2f7ca4=>{const _0x165c4c=_0xa0693b;_0x17a03c[_0x165c4c(0x195)](_0x2f7ca4)&&_0xdf846[_0x165c4c(0x1aa)](_0x2f7ca4);}),_0xdf846[_0xa0693b(0x185)]&&(await _0x37ec19[_0xa0693b(0x148)]('/universer-api/user/list',{'params':{'userIDs':[..._0xdf846]}}))[_0xa0693b(0x14f)][_0xa0693b(0x1c1)][_0xa0693b(0x1b6)](_0x3a2234=>{const _0x246f0f=_0xa0693b;_0x3a2234&&_0x17a03c[_0x246f0f(0x16e)](_0x3a2234);});};var $=Object[_0x3c8b66(0x1b4)],E=(_0x321705,_0x1f5e41,_0x918f18,_0x307c71)=>{const _0x284cad=_0x3c8b66;for(var _0x355b36=_0x307c71>0x1?void 0x0:_0x307c71?$(_0x1f5e41,_0x918f18):_0x1f5e41,_0x58556e=_0x321705[_0x284cad(0x16d)]-0x1,_0x446f7a;_0x58556e>=0x0;_0x58556e--)(_0x446f7a=_0x321705[_0x58556e])&&(_0x355b36=_0x446f7a(_0x355b36)||_0x355b36);return _0x355b36;},S=(_0x30963c,_0x52f9d0)=>(_0x5e42aa,_0x5ea365)=>_0x52f9d0(_0x5e42aa,_0x5ea365,_0x30963c);let p=class extends c[_0x3c8b66(0x16b)]{constructor(_0x53caf2,_0x39c73b,_0x262e3b,_0x29ca3e){const _0x1dad58=_0x3c8b66;super(),this[_0x1dad58(0x177)]=_0x53caf2,this[_0x1dad58(0x168)]=_0x39c73b,this[_0x1dad58(0x171)]=_0x262e3b,this[_0x1dad58(0x13f)]=_0x29ca3e,this[_0x1dad58(0x198)](),this[_0x1dad58(0x16f)]();}[_0x3c8b66(0x16f)](){const _0x70ecc9=_0x3c8b66;this['disposeWithMe'](this[_0x70ecc9(0x168)][_0x70ecc9(0x156)][_0x70ecc9(0x158)](w[_0x70ecc9(0x179)](0x10))['subscribe'](_0x46e73d=>{const _0x46fdfe=_0x70ecc9,_0xccc340=new Set();_0x46e73d[_0x46fdfe(0x1b6)](_0x451808=>{const _0x2bda4c=_0x46fdfe;switch(_0x451808[_0x2bda4c(0x187)]){case'add':{const _0x351700=_0x451808[_0x2bda4c(0x1ab)][_0x2bda4c(0x18d)];_0xccc340['add'](_0x351700);break;}}}),R(this[_0x46fdfe(0x13f)],_0xccc340);}));}[_0x3c8b66(0x198)](){const _0x53aa33=_0x3c8b66;this[_0x53aa33(0x154)](this[_0x53aa33(0x177)][_0x53aa33(0x156)][_0x53aa33(0x191)](async _0x456cbf=>{const _0x43638e=_0x53aa33;var _0xcd6860,_0x24e7eb,_0x4a1aca,_0x105915;const _0x1ae6b5=(_0xcd6860=this['_threadCommentModel']['getUnit'](_0x456cbf['unitId'])['find'](_0x12ed92=>_0x12ed92[_0x43638e(0x1a7)]===_0x456cbf[_0x43638e(0x1a7)]))==null?void 0x0:_0xcd6860[_0x43638e(0x166)];if(!_0x1ae6b5)return;const {unitId:_0x217629,subUnitId:_0x66a95}=_0x1ae6b5;switch(_0x456cbf[_0x43638e(0x140)]&&this[_0x43638e(0x171)]['addUser'](_0x456cbf[_0x43638e(0x140)]),_0x456cbf[_0x43638e(0x187)]){case v[_0x43638e(0x141)]:break;case v[_0x43638e(0x14c)]:{this[_0x43638e(0x168)]['addComment'](_0x217629,_0x66a95,{'unitId':_0x217629,'subUnitId':_0x66a95,'ref':'','id':_0x456cbf[_0x43638e(0x145)],'dT':f(+_0x456cbf['createTimestamp']),'threadId':_0x456cbf[_0x43638e(0x1a7)],'personId':(_0x4a1aca=(_0x24e7eb=_0x456cbf[_0x43638e(0x140)])==null?void 0x0:_0x24e7eb[_0x43638e(0x164)])!=null?_0x4a1aca:_0x456cbf['userId'],'text':JSON[_0x43638e(0x150)](_0x456cbf[_0x43638e(0x18a)]),'parentId':_0x1ae6b5['id']});break;}case v[_0x43638e(0x152)]:{const _0x40c2dd=this['_threadCommentModel']['getComment'](_0x217629,_0x66a95,_0x456cbf[_0x43638e(0x145)]);_0x40c2dd&&_0x40c2dd['parentId']&&this[_0x43638e(0x168)][_0x43638e(0x1ac)](_0x217629,_0x66a95,_0x456cbf[_0x43638e(0x145)]);break;}case v[_0x43638e(0x1be)]:{this[_0x43638e(0x168)][_0x43638e(0x189)](_0x217629,_0x66a95,{'commentId':_0x456cbf['replyId'],'text':JSON[_0x43638e(0x150)](_0x456cbf['content'])});break;}case v[_0x43638e(0x163)]:{const _0x263346=(_0x105915=this['_threadCommentModel'][_0x43638e(0x19c)](_0x456cbf[_0x43638e(0x17a)])[_0x43638e(0x147)](_0x3bc8fb=>_0x3bc8fb[_0x43638e(0x1a7)]===_0x456cbf[_0x43638e(0x1a7)]))==null?void 0x0:_0x105915[_0x43638e(0x166)];_0x263346&&this[_0x43638e(0x168)][_0x43638e(0x167)](_0x217629,_0x66a95,_0x263346['id'],_0x456cbf[_0x43638e(0x17d)]===I[_0x43638e(0x170)]);break;}}}));}};p=E([S(0x0,c[_0x3c8b66(0x15f)](b[_0x3c8b66(0x159)])),S(0x1,c[_0x3c8b66(0x15f)](M[_0x3c8b66(0x1a1)])),S(0x2,c[_0x3c8b66(0x15f)](c['UserManagerService'])),S(0x3,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x175)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x3c8b66(0x1b4)],x=(_0x378c8c,_0x958aac,_0x33be85,_0x30f92d)=>{for(var _0x1e80aa=_0x30f92d>0x1?void 0x0:_0x30f92d?A(_0x958aac,_0x33be85):_0x958aac,_0x56fa1f=_0x378c8c['length']-0x1,_0x1202d5;_0x56fa1f>=0x0;_0x56fa1f--)(_0x1202d5=_0x378c8c[_0x56fa1f])&&(_0x1e80aa=_0x1202d5(_0x1e80aa)||_0x1e80aa);return _0x1e80aa;},_=(_0x5c7078,_0x218489)=>(_0xc7f971,_0x47a787)=>_0x218489(_0xc7f971,_0x47a787,_0x5c7078);function Y(_0x301775,_0x2356da){const _0x26dd51=_0x3c8b66,_0x91c055=_0x301775[_0x26dd51(0x17b)][0x0];return{..._0x2356da,'id':_0x91c055[_0x26dd51(0x145)],'resolved':_0x301775[_0x26dd51(0x17d)]===0x1,'dT':f(_0x91c055[_0x26dd51(0x19a)]),'personId':_0x91c055[_0x26dd51(0x1b5)],'threadId':_0x91c055[_0x26dd51(0x1a7)]};}function G(_0x2df7b1,_0x21915f,_0x4280ba){const _0x3d5210=_0x3c8b66;var _0x1a69f3,_0xd979ba;if(((_0xd979ba=(_0x1a69f3=_0x2df7b1==null?void 0x0:_0x2df7b1['replies'])==null?void 0x0:_0x1a69f3['length'])!=null?_0xd979ba:0x0)>0x0){const _0x59f9ae=(_0x46f068,_0x22e181)=>({'id':_0x46f068[_0x3d5210(0x145)],'threadId':_0x46f068[_0x3d5210(0x1a7)],'dT':f(_0x46f068[_0x3d5210(0x19a)]),'personId':_0x46f068[_0x3d5210(0x1b5)],'resolved':_0x2df7b1['solved']===I['Solved'],'unitId':_0x21915f,'subUnitId':_0x4280ba,'text':JSON[_0x3d5210(0x150)](_0x46f068[_0x3d5210(0x18a)]),'parentId':_0x22e181}),_0x2baa7c=_0x59f9ae(_0x2df7b1['replies'][0x0]);return{..._0x2baa7c,'children':_0x2df7b1['replies'][_0x3d5210(0x13e)](0x1)[_0x3d5210(0x17c)](_0x1d689e=>_0x59f9ae(_0x1d689e,_0x2baa7c['id']))};}return null;}function _0x5db2(_0x41c8c0,_0x474093){const _0x415cfe=_0x415c();return _0x5db2=function(_0x5db2e3,_0x4d31c9){_0x5db2e3=_0x5db2e3-0x13e;let _0x276c15=_0x415cfe[_0x5db2e3];return _0x276c15;},_0x5db2(_0x41c8c0,_0x474093);}let g=class{constructor(_0x2b92d5,_0x1a81f2,_0x841936,_0x362d81){const _0x3363dc=_0x3c8b66;this[_0x3363dc(0x1b3)]=_0x2b92d5,this[_0x3363dc(0x171)]=_0x1a81f2,this[_0x3363dc(0x14a)]=_0x841936,this[_0x3363dc(0x13f)]=_0x362d81;}async[_0x3c8b66(0x178)](_0xab6aa){const _0x555758=_0x3c8b66;var _0x434a80,_0x5dc2fc;const {parentId:_0x2cec01,unitId:_0x28d437,text:_0x3cc834,threadId:_0x15fe13}=_0xab6aa,_0x5bee23=(_0x5dc2fc=(_0x434a80=_0x3cc834[_0x555758(0x193)])==null?void 0x0:_0x434a80['filter'](_0x4f3b3c=>_0x4f3b3c[_0x555758(0x17f)]===c[_0x555758(0x143)][_0x555758(0x19d)])['map'](_0x252373=>_0x252373[_0x555758(0x149)]))!=null?_0x5dc2fc:[],_0x899c37=JSON['stringify'](_0x3cc834),_0x11953c=(await this[_0x555758(0x14a)][_0x555758(0x15d)](_0x28d437))['getMemberID']();if(_0x2cec01){const _0x11931e={'memberId':_0x11953c,'unitId':_0x28d437,'content':_0x899c37,'mention':_0x5bee23,'threadId':_0x15fe13},_0x443046=(await this[_0x555758(0x1b3)][_0x555758(0x190)](_0x555758(0x1bb)+_0x28d437+'/reply',{'body':_0x11931e}))[_0x555758(0x14f)]['reply'];return{..._0xab6aa,'id':_0x443046[_0x555758(0x145)],'dT':c[_0x555758(0x18b)](+_0x443046['createTimestamp'])[_0x555758(0x165)](_0x555758(0x19f)),'personId':_0x443046['userId']};}else{const _0x5f31a0={'memberId':_0x11953c,'unitId':_0x28d437,'content':_0x899c37,'mention':_0x5bee23},_0x4f0208=await this[_0x555758(0x1b3)][_0x555758(0x190)]('/universer-api/comment/unit/'+_0x28d437+_0x555758(0x1ae),{'body':_0x5f31a0});return Y(_0x4f0208[_0x555758(0x14f)][_0x555758(0x160)],_0xab6aa);}}async['updateComment'](_0x3b8ecc){const _0x37b96b=_0x3c8b66;var _0x59da26,_0x55dd9b;const {text:_0x422777,unitId:_0x32bfc8}=_0x3b8ecc,_0x529148=(_0x55dd9b=(_0x59da26=_0x422777[_0x37b96b(0x193)])==null?void 0x0:_0x59da26[_0x37b96b(0x1bc)](_0x2ecceb=>_0x2ecceb[_0x37b96b(0x17f)]===c[_0x37b96b(0x143)][_0x37b96b(0x19d)])['map'](_0x304917=>_0x304917['rangeId']))!=null?_0x55dd9b:[],_0x21fdd5=JSON[_0x37b96b(0x14b)](_0x422777),_0x3955da=_0x3b8ecc['threadId'],_0x5ac084=_0x3b8ecc['id'],_0x547f13={'memberId':(await this[_0x37b96b(0x14a)][_0x37b96b(0x15d)](_0x32bfc8))['getMemberID'](),'unitId':_0x32bfc8,'threadId':_0x3955da,'mention':_0x529148,'content':_0x21fdd5,'replyId':_0x5ac084},_0x32ed6c=await this[_0x37b96b(0x1b3)][_0x37b96b(0x190)]('/universer-api/comment/unit/'+_0x32bfc8+_0x37b96b(0x1c2),{'body':_0x547f13});return!_0x32ed6c['body'][_0x37b96b(0x15e)]||_0x32ed6c[_0x37b96b(0x14f)]['error'][_0x37b96b(0x15c)]===0x1;}async[_0x3c8b66(0x167)](_0x37e049){const _0x323549=_0x3c8b66,{unitId:_0x23af09}=_0x37e049,_0x3f8e95=_0x37e049[_0x323549(0x1a7)],_0x34895d={'memberId':this[_0x323549(0x171)][_0x323549(0x188)]()[_0x323549(0x164)],'unitId':_0x23af09,'threadId':_0x3f8e95,'solved':_0x37e049[_0x323549(0x194)]?I['Solved']:I['OpenOrReOpen']},_0x2846fe=await this['_httpService'][_0x323549(0x190)]('/universer-api/comment/unit/'+_0x23af09+_0x323549(0x1b8),{'body':_0x34895d});return!_0x2846fe['body']['error']||_0x2846fe['body'][_0x323549(0x15e)][_0x323549(0x15c)]===0x1;}async[_0x3c8b66(0x1ac)](_0xdfe78e,_0x2cb208,_0x5acb5a,_0x2ca35a){const _0x36d96d=_0x3c8b66,_0x4f6ca0={'memberId':(await this[_0x36d96d(0x14a)][_0x36d96d(0x15d)](_0xdfe78e))[_0x36d96d(0x181)](),'threadId':_0x5acb5a,'replyId':_0x2ca35a,'unitId':_0xdfe78e},_0x7473a2=await this[_0x36d96d(0x1b3)][_0x36d96d(0x190)](_0x36d96d(0x1bb)+_0xdfe78e+_0x36d96d(0x199),{'body':_0x4f6ca0});return!_0x7473a2['body'][_0x36d96d(0x15e)]||_0x7473a2[_0x36d96d(0x14f)][_0x36d96d(0x15e)]['code']===0x1;}async[_0x3c8b66(0x1b9)](_0x4f67b5,_0x1f6e0e,_0x156235){const _0x2d5c94=_0x3c8b66,_0x36d979={'unitId':_0x4f67b5,'threadId':_0x156235},_0x467fda=await this['_httpService'][_0x2d5c94(0x190)](_0x2d5c94(0x1bb)+_0x4f67b5+_0x2d5c94(0x1ba),{'body':_0x36d979}),_0x326223=_0x156235[_0x2d5c94(0x17c)](_0x497ea4=>G(_0x467fda[_0x2d5c94(0x14f)]['comments'][_0x497ea4],_0x4f67b5,_0x1f6e0e))['filter'](Boolean);return Object[_0x2d5c94(0x1b2)](_0x467fda[_0x2d5c94(0x14f)][_0x2d5c94(0x1c1)])[_0x2d5c94(0x1b6)](_0x23197b=>{const _0xadf8aa=_0x2d5c94;this[_0xadf8aa(0x171)][_0xadf8aa(0x16e)](_0x23197b);}),_0x326223;}[_0x3c8b66(0x151)](_0x36dd2f){const _0x12c146=_0x3c8b66;return{'id':_0x36dd2f['id'],'threadId':_0x36dd2f['threadId'],'ref':_0x36dd2f[_0x12c146(0x186)]};}};g=x([_(0x0,c[_0x3c8b66(0x15f)](P[_0x3c8b66(0x184)])),_(0x1,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x1a0)])),_(0x2,c[_0x3c8b66(0x15f)](b['CollaborationSessionService'])),_(0x3,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x175)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x543bff,_0x2881eb,_0x2ad88f,_0x14e6d1)=>{const _0x388fca=_0x3c8b66;for(var _0x1a70c1=_0x14e6d1>0x1?void 0x0:_0x14e6d1?H(_0x2881eb,_0x2ad88f):_0x2881eb,_0x278c07=_0x543bff[_0x388fca(0x16d)]-0x1,_0x10fd1c;_0x278c07>=0x0;_0x278c07--)(_0x10fd1c=_0x543bff[_0x278c07])&&(_0x1a70c1=_0x10fd1c(_0x1a70c1)||_0x1a70c1);return _0x1a70c1;},y=(_0x47614e,_0x2d5053)=>(_0x3cfe32,_0xdeb92)=>_0x2d5053(_0x3cfe32,_0xdeb92,_0x47614e);let C=class extends c[_0x3c8b66(0x16b)]{constructor(_0x362007,_0x269e94){const _0x4351b7=_0x3c8b66;super(),this[_0x4351b7(0x196)]=_0x362007,this[_0x4351b7(0x157)]=_0x269e94,this[_0x4351b7(0x197)]();}[_0x3c8b66(0x197)](){const _0xda70c5=_0x3c8b66;this[_0xda70c5(0x196)][_0xda70c5(0x1af)]=this[_0xda70c5(0x157)],this[_0xda70c5(0x196)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x3c8b66(0x15f)](g))],C);var F=Object[_0x3c8b66(0x1a4)],L=Object[_0x3c8b66(0x1b4)],Z=(_0x3cbd41,_0x1a7602,_0x1360e6)=>_0x1a7602 in _0x3cbd41?F(_0x3cbd41,_0x1a7602,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1360e6}):_0x3cbd41[_0x1a7602]=_0x1360e6,W=(_0x4dde97,_0x2babd6,_0x2147cc,_0x277145)=>{const _0x3b5fee=_0x3c8b66;for(var _0x26f9b5=_0x277145>0x1?void 0x0:_0x277145?L(_0x2babd6,_0x2147cc):_0x2babd6,_0x5d686b=_0x4dde97[_0x3b5fee(0x16d)]-0x1,_0x4bb53d;_0x5d686b>=0x0;_0x5d686b--)(_0x4bb53d=_0x4dde97[_0x5d686b])&&(_0x26f9b5=_0x4bb53d(_0x26f9b5)||_0x26f9b5);return _0x26f9b5;},O=(_0x3501cd,_0x27c99b)=>(_0xe93d86,_0x26f5f2)=>_0x27c99b(_0xe93d86,_0x26f5f2,_0x3501cd),N=(_0x5316a4,_0xe0223b,_0x37c6ff)=>Z(_0x5316a4,typeof _0xe0223b!=_0x3c8b66(0x161)?_0xe0223b+'':_0xe0223b,_0x37c6ff);exports[_0x3c8b66(0x18f)]=class extends c[_0x3c8b66(0x18e)]{constructor(_0x555436=D,_0x27ce0b,_0x29c300){const _0x40c034=_0x3c8b66;super(),this[_0x40c034(0x1bd)]=_0x555436,this['_injector']=_0x27ce0b,this[_0x40c034(0x153)]=_0x29c300;const {..._0x29b08c}=c[_0x40c034(0x1a8)]({},D,this[_0x40c034(0x1bd)]);this[_0x40c034(0x153)][_0x40c034(0x183)](q,_0x29b08c);}[_0x3c8b66(0x19b)](){const _0x547c66=_0x3c8b66;[[g],[C],[p]][_0x547c66(0x1b6)](_0x4e29e9=>{const _0x45b29b=_0x547c66;this['_injector'][_0x45b29b(0x1bf)](_0x4e29e9);});}[_0x3c8b66(0x176)](){const _0x19e5a6=_0x3c8b66;this[_0x19e5a6(0x13f)][_0x19e5a6(0x148)](C),this[_0x19e5a6(0x13f)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3c8b66(0x16c),U),N(exports[_0x3c8b66(0x18f)],_0x3c8b66(0x187),c[_0x3c8b66(0x1a2)][_0x3c8b66(0x1a5)]),exports[_0x3c8b66(0x18f)]=W([c[_0x3c8b66(0x173)](j[_0x3c8b66(0x14e)],b[_0x3c8b66(0x15a)],T[_0x3c8b66(0x18c)]),O(0x1,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x175)])),O(0x2,c[_0x3c8b66(0x15b)])],exports[_0x3c8b66(0x18f)]);
|
|
1
|
+
'use strict';const _0x4deb1c=_0x4d64;(function(_0x116328,_0x49454b){const _0x37072f=_0x4d64,_0x298eac=_0x116328();while(!![]){try{const _0x3be10a=-parseInt(_0x37072f(0x1a5))/0x1+parseInt(_0x37072f(0x1a1))/0x2*(-parseInt(_0x37072f(0x1cf))/0x3)+parseInt(_0x37072f(0x1da))/0x4+-parseInt(_0x37072f(0x177))/0x5*(-parseInt(_0x37072f(0x1a8))/0x6)+parseInt(_0x37072f(0x1ce))/0x7*(-parseInt(_0x37072f(0x1d7))/0x8)+-parseInt(_0x37072f(0x1af))/0x9*(-parseInt(_0x37072f(0x165))/0xa)+-parseInt(_0x37072f(0x19a))/0xb*(parseInt(_0x37072f(0x1d4))/0xc);if(_0x3be10a===_0x49454b)break;else _0x298eac['push'](_0x298eac['shift']());}catch(_0x21b5dd){_0x298eac['push'](_0x298eac['shift']());}}}(_0x3068,0x859e5));Object[_0x4deb1c(0x1d2)](exports,Symbol[_0x4deb1c(0x1df)],{'value':_0x4deb1c(0x16d)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x4deb1c(0x1b7)),c=require(_0x4deb1c(0x197)),j=require('@univerjs/thread-comment-ui'),M=require(_0x4deb1c(0x16a)),w=require(_0x4deb1c(0x1dd)),P=require('@univerjs/network'),U=_0x4deb1c(0x1ab);var I=(_0x3ad4cf=>(_0x3ad4cf[_0x3ad4cf[_0x4deb1c(0x192)]=0x0]=_0x4deb1c(0x192),_0x3ad4cf[_0x3ad4cf[_0x4deb1c(0x18e)]=0x1]=_0x4deb1c(0x18e),_0x3ad4cf[_0x3ad4cf['UNRECOGNIZED']=-0x1]=_0x4deb1c(0x190),_0x3ad4cf))(I||{}),v=(_0x5f5d88=>(_0x5f5d88[_0x5f5d88[_0x4deb1c(0x171)]=0x0]=_0x4deb1c(0x171),_0x5f5d88[_0x5f5d88['Add']=0x1]=_0x4deb1c(0x19d),_0x5f5d88[_0x5f5d88['Reply']=0x2]=_0x4deb1c(0x193),_0x5f5d88[_0x5f5d88[_0x4deb1c(0x19f)]=0x3]=_0x4deb1c(0x19f),_0x5f5d88[_0x5f5d88['Delete']=0x4]='Delete',_0x5f5d88[_0x5f5d88[_0x4deb1c(0x1b5)]=0x5]=_0x4deb1c(0x1b5),_0x5f5d88[_0x5f5d88[_0x4deb1c(0x190)]=-0x1]='UNRECOGNIZED',_0x5f5d88))(v||{});const f=_0x4f9d0b=>c[_0x4deb1c(0x1a2)](new Date(+_0x4f9d0b))[_0x4deb1c(0x19c)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x1fec01,_0x3253a5)=>{const _0x5329d9=_0x4deb1c,_0x7272aa=_0x1fec01['get'](c[_0x5329d9(0x184)]),_0x2c24ca=_0x1fec01[_0x5329d9(0x195)](P[_0x5329d9(0x1c1)]);_0x3253a5[_0x5329d9(0x1be)](_0x4e4e5d=>{const _0x154a67=_0x5329d9;_0x7272aa['getUser'](_0x4e4e5d)&&_0x3253a5[_0x154a67(0x1b4)](_0x4e4e5d);}),_0x3253a5[_0x5329d9(0x17f)]&&(await _0x2c24ca[_0x5329d9(0x195)](_0x5329d9(0x1e0),{'params':{'userIDs':[..._0x3253a5]}}))[_0x5329d9(0x1db)][_0x5329d9(0x160)][_0x5329d9(0x1be)](_0x4a46b2=>{const _0x942d4c=_0x5329d9;_0x4a46b2&&_0x7272aa[_0x942d4c(0x1ae)](_0x4a46b2);});};var $=Object[_0x4deb1c(0x17d)],E=(_0x3f5361,_0x5df08f,_0xfa55b8,_0x33692b)=>{for(var _0x34a77d=_0x33692b>0x1?void 0x0:_0x33692b?$(_0x5df08f,_0xfa55b8):_0x5df08f,_0x3c3368=_0x3f5361['length']-0x1,_0x353fa9;_0x3c3368>=0x0;_0x3c3368--)(_0x353fa9=_0x3f5361[_0x3c3368])&&(_0x34a77d=_0x353fa9(_0x34a77d)||_0x34a77d);return _0x34a77d;},S=(_0x5395cc,_0x178471)=>(_0x24292e,_0x4b6c8a)=>_0x178471(_0x24292e,_0x4b6c8a,_0x5395cc);let p=class extends c[_0x4deb1c(0x164)]{constructor(_0x168e57,_0xc39edc,_0x28592e,_0x4448d1){const _0x2f9303=_0x4deb1c;super(),this[_0x2f9303(0x162)]=_0x168e57,this['_threadCommentModel']=_0xc39edc,this[_0x2f9303(0x15e)]=_0x28592e,this['_injector']=_0x4448d1,this[_0x2f9303(0x1bb)](),this[_0x2f9303(0x1c9)]();}[_0x4deb1c(0x1c9)](){const _0x5d8b09=_0x4deb1c;this['disposeWithMe'](this[_0x5d8b09(0x1bf)][_0x5d8b09(0x199)][_0x5d8b09(0x17b)](w[_0x5d8b09(0x1d6)](0x10))[_0x5d8b09(0x196)](_0x2e3c9e=>{const _0xc06a17=_0x5d8b09,_0x110c23=new Set();_0x2e3c9e[_0xc06a17(0x1be)](_0x24dd30=>{const _0x2c679e=_0xc06a17;switch(_0x24dd30['type']){case _0x2c679e(0x198):{const _0x519bf=_0x24dd30[_0x2c679e(0x1c7)][_0x2c679e(0x1ac)];_0x110c23[_0x2c679e(0x198)](_0x519bf);break;}}}),R(this[_0xc06a17(0x18d)],_0x110c23);}));}['_init'](){const _0x4411b9=_0x4deb1c;this[_0x4411b9(0x1cb)](this[_0x4411b9(0x162)][_0x4411b9(0x199)][_0x4411b9(0x196)](async _0x148ba0=>{const _0x577e6a=_0x4411b9;var _0x5d18e0,_0x181b45,_0xfc210a,_0x34ac40;const _0x6d7b39=(_0x5d18e0=this[_0x577e6a(0x1bf)][_0x577e6a(0x15d)](_0x148ba0[_0x577e6a(0x178)])[_0x577e6a(0x166)](_0x5085ca=>_0x5085ca[_0x577e6a(0x168)]===_0x148ba0[_0x577e6a(0x168)]))==null?void 0x0:_0x5d18e0[_0x577e6a(0x16e)];if(!_0x6d7b39)return;const {unitId:_0xbc118e,subUnitId:_0x287cd4}=_0x6d7b39;switch(_0x148ba0[_0x577e6a(0x1a9)]&&this['_userService'][_0x577e6a(0x1ae)](_0x148ba0['user']),_0x148ba0['type']){case v[_0x577e6a(0x19d)]:break;case v[_0x577e6a(0x193)]:{this[_0x577e6a(0x1bf)][_0x577e6a(0x1bd)](_0xbc118e,_0x287cd4,{'unitId':_0xbc118e,'subUnitId':_0x287cd4,'ref':'','id':_0x148ba0[_0x577e6a(0x18a)],'dT':f(+_0x148ba0[_0x577e6a(0x16c)]),'threadId':_0x148ba0['threadId'],'personId':(_0xfc210a=(_0x181b45=_0x148ba0[_0x577e6a(0x1a9)])==null?void 0x0:_0x181b45[_0x577e6a(0x1b9)])!=null?_0xfc210a:_0x148ba0['userId'],'text':JSON[_0x577e6a(0x1d5)](_0x148ba0[_0x577e6a(0x183)]),'parentId':_0x6d7b39['id']});break;}case v['Delete']:{const _0x551356=this[_0x577e6a(0x1bf)]['getComment'](_0xbc118e,_0x287cd4,_0x148ba0['replyId']);_0x551356&&_0x551356[_0x577e6a(0x181)]&&this[_0x577e6a(0x1bf)][_0x577e6a(0x173)](_0xbc118e,_0x287cd4,_0x148ba0[_0x577e6a(0x18a)]);break;}case v[_0x577e6a(0x19f)]:{this['_threadCommentModel']['updateComment'](_0xbc118e,_0x287cd4,{'commentId':_0x148ba0[_0x577e6a(0x18a)],'text':JSON['parse'](_0x148ba0[_0x577e6a(0x183)])});break;}case v[_0x577e6a(0x1b5)]:{const _0x136919=(_0x34ac40=this[_0x577e6a(0x1bf)][_0x577e6a(0x15d)](_0x148ba0[_0x577e6a(0x178)])['find'](_0x11610f=>_0x11610f['threadId']===_0x148ba0[_0x577e6a(0x168)]))==null?void 0x0:_0x34ac40['root'];_0x136919&&this[_0x577e6a(0x1bf)][_0x577e6a(0x1ad)](_0xbc118e,_0x287cd4,_0x136919['id'],_0x148ba0[_0x577e6a(0x1b1)]===I[_0x577e6a(0x18e)]);break;}}}));}};p=E([S(0x0,c[_0x4deb1c(0x18f)](b['CommentService'])),S(0x1,c[_0x4deb1c(0x18f)](M['ThreadCommentModel'])),S(0x2,c[_0x4deb1c(0x18f)](c['UserManagerService'])),S(0x3,c[_0x4deb1c(0x18f)](c[_0x4deb1c(0x17c)]))],p);const q=_0x4deb1c(0x1d1),D={};var A=Object[_0x4deb1c(0x17d)],x=(_0x3b0cb0,_0x5bf2ad,_0x40c627,_0x44e679)=>{const _0x108d27=_0x4deb1c;for(var _0xff5cb6=_0x44e679>0x1?void 0x0:_0x44e679?A(_0x5bf2ad,_0x40c627):_0x5bf2ad,_0x42001c=_0x3b0cb0[_0x108d27(0x17e)]-0x1,_0x4b65e5;_0x42001c>=0x0;_0x42001c--)(_0x4b65e5=_0x3b0cb0[_0x42001c])&&(_0xff5cb6=_0x4b65e5(_0xff5cb6)||_0xff5cb6);return _0xff5cb6;},_=(_0x135633,_0x5b1f79)=>(_0x4a24ee,_0x32a479)=>_0x5b1f79(_0x4a24ee,_0x32a479,_0x135633);function Y(_0x45c10a,_0x5e56c4){const _0x269e5b=_0x4deb1c,_0x133b83=_0x45c10a[_0x269e5b(0x174)][0x0];return{..._0x5e56c4,'id':_0x133b83['replyId'],'resolved':_0x45c10a[_0x269e5b(0x1b1)]===0x1,'dT':f(_0x133b83['createTimestamp']),'personId':_0x133b83[_0x269e5b(0x1c3)],'threadId':_0x133b83['threadId']};}function G(_0x108d87,_0x57c02c,_0xb254c7){const _0x1dee86=_0x4deb1c;var _0x4cd930,_0x3a04b8;if(((_0x3a04b8=(_0x4cd930=_0x108d87==null?void 0x0:_0x108d87[_0x1dee86(0x174)])==null?void 0x0:_0x4cd930[_0x1dee86(0x17e)])!=null?_0x3a04b8:0x0)>0x0){const _0x49cbd5=(_0x521d5b,_0x41eb75)=>({'id':_0x521d5b[_0x1dee86(0x18a)],'threadId':_0x521d5b['threadId'],'dT':f(_0x521d5b[_0x1dee86(0x16c)]),'personId':_0x521d5b[_0x1dee86(0x1c3)],'resolved':_0x108d87[_0x1dee86(0x1b1)]===I[_0x1dee86(0x18e)],'unitId':_0x57c02c,'subUnitId':_0xb254c7,'text':JSON[_0x1dee86(0x1d5)](_0x521d5b['content']),'parentId':_0x41eb75}),_0x14f29c=_0x49cbd5(_0x108d87[_0x1dee86(0x174)][0x0]);return{..._0x14f29c,'children':_0x108d87[_0x1dee86(0x174)][_0x1dee86(0x175)](0x1)[_0x1dee86(0x1d9)](_0x1422dd=>_0x49cbd5(_0x1422dd,_0x14f29c['id']))};}return null;}let g=class{constructor(_0x86b181,_0x3a0e4a,_0x55faf5,_0xecc61e){const _0x464811=_0x4deb1c;this[_0x464811(0x1cc)]=_0x86b181,this['_userService']=_0x3a0e4a,this['_sessionService']=_0x55faf5,this[_0x464811(0x18d)]=_0xecc61e;}async[_0x4deb1c(0x1bd)](_0x5a3ca1){const _0xc15d6b=_0x4deb1c;var _0x1501a8,_0x9f0d2;const {parentId:_0x23d9b8,unitId:_0x4753cb,text:_0x2c4a7d,threadId:_0x292740}=_0x5a3ca1,_0x5f25cb=(_0x9f0d2=(_0x1501a8=_0x2c4a7d[_0xc15d6b(0x1e1)])==null?void 0x0:_0x1501a8['filter'](_0xfa1b5f=>_0xfa1b5f[_0xc15d6b(0x186)]===c[_0xc15d6b(0x1a6)][_0xc15d6b(0x182)])['map'](_0xea7818=>_0xea7818[_0xc15d6b(0x1b8)]))!=null?_0x9f0d2:[],_0x587e69=JSON[_0xc15d6b(0x188)](_0x2c4a7d),_0x322d65=(await this[_0xc15d6b(0x179)][_0xc15d6b(0x1c5)](_0x4753cb))[_0xc15d6b(0x1e2)]();if(_0x23d9b8){const _0x565d18={'memberId':_0x322d65,'unitId':_0x4753cb,'content':_0x587e69,'mention':_0x5f25cb,'threadId':_0x292740},_0x810bce=(await this[_0xc15d6b(0x1cc)][_0xc15d6b(0x19e)]('/universer-api/comment/unit/'+_0x4753cb+_0xc15d6b(0x1de),{'body':_0x565d18}))['body'][_0xc15d6b(0x170)];return{..._0x5a3ca1,'id':_0x810bce['replyId'],'dT':c[_0xc15d6b(0x1a2)](+_0x810bce[_0xc15d6b(0x16c)])[_0xc15d6b(0x19c)](_0xc15d6b(0x1d0)),'personId':_0x810bce[_0xc15d6b(0x1c3)]};}else{const _0x48fda1={'memberId':_0x322d65,'unitId':_0x4753cb,'content':_0x587e69,'mention':_0x5f25cb},_0x5c19a4=await this[_0xc15d6b(0x1cc)][_0xc15d6b(0x19e)](_0xc15d6b(0x1b0)+_0x4753cb+_0xc15d6b(0x1c0),{'body':_0x48fda1});return Y(_0x5c19a4[_0xc15d6b(0x1db)][_0xc15d6b(0x16f)],_0x5a3ca1);}}async[_0x4deb1c(0x187)](_0x1901f5){const _0x36e10a=_0x4deb1c;var _0x4b17fd,_0x2af6a3;const {text:_0x5bc7f3,unitId:_0x494964}=_0x1901f5,_0x39e2eb=(_0x2af6a3=(_0x4b17fd=_0x5bc7f3[_0x36e10a(0x1e1)])==null?void 0x0:_0x4b17fd[_0x36e10a(0x1dc)](_0x114d8c=>_0x114d8c[_0x36e10a(0x186)]===c['CustomRangeType']['COMMENT'])['map'](_0x3cdd42=>_0x3cdd42[_0x36e10a(0x1b8)]))!=null?_0x2af6a3:[],_0x3ac44e=JSON[_0x36e10a(0x188)](_0x5bc7f3),_0x5d84c3=_0x1901f5[_0x36e10a(0x168)],_0x37e2a0=_0x1901f5['id'],_0x33eade={'memberId':(await this[_0x36e10a(0x179)][_0x36e10a(0x1c5)](_0x494964))[_0x36e10a(0x1e2)](),'unitId':_0x494964,'threadId':_0x5d84c3,'mention':_0x39e2eb,'content':_0x3ac44e,'replyId':_0x37e2a0},_0x140ac6=await this[_0x36e10a(0x1cc)][_0x36e10a(0x19e)]('/universer-api/comment/unit/'+_0x494964+_0x36e10a(0x185),{'body':_0x33eade});return!_0x140ac6['body']['error']||_0x140ac6[_0x36e10a(0x1db)]['error'][_0x36e10a(0x17a)]===0x1;}async['resolveComment'](_0x96010e){const _0x167534=_0x4deb1c,{unitId:_0x54c9cd}=_0x96010e,_0x436ebf=_0x96010e[_0x167534(0x168)],_0x18e3b4={'memberId':this[_0x167534(0x15e)][_0x167534(0x1ca)]()[_0x167534(0x1b9)],'unitId':_0x54c9cd,'threadId':_0x436ebf,'solved':_0x96010e[_0x167534(0x189)]?I['Solved']:I[_0x167534(0x192)]},_0x1d1c52=await this['_httpService'][_0x167534(0x19e)](_0x167534(0x1b0)+_0x54c9cd+'/solved',{'body':_0x18e3b4});return!_0x1d1c52[_0x167534(0x1db)][_0x167534(0x1bc)]||_0x1d1c52[_0x167534(0x1db)][_0x167534(0x1bc)][_0x167534(0x17a)]===0x1;}async[_0x4deb1c(0x173)](_0x4053d0,_0x1fb42c,_0x415d6c,_0x1bcbef){const _0x52ee5b=_0x4deb1c,_0x49ef59={'memberId':(await this[_0x52ee5b(0x179)][_0x52ee5b(0x1c5)](_0x4053d0))[_0x52ee5b(0x1e2)](),'threadId':_0x415d6c,'replyId':_0x1bcbef,'unitId':_0x4053d0},_0x5f3abb=await this[_0x52ee5b(0x1cc)]['post'](_0x52ee5b(0x1b0)+_0x4053d0+_0x52ee5b(0x1b2),{'body':_0x49ef59});return!_0x5f3abb[_0x52ee5b(0x1db)][_0x52ee5b(0x1bc)]||_0x5f3abb['body'][_0x52ee5b(0x1bc)][_0x52ee5b(0x17a)]===0x1;}async[_0x4deb1c(0x1ba)](_0x37757d,_0x1cdb2a,_0x476991){const _0x4fa238=_0x4deb1c,_0x53d9ab={'unitId':_0x37757d,'threadId':_0x476991},_0x189087=await this[_0x4fa238(0x1cc)][_0x4fa238(0x19e)](_0x4fa238(0x1b0)+_0x37757d+_0x4fa238(0x1b3),{'body':_0x53d9ab}),_0x3c93cc=_0x476991[_0x4fa238(0x1d9)](_0x25aec9=>G(_0x189087[_0x4fa238(0x1db)][_0x4fa238(0x19b)][_0x25aec9],_0x37757d,_0x1cdb2a))['filter'](Boolean);return Object['values'](_0x189087['body']['users'])[_0x4fa238(0x1be)](_0x384791=>{const _0x103c85=_0x4fa238;this['_userService'][_0x103c85(0x1ae)](_0x384791);}),_0x3c93cc;}[_0x4deb1c(0x1a4)](_0x59aa02){const _0xad1d02=_0x4deb1c;return{'id':_0x59aa02['id'],'threadId':_0x59aa02[_0xad1d02(0x168)],'ref':_0x59aa02[_0xad1d02(0x1d3)]};}};function _0x3068(){const _0x20ba1e=['slice','_threadCommentDataSourceService','12895EkVcBS','unitId','_sessionService','code','pipe','Injector','getOwnPropertyDescriptor','length','size','UniverThreadCommentUIPlugin','parentId','COMMENT','content','UserManagerService','/edit','rangeType','updateComment','stringify','resolved','replyId','_configService','_threadCommentDataSource','_injector','Solved','Inject','UNRECOGNIZED','Plugin','OpenOrReOpen','Reply','syncUpdateMutationToColla','get','subscribe','@univerjs/core','add','commentUpdate$','55iDiWnI','comments','format','Add','post','Edit','onStarting','56aOzPmS','dayjs','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','859586uCzZqZ','CustomRangeType','UniverCollaborationClientPlugin','1746bcpSfQ','user','CollaborationSessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','resolveComment','addUser','269883eeNlCt','/universer-api/comment/unit/','solved','/delete','/list','delete','Solve','symbol','@univerjs-pro/license','rangeId','userID','listComments','_init','error','addComment','forEach','_threadCommentModel','/add','HTTPService','_initDataSource','userId','UniverLicensePlugin','requireSession','setConfig','payload','type','_initUserSync','getCurrentUser','disposeWithMe','_httpService','dataSource','1234009hdrFGb','51225NEMnTJ','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','defineProperty','ref','158736zIXJUz','parse','bufferTime','24FbSzQU','merge','map','2719816ZAwsYC','body','filter','rxjs','/reply','toStringTag','/universer-api/user/list','customRanges','getMemberID','pluginName','getUnit','_userService','onReady','users','IThreadCommentDataSourceService','_commentService','IConfigService','Disposable','350eHcoDE','find','UniverInstanceType','threadId','_config','@univerjs/thread-comment','UNIVER_UNKNOWN','createTimestamp','Module','root','comment','reply','Unknown','DependentOn','deleteComment','replies'];_0x3068=function(){return _0x20ba1e;};return _0x3068();}g=x([_(0x0,c[_0x4deb1c(0x18f)](P['HTTPService'])),_(0x1,c[_0x4deb1c(0x18f)](c['UserManagerService'])),_(0x2,c[_0x4deb1c(0x18f)](b[_0x4deb1c(0x1aa)])),_(0x3,c[_0x4deb1c(0x18f)](c[_0x4deb1c(0x17c)]))],g);var H=Object[_0x4deb1c(0x17d)],J=(_0x161935,_0x2173f0,_0x172e66,_0x35a0a1)=>{const _0x5b1bf3=_0x4deb1c;for(var _0x477ebe=_0x35a0a1>0x1?void 0x0:_0x35a0a1?H(_0x2173f0,_0x172e66):_0x2173f0,_0x409bd3=_0x161935[_0x5b1bf3(0x17e)]-0x1,_0x3ec163;_0x409bd3>=0x0;_0x409bd3--)(_0x3ec163=_0x161935[_0x409bd3])&&(_0x477ebe=_0x3ec163(_0x477ebe)||_0x477ebe);return _0x477ebe;},y=(_0x1a54ae,_0x105c94)=>(_0x78397b,_0x5932c1)=>_0x105c94(_0x78397b,_0x5932c1,_0x1a54ae);let C=class extends c[_0x4deb1c(0x164)]{constructor(_0x20c804,_0x346bce){const _0x57ff3a=_0x4deb1c;super(),this[_0x57ff3a(0x176)]=_0x20c804,this[_0x57ff3a(0x18c)]=_0x346bce,this[_0x57ff3a(0x1c2)]();}['_initDataSource'](){const _0x3f3135=_0x4deb1c;this['_threadCommentDataSourceService'][_0x3f3135(0x1cd)]=this[_0x3f3135(0x18c)],this[_0x3f3135(0x176)][_0x3f3135(0x194)]=!0x1;}};C=J([y(0x0,M[_0x4deb1c(0x161)]),y(0x1,c[_0x4deb1c(0x18f)](g))],C);var F=Object[_0x4deb1c(0x1d2)],L=Object[_0x4deb1c(0x17d)],Z=(_0x352015,_0x4c2311,_0x874d2f)=>_0x4c2311 in _0x352015?F(_0x352015,_0x4c2311,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x874d2f}):_0x352015[_0x4c2311]=_0x874d2f,W=(_0x376111,_0x18cdc4,_0x1c152d,_0x187f87)=>{const _0x4e4d36=_0x4deb1c;for(var _0xad2e6f=_0x187f87>0x1?void 0x0:_0x187f87?L(_0x18cdc4,_0x1c152d):_0x18cdc4,_0x22ef4b=_0x376111[_0x4e4d36(0x17e)]-0x1,_0x3803a9;_0x22ef4b>=0x0;_0x22ef4b--)(_0x3803a9=_0x376111[_0x22ef4b])&&(_0xad2e6f=_0x3803a9(_0xad2e6f)||_0xad2e6f);return _0xad2e6f;},O=(_0x533b7c,_0xd7ccd5)=>(_0x20cd7c,_0x2f7a6f)=>_0xd7ccd5(_0x20cd7c,_0x2f7a6f,_0x533b7c),N=(_0x5cf3d7,_0x564d7c,_0x3c4043)=>Z(_0x5cf3d7,typeof _0x564d7c!=_0x4deb1c(0x1b6)?_0x564d7c+'':_0x564d7c,_0x3c4043);function _0x4d64(_0xa99ae,_0x52f4bb){const _0x306821=_0x3068();return _0x4d64=function(_0x4d64e3,_0x5b12a4){_0x4d64e3=_0x4d64e3-0x15c;let _0x57ebb0=_0x306821[_0x4d64e3];return _0x57ebb0;},_0x4d64(_0xa99ae,_0x52f4bb);}exports[_0x4deb1c(0x1a3)]=class extends c[_0x4deb1c(0x191)]{constructor(_0x4c1d0e=D,_0x44c187,_0x1ca1a4){const _0x34e44e=_0x4deb1c;super(),this[_0x34e44e(0x169)]=_0x4c1d0e,this[_0x34e44e(0x18d)]=_0x44c187,this[_0x34e44e(0x18b)]=_0x1ca1a4;const {..._0x2551bd}=c[_0x34e44e(0x1d8)]({},D,this[_0x34e44e(0x169)]);this[_0x34e44e(0x18b)][_0x34e44e(0x1c6)](q,_0x2551bd);}[_0x4deb1c(0x1a0)](){const _0xbfadb8=_0x4deb1c;[[g],[C],[p]][_0xbfadb8(0x1be)](_0xde0635=>{const _0x1b4546=_0xbfadb8;this[_0x1b4546(0x18d)][_0x1b4546(0x198)](_0xde0635);});}[_0x4deb1c(0x15f)](){const _0x37d72b=_0x4deb1c;this['_injector'][_0x37d72b(0x195)](C),this[_0x37d72b(0x18d)][_0x37d72b(0x195)](p);}},N(exports[_0x4deb1c(0x1a3)],_0x4deb1c(0x15c),U),N(exports[_0x4deb1c(0x1a3)],_0x4deb1c(0x1c8),c[_0x4deb1c(0x167)][_0x4deb1c(0x16b)]),exports[_0x4deb1c(0x1a3)]=W([c[_0x4deb1c(0x172)](j[_0x4deb1c(0x180)],b[_0x4deb1c(0x1a7)],T[_0x4deb1c(0x1c4)]),O(0x1,c[_0x4deb1c(0x18f)](c[_0x4deb1c(0x17c)])),O(0x2,c[_0x4deb1c(0x163)])],exports[_0x4deb1c(0x1a3)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2ab71b=_0xe5c9;(function(_0x266013,_0x8de279){const _0x1576c5=_0xe5c9,_0x444791=_0x266013();while(!![]){try{const _0x3e38a0=-parseInt(_0x1576c5(0x146))/0x1+-parseInt(_0x1576c5(0x136))/0x2*(-parseInt(_0x1576c5(0x16c))/0x3)+-parseInt(_0x1576c5(0x13a))/0x4*(-parseInt(_0x1576c5(0x118))/0x5)+parseInt(_0x1576c5(0x161))/0x6+parseInt(_0x1576c5(0x112))/0x7+-parseInt(_0x1576c5(0x157))/0x8*(parseInt(_0x1576c5(0x135))/0x9)+parseInt(_0x1576c5(0x162))/0xa*(parseInt(_0x1576c5(0x129))/0xb);if(_0x3e38a0===_0x8de279)break;else _0x444791['push'](_0x444791['shift']());}catch(_0x2f0eff){_0x444791['push'](_0x444791['shift']());}}}(_0x1f39,0x4d455));import{CommentService as _0x4cdef4,CollaborationSessionService as _0x34e856,UniverCollaborationClientPlugin as _0x49c8f9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x333fa5}from'@univerjs-pro/license';function _0x1f39(){const _0x280914=['error','length','onStarting','/universer-api/comment/unit/','map','775072oYOPNH','_threadCommentDataSourceService','users','_init','Unknown','_sessionService','_threadCommentModel','commentUpdate$','OpenOrReOpen','Reply','3264270kABlkz','200090WOoNxP','_userService','getUser','addComment','_injector','userId','resolveComment','/delete','Edit','pluginName','3lxjtwU','replies','type','parse','Solve','code','saveCommentToSnapshot','Solved','get','972825FpJPmR','/add','_httpService','size','_threadCommentDataSource','getCurrentUser','25RcCvdM','UNIVER_UNKNOWN','/edit','stringify','UNRECOGNIZED','format','getMemberID','createTimestamp','getUnit','replyId','threadId','root','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','post','rangeId','77SuyDdU','disposeWithMe','deleteComment','_config','solved','slice','forEach','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','body','thread-comment-data-source.config','18gzaAnp','21106VaxnFT','resolved','userID','Delete','50476yvSJqQ','getOwnPropertyDescriptor','user','reply','_initDataSource','subscribe','addUser','pipe','add','unitId','find','COMMENT','386462bdhxtr','listComments','dataSource','payload','_initUserSync','_configService','/reply','_commentService','rangeType','updateComment','Add','content'];_0x1f39=function(){return _0x280914;};return _0x1f39();}import{dayjs as _0x3952b6,UserManagerService as _0x3d1032,Inject as _0x785250,Injector as _0x231213,Disposable as _0x607ca7,CustomRangeType as _0x5c9b14,UniverInstanceType as _0x35c6da,DependentOn as _0x5cc80e,IConfigService as _0x49ccea,Plugin as _0x5c0206,merge as _0x4eb6ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b3fcf}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2221fd,IThreadCommentDataSourceService as _0x50d9f5}from'@univerjs/thread-comment';import{bufferTime as _0x11dc46}from'rxjs';import{HTTPService as _0x497553}from'@univerjs/network';const W=_0x2ab71b(0x131);var I=(_0x6e12d2=>(_0x6e12d2[_0x6e12d2['OpenOrReOpen']=0x0]=_0x2ab71b(0x15f),_0x6e12d2[_0x6e12d2[_0x2ab71b(0x110)]=0x1]='Solved',_0x6e12d2[_0x6e12d2[_0x2ab71b(0x11c)]=-0x1]=_0x2ab71b(0x11c),_0x6e12d2))(I||{}),v=(_0x34cc17=>(_0x34cc17[_0x34cc17[_0x2ab71b(0x15b)]=0x0]='Unknown',_0x34cc17[_0x34cc17[_0x2ab71b(0x150)]=0x1]=_0x2ab71b(0x150),_0x34cc17[_0x34cc17[_0x2ab71b(0x160)]=0x2]=_0x2ab71b(0x160),_0x34cc17[_0x34cc17[_0x2ab71b(0x16a)]=0x3]=_0x2ab71b(0x16a),_0x34cc17[_0x34cc17[_0x2ab71b(0x139)]=0x4]='Delete',_0x34cc17[_0x34cc17[_0x2ab71b(0x10d)]=0x5]=_0x2ab71b(0x10d),_0x34cc17[_0x34cc17[_0x2ab71b(0x11c)]=-0x1]='UNRECOGNIZED',_0x34cc17))(v||{});const D=_0x2c2d05=>_0x3952b6(new Date(+_0x2c2d05))[_0x2ab71b(0x11d)](_0x2ab71b(0x125)),B=async(_0x192e7d,_0x2c134b)=>{const _0x452283=_0x2ab71b,_0x222c4b=_0x192e7d['get'](_0x3d1032),_0x1b0172=_0x192e7d[_0x452283(0x111)](_0x497553);_0x2c134b[_0x452283(0x12f)](_0x407d1a=>{const _0x3deb70=_0x452283;_0x222c4b[_0x3deb70(0x164)](_0x407d1a)&&_0x2c134b['delete'](_0x407d1a);}),_0x2c134b[_0x452283(0x115)]&&(await _0x1b0172[_0x452283(0x111)](_0x452283(0x124),{'params':{'userIDs':[..._0x2c134b]}}))[_0x452283(0x133)][_0x452283(0x159)][_0x452283(0x12f)](_0x1857f3=>{const _0x44032d=_0x452283;_0x1857f3&&_0x222c4b[_0x44032d(0x140)](_0x1857f3);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2891bd,_0x47c46f,_0x503d76,_0x42d8bc)=>{for(var _0x3924a7=_0x42d8bc>0x1?void 0x0:_0x42d8bc?K(_0x47c46f,_0x503d76):_0x47c46f,_0x181456=_0x2891bd['length']-0x1,_0x4f814c;_0x181456>=0x0;_0x181456--)(_0x4f814c=_0x2891bd[_0x181456])&&(_0x3924a7=_0x4f814c(_0x3924a7)||_0x3924a7);return _0x3924a7;},p=(_0x5450dc,_0x22afae)=>(_0x38f894,_0x29e217)=>_0x22afae(_0x38f894,_0x29e217,_0x5450dc);let S=class extends _0x607ca7{constructor(_0x5e3967,_0x2abae6,_0x262a1b,_0x3234c8){const _0x1e1c99=_0x2ab71b;super(),this['_commentService']=_0x5e3967,this['_threadCommentModel']=_0x2abae6,this[_0x1e1c99(0x163)]=_0x262a1b,this['_injector']=_0x3234c8,this[_0x1e1c99(0x15a)](),this[_0x1e1c99(0x14a)]();}[_0x2ab71b(0x14a)](){const _0x8b4d08=_0x2ab71b;this[_0x8b4d08(0x12a)](this[_0x8b4d08(0x15d)][_0x8b4d08(0x15e)][_0x8b4d08(0x141)](_0x11dc46(0x10))[_0x8b4d08(0x13f)](_0x18f49c=>{const _0x42f5e1=_0x8b4d08,_0x2afc62=new Set();_0x18f49c[_0x42f5e1(0x12f)](_0x3715bf=>{const _0x4ae1ed=_0x42f5e1;switch(_0x3715bf[_0x4ae1ed(0x10b)]){case'add':{const _0x25384f=_0x3715bf[_0x4ae1ed(0x149)]['personId'];_0x2afc62[_0x4ae1ed(0x142)](_0x25384f);break;}}}),B(this[_0x42f5e1(0x166)],_0x2afc62);}));}['_init'](){const _0xb54f3b=_0x2ab71b;this[_0xb54f3b(0x12a)](this[_0xb54f3b(0x14d)][_0xb54f3b(0x15e)][_0xb54f3b(0x13f)](async _0x2c6437=>{const _0x1c0a4a=_0xb54f3b;var _0x55917a,_0x121e41,_0x13a55d,_0x2f825c;const _0x44f035=(_0x55917a=this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x120)](_0x2c6437['unitId'])[_0x1c0a4a(0x144)](_0x519f97=>_0x519f97[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x55917a['root'];if(!_0x44f035)return;const {unitId:_0x510c7a,subUnitId:_0x1a84fa}=_0x44f035;switch(_0x2c6437[_0x1c0a4a(0x13c)]&&this['_userService'][_0x1c0a4a(0x140)](_0x2c6437[_0x1c0a4a(0x13c)]),_0x2c6437['type']){case v[_0x1c0a4a(0x150)]:break;case v['Reply']:{this['_threadCommentModel'][_0x1c0a4a(0x165)](_0x510c7a,_0x1a84fa,{'unitId':_0x510c7a,'subUnitId':_0x1a84fa,'ref':'','id':_0x2c6437[_0x1c0a4a(0x121)],'dT':D(+_0x2c6437[_0x1c0a4a(0x11f)]),'threadId':_0x2c6437[_0x1c0a4a(0x122)],'personId':(_0x13a55d=(_0x121e41=_0x2c6437[_0x1c0a4a(0x13c)])==null?void 0x0:_0x121e41[_0x1c0a4a(0x138)])!=null?_0x13a55d:_0x2c6437[_0x1c0a4a(0x167)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437['content']),'parentId':_0x44f035['id']});break;}case v[_0x1c0a4a(0x139)]:{const _0x35f50c=this[_0x1c0a4a(0x15d)]['getComment'](_0x510c7a,_0x1a84fa,_0x2c6437[_0x1c0a4a(0x121)]);_0x35f50c&&_0x35f50c['parentId']&&this[_0x1c0a4a(0x15d)]['deleteComment'](_0x510c7a,_0x1a84fa,_0x2c6437['replyId']);break;}case v['Edit']:{this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x14f)](_0x510c7a,_0x1a84fa,{'commentId':_0x2c6437[_0x1c0a4a(0x121)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437[_0x1c0a4a(0x151)])});break;}case v[_0x1c0a4a(0x10d)]:{const _0x4bb68e=(_0x2f825c=this['_threadCommentModel'][_0x1c0a4a(0x120)](_0x2c6437[_0x1c0a4a(0x143)])['find'](_0x25ee80=>_0x25ee80[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x2f825c[_0x1c0a4a(0x123)];_0x4bb68e&&this[_0x1c0a4a(0x15d)]['resolveComment'](_0x510c7a,_0x1a84fa,_0x4bb68e['id'],_0x2c6437[_0x1c0a4a(0x12d)]===I[_0x1c0a4a(0x110)]);break;}}}));}};S=V([p(0x0,_0x785250(_0x4cdef4)),p(0x1,_0x785250(_0x2221fd)),p(0x2,_0x785250(_0x3d1032)),p(0x3,_0x785250(_0x231213))],S);const z=_0x2ab71b(0x134),M={};var k=Object[_0x2ab71b(0x13b)],Q=(_0x448413,_0x4dd429,_0x5aba76,_0x458a5a)=>{for(var _0x5a44cb=_0x458a5a>0x1?void 0x0:_0x458a5a?k(_0x4dd429,_0x5aba76):_0x4dd429,_0x3f7c4e=_0x448413['length']-0x1,_0x244627;_0x3f7c4e>=0x0;_0x3f7c4e--)(_0x244627=_0x448413[_0x3f7c4e])&&(_0x5a44cb=_0x244627(_0x5a44cb)||_0x5a44cb);return _0x5a44cb;},_=(_0x431f82,_0x1b328e)=>(_0x7ad1bb,_0x57bcc2)=>_0x1b328e(_0x7ad1bb,_0x57bcc2,_0x431f82);function X(_0x40cec1,_0x23a5da){const _0x37b040=_0x2ab71b,_0x295796=_0x40cec1[_0x37b040(0x10a)][0x0];return{..._0x23a5da,'id':_0x295796[_0x37b040(0x121)],'resolved':_0x40cec1[_0x37b040(0x12d)]===0x1,'dT':D(_0x295796['createTimestamp']),'personId':_0x295796[_0x37b040(0x167)],'threadId':_0x295796['threadId']};}function ee(_0x4bbebc,_0x32121d,_0x31ebe3){const _0x1bac32=_0x2ab71b;var _0x9c239,_0x36553e;if(((_0x36553e=(_0x9c239=_0x4bbebc==null?void 0x0:_0x4bbebc['replies'])==null?void 0x0:_0x9c239[_0x1bac32(0x153)])!=null?_0x36553e:0x0)>0x0){const _0x65048b=(_0xcd6b10,_0x1f5ff8)=>({'id':_0xcd6b10[_0x1bac32(0x121)],'threadId':_0xcd6b10[_0x1bac32(0x122)],'dT':D(_0xcd6b10[_0x1bac32(0x11f)]),'personId':_0xcd6b10[_0x1bac32(0x167)],'resolved':_0x4bbebc[_0x1bac32(0x12d)]===I[_0x1bac32(0x110)],'unitId':_0x32121d,'subUnitId':_0x31ebe3,'text':JSON[_0x1bac32(0x10c)](_0xcd6b10[_0x1bac32(0x151)]),'parentId':_0x1f5ff8}),_0x4fa81a=_0x65048b(_0x4bbebc[_0x1bac32(0x10a)][0x0]);return{..._0x4fa81a,'children':_0x4bbebc[_0x1bac32(0x10a)][_0x1bac32(0x12e)](0x1)[_0x1bac32(0x156)](_0x39c81e=>_0x65048b(_0x39c81e,_0x4fa81a['id']))};}return null;}let f=class{constructor(_0x50369f,_0x1c91d5,_0xf4144b,_0x16a90a){const _0x14d095=_0x2ab71b;this[_0x14d095(0x114)]=_0x50369f,this[_0x14d095(0x163)]=_0x1c91d5,this['_sessionService']=_0xf4144b,this['_injector']=_0x16a90a;}async[_0x2ab71b(0x165)](_0x56f6ce){const _0x5b06c3=_0x2ab71b;var _0x843a9d,_0x4fe080;const {parentId:_0x522ad4,unitId:_0x529dae,text:_0xbc760b,threadId:_0x507d49}=_0x56f6ce,_0x5eaca5=(_0x4fe080=(_0x843a9d=_0xbc760b['customRanges'])==null?void 0x0:_0x843a9d['filter'](_0x338726=>_0x338726[_0x5b06c3(0x14e)]===_0x5c9b14[_0x5b06c3(0x145)])[_0x5b06c3(0x156)](_0x1b674f=>_0x1b674f[_0x5b06c3(0x128)]))!=null?_0x4fe080:[],_0x203908=JSON[_0x5b06c3(0x11b)](_0xbc760b),_0x458c0f=(await this[_0x5b06c3(0x15c)]['requireSession'](_0x529dae))[_0x5b06c3(0x11e)]();if(_0x522ad4){const _0x16eb72={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5,'threadId':_0x507d49},_0x124c02=(await this['_httpService']['post'](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x14c),{'body':_0x16eb72}))[_0x5b06c3(0x133)][_0x5b06c3(0x13d)];return{..._0x56f6ce,'id':_0x124c02[_0x5b06c3(0x121)],'dT':_0x3952b6(+_0x124c02[_0x5b06c3(0x11f)])['format'](_0x5b06c3(0x125)),'personId':_0x124c02[_0x5b06c3(0x167)]};}else{const _0x24321f={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5},_0x19e4e5=await this['_httpService'][_0x5b06c3(0x127)](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x113),{'body':_0x24321f});return X(_0x19e4e5[_0x5b06c3(0x133)]['comment'],_0x56f6ce);}}async[_0x2ab71b(0x14f)](_0x6b2394){const _0xfd8253=_0x2ab71b;var _0x1523fb,_0x1031d6;const {text:_0x546299,unitId:_0x196f86}=_0x6b2394,_0x12f852=(_0x1031d6=(_0x1523fb=_0x546299['customRanges'])==null?void 0x0:_0x1523fb[_0xfd8253(0x132)](_0x3685a5=>_0x3685a5[_0xfd8253(0x14e)]===_0x5c9b14['COMMENT'])[_0xfd8253(0x156)](_0x5f153a=>_0x5f153a[_0xfd8253(0x128)]))!=null?_0x1031d6:[],_0x1ae3dc=JSON[_0xfd8253(0x11b)](_0x546299),_0x5516f2=_0x6b2394[_0xfd8253(0x122)],_0x449577=_0x6b2394['id'],_0x40ea38={'memberId':(await this[_0xfd8253(0x15c)]['requireSession'](_0x196f86))['getMemberID'](),'unitId':_0x196f86,'threadId':_0x5516f2,'mention':_0x12f852,'content':_0x1ae3dc,'replyId':_0x449577},_0x2bf93d=await this[_0xfd8253(0x114)]['post'](_0xfd8253(0x155)+_0x196f86+_0xfd8253(0x11a),{'body':_0x40ea38});return!_0x2bf93d[_0xfd8253(0x133)][_0xfd8253(0x152)]||_0x2bf93d['body'][_0xfd8253(0x152)][_0xfd8253(0x10e)]===0x1;}async[_0x2ab71b(0x168)](_0x4bb8ef){const _0x312e98=_0x2ab71b,{unitId:_0x1dcf95}=_0x4bb8ef,_0x4fd8e4=_0x4bb8ef[_0x312e98(0x122)],_0x268b4d={'memberId':this[_0x312e98(0x163)][_0x312e98(0x117)]()['userID'],'unitId':_0x1dcf95,'threadId':_0x4fd8e4,'solved':_0x4bb8ef[_0x312e98(0x137)]?I['Solved']:I[_0x312e98(0x15f)]},_0x5b2eae=await this['_httpService'][_0x312e98(0x127)](_0x312e98(0x155)+_0x1dcf95+'/solved',{'body':_0x268b4d});return!_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)]||_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)][_0x312e98(0x10e)]===0x1;}async[_0x2ab71b(0x12b)](_0x455186,_0x22db3d,_0x185ec1,_0x4ab50b){const _0x223ee2=_0x2ab71b,_0xafe0e8={'memberId':(await this['_sessionService']['requireSession'](_0x455186))['getMemberID'](),'threadId':_0x185ec1,'replyId':_0x4ab50b,'unitId':_0x455186},_0x1ad951=await this[_0x223ee2(0x114)]['post'](_0x223ee2(0x155)+_0x455186+_0x223ee2(0x169),{'body':_0xafe0e8});return!_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]||_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]['code']===0x1;}async[_0x2ab71b(0x147)](_0xeec0d3,_0x3e733d,_0x47d842){const _0x4e5d07=_0x2ab71b,_0x35d037={'unitId':_0xeec0d3,'threadId':_0x47d842},_0xc7fa44=await this[_0x4e5d07(0x114)][_0x4e5d07(0x127)](_0x4e5d07(0x155)+_0xeec0d3+'/list',{'body':_0x35d037}),_0x36445f=_0x47d842['map'](_0x5c4c53=>ee(_0xc7fa44['body']['comments'][_0x5c4c53],_0xeec0d3,_0x3e733d))['filter'](Boolean);return Object['values'](_0xc7fa44[_0x4e5d07(0x133)]['users'])[_0x4e5d07(0x12f)](_0x23e15c=>{const _0x32b23e=_0x4e5d07;this[_0x32b23e(0x163)][_0x32b23e(0x140)](_0x23e15c);}),_0x36445f;}[_0x2ab71b(0x10f)](_0x1c0d1e){const _0x78531e=_0x2ab71b;return{'id':_0x1c0d1e['id'],'threadId':_0x1c0d1e[_0x78531e(0x122)],'ref':_0x1c0d1e['ref']};}};f=Q([_(0x0,_0x785250(_0x497553)),_(0x1,_0x785250(_0x3d1032)),_(0x2,_0x785250(_0x34e856)),_(0x3,_0x785250(_0x231213))],f);var re=Object[_0x2ab71b(0x13b)],te=(_0xee91bb,_0x235a59,_0x52de03,_0x28f217)=>{const _0x33cd5f=_0x2ab71b;for(var _0x1ddc58=_0x28f217>0x1?void 0x0:_0x28f217?re(_0x235a59,_0x52de03):_0x235a59,_0x46c8dd=_0xee91bb[_0x33cd5f(0x153)]-0x1,_0x5b236d;_0x46c8dd>=0x0;_0x46c8dd--)(_0x5b236d=_0xee91bb[_0x46c8dd])&&(_0x1ddc58=_0x5b236d(_0x1ddc58)||_0x1ddc58);return _0x1ddc58;},N=(_0x3bc0bf,_0x503314)=>(_0x2f4b4a,_0x62c6da)=>_0x503314(_0x2f4b4a,_0x62c6da,_0x3bc0bf);let g=class extends _0x607ca7{constructor(_0x496bfb,_0x18d088){const _0x12107a=_0x2ab71b;super(),this[_0x12107a(0x158)]=_0x496bfb,this[_0x12107a(0x116)]=_0x18d088,this['_initDataSource']();}[_0x2ab71b(0x13e)](){const _0x78f09c=_0x2ab71b;this[_0x78f09c(0x158)][_0x78f09c(0x148)]=this['_threadCommentDataSource'],this[_0x78f09c(0x158)][_0x78f09c(0x126)]=!0x1;}};g=te([N(0x0,_0x50d9f5),N(0x1,_0x785250(f))],g);var se=Object[_0x2ab71b(0x130)],oe=Object[_0x2ab71b(0x13b)],ne=(_0x5afe2e,_0x297d62,_0x4e0b46)=>_0x297d62 in _0x5afe2e?se(_0x5afe2e,_0x297d62,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e0b46}):_0x5afe2e[_0x297d62]=_0x4e0b46,ie=(_0x5ccbe7,_0x290ef1,_0x3e4c99,_0x15879e)=>{const _0x541509=_0x2ab71b;for(var _0x98df6b=_0x15879e>0x1?void 0x0:_0x15879e?oe(_0x290ef1,_0x3e4c99):_0x290ef1,_0x5e6139=_0x5ccbe7[_0x541509(0x153)]-0x1,_0x2fba5a;_0x5e6139>=0x0;_0x5e6139--)(_0x2fba5a=_0x5ccbe7[_0x5e6139])&&(_0x98df6b=_0x2fba5a(_0x98df6b)||_0x98df6b);return _0x98df6b;},w=(_0xea0248,_0x358841)=>(_0x3e97ed,_0x58bffa)=>_0x358841(_0x3e97ed,_0x58bffa,_0xea0248),$=(_0x17b0d1,_0x5711cb,_0x4b0b5f)=>ne(_0x17b0d1,typeof _0x5711cb!='symbol'?_0x5711cb+'':_0x5711cb,_0x4b0b5f);function _0xe5c9(_0x4a38c2,_0x8d6108){const _0x1f394c=_0x1f39();return _0xe5c9=function(_0xe5c9ee,_0x7ac369){_0xe5c9ee=_0xe5c9ee-0x10a;let _0x48fc34=_0x1f394c[_0xe5c9ee];return _0x48fc34;},_0xe5c9(_0x4a38c2,_0x8d6108);}let b=class extends _0x5c0206{constructor(_0x495a2a=M,_0x37133d,_0x36f526){const _0x47243e=_0x2ab71b;super(),this['_config']=_0x495a2a,this['_injector']=_0x37133d,this[_0x47243e(0x14b)]=_0x36f526;const {..._0x4ed11a}=_0x4eb6ff({},M,this[_0x47243e(0x12c)]);this['_configService']['setConfig'](z,_0x4ed11a);}[_0x2ab71b(0x154)](){const _0x4bd321=_0x2ab71b;[[f],[g],[S]][_0x4bd321(0x12f)](_0x22db10=>{const _0x353cae=_0x4bd321;this[_0x353cae(0x166)][_0x353cae(0x142)](_0x22db10);});}['onReady'](){const _0x2ef20d=_0x2ab71b;this[_0x2ef20d(0x166)][_0x2ef20d(0x111)](g),this[_0x2ef20d(0x166)]['get'](S);}};$(b,_0x2ab71b(0x16b),W),$(b,_0x2ab71b(0x10b),_0x35c6da[_0x2ab71b(0x119)]),b=ie([_0x5cc80e(_0x5b3fcf,_0x49c8f9,_0x333fa5),w(0x1,_0x785250(_0x231213)),w(0x2,_0x49ccea)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4e76f=_0x173a;(function(_0x226cbb,_0x41b0f0){const _0x5cf68d=_0x173a,_0x4e1a76=_0x226cbb();while(!![]){try{const _0x46f023=-parseInt(_0x5cf68d(0x16f))/0x1+parseInt(_0x5cf68d(0x123))/0x2+parseInt(_0x5cf68d(0x137))/0x3*(parseInt(_0x5cf68d(0x12d))/0x4)+-parseInt(_0x5cf68d(0x146))/0x5*(-parseInt(_0x5cf68d(0x14d))/0x6)+parseInt(_0x5cf68d(0x151))/0x7*(parseInt(_0x5cf68d(0x121))/0x8)+parseInt(_0x5cf68d(0x13c))/0x9+-parseInt(_0x5cf68d(0x16b))/0xa;if(_0x46f023===_0x41b0f0)break;else _0x4e1a76['push'](_0x4e1a76['shift']());}catch(_0x1d1506){_0x4e1a76['push'](_0x4e1a76['shift']());}}}(_0x2a00,0xc36c6));import{CommentService as _0x3fd827,CollaborationSessionService as _0x312cb8,UniverCollaborationClientPlugin as _0xe00712}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e497f}from'@univerjs-pro/license';import{dayjs as _0x21bb25,UserManagerService as _0x516a13,Inject as _0x113b48,Injector as _0x130087,Disposable as _0x311500,CustomRangeType as _0x488275,UniverInstanceType as _0x414e33,DependentOn as _0x14f0d8,IConfigService as _0x40717c,Plugin as _0x177895,merge as _0x1d1215}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x322bae}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfb0986,IThreadCommentDataSourceService as _0x2a9349}from'@univerjs/thread-comment';import{bufferTime as _0x25c191}from'rxjs';function _0x173a(_0x3780c3,_0x26751c){const _0x2a009d=_0x2a00();return _0x173a=function(_0x173a32,_0x1aada5){_0x173a32=_0x173a32-0x113;let _0x547450=_0x2a009d[_0x173a32];return _0x547450;},_0x173a(_0x3780c3,_0x26751c);}import{HTTPService as _0x28d87b}from'@univerjs/network';const W=_0x4e76f(0x156);var I=(_0x51b954=>(_0x51b954[_0x51b954['OpenOrReOpen']=0x0]=_0x4e76f(0x169),_0x51b954[_0x51b954[_0x4e76f(0x154)]=0x1]=_0x4e76f(0x154),_0x51b954[_0x51b954[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51b954))(I||{}),v=(_0x51af3c=>(_0x51af3c[_0x51af3c[_0x4e76f(0x162)]=0x0]=_0x4e76f(0x162),_0x51af3c[_0x51af3c[_0x4e76f(0x16a)]=0x1]='Add',_0x51af3c[_0x51af3c[_0x4e76f(0x171)]=0x2]=_0x4e76f(0x171),_0x51af3c[_0x51af3c[_0x4e76f(0x12c)]=0x3]=_0x4e76f(0x12c),_0x51af3c[_0x51af3c[_0x4e76f(0x114)]=0x4]=_0x4e76f(0x114),_0x51af3c[_0x51af3c['Solve']=0x5]=_0x4e76f(0x178),_0x51af3c[_0x51af3c[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51af3c))(v||{});const D=_0x250c87=>_0x21bb25(new Date(+_0x250c87))[_0x4e76f(0x11b)](_0x4e76f(0x142)),B=async(_0x23e660,_0x170f3f)=>{const _0x2d9366=_0x4e76f,_0x3f3df0=_0x23e660[_0x2d9366(0x144)](_0x516a13),_0x1b1eb1=_0x23e660['get'](_0x28d87b);_0x170f3f[_0x2d9366(0x160)](_0x3c1cd7=>{const _0x3955d9=_0x2d9366;_0x3f3df0[_0x3955d9(0x143)](_0x3c1cd7)&&_0x170f3f[_0x3955d9(0x16d)](_0x3c1cd7);}),_0x170f3f[_0x2d9366(0x167)]&&(await _0x1b1eb1[_0x2d9366(0x144)](_0x2d9366(0x179),{'params':{'userIDs':[..._0x170f3f]}}))[_0x2d9366(0x130)]['users'][_0x2d9366(0x160)](_0x182a19=>{const _0x1e0345=_0x2d9366;_0x182a19&&_0x3f3df0[_0x1e0345(0x177)](_0x182a19);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dc74d,_0x4ac995,_0x3bbf85,_0x5020ff)=>{const _0x5cd43f=_0x4e76f;for(var _0x3bbe85=_0x5020ff>0x1?void 0x0:_0x5020ff?K(_0x4ac995,_0x3bbf85):_0x4ac995,_0x223f4d=_0x5dc74d[_0x5cd43f(0x14b)]-0x1,_0x4f7810;_0x223f4d>=0x0;_0x223f4d--)(_0x4f7810=_0x5dc74d[_0x223f4d])&&(_0x3bbe85=_0x4f7810(_0x3bbe85)||_0x3bbe85);return _0x3bbe85;},p=(_0x208eed,_0x5cbabf)=>(_0x5b8c18,_0x55544b)=>_0x5cbabf(_0x5b8c18,_0x55544b,_0x208eed);let S=class extends _0x311500{constructor(_0x38059a,_0x5434c7,_0x41ef4f,_0x4082f1){const _0x3128e7=_0x4e76f;super(),this[_0x3128e7(0x157)]=_0x38059a,this[_0x3128e7(0x118)]=_0x5434c7,this[_0x3128e7(0x124)]=_0x41ef4f,this['_injector']=_0x4082f1,this[_0x3128e7(0x134)](),this[_0x3128e7(0x163)]();}[_0x4e76f(0x163)](){const _0x1313d3=_0x4e76f;this['disposeWithMe'](this[_0x1313d3(0x118)][_0x1313d3(0x155)][_0x1313d3(0x127)](_0x25c191(0x10))['subscribe'](_0x37593a=>{const _0x3221bc=_0x1313d3,_0x235850=new Set();_0x37593a[_0x3221bc(0x160)](_0x16a2c6=>{const _0x22ba9c=_0x3221bc;switch(_0x16a2c6[_0x22ba9c(0x120)]){case _0x22ba9c(0x161):{const _0x52a32b=_0x16a2c6[_0x22ba9c(0x15d)]['personId'];_0x235850[_0x22ba9c(0x161)](_0x52a32b);break;}}}),B(this[_0x3221bc(0x11e)],_0x235850);}));}[_0x4e76f(0x134)](){const _0x197da0=_0x4e76f;this[_0x197da0(0x13a)](this[_0x197da0(0x157)][_0x197da0(0x155)][_0x197da0(0x14f)](async _0x323457=>{const _0x1a59c3=_0x197da0;var _0x4a5272,_0x44c8fa,_0x4a1a70,_0xb2ab84;const _0x489c20=(_0x4a5272=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457['unitId'])['find'](_0x2ee3cc=>_0x2ee3cc[_0x1a59c3(0x125)]===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0x4a5272[_0x1a59c3(0x14e)];if(!_0x489c20)return;const {unitId:_0xe1c271,subUnitId:_0x26414f}=_0x489c20;switch(_0x323457[_0x1a59c3(0x16e)]&&this[_0x1a59c3(0x124)]['addUser'](_0x323457['user']),_0x323457[_0x1a59c3(0x120)]){case v[_0x1a59c3(0x16a)]:break;case v[_0x1a59c3(0x171)]:{this['_threadCommentModel'][_0x1a59c3(0x168)](_0xe1c271,_0x26414f,{'unitId':_0xe1c271,'subUnitId':_0x26414f,'ref':'','id':_0x323457['replyId'],'dT':D(+_0x323457[_0x1a59c3(0x133)]),'threadId':_0x323457[_0x1a59c3(0x125)],'personId':(_0x4a1a70=(_0x44c8fa=_0x323457[_0x1a59c3(0x16e)])==null?void 0x0:_0x44c8fa[_0x1a59c3(0x15a)])!=null?_0x4a1a70:_0x323457[_0x1a59c3(0x17c)],'text':JSON[_0x1a59c3(0x128)](_0x323457[_0x1a59c3(0x170)]),'parentId':_0x489c20['id']});break;}case v['Delete']:{const _0x4f0f7e=this[_0x1a59c3(0x118)][_0x1a59c3(0x139)](_0xe1c271,_0x26414f,_0x323457[_0x1a59c3(0x131)]);_0x4f0f7e&&_0x4f0f7e[_0x1a59c3(0x11f)]&&this[_0x1a59c3(0x118)][_0x1a59c3(0x115)](_0xe1c271,_0x26414f,_0x323457['replyId']);break;}case v[_0x1a59c3(0x12c)]:{this['_threadCommentModel'][_0x1a59c3(0x158)](_0xe1c271,_0x26414f,{'commentId':_0x323457[_0x1a59c3(0x131)],'text':JSON[_0x1a59c3(0x128)](_0x323457['content'])});break;}case v[_0x1a59c3(0x178)]:{const _0x3bb8d5=(_0xb2ab84=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457[_0x1a59c3(0x12a)])[_0x1a59c3(0x148)](_0x5a32aa=>_0x5a32aa['threadId']===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0xb2ab84[_0x1a59c3(0x14e)];_0x3bb8d5&&this[_0x1a59c3(0x118)]['resolveComment'](_0xe1c271,_0x26414f,_0x3bb8d5['id'],_0x323457[_0x1a59c3(0x175)]===I[_0x1a59c3(0x154)]);break;}}}));}};S=V([p(0x0,_0x113b48(_0x3fd827)),p(0x1,_0x113b48(_0xfb0986)),p(0x2,_0x113b48(_0x516a13)),p(0x3,_0x113b48(_0x130087))],S);const z=_0x4e76f(0x126),M={};var k=Object[_0x4e76f(0x132)],Q=(_0x89db04,_0x215f04,_0x577efd,_0x1dd950)=>{const _0x483137=_0x4e76f;for(var _0x35bf35=_0x1dd950>0x1?void 0x0:_0x1dd950?k(_0x215f04,_0x577efd):_0x215f04,_0x2fc482=_0x89db04[_0x483137(0x14b)]-0x1,_0x4d377d;_0x2fc482>=0x0;_0x2fc482--)(_0x4d377d=_0x89db04[_0x2fc482])&&(_0x35bf35=_0x4d377d(_0x35bf35)||_0x35bf35);return _0x35bf35;},_=(_0x1d5945,_0x241dc2)=>(_0x17d376,_0xe16305)=>_0x241dc2(_0x17d376,_0xe16305,_0x1d5945);function X(_0x4c6d0a,_0xa08a1c){const _0x4169a0=_0x4e76f,_0x2b26a2=_0x4c6d0a[_0x4169a0(0x122)][0x0];return{..._0xa08a1c,'id':_0x2b26a2[_0x4169a0(0x131)],'resolved':_0x4c6d0a['solved']===0x1,'dT':D(_0x2b26a2[_0x4169a0(0x133)]),'personId':_0x2b26a2[_0x4169a0(0x17c)],'threadId':_0x2b26a2[_0x4169a0(0x125)]};}function ee(_0x50c8a3,_0x4f0d55,_0x414b48){const _0x4d921b=_0x4e76f;var _0x49551f,_0x48ff7b;if(((_0x48ff7b=(_0x49551f=_0x50c8a3==null?void 0x0:_0x50c8a3[_0x4d921b(0x122)])==null?void 0x0:_0x49551f['length'])!=null?_0x48ff7b:0x0)>0x0){const _0x1d275d=(_0x218bbb,_0x451fa5)=>({'id':_0x218bbb[_0x4d921b(0x131)],'threadId':_0x218bbb[_0x4d921b(0x125)],'dT':D(_0x218bbb[_0x4d921b(0x133)]),'personId':_0x218bbb[_0x4d921b(0x17c)],'resolved':_0x50c8a3[_0x4d921b(0x175)]===I[_0x4d921b(0x154)],'unitId':_0x4f0d55,'subUnitId':_0x414b48,'text':JSON[_0x4d921b(0x128)](_0x218bbb[_0x4d921b(0x170)]),'parentId':_0x451fa5}),_0x1dd06d=_0x1d275d(_0x50c8a3[_0x4d921b(0x122)][0x0]);return{..._0x1dd06d,'children':_0x50c8a3['replies']['slice'](0x1)['map'](_0x56f60f=>_0x1d275d(_0x56f60f,_0x1dd06d['id']))};}return null;}let f=class{constructor(_0x75dd6b,_0x2ca638,_0x3f2f8b,_0x194d57){const _0x588cb5=_0x4e76f;this[_0x588cb5(0x17a)]=_0x75dd6b,this[_0x588cb5(0x124)]=_0x2ca638,this[_0x588cb5(0x129)]=_0x3f2f8b,this['_injector']=_0x194d57;}async[_0x4e76f(0x168)](_0xa1fb67){const _0x32bffb=_0x4e76f;var _0x59adaa,_0x3adcc2;const {parentId:_0x15ec77,unitId:_0x5a2dd2,text:_0xd9a0ee,threadId:_0x7b6a91}=_0xa1fb67,_0x1130d8=(_0x3adcc2=(_0x59adaa=_0xd9a0ee['customRanges'])==null?void 0x0:_0x59adaa[_0x32bffb(0x15c)](_0x508ebc=>_0x508ebc[_0x32bffb(0x164)]===_0x488275[_0x32bffb(0x159)])[_0x32bffb(0x172)](_0x48505d=>_0x48505d['rangeId']))!=null?_0x3adcc2:[],_0x507721=JSON[_0x32bffb(0x13d)](_0xd9a0ee),_0xe05860=(await this[_0x32bffb(0x129)][_0x32bffb(0x152)](_0x5a2dd2))['getMemberID']();if(_0x15ec77){const _0x4a6aab={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8,'threadId':_0x7b6a91},_0x37d9cf=(await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x136),{'body':_0x4a6aab}))[_0x32bffb(0x130)][_0x32bffb(0x17d)];return{..._0xa1fb67,'id':_0x37d9cf[_0x32bffb(0x131)],'dT':_0x21bb25(+_0x37d9cf['createTimestamp'])[_0x32bffb(0x11b)](_0x32bffb(0x142)),'personId':_0x37d9cf[_0x32bffb(0x17c)]};}else{const _0x186775={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8},_0x4426f5=await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x113),{'body':_0x186775});return X(_0x4426f5[_0x32bffb(0x130)][_0x32bffb(0x116)],_0xa1fb67);}}async['updateComment'](_0x5cf13e){const _0x541960=_0x4e76f;var _0x33f1be,_0x153579;const {text:_0x565d58,unitId:_0x1320e2}=_0x5cf13e,_0x26ff26=(_0x153579=(_0x33f1be=_0x565d58[_0x541960(0x150)])==null?void 0x0:_0x33f1be['filter'](_0x528401=>_0x528401[_0x541960(0x164)]===_0x488275[_0x541960(0x159)])[_0x541960(0x172)](_0x32cb40=>_0x32cb40['rangeId']))!=null?_0x153579:[],_0x4b37ff=JSON['stringify'](_0x565d58),_0x4285fa=_0x5cf13e[_0x541960(0x125)],_0x3fb545=_0x5cf13e['id'],_0x1a05c8={'memberId':(await this[_0x541960(0x129)][_0x541960(0x152)](_0x1320e2))[_0x541960(0x174)](),'unitId':_0x1320e2,'threadId':_0x4285fa,'mention':_0x26ff26,'content':_0x4b37ff,'replyId':_0x3fb545},_0x590671=await this[_0x541960(0x17a)]['post'](_0x541960(0x176)+_0x1320e2+_0x541960(0x153),{'body':_0x1a05c8});return!_0x590671['body'][_0x541960(0x117)]||_0x590671[_0x541960(0x130)][_0x541960(0x117)][_0x541960(0x149)]===0x1;}async[_0x4e76f(0x15e)](_0x498879){const _0x53e844=_0x4e76f,{unitId:_0x269a30}=_0x498879,_0x527487=_0x498879[_0x53e844(0x125)],_0x157d06={'memberId':this[_0x53e844(0x124)][_0x53e844(0x141)]()['userID'],'unitId':_0x269a30,'threadId':_0x527487,'solved':_0x498879[_0x53e844(0x13e)]?I['Solved']:I[_0x53e844(0x169)]},_0x1891d9=await this['_httpService'][_0x53e844(0x135)](_0x53e844(0x176)+_0x269a30+'/solved',{'body':_0x157d06});return!_0x1891d9['body'][_0x53e844(0x117)]||_0x1891d9['body']['error'][_0x53e844(0x149)]===0x1;}async[_0x4e76f(0x115)](_0x11bde1,_0x52967a,_0x5228ae,_0x332692){const _0x12b8d9=_0x4e76f,_0x56c35d={'memberId':(await this['_sessionService'][_0x12b8d9(0x152)](_0x11bde1))[_0x12b8d9(0x174)](),'threadId':_0x5228ae,'replyId':_0x332692,'unitId':_0x11bde1},_0x384526=await this[_0x12b8d9(0x17a)][_0x12b8d9(0x135)](_0x12b8d9(0x176)+_0x11bde1+_0x12b8d9(0x11d),{'body':_0x56c35d});return!_0x384526['body']['error']||_0x384526[_0x12b8d9(0x130)][_0x12b8d9(0x117)][_0x12b8d9(0x149)]===0x1;}async[_0x4e76f(0x16c)](_0x34d9cd,_0x101f62,_0x3e0a73){const _0x1de798=_0x4e76f,_0x5049f8={'unitId':_0x34d9cd,'threadId':_0x3e0a73},_0xce298e=await this['_httpService']['post'](_0x1de798(0x176)+_0x34d9cd+'/list',{'body':_0x5049f8}),_0x280787=_0x3e0a73[_0x1de798(0x172)](_0x23a250=>ee(_0xce298e[_0x1de798(0x130)][_0x1de798(0x12e)][_0x23a250],_0x34d9cd,_0x101f62))[_0x1de798(0x15c)](Boolean);return Object[_0x1de798(0x147)](_0xce298e[_0x1de798(0x130)][_0x1de798(0x145)])['forEach'](_0x49c9b5=>{const _0x3e8a9b=_0x1de798;this['_userService'][_0x3e8a9b(0x177)](_0x49c9b5);}),_0x280787;}[_0x4e76f(0x13b)](_0x161504){const _0x232fe9=_0x4e76f;return{'id':_0x161504['id'],'threadId':_0x161504[_0x232fe9(0x125)],'ref':_0x161504[_0x232fe9(0x17b)]};}};f=Q([_(0x0,_0x113b48(_0x28d87b)),_(0x1,_0x113b48(_0x516a13)),_(0x2,_0x113b48(_0x312cb8)),_(0x3,_0x113b48(_0x130087))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x743fd8,_0x5cb16f,_0x2b0c63,_0x525290)=>{const _0x81cea0=_0x4e76f;for(var _0x29e226=_0x525290>0x1?void 0x0:_0x525290?re(_0x5cb16f,_0x2b0c63):_0x5cb16f,_0xa05e90=_0x743fd8[_0x81cea0(0x14b)]-0x1,_0x5460c2;_0xa05e90>=0x0;_0xa05e90--)(_0x5460c2=_0x743fd8[_0xa05e90])&&(_0x29e226=_0x5460c2(_0x29e226)||_0x29e226);return _0x29e226;},N=(_0x2b51f3,_0xa3ee79)=>(_0x37b244,_0x6ca17d)=>_0xa3ee79(_0x37b244,_0x6ca17d,_0x2b51f3);function _0x2a00(){const _0x1c3838=['COMMENT','userID','defineProperty','filter','payload','resolveComment','_threadCommentDataSourceService','forEach','add','Unknown','_initUserSync','rangeType','setConfig','onReady','size','addComment','OpenOrReOpen','Add','17189440RAJMBU','listComments','delete','user','6100CvjTcz','content','Reply','map','getUnit','getMemberID','solved','/universer-api/comment/unit/','addUser','Solve','/universer-api/user/list','_httpService','ref','userId','reply','/add','Delete','deleteComment','comment','error','_threadCommentModel','UNRECOGNIZED','_config','format','onStarting','/delete','_injector','parentId','type','4856JgUuPZ','replies','2965112BydwKc','_userService','threadId','thread-comment-data-source.config','pipe','parse','_sessionService','unitId','_configService','Edit','834004WfCspo','comments','symbol','body','replyId','getOwnPropertyDescriptor','createTimestamp','_init','post','/reply','12QEkJLH','UNIVER_UNKNOWN','getComment','disposeWithMe','saveCommentToSnapshot','734661HnJWAK','stringify','resolved','pluginName','dataSource','getCurrentUser','YYYY/MM/DD\x20HH:mm','getUser','get','users','107885GefCNY','values','find','code','_initDataSource','length','_threadCommentDataSource','30YGFUSM','root','subscribe','customRanges','224zdWAzQ','requireSession','/edit','Solved','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','updateComment'];_0x2a00=function(){return _0x1c3838;};return _0x2a00();}let g=class extends _0x311500{constructor(_0x216287,_0xb2ccf9){const _0x4289c8=_0x4e76f;super(),this[_0x4289c8(0x15f)]=_0x216287,this[_0x4289c8(0x14c)]=_0xb2ccf9,this[_0x4289c8(0x14a)]();}['_initDataSource'](){const _0x1c1695=_0x4e76f;this[_0x1c1695(0x15f)][_0x1c1695(0x140)]=this[_0x1c1695(0x14c)],this[_0x1c1695(0x15f)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2a9349),N(0x1,_0x113b48(f))],g);var se=Object[_0x4e76f(0x15b)],oe=Object[_0x4e76f(0x132)],ne=(_0x3394a7,_0xe46d86,_0x2eded9)=>_0xe46d86 in _0x3394a7?se(_0x3394a7,_0xe46d86,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eded9}):_0x3394a7[_0xe46d86]=_0x2eded9,ie=(_0x15999a,_0x5d8095,_0xc65a86,_0xfc9e27)=>{for(var _0x373b7f=_0xfc9e27>0x1?void 0x0:_0xfc9e27?oe(_0x5d8095,_0xc65a86):_0x5d8095,_0x20bca9=_0x15999a['length']-0x1,_0x17f830;_0x20bca9>=0x0;_0x20bca9--)(_0x17f830=_0x15999a[_0x20bca9])&&(_0x373b7f=_0x17f830(_0x373b7f)||_0x373b7f);return _0x373b7f;},w=(_0x23c853,_0x25fff0)=>(_0x280bd6,_0x276d71)=>_0x25fff0(_0x280bd6,_0x276d71,_0x23c853),$=(_0x464b68,_0x57af3e,_0x55247a)=>ne(_0x464b68,typeof _0x57af3e!=_0x4e76f(0x12f)?_0x57af3e+'':_0x57af3e,_0x55247a);let b=class extends _0x177895{constructor(_0x662cda=M,_0x2512d3,_0x13de20){const _0x187016=_0x4e76f;super(),this['_config']=_0x662cda,this[_0x187016(0x11e)]=_0x2512d3,this['_configService']=_0x13de20;const {..._0x40df12}=_0x1d1215({},M,this[_0x187016(0x11a)]);this[_0x187016(0x12b)][_0x187016(0x165)](z,_0x40df12);}[_0x4e76f(0x11c)](){const _0x589212=_0x4e76f;[[f],[g],[S]][_0x589212(0x160)](_0x1b8c43=>{const _0x2c55a7=_0x589212;this[_0x2c55a7(0x11e)][_0x2c55a7(0x161)](_0x1b8c43);});}[_0x4e76f(0x166)](){const _0x414fed=_0x4e76f;this['_injector'][_0x414fed(0x144)](g),this['_injector'][_0x414fed(0x144)](S);}};$(b,_0x4e76f(0x13f),W),$(b,_0x4e76f(0x120),_0x414e33[_0x4e76f(0x138)]),b=ie([_0x14f0d8(_0x322bae,_0xe00712,_0x1e497f),w(0x1,_0x113b48(_0x130087)),w(0x2,_0x40717c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2ab71b=_0xe5c9;(function(_0x266013,_0x8de279){const _0x1576c5=_0xe5c9,_0x444791=_0x266013();while(!![]){try{const _0x3e38a0=-parseInt(_0x1576c5(0x146))/0x1+-parseInt(_0x1576c5(0x136))/0x2*(-parseInt(_0x1576c5(0x16c))/0x3)+-parseInt(_0x1576c5(0x13a))/0x4*(-parseInt(_0x1576c5(0x118))/0x5)+parseInt(_0x1576c5(0x161))/0x6+parseInt(_0x1576c5(0x112))/0x7+-parseInt(_0x1576c5(0x157))/0x8*(parseInt(_0x1576c5(0x135))/0x9)+parseInt(_0x1576c5(0x162))/0xa*(parseInt(_0x1576c5(0x129))/0xb);if(_0x3e38a0===_0x8de279)break;else _0x444791['push'](_0x444791['shift']());}catch(_0x2f0eff){_0x444791['push'](_0x444791['shift']());}}}(_0x1f39,0x4d455));import{CommentService as _0x4cdef4,CollaborationSessionService as _0x34e856,UniverCollaborationClientPlugin as _0x49c8f9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x333fa5}from'@univerjs-pro/license';function _0x1f39(){const _0x280914=['error','length','onStarting','/universer-api/comment/unit/','map','775072oYOPNH','_threadCommentDataSourceService','users','_init','Unknown','_sessionService','_threadCommentModel','commentUpdate$','OpenOrReOpen','Reply','3264270kABlkz','200090WOoNxP','_userService','getUser','addComment','_injector','userId','resolveComment','/delete','Edit','pluginName','3lxjtwU','replies','type','parse','Solve','code','saveCommentToSnapshot','Solved','get','972825FpJPmR','/add','_httpService','size','_threadCommentDataSource','getCurrentUser','25RcCvdM','UNIVER_UNKNOWN','/edit','stringify','UNRECOGNIZED','format','getMemberID','createTimestamp','getUnit','replyId','threadId','root','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','post','rangeId','77SuyDdU','disposeWithMe','deleteComment','_config','solved','slice','forEach','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','body','thread-comment-data-source.config','18gzaAnp','21106VaxnFT','resolved','userID','Delete','50476yvSJqQ','getOwnPropertyDescriptor','user','reply','_initDataSource','subscribe','addUser','pipe','add','unitId','find','COMMENT','386462bdhxtr','listComments','dataSource','payload','_initUserSync','_configService','/reply','_commentService','rangeType','updateComment','Add','content'];_0x1f39=function(){return _0x280914;};return _0x1f39();}import{dayjs as _0x3952b6,UserManagerService as _0x3d1032,Inject as _0x785250,Injector as _0x231213,Disposable as _0x607ca7,CustomRangeType as _0x5c9b14,UniverInstanceType as _0x35c6da,DependentOn as _0x5cc80e,IConfigService as _0x49ccea,Plugin as _0x5c0206,merge as _0x4eb6ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b3fcf}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2221fd,IThreadCommentDataSourceService as _0x50d9f5}from'@univerjs/thread-comment';import{bufferTime as _0x11dc46}from'rxjs';import{HTTPService as _0x497553}from'@univerjs/network';const W=_0x2ab71b(0x131);var I=(_0x6e12d2=>(_0x6e12d2[_0x6e12d2['OpenOrReOpen']=0x0]=_0x2ab71b(0x15f),_0x6e12d2[_0x6e12d2[_0x2ab71b(0x110)]=0x1]='Solved',_0x6e12d2[_0x6e12d2[_0x2ab71b(0x11c)]=-0x1]=_0x2ab71b(0x11c),_0x6e12d2))(I||{}),v=(_0x34cc17=>(_0x34cc17[_0x34cc17[_0x2ab71b(0x15b)]=0x0]='Unknown',_0x34cc17[_0x34cc17[_0x2ab71b(0x150)]=0x1]=_0x2ab71b(0x150),_0x34cc17[_0x34cc17[_0x2ab71b(0x160)]=0x2]=_0x2ab71b(0x160),_0x34cc17[_0x34cc17[_0x2ab71b(0x16a)]=0x3]=_0x2ab71b(0x16a),_0x34cc17[_0x34cc17[_0x2ab71b(0x139)]=0x4]='Delete',_0x34cc17[_0x34cc17[_0x2ab71b(0x10d)]=0x5]=_0x2ab71b(0x10d),_0x34cc17[_0x34cc17[_0x2ab71b(0x11c)]=-0x1]='UNRECOGNIZED',_0x34cc17))(v||{});const D=_0x2c2d05=>_0x3952b6(new Date(+_0x2c2d05))[_0x2ab71b(0x11d)](_0x2ab71b(0x125)),B=async(_0x192e7d,_0x2c134b)=>{const _0x452283=_0x2ab71b,_0x222c4b=_0x192e7d['get'](_0x3d1032),_0x1b0172=_0x192e7d[_0x452283(0x111)](_0x497553);_0x2c134b[_0x452283(0x12f)](_0x407d1a=>{const _0x3deb70=_0x452283;_0x222c4b[_0x3deb70(0x164)](_0x407d1a)&&_0x2c134b['delete'](_0x407d1a);}),_0x2c134b[_0x452283(0x115)]&&(await _0x1b0172[_0x452283(0x111)](_0x452283(0x124),{'params':{'userIDs':[..._0x2c134b]}}))[_0x452283(0x133)][_0x452283(0x159)][_0x452283(0x12f)](_0x1857f3=>{const _0x44032d=_0x452283;_0x1857f3&&_0x222c4b[_0x44032d(0x140)](_0x1857f3);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2891bd,_0x47c46f,_0x503d76,_0x42d8bc)=>{for(var _0x3924a7=_0x42d8bc>0x1?void 0x0:_0x42d8bc?K(_0x47c46f,_0x503d76):_0x47c46f,_0x181456=_0x2891bd['length']-0x1,_0x4f814c;_0x181456>=0x0;_0x181456--)(_0x4f814c=_0x2891bd[_0x181456])&&(_0x3924a7=_0x4f814c(_0x3924a7)||_0x3924a7);return _0x3924a7;},p=(_0x5450dc,_0x22afae)=>(_0x38f894,_0x29e217)=>_0x22afae(_0x38f894,_0x29e217,_0x5450dc);let S=class extends _0x607ca7{constructor(_0x5e3967,_0x2abae6,_0x262a1b,_0x3234c8){const _0x1e1c99=_0x2ab71b;super(),this['_commentService']=_0x5e3967,this['_threadCommentModel']=_0x2abae6,this[_0x1e1c99(0x163)]=_0x262a1b,this['_injector']=_0x3234c8,this[_0x1e1c99(0x15a)](),this[_0x1e1c99(0x14a)]();}[_0x2ab71b(0x14a)](){const _0x8b4d08=_0x2ab71b;this[_0x8b4d08(0x12a)](this[_0x8b4d08(0x15d)][_0x8b4d08(0x15e)][_0x8b4d08(0x141)](_0x11dc46(0x10))[_0x8b4d08(0x13f)](_0x18f49c=>{const _0x42f5e1=_0x8b4d08,_0x2afc62=new Set();_0x18f49c[_0x42f5e1(0x12f)](_0x3715bf=>{const _0x4ae1ed=_0x42f5e1;switch(_0x3715bf[_0x4ae1ed(0x10b)]){case'add':{const _0x25384f=_0x3715bf[_0x4ae1ed(0x149)]['personId'];_0x2afc62[_0x4ae1ed(0x142)](_0x25384f);break;}}}),B(this[_0x42f5e1(0x166)],_0x2afc62);}));}['_init'](){const _0xb54f3b=_0x2ab71b;this[_0xb54f3b(0x12a)](this[_0xb54f3b(0x14d)][_0xb54f3b(0x15e)][_0xb54f3b(0x13f)](async _0x2c6437=>{const _0x1c0a4a=_0xb54f3b;var _0x55917a,_0x121e41,_0x13a55d,_0x2f825c;const _0x44f035=(_0x55917a=this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x120)](_0x2c6437['unitId'])[_0x1c0a4a(0x144)](_0x519f97=>_0x519f97[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x55917a['root'];if(!_0x44f035)return;const {unitId:_0x510c7a,subUnitId:_0x1a84fa}=_0x44f035;switch(_0x2c6437[_0x1c0a4a(0x13c)]&&this['_userService'][_0x1c0a4a(0x140)](_0x2c6437[_0x1c0a4a(0x13c)]),_0x2c6437['type']){case v[_0x1c0a4a(0x150)]:break;case v['Reply']:{this['_threadCommentModel'][_0x1c0a4a(0x165)](_0x510c7a,_0x1a84fa,{'unitId':_0x510c7a,'subUnitId':_0x1a84fa,'ref':'','id':_0x2c6437[_0x1c0a4a(0x121)],'dT':D(+_0x2c6437[_0x1c0a4a(0x11f)]),'threadId':_0x2c6437[_0x1c0a4a(0x122)],'personId':(_0x13a55d=(_0x121e41=_0x2c6437[_0x1c0a4a(0x13c)])==null?void 0x0:_0x121e41[_0x1c0a4a(0x138)])!=null?_0x13a55d:_0x2c6437[_0x1c0a4a(0x167)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437['content']),'parentId':_0x44f035['id']});break;}case v[_0x1c0a4a(0x139)]:{const _0x35f50c=this[_0x1c0a4a(0x15d)]['getComment'](_0x510c7a,_0x1a84fa,_0x2c6437[_0x1c0a4a(0x121)]);_0x35f50c&&_0x35f50c['parentId']&&this[_0x1c0a4a(0x15d)]['deleteComment'](_0x510c7a,_0x1a84fa,_0x2c6437['replyId']);break;}case v['Edit']:{this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x14f)](_0x510c7a,_0x1a84fa,{'commentId':_0x2c6437[_0x1c0a4a(0x121)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437[_0x1c0a4a(0x151)])});break;}case v[_0x1c0a4a(0x10d)]:{const _0x4bb68e=(_0x2f825c=this['_threadCommentModel'][_0x1c0a4a(0x120)](_0x2c6437[_0x1c0a4a(0x143)])['find'](_0x25ee80=>_0x25ee80[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x2f825c[_0x1c0a4a(0x123)];_0x4bb68e&&this[_0x1c0a4a(0x15d)]['resolveComment'](_0x510c7a,_0x1a84fa,_0x4bb68e['id'],_0x2c6437[_0x1c0a4a(0x12d)]===I[_0x1c0a4a(0x110)]);break;}}}));}};S=V([p(0x0,_0x785250(_0x4cdef4)),p(0x1,_0x785250(_0x2221fd)),p(0x2,_0x785250(_0x3d1032)),p(0x3,_0x785250(_0x231213))],S);const z=_0x2ab71b(0x134),M={};var k=Object[_0x2ab71b(0x13b)],Q=(_0x448413,_0x4dd429,_0x5aba76,_0x458a5a)=>{for(var _0x5a44cb=_0x458a5a>0x1?void 0x0:_0x458a5a?k(_0x4dd429,_0x5aba76):_0x4dd429,_0x3f7c4e=_0x448413['length']-0x1,_0x244627;_0x3f7c4e>=0x0;_0x3f7c4e--)(_0x244627=_0x448413[_0x3f7c4e])&&(_0x5a44cb=_0x244627(_0x5a44cb)||_0x5a44cb);return _0x5a44cb;},_=(_0x431f82,_0x1b328e)=>(_0x7ad1bb,_0x57bcc2)=>_0x1b328e(_0x7ad1bb,_0x57bcc2,_0x431f82);function X(_0x40cec1,_0x23a5da){const _0x37b040=_0x2ab71b,_0x295796=_0x40cec1[_0x37b040(0x10a)][0x0];return{..._0x23a5da,'id':_0x295796[_0x37b040(0x121)],'resolved':_0x40cec1[_0x37b040(0x12d)]===0x1,'dT':D(_0x295796['createTimestamp']),'personId':_0x295796[_0x37b040(0x167)],'threadId':_0x295796['threadId']};}function ee(_0x4bbebc,_0x32121d,_0x31ebe3){const _0x1bac32=_0x2ab71b;var _0x9c239,_0x36553e;if(((_0x36553e=(_0x9c239=_0x4bbebc==null?void 0x0:_0x4bbebc['replies'])==null?void 0x0:_0x9c239[_0x1bac32(0x153)])!=null?_0x36553e:0x0)>0x0){const _0x65048b=(_0xcd6b10,_0x1f5ff8)=>({'id':_0xcd6b10[_0x1bac32(0x121)],'threadId':_0xcd6b10[_0x1bac32(0x122)],'dT':D(_0xcd6b10[_0x1bac32(0x11f)]),'personId':_0xcd6b10[_0x1bac32(0x167)],'resolved':_0x4bbebc[_0x1bac32(0x12d)]===I[_0x1bac32(0x110)],'unitId':_0x32121d,'subUnitId':_0x31ebe3,'text':JSON[_0x1bac32(0x10c)](_0xcd6b10[_0x1bac32(0x151)]),'parentId':_0x1f5ff8}),_0x4fa81a=_0x65048b(_0x4bbebc[_0x1bac32(0x10a)][0x0]);return{..._0x4fa81a,'children':_0x4bbebc[_0x1bac32(0x10a)][_0x1bac32(0x12e)](0x1)[_0x1bac32(0x156)](_0x39c81e=>_0x65048b(_0x39c81e,_0x4fa81a['id']))};}return null;}let f=class{constructor(_0x50369f,_0x1c91d5,_0xf4144b,_0x16a90a){const _0x14d095=_0x2ab71b;this[_0x14d095(0x114)]=_0x50369f,this[_0x14d095(0x163)]=_0x1c91d5,this['_sessionService']=_0xf4144b,this['_injector']=_0x16a90a;}async[_0x2ab71b(0x165)](_0x56f6ce){const _0x5b06c3=_0x2ab71b;var _0x843a9d,_0x4fe080;const {parentId:_0x522ad4,unitId:_0x529dae,text:_0xbc760b,threadId:_0x507d49}=_0x56f6ce,_0x5eaca5=(_0x4fe080=(_0x843a9d=_0xbc760b['customRanges'])==null?void 0x0:_0x843a9d['filter'](_0x338726=>_0x338726[_0x5b06c3(0x14e)]===_0x5c9b14[_0x5b06c3(0x145)])[_0x5b06c3(0x156)](_0x1b674f=>_0x1b674f[_0x5b06c3(0x128)]))!=null?_0x4fe080:[],_0x203908=JSON[_0x5b06c3(0x11b)](_0xbc760b),_0x458c0f=(await this[_0x5b06c3(0x15c)]['requireSession'](_0x529dae))[_0x5b06c3(0x11e)]();if(_0x522ad4){const _0x16eb72={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5,'threadId':_0x507d49},_0x124c02=(await this['_httpService']['post'](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x14c),{'body':_0x16eb72}))[_0x5b06c3(0x133)][_0x5b06c3(0x13d)];return{..._0x56f6ce,'id':_0x124c02[_0x5b06c3(0x121)],'dT':_0x3952b6(+_0x124c02[_0x5b06c3(0x11f)])['format'](_0x5b06c3(0x125)),'personId':_0x124c02[_0x5b06c3(0x167)]};}else{const _0x24321f={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5},_0x19e4e5=await this['_httpService'][_0x5b06c3(0x127)](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x113),{'body':_0x24321f});return X(_0x19e4e5[_0x5b06c3(0x133)]['comment'],_0x56f6ce);}}async[_0x2ab71b(0x14f)](_0x6b2394){const _0xfd8253=_0x2ab71b;var _0x1523fb,_0x1031d6;const {text:_0x546299,unitId:_0x196f86}=_0x6b2394,_0x12f852=(_0x1031d6=(_0x1523fb=_0x546299['customRanges'])==null?void 0x0:_0x1523fb[_0xfd8253(0x132)](_0x3685a5=>_0x3685a5[_0xfd8253(0x14e)]===_0x5c9b14['COMMENT'])[_0xfd8253(0x156)](_0x5f153a=>_0x5f153a[_0xfd8253(0x128)]))!=null?_0x1031d6:[],_0x1ae3dc=JSON[_0xfd8253(0x11b)](_0x546299),_0x5516f2=_0x6b2394[_0xfd8253(0x122)],_0x449577=_0x6b2394['id'],_0x40ea38={'memberId':(await this[_0xfd8253(0x15c)]['requireSession'](_0x196f86))['getMemberID'](),'unitId':_0x196f86,'threadId':_0x5516f2,'mention':_0x12f852,'content':_0x1ae3dc,'replyId':_0x449577},_0x2bf93d=await this[_0xfd8253(0x114)]['post'](_0xfd8253(0x155)+_0x196f86+_0xfd8253(0x11a),{'body':_0x40ea38});return!_0x2bf93d[_0xfd8253(0x133)][_0xfd8253(0x152)]||_0x2bf93d['body'][_0xfd8253(0x152)][_0xfd8253(0x10e)]===0x1;}async[_0x2ab71b(0x168)](_0x4bb8ef){const _0x312e98=_0x2ab71b,{unitId:_0x1dcf95}=_0x4bb8ef,_0x4fd8e4=_0x4bb8ef[_0x312e98(0x122)],_0x268b4d={'memberId':this[_0x312e98(0x163)][_0x312e98(0x117)]()['userID'],'unitId':_0x1dcf95,'threadId':_0x4fd8e4,'solved':_0x4bb8ef[_0x312e98(0x137)]?I['Solved']:I[_0x312e98(0x15f)]},_0x5b2eae=await this['_httpService'][_0x312e98(0x127)](_0x312e98(0x155)+_0x1dcf95+'/solved',{'body':_0x268b4d});return!_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)]||_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)][_0x312e98(0x10e)]===0x1;}async[_0x2ab71b(0x12b)](_0x455186,_0x22db3d,_0x185ec1,_0x4ab50b){const _0x223ee2=_0x2ab71b,_0xafe0e8={'memberId':(await this['_sessionService']['requireSession'](_0x455186))['getMemberID'](),'threadId':_0x185ec1,'replyId':_0x4ab50b,'unitId':_0x455186},_0x1ad951=await this[_0x223ee2(0x114)]['post'](_0x223ee2(0x155)+_0x455186+_0x223ee2(0x169),{'body':_0xafe0e8});return!_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]||_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]['code']===0x1;}async[_0x2ab71b(0x147)](_0xeec0d3,_0x3e733d,_0x47d842){const _0x4e5d07=_0x2ab71b,_0x35d037={'unitId':_0xeec0d3,'threadId':_0x47d842},_0xc7fa44=await this[_0x4e5d07(0x114)][_0x4e5d07(0x127)](_0x4e5d07(0x155)+_0xeec0d3+'/list',{'body':_0x35d037}),_0x36445f=_0x47d842['map'](_0x5c4c53=>ee(_0xc7fa44['body']['comments'][_0x5c4c53],_0xeec0d3,_0x3e733d))['filter'](Boolean);return Object['values'](_0xc7fa44[_0x4e5d07(0x133)]['users'])[_0x4e5d07(0x12f)](_0x23e15c=>{const _0x32b23e=_0x4e5d07;this[_0x32b23e(0x163)][_0x32b23e(0x140)](_0x23e15c);}),_0x36445f;}[_0x2ab71b(0x10f)](_0x1c0d1e){const _0x78531e=_0x2ab71b;return{'id':_0x1c0d1e['id'],'threadId':_0x1c0d1e[_0x78531e(0x122)],'ref':_0x1c0d1e['ref']};}};f=Q([_(0x0,_0x785250(_0x497553)),_(0x1,_0x785250(_0x3d1032)),_(0x2,_0x785250(_0x34e856)),_(0x3,_0x785250(_0x231213))],f);var re=Object[_0x2ab71b(0x13b)],te=(_0xee91bb,_0x235a59,_0x52de03,_0x28f217)=>{const _0x33cd5f=_0x2ab71b;for(var _0x1ddc58=_0x28f217>0x1?void 0x0:_0x28f217?re(_0x235a59,_0x52de03):_0x235a59,_0x46c8dd=_0xee91bb[_0x33cd5f(0x153)]-0x1,_0x5b236d;_0x46c8dd>=0x0;_0x46c8dd--)(_0x5b236d=_0xee91bb[_0x46c8dd])&&(_0x1ddc58=_0x5b236d(_0x1ddc58)||_0x1ddc58);return _0x1ddc58;},N=(_0x3bc0bf,_0x503314)=>(_0x2f4b4a,_0x62c6da)=>_0x503314(_0x2f4b4a,_0x62c6da,_0x3bc0bf);let g=class extends _0x607ca7{constructor(_0x496bfb,_0x18d088){const _0x12107a=_0x2ab71b;super(),this[_0x12107a(0x158)]=_0x496bfb,this[_0x12107a(0x116)]=_0x18d088,this['_initDataSource']();}[_0x2ab71b(0x13e)](){const _0x78f09c=_0x2ab71b;this[_0x78f09c(0x158)][_0x78f09c(0x148)]=this['_threadCommentDataSource'],this[_0x78f09c(0x158)][_0x78f09c(0x126)]=!0x1;}};g=te([N(0x0,_0x50d9f5),N(0x1,_0x785250(f))],g);var se=Object[_0x2ab71b(0x130)],oe=Object[_0x2ab71b(0x13b)],ne=(_0x5afe2e,_0x297d62,_0x4e0b46)=>_0x297d62 in _0x5afe2e?se(_0x5afe2e,_0x297d62,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e0b46}):_0x5afe2e[_0x297d62]=_0x4e0b46,ie=(_0x5ccbe7,_0x290ef1,_0x3e4c99,_0x15879e)=>{const _0x541509=_0x2ab71b;for(var _0x98df6b=_0x15879e>0x1?void 0x0:_0x15879e?oe(_0x290ef1,_0x3e4c99):_0x290ef1,_0x5e6139=_0x5ccbe7[_0x541509(0x153)]-0x1,_0x2fba5a;_0x5e6139>=0x0;_0x5e6139--)(_0x2fba5a=_0x5ccbe7[_0x5e6139])&&(_0x98df6b=_0x2fba5a(_0x98df6b)||_0x98df6b);return _0x98df6b;},w=(_0xea0248,_0x358841)=>(_0x3e97ed,_0x58bffa)=>_0x358841(_0x3e97ed,_0x58bffa,_0xea0248),$=(_0x17b0d1,_0x5711cb,_0x4b0b5f)=>ne(_0x17b0d1,typeof _0x5711cb!='symbol'?_0x5711cb+'':_0x5711cb,_0x4b0b5f);function _0xe5c9(_0x4a38c2,_0x8d6108){const _0x1f394c=_0x1f39();return _0xe5c9=function(_0xe5c9ee,_0x7ac369){_0xe5c9ee=_0xe5c9ee-0x10a;let _0x48fc34=_0x1f394c[_0xe5c9ee];return _0x48fc34;},_0xe5c9(_0x4a38c2,_0x8d6108);}let b=class extends _0x5c0206{constructor(_0x495a2a=M,_0x37133d,_0x36f526){const _0x47243e=_0x2ab71b;super(),this['_config']=_0x495a2a,this['_injector']=_0x37133d,this[_0x47243e(0x14b)]=_0x36f526;const {..._0x4ed11a}=_0x4eb6ff({},M,this[_0x47243e(0x12c)]);this['_configService']['setConfig'](z,_0x4ed11a);}[_0x2ab71b(0x154)](){const _0x4bd321=_0x2ab71b;[[f],[g],[S]][_0x4bd321(0x12f)](_0x22db10=>{const _0x353cae=_0x4bd321;this[_0x353cae(0x166)][_0x353cae(0x142)](_0x22db10);});}['onReady'](){const _0x2ef20d=_0x2ab71b;this[_0x2ef20d(0x166)][_0x2ef20d(0x111)](g),this[_0x2ef20d(0x166)]['get'](S);}};$(b,_0x2ab71b(0x16b),W),$(b,_0x2ab71b(0x10b),_0x35c6da[_0x2ab71b(0x119)]),b=ie([_0x5cc80e(_0x5b3fcf,_0x49c8f9,_0x333fa5),w(0x1,_0x785250(_0x231213)),w(0x2,_0x49ccea)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4e76f=_0x173a;(function(_0x226cbb,_0x41b0f0){const _0x5cf68d=_0x173a,_0x4e1a76=_0x226cbb();while(!![]){try{const _0x46f023=-parseInt(_0x5cf68d(0x16f))/0x1+parseInt(_0x5cf68d(0x123))/0x2+parseInt(_0x5cf68d(0x137))/0x3*(parseInt(_0x5cf68d(0x12d))/0x4)+-parseInt(_0x5cf68d(0x146))/0x5*(-parseInt(_0x5cf68d(0x14d))/0x6)+parseInt(_0x5cf68d(0x151))/0x7*(parseInt(_0x5cf68d(0x121))/0x8)+parseInt(_0x5cf68d(0x13c))/0x9+-parseInt(_0x5cf68d(0x16b))/0xa;if(_0x46f023===_0x41b0f0)break;else _0x4e1a76['push'](_0x4e1a76['shift']());}catch(_0x1d1506){_0x4e1a76['push'](_0x4e1a76['shift']());}}}(_0x2a00,0xc36c6));import{CommentService as _0x3fd827,CollaborationSessionService as _0x312cb8,UniverCollaborationClientPlugin as _0xe00712}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e497f}from'@univerjs-pro/license';import{dayjs as _0x21bb25,UserManagerService as _0x516a13,Inject as _0x113b48,Injector as _0x130087,Disposable as _0x311500,CustomRangeType as _0x488275,UniverInstanceType as _0x414e33,DependentOn as _0x14f0d8,IConfigService as _0x40717c,Plugin as _0x177895,merge as _0x1d1215}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x322bae}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfb0986,IThreadCommentDataSourceService as _0x2a9349}from'@univerjs/thread-comment';import{bufferTime as _0x25c191}from'rxjs';function _0x173a(_0x3780c3,_0x26751c){const _0x2a009d=_0x2a00();return _0x173a=function(_0x173a32,_0x1aada5){_0x173a32=_0x173a32-0x113;let _0x547450=_0x2a009d[_0x173a32];return _0x547450;},_0x173a(_0x3780c3,_0x26751c);}import{HTTPService as _0x28d87b}from'@univerjs/network';const W=_0x4e76f(0x156);var I=(_0x51b954=>(_0x51b954[_0x51b954['OpenOrReOpen']=0x0]=_0x4e76f(0x169),_0x51b954[_0x51b954[_0x4e76f(0x154)]=0x1]=_0x4e76f(0x154),_0x51b954[_0x51b954[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51b954))(I||{}),v=(_0x51af3c=>(_0x51af3c[_0x51af3c[_0x4e76f(0x162)]=0x0]=_0x4e76f(0x162),_0x51af3c[_0x51af3c[_0x4e76f(0x16a)]=0x1]='Add',_0x51af3c[_0x51af3c[_0x4e76f(0x171)]=0x2]=_0x4e76f(0x171),_0x51af3c[_0x51af3c[_0x4e76f(0x12c)]=0x3]=_0x4e76f(0x12c),_0x51af3c[_0x51af3c[_0x4e76f(0x114)]=0x4]=_0x4e76f(0x114),_0x51af3c[_0x51af3c['Solve']=0x5]=_0x4e76f(0x178),_0x51af3c[_0x51af3c[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51af3c))(v||{});const D=_0x250c87=>_0x21bb25(new Date(+_0x250c87))[_0x4e76f(0x11b)](_0x4e76f(0x142)),B=async(_0x23e660,_0x170f3f)=>{const _0x2d9366=_0x4e76f,_0x3f3df0=_0x23e660[_0x2d9366(0x144)](_0x516a13),_0x1b1eb1=_0x23e660['get'](_0x28d87b);_0x170f3f[_0x2d9366(0x160)](_0x3c1cd7=>{const _0x3955d9=_0x2d9366;_0x3f3df0[_0x3955d9(0x143)](_0x3c1cd7)&&_0x170f3f[_0x3955d9(0x16d)](_0x3c1cd7);}),_0x170f3f[_0x2d9366(0x167)]&&(await _0x1b1eb1[_0x2d9366(0x144)](_0x2d9366(0x179),{'params':{'userIDs':[..._0x170f3f]}}))[_0x2d9366(0x130)]['users'][_0x2d9366(0x160)](_0x182a19=>{const _0x1e0345=_0x2d9366;_0x182a19&&_0x3f3df0[_0x1e0345(0x177)](_0x182a19);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dc74d,_0x4ac995,_0x3bbf85,_0x5020ff)=>{const _0x5cd43f=_0x4e76f;for(var _0x3bbe85=_0x5020ff>0x1?void 0x0:_0x5020ff?K(_0x4ac995,_0x3bbf85):_0x4ac995,_0x223f4d=_0x5dc74d[_0x5cd43f(0x14b)]-0x1,_0x4f7810;_0x223f4d>=0x0;_0x223f4d--)(_0x4f7810=_0x5dc74d[_0x223f4d])&&(_0x3bbe85=_0x4f7810(_0x3bbe85)||_0x3bbe85);return _0x3bbe85;},p=(_0x208eed,_0x5cbabf)=>(_0x5b8c18,_0x55544b)=>_0x5cbabf(_0x5b8c18,_0x55544b,_0x208eed);let S=class extends _0x311500{constructor(_0x38059a,_0x5434c7,_0x41ef4f,_0x4082f1){const _0x3128e7=_0x4e76f;super(),this[_0x3128e7(0x157)]=_0x38059a,this[_0x3128e7(0x118)]=_0x5434c7,this[_0x3128e7(0x124)]=_0x41ef4f,this['_injector']=_0x4082f1,this[_0x3128e7(0x134)](),this[_0x3128e7(0x163)]();}[_0x4e76f(0x163)](){const _0x1313d3=_0x4e76f;this['disposeWithMe'](this[_0x1313d3(0x118)][_0x1313d3(0x155)][_0x1313d3(0x127)](_0x25c191(0x10))['subscribe'](_0x37593a=>{const _0x3221bc=_0x1313d3,_0x235850=new Set();_0x37593a[_0x3221bc(0x160)](_0x16a2c6=>{const _0x22ba9c=_0x3221bc;switch(_0x16a2c6[_0x22ba9c(0x120)]){case _0x22ba9c(0x161):{const _0x52a32b=_0x16a2c6[_0x22ba9c(0x15d)]['personId'];_0x235850[_0x22ba9c(0x161)](_0x52a32b);break;}}}),B(this[_0x3221bc(0x11e)],_0x235850);}));}[_0x4e76f(0x134)](){const _0x197da0=_0x4e76f;this[_0x197da0(0x13a)](this[_0x197da0(0x157)][_0x197da0(0x155)][_0x197da0(0x14f)](async _0x323457=>{const _0x1a59c3=_0x197da0;var _0x4a5272,_0x44c8fa,_0x4a1a70,_0xb2ab84;const _0x489c20=(_0x4a5272=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457['unitId'])['find'](_0x2ee3cc=>_0x2ee3cc[_0x1a59c3(0x125)]===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0x4a5272[_0x1a59c3(0x14e)];if(!_0x489c20)return;const {unitId:_0xe1c271,subUnitId:_0x26414f}=_0x489c20;switch(_0x323457[_0x1a59c3(0x16e)]&&this[_0x1a59c3(0x124)]['addUser'](_0x323457['user']),_0x323457[_0x1a59c3(0x120)]){case v[_0x1a59c3(0x16a)]:break;case v[_0x1a59c3(0x171)]:{this['_threadCommentModel'][_0x1a59c3(0x168)](_0xe1c271,_0x26414f,{'unitId':_0xe1c271,'subUnitId':_0x26414f,'ref':'','id':_0x323457['replyId'],'dT':D(+_0x323457[_0x1a59c3(0x133)]),'threadId':_0x323457[_0x1a59c3(0x125)],'personId':(_0x4a1a70=(_0x44c8fa=_0x323457[_0x1a59c3(0x16e)])==null?void 0x0:_0x44c8fa[_0x1a59c3(0x15a)])!=null?_0x4a1a70:_0x323457[_0x1a59c3(0x17c)],'text':JSON[_0x1a59c3(0x128)](_0x323457[_0x1a59c3(0x170)]),'parentId':_0x489c20['id']});break;}case v['Delete']:{const _0x4f0f7e=this[_0x1a59c3(0x118)][_0x1a59c3(0x139)](_0xe1c271,_0x26414f,_0x323457[_0x1a59c3(0x131)]);_0x4f0f7e&&_0x4f0f7e[_0x1a59c3(0x11f)]&&this[_0x1a59c3(0x118)][_0x1a59c3(0x115)](_0xe1c271,_0x26414f,_0x323457['replyId']);break;}case v[_0x1a59c3(0x12c)]:{this['_threadCommentModel'][_0x1a59c3(0x158)](_0xe1c271,_0x26414f,{'commentId':_0x323457[_0x1a59c3(0x131)],'text':JSON[_0x1a59c3(0x128)](_0x323457['content'])});break;}case v[_0x1a59c3(0x178)]:{const _0x3bb8d5=(_0xb2ab84=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457[_0x1a59c3(0x12a)])[_0x1a59c3(0x148)](_0x5a32aa=>_0x5a32aa['threadId']===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0xb2ab84[_0x1a59c3(0x14e)];_0x3bb8d5&&this[_0x1a59c3(0x118)]['resolveComment'](_0xe1c271,_0x26414f,_0x3bb8d5['id'],_0x323457[_0x1a59c3(0x175)]===I[_0x1a59c3(0x154)]);break;}}}));}};S=V([p(0x0,_0x113b48(_0x3fd827)),p(0x1,_0x113b48(_0xfb0986)),p(0x2,_0x113b48(_0x516a13)),p(0x3,_0x113b48(_0x130087))],S);const z=_0x4e76f(0x126),M={};var k=Object[_0x4e76f(0x132)],Q=(_0x89db04,_0x215f04,_0x577efd,_0x1dd950)=>{const _0x483137=_0x4e76f;for(var _0x35bf35=_0x1dd950>0x1?void 0x0:_0x1dd950?k(_0x215f04,_0x577efd):_0x215f04,_0x2fc482=_0x89db04[_0x483137(0x14b)]-0x1,_0x4d377d;_0x2fc482>=0x0;_0x2fc482--)(_0x4d377d=_0x89db04[_0x2fc482])&&(_0x35bf35=_0x4d377d(_0x35bf35)||_0x35bf35);return _0x35bf35;},_=(_0x1d5945,_0x241dc2)=>(_0x17d376,_0xe16305)=>_0x241dc2(_0x17d376,_0xe16305,_0x1d5945);function X(_0x4c6d0a,_0xa08a1c){const _0x4169a0=_0x4e76f,_0x2b26a2=_0x4c6d0a[_0x4169a0(0x122)][0x0];return{..._0xa08a1c,'id':_0x2b26a2[_0x4169a0(0x131)],'resolved':_0x4c6d0a['solved']===0x1,'dT':D(_0x2b26a2[_0x4169a0(0x133)]),'personId':_0x2b26a2[_0x4169a0(0x17c)],'threadId':_0x2b26a2[_0x4169a0(0x125)]};}function ee(_0x50c8a3,_0x4f0d55,_0x414b48){const _0x4d921b=_0x4e76f;var _0x49551f,_0x48ff7b;if(((_0x48ff7b=(_0x49551f=_0x50c8a3==null?void 0x0:_0x50c8a3[_0x4d921b(0x122)])==null?void 0x0:_0x49551f['length'])!=null?_0x48ff7b:0x0)>0x0){const _0x1d275d=(_0x218bbb,_0x451fa5)=>({'id':_0x218bbb[_0x4d921b(0x131)],'threadId':_0x218bbb[_0x4d921b(0x125)],'dT':D(_0x218bbb[_0x4d921b(0x133)]),'personId':_0x218bbb[_0x4d921b(0x17c)],'resolved':_0x50c8a3[_0x4d921b(0x175)]===I[_0x4d921b(0x154)],'unitId':_0x4f0d55,'subUnitId':_0x414b48,'text':JSON[_0x4d921b(0x128)](_0x218bbb[_0x4d921b(0x170)]),'parentId':_0x451fa5}),_0x1dd06d=_0x1d275d(_0x50c8a3[_0x4d921b(0x122)][0x0]);return{..._0x1dd06d,'children':_0x50c8a3['replies']['slice'](0x1)['map'](_0x56f60f=>_0x1d275d(_0x56f60f,_0x1dd06d['id']))};}return null;}let f=class{constructor(_0x75dd6b,_0x2ca638,_0x3f2f8b,_0x194d57){const _0x588cb5=_0x4e76f;this[_0x588cb5(0x17a)]=_0x75dd6b,this[_0x588cb5(0x124)]=_0x2ca638,this[_0x588cb5(0x129)]=_0x3f2f8b,this['_injector']=_0x194d57;}async[_0x4e76f(0x168)](_0xa1fb67){const _0x32bffb=_0x4e76f;var _0x59adaa,_0x3adcc2;const {parentId:_0x15ec77,unitId:_0x5a2dd2,text:_0xd9a0ee,threadId:_0x7b6a91}=_0xa1fb67,_0x1130d8=(_0x3adcc2=(_0x59adaa=_0xd9a0ee['customRanges'])==null?void 0x0:_0x59adaa[_0x32bffb(0x15c)](_0x508ebc=>_0x508ebc[_0x32bffb(0x164)]===_0x488275[_0x32bffb(0x159)])[_0x32bffb(0x172)](_0x48505d=>_0x48505d['rangeId']))!=null?_0x3adcc2:[],_0x507721=JSON[_0x32bffb(0x13d)](_0xd9a0ee),_0xe05860=(await this[_0x32bffb(0x129)][_0x32bffb(0x152)](_0x5a2dd2))['getMemberID']();if(_0x15ec77){const _0x4a6aab={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8,'threadId':_0x7b6a91},_0x37d9cf=(await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x136),{'body':_0x4a6aab}))[_0x32bffb(0x130)][_0x32bffb(0x17d)];return{..._0xa1fb67,'id':_0x37d9cf[_0x32bffb(0x131)],'dT':_0x21bb25(+_0x37d9cf['createTimestamp'])[_0x32bffb(0x11b)](_0x32bffb(0x142)),'personId':_0x37d9cf[_0x32bffb(0x17c)]};}else{const _0x186775={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8},_0x4426f5=await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x113),{'body':_0x186775});return X(_0x4426f5[_0x32bffb(0x130)][_0x32bffb(0x116)],_0xa1fb67);}}async['updateComment'](_0x5cf13e){const _0x541960=_0x4e76f;var _0x33f1be,_0x153579;const {text:_0x565d58,unitId:_0x1320e2}=_0x5cf13e,_0x26ff26=(_0x153579=(_0x33f1be=_0x565d58[_0x541960(0x150)])==null?void 0x0:_0x33f1be['filter'](_0x528401=>_0x528401[_0x541960(0x164)]===_0x488275[_0x541960(0x159)])[_0x541960(0x172)](_0x32cb40=>_0x32cb40['rangeId']))!=null?_0x153579:[],_0x4b37ff=JSON['stringify'](_0x565d58),_0x4285fa=_0x5cf13e[_0x541960(0x125)],_0x3fb545=_0x5cf13e['id'],_0x1a05c8={'memberId':(await this[_0x541960(0x129)][_0x541960(0x152)](_0x1320e2))[_0x541960(0x174)](),'unitId':_0x1320e2,'threadId':_0x4285fa,'mention':_0x26ff26,'content':_0x4b37ff,'replyId':_0x3fb545},_0x590671=await this[_0x541960(0x17a)]['post'](_0x541960(0x176)+_0x1320e2+_0x541960(0x153),{'body':_0x1a05c8});return!_0x590671['body'][_0x541960(0x117)]||_0x590671[_0x541960(0x130)][_0x541960(0x117)][_0x541960(0x149)]===0x1;}async[_0x4e76f(0x15e)](_0x498879){const _0x53e844=_0x4e76f,{unitId:_0x269a30}=_0x498879,_0x527487=_0x498879[_0x53e844(0x125)],_0x157d06={'memberId':this[_0x53e844(0x124)][_0x53e844(0x141)]()['userID'],'unitId':_0x269a30,'threadId':_0x527487,'solved':_0x498879[_0x53e844(0x13e)]?I['Solved']:I[_0x53e844(0x169)]},_0x1891d9=await this['_httpService'][_0x53e844(0x135)](_0x53e844(0x176)+_0x269a30+'/solved',{'body':_0x157d06});return!_0x1891d9['body'][_0x53e844(0x117)]||_0x1891d9['body']['error'][_0x53e844(0x149)]===0x1;}async[_0x4e76f(0x115)](_0x11bde1,_0x52967a,_0x5228ae,_0x332692){const _0x12b8d9=_0x4e76f,_0x56c35d={'memberId':(await this['_sessionService'][_0x12b8d9(0x152)](_0x11bde1))[_0x12b8d9(0x174)](),'threadId':_0x5228ae,'replyId':_0x332692,'unitId':_0x11bde1},_0x384526=await this[_0x12b8d9(0x17a)][_0x12b8d9(0x135)](_0x12b8d9(0x176)+_0x11bde1+_0x12b8d9(0x11d),{'body':_0x56c35d});return!_0x384526['body']['error']||_0x384526[_0x12b8d9(0x130)][_0x12b8d9(0x117)][_0x12b8d9(0x149)]===0x1;}async[_0x4e76f(0x16c)](_0x34d9cd,_0x101f62,_0x3e0a73){const _0x1de798=_0x4e76f,_0x5049f8={'unitId':_0x34d9cd,'threadId':_0x3e0a73},_0xce298e=await this['_httpService']['post'](_0x1de798(0x176)+_0x34d9cd+'/list',{'body':_0x5049f8}),_0x280787=_0x3e0a73[_0x1de798(0x172)](_0x23a250=>ee(_0xce298e[_0x1de798(0x130)][_0x1de798(0x12e)][_0x23a250],_0x34d9cd,_0x101f62))[_0x1de798(0x15c)](Boolean);return Object[_0x1de798(0x147)](_0xce298e[_0x1de798(0x130)][_0x1de798(0x145)])['forEach'](_0x49c9b5=>{const _0x3e8a9b=_0x1de798;this['_userService'][_0x3e8a9b(0x177)](_0x49c9b5);}),_0x280787;}[_0x4e76f(0x13b)](_0x161504){const _0x232fe9=_0x4e76f;return{'id':_0x161504['id'],'threadId':_0x161504[_0x232fe9(0x125)],'ref':_0x161504[_0x232fe9(0x17b)]};}};f=Q([_(0x0,_0x113b48(_0x28d87b)),_(0x1,_0x113b48(_0x516a13)),_(0x2,_0x113b48(_0x312cb8)),_(0x3,_0x113b48(_0x130087))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x743fd8,_0x5cb16f,_0x2b0c63,_0x525290)=>{const _0x81cea0=_0x4e76f;for(var _0x29e226=_0x525290>0x1?void 0x0:_0x525290?re(_0x5cb16f,_0x2b0c63):_0x5cb16f,_0xa05e90=_0x743fd8[_0x81cea0(0x14b)]-0x1,_0x5460c2;_0xa05e90>=0x0;_0xa05e90--)(_0x5460c2=_0x743fd8[_0xa05e90])&&(_0x29e226=_0x5460c2(_0x29e226)||_0x29e226);return _0x29e226;},N=(_0x2b51f3,_0xa3ee79)=>(_0x37b244,_0x6ca17d)=>_0xa3ee79(_0x37b244,_0x6ca17d,_0x2b51f3);function _0x2a00(){const _0x1c3838=['COMMENT','userID','defineProperty','filter','payload','resolveComment','_threadCommentDataSourceService','forEach','add','Unknown','_initUserSync','rangeType','setConfig','onReady','size','addComment','OpenOrReOpen','Add','17189440RAJMBU','listComments','delete','user','6100CvjTcz','content','Reply','map','getUnit','getMemberID','solved','/universer-api/comment/unit/','addUser','Solve','/universer-api/user/list','_httpService','ref','userId','reply','/add','Delete','deleteComment','comment','error','_threadCommentModel','UNRECOGNIZED','_config','format','onStarting','/delete','_injector','parentId','type','4856JgUuPZ','replies','2965112BydwKc','_userService','threadId','thread-comment-data-source.config','pipe','parse','_sessionService','unitId','_configService','Edit','834004WfCspo','comments','symbol','body','replyId','getOwnPropertyDescriptor','createTimestamp','_init','post','/reply','12QEkJLH','UNIVER_UNKNOWN','getComment','disposeWithMe','saveCommentToSnapshot','734661HnJWAK','stringify','resolved','pluginName','dataSource','getCurrentUser','YYYY/MM/DD\x20HH:mm','getUser','get','users','107885GefCNY','values','find','code','_initDataSource','length','_threadCommentDataSource','30YGFUSM','root','subscribe','customRanges','224zdWAzQ','requireSession','/edit','Solved','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','updateComment'];_0x2a00=function(){return _0x1c3838;};return _0x2a00();}let g=class extends _0x311500{constructor(_0x216287,_0xb2ccf9){const _0x4289c8=_0x4e76f;super(),this[_0x4289c8(0x15f)]=_0x216287,this[_0x4289c8(0x14c)]=_0xb2ccf9,this[_0x4289c8(0x14a)]();}['_initDataSource'](){const _0x1c1695=_0x4e76f;this[_0x1c1695(0x15f)][_0x1c1695(0x140)]=this[_0x1c1695(0x14c)],this[_0x1c1695(0x15f)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2a9349),N(0x1,_0x113b48(f))],g);var se=Object[_0x4e76f(0x15b)],oe=Object[_0x4e76f(0x132)],ne=(_0x3394a7,_0xe46d86,_0x2eded9)=>_0xe46d86 in _0x3394a7?se(_0x3394a7,_0xe46d86,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eded9}):_0x3394a7[_0xe46d86]=_0x2eded9,ie=(_0x15999a,_0x5d8095,_0xc65a86,_0xfc9e27)=>{for(var _0x373b7f=_0xfc9e27>0x1?void 0x0:_0xfc9e27?oe(_0x5d8095,_0xc65a86):_0x5d8095,_0x20bca9=_0x15999a['length']-0x1,_0x17f830;_0x20bca9>=0x0;_0x20bca9--)(_0x17f830=_0x15999a[_0x20bca9])&&(_0x373b7f=_0x17f830(_0x373b7f)||_0x373b7f);return _0x373b7f;},w=(_0x23c853,_0x25fff0)=>(_0x280bd6,_0x276d71)=>_0x25fff0(_0x280bd6,_0x276d71,_0x23c853),$=(_0x464b68,_0x57af3e,_0x55247a)=>ne(_0x464b68,typeof _0x57af3e!=_0x4e76f(0x12f)?_0x57af3e+'':_0x57af3e,_0x55247a);let b=class extends _0x177895{constructor(_0x662cda=M,_0x2512d3,_0x13de20){const _0x187016=_0x4e76f;super(),this['_config']=_0x662cda,this[_0x187016(0x11e)]=_0x2512d3,this['_configService']=_0x13de20;const {..._0x40df12}=_0x1d1215({},M,this[_0x187016(0x11a)]);this[_0x187016(0x12b)][_0x187016(0x165)](z,_0x40df12);}[_0x4e76f(0x11c)](){const _0x589212=_0x4e76f;[[f],[g],[S]][_0x589212(0x160)](_0x1b8c43=>{const _0x2c55a7=_0x589212;this[_0x2c55a7(0x11e)][_0x2c55a7(0x161)](_0x1b8c43);});}[_0x4e76f(0x166)](){const _0x414fed=_0x4e76f;this['_injector'][_0x414fed(0x144)](g),this['_injector'][_0x414fed(0x144)](S);}};$(b,_0x4e76f(0x13f),W),$(b,_0x4e76f(0x120),_0x414e33[_0x4e76f(0x138)]),b=ie([_0x14f0d8(_0x322bae,_0xe00712,_0x1e497f),w(0x1,_0x113b48(_0x130087)),w(0x2,_0x40717c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x59e9(){const _0x39bcaa=['UniverCollaborationClientPlugin','@univerjs-pro/license','exports','YYYY/MM/DD\x20HH:mm','269316dTaOjj','users','toStringTag','_config','replyId','pipe','OpenOrReOpen','getComment','filter','find','map','createTimestamp','UniverThreadComment','89344mXrBaO','1SgznuY','UniverThreadCommentUIPlugin','getUser','length','syncUpdateMutationToColla','275XSBjWF','Reply','payload','UniverProThreadCommentDatasource','Disposable','size','rxjs','Solved','_commentService','381074REzvYa','123070OBmBXw','getMemberID','listComments','getCurrentUser','onReady','dataSource','reply','user','personId','_init','/universer-api/comment/unit/','_injector','4yjFxvg','HTTPService','dayjs','_initDataSource','12443054arONrH','@univerjs-pro/collaboration-client','Edit','/list','595980gaOFiq','commentUpdate$','resolveComment','ThreadCommentModel','content','Inject','type','solved','forEach','addUser','CustomRangeType','/edit','UNIVER_UNKNOWN','post','ref','values','UNRECOGNIZED','getOwnPropertyDescriptor','defineProperty','comments','addComment','parse','1989474HuByQw','CollaborationSessionService','_threadCommentModel','@univerjs/core','format','get','IConfigService','126hpulVS','Module','saveCommentToSnapshot','customRanges','userId','DependentOn','threadId','UserManagerService','Solve','stringify','unitId','@univerjs/thread-comment','/add','UniverNetwork','add','_userService','requireSession','parentId','getUnit','UniverInstanceType','rangeId','onStarting','userID','UniverProLicense','Injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','707TLBgLq','@univerjs/thread-comment-ui','body','UniverCore','_initUserSync','_httpService','_sessionService','thread-comment-data-source.config','COMMENT','updateComment','setConfig','Plugin','bufferTime','code','Delete','resolved','replies','Add','190ATBzag','_configService','rangeType','_threadCommentDataSourceService','_threadCommentDataSource','pluginName','error'];_0x59e9=function(){return _0x39bcaa;};return _0x59e9();}function _0x1c13(_0x3a8a1a,_0x4abe03){const _0x59e9e8=_0x59e9();return _0x1c13=function(_0x1c1373,_0x4b811f){_0x1c1373=_0x1c1373-0x170;let _0x4666fd=_0x59e9e8[_0x1c1373];return _0x4666fd;},_0x1c13(_0x3a8a1a,_0x4abe03);}(function(_0x55d524,_0x4b59af){const _0x59de5e=_0x1c13,_0x46b1ce=_0x55d524();while(!![]){try{const _0x2f3464=-parseInt(_0x59de5e(0x1d8))/0x1*(-parseInt(_0x59de5e(0x1e6))/0x2)+-parseInt(_0x59de5e(0x18c))/0x3*(parseInt(_0x59de5e(0x1f3))/0x4)+parseInt(_0x59de5e(0x1e7))/0x5*(parseInt(_0x59de5e(0x193))/0x6)+parseInt(_0x59de5e(0x1ad))/0x7*(parseInt(_0x59de5e(0x1d7))/0x8)+-parseInt(_0x59de5e(0x176))/0x9*(-parseInt(_0x59de5e(0x1bf))/0xa)+parseInt(_0x59de5e(0x1dd))/0xb*(-parseInt(_0x59de5e(0x1ca))/0xc)+-parseInt(_0x59de5e(0x172))/0xd;if(_0x2f3464===_0x4b59af)break;else _0x46b1ce['push'](_0x46b1ce['shift']());}catch(_0x1a6ebd){_0x46b1ce['push'](_0x46b1ce['shift']());}}}(_0x59e9,0xdeb3c),function(_0x36d218,_0x3162b3){const _0x51e6a4=_0x1c13;typeof exports=='object'&&typeof module<'u'?_0x3162b3(exports,require(_0x51e6a4(0x173)),require(_0x51e6a4(0x1c7)),require('@univerjs/core'),require(_0x51e6a4(0x1ae)),require(_0x51e6a4(0x19e)),require(_0x51e6a4(0x1e3)),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x51e6a4(0x1c8),_0x51e6a4(0x173),_0x51e6a4(0x1c7),_0x51e6a4(0x18f),_0x51e6a4(0x1ae),_0x51e6a4(0x19e),'rxjs','@univerjs/network'],_0x3162b3):(_0x36d218=typeof globalThis<'u'?globalThis:_0x36d218||self,_0x3162b3(_0x36d218[_0x51e6a4(0x1e0)]={},_0x36d218['UniverProCollaborationClient'],_0x36d218[_0x51e6a4(0x1aa)],_0x36d218[_0x51e6a4(0x1b0)],_0x36d218['UniverThreadCommentUi'],_0x36d218[_0x51e6a4(0x1d6)],_0x36d218[_0x51e6a4(0x1e3)],_0x36d218[_0x51e6a4(0x1a0)]));}(this,function(_0x4c9c42,_0x56d33,_0x2b8469,_0x4db6d5,_0x573e60,_0x31e269,_0x55c955,_0x21f292){'use strict';const _0x5f2104=_0x1c13;const _0x2e64ca=_0x5f2104(0x1ac);var _0x5f251f=(_0x2fd33c=>(_0x2fd33c[_0x2fd33c[_0x5f2104(0x1d0)]=0x0]='OpenOrReOpen',_0x2fd33c[_0x2fd33c[_0x5f2104(0x1e4)]=0x1]=_0x5f2104(0x1e4),_0x2fd33c[_0x2fd33c[_0x5f2104(0x186)]=-0x1]='UNRECOGNIZED',_0x2fd33c))(_0x5f251f||{}),_0x361f5a=(_0x1f810c=>(_0x1f810c[_0x1f810c['Unknown']=0x0]='Unknown',_0x1f810c[_0x1f810c['Add']=0x1]=_0x5f2104(0x1be),_0x1f810c[_0x1f810c['Reply']=0x2]=_0x5f2104(0x1de),_0x1f810c[_0x1f810c[_0x5f2104(0x174)]=0x3]=_0x5f2104(0x174),_0x1f810c[_0x1f810c[_0x5f2104(0x1bb)]=0x4]=_0x5f2104(0x1bb),_0x1f810c[_0x1f810c[_0x5f2104(0x19b)]=0x5]=_0x5f2104(0x19b),_0x1f810c[_0x1f810c['UNRECOGNIZED']=-0x1]=_0x5f2104(0x186),_0x1f810c))(_0x361f5a||{});const _0x327fff=_0x6952eb=>_0x4db6d5[_0x5f2104(0x170)](new Date(+_0x6952eb))['format'](_0x5f2104(0x1c9)),_0x4e188d=async(_0x4470fb,_0x3f84a5)=>{const _0x383e49=_0x5f2104,_0x1b8327=_0x4470fb[_0x383e49(0x191)](_0x4db6d5[_0x383e49(0x19a)]),_0x123639=_0x4470fb[_0x383e49(0x191)](_0x21f292[_0x383e49(0x1f4)]);_0x3f84a5['forEach'](_0x26273a=>{const _0x2b4e94=_0x383e49;_0x1b8327[_0x2b4e94(0x1da)](_0x26273a)&&_0x3f84a5['delete'](_0x26273a);}),_0x3f84a5[_0x383e49(0x1e2)]&&(await _0x123639[_0x383e49(0x191)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3f84a5]}}))[_0x383e49(0x1af)]['users']['forEach'](_0x4ad094=>{const _0x184f62=_0x383e49;_0x4ad094&&_0x1b8327[_0x184f62(0x17f)](_0x4ad094);});};var _0x5297a1=Object[_0x5f2104(0x187)],_0x1be2c1=(_0x520d8f,_0x39bd46,_0xf4280d,_0x325b48)=>{const _0x5e6f17=_0x5f2104;for(var _0x58e62b=_0x325b48>0x1?void 0x0:_0x325b48?_0x5297a1(_0x39bd46,_0xf4280d):_0x39bd46,_0x1a1ac5=_0x520d8f[_0x5e6f17(0x1db)]-0x1,_0x5574c9;_0x1a1ac5>=0x0;_0x1a1ac5--)(_0x5574c9=_0x520d8f[_0x1a1ac5])&&(_0x58e62b=_0x5574c9(_0x58e62b)||_0x58e62b);return _0x58e62b;},_0x2cd593=(_0x3e4549,_0x4837b5)=>(_0x39afa5,_0x3f0523)=>_0x4837b5(_0x39afa5,_0x3f0523,_0x3e4549);let _0xd04f3c=class extends _0x4db6d5['Disposable']{constructor(_0x4fa6c8,_0x512f0c,_0x50a0e6,_0x1f8dcf){const _0x1ffa0d=_0x5f2104;super(),this[_0x1ffa0d(0x1e5)]=_0x4fa6c8,this['_threadCommentModel']=_0x512f0c,this[_0x1ffa0d(0x1a2)]=_0x50a0e6,this[_0x1ffa0d(0x1f2)]=_0x1f8dcf,this[_0x1ffa0d(0x1f0)](),this[_0x1ffa0d(0x1b1)]();}[_0x5f2104(0x1b1)](){const _0x15171b=_0x5f2104;this['disposeWithMe'](this[_0x15171b(0x18e)][_0x15171b(0x177)][_0x15171b(0x1cf)](_0x55c955[_0x15171b(0x1b9)](0x10))['subscribe'](_0x3b4867=>{const _0x471e3b=_0x15171b,_0x15da93=new Set();_0x3b4867[_0x471e3b(0x17e)](_0x4f936c=>{const _0x2e9dce=_0x471e3b;switch(_0x4f936c['type']){case _0x2e9dce(0x1a1):{const _0x31d3df=_0x4f936c[_0x2e9dce(0x1df)][_0x2e9dce(0x1ef)];_0x15da93[_0x2e9dce(0x1a1)](_0x31d3df);break;}}}),_0x4e188d(this[_0x471e3b(0x1f2)],_0x15da93);}));}[_0x5f2104(0x1f0)](){const _0x12edeb=_0x5f2104;this['disposeWithMe'](this[_0x12edeb(0x1e5)][_0x12edeb(0x177)]['subscribe'](async _0x592ba8=>{const _0x11803b=_0x12edeb;var _0x14f298,_0x519605,_0x18e520,_0x49b2ff;const _0x19bda3=(_0x14f298=this[_0x11803b(0x18e)][_0x11803b(0x1a5)](_0x592ba8[_0x11803b(0x19d)])[_0x11803b(0x1d3)](_0x38b119=>_0x38b119[_0x11803b(0x199)]===_0x592ba8[_0x11803b(0x199)]))==null?void 0x0:_0x14f298['root'];if(!_0x19bda3)return;const {unitId:_0x367e26,subUnitId:_0x221c6a}=_0x19bda3;switch(_0x592ba8[_0x11803b(0x1ee)]&&this[_0x11803b(0x1a2)]['addUser'](_0x592ba8[_0x11803b(0x1ee)]),_0x592ba8[_0x11803b(0x17c)]){case _0x361f5a[_0x11803b(0x1be)]:break;case _0x361f5a[_0x11803b(0x1de)]:{this['_threadCommentModel'][_0x11803b(0x18a)](_0x367e26,_0x221c6a,{'unitId':_0x367e26,'subUnitId':_0x221c6a,'ref':'','id':_0x592ba8[_0x11803b(0x1ce)],'dT':_0x327fff(+_0x592ba8[_0x11803b(0x1d5)]),'threadId':_0x592ba8[_0x11803b(0x199)],'personId':(_0x18e520=(_0x519605=_0x592ba8[_0x11803b(0x1ee)])==null?void 0x0:_0x519605[_0x11803b(0x1a9)])!=null?_0x18e520:_0x592ba8[_0x11803b(0x197)],'text':JSON[_0x11803b(0x18b)](_0x592ba8[_0x11803b(0x17a)]),'parentId':_0x19bda3['id']});break;}case _0x361f5a[_0x11803b(0x1bb)]:{const _0xb65af4=this['_threadCommentModel'][_0x11803b(0x1d1)](_0x367e26,_0x221c6a,_0x592ba8[_0x11803b(0x1ce)]);_0xb65af4&&_0xb65af4[_0x11803b(0x1a4)]&&this['_threadCommentModel']['deleteComment'](_0x367e26,_0x221c6a,_0x592ba8[_0x11803b(0x1ce)]);break;}case _0x361f5a['Edit']:{this[_0x11803b(0x18e)]['updateComment'](_0x367e26,_0x221c6a,{'commentId':_0x592ba8[_0x11803b(0x1ce)],'text':JSON[_0x11803b(0x18b)](_0x592ba8[_0x11803b(0x17a)])});break;}case _0x361f5a[_0x11803b(0x19b)]:{const _0x4332fe=(_0x49b2ff=this[_0x11803b(0x18e)][_0x11803b(0x1a5)](_0x592ba8[_0x11803b(0x19d)])[_0x11803b(0x1d3)](_0x275f57=>_0x275f57[_0x11803b(0x199)]===_0x592ba8[_0x11803b(0x199)]))==null?void 0x0:_0x49b2ff['root'];_0x4332fe&&this[_0x11803b(0x18e)][_0x11803b(0x178)](_0x367e26,_0x221c6a,_0x4332fe['id'],_0x592ba8[_0x11803b(0x17d)]===_0x5f251f[_0x11803b(0x1e4)]);break;}}}));}};_0xd04f3c=_0x1be2c1([_0x2cd593(0x0,_0x4db6d5[_0x5f2104(0x17b)](_0x56d33['CommentService'])),_0x2cd593(0x1,_0x4db6d5[_0x5f2104(0x17b)](_0x31e269[_0x5f2104(0x179)])),_0x2cd593(0x2,_0x4db6d5[_0x5f2104(0x17b)](_0x4db6d5[_0x5f2104(0x19a)])),_0x2cd593(0x3,_0x4db6d5[_0x5f2104(0x17b)](_0x4db6d5['Injector']))],_0xd04f3c);const _0x27462f=_0x5f2104(0x1b4),_0x1ebf6a={};var _0x243354=Object[_0x5f2104(0x187)],_0x134bdc=(_0x7f48c2,_0x5a2774,_0x201bad,_0x33a14b)=>{const _0x3a0f25=_0x5f2104;for(var _0x39e1ab=_0x33a14b>0x1?void 0x0:_0x33a14b?_0x243354(_0x5a2774,_0x201bad):_0x5a2774,_0xac2a6b=_0x7f48c2[_0x3a0f25(0x1db)]-0x1,_0x3f0f27;_0xac2a6b>=0x0;_0xac2a6b--)(_0x3f0f27=_0x7f48c2[_0xac2a6b])&&(_0x39e1ab=_0x3f0f27(_0x39e1ab)||_0x39e1ab);return _0x39e1ab;},_0x4d3d7d=(_0x9ea745,_0x4362c6)=>(_0x235375,_0x4fb246)=>_0x4362c6(_0x235375,_0x4fb246,_0x9ea745);function _0x45c655(_0x36e16c,_0x26606e){const _0x31fd6f=_0x5f2104,_0x2dd0f0=_0x36e16c[_0x31fd6f(0x1bd)][0x0];return{..._0x26606e,'id':_0x2dd0f0['replyId'],'resolved':_0x36e16c[_0x31fd6f(0x17d)]===0x1,'dT':_0x327fff(_0x2dd0f0[_0x31fd6f(0x1d5)]),'personId':_0x2dd0f0['userId'],'threadId':_0x2dd0f0[_0x31fd6f(0x199)]};}function _0x49c2e9(_0x20d3ff,_0x257308,_0x29a1e3){const _0x3f708e=_0x5f2104;var _0x26304f,_0x30142a;if(((_0x30142a=(_0x26304f=_0x20d3ff==null?void 0x0:_0x20d3ff[_0x3f708e(0x1bd)])==null?void 0x0:_0x26304f['length'])!=null?_0x30142a:0x0)>0x0){const _0x143ee6=(_0x4146da,_0x385da6)=>({'id':_0x4146da[_0x3f708e(0x1ce)],'threadId':_0x4146da[_0x3f708e(0x199)],'dT':_0x327fff(_0x4146da['createTimestamp']),'personId':_0x4146da[_0x3f708e(0x197)],'resolved':_0x20d3ff['solved']===_0x5f251f[_0x3f708e(0x1e4)],'unitId':_0x257308,'subUnitId':_0x29a1e3,'text':JSON[_0x3f708e(0x18b)](_0x4146da[_0x3f708e(0x17a)]),'parentId':_0x385da6}),_0x1b8285=_0x143ee6(_0x20d3ff[_0x3f708e(0x1bd)][0x0]);return{..._0x1b8285,'children':_0x20d3ff[_0x3f708e(0x1bd)]['slice'](0x1)[_0x3f708e(0x1d4)](_0x50940e=>_0x143ee6(_0x50940e,_0x1b8285['id']))};}return null;}let _0x4d429c=class{constructor(_0x446249,_0x4ede34,_0x5edbdb,_0x18538b){const _0x4e772f=_0x5f2104;this['_httpService']=_0x446249,this[_0x4e772f(0x1a2)]=_0x4ede34,this[_0x4e772f(0x1b3)]=_0x5edbdb,this[_0x4e772f(0x1f2)]=_0x18538b;}async[_0x5f2104(0x18a)](_0x2fd2d2){const _0x2857c0=_0x5f2104;var _0x25de1c,_0x4f3a62;const {parentId:_0x43986d,unitId:_0x20f1bd,text:_0x3c7dd1,threadId:_0x1d5fcb}=_0x2fd2d2,_0x2f355e=(_0x4f3a62=(_0x25de1c=_0x3c7dd1[_0x2857c0(0x196)])==null?void 0x0:_0x25de1c[_0x2857c0(0x1d2)](_0x1834b4=>_0x1834b4[_0x2857c0(0x1c1)]===_0x4db6d5[_0x2857c0(0x180)]['COMMENT'])['map'](_0x54ea16=>_0x54ea16[_0x2857c0(0x1a7)]))!=null?_0x4f3a62:[],_0x208983=JSON['stringify'](_0x3c7dd1),_0x5ec605=(await this[_0x2857c0(0x1b3)][_0x2857c0(0x1a3)](_0x20f1bd))[_0x2857c0(0x1e8)]();if(_0x43986d){const _0x500862={'memberId':_0x5ec605,'unitId':_0x20f1bd,'content':_0x208983,'mention':_0x2f355e,'threadId':_0x1d5fcb},_0x2a439f=(await this[_0x2857c0(0x1b2)][_0x2857c0(0x183)](_0x2857c0(0x1f1)+_0x20f1bd+'/reply',{'body':_0x500862}))['body'][_0x2857c0(0x1ed)];return{..._0x2fd2d2,'id':_0x2a439f[_0x2857c0(0x1ce)],'dT':_0x4db6d5[_0x2857c0(0x170)](+_0x2a439f[_0x2857c0(0x1d5)])[_0x2857c0(0x190)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2a439f[_0x2857c0(0x197)]};}else{const _0x318f4f={'memberId':_0x5ec605,'unitId':_0x20f1bd,'content':_0x208983,'mention':_0x2f355e},_0x36a39f=await this['_httpService']['post'](_0x2857c0(0x1f1)+_0x20f1bd+_0x2857c0(0x19f),{'body':_0x318f4f});return _0x45c655(_0x36a39f['body']['comment'],_0x2fd2d2);}}async[_0x5f2104(0x1b6)](_0x11b119){const _0x4e464d=_0x5f2104;var _0x1714c7,_0x1ac762;const {text:_0x330f1f,unitId:_0x3c56cb}=_0x11b119,_0x409d6d=(_0x1ac762=(_0x1714c7=_0x330f1f['customRanges'])==null?void 0x0:_0x1714c7[_0x4e464d(0x1d2)](_0x2b30c4=>_0x2b30c4[_0x4e464d(0x1c1)]===_0x4db6d5[_0x4e464d(0x180)][_0x4e464d(0x1b5)])['map'](_0x57c6d5=>_0x57c6d5[_0x4e464d(0x1a7)]))!=null?_0x1ac762:[],_0x5622b7=JSON[_0x4e464d(0x19c)](_0x330f1f),_0x3c5f75=_0x11b119['threadId'],_0x781d40=_0x11b119['id'],_0x3cb78d={'memberId':(await this['_sessionService'][_0x4e464d(0x1a3)](_0x3c56cb))[_0x4e464d(0x1e8)](),'unitId':_0x3c56cb,'threadId':_0x3c5f75,'mention':_0x409d6d,'content':_0x5622b7,'replyId':_0x781d40},_0x592b34=await this[_0x4e464d(0x1b2)][_0x4e464d(0x183)](_0x4e464d(0x1f1)+_0x3c56cb+_0x4e464d(0x181),{'body':_0x3cb78d});return!_0x592b34[_0x4e464d(0x1af)][_0x4e464d(0x1c5)]||_0x592b34[_0x4e464d(0x1af)]['error'][_0x4e464d(0x1ba)]===0x1;}async[_0x5f2104(0x178)](_0x2f358f){const _0x2851af=_0x5f2104,{unitId:_0x3dadca}=_0x2f358f,_0x3a0890=_0x2f358f[_0x2851af(0x199)],_0x264c7a={'memberId':this[_0x2851af(0x1a2)][_0x2851af(0x1ea)]()[_0x2851af(0x1a9)],'unitId':_0x3dadca,'threadId':_0x3a0890,'solved':_0x2f358f[_0x2851af(0x1bc)]?_0x5f251f[_0x2851af(0x1e4)]:_0x5f251f['OpenOrReOpen']},_0x3f9a5b=await this[_0x2851af(0x1b2)]['post']('/universer-api/comment/unit/'+_0x3dadca+'/solved',{'body':_0x264c7a});return!_0x3f9a5b[_0x2851af(0x1af)][_0x2851af(0x1c5)]||_0x3f9a5b[_0x2851af(0x1af)]['error'][_0x2851af(0x1ba)]===0x1;}async['deleteComment'](_0x3ddef4,_0x5713c4,_0x11c287,_0x3dc0bd){const _0x315ad1=_0x5f2104,_0xc8e981={'memberId':(await this[_0x315ad1(0x1b3)][_0x315ad1(0x1a3)](_0x3ddef4))['getMemberID'](),'threadId':_0x11c287,'replyId':_0x3dc0bd,'unitId':_0x3ddef4},_0x4ed3b6=await this['_httpService'][_0x315ad1(0x183)](_0x315ad1(0x1f1)+_0x3ddef4+'/delete',{'body':_0xc8e981});return!_0x4ed3b6[_0x315ad1(0x1af)][_0x315ad1(0x1c5)]||_0x4ed3b6['body'][_0x315ad1(0x1c5)][_0x315ad1(0x1ba)]===0x1;}async[_0x5f2104(0x1e9)](_0x36d149,_0x511748,_0x244dd3){const _0x33fe64=_0x5f2104,_0x3b3463={'unitId':_0x36d149,'threadId':_0x244dd3},_0x1d649f=await this[_0x33fe64(0x1b2)][_0x33fe64(0x183)](_0x33fe64(0x1f1)+_0x36d149+_0x33fe64(0x175),{'body':_0x3b3463}),_0x4cb36c=_0x244dd3[_0x33fe64(0x1d4)](_0x2cee0e=>_0x49c2e9(_0x1d649f[_0x33fe64(0x1af)][_0x33fe64(0x189)][_0x2cee0e],_0x36d149,_0x511748))['filter'](Boolean);return Object[_0x33fe64(0x185)](_0x1d649f[_0x33fe64(0x1af)][_0x33fe64(0x1cb)])[_0x33fe64(0x17e)](_0x37025e=>{const _0x3b4c59=_0x33fe64;this[_0x3b4c59(0x1a2)][_0x3b4c59(0x17f)](_0x37025e);}),_0x4cb36c;}[_0x5f2104(0x195)](_0x118007){const _0x36e9dc=_0x5f2104;return{'id':_0x118007['id'],'threadId':_0x118007[_0x36e9dc(0x199)],'ref':_0x118007[_0x36e9dc(0x184)]};}};_0x4d429c=_0x134bdc([_0x4d3d7d(0x0,_0x4db6d5['Inject'](_0x21f292[_0x5f2104(0x1f4)])),_0x4d3d7d(0x1,_0x4db6d5['Inject'](_0x4db6d5['UserManagerService'])),_0x4d3d7d(0x2,_0x4db6d5[_0x5f2104(0x17b)](_0x56d33[_0x5f2104(0x18d)])),_0x4d3d7d(0x3,_0x4db6d5[_0x5f2104(0x17b)](_0x4db6d5[_0x5f2104(0x1ab)]))],_0x4d429c);var _0x2a049b=Object['getOwnPropertyDescriptor'],_0x3a82d7=(_0x41ed67,_0x1143ea,_0x226cb4,_0x11a2b3)=>{for(var _0x4da85d=_0x11a2b3>0x1?void 0x0:_0x11a2b3?_0x2a049b(_0x1143ea,_0x226cb4):_0x1143ea,_0x388e6e=_0x41ed67['length']-0x1,_0x2445ba;_0x388e6e>=0x0;_0x388e6e--)(_0x2445ba=_0x41ed67[_0x388e6e])&&(_0x4da85d=_0x2445ba(_0x4da85d)||_0x4da85d);return _0x4da85d;},_0x22ff95=(_0x3a57a7,_0x3a55b1)=>(_0x7b3141,_0x493cae)=>_0x3a55b1(_0x7b3141,_0x493cae,_0x3a57a7);let _0x4a98a2=class extends _0x4db6d5[_0x5f2104(0x1e1)]{constructor(_0x3759b7,_0x3b1c67){const _0x2bbcba=_0x5f2104;super(),this['_threadCommentDataSourceService']=_0x3759b7,this['_threadCommentDataSource']=_0x3b1c67,this[_0x2bbcba(0x171)]();}[_0x5f2104(0x171)](){const _0x27fbb7=_0x5f2104;this[_0x27fbb7(0x1c2)][_0x27fbb7(0x1ec)]=this[_0x27fbb7(0x1c3)],this[_0x27fbb7(0x1c2)][_0x27fbb7(0x1dc)]=!0x1;}};_0x4a98a2=_0x3a82d7([_0x22ff95(0x0,_0x31e269['IThreadCommentDataSourceService']),_0x22ff95(0x1,_0x4db6d5[_0x5f2104(0x17b)](_0x4d429c))],_0x4a98a2);var _0x3aa5bb=Object[_0x5f2104(0x188)],_0x3f72c5=Object[_0x5f2104(0x187)],_0x53bfc8=(_0x10ae59,_0x5ee202,_0x2e8318)=>_0x5ee202 in _0x10ae59?_0x3aa5bb(_0x10ae59,_0x5ee202,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e8318}):_0x10ae59[_0x5ee202]=_0x2e8318,_0x75fa9b=(_0x4177dd,_0x1afc40,_0x4e6862,_0x2b64bb)=>{for(var _0x58fa3a=_0x2b64bb>0x1?void 0x0:_0x2b64bb?_0x3f72c5(_0x1afc40,_0x4e6862):_0x1afc40,_0x16eb59=_0x4177dd['length']-0x1,_0x23017c;_0x16eb59>=0x0;_0x16eb59--)(_0x23017c=_0x4177dd[_0x16eb59])&&(_0x58fa3a=_0x23017c(_0x58fa3a)||_0x58fa3a);return _0x58fa3a;},_0x3fd815=(_0x3d7e18,_0x5d4f4a)=>(_0x1dd298,_0x20c4c2)=>_0x5d4f4a(_0x1dd298,_0x20c4c2,_0x3d7e18),_0x334345=(_0x33d7db,_0x33f734,_0x45b017)=>_0x53bfc8(_0x33d7db,typeof _0x33f734!='symbol'?_0x33f734+'':_0x33f734,_0x45b017);_0x4c9c42['UniverThreadCommentDataSourcePlugin']=class extends _0x4db6d5[_0x5f2104(0x1b8)]{constructor(_0x2622cf=_0x1ebf6a,_0x712a31,_0x56392a){const _0x309d1f=_0x5f2104;super(),this[_0x309d1f(0x1cd)]=_0x2622cf,this[_0x309d1f(0x1f2)]=_0x712a31,this[_0x309d1f(0x1c0)]=_0x56392a;const {..._0x18ca64}=_0x4db6d5['merge']({},_0x1ebf6a,this[_0x309d1f(0x1cd)]);this[_0x309d1f(0x1c0)][_0x309d1f(0x1b7)](_0x27462f,_0x18ca64);}[_0x5f2104(0x1a8)](){const _0x4968fc=_0x5f2104;[[_0x4d429c],[_0x4a98a2],[_0xd04f3c]][_0x4968fc(0x17e)](_0x4d3785=>{const _0x36c76a=_0x4968fc;this[_0x36c76a(0x1f2)][_0x36c76a(0x1a1)](_0x4d3785);});}[_0x5f2104(0x1eb)](){const _0x33a255=_0x5f2104;this[_0x33a255(0x1f2)]['get'](_0x4a98a2),this[_0x33a255(0x1f2)]['get'](_0xd04f3c);}},_0x334345(_0x4c9c42['UniverThreadCommentDataSourcePlugin'],_0x5f2104(0x1c4),_0x2e64ca),_0x334345(_0x4c9c42['UniverThreadCommentDataSourcePlugin'],'type',_0x4db6d5[_0x5f2104(0x1a6)][_0x5f2104(0x182)]),_0x4c9c42['UniverThreadCommentDataSourcePlugin']=_0x75fa9b([_0x4db6d5[_0x5f2104(0x198)](_0x573e60[_0x5f2104(0x1d9)],_0x56d33[_0x5f2104(0x1c6)],_0x2b8469['UniverLicensePlugin']),_0x3fd815(0x1,_0x4db6d5['Inject'](_0x4db6d5[_0x5f2104(0x1ab)])),_0x3fd815(0x2,_0x4db6d5[_0x5f2104(0x192)])],_0x4c9c42['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x4c9c42,Symbol[_0x5f2104(0x1cc)],{'value':_0x5f2104(0x194)});}));
|
|
1
|
+
(function(_0x86a69a,_0x54fa86){const _0xd758f1=_0x1af2,_0x2e67b2=_0x86a69a();while(!![]){try{const _0x2e845e=-parseInt(_0xd758f1(0x1be))/0x1*(-parseInt(_0xd758f1(0x1b2))/0x2)+-parseInt(_0xd758f1(0x13c))/0x3*(parseInt(_0xd758f1(0x141))/0x4)+parseInt(_0xd758f1(0x17b))/0x5+parseInt(_0xd758f1(0x1ab))/0x6*(parseInt(_0xd758f1(0x184))/0x7)+-parseInt(_0xd758f1(0x149))/0x8*(-parseInt(_0xd758f1(0x154))/0x9)+-parseInt(_0xd758f1(0x1ad))/0xa+parseInt(_0xd758f1(0x1b8))/0xb*(-parseInt(_0xd758f1(0x1a9))/0xc);if(_0x2e845e===_0x54fa86)break;else _0x2e67b2['push'](_0x2e67b2['shift']());}catch(_0x96302){_0x2e67b2['push'](_0x2e67b2['shift']());}}}(_0x3c95,0xafeea),function(_0x505a51,_0x8476bf){const _0x152dd6=_0x1af2;typeof exports==_0x152dd6(0x178)&&typeof module<'u'?_0x8476bf(exports,require(_0x152dd6(0x176)),require(_0x152dd6(0x156)),require(_0x152dd6(0x19f)),require('@univerjs/thread-comment-ui'),require(_0x152dd6(0x151)),require(_0x152dd6(0x142)),require(_0x152dd6(0x1b3))):typeof define==_0x152dd6(0x1aa)&&define[_0x152dd6(0x169)]?define([_0x152dd6(0x157),_0x152dd6(0x176),_0x152dd6(0x156),'@univerjs/core','@univerjs/thread-comment-ui',_0x152dd6(0x151),_0x152dd6(0x142),'@univerjs/network'],_0x8476bf):(_0x505a51=typeof globalThis<'u'?globalThis:_0x505a51||self,_0x8476bf(_0x505a51[_0x152dd6(0x196)]={},_0x505a51[_0x152dd6(0x165)],_0x505a51['UniverProLicense'],_0x505a51[_0x152dd6(0x18d)],_0x505a51[_0x152dd6(0x198)],_0x505a51[_0x152dd6(0x1bb)],_0x505a51[_0x152dd6(0x142)],_0x505a51[_0x152dd6(0x19d)]));}(this,function(_0x54c443,_0x17f06f,_0x27b3c8,_0x5af020,_0x11abb0,_0x1affee,_0x47f407,_0x61f4b4){'use strict';const _0x2f3eb6=_0x1af2;const _0x53620e=_0x2f3eb6(0x143);var _0x18219b=(_0x4b914e=>(_0x4b914e[_0x4b914e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4b914e[_0x4b914e['Solved']=0x1]='Solved',_0x4b914e[_0x4b914e[_0x2f3eb6(0x13b)]=-0x1]='UNRECOGNIZED',_0x4b914e))(_0x18219b||{}),_0x357c5d=(_0x3f2f6d=>(_0x3f2f6d[_0x3f2f6d['Unknown']=0x0]=_0x2f3eb6(0x179),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x173)]=0x1]='Add',_0x3f2f6d[_0x3f2f6d['Reply']=0x2]=_0x2f3eb6(0x183),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x172)]=0x3]=_0x2f3eb6(0x172),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x192)]=0x4]=_0x2f3eb6(0x192),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x19b)]=0x5]='Solve',_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x13b)]=-0x1]=_0x2f3eb6(0x13b),_0x3f2f6d))(_0x357c5d||{});const _0x2ae6c5=_0x3d3c5d=>_0x5af020['dayjs'](new Date(+_0x3d3c5d))['format'](_0x2f3eb6(0x15b)),_0x15f18c=async(_0x37a68f,_0x567003)=>{const _0x5c13f2=_0x2f3eb6,_0x28b5a6=_0x37a68f[_0x5c13f2(0x180)](_0x5af020[_0x5c13f2(0x15d)]),_0x59617c=_0x37a68f[_0x5c13f2(0x180)](_0x61f4b4[_0x5c13f2(0x155)]);_0x567003[_0x5c13f2(0x1a6)](_0xcc07d1=>{_0x28b5a6['getUser'](_0xcc07d1)&&_0x567003['delete'](_0xcc07d1);}),_0x567003[_0x5c13f2(0x13e)]&&(await _0x59617c['get'](_0x5c13f2(0x193),{'params':{'userIDs':[..._0x567003]}}))[_0x5c13f2(0x174)][_0x5c13f2(0x1a3)][_0x5c13f2(0x1a6)](_0x29b9c1=>{const _0x9b6fb3=_0x5c13f2;_0x29b9c1&&_0x28b5a6[_0x9b6fb3(0x15e)](_0x29b9c1);});};var _0x9fdb87=Object[_0x2f3eb6(0x14b)],_0x4bee03=(_0x28c2c3,_0x2b4af5,_0x399b24,_0x467ace)=>{const _0x12247a=_0x2f3eb6;for(var _0x328404=_0x467ace>0x1?void 0x0:_0x467ace?_0x9fdb87(_0x2b4af5,_0x399b24):_0x2b4af5,_0xec4f86=_0x28c2c3[_0x12247a(0x189)]-0x1,_0x375a75;_0xec4f86>=0x0;_0xec4f86--)(_0x375a75=_0x28c2c3[_0xec4f86])&&(_0x328404=_0x375a75(_0x328404)||_0x328404);return _0x328404;},_0x5c13d6=(_0x2751a5,_0x4a3475)=>(_0xe79715,_0x518397)=>_0x4a3475(_0xe79715,_0x518397,_0x2751a5);let _0x303fa7=class extends _0x5af020[_0x2f3eb6(0x1a2)]{constructor(_0x3bc234,_0x26a5df,_0x339e36,_0x12d5f2){const _0x3f1054=_0x2f3eb6;super(),this['_commentService']=_0x3bc234,this[_0x3f1054(0x17e)]=_0x26a5df,this[_0x3f1054(0x194)]=_0x339e36,this['_injector']=_0x12d5f2,this[_0x3f1054(0x145)](),this['_initUserSync']();}[_0x2f3eb6(0x15a)](){const _0xb15f97=_0x2f3eb6;this[_0xb15f97(0x170)](this[_0xb15f97(0x17e)][_0xb15f97(0x160)][_0xb15f97(0x1a5)](_0x47f407['bufferTime'](0x10))[_0xb15f97(0x13f)](_0x1f6118=>{const _0x18805d=_0xb15f97,_0x49d58e=new Set();_0x1f6118[_0x18805d(0x1a6)](_0x4f9441=>{const _0x5a17e0=_0x18805d;switch(_0x4f9441[_0x5a17e0(0x1a4)]){case'add':{const _0x25c7d1=_0x4f9441[_0x5a17e0(0x188)]['personId'];_0x49d58e[_0x5a17e0(0x14c)](_0x25c7d1);break;}}}),_0x15f18c(this[_0x18805d(0x1a7)],_0x49d58e);}));}[_0x2f3eb6(0x145)](){const _0x5c6c83=_0x2f3eb6;this[_0x5c6c83(0x170)](this[_0x5c6c83(0x1c4)]['commentUpdate$'][_0x5c6c83(0x13f)](async _0x3c28cf=>{const _0x1e5f53=_0x5c6c83;var _0x3e5d47,_0x13c85d,_0xb4a3eb,_0xe6fd97;const _0x35cc20=(_0x3e5d47=this[_0x1e5f53(0x17e)]['getUnit'](_0x3c28cf[_0x1e5f53(0x1b1)])[_0x1e5f53(0x14d)](_0x4ddb5b=>_0x4ddb5b[_0x1e5f53(0x168)]===_0x3c28cf['threadId']))==null?void 0x0:_0x3e5d47[_0x1e5f53(0x18c)];if(!_0x35cc20)return;const {unitId:_0x3215f8,subUnitId:_0x29b39f}=_0x35cc20;switch(_0x3c28cf[_0x1e5f53(0x153)]&&this[_0x1e5f53(0x194)][_0x1e5f53(0x15e)](_0x3c28cf['user']),_0x3c28cf[_0x1e5f53(0x1a4)]){case _0x357c5d['Add']:break;case _0x357c5d['Reply']:{this['_threadCommentModel']['addComment'](_0x3215f8,_0x29b39f,{'unitId':_0x3215f8,'subUnitId':_0x29b39f,'ref':'','id':_0x3c28cf[_0x1e5f53(0x14a)],'dT':_0x2ae6c5(+_0x3c28cf['createTimestamp']),'threadId':_0x3c28cf['threadId'],'personId':(_0xb4a3eb=(_0x13c85d=_0x3c28cf[_0x1e5f53(0x153)])==null?void 0x0:_0x13c85d['userID'])!=null?_0xb4a3eb:_0x3c28cf[_0x1e5f53(0x1c1)],'text':JSON[_0x1e5f53(0x18e)](_0x3c28cf[_0x1e5f53(0x14e)]),'parentId':_0x35cc20['id']});break;}case _0x357c5d[_0x1e5f53(0x192)]:{const _0x26b8ab=this[_0x1e5f53(0x17e)][_0x1e5f53(0x150)](_0x3215f8,_0x29b39f,_0x3c28cf[_0x1e5f53(0x14a)]);_0x26b8ab&&_0x26b8ab[_0x1e5f53(0x1af)]&&this['_threadCommentModel']['deleteComment'](_0x3215f8,_0x29b39f,_0x3c28cf[_0x1e5f53(0x14a)]);break;}case _0x357c5d[_0x1e5f53(0x172)]:{this[_0x1e5f53(0x17e)][_0x1e5f53(0x15c)](_0x3215f8,_0x29b39f,{'commentId':_0x3c28cf[_0x1e5f53(0x14a)],'text':JSON[_0x1e5f53(0x18e)](_0x3c28cf['content'])});break;}case _0x357c5d[_0x1e5f53(0x19b)]:{const _0x3bca79=(_0xe6fd97=this['_threadCommentModel']['getUnit'](_0x3c28cf[_0x1e5f53(0x1b1)])[_0x1e5f53(0x14d)](_0x3c5507=>_0x3c5507['threadId']===_0x3c28cf['threadId']))==null?void 0x0:_0xe6fd97[_0x1e5f53(0x18c)];_0x3bca79&&this[_0x1e5f53(0x17e)][_0x1e5f53(0x1a1)](_0x3215f8,_0x29b39f,_0x3bca79['id'],_0x3c28cf[_0x1e5f53(0x1c0)]===_0x18219b[_0x1e5f53(0x16a)]);break;}}}));}};_0x303fa7=_0x4bee03([_0x5c13d6(0x0,_0x5af020[_0x2f3eb6(0x1b7)](_0x17f06f[_0x2f3eb6(0x1bf)])),_0x5c13d6(0x1,_0x5af020['Inject'](_0x1affee[_0x2f3eb6(0x167)])),_0x5c13d6(0x2,_0x5af020['Inject'](_0x5af020[_0x2f3eb6(0x15d)])),_0x5c13d6(0x3,_0x5af020[_0x2f3eb6(0x1b7)](_0x5af020['Injector']))],_0x303fa7);const _0x4ac308='thread-comment-data-source.config',_0x7f1c54={};var _0x418b8a=Object[_0x2f3eb6(0x14b)],_0x3d504d=(_0x5588b3,_0x378f53,_0x4abcf9,_0x5d609b)=>{const _0xfa7a06=_0x2f3eb6;for(var _0x398e2d=_0x5d609b>0x1?void 0x0:_0x5d609b?_0x418b8a(_0x378f53,_0x4abcf9):_0x378f53,_0x2b2e9e=_0x5588b3[_0xfa7a06(0x189)]-0x1,_0x17837d;_0x2b2e9e>=0x0;_0x2b2e9e--)(_0x17837d=_0x5588b3[_0x2b2e9e])&&(_0x398e2d=_0x17837d(_0x398e2d)||_0x398e2d);return _0x398e2d;},_0x14cfd5=(_0x1fa72c,_0x42d076)=>(_0x55529f,_0x1988b3)=>_0x42d076(_0x55529f,_0x1988b3,_0x1fa72c);function _0x4666b2(_0x2cab68,_0x1a1c67){const _0x2bc2a5=_0x2f3eb6,_0x489f44=_0x2cab68[_0x2bc2a5(0x175)][0x0];return{..._0x1a1c67,'id':_0x489f44[_0x2bc2a5(0x14a)],'resolved':_0x2cab68[_0x2bc2a5(0x1c0)]===0x1,'dT':_0x2ae6c5(_0x489f44[_0x2bc2a5(0x19a)]),'personId':_0x489f44[_0x2bc2a5(0x1c1)],'threadId':_0x489f44['threadId']};}function _0xbd3c07(_0x17d9dc,_0x2fa7eb,_0x28535d){const _0x4f1fae=_0x2f3eb6;var _0x1847e7,_0x16ada5;if(((_0x16ada5=(_0x1847e7=_0x17d9dc==null?void 0x0:_0x17d9dc[_0x4f1fae(0x175)])==null?void 0x0:_0x1847e7[_0x4f1fae(0x189)])!=null?_0x16ada5:0x0)>0x0){const _0x233fd4=(_0x4b58bf,_0x2c5df1)=>({'id':_0x4b58bf[_0x4f1fae(0x14a)],'threadId':_0x4b58bf[_0x4f1fae(0x168)],'dT':_0x2ae6c5(_0x4b58bf[_0x4f1fae(0x19a)]),'personId':_0x4b58bf[_0x4f1fae(0x1c1)],'resolved':_0x17d9dc[_0x4f1fae(0x1c0)]===_0x18219b[_0x4f1fae(0x16a)],'unitId':_0x2fa7eb,'subUnitId':_0x28535d,'text':JSON[_0x4f1fae(0x18e)](_0x4b58bf[_0x4f1fae(0x14e)]),'parentId':_0x2c5df1}),_0x4ab9f6=_0x233fd4(_0x17d9dc[_0x4f1fae(0x175)][0x0]);return{..._0x4ab9f6,'children':_0x17d9dc[_0x4f1fae(0x175)]['slice'](0x1)['map'](_0x2133fb=>_0x233fd4(_0x2133fb,_0x4ab9f6['id']))};}return null;}let _0x733606=class{constructor(_0x428051,_0x3a187a,_0x3ba0fe,_0x569fe6){const _0x3e5d36=_0x2f3eb6;this[_0x3e5d36(0x1b9)]=_0x428051,this[_0x3e5d36(0x194)]=_0x3a187a,this[_0x3e5d36(0x147)]=_0x3ba0fe,this[_0x3e5d36(0x1a7)]=_0x569fe6;}async[_0x2f3eb6(0x148)](_0x393736){const _0x3422b3=_0x2f3eb6;var _0x583522,_0x32b3ae;const {parentId:_0x39eb93,unitId:_0x4ee73d,text:_0x1d508e,threadId:_0x27b866}=_0x393736,_0x11767b=(_0x32b3ae=(_0x583522=_0x1d508e[_0x3422b3(0x146)])==null?void 0x0:_0x583522[_0x3422b3(0x195)](_0x336fae=>_0x336fae[_0x3422b3(0x1b6)]===_0x5af020[_0x3422b3(0x161)]['COMMENT'])[_0x3422b3(0x1ae)](_0x3de5b3=>_0x3de5b3['rangeId']))!=null?_0x32b3ae:[],_0x4c76e3=JSON[_0x3422b3(0x166)](_0x1d508e),_0x5d8ce0=(await this[_0x3422b3(0x147)][_0x3422b3(0x1ac)](_0x4ee73d))[_0x3422b3(0x1c2)]();if(_0x39eb93){const _0x56f8ba={'memberId':_0x5d8ce0,'unitId':_0x4ee73d,'content':_0x4c76e3,'mention':_0x11767b,'threadId':_0x27b866},_0x54e048=(await this[_0x3422b3(0x1b9)]['post'](_0x3422b3(0x18f)+_0x4ee73d+_0x3422b3(0x16e),{'body':_0x56f8ba}))[_0x3422b3(0x174)]['reply'];return{..._0x393736,'id':_0x54e048[_0x3422b3(0x14a)],'dT':_0x5af020[_0x3422b3(0x13a)](+_0x54e048[_0x3422b3(0x19a)])['format'](_0x3422b3(0x15b)),'personId':_0x54e048[_0x3422b3(0x1c1)]};}else{const _0x38b7da={'memberId':_0x5d8ce0,'unitId':_0x4ee73d,'content':_0x4c76e3,'mention':_0x11767b},_0x17ba61=await this[_0x3422b3(0x1b9)][_0x3422b3(0x187)](_0x3422b3(0x18f)+_0x4ee73d+_0x3422b3(0x171),{'body':_0x38b7da});return _0x4666b2(_0x17ba61[_0x3422b3(0x174)][_0x3422b3(0x17f)],_0x393736);}}async[_0x2f3eb6(0x15c)](_0x3259b7){const _0x1443ab=_0x2f3eb6;var _0x480695,_0x414cf5;const {text:_0x460ead,unitId:_0x2db669}=_0x3259b7,_0x36fdc1=(_0x414cf5=(_0x480695=_0x460ead['customRanges'])==null?void 0x0:_0x480695[_0x1443ab(0x195)](_0x2bff2f=>_0x2bff2f[_0x1443ab(0x1b6)]===_0x5af020[_0x1443ab(0x161)][_0x1443ab(0x1a8)])['map'](_0x1e9216=>_0x1e9216[_0x1443ab(0x1a0)]))!=null?_0x414cf5:[],_0x1cbd26=JSON[_0x1443ab(0x166)](_0x460ead),_0x364c34=_0x3259b7[_0x1443ab(0x168)],_0x5c2550=_0x3259b7['id'],_0x2456ce={'memberId':(await this[_0x1443ab(0x147)][_0x1443ab(0x1ac)](_0x2db669))[_0x1443ab(0x1c2)](),'unitId':_0x2db669,'threadId':_0x364c34,'mention':_0x36fdc1,'content':_0x1cbd26,'replyId':_0x5c2550},_0x362404=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2db669+_0x1443ab(0x15f),{'body':_0x2456ce});return!_0x362404['body'][_0x1443ab(0x16f)]||_0x362404[_0x1443ab(0x174)]['error']['code']===0x1;}async[_0x2f3eb6(0x1a1)](_0x50906f){const _0x420b2b=_0x2f3eb6,{unitId:_0x2dbb40}=_0x50906f,_0x51f0fa=_0x50906f[_0x420b2b(0x168)],_0x496287={'memberId':this[_0x420b2b(0x194)][_0x420b2b(0x181)]()['userID'],'unitId':_0x2dbb40,'threadId':_0x51f0fa,'solved':_0x50906f[_0x420b2b(0x1bd)]?_0x18219b[_0x420b2b(0x16a)]:_0x18219b[_0x420b2b(0x16c)]},_0x12cf14=await this[_0x420b2b(0x1b9)][_0x420b2b(0x187)](_0x420b2b(0x18f)+_0x2dbb40+_0x420b2b(0x1ba),{'body':_0x496287});return!_0x12cf14[_0x420b2b(0x174)][_0x420b2b(0x16f)]||_0x12cf14[_0x420b2b(0x174)][_0x420b2b(0x16f)][_0x420b2b(0x1b0)]===0x1;}async[_0x2f3eb6(0x186)](_0x553d61,_0x4700b3,_0x20d3bb,_0x52bd82){const _0x14934a=_0x2f3eb6,_0x205875={'memberId':(await this[_0x14934a(0x147)][_0x14934a(0x1ac)](_0x553d61))[_0x14934a(0x1c2)](),'threadId':_0x20d3bb,'replyId':_0x52bd82,'unitId':_0x553d61},_0x48f0a2=await this[_0x14934a(0x1b9)][_0x14934a(0x187)](_0x14934a(0x18f)+_0x553d61+_0x14934a(0x152),{'body':_0x205875});return!_0x48f0a2[_0x14934a(0x174)]['error']||_0x48f0a2[_0x14934a(0x174)][_0x14934a(0x16f)][_0x14934a(0x1b0)]===0x1;}async[_0x2f3eb6(0x1b5)](_0x621d7c,_0x3bb61c,_0x3dc855){const _0x925dc0=_0x2f3eb6,_0xc9ec5d={'unitId':_0x621d7c,'threadId':_0x3dc855},_0x4cf06c=await this[_0x925dc0(0x1b9)][_0x925dc0(0x187)](_0x925dc0(0x18f)+_0x621d7c+_0x925dc0(0x1c3),{'body':_0xc9ec5d}),_0x4dc681=_0x3dc855[_0x925dc0(0x1ae)](_0x2b0b1e=>_0xbd3c07(_0x4cf06c['body'][_0x925dc0(0x16d)][_0x2b0b1e],_0x621d7c,_0x3bb61c))['filter'](Boolean);return Object['values'](_0x4cf06c[_0x925dc0(0x174)][_0x925dc0(0x1a3)])[_0x925dc0(0x1a6)](_0x14ce9e=>{const _0x2c3a39=_0x925dc0;this[_0x2c3a39(0x194)]['addUser'](_0x14ce9e);}),_0x4dc681;}[_0x2f3eb6(0x18a)](_0x50206d){const _0x434267=_0x2f3eb6;return{'id':_0x50206d['id'],'threadId':_0x50206d[_0x434267(0x168)],'ref':_0x50206d[_0x434267(0x1bc)]};}};_0x733606=_0x3d504d([_0x14cfd5(0x0,_0x5af020[_0x2f3eb6(0x1b7)](_0x61f4b4[_0x2f3eb6(0x155)])),_0x14cfd5(0x1,_0x5af020['Inject'](_0x5af020[_0x2f3eb6(0x15d)])),_0x14cfd5(0x2,_0x5af020[_0x2f3eb6(0x1b7)](_0x17f06f[_0x2f3eb6(0x18b)])),_0x14cfd5(0x3,_0x5af020[_0x2f3eb6(0x1b7)](_0x5af020[_0x2f3eb6(0x190)]))],_0x733606);var _0x497c40=Object[_0x2f3eb6(0x14b)],_0x683968=(_0x2d99c2,_0x36986f,_0xf3d3a5,_0x39d79b)=>{const _0x276060=_0x2f3eb6;for(var _0x5d01c2=_0x39d79b>0x1?void 0x0:_0x39d79b?_0x497c40(_0x36986f,_0xf3d3a5):_0x36986f,_0x1dd166=_0x2d99c2[_0x276060(0x189)]-0x1,_0x2f1b7a;_0x1dd166>=0x0;_0x1dd166--)(_0x2f1b7a=_0x2d99c2[_0x1dd166])&&(_0x5d01c2=_0x2f1b7a(_0x5d01c2)||_0x5d01c2);return _0x5d01c2;},_0x1b7c4b=(_0x3b9906,_0x7be051)=>(_0x40b810,_0x181976)=>_0x7be051(_0x40b810,_0x181976,_0x3b9906);let _0xbab93=class extends _0x5af020[_0x2f3eb6(0x1a2)]{constructor(_0x5879b2,_0x2fc1c4){const _0x136330=_0x2f3eb6;super(),this['_threadCommentDataSourceService']=_0x5879b2,this[_0x136330(0x14f)]=_0x2fc1c4,this['_initDataSource']();}['_initDataSource'](){const _0x82d559=_0x2f3eb6;this['_threadCommentDataSourceService'][_0x82d559(0x162)]=this['_threadCommentDataSource'],this[_0x82d559(0x1b4)][_0x82d559(0x159)]=!0x1;}};_0xbab93=_0x683968([_0x1b7c4b(0x0,_0x1affee[_0x2f3eb6(0x199)]),_0x1b7c4b(0x1,_0x5af020[_0x2f3eb6(0x1b7)](_0x733606))],_0xbab93);var _0x3d53df=Object[_0x2f3eb6(0x197)],_0x51d39b=Object['getOwnPropertyDescriptor'],_0x51ac15=(_0x20daed,_0x548536,_0x277fd4)=>_0x548536 in _0x20daed?_0x3d53df(_0x20daed,_0x548536,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x277fd4}):_0x20daed[_0x548536]=_0x277fd4,_0x2f3f38=(_0x15a4c0,_0x545e0e,_0x5b00f1,_0x265b23)=>{const _0x3a5cdf=_0x2f3eb6;for(var _0x3fdb95=_0x265b23>0x1?void 0x0:_0x265b23?_0x51d39b(_0x545e0e,_0x5b00f1):_0x545e0e,_0x1b835a=_0x15a4c0[_0x3a5cdf(0x189)]-0x1,_0x5b0e58;_0x1b835a>=0x0;_0x1b835a--)(_0x5b0e58=_0x15a4c0[_0x1b835a])&&(_0x3fdb95=_0x5b0e58(_0x3fdb95)||_0x3fdb95);return _0x3fdb95;},_0x21605c=(_0x5107a8,_0xa7e4d5)=>(_0x204fd5,_0x101a83)=>_0xa7e4d5(_0x204fd5,_0x101a83,_0x5107a8),_0x4222c3=(_0x12698f,_0x407daa,_0x1e31b4)=>_0x51ac15(_0x12698f,typeof _0x407daa!='symbol'?_0x407daa+'':_0x407daa,_0x1e31b4);_0x54c443['UniverThreadCommentDataSourcePlugin']=class extends _0x5af020[_0x2f3eb6(0x17d)]{constructor(_0x4ba840=_0x7f1c54,_0x385eed,_0x48e800){const _0x1c93b6=_0x2f3eb6;super(),this[_0x1c93b6(0x164)]=_0x4ba840,this[_0x1c93b6(0x1a7)]=_0x385eed,this[_0x1c93b6(0x163)]=_0x48e800;const {..._0x417ed5}=_0x5af020[_0x1c93b6(0x185)]({},_0x7f1c54,this[_0x1c93b6(0x164)]);this['_configService'][_0x1c93b6(0x177)](_0x4ac308,_0x417ed5);}['onStarting'](){const _0x54fffc=_0x2f3eb6;[[_0x733606],[_0xbab93],[_0x303fa7]][_0x54fffc(0x1a6)](_0x4a81aa=>{const _0x494567=_0x54fffc;this['_injector'][_0x494567(0x14c)](_0x4a81aa);});}['onReady'](){const _0x1964f8=_0x2f3eb6;this[_0x1964f8(0x1a7)][_0x1964f8(0x180)](_0xbab93),this[_0x1964f8(0x1a7)][_0x1964f8(0x180)](_0x303fa7);}},_0x4222c3(_0x54c443['UniverThreadCommentDataSourcePlugin'],_0x2f3eb6(0x158),_0x53620e),_0x4222c3(_0x54c443['UniverThreadCommentDataSourcePlugin'],_0x2f3eb6(0x1a4),_0x5af020[_0x2f3eb6(0x19c)][_0x2f3eb6(0x17a)]),_0x54c443[_0x2f3eb6(0x16b)]=_0x2f3f38([_0x5af020[_0x2f3eb6(0x17c)](_0x11abb0[_0x2f3eb6(0x140)],_0x17f06f[_0x2f3eb6(0x13d)],_0x27b3c8[_0x2f3eb6(0x182)]),_0x21605c(0x1,_0x5af020[_0x2f3eb6(0x1b7)](_0x5af020[_0x2f3eb6(0x190)])),_0x21605c(0x2,_0x5af020[_0x2f3eb6(0x144)])],_0x54c443['UniverThreadCommentDataSourcePlugin']),Object[_0x2f3eb6(0x197)](_0x54c443,Symbol[_0x2f3eb6(0x191)],{'value':_0x2f3eb6(0x19e)});}));function _0x1af2(_0x66b7f5,_0x4fbe28){const _0x3c95af=_0x3c95();return _0x1af2=function(_0x1af2d3,_0x2609f8){_0x1af2d3=_0x1af2d3-0x13a;let _0x9f0ace=_0x3c95af[_0x1af2d3];return _0x9f0ace;},_0x1af2(_0x66b7f5,_0x4fbe28);}function _0x3c95(){const _0xd91313=['stringify','ThreadCommentModel','threadId','amd','Solved','UniverThreadCommentDataSourcePlugin','OpenOrReOpen','comments','/reply','error','disposeWithMe','/add','Edit','Add','body','replies','@univerjs-pro/collaboration-client','setConfig','object','Unknown','UNIVER_UNKNOWN','4570675yVyIoJ','DependentOn','Plugin','_threadCommentModel','comment','get','getCurrentUser','UniverLicensePlugin','Reply','234899lfsyZi','merge','deleteComment','post','payload','length','saveCommentToSnapshot','CollaborationSessionService','root','UniverCore','parse','/universer-api/comment/unit/','Injector','toStringTag','Delete','/universer-api/user/list','_userService','filter','UniverProThreadCommentDatasource','defineProperty','UniverThreadCommentUi','IThreadCommentDataSourceService','createTimestamp','Solve','UniverInstanceType','UniverNetwork','Module','@univerjs/core','rangeId','resolveComment','Disposable','users','type','pipe','forEach','_injector','COMMENT','1476jawRnZ','function','114YJrMfN','requireSession','5290250deGMgS','map','parentId','code','unitId','2918kVZCPU','@univerjs/network','_threadCommentDataSourceService','listComments','rangeType','Inject','146663cWYkzo','_httpService','/solved','UniverThreadComment','ref','resolved','667LhmXkK','CommentService','solved','userId','getMemberID','/list','_commentService','dayjs','UNRECOGNIZED','351141ajqngL','UniverCollaborationClientPlugin','size','subscribe','UniverThreadCommentUIPlugin','20fxTlXD','rxjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','_init','customRanges','_sessionService','addComment','3799864rHIYmM','replyId','getOwnPropertyDescriptor','add','find','content','_threadCommentDataSource','getComment','@univerjs/thread-comment','/delete','user','18SkUqcH','HTTPService','@univerjs-pro/license','exports','pluginName','syncUpdateMutationToColla','_initUserSync','YYYY/MM/DD\x20HH:mm','updateComment','UserManagerService','addUser','/edit','commentUpdate$','CustomRangeType','dataSource','_configService','_config','UniverProCollaborationClient'];_0x3c95=function(){return _0xd91313;};return _0x3c95();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.0-nightly.
|
|
3
|
+
"version": "0.8.0-nightly.202505271607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.0-nightly.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/core": "0.8.0-nightly.
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.8.0-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202505271607",
|
|
49
|
+
"@univerjs/network": "0.8.0-nightly.202505271607",
|
|
50
|
+
"@univerjs/core": "0.8.0-nightly.202505271607",
|
|
51
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202505271607",
|
|
52
|
+
"@univerjs-pro/license": "0.8.0-nightly.202505271607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202505271607",
|
|
54
|
+
"@univerjs/protocol": "0.1.47-alpha.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|