@univerjs-pro/thread-comment-datasource 0.6.7-nightly.202503311607 → 0.6.7-nightly.202504011606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x5d02ec=_0xe297;(function(_0x10946a,_0x49efc1){const _0x53fdb0=_0xe297,_0x2686fa=_0x10946a();while(!![]){try{const _0x19ee97=parseInt(_0x53fdb0(0x1f3))/0x1*(-parseInt(_0x53fdb0(0x1ec))/0x2)+-parseInt(_0x53fdb0(0x201))/0x3+-parseInt(_0x53fdb0(0x1cb))/0x4+-parseInt(_0x53fdb0(0x213))/0x5+-parseInt(_0x53fdb0(0x1a9))/0x6+-parseInt(_0x53fdb0(0x1fe))/0x7+parseInt(_0x53fdb0(0x203))/0x8;if(_0x19ee97===_0x49efc1)break;else _0x2686fa['push'](_0x2686fa['shift']());}catch(_0xed93e7){_0x2686fa['push'](_0x2686fa['shift']());}}}(_0x1e56,0x99bbf));Object[_0x5d02ec(0x1c6)](exports,Symbol[_0x5d02ec(0x1bd)],{'value':_0x5d02ec(0x21b)});const b=require(_0x5d02ec(0x1e9)),T=require('@univerjs-pro/license'),c=require(_0x5d02ec(0x216)),j=require(_0x5d02ec(0x207)),M=require(_0x5d02ec(0x1da)),w=require(_0x5d02ec(0x21f)),P=require(_0x5d02ec(0x1fc)),U=_0x5d02ec(0x1b3);var I=(_0x14c7f1=>(_0x14c7f1[_0x14c7f1[_0x5d02ec(0x1c4)]=0x0]=_0x5d02ec(0x1c4),_0x14c7f1[_0x14c7f1[_0x5d02ec(0x1ea)]=0x1]=_0x5d02ec(0x1ea),_0x14c7f1[_0x14c7f1['UNRECOGNIZED']=-0x1]=_0x5d02ec(0x20b),_0x14c7f1))(I||{}),v=(_0x2fd52f=>(_0x2fd52f[_0x2fd52f[_0x5d02ec(0x20f)]=0x0]=_0x5d02ec(0x20f),_0x2fd52f[_0x2fd52f[_0x5d02ec(0x1d5)]=0x1]=_0x5d02ec(0x1d5),_0x2fd52f[_0x2fd52f['Reply']=0x2]=_0x5d02ec(0x219),_0x2fd52f[_0x2fd52f[_0x5d02ec(0x1df)]=0x3]=_0x5d02ec(0x1df),_0x2fd52f[_0x2fd52f[_0x5d02ec(0x1a4)]=0x4]=_0x5d02ec(0x1a4),_0x2fd52f[_0x2fd52f[_0x5d02ec(0x1d0)]=0x5]=_0x5d02ec(0x1d0),_0x2fd52f[_0x2fd52f[_0x5d02ec(0x20b)]=-0x1]='UNRECOGNIZED',_0x2fd52f))(v||{});const f=_0x2bac40=>c['dayjs'](new Date(+_0x2bac40))[_0x5d02ec(0x1b2)](_0x5d02ec(0x21e)),R=async(_0xd05785,_0xaa7ba0)=>{const _0x6767ee=_0x5d02ec,_0x482f4f=_0xd05785[_0x6767ee(0x1f8)](c[_0x6767ee(0x21c)]),_0x5cb45c=_0xd05785[_0x6767ee(0x1f8)](P[_0x6767ee(0x1f6)]);_0xaa7ba0[_0x6767ee(0x1e8)](_0x38061d=>{_0x482f4f['getUser'](_0x38061d)&&_0xaa7ba0['delete'](_0x38061d);}),_0xaa7ba0['size']&&(await _0x5cb45c[_0x6767ee(0x1f8)]('/universer-api/user/list',{'params':{'userIDs':[..._0xaa7ba0]}}))[_0x6767ee(0x220)][_0x6767ee(0x1c7)][_0x6767ee(0x1e8)](_0x25403e=>{const _0x1e7e25=_0x6767ee;_0x25403e&&_0x482f4f[_0x1e7e25(0x21d)](_0x25403e);});};var $=Object[_0x5d02ec(0x1bb)],E=(_0xf767c7,_0x3318cf,_0x1b847f,_0x543118)=>{for(var _0x543b2c=_0x543118>0x1?void 0x0:_0x543118?$(_0x3318cf,_0x1b847f):_0x3318cf,_0x51f56f=_0xf767c7['length']-0x1,_0x1d2146;_0x51f56f>=0x0;_0x51f56f--)(_0x1d2146=_0xf767c7[_0x51f56f])&&(_0x543b2c=_0x1d2146(_0x543b2c)||_0x543b2c);return _0x543b2c;},S=(_0x1809f5,_0x5b6550)=>(_0x2b3a66,_0x27fb2a)=>_0x5b6550(_0x2b3a66,_0x27fb2a,_0x1809f5);let p=class extends c[_0x5d02ec(0x1ca)]{constructor(_0x12ee22,_0x14a881,_0x1b51c4,_0x28f6dc){const _0x2bd07e=_0x5d02ec;super(),this['_commentService']=_0x12ee22,this[_0x2bd07e(0x1a8)]=_0x14a881,this[_0x2bd07e(0x1d4)]=_0x1b51c4,this['_injector']=_0x28f6dc,this[_0x2bd07e(0x208)](),this[_0x2bd07e(0x1d1)]();}[_0x5d02ec(0x1d1)](){const _0x5473c0=_0x5d02ec;this[_0x5473c0(0x1dd)](this[_0x5473c0(0x1a8)][_0x5473c0(0x1d3)][_0x5473c0(0x1d2)](w['bufferTime'](0x10))[_0x5473c0(0x1c2)](_0x4b3c45=>{const _0x1be630=_0x5473c0,_0x25dfb0=new Set();_0x4b3c45[_0x1be630(0x1e8)](_0x25f876=>{const _0x78db26=_0x1be630;switch(_0x25f876['type']){case _0x78db26(0x202):{const _0x4ecc85=_0x25f876[_0x78db26(0x1c8)][_0x78db26(0x1eb)];_0x25dfb0[_0x78db26(0x202)](_0x4ecc85);break;}}}),R(this[_0x1be630(0x1c3)],_0x25dfb0);}));}[_0x5d02ec(0x208)](){const _0x388011=_0x5d02ec;this[_0x388011(0x1dd)](this[_0x388011(0x1ab)][_0x388011(0x1d3)][_0x388011(0x1c2)](async _0x415d95=>{const _0x2b46bf=_0x388011;var _0x8e1d58,_0x563ba4,_0xd62e83,_0x46ce51;const _0x15038e=(_0x8e1d58=this[_0x2b46bf(0x1a8)][_0x2b46bf(0x1ef)](_0x415d95[_0x2b46bf(0x214)])[_0x2b46bf(0x1cf)](_0x5dda20=>_0x5dda20[_0x2b46bf(0x1b4)]===_0x415d95[_0x2b46bf(0x1b4)]))==null?void 0x0:_0x8e1d58[_0x2b46bf(0x211)];if(!_0x15038e)return;const {unitId:_0x500c0a,subUnitId:_0x17b621}=_0x15038e;switch(_0x415d95[_0x2b46bf(0x1cd)]&&this[_0x2b46bf(0x1d4)]['addUser'](_0x415d95['user']),_0x415d95['type']){case v[_0x2b46bf(0x1d5)]:break;case v[_0x2b46bf(0x219)]:{this[_0x2b46bf(0x1a8)]['addComment'](_0x500c0a,_0x17b621,{'unitId':_0x500c0a,'subUnitId':_0x17b621,'ref':'','id':_0x415d95['replyId'],'dT':f(+_0x415d95[_0x2b46bf(0x1e1)]),'threadId':_0x415d95[_0x2b46bf(0x1b4)],'personId':(_0xd62e83=(_0x563ba4=_0x415d95[_0x2b46bf(0x1cd)])==null?void 0x0:_0x563ba4['userID'])!=null?_0xd62e83:_0x415d95['userId'],'text':JSON[_0x2b46bf(0x1b7)](_0x415d95['content']),'parentId':_0x15038e['id']});break;}case v[_0x2b46bf(0x1a4)]:{const _0x5c07cb=this['_threadCommentModel'][_0x2b46bf(0x1f2)](_0x500c0a,_0x17b621,_0x415d95['replyId']);_0x5c07cb&&_0x5c07cb[_0x2b46bf(0x1e5)]&&this['_threadCommentModel'][_0x2b46bf(0x212)](_0x500c0a,_0x17b621,_0x415d95[_0x2b46bf(0x1e2)]);break;}case v[_0x2b46bf(0x1df)]:{this[_0x2b46bf(0x1a8)][_0x2b46bf(0x1db)](_0x500c0a,_0x17b621,{'commentId':_0x415d95['replyId'],'text':JSON['parse'](_0x415d95[_0x2b46bf(0x1d8)])});break;}case v[_0x2b46bf(0x1d0)]:{const _0x24a34d=(_0x46ce51=this['_threadCommentModel']['getUnit'](_0x415d95[_0x2b46bf(0x214)])[_0x2b46bf(0x1cf)](_0x84442b=>_0x84442b[_0x2b46bf(0x1b4)]===_0x415d95[_0x2b46bf(0x1b4)]))==null?void 0x0:_0x46ce51['root'];_0x24a34d&&this[_0x2b46bf(0x1a8)][_0x2b46bf(0x20a)](_0x500c0a,_0x17b621,_0x24a34d['id'],_0x415d95[_0x2b46bf(0x1f7)]===I[_0x2b46bf(0x1ea)]);break;}}}));}};p=E([S(0x0,c[_0x5d02ec(0x218)](b[_0x5d02ec(0x1b5)])),S(0x1,c['Inject'](M[_0x5d02ec(0x1b9)])),S(0x2,c[_0x5d02ec(0x218)](c[_0x5d02ec(0x21c)])),S(0x3,c[_0x5d02ec(0x218)](c['Injector']))],p);const q=_0x5d02ec(0x1b0),D={};function _0xe297(_0x597f74,_0x1a0abc){const _0x1e5694=_0x1e56();return _0xe297=function(_0xe297e8,_0x4c85dc){_0xe297e8=_0xe297e8-0x1a3;let _0x4581e3=_0x1e5694[_0xe297e8];return _0x4581e3;},_0xe297(_0x597f74,_0x1a0abc);}var A=Object[_0x5d02ec(0x1bb)],x=(_0x219202,_0x439e8f,_0x1f5ebe,_0x2fe01f)=>{const _0x498f9c=_0x5d02ec;for(var _0xe18794=_0x2fe01f>0x1?void 0x0:_0x2fe01f?A(_0x439e8f,_0x1f5ebe):_0x439e8f,_0x4d68b9=_0x219202[_0x498f9c(0x1ba)]-0x1,_0x106c6f;_0x4d68b9>=0x0;_0x4d68b9--)(_0x106c6f=_0x219202[_0x4d68b9])&&(_0xe18794=_0x106c6f(_0xe18794)||_0xe18794);return _0xe18794;},_=(_0x205ae1,_0x3dea45)=>(_0x1eee1a,_0x751804)=>_0x3dea45(_0x1eee1a,_0x751804,_0x205ae1);function Y(_0x2121a0,_0x4017f2){const _0x117c49=_0x5d02ec,_0x3a3ac5=_0x2121a0['replies'][0x0];return{..._0x4017f2,'id':_0x3a3ac5['replyId'],'resolved':_0x2121a0[_0x117c49(0x1f7)]===0x1,'dT':f(_0x3a3ac5[_0x117c49(0x1e1)]),'personId':_0x3a3ac5[_0x117c49(0x1cc)],'threadId':_0x3a3ac5[_0x117c49(0x1b4)]};}function G(_0x466b44,_0x1e5996,_0x24ae41){const _0x1c7a77=_0x5d02ec;var _0x2036ab,_0x5eda66;if(((_0x5eda66=(_0x2036ab=_0x466b44==null?void 0x0:_0x466b44[_0x1c7a77(0x1a6)])==null?void 0x0:_0x2036ab[_0x1c7a77(0x1ba)])!=null?_0x5eda66:0x0)>0x0){const _0x4110fa=(_0x42a9b9,_0x304a3d)=>({'id':_0x42a9b9['replyId'],'threadId':_0x42a9b9[_0x1c7a77(0x1b4)],'dT':f(_0x42a9b9[_0x1c7a77(0x1e1)]),'personId':_0x42a9b9[_0x1c7a77(0x1cc)],'resolved':_0x466b44[_0x1c7a77(0x1f7)]===I[_0x1c7a77(0x1ea)],'unitId':_0x1e5996,'subUnitId':_0x24ae41,'text':JSON[_0x1c7a77(0x1b7)](_0x42a9b9[_0x1c7a77(0x1d8)]),'parentId':_0x304a3d}),_0x1412a9=_0x4110fa(_0x466b44[_0x1c7a77(0x1a6)][0x0]);return{..._0x1412a9,'children':_0x466b44[_0x1c7a77(0x1a6)][_0x1c7a77(0x1a5)](0x1)[_0x1c7a77(0x1b6)](_0x25502b=>_0x4110fa(_0x25502b,_0x1412a9['id']))};}return null;}let g=class{constructor(_0x1c5257,_0x205583,_0x2bb6c5,_0xf2ef61){const _0x3303ca=_0x5d02ec;this[_0x3303ca(0x1d7)]=_0x1c5257,this[_0x3303ca(0x1d4)]=_0x205583,this['_sessionService']=_0x2bb6c5,this[_0x3303ca(0x1c3)]=_0xf2ef61;}async[_0x5d02ec(0x1bf)](_0x1d8917){const _0x5b0ccc=_0x5d02ec;var _0x43cd79,_0x45640b;const {parentId:_0x173349,unitId:_0x7ecc51,text:_0x4ce91b,threadId:_0x44e161}=_0x1d8917,_0x10b2ec=(_0x45640b=(_0x43cd79=_0x4ce91b[_0x5b0ccc(0x1e3)])==null?void 0x0:_0x43cd79['filter'](_0xd2d4b9=>_0xd2d4b9[_0x5b0ccc(0x1e6)]===c['CustomRangeType'][_0x5b0ccc(0x1b1)])[_0x5b0ccc(0x1b6)](_0x427792=>_0x427792['rangeId']))!=null?_0x45640b:[],_0x3be638=JSON[_0x5b0ccc(0x1fd)](_0x4ce91b),_0x568923=(await this['_sessionService'][_0x5b0ccc(0x1ae)](_0x7ecc51))[_0x5b0ccc(0x1e4)]();if(_0x173349){const _0x11640c={'memberId':_0x568923,'unitId':_0x7ecc51,'content':_0x3be638,'mention':_0x10b2ec,'threadId':_0x44e161},_0x4dedd4=(await this['_httpService'][_0x5b0ccc(0x1c0)](_0x5b0ccc(0x1ad)+_0x7ecc51+_0x5b0ccc(0x200),{'body':_0x11640c}))[_0x5b0ccc(0x220)][_0x5b0ccc(0x21a)];return{..._0x1d8917,'id':_0x4dedd4[_0x5b0ccc(0x1e2)],'dT':c[_0x5b0ccc(0x1aa)](+_0x4dedd4[_0x5b0ccc(0x1e1)])[_0x5b0ccc(0x1b2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4dedd4[_0x5b0ccc(0x1cc)]};}else{const _0x21d112={'memberId':_0x568923,'unitId':_0x7ecc51,'content':_0x3be638,'mention':_0x10b2ec},_0x54bc98=await this[_0x5b0ccc(0x1d7)][_0x5b0ccc(0x1c0)](_0x5b0ccc(0x1ad)+_0x7ecc51+_0x5b0ccc(0x1c1),{'body':_0x21d112});return Y(_0x54bc98[_0x5b0ccc(0x220)]['comment'],_0x1d8917);}}async[_0x5d02ec(0x1db)](_0x2eb80c){const _0x56d45c=_0x5d02ec;var _0x3fc6d0,_0x59a34f;const {text:_0x3c97a9,unitId:_0x3eb287}=_0x2eb80c,_0x1ee3e6=(_0x59a34f=(_0x3fc6d0=_0x3c97a9['customRanges'])==null?void 0x0:_0x3fc6d0[_0x56d45c(0x1fa)](_0x2b051f=>_0x2b051f['rangeType']===c[_0x56d45c(0x1de)]['COMMENT'])[_0x56d45c(0x1b6)](_0x495095=>_0x495095[_0x56d45c(0x205)]))!=null?_0x59a34f:[],_0x1a72b4=JSON['stringify'](_0x3c97a9),_0x353043=_0x2eb80c[_0x56d45c(0x1b4)],_0x23015d=_0x2eb80c['id'],_0x477f4b={'memberId':(await this[_0x56d45c(0x210)]['requireSession'](_0x3eb287))[_0x56d45c(0x1e4)](),'unitId':_0x3eb287,'threadId':_0x353043,'mention':_0x1ee3e6,'content':_0x1a72b4,'replyId':_0x23015d},_0x4912a2=await this['_httpService'][_0x56d45c(0x1c0)](_0x56d45c(0x1ad)+_0x3eb287+'/edit',{'body':_0x477f4b});return!_0x4912a2[_0x56d45c(0x220)]['error']||_0x4912a2['body'][_0x56d45c(0x206)]['code']===0x1;}async['resolveComment'](_0x1ae967){const _0x41ab29=_0x5d02ec,{unitId:_0x322872}=_0x1ae967,_0xe8cd85=_0x1ae967['threadId'],_0x1b1bb8={'memberId':this[_0x41ab29(0x1d4)]['getCurrentUser']()[_0x41ab29(0x1c9)],'unitId':_0x322872,'threadId':_0xe8cd85,'solved':_0x1ae967[_0x41ab29(0x1f9)]?I[_0x41ab29(0x1ea)]:I[_0x41ab29(0x1c4)]},_0x5a0b83=await this[_0x41ab29(0x1d7)][_0x41ab29(0x1c0)]('/universer-api/comment/unit/'+_0x322872+_0x41ab29(0x20e),{'body':_0x1b1bb8});return!_0x5a0b83[_0x41ab29(0x220)][_0x41ab29(0x206)]||_0x5a0b83[_0x41ab29(0x220)]['error'][_0x41ab29(0x1ff)]===0x1;}async['deleteComment'](_0x539c79,_0x22f612,_0xf0245,_0x4819b2){const _0x2bfe42=_0x5d02ec,_0x35a87f={'memberId':(await this[_0x2bfe42(0x210)]['requireSession'](_0x539c79))['getMemberID'](),'threadId':_0xf0245,'replyId':_0x4819b2,'unitId':_0x539c79},_0x53762a=await this[_0x2bfe42(0x1d7)][_0x2bfe42(0x1c0)](_0x2bfe42(0x1ad)+_0x539c79+'/delete',{'body':_0x35a87f});return!_0x53762a[_0x2bfe42(0x220)][_0x2bfe42(0x206)]||_0x53762a[_0x2bfe42(0x220)][_0x2bfe42(0x206)][_0x2bfe42(0x1ff)]===0x1;}async[_0x5d02ec(0x1f4)](_0x552c1d,_0x5a8141,_0x411935){const _0x35bc55=_0x5d02ec,_0x12d9b0={'unitId':_0x552c1d,'threadId':_0x411935},_0x21dd58=await this[_0x35bc55(0x1d7)]['post'](_0x35bc55(0x1ad)+_0x552c1d+'/list',{'body':_0x12d9b0}),_0x4cfba4=_0x411935[_0x35bc55(0x1b6)](_0x16796f=>G(_0x21dd58['body'][_0x35bc55(0x1ed)][_0x16796f],_0x552c1d,_0x5a8141))[_0x35bc55(0x1fa)](Boolean);return Object[_0x35bc55(0x1b8)](_0x21dd58['body'][_0x35bc55(0x1c7)])[_0x35bc55(0x1e8)](_0x399de9=>{const _0x58c4f6=_0x35bc55;this[_0x58c4f6(0x1d4)][_0x58c4f6(0x21d)](_0x399de9);}),_0x4cfba4;}[_0x5d02ec(0x1f0)](_0x2a36b3){const _0x13a458=_0x5d02ec;return{'id':_0x2a36b3['id'],'threadId':_0x2a36b3[_0x13a458(0x1b4)],'ref':_0x2a36b3[_0x13a458(0x1f1)]};}};g=x([_(0x0,c[_0x5d02ec(0x218)](P['HTTPService'])),_(0x1,c[_0x5d02ec(0x218)](c[_0x5d02ec(0x21c)])),_(0x2,c['Inject'](b[_0x5d02ec(0x1af)])),_(0x3,c[_0x5d02ec(0x218)](c[_0x5d02ec(0x1ce)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x3e1714,_0x1fe6cd,_0x2ee22a,_0x2d0bab)=>{for(var _0x42de71=_0x2d0bab>0x1?void 0x0:_0x2d0bab?H(_0x1fe6cd,_0x2ee22a):_0x1fe6cd,_0x3ae959=_0x3e1714['length']-0x1,_0x3de498;_0x3ae959>=0x0;_0x3ae959--)(_0x3de498=_0x3e1714[_0x3ae959])&&(_0x42de71=_0x3de498(_0x42de71)||_0x42de71);return _0x42de71;},y=(_0x16bc8e,_0x305574)=>(_0x5cc98e,_0x2f30ca)=>_0x305574(_0x5cc98e,_0x2f30ca,_0x16bc8e);let C=class extends c[_0x5d02ec(0x1ca)]{constructor(_0x40343a,_0x306af7){const _0x260892=_0x5d02ec;super(),this[_0x260892(0x1ee)]=_0x40343a,this[_0x260892(0x1a3)]=_0x306af7,this['_initDataSource']();}[_0x5d02ec(0x1be)](){const _0x2f1dee=_0x5d02ec;this['_threadCommentDataSourceService'][_0x2f1dee(0x204)]=this[_0x2f1dee(0x1a3)],this[_0x2f1dee(0x1ee)][_0x2f1dee(0x217)]=!0x1;}};C=J([y(0x0,M[_0x5d02ec(0x1d6)]),y(0x1,c['Inject'](g))],C);function _0x1e56(){const _0x13bce2=['pipe','commentUpdate$','_userService','Add','IThreadCommentDataSourceService','_httpService','content','UniverCollaborationClientPlugin','@univerjs/thread-comment','updateComment','_configService','disposeWithMe','CustomRangeType','Edit','symbol','createTimestamp','replyId','customRanges','getMemberID','parentId','rangeType','IConfigService','forEach','@univerjs-pro/collaboration-client','Solved','personId','367616NtdcQV','comments','_threadCommentDataSourceService','getUnit','saveCommentToSnapshot','ref','getComment','4xPEBoL','listComments','UniverThreadCommentUIPlugin','HTTPService','solved','get','resolved','filter','_config','@univerjs/network','stringify','6594994hAQnTg','code','/reply','3067392WSqdzb','add','39889136VUkARf','dataSource','rangeId','error','@univerjs/thread-comment-ui','_init','UniverThreadCommentDataSourcePlugin','resolveComment','UNRECOGNIZED','UniverInstanceType','setConfig','/solved','Unknown','_sessionService','root','deleteComment','2429555gDsQKd','unitId','type','@univerjs/core','syncUpdateMutationToColla','Inject','Reply','reply','Module','UserManagerService','addUser','YYYY/MM/DD\x20HH:mm','rxjs','body','_threadCommentDataSource','Delete','slice','replies','pluginName','_threadCommentModel','4078410Zvdtkb','dayjs','_commentService','UNIVER_UNKNOWN','/universer-api/comment/unit/','requireSession','CollaborationSessionService','thread-comment-data-source.config','COMMENT','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','CommentService','map','parse','values','ThreadCommentModel','length','getOwnPropertyDescriptor','DependentOn','toStringTag','_initDataSource','addComment','post','/add','subscribe','_injector','OpenOrReOpen','onStarting','defineProperty','users','payload','userID','Disposable','1963852ihyWmh','userId','user','Injector','find','Solve','_initUserSync'];_0x1e56=function(){return _0x13bce2;};return _0x1e56();}var F=Object[_0x5d02ec(0x1c6)],L=Object[_0x5d02ec(0x1bb)],Z=(_0x5b0569,_0x30c882,_0x4259e8)=>_0x30c882 in _0x5b0569?F(_0x5b0569,_0x30c882,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4259e8}):_0x5b0569[_0x30c882]=_0x4259e8,W=(_0x2a6035,_0x3b9777,_0xa6133f,_0x5353e2)=>{const _0x2d9e99=_0x5d02ec;for(var _0x5b1c3b=_0x5353e2>0x1?void 0x0:_0x5353e2?L(_0x3b9777,_0xa6133f):_0x3b9777,_0x3f384a=_0x2a6035[_0x2d9e99(0x1ba)]-0x1,_0x5a7742;_0x3f384a>=0x0;_0x3f384a--)(_0x5a7742=_0x2a6035[_0x3f384a])&&(_0x5b1c3b=_0x5a7742(_0x5b1c3b)||_0x5b1c3b);return _0x5b1c3b;},O=(_0x3d6130,_0x352416)=>(_0xdf4723,_0x4306d9)=>_0x352416(_0xdf4723,_0x4306d9,_0x3d6130),N=(_0x5646df,_0x423c8e,_0x16c98b)=>Z(_0x5646df,typeof _0x423c8e!=_0x5d02ec(0x1e0)?_0x423c8e+'':_0x423c8e,_0x16c98b);exports[_0x5d02ec(0x209)]=class extends c['Plugin']{constructor(_0x4cb070=D,_0x16ebf3,_0xf8b324){const _0x5533c2=_0x5d02ec;super(),this['_config']=_0x4cb070,this['_injector']=_0x16ebf3,this['_configService']=_0xf8b324;const {..._0x4e87c1}=c['merge']({},D,this[_0x5533c2(0x1fb)]);this[_0x5533c2(0x1dc)][_0x5533c2(0x20d)](q,_0x4e87c1);}[_0x5d02ec(0x1c5)](){[[g],[C],[p]]['forEach'](_0x1b583b=>{const _0x23b6ef=_0xe297;this[_0x23b6ef(0x1c3)][_0x23b6ef(0x202)](_0x1b583b);});}['onReady'](){const _0x2f1025=_0x5d02ec;this[_0x2f1025(0x1c3)][_0x2f1025(0x1f8)](C),this['_injector'][_0x2f1025(0x1f8)](p);}},N(exports[_0x5d02ec(0x209)],_0x5d02ec(0x1a7),U),N(exports[_0x5d02ec(0x209)],_0x5d02ec(0x215),c[_0x5d02ec(0x20c)][_0x5d02ec(0x1ac)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x5d02ec(0x1bc)](j[_0x5d02ec(0x1f5)],b[_0x5d02ec(0x1d9)],T['UniverLicensePlugin']),O(0x1,c[_0x5d02ec(0x218)](c[_0x5d02ec(0x1ce)])),O(0x2,c[_0x5d02ec(0x1e7)])],exports[_0x5d02ec(0x209)]);
|
|
1
|
+
'use strict';const _0x3dcb11=_0x59b2;(function(_0x1e9715,_0x1180a5){const _0x4ebcc8=_0x59b2,_0x43014f=_0x1e9715();while(!![]){try{const _0x423da8=-parseInt(_0x4ebcc8(0x13a))/0x1*(parseInt(_0x4ebcc8(0x139))/0x2)+parseInt(_0x4ebcc8(0x111))/0x3+parseInt(_0x4ebcc8(0xd0))/0x4*(-parseInt(_0x4ebcc8(0x11e))/0x5)+parseInt(_0x4ebcc8(0x121))/0x6+parseInt(_0x4ebcc8(0xef))/0x7+-parseInt(_0x4ebcc8(0x115))/0x8+parseInt(_0x4ebcc8(0x136))/0x9*(parseInt(_0x4ebcc8(0xd4))/0xa);if(_0x423da8===_0x1180a5)break;else _0x43014f['push'](_0x43014f['shift']());}catch(_0x2184b5){_0x43014f['push'](_0x43014f['shift']());}}}(_0x1a7b,0x657b0));Object[_0x3dcb11(0xd5)](exports,Symbol[_0x3dcb11(0x128)],{'value':_0x3dcb11(0xd6)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x3dcb11(0x12f)),M=require('@univerjs/thread-comment'),w=require(_0x3dcb11(0x10c)),P=require('@univerjs/network'),U=_0x3dcb11(0x11a);var I=(_0x248d05=>(_0x248d05[_0x248d05['OpenOrReOpen']=0x0]=_0x3dcb11(0x104),_0x248d05[_0x248d05[_0x3dcb11(0x134)]=0x1]=_0x3dcb11(0x134),_0x248d05[_0x248d05[_0x3dcb11(0x122)]=-0x1]=_0x3dcb11(0x122),_0x248d05))(I||{}),v=(_0x4cbf71=>(_0x4cbf71[_0x4cbf71['Unknown']=0x0]=_0x3dcb11(0xf1),_0x4cbf71[_0x4cbf71[_0x3dcb11(0x140)]=0x1]='Add',_0x4cbf71[_0x4cbf71[_0x3dcb11(0x101)]=0x2]=_0x3dcb11(0x101),_0x4cbf71[_0x4cbf71[_0x3dcb11(0x147)]=0x3]=_0x3dcb11(0x147),_0x4cbf71[_0x4cbf71[_0x3dcb11(0xfe)]=0x4]=_0x3dcb11(0xfe),_0x4cbf71[_0x4cbf71[_0x3dcb11(0x138)]=0x5]=_0x3dcb11(0x138),_0x4cbf71[_0x4cbf71['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4cbf71))(v||{});const f=_0x4c139d=>c['dayjs'](new Date(+_0x4c139d))['format'](_0x3dcb11(0x112)),R=async(_0x157bc4,_0x3d52c6)=>{const _0xaf0406=_0x3dcb11,_0x13dc60=_0x157bc4[_0xaf0406(0xed)](c['UserManagerService']),_0x4a408d=_0x157bc4[_0xaf0406(0xed)](P[_0xaf0406(0xe8)]);_0x3d52c6[_0xaf0406(0xfc)](_0xb37b6d=>{const _0x2bf29d=_0xaf0406;_0x13dc60[_0x2bf29d(0xf8)](_0xb37b6d)&&_0x3d52c6[_0x2bf29d(0x11f)](_0xb37b6d);}),_0x3d52c6[_0xaf0406(0xdc)]&&(await _0x4a408d[_0xaf0406(0xed)](_0xaf0406(0x13c),{'params':{'userIDs':[..._0x3d52c6]}}))[_0xaf0406(0x11b)]['users'][_0xaf0406(0xfc)](_0x26fd30=>{const _0x519436=_0xaf0406;_0x26fd30&&_0x13dc60[_0x519436(0xda)](_0x26fd30);});};var $=Object[_0x3dcb11(0x106)],E=(_0x5e6bdb,_0x1a12e8,_0x22f6e4,_0x423fd3)=>{const _0x20dcc6=_0x3dcb11;for(var _0xe41c9a=_0x423fd3>0x1?void 0x0:_0x423fd3?$(_0x1a12e8,_0x22f6e4):_0x1a12e8,_0x504a3c=_0x5e6bdb[_0x20dcc6(0x13f)]-0x1,_0x2c4a61;_0x504a3c>=0x0;_0x504a3c--)(_0x2c4a61=_0x5e6bdb[_0x504a3c])&&(_0xe41c9a=_0x2c4a61(_0xe41c9a)||_0xe41c9a);return _0xe41c9a;},S=(_0x139fd7,_0x29d9b9)=>(_0xe98ad4,_0x464853)=>_0x29d9b9(_0xe98ad4,_0x464853,_0x139fd7);function _0x1a7b(){const _0x22896c=['type','content','payload','DependentOn','_threadCommentDataSource','CollaborationSessionService','IThreadCommentDataSourceService','onReady','HTTPService','deleteComment','unitId','replies','bufferTime','get','dataSource','4172798EBKQfI','thread-comment-data-source.config','Unknown','_threadCommentDataSourceService','_injector','format','replyId','updateComment','customRanges','getUser','Plugin','UserManagerService','_configService','forEach','userId','Delete','filter','parentId','Reply','personId','CustomRangeType','OpenOrReOpen','Inject','getOwnPropertyDescriptor','user','subscribe','_sessionService','resolveComment','rangeType','rxjs','pipe','parse','_init','_userService','406428sMYpnz','YYYY/MM/DD\x20HH:mm','slice','listComments','599904LYKQqV','_initUserSync','stringify','UniverThreadCommentDataSourcePlugin','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','error','createTimestamp','5dsIDQS','delete','COMMENT','896340GHksYI','UNRECOGNIZED','/reply','Injector','ref','requireSession','/solved','toStringTag','_initDataSource','userID','root','post','find','addComment','@univerjs/thread-comment-ui','add','values','_threadCommentModel','/universer-api/comment/unit/','Solved','getUnit','9qJOcFR','ThreadCommentModel','Solve','6qAbPOs','42690ZuTKrq','setConfig','/universer-api/user/list','UniverThreadCommentUIPlugin','code','length','Add','commentUpdate$','UniverInstanceType','_commentService','rangeId','/add','saveCommentToSnapshot','Edit','threadId','disposeWithMe','/delete','getMemberID','/edit','3006196LLYJYy','_config','pluginName','Disposable','4892910JsphYW','defineProperty','Module','merge','/list','UniverLicensePlugin','addUser','resolved','size','_httpService','getCurrentUser','map'];_0x1a7b=function(){return _0x22896c;};return _0x1a7b();}let p=class extends c['Disposable']{constructor(_0x2a54e8,_0x18d0fd,_0x1b0ba0,_0x449fa7){const _0x4f4add=_0x3dcb11;super(),this[_0x4f4add(0x143)]=_0x2a54e8,this['_threadCommentModel']=_0x18d0fd,this[_0x4f4add(0x110)]=_0x1b0ba0,this[_0x4f4add(0xf3)]=_0x449fa7,this[_0x4f4add(0x10f)](),this[_0x4f4add(0x116)]();}[_0x3dcb11(0x116)](){const _0x43c810=_0x3dcb11;this[_0x43c810(0xcc)](this['_threadCommentModel'][_0x43c810(0x141)][_0x43c810(0x10d)](w[_0x43c810(0xec)](0x10))[_0x43c810(0x108)](_0x4234ca=>{const _0x2468c7=_0x43c810,_0x3489ba=new Set();_0x4234ca['forEach'](_0x1d1f24=>{const _0x11c734=_0x59b2;switch(_0x1d1f24['type']){case _0x11c734(0x130):{const _0x546147=_0x1d1f24[_0x11c734(0xe2)][_0x11c734(0x102)];_0x3489ba['add'](_0x546147);break;}}}),R(this[_0x2468c7(0xf3)],_0x3489ba);}));}['_init'](){const _0x2b6e86=_0x3dcb11;this[_0x2b6e86(0xcc)](this['_commentService'][_0x2b6e86(0x141)][_0x2b6e86(0x108)](async _0x3837ea=>{const _0x2767dd=_0x2b6e86;var _0x3005e9,_0x5a36cf,_0x5f12b5,_0x11ae9f;const _0x567c9b=(_0x3005e9=this['_threadCommentModel']['getUnit'](_0x3837ea['unitId'])[_0x2767dd(0x12d)](_0x4f4955=>_0x4f4955[_0x2767dd(0x148)]===_0x3837ea['threadId']))==null?void 0x0:_0x3005e9[_0x2767dd(0x12b)];if(!_0x567c9b)return;const {unitId:_0x4d7253,subUnitId:_0x104c38}=_0x567c9b;switch(_0x3837ea[_0x2767dd(0x107)]&&this['_userService'][_0x2767dd(0xda)](_0x3837ea[_0x2767dd(0x107)]),_0x3837ea[_0x2767dd(0xe0)]){case v[_0x2767dd(0x140)]:break;case v['Reply']:{this[_0x2767dd(0x132)]['addComment'](_0x4d7253,_0x104c38,{'unitId':_0x4d7253,'subUnitId':_0x104c38,'ref':'','id':_0x3837ea[_0x2767dd(0xf5)],'dT':f(+_0x3837ea['createTimestamp']),'threadId':_0x3837ea[_0x2767dd(0x148)],'personId':(_0x5f12b5=(_0x5a36cf=_0x3837ea[_0x2767dd(0x107)])==null?void 0x0:_0x5a36cf[_0x2767dd(0x12a)])!=null?_0x5f12b5:_0x3837ea['userId'],'text':JSON[_0x2767dd(0x10e)](_0x3837ea[_0x2767dd(0xe1)]),'parentId':_0x567c9b['id']});break;}case v['Delete']:{const _0x3c85d7=this[_0x2767dd(0x132)]['getComment'](_0x4d7253,_0x104c38,_0x3837ea[_0x2767dd(0xf5)]);_0x3c85d7&&_0x3c85d7[_0x2767dd(0x100)]&&this['_threadCommentModel'][_0x2767dd(0xe9)](_0x4d7253,_0x104c38,_0x3837ea[_0x2767dd(0xf5)]);break;}case v[_0x2767dd(0x147)]:{this[_0x2767dd(0x132)]['updateComment'](_0x4d7253,_0x104c38,{'commentId':_0x3837ea[_0x2767dd(0xf5)],'text':JSON[_0x2767dd(0x10e)](_0x3837ea['content'])});break;}case v[_0x2767dd(0x138)]:{const _0x38d723=(_0x11ae9f=this[_0x2767dd(0x132)][_0x2767dd(0x135)](_0x3837ea[_0x2767dd(0xea)])[_0x2767dd(0x12d)](_0x5cde3a=>_0x5cde3a[_0x2767dd(0x148)]===_0x3837ea[_0x2767dd(0x148)]))==null?void 0x0:_0x11ae9f[_0x2767dd(0x12b)];_0x38d723&&this['_threadCommentModel'][_0x2767dd(0x10a)](_0x4d7253,_0x104c38,_0x38d723['id'],_0x3837ea[_0x2767dd(0x119)]===I[_0x2767dd(0x134)]);break;}}}));}};p=E([S(0x0,c[_0x3dcb11(0x105)](b['CommentService'])),S(0x1,c[_0x3dcb11(0x105)](M[_0x3dcb11(0x137)])),S(0x2,c['Inject'](c[_0x3dcb11(0xfa)])),S(0x3,c[_0x3dcb11(0x105)](c[_0x3dcb11(0x124)]))],p);const q=_0x3dcb11(0xf0),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x90cf5d,_0x1ed1a1,_0x510cf8,_0x5b2300)=>{const _0x12a4fe=_0x3dcb11;for(var _0x4a3b32=_0x5b2300>0x1?void 0x0:_0x5b2300?A(_0x1ed1a1,_0x510cf8):_0x1ed1a1,_0x464ae4=_0x90cf5d[_0x12a4fe(0x13f)]-0x1,_0x465bee;_0x464ae4>=0x0;_0x464ae4--)(_0x465bee=_0x90cf5d[_0x464ae4])&&(_0x4a3b32=_0x465bee(_0x4a3b32)||_0x4a3b32);return _0x4a3b32;},_=(_0x23b0b9,_0x402ce3)=>(_0x4101dc,_0x3eafac)=>_0x402ce3(_0x4101dc,_0x3eafac,_0x23b0b9);function Y(_0x22f404,_0xeb542e){const _0xf859ab=_0x3dcb11,_0x4f8ff5=_0x22f404[_0xf859ab(0xeb)][0x0];return{..._0xeb542e,'id':_0x4f8ff5['replyId'],'resolved':_0x22f404[_0xf859ab(0x119)]===0x1,'dT':f(_0x4f8ff5[_0xf859ab(0x11d)]),'personId':_0x4f8ff5[_0xf859ab(0xfd)],'threadId':_0x4f8ff5[_0xf859ab(0x148)]};}function G(_0x4c1eed,_0x31a3fc,_0x57fbfd){const _0x31a4ee=_0x3dcb11;var _0x2dbacd,_0x3ffc2d;if(((_0x3ffc2d=(_0x2dbacd=_0x4c1eed==null?void 0x0:_0x4c1eed[_0x31a4ee(0xeb)])==null?void 0x0:_0x2dbacd[_0x31a4ee(0x13f)])!=null?_0x3ffc2d:0x0)>0x0){const _0x9bac7f=(_0x2df094,_0x79c901)=>({'id':_0x2df094['replyId'],'threadId':_0x2df094[_0x31a4ee(0x148)],'dT':f(_0x2df094[_0x31a4ee(0x11d)]),'personId':_0x2df094[_0x31a4ee(0xfd)],'resolved':_0x4c1eed['solved']===I['Solved'],'unitId':_0x31a3fc,'subUnitId':_0x57fbfd,'text':JSON['parse'](_0x2df094[_0x31a4ee(0xe1)]),'parentId':_0x79c901}),_0x442b19=_0x9bac7f(_0x4c1eed['replies'][0x0]);return{..._0x442b19,'children':_0x4c1eed['replies'][_0x31a4ee(0x113)](0x1)[_0x31a4ee(0xdf)](_0x47590b=>_0x9bac7f(_0x47590b,_0x442b19['id']))};}return null;}let g=class{constructor(_0x1485d6,_0x1f1074,_0x174298,_0x47832b){const _0x2ab9e4=_0x3dcb11;this['_httpService']=_0x1485d6,this[_0x2ab9e4(0x110)]=_0x1f1074,this['_sessionService']=_0x174298,this[_0x2ab9e4(0xf3)]=_0x47832b;}async[_0x3dcb11(0x12e)](_0x54a18a){const _0xbf09cf=_0x3dcb11;var _0x518592,_0x3582e7;const {parentId:_0x4cd967,unitId:_0x57a8f1,text:_0x169f75,threadId:_0x10251a}=_0x54a18a,_0x466339=(_0x3582e7=(_0x518592=_0x169f75[_0xbf09cf(0xf7)])==null?void 0x0:_0x518592['filter'](_0x2b7241=>_0x2b7241[_0xbf09cf(0x10b)]===c[_0xbf09cf(0x103)][_0xbf09cf(0x120)])['map'](_0x617c43=>_0x617c43['rangeId']))!=null?_0x3582e7:[],_0x564a3e=JSON['stringify'](_0x169f75),_0x6c491f=(await this[_0xbf09cf(0x109)][_0xbf09cf(0x126)](_0x57a8f1))['getMemberID']();if(_0x4cd967){const _0x1c00da={'memberId':_0x6c491f,'unitId':_0x57a8f1,'content':_0x564a3e,'mention':_0x466339,'threadId':_0x10251a},_0x2a5af4=(await this['_httpService']['post'](_0xbf09cf(0x133)+_0x57a8f1+_0xbf09cf(0x123),{'body':_0x1c00da}))[_0xbf09cf(0x11b)]['reply'];return{..._0x54a18a,'id':_0x2a5af4['replyId'],'dT':c['dayjs'](+_0x2a5af4[_0xbf09cf(0x11d)])[_0xbf09cf(0xf4)](_0xbf09cf(0x112)),'personId':_0x2a5af4['userId']};}else{const _0x47b6f0={'memberId':_0x6c491f,'unitId':_0x57a8f1,'content':_0x564a3e,'mention':_0x466339},_0x19875d=await this[_0xbf09cf(0xdd)][_0xbf09cf(0x12c)](_0xbf09cf(0x133)+_0x57a8f1+_0xbf09cf(0x145),{'body':_0x47b6f0});return Y(_0x19875d['body']['comment'],_0x54a18a);}}async[_0x3dcb11(0xf6)](_0xef9d57){const _0x3adb24=_0x3dcb11;var _0x203a21,_0xdc4244;const {text:_0x362f1b,unitId:_0x331956}=_0xef9d57,_0x5d6cac=(_0xdc4244=(_0x203a21=_0x362f1b[_0x3adb24(0xf7)])==null?void 0x0:_0x203a21[_0x3adb24(0xff)](_0x18e030=>_0x18e030[_0x3adb24(0x10b)]===c['CustomRangeType'][_0x3adb24(0x120)])[_0x3adb24(0xdf)](_0x49b435=>_0x49b435[_0x3adb24(0x144)]))!=null?_0xdc4244:[],_0x27550b=JSON[_0x3adb24(0x117)](_0x362f1b),_0x4363c1=_0xef9d57[_0x3adb24(0x148)],_0x234413=_0xef9d57['id'],_0x1e221a={'memberId':(await this[_0x3adb24(0x109)]['requireSession'](_0x331956))[_0x3adb24(0xce)](),'unitId':_0x331956,'threadId':_0x4363c1,'mention':_0x5d6cac,'content':_0x27550b,'replyId':_0x234413},_0x324b35=await this['_httpService'][_0x3adb24(0x12c)](_0x3adb24(0x133)+_0x331956+_0x3adb24(0xcf),{'body':_0x1e221a});return!_0x324b35[_0x3adb24(0x11b)][_0x3adb24(0x11c)]||_0x324b35['body'][_0x3adb24(0x11c)][_0x3adb24(0x13e)]===0x1;}async[_0x3dcb11(0x10a)](_0x34cc25){const _0x57ea94=_0x3dcb11,{unitId:_0x3ce1c5}=_0x34cc25,_0x3daa18=_0x34cc25[_0x57ea94(0x148)],_0x5ab3a3={'memberId':this[_0x57ea94(0x110)][_0x57ea94(0xde)]()['userID'],'unitId':_0x3ce1c5,'threadId':_0x3daa18,'solved':_0x34cc25[_0x57ea94(0xdb)]?I['Solved']:I[_0x57ea94(0x104)]},_0x3e30d4=await this['_httpService'][_0x57ea94(0x12c)]('/universer-api/comment/unit/'+_0x3ce1c5+_0x57ea94(0x127),{'body':_0x5ab3a3});return!_0x3e30d4['body'][_0x57ea94(0x11c)]||_0x3e30d4['body'][_0x57ea94(0x11c)][_0x57ea94(0x13e)]===0x1;}async[_0x3dcb11(0xe9)](_0x2af2ed,_0x32fec8,_0x574bd8,_0x208180){const _0xf4d5fd=_0x3dcb11,_0x4060e7={'memberId':(await this['_sessionService'][_0xf4d5fd(0x126)](_0x2af2ed))[_0xf4d5fd(0xce)](),'threadId':_0x574bd8,'replyId':_0x208180,'unitId':_0x2af2ed},_0x528e02=await this[_0xf4d5fd(0xdd)][_0xf4d5fd(0x12c)](_0xf4d5fd(0x133)+_0x2af2ed+_0xf4d5fd(0xcd),{'body':_0x4060e7});return!_0x528e02[_0xf4d5fd(0x11b)][_0xf4d5fd(0x11c)]||_0x528e02[_0xf4d5fd(0x11b)][_0xf4d5fd(0x11c)][_0xf4d5fd(0x13e)]===0x1;}async[_0x3dcb11(0x114)](_0xbb04cc,_0x58dbc3,_0x29728b){const _0x2c0a89=_0x3dcb11,_0x328ec8={'unitId':_0xbb04cc,'threadId':_0x29728b},_0x38c62f=await this[_0x2c0a89(0xdd)]['post'](_0x2c0a89(0x133)+_0xbb04cc+_0x2c0a89(0xd8),{'body':_0x328ec8}),_0x4b1e18=_0x29728b[_0x2c0a89(0xdf)](_0x47dfef=>G(_0x38c62f['body']['comments'][_0x47dfef],_0xbb04cc,_0x58dbc3))['filter'](Boolean);return Object[_0x2c0a89(0x131)](_0x38c62f[_0x2c0a89(0x11b)]['users'])['forEach'](_0x134852=>{const _0x19c06a=_0x2c0a89;this[_0x19c06a(0x110)]['addUser'](_0x134852);}),_0x4b1e18;}[_0x3dcb11(0x146)](_0x13b9b7){const _0x2dc085=_0x3dcb11;return{'id':_0x13b9b7['id'],'threadId':_0x13b9b7[_0x2dc085(0x148)],'ref':_0x13b9b7[_0x2dc085(0x125)]};}};g=x([_(0x0,c[_0x3dcb11(0x105)](P[_0x3dcb11(0xe8)])),_(0x1,c[_0x3dcb11(0x105)](c[_0x3dcb11(0xfa)])),_(0x2,c[_0x3dcb11(0x105)](b[_0x3dcb11(0xe5)])),_(0x3,c[_0x3dcb11(0x105)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x33b354,_0x119437,_0x551fa7,_0x1f5175)=>{for(var _0x10a948=_0x1f5175>0x1?void 0x0:_0x1f5175?H(_0x119437,_0x551fa7):_0x119437,_0xbd776b=_0x33b354['length']-0x1,_0x37bf0e;_0xbd776b>=0x0;_0xbd776b--)(_0x37bf0e=_0x33b354[_0xbd776b])&&(_0x10a948=_0x37bf0e(_0x10a948)||_0x10a948);return _0x10a948;},y=(_0x53319d,_0x172c60)=>(_0x30e23c,_0x1b334c)=>_0x172c60(_0x30e23c,_0x1b334c,_0x53319d);let C=class extends c[_0x3dcb11(0xd3)]{constructor(_0x4a4e2d,_0xfef82a){const _0x5ea737=_0x3dcb11;super(),this[_0x5ea737(0xf2)]=_0x4a4e2d,this[_0x5ea737(0xe4)]=_0xfef82a,this[_0x5ea737(0x129)]();}[_0x3dcb11(0x129)](){const _0x5c700e=_0x3dcb11;this[_0x5c700e(0xf2)][_0x5c700e(0xee)]=this[_0x5c700e(0xe4)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x3dcb11(0xe6)]),y(0x1,c[_0x3dcb11(0x105)](g))],C);function _0x59b2(_0x4ebee6,_0xa70394){const _0x1a7b68=_0x1a7b();return _0x59b2=function(_0x59b2c4,_0x26be73){_0x59b2c4=_0x59b2c4-0xcc;let _0xa5a8d=_0x1a7b68[_0x59b2c4];return _0xa5a8d;},_0x59b2(_0x4ebee6,_0xa70394);}var F=Object[_0x3dcb11(0xd5)],L=Object[_0x3dcb11(0x106)],Z=(_0x149cae,_0x57b009,_0x44b36e)=>_0x57b009 in _0x149cae?F(_0x149cae,_0x57b009,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x44b36e}):_0x149cae[_0x57b009]=_0x44b36e,W=(_0x7755de,_0x13961d,_0x33e352,_0xb31ec0)=>{const _0x323578=_0x3dcb11;for(var _0x2078ab=_0xb31ec0>0x1?void 0x0:_0xb31ec0?L(_0x13961d,_0x33e352):_0x13961d,_0x5c9eb9=_0x7755de[_0x323578(0x13f)]-0x1,_0x4ceb3b;_0x5c9eb9>=0x0;_0x5c9eb9--)(_0x4ceb3b=_0x7755de[_0x5c9eb9])&&(_0x2078ab=_0x4ceb3b(_0x2078ab)||_0x2078ab);return _0x2078ab;},O=(_0x11c475,_0x3f8857)=>(_0x17f6fd,_0x33566d)=>_0x3f8857(_0x17f6fd,_0x33566d,_0x11c475),N=(_0x2d9e6b,_0x59f948,_0x23506e)=>Z(_0x2d9e6b,typeof _0x59f948!='symbol'?_0x59f948+'':_0x59f948,_0x23506e);exports[_0x3dcb11(0x118)]=class extends c[_0x3dcb11(0xf9)]{constructor(_0x3d45f6=D,_0x32626a,_0x4534f6){const _0x21e275=_0x3dcb11;super(),this[_0x21e275(0xd1)]=_0x3d45f6,this[_0x21e275(0xf3)]=_0x32626a,this[_0x21e275(0xfb)]=_0x4534f6;const {..._0x5e2511}=c[_0x21e275(0xd7)]({},D,this['_config']);this[_0x21e275(0xfb)][_0x21e275(0x13b)](q,_0x5e2511);}['onStarting'](){[[g],[C],[p]]['forEach'](_0x997c9b=>{const _0x32215d=_0x59b2;this[_0x32215d(0xf3)][_0x32215d(0x130)](_0x997c9b);});}[_0x3dcb11(0xe7)](){const _0x2a5ca0=_0x3dcb11;this['_injector']['get'](C),this[_0x2a5ca0(0xf3)][_0x2a5ca0(0xed)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3dcb11(0xd2),U),N(exports[_0x3dcb11(0x118)],_0x3dcb11(0xe0),c[_0x3dcb11(0x142)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3dcb11(0xe3)](j[_0x3dcb11(0x13d)],b['UniverCollaborationClientPlugin'],T[_0x3dcb11(0xd9)]),O(0x1,c[_0x3dcb11(0x105)](c[_0x3dcb11(0x124)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2275(){const _0x56d4b9=['Add','add','content','/reply','Solve','reply','unitId','Solved','threadId','_httpService','symbol','comment','userID','253QReFUC','delete','commentUpdate$','type','updateComment','Unknown','UNRECOGNIZED','_userService','code','userId','setConfig','length','personId','thread-comment-data-source.config','_threadCommentDataSource','_threadCommentModel','root','_threadCommentDataSourceService','listComments','191336USqwud','_commentService','onReady','addUser','forEach','ref','addComment','/delete','_config','1124870rmrFxb','COMMENT','getUser','Delete','defineProperty','4322608vomhIo','_initDataSource','body','351DbRNoq','parentId','OpenOrReOpen','getOwnPropertyDescriptor','/universer-api/comment/unit/','_init','YYYY/MM/DD\x20HH:mm','Edit','resolveComment','dataSource','_injector','505595reZdMi','/universer-api/user/list','user','_initUserSync','_sessionService','find','deleteComment','post','/add','users','disposeWithMe','resolved','size','map','554603lzaMdA','error','createTimestamp','parse','solved','pluginName','rangeId','requireSession','getMemberID','customRanges','12IEkehV','get','/edit','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','/list','replyId','3021621NWYnnv','stringify','slice','subscribe','saveCommentToSnapshot','getUnit','replies','Reply','onStarting','275vNKQdW','6170IslTGv'];_0x2275=function(){return _0x56d4b9;};return _0x2275();}const _0xefaff3=_0x2d93;(function(_0x4eb663,_0x1d2089){const _0xfc2230=_0x2d93,_0x58aba0=_0x4eb663();while(!![]){try{const _0x37d4af=-parseInt(_0xfc2230(0x15f))/0x1*(-parseInt(_0xfc2230(0x151))/0x2)+-parseInt(_0xfc2230(0x147))/0x3+-parseInt(_0xfc2230(0x180))/0x4+parseInt(_0xfc2230(0x18e))/0x5*(parseInt(_0xfc2230(0x13f))/0x6)+-parseInt(_0xfc2230(0x135))/0x7+parseInt(_0xfc2230(0x172))/0x8*(-parseInt(_0xfc2230(0x183))/0x9)+-parseInt(_0xfc2230(0x17b))/0xa*(-parseInt(_0xfc2230(0x150))/0xb);if(_0x37d4af===_0x1d2089)break;else _0x58aba0['push'](_0x58aba0['shift']());}catch(_0x5032f6){_0x58aba0['push'](_0x58aba0['shift']());}}}(_0x2275,0xa9b1b));import{CommentService as _0x4ad9f1,CollaborationSessionService as _0x5726d5,UniverCollaborationClientPlugin as _0x2fcc32}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x284470}from'@univerjs-pro/license';import{dayjs as _0x4199e0,UserManagerService as _0xd3379f,Inject as _0x40490c,Injector as _0x100826,Disposable as _0x1f5f44,CustomRangeType as _0x13aff8,UniverInstanceType as _0x22b868,DependentOn as _0x270703,IConfigService as _0xd1cd58,Plugin as _0x5cb9ba,merge as _0x26e2b6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4e029e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43db83,IThreadCommentDataSourceService as _0x145ab4}from'@univerjs/thread-comment';import{bufferTime as _0x3bb7ff}from'rxjs';import{HTTPService as _0x11266b}from'@univerjs/network';const W=_0xefaff3(0x143);var I=(_0x57ad6a=>(_0x57ad6a[_0x57ad6a[_0xefaff3(0x185)]=0x0]=_0xefaff3(0x185),_0x57ad6a[_0x57ad6a[_0xefaff3(0x159)]=0x1]=_0xefaff3(0x159),_0x57ad6a[_0x57ad6a[_0xefaff3(0x165)]=-0x1]=_0xefaff3(0x165),_0x57ad6a))(I||{}),v=(_0x39432e=>(_0x39432e[_0x39432e[_0xefaff3(0x164)]=0x0]=_0xefaff3(0x164),_0x39432e[_0x39432e['Add']=0x1]=_0xefaff3(0x152),_0x39432e[_0x39432e['Reply']=0x2]=_0xefaff3(0x14e),_0x39432e[_0x39432e['Edit']=0x3]=_0xefaff3(0x18a),_0x39432e[_0x39432e['Delete']=0x4]=_0xefaff3(0x17e),_0x39432e[_0x39432e['Solve']=0x5]='Solve',_0x39432e[_0x39432e[_0xefaff3(0x165)]=-0x1]=_0xefaff3(0x165),_0x39432e))(v||{});const D=_0x1acb2e=>_0x4199e0(new Date(+_0x1acb2e))[_0xefaff3(0x144)](_0xefaff3(0x189)),B=async(_0x5def2c,_0x1d9ada)=>{const _0x44dc56=_0xefaff3,_0x28ebbc=_0x5def2c[_0x44dc56(0x140)](_0xd3379f),_0x550e21=_0x5def2c['get'](_0x11266b);_0x1d9ada['forEach'](_0x5c3f9c=>{const _0x3b7754=_0x44dc56;_0x28ebbc[_0x3b7754(0x17d)](_0x5c3f9c)&&_0x1d9ada[_0x3b7754(0x160)](_0x5c3f9c);}),_0x1d9ada[_0x44dc56(0x133)]&&(await _0x550e21['get'](_0x44dc56(0x18f),{'params':{'userIDs':[..._0x1d9ada]}}))['body'][_0x44dc56(0x130)][_0x44dc56(0x176)](_0x35e3d8=>{const _0x215573=_0x44dc56;_0x35e3d8&&_0x28ebbc[_0x215573(0x175)](_0x35e3d8);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x56cf4c,_0x4c44f6,_0x5dbe02,_0x4939e0)=>{const _0x4f2059=_0xefaff3;for(var _0x326905=_0x4939e0>0x1?void 0x0:_0x4939e0?K(_0x4c44f6,_0x5dbe02):_0x4c44f6,_0x4b8f39=_0x56cf4c[_0x4f2059(0x16a)]-0x1,_0x7b4b5f;_0x4b8f39>=0x0;_0x4b8f39--)(_0x7b4b5f=_0x56cf4c[_0x4b8f39])&&(_0x326905=_0x7b4b5f(_0x326905)||_0x326905);return _0x326905;},p=(_0x4c79c7,_0x57591f)=>(_0x2147d5,_0x16ce9c)=>_0x57591f(_0x2147d5,_0x16ce9c,_0x4c79c7);let S=class extends _0x1f5f44{constructor(_0x2d9529,_0x48f810,_0xf97f2f,_0x3e2811){const _0x54b925=_0xefaff3;super(),this[_0x54b925(0x173)]=_0x2d9529,this[_0x54b925(0x16e)]=_0x48f810,this['_userService']=_0xf97f2f,this['_injector']=_0x3e2811,this[_0x54b925(0x188)](),this[_0x54b925(0x191)]();}[_0xefaff3(0x191)](){const _0x4477f8=_0xefaff3;this[_0x4477f8(0x131)](this[_0x4477f8(0x16e)][_0x4477f8(0x161)]['pipe'](_0x3bb7ff(0x10))['subscribe'](_0x589861=>{const _0x31546d=_0x4477f8,_0x1fdce2=new Set();_0x589861[_0x31546d(0x176)](_0x467468=>{const _0xe48d0e=_0x31546d;switch(_0x467468[_0xe48d0e(0x162)]){case _0xe48d0e(0x153):{const _0x3f756a=_0x467468['payload'][_0xe48d0e(0x16b)];_0x1fdce2['add'](_0x3f756a);break;}}}),B(this[_0x31546d(0x18d)],_0x1fdce2);}));}['_init'](){const _0x924b37=_0xefaff3;this[_0x924b37(0x131)](this[_0x924b37(0x173)]['commentUpdate$'][_0x924b37(0x14a)](async _0x5c33de=>{const _0x3a5a2f=_0x924b37;var _0x432bc9,_0x1bfba0,_0x534bf6,_0x2716bb;const _0x1dbfda=(_0x432bc9=this['_threadCommentModel'][_0x3a5a2f(0x14c)](_0x5c33de[_0x3a5a2f(0x158)])['find'](_0x114ed2=>_0x114ed2[_0x3a5a2f(0x15a)]===_0x5c33de[_0x3a5a2f(0x15a)]))==null?void 0x0:_0x432bc9[_0x3a5a2f(0x16f)];if(!_0x1dbfda)return;const {unitId:_0x44d866,subUnitId:_0x4e9bc7}=_0x1dbfda;switch(_0x5c33de['user']&&this[_0x3a5a2f(0x166)][_0x3a5a2f(0x175)](_0x5c33de['user']),_0x5c33de[_0x3a5a2f(0x162)]){case v[_0x3a5a2f(0x152)]:break;case v[_0x3a5a2f(0x14e)]:{this['_threadCommentModel'][_0x3a5a2f(0x178)](_0x44d866,_0x4e9bc7,{'unitId':_0x44d866,'subUnitId':_0x4e9bc7,'ref':'','id':_0x5c33de[_0x3a5a2f(0x146)],'dT':D(+_0x5c33de[_0x3a5a2f(0x137)]),'threadId':_0x5c33de['threadId'],'personId':(_0x534bf6=(_0x1bfba0=_0x5c33de[_0x3a5a2f(0x190)])==null?void 0x0:_0x1bfba0[_0x3a5a2f(0x15e)])!=null?_0x534bf6:_0x5c33de[_0x3a5a2f(0x168)],'text':JSON[_0x3a5a2f(0x138)](_0x5c33de[_0x3a5a2f(0x154)]),'parentId':_0x1dbfda['id']});break;}case v[_0x3a5a2f(0x17e)]:{const _0x24698a=this['_threadCommentModel']['getComment'](_0x44d866,_0x4e9bc7,_0x5c33de[_0x3a5a2f(0x146)]);_0x24698a&&_0x24698a[_0x3a5a2f(0x184)]&&this[_0x3a5a2f(0x16e)][_0x3a5a2f(0x194)](_0x44d866,_0x4e9bc7,_0x5c33de['replyId']);break;}case v[_0x3a5a2f(0x18a)]:{this[_0x3a5a2f(0x16e)][_0x3a5a2f(0x163)](_0x44d866,_0x4e9bc7,{'commentId':_0x5c33de[_0x3a5a2f(0x146)],'text':JSON[_0x3a5a2f(0x138)](_0x5c33de['content'])});break;}case v[_0x3a5a2f(0x156)]:{const _0x4caa8d=(_0x2716bb=this[_0x3a5a2f(0x16e)]['getUnit'](_0x5c33de[_0x3a5a2f(0x158)])[_0x3a5a2f(0x193)](_0x83450a=>_0x83450a['threadId']===_0x5c33de[_0x3a5a2f(0x15a)]))==null?void 0x0:_0x2716bb[_0x3a5a2f(0x16f)];_0x4caa8d&&this[_0x3a5a2f(0x16e)][_0x3a5a2f(0x18b)](_0x44d866,_0x4e9bc7,_0x4caa8d['id'],_0x5c33de[_0x3a5a2f(0x139)]===I[_0x3a5a2f(0x159)]);break;}}}));}};S=V([p(0x0,_0x40490c(_0x4ad9f1)),p(0x1,_0x40490c(_0x43db83)),p(0x2,_0x40490c(_0xd3379f)),p(0x3,_0x40490c(_0x100826))],S);const z=_0xefaff3(0x16c),M={};var k=Object[_0xefaff3(0x186)],Q=(_0x1ac826,_0x1657dd,_0x551b1a,_0x222b24)=>{const _0x4049ab=_0xefaff3;for(var _0xf8fb1c=_0x222b24>0x1?void 0x0:_0x222b24?k(_0x1657dd,_0x551b1a):_0x1657dd,_0x1586bc=_0x1ac826[_0x4049ab(0x16a)]-0x1,_0xe1695a;_0x1586bc>=0x0;_0x1586bc--)(_0xe1695a=_0x1ac826[_0x1586bc])&&(_0xf8fb1c=_0xe1695a(_0xf8fb1c)||_0xf8fb1c);return _0xf8fb1c;},_=(_0x592e1e,_0x100736)=>(_0x24a1c3,_0x332aea)=>_0x100736(_0x24a1c3,_0x332aea,_0x592e1e);function X(_0x2cf25c,_0x183144){const _0x214d13=_0xefaff3,_0x1b3e5e=_0x2cf25c[_0x214d13(0x14d)][0x0];return{..._0x183144,'id':_0x1b3e5e['replyId'],'resolved':_0x2cf25c[_0x214d13(0x139)]===0x1,'dT':D(_0x1b3e5e[_0x214d13(0x137)]),'personId':_0x1b3e5e[_0x214d13(0x168)],'threadId':_0x1b3e5e[_0x214d13(0x15a)]};}function ee(_0xfd0d5e,_0x266e00,_0x21c2e7){const _0x64baa0=_0xefaff3;var _0x1ae85d,_0xd6d47a;if(((_0xd6d47a=(_0x1ae85d=_0xfd0d5e==null?void 0x0:_0xfd0d5e[_0x64baa0(0x14d)])==null?void 0x0:_0x1ae85d[_0x64baa0(0x16a)])!=null?_0xd6d47a:0x0)>0x0){const _0x25c236=(_0x262e32,_0x129897)=>({'id':_0x262e32[_0x64baa0(0x146)],'threadId':_0x262e32[_0x64baa0(0x15a)],'dT':D(_0x262e32['createTimestamp']),'personId':_0x262e32[_0x64baa0(0x168)],'resolved':_0xfd0d5e['solved']===I[_0x64baa0(0x159)],'unitId':_0x266e00,'subUnitId':_0x21c2e7,'text':JSON['parse'](_0x262e32[_0x64baa0(0x154)]),'parentId':_0x129897}),_0x1aa84f=_0x25c236(_0xfd0d5e[_0x64baa0(0x14d)][0x0]);return{..._0x1aa84f,'children':_0xfd0d5e[_0x64baa0(0x14d)][_0x64baa0(0x149)](0x1)[_0x64baa0(0x134)](_0x35bb98=>_0x25c236(_0x35bb98,_0x1aa84f['id']))};}return null;}let f=class{constructor(_0x516903,_0xda207,_0x33db22,_0x529cfb){const _0x1d983e=_0xefaff3;this[_0x1d983e(0x15b)]=_0x516903,this['_userService']=_0xda207,this[_0x1d983e(0x192)]=_0x33db22,this[_0x1d983e(0x18d)]=_0x529cfb;}async[_0xefaff3(0x178)](_0x3ac1db){const _0x5e18b9=_0xefaff3;var _0x16ed60,_0x6b72bb;const {parentId:_0xb60e50,unitId:_0x432047,text:_0x4fe8f7,threadId:_0x19bb7a}=_0x3ac1db,_0x40a176=(_0x6b72bb=(_0x16ed60=_0x4fe8f7[_0x5e18b9(0x13e)])==null?void 0x0:_0x16ed60[_0x5e18b9(0x142)](_0x361d0b=>_0x361d0b['rangeType']===_0x13aff8[_0x5e18b9(0x17c)])['map'](_0x36dc2f=>_0x36dc2f[_0x5e18b9(0x13b)]))!=null?_0x6b72bb:[],_0x567b8f=JSON[_0x5e18b9(0x148)](_0x4fe8f7),_0x5e854e=(await this[_0x5e18b9(0x192)][_0x5e18b9(0x13c)](_0x432047))[_0x5e18b9(0x13d)]();if(_0xb60e50){const _0x118ed8={'memberId':_0x5e854e,'unitId':_0x432047,'content':_0x567b8f,'mention':_0x40a176,'threadId':_0x19bb7a},_0x336774=(await this[_0x5e18b9(0x15b)][_0x5e18b9(0x12e)]('/universer-api/comment/unit/'+_0x432047+_0x5e18b9(0x155),{'body':_0x118ed8}))['body'][_0x5e18b9(0x157)];return{..._0x3ac1db,'id':_0x336774[_0x5e18b9(0x146)],'dT':_0x4199e0(+_0x336774['createTimestamp'])['format'](_0x5e18b9(0x189)),'personId':_0x336774[_0x5e18b9(0x168)]};}else{const _0x27db83={'memberId':_0x5e854e,'unitId':_0x432047,'content':_0x567b8f,'mention':_0x40a176},_0x33d27f=await this['_httpService'][_0x5e18b9(0x12e)](_0x5e18b9(0x187)+_0x432047+_0x5e18b9(0x12f),{'body':_0x27db83});return X(_0x33d27f[_0x5e18b9(0x182)][_0x5e18b9(0x15d)],_0x3ac1db);}}async['updateComment'](_0x1566ef){const _0x4aa2bf=_0xefaff3;var _0x1c3a5c,_0xf3756;const {text:_0x2af9d1,unitId:_0x223605}=_0x1566ef,_0x321d0f=(_0xf3756=(_0x1c3a5c=_0x2af9d1[_0x4aa2bf(0x13e)])==null?void 0x0:_0x1c3a5c[_0x4aa2bf(0x142)](_0x4b010c=>_0x4b010c['rangeType']===_0x13aff8[_0x4aa2bf(0x17c)])[_0x4aa2bf(0x134)](_0x32f517=>_0x32f517['rangeId']))!=null?_0xf3756:[],_0x3baccd=JSON[_0x4aa2bf(0x148)](_0x2af9d1),_0xf753a7=_0x1566ef[_0x4aa2bf(0x15a)],_0x5193b1=_0x1566ef['id'],_0x4805aa={'memberId':(await this[_0x4aa2bf(0x192)][_0x4aa2bf(0x13c)](_0x223605))[_0x4aa2bf(0x13d)](),'unitId':_0x223605,'threadId':_0xf753a7,'mention':_0x321d0f,'content':_0x3baccd,'replyId':_0x5193b1},_0xc7f28e=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x223605+_0x4aa2bf(0x141),{'body':_0x4805aa});return!_0xc7f28e[_0x4aa2bf(0x182)][_0x4aa2bf(0x136)]||_0xc7f28e[_0x4aa2bf(0x182)][_0x4aa2bf(0x136)]['code']===0x1;}async['resolveComment'](_0xb661c3){const _0x4d1da9=_0xefaff3,{unitId:_0x5b3b08}=_0xb661c3,_0x48bbc9=_0xb661c3[_0x4d1da9(0x15a)],_0x2be1d0={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x5b3b08,'threadId':_0x48bbc9,'solved':_0xb661c3[_0x4d1da9(0x132)]?I[_0x4d1da9(0x159)]:I[_0x4d1da9(0x185)]},_0x4e8a6e=await this[_0x4d1da9(0x15b)][_0x4d1da9(0x12e)]('/universer-api/comment/unit/'+_0x5b3b08+'/solved',{'body':_0x2be1d0});return!_0x4e8a6e[_0x4d1da9(0x182)][_0x4d1da9(0x136)]||_0x4e8a6e[_0x4d1da9(0x182)][_0x4d1da9(0x136)][_0x4d1da9(0x167)]===0x1;}async[_0xefaff3(0x194)](_0x1f2539,_0x24ef65,_0x3b2d7f,_0x27cd17){const _0x46761b=_0xefaff3,_0x23383e={'memberId':(await this['_sessionService'][_0x46761b(0x13c)](_0x1f2539))[_0x46761b(0x13d)](),'threadId':_0x3b2d7f,'replyId':_0x27cd17,'unitId':_0x1f2539},_0x17f340=await this[_0x46761b(0x15b)][_0x46761b(0x12e)](_0x46761b(0x187)+_0x1f2539+_0x46761b(0x179),{'body':_0x23383e});return!_0x17f340[_0x46761b(0x182)][_0x46761b(0x136)]||_0x17f340[_0x46761b(0x182)][_0x46761b(0x136)][_0x46761b(0x167)]===0x1;}async[_0xefaff3(0x171)](_0x534803,_0x4299fe,_0x373df5){const _0x58dc67=_0xefaff3,_0x51ab87={'unitId':_0x534803,'threadId':_0x373df5},_0x2e88b7=await this[_0x58dc67(0x15b)][_0x58dc67(0x12e)](_0x58dc67(0x187)+_0x534803+_0x58dc67(0x145),{'body':_0x51ab87}),_0x597ec4=_0x373df5[_0x58dc67(0x134)](_0x17bbaa=>ee(_0x2e88b7[_0x58dc67(0x182)]['comments'][_0x17bbaa],_0x534803,_0x4299fe))[_0x58dc67(0x142)](Boolean);return Object['values'](_0x2e88b7[_0x58dc67(0x182)]['users'])[_0x58dc67(0x176)](_0x514044=>{const _0x3843f2=_0x58dc67;this[_0x3843f2(0x166)][_0x3843f2(0x175)](_0x514044);}),_0x597ec4;}[_0xefaff3(0x14b)](_0x256744){const _0x1ec9b6=_0xefaff3;return{'id':_0x256744['id'],'threadId':_0x256744['threadId'],'ref':_0x256744[_0x1ec9b6(0x177)]};}};f=Q([_(0x0,_0x40490c(_0x11266b)),_(0x1,_0x40490c(_0xd3379f)),_(0x2,_0x40490c(_0x5726d5)),_(0x3,_0x40490c(_0x100826))],f);function _0x2d93(_0x1024c7,_0x56e7e){const _0x22755f=_0x2275();return _0x2d93=function(_0x2d93f5,_0x3b412b){_0x2d93f5=_0x2d93f5-0x12e;let _0x19836f=_0x22755f[_0x2d93f5];return _0x19836f;},_0x2d93(_0x1024c7,_0x56e7e);}var re=Object[_0xefaff3(0x186)],te=(_0x4d3d7c,_0x54241b,_0x3ae06b,_0x31bc86)=>{const _0x5e7156=_0xefaff3;for(var _0x38a188=_0x31bc86>0x1?void 0x0:_0x31bc86?re(_0x54241b,_0x3ae06b):_0x54241b,_0x5f27f6=_0x4d3d7c[_0x5e7156(0x16a)]-0x1,_0x2acc8a;_0x5f27f6>=0x0;_0x5f27f6--)(_0x2acc8a=_0x4d3d7c[_0x5f27f6])&&(_0x38a188=_0x2acc8a(_0x38a188)||_0x38a188);return _0x38a188;},N=(_0x223ef2,_0x58b991)=>(_0x1bbf07,_0x148b64)=>_0x58b991(_0x1bbf07,_0x148b64,_0x223ef2);let g=class extends _0x1f5f44{constructor(_0x2f91b2,_0x4a7413){const _0x128b7c=_0xefaff3;super(),this[_0x128b7c(0x170)]=_0x2f91b2,this[_0x128b7c(0x16d)]=_0x4a7413,this['_initDataSource']();}[_0xefaff3(0x181)](){const _0x39ce5f=_0xefaff3;this[_0x39ce5f(0x170)][_0x39ce5f(0x18c)]=this[_0x39ce5f(0x16d)],this[_0x39ce5f(0x170)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x145ab4),N(0x1,_0x40490c(f))],g);var se=Object[_0xefaff3(0x17f)],oe=Object[_0xefaff3(0x186)],ne=(_0x5e44b8,_0x4cf599,_0x2e7aad)=>_0x4cf599 in _0x5e44b8?se(_0x5e44b8,_0x4cf599,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e7aad}):_0x5e44b8[_0x4cf599]=_0x2e7aad,ie=(_0x1b6e87,_0x15bf0e,_0x152e9b,_0x180a42)=>{const _0x5b2cc7=_0xefaff3;for(var _0xae6e61=_0x180a42>0x1?void 0x0:_0x180a42?oe(_0x15bf0e,_0x152e9b):_0x15bf0e,_0x4bba59=_0x1b6e87[_0x5b2cc7(0x16a)]-0x1,_0x2a145f;_0x4bba59>=0x0;_0x4bba59--)(_0x2a145f=_0x1b6e87[_0x4bba59])&&(_0xae6e61=_0x2a145f(_0xae6e61)||_0xae6e61);return _0xae6e61;},w=(_0x226cdb,_0x2baff1)=>(_0x2e2def,_0x4fd659)=>_0x2baff1(_0x2e2def,_0x4fd659,_0x226cdb),$=(_0x339ba1,_0x2ae955,_0x131c75)=>ne(_0x339ba1,typeof _0x2ae955!=_0xefaff3(0x15c)?_0x2ae955+'':_0x2ae955,_0x131c75);let b=class extends _0x5cb9ba{constructor(_0x22e807=M,_0x1ebadd,_0x479f22){const _0x1f39b6=_0xefaff3;super(),this[_0x1f39b6(0x17a)]=_0x22e807,this[_0x1f39b6(0x18d)]=_0x1ebadd,this['_configService']=_0x479f22;const {..._0x1fff0d}=_0x26e2b6({},M,this[_0x1f39b6(0x17a)]);this['_configService'][_0x1f39b6(0x169)](z,_0x1fff0d);}[_0xefaff3(0x14f)](){const _0x4f05fb=_0xefaff3;[[f],[g],[S]][_0x4f05fb(0x176)](_0x4ac5dc=>{const _0x53bda1=_0x4f05fb;this['_injector'][_0x53bda1(0x153)](_0x4ac5dc);});}[_0xefaff3(0x174)](){const _0x244845=_0xefaff3;this[_0x244845(0x18d)][_0x244845(0x140)](g),this['_injector']['get'](S);}};$(b,_0xefaff3(0x13a),W),$(b,_0xefaff3(0x162),_0x22b868['UNIVER_UNKNOWN']),b=ie([_0x270703(_0x4e029e,_0x2fcc32,_0x284470),w(0x1,_0x40490c(_0x100826)),w(0x2,_0xd1cd58)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x35a9d0=_0x18a9;(function(_0x2f9fc7,_0x32c3b2){const _0x2b02fe=_0x18a9,_0x1eb092=_0x2f9fc7();while(!![]){try{const _0x1949b4=parseInt(_0x2b02fe(0xd9))/0x1+-parseInt(_0x2b02fe(0xea))/0x2*(parseInt(_0x2b02fe(0xba))/0x3)+parseInt(_0x2b02fe(0xdc))/0x4*(-parseInt(_0x2b02fe(0xc0))/0x5)+parseInt(_0x2b02fe(0xe7))/0x6*(-parseInt(_0x2b02fe(0xfb))/0x7)+parseInt(_0x2b02fe(0x9d))/0x8*(parseInt(_0x2b02fe(0xb7))/0x9)+parseInt(_0x2b02fe(0xd8))/0xa+-parseInt(_0x2b02fe(0xa2))/0xb*(-parseInt(_0x2b02fe(0xdb))/0xc);if(_0x1949b4===_0x32c3b2)break;else _0x1eb092['push'](_0x1eb092['shift']());}catch(_0x1bc0f2){_0x1eb092['push'](_0x1eb092['shift']());}}}(_0x13f7,0x866e3));function _0x13f7(){const _0x519ac7=['get','forEach','filter','/list','_userService','2514OgnqyL','type','find','8gNAnOJ','_injector','slice','listComments','/universer-api/user/list','parse','unitId','/delete','replies','Solved','Edit','replyId','UNRECOGNIZED','_threadCommentDataSourceService','rangeType','threadId','Solve','6398VbQrpr','defineProperty','requireSession','getOwnPropertyDescriptor','UNIVER_UNKNOWN','COMMENT','pipe','_sessionService','_initDataSource','updateComment','personId','getCurrentUser','userId','map','8KgoOcv','_init','getComment','user','solved','451oDFEnG','post','users','OpenOrReOpen','_httpService','delete','_initUserSync','setConfig','thread-comment-data-source.config','createTimestamp','onReady','Add','customRanges','payload','_config','root','Reply','getUnit','YYYY/MM/DD\x20HH:mm','_threadCommentModel','size','5901309rlIYvy','comment','dataSource','279771ZRKZIV','resolved','symbol','content','ref','_commentService','9345LHCzOU','syncUpdateMutationToColla','/add','userID','/reply','add','deleteComment','rangeId','getUser','code','format','subscribe','Delete','commentUpdate$','parentId','getMemberID','error','resolveComment','Unknown','body','onStarting','length','disposeWithMe','stringify','4783050ehZnzV','199311FYOhuF','/edit','2580PZKMOo','76swLjZn','comments','/solved','addUser','/universer-api/comment/unit/','_threadCommentDataSource'];_0x13f7=function(){return _0x519ac7;};return _0x13f7();}import{CommentService as _0x278907,CollaborationSessionService as _0xba6ff4,UniverCollaborationClientPlugin as _0xbc84fc}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42a3ce}from'@univerjs-pro/license';import{dayjs as _0x4b3fc3,UserManagerService as _0x29941a,Inject as _0x45f7ff,Injector as _0x1f501e,Disposable as _0xfa304e,CustomRangeType as _0x66cff7,UniverInstanceType as _0xd39200,DependentOn as _0x1eb8c7,IConfigService as _0x24fb91,Plugin as _0x172dee,merge as _0xc29423}from'@univerjs/core';function _0x18a9(_0x4bfd9d,_0x519b1a){const _0x13f7e6=_0x13f7();return _0x18a9=function(_0x18a9da,_0xe24b01){_0x18a9da=_0x18a9da-0x9a;let _0x441a72=_0x13f7e6[_0x18a9da];return _0x441a72;},_0x18a9(_0x4bfd9d,_0x519b1a);}import{UniverThreadCommentUIPlugin as _0x138b23}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2e14ce,IThreadCommentDataSourceService as _0x4091ea}from'@univerjs/thread-comment';import{bufferTime as _0x52d5ed}from'rxjs';import{HTTPService as _0x4dec66}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x46ee3a=>(_0x46ee3a[_0x46ee3a[_0x35a9d0(0xa5)]=0x0]='OpenOrReOpen',_0x46ee3a[_0x46ee3a[_0x35a9d0(0xf3)]=0x1]=_0x35a9d0(0xf3),_0x46ee3a[_0x46ee3a[_0x35a9d0(0xf6)]=-0x1]=_0x35a9d0(0xf6),_0x46ee3a))(I||{}),v=(_0x26e7d3=>(_0x26e7d3[_0x26e7d3[_0x35a9d0(0xd2)]=0x0]='Unknown',_0x26e7d3[_0x26e7d3[_0x35a9d0(0xad)]=0x1]='Add',_0x26e7d3[_0x26e7d3[_0x35a9d0(0xb2)]=0x2]=_0x35a9d0(0xb2),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xf4)]=0x3]=_0x35a9d0(0xf4),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xcc)]=0x4]=_0x35a9d0(0xcc),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xfa)]=0x5]=_0x35a9d0(0xfa),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xf6)]=-0x1]='UNRECOGNIZED',_0x26e7d3))(v||{});const D=_0x3644b5=>_0x4b3fc3(new Date(+_0x3644b5))[_0x35a9d0(0xca)](_0x35a9d0(0xb4)),B=async(_0x409953,_0x98eca7)=>{const _0x51eefa=_0x35a9d0,_0x2bb218=_0x409953[_0x51eefa(0xe2)](_0x29941a),_0x17377e=_0x409953[_0x51eefa(0xe2)](_0x4dec66);_0x98eca7['forEach'](_0x74117d=>{const _0x2db544=_0x51eefa;_0x2bb218[_0x2db544(0xc8)](_0x74117d)&&_0x98eca7[_0x2db544(0xa7)](_0x74117d);}),_0x98eca7[_0x51eefa(0xb6)]&&(await _0x17377e['get'](_0x51eefa(0xee),{'params':{'userIDs':[..._0x98eca7]}}))[_0x51eefa(0xd3)][_0x51eefa(0xa4)][_0x51eefa(0xe3)](_0x49d7c6=>{_0x49d7c6&&_0x2bb218['addUser'](_0x49d7c6);});};var K=Object[_0x35a9d0(0xfe)],V=(_0xe9e955,_0xc8ece8,_0x20a144,_0x4cef4e)=>{const _0x5cff45=_0x35a9d0;for(var _0x327e9e=_0x4cef4e>0x1?void 0x0:_0x4cef4e?K(_0xc8ece8,_0x20a144):_0xc8ece8,_0x283a3a=_0xe9e955[_0x5cff45(0xd5)]-0x1,_0x19cbe4;_0x283a3a>=0x0;_0x283a3a--)(_0x19cbe4=_0xe9e955[_0x283a3a])&&(_0x327e9e=_0x19cbe4(_0x327e9e)||_0x327e9e);return _0x327e9e;},p=(_0x282c8a,_0x36cfc5)=>(_0xe346f,_0x30445b)=>_0x36cfc5(_0xe346f,_0x30445b,_0x282c8a);let S=class extends _0xfa304e{constructor(_0x2d1366,_0x4dbebf,_0x1191ec,_0x2d7e97){const _0x2acdd5=_0x35a9d0;super(),this[_0x2acdd5(0xbf)]=_0x2d1366,this[_0x2acdd5(0xb5)]=_0x4dbebf,this['_userService']=_0x1191ec,this[_0x2acdd5(0xeb)]=_0x2d7e97,this[_0x2acdd5(0x9e)](),this[_0x2acdd5(0xa8)]();}['_initUserSync'](){const _0x1bd377=_0x35a9d0;this['disposeWithMe'](this[_0x1bd377(0xb5)][_0x1bd377(0xcd)][_0x1bd377(0x101)](_0x52d5ed(0x10))[_0x1bd377(0xcb)](_0xb4fe58=>{const _0x2b1384=_0x1bd377,_0x2bab93=new Set();_0xb4fe58[_0x2b1384(0xe3)](_0x5b3988=>{const _0x8a37c=_0x2b1384;switch(_0x5b3988[_0x8a37c(0xe8)]){case'add':{const _0x587eda=_0x5b3988[_0x8a37c(0xaf)][_0x8a37c(0x105)];_0x2bab93[_0x8a37c(0xc5)](_0x587eda);break;}}}),B(this[_0x2b1384(0xeb)],_0x2bab93);}));}[_0x35a9d0(0x9e)](){const _0x10f902=_0x35a9d0;this[_0x10f902(0xd6)](this[_0x10f902(0xbf)][_0x10f902(0xcd)][_0x10f902(0xcb)](async _0x1ceff0=>{const _0x223a70=_0x10f902;var _0x3265f3,_0x87c3ae,_0x534274,_0x18eed5;const _0x135f64=(_0x3265f3=this[_0x223a70(0xb5)][_0x223a70(0xb3)](_0x1ceff0[_0x223a70(0xf0)])['find'](_0x396d00=>_0x396d00[_0x223a70(0xf9)]===_0x1ceff0['threadId']))==null?void 0x0:_0x3265f3[_0x223a70(0xb1)];if(!_0x135f64)return;const {unitId:_0x241110,subUnitId:_0x4309e4}=_0x135f64;switch(_0x1ceff0[_0x223a70(0xa0)]&&this[_0x223a70(0xe6)][_0x223a70(0xdf)](_0x1ceff0[_0x223a70(0xa0)]),_0x1ceff0['type']){case v[_0x223a70(0xad)]:break;case v[_0x223a70(0xb2)]:{this[_0x223a70(0xb5)]['addComment'](_0x241110,_0x4309e4,{'unitId':_0x241110,'subUnitId':_0x4309e4,'ref':'','id':_0x1ceff0['replyId'],'dT':D(+_0x1ceff0['createTimestamp']),'threadId':_0x1ceff0['threadId'],'personId':(_0x534274=(_0x87c3ae=_0x1ceff0[_0x223a70(0xa0)])==null?void 0x0:_0x87c3ae[_0x223a70(0xc3)])!=null?_0x534274:_0x1ceff0[_0x223a70(0x9b)],'text':JSON[_0x223a70(0xef)](_0x1ceff0[_0x223a70(0xbd)]),'parentId':_0x135f64['id']});break;}case v[_0x223a70(0xcc)]:{const _0x36bea3=this[_0x223a70(0xb5)][_0x223a70(0x9f)](_0x241110,_0x4309e4,_0x1ceff0[_0x223a70(0xf5)]);_0x36bea3&&_0x36bea3[_0x223a70(0xce)]&&this['_threadCommentModel'][_0x223a70(0xc6)](_0x241110,_0x4309e4,_0x1ceff0[_0x223a70(0xf5)]);break;}case v[_0x223a70(0xf4)]:{this[_0x223a70(0xb5)][_0x223a70(0x104)](_0x241110,_0x4309e4,{'commentId':_0x1ceff0[_0x223a70(0xf5)],'text':JSON[_0x223a70(0xef)](_0x1ceff0[_0x223a70(0xbd)])});break;}case v[_0x223a70(0xfa)]:{const _0x181e4f=(_0x18eed5=this[_0x223a70(0xb5)][_0x223a70(0xb3)](_0x1ceff0[_0x223a70(0xf0)])[_0x223a70(0xe9)](_0x2ef9a2=>_0x2ef9a2['threadId']===_0x1ceff0[_0x223a70(0xf9)]))==null?void 0x0:_0x18eed5[_0x223a70(0xb1)];_0x181e4f&&this[_0x223a70(0xb5)][_0x223a70(0xd1)](_0x241110,_0x4309e4,_0x181e4f['id'],_0x1ceff0[_0x223a70(0xa1)]===I[_0x223a70(0xf3)]);break;}}}));}};S=V([p(0x0,_0x45f7ff(_0x278907)),p(0x1,_0x45f7ff(_0x2e14ce)),p(0x2,_0x45f7ff(_0x29941a)),p(0x3,_0x45f7ff(_0x1f501e))],S);const z=_0x35a9d0(0xaa),M={};var k=Object[_0x35a9d0(0xfe)],Q=(_0x100267,_0x1a54c6,_0x451415,_0x4b3058)=>{const _0x2691d2=_0x35a9d0;for(var _0x266e1f=_0x4b3058>0x1?void 0x0:_0x4b3058?k(_0x1a54c6,_0x451415):_0x1a54c6,_0x22c34d=_0x100267[_0x2691d2(0xd5)]-0x1,_0x359789;_0x22c34d>=0x0;_0x22c34d--)(_0x359789=_0x100267[_0x22c34d])&&(_0x266e1f=_0x359789(_0x266e1f)||_0x266e1f);return _0x266e1f;},_=(_0x3678f8,_0x142bd0)=>(_0x9641dc,_0xc8b486)=>_0x142bd0(_0x9641dc,_0xc8b486,_0x3678f8);function X(_0x61d84c,_0x193f6c){const _0x2e0147=_0x35a9d0,_0x12db8e=_0x61d84c[_0x2e0147(0xf2)][0x0];return{..._0x193f6c,'id':_0x12db8e[_0x2e0147(0xf5)],'resolved':_0x61d84c['solved']===0x1,'dT':D(_0x12db8e[_0x2e0147(0xab)]),'personId':_0x12db8e[_0x2e0147(0x9b)],'threadId':_0x12db8e['threadId']};}function ee(_0x30343b,_0x582cb9,_0x459565){const _0x4f53c0=_0x35a9d0;var _0x14a79e,_0x2fb51d;if(((_0x2fb51d=(_0x14a79e=_0x30343b==null?void 0x0:_0x30343b[_0x4f53c0(0xf2)])==null?void 0x0:_0x14a79e[_0x4f53c0(0xd5)])!=null?_0x2fb51d:0x0)>0x0){const _0x520285=(_0x4870f7,_0x33a204)=>({'id':_0x4870f7[_0x4f53c0(0xf5)],'threadId':_0x4870f7[_0x4f53c0(0xf9)],'dT':D(_0x4870f7[_0x4f53c0(0xab)]),'personId':_0x4870f7[_0x4f53c0(0x9b)],'resolved':_0x30343b[_0x4f53c0(0xa1)]===I[_0x4f53c0(0xf3)],'unitId':_0x582cb9,'subUnitId':_0x459565,'text':JSON[_0x4f53c0(0xef)](_0x4870f7[_0x4f53c0(0xbd)]),'parentId':_0x33a204}),_0x13a7c6=_0x520285(_0x30343b[_0x4f53c0(0xf2)][0x0]);return{..._0x13a7c6,'children':_0x30343b[_0x4f53c0(0xf2)][_0x4f53c0(0xec)](0x1)[_0x4f53c0(0x9c)](_0x58ddfb=>_0x520285(_0x58ddfb,_0x13a7c6['id']))};}return null;}let f=class{constructor(_0x2aadba,_0x279a18,_0xaea661,_0x31844e){const _0x5a89e3=_0x35a9d0;this[_0x5a89e3(0xa6)]=_0x2aadba,this[_0x5a89e3(0xe6)]=_0x279a18,this['_sessionService']=_0xaea661,this['_injector']=_0x31844e;}async['addComment'](_0x278065){const _0x16202c=_0x35a9d0;var _0x19f3da,_0x22488a;const {parentId:_0x77de2e,unitId:_0xad987d,text:_0x4aa0cd,threadId:_0x1ff31a}=_0x278065,_0x1bb8db=(_0x22488a=(_0x19f3da=_0x4aa0cd['customRanges'])==null?void 0x0:_0x19f3da['filter'](_0x5043b0=>_0x5043b0[_0x16202c(0xf8)]===_0x66cff7[_0x16202c(0x100)])[_0x16202c(0x9c)](_0x51df0e=>_0x51df0e[_0x16202c(0xc7)]))!=null?_0x22488a:[],_0x333b90=JSON[_0x16202c(0xd7)](_0x4aa0cd),_0x16c654=(await this[_0x16202c(0x102)][_0x16202c(0xfd)](_0xad987d))['getMemberID']();if(_0x77de2e){const _0x42ddcc={'memberId':_0x16c654,'unitId':_0xad987d,'content':_0x333b90,'mention':_0x1bb8db,'threadId':_0x1ff31a},_0x38084f=(await this['_httpService'][_0x16202c(0xa3)](_0x16202c(0xe0)+_0xad987d+_0x16202c(0xc4),{'body':_0x42ddcc}))[_0x16202c(0xd3)]['reply'];return{..._0x278065,'id':_0x38084f[_0x16202c(0xf5)],'dT':_0x4b3fc3(+_0x38084f[_0x16202c(0xab)])['format'](_0x16202c(0xb4)),'personId':_0x38084f[_0x16202c(0x9b)]};}else{const _0x3f697d={'memberId':_0x16c654,'unitId':_0xad987d,'content':_0x333b90,'mention':_0x1bb8db},_0x3dab70=await this['_httpService'][_0x16202c(0xa3)](_0x16202c(0xe0)+_0xad987d+_0x16202c(0xc2),{'body':_0x3f697d});return X(_0x3dab70['body'][_0x16202c(0xb8)],_0x278065);}}async[_0x35a9d0(0x104)](_0x506571){const _0x26839b=_0x35a9d0;var _0x4ddc13,_0x24b61d;const {text:_0x30aafa,unitId:_0x5e378e}=_0x506571,_0x41914c=(_0x24b61d=(_0x4ddc13=_0x30aafa[_0x26839b(0xae)])==null?void 0x0:_0x4ddc13[_0x26839b(0xe4)](_0x24fde8=>_0x24fde8[_0x26839b(0xf8)]===_0x66cff7[_0x26839b(0x100)])[_0x26839b(0x9c)](_0x599f89=>_0x599f89[_0x26839b(0xc7)]))!=null?_0x24b61d:[],_0x158e53=JSON[_0x26839b(0xd7)](_0x30aafa),_0x176521=_0x506571[_0x26839b(0xf9)],_0x508453=_0x506571['id'],_0x15f989={'memberId':(await this[_0x26839b(0x102)][_0x26839b(0xfd)](_0x5e378e))[_0x26839b(0xcf)](),'unitId':_0x5e378e,'threadId':_0x176521,'mention':_0x41914c,'content':_0x158e53,'replyId':_0x508453},_0x29aaad=await this[_0x26839b(0xa6)]['post']('/universer-api/comment/unit/'+_0x5e378e+_0x26839b(0xda),{'body':_0x15f989});return!_0x29aaad['body'][_0x26839b(0xd0)]||_0x29aaad[_0x26839b(0xd3)][_0x26839b(0xd0)]['code']===0x1;}async[_0x35a9d0(0xd1)](_0x1d05b1){const _0x2b71d7=_0x35a9d0,{unitId:_0x19bea6}=_0x1d05b1,_0x32bb81=_0x1d05b1['threadId'],_0x16cac8={'memberId':this[_0x2b71d7(0xe6)][_0x2b71d7(0x9a)]()[_0x2b71d7(0xc3)],'unitId':_0x19bea6,'threadId':_0x32bb81,'solved':_0x1d05b1[_0x2b71d7(0xbb)]?I[_0x2b71d7(0xf3)]:I[_0x2b71d7(0xa5)]},_0xd4a211=await this['_httpService'][_0x2b71d7(0xa3)](_0x2b71d7(0xe0)+_0x19bea6+_0x2b71d7(0xde),{'body':_0x16cac8});return!_0xd4a211[_0x2b71d7(0xd3)][_0x2b71d7(0xd0)]||_0xd4a211['body'][_0x2b71d7(0xd0)][_0x2b71d7(0xc9)]===0x1;}async['deleteComment'](_0x5e59e3,_0x10afcb,_0xdd6edc,_0x2a7881){const _0x480fdc=_0x35a9d0,_0x2aa2c5={'memberId':(await this[_0x480fdc(0x102)]['requireSession'](_0x5e59e3))[_0x480fdc(0xcf)](),'threadId':_0xdd6edc,'replyId':_0x2a7881,'unitId':_0x5e59e3},_0x56b878=await this[_0x480fdc(0xa6)][_0x480fdc(0xa3)](_0x480fdc(0xe0)+_0x5e59e3+_0x480fdc(0xf1),{'body':_0x2aa2c5});return!_0x56b878['body'][_0x480fdc(0xd0)]||_0x56b878['body'][_0x480fdc(0xd0)]['code']===0x1;}async[_0x35a9d0(0xed)](_0x409305,_0x6e141d,_0x525db2){const _0x5b9092=_0x35a9d0,_0x2f8fac={'unitId':_0x409305,'threadId':_0x525db2},_0x3d3ea0=await this[_0x5b9092(0xa6)][_0x5b9092(0xa3)](_0x5b9092(0xe0)+_0x409305+_0x5b9092(0xe5),{'body':_0x2f8fac}),_0x41a52a=_0x525db2[_0x5b9092(0x9c)](_0x576065=>ee(_0x3d3ea0['body'][_0x5b9092(0xdd)][_0x576065],_0x409305,_0x6e141d))['filter'](Boolean);return Object['values'](_0x3d3ea0['body'][_0x5b9092(0xa4)])[_0x5b9092(0xe3)](_0x253837=>{const _0x2a7363=_0x5b9092;this[_0x2a7363(0xe6)][_0x2a7363(0xdf)](_0x253837);}),_0x41a52a;}['saveCommentToSnapshot'](_0x3362a5){const _0x5c1661=_0x35a9d0;return{'id':_0x3362a5['id'],'threadId':_0x3362a5[_0x5c1661(0xf9)],'ref':_0x3362a5[_0x5c1661(0xbe)]};}};f=Q([_(0x0,_0x45f7ff(_0x4dec66)),_(0x1,_0x45f7ff(_0x29941a)),_(0x2,_0x45f7ff(_0xba6ff4)),_(0x3,_0x45f7ff(_0x1f501e))],f);var re=Object[_0x35a9d0(0xfe)],te=(_0x9ff555,_0x1b0a8c,_0x535ccf,_0x46c744)=>{const _0x524037=_0x35a9d0;for(var _0x4abfc9=_0x46c744>0x1?void 0x0:_0x46c744?re(_0x1b0a8c,_0x535ccf):_0x1b0a8c,_0x4aa95a=_0x9ff555[_0x524037(0xd5)]-0x1,_0x5171c9;_0x4aa95a>=0x0;_0x4aa95a--)(_0x5171c9=_0x9ff555[_0x4aa95a])&&(_0x4abfc9=_0x5171c9(_0x4abfc9)||_0x4abfc9);return _0x4abfc9;},N=(_0xb1c9dd,_0x10dfcb)=>(_0x44d0ab,_0x331e31)=>_0x10dfcb(_0x44d0ab,_0x331e31,_0xb1c9dd);let g=class extends _0xfa304e{constructor(_0x10e142,_0x5ad823){const _0x54cab2=_0x35a9d0;super(),this[_0x54cab2(0xf7)]=_0x10e142,this[_0x54cab2(0xe1)]=_0x5ad823,this[_0x54cab2(0x103)]();}[_0x35a9d0(0x103)](){const _0x3cd94d=_0x35a9d0;this[_0x3cd94d(0xf7)][_0x3cd94d(0xb9)]=this[_0x3cd94d(0xe1)],this[_0x3cd94d(0xf7)][_0x3cd94d(0xc1)]=!0x1;}};g=te([N(0x0,_0x4091ea),N(0x1,_0x45f7ff(f))],g);var se=Object[_0x35a9d0(0xfc)],oe=Object[_0x35a9d0(0xfe)],ne=(_0xe4b31e,_0x3b6f3e,_0xff0711)=>_0x3b6f3e in _0xe4b31e?se(_0xe4b31e,_0x3b6f3e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xff0711}):_0xe4b31e[_0x3b6f3e]=_0xff0711,ie=(_0x8c184a,_0x194765,_0x3f4fc2,_0x520208)=>{for(var _0x2a6198=_0x520208>0x1?void 0x0:_0x520208?oe(_0x194765,_0x3f4fc2):_0x194765,_0x2bdf48=_0x8c184a['length']-0x1,_0xfc2f26;_0x2bdf48>=0x0;_0x2bdf48--)(_0xfc2f26=_0x8c184a[_0x2bdf48])&&(_0x2a6198=_0xfc2f26(_0x2a6198)||_0x2a6198);return _0x2a6198;},w=(_0xebe466,_0x11f6dd)=>(_0x5b5d93,_0xf4f68e)=>_0x11f6dd(_0x5b5d93,_0xf4f68e,_0xebe466),$=(_0x2cc094,_0x1b8180,_0x5b453e)=>ne(_0x2cc094,typeof _0x1b8180!=_0x35a9d0(0xbc)?_0x1b8180+'':_0x1b8180,_0x5b453e);let b=class extends _0x172dee{constructor(_0x3247e3=M,_0x4d2233,_0x15128d){const _0x3a70fc=_0x35a9d0;super(),this[_0x3a70fc(0xb0)]=_0x3247e3,this['_injector']=_0x4d2233,this['_configService']=_0x15128d;const {..._0x1df743}=_0xc29423({},M,this[_0x3a70fc(0xb0)]);this['_configService'][_0x3a70fc(0xa9)](z,_0x1df743);}[_0x35a9d0(0xd4)](){[[f],[g],[S]]['forEach'](_0x173ce9=>{const _0x4c3418=_0x18a9;this[_0x4c3418(0xeb)][_0x4c3418(0xc5)](_0x173ce9);});}[_0x35a9d0(0xac)](){const _0x9bad90=_0x35a9d0;this[_0x9bad90(0xeb)]['get'](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,_0x35a9d0(0xe8),_0xd39200[_0x35a9d0(0xff)]),b=ie([_0x1eb8c7(_0x138b23,_0xbc84fc,_0x42a3ce),w(0x1,_0x45f7ff(_0x1f501e)),w(0x2,_0x24fb91)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2275(){const _0x56d4b9=['Add','add','content','/reply','Solve','reply','unitId','Solved','threadId','_httpService','symbol','comment','userID','253QReFUC','delete','commentUpdate$','type','updateComment','Unknown','UNRECOGNIZED','_userService','code','userId','setConfig','length','personId','thread-comment-data-source.config','_threadCommentDataSource','_threadCommentModel','root','_threadCommentDataSourceService','listComments','191336USqwud','_commentService','onReady','addUser','forEach','ref','addComment','/delete','_config','1124870rmrFxb','COMMENT','getUser','Delete','defineProperty','4322608vomhIo','_initDataSource','body','351DbRNoq','parentId','OpenOrReOpen','getOwnPropertyDescriptor','/universer-api/comment/unit/','_init','YYYY/MM/DD\x20HH:mm','Edit','resolveComment','dataSource','_injector','505595reZdMi','/universer-api/user/list','user','_initUserSync','_sessionService','find','deleteComment','post','/add','users','disposeWithMe','resolved','size','map','554603lzaMdA','error','createTimestamp','parse','solved','pluginName','rangeId','requireSession','getMemberID','customRanges','12IEkehV','get','/edit','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','/list','replyId','3021621NWYnnv','stringify','slice','subscribe','saveCommentToSnapshot','getUnit','replies','Reply','onStarting','275vNKQdW','6170IslTGv'];_0x2275=function(){return _0x56d4b9;};return _0x2275();}const _0xefaff3=_0x2d93;(function(_0x4eb663,_0x1d2089){const _0xfc2230=_0x2d93,_0x58aba0=_0x4eb663();while(!![]){try{const _0x37d4af=-parseInt(_0xfc2230(0x15f))/0x1*(-parseInt(_0xfc2230(0x151))/0x2)+-parseInt(_0xfc2230(0x147))/0x3+-parseInt(_0xfc2230(0x180))/0x4+parseInt(_0xfc2230(0x18e))/0x5*(parseInt(_0xfc2230(0x13f))/0x6)+-parseInt(_0xfc2230(0x135))/0x7+parseInt(_0xfc2230(0x172))/0x8*(-parseInt(_0xfc2230(0x183))/0x9)+-parseInt(_0xfc2230(0x17b))/0xa*(-parseInt(_0xfc2230(0x150))/0xb);if(_0x37d4af===_0x1d2089)break;else _0x58aba0['push'](_0x58aba0['shift']());}catch(_0x5032f6){_0x58aba0['push'](_0x58aba0['shift']());}}}(_0x2275,0xa9b1b));import{CommentService as _0x4ad9f1,CollaborationSessionService as _0x5726d5,UniverCollaborationClientPlugin as _0x2fcc32}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x284470}from'@univerjs-pro/license';import{dayjs as _0x4199e0,UserManagerService as _0xd3379f,Inject as _0x40490c,Injector as _0x100826,Disposable as _0x1f5f44,CustomRangeType as _0x13aff8,UniverInstanceType as _0x22b868,DependentOn as _0x270703,IConfigService as _0xd1cd58,Plugin as _0x5cb9ba,merge as _0x26e2b6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4e029e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43db83,IThreadCommentDataSourceService as _0x145ab4}from'@univerjs/thread-comment';import{bufferTime as _0x3bb7ff}from'rxjs';import{HTTPService as _0x11266b}from'@univerjs/network';const W=_0xefaff3(0x143);var I=(_0x57ad6a=>(_0x57ad6a[_0x57ad6a[_0xefaff3(0x185)]=0x0]=_0xefaff3(0x185),_0x57ad6a[_0x57ad6a[_0xefaff3(0x159)]=0x1]=_0xefaff3(0x159),_0x57ad6a[_0x57ad6a[_0xefaff3(0x165)]=-0x1]=_0xefaff3(0x165),_0x57ad6a))(I||{}),v=(_0x39432e=>(_0x39432e[_0x39432e[_0xefaff3(0x164)]=0x0]=_0xefaff3(0x164),_0x39432e[_0x39432e['Add']=0x1]=_0xefaff3(0x152),_0x39432e[_0x39432e['Reply']=0x2]=_0xefaff3(0x14e),_0x39432e[_0x39432e['Edit']=0x3]=_0xefaff3(0x18a),_0x39432e[_0x39432e['Delete']=0x4]=_0xefaff3(0x17e),_0x39432e[_0x39432e['Solve']=0x5]='Solve',_0x39432e[_0x39432e[_0xefaff3(0x165)]=-0x1]=_0xefaff3(0x165),_0x39432e))(v||{});const D=_0x1acb2e=>_0x4199e0(new Date(+_0x1acb2e))[_0xefaff3(0x144)](_0xefaff3(0x189)),B=async(_0x5def2c,_0x1d9ada)=>{const _0x44dc56=_0xefaff3,_0x28ebbc=_0x5def2c[_0x44dc56(0x140)](_0xd3379f),_0x550e21=_0x5def2c['get'](_0x11266b);_0x1d9ada['forEach'](_0x5c3f9c=>{const _0x3b7754=_0x44dc56;_0x28ebbc[_0x3b7754(0x17d)](_0x5c3f9c)&&_0x1d9ada[_0x3b7754(0x160)](_0x5c3f9c);}),_0x1d9ada[_0x44dc56(0x133)]&&(await _0x550e21['get'](_0x44dc56(0x18f),{'params':{'userIDs':[..._0x1d9ada]}}))['body'][_0x44dc56(0x130)][_0x44dc56(0x176)](_0x35e3d8=>{const _0x215573=_0x44dc56;_0x35e3d8&&_0x28ebbc[_0x215573(0x175)](_0x35e3d8);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x56cf4c,_0x4c44f6,_0x5dbe02,_0x4939e0)=>{const _0x4f2059=_0xefaff3;for(var _0x326905=_0x4939e0>0x1?void 0x0:_0x4939e0?K(_0x4c44f6,_0x5dbe02):_0x4c44f6,_0x4b8f39=_0x56cf4c[_0x4f2059(0x16a)]-0x1,_0x7b4b5f;_0x4b8f39>=0x0;_0x4b8f39--)(_0x7b4b5f=_0x56cf4c[_0x4b8f39])&&(_0x326905=_0x7b4b5f(_0x326905)||_0x326905);return _0x326905;},p=(_0x4c79c7,_0x57591f)=>(_0x2147d5,_0x16ce9c)=>_0x57591f(_0x2147d5,_0x16ce9c,_0x4c79c7);let S=class extends _0x1f5f44{constructor(_0x2d9529,_0x48f810,_0xf97f2f,_0x3e2811){const _0x54b925=_0xefaff3;super(),this[_0x54b925(0x173)]=_0x2d9529,this[_0x54b925(0x16e)]=_0x48f810,this['_userService']=_0xf97f2f,this['_injector']=_0x3e2811,this[_0x54b925(0x188)](),this[_0x54b925(0x191)]();}[_0xefaff3(0x191)](){const _0x4477f8=_0xefaff3;this[_0x4477f8(0x131)](this[_0x4477f8(0x16e)][_0x4477f8(0x161)]['pipe'](_0x3bb7ff(0x10))['subscribe'](_0x589861=>{const _0x31546d=_0x4477f8,_0x1fdce2=new Set();_0x589861[_0x31546d(0x176)](_0x467468=>{const _0xe48d0e=_0x31546d;switch(_0x467468[_0xe48d0e(0x162)]){case _0xe48d0e(0x153):{const _0x3f756a=_0x467468['payload'][_0xe48d0e(0x16b)];_0x1fdce2['add'](_0x3f756a);break;}}}),B(this[_0x31546d(0x18d)],_0x1fdce2);}));}['_init'](){const _0x924b37=_0xefaff3;this[_0x924b37(0x131)](this[_0x924b37(0x173)]['commentUpdate$'][_0x924b37(0x14a)](async _0x5c33de=>{const _0x3a5a2f=_0x924b37;var _0x432bc9,_0x1bfba0,_0x534bf6,_0x2716bb;const _0x1dbfda=(_0x432bc9=this['_threadCommentModel'][_0x3a5a2f(0x14c)](_0x5c33de[_0x3a5a2f(0x158)])['find'](_0x114ed2=>_0x114ed2[_0x3a5a2f(0x15a)]===_0x5c33de[_0x3a5a2f(0x15a)]))==null?void 0x0:_0x432bc9[_0x3a5a2f(0x16f)];if(!_0x1dbfda)return;const {unitId:_0x44d866,subUnitId:_0x4e9bc7}=_0x1dbfda;switch(_0x5c33de['user']&&this[_0x3a5a2f(0x166)][_0x3a5a2f(0x175)](_0x5c33de['user']),_0x5c33de[_0x3a5a2f(0x162)]){case v[_0x3a5a2f(0x152)]:break;case v[_0x3a5a2f(0x14e)]:{this['_threadCommentModel'][_0x3a5a2f(0x178)](_0x44d866,_0x4e9bc7,{'unitId':_0x44d866,'subUnitId':_0x4e9bc7,'ref':'','id':_0x5c33de[_0x3a5a2f(0x146)],'dT':D(+_0x5c33de[_0x3a5a2f(0x137)]),'threadId':_0x5c33de['threadId'],'personId':(_0x534bf6=(_0x1bfba0=_0x5c33de[_0x3a5a2f(0x190)])==null?void 0x0:_0x1bfba0[_0x3a5a2f(0x15e)])!=null?_0x534bf6:_0x5c33de[_0x3a5a2f(0x168)],'text':JSON[_0x3a5a2f(0x138)](_0x5c33de[_0x3a5a2f(0x154)]),'parentId':_0x1dbfda['id']});break;}case v[_0x3a5a2f(0x17e)]:{const _0x24698a=this['_threadCommentModel']['getComment'](_0x44d866,_0x4e9bc7,_0x5c33de[_0x3a5a2f(0x146)]);_0x24698a&&_0x24698a[_0x3a5a2f(0x184)]&&this[_0x3a5a2f(0x16e)][_0x3a5a2f(0x194)](_0x44d866,_0x4e9bc7,_0x5c33de['replyId']);break;}case v[_0x3a5a2f(0x18a)]:{this[_0x3a5a2f(0x16e)][_0x3a5a2f(0x163)](_0x44d866,_0x4e9bc7,{'commentId':_0x5c33de[_0x3a5a2f(0x146)],'text':JSON[_0x3a5a2f(0x138)](_0x5c33de['content'])});break;}case v[_0x3a5a2f(0x156)]:{const _0x4caa8d=(_0x2716bb=this[_0x3a5a2f(0x16e)]['getUnit'](_0x5c33de[_0x3a5a2f(0x158)])[_0x3a5a2f(0x193)](_0x83450a=>_0x83450a['threadId']===_0x5c33de[_0x3a5a2f(0x15a)]))==null?void 0x0:_0x2716bb[_0x3a5a2f(0x16f)];_0x4caa8d&&this[_0x3a5a2f(0x16e)][_0x3a5a2f(0x18b)](_0x44d866,_0x4e9bc7,_0x4caa8d['id'],_0x5c33de[_0x3a5a2f(0x139)]===I[_0x3a5a2f(0x159)]);break;}}}));}};S=V([p(0x0,_0x40490c(_0x4ad9f1)),p(0x1,_0x40490c(_0x43db83)),p(0x2,_0x40490c(_0xd3379f)),p(0x3,_0x40490c(_0x100826))],S);const z=_0xefaff3(0x16c),M={};var k=Object[_0xefaff3(0x186)],Q=(_0x1ac826,_0x1657dd,_0x551b1a,_0x222b24)=>{const _0x4049ab=_0xefaff3;for(var _0xf8fb1c=_0x222b24>0x1?void 0x0:_0x222b24?k(_0x1657dd,_0x551b1a):_0x1657dd,_0x1586bc=_0x1ac826[_0x4049ab(0x16a)]-0x1,_0xe1695a;_0x1586bc>=0x0;_0x1586bc--)(_0xe1695a=_0x1ac826[_0x1586bc])&&(_0xf8fb1c=_0xe1695a(_0xf8fb1c)||_0xf8fb1c);return _0xf8fb1c;},_=(_0x592e1e,_0x100736)=>(_0x24a1c3,_0x332aea)=>_0x100736(_0x24a1c3,_0x332aea,_0x592e1e);function X(_0x2cf25c,_0x183144){const _0x214d13=_0xefaff3,_0x1b3e5e=_0x2cf25c[_0x214d13(0x14d)][0x0];return{..._0x183144,'id':_0x1b3e5e['replyId'],'resolved':_0x2cf25c[_0x214d13(0x139)]===0x1,'dT':D(_0x1b3e5e[_0x214d13(0x137)]),'personId':_0x1b3e5e[_0x214d13(0x168)],'threadId':_0x1b3e5e[_0x214d13(0x15a)]};}function ee(_0xfd0d5e,_0x266e00,_0x21c2e7){const _0x64baa0=_0xefaff3;var _0x1ae85d,_0xd6d47a;if(((_0xd6d47a=(_0x1ae85d=_0xfd0d5e==null?void 0x0:_0xfd0d5e[_0x64baa0(0x14d)])==null?void 0x0:_0x1ae85d[_0x64baa0(0x16a)])!=null?_0xd6d47a:0x0)>0x0){const _0x25c236=(_0x262e32,_0x129897)=>({'id':_0x262e32[_0x64baa0(0x146)],'threadId':_0x262e32[_0x64baa0(0x15a)],'dT':D(_0x262e32['createTimestamp']),'personId':_0x262e32[_0x64baa0(0x168)],'resolved':_0xfd0d5e['solved']===I[_0x64baa0(0x159)],'unitId':_0x266e00,'subUnitId':_0x21c2e7,'text':JSON['parse'](_0x262e32[_0x64baa0(0x154)]),'parentId':_0x129897}),_0x1aa84f=_0x25c236(_0xfd0d5e[_0x64baa0(0x14d)][0x0]);return{..._0x1aa84f,'children':_0xfd0d5e[_0x64baa0(0x14d)][_0x64baa0(0x149)](0x1)[_0x64baa0(0x134)](_0x35bb98=>_0x25c236(_0x35bb98,_0x1aa84f['id']))};}return null;}let f=class{constructor(_0x516903,_0xda207,_0x33db22,_0x529cfb){const _0x1d983e=_0xefaff3;this[_0x1d983e(0x15b)]=_0x516903,this['_userService']=_0xda207,this[_0x1d983e(0x192)]=_0x33db22,this[_0x1d983e(0x18d)]=_0x529cfb;}async[_0xefaff3(0x178)](_0x3ac1db){const _0x5e18b9=_0xefaff3;var _0x16ed60,_0x6b72bb;const {parentId:_0xb60e50,unitId:_0x432047,text:_0x4fe8f7,threadId:_0x19bb7a}=_0x3ac1db,_0x40a176=(_0x6b72bb=(_0x16ed60=_0x4fe8f7[_0x5e18b9(0x13e)])==null?void 0x0:_0x16ed60[_0x5e18b9(0x142)](_0x361d0b=>_0x361d0b['rangeType']===_0x13aff8[_0x5e18b9(0x17c)])['map'](_0x36dc2f=>_0x36dc2f[_0x5e18b9(0x13b)]))!=null?_0x6b72bb:[],_0x567b8f=JSON[_0x5e18b9(0x148)](_0x4fe8f7),_0x5e854e=(await this[_0x5e18b9(0x192)][_0x5e18b9(0x13c)](_0x432047))[_0x5e18b9(0x13d)]();if(_0xb60e50){const _0x118ed8={'memberId':_0x5e854e,'unitId':_0x432047,'content':_0x567b8f,'mention':_0x40a176,'threadId':_0x19bb7a},_0x336774=(await this[_0x5e18b9(0x15b)][_0x5e18b9(0x12e)]('/universer-api/comment/unit/'+_0x432047+_0x5e18b9(0x155),{'body':_0x118ed8}))['body'][_0x5e18b9(0x157)];return{..._0x3ac1db,'id':_0x336774[_0x5e18b9(0x146)],'dT':_0x4199e0(+_0x336774['createTimestamp'])['format'](_0x5e18b9(0x189)),'personId':_0x336774[_0x5e18b9(0x168)]};}else{const _0x27db83={'memberId':_0x5e854e,'unitId':_0x432047,'content':_0x567b8f,'mention':_0x40a176},_0x33d27f=await this['_httpService'][_0x5e18b9(0x12e)](_0x5e18b9(0x187)+_0x432047+_0x5e18b9(0x12f),{'body':_0x27db83});return X(_0x33d27f[_0x5e18b9(0x182)][_0x5e18b9(0x15d)],_0x3ac1db);}}async['updateComment'](_0x1566ef){const _0x4aa2bf=_0xefaff3;var _0x1c3a5c,_0xf3756;const {text:_0x2af9d1,unitId:_0x223605}=_0x1566ef,_0x321d0f=(_0xf3756=(_0x1c3a5c=_0x2af9d1[_0x4aa2bf(0x13e)])==null?void 0x0:_0x1c3a5c[_0x4aa2bf(0x142)](_0x4b010c=>_0x4b010c['rangeType']===_0x13aff8[_0x4aa2bf(0x17c)])[_0x4aa2bf(0x134)](_0x32f517=>_0x32f517['rangeId']))!=null?_0xf3756:[],_0x3baccd=JSON[_0x4aa2bf(0x148)](_0x2af9d1),_0xf753a7=_0x1566ef[_0x4aa2bf(0x15a)],_0x5193b1=_0x1566ef['id'],_0x4805aa={'memberId':(await this[_0x4aa2bf(0x192)][_0x4aa2bf(0x13c)](_0x223605))[_0x4aa2bf(0x13d)](),'unitId':_0x223605,'threadId':_0xf753a7,'mention':_0x321d0f,'content':_0x3baccd,'replyId':_0x5193b1},_0xc7f28e=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x223605+_0x4aa2bf(0x141),{'body':_0x4805aa});return!_0xc7f28e[_0x4aa2bf(0x182)][_0x4aa2bf(0x136)]||_0xc7f28e[_0x4aa2bf(0x182)][_0x4aa2bf(0x136)]['code']===0x1;}async['resolveComment'](_0xb661c3){const _0x4d1da9=_0xefaff3,{unitId:_0x5b3b08}=_0xb661c3,_0x48bbc9=_0xb661c3[_0x4d1da9(0x15a)],_0x2be1d0={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x5b3b08,'threadId':_0x48bbc9,'solved':_0xb661c3[_0x4d1da9(0x132)]?I[_0x4d1da9(0x159)]:I[_0x4d1da9(0x185)]},_0x4e8a6e=await this[_0x4d1da9(0x15b)][_0x4d1da9(0x12e)]('/universer-api/comment/unit/'+_0x5b3b08+'/solved',{'body':_0x2be1d0});return!_0x4e8a6e[_0x4d1da9(0x182)][_0x4d1da9(0x136)]||_0x4e8a6e[_0x4d1da9(0x182)][_0x4d1da9(0x136)][_0x4d1da9(0x167)]===0x1;}async[_0xefaff3(0x194)](_0x1f2539,_0x24ef65,_0x3b2d7f,_0x27cd17){const _0x46761b=_0xefaff3,_0x23383e={'memberId':(await this['_sessionService'][_0x46761b(0x13c)](_0x1f2539))[_0x46761b(0x13d)](),'threadId':_0x3b2d7f,'replyId':_0x27cd17,'unitId':_0x1f2539},_0x17f340=await this[_0x46761b(0x15b)][_0x46761b(0x12e)](_0x46761b(0x187)+_0x1f2539+_0x46761b(0x179),{'body':_0x23383e});return!_0x17f340[_0x46761b(0x182)][_0x46761b(0x136)]||_0x17f340[_0x46761b(0x182)][_0x46761b(0x136)][_0x46761b(0x167)]===0x1;}async[_0xefaff3(0x171)](_0x534803,_0x4299fe,_0x373df5){const _0x58dc67=_0xefaff3,_0x51ab87={'unitId':_0x534803,'threadId':_0x373df5},_0x2e88b7=await this[_0x58dc67(0x15b)][_0x58dc67(0x12e)](_0x58dc67(0x187)+_0x534803+_0x58dc67(0x145),{'body':_0x51ab87}),_0x597ec4=_0x373df5[_0x58dc67(0x134)](_0x17bbaa=>ee(_0x2e88b7[_0x58dc67(0x182)]['comments'][_0x17bbaa],_0x534803,_0x4299fe))[_0x58dc67(0x142)](Boolean);return Object['values'](_0x2e88b7[_0x58dc67(0x182)]['users'])[_0x58dc67(0x176)](_0x514044=>{const _0x3843f2=_0x58dc67;this[_0x3843f2(0x166)][_0x3843f2(0x175)](_0x514044);}),_0x597ec4;}[_0xefaff3(0x14b)](_0x256744){const _0x1ec9b6=_0xefaff3;return{'id':_0x256744['id'],'threadId':_0x256744['threadId'],'ref':_0x256744[_0x1ec9b6(0x177)]};}};f=Q([_(0x0,_0x40490c(_0x11266b)),_(0x1,_0x40490c(_0xd3379f)),_(0x2,_0x40490c(_0x5726d5)),_(0x3,_0x40490c(_0x100826))],f);function _0x2d93(_0x1024c7,_0x56e7e){const _0x22755f=_0x2275();return _0x2d93=function(_0x2d93f5,_0x3b412b){_0x2d93f5=_0x2d93f5-0x12e;let _0x19836f=_0x22755f[_0x2d93f5];return _0x19836f;},_0x2d93(_0x1024c7,_0x56e7e);}var re=Object[_0xefaff3(0x186)],te=(_0x4d3d7c,_0x54241b,_0x3ae06b,_0x31bc86)=>{const _0x5e7156=_0xefaff3;for(var _0x38a188=_0x31bc86>0x1?void 0x0:_0x31bc86?re(_0x54241b,_0x3ae06b):_0x54241b,_0x5f27f6=_0x4d3d7c[_0x5e7156(0x16a)]-0x1,_0x2acc8a;_0x5f27f6>=0x0;_0x5f27f6--)(_0x2acc8a=_0x4d3d7c[_0x5f27f6])&&(_0x38a188=_0x2acc8a(_0x38a188)||_0x38a188);return _0x38a188;},N=(_0x223ef2,_0x58b991)=>(_0x1bbf07,_0x148b64)=>_0x58b991(_0x1bbf07,_0x148b64,_0x223ef2);let g=class extends _0x1f5f44{constructor(_0x2f91b2,_0x4a7413){const _0x128b7c=_0xefaff3;super(),this[_0x128b7c(0x170)]=_0x2f91b2,this[_0x128b7c(0x16d)]=_0x4a7413,this['_initDataSource']();}[_0xefaff3(0x181)](){const _0x39ce5f=_0xefaff3;this[_0x39ce5f(0x170)][_0x39ce5f(0x18c)]=this[_0x39ce5f(0x16d)],this[_0x39ce5f(0x170)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x145ab4),N(0x1,_0x40490c(f))],g);var se=Object[_0xefaff3(0x17f)],oe=Object[_0xefaff3(0x186)],ne=(_0x5e44b8,_0x4cf599,_0x2e7aad)=>_0x4cf599 in _0x5e44b8?se(_0x5e44b8,_0x4cf599,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e7aad}):_0x5e44b8[_0x4cf599]=_0x2e7aad,ie=(_0x1b6e87,_0x15bf0e,_0x152e9b,_0x180a42)=>{const _0x5b2cc7=_0xefaff3;for(var _0xae6e61=_0x180a42>0x1?void 0x0:_0x180a42?oe(_0x15bf0e,_0x152e9b):_0x15bf0e,_0x4bba59=_0x1b6e87[_0x5b2cc7(0x16a)]-0x1,_0x2a145f;_0x4bba59>=0x0;_0x4bba59--)(_0x2a145f=_0x1b6e87[_0x4bba59])&&(_0xae6e61=_0x2a145f(_0xae6e61)||_0xae6e61);return _0xae6e61;},w=(_0x226cdb,_0x2baff1)=>(_0x2e2def,_0x4fd659)=>_0x2baff1(_0x2e2def,_0x4fd659,_0x226cdb),$=(_0x339ba1,_0x2ae955,_0x131c75)=>ne(_0x339ba1,typeof _0x2ae955!=_0xefaff3(0x15c)?_0x2ae955+'':_0x2ae955,_0x131c75);let b=class extends _0x5cb9ba{constructor(_0x22e807=M,_0x1ebadd,_0x479f22){const _0x1f39b6=_0xefaff3;super(),this[_0x1f39b6(0x17a)]=_0x22e807,this[_0x1f39b6(0x18d)]=_0x1ebadd,this['_configService']=_0x479f22;const {..._0x1fff0d}=_0x26e2b6({},M,this[_0x1f39b6(0x17a)]);this['_configService'][_0x1f39b6(0x169)](z,_0x1fff0d);}[_0xefaff3(0x14f)](){const _0x4f05fb=_0xefaff3;[[f],[g],[S]][_0x4f05fb(0x176)](_0x4ac5dc=>{const _0x53bda1=_0x4f05fb;this['_injector'][_0x53bda1(0x153)](_0x4ac5dc);});}[_0xefaff3(0x174)](){const _0x244845=_0xefaff3;this[_0x244845(0x18d)][_0x244845(0x140)](g),this['_injector']['get'](S);}};$(b,_0xefaff3(0x13a),W),$(b,_0xefaff3(0x162),_0x22b868['UNIVER_UNKNOWN']),b=ie([_0x270703(_0x4e029e,_0x2fcc32,_0x284470),w(0x1,_0x40490c(_0x100826)),w(0x2,_0xd1cd58)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x35a9d0=_0x18a9;(function(_0x2f9fc7,_0x32c3b2){const _0x2b02fe=_0x18a9,_0x1eb092=_0x2f9fc7();while(!![]){try{const _0x1949b4=parseInt(_0x2b02fe(0xd9))/0x1+-parseInt(_0x2b02fe(0xea))/0x2*(parseInt(_0x2b02fe(0xba))/0x3)+parseInt(_0x2b02fe(0xdc))/0x4*(-parseInt(_0x2b02fe(0xc0))/0x5)+parseInt(_0x2b02fe(0xe7))/0x6*(-parseInt(_0x2b02fe(0xfb))/0x7)+parseInt(_0x2b02fe(0x9d))/0x8*(parseInt(_0x2b02fe(0xb7))/0x9)+parseInt(_0x2b02fe(0xd8))/0xa+-parseInt(_0x2b02fe(0xa2))/0xb*(-parseInt(_0x2b02fe(0xdb))/0xc);if(_0x1949b4===_0x32c3b2)break;else _0x1eb092['push'](_0x1eb092['shift']());}catch(_0x1bc0f2){_0x1eb092['push'](_0x1eb092['shift']());}}}(_0x13f7,0x866e3));function _0x13f7(){const _0x519ac7=['get','forEach','filter','/list','_userService','2514OgnqyL','type','find','8gNAnOJ','_injector','slice','listComments','/universer-api/user/list','parse','unitId','/delete','replies','Solved','Edit','replyId','UNRECOGNIZED','_threadCommentDataSourceService','rangeType','threadId','Solve','6398VbQrpr','defineProperty','requireSession','getOwnPropertyDescriptor','UNIVER_UNKNOWN','COMMENT','pipe','_sessionService','_initDataSource','updateComment','personId','getCurrentUser','userId','map','8KgoOcv','_init','getComment','user','solved','451oDFEnG','post','users','OpenOrReOpen','_httpService','delete','_initUserSync','setConfig','thread-comment-data-source.config','createTimestamp','onReady','Add','customRanges','payload','_config','root','Reply','getUnit','YYYY/MM/DD\x20HH:mm','_threadCommentModel','size','5901309rlIYvy','comment','dataSource','279771ZRKZIV','resolved','symbol','content','ref','_commentService','9345LHCzOU','syncUpdateMutationToColla','/add','userID','/reply','add','deleteComment','rangeId','getUser','code','format','subscribe','Delete','commentUpdate$','parentId','getMemberID','error','resolveComment','Unknown','body','onStarting','length','disposeWithMe','stringify','4783050ehZnzV','199311FYOhuF','/edit','2580PZKMOo','76swLjZn','comments','/solved','addUser','/universer-api/comment/unit/','_threadCommentDataSource'];_0x13f7=function(){return _0x519ac7;};return _0x13f7();}import{CommentService as _0x278907,CollaborationSessionService as _0xba6ff4,UniverCollaborationClientPlugin as _0xbc84fc}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42a3ce}from'@univerjs-pro/license';import{dayjs as _0x4b3fc3,UserManagerService as _0x29941a,Inject as _0x45f7ff,Injector as _0x1f501e,Disposable as _0xfa304e,CustomRangeType as _0x66cff7,UniverInstanceType as _0xd39200,DependentOn as _0x1eb8c7,IConfigService as _0x24fb91,Plugin as _0x172dee,merge as _0xc29423}from'@univerjs/core';function _0x18a9(_0x4bfd9d,_0x519b1a){const _0x13f7e6=_0x13f7();return _0x18a9=function(_0x18a9da,_0xe24b01){_0x18a9da=_0x18a9da-0x9a;let _0x441a72=_0x13f7e6[_0x18a9da];return _0x441a72;},_0x18a9(_0x4bfd9d,_0x519b1a);}import{UniverThreadCommentUIPlugin as _0x138b23}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2e14ce,IThreadCommentDataSourceService as _0x4091ea}from'@univerjs/thread-comment';import{bufferTime as _0x52d5ed}from'rxjs';import{HTTPService as _0x4dec66}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x46ee3a=>(_0x46ee3a[_0x46ee3a[_0x35a9d0(0xa5)]=0x0]='OpenOrReOpen',_0x46ee3a[_0x46ee3a[_0x35a9d0(0xf3)]=0x1]=_0x35a9d0(0xf3),_0x46ee3a[_0x46ee3a[_0x35a9d0(0xf6)]=-0x1]=_0x35a9d0(0xf6),_0x46ee3a))(I||{}),v=(_0x26e7d3=>(_0x26e7d3[_0x26e7d3[_0x35a9d0(0xd2)]=0x0]='Unknown',_0x26e7d3[_0x26e7d3[_0x35a9d0(0xad)]=0x1]='Add',_0x26e7d3[_0x26e7d3[_0x35a9d0(0xb2)]=0x2]=_0x35a9d0(0xb2),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xf4)]=0x3]=_0x35a9d0(0xf4),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xcc)]=0x4]=_0x35a9d0(0xcc),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xfa)]=0x5]=_0x35a9d0(0xfa),_0x26e7d3[_0x26e7d3[_0x35a9d0(0xf6)]=-0x1]='UNRECOGNIZED',_0x26e7d3))(v||{});const D=_0x3644b5=>_0x4b3fc3(new Date(+_0x3644b5))[_0x35a9d0(0xca)](_0x35a9d0(0xb4)),B=async(_0x409953,_0x98eca7)=>{const _0x51eefa=_0x35a9d0,_0x2bb218=_0x409953[_0x51eefa(0xe2)](_0x29941a),_0x17377e=_0x409953[_0x51eefa(0xe2)](_0x4dec66);_0x98eca7['forEach'](_0x74117d=>{const _0x2db544=_0x51eefa;_0x2bb218[_0x2db544(0xc8)](_0x74117d)&&_0x98eca7[_0x2db544(0xa7)](_0x74117d);}),_0x98eca7[_0x51eefa(0xb6)]&&(await _0x17377e['get'](_0x51eefa(0xee),{'params':{'userIDs':[..._0x98eca7]}}))[_0x51eefa(0xd3)][_0x51eefa(0xa4)][_0x51eefa(0xe3)](_0x49d7c6=>{_0x49d7c6&&_0x2bb218['addUser'](_0x49d7c6);});};var K=Object[_0x35a9d0(0xfe)],V=(_0xe9e955,_0xc8ece8,_0x20a144,_0x4cef4e)=>{const _0x5cff45=_0x35a9d0;for(var _0x327e9e=_0x4cef4e>0x1?void 0x0:_0x4cef4e?K(_0xc8ece8,_0x20a144):_0xc8ece8,_0x283a3a=_0xe9e955[_0x5cff45(0xd5)]-0x1,_0x19cbe4;_0x283a3a>=0x0;_0x283a3a--)(_0x19cbe4=_0xe9e955[_0x283a3a])&&(_0x327e9e=_0x19cbe4(_0x327e9e)||_0x327e9e);return _0x327e9e;},p=(_0x282c8a,_0x36cfc5)=>(_0xe346f,_0x30445b)=>_0x36cfc5(_0xe346f,_0x30445b,_0x282c8a);let S=class extends _0xfa304e{constructor(_0x2d1366,_0x4dbebf,_0x1191ec,_0x2d7e97){const _0x2acdd5=_0x35a9d0;super(),this[_0x2acdd5(0xbf)]=_0x2d1366,this[_0x2acdd5(0xb5)]=_0x4dbebf,this['_userService']=_0x1191ec,this[_0x2acdd5(0xeb)]=_0x2d7e97,this[_0x2acdd5(0x9e)](),this[_0x2acdd5(0xa8)]();}['_initUserSync'](){const _0x1bd377=_0x35a9d0;this['disposeWithMe'](this[_0x1bd377(0xb5)][_0x1bd377(0xcd)][_0x1bd377(0x101)](_0x52d5ed(0x10))[_0x1bd377(0xcb)](_0xb4fe58=>{const _0x2b1384=_0x1bd377,_0x2bab93=new Set();_0xb4fe58[_0x2b1384(0xe3)](_0x5b3988=>{const _0x8a37c=_0x2b1384;switch(_0x5b3988[_0x8a37c(0xe8)]){case'add':{const _0x587eda=_0x5b3988[_0x8a37c(0xaf)][_0x8a37c(0x105)];_0x2bab93[_0x8a37c(0xc5)](_0x587eda);break;}}}),B(this[_0x2b1384(0xeb)],_0x2bab93);}));}[_0x35a9d0(0x9e)](){const _0x10f902=_0x35a9d0;this[_0x10f902(0xd6)](this[_0x10f902(0xbf)][_0x10f902(0xcd)][_0x10f902(0xcb)](async _0x1ceff0=>{const _0x223a70=_0x10f902;var _0x3265f3,_0x87c3ae,_0x534274,_0x18eed5;const _0x135f64=(_0x3265f3=this[_0x223a70(0xb5)][_0x223a70(0xb3)](_0x1ceff0[_0x223a70(0xf0)])['find'](_0x396d00=>_0x396d00[_0x223a70(0xf9)]===_0x1ceff0['threadId']))==null?void 0x0:_0x3265f3[_0x223a70(0xb1)];if(!_0x135f64)return;const {unitId:_0x241110,subUnitId:_0x4309e4}=_0x135f64;switch(_0x1ceff0[_0x223a70(0xa0)]&&this[_0x223a70(0xe6)][_0x223a70(0xdf)](_0x1ceff0[_0x223a70(0xa0)]),_0x1ceff0['type']){case v[_0x223a70(0xad)]:break;case v[_0x223a70(0xb2)]:{this[_0x223a70(0xb5)]['addComment'](_0x241110,_0x4309e4,{'unitId':_0x241110,'subUnitId':_0x4309e4,'ref':'','id':_0x1ceff0['replyId'],'dT':D(+_0x1ceff0['createTimestamp']),'threadId':_0x1ceff0['threadId'],'personId':(_0x534274=(_0x87c3ae=_0x1ceff0[_0x223a70(0xa0)])==null?void 0x0:_0x87c3ae[_0x223a70(0xc3)])!=null?_0x534274:_0x1ceff0[_0x223a70(0x9b)],'text':JSON[_0x223a70(0xef)](_0x1ceff0[_0x223a70(0xbd)]),'parentId':_0x135f64['id']});break;}case v[_0x223a70(0xcc)]:{const _0x36bea3=this[_0x223a70(0xb5)][_0x223a70(0x9f)](_0x241110,_0x4309e4,_0x1ceff0[_0x223a70(0xf5)]);_0x36bea3&&_0x36bea3[_0x223a70(0xce)]&&this['_threadCommentModel'][_0x223a70(0xc6)](_0x241110,_0x4309e4,_0x1ceff0[_0x223a70(0xf5)]);break;}case v[_0x223a70(0xf4)]:{this[_0x223a70(0xb5)][_0x223a70(0x104)](_0x241110,_0x4309e4,{'commentId':_0x1ceff0[_0x223a70(0xf5)],'text':JSON[_0x223a70(0xef)](_0x1ceff0[_0x223a70(0xbd)])});break;}case v[_0x223a70(0xfa)]:{const _0x181e4f=(_0x18eed5=this[_0x223a70(0xb5)][_0x223a70(0xb3)](_0x1ceff0[_0x223a70(0xf0)])[_0x223a70(0xe9)](_0x2ef9a2=>_0x2ef9a2['threadId']===_0x1ceff0[_0x223a70(0xf9)]))==null?void 0x0:_0x18eed5[_0x223a70(0xb1)];_0x181e4f&&this[_0x223a70(0xb5)][_0x223a70(0xd1)](_0x241110,_0x4309e4,_0x181e4f['id'],_0x1ceff0[_0x223a70(0xa1)]===I[_0x223a70(0xf3)]);break;}}}));}};S=V([p(0x0,_0x45f7ff(_0x278907)),p(0x1,_0x45f7ff(_0x2e14ce)),p(0x2,_0x45f7ff(_0x29941a)),p(0x3,_0x45f7ff(_0x1f501e))],S);const z=_0x35a9d0(0xaa),M={};var k=Object[_0x35a9d0(0xfe)],Q=(_0x100267,_0x1a54c6,_0x451415,_0x4b3058)=>{const _0x2691d2=_0x35a9d0;for(var _0x266e1f=_0x4b3058>0x1?void 0x0:_0x4b3058?k(_0x1a54c6,_0x451415):_0x1a54c6,_0x22c34d=_0x100267[_0x2691d2(0xd5)]-0x1,_0x359789;_0x22c34d>=0x0;_0x22c34d--)(_0x359789=_0x100267[_0x22c34d])&&(_0x266e1f=_0x359789(_0x266e1f)||_0x266e1f);return _0x266e1f;},_=(_0x3678f8,_0x142bd0)=>(_0x9641dc,_0xc8b486)=>_0x142bd0(_0x9641dc,_0xc8b486,_0x3678f8);function X(_0x61d84c,_0x193f6c){const _0x2e0147=_0x35a9d0,_0x12db8e=_0x61d84c[_0x2e0147(0xf2)][0x0];return{..._0x193f6c,'id':_0x12db8e[_0x2e0147(0xf5)],'resolved':_0x61d84c['solved']===0x1,'dT':D(_0x12db8e[_0x2e0147(0xab)]),'personId':_0x12db8e[_0x2e0147(0x9b)],'threadId':_0x12db8e['threadId']};}function ee(_0x30343b,_0x582cb9,_0x459565){const _0x4f53c0=_0x35a9d0;var _0x14a79e,_0x2fb51d;if(((_0x2fb51d=(_0x14a79e=_0x30343b==null?void 0x0:_0x30343b[_0x4f53c0(0xf2)])==null?void 0x0:_0x14a79e[_0x4f53c0(0xd5)])!=null?_0x2fb51d:0x0)>0x0){const _0x520285=(_0x4870f7,_0x33a204)=>({'id':_0x4870f7[_0x4f53c0(0xf5)],'threadId':_0x4870f7[_0x4f53c0(0xf9)],'dT':D(_0x4870f7[_0x4f53c0(0xab)]),'personId':_0x4870f7[_0x4f53c0(0x9b)],'resolved':_0x30343b[_0x4f53c0(0xa1)]===I[_0x4f53c0(0xf3)],'unitId':_0x582cb9,'subUnitId':_0x459565,'text':JSON[_0x4f53c0(0xef)](_0x4870f7[_0x4f53c0(0xbd)]),'parentId':_0x33a204}),_0x13a7c6=_0x520285(_0x30343b[_0x4f53c0(0xf2)][0x0]);return{..._0x13a7c6,'children':_0x30343b[_0x4f53c0(0xf2)][_0x4f53c0(0xec)](0x1)[_0x4f53c0(0x9c)](_0x58ddfb=>_0x520285(_0x58ddfb,_0x13a7c6['id']))};}return null;}let f=class{constructor(_0x2aadba,_0x279a18,_0xaea661,_0x31844e){const _0x5a89e3=_0x35a9d0;this[_0x5a89e3(0xa6)]=_0x2aadba,this[_0x5a89e3(0xe6)]=_0x279a18,this['_sessionService']=_0xaea661,this['_injector']=_0x31844e;}async['addComment'](_0x278065){const _0x16202c=_0x35a9d0;var _0x19f3da,_0x22488a;const {parentId:_0x77de2e,unitId:_0xad987d,text:_0x4aa0cd,threadId:_0x1ff31a}=_0x278065,_0x1bb8db=(_0x22488a=(_0x19f3da=_0x4aa0cd['customRanges'])==null?void 0x0:_0x19f3da['filter'](_0x5043b0=>_0x5043b0[_0x16202c(0xf8)]===_0x66cff7[_0x16202c(0x100)])[_0x16202c(0x9c)](_0x51df0e=>_0x51df0e[_0x16202c(0xc7)]))!=null?_0x22488a:[],_0x333b90=JSON[_0x16202c(0xd7)](_0x4aa0cd),_0x16c654=(await this[_0x16202c(0x102)][_0x16202c(0xfd)](_0xad987d))['getMemberID']();if(_0x77de2e){const _0x42ddcc={'memberId':_0x16c654,'unitId':_0xad987d,'content':_0x333b90,'mention':_0x1bb8db,'threadId':_0x1ff31a},_0x38084f=(await this['_httpService'][_0x16202c(0xa3)](_0x16202c(0xe0)+_0xad987d+_0x16202c(0xc4),{'body':_0x42ddcc}))[_0x16202c(0xd3)]['reply'];return{..._0x278065,'id':_0x38084f[_0x16202c(0xf5)],'dT':_0x4b3fc3(+_0x38084f[_0x16202c(0xab)])['format'](_0x16202c(0xb4)),'personId':_0x38084f[_0x16202c(0x9b)]};}else{const _0x3f697d={'memberId':_0x16c654,'unitId':_0xad987d,'content':_0x333b90,'mention':_0x1bb8db},_0x3dab70=await this['_httpService'][_0x16202c(0xa3)](_0x16202c(0xe0)+_0xad987d+_0x16202c(0xc2),{'body':_0x3f697d});return X(_0x3dab70['body'][_0x16202c(0xb8)],_0x278065);}}async[_0x35a9d0(0x104)](_0x506571){const _0x26839b=_0x35a9d0;var _0x4ddc13,_0x24b61d;const {text:_0x30aafa,unitId:_0x5e378e}=_0x506571,_0x41914c=(_0x24b61d=(_0x4ddc13=_0x30aafa[_0x26839b(0xae)])==null?void 0x0:_0x4ddc13[_0x26839b(0xe4)](_0x24fde8=>_0x24fde8[_0x26839b(0xf8)]===_0x66cff7[_0x26839b(0x100)])[_0x26839b(0x9c)](_0x599f89=>_0x599f89[_0x26839b(0xc7)]))!=null?_0x24b61d:[],_0x158e53=JSON[_0x26839b(0xd7)](_0x30aafa),_0x176521=_0x506571[_0x26839b(0xf9)],_0x508453=_0x506571['id'],_0x15f989={'memberId':(await this[_0x26839b(0x102)][_0x26839b(0xfd)](_0x5e378e))[_0x26839b(0xcf)](),'unitId':_0x5e378e,'threadId':_0x176521,'mention':_0x41914c,'content':_0x158e53,'replyId':_0x508453},_0x29aaad=await this[_0x26839b(0xa6)]['post']('/universer-api/comment/unit/'+_0x5e378e+_0x26839b(0xda),{'body':_0x15f989});return!_0x29aaad['body'][_0x26839b(0xd0)]||_0x29aaad[_0x26839b(0xd3)][_0x26839b(0xd0)]['code']===0x1;}async[_0x35a9d0(0xd1)](_0x1d05b1){const _0x2b71d7=_0x35a9d0,{unitId:_0x19bea6}=_0x1d05b1,_0x32bb81=_0x1d05b1['threadId'],_0x16cac8={'memberId':this[_0x2b71d7(0xe6)][_0x2b71d7(0x9a)]()[_0x2b71d7(0xc3)],'unitId':_0x19bea6,'threadId':_0x32bb81,'solved':_0x1d05b1[_0x2b71d7(0xbb)]?I[_0x2b71d7(0xf3)]:I[_0x2b71d7(0xa5)]},_0xd4a211=await this['_httpService'][_0x2b71d7(0xa3)](_0x2b71d7(0xe0)+_0x19bea6+_0x2b71d7(0xde),{'body':_0x16cac8});return!_0xd4a211[_0x2b71d7(0xd3)][_0x2b71d7(0xd0)]||_0xd4a211['body'][_0x2b71d7(0xd0)][_0x2b71d7(0xc9)]===0x1;}async['deleteComment'](_0x5e59e3,_0x10afcb,_0xdd6edc,_0x2a7881){const _0x480fdc=_0x35a9d0,_0x2aa2c5={'memberId':(await this[_0x480fdc(0x102)]['requireSession'](_0x5e59e3))[_0x480fdc(0xcf)](),'threadId':_0xdd6edc,'replyId':_0x2a7881,'unitId':_0x5e59e3},_0x56b878=await this[_0x480fdc(0xa6)][_0x480fdc(0xa3)](_0x480fdc(0xe0)+_0x5e59e3+_0x480fdc(0xf1),{'body':_0x2aa2c5});return!_0x56b878['body'][_0x480fdc(0xd0)]||_0x56b878['body'][_0x480fdc(0xd0)]['code']===0x1;}async[_0x35a9d0(0xed)](_0x409305,_0x6e141d,_0x525db2){const _0x5b9092=_0x35a9d0,_0x2f8fac={'unitId':_0x409305,'threadId':_0x525db2},_0x3d3ea0=await this[_0x5b9092(0xa6)][_0x5b9092(0xa3)](_0x5b9092(0xe0)+_0x409305+_0x5b9092(0xe5),{'body':_0x2f8fac}),_0x41a52a=_0x525db2[_0x5b9092(0x9c)](_0x576065=>ee(_0x3d3ea0['body'][_0x5b9092(0xdd)][_0x576065],_0x409305,_0x6e141d))['filter'](Boolean);return Object['values'](_0x3d3ea0['body'][_0x5b9092(0xa4)])[_0x5b9092(0xe3)](_0x253837=>{const _0x2a7363=_0x5b9092;this[_0x2a7363(0xe6)][_0x2a7363(0xdf)](_0x253837);}),_0x41a52a;}['saveCommentToSnapshot'](_0x3362a5){const _0x5c1661=_0x35a9d0;return{'id':_0x3362a5['id'],'threadId':_0x3362a5[_0x5c1661(0xf9)],'ref':_0x3362a5[_0x5c1661(0xbe)]};}};f=Q([_(0x0,_0x45f7ff(_0x4dec66)),_(0x1,_0x45f7ff(_0x29941a)),_(0x2,_0x45f7ff(_0xba6ff4)),_(0x3,_0x45f7ff(_0x1f501e))],f);var re=Object[_0x35a9d0(0xfe)],te=(_0x9ff555,_0x1b0a8c,_0x535ccf,_0x46c744)=>{const _0x524037=_0x35a9d0;for(var _0x4abfc9=_0x46c744>0x1?void 0x0:_0x46c744?re(_0x1b0a8c,_0x535ccf):_0x1b0a8c,_0x4aa95a=_0x9ff555[_0x524037(0xd5)]-0x1,_0x5171c9;_0x4aa95a>=0x0;_0x4aa95a--)(_0x5171c9=_0x9ff555[_0x4aa95a])&&(_0x4abfc9=_0x5171c9(_0x4abfc9)||_0x4abfc9);return _0x4abfc9;},N=(_0xb1c9dd,_0x10dfcb)=>(_0x44d0ab,_0x331e31)=>_0x10dfcb(_0x44d0ab,_0x331e31,_0xb1c9dd);let g=class extends _0xfa304e{constructor(_0x10e142,_0x5ad823){const _0x54cab2=_0x35a9d0;super(),this[_0x54cab2(0xf7)]=_0x10e142,this[_0x54cab2(0xe1)]=_0x5ad823,this[_0x54cab2(0x103)]();}[_0x35a9d0(0x103)](){const _0x3cd94d=_0x35a9d0;this[_0x3cd94d(0xf7)][_0x3cd94d(0xb9)]=this[_0x3cd94d(0xe1)],this[_0x3cd94d(0xf7)][_0x3cd94d(0xc1)]=!0x1;}};g=te([N(0x0,_0x4091ea),N(0x1,_0x45f7ff(f))],g);var se=Object[_0x35a9d0(0xfc)],oe=Object[_0x35a9d0(0xfe)],ne=(_0xe4b31e,_0x3b6f3e,_0xff0711)=>_0x3b6f3e in _0xe4b31e?se(_0xe4b31e,_0x3b6f3e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xff0711}):_0xe4b31e[_0x3b6f3e]=_0xff0711,ie=(_0x8c184a,_0x194765,_0x3f4fc2,_0x520208)=>{for(var _0x2a6198=_0x520208>0x1?void 0x0:_0x520208?oe(_0x194765,_0x3f4fc2):_0x194765,_0x2bdf48=_0x8c184a['length']-0x1,_0xfc2f26;_0x2bdf48>=0x0;_0x2bdf48--)(_0xfc2f26=_0x8c184a[_0x2bdf48])&&(_0x2a6198=_0xfc2f26(_0x2a6198)||_0x2a6198);return _0x2a6198;},w=(_0xebe466,_0x11f6dd)=>(_0x5b5d93,_0xf4f68e)=>_0x11f6dd(_0x5b5d93,_0xf4f68e,_0xebe466),$=(_0x2cc094,_0x1b8180,_0x5b453e)=>ne(_0x2cc094,typeof _0x1b8180!=_0x35a9d0(0xbc)?_0x1b8180+'':_0x1b8180,_0x5b453e);let b=class extends _0x172dee{constructor(_0x3247e3=M,_0x4d2233,_0x15128d){const _0x3a70fc=_0x35a9d0;super(),this[_0x3a70fc(0xb0)]=_0x3247e3,this['_injector']=_0x4d2233,this['_configService']=_0x15128d;const {..._0x1df743}=_0xc29423({},M,this[_0x3a70fc(0xb0)]);this['_configService'][_0x3a70fc(0xa9)](z,_0x1df743);}[_0x35a9d0(0xd4)](){[[f],[g],[S]]['forEach'](_0x173ce9=>{const _0x4c3418=_0x18a9;this[_0x4c3418(0xeb)][_0x4c3418(0xc5)](_0x173ce9);});}[_0x35a9d0(0xac)](){const _0x9bad90=_0x35a9d0;this[_0x9bad90(0xeb)]['get'](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,_0x35a9d0(0xe8),_0xd39200[_0x35a9d0(0xff)]),b=ie([_0x1eb8c7(_0x138b23,_0xbc84fc,_0x42a3ce),w(0x1,_0x45f7ff(_0x1f501e)),w(0x2,_0x24fb91)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x229e(){const _0x5c7c7c=['merge','_config','/reply','dataSource','@univerjs/thread-comment-ui','Reply','onReady','UniverProCollaborationClient','root','4knkQmf','33vPqbdT','deleteComment','_commentService','5034789IGuzqN','object','getUnit','3573588fttLrw','format','getCurrentUser','rxjs','COMMENT','_threadCommentDataSource','updateComment','Delete','slice','createTimestamp','Plugin','160Fxtlja','YYYY/MM/DD\x20HH:mm','get','delete','length','addComment','/edit','amd','_userService','syncUpdateMutationToColla','users','@univerjs-pro/collaboration-client','function','@univerjs-pro/license','Inject','UniverProLicense','CollaborationSessionService','/universer-api/user/list','862934dyZlpi','Unknown','DependentOn','comment','UNRECOGNIZED','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dayjs','HTTPService','subscribe','UNIVER_UNKNOWN','UniverThreadCommentDataSourcePlugin','comments','saveCommentToSnapshot','getMemberID','addUser','UniverThreadCommentUi','type','_injector','_httpService','_sessionService','userId','content','_configService','Solved','rangeType','59874nsbsgT','replies','@univerjs/network','Injector','Add','resolveComment','_threadCommentModel','CustomRangeType','error','pipe','Disposable','OpenOrReOpen','values','replyId','@univerjs/core','personId','user','requireSession','map','8ufMquO','UniverCollaborationClientPlugin','_initDataSource','_threadCommentDataSourceService','Solve','thread-comment-data-source.config','reply','forEach','setConfig','/solved','customRanges','/list','disposeWithMe','resolved','post','/universer-api/comment/unit/','rangeId','find','@univerjs/thread-comment','_initUserSync','IConfigService','symbol','UniverLicensePlugin','UserManagerService','add','parse','2542767Zosbyy','body','stringify','getUser','payload','10DtQQGz','commentUpdate$','850681rBrQvw','UniverInstanceType','parentId','Module','solved','Edit','UniverThreadComment','code','ThreadCommentModel','size','6603989UVdZHE','defineProperty','UniverProThreadCommentDatasource','unitId','threadId','getOwnPropertyDescriptor'];_0x229e=function(){return _0x5c7c7c;};return _0x229e();}function _0x2d1b(_0x3b6582,_0x4d61de){const _0x229e7f=_0x229e();return _0x2d1b=function(_0x2d1b92,_0x291af5){_0x2d1b92=_0x2d1b92-0x16d;let _0x80825=_0x229e7f[_0x2d1b92];return _0x80825;},_0x2d1b(_0x3b6582,_0x4d61de);}(function(_0x47f555,_0x52f1f1){const _0xa7d6a3=_0x2d1b,_0xef345b=_0x47f555();while(!![]){try{const _0x1b0160=parseInt(_0xa7d6a3(0x171))/0x1+-parseInt(_0xa7d6a3(0x1ae))/0x2+-parseInt(_0xa7d6a3(0x1f5))/0x3*(parseInt(_0xa7d6a3(0x18a))/0x4)+parseInt(_0xa7d6a3(0x19c))/0x5*(parseInt(_0xa7d6a3(0x1c8))/0x6)+parseInt(_0xa7d6a3(0x17b))/0x7*(parseInt(_0xa7d6a3(0x1db))/0x8)+parseInt(_0xa7d6a3(0x18e))/0x9*(parseInt(_0xa7d6a3(0x16f))/0xa)+parseInt(_0xa7d6a3(0x18b))/0xb*(-parseInt(_0xa7d6a3(0x191))/0xc);if(_0x1b0160===_0x52f1f1)break;else _0xef345b['push'](_0xef345b['shift']());}catch(_0x31590e){_0xef345b['push'](_0xef345b['shift']());}}}(_0x229e,0x7a2b4),function(_0x2226cd,_0x1f3f31){const _0x1069b4=_0x2d1b;typeof exports==_0x1069b4(0x18f)&&typeof module<'u'?_0x1f3f31(exports,require('@univerjs-pro/collaboration-client'),require(_0x1069b4(0x1a9)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x1069b4(0x1ed)),require(_0x1069b4(0x194)),require(_0x1069b4(0x1ca))):typeof define==_0x1069b4(0x1a8)&&define[_0x1069b4(0x1a3)]?define(['exports',_0x1069b4(0x1a7),_0x1069b4(0x1a9),_0x1069b4(0x1d6),_0x1069b4(0x185),_0x1069b4(0x1ed),_0x1069b4(0x194),_0x1069b4(0x1ca)],_0x1f3f31):(_0x2226cd=typeof globalThis<'u'?globalThis:_0x2226cd||self,_0x1f3f31(_0x2226cd[_0x1069b4(0x17d)]={},_0x2226cd[_0x1069b4(0x188)],_0x2226cd[_0x1069b4(0x1ab)],_0x2226cd['UniverCore'],_0x2226cd[_0x1069b4(0x1be)],_0x2226cd[_0x1069b4(0x177)],_0x2226cd[_0x1069b4(0x194)],_0x2226cd['UniverNetwork']));}(this,function(_0x28c108,_0x2c0a2b,_0x515867,_0x336493,_0xc59db6,_0x232014,_0x7b7bf5,_0x5cb215){'use strict';const _0x5da1fe=_0x2d1b;const _0x4ac5be=_0x5da1fe(0x1b4);var _0xaf8467=(_0x55986c=>(_0x55986c[_0x55986c['OpenOrReOpen']=0x0]=_0x5da1fe(0x1d3),_0x55986c[_0x55986c['Solved']=0x1]=_0x5da1fe(0x1c6),_0x55986c[_0x55986c[_0x5da1fe(0x1b2)]=-0x1]=_0x5da1fe(0x1b2),_0x55986c))(_0xaf8467||{}),_0x58b342=(_0x5c9e0e=>(_0x5c9e0e[_0x5c9e0e[_0x5da1fe(0x1af)]=0x0]='Unknown',_0x5c9e0e[_0x5c9e0e[_0x5da1fe(0x1cc)]=0x1]=_0x5da1fe(0x1cc),_0x5c9e0e[_0x5c9e0e[_0x5da1fe(0x186)]=0x2]=_0x5da1fe(0x186),_0x5c9e0e[_0x5c9e0e['Edit']=0x3]=_0x5da1fe(0x176),_0x5c9e0e[_0x5c9e0e[_0x5da1fe(0x198)]=0x4]=_0x5da1fe(0x198),_0x5c9e0e[_0x5c9e0e[_0x5da1fe(0x1df)]=0x5]=_0x5da1fe(0x1df),_0x5c9e0e[_0x5c9e0e[_0x5da1fe(0x1b2)]=-0x1]=_0x5da1fe(0x1b2),_0x5c9e0e))(_0x58b342||{});const _0x1bcdfb=_0x4dea2c=>_0x336493[_0x5da1fe(0x1b5)](new Date(+_0x4dea2c))[_0x5da1fe(0x192)](_0x5da1fe(0x19d)),_0x23a009=async(_0x410024,_0x115ef9)=>{const _0x14f271=_0x5da1fe,_0x3c56d8=_0x410024['get'](_0x336493['UserManagerService']),_0x245d33=_0x410024[_0x14f271(0x19e)](_0x5cb215[_0x14f271(0x1b6)]);_0x115ef9[_0x14f271(0x1e2)](_0x32d64e=>{const _0x24d488=_0x14f271;_0x3c56d8[_0x24d488(0x16d)](_0x32d64e)&&_0x115ef9[_0x24d488(0x19f)](_0x32d64e);}),_0x115ef9[_0x14f271(0x17a)]&&(await _0x245d33[_0x14f271(0x19e)](_0x14f271(0x1ad),{'params':{'userIDs':[..._0x115ef9]}}))[_0x14f271(0x1f6)]['users']['forEach'](_0x5ccf68=>{const _0x2ca9aa=_0x14f271;_0x5ccf68&&_0x3c56d8[_0x2ca9aa(0x1bd)](_0x5ccf68);});};var _0x5122b3=Object[_0x5da1fe(0x180)],_0x1e72a6=(_0x2127ff,_0x25ad70,_0x1ec7dc,_0xc4fda6)=>{for(var _0x306fab=_0xc4fda6>0x1?void 0x0:_0xc4fda6?_0x5122b3(_0x25ad70,_0x1ec7dc):_0x25ad70,_0x23a355=_0x2127ff['length']-0x1,_0x37e930;_0x23a355>=0x0;_0x23a355--)(_0x37e930=_0x2127ff[_0x23a355])&&(_0x306fab=_0x37e930(_0x306fab)||_0x306fab);return _0x306fab;},_0x457bad=(_0x5a4554,_0x153a35)=>(_0x2610b2,_0x27c98a)=>_0x153a35(_0x2610b2,_0x27c98a,_0x5a4554);let _0xafc3dd=class extends _0x336493[_0x5da1fe(0x1d2)]{constructor(_0x413a13,_0x55bab5,_0x39a850,_0x2afb6b){const _0x53d873=_0x5da1fe;super(),this[_0x53d873(0x18d)]=_0x413a13,this[_0x53d873(0x1ce)]=_0x55bab5,this[_0x53d873(0x1a4)]=_0x39a850,this[_0x53d873(0x1c0)]=_0x2afb6b,this['_init'](),this[_0x53d873(0x1ee)]();}['_initUserSync'](){const _0xd84452=_0x5da1fe;this[_0xd84452(0x1e7)](this['_threadCommentModel']['commentUpdate$'][_0xd84452(0x1d1)](_0x7b7bf5['bufferTime'](0x10))[_0xd84452(0x1b7)](_0x1fe055=>{const _0x5c41d0=_0xd84452,_0xad149c=new Set();_0x1fe055[_0x5c41d0(0x1e2)](_0x4690f8=>{const _0x2845af=_0x5c41d0;switch(_0x4690f8[_0x2845af(0x1bf)]){case _0x2845af(0x1f3):{const _0x2e3171=_0x4690f8[_0x2845af(0x16e)][_0x2845af(0x1d7)];_0xad149c[_0x2845af(0x1f3)](_0x2e3171);break;}}}),_0x23a009(this['_injector'],_0xad149c);}));}['_init'](){const _0x32db9a=_0x5da1fe;this[_0x32db9a(0x1e7)](this[_0x32db9a(0x18d)][_0x32db9a(0x170)][_0x32db9a(0x1b7)](async _0x37e4c5=>{const _0xd1f206=_0x32db9a;var _0xb0dfce,_0x490aed,_0x2c4dff,_0x9d254b;const _0xd1e5ef=(_0xb0dfce=this[_0xd1f206(0x1ce)][_0xd1f206(0x190)](_0x37e4c5[_0xd1f206(0x17e)])[_0xd1f206(0x1ec)](_0x207082=>_0x207082['threadId']===_0x37e4c5[_0xd1f206(0x17f)]))==null?void 0x0:_0xb0dfce[_0xd1f206(0x189)];if(!_0xd1e5ef)return;const {unitId:_0x5a9208,subUnitId:_0x4f734a}=_0xd1e5ef;switch(_0x37e4c5[_0xd1f206(0x1d8)]&&this[_0xd1f206(0x1a4)][_0xd1f206(0x1bd)](_0x37e4c5['user']),_0x37e4c5['type']){case _0x58b342['Add']:break;case _0x58b342[_0xd1f206(0x186)]:{this[_0xd1f206(0x1ce)]['addComment'](_0x5a9208,_0x4f734a,{'unitId':_0x5a9208,'subUnitId':_0x4f734a,'ref':'','id':_0x37e4c5['replyId'],'dT':_0x1bcdfb(+_0x37e4c5[_0xd1f206(0x19a)]),'threadId':_0x37e4c5[_0xd1f206(0x17f)],'personId':(_0x2c4dff=(_0x490aed=_0x37e4c5[_0xd1f206(0x1d8)])==null?void 0x0:_0x490aed['userID'])!=null?_0x2c4dff:_0x37e4c5[_0xd1f206(0x1c3)],'text':JSON[_0xd1f206(0x1f4)](_0x37e4c5['content']),'parentId':_0xd1e5ef['id']});break;}case _0x58b342[_0xd1f206(0x198)]:{const _0x304b1f=this[_0xd1f206(0x1ce)]['getComment'](_0x5a9208,_0x4f734a,_0x37e4c5['replyId']);_0x304b1f&&_0x304b1f[_0xd1f206(0x173)]&&this['_threadCommentModel'][_0xd1f206(0x18c)](_0x5a9208,_0x4f734a,_0x37e4c5[_0xd1f206(0x1d5)]);break;}case _0x58b342[_0xd1f206(0x176)]:{this[_0xd1f206(0x1ce)][_0xd1f206(0x197)](_0x5a9208,_0x4f734a,{'commentId':_0x37e4c5[_0xd1f206(0x1d5)],'text':JSON[_0xd1f206(0x1f4)](_0x37e4c5[_0xd1f206(0x1c4)])});break;}case _0x58b342[_0xd1f206(0x1df)]:{const _0x39e013=(_0x9d254b=this[_0xd1f206(0x1ce)][_0xd1f206(0x190)](_0x37e4c5[_0xd1f206(0x17e)])[_0xd1f206(0x1ec)](_0x1ee5cf=>_0x1ee5cf[_0xd1f206(0x17f)]===_0x37e4c5[_0xd1f206(0x17f)]))==null?void 0x0:_0x9d254b[_0xd1f206(0x189)];_0x39e013&&this[_0xd1f206(0x1ce)][_0xd1f206(0x1cd)](_0x5a9208,_0x4f734a,_0x39e013['id'],_0x37e4c5[_0xd1f206(0x175)]===_0xaf8467[_0xd1f206(0x1c6)]);break;}}}));}};_0xafc3dd=_0x1e72a6([_0x457bad(0x0,_0x336493[_0x5da1fe(0x1aa)](_0x2c0a2b['CommentService'])),_0x457bad(0x1,_0x336493[_0x5da1fe(0x1aa)](_0x232014[_0x5da1fe(0x179)])),_0x457bad(0x2,_0x336493['Inject'](_0x336493[_0x5da1fe(0x1f2)])),_0x457bad(0x3,_0x336493['Inject'](_0x336493[_0x5da1fe(0x1cb)]))],_0xafc3dd);const _0x3a1950=_0x5da1fe(0x1e0),_0x2b7cde={};var _0x3c0d39=Object[_0x5da1fe(0x180)],_0x137c43=(_0x3ce25,_0x68ecf9,_0x4fedc0,_0x1ecb85)=>{const _0x3fe8bc=_0x5da1fe;for(var _0x241826=_0x1ecb85>0x1?void 0x0:_0x1ecb85?_0x3c0d39(_0x68ecf9,_0x4fedc0):_0x68ecf9,_0x5d0a6b=_0x3ce25[_0x3fe8bc(0x1a0)]-0x1,_0x303cb5;_0x5d0a6b>=0x0;_0x5d0a6b--)(_0x303cb5=_0x3ce25[_0x5d0a6b])&&(_0x241826=_0x303cb5(_0x241826)||_0x241826);return _0x241826;},_0x6ff136=(_0x293b93,_0x4ba11f)=>(_0x270abf,_0x51ee2d)=>_0x4ba11f(_0x270abf,_0x51ee2d,_0x293b93);function _0x42ab56(_0x5782e1,_0x1a7180){const _0x33e7e4=_0x5da1fe,_0x156ff7=_0x5782e1['replies'][0x0];return{..._0x1a7180,'id':_0x156ff7['replyId'],'resolved':_0x5782e1[_0x33e7e4(0x175)]===0x1,'dT':_0x1bcdfb(_0x156ff7[_0x33e7e4(0x19a)]),'personId':_0x156ff7['userId'],'threadId':_0x156ff7[_0x33e7e4(0x17f)]};}function _0x5495b4(_0x300eb7,_0x28c03b,_0x39b7bb){const _0x4565a4=_0x5da1fe;var _0x6becfd,_0x153b34;if(((_0x153b34=(_0x6becfd=_0x300eb7==null?void 0x0:_0x300eb7[_0x4565a4(0x1c9)])==null?void 0x0:_0x6becfd[_0x4565a4(0x1a0)])!=null?_0x153b34:0x0)>0x0){const _0x3ca868=(_0x3bdc53,_0x3ba4db)=>({'id':_0x3bdc53[_0x4565a4(0x1d5)],'threadId':_0x3bdc53[_0x4565a4(0x17f)],'dT':_0x1bcdfb(_0x3bdc53[_0x4565a4(0x19a)]),'personId':_0x3bdc53[_0x4565a4(0x1c3)],'resolved':_0x300eb7[_0x4565a4(0x175)]===_0xaf8467[_0x4565a4(0x1c6)],'unitId':_0x28c03b,'subUnitId':_0x39b7bb,'text':JSON[_0x4565a4(0x1f4)](_0x3bdc53[_0x4565a4(0x1c4)]),'parentId':_0x3ba4db}),_0x4d75ab=_0x3ca868(_0x300eb7[_0x4565a4(0x1c9)][0x0]);return{..._0x4d75ab,'children':_0x300eb7[_0x4565a4(0x1c9)][_0x4565a4(0x199)](0x1)[_0x4565a4(0x1da)](_0x5b21b2=>_0x3ca868(_0x5b21b2,_0x4d75ab['id']))};}return null;}let _0x4181f7=class{constructor(_0x51fa0a,_0x26c3d4,_0x976b05,_0x5cfe73){const _0x49ace8=_0x5da1fe;this[_0x49ace8(0x1c1)]=_0x51fa0a,this[_0x49ace8(0x1a4)]=_0x26c3d4,this[_0x49ace8(0x1c2)]=_0x976b05,this[_0x49ace8(0x1c0)]=_0x5cfe73;}async[_0x5da1fe(0x1a1)](_0xa5b570){const _0x9d0664=_0x5da1fe;var _0x9cb1ce,_0x5bf7f8;const {parentId:_0x4e514c,unitId:_0x574e94,text:_0x274122,threadId:_0x37a0bd}=_0xa5b570,_0x38a989=(_0x5bf7f8=(_0x9cb1ce=_0x274122[_0x9d0664(0x1e5)])==null?void 0x0:_0x9cb1ce['filter'](_0x3a7943=>_0x3a7943[_0x9d0664(0x1c7)]===_0x336493[_0x9d0664(0x1cf)][_0x9d0664(0x195)])[_0x9d0664(0x1da)](_0x4e3b50=>_0x4e3b50[_0x9d0664(0x1eb)]))!=null?_0x5bf7f8:[],_0x3b7348=JSON[_0x9d0664(0x1f7)](_0x274122),_0x518ecc=(await this['_sessionService'][_0x9d0664(0x1d9)](_0x574e94))[_0x9d0664(0x1bc)]();if(_0x4e514c){const _0x2fb7f8={'memberId':_0x518ecc,'unitId':_0x574e94,'content':_0x3b7348,'mention':_0x38a989,'threadId':_0x37a0bd},_0x26b392=(await this[_0x9d0664(0x1c1)][_0x9d0664(0x1e9)](_0x9d0664(0x1ea)+_0x574e94+_0x9d0664(0x183),{'body':_0x2fb7f8}))[_0x9d0664(0x1f6)][_0x9d0664(0x1e1)];return{..._0xa5b570,'id':_0x26b392[_0x9d0664(0x1d5)],'dT':_0x336493[_0x9d0664(0x1b5)](+_0x26b392['createTimestamp'])[_0x9d0664(0x192)](_0x9d0664(0x19d)),'personId':_0x26b392['userId']};}else{const _0x193298={'memberId':_0x518ecc,'unitId':_0x574e94,'content':_0x3b7348,'mention':_0x38a989},_0x5c75ad=await this['_httpService'][_0x9d0664(0x1e9)]('/universer-api/comment/unit/'+_0x574e94+'/add',{'body':_0x193298});return _0x42ab56(_0x5c75ad['body'][_0x9d0664(0x1b1)],_0xa5b570);}}async[_0x5da1fe(0x197)](_0x112a0e){const _0x4b9e28=_0x5da1fe;var _0x131a78,_0x56105e;const {text:_0x1fcd59,unitId:_0x4825f8}=_0x112a0e,_0x1fef14=(_0x56105e=(_0x131a78=_0x1fcd59[_0x4b9e28(0x1e5)])==null?void 0x0:_0x131a78[_0x4b9e28(0x1b3)](_0x48a152=>_0x48a152[_0x4b9e28(0x1c7)]===_0x336493['CustomRangeType'][_0x4b9e28(0x195)])[_0x4b9e28(0x1da)](_0x1db1ee=>_0x1db1ee[_0x4b9e28(0x1eb)]))!=null?_0x56105e:[],_0x8d99bf=JSON[_0x4b9e28(0x1f7)](_0x1fcd59),_0x1d9100=_0x112a0e[_0x4b9e28(0x17f)],_0x5da4b6=_0x112a0e['id'],_0x504ff0={'memberId':(await this[_0x4b9e28(0x1c2)][_0x4b9e28(0x1d9)](_0x4825f8))[_0x4b9e28(0x1bc)](),'unitId':_0x4825f8,'threadId':_0x1d9100,'mention':_0x1fef14,'content':_0x8d99bf,'replyId':_0x5da4b6},_0x164cd0=await this['_httpService'][_0x4b9e28(0x1e9)](_0x4b9e28(0x1ea)+_0x4825f8+_0x4b9e28(0x1a2),{'body':_0x504ff0});return!_0x164cd0[_0x4b9e28(0x1f6)][_0x4b9e28(0x1d0)]||_0x164cd0[_0x4b9e28(0x1f6)][_0x4b9e28(0x1d0)][_0x4b9e28(0x178)]===0x1;}async[_0x5da1fe(0x1cd)](_0x292673){const _0x2bf315=_0x5da1fe,{unitId:_0x1bc84c}=_0x292673,_0x5cf573=_0x292673['threadId'],_0xd45649={'memberId':this[_0x2bf315(0x1a4)][_0x2bf315(0x193)]()['userID'],'unitId':_0x1bc84c,'threadId':_0x5cf573,'solved':_0x292673[_0x2bf315(0x1e8)]?_0xaf8467['Solved']:_0xaf8467[_0x2bf315(0x1d3)]},_0x20cf56=await this['_httpService'][_0x2bf315(0x1e9)](_0x2bf315(0x1ea)+_0x1bc84c+_0x2bf315(0x1e4),{'body':_0xd45649});return!_0x20cf56[_0x2bf315(0x1f6)][_0x2bf315(0x1d0)]||_0x20cf56['body'][_0x2bf315(0x1d0)][_0x2bf315(0x178)]===0x1;}async[_0x5da1fe(0x18c)](_0x4e0f8f,_0x25e81b,_0x3890f4,_0x24bec5){const _0x4f9c0e=_0x5da1fe,_0x24e9f1={'memberId':(await this['_sessionService']['requireSession'](_0x4e0f8f))[_0x4f9c0e(0x1bc)](),'threadId':_0x3890f4,'replyId':_0x24bec5,'unitId':_0x4e0f8f},_0x1a5ae=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4e0f8f+'/delete',{'body':_0x24e9f1});return!_0x1a5ae[_0x4f9c0e(0x1f6)][_0x4f9c0e(0x1d0)]||_0x1a5ae[_0x4f9c0e(0x1f6)][_0x4f9c0e(0x1d0)][_0x4f9c0e(0x178)]===0x1;}async['listComments'](_0x3fb3d5,_0x27ebb1,_0x19e8ad){const _0x24ad81=_0x5da1fe,_0x4440c9={'unitId':_0x3fb3d5,'threadId':_0x19e8ad},_0x5c9cdf=await this[_0x24ad81(0x1c1)]['post'](_0x24ad81(0x1ea)+_0x3fb3d5+_0x24ad81(0x1e6),{'body':_0x4440c9}),_0x69d639=_0x19e8ad['map'](_0x61b7b8=>_0x5495b4(_0x5c9cdf[_0x24ad81(0x1f6)][_0x24ad81(0x1ba)][_0x61b7b8],_0x3fb3d5,_0x27ebb1))[_0x24ad81(0x1b3)](Boolean);return Object[_0x24ad81(0x1d4)](_0x5c9cdf[_0x24ad81(0x1f6)][_0x24ad81(0x1a6)])[_0x24ad81(0x1e2)](_0x498377=>{this['_userService']['addUser'](_0x498377);}),_0x69d639;}[_0x5da1fe(0x1bb)](_0x418a2e){return{'id':_0x418a2e['id'],'threadId':_0x418a2e['threadId'],'ref':_0x418a2e['ref']};}};_0x4181f7=_0x137c43([_0x6ff136(0x0,_0x336493[_0x5da1fe(0x1aa)](_0x5cb215[_0x5da1fe(0x1b6)])),_0x6ff136(0x1,_0x336493[_0x5da1fe(0x1aa)](_0x336493[_0x5da1fe(0x1f2)])),_0x6ff136(0x2,_0x336493['Inject'](_0x2c0a2b[_0x5da1fe(0x1ac)])),_0x6ff136(0x3,_0x336493[_0x5da1fe(0x1aa)](_0x336493['Injector']))],_0x4181f7);var _0xa7714a=Object[_0x5da1fe(0x180)],_0x3ae1be=(_0x3164ea,_0x6a5ef,_0x3e02e6,_0x2e1bd6)=>{const _0x4e1805=_0x5da1fe;for(var _0x1fc1ae=_0x2e1bd6>0x1?void 0x0:_0x2e1bd6?_0xa7714a(_0x6a5ef,_0x3e02e6):_0x6a5ef,_0x2e6d78=_0x3164ea[_0x4e1805(0x1a0)]-0x1,_0x30845a;_0x2e6d78>=0x0;_0x2e6d78--)(_0x30845a=_0x3164ea[_0x2e6d78])&&(_0x1fc1ae=_0x30845a(_0x1fc1ae)||_0x1fc1ae);return _0x1fc1ae;},_0xfda935=(_0x5431f8,_0x5414ee)=>(_0x37c40f,_0x3b1310)=>_0x5414ee(_0x37c40f,_0x3b1310,_0x5431f8);let _0x49897a=class extends _0x336493[_0x5da1fe(0x1d2)]{constructor(_0x2aad03,_0x1e9f8f){const _0x583918=_0x5da1fe;super(),this[_0x583918(0x1de)]=_0x2aad03,this[_0x583918(0x196)]=_0x1e9f8f,this[_0x583918(0x1dd)]();}[_0x5da1fe(0x1dd)](){const _0x379002=_0x5da1fe;this[_0x379002(0x1de)][_0x379002(0x184)]=this[_0x379002(0x196)],this[_0x379002(0x1de)][_0x379002(0x1a5)]=!0x1;}};_0x49897a=_0x3ae1be([_0xfda935(0x0,_0x232014['IThreadCommentDataSourceService']),_0xfda935(0x1,_0x336493['Inject'](_0x4181f7))],_0x49897a);var _0x586b70=Object[_0x5da1fe(0x17c)],_0x5ed0c2=Object[_0x5da1fe(0x180)],_0x2e17bc=(_0x504836,_0x37e94d,_0xd7f5bd)=>_0x37e94d in _0x504836?_0x586b70(_0x504836,_0x37e94d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd7f5bd}):_0x504836[_0x37e94d]=_0xd7f5bd,_0x59ca94=(_0x21baeb,_0x50727e,_0x297020,_0x3dff86)=>{for(var _0x2871b5=_0x3dff86>0x1?void 0x0:_0x3dff86?_0x5ed0c2(_0x50727e,_0x297020):_0x50727e,_0x38a5e6=_0x21baeb['length']-0x1,_0x9c5569;_0x38a5e6>=0x0;_0x38a5e6--)(_0x9c5569=_0x21baeb[_0x38a5e6])&&(_0x2871b5=_0x9c5569(_0x2871b5)||_0x2871b5);return _0x2871b5;},_0x393a9b=(_0x3699ed,_0x174d6e)=>(_0x4216de,_0x2fc553)=>_0x174d6e(_0x4216de,_0x2fc553,_0x3699ed),_0x3592e8=(_0x373456,_0xb633d1,_0x50a640)=>_0x2e17bc(_0x373456,typeof _0xb633d1!=_0x5da1fe(0x1f0)?_0xb633d1+'':_0xb633d1,_0x50a640);_0x28c108['UniverThreadCommentDataSourcePlugin']=class extends _0x336493[_0x5da1fe(0x19b)]{constructor(_0x947dac=_0x2b7cde,_0xe928fe,_0x41d34c){const _0x32ed25=_0x5da1fe;super(),this[_0x32ed25(0x182)]=_0x947dac,this[_0x32ed25(0x1c0)]=_0xe928fe,this[_0x32ed25(0x1c5)]=_0x41d34c;const {..._0x469c6a}=_0x336493[_0x32ed25(0x181)]({},_0x2b7cde,this[_0x32ed25(0x182)]);this[_0x32ed25(0x1c5)][_0x32ed25(0x1e3)](_0x3a1950,_0x469c6a);}['onStarting'](){const _0x3e351a=_0x5da1fe;[[_0x4181f7],[_0x49897a],[_0xafc3dd]][_0x3e351a(0x1e2)](_0x3d8851=>{const _0x3cb8c0=_0x3e351a;this[_0x3cb8c0(0x1c0)]['add'](_0x3d8851);});}[_0x5da1fe(0x187)](){const _0x340c3e=_0x5da1fe;this[_0x340c3e(0x1c0)]['get'](_0x49897a),this[_0x340c3e(0x1c0)]['get'](_0xafc3dd);}},_0x3592e8(_0x28c108['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x4ac5be),_0x3592e8(_0x28c108['UniverThreadCommentDataSourcePlugin'],_0x5da1fe(0x1bf),_0x336493[_0x5da1fe(0x172)][_0x5da1fe(0x1b8)]),_0x28c108[_0x5da1fe(0x1b9)]=_0x59ca94([_0x336493[_0x5da1fe(0x1b0)](_0xc59db6['UniverThreadCommentUIPlugin'],_0x2c0a2b[_0x5da1fe(0x1dc)],_0x515867[_0x5da1fe(0x1f1)]),_0x393a9b(0x1,_0x336493['Inject'](_0x336493[_0x5da1fe(0x1cb)])),_0x393a9b(0x2,_0x336493[_0x5da1fe(0x1ef)])],_0x28c108['UniverThreadCommentDataSourcePlugin']),Object[_0x5da1fe(0x17c)](_0x28c108,Symbol['toStringTag'],{'value':_0x5da1fe(0x174)});}));
|
|
1
|
+
function _0x3871(_0x2af6eb,_0x4184b1){const _0x425224=_0x4252();return _0x3871=function(_0x387153,_0x354f9c){_0x387153=_0x387153-0xaf;let _0x58195b=_0x425224[_0x387153];return _0x58195b;},_0x3871(_0x2af6eb,_0x4184b1);}(function(_0x4cc55c,_0x1b8b13){const _0x1d0b0c=_0x3871,_0x559d99=_0x4cc55c();while(!![]){try{const _0x30fd98=parseInt(_0x1d0b0c(0xca))/0x1*(parseInt(_0x1d0b0c(0x102))/0x2)+-parseInt(_0x1d0b0c(0xe6))/0x3+parseInt(_0x1d0b0c(0xc9))/0x4+parseInt(_0x1d0b0c(0x113))/0x5+-parseInt(_0x1d0b0c(0xf3))/0x6+-parseInt(_0x1d0b0c(0x110))/0x7+-parseInt(_0x1d0b0c(0xf7))/0x8;if(_0x30fd98===_0x1b8b13)break;else _0x559d99['push'](_0x559d99['shift']());}catch(_0x2d0ef5){_0x559d99['push'](_0x559d99['shift']());}}}(_0x4252,0x1e181),function(_0x5c826a,_0x528672){const _0x9314ba=_0x3871;typeof exports=='object'&&typeof module<'u'?_0x528672(exports,require('@univerjs-pro/collaboration-client'),require(_0x9314ba(0x11c)),require(_0x9314ba(0x118)),require(_0x9314ba(0xb9)),require('@univerjs/thread-comment'),require(_0x9314ba(0x11a)),require(_0x9314ba(0x106))):typeof define==_0x9314ba(0x122)&&define['amd']?define([_0x9314ba(0xc7),_0x9314ba(0xe1),_0x9314ba(0x11c),_0x9314ba(0x118),'@univerjs/thread-comment-ui','@univerjs/thread-comment',_0x9314ba(0x11a),'@univerjs/network'],_0x528672):(_0x5c826a=typeof globalThis<'u'?globalThis:_0x5c826a||self,_0x528672(_0x5c826a[_0x9314ba(0x132)]={},_0x5c826a[_0x9314ba(0xaf)],_0x5c826a[_0x9314ba(0x11f)],_0x5c826a[_0x9314ba(0xcd)],_0x5c826a[_0x9314ba(0xf4)],_0x5c826a['UniverThreadComment'],_0x5c826a['rxjs'],_0x5c826a['UniverNetwork']));}(this,function(_0x42fddb,_0x197f87,_0x1b08bb,_0x4e02c2,_0x3bc6fc,_0x501bb6,_0x299429,_0xa2e709){'use strict';const _0xe30011=_0x3871;const _0x3892e5=_0xe30011(0x123);var _0x121c7f=(_0x59e94a=>(_0x59e94a[_0x59e94a['OpenOrReOpen']=0x0]=_0xe30011(0x101),_0x59e94a[_0x59e94a[_0xe30011(0xef)]=0x1]='Solved',_0x59e94a[_0x59e94a['UNRECOGNIZED']=-0x1]=_0xe30011(0xb6),_0x59e94a))(_0x121c7f||{}),_0x5a0d25=(_0x39a11e=>(_0x39a11e[_0x39a11e['Unknown']=0x0]=_0xe30011(0xb7),_0x39a11e[_0x39a11e[_0xe30011(0xb2)]=0x1]=_0xe30011(0xb2),_0x39a11e[_0x39a11e['Reply']=0x2]='Reply',_0x39a11e[_0x39a11e[_0xe30011(0xf2)]=0x3]=_0xe30011(0xf2),_0x39a11e[_0x39a11e[_0xe30011(0xde)]=0x4]='Delete',_0x39a11e[_0x39a11e[_0xe30011(0xc0)]=0x5]=_0xe30011(0xc0),_0x39a11e[_0x39a11e[_0xe30011(0xb6)]=-0x1]=_0xe30011(0xb6),_0x39a11e))(_0x5a0d25||{});const _0x3e8fd1=_0x1bd13b=>_0x4e02c2[_0xe30011(0x130)](new Date(+_0x1bd13b))['format'](_0xe30011(0xbf)),_0x7ccca9=async(_0x1bda24,_0x2cc243)=>{const _0x17b6c4=_0xe30011,_0x2e0c7a=_0x1bda24[_0x17b6c4(0xfe)](_0x4e02c2['UserManagerService']),_0x31a1b9=_0x1bda24[_0x17b6c4(0xfe)](_0xa2e709[_0x17b6c4(0xb0)]);_0x2cc243[_0x17b6c4(0xda)](_0x164593=>{const _0x225d47=_0x17b6c4;_0x2e0c7a[_0x225d47(0xd4)](_0x164593)&&_0x2cc243['delete'](_0x164593);}),_0x2cc243[_0x17b6c4(0x10c)]&&(await _0x31a1b9[_0x17b6c4(0xfe)](_0x17b6c4(0x12c),{'params':{'userIDs':[..._0x2cc243]}}))[_0x17b6c4(0xf5)][_0x17b6c4(0xc6)][_0x17b6c4(0xda)](_0x1d86c2=>{const _0x2cb8dc=_0x17b6c4;_0x1d86c2&&_0x2e0c7a[_0x2cb8dc(0xd1)](_0x1d86c2);});};var _0x6fb39=Object[_0xe30011(0xfd)],_0x2885b9=(_0x3646a0,_0x2f9308,_0x4478dc,_0x358fe5)=>{for(var _0x15cde1=_0x358fe5>0x1?void 0x0:_0x358fe5?_0x6fb39(_0x2f9308,_0x4478dc):_0x2f9308,_0x390aab=_0x3646a0['length']-0x1,_0x17d703;_0x390aab>=0x0;_0x390aab--)(_0x17d703=_0x3646a0[_0x390aab])&&(_0x15cde1=_0x17d703(_0x15cde1)||_0x15cde1);return _0x15cde1;},_0x37cfeb=(_0x1c29e5,_0x177aa4)=>(_0x4a4a9d,_0x27de31)=>_0x177aa4(_0x4a4a9d,_0x27de31,_0x1c29e5);let _0x10c8cb=class extends _0x4e02c2[_0xe30011(0xf6)]{constructor(_0x510363,_0x2c6a68,_0x5370a9,_0x4e7cdd){const _0x10dd0a=_0xe30011;super(),this['_commentService']=_0x510363,this[_0x10dd0a(0x124)]=_0x2c6a68,this['_userService']=_0x5370a9,this[_0x10dd0a(0xfb)]=_0x4e7cdd,this[_0x10dd0a(0x100)](),this[_0x10dd0a(0x105)]();}[_0xe30011(0x105)](){const _0x5b638e=_0xe30011;this[_0x5b638e(0x112)](this[_0x5b638e(0x124)][_0x5b638e(0x116)][_0x5b638e(0xd0)](_0x299429['bufferTime'](0x10))[_0x5b638e(0x104)](_0x56d7be=>{const _0x144acd=_0x5b638e,_0x4e21d3=new Set();_0x56d7be[_0x144acd(0xda)](_0x27cb88=>{const _0x22324e=_0x144acd;switch(_0x27cb88[_0x22324e(0x10e)]){case _0x22324e(0xf8):{const _0x5bbe84=_0x27cb88[_0x22324e(0xee)][_0x22324e(0xe0)];_0x4e21d3[_0x22324e(0xf8)](_0x5bbe84);break;}}}),_0x7ccca9(this['_injector'],_0x4e21d3);}));}[_0xe30011(0x100)](){const _0x5b0358=_0xe30011;this[_0x5b0358(0x112)](this[_0x5b0358(0xd8)][_0x5b0358(0x116)]['subscribe'](async _0x44ca9f=>{const _0x55c60e=_0x5b0358;var _0x32734a,_0x51bab5,_0x55ba24,_0x190ea2;const _0x590ffe=(_0x32734a=this['_threadCommentModel'][_0x55c60e(0xe4)](_0x44ca9f['unitId'])[_0x55c60e(0x129)](_0xc8562f=>_0xc8562f[_0x55c60e(0xdf)]===_0x44ca9f[_0x55c60e(0xdf)]))==null?void 0x0:_0x32734a[_0x55c60e(0xbe)];if(!_0x590ffe)return;const {unitId:_0x3bbaf6,subUnitId:_0x499fbb}=_0x590ffe;switch(_0x44ca9f['user']&&this[_0x55c60e(0xbd)][_0x55c60e(0xd1)](_0x44ca9f[_0x55c60e(0xff)]),_0x44ca9f['type']){case _0x5a0d25[_0x55c60e(0xb2)]:break;case _0x5a0d25[_0x55c60e(0x10f)]:{this['_threadCommentModel']['addComment'](_0x3bbaf6,_0x499fbb,{'unitId':_0x3bbaf6,'subUnitId':_0x499fbb,'ref':'','id':_0x44ca9f[_0x55c60e(0xd6)],'dT':_0x3e8fd1(+_0x44ca9f[_0x55c60e(0x128)]),'threadId':_0x44ca9f[_0x55c60e(0xdf)],'personId':(_0x55ba24=(_0x51bab5=_0x44ca9f[_0x55c60e(0xff)])==null?void 0x0:_0x51bab5[_0x55c60e(0x103)])!=null?_0x55ba24:_0x44ca9f[_0x55c60e(0x107)],'text':JSON['parse'](_0x44ca9f[_0x55c60e(0xec)]),'parentId':_0x590ffe['id']});break;}case _0x5a0d25[_0x55c60e(0xde)]:{const _0x2769a9=this[_0x55c60e(0x124)][_0x55c60e(0xba)](_0x3bbaf6,_0x499fbb,_0x44ca9f[_0x55c60e(0xd6)]);_0x2769a9&&_0x2769a9['parentId']&&this['_threadCommentModel'][_0x55c60e(0xce)](_0x3bbaf6,_0x499fbb,_0x44ca9f[_0x55c60e(0xd6)]);break;}case _0x5a0d25[_0x55c60e(0xf2)]:{this[_0x55c60e(0x124)]['updateComment'](_0x3bbaf6,_0x499fbb,{'commentId':_0x44ca9f[_0x55c60e(0xd6)],'text':JSON[_0x55c60e(0xe7)](_0x44ca9f[_0x55c60e(0xec)])});break;}case _0x5a0d25[_0x55c60e(0xc0)]:{const _0x1510e3=(_0x190ea2=this[_0x55c60e(0x124)]['getUnit'](_0x44ca9f[_0x55c60e(0x120)])['find'](_0x3239c2=>_0x3239c2[_0x55c60e(0xdf)]===_0x44ca9f[_0x55c60e(0xdf)]))==null?void 0x0:_0x190ea2[_0x55c60e(0xbe)];_0x1510e3&&this[_0x55c60e(0x124)]['resolveComment'](_0x3bbaf6,_0x499fbb,_0x1510e3['id'],_0x44ca9f['solved']===_0x121c7f[_0x55c60e(0xef)]);break;}}}));}};_0x10c8cb=_0x2885b9([_0x37cfeb(0x0,_0x4e02c2[_0xe30011(0x108)](_0x197f87[_0xe30011(0xfa)])),_0x37cfeb(0x1,_0x4e02c2[_0xe30011(0x108)](_0x501bb6[_0xe30011(0xcb)])),_0x37cfeb(0x2,_0x4e02c2[_0xe30011(0x108)](_0x4e02c2[_0xe30011(0xd7)])),_0x37cfeb(0x3,_0x4e02c2[_0xe30011(0x108)](_0x4e02c2[_0xe30011(0xe2)]))],_0x10c8cb);const _0x410b57='thread-comment-data-source.config',_0x3cb0f5={};var _0x364547=Object[_0xe30011(0xfd)],_0x33e5be=(_0x15ced9,_0xcd122,_0x1f6be8,_0x5e1439)=>{for(var _0x2dc532=_0x5e1439>0x1?void 0x0:_0x5e1439?_0x364547(_0xcd122,_0x1f6be8):_0xcd122,_0x38538c=_0x15ced9['length']-0x1,_0x34c8b1;_0x38538c>=0x0;_0x38538c--)(_0x34c8b1=_0x15ced9[_0x38538c])&&(_0x2dc532=_0x34c8b1(_0x2dc532)||_0x2dc532);return _0x2dc532;},_0x2a9489=(_0x2135e7,_0x7beab2)=>(_0x259dd8,_0x24e6f9)=>_0x7beab2(_0x259dd8,_0x24e6f9,_0x2135e7);function _0xe506fb(_0x5562a2,_0x6822c5){const _0x5a1f68=_0xe30011,_0x46eef5=_0x5562a2[_0x5a1f68(0xbc)][0x0];return{..._0x6822c5,'id':_0x46eef5[_0x5a1f68(0xd6)],'resolved':_0x5562a2[_0x5a1f68(0xd5)]===0x1,'dT':_0x3e8fd1(_0x46eef5[_0x5a1f68(0x128)]),'personId':_0x46eef5[_0x5a1f68(0x107)],'threadId':_0x46eef5['threadId']};}function _0x38f789(_0x52087e,_0x50a7cf,_0x5ca2a9){const _0x2479f2=_0xe30011;var _0x33d4bf,_0x1a8647;if(((_0x1a8647=(_0x33d4bf=_0x52087e==null?void 0x0:_0x52087e['replies'])==null?void 0x0:_0x33d4bf[_0x2479f2(0xbb)])!=null?_0x1a8647:0x0)>0x0){const _0x2a8049=(_0x48c65e,_0x2a194b)=>({'id':_0x48c65e[_0x2479f2(0xd6)],'threadId':_0x48c65e[_0x2479f2(0xdf)],'dT':_0x3e8fd1(_0x48c65e[_0x2479f2(0x128)]),'personId':_0x48c65e[_0x2479f2(0x107)],'resolved':_0x52087e['solved']===_0x121c7f['Solved'],'unitId':_0x50a7cf,'subUnitId':_0x5ca2a9,'text':JSON[_0x2479f2(0xe7)](_0x48c65e[_0x2479f2(0xec)]),'parentId':_0x2a194b}),_0x205efe=_0x2a8049(_0x52087e[_0x2479f2(0xbc)][0x0]);return{..._0x205efe,'children':_0x52087e['replies']['slice'](0x1)['map'](_0x474e2f=>_0x2a8049(_0x474e2f,_0x205efe['id']))};}return null;}let _0x21b41b=class{constructor(_0x53df73,_0x5499de,_0x34944c,_0x3f93cb){const _0x4d1255=_0xe30011;this[_0x4d1255(0xdb)]=_0x53df73,this['_userService']=_0x5499de,this[_0x4d1255(0xfc)]=_0x34944c,this[_0x4d1255(0xfb)]=_0x3f93cb;}async[_0xe30011(0x114)](_0x35b616){const _0x3499c3=_0xe30011;var _0x4c0282,_0x42b15f;const {parentId:_0x305d5d,unitId:_0x32aef9,text:_0x369432,threadId:_0x2da25f}=_0x35b616,_0x4b8bdc=(_0x42b15f=(_0x4c0282=_0x369432[_0x3499c3(0xe8)])==null?void 0x0:_0x4c0282[_0x3499c3(0xf1)](_0x42f617=>_0x42f617[_0x3499c3(0xc5)]===_0x4e02c2[_0x3499c3(0xe3)][_0x3499c3(0x10a)])[_0x3499c3(0xea)](_0xcc9470=>_0xcc9470[_0x3499c3(0xcc)]))!=null?_0x42b15f:[],_0x177d20=JSON[_0x3499c3(0xed)](_0x369432),_0x1c48b6=(await this[_0x3499c3(0xfc)][_0x3499c3(0xeb)](_0x32aef9))['getMemberID']();if(_0x305d5d){const _0x4f0f0b={'memberId':_0x1c48b6,'unitId':_0x32aef9,'content':_0x177d20,'mention':_0x4b8bdc,'threadId':_0x2da25f},_0x47024a=(await this[_0x3499c3(0xdb)][_0x3499c3(0xb3)]('/universer-api/comment/unit/'+_0x32aef9+_0x3499c3(0xb5),{'body':_0x4f0f0b}))[_0x3499c3(0xf5)][_0x3499c3(0xd9)];return{..._0x35b616,'id':_0x47024a[_0x3499c3(0xd6)],'dT':_0x4e02c2[_0x3499c3(0x130)](+_0x47024a[_0x3499c3(0x128)])['format'](_0x3499c3(0xbf)),'personId':_0x47024a[_0x3499c3(0x107)]};}else{const _0xe262b3={'memberId':_0x1c48b6,'unitId':_0x32aef9,'content':_0x177d20,'mention':_0x4b8bdc},_0x107ab8=await this[_0x3499c3(0xdb)][_0x3499c3(0xb3)](_0x3499c3(0xe9)+_0x32aef9+_0x3499c3(0xb8),{'body':_0xe262b3});return _0xe506fb(_0x107ab8[_0x3499c3(0xf5)][_0x3499c3(0xe5)],_0x35b616);}}async[_0xe30011(0x117)](_0x27177f){const _0x47b146=_0xe30011;var _0x2841b2,_0x3ead7c;const {text:_0xafe191,unitId:_0x3315dd}=_0x27177f,_0x1b7bba=(_0x3ead7c=(_0x2841b2=_0xafe191[_0x47b146(0xe8)])==null?void 0x0:_0x2841b2['filter'](_0x18486c=>_0x18486c[_0x47b146(0xc5)]===_0x4e02c2['CustomRangeType'][_0x47b146(0x10a)])[_0x47b146(0xea)](_0x1cded8=>_0x1cded8['rangeId']))!=null?_0x3ead7c:[],_0x1aa070=JSON[_0x47b146(0xed)](_0xafe191),_0x197af5=_0x27177f[_0x47b146(0xdf)],_0x2109d7=_0x27177f['id'],_0x44cae1={'memberId':(await this['_sessionService'][_0x47b146(0xeb)](_0x3315dd))['getMemberID'](),'unitId':_0x3315dd,'threadId':_0x197af5,'mention':_0x1b7bba,'content':_0x1aa070,'replyId':_0x2109d7},_0x1bd3e0=await this['_httpService'][_0x47b146(0xb3)](_0x47b146(0xe9)+_0x3315dd+_0x47b146(0xc1),{'body':_0x44cae1});return!_0x1bd3e0[_0x47b146(0xf5)][_0x47b146(0x127)]||_0x1bd3e0['body'][_0x47b146(0x127)][_0x47b146(0x109)]===0x1;}async[_0xe30011(0xb1)](_0x414e84){const _0x16d6ab=_0xe30011,{unitId:_0x18042f}=_0x414e84,_0x5c9de9=_0x414e84[_0x16d6ab(0xdf)],_0xf832e={'memberId':this['_userService'][_0x16d6ab(0x11b)]()[_0x16d6ab(0x103)],'unitId':_0x18042f,'threadId':_0x5c9de9,'solved':_0x414e84[_0x16d6ab(0x131)]?_0x121c7f[_0x16d6ab(0xef)]:_0x121c7f[_0x16d6ab(0x101)]},_0x50039=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x18042f+_0x16d6ab(0x12a),{'body':_0xf832e});return!_0x50039[_0x16d6ab(0xf5)][_0x16d6ab(0x127)]||_0x50039[_0x16d6ab(0xf5)][_0x16d6ab(0x127)][_0x16d6ab(0x109)]===0x1;}async[_0xe30011(0xce)](_0x3af12a,_0x4159c8,_0x331d8c,_0x227d82){const _0x3a469e=_0xe30011,_0x53fe29={'memberId':(await this[_0x3a469e(0xfc)][_0x3a469e(0xeb)](_0x3af12a))[_0x3a469e(0x10d)](),'threadId':_0x331d8c,'replyId':_0x227d82,'unitId':_0x3af12a},_0x4283b9=await this[_0x3a469e(0xdb)]['post'](_0x3a469e(0xe9)+_0x3af12a+_0x3a469e(0x10b),{'body':_0x53fe29});return!_0x4283b9[_0x3a469e(0xf5)][_0x3a469e(0x127)]||_0x4283b9[_0x3a469e(0xf5)][_0x3a469e(0x127)][_0x3a469e(0x109)]===0x1;}async[_0xe30011(0xb4)](_0x117297,_0x28f177,_0x7d864){const _0x2ab386=_0xe30011,_0x56b4b5={'unitId':_0x117297,'threadId':_0x7d864},_0x11242d=await this[_0x2ab386(0xdb)][_0x2ab386(0xb3)](_0x2ab386(0xe9)+_0x117297+'/list',{'body':_0x56b4b5}),_0x2ddb56=_0x7d864[_0x2ab386(0xea)](_0x2c0835=>_0x38f789(_0x11242d[_0x2ab386(0xf5)][_0x2ab386(0xc8)][_0x2c0835],_0x117297,_0x28f177))[_0x2ab386(0xf1)](Boolean);return Object[_0x2ab386(0x115)](_0x11242d[_0x2ab386(0xf5)][_0x2ab386(0xc6)])['forEach'](_0x267fc9=>{const _0x208afb=_0x2ab386;this[_0x208afb(0xbd)][_0x208afb(0xd1)](_0x267fc9);}),_0x2ddb56;}['saveCommentToSnapshot'](_0x24c8af){const _0x2e5918=_0xe30011;return{'id':_0x24c8af['id'],'threadId':_0x24c8af[_0x2e5918(0xdf)],'ref':_0x24c8af['ref']};}};_0x21b41b=_0x33e5be([_0x2a9489(0x0,_0x4e02c2[_0xe30011(0x108)](_0xa2e709[_0xe30011(0xb0)])),_0x2a9489(0x1,_0x4e02c2[_0xe30011(0x108)](_0x4e02c2[_0xe30011(0xd7)])),_0x2a9489(0x2,_0x4e02c2['Inject'](_0x197f87[_0xe30011(0x12b)])),_0x2a9489(0x3,_0x4e02c2[_0xe30011(0x108)](_0x4e02c2[_0xe30011(0xe2)]))],_0x21b41b);var _0x4483d9=Object[_0xe30011(0xfd)],_0x200423=(_0x54e8e6,_0x1089ce,_0x35cfc5,_0x5683cd)=>{const _0x184163=_0xe30011;for(var _0x19cc9d=_0x5683cd>0x1?void 0x0:_0x5683cd?_0x4483d9(_0x1089ce,_0x35cfc5):_0x1089ce,_0x304748=_0x54e8e6[_0x184163(0xbb)]-0x1,_0x2605ea;_0x304748>=0x0;_0x304748--)(_0x2605ea=_0x54e8e6[_0x304748])&&(_0x19cc9d=_0x2605ea(_0x19cc9d)||_0x19cc9d);return _0x19cc9d;},_0x4ce8b8=(_0x44fa7d,_0x391801)=>(_0x3c17ff,_0x560c00)=>_0x391801(_0x3c17ff,_0x560c00,_0x44fa7d);let _0x5b7c97=class extends _0x4e02c2['Disposable']{constructor(_0x2672e9,_0x4df45d){const _0x45e4a6=_0xe30011;super(),this[_0x45e4a6(0xc4)]=_0x2672e9,this['_threadCommentDataSource']=_0x4df45d,this[_0x45e4a6(0xf0)]();}['_initDataSource'](){const _0x5d3c81=_0xe30011;this[_0x5d3c81(0xc4)][_0x5d3c81(0x121)]=this[_0x5d3c81(0xd2)],this['_threadCommentDataSourceService'][_0x5d3c81(0xc3)]=!0x1;}};_0x5b7c97=_0x200423([_0x4ce8b8(0x0,_0x501bb6['IThreadCommentDataSourceService']),_0x4ce8b8(0x1,_0x4e02c2[_0xe30011(0x108)](_0x21b41b))],_0x5b7c97);var _0x5a070e=Object[_0xe30011(0xf9)],_0x14d617=Object[_0xe30011(0xfd)],_0x347eab=(_0x2f7542,_0x55e7bf,_0x439cfb)=>_0x55e7bf in _0x2f7542?_0x5a070e(_0x2f7542,_0x55e7bf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x439cfb}):_0x2f7542[_0x55e7bf]=_0x439cfb,_0x2b7aea=(_0x5f5d89,_0x51a22b,_0x4b1360,_0x3ecf4d)=>{for(var _0x4080c2=_0x3ecf4d>0x1?void 0x0:_0x3ecf4d?_0x14d617(_0x51a22b,_0x4b1360):_0x51a22b,_0x371573=_0x5f5d89['length']-0x1,_0xf38443;_0x371573>=0x0;_0x371573--)(_0xf38443=_0x5f5d89[_0x371573])&&(_0x4080c2=_0xf38443(_0x4080c2)||_0x4080c2);return _0x4080c2;},_0x9d8ad8=(_0x1a21e1,_0x484904)=>(_0x183a51,_0x531d01)=>_0x484904(_0x183a51,_0x531d01,_0x1a21e1),_0x52458c=(_0x48d7d0,_0x553b62,_0x118225)=>_0x347eab(_0x48d7d0,typeof _0x553b62!=_0xe30011(0xdd)?_0x553b62+'':_0x553b62,_0x118225);_0x42fddb[_0xe30011(0x119)]=class extends _0x4e02c2[_0xe30011(0x12e)]{constructor(_0xa5461f=_0x3cb0f5,_0x1ff810,_0x3cee52){const _0x3f6000=_0xe30011;super(),this[_0x3f6000(0x11d)]=_0xa5461f,this[_0x3f6000(0xfb)]=_0x1ff810,this[_0x3f6000(0xd3)]=_0x3cee52;const {..._0x5bd9c7}=_0x4e02c2[_0x3f6000(0xdc)]({},_0x3cb0f5,this[_0x3f6000(0x11d)]);this[_0x3f6000(0xd3)]['setConfig'](_0x410b57,_0x5bd9c7);}[_0xe30011(0x125)](){const _0x1454cb=_0xe30011;[[_0x21b41b],[_0x5b7c97],[_0x10c8cb]][_0x1454cb(0xda)](_0x39c9ab=>{const _0x42b76c=_0x1454cb;this[_0x42b76c(0xfb)][_0x42b76c(0xf8)](_0x39c9ab);});}[_0xe30011(0x12d)](){const _0x5a6960=_0xe30011;this[_0x5a6960(0xfb)][_0x5a6960(0xfe)](_0x5b7c97),this[_0x5a6960(0xfb)][_0x5a6960(0xfe)](_0x10c8cb);}},_0x52458c(_0x42fddb[_0xe30011(0x119)],_0xe30011(0xcf),_0x3892e5),_0x52458c(_0x42fddb[_0xe30011(0x119)],_0xe30011(0x10e),_0x4e02c2['UniverInstanceType']['UNIVER_UNKNOWN']),_0x42fddb['UniverThreadCommentDataSourcePlugin']=_0x2b7aea([_0x4e02c2['DependentOn'](_0x3bc6fc[_0xe30011(0xc2)],_0x197f87[_0xe30011(0x126)],_0x1b08bb[_0xe30011(0x111)]),_0x9d8ad8(0x1,_0x4e02c2['Inject'](_0x4e02c2[_0xe30011(0xe2)])),_0x9d8ad8(0x2,_0x4e02c2['IConfigService'])],_0x42fddb[_0xe30011(0x119)]),Object[_0xe30011(0xf9)](_0x42fddb,Symbol[_0xe30011(0x11e)],{'value':_0xe30011(0x12f)});}));function _0x4252(){const _0x2fd9ca=['deleteComment','pluginName','pipe','addUser','_threadCommentDataSource','_configService','getUser','solved','replyId','UserManagerService','_commentService','reply','forEach','_httpService','merge','symbol','Delete','threadId','personId','@univerjs-pro/collaboration-client','Injector','CustomRangeType','getUnit','comment','207387fyLgaq','parse','customRanges','/universer-api/comment/unit/','map','requireSession','content','stringify','payload','Solved','_initDataSource','filter','Edit','892338HGddbY','UniverThreadCommentUi','body','Disposable','247376wdQbUo','add','defineProperty','CommentService','_injector','_sessionService','getOwnPropertyDescriptor','get','user','_init','OpenOrReOpen','2IagTiS','userID','subscribe','_initUserSync','@univerjs/network','userId','Inject','code','COMMENT','/delete','size','getMemberID','type','Reply','123053gcNUxP','UniverLicensePlugin','disposeWithMe','155180ANBhMV','addComment','values','commentUpdate$','updateComment','@univerjs/core','UniverThreadCommentDataSourcePlugin','rxjs','getCurrentUser','@univerjs-pro/license','_config','toStringTag','UniverProLicense','unitId','dataSource','function','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','onStarting','UniverCollaborationClientPlugin','error','createTimestamp','find','/solved','CollaborationSessionService','/universer-api/user/list','onReady','Plugin','Module','dayjs','resolved','UniverProThreadCommentDatasource','UniverProCollaborationClient','HTTPService','resolveComment','Add','post','listComments','/reply','UNRECOGNIZED','Unknown','/add','@univerjs/thread-comment-ui','getComment','length','replies','_userService','root','YYYY/MM/DD\x20HH:mm','Solve','/edit','UniverThreadCommentUIPlugin','syncUpdateMutationToColla','_threadCommentDataSourceService','rangeType','users','exports','comments','676484WntJgL','189461qvoMTp','ThreadCommentModel','rangeId','UniverCore'];_0x4252=function(){return _0x2fd9ca;};return _0x4252();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.7-nightly.
|
|
3
|
+
"version": "0.6.7-nightly.202504011606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.7-nightly.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.6.7-nightly.
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.6.7-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.7-nightly.202504011606",
|
|
49
|
+
"@univerjs-pro/license": "0.6.7-nightly.202504011606",
|
|
50
|
+
"@univerjs/core": "0.6.7-nightly.202504011606",
|
|
51
|
+
"@univerjs/network": "0.6.7-nightly.202504011606",
|
|
52
|
+
"@univerjs/protocol": "0.1.45",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.7-nightly.202504011606",
|
|
54
|
+
"@univerjs/thread-comment": "0.6.7-nightly.202504011606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|