@univerjs-pro/thread-comment-datasource 0.6.7-experimental.20250331-45dde91 → 0.6.7-experimental.20250331-958639c
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 _0x3e99ac=_0x815b;(function(_0x346c73,_0x54d5f1){const _0x6e440b=_0x815b,_0x2e5040=_0x346c73();while(!![]){try{const _0x1e0156=parseInt(_0x6e440b(0x1df))/0x1*(-parseInt(_0x6e440b(0x206))/0x2)+parseInt(_0x6e440b(0x1d8))/0x3*(-parseInt(_0x6e440b(0x20d))/0x4)+-parseInt(_0x6e440b(0x195))/0x5*(-parseInt(_0x6e440b(0x1cf))/0x6)+-parseInt(_0x6e440b(0x1c7))/0x7+-parseInt(_0x6e440b(0x1ea))/0x8*(parseInt(_0x6e440b(0x1a3))/0x9)+-parseInt(_0x6e440b(0x1f7))/0xa+-parseInt(_0x6e440b(0x1c5))/0xb*(-parseInt(_0x6e440b(0x1c3))/0xc);if(_0x1e0156===_0x54d5f1)break;else _0x2e5040['push'](_0x2e5040['shift']());}catch(_0x19bd5c){_0x2e5040['push'](_0x2e5040['shift']());}}}(_0x3479,0x93b06));Object[_0x3e99ac(0x1ec)](exports,Symbol[_0x3e99ac(0x1a5)],{'value':_0x3e99ac(0x1dd)});function _0x3479(){const _0x400f3e=['getUnit','UniverInstanceType','addUser','IThreadCommentDataSourceService','content','delete','211941yCuguD','disposeWithMe','toStringTag','replies','getOwnPropertyDescriptor','format','_injector','map','_userService','createTimestamp','Injector','@univerjs-pro/license','resolved','rangeId','Edit','COMMENT','filter','_threadCommentModel','addComment','Disposable','_httpService','_initDataSource','_threadCommentDataSourceService','deleteComment','parse','threadId','UniverLicensePlugin','updateComment','error','UNIVER_UNKNOWN','bufferTime','UniverThreadCommentUIPlugin','54335868FtQCWe','Reply','11brWLBl','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','6957762HvhuVU','onStarting','syncUpdateMutationToColla','ref','unitId','userID','resolveComment','rangeType','6kJaFhq','/reply','_init','Solve','getUser','Solved','/universer-api/user/list','subscribe','length','87NNkaar','_commentService','UniverCollaborationClientPlugin','onReady','find','Module','/universer-api/comment/unit/','119266ipDdze','type','comments','/delete','requireSession','@univerjs/thread-comment-ui','/solved','_threadCommentDataSource','CustomRangeType','/list','getComment','400HDLnaA','pipe','defineProperty','getMemberID','slice','YYYY/MM/DD\x20HH:mm','post','UniverThreadCommentDataSourcePlugin','OpenOrReOpen','ThreadCommentModel','_config','UserManagerService','get','2663500YoKYYj','body','Inject','@univerjs/core','forEach','Add','values','replyId','@univerjs/network','stringify','setConfig','personId','/add','users','solved','14MyZQxx','DependentOn','_sessionService','saveCommentToSnapshot','payload','Plugin','IConfigService','160544mKpHeB','add','HTTPService','dayjs','root','_initUserSync','commentUpdate$','rxjs','2567585lTBYJA','@univerjs-pro/collaboration-client','userId','Delete','Unknown','user','customRanges','UNRECOGNIZED'];_0x3479=function(){return _0x400f3e;};return _0x3479();}const b=require(_0x3e99ac(0x196)),T=require(_0x3e99ac(0x1ae)),c=require(_0x3e99ac(0x1fa)),j=require(_0x3e99ac(0x1e4)),M=require('@univerjs/thread-comment'),w=require(_0x3e99ac(0x194)),P=require(_0x3e99ac(0x1ff)),U=_0x3e99ac(0x1c6);var I=(_0x7aff8b=>(_0x7aff8b[_0x7aff8b[_0x3e99ac(0x1f2)]=0x0]='OpenOrReOpen',_0x7aff8b[_0x7aff8b[_0x3e99ac(0x1d4)]=0x1]=_0x3e99ac(0x1d4),_0x7aff8b[_0x7aff8b[_0x3e99ac(0x19c)]=-0x1]=_0x3e99ac(0x19c),_0x7aff8b))(I||{}),v=(_0x5ccfdc=>(_0x5ccfdc[_0x5ccfdc[_0x3e99ac(0x199)]=0x0]=_0x3e99ac(0x199),_0x5ccfdc[_0x5ccfdc['Add']=0x1]=_0x3e99ac(0x1fc),_0x5ccfdc[_0x5ccfdc[_0x3e99ac(0x1c4)]=0x2]=_0x3e99ac(0x1c4),_0x5ccfdc[_0x5ccfdc['Edit']=0x3]=_0x3e99ac(0x1b1),_0x5ccfdc[_0x5ccfdc['Delete']=0x4]=_0x3e99ac(0x198),_0x5ccfdc[_0x5ccfdc['Solve']=0x5]=_0x3e99ac(0x1d2),_0x5ccfdc[_0x5ccfdc['UNRECOGNIZED']=-0x1]=_0x3e99ac(0x19c),_0x5ccfdc))(v||{});const f=_0x130f22=>c[_0x3e99ac(0x210)](new Date(+_0x130f22))['format'](_0x3e99ac(0x1ef)),R=async(_0x4b8041,_0x2c0e63)=>{const _0x475908=_0x3e99ac,_0x3e504d=_0x4b8041[_0x475908(0x1f6)](c['UserManagerService']),_0x4e0cdd=_0x4b8041[_0x475908(0x1f6)](P[_0x475908(0x20f)]);_0x2c0e63[_0x475908(0x1fb)](_0x4fa1f0=>{const _0x19f127=_0x475908;_0x3e504d[_0x19f127(0x1d3)](_0x4fa1f0)&&_0x2c0e63[_0x19f127(0x1a2)](_0x4fa1f0);}),_0x2c0e63['size']&&(await _0x4e0cdd['get'](_0x475908(0x1d5),{'params':{'userIDs':[..._0x2c0e63]}}))[_0x475908(0x1f8)][_0x475908(0x204)][_0x475908(0x1fb)](_0x3f6dac=>{const _0xfa75fa=_0x475908;_0x3f6dac&&_0x3e504d[_0xfa75fa(0x19f)](_0x3f6dac);});};var $=Object[_0x3e99ac(0x1a7)],E=(_0x490271,_0x3f6817,_0x2e268e,_0x2bf3a2)=>{const _0x158ceb=_0x3e99ac;for(var _0x316013=_0x2bf3a2>0x1?void 0x0:_0x2bf3a2?$(_0x3f6817,_0x2e268e):_0x3f6817,_0x2199ce=_0x490271[_0x158ceb(0x1d7)]-0x1,_0x106f5d;_0x2199ce>=0x0;_0x2199ce--)(_0x106f5d=_0x490271[_0x2199ce])&&(_0x316013=_0x106f5d(_0x316013)||_0x316013);return _0x316013;},S=(_0x2e07d4,_0x542765)=>(_0x52fbb9,_0x549d85)=>_0x542765(_0x52fbb9,_0x549d85,_0x2e07d4);let p=class extends c[_0x3e99ac(0x1b6)]{constructor(_0x2aeec6,_0x1245f7,_0x24549c,_0x1673a5){const _0x38e031=_0x3e99ac;super(),this[_0x38e031(0x1d9)]=_0x2aeec6,this[_0x38e031(0x1b4)]=_0x1245f7,this['_userService']=_0x24549c,this[_0x38e031(0x1a9)]=_0x1673a5,this[_0x38e031(0x1d1)](),this['_initUserSync']();}[_0x3e99ac(0x192)](){const _0x38ae33=_0x3e99ac;this['disposeWithMe'](this[_0x38ae33(0x1b4)][_0x38ae33(0x193)][_0x38ae33(0x1eb)](w[_0x38ae33(0x1c1)](0x10))[_0x38ae33(0x1d6)](_0x332658=>{const _0x20973a=_0x38ae33,_0x447637=new Set();_0x332658[_0x20973a(0x1fb)](_0x45754e=>{const _0x38998d=_0x20973a;switch(_0x45754e['type']){case'add':{const _0x20a548=_0x45754e[_0x38998d(0x20a)][_0x38998d(0x202)];_0x447637[_0x38998d(0x20e)](_0x20a548);break;}}}),R(this[_0x20973a(0x1a9)],_0x447637);}));}[_0x3e99ac(0x1d1)](){const _0x3ac877=_0x3e99ac;this[_0x3ac877(0x1a4)](this[_0x3ac877(0x1d9)][_0x3ac877(0x193)][_0x3ac877(0x1d6)](async _0x8a55e2=>{const _0x2ec6e8=_0x3ac877;var _0x37a153,_0x4e6c8f,_0x43db3c,_0x4323b2;const _0x4161c7=(_0x37a153=this['_threadCommentModel'][_0x2ec6e8(0x19d)](_0x8a55e2[_0x2ec6e8(0x1cb)])[_0x2ec6e8(0x1dc)](_0x1b0379=>_0x1b0379[_0x2ec6e8(0x1bc)]===_0x8a55e2[_0x2ec6e8(0x1bc)]))==null?void 0x0:_0x37a153[_0x2ec6e8(0x211)];if(!_0x4161c7)return;const {unitId:_0x41e4b8,subUnitId:_0x2680b8}=_0x4161c7;switch(_0x8a55e2[_0x2ec6e8(0x19a)]&&this['_userService'][_0x2ec6e8(0x19f)](_0x8a55e2[_0x2ec6e8(0x19a)]),_0x8a55e2['type']){case v[_0x2ec6e8(0x1fc)]:break;case v[_0x2ec6e8(0x1c4)]:{this[_0x2ec6e8(0x1b4)][_0x2ec6e8(0x1b5)](_0x41e4b8,_0x2680b8,{'unitId':_0x41e4b8,'subUnitId':_0x2680b8,'ref':'','id':_0x8a55e2['replyId'],'dT':f(+_0x8a55e2[_0x2ec6e8(0x1ac)]),'threadId':_0x8a55e2[_0x2ec6e8(0x1bc)],'personId':(_0x43db3c=(_0x4e6c8f=_0x8a55e2['user'])==null?void 0x0:_0x4e6c8f[_0x2ec6e8(0x1cc)])!=null?_0x43db3c:_0x8a55e2[_0x2ec6e8(0x197)],'text':JSON[_0x2ec6e8(0x1bb)](_0x8a55e2['content']),'parentId':_0x4161c7['id']});break;}case v[_0x2ec6e8(0x198)]:{const _0x51027b=this[_0x2ec6e8(0x1b4)][_0x2ec6e8(0x1e9)](_0x41e4b8,_0x2680b8,_0x8a55e2[_0x2ec6e8(0x1fe)]);_0x51027b&&_0x51027b['parentId']&&this['_threadCommentModel'][_0x2ec6e8(0x1ba)](_0x41e4b8,_0x2680b8,_0x8a55e2[_0x2ec6e8(0x1fe)]);break;}case v['Edit']:{this[_0x2ec6e8(0x1b4)][_0x2ec6e8(0x1be)](_0x41e4b8,_0x2680b8,{'commentId':_0x8a55e2['replyId'],'text':JSON[_0x2ec6e8(0x1bb)](_0x8a55e2[_0x2ec6e8(0x1a1)])});break;}case v[_0x2ec6e8(0x1d2)]:{const _0x58b8d2=(_0x4323b2=this[_0x2ec6e8(0x1b4)][_0x2ec6e8(0x19d)](_0x8a55e2['unitId'])[_0x2ec6e8(0x1dc)](_0x3657a1=>_0x3657a1[_0x2ec6e8(0x1bc)]===_0x8a55e2[_0x2ec6e8(0x1bc)]))==null?void 0x0:_0x4323b2[_0x2ec6e8(0x211)];_0x58b8d2&&this[_0x2ec6e8(0x1b4)]['resolveComment'](_0x41e4b8,_0x2680b8,_0x58b8d2['id'],_0x8a55e2[_0x2ec6e8(0x205)]===I[_0x2ec6e8(0x1d4)]);break;}}}));}};p=E([S(0x0,c[_0x3e99ac(0x1f9)](b['CommentService'])),S(0x1,c[_0x3e99ac(0x1f9)](M[_0x3e99ac(0x1f3)])),S(0x2,c[_0x3e99ac(0x1f9)](c[_0x3e99ac(0x1f5)])),S(0x3,c['Inject'](c[_0x3e99ac(0x1ad)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x3e99ac(0x1a7)],x=(_0x407bd4,_0x376c05,_0x595045,_0x154383)=>{const _0x1d5848=_0x3e99ac;for(var _0x4fb9f1=_0x154383>0x1?void 0x0:_0x154383?A(_0x376c05,_0x595045):_0x376c05,_0x2f1113=_0x407bd4[_0x1d5848(0x1d7)]-0x1,_0x115f19;_0x2f1113>=0x0;_0x2f1113--)(_0x115f19=_0x407bd4[_0x2f1113])&&(_0x4fb9f1=_0x115f19(_0x4fb9f1)||_0x4fb9f1);return _0x4fb9f1;},_=(_0x45586c,_0x549799)=>(_0x2fe0e0,_0x164d8a)=>_0x549799(_0x2fe0e0,_0x164d8a,_0x45586c);function Y(_0x47d2c7,_0x95dedb){const _0x3f2857=_0x3e99ac,_0x44885a=_0x47d2c7[_0x3f2857(0x1a6)][0x0];return{..._0x95dedb,'id':_0x44885a['replyId'],'resolved':_0x47d2c7[_0x3f2857(0x205)]===0x1,'dT':f(_0x44885a[_0x3f2857(0x1ac)]),'personId':_0x44885a[_0x3f2857(0x197)],'threadId':_0x44885a[_0x3f2857(0x1bc)]};}function G(_0x496aed,_0x49e7b8,_0x57a7a6){const _0x13bd94=_0x3e99ac;var _0x1a5c8e,_0x541037;if(((_0x541037=(_0x1a5c8e=_0x496aed==null?void 0x0:_0x496aed[_0x13bd94(0x1a6)])==null?void 0x0:_0x1a5c8e['length'])!=null?_0x541037:0x0)>0x0){const _0x4dc0ef=(_0x568da2,_0x195b07)=>({'id':_0x568da2[_0x13bd94(0x1fe)],'threadId':_0x568da2[_0x13bd94(0x1bc)],'dT':f(_0x568da2[_0x13bd94(0x1ac)]),'personId':_0x568da2[_0x13bd94(0x197)],'resolved':_0x496aed[_0x13bd94(0x205)]===I[_0x13bd94(0x1d4)],'unitId':_0x49e7b8,'subUnitId':_0x57a7a6,'text':JSON[_0x13bd94(0x1bb)](_0x568da2[_0x13bd94(0x1a1)]),'parentId':_0x195b07}),_0x4517da=_0x4dc0ef(_0x496aed[_0x13bd94(0x1a6)][0x0]);return{..._0x4517da,'children':_0x496aed[_0x13bd94(0x1a6)][_0x13bd94(0x1ee)](0x1)['map'](_0x429361=>_0x4dc0ef(_0x429361,_0x4517da['id']))};}return null;}let g=class{constructor(_0xfd5b7,_0x4485b9,_0x59f479,_0x36ce5c){const _0x5b04bd=_0x3e99ac;this[_0x5b04bd(0x1b7)]=_0xfd5b7,this[_0x5b04bd(0x1ab)]=_0x4485b9,this['_sessionService']=_0x59f479,this[_0x5b04bd(0x1a9)]=_0x36ce5c;}async[_0x3e99ac(0x1b5)](_0x46a13b){const _0x394d08=_0x3e99ac;var _0x3d2e7a,_0x49919e;const {parentId:_0x10042b,unitId:_0x55f522,text:_0x1dfad6,threadId:_0x4af542}=_0x46a13b,_0x12d5a4=(_0x49919e=(_0x3d2e7a=_0x1dfad6[_0x394d08(0x19b)])==null?void 0x0:_0x3d2e7a[_0x394d08(0x1b3)](_0x41fa2d=>_0x41fa2d[_0x394d08(0x1ce)]===c[_0x394d08(0x1e7)][_0x394d08(0x1b2)])[_0x394d08(0x1aa)](_0x39d4f8=>_0x39d4f8[_0x394d08(0x1b0)]))!=null?_0x49919e:[],_0x15d083=JSON[_0x394d08(0x200)](_0x1dfad6),_0x4cbd86=(await this[_0x394d08(0x208)]['requireSession'](_0x55f522))[_0x394d08(0x1ed)]();if(_0x10042b){const _0xaf4d3e={'memberId':_0x4cbd86,'unitId':_0x55f522,'content':_0x15d083,'mention':_0x12d5a4,'threadId':_0x4af542},_0x2ed464=(await this[_0x394d08(0x1b7)][_0x394d08(0x1f0)](_0x394d08(0x1de)+_0x55f522+_0x394d08(0x1d0),{'body':_0xaf4d3e}))['body']['reply'];return{..._0x46a13b,'id':_0x2ed464['replyId'],'dT':c[_0x394d08(0x210)](+_0x2ed464[_0x394d08(0x1ac)])[_0x394d08(0x1a8)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2ed464['userId']};}else{const _0x2e9819={'memberId':_0x4cbd86,'unitId':_0x55f522,'content':_0x15d083,'mention':_0x12d5a4},_0x1bcb60=await this[_0x394d08(0x1b7)][_0x394d08(0x1f0)](_0x394d08(0x1de)+_0x55f522+_0x394d08(0x203),{'body':_0x2e9819});return Y(_0x1bcb60[_0x394d08(0x1f8)]['comment'],_0x46a13b);}}async[_0x3e99ac(0x1be)](_0x382533){const _0x20c615=_0x3e99ac;var _0x26d1d5,_0x3fcc45;const {text:_0x41e8c6,unitId:_0x4c2da0}=_0x382533,_0x4e43fa=(_0x3fcc45=(_0x26d1d5=_0x41e8c6[_0x20c615(0x19b)])==null?void 0x0:_0x26d1d5[_0x20c615(0x1b3)](_0x41134b=>_0x41134b[_0x20c615(0x1ce)]===c[_0x20c615(0x1e7)][_0x20c615(0x1b2)])[_0x20c615(0x1aa)](_0x25fa80=>_0x25fa80[_0x20c615(0x1b0)]))!=null?_0x3fcc45:[],_0xee8e3b=JSON[_0x20c615(0x200)](_0x41e8c6),_0x462c55=_0x382533[_0x20c615(0x1bc)],_0x25d75d=_0x382533['id'],_0x19ec82={'memberId':(await this['_sessionService'][_0x20c615(0x1e3)](_0x4c2da0))[_0x20c615(0x1ed)](),'unitId':_0x4c2da0,'threadId':_0x462c55,'mention':_0x4e43fa,'content':_0xee8e3b,'replyId':_0x25d75d},_0xcb6526=await this['_httpService'][_0x20c615(0x1f0)](_0x20c615(0x1de)+_0x4c2da0+'/edit',{'body':_0x19ec82});return!_0xcb6526[_0x20c615(0x1f8)]['error']||_0xcb6526['body']['error']['code']===0x1;}async[_0x3e99ac(0x1cd)](_0x13248a){const _0x5a8393=_0x3e99ac,{unitId:_0x4e6f48}=_0x13248a,_0x5ae5da=_0x13248a['threadId'],_0x91c80d={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x4e6f48,'threadId':_0x5ae5da,'solved':_0x13248a[_0x5a8393(0x1af)]?I[_0x5a8393(0x1d4)]:I[_0x5a8393(0x1f2)]},_0x22227e=await this['_httpService']['post'](_0x5a8393(0x1de)+_0x4e6f48+_0x5a8393(0x1e5),{'body':_0x91c80d});return!_0x22227e[_0x5a8393(0x1f8)]['error']||_0x22227e[_0x5a8393(0x1f8)][_0x5a8393(0x1bf)]['code']===0x1;}async[_0x3e99ac(0x1ba)](_0x22c8dc,_0xb4ae05,_0x19bcf3,_0x4b6055){const _0xa8ed6d=_0x3e99ac,_0x53a59e={'memberId':(await this['_sessionService'][_0xa8ed6d(0x1e3)](_0x22c8dc))[_0xa8ed6d(0x1ed)](),'threadId':_0x19bcf3,'replyId':_0x4b6055,'unitId':_0x22c8dc},_0x2412b3=await this['_httpService'][_0xa8ed6d(0x1f0)](_0xa8ed6d(0x1de)+_0x22c8dc+_0xa8ed6d(0x1e2),{'body':_0x53a59e});return!_0x2412b3[_0xa8ed6d(0x1f8)][_0xa8ed6d(0x1bf)]||_0x2412b3[_0xa8ed6d(0x1f8)][_0xa8ed6d(0x1bf)]['code']===0x1;}async['listComments'](_0x457612,_0x300d75,_0x2551ef){const _0x1629d5=_0x3e99ac,_0x4acad0={'unitId':_0x457612,'threadId':_0x2551ef},_0x1a549c=await this['_httpService'][_0x1629d5(0x1f0)](_0x1629d5(0x1de)+_0x457612+_0x1629d5(0x1e8),{'body':_0x4acad0}),_0x12273b=_0x2551ef[_0x1629d5(0x1aa)](_0x10e305=>G(_0x1a549c[_0x1629d5(0x1f8)][_0x1629d5(0x1e1)][_0x10e305],_0x457612,_0x300d75))[_0x1629d5(0x1b3)](Boolean);return Object[_0x1629d5(0x1fd)](_0x1a549c[_0x1629d5(0x1f8)][_0x1629d5(0x204)])[_0x1629d5(0x1fb)](_0x25c57d=>{const _0xfad100=_0x1629d5;this[_0xfad100(0x1ab)][_0xfad100(0x19f)](_0x25c57d);}),_0x12273b;}[_0x3e99ac(0x209)](_0x2e2300){const _0x1c8168=_0x3e99ac;return{'id':_0x2e2300['id'],'threadId':_0x2e2300['threadId'],'ref':_0x2e2300[_0x1c8168(0x1ca)]};}};g=x([_(0x0,c[_0x3e99ac(0x1f9)](P['HTTPService'])),_(0x1,c[_0x3e99ac(0x1f9)](c[_0x3e99ac(0x1f5)])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c[_0x3e99ac(0x1f9)](c[_0x3e99ac(0x1ad)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xd27d7e,_0x41e820,_0x291afc,_0x10f4c1)=>{const _0x3be7df=_0x3e99ac;for(var _0x56bc68=_0x10f4c1>0x1?void 0x0:_0x10f4c1?H(_0x41e820,_0x291afc):_0x41e820,_0xffd779=_0xd27d7e[_0x3be7df(0x1d7)]-0x1,_0x5a6d36;_0xffd779>=0x0;_0xffd779--)(_0x5a6d36=_0xd27d7e[_0xffd779])&&(_0x56bc68=_0x5a6d36(_0x56bc68)||_0x56bc68);return _0x56bc68;},y=(_0x1f6ad8,_0x151779)=>(_0x4fa0bb,_0x29803a)=>_0x151779(_0x4fa0bb,_0x29803a,_0x1f6ad8);let C=class extends c[_0x3e99ac(0x1b6)]{constructor(_0x43a5b9,_0x21d355){const _0x52d28d=_0x3e99ac;super(),this[_0x52d28d(0x1b9)]=_0x43a5b9,this[_0x52d28d(0x1e6)]=_0x21d355,this[_0x52d28d(0x1b8)]();}[_0x3e99ac(0x1b8)](){const _0x2c91bf=_0x3e99ac;this[_0x2c91bf(0x1b9)]['dataSource']=this[_0x2c91bf(0x1e6)],this[_0x2c91bf(0x1b9)][_0x2c91bf(0x1c9)]=!0x1;}};C=J([y(0x0,M[_0x3e99ac(0x1a0)]),y(0x1,c[_0x3e99ac(0x1f9)](g))],C);function _0x815b(_0xe63794,_0xec31f1){const _0x347926=_0x3479();return _0x815b=function(_0x815bb2,_0x467e2e){_0x815bb2=_0x815bb2-0x192;let _0x5a4faf=_0x347926[_0x815bb2];return _0x5a4faf;},_0x815b(_0xe63794,_0xec31f1);}var F=Object[_0x3e99ac(0x1ec)],L=Object[_0x3e99ac(0x1a7)],Z=(_0x3aa78c,_0xc5e39c,_0x3a4c41)=>_0xc5e39c in _0x3aa78c?F(_0x3aa78c,_0xc5e39c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a4c41}):_0x3aa78c[_0xc5e39c]=_0x3a4c41,W=(_0x56bab5,_0x5790e0,_0x3f0f80,_0x39110b)=>{const _0x459678=_0x3e99ac;for(var _0x57f105=_0x39110b>0x1?void 0x0:_0x39110b?L(_0x5790e0,_0x3f0f80):_0x5790e0,_0x5e6675=_0x56bab5[_0x459678(0x1d7)]-0x1,_0x31e38b;_0x5e6675>=0x0;_0x5e6675--)(_0x31e38b=_0x56bab5[_0x5e6675])&&(_0x57f105=_0x31e38b(_0x57f105)||_0x57f105);return _0x57f105;},O=(_0x1ba298,_0x4d9931)=>(_0xe34d7,_0x24b44e)=>_0x4d9931(_0xe34d7,_0x24b44e,_0x1ba298),N=(_0x55d98e,_0x193591,_0x49b4ba)=>Z(_0x55d98e,typeof _0x193591!='symbol'?_0x193591+'':_0x193591,_0x49b4ba);exports[_0x3e99ac(0x1f1)]=class extends c[_0x3e99ac(0x20b)]{constructor(_0x351d2c=D,_0x259ca0,_0x1f5890){const _0x1b341f=_0x3e99ac;super(),this[_0x1b341f(0x1f4)]=_0x351d2c,this[_0x1b341f(0x1a9)]=_0x259ca0,this['_configService']=_0x1f5890;const {..._0x34a8af}=c['merge']({},D,this['_config']);this['_configService'][_0x1b341f(0x201)](q,_0x34a8af);}[_0x3e99ac(0x1c8)](){const _0x511451=_0x3e99ac;[[g],[C],[p]][_0x511451(0x1fb)](_0x5a8df6=>{const _0x1a3378=_0x511451;this[_0x1a3378(0x1a9)][_0x1a3378(0x20e)](_0x5a8df6);});}[_0x3e99ac(0x1db)](){const _0x2becb5=_0x3e99ac;this[_0x2becb5(0x1a9)][_0x2becb5(0x1f6)](C),this[_0x2becb5(0x1a9)]['get'](p);}},N(exports[_0x3e99ac(0x1f1)],'pluginName',U),N(exports[_0x3e99ac(0x1f1)],_0x3e99ac(0x1e0),c[_0x3e99ac(0x19e)][_0x3e99ac(0x1c0)]),exports[_0x3e99ac(0x1f1)]=W([c[_0x3e99ac(0x207)](j[_0x3e99ac(0x1c2)],b[_0x3e99ac(0x1da)],T[_0x3e99ac(0x1bd)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x3e99ac(0x20c)])],exports[_0x3e99ac(0x1f1)]);
|
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 _0x3cac96=_0x4130;(function(_0x3338bc,_0x4e9786){const _0x45f60a=_0x4130,_0x131e88=_0x3338bc();while(!![]){try{const _0x585a85=-parseInt(_0x45f60a(0x177))/0x1*(parseInt(_0x45f60a(0x167))/0x2)+parseInt(_0x45f60a(0x199))/0x3*(-parseInt(_0x45f60a(0x16d))/0x4)+-parseInt(_0x45f60a(0x197))/0x5+parseInt(_0x45f60a(0x178))/0x6+-parseInt(_0x45f60a(0x1a6))/0x7*(parseInt(_0x45f60a(0x161))/0x8)+-parseInt(_0x45f60a(0x17c))/0x9+parseInt(_0x45f60a(0x196))/0xa;if(_0x585a85===_0x4e9786)break;else _0x131e88['push'](_0x131e88['shift']());}catch(_0x3934d4){_0x131e88['push'](_0x131e88['shift']());}}}(_0x2eb3,0xd6c5e));import{CommentService as _0x340a23,CollaborationSessionService as _0x17d1c9,UniverCollaborationClientPlugin as _0x193564}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51f241}from'@univerjs-pro/license';function _0x2eb3(){const _0x12038d=['delete','_config','parse','37769360AgysLb','2061415xKOGJY','userId','6tfGUhQ','Solve','addUser','users','_threadCommentDataSourceService','content','updateComment','body','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','/universer-api/comment/unit/','pipe','add','7MNYCEp','code','Solved','threadId','/edit','requireSession','format','getComment','Add','_commentService','_threadCommentDataSource','commentUpdate$','_initUserSync','payload','_configService','/universer-api/user/list','getOwnPropertyDescriptor','_threadCommentModel','rangeType','post','_initDataSource','resolved','resolveComment','root','Unknown','Reply','thread-comment-data-source.config','find','_init','OpenOrReOpen','forEach','12524384wEANbe','stringify','setConfig','getMemberID','disposeWithMe','syncUpdateMutationToColla','1115858sHIfFg','addComment','user','_userService','reply','_httpService','2347196HQBgDk','filter','deleteComment','UNRECOGNIZED','/delete','size','Delete','saveCommentToSnapshot','customRanges','unitId','1vHDuwD','7569138UjdtiP','listComments','subscribe','error','4044519OlbgFf','length','ref','get','rangeId','replies','type','comment','UNIVER_UNKNOWN','replyId','onStarting','COMMENT','map','personId','_sessionService','_injector','userID','createTimestamp','solved','onReady','dataSource','getUser','parentId'];_0x2eb3=function(){return _0x12038d;};return _0x2eb3();}import{dayjs as _0x2b26c9,UserManagerService as _0x52a82c,Inject as _0x569163,Injector as _0x4ea2ae,Disposable as _0x1cd6bf,CustomRangeType as _0x4714d7,UniverInstanceType as _0xb368d6,DependentOn as _0x5a44e5,IConfigService as _0x32feb7,Plugin as _0x41b1ca,merge as _0x175110}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29a324}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2adaec,IThreadCommentDataSourceService as _0x285f19}from'@univerjs/thread-comment';import{bufferTime as _0x23ed52}from'rxjs';import{HTTPService as _0x4348c0}from'@univerjs/network';const W=_0x3cac96(0x1a1);var I=(_0x28fa3a=>(_0x28fa3a[_0x28fa3a['OpenOrReOpen']=0x0]=_0x3cac96(0x15f),_0x28fa3a[_0x28fa3a[_0x3cac96(0x1a8)]=0x1]=_0x3cac96(0x1a8),_0x28fa3a[_0x28fa3a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x28fa3a))(I||{}),v=(_0x46c197=>(_0x46c197[_0x46c197[_0x3cac96(0x1be)]=0x0]=_0x3cac96(0x1be),_0x46c197[_0x46c197['Add']=0x1]=_0x3cac96(0x1ae),_0x46c197[_0x46c197[_0x3cac96(0x15b)]=0x2]='Reply',_0x46c197[_0x46c197['Edit']=0x3]='Edit',_0x46c197[_0x46c197[_0x3cac96(0x173)]=0x4]=_0x3cac96(0x173),_0x46c197[_0x46c197[_0x3cac96(0x19a)]=0x5]='Solve',_0x46c197[_0x46c197[_0x3cac96(0x170)]=-0x1]=_0x3cac96(0x170),_0x46c197))(v||{});const D=_0x150173=>_0x2b26c9(new Date(+_0x150173))[_0x3cac96(0x1ac)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2b2f9d,_0x52b104)=>{const _0x295be4=_0x3cac96,_0x1e09ed=_0x2b2f9d[_0x295be4(0x17f)](_0x52a82c),_0x38d1f4=_0x2b2f9d[_0x295be4(0x17f)](_0x4348c0);_0x52b104['forEach'](_0x2e9da6=>{const _0x50b583=_0x295be4;_0x1e09ed[_0x50b583(0x191)](_0x2e9da6)&&_0x52b104[_0x50b583(0x193)](_0x2e9da6);}),_0x52b104[_0x295be4(0x172)]&&(await _0x38d1f4[_0x295be4(0x17f)](_0x295be4(0x1b5),{'params':{'userIDs':[..._0x52b104]}}))[_0x295be4(0x1a0)][_0x295be4(0x19c)][_0x295be4(0x160)](_0x16f488=>{const _0x5480f7=_0x295be4;_0x16f488&&_0x1e09ed[_0x5480f7(0x19b)](_0x16f488);});};var K=Object[_0x3cac96(0x1b6)],V=(_0x5d155b,_0x21af45,_0x20c07f,_0x427d17)=>{const _0x12cb7c=_0x3cac96;for(var _0xa717dc=_0x427d17>0x1?void 0x0:_0x427d17?K(_0x21af45,_0x20c07f):_0x21af45,_0x38d8bf=_0x5d155b[_0x12cb7c(0x17d)]-0x1,_0x3d580a;_0x38d8bf>=0x0;_0x38d8bf--)(_0x3d580a=_0x5d155b[_0x38d8bf])&&(_0xa717dc=_0x3d580a(_0xa717dc)||_0xa717dc);return _0xa717dc;},p=(_0xb41d55,_0x1a9db6)=>(_0x23f2e0,_0x1caa0a)=>_0x1a9db6(_0x23f2e0,_0x1caa0a,_0xb41d55);let S=class extends _0x1cd6bf{constructor(_0x9ee977,_0x1d448d,_0x43985a,_0x210f1f){const _0x3e0fb8=_0x3cac96;super(),this[_0x3e0fb8(0x1af)]=_0x9ee977,this['_threadCommentModel']=_0x1d448d,this[_0x3e0fb8(0x16a)]=_0x43985a,this[_0x3e0fb8(0x18b)]=_0x210f1f,this['_init'](),this['_initUserSync']();}[_0x3cac96(0x1b2)](){const _0x3bae03=_0x3cac96;this['disposeWithMe'](this[_0x3bae03(0x1b7)][_0x3bae03(0x1b1)][_0x3bae03(0x1a4)](_0x23ed52(0x10))['subscribe'](_0x54aa1f=>{const _0x6bf67=_0x3bae03,_0x3bf1f1=new Set();_0x54aa1f[_0x6bf67(0x160)](_0x5a1bda=>{const _0x25a93a=_0x6bf67;switch(_0x5a1bda[_0x25a93a(0x182)]){case _0x25a93a(0x1a5):{const _0x1c1666=_0x5a1bda[_0x25a93a(0x1b3)][_0x25a93a(0x189)];_0x3bf1f1['add'](_0x1c1666);break;}}}),B(this['_injector'],_0x3bf1f1);}));}[_0x3cac96(0x15e)](){const _0x2a4862=_0x3cac96;this[_0x2a4862(0x165)](this[_0x2a4862(0x1af)][_0x2a4862(0x1b1)][_0x2a4862(0x17a)](async _0x25627d=>{const _0x426001=_0x2a4862;var _0x3d57e1,_0xb88938,_0x4d08d7,_0x1ce73f;const _0x3ce264=(_0x3d57e1=this[_0x426001(0x1b7)][_0x426001(0x1a2)](_0x25627d[_0x426001(0x176)])['find'](_0x4d75ef=>_0x4d75ef['threadId']===_0x25627d[_0x426001(0x1a9)]))==null?void 0x0:_0x3d57e1[_0x426001(0x1bd)];if(!_0x3ce264)return;const {unitId:_0x106381,subUnitId:_0x4c221e}=_0x3ce264;switch(_0x25627d[_0x426001(0x169)]&&this[_0x426001(0x16a)]['addUser'](_0x25627d[_0x426001(0x169)]),_0x25627d['type']){case v['Add']:break;case v['Reply']:{this[_0x426001(0x1b7)][_0x426001(0x168)](_0x106381,_0x4c221e,{'unitId':_0x106381,'subUnitId':_0x4c221e,'ref':'','id':_0x25627d['replyId'],'dT':D(+_0x25627d[_0x426001(0x18d)]),'threadId':_0x25627d['threadId'],'personId':(_0x4d08d7=(_0xb88938=_0x25627d[_0x426001(0x169)])==null?void 0x0:_0xb88938['userID'])!=null?_0x4d08d7:_0x25627d[_0x426001(0x198)],'text':JSON[_0x426001(0x195)](_0x25627d['content']),'parentId':_0x3ce264['id']});break;}case v['Delete']:{const _0x4fef38=this[_0x426001(0x1b7)][_0x426001(0x1ad)](_0x106381,_0x4c221e,_0x25627d['replyId']);_0x4fef38&&_0x4fef38[_0x426001(0x192)]&&this[_0x426001(0x1b7)][_0x426001(0x16f)](_0x106381,_0x4c221e,_0x25627d[_0x426001(0x185)]);break;}case v['Edit']:{this[_0x426001(0x1b7)][_0x426001(0x19f)](_0x106381,_0x4c221e,{'commentId':_0x25627d['replyId'],'text':JSON[_0x426001(0x195)](_0x25627d[_0x426001(0x19e)])});break;}case v[_0x426001(0x19a)]:{const _0x5094f8=(_0x1ce73f=this[_0x426001(0x1b7)]['getUnit'](_0x25627d[_0x426001(0x176)])[_0x426001(0x15d)](_0x1f2907=>_0x1f2907[_0x426001(0x1a9)]===_0x25627d[_0x426001(0x1a9)]))==null?void 0x0:_0x1ce73f[_0x426001(0x1bd)];_0x5094f8&&this['_threadCommentModel'][_0x426001(0x1bc)](_0x106381,_0x4c221e,_0x5094f8['id'],_0x25627d['solved']===I[_0x426001(0x1a8)]);break;}}}));}};S=V([p(0x0,_0x569163(_0x340a23)),p(0x1,_0x569163(_0x2adaec)),p(0x2,_0x569163(_0x52a82c)),p(0x3,_0x569163(_0x4ea2ae))],S);const z=_0x3cac96(0x15c),M={};var k=Object[_0x3cac96(0x1b6)],Q=(_0x3180ca,_0x1fac97,_0x24d25f,_0x4b96a7)=>{const _0x229d7b=_0x3cac96;for(var _0x1a05fa=_0x4b96a7>0x1?void 0x0:_0x4b96a7?k(_0x1fac97,_0x24d25f):_0x1fac97,_0x2158f8=_0x3180ca[_0x229d7b(0x17d)]-0x1,_0x5e6a04;_0x2158f8>=0x0;_0x2158f8--)(_0x5e6a04=_0x3180ca[_0x2158f8])&&(_0x1a05fa=_0x5e6a04(_0x1a05fa)||_0x1a05fa);return _0x1a05fa;},_=(_0x57a73a,_0x420933)=>(_0x307be6,_0x125d5d)=>_0x420933(_0x307be6,_0x125d5d,_0x57a73a);function X(_0x12c581,_0x3bbb96){const _0x73d444=_0x3cac96,_0x36b7f7=_0x12c581[_0x73d444(0x181)][0x0];return{..._0x3bbb96,'id':_0x36b7f7[_0x73d444(0x185)],'resolved':_0x12c581['solved']===0x1,'dT':D(_0x36b7f7[_0x73d444(0x18d)]),'personId':_0x36b7f7[_0x73d444(0x198)],'threadId':_0x36b7f7[_0x73d444(0x1a9)]};}function ee(_0x26a120,_0x50a3f2,_0x12363a){const _0x288413=_0x3cac96;var _0x519d41,_0x469531;if(((_0x469531=(_0x519d41=_0x26a120==null?void 0x0:_0x26a120['replies'])==null?void 0x0:_0x519d41['length'])!=null?_0x469531:0x0)>0x0){const _0x15c40f=(_0x1334c2,_0x37590b)=>({'id':_0x1334c2['replyId'],'threadId':_0x1334c2['threadId'],'dT':D(_0x1334c2[_0x288413(0x18d)]),'personId':_0x1334c2['userId'],'resolved':_0x26a120[_0x288413(0x18e)]===I[_0x288413(0x1a8)],'unitId':_0x50a3f2,'subUnitId':_0x12363a,'text':JSON[_0x288413(0x195)](_0x1334c2[_0x288413(0x19e)]),'parentId':_0x37590b}),_0x51f2bd=_0x15c40f(_0x26a120[_0x288413(0x181)][0x0]);return{..._0x51f2bd,'children':_0x26a120[_0x288413(0x181)]['slice'](0x1)['map'](_0x2842d0=>_0x15c40f(_0x2842d0,_0x51f2bd['id']))};}return null;}let f=class{constructor(_0x3e1689,_0xa95ba3,_0x594200,_0xdbda1d){const _0x25d419=_0x3cac96;this[_0x25d419(0x16c)]=_0x3e1689,this['_userService']=_0xa95ba3,this[_0x25d419(0x18a)]=_0x594200,this[_0x25d419(0x18b)]=_0xdbda1d;}async['addComment'](_0x547189){const _0x2dbb5a=_0x3cac96;var _0x20fd3e,_0x43f12c;const {parentId:_0x4cb3fc,unitId:_0x354212,text:_0x3c4ec8,threadId:_0x494029}=_0x547189,_0x1a0688=(_0x43f12c=(_0x20fd3e=_0x3c4ec8[_0x2dbb5a(0x175)])==null?void 0x0:_0x20fd3e[_0x2dbb5a(0x16e)](_0x347c98=>_0x347c98[_0x2dbb5a(0x1b8)]===_0x4714d7['COMMENT'])[_0x2dbb5a(0x188)](_0x322b8d=>_0x322b8d[_0x2dbb5a(0x180)]))!=null?_0x43f12c:[],_0x40a90c=JSON[_0x2dbb5a(0x162)](_0x3c4ec8),_0x2a2c10=(await this[_0x2dbb5a(0x18a)]['requireSession'](_0x354212))[_0x2dbb5a(0x164)]();if(_0x4cb3fc){const _0x12922e={'memberId':_0x2a2c10,'unitId':_0x354212,'content':_0x40a90c,'mention':_0x1a0688,'threadId':_0x494029},_0x177c5e=(await this[_0x2dbb5a(0x16c)][_0x2dbb5a(0x1b9)](_0x2dbb5a(0x1a3)+_0x354212+'/reply',{'body':_0x12922e}))[_0x2dbb5a(0x1a0)][_0x2dbb5a(0x16b)];return{..._0x547189,'id':_0x177c5e['replyId'],'dT':_0x2b26c9(+_0x177c5e[_0x2dbb5a(0x18d)])[_0x2dbb5a(0x1ac)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x177c5e['userId']};}else{const _0x1afc57={'memberId':_0x2a2c10,'unitId':_0x354212,'content':_0x40a90c,'mention':_0x1a0688},_0x41fd3a=await this[_0x2dbb5a(0x16c)][_0x2dbb5a(0x1b9)](_0x2dbb5a(0x1a3)+_0x354212+'/add',{'body':_0x1afc57});return X(_0x41fd3a[_0x2dbb5a(0x1a0)][_0x2dbb5a(0x183)],_0x547189);}}async['updateComment'](_0x184cd4){const _0x1e77ac=_0x3cac96;var _0x18fc32,_0x343e38;const {text:_0x14a536,unitId:_0x5db8b5}=_0x184cd4,_0x3f4520=(_0x343e38=(_0x18fc32=_0x14a536[_0x1e77ac(0x175)])==null?void 0x0:_0x18fc32[_0x1e77ac(0x16e)](_0x456224=>_0x456224[_0x1e77ac(0x1b8)]===_0x4714d7[_0x1e77ac(0x187)])[_0x1e77ac(0x188)](_0xdf3ec7=>_0xdf3ec7[_0x1e77ac(0x180)]))!=null?_0x343e38:[],_0x3a4c0d=JSON[_0x1e77ac(0x162)](_0x14a536),_0x1c0339=_0x184cd4[_0x1e77ac(0x1a9)],_0xf35ca=_0x184cd4['id'],_0x5a035b={'memberId':(await this[_0x1e77ac(0x18a)][_0x1e77ac(0x1ab)](_0x5db8b5))[_0x1e77ac(0x164)](),'unitId':_0x5db8b5,'threadId':_0x1c0339,'mention':_0x3f4520,'content':_0x3a4c0d,'replyId':_0xf35ca},_0x5796c6=await this['_httpService'][_0x1e77ac(0x1b9)](_0x1e77ac(0x1a3)+_0x5db8b5+_0x1e77ac(0x1aa),{'body':_0x5a035b});return!_0x5796c6[_0x1e77ac(0x1a0)]['error']||_0x5796c6['body'][_0x1e77ac(0x17b)][_0x1e77ac(0x1a7)]===0x1;}async[_0x3cac96(0x1bc)](_0x393820){const _0x708331=_0x3cac96,{unitId:_0x4bb250}=_0x393820,_0x83bee3=_0x393820['threadId'],_0x2c675d={'memberId':this[_0x708331(0x16a)]['getCurrentUser']()[_0x708331(0x18c)],'unitId':_0x4bb250,'threadId':_0x83bee3,'solved':_0x393820[_0x708331(0x1bb)]?I[_0x708331(0x1a8)]:I[_0x708331(0x15f)]},_0xe6df01=await this[_0x708331(0x16c)]['post']('/universer-api/comment/unit/'+_0x4bb250+'/solved',{'body':_0x2c675d});return!_0xe6df01[_0x708331(0x1a0)][_0x708331(0x17b)]||_0xe6df01[_0x708331(0x1a0)][_0x708331(0x17b)]['code']===0x1;}async[_0x3cac96(0x16f)](_0x214dff,_0x2de9b2,_0x313ed7,_0x228c38){const _0x59b401=_0x3cac96,_0x593e9c={'memberId':(await this[_0x59b401(0x18a)][_0x59b401(0x1ab)](_0x214dff))['getMemberID'](),'threadId':_0x313ed7,'replyId':_0x228c38,'unitId':_0x214dff},_0x1a4064=await this[_0x59b401(0x16c)][_0x59b401(0x1b9)](_0x59b401(0x1a3)+_0x214dff+_0x59b401(0x171),{'body':_0x593e9c});return!_0x1a4064['body'][_0x59b401(0x17b)]||_0x1a4064['body'][_0x59b401(0x17b)][_0x59b401(0x1a7)]===0x1;}async[_0x3cac96(0x179)](_0x203e73,_0x467baf,_0x1013d1){const _0x34fcd3=_0x3cac96,_0x5492fa={'unitId':_0x203e73,'threadId':_0x1013d1},_0x582d24=await this[_0x34fcd3(0x16c)][_0x34fcd3(0x1b9)](_0x34fcd3(0x1a3)+_0x203e73+'/list',{'body':_0x5492fa}),_0x40d8f1=_0x1013d1[_0x34fcd3(0x188)](_0x1b96f9=>ee(_0x582d24[_0x34fcd3(0x1a0)]['comments'][_0x1b96f9],_0x203e73,_0x467baf))[_0x34fcd3(0x16e)](Boolean);return Object['values'](_0x582d24[_0x34fcd3(0x1a0)][_0x34fcd3(0x19c)])[_0x34fcd3(0x160)](_0x306f0b=>{const _0x35f887=_0x34fcd3;this[_0x35f887(0x16a)][_0x35f887(0x19b)](_0x306f0b);}),_0x40d8f1;}[_0x3cac96(0x174)](_0x243160){const _0x4ab952=_0x3cac96;return{'id':_0x243160['id'],'threadId':_0x243160[_0x4ab952(0x1a9)],'ref':_0x243160[_0x4ab952(0x17e)]};}};f=Q([_(0x0,_0x569163(_0x4348c0)),_(0x1,_0x569163(_0x52a82c)),_(0x2,_0x569163(_0x17d1c9)),_(0x3,_0x569163(_0x4ea2ae))],f);var re=Object[_0x3cac96(0x1b6)],te=(_0x501340,_0x18b638,_0x52d2c5,_0x1d7b2b)=>{const _0x31b31d=_0x3cac96;for(var _0x478c69=_0x1d7b2b>0x1?void 0x0:_0x1d7b2b?re(_0x18b638,_0x52d2c5):_0x18b638,_0x322fcb=_0x501340[_0x31b31d(0x17d)]-0x1,_0x19311c;_0x322fcb>=0x0;_0x322fcb--)(_0x19311c=_0x501340[_0x322fcb])&&(_0x478c69=_0x19311c(_0x478c69)||_0x478c69);return _0x478c69;},N=(_0xff2a29,_0x49a385)=>(_0x110aa1,_0x17c8bb)=>_0x49a385(_0x110aa1,_0x17c8bb,_0xff2a29);let g=class extends _0x1cd6bf{constructor(_0x213f28,_0x4eeeab){const _0x46e38d=_0x3cac96;super(),this['_threadCommentDataSourceService']=_0x213f28,this['_threadCommentDataSource']=_0x4eeeab,this[_0x46e38d(0x1ba)]();}[_0x3cac96(0x1ba)](){const _0x3488d1=_0x3cac96;this[_0x3488d1(0x19d)][_0x3488d1(0x190)]=this[_0x3488d1(0x1b0)],this['_threadCommentDataSourceService'][_0x3488d1(0x166)]=!0x1;}};g=te([N(0x0,_0x285f19),N(0x1,_0x569163(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3c0202,_0x547bfb,_0x2f29d2)=>_0x547bfb in _0x3c0202?se(_0x3c0202,_0x547bfb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2f29d2}):_0x3c0202[_0x547bfb]=_0x2f29d2,ie=(_0x41fb75,_0x577c91,_0xc0f51d,_0x270eef)=>{const _0x4e29bf=_0x3cac96;for(var _0x7f2b1d=_0x270eef>0x1?void 0x0:_0x270eef?oe(_0x577c91,_0xc0f51d):_0x577c91,_0x418d6d=_0x41fb75[_0x4e29bf(0x17d)]-0x1,_0x5a4d79;_0x418d6d>=0x0;_0x418d6d--)(_0x5a4d79=_0x41fb75[_0x418d6d])&&(_0x7f2b1d=_0x5a4d79(_0x7f2b1d)||_0x7f2b1d);return _0x7f2b1d;},w=(_0x27b2ff,_0x1afd28)=>(_0x285d09,_0xaeded7)=>_0x1afd28(_0x285d09,_0xaeded7,_0x27b2ff),$=(_0x2e6bf2,_0x5d59ec,_0x1c7bda)=>ne(_0x2e6bf2,typeof _0x5d59ec!='symbol'?_0x5d59ec+'':_0x5d59ec,_0x1c7bda);let b=class extends _0x41b1ca{constructor(_0x237ffc=M,_0x218b7a,_0x236c24){const _0x26d00b=_0x3cac96;super(),this['_config']=_0x237ffc,this[_0x26d00b(0x18b)]=_0x218b7a,this[_0x26d00b(0x1b4)]=_0x236c24;const {..._0x34f77f}=_0x175110({},M,this[_0x26d00b(0x194)]);this[_0x26d00b(0x1b4)][_0x26d00b(0x163)](z,_0x34f77f);}[_0x3cac96(0x186)](){const _0x2ffca4=_0x3cac96;[[f],[g],[S]][_0x2ffca4(0x160)](_0x42a0b4=>{const _0x478fb0=_0x2ffca4;this[_0x478fb0(0x18b)][_0x478fb0(0x1a5)](_0x42a0b4);});}[_0x3cac96(0x18f)](){const _0x51ec0a=_0x3cac96;this[_0x51ec0a(0x18b)][_0x51ec0a(0x17f)](g),this[_0x51ec0a(0x18b)]['get'](S);}};function _0x4130(_0x48fa7b,_0x523dff){const _0x2eb36a=_0x2eb3();return _0x4130=function(_0x413097,_0x7a7d9c){_0x413097=_0x413097-0x15b;let _0xe70bc4=_0x2eb36a[_0x413097];return _0xe70bc4;},_0x4130(_0x48fa7b,_0x523dff);}$(b,'pluginName',W),$(b,_0x3cac96(0x182),_0xb368d6[_0x3cac96(0x184)]),b=ie([_0x5a44e5(_0x29a324,_0x193564,_0x51f241),w(0x1,_0x569163(_0x4ea2ae)),w(0x2,_0x32feb7)],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 _0x3cac96=_0x4130;(function(_0x3338bc,_0x4e9786){const _0x45f60a=_0x4130,_0x131e88=_0x3338bc();while(!![]){try{const _0x585a85=-parseInt(_0x45f60a(0x177))/0x1*(parseInt(_0x45f60a(0x167))/0x2)+parseInt(_0x45f60a(0x199))/0x3*(-parseInt(_0x45f60a(0x16d))/0x4)+-parseInt(_0x45f60a(0x197))/0x5+parseInt(_0x45f60a(0x178))/0x6+-parseInt(_0x45f60a(0x1a6))/0x7*(parseInt(_0x45f60a(0x161))/0x8)+-parseInt(_0x45f60a(0x17c))/0x9+parseInt(_0x45f60a(0x196))/0xa;if(_0x585a85===_0x4e9786)break;else _0x131e88['push'](_0x131e88['shift']());}catch(_0x3934d4){_0x131e88['push'](_0x131e88['shift']());}}}(_0x2eb3,0xd6c5e));import{CommentService as _0x340a23,CollaborationSessionService as _0x17d1c9,UniverCollaborationClientPlugin as _0x193564}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51f241}from'@univerjs-pro/license';function _0x2eb3(){const _0x12038d=['delete','_config','parse','37769360AgysLb','2061415xKOGJY','userId','6tfGUhQ','Solve','addUser','users','_threadCommentDataSourceService','content','updateComment','body','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','/universer-api/comment/unit/','pipe','add','7MNYCEp','code','Solved','threadId','/edit','requireSession','format','getComment','Add','_commentService','_threadCommentDataSource','commentUpdate$','_initUserSync','payload','_configService','/universer-api/user/list','getOwnPropertyDescriptor','_threadCommentModel','rangeType','post','_initDataSource','resolved','resolveComment','root','Unknown','Reply','thread-comment-data-source.config','find','_init','OpenOrReOpen','forEach','12524384wEANbe','stringify','setConfig','getMemberID','disposeWithMe','syncUpdateMutationToColla','1115858sHIfFg','addComment','user','_userService','reply','_httpService','2347196HQBgDk','filter','deleteComment','UNRECOGNIZED','/delete','size','Delete','saveCommentToSnapshot','customRanges','unitId','1vHDuwD','7569138UjdtiP','listComments','subscribe','error','4044519OlbgFf','length','ref','get','rangeId','replies','type','comment','UNIVER_UNKNOWN','replyId','onStarting','COMMENT','map','personId','_sessionService','_injector','userID','createTimestamp','solved','onReady','dataSource','getUser','parentId'];_0x2eb3=function(){return _0x12038d;};return _0x2eb3();}import{dayjs as _0x2b26c9,UserManagerService as _0x52a82c,Inject as _0x569163,Injector as _0x4ea2ae,Disposable as _0x1cd6bf,CustomRangeType as _0x4714d7,UniverInstanceType as _0xb368d6,DependentOn as _0x5a44e5,IConfigService as _0x32feb7,Plugin as _0x41b1ca,merge as _0x175110}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29a324}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2adaec,IThreadCommentDataSourceService as _0x285f19}from'@univerjs/thread-comment';import{bufferTime as _0x23ed52}from'rxjs';import{HTTPService as _0x4348c0}from'@univerjs/network';const W=_0x3cac96(0x1a1);var I=(_0x28fa3a=>(_0x28fa3a[_0x28fa3a['OpenOrReOpen']=0x0]=_0x3cac96(0x15f),_0x28fa3a[_0x28fa3a[_0x3cac96(0x1a8)]=0x1]=_0x3cac96(0x1a8),_0x28fa3a[_0x28fa3a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x28fa3a))(I||{}),v=(_0x46c197=>(_0x46c197[_0x46c197[_0x3cac96(0x1be)]=0x0]=_0x3cac96(0x1be),_0x46c197[_0x46c197['Add']=0x1]=_0x3cac96(0x1ae),_0x46c197[_0x46c197[_0x3cac96(0x15b)]=0x2]='Reply',_0x46c197[_0x46c197['Edit']=0x3]='Edit',_0x46c197[_0x46c197[_0x3cac96(0x173)]=0x4]=_0x3cac96(0x173),_0x46c197[_0x46c197[_0x3cac96(0x19a)]=0x5]='Solve',_0x46c197[_0x46c197[_0x3cac96(0x170)]=-0x1]=_0x3cac96(0x170),_0x46c197))(v||{});const D=_0x150173=>_0x2b26c9(new Date(+_0x150173))[_0x3cac96(0x1ac)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2b2f9d,_0x52b104)=>{const _0x295be4=_0x3cac96,_0x1e09ed=_0x2b2f9d[_0x295be4(0x17f)](_0x52a82c),_0x38d1f4=_0x2b2f9d[_0x295be4(0x17f)](_0x4348c0);_0x52b104['forEach'](_0x2e9da6=>{const _0x50b583=_0x295be4;_0x1e09ed[_0x50b583(0x191)](_0x2e9da6)&&_0x52b104[_0x50b583(0x193)](_0x2e9da6);}),_0x52b104[_0x295be4(0x172)]&&(await _0x38d1f4[_0x295be4(0x17f)](_0x295be4(0x1b5),{'params':{'userIDs':[..._0x52b104]}}))[_0x295be4(0x1a0)][_0x295be4(0x19c)][_0x295be4(0x160)](_0x16f488=>{const _0x5480f7=_0x295be4;_0x16f488&&_0x1e09ed[_0x5480f7(0x19b)](_0x16f488);});};var K=Object[_0x3cac96(0x1b6)],V=(_0x5d155b,_0x21af45,_0x20c07f,_0x427d17)=>{const _0x12cb7c=_0x3cac96;for(var _0xa717dc=_0x427d17>0x1?void 0x0:_0x427d17?K(_0x21af45,_0x20c07f):_0x21af45,_0x38d8bf=_0x5d155b[_0x12cb7c(0x17d)]-0x1,_0x3d580a;_0x38d8bf>=0x0;_0x38d8bf--)(_0x3d580a=_0x5d155b[_0x38d8bf])&&(_0xa717dc=_0x3d580a(_0xa717dc)||_0xa717dc);return _0xa717dc;},p=(_0xb41d55,_0x1a9db6)=>(_0x23f2e0,_0x1caa0a)=>_0x1a9db6(_0x23f2e0,_0x1caa0a,_0xb41d55);let S=class extends _0x1cd6bf{constructor(_0x9ee977,_0x1d448d,_0x43985a,_0x210f1f){const _0x3e0fb8=_0x3cac96;super(),this[_0x3e0fb8(0x1af)]=_0x9ee977,this['_threadCommentModel']=_0x1d448d,this[_0x3e0fb8(0x16a)]=_0x43985a,this[_0x3e0fb8(0x18b)]=_0x210f1f,this['_init'](),this['_initUserSync']();}[_0x3cac96(0x1b2)](){const _0x3bae03=_0x3cac96;this['disposeWithMe'](this[_0x3bae03(0x1b7)][_0x3bae03(0x1b1)][_0x3bae03(0x1a4)](_0x23ed52(0x10))['subscribe'](_0x54aa1f=>{const _0x6bf67=_0x3bae03,_0x3bf1f1=new Set();_0x54aa1f[_0x6bf67(0x160)](_0x5a1bda=>{const _0x25a93a=_0x6bf67;switch(_0x5a1bda[_0x25a93a(0x182)]){case _0x25a93a(0x1a5):{const _0x1c1666=_0x5a1bda[_0x25a93a(0x1b3)][_0x25a93a(0x189)];_0x3bf1f1['add'](_0x1c1666);break;}}}),B(this['_injector'],_0x3bf1f1);}));}[_0x3cac96(0x15e)](){const _0x2a4862=_0x3cac96;this[_0x2a4862(0x165)](this[_0x2a4862(0x1af)][_0x2a4862(0x1b1)][_0x2a4862(0x17a)](async _0x25627d=>{const _0x426001=_0x2a4862;var _0x3d57e1,_0xb88938,_0x4d08d7,_0x1ce73f;const _0x3ce264=(_0x3d57e1=this[_0x426001(0x1b7)][_0x426001(0x1a2)](_0x25627d[_0x426001(0x176)])['find'](_0x4d75ef=>_0x4d75ef['threadId']===_0x25627d[_0x426001(0x1a9)]))==null?void 0x0:_0x3d57e1[_0x426001(0x1bd)];if(!_0x3ce264)return;const {unitId:_0x106381,subUnitId:_0x4c221e}=_0x3ce264;switch(_0x25627d[_0x426001(0x169)]&&this[_0x426001(0x16a)]['addUser'](_0x25627d[_0x426001(0x169)]),_0x25627d['type']){case v['Add']:break;case v['Reply']:{this[_0x426001(0x1b7)][_0x426001(0x168)](_0x106381,_0x4c221e,{'unitId':_0x106381,'subUnitId':_0x4c221e,'ref':'','id':_0x25627d['replyId'],'dT':D(+_0x25627d[_0x426001(0x18d)]),'threadId':_0x25627d['threadId'],'personId':(_0x4d08d7=(_0xb88938=_0x25627d[_0x426001(0x169)])==null?void 0x0:_0xb88938['userID'])!=null?_0x4d08d7:_0x25627d[_0x426001(0x198)],'text':JSON[_0x426001(0x195)](_0x25627d['content']),'parentId':_0x3ce264['id']});break;}case v['Delete']:{const _0x4fef38=this[_0x426001(0x1b7)][_0x426001(0x1ad)](_0x106381,_0x4c221e,_0x25627d['replyId']);_0x4fef38&&_0x4fef38[_0x426001(0x192)]&&this[_0x426001(0x1b7)][_0x426001(0x16f)](_0x106381,_0x4c221e,_0x25627d[_0x426001(0x185)]);break;}case v['Edit']:{this[_0x426001(0x1b7)][_0x426001(0x19f)](_0x106381,_0x4c221e,{'commentId':_0x25627d['replyId'],'text':JSON[_0x426001(0x195)](_0x25627d[_0x426001(0x19e)])});break;}case v[_0x426001(0x19a)]:{const _0x5094f8=(_0x1ce73f=this[_0x426001(0x1b7)]['getUnit'](_0x25627d[_0x426001(0x176)])[_0x426001(0x15d)](_0x1f2907=>_0x1f2907[_0x426001(0x1a9)]===_0x25627d[_0x426001(0x1a9)]))==null?void 0x0:_0x1ce73f[_0x426001(0x1bd)];_0x5094f8&&this['_threadCommentModel'][_0x426001(0x1bc)](_0x106381,_0x4c221e,_0x5094f8['id'],_0x25627d['solved']===I[_0x426001(0x1a8)]);break;}}}));}};S=V([p(0x0,_0x569163(_0x340a23)),p(0x1,_0x569163(_0x2adaec)),p(0x2,_0x569163(_0x52a82c)),p(0x3,_0x569163(_0x4ea2ae))],S);const z=_0x3cac96(0x15c),M={};var k=Object[_0x3cac96(0x1b6)],Q=(_0x3180ca,_0x1fac97,_0x24d25f,_0x4b96a7)=>{const _0x229d7b=_0x3cac96;for(var _0x1a05fa=_0x4b96a7>0x1?void 0x0:_0x4b96a7?k(_0x1fac97,_0x24d25f):_0x1fac97,_0x2158f8=_0x3180ca[_0x229d7b(0x17d)]-0x1,_0x5e6a04;_0x2158f8>=0x0;_0x2158f8--)(_0x5e6a04=_0x3180ca[_0x2158f8])&&(_0x1a05fa=_0x5e6a04(_0x1a05fa)||_0x1a05fa);return _0x1a05fa;},_=(_0x57a73a,_0x420933)=>(_0x307be6,_0x125d5d)=>_0x420933(_0x307be6,_0x125d5d,_0x57a73a);function X(_0x12c581,_0x3bbb96){const _0x73d444=_0x3cac96,_0x36b7f7=_0x12c581[_0x73d444(0x181)][0x0];return{..._0x3bbb96,'id':_0x36b7f7[_0x73d444(0x185)],'resolved':_0x12c581['solved']===0x1,'dT':D(_0x36b7f7[_0x73d444(0x18d)]),'personId':_0x36b7f7[_0x73d444(0x198)],'threadId':_0x36b7f7[_0x73d444(0x1a9)]};}function ee(_0x26a120,_0x50a3f2,_0x12363a){const _0x288413=_0x3cac96;var _0x519d41,_0x469531;if(((_0x469531=(_0x519d41=_0x26a120==null?void 0x0:_0x26a120['replies'])==null?void 0x0:_0x519d41['length'])!=null?_0x469531:0x0)>0x0){const _0x15c40f=(_0x1334c2,_0x37590b)=>({'id':_0x1334c2['replyId'],'threadId':_0x1334c2['threadId'],'dT':D(_0x1334c2[_0x288413(0x18d)]),'personId':_0x1334c2['userId'],'resolved':_0x26a120[_0x288413(0x18e)]===I[_0x288413(0x1a8)],'unitId':_0x50a3f2,'subUnitId':_0x12363a,'text':JSON[_0x288413(0x195)](_0x1334c2[_0x288413(0x19e)]),'parentId':_0x37590b}),_0x51f2bd=_0x15c40f(_0x26a120[_0x288413(0x181)][0x0]);return{..._0x51f2bd,'children':_0x26a120[_0x288413(0x181)]['slice'](0x1)['map'](_0x2842d0=>_0x15c40f(_0x2842d0,_0x51f2bd['id']))};}return null;}let f=class{constructor(_0x3e1689,_0xa95ba3,_0x594200,_0xdbda1d){const _0x25d419=_0x3cac96;this[_0x25d419(0x16c)]=_0x3e1689,this['_userService']=_0xa95ba3,this[_0x25d419(0x18a)]=_0x594200,this[_0x25d419(0x18b)]=_0xdbda1d;}async['addComment'](_0x547189){const _0x2dbb5a=_0x3cac96;var _0x20fd3e,_0x43f12c;const {parentId:_0x4cb3fc,unitId:_0x354212,text:_0x3c4ec8,threadId:_0x494029}=_0x547189,_0x1a0688=(_0x43f12c=(_0x20fd3e=_0x3c4ec8[_0x2dbb5a(0x175)])==null?void 0x0:_0x20fd3e[_0x2dbb5a(0x16e)](_0x347c98=>_0x347c98[_0x2dbb5a(0x1b8)]===_0x4714d7['COMMENT'])[_0x2dbb5a(0x188)](_0x322b8d=>_0x322b8d[_0x2dbb5a(0x180)]))!=null?_0x43f12c:[],_0x40a90c=JSON[_0x2dbb5a(0x162)](_0x3c4ec8),_0x2a2c10=(await this[_0x2dbb5a(0x18a)]['requireSession'](_0x354212))[_0x2dbb5a(0x164)]();if(_0x4cb3fc){const _0x12922e={'memberId':_0x2a2c10,'unitId':_0x354212,'content':_0x40a90c,'mention':_0x1a0688,'threadId':_0x494029},_0x177c5e=(await this[_0x2dbb5a(0x16c)][_0x2dbb5a(0x1b9)](_0x2dbb5a(0x1a3)+_0x354212+'/reply',{'body':_0x12922e}))[_0x2dbb5a(0x1a0)][_0x2dbb5a(0x16b)];return{..._0x547189,'id':_0x177c5e['replyId'],'dT':_0x2b26c9(+_0x177c5e[_0x2dbb5a(0x18d)])[_0x2dbb5a(0x1ac)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x177c5e['userId']};}else{const _0x1afc57={'memberId':_0x2a2c10,'unitId':_0x354212,'content':_0x40a90c,'mention':_0x1a0688},_0x41fd3a=await this[_0x2dbb5a(0x16c)][_0x2dbb5a(0x1b9)](_0x2dbb5a(0x1a3)+_0x354212+'/add',{'body':_0x1afc57});return X(_0x41fd3a[_0x2dbb5a(0x1a0)][_0x2dbb5a(0x183)],_0x547189);}}async['updateComment'](_0x184cd4){const _0x1e77ac=_0x3cac96;var _0x18fc32,_0x343e38;const {text:_0x14a536,unitId:_0x5db8b5}=_0x184cd4,_0x3f4520=(_0x343e38=(_0x18fc32=_0x14a536[_0x1e77ac(0x175)])==null?void 0x0:_0x18fc32[_0x1e77ac(0x16e)](_0x456224=>_0x456224[_0x1e77ac(0x1b8)]===_0x4714d7[_0x1e77ac(0x187)])[_0x1e77ac(0x188)](_0xdf3ec7=>_0xdf3ec7[_0x1e77ac(0x180)]))!=null?_0x343e38:[],_0x3a4c0d=JSON[_0x1e77ac(0x162)](_0x14a536),_0x1c0339=_0x184cd4[_0x1e77ac(0x1a9)],_0xf35ca=_0x184cd4['id'],_0x5a035b={'memberId':(await this[_0x1e77ac(0x18a)][_0x1e77ac(0x1ab)](_0x5db8b5))[_0x1e77ac(0x164)](),'unitId':_0x5db8b5,'threadId':_0x1c0339,'mention':_0x3f4520,'content':_0x3a4c0d,'replyId':_0xf35ca},_0x5796c6=await this['_httpService'][_0x1e77ac(0x1b9)](_0x1e77ac(0x1a3)+_0x5db8b5+_0x1e77ac(0x1aa),{'body':_0x5a035b});return!_0x5796c6[_0x1e77ac(0x1a0)]['error']||_0x5796c6['body'][_0x1e77ac(0x17b)][_0x1e77ac(0x1a7)]===0x1;}async[_0x3cac96(0x1bc)](_0x393820){const _0x708331=_0x3cac96,{unitId:_0x4bb250}=_0x393820,_0x83bee3=_0x393820['threadId'],_0x2c675d={'memberId':this[_0x708331(0x16a)]['getCurrentUser']()[_0x708331(0x18c)],'unitId':_0x4bb250,'threadId':_0x83bee3,'solved':_0x393820[_0x708331(0x1bb)]?I[_0x708331(0x1a8)]:I[_0x708331(0x15f)]},_0xe6df01=await this[_0x708331(0x16c)]['post']('/universer-api/comment/unit/'+_0x4bb250+'/solved',{'body':_0x2c675d});return!_0xe6df01[_0x708331(0x1a0)][_0x708331(0x17b)]||_0xe6df01[_0x708331(0x1a0)][_0x708331(0x17b)]['code']===0x1;}async[_0x3cac96(0x16f)](_0x214dff,_0x2de9b2,_0x313ed7,_0x228c38){const _0x59b401=_0x3cac96,_0x593e9c={'memberId':(await this[_0x59b401(0x18a)][_0x59b401(0x1ab)](_0x214dff))['getMemberID'](),'threadId':_0x313ed7,'replyId':_0x228c38,'unitId':_0x214dff},_0x1a4064=await this[_0x59b401(0x16c)][_0x59b401(0x1b9)](_0x59b401(0x1a3)+_0x214dff+_0x59b401(0x171),{'body':_0x593e9c});return!_0x1a4064['body'][_0x59b401(0x17b)]||_0x1a4064['body'][_0x59b401(0x17b)][_0x59b401(0x1a7)]===0x1;}async[_0x3cac96(0x179)](_0x203e73,_0x467baf,_0x1013d1){const _0x34fcd3=_0x3cac96,_0x5492fa={'unitId':_0x203e73,'threadId':_0x1013d1},_0x582d24=await this[_0x34fcd3(0x16c)][_0x34fcd3(0x1b9)](_0x34fcd3(0x1a3)+_0x203e73+'/list',{'body':_0x5492fa}),_0x40d8f1=_0x1013d1[_0x34fcd3(0x188)](_0x1b96f9=>ee(_0x582d24[_0x34fcd3(0x1a0)]['comments'][_0x1b96f9],_0x203e73,_0x467baf))[_0x34fcd3(0x16e)](Boolean);return Object['values'](_0x582d24[_0x34fcd3(0x1a0)][_0x34fcd3(0x19c)])[_0x34fcd3(0x160)](_0x306f0b=>{const _0x35f887=_0x34fcd3;this[_0x35f887(0x16a)][_0x35f887(0x19b)](_0x306f0b);}),_0x40d8f1;}[_0x3cac96(0x174)](_0x243160){const _0x4ab952=_0x3cac96;return{'id':_0x243160['id'],'threadId':_0x243160[_0x4ab952(0x1a9)],'ref':_0x243160[_0x4ab952(0x17e)]};}};f=Q([_(0x0,_0x569163(_0x4348c0)),_(0x1,_0x569163(_0x52a82c)),_(0x2,_0x569163(_0x17d1c9)),_(0x3,_0x569163(_0x4ea2ae))],f);var re=Object[_0x3cac96(0x1b6)],te=(_0x501340,_0x18b638,_0x52d2c5,_0x1d7b2b)=>{const _0x31b31d=_0x3cac96;for(var _0x478c69=_0x1d7b2b>0x1?void 0x0:_0x1d7b2b?re(_0x18b638,_0x52d2c5):_0x18b638,_0x322fcb=_0x501340[_0x31b31d(0x17d)]-0x1,_0x19311c;_0x322fcb>=0x0;_0x322fcb--)(_0x19311c=_0x501340[_0x322fcb])&&(_0x478c69=_0x19311c(_0x478c69)||_0x478c69);return _0x478c69;},N=(_0xff2a29,_0x49a385)=>(_0x110aa1,_0x17c8bb)=>_0x49a385(_0x110aa1,_0x17c8bb,_0xff2a29);let g=class extends _0x1cd6bf{constructor(_0x213f28,_0x4eeeab){const _0x46e38d=_0x3cac96;super(),this['_threadCommentDataSourceService']=_0x213f28,this['_threadCommentDataSource']=_0x4eeeab,this[_0x46e38d(0x1ba)]();}[_0x3cac96(0x1ba)](){const _0x3488d1=_0x3cac96;this[_0x3488d1(0x19d)][_0x3488d1(0x190)]=this[_0x3488d1(0x1b0)],this['_threadCommentDataSourceService'][_0x3488d1(0x166)]=!0x1;}};g=te([N(0x0,_0x285f19),N(0x1,_0x569163(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3c0202,_0x547bfb,_0x2f29d2)=>_0x547bfb in _0x3c0202?se(_0x3c0202,_0x547bfb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2f29d2}):_0x3c0202[_0x547bfb]=_0x2f29d2,ie=(_0x41fb75,_0x577c91,_0xc0f51d,_0x270eef)=>{const _0x4e29bf=_0x3cac96;for(var _0x7f2b1d=_0x270eef>0x1?void 0x0:_0x270eef?oe(_0x577c91,_0xc0f51d):_0x577c91,_0x418d6d=_0x41fb75[_0x4e29bf(0x17d)]-0x1,_0x5a4d79;_0x418d6d>=0x0;_0x418d6d--)(_0x5a4d79=_0x41fb75[_0x418d6d])&&(_0x7f2b1d=_0x5a4d79(_0x7f2b1d)||_0x7f2b1d);return _0x7f2b1d;},w=(_0x27b2ff,_0x1afd28)=>(_0x285d09,_0xaeded7)=>_0x1afd28(_0x285d09,_0xaeded7,_0x27b2ff),$=(_0x2e6bf2,_0x5d59ec,_0x1c7bda)=>ne(_0x2e6bf2,typeof _0x5d59ec!='symbol'?_0x5d59ec+'':_0x5d59ec,_0x1c7bda);let b=class extends _0x41b1ca{constructor(_0x237ffc=M,_0x218b7a,_0x236c24){const _0x26d00b=_0x3cac96;super(),this['_config']=_0x237ffc,this[_0x26d00b(0x18b)]=_0x218b7a,this[_0x26d00b(0x1b4)]=_0x236c24;const {..._0x34f77f}=_0x175110({},M,this[_0x26d00b(0x194)]);this[_0x26d00b(0x1b4)][_0x26d00b(0x163)](z,_0x34f77f);}[_0x3cac96(0x186)](){const _0x2ffca4=_0x3cac96;[[f],[g],[S]][_0x2ffca4(0x160)](_0x42a0b4=>{const _0x478fb0=_0x2ffca4;this[_0x478fb0(0x18b)][_0x478fb0(0x1a5)](_0x42a0b4);});}[_0x3cac96(0x18f)](){const _0x51ec0a=_0x3cac96;this[_0x51ec0a(0x18b)][_0x51ec0a(0x17f)](g),this[_0x51ec0a(0x18b)]['get'](S);}};function _0x4130(_0x48fa7b,_0x523dff){const _0x2eb36a=_0x2eb3();return _0x4130=function(_0x413097,_0x7a7d9c){_0x413097=_0x413097-0x15b;let _0xe70bc4=_0x2eb36a[_0x413097];return _0xe70bc4;},_0x4130(_0x48fa7b,_0x523dff);}$(b,'pluginName',W),$(b,_0x3cac96(0x182),_0xb368d6[_0x3cac96(0x184)]),b=ie([_0x5a44e5(_0x29a324,_0x193564,_0x51f241),w(0x1,_0x569163(_0x4ea2ae)),w(0x2,_0x32feb7)],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 _0x7252(){const _0x3d99f7=['toStringTag','solved','subscribe','resolved','Injector','userID','getUser','ref','COMMENT','body','threadId','_injector','Inject','error','DependentOn','replyId','addUser','Disposable','@univerjs/core','UniverThreadCommentUi','ThreadCommentModel','content','root','post','Plugin','map','@univerjs-pro/license','customRanges','replies','Solve','forEach','bufferTime','reply','getCurrentUser','exports','getMemberID','Delete','UniverProThreadCommentDatasource','parentId','onStarting','userId','commentUpdate$','UniverInstanceType','format','CustomRangeType','_httpService','defineProperty','/delete','getOwnPropertyDescriptor','IConfigService','updateComment','Unknown','getUnit','397194LcJKgI','Add','467760ydnvNj','UNRECOGNIZED','find','@univerjs-pro/collaboration-client','disposeWithMe','UniverCollaborationClientPlugin','CollaborationSessionService','unitId','UniverLicensePlugin','code','894172EAorrG','slice','object','Reply','@univerjs/thread-comment-ui','/universer-api/user/list','dataSource','2329746ZVKpMg','_threadCommentDataSourceService','_sessionService','_threadCommentDataSource','deleteComment','get','user','Solved','function','@univerjs/thread-comment','comment','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','onReady','UniverProCollaborationClient','UserManagerService','pipe','parse','/edit','resolveComment','size','add','payload','_configService','listComments','@univerjs/network','_config','Edit','/universer-api/comment/unit/','_initDataSource','UniverThreadCommentDataSourcePlugin','171068HIYzXe','UniverNetwork','stringify','users','2639441wRssrY','getComment','addComment','_init','/add','UniverProLicense','Module','rxjs','requireSession','filter','personId','symbol','pluginName','_threadCommentModel','comments','rangeId','length','/solved','dayjs','_initUserSync','_commentService','UNIVER_UNKNOWN','4748912gOWdQN','5ElZCRJ','UniverThreadCommentUIPlugin','thread-comment-data-source.config','createTimestamp'];_0x7252=function(){return _0x3d99f7;};return _0x7252();}function _0x5b28(_0x48edd7,_0x1b7f57){const _0x72529e=_0x7252();return _0x5b28=function(_0x5b2852,_0x3e8976){_0x5b2852=_0x5b2852-0x12d;let _0x1bedf3=_0x72529e[_0x5b2852];return _0x1bedf3;},_0x5b28(_0x48edd7,_0x1b7f57);}(function(_0x16df41,_0x3e2a07){const _0x1619ff=_0x5b28,_0x493492=_0x16df41();while(!![]){try{const _0x107f87=parseInt(_0x1619ff(0x18d))/0x1+-parseInt(_0x1619ff(0x137))/0x2+-parseInt(_0x1619ff(0x19e))/0x3+parseInt(_0x1619ff(0x197))/0x4*(-parseInt(_0x1619ff(0x152))/0x5)+parseInt(_0x1619ff(0x18b))/0x6+parseInt(_0x1619ff(0x13b))/0x7+parseInt(_0x1619ff(0x151))/0x8;if(_0x107f87===_0x3e2a07)break;else _0x493492['push'](_0x493492['shift']());}catch(_0x52b4a2){_0x493492['push'](_0x493492['shift']());}}}(_0x7252,0x664a1),function(_0x2f46a0,_0x10f217){const _0x286019=_0x5b28;typeof exports==_0x286019(0x199)&&typeof module<'u'?_0x10f217(exports,require(_0x286019(0x190)),require(_0x286019(0x170)),require(_0x286019(0x168)),require(_0x286019(0x19b)),require(_0x286019(0x1a7)),require(_0x286019(0x142)),require(_0x286019(0x131))):typeof define==_0x286019(0x1a6)&&define['amd']?define([_0x286019(0x178),_0x286019(0x190),_0x286019(0x170),_0x286019(0x168),_0x286019(0x19b),_0x286019(0x1a7),'rxjs',_0x286019(0x131)],_0x10f217):(_0x2f46a0=typeof globalThis<'u'?globalThis:_0x2f46a0||self,_0x10f217(_0x2f46a0[_0x286019(0x17b)]={},_0x2f46a0[_0x286019(0x1ad)],_0x2f46a0[_0x286019(0x140)],_0x2f46a0['UniverCore'],_0x2f46a0[_0x286019(0x169)],_0x2f46a0['UniverThreadComment'],_0x2f46a0[_0x286019(0x142)],_0x2f46a0[_0x286019(0x138)]));}(this,function(_0x5d245b,_0x3fa7f6,_0x309a95,_0x35d833,_0x3e4da7,_0x2a68c7,_0x445ae9,_0xe56ba2){'use strict';const _0x3b96d7=_0x5b28;const _0x1a43bc=_0x3b96d7(0x1aa);var _0x1eeb9d=(_0x2f678a=>(_0x2f678a[_0x2f678a[_0x3b96d7(0x1ab)]=0x0]=_0x3b96d7(0x1ab),_0x2f678a[_0x2f678a[_0x3b96d7(0x1a5)]=0x1]=_0x3b96d7(0x1a5),_0x2f678a[_0x2f678a[_0x3b96d7(0x18e)]=-0x1]=_0x3b96d7(0x18e),_0x2f678a))(_0x1eeb9d||{}),_0x552ebc=(_0x3f1df9=>(_0x3f1df9[_0x3f1df9[_0x3b96d7(0x189)]=0x0]=_0x3b96d7(0x189),_0x3f1df9[_0x3f1df9[_0x3b96d7(0x18c)]=0x1]=_0x3b96d7(0x18c),_0x3f1df9[_0x3f1df9[_0x3b96d7(0x19a)]=0x2]='Reply',_0x3f1df9[_0x3f1df9[_0x3b96d7(0x133)]=0x3]='Edit',_0x3f1df9[_0x3f1df9['Delete']=0x4]=_0x3b96d7(0x17a),_0x3f1df9[_0x3f1df9[_0x3b96d7(0x173)]=0x5]=_0x3b96d7(0x173),_0x3f1df9[_0x3f1df9[_0x3b96d7(0x18e)]=-0x1]=_0x3b96d7(0x18e),_0x3f1df9))(_0x552ebc||{});const _0x3e5d09=_0x324853=>_0x35d833[_0x3b96d7(0x14d)](new Date(+_0x324853))['format']('YYYY/MM/DD\x20HH:mm'),_0x110d7e=async(_0xf7c4c5,_0x2f3da8)=>{const _0x137852=_0x3b96d7,_0x2bf475=_0xf7c4c5[_0x137852(0x1a3)](_0x35d833[_0x137852(0x1ae)]),_0x5c3c86=_0xf7c4c5[_0x137852(0x1a3)](_0xe56ba2['HTTPService']);_0x2f3da8[_0x137852(0x174)](_0x356ce9=>{const _0x1c9073=_0x137852;_0x2bf475[_0x1c9073(0x15c)](_0x356ce9)&&_0x2f3da8['delete'](_0x356ce9);}),_0x2f3da8[_0x137852(0x1b3)]&&(await _0x5c3c86['get'](_0x137852(0x19c),{'params':{'userIDs':[..._0x2f3da8]}}))[_0x137852(0x15f)]['users'][_0x137852(0x174)](_0x4f4ff4=>{const _0x529f94=_0x137852;_0x4f4ff4&&_0x2bf475[_0x529f94(0x166)](_0x4f4ff4);});};var _0x5d8e7e=Object['getOwnPropertyDescriptor'],_0x3528c8=(_0x3e9f35,_0x4719c9,_0x439aec,_0x299ee2)=>{const _0x42b174=_0x3b96d7;for(var _0x2061e7=_0x299ee2>0x1?void 0x0:_0x299ee2?_0x5d8e7e(_0x4719c9,_0x439aec):_0x4719c9,_0x54eb81=_0x3e9f35[_0x42b174(0x14b)]-0x1,_0x531e48;_0x54eb81>=0x0;_0x54eb81--)(_0x531e48=_0x3e9f35[_0x54eb81])&&(_0x2061e7=_0x531e48(_0x2061e7)||_0x2061e7);return _0x2061e7;},_0x1e1de8=(_0x4ffbb3,_0xfb3a8d)=>(_0x42fb5f,_0x17b98e)=>_0xfb3a8d(_0x42fb5f,_0x17b98e,_0x4ffbb3);let _0x35cdc0=class extends _0x35d833[_0x3b96d7(0x167)]{constructor(_0x567fea,_0x4df1e6,_0x36daf3,_0x3b6ade){const _0x57218f=_0x3b96d7;super(),this[_0x57218f(0x14f)]=_0x567fea,this[_0x57218f(0x148)]=_0x4df1e6,this[_0x57218f(0x1a9)]=_0x36daf3,this[_0x57218f(0x161)]=_0x3b6ade,this[_0x57218f(0x13e)](),this[_0x57218f(0x14e)]();}[_0x3b96d7(0x14e)](){const _0x3ca97d=_0x3b96d7;this[_0x3ca97d(0x191)](this[_0x3ca97d(0x148)][_0x3ca97d(0x17f)][_0x3ca97d(0x1af)](_0x445ae9[_0x3ca97d(0x175)](0x10))['subscribe'](_0x3a59d3=>{const _0x516e18=_0x3ca97d,_0x2667a1=new Set();_0x3a59d3['forEach'](_0x88c345=>{const _0x179176=_0x5b28;switch(_0x88c345['type']){case _0x179176(0x12d):{const _0x1dc1e6=_0x88c345[_0x179176(0x12e)][_0x179176(0x145)];_0x2667a1[_0x179176(0x12d)](_0x1dc1e6);break;}}}),_0x110d7e(this[_0x516e18(0x161)],_0x2667a1);}));}[_0x3b96d7(0x13e)](){const _0x509ca3=_0x3b96d7;this[_0x509ca3(0x191)](this[_0x509ca3(0x14f)]['commentUpdate$'][_0x509ca3(0x158)](async _0x26f56b=>{const _0x2a1c4b=_0x509ca3;var _0x1c9ca0,_0x76084b,_0x424582,_0x5c9bda;const _0x12f916=(_0x1c9ca0=this[_0x2a1c4b(0x148)][_0x2a1c4b(0x18a)](_0x26f56b[_0x2a1c4b(0x194)])[_0x2a1c4b(0x18f)](_0x29df26=>_0x29df26[_0x2a1c4b(0x160)]===_0x26f56b[_0x2a1c4b(0x160)]))==null?void 0x0:_0x1c9ca0['root'];if(!_0x12f916)return;const {unitId:_0x5a9fa1,subUnitId:_0x192ffc}=_0x12f916;switch(_0x26f56b['user']&&this['_userService'][_0x2a1c4b(0x166)](_0x26f56b['user']),_0x26f56b['type']){case _0x552ebc[_0x2a1c4b(0x18c)]:break;case _0x552ebc[_0x2a1c4b(0x19a)]:{this[_0x2a1c4b(0x148)][_0x2a1c4b(0x13d)](_0x5a9fa1,_0x192ffc,{'unitId':_0x5a9fa1,'subUnitId':_0x192ffc,'ref':'','id':_0x26f56b[_0x2a1c4b(0x165)],'dT':_0x3e5d09(+_0x26f56b[_0x2a1c4b(0x155)]),'threadId':_0x26f56b[_0x2a1c4b(0x160)],'personId':(_0x424582=(_0x76084b=_0x26f56b[_0x2a1c4b(0x1a4)])==null?void 0x0:_0x76084b['userID'])!=null?_0x424582:_0x26f56b[_0x2a1c4b(0x17e)],'text':JSON[_0x2a1c4b(0x1b0)](_0x26f56b[_0x2a1c4b(0x16b)]),'parentId':_0x12f916['id']});break;}case _0x552ebc['Delete']:{const _0x1666c2=this[_0x2a1c4b(0x148)][_0x2a1c4b(0x13c)](_0x5a9fa1,_0x192ffc,_0x26f56b[_0x2a1c4b(0x165)]);_0x1666c2&&_0x1666c2[_0x2a1c4b(0x17c)]&&this[_0x2a1c4b(0x148)]['deleteComment'](_0x5a9fa1,_0x192ffc,_0x26f56b[_0x2a1c4b(0x165)]);break;}case _0x552ebc[_0x2a1c4b(0x133)]:{this[_0x2a1c4b(0x148)][_0x2a1c4b(0x188)](_0x5a9fa1,_0x192ffc,{'commentId':_0x26f56b['replyId'],'text':JSON['parse'](_0x26f56b[_0x2a1c4b(0x16b)])});break;}case _0x552ebc['Solve']:{const _0x5a90db=(_0x5c9bda=this[_0x2a1c4b(0x148)][_0x2a1c4b(0x18a)](_0x26f56b['unitId'])[_0x2a1c4b(0x18f)](_0x1e9967=>_0x1e9967[_0x2a1c4b(0x160)]===_0x26f56b[_0x2a1c4b(0x160)]))==null?void 0x0:_0x5c9bda[_0x2a1c4b(0x16c)];_0x5a90db&&this['_threadCommentModel'][_0x2a1c4b(0x1b2)](_0x5a9fa1,_0x192ffc,_0x5a90db['id'],_0x26f56b[_0x2a1c4b(0x157)]===_0x1eeb9d['Solved']);break;}}}));}};_0x35cdc0=_0x3528c8([_0x1e1de8(0x0,_0x35d833[_0x3b96d7(0x162)](_0x3fa7f6['CommentService'])),_0x1e1de8(0x1,_0x35d833[_0x3b96d7(0x162)](_0x2a68c7[_0x3b96d7(0x16a)])),_0x1e1de8(0x2,_0x35d833[_0x3b96d7(0x162)](_0x35d833[_0x3b96d7(0x1ae)])),_0x1e1de8(0x3,_0x35d833[_0x3b96d7(0x162)](_0x35d833['Injector']))],_0x35cdc0);const _0x208c41=_0x3b96d7(0x154),_0x1c9315={};var _0x590d28=Object[_0x3b96d7(0x186)],_0x48981d=(_0x53254e,_0x2050b5,_0x5ddfc5,_0x4e6f39)=>{const _0x4e30ed=_0x3b96d7;for(var _0x4a0457=_0x4e6f39>0x1?void 0x0:_0x4e6f39?_0x590d28(_0x2050b5,_0x5ddfc5):_0x2050b5,_0x4d9484=_0x53254e[_0x4e30ed(0x14b)]-0x1,_0x2d2bbb;_0x4d9484>=0x0;_0x4d9484--)(_0x2d2bbb=_0x53254e[_0x4d9484])&&(_0x4a0457=_0x2d2bbb(_0x4a0457)||_0x4a0457);return _0x4a0457;},_0x117d22=(_0x521dd0,_0x4bb3fe)=>(_0x34e226,_0x2fe828)=>_0x4bb3fe(_0x34e226,_0x2fe828,_0x521dd0);function _0x125ba0(_0x2f7ccc,_0x10d5ee){const _0x43a4eb=_0x3b96d7,_0x350f72=_0x2f7ccc[_0x43a4eb(0x172)][0x0];return{..._0x10d5ee,'id':_0x350f72[_0x43a4eb(0x165)],'resolved':_0x2f7ccc[_0x43a4eb(0x157)]===0x1,'dT':_0x3e5d09(_0x350f72[_0x43a4eb(0x155)]),'personId':_0x350f72[_0x43a4eb(0x17e)],'threadId':_0x350f72[_0x43a4eb(0x160)]};}function _0x445731(_0x3218dd,_0x1a3ba8,_0x2086d6){const _0xf9c90c=_0x3b96d7;var _0x4492d9,_0x1bb760;if(((_0x1bb760=(_0x4492d9=_0x3218dd==null?void 0x0:_0x3218dd[_0xf9c90c(0x172)])==null?void 0x0:_0x4492d9[_0xf9c90c(0x14b)])!=null?_0x1bb760:0x0)>0x0){const _0x3430ca=(_0x30e768,_0x3b04b6)=>({'id':_0x30e768[_0xf9c90c(0x165)],'threadId':_0x30e768['threadId'],'dT':_0x3e5d09(_0x30e768['createTimestamp']),'personId':_0x30e768[_0xf9c90c(0x17e)],'resolved':_0x3218dd['solved']===_0x1eeb9d[_0xf9c90c(0x1a5)],'unitId':_0x1a3ba8,'subUnitId':_0x2086d6,'text':JSON['parse'](_0x30e768[_0xf9c90c(0x16b)]),'parentId':_0x3b04b6}),_0x4d5e7f=_0x3430ca(_0x3218dd[_0xf9c90c(0x172)][0x0]);return{..._0x4d5e7f,'children':_0x3218dd[_0xf9c90c(0x172)][_0xf9c90c(0x198)](0x1)[_0xf9c90c(0x16f)](_0x3f3055=>_0x3430ca(_0x3f3055,_0x4d5e7f['id']))};}return null;}let _0x51e779=class{constructor(_0x56fc4b,_0x31f424,_0xb51cb4,_0x127c00){const _0xc2472f=_0x3b96d7;this['_httpService']=_0x56fc4b,this[_0xc2472f(0x1a9)]=_0x31f424,this['_sessionService']=_0xb51cb4,this[_0xc2472f(0x161)]=_0x127c00;}async[_0x3b96d7(0x13d)](_0xedacf7){const _0x56e8ad=_0x3b96d7;var _0x43dd5f,_0x57093e;const {parentId:_0x3d07bd,unitId:_0x4e39a8,text:_0x1b6fab,threadId:_0x7095dc}=_0xedacf7,_0x396af7=(_0x57093e=(_0x43dd5f=_0x1b6fab['customRanges'])==null?void 0x0:_0x43dd5f[_0x56e8ad(0x144)](_0x3fcde1=>_0x3fcde1['rangeType']===_0x35d833[_0x56e8ad(0x182)][_0x56e8ad(0x15e)])[_0x56e8ad(0x16f)](_0x34fb4e=>_0x34fb4e[_0x56e8ad(0x14a)]))!=null?_0x57093e:[],_0x36a65d=JSON['stringify'](_0x1b6fab),_0x59ce9f=(await this[_0x56e8ad(0x1a0)][_0x56e8ad(0x143)](_0x4e39a8))[_0x56e8ad(0x179)]();if(_0x3d07bd){const _0x221c41={'memberId':_0x59ce9f,'unitId':_0x4e39a8,'content':_0x36a65d,'mention':_0x396af7,'threadId':_0x7095dc},_0x25786f=(await this[_0x56e8ad(0x183)][_0x56e8ad(0x16d)](_0x56e8ad(0x134)+_0x4e39a8+'/reply',{'body':_0x221c41}))['body'][_0x56e8ad(0x176)];return{..._0xedacf7,'id':_0x25786f[_0x56e8ad(0x165)],'dT':_0x35d833[_0x56e8ad(0x14d)](+_0x25786f[_0x56e8ad(0x155)])[_0x56e8ad(0x181)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x25786f['userId']};}else{const _0x6a5e76={'memberId':_0x59ce9f,'unitId':_0x4e39a8,'content':_0x36a65d,'mention':_0x396af7},_0x2a8537=await this[_0x56e8ad(0x183)][_0x56e8ad(0x16d)](_0x56e8ad(0x134)+_0x4e39a8+_0x56e8ad(0x13f),{'body':_0x6a5e76});return _0x125ba0(_0x2a8537['body'][_0x56e8ad(0x1a8)],_0xedacf7);}}async[_0x3b96d7(0x188)](_0x21ba5f){const _0x11406b=_0x3b96d7;var _0x482c01,_0x3f1787;const {text:_0x5ba6f9,unitId:_0x2e27ce}=_0x21ba5f,_0x18c929=(_0x3f1787=(_0x482c01=_0x5ba6f9[_0x11406b(0x171)])==null?void 0x0:_0x482c01[_0x11406b(0x144)](_0x3915c8=>_0x3915c8['rangeType']===_0x35d833['CustomRangeType']['COMMENT'])[_0x11406b(0x16f)](_0x2416a3=>_0x2416a3[_0x11406b(0x14a)]))!=null?_0x3f1787:[],_0x19637b=JSON[_0x11406b(0x139)](_0x5ba6f9),_0x11219a=_0x21ba5f[_0x11406b(0x160)],_0x358832=_0x21ba5f['id'],_0x2211bb={'memberId':(await this[_0x11406b(0x1a0)]['requireSession'](_0x2e27ce))[_0x11406b(0x179)](),'unitId':_0x2e27ce,'threadId':_0x11219a,'mention':_0x18c929,'content':_0x19637b,'replyId':_0x358832},_0x5a9d51=await this[_0x11406b(0x183)][_0x11406b(0x16d)](_0x11406b(0x134)+_0x2e27ce+_0x11406b(0x1b1),{'body':_0x2211bb});return!_0x5a9d51[_0x11406b(0x15f)][_0x11406b(0x163)]||_0x5a9d51[_0x11406b(0x15f)][_0x11406b(0x163)][_0x11406b(0x196)]===0x1;}async[_0x3b96d7(0x1b2)](_0x8aa3bc){const _0x72980e=_0x3b96d7,{unitId:_0x47ff2a}=_0x8aa3bc,_0x432536=_0x8aa3bc['threadId'],_0x8ed6c4={'memberId':this['_userService'][_0x72980e(0x177)]()[_0x72980e(0x15b)],'unitId':_0x47ff2a,'threadId':_0x432536,'solved':_0x8aa3bc[_0x72980e(0x159)]?_0x1eeb9d[_0x72980e(0x1a5)]:_0x1eeb9d[_0x72980e(0x1ab)]},_0x309760=await this[_0x72980e(0x183)][_0x72980e(0x16d)](_0x72980e(0x134)+_0x47ff2a+_0x72980e(0x14c),{'body':_0x8ed6c4});return!_0x309760['body'][_0x72980e(0x163)]||_0x309760[_0x72980e(0x15f)][_0x72980e(0x163)]['code']===0x1;}async[_0x3b96d7(0x1a2)](_0x394a04,_0x35ccc1,_0xfb462a,_0x322c54){const _0x2bd61a=_0x3b96d7,_0x371814={'memberId':(await this[_0x2bd61a(0x1a0)][_0x2bd61a(0x143)](_0x394a04))[_0x2bd61a(0x179)](),'threadId':_0xfb462a,'replyId':_0x322c54,'unitId':_0x394a04},_0x2197c8=await this['_httpService'][_0x2bd61a(0x16d)](_0x2bd61a(0x134)+_0x394a04+_0x2bd61a(0x185),{'body':_0x371814});return!_0x2197c8[_0x2bd61a(0x15f)][_0x2bd61a(0x163)]||_0x2197c8[_0x2bd61a(0x15f)][_0x2bd61a(0x163)]['code']===0x1;}async[_0x3b96d7(0x130)](_0x7eba94,_0x394caa,_0x15c50e){const _0x1b9d65=_0x3b96d7,_0x54e98c={'unitId':_0x7eba94,'threadId':_0x15c50e},_0x527d95=await this[_0x1b9d65(0x183)][_0x1b9d65(0x16d)](_0x1b9d65(0x134)+_0x7eba94+'/list',{'body':_0x54e98c}),_0x19eb74=_0x15c50e['map'](_0x46777e=>_0x445731(_0x527d95[_0x1b9d65(0x15f)][_0x1b9d65(0x149)][_0x46777e],_0x7eba94,_0x394caa))[_0x1b9d65(0x144)](Boolean);return Object['values'](_0x527d95[_0x1b9d65(0x15f)][_0x1b9d65(0x13a)])[_0x1b9d65(0x174)](_0x493e31=>{const _0x284352=_0x1b9d65;this[_0x284352(0x1a9)][_0x284352(0x166)](_0x493e31);}),_0x19eb74;}['saveCommentToSnapshot'](_0x8ad77b){const _0x415532=_0x3b96d7;return{'id':_0x8ad77b['id'],'threadId':_0x8ad77b[_0x415532(0x160)],'ref':_0x8ad77b[_0x415532(0x15d)]};}};_0x51e779=_0x48981d([_0x117d22(0x0,_0x35d833['Inject'](_0xe56ba2['HTTPService'])),_0x117d22(0x1,_0x35d833[_0x3b96d7(0x162)](_0x35d833['UserManagerService'])),_0x117d22(0x2,_0x35d833['Inject'](_0x3fa7f6[_0x3b96d7(0x193)])),_0x117d22(0x3,_0x35d833[_0x3b96d7(0x162)](_0x35d833[_0x3b96d7(0x15a)]))],_0x51e779);var _0x29efab=Object[_0x3b96d7(0x186)],_0x3adec7=(_0x17b043,_0x4aac53,_0x3dc711,_0x5d5297)=>{const _0x31a49d=_0x3b96d7;for(var _0x1de0d7=_0x5d5297>0x1?void 0x0:_0x5d5297?_0x29efab(_0x4aac53,_0x3dc711):_0x4aac53,_0x521759=_0x17b043[_0x31a49d(0x14b)]-0x1,_0x5d69d9;_0x521759>=0x0;_0x521759--)(_0x5d69d9=_0x17b043[_0x521759])&&(_0x1de0d7=_0x5d69d9(_0x1de0d7)||_0x1de0d7);return _0x1de0d7;},_0x419881=(_0x2bee28,_0x1fd8bb)=>(_0x2be66c,_0xc92d2b)=>_0x1fd8bb(_0x2be66c,_0xc92d2b,_0x2bee28);let _0x138247=class extends _0x35d833[_0x3b96d7(0x167)]{constructor(_0x245992,_0xff3214){const _0x4dde28=_0x3b96d7;super(),this['_threadCommentDataSourceService']=_0x245992,this[_0x4dde28(0x1a1)]=_0xff3214,this['_initDataSource']();}[_0x3b96d7(0x135)](){const _0x33ffd2=_0x3b96d7;this[_0x33ffd2(0x19f)][_0x33ffd2(0x19d)]=this[_0x33ffd2(0x1a1)],this[_0x33ffd2(0x19f)]['syncUpdateMutationToColla']=!0x1;}};_0x138247=_0x3adec7([_0x419881(0x0,_0x2a68c7['IThreadCommentDataSourceService']),_0x419881(0x1,_0x35d833[_0x3b96d7(0x162)](_0x51e779))],_0x138247);var _0x4d39af=Object[_0x3b96d7(0x184)],_0x50455b=Object[_0x3b96d7(0x186)],_0x1f9a9e=(_0x3a69a8,_0x216278,_0x3f50d4)=>_0x216278 in _0x3a69a8?_0x4d39af(_0x3a69a8,_0x216278,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f50d4}):_0x3a69a8[_0x216278]=_0x3f50d4,_0x43f9af=(_0x3f495f,_0x1852e5,_0x314154,_0x3643f0)=>{const _0x4c5726=_0x3b96d7;for(var _0x17ffaf=_0x3643f0>0x1?void 0x0:_0x3643f0?_0x50455b(_0x1852e5,_0x314154):_0x1852e5,_0x3a32af=_0x3f495f[_0x4c5726(0x14b)]-0x1,_0x33045b;_0x3a32af>=0x0;_0x3a32af--)(_0x33045b=_0x3f495f[_0x3a32af])&&(_0x17ffaf=_0x33045b(_0x17ffaf)||_0x17ffaf);return _0x17ffaf;},_0x1375ad=(_0x2ae8ad,_0x43d52c)=>(_0x493761,_0x284106)=>_0x43d52c(_0x493761,_0x284106,_0x2ae8ad),_0xe8a4f3=(_0x4181cc,_0x21a87f,_0x18a77e)=>_0x1f9a9e(_0x4181cc,typeof _0x21a87f!=_0x3b96d7(0x146)?_0x21a87f+'':_0x21a87f,_0x18a77e);_0x5d245b[_0x3b96d7(0x136)]=class extends _0x35d833[_0x3b96d7(0x16e)]{constructor(_0xed6918=_0x1c9315,_0x119b29,_0x105875){const _0x21510a=_0x3b96d7;super(),this[_0x21510a(0x132)]=_0xed6918,this[_0x21510a(0x161)]=_0x119b29,this[_0x21510a(0x12f)]=_0x105875;const {..._0x269bb2}=_0x35d833['merge']({},_0x1c9315,this[_0x21510a(0x132)]);this['_configService']['setConfig'](_0x208c41,_0x269bb2);}[_0x3b96d7(0x17d)](){[[_0x51e779],[_0x138247],[_0x35cdc0]]['forEach'](_0x4dcf32=>{const _0x182eab=_0x5b28;this[_0x182eab(0x161)][_0x182eab(0x12d)](_0x4dcf32);});}[_0x3b96d7(0x1ac)](){const _0x11653c=_0x3b96d7;this['_injector'][_0x11653c(0x1a3)](_0x138247),this[_0x11653c(0x161)][_0x11653c(0x1a3)](_0x35cdc0);}},_0xe8a4f3(_0x5d245b[_0x3b96d7(0x136)],_0x3b96d7(0x147),_0x1a43bc),_0xe8a4f3(_0x5d245b[_0x3b96d7(0x136)],'type',_0x35d833[_0x3b96d7(0x180)][_0x3b96d7(0x150)]),_0x5d245b[_0x3b96d7(0x136)]=_0x43f9af([_0x35d833[_0x3b96d7(0x164)](_0x3e4da7[_0x3b96d7(0x153)],_0x3fa7f6[_0x3b96d7(0x192)],_0x309a95[_0x3b96d7(0x195)]),_0x1375ad(0x1,_0x35d833[_0x3b96d7(0x162)](_0x35d833[_0x3b96d7(0x15a)])),_0x1375ad(0x2,_0x35d833[_0x3b96d7(0x187)])],_0x5d245b[_0x3b96d7(0x136)]),Object[_0x3b96d7(0x184)](_0x5d245b,Symbol[_0x3b96d7(0x156)],{'value':_0x3b96d7(0x141)});}));
|
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-958639c",
|
|
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/
|
|
51
|
-
"@univerjs/network": "0.6.7-experimental.20250331-45dde91",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.7-experimental.20250331-958639c",
|
|
49
|
+
"@univerjs-pro/license": "0.6.7-experimental.20250331-958639c",
|
|
50
|
+
"@univerjs/network": "0.6.7-experimental.20250331-958639c",
|
|
52
51
|
"@univerjs/protocol": "0.1.45",
|
|
53
|
-
"@univerjs/thread-comment": "0.6.7-experimental.20250331-
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/thread-comment": "0.6.7-experimental.20250331-958639c",
|
|
53
|
+
"@univerjs/core": "0.6.7-experimental.20250331-958639c",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-958639c"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|