@univerjs-pro/thread-comment-datasource 0.6.7-experimental.20250331-45dde91 → 0.6.7-experimental.20250331-fa407d3
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 +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x128554=_0x2707;(function(_0x3c2a81,_0x2ecea3){const _0x3ee1d7=_0x2707,_0x45694e=_0x3c2a81();while(!![]){try{const _0x58e1ff=-parseInt(_0x3ee1d7(0x1b4))/0x1*(-parseInt(_0x3ee1d7(0x1e5))/0x2)+-parseInt(_0x3ee1d7(0x1fe))/0x3+-parseInt(_0x3ee1d7(0x1f8))/0x4+parseInt(_0x3ee1d7(0x1db))/0x5+parseInt(_0x3ee1d7(0x1d6))/0x6+parseInt(_0x3ee1d7(0x209))/0x7*(-parseInt(_0x3ee1d7(0x1ed))/0x8)+parseInt(_0x3ee1d7(0x1ca))/0x9;if(_0x58e1ff===_0x2ecea3)break;else _0x45694e['push'](_0x45694e['shift']());}catch(_0x49f140){_0x45694e['push'](_0x45694e['shift']());}}}(_0xc131,0xb1a44));Object[_0x128554(0x1a8)](exports,Symbol[_0x128554(0x200)],{'value':'Module'});const b=require(_0x128554(0x1ab)),T=require(_0x128554(0x216)),c=require('@univerjs/core'),j=require(_0x128554(0x1f9)),M=require(_0x128554(0x1f6)),w=require(_0x128554(0x202)),P=require('@univerjs/network'),U=_0x128554(0x1c9);var I=(_0x181417=>(_0x181417[_0x181417[_0x128554(0x1b1)]=0x0]=_0x128554(0x1b1),_0x181417[_0x181417['Solved']=0x1]=_0x128554(0x1da),_0x181417[_0x181417['UNRECOGNIZED']=-0x1]=_0x128554(0x21f),_0x181417))(I||{}),v=(_0x2ed225=>(_0x2ed225[_0x2ed225[_0x128554(0x1a0)]=0x0]=_0x128554(0x1a0),_0x2ed225[_0x2ed225[_0x128554(0x1e9)]=0x1]=_0x128554(0x1e9),_0x2ed225[_0x2ed225['Reply']=0x2]=_0x128554(0x1a6),_0x2ed225[_0x2ed225['Edit']=0x3]=_0x128554(0x1d7),_0x2ed225[_0x2ed225[_0x128554(0x1bb)]=0x4]=_0x128554(0x1bb),_0x2ed225[_0x2ed225[_0x128554(0x1dc)]=0x5]=_0x128554(0x1dc),_0x2ed225[_0x2ed225[_0x128554(0x21f)]=-0x1]='UNRECOGNIZED',_0x2ed225))(v||{});const f=_0x14f3c2=>c['dayjs'](new Date(+_0x14f3c2))['format'](_0x128554(0x218)),R=async(_0x1485db,_0x5cbf5b)=>{const _0x6635c5=_0x128554,_0x121985=_0x1485db[_0x6635c5(0x1d0)](c[_0x6635c5(0x1d8)]),_0x227a61=_0x1485db[_0x6635c5(0x1d0)](P['HTTPService']);_0x5cbf5b[_0x6635c5(0x1b2)](_0x5422d8=>{const _0x2dbccd=_0x6635c5;_0x121985[_0x2dbccd(0x21b)](_0x5422d8)&&_0x5cbf5b[_0x2dbccd(0x220)](_0x5422d8);}),_0x5cbf5b[_0x6635c5(0x1ce)]&&(await _0x227a61['get'](_0x6635c5(0x221),{'params':{'userIDs':[..._0x5cbf5b]}}))[_0x6635c5(0x213)]['users'][_0x6635c5(0x1b2)](_0x4844d6=>{const _0x57eae4=_0x6635c5;_0x4844d6&&_0x121985[_0x57eae4(0x1a5)](_0x4844d6);});};function _0x2707(_0xffa231,_0x511b52){const _0xc13191=_0xc131();return _0x2707=function(_0x270708,_0x2cfb9c){_0x270708=_0x270708-0x19e;let _0x308624=_0xc13191[_0x270708];return _0x308624;},_0x2707(_0xffa231,_0x511b52);}var $=Object[_0x128554(0x1ff)],E=(_0x4519d5,_0x2c5fe0,_0x451ab8,_0x1fd051)=>{const _0x116375=_0x128554;for(var _0x15fe54=_0x1fd051>0x1?void 0x0:_0x1fd051?$(_0x2c5fe0,_0x451ab8):_0x2c5fe0,_0x4bd9b4=_0x4519d5[_0x116375(0x1a1)]-0x1,_0x2be078;_0x4bd9b4>=0x0;_0x4bd9b4--)(_0x2be078=_0x4519d5[_0x4bd9b4])&&(_0x15fe54=_0x2be078(_0x15fe54)||_0x15fe54);return _0x15fe54;},S=(_0x348200,_0x3ff8c2)=>(_0x24c465,_0x316f15)=>_0x3ff8c2(_0x24c465,_0x316f15,_0x348200);let p=class extends c['Disposable']{constructor(_0x391efa,_0x3dde9b,_0x462281,_0x4cc674){const _0x174f58=_0x128554;super(),this[_0x174f58(0x211)]=_0x391efa,this['_threadCommentModel']=_0x3dde9b,this[_0x174f58(0x1aa)]=_0x462281,this[_0x174f58(0x201)]=_0x4cc674,this[_0x174f58(0x1af)](),this[_0x174f58(0x1cb)]();}[_0x128554(0x1cb)](){const _0x387852=_0x128554;this['disposeWithMe'](this[_0x387852(0x1f5)][_0x387852(0x20e)][_0x387852(0x1f2)](w[_0x387852(0x206)](0x10))['subscribe'](_0x3ad68d=>{const _0x3ec6a6=_0x387852,_0x1375d4=new Set();_0x3ad68d[_0x3ec6a6(0x1b2)](_0x1bc844=>{const _0x3a0617=_0x3ec6a6;switch(_0x1bc844['type']){case'add':{const _0x5f367c=_0x1bc844[_0x3a0617(0x1e0)][_0x3a0617(0x1a4)];_0x1375d4['add'](_0x5f367c);break;}}}),R(this[_0x3ec6a6(0x201)],_0x1375d4);}));}[_0x128554(0x1af)](){const _0x1d33c4=_0x128554;this[_0x1d33c4(0x1b8)](this[_0x1d33c4(0x211)][_0x1d33c4(0x20e)]['subscribe'](async _0x2c3f9a=>{const _0x2525f8=_0x1d33c4;var _0x28bd5b,_0x56f46f,_0x526f2a,_0x1d3bf7;const _0x224758=(_0x28bd5b=this[_0x2525f8(0x1f5)][_0x2525f8(0x21c)](_0x2c3f9a['unitId'])['find'](_0x25328a=>_0x25328a[_0x2525f8(0x1c2)]===_0x2c3f9a[_0x2525f8(0x1c2)]))==null?void 0x0:_0x28bd5b[_0x2525f8(0x20b)];if(!_0x224758)return;const {unitId:_0x119c1e,subUnitId:_0x1f1764}=_0x224758;switch(_0x2c3f9a[_0x2525f8(0x21d)]&&this[_0x2525f8(0x1aa)][_0x2525f8(0x1a5)](_0x2c3f9a[_0x2525f8(0x21d)]),_0x2c3f9a[_0x2525f8(0x1ad)]){case v['Add']:break;case v[_0x2525f8(0x1a6)]:{this[_0x2525f8(0x1f5)][_0x2525f8(0x1bd)](_0x119c1e,_0x1f1764,{'unitId':_0x119c1e,'subUnitId':_0x1f1764,'ref':'','id':_0x2c3f9a[_0x2525f8(0x1d1)],'dT':f(+_0x2c3f9a[_0x2525f8(0x208)]),'threadId':_0x2c3f9a[_0x2525f8(0x1c2)],'personId':(_0x526f2a=(_0x56f46f=_0x2c3f9a[_0x2525f8(0x21d)])==null?void 0x0:_0x56f46f['userID'])!=null?_0x526f2a:_0x2c3f9a[_0x2525f8(0x1ec)],'text':JSON[_0x2525f8(0x1b5)](_0x2c3f9a[_0x2525f8(0x1ae)]),'parentId':_0x224758['id']});break;}case v['Delete']:{const _0x4a08d8=this[_0x2525f8(0x1f5)][_0x2525f8(0x1b7)](_0x119c1e,_0x1f1764,_0x2c3f9a[_0x2525f8(0x1d1)]);_0x4a08d8&&_0x4a08d8[_0x2525f8(0x1b3)]&&this[_0x2525f8(0x1f5)][_0x2525f8(0x21e)](_0x119c1e,_0x1f1764,_0x2c3f9a[_0x2525f8(0x1d1)]);break;}case v['Edit']:{this[_0x2525f8(0x1f5)]['updateComment'](_0x119c1e,_0x1f1764,{'commentId':_0x2c3f9a[_0x2525f8(0x1d1)],'text':JSON[_0x2525f8(0x1b5)](_0x2c3f9a[_0x2525f8(0x1ae)])});break;}case v[_0x2525f8(0x1dc)]:{const _0xe92dbf=(_0x1d3bf7=this[_0x2525f8(0x1f5)][_0x2525f8(0x21c)](_0x2c3f9a[_0x2525f8(0x1f4)])[_0x2525f8(0x1cc)](_0x76e3af=>_0x76e3af[_0x2525f8(0x1c2)]===_0x2c3f9a['threadId']))==null?void 0x0:_0x1d3bf7[_0x2525f8(0x20b)];_0xe92dbf&&this[_0x2525f8(0x1f5)][_0x2525f8(0x1e6)](_0x119c1e,_0x1f1764,_0xe92dbf['id'],_0x2c3f9a[_0x2525f8(0x217)]===I[_0x2525f8(0x1da)]);break;}}}));}};p=E([S(0x0,c[_0x128554(0x1d3)](b[_0x128554(0x1ee)])),S(0x1,c[_0x128554(0x1d3)](M[_0x128554(0x1be)])),S(0x2,c[_0x128554(0x1d3)](c['UserManagerService'])),S(0x3,c[_0x128554(0x1d3)](c[_0x128554(0x1de)]))],p);const q=_0x128554(0x1eb),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x15d864,_0x17a1bf,_0x505ac0,_0x1dccbf)=>{const _0x240521=_0x128554;for(var _0x18d309=_0x1dccbf>0x1?void 0x0:_0x1dccbf?A(_0x17a1bf,_0x505ac0):_0x17a1bf,_0x3d1e61=_0x15d864[_0x240521(0x1a1)]-0x1,_0x24e546;_0x3d1e61>=0x0;_0x3d1e61--)(_0x24e546=_0x15d864[_0x3d1e61])&&(_0x18d309=_0x24e546(_0x18d309)||_0x18d309);return _0x18d309;},_=(_0x3b3942,_0x25bec5)=>(_0x3cc9d1,_0x548b04)=>_0x25bec5(_0x3cc9d1,_0x548b04,_0x3b3942);function Y(_0x4b5ec9,_0x14da3f){const _0x149d3e=_0x128554,_0x5b4006=_0x4b5ec9[_0x149d3e(0x1d5)][0x0];return{..._0x14da3f,'id':_0x5b4006[_0x149d3e(0x1d1)],'resolved':_0x4b5ec9[_0x149d3e(0x217)]===0x1,'dT':f(_0x5b4006[_0x149d3e(0x208)]),'personId':_0x5b4006[_0x149d3e(0x1ec)],'threadId':_0x5b4006[_0x149d3e(0x1c2)]};}function G(_0x352db8,_0x38f793,_0x454c54){const _0x5a90aa=_0x128554;var _0x6433cd,_0x5c9e99;if(((_0x5c9e99=(_0x6433cd=_0x352db8==null?void 0x0:_0x352db8[_0x5a90aa(0x1d5)])==null?void 0x0:_0x6433cd['length'])!=null?_0x5c9e99:0x0)>0x0){const _0x5e24d9=(_0x408fce,_0xebbf9b)=>({'id':_0x408fce['replyId'],'threadId':_0x408fce[_0x5a90aa(0x1c2)],'dT':f(_0x408fce[_0x5a90aa(0x208)]),'personId':_0x408fce['userId'],'resolved':_0x352db8[_0x5a90aa(0x217)]===I['Solved'],'unitId':_0x38f793,'subUnitId':_0x454c54,'text':JSON['parse'](_0x408fce[_0x5a90aa(0x1ae)]),'parentId':_0xebbf9b}),_0x1a302d=_0x5e24d9(_0x352db8['replies'][0x0]);return{..._0x1a302d,'children':_0x352db8[_0x5a90aa(0x1d5)][_0x5a90aa(0x1d9)](0x1)[_0x5a90aa(0x207)](_0x3608bf=>_0x5e24d9(_0x3608bf,_0x1a302d['id']))};}return null;}let g=class{constructor(_0x2ed677,_0x2a2941,_0x3a9163,_0x28f228){const _0x219a91=_0x128554;this[_0x219a91(0x1e2)]=_0x2ed677,this[_0x219a91(0x1aa)]=_0x2a2941,this['_sessionService']=_0x3a9163,this[_0x219a91(0x201)]=_0x28f228;}async[_0x128554(0x1bd)](_0x2036b8){const _0x4b1ded=_0x128554;var _0x3a41ef,_0x4fccbb;const {parentId:_0x4a2a31,unitId:_0x17fefa,text:_0x274c2a,threadId:_0xb617e3}=_0x2036b8,_0xafd377=(_0x4fccbb=(_0x3a41ef=_0x274c2a['customRanges'])==null?void 0x0:_0x3a41ef[_0x4b1ded(0x20c)](_0x25c1b6=>_0x25c1b6['rangeType']===c[_0x4b1ded(0x1ea)][_0x4b1ded(0x1f7)])[_0x4b1ded(0x207)](_0x4f118e=>_0x4f118e[_0x4b1ded(0x21a)]))!=null?_0x4fccbb:[],_0x1fc807=JSON[_0x4b1ded(0x20d)](_0x274c2a),_0x578d10=(await this[_0x4b1ded(0x19f)][_0x4b1ded(0x1d2)](_0x17fefa))['getMemberID']();if(_0x4a2a31){const _0x44b429={'memberId':_0x578d10,'unitId':_0x17fefa,'content':_0x1fc807,'mention':_0xafd377,'threadId':_0xb617e3},_0x19c0b9=(await this[_0x4b1ded(0x1e2)][_0x4b1ded(0x1fa)]('/universer-api/comment/unit/'+_0x17fefa+_0x4b1ded(0x1bf),{'body':_0x44b429}))[_0x4b1ded(0x213)][_0x4b1ded(0x1b0)];return{..._0x2036b8,'id':_0x19c0b9[_0x4b1ded(0x1d1)],'dT':c[_0x4b1ded(0x1ac)](+_0x19c0b9[_0x4b1ded(0x208)])['format'](_0x4b1ded(0x218)),'personId':_0x19c0b9[_0x4b1ded(0x1ec)]};}else{const _0x27d92c={'memberId':_0x578d10,'unitId':_0x17fefa,'content':_0x1fc807,'mention':_0xafd377},_0x4e6395=await this[_0x4b1ded(0x1e2)]['post'](_0x4b1ded(0x19e)+_0x17fefa+_0x4b1ded(0x1e3),{'body':_0x27d92c});return Y(_0x4e6395[_0x4b1ded(0x213)][_0x4b1ded(0x1f1)],_0x2036b8);}}async[_0x128554(0x20f)](_0x444f56){const _0x183c24=_0x128554;var _0x184e3c,_0x2457e8;const {text:_0x1f0933,unitId:_0xe39534}=_0x444f56,_0x1e162f=(_0x2457e8=(_0x184e3c=_0x1f0933[_0x183c24(0x1c0)])==null?void 0x0:_0x184e3c[_0x183c24(0x20c)](_0x26ff6e=>_0x26ff6e[_0x183c24(0x1ba)]===c[_0x183c24(0x1ea)][_0x183c24(0x1f7)])['map'](_0x3c9a3e=>_0x3c9a3e[_0x183c24(0x21a)]))!=null?_0x2457e8:[],_0x56785f=JSON[_0x183c24(0x20d)](_0x1f0933),_0x3a6e46=_0x444f56[_0x183c24(0x1c2)],_0x1118f6=_0x444f56['id'],_0x515107={'memberId':(await this[_0x183c24(0x19f)]['requireSession'](_0xe39534))['getMemberID'](),'unitId':_0xe39534,'threadId':_0x3a6e46,'mention':_0x1e162f,'content':_0x56785f,'replyId':_0x1118f6},_0x258886=await this[_0x183c24(0x1e2)][_0x183c24(0x1fa)](_0x183c24(0x19e)+_0xe39534+_0x183c24(0x1cd),{'body':_0x515107});return!_0x258886[_0x183c24(0x213)][_0x183c24(0x1b6)]||_0x258886[_0x183c24(0x213)][_0x183c24(0x1b6)][_0x183c24(0x1c4)]===0x1;}async[_0x128554(0x1e6)](_0x2a655d){const _0x450c12=_0x128554,{unitId:_0xbc2cf3}=_0x2a655d,_0x5408d9=_0x2a655d[_0x450c12(0x1c2)],_0x10d982={'memberId':this['_userService'][_0x450c12(0x205)]()[_0x450c12(0x1e1)],'unitId':_0xbc2cf3,'threadId':_0x5408d9,'solved':_0x2a655d[_0x450c12(0x1ef)]?I[_0x450c12(0x1da)]:I[_0x450c12(0x1b1)]},_0x2a82bd=await this['_httpService'][_0x450c12(0x1fa)]('/universer-api/comment/unit/'+_0xbc2cf3+'/solved',{'body':_0x10d982});return!_0x2a82bd[_0x450c12(0x213)]['error']||_0x2a82bd['body'][_0x450c12(0x1b6)][_0x450c12(0x1c4)]===0x1;}async[_0x128554(0x21e)](_0x727ee1,_0x383ee6,_0x2feb6f,_0x59bfc4){const _0x89db1=_0x128554,_0x3b66f1={'memberId':(await this['_sessionService']['requireSession'](_0x727ee1))[_0x89db1(0x203)](),'threadId':_0x2feb6f,'replyId':_0x59bfc4,'unitId':_0x727ee1},_0xbd8508=await this[_0x89db1(0x1e2)][_0x89db1(0x1fa)]('/universer-api/comment/unit/'+_0x727ee1+_0x89db1(0x1bc),{'body':_0x3b66f1});return!_0xbd8508[_0x89db1(0x213)]['error']||_0xbd8508[_0x89db1(0x213)][_0x89db1(0x1b6)][_0x89db1(0x1c4)]===0x1;}async[_0x128554(0x1d4)](_0x1b2048,_0x50010e,_0x3e29d7){const _0x2cde6f=_0x128554,_0x48de5f={'unitId':_0x1b2048,'threadId':_0x3e29d7},_0x5e890f=await this[_0x2cde6f(0x1e2)][_0x2cde6f(0x1fa)](_0x2cde6f(0x19e)+_0x1b2048+_0x2cde6f(0x1df),{'body':_0x48de5f}),_0x113b8=_0x3e29d7[_0x2cde6f(0x207)](_0x5bcb65=>G(_0x5e890f[_0x2cde6f(0x213)]['comments'][_0x5bcb65],_0x1b2048,_0x50010e))[_0x2cde6f(0x20c)](Boolean);return Object[_0x2cde6f(0x1cf)](_0x5e890f[_0x2cde6f(0x213)][_0x2cde6f(0x204)])[_0x2cde6f(0x1b2)](_0x293fee=>{const _0x359dbc=_0x2cde6f;this['_userService'][_0x359dbc(0x1a5)](_0x293fee);}),_0x113b8;}[_0x128554(0x20a)](_0xe40573){const _0x487aa6=_0x128554;return{'id':_0xe40573['id'],'threadId':_0xe40573[_0x487aa6(0x1c2)],'ref':_0xe40573[_0x487aa6(0x212)]};}};g=x([_(0x0,c[_0x128554(0x1d3)](P[_0x128554(0x1dd)])),_(0x1,c['Inject'](c[_0x128554(0x1d8)])),_(0x2,c[_0x128554(0x1d3)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x128554(0x1de)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x20a535,_0x3fa1ac,_0x530c62,_0x386b26)=>{const _0x3b9175=_0x128554;for(var _0x28d83d=_0x386b26>0x1?void 0x0:_0x386b26?H(_0x3fa1ac,_0x530c62):_0x3fa1ac,_0x59975e=_0x20a535[_0x3b9175(0x1a1)]-0x1,_0xd10014;_0x59975e>=0x0;_0x59975e--)(_0xd10014=_0x20a535[_0x59975e])&&(_0x28d83d=_0xd10014(_0x28d83d)||_0x28d83d);return _0x28d83d;},y=(_0x3d6e1d,_0x2dec35)=>(_0x310455,_0x1ecf7f)=>_0x2dec35(_0x310455,_0x1ecf7f,_0x3d6e1d);let C=class extends c[_0x128554(0x210)]{constructor(_0x58a1ef,_0x176aaa){const _0x30f6cd=_0x128554;super(),this['_threadCommentDataSourceService']=_0x58a1ef,this[_0x30f6cd(0x1fd)]=_0x176aaa,this[_0x30f6cd(0x1a2)]();}['_initDataSource'](){const _0xf28d70=_0x128554;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0xf28d70(0x1b9)][_0xf28d70(0x1c7)]=!0x1;}};C=J([y(0x0,M[_0x128554(0x1c1)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x128554(0x1a8)],L=Object[_0x128554(0x1ff)],Z=(_0x21afaf,_0x2baeb5,_0x5aeac5)=>_0x2baeb5 in _0x21afaf?F(_0x21afaf,_0x2baeb5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5aeac5}):_0x21afaf[_0x2baeb5]=_0x5aeac5,W=(_0x1156bd,_0x9f7345,_0x4a05ce,_0xad9e82)=>{const _0xd9a1a3=_0x128554;for(var _0x40bf9a=_0xad9e82>0x1?void 0x0:_0xad9e82?L(_0x9f7345,_0x4a05ce):_0x9f7345,_0x57cfab=_0x1156bd[_0xd9a1a3(0x1a1)]-0x1,_0xaf1fb2;_0x57cfab>=0x0;_0x57cfab--)(_0xaf1fb2=_0x1156bd[_0x57cfab])&&(_0x40bf9a=_0xaf1fb2(_0x40bf9a)||_0x40bf9a);return _0x40bf9a;},O=(_0x202c0a,_0xb25569)=>(_0x4cfeda,_0x2407bf)=>_0xb25569(_0x4cfeda,_0x2407bf,_0x202c0a),N=(_0x2f6e2c,_0x3a7d88,_0x13a36c)=>Z(_0x2f6e2c,typeof _0x3a7d88!=_0x128554(0x219)?_0x3a7d88+'':_0x3a7d88,_0x13a36c);exports[_0x128554(0x1f3)]=class extends c[_0x128554(0x214)]{constructor(_0x19e9f1=D,_0x17618f,_0x182876){const _0x1164fb=_0x128554;super(),this[_0x1164fb(0x1a9)]=_0x19e9f1,this[_0x1164fb(0x201)]=_0x17618f,this[_0x1164fb(0x1a7)]=_0x182876;const {..._0xadeb1e}=c[_0x1164fb(0x1e8)]({},D,this[_0x1164fb(0x1a9)]);this[_0x1164fb(0x1a7)][_0x1164fb(0x1fc)](q,_0xadeb1e);}[_0x128554(0x1c5)](){const _0x46af38=_0x128554;[[g],[C],[p]][_0x46af38(0x1b2)](_0x722912=>{this['_injector']['add'](_0x722912);});}[_0x128554(0x1c6)](){const _0x473847=_0x128554;this[_0x473847(0x201)][_0x473847(0x1d0)](C),this['_injector'][_0x473847(0x1d0)](p);}},N(exports[_0x128554(0x1f3)],_0x128554(0x215),U),N(exports[_0x128554(0x1f3)],_0x128554(0x1ad),c[_0x128554(0x1c3)][_0x128554(0x1a3)]),exports[_0x128554(0x1f3)]=W([c[_0x128554(0x1f0)](j[_0x128554(0x1fb)],b[_0x128554(0x1c8)],T[_0x128554(0x1e4)]),O(0x1,c['Inject'](c[_0x128554(0x1de)])),O(0x2,c[_0x128554(0x1e7)])],exports[_0x128554(0x1f3)]);function _0xc131(){const _0x3d7308=['resolveComment','IConfigService','merge','Add','CustomRangeType','thread-comment-data-source.config','userId','96SIrbtr','CommentService','resolved','DependentOn','comment','pipe','UniverThreadCommentDataSourcePlugin','unitId','_threadCommentModel','@univerjs/thread-comment','COMMENT','4977248euPxPl','@univerjs/thread-comment-ui','post','UniverThreadCommentUIPlugin','setConfig','_threadCommentDataSource','2857365ViBYiG','getOwnPropertyDescriptor','toStringTag','_injector','rxjs','getMemberID','users','getCurrentUser','bufferTime','map','createTimestamp','34811mOllZR','saveCommentToSnapshot','root','filter','stringify','commentUpdate$','updateComment','Disposable','_commentService','ref','body','Plugin','pluginName','@univerjs-pro/license','solved','YYYY/MM/DD\x20HH:mm','symbol','rangeId','getUser','getUnit','user','deleteComment','UNRECOGNIZED','delete','/universer-api/user/list','/universer-api/comment/unit/','_sessionService','Unknown','length','_initDataSource','UNIVER_UNKNOWN','personId','addUser','Reply','_configService','defineProperty','_config','_userService','@univerjs-pro/collaboration-client','dayjs','type','content','_init','reply','OpenOrReOpen','forEach','parentId','4367uzaJaW','parse','error','getComment','disposeWithMe','_threadCommentDataSourceService','rangeType','Delete','/delete','addComment','ThreadCommentModel','/reply','customRanges','IThreadCommentDataSourceService','threadId','UniverInstanceType','code','onStarting','onReady','syncUpdateMutationToColla','UniverCollaborationClientPlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1338327eyewGe','_initUserSync','find','/edit','size','values','get','replyId','requireSession','Inject','listComments','replies','8248386TgWDjs','Edit','UserManagerService','slice','Solved','6713600mMaaCL','Solve','HTTPService','Injector','/list','payload','userID','_httpService','/add','UniverLicensePlugin','54yyulZh'];_0xc131=function(){return _0x3d7308;};return _0xc131();}
|
|
1
|
+
'use strict';const _0x595a0c=_0x161a;(function(_0x238ccc,_0x2888c0){const _0xdb17e5=_0x161a,_0x411936=_0x238ccc();while(!![]){try{const _0xfd7506=-parseInt(_0xdb17e5(0x10a))/0x1+-parseInt(_0xdb17e5(0xee))/0x2+parseInt(_0xdb17e5(0xda))/0x3+-parseInt(_0xdb17e5(0x12b))/0x4*(-parseInt(_0xdb17e5(0xfc))/0x5)+parseInt(_0xdb17e5(0x12d))/0x6*(parseInt(_0xdb17e5(0xf0))/0x7)+-parseInt(_0xdb17e5(0x126))/0x8+-parseInt(_0xdb17e5(0x11a))/0x9*(-parseInt(_0xdb17e5(0xd5))/0xa);if(_0xfd7506===_0x2888c0)break;else _0x411936['push'](_0x411936['shift']());}catch(_0x58de1f){_0x411936['push'](_0x411936['shift']());}}}(_0x3f85,0xa7ff7));Object[_0x595a0c(0x129)](exports,Symbol[_0x595a0c(0xfa)],{'value':_0x595a0c(0x133)});const b=require(_0x595a0c(0x11e)),T=require(_0x595a0c(0x104)),c=require(_0x595a0c(0xef)),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x595a0c(0x128)),U=_0x595a0c(0x100);var I=(_0x21bce0=>(_0x21bce0[_0x21bce0['OpenOrReOpen']=0x0]=_0x595a0c(0x139),_0x21bce0[_0x21bce0['Solved']=0x1]=_0x595a0c(0xde),_0x21bce0[_0x21bce0['UNRECOGNIZED']=-0x1]=_0x595a0c(0xd1),_0x21bce0))(I||{}),v=(_0x3e9c05=>(_0x3e9c05[_0x3e9c05[_0x595a0c(0x12a)]=0x0]=_0x595a0c(0x12a),_0x3e9c05[_0x3e9c05[_0x595a0c(0x127)]=0x1]=_0x595a0c(0x127),_0x3e9c05[_0x3e9c05[_0x595a0c(0xc4)]=0x2]=_0x595a0c(0xc4),_0x3e9c05[_0x3e9c05[_0x595a0c(0xe5)]=0x3]=_0x595a0c(0xe5),_0x3e9c05[_0x3e9c05[_0x595a0c(0x115)]=0x4]=_0x595a0c(0x115),_0x3e9c05[_0x3e9c05['Solve']=0x5]=_0x595a0c(0xfe),_0x3e9c05[_0x3e9c05['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e9c05))(v||{});const f=_0x40d61f=>c[_0x595a0c(0x124)](new Date(+_0x40d61f))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5a055a,_0x2d2025)=>{const _0x2c101a=_0x595a0c,_0x56c2d3=_0x5a055a[_0x2c101a(0xff)](c['UserManagerService']),_0x712f2c=_0x5a055a['get'](P['HTTPService']);_0x2d2025[_0x2c101a(0xcf)](_0x2331ac=>{const _0x16c30f=_0x2c101a;_0x56c2d3[_0x16c30f(0xf4)](_0x2331ac)&&_0x2d2025['delete'](_0x2331ac);}),_0x2d2025[_0x2c101a(0xdd)]&&(await _0x712f2c[_0x2c101a(0xff)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2d2025]}}))['body'][_0x2c101a(0xf9)][_0x2c101a(0xcf)](_0x24cc89=>{const _0x37d737=_0x2c101a;_0x24cc89&&_0x56c2d3[_0x37d737(0xca)](_0x24cc89);});};var $=Object[_0x595a0c(0x116)],E=(_0xfc5e59,_0x1a7d0a,_0x1b7032,_0x5b3293)=>{const _0x3d44b4=_0x595a0c;for(var _0x20d214=_0x5b3293>0x1?void 0x0:_0x5b3293?$(_0x1a7d0a,_0x1b7032):_0x1a7d0a,_0x256b84=_0xfc5e59[_0x3d44b4(0x102)]-0x1,_0xac0ed4;_0x256b84>=0x0;_0x256b84--)(_0xac0ed4=_0xfc5e59[_0x256b84])&&(_0x20d214=_0xac0ed4(_0x20d214)||_0x20d214);return _0x20d214;},S=(_0x473526,_0x55ca53)=>(_0x425236,_0x5469ef)=>_0x55ca53(_0x425236,_0x5469ef,_0x473526);let p=class extends c[_0x595a0c(0xe8)]{constructor(_0x2ec0d2,_0x2f7bf1,_0x1fe6d6,_0x38d930){const _0x32b00b=_0x595a0c;super(),this['_commentService']=_0x2ec0d2,this['_threadCommentModel']=_0x2f7bf1,this[_0x32b00b(0xd8)]=_0x1fe6d6,this['_injector']=_0x38d930,this[_0x32b00b(0x106)](),this[_0x32b00b(0x140)]();}[_0x595a0c(0x140)](){const _0x504ea0=_0x595a0c;this[_0x504ea0(0xf8)](this[_0x504ea0(0x101)][_0x504ea0(0xcc)][_0x504ea0(0x123)](w[_0x504ea0(0x12f)](0x10))[_0x504ea0(0x117)](_0x233d8b=>{const _0x2f49af=_0x504ea0,_0x57305b=new Set();_0x233d8b[_0x2f49af(0xcf)](_0x30b453=>{const _0x240745=_0x2f49af;switch(_0x30b453['type']){case _0x240745(0xc7):{const _0x4bfea0=_0x30b453[_0x240745(0xe3)]['personId'];_0x57305b[_0x240745(0xc7)](_0x4bfea0);break;}}}),R(this[_0x2f49af(0x130)],_0x57305b);}));}[_0x595a0c(0x106)](){const _0x539075=_0x595a0c;this[_0x539075(0xf8)](this[_0x539075(0xed)][_0x539075(0xcc)][_0x539075(0x117)](async _0x30d945=>{const _0x529cd3=_0x539075;var _0x14439b,_0x3fd795,_0x5a19c4,_0x3746a5;const _0x4ca142=(_0x14439b=this[_0x529cd3(0x101)][_0x529cd3(0x134)](_0x30d945[_0x529cd3(0x125)])[_0x529cd3(0xd3)](_0x19ed0f=>_0x19ed0f[_0x529cd3(0xe6)]===_0x30d945['threadId']))==null?void 0x0:_0x14439b['root'];if(!_0x4ca142)return;const {unitId:_0xea1ef6,subUnitId:_0x3e266a}=_0x4ca142;switch(_0x30d945['user']&&this['_userService'][_0x529cd3(0xca)](_0x30d945[_0x529cd3(0xe7)]),_0x30d945['type']){case v[_0x529cd3(0x127)]:break;case v[_0x529cd3(0xc4)]:{this[_0x529cd3(0x101)]['addComment'](_0xea1ef6,_0x3e266a,{'unitId':_0xea1ef6,'subUnitId':_0x3e266a,'ref':'','id':_0x30d945[_0x529cd3(0xfd)],'dT':f(+_0x30d945['createTimestamp']),'threadId':_0x30d945[_0x529cd3(0xe6)],'personId':(_0x5a19c4=(_0x3fd795=_0x30d945[_0x529cd3(0xe7)])==null?void 0x0:_0x3fd795[_0x529cd3(0x136)])!=null?_0x5a19c4:_0x30d945['userId'],'text':JSON[_0x529cd3(0x135)](_0x30d945['content']),'parentId':_0x4ca142['id']});break;}case v['Delete']:{const _0x4f929b=this['_threadCommentModel'][_0x529cd3(0xce)](_0xea1ef6,_0x3e266a,_0x30d945[_0x529cd3(0xfd)]);_0x4f929b&&_0x4f929b['parentId']&&this[_0x529cd3(0x101)][_0x529cd3(0x13f)](_0xea1ef6,_0x3e266a,_0x30d945['replyId']);break;}case v[_0x529cd3(0xe5)]:{this['_threadCommentModel']['updateComment'](_0xea1ef6,_0x3e266a,{'commentId':_0x30d945[_0x529cd3(0xfd)],'text':JSON[_0x529cd3(0x135)](_0x30d945[_0x529cd3(0xf2)])});break;}case v['Solve']:{const _0x1cf8bb=(_0x3746a5=this[_0x529cd3(0x101)][_0x529cd3(0x134)](_0x30d945[_0x529cd3(0x125)])[_0x529cd3(0xd3)](_0x3c0232=>_0x3c0232[_0x529cd3(0xe6)]===_0x30d945[_0x529cd3(0xe6)]))==null?void 0x0:_0x3746a5[_0x529cd3(0xf7)];_0x1cf8bb&&this[_0x529cd3(0x101)][_0x529cd3(0xf1)](_0xea1ef6,_0x3e266a,_0x1cf8bb['id'],_0x30d945[_0x529cd3(0x10b)]===I[_0x529cd3(0xde)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x595a0c(0xf3)])),S(0x1,c['Inject'](M[_0x595a0c(0xec)])),S(0x2,c['Inject'](c[_0x595a0c(0x141)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x595a0c(0xd2),D={};var A=Object[_0x595a0c(0x116)],x=(_0x1ffd83,_0x187136,_0x104856,_0x32fe96)=>{for(var _0x5c4e3f=_0x32fe96>0x1?void 0x0:_0x32fe96?A(_0x187136,_0x104856):_0x187136,_0x33e2cf=_0x1ffd83['length']-0x1,_0x381ce2;_0x33e2cf>=0x0;_0x33e2cf--)(_0x381ce2=_0x1ffd83[_0x33e2cf])&&(_0x5c4e3f=_0x381ce2(_0x5c4e3f)||_0x5c4e3f);return _0x5c4e3f;},_=(_0x5cfc9e,_0x2c5a08)=>(_0x40928a,_0x205a82)=>_0x2c5a08(_0x40928a,_0x205a82,_0x5cfc9e);function Y(_0x5098aa,_0x6cc7ad){const _0x42b187=_0x595a0c,_0x1e5576=_0x5098aa['replies'][0x0];return{..._0x6cc7ad,'id':_0x1e5576[_0x42b187(0xfd)],'resolved':_0x5098aa[_0x42b187(0x10b)]===0x1,'dT':f(_0x1e5576[_0x42b187(0xc8)]),'personId':_0x1e5576['userId'],'threadId':_0x1e5576['threadId']};}function G(_0x127280,_0x2a207d,_0x54b5dc){const _0x2d7aa0=_0x595a0c;var _0x420208,_0x30f809;if(((_0x30f809=(_0x420208=_0x127280==null?void 0x0:_0x127280[_0x2d7aa0(0x13c)])==null?void 0x0:_0x420208['length'])!=null?_0x30f809:0x0)>0x0){const _0x1131ed=(_0x3b650d,_0x168424)=>({'id':_0x3b650d[_0x2d7aa0(0xfd)],'threadId':_0x3b650d[_0x2d7aa0(0xe6)],'dT':f(_0x3b650d['createTimestamp']),'personId':_0x3b650d[_0x2d7aa0(0x132)],'resolved':_0x127280['solved']===I[_0x2d7aa0(0xde)],'unitId':_0x2a207d,'subUnitId':_0x54b5dc,'text':JSON[_0x2d7aa0(0x135)](_0x3b650d[_0x2d7aa0(0xf2)]),'parentId':_0x168424}),_0x26acf2=_0x1131ed(_0x127280[_0x2d7aa0(0x13c)][0x0]);return{..._0x26acf2,'children':_0x127280[_0x2d7aa0(0x13c)][_0x2d7aa0(0x109)](0x1)['map'](_0x106fd1=>_0x1131ed(_0x106fd1,_0x26acf2['id']))};}return null;}let g=class{constructor(_0x2ef76a,_0x23ae84,_0x1ad920,_0x258122){const _0x187032=_0x595a0c;this[_0x187032(0xc5)]=_0x2ef76a,this[_0x187032(0xd8)]=_0x23ae84,this[_0x187032(0xc9)]=_0x1ad920,this['_injector']=_0x258122;}async[_0x595a0c(0xea)](_0x3970af){const _0x520092=_0x595a0c;var _0x3fc90c,_0x650187;const {parentId:_0x113888,unitId:_0x53a5e8,text:_0x47411a,threadId:_0x5ee29e}=_0x3970af,_0x51c080=(_0x650187=(_0x3fc90c=_0x47411a[_0x520092(0x10d)])==null?void 0x0:_0x3fc90c['filter'](_0xa79f97=>_0xa79f97[_0x520092(0x113)]===c[_0x520092(0xcb)][_0x520092(0x13a)])[_0x520092(0xdc)](_0x5670a3=>_0x5670a3[_0x520092(0x10f)]))!=null?_0x650187:[],_0x2d40d3=JSON[_0x520092(0xd6)](_0x47411a),_0x523de2=(await this[_0x520092(0xc9)][_0x520092(0xe0)](_0x53a5e8))[_0x520092(0x10e)]();if(_0x113888){const _0x39580b={'memberId':_0x523de2,'unitId':_0x53a5e8,'content':_0x2d40d3,'mention':_0x51c080,'threadId':_0x5ee29e},_0x137c51=(await this[_0x520092(0xc5)][_0x520092(0x12e)](_0x520092(0xe4)+_0x53a5e8+_0x520092(0x13d),{'body':_0x39580b}))[_0x520092(0x11f)][_0x520092(0xe1)];return{..._0x3970af,'id':_0x137c51['replyId'],'dT':c[_0x520092(0x124)](+_0x137c51['createTimestamp'])[_0x520092(0x114)](_0x520092(0x138)),'personId':_0x137c51[_0x520092(0x132)]};}else{const _0x26cf0a={'memberId':_0x523de2,'unitId':_0x53a5e8,'content':_0x2d40d3,'mention':_0x51c080},_0xd2557b=await this[_0x520092(0xc5)][_0x520092(0x12e)](_0x520092(0xe4)+_0x53a5e8+_0x520092(0x12c),{'body':_0x26cf0a});return Y(_0xd2557b[_0x520092(0x11f)][_0x520092(0x108)],_0x3970af);}}async[_0x595a0c(0x110)](_0x4e7bb1){const _0x2340db=_0x595a0c;var _0x42dc1c,_0x5c6967;const {text:_0x11ba1d,unitId:_0x43f8e8}=_0x4e7bb1,_0x5b4d8f=(_0x5c6967=(_0x42dc1c=_0x11ba1d[_0x2340db(0x10d)])==null?void 0x0:_0x42dc1c[_0x2340db(0xf6)](_0x1413fe=>_0x1413fe[_0x2340db(0x113)]===c[_0x2340db(0xcb)][_0x2340db(0x13a)])[_0x2340db(0xdc)](_0x4f51fd=>_0x4f51fd[_0x2340db(0x10f)]))!=null?_0x5c6967:[],_0x3ff45b=JSON[_0x2340db(0xd6)](_0x11ba1d),_0x995034=_0x4e7bb1[_0x2340db(0xe6)],_0x338d88=_0x4e7bb1['id'],_0x284b3e={'memberId':(await this[_0x2340db(0xc9)][_0x2340db(0xe0)](_0x43f8e8))[_0x2340db(0x10e)](),'unitId':_0x43f8e8,'threadId':_0x995034,'mention':_0x5b4d8f,'content':_0x3ff45b,'replyId':_0x338d88},_0xec899f=await this['_httpService'][_0x2340db(0x12e)](_0x2340db(0xe4)+_0x43f8e8+'/edit',{'body':_0x284b3e});return!_0xec899f['body']['error']||_0xec899f[_0x2340db(0x11f)][_0x2340db(0xf5)]['code']===0x1;}async[_0x595a0c(0xf1)](_0x177b6e){const _0x15a949=_0x595a0c,{unitId:_0x23bb9e}=_0x177b6e,_0x11610e=_0x177b6e[_0x15a949(0xe6)],_0x3e3894={'memberId':this[_0x15a949(0xd8)]['getCurrentUser']()[_0x15a949(0x136)],'unitId':_0x23bb9e,'threadId':_0x11610e,'solved':_0x177b6e[_0x15a949(0xd7)]?I[_0x15a949(0xde)]:I['OpenOrReOpen']},_0x5a0af5=await this[_0x15a949(0xc5)][_0x15a949(0x12e)](_0x15a949(0xe4)+_0x23bb9e+_0x15a949(0xe2),{'body':_0x3e3894});return!_0x5a0af5[_0x15a949(0x11f)]['error']||_0x5a0af5[_0x15a949(0x11f)][_0x15a949(0xf5)][_0x15a949(0x11c)]===0x1;}async[_0x595a0c(0x13f)](_0x2cf966,_0x3b9787,_0x4ba94b,_0x59b6d3){const _0x78a53a=_0x595a0c,_0x50872b={'memberId':(await this['_sessionService'][_0x78a53a(0xe0)](_0x2cf966))[_0x78a53a(0x10e)](),'threadId':_0x4ba94b,'replyId':_0x59b6d3,'unitId':_0x2cf966},_0x428aa1=await this[_0x78a53a(0xc5)][_0x78a53a(0x12e)](_0x78a53a(0xe4)+_0x2cf966+_0x78a53a(0x111),{'body':_0x50872b});return!_0x428aa1[_0x78a53a(0x11f)][_0x78a53a(0xf5)]||_0x428aa1['body'][_0x78a53a(0xf5)][_0x78a53a(0x11c)]===0x1;}async['listComments'](_0x516880,_0x5ae597,_0x30ce48){const _0x4158e2=_0x595a0c,_0x135a68={'unitId':_0x516880,'threadId':_0x30ce48},_0x4fb56b=await this[_0x4158e2(0xc5)][_0x4158e2(0x12e)](_0x4158e2(0xe4)+_0x516880+_0x4158e2(0x112),{'body':_0x135a68}),_0x1d6813=_0x30ce48[_0x4158e2(0xdc)](_0x2daa1c=>G(_0x4fb56b[_0x4158e2(0x11f)]['comments'][_0x2daa1c],_0x516880,_0x5ae597))[_0x4158e2(0xf6)](Boolean);return Object[_0x4158e2(0x10c)](_0x4fb56b[_0x4158e2(0x11f)][_0x4158e2(0xf9)])[_0x4158e2(0xcf)](_0x58cdf6=>{const _0x1f2813=_0x4158e2;this[_0x1f2813(0xd8)]['addUser'](_0x58cdf6);}),_0x1d6813;}[_0x595a0c(0x13b)](_0x2ab3e5){const _0x55b823=_0x595a0c;return{'id':_0x2ab3e5['id'],'threadId':_0x2ab3e5[_0x55b823(0xe6)],'ref':_0x2ab3e5[_0x55b823(0x121)]};}};g=x([_(0x0,c['Inject'](P[_0x595a0c(0x122)])),_(0x1,c['Inject'](c[_0x595a0c(0x141)])),_(0x2,c[_0x595a0c(0xd4)](b[_0x595a0c(0xd9)])),_(0x3,c['Inject'](c['Injector']))],g);function _0x3f85(){const _0x5a4474=['syncUpdateMutationToColla','deleteComment','_initUserSync','UserManagerService','Reply','_httpService','_configService','add','createTimestamp','_sessionService','addUser','CustomRangeType','commentUpdate$','UNIVER_UNKNOWN','getComment','forEach','IThreadCommentDataSourceService','UNRECOGNIZED','thread-comment-data-source.config','find','Inject','10IWwoHG','stringify','resolved','_userService','CollaborationSessionService','236832nbsyBv','merge','map','size','Solved','symbol','requireSession','reply','/solved','payload','/universer-api/comment/unit/','Edit','threadId','user','Disposable','_threadCommentDataSourceService','addComment','UniverInstanceType','ThreadCommentModel','_commentService','2678408ItGEwL','@univerjs/core','1239ZwmFWr','resolveComment','content','CommentService','getUser','error','filter','root','disposeWithMe','users','toStringTag','DependentOn','1908070EITljP','replyId','Solve','get','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','length','UniverThreadCommentDataSourcePlugin','@univerjs-pro/license','UniverLicensePlugin','_init','onStarting','comment','slice','1293723CoMVhE','solved','values','customRanges','getMemberID','rangeId','updateComment','/delete','/list','rangeType','format','Delete','getOwnPropertyDescriptor','subscribe','_threadCommentDataSource','dataSource','22456863UHVUcA','onReady','code','IConfigService','@univerjs-pro/collaboration-client','body','setConfig','ref','HTTPService','pipe','dayjs','unitId','9432384OntXGT','Add','@univerjs/network','defineProperty','Unknown','12MMKvlk','/add','26478lzDjlm','post','bufferTime','_injector','type','userId','Module','getUnit','parse','userID','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','COMMENT','saveCommentToSnapshot','replies','/reply'];_0x3f85=function(){return _0x5a4474;};return _0x3f85();}var H=Object[_0x595a0c(0x116)],J=(_0xd3122f,_0xf06eae,_0x341764,_0x38737d)=>{for(var _0x49cd9e=_0x38737d>0x1?void 0x0:_0x38737d?H(_0xf06eae,_0x341764):_0xf06eae,_0x49825e=_0xd3122f['length']-0x1,_0x33cf08;_0x49825e>=0x0;_0x49825e--)(_0x33cf08=_0xd3122f[_0x49825e])&&(_0x49cd9e=_0x33cf08(_0x49cd9e)||_0x49cd9e);return _0x49cd9e;},y=(_0x19f321,_0x20da55)=>(_0x29f03b,_0x14e8b9)=>_0x20da55(_0x29f03b,_0x14e8b9,_0x19f321);let C=class extends c['Disposable']{constructor(_0x5ce865,_0x549da0){const _0x321708=_0x595a0c;super(),this['_threadCommentDataSourceService']=_0x5ce865,this[_0x321708(0x118)]=_0x549da0,this['_initDataSource']();}['_initDataSource'](){const _0x1211b5=_0x595a0c;this[_0x1211b5(0xe9)][_0x1211b5(0x119)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1211b5(0x13e)]=!0x1;}};C=J([y(0x0,M[_0x595a0c(0xd0)]),y(0x1,c['Inject'](g))],C);function _0x161a(_0x5010c7,_0x371497){const _0x3f855d=_0x3f85();return _0x161a=function(_0x161af4,_0x480b43){_0x161af4=_0x161af4-0xc4;let _0x3ecd10=_0x3f855d[_0x161af4];return _0x3ecd10;},_0x161a(_0x5010c7,_0x371497);}var F=Object['defineProperty'],L=Object[_0x595a0c(0x116)],Z=(_0x564031,_0x21320b,_0x4bbd90)=>_0x21320b in _0x564031?F(_0x564031,_0x21320b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bbd90}):_0x564031[_0x21320b]=_0x4bbd90,W=(_0x22d43d,_0x49b5e2,_0x1f9b44,_0x3187d9)=>{for(var _0x60b34d=_0x3187d9>0x1?void 0x0:_0x3187d9?L(_0x49b5e2,_0x1f9b44):_0x49b5e2,_0x3889ad=_0x22d43d['length']-0x1,_0x20c8c0;_0x3889ad>=0x0;_0x3889ad--)(_0x20c8c0=_0x22d43d[_0x3889ad])&&(_0x60b34d=_0x20c8c0(_0x60b34d)||_0x60b34d);return _0x60b34d;},O=(_0x4ef85c,_0x164965)=>(_0x2cbb2b,_0xd37f97)=>_0x164965(_0x2cbb2b,_0xd37f97,_0x4ef85c),N=(_0xbd9a03,_0x460bd3,_0x1c9120)=>Z(_0xbd9a03,typeof _0x460bd3!=_0x595a0c(0xdf)?_0x460bd3+'':_0x460bd3,_0x1c9120);exports[_0x595a0c(0x103)]=class extends c['Plugin']{constructor(_0x511434=D,_0x4c87fb,_0x49eb47){const _0x42abf2=_0x595a0c;super(),this['_config']=_0x511434,this[_0x42abf2(0x130)]=_0x4c87fb,this[_0x42abf2(0xc6)]=_0x49eb47;const {..._0x3b2889}=c[_0x42abf2(0xdb)]({},D,this['_config']);this['_configService'][_0x42abf2(0x120)](q,_0x3b2889);}[_0x595a0c(0x107)](){const _0x2461b7=_0x595a0c;[[g],[C],[p]][_0x2461b7(0xcf)](_0x47b929=>{const _0x3966b8=_0x2461b7;this['_injector'][_0x3966b8(0xc7)](_0x47b929);});}[_0x595a0c(0x11b)](){const _0x29bccf=_0x595a0c;this[_0x29bccf(0x130)][_0x29bccf(0xff)](C),this['_injector'][_0x29bccf(0xff)](p);}},N(exports[_0x595a0c(0x103)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x595a0c(0x131),c[_0x595a0c(0xeb)][_0x595a0c(0xcd)]),exports[_0x595a0c(0x103)]=W([c[_0x595a0c(0xfb)](j['UniverThreadCommentUIPlugin'],b[_0x595a0c(0x137)],T[_0x595a0c(0x105)]),O(0x1,c[_0x595a0c(0xd4)](c['Injector'])),O(0x2,c[_0x595a0c(0x11d)])],exports[_0x595a0c(0x103)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xef2ac3=_0x14bf;(function(_0x14f7d5,_0x673000){const _0x1e46e6=_0x14bf,_0x5a0836=_0x14f7d5();while(!![]){try{const _0x50a9de=parseInt(_0x1e46e6(0xf7))/0x1*(-parseInt(_0x1e46e6(0xd8))/0x2)+-parseInt(_0x1e46e6(0xa5))/0x3*(-parseInt(_0x1e46e6(0xfa))/0x4)+-parseInt(_0x1e46e6(0xff))/0x5*(-parseInt(_0x1e46e6(0xfd))/0x6)+-parseInt(_0x1e46e6(0xa6))/0x7*(parseInt(_0x1e46e6(0xdd))/0x8)+parseInt(_0x1e46e6(0x10b))/0x9*(-parseInt(_0x1e46e6(0xf4))/0xa)+-parseInt(_0x1e46e6(0xf6))/0xb*(parseInt(_0x1e46e6(0x109))/0xc)+-parseInt(_0x1e46e6(0xa9))/0xd*(-parseInt(_0x1e46e6(0xf5))/0xe);if(_0x50a9de===_0x673000)break;else _0x5a0836['push'](_0x5a0836['shift']());}catch(_0x1a17e7){_0x5a0836['push'](_0x5a0836['shift']());}}}(_0x7407,0x6a8dd));import{CommentService as _0x245f3b,CollaborationSessionService as _0x38ed50,UniverCollaborationClientPlugin as _0x35d9c6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x157e4d}from'@univerjs-pro/license';import{dayjs as _0x5802de,UserManagerService as _0x45265e,Inject as _0xaac0e8,Injector as _0x20745a,Disposable as _0x3e49f1,CustomRangeType as _0x11800a,UniverInstanceType as _0x20fd11,DependentOn as _0xe266c6,IConfigService as _0xf1feab,Plugin as _0x2c8fc5,merge as _0x47eecf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x33dd69}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38c2e2,IThreadCommentDataSourceService as _0x334a2b}from'@univerjs/thread-comment';import{bufferTime as _0x279e3b}from'rxjs';import{HTTPService as _0x20b61d}from'@univerjs/network';const W=_0xef2ac3(0xcd);var I=(_0x61f09c=>(_0x61f09c[_0x61f09c[_0xef2ac3(0xaa)]=0x0]=_0xef2ac3(0xaa),_0x61f09c[_0x61f09c['Solved']=0x1]=_0xef2ac3(0xd0),_0x61f09c[_0x61f09c[_0xef2ac3(0xf8)]=-0x1]=_0xef2ac3(0xf8),_0x61f09c))(I||{}),v=(_0x489c32=>(_0x489c32[_0x489c32[_0xef2ac3(0xe5)]=0x0]=_0xef2ac3(0xe5),_0x489c32[_0x489c32[_0xef2ac3(0xfc)]=0x1]='Add',_0x489c32[_0x489c32[_0xef2ac3(0xa7)]=0x2]=_0xef2ac3(0xa7),_0x489c32[_0x489c32['Edit']=0x3]=_0xef2ac3(0xc7),_0x489c32[_0x489c32['Delete']=0x4]=_0xef2ac3(0xd2),_0x489c32[_0x489c32[_0xef2ac3(0xbf)]=0x5]='Solve',_0x489c32[_0x489c32[_0xef2ac3(0xf8)]=-0x1]='UNRECOGNIZED',_0x489c32))(v||{});function _0x14bf(_0x378c77,_0x537f7c){const _0x740784=_0x7407();return _0x14bf=function(_0x14bfd7,_0x46733d){_0x14bfd7=_0x14bfd7-0xa5;let _0x3fcb45=_0x740784[_0x14bfd7];return _0x3fcb45;},_0x14bf(_0x378c77,_0x537f7c);}const D=_0x5b3d53=>_0x5802de(new Date(+_0x5b3d53))[_0xef2ac3(0xd6)](_0xef2ac3(0xd1)),B=async(_0x2301ee,_0x4a61ea)=>{const _0x3cd868=_0xef2ac3,_0x8d7d88=_0x2301ee[_0x3cd868(0xba)](_0x45265e),_0x29cdf3=_0x2301ee[_0x3cd868(0xba)](_0x20b61d);_0x4a61ea['forEach'](_0x1f0264=>{const _0x76ab13=_0x3cd868;_0x8d7d88[_0x76ab13(0x104)](_0x1f0264)&&_0x4a61ea[_0x76ab13(0x10a)](_0x1f0264);}),_0x4a61ea[_0x3cd868(0xea)]&&(await _0x29cdf3['get'](_0x3cd868(0xbe),{'params':{'userIDs':[..._0x4a61ea]}}))[_0x3cd868(0xc3)][_0x3cd868(0xca)][_0x3cd868(0xd9)](_0x4f473b=>{const _0x466bd5=_0x3cd868;_0x4f473b&&_0x8d7d88[_0x466bd5(0xe7)](_0x4f473b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2d42a8,_0x46f336,_0x1b8431,_0xa367e2)=>{for(var _0x3b2c17=_0xa367e2>0x1?void 0x0:_0xa367e2?K(_0x46f336,_0x1b8431):_0x46f336,_0x194b73=_0x2d42a8['length']-0x1,_0x3bbbb5;_0x194b73>=0x0;_0x194b73--)(_0x3bbbb5=_0x2d42a8[_0x194b73])&&(_0x3b2c17=_0x3bbbb5(_0x3b2c17)||_0x3b2c17);return _0x3b2c17;},p=(_0x1cd65c,_0x232ee1)=>(_0x449967,_0x25b825)=>_0x232ee1(_0x449967,_0x25b825,_0x1cd65c);function _0x7407(){const _0x357070=['parse','userID','syncUpdateMutationToColla','getCurrentUser','getUser','replies','pluginName','_threadCommentDataSource','saveCommentToSnapshot','2348376PBGovc','delete','27kOWmQI','rangeType','getComment','/list','191946tlktrL','14uVLaeX','Reply','/universer-api/comment/unit/','15596945cNZSKq','OpenOrReOpen','_commentService','payload','_injector','createTimestamp','error','userId','_configService','personId','ref','find','addComment','/edit','customRanges','reply','resolved','get','getUnit','resolveComment','threadId','/universer-api/user/list','Solve','getMemberID','deleteComment','disposeWithMe','body','code','parentId','_initUserSync','Edit','defineProperty','unitId','users','rangeId','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','_threadCommentModel','Solved','YYYY/MM/DD\x20HH:mm','Delete','listComments','content','requireSession','format','_config','26374NqBYcr','forEach','/delete','COMMENT','length','3161792LnqBXq','_init','add','post','updateComment','/solved','user','replyId','Unknown','_userService','addUser','_threadCommentDataSourceService','subscribe','size','root','_httpService','comments','_initDataSource','/reply','map','_sessionService','thread-comment-data-source.config','/add','1925330ExTfOj','14jViaFV','33agDBHs','4raeWhP','UNRECOGNIZED','commentUpdate$','24IBJZlP','type','Add','5118pFIxRU','pipe','5045dySPzw'];_0x7407=function(){return _0x357070;};return _0x7407();}let S=class extends _0x3e49f1{constructor(_0x34681d,_0x32df14,_0x53183e,_0x175829){const _0x13ff75=_0xef2ac3;super(),this[_0x13ff75(0xab)]=_0x34681d,this['_threadCommentModel']=_0x32df14,this['_userService']=_0x53183e,this[_0x13ff75(0xad)]=_0x175829,this[_0x13ff75(0xde)](),this[_0x13ff75(0xc6)]();}[_0xef2ac3(0xc6)](){const _0x3ade16=_0xef2ac3;this[_0x3ade16(0xc2)](this[_0x3ade16(0xcf)][_0x3ade16(0xf9)][_0x3ade16(0xfe)](_0x279e3b(0x10))[_0x3ade16(0xe9)](_0x484049=>{const _0x1b7d1a=_0x3ade16,_0x35891a=new Set();_0x484049[_0x1b7d1a(0xd9)](_0xad9c2e=>{const _0x3e4e60=_0x1b7d1a;switch(_0xad9c2e[_0x3e4e60(0xfb)]){case'add':{const _0x2c424a=_0xad9c2e[_0x3e4e60(0xac)][_0x3e4e60(0xb2)];_0x35891a[_0x3e4e60(0xdf)](_0x2c424a);break;}}}),B(this['_injector'],_0x35891a);}));}['_init'](){const _0x43d943=_0xef2ac3;this[_0x43d943(0xc2)](this[_0x43d943(0xab)][_0x43d943(0xf9)][_0x43d943(0xe9)](async _0x5d4325=>{const _0x4c8f98=_0x43d943;var _0xa401a4,_0x5677e8,_0x5c250a,_0x4fe39d;const _0x1d7703=(_0xa401a4=this[_0x4c8f98(0xcf)][_0x4c8f98(0xbb)](_0x5d4325[_0x4c8f98(0xc9)])[_0x4c8f98(0xb4)](_0x3bee46=>_0x3bee46['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0xa401a4[_0x4c8f98(0xeb)];if(!_0x1d7703)return;const {unitId:_0x1d6b92,subUnitId:_0x297662}=_0x1d7703;switch(_0x5d4325[_0x4c8f98(0xe3)]&&this['_userService'][_0x4c8f98(0xe7)](_0x5d4325[_0x4c8f98(0xe3)]),_0x5d4325[_0x4c8f98(0xfb)]){case v['Add']:break;case v[_0x4c8f98(0xa7)]:{this['_threadCommentModel']['addComment'](_0x1d6b92,_0x297662,{'unitId':_0x1d6b92,'subUnitId':_0x297662,'ref':'','id':_0x5d4325[_0x4c8f98(0xe4)],'dT':D(+_0x5d4325[_0x4c8f98(0xae)]),'threadId':_0x5d4325[_0x4c8f98(0xbd)],'personId':(_0x5c250a=(_0x5677e8=_0x5d4325[_0x4c8f98(0xe3)])==null?void 0x0:_0x5677e8[_0x4c8f98(0x101)])!=null?_0x5c250a:_0x5d4325[_0x4c8f98(0xb0)],'text':JSON[_0x4c8f98(0x100)](_0x5d4325['content']),'parentId':_0x1d7703['id']});break;}case v['Delete']:{const _0x2c575b=this[_0x4c8f98(0xcf)][_0x4c8f98(0x10d)](_0x1d6b92,_0x297662,_0x5d4325['replyId']);_0x2c575b&&_0x2c575b[_0x4c8f98(0xc5)]&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xc1)](_0x1d6b92,_0x297662,_0x5d4325[_0x4c8f98(0xe4)]);break;}case v[_0x4c8f98(0xc7)]:{this[_0x4c8f98(0xcf)][_0x4c8f98(0xe1)](_0x1d6b92,_0x297662,{'commentId':_0x5d4325[_0x4c8f98(0xe4)],'text':JSON['parse'](_0x5d4325['content'])});break;}case v[_0x4c8f98(0xbf)]:{const _0x325e6e=(_0x4fe39d=this[_0x4c8f98(0xcf)]['getUnit'](_0x5d4325[_0x4c8f98(0xc9)])['find'](_0x5e995f=>_0x5e995f['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0x4fe39d[_0x4c8f98(0xeb)];_0x325e6e&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xbc)](_0x1d6b92,_0x297662,_0x325e6e['id'],_0x5d4325['solved']===I[_0x4c8f98(0xd0)]);break;}}}));}};S=V([p(0x0,_0xaac0e8(_0x245f3b)),p(0x1,_0xaac0e8(_0x38c2e2)),p(0x2,_0xaac0e8(_0x45265e)),p(0x3,_0xaac0e8(_0x20745a))],S);const z=_0xef2ac3(0xf2),M={};var k=Object[_0xef2ac3(0xce)],Q=(_0x4b00ca,_0x47edbb,_0x1fab8f,_0x2d8ce4)=>{for(var _0x17e4ac=_0x2d8ce4>0x1?void 0x0:_0x2d8ce4?k(_0x47edbb,_0x1fab8f):_0x47edbb,_0x4e8f41=_0x4b00ca['length']-0x1,_0x1eb821;_0x4e8f41>=0x0;_0x4e8f41--)(_0x1eb821=_0x4b00ca[_0x4e8f41])&&(_0x17e4ac=_0x1eb821(_0x17e4ac)||_0x17e4ac);return _0x17e4ac;},_=(_0x12fda2,_0x233132)=>(_0x51483e,_0x46c0c4)=>_0x233132(_0x51483e,_0x46c0c4,_0x12fda2);function X(_0x40afd3,_0xb542df){const _0x20d48f=_0xef2ac3,_0x41a08c=_0x40afd3[_0x20d48f(0x105)][0x0];return{..._0xb542df,'id':_0x41a08c[_0x20d48f(0xe4)],'resolved':_0x40afd3['solved']===0x1,'dT':D(_0x41a08c['createTimestamp']),'personId':_0x41a08c[_0x20d48f(0xb0)],'threadId':_0x41a08c['threadId']};}function ee(_0x48fc58,_0x43d309,_0x127dcd){const _0x353562=_0xef2ac3;var _0x5e396f,_0xf97301;if(((_0xf97301=(_0x5e396f=_0x48fc58==null?void 0x0:_0x48fc58['replies'])==null?void 0x0:_0x5e396f[_0x353562(0xdc)])!=null?_0xf97301:0x0)>0x0){const _0xe44c6d=(_0x3141ec,_0x4e0602)=>({'id':_0x3141ec['replyId'],'threadId':_0x3141ec[_0x353562(0xbd)],'dT':D(_0x3141ec['createTimestamp']),'personId':_0x3141ec['userId'],'resolved':_0x48fc58['solved']===I['Solved'],'unitId':_0x43d309,'subUnitId':_0x127dcd,'text':JSON[_0x353562(0x100)](_0x3141ec[_0x353562(0xd4)]),'parentId':_0x4e0602}),_0x2d895=_0xe44c6d(_0x48fc58['replies'][0x0]);return{..._0x2d895,'children':_0x48fc58['replies']['slice'](0x1)[_0x353562(0xf0)](_0x5b6cf8=>_0xe44c6d(_0x5b6cf8,_0x2d895['id']))};}return null;}let f=class{constructor(_0x5db0c5,_0x19d232,_0x10d091,_0x5423f7){const _0xb33276=_0xef2ac3;this[_0xb33276(0xec)]=_0x5db0c5,this[_0xb33276(0xe6)]=_0x19d232,this['_sessionService']=_0x10d091,this['_injector']=_0x5423f7;}async[_0xef2ac3(0xb5)](_0x442fcf){const _0x33f642=_0xef2ac3;var _0x1e1426,_0x4a9db3;const {parentId:_0x27b835,unitId:_0x5a79fb,text:_0x2bcf15,threadId:_0xdebc0d}=_0x442fcf,_0x1fbc83=(_0x4a9db3=(_0x1e1426=_0x2bcf15[_0x33f642(0xb7)])==null?void 0x0:_0x1e1426['filter'](_0x2d69cb=>_0x2d69cb[_0x33f642(0x10c)]===_0x11800a['COMMENT'])[_0x33f642(0xf0)](_0x13364a=>_0x13364a[_0x33f642(0xcb)]))!=null?_0x4a9db3:[],_0x28e7a1=JSON['stringify'](_0x2bcf15),_0x5bfb43=(await this[_0x33f642(0xf1)][_0x33f642(0xd5)](_0x5a79fb))['getMemberID']();if(_0x27b835){const _0x581b36={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83,'threadId':_0xdebc0d},_0x35d062=(await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xef),{'body':_0x581b36}))[_0x33f642(0xc3)][_0x33f642(0xb8)];return{..._0x442fcf,'id':_0x35d062[_0x33f642(0xe4)],'dT':_0x5802de(+_0x35d062['createTimestamp'])['format'](_0x33f642(0xd1)),'personId':_0x35d062[_0x33f642(0xb0)]};}else{const _0x3d29c0={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83},_0x2ad157=await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xf3),{'body':_0x3d29c0});return X(_0x2ad157[_0x33f642(0xc3)]['comment'],_0x442fcf);}}async['updateComment'](_0x3ca510){const _0x2651a3=_0xef2ac3;var _0x2ef7f7,_0x392b88;const {text:_0xb69a1c,unitId:_0x579c28}=_0x3ca510,_0x4d3b06=(_0x392b88=(_0x2ef7f7=_0xb69a1c['customRanges'])==null?void 0x0:_0x2ef7f7[_0x2651a3(0xcc)](_0x1ec50f=>_0x1ec50f[_0x2651a3(0x10c)]===_0x11800a[_0x2651a3(0xdb)])[_0x2651a3(0xf0)](_0x5e1c21=>_0x5e1c21[_0x2651a3(0xcb)]))!=null?_0x392b88:[],_0x5ede28=JSON['stringify'](_0xb69a1c),_0x3a56dd=_0x3ca510[_0x2651a3(0xbd)],_0x5d27ec=_0x3ca510['id'],_0x110ab6={'memberId':(await this[_0x2651a3(0xf1)][_0x2651a3(0xd5)](_0x579c28))[_0x2651a3(0xc0)](),'unitId':_0x579c28,'threadId':_0x3a56dd,'mention':_0x4d3b06,'content':_0x5ede28,'replyId':_0x5d27ec},_0x3817a0=await this[_0x2651a3(0xec)][_0x2651a3(0xe0)]('/universer-api/comment/unit/'+_0x579c28+_0x2651a3(0xb6),{'body':_0x110ab6});return!_0x3817a0[_0x2651a3(0xc3)]['error']||_0x3817a0[_0x2651a3(0xc3)][_0x2651a3(0xaf)][_0x2651a3(0xc4)]===0x1;}async[_0xef2ac3(0xbc)](_0x2d8be3){const _0x2bf397=_0xef2ac3,{unitId:_0xb07b31}=_0x2d8be3,_0x413f4a=_0x2d8be3[_0x2bf397(0xbd)],_0xba14bc={'memberId':this['_userService'][_0x2bf397(0x103)]()[_0x2bf397(0x101)],'unitId':_0xb07b31,'threadId':_0x413f4a,'solved':_0x2d8be3[_0x2bf397(0xb9)]?I[_0x2bf397(0xd0)]:I[_0x2bf397(0xaa)]},_0x511262=await this[_0x2bf397(0xec)][_0x2bf397(0xe0)](_0x2bf397(0xa8)+_0xb07b31+_0x2bf397(0xe2),{'body':_0xba14bc});return!_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)]||_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)][_0x2bf397(0xc4)]===0x1;}async['deleteComment'](_0x43197f,_0x381705,_0x55669a,_0x10ad64){const _0x1b7d07=_0xef2ac3,_0x2c8cd6={'memberId':(await this[_0x1b7d07(0xf1)][_0x1b7d07(0xd5)](_0x43197f))[_0x1b7d07(0xc0)](),'threadId':_0x55669a,'replyId':_0x10ad64,'unitId':_0x43197f},_0x46767d=await this[_0x1b7d07(0xec)]['post']('/universer-api/comment/unit/'+_0x43197f+_0x1b7d07(0xda),{'body':_0x2c8cd6});return!_0x46767d[_0x1b7d07(0xc3)]['error']||_0x46767d[_0x1b7d07(0xc3)][_0x1b7d07(0xaf)][_0x1b7d07(0xc4)]===0x1;}async[_0xef2ac3(0xd3)](_0x5e027e,_0x2c4d19,_0x598a33){const _0x31ec37=_0xef2ac3,_0x4a60db={'unitId':_0x5e027e,'threadId':_0x598a33},_0x5703e7=await this[_0x31ec37(0xec)][_0x31ec37(0xe0)](_0x31ec37(0xa8)+_0x5e027e+_0x31ec37(0x10e),{'body':_0x4a60db}),_0x17b0ee=_0x598a33[_0x31ec37(0xf0)](_0xa2b4e2=>ee(_0x5703e7[_0x31ec37(0xc3)][_0x31ec37(0xed)][_0xa2b4e2],_0x5e027e,_0x2c4d19))[_0x31ec37(0xcc)](Boolean);return Object['values'](_0x5703e7['body'][_0x31ec37(0xca)])[_0x31ec37(0xd9)](_0x11e39d=>{const _0x3495b4=_0x31ec37;this['_userService'][_0x3495b4(0xe7)](_0x11e39d);}),_0x17b0ee;}[_0xef2ac3(0x108)](_0x23d661){const _0x27a70d=_0xef2ac3;return{'id':_0x23d661['id'],'threadId':_0x23d661['threadId'],'ref':_0x23d661[_0x27a70d(0xb3)]};}};f=Q([_(0x0,_0xaac0e8(_0x20b61d)),_(0x1,_0xaac0e8(_0x45265e)),_(0x2,_0xaac0e8(_0x38ed50)),_(0x3,_0xaac0e8(_0x20745a))],f);var re=Object[_0xef2ac3(0xce)],te=(_0x1fa5ff,_0x310297,_0x557b8d,_0x10608e)=>{for(var _0x927c35=_0x10608e>0x1?void 0x0:_0x10608e?re(_0x310297,_0x557b8d):_0x310297,_0x28b27a=_0x1fa5ff['length']-0x1,_0x509d43;_0x28b27a>=0x0;_0x28b27a--)(_0x509d43=_0x1fa5ff[_0x28b27a])&&(_0x927c35=_0x509d43(_0x927c35)||_0x927c35);return _0x927c35;},N=(_0x2666c3,_0x5be33b)=>(_0x1150a2,_0x4d91de)=>_0x5be33b(_0x1150a2,_0x4d91de,_0x2666c3);let g=class extends _0x3e49f1{constructor(_0x4e790a,_0xbff171){const _0x4b1ced=_0xef2ac3;super(),this[_0x4b1ced(0xe8)]=_0x4e790a,this[_0x4b1ced(0x107)]=_0xbff171,this[_0x4b1ced(0xee)]();}[_0xef2ac3(0xee)](){const _0x3dc1ba=_0xef2ac3;this[_0x3dc1ba(0xe8)]['dataSource']=this[_0x3dc1ba(0x107)],this[_0x3dc1ba(0xe8)][_0x3dc1ba(0x102)]=!0x1;}};g=te([N(0x0,_0x334a2b),N(0x1,_0xaac0e8(f))],g);var se=Object[_0xef2ac3(0xc8)],oe=Object[_0xef2ac3(0xce)],ne=(_0x5487d2,_0x540370,_0x44f898)=>_0x540370 in _0x5487d2?se(_0x5487d2,_0x540370,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x44f898}):_0x5487d2[_0x540370]=_0x44f898,ie=(_0x57d0b9,_0x48c692,_0x3893d7,_0x2ceb52)=>{const _0x40c232=_0xef2ac3;for(var _0x5c3f9e=_0x2ceb52>0x1?void 0x0:_0x2ceb52?oe(_0x48c692,_0x3893d7):_0x48c692,_0x33596a=_0x57d0b9[_0x40c232(0xdc)]-0x1,_0x1e70ac;_0x33596a>=0x0;_0x33596a--)(_0x1e70ac=_0x57d0b9[_0x33596a])&&(_0x5c3f9e=_0x1e70ac(_0x5c3f9e)||_0x5c3f9e);return _0x5c3f9e;},w=(_0x48528d,_0x56d06e)=>(_0x260918,_0x2a7313)=>_0x56d06e(_0x260918,_0x2a7313,_0x48528d),$=(_0x2f1a0a,_0x305b57,_0x4fa42d)=>ne(_0x2f1a0a,typeof _0x305b57!='symbol'?_0x305b57+'':_0x305b57,_0x4fa42d);let b=class extends _0x2c8fc5{constructor(_0x5e6db6=M,_0x59f833,_0x5b921d){const _0x47fb5c=_0xef2ac3;super(),this[_0x47fb5c(0xd7)]=_0x5e6db6,this[_0x47fb5c(0xad)]=_0x59f833,this[_0x47fb5c(0xb1)]=_0x5b921d;const {..._0x3053b6}=_0x47eecf({},M,this[_0x47fb5c(0xd7)]);this[_0x47fb5c(0xb1)]['setConfig'](z,_0x3053b6);}['onStarting'](){const _0x2cbf17=_0xef2ac3;[[f],[g],[S]][_0x2cbf17(0xd9)](_0x4ee1e3=>{const _0x4eef37=_0x2cbf17;this[_0x4eef37(0xad)][_0x4eef37(0xdf)](_0x4ee1e3);});}['onReady'](){const _0x56ed42=_0xef2ac3;this[_0x56ed42(0xad)][_0x56ed42(0xba)](g),this['_injector'][_0x56ed42(0xba)](S);}};$(b,_0xef2ac3(0x106),W),$(b,_0xef2ac3(0xfb),_0x20fd11['UNIVER_UNKNOWN']),b=ie([_0xe266c6(_0x33dd69,_0x35d9c6,_0x157e4d),w(0x1,_0xaac0e8(_0x20745a)),w(0x2,_0xf1feab)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x46fe98=_0x4cb1;(function(_0x357f21,_0x270380){const _0x52667c=_0x4cb1,_0x322390=_0x357f21();while(!![]){try{const _0x2d52f=-parseInt(_0x52667c(0x10c))/0x1+-parseInt(_0x52667c(0xe2))/0x2*(-parseInt(_0x52667c(0xf0))/0x3)+parseInt(_0x52667c(0x13e))/0x4*(parseInt(_0x52667c(0x131))/0x5)+parseInt(_0x52667c(0x137))/0x6+parseInt(_0x52667c(0x116))/0x7+-parseInt(_0x52667c(0x110))/0x8*(-parseInt(_0x52667c(0x10e))/0x9)+-parseInt(_0x52667c(0xed))/0xa;if(_0x2d52f===_0x270380)break;else _0x322390['push'](_0x322390['shift']());}catch(_0x4b26d3){_0x322390['push'](_0x322390['shift']());}}}(_0x47c6,0x42465));import{CommentService as _0x311f50,CollaborationSessionService as _0x5d4e31,UniverCollaborationClientPlugin as _0x4bccec}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3559a3}from'@univerjs-pro/license';import{dayjs as _0x1fdba,UserManagerService as _0xaee3d1,Inject as _0xd8e16e,Injector as _0x3aac1a,Disposable as _0x9d9fe,CustomRangeType as _0x171c7e,UniverInstanceType as _0x1b0f42,DependentOn as _0xabdba,IConfigService as _0x1ed246,Plugin as _0xc49e69,merge as _0x43fbb8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x103552}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3c9912,IThreadCommentDataSourceService as _0x17ba36}from'@univerjs/thread-comment';import{bufferTime as _0x2bd82e}from'rxjs';import{HTTPService as _0x4c2fd4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4e96f3=>(_0x4e96f3[_0x4e96f3[_0x46fe98(0x13a)]=0x0]=_0x46fe98(0x13a),_0x4e96f3[_0x4e96f3[_0x46fe98(0x11f)]=0x1]=_0x46fe98(0x11f),_0x4e96f3[_0x4e96f3[_0x46fe98(0x12a)]=-0x1]=_0x46fe98(0x12a),_0x4e96f3))(I||{}),v=(_0x583e3c=>(_0x583e3c[_0x583e3c[_0x46fe98(0x112)]=0x0]='Unknown',_0x583e3c[_0x583e3c[_0x46fe98(0x125)]=0x1]=_0x46fe98(0x125),_0x583e3c[_0x583e3c[_0x46fe98(0x143)]=0x2]=_0x46fe98(0x143),_0x583e3c[_0x583e3c[_0x46fe98(0x126)]=0x3]=_0x46fe98(0x126),_0x583e3c[_0x583e3c[_0x46fe98(0x129)]=0x4]=_0x46fe98(0x129),_0x583e3c[_0x583e3c['Solve']=0x5]=_0x46fe98(0x120),_0x583e3c[_0x583e3c[_0x46fe98(0x12a)]=-0x1]='UNRECOGNIZED',_0x583e3c))(v||{});function _0x47c6(){const _0x447cb0=['resolveComment','getUnit','disposeWithMe','dataSource','getComment','_userService','_httpService','getCurrentUser','pipe','234030RfiZYE','unitId','13653yZSMtb','/universer-api/user/list','968pIlcgg','listComments','Unknown','format','UNIVER_UNKNOWN','code','289919ojgJjk','replies','subscribe','length','slice','replyId','_commentService','body','solved','Solved','Solve','add','_injector','post','_configService','Add','Edit','stringify','/edit','Delete','UNRECOGNIZED','type','forEach','_threadCommentDataSourceService','users','rangeType','_initUserSync','35rKMaUX','customRanges','error','user','deleteComment','requireSession','218082vfAmuG','find','symbol','OpenOrReOpen','map','parse','addUser','155720wlZlrX','COMMENT','parentId','comments','payload','Reply','/list','rangeId','/add','126752juHjMU','defineProperty','createTimestamp','/universer-api/comment/unit/','pluginName','saveCommentToSnapshot','getUser','thread-comment-data-source.config','content','threadId','_threadCommentDataSource','2818440TPNBtH','getOwnPropertyDescriptor','values','12qUpRxE','addComment','_init','YYYY/MM/DD\x20HH:mm','userId','size','get','root','filter','userID','resolved','ref','getMemberID','/solved','_config','_sessionService','_threadCommentModel','_initDataSource','/delete'];_0x47c6=function(){return _0x447cb0;};return _0x47c6();}const D=_0x36e3e3=>_0x1fdba(new Date(+_0x36e3e3))[_0x46fe98(0x113)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4ab9bb,_0x47f95c)=>{const _0x52b890=_0x46fe98,_0x49685a=_0x4ab9bb[_0x52b890(0xf6)](_0xaee3d1),_0x7f8df5=_0x4ab9bb[_0x52b890(0xf6)](_0x4c2fd4);_0x47f95c[_0x52b890(0x12c)](_0x5ce717=>{const _0x1ded7b=_0x52b890;_0x49685a[_0x1ded7b(0xe8)](_0x5ce717)&&_0x47f95c['delete'](_0x5ce717);}),_0x47f95c[_0x52b890(0xf5)]&&(await _0x7f8df5[_0x52b890(0xf6)](_0x52b890(0x10f),{'params':{'userIDs':[..._0x47f95c]}}))['body'][_0x52b890(0x12e)][_0x52b890(0x12c)](_0x5f0036=>{const _0x2b7407=_0x52b890;_0x5f0036&&_0x49685a[_0x2b7407(0x13d)](_0x5f0036);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6405,_0x16eaa6,_0x54f1c2,_0x574ec6)=>{const _0x31cf76=_0x46fe98;for(var _0x3f2302=_0x574ec6>0x1?void 0x0:_0x574ec6?K(_0x16eaa6,_0x54f1c2):_0x16eaa6,_0x2e5b41=_0x3c6405[_0x31cf76(0x119)]-0x1,_0x2772b2;_0x2e5b41>=0x0;_0x2e5b41--)(_0x2772b2=_0x3c6405[_0x2e5b41])&&(_0x3f2302=_0x2772b2(_0x3f2302)||_0x3f2302);return _0x3f2302;},p=(_0x3b1918,_0x1d19d7)=>(_0x4a50ee,_0x153dca)=>_0x1d19d7(_0x4a50ee,_0x153dca,_0x3b1918);let S=class extends _0x9d9fe{constructor(_0x23aac8,_0xc128cd,_0x50e8dc,_0x7d5f92){const _0x3c201e=_0x46fe98;super(),this[_0x3c201e(0x11c)]=_0x23aac8,this[_0x3c201e(0x100)]=_0xc128cd,this[_0x3c201e(0x108)]=_0x50e8dc,this[_0x3c201e(0x122)]=_0x7d5f92,this[_0x3c201e(0xf2)](),this['_initUserSync']();}[_0x46fe98(0x130)](){const _0x444efa=_0x46fe98;this['disposeWithMe'](this[_0x444efa(0x100)]['commentUpdate$'][_0x444efa(0x10b)](_0x2bd82e(0x10))['subscribe'](_0x2647b4=>{const _0x1dba5a=_0x444efa,_0x1f35a9=new Set();_0x2647b4['forEach'](_0xecb118=>{const _0x39e4cb=_0x4cb1;switch(_0xecb118[_0x39e4cb(0x12b)]){case'add':{const _0x1a017d=_0xecb118[_0x39e4cb(0x142)]['personId'];_0x1f35a9['add'](_0x1a017d);break;}}}),B(this[_0x1dba5a(0x122)],_0x1f35a9);}));}[_0x46fe98(0xf2)](){const _0x2fb4e7=_0x46fe98;this[_0x2fb4e7(0x105)](this['_commentService']['commentUpdate$'][_0x2fb4e7(0x118)](async _0x148654=>{const _0xe8b06e=_0x2fb4e7;var _0x203a53,_0x4a6ae7,_0x5d802c,_0x18a1ca;const _0x3addc0=(_0x203a53=this[_0xe8b06e(0x100)][_0xe8b06e(0x104)](_0x148654['unitId'])[_0xe8b06e(0x138)](_0x269394=>_0x269394['threadId']===_0x148654['threadId']))==null?void 0x0:_0x203a53[_0xe8b06e(0xf7)];if(!_0x3addc0)return;const {unitId:_0x4895e8,subUnitId:_0x29a1a9}=_0x3addc0;switch(_0x148654[_0xe8b06e(0x134)]&&this[_0xe8b06e(0x108)][_0xe8b06e(0x13d)](_0x148654['user']),_0x148654['type']){case v[_0xe8b06e(0x125)]:break;case v[_0xe8b06e(0x143)]:{this[_0xe8b06e(0x100)][_0xe8b06e(0xf1)](_0x4895e8,_0x29a1a9,{'unitId':_0x4895e8,'subUnitId':_0x29a1a9,'ref':'','id':_0x148654[_0xe8b06e(0x11b)],'dT':D(+_0x148654[_0xe8b06e(0xe4)]),'threadId':_0x148654[_0xe8b06e(0xeb)],'personId':(_0x5d802c=(_0x4a6ae7=_0x148654[_0xe8b06e(0x134)])==null?void 0x0:_0x4a6ae7[_0xe8b06e(0xf9)])!=null?_0x5d802c:_0x148654['userId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654['content']),'parentId':_0x3addc0['id']});break;}case v[_0xe8b06e(0x129)]:{const _0xe32ca3=this[_0xe8b06e(0x100)][_0xe8b06e(0x107)](_0x4895e8,_0x29a1a9,_0x148654[_0xe8b06e(0x11b)]);_0xe32ca3&&_0xe32ca3[_0xe8b06e(0x140)]&&this[_0xe8b06e(0x100)][_0xe8b06e(0x135)](_0x4895e8,_0x29a1a9,_0x148654['replyId']);break;}case v[_0xe8b06e(0x126)]:{this['_threadCommentModel']['updateComment'](_0x4895e8,_0x29a1a9,{'commentId':_0x148654['replyId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654[_0xe8b06e(0xea)])});break;}case v[_0xe8b06e(0x120)]:{const _0x1e2ead=(_0x18a1ca=this['_threadCommentModel'][_0xe8b06e(0x104)](_0x148654[_0xe8b06e(0x10d)])[_0xe8b06e(0x138)](_0x219fd7=>_0x219fd7['threadId']===_0x148654[_0xe8b06e(0xeb)]))==null?void 0x0:_0x18a1ca[_0xe8b06e(0xf7)];_0x1e2ead&&this['_threadCommentModel'][_0xe8b06e(0x103)](_0x4895e8,_0x29a1a9,_0x1e2ead['id'],_0x148654[_0xe8b06e(0x11e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0xd8e16e(_0x311f50)),p(0x1,_0xd8e16e(_0x3c9912)),p(0x2,_0xd8e16e(_0xaee3d1)),p(0x3,_0xd8e16e(_0x3aac1a))],S);const z=_0x46fe98(0xe9),M={};var k=Object[_0x46fe98(0xee)],Q=(_0x35c5f8,_0x3a57e9,_0x200d12,_0x2a244c)=>{const _0x13e813=_0x46fe98;for(var _0x2cd71c=_0x2a244c>0x1?void 0x0:_0x2a244c?k(_0x3a57e9,_0x200d12):_0x3a57e9,_0x91739d=_0x35c5f8[_0x13e813(0x119)]-0x1,_0x5dc5b2;_0x91739d>=0x0;_0x91739d--)(_0x5dc5b2=_0x35c5f8[_0x91739d])&&(_0x2cd71c=_0x5dc5b2(_0x2cd71c)||_0x2cd71c);return _0x2cd71c;},_=(_0x15a250,_0x364c8a)=>(_0x2b677c,_0x1853c5)=>_0x364c8a(_0x2b677c,_0x1853c5,_0x15a250);function X(_0x100bed,_0x5e7b4c){const _0x258a3a=_0x46fe98,_0x200c0d=_0x100bed[_0x258a3a(0x117)][0x0];return{..._0x5e7b4c,'id':_0x200c0d['replyId'],'resolved':_0x100bed[_0x258a3a(0x11e)]===0x1,'dT':D(_0x200c0d[_0x258a3a(0xe4)]),'personId':_0x200c0d[_0x258a3a(0xf4)],'threadId':_0x200c0d[_0x258a3a(0xeb)]};}function ee(_0x1294b8,_0x17f30d,_0x22e191){const _0x14496f=_0x46fe98;var _0x2724ff,_0x5dfaf6;if(((_0x5dfaf6=(_0x2724ff=_0x1294b8==null?void 0x0:_0x1294b8[_0x14496f(0x117)])==null?void 0x0:_0x2724ff[_0x14496f(0x119)])!=null?_0x5dfaf6:0x0)>0x0){const _0xc7b2f4=(_0x3daaf9,_0x1342fb)=>({'id':_0x3daaf9[_0x14496f(0x11b)],'threadId':_0x3daaf9['threadId'],'dT':D(_0x3daaf9[_0x14496f(0xe4)]),'personId':_0x3daaf9[_0x14496f(0xf4)],'resolved':_0x1294b8[_0x14496f(0x11e)]===I[_0x14496f(0x11f)],'unitId':_0x17f30d,'subUnitId':_0x22e191,'text':JSON[_0x14496f(0x13c)](_0x3daaf9[_0x14496f(0xea)]),'parentId':_0x1342fb}),_0x8b6588=_0xc7b2f4(_0x1294b8[_0x14496f(0x117)][0x0]);return{..._0x8b6588,'children':_0x1294b8[_0x14496f(0x117)][_0x14496f(0x11a)](0x1)[_0x14496f(0x13b)](_0x4c6fbb=>_0xc7b2f4(_0x4c6fbb,_0x8b6588['id']))};}return null;}let f=class{constructor(_0x41a115,_0x231dec,_0x822be7,_0x4a6944){const _0x374086=_0x46fe98;this[_0x374086(0x109)]=_0x41a115,this[_0x374086(0x108)]=_0x231dec,this['_sessionService']=_0x822be7,this[_0x374086(0x122)]=_0x4a6944;}async[_0x46fe98(0xf1)](_0x200f76){const _0x320134=_0x46fe98;var _0x3f6f6c,_0x53a20c;const {parentId:_0x1152dc,unitId:_0x5c977c,text:_0x19d189,threadId:_0x7f14a2}=_0x200f76,_0x4a7c12=(_0x53a20c=(_0x3f6f6c=_0x19d189[_0x320134(0x132)])==null?void 0x0:_0x3f6f6c['filter'](_0x4ca4eb=>_0x4ca4eb['rangeType']===_0x171c7e[_0x320134(0x13f)])[_0x320134(0x13b)](_0x4f72a1=>_0x4f72a1['rangeId']))!=null?_0x53a20c:[],_0x22529e=JSON[_0x320134(0x127)](_0x19d189),_0x29dedd=(await this[_0x320134(0xff)][_0x320134(0x136)](_0x5c977c))['getMemberID']();if(_0x1152dc){const _0x3da1c1={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12,'threadId':_0x7f14a2},_0x46a3c0=(await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+'/reply',{'body':_0x3da1c1}))['body']['reply'];return{..._0x200f76,'id':_0x46a3c0['replyId'],'dT':_0x1fdba(+_0x46a3c0[_0x320134(0xe4)])[_0x320134(0x113)](_0x320134(0xf3)),'personId':_0x46a3c0[_0x320134(0xf4)]};}else{const _0xfa9222={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12},_0x47edc7=await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+_0x320134(0xe1),{'body':_0xfa9222});return X(_0x47edc7[_0x320134(0x11d)]['comment'],_0x200f76);}}async['updateComment'](_0x3c2326){const _0x3e9407=_0x46fe98;var _0x5e47cf,_0x5d912d;const {text:_0x34c933,unitId:_0x51150b}=_0x3c2326,_0x24d314=(_0x5d912d=(_0x5e47cf=_0x34c933[_0x3e9407(0x132)])==null?void 0x0:_0x5e47cf[_0x3e9407(0xf8)](_0x399329=>_0x399329[_0x3e9407(0x12f)]===_0x171c7e['COMMENT'])['map'](_0x46297f=>_0x46297f[_0x3e9407(0xe0)]))!=null?_0x5d912d:[],_0x13bcf9=JSON[_0x3e9407(0x127)](_0x34c933),_0x3897df=_0x3c2326[_0x3e9407(0xeb)],_0x3346ad=_0x3c2326['id'],_0x2f5e51={'memberId':(await this[_0x3e9407(0xff)][_0x3e9407(0x136)](_0x51150b))[_0x3e9407(0xfc)](),'unitId':_0x51150b,'threadId':_0x3897df,'mention':_0x24d314,'content':_0x13bcf9,'replyId':_0x3346ad},_0x126655=await this[_0x3e9407(0x109)][_0x3e9407(0x123)](_0x3e9407(0xe5)+_0x51150b+_0x3e9407(0x128),{'body':_0x2f5e51});return!_0x126655[_0x3e9407(0x11d)][_0x3e9407(0x133)]||_0x126655[_0x3e9407(0x11d)]['error'][_0x3e9407(0x115)]===0x1;}async[_0x46fe98(0x103)](_0x154d22){const _0x47a74f=_0x46fe98,{unitId:_0x546e51}=_0x154d22,_0x510d2e=_0x154d22[_0x47a74f(0xeb)],_0x47e6fa={'memberId':this[_0x47a74f(0x108)][_0x47a74f(0x10a)]()['userID'],'unitId':_0x546e51,'threadId':_0x510d2e,'solved':_0x154d22[_0x47a74f(0xfa)]?I['Solved']:I[_0x47a74f(0x13a)]},_0x337b82=await this['_httpService']['post'](_0x47a74f(0xe5)+_0x546e51+_0x47a74f(0xfd),{'body':_0x47e6fa});return!_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)]||_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)][_0x47a74f(0x115)]===0x1;}async[_0x46fe98(0x135)](_0x504c5e,_0x1ee61c,_0x3a8e25,_0x17c933){const _0x23e8c7=_0x46fe98,_0x4189f6={'memberId':(await this[_0x23e8c7(0xff)]['requireSession'](_0x504c5e))[_0x23e8c7(0xfc)](),'threadId':_0x3a8e25,'replyId':_0x17c933,'unitId':_0x504c5e},_0x4e5a98=await this[_0x23e8c7(0x109)]['post'](_0x23e8c7(0xe5)+_0x504c5e+_0x23e8c7(0x102),{'body':_0x4189f6});return!_0x4e5a98[_0x23e8c7(0x11d)]['error']||_0x4e5a98[_0x23e8c7(0x11d)][_0x23e8c7(0x133)][_0x23e8c7(0x115)]===0x1;}async[_0x46fe98(0x111)](_0x1b9800,_0x466478,_0x5d6b8a){const _0x2dd30d=_0x46fe98,_0x26016f={'unitId':_0x1b9800,'threadId':_0x5d6b8a},_0x466d09=await this[_0x2dd30d(0x109)][_0x2dd30d(0x123)](_0x2dd30d(0xe5)+_0x1b9800+_0x2dd30d(0xdf),{'body':_0x26016f}),_0x134da4=_0x5d6b8a[_0x2dd30d(0x13b)](_0x4d2875=>ee(_0x466d09['body'][_0x2dd30d(0x141)][_0x4d2875],_0x1b9800,_0x466478))['filter'](Boolean);return Object[_0x2dd30d(0xef)](_0x466d09[_0x2dd30d(0x11d)][_0x2dd30d(0x12e)])[_0x2dd30d(0x12c)](_0x5b62b9=>{const _0x57050f=_0x2dd30d;this[_0x57050f(0x108)][_0x57050f(0x13d)](_0x5b62b9);}),_0x134da4;}[_0x46fe98(0xe7)](_0x3b41f5){const _0x55e0bb=_0x46fe98;return{'id':_0x3b41f5['id'],'threadId':_0x3b41f5[_0x55e0bb(0xeb)],'ref':_0x3b41f5[_0x55e0bb(0xfb)]};}};f=Q([_(0x0,_0xd8e16e(_0x4c2fd4)),_(0x1,_0xd8e16e(_0xaee3d1)),_(0x2,_0xd8e16e(_0x5d4e31)),_(0x3,_0xd8e16e(_0x3aac1a))],f);var re=Object[_0x46fe98(0xee)],te=(_0x3863f7,_0x521605,_0x1b020c,_0x2dbbe6)=>{for(var _0x120497=_0x2dbbe6>0x1?void 0x0:_0x2dbbe6?re(_0x521605,_0x1b020c):_0x521605,_0x491e0b=_0x3863f7['length']-0x1,_0x56d87e;_0x491e0b>=0x0;_0x491e0b--)(_0x56d87e=_0x3863f7[_0x491e0b])&&(_0x120497=_0x56d87e(_0x120497)||_0x120497);return _0x120497;},N=(_0x1d8111,_0x2d5fc7)=>(_0x59baea,_0x3eebce)=>_0x2d5fc7(_0x59baea,_0x3eebce,_0x1d8111);let g=class extends _0x9d9fe{constructor(_0x8443da,_0x2f77ba){const _0x5a09d8=_0x46fe98;super(),this[_0x5a09d8(0x12d)]=_0x8443da,this[_0x5a09d8(0xec)]=_0x2f77ba,this['_initDataSource']();}[_0x46fe98(0x101)](){const _0x34815b=_0x46fe98;this[_0x34815b(0x12d)][_0x34815b(0x106)]=this[_0x34815b(0xec)],this[_0x34815b(0x12d)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x17ba36),N(0x1,_0xd8e16e(f))],g);var se=Object[_0x46fe98(0xe3)],oe=Object[_0x46fe98(0xee)],ne=(_0x206055,_0x354e4f,_0x407df9)=>_0x354e4f in _0x206055?se(_0x206055,_0x354e4f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x407df9}):_0x206055[_0x354e4f]=_0x407df9,ie=(_0x11f50c,_0x27a989,_0x50c592,_0x26db1a)=>{const _0x2c3741=_0x46fe98;for(var _0x386595=_0x26db1a>0x1?void 0x0:_0x26db1a?oe(_0x27a989,_0x50c592):_0x27a989,_0x3e937b=_0x11f50c[_0x2c3741(0x119)]-0x1,_0x55d301;_0x3e937b>=0x0;_0x3e937b--)(_0x55d301=_0x11f50c[_0x3e937b])&&(_0x386595=_0x55d301(_0x386595)||_0x386595);return _0x386595;},w=(_0x2e1901,_0x28cc7a)=>(_0x3886bf,_0x366f3c)=>_0x28cc7a(_0x3886bf,_0x366f3c,_0x2e1901),$=(_0x917cf9,_0xfc6050,_0x5d0dac)=>ne(_0x917cf9,typeof _0xfc6050!=_0x46fe98(0x139)?_0xfc6050+'':_0xfc6050,_0x5d0dac);let b=class extends _0xc49e69{constructor(_0x57c025=M,_0x413220,_0x42ade3){const _0x20c96c=_0x46fe98;super(),this[_0x20c96c(0xfe)]=_0x57c025,this[_0x20c96c(0x122)]=_0x413220,this[_0x20c96c(0x124)]=_0x42ade3;const {..._0xdf3333}=_0x43fbb8({},M,this[_0x20c96c(0xfe)]);this[_0x20c96c(0x124)]['setConfig'](z,_0xdf3333);}['onStarting'](){const _0x11cbf9=_0x46fe98;[[f],[g],[S]][_0x11cbf9(0x12c)](_0x3727e7=>{const _0x2d8d87=_0x11cbf9;this[_0x2d8d87(0x122)][_0x2d8d87(0x121)](_0x3727e7);});}['onReady'](){const _0x2eb999=_0x46fe98;this['_injector']['get'](g),this[_0x2eb999(0x122)][_0x2eb999(0xf6)](S);}};function _0x4cb1(_0x2dc4f4,_0x176f4a){const _0x47c65d=_0x47c6();return _0x4cb1=function(_0x4cb114,_0x322d4a){_0x4cb114=_0x4cb114-0xdf;let _0x3d046b=_0x47c65d[_0x4cb114];return _0x3d046b;},_0x4cb1(_0x2dc4f4,_0x176f4a);}$(b,_0x46fe98(0xe6),W),$(b,_0x46fe98(0x12b),_0x1b0f42[_0x46fe98(0x114)]),b=ie([_0xabdba(_0x103552,_0x4bccec,_0x3559a3),w(0x1,_0xd8e16e(_0x3aac1a)),w(0x2,_0x1ed246)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xef2ac3=_0x14bf;(function(_0x14f7d5,_0x673000){const _0x1e46e6=_0x14bf,_0x5a0836=_0x14f7d5();while(!![]){try{const _0x50a9de=parseInt(_0x1e46e6(0xf7))/0x1*(-parseInt(_0x1e46e6(0xd8))/0x2)+-parseInt(_0x1e46e6(0xa5))/0x3*(-parseInt(_0x1e46e6(0xfa))/0x4)+-parseInt(_0x1e46e6(0xff))/0x5*(-parseInt(_0x1e46e6(0xfd))/0x6)+-parseInt(_0x1e46e6(0xa6))/0x7*(parseInt(_0x1e46e6(0xdd))/0x8)+parseInt(_0x1e46e6(0x10b))/0x9*(-parseInt(_0x1e46e6(0xf4))/0xa)+-parseInt(_0x1e46e6(0xf6))/0xb*(parseInt(_0x1e46e6(0x109))/0xc)+-parseInt(_0x1e46e6(0xa9))/0xd*(-parseInt(_0x1e46e6(0xf5))/0xe);if(_0x50a9de===_0x673000)break;else _0x5a0836['push'](_0x5a0836['shift']());}catch(_0x1a17e7){_0x5a0836['push'](_0x5a0836['shift']());}}}(_0x7407,0x6a8dd));import{CommentService as _0x245f3b,CollaborationSessionService as _0x38ed50,UniverCollaborationClientPlugin as _0x35d9c6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x157e4d}from'@univerjs-pro/license';import{dayjs as _0x5802de,UserManagerService as _0x45265e,Inject as _0xaac0e8,Injector as _0x20745a,Disposable as _0x3e49f1,CustomRangeType as _0x11800a,UniverInstanceType as _0x20fd11,DependentOn as _0xe266c6,IConfigService as _0xf1feab,Plugin as _0x2c8fc5,merge as _0x47eecf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x33dd69}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38c2e2,IThreadCommentDataSourceService as _0x334a2b}from'@univerjs/thread-comment';import{bufferTime as _0x279e3b}from'rxjs';import{HTTPService as _0x20b61d}from'@univerjs/network';const W=_0xef2ac3(0xcd);var I=(_0x61f09c=>(_0x61f09c[_0x61f09c[_0xef2ac3(0xaa)]=0x0]=_0xef2ac3(0xaa),_0x61f09c[_0x61f09c['Solved']=0x1]=_0xef2ac3(0xd0),_0x61f09c[_0x61f09c[_0xef2ac3(0xf8)]=-0x1]=_0xef2ac3(0xf8),_0x61f09c))(I||{}),v=(_0x489c32=>(_0x489c32[_0x489c32[_0xef2ac3(0xe5)]=0x0]=_0xef2ac3(0xe5),_0x489c32[_0x489c32[_0xef2ac3(0xfc)]=0x1]='Add',_0x489c32[_0x489c32[_0xef2ac3(0xa7)]=0x2]=_0xef2ac3(0xa7),_0x489c32[_0x489c32['Edit']=0x3]=_0xef2ac3(0xc7),_0x489c32[_0x489c32['Delete']=0x4]=_0xef2ac3(0xd2),_0x489c32[_0x489c32[_0xef2ac3(0xbf)]=0x5]='Solve',_0x489c32[_0x489c32[_0xef2ac3(0xf8)]=-0x1]='UNRECOGNIZED',_0x489c32))(v||{});function _0x14bf(_0x378c77,_0x537f7c){const _0x740784=_0x7407();return _0x14bf=function(_0x14bfd7,_0x46733d){_0x14bfd7=_0x14bfd7-0xa5;let _0x3fcb45=_0x740784[_0x14bfd7];return _0x3fcb45;},_0x14bf(_0x378c77,_0x537f7c);}const D=_0x5b3d53=>_0x5802de(new Date(+_0x5b3d53))[_0xef2ac3(0xd6)](_0xef2ac3(0xd1)),B=async(_0x2301ee,_0x4a61ea)=>{const _0x3cd868=_0xef2ac3,_0x8d7d88=_0x2301ee[_0x3cd868(0xba)](_0x45265e),_0x29cdf3=_0x2301ee[_0x3cd868(0xba)](_0x20b61d);_0x4a61ea['forEach'](_0x1f0264=>{const _0x76ab13=_0x3cd868;_0x8d7d88[_0x76ab13(0x104)](_0x1f0264)&&_0x4a61ea[_0x76ab13(0x10a)](_0x1f0264);}),_0x4a61ea[_0x3cd868(0xea)]&&(await _0x29cdf3['get'](_0x3cd868(0xbe),{'params':{'userIDs':[..._0x4a61ea]}}))[_0x3cd868(0xc3)][_0x3cd868(0xca)][_0x3cd868(0xd9)](_0x4f473b=>{const _0x466bd5=_0x3cd868;_0x4f473b&&_0x8d7d88[_0x466bd5(0xe7)](_0x4f473b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2d42a8,_0x46f336,_0x1b8431,_0xa367e2)=>{for(var _0x3b2c17=_0xa367e2>0x1?void 0x0:_0xa367e2?K(_0x46f336,_0x1b8431):_0x46f336,_0x194b73=_0x2d42a8['length']-0x1,_0x3bbbb5;_0x194b73>=0x0;_0x194b73--)(_0x3bbbb5=_0x2d42a8[_0x194b73])&&(_0x3b2c17=_0x3bbbb5(_0x3b2c17)||_0x3b2c17);return _0x3b2c17;},p=(_0x1cd65c,_0x232ee1)=>(_0x449967,_0x25b825)=>_0x232ee1(_0x449967,_0x25b825,_0x1cd65c);function _0x7407(){const _0x357070=['parse','userID','syncUpdateMutationToColla','getCurrentUser','getUser','replies','pluginName','_threadCommentDataSource','saveCommentToSnapshot','2348376PBGovc','delete','27kOWmQI','rangeType','getComment','/list','191946tlktrL','14uVLaeX','Reply','/universer-api/comment/unit/','15596945cNZSKq','OpenOrReOpen','_commentService','payload','_injector','createTimestamp','error','userId','_configService','personId','ref','find','addComment','/edit','customRanges','reply','resolved','get','getUnit','resolveComment','threadId','/universer-api/user/list','Solve','getMemberID','deleteComment','disposeWithMe','body','code','parentId','_initUserSync','Edit','defineProperty','unitId','users','rangeId','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','_threadCommentModel','Solved','YYYY/MM/DD\x20HH:mm','Delete','listComments','content','requireSession','format','_config','26374NqBYcr','forEach','/delete','COMMENT','length','3161792LnqBXq','_init','add','post','updateComment','/solved','user','replyId','Unknown','_userService','addUser','_threadCommentDataSourceService','subscribe','size','root','_httpService','comments','_initDataSource','/reply','map','_sessionService','thread-comment-data-source.config','/add','1925330ExTfOj','14jViaFV','33agDBHs','4raeWhP','UNRECOGNIZED','commentUpdate$','24IBJZlP','type','Add','5118pFIxRU','pipe','5045dySPzw'];_0x7407=function(){return _0x357070;};return _0x7407();}let S=class extends _0x3e49f1{constructor(_0x34681d,_0x32df14,_0x53183e,_0x175829){const _0x13ff75=_0xef2ac3;super(),this[_0x13ff75(0xab)]=_0x34681d,this['_threadCommentModel']=_0x32df14,this['_userService']=_0x53183e,this[_0x13ff75(0xad)]=_0x175829,this[_0x13ff75(0xde)](),this[_0x13ff75(0xc6)]();}[_0xef2ac3(0xc6)](){const _0x3ade16=_0xef2ac3;this[_0x3ade16(0xc2)](this[_0x3ade16(0xcf)][_0x3ade16(0xf9)][_0x3ade16(0xfe)](_0x279e3b(0x10))[_0x3ade16(0xe9)](_0x484049=>{const _0x1b7d1a=_0x3ade16,_0x35891a=new Set();_0x484049[_0x1b7d1a(0xd9)](_0xad9c2e=>{const _0x3e4e60=_0x1b7d1a;switch(_0xad9c2e[_0x3e4e60(0xfb)]){case'add':{const _0x2c424a=_0xad9c2e[_0x3e4e60(0xac)][_0x3e4e60(0xb2)];_0x35891a[_0x3e4e60(0xdf)](_0x2c424a);break;}}}),B(this['_injector'],_0x35891a);}));}['_init'](){const _0x43d943=_0xef2ac3;this[_0x43d943(0xc2)](this[_0x43d943(0xab)][_0x43d943(0xf9)][_0x43d943(0xe9)](async _0x5d4325=>{const _0x4c8f98=_0x43d943;var _0xa401a4,_0x5677e8,_0x5c250a,_0x4fe39d;const _0x1d7703=(_0xa401a4=this[_0x4c8f98(0xcf)][_0x4c8f98(0xbb)](_0x5d4325[_0x4c8f98(0xc9)])[_0x4c8f98(0xb4)](_0x3bee46=>_0x3bee46['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0xa401a4[_0x4c8f98(0xeb)];if(!_0x1d7703)return;const {unitId:_0x1d6b92,subUnitId:_0x297662}=_0x1d7703;switch(_0x5d4325[_0x4c8f98(0xe3)]&&this['_userService'][_0x4c8f98(0xe7)](_0x5d4325[_0x4c8f98(0xe3)]),_0x5d4325[_0x4c8f98(0xfb)]){case v['Add']:break;case v[_0x4c8f98(0xa7)]:{this['_threadCommentModel']['addComment'](_0x1d6b92,_0x297662,{'unitId':_0x1d6b92,'subUnitId':_0x297662,'ref':'','id':_0x5d4325[_0x4c8f98(0xe4)],'dT':D(+_0x5d4325[_0x4c8f98(0xae)]),'threadId':_0x5d4325[_0x4c8f98(0xbd)],'personId':(_0x5c250a=(_0x5677e8=_0x5d4325[_0x4c8f98(0xe3)])==null?void 0x0:_0x5677e8[_0x4c8f98(0x101)])!=null?_0x5c250a:_0x5d4325[_0x4c8f98(0xb0)],'text':JSON[_0x4c8f98(0x100)](_0x5d4325['content']),'parentId':_0x1d7703['id']});break;}case v['Delete']:{const _0x2c575b=this[_0x4c8f98(0xcf)][_0x4c8f98(0x10d)](_0x1d6b92,_0x297662,_0x5d4325['replyId']);_0x2c575b&&_0x2c575b[_0x4c8f98(0xc5)]&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xc1)](_0x1d6b92,_0x297662,_0x5d4325[_0x4c8f98(0xe4)]);break;}case v[_0x4c8f98(0xc7)]:{this[_0x4c8f98(0xcf)][_0x4c8f98(0xe1)](_0x1d6b92,_0x297662,{'commentId':_0x5d4325[_0x4c8f98(0xe4)],'text':JSON['parse'](_0x5d4325['content'])});break;}case v[_0x4c8f98(0xbf)]:{const _0x325e6e=(_0x4fe39d=this[_0x4c8f98(0xcf)]['getUnit'](_0x5d4325[_0x4c8f98(0xc9)])['find'](_0x5e995f=>_0x5e995f['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0x4fe39d[_0x4c8f98(0xeb)];_0x325e6e&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xbc)](_0x1d6b92,_0x297662,_0x325e6e['id'],_0x5d4325['solved']===I[_0x4c8f98(0xd0)]);break;}}}));}};S=V([p(0x0,_0xaac0e8(_0x245f3b)),p(0x1,_0xaac0e8(_0x38c2e2)),p(0x2,_0xaac0e8(_0x45265e)),p(0x3,_0xaac0e8(_0x20745a))],S);const z=_0xef2ac3(0xf2),M={};var k=Object[_0xef2ac3(0xce)],Q=(_0x4b00ca,_0x47edbb,_0x1fab8f,_0x2d8ce4)=>{for(var _0x17e4ac=_0x2d8ce4>0x1?void 0x0:_0x2d8ce4?k(_0x47edbb,_0x1fab8f):_0x47edbb,_0x4e8f41=_0x4b00ca['length']-0x1,_0x1eb821;_0x4e8f41>=0x0;_0x4e8f41--)(_0x1eb821=_0x4b00ca[_0x4e8f41])&&(_0x17e4ac=_0x1eb821(_0x17e4ac)||_0x17e4ac);return _0x17e4ac;},_=(_0x12fda2,_0x233132)=>(_0x51483e,_0x46c0c4)=>_0x233132(_0x51483e,_0x46c0c4,_0x12fda2);function X(_0x40afd3,_0xb542df){const _0x20d48f=_0xef2ac3,_0x41a08c=_0x40afd3[_0x20d48f(0x105)][0x0];return{..._0xb542df,'id':_0x41a08c[_0x20d48f(0xe4)],'resolved':_0x40afd3['solved']===0x1,'dT':D(_0x41a08c['createTimestamp']),'personId':_0x41a08c[_0x20d48f(0xb0)],'threadId':_0x41a08c['threadId']};}function ee(_0x48fc58,_0x43d309,_0x127dcd){const _0x353562=_0xef2ac3;var _0x5e396f,_0xf97301;if(((_0xf97301=(_0x5e396f=_0x48fc58==null?void 0x0:_0x48fc58['replies'])==null?void 0x0:_0x5e396f[_0x353562(0xdc)])!=null?_0xf97301:0x0)>0x0){const _0xe44c6d=(_0x3141ec,_0x4e0602)=>({'id':_0x3141ec['replyId'],'threadId':_0x3141ec[_0x353562(0xbd)],'dT':D(_0x3141ec['createTimestamp']),'personId':_0x3141ec['userId'],'resolved':_0x48fc58['solved']===I['Solved'],'unitId':_0x43d309,'subUnitId':_0x127dcd,'text':JSON[_0x353562(0x100)](_0x3141ec[_0x353562(0xd4)]),'parentId':_0x4e0602}),_0x2d895=_0xe44c6d(_0x48fc58['replies'][0x0]);return{..._0x2d895,'children':_0x48fc58['replies']['slice'](0x1)[_0x353562(0xf0)](_0x5b6cf8=>_0xe44c6d(_0x5b6cf8,_0x2d895['id']))};}return null;}let f=class{constructor(_0x5db0c5,_0x19d232,_0x10d091,_0x5423f7){const _0xb33276=_0xef2ac3;this[_0xb33276(0xec)]=_0x5db0c5,this[_0xb33276(0xe6)]=_0x19d232,this['_sessionService']=_0x10d091,this['_injector']=_0x5423f7;}async[_0xef2ac3(0xb5)](_0x442fcf){const _0x33f642=_0xef2ac3;var _0x1e1426,_0x4a9db3;const {parentId:_0x27b835,unitId:_0x5a79fb,text:_0x2bcf15,threadId:_0xdebc0d}=_0x442fcf,_0x1fbc83=(_0x4a9db3=(_0x1e1426=_0x2bcf15[_0x33f642(0xb7)])==null?void 0x0:_0x1e1426['filter'](_0x2d69cb=>_0x2d69cb[_0x33f642(0x10c)]===_0x11800a['COMMENT'])[_0x33f642(0xf0)](_0x13364a=>_0x13364a[_0x33f642(0xcb)]))!=null?_0x4a9db3:[],_0x28e7a1=JSON['stringify'](_0x2bcf15),_0x5bfb43=(await this[_0x33f642(0xf1)][_0x33f642(0xd5)](_0x5a79fb))['getMemberID']();if(_0x27b835){const _0x581b36={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83,'threadId':_0xdebc0d},_0x35d062=(await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xef),{'body':_0x581b36}))[_0x33f642(0xc3)][_0x33f642(0xb8)];return{..._0x442fcf,'id':_0x35d062[_0x33f642(0xe4)],'dT':_0x5802de(+_0x35d062['createTimestamp'])['format'](_0x33f642(0xd1)),'personId':_0x35d062[_0x33f642(0xb0)]};}else{const _0x3d29c0={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83},_0x2ad157=await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xf3),{'body':_0x3d29c0});return X(_0x2ad157[_0x33f642(0xc3)]['comment'],_0x442fcf);}}async['updateComment'](_0x3ca510){const _0x2651a3=_0xef2ac3;var _0x2ef7f7,_0x392b88;const {text:_0xb69a1c,unitId:_0x579c28}=_0x3ca510,_0x4d3b06=(_0x392b88=(_0x2ef7f7=_0xb69a1c['customRanges'])==null?void 0x0:_0x2ef7f7[_0x2651a3(0xcc)](_0x1ec50f=>_0x1ec50f[_0x2651a3(0x10c)]===_0x11800a[_0x2651a3(0xdb)])[_0x2651a3(0xf0)](_0x5e1c21=>_0x5e1c21[_0x2651a3(0xcb)]))!=null?_0x392b88:[],_0x5ede28=JSON['stringify'](_0xb69a1c),_0x3a56dd=_0x3ca510[_0x2651a3(0xbd)],_0x5d27ec=_0x3ca510['id'],_0x110ab6={'memberId':(await this[_0x2651a3(0xf1)][_0x2651a3(0xd5)](_0x579c28))[_0x2651a3(0xc0)](),'unitId':_0x579c28,'threadId':_0x3a56dd,'mention':_0x4d3b06,'content':_0x5ede28,'replyId':_0x5d27ec},_0x3817a0=await this[_0x2651a3(0xec)][_0x2651a3(0xe0)]('/universer-api/comment/unit/'+_0x579c28+_0x2651a3(0xb6),{'body':_0x110ab6});return!_0x3817a0[_0x2651a3(0xc3)]['error']||_0x3817a0[_0x2651a3(0xc3)][_0x2651a3(0xaf)][_0x2651a3(0xc4)]===0x1;}async[_0xef2ac3(0xbc)](_0x2d8be3){const _0x2bf397=_0xef2ac3,{unitId:_0xb07b31}=_0x2d8be3,_0x413f4a=_0x2d8be3[_0x2bf397(0xbd)],_0xba14bc={'memberId':this['_userService'][_0x2bf397(0x103)]()[_0x2bf397(0x101)],'unitId':_0xb07b31,'threadId':_0x413f4a,'solved':_0x2d8be3[_0x2bf397(0xb9)]?I[_0x2bf397(0xd0)]:I[_0x2bf397(0xaa)]},_0x511262=await this[_0x2bf397(0xec)][_0x2bf397(0xe0)](_0x2bf397(0xa8)+_0xb07b31+_0x2bf397(0xe2),{'body':_0xba14bc});return!_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)]||_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)][_0x2bf397(0xc4)]===0x1;}async['deleteComment'](_0x43197f,_0x381705,_0x55669a,_0x10ad64){const _0x1b7d07=_0xef2ac3,_0x2c8cd6={'memberId':(await this[_0x1b7d07(0xf1)][_0x1b7d07(0xd5)](_0x43197f))[_0x1b7d07(0xc0)](),'threadId':_0x55669a,'replyId':_0x10ad64,'unitId':_0x43197f},_0x46767d=await this[_0x1b7d07(0xec)]['post']('/universer-api/comment/unit/'+_0x43197f+_0x1b7d07(0xda),{'body':_0x2c8cd6});return!_0x46767d[_0x1b7d07(0xc3)]['error']||_0x46767d[_0x1b7d07(0xc3)][_0x1b7d07(0xaf)][_0x1b7d07(0xc4)]===0x1;}async[_0xef2ac3(0xd3)](_0x5e027e,_0x2c4d19,_0x598a33){const _0x31ec37=_0xef2ac3,_0x4a60db={'unitId':_0x5e027e,'threadId':_0x598a33},_0x5703e7=await this[_0x31ec37(0xec)][_0x31ec37(0xe0)](_0x31ec37(0xa8)+_0x5e027e+_0x31ec37(0x10e),{'body':_0x4a60db}),_0x17b0ee=_0x598a33[_0x31ec37(0xf0)](_0xa2b4e2=>ee(_0x5703e7[_0x31ec37(0xc3)][_0x31ec37(0xed)][_0xa2b4e2],_0x5e027e,_0x2c4d19))[_0x31ec37(0xcc)](Boolean);return Object['values'](_0x5703e7['body'][_0x31ec37(0xca)])[_0x31ec37(0xd9)](_0x11e39d=>{const _0x3495b4=_0x31ec37;this['_userService'][_0x3495b4(0xe7)](_0x11e39d);}),_0x17b0ee;}[_0xef2ac3(0x108)](_0x23d661){const _0x27a70d=_0xef2ac3;return{'id':_0x23d661['id'],'threadId':_0x23d661['threadId'],'ref':_0x23d661[_0x27a70d(0xb3)]};}};f=Q([_(0x0,_0xaac0e8(_0x20b61d)),_(0x1,_0xaac0e8(_0x45265e)),_(0x2,_0xaac0e8(_0x38ed50)),_(0x3,_0xaac0e8(_0x20745a))],f);var re=Object[_0xef2ac3(0xce)],te=(_0x1fa5ff,_0x310297,_0x557b8d,_0x10608e)=>{for(var _0x927c35=_0x10608e>0x1?void 0x0:_0x10608e?re(_0x310297,_0x557b8d):_0x310297,_0x28b27a=_0x1fa5ff['length']-0x1,_0x509d43;_0x28b27a>=0x0;_0x28b27a--)(_0x509d43=_0x1fa5ff[_0x28b27a])&&(_0x927c35=_0x509d43(_0x927c35)||_0x927c35);return _0x927c35;},N=(_0x2666c3,_0x5be33b)=>(_0x1150a2,_0x4d91de)=>_0x5be33b(_0x1150a2,_0x4d91de,_0x2666c3);let g=class extends _0x3e49f1{constructor(_0x4e790a,_0xbff171){const _0x4b1ced=_0xef2ac3;super(),this[_0x4b1ced(0xe8)]=_0x4e790a,this[_0x4b1ced(0x107)]=_0xbff171,this[_0x4b1ced(0xee)]();}[_0xef2ac3(0xee)](){const _0x3dc1ba=_0xef2ac3;this[_0x3dc1ba(0xe8)]['dataSource']=this[_0x3dc1ba(0x107)],this[_0x3dc1ba(0xe8)][_0x3dc1ba(0x102)]=!0x1;}};g=te([N(0x0,_0x334a2b),N(0x1,_0xaac0e8(f))],g);var se=Object[_0xef2ac3(0xc8)],oe=Object[_0xef2ac3(0xce)],ne=(_0x5487d2,_0x540370,_0x44f898)=>_0x540370 in _0x5487d2?se(_0x5487d2,_0x540370,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x44f898}):_0x5487d2[_0x540370]=_0x44f898,ie=(_0x57d0b9,_0x48c692,_0x3893d7,_0x2ceb52)=>{const _0x40c232=_0xef2ac3;for(var _0x5c3f9e=_0x2ceb52>0x1?void 0x0:_0x2ceb52?oe(_0x48c692,_0x3893d7):_0x48c692,_0x33596a=_0x57d0b9[_0x40c232(0xdc)]-0x1,_0x1e70ac;_0x33596a>=0x0;_0x33596a--)(_0x1e70ac=_0x57d0b9[_0x33596a])&&(_0x5c3f9e=_0x1e70ac(_0x5c3f9e)||_0x5c3f9e);return _0x5c3f9e;},w=(_0x48528d,_0x56d06e)=>(_0x260918,_0x2a7313)=>_0x56d06e(_0x260918,_0x2a7313,_0x48528d),$=(_0x2f1a0a,_0x305b57,_0x4fa42d)=>ne(_0x2f1a0a,typeof _0x305b57!='symbol'?_0x305b57+'':_0x305b57,_0x4fa42d);let b=class extends _0x2c8fc5{constructor(_0x5e6db6=M,_0x59f833,_0x5b921d){const _0x47fb5c=_0xef2ac3;super(),this[_0x47fb5c(0xd7)]=_0x5e6db6,this[_0x47fb5c(0xad)]=_0x59f833,this[_0x47fb5c(0xb1)]=_0x5b921d;const {..._0x3053b6}=_0x47eecf({},M,this[_0x47fb5c(0xd7)]);this[_0x47fb5c(0xb1)]['setConfig'](z,_0x3053b6);}['onStarting'](){const _0x2cbf17=_0xef2ac3;[[f],[g],[S]][_0x2cbf17(0xd9)](_0x4ee1e3=>{const _0x4eef37=_0x2cbf17;this[_0x4eef37(0xad)][_0x4eef37(0xdf)](_0x4ee1e3);});}['onReady'](){const _0x56ed42=_0xef2ac3;this[_0x56ed42(0xad)][_0x56ed42(0xba)](g),this['_injector'][_0x56ed42(0xba)](S);}};$(b,_0xef2ac3(0x106),W),$(b,_0xef2ac3(0xfb),_0x20fd11['UNIVER_UNKNOWN']),b=ie([_0xe266c6(_0x33dd69,_0x35d9c6,_0x157e4d),w(0x1,_0xaac0e8(_0x20745a)),w(0x2,_0xf1feab)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x46fe98=_0x4cb1;(function(_0x357f21,_0x270380){const _0x52667c=_0x4cb1,_0x322390=_0x357f21();while(!![]){try{const _0x2d52f=-parseInt(_0x52667c(0x10c))/0x1+-parseInt(_0x52667c(0xe2))/0x2*(-parseInt(_0x52667c(0xf0))/0x3)+parseInt(_0x52667c(0x13e))/0x4*(parseInt(_0x52667c(0x131))/0x5)+parseInt(_0x52667c(0x137))/0x6+parseInt(_0x52667c(0x116))/0x7+-parseInt(_0x52667c(0x110))/0x8*(-parseInt(_0x52667c(0x10e))/0x9)+-parseInt(_0x52667c(0xed))/0xa;if(_0x2d52f===_0x270380)break;else _0x322390['push'](_0x322390['shift']());}catch(_0x4b26d3){_0x322390['push'](_0x322390['shift']());}}}(_0x47c6,0x42465));import{CommentService as _0x311f50,CollaborationSessionService as _0x5d4e31,UniverCollaborationClientPlugin as _0x4bccec}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3559a3}from'@univerjs-pro/license';import{dayjs as _0x1fdba,UserManagerService as _0xaee3d1,Inject as _0xd8e16e,Injector as _0x3aac1a,Disposable as _0x9d9fe,CustomRangeType as _0x171c7e,UniverInstanceType as _0x1b0f42,DependentOn as _0xabdba,IConfigService as _0x1ed246,Plugin as _0xc49e69,merge as _0x43fbb8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x103552}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3c9912,IThreadCommentDataSourceService as _0x17ba36}from'@univerjs/thread-comment';import{bufferTime as _0x2bd82e}from'rxjs';import{HTTPService as _0x4c2fd4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4e96f3=>(_0x4e96f3[_0x4e96f3[_0x46fe98(0x13a)]=0x0]=_0x46fe98(0x13a),_0x4e96f3[_0x4e96f3[_0x46fe98(0x11f)]=0x1]=_0x46fe98(0x11f),_0x4e96f3[_0x4e96f3[_0x46fe98(0x12a)]=-0x1]=_0x46fe98(0x12a),_0x4e96f3))(I||{}),v=(_0x583e3c=>(_0x583e3c[_0x583e3c[_0x46fe98(0x112)]=0x0]='Unknown',_0x583e3c[_0x583e3c[_0x46fe98(0x125)]=0x1]=_0x46fe98(0x125),_0x583e3c[_0x583e3c[_0x46fe98(0x143)]=0x2]=_0x46fe98(0x143),_0x583e3c[_0x583e3c[_0x46fe98(0x126)]=0x3]=_0x46fe98(0x126),_0x583e3c[_0x583e3c[_0x46fe98(0x129)]=0x4]=_0x46fe98(0x129),_0x583e3c[_0x583e3c['Solve']=0x5]=_0x46fe98(0x120),_0x583e3c[_0x583e3c[_0x46fe98(0x12a)]=-0x1]='UNRECOGNIZED',_0x583e3c))(v||{});function _0x47c6(){const _0x447cb0=['resolveComment','getUnit','disposeWithMe','dataSource','getComment','_userService','_httpService','getCurrentUser','pipe','234030RfiZYE','unitId','13653yZSMtb','/universer-api/user/list','968pIlcgg','listComments','Unknown','format','UNIVER_UNKNOWN','code','289919ojgJjk','replies','subscribe','length','slice','replyId','_commentService','body','solved','Solved','Solve','add','_injector','post','_configService','Add','Edit','stringify','/edit','Delete','UNRECOGNIZED','type','forEach','_threadCommentDataSourceService','users','rangeType','_initUserSync','35rKMaUX','customRanges','error','user','deleteComment','requireSession','218082vfAmuG','find','symbol','OpenOrReOpen','map','parse','addUser','155720wlZlrX','COMMENT','parentId','comments','payload','Reply','/list','rangeId','/add','126752juHjMU','defineProperty','createTimestamp','/universer-api/comment/unit/','pluginName','saveCommentToSnapshot','getUser','thread-comment-data-source.config','content','threadId','_threadCommentDataSource','2818440TPNBtH','getOwnPropertyDescriptor','values','12qUpRxE','addComment','_init','YYYY/MM/DD\x20HH:mm','userId','size','get','root','filter','userID','resolved','ref','getMemberID','/solved','_config','_sessionService','_threadCommentModel','_initDataSource','/delete'];_0x47c6=function(){return _0x447cb0;};return _0x47c6();}const D=_0x36e3e3=>_0x1fdba(new Date(+_0x36e3e3))[_0x46fe98(0x113)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4ab9bb,_0x47f95c)=>{const _0x52b890=_0x46fe98,_0x49685a=_0x4ab9bb[_0x52b890(0xf6)](_0xaee3d1),_0x7f8df5=_0x4ab9bb[_0x52b890(0xf6)](_0x4c2fd4);_0x47f95c[_0x52b890(0x12c)](_0x5ce717=>{const _0x1ded7b=_0x52b890;_0x49685a[_0x1ded7b(0xe8)](_0x5ce717)&&_0x47f95c['delete'](_0x5ce717);}),_0x47f95c[_0x52b890(0xf5)]&&(await _0x7f8df5[_0x52b890(0xf6)](_0x52b890(0x10f),{'params':{'userIDs':[..._0x47f95c]}}))['body'][_0x52b890(0x12e)][_0x52b890(0x12c)](_0x5f0036=>{const _0x2b7407=_0x52b890;_0x5f0036&&_0x49685a[_0x2b7407(0x13d)](_0x5f0036);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6405,_0x16eaa6,_0x54f1c2,_0x574ec6)=>{const _0x31cf76=_0x46fe98;for(var _0x3f2302=_0x574ec6>0x1?void 0x0:_0x574ec6?K(_0x16eaa6,_0x54f1c2):_0x16eaa6,_0x2e5b41=_0x3c6405[_0x31cf76(0x119)]-0x1,_0x2772b2;_0x2e5b41>=0x0;_0x2e5b41--)(_0x2772b2=_0x3c6405[_0x2e5b41])&&(_0x3f2302=_0x2772b2(_0x3f2302)||_0x3f2302);return _0x3f2302;},p=(_0x3b1918,_0x1d19d7)=>(_0x4a50ee,_0x153dca)=>_0x1d19d7(_0x4a50ee,_0x153dca,_0x3b1918);let S=class extends _0x9d9fe{constructor(_0x23aac8,_0xc128cd,_0x50e8dc,_0x7d5f92){const _0x3c201e=_0x46fe98;super(),this[_0x3c201e(0x11c)]=_0x23aac8,this[_0x3c201e(0x100)]=_0xc128cd,this[_0x3c201e(0x108)]=_0x50e8dc,this[_0x3c201e(0x122)]=_0x7d5f92,this[_0x3c201e(0xf2)](),this['_initUserSync']();}[_0x46fe98(0x130)](){const _0x444efa=_0x46fe98;this['disposeWithMe'](this[_0x444efa(0x100)]['commentUpdate$'][_0x444efa(0x10b)](_0x2bd82e(0x10))['subscribe'](_0x2647b4=>{const _0x1dba5a=_0x444efa,_0x1f35a9=new Set();_0x2647b4['forEach'](_0xecb118=>{const _0x39e4cb=_0x4cb1;switch(_0xecb118[_0x39e4cb(0x12b)]){case'add':{const _0x1a017d=_0xecb118[_0x39e4cb(0x142)]['personId'];_0x1f35a9['add'](_0x1a017d);break;}}}),B(this[_0x1dba5a(0x122)],_0x1f35a9);}));}[_0x46fe98(0xf2)](){const _0x2fb4e7=_0x46fe98;this[_0x2fb4e7(0x105)](this['_commentService']['commentUpdate$'][_0x2fb4e7(0x118)](async _0x148654=>{const _0xe8b06e=_0x2fb4e7;var _0x203a53,_0x4a6ae7,_0x5d802c,_0x18a1ca;const _0x3addc0=(_0x203a53=this[_0xe8b06e(0x100)][_0xe8b06e(0x104)](_0x148654['unitId'])[_0xe8b06e(0x138)](_0x269394=>_0x269394['threadId']===_0x148654['threadId']))==null?void 0x0:_0x203a53[_0xe8b06e(0xf7)];if(!_0x3addc0)return;const {unitId:_0x4895e8,subUnitId:_0x29a1a9}=_0x3addc0;switch(_0x148654[_0xe8b06e(0x134)]&&this[_0xe8b06e(0x108)][_0xe8b06e(0x13d)](_0x148654['user']),_0x148654['type']){case v[_0xe8b06e(0x125)]:break;case v[_0xe8b06e(0x143)]:{this[_0xe8b06e(0x100)][_0xe8b06e(0xf1)](_0x4895e8,_0x29a1a9,{'unitId':_0x4895e8,'subUnitId':_0x29a1a9,'ref':'','id':_0x148654[_0xe8b06e(0x11b)],'dT':D(+_0x148654[_0xe8b06e(0xe4)]),'threadId':_0x148654[_0xe8b06e(0xeb)],'personId':(_0x5d802c=(_0x4a6ae7=_0x148654[_0xe8b06e(0x134)])==null?void 0x0:_0x4a6ae7[_0xe8b06e(0xf9)])!=null?_0x5d802c:_0x148654['userId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654['content']),'parentId':_0x3addc0['id']});break;}case v[_0xe8b06e(0x129)]:{const _0xe32ca3=this[_0xe8b06e(0x100)][_0xe8b06e(0x107)](_0x4895e8,_0x29a1a9,_0x148654[_0xe8b06e(0x11b)]);_0xe32ca3&&_0xe32ca3[_0xe8b06e(0x140)]&&this[_0xe8b06e(0x100)][_0xe8b06e(0x135)](_0x4895e8,_0x29a1a9,_0x148654['replyId']);break;}case v[_0xe8b06e(0x126)]:{this['_threadCommentModel']['updateComment'](_0x4895e8,_0x29a1a9,{'commentId':_0x148654['replyId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654[_0xe8b06e(0xea)])});break;}case v[_0xe8b06e(0x120)]:{const _0x1e2ead=(_0x18a1ca=this['_threadCommentModel'][_0xe8b06e(0x104)](_0x148654[_0xe8b06e(0x10d)])[_0xe8b06e(0x138)](_0x219fd7=>_0x219fd7['threadId']===_0x148654[_0xe8b06e(0xeb)]))==null?void 0x0:_0x18a1ca[_0xe8b06e(0xf7)];_0x1e2ead&&this['_threadCommentModel'][_0xe8b06e(0x103)](_0x4895e8,_0x29a1a9,_0x1e2ead['id'],_0x148654[_0xe8b06e(0x11e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0xd8e16e(_0x311f50)),p(0x1,_0xd8e16e(_0x3c9912)),p(0x2,_0xd8e16e(_0xaee3d1)),p(0x3,_0xd8e16e(_0x3aac1a))],S);const z=_0x46fe98(0xe9),M={};var k=Object[_0x46fe98(0xee)],Q=(_0x35c5f8,_0x3a57e9,_0x200d12,_0x2a244c)=>{const _0x13e813=_0x46fe98;for(var _0x2cd71c=_0x2a244c>0x1?void 0x0:_0x2a244c?k(_0x3a57e9,_0x200d12):_0x3a57e9,_0x91739d=_0x35c5f8[_0x13e813(0x119)]-0x1,_0x5dc5b2;_0x91739d>=0x0;_0x91739d--)(_0x5dc5b2=_0x35c5f8[_0x91739d])&&(_0x2cd71c=_0x5dc5b2(_0x2cd71c)||_0x2cd71c);return _0x2cd71c;},_=(_0x15a250,_0x364c8a)=>(_0x2b677c,_0x1853c5)=>_0x364c8a(_0x2b677c,_0x1853c5,_0x15a250);function X(_0x100bed,_0x5e7b4c){const _0x258a3a=_0x46fe98,_0x200c0d=_0x100bed[_0x258a3a(0x117)][0x0];return{..._0x5e7b4c,'id':_0x200c0d['replyId'],'resolved':_0x100bed[_0x258a3a(0x11e)]===0x1,'dT':D(_0x200c0d[_0x258a3a(0xe4)]),'personId':_0x200c0d[_0x258a3a(0xf4)],'threadId':_0x200c0d[_0x258a3a(0xeb)]};}function ee(_0x1294b8,_0x17f30d,_0x22e191){const _0x14496f=_0x46fe98;var _0x2724ff,_0x5dfaf6;if(((_0x5dfaf6=(_0x2724ff=_0x1294b8==null?void 0x0:_0x1294b8[_0x14496f(0x117)])==null?void 0x0:_0x2724ff[_0x14496f(0x119)])!=null?_0x5dfaf6:0x0)>0x0){const _0xc7b2f4=(_0x3daaf9,_0x1342fb)=>({'id':_0x3daaf9[_0x14496f(0x11b)],'threadId':_0x3daaf9['threadId'],'dT':D(_0x3daaf9[_0x14496f(0xe4)]),'personId':_0x3daaf9[_0x14496f(0xf4)],'resolved':_0x1294b8[_0x14496f(0x11e)]===I[_0x14496f(0x11f)],'unitId':_0x17f30d,'subUnitId':_0x22e191,'text':JSON[_0x14496f(0x13c)](_0x3daaf9[_0x14496f(0xea)]),'parentId':_0x1342fb}),_0x8b6588=_0xc7b2f4(_0x1294b8[_0x14496f(0x117)][0x0]);return{..._0x8b6588,'children':_0x1294b8[_0x14496f(0x117)][_0x14496f(0x11a)](0x1)[_0x14496f(0x13b)](_0x4c6fbb=>_0xc7b2f4(_0x4c6fbb,_0x8b6588['id']))};}return null;}let f=class{constructor(_0x41a115,_0x231dec,_0x822be7,_0x4a6944){const _0x374086=_0x46fe98;this[_0x374086(0x109)]=_0x41a115,this[_0x374086(0x108)]=_0x231dec,this['_sessionService']=_0x822be7,this[_0x374086(0x122)]=_0x4a6944;}async[_0x46fe98(0xf1)](_0x200f76){const _0x320134=_0x46fe98;var _0x3f6f6c,_0x53a20c;const {parentId:_0x1152dc,unitId:_0x5c977c,text:_0x19d189,threadId:_0x7f14a2}=_0x200f76,_0x4a7c12=(_0x53a20c=(_0x3f6f6c=_0x19d189[_0x320134(0x132)])==null?void 0x0:_0x3f6f6c['filter'](_0x4ca4eb=>_0x4ca4eb['rangeType']===_0x171c7e[_0x320134(0x13f)])[_0x320134(0x13b)](_0x4f72a1=>_0x4f72a1['rangeId']))!=null?_0x53a20c:[],_0x22529e=JSON[_0x320134(0x127)](_0x19d189),_0x29dedd=(await this[_0x320134(0xff)][_0x320134(0x136)](_0x5c977c))['getMemberID']();if(_0x1152dc){const _0x3da1c1={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12,'threadId':_0x7f14a2},_0x46a3c0=(await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+'/reply',{'body':_0x3da1c1}))['body']['reply'];return{..._0x200f76,'id':_0x46a3c0['replyId'],'dT':_0x1fdba(+_0x46a3c0[_0x320134(0xe4)])[_0x320134(0x113)](_0x320134(0xf3)),'personId':_0x46a3c0[_0x320134(0xf4)]};}else{const _0xfa9222={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12},_0x47edc7=await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+_0x320134(0xe1),{'body':_0xfa9222});return X(_0x47edc7[_0x320134(0x11d)]['comment'],_0x200f76);}}async['updateComment'](_0x3c2326){const _0x3e9407=_0x46fe98;var _0x5e47cf,_0x5d912d;const {text:_0x34c933,unitId:_0x51150b}=_0x3c2326,_0x24d314=(_0x5d912d=(_0x5e47cf=_0x34c933[_0x3e9407(0x132)])==null?void 0x0:_0x5e47cf[_0x3e9407(0xf8)](_0x399329=>_0x399329[_0x3e9407(0x12f)]===_0x171c7e['COMMENT'])['map'](_0x46297f=>_0x46297f[_0x3e9407(0xe0)]))!=null?_0x5d912d:[],_0x13bcf9=JSON[_0x3e9407(0x127)](_0x34c933),_0x3897df=_0x3c2326[_0x3e9407(0xeb)],_0x3346ad=_0x3c2326['id'],_0x2f5e51={'memberId':(await this[_0x3e9407(0xff)][_0x3e9407(0x136)](_0x51150b))[_0x3e9407(0xfc)](),'unitId':_0x51150b,'threadId':_0x3897df,'mention':_0x24d314,'content':_0x13bcf9,'replyId':_0x3346ad},_0x126655=await this[_0x3e9407(0x109)][_0x3e9407(0x123)](_0x3e9407(0xe5)+_0x51150b+_0x3e9407(0x128),{'body':_0x2f5e51});return!_0x126655[_0x3e9407(0x11d)][_0x3e9407(0x133)]||_0x126655[_0x3e9407(0x11d)]['error'][_0x3e9407(0x115)]===0x1;}async[_0x46fe98(0x103)](_0x154d22){const _0x47a74f=_0x46fe98,{unitId:_0x546e51}=_0x154d22,_0x510d2e=_0x154d22[_0x47a74f(0xeb)],_0x47e6fa={'memberId':this[_0x47a74f(0x108)][_0x47a74f(0x10a)]()['userID'],'unitId':_0x546e51,'threadId':_0x510d2e,'solved':_0x154d22[_0x47a74f(0xfa)]?I['Solved']:I[_0x47a74f(0x13a)]},_0x337b82=await this['_httpService']['post'](_0x47a74f(0xe5)+_0x546e51+_0x47a74f(0xfd),{'body':_0x47e6fa});return!_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)]||_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)][_0x47a74f(0x115)]===0x1;}async[_0x46fe98(0x135)](_0x504c5e,_0x1ee61c,_0x3a8e25,_0x17c933){const _0x23e8c7=_0x46fe98,_0x4189f6={'memberId':(await this[_0x23e8c7(0xff)]['requireSession'](_0x504c5e))[_0x23e8c7(0xfc)](),'threadId':_0x3a8e25,'replyId':_0x17c933,'unitId':_0x504c5e},_0x4e5a98=await this[_0x23e8c7(0x109)]['post'](_0x23e8c7(0xe5)+_0x504c5e+_0x23e8c7(0x102),{'body':_0x4189f6});return!_0x4e5a98[_0x23e8c7(0x11d)]['error']||_0x4e5a98[_0x23e8c7(0x11d)][_0x23e8c7(0x133)][_0x23e8c7(0x115)]===0x1;}async[_0x46fe98(0x111)](_0x1b9800,_0x466478,_0x5d6b8a){const _0x2dd30d=_0x46fe98,_0x26016f={'unitId':_0x1b9800,'threadId':_0x5d6b8a},_0x466d09=await this[_0x2dd30d(0x109)][_0x2dd30d(0x123)](_0x2dd30d(0xe5)+_0x1b9800+_0x2dd30d(0xdf),{'body':_0x26016f}),_0x134da4=_0x5d6b8a[_0x2dd30d(0x13b)](_0x4d2875=>ee(_0x466d09['body'][_0x2dd30d(0x141)][_0x4d2875],_0x1b9800,_0x466478))['filter'](Boolean);return Object[_0x2dd30d(0xef)](_0x466d09[_0x2dd30d(0x11d)][_0x2dd30d(0x12e)])[_0x2dd30d(0x12c)](_0x5b62b9=>{const _0x57050f=_0x2dd30d;this[_0x57050f(0x108)][_0x57050f(0x13d)](_0x5b62b9);}),_0x134da4;}[_0x46fe98(0xe7)](_0x3b41f5){const _0x55e0bb=_0x46fe98;return{'id':_0x3b41f5['id'],'threadId':_0x3b41f5[_0x55e0bb(0xeb)],'ref':_0x3b41f5[_0x55e0bb(0xfb)]};}};f=Q([_(0x0,_0xd8e16e(_0x4c2fd4)),_(0x1,_0xd8e16e(_0xaee3d1)),_(0x2,_0xd8e16e(_0x5d4e31)),_(0x3,_0xd8e16e(_0x3aac1a))],f);var re=Object[_0x46fe98(0xee)],te=(_0x3863f7,_0x521605,_0x1b020c,_0x2dbbe6)=>{for(var _0x120497=_0x2dbbe6>0x1?void 0x0:_0x2dbbe6?re(_0x521605,_0x1b020c):_0x521605,_0x491e0b=_0x3863f7['length']-0x1,_0x56d87e;_0x491e0b>=0x0;_0x491e0b--)(_0x56d87e=_0x3863f7[_0x491e0b])&&(_0x120497=_0x56d87e(_0x120497)||_0x120497);return _0x120497;},N=(_0x1d8111,_0x2d5fc7)=>(_0x59baea,_0x3eebce)=>_0x2d5fc7(_0x59baea,_0x3eebce,_0x1d8111);let g=class extends _0x9d9fe{constructor(_0x8443da,_0x2f77ba){const _0x5a09d8=_0x46fe98;super(),this[_0x5a09d8(0x12d)]=_0x8443da,this[_0x5a09d8(0xec)]=_0x2f77ba,this['_initDataSource']();}[_0x46fe98(0x101)](){const _0x34815b=_0x46fe98;this[_0x34815b(0x12d)][_0x34815b(0x106)]=this[_0x34815b(0xec)],this[_0x34815b(0x12d)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x17ba36),N(0x1,_0xd8e16e(f))],g);var se=Object[_0x46fe98(0xe3)],oe=Object[_0x46fe98(0xee)],ne=(_0x206055,_0x354e4f,_0x407df9)=>_0x354e4f in _0x206055?se(_0x206055,_0x354e4f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x407df9}):_0x206055[_0x354e4f]=_0x407df9,ie=(_0x11f50c,_0x27a989,_0x50c592,_0x26db1a)=>{const _0x2c3741=_0x46fe98;for(var _0x386595=_0x26db1a>0x1?void 0x0:_0x26db1a?oe(_0x27a989,_0x50c592):_0x27a989,_0x3e937b=_0x11f50c[_0x2c3741(0x119)]-0x1,_0x55d301;_0x3e937b>=0x0;_0x3e937b--)(_0x55d301=_0x11f50c[_0x3e937b])&&(_0x386595=_0x55d301(_0x386595)||_0x386595);return _0x386595;},w=(_0x2e1901,_0x28cc7a)=>(_0x3886bf,_0x366f3c)=>_0x28cc7a(_0x3886bf,_0x366f3c,_0x2e1901),$=(_0x917cf9,_0xfc6050,_0x5d0dac)=>ne(_0x917cf9,typeof _0xfc6050!=_0x46fe98(0x139)?_0xfc6050+'':_0xfc6050,_0x5d0dac);let b=class extends _0xc49e69{constructor(_0x57c025=M,_0x413220,_0x42ade3){const _0x20c96c=_0x46fe98;super(),this[_0x20c96c(0xfe)]=_0x57c025,this[_0x20c96c(0x122)]=_0x413220,this[_0x20c96c(0x124)]=_0x42ade3;const {..._0xdf3333}=_0x43fbb8({},M,this[_0x20c96c(0xfe)]);this[_0x20c96c(0x124)]['setConfig'](z,_0xdf3333);}['onStarting'](){const _0x11cbf9=_0x46fe98;[[f],[g],[S]][_0x11cbf9(0x12c)](_0x3727e7=>{const _0x2d8d87=_0x11cbf9;this[_0x2d8d87(0x122)][_0x2d8d87(0x121)](_0x3727e7);});}['onReady'](){const _0x2eb999=_0x46fe98;this['_injector']['get'](g),this[_0x2eb999(0x122)][_0x2eb999(0xf6)](S);}};function _0x4cb1(_0x2dc4f4,_0x176f4a){const _0x47c65d=_0x47c6();return _0x4cb1=function(_0x4cb114,_0x322d4a){_0x4cb114=_0x4cb114-0xdf;let _0x3d046b=_0x47c65d[_0x4cb114];return _0x3d046b;},_0x4cb1(_0x2dc4f4,_0x176f4a);}$(b,_0x46fe98(0xe6),W),$(b,_0x46fe98(0x12b),_0x1b0f42[_0x46fe98(0x114)]),b=ie([_0xabdba(_0x103552,_0x4bccec,_0x3559a3),w(0x1,_0xd8e16e(_0x3aac1a)),w(0x2,_0x1ed246)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x45b4(_0x42545b,_0x3caf63){const _0x4db7b5=_0x4db7();return _0x45b4=function(_0x45b4ac,_0x157b84){_0x45b4ac=_0x45b4ac-0x1e5;let _0x2ecf37=_0x4db7b5[_0x45b4ac];return _0x2ecf37;},_0x45b4(_0x42545b,_0x3caf63);}function _0x4db7(){const _0x4616b7=['Solved','297nloNRj','DependentOn','getUser','unitId','addUser','UNIVER_UNKNOWN','solved','COMMENT','747984yTrbAB','OpenOrReOpen','customRanges','exports','Plugin','setConfig','UniverCollaborationClientPlugin','/delete','updateComment','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','rangeType','parse','@univerjs-pro/license','_threadCommentModel','threadId','pipe','body','replies','Edit','_threadCommentDataSourceService','commentUpdate$','saveCommentToSnapshot','/add','userID','resolveComment','addComment','error','/universer-api/user/list','/solved','_userService','comment','Unknown','code','forEach','rxjs','UniverThreadCommentUi','personId','UniverNetwork','find','HTTPService','dataSource','5lXjUVX','get','_sessionService','Add','subscribe','getCurrentUser','getComment','size','type','thread-comment-data-source.config','deleteComment','_injector','1291903urByfM','Module','onStarting','defineProperty','users','stringify','_threadCommentDataSource','_initUserSync','UniverProLicense','@univerjs/thread-comment-ui','_commentService','filter','getOwnPropertyDescriptor','object','UniverThreadCommentDataSourcePlugin','UniverInstanceType','11349180wapMYv','replyId','@univerjs-pro/collaboration-client','Disposable','_config','ref','resolved','Inject','pluginName','disposeWithMe','CommentService','Solve','payload','108600GgKImb','function','Reply','userId','requireSession','UniverProCollaborationClient','map','delete','891hrLLWR','_configService','format','ThreadCommentModel','6092442AokcGD','_initDataSource','reply','_httpService','onReady','UniverCore','/universer-api/comment/unit/','Delete','user','getUnit','parentId','createTimestamp','_init','post','@univerjs/network','1392774JSSsYI','length','2EHvcqB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','toStringTag','add','amd','7nHgjsU','getMemberID','UserManagerService','root','IThreadCommentDataSourceService','content','comments','25644EyATSz','listComments','@univerjs/core','merge','dayjs','Injector'];_0x4db7=function(){return _0x4616b7;};return _0x4db7();}(function(_0x40a60d,_0x384517){const _0x30c3f6=_0x45b4,_0x3dac12=_0x40a60d();while(!![]){try{const _0x52a5ff=-parseInt(_0x30c3f6(0x1ee))/0x1*(parseInt(_0x30c3f6(0x228))/0x2)+parseInt(_0x30c3f6(0x23b))/0x3*(parseInt(_0x30c3f6(0x234))/0x4)+-parseInt(_0x30c3f6(0x26e))/0x5*(-parseInt(_0x30c3f6(0x226))/0x6)+-parseInt(_0x30c3f6(0x22d))/0x7*(-parseInt(_0x30c3f6(0x243))/0x8)+parseInt(_0x30c3f6(0x217))/0x9+parseInt(_0x30c3f6(0x1fe))/0xa+parseInt(_0x30c3f6(0x213))/0xb*(-parseInt(_0x30c3f6(0x20b))/0xc);if(_0x52a5ff===_0x384517)break;else _0x3dac12['push'](_0x3dac12['shift']());}catch(_0x2371f0){_0x3dac12['push'](_0x3dac12['shift']());}}}(_0x4db7,0xb66d3),function(_0x2e37e0,_0x124c20){const _0x41ea3b=_0x45b4;typeof exports==_0x41ea3b(0x1fb)&&typeof module<'u'?_0x124c20(exports,require('@univerjs-pro/collaboration-client'),require(_0x41ea3b(0x251)),require(_0x41ea3b(0x236)),require(_0x41ea3b(0x1f7)),require('@univerjs/thread-comment'),require(_0x41ea3b(0x267)),require(_0x41ea3b(0x225))):typeof define==_0x41ea3b(0x20c)&&define[_0x41ea3b(0x22c)]?define([_0x41ea3b(0x246),_0x41ea3b(0x200),_0x41ea3b(0x251),_0x41ea3b(0x236),_0x41ea3b(0x1f7),'@univerjs/thread-comment',_0x41ea3b(0x267),_0x41ea3b(0x225)],_0x124c20):(_0x2e37e0=typeof globalThis<'u'?globalThis:_0x2e37e0||self,_0x124c20(_0x2e37e0[_0x41ea3b(0x24c)]={},_0x2e37e0[_0x41ea3b(0x210)],_0x2e37e0[_0x41ea3b(0x1f6)],_0x2e37e0[_0x41ea3b(0x21c)],_0x2e37e0[_0x41ea3b(0x268)],_0x2e37e0['UniverThreadComment'],_0x2e37e0['rxjs'],_0x2e37e0[_0x41ea3b(0x26a)]));}(this,function(_0x483f35,_0x22f43d,_0x22ad29,_0x30e2b8,_0x1c69cc,_0x30c642,_0x5bf552,_0x546ee6){'use strict';const _0x11225e=_0x45b4;const _0x9c1ce5=_0x11225e(0x229);var _0x319730=(_0xb67e98=>(_0xb67e98[_0xb67e98[_0x11225e(0x244)]=0x0]=_0x11225e(0x244),_0xb67e98[_0xb67e98[_0x11225e(0x23a)]=0x1]=_0x11225e(0x23a),_0xb67e98[_0xb67e98[_0x11225e(0x24e)]=-0x1]='UNRECOGNIZED',_0xb67e98))(_0x319730||{}),_0x55acbe=(_0x3334ca=>(_0x3334ca[_0x3334ca['Unknown']=0x0]=_0x11225e(0x264),_0x3334ca[_0x3334ca[_0x11225e(0x1e5)]=0x1]=_0x11225e(0x1e5),_0x3334ca[_0x3334ca[_0x11225e(0x20d)]=0x2]='Reply',_0x3334ca[_0x3334ca[_0x11225e(0x257)]=0x3]=_0x11225e(0x257),_0x3334ca[_0x3334ca[_0x11225e(0x21e)]=0x4]=_0x11225e(0x21e),_0x3334ca[_0x3334ca[_0x11225e(0x209)]=0x5]=_0x11225e(0x209),_0x3334ca[_0x3334ca[_0x11225e(0x24e)]=-0x1]=_0x11225e(0x24e),_0x3334ca))(_0x55acbe||{});const _0x3e49d9=_0x3b77e7=>_0x30e2b8['dayjs'](new Date(+_0x3b77e7))['format']('YYYY/MM/DD\x20HH:mm'),_0x3132c4=async(_0x32a2d1,_0x5bbb1f)=>{const _0x5bfe73=_0x11225e,_0x5d7817=_0x32a2d1[_0x5bfe73(0x26f)](_0x30e2b8[_0x5bfe73(0x22f)]),_0x9c8a0b=_0x32a2d1['get'](_0x546ee6[_0x5bfe73(0x26c)]);_0x5bbb1f[_0x5bfe73(0x266)](_0x658e08=>{const _0x131060=_0x5bfe73;_0x5d7817[_0x131060(0x23d)](_0x658e08)&&_0x5bbb1f[_0x131060(0x212)](_0x658e08);}),_0x5bbb1f[_0x5bfe73(0x1e9)]&&(await _0x9c8a0b['get'](_0x5bfe73(0x260),{'params':{'userIDs':[..._0x5bbb1f]}}))['body'][_0x5bfe73(0x1f2)][_0x5bfe73(0x266)](_0x41f336=>{const _0xd3866d=_0x5bfe73;_0x41f336&&_0x5d7817[_0xd3866d(0x23f)](_0x41f336);});};var _0x58bcd3=Object[_0x11225e(0x1fa)],_0x3e5c80=(_0x4f2c4d,_0x2cae86,_0x16856c,_0x47e4cc)=>{for(var _0x30ada8=_0x47e4cc>0x1?void 0x0:_0x47e4cc?_0x58bcd3(_0x2cae86,_0x16856c):_0x2cae86,_0x15ba25=_0x4f2c4d['length']-0x1,_0x2bd494;_0x15ba25>=0x0;_0x15ba25--)(_0x2bd494=_0x4f2c4d[_0x15ba25])&&(_0x30ada8=_0x2bd494(_0x30ada8)||_0x30ada8);return _0x30ada8;},_0x54c65b=(_0x2db8f8,_0x48aee3)=>(_0x113a8a,_0x12085e)=>_0x48aee3(_0x113a8a,_0x12085e,_0x2db8f8);let _0x544f61=class extends _0x30e2b8[_0x11225e(0x201)]{constructor(_0x2175d4,_0x1cdf75,_0x283a22,_0x3bb43b){const _0x14ccc3=_0x11225e;super(),this[_0x14ccc3(0x1f8)]=_0x2175d4,this[_0x14ccc3(0x252)]=_0x1cdf75,this[_0x14ccc3(0x262)]=_0x283a22,this['_injector']=_0x3bb43b,this[_0x14ccc3(0x223)](),this[_0x14ccc3(0x1f5)]();}['_initUserSync'](){const _0x5ea876=_0x11225e;this[_0x5ea876(0x207)](this[_0x5ea876(0x252)][_0x5ea876(0x259)][_0x5ea876(0x254)](_0x5bf552['bufferTime'](0x10))[_0x5ea876(0x1e6)](_0x15a60e=>{const _0x4af589=_0x5ea876,_0x5cae82=new Set();_0x15a60e['forEach'](_0x4fa0b3=>{const _0x2e4bf3=_0x45b4;switch(_0x4fa0b3[_0x2e4bf3(0x1ea)]){case'add':{const _0x193d2e=_0x4fa0b3[_0x2e4bf3(0x20a)][_0x2e4bf3(0x269)];_0x5cae82[_0x2e4bf3(0x22b)](_0x193d2e);break;}}}),_0x3132c4(this[_0x4af589(0x1ed)],_0x5cae82);}));}[_0x11225e(0x223)](){const _0x110566=_0x11225e;this[_0x110566(0x207)](this['_commentService'][_0x110566(0x259)]['subscribe'](async _0xf6214a=>{const _0x345125=_0x110566;var _0x116078,_0x5bb71b,_0x477019,_0x5c9d2a;const _0x248bfe=(_0x116078=this[_0x345125(0x252)][_0x345125(0x220)](_0xf6214a[_0x345125(0x23e)])[_0x345125(0x26b)](_0x3fc115=>_0x3fc115[_0x345125(0x253)]===_0xf6214a[_0x345125(0x253)]))==null?void 0x0:_0x116078[_0x345125(0x230)];if(!_0x248bfe)return;const {unitId:_0x32d68e,subUnitId:_0x477391}=_0x248bfe;switch(_0xf6214a[_0x345125(0x21f)]&&this[_0x345125(0x262)][_0x345125(0x23f)](_0xf6214a[_0x345125(0x21f)]),_0xf6214a[_0x345125(0x1ea)]){case _0x55acbe[_0x345125(0x1e5)]:break;case _0x55acbe['Reply']:{this[_0x345125(0x252)][_0x345125(0x25e)](_0x32d68e,_0x477391,{'unitId':_0x32d68e,'subUnitId':_0x477391,'ref':'','id':_0xf6214a['replyId'],'dT':_0x3e49d9(+_0xf6214a['createTimestamp']),'threadId':_0xf6214a[_0x345125(0x253)],'personId':(_0x477019=(_0x5bb71b=_0xf6214a['user'])==null?void 0x0:_0x5bb71b[_0x345125(0x25c)])!=null?_0x477019:_0xf6214a['userId'],'text':JSON[_0x345125(0x250)](_0xf6214a[_0x345125(0x232)]),'parentId':_0x248bfe['id']});break;}case _0x55acbe[_0x345125(0x21e)]:{const _0x2a1ee1=this['_threadCommentModel'][_0x345125(0x1e8)](_0x32d68e,_0x477391,_0xf6214a['replyId']);_0x2a1ee1&&_0x2a1ee1[_0x345125(0x221)]&&this[_0x345125(0x252)][_0x345125(0x1ec)](_0x32d68e,_0x477391,_0xf6214a[_0x345125(0x1ff)]);break;}case _0x55acbe['Edit']:{this['_threadCommentModel'][_0x345125(0x24b)](_0x32d68e,_0x477391,{'commentId':_0xf6214a[_0x345125(0x1ff)],'text':JSON[_0x345125(0x250)](_0xf6214a[_0x345125(0x232)])});break;}case _0x55acbe[_0x345125(0x209)]:{const _0x11904f=(_0x5c9d2a=this[_0x345125(0x252)]['getUnit'](_0xf6214a[_0x345125(0x23e)])['find'](_0x2b445d=>_0x2b445d[_0x345125(0x253)]===_0xf6214a[_0x345125(0x253)]))==null?void 0x0:_0x5c9d2a['root'];_0x11904f&&this[_0x345125(0x252)]['resolveComment'](_0x32d68e,_0x477391,_0x11904f['id'],_0xf6214a[_0x345125(0x241)]===_0x319730['Solved']);break;}}}));}};_0x544f61=_0x3e5c80([_0x54c65b(0x0,_0x30e2b8[_0x11225e(0x205)](_0x22f43d[_0x11225e(0x208)])),_0x54c65b(0x1,_0x30e2b8['Inject'](_0x30c642[_0x11225e(0x216)])),_0x54c65b(0x2,_0x30e2b8[_0x11225e(0x205)](_0x30e2b8['UserManagerService'])),_0x54c65b(0x3,_0x30e2b8['Inject'](_0x30e2b8[_0x11225e(0x239)]))],_0x544f61);const _0x2c06d0=_0x11225e(0x1eb),_0x1d737d={};var _0x1da95f=Object[_0x11225e(0x1fa)],_0x2c9cf2=(_0x5052b6,_0x5a6507,_0x4bfd49,_0x29f4f6)=>{const _0x1f49b3=_0x11225e;for(var _0x468eee=_0x29f4f6>0x1?void 0x0:_0x29f4f6?_0x1da95f(_0x5a6507,_0x4bfd49):_0x5a6507,_0x5c30fb=_0x5052b6[_0x1f49b3(0x227)]-0x1,_0x3d94c0;_0x5c30fb>=0x0;_0x5c30fb--)(_0x3d94c0=_0x5052b6[_0x5c30fb])&&(_0x468eee=_0x3d94c0(_0x468eee)||_0x468eee);return _0x468eee;},_0x15696e=(_0x5566b9,_0x2a0a42)=>(_0x48429d,_0x5c74ca)=>_0x2a0a42(_0x48429d,_0x5c74ca,_0x5566b9);function _0x114edd(_0x2e5a69,_0x2558c7){const _0x1e2dd7=_0x11225e,_0x1a6cd9=_0x2e5a69[_0x1e2dd7(0x256)][0x0];return{..._0x2558c7,'id':_0x1a6cd9[_0x1e2dd7(0x1ff)],'resolved':_0x2e5a69['solved']===0x1,'dT':_0x3e49d9(_0x1a6cd9[_0x1e2dd7(0x222)]),'personId':_0x1a6cd9['userId'],'threadId':_0x1a6cd9['threadId']};}function _0x4c7dbd(_0x178bce,_0x8926ee,_0x5022d9){const _0x1d3e53=_0x11225e;var _0x382ea4,_0x52fc30;if(((_0x52fc30=(_0x382ea4=_0x178bce==null?void 0x0:_0x178bce['replies'])==null?void 0x0:_0x382ea4[_0x1d3e53(0x227)])!=null?_0x52fc30:0x0)>0x0){const _0x2bb322=(_0x5d268b,_0x199d38)=>({'id':_0x5d268b[_0x1d3e53(0x1ff)],'threadId':_0x5d268b[_0x1d3e53(0x253)],'dT':_0x3e49d9(_0x5d268b[_0x1d3e53(0x222)]),'personId':_0x5d268b[_0x1d3e53(0x20e)],'resolved':_0x178bce[_0x1d3e53(0x241)]===_0x319730[_0x1d3e53(0x23a)],'unitId':_0x8926ee,'subUnitId':_0x5022d9,'text':JSON['parse'](_0x5d268b[_0x1d3e53(0x232)]),'parentId':_0x199d38}),_0x13cc7b=_0x2bb322(_0x178bce[_0x1d3e53(0x256)][0x0]);return{..._0x13cc7b,'children':_0x178bce[_0x1d3e53(0x256)]['slice'](0x1)[_0x1d3e53(0x211)](_0x46eec4=>_0x2bb322(_0x46eec4,_0x13cc7b['id']))};}return null;}let _0x9076c7=class{constructor(_0x7dd25,_0x1c6a38,_0x5354a4,_0x18cf1f){const _0x1d61e1=_0x11225e;this['_httpService']=_0x7dd25,this[_0x1d61e1(0x262)]=_0x1c6a38,this[_0x1d61e1(0x270)]=_0x5354a4,this['_injector']=_0x18cf1f;}async[_0x11225e(0x25e)](_0xaf8821){const _0x3e9e66=_0x11225e;var _0x1fe8b9,_0x3ad7d3;const {parentId:_0x1f55d0,unitId:_0x3e5f97,text:_0x5d9a82,threadId:_0x3b6130}=_0xaf8821,_0x2eb0e2=(_0x3ad7d3=(_0x1fe8b9=_0x5d9a82['customRanges'])==null?void 0x0:_0x1fe8b9[_0x3e9e66(0x1f9)](_0x2f0a35=>_0x2f0a35[_0x3e9e66(0x24f)]===_0x30e2b8['CustomRangeType'][_0x3e9e66(0x242)])[_0x3e9e66(0x211)](_0x5afa3b=>_0x5afa3b['rangeId']))!=null?_0x3ad7d3:[],_0x2bac07=JSON[_0x3e9e66(0x1f3)](_0x5d9a82),_0x10435b=(await this[_0x3e9e66(0x270)]['requireSession'](_0x3e5f97))['getMemberID']();if(_0x1f55d0){const _0x43607f={'memberId':_0x10435b,'unitId':_0x3e5f97,'content':_0x2bac07,'mention':_0x2eb0e2,'threadId':_0x3b6130},_0x56d6d1=(await this[_0x3e9e66(0x21a)][_0x3e9e66(0x224)]('/universer-api/comment/unit/'+_0x3e5f97+'/reply',{'body':_0x43607f}))[_0x3e9e66(0x255)][_0x3e9e66(0x219)];return{..._0xaf8821,'id':_0x56d6d1[_0x3e9e66(0x1ff)],'dT':_0x30e2b8[_0x3e9e66(0x238)](+_0x56d6d1['createTimestamp'])[_0x3e9e66(0x215)](_0x3e9e66(0x24d)),'personId':_0x56d6d1['userId']};}else{const _0x291d6e={'memberId':_0x10435b,'unitId':_0x3e5f97,'content':_0x2bac07,'mention':_0x2eb0e2},_0x3459b5=await this[_0x3e9e66(0x21a)][_0x3e9e66(0x224)](_0x3e9e66(0x21d)+_0x3e5f97+_0x3e9e66(0x25b),{'body':_0x291d6e});return _0x114edd(_0x3459b5[_0x3e9e66(0x255)][_0x3e9e66(0x263)],_0xaf8821);}}async[_0x11225e(0x24b)](_0x53895e){const _0x590738=_0x11225e;var _0x38bcb6,_0x4d45e0;const {text:_0x20f72d,unitId:_0x2f5f4b}=_0x53895e,_0x21756b=(_0x4d45e0=(_0x38bcb6=_0x20f72d[_0x590738(0x245)])==null?void 0x0:_0x38bcb6[_0x590738(0x1f9)](_0x322001=>_0x322001[_0x590738(0x24f)]===_0x30e2b8['CustomRangeType']['COMMENT'])[_0x590738(0x211)](_0x42d785=>_0x42d785['rangeId']))!=null?_0x4d45e0:[],_0x502828=JSON[_0x590738(0x1f3)](_0x20f72d),_0x3ef73c=_0x53895e[_0x590738(0x253)],_0xaa6ef5=_0x53895e['id'],_0x41cb0f={'memberId':(await this['_sessionService'][_0x590738(0x20f)](_0x2f5f4b))[_0x590738(0x22e)](),'unitId':_0x2f5f4b,'threadId':_0x3ef73c,'mention':_0x21756b,'content':_0x502828,'replyId':_0xaa6ef5},_0x5ba3b4=await this[_0x590738(0x21a)][_0x590738(0x224)]('/universer-api/comment/unit/'+_0x2f5f4b+'/edit',{'body':_0x41cb0f});return!_0x5ba3b4[_0x590738(0x255)][_0x590738(0x25f)]||_0x5ba3b4[_0x590738(0x255)][_0x590738(0x25f)]['code']===0x1;}async[_0x11225e(0x25d)](_0x56d111){const _0x293bce=_0x11225e,{unitId:_0x2deda3}=_0x56d111,_0x43aed6=_0x56d111[_0x293bce(0x253)],_0x20ea68={'memberId':this['_userService'][_0x293bce(0x1e7)]()[_0x293bce(0x25c)],'unitId':_0x2deda3,'threadId':_0x43aed6,'solved':_0x56d111[_0x293bce(0x204)]?_0x319730[_0x293bce(0x23a)]:_0x319730[_0x293bce(0x244)]},_0x59f41b=await this[_0x293bce(0x21a)]['post'](_0x293bce(0x21d)+_0x2deda3+_0x293bce(0x261),{'body':_0x20ea68});return!_0x59f41b[_0x293bce(0x255)]['error']||_0x59f41b[_0x293bce(0x255)][_0x293bce(0x25f)][_0x293bce(0x265)]===0x1;}async[_0x11225e(0x1ec)](_0x599604,_0x5be484,_0x59ae35,_0x23b497){const _0x5b8fbc=_0x11225e,_0x313dc5={'memberId':(await this['_sessionService'][_0x5b8fbc(0x20f)](_0x599604))['getMemberID'](),'threadId':_0x59ae35,'replyId':_0x23b497,'unitId':_0x599604},_0x43da39=await this[_0x5b8fbc(0x21a)][_0x5b8fbc(0x224)]('/universer-api/comment/unit/'+_0x599604+_0x5b8fbc(0x24a),{'body':_0x313dc5});return!_0x43da39['body'][_0x5b8fbc(0x25f)]||_0x43da39['body'][_0x5b8fbc(0x25f)][_0x5b8fbc(0x265)]===0x1;}async[_0x11225e(0x235)](_0x13622d,_0x30e828,_0x342b46){const _0x546412=_0x11225e,_0x1858f6={'unitId':_0x13622d,'threadId':_0x342b46},_0x56f3bf=await this[_0x546412(0x21a)][_0x546412(0x224)](_0x546412(0x21d)+_0x13622d+'/list',{'body':_0x1858f6}),_0x25e5a6=_0x342b46['map'](_0x4c64d2=>_0x4c7dbd(_0x56f3bf[_0x546412(0x255)][_0x546412(0x233)][_0x4c64d2],_0x13622d,_0x30e828))[_0x546412(0x1f9)](Boolean);return Object['values'](_0x56f3bf['body'][_0x546412(0x1f2)])[_0x546412(0x266)](_0x55b350=>{const _0x575679=_0x546412;this[_0x575679(0x262)]['addUser'](_0x55b350);}),_0x25e5a6;}[_0x11225e(0x25a)](_0x19d062){const _0x40e519=_0x11225e;return{'id':_0x19d062['id'],'threadId':_0x19d062[_0x40e519(0x253)],'ref':_0x19d062[_0x40e519(0x203)]};}};_0x9076c7=_0x2c9cf2([_0x15696e(0x0,_0x30e2b8['Inject'](_0x546ee6[_0x11225e(0x26c)])),_0x15696e(0x1,_0x30e2b8[_0x11225e(0x205)](_0x30e2b8[_0x11225e(0x22f)])),_0x15696e(0x2,_0x30e2b8[_0x11225e(0x205)](_0x22f43d['CollaborationSessionService'])),_0x15696e(0x3,_0x30e2b8['Inject'](_0x30e2b8[_0x11225e(0x239)]))],_0x9076c7);var _0xbd072a=Object[_0x11225e(0x1fa)],_0x3e25bd=(_0x50a3e6,_0x138030,_0x134e2b,_0x5d5632)=>{const _0x3c99a0=_0x11225e;for(var _0x2dc333=_0x5d5632>0x1?void 0x0:_0x5d5632?_0xbd072a(_0x138030,_0x134e2b):_0x138030,_0x10f56b=_0x50a3e6[_0x3c99a0(0x227)]-0x1,_0x949e40;_0x10f56b>=0x0;_0x10f56b--)(_0x949e40=_0x50a3e6[_0x10f56b])&&(_0x2dc333=_0x949e40(_0x2dc333)||_0x2dc333);return _0x2dc333;},_0x32e70f=(_0x198417,_0x3e658d)=>(_0x282ee0,_0x254c4c)=>_0x3e658d(_0x282ee0,_0x254c4c,_0x198417);let _0x51c9e0=class extends _0x30e2b8[_0x11225e(0x201)]{constructor(_0x5c00e5,_0x44eb3f){const _0x370422=_0x11225e;super(),this[_0x370422(0x258)]=_0x5c00e5,this['_threadCommentDataSource']=_0x44eb3f,this[_0x370422(0x218)]();}[_0x11225e(0x218)](){const _0x37ece0=_0x11225e;this['_threadCommentDataSourceService'][_0x37ece0(0x26d)]=this[_0x37ece0(0x1f4)],this[_0x37ece0(0x258)]['syncUpdateMutationToColla']=!0x1;}};_0x51c9e0=_0x3e25bd([_0x32e70f(0x0,_0x30c642[_0x11225e(0x231)]),_0x32e70f(0x1,_0x30e2b8['Inject'](_0x9076c7))],_0x51c9e0);var _0x2df534=Object['defineProperty'],_0x3b6a19=Object['getOwnPropertyDescriptor'],_0x5f0105=(_0xde0c6f,_0x29e53a,_0x18c17e)=>_0x29e53a in _0xde0c6f?_0x2df534(_0xde0c6f,_0x29e53a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x18c17e}):_0xde0c6f[_0x29e53a]=_0x18c17e,_0x2b0d4c=(_0x81d220,_0x27bcb2,_0x5b1b45,_0x53c2b7)=>{const _0x206f72=_0x11225e;for(var _0x301e8e=_0x53c2b7>0x1?void 0x0:_0x53c2b7?_0x3b6a19(_0x27bcb2,_0x5b1b45):_0x27bcb2,_0x51e433=_0x81d220[_0x206f72(0x227)]-0x1,_0x3bd8f7;_0x51e433>=0x0;_0x51e433--)(_0x3bd8f7=_0x81d220[_0x51e433])&&(_0x301e8e=_0x3bd8f7(_0x301e8e)||_0x301e8e);return _0x301e8e;},_0x22c4d3=(_0x57d44b,_0x3cf0d7)=>(_0x13beb0,_0x26e700)=>_0x3cf0d7(_0x13beb0,_0x26e700,_0x57d44b),_0x231aab=(_0x26645a,_0x3bbe3f,_0x377f9d)=>_0x5f0105(_0x26645a,typeof _0x3bbe3f!='symbol'?_0x3bbe3f+'':_0x3bbe3f,_0x377f9d);_0x483f35[_0x11225e(0x1fc)]=class extends _0x30e2b8[_0x11225e(0x247)]{constructor(_0x5dfdf0=_0x1d737d,_0x4ccf6f,_0x51c525){const _0x257fe2=_0x11225e;super(),this['_config']=_0x5dfdf0,this[_0x257fe2(0x1ed)]=_0x4ccf6f,this[_0x257fe2(0x214)]=_0x51c525;const {..._0x1093a3}=_0x30e2b8[_0x257fe2(0x237)]({},_0x1d737d,this[_0x257fe2(0x202)]);this[_0x257fe2(0x214)][_0x257fe2(0x248)](_0x2c06d0,_0x1093a3);}[_0x11225e(0x1f0)](){const _0x59faf1=_0x11225e;[[_0x9076c7],[_0x51c9e0],[_0x544f61]][_0x59faf1(0x266)](_0x40d33b=>{const _0x4be4ed=_0x59faf1;this[_0x4be4ed(0x1ed)]['add'](_0x40d33b);});}[_0x11225e(0x21b)](){const _0xf0b341=_0x11225e;this[_0xf0b341(0x1ed)]['get'](_0x51c9e0),this[_0xf0b341(0x1ed)][_0xf0b341(0x26f)](_0x544f61);}},_0x231aab(_0x483f35['UniverThreadCommentDataSourcePlugin'],_0x11225e(0x206),_0x9c1ce5),_0x231aab(_0x483f35[_0x11225e(0x1fc)],_0x11225e(0x1ea),_0x30e2b8[_0x11225e(0x1fd)][_0x11225e(0x240)]),_0x483f35['UniverThreadCommentDataSourcePlugin']=_0x2b0d4c([_0x30e2b8[_0x11225e(0x23c)](_0x1c69cc['UniverThreadCommentUIPlugin'],_0x22f43d[_0x11225e(0x249)],_0x22ad29['UniverLicensePlugin']),_0x22c4d3(0x1,_0x30e2b8[_0x11225e(0x205)](_0x30e2b8[_0x11225e(0x239)])),_0x22c4d3(0x2,_0x30e2b8['IConfigService'])],_0x483f35[_0x11225e(0x1fc)]),Object[_0x11225e(0x1f1)](_0x483f35,Symbol[_0x11225e(0x22a)],{'value':_0x11225e(0x1ef)});}));
|
|
1
|
+
(function(_0x3e35af,_0x4061f9){const _0x10a6a8=_0x29a1,_0x32fa74=_0x3e35af();while(!![]){try{const _0x5b9d03=parseInt(_0x10a6a8(0xa3))/0x1*(-parseInt(_0x10a6a8(0x9c))/0x2)+parseInt(_0x10a6a8(0x83))/0x3*(parseInt(_0x10a6a8(0xa8))/0x4)+parseInt(_0x10a6a8(0x79))/0x5+parseInt(_0x10a6a8(0x8d))/0x6+parseInt(_0x10a6a8(0xa9))/0x7*(-parseInt(_0x10a6a8(0x102))/0x8)+parseInt(_0x10a6a8(0xc8))/0x9+-parseInt(_0x10a6a8(0xf5))/0xa;if(_0x5b9d03===_0x4061f9)break;else _0x32fa74['push'](_0x32fa74['shift']());}catch(_0x3320be){_0x32fa74['push'](_0x32fa74['shift']());}}}(_0x32c8,0x93a8e),function(_0x571cf1,_0x39749f){const _0x4bb187=_0x29a1;typeof exports==_0x4bb187(0xd4)&&typeof module<'u'?_0x39749f(exports,require(_0x4bb187(0xf0)),require(_0x4bb187(0xd0)),require('@univerjs/core'),require(_0x4bb187(0xfc)),require(_0x4bb187(0x96)),require(_0x4bb187(0xc4)),require(_0x4bb187(0xe2))):typeof define==_0x4bb187(0xb6)&&define['amd']?define([_0x4bb187(0xae),_0x4bb187(0xf0),'@univerjs-pro/license',_0x4bb187(0xd2),_0x4bb187(0xfc),'@univerjs/thread-comment',_0x4bb187(0xc4),'@univerjs/network'],_0x39749f):(_0x571cf1=typeof globalThis<'u'?globalThis:_0x571cf1||self,_0x39749f(_0x571cf1[_0x4bb187(0x7b)]={},_0x571cf1['UniverProCollaborationClient'],_0x571cf1['UniverProLicense'],_0x571cf1[_0x4bb187(0x84)],_0x571cf1['UniverThreadCommentUi'],_0x571cf1['UniverThreadComment'],_0x571cf1[_0x4bb187(0xc4)],_0x571cf1[_0x4bb187(0x100)]));}(this,function(_0x289463,_0x480e08,_0x19b191,_0x38b9c5,_0x2813cc,_0x4c9be2,_0x5e21de,_0x30fce7){'use strict';const _0x5115ad=_0x29a1;const _0x148033='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x194e5b=(_0x1cbdc9=>(_0x1cbdc9[_0x1cbdc9[_0x5115ad(0xcb)]=0x0]='OpenOrReOpen',_0x1cbdc9[_0x1cbdc9[_0x5115ad(0xe0)]=0x1]=_0x5115ad(0xe0),_0x1cbdc9[_0x1cbdc9['UNRECOGNIZED']=-0x1]=_0x5115ad(0xdb),_0x1cbdc9))(_0x194e5b||{}),_0x564e94=(_0xf90348=>(_0xf90348[_0xf90348[_0x5115ad(0xb7)]=0x0]=_0x5115ad(0xb7),_0xf90348[_0xf90348[_0x5115ad(0x7d)]=0x1]='Add',_0xf90348[_0xf90348[_0x5115ad(0xc5)]=0x2]=_0x5115ad(0xc5),_0xf90348[_0xf90348[_0x5115ad(0xe4)]=0x3]=_0x5115ad(0xe4),_0xf90348[_0xf90348[_0x5115ad(0xe9)]=0x4]=_0x5115ad(0xe9),_0xf90348[_0xf90348[_0x5115ad(0xca)]=0x5]=_0x5115ad(0xca),_0xf90348[_0xf90348['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xf90348))(_0x564e94||{});const _0x4e0bc7=_0x4a0e0e=>_0x38b9c5['dayjs'](new Date(+_0x4a0e0e))[_0x5115ad(0xb1)]('YYYY/MM/DD\x20HH:mm'),_0x189ea9=async(_0x20827d,_0x31bae5)=>{const _0x3f39ea=_0x5115ad,_0x3abfd3=_0x20827d[_0x3f39ea(0x91)](_0x38b9c5[_0x3f39ea(0x8c)]),_0x494a5d=_0x20827d[_0x3f39ea(0x91)](_0x30fce7[_0x3f39ea(0x7f)]);_0x31bae5[_0x3f39ea(0x7e)](_0x2a6690=>{const _0x545c83=_0x3f39ea;_0x3abfd3[_0x545c83(0xd8)](_0x2a6690)&&_0x31bae5[_0x545c83(0x85)](_0x2a6690);}),_0x31bae5[_0x3f39ea(0x90)]&&(await _0x494a5d[_0x3f39ea(0x91)](_0x3f39ea(0xc1),{'params':{'userIDs':[..._0x31bae5]}}))['body'][_0x3f39ea(0x99)]['forEach'](_0x58a81d=>{const _0xe081a9=_0x3f39ea;_0x58a81d&&_0x3abfd3[_0xe081a9(0xe6)](_0x58a81d);});};var _0x247b26=Object[_0x5115ad(0x95)],_0x12b0de=(_0x4767f5,_0x18d27d,_0x445480,_0x35e816)=>{const _0x476b8b=_0x5115ad;for(var _0x2f669c=_0x35e816>0x1?void 0x0:_0x35e816?_0x247b26(_0x18d27d,_0x445480):_0x18d27d,_0x5b8189=_0x4767f5[_0x476b8b(0xb3)]-0x1,_0x2af04a;_0x5b8189>=0x0;_0x5b8189--)(_0x2af04a=_0x4767f5[_0x5b8189])&&(_0x2f669c=_0x2af04a(_0x2f669c)||_0x2f669c);return _0x2f669c;},_0x3507dd=(_0x545ab0,_0x1f796a)=>(_0x1c2d81,_0x65a7af)=>_0x1f796a(_0x1c2d81,_0x65a7af,_0x545ab0);let _0x16ad41=class extends _0x38b9c5['Disposable']{constructor(_0x3eb864,_0x47c194,_0x1c9567,_0x553160){const _0x55576c=_0x5115ad;super(),this[_0x55576c(0xea)]=_0x3eb864,this['_threadCommentModel']=_0x47c194,this['_userService']=_0x1c9567,this[_0x55576c(0x89)]=_0x553160,this[_0x55576c(0xf7)](),this['_initUserSync']();}[_0x5115ad(0xec)](){const _0x4325c3=_0x5115ad;this[_0x4325c3(0xf1)](this[_0x4325c3(0xf6)][_0x4325c3(0x7c)][_0x4325c3(0xa5)](_0x5e21de[_0x4325c3(0xbe)](0x10))[_0x4325c3(0xa6)](_0x3c0634=>{const _0x3dc77d=_0x4325c3,_0x2831c6=new Set();_0x3c0634[_0x3dc77d(0x7e)](_0x47c742=>{const _0x1346b5=_0x3dc77d;switch(_0x47c742[_0x1346b5(0xce)]){case _0x1346b5(0xf4):{const _0x2310c4=_0x47c742[_0x1346b5(0xfb)][_0x1346b5(0xeb)];_0x2831c6[_0x1346b5(0xf4)](_0x2310c4);break;}}}),_0x189ea9(this[_0x3dc77d(0x89)],_0x2831c6);}));}[_0x5115ad(0xf7)](){const _0x568e43=_0x5115ad;this[_0x568e43(0xf1)](this[_0x568e43(0xea)][_0x568e43(0x7c)][_0x568e43(0xa6)](async _0x22da53=>{const _0x142c76=_0x568e43;var _0x4ef583,_0xe12de2,_0x4590d0,_0x86d20c;const _0x44df97=(_0x4ef583=this[_0x142c76(0xf6)][_0x142c76(0x86)](_0x22da53[_0x142c76(0xb2)])['find'](_0x422dce=>_0x422dce[_0x142c76(0x80)]===_0x22da53[_0x142c76(0x80)]))==null?void 0x0:_0x4ef583[_0x142c76(0xa0)];if(!_0x44df97)return;const {unitId:_0x53f504,subUnitId:_0xe2963f}=_0x44df97;switch(_0x22da53[_0x142c76(0xe5)]&&this[_0x142c76(0x9f)]['addUser'](_0x22da53[_0x142c76(0xe5)]),_0x22da53['type']){case _0x564e94['Add']:break;case _0x564e94[_0x142c76(0xc5)]:{this[_0x142c76(0xf6)][_0x142c76(0xb0)](_0x53f504,_0xe2963f,{'unitId':_0x53f504,'subUnitId':_0xe2963f,'ref':'','id':_0x22da53[_0x142c76(0x82)],'dT':_0x4e0bc7(+_0x22da53[_0x142c76(0xc2)]),'threadId':_0x22da53[_0x142c76(0x80)],'personId':(_0x4590d0=(_0xe12de2=_0x22da53['user'])==null?void 0x0:_0xe12de2['userID'])!=null?_0x4590d0:_0x22da53[_0x142c76(0x8e)],'text':JSON[_0x142c76(0xfa)](_0x22da53[_0x142c76(0xba)]),'parentId':_0x44df97['id']});break;}case _0x564e94['Delete']:{const _0x42d667=this[_0x142c76(0xf6)]['getComment'](_0x53f504,_0xe2963f,_0x22da53[_0x142c76(0x82)]);_0x42d667&&_0x42d667[_0x142c76(0x78)]&&this[_0x142c76(0xf6)][_0x142c76(0xa7)](_0x53f504,_0xe2963f,_0x22da53[_0x142c76(0x82)]);break;}case _0x564e94['Edit']:{this['_threadCommentModel']['updateComment'](_0x53f504,_0xe2963f,{'commentId':_0x22da53[_0x142c76(0x82)],'text':JSON['parse'](_0x22da53[_0x142c76(0xba)])});break;}case _0x564e94[_0x142c76(0xca)]:{const _0x3567d9=(_0x86d20c=this[_0x142c76(0xf6)]['getUnit'](_0x22da53['unitId'])[_0x142c76(0xb5)](_0x491748=>_0x491748['threadId']===_0x22da53[_0x142c76(0x80)]))==null?void 0x0:_0x86d20c[_0x142c76(0xa0)];_0x3567d9&&this[_0x142c76(0xf6)][_0x142c76(0xe8)](_0x53f504,_0xe2963f,_0x3567d9['id'],_0x22da53[_0x142c76(0xfd)]===_0x194e5b[_0x142c76(0xe0)]);break;}}}));}};_0x16ad41=_0x12b0de([_0x3507dd(0x0,_0x38b9c5[_0x5115ad(0xc0)](_0x480e08[_0x5115ad(0xdf)])),_0x3507dd(0x1,_0x38b9c5[_0x5115ad(0xc0)](_0x4c9be2[_0x5115ad(0xb9)])),_0x3507dd(0x2,_0x38b9c5[_0x5115ad(0xc0)](_0x38b9c5[_0x5115ad(0x8c)])),_0x3507dd(0x3,_0x38b9c5[_0x5115ad(0xc0)](_0x38b9c5[_0x5115ad(0x98)]))],_0x16ad41);const _0x4d817a=_0x5115ad(0xff),_0x18cc61={};var _0x502638=Object['getOwnPropertyDescriptor'],_0x9346b6=(_0x5eff2b,_0x11909b,_0xde0ce4,_0x452637)=>{const _0x43ac0d=_0x5115ad;for(var _0x1bc1cf=_0x452637>0x1?void 0x0:_0x452637?_0x502638(_0x11909b,_0xde0ce4):_0x11909b,_0x514b7f=_0x5eff2b[_0x43ac0d(0xb3)]-0x1,_0x408030;_0x514b7f>=0x0;_0x514b7f--)(_0x408030=_0x5eff2b[_0x514b7f])&&(_0x1bc1cf=_0x408030(_0x1bc1cf)||_0x1bc1cf);return _0x1bc1cf;},_0x224e4f=(_0x22d7f9,_0x13cdca)=>(_0x4fdd61,_0x5ed191)=>_0x13cdca(_0x4fdd61,_0x5ed191,_0x22d7f9);function _0x1a959d(_0x26e2b5,_0x48983c){const _0x1ee7b3=_0x5115ad,_0xa6bca1=_0x26e2b5[_0x1ee7b3(0x9b)][0x0];return{..._0x48983c,'id':_0xa6bca1[_0x1ee7b3(0x82)],'resolved':_0x26e2b5[_0x1ee7b3(0xfd)]===0x1,'dT':_0x4e0bc7(_0xa6bca1['createTimestamp']),'personId':_0xa6bca1[_0x1ee7b3(0x8e)],'threadId':_0xa6bca1[_0x1ee7b3(0x80)]};}function _0xd860b7(_0xf6362c,_0x27fe30,_0x47c319){const _0x413760=_0x5115ad;var _0x33632a,_0x289b37;if(((_0x289b37=(_0x33632a=_0xf6362c==null?void 0x0:_0xf6362c[_0x413760(0x9b)])==null?void 0x0:_0x33632a['length'])!=null?_0x289b37:0x0)>0x0){const _0x2c29c6=(_0x2e2b71,_0x3146e4)=>({'id':_0x2e2b71[_0x413760(0x82)],'threadId':_0x2e2b71[_0x413760(0x80)],'dT':_0x4e0bc7(_0x2e2b71[_0x413760(0xc2)]),'personId':_0x2e2b71['userId'],'resolved':_0xf6362c[_0x413760(0xfd)]===_0x194e5b['Solved'],'unitId':_0x27fe30,'subUnitId':_0x47c319,'text':JSON['parse'](_0x2e2b71[_0x413760(0xba)]),'parentId':_0x3146e4}),_0x53d100=_0x2c29c6(_0xf6362c['replies'][0x0]);return{..._0x53d100,'children':_0xf6362c[_0x413760(0x9b)][_0x413760(0xab)](0x1)[_0x413760(0xbc)](_0x3fcaa6=>_0x2c29c6(_0x3fcaa6,_0x53d100['id']))};}return null;}let _0x4251fc=class{constructor(_0x1537c0,_0x53f1ed,_0x3e10e1,_0x33204e){const _0x2ac62f=_0x5115ad;this[_0x2ac62f(0xcf)]=_0x1537c0,this[_0x2ac62f(0x9f)]=_0x53f1ed,this[_0x2ac62f(0xe3)]=_0x3e10e1,this[_0x2ac62f(0x89)]=_0x33204e;}async[_0x5115ad(0xb0)](_0x372010){const _0x5f1691=_0x5115ad;var _0x42f3ed,_0x56269b;const {parentId:_0x4b7108,unitId:_0x1bdd54,text:_0x19a278,threadId:_0x41d163}=_0x372010,_0x3a8530=(_0x56269b=(_0x42f3ed=_0x19a278[_0x5f1691(0xfe)])==null?void 0x0:_0x42f3ed['filter'](_0x458aa7=>_0x458aa7[_0x5f1691(0xa1)]===_0x38b9c5[_0x5f1691(0x9d)]['COMMENT'])['map'](_0x2d5d39=>_0x2d5d39[_0x5f1691(0xad)]))!=null?_0x56269b:[],_0x45cbe9=JSON[_0x5f1691(0xa4)](_0x19a278),_0x3ea819=(await this[_0x5f1691(0xe3)][_0x5f1691(0xb8)](_0x1bdd54))[_0x5f1691(0x94)]();if(_0x4b7108){const _0x1a63ff={'memberId':_0x3ea819,'unitId':_0x1bdd54,'content':_0x45cbe9,'mention':_0x3a8530,'threadId':_0x41d163},_0x405bbf=(await this['_httpService'][_0x5f1691(0xf8)](_0x5f1691(0xc6)+_0x1bdd54+_0x5f1691(0xdd),{'body':_0x1a63ff}))[_0x5f1691(0xc9)][_0x5f1691(0xbf)];return{..._0x372010,'id':_0x405bbf[_0x5f1691(0x82)],'dT':_0x38b9c5['dayjs'](+_0x405bbf[_0x5f1691(0xc2)])[_0x5f1691(0xb1)](_0x5f1691(0x8b)),'personId':_0x405bbf[_0x5f1691(0x8e)]};}else{const _0x35eb19={'memberId':_0x3ea819,'unitId':_0x1bdd54,'content':_0x45cbe9,'mention':_0x3a8530},_0x76a88d=await this['_httpService'][_0x5f1691(0xf8)](_0x5f1691(0xc6)+_0x1bdd54+_0x5f1691(0x8a),{'body':_0x35eb19});return _0x1a959d(_0x76a88d['body'][_0x5f1691(0x9e)],_0x372010);}}async[_0x5115ad(0xcc)](_0x5c884e){const _0x5a763d=_0x5115ad;var _0x895496,_0x2f084b;const {text:_0x3ced22,unitId:_0x2968be}=_0x5c884e,_0x47ef16=(_0x2f084b=(_0x895496=_0x3ced22[_0x5a763d(0xfe)])==null?void 0x0:_0x895496[_0x5a763d(0x7a)](_0x15bc1d=>_0x15bc1d[_0x5a763d(0xa1)]===_0x38b9c5[_0x5a763d(0x9d)][_0x5a763d(0xf9)])[_0x5a763d(0xbc)](_0x61e378=>_0x61e378[_0x5a763d(0xad)]))!=null?_0x2f084b:[],_0x4279d6=JSON[_0x5a763d(0xa4)](_0x3ced22),_0x186cb7=_0x5c884e['threadId'],_0x22e09f=_0x5c884e['id'],_0x4561b0={'memberId':(await this[_0x5a763d(0xe3)][_0x5a763d(0xb8)](_0x2968be))[_0x5a763d(0x94)](),'unitId':_0x2968be,'threadId':_0x186cb7,'mention':_0x47ef16,'content':_0x4279d6,'replyId':_0x22e09f},_0x241880=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2968be+_0x5a763d(0xf2),{'body':_0x4561b0});return!_0x241880[_0x5a763d(0xc9)][_0x5a763d(0xcd)]||_0x241880[_0x5a763d(0xc9)][_0x5a763d(0xcd)][_0x5a763d(0xde)]===0x1;}async[_0x5115ad(0xe8)](_0x17c2c7){const _0x55e35f=_0x5115ad,{unitId:_0x4d7054}=_0x17c2c7,_0x555a70=_0x17c2c7[_0x55e35f(0x80)],_0x38fa88={'memberId':this[_0x55e35f(0x9f)][_0x55e35f(0xd5)]()[_0x55e35f(0x81)],'unitId':_0x4d7054,'threadId':_0x555a70,'solved':_0x17c2c7[_0x55e35f(0x87)]?_0x194e5b[_0x55e35f(0xe0)]:_0x194e5b[_0x55e35f(0xcb)]},_0x2197e5=await this['_httpService'][_0x55e35f(0xf8)](_0x55e35f(0xc6)+_0x4d7054+_0x55e35f(0x93),{'body':_0x38fa88});return!_0x2197e5[_0x55e35f(0xc9)][_0x55e35f(0xcd)]||_0x2197e5['body'][_0x55e35f(0xcd)][_0x55e35f(0xde)]===0x1;}async[_0x5115ad(0xa7)](_0x2751d5,_0x150df8,_0x2d3598,_0x2f2b88){const _0x451144=_0x5115ad,_0x42dd73={'memberId':(await this[_0x451144(0xe3)]['requireSession'](_0x2751d5))[_0x451144(0x94)](),'threadId':_0x2d3598,'replyId':_0x2f2b88,'unitId':_0x2751d5},_0x365a49=await this[_0x451144(0xcf)][_0x451144(0xf8)]('/universer-api/comment/unit/'+_0x2751d5+'/delete',{'body':_0x42dd73});return!_0x365a49[_0x451144(0xc9)][_0x451144(0xcd)]||_0x365a49[_0x451144(0xc9)][_0x451144(0xcd)]['code']===0x1;}async[_0x5115ad(0x9a)](_0xaae682,_0x4b6e3a,_0x844d3b){const _0x137288=_0x5115ad,_0x4eb079={'unitId':_0xaae682,'threadId':_0x844d3b},_0x557dfa=await this['_httpService']['post'](_0x137288(0xc6)+_0xaae682+'/list',{'body':_0x4eb079}),_0x3fd88a=_0x844d3b['map'](_0x129f19=>_0xd860b7(_0x557dfa[_0x137288(0xc9)][_0x137288(0xd7)][_0x129f19],_0xaae682,_0x4b6e3a))['filter'](Boolean);return Object['values'](_0x557dfa[_0x137288(0xc9)][_0x137288(0x99)])[_0x137288(0x7e)](_0x3dec8d=>{const _0x3499a3=_0x137288;this[_0x3499a3(0x9f)]['addUser'](_0x3dec8d);}),_0x3fd88a;}[_0x5115ad(0xa2)](_0xb0999a){const _0xdd977f=_0x5115ad;return{'id':_0xb0999a['id'],'threadId':_0xb0999a['threadId'],'ref':_0xb0999a[_0xdd977f(0x88)]};}};_0x4251fc=_0x9346b6([_0x224e4f(0x0,_0x38b9c5[_0x5115ad(0xc0)](_0x30fce7[_0x5115ad(0x7f)])),_0x224e4f(0x1,_0x38b9c5['Inject'](_0x38b9c5[_0x5115ad(0x8c)])),_0x224e4f(0x2,_0x38b9c5[_0x5115ad(0xc0)](_0x480e08[_0x5115ad(0xed)])),_0x224e4f(0x3,_0x38b9c5['Inject'](_0x38b9c5['Injector']))],_0x4251fc);var _0x40a728=Object['getOwnPropertyDescriptor'],_0x26ff15=(_0x530c08,_0x224796,_0x43d815,_0xef45ae)=>{for(var _0x171810=_0xef45ae>0x1?void 0x0:_0xef45ae?_0x40a728(_0x224796,_0x43d815):_0x224796,_0x1a6c2a=_0x530c08['length']-0x1,_0x213c15;_0x1a6c2a>=0x0;_0x1a6c2a--)(_0x213c15=_0x530c08[_0x1a6c2a])&&(_0x171810=_0x213c15(_0x171810)||_0x171810);return _0x171810;},_0x37aff=(_0x36be24,_0x217f37)=>(_0x4dcec1,_0x17fff4)=>_0x217f37(_0x4dcec1,_0x17fff4,_0x36be24);let _0x315825=class extends _0x38b9c5[_0x5115ad(0xdc)]{constructor(_0x2795d4,_0x10a4c7){const _0x2ade54=_0x5115ad;super(),this[_0x2ade54(0x103)]=_0x2795d4,this[_0x2ade54(0x92)]=_0x10a4c7,this[_0x2ade54(0xaf)]();}['_initDataSource'](){const _0xcf6852=_0x5115ad;this[_0xcf6852(0x103)][_0xcf6852(0xc3)]=this['_threadCommentDataSource'],this[_0xcf6852(0x103)][_0xcf6852(0x8f)]=!0x1;}};_0x315825=_0x26ff15([_0x37aff(0x0,_0x4c9be2[_0x5115ad(0xda)]),_0x37aff(0x1,_0x38b9c5[_0x5115ad(0xc0)](_0x4251fc))],_0x315825);var _0x2d9df2=Object['defineProperty'],_0x5075ab=Object[_0x5115ad(0x95)],_0x4fcf57=(_0x4abc21,_0x59dc7d,_0x388a3a)=>_0x59dc7d in _0x4abc21?_0x2d9df2(_0x4abc21,_0x59dc7d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x388a3a}):_0x4abc21[_0x59dc7d]=_0x388a3a,_0x50d142=(_0x1b915c,_0x353a4e,_0x212915,_0xc112d8)=>{for(var _0x56e24d=_0xc112d8>0x1?void 0x0:_0xc112d8?_0x5075ab(_0x353a4e,_0x212915):_0x353a4e,_0x1e80fd=_0x1b915c['length']-0x1,_0x43e1f1;_0x1e80fd>=0x0;_0x1e80fd--)(_0x43e1f1=_0x1b915c[_0x1e80fd])&&(_0x56e24d=_0x43e1f1(_0x56e24d)||_0x56e24d);return _0x56e24d;},_0x5d2dfa=(_0xcb6405,_0x24c56b)=>(_0x403766,_0x587072)=>_0x24c56b(_0x403766,_0x587072,_0xcb6405),_0x5c39c6=(_0x5771ce,_0x24a1f1,_0xc6175d)=>_0x4fcf57(_0x5771ce,typeof _0x24a1f1!=_0x5115ad(0xd3)?_0x24a1f1+'':_0x24a1f1,_0xc6175d);_0x289463['UniverThreadCommentDataSourcePlugin']=class extends _0x38b9c5[_0x5115ad(0xee)]{constructor(_0x4c4dec=_0x18cc61,_0x3753f9,_0x2f2ede){const _0x36cc0a=_0x5115ad;super(),this[_0x36cc0a(0xef)]=_0x4c4dec,this[_0x36cc0a(0x89)]=_0x3753f9,this['_configService']=_0x2f2ede;const {..._0x4b9daf}=_0x38b9c5['merge']({},_0x18cc61,this[_0x36cc0a(0xef)]);this[_0x36cc0a(0xd9)][_0x36cc0a(0x97)](_0x4d817a,_0x4b9daf);}[_0x5115ad(0xc7)](){const _0x182d6e=_0x5115ad;[[_0x4251fc],[_0x315825],[_0x16ad41]][_0x182d6e(0x7e)](_0x4b64b6=>{const _0x5c9739=_0x182d6e;this[_0x5c9739(0x89)][_0x5c9739(0xf4)](_0x4b64b6);});}[_0x5115ad(0xe1)](){this['_injector']['get'](_0x315825),this['_injector']['get'](_0x16ad41);}},_0x5c39c6(_0x289463['UniverThreadCommentDataSourcePlugin'],_0x5115ad(0xbb),_0x148033),_0x5c39c6(_0x289463[_0x5115ad(0xbd)],_0x5115ad(0xce),_0x38b9c5[_0x5115ad(0xac)][_0x5115ad(0xaa)]),_0x289463[_0x5115ad(0xbd)]=_0x50d142([_0x38b9c5[_0x5115ad(0xf3)](_0x2813cc[_0x5115ad(0xd1)],_0x480e08[_0x5115ad(0xe7)],_0x19b191['UniverLicensePlugin']),_0x5d2dfa(0x1,_0x38b9c5[_0x5115ad(0xc0)](_0x38b9c5[_0x5115ad(0x98)])),_0x5d2dfa(0x2,_0x38b9c5[_0x5115ad(0xb4)])],_0x289463[_0x5115ad(0xbd)]),Object[_0x5115ad(0xd6)](_0x289463,Symbol['toStringTag'],{'value':_0x5115ad(0x101)});}));function _0x29a1(_0x3f8d0b,_0x181dbb){const _0x32c8ec=_0x32c8();return _0x29a1=function(_0x29a144,_0xca0f61){_0x29a144=_0x29a144-0x78;let _0x3727b1=_0x32c8ec[_0x29a144];return _0x3727b1;},_0x29a1(_0x3f8d0b,_0x181dbb);}function _0x32c8(){const _0x3ddf78=['deleteComment','12448glHwDZ','4697qkdbqK','UNIVER_UNKNOWN','slice','UniverInstanceType','rangeId','exports','_initDataSource','addComment','format','unitId','length','IConfigService','find','function','Unknown','requireSession','ThreadCommentModel','content','pluginName','map','UniverThreadCommentDataSourcePlugin','bufferTime','reply','Inject','/universer-api/user/list','createTimestamp','dataSource','rxjs','Reply','/universer-api/comment/unit/','onStarting','6656256MeRNjl','body','Solve','OpenOrReOpen','updateComment','error','type','_httpService','@univerjs-pro/license','UniverThreadCommentUIPlugin','@univerjs/core','symbol','object','getCurrentUser','defineProperty','comments','getUser','_configService','IThreadCommentDataSourceService','UNRECOGNIZED','Disposable','/reply','code','CommentService','Solved','onReady','@univerjs/network','_sessionService','Edit','user','addUser','UniverCollaborationClientPlugin','resolveComment','Delete','_commentService','personId','_initUserSync','CollaborationSessionService','Plugin','_config','@univerjs-pro/collaboration-client','disposeWithMe','/edit','DependentOn','add','7005660XtoUjW','_threadCommentModel','_init','post','COMMENT','parse','payload','@univerjs/thread-comment-ui','solved','customRanges','thread-comment-data-source.config','UniverNetwork','Module','3424aCBDOb','_threadCommentDataSourceService','parentId','1319405EfKiHa','filter','UniverProThreadCommentDatasource','commentUpdate$','Add','forEach','HTTPService','threadId','userID','replyId','15ChErOt','UniverCore','delete','getUnit','resolved','ref','_injector','/add','YYYY/MM/DD\x20HH:mm','UserManagerService','6121488GykwFe','userId','syncUpdateMutationToColla','size','get','_threadCommentDataSource','/solved','getMemberID','getOwnPropertyDescriptor','@univerjs/thread-comment','setConfig','Injector','users','listComments','replies','893410xYQGIf','CustomRangeType','comment','_userService','root','rangeType','saveCommentToSnapshot','1hkUMgz','stringify','pipe','subscribe'];_0x32c8=function(){return _0x3ddf78;};return _0x32c8();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.7-experimental.20250331-
|
|
3
|
+
"version": "0.6.7-experimental.20250331-fa407d3",
|
|
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-experimental.20250331-
|
|
49
|
-
"@univerjs-pro/license": "0.6.7-experimental.20250331-
|
|
50
|
-
"@univerjs/core": "0.6.7-experimental.20250331-
|
|
51
|
-
"@univerjs/network": "0.6.7-experimental.20250331-45dde91",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.7-experimental.20250331-fa407d3",
|
|
49
|
+
"@univerjs-pro/license": "0.6.7-experimental.20250331-fa407d3",
|
|
50
|
+
"@univerjs/core": "0.6.7-experimental.20250331-fa407d3",
|
|
52
51
|
"@univerjs/protocol": "0.1.45",
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-
|
|
52
|
+
"@univerjs/network": "0.6.7-experimental.20250331-fa407d3",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-fa407d3",
|
|
54
|
+
"@univerjs/thread-comment": "0.6.7-experimental.20250331-fa407d3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|