@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202506091607 → 0.8.0-nightly.202506111607
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/types/services/comment.data-source.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1d7798=_0x3869;(function(_0x177410,_0x5e7d6b){const _0x24a8dc=_0x3869,_0x470920=_0x177410();while(!![]){try{const _0x15e108=-parseInt(_0x24a8dc(0x21a))/0x1*(-parseInt(_0x24a8dc(0x1e4))/0x2)+-parseInt(_0x24a8dc(0x208))/0x3*(-parseInt(_0x24a8dc(0x1ef))/0x4)+-parseInt(_0x24a8dc(0x1db))/0x5+-parseInt(_0x24a8dc(0x244))/0x6*(-parseInt(_0x24a8dc(0x1e9))/0x7)+parseInt(_0x24a8dc(0x23c))/0x8+parseInt(_0x24a8dc(0x1f9))/0x9*(parseInt(_0x24a8dc(0x20c))/0xa)+-parseInt(_0x24a8dc(0x236))/0xb;if(_0x15e108===_0x5e7d6b)break;else _0x470920['push'](_0x470920['shift']());}catch(_0x490fba){_0x470920['push'](_0x470920['shift']());}}}(_0x36c7,0xd175f));Object[_0x1d7798(0x1fd)](exports,Symbol[_0x1d7798(0x225)],{'value':_0x1d7798(0x209)});const b=require(_0x1d7798(0x246)),T=require(_0x1d7798(0x23b)),c=require('@univerjs/core'),j=require(_0x1d7798(0x23f)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x1d7798(0x239)),U=_0x1d7798(0x217);var I=(_0x2c36a6=>(_0x2c36a6[_0x2c36a6['OpenOrReOpen']=0x0]=_0x1d7798(0x22e),_0x2c36a6[_0x2c36a6[_0x1d7798(0x1e5)]=0x1]=_0x1d7798(0x1e5),_0x2c36a6[_0x2c36a6['UNRECOGNIZED']=-0x1]=_0x1d7798(0x1f5),_0x2c36a6))(I||{}),v=(_0x3aadaf=>(_0x3aadaf[_0x3aadaf[_0x1d7798(0x201)]=0x0]=_0x1d7798(0x201),_0x3aadaf[_0x3aadaf[_0x1d7798(0x1e6)]=0x1]=_0x1d7798(0x1e6),_0x3aadaf[_0x3aadaf[_0x1d7798(0x221)]=0x2]=_0x1d7798(0x221),_0x3aadaf[_0x3aadaf[_0x1d7798(0x20f)]=0x3]=_0x1d7798(0x20f),_0x3aadaf[_0x3aadaf[_0x1d7798(0x1eb)]=0x4]='Delete',_0x3aadaf[_0x3aadaf[_0x1d7798(0x232)]=0x5]=_0x1d7798(0x232),_0x3aadaf[_0x3aadaf[_0x1d7798(0x1f5)]=-0x1]='UNRECOGNIZED',_0x3aadaf))(v||{});const f=_0x2d48fa=>c[_0x1d7798(0x204)](new Date(+_0x2d48fa))[_0x1d7798(0x226)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x5efb1d,_0x44c0b)=>{const _0x5f4044=_0x1d7798,_0x4a739d=_0x5efb1d[_0x5f4044(0x20a)](c['UserManagerService']),_0x18465b=_0x5efb1d[_0x5f4044(0x20a)](P[_0x5f4044(0x1d6)]);_0x44c0b[_0x5f4044(0x1d1)](_0x1d03b1=>{const _0x67974b=_0x5f4044;_0x4a739d[_0x67974b(0x1ec)](_0x1d03b1)&&_0x44c0b[_0x67974b(0x215)](_0x1d03b1);}),_0x44c0b[_0x5f4044(0x1fc)]&&(await _0x18465b[_0x5f4044(0x20a)](_0x5f4044(0x1cb),{'params':{'userIDs':[..._0x44c0b]}}))[_0x5f4044(0x1fa)]['users'][_0x5f4044(0x1d1)](_0xf2eacd=>{const _0x5ce26a=_0x5f4044;_0xf2eacd&&_0x4a739d[_0x5ce26a(0x1ee)](_0xf2eacd);});};var $=Object[_0x1d7798(0x1e2)],E=(_0x1c5e1e,_0x386156,_0x9aa504,_0x5833f2)=>{const _0x5bb9be=_0x1d7798;for(var _0x35fae8=_0x5833f2>0x1?void 0x0:_0x5833f2?$(_0x386156,_0x9aa504):_0x386156,_0x13c441=_0x1c5e1e[_0x5bb9be(0x1d4)]-0x1,_0x382859;_0x13c441>=0x0;_0x13c441--)(_0x382859=_0x1c5e1e[_0x13c441])&&(_0x35fae8=_0x382859(_0x35fae8)||_0x35fae8);return _0x35fae8;},S=(_0x13859a,_0x2bd1a1)=>(_0x1be4e2,_0x3977e2)=>_0x2bd1a1(_0x1be4e2,_0x3977e2,_0x13859a);let p=class extends c[_0x1d7798(0x1f6)]{constructor(_0x2b4ec6,_0x2b2674,_0x253ffe,_0x5a9967){const _0x45225f=_0x1d7798;super(),this[_0x45225f(0x203)]=_0x2b4ec6,this['_threadCommentModel']=_0x2b2674,this[_0x45225f(0x240)]=_0x253ffe,this[_0x45225f(0x202)]=_0x5a9967,this[_0x45225f(0x1f8)](),this[_0x45225f(0x212)]();}[_0x1d7798(0x212)](){const _0x2684cb=_0x1d7798;this['disposeWithMe'](this['_threadCommentModel'][_0x2684cb(0x22f)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x41d66c=>{const _0x3e73b1=_0x2684cb,_0x426860=new Set();_0x41d66c[_0x3e73b1(0x1d1)](_0x1b3244=>{const _0x105363=_0x3e73b1;switch(_0x1b3244[_0x105363(0x21d)]){case _0x105363(0x228):{const _0x536d46=_0x1b3244[_0x105363(0x231)]['personId'];_0x426860['add'](_0x536d46);break;}}}),R(this[_0x3e73b1(0x202)],_0x426860);}));}['_init'](){const _0x15ea75=_0x1d7798;this[_0x15ea75(0x1d9)](this[_0x15ea75(0x203)]['commentUpdate$'][_0x15ea75(0x23d)](async _0x4ba01c=>{const _0x5367f9=_0x15ea75;var _0x28c56e,_0x465841,_0x10bba1,_0xd90d2d;const _0x2a6986=(_0x28c56e=this[_0x5367f9(0x1f1)]['getUnit'](_0x4ba01c[_0x5367f9(0x1d8)])[_0x5367f9(0x214)](_0x4dbcb5=>_0x4dbcb5[_0x5367f9(0x245)]===_0x4ba01c[_0x5367f9(0x245)]))==null?void 0x0:_0x28c56e[_0x5367f9(0x22d)];if(!_0x2a6986)return;const {unitId:_0x226590,subUnitId:_0xfd97ba}=_0x2a6986;switch(_0x4ba01c['user']&&this['_userService'][_0x5367f9(0x1ee)](_0x4ba01c['user']),_0x4ba01c[_0x5367f9(0x21d)]){case v[_0x5367f9(0x1e6)]:break;case v[_0x5367f9(0x221)]:{this[_0x5367f9(0x1f1)][_0x5367f9(0x213)](_0x226590,_0xfd97ba,{'unitId':_0x226590,'subUnitId':_0xfd97ba,'ref':'','id':_0x4ba01c[_0x5367f9(0x21b)],'dT':f(+_0x4ba01c[_0x5367f9(0x1f3)]),'threadId':_0x4ba01c[_0x5367f9(0x245)],'personId':(_0x10bba1=(_0x465841=_0x4ba01c[_0x5367f9(0x1d3)])==null?void 0x0:_0x465841[_0x5367f9(0x237)])!=null?_0x10bba1:_0x4ba01c[_0x5367f9(0x1f4)],'text':JSON[_0x5367f9(0x210)](_0x4ba01c[_0x5367f9(0x1fe)]),'parentId':_0x2a6986['id']});break;}case v[_0x5367f9(0x1eb)]:{const _0x2b9f21=this[_0x5367f9(0x1f1)][_0x5367f9(0x1cd)](_0x226590,_0xfd97ba,_0x4ba01c['replyId']);_0x2b9f21&&_0x2b9f21[_0x5367f9(0x230)]&&this[_0x5367f9(0x1f1)][_0x5367f9(0x22b)](_0x226590,_0xfd97ba,_0x4ba01c[_0x5367f9(0x21b)]);break;}case v[_0x5367f9(0x20f)]:{this[_0x5367f9(0x1f1)][_0x5367f9(0x242)](_0x226590,_0xfd97ba,{'commentId':_0x4ba01c[_0x5367f9(0x21b)],'text':JSON[_0x5367f9(0x210)](_0x4ba01c[_0x5367f9(0x1fe)])});break;}case v[_0x5367f9(0x232)]:{const _0x4d225f=(_0xd90d2d=this['_threadCommentModel'][_0x5367f9(0x21e)](_0x4ba01c[_0x5367f9(0x1d8)])[_0x5367f9(0x214)](_0x20ebb5=>_0x20ebb5['threadId']===_0x4ba01c[_0x5367f9(0x245)]))==null?void 0x0:_0xd90d2d['root'];_0x4d225f&&this['_threadCommentModel'][_0x5367f9(0x1fb)](_0x226590,_0xfd97ba,_0x4d225f['id'],_0x4ba01c[_0x5367f9(0x1dc)]===I[_0x5367f9(0x1e5)]);break;}}}));}};p=E([S(0x0,c[_0x1d7798(0x1da)](b[_0x1d7798(0x21f)])),S(0x1,c[_0x1d7798(0x1da)](M[_0x1d7798(0x218)])),S(0x2,c['Inject'](c[_0x1d7798(0x22a)])),S(0x3,c[_0x1d7798(0x1da)](c[_0x1d7798(0x1ed)]))],p);const q=_0x1d7798(0x1cc),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x19dae1,_0x465edc,_0x21955,_0x67b5e8)=>{const _0x462886=_0x1d7798;for(var _0x4a8572=_0x67b5e8>0x1?void 0x0:_0x67b5e8?A(_0x465edc,_0x21955):_0x465edc,_0x5e8654=_0x19dae1[_0x462886(0x1d4)]-0x1,_0x2ef215;_0x5e8654>=0x0;_0x5e8654--)(_0x2ef215=_0x19dae1[_0x5e8654])&&(_0x4a8572=_0x2ef215(_0x4a8572)||_0x4a8572);return _0x4a8572;},_=(_0x113eb9,_0x17a1e5)=>(_0xe82460,_0x2ae5a5)=>_0x17a1e5(_0xe82460,_0x2ae5a5,_0x113eb9);function Y(_0x3958bd,_0x3dc23f){const _0x4748eb=_0x1d7798,_0x86d3e3=_0x3958bd[_0x4748eb(0x219)][0x0];return{..._0x3dc23f,'id':_0x86d3e3[_0x4748eb(0x21b)],'resolved':_0x3958bd[_0x4748eb(0x1dc)]===0x1,'dT':f(_0x86d3e3['createTimestamp']),'personId':_0x86d3e3['userId'],'threadId':_0x86d3e3[_0x4748eb(0x245)]};}function _0x36c7(){const _0x125066=['replyId','dataSource','type','getUnit','CommentService','/universer-api/comment/unit/','Reply','/edit','map','UNIVER_UNKNOWN','toStringTag','format','Plugin','add','UniverLicensePlugin','UserManagerService','deleteComment','DependentOn','root','OpenOrReOpen','commentUpdate$','parentId','payload','Solve','getCurrentUser','listComments','resolved','31775843PeIvIU','userID','requireSession','@univerjs/network','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','4645840sLxlJC','subscribe','_config','@univerjs/thread-comment-ui','_userService','_initDataSource','updateComment','filter','8429838NihfCL','threadId','@univerjs-pro/collaboration-client','rangeType','/universer-api/user/list','thread-comment-data-source.config','getComment','pluginName','customRanges','_sessionService','forEach','UniverInstanceType','user','length','reply','HTTPService','IConfigService','unitId','disposeWithMe','Inject','8152825UqeLBG','solved','values','UniverThreadCommentDataSourcePlugin','setConfig','post','_configService','getOwnPropertyDescriptor','onReady','1258jjMVUF','Solved','Add','users','/delete','7kyljSi','getMemberID','Delete','getUser','Injector','addUser','88jaWDQM','ref','_threadCommentModel','/reply','createTimestamp','userId','UNRECOGNIZED','Disposable','/solved','_init','198MivWYe','body','resolveComment','size','defineProperty','content','saveCommentToSnapshot','CustomRangeType','Unknown','_injector','_commentService','dayjs','COMMENT','_threadCommentDataSourceService','_threadCommentDataSource','192039VGulDp','Module','get','UniverCollaborationClientPlugin','696190kqbWBC','stringify','_httpService','Edit','parse','code','_initUserSync','addComment','find','delete','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','replies','718XpsqxC'];_0x36c7=function(){return _0x125066;};return _0x36c7();}function G(_0x38a823,_0x2f9ee9,_0x25e3cf){const _0x3cd7ee=_0x1d7798;var _0x5c6d11,_0xb98527;if(((_0xb98527=(_0x5c6d11=_0x38a823==null?void 0x0:_0x38a823[_0x3cd7ee(0x219)])==null?void 0x0:_0x5c6d11['length'])!=null?_0xb98527:0x0)>0x0){const _0x1e515c=(_0x8f14c3,_0x395360)=>({'id':_0x8f14c3[_0x3cd7ee(0x21b)],'threadId':_0x8f14c3[_0x3cd7ee(0x245)],'dT':f(_0x8f14c3[_0x3cd7ee(0x1f3)]),'personId':_0x8f14c3[_0x3cd7ee(0x1f4)],'resolved':_0x38a823[_0x3cd7ee(0x1dc)]===I['Solved'],'unitId':_0x2f9ee9,'subUnitId':_0x25e3cf,'text':JSON[_0x3cd7ee(0x210)](_0x8f14c3[_0x3cd7ee(0x1fe)]),'parentId':_0x395360}),_0x4db97a=_0x1e515c(_0x38a823['replies'][0x0]);return{..._0x4db97a,'children':_0x38a823[_0x3cd7ee(0x219)]['slice'](0x1)[_0x3cd7ee(0x223)](_0x211807=>_0x1e515c(_0x211807,_0x4db97a['id']))};}return null;}function _0x3869(_0x1a0ff3,_0x34160b){const _0x36c742=_0x36c7();return _0x3869=function(_0x3869fe,_0x3746f3){_0x3869fe=_0x3869fe-0x1cb;let _0x1caeda=_0x36c742[_0x3869fe];return _0x1caeda;},_0x3869(_0x1a0ff3,_0x34160b);}let g=class{constructor(_0x1df9f8,_0xccd4a1,_0x574912,_0x12003f){const _0x4c3663=_0x1d7798;this[_0x4c3663(0x20e)]=_0x1df9f8,this['_userService']=_0xccd4a1,this[_0x4c3663(0x1d0)]=_0x574912,this[_0x4c3663(0x202)]=_0x12003f;}async[_0x1d7798(0x213)](_0x18e979){const _0x321b35=_0x1d7798;var _0x4c39d6,_0x326874;const {parentId:_0x1a0867,unitId:_0x2424ac,text:_0xafedba,threadId:_0x46a027}=_0x18e979,_0x182b1a=(_0x326874=(_0x4c39d6=_0xafedba[_0x321b35(0x1cf)])==null?void 0x0:_0x4c39d6['filter'](_0x9f7d00=>_0x9f7d00[_0x321b35(0x247)]===c['CustomRangeType'][_0x321b35(0x205)])[_0x321b35(0x223)](_0x1a41ae=>_0x1a41ae['rangeId']))!=null?_0x326874:[],_0x420b87=JSON['stringify'](_0xafedba),_0x2f796d=(await this[_0x321b35(0x1d0)][_0x321b35(0x238)](_0x2424ac))[_0x321b35(0x1ea)]();if(_0x1a0867){const _0x1e1c3a={'memberId':_0x2f796d,'unitId':_0x2424ac,'content':_0x420b87,'mention':_0x182b1a,'threadId':_0x46a027},_0x5dde0b=(await this['_httpService'][_0x321b35(0x1e0)](_0x321b35(0x220)+_0x2424ac+_0x321b35(0x1f2),{'body':_0x1e1c3a}))[_0x321b35(0x1fa)][_0x321b35(0x1d5)];return{..._0x18e979,'id':_0x5dde0b['replyId'],'dT':c['dayjs'](+_0x5dde0b[_0x321b35(0x1f3)])[_0x321b35(0x226)](_0x321b35(0x23a)),'personId':_0x5dde0b['userId']};}else{const _0x4db070={'memberId':_0x2f796d,'unitId':_0x2424ac,'content':_0x420b87,'mention':_0x182b1a},_0x230dca=await this[_0x321b35(0x20e)][_0x321b35(0x1e0)]('/universer-api/comment/unit/'+_0x2424ac+'/add',{'body':_0x4db070});return Y(_0x230dca['body']['comment'],_0x18e979);}}async[_0x1d7798(0x242)](_0x40e904){const _0x16e57b=_0x1d7798;var _0x59fd00,_0x4ca93b;const {text:_0x4a615b,unitId:_0x329d36}=_0x40e904,_0x8d3adc=(_0x4ca93b=(_0x59fd00=_0x4a615b[_0x16e57b(0x1cf)])==null?void 0x0:_0x59fd00[_0x16e57b(0x243)](_0x1bd5e3=>_0x1bd5e3[_0x16e57b(0x247)]===c[_0x16e57b(0x200)][_0x16e57b(0x205)])[_0x16e57b(0x223)](_0x14ab6b=>_0x14ab6b['rangeId']))!=null?_0x4ca93b:[],_0x583526=JSON[_0x16e57b(0x20d)](_0x4a615b),_0x2bcfd3=_0x40e904[_0x16e57b(0x245)],_0x2214c4=_0x40e904['id'],_0x4f34d5={'memberId':(await this[_0x16e57b(0x1d0)][_0x16e57b(0x238)](_0x329d36))[_0x16e57b(0x1ea)](),'unitId':_0x329d36,'threadId':_0x2bcfd3,'mention':_0x8d3adc,'content':_0x583526,'replyId':_0x2214c4},_0x1512b7=await this[_0x16e57b(0x20e)][_0x16e57b(0x1e0)](_0x16e57b(0x220)+_0x329d36+_0x16e57b(0x222),{'body':_0x4f34d5});return!_0x1512b7['body'][_0x16e57b(0x216)]||_0x1512b7[_0x16e57b(0x1fa)]['error'][_0x16e57b(0x211)]===0x1;}async[_0x1d7798(0x1fb)](_0x2faf0e){const _0x4a24ee=_0x1d7798,{unitId:_0x787e5c}=_0x2faf0e,_0x552626=_0x2faf0e[_0x4a24ee(0x245)],_0x1ea417={'memberId':this[_0x4a24ee(0x240)][_0x4a24ee(0x233)]()[_0x4a24ee(0x237)],'unitId':_0x787e5c,'threadId':_0x552626,'solved':_0x2faf0e[_0x4a24ee(0x235)]?I[_0x4a24ee(0x1e5)]:I[_0x4a24ee(0x22e)]},_0x304c64=await this[_0x4a24ee(0x20e)][_0x4a24ee(0x1e0)](_0x4a24ee(0x220)+_0x787e5c+_0x4a24ee(0x1f7),{'body':_0x1ea417});return!_0x304c64['body'][_0x4a24ee(0x216)]||_0x304c64[_0x4a24ee(0x1fa)]['error'][_0x4a24ee(0x211)]===0x1;}async[_0x1d7798(0x22b)](_0x30fe19,_0x541999,_0x3081ff,_0x1e1496){const _0x3e3d3e=_0x1d7798,_0x42d1b6={'memberId':(await this[_0x3e3d3e(0x1d0)][_0x3e3d3e(0x238)](_0x30fe19))[_0x3e3d3e(0x1ea)](),'threadId':_0x3081ff,'replyId':_0x1e1496,'unitId':_0x30fe19},_0x60f175=await this[_0x3e3d3e(0x20e)]['post'](_0x3e3d3e(0x220)+_0x30fe19+_0x3e3d3e(0x1e8),{'body':_0x42d1b6});return!_0x60f175[_0x3e3d3e(0x1fa)][_0x3e3d3e(0x216)]||_0x60f175[_0x3e3d3e(0x1fa)][_0x3e3d3e(0x216)]['code']===0x1;}async[_0x1d7798(0x234)](_0x1f0d32,_0x20a2cb,_0x2847f2){const _0x483069=_0x1d7798,_0xad3a8f={'unitId':_0x1f0d32,'threadId':_0x2847f2},_0x52da4e=await this[_0x483069(0x20e)][_0x483069(0x1e0)](_0x483069(0x220)+_0x1f0d32+'/list',{'body':_0xad3a8f}),_0x36e866=_0x2847f2[_0x483069(0x223)](_0x4efee2=>G(_0x52da4e[_0x483069(0x1fa)]['comments'][_0x4efee2],_0x1f0d32,_0x20a2cb))[_0x483069(0x243)](Boolean);return Object[_0x483069(0x1dd)](_0x52da4e[_0x483069(0x1fa)][_0x483069(0x1e7)])['forEach'](_0x25467a=>{const _0x1ccc5d=_0x483069;this['_userService'][_0x1ccc5d(0x1ee)](_0x25467a);}),_0x36e866;}[_0x1d7798(0x1ff)](_0x12d2d0){const _0x2b7847=_0x1d7798;return{'id':_0x12d2d0['id'],'threadId':_0x12d2d0[_0x2b7847(0x245)],'ref':_0x12d2d0[_0x2b7847(0x1f0)]};}};g=x([_(0x0,c[_0x1d7798(0x1da)](P[_0x1d7798(0x1d6)])),_(0x1,c[_0x1d7798(0x1da)](c['UserManagerService'])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c[_0x1d7798(0x1da)](c['Injector']))],g);var H=Object[_0x1d7798(0x1e2)],J=(_0x1ebd56,_0x5ec5b1,_0x2542d3,_0x5a905f)=>{const _0x1699ce=_0x1d7798;for(var _0x5a61b0=_0x5a905f>0x1?void 0x0:_0x5a905f?H(_0x5ec5b1,_0x2542d3):_0x5ec5b1,_0x4e869e=_0x1ebd56[_0x1699ce(0x1d4)]-0x1,_0x4bf1d8;_0x4e869e>=0x0;_0x4e869e--)(_0x4bf1d8=_0x1ebd56[_0x4e869e])&&(_0x5a61b0=_0x4bf1d8(_0x5a61b0)||_0x5a61b0);return _0x5a61b0;},y=(_0x3c8be7,_0x5c218c)=>(_0x32a090,_0x495329)=>_0x5c218c(_0x32a090,_0x495329,_0x3c8be7);let C=class extends c[_0x1d7798(0x1f6)]{constructor(_0x4e8038,_0x21b911){const _0x3eb792=_0x1d7798;super(),this[_0x3eb792(0x206)]=_0x4e8038,this[_0x3eb792(0x207)]=_0x21b911,this['_initDataSource']();}[_0x1d7798(0x241)](){const _0x49ba38=_0x1d7798;this[_0x49ba38(0x206)][_0x49ba38(0x21c)]=this['_threadCommentDataSource'],this[_0x49ba38(0x206)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x1d7798(0x1fd)],L=Object[_0x1d7798(0x1e2)],Z=(_0x443e21,_0x1b356e,_0x74c0fb)=>_0x1b356e in _0x443e21?F(_0x443e21,_0x1b356e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x74c0fb}):_0x443e21[_0x1b356e]=_0x74c0fb,W=(_0xcab3a5,_0xb13cb4,_0x367361,_0x206c69)=>{for(var _0x3c2880=_0x206c69>0x1?void 0x0:_0x206c69?L(_0xb13cb4,_0x367361):_0xb13cb4,_0xa25326=_0xcab3a5['length']-0x1,_0x5c4391;_0xa25326>=0x0;_0xa25326--)(_0x5c4391=_0xcab3a5[_0xa25326])&&(_0x3c2880=_0x5c4391(_0x3c2880)||_0x3c2880);return _0x3c2880;},O=(_0x5dad2b,_0xf7bf78)=>(_0x5bb27d,_0xf894c8)=>_0xf7bf78(_0x5bb27d,_0xf894c8,_0x5dad2b),N=(_0x25d534,_0x4ef787,_0x5da181)=>Z(_0x25d534,typeof _0x4ef787!='symbol'?_0x4ef787+'':_0x4ef787,_0x5da181);exports[_0x1d7798(0x1de)]=class extends c[_0x1d7798(0x227)]{constructor(_0x31b56c=D,_0x503565,_0x50e5c5){const _0x360a15=_0x1d7798;super(),this[_0x360a15(0x23e)]=_0x31b56c,this['_injector']=_0x503565,this[_0x360a15(0x1e1)]=_0x50e5c5;const {..._0x266c6e}=c['merge']({},D,this[_0x360a15(0x23e)]);this[_0x360a15(0x1e1)][_0x360a15(0x1df)](q,_0x266c6e);}['onStarting'](){const _0x4ea53f=_0x1d7798;[[g],[C],[p]][_0x4ea53f(0x1d1)](_0x21939f=>{const _0x8dd500=_0x4ea53f;this[_0x8dd500(0x202)][_0x8dd500(0x228)](_0x21939f);});}[_0x1d7798(0x1e3)](){const _0x1af042=_0x1d7798;this[_0x1af042(0x202)][_0x1af042(0x20a)](C),this[_0x1af042(0x202)][_0x1af042(0x20a)](p);}},N(exports[_0x1d7798(0x1de)],_0x1d7798(0x1ce),U),N(exports[_0x1d7798(0x1de)],'type',c[_0x1d7798(0x1d2)][_0x1d7798(0x224)]),exports[_0x1d7798(0x1de)]=W([c[_0x1d7798(0x22c)](j['UniverThreadCommentUIPlugin'],b[_0x1d7798(0x20b)],T[_0x1d7798(0x229)]),O(0x1,c[_0x1d7798(0x1da)](c[_0x1d7798(0x1ed)])),O(0x2,c[_0x1d7798(0x1d7)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';function _0x3e65(){const _0x12d064=['replies','map','getUnit','comments','@univerjs/thread-comment','parse','184482hEAbVe','_init','21yrnHcj','values','get','length','getUser','15WDmLzZ','deleteComment','@univerjs-pro/collaboration-client','reply','delete','@univerjs/thread-comment-ui','_initUserSync','_initDataSource','requireSession','Unknown','rangeType','@univerjs/network','UniverInstanceType','_userService','error','YYYY/MM/DD\x20HH:mm','listComments','_httpService','disposeWithMe','_injector','updateComment','setConfig','UniverThreadCommentUIPlugin','onReady','rangeId','comment','filter','IConfigService','Disposable','UniverThreadCommentDataSourcePlugin','find','getOwnPropertyDescriptor','CustomRangeType','326826ANsTJK','OpenOrReOpen','/universer-api/comment/unit/','Edit','@univerjs-pro/license','UserManagerService','_sessionService','9554720XxvWhr','Injector','solved','resolved','ThreadCommentModel','_threadCommentDataSource','_configService','body','addUser','_threadCommentDataSourceService','/list','Solved','users','8qJsVbq','Inject','user','118591XlERqi','addComment','DependentOn','replyId','createTimestamp','dayjs','userID','size','personId','/reply','format','unitId','parentId','1255112UXHrCC','root','threadId','_commentService','Solve','Delete','userId','customRanges','type','UNRECOGNIZED','pipe','COMMENT','defineProperty','add','CollaborationSessionService','1349262CvskOP','subscribe','UniverLicensePlugin','content','toStringTag','getCurrentUser','UNIVER_UNKNOWN','slice','@univerjs/core','Plugin','Add','/add','1304044NbAanl','/delete','_threadCommentModel','resolveComment','symbol','commentUpdate$','code','HTTPService','getMemberID','post','payload','Reply','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','forEach','/universer-api/user/list'];_0x3e65=function(){return _0x12d064;};return _0x3e65();}function _0x2033(_0x2acc7f,_0x2c0adc){const _0x3e6598=_0x3e65();return _0x2033=function(_0x203343,_0x2f0255){_0x203343=_0x203343-0x165;let _0x17e943=_0x3e6598[_0x203343];return _0x17e943;},_0x2033(_0x2acc7f,_0x2c0adc);}const _0x2f412a=_0x2033;(function(_0x2f5821,_0x33cb29){const _0x3cd949=_0x2033,_0x4b065a=_0x2f5821();while(!![]){try{const _0x32fdb5=parseInt(_0x3cd949(0x1d1))/0x1+parseInt(_0x3cd949(0x17c))/0x2+-parseInt(_0x3cd949(0x170))/0x3*(parseInt(_0x3cd949(0x1ce))/0x4)+-parseInt(_0x3cd949(0x199))/0x5*(-parseInt(_0x3cd949(0x1ba))/0x6)+parseInt(_0x3cd949(0x194))/0x7*(-parseInt(_0x3cd949(0x1de))/0x8)+-parseInt(_0x3cd949(0x192))/0x9+parseInt(_0x3cd949(0x1c1))/0xa;if(_0x32fdb5===_0x33cb29)break;else _0x4b065a['push'](_0x4b065a['shift']());}catch(_0x141262){_0x4b065a['push'](_0x4b065a['shift']());}}}(_0x3e65,0x79c89));Object[_0x2f412a(0x16d)](exports,Symbol[_0x2f412a(0x174)],{'value':'Module'});const b=require(_0x2f412a(0x19b)),T=require(_0x2f412a(0x1be)),c=require(_0x2f412a(0x178)),j=require(_0x2f412a(0x19e)),M=require(_0x2f412a(0x190)),w=require('rxjs'),P=require(_0x2f412a(0x1a4)),U=_0x2f412a(0x189);var I=(_0x29e037=>(_0x29e037[_0x29e037[_0x2f412a(0x1bb)]=0x0]=_0x2f412a(0x1bb),_0x29e037[_0x29e037[_0x2f412a(0x1cc)]=0x1]=_0x2f412a(0x1cc),_0x29e037[_0x29e037[_0x2f412a(0x16a)]=-0x1]=_0x2f412a(0x16a),_0x29e037))(I||{}),v=(_0x3b7c36=>(_0x3b7c36[_0x3b7c36[_0x2f412a(0x1a2)]=0x0]=_0x2f412a(0x1a2),_0x3b7c36[_0x3b7c36['Add']=0x1]=_0x2f412a(0x17a),_0x3b7c36[_0x3b7c36[_0x2f412a(0x187)]=0x2]=_0x2f412a(0x187),_0x3b7c36[_0x3b7c36[_0x2f412a(0x1bd)]=0x3]='Edit',_0x3b7c36[_0x3b7c36['Delete']=0x4]=_0x2f412a(0x166),_0x3b7c36[_0x3b7c36[_0x2f412a(0x165)]=0x5]=_0x2f412a(0x165),_0x3b7c36[_0x3b7c36[_0x2f412a(0x16a)]=-0x1]=_0x2f412a(0x16a),_0x3b7c36))(v||{});const f=_0x12c85a=>c[_0x2f412a(0x1d6)](new Date(+_0x12c85a))[_0x2f412a(0x1db)](_0x2f412a(0x1a8)),R=async(_0x2a7fa5,_0x4762ec)=>{const _0x4851ab=_0x2f412a,_0x51cf37=_0x2a7fa5[_0x4851ab(0x196)](c[_0x4851ab(0x1bf)]),_0x3e75fa=_0x2a7fa5[_0x4851ab(0x196)](P[_0x4851ab(0x183)]);_0x4762ec[_0x4851ab(0x18a)](_0x5638ea=>{const _0x3b07d2=_0x4851ab;_0x51cf37[_0x3b07d2(0x198)](_0x5638ea)&&_0x4762ec[_0x3b07d2(0x19d)](_0x5638ea);}),_0x4762ec[_0x4851ab(0x1d8)]&&(await _0x3e75fa[_0x4851ab(0x196)](_0x4851ab(0x18b),{'params':{'userIDs':[..._0x4762ec]}}))['body'][_0x4851ab(0x1cd)]['forEach'](_0x42602d=>{const _0x3e27f4=_0x4851ab;_0x42602d&&_0x51cf37[_0x3e27f4(0x1c9)](_0x42602d);});};var $=Object[_0x2f412a(0x1b8)],E=(_0x1c48df,_0x3ecf21,_0x34833f,_0x427565)=>{const _0xbf5d58=_0x2f412a;for(var _0x4de9f5=_0x427565>0x1?void 0x0:_0x427565?$(_0x3ecf21,_0x34833f):_0x3ecf21,_0x4d9c2a=_0x1c48df[_0xbf5d58(0x197)]-0x1,_0x3e545e;_0x4d9c2a>=0x0;_0x4d9c2a--)(_0x3e545e=_0x1c48df[_0x4d9c2a])&&(_0x4de9f5=_0x3e545e(_0x4de9f5)||_0x4de9f5);return _0x4de9f5;},S=(_0x9cf3f2,_0x54b6d0)=>(_0x352c3e,_0x46e3df)=>_0x54b6d0(_0x352c3e,_0x46e3df,_0x9cf3f2);let p=class extends c['Disposable']{constructor(_0x16e161,_0x563eb7,_0x1a590b,_0xaa9f64){const _0x2ad6bd=_0x2f412a;super(),this[_0x2ad6bd(0x1e1)]=_0x16e161,this[_0x2ad6bd(0x17e)]=_0x563eb7,this['_userService']=_0x1a590b,this[_0x2ad6bd(0x1ac)]=_0xaa9f64,this[_0x2ad6bd(0x193)](),this['_initUserSync']();}[_0x2f412a(0x19f)](){const _0x28e952=_0x2f412a;this['disposeWithMe'](this[_0x28e952(0x17e)][_0x28e952(0x181)][_0x28e952(0x16b)](w['bufferTime'](0x10))[_0x28e952(0x171)](_0x56faef=>{const _0x1a2d38=new Set();_0x56faef['forEach'](_0x123234=>{const _0x1909d7=_0x2033;switch(_0x123234['type']){case _0x1909d7(0x16e):{const _0x41d66a=_0x123234[_0x1909d7(0x186)][_0x1909d7(0x1d9)];_0x1a2d38['add'](_0x41d66a);break;}}}),R(this['_injector'],_0x1a2d38);}));}[_0x2f412a(0x193)](){const _0x1789ba=_0x2f412a;this[_0x1789ba(0x1ab)](this[_0x1789ba(0x1e1)]['commentUpdate$'][_0x1789ba(0x171)](async _0x4c0e23=>{const _0xd81a10=_0x1789ba;var _0x2c1c7b,_0xb0f14b,_0xbfdf5b,_0x3d8df3;const _0x2a622d=(_0x2c1c7b=this[_0xd81a10(0x17e)]['getUnit'](_0x4c0e23[_0xd81a10(0x1dc)])[_0xd81a10(0x1b7)](_0x13755=>_0x13755[_0xd81a10(0x1e0)]===_0x4c0e23['threadId']))==null?void 0x0:_0x2c1c7b[_0xd81a10(0x1df)];if(!_0x2a622d)return;const {unitId:_0x53a921,subUnitId:_0x2f12e}=_0x2a622d;switch(_0x4c0e23['user']&&this[_0xd81a10(0x1a6)][_0xd81a10(0x1c9)](_0x4c0e23[_0xd81a10(0x1d0)]),_0x4c0e23[_0xd81a10(0x169)]){case v[_0xd81a10(0x17a)]:break;case v[_0xd81a10(0x187)]:{this['_threadCommentModel'][_0xd81a10(0x1d2)](_0x53a921,_0x2f12e,{'unitId':_0x53a921,'subUnitId':_0x2f12e,'ref':'','id':_0x4c0e23[_0xd81a10(0x1d4)],'dT':f(+_0x4c0e23[_0xd81a10(0x1d5)]),'threadId':_0x4c0e23[_0xd81a10(0x1e0)],'personId':(_0xbfdf5b=(_0xb0f14b=_0x4c0e23[_0xd81a10(0x1d0)])==null?void 0x0:_0xb0f14b['userID'])!=null?_0xbfdf5b:_0x4c0e23[_0xd81a10(0x167)],'text':JSON[_0xd81a10(0x191)](_0x4c0e23[_0xd81a10(0x173)]),'parentId':_0x2a622d['id']});break;}case v['Delete']:{const _0x33850f=this[_0xd81a10(0x17e)]['getComment'](_0x53a921,_0x2f12e,_0x4c0e23[_0xd81a10(0x1d4)]);_0x33850f&&_0x33850f[_0xd81a10(0x1dd)]&&this['_threadCommentModel'][_0xd81a10(0x19a)](_0x53a921,_0x2f12e,_0x4c0e23[_0xd81a10(0x1d4)]);break;}case v[_0xd81a10(0x1bd)]:{this[_0xd81a10(0x17e)]['updateComment'](_0x53a921,_0x2f12e,{'commentId':_0x4c0e23['replyId'],'text':JSON[_0xd81a10(0x191)](_0x4c0e23[_0xd81a10(0x173)])});break;}case v[_0xd81a10(0x165)]:{const _0x426524=(_0x3d8df3=this[_0xd81a10(0x17e)][_0xd81a10(0x18e)](_0x4c0e23[_0xd81a10(0x1dc)])[_0xd81a10(0x1b7)](_0x283cc7=>_0x283cc7[_0xd81a10(0x1e0)]===_0x4c0e23[_0xd81a10(0x1e0)]))==null?void 0x0:_0x3d8df3['root'];_0x426524&&this[_0xd81a10(0x17e)][_0xd81a10(0x17f)](_0x53a921,_0x2f12e,_0x426524['id'],_0x4c0e23['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x2f412a(0x1cf)](b['CommentService'])),S(0x1,c['Inject'](M[_0x2f412a(0x1c5)])),S(0x2,c['Inject'](c[_0x2f412a(0x1bf)])),S(0x3,c[_0x2f412a(0x1cf)](c[_0x2f412a(0x1c2)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x2f412a(0x1b8)],x=(_0x42f0f9,_0x51d420,_0x211ed0,_0x428694)=>{const _0x1c57ab=_0x2f412a;for(var _0xaa1171=_0x428694>0x1?void 0x0:_0x428694?A(_0x51d420,_0x211ed0):_0x51d420,_0x452a2d=_0x42f0f9[_0x1c57ab(0x197)]-0x1,_0x51a3e9;_0x452a2d>=0x0;_0x452a2d--)(_0x51a3e9=_0x42f0f9[_0x452a2d])&&(_0xaa1171=_0x51a3e9(_0xaa1171)||_0xaa1171);return _0xaa1171;},_=(_0xa9bdb6,_0x4e7889)=>(_0x35e4dc,_0x2339de)=>_0x4e7889(_0x35e4dc,_0x2339de,_0xa9bdb6);function Y(_0x360505,_0x2aa2a1){const _0x1ca8cc=_0x2f412a,_0x51d3d4=_0x360505['replies'][0x0];return{..._0x2aa2a1,'id':_0x51d3d4['replyId'],'resolved':_0x360505[_0x1ca8cc(0x1c3)]===0x1,'dT':f(_0x51d3d4[_0x1ca8cc(0x1d5)]),'personId':_0x51d3d4[_0x1ca8cc(0x167)],'threadId':_0x51d3d4['threadId']};}function G(_0x640a64,_0x113e02,_0x2b7038){const _0x2d74e3=_0x2f412a;var _0x806ead,_0x50c9df;if(((_0x50c9df=(_0x806ead=_0x640a64==null?void 0x0:_0x640a64[_0x2d74e3(0x18c)])==null?void 0x0:_0x806ead[_0x2d74e3(0x197)])!=null?_0x50c9df:0x0)>0x0){const _0x458340=(_0x7be113,_0x365b81)=>({'id':_0x7be113[_0x2d74e3(0x1d4)],'threadId':_0x7be113[_0x2d74e3(0x1e0)],'dT':f(_0x7be113[_0x2d74e3(0x1d5)]),'personId':_0x7be113[_0x2d74e3(0x167)],'resolved':_0x640a64['solved']===I[_0x2d74e3(0x1cc)],'unitId':_0x113e02,'subUnitId':_0x2b7038,'text':JSON[_0x2d74e3(0x191)](_0x7be113['content']),'parentId':_0x365b81}),_0x21cecd=_0x458340(_0x640a64[_0x2d74e3(0x18c)][0x0]);return{..._0x21cecd,'children':_0x640a64['replies'][_0x2d74e3(0x177)](0x1)[_0x2d74e3(0x18d)](_0x533c42=>_0x458340(_0x533c42,_0x21cecd['id']))};}return null;}let g=class{constructor(_0x44a1de,_0x140ca2,_0x19ba42,_0x27f2b3){const _0x4cebde=_0x2f412a;this[_0x4cebde(0x1aa)]=_0x44a1de,this[_0x4cebde(0x1a6)]=_0x140ca2,this[_0x4cebde(0x1c0)]=_0x19ba42,this['_injector']=_0x27f2b3;}async[_0x2f412a(0x1d2)](_0x31a709){const _0x337d4f=_0x2f412a;var _0x1c59db,_0x108bce;const {parentId:_0x440b72,unitId:_0x36183a,text:_0x14be0f,threadId:_0x7f1cab}=_0x31a709,_0x5cfaa1=(_0x108bce=(_0x1c59db=_0x14be0f[_0x337d4f(0x168)])==null?void 0x0:_0x1c59db[_0x337d4f(0x1b3)](_0x79a92f=>_0x79a92f['rangeType']===c[_0x337d4f(0x1b9)][_0x337d4f(0x16c)])[_0x337d4f(0x18d)](_0x34233a=>_0x34233a['rangeId']))!=null?_0x108bce:[],_0x927c35=JSON['stringify'](_0x14be0f),_0x49b23b=(await this['_sessionService']['requireSession'](_0x36183a))['getMemberID']();if(_0x440b72){const _0x1ef0e5={'memberId':_0x49b23b,'unitId':_0x36183a,'content':_0x927c35,'mention':_0x5cfaa1,'threadId':_0x7f1cab},_0x321dee=(await this['_httpService'][_0x337d4f(0x185)]('/universer-api/comment/unit/'+_0x36183a+_0x337d4f(0x1da),{'body':_0x1ef0e5}))[_0x337d4f(0x1c8)][_0x337d4f(0x19c)];return{..._0x31a709,'id':_0x321dee[_0x337d4f(0x1d4)],'dT':c['dayjs'](+_0x321dee[_0x337d4f(0x1d5)])[_0x337d4f(0x1db)](_0x337d4f(0x1a8)),'personId':_0x321dee[_0x337d4f(0x167)]};}else{const _0x4a2cd5={'memberId':_0x49b23b,'unitId':_0x36183a,'content':_0x927c35,'mention':_0x5cfaa1},_0x1bac5f=await this[_0x337d4f(0x1aa)]['post'](_0x337d4f(0x1bc)+_0x36183a+_0x337d4f(0x17b),{'body':_0x4a2cd5});return Y(_0x1bac5f[_0x337d4f(0x1c8)][_0x337d4f(0x1b2)],_0x31a709);}}async[_0x2f412a(0x1ad)](_0x516d0a){const _0x562140=_0x2f412a;var _0xd0b62,_0x3038f4;const {text:_0x3ed933,unitId:_0x3f25cc}=_0x516d0a,_0x439041=(_0x3038f4=(_0xd0b62=_0x3ed933['customRanges'])==null?void 0x0:_0xd0b62['filter'](_0x2217a9=>_0x2217a9[_0x562140(0x1a3)]===c[_0x562140(0x1b9)][_0x562140(0x16c)])[_0x562140(0x18d)](_0x3a5587=>_0x3a5587[_0x562140(0x1b1)]))!=null?_0x3038f4:[],_0x54e125=JSON['stringify'](_0x3ed933),_0x2190c1=_0x516d0a[_0x562140(0x1e0)],_0x5881b7=_0x516d0a['id'],_0x16956c={'memberId':(await this[_0x562140(0x1c0)][_0x562140(0x1a1)](_0x3f25cc))[_0x562140(0x184)](),'unitId':_0x3f25cc,'threadId':_0x2190c1,'mention':_0x439041,'content':_0x54e125,'replyId':_0x5881b7},_0x503467=await this['_httpService'][_0x562140(0x185)](_0x562140(0x1bc)+_0x3f25cc+'/edit',{'body':_0x16956c});return!_0x503467['body'][_0x562140(0x1a7)]||_0x503467[_0x562140(0x1c8)]['error'][_0x562140(0x182)]===0x1;}async[_0x2f412a(0x17f)](_0x313bf5){const _0x1e4958=_0x2f412a,{unitId:_0x1f7c30}=_0x313bf5,_0x214c24=_0x313bf5[_0x1e4958(0x1e0)],_0x1d082d={'memberId':this[_0x1e4958(0x1a6)][_0x1e4958(0x175)]()[_0x1e4958(0x1d7)],'unitId':_0x1f7c30,'threadId':_0x214c24,'solved':_0x313bf5[_0x1e4958(0x1c4)]?I[_0x1e4958(0x1cc)]:I['OpenOrReOpen']},_0x56ade7=await this[_0x1e4958(0x1aa)][_0x1e4958(0x185)](_0x1e4958(0x1bc)+_0x1f7c30+'/solved',{'body':_0x1d082d});return!_0x56ade7[_0x1e4958(0x1c8)][_0x1e4958(0x1a7)]||_0x56ade7[_0x1e4958(0x1c8)][_0x1e4958(0x1a7)][_0x1e4958(0x182)]===0x1;}async[_0x2f412a(0x19a)](_0x32fe90,_0x12c816,_0x2daac1,_0x3e6fbc){const _0x441f1c=_0x2f412a,_0x490116={'memberId':(await this[_0x441f1c(0x1c0)][_0x441f1c(0x1a1)](_0x32fe90))[_0x441f1c(0x184)](),'threadId':_0x2daac1,'replyId':_0x3e6fbc,'unitId':_0x32fe90},_0x23482d=await this[_0x441f1c(0x1aa)]['post']('/universer-api/comment/unit/'+_0x32fe90+_0x441f1c(0x17d),{'body':_0x490116});return!_0x23482d[_0x441f1c(0x1c8)][_0x441f1c(0x1a7)]||_0x23482d[_0x441f1c(0x1c8)][_0x441f1c(0x1a7)][_0x441f1c(0x182)]===0x1;}async[_0x2f412a(0x1a9)](_0x13d005,_0x48d368,_0x499b0e){const _0x2c146f=_0x2f412a,_0x84eb42={'unitId':_0x13d005,'threadId':_0x499b0e},_0x2e83f5=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x13d005+_0x2c146f(0x1cb),{'body':_0x84eb42}),_0x4c0a0a=_0x499b0e[_0x2c146f(0x18d)](_0x3d88f5=>G(_0x2e83f5['body'][_0x2c146f(0x18f)][_0x3d88f5],_0x13d005,_0x48d368))[_0x2c146f(0x1b3)](Boolean);return Object[_0x2c146f(0x195)](_0x2e83f5[_0x2c146f(0x1c8)][_0x2c146f(0x1cd)])['forEach'](_0x3b1b54=>{const _0x5e1a0b=_0x2c146f;this[_0x5e1a0b(0x1a6)][_0x5e1a0b(0x1c9)](_0x3b1b54);}),_0x4c0a0a;}['saveCommentToSnapshot'](_0x32437e){return{'id':_0x32437e['id'],'threadId':_0x32437e['threadId'],'ref':_0x32437e['ref']};}};g=x([_(0x0,c[_0x2f412a(0x1cf)](P['HTTPService'])),_(0x1,c[_0x2f412a(0x1cf)](c['UserManagerService'])),_(0x2,c[_0x2f412a(0x1cf)](b[_0x2f412a(0x16f)])),_(0x3,c[_0x2f412a(0x1cf)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x4d7f05,_0x49aac3,_0x2e8be8,_0x56f18b)=>{const _0xe67251=_0x2f412a;for(var _0x17b84c=_0x56f18b>0x1?void 0x0:_0x56f18b?H(_0x49aac3,_0x2e8be8):_0x49aac3,_0x236b5a=_0x4d7f05[_0xe67251(0x197)]-0x1,_0x32af9b;_0x236b5a>=0x0;_0x236b5a--)(_0x32af9b=_0x4d7f05[_0x236b5a])&&(_0x17b84c=_0x32af9b(_0x17b84c)||_0x17b84c);return _0x17b84c;},y=(_0x5db0dd,_0x24705b)=>(_0x545006,_0x5961bf)=>_0x24705b(_0x545006,_0x5961bf,_0x5db0dd);let C=class extends c[_0x2f412a(0x1b5)]{constructor(_0xc3e779,_0x3bfc6f){const _0x3b3a2f=_0x2f412a;super(),this[_0x3b3a2f(0x1ca)]=_0xc3e779,this[_0x3b3a2f(0x1c6)]=_0x3bfc6f,this[_0x3b3a2f(0x1a0)]();}[_0x2f412a(0x1a0)](){const _0x29b07f=_0x2f412a;this[_0x29b07f(0x1ca)]['dataSource']=this[_0x29b07f(0x1c6)],this[_0x29b07f(0x1ca)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x2f412a(0x1cf)](g))],C);var F=Object[_0x2f412a(0x16d)],L=Object[_0x2f412a(0x1b8)],Z=(_0x8de0e4,_0x432279,_0x2c3657)=>_0x432279 in _0x8de0e4?F(_0x8de0e4,_0x432279,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c3657}):_0x8de0e4[_0x432279]=_0x2c3657,W=(_0xbb4e53,_0x528743,_0x576ab5,_0x2ccd32)=>{const _0xd2546b=_0x2f412a;for(var _0x21f758=_0x2ccd32>0x1?void 0x0:_0x2ccd32?L(_0x528743,_0x576ab5):_0x528743,_0x2dc612=_0xbb4e53[_0xd2546b(0x197)]-0x1,_0x45631b;_0x2dc612>=0x0;_0x2dc612--)(_0x45631b=_0xbb4e53[_0x2dc612])&&(_0x21f758=_0x45631b(_0x21f758)||_0x21f758);return _0x21f758;},O=(_0x1b6b30,_0x356f79)=>(_0x11825d,_0xa22e59)=>_0x356f79(_0x11825d,_0xa22e59,_0x1b6b30),N=(_0x301f94,_0x5c2cdd,_0x57049b)=>Z(_0x301f94,typeof _0x5c2cdd!=_0x2f412a(0x180)?_0x5c2cdd+'':_0x5c2cdd,_0x57049b);exports[_0x2f412a(0x1b6)]=class extends c[_0x2f412a(0x179)]{constructor(_0x5db8b5=D,_0xb54a1,_0x5ac467){const _0x33945f=_0x2f412a;super(),this[_0x33945f(0x188)]=_0x5db8b5,this[_0x33945f(0x1ac)]=_0xb54a1,this[_0x33945f(0x1c7)]=_0x5ac467;const {..._0x26ce40}=c['merge']({},D,this[_0x33945f(0x188)]);this['_configService'][_0x33945f(0x1ae)](q,_0x26ce40);}['onStarting'](){const _0x51db39=_0x2f412a;[[g],[C],[p]][_0x51db39(0x18a)](_0x2f35aa=>{const _0x1e2b0b=_0x51db39;this['_injector'][_0x1e2b0b(0x16e)](_0x2f35aa);});}[_0x2f412a(0x1b0)](){const _0x24d4e1=_0x2f412a;this[_0x24d4e1(0x1ac)][_0x24d4e1(0x196)](C),this[_0x24d4e1(0x1ac)][_0x24d4e1(0x196)](p);}},N(exports[_0x2f412a(0x1b6)],'pluginName',U),N(exports[_0x2f412a(0x1b6)],_0x2f412a(0x169),c[_0x2f412a(0x1a5)][_0x2f412a(0x176)]),exports[_0x2f412a(0x1b6)]=W([c[_0x2f412a(0x1d3)](j[_0x2f412a(0x1af)],b['UniverCollaborationClientPlugin'],T[_0x2f412a(0x172)]),O(0x1,c[_0x2f412a(0x1cf)](c[_0x2f412a(0x1c2)])),O(0x2,c[_0x2f412a(0x1b4)])],exports[_0x2f412a(0x1b6)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x23fa6f=_0x50e2;(function(_0x34d748,_0x3b8ba5){const _0x26f94b=_0x50e2,_0x16dbaf=_0x34d748();while(!![]){try{const _0x3c29d6=parseInt(_0x26f94b(0x143))/0x1+parseInt(_0x26f94b(0x18f))/0x2+-parseInt(_0x26f94b(0x151))/0x3+-parseInt(_0x26f94b(0x132))/0x4+parseInt(_0x26f94b(0x159))/0x5+-parseInt(_0x26f94b(0x185))/0x6*(-parseInt(_0x26f94b(0x14a))/0x7)+parseInt(_0x26f94b(0x169))/0x8*(parseInt(_0x26f94b(0x173))/0x9);if(_0x3c29d6===_0x3b8ba5)break;else _0x16dbaf['push'](_0x16dbaf['shift']());}catch(_0x4b36c2){_0x16dbaf['push'](_0x16dbaf['shift']());}}}(_0x232d,0x587c4));import{CommentService as _0x20a661,CollaborationSessionService as _0xea13e3,UniverCollaborationClientPlugin as _0x3dcb68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1dbdb7}from'@univerjs-pro/license';import{dayjs as _0x3a9660,UserManagerService as _0x469b81,Inject as _0x3c5570,Injector as _0x375bf6,Disposable as _0x34d19b,CustomRangeType as _0x445314,UniverInstanceType as _0x43fc88,DependentOn as _0x1e041b,IConfigService as _0x1e8b56,Plugin as _0x9156f8,merge as _0x110a0b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b0210}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5f0ff,IThreadCommentDataSourceService as _0x2ecb1d}from'@univerjs/thread-comment';import{bufferTime as _0x5b8e83}from'rxjs';import{HTTPService as _0x46056e}from'@univerjs/network';const W=_0x23fa6f(0x166);var I=(_0x48f0cc=>(_0x48f0cc[_0x48f0cc[_0x23fa6f(0x158)]=0x0]=_0x23fa6f(0x158),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x137)]=0x1]=_0x23fa6f(0x137),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x48f0cc))(I||{}),v=(_0x2822d8=>(_0x2822d8[_0x2822d8[_0x23fa6f(0x188)]=0x0]=_0x23fa6f(0x188),_0x2822d8[_0x2822d8['Add']=0x1]='Add',_0x2822d8[_0x2822d8[_0x23fa6f(0x156)]=0x2]='Reply',_0x2822d8[_0x2822d8['Edit']=0x3]='Edit',_0x2822d8[_0x2822d8[_0x23fa6f(0x13d)]=0x4]=_0x23fa6f(0x13d),_0x2822d8[_0x2822d8[_0x23fa6f(0x177)]=0x5]=_0x23fa6f(0x177),_0x2822d8[_0x2822d8[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x2822d8))(v||{});const D=_0x57489c=>_0x3a9660(new Date(+_0x57489c))[_0x23fa6f(0x17f)](_0x23fa6f(0x15e)),B=async(_0x1dd44f,_0x40b698)=>{const _0x7afd01=_0x23fa6f,_0x238c72=_0x1dd44f[_0x7afd01(0x13b)](_0x469b81),_0x315977=_0x1dd44f['get'](_0x46056e);_0x40b698['forEach'](_0x53849b=>{const _0x57666f=_0x7afd01;_0x238c72[_0x57666f(0x164)](_0x53849b)&&_0x40b698[_0x57666f(0x16e)](_0x53849b);}),_0x40b698[_0x7afd01(0x14e)]&&(await _0x315977[_0x7afd01(0x13b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40b698]}}))['body'][_0x7afd01(0x18c)][_0x7afd01(0x193)](_0x2c6970=>{const _0x32f084=_0x7afd01;_0x2c6970&&_0x238c72[_0x32f084(0x138)](_0x2c6970);});};var K=Object[_0x23fa6f(0x191)],V=(_0x240725,_0x301fe1,_0x7f5cca,_0x6aa73)=>{for(var _0x230780=_0x6aa73>0x1?void 0x0:_0x6aa73?K(_0x301fe1,_0x7f5cca):_0x301fe1,_0x2a8a03=_0x240725['length']-0x1,_0x17b4a7;_0x2a8a03>=0x0;_0x2a8a03--)(_0x17b4a7=_0x240725[_0x2a8a03])&&(_0x230780=_0x17b4a7(_0x230780)||_0x230780);return _0x230780;},p=(_0x538cbd,_0x7bae1)=>(_0xa0f7c1,_0x563fe3)=>_0x7bae1(_0xa0f7c1,_0x563fe3,_0x538cbd);let S=class extends _0x34d19b{constructor(_0x6cc892,_0x16fee6,_0x4db590,_0x23de98){const _0x3ffb7d=_0x23fa6f;super(),this[_0x3ffb7d(0x14d)]=_0x6cc892,this['_threadCommentModel']=_0x16fee6,this['_userService']=_0x4db590,this['_injector']=_0x23de98,this['_init'](),this[_0x3ffb7d(0x181)]();}['_initUserSync'](){const _0x19eeb0=_0x23fa6f;this[_0x19eeb0(0x14b)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x5b8e83(0x10))[_0x19eeb0(0x135)](_0x3b37b8=>{const _0x282ad1=_0x19eeb0,_0x582357=new Set();_0x3b37b8[_0x282ad1(0x193)](_0x514d50=>{const _0x328e3f=_0x282ad1;switch(_0x514d50[_0x328e3f(0x178)]){case _0x328e3f(0x170):{const _0x1e96c4=_0x514d50[_0x328e3f(0x13e)][_0x328e3f(0x144)];_0x582357['add'](_0x1e96c4);break;}}}),B(this[_0x282ad1(0x140)],_0x582357);}));}['_init'](){const _0x33ec78=_0x23fa6f;this[_0x33ec78(0x14b)](this['_commentService'][_0x33ec78(0x134)][_0x33ec78(0x135)](async _0x2ef939=>{const _0xcfd235=_0x33ec78;var _0x52fc42,_0x55b9ab,_0x18afa9,_0x2f5a17;const _0x58bbe5=(_0x52fc42=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939['unitId'])[_0xcfd235(0x183)](_0x31f112=>_0x31f112[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x52fc42[_0xcfd235(0x17d)];if(!_0x58bbe5)return;const {unitId:_0x468376,subUnitId:_0x48c59b}=_0x58bbe5;switch(_0x2ef939[_0xcfd235(0x155)]&&this['_userService'][_0xcfd235(0x138)](_0x2ef939[_0xcfd235(0x155)]),_0x2ef939[_0xcfd235(0x178)]){case v[_0xcfd235(0x17b)]:break;case v['Reply']:{this[_0xcfd235(0x18d)][_0xcfd235(0x162)](_0x468376,_0x48c59b,{'unitId':_0x468376,'subUnitId':_0x48c59b,'ref':'','id':_0x2ef939[_0xcfd235(0x194)],'dT':D(+_0x2ef939[_0xcfd235(0x13a)]),'threadId':_0x2ef939['threadId'],'personId':(_0x18afa9=(_0x55b9ab=_0x2ef939[_0xcfd235(0x155)])==null?void 0x0:_0x55b9ab[_0xcfd235(0x184)])!=null?_0x18afa9:_0x2ef939[_0xcfd235(0x172)],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)]),'parentId':_0x58bbe5['id']});break;}case v['Delete']:{const _0x49e090=this['_threadCommentModel'][_0xcfd235(0x14f)](_0x468376,_0x48c59b,_0x2ef939[_0xcfd235(0x194)]);_0x49e090&&_0x49e090[_0xcfd235(0x196)]&&this[_0xcfd235(0x18d)][_0xcfd235(0x175)](_0x468376,_0x48c59b,_0x2ef939['replyId']);break;}case v[_0xcfd235(0x131)]:{this[_0xcfd235(0x18d)][_0xcfd235(0x163)](_0x468376,_0x48c59b,{'commentId':_0x2ef939['replyId'],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)])});break;}case v['Solve']:{const _0x9465d2=(_0x2f5a17=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939[_0xcfd235(0x152)])[_0xcfd235(0x183)](_0x55bd72=>_0x55bd72[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x2f5a17[_0xcfd235(0x17d)];_0x9465d2&&this['_threadCommentModel'][_0xcfd235(0x150)](_0x468376,_0x48c59b,_0x9465d2['id'],_0x2ef939['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c5570(_0x20a661)),p(0x1,_0x3c5570(_0x5f0ff)),p(0x2,_0x3c5570(_0x469b81)),p(0x3,_0x3c5570(_0x375bf6))],S);const z=_0x23fa6f(0x16c),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x82b03f,_0x4b6cee,_0x499727,_0x5f1d63)=>{for(var _0x1e114d=_0x5f1d63>0x1?void 0x0:_0x5f1d63?k(_0x4b6cee,_0x499727):_0x4b6cee,_0x3d66e0=_0x82b03f['length']-0x1,_0x467409;_0x3d66e0>=0x0;_0x3d66e0--)(_0x467409=_0x82b03f[_0x3d66e0])&&(_0x1e114d=_0x467409(_0x1e114d)||_0x1e114d);return _0x1e114d;},_=(_0x2ca03f,_0x153acf)=>(_0x988932,_0x25f323)=>_0x153acf(_0x988932,_0x25f323,_0x2ca03f);function X(_0x88b89b,_0x19ffdd){const _0x2ab970=_0x23fa6f,_0x7fee40=_0x88b89b[_0x2ab970(0x15a)][0x0];return{..._0x19ffdd,'id':_0x7fee40[_0x2ab970(0x194)],'resolved':_0x88b89b['solved']===0x1,'dT':D(_0x7fee40[_0x2ab970(0x13a)]),'personId':_0x7fee40[_0x2ab970(0x172)],'threadId':_0x7fee40[_0x2ab970(0x149)]};}function ee(_0x1f58a7,_0x149fdf,_0x153be4){const _0x24b445=_0x23fa6f;var _0x45511a,_0x445262;if(((_0x445262=(_0x45511a=_0x1f58a7==null?void 0x0:_0x1f58a7[_0x24b445(0x15a)])==null?void 0x0:_0x45511a[_0x24b445(0x182)])!=null?_0x445262:0x0)>0x0){const _0xca0303=(_0x48a89e,_0x2e9b24)=>({'id':_0x48a89e[_0x24b445(0x194)],'threadId':_0x48a89e[_0x24b445(0x149)],'dT':D(_0x48a89e['createTimestamp']),'personId':_0x48a89e['userId'],'resolved':_0x1f58a7[_0x24b445(0x15c)]===I[_0x24b445(0x137)],'unitId':_0x149fdf,'subUnitId':_0x153be4,'text':JSON[_0x24b445(0x17a)](_0x48a89e[_0x24b445(0x157)]),'parentId':_0x2e9b24}),_0x45d7e5=_0xca0303(_0x1f58a7[_0x24b445(0x15a)][0x0]);return{..._0x45d7e5,'children':_0x1f58a7[_0x24b445(0x15a)][_0x24b445(0x165)](0x1)[_0x24b445(0x141)](_0x3ded48=>_0xca0303(_0x3ded48,_0x45d7e5['id']))};}return null;}let f=class{constructor(_0x59501d,_0x3353d5,_0x31333c,_0x2b0455){const _0x176980=_0x23fa6f;this[_0x176980(0x16b)]=_0x59501d,this[_0x176980(0x139)]=_0x3353d5,this['_sessionService']=_0x31333c,this[_0x176980(0x140)]=_0x2b0455;}async['addComment'](_0x3369af){const _0x4dfc58=_0x23fa6f;var _0x1f7b0f,_0xdb71e2;const {parentId:_0x1f6c5d,unitId:_0x141d05,text:_0x14ea23,threadId:_0x4de648}=_0x3369af,_0xc577b4=(_0xdb71e2=(_0x1f7b0f=_0x14ea23['customRanges'])==null?void 0x0:_0x1f7b0f[_0x4dfc58(0x13c)](_0x682a48=>_0x682a48[_0x4dfc58(0x154)]===_0x445314[_0x4dfc58(0x15f)])[_0x4dfc58(0x141)](_0x43ddbc=>_0x43ddbc[_0x4dfc58(0x195)]))!=null?_0xdb71e2:[],_0x83fa7b=JSON[_0x4dfc58(0x192)](_0x14ea23),_0x492dcc=(await this[_0x4dfc58(0x186)][_0x4dfc58(0x18a)](_0x141d05))[_0x4dfc58(0x179)]();if(_0x1f6c5d){const _0x55cf12={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4,'threadId':_0x4de648},_0x569c35=(await this['_httpService'][_0x4dfc58(0x133)]('/universer-api/comment/unit/'+_0x141d05+_0x4dfc58(0x17c),{'body':_0x55cf12}))[_0x4dfc58(0x148)]['reply'];return{..._0x3369af,'id':_0x569c35['replyId'],'dT':_0x3a9660(+_0x569c35[_0x4dfc58(0x13a)])[_0x4dfc58(0x17f)](_0x4dfc58(0x15e)),'personId':_0x569c35[_0x4dfc58(0x172)]};}else{const _0x339d43={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4},_0x36639c=await this[_0x4dfc58(0x16b)]['post'](_0x4dfc58(0x146)+_0x141d05+_0x4dfc58(0x190),{'body':_0x339d43});return X(_0x36639c['body'][_0x4dfc58(0x136)],_0x3369af);}}async['updateComment'](_0x2272bb){const _0x4a829a=_0x23fa6f;var _0x4ed306,_0x33f969;const {text:_0x3bff7c,unitId:_0xaa685e}=_0x2272bb,_0x1ef3a8=(_0x33f969=(_0x4ed306=_0x3bff7c[_0x4a829a(0x16f)])==null?void 0x0:_0x4ed306[_0x4a829a(0x13c)](_0x505a42=>_0x505a42[_0x4a829a(0x154)]===_0x445314[_0x4a829a(0x15f)])[_0x4a829a(0x141)](_0xd5023c=>_0xd5023c[_0x4a829a(0x195)]))!=null?_0x33f969:[],_0x495eec=JSON[_0x4a829a(0x192)](_0x3bff7c),_0x396c5d=_0x2272bb[_0x4a829a(0x149)],_0x2dbfc2=_0x2272bb['id'],_0x42711a={'memberId':(await this[_0x4a829a(0x186)][_0x4a829a(0x18a)](_0xaa685e))[_0x4a829a(0x179)](),'unitId':_0xaa685e,'threadId':_0x396c5d,'mention':_0x1ef3a8,'content':_0x495eec,'replyId':_0x2dbfc2},_0x228803=await this[_0x4a829a(0x16b)]['post'](_0x4a829a(0x146)+_0xaa685e+_0x4a829a(0x153),{'body':_0x42711a});return!_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)]||_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)][_0x4a829a(0x187)]===0x1;}async[_0x23fa6f(0x150)](_0x3a102e){const _0x893dad=_0x23fa6f,{unitId:_0x1a4ee8}=_0x3a102e,_0x52948d=_0x3a102e[_0x893dad(0x149)],_0x315da6={'memberId':this[_0x893dad(0x139)][_0x893dad(0x168)]()[_0x893dad(0x184)],'unitId':_0x1a4ee8,'threadId':_0x52948d,'solved':_0x3a102e[_0x893dad(0x180)]?I['Solved']:I[_0x893dad(0x158)]},_0x5daa18=await this[_0x893dad(0x16b)][_0x893dad(0x133)](_0x893dad(0x146)+_0x1a4ee8+'/solved',{'body':_0x315da6});return!_0x5daa18[_0x893dad(0x148)][_0x893dad(0x13f)]||_0x5daa18['body'][_0x893dad(0x13f)]['code']===0x1;}async[_0x23fa6f(0x175)](_0x492fbe,_0x20aa2b,_0x47dc38,_0x43ed9a){const _0x338c77=_0x23fa6f,_0x37979b={'memberId':(await this[_0x338c77(0x186)][_0x338c77(0x18a)](_0x492fbe))[_0x338c77(0x179)](),'threadId':_0x47dc38,'replyId':_0x43ed9a,'unitId':_0x492fbe},_0x2a8e9b=await this[_0x338c77(0x16b)]['post'](_0x338c77(0x146)+_0x492fbe+_0x338c77(0x161),{'body':_0x37979b});return!_0x2a8e9b[_0x338c77(0x148)][_0x338c77(0x13f)]||_0x2a8e9b['body'][_0x338c77(0x13f)]['code']===0x1;}async[_0x23fa6f(0x160)](_0x45031e,_0x5a6ec3,_0x31447f){const _0x1baba2=_0x23fa6f,_0x14c29c={'unitId':_0x45031e,'threadId':_0x31447f},_0x49cb52=await this[_0x1baba2(0x16b)]['post'](_0x1baba2(0x146)+_0x45031e+_0x1baba2(0x189),{'body':_0x14c29c}),_0x2b2ae0=_0x31447f['map'](_0x43a8dc=>ee(_0x49cb52[_0x1baba2(0x148)]['comments'][_0x43a8dc],_0x45031e,_0x5a6ec3))['filter'](Boolean);return Object[_0x1baba2(0x18b)](_0x49cb52[_0x1baba2(0x148)]['users'])[_0x1baba2(0x193)](_0x446848=>{const _0x2db9d7=_0x1baba2;this[_0x2db9d7(0x139)][_0x2db9d7(0x138)](_0x446848);}),_0x2b2ae0;}[_0x23fa6f(0x16a)](_0x5b137d){const _0x42a704=_0x23fa6f;return{'id':_0x5b137d['id'],'threadId':_0x5b137d[_0x42a704(0x149)],'ref':_0x5b137d[_0x42a704(0x17e)]};}};f=Q([_(0x0,_0x3c5570(_0x46056e)),_(0x1,_0x3c5570(_0x469b81)),_(0x2,_0x3c5570(_0xea13e3)),_(0x3,_0x3c5570(_0x375bf6))],f);function _0x232d(){const _0x2cb19f=['UNRECOGNIZED','userId','81fieKZb','_config','deleteComment','_initDataSource','Solve','type','getMemberID','parse','Add','/reply','root','ref','format','resolved','_initUserSync','length','find','userID','1063266tWPabu','_sessionService','code','Unknown','/list','requireSession','values','users','_threadCommentModel','syncUpdateMutationToColla','207964FpCeoe','/add','getOwnPropertyDescriptor','stringify','forEach','replyId','rangeId','parentId','Edit','2124856atNMAs','post','commentUpdate$','subscribe','comment','Solved','addUser','_userService','createTimestamp','get','filter','Delete','payload','error','_injector','map','UNIVER_UNKNOWN','305756dYqwOB','personId','onStarting','/universer-api/comment/unit/','_configService','body','threadId','7WQHcox','disposeWithMe','defineProperty','_commentService','size','getComment','resolveComment','2131896lnGvoZ','unitId','/edit','rangeType','user','Reply','content','OpenOrReOpen','1998990evNXKx','replies','symbol','solved','_threadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','COMMENT','listComments','/delete','addComment','updateComment','getUser','slice','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pluginName','getCurrentUser','548920WTNLwF','saveCommentToSnapshot','_httpService','thread-comment-data-source.config','getUnit','delete','customRanges','add'];_0x232d=function(){return _0x2cb19f;};return _0x232d();}var re=Object['getOwnPropertyDescriptor'],te=(_0x4cdb3b,_0x5c6053,_0x306b0a,_0x11af14)=>{const _0xd59cd6=_0x23fa6f;for(var _0x4f0cb9=_0x11af14>0x1?void 0x0:_0x11af14?re(_0x5c6053,_0x306b0a):_0x5c6053,_0x27f433=_0x4cdb3b[_0xd59cd6(0x182)]-0x1,_0x228e1d;_0x27f433>=0x0;_0x27f433--)(_0x228e1d=_0x4cdb3b[_0x27f433])&&(_0x4f0cb9=_0x228e1d(_0x4f0cb9)||_0x4f0cb9);return _0x4f0cb9;},N=(_0x4b1047,_0x40107a)=>(_0x4df5fc,_0x3bbf7b)=>_0x40107a(_0x4df5fc,_0x3bbf7b,_0x4b1047);let g=class extends _0x34d19b{constructor(_0x3a2768,_0x29ad6b){const _0x159e26=_0x23fa6f;super(),this['_threadCommentDataSourceService']=_0x3a2768,this['_threadCommentDataSource']=_0x29ad6b,this[_0x159e26(0x176)]();}[_0x23fa6f(0x176)](){const _0x64a5cc=_0x23fa6f;this[_0x64a5cc(0x15d)]['dataSource']=this['_threadCommentDataSource'],this[_0x64a5cc(0x15d)][_0x64a5cc(0x18e)]=!0x1;}};function _0x50e2(_0x767746,_0x4ac769){const _0x232d80=_0x232d();return _0x50e2=function(_0x50e299,_0x5ddb01){_0x50e299=_0x50e299-0x131;let _0x470b70=_0x232d80[_0x50e299];return _0x470b70;},_0x50e2(_0x767746,_0x4ac769);}g=te([N(0x0,_0x2ecb1d),N(0x1,_0x3c5570(f))],g);var se=Object[_0x23fa6f(0x14c)],oe=Object[_0x23fa6f(0x191)],ne=(_0x467322,_0x45c742,_0x1aff4f)=>_0x45c742 in _0x467322?se(_0x467322,_0x45c742,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1aff4f}):_0x467322[_0x45c742]=_0x1aff4f,ie=(_0x3fff74,_0x8420e7,_0x267e03,_0x3404c7)=>{const _0x199b92=_0x23fa6f;for(var _0x538b59=_0x3404c7>0x1?void 0x0:_0x3404c7?oe(_0x8420e7,_0x267e03):_0x8420e7,_0x23f855=_0x3fff74[_0x199b92(0x182)]-0x1,_0x2c5833;_0x23f855>=0x0;_0x23f855--)(_0x2c5833=_0x3fff74[_0x23f855])&&(_0x538b59=_0x2c5833(_0x538b59)||_0x538b59);return _0x538b59;},w=(_0x40970d,_0x4c0f04)=>(_0x30f643,_0x376f4d)=>_0x4c0f04(_0x30f643,_0x376f4d,_0x40970d),$=(_0x33098c,_0x2bf3a0,_0x1592f6)=>ne(_0x33098c,typeof _0x2bf3a0!=_0x23fa6f(0x15b)?_0x2bf3a0+'':_0x2bf3a0,_0x1592f6);let b=class extends _0x9156f8{constructor(_0x4d938c=M,_0x49d268,_0x4636dc){const _0x1bba38=_0x23fa6f;super(),this[_0x1bba38(0x174)]=_0x4d938c,this[_0x1bba38(0x140)]=_0x49d268,this[_0x1bba38(0x147)]=_0x4636dc;const {..._0x3cd3b9}=_0x110a0b({},M,this[_0x1bba38(0x174)]);this['_configService']['setConfig'](z,_0x3cd3b9);}[_0x23fa6f(0x145)](){const _0x50f6a0=_0x23fa6f;[[f],[g],[S]][_0x50f6a0(0x193)](_0x2ea6bc=>{const _0x4837c2=_0x50f6a0;this['_injector'][_0x4837c2(0x170)](_0x2ea6bc);});}['onReady'](){const _0x1fc511=_0x23fa6f;this[_0x1fc511(0x140)][_0x1fc511(0x13b)](g),this[_0x1fc511(0x140)][_0x1fc511(0x13b)](S);}};$(b,_0x23fa6f(0x167),W),$(b,_0x23fa6f(0x178),_0x43fc88[_0x23fa6f(0x142)]),b=ie([_0x1e041b(_0x4b0210,_0x3dcb68,_0x1dbdb7),w(0x1,_0x3c5570(_0x375bf6)),w(0x2,_0x1e8b56)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x521248=_0x5dec;(function(_0x8c7a22,_0x14bd5a){const _0x28d111=_0x5dec,_0x55fbc9=_0x8c7a22();while(!![]){try{const _0x2ac0ad=-parseInt(_0x28d111(0xf8))/0x1+-parseInt(_0x28d111(0x121))/0x2*(-parseInt(_0x28d111(0x14d))/0x3)+parseInt(_0x28d111(0xf0))/0x4+parseInt(_0x28d111(0x119))/0x5+-parseInt(_0x28d111(0xfd))/0x6+parseInt(_0x28d111(0xf3))/0x7+parseInt(_0x28d111(0x114))/0x8*(-parseInt(_0x28d111(0xfa))/0x9);if(_0x2ac0ad===_0x14bd5a)break;else _0x55fbc9['push'](_0x55fbc9['shift']());}catch(_0xec2de1){_0x55fbc9['push'](_0x55fbc9['shift']());}}}(_0x2f53,0xecd41));import{CommentService as _0x695c84,CollaborationSessionService as _0x2de60c,UniverCollaborationClientPlugin as _0x2ddcde}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xca7a46}from'@univerjs-pro/license';import{dayjs as _0x1d081f,UserManagerService as _0x5e4393,Inject as _0x30a124,Injector as _0x91409b,Disposable as _0x3fcfa0,CustomRangeType as _0x5c6f55,UniverInstanceType as _0x274050,DependentOn as _0x13c9ad,IConfigService as _0x1e339e,Plugin as _0x212cbe,merge as _0x123e4c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x502461}from'@univerjs/thread-comment-ui';function _0x5dec(_0x38b6d7,_0x559185){const _0x2f53cd=_0x2f53();return _0x5dec=function(_0x5dec20,_0x55b527){_0x5dec20=_0x5dec20-0xe9;let _0x3d5750=_0x2f53cd[_0x5dec20];return _0x3d5750;},_0x5dec(_0x38b6d7,_0x559185);}import{ThreadCommentModel as _0x444c3f,IThreadCommentDataSourceService as _0x408dc9}from'@univerjs/thread-comment';import{bufferTime as _0x3db9d6}from'rxjs';import{HTTPService as _0x11e3e7}from'@univerjs/network';const W=_0x521248(0x11b);var I=(_0x511929=>(_0x511929[_0x511929[_0x521248(0xe9)]=0x0]=_0x521248(0xe9),_0x511929[_0x511929['Solved']=0x1]=_0x521248(0x136),_0x511929[_0x511929[_0x521248(0xff)]=-0x1]=_0x521248(0xff),_0x511929))(I||{}),v=(_0x3358c0=>(_0x3358c0[_0x3358c0[_0x521248(0x127)]=0x0]='Unknown',_0x3358c0[_0x3358c0['Add']=0x1]=_0x521248(0x126),_0x3358c0[_0x3358c0[_0x521248(0x137)]=0x2]=_0x521248(0x137),_0x3358c0[_0x3358c0[_0x521248(0x101)]=0x3]=_0x521248(0x101),_0x3358c0[_0x3358c0[_0x521248(0x10a)]=0x4]='Delete',_0x3358c0[_0x3358c0[_0x521248(0x115)]=0x5]=_0x521248(0x115),_0x3358c0[_0x3358c0[_0x521248(0xff)]=-0x1]=_0x521248(0xff),_0x3358c0))(v||{});const D=_0x48d561=>_0x1d081f(new Date(+_0x48d561))[_0x521248(0x14c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x7da91b,_0x1d36d3)=>{const _0x329d89=_0x521248,_0x396473=_0x7da91b['get'](_0x5e4393),_0x54acaf=_0x7da91b[_0x329d89(0x12f)](_0x11e3e7);_0x1d36d3['forEach'](_0x557f01=>{const _0x136230=_0x329d89;_0x396473['getUser'](_0x557f01)&&_0x1d36d3[_0x136230(0x123)](_0x557f01);}),_0x1d36d3[_0x329d89(0x109)]&&(await _0x54acaf['get'](_0x329d89(0x144),{'params':{'userIDs':[..._0x1d36d3]}}))[_0x329d89(0xed)][_0x329d89(0x11d)]['forEach'](_0x196b31=>{const _0x368e1c=_0x329d89;_0x196b31&&_0x396473[_0x368e1c(0xef)](_0x196b31);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x370c02,_0x2a904e,_0x2626ad,_0xd93bc)=>{const _0x15fdc5=_0x521248;for(var _0x408445=_0xd93bc>0x1?void 0x0:_0xd93bc?K(_0x2a904e,_0x2626ad):_0x2a904e,_0x1d5ef7=_0x370c02[_0x15fdc5(0x12b)]-0x1,_0x3e52c7;_0x1d5ef7>=0x0;_0x1d5ef7--)(_0x3e52c7=_0x370c02[_0x1d5ef7])&&(_0x408445=_0x3e52c7(_0x408445)||_0x408445);return _0x408445;},p=(_0x3437bc,_0x11636e)=>(_0x248eb4,_0x2e7486)=>_0x11636e(_0x248eb4,_0x2e7486,_0x3437bc);let S=class extends _0x3fcfa0{constructor(_0x30325e,_0x5e7357,_0x261d80,_0x5f5752){const _0x5ec101=_0x521248;super(),this[_0x5ec101(0x11a)]=_0x30325e,this[_0x5ec101(0x102)]=_0x5e7357,this['_userService']=_0x261d80,this['_injector']=_0x5f5752,this['_init'](),this[_0x5ec101(0x132)]();}[_0x521248(0x132)](){const _0x4359e5=_0x521248;this[_0x4359e5(0x100)](this[_0x4359e5(0x102)][_0x4359e5(0xf9)][_0x4359e5(0xfe)](_0x3db9d6(0x10))[_0x4359e5(0xf1)](_0x2b350d=>{const _0x1d741f=_0x4359e5,_0x379569=new Set();_0x2b350d[_0x1d741f(0xf6)](_0x26107b=>{const _0x3c383a=_0x1d741f;switch(_0x26107b[_0x3c383a(0x145)]){case _0x3c383a(0x14a):{const _0x3bdea8=_0x26107b['payload'][_0x3c383a(0x116)];_0x379569[_0x3c383a(0x14a)](_0x3bdea8);break;}}}),B(this[_0x1d741f(0xea)],_0x379569);}));}['_init'](){const _0xdf9345=_0x521248;this[_0xdf9345(0x100)](this[_0xdf9345(0x11a)][_0xdf9345(0xf9)][_0xdf9345(0xf1)](async _0x479e09=>{const _0x29a3c8=_0xdf9345;var _0x2b1f40,_0x51f6ba,_0x5f0f53,_0x43a6ee;const _0x3c81b3=(_0x2b1f40=this[_0x29a3c8(0x102)][_0x29a3c8(0x13d)](_0x479e09[_0x29a3c8(0x12d)])[_0x29a3c8(0x12e)](_0x1727f8=>_0x1727f8['threadId']===_0x479e09[_0x29a3c8(0x147)]))==null?void 0x0:_0x2b1f40[_0x29a3c8(0x143)];if(!_0x3c81b3)return;const {unitId:_0x1aa92c,subUnitId:_0x2e4b58}=_0x3c81b3;switch(_0x479e09['user']&&this['_userService'][_0x29a3c8(0xef)](_0x479e09[_0x29a3c8(0x110)]),_0x479e09[_0x29a3c8(0x145)]){case v[_0x29a3c8(0x126)]:break;case v[_0x29a3c8(0x137)]:{this[_0x29a3c8(0x102)][_0x29a3c8(0xf2)](_0x1aa92c,_0x2e4b58,{'unitId':_0x1aa92c,'subUnitId':_0x2e4b58,'ref':'','id':_0x479e09[_0x29a3c8(0x10b)],'dT':D(+_0x479e09['createTimestamp']),'threadId':_0x479e09[_0x29a3c8(0x147)],'personId':(_0x5f0f53=(_0x51f6ba=_0x479e09[_0x29a3c8(0x110)])==null?void 0x0:_0x51f6ba[_0x29a3c8(0x107)])!=null?_0x5f0f53:_0x479e09[_0x29a3c8(0x11f)],'text':JSON[_0x29a3c8(0xfc)](_0x479e09[_0x29a3c8(0x122)]),'parentId':_0x3c81b3['id']});break;}case v[_0x29a3c8(0x10a)]:{const _0x4b3094=this['_threadCommentModel'][_0x29a3c8(0x139)](_0x1aa92c,_0x2e4b58,_0x479e09[_0x29a3c8(0x10b)]);_0x4b3094&&_0x4b3094['parentId']&&this['_threadCommentModel'][_0x29a3c8(0x10c)](_0x1aa92c,_0x2e4b58,_0x479e09[_0x29a3c8(0x10b)]);break;}case v['Edit']:{this[_0x29a3c8(0x102)]['updateComment'](_0x1aa92c,_0x2e4b58,{'commentId':_0x479e09['replyId'],'text':JSON[_0x29a3c8(0xfc)](_0x479e09[_0x29a3c8(0x122)])});break;}case v[_0x29a3c8(0x115)]:{const _0x3ebba5=(_0x43a6ee=this['_threadCommentModel'][_0x29a3c8(0x13d)](_0x479e09[_0x29a3c8(0x12d)])[_0x29a3c8(0x12e)](_0x1ccd5c=>_0x1ccd5c[_0x29a3c8(0x147)]===_0x479e09[_0x29a3c8(0x147)]))==null?void 0x0:_0x43a6ee['root'];_0x3ebba5&&this[_0x29a3c8(0x102)][_0x29a3c8(0x134)](_0x1aa92c,_0x2e4b58,_0x3ebba5['id'],_0x479e09[_0x29a3c8(0x11e)]===I[_0x29a3c8(0x136)]);break;}}}));}};S=V([p(0x0,_0x30a124(_0x695c84)),p(0x1,_0x30a124(_0x444c3f)),p(0x2,_0x30a124(_0x5e4393)),p(0x3,_0x30a124(_0x91409b))],S);const z=_0x521248(0x131),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x389fc1,_0x44bbe4,_0x357c56,_0x2707ee)=>{for(var _0x3eca8e=_0x2707ee>0x1?void 0x0:_0x2707ee?k(_0x44bbe4,_0x357c56):_0x44bbe4,_0x54e894=_0x389fc1['length']-0x1,_0x17c875;_0x54e894>=0x0;_0x54e894--)(_0x17c875=_0x389fc1[_0x54e894])&&(_0x3eca8e=_0x17c875(_0x3eca8e)||_0x3eca8e);return _0x3eca8e;},_=(_0x559f71,_0x1bbda0)=>(_0x9dd14f,_0x4ad798)=>_0x1bbda0(_0x9dd14f,_0x4ad798,_0x559f71);function _0x2f53(){const _0x52a37b=['/universer-api/comment/unit/','9583370fNSiTd','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','users','solved','userId','createTimestamp','838emhzMO','content','delete','post','/edit','Add','Unknown','resolved','requireSession','_userService','length','onStarting','unitId','find','get','replies','thread-comment-data-source.config','_initUserSync','values','resolveComment','/delete','Solved','Reply','_httpService','getComment','getMemberID','/solved','error','getUnit','saveCommentToSnapshot','/add','_threadCommentDataSourceService','_configService','COMMENT','root','/universer-api/user/list','type','customRanges','threadId','getOwnPropertyDescriptor','filter','add','rangeId','format','651qPcqww','OpenOrReOpen','_injector','stringify','setConfig','body','pluginName','addUser','2251732bcWWko','subscribe','addComment','4336297MkmwFr','updateComment','/list','forEach','_sessionService','353658saOzlt','commentUpdate$','1924407MmnjpP','code','parse','9914826nmVcGJ','pipe','UNRECOGNIZED','disposeWithMe','Edit','_threadCommentModel','onReady','reply','_threadCommentDataSource','slice','userID','listComments','size','Delete','replyId','deleteComment','map','syncUpdateMutationToColla','defineProperty','user','comment','dataSource','_initDataSource','8kDeEgx','Solve','personId','getCurrentUser'];_0x2f53=function(){return _0x52a37b;};return _0x2f53();}function X(_0x296fe0,_0x1a561f){const _0x145e71=_0x521248,_0x139767=_0x296fe0[_0x145e71(0x130)][0x0];return{..._0x1a561f,'id':_0x139767['replyId'],'resolved':_0x296fe0[_0x145e71(0x11e)]===0x1,'dT':D(_0x139767[_0x145e71(0x120)]),'personId':_0x139767[_0x145e71(0x11f)],'threadId':_0x139767[_0x145e71(0x147)]};}function ee(_0x1ccc3c,_0x5737b3,_0x5097af){const _0x420e19=_0x521248;var _0x13b983,_0x5b49e6;if(((_0x5b49e6=(_0x13b983=_0x1ccc3c==null?void 0x0:_0x1ccc3c['replies'])==null?void 0x0:_0x13b983[_0x420e19(0x12b)])!=null?_0x5b49e6:0x0)>0x0){const _0x4991ac=(_0xdb9eb5,_0x328ca6)=>({'id':_0xdb9eb5['replyId'],'threadId':_0xdb9eb5['threadId'],'dT':D(_0xdb9eb5[_0x420e19(0x120)]),'personId':_0xdb9eb5[_0x420e19(0x11f)],'resolved':_0x1ccc3c['solved']===I[_0x420e19(0x136)],'unitId':_0x5737b3,'subUnitId':_0x5097af,'text':JSON[_0x420e19(0xfc)](_0xdb9eb5['content']),'parentId':_0x328ca6}),_0x24559f=_0x4991ac(_0x1ccc3c['replies'][0x0]);return{..._0x24559f,'children':_0x1ccc3c[_0x420e19(0x130)][_0x420e19(0x106)](0x1)[_0x420e19(0x10d)](_0x236a5c=>_0x4991ac(_0x236a5c,_0x24559f['id']))};}return null;}let f=class{constructor(_0x408413,_0x57ddfc,_0xdcf56d,_0x41b707){const _0x166924=_0x521248;this[_0x166924(0x138)]=_0x408413,this[_0x166924(0x12a)]=_0x57ddfc,this['_sessionService']=_0xdcf56d,this[_0x166924(0xea)]=_0x41b707;}async[_0x521248(0xf2)](_0x3b82ca){const _0x359ee2=_0x521248;var _0x4025f6,_0x443300;const {parentId:_0x24a3ce,unitId:_0x511381,text:_0x1e8de6,threadId:_0x29e293}=_0x3b82ca,_0x274867=(_0x443300=(_0x4025f6=_0x1e8de6[_0x359ee2(0x146)])==null?void 0x0:_0x4025f6[_0x359ee2(0x149)](_0x256bb9=>_0x256bb9['rangeType']===_0x5c6f55[_0x359ee2(0x142)])[_0x359ee2(0x10d)](_0x1e0e06=>_0x1e0e06[_0x359ee2(0x14b)]))!=null?_0x443300:[],_0x5982d3=JSON[_0x359ee2(0xeb)](_0x1e8de6),_0x16d679=(await this[_0x359ee2(0xf7)]['requireSession'](_0x511381))[_0x359ee2(0x13a)]();if(_0x24a3ce){const _0x249df9={'memberId':_0x16d679,'unitId':_0x511381,'content':_0x5982d3,'mention':_0x274867,'threadId':_0x29e293},_0x2c0163=(await this[_0x359ee2(0x138)]['post'](_0x359ee2(0x118)+_0x511381+'/reply',{'body':_0x249df9}))[_0x359ee2(0xed)][_0x359ee2(0x104)];return{..._0x3b82ca,'id':_0x2c0163['replyId'],'dT':_0x1d081f(+_0x2c0163[_0x359ee2(0x120)])[_0x359ee2(0x14c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2c0163[_0x359ee2(0x11f)]};}else{const _0x40365d={'memberId':_0x16d679,'unitId':_0x511381,'content':_0x5982d3,'mention':_0x274867},_0x1afdf2=await this['_httpService']['post'](_0x359ee2(0x118)+_0x511381+_0x359ee2(0x13f),{'body':_0x40365d});return X(_0x1afdf2[_0x359ee2(0xed)][_0x359ee2(0x111)],_0x3b82ca);}}async[_0x521248(0xf4)](_0x456c88){const _0x5c5b50=_0x521248;var _0xd437c3,_0x1e5fb2;const {text:_0x1ebfa2,unitId:_0x1720a4}=_0x456c88,_0x1ae4fe=(_0x1e5fb2=(_0xd437c3=_0x1ebfa2['customRanges'])==null?void 0x0:_0xd437c3[_0x5c5b50(0x149)](_0x56d419=>_0x56d419['rangeType']===_0x5c6f55[_0x5c5b50(0x142)])[_0x5c5b50(0x10d)](_0x12fc6c=>_0x12fc6c[_0x5c5b50(0x14b)]))!=null?_0x1e5fb2:[],_0xe5bbe9=JSON['stringify'](_0x1ebfa2),_0x39a639=_0x456c88['threadId'],_0x59b279=_0x456c88['id'],_0xa6ba67={'memberId':(await this['_sessionService']['requireSession'](_0x1720a4))[_0x5c5b50(0x13a)](),'unitId':_0x1720a4,'threadId':_0x39a639,'mention':_0x1ae4fe,'content':_0xe5bbe9,'replyId':_0x59b279},_0xb061f1=await this['_httpService']['post'](_0x5c5b50(0x118)+_0x1720a4+_0x5c5b50(0x125),{'body':_0xa6ba67});return!_0xb061f1[_0x5c5b50(0xed)][_0x5c5b50(0x13c)]||_0xb061f1[_0x5c5b50(0xed)][_0x5c5b50(0x13c)]['code']===0x1;}async[_0x521248(0x134)](_0x38407a){const _0x4e249e=_0x521248,{unitId:_0x3f0640}=_0x38407a,_0x124e52=_0x38407a['threadId'],_0x46028a={'memberId':this['_userService'][_0x4e249e(0x117)]()[_0x4e249e(0x107)],'unitId':_0x3f0640,'threadId':_0x124e52,'solved':_0x38407a[_0x4e249e(0x128)]?I['Solved']:I[_0x4e249e(0xe9)]},_0x1aef6e=await this[_0x4e249e(0x138)][_0x4e249e(0x124)](_0x4e249e(0x118)+_0x3f0640+_0x4e249e(0x13b),{'body':_0x46028a});return!_0x1aef6e[_0x4e249e(0xed)][_0x4e249e(0x13c)]||_0x1aef6e[_0x4e249e(0xed)][_0x4e249e(0x13c)]['code']===0x1;}async['deleteComment'](_0x3b68f9,_0x3021f1,_0x163d15,_0x143918){const _0x1490d3=_0x521248,_0x20e18d={'memberId':(await this['_sessionService'][_0x1490d3(0x129)](_0x3b68f9))['getMemberID'](),'threadId':_0x163d15,'replyId':_0x143918,'unitId':_0x3b68f9},_0x15bd25=await this[_0x1490d3(0x138)][_0x1490d3(0x124)](_0x1490d3(0x118)+_0x3b68f9+_0x1490d3(0x135),{'body':_0x20e18d});return!_0x15bd25['body'][_0x1490d3(0x13c)]||_0x15bd25[_0x1490d3(0xed)][_0x1490d3(0x13c)][_0x1490d3(0xfb)]===0x1;}async[_0x521248(0x108)](_0x99819d,_0x55c058,_0x32e47f){const _0xa057bf=_0x521248,_0x131054={'unitId':_0x99819d,'threadId':_0x32e47f},_0x10086b=await this['_httpService'][_0xa057bf(0x124)](_0xa057bf(0x118)+_0x99819d+_0xa057bf(0xf5),{'body':_0x131054}),_0x4bce7b=_0x32e47f[_0xa057bf(0x10d)](_0x585054=>ee(_0x10086b[_0xa057bf(0xed)]['comments'][_0x585054],_0x99819d,_0x55c058))[_0xa057bf(0x149)](Boolean);return Object[_0xa057bf(0x133)](_0x10086b['body'][_0xa057bf(0x11d)])[_0xa057bf(0xf6)](_0x1b9d16=>{const _0x1390ff=_0xa057bf;this[_0x1390ff(0x12a)]['addUser'](_0x1b9d16);}),_0x4bce7b;}[_0x521248(0x13e)](_0x51e7e3){const _0x58c8cc=_0x521248;return{'id':_0x51e7e3['id'],'threadId':_0x51e7e3[_0x58c8cc(0x147)],'ref':_0x51e7e3['ref']};}};f=Q([_(0x0,_0x30a124(_0x11e3e7)),_(0x1,_0x30a124(_0x5e4393)),_(0x2,_0x30a124(_0x2de60c)),_(0x3,_0x30a124(_0x91409b))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2bbdb2,_0xe1ef1d,_0x251581,_0xdaf905)=>{for(var _0x11518b=_0xdaf905>0x1?void 0x0:_0xdaf905?re(_0xe1ef1d,_0x251581):_0xe1ef1d,_0x2e7509=_0x2bbdb2['length']-0x1,_0x47711f;_0x2e7509>=0x0;_0x2e7509--)(_0x47711f=_0x2bbdb2[_0x2e7509])&&(_0x11518b=_0x47711f(_0x11518b)||_0x11518b);return _0x11518b;},N=(_0x97c0d1,_0x91ac35)=>(_0x319c93,_0x52a6e0)=>_0x91ac35(_0x319c93,_0x52a6e0,_0x97c0d1);let g=class extends _0x3fcfa0{constructor(_0x38b8b,_0x4481af){const _0x35dfaa=_0x521248;super(),this[_0x35dfaa(0x140)]=_0x38b8b,this[_0x35dfaa(0x105)]=_0x4481af,this[_0x35dfaa(0x113)]();}[_0x521248(0x113)](){const _0x46caa7=_0x521248;this[_0x46caa7(0x140)][_0x46caa7(0x112)]=this[_0x46caa7(0x105)],this[_0x46caa7(0x140)][_0x46caa7(0x10e)]=!0x1;}};g=te([N(0x0,_0x408dc9),N(0x1,_0x30a124(f))],g);var se=Object[_0x521248(0x10f)],oe=Object[_0x521248(0x148)],ne=(_0x5d6f78,_0x12f06f,_0xf60301)=>_0x12f06f in _0x5d6f78?se(_0x5d6f78,_0x12f06f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf60301}):_0x5d6f78[_0x12f06f]=_0xf60301,ie=(_0x183baf,_0x38e501,_0x506baf,_0x382a3b)=>{for(var _0x5e3a7f=_0x382a3b>0x1?void 0x0:_0x382a3b?oe(_0x38e501,_0x506baf):_0x38e501,_0x2cce59=_0x183baf['length']-0x1,_0x208525;_0x2cce59>=0x0;_0x2cce59--)(_0x208525=_0x183baf[_0x2cce59])&&(_0x5e3a7f=_0x208525(_0x5e3a7f)||_0x5e3a7f);return _0x5e3a7f;},w=(_0x531e92,_0x1e5ebe)=>(_0x4a20fe,_0xc3a5f2)=>_0x1e5ebe(_0x4a20fe,_0xc3a5f2,_0x531e92),$=(_0x35f5ec,_0x1a0d35,_0x188b7f)=>ne(_0x35f5ec,typeof _0x1a0d35!='symbol'?_0x1a0d35+'':_0x1a0d35,_0x188b7f);let b=class extends _0x212cbe{constructor(_0x32fd49=M,_0xe6d1b0,_0x1b2de3){const _0x43386f=_0x521248;super(),this['_config']=_0x32fd49,this['_injector']=_0xe6d1b0,this[_0x43386f(0x141)]=_0x1b2de3;const {..._0x41c434}=_0x123e4c({},M,this[_0x43386f(0x11c)]);this['_configService'][_0x43386f(0xec)](z,_0x41c434);}[_0x521248(0x12c)](){[[f],[g],[S]]['forEach'](_0x28408c=>{const _0x2ee2f4=_0x5dec;this[_0x2ee2f4(0xea)][_0x2ee2f4(0x14a)](_0x28408c);});}[_0x521248(0x103)](){const _0x1d37b0=_0x521248;this[_0x1d37b0(0xea)]['get'](g),this[_0x1d37b0(0xea)][_0x1d37b0(0x12f)](S);}};$(b,_0x521248(0xee),W),$(b,_0x521248(0x145),_0x274050['UNIVER_UNKNOWN']),b=ie([_0x13c9ad(_0x502461,_0x2ddcde,_0xca7a46),w(0x1,_0x30a124(_0x91409b)),w(0x2,_0x1e339e)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x23fa6f=_0x50e2;(function(_0x34d748,_0x3b8ba5){const _0x26f94b=_0x50e2,_0x16dbaf=_0x34d748();while(!![]){try{const _0x3c29d6=parseInt(_0x26f94b(0x143))/0x1+parseInt(_0x26f94b(0x18f))/0x2+-parseInt(_0x26f94b(0x151))/0x3+-parseInt(_0x26f94b(0x132))/0x4+parseInt(_0x26f94b(0x159))/0x5+-parseInt(_0x26f94b(0x185))/0x6*(-parseInt(_0x26f94b(0x14a))/0x7)+parseInt(_0x26f94b(0x169))/0x8*(parseInt(_0x26f94b(0x173))/0x9);if(_0x3c29d6===_0x3b8ba5)break;else _0x16dbaf['push'](_0x16dbaf['shift']());}catch(_0x4b36c2){_0x16dbaf['push'](_0x16dbaf['shift']());}}}(_0x232d,0x587c4));import{CommentService as _0x20a661,CollaborationSessionService as _0xea13e3,UniverCollaborationClientPlugin as _0x3dcb68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1dbdb7}from'@univerjs-pro/license';import{dayjs as _0x3a9660,UserManagerService as _0x469b81,Inject as _0x3c5570,Injector as _0x375bf6,Disposable as _0x34d19b,CustomRangeType as _0x445314,UniverInstanceType as _0x43fc88,DependentOn as _0x1e041b,IConfigService as _0x1e8b56,Plugin as _0x9156f8,merge as _0x110a0b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b0210}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5f0ff,IThreadCommentDataSourceService as _0x2ecb1d}from'@univerjs/thread-comment';import{bufferTime as _0x5b8e83}from'rxjs';import{HTTPService as _0x46056e}from'@univerjs/network';const W=_0x23fa6f(0x166);var I=(_0x48f0cc=>(_0x48f0cc[_0x48f0cc[_0x23fa6f(0x158)]=0x0]=_0x23fa6f(0x158),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x137)]=0x1]=_0x23fa6f(0x137),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x48f0cc))(I||{}),v=(_0x2822d8=>(_0x2822d8[_0x2822d8[_0x23fa6f(0x188)]=0x0]=_0x23fa6f(0x188),_0x2822d8[_0x2822d8['Add']=0x1]='Add',_0x2822d8[_0x2822d8[_0x23fa6f(0x156)]=0x2]='Reply',_0x2822d8[_0x2822d8['Edit']=0x3]='Edit',_0x2822d8[_0x2822d8[_0x23fa6f(0x13d)]=0x4]=_0x23fa6f(0x13d),_0x2822d8[_0x2822d8[_0x23fa6f(0x177)]=0x5]=_0x23fa6f(0x177),_0x2822d8[_0x2822d8[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x2822d8))(v||{});const D=_0x57489c=>_0x3a9660(new Date(+_0x57489c))[_0x23fa6f(0x17f)](_0x23fa6f(0x15e)),B=async(_0x1dd44f,_0x40b698)=>{const _0x7afd01=_0x23fa6f,_0x238c72=_0x1dd44f[_0x7afd01(0x13b)](_0x469b81),_0x315977=_0x1dd44f['get'](_0x46056e);_0x40b698['forEach'](_0x53849b=>{const _0x57666f=_0x7afd01;_0x238c72[_0x57666f(0x164)](_0x53849b)&&_0x40b698[_0x57666f(0x16e)](_0x53849b);}),_0x40b698[_0x7afd01(0x14e)]&&(await _0x315977[_0x7afd01(0x13b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40b698]}}))['body'][_0x7afd01(0x18c)][_0x7afd01(0x193)](_0x2c6970=>{const _0x32f084=_0x7afd01;_0x2c6970&&_0x238c72[_0x32f084(0x138)](_0x2c6970);});};var K=Object[_0x23fa6f(0x191)],V=(_0x240725,_0x301fe1,_0x7f5cca,_0x6aa73)=>{for(var _0x230780=_0x6aa73>0x1?void 0x0:_0x6aa73?K(_0x301fe1,_0x7f5cca):_0x301fe1,_0x2a8a03=_0x240725['length']-0x1,_0x17b4a7;_0x2a8a03>=0x0;_0x2a8a03--)(_0x17b4a7=_0x240725[_0x2a8a03])&&(_0x230780=_0x17b4a7(_0x230780)||_0x230780);return _0x230780;},p=(_0x538cbd,_0x7bae1)=>(_0xa0f7c1,_0x563fe3)=>_0x7bae1(_0xa0f7c1,_0x563fe3,_0x538cbd);let S=class extends _0x34d19b{constructor(_0x6cc892,_0x16fee6,_0x4db590,_0x23de98){const _0x3ffb7d=_0x23fa6f;super(),this[_0x3ffb7d(0x14d)]=_0x6cc892,this['_threadCommentModel']=_0x16fee6,this['_userService']=_0x4db590,this['_injector']=_0x23de98,this['_init'](),this[_0x3ffb7d(0x181)]();}['_initUserSync'](){const _0x19eeb0=_0x23fa6f;this[_0x19eeb0(0x14b)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x5b8e83(0x10))[_0x19eeb0(0x135)](_0x3b37b8=>{const _0x282ad1=_0x19eeb0,_0x582357=new Set();_0x3b37b8[_0x282ad1(0x193)](_0x514d50=>{const _0x328e3f=_0x282ad1;switch(_0x514d50[_0x328e3f(0x178)]){case _0x328e3f(0x170):{const _0x1e96c4=_0x514d50[_0x328e3f(0x13e)][_0x328e3f(0x144)];_0x582357['add'](_0x1e96c4);break;}}}),B(this[_0x282ad1(0x140)],_0x582357);}));}['_init'](){const _0x33ec78=_0x23fa6f;this[_0x33ec78(0x14b)](this['_commentService'][_0x33ec78(0x134)][_0x33ec78(0x135)](async _0x2ef939=>{const _0xcfd235=_0x33ec78;var _0x52fc42,_0x55b9ab,_0x18afa9,_0x2f5a17;const _0x58bbe5=(_0x52fc42=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939['unitId'])[_0xcfd235(0x183)](_0x31f112=>_0x31f112[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x52fc42[_0xcfd235(0x17d)];if(!_0x58bbe5)return;const {unitId:_0x468376,subUnitId:_0x48c59b}=_0x58bbe5;switch(_0x2ef939[_0xcfd235(0x155)]&&this['_userService'][_0xcfd235(0x138)](_0x2ef939[_0xcfd235(0x155)]),_0x2ef939[_0xcfd235(0x178)]){case v[_0xcfd235(0x17b)]:break;case v['Reply']:{this[_0xcfd235(0x18d)][_0xcfd235(0x162)](_0x468376,_0x48c59b,{'unitId':_0x468376,'subUnitId':_0x48c59b,'ref':'','id':_0x2ef939[_0xcfd235(0x194)],'dT':D(+_0x2ef939[_0xcfd235(0x13a)]),'threadId':_0x2ef939['threadId'],'personId':(_0x18afa9=(_0x55b9ab=_0x2ef939[_0xcfd235(0x155)])==null?void 0x0:_0x55b9ab[_0xcfd235(0x184)])!=null?_0x18afa9:_0x2ef939[_0xcfd235(0x172)],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)]),'parentId':_0x58bbe5['id']});break;}case v['Delete']:{const _0x49e090=this['_threadCommentModel'][_0xcfd235(0x14f)](_0x468376,_0x48c59b,_0x2ef939[_0xcfd235(0x194)]);_0x49e090&&_0x49e090[_0xcfd235(0x196)]&&this[_0xcfd235(0x18d)][_0xcfd235(0x175)](_0x468376,_0x48c59b,_0x2ef939['replyId']);break;}case v[_0xcfd235(0x131)]:{this[_0xcfd235(0x18d)][_0xcfd235(0x163)](_0x468376,_0x48c59b,{'commentId':_0x2ef939['replyId'],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)])});break;}case v['Solve']:{const _0x9465d2=(_0x2f5a17=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939[_0xcfd235(0x152)])[_0xcfd235(0x183)](_0x55bd72=>_0x55bd72[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x2f5a17[_0xcfd235(0x17d)];_0x9465d2&&this['_threadCommentModel'][_0xcfd235(0x150)](_0x468376,_0x48c59b,_0x9465d2['id'],_0x2ef939['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c5570(_0x20a661)),p(0x1,_0x3c5570(_0x5f0ff)),p(0x2,_0x3c5570(_0x469b81)),p(0x3,_0x3c5570(_0x375bf6))],S);const z=_0x23fa6f(0x16c),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x82b03f,_0x4b6cee,_0x499727,_0x5f1d63)=>{for(var _0x1e114d=_0x5f1d63>0x1?void 0x0:_0x5f1d63?k(_0x4b6cee,_0x499727):_0x4b6cee,_0x3d66e0=_0x82b03f['length']-0x1,_0x467409;_0x3d66e0>=0x0;_0x3d66e0--)(_0x467409=_0x82b03f[_0x3d66e0])&&(_0x1e114d=_0x467409(_0x1e114d)||_0x1e114d);return _0x1e114d;},_=(_0x2ca03f,_0x153acf)=>(_0x988932,_0x25f323)=>_0x153acf(_0x988932,_0x25f323,_0x2ca03f);function X(_0x88b89b,_0x19ffdd){const _0x2ab970=_0x23fa6f,_0x7fee40=_0x88b89b[_0x2ab970(0x15a)][0x0];return{..._0x19ffdd,'id':_0x7fee40[_0x2ab970(0x194)],'resolved':_0x88b89b['solved']===0x1,'dT':D(_0x7fee40[_0x2ab970(0x13a)]),'personId':_0x7fee40[_0x2ab970(0x172)],'threadId':_0x7fee40[_0x2ab970(0x149)]};}function ee(_0x1f58a7,_0x149fdf,_0x153be4){const _0x24b445=_0x23fa6f;var _0x45511a,_0x445262;if(((_0x445262=(_0x45511a=_0x1f58a7==null?void 0x0:_0x1f58a7[_0x24b445(0x15a)])==null?void 0x0:_0x45511a[_0x24b445(0x182)])!=null?_0x445262:0x0)>0x0){const _0xca0303=(_0x48a89e,_0x2e9b24)=>({'id':_0x48a89e[_0x24b445(0x194)],'threadId':_0x48a89e[_0x24b445(0x149)],'dT':D(_0x48a89e['createTimestamp']),'personId':_0x48a89e['userId'],'resolved':_0x1f58a7[_0x24b445(0x15c)]===I[_0x24b445(0x137)],'unitId':_0x149fdf,'subUnitId':_0x153be4,'text':JSON[_0x24b445(0x17a)](_0x48a89e[_0x24b445(0x157)]),'parentId':_0x2e9b24}),_0x45d7e5=_0xca0303(_0x1f58a7[_0x24b445(0x15a)][0x0]);return{..._0x45d7e5,'children':_0x1f58a7[_0x24b445(0x15a)][_0x24b445(0x165)](0x1)[_0x24b445(0x141)](_0x3ded48=>_0xca0303(_0x3ded48,_0x45d7e5['id']))};}return null;}let f=class{constructor(_0x59501d,_0x3353d5,_0x31333c,_0x2b0455){const _0x176980=_0x23fa6f;this[_0x176980(0x16b)]=_0x59501d,this[_0x176980(0x139)]=_0x3353d5,this['_sessionService']=_0x31333c,this[_0x176980(0x140)]=_0x2b0455;}async['addComment'](_0x3369af){const _0x4dfc58=_0x23fa6f;var _0x1f7b0f,_0xdb71e2;const {parentId:_0x1f6c5d,unitId:_0x141d05,text:_0x14ea23,threadId:_0x4de648}=_0x3369af,_0xc577b4=(_0xdb71e2=(_0x1f7b0f=_0x14ea23['customRanges'])==null?void 0x0:_0x1f7b0f[_0x4dfc58(0x13c)](_0x682a48=>_0x682a48[_0x4dfc58(0x154)]===_0x445314[_0x4dfc58(0x15f)])[_0x4dfc58(0x141)](_0x43ddbc=>_0x43ddbc[_0x4dfc58(0x195)]))!=null?_0xdb71e2:[],_0x83fa7b=JSON[_0x4dfc58(0x192)](_0x14ea23),_0x492dcc=(await this[_0x4dfc58(0x186)][_0x4dfc58(0x18a)](_0x141d05))[_0x4dfc58(0x179)]();if(_0x1f6c5d){const _0x55cf12={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4,'threadId':_0x4de648},_0x569c35=(await this['_httpService'][_0x4dfc58(0x133)]('/universer-api/comment/unit/'+_0x141d05+_0x4dfc58(0x17c),{'body':_0x55cf12}))[_0x4dfc58(0x148)]['reply'];return{..._0x3369af,'id':_0x569c35['replyId'],'dT':_0x3a9660(+_0x569c35[_0x4dfc58(0x13a)])[_0x4dfc58(0x17f)](_0x4dfc58(0x15e)),'personId':_0x569c35[_0x4dfc58(0x172)]};}else{const _0x339d43={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4},_0x36639c=await this[_0x4dfc58(0x16b)]['post'](_0x4dfc58(0x146)+_0x141d05+_0x4dfc58(0x190),{'body':_0x339d43});return X(_0x36639c['body'][_0x4dfc58(0x136)],_0x3369af);}}async['updateComment'](_0x2272bb){const _0x4a829a=_0x23fa6f;var _0x4ed306,_0x33f969;const {text:_0x3bff7c,unitId:_0xaa685e}=_0x2272bb,_0x1ef3a8=(_0x33f969=(_0x4ed306=_0x3bff7c[_0x4a829a(0x16f)])==null?void 0x0:_0x4ed306[_0x4a829a(0x13c)](_0x505a42=>_0x505a42[_0x4a829a(0x154)]===_0x445314[_0x4a829a(0x15f)])[_0x4a829a(0x141)](_0xd5023c=>_0xd5023c[_0x4a829a(0x195)]))!=null?_0x33f969:[],_0x495eec=JSON[_0x4a829a(0x192)](_0x3bff7c),_0x396c5d=_0x2272bb[_0x4a829a(0x149)],_0x2dbfc2=_0x2272bb['id'],_0x42711a={'memberId':(await this[_0x4a829a(0x186)][_0x4a829a(0x18a)](_0xaa685e))[_0x4a829a(0x179)](),'unitId':_0xaa685e,'threadId':_0x396c5d,'mention':_0x1ef3a8,'content':_0x495eec,'replyId':_0x2dbfc2},_0x228803=await this[_0x4a829a(0x16b)]['post'](_0x4a829a(0x146)+_0xaa685e+_0x4a829a(0x153),{'body':_0x42711a});return!_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)]||_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)][_0x4a829a(0x187)]===0x1;}async[_0x23fa6f(0x150)](_0x3a102e){const _0x893dad=_0x23fa6f,{unitId:_0x1a4ee8}=_0x3a102e,_0x52948d=_0x3a102e[_0x893dad(0x149)],_0x315da6={'memberId':this[_0x893dad(0x139)][_0x893dad(0x168)]()[_0x893dad(0x184)],'unitId':_0x1a4ee8,'threadId':_0x52948d,'solved':_0x3a102e[_0x893dad(0x180)]?I['Solved']:I[_0x893dad(0x158)]},_0x5daa18=await this[_0x893dad(0x16b)][_0x893dad(0x133)](_0x893dad(0x146)+_0x1a4ee8+'/solved',{'body':_0x315da6});return!_0x5daa18[_0x893dad(0x148)][_0x893dad(0x13f)]||_0x5daa18['body'][_0x893dad(0x13f)]['code']===0x1;}async[_0x23fa6f(0x175)](_0x492fbe,_0x20aa2b,_0x47dc38,_0x43ed9a){const _0x338c77=_0x23fa6f,_0x37979b={'memberId':(await this[_0x338c77(0x186)][_0x338c77(0x18a)](_0x492fbe))[_0x338c77(0x179)](),'threadId':_0x47dc38,'replyId':_0x43ed9a,'unitId':_0x492fbe},_0x2a8e9b=await this[_0x338c77(0x16b)]['post'](_0x338c77(0x146)+_0x492fbe+_0x338c77(0x161),{'body':_0x37979b});return!_0x2a8e9b[_0x338c77(0x148)][_0x338c77(0x13f)]||_0x2a8e9b['body'][_0x338c77(0x13f)]['code']===0x1;}async[_0x23fa6f(0x160)](_0x45031e,_0x5a6ec3,_0x31447f){const _0x1baba2=_0x23fa6f,_0x14c29c={'unitId':_0x45031e,'threadId':_0x31447f},_0x49cb52=await this[_0x1baba2(0x16b)]['post'](_0x1baba2(0x146)+_0x45031e+_0x1baba2(0x189),{'body':_0x14c29c}),_0x2b2ae0=_0x31447f['map'](_0x43a8dc=>ee(_0x49cb52[_0x1baba2(0x148)]['comments'][_0x43a8dc],_0x45031e,_0x5a6ec3))['filter'](Boolean);return Object[_0x1baba2(0x18b)](_0x49cb52[_0x1baba2(0x148)]['users'])[_0x1baba2(0x193)](_0x446848=>{const _0x2db9d7=_0x1baba2;this[_0x2db9d7(0x139)][_0x2db9d7(0x138)](_0x446848);}),_0x2b2ae0;}[_0x23fa6f(0x16a)](_0x5b137d){const _0x42a704=_0x23fa6f;return{'id':_0x5b137d['id'],'threadId':_0x5b137d[_0x42a704(0x149)],'ref':_0x5b137d[_0x42a704(0x17e)]};}};f=Q([_(0x0,_0x3c5570(_0x46056e)),_(0x1,_0x3c5570(_0x469b81)),_(0x2,_0x3c5570(_0xea13e3)),_(0x3,_0x3c5570(_0x375bf6))],f);function _0x232d(){const _0x2cb19f=['UNRECOGNIZED','userId','81fieKZb','_config','deleteComment','_initDataSource','Solve','type','getMemberID','parse','Add','/reply','root','ref','format','resolved','_initUserSync','length','find','userID','1063266tWPabu','_sessionService','code','Unknown','/list','requireSession','values','users','_threadCommentModel','syncUpdateMutationToColla','207964FpCeoe','/add','getOwnPropertyDescriptor','stringify','forEach','replyId','rangeId','parentId','Edit','2124856atNMAs','post','commentUpdate$','subscribe','comment','Solved','addUser','_userService','createTimestamp','get','filter','Delete','payload','error','_injector','map','UNIVER_UNKNOWN','305756dYqwOB','personId','onStarting','/universer-api/comment/unit/','_configService','body','threadId','7WQHcox','disposeWithMe','defineProperty','_commentService','size','getComment','resolveComment','2131896lnGvoZ','unitId','/edit','rangeType','user','Reply','content','OpenOrReOpen','1998990evNXKx','replies','symbol','solved','_threadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','COMMENT','listComments','/delete','addComment','updateComment','getUser','slice','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pluginName','getCurrentUser','548920WTNLwF','saveCommentToSnapshot','_httpService','thread-comment-data-source.config','getUnit','delete','customRanges','add'];_0x232d=function(){return _0x2cb19f;};return _0x232d();}var re=Object['getOwnPropertyDescriptor'],te=(_0x4cdb3b,_0x5c6053,_0x306b0a,_0x11af14)=>{const _0xd59cd6=_0x23fa6f;for(var _0x4f0cb9=_0x11af14>0x1?void 0x0:_0x11af14?re(_0x5c6053,_0x306b0a):_0x5c6053,_0x27f433=_0x4cdb3b[_0xd59cd6(0x182)]-0x1,_0x228e1d;_0x27f433>=0x0;_0x27f433--)(_0x228e1d=_0x4cdb3b[_0x27f433])&&(_0x4f0cb9=_0x228e1d(_0x4f0cb9)||_0x4f0cb9);return _0x4f0cb9;},N=(_0x4b1047,_0x40107a)=>(_0x4df5fc,_0x3bbf7b)=>_0x40107a(_0x4df5fc,_0x3bbf7b,_0x4b1047);let g=class extends _0x34d19b{constructor(_0x3a2768,_0x29ad6b){const _0x159e26=_0x23fa6f;super(),this['_threadCommentDataSourceService']=_0x3a2768,this['_threadCommentDataSource']=_0x29ad6b,this[_0x159e26(0x176)]();}[_0x23fa6f(0x176)](){const _0x64a5cc=_0x23fa6f;this[_0x64a5cc(0x15d)]['dataSource']=this['_threadCommentDataSource'],this[_0x64a5cc(0x15d)][_0x64a5cc(0x18e)]=!0x1;}};function _0x50e2(_0x767746,_0x4ac769){const _0x232d80=_0x232d();return _0x50e2=function(_0x50e299,_0x5ddb01){_0x50e299=_0x50e299-0x131;let _0x470b70=_0x232d80[_0x50e299];return _0x470b70;},_0x50e2(_0x767746,_0x4ac769);}g=te([N(0x0,_0x2ecb1d),N(0x1,_0x3c5570(f))],g);var se=Object[_0x23fa6f(0x14c)],oe=Object[_0x23fa6f(0x191)],ne=(_0x467322,_0x45c742,_0x1aff4f)=>_0x45c742 in _0x467322?se(_0x467322,_0x45c742,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1aff4f}):_0x467322[_0x45c742]=_0x1aff4f,ie=(_0x3fff74,_0x8420e7,_0x267e03,_0x3404c7)=>{const _0x199b92=_0x23fa6f;for(var _0x538b59=_0x3404c7>0x1?void 0x0:_0x3404c7?oe(_0x8420e7,_0x267e03):_0x8420e7,_0x23f855=_0x3fff74[_0x199b92(0x182)]-0x1,_0x2c5833;_0x23f855>=0x0;_0x23f855--)(_0x2c5833=_0x3fff74[_0x23f855])&&(_0x538b59=_0x2c5833(_0x538b59)||_0x538b59);return _0x538b59;},w=(_0x40970d,_0x4c0f04)=>(_0x30f643,_0x376f4d)=>_0x4c0f04(_0x30f643,_0x376f4d,_0x40970d),$=(_0x33098c,_0x2bf3a0,_0x1592f6)=>ne(_0x33098c,typeof _0x2bf3a0!=_0x23fa6f(0x15b)?_0x2bf3a0+'':_0x2bf3a0,_0x1592f6);let b=class extends _0x9156f8{constructor(_0x4d938c=M,_0x49d268,_0x4636dc){const _0x1bba38=_0x23fa6f;super(),this[_0x1bba38(0x174)]=_0x4d938c,this[_0x1bba38(0x140)]=_0x49d268,this[_0x1bba38(0x147)]=_0x4636dc;const {..._0x3cd3b9}=_0x110a0b({},M,this[_0x1bba38(0x174)]);this['_configService']['setConfig'](z,_0x3cd3b9);}[_0x23fa6f(0x145)](){const _0x50f6a0=_0x23fa6f;[[f],[g],[S]][_0x50f6a0(0x193)](_0x2ea6bc=>{const _0x4837c2=_0x50f6a0;this['_injector'][_0x4837c2(0x170)](_0x2ea6bc);});}['onReady'](){const _0x1fc511=_0x23fa6f;this[_0x1fc511(0x140)][_0x1fc511(0x13b)](g),this[_0x1fc511(0x140)][_0x1fc511(0x13b)](S);}};$(b,_0x23fa6f(0x167),W),$(b,_0x23fa6f(0x178),_0x43fc88[_0x23fa6f(0x142)]),b=ie([_0x1e041b(_0x4b0210,_0x3dcb68,_0x1dbdb7),w(0x1,_0x3c5570(_0x375bf6)),w(0x2,_0x1e8b56)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x521248=_0x5dec;(function(_0x8c7a22,_0x14bd5a){const _0x28d111=_0x5dec,_0x55fbc9=_0x8c7a22();while(!![]){try{const _0x2ac0ad=-parseInt(_0x28d111(0xf8))/0x1+-parseInt(_0x28d111(0x121))/0x2*(-parseInt(_0x28d111(0x14d))/0x3)+parseInt(_0x28d111(0xf0))/0x4+parseInt(_0x28d111(0x119))/0x5+-parseInt(_0x28d111(0xfd))/0x6+parseInt(_0x28d111(0xf3))/0x7+parseInt(_0x28d111(0x114))/0x8*(-parseInt(_0x28d111(0xfa))/0x9);if(_0x2ac0ad===_0x14bd5a)break;else _0x55fbc9['push'](_0x55fbc9['shift']());}catch(_0xec2de1){_0x55fbc9['push'](_0x55fbc9['shift']());}}}(_0x2f53,0xecd41));import{CommentService as _0x695c84,CollaborationSessionService as _0x2de60c,UniverCollaborationClientPlugin as _0x2ddcde}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xca7a46}from'@univerjs-pro/license';import{dayjs as _0x1d081f,UserManagerService as _0x5e4393,Inject as _0x30a124,Injector as _0x91409b,Disposable as _0x3fcfa0,CustomRangeType as _0x5c6f55,UniverInstanceType as _0x274050,DependentOn as _0x13c9ad,IConfigService as _0x1e339e,Plugin as _0x212cbe,merge as _0x123e4c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x502461}from'@univerjs/thread-comment-ui';function _0x5dec(_0x38b6d7,_0x559185){const _0x2f53cd=_0x2f53();return _0x5dec=function(_0x5dec20,_0x55b527){_0x5dec20=_0x5dec20-0xe9;let _0x3d5750=_0x2f53cd[_0x5dec20];return _0x3d5750;},_0x5dec(_0x38b6d7,_0x559185);}import{ThreadCommentModel as _0x444c3f,IThreadCommentDataSourceService as _0x408dc9}from'@univerjs/thread-comment';import{bufferTime as _0x3db9d6}from'rxjs';import{HTTPService as _0x11e3e7}from'@univerjs/network';const W=_0x521248(0x11b);var I=(_0x511929=>(_0x511929[_0x511929[_0x521248(0xe9)]=0x0]=_0x521248(0xe9),_0x511929[_0x511929['Solved']=0x1]=_0x521248(0x136),_0x511929[_0x511929[_0x521248(0xff)]=-0x1]=_0x521248(0xff),_0x511929))(I||{}),v=(_0x3358c0=>(_0x3358c0[_0x3358c0[_0x521248(0x127)]=0x0]='Unknown',_0x3358c0[_0x3358c0['Add']=0x1]=_0x521248(0x126),_0x3358c0[_0x3358c0[_0x521248(0x137)]=0x2]=_0x521248(0x137),_0x3358c0[_0x3358c0[_0x521248(0x101)]=0x3]=_0x521248(0x101),_0x3358c0[_0x3358c0[_0x521248(0x10a)]=0x4]='Delete',_0x3358c0[_0x3358c0[_0x521248(0x115)]=0x5]=_0x521248(0x115),_0x3358c0[_0x3358c0[_0x521248(0xff)]=-0x1]=_0x521248(0xff),_0x3358c0))(v||{});const D=_0x48d561=>_0x1d081f(new Date(+_0x48d561))[_0x521248(0x14c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x7da91b,_0x1d36d3)=>{const _0x329d89=_0x521248,_0x396473=_0x7da91b['get'](_0x5e4393),_0x54acaf=_0x7da91b[_0x329d89(0x12f)](_0x11e3e7);_0x1d36d3['forEach'](_0x557f01=>{const _0x136230=_0x329d89;_0x396473['getUser'](_0x557f01)&&_0x1d36d3[_0x136230(0x123)](_0x557f01);}),_0x1d36d3[_0x329d89(0x109)]&&(await _0x54acaf['get'](_0x329d89(0x144),{'params':{'userIDs':[..._0x1d36d3]}}))[_0x329d89(0xed)][_0x329d89(0x11d)]['forEach'](_0x196b31=>{const _0x368e1c=_0x329d89;_0x196b31&&_0x396473[_0x368e1c(0xef)](_0x196b31);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x370c02,_0x2a904e,_0x2626ad,_0xd93bc)=>{const _0x15fdc5=_0x521248;for(var _0x408445=_0xd93bc>0x1?void 0x0:_0xd93bc?K(_0x2a904e,_0x2626ad):_0x2a904e,_0x1d5ef7=_0x370c02[_0x15fdc5(0x12b)]-0x1,_0x3e52c7;_0x1d5ef7>=0x0;_0x1d5ef7--)(_0x3e52c7=_0x370c02[_0x1d5ef7])&&(_0x408445=_0x3e52c7(_0x408445)||_0x408445);return _0x408445;},p=(_0x3437bc,_0x11636e)=>(_0x248eb4,_0x2e7486)=>_0x11636e(_0x248eb4,_0x2e7486,_0x3437bc);let S=class extends _0x3fcfa0{constructor(_0x30325e,_0x5e7357,_0x261d80,_0x5f5752){const _0x5ec101=_0x521248;super(),this[_0x5ec101(0x11a)]=_0x30325e,this[_0x5ec101(0x102)]=_0x5e7357,this['_userService']=_0x261d80,this['_injector']=_0x5f5752,this['_init'](),this[_0x5ec101(0x132)]();}[_0x521248(0x132)](){const _0x4359e5=_0x521248;this[_0x4359e5(0x100)](this[_0x4359e5(0x102)][_0x4359e5(0xf9)][_0x4359e5(0xfe)](_0x3db9d6(0x10))[_0x4359e5(0xf1)](_0x2b350d=>{const _0x1d741f=_0x4359e5,_0x379569=new Set();_0x2b350d[_0x1d741f(0xf6)](_0x26107b=>{const _0x3c383a=_0x1d741f;switch(_0x26107b[_0x3c383a(0x145)]){case _0x3c383a(0x14a):{const _0x3bdea8=_0x26107b['payload'][_0x3c383a(0x116)];_0x379569[_0x3c383a(0x14a)](_0x3bdea8);break;}}}),B(this[_0x1d741f(0xea)],_0x379569);}));}['_init'](){const _0xdf9345=_0x521248;this[_0xdf9345(0x100)](this[_0xdf9345(0x11a)][_0xdf9345(0xf9)][_0xdf9345(0xf1)](async _0x479e09=>{const _0x29a3c8=_0xdf9345;var _0x2b1f40,_0x51f6ba,_0x5f0f53,_0x43a6ee;const _0x3c81b3=(_0x2b1f40=this[_0x29a3c8(0x102)][_0x29a3c8(0x13d)](_0x479e09[_0x29a3c8(0x12d)])[_0x29a3c8(0x12e)](_0x1727f8=>_0x1727f8['threadId']===_0x479e09[_0x29a3c8(0x147)]))==null?void 0x0:_0x2b1f40[_0x29a3c8(0x143)];if(!_0x3c81b3)return;const {unitId:_0x1aa92c,subUnitId:_0x2e4b58}=_0x3c81b3;switch(_0x479e09['user']&&this['_userService'][_0x29a3c8(0xef)](_0x479e09[_0x29a3c8(0x110)]),_0x479e09[_0x29a3c8(0x145)]){case v[_0x29a3c8(0x126)]:break;case v[_0x29a3c8(0x137)]:{this[_0x29a3c8(0x102)][_0x29a3c8(0xf2)](_0x1aa92c,_0x2e4b58,{'unitId':_0x1aa92c,'subUnitId':_0x2e4b58,'ref':'','id':_0x479e09[_0x29a3c8(0x10b)],'dT':D(+_0x479e09['createTimestamp']),'threadId':_0x479e09[_0x29a3c8(0x147)],'personId':(_0x5f0f53=(_0x51f6ba=_0x479e09[_0x29a3c8(0x110)])==null?void 0x0:_0x51f6ba[_0x29a3c8(0x107)])!=null?_0x5f0f53:_0x479e09[_0x29a3c8(0x11f)],'text':JSON[_0x29a3c8(0xfc)](_0x479e09[_0x29a3c8(0x122)]),'parentId':_0x3c81b3['id']});break;}case v[_0x29a3c8(0x10a)]:{const _0x4b3094=this['_threadCommentModel'][_0x29a3c8(0x139)](_0x1aa92c,_0x2e4b58,_0x479e09[_0x29a3c8(0x10b)]);_0x4b3094&&_0x4b3094['parentId']&&this['_threadCommentModel'][_0x29a3c8(0x10c)](_0x1aa92c,_0x2e4b58,_0x479e09[_0x29a3c8(0x10b)]);break;}case v['Edit']:{this[_0x29a3c8(0x102)]['updateComment'](_0x1aa92c,_0x2e4b58,{'commentId':_0x479e09['replyId'],'text':JSON[_0x29a3c8(0xfc)](_0x479e09[_0x29a3c8(0x122)])});break;}case v[_0x29a3c8(0x115)]:{const _0x3ebba5=(_0x43a6ee=this['_threadCommentModel'][_0x29a3c8(0x13d)](_0x479e09[_0x29a3c8(0x12d)])[_0x29a3c8(0x12e)](_0x1ccd5c=>_0x1ccd5c[_0x29a3c8(0x147)]===_0x479e09[_0x29a3c8(0x147)]))==null?void 0x0:_0x43a6ee['root'];_0x3ebba5&&this[_0x29a3c8(0x102)][_0x29a3c8(0x134)](_0x1aa92c,_0x2e4b58,_0x3ebba5['id'],_0x479e09[_0x29a3c8(0x11e)]===I[_0x29a3c8(0x136)]);break;}}}));}};S=V([p(0x0,_0x30a124(_0x695c84)),p(0x1,_0x30a124(_0x444c3f)),p(0x2,_0x30a124(_0x5e4393)),p(0x3,_0x30a124(_0x91409b))],S);const z=_0x521248(0x131),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x389fc1,_0x44bbe4,_0x357c56,_0x2707ee)=>{for(var _0x3eca8e=_0x2707ee>0x1?void 0x0:_0x2707ee?k(_0x44bbe4,_0x357c56):_0x44bbe4,_0x54e894=_0x389fc1['length']-0x1,_0x17c875;_0x54e894>=0x0;_0x54e894--)(_0x17c875=_0x389fc1[_0x54e894])&&(_0x3eca8e=_0x17c875(_0x3eca8e)||_0x3eca8e);return _0x3eca8e;},_=(_0x559f71,_0x1bbda0)=>(_0x9dd14f,_0x4ad798)=>_0x1bbda0(_0x9dd14f,_0x4ad798,_0x559f71);function _0x2f53(){const _0x52a37b=['/universer-api/comment/unit/','9583370fNSiTd','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','users','solved','userId','createTimestamp','838emhzMO','content','delete','post','/edit','Add','Unknown','resolved','requireSession','_userService','length','onStarting','unitId','find','get','replies','thread-comment-data-source.config','_initUserSync','values','resolveComment','/delete','Solved','Reply','_httpService','getComment','getMemberID','/solved','error','getUnit','saveCommentToSnapshot','/add','_threadCommentDataSourceService','_configService','COMMENT','root','/universer-api/user/list','type','customRanges','threadId','getOwnPropertyDescriptor','filter','add','rangeId','format','651qPcqww','OpenOrReOpen','_injector','stringify','setConfig','body','pluginName','addUser','2251732bcWWko','subscribe','addComment','4336297MkmwFr','updateComment','/list','forEach','_sessionService','353658saOzlt','commentUpdate$','1924407MmnjpP','code','parse','9914826nmVcGJ','pipe','UNRECOGNIZED','disposeWithMe','Edit','_threadCommentModel','onReady','reply','_threadCommentDataSource','slice','userID','listComments','size','Delete','replyId','deleteComment','map','syncUpdateMutationToColla','defineProperty','user','comment','dataSource','_initDataSource','8kDeEgx','Solve','personId','getCurrentUser'];_0x2f53=function(){return _0x52a37b;};return _0x2f53();}function X(_0x296fe0,_0x1a561f){const _0x145e71=_0x521248,_0x139767=_0x296fe0[_0x145e71(0x130)][0x0];return{..._0x1a561f,'id':_0x139767['replyId'],'resolved':_0x296fe0[_0x145e71(0x11e)]===0x1,'dT':D(_0x139767[_0x145e71(0x120)]),'personId':_0x139767[_0x145e71(0x11f)],'threadId':_0x139767[_0x145e71(0x147)]};}function ee(_0x1ccc3c,_0x5737b3,_0x5097af){const _0x420e19=_0x521248;var _0x13b983,_0x5b49e6;if(((_0x5b49e6=(_0x13b983=_0x1ccc3c==null?void 0x0:_0x1ccc3c['replies'])==null?void 0x0:_0x13b983[_0x420e19(0x12b)])!=null?_0x5b49e6:0x0)>0x0){const _0x4991ac=(_0xdb9eb5,_0x328ca6)=>({'id':_0xdb9eb5['replyId'],'threadId':_0xdb9eb5['threadId'],'dT':D(_0xdb9eb5[_0x420e19(0x120)]),'personId':_0xdb9eb5[_0x420e19(0x11f)],'resolved':_0x1ccc3c['solved']===I[_0x420e19(0x136)],'unitId':_0x5737b3,'subUnitId':_0x5097af,'text':JSON[_0x420e19(0xfc)](_0xdb9eb5['content']),'parentId':_0x328ca6}),_0x24559f=_0x4991ac(_0x1ccc3c['replies'][0x0]);return{..._0x24559f,'children':_0x1ccc3c[_0x420e19(0x130)][_0x420e19(0x106)](0x1)[_0x420e19(0x10d)](_0x236a5c=>_0x4991ac(_0x236a5c,_0x24559f['id']))};}return null;}let f=class{constructor(_0x408413,_0x57ddfc,_0xdcf56d,_0x41b707){const _0x166924=_0x521248;this[_0x166924(0x138)]=_0x408413,this[_0x166924(0x12a)]=_0x57ddfc,this['_sessionService']=_0xdcf56d,this[_0x166924(0xea)]=_0x41b707;}async[_0x521248(0xf2)](_0x3b82ca){const _0x359ee2=_0x521248;var _0x4025f6,_0x443300;const {parentId:_0x24a3ce,unitId:_0x511381,text:_0x1e8de6,threadId:_0x29e293}=_0x3b82ca,_0x274867=(_0x443300=(_0x4025f6=_0x1e8de6[_0x359ee2(0x146)])==null?void 0x0:_0x4025f6[_0x359ee2(0x149)](_0x256bb9=>_0x256bb9['rangeType']===_0x5c6f55[_0x359ee2(0x142)])[_0x359ee2(0x10d)](_0x1e0e06=>_0x1e0e06[_0x359ee2(0x14b)]))!=null?_0x443300:[],_0x5982d3=JSON[_0x359ee2(0xeb)](_0x1e8de6),_0x16d679=(await this[_0x359ee2(0xf7)]['requireSession'](_0x511381))[_0x359ee2(0x13a)]();if(_0x24a3ce){const _0x249df9={'memberId':_0x16d679,'unitId':_0x511381,'content':_0x5982d3,'mention':_0x274867,'threadId':_0x29e293},_0x2c0163=(await this[_0x359ee2(0x138)]['post'](_0x359ee2(0x118)+_0x511381+'/reply',{'body':_0x249df9}))[_0x359ee2(0xed)][_0x359ee2(0x104)];return{..._0x3b82ca,'id':_0x2c0163['replyId'],'dT':_0x1d081f(+_0x2c0163[_0x359ee2(0x120)])[_0x359ee2(0x14c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2c0163[_0x359ee2(0x11f)]};}else{const _0x40365d={'memberId':_0x16d679,'unitId':_0x511381,'content':_0x5982d3,'mention':_0x274867},_0x1afdf2=await this['_httpService']['post'](_0x359ee2(0x118)+_0x511381+_0x359ee2(0x13f),{'body':_0x40365d});return X(_0x1afdf2[_0x359ee2(0xed)][_0x359ee2(0x111)],_0x3b82ca);}}async[_0x521248(0xf4)](_0x456c88){const _0x5c5b50=_0x521248;var _0xd437c3,_0x1e5fb2;const {text:_0x1ebfa2,unitId:_0x1720a4}=_0x456c88,_0x1ae4fe=(_0x1e5fb2=(_0xd437c3=_0x1ebfa2['customRanges'])==null?void 0x0:_0xd437c3[_0x5c5b50(0x149)](_0x56d419=>_0x56d419['rangeType']===_0x5c6f55[_0x5c5b50(0x142)])[_0x5c5b50(0x10d)](_0x12fc6c=>_0x12fc6c[_0x5c5b50(0x14b)]))!=null?_0x1e5fb2:[],_0xe5bbe9=JSON['stringify'](_0x1ebfa2),_0x39a639=_0x456c88['threadId'],_0x59b279=_0x456c88['id'],_0xa6ba67={'memberId':(await this['_sessionService']['requireSession'](_0x1720a4))[_0x5c5b50(0x13a)](),'unitId':_0x1720a4,'threadId':_0x39a639,'mention':_0x1ae4fe,'content':_0xe5bbe9,'replyId':_0x59b279},_0xb061f1=await this['_httpService']['post'](_0x5c5b50(0x118)+_0x1720a4+_0x5c5b50(0x125),{'body':_0xa6ba67});return!_0xb061f1[_0x5c5b50(0xed)][_0x5c5b50(0x13c)]||_0xb061f1[_0x5c5b50(0xed)][_0x5c5b50(0x13c)]['code']===0x1;}async[_0x521248(0x134)](_0x38407a){const _0x4e249e=_0x521248,{unitId:_0x3f0640}=_0x38407a,_0x124e52=_0x38407a['threadId'],_0x46028a={'memberId':this['_userService'][_0x4e249e(0x117)]()[_0x4e249e(0x107)],'unitId':_0x3f0640,'threadId':_0x124e52,'solved':_0x38407a[_0x4e249e(0x128)]?I['Solved']:I[_0x4e249e(0xe9)]},_0x1aef6e=await this[_0x4e249e(0x138)][_0x4e249e(0x124)](_0x4e249e(0x118)+_0x3f0640+_0x4e249e(0x13b),{'body':_0x46028a});return!_0x1aef6e[_0x4e249e(0xed)][_0x4e249e(0x13c)]||_0x1aef6e[_0x4e249e(0xed)][_0x4e249e(0x13c)]['code']===0x1;}async['deleteComment'](_0x3b68f9,_0x3021f1,_0x163d15,_0x143918){const _0x1490d3=_0x521248,_0x20e18d={'memberId':(await this['_sessionService'][_0x1490d3(0x129)](_0x3b68f9))['getMemberID'](),'threadId':_0x163d15,'replyId':_0x143918,'unitId':_0x3b68f9},_0x15bd25=await this[_0x1490d3(0x138)][_0x1490d3(0x124)](_0x1490d3(0x118)+_0x3b68f9+_0x1490d3(0x135),{'body':_0x20e18d});return!_0x15bd25['body'][_0x1490d3(0x13c)]||_0x15bd25[_0x1490d3(0xed)][_0x1490d3(0x13c)][_0x1490d3(0xfb)]===0x1;}async[_0x521248(0x108)](_0x99819d,_0x55c058,_0x32e47f){const _0xa057bf=_0x521248,_0x131054={'unitId':_0x99819d,'threadId':_0x32e47f},_0x10086b=await this['_httpService'][_0xa057bf(0x124)](_0xa057bf(0x118)+_0x99819d+_0xa057bf(0xf5),{'body':_0x131054}),_0x4bce7b=_0x32e47f[_0xa057bf(0x10d)](_0x585054=>ee(_0x10086b[_0xa057bf(0xed)]['comments'][_0x585054],_0x99819d,_0x55c058))[_0xa057bf(0x149)](Boolean);return Object[_0xa057bf(0x133)](_0x10086b['body'][_0xa057bf(0x11d)])[_0xa057bf(0xf6)](_0x1b9d16=>{const _0x1390ff=_0xa057bf;this[_0x1390ff(0x12a)]['addUser'](_0x1b9d16);}),_0x4bce7b;}[_0x521248(0x13e)](_0x51e7e3){const _0x58c8cc=_0x521248;return{'id':_0x51e7e3['id'],'threadId':_0x51e7e3[_0x58c8cc(0x147)],'ref':_0x51e7e3['ref']};}};f=Q([_(0x0,_0x30a124(_0x11e3e7)),_(0x1,_0x30a124(_0x5e4393)),_(0x2,_0x30a124(_0x2de60c)),_(0x3,_0x30a124(_0x91409b))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2bbdb2,_0xe1ef1d,_0x251581,_0xdaf905)=>{for(var _0x11518b=_0xdaf905>0x1?void 0x0:_0xdaf905?re(_0xe1ef1d,_0x251581):_0xe1ef1d,_0x2e7509=_0x2bbdb2['length']-0x1,_0x47711f;_0x2e7509>=0x0;_0x2e7509--)(_0x47711f=_0x2bbdb2[_0x2e7509])&&(_0x11518b=_0x47711f(_0x11518b)||_0x11518b);return _0x11518b;},N=(_0x97c0d1,_0x91ac35)=>(_0x319c93,_0x52a6e0)=>_0x91ac35(_0x319c93,_0x52a6e0,_0x97c0d1);let g=class extends _0x3fcfa0{constructor(_0x38b8b,_0x4481af){const _0x35dfaa=_0x521248;super(),this[_0x35dfaa(0x140)]=_0x38b8b,this[_0x35dfaa(0x105)]=_0x4481af,this[_0x35dfaa(0x113)]();}[_0x521248(0x113)](){const _0x46caa7=_0x521248;this[_0x46caa7(0x140)][_0x46caa7(0x112)]=this[_0x46caa7(0x105)],this[_0x46caa7(0x140)][_0x46caa7(0x10e)]=!0x1;}};g=te([N(0x0,_0x408dc9),N(0x1,_0x30a124(f))],g);var se=Object[_0x521248(0x10f)],oe=Object[_0x521248(0x148)],ne=(_0x5d6f78,_0x12f06f,_0xf60301)=>_0x12f06f in _0x5d6f78?se(_0x5d6f78,_0x12f06f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf60301}):_0x5d6f78[_0x12f06f]=_0xf60301,ie=(_0x183baf,_0x38e501,_0x506baf,_0x382a3b)=>{for(var _0x5e3a7f=_0x382a3b>0x1?void 0x0:_0x382a3b?oe(_0x38e501,_0x506baf):_0x38e501,_0x2cce59=_0x183baf['length']-0x1,_0x208525;_0x2cce59>=0x0;_0x2cce59--)(_0x208525=_0x183baf[_0x2cce59])&&(_0x5e3a7f=_0x208525(_0x5e3a7f)||_0x5e3a7f);return _0x5e3a7f;},w=(_0x531e92,_0x1e5ebe)=>(_0x4a20fe,_0xc3a5f2)=>_0x1e5ebe(_0x4a20fe,_0xc3a5f2,_0x531e92),$=(_0x35f5ec,_0x1a0d35,_0x188b7f)=>ne(_0x35f5ec,typeof _0x1a0d35!='symbol'?_0x1a0d35+'':_0x1a0d35,_0x188b7f);let b=class extends _0x212cbe{constructor(_0x32fd49=M,_0xe6d1b0,_0x1b2de3){const _0x43386f=_0x521248;super(),this['_config']=_0x32fd49,this['_injector']=_0xe6d1b0,this[_0x43386f(0x141)]=_0x1b2de3;const {..._0x41c434}=_0x123e4c({},M,this[_0x43386f(0x11c)]);this['_configService'][_0x43386f(0xec)](z,_0x41c434);}[_0x521248(0x12c)](){[[f],[g],[S]]['forEach'](_0x28408c=>{const _0x2ee2f4=_0x5dec;this[_0x2ee2f4(0xea)][_0x2ee2f4(0x14a)](_0x28408c);});}[_0x521248(0x103)](){const _0x1d37b0=_0x521248;this[_0x1d37b0(0xea)]['get'](g),this[_0x1d37b0(0xea)][_0x1d37b0(0x12f)](S);}};$(b,_0x521248(0xee),W),$(b,_0x521248(0x145),_0x274050['UNIVER_UNKNOWN']),b=ie([_0x13c9ad(_0x502461,_0x2ddcde,_0xca7a46),w(0x1,_0x30a124(_0x91409b)),w(0x2,_0x1e339e)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IBaseComment, IThreadComment, IThreadCommentDataSource } from '@univerjs/thread-comment';
|
|
2
|
+
import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
|
|
2
3
|
import { Injector, UserManagerService } from '@univerjs/core';
|
|
3
4
|
import { HTTPService } from '@univerjs/network';
|
|
4
|
-
import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
|
|
5
5
|
export declare class ThreadCommentServerDataSource implements IThreadCommentDataSource {
|
|
6
6
|
private readonly _httpService;
|
|
7
7
|
private readonly _userService;
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x484d(_0x31ae11,_0x3f40f5){const _0x2515c7=_0x2515();return _0x484d=function(_0x484db5,_0x3a9436){_0x484db5=_0x484db5-0x179;let _0x2920e0=_0x2515c7[_0x484db5];return _0x2920e0;},_0x484d(_0x31ae11,_0x3f40f5);}function _0x2515(){const _0x16ad8d=['@univerjs-pro/collaboration-client','thread-comment-data-source.config','getComment','@univerjs/core','UniverInstanceType','UserManagerService','619027bbgRGd','UniverThreadCommentDataSourcePlugin','addUser','UniverProCollaborationClient','createTimestamp','function','Add','customRanges','_config','amd','UniverCollaborationClientPlugin','16730YFGOaw','length','getMemberID','2134689PIeWeo','_injector','rangeId','disposeWithMe','forEach','size','_initUserSync','userId','getOwnPropertyDescriptor','UniverCore','commentUpdate$','5093890PsiodC','comments','onStarting','dataSource','UniverProLicense','/edit','Reply','error','@univerjs-pro/license','replies','add','_commentService','rangeType','4hVBuRA','@univerjs/thread-comment-ui','_threadCommentModel','map','OpenOrReOpen','solved','format','UniverThreadCommentUi','10vzcgqS','payload','_threadCommentDataSourceService','root','/list','get','personId','IThreadCommentDataSourceService','addComment','exports','body','post','UNRECOGNIZED','resolveComment','UniverProThreadCommentDatasource','/solved','Edit','getUser','CollaborationSessionService','setConfig','Module','listComments','@univerjs/thread-comment','_configService','getCurrentUser','comment','user','delete','8840227McgQPG','pluginName','dayjs','find','CommentService','defineProperty','_httpService','merge','subscribe','/delete','4wBcLrT','Disposable','Solved','UniverThreadComment','_initDataSource','3787312BJHNXp','slice','updateComment','unitId','_sessionService','YYYY/MM/DD\x20HH:mm','userID','Solve','resolved','CustomRangeType','_threadCommentDataSource','@univerjs/network','parse','_init','Delete','syncUpdateMutationToColla','/universer-api/comment/unit/','requireSession','UNIVER_UNKNOWN','Injector','Plugin','stringify','type','threadId','COMMENT','reply','1398hjoqal','users','Inject','content','object','code','_userService','saveCommentToSnapshot','replyId','getUnit','18CtZiQI','HTTPService','pipe','toStringTag','Unknown','3448464zNrjNd','filter'];_0x2515=function(){return _0x16ad8d;};return _0x2515();}(function(_0x19045f,_0x98417a){const _0x4259e9=_0x484d,_0x40e4f1=_0x19045f();while(!![]){try{const _0x204bd8=-parseInt(_0x4259e9(0x17d))/0x1+parseInt(_0x4259e9(0x1d1))/0x2*(parseInt(_0x4259e9(0x18b))/0x3)+-parseInt(_0x4259e9(0x1a3))/0x4*(parseInt(_0x4259e9(0x196))/0x5)+parseInt(_0x4259e9(0x1f0))/0x6*(parseInt(_0x4259e9(0x188))/0x7)+parseInt(_0x4259e9(0x1d6))/0x8*(parseInt(_0x4259e9(0x1fa))/0x9)+parseInt(_0x4259e9(0x1ab))/0xa*(-parseInt(_0x4259e9(0x1c7))/0xb)+parseInt(_0x4259e9(0x1ff))/0xc;if(_0x204bd8===_0x98417a)break;else _0x40e4f1['push'](_0x40e4f1['shift']());}catch(_0x3866fa){_0x40e4f1['push'](_0x40e4f1['shift']());}}}(_0x2515,0xbca7e),function(_0x40c7e1,_0x555120){const _0x3bb550=_0x484d;typeof exports==_0x3bb550(0x1f4)&&typeof module<'u'?_0x555120(exports,require(_0x3bb550(0x201)),require('@univerjs-pro/license'),require(_0x3bb550(0x17a)),require(_0x3bb550(0x1a4)),require(_0x3bb550(0x1c1)),require('rxjs'),require(_0x3bb550(0x1e1))):typeof define==_0x3bb550(0x182)&&define[_0x3bb550(0x186)]?define([_0x3bb550(0x1b4),_0x3bb550(0x201),_0x3bb550(0x19e),_0x3bb550(0x17a),_0x3bb550(0x1a4),_0x3bb550(0x1c1),'rxjs','@univerjs/network'],_0x555120):(_0x40c7e1=typeof globalThis<'u'?globalThis:_0x40c7e1||self,_0x555120(_0x40c7e1[_0x3bb550(0x1b9)]={},_0x40c7e1[_0x3bb550(0x180)],_0x40c7e1[_0x3bb550(0x19a)],_0x40c7e1[_0x3bb550(0x194)],_0x40c7e1[_0x3bb550(0x1aa)],_0x40c7e1[_0x3bb550(0x1d4)],_0x40c7e1['rxjs'],_0x40c7e1['UniverNetwork']));}(this,function(_0x3fdf36,_0x1bf240,_0x10c06b,_0x34b4ef,_0x54799e,_0x2920d2,_0x3a6403,_0x422bd1){'use strict';const _0x484063=_0x484d;const _0x163e9e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4c4f19=(_0x50523f=>(_0x50523f[_0x50523f['OpenOrReOpen']=0x0]=_0x484063(0x1a7),_0x50523f[_0x50523f[_0x484063(0x1d3)]=0x1]='Solved',_0x50523f[_0x50523f[_0x484063(0x1b7)]=-0x1]=_0x484063(0x1b7),_0x50523f))(_0x4c4f19||{}),_0x150b2e=(_0x33b155=>(_0x33b155[_0x33b155[_0x484063(0x1fe)]=0x0]='Unknown',_0x33b155[_0x33b155['Add']=0x1]=_0x484063(0x183),_0x33b155[_0x33b155['Reply']=0x2]='Reply',_0x33b155[_0x33b155[_0x484063(0x1bb)]=0x3]='Edit',_0x33b155[_0x33b155['Delete']=0x4]='Delete',_0x33b155[_0x33b155[_0x484063(0x1dd)]=0x5]=_0x484063(0x1dd),_0x33b155[_0x33b155['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x33b155))(_0x150b2e||{});const _0x13a113=_0x467e19=>_0x34b4ef[_0x484063(0x1c9)](new Date(+_0x467e19))[_0x484063(0x1a9)](_0x484063(0x1db)),_0x45285c=async(_0x587df8,_0x2ee803)=>{const _0x9b42e1=_0x484063,_0x23dce7=_0x587df8['get'](_0x34b4ef['UserManagerService']),_0xc81ee3=_0x587df8[_0x9b42e1(0x1b0)](_0x422bd1['HTTPService']);_0x2ee803[_0x9b42e1(0x18f)](_0xfe9869=>{const _0x535196=_0x9b42e1;_0x23dce7[_0x535196(0x1bc)](_0xfe9869)&&_0x2ee803[_0x535196(0x1c6)](_0xfe9869);}),_0x2ee803[_0x9b42e1(0x190)]&&(await _0xc81ee3['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ee803]}}))[_0x9b42e1(0x1b5)][_0x9b42e1(0x1f1)][_0x9b42e1(0x18f)](_0x193c35=>{const _0x1319ec=_0x9b42e1;_0x193c35&&_0x23dce7[_0x1319ec(0x17f)](_0x193c35);});};var _0x2a5fba=Object[_0x484063(0x193)],_0x5f1d92=(_0x3d6629,_0x65c04a,_0x5a7bf5,_0x4e2486)=>{const _0x2dfb84=_0x484063;for(var _0x23990d=_0x4e2486>0x1?void 0x0:_0x4e2486?_0x2a5fba(_0x65c04a,_0x5a7bf5):_0x65c04a,_0xbc36e3=_0x3d6629[_0x2dfb84(0x189)]-0x1,_0x5f27d8;_0xbc36e3>=0x0;_0xbc36e3--)(_0x5f27d8=_0x3d6629[_0xbc36e3])&&(_0x23990d=_0x5f27d8(_0x23990d)||_0x23990d);return _0x23990d;},_0x415f6f=(_0x279836,_0x11337a)=>(_0x25b53d,_0x91a6c1)=>_0x11337a(_0x25b53d,_0x91a6c1,_0x279836);let _0x4fffe9=class extends _0x34b4ef['Disposable']{constructor(_0x275dd7,_0x3a78a5,_0x4e34a0,_0x2cc8fd){const _0x28cf6d=_0x484063;super(),this[_0x28cf6d(0x1a1)]=_0x275dd7,this['_threadCommentModel']=_0x3a78a5,this[_0x28cf6d(0x1f6)]=_0x4e34a0,this['_injector']=_0x2cc8fd,this[_0x28cf6d(0x1e3)](),this[_0x28cf6d(0x191)]();}['_initUserSync'](){const _0x1ca266=_0x484063;this[_0x1ca266(0x18e)](this[_0x1ca266(0x1a5)][_0x1ca266(0x195)][_0x1ca266(0x1fc)](_0x3a6403['bufferTime'](0x10))[_0x1ca266(0x1cf)](_0x8a30ab=>{const _0x19da2c=_0x1ca266,_0x100427=new Set();_0x8a30ab[_0x19da2c(0x18f)](_0x567032=>{const _0x884667=_0x19da2c;switch(_0x567032[_0x884667(0x1ec)]){case _0x884667(0x1a0):{const _0x4fe343=_0x567032[_0x884667(0x1ac)][_0x884667(0x1b1)];_0x100427[_0x884667(0x1a0)](_0x4fe343);break;}}}),_0x45285c(this['_injector'],_0x100427);}));}[_0x484063(0x1e3)](){const _0x53a94a=_0x484063;this[_0x53a94a(0x18e)](this[_0x53a94a(0x1a1)]['commentUpdate$'][_0x53a94a(0x1cf)](async _0x546594=>{const _0x532c54=_0x53a94a;var _0x28c71a,_0x14b135,_0x5e4969,_0x3fbd9a;const _0x5a949c=(_0x28c71a=this[_0x532c54(0x1a5)][_0x532c54(0x1f9)](_0x546594['unitId'])[_0x532c54(0x1ca)](_0x2f757d=>_0x2f757d['threadId']===_0x546594['threadId']))==null?void 0x0:_0x28c71a[_0x532c54(0x1ae)];if(!_0x5a949c)return;const {unitId:_0x239278,subUnitId:_0x3368fd}=_0x5a949c;switch(_0x546594['user']&&this[_0x532c54(0x1f6)][_0x532c54(0x17f)](_0x546594[_0x532c54(0x1c5)]),_0x546594[_0x532c54(0x1ec)]){case _0x150b2e[_0x532c54(0x183)]:break;case _0x150b2e[_0x532c54(0x19c)]:{this[_0x532c54(0x1a5)][_0x532c54(0x1b3)](_0x239278,_0x3368fd,{'unitId':_0x239278,'subUnitId':_0x3368fd,'ref':'','id':_0x546594[_0x532c54(0x1f8)],'dT':_0x13a113(+_0x546594['createTimestamp']),'threadId':_0x546594['threadId'],'personId':(_0x5e4969=(_0x14b135=_0x546594[_0x532c54(0x1c5)])==null?void 0x0:_0x14b135[_0x532c54(0x1dc)])!=null?_0x5e4969:_0x546594[_0x532c54(0x192)],'text':JSON[_0x532c54(0x1e2)](_0x546594[_0x532c54(0x1f3)]),'parentId':_0x5a949c['id']});break;}case _0x150b2e[_0x532c54(0x1e4)]:{const _0x264636=this[_0x532c54(0x1a5)][_0x532c54(0x179)](_0x239278,_0x3368fd,_0x546594[_0x532c54(0x1f8)]);_0x264636&&_0x264636['parentId']&&this[_0x532c54(0x1a5)]['deleteComment'](_0x239278,_0x3368fd,_0x546594[_0x532c54(0x1f8)]);break;}case _0x150b2e[_0x532c54(0x1bb)]:{this[_0x532c54(0x1a5)][_0x532c54(0x1d8)](_0x239278,_0x3368fd,{'commentId':_0x546594['replyId'],'text':JSON['parse'](_0x546594[_0x532c54(0x1f3)])});break;}case _0x150b2e['Solve']:{const _0x5d830f=(_0x3fbd9a=this[_0x532c54(0x1a5)][_0x532c54(0x1f9)](_0x546594[_0x532c54(0x1d9)])[_0x532c54(0x1ca)](_0x58d7d6=>_0x58d7d6[_0x532c54(0x1ed)]===_0x546594['threadId']))==null?void 0x0:_0x3fbd9a['root'];_0x5d830f&&this[_0x532c54(0x1a5)][_0x532c54(0x1b8)](_0x239278,_0x3368fd,_0x5d830f['id'],_0x546594[_0x532c54(0x1a8)]===_0x4c4f19[_0x532c54(0x1d3)]);break;}}}));}};_0x4fffe9=_0x5f1d92([_0x415f6f(0x0,_0x34b4ef[_0x484063(0x1f2)](_0x1bf240[_0x484063(0x1cb)])),_0x415f6f(0x1,_0x34b4ef[_0x484063(0x1f2)](_0x2920d2['ThreadCommentModel'])),_0x415f6f(0x2,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x17c)])),_0x415f6f(0x3,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x1e9)]))],_0x4fffe9);const _0xbc477f=_0x484063(0x202),_0x1286f6={};var _0x229259=Object[_0x484063(0x193)],_0x5e2b04=(_0x50ea21,_0x5a57e9,_0x1607b4,_0x4b98f1)=>{for(var _0x4126e6=_0x4b98f1>0x1?void 0x0:_0x4b98f1?_0x229259(_0x5a57e9,_0x1607b4):_0x5a57e9,_0x5ce110=_0x50ea21['length']-0x1,_0x5316d3;_0x5ce110>=0x0;_0x5ce110--)(_0x5316d3=_0x50ea21[_0x5ce110])&&(_0x4126e6=_0x5316d3(_0x4126e6)||_0x4126e6);return _0x4126e6;},_0x27daaf=(_0x419c69,_0x46e1be)=>(_0x5d08b2,_0x38e5e0)=>_0x46e1be(_0x5d08b2,_0x38e5e0,_0x419c69);function _0x9cd3d5(_0x1bab5a,_0x4fbd83){const _0x228d76=_0x484063,_0x10a0db=_0x1bab5a[_0x228d76(0x19f)][0x0];return{..._0x4fbd83,'id':_0x10a0db[_0x228d76(0x1f8)],'resolved':_0x1bab5a[_0x228d76(0x1a8)]===0x1,'dT':_0x13a113(_0x10a0db[_0x228d76(0x181)]),'personId':_0x10a0db[_0x228d76(0x192)],'threadId':_0x10a0db[_0x228d76(0x1ed)]};}function _0x5ea313(_0x4c87fa,_0x294f25,_0x1bb164){const _0x455e8c=_0x484063;var _0x3ea11a,_0x1442ba;if(((_0x1442ba=(_0x3ea11a=_0x4c87fa==null?void 0x0:_0x4c87fa['replies'])==null?void 0x0:_0x3ea11a[_0x455e8c(0x189)])!=null?_0x1442ba:0x0)>0x0){const _0x53143c=(_0x255a87,_0x43ee0f)=>({'id':_0x255a87[_0x455e8c(0x1f8)],'threadId':_0x255a87[_0x455e8c(0x1ed)],'dT':_0x13a113(_0x255a87['createTimestamp']),'personId':_0x255a87[_0x455e8c(0x192)],'resolved':_0x4c87fa[_0x455e8c(0x1a8)]===_0x4c4f19[_0x455e8c(0x1d3)],'unitId':_0x294f25,'subUnitId':_0x1bb164,'text':JSON['parse'](_0x255a87[_0x455e8c(0x1f3)]),'parentId':_0x43ee0f}),_0x50a8ad=_0x53143c(_0x4c87fa['replies'][0x0]);return{..._0x50a8ad,'children':_0x4c87fa[_0x455e8c(0x19f)][_0x455e8c(0x1d7)](0x1)['map'](_0x536bd0=>_0x53143c(_0x536bd0,_0x50a8ad['id']))};}return null;}let _0x335a5d=class{constructor(_0x19fca8,_0x5b394a,_0x1a1c21,_0xec7ace){const _0x5403cb=_0x484063;this[_0x5403cb(0x1cd)]=_0x19fca8,this[_0x5403cb(0x1f6)]=_0x5b394a,this[_0x5403cb(0x1da)]=_0x1a1c21,this['_injector']=_0xec7ace;}async['addComment'](_0x1e69ea){const _0x18ff7e=_0x484063;var _0x54122b,_0x200a86;const {parentId:_0x5f4ee4,unitId:_0xed720c,text:_0x2bf2eb,threadId:_0x2ebe4d}=_0x1e69ea,_0x53d79d=(_0x200a86=(_0x54122b=_0x2bf2eb[_0x18ff7e(0x184)])==null?void 0x0:_0x54122b[_0x18ff7e(0x200)](_0x169f20=>_0x169f20[_0x18ff7e(0x1a2)]===_0x34b4ef[_0x18ff7e(0x1df)][_0x18ff7e(0x1ee)])['map'](_0x48f923=>_0x48f923[_0x18ff7e(0x18d)]))!=null?_0x200a86:[],_0x5c042b=JSON[_0x18ff7e(0x1eb)](_0x2bf2eb),_0x1c3874=(await this[_0x18ff7e(0x1da)][_0x18ff7e(0x1e7)](_0xed720c))[_0x18ff7e(0x18a)]();if(_0x5f4ee4){const _0x3b3524={'memberId':_0x1c3874,'unitId':_0xed720c,'content':_0x5c042b,'mention':_0x53d79d,'threadId':_0x2ebe4d},_0x52864d=(await this['_httpService'][_0x18ff7e(0x1b6)](_0x18ff7e(0x1e6)+_0xed720c+'/reply',{'body':_0x3b3524}))[_0x18ff7e(0x1b5)][_0x18ff7e(0x1ef)];return{..._0x1e69ea,'id':_0x52864d['replyId'],'dT':_0x34b4ef[_0x18ff7e(0x1c9)](+_0x52864d[_0x18ff7e(0x181)])[_0x18ff7e(0x1a9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x52864d[_0x18ff7e(0x192)]};}else{const _0x5100fa={'memberId':_0x1c3874,'unitId':_0xed720c,'content':_0x5c042b,'mention':_0x53d79d},_0x36b3ff=await this[_0x18ff7e(0x1cd)][_0x18ff7e(0x1b6)](_0x18ff7e(0x1e6)+_0xed720c+'/add',{'body':_0x5100fa});return _0x9cd3d5(_0x36b3ff[_0x18ff7e(0x1b5)][_0x18ff7e(0x1c4)],_0x1e69ea);}}async[_0x484063(0x1d8)](_0x14c4bd){const _0x26d2c8=_0x484063;var _0x52e7ea,_0xb6f8e5;const {text:_0x24e1cf,unitId:_0x305c20}=_0x14c4bd,_0x3d0bbe=(_0xb6f8e5=(_0x52e7ea=_0x24e1cf[_0x26d2c8(0x184)])==null?void 0x0:_0x52e7ea[_0x26d2c8(0x200)](_0xa5a394=>_0xa5a394['rangeType']===_0x34b4ef[_0x26d2c8(0x1df)][_0x26d2c8(0x1ee)])[_0x26d2c8(0x1a6)](_0x3b1183=>_0x3b1183[_0x26d2c8(0x18d)]))!=null?_0xb6f8e5:[],_0x3453ff=JSON[_0x26d2c8(0x1eb)](_0x24e1cf),_0x19a3de=_0x14c4bd[_0x26d2c8(0x1ed)],_0x4ebf63=_0x14c4bd['id'],_0x11fba4={'memberId':(await this[_0x26d2c8(0x1da)][_0x26d2c8(0x1e7)](_0x305c20))[_0x26d2c8(0x18a)](),'unitId':_0x305c20,'threadId':_0x19a3de,'mention':_0x3d0bbe,'content':_0x3453ff,'replyId':_0x4ebf63},_0xd4fc09=await this[_0x26d2c8(0x1cd)]['post'](_0x26d2c8(0x1e6)+_0x305c20+_0x26d2c8(0x19b),{'body':_0x11fba4});return!_0xd4fc09[_0x26d2c8(0x1b5)][_0x26d2c8(0x19d)]||_0xd4fc09[_0x26d2c8(0x1b5)][_0x26d2c8(0x19d)]['code']===0x1;}async[_0x484063(0x1b8)](_0x16b7a3){const _0x53edf6=_0x484063,{unitId:_0x2259bb}=_0x16b7a3,_0x2e80c9=_0x16b7a3[_0x53edf6(0x1ed)],_0x35fc4e={'memberId':this['_userService'][_0x53edf6(0x1c3)]()[_0x53edf6(0x1dc)],'unitId':_0x2259bb,'threadId':_0x2e80c9,'solved':_0x16b7a3[_0x53edf6(0x1de)]?_0x4c4f19[_0x53edf6(0x1d3)]:_0x4c4f19[_0x53edf6(0x1a7)]},_0x452131=await this[_0x53edf6(0x1cd)]['post']('/universer-api/comment/unit/'+_0x2259bb+_0x53edf6(0x1ba),{'body':_0x35fc4e});return!_0x452131[_0x53edf6(0x1b5)][_0x53edf6(0x19d)]||_0x452131[_0x53edf6(0x1b5)][_0x53edf6(0x19d)][_0x53edf6(0x1f5)]===0x1;}async['deleteComment'](_0x4ef713,_0x5a3777,_0x1a3672,_0x5db3d6){const _0x154aa6=_0x484063,_0xf0e353={'memberId':(await this[_0x154aa6(0x1da)][_0x154aa6(0x1e7)](_0x4ef713))[_0x154aa6(0x18a)](),'threadId':_0x1a3672,'replyId':_0x5db3d6,'unitId':_0x4ef713},_0x464e54=await this['_httpService'][_0x154aa6(0x1b6)](_0x154aa6(0x1e6)+_0x4ef713+_0x154aa6(0x1d0),{'body':_0xf0e353});return!_0x464e54['body']['error']||_0x464e54[_0x154aa6(0x1b5)][_0x154aa6(0x19d)][_0x154aa6(0x1f5)]===0x1;}async[_0x484063(0x1c0)](_0x2ac79d,_0x216714,_0x134451){const _0x1b122e=_0x484063,_0x471fb1={'unitId':_0x2ac79d,'threadId':_0x134451},_0x1afbf7=await this[_0x1b122e(0x1cd)][_0x1b122e(0x1b6)](_0x1b122e(0x1e6)+_0x2ac79d+_0x1b122e(0x1af),{'body':_0x471fb1}),_0x5cb3d3=_0x134451[_0x1b122e(0x1a6)](_0x46b6ba=>_0x5ea313(_0x1afbf7[_0x1b122e(0x1b5)][_0x1b122e(0x197)][_0x46b6ba],_0x2ac79d,_0x216714))[_0x1b122e(0x200)](Boolean);return Object['values'](_0x1afbf7[_0x1b122e(0x1b5)][_0x1b122e(0x1f1)])[_0x1b122e(0x18f)](_0x1b4e30=>{const _0x221933=_0x1b122e;this['_userService'][_0x221933(0x17f)](_0x1b4e30);}),_0x5cb3d3;}[_0x484063(0x1f7)](_0x20f106){return{'id':_0x20f106['id'],'threadId':_0x20f106['threadId'],'ref':_0x20f106['ref']};}};_0x335a5d=_0x5e2b04([_0x27daaf(0x0,_0x34b4ef[_0x484063(0x1f2)](_0x422bd1[_0x484063(0x1fb)])),_0x27daaf(0x1,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x17c)])),_0x27daaf(0x2,_0x34b4ef['Inject'](_0x1bf240[_0x484063(0x1bd)])),_0x27daaf(0x3,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x1e9)]))],_0x335a5d);var _0x1b68b7=Object[_0x484063(0x193)],_0x205289=(_0x361fac,_0x36b883,_0x1087c8,_0x474f73)=>{const _0xf6e30a=_0x484063;for(var _0x3beea2=_0x474f73>0x1?void 0x0:_0x474f73?_0x1b68b7(_0x36b883,_0x1087c8):_0x36b883,_0xfc7df8=_0x361fac[_0xf6e30a(0x189)]-0x1,_0x4810fe;_0xfc7df8>=0x0;_0xfc7df8--)(_0x4810fe=_0x361fac[_0xfc7df8])&&(_0x3beea2=_0x4810fe(_0x3beea2)||_0x3beea2);return _0x3beea2;},_0x3f38a6=(_0x3c5971,_0x25ed71)=>(_0x1dbe61,_0x1b5c32)=>_0x25ed71(_0x1dbe61,_0x1b5c32,_0x3c5971);let _0x4fcbcf=class extends _0x34b4ef[_0x484063(0x1d2)]{constructor(_0x2bae56,_0x7dc1ce){const _0x4a2acf=_0x484063;super(),this['_threadCommentDataSourceService']=_0x2bae56,this[_0x4a2acf(0x1e0)]=_0x7dc1ce,this[_0x4a2acf(0x1d5)]();}[_0x484063(0x1d5)](){const _0x23eabd=_0x484063;this[_0x23eabd(0x1ad)][_0x23eabd(0x199)]=this['_threadCommentDataSource'],this[_0x23eabd(0x1ad)][_0x23eabd(0x1e5)]=!0x1;}};_0x4fcbcf=_0x205289([_0x3f38a6(0x0,_0x2920d2[_0x484063(0x1b2)]),_0x3f38a6(0x1,_0x34b4ef['Inject'](_0x335a5d))],_0x4fcbcf);var _0x481b92=Object[_0x484063(0x1cc)],_0x8198b4=Object[_0x484063(0x193)],_0x11d010=(_0x107fcc,_0x23ad9c,_0xd32992)=>_0x23ad9c in _0x107fcc?_0x481b92(_0x107fcc,_0x23ad9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd32992}):_0x107fcc[_0x23ad9c]=_0xd32992,_0x5ae950=(_0x3d6166,_0x5a217f,_0x5d8420,_0x51e913)=>{const _0x427bee=_0x484063;for(var _0x2647ca=_0x51e913>0x1?void 0x0:_0x51e913?_0x8198b4(_0x5a217f,_0x5d8420):_0x5a217f,_0x3246b3=_0x3d6166[_0x427bee(0x189)]-0x1,_0x447571;_0x3246b3>=0x0;_0x3246b3--)(_0x447571=_0x3d6166[_0x3246b3])&&(_0x2647ca=_0x447571(_0x2647ca)||_0x2647ca);return _0x2647ca;},_0x1654b8=(_0x36d800,_0xed8a69)=>(_0x51aa90,_0x20ec7a)=>_0xed8a69(_0x51aa90,_0x20ec7a,_0x36d800),_0x481fe2=(_0x146507,_0x153b2f,_0xc93d25)=>_0x11d010(_0x146507,typeof _0x153b2f!='symbol'?_0x153b2f+'':_0x153b2f,_0xc93d25);_0x3fdf36[_0x484063(0x17e)]=class extends _0x34b4ef[_0x484063(0x1ea)]{constructor(_0x2604d8=_0x1286f6,_0x343d21,_0x66e901){const _0x526890=_0x484063;super(),this[_0x526890(0x185)]=_0x2604d8,this[_0x526890(0x18c)]=_0x343d21,this[_0x526890(0x1c2)]=_0x66e901;const {..._0x46caad}=_0x34b4ef[_0x526890(0x1ce)]({},_0x1286f6,this[_0x526890(0x185)]);this[_0x526890(0x1c2)][_0x526890(0x1be)](_0xbc477f,_0x46caad);}[_0x484063(0x198)](){const _0x38d491=_0x484063;[[_0x335a5d],[_0x4fcbcf],[_0x4fffe9]][_0x38d491(0x18f)](_0x1b1235=>{const _0x5c133c=_0x38d491;this[_0x5c133c(0x18c)][_0x5c133c(0x1a0)](_0x1b1235);});}['onReady'](){const _0x2d0175=_0x484063;this[_0x2d0175(0x18c)][_0x2d0175(0x1b0)](_0x4fcbcf),this[_0x2d0175(0x18c)]['get'](_0x4fffe9);}},_0x481fe2(_0x3fdf36[_0x484063(0x17e)],_0x484063(0x1c8),_0x163e9e),_0x481fe2(_0x3fdf36[_0x484063(0x17e)],_0x484063(0x1ec),_0x34b4ef[_0x484063(0x17b)][_0x484063(0x1e8)]),_0x3fdf36[_0x484063(0x17e)]=_0x5ae950([_0x34b4ef['DependentOn'](_0x54799e['UniverThreadCommentUIPlugin'],_0x1bf240[_0x484063(0x187)],_0x10c06b['UniverLicensePlugin']),_0x1654b8(0x1,_0x34b4ef['Inject'](_0x34b4ef[_0x484063(0x1e9)])),_0x1654b8(0x2,_0x34b4ef['IConfigService'])],_0x3fdf36[_0x484063(0x17e)]),Object[_0x484063(0x1cc)](_0x3fdf36,Symbol[_0x484063(0x1fd)],{'value':_0x484063(0x1bf)});}));
|
|
1
|
+
(function(_0x209469,_0x1b39c9){const _0x335c98=_0x12b1,_0x2aa800=_0x209469();while(!![]){try{const _0x1f9633=parseInt(_0x335c98(0x182))/0x1*(-parseInt(_0x335c98(0x1a1))/0x2)+parseInt(_0x335c98(0x17f))/0x3*(parseInt(_0x335c98(0x1ab))/0x4)+-parseInt(_0x335c98(0x197))/0x5*(-parseInt(_0x335c98(0x171))/0x6)+-parseInt(_0x335c98(0x1a4))/0x7+parseInt(_0x335c98(0x1e9))/0x8*(-parseInt(_0x335c98(0x1c1))/0x9)+parseInt(_0x335c98(0x1e3))/0xa*(parseInt(_0x335c98(0x16f))/0xb)+-parseInt(_0x335c98(0x179))/0xc*(-parseInt(_0x335c98(0x1e8))/0xd);if(_0x1f9633===_0x1b39c9)break;else _0x2aa800['push'](_0x2aa800['shift']());}catch(_0x1a7b47){_0x2aa800['push'](_0x2aa800['shift']());}}}(_0x2297,0xedfdf),function(_0x25b976,_0x10f2a3){const _0x1bc2fa=_0x12b1;typeof exports==_0x1bc2fa(0x195)&&typeof module<'u'?_0x10f2a3(exports,require('@univerjs-pro/collaboration-client'),require(_0x1bc2fa(0x1cc)),require(_0x1bc2fa(0x1ee)),require('@univerjs/thread-comment-ui'),require(_0x1bc2fa(0x194)),require(_0x1bc2fa(0x173)),require(_0x1bc2fa(0x186))):typeof define=='function'&&define[_0x1bc2fa(0x1b2)]?define([_0x1bc2fa(0x190),'@univerjs-pro/collaboration-client',_0x1bc2fa(0x1cc),_0x1bc2fa(0x1ee),_0x1bc2fa(0x191),'@univerjs/thread-comment',_0x1bc2fa(0x173),_0x1bc2fa(0x186)],_0x10f2a3):(_0x25b976=typeof globalThis<'u'?globalThis:_0x25b976||self,_0x10f2a3(_0x25b976['UniverProThreadCommentDatasource']={},_0x25b976[_0x1bc2fa(0x185)],_0x25b976['UniverProLicense'],_0x25b976[_0x1bc2fa(0x1dd)],_0x25b976[_0x1bc2fa(0x1bb)],_0x25b976[_0x1bc2fa(0x170)],_0x25b976[_0x1bc2fa(0x173)],_0x25b976['UniverNetwork']));}(this,function(_0x8dead2,_0x9f227b,_0x564bc7,_0x18f87e,_0x906cd9,_0xb382d7,_0x191812,_0x359eff){'use strict';const _0x49efe9=_0x12b1;const _0x469486=_0x49efe9(0x1cd);var _0x58c75c=(_0x33ea65=>(_0x33ea65[_0x33ea65[_0x49efe9(0x1e7)]=0x0]=_0x49efe9(0x1e7),_0x33ea65[_0x33ea65[_0x49efe9(0x1e5)]=0x1]=_0x49efe9(0x1e5),_0x33ea65[_0x33ea65[_0x49efe9(0x1da)]=-0x1]='UNRECOGNIZED',_0x33ea65))(_0x58c75c||{}),_0x5f2972=(_0x3fa19d=>(_0x3fa19d[_0x3fa19d[_0x49efe9(0x1a6)]=0x0]=_0x49efe9(0x1a6),_0x3fa19d[_0x3fa19d[_0x49efe9(0x1c2)]=0x1]='Add',_0x3fa19d[_0x3fa19d[_0x49efe9(0x1bd)]=0x2]=_0x49efe9(0x1bd),_0x3fa19d[_0x3fa19d['Edit']=0x3]=_0x49efe9(0x1b0),_0x3fa19d[_0x3fa19d[_0x49efe9(0x18b)]=0x4]=_0x49efe9(0x18b),_0x3fa19d[_0x3fa19d[_0x49efe9(0x1d8)]=0x5]=_0x49efe9(0x1d8),_0x3fa19d[_0x3fa19d[_0x49efe9(0x1da)]=-0x1]=_0x49efe9(0x1da),_0x3fa19d))(_0x5f2972||{});const _0x1ad1d3=_0x272119=>_0x18f87e[_0x49efe9(0x177)](new Date(+_0x272119))['format'](_0x49efe9(0x1c5)),_0x1c7d68=async(_0x13e70e,_0x620afa)=>{const _0x1f6d0b=_0x49efe9,_0xcdaab8=_0x13e70e['get'](_0x18f87e[_0x1f6d0b(0x198)]),_0x309856=_0x13e70e[_0x1f6d0b(0x1cf)](_0x359eff[_0x1f6d0b(0x1b5)]);_0x620afa['forEach'](_0x30f942=>{const _0x459393=_0x1f6d0b;_0xcdaab8[_0x459393(0x1dc)](_0x30f942)&&_0x620afa[_0x459393(0x1ef)](_0x30f942);}),_0x620afa[_0x1f6d0b(0x19a)]&&(await _0x309856[_0x1f6d0b(0x1cf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x620afa]}}))[_0x1f6d0b(0x1d6)]['users'][_0x1f6d0b(0x1bc)](_0x19e682=>{const _0x331f52=_0x1f6d0b;_0x19e682&&_0xcdaab8[_0x331f52(0x1d7)](_0x19e682);});};var _0x4fc42b=Object[_0x49efe9(0x17b)],_0x42b947=(_0x123267,_0x4d7bcd,_0x40143e,_0x4451b1)=>{for(var _0x1c6bfc=_0x4451b1>0x1?void 0x0:_0x4451b1?_0x4fc42b(_0x4d7bcd,_0x40143e):_0x4d7bcd,_0x2e0f8f=_0x123267['length']-0x1,_0x4b7019;_0x2e0f8f>=0x0;_0x2e0f8f--)(_0x4b7019=_0x123267[_0x2e0f8f])&&(_0x1c6bfc=_0x4b7019(_0x1c6bfc)||_0x1c6bfc);return _0x1c6bfc;},_0x9fc40a=(_0x588eb3,_0x49534d)=>(_0x391ce8,_0x2ac3ad)=>_0x49534d(_0x391ce8,_0x2ac3ad,_0x588eb3);let _0x256920=class extends _0x18f87e[_0x49efe9(0x1a3)]{constructor(_0x4fe119,_0x588759,_0x41209b,_0x3cd6af){const _0x39ad04=_0x49efe9;super(),this[_0x39ad04(0x19c)]=_0x4fe119,this[_0x39ad04(0x1ac)]=_0x588759,this[_0x39ad04(0x1e4)]=_0x41209b,this[_0x39ad04(0x1c3)]=_0x3cd6af,this[_0x39ad04(0x1a7)](),this[_0x39ad04(0x1ea)]();}[_0x49efe9(0x1ea)](){const _0x5c15fa=_0x49efe9;this[_0x5c15fa(0x176)](this['_threadCommentModel'][_0x5c15fa(0x1e0)]['pipe'](_0x191812['bufferTime'](0x10))[_0x5c15fa(0x1c7)](_0x2e0709=>{const _0x40777d=_0x5c15fa,_0x273938=new Set();_0x2e0709[_0x40777d(0x1bc)](_0x2dd9b0=>{const _0x29f39b=_0x40777d;switch(_0x2dd9b0[_0x29f39b(0x1ad)]){case _0x29f39b(0x1a9):{const _0x2554ef=_0x2dd9b0['payload'][_0x29f39b(0x1b6)];_0x273938[_0x29f39b(0x1a9)](_0x2554ef);break;}}}),_0x1c7d68(this[_0x40777d(0x1c3)],_0x273938);}));}[_0x49efe9(0x1a7)](){const _0x13e5d9=_0x49efe9;this[_0x13e5d9(0x176)](this[_0x13e5d9(0x19c)][_0x13e5d9(0x1e0)][_0x13e5d9(0x1c7)](async _0x1e1b50=>{const _0x40f287=_0x13e5d9;var _0x461209,_0x120adc,_0x19e9a3,_0x2440d6;const _0x1ef3c9=(_0x461209=this[_0x40f287(0x1ac)]['getUnit'](_0x1e1b50[_0x40f287(0x192)])['find'](_0x49ed39=>_0x49ed39[_0x40f287(0x1ca)]===_0x1e1b50['threadId']))==null?void 0x0:_0x461209[_0x40f287(0x18c)];if(!_0x1ef3c9)return;const {unitId:_0x1344a5,subUnitId:_0x23be48}=_0x1ef3c9;switch(_0x1e1b50[_0x40f287(0x1bf)]&&this[_0x40f287(0x1e4)][_0x40f287(0x1d7)](_0x1e1b50[_0x40f287(0x1bf)]),_0x1e1b50['type']){case _0x5f2972['Add']:break;case _0x5f2972['Reply']:{this[_0x40f287(0x1ac)][_0x40f287(0x199)](_0x1344a5,_0x23be48,{'unitId':_0x1344a5,'subUnitId':_0x23be48,'ref':'','id':_0x1e1b50[_0x40f287(0x183)],'dT':_0x1ad1d3(+_0x1e1b50['createTimestamp']),'threadId':_0x1e1b50[_0x40f287(0x1ca)],'personId':(_0x19e9a3=(_0x120adc=_0x1e1b50['user'])==null?void 0x0:_0x120adc[_0x40f287(0x172)])!=null?_0x19e9a3:_0x1e1b50['userId'],'text':JSON['parse'](_0x1e1b50[_0x40f287(0x1d0)]),'parentId':_0x1ef3c9['id']});break;}case _0x5f2972['Delete']:{const _0xef30f8=this['_threadCommentModel']['getComment'](_0x1344a5,_0x23be48,_0x1e1b50[_0x40f287(0x183)]);_0xef30f8&&_0xef30f8['parentId']&&this[_0x40f287(0x1ac)][_0x40f287(0x1c0)](_0x1344a5,_0x23be48,_0x1e1b50[_0x40f287(0x183)]);break;}case _0x5f2972[_0x40f287(0x1b0)]:{this['_threadCommentModel'][_0x40f287(0x18f)](_0x1344a5,_0x23be48,{'commentId':_0x1e1b50[_0x40f287(0x183)],'text':JSON[_0x40f287(0x18a)](_0x1e1b50[_0x40f287(0x1d0)])});break;}case _0x5f2972[_0x40f287(0x1d8)]:{const _0x683bc2=(_0x2440d6=this[_0x40f287(0x1ac)][_0x40f287(0x1d9)](_0x1e1b50['unitId'])[_0x40f287(0x1b9)](_0x1fe6b3=>_0x1fe6b3[_0x40f287(0x1ca)]===_0x1e1b50[_0x40f287(0x1ca)]))==null?void 0x0:_0x2440d6[_0x40f287(0x18c)];_0x683bc2&&this['_threadCommentModel']['resolveComment'](_0x1344a5,_0x23be48,_0x683bc2['id'],_0x1e1b50[_0x40f287(0x178)]===_0x58c75c[_0x40f287(0x1e5)]);break;}}}));}};_0x256920=_0x42b947([_0x9fc40a(0x0,_0x18f87e[_0x49efe9(0x18e)](_0x9f227b[_0x49efe9(0x1e1)])),_0x9fc40a(0x1,_0x18f87e[_0x49efe9(0x18e)](_0xb382d7[_0x49efe9(0x180)])),_0x9fc40a(0x2,_0x18f87e[_0x49efe9(0x18e)](_0x18f87e[_0x49efe9(0x198)])),_0x9fc40a(0x3,_0x18f87e[_0x49efe9(0x18e)](_0x18f87e[_0x49efe9(0x1c6)]))],_0x256920);const _0x17de5b=_0x49efe9(0x1cb),_0xa7af7e={};var _0x2aa72c=Object['getOwnPropertyDescriptor'],_0x24db42=(_0x32efc2,_0x203419,_0xc3acdb,_0x3f5870)=>{const _0x410825=_0x49efe9;for(var _0x4e50e2=_0x3f5870>0x1?void 0x0:_0x3f5870?_0x2aa72c(_0x203419,_0xc3acdb):_0x203419,_0x1fa9a4=_0x32efc2[_0x410825(0x17c)]-0x1,_0x1ce00e;_0x1fa9a4>=0x0;_0x1fa9a4--)(_0x1ce00e=_0x32efc2[_0x1fa9a4])&&(_0x4e50e2=_0x1ce00e(_0x4e50e2)||_0x4e50e2);return _0x4e50e2;},_0xb24e0e=(_0x56870c,_0x4b8979)=>(_0x3ce6a1,_0x51816f)=>_0x4b8979(_0x3ce6a1,_0x51816f,_0x56870c);function _0x33e71a(_0x5401b8,_0x519cd2){const _0x478917=_0x49efe9,_0x3f2846=_0x5401b8['replies'][0x0];return{..._0x519cd2,'id':_0x3f2846[_0x478917(0x183)],'resolved':_0x5401b8[_0x478917(0x178)]===0x1,'dT':_0x1ad1d3(_0x3f2846[_0x478917(0x16e)]),'personId':_0x3f2846[_0x478917(0x181)],'threadId':_0x3f2846['threadId']};}function _0x36461d(_0x208512,_0xdea6f4,_0x6c70d3){const _0x7cac23=_0x49efe9;var _0x26e2ca,_0x25c66c;if(((_0x25c66c=(_0x26e2ca=_0x208512==null?void 0x0:_0x208512[_0x7cac23(0x1d4)])==null?void 0x0:_0x26e2ca[_0x7cac23(0x17c)])!=null?_0x25c66c:0x0)>0x0){const _0x5553f6=(_0x161512,_0x1b71ed)=>({'id':_0x161512['replyId'],'threadId':_0x161512[_0x7cac23(0x1ca)],'dT':_0x1ad1d3(_0x161512[_0x7cac23(0x16e)]),'personId':_0x161512[_0x7cac23(0x181)],'resolved':_0x208512[_0x7cac23(0x178)]===_0x58c75c[_0x7cac23(0x1e5)],'unitId':_0xdea6f4,'subUnitId':_0x6c70d3,'text':JSON['parse'](_0x161512['content']),'parentId':_0x1b71ed}),_0x2db493=_0x5553f6(_0x208512['replies'][0x0]);return{..._0x2db493,'children':_0x208512[_0x7cac23(0x1d4)][_0x7cac23(0x1df)](0x1)[_0x7cac23(0x1aa)](_0x388593=>_0x5553f6(_0x388593,_0x2db493['id']))};}return null;}let _0x29d1e7=class{constructor(_0x178459,_0x5c2aeb,_0x10d456,_0x3dcd38){const _0x24a811=_0x49efe9;this[_0x24a811(0x16d)]=_0x178459,this[_0x24a811(0x1e4)]=_0x5c2aeb,this[_0x24a811(0x187)]=_0x10d456,this[_0x24a811(0x1c3)]=_0x3dcd38;}async['addComment'](_0x5addb3){const _0xf48e8c=_0x49efe9;var _0x12068b,_0x4a34b8;const {parentId:_0x92910e,unitId:_0x40a6d5,text:_0x670a24,threadId:_0x49ef44}=_0x5addb3,_0xc537dd=(_0x4a34b8=(_0x12068b=_0x670a24[_0xf48e8c(0x17a)])==null?void 0x0:_0x12068b['filter'](_0x4283cc=>_0x4283cc[_0xf48e8c(0x1ce)]===_0x18f87e[_0xf48e8c(0x184)]['COMMENT'])[_0xf48e8c(0x1aa)](_0x984f23=>_0x984f23[_0xf48e8c(0x1a8)]))!=null?_0x4a34b8:[],_0x1b0b36=JSON[_0xf48e8c(0x16b)](_0x670a24),_0x463487=(await this[_0xf48e8c(0x187)][_0xf48e8c(0x19b)](_0x40a6d5))[_0xf48e8c(0x1d1)]();if(_0x92910e){const _0x4f0beb={'memberId':_0x463487,'unitId':_0x40a6d5,'content':_0x1b0b36,'mention':_0xc537dd,'threadId':_0x49ef44},_0x2cf1dd=(await this['_httpService'][_0xf48e8c(0x1be)](_0xf48e8c(0x1b7)+_0x40a6d5+_0xf48e8c(0x16c),{'body':_0x4f0beb}))[_0xf48e8c(0x1d6)]['reply'];return{..._0x5addb3,'id':_0x2cf1dd[_0xf48e8c(0x183)],'dT':_0x18f87e[_0xf48e8c(0x177)](+_0x2cf1dd[_0xf48e8c(0x16e)])[_0xf48e8c(0x193)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2cf1dd[_0xf48e8c(0x181)]};}else{const _0x61cb78={'memberId':_0x463487,'unitId':_0x40a6d5,'content':_0x1b0b36,'mention':_0xc537dd},_0x5969c0=await this[_0xf48e8c(0x16d)][_0xf48e8c(0x1be)](_0xf48e8c(0x1b7)+_0x40a6d5+_0xf48e8c(0x1e6),{'body':_0x61cb78});return _0x33e71a(_0x5969c0[_0xf48e8c(0x1d6)][_0xf48e8c(0x19d)],_0x5addb3);}}async[_0x49efe9(0x18f)](_0x223c04){const _0xc0484b=_0x49efe9;var _0x61e903,_0x189fa2;const {text:_0x567841,unitId:_0x585a1f}=_0x223c04,_0x3d5aae=(_0x189fa2=(_0x61e903=_0x567841['customRanges'])==null?void 0x0:_0x61e903['filter'](_0x55639a=>_0x55639a[_0xc0484b(0x1ce)]===_0x18f87e[_0xc0484b(0x184)]['COMMENT'])[_0xc0484b(0x1aa)](_0x346f7d=>_0x346f7d['rangeId']))!=null?_0x189fa2:[],_0x2fe534=JSON[_0xc0484b(0x16b)](_0x567841),_0x4362dc=_0x223c04[_0xc0484b(0x1ca)],_0x3798ff=_0x223c04['id'],_0x508d60={'memberId':(await this[_0xc0484b(0x187)][_0xc0484b(0x19b)](_0x585a1f))[_0xc0484b(0x1d1)](),'unitId':_0x585a1f,'threadId':_0x4362dc,'mention':_0x3d5aae,'content':_0x2fe534,'replyId':_0x3798ff},_0x2dd023=await this[_0xc0484b(0x16d)][_0xc0484b(0x1be)](_0xc0484b(0x1b7)+_0x585a1f+_0xc0484b(0x174),{'body':_0x508d60});return!_0x2dd023[_0xc0484b(0x1d6)][_0xc0484b(0x1a5)]||_0x2dd023['body'][_0xc0484b(0x1a5)][_0xc0484b(0x1c9)]===0x1;}async[_0x49efe9(0x175)](_0x116a8c){const _0x1c8676=_0x49efe9,{unitId:_0x1f709b}=_0x116a8c,_0x125a18=_0x116a8c[_0x1c8676(0x1ca)],_0x77afda={'memberId':this[_0x1c8676(0x1e4)][_0x1c8676(0x1de)]()[_0x1c8676(0x172)],'unitId':_0x1f709b,'threadId':_0x125a18,'solved':_0x116a8c['resolved']?_0x58c75c[_0x1c8676(0x1e5)]:_0x58c75c[_0x1c8676(0x1e7)]},_0x3845c1=await this[_0x1c8676(0x16d)][_0x1c8676(0x1be)](_0x1c8676(0x1b7)+_0x1f709b+_0x1c8676(0x1eb),{'body':_0x77afda});return!_0x3845c1[_0x1c8676(0x1d6)][_0x1c8676(0x1a5)]||_0x3845c1[_0x1c8676(0x1d6)][_0x1c8676(0x1a5)][_0x1c8676(0x1c9)]===0x1;}async['deleteComment'](_0x3c28c0,_0xa94fea,_0x5cba35,_0x4ec51c){const _0x10dd49=_0x49efe9,_0x1a2340={'memberId':(await this['_sessionService'][_0x10dd49(0x19b)](_0x3c28c0))['getMemberID'](),'threadId':_0x5cba35,'replyId':_0x4ec51c,'unitId':_0x3c28c0},_0x3dad32=await this[_0x10dd49(0x16d)][_0x10dd49(0x1be)](_0x10dd49(0x1b7)+_0x3c28c0+_0x10dd49(0x1b4),{'body':_0x1a2340});return!_0x3dad32[_0x10dd49(0x1d6)][_0x10dd49(0x1a5)]||_0x3dad32['body'][_0x10dd49(0x1a5)][_0x10dd49(0x1c9)]===0x1;}async[_0x49efe9(0x17d)](_0x1180c6,_0x5886c1,_0x571570){const _0x4de103=_0x49efe9,_0x5b0d5a={'unitId':_0x1180c6,'threadId':_0x571570},_0x1943be=await this[_0x4de103(0x16d)][_0x4de103(0x1be)](_0x4de103(0x1b7)+_0x1180c6+'/list',{'body':_0x5b0d5a}),_0xaa7678=_0x571570['map'](_0x3ea8e0=>_0x36461d(_0x1943be['body'][_0x4de103(0x19e)][_0x3ea8e0],_0x1180c6,_0x5886c1))[_0x4de103(0x17e)](Boolean);return Object[_0x4de103(0x1b3)](_0x1943be[_0x4de103(0x1d6)][_0x4de103(0x1d5)])[_0x4de103(0x1bc)](_0x1078d5=>{const _0x31df98=_0x4de103;this[_0x31df98(0x1e4)][_0x31df98(0x1d7)](_0x1078d5);}),_0xaa7678;}['saveCommentToSnapshot'](_0x292e60){const _0x354009=_0x49efe9;return{'id':_0x292e60['id'],'threadId':_0x292e60['threadId'],'ref':_0x292e60[_0x354009(0x1c8)]};}};_0x29d1e7=_0x24db42([_0xb24e0e(0x0,_0x18f87e[_0x49efe9(0x18e)](_0x359eff['HTTPService'])),_0xb24e0e(0x1,_0x18f87e[_0x49efe9(0x18e)](_0x18f87e[_0x49efe9(0x198)])),_0xb24e0e(0x2,_0x18f87e[_0x49efe9(0x18e)](_0x9f227b['CollaborationSessionService'])),_0xb24e0e(0x3,_0x18f87e[_0x49efe9(0x18e)](_0x18f87e[_0x49efe9(0x1c6)]))],_0x29d1e7);var _0x3d834a=Object[_0x49efe9(0x17b)],_0x247c3d=(_0x53b058,_0x30889d,_0x22e031,_0x51bc92)=>{for(var _0x1fa26b=_0x51bc92>0x1?void 0x0:_0x51bc92?_0x3d834a(_0x30889d,_0x22e031):_0x30889d,_0x279c3d=_0x53b058['length']-0x1,_0x455194;_0x279c3d>=0x0;_0x279c3d--)(_0x455194=_0x53b058[_0x279c3d])&&(_0x1fa26b=_0x455194(_0x1fa26b)||_0x1fa26b);return _0x1fa26b;},_0x43b705=(_0x523812,_0x26cd3d)=>(_0xb7b124,_0x165b35)=>_0x26cd3d(_0xb7b124,_0x165b35,_0x523812);let _0x183656=class extends _0x18f87e['Disposable']{constructor(_0x2a1f16,_0xf0d767){const _0x29e3a1=_0x49efe9;super(),this['_threadCommentDataSourceService']=_0x2a1f16,this['_threadCommentDataSource']=_0xf0d767,this[_0x29e3a1(0x1af)]();}[_0x49efe9(0x1af)](){const _0x11c523=_0x49efe9;this[_0x11c523(0x1ec)]['dataSource']=this[_0x11c523(0x19f)],this[_0x11c523(0x1ec)][_0x11c523(0x188)]=!0x1;}};_0x183656=_0x247c3d([_0x43b705(0x0,_0xb382d7[_0x49efe9(0x1ba)]),_0x43b705(0x1,_0x18f87e['Inject'](_0x29d1e7))],_0x183656);var _0x56a20f=Object[_0x49efe9(0x1a0)],_0x11d459=Object[_0x49efe9(0x17b)],_0x159f69=(_0x175edf,_0x10cb62,_0x4cc41)=>_0x10cb62 in _0x175edf?_0x56a20f(_0x175edf,_0x10cb62,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4cc41}):_0x175edf[_0x10cb62]=_0x4cc41,_0x15a1d8=(_0x1f615e,_0x222f50,_0x5c99ce,_0xf6e123)=>{const _0x4f0c89=_0x49efe9;for(var _0x4370a9=_0xf6e123>0x1?void 0x0:_0xf6e123?_0x11d459(_0x222f50,_0x5c99ce):_0x222f50,_0x5605f0=_0x1f615e[_0x4f0c89(0x17c)]-0x1,_0x537e6d;_0x5605f0>=0x0;_0x5605f0--)(_0x537e6d=_0x1f615e[_0x5605f0])&&(_0x4370a9=_0x537e6d(_0x4370a9)||_0x4370a9);return _0x4370a9;},_0x26e11f=(_0x50a643,_0x47ee79)=>(_0x25dd72,_0x261d71)=>_0x47ee79(_0x25dd72,_0x261d71,_0x50a643),_0x25cb6d=(_0x4c5e5b,_0xb84660,_0xf9e9f)=>_0x159f69(_0x4c5e5b,typeof _0xb84660!=_0x49efe9(0x189)?_0xb84660+'':_0xb84660,_0xf9e9f);_0x8dead2['UniverThreadCommentDataSourcePlugin']=class extends _0x18f87e[_0x49efe9(0x1db)]{constructor(_0x30f4b5=_0xa7af7e,_0x15d4dc,_0x3d676c){const _0x3f520c=_0x49efe9;super(),this[_0x3f520c(0x1c4)]=_0x30f4b5,this[_0x3f520c(0x1c3)]=_0x15d4dc,this['_configService']=_0x3d676c;const {..._0x52151a}=_0x18f87e[_0x3f520c(0x1ae)]({},_0xa7af7e,this['_config']);this['_configService']['setConfig'](_0x17de5b,_0x52151a);}['onStarting'](){[[_0x29d1e7],[_0x183656],[_0x256920]]['forEach'](_0x5e886b=>{const _0x43624b=_0x12b1;this[_0x43624b(0x1c3)][_0x43624b(0x1a9)](_0x5e886b);});}[_0x49efe9(0x1b8)](){const _0x1ab560=_0x49efe9;this[_0x1ab560(0x1c3)][_0x1ab560(0x1cf)](_0x183656),this[_0x1ab560(0x1c3)][_0x1ab560(0x1cf)](_0x256920);}},_0x25cb6d(_0x8dead2[_0x49efe9(0x196)],_0x49efe9(0x1d3),_0x469486),_0x25cb6d(_0x8dead2['UniverThreadCommentDataSourcePlugin'],'type',_0x18f87e['UniverInstanceType'][_0x49efe9(0x1b1)]),_0x8dead2[_0x49efe9(0x196)]=_0x15a1d8([_0x18f87e[_0x49efe9(0x1d2)](_0x906cd9['UniverThreadCommentUIPlugin'],_0x9f227b[_0x49efe9(0x18d)],_0x564bc7[_0x49efe9(0x1a2)]),_0x26e11f(0x1,_0x18f87e['Inject'](_0x18f87e[_0x49efe9(0x1c6)])),_0x26e11f(0x2,_0x18f87e[_0x49efe9(0x1ed)])],_0x8dead2['UniverThreadCommentDataSourcePlugin']),Object[_0x49efe9(0x1a0)](_0x8dead2,Symbol['toStringTag'],{'value':_0x49efe9(0x1e2)});}));function _0x12b1(_0x47e1e2,_0x4150da){const _0x2297d7=_0x2297();return _0x12b1=function(_0x12b1e4,_0x5670af){_0x12b1e4=_0x12b1e4-0x16b;let _0x40bf5b=_0x2297d7[_0x12b1e4];return _0x40bf5b;},_0x12b1(_0x47e1e2,_0x4150da);}function _0x2297(){const _0x521650=['rangeType','get','content','getMemberID','DependentOn','pluginName','replies','users','body','addUser','Solve','getUnit','UNRECOGNIZED','Plugin','getUser','UniverCore','getCurrentUser','slice','commentUpdate$','CommentService','Module','1510yukKBO','_userService','Solved','/add','OpenOrReOpen','2675166FdHtCk','48wSJuuT','_initUserSync','/solved','_threadCommentDataSourceService','IConfigService','@univerjs/core','delete','stringify','/reply','_httpService','createTimestamp','82753UluYga','UniverThreadComment','309954apkuOb','userID','rxjs','/edit','resolveComment','disposeWithMe','dayjs','solved','48qbIQiT','customRanges','getOwnPropertyDescriptor','length','listComments','filter','4361874ztirRe','ThreadCommentModel','userId','238vETnMJ','replyId','CustomRangeType','UniverProCollaborationClient','@univerjs/network','_sessionService','syncUpdateMutationToColla','symbol','parse','Delete','root','UniverCollaborationClientPlugin','Inject','updateComment','exports','@univerjs/thread-comment-ui','unitId','format','@univerjs/thread-comment','object','UniverThreadCommentDataSourcePlugin','165kDWCxt','UserManagerService','addComment','size','requireSession','_commentService','comment','comments','_threadCommentDataSource','defineProperty','8852CbLoAU','UniverLicensePlugin','Disposable','9220799NRfWrb','error','Unknown','_init','rangeId','add','map','4cVgSzd','_threadCommentModel','type','merge','_initDataSource','Edit','UNIVER_UNKNOWN','amd','values','/delete','HTTPService','personId','/universer-api/comment/unit/','onReady','find','IThreadCommentDataSourceService','UniverThreadCommentUi','forEach','Reply','post','user','deleteComment','2658519YatmQZ','Add','_injector','_config','YYYY/MM/DD\x20HH:mm','Injector','subscribe','ref','code','threadId','thread-comment-data-source.config','@univerjs-pro/license','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x2297=function(){return _0x521650;};return _0x2297();}
|
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.202506111607",
|
|
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
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.8.0-nightly.202506091607",
|
|
48
|
+
"@univerjs/core": "0.8.0-nightly.202506111607",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202506111607",
|
|
50
|
+
"@univerjs/network": "0.8.0-nightly.202506111607",
|
|
52
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.8.0-nightly.
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202506111607",
|
|
53
|
+
"@univerjs-pro/license": "0.8.0-nightly.202506111607",
|
|
54
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202506111607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|