@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505091607 → 0.7.0-nightly.202505101606

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 CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x30cd26=_0x1c7d;(function(_0x565df1,_0x149dd3){const _0x3b6e75=_0x1c7d,_0x50f536=_0x565df1();while(!![]){try{const _0x280626=-parseInt(_0x3b6e75(0x16e))/0x1+parseInt(_0x3b6e75(0x1ca))/0x2+-parseInt(_0x3b6e75(0x1c8))/0x3+-parseInt(_0x3b6e75(0x1bb))/0x4+parseInt(_0x3b6e75(0x1a7))/0x5*(-parseInt(_0x3b6e75(0x1af))/0x6)+parseInt(_0x3b6e75(0x187))/0x7*(parseInt(_0x3b6e75(0x16a))/0x8)+parseInt(_0x3b6e75(0x1cc))/0x9;if(_0x280626===_0x149dd3)break;else _0x50f536['push'](_0x50f536['shift']());}catch(_0x41e2ea){_0x50f536['push'](_0x50f536['shift']());}}}(_0x4690,0x6cf58));Object[_0x30cd26(0x1b8)](exports,Symbol[_0x30cd26(0x181)],{'value':_0x30cd26(0x199)});const b=require(_0x30cd26(0x1c2)),T=require(_0x30cd26(0x1cf)),c=require(_0x30cd26(0x1df)),j=require(_0x30cd26(0x179)),M=require(_0x30cd26(0x1c5)),w=require(_0x30cd26(0x18d)),P=require(_0x30cd26(0x17e)),U=_0x30cd26(0x1ac);var I=(_0x3237aa=>(_0x3237aa[_0x3237aa['OpenOrReOpen']=0x0]=_0x30cd26(0x1b1),_0x3237aa[_0x3237aa['Solved']=0x1]=_0x30cd26(0x171),_0x3237aa[_0x3237aa[_0x30cd26(0x1da)]=-0x1]='UNRECOGNIZED',_0x3237aa))(I||{}),v=(_0x196f45=>(_0x196f45[_0x196f45[_0x30cd26(0x188)]=0x0]=_0x30cd26(0x188),_0x196f45[_0x196f45[_0x30cd26(0x1d8)]=0x1]='Add',_0x196f45[_0x196f45['Reply']=0x2]=_0x30cd26(0x18c),_0x196f45[_0x196f45['Edit']=0x3]=_0x30cd26(0x1d7),_0x196f45[_0x196f45[_0x30cd26(0x1b3)]=0x4]=_0x30cd26(0x1b3),_0x196f45[_0x196f45[_0x30cd26(0x1be)]=0x5]='Solve',_0x196f45[_0x196f45[_0x30cd26(0x1da)]=-0x1]=_0x30cd26(0x1da),_0x196f45))(v||{});const f=_0x3365ca=>c[_0x30cd26(0x1c6)](new Date(+_0x3365ca))[_0x30cd26(0x1bd)](_0x30cd26(0x1c0)),R=async(_0x4c51b6,_0x59cfe2)=>{const _0x4d1a78=_0x30cd26,_0x2621ab=_0x4c51b6[_0x4d1a78(0x1a4)](c['UserManagerService']),_0x44b102=_0x4c51b6[_0x4d1a78(0x1a4)](P['HTTPService']);_0x59cfe2[_0x4d1a78(0x1d6)](_0x1e63ac=>{_0x2621ab['getUser'](_0x1e63ac)&&_0x59cfe2['delete'](_0x1e63ac);}),_0x59cfe2[_0x4d1a78(0x180)]&&(await _0x44b102[_0x4d1a78(0x1a4)](_0x4d1a78(0x19d),{'params':{'userIDs':[..._0x59cfe2]}}))[_0x4d1a78(0x19c)][_0x4d1a78(0x192)]['forEach'](_0x1326cf=>{const _0x2004ac=_0x4d1a78;_0x1326cf&&_0x2621ab[_0x2004ac(0x19e)](_0x1326cf);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x117d20,_0x3dcbe7,_0x1593d1,_0x299827)=>{const _0x347834=_0x30cd26;for(var _0xfaa55e=_0x299827>0x1?void 0x0:_0x299827?$(_0x3dcbe7,_0x1593d1):_0x3dcbe7,_0x57a01c=_0x117d20[_0x347834(0x161)]-0x1,_0x5b6449;_0x57a01c>=0x0;_0x57a01c--)(_0x5b6449=_0x117d20[_0x57a01c])&&(_0xfaa55e=_0x5b6449(_0xfaa55e)||_0xfaa55e);return _0xfaa55e;},S=(_0xd57901,_0x4766f6)=>(_0x13e635,_0x5c7e84)=>_0x4766f6(_0x13e635,_0x5c7e84,_0xd57901);function _0x1c7d(_0x12d405,_0x11aaf2){const _0x4690ef=_0x4690();return _0x1c7d=function(_0x1c7d58,_0x22c36c){_0x1c7d58=_0x1c7d58-0x160;let _0x3cc8e9=_0x4690ef[_0x1c7d58];return _0x3cc8e9;},_0x1c7d(_0x12d405,_0x11aaf2);}let p=class extends c[_0x30cd26(0x1a8)]{constructor(_0x26ae39,_0x13fe5f,_0x36356f,_0x28ce6b){const _0x56e983=_0x30cd26;super(),this[_0x56e983(0x1e0)]=_0x26ae39,this['_threadCommentModel']=_0x13fe5f,this['_userService']=_0x36356f,this[_0x56e983(0x18e)]=_0x28ce6b,this[_0x56e983(0x1c4)](),this[_0x56e983(0x1bf)]();}[_0x30cd26(0x1bf)](){const _0x2d1ff9=_0x30cd26;this[_0x2d1ff9(0x163)](this['_threadCommentModel'][_0x2d1ff9(0x1a0)][_0x2d1ff9(0x1b5)](w[_0x2d1ff9(0x1cd)](0x10))[_0x2d1ff9(0x183)](_0x49d741=>{const _0xe72ce0=_0x2d1ff9,_0x1d567c=new Set();_0x49d741[_0xe72ce0(0x1d6)](_0x596871=>{const _0x38a62d=_0xe72ce0;switch(_0x596871[_0x38a62d(0x189)]){case _0x38a62d(0x172):{const _0x4bda80=_0x596871[_0x38a62d(0x1e1)][_0x38a62d(0x16b)];_0x1d567c['add'](_0x4bda80);break;}}}),R(this[_0xe72ce0(0x18e)],_0x1d567c);}));}[_0x30cd26(0x1c4)](){const _0x13147a=_0x30cd26;this[_0x13147a(0x163)](this['_commentService'][_0x13147a(0x1a0)][_0x13147a(0x183)](async _0x5bf622=>{const _0x57ad11=_0x13147a;var _0xdc88d3,_0x1109fa,_0x4c415f,_0x5a2c22;const _0x5c7d4e=(_0xdc88d3=this[_0x57ad11(0x173)]['getUnit'](_0x5bf622[_0x57ad11(0x196)])['find'](_0x12f4c3=>_0x12f4c3['threadId']===_0x5bf622[_0x57ad11(0x170)]))==null?void 0x0:_0xdc88d3['root'];if(!_0x5c7d4e)return;const {unitId:_0x40655c,subUnitId:_0x55b96f}=_0x5c7d4e;switch(_0x5bf622[_0x57ad11(0x1d2)]&&this[_0x57ad11(0x1d1)]['addUser'](_0x5bf622['user']),_0x5bf622['type']){case v['Add']:break;case v[_0x57ad11(0x18c)]:{this[_0x57ad11(0x173)]['addComment'](_0x40655c,_0x55b96f,{'unitId':_0x40655c,'subUnitId':_0x55b96f,'ref':'','id':_0x5bf622[_0x57ad11(0x1b9)],'dT':f(+_0x5bf622['createTimestamp']),'threadId':_0x5bf622['threadId'],'personId':(_0x4c415f=(_0x1109fa=_0x5bf622[_0x57ad11(0x1d2)])==null?void 0x0:_0x1109fa['userID'])!=null?_0x4c415f:_0x5bf622[_0x57ad11(0x198)],'text':JSON[_0x57ad11(0x17a)](_0x5bf622[_0x57ad11(0x175)]),'parentId':_0x5c7d4e['id']});break;}case v['Delete']:{const _0x377e22=this[_0x57ad11(0x173)][_0x57ad11(0x197)](_0x40655c,_0x55b96f,_0x5bf622[_0x57ad11(0x1b9)]);_0x377e22&&_0x377e22[_0x57ad11(0x1dc)]&&this[_0x57ad11(0x173)][_0x57ad11(0x1aa)](_0x40655c,_0x55b96f,_0x5bf622[_0x57ad11(0x1b9)]);break;}case v[_0x57ad11(0x1d7)]:{this[_0x57ad11(0x173)][_0x57ad11(0x1bc)](_0x40655c,_0x55b96f,{'commentId':_0x5bf622[_0x57ad11(0x1b9)],'text':JSON[_0x57ad11(0x17a)](_0x5bf622[_0x57ad11(0x175)])});break;}case v[_0x57ad11(0x1be)]:{const _0x3057ff=(_0x5a2c22=this['_threadCommentModel'][_0x57ad11(0x1a2)](_0x5bf622['unitId'])[_0x57ad11(0x165)](_0x1b9840=>_0x1b9840['threadId']===_0x5bf622[_0x57ad11(0x170)]))==null?void 0x0:_0x5a2c22[_0x57ad11(0x1a6)];_0x3057ff&&this[_0x57ad11(0x173)][_0x57ad11(0x164)](_0x40655c,_0x55b96f,_0x3057ff['id'],_0x5bf622[_0x57ad11(0x1b2)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x30cd26(0x1a1)](b[_0x30cd26(0x166)])),S(0x1,c[_0x30cd26(0x1a1)](M[_0x30cd26(0x1c9)])),S(0x2,c[_0x30cd26(0x1a1)](c['UserManagerService'])),S(0x3,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x185)]))],p);const q=_0x30cd26(0x1dd),D={};var A=Object[_0x30cd26(0x195)],x=(_0x6064ec,_0x5c2f2e,_0x431713,_0x1657b7)=>{const _0x212579=_0x30cd26;for(var _0x1a1c5e=_0x1657b7>0x1?void 0x0:_0x1657b7?A(_0x5c2f2e,_0x431713):_0x5c2f2e,_0x447df0=_0x6064ec[_0x212579(0x161)]-0x1,_0x6da1e;_0x447df0>=0x0;_0x447df0--)(_0x6da1e=_0x6064ec[_0x447df0])&&(_0x1a1c5e=_0x6da1e(_0x1a1c5e)||_0x1a1c5e);return _0x1a1c5e;},_=(_0xaf6d24,_0x145a71)=>(_0x5527f1,_0x512622)=>_0x145a71(_0x5527f1,_0x512622,_0xaf6d24);function Y(_0x2ea7bc,_0x47ecdf){const _0x188c24=_0x30cd26,_0x10ad6d=_0x2ea7bc[_0x188c24(0x169)][0x0];return{..._0x47ecdf,'id':_0x10ad6d[_0x188c24(0x1b9)],'resolved':_0x2ea7bc[_0x188c24(0x1b2)]===0x1,'dT':f(_0x10ad6d[_0x188c24(0x1b0)]),'personId':_0x10ad6d[_0x188c24(0x198)],'threadId':_0x10ad6d[_0x188c24(0x170)]};}function G(_0x2be311,_0x2335d6,_0x13d896){const _0x1c2166=_0x30cd26;var _0x4938d7,_0x54d7de;if(((_0x54d7de=(_0x4938d7=_0x2be311==null?void 0x0:_0x2be311['replies'])==null?void 0x0:_0x4938d7[_0x1c2166(0x161)])!=null?_0x54d7de:0x0)>0x0){const _0x1e1fec=(_0x2a8b19,_0x590405)=>({'id':_0x2a8b19['replyId'],'threadId':_0x2a8b19['threadId'],'dT':f(_0x2a8b19[_0x1c2166(0x1b0)]),'personId':_0x2a8b19[_0x1c2166(0x198)],'resolved':_0x2be311['solved']===I['Solved'],'unitId':_0x2335d6,'subUnitId':_0x13d896,'text':JSON[_0x1c2166(0x17a)](_0x2a8b19[_0x1c2166(0x175)]),'parentId':_0x590405}),_0x4036d0=_0x1e1fec(_0x2be311[_0x1c2166(0x169)][0x0]);return{..._0x4036d0,'children':_0x2be311['replies']['slice'](0x1)[_0x1c2166(0x19a)](_0x59b294=>_0x1e1fec(_0x59b294,_0x4036d0['id']))};}return null;}let g=class{constructor(_0x48dc46,_0x191903,_0x4da51c,_0x2b850a){const _0x12b89c=_0x30cd26;this['_httpService']=_0x48dc46,this[_0x12b89c(0x1d1)]=_0x191903,this[_0x12b89c(0x1a3)]=_0x4da51c,this[_0x12b89c(0x18e)]=_0x2b850a;}async['addComment'](_0x3a0fd8){const _0x44ca1b=_0x30cd26;var _0x349959,_0x2810ce;const {parentId:_0x51ec4d,unitId:_0x57aa42,text:_0x2438e2,threadId:_0x21e5e7}=_0x3a0fd8,_0x360023=(_0x2810ce=(_0x349959=_0x2438e2[_0x44ca1b(0x1ae)])==null?void 0x0:_0x349959[_0x44ca1b(0x18a)](_0x1fa900=>_0x1fa900[_0x44ca1b(0x178)]===c[_0x44ca1b(0x184)]['COMMENT'])[_0x44ca1b(0x19a)](_0x303d21=>_0x303d21[_0x44ca1b(0x1d5)]))!=null?_0x2810ce:[],_0x336dc1=JSON[_0x44ca1b(0x160)](_0x2438e2),_0x899a80=(await this[_0x44ca1b(0x1a3)]['requireSession'](_0x57aa42))[_0x44ca1b(0x17c)]();if(_0x51ec4d){const _0x1441fc={'memberId':_0x899a80,'unitId':_0x57aa42,'content':_0x336dc1,'mention':_0x360023,'threadId':_0x21e5e7},_0x22d9d1=(await this[_0x44ca1b(0x1b7)][_0x44ca1b(0x1d0)](_0x44ca1b(0x168)+_0x57aa42+_0x44ca1b(0x1ce),{'body':_0x1441fc}))[_0x44ca1b(0x19c)]['reply'];return{..._0x3a0fd8,'id':_0x22d9d1[_0x44ca1b(0x1b9)],'dT':c[_0x44ca1b(0x1c6)](+_0x22d9d1[_0x44ca1b(0x1b0)])[_0x44ca1b(0x1bd)](_0x44ca1b(0x1c0)),'personId':_0x22d9d1[_0x44ca1b(0x198)]};}else{const _0x384678={'memberId':_0x899a80,'unitId':_0x57aa42,'content':_0x336dc1,'mention':_0x360023},_0x5f5c15=await this['_httpService'][_0x44ca1b(0x1d0)](_0x44ca1b(0x168)+_0x57aa42+_0x44ca1b(0x1d9),{'body':_0x384678});return Y(_0x5f5c15[_0x44ca1b(0x19c)]['comment'],_0x3a0fd8);}}async[_0x30cd26(0x1bc)](_0x13b212){const _0x33e816=_0x30cd26;var _0xbcfa8,_0x30716c;const {text:_0x3629b6,unitId:_0x48e2ae}=_0x13b212,_0x1df643=(_0x30716c=(_0xbcfa8=_0x3629b6['customRanges'])==null?void 0x0:_0xbcfa8[_0x33e816(0x18a)](_0x3ce110=>_0x3ce110[_0x33e816(0x178)]===c[_0x33e816(0x184)][_0x33e816(0x17d)])['map'](_0x53dcae=>_0x53dcae[_0x33e816(0x1d5)]))!=null?_0x30716c:[],_0x566823=JSON['stringify'](_0x3629b6),_0x309dbe=_0x13b212[_0x33e816(0x170)],_0x2fb104=_0x13b212['id'],_0x517261={'memberId':(await this['_sessionService']['requireSession'](_0x48e2ae))[_0x33e816(0x17c)](),'unitId':_0x48e2ae,'threadId':_0x309dbe,'mention':_0x1df643,'content':_0x566823,'replyId':_0x2fb104},_0x56e023=await this[_0x33e816(0x1b7)]['post']('/universer-api/comment/unit/'+_0x48e2ae+'/edit',{'body':_0x517261});return!_0x56e023[_0x33e816(0x19c)][_0x33e816(0x18b)]||_0x56e023[_0x33e816(0x19c)]['error'][_0x33e816(0x16f)]===0x1;}async[_0x30cd26(0x164)](_0x5e49c9){const _0x1c6d4b=_0x30cd26,{unitId:_0x4b480c}=_0x5e49c9,_0x1f0f72=_0x5e49c9[_0x1c6d4b(0x170)],_0x2c1a7f={'memberId':this[_0x1c6d4b(0x1d1)][_0x1c6d4b(0x17b)]()[_0x1c6d4b(0x1d3)],'unitId':_0x4b480c,'threadId':_0x1f0f72,'solved':_0x5e49c9[_0x1c6d4b(0x177)]?I[_0x1c6d4b(0x171)]:I['OpenOrReOpen']},_0x20b34c=await this[_0x1c6d4b(0x1b7)][_0x1c6d4b(0x1d0)](_0x1c6d4b(0x168)+_0x4b480c+_0x1c6d4b(0x1cb),{'body':_0x2c1a7f});return!_0x20b34c[_0x1c6d4b(0x19c)][_0x1c6d4b(0x18b)]||_0x20b34c[_0x1c6d4b(0x19c)][_0x1c6d4b(0x18b)][_0x1c6d4b(0x16f)]===0x1;}async['deleteComment'](_0x52b489,_0x49fd05,_0x243fee,_0x5847fb){const _0x5ece00=_0x30cd26,_0x17100d={'memberId':(await this['_sessionService'][_0x5ece00(0x194)](_0x52b489))[_0x5ece00(0x17c)](),'threadId':_0x243fee,'replyId':_0x5847fb,'unitId':_0x52b489},_0x243760=await this[_0x5ece00(0x1b7)][_0x5ece00(0x1d0)](_0x5ece00(0x168)+_0x52b489+_0x5ece00(0x17f),{'body':_0x17100d});return!_0x243760[_0x5ece00(0x19c)][_0x5ece00(0x18b)]||_0x243760[_0x5ece00(0x19c)]['error']['code']===0x1;}async['listComments'](_0x544dac,_0x37327b,_0x2bba40){const _0xc3a720=_0x30cd26,_0xb79003={'unitId':_0x544dac,'threadId':_0x2bba40},_0x1a2bd7=await this[_0xc3a720(0x1b7)]['post'](_0xc3a720(0x168)+_0x544dac+_0xc3a720(0x1ab),{'body':_0xb79003}),_0x27b7af=_0x2bba40[_0xc3a720(0x19a)](_0x498c58=>G(_0x1a2bd7['body']['comments'][_0x498c58],_0x544dac,_0x37327b))[_0xc3a720(0x18a)](Boolean);return Object[_0xc3a720(0x1c7)](_0x1a2bd7[_0xc3a720(0x19c)][_0xc3a720(0x192)])[_0xc3a720(0x1d6)](_0x2e9256=>{const _0x3bd834=_0xc3a720;this[_0x3bd834(0x1d1)]['addUser'](_0x2e9256);}),_0x27b7af;}[_0x30cd26(0x174)](_0x8a90b2){return{'id':_0x8a90b2['id'],'threadId':_0x8a90b2['threadId'],'ref':_0x8a90b2['ref']};}};g=x([_(0x0,c['Inject'](P[_0x30cd26(0x1ad)])),_(0x1,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x186)])),_(0x2,c[_0x30cd26(0x1a1)](b[_0x30cd26(0x19f)])),_(0x3,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x185)]))],g);var H=Object[_0x30cd26(0x195)],J=(_0x162238,_0x1d0780,_0x5332a9,_0x2aa5ab)=>{const _0x4d715f=_0x30cd26;for(var _0x5851e9=_0x2aa5ab>0x1?void 0x0:_0x2aa5ab?H(_0x1d0780,_0x5332a9):_0x1d0780,_0x4377b3=_0x162238[_0x4d715f(0x161)]-0x1,_0x1ecdef;_0x4377b3>=0x0;_0x4377b3--)(_0x1ecdef=_0x162238[_0x4377b3])&&(_0x5851e9=_0x1ecdef(_0x5851e9)||_0x5851e9);return _0x5851e9;},y=(_0x21913c,_0x3254a0)=>(_0x3592a2,_0x3d060d)=>_0x3254a0(_0x3592a2,_0x3d060d,_0x21913c);let C=class extends c[_0x30cd26(0x1a8)]{constructor(_0x51570e,_0xfa69b6){const _0x5220b6=_0x30cd26;super(),this['_threadCommentDataSourceService']=_0x51570e,this['_threadCommentDataSource']=_0xfa69b6,this[_0x5220b6(0x16d)]();}[_0x30cd26(0x16d)](){const _0x3ab2ce=_0x30cd26;this[_0x3ab2ce(0x193)][_0x3ab2ce(0x182)]=this[_0x3ab2ce(0x16c)],this['_threadCommentDataSourceService'][_0x3ab2ce(0x1b6)]=!0x1;}};C=J([y(0x0,M[_0x30cd26(0x162)]),y(0x1,c[_0x30cd26(0x1a1)](g))],C);var F=Object[_0x30cd26(0x1b8)],L=Object[_0x30cd26(0x195)],Z=(_0x397d5f,_0x1ac877,_0x314435)=>_0x1ac877 in _0x397d5f?F(_0x397d5f,_0x1ac877,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x314435}):_0x397d5f[_0x1ac877]=_0x314435,W=(_0x51073d,_0x122d88,_0x23f6c7,_0x29a753)=>{const _0x140739=_0x30cd26;for(var _0x1ed6b7=_0x29a753>0x1?void 0x0:_0x29a753?L(_0x122d88,_0x23f6c7):_0x122d88,_0x25c601=_0x51073d[_0x140739(0x161)]-0x1,_0x4d6f9b;_0x25c601>=0x0;_0x25c601--)(_0x4d6f9b=_0x51073d[_0x25c601])&&(_0x1ed6b7=_0x4d6f9b(_0x1ed6b7)||_0x1ed6b7);return _0x1ed6b7;},O=(_0x2c9e45,_0x4b1b20)=>(_0x5deee5,_0x4c9b6a)=>_0x4b1b20(_0x5deee5,_0x4c9b6a,_0x2c9e45),N=(_0x218633,_0x19cdc0,_0x1d0f45)=>Z(_0x218633,typeof _0x19cdc0!=_0x30cd26(0x1db)?_0x19cdc0+'':_0x19cdc0,_0x1d0f45);function _0x4690(){const _0x4ad64b=['users','_threadCommentDataSourceService','requireSession','getOwnPropertyDescriptor','unitId','getComment','userId','Module','map','UniverThreadCommentDataSourcePlugin','body','/universer-api/user/list','addUser','CollaborationSessionService','commentUpdate$','Inject','getUnit','_sessionService','get','onStarting','root','25OmhZIT','Disposable','setConfig','deleteComment','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','HTTPService','customRanges','540546jTPMUk','createTimestamp','OpenOrReOpen','solved','Delete','UniverCollaborationClientPlugin','pipe','syncUpdateMutationToColla','_httpService','defineProperty','replyId','Plugin','2729556JKpdRb','updateComment','format','Solve','_initUserSync','YYYY/MM/DD\x20HH:mm','DependentOn','@univerjs-pro/collaboration-client','UniverThreadCommentUIPlugin','_init','@univerjs/thread-comment','dayjs','values','1194417NoFvUd','ThreadCommentModel','856670muPLIt','/solved','16124868WDrdtF','bufferTime','/reply','@univerjs-pro/license','post','_userService','user','userID','_config','rangeId','forEach','Edit','Add','/add','UNRECOGNIZED','symbol','parentId','thread-comment-data-source.config','UniverInstanceType','@univerjs/core','_commentService','payload','stringify','length','IThreadCommentDataSourceService','disposeWithMe','resolveComment','find','CommentService','onReady','/universer-api/comment/unit/','replies','104AmbHkY','personId','_threadCommentDataSource','_initDataSource','473601FLaUbL','code','threadId','Solved','add','_threadCommentModel','saveCommentToSnapshot','content','UNIVER_UNKNOWN','resolved','rangeType','@univerjs/thread-comment-ui','parse','getCurrentUser','getMemberID','COMMENT','@univerjs/network','/delete','size','toStringTag','dataSource','subscribe','CustomRangeType','Injector','UserManagerService','124327dcxRLU','Unknown','type','filter','error','Reply','rxjs','_injector','merge','pluginName','_configService'];_0x4690=function(){return _0x4ad64b;};return _0x4690();}exports[_0x30cd26(0x19b)]=class extends c[_0x30cd26(0x1ba)]{constructor(_0x2c6ed0=D,_0x578323,_0x599aca){const _0x3176b5=_0x30cd26;super(),this[_0x3176b5(0x1d4)]=_0x2c6ed0,this['_injector']=_0x578323,this[_0x3176b5(0x191)]=_0x599aca;const {..._0x2de1be}=c[_0x3176b5(0x18f)]({},D,this[_0x3176b5(0x1d4)]);this[_0x3176b5(0x191)][_0x3176b5(0x1a9)](q,_0x2de1be);}[_0x30cd26(0x1a5)](){[[g],[C],[p]]['forEach'](_0x3e422e=>{const _0x1b7307=_0x1c7d;this['_injector'][_0x1b7307(0x172)](_0x3e422e);});}[_0x30cd26(0x167)](){const _0x2b9c5a=_0x30cd26;this[_0x2b9c5a(0x18e)][_0x2b9c5a(0x1a4)](C),this[_0x2b9c5a(0x18e)]['get'](p);}},N(exports[_0x30cd26(0x19b)],_0x30cd26(0x190),U),N(exports[_0x30cd26(0x19b)],'type',c[_0x30cd26(0x1de)][_0x30cd26(0x176)]),exports[_0x30cd26(0x19b)]=W([c[_0x30cd26(0x1c1)](j[_0x30cd26(0x1c3)],b[_0x30cd26(0x1b4)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x30cd26(0x185)])),O(0x2,c['IConfigService'])],exports[_0x30cd26(0x19b)]);
1
+ 'use strict';const _0x3478b9=_0x8a9a;(function(_0x3026bd,_0x2c0299){const _0x2f6fb9=_0x8a9a,_0x22065d=_0x3026bd();while(!![]){try{const _0x519c03=parseInt(_0x2f6fb9(0x19e))/0x1*(parseInt(_0x2f6fb9(0x1e9))/0x2)+parseInt(_0x2f6fb9(0x1a8))/0x3+-parseInt(_0x2f6fb9(0x1c5))/0x4*(-parseInt(_0x2f6fb9(0x17b))/0x5)+-parseInt(_0x2f6fb9(0x16e))/0x6+-parseInt(_0x2f6fb9(0x177))/0x7+parseInt(_0x2f6fb9(0x189))/0x8+-parseInt(_0x2f6fb9(0x1c0))/0x9*(-parseInt(_0x2f6fb9(0x1e0))/0xa);if(_0x519c03===_0x2c0299)break;else _0x22065d['push'](_0x22065d['shift']());}catch(_0x3393ee){_0x22065d['push'](_0x22065d['shift']());}}}(_0x8019,0xeda54));Object[_0x3478b9(0x1c4)](exports,Symbol[_0x3478b9(0x1da)],{'value':_0x3478b9(0x1c6)});const b=require(_0x3478b9(0x181)),T=require(_0x3478b9(0x1a2)),c=require(_0x3478b9(0x18f)),j=require(_0x3478b9(0x180)),M=require('@univerjs/thread-comment'),w=require(_0x3478b9(0x182)),P=require(_0x3478b9(0x1b9)),U=_0x3478b9(0x173);var I=(_0x3e63f0=>(_0x3e63f0[_0x3e63f0[_0x3478b9(0x1b7)]=0x0]=_0x3478b9(0x1b7),_0x3e63f0[_0x3e63f0[_0x3478b9(0x196)]=0x1]=_0x3478b9(0x196),_0x3e63f0[_0x3e63f0[_0x3478b9(0x195)]=-0x1]=_0x3478b9(0x195),_0x3e63f0))(I||{}),v=(_0x77330d=>(_0x77330d[_0x77330d[_0x3478b9(0x1df)]=0x0]=_0x3478b9(0x1df),_0x77330d[_0x77330d[_0x3478b9(0x170)]=0x1]='Add',_0x77330d[_0x77330d[_0x3478b9(0x1c7)]=0x2]=_0x3478b9(0x1c7),_0x77330d[_0x77330d[_0x3478b9(0x1d8)]=0x3]=_0x3478b9(0x1d8),_0x77330d[_0x77330d[_0x3478b9(0x1ce)]=0x4]=_0x3478b9(0x1ce),_0x77330d[_0x77330d[_0x3478b9(0x1a9)]=0x5]=_0x3478b9(0x1a9),_0x77330d[_0x77330d[_0x3478b9(0x195)]=-0x1]=_0x3478b9(0x195),_0x77330d))(v||{});const f=_0x22b919=>c[_0x3478b9(0x1bf)](new Date(+_0x22b919))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5e324d,_0x212912)=>{const _0x46950a=_0x3478b9,_0x11149c=_0x5e324d[_0x46950a(0x187)](c['UserManagerService']),_0x4c1a9a=_0x5e324d[_0x46950a(0x187)](P[_0x46950a(0x19d)]);_0x212912[_0x46950a(0x174)](_0x35e1a7=>{const _0x51e679=_0x46950a;_0x11149c[_0x51e679(0x1d4)](_0x35e1a7)&&_0x212912[_0x51e679(0x1e4)](_0x35e1a7);}),_0x212912[_0x46950a(0x1b3)]&&(await _0x4c1a9a['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x212912]}}))[_0x46950a(0x1ad)][_0x46950a(0x16f)][_0x46950a(0x174)](_0xc21689=>{_0xc21689&&_0x11149c['addUser'](_0xc21689);});};function _0x8a9a(_0x44ef8c,_0x3bf356){const _0x80190=_0x8019();return _0x8a9a=function(_0x8a9aa1,_0x343b89){_0x8a9aa1=_0x8a9aa1-0x16d;let _0x29c6a9=_0x80190[_0x8a9aa1];return _0x29c6a9;},_0x8a9a(_0x44ef8c,_0x3bf356);}var $=Object[_0x3478b9(0x1af)],E=(_0x28f6d7,_0x513959,_0x1c2a4a,_0x967956)=>{for(var _0x23e45f=_0x967956>0x1?void 0x0:_0x967956?$(_0x513959,_0x1c2a4a):_0x513959,_0x3b8993=_0x28f6d7['length']-0x1,_0x3e223e;_0x3b8993>=0x0;_0x3b8993--)(_0x3e223e=_0x28f6d7[_0x3b8993])&&(_0x23e45f=_0x3e223e(_0x23e45f)||_0x23e45f);return _0x23e45f;},S=(_0x1c8fe5,_0x593feb)=>(_0x87453e,_0x399d94)=>_0x593feb(_0x87453e,_0x399d94,_0x1c8fe5);let p=class extends c[_0x3478b9(0x191)]{constructor(_0x219c72,_0x2f5baf,_0x5ee0df,_0x5c76c7){const _0x23f1a7=_0x3478b9;super(),this[_0x23f1a7(0x1cd)]=_0x219c72,this['_threadCommentModel']=_0x2f5baf,this[_0x23f1a7(0x1a1)]=_0x5ee0df,this[_0x23f1a7(0x1ba)]=_0x5c76c7,this[_0x23f1a7(0x18e)](),this['_initUserSync']();}[_0x3478b9(0x1d7)](){const _0x2aca22=_0x3478b9;this['disposeWithMe'](this[_0x2aca22(0x1e5)][_0x2aca22(0x188)][_0x2aca22(0x1e1)](w[_0x2aca22(0x1ae)](0x10))['subscribe'](_0x5bae9e=>{const _0x2bbddc=_0x2aca22,_0x2ad42=new Set();_0x5bae9e['forEach'](_0x5e232b=>{const _0x149ecf=_0x8a9a;switch(_0x5e232b[_0x149ecf(0x178)]){case'add':{const _0x4eb01e=_0x5e232b['payload']['personId'];_0x2ad42[_0x149ecf(0x179)](_0x4eb01e);break;}}}),R(this[_0x2bbddc(0x1ba)],_0x2ad42);}));}[_0x3478b9(0x18e)](){const _0x2ba9d8=_0x3478b9;this[_0x2ba9d8(0x1ed)](this[_0x2ba9d8(0x1cd)][_0x2ba9d8(0x188)][_0x2ba9d8(0x199)](async _0x2b0d89=>{const _0x5cd72f=_0x2ba9d8;var _0x3a4ce5,_0x58837e,_0x32db6b,_0x4a7949;const _0x58869b=(_0x3a4ce5=this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1b5)](_0x2b0d89[_0x5cd72f(0x1ca)])[_0x5cd72f(0x1dd)](_0x4a65a0=>_0x4a65a0[_0x5cd72f(0x184)]===_0x2b0d89['threadId']))==null?void 0x0:_0x3a4ce5[_0x5cd72f(0x18d)];if(!_0x58869b)return;const {unitId:_0x342ef4,subUnitId:_0xdc78a9}=_0x58869b;switch(_0x2b0d89['user']&&this['_userService'][_0x5cd72f(0x175)](_0x2b0d89[_0x5cd72f(0x1db)]),_0x2b0d89[_0x5cd72f(0x178)]){case v[_0x5cd72f(0x170)]:break;case v[_0x5cd72f(0x1c7)]:{this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1c8)](_0x342ef4,_0xdc78a9,{'unitId':_0x342ef4,'subUnitId':_0xdc78a9,'ref':'','id':_0x2b0d89[_0x5cd72f(0x171)],'dT':f(+_0x2b0d89[_0x5cd72f(0x1aa)]),'threadId':_0x2b0d89[_0x5cd72f(0x184)],'personId':(_0x32db6b=(_0x58837e=_0x2b0d89[_0x5cd72f(0x1db)])==null?void 0x0:_0x58837e[_0x5cd72f(0x1e8)])!=null?_0x32db6b:_0x2b0d89[_0x5cd72f(0x1d1)],'text':JSON[_0x5cd72f(0x1eb)](_0x2b0d89[_0x5cd72f(0x176)]),'parentId':_0x58869b['id']});break;}case v[_0x5cd72f(0x1ce)]:{const _0x2d85f3=this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1cb)](_0x342ef4,_0xdc78a9,_0x2b0d89[_0x5cd72f(0x171)]);_0x2d85f3&&_0x2d85f3[_0x5cd72f(0x16d)]&&this[_0x5cd72f(0x1e5)]['deleteComment'](_0x342ef4,_0xdc78a9,_0x2b0d89[_0x5cd72f(0x171)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x5cd72f(0x1d9)](_0x342ef4,_0xdc78a9,{'commentId':_0x2b0d89[_0x5cd72f(0x171)],'text':JSON[_0x5cd72f(0x1eb)](_0x2b0d89[_0x5cd72f(0x176)])});break;}case v[_0x5cd72f(0x1a9)]:{const _0x36b727=(_0x4a7949=this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1b5)](_0x2b0d89[_0x5cd72f(0x1ca)])[_0x5cd72f(0x1dd)](_0x518ddd=>_0x518ddd['threadId']===_0x2b0d89[_0x5cd72f(0x184)]))==null?void 0x0:_0x4a7949[_0x5cd72f(0x18d)];_0x36b727&&this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1d2)](_0x342ef4,_0xdc78a9,_0x36b727['id'],_0x2b0d89[_0x5cd72f(0x1c9)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3478b9(0x1e7)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x3478b9(0x1b0)])),S(0x3,c[_0x3478b9(0x1a5)](c[_0x3478b9(0x1ec)]))],p);const q=_0x3478b9(0x1de),D={};var A=Object[_0x3478b9(0x1af)],x=(_0x520a53,_0x3a7bce,_0x30f83e,_0xc4fed1)=>{const _0x5340e5=_0x3478b9;for(var _0x59ba07=_0xc4fed1>0x1?void 0x0:_0xc4fed1?A(_0x3a7bce,_0x30f83e):_0x3a7bce,_0x39e542=_0x520a53[_0x5340e5(0x1a4)]-0x1,_0x4807e3;_0x39e542>=0x0;_0x39e542--)(_0x4807e3=_0x520a53[_0x39e542])&&(_0x59ba07=_0x4807e3(_0x59ba07)||_0x59ba07);return _0x59ba07;},_=(_0x3e01a0,_0x5b6758)=>(_0x255259,_0x3fb10a)=>_0x5b6758(_0x255259,_0x3fb10a,_0x3e01a0);function Y(_0x101e64,_0x22d75c){const _0x489838=_0x3478b9,_0x4309f7=_0x101e64[_0x489838(0x1be)][0x0];return{..._0x22d75c,'id':_0x4309f7[_0x489838(0x171)],'resolved':_0x101e64[_0x489838(0x1c9)]===0x1,'dT':f(_0x4309f7['createTimestamp']),'personId':_0x4309f7[_0x489838(0x1d1)],'threadId':_0x4309f7['threadId']};}function G(_0x20605d,_0x44c58b,_0x1587ae){const _0x4cd102=_0x3478b9;var _0x2d0568,_0x285bd8;if(((_0x285bd8=(_0x2d0568=_0x20605d==null?void 0x0:_0x20605d[_0x4cd102(0x1be)])==null?void 0x0:_0x2d0568[_0x4cd102(0x1a4)])!=null?_0x285bd8:0x0)>0x0){const _0x224fcc=(_0x4c77d0,_0x41d7ca)=>({'id':_0x4c77d0['replyId'],'threadId':_0x4c77d0[_0x4cd102(0x184)],'dT':f(_0x4c77d0['createTimestamp']),'personId':_0x4c77d0['userId'],'resolved':_0x20605d[_0x4cd102(0x1c9)]===I['Solved'],'unitId':_0x44c58b,'subUnitId':_0x1587ae,'text':JSON[_0x4cd102(0x1eb)](_0x4c77d0[_0x4cd102(0x176)]),'parentId':_0x41d7ca}),_0x4072be=_0x224fcc(_0x20605d['replies'][0x0]);return{..._0x4072be,'children':_0x20605d[_0x4cd102(0x1be)][_0x4cd102(0x1d0)](0x1)[_0x4cd102(0x1bc)](_0x4f7233=>_0x224fcc(_0x4f7233,_0x4072be['id']))};}return null;}let g=class{constructor(_0x1da2e6,_0x6aed5c,_0x312703,_0x3024c9){const _0x411eef=_0x3478b9;this['_httpService']=_0x1da2e6,this[_0x411eef(0x1a1)]=_0x6aed5c,this[_0x411eef(0x193)]=_0x312703,this[_0x411eef(0x1ba)]=_0x3024c9;}async['addComment'](_0x1d04d9){const _0x1a40a1=_0x3478b9;var _0x1973f2,_0xab018b;const {parentId:_0x3847fc,unitId:_0x5c7a54,text:_0x4b6991,threadId:_0x1b451a}=_0x1d04d9,_0x13b4d9=(_0xab018b=(_0x1973f2=_0x4b6991[_0x1a40a1(0x197)])==null?void 0x0:_0x1973f2['filter'](_0xdedc67=>_0xdedc67['rangeType']===c['CustomRangeType']['COMMENT'])[_0x1a40a1(0x1bc)](_0x3d6d9f=>_0x3d6d9f[_0x1a40a1(0x1e2)]))!=null?_0xab018b:[],_0x5b06aa=JSON[_0x1a40a1(0x1b1)](_0x4b6991),_0x1995b4=(await this[_0x1a40a1(0x193)][_0x1a40a1(0x1ee)](_0x5c7a54))[_0x1a40a1(0x18a)]();if(_0x3847fc){const _0x7c5c49={'memberId':_0x1995b4,'unitId':_0x5c7a54,'content':_0x5b06aa,'mention':_0x13b4d9,'threadId':_0x1b451a},_0x34c41=(await this[_0x1a40a1(0x19c)]['post'](_0x1a40a1(0x1b6)+_0x5c7a54+_0x1a40a1(0x1e6),{'body':_0x7c5c49}))['body'][_0x1a40a1(0x1dc)];return{..._0x1d04d9,'id':_0x34c41[_0x1a40a1(0x171)],'dT':c['dayjs'](+_0x34c41[_0x1a40a1(0x1aa)])[_0x1a40a1(0x17c)](_0x1a40a1(0x1a6)),'personId':_0x34c41[_0x1a40a1(0x1d1)]};}else{const _0x229c8b={'memberId':_0x1995b4,'unitId':_0x5c7a54,'content':_0x5b06aa,'mention':_0x13b4d9},_0x5106f3=await this[_0x1a40a1(0x19c)]['post'](_0x1a40a1(0x1b6)+_0x5c7a54+_0x1a40a1(0x1a0),{'body':_0x229c8b});return Y(_0x5106f3['body'][_0x1a40a1(0x183)],_0x1d04d9);}}async[_0x3478b9(0x1d9)](_0x171701){const _0x14f089=_0x3478b9;var _0x8255a9,_0x4d56aa;const {text:_0x2d4071,unitId:_0x319084}=_0x171701,_0x69e51=(_0x4d56aa=(_0x8255a9=_0x2d4071[_0x14f089(0x197)])==null?void 0x0:_0x8255a9[_0x14f089(0x19f)](_0xad042d=>_0xad042d[_0x14f089(0x1b2)]===c[_0x14f089(0x185)][_0x14f089(0x18c)])[_0x14f089(0x1bc)](_0x259494=>_0x259494[_0x14f089(0x1e2)]))!=null?_0x4d56aa:[],_0x5f14d8=JSON[_0x14f089(0x1b1)](_0x2d4071),_0x5a8c7b=_0x171701[_0x14f089(0x184)],_0xd90b3b=_0x171701['id'],_0x40720c={'memberId':(await this[_0x14f089(0x193)][_0x14f089(0x1ee)](_0x319084))[_0x14f089(0x18a)](),'unitId':_0x319084,'threadId':_0x5a8c7b,'mention':_0x69e51,'content':_0x5f14d8,'replyId':_0xd90b3b},_0x293620=await this[_0x14f089(0x19c)]['post']('/universer-api/comment/unit/'+_0x319084+_0x14f089(0x17a),{'body':_0x40720c});return!_0x293620[_0x14f089(0x1ad)][_0x14f089(0x186)]||_0x293620[_0x14f089(0x1ad)][_0x14f089(0x186)]['code']===0x1;}async[_0x3478b9(0x1d2)](_0x439c61){const _0x5f0e67=_0x3478b9,{unitId:_0x30ee71}=_0x439c61,_0x1aef72=_0x439c61['threadId'],_0x2ea9cc={'memberId':this[_0x5f0e67(0x1a1)][_0x5f0e67(0x1ea)]()[_0x5f0e67(0x1e8)],'unitId':_0x30ee71,'threadId':_0x1aef72,'solved':_0x439c61[_0x5f0e67(0x18b)]?I[_0x5f0e67(0x196)]:I['OpenOrReOpen']},_0x5c0660=await this[_0x5f0e67(0x19c)][_0x5f0e67(0x1cf)](_0x5f0e67(0x1b6)+_0x30ee71+_0x5f0e67(0x1c2),{'body':_0x2ea9cc});return!_0x5c0660[_0x5f0e67(0x1ad)][_0x5f0e67(0x186)]||_0x5c0660[_0x5f0e67(0x1ad)]['error'][_0x5f0e67(0x198)]===0x1;}async[_0x3478b9(0x172)](_0x2f859a,_0x20b005,_0x46f82b,_0x185c92){const _0x29b07e=_0x3478b9,_0x509235={'memberId':(await this[_0x29b07e(0x193)][_0x29b07e(0x1ee)](_0x2f859a))[_0x29b07e(0x18a)](),'threadId':_0x46f82b,'replyId':_0x185c92,'unitId':_0x2f859a},_0xe2246e=await this[_0x29b07e(0x19c)][_0x29b07e(0x1cf)](_0x29b07e(0x1b6)+_0x2f859a+'/delete',{'body':_0x509235});return!_0xe2246e[_0x29b07e(0x1ad)][_0x29b07e(0x186)]||_0xe2246e[_0x29b07e(0x1ad)][_0x29b07e(0x186)]['code']===0x1;}async[_0x3478b9(0x1b8)](_0x1b367b,_0xc129c,_0x2c3f8e){const _0x37e4dd=_0x3478b9,_0x3d76bf={'unitId':_0x1b367b,'threadId':_0x2c3f8e},_0x270cf5=await this[_0x37e4dd(0x19c)][_0x37e4dd(0x1cf)](_0x37e4dd(0x1b6)+_0x1b367b+_0x37e4dd(0x190),{'body':_0x3d76bf}),_0x4a63da=_0x2c3f8e[_0x37e4dd(0x1bc)](_0x46c9f1=>G(_0x270cf5[_0x37e4dd(0x1ad)][_0x37e4dd(0x17f)][_0x46c9f1],_0x1b367b,_0xc129c))[_0x37e4dd(0x19f)](Boolean);return Object[_0x37e4dd(0x1ab)](_0x270cf5['body'][_0x37e4dd(0x16f)])[_0x37e4dd(0x174)](_0x54dad1=>{this['_userService']['addUser'](_0x54dad1);}),_0x4a63da;}['saveCommentToSnapshot'](_0x4f45da){return{'id':_0x4f45da['id'],'threadId':_0x4f45da['threadId'],'ref':_0x4f45da['ref']};}};g=x([_(0x0,c[_0x3478b9(0x1a5)](P[_0x3478b9(0x19d)])),_(0x1,c['Inject'](c[_0x3478b9(0x1b0)])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x3478b9(0x1af)],J=(_0x30d4c2,_0x46ca5e,_0x3304e1,_0x216738)=>{const _0x8b33d1=_0x3478b9;for(var _0x198de7=_0x216738>0x1?void 0x0:_0x216738?H(_0x46ca5e,_0x3304e1):_0x46ca5e,_0x3d3999=_0x30d4c2[_0x8b33d1(0x1a4)]-0x1,_0x5af5a4;_0x3d3999>=0x0;_0x3d3999--)(_0x5af5a4=_0x30d4c2[_0x3d3999])&&(_0x198de7=_0x5af5a4(_0x198de7)||_0x198de7);return _0x198de7;},y=(_0x4d3b17,_0x1cd678)=>(_0x424b9e,_0x8348d2)=>_0x1cd678(_0x424b9e,_0x8348d2,_0x4d3b17);function _0x8019(){const _0x3a62e3=['UniverLicensePlugin','getUser','_threadCommentDataSourceService','_threadCommentDataSource','_initUserSync','Edit','updateComment','toStringTag','user','reply','find','thread-comment-data-source.config','Unknown','10149860tixchb','pipe','rangeId','DependentOn','delete','_threadCommentModel','/reply','CommentService','userID','13142QPDItm','getCurrentUser','parse','Injector','disposeWithMe','requireSession','parentId','3301836VgzCpZ','users','Add','replyId','deleteComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','forEach','addUser','content','11549881UwjOGM','type','add','/edit','3394355ulKFEG','format','IConfigService','UniverThreadCommentDataSourcePlugin','comments','@univerjs/thread-comment-ui','@univerjs-pro/collaboration-client','rxjs','comment','threadId','CustomRangeType','error','get','commentUpdate$','1786576OQErKl','getMemberID','resolved','COMMENT','root','_init','@univerjs/core','/list','Disposable','_configService','_sessionService','pluginName','UNRECOGNIZED','Solved','customRanges','code','subscribe','_initDataSource','setConfig','_httpService','HTTPService','33NxFBtg','filter','/add','_userService','@univerjs-pro/license','syncUpdateMutationToColla','length','Inject','YYYY/MM/DD\x20HH:mm','IThreadCommentDataSourceService','1082376eOUWzV','Solve','createTimestamp','values','_config','body','bufferTime','getOwnPropertyDescriptor','UserManagerService','stringify','rangeType','size','UniverInstanceType','getUnit','/universer-api/comment/unit/','OpenOrReOpen','listComments','@univerjs/network','_injector','symbol','map','dataSource','replies','dayjs','9VGeNMS','onReady','/solved','Plugin','defineProperty','8IRBGAB','Module','Reply','addComment','solved','unitId','getComment','UniverThreadCommentUIPlugin','_commentService','Delete','post','slice','userId','resolveComment'];_0x8019=function(){return _0x3a62e3;};return _0x8019();}let C=class extends c['Disposable']{constructor(_0x42036c,_0xb26637){const _0x4e25b5=_0x3478b9;super(),this[_0x4e25b5(0x1d5)]=_0x42036c,this[_0x4e25b5(0x1d6)]=_0xb26637,this[_0x4e25b5(0x19a)]();}[_0x3478b9(0x19a)](){const _0x3f58db=_0x3478b9;this[_0x3f58db(0x1d5)][_0x3f58db(0x1bd)]=this[_0x3f58db(0x1d6)],this['_threadCommentDataSourceService'][_0x3f58db(0x1a3)]=!0x1;}};C=J([y(0x0,M[_0x3478b9(0x1a7)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x3478b9(0x1c4)],L=Object[_0x3478b9(0x1af)],Z=(_0x43c548,_0x4c4da7,_0x54fbbc)=>_0x4c4da7 in _0x43c548?F(_0x43c548,_0x4c4da7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x54fbbc}):_0x43c548[_0x4c4da7]=_0x54fbbc,W=(_0x1d6222,_0x54214a,_0x33270a,_0x32b8e3)=>{const _0x12998d=_0x3478b9;for(var _0x5d20a5=_0x32b8e3>0x1?void 0x0:_0x32b8e3?L(_0x54214a,_0x33270a):_0x54214a,_0x30c3c8=_0x1d6222[_0x12998d(0x1a4)]-0x1,_0x27db2f;_0x30c3c8>=0x0;_0x30c3c8--)(_0x27db2f=_0x1d6222[_0x30c3c8])&&(_0x5d20a5=_0x27db2f(_0x5d20a5)||_0x5d20a5);return _0x5d20a5;},O=(_0x471d1d,_0x26747c)=>(_0xa26d93,_0xc6f820)=>_0x26747c(_0xa26d93,_0xc6f820,_0x471d1d),N=(_0xef5320,_0x31402a,_0x4bb0f3)=>Z(_0xef5320,typeof _0x31402a!=_0x3478b9(0x1bb)?_0x31402a+'':_0x31402a,_0x4bb0f3);exports[_0x3478b9(0x17e)]=class extends c[_0x3478b9(0x1c3)]{constructor(_0xbbe300=D,_0x8b2d1b,_0x2942c1){const _0x30fd2b=_0x3478b9;super(),this['_config']=_0xbbe300,this[_0x30fd2b(0x1ba)]=_0x8b2d1b,this[_0x30fd2b(0x192)]=_0x2942c1;const {..._0x320289}=c['merge']({},D,this[_0x30fd2b(0x1ac)]);this[_0x30fd2b(0x192)][_0x30fd2b(0x19b)](q,_0x320289);}['onStarting'](){const _0x40c44d=_0x3478b9;[[g],[C],[p]][_0x40c44d(0x174)](_0x4231a1=>{const _0x2c1154=_0x40c44d;this[_0x2c1154(0x1ba)][_0x2c1154(0x179)](_0x4231a1);});}[_0x3478b9(0x1c1)](){const _0x11b83b=_0x3478b9;this[_0x11b83b(0x1ba)][_0x11b83b(0x187)](C),this[_0x11b83b(0x1ba)]['get'](p);}},N(exports[_0x3478b9(0x17e)],_0x3478b9(0x194),U),N(exports[_0x3478b9(0x17e)],_0x3478b9(0x178),c[_0x3478b9(0x1b4)]['UNIVER_UNKNOWN']),exports[_0x3478b9(0x17e)]=W([c[_0x3478b9(0x1e3)](j[_0x3478b9(0x1cc)],b['UniverCollaborationClientPlugin'],T[_0x3478b9(0x1d3)]),O(0x1,c[_0x3478b9(0x1a5)](c[_0x3478b9(0x1ec)])),O(0x2,c[_0x3478b9(0x17d)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x228950=_0x496a;(function(_0x2e629a,_0x238f1f){const _0x3b6c98=_0x496a,_0x2be1d7=_0x2e629a();while(!![]){try{const _0x24f24e=parseInt(_0x3b6c98(0x13b))/0x1*(parseInt(_0x3b6c98(0x10b))/0x2)+-parseInt(_0x3b6c98(0x108))/0x3*(parseInt(_0x3b6c98(0x11c))/0x4)+-parseInt(_0x3b6c98(0xfb))/0x5+parseInt(_0x3b6c98(0x11d))/0x6+parseInt(_0x3b6c98(0x153))/0x7+parseInt(_0x3b6c98(0x13e))/0x8*(-parseInt(_0x3b6c98(0x156))/0x9)+-parseInt(_0x3b6c98(0x128))/0xa*(-parseInt(_0x3b6c98(0x11f))/0xb);if(_0x24f24e===_0x238f1f)break;else _0x2be1d7['push'](_0x2be1d7['shift']());}catch(_0x57b745){_0x2be1d7['push'](_0x2be1d7['shift']());}}}(_0x1add,0x5aa94));import{CommentService as _0x775931,CollaborationSessionService as _0x625313,UniverCollaborationClientPlugin as _0x4ce1bf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f5fb3}from'@univerjs-pro/license';import{dayjs as _0x2552d3,UserManagerService as _0x44d1fc,Inject as _0xee2d6d,Injector as _0x4801df,Disposable as _0x48bbe7,CustomRangeType as _0x2cf451,UniverInstanceType as _0x45a423,DependentOn as _0x1fb97b,IConfigService as _0x415962,Plugin as _0x1ef7b8,merge as _0x1ce58b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3e15e4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24ff45,IThreadCommentDataSourceService as _0x2e0912}from'@univerjs/thread-comment';import{bufferTime as _0x3eb001}from'rxjs';import{HTTPService as _0x490830}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4f936b=>(_0x4f936b[_0x4f936b[_0x228950(0x102)]=0x0]=_0x228950(0x102),_0x4f936b[_0x4f936b[_0x228950(0x157)]=0x1]=_0x228950(0x157),_0x4f936b[_0x4f936b[_0x228950(0x140)]=-0x1]=_0x228950(0x140),_0x4f936b))(I||{}),v=(_0x5252ec=>(_0x5252ec[_0x5252ec['Unknown']=0x0]=_0x228950(0x11e),_0x5252ec[_0x5252ec['Add']=0x1]=_0x228950(0x13c),_0x5252ec[_0x5252ec['Reply']=0x2]=_0x228950(0x12d),_0x5252ec[_0x5252ec['Edit']=0x3]=_0x228950(0x111),_0x5252ec[_0x5252ec[_0x228950(0x13a)]=0x4]=_0x228950(0x13a),_0x5252ec[_0x5252ec[_0x228950(0x107)]=0x5]=_0x228950(0x107),_0x5252ec[_0x5252ec['UNRECOGNIZED']=-0x1]=_0x228950(0x140),_0x5252ec))(v||{});const D=_0x227c78=>_0x2552d3(new Date(+_0x227c78))[_0x228950(0x117)](_0x228950(0x12b)),B=async(_0x130a41,_0xc131f9)=>{const _0x1c2f2b=_0x228950,_0x217d33=_0x130a41[_0x1c2f2b(0x121)](_0x44d1fc),_0x390e52=_0x130a41['get'](_0x490830);_0xc131f9[_0x1c2f2b(0x144)](_0x15a4fe=>{const _0x3add9e=_0x1c2f2b;_0x217d33[_0x3add9e(0x131)](_0x15a4fe)&&_0xc131f9[_0x3add9e(0x10f)](_0x15a4fe);}),_0xc131f9['size']&&(await _0x390e52[_0x1c2f2b(0x121)]('/universer-api/user/list',{'params':{'userIDs':[..._0xc131f9]}}))[_0x1c2f2b(0x136)][_0x1c2f2b(0xf3)]['forEach'](_0x294e4e=>{const _0x163187=_0x1c2f2b;_0x294e4e&&_0x217d33[_0x163187(0x118)](_0x294e4e);});};var K=Object[_0x228950(0x130)],V=(_0x39a52b,_0x410db0,_0xa1c7a7,_0x490309)=>{const _0x736133=_0x228950;for(var _0x23f9d8=_0x490309>0x1?void 0x0:_0x490309?K(_0x410db0,_0xa1c7a7):_0x410db0,_0xc15c2b=_0x39a52b[_0x736133(0x137)]-0x1,_0x23f585;_0xc15c2b>=0x0;_0xc15c2b--)(_0x23f585=_0x39a52b[_0xc15c2b])&&(_0x23f9d8=_0x23f585(_0x23f9d8)||_0x23f9d8);return _0x23f9d8;},p=(_0x3864d6,_0xc9cd8f)=>(_0x3ceb27,_0x4df8d5)=>_0xc9cd8f(_0x3ceb27,_0x4df8d5,_0x3864d6);let S=class extends _0x48bbe7{constructor(_0x5ca55d,_0x6a3c64,_0x13c37c,_0x10b2e3){const _0x590ff7=_0x228950;super(),this['_commentService']=_0x5ca55d,this['_threadCommentModel']=_0x6a3c64,this[_0x590ff7(0x110)]=_0x13c37c,this[_0x590ff7(0x112)]=_0x10b2e3,this[_0x590ff7(0x100)](),this[_0x590ff7(0x14f)]();}[_0x228950(0x14f)](){const _0x1d303c=_0x228950;this[_0x1d303c(0x132)](this[_0x1d303c(0x10c)][_0x1d303c(0x10d)]['pipe'](_0x3eb001(0x10))['subscribe'](_0xfbfa45=>{const _0x30213f=_0x1d303c,_0x1c89da=new Set();_0xfbfa45['forEach'](_0x35532d=>{const _0x41539f=_0x496a;switch(_0x35532d[_0x41539f(0x151)]){case'add':{const _0x513d6a=_0x35532d['payload'][_0x41539f(0xff)];_0x1c89da[_0x41539f(0xf2)](_0x513d6a);break;}}}),B(this[_0x30213f(0x112)],_0x1c89da);}));}['_init'](){const _0x224126=_0x228950;this[_0x224126(0x132)](this[_0x224126(0x139)][_0x224126(0x10d)]['subscribe'](async _0x4155a2=>{const _0x9be0da=_0x224126;var _0x44bb25,_0x55532a,_0x4cb58f,_0x42e6eb;const _0xba405b=(_0x44bb25=this['_threadCommentModel'][_0x9be0da(0x115)](_0x4155a2['unitId'])[_0x9be0da(0x109)](_0x4c34f6=>_0x4c34f6['threadId']===_0x4155a2[_0x9be0da(0x105)]))==null?void 0x0:_0x44bb25['root'];if(!_0xba405b)return;const {unitId:_0x3c4cfd,subUnitId:_0x5e3e5f}=_0xba405b;switch(_0x4155a2[_0x9be0da(0x116)]&&this[_0x9be0da(0x110)]['addUser'](_0x4155a2[_0x9be0da(0x116)]),_0x4155a2[_0x9be0da(0x151)]){case v[_0x9be0da(0x13c)]:break;case v['Reply']:{this[_0x9be0da(0x10c)]['addComment'](_0x3c4cfd,_0x5e3e5f,{'unitId':_0x3c4cfd,'subUnitId':_0x5e3e5f,'ref':'','id':_0x4155a2['replyId'],'dT':D(+_0x4155a2[_0x9be0da(0xfe)]),'threadId':_0x4155a2[_0x9be0da(0x105)],'personId':(_0x4cb58f=(_0x55532a=_0x4155a2[_0x9be0da(0x116)])==null?void 0x0:_0x55532a[_0x9be0da(0x14c)])!=null?_0x4cb58f:_0x4155a2[_0x9be0da(0x10a)],'text':JSON['parse'](_0x4155a2[_0x9be0da(0x10e)]),'parentId':_0xba405b['id']});break;}case v['Delete']:{const _0xa3ce9b=this['_threadCommentModel']['getComment'](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);_0xa3ce9b&&_0xa3ce9b[_0x9be0da(0x12f)]&&this[_0x9be0da(0x10c)][_0x9be0da(0x124)](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);break;}case v[_0x9be0da(0x111)]:{this[_0x9be0da(0x10c)][_0x9be0da(0x145)](_0x3c4cfd,_0x5e3e5f,{'commentId':_0x4155a2[_0x9be0da(0x129)],'text':JSON[_0x9be0da(0x104)](_0x4155a2['content'])});break;}case v[_0x9be0da(0x107)]:{const _0x588d31=(_0x42e6eb=this[_0x9be0da(0x10c)][_0x9be0da(0x115)](_0x4155a2[_0x9be0da(0x103)])[_0x9be0da(0x109)](_0x16f52a=>_0x16f52a[_0x9be0da(0x105)]===_0x4155a2['threadId']))==null?void 0x0:_0x42e6eb['root'];_0x588d31&&this[_0x9be0da(0x10c)][_0x9be0da(0x147)](_0x3c4cfd,_0x5e3e5f,_0x588d31['id'],_0x4155a2[_0x9be0da(0xfa)]===I[_0x9be0da(0x157)]);break;}}}));}};S=V([p(0x0,_0xee2d6d(_0x775931)),p(0x1,_0xee2d6d(_0x24ff45)),p(0x2,_0xee2d6d(_0x44d1fc)),p(0x3,_0xee2d6d(_0x4801df))],S);const z=_0x228950(0x154),M={};var k=Object[_0x228950(0x130)],Q=(_0x4c91e6,_0x515286,_0x2373d4,_0x1c6c0f)=>{const _0x96f1ec=_0x228950;for(var _0x1ff295=_0x1c6c0f>0x1?void 0x0:_0x1c6c0f?k(_0x515286,_0x2373d4):_0x515286,_0x391cc8=_0x4c91e6[_0x96f1ec(0x137)]-0x1,_0x14f2b3;_0x391cc8>=0x0;_0x391cc8--)(_0x14f2b3=_0x4c91e6[_0x391cc8])&&(_0x1ff295=_0x14f2b3(_0x1ff295)||_0x1ff295);return _0x1ff295;},_=(_0x595682,_0x4c8830)=>(_0x299328,_0x4751ab)=>_0x4c8830(_0x299328,_0x4751ab,_0x595682);function _0x496a(_0x4545c7,_0x1e6c0b){const _0x1add72=_0x1add();return _0x496a=function(_0x496abd,_0x189fd3){_0x496abd=_0x496abd-0xf2;let _0x265e62=_0x1add72[_0x496abd];return _0x265e62;},_0x496a(_0x4545c7,_0x1e6c0b);}function X(_0x1efdd8,_0xb834a6){const _0x33ba88=_0x228950,_0x26bf13=_0x1efdd8[_0x33ba88(0x148)][0x0];return{..._0xb834a6,'id':_0x26bf13[_0x33ba88(0x129)],'resolved':_0x1efdd8[_0x33ba88(0xfa)]===0x1,'dT':D(_0x26bf13[_0x33ba88(0xfe)]),'personId':_0x26bf13[_0x33ba88(0x10a)],'threadId':_0x26bf13[_0x33ba88(0x105)]};}function ee(_0x244ee3,_0x3da754,_0x537f44){const _0x172bbe=_0x228950;var _0x298f30,_0x521264;if(((_0x521264=(_0x298f30=_0x244ee3==null?void 0x0:_0x244ee3[_0x172bbe(0x148)])==null?void 0x0:_0x298f30[_0x172bbe(0x137)])!=null?_0x521264:0x0)>0x0){const _0x22e68e=(_0x3e9766,_0x7f5a4d)=>({'id':_0x3e9766[_0x172bbe(0x129)],'threadId':_0x3e9766[_0x172bbe(0x105)],'dT':D(_0x3e9766[_0x172bbe(0xfe)]),'personId':_0x3e9766[_0x172bbe(0x10a)],'resolved':_0x244ee3[_0x172bbe(0xfa)]===I[_0x172bbe(0x157)],'unitId':_0x3da754,'subUnitId':_0x537f44,'text':JSON['parse'](_0x3e9766[_0x172bbe(0x10e)]),'parentId':_0x7f5a4d}),_0x10c944=_0x22e68e(_0x244ee3['replies'][0x0]);return{..._0x10c944,'children':_0x244ee3[_0x172bbe(0x148)]['slice'](0x1)[_0x172bbe(0x135)](_0x220860=>_0x22e68e(_0x220860,_0x10c944['id']))};}return null;}function _0x1add(){const _0x5e61f3=['customRanges','UNRECOGNIZED','_threadCommentDataSourceService','/add','addComment','forEach','updateComment','code','resolveComment','replies','listComments','/solved','_config','userID','comments','error','_initUserSync','getCurrentUser','type','values','100100GmvaBu','thread-comment-data-source.config','comment','244017qzflvp','Solved','add','users','onReady','post','onStarting','_sessionService','saveCommentToSnapshot','/reply','solved','1435230ArYezi','_httpService','pluginName','createTimestamp','personId','_init','/universer-api/comment/unit/','OpenOrReOpen','unitId','parse','threadId','filter','Solve','3FNSrok','find','userId','1234XDTRny','_threadCommentModel','commentUpdate$','content','delete','_userService','Edit','_injector','stringify','syncUpdateMutationToColla','getUnit','user','format','addUser','requireSession','_configService','_threadCommentDataSource','148408QsJWKg','748602dmtJyg','Unknown','11QdavXu','/delete','get','resolved','COMMENT','deleteComment','getMemberID','ref','symbol','5038790bOoWVe','replyId','rangeType','YYYY/MM/DD\x20HH:mm','rangeId','Reply','defineProperty','parentId','getOwnPropertyDescriptor','getUser','disposeWithMe','_initDataSource','dataSource','map','body','length','UNIVER_UNKNOWN','_commentService','Delete','217GnPAOE','Add','/edit','24GrmAmp'];_0x1add=function(){return _0x5e61f3;};return _0x1add();}let f=class{constructor(_0x255cc5,_0x286240,_0x29f518,_0x5768cf){const _0x4542bb=_0x228950;this[_0x4542bb(0xfc)]=_0x255cc5,this['_userService']=_0x286240,this['_sessionService']=_0x29f518,this[_0x4542bb(0x112)]=_0x5768cf;}async[_0x228950(0x143)](_0x5a71ed){const _0x21922e=_0x228950;var _0x4cbdd3,_0x1d247f;const {parentId:_0x50965d,unitId:_0x2aa2d3,text:_0x238da3,threadId:_0x33ab66}=_0x5a71ed,_0x352eea=(_0x1d247f=(_0x4cbdd3=_0x238da3[_0x21922e(0x13f)])==null?void 0x0:_0x4cbdd3[_0x21922e(0x106)](_0x5aff46=>_0x5aff46[_0x21922e(0x12a)]===_0x2cf451[_0x21922e(0x123)])[_0x21922e(0x135)](_0x22d0a4=>_0x22d0a4[_0x21922e(0x12c)]))!=null?_0x1d247f:[],_0x57ffaa=JSON['stringify'](_0x238da3),_0x10eb68=(await this['_sessionService'][_0x21922e(0x119)](_0x2aa2d3))[_0x21922e(0x125)]();if(_0x50965d){const _0x133bbe={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea,'threadId':_0x33ab66},_0x13bcb0=(await this['_httpService']['post'](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0xf9),{'body':_0x133bbe}))['body']['reply'];return{..._0x5a71ed,'id':_0x13bcb0[_0x21922e(0x129)],'dT':_0x2552d3(+_0x13bcb0['createTimestamp'])['format'](_0x21922e(0x12b)),'personId':_0x13bcb0[_0x21922e(0x10a)]};}else{const _0x43a603={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea},_0x464142=await this['_httpService'][_0x21922e(0xf5)](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0x142),{'body':_0x43a603});return X(_0x464142[_0x21922e(0x136)][_0x21922e(0x155)],_0x5a71ed);}}async[_0x228950(0x145)](_0x92cc7e){const _0x4712b2=_0x228950;var _0x7c326e,_0x2fd128;const {text:_0x8cd053,unitId:_0x4b9120}=_0x92cc7e,_0x5e58e0=(_0x2fd128=(_0x7c326e=_0x8cd053['customRanges'])==null?void 0x0:_0x7c326e[_0x4712b2(0x106)](_0x5be89e=>_0x5be89e['rangeType']===_0x2cf451['COMMENT'])['map'](_0x2067e0=>_0x2067e0[_0x4712b2(0x12c)]))!=null?_0x2fd128:[],_0x28db7e=JSON[_0x4712b2(0x113)](_0x8cd053),_0x8b8ef1=_0x92cc7e[_0x4712b2(0x105)],_0x9eac1b=_0x92cc7e['id'],_0x51ff1e={'memberId':(await this[_0x4712b2(0xf7)]['requireSession'](_0x4b9120))[_0x4712b2(0x125)](),'unitId':_0x4b9120,'threadId':_0x8b8ef1,'mention':_0x5e58e0,'content':_0x28db7e,'replyId':_0x9eac1b},_0x562b35=await this[_0x4712b2(0xfc)]['post'](_0x4712b2(0x101)+_0x4b9120+_0x4712b2(0x13d),{'body':_0x51ff1e});return!_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)]||_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)][_0x4712b2(0x146)]===0x1;}async[_0x228950(0x147)](_0x28d2d6){const _0x28a32c=_0x228950,{unitId:_0xe9e900}=_0x28d2d6,_0x1ec037=_0x28d2d6[_0x28a32c(0x105)],_0x100020={'memberId':this[_0x28a32c(0x110)][_0x28a32c(0x150)]()['userID'],'unitId':_0xe9e900,'threadId':_0x1ec037,'solved':_0x28d2d6[_0x28a32c(0x122)]?I[_0x28a32c(0x157)]:I['OpenOrReOpen']},_0x4676a4=await this['_httpService'][_0x28a32c(0xf5)](_0x28a32c(0x101)+_0xe9e900+_0x28a32c(0x14a),{'body':_0x100020});return!_0x4676a4[_0x28a32c(0x136)][_0x28a32c(0x14e)]||_0x4676a4['body'][_0x28a32c(0x14e)][_0x28a32c(0x146)]===0x1;}async[_0x228950(0x124)](_0xf1b468,_0x396f5c,_0x14ba5b,_0x46cbbd){const _0x41517d=_0x228950,_0x53451d={'memberId':(await this[_0x41517d(0xf7)][_0x41517d(0x119)](_0xf1b468))[_0x41517d(0x125)](),'threadId':_0x14ba5b,'replyId':_0x46cbbd,'unitId':_0xf1b468},_0x4ee1cd=await this['_httpService']['post'](_0x41517d(0x101)+_0xf1b468+_0x41517d(0x120),{'body':_0x53451d});return!_0x4ee1cd['body'][_0x41517d(0x14e)]||_0x4ee1cd[_0x41517d(0x136)][_0x41517d(0x14e)][_0x41517d(0x146)]===0x1;}async[_0x228950(0x149)](_0x508540,_0x45e3eb,_0xfaba8d){const _0x2e6ffb=_0x228950,_0x3cc724={'unitId':_0x508540,'threadId':_0xfaba8d},_0x481081=await this['_httpService'][_0x2e6ffb(0xf5)](_0x2e6ffb(0x101)+_0x508540+'/list',{'body':_0x3cc724}),_0x396594=_0xfaba8d['map'](_0x14f6b0=>ee(_0x481081[_0x2e6ffb(0x136)][_0x2e6ffb(0x14d)][_0x14f6b0],_0x508540,_0x45e3eb))[_0x2e6ffb(0x106)](Boolean);return Object[_0x2e6ffb(0x152)](_0x481081[_0x2e6ffb(0x136)]['users'])[_0x2e6ffb(0x144)](_0x120757=>{const _0x20ece8=_0x2e6ffb;this[_0x20ece8(0x110)][_0x20ece8(0x118)](_0x120757);}),_0x396594;}[_0x228950(0xf8)](_0xfb3659){const _0x1124c4=_0x228950;return{'id':_0xfb3659['id'],'threadId':_0xfb3659[_0x1124c4(0x105)],'ref':_0xfb3659[_0x1124c4(0x126)]};}};f=Q([_(0x0,_0xee2d6d(_0x490830)),_(0x1,_0xee2d6d(_0x44d1fc)),_(0x2,_0xee2d6d(_0x625313)),_(0x3,_0xee2d6d(_0x4801df))],f);var re=Object[_0x228950(0x130)],te=(_0x3fec26,_0x576a0e,_0x143167,_0x22f35f)=>{for(var _0x4b61d2=_0x22f35f>0x1?void 0x0:_0x22f35f?re(_0x576a0e,_0x143167):_0x576a0e,_0x129c2c=_0x3fec26['length']-0x1,_0x150035;_0x129c2c>=0x0;_0x129c2c--)(_0x150035=_0x3fec26[_0x129c2c])&&(_0x4b61d2=_0x150035(_0x4b61d2)||_0x4b61d2);return _0x4b61d2;},N=(_0x49e23d,_0x12d7ca)=>(_0x68a343,_0x2a9bcc)=>_0x12d7ca(_0x68a343,_0x2a9bcc,_0x49e23d);let g=class extends _0x48bbe7{constructor(_0x2313b0,_0x5626d5){const _0x3e0a29=_0x228950;super(),this[_0x3e0a29(0x141)]=_0x2313b0,this[_0x3e0a29(0x11b)]=_0x5626d5,this[_0x3e0a29(0x133)]();}[_0x228950(0x133)](){const _0x90c8cb=_0x228950;this[_0x90c8cb(0x141)][_0x90c8cb(0x134)]=this[_0x90c8cb(0x11b)],this['_threadCommentDataSourceService'][_0x90c8cb(0x114)]=!0x1;}};g=te([N(0x0,_0x2e0912),N(0x1,_0xee2d6d(f))],g);var se=Object[_0x228950(0x12e)],oe=Object[_0x228950(0x130)],ne=(_0xbd62b0,_0x2f8557,_0x220a3f)=>_0x2f8557 in _0xbd62b0?se(_0xbd62b0,_0x2f8557,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220a3f}):_0xbd62b0[_0x2f8557]=_0x220a3f,ie=(_0x3f58f2,_0x18272a,_0x8ea51e,_0x1bf23e)=>{const _0x1b8aa4=_0x228950;for(var _0x32245a=_0x1bf23e>0x1?void 0x0:_0x1bf23e?oe(_0x18272a,_0x8ea51e):_0x18272a,_0xd447d5=_0x3f58f2[_0x1b8aa4(0x137)]-0x1,_0x2158dc;_0xd447d5>=0x0;_0xd447d5--)(_0x2158dc=_0x3f58f2[_0xd447d5])&&(_0x32245a=_0x2158dc(_0x32245a)||_0x32245a);return _0x32245a;},w=(_0x211b06,_0x5480c9)=>(_0x49ddd9,_0x467914)=>_0x5480c9(_0x49ddd9,_0x467914,_0x211b06),$=(_0x22eb36,_0x5a74e7,_0x2e82e9)=>ne(_0x22eb36,typeof _0x5a74e7!=_0x228950(0x127)?_0x5a74e7+'':_0x5a74e7,_0x2e82e9);let b=class extends _0x1ef7b8{constructor(_0xd6ce28=M,_0x524328,_0x87170a){const _0x44cfe2=_0x228950;super(),this[_0x44cfe2(0x14b)]=_0xd6ce28,this['_injector']=_0x524328,this[_0x44cfe2(0x11a)]=_0x87170a;const {..._0x3f8c4d}=_0x1ce58b({},M,this[_0x44cfe2(0x14b)]);this[_0x44cfe2(0x11a)]['setConfig'](z,_0x3f8c4d);}[_0x228950(0xf6)](){[[f],[g],[S]]['forEach'](_0x56009f=>{const _0x22e651=_0x496a;this[_0x22e651(0x112)][_0x22e651(0xf2)](_0x56009f);});}[_0x228950(0xf4)](){const _0x295f2a=_0x228950;this[_0x295f2a(0x112)][_0x295f2a(0x121)](g),this[_0x295f2a(0x112)][_0x295f2a(0x121)](S);}};$(b,_0x228950(0xfd),W),$(b,_0x228950(0x151),_0x45a423[_0x228950(0x138)]),b=ie([_0x1fb97b(_0x3e15e4,_0x4ce1bf,_0x1f5fb3),w(0x1,_0xee2d6d(_0x4801df)),w(0x2,_0x415962)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4be095=_0x46ea;(function(_0x45e5b3,_0x4fb667){const _0x23c293=_0x46ea,_0xba98f1=_0x45e5b3();while(!![]){try{const _0x11a11c=parseInt(_0x23c293(0x14d))/0x1*(-parseInt(_0x23c293(0x12a))/0x2)+-parseInt(_0x23c293(0x158))/0x3+-parseInt(_0x23c293(0x155))/0x4+parseInt(_0x23c293(0x135))/0x5*(-parseInt(_0x23c293(0x12d))/0x6)+-parseInt(_0x23c293(0x114))/0x7+-parseInt(_0x23c293(0x11c))/0x8*(-parseInt(_0x23c293(0x134))/0x9)+-parseInt(_0x23c293(0x157))/0xa*(-parseInt(_0x23c293(0x10c))/0xb);if(_0x11a11c===_0x4fb667)break;else _0xba98f1['push'](_0xba98f1['shift']());}catch(_0x164068){_0xba98f1['push'](_0xba98f1['shift']());}}}(_0x2140,0xe8b73));import{CommentService as _0x560a2f,CollaborationSessionService as _0x211d73,UniverCollaborationClientPlugin as _0x1dff39}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xea7e1c}from'@univerjs-pro/license';import{dayjs as _0x13f57c,UserManagerService as _0x57bf20,Inject as _0x397f67,Injector as _0xc959e6,Disposable as _0x3714c3,CustomRangeType as _0x32b452,UniverInstanceType as _0x15cbc2,DependentOn as _0x5f982,IConfigService as _0x129d4e,Plugin as _0x29b97b,merge as _0x596754}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5c16f9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4bce87,IThreadCommentDataSourceService as _0x3222e2}from'@univerjs/thread-comment';import{bufferTime as _0x1c1e04}from'rxjs';import{HTTPService as _0x2e19d5}from'@univerjs/network';const W=_0x4be095(0x14f);var I=(_0x4c7dcd=>(_0x4c7dcd[_0x4c7dcd[_0x4be095(0x113)]=0x0]='OpenOrReOpen',_0x4c7dcd[_0x4c7dcd[_0x4be095(0x154)]=0x1]=_0x4be095(0x154),_0x4c7dcd[_0x4c7dcd['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x4c7dcd))(I||{}),v=(_0x810411=>(_0x810411[_0x810411[_0x4be095(0x148)]=0x0]=_0x4be095(0x148),_0x810411[_0x810411['Add']=0x1]='Add',_0x810411[_0x810411[_0x4be095(0x11d)]=0x2]=_0x4be095(0x11d),_0x810411[_0x810411[_0x4be095(0x117)]=0x3]=_0x4be095(0x117),_0x810411[_0x810411[_0x4be095(0x123)]=0x4]=_0x4be095(0x123),_0x810411[_0x810411[_0x4be095(0x139)]=0x5]='Solve',_0x810411[_0x810411['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x810411))(v||{});const D=_0x38968f=>_0x13f57c(new Date(+_0x38968f))[_0x4be095(0x119)](_0x4be095(0x12e)),B=async(_0x1cb238,_0x4c95f7)=>{const _0x265463=_0x4be095,_0x426a8e=_0x1cb238[_0x265463(0x153)](_0x57bf20),_0x5d1acb=_0x1cb238[_0x265463(0x153)](_0x2e19d5);_0x4c95f7[_0x265463(0x107)](_0x2e621c=>{_0x426a8e['getUser'](_0x2e621c)&&_0x4c95f7['delete'](_0x2e621c);}),_0x4c95f7[_0x265463(0x142)]&&(await _0x5d1acb[_0x265463(0x153)](_0x265463(0x120),{'params':{'userIDs':[..._0x4c95f7]}}))[_0x265463(0x138)]['users'][_0x265463(0x107)](_0x3df401=>{const _0x2b7804=_0x265463;_0x3df401&&_0x426a8e[_0x2b7804(0x133)](_0x3df401);});};var K=Object[_0x4be095(0x100)],V=(_0x5e3472,_0x22337f,_0x887530,_0x5869d1)=>{for(var _0x5346d6=_0x5869d1>0x1?void 0x0:_0x5869d1?K(_0x22337f,_0x887530):_0x22337f,_0x25b942=_0x5e3472['length']-0x1,_0x4073b5;_0x25b942>=0x0;_0x25b942--)(_0x4073b5=_0x5e3472[_0x25b942])&&(_0x5346d6=_0x4073b5(_0x5346d6)||_0x5346d6);return _0x5346d6;},p=(_0x1e3c23,_0x5f31bd)=>(_0x4a2bc7,_0x4acfcd)=>_0x5f31bd(_0x4a2bc7,_0x4acfcd,_0x1e3c23);let S=class extends _0x3714c3{constructor(_0x251b8b,_0x296f2f,_0x26f7a4,_0x22b262){const _0xbb1f4c=_0x4be095;super(),this[_0xbb1f4c(0x101)]=_0x251b8b,this[_0xbb1f4c(0x13d)]=_0x296f2f,this[_0xbb1f4c(0x13a)]=_0x26f7a4,this[_0xbb1f4c(0x10f)]=_0x22b262,this[_0xbb1f4c(0x146)](),this['_initUserSync']();}['_initUserSync'](){const _0x330dae=_0x4be095;this[_0x330dae(0x121)](this[_0x330dae(0x13d)][_0x330dae(0x125)][_0x330dae(0x105)](_0x1c1e04(0x10))[_0x330dae(0x122)](_0x1f35d0=>{const _0x371aca=_0x330dae,_0x119497=new Set();_0x1f35d0[_0x371aca(0x107)](_0x3f4878=>{const _0x4440b1=_0x371aca;switch(_0x3f4878[_0x4440b1(0x129)]){case'add':{const _0x1c797a=_0x3f4878['payload']['personId'];_0x119497['add'](_0x1c797a);break;}}}),B(this['_injector'],_0x119497);}));}['_init'](){const _0x1bb09e=_0x4be095;this['disposeWithMe'](this[_0x1bb09e(0x101)][_0x1bb09e(0x125)][_0x1bb09e(0x122)](async _0x46bb1a=>{const _0x25f2bc=_0x1bb09e;var _0x3ddfb4,_0x10ad86,_0xc279d3,_0x4c6832;const _0x44e216=(_0x3ddfb4=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x93c4b7=>_0x93c4b7[_0x25f2bc(0x109)]===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x3ddfb4[_0x25f2bc(0x130)];if(!_0x44e216)return;const {unitId:_0x47ab1f,subUnitId:_0x378aea}=_0x44e216;switch(_0x46bb1a[_0x25f2bc(0x13e)]&&this['_userService'][_0x25f2bc(0x133)](_0x46bb1a[_0x25f2bc(0x13e)]),_0x46bb1a[_0x25f2bc(0x129)]){case v['Add']:break;case v[_0x25f2bc(0x11d)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x144)](_0x47ab1f,_0x378aea,{'unitId':_0x47ab1f,'subUnitId':_0x378aea,'ref':'','id':_0x46bb1a['replyId'],'dT':D(+_0x46bb1a['createTimestamp']),'threadId':_0x46bb1a[_0x25f2bc(0x109)],'personId':(_0xc279d3=(_0x10ad86=_0x46bb1a[_0x25f2bc(0x13e)])==null?void 0x0:_0x10ad86[_0x25f2bc(0x124)])!=null?_0xc279d3:_0x46bb1a[_0x25f2bc(0x12f)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)]),'parentId':_0x44e216['id']});break;}case v[_0x25f2bc(0x123)]:{const _0x1b5ce1=this['_threadCommentModel']['getComment'](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);_0x1b5ce1&&_0x1b5ce1[_0x25f2bc(0x108)]&&this[_0x25f2bc(0x13d)][_0x25f2bc(0x136)](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);break;}case v[_0x25f2bc(0x117)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x152)](_0x47ab1f,_0x378aea,{'commentId':_0x46bb1a[_0x25f2bc(0x128)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)])});break;}case v[_0x25f2bc(0x139)]:{const _0xa362c0=(_0x4c6832=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x475a8b=>_0x475a8b['threadId']===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x4c6832[_0x25f2bc(0x130)];_0xa362c0&&this['_threadCommentModel'][_0x25f2bc(0x151)](_0x47ab1f,_0x378aea,_0xa362c0['id'],_0x46bb1a[_0x25f2bc(0x13b)]===I[_0x25f2bc(0x154)]);break;}}}));}};S=V([p(0x0,_0x397f67(_0x560a2f)),p(0x1,_0x397f67(_0x4bce87)),p(0x2,_0x397f67(_0x57bf20)),p(0x3,_0x397f67(_0xc959e6))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2cbff2,_0x4714ee,_0x53d45e,_0x6ff2c4)=>{const _0x499be7=_0x4be095;for(var _0x37e8fc=_0x6ff2c4>0x1?void 0x0:_0x6ff2c4?k(_0x4714ee,_0x53d45e):_0x4714ee,_0x453551=_0x2cbff2[_0x499be7(0x14b)]-0x1,_0x3e7ce2;_0x453551>=0x0;_0x453551--)(_0x3e7ce2=_0x2cbff2[_0x453551])&&(_0x37e8fc=_0x3e7ce2(_0x37e8fc)||_0x37e8fc);return _0x37e8fc;},_=(_0x26619b,_0xd94b76)=>(_0x415ac1,_0x29d130)=>_0xd94b76(_0x415ac1,_0x29d130,_0x26619b);function X(_0x33f314,_0x15e9f8){const _0x37095a=_0x4be095,_0x58e2f1=_0x33f314[_0x37095a(0x104)][0x0];return{..._0x15e9f8,'id':_0x58e2f1[_0x37095a(0x128)],'resolved':_0x33f314['solved']===0x1,'dT':D(_0x58e2f1[_0x37095a(0x11f)]),'personId':_0x58e2f1[_0x37095a(0x12f)],'threadId':_0x58e2f1[_0x37095a(0x109)]};}function ee(_0x421d9c,_0x14134,_0x255509){const _0x4c76ce=_0x4be095;var _0xe0dc1d,_0x53fae1;if(((_0x53fae1=(_0xe0dc1d=_0x421d9c==null?void 0x0:_0x421d9c[_0x4c76ce(0x104)])==null?void 0x0:_0xe0dc1d[_0x4c76ce(0x14b)])!=null?_0x53fae1:0x0)>0x0){const _0x35b8d3=(_0x5a4e43,_0x1655b5)=>({'id':_0x5a4e43['replyId'],'threadId':_0x5a4e43[_0x4c76ce(0x109)],'dT':D(_0x5a4e43[_0x4c76ce(0x11f)]),'personId':_0x5a4e43[_0x4c76ce(0x12f)],'resolved':_0x421d9c[_0x4c76ce(0x13b)]===I[_0x4c76ce(0x154)],'unitId':_0x14134,'subUnitId':_0x255509,'text':JSON[_0x4c76ce(0x140)](_0x5a4e43['content']),'parentId':_0x1655b5}),_0x4b5ffe=_0x35b8d3(_0x421d9c[_0x4c76ce(0x104)][0x0]);return{..._0x4b5ffe,'children':_0x421d9c[_0x4c76ce(0x104)][_0x4c76ce(0x10a)](0x1)[_0x4c76ce(0x116)](_0x100257=>_0x35b8d3(_0x100257,_0x4b5ffe['id']))};}return null;}let f=class{constructor(_0x2a34d9,_0x10788d,_0x463dc1,_0x16d5dc){const _0xb52375=_0x4be095;this['_httpService']=_0x2a34d9,this[_0xb52375(0x13a)]=_0x10788d,this[_0xb52375(0x15c)]=_0x463dc1,this[_0xb52375(0x10f)]=_0x16d5dc;}async[_0x4be095(0x144)](_0x5c4552){const _0xbc9bab=_0x4be095;var _0x155c41,_0x5cbe85;const {parentId:_0x2516e6,unitId:_0x1c00ac,text:_0xcb792a,threadId:_0x4c6716}=_0x5c4552,_0x4afe34=(_0x5cbe85=(_0x155c41=_0xcb792a[_0xbc9bab(0x15a)])==null?void 0x0:_0x155c41['filter'](_0xf3d5c3=>_0xf3d5c3['rangeType']===_0x32b452[_0xbc9bab(0x110)])[_0xbc9bab(0x116)](_0x4e5082=>_0x4e5082[_0xbc9bab(0x13c)]))!=null?_0x5cbe85:[],_0x405e3a=JSON[_0xbc9bab(0x106)](_0xcb792a),_0x18d6f9=(await this[_0xbc9bab(0x15c)]['requireSession'](_0x1c00ac))['getMemberID']();if(_0x2516e6){const _0x5b4168={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34,'threadId':_0x4c6716},_0x4babb5=(await this[_0xbc9bab(0x127)]['post']('/universer-api/comment/unit/'+_0x1c00ac+_0xbc9bab(0x112),{'body':_0x5b4168}))['body'][_0xbc9bab(0x131)];return{..._0x5c4552,'id':_0x4babb5['replyId'],'dT':_0x13f57c(+_0x4babb5[_0xbc9bab(0x11f)])[_0xbc9bab(0x119)](_0xbc9bab(0x12e)),'personId':_0x4babb5[_0xbc9bab(0x12f)]};}else{const _0xb4f414={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34},_0x4bb7d8=await this[_0xbc9bab(0x127)]['post'](_0xbc9bab(0x147)+_0x1c00ac+_0xbc9bab(0x14c),{'body':_0xb4f414});return X(_0x4bb7d8[_0xbc9bab(0x138)][_0xbc9bab(0x118)],_0x5c4552);}}async[_0x4be095(0x152)](_0x4fb029){const _0x4ae3db=_0x4be095;var _0x501d8e,_0x106657;const {text:_0x53400b,unitId:_0x2fb1ea}=_0x4fb029,_0x2c0804=(_0x106657=(_0x501d8e=_0x53400b[_0x4ae3db(0x15a)])==null?void 0x0:_0x501d8e['filter'](_0x2c8247=>_0x2c8247[_0x4ae3db(0x12b)]===_0x32b452['COMMENT'])[_0x4ae3db(0x116)](_0x3a85d7=>_0x3a85d7['rangeId']))!=null?_0x106657:[],_0x5becd9=JSON[_0x4ae3db(0x106)](_0x53400b),_0x9d06cd=_0x4fb029[_0x4ae3db(0x109)],_0x5c582c=_0x4fb029['id'],_0x20f04c={'memberId':(await this['_sessionService'][_0x4ae3db(0x11e)](_0x2fb1ea))[_0x4ae3db(0x126)](),'unitId':_0x2fb1ea,'threadId':_0x9d06cd,'mention':_0x2c0804,'content':_0x5becd9,'replyId':_0x5c582c},_0x207485=await this[_0x4ae3db(0x127)][_0x4ae3db(0x137)](_0x4ae3db(0x147)+_0x2fb1ea+_0x4ae3db(0x145),{'body':_0x20f04c});return!_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)]||_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)][_0x4ae3db(0x156)]===0x1;}async[_0x4be095(0x151)](_0x199cc7){const _0x3271ce=_0x4be095,{unitId:_0x219814}=_0x199cc7,_0x7828d9=_0x199cc7[_0x3271ce(0x109)],_0x3e6204={'memberId':this[_0x3271ce(0x13a)]['getCurrentUser']()['userID'],'unitId':_0x219814,'threadId':_0x7828d9,'solved':_0x199cc7['resolved']?I[_0x3271ce(0x154)]:I[_0x3271ce(0x113)]},_0x44137f=await this['_httpService'][_0x3271ce(0x137)](_0x3271ce(0x147)+_0x219814+'/solved',{'body':_0x3e6204});return!_0x44137f['body'][_0x3271ce(0x15b)]||_0x44137f[_0x3271ce(0x138)]['error']['code']===0x1;}async['deleteComment'](_0x1f8a57,_0x186baf,_0x4c5f29,_0x158777){const _0x48dd08=_0x4be095,_0x2a7747={'memberId':(await this['_sessionService']['requireSession'](_0x1f8a57))[_0x48dd08(0x126)](),'threadId':_0x4c5f29,'replyId':_0x158777,'unitId':_0x1f8a57},_0x3c7f1c=await this[_0x48dd08(0x127)][_0x48dd08(0x137)](_0x48dd08(0x147)+_0x1f8a57+_0x48dd08(0x14e),{'body':_0x2a7747});return!_0x3c7f1c['body']['error']||_0x3c7f1c[_0x48dd08(0x138)][_0x48dd08(0x15b)][_0x48dd08(0x156)]===0x1;}async['listComments'](_0x3fd2e8,_0x2ca23a,_0x44dbf3){const _0x20fbeb=_0x4be095,_0x3780de={'unitId':_0x3fd2e8,'threadId':_0x44dbf3},_0x10c092=await this[_0x20fbeb(0x127)][_0x20fbeb(0x137)](_0x20fbeb(0x147)+_0x3fd2e8+_0x20fbeb(0x11a),{'body':_0x3780de}),_0x4d6e95=_0x44dbf3[_0x20fbeb(0x116)](_0x27b28a=>ee(_0x10c092['body']['comments'][_0x27b28a],_0x3fd2e8,_0x2ca23a))[_0x20fbeb(0x10b)](Boolean);return Object[_0x20fbeb(0x143)](_0x10c092[_0x20fbeb(0x138)]['users'])[_0x20fbeb(0x107)](_0x43543e=>{const _0x547a95=_0x20fbeb;this[_0x547a95(0x13a)][_0x547a95(0x133)](_0x43543e);}),_0x4d6e95;}[_0x4be095(0x10e)](_0x2803ab){const _0x5b4993=_0x4be095;return{'id':_0x2803ab['id'],'threadId':_0x2803ab[_0x5b4993(0x109)],'ref':_0x2803ab[_0x5b4993(0x14a)]};}};function _0x2140(){const _0x2adab7=['values','addComment','/edit','_init','/universer-api/comment/unit/','Unknown','getUnit','ref','length','/add','1DsbBNd','/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','resolveComment','updateComment','get','Solved','1849212eaZzcN','code','50803570HQnFoL','1332279BTtIWs','_initDataSource','customRanges','error','_sessionService','getOwnPropertyDescriptor','_commentService','content','syncUpdateMutationToColla','replies','pipe','stringify','forEach','parentId','threadId','slice','filter','11akaRPe','pluginName','saveCommentToSnapshot','_injector','COMMENT','_configService','/reply','OpenOrReOpen','1267385bifqvC','_threadCommentDataSourceService','map','Edit','comment','format','/list','dataSource','24qWZdoP','Reply','requireSession','createTimestamp','/universer-api/user/list','disposeWithMe','subscribe','Delete','userID','commentUpdate$','getMemberID','_httpService','replyId','type','3437744iDfKNK','rangeType','onReady','62754YZTMol','YYYY/MM/DD\x20HH:mm','userId','root','reply','_threadCommentDataSource','addUser','649926GqKXwc','735cOeuNc','deleteComment','post','body','Solve','_userService','solved','rangeId','_threadCommentModel','user','UNRECOGNIZED','parse','_config','size'];_0x2140=function(){return _0x2adab7;};return _0x2140();}f=Q([_(0x0,_0x397f67(_0x2e19d5)),_(0x1,_0x397f67(_0x57bf20)),_(0x2,_0x397f67(_0x211d73)),_(0x3,_0x397f67(_0xc959e6))],f);var re=Object[_0x4be095(0x100)],te=(_0x5a4a3c,_0x45b7aa,_0x313bb7,_0x428ae2)=>{const _0x5dad5c=_0x4be095;for(var _0x4203e9=_0x428ae2>0x1?void 0x0:_0x428ae2?re(_0x45b7aa,_0x313bb7):_0x45b7aa,_0x1209ca=_0x5a4a3c[_0x5dad5c(0x14b)]-0x1,_0x26f574;_0x1209ca>=0x0;_0x1209ca--)(_0x26f574=_0x5a4a3c[_0x1209ca])&&(_0x4203e9=_0x26f574(_0x4203e9)||_0x4203e9);return _0x4203e9;},N=(_0x4fd238,_0x199b12)=>(_0x2d1e47,_0x2c4ffc)=>_0x199b12(_0x2d1e47,_0x2c4ffc,_0x4fd238);let g=class extends _0x3714c3{constructor(_0x30440c,_0x54fe54){const _0x5af7ed=_0x4be095;super(),this[_0x5af7ed(0x115)]=_0x30440c,this[_0x5af7ed(0x132)]=_0x54fe54,this[_0x5af7ed(0x159)]();}[_0x4be095(0x159)](){const _0x4c805c=_0x4be095;this[_0x4c805c(0x115)][_0x4c805c(0x11b)]=this[_0x4c805c(0x132)],this[_0x4c805c(0x115)][_0x4c805c(0x103)]=!0x1;}};g=te([N(0x0,_0x3222e2),N(0x1,_0x397f67(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2a86e2,_0x3f721d,_0x3e1fd5)=>_0x3f721d in _0x2a86e2?se(_0x2a86e2,_0x3f721d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e1fd5}):_0x2a86e2[_0x3f721d]=_0x3e1fd5,ie=(_0x5b733f,_0x74d5,_0x51f4ec,_0x9ffcc1)=>{const _0x457dc5=_0x4be095;for(var _0x1edd34=_0x9ffcc1>0x1?void 0x0:_0x9ffcc1?oe(_0x74d5,_0x51f4ec):_0x74d5,_0x3c5226=_0x5b733f[_0x457dc5(0x14b)]-0x1,_0x5ad2f1;_0x3c5226>=0x0;_0x3c5226--)(_0x5ad2f1=_0x5b733f[_0x3c5226])&&(_0x1edd34=_0x5ad2f1(_0x1edd34)||_0x1edd34);return _0x1edd34;},w=(_0x365af3,_0x2cadd7)=>(_0x5f4afc,_0xc0a57a)=>_0x2cadd7(_0x5f4afc,_0xc0a57a,_0x365af3),$=(_0x48dbe7,_0x265459,_0x57b22a)=>ne(_0x48dbe7,typeof _0x265459!='symbol'?_0x265459+'':_0x265459,_0x57b22a);let b=class extends _0x29b97b{constructor(_0x5323fc=M,_0x3877fe,_0x5e38e0){const _0xc73e41=_0x4be095;super(),this[_0xc73e41(0x141)]=_0x5323fc,this['_injector']=_0x3877fe,this[_0xc73e41(0x111)]=_0x5e38e0;const {..._0x1c1163}=_0x596754({},M,this[_0xc73e41(0x141)]);this[_0xc73e41(0x111)][_0xc73e41(0x150)](z,_0x1c1163);}['onStarting'](){const _0x24cd04=_0x4be095;[[f],[g],[S]][_0x24cd04(0x107)](_0x3fca81=>{const _0x4480c5=_0x24cd04;this[_0x4480c5(0x10f)]['add'](_0x3fca81);});}[_0x4be095(0x12c)](){const _0x3e06bb=_0x4be095;this[_0x3e06bb(0x10f)]['get'](g),this[_0x3e06bb(0x10f)][_0x3e06bb(0x153)](S);}};function _0x46ea(_0x24dd1f,_0x5d9bc0){const _0x21405a=_0x2140();return _0x46ea=function(_0x46eabc,_0x481a1a){_0x46eabc=_0x46eabc-0x100;let _0x30d7c9=_0x21405a[_0x46eabc];return _0x30d7c9;},_0x46ea(_0x24dd1f,_0x5d9bc0);}$(b,_0x4be095(0x10d),W),$(b,_0x4be095(0x129),_0x15cbc2['UNIVER_UNKNOWN']),b=ie([_0x5f982(_0x5c16f9,_0x1dff39,_0xea7e1c),w(0x1,_0x397f67(_0xc959e6)),w(0x2,_0x129d4e)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x228950=_0x496a;(function(_0x2e629a,_0x238f1f){const _0x3b6c98=_0x496a,_0x2be1d7=_0x2e629a();while(!![]){try{const _0x24f24e=parseInt(_0x3b6c98(0x13b))/0x1*(parseInt(_0x3b6c98(0x10b))/0x2)+-parseInt(_0x3b6c98(0x108))/0x3*(parseInt(_0x3b6c98(0x11c))/0x4)+-parseInt(_0x3b6c98(0xfb))/0x5+parseInt(_0x3b6c98(0x11d))/0x6+parseInt(_0x3b6c98(0x153))/0x7+parseInt(_0x3b6c98(0x13e))/0x8*(-parseInt(_0x3b6c98(0x156))/0x9)+-parseInt(_0x3b6c98(0x128))/0xa*(-parseInt(_0x3b6c98(0x11f))/0xb);if(_0x24f24e===_0x238f1f)break;else _0x2be1d7['push'](_0x2be1d7['shift']());}catch(_0x57b745){_0x2be1d7['push'](_0x2be1d7['shift']());}}}(_0x1add,0x5aa94));import{CommentService as _0x775931,CollaborationSessionService as _0x625313,UniverCollaborationClientPlugin as _0x4ce1bf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f5fb3}from'@univerjs-pro/license';import{dayjs as _0x2552d3,UserManagerService as _0x44d1fc,Inject as _0xee2d6d,Injector as _0x4801df,Disposable as _0x48bbe7,CustomRangeType as _0x2cf451,UniverInstanceType as _0x45a423,DependentOn as _0x1fb97b,IConfigService as _0x415962,Plugin as _0x1ef7b8,merge as _0x1ce58b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3e15e4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24ff45,IThreadCommentDataSourceService as _0x2e0912}from'@univerjs/thread-comment';import{bufferTime as _0x3eb001}from'rxjs';import{HTTPService as _0x490830}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4f936b=>(_0x4f936b[_0x4f936b[_0x228950(0x102)]=0x0]=_0x228950(0x102),_0x4f936b[_0x4f936b[_0x228950(0x157)]=0x1]=_0x228950(0x157),_0x4f936b[_0x4f936b[_0x228950(0x140)]=-0x1]=_0x228950(0x140),_0x4f936b))(I||{}),v=(_0x5252ec=>(_0x5252ec[_0x5252ec['Unknown']=0x0]=_0x228950(0x11e),_0x5252ec[_0x5252ec['Add']=0x1]=_0x228950(0x13c),_0x5252ec[_0x5252ec['Reply']=0x2]=_0x228950(0x12d),_0x5252ec[_0x5252ec['Edit']=0x3]=_0x228950(0x111),_0x5252ec[_0x5252ec[_0x228950(0x13a)]=0x4]=_0x228950(0x13a),_0x5252ec[_0x5252ec[_0x228950(0x107)]=0x5]=_0x228950(0x107),_0x5252ec[_0x5252ec['UNRECOGNIZED']=-0x1]=_0x228950(0x140),_0x5252ec))(v||{});const D=_0x227c78=>_0x2552d3(new Date(+_0x227c78))[_0x228950(0x117)](_0x228950(0x12b)),B=async(_0x130a41,_0xc131f9)=>{const _0x1c2f2b=_0x228950,_0x217d33=_0x130a41[_0x1c2f2b(0x121)](_0x44d1fc),_0x390e52=_0x130a41['get'](_0x490830);_0xc131f9[_0x1c2f2b(0x144)](_0x15a4fe=>{const _0x3add9e=_0x1c2f2b;_0x217d33[_0x3add9e(0x131)](_0x15a4fe)&&_0xc131f9[_0x3add9e(0x10f)](_0x15a4fe);}),_0xc131f9['size']&&(await _0x390e52[_0x1c2f2b(0x121)]('/universer-api/user/list',{'params':{'userIDs':[..._0xc131f9]}}))[_0x1c2f2b(0x136)][_0x1c2f2b(0xf3)]['forEach'](_0x294e4e=>{const _0x163187=_0x1c2f2b;_0x294e4e&&_0x217d33[_0x163187(0x118)](_0x294e4e);});};var K=Object[_0x228950(0x130)],V=(_0x39a52b,_0x410db0,_0xa1c7a7,_0x490309)=>{const _0x736133=_0x228950;for(var _0x23f9d8=_0x490309>0x1?void 0x0:_0x490309?K(_0x410db0,_0xa1c7a7):_0x410db0,_0xc15c2b=_0x39a52b[_0x736133(0x137)]-0x1,_0x23f585;_0xc15c2b>=0x0;_0xc15c2b--)(_0x23f585=_0x39a52b[_0xc15c2b])&&(_0x23f9d8=_0x23f585(_0x23f9d8)||_0x23f9d8);return _0x23f9d8;},p=(_0x3864d6,_0xc9cd8f)=>(_0x3ceb27,_0x4df8d5)=>_0xc9cd8f(_0x3ceb27,_0x4df8d5,_0x3864d6);let S=class extends _0x48bbe7{constructor(_0x5ca55d,_0x6a3c64,_0x13c37c,_0x10b2e3){const _0x590ff7=_0x228950;super(),this['_commentService']=_0x5ca55d,this['_threadCommentModel']=_0x6a3c64,this[_0x590ff7(0x110)]=_0x13c37c,this[_0x590ff7(0x112)]=_0x10b2e3,this[_0x590ff7(0x100)](),this[_0x590ff7(0x14f)]();}[_0x228950(0x14f)](){const _0x1d303c=_0x228950;this[_0x1d303c(0x132)](this[_0x1d303c(0x10c)][_0x1d303c(0x10d)]['pipe'](_0x3eb001(0x10))['subscribe'](_0xfbfa45=>{const _0x30213f=_0x1d303c,_0x1c89da=new Set();_0xfbfa45['forEach'](_0x35532d=>{const _0x41539f=_0x496a;switch(_0x35532d[_0x41539f(0x151)]){case'add':{const _0x513d6a=_0x35532d['payload'][_0x41539f(0xff)];_0x1c89da[_0x41539f(0xf2)](_0x513d6a);break;}}}),B(this[_0x30213f(0x112)],_0x1c89da);}));}['_init'](){const _0x224126=_0x228950;this[_0x224126(0x132)](this[_0x224126(0x139)][_0x224126(0x10d)]['subscribe'](async _0x4155a2=>{const _0x9be0da=_0x224126;var _0x44bb25,_0x55532a,_0x4cb58f,_0x42e6eb;const _0xba405b=(_0x44bb25=this['_threadCommentModel'][_0x9be0da(0x115)](_0x4155a2['unitId'])[_0x9be0da(0x109)](_0x4c34f6=>_0x4c34f6['threadId']===_0x4155a2[_0x9be0da(0x105)]))==null?void 0x0:_0x44bb25['root'];if(!_0xba405b)return;const {unitId:_0x3c4cfd,subUnitId:_0x5e3e5f}=_0xba405b;switch(_0x4155a2[_0x9be0da(0x116)]&&this[_0x9be0da(0x110)]['addUser'](_0x4155a2[_0x9be0da(0x116)]),_0x4155a2[_0x9be0da(0x151)]){case v[_0x9be0da(0x13c)]:break;case v['Reply']:{this[_0x9be0da(0x10c)]['addComment'](_0x3c4cfd,_0x5e3e5f,{'unitId':_0x3c4cfd,'subUnitId':_0x5e3e5f,'ref':'','id':_0x4155a2['replyId'],'dT':D(+_0x4155a2[_0x9be0da(0xfe)]),'threadId':_0x4155a2[_0x9be0da(0x105)],'personId':(_0x4cb58f=(_0x55532a=_0x4155a2[_0x9be0da(0x116)])==null?void 0x0:_0x55532a[_0x9be0da(0x14c)])!=null?_0x4cb58f:_0x4155a2[_0x9be0da(0x10a)],'text':JSON['parse'](_0x4155a2[_0x9be0da(0x10e)]),'parentId':_0xba405b['id']});break;}case v['Delete']:{const _0xa3ce9b=this['_threadCommentModel']['getComment'](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);_0xa3ce9b&&_0xa3ce9b[_0x9be0da(0x12f)]&&this[_0x9be0da(0x10c)][_0x9be0da(0x124)](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);break;}case v[_0x9be0da(0x111)]:{this[_0x9be0da(0x10c)][_0x9be0da(0x145)](_0x3c4cfd,_0x5e3e5f,{'commentId':_0x4155a2[_0x9be0da(0x129)],'text':JSON[_0x9be0da(0x104)](_0x4155a2['content'])});break;}case v[_0x9be0da(0x107)]:{const _0x588d31=(_0x42e6eb=this[_0x9be0da(0x10c)][_0x9be0da(0x115)](_0x4155a2[_0x9be0da(0x103)])[_0x9be0da(0x109)](_0x16f52a=>_0x16f52a[_0x9be0da(0x105)]===_0x4155a2['threadId']))==null?void 0x0:_0x42e6eb['root'];_0x588d31&&this[_0x9be0da(0x10c)][_0x9be0da(0x147)](_0x3c4cfd,_0x5e3e5f,_0x588d31['id'],_0x4155a2[_0x9be0da(0xfa)]===I[_0x9be0da(0x157)]);break;}}}));}};S=V([p(0x0,_0xee2d6d(_0x775931)),p(0x1,_0xee2d6d(_0x24ff45)),p(0x2,_0xee2d6d(_0x44d1fc)),p(0x3,_0xee2d6d(_0x4801df))],S);const z=_0x228950(0x154),M={};var k=Object[_0x228950(0x130)],Q=(_0x4c91e6,_0x515286,_0x2373d4,_0x1c6c0f)=>{const _0x96f1ec=_0x228950;for(var _0x1ff295=_0x1c6c0f>0x1?void 0x0:_0x1c6c0f?k(_0x515286,_0x2373d4):_0x515286,_0x391cc8=_0x4c91e6[_0x96f1ec(0x137)]-0x1,_0x14f2b3;_0x391cc8>=0x0;_0x391cc8--)(_0x14f2b3=_0x4c91e6[_0x391cc8])&&(_0x1ff295=_0x14f2b3(_0x1ff295)||_0x1ff295);return _0x1ff295;},_=(_0x595682,_0x4c8830)=>(_0x299328,_0x4751ab)=>_0x4c8830(_0x299328,_0x4751ab,_0x595682);function _0x496a(_0x4545c7,_0x1e6c0b){const _0x1add72=_0x1add();return _0x496a=function(_0x496abd,_0x189fd3){_0x496abd=_0x496abd-0xf2;let _0x265e62=_0x1add72[_0x496abd];return _0x265e62;},_0x496a(_0x4545c7,_0x1e6c0b);}function X(_0x1efdd8,_0xb834a6){const _0x33ba88=_0x228950,_0x26bf13=_0x1efdd8[_0x33ba88(0x148)][0x0];return{..._0xb834a6,'id':_0x26bf13[_0x33ba88(0x129)],'resolved':_0x1efdd8[_0x33ba88(0xfa)]===0x1,'dT':D(_0x26bf13[_0x33ba88(0xfe)]),'personId':_0x26bf13[_0x33ba88(0x10a)],'threadId':_0x26bf13[_0x33ba88(0x105)]};}function ee(_0x244ee3,_0x3da754,_0x537f44){const _0x172bbe=_0x228950;var _0x298f30,_0x521264;if(((_0x521264=(_0x298f30=_0x244ee3==null?void 0x0:_0x244ee3[_0x172bbe(0x148)])==null?void 0x0:_0x298f30[_0x172bbe(0x137)])!=null?_0x521264:0x0)>0x0){const _0x22e68e=(_0x3e9766,_0x7f5a4d)=>({'id':_0x3e9766[_0x172bbe(0x129)],'threadId':_0x3e9766[_0x172bbe(0x105)],'dT':D(_0x3e9766[_0x172bbe(0xfe)]),'personId':_0x3e9766[_0x172bbe(0x10a)],'resolved':_0x244ee3[_0x172bbe(0xfa)]===I[_0x172bbe(0x157)],'unitId':_0x3da754,'subUnitId':_0x537f44,'text':JSON['parse'](_0x3e9766[_0x172bbe(0x10e)]),'parentId':_0x7f5a4d}),_0x10c944=_0x22e68e(_0x244ee3['replies'][0x0]);return{..._0x10c944,'children':_0x244ee3[_0x172bbe(0x148)]['slice'](0x1)[_0x172bbe(0x135)](_0x220860=>_0x22e68e(_0x220860,_0x10c944['id']))};}return null;}function _0x1add(){const _0x5e61f3=['customRanges','UNRECOGNIZED','_threadCommentDataSourceService','/add','addComment','forEach','updateComment','code','resolveComment','replies','listComments','/solved','_config','userID','comments','error','_initUserSync','getCurrentUser','type','values','100100GmvaBu','thread-comment-data-source.config','comment','244017qzflvp','Solved','add','users','onReady','post','onStarting','_sessionService','saveCommentToSnapshot','/reply','solved','1435230ArYezi','_httpService','pluginName','createTimestamp','personId','_init','/universer-api/comment/unit/','OpenOrReOpen','unitId','parse','threadId','filter','Solve','3FNSrok','find','userId','1234XDTRny','_threadCommentModel','commentUpdate$','content','delete','_userService','Edit','_injector','stringify','syncUpdateMutationToColla','getUnit','user','format','addUser','requireSession','_configService','_threadCommentDataSource','148408QsJWKg','748602dmtJyg','Unknown','11QdavXu','/delete','get','resolved','COMMENT','deleteComment','getMemberID','ref','symbol','5038790bOoWVe','replyId','rangeType','YYYY/MM/DD\x20HH:mm','rangeId','Reply','defineProperty','parentId','getOwnPropertyDescriptor','getUser','disposeWithMe','_initDataSource','dataSource','map','body','length','UNIVER_UNKNOWN','_commentService','Delete','217GnPAOE','Add','/edit','24GrmAmp'];_0x1add=function(){return _0x5e61f3;};return _0x1add();}let f=class{constructor(_0x255cc5,_0x286240,_0x29f518,_0x5768cf){const _0x4542bb=_0x228950;this[_0x4542bb(0xfc)]=_0x255cc5,this['_userService']=_0x286240,this['_sessionService']=_0x29f518,this[_0x4542bb(0x112)]=_0x5768cf;}async[_0x228950(0x143)](_0x5a71ed){const _0x21922e=_0x228950;var _0x4cbdd3,_0x1d247f;const {parentId:_0x50965d,unitId:_0x2aa2d3,text:_0x238da3,threadId:_0x33ab66}=_0x5a71ed,_0x352eea=(_0x1d247f=(_0x4cbdd3=_0x238da3[_0x21922e(0x13f)])==null?void 0x0:_0x4cbdd3[_0x21922e(0x106)](_0x5aff46=>_0x5aff46[_0x21922e(0x12a)]===_0x2cf451[_0x21922e(0x123)])[_0x21922e(0x135)](_0x22d0a4=>_0x22d0a4[_0x21922e(0x12c)]))!=null?_0x1d247f:[],_0x57ffaa=JSON['stringify'](_0x238da3),_0x10eb68=(await this['_sessionService'][_0x21922e(0x119)](_0x2aa2d3))[_0x21922e(0x125)]();if(_0x50965d){const _0x133bbe={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea,'threadId':_0x33ab66},_0x13bcb0=(await this['_httpService']['post'](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0xf9),{'body':_0x133bbe}))['body']['reply'];return{..._0x5a71ed,'id':_0x13bcb0[_0x21922e(0x129)],'dT':_0x2552d3(+_0x13bcb0['createTimestamp'])['format'](_0x21922e(0x12b)),'personId':_0x13bcb0[_0x21922e(0x10a)]};}else{const _0x43a603={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea},_0x464142=await this['_httpService'][_0x21922e(0xf5)](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0x142),{'body':_0x43a603});return X(_0x464142[_0x21922e(0x136)][_0x21922e(0x155)],_0x5a71ed);}}async[_0x228950(0x145)](_0x92cc7e){const _0x4712b2=_0x228950;var _0x7c326e,_0x2fd128;const {text:_0x8cd053,unitId:_0x4b9120}=_0x92cc7e,_0x5e58e0=(_0x2fd128=(_0x7c326e=_0x8cd053['customRanges'])==null?void 0x0:_0x7c326e[_0x4712b2(0x106)](_0x5be89e=>_0x5be89e['rangeType']===_0x2cf451['COMMENT'])['map'](_0x2067e0=>_0x2067e0[_0x4712b2(0x12c)]))!=null?_0x2fd128:[],_0x28db7e=JSON[_0x4712b2(0x113)](_0x8cd053),_0x8b8ef1=_0x92cc7e[_0x4712b2(0x105)],_0x9eac1b=_0x92cc7e['id'],_0x51ff1e={'memberId':(await this[_0x4712b2(0xf7)]['requireSession'](_0x4b9120))[_0x4712b2(0x125)](),'unitId':_0x4b9120,'threadId':_0x8b8ef1,'mention':_0x5e58e0,'content':_0x28db7e,'replyId':_0x9eac1b},_0x562b35=await this[_0x4712b2(0xfc)]['post'](_0x4712b2(0x101)+_0x4b9120+_0x4712b2(0x13d),{'body':_0x51ff1e});return!_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)]||_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)][_0x4712b2(0x146)]===0x1;}async[_0x228950(0x147)](_0x28d2d6){const _0x28a32c=_0x228950,{unitId:_0xe9e900}=_0x28d2d6,_0x1ec037=_0x28d2d6[_0x28a32c(0x105)],_0x100020={'memberId':this[_0x28a32c(0x110)][_0x28a32c(0x150)]()['userID'],'unitId':_0xe9e900,'threadId':_0x1ec037,'solved':_0x28d2d6[_0x28a32c(0x122)]?I[_0x28a32c(0x157)]:I['OpenOrReOpen']},_0x4676a4=await this['_httpService'][_0x28a32c(0xf5)](_0x28a32c(0x101)+_0xe9e900+_0x28a32c(0x14a),{'body':_0x100020});return!_0x4676a4[_0x28a32c(0x136)][_0x28a32c(0x14e)]||_0x4676a4['body'][_0x28a32c(0x14e)][_0x28a32c(0x146)]===0x1;}async[_0x228950(0x124)](_0xf1b468,_0x396f5c,_0x14ba5b,_0x46cbbd){const _0x41517d=_0x228950,_0x53451d={'memberId':(await this[_0x41517d(0xf7)][_0x41517d(0x119)](_0xf1b468))[_0x41517d(0x125)](),'threadId':_0x14ba5b,'replyId':_0x46cbbd,'unitId':_0xf1b468},_0x4ee1cd=await this['_httpService']['post'](_0x41517d(0x101)+_0xf1b468+_0x41517d(0x120),{'body':_0x53451d});return!_0x4ee1cd['body'][_0x41517d(0x14e)]||_0x4ee1cd[_0x41517d(0x136)][_0x41517d(0x14e)][_0x41517d(0x146)]===0x1;}async[_0x228950(0x149)](_0x508540,_0x45e3eb,_0xfaba8d){const _0x2e6ffb=_0x228950,_0x3cc724={'unitId':_0x508540,'threadId':_0xfaba8d},_0x481081=await this['_httpService'][_0x2e6ffb(0xf5)](_0x2e6ffb(0x101)+_0x508540+'/list',{'body':_0x3cc724}),_0x396594=_0xfaba8d['map'](_0x14f6b0=>ee(_0x481081[_0x2e6ffb(0x136)][_0x2e6ffb(0x14d)][_0x14f6b0],_0x508540,_0x45e3eb))[_0x2e6ffb(0x106)](Boolean);return Object[_0x2e6ffb(0x152)](_0x481081[_0x2e6ffb(0x136)]['users'])[_0x2e6ffb(0x144)](_0x120757=>{const _0x20ece8=_0x2e6ffb;this[_0x20ece8(0x110)][_0x20ece8(0x118)](_0x120757);}),_0x396594;}[_0x228950(0xf8)](_0xfb3659){const _0x1124c4=_0x228950;return{'id':_0xfb3659['id'],'threadId':_0xfb3659[_0x1124c4(0x105)],'ref':_0xfb3659[_0x1124c4(0x126)]};}};f=Q([_(0x0,_0xee2d6d(_0x490830)),_(0x1,_0xee2d6d(_0x44d1fc)),_(0x2,_0xee2d6d(_0x625313)),_(0x3,_0xee2d6d(_0x4801df))],f);var re=Object[_0x228950(0x130)],te=(_0x3fec26,_0x576a0e,_0x143167,_0x22f35f)=>{for(var _0x4b61d2=_0x22f35f>0x1?void 0x0:_0x22f35f?re(_0x576a0e,_0x143167):_0x576a0e,_0x129c2c=_0x3fec26['length']-0x1,_0x150035;_0x129c2c>=0x0;_0x129c2c--)(_0x150035=_0x3fec26[_0x129c2c])&&(_0x4b61d2=_0x150035(_0x4b61d2)||_0x4b61d2);return _0x4b61d2;},N=(_0x49e23d,_0x12d7ca)=>(_0x68a343,_0x2a9bcc)=>_0x12d7ca(_0x68a343,_0x2a9bcc,_0x49e23d);let g=class extends _0x48bbe7{constructor(_0x2313b0,_0x5626d5){const _0x3e0a29=_0x228950;super(),this[_0x3e0a29(0x141)]=_0x2313b0,this[_0x3e0a29(0x11b)]=_0x5626d5,this[_0x3e0a29(0x133)]();}[_0x228950(0x133)](){const _0x90c8cb=_0x228950;this[_0x90c8cb(0x141)][_0x90c8cb(0x134)]=this[_0x90c8cb(0x11b)],this['_threadCommentDataSourceService'][_0x90c8cb(0x114)]=!0x1;}};g=te([N(0x0,_0x2e0912),N(0x1,_0xee2d6d(f))],g);var se=Object[_0x228950(0x12e)],oe=Object[_0x228950(0x130)],ne=(_0xbd62b0,_0x2f8557,_0x220a3f)=>_0x2f8557 in _0xbd62b0?se(_0xbd62b0,_0x2f8557,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220a3f}):_0xbd62b0[_0x2f8557]=_0x220a3f,ie=(_0x3f58f2,_0x18272a,_0x8ea51e,_0x1bf23e)=>{const _0x1b8aa4=_0x228950;for(var _0x32245a=_0x1bf23e>0x1?void 0x0:_0x1bf23e?oe(_0x18272a,_0x8ea51e):_0x18272a,_0xd447d5=_0x3f58f2[_0x1b8aa4(0x137)]-0x1,_0x2158dc;_0xd447d5>=0x0;_0xd447d5--)(_0x2158dc=_0x3f58f2[_0xd447d5])&&(_0x32245a=_0x2158dc(_0x32245a)||_0x32245a);return _0x32245a;},w=(_0x211b06,_0x5480c9)=>(_0x49ddd9,_0x467914)=>_0x5480c9(_0x49ddd9,_0x467914,_0x211b06),$=(_0x22eb36,_0x5a74e7,_0x2e82e9)=>ne(_0x22eb36,typeof _0x5a74e7!=_0x228950(0x127)?_0x5a74e7+'':_0x5a74e7,_0x2e82e9);let b=class extends _0x1ef7b8{constructor(_0xd6ce28=M,_0x524328,_0x87170a){const _0x44cfe2=_0x228950;super(),this[_0x44cfe2(0x14b)]=_0xd6ce28,this['_injector']=_0x524328,this[_0x44cfe2(0x11a)]=_0x87170a;const {..._0x3f8c4d}=_0x1ce58b({},M,this[_0x44cfe2(0x14b)]);this[_0x44cfe2(0x11a)]['setConfig'](z,_0x3f8c4d);}[_0x228950(0xf6)](){[[f],[g],[S]]['forEach'](_0x56009f=>{const _0x22e651=_0x496a;this[_0x22e651(0x112)][_0x22e651(0xf2)](_0x56009f);});}[_0x228950(0xf4)](){const _0x295f2a=_0x228950;this[_0x295f2a(0x112)][_0x295f2a(0x121)](g),this[_0x295f2a(0x112)][_0x295f2a(0x121)](S);}};$(b,_0x228950(0xfd),W),$(b,_0x228950(0x151),_0x45a423[_0x228950(0x138)]),b=ie([_0x1fb97b(_0x3e15e4,_0x4ce1bf,_0x1f5fb3),w(0x1,_0xee2d6d(_0x4801df)),w(0x2,_0x415962)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4be095=_0x46ea;(function(_0x45e5b3,_0x4fb667){const _0x23c293=_0x46ea,_0xba98f1=_0x45e5b3();while(!![]){try{const _0x11a11c=parseInt(_0x23c293(0x14d))/0x1*(-parseInt(_0x23c293(0x12a))/0x2)+-parseInt(_0x23c293(0x158))/0x3+-parseInt(_0x23c293(0x155))/0x4+parseInt(_0x23c293(0x135))/0x5*(-parseInt(_0x23c293(0x12d))/0x6)+-parseInt(_0x23c293(0x114))/0x7+-parseInt(_0x23c293(0x11c))/0x8*(-parseInt(_0x23c293(0x134))/0x9)+-parseInt(_0x23c293(0x157))/0xa*(-parseInt(_0x23c293(0x10c))/0xb);if(_0x11a11c===_0x4fb667)break;else _0xba98f1['push'](_0xba98f1['shift']());}catch(_0x164068){_0xba98f1['push'](_0xba98f1['shift']());}}}(_0x2140,0xe8b73));import{CommentService as _0x560a2f,CollaborationSessionService as _0x211d73,UniverCollaborationClientPlugin as _0x1dff39}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xea7e1c}from'@univerjs-pro/license';import{dayjs as _0x13f57c,UserManagerService as _0x57bf20,Inject as _0x397f67,Injector as _0xc959e6,Disposable as _0x3714c3,CustomRangeType as _0x32b452,UniverInstanceType as _0x15cbc2,DependentOn as _0x5f982,IConfigService as _0x129d4e,Plugin as _0x29b97b,merge as _0x596754}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5c16f9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4bce87,IThreadCommentDataSourceService as _0x3222e2}from'@univerjs/thread-comment';import{bufferTime as _0x1c1e04}from'rxjs';import{HTTPService as _0x2e19d5}from'@univerjs/network';const W=_0x4be095(0x14f);var I=(_0x4c7dcd=>(_0x4c7dcd[_0x4c7dcd[_0x4be095(0x113)]=0x0]='OpenOrReOpen',_0x4c7dcd[_0x4c7dcd[_0x4be095(0x154)]=0x1]=_0x4be095(0x154),_0x4c7dcd[_0x4c7dcd['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x4c7dcd))(I||{}),v=(_0x810411=>(_0x810411[_0x810411[_0x4be095(0x148)]=0x0]=_0x4be095(0x148),_0x810411[_0x810411['Add']=0x1]='Add',_0x810411[_0x810411[_0x4be095(0x11d)]=0x2]=_0x4be095(0x11d),_0x810411[_0x810411[_0x4be095(0x117)]=0x3]=_0x4be095(0x117),_0x810411[_0x810411[_0x4be095(0x123)]=0x4]=_0x4be095(0x123),_0x810411[_0x810411[_0x4be095(0x139)]=0x5]='Solve',_0x810411[_0x810411['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x810411))(v||{});const D=_0x38968f=>_0x13f57c(new Date(+_0x38968f))[_0x4be095(0x119)](_0x4be095(0x12e)),B=async(_0x1cb238,_0x4c95f7)=>{const _0x265463=_0x4be095,_0x426a8e=_0x1cb238[_0x265463(0x153)](_0x57bf20),_0x5d1acb=_0x1cb238[_0x265463(0x153)](_0x2e19d5);_0x4c95f7[_0x265463(0x107)](_0x2e621c=>{_0x426a8e['getUser'](_0x2e621c)&&_0x4c95f7['delete'](_0x2e621c);}),_0x4c95f7[_0x265463(0x142)]&&(await _0x5d1acb[_0x265463(0x153)](_0x265463(0x120),{'params':{'userIDs':[..._0x4c95f7]}}))[_0x265463(0x138)]['users'][_0x265463(0x107)](_0x3df401=>{const _0x2b7804=_0x265463;_0x3df401&&_0x426a8e[_0x2b7804(0x133)](_0x3df401);});};var K=Object[_0x4be095(0x100)],V=(_0x5e3472,_0x22337f,_0x887530,_0x5869d1)=>{for(var _0x5346d6=_0x5869d1>0x1?void 0x0:_0x5869d1?K(_0x22337f,_0x887530):_0x22337f,_0x25b942=_0x5e3472['length']-0x1,_0x4073b5;_0x25b942>=0x0;_0x25b942--)(_0x4073b5=_0x5e3472[_0x25b942])&&(_0x5346d6=_0x4073b5(_0x5346d6)||_0x5346d6);return _0x5346d6;},p=(_0x1e3c23,_0x5f31bd)=>(_0x4a2bc7,_0x4acfcd)=>_0x5f31bd(_0x4a2bc7,_0x4acfcd,_0x1e3c23);let S=class extends _0x3714c3{constructor(_0x251b8b,_0x296f2f,_0x26f7a4,_0x22b262){const _0xbb1f4c=_0x4be095;super(),this[_0xbb1f4c(0x101)]=_0x251b8b,this[_0xbb1f4c(0x13d)]=_0x296f2f,this[_0xbb1f4c(0x13a)]=_0x26f7a4,this[_0xbb1f4c(0x10f)]=_0x22b262,this[_0xbb1f4c(0x146)](),this['_initUserSync']();}['_initUserSync'](){const _0x330dae=_0x4be095;this[_0x330dae(0x121)](this[_0x330dae(0x13d)][_0x330dae(0x125)][_0x330dae(0x105)](_0x1c1e04(0x10))[_0x330dae(0x122)](_0x1f35d0=>{const _0x371aca=_0x330dae,_0x119497=new Set();_0x1f35d0[_0x371aca(0x107)](_0x3f4878=>{const _0x4440b1=_0x371aca;switch(_0x3f4878[_0x4440b1(0x129)]){case'add':{const _0x1c797a=_0x3f4878['payload']['personId'];_0x119497['add'](_0x1c797a);break;}}}),B(this['_injector'],_0x119497);}));}['_init'](){const _0x1bb09e=_0x4be095;this['disposeWithMe'](this[_0x1bb09e(0x101)][_0x1bb09e(0x125)][_0x1bb09e(0x122)](async _0x46bb1a=>{const _0x25f2bc=_0x1bb09e;var _0x3ddfb4,_0x10ad86,_0xc279d3,_0x4c6832;const _0x44e216=(_0x3ddfb4=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x93c4b7=>_0x93c4b7[_0x25f2bc(0x109)]===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x3ddfb4[_0x25f2bc(0x130)];if(!_0x44e216)return;const {unitId:_0x47ab1f,subUnitId:_0x378aea}=_0x44e216;switch(_0x46bb1a[_0x25f2bc(0x13e)]&&this['_userService'][_0x25f2bc(0x133)](_0x46bb1a[_0x25f2bc(0x13e)]),_0x46bb1a[_0x25f2bc(0x129)]){case v['Add']:break;case v[_0x25f2bc(0x11d)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x144)](_0x47ab1f,_0x378aea,{'unitId':_0x47ab1f,'subUnitId':_0x378aea,'ref':'','id':_0x46bb1a['replyId'],'dT':D(+_0x46bb1a['createTimestamp']),'threadId':_0x46bb1a[_0x25f2bc(0x109)],'personId':(_0xc279d3=(_0x10ad86=_0x46bb1a[_0x25f2bc(0x13e)])==null?void 0x0:_0x10ad86[_0x25f2bc(0x124)])!=null?_0xc279d3:_0x46bb1a[_0x25f2bc(0x12f)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)]),'parentId':_0x44e216['id']});break;}case v[_0x25f2bc(0x123)]:{const _0x1b5ce1=this['_threadCommentModel']['getComment'](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);_0x1b5ce1&&_0x1b5ce1[_0x25f2bc(0x108)]&&this[_0x25f2bc(0x13d)][_0x25f2bc(0x136)](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);break;}case v[_0x25f2bc(0x117)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x152)](_0x47ab1f,_0x378aea,{'commentId':_0x46bb1a[_0x25f2bc(0x128)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)])});break;}case v[_0x25f2bc(0x139)]:{const _0xa362c0=(_0x4c6832=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x475a8b=>_0x475a8b['threadId']===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x4c6832[_0x25f2bc(0x130)];_0xa362c0&&this['_threadCommentModel'][_0x25f2bc(0x151)](_0x47ab1f,_0x378aea,_0xa362c0['id'],_0x46bb1a[_0x25f2bc(0x13b)]===I[_0x25f2bc(0x154)]);break;}}}));}};S=V([p(0x0,_0x397f67(_0x560a2f)),p(0x1,_0x397f67(_0x4bce87)),p(0x2,_0x397f67(_0x57bf20)),p(0x3,_0x397f67(_0xc959e6))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2cbff2,_0x4714ee,_0x53d45e,_0x6ff2c4)=>{const _0x499be7=_0x4be095;for(var _0x37e8fc=_0x6ff2c4>0x1?void 0x0:_0x6ff2c4?k(_0x4714ee,_0x53d45e):_0x4714ee,_0x453551=_0x2cbff2[_0x499be7(0x14b)]-0x1,_0x3e7ce2;_0x453551>=0x0;_0x453551--)(_0x3e7ce2=_0x2cbff2[_0x453551])&&(_0x37e8fc=_0x3e7ce2(_0x37e8fc)||_0x37e8fc);return _0x37e8fc;},_=(_0x26619b,_0xd94b76)=>(_0x415ac1,_0x29d130)=>_0xd94b76(_0x415ac1,_0x29d130,_0x26619b);function X(_0x33f314,_0x15e9f8){const _0x37095a=_0x4be095,_0x58e2f1=_0x33f314[_0x37095a(0x104)][0x0];return{..._0x15e9f8,'id':_0x58e2f1[_0x37095a(0x128)],'resolved':_0x33f314['solved']===0x1,'dT':D(_0x58e2f1[_0x37095a(0x11f)]),'personId':_0x58e2f1[_0x37095a(0x12f)],'threadId':_0x58e2f1[_0x37095a(0x109)]};}function ee(_0x421d9c,_0x14134,_0x255509){const _0x4c76ce=_0x4be095;var _0xe0dc1d,_0x53fae1;if(((_0x53fae1=(_0xe0dc1d=_0x421d9c==null?void 0x0:_0x421d9c[_0x4c76ce(0x104)])==null?void 0x0:_0xe0dc1d[_0x4c76ce(0x14b)])!=null?_0x53fae1:0x0)>0x0){const _0x35b8d3=(_0x5a4e43,_0x1655b5)=>({'id':_0x5a4e43['replyId'],'threadId':_0x5a4e43[_0x4c76ce(0x109)],'dT':D(_0x5a4e43[_0x4c76ce(0x11f)]),'personId':_0x5a4e43[_0x4c76ce(0x12f)],'resolved':_0x421d9c[_0x4c76ce(0x13b)]===I[_0x4c76ce(0x154)],'unitId':_0x14134,'subUnitId':_0x255509,'text':JSON[_0x4c76ce(0x140)](_0x5a4e43['content']),'parentId':_0x1655b5}),_0x4b5ffe=_0x35b8d3(_0x421d9c[_0x4c76ce(0x104)][0x0]);return{..._0x4b5ffe,'children':_0x421d9c[_0x4c76ce(0x104)][_0x4c76ce(0x10a)](0x1)[_0x4c76ce(0x116)](_0x100257=>_0x35b8d3(_0x100257,_0x4b5ffe['id']))};}return null;}let f=class{constructor(_0x2a34d9,_0x10788d,_0x463dc1,_0x16d5dc){const _0xb52375=_0x4be095;this['_httpService']=_0x2a34d9,this[_0xb52375(0x13a)]=_0x10788d,this[_0xb52375(0x15c)]=_0x463dc1,this[_0xb52375(0x10f)]=_0x16d5dc;}async[_0x4be095(0x144)](_0x5c4552){const _0xbc9bab=_0x4be095;var _0x155c41,_0x5cbe85;const {parentId:_0x2516e6,unitId:_0x1c00ac,text:_0xcb792a,threadId:_0x4c6716}=_0x5c4552,_0x4afe34=(_0x5cbe85=(_0x155c41=_0xcb792a[_0xbc9bab(0x15a)])==null?void 0x0:_0x155c41['filter'](_0xf3d5c3=>_0xf3d5c3['rangeType']===_0x32b452[_0xbc9bab(0x110)])[_0xbc9bab(0x116)](_0x4e5082=>_0x4e5082[_0xbc9bab(0x13c)]))!=null?_0x5cbe85:[],_0x405e3a=JSON[_0xbc9bab(0x106)](_0xcb792a),_0x18d6f9=(await this[_0xbc9bab(0x15c)]['requireSession'](_0x1c00ac))['getMemberID']();if(_0x2516e6){const _0x5b4168={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34,'threadId':_0x4c6716},_0x4babb5=(await this[_0xbc9bab(0x127)]['post']('/universer-api/comment/unit/'+_0x1c00ac+_0xbc9bab(0x112),{'body':_0x5b4168}))['body'][_0xbc9bab(0x131)];return{..._0x5c4552,'id':_0x4babb5['replyId'],'dT':_0x13f57c(+_0x4babb5[_0xbc9bab(0x11f)])[_0xbc9bab(0x119)](_0xbc9bab(0x12e)),'personId':_0x4babb5[_0xbc9bab(0x12f)]};}else{const _0xb4f414={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34},_0x4bb7d8=await this[_0xbc9bab(0x127)]['post'](_0xbc9bab(0x147)+_0x1c00ac+_0xbc9bab(0x14c),{'body':_0xb4f414});return X(_0x4bb7d8[_0xbc9bab(0x138)][_0xbc9bab(0x118)],_0x5c4552);}}async[_0x4be095(0x152)](_0x4fb029){const _0x4ae3db=_0x4be095;var _0x501d8e,_0x106657;const {text:_0x53400b,unitId:_0x2fb1ea}=_0x4fb029,_0x2c0804=(_0x106657=(_0x501d8e=_0x53400b[_0x4ae3db(0x15a)])==null?void 0x0:_0x501d8e['filter'](_0x2c8247=>_0x2c8247[_0x4ae3db(0x12b)]===_0x32b452['COMMENT'])[_0x4ae3db(0x116)](_0x3a85d7=>_0x3a85d7['rangeId']))!=null?_0x106657:[],_0x5becd9=JSON[_0x4ae3db(0x106)](_0x53400b),_0x9d06cd=_0x4fb029[_0x4ae3db(0x109)],_0x5c582c=_0x4fb029['id'],_0x20f04c={'memberId':(await this['_sessionService'][_0x4ae3db(0x11e)](_0x2fb1ea))[_0x4ae3db(0x126)](),'unitId':_0x2fb1ea,'threadId':_0x9d06cd,'mention':_0x2c0804,'content':_0x5becd9,'replyId':_0x5c582c},_0x207485=await this[_0x4ae3db(0x127)][_0x4ae3db(0x137)](_0x4ae3db(0x147)+_0x2fb1ea+_0x4ae3db(0x145),{'body':_0x20f04c});return!_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)]||_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)][_0x4ae3db(0x156)]===0x1;}async[_0x4be095(0x151)](_0x199cc7){const _0x3271ce=_0x4be095,{unitId:_0x219814}=_0x199cc7,_0x7828d9=_0x199cc7[_0x3271ce(0x109)],_0x3e6204={'memberId':this[_0x3271ce(0x13a)]['getCurrentUser']()['userID'],'unitId':_0x219814,'threadId':_0x7828d9,'solved':_0x199cc7['resolved']?I[_0x3271ce(0x154)]:I[_0x3271ce(0x113)]},_0x44137f=await this['_httpService'][_0x3271ce(0x137)](_0x3271ce(0x147)+_0x219814+'/solved',{'body':_0x3e6204});return!_0x44137f['body'][_0x3271ce(0x15b)]||_0x44137f[_0x3271ce(0x138)]['error']['code']===0x1;}async['deleteComment'](_0x1f8a57,_0x186baf,_0x4c5f29,_0x158777){const _0x48dd08=_0x4be095,_0x2a7747={'memberId':(await this['_sessionService']['requireSession'](_0x1f8a57))[_0x48dd08(0x126)](),'threadId':_0x4c5f29,'replyId':_0x158777,'unitId':_0x1f8a57},_0x3c7f1c=await this[_0x48dd08(0x127)][_0x48dd08(0x137)](_0x48dd08(0x147)+_0x1f8a57+_0x48dd08(0x14e),{'body':_0x2a7747});return!_0x3c7f1c['body']['error']||_0x3c7f1c[_0x48dd08(0x138)][_0x48dd08(0x15b)][_0x48dd08(0x156)]===0x1;}async['listComments'](_0x3fd2e8,_0x2ca23a,_0x44dbf3){const _0x20fbeb=_0x4be095,_0x3780de={'unitId':_0x3fd2e8,'threadId':_0x44dbf3},_0x10c092=await this[_0x20fbeb(0x127)][_0x20fbeb(0x137)](_0x20fbeb(0x147)+_0x3fd2e8+_0x20fbeb(0x11a),{'body':_0x3780de}),_0x4d6e95=_0x44dbf3[_0x20fbeb(0x116)](_0x27b28a=>ee(_0x10c092['body']['comments'][_0x27b28a],_0x3fd2e8,_0x2ca23a))[_0x20fbeb(0x10b)](Boolean);return Object[_0x20fbeb(0x143)](_0x10c092[_0x20fbeb(0x138)]['users'])[_0x20fbeb(0x107)](_0x43543e=>{const _0x547a95=_0x20fbeb;this[_0x547a95(0x13a)][_0x547a95(0x133)](_0x43543e);}),_0x4d6e95;}[_0x4be095(0x10e)](_0x2803ab){const _0x5b4993=_0x4be095;return{'id':_0x2803ab['id'],'threadId':_0x2803ab[_0x5b4993(0x109)],'ref':_0x2803ab[_0x5b4993(0x14a)]};}};function _0x2140(){const _0x2adab7=['values','addComment','/edit','_init','/universer-api/comment/unit/','Unknown','getUnit','ref','length','/add','1DsbBNd','/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','resolveComment','updateComment','get','Solved','1849212eaZzcN','code','50803570HQnFoL','1332279BTtIWs','_initDataSource','customRanges','error','_sessionService','getOwnPropertyDescriptor','_commentService','content','syncUpdateMutationToColla','replies','pipe','stringify','forEach','parentId','threadId','slice','filter','11akaRPe','pluginName','saveCommentToSnapshot','_injector','COMMENT','_configService','/reply','OpenOrReOpen','1267385bifqvC','_threadCommentDataSourceService','map','Edit','comment','format','/list','dataSource','24qWZdoP','Reply','requireSession','createTimestamp','/universer-api/user/list','disposeWithMe','subscribe','Delete','userID','commentUpdate$','getMemberID','_httpService','replyId','type','3437744iDfKNK','rangeType','onReady','62754YZTMol','YYYY/MM/DD\x20HH:mm','userId','root','reply','_threadCommentDataSource','addUser','649926GqKXwc','735cOeuNc','deleteComment','post','body','Solve','_userService','solved','rangeId','_threadCommentModel','user','UNRECOGNIZED','parse','_config','size'];_0x2140=function(){return _0x2adab7;};return _0x2140();}f=Q([_(0x0,_0x397f67(_0x2e19d5)),_(0x1,_0x397f67(_0x57bf20)),_(0x2,_0x397f67(_0x211d73)),_(0x3,_0x397f67(_0xc959e6))],f);var re=Object[_0x4be095(0x100)],te=(_0x5a4a3c,_0x45b7aa,_0x313bb7,_0x428ae2)=>{const _0x5dad5c=_0x4be095;for(var _0x4203e9=_0x428ae2>0x1?void 0x0:_0x428ae2?re(_0x45b7aa,_0x313bb7):_0x45b7aa,_0x1209ca=_0x5a4a3c[_0x5dad5c(0x14b)]-0x1,_0x26f574;_0x1209ca>=0x0;_0x1209ca--)(_0x26f574=_0x5a4a3c[_0x1209ca])&&(_0x4203e9=_0x26f574(_0x4203e9)||_0x4203e9);return _0x4203e9;},N=(_0x4fd238,_0x199b12)=>(_0x2d1e47,_0x2c4ffc)=>_0x199b12(_0x2d1e47,_0x2c4ffc,_0x4fd238);let g=class extends _0x3714c3{constructor(_0x30440c,_0x54fe54){const _0x5af7ed=_0x4be095;super(),this[_0x5af7ed(0x115)]=_0x30440c,this[_0x5af7ed(0x132)]=_0x54fe54,this[_0x5af7ed(0x159)]();}[_0x4be095(0x159)](){const _0x4c805c=_0x4be095;this[_0x4c805c(0x115)][_0x4c805c(0x11b)]=this[_0x4c805c(0x132)],this[_0x4c805c(0x115)][_0x4c805c(0x103)]=!0x1;}};g=te([N(0x0,_0x3222e2),N(0x1,_0x397f67(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2a86e2,_0x3f721d,_0x3e1fd5)=>_0x3f721d in _0x2a86e2?se(_0x2a86e2,_0x3f721d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e1fd5}):_0x2a86e2[_0x3f721d]=_0x3e1fd5,ie=(_0x5b733f,_0x74d5,_0x51f4ec,_0x9ffcc1)=>{const _0x457dc5=_0x4be095;for(var _0x1edd34=_0x9ffcc1>0x1?void 0x0:_0x9ffcc1?oe(_0x74d5,_0x51f4ec):_0x74d5,_0x3c5226=_0x5b733f[_0x457dc5(0x14b)]-0x1,_0x5ad2f1;_0x3c5226>=0x0;_0x3c5226--)(_0x5ad2f1=_0x5b733f[_0x3c5226])&&(_0x1edd34=_0x5ad2f1(_0x1edd34)||_0x1edd34);return _0x1edd34;},w=(_0x365af3,_0x2cadd7)=>(_0x5f4afc,_0xc0a57a)=>_0x2cadd7(_0x5f4afc,_0xc0a57a,_0x365af3),$=(_0x48dbe7,_0x265459,_0x57b22a)=>ne(_0x48dbe7,typeof _0x265459!='symbol'?_0x265459+'':_0x265459,_0x57b22a);let b=class extends _0x29b97b{constructor(_0x5323fc=M,_0x3877fe,_0x5e38e0){const _0xc73e41=_0x4be095;super(),this[_0xc73e41(0x141)]=_0x5323fc,this['_injector']=_0x3877fe,this[_0xc73e41(0x111)]=_0x5e38e0;const {..._0x1c1163}=_0x596754({},M,this[_0xc73e41(0x141)]);this[_0xc73e41(0x111)][_0xc73e41(0x150)](z,_0x1c1163);}['onStarting'](){const _0x24cd04=_0x4be095;[[f],[g],[S]][_0x24cd04(0x107)](_0x3fca81=>{const _0x4480c5=_0x24cd04;this[_0x4480c5(0x10f)]['add'](_0x3fca81);});}[_0x4be095(0x12c)](){const _0x3e06bb=_0x4be095;this[_0x3e06bb(0x10f)]['get'](g),this[_0x3e06bb(0x10f)][_0x3e06bb(0x153)](S);}};function _0x46ea(_0x24dd1f,_0x5d9bc0){const _0x21405a=_0x2140();return _0x46ea=function(_0x46eabc,_0x481a1a){_0x46eabc=_0x46eabc-0x100;let _0x30d7c9=_0x21405a[_0x46eabc];return _0x30d7c9;},_0x46ea(_0x24dd1f,_0x5d9bc0);}$(b,_0x4be095(0x10d),W),$(b,_0x4be095(0x129),_0x15cbc2['UNIVER_UNKNOWN']),b=ie([_0x5f982(_0x5c16f9,_0x1dff39,_0xea7e1c),w(0x1,_0x397f67(_0xc959e6)),w(0x2,_0x129d4e)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1927(_0x4a24cb,_0xcf9027){const _0x3bd8af=_0x3bd8();return _0x1927=function(_0x192784,_0xb53684){_0x192784=_0x192784-0x1ea;let _0xb3e5f4=_0x3bd8af[_0x192784];return _0xb3e5f4;},_0x1927(_0x4a24cb,_0xcf9027);}function _0x3bd8(){const _0x23badb=['parentId','filter','userId','DependentOn','_threadCommentDataSourceService','payload','IThreadCommentDataSourceService','Disposable','/reply','user','stringify','_httpService','UniverProThreadCommentDatasource','3346aNEemi','ThreadCommentModel','slice','function','@univerjs/thread-comment-ui','1191645eeDCYF','UniverThreadCommentUIPlugin','@univerjs/network','_initDataSource','amd','listComments','defineProperty','8136fFRgWH','@univerjs-pro/license','subscribe','UniverCollaborationClientPlugin','forEach','userID','getUnit','/add','Edit','Add','syncUpdateMutationToColla','setConfig','comment','format','_userService','CustomRangeType','_init','CollaborationSessionService','onReady','disposeWithMe','/edit','Solve','get','content','_injector','customRanges','getUser','map','deleteComment','pipe','79256gviBIv','rangeType','1382LvmXKz','UniverThreadCommentDataSourcePlugin','values','parse','replies','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','commentUpdate$','UserManagerService','rangeId','Inject','updateComment','dayjs','HTTPService','8ZgQdGR','dataSource','replyId','8552502aTrOvb','getCurrentUser','8076180uIGBWW','_threadCommentDataSource','Delete','CommentService','UNIVER_UNKNOWN','_commentService','body','getMemberID','IConfigService','85yVUbUc','code','UniverProLicense','type','Injector','Solved','93313wWPjlp','root','UniverProCollaborationClient','/universer-api/comment/unit/','toStringTag','resolved','_config','comments','_threadCommentModel','users','object','1980OpvdGc','getComment','post','UNRECOGNIZED','Unknown','add','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/core','createTimestamp','addComment','_sessionService','bufferTime','rxjs','addUser','Reply','resolveComment','UniverNetwork','Plugin','length','_configService','error','/solved','requireSession','getOwnPropertyDescriptor','/delete','threadId','exports','334LmTlIT','onStarting'];_0x3bd8=function(){return _0x23badb;};return _0x3bd8();}(function(_0x4033e3,_0x540bb3){const _0x1df9e6=_0x1927,_0x4794f3=_0x4033e3();while(!![]){try{const _0x4db19b=-parseInt(_0x1df9e6(0x25f))/0x1*(parseInt(_0x1df9e6(0x216))/0x2)+parseInt(_0x1df9e6(0x1ef))/0x3+-parseInt(_0x1df9e6(0x214))/0x4*(parseInt(_0x1df9e6(0x232))/0x5)+-parseInt(_0x1df9e6(0x1f6))/0x6*(parseInt(_0x1df9e6(0x1ea))/0x7)+parseInt(_0x1df9e6(0x224))/0x8*(parseInt(_0x1df9e6(0x227))/0x9)+-parseInt(_0x1df9e6(0x229))/0xa+parseInt(_0x1df9e6(0x238))/0xb*(parseInt(_0x1df9e6(0x243))/0xc);if(_0x4db19b===_0x540bb3)break;else _0x4794f3['push'](_0x4794f3['shift']());}catch(_0x11dc93){_0x4794f3['push'](_0x4794f3['shift']());}}}(_0x3bd8,0xb0b3a),function(_0x3194d2,_0x1d4326){const _0x22d588=_0x1927;typeof exports==_0x22d588(0x242)&&typeof module<'u'?_0x1d4326(exports,require('@univerjs-pro/collaboration-client'),require(_0x22d588(0x1f7)),require(_0x22d588(0x24b)),require(_0x22d588(0x1ee)),require('@univerjs/thread-comment'),require(_0x22d588(0x250)),require('@univerjs/network')):typeof define==_0x22d588(0x1ed)&&define[_0x22d588(0x1f3)]?define([_0x22d588(0x25e),'@univerjs-pro/collaboration-client',_0x22d588(0x1f7),_0x22d588(0x24b),_0x22d588(0x1ee),'@univerjs/thread-comment','rxjs',_0x22d588(0x1f1)],_0x1d4326):(_0x3194d2=typeof globalThis<'u'?globalThis:_0x3194d2||self,_0x1d4326(_0x3194d2[_0x22d588(0x26d)]={},_0x3194d2[_0x22d588(0x23a)],_0x3194d2[_0x22d588(0x234)],_0x3194d2['UniverCore'],_0x3194d2['UniverThreadCommentUi'],_0x3194d2['UniverThreadComment'],_0x3194d2[_0x22d588(0x250)],_0x3194d2[_0x22d588(0x254)]));}(this,function(_0x4b8500,_0x410ab3,_0x3913ca,_0x43ff14,_0x315cc2,_0x293da4,_0x135669,_0xa198f5){'use strict';const _0x68cbcb=_0x1927;const _0x47759d=_0x68cbcb(0x24a);var _0xd2dbd0=(_0x4350d4=>(_0x4350d4[_0x4350d4[_0x68cbcb(0x21c)]=0x0]='OpenOrReOpen',_0x4350d4[_0x4350d4[_0x68cbcb(0x237)]=0x1]=_0x68cbcb(0x237),_0x4350d4[_0x4350d4['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4350d4))(_0xd2dbd0||{}),_0x2a6a07=(_0x1a5220=>(_0x1a5220[_0x1a5220[_0x68cbcb(0x247)]=0x0]='Unknown',_0x1a5220[_0x1a5220[_0x68cbcb(0x1ff)]=0x1]='Add',_0x1a5220[_0x1a5220[_0x68cbcb(0x252)]=0x2]=_0x68cbcb(0x252),_0x1a5220[_0x1a5220['Edit']=0x3]=_0x68cbcb(0x1fe),_0x1a5220[_0x1a5220[_0x68cbcb(0x22b)]=0x4]=_0x68cbcb(0x22b),_0x1a5220[_0x1a5220[_0x68cbcb(0x20b)]=0x5]=_0x68cbcb(0x20b),_0x1a5220[_0x1a5220[_0x68cbcb(0x246)]=-0x1]=_0x68cbcb(0x246),_0x1a5220))(_0x2a6a07||{});const _0x33033b=_0x5b8813=>_0x43ff14['dayjs'](new Date(+_0x5b8813))['format'](_0x68cbcb(0x21b)),_0x188cd1=async(_0x228e71,_0x5d105f)=>{const _0x28c1b8=_0x68cbcb,_0x3548f6=_0x228e71[_0x28c1b8(0x20c)](_0x43ff14['UserManagerService']),_0x44c9ef=_0x228e71['get'](_0xa198f5[_0x28c1b8(0x223)]);_0x5d105f['forEach'](_0xacf965=>{const _0x40d408=_0x28c1b8;_0x3548f6[_0x40d408(0x210)](_0xacf965)&&_0x5d105f['delete'](_0xacf965);}),_0x5d105f['size']&&(await _0x44c9ef[_0x28c1b8(0x20c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5d105f]}}))[_0x28c1b8(0x22f)][_0x28c1b8(0x241)]['forEach'](_0x420340=>{const _0x4ab6d8=_0x28c1b8;_0x420340&&_0x3548f6[_0x4ab6d8(0x251)](_0x420340);});};var _0x38f1f5=Object[_0x68cbcb(0x25b)],_0x22be8c=(_0x409293,_0x15e06f,_0x1886cc,_0x4505f8)=>{for(var _0x45d19e=_0x4505f8>0x1?void 0x0:_0x4505f8?_0x38f1f5(_0x15e06f,_0x1886cc):_0x15e06f,_0x2a8890=_0x409293['length']-0x1,_0x41575a;_0x2a8890>=0x0;_0x2a8890--)(_0x41575a=_0x409293[_0x2a8890])&&(_0x45d19e=_0x41575a(_0x45d19e)||_0x45d19e);return _0x45d19e;},_0x4ad2e9=(_0x44ee1c,_0x539633)=>(_0xd767a7,_0x3e18d6)=>_0x539633(_0xd767a7,_0x3e18d6,_0x44ee1c);let _0x3c98ab=class extends _0x43ff14[_0x68cbcb(0x268)]{constructor(_0xe47e05,_0x34718a,_0x2acedb,_0x3a7f5a){const _0x22812d=_0x68cbcb;super(),this[_0x22812d(0x22e)]=_0xe47e05,this[_0x22812d(0x240)]=_0x34718a,this['_userService']=_0x2acedb,this[_0x22812d(0x20e)]=_0x3a7f5a,this[_0x22812d(0x206)](),this['_initUserSync']();}['_initUserSync'](){const _0x1c99b3=_0x68cbcb;this[_0x1c99b3(0x209)](this[_0x1c99b3(0x240)][_0x1c99b3(0x21d)][_0x1c99b3(0x213)](_0x135669[_0x1c99b3(0x24f)](0x10))[_0x1c99b3(0x1f8)](_0x3904a1=>{const _0x48b5b3=_0x1c99b3,_0x294eab=new Set();_0x3904a1[_0x48b5b3(0x1fa)](_0x9db516=>{const _0x5dd85c=_0x48b5b3;switch(_0x9db516[_0x5dd85c(0x235)]){case _0x5dd85c(0x248):{const _0x1a2495=_0x9db516[_0x5dd85c(0x266)]['personId'];_0x294eab['add'](_0x1a2495);break;}}}),_0x188cd1(this[_0x48b5b3(0x20e)],_0x294eab);}));}[_0x68cbcb(0x206)](){const _0x91717f=_0x68cbcb;this['disposeWithMe'](this[_0x91717f(0x22e)]['commentUpdate$']['subscribe'](async _0x36ffac=>{const _0x4940b4=_0x91717f;var _0x474631,_0x171cac,_0x3749dc,_0xdc93ee;const _0x556af3=(_0x474631=this[_0x4940b4(0x240)]['getUnit'](_0x36ffac['unitId'])[_0x4940b4(0x249)](_0x512828=>_0x512828[_0x4940b4(0x25d)]===_0x36ffac[_0x4940b4(0x25d)]))==null?void 0x0:_0x474631[_0x4940b4(0x239)];if(!_0x556af3)return;const {unitId:_0x5d779a,subUnitId:_0x914646}=_0x556af3;switch(_0x36ffac[_0x4940b4(0x26a)]&&this[_0x4940b4(0x204)][_0x4940b4(0x251)](_0x36ffac[_0x4940b4(0x26a)]),_0x36ffac[_0x4940b4(0x235)]){case _0x2a6a07['Add']:break;case _0x2a6a07[_0x4940b4(0x252)]:{this[_0x4940b4(0x240)][_0x4940b4(0x24d)](_0x5d779a,_0x914646,{'unitId':_0x5d779a,'subUnitId':_0x914646,'ref':'','id':_0x36ffac[_0x4940b4(0x226)],'dT':_0x33033b(+_0x36ffac['createTimestamp']),'threadId':_0x36ffac[_0x4940b4(0x25d)],'personId':(_0x3749dc=(_0x171cac=_0x36ffac[_0x4940b4(0x26a)])==null?void 0x0:_0x171cac['userID'])!=null?_0x3749dc:_0x36ffac[_0x4940b4(0x263)],'text':JSON[_0x4940b4(0x219)](_0x36ffac[_0x4940b4(0x20d)]),'parentId':_0x556af3['id']});break;}case _0x2a6a07[_0x4940b4(0x22b)]:{const _0x607cdc=this[_0x4940b4(0x240)][_0x4940b4(0x244)](_0x5d779a,_0x914646,_0x36ffac[_0x4940b4(0x226)]);_0x607cdc&&_0x607cdc[_0x4940b4(0x261)]&&this[_0x4940b4(0x240)][_0x4940b4(0x212)](_0x5d779a,_0x914646,_0x36ffac['replyId']);break;}case _0x2a6a07['Edit']:{this[_0x4940b4(0x240)][_0x4940b4(0x221)](_0x5d779a,_0x914646,{'commentId':_0x36ffac[_0x4940b4(0x226)],'text':JSON['parse'](_0x36ffac[_0x4940b4(0x20d)])});break;}case _0x2a6a07[_0x4940b4(0x20b)]:{const _0x50f4fb=(_0xdc93ee=this[_0x4940b4(0x240)][_0x4940b4(0x1fc)](_0x36ffac['unitId'])['find'](_0x2c3cf5=>_0x2c3cf5[_0x4940b4(0x25d)]===_0x36ffac[_0x4940b4(0x25d)]))==null?void 0x0:_0xdc93ee[_0x4940b4(0x239)];_0x50f4fb&&this['_threadCommentModel'][_0x4940b4(0x253)](_0x5d779a,_0x914646,_0x50f4fb['id'],_0x36ffac['solved']===_0xd2dbd0[_0x4940b4(0x237)]);break;}}}));}};_0x3c98ab=_0x22be8c([_0x4ad2e9(0x0,_0x43ff14['Inject'](_0x410ab3[_0x68cbcb(0x22c)])),_0x4ad2e9(0x1,_0x43ff14['Inject'](_0x293da4[_0x68cbcb(0x1eb)])),_0x4ad2e9(0x2,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x21e)])),_0x4ad2e9(0x3,_0x43ff14['Inject'](_0x43ff14[_0x68cbcb(0x236)]))],_0x3c98ab);const _0x160666='thread-comment-data-source.config',_0x5dcb9d={};var _0x39dc30=Object[_0x68cbcb(0x25b)],_0x5ea355=(_0x1d9b05,_0x59e427,_0x2ec891,_0x58eb04)=>{for(var _0x397815=_0x58eb04>0x1?void 0x0:_0x58eb04?_0x39dc30(_0x59e427,_0x2ec891):_0x59e427,_0x327d6b=_0x1d9b05['length']-0x1,_0x49a82a;_0x327d6b>=0x0;_0x327d6b--)(_0x49a82a=_0x1d9b05[_0x327d6b])&&(_0x397815=_0x49a82a(_0x397815)||_0x397815);return _0x397815;},_0x3d193d=(_0x2b72ef,_0x2085f4)=>(_0x125f9b,_0x3d1d44)=>_0x2085f4(_0x125f9b,_0x3d1d44,_0x2b72ef);function _0x54ae88(_0x417b68,_0x5a926d){const _0x24b2d4=_0x68cbcb,_0x87ae98=_0x417b68['replies'][0x0];return{..._0x5a926d,'id':_0x87ae98['replyId'],'resolved':_0x417b68['solved']===0x1,'dT':_0x33033b(_0x87ae98[_0x24b2d4(0x24c)]),'personId':_0x87ae98[_0x24b2d4(0x263)],'threadId':_0x87ae98[_0x24b2d4(0x25d)]};}function _0x3091e0(_0x108c86,_0x12b6ec,_0x27dadb){const _0x299a81=_0x68cbcb;var _0x52e9cd,_0x10f404;if(((_0x10f404=(_0x52e9cd=_0x108c86==null?void 0x0:_0x108c86['replies'])==null?void 0x0:_0x52e9cd[_0x299a81(0x256)])!=null?_0x10f404:0x0)>0x0){const _0x7dd90b=(_0x39a54d,_0x26d5c2)=>({'id':_0x39a54d[_0x299a81(0x226)],'threadId':_0x39a54d[_0x299a81(0x25d)],'dT':_0x33033b(_0x39a54d[_0x299a81(0x24c)]),'personId':_0x39a54d[_0x299a81(0x263)],'resolved':_0x108c86['solved']===_0xd2dbd0[_0x299a81(0x237)],'unitId':_0x12b6ec,'subUnitId':_0x27dadb,'text':JSON[_0x299a81(0x219)](_0x39a54d['content']),'parentId':_0x26d5c2}),_0xdcb6b2=_0x7dd90b(_0x108c86[_0x299a81(0x21a)][0x0]);return{..._0xdcb6b2,'children':_0x108c86[_0x299a81(0x21a)][_0x299a81(0x1ec)](0x1)['map'](_0x46d9c1=>_0x7dd90b(_0x46d9c1,_0xdcb6b2['id']))};}return null;}let _0x34fd15=class{constructor(_0x4239b2,_0x55846b,_0x300515,_0xbc1cc3){const _0x457d52=_0x68cbcb;this[_0x457d52(0x26c)]=_0x4239b2,this[_0x457d52(0x204)]=_0x55846b,this[_0x457d52(0x24e)]=_0x300515,this['_injector']=_0xbc1cc3;}async[_0x68cbcb(0x24d)](_0xd8605b){const _0x3603cd=_0x68cbcb;var _0x284831,_0x48714f;const {parentId:_0x3dc4be,unitId:_0x71b2f8,text:_0x1f946f,threadId:_0x173990}=_0xd8605b,_0x5c93ee=(_0x48714f=(_0x284831=_0x1f946f[_0x3603cd(0x20f)])==null?void 0x0:_0x284831[_0x3603cd(0x262)](_0x9afc9d=>_0x9afc9d[_0x3603cd(0x215)]===_0x43ff14[_0x3603cd(0x205)]['COMMENT'])[_0x3603cd(0x211)](_0x3648fe=>_0x3648fe[_0x3603cd(0x21f)]))!=null?_0x48714f:[],_0x4b0582=JSON[_0x3603cd(0x26b)](_0x1f946f),_0x242036=(await this[_0x3603cd(0x24e)][_0x3603cd(0x25a)](_0x71b2f8))['getMemberID']();if(_0x3dc4be){const _0x19c367={'memberId':_0x242036,'unitId':_0x71b2f8,'content':_0x4b0582,'mention':_0x5c93ee,'threadId':_0x173990},_0x316036=(await this['_httpService'][_0x3603cd(0x245)](_0x3603cd(0x23b)+_0x71b2f8+_0x3603cd(0x269),{'body':_0x19c367}))[_0x3603cd(0x22f)]['reply'];return{..._0xd8605b,'id':_0x316036[_0x3603cd(0x226)],'dT':_0x43ff14[_0x3603cd(0x222)](+_0x316036[_0x3603cd(0x24c)])[_0x3603cd(0x203)](_0x3603cd(0x21b)),'personId':_0x316036[_0x3603cd(0x263)]};}else{const _0x1addb2={'memberId':_0x242036,'unitId':_0x71b2f8,'content':_0x4b0582,'mention':_0x5c93ee},_0x18f399=await this[_0x3603cd(0x26c)][_0x3603cd(0x245)](_0x3603cd(0x23b)+_0x71b2f8+_0x3603cd(0x1fd),{'body':_0x1addb2});return _0x54ae88(_0x18f399['body'][_0x3603cd(0x202)],_0xd8605b);}}async[_0x68cbcb(0x221)](_0x482f98){const _0x5c85fc=_0x68cbcb;var _0x34ee89,_0x10d9ac;const {text:_0x4e1900,unitId:_0x2a4154}=_0x482f98,_0x770e8=(_0x10d9ac=(_0x34ee89=_0x4e1900[_0x5c85fc(0x20f)])==null?void 0x0:_0x34ee89[_0x5c85fc(0x262)](_0x3d004c=>_0x3d004c[_0x5c85fc(0x215)]===_0x43ff14[_0x5c85fc(0x205)]['COMMENT'])[_0x5c85fc(0x211)](_0x8d6c66=>_0x8d6c66['rangeId']))!=null?_0x10d9ac:[],_0x56e6c4=JSON['stringify'](_0x4e1900),_0xfb8188=_0x482f98[_0x5c85fc(0x25d)],_0x4aa1eb=_0x482f98['id'],_0x2bb96a={'memberId':(await this['_sessionService'][_0x5c85fc(0x25a)](_0x2a4154))['getMemberID'](),'unitId':_0x2a4154,'threadId':_0xfb8188,'mention':_0x770e8,'content':_0x56e6c4,'replyId':_0x4aa1eb},_0x40ba5c=await this[_0x5c85fc(0x26c)][_0x5c85fc(0x245)](_0x5c85fc(0x23b)+_0x2a4154+_0x5c85fc(0x20a),{'body':_0x2bb96a});return!_0x40ba5c[_0x5c85fc(0x22f)][_0x5c85fc(0x258)]||_0x40ba5c['body'][_0x5c85fc(0x258)][_0x5c85fc(0x233)]===0x1;}async[_0x68cbcb(0x253)](_0x4d2965){const _0x233905=_0x68cbcb,{unitId:_0x2690c6}=_0x4d2965,_0x2bcc70=_0x4d2965[_0x233905(0x25d)],_0x34f353={'memberId':this[_0x233905(0x204)][_0x233905(0x228)]()[_0x233905(0x1fb)],'unitId':_0x2690c6,'threadId':_0x2bcc70,'solved':_0x4d2965[_0x233905(0x23d)]?_0xd2dbd0[_0x233905(0x237)]:_0xd2dbd0['OpenOrReOpen']},_0x2e8c71=await this[_0x233905(0x26c)][_0x233905(0x245)](_0x233905(0x23b)+_0x2690c6+_0x233905(0x259),{'body':_0x34f353});return!_0x2e8c71[_0x233905(0x22f)]['error']||_0x2e8c71[_0x233905(0x22f)][_0x233905(0x258)]['code']===0x1;}async[_0x68cbcb(0x212)](_0x565edc,_0x540feb,_0x3890f0,_0x1a9b4f){const _0x287ee9=_0x68cbcb,_0x357358={'memberId':(await this[_0x287ee9(0x24e)][_0x287ee9(0x25a)](_0x565edc))[_0x287ee9(0x230)](),'threadId':_0x3890f0,'replyId':_0x1a9b4f,'unitId':_0x565edc},_0x1bac0b=await this[_0x287ee9(0x26c)][_0x287ee9(0x245)](_0x287ee9(0x23b)+_0x565edc+_0x287ee9(0x25c),{'body':_0x357358});return!_0x1bac0b[_0x287ee9(0x22f)][_0x287ee9(0x258)]||_0x1bac0b[_0x287ee9(0x22f)][_0x287ee9(0x258)][_0x287ee9(0x233)]===0x1;}async[_0x68cbcb(0x1f4)](_0x17df38,_0x253cec,_0x18a050){const _0x445fae=_0x68cbcb,_0xa58a59={'unitId':_0x17df38,'threadId':_0x18a050},_0x4325f0=await this[_0x445fae(0x26c)][_0x445fae(0x245)]('/universer-api/comment/unit/'+_0x17df38+'/list',{'body':_0xa58a59}),_0x18477d=_0x18a050[_0x445fae(0x211)](_0x266002=>_0x3091e0(_0x4325f0[_0x445fae(0x22f)][_0x445fae(0x23f)][_0x266002],_0x17df38,_0x253cec))[_0x445fae(0x262)](Boolean);return Object[_0x445fae(0x218)](_0x4325f0[_0x445fae(0x22f)][_0x445fae(0x241)])['forEach'](_0x2a202d=>{const _0x343242=_0x445fae;this[_0x343242(0x204)]['addUser'](_0x2a202d);}),_0x18477d;}['saveCommentToSnapshot'](_0x5f0af6){return{'id':_0x5f0af6['id'],'threadId':_0x5f0af6['threadId'],'ref':_0x5f0af6['ref']};}};_0x34fd15=_0x5ea355([_0x3d193d(0x0,_0x43ff14['Inject'](_0xa198f5[_0x68cbcb(0x223)])),_0x3d193d(0x1,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x21e)])),_0x3d193d(0x2,_0x43ff14['Inject'](_0x410ab3[_0x68cbcb(0x207)])),_0x3d193d(0x3,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x236)]))],_0x34fd15);var _0x758866=Object[_0x68cbcb(0x25b)],_0x2f145d=(_0x9db884,_0x1fc576,_0x337198,_0x3366c1)=>{const _0x50a8be=_0x68cbcb;for(var _0x566b4b=_0x3366c1>0x1?void 0x0:_0x3366c1?_0x758866(_0x1fc576,_0x337198):_0x1fc576,_0xf87754=_0x9db884[_0x50a8be(0x256)]-0x1,_0x22ac67;_0xf87754>=0x0;_0xf87754--)(_0x22ac67=_0x9db884[_0xf87754])&&(_0x566b4b=_0x22ac67(_0x566b4b)||_0x566b4b);return _0x566b4b;},_0x4797b3=(_0x45a0bb,_0xfa7aa9)=>(_0x110e3a,_0x4cdd16)=>_0xfa7aa9(_0x110e3a,_0x4cdd16,_0x45a0bb);let _0x5c4d1b=class extends _0x43ff14[_0x68cbcb(0x268)]{constructor(_0x582949,_0x534909){const _0x129a93=_0x68cbcb;super(),this[_0x129a93(0x265)]=_0x582949,this[_0x129a93(0x22a)]=_0x534909,this[_0x129a93(0x1f2)]();}['_initDataSource'](){const _0x5f094d=_0x68cbcb;this['_threadCommentDataSourceService'][_0x5f094d(0x225)]=this['_threadCommentDataSource'],this[_0x5f094d(0x265)][_0x5f094d(0x200)]=!0x1;}};_0x5c4d1b=_0x2f145d([_0x4797b3(0x0,_0x293da4[_0x68cbcb(0x267)]),_0x4797b3(0x1,_0x43ff14[_0x68cbcb(0x220)](_0x34fd15))],_0x5c4d1b);var _0x4d45ec=Object[_0x68cbcb(0x1f5)],_0x508a28=Object[_0x68cbcb(0x25b)],_0x578682=(_0x4af109,_0x2c688f,_0x15c657)=>_0x2c688f in _0x4af109?_0x4d45ec(_0x4af109,_0x2c688f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15c657}):_0x4af109[_0x2c688f]=_0x15c657,_0x283ca0=(_0xd6187d,_0x3f43ab,_0x26ac37,_0x3ebbfe)=>{const _0x3c6327=_0x68cbcb;for(var _0x1bb187=_0x3ebbfe>0x1?void 0x0:_0x3ebbfe?_0x508a28(_0x3f43ab,_0x26ac37):_0x3f43ab,_0x4da1a6=_0xd6187d[_0x3c6327(0x256)]-0x1,_0x3d7615;_0x4da1a6>=0x0;_0x4da1a6--)(_0x3d7615=_0xd6187d[_0x4da1a6])&&(_0x1bb187=_0x3d7615(_0x1bb187)||_0x1bb187);return _0x1bb187;},_0x474611=(_0x28411a,_0x106dca)=>(_0x6ed0a5,_0x19c98d)=>_0x106dca(_0x6ed0a5,_0x19c98d,_0x28411a),_0x49841d=(_0x23e2fa,_0x32ee1a,_0x3dbd94)=>_0x578682(_0x23e2fa,typeof _0x32ee1a!='symbol'?_0x32ee1a+'':_0x32ee1a,_0x3dbd94);_0x4b8500['UniverThreadCommentDataSourcePlugin']=class extends _0x43ff14[_0x68cbcb(0x255)]{constructor(_0x57d416=_0x5dcb9d,_0x8094b3,_0x334860){const _0x21b420=_0x68cbcb;super(),this[_0x21b420(0x23e)]=_0x57d416,this['_injector']=_0x8094b3,this[_0x21b420(0x257)]=_0x334860;const {..._0x5001d3}=_0x43ff14['merge']({},_0x5dcb9d,this[_0x21b420(0x23e)]);this['_configService'][_0x21b420(0x201)](_0x160666,_0x5001d3);}[_0x68cbcb(0x260)](){const _0x4d1fa2=_0x68cbcb;[[_0x34fd15],[_0x5c4d1b],[_0x3c98ab]][_0x4d1fa2(0x1fa)](_0x517118=>{const _0x378f8c=_0x4d1fa2;this['_injector'][_0x378f8c(0x248)](_0x517118);});}[_0x68cbcb(0x208)](){const _0x3112bd=_0x68cbcb;this[_0x3112bd(0x20e)]['get'](_0x5c4d1b),this['_injector'][_0x3112bd(0x20c)](_0x3c98ab);}},_0x49841d(_0x4b8500['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x47759d),_0x49841d(_0x4b8500[_0x68cbcb(0x217)],_0x68cbcb(0x235),_0x43ff14['UniverInstanceType'][_0x68cbcb(0x22d)]),_0x4b8500['UniverThreadCommentDataSourcePlugin']=_0x283ca0([_0x43ff14[_0x68cbcb(0x264)](_0x315cc2[_0x68cbcb(0x1f0)],_0x410ab3[_0x68cbcb(0x1f9)],_0x3913ca['UniverLicensePlugin']),_0x474611(0x1,_0x43ff14['Inject'](_0x43ff14['Injector'])),_0x474611(0x2,_0x43ff14[_0x68cbcb(0x231)])],_0x4b8500[_0x68cbcb(0x217)]),Object[_0x68cbcb(0x1f5)](_0x4b8500,Symbol[_0x68cbcb(0x23c)],{'value':'Module'});}));
1
+ (function(_0x294b03,_0x2c948f){const _0x120ea8=_0x4e91,_0x35d2cd=_0x294b03();while(!![]){try{const _0x373794=parseInt(_0x120ea8(0x1be))/0x1*(-parseInt(_0x120ea8(0x217))/0x2)+parseInt(_0x120ea8(0x213))/0x3*(parseInt(_0x120ea8(0x22d))/0x4)+-parseInt(_0x120ea8(0x1bb))/0x5*(-parseInt(_0x120ea8(0x1b4))/0x6)+-parseInt(_0x120ea8(0x1b6))/0x7*(parseInt(_0x120ea8(0x219))/0x8)+-parseInt(_0x120ea8(0x1fa))/0x9+parseInt(_0x120ea8(0x1f0))/0xa+-parseInt(_0x120ea8(0x1bc))/0xb;if(_0x373794===_0x2c948f)break;else _0x35d2cd['push'](_0x35d2cd['shift']());}catch(_0x57f8de){_0x35d2cd['push'](_0x35d2cd['shift']());}}}(_0x3fce,0x37f1b),function(_0x4aa942,_0x409506){const _0x55e99d=_0x4e91;typeof exports==_0x55e99d(0x1ef)&&typeof module<'u'?_0x409506(exports,require(_0x55e99d(0x1e3)),require(_0x55e99d(0x1e2)),require(_0x55e99d(0x1fb)),require('@univerjs/thread-comment-ui'),require(_0x55e99d(0x229)),require(_0x55e99d(0x1fe)),require(_0x55e99d(0x1d4))):typeof define==_0x55e99d(0x21f)&&define[_0x55e99d(0x238)]?define([_0x55e99d(0x1cd),_0x55e99d(0x1e3),_0x55e99d(0x1e2),_0x55e99d(0x1fb),_0x55e99d(0x212),'@univerjs/thread-comment',_0x55e99d(0x1fe),_0x55e99d(0x1d4)],_0x409506):(_0x4aa942=typeof globalThis<'u'?globalThis:_0x4aa942||self,_0x409506(_0x4aa942[_0x55e99d(0x20b)]={},_0x4aa942[_0x55e99d(0x237)],_0x4aa942[_0x55e99d(0x215)],_0x4aa942[_0x55e99d(0x1ed)],_0x4aa942['UniverThreadCommentUi'],_0x4aa942[_0x55e99d(0x226)],_0x4aa942['rxjs'],_0x4aa942['UniverNetwork']));}(this,function(_0x303efd,_0x2dc796,_0x2b3bb9,_0x546c0b,_0x24e492,_0x399ecb,_0x158e60,_0x48fe67){'use strict';const _0x4743e3=_0x4e91;const _0xb10e75=_0x4743e3(0x204);var _0x41926b=(_0x489a26=>(_0x489a26[_0x489a26['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x489a26[_0x489a26[_0x4743e3(0x1b2)]=0x1]=_0x4743e3(0x1b2),_0x489a26[_0x489a26[_0x4743e3(0x1b3)]=-0x1]=_0x4743e3(0x1b3),_0x489a26))(_0x41926b||{}),_0x5de992=(_0xa76209=>(_0xa76209[_0xa76209['Unknown']=0x0]='Unknown',_0xa76209[_0xa76209[_0x4743e3(0x20e)]=0x1]=_0x4743e3(0x20e),_0xa76209[_0xa76209['Reply']=0x2]=_0x4743e3(0x1d0),_0xa76209[_0xa76209[_0x4743e3(0x1eb)]=0x3]='Edit',_0xa76209[_0xa76209[_0x4743e3(0x211)]=0x4]=_0x4743e3(0x211),_0xa76209[_0xa76209[_0x4743e3(0x1b7)]=0x5]=_0x4743e3(0x1b7),_0xa76209[_0xa76209['UNRECOGNIZED']=-0x1]=_0x4743e3(0x1b3),_0xa76209))(_0x5de992||{});const _0x4ba732=_0x187a69=>_0x546c0b['dayjs'](new Date(+_0x187a69))[_0x4743e3(0x1b9)](_0x4743e3(0x21e)),_0x3eae6d=async(_0x319c01,_0x56bc74)=>{const _0x40e22f=_0x4743e3,_0x15c50c=_0x319c01[_0x40e22f(0x1c7)](_0x546c0b['UserManagerService']),_0x5bcad6=_0x319c01[_0x40e22f(0x1c7)](_0x48fe67[_0x40e22f(0x21d)]);_0x56bc74[_0x40e22f(0x1ce)](_0x267f0f=>{const _0x327b36=_0x40e22f;_0x15c50c[_0x327b36(0x1de)](_0x267f0f)&&_0x56bc74[_0x327b36(0x201)](_0x267f0f);}),_0x56bc74[_0x40e22f(0x206)]&&(await _0x5bcad6[_0x40e22f(0x1c7)](_0x40e22f(0x1c0),{'params':{'userIDs':[..._0x56bc74]}}))[_0x40e22f(0x1b5)]['users'][_0x40e22f(0x1ce)](_0x60b0bd=>{const _0x209f54=_0x40e22f;_0x60b0bd&&_0x15c50c[_0x209f54(0x1dd)](_0x60b0bd);});};var _0x2f903d=Object[_0x4743e3(0x214)],_0x275986=(_0x3bbf1b,_0x12dbf0,_0xd2fca0,_0x1e7769)=>{for(var _0x5b344d=_0x1e7769>0x1?void 0x0:_0x1e7769?_0x2f903d(_0x12dbf0,_0xd2fca0):_0x12dbf0,_0x2e3ca0=_0x3bbf1b['length']-0x1,_0x64f59;_0x2e3ca0>=0x0;_0x2e3ca0--)(_0x64f59=_0x3bbf1b[_0x2e3ca0])&&(_0x5b344d=_0x64f59(_0x5b344d)||_0x5b344d);return _0x5b344d;},_0x2be325=(_0x5d5634,_0x5c8646)=>(_0x2916d1,_0x57a36c)=>_0x5c8646(_0x2916d1,_0x57a36c,_0x5d5634);let _0x4dbf99=class extends _0x546c0b[_0x4743e3(0x1bf)]{constructor(_0x54dd78,_0x57ea9c,_0x23a1ec,_0x1d4f04){const _0x994d5=_0x4743e3;super(),this[_0x994d5(0x1f9)]=_0x54dd78,this[_0x994d5(0x1c4)]=_0x57ea9c,this[_0x994d5(0x20d)]=_0x23a1ec,this[_0x994d5(0x1cf)]=_0x1d4f04,this[_0x994d5(0x218)](),this[_0x994d5(0x21b)]();}[_0x4743e3(0x21b)](){const _0x2df520=_0x4743e3;this['disposeWithMe'](this[_0x2df520(0x1c4)][_0x2df520(0x1e7)][_0x2df520(0x1c1)](_0x158e60[_0x2df520(0x1fc)](0x10))[_0x2df520(0x232)](_0x2b3d51=>{const _0xbd6dc4=_0x2df520,_0x134db7=new Set();_0x2b3d51[_0xbd6dc4(0x1ce)](_0x193a44=>{const _0x4d49d2=_0xbd6dc4;switch(_0x193a44[_0x4d49d2(0x1e6)]){case _0x4d49d2(0x1f7):{const _0x3d0e75=_0x193a44[_0x4d49d2(0x221)][_0x4d49d2(0x1ca)];_0x134db7[_0x4d49d2(0x1f7)](_0x3d0e75);break;}}}),_0x3eae6d(this[_0xbd6dc4(0x1cf)],_0x134db7);}));}[_0x4743e3(0x218)](){const _0x5b229b=_0x4743e3;this[_0x5b229b(0x20a)](this['_commentService'][_0x5b229b(0x1e7)][_0x5b229b(0x232)](async _0x138326=>{const _0x2fc7a8=_0x5b229b;var _0x3e7fa9,_0x58bb1b,_0x25451f,_0x35a519;const _0x18c24c=(_0x3e7fa9=this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x234)](_0x138326[_0x2fc7a8(0x1fd)])['find'](_0xb17f10=>_0xb17f10[_0x2fc7a8(0x1af)]===_0x138326[_0x2fc7a8(0x1af)]))==null?void 0x0:_0x3e7fa9[_0x2fc7a8(0x1c8)];if(!_0x18c24c)return;const {unitId:_0x380aa4,subUnitId:_0x22a5ad}=_0x18c24c;switch(_0x138326[_0x2fc7a8(0x1da)]&&this[_0x2fc7a8(0x20d)]['addUser'](_0x138326[_0x2fc7a8(0x1da)]),_0x138326[_0x2fc7a8(0x1e6)]){case _0x5de992[_0x2fc7a8(0x20e)]:break;case _0x5de992[_0x2fc7a8(0x1d0)]:{this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x20f)](_0x380aa4,_0x22a5ad,{'unitId':_0x380aa4,'subUnitId':_0x22a5ad,'ref':'','id':_0x138326[_0x2fc7a8(0x1c3)],'dT':_0x4ba732(+_0x138326['createTimestamp']),'threadId':_0x138326['threadId'],'personId':(_0x25451f=(_0x58bb1b=_0x138326[_0x2fc7a8(0x1da)])==null?void 0x0:_0x58bb1b[_0x2fc7a8(0x1df)])!=null?_0x25451f:_0x138326[_0x2fc7a8(0x1c9)],'text':JSON[_0x2fc7a8(0x1f4)](_0x138326[_0x2fc7a8(0x203)]),'parentId':_0x18c24c['id']});break;}case _0x5de992[_0x2fc7a8(0x211)]:{const _0x402002=this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x224)](_0x380aa4,_0x22a5ad,_0x138326['replyId']);_0x402002&&_0x402002[_0x2fc7a8(0x222)]&&this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x208)](_0x380aa4,_0x22a5ad,_0x138326[_0x2fc7a8(0x1c3)]);break;}case _0x5de992[_0x2fc7a8(0x1eb)]:{this[_0x2fc7a8(0x1c4)]['updateComment'](_0x380aa4,_0x22a5ad,{'commentId':_0x138326[_0x2fc7a8(0x1c3)],'text':JSON[_0x2fc7a8(0x1f4)](_0x138326['content'])});break;}case _0x5de992['Solve']:{const _0x4a686a=(_0x35a519=this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x234)](_0x138326[_0x2fc7a8(0x1fd)])[_0x2fc7a8(0x1d8)](_0x5b35fe=>_0x5b35fe[_0x2fc7a8(0x1af)]===_0x138326[_0x2fc7a8(0x1af)]))==null?void 0x0:_0x35a519['root'];_0x4a686a&&this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x1f3)](_0x380aa4,_0x22a5ad,_0x4a686a['id'],_0x138326[_0x2fc7a8(0x22c)]===_0x41926b[_0x2fc7a8(0x1b2)]);break;}}}));}};_0x4dbf99=_0x275986([_0x2be325(0x0,_0x546c0b[_0x4743e3(0x1f6)](_0x2dc796[_0x4743e3(0x1ec)])),_0x2be325(0x1,_0x546c0b[_0x4743e3(0x1f6)](_0x399ecb[_0x4743e3(0x1e0)])),_0x2be325(0x2,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b[_0x4743e3(0x1bd)])),_0x2be325(0x3,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b[_0x4743e3(0x1e5)]))],_0x4dbf99);const _0x14adb6='thread-comment-data-source.config',_0x2ad507={};var _0x2ceaf3=Object[_0x4743e3(0x214)],_0x20a2e6=(_0x3179f0,_0x537791,_0x56619b,_0x463698)=>{const _0xd3d45e=_0x4743e3;for(var _0x4163e9=_0x463698>0x1?void 0x0:_0x463698?_0x2ceaf3(_0x537791,_0x56619b):_0x537791,_0x518f18=_0x3179f0[_0xd3d45e(0x210)]-0x1,_0x20a6c7;_0x518f18>=0x0;_0x518f18--)(_0x20a6c7=_0x3179f0[_0x518f18])&&(_0x4163e9=_0x20a6c7(_0x4163e9)||_0x4163e9);return _0x4163e9;},_0x221c50=(_0x2390c0,_0x452af6)=>(_0x3ac311,_0x1c2ca0)=>_0x452af6(_0x3ac311,_0x1c2ca0,_0x2390c0);function _0x422fbc(_0x56766a,_0x170a3a){const _0x587d4e=_0x4743e3,_0x33c19b=_0x56766a[_0x587d4e(0x22f)][0x0];return{..._0x170a3a,'id':_0x33c19b[_0x587d4e(0x1c3)],'resolved':_0x56766a[_0x587d4e(0x22c)]===0x1,'dT':_0x4ba732(_0x33c19b[_0x587d4e(0x216)]),'personId':_0x33c19b[_0x587d4e(0x1c9)],'threadId':_0x33c19b[_0x587d4e(0x1af)]};}function _0x3a22b9(_0x11118a,_0x4cc65d,_0x552901){const _0x12389e=_0x4743e3;var _0x466038,_0x32aa5f;if(((_0x32aa5f=(_0x466038=_0x11118a==null?void 0x0:_0x11118a[_0x12389e(0x22f)])==null?void 0x0:_0x466038[_0x12389e(0x210)])!=null?_0x32aa5f:0x0)>0x0){const _0x4b5722=(_0xaa63d9,_0x5e56e9)=>({'id':_0xaa63d9['replyId'],'threadId':_0xaa63d9['threadId'],'dT':_0x4ba732(_0xaa63d9[_0x12389e(0x216)]),'personId':_0xaa63d9[_0x12389e(0x1c9)],'resolved':_0x11118a[_0x12389e(0x22c)]===_0x41926b[_0x12389e(0x1b2)],'unitId':_0x4cc65d,'subUnitId':_0x552901,'text':JSON[_0x12389e(0x1f4)](_0xaa63d9['content']),'parentId':_0x5e56e9}),_0x98baf6=_0x4b5722(_0x11118a['replies'][0x0]);return{..._0x98baf6,'children':_0x11118a['replies'][_0x12389e(0x1e8)](0x1)[_0x12389e(0x22b)](_0x2f5445=>_0x4b5722(_0x2f5445,_0x98baf6['id']))};}return null;}let _0x54a193=class{constructor(_0x3b4d08,_0x3bc12d,_0x398fd6,_0x38681b){const _0x77453=_0x4743e3;this['_httpService']=_0x3b4d08,this[_0x77453(0x20d)]=_0x3bc12d,this[_0x77453(0x21a)]=_0x398fd6,this[_0x77453(0x1cf)]=_0x38681b;}async[_0x4743e3(0x20f)](_0x49998c){const _0x115e66=_0x4743e3;var _0x138061,_0x257a84;const {parentId:_0x5c17d9,unitId:_0x18cf22,text:_0x47e1a7,threadId:_0xbad013}=_0x49998c,_0x4d5a45=(_0x257a84=(_0x138061=_0x47e1a7[_0x115e66(0x1d2)])==null?void 0x0:_0x138061[_0x115e66(0x235)](_0x31e4e3=>_0x31e4e3[_0x115e66(0x22e)]===_0x546c0b['CustomRangeType'][_0x115e66(0x1f2)])[_0x115e66(0x22b)](_0x476848=>_0x476848[_0x115e66(0x1c5)]))!=null?_0x257a84:[],_0x41fac9=JSON[_0x115e66(0x21c)](_0x47e1a7),_0x2971ab=(await this[_0x115e66(0x21a)]['requireSession'](_0x18cf22))[_0x115e66(0x220)]();if(_0x5c17d9){const _0x20aba6={'memberId':_0x2971ab,'unitId':_0x18cf22,'content':_0x41fac9,'mention':_0x4d5a45,'threadId':_0xbad013},_0x34a6e=(await this[_0x115e66(0x230)]['post'](_0x115e66(0x1d3)+_0x18cf22+_0x115e66(0x207),{'body':_0x20aba6}))['body'][_0x115e66(0x223)];return{..._0x49998c,'id':_0x34a6e['replyId'],'dT':_0x546c0b[_0x115e66(0x1c6)](+_0x34a6e[_0x115e66(0x216)])[_0x115e66(0x1b9)](_0x115e66(0x21e)),'personId':_0x34a6e['userId']};}else{const _0x39ba3f={'memberId':_0x2971ab,'unitId':_0x18cf22,'content':_0x41fac9,'mention':_0x4d5a45},_0x247e02=await this['_httpService'][_0x115e66(0x23a)](_0x115e66(0x1d3)+_0x18cf22+_0x115e66(0x20c),{'body':_0x39ba3f});return _0x422fbc(_0x247e02[_0x115e66(0x1b5)]['comment'],_0x49998c);}}async['updateComment'](_0x2004a8){const _0x534277=_0x4743e3;var _0x1cb50f,_0x3b2394;const {text:_0x3b866b,unitId:_0x59e98b}=_0x2004a8,_0x20b318=(_0x3b2394=(_0x1cb50f=_0x3b866b[_0x534277(0x1d2)])==null?void 0x0:_0x1cb50f[_0x534277(0x235)](_0x7ab737=>_0x7ab737[_0x534277(0x22e)]===_0x546c0b['CustomRangeType'][_0x534277(0x1f2)])[_0x534277(0x22b)](_0x3e12db=>_0x3e12db[_0x534277(0x1c5)]))!=null?_0x3b2394:[],_0x2d7726=JSON[_0x534277(0x21c)](_0x3b866b),_0x523c1d=_0x2004a8[_0x534277(0x1af)],_0x199431=_0x2004a8['id'],_0x17280b={'memberId':(await this['_sessionService'][_0x534277(0x1b8)](_0x59e98b))[_0x534277(0x220)](),'unitId':_0x59e98b,'threadId':_0x523c1d,'mention':_0x20b318,'content':_0x2d7726,'replyId':_0x199431},_0x14b5e5=await this[_0x534277(0x230)][_0x534277(0x23a)](_0x534277(0x1d3)+_0x59e98b+'/edit',{'body':_0x17280b});return!_0x14b5e5['body'][_0x534277(0x1d1)]||_0x14b5e5['body'][_0x534277(0x1d1)][_0x534277(0x1d7)]===0x1;}async[_0x4743e3(0x1f3)](_0x386504){const _0x5a8aba=_0x4743e3,{unitId:_0x1d1f0b}=_0x386504,_0x5a4cfa=_0x386504['threadId'],_0xaf7f44={'memberId':this['_userService'][_0x5a8aba(0x202)]()[_0x5a8aba(0x1df)],'unitId':_0x1d1f0b,'threadId':_0x5a4cfa,'solved':_0x386504[_0x5a8aba(0x205)]?_0x41926b[_0x5a8aba(0x1b2)]:_0x41926b['OpenOrReOpen']},_0x50600a=await this[_0x5a8aba(0x230)]['post'](_0x5a8aba(0x1d3)+_0x1d1f0b+_0x5a8aba(0x1ee),{'body':_0xaf7f44});return!_0x50600a[_0x5a8aba(0x1b5)][_0x5a8aba(0x1d1)]||_0x50600a[_0x5a8aba(0x1b5)][_0x5a8aba(0x1d1)][_0x5a8aba(0x1d7)]===0x1;}async['deleteComment'](_0x574670,_0x361d97,_0xc8dded,_0x10d3bc){const _0x3a9fbe=_0x4743e3,_0x23324d={'memberId':(await this[_0x3a9fbe(0x21a)][_0x3a9fbe(0x1b8)](_0x574670))['getMemberID'](),'threadId':_0xc8dded,'replyId':_0x10d3bc,'unitId':_0x574670},_0x1fb64b=await this[_0x3a9fbe(0x230)]['post']('/universer-api/comment/unit/'+_0x574670+_0x3a9fbe(0x1d9),{'body':_0x23324d});return!_0x1fb64b['body']['error']||_0x1fb64b[_0x3a9fbe(0x1b5)][_0x3a9fbe(0x1d1)]['code']===0x1;}async[_0x4743e3(0x1d5)](_0x1b419a,_0x12c559,_0x2665eb){const _0x4d2841=_0x4743e3,_0x11477f={'unitId':_0x1b419a,'threadId':_0x2665eb},_0xbbe6a2=await this[_0x4d2841(0x230)][_0x4d2841(0x23a)](_0x4d2841(0x1d3)+_0x1b419a+_0x4d2841(0x1e4),{'body':_0x11477f}),_0x562a5d=_0x2665eb[_0x4d2841(0x22b)](_0xf5fc3=>_0x3a22b9(_0xbbe6a2[_0x4d2841(0x1b5)]['comments'][_0xf5fc3],_0x1b419a,_0x12c559))[_0x4d2841(0x235)](Boolean);return Object[_0x4d2841(0x1dc)](_0xbbe6a2[_0x4d2841(0x1b5)][_0x4d2841(0x227)])[_0x4d2841(0x1ce)](_0x3110a8=>{const _0x1c29e5=_0x4d2841;this[_0x1c29e5(0x20d)][_0x1c29e5(0x1dd)](_0x3110a8);}),_0x562a5d;}[_0x4743e3(0x22a)](_0x550254){const _0x492b10=_0x4743e3;return{'id':_0x550254['id'],'threadId':_0x550254[_0x492b10(0x1af)],'ref':_0x550254[_0x492b10(0x1e9)]};}};_0x54a193=_0x20a2e6([_0x221c50(0x0,_0x546c0b[_0x4743e3(0x1f6)](_0x48fe67[_0x4743e3(0x21d)])),_0x221c50(0x1,_0x546c0b['Inject'](_0x546c0b[_0x4743e3(0x1bd)])),_0x221c50(0x2,_0x546c0b[_0x4743e3(0x1f6)](_0x2dc796['CollaborationSessionService'])),_0x221c50(0x3,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b['Injector']))],_0x54a193);var _0x599ac3=Object[_0x4743e3(0x214)],_0x363031=(_0x48d531,_0x5065ed,_0x3176f2,_0x24c61e)=>{const _0x466a4c=_0x4743e3;for(var _0xc217b1=_0x24c61e>0x1?void 0x0:_0x24c61e?_0x599ac3(_0x5065ed,_0x3176f2):_0x5065ed,_0xf3b94f=_0x48d531[_0x466a4c(0x210)]-0x1,_0x552a3f;_0xf3b94f>=0x0;_0xf3b94f--)(_0x552a3f=_0x48d531[_0xf3b94f])&&(_0xc217b1=_0x552a3f(_0xc217b1)||_0xc217b1);return _0xc217b1;},_0x568259=(_0xcefece,_0x3a22f3)=>(_0x34b88a,_0x20c760)=>_0x3a22f3(_0x34b88a,_0x20c760,_0xcefece);let _0x1bb185=class extends _0x546c0b[_0x4743e3(0x1bf)]{constructor(_0x433a03,_0x2c434a){const _0x5c2620=_0x4743e3;super(),this[_0x5c2620(0x228)]=_0x433a03,this[_0x5c2620(0x1c2)]=_0x2c434a,this[_0x5c2620(0x1cc)]();}[_0x4743e3(0x1cc)](){const _0x2e51b8=_0x4743e3;this['_threadCommentDataSourceService'][_0x2e51b8(0x1f1)]=this[_0x2e51b8(0x1c2)],this[_0x2e51b8(0x228)][_0x2e51b8(0x231)]=!0x1;}};_0x1bb185=_0x363031([_0x568259(0x0,_0x399ecb[_0x4743e3(0x239)]),_0x568259(0x1,_0x546c0b[_0x4743e3(0x1f6)](_0x54a193))],_0x1bb185);var _0x24794d=Object[_0x4743e3(0x209)],_0x5450fa=Object[_0x4743e3(0x214)],_0x4d1e58=(_0x398847,_0x52401b,_0x1e8c95)=>_0x52401b in _0x398847?_0x24794d(_0x398847,_0x52401b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e8c95}):_0x398847[_0x52401b]=_0x1e8c95,_0x189638=(_0x48b848,_0x77ad45,_0x1972d6,_0x2dabb1)=>{const _0x177b96=_0x4743e3;for(var _0x337a97=_0x2dabb1>0x1?void 0x0:_0x2dabb1?_0x5450fa(_0x77ad45,_0x1972d6):_0x77ad45,_0x383927=_0x48b848[_0x177b96(0x210)]-0x1,_0x19354e;_0x383927>=0x0;_0x383927--)(_0x19354e=_0x48b848[_0x383927])&&(_0x337a97=_0x19354e(_0x337a97)||_0x337a97);return _0x337a97;},_0xfc290c=(_0x4de1e1,_0xedfe13)=>(_0xc828f,_0x5c1a1f)=>_0xedfe13(_0xc828f,_0x5c1a1f,_0x4de1e1),_0x27f2e7=(_0x43e230,_0xa514be,_0x1cf57e)=>_0x4d1e58(_0x43e230,typeof _0xa514be!='symbol'?_0xa514be+'':_0xa514be,_0x1cf57e);_0x303efd['UniverThreadCommentDataSourcePlugin']=class extends _0x546c0b[_0x4743e3(0x1f8)]{constructor(_0x29b98e=_0x2ad507,_0x27c06b,_0x4ad817){const _0x33abd0=_0x4743e3;super(),this['_config']=_0x29b98e,this[_0x33abd0(0x1cf)]=_0x27c06b,this['_configService']=_0x4ad817;const {..._0x338ac0}=_0x546c0b[_0x33abd0(0x1ba)]({},_0x2ad507,this['_config']);this[_0x33abd0(0x233)][_0x33abd0(0x1d6)](_0x14adb6,_0x338ac0);}[_0x4743e3(0x1f5)](){[[_0x54a193],[_0x1bb185],[_0x4dbf99]]['forEach'](_0x1477d7=>{const _0x52e408=_0x4e91;this[_0x52e408(0x1cf)][_0x52e408(0x1f7)](_0x1477d7);});}['onReady'](){const _0x22e613=_0x4743e3;this['_injector']['get'](_0x1bb185),this[_0x22e613(0x1cf)][_0x22e613(0x1c7)](_0x4dbf99);}},_0x27f2e7(_0x303efd[_0x4743e3(0x236)],_0x4743e3(0x1ff),_0xb10e75),_0x27f2e7(_0x303efd['UniverThreadCommentDataSourcePlugin'],'type',_0x546c0b['UniverInstanceType'][_0x4743e3(0x1ea)]),_0x303efd[_0x4743e3(0x236)]=_0x189638([_0x546c0b[_0x4743e3(0x225)](_0x24e492[_0x4743e3(0x1e1)],_0x2dc796[_0x4743e3(0x1b1)],_0x2b3bb9[_0x4743e3(0x1b0)]),_0xfc290c(0x1,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b[_0x4743e3(0x1e5)])),_0xfc290c(0x2,_0x546c0b[_0x4743e3(0x1cb)])],_0x303efd[_0x4743e3(0x236)]),Object[_0x4743e3(0x209)](_0x303efd,Symbol[_0x4743e3(0x1db)],{'value':_0x4743e3(0x200)});}));function _0x4e91(_0x40a97f,_0x17d7be){const _0x3fce25=_0x3fce();return _0x4e91=function(_0x4e9133,_0x25e937){_0x4e9133=_0x4e9133-0x1af;let _0xd5fe6c=_0x3fce25[_0x4e9133];return _0xd5fe6c;},_0x4e91(_0x40a97f,_0x17d7be);}function _0x3fce(){const _0x290fa0=['HTTPService','YYYY/MM/DD\x20HH:mm','function','getMemberID','payload','parentId','reply','getComment','DependentOn','UniverThreadComment','users','_threadCommentDataSourceService','@univerjs/thread-comment','saveCommentToSnapshot','map','solved','6088NElocu','rangeType','replies','_httpService','syncUpdateMutationToColla','subscribe','_configService','getUnit','filter','UniverThreadCommentDataSourcePlugin','UniverProCollaborationClient','amd','IThreadCommentDataSourceService','post','threadId','UniverLicensePlugin','UniverCollaborationClientPlugin','Solved','UNRECOGNIZED','2447538SNzfUA','body','37702XaknuY','Solve','requireSession','format','merge','5YJOQEr','1110912hOivXn','UserManagerService','7wTdDDJ','Disposable','/universer-api/user/list','pipe','_threadCommentDataSource','replyId','_threadCommentModel','rangeId','dayjs','get','root','userId','personId','IConfigService','_initDataSource','exports','forEach','_injector','Reply','error','customRanges','/universer-api/comment/unit/','@univerjs/network','listComments','setConfig','code','find','/delete','user','toStringTag','values','addUser','getUser','userID','ThreadCommentModel','UniverThreadCommentUIPlugin','@univerjs-pro/license','@univerjs-pro/collaboration-client','/list','Injector','type','commentUpdate$','slice','ref','UNIVER_UNKNOWN','Edit','CommentService','UniverCore','/solved','object','1503720HzRxxW','dataSource','COMMENT','resolveComment','parse','onStarting','Inject','add','Plugin','_commentService','530253OfYLIE','@univerjs/core','bufferTime','unitId','rxjs','pluginName','Module','delete','getCurrentUser','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','size','/reply','deleteComment','defineProperty','disposeWithMe','UniverProThreadCommentDatasource','/add','_userService','Add','addComment','length','Delete','@univerjs/thread-comment-ui','276gEJwxe','getOwnPropertyDescriptor','UniverProLicense','createTimestamp','65278aReZsC','_init','120BlOGxe','_sessionService','_initUserSync','stringify'];_0x3fce=function(){return _0x290fa0;};return _0x3fce();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505091607",
3
+ "version": "0.7.0-nightly.202505101606",
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.7.0-nightly.202505091607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505091607",
50
- "@univerjs/core": "0.7.0-nightly.202505091607",
51
- "@univerjs/network": "0.7.0-nightly.202505091607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505101606",
49
+ "@univerjs/core": "0.7.0-nightly.202505101606",
50
+ "@univerjs/network": "0.7.0-nightly.202505101606",
52
51
  "@univerjs/protocol": "0.1.46-alpha.3",
53
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505091607",
54
- "@univerjs/thread-comment": "0.7.0-nightly.202505091607"
52
+ "@univerjs/thread-comment": "0.7.0-nightly.202505101606",
53
+ "@univerjs-pro/license": "0.7.0-nightly.202505101606",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505101606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",