@univerjs-pro/thread-comment-datasource 0.12.3-experimental.20251205-71d07c3 → 0.12.3-nightly.202512060617

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 _0x1b9c71=_0x751f;(function(_0x35fcf3,_0x4a6d5e){const _0xc09fbd=_0x751f,_0x549e9d=_0x35fcf3();while(!![]){try{const _0x31d1b8=parseInt(_0xc09fbd(0x20f))/0x1*(-parseInt(_0xc09fbd(0x1d6))/0x2)+parseInt(_0xc09fbd(0x236))/0x3*(-parseInt(_0xc09fbd(0x1f6))/0x4)+-parseInt(_0xc09fbd(0x21f))/0x5*(parseInt(_0xc09fbd(0x1ca))/0x6)+-parseInt(_0xc09fbd(0x1cb))/0x7*(parseInt(_0xc09fbd(0x1ea))/0x8)+parseInt(_0xc09fbd(0x211))/0x9*(-parseInt(_0xc09fbd(0x1f5))/0xa)+parseInt(_0xc09fbd(0x1c8))/0xb*(-parseInt(_0xc09fbd(0x231))/0xc)+parseInt(_0xc09fbd(0x1e1))/0xd;if(_0x31d1b8===_0x4a6d5e)break;else _0x549e9d['push'](_0x549e9d['shift']());}catch(_0xc47c7b){_0x549e9d['push'](_0x549e9d['shift']());}}}(_0x2636,0xf2645));Object[_0x1b9c71(0x239)](exports,Symbol['toStringTag'],{'value':_0x1b9c71(0x1f4)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1b9c71(0x1da);var I=(_0xcf9019=>(_0xcf9019[_0xcf9019[_0x1b9c71(0x1e5)]=0x0]=_0x1b9c71(0x1e5),_0xcf9019[_0xcf9019[_0x1b9c71(0x20c)]=0x1]='Solved',_0xcf9019[_0xcf9019[_0x1b9c71(0x1f7)]=-0x1]=_0x1b9c71(0x1f7),_0xcf9019))(I||{}),v=(_0x49fa09=>(_0x49fa09[_0x49fa09[_0x1b9c71(0x1de)]=0x0]=_0x1b9c71(0x1de),_0x49fa09[_0x49fa09[_0x1b9c71(0x216)]=0x1]=_0x1b9c71(0x216),_0x49fa09[_0x49fa09[_0x1b9c71(0x22f)]=0x2]='Reply',_0x49fa09[_0x49fa09[_0x1b9c71(0x1e0)]=0x3]='Edit',_0x49fa09[_0x49fa09[_0x1b9c71(0x224)]=0x4]=_0x1b9c71(0x224),_0x49fa09[_0x49fa09[_0x1b9c71(0x20a)]=0x5]='Solve',_0x49fa09[_0x49fa09[_0x1b9c71(0x1f7)]=-0x1]=_0x1b9c71(0x1f7),_0x49fa09))(v||{});const f=_0x5b0394=>c[_0x1b9c71(0x1cd)](new Date(+_0x5b0394))['format'](_0x1b9c71(0x23b)),R=async(_0x234427,_0x29c3da)=>{const _0x1ee15b=_0x1b9c71,_0x463756=_0x234427[_0x1ee15b(0x1e4)](c[_0x1ee15b(0x204)]),_0x42352b=_0x234427[_0x1ee15b(0x1e4)](P[_0x1ee15b(0x1f9)]);_0x29c3da[_0x1ee15b(0x1fa)](_0x5e27be=>{const _0x12b7bc=_0x1ee15b;_0x463756[_0x12b7bc(0x22a)](_0x5e27be)&&_0x29c3da[_0x12b7bc(0x1cc)](_0x5e27be);}),_0x29c3da['size']&&(await _0x42352b['get'](_0x1ee15b(0x1c5),{'params':{'userIDs':[..._0x29c3da]}}))[_0x1ee15b(0x228)][_0x1ee15b(0x1dc)][_0x1ee15b(0x1fa)](_0x2cafea=>{const _0x4922a2=_0x1ee15b;_0x2cafea&&_0x463756[_0x4922a2(0x1d7)](_0x2cafea);});};var $=Object[_0x1b9c71(0x23a)],E=(_0x1dfd2a,_0x1aff81,_0x3e1758,_0x40f068)=>{const _0x16adf7=_0x1b9c71;for(var _0x406463=_0x40f068>0x1?void 0x0:_0x40f068?$(_0x1aff81,_0x3e1758):_0x1aff81,_0x16e447=_0x1dfd2a[_0x16adf7(0x227)]-0x1,_0x130812;_0x16e447>=0x0;_0x16e447--)(_0x130812=_0x1dfd2a[_0x16e447])&&(_0x406463=_0x130812(_0x406463)||_0x406463);return _0x406463;},S=(_0x4ed628,_0x40fa69)=>(_0x333d0b,_0x512eb9)=>_0x40fa69(_0x333d0b,_0x512eb9,_0x4ed628);let _=class extends c[_0x1b9c71(0x222)]{constructor(_0x23d907,_0x4aec00,_0x3bd6bf,_0x579002){const _0x1af145=_0x1b9c71;super(),this[_0x1af145(0x207)]=_0x23d907,this[_0x1af145(0x21a)]=_0x4aec00,this['_userService']=_0x3bd6bf,this['_injector']=_0x579002,this[_0x1af145(0x213)](),this[_0x1af145(0x210)]();}[_0x1b9c71(0x210)](){const _0x492d0a=_0x1b9c71;this[_0x492d0a(0x1fe)](this[_0x492d0a(0x21a)][_0x492d0a(0x22e)][_0x492d0a(0x1ed)](j['bufferTime'](0x10))['subscribe'](_0x389b3c=>{const _0xe01526=_0x492d0a,_0x366742=new Set();_0x389b3c[_0xe01526(0x1fa)](_0x2dc20b=>{const _0x10cc9a=_0xe01526;switch(_0x2dc20b[_0x10cc9a(0x200)]){case _0x10cc9a(0x1d8):{const _0x1b02d0=_0x2dc20b[_0x10cc9a(0x225)]['personId'];_0x366742['add'](_0x1b02d0);break;}}}),R(this[_0xe01526(0x21c)],_0x366742);}));}[_0x1b9c71(0x213)](){const _0x4325d0=_0x1b9c71;this[_0x4325d0(0x1fe)](this['_commentService'][_0x4325d0(0x22e)][_0x4325d0(0x22d)](async _0x5e14f5=>{const _0x5e6ed8=_0x4325d0;var _0x5850b9,_0x399cb1,_0xe1b247,_0xee52ac;const _0x289d12=(_0x5850b9=this['_threadCommentModel'][_0x5e6ed8(0x1fd)](_0x5e14f5['unitId'])['find'](_0x225194=>_0x225194['threadId']===_0x5e14f5[_0x5e6ed8(0x1d2)]))==null?void 0x0:_0x5850b9[_0x5e6ed8(0x220)];if(!_0x289d12)return;const {unitId:_0x124c26,subUnitId:_0x4ed85f}=_0x289d12;switch(_0x5e14f5[_0x5e6ed8(0x1c4)]&&this[_0x5e6ed8(0x226)]['addUser'](_0x5e14f5[_0x5e6ed8(0x1c4)]),_0x5e14f5[_0x5e6ed8(0x200)]){case v[_0x5e6ed8(0x216)]:break;case v[_0x5e6ed8(0x22f)]:{this[_0x5e6ed8(0x21a)][_0x5e6ed8(0x1ff)](_0x124c26,_0x4ed85f,{'unitId':_0x124c26,'subUnitId':_0x4ed85f,'ref':'','id':_0x5e14f5[_0x5e6ed8(0x1e7)],'dT':f(+_0x5e14f5['createTimestamp']),'threadId':_0x5e14f5['threadId'],'personId':(_0xe1b247=(_0x399cb1=_0x5e14f5[_0x5e6ed8(0x1c4)])==null?void 0x0:_0x399cb1[_0x5e6ed8(0x219)])!=null?_0xe1b247:_0x5e14f5[_0x5e6ed8(0x209)],'text':JSON[_0x5e6ed8(0x1c2)](_0x5e14f5[_0x5e6ed8(0x203)]),'parentId':_0x289d12['id']});break;}case v[_0x5e6ed8(0x224)]:{const _0x1768a9=this[_0x5e6ed8(0x21a)]['getComment'](_0x124c26,_0x4ed85f,_0x5e14f5[_0x5e6ed8(0x1e7)]);_0x1768a9&&_0x1768a9['parentId']&&this[_0x5e6ed8(0x21a)][_0x5e6ed8(0x1c9)](_0x124c26,_0x4ed85f,_0x5e14f5[_0x5e6ed8(0x1e7)]);break;}case v[_0x5e6ed8(0x1e0)]:{this[_0x5e6ed8(0x21a)][_0x5e6ed8(0x21e)](_0x124c26,_0x4ed85f,{'commentId':_0x5e14f5[_0x5e6ed8(0x1e7)],'text':JSON[_0x5e6ed8(0x1c2)](_0x5e14f5[_0x5e6ed8(0x203)])});break;}case v[_0x5e6ed8(0x20a)]:{const _0x240656=(_0xee52ac=this[_0x5e6ed8(0x21a)][_0x5e6ed8(0x1fd)](_0x5e14f5[_0x5e6ed8(0x1df)])[_0x5e6ed8(0x1e9)](_0x5659b8=>_0x5659b8[_0x5e6ed8(0x1d2)]===_0x5e14f5[_0x5e6ed8(0x1d2)]))==null?void 0x0:_0xee52ac[_0x5e6ed8(0x220)];_0x240656&&this['_threadCommentModel']['resolveComment'](_0x124c26,_0x4ed85f,_0x240656['id'],_0x5e14f5['solved']===I[_0x5e6ed8(0x20c)]);break;}}}));}};_=E([S(0x0,c[_0x1b9c71(0x1ec)](b['CommentService'])),S(0x1,c[_0x1b9c71(0x1ec)](M['ThreadCommentModel'])),S(0x2,c[_0x1b9c71(0x1ec)](c[_0x1b9c71(0x204)])),S(0x3,c[_0x1b9c71(0x1ec)](c[_0x1b9c71(0x230)]))],_);const q=_0x1b9c71(0x238),D={};var A=Object[_0x1b9c71(0x23a)],x=(_0x2a3134,_0x25d1d4,_0x519214,_0x58db82)=>{const _0x451efb=_0x1b9c71;for(var _0x356703=_0x58db82>0x1?void 0x0:_0x58db82?A(_0x25d1d4,_0x519214):_0x25d1d4,_0x3bf0ae=_0x2a3134[_0x451efb(0x227)]-0x1,_0x28b0b7;_0x3bf0ae>=0x0;_0x3bf0ae--)(_0x28b0b7=_0x2a3134[_0x3bf0ae])&&(_0x356703=_0x28b0b7(_0x356703)||_0x356703);return _0x356703;},C=(_0x66a4b2,_0x1162d0)=>(_0x175310,_0x293c87)=>_0x1162d0(_0x175310,_0x293c87,_0x66a4b2);function Y(_0x43318f,_0x15f85e){const _0x306579=_0x1b9c71,_0x3bf3bc=_0x43318f['replies'][0x0];return{..._0x15f85e,'id':_0x3bf3bc[_0x306579(0x1e7)],'resolved':_0x43318f[_0x306579(0x237)]===0x1,'dT':f(_0x3bf3bc[_0x306579(0x1cf)]),'personId':_0x3bf3bc[_0x306579(0x209)],'threadId':_0x3bf3bc['threadId']};}function G(_0x5f1356,_0xe4b9e3,_0x1827f3){const _0x26647f=_0x1b9c71;var _0x4c017b,_0x313912;if(((_0x313912=(_0x4c017b=_0x5f1356==null?void 0x0:_0x5f1356[_0x26647f(0x229)])==null?void 0x0:_0x4c017b[_0x26647f(0x227)])!=null?_0x313912:0x0)>0x0){const _0x5747b8=(_0x35c4ba,_0x17aabe)=>({'id':_0x35c4ba['replyId'],'threadId':_0x35c4ba['threadId'],'dT':f(_0x35c4ba[_0x26647f(0x1cf)]),'personId':_0x35c4ba[_0x26647f(0x209)],'resolved':_0x5f1356[_0x26647f(0x237)]===I[_0x26647f(0x20c)],'unitId':_0xe4b9e3,'subUnitId':_0x1827f3,'text':JSON[_0x26647f(0x1c2)](_0x35c4ba[_0x26647f(0x203)]),'parentId':_0x17aabe}),_0x47892b=_0x5747b8(_0x5f1356[_0x26647f(0x229)][0x0]);return{..._0x47892b,'children':_0x5f1356['replies'][_0x26647f(0x215)](0x1)[_0x26647f(0x1e8)](_0x591d29=>_0x5747b8(_0x591d29,_0x47892b['id']))};}return null;}function _0x751f(_0x54dbf0,_0x2fa032){_0x54dbf0=_0x54dbf0-0x1c2;const _0x263632=_0x2636();let _0x751f98=_0x263632[_0x54dbf0];return _0x751f98;}let p=class{constructor(_0x42e56a,_0x445788,_0x370fec){const _0x5e1113=_0x1b9c71;this[_0x5e1113(0x1ee)]=_0x42e56a,this[_0x5e1113(0x226)]=_0x445788,this[_0x5e1113(0x1f3)]=_0x370fec;}async[_0x1b9c71(0x1ff)](_0x5b1ced){const _0x3e1bf4=_0x1b9c71;var _0x3f6501,_0xf3b253;const {parentId:_0x22ef04,unitId:_0x5b47cf,text:_0x1c9d21,threadId:_0x45f5dc}=_0x5b1ced,_0x40f61a=(_0xf3b253=(_0x3f6501=_0x1c9d21['customRanges'])==null?void 0x0:_0x3f6501[_0x3e1bf4(0x1f1)](_0x25c602=>_0x25c602['rangeType']===c[_0x3e1bf4(0x1ce)]['COMMENT'])[_0x3e1bf4(0x1e8)](_0x5016d5=>_0x5016d5['rangeId']))!=null?_0xf3b253:[],_0x32250=JSON['stringify'](_0x1c9d21),_0x177dee=(await this['_sessionService'][_0x3e1bf4(0x202)](_0x5b47cf))[_0x3e1bf4(0x1d0)]();if(_0x22ef04){const _0x3f31a9={'memberId':_0x177dee,'unitId':_0x5b47cf,'content':_0x32250,'mention':_0x40f61a,'threadId':_0x45f5dc},_0x6e0bb9=(await this[_0x3e1bf4(0x1ee)][_0x3e1bf4(0x1e3)](_0x3e1bf4(0x1eb)+_0x5b47cf+_0x3e1bf4(0x1f8),{'body':_0x3f31a9}))[_0x3e1bf4(0x228)][_0x3e1bf4(0x1d1)];return{..._0x5b1ced,'id':_0x6e0bb9[_0x3e1bf4(0x1e7)],'dT':c[_0x3e1bf4(0x1cd)](+_0x6e0bb9[_0x3e1bf4(0x1cf)])['format'](_0x3e1bf4(0x23b)),'personId':_0x6e0bb9[_0x3e1bf4(0x209)]};}else{const _0x5e1f03={'memberId':_0x177dee,'unitId':_0x5b47cf,'content':_0x32250,'mention':_0x40f61a},_0x3a4ed0=await this[_0x3e1bf4(0x1ee)]['post'](_0x3e1bf4(0x1eb)+_0x5b47cf+_0x3e1bf4(0x221),{'body':_0x5e1f03});return Y(_0x3a4ed0['body'][_0x3e1bf4(0x205)],_0x5b1ced);}}async[_0x1b9c71(0x21e)](_0x55e808){const _0x37c4f4=_0x1b9c71;var _0x284465,_0x2d7c5e;const {text:_0xeea08f,unitId:_0x519032}=_0x55e808,_0x2fcffe=(_0x2d7c5e=(_0x284465=_0xeea08f['customRanges'])==null?void 0x0:_0x284465[_0x37c4f4(0x1f1)](_0x175bd1=>_0x175bd1[_0x37c4f4(0x1d3)]===c['CustomRangeType'][_0x37c4f4(0x1c7)])[_0x37c4f4(0x1e8)](_0xb1685=>_0xb1685['rangeId']))!=null?_0x2d7c5e:[],_0x5df68f=JSON[_0x37c4f4(0x1f2)](_0xeea08f),_0xb8b6fa=_0x55e808[_0x37c4f4(0x1d2)],_0x2c7c15=_0x55e808['id'],_0x4a8e3d={'memberId':(await this[_0x37c4f4(0x1f3)]['requireSession'](_0x519032))['getMemberID'](),'unitId':_0x519032,'threadId':_0xb8b6fa,'mention':_0x2fcffe,'content':_0x5df68f,'replyId':_0x2c7c15},_0x386142=await this[_0x37c4f4(0x1ee)]['post']('/universer-api/comment/unit/'+_0x519032+_0x37c4f4(0x1dd),{'body':_0x4a8e3d});return!_0x386142[_0x37c4f4(0x228)][_0x37c4f4(0x1f0)]||_0x386142[_0x37c4f4(0x228)][_0x37c4f4(0x1f0)][_0x37c4f4(0x218)]===0x1;}async[_0x1b9c71(0x233)](_0x5699da){const _0x545cb7=_0x1b9c71,{unitId:_0xb4ad51}=_0x5699da,_0x1a3e69=_0x5699da[_0x545cb7(0x1d2)],_0x563578={'memberId':this[_0x545cb7(0x226)][_0x545cb7(0x22c)]()[_0x545cb7(0x219)],'unitId':_0xb4ad51,'threadId':_0x1a3e69,'solved':_0x5699da[_0x545cb7(0x1fb)]?I[_0x545cb7(0x20c)]:I['OpenOrReOpen']},_0x4e58f3=await this[_0x545cb7(0x1ee)]['post'](_0x545cb7(0x1eb)+_0xb4ad51+_0x545cb7(0x232),{'body':_0x563578});return!_0x4e58f3[_0x545cb7(0x228)][_0x545cb7(0x1f0)]||_0x4e58f3[_0x545cb7(0x228)][_0x545cb7(0x1f0)][_0x545cb7(0x218)]===0x1;}async[_0x1b9c71(0x1c9)](_0x4c2f9a,_0xcfd99e,_0x32d06d,_0x6a7df2){const _0x4f89c3=_0x1b9c71,_0xe99feb={'memberId':(await this[_0x4f89c3(0x1f3)][_0x4f89c3(0x202)](_0x4c2f9a))[_0x4f89c3(0x1d0)](),'threadId':_0x32d06d,'replyId':_0x6a7df2,'unitId':_0x4c2f9a},_0x28dcb0=await this[_0x4f89c3(0x1ee)][_0x4f89c3(0x1e3)](_0x4f89c3(0x1eb)+_0x4c2f9a+_0x4f89c3(0x217),{'body':_0xe99feb});return!_0x28dcb0[_0x4f89c3(0x228)][_0x4f89c3(0x1f0)]||_0x28dcb0[_0x4f89c3(0x228)]['error']['code']===0x1;}async['listComments'](_0x40dc8b,_0x16461d,_0x561938){const _0x160c5f=_0x1b9c71,_0xf81d89={'unitId':_0x40dc8b,'threadId':_0x561938},_0x1f66b6=await this[_0x160c5f(0x1ee)]['post']('/universer-api/comment/unit/'+_0x40dc8b+_0x160c5f(0x1db),{'body':_0xf81d89}),_0x31961b=_0x561938[_0x160c5f(0x1e8)](_0x5319dd=>G(_0x1f66b6[_0x160c5f(0x228)][_0x160c5f(0x1d4)][_0x5319dd],_0x40dc8b,_0x16461d))[_0x160c5f(0x1f1)](Boolean);return Object[_0x160c5f(0x234)](_0x1f66b6[_0x160c5f(0x228)][_0x160c5f(0x1dc)])[_0x160c5f(0x1fa)](_0x3feffe=>{const _0x38bbb8=_0x160c5f;this['_userService'][_0x38bbb8(0x1d7)](_0x3feffe);}),_0x31961b;}[_0x1b9c71(0x1ef)](_0x4dff92){const _0x461ac1=_0x1b9c71;return{'id':_0x4dff92['id'],'threadId':_0x4dff92[_0x461ac1(0x1d2)],'ref':_0x4dff92[_0x461ac1(0x21d)]};}};p=x([C(0x0,c['Inject'](P[_0x1b9c71(0x1f9)])),C(0x1,c[_0x1b9c71(0x1ec)](c[_0x1b9c71(0x204)])),C(0x2,c[_0x1b9c71(0x1ec)](b['CollaborationSessionService']))],p);var H=Object[_0x1b9c71(0x23a)],J=(_0xebad96,_0x1db593,_0x14b895,_0x288700)=>{const _0x1e1e3a=_0x1b9c71;for(var _0x5cd61d=_0x288700>0x1?void 0x0:_0x288700?H(_0x1db593,_0x14b895):_0x1db593,_0x514ef6=_0xebad96[_0x1e1e3a(0x227)]-0x1,_0x1fc96e;_0x514ef6>=0x0;_0x514ef6--)(_0x1fc96e=_0xebad96[_0x514ef6])&&(_0x5cd61d=_0x1fc96e(_0x5cd61d)||_0x5cd61d);return _0x5cd61d;},y=(_0x1f13b0,_0x447bb4)=>(_0x209ca2,_0x1e8c69)=>_0x447bb4(_0x209ca2,_0x1e8c69,_0x1f13b0);let g=class extends c[_0x1b9c71(0x222)]{constructor(_0x3bf7d0,_0x2eee62){const _0x243962=_0x1b9c71;super(),this[_0x243962(0x1e6)]=_0x3bf7d0,this['_threadCommentDataSource']=_0x2eee62,this[_0x243962(0x20b)]();}[_0x1b9c71(0x20b)](){const _0x5e5c44=_0x1b9c71;this['_threadCommentDataSourceService'][_0x5e5c44(0x1d5)]=this[_0x5e5c44(0x22b)],this[_0x5e5c44(0x1e6)][_0x5e5c44(0x1c3)]=!0x1;}};function _0x2636(){const _0x16e0d9=['IThreadCommentDataSourceService','DependentOn','700376tOWYMJ','_initUserSync','36dDRMeS','UniverLicensePlugin','_init','_configService','slice','Add','/delete','code','userID','_threadCommentModel','UNIVER_UNKNOWN','_injector','ref','updateComment','1285DaDZxf','root','/add','Disposable','UniverCollaborationClientPlugin','Delete','payload','_userService','length','body','replies','getUser','_threadCommentDataSource','getCurrentUser','subscribe','commentUpdate$','Reply','Injector','12zgCDRL','/solved','resolveComment','values','merge','201219ErGWTv','solved','thread-comment-data-source.config','defineProperty','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','parse','syncUpdateMutationToColla','user','/universer-api/user/list','IConfigService','COMMENT','15285644UjtpQW','deleteComment','12312WCXuYO','664531lnnFcB','delete','dayjs','CustomRangeType','createTimestamp','getMemberID','reply','threadId','rangeType','comments','dataSource','2DbDKII','addUser','add','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','users','/edit','Unknown','unitId','Edit','67703766knaQzU','onReady','post','get','OpenOrReOpen','_threadCommentDataSourceService','replyId','map','find','16dNlCvK','/universer-api/comment/unit/','Inject','pipe','_httpService','saveCommentToSnapshot','error','filter','stringify','_sessionService','Module','333870nzfWbA','76DpSzhD','UNRECOGNIZED','/reply','HTTPService','forEach','resolved','onStarting','getUnit','disposeWithMe','addComment','type','UniverThreadCommentUIPlugin','requireSession','content','UserManagerService','comment','symbol','_commentService','UniverThreadCommentDataSourcePlugin','userId','Solve','_initDataSource','Solved'];_0x2636=function(){return _0x16e0d9;};return _0x2636();}g=J([y(0x0,M[_0x1b9c71(0x20d)]),y(0x1,c[_0x1b9c71(0x1ec)](p))],g);var F=Object['defineProperty'],L=Object[_0x1b9c71(0x23a)],Z=(_0x169963,_0xee7352,_0x598ffe)=>_0xee7352 in _0x169963?F(_0x169963,_0xee7352,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x598ffe}):_0x169963[_0xee7352]=_0x598ffe,W=(_0x3060fa,_0x484d0d,_0x373d72,_0xdaad08)=>{const _0x2db80c=_0x1b9c71;for(var _0x85b159=_0xdaad08>0x1?void 0x0:_0xdaad08?L(_0x484d0d,_0x373d72):_0x484d0d,_0x394ff2=_0x3060fa[_0x2db80c(0x227)]-0x1,_0x532feb;_0x394ff2>=0x0;_0x394ff2--)(_0x532feb=_0x3060fa[_0x394ff2])&&(_0x85b159=_0x532feb(_0x85b159)||_0x85b159);return _0x85b159;},O=(_0x3568b7,_0x162243)=>(_0x1d4c50,_0x58bd2a)=>_0x162243(_0x1d4c50,_0x58bd2a,_0x3568b7),N=(_0x2baa0b,_0x9f2748,_0x1171b4)=>Z(_0x2baa0b,typeof _0x9f2748!=_0x1b9c71(0x206)?_0x9f2748+'':_0x9f2748,_0x1171b4);exports[_0x1b9c71(0x208)]=class extends c['Plugin']{constructor(_0x339681=D,_0x10403b,_0x7646d9){const _0x25eac4=_0x1b9c71;super(),this[_0x25eac4(0x1d9)]=_0x339681,this[_0x25eac4(0x21c)]=_0x10403b,this[_0x25eac4(0x214)]=_0x7646d9;const {..._0x2ef188}=c[_0x25eac4(0x235)]({},D,this[_0x25eac4(0x1d9)]);this[_0x25eac4(0x214)]['setConfig'](q,_0x2ef188);}[_0x1b9c71(0x1fc)](){const _0x3cb89b=_0x1b9c71;[[p],[g],[_]][_0x3cb89b(0x1fa)](_0x163394=>{const _0x200411=_0x3cb89b;this[_0x200411(0x21c)][_0x200411(0x1d8)](_0x163394);});}[_0x1b9c71(0x1e2)](){const _0x3240bb=_0x1b9c71;this[_0x3240bb(0x21c)][_0x3240bb(0x1e4)](g),this['_injector']['get'](_);}},N(exports[_0x1b9c71(0x208)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c['UniverInstanceType'][_0x1b9c71(0x21b)]),exports[_0x1b9c71(0x208)]=W([c[_0x1b9c71(0x20e)](w[_0x1b9c71(0x201)],b[_0x1b9c71(0x223)],T[_0x1b9c71(0x212)]),O(0x1,c[_0x1b9c71(0x1ec)](c[_0x1b9c71(0x230)])),O(0x2,c[_0x1b9c71(0x1c6)])],exports[_0x1b9c71(0x208)]);
1
+ 'use strict';const _0x87ed89=_0x12e0;(function(_0x5146ad,_0x485bf2){const _0x8afe4f=_0x12e0,_0x369242=_0x5146ad();while(!![]){try{const _0x5d369a=-parseInt(_0x8afe4f(0x160))/0x1+-parseInt(_0x8afe4f(0x1a5))/0x2+-parseInt(_0x8afe4f(0x14c))/0x3+parseInt(_0x8afe4f(0x148))/0x4+parseInt(_0x8afe4f(0x1a2))/0x5+parseInt(_0x8afe4f(0x1a4))/0x6+-parseInt(_0x8afe4f(0x158))/0x7*(-parseInt(_0x8afe4f(0x190))/0x8);if(_0x5d369a===_0x485bf2)break;else _0x369242['push'](_0x369242['shift']());}catch(_0x33f9a9){_0x369242['push'](_0x369242['shift']());}}}(_0x5e3c,0xaf28f));Object['defineProperty'](exports,Symbol[_0x87ed89(0x17b)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5462e6=>(_0x5462e6[_0x5462e6[_0x87ed89(0x179)]=0x0]=_0x87ed89(0x179),_0x5462e6[_0x5462e6['Solved']=0x1]=_0x87ed89(0x16a),_0x5462e6[_0x5462e6[_0x87ed89(0x196)]=-0x1]='UNRECOGNIZED',_0x5462e6))(I||{}),v=(_0x19cf12=>(_0x19cf12[_0x19cf12['Unknown']=0x0]=_0x87ed89(0x16c),_0x19cf12[_0x19cf12['Add']=0x1]=_0x87ed89(0x140),_0x19cf12[_0x19cf12[_0x87ed89(0x180)]=0x2]=_0x87ed89(0x180),_0x19cf12[_0x19cf12[_0x87ed89(0x14d)]=0x3]=_0x87ed89(0x14d),_0x19cf12[_0x19cf12['Delete']=0x4]='Delete',_0x19cf12[_0x19cf12['Solve']=0x5]=_0x87ed89(0x174),_0x19cf12[_0x19cf12[_0x87ed89(0x196)]=-0x1]=_0x87ed89(0x196),_0x19cf12))(v||{});function _0x5e3c(){const _0x22cd9b=['forEach','4490105HxTDwJ','_injector','1021050ERHYAT','1948834ObyiIA','/reply','getMemberID','subscribe','filter','length','replyId','CustomRangeType','UserManagerService','/delete','getOwnPropertyDescriptor','addComment','UniverCollaborationClientPlugin','setConfig','UniverLicensePlugin','code','Add','listComments','getComment','merge','size','syncUpdateMutationToColla','pluginName','COMMENT','1220216BfITCo','body','/universer-api/comment/unit/','symbol','1777344bKgnZJ','Edit','CollaborationSessionService','/universer-api/user/list','threadId','rangeId','resolveComment','_sessionService','find','DependentOn','get','_config','7WrEuBV','format','defineProperty','comments','type','content','reply','root','464041BNaQnK','user','CommentService','Delete','onStarting','saveCommentToSnapshot','userID','createTimestamp','requireSession','Injector','Solved','error','Unknown','_userService','replies','add','customRanges','_threadCommentDataSource','userId','onReady','Solve','YYYY/MM/DD\x20HH:mm','solved','getCurrentUser','parentId','OpenOrReOpen','comment','toStringTag','parse','_threadCommentModel','unitId','commentUpdate$','Reply','UNIVER_UNKNOWN','_httpService','values','personId','thread-comment-data-source.config','disposeWithMe','UniverThreadCommentDataSourcePlugin','UniverInstanceType','Inject','bufferTime','addUser','_initUserSync','_threadCommentDataSourceService','users','deleteComment','11000888gbTVMc','updateComment','/edit','map','Plugin','_commentService','UNRECOGNIZED','Disposable','payload','post','resolved','HTTPService','_initDataSource','/list','getUnit','IConfigService','dataSource'];_0x5e3c=function(){return _0x22cd9b;};return _0x5e3c();}const f=_0xc494ea=>c['dayjs'](new Date(+_0xc494ea))[_0x87ed89(0x159)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x1ccc74,_0x1785e6)=>{const _0x3c595f=_0x87ed89,_0x576fce=_0x1ccc74['get'](c[_0x3c595f(0x1ad)]),_0x521937=_0x1ccc74['get'](P[_0x3c595f(0x19b)]);_0x1785e6['forEach'](_0x388851=>{_0x576fce['getUser'](_0x388851)&&_0x1785e6['delete'](_0x388851);}),_0x1785e6[_0x3c595f(0x144)]&&(await _0x521937[_0x3c595f(0x156)](_0x3c595f(0x14f),{'params':{'userIDs':[..._0x1785e6]}}))['body'][_0x3c595f(0x18e)][_0x3c595f(0x1a1)](_0x1dbfd6=>{_0x1dbfd6&&_0x576fce['addUser'](_0x1dbfd6);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x508c17,_0x36f688,_0x32c81e,_0x33b183)=>{const _0xb99944=_0x87ed89;for(var _0x21a3c5=_0x33b183>0x1?void 0x0:_0x33b183?$(_0x36f688,_0x32c81e):_0x36f688,_0x6672cc=_0x508c17[_0xb99944(0x1aa)]-0x1,_0x53f99b;_0x6672cc>=0x0;_0x6672cc--)(_0x53f99b=_0x508c17[_0x6672cc])&&(_0x21a3c5=_0x53f99b(_0x21a3c5)||_0x21a3c5);return _0x21a3c5;},S=(_0x57a339,_0x5e46e3)=>(_0x2941d1,_0x11d203)=>_0x5e46e3(_0x2941d1,_0x11d203,_0x57a339);let _=class extends c[_0x87ed89(0x197)]{constructor(_0x5b56ce,_0x2011a5,_0x22d58c,_0x351bb8){const _0x528edf=_0x87ed89;super(),this[_0x528edf(0x195)]=_0x5b56ce,this[_0x528edf(0x17d)]=_0x2011a5,this[_0x528edf(0x16d)]=_0x22d58c,this[_0x528edf(0x1a3)]=_0x351bb8,this['_init'](),this[_0x528edf(0x18c)]();}[_0x87ed89(0x18c)](){const _0x55a4a6=_0x87ed89;this[_0x55a4a6(0x186)](this['_threadCommentModel'][_0x55a4a6(0x17f)]['pipe'](j[_0x55a4a6(0x18a)](0x10))[_0x55a4a6(0x1a8)](_0x4a07e1=>{const _0x43e7eb=_0x55a4a6,_0x2e7f43=new Set();_0x4a07e1[_0x43e7eb(0x1a1)](_0xdddab1=>{const _0x437545=_0x43e7eb;switch(_0xdddab1[_0x437545(0x15c)]){case _0x437545(0x16f):{const _0x29bf26=_0xdddab1[_0x437545(0x198)][_0x437545(0x184)];_0x2e7f43[_0x437545(0x16f)](_0x29bf26);break;}}}),R(this[_0x43e7eb(0x1a3)],_0x2e7f43);}));}['_init'](){const _0x195f58=_0x87ed89;this['disposeWithMe'](this[_0x195f58(0x195)]['commentUpdate$'][_0x195f58(0x1a8)](async _0x3bf2d9=>{const _0x9a4500=_0x195f58;var _0x2ae1c0,_0x7d23e2,_0x319643,_0x1abf7f;const _0x5c87d4=(_0x2ae1c0=this['_threadCommentModel'][_0x9a4500(0x19e)](_0x3bf2d9[_0x9a4500(0x17e)])['find'](_0x146b16=>_0x146b16[_0x9a4500(0x150)]===_0x3bf2d9[_0x9a4500(0x150)]))==null?void 0x0:_0x2ae1c0[_0x9a4500(0x15f)];if(!_0x5c87d4)return;const {unitId:_0x54891d,subUnitId:_0x50124c}=_0x5c87d4;switch(_0x3bf2d9[_0x9a4500(0x161)]&&this['_userService'][_0x9a4500(0x18b)](_0x3bf2d9[_0x9a4500(0x161)]),_0x3bf2d9[_0x9a4500(0x15c)]){case v[_0x9a4500(0x140)]:break;case v[_0x9a4500(0x180)]:{this['_threadCommentModel'][_0x9a4500(0x1b0)](_0x54891d,_0x50124c,{'unitId':_0x54891d,'subUnitId':_0x50124c,'ref':'','id':_0x3bf2d9[_0x9a4500(0x1ab)],'dT':f(+_0x3bf2d9[_0x9a4500(0x167)]),'threadId':_0x3bf2d9[_0x9a4500(0x150)],'personId':(_0x319643=(_0x7d23e2=_0x3bf2d9[_0x9a4500(0x161)])==null?void 0x0:_0x7d23e2['userID'])!=null?_0x319643:_0x3bf2d9[_0x9a4500(0x172)],'text':JSON[_0x9a4500(0x17c)](_0x3bf2d9['content']),'parentId':_0x5c87d4['id']});break;}case v[_0x9a4500(0x163)]:{const _0xe65053=this[_0x9a4500(0x17d)][_0x9a4500(0x142)](_0x54891d,_0x50124c,_0x3bf2d9[_0x9a4500(0x1ab)]);_0xe65053&&_0xe65053[_0x9a4500(0x178)]&&this['_threadCommentModel'][_0x9a4500(0x18f)](_0x54891d,_0x50124c,_0x3bf2d9[_0x9a4500(0x1ab)]);break;}case v[_0x9a4500(0x14d)]:{this[_0x9a4500(0x17d)]['updateComment'](_0x54891d,_0x50124c,{'commentId':_0x3bf2d9[_0x9a4500(0x1ab)],'text':JSON['parse'](_0x3bf2d9['content'])});break;}case v['Solve']:{const _0xdbe0d2=(_0x1abf7f=this[_0x9a4500(0x17d)][_0x9a4500(0x19e)](_0x3bf2d9['unitId'])[_0x9a4500(0x154)](_0x22d3ef=>_0x22d3ef[_0x9a4500(0x150)]===_0x3bf2d9[_0x9a4500(0x150)]))==null?void 0x0:_0x1abf7f['root'];_0xdbe0d2&&this[_0x9a4500(0x17d)][_0x9a4500(0x152)](_0x54891d,_0x50124c,_0xdbe0d2['id'],_0x3bf2d9[_0x9a4500(0x176)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x87ed89(0x189)](b[_0x87ed89(0x162)])),S(0x1,c[_0x87ed89(0x189)](M['ThreadCommentModel'])),S(0x2,c[_0x87ed89(0x189)](c[_0x87ed89(0x1ad)])),S(0x3,c[_0x87ed89(0x189)](c['Injector']))],_);const q=_0x87ed89(0x185),D={};var A=Object[_0x87ed89(0x1af)],x=(_0x13e485,_0xacd447,_0x385d36,_0x38666e)=>{const _0x1111af=_0x87ed89;for(var _0x4fa04e=_0x38666e>0x1?void 0x0:_0x38666e?A(_0xacd447,_0x385d36):_0xacd447,_0xe55656=_0x13e485[_0x1111af(0x1aa)]-0x1,_0x464188;_0xe55656>=0x0;_0xe55656--)(_0x464188=_0x13e485[_0xe55656])&&(_0x4fa04e=_0x464188(_0x4fa04e)||_0x4fa04e);return _0x4fa04e;},C=(_0x1535a9,_0x4f10f6)=>(_0x5e735e,_0x5dc315)=>_0x4f10f6(_0x5e735e,_0x5dc315,_0x1535a9);function Y(_0x4d266a,_0x1ad374){const _0x316edc=_0x87ed89,_0x495e4d=_0x4d266a[_0x316edc(0x16e)][0x0];return{..._0x1ad374,'id':_0x495e4d[_0x316edc(0x1ab)],'resolved':_0x4d266a[_0x316edc(0x176)]===0x1,'dT':f(_0x495e4d[_0x316edc(0x167)]),'personId':_0x495e4d['userId'],'threadId':_0x495e4d[_0x316edc(0x150)]};}function G(_0x2f1ba4,_0x22bb46,_0x52e858){const _0x5a2352=_0x87ed89;var _0x3ad5f3,_0x3a89bf;if(((_0x3a89bf=(_0x3ad5f3=_0x2f1ba4==null?void 0x0:_0x2f1ba4[_0x5a2352(0x16e)])==null?void 0x0:_0x3ad5f3[_0x5a2352(0x1aa)])!=null?_0x3a89bf:0x0)>0x0){const _0x582295=(_0x24bcd2,_0x1e107c)=>({'id':_0x24bcd2[_0x5a2352(0x1ab)],'threadId':_0x24bcd2[_0x5a2352(0x150)],'dT':f(_0x24bcd2[_0x5a2352(0x167)]),'personId':_0x24bcd2[_0x5a2352(0x172)],'resolved':_0x2f1ba4[_0x5a2352(0x176)]===I[_0x5a2352(0x16a)],'unitId':_0x22bb46,'subUnitId':_0x52e858,'text':JSON[_0x5a2352(0x17c)](_0x24bcd2[_0x5a2352(0x15d)]),'parentId':_0x1e107c}),_0x4aafe4=_0x582295(_0x2f1ba4[_0x5a2352(0x16e)][0x0]);return{..._0x4aafe4,'children':_0x2f1ba4[_0x5a2352(0x16e)]['slice'](0x1)['map'](_0x31eacf=>_0x582295(_0x31eacf,_0x4aafe4['id']))};}return null;}let p=class{constructor(_0x28d26c,_0x30365f,_0x203e53){const _0xb574ed=_0x87ed89;this[_0xb574ed(0x182)]=_0x28d26c,this[_0xb574ed(0x16d)]=_0x30365f,this[_0xb574ed(0x153)]=_0x203e53;}async['addComment'](_0x4f6ed7){const _0x135f6e=_0x87ed89;var _0x2bb1c8,_0x32d5b4;const {parentId:_0x461887,unitId:_0x2dfc2f,text:_0x52f71d,threadId:_0x21137b}=_0x4f6ed7,_0x1a2be3=(_0x32d5b4=(_0x2bb1c8=_0x52f71d[_0x135f6e(0x170)])==null?void 0x0:_0x2bb1c8[_0x135f6e(0x1a9)](_0x20b8ca=>_0x20b8ca['rangeType']===c[_0x135f6e(0x1ac)][_0x135f6e(0x147)])[_0x135f6e(0x193)](_0x3e9f63=>_0x3e9f63[_0x135f6e(0x151)]))!=null?_0x32d5b4:[],_0x354750=JSON['stringify'](_0x52f71d),_0x521f4c=(await this[_0x135f6e(0x153)][_0x135f6e(0x168)](_0x2dfc2f))['getMemberID']();if(_0x461887){const _0x3f0790={'memberId':_0x521f4c,'unitId':_0x2dfc2f,'content':_0x354750,'mention':_0x1a2be3,'threadId':_0x21137b},_0x4a8b49=(await this[_0x135f6e(0x182)][_0x135f6e(0x199)]('/universer-api/comment/unit/'+_0x2dfc2f+_0x135f6e(0x1a6),{'body':_0x3f0790}))['body'][_0x135f6e(0x15e)];return{..._0x4f6ed7,'id':_0x4a8b49[_0x135f6e(0x1ab)],'dT':c['dayjs'](+_0x4a8b49['createTimestamp'])[_0x135f6e(0x159)](_0x135f6e(0x175)),'personId':_0x4a8b49[_0x135f6e(0x172)]};}else{const _0x4c0ce3={'memberId':_0x521f4c,'unitId':_0x2dfc2f,'content':_0x354750,'mention':_0x1a2be3},_0x512bb8=await this[_0x135f6e(0x182)][_0x135f6e(0x199)]('/universer-api/comment/unit/'+_0x2dfc2f+'/add',{'body':_0x4c0ce3});return Y(_0x512bb8[_0x135f6e(0x149)][_0x135f6e(0x17a)],_0x4f6ed7);}}async[_0x87ed89(0x191)](_0x1468b6){const _0x3e7f7c=_0x87ed89;var _0x64377e,_0x29b5a7;const {text:_0x58d66a,unitId:_0x17be4f}=_0x1468b6,_0x475a84=(_0x29b5a7=(_0x64377e=_0x58d66a[_0x3e7f7c(0x170)])==null?void 0x0:_0x64377e[_0x3e7f7c(0x1a9)](_0x312509=>_0x312509['rangeType']===c[_0x3e7f7c(0x1ac)][_0x3e7f7c(0x147)])[_0x3e7f7c(0x193)](_0x162aa7=>_0x162aa7['rangeId']))!=null?_0x29b5a7:[],_0x272ee3=JSON['stringify'](_0x58d66a),_0x43edf3=_0x1468b6[_0x3e7f7c(0x150)],_0x1e6e8f=_0x1468b6['id'],_0x3dec68={'memberId':(await this[_0x3e7f7c(0x153)][_0x3e7f7c(0x168)](_0x17be4f))[_0x3e7f7c(0x1a7)](),'unitId':_0x17be4f,'threadId':_0x43edf3,'mention':_0x475a84,'content':_0x272ee3,'replyId':_0x1e6e8f},_0x3b030d=await this[_0x3e7f7c(0x182)][_0x3e7f7c(0x199)](_0x3e7f7c(0x14a)+_0x17be4f+_0x3e7f7c(0x192),{'body':_0x3dec68});return!_0x3b030d['body'][_0x3e7f7c(0x16b)]||_0x3b030d['body'][_0x3e7f7c(0x16b)][_0x3e7f7c(0x1b4)]===0x1;}async[_0x87ed89(0x152)](_0x49e64b){const _0x2627ce=_0x87ed89,{unitId:_0x189193}=_0x49e64b,_0x44e08b=_0x49e64b[_0x2627ce(0x150)],_0x3a4578={'memberId':this[_0x2627ce(0x16d)][_0x2627ce(0x177)]()[_0x2627ce(0x166)],'unitId':_0x189193,'threadId':_0x44e08b,'solved':_0x49e64b[_0x2627ce(0x19a)]?I[_0x2627ce(0x16a)]:I[_0x2627ce(0x179)]},_0x4dc672=await this['_httpService']['post'](_0x2627ce(0x14a)+_0x189193+'/solved',{'body':_0x3a4578});return!_0x4dc672[_0x2627ce(0x149)][_0x2627ce(0x16b)]||_0x4dc672[_0x2627ce(0x149)][_0x2627ce(0x16b)]['code']===0x1;}async['deleteComment'](_0x40f6bd,_0x136a9f,_0xd87ed3,_0x2f1993){const _0x366a4c=_0x87ed89,_0x1422b3={'memberId':(await this[_0x366a4c(0x153)][_0x366a4c(0x168)](_0x40f6bd))[_0x366a4c(0x1a7)](),'threadId':_0xd87ed3,'replyId':_0x2f1993,'unitId':_0x40f6bd},_0x1c2da8=await this[_0x366a4c(0x182)][_0x366a4c(0x199)](_0x366a4c(0x14a)+_0x40f6bd+_0x366a4c(0x1ae),{'body':_0x1422b3});return!_0x1c2da8['body'][_0x366a4c(0x16b)]||_0x1c2da8[_0x366a4c(0x149)][_0x366a4c(0x16b)][_0x366a4c(0x1b4)]===0x1;}async[_0x87ed89(0x141)](_0x21c8e6,_0x5c6335,_0x4388bc){const _0xbb399a=_0x87ed89,_0x2a5b3a={'unitId':_0x21c8e6,'threadId':_0x4388bc},_0x382d4e=await this[_0xbb399a(0x182)][_0xbb399a(0x199)](_0xbb399a(0x14a)+_0x21c8e6+_0xbb399a(0x19d),{'body':_0x2a5b3a}),_0xcb070e=_0x4388bc[_0xbb399a(0x193)](_0x50778b=>G(_0x382d4e[_0xbb399a(0x149)][_0xbb399a(0x15b)][_0x50778b],_0x21c8e6,_0x5c6335))[_0xbb399a(0x1a9)](Boolean);return Object[_0xbb399a(0x183)](_0x382d4e[_0xbb399a(0x149)][_0xbb399a(0x18e)])[_0xbb399a(0x1a1)](_0x3dbf01=>{const _0x2c195e=_0xbb399a;this[_0x2c195e(0x16d)][_0x2c195e(0x18b)](_0x3dbf01);}),_0xcb070e;}[_0x87ed89(0x165)](_0x10b71f){const _0xcc8206=_0x87ed89;return{'id':_0x10b71f['id'],'threadId':_0x10b71f[_0xcc8206(0x150)],'ref':_0x10b71f['ref']};}};p=x([C(0x0,c[_0x87ed89(0x189)](P[_0x87ed89(0x19b)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x87ed89(0x189)](b[_0x87ed89(0x14e)]))],p);function _0x12e0(_0x585e9b,_0x954bc3){_0x585e9b=_0x585e9b-0x140;const _0x5e3c04=_0x5e3c();let _0x12e093=_0x5e3c04[_0x585e9b];return _0x12e093;}var H=Object[_0x87ed89(0x1af)],J=(_0x747ef8,_0x2bfdb5,_0x364bc3,_0x58ff41)=>{const _0x151d15=_0x87ed89;for(var _0x393326=_0x58ff41>0x1?void 0x0:_0x58ff41?H(_0x2bfdb5,_0x364bc3):_0x2bfdb5,_0x48c5e6=_0x747ef8[_0x151d15(0x1aa)]-0x1,_0x9d4c38;_0x48c5e6>=0x0;_0x48c5e6--)(_0x9d4c38=_0x747ef8[_0x48c5e6])&&(_0x393326=_0x9d4c38(_0x393326)||_0x393326);return _0x393326;},y=(_0x57a6ef,_0x32bbec)=>(_0x4730b2,_0x3cf4bf)=>_0x32bbec(_0x4730b2,_0x3cf4bf,_0x57a6ef);let g=class extends c['Disposable']{constructor(_0x2b20f8,_0x17bb6a){const _0x4873fc=_0x87ed89;super(),this['_threadCommentDataSourceService']=_0x2b20f8,this['_threadCommentDataSource']=_0x17bb6a,this[_0x4873fc(0x19c)]();}[_0x87ed89(0x19c)](){const _0x59f883=_0x87ed89;this['_threadCommentDataSourceService'][_0x59f883(0x1a0)]=this[_0x59f883(0x171)],this[_0x59f883(0x18d)][_0x59f883(0x145)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x87ed89(0x15a)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5e605d,_0x493e4b,_0x3198f4)=>_0x493e4b in _0x5e605d?F(_0x5e605d,_0x493e4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3198f4}):_0x5e605d[_0x493e4b]=_0x3198f4,W=(_0x5bea60,_0x276d91,_0x23f387,_0x2ea9f7)=>{const _0x4df204=_0x87ed89;for(var _0x3e5d85=_0x2ea9f7>0x1?void 0x0:_0x2ea9f7?L(_0x276d91,_0x23f387):_0x276d91,_0x3a4702=_0x5bea60[_0x4df204(0x1aa)]-0x1,_0x228fb1;_0x3a4702>=0x0;_0x3a4702--)(_0x228fb1=_0x5bea60[_0x3a4702])&&(_0x3e5d85=_0x228fb1(_0x3e5d85)||_0x3e5d85);return _0x3e5d85;},O=(_0x7d1007,_0x4f1180)=>(_0x16f081,_0x2d33ec)=>_0x4f1180(_0x16f081,_0x2d33ec,_0x7d1007),N=(_0x22cd20,_0x383f19,_0x468b4f)=>Z(_0x22cd20,typeof _0x383f19!=_0x87ed89(0x14b)?_0x383f19+'':_0x383f19,_0x468b4f);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x87ed89(0x194)]{constructor(_0x4ce2d9=D,_0x2ba4f6,_0x56d87b){const _0x5d5c5a=_0x87ed89;super(),this[_0x5d5c5a(0x157)]=_0x4ce2d9,this[_0x5d5c5a(0x1a3)]=_0x2ba4f6,this['_configService']=_0x56d87b;const {..._0x1f70bc}=c[_0x5d5c5a(0x143)]({},D,this[_0x5d5c5a(0x157)]);this['_configService'][_0x5d5c5a(0x1b2)](q,_0x1f70bc);}[_0x87ed89(0x164)](){const _0x37a797=_0x87ed89;[[p],[g],[_]][_0x37a797(0x1a1)](_0x331c03=>{const _0x54d372=_0x37a797;this[_0x54d372(0x1a3)][_0x54d372(0x16f)](_0x331c03);});}[_0x87ed89(0x173)](){const _0x50b283=_0x87ed89;this['_injector'][_0x50b283(0x156)](g),this[_0x50b283(0x1a3)][_0x50b283(0x156)](_);}},N(exports[_0x87ed89(0x187)],_0x87ed89(0x146),U),N(exports[_0x87ed89(0x187)],_0x87ed89(0x15c),c[_0x87ed89(0x188)][_0x87ed89(0x181)]),exports[_0x87ed89(0x187)]=W([c[_0x87ed89(0x155)](w['UniverThreadCommentUIPlugin'],b[_0x87ed89(0x1b1)],T[_0x87ed89(0x1b3)]),O(0x1,c[_0x87ed89(0x189)](c[_0x87ed89(0x169)])),O(0x2,c[_0x87ed89(0x19f)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2fb627=_0x5cb0;(function(_0x545b42,_0x519da9){const _0x4cf8f2=_0x5cb0,_0xfd3b48=_0x545b42();while(!![]){try{const _0x5edaae=-parseInt(_0x4cf8f2(0xb1))/0x1+parseInt(_0x4cf8f2(0xaf))/0x2*(parseInt(_0x4cf8f2(0xd9))/0x3)+-parseInt(_0x4cf8f2(0x9e))/0x4*(parseInt(_0x4cf8f2(0x7f))/0x5)+-parseInt(_0x4cf8f2(0x76))/0x6*(parseInt(_0x4cf8f2(0xcc))/0x7)+parseInt(_0x4cf8f2(0xa3))/0x8*(parseInt(_0x4cf8f2(0xcd))/0x9)+parseInt(_0x4cf8f2(0xba))/0xa*(-parseInt(_0x4cf8f2(0x99))/0xb)+parseInt(_0x4cf8f2(0xcf))/0xc;if(_0x5edaae===_0x519da9)break;else _0xfd3b48['push'](_0xfd3b48['shift']());}catch(_0x23a41c){_0xfd3b48['push'](_0xfd3b48['shift']());}}}(_0x582b,0xeecb5));function _0x582b(){const _0x23932c=['_initDataSource','body','Delete','175AbsMhM','3663rTKSXL','/list','41250252voVfJs','getUser','parse','Edit','subscribe','length','root','pipe','Solve','_sessionService','1821UDBtiq','_configService','map','content','_commentService','178986bFAKzE','ref','solved','requireSession','getOwnPropertyDescriptor','error','syncUpdateMutationToColla','forEach','thread-comment-data-source.config','5470NmtFlt','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','COMMENT','addComment','add','Unknown','/add','commentUpdate$','symbol','rangeId','stringify','users','rangeType','_initUserSync','getComment','filter','addUser','dataSource','disposeWithMe','find','slice','_threadCommentDataSource','delete','threadId','_threadCommentDataSourceService','2629BDIgkn','replyId','comment','code','_injector','4076JnzUkr','Solved','unitId','_init','getMemberID','26944bLHBzA','resolveComment','updateComment','userId','deleteComment','format','userID','UNRECOGNIZED','customRanges','_userService','YYYY/MM/DD\x20HH:mm','get','2366FLpeRC','/universer-api/comment/unit/','1392575jQsllM','UNIVER_UNKNOWN','createTimestamp','type','post','_config','getUnit','_threadCommentModel','personId','54190FsoRCw','user','pluginName','OpenOrReOpen','listComments','/solved','setConfig','/universer-api/user/list','saveCommentToSnapshot','/edit','payload','size','_httpService','replies','Reply'];_0x582b=function(){return _0x23932c;};return _0x582b();}import{CommentService as _0x331514,CollaborationSessionService as _0x7f4081,UniverCollaborationClientPlugin as _0x30dfaf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x634f96}from'@univerjs-pro/license';import{dayjs as _0x50be2f,UserManagerService as _0x15993b,Inject as _0x42c03f,Injector as _0x5f5add,Disposable as _0x39d51c,CustomRangeType as _0x34930a,UniverInstanceType as _0x516719,DependentOn as _0x5b97c0,IConfigService as _0x553ed8,Plugin as _0x452db7,merge as _0xe32879}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c9c4f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x95de07,IThreadCommentDataSourceService as _0x2a0f84}from'@univerjs/thread-comment';import{bufferTime as _0x1b7798}from'rxjs';import{HTTPService as _0x5154de}from'@univerjs/network';const W=_0x2fb627(0x80);var I=(_0x4f9fb0=>(_0x4f9fb0[_0x4f9fb0[_0x2fb627(0xbd)]=0x0]=_0x2fb627(0xbd),_0x4f9fb0[_0x4f9fb0[_0x2fb627(0x9f)]=0x1]='Solved',_0x4f9fb0[_0x4f9fb0[_0x2fb627(0xaa)]=-0x1]=_0x2fb627(0xaa),_0x4f9fb0))(I||{}),v=(_0xb4a9c9=>(_0xb4a9c9[_0xb4a9c9[_0x2fb627(0x85)]=0x0]=_0x2fb627(0x85),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0x81)]=0x1]='Add',_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xc8)]=0x2]='Reply',_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xd2)]=0x3]=_0x2fb627(0xd2),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xcb)]=0x4]=_0x2fb627(0xcb),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xd7)]=0x5]=_0x2fb627(0xd7),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xaa)]=-0x1]=_0x2fb627(0xaa),_0xb4a9c9))(v||{});const y=_0x58a475=>_0x50be2f(new Date(+_0x58a475))[_0x2fb627(0xa8)](_0x2fb627(0xad)),B=async(_0x19c7fd,_0xb7da9)=>{const _0xec88ef=_0x2fb627,_0xab3be1=_0x19c7fd['get'](_0x15993b),_0x40c3e6=_0x19c7fd[_0xec88ef(0xae)](_0x5154de);_0xb7da9[_0xec88ef(0x7d)](_0x565f64=>{const _0x37dec6=_0xec88ef;_0xab3be1[_0x37dec6(0xd0)](_0x565f64)&&_0xb7da9[_0x37dec6(0x96)](_0x565f64);}),_0xb7da9[_0xec88ef(0xc5)]&&(await _0x40c3e6[_0xec88ef(0xae)](_0xec88ef(0xc1),{'params':{'userIDs':[..._0xb7da9]}}))[_0xec88ef(0xca)][_0xec88ef(0x8b)]['forEach'](_0x1a2238=>{_0x1a2238&&_0xab3be1['addUser'](_0x1a2238);});};var K=Object[_0x2fb627(0x7a)],V=(_0x4d7687,_0x546eaf,_0x3bf1ef,_0x1a0dff)=>{const _0x552857=_0x2fb627;for(var _0x2c1a0f=_0x1a0dff>0x1?void 0x0:_0x1a0dff?K(_0x546eaf,_0x3bf1ef):_0x546eaf,_0x37c2d2=_0x4d7687[_0x552857(0xd4)]-0x1,_0x467d42;_0x37c2d2>=0x0;_0x37c2d2--)(_0x467d42=_0x4d7687[_0x37c2d2])&&(_0x2c1a0f=_0x467d42(_0x2c1a0f)||_0x2c1a0f);return _0x2c1a0f;},p=(_0x32981,_0x37b987)=>(_0x517bd5,_0x44c422)=>_0x37b987(_0x517bd5,_0x44c422,_0x32981);let _=class extends _0x39d51c{constructor(_0x46a704,_0x4f5ea8,_0x586d9e,_0x5fcf7d){const _0x19390=_0x2fb627;super(),this[_0x19390(0x75)]=_0x46a704,this[_0x19390(0xb8)]=_0x4f5ea8,this['_userService']=_0x586d9e,this[_0x19390(0x9d)]=_0x5fcf7d,this[_0x19390(0xa1)](),this[_0x19390(0x8d)]();}[_0x2fb627(0x8d)](){const _0x22f95a=_0x2fb627;this[_0x22f95a(0x92)](this['_threadCommentModel'][_0x22f95a(0x87)][_0x22f95a(0xd6)](_0x1b7798(0x10))[_0x22f95a(0xd3)](_0x413f9b=>{const _0x52015d=new Set();_0x413f9b['forEach'](_0x118db1=>{const _0x33472c=_0x5cb0;switch(_0x118db1['type']){case _0x33472c(0x84):{const _0x271f79=_0x118db1[_0x33472c(0xc4)][_0x33472c(0xb9)];_0x52015d['add'](_0x271f79);break;}}}),B(this['_injector'],_0x52015d);}));}['_init'](){const _0x273cf3=_0x2fb627;this['disposeWithMe'](this[_0x273cf3(0x75)][_0x273cf3(0x87)][_0x273cf3(0xd3)](async _0x22934b=>{const _0x3870a8=_0x273cf3;var _0x464534,_0x29301a,_0x1f242d,_0x2f5812;const _0x36e75e=(_0x464534=this['_threadCommentModel'][_0x3870a8(0xb7)](_0x22934b[_0x3870a8(0xa0)])[_0x3870a8(0x93)](_0x269afd=>_0x269afd[_0x3870a8(0x97)]===_0x22934b['threadId']))==null?void 0x0:_0x464534[_0x3870a8(0xd5)];if(!_0x36e75e)return;const {unitId:_0x46afea,subUnitId:_0x55e79c}=_0x36e75e;switch(_0x22934b[_0x3870a8(0xbb)]&&this[_0x3870a8(0xac)]['addUser'](_0x22934b['user']),_0x22934b[_0x3870a8(0xb4)]){case v[_0x3870a8(0x81)]:break;case v[_0x3870a8(0xc8)]:{this['_threadCommentModel'][_0x3870a8(0x83)](_0x46afea,_0x55e79c,{'unitId':_0x46afea,'subUnitId':_0x55e79c,'ref':'','id':_0x22934b[_0x3870a8(0x9a)],'dT':y(+_0x22934b[_0x3870a8(0xb3)]),'threadId':_0x22934b['threadId'],'personId':(_0x1f242d=(_0x29301a=_0x22934b[_0x3870a8(0xbb)])==null?void 0x0:_0x29301a['userID'])!=null?_0x1f242d:_0x22934b['userId'],'text':JSON[_0x3870a8(0xd1)](_0x22934b[_0x3870a8(0x74)]),'parentId':_0x36e75e['id']});break;}case v[_0x3870a8(0xcb)]:{const _0x2a038a=this[_0x3870a8(0xb8)][_0x3870a8(0x8e)](_0x46afea,_0x55e79c,_0x22934b['replyId']);_0x2a038a&&_0x2a038a['parentId']&&this[_0x3870a8(0xb8)]['deleteComment'](_0x46afea,_0x55e79c,_0x22934b['replyId']);break;}case v[_0x3870a8(0xd2)]:{this[_0x3870a8(0xb8)][_0x3870a8(0xa5)](_0x46afea,_0x55e79c,{'commentId':_0x22934b[_0x3870a8(0x9a)],'text':JSON[_0x3870a8(0xd1)](_0x22934b[_0x3870a8(0x74)])});break;}case v[_0x3870a8(0xd7)]:{const _0x1ec12e=(_0x2f5812=this[_0x3870a8(0xb8)][_0x3870a8(0xb7)](_0x22934b[_0x3870a8(0xa0)])['find'](_0x42989d=>_0x42989d[_0x3870a8(0x97)]===_0x22934b[_0x3870a8(0x97)]))==null?void 0x0:_0x2f5812[_0x3870a8(0xd5)];_0x1ec12e&&this['_threadCommentModel'][_0x3870a8(0xa4)](_0x46afea,_0x55e79c,_0x1ec12e['id'],_0x22934b[_0x3870a8(0x78)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x42c03f(_0x331514)),p(0x1,_0x42c03f(_0x95de07)),p(0x2,_0x42c03f(_0x15993b)),p(0x3,_0x42c03f(_0x5f5add))],_);const z=_0x2fb627(0x7e),O={};var k=Object[_0x2fb627(0x7a)],Q=(_0xb82bc5,_0x5c8fcf,_0x3d11e2,_0x2853e0)=>{const _0x4ad437=_0x2fb627;for(var _0xc17ac1=_0x2853e0>0x1?void 0x0:_0x2853e0?k(_0x5c8fcf,_0x3d11e2):_0x5c8fcf,_0x15f89a=_0xb82bc5[_0x4ad437(0xd4)]-0x1,_0x32846f;_0x15f89a>=0x0;_0x15f89a--)(_0x32846f=_0xb82bc5[_0x15f89a])&&(_0xc17ac1=_0x32846f(_0xc17ac1)||_0xc17ac1);return _0xc17ac1;},b=(_0x244d04,_0x318ff1)=>(_0xad5217,_0x24547c)=>_0x318ff1(_0xad5217,_0x24547c,_0x244d04);function X(_0x243440,_0x389fe7){const _0x17f5b8=_0x2fb627,_0x861cfb=_0x243440['replies'][0x0];return{..._0x389fe7,'id':_0x861cfb['replyId'],'resolved':_0x243440['solved']===0x1,'dT':y(_0x861cfb[_0x17f5b8(0xb3)]),'personId':_0x861cfb[_0x17f5b8(0xa6)],'threadId':_0x861cfb['threadId']};}function ee(_0x173c74,_0xc4b487,_0x1be5b4){const _0x3b4c43=_0x2fb627;var _0x101df4,_0xc7011c;if(((_0xc7011c=(_0x101df4=_0x173c74==null?void 0x0:_0x173c74['replies'])==null?void 0x0:_0x101df4[_0x3b4c43(0xd4)])!=null?_0xc7011c:0x0)>0x0){const _0x3c5b43=(_0x2e1708,_0x1c4692)=>({'id':_0x2e1708['replyId'],'threadId':_0x2e1708[_0x3b4c43(0x97)],'dT':y(_0x2e1708[_0x3b4c43(0xb3)]),'personId':_0x2e1708[_0x3b4c43(0xa6)],'resolved':_0x173c74[_0x3b4c43(0x78)]===I[_0x3b4c43(0x9f)],'unitId':_0xc4b487,'subUnitId':_0x1be5b4,'text':JSON[_0x3b4c43(0xd1)](_0x2e1708[_0x3b4c43(0x74)]),'parentId':_0x1c4692}),_0x3eb89e=_0x3c5b43(_0x173c74['replies'][0x0]);return{..._0x3eb89e,'children':_0x173c74[_0x3b4c43(0xc7)][_0x3b4c43(0x94)](0x1)[_0x3b4c43(0x73)](_0x18e67a=>_0x3c5b43(_0x18e67a,_0x3eb89e['id']))};}return null;}let S=class{constructor(_0x28e8f6,_0x9ae3b7,_0x3b5371){const _0x53bfb5=_0x2fb627;this[_0x53bfb5(0xc6)]=_0x28e8f6,this[_0x53bfb5(0xac)]=_0x9ae3b7,this[_0x53bfb5(0xd8)]=_0x3b5371;}async['addComment'](_0x102fcd){const _0x48bd5a=_0x2fb627;var _0xae6801,_0x53387a;const {parentId:_0x50b467,unitId:_0xcdc44b,text:_0x12039c,threadId:_0x5837ff}=_0x102fcd,_0x3d0e82=(_0x53387a=(_0xae6801=_0x12039c[_0x48bd5a(0xab)])==null?void 0x0:_0xae6801[_0x48bd5a(0x8f)](_0x4c0169=>_0x4c0169[_0x48bd5a(0x8c)]===_0x34930a[_0x48bd5a(0x82)])['map'](_0x36843d=>_0x36843d[_0x48bd5a(0x89)]))!=null?_0x53387a:[],_0x2eac4b=JSON['stringify'](_0x12039c),_0x483a83=(await this['_sessionService'][_0x48bd5a(0x79)](_0xcdc44b))[_0x48bd5a(0xa2)]();if(_0x50b467){const _0x299559={'memberId':_0x483a83,'unitId':_0xcdc44b,'content':_0x2eac4b,'mention':_0x3d0e82,'threadId':_0x5837ff},_0x496ad7=(await this[_0x48bd5a(0xc6)][_0x48bd5a(0xb5)](_0x48bd5a(0xb0)+_0xcdc44b+'/reply',{'body':_0x299559}))[_0x48bd5a(0xca)]['reply'];return{..._0x102fcd,'id':_0x496ad7[_0x48bd5a(0x9a)],'dT':_0x50be2f(+_0x496ad7[_0x48bd5a(0xb3)])[_0x48bd5a(0xa8)](_0x48bd5a(0xad)),'personId':_0x496ad7[_0x48bd5a(0xa6)]};}else{const _0x2933c1={'memberId':_0x483a83,'unitId':_0xcdc44b,'content':_0x2eac4b,'mention':_0x3d0e82},_0x25f86c=await this[_0x48bd5a(0xc6)]['post'](_0x48bd5a(0xb0)+_0xcdc44b+_0x48bd5a(0x86),{'body':_0x2933c1});return X(_0x25f86c[_0x48bd5a(0xca)][_0x48bd5a(0x9b)],_0x102fcd);}}async[_0x2fb627(0xa5)](_0x3b397e){const _0x20e7af=_0x2fb627;var _0x355f21,_0x1cf580;const {text:_0x12b115,unitId:_0x2002c6}=_0x3b397e,_0x19bded=(_0x1cf580=(_0x355f21=_0x12b115['customRanges'])==null?void 0x0:_0x355f21[_0x20e7af(0x8f)](_0x171097=>_0x171097[_0x20e7af(0x8c)]===_0x34930a[_0x20e7af(0x82)])['map'](_0x5d2ed0=>_0x5d2ed0['rangeId']))!=null?_0x1cf580:[],_0x1c645c=JSON[_0x20e7af(0x8a)](_0x12b115),_0x1d492b=_0x3b397e['threadId'],_0x2b670f=_0x3b397e['id'],_0x4266d6={'memberId':(await this[_0x20e7af(0xd8)][_0x20e7af(0x79)](_0x2002c6))['getMemberID'](),'unitId':_0x2002c6,'threadId':_0x1d492b,'mention':_0x19bded,'content':_0x1c645c,'replyId':_0x2b670f},_0x9c4dd3=await this[_0x20e7af(0xc6)][_0x20e7af(0xb5)](_0x20e7af(0xb0)+_0x2002c6+_0x20e7af(0xc3),{'body':_0x4266d6});return!_0x9c4dd3[_0x20e7af(0xca)][_0x20e7af(0x7b)]||_0x9c4dd3[_0x20e7af(0xca)][_0x20e7af(0x7b)][_0x20e7af(0x9c)]===0x1;}async['resolveComment'](_0x4a2393){const _0x45fd2d=_0x2fb627,{unitId:_0x358a7e}=_0x4a2393,_0x39f9f1=_0x4a2393[_0x45fd2d(0x97)],_0x48896b={'memberId':this['_userService']['getCurrentUser']()[_0x45fd2d(0xa9)],'unitId':_0x358a7e,'threadId':_0x39f9f1,'solved':_0x4a2393['resolved']?I['Solved']:I[_0x45fd2d(0xbd)]},_0x2a7d86=await this['_httpService'][_0x45fd2d(0xb5)](_0x45fd2d(0xb0)+_0x358a7e+_0x45fd2d(0xbf),{'body':_0x48896b});return!_0x2a7d86[_0x45fd2d(0xca)][_0x45fd2d(0x7b)]||_0x2a7d86[_0x45fd2d(0xca)][_0x45fd2d(0x7b)][_0x45fd2d(0x9c)]===0x1;}async[_0x2fb627(0xa7)](_0x39d236,_0x40ca8f,_0x53ad4e,_0x3a1052){const _0x545b50=_0x2fb627,_0x1523a2={'memberId':(await this[_0x545b50(0xd8)][_0x545b50(0x79)](_0x39d236))[_0x545b50(0xa2)](),'threadId':_0x53ad4e,'replyId':_0x3a1052,'unitId':_0x39d236},_0x3e00a7=await this[_0x545b50(0xc6)][_0x545b50(0xb5)](_0x545b50(0xb0)+_0x39d236+'/delete',{'body':_0x1523a2});return!_0x3e00a7[_0x545b50(0xca)][_0x545b50(0x7b)]||_0x3e00a7[_0x545b50(0xca)]['error'][_0x545b50(0x9c)]===0x1;}async[_0x2fb627(0xbe)](_0x488bd6,_0x39294e,_0x2e94bf){const _0x326b56=_0x2fb627,_0x59d90d={'unitId':_0x488bd6,'threadId':_0x2e94bf},_0x59ba31=await this['_httpService'][_0x326b56(0xb5)](_0x326b56(0xb0)+_0x488bd6+_0x326b56(0xce),{'body':_0x59d90d}),_0x3fae96=_0x2e94bf[_0x326b56(0x73)](_0x6ab117=>ee(_0x59ba31[_0x326b56(0xca)]['comments'][_0x6ab117],_0x488bd6,_0x39294e))[_0x326b56(0x8f)](Boolean);return Object['values'](_0x59ba31[_0x326b56(0xca)]['users'])['forEach'](_0x227182=>{const _0x3116ce=_0x326b56;this['_userService'][_0x3116ce(0x90)](_0x227182);}),_0x3fae96;}[_0x2fb627(0xc2)](_0x3ea70){const _0x16482e=_0x2fb627;return{'id':_0x3ea70['id'],'threadId':_0x3ea70[_0x16482e(0x97)],'ref':_0x3ea70[_0x16482e(0x77)]};}};function _0x5cb0(_0x360dbe,_0x1bda09){_0x360dbe=_0x360dbe-0x73;const _0x582b67=_0x582b();let _0x5cb0ee=_0x582b67[_0x360dbe];return _0x5cb0ee;}S=Q([b(0x0,_0x42c03f(_0x5154de)),b(0x1,_0x42c03f(_0x15993b)),b(0x2,_0x42c03f(_0x7f4081))],S);var re=Object[_0x2fb627(0x7a)],te=(_0x254bc9,_0x50587a,_0x4f7936,_0x27e136)=>{const _0x3fad4a=_0x2fb627;for(var _0x560536=_0x27e136>0x1?void 0x0:_0x27e136?re(_0x50587a,_0x4f7936):_0x50587a,_0x2a33aa=_0x254bc9[_0x3fad4a(0xd4)]-0x1,_0xb4d238;_0x2a33aa>=0x0;_0x2a33aa--)(_0xb4d238=_0x254bc9[_0x2a33aa])&&(_0x560536=_0xb4d238(_0x560536)||_0x560536);return _0x560536;},M=(_0x55bc1a,_0xc8a9aa)=>(_0x14abfd,_0x11b824)=>_0xc8a9aa(_0x14abfd,_0x11b824,_0x55bc1a);let f=class extends _0x39d51c{constructor(_0x522e2b,_0x461d60){const _0x531f63=_0x2fb627;super(),this[_0x531f63(0x98)]=_0x522e2b,this[_0x531f63(0x95)]=_0x461d60,this[_0x531f63(0xc9)]();}[_0x2fb627(0xc9)](){const _0x3c2cc4=_0x2fb627;this[_0x3c2cc4(0x98)][_0x3c2cc4(0x91)]=this['_threadCommentDataSource'],this[_0x3c2cc4(0x98)][_0x3c2cc4(0x7c)]=!0x1;}};f=te([M(0x0,_0x2a0f84),M(0x1,_0x42c03f(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5c3097,_0x55b527,_0x588ed0)=>_0x55b527 in _0x5c3097?se(_0x5c3097,_0x55b527,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x588ed0}):_0x5c3097[_0x55b527]=_0x588ed0,ie=(_0x988407,_0x22c3a1,_0x2122b6,_0x36597b)=>{for(var _0x51aac6=_0x36597b>0x1?void 0x0:_0x36597b?oe(_0x22c3a1,_0x2122b6):_0x22c3a1,_0x361489=_0x988407['length']-0x1,_0x346972;_0x361489>=0x0;_0x361489--)(_0x346972=_0x988407[_0x361489])&&(_0x51aac6=_0x346972(_0x51aac6)||_0x51aac6);return _0x51aac6;},N=(_0x52180c,_0x2aeec8)=>(_0x493c0e,_0x15214e)=>_0x2aeec8(_0x493c0e,_0x15214e,_0x52180c),$=(_0xf239b2,_0x13169a,_0x365154)=>ne(_0xf239b2,typeof _0x13169a!=_0x2fb627(0x88)?_0x13169a+'':_0x13169a,_0x365154);let g=class extends _0x452db7{constructor(_0x5efb16=O,_0x4a01d,_0x5a9adc){const _0x58db6d=_0x2fb627;super(),this[_0x58db6d(0xb6)]=_0x5efb16,this['_injector']=_0x4a01d,this[_0x58db6d(0xda)]=_0x5a9adc;const {..._0x152886}=_0xe32879({},O,this[_0x58db6d(0xb6)]);this[_0x58db6d(0xda)][_0x58db6d(0xc0)](z,_0x152886);}['onStarting'](){const _0x475251=_0x2fb627;[[S],[f],[_]][_0x475251(0x7d)](_0x225ac8=>{const _0x393a15=_0x475251;this[_0x393a15(0x9d)][_0x393a15(0x84)](_0x225ac8);});}['onReady'](){const _0x2ea09e=_0x2fb627;this[_0x2ea09e(0x9d)]['get'](f),this[_0x2ea09e(0x9d)][_0x2ea09e(0xae)](_);}};$(g,_0x2fb627(0xbc),W),$(g,_0x2fb627(0xb4),_0x516719[_0x2fb627(0xb2)]),g=ie([_0x5b97c0(_0x4c9c4f,_0x30dfaf,_0x634f96),N(0x1,_0x42c03f(_0x5f5add)),N(0x2,_0x553ed8)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x54c2e1=_0x543b;(function(_0x4f7e3f,_0x41986b){const _0x4a5cb4=_0x543b,_0x14b638=_0x4f7e3f();while(!![]){try{const _0x3107e=-parseInt(_0x4a5cb4(0x133))/0x1+parseInt(_0x4a5cb4(0x171))/0x2+-parseInt(_0x4a5cb4(0x140))/0x3*(-parseInt(_0x4a5cb4(0x17c))/0x4)+parseInt(_0x4a5cb4(0x139))/0x5*(parseInt(_0x4a5cb4(0x135))/0x6)+-parseInt(_0x4a5cb4(0x143))/0x7+parseInt(_0x4a5cb4(0x188))/0x8+-parseInt(_0x4a5cb4(0x16b))/0x9;if(_0x3107e===_0x41986b)break;else _0x14b638['push'](_0x14b638['shift']());}catch(_0x1bb1b7){_0x14b638['push'](_0x14b638['shift']());}}}(_0x5f3f,0x9eed9));import{CommentService as _0x106d32,CollaborationSessionService as _0x435820,UniverCollaborationClientPlugin as _0x4a471d}from'@univerjs-pro/collaboration-client';function _0x543b(_0xa9b0a1,_0x3a45b9){_0xa9b0a1=_0xa9b0a1-0x12d;const _0x5f3f4a=_0x5f3f();let _0x543b8a=_0x5f3f4a[_0xa9b0a1];return _0x543b8a;}import{UniverLicensePlugin as _0x319e70}from'@univerjs-pro/license';import{dayjs as _0x1cb702,UserManagerService as _0x79f5f8,Inject as _0x32a39f,Injector as _0x1b2498,Disposable as _0xf64d55,CustomRangeType as _0x28fd3d,UniverInstanceType as _0x154615,DependentOn as _0x5887db,IConfigService as _0x4268de,Plugin as _0x4e8090,merge as _0x325500}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x28dbe4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x118a66,IThreadCommentDataSourceService as _0x1c9b0a}from'@univerjs/thread-comment';import{bufferTime as _0xf247e6}from'rxjs';import{HTTPService as _0x43ff1a}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x43eb1d=>(_0x43eb1d[_0x43eb1d[_0x54c2e1(0x14a)]=0x0]=_0x54c2e1(0x14a),_0x43eb1d[_0x43eb1d[_0x54c2e1(0x152)]=0x1]='Solved',_0x43eb1d[_0x43eb1d[_0x54c2e1(0x146)]=-0x1]=_0x54c2e1(0x146),_0x43eb1d))(I||{}),v=(_0x373a64=>(_0x373a64[_0x373a64['Unknown']=0x0]=_0x54c2e1(0x17e),_0x373a64[_0x373a64[_0x54c2e1(0x14e)]=0x1]=_0x54c2e1(0x14e),_0x373a64[_0x373a64['Reply']=0x2]=_0x54c2e1(0x186),_0x373a64[_0x373a64[_0x54c2e1(0x160)]=0x3]=_0x54c2e1(0x160),_0x373a64[_0x373a64['Delete']=0x4]='Delete',_0x373a64[_0x373a64[_0x54c2e1(0x176)]=0x5]=_0x54c2e1(0x176),_0x373a64[_0x373a64[_0x54c2e1(0x146)]=-0x1]='UNRECOGNIZED',_0x373a64))(v||{});const y=_0x9f4a0f=>_0x1cb702(new Date(+_0x9f4a0f))[_0x54c2e1(0x169)](_0x54c2e1(0x159)),B=async(_0x4a4bc9,_0x4033ed)=>{const _0x48e02e=_0x54c2e1,_0x17f072=_0x4a4bc9[_0x48e02e(0x149)](_0x79f5f8),_0x16a6ed=_0x4a4bc9[_0x48e02e(0x149)](_0x43ff1a);_0x4033ed['forEach'](_0x5a1976=>{const _0x265223=_0x48e02e;_0x17f072[_0x265223(0x13b)](_0x5a1976)&&_0x4033ed[_0x265223(0x165)](_0x5a1976);}),_0x4033ed['size']&&(await _0x16a6ed[_0x48e02e(0x149)](_0x48e02e(0x142),{'params':{'userIDs':[..._0x4033ed]}}))[_0x48e02e(0x162)][_0x48e02e(0x172)][_0x48e02e(0x189)](_0x5afa4b=>{const _0x195717=_0x48e02e;_0x5afa4b&&_0x17f072[_0x195717(0x148)](_0x5afa4b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x32df73,_0x30acd3,_0x5d1962,_0x4d1171)=>{const _0x4cd9c9=_0x54c2e1;for(var _0x445063=_0x4d1171>0x1?void 0x0:_0x4d1171?K(_0x30acd3,_0x5d1962):_0x30acd3,_0x219b71=_0x32df73[_0x4cd9c9(0x13c)]-0x1,_0x16ab1c;_0x219b71>=0x0;_0x219b71--)(_0x16ab1c=_0x32df73[_0x219b71])&&(_0x445063=_0x16ab1c(_0x445063)||_0x445063);return _0x445063;},p=(_0x20b592,_0x58d8ed)=>(_0x1222b,_0x116bbe)=>_0x58d8ed(_0x1222b,_0x116bbe,_0x20b592);let _=class extends _0xf64d55{constructor(_0x571abc,_0x192abc,_0x3088a,_0x41ecab){const _0x3bc288=_0x54c2e1;super(),this['_commentService']=_0x571abc,this[_0x3bc288(0x173)]=_0x192abc,this['_userService']=_0x3088a,this['_injector']=_0x41ecab,this[_0x3bc288(0x191)](),this[_0x3bc288(0x16e)]();}[_0x54c2e1(0x16e)](){const _0x483bf8=_0x54c2e1;this['disposeWithMe'](this[_0x483bf8(0x173)][_0x483bf8(0x180)][_0x483bf8(0x190)](_0xf247e6(0x10))[_0x483bf8(0x187)](_0x343b00=>{const _0x144c63=_0x483bf8,_0x10cc92=new Set();_0x343b00[_0x144c63(0x189)](_0x43a2a5=>{const _0x1f0600=_0x144c63;switch(_0x43a2a5[_0x1f0600(0x16d)]){case _0x1f0600(0x16f):{const _0x409d37=_0x43a2a5[_0x1f0600(0x167)][_0x1f0600(0x144)];_0x10cc92[_0x1f0600(0x16f)](_0x409d37);break;}}}),B(this[_0x144c63(0x18d)],_0x10cc92);}));}[_0x54c2e1(0x191)](){const _0x3de2f7=_0x54c2e1;this['disposeWithMe'](this[_0x3de2f7(0x13e)]['commentUpdate$']['subscribe'](async _0x606312=>{const _0x26ee60=_0x3de2f7;var _0x33f970,_0x45269f,_0x493d63,_0x2a5bd8;const _0x4b80c7=(_0x33f970=this[_0x26ee60(0x173)][_0x26ee60(0x131)](_0x606312['unitId'])[_0x26ee60(0x161)](_0x3a3461=>_0x3a3461['threadId']===_0x606312[_0x26ee60(0x16c)]))==null?void 0x0:_0x33f970[_0x26ee60(0x147)];if(!_0x4b80c7)return;const {unitId:_0x35297f,subUnitId:_0x5f5691}=_0x4b80c7;switch(_0x606312[_0x26ee60(0x166)]&&this[_0x26ee60(0x155)]['addUser'](_0x606312[_0x26ee60(0x166)]),_0x606312[_0x26ee60(0x16d)]){case v['Add']:break;case v[_0x26ee60(0x186)]:{this[_0x26ee60(0x173)][_0x26ee60(0x158)](_0x35297f,_0x5f5691,{'unitId':_0x35297f,'subUnitId':_0x5f5691,'ref':'','id':_0x606312[_0x26ee60(0x17b)],'dT':y(+_0x606312[_0x26ee60(0x137)]),'threadId':_0x606312['threadId'],'personId':(_0x493d63=(_0x45269f=_0x606312[_0x26ee60(0x166)])==null?void 0x0:_0x45269f[_0x26ee60(0x18f)])!=null?_0x493d63:_0x606312[_0x26ee60(0x14c)],'text':JSON[_0x26ee60(0x150)](_0x606312[_0x26ee60(0x18b)]),'parentId':_0x4b80c7['id']});break;}case v[_0x26ee60(0x15c)]:{const _0x2733c3=this[_0x26ee60(0x173)][_0x26ee60(0x14d)](_0x35297f,_0x5f5691,_0x606312[_0x26ee60(0x17b)]);_0x2733c3&&_0x2733c3[_0x26ee60(0x15b)]&&this[_0x26ee60(0x173)][_0x26ee60(0x13a)](_0x35297f,_0x5f5691,_0x606312[_0x26ee60(0x17b)]);break;}case v[_0x26ee60(0x160)]:{this['_threadCommentModel'][_0x26ee60(0x168)](_0x35297f,_0x5f5691,{'commentId':_0x606312[_0x26ee60(0x17b)],'text':JSON[_0x26ee60(0x150)](_0x606312['content'])});break;}case v['Solve']:{const _0x5b7097=(_0x2a5bd8=this[_0x26ee60(0x173)][_0x26ee60(0x131)](_0x606312['unitId'])['find'](_0x2dfd44=>_0x2dfd44[_0x26ee60(0x16c)]===_0x606312[_0x26ee60(0x16c)]))==null?void 0x0:_0x2a5bd8[_0x26ee60(0x147)];_0x5b7097&&this[_0x26ee60(0x173)][_0x26ee60(0x18e)](_0x35297f,_0x5f5691,_0x5b7097['id'],_0x606312[_0x26ee60(0x138)]===I[_0x26ee60(0x152)]);break;}}}));}};_=V([p(0x0,_0x32a39f(_0x106d32)),p(0x1,_0x32a39f(_0x118a66)),p(0x2,_0x32a39f(_0x79f5f8)),p(0x3,_0x32a39f(_0x1b2498))],_);const z=_0x54c2e1(0x157),O={};var k=Object[_0x54c2e1(0x174)],Q=(_0x43d48b,_0xc420c8,_0x4dad32,_0x5011f1)=>{const _0x50ef9f=_0x54c2e1;for(var _0x72e235=_0x5011f1>0x1?void 0x0:_0x5011f1?k(_0xc420c8,_0x4dad32):_0xc420c8,_0x5ad328=_0x43d48b[_0x50ef9f(0x13c)]-0x1,_0x8720c2;_0x5ad328>=0x0;_0x5ad328--)(_0x8720c2=_0x43d48b[_0x5ad328])&&(_0x72e235=_0x8720c2(_0x72e235)||_0x72e235);return _0x72e235;},b=(_0x5e3800,_0x5ddac4)=>(_0xbcbe03,_0x502fa1)=>_0x5ddac4(_0xbcbe03,_0x502fa1,_0x5e3800);function X(_0x4e7b62,_0x4a094d){const _0x2924e7=_0x54c2e1,_0x48582e=_0x4e7b62['replies'][0x0];return{..._0x4a094d,'id':_0x48582e[_0x2924e7(0x17b)],'resolved':_0x4e7b62[_0x2924e7(0x138)]===0x1,'dT':y(_0x48582e[_0x2924e7(0x137)]),'personId':_0x48582e[_0x2924e7(0x14c)],'threadId':_0x48582e[_0x2924e7(0x16c)]};}function ee(_0x55adc0,_0x4eb1bf,_0x5b80a9){const _0x376837=_0x54c2e1;var _0x4187ba,_0xc64485;if(((_0xc64485=(_0x4187ba=_0x55adc0==null?void 0x0:_0x55adc0[_0x376837(0x153)])==null?void 0x0:_0x4187ba[_0x376837(0x13c)])!=null?_0xc64485:0x0)>0x0){const _0x4b60ee=(_0x2a6697,_0x33390c)=>({'id':_0x2a6697[_0x376837(0x17b)],'threadId':_0x2a6697[_0x376837(0x16c)],'dT':y(_0x2a6697[_0x376837(0x137)]),'personId':_0x2a6697[_0x376837(0x14c)],'resolved':_0x55adc0['solved']===I[_0x376837(0x152)],'unitId':_0x4eb1bf,'subUnitId':_0x5b80a9,'text':JSON[_0x376837(0x150)](_0x2a6697[_0x376837(0x18b)]),'parentId':_0x33390c}),_0x524a73=_0x4b60ee(_0x55adc0[_0x376837(0x153)][0x0]);return{..._0x524a73,'children':_0x55adc0[_0x376837(0x153)][_0x376837(0x15d)](0x1)[_0x376837(0x15a)](_0x1dd419=>_0x4b60ee(_0x1dd419,_0x524a73['id']))};}return null;}let S=class{constructor(_0x200a0f,_0x30ea00,_0x47f79a){const _0x3d6211=_0x54c2e1;this[_0x3d6211(0x15e)]=_0x200a0f,this['_userService']=_0x30ea00,this[_0x3d6211(0x15f)]=_0x47f79a;}async[_0x54c2e1(0x158)](_0x1fc770){const _0x4a8365=_0x54c2e1;var _0x23c956,_0x386c2e;const {parentId:_0x31d610,unitId:_0x556f7f,text:_0x1c9bcd,threadId:_0x3b3ee6}=_0x1fc770,_0x3fd56f=(_0x386c2e=(_0x23c956=_0x1c9bcd['customRanges'])==null?void 0x0:_0x23c956[_0x4a8365(0x12f)](_0x379377=>_0x379377['rangeType']===_0x28fd3d[_0x4a8365(0x178)])[_0x4a8365(0x15a)](_0x51a4ee=>_0x51a4ee['rangeId']))!=null?_0x386c2e:[],_0xc5a41e=JSON[_0x4a8365(0x177)](_0x1c9bcd),_0x445d8a=(await this[_0x4a8365(0x15f)][_0x4a8365(0x185)](_0x556f7f))[_0x4a8365(0x14f)]();if(_0x31d610){const _0x462e49={'memberId':_0x445d8a,'unitId':_0x556f7f,'content':_0xc5a41e,'mention':_0x3fd56f,'threadId':_0x3b3ee6},_0x24b1d5=(await this[_0x4a8365(0x15e)][_0x4a8365(0x181)](_0x4a8365(0x182)+_0x556f7f+'/reply',{'body':_0x462e49}))[_0x4a8365(0x162)][_0x4a8365(0x16a)];return{..._0x1fc770,'id':_0x24b1d5[_0x4a8365(0x17b)],'dT':_0x1cb702(+_0x24b1d5[_0x4a8365(0x137)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x24b1d5['userId']};}else{const _0x10f4b4={'memberId':_0x445d8a,'unitId':_0x556f7f,'content':_0xc5a41e,'mention':_0x3fd56f},_0x569ad2=await this[_0x4a8365(0x15e)][_0x4a8365(0x181)](_0x4a8365(0x182)+_0x556f7f+_0x4a8365(0x184),{'body':_0x10f4b4});return X(_0x569ad2[_0x4a8365(0x162)]['comment'],_0x1fc770);}}async[_0x54c2e1(0x168)](_0x5d4df6){const _0x4ff5e0=_0x54c2e1;var _0x592c9a,_0x362221;const {text:_0x430a6b,unitId:_0x52a5d3}=_0x5d4df6,_0x262dc3=(_0x362221=(_0x592c9a=_0x430a6b[_0x4ff5e0(0x179)])==null?void 0x0:_0x592c9a[_0x4ff5e0(0x12f)](_0xb434e2=>_0xb434e2['rangeType']===_0x28fd3d['COMMENT'])[_0x4ff5e0(0x15a)](_0x20aa50=>_0x20aa50[_0x4ff5e0(0x18a)]))!=null?_0x362221:[],_0x4fe966=JSON['stringify'](_0x430a6b),_0x52fba6=_0x5d4df6[_0x4ff5e0(0x16c)],_0x15c9a7=_0x5d4df6['id'],_0x516b1a={'memberId':(await this[_0x4ff5e0(0x15f)]['requireSession'](_0x52a5d3))['getMemberID'](),'unitId':_0x52a5d3,'threadId':_0x52fba6,'mention':_0x262dc3,'content':_0x4fe966,'replyId':_0x15c9a7},_0x1014d1=await this['_httpService'][_0x4ff5e0(0x181)]('/universer-api/comment/unit/'+_0x52a5d3+'/edit',{'body':_0x516b1a});return!_0x1014d1[_0x4ff5e0(0x162)][_0x4ff5e0(0x13f)]||_0x1014d1[_0x4ff5e0(0x162)]['error'][_0x4ff5e0(0x136)]===0x1;}async[_0x54c2e1(0x18e)](_0x1a9b6b){const _0x223897=_0x54c2e1,{unitId:_0x5af528}=_0x1a9b6b,_0x2db10b=_0x1a9b6b[_0x223897(0x16c)],_0x1dde0f={'memberId':this['_userService'][_0x223897(0x14b)]()[_0x223897(0x18f)],'unitId':_0x5af528,'threadId':_0x2db10b,'solved':_0x1a9b6b[_0x223897(0x12e)]?I['Solved']:I['OpenOrReOpen']},_0x1d162a=await this[_0x223897(0x15e)]['post'](_0x223897(0x182)+_0x5af528+_0x223897(0x17f),{'body':_0x1dde0f});return!_0x1d162a['body'][_0x223897(0x13f)]||_0x1d162a[_0x223897(0x162)][_0x223897(0x13f)]['code']===0x1;}async[_0x54c2e1(0x13a)](_0x5c727e,_0xaa241c,_0x17226d,_0x267ea3){const _0xc4af9c=_0x54c2e1,_0x5ea419={'memberId':(await this['_sessionService']['requireSession'](_0x5c727e))[_0xc4af9c(0x14f)](),'threadId':_0x17226d,'replyId':_0x267ea3,'unitId':_0x5c727e},_0x2733df=await this[_0xc4af9c(0x15e)]['post']('/universer-api/comment/unit/'+_0x5c727e+'/delete',{'body':_0x5ea419});return!_0x2733df[_0xc4af9c(0x162)]['error']||_0x2733df[_0xc4af9c(0x162)][_0xc4af9c(0x13f)][_0xc4af9c(0x136)]===0x1;}async[_0x54c2e1(0x130)](_0x4f6787,_0x261bfe,_0x5b5ac4){const _0x1058b4=_0x54c2e1,_0x513205={'unitId':_0x4f6787,'threadId':_0x5b5ac4},_0x4a3bda=await this[_0x1058b4(0x15e)][_0x1058b4(0x181)](_0x1058b4(0x182)+_0x4f6787+_0x1058b4(0x145),{'body':_0x513205}),_0x2b526d=_0x5b5ac4[_0x1058b4(0x15a)](_0x1e6b85=>ee(_0x4a3bda[_0x1058b4(0x162)][_0x1058b4(0x17d)][_0x1e6b85],_0x4f6787,_0x261bfe))[_0x1058b4(0x12f)](Boolean);return Object[_0x1058b4(0x151)](_0x4a3bda[_0x1058b4(0x162)]['users'])['forEach'](_0x19cdf8=>{const _0x230c53=_0x1058b4;this[_0x230c53(0x155)][_0x230c53(0x148)](_0x19cdf8);}),_0x2b526d;}[_0x54c2e1(0x175)](_0x4b0853){const _0x4310d7=_0x54c2e1;return{'id':_0x4b0853['id'],'threadId':_0x4b0853[_0x4310d7(0x16c)],'ref':_0x4b0853['ref']};}};S=Q([b(0x0,_0x32a39f(_0x43ff1a)),b(0x1,_0x32a39f(_0x79f5f8)),b(0x2,_0x32a39f(_0x435820))],S);function _0x5f3f(){const _0x3669da=['126651FZmPLJ','personId','/list','UNRECOGNIZED','root','addUser','get','OpenOrReOpen','getCurrentUser','userId','getComment','Add','getMemberID','parse','values','Solved','replies','_initDataSource','_userService','defineProperty','thread-comment-data-source.config','addComment','YYYY/MM/DD\x20HH:mm','map','parentId','Delete','slice','_httpService','_sessionService','Edit','find','body','syncUpdateMutationToColla','_configService','delete','user','payload','updateComment','format','reply','20536749rCqQzi','threadId','type','_initUserSync','add','symbol','1908808lushHT','users','_threadCommentModel','getOwnPropertyDescriptor','saveCommentToSnapshot','Solve','stringify','COMMENT','customRanges','dataSource','replyId','1239824HAwzPw','comments','Unknown','/solved','commentUpdate$','post','/universer-api/comment/unit/','_threadCommentDataSourceService','/add','requireSession','Reply','subscribe','9725344nwpAzY','forEach','rangeId','content','UNIVER_UNKNOWN','_injector','resolveComment','userID','pipe','_init','_config','resolved','filter','listComments','getUnit','onStarting','417927MXGqUm','_threadCommentDataSource','1524GVAVrp','code','createTimestamp','solved','11395XJwvUc','deleteComment','getUser','length','onReady','_commentService','error','6rComBe','pluginName','/universer-api/user/list'];_0x5f3f=function(){return _0x3669da;};return _0x5f3f();}var re=Object[_0x54c2e1(0x174)],te=(_0x2143b8,_0x17a8c3,_0x49fa0c,_0x404dca)=>{const _0x1e250d=_0x54c2e1;for(var _0xc2cf87=_0x404dca>0x1?void 0x0:_0x404dca?re(_0x17a8c3,_0x49fa0c):_0x17a8c3,_0x4339b4=_0x2143b8[_0x1e250d(0x13c)]-0x1,_0x2ce91a;_0x4339b4>=0x0;_0x4339b4--)(_0x2ce91a=_0x2143b8[_0x4339b4])&&(_0xc2cf87=_0x2ce91a(_0xc2cf87)||_0xc2cf87);return _0xc2cf87;},M=(_0x236c6e,_0x158eb)=>(_0x363c69,_0x19f75c)=>_0x158eb(_0x363c69,_0x19f75c,_0x236c6e);let f=class extends _0xf64d55{constructor(_0x52de6a,_0x120318){const _0x5c7e2f=_0x54c2e1;super(),this[_0x5c7e2f(0x183)]=_0x52de6a,this[_0x5c7e2f(0x134)]=_0x120318,this['_initDataSource']();}[_0x54c2e1(0x154)](){const _0x59cd7d=_0x54c2e1;this[_0x59cd7d(0x183)][_0x59cd7d(0x17a)]=this[_0x59cd7d(0x134)],this['_threadCommentDataSourceService'][_0x59cd7d(0x163)]=!0x1;}};f=te([M(0x0,_0x1c9b0a),M(0x1,_0x32a39f(S))],f);var se=Object[_0x54c2e1(0x156)],oe=Object[_0x54c2e1(0x174)],ne=(_0x2778fe,_0x3f4943,_0x4d7c4a)=>_0x3f4943 in _0x2778fe?se(_0x2778fe,_0x3f4943,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d7c4a}):_0x2778fe[_0x3f4943]=_0x4d7c4a,ie=(_0x3dcb61,_0x144d11,_0x1c3113,_0x409f9f)=>{const _0x323a86=_0x54c2e1;for(var _0x304bea=_0x409f9f>0x1?void 0x0:_0x409f9f?oe(_0x144d11,_0x1c3113):_0x144d11,_0x239e61=_0x3dcb61[_0x323a86(0x13c)]-0x1,_0xd9be4e;_0x239e61>=0x0;_0x239e61--)(_0xd9be4e=_0x3dcb61[_0x239e61])&&(_0x304bea=_0xd9be4e(_0x304bea)||_0x304bea);return _0x304bea;},N=(_0x236b74,_0x632758)=>(_0x43ab0a,_0x87b9ab)=>_0x632758(_0x43ab0a,_0x87b9ab,_0x236b74),$=(_0x3c5142,_0x294a72,_0x19bdd7)=>ne(_0x3c5142,typeof _0x294a72!=_0x54c2e1(0x170)?_0x294a72+'':_0x294a72,_0x19bdd7);let g=class extends _0x4e8090{constructor(_0x39feff=O,_0x4ec327,_0x55d1c7){const _0x49f6ad=_0x54c2e1;super(),this[_0x49f6ad(0x12d)]=_0x39feff,this[_0x49f6ad(0x18d)]=_0x4ec327,this[_0x49f6ad(0x164)]=_0x55d1c7;const {..._0x13503b}=_0x325500({},O,this[_0x49f6ad(0x12d)]);this['_configService']['setConfig'](z,_0x13503b);}[_0x54c2e1(0x132)](){const _0x5293db=_0x54c2e1;[[S],[f],[_]][_0x5293db(0x189)](_0x31b31a=>{const _0x1a0b5b=_0x5293db;this[_0x1a0b5b(0x18d)]['add'](_0x31b31a);});}[_0x54c2e1(0x13d)](){const _0x57395c=_0x54c2e1;this[_0x57395c(0x18d)][_0x57395c(0x149)](f),this[_0x57395c(0x18d)][_0x57395c(0x149)](_);}};$(g,_0x54c2e1(0x141),W),$(g,_0x54c2e1(0x16d),_0x154615[_0x54c2e1(0x18c)]),g=ie([_0x5887db(_0x28dbe4,_0x4a471d,_0x319e70),N(0x1,_0x32a39f(_0x1b2498)),N(0x2,_0x4268de)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2fb627=_0x5cb0;(function(_0x545b42,_0x519da9){const _0x4cf8f2=_0x5cb0,_0xfd3b48=_0x545b42();while(!![]){try{const _0x5edaae=-parseInt(_0x4cf8f2(0xb1))/0x1+parseInt(_0x4cf8f2(0xaf))/0x2*(parseInt(_0x4cf8f2(0xd9))/0x3)+-parseInt(_0x4cf8f2(0x9e))/0x4*(parseInt(_0x4cf8f2(0x7f))/0x5)+-parseInt(_0x4cf8f2(0x76))/0x6*(parseInt(_0x4cf8f2(0xcc))/0x7)+parseInt(_0x4cf8f2(0xa3))/0x8*(parseInt(_0x4cf8f2(0xcd))/0x9)+parseInt(_0x4cf8f2(0xba))/0xa*(-parseInt(_0x4cf8f2(0x99))/0xb)+parseInt(_0x4cf8f2(0xcf))/0xc;if(_0x5edaae===_0x519da9)break;else _0xfd3b48['push'](_0xfd3b48['shift']());}catch(_0x23a41c){_0xfd3b48['push'](_0xfd3b48['shift']());}}}(_0x582b,0xeecb5));function _0x582b(){const _0x23932c=['_initDataSource','body','Delete','175AbsMhM','3663rTKSXL','/list','41250252voVfJs','getUser','parse','Edit','subscribe','length','root','pipe','Solve','_sessionService','1821UDBtiq','_configService','map','content','_commentService','178986bFAKzE','ref','solved','requireSession','getOwnPropertyDescriptor','error','syncUpdateMutationToColla','forEach','thread-comment-data-source.config','5470NmtFlt','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','COMMENT','addComment','add','Unknown','/add','commentUpdate$','symbol','rangeId','stringify','users','rangeType','_initUserSync','getComment','filter','addUser','dataSource','disposeWithMe','find','slice','_threadCommentDataSource','delete','threadId','_threadCommentDataSourceService','2629BDIgkn','replyId','comment','code','_injector','4076JnzUkr','Solved','unitId','_init','getMemberID','26944bLHBzA','resolveComment','updateComment','userId','deleteComment','format','userID','UNRECOGNIZED','customRanges','_userService','YYYY/MM/DD\x20HH:mm','get','2366FLpeRC','/universer-api/comment/unit/','1392575jQsllM','UNIVER_UNKNOWN','createTimestamp','type','post','_config','getUnit','_threadCommentModel','personId','54190FsoRCw','user','pluginName','OpenOrReOpen','listComments','/solved','setConfig','/universer-api/user/list','saveCommentToSnapshot','/edit','payload','size','_httpService','replies','Reply'];_0x582b=function(){return _0x23932c;};return _0x582b();}import{CommentService as _0x331514,CollaborationSessionService as _0x7f4081,UniverCollaborationClientPlugin as _0x30dfaf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x634f96}from'@univerjs-pro/license';import{dayjs as _0x50be2f,UserManagerService as _0x15993b,Inject as _0x42c03f,Injector as _0x5f5add,Disposable as _0x39d51c,CustomRangeType as _0x34930a,UniverInstanceType as _0x516719,DependentOn as _0x5b97c0,IConfigService as _0x553ed8,Plugin as _0x452db7,merge as _0xe32879}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c9c4f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x95de07,IThreadCommentDataSourceService as _0x2a0f84}from'@univerjs/thread-comment';import{bufferTime as _0x1b7798}from'rxjs';import{HTTPService as _0x5154de}from'@univerjs/network';const W=_0x2fb627(0x80);var I=(_0x4f9fb0=>(_0x4f9fb0[_0x4f9fb0[_0x2fb627(0xbd)]=0x0]=_0x2fb627(0xbd),_0x4f9fb0[_0x4f9fb0[_0x2fb627(0x9f)]=0x1]='Solved',_0x4f9fb0[_0x4f9fb0[_0x2fb627(0xaa)]=-0x1]=_0x2fb627(0xaa),_0x4f9fb0))(I||{}),v=(_0xb4a9c9=>(_0xb4a9c9[_0xb4a9c9[_0x2fb627(0x85)]=0x0]=_0x2fb627(0x85),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0x81)]=0x1]='Add',_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xc8)]=0x2]='Reply',_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xd2)]=0x3]=_0x2fb627(0xd2),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xcb)]=0x4]=_0x2fb627(0xcb),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xd7)]=0x5]=_0x2fb627(0xd7),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xaa)]=-0x1]=_0x2fb627(0xaa),_0xb4a9c9))(v||{});const y=_0x58a475=>_0x50be2f(new Date(+_0x58a475))[_0x2fb627(0xa8)](_0x2fb627(0xad)),B=async(_0x19c7fd,_0xb7da9)=>{const _0xec88ef=_0x2fb627,_0xab3be1=_0x19c7fd['get'](_0x15993b),_0x40c3e6=_0x19c7fd[_0xec88ef(0xae)](_0x5154de);_0xb7da9[_0xec88ef(0x7d)](_0x565f64=>{const _0x37dec6=_0xec88ef;_0xab3be1[_0x37dec6(0xd0)](_0x565f64)&&_0xb7da9[_0x37dec6(0x96)](_0x565f64);}),_0xb7da9[_0xec88ef(0xc5)]&&(await _0x40c3e6[_0xec88ef(0xae)](_0xec88ef(0xc1),{'params':{'userIDs':[..._0xb7da9]}}))[_0xec88ef(0xca)][_0xec88ef(0x8b)]['forEach'](_0x1a2238=>{_0x1a2238&&_0xab3be1['addUser'](_0x1a2238);});};var K=Object[_0x2fb627(0x7a)],V=(_0x4d7687,_0x546eaf,_0x3bf1ef,_0x1a0dff)=>{const _0x552857=_0x2fb627;for(var _0x2c1a0f=_0x1a0dff>0x1?void 0x0:_0x1a0dff?K(_0x546eaf,_0x3bf1ef):_0x546eaf,_0x37c2d2=_0x4d7687[_0x552857(0xd4)]-0x1,_0x467d42;_0x37c2d2>=0x0;_0x37c2d2--)(_0x467d42=_0x4d7687[_0x37c2d2])&&(_0x2c1a0f=_0x467d42(_0x2c1a0f)||_0x2c1a0f);return _0x2c1a0f;},p=(_0x32981,_0x37b987)=>(_0x517bd5,_0x44c422)=>_0x37b987(_0x517bd5,_0x44c422,_0x32981);let _=class extends _0x39d51c{constructor(_0x46a704,_0x4f5ea8,_0x586d9e,_0x5fcf7d){const _0x19390=_0x2fb627;super(),this[_0x19390(0x75)]=_0x46a704,this[_0x19390(0xb8)]=_0x4f5ea8,this['_userService']=_0x586d9e,this[_0x19390(0x9d)]=_0x5fcf7d,this[_0x19390(0xa1)](),this[_0x19390(0x8d)]();}[_0x2fb627(0x8d)](){const _0x22f95a=_0x2fb627;this[_0x22f95a(0x92)](this['_threadCommentModel'][_0x22f95a(0x87)][_0x22f95a(0xd6)](_0x1b7798(0x10))[_0x22f95a(0xd3)](_0x413f9b=>{const _0x52015d=new Set();_0x413f9b['forEach'](_0x118db1=>{const _0x33472c=_0x5cb0;switch(_0x118db1['type']){case _0x33472c(0x84):{const _0x271f79=_0x118db1[_0x33472c(0xc4)][_0x33472c(0xb9)];_0x52015d['add'](_0x271f79);break;}}}),B(this['_injector'],_0x52015d);}));}['_init'](){const _0x273cf3=_0x2fb627;this['disposeWithMe'](this[_0x273cf3(0x75)][_0x273cf3(0x87)][_0x273cf3(0xd3)](async _0x22934b=>{const _0x3870a8=_0x273cf3;var _0x464534,_0x29301a,_0x1f242d,_0x2f5812;const _0x36e75e=(_0x464534=this['_threadCommentModel'][_0x3870a8(0xb7)](_0x22934b[_0x3870a8(0xa0)])[_0x3870a8(0x93)](_0x269afd=>_0x269afd[_0x3870a8(0x97)]===_0x22934b['threadId']))==null?void 0x0:_0x464534[_0x3870a8(0xd5)];if(!_0x36e75e)return;const {unitId:_0x46afea,subUnitId:_0x55e79c}=_0x36e75e;switch(_0x22934b[_0x3870a8(0xbb)]&&this[_0x3870a8(0xac)]['addUser'](_0x22934b['user']),_0x22934b[_0x3870a8(0xb4)]){case v[_0x3870a8(0x81)]:break;case v[_0x3870a8(0xc8)]:{this['_threadCommentModel'][_0x3870a8(0x83)](_0x46afea,_0x55e79c,{'unitId':_0x46afea,'subUnitId':_0x55e79c,'ref':'','id':_0x22934b[_0x3870a8(0x9a)],'dT':y(+_0x22934b[_0x3870a8(0xb3)]),'threadId':_0x22934b['threadId'],'personId':(_0x1f242d=(_0x29301a=_0x22934b[_0x3870a8(0xbb)])==null?void 0x0:_0x29301a['userID'])!=null?_0x1f242d:_0x22934b['userId'],'text':JSON[_0x3870a8(0xd1)](_0x22934b[_0x3870a8(0x74)]),'parentId':_0x36e75e['id']});break;}case v[_0x3870a8(0xcb)]:{const _0x2a038a=this[_0x3870a8(0xb8)][_0x3870a8(0x8e)](_0x46afea,_0x55e79c,_0x22934b['replyId']);_0x2a038a&&_0x2a038a['parentId']&&this[_0x3870a8(0xb8)]['deleteComment'](_0x46afea,_0x55e79c,_0x22934b['replyId']);break;}case v[_0x3870a8(0xd2)]:{this[_0x3870a8(0xb8)][_0x3870a8(0xa5)](_0x46afea,_0x55e79c,{'commentId':_0x22934b[_0x3870a8(0x9a)],'text':JSON[_0x3870a8(0xd1)](_0x22934b[_0x3870a8(0x74)])});break;}case v[_0x3870a8(0xd7)]:{const _0x1ec12e=(_0x2f5812=this[_0x3870a8(0xb8)][_0x3870a8(0xb7)](_0x22934b[_0x3870a8(0xa0)])['find'](_0x42989d=>_0x42989d[_0x3870a8(0x97)]===_0x22934b[_0x3870a8(0x97)]))==null?void 0x0:_0x2f5812[_0x3870a8(0xd5)];_0x1ec12e&&this['_threadCommentModel'][_0x3870a8(0xa4)](_0x46afea,_0x55e79c,_0x1ec12e['id'],_0x22934b[_0x3870a8(0x78)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x42c03f(_0x331514)),p(0x1,_0x42c03f(_0x95de07)),p(0x2,_0x42c03f(_0x15993b)),p(0x3,_0x42c03f(_0x5f5add))],_);const z=_0x2fb627(0x7e),O={};var k=Object[_0x2fb627(0x7a)],Q=(_0xb82bc5,_0x5c8fcf,_0x3d11e2,_0x2853e0)=>{const _0x4ad437=_0x2fb627;for(var _0xc17ac1=_0x2853e0>0x1?void 0x0:_0x2853e0?k(_0x5c8fcf,_0x3d11e2):_0x5c8fcf,_0x15f89a=_0xb82bc5[_0x4ad437(0xd4)]-0x1,_0x32846f;_0x15f89a>=0x0;_0x15f89a--)(_0x32846f=_0xb82bc5[_0x15f89a])&&(_0xc17ac1=_0x32846f(_0xc17ac1)||_0xc17ac1);return _0xc17ac1;},b=(_0x244d04,_0x318ff1)=>(_0xad5217,_0x24547c)=>_0x318ff1(_0xad5217,_0x24547c,_0x244d04);function X(_0x243440,_0x389fe7){const _0x17f5b8=_0x2fb627,_0x861cfb=_0x243440['replies'][0x0];return{..._0x389fe7,'id':_0x861cfb['replyId'],'resolved':_0x243440['solved']===0x1,'dT':y(_0x861cfb[_0x17f5b8(0xb3)]),'personId':_0x861cfb[_0x17f5b8(0xa6)],'threadId':_0x861cfb['threadId']};}function ee(_0x173c74,_0xc4b487,_0x1be5b4){const _0x3b4c43=_0x2fb627;var _0x101df4,_0xc7011c;if(((_0xc7011c=(_0x101df4=_0x173c74==null?void 0x0:_0x173c74['replies'])==null?void 0x0:_0x101df4[_0x3b4c43(0xd4)])!=null?_0xc7011c:0x0)>0x0){const _0x3c5b43=(_0x2e1708,_0x1c4692)=>({'id':_0x2e1708['replyId'],'threadId':_0x2e1708[_0x3b4c43(0x97)],'dT':y(_0x2e1708[_0x3b4c43(0xb3)]),'personId':_0x2e1708[_0x3b4c43(0xa6)],'resolved':_0x173c74[_0x3b4c43(0x78)]===I[_0x3b4c43(0x9f)],'unitId':_0xc4b487,'subUnitId':_0x1be5b4,'text':JSON[_0x3b4c43(0xd1)](_0x2e1708[_0x3b4c43(0x74)]),'parentId':_0x1c4692}),_0x3eb89e=_0x3c5b43(_0x173c74['replies'][0x0]);return{..._0x3eb89e,'children':_0x173c74[_0x3b4c43(0xc7)][_0x3b4c43(0x94)](0x1)[_0x3b4c43(0x73)](_0x18e67a=>_0x3c5b43(_0x18e67a,_0x3eb89e['id']))};}return null;}let S=class{constructor(_0x28e8f6,_0x9ae3b7,_0x3b5371){const _0x53bfb5=_0x2fb627;this[_0x53bfb5(0xc6)]=_0x28e8f6,this[_0x53bfb5(0xac)]=_0x9ae3b7,this[_0x53bfb5(0xd8)]=_0x3b5371;}async['addComment'](_0x102fcd){const _0x48bd5a=_0x2fb627;var _0xae6801,_0x53387a;const {parentId:_0x50b467,unitId:_0xcdc44b,text:_0x12039c,threadId:_0x5837ff}=_0x102fcd,_0x3d0e82=(_0x53387a=(_0xae6801=_0x12039c[_0x48bd5a(0xab)])==null?void 0x0:_0xae6801[_0x48bd5a(0x8f)](_0x4c0169=>_0x4c0169[_0x48bd5a(0x8c)]===_0x34930a[_0x48bd5a(0x82)])['map'](_0x36843d=>_0x36843d[_0x48bd5a(0x89)]))!=null?_0x53387a:[],_0x2eac4b=JSON['stringify'](_0x12039c),_0x483a83=(await this['_sessionService'][_0x48bd5a(0x79)](_0xcdc44b))[_0x48bd5a(0xa2)]();if(_0x50b467){const _0x299559={'memberId':_0x483a83,'unitId':_0xcdc44b,'content':_0x2eac4b,'mention':_0x3d0e82,'threadId':_0x5837ff},_0x496ad7=(await this[_0x48bd5a(0xc6)][_0x48bd5a(0xb5)](_0x48bd5a(0xb0)+_0xcdc44b+'/reply',{'body':_0x299559}))[_0x48bd5a(0xca)]['reply'];return{..._0x102fcd,'id':_0x496ad7[_0x48bd5a(0x9a)],'dT':_0x50be2f(+_0x496ad7[_0x48bd5a(0xb3)])[_0x48bd5a(0xa8)](_0x48bd5a(0xad)),'personId':_0x496ad7[_0x48bd5a(0xa6)]};}else{const _0x2933c1={'memberId':_0x483a83,'unitId':_0xcdc44b,'content':_0x2eac4b,'mention':_0x3d0e82},_0x25f86c=await this[_0x48bd5a(0xc6)]['post'](_0x48bd5a(0xb0)+_0xcdc44b+_0x48bd5a(0x86),{'body':_0x2933c1});return X(_0x25f86c[_0x48bd5a(0xca)][_0x48bd5a(0x9b)],_0x102fcd);}}async[_0x2fb627(0xa5)](_0x3b397e){const _0x20e7af=_0x2fb627;var _0x355f21,_0x1cf580;const {text:_0x12b115,unitId:_0x2002c6}=_0x3b397e,_0x19bded=(_0x1cf580=(_0x355f21=_0x12b115['customRanges'])==null?void 0x0:_0x355f21[_0x20e7af(0x8f)](_0x171097=>_0x171097[_0x20e7af(0x8c)]===_0x34930a[_0x20e7af(0x82)])['map'](_0x5d2ed0=>_0x5d2ed0['rangeId']))!=null?_0x1cf580:[],_0x1c645c=JSON[_0x20e7af(0x8a)](_0x12b115),_0x1d492b=_0x3b397e['threadId'],_0x2b670f=_0x3b397e['id'],_0x4266d6={'memberId':(await this[_0x20e7af(0xd8)][_0x20e7af(0x79)](_0x2002c6))['getMemberID'](),'unitId':_0x2002c6,'threadId':_0x1d492b,'mention':_0x19bded,'content':_0x1c645c,'replyId':_0x2b670f},_0x9c4dd3=await this[_0x20e7af(0xc6)][_0x20e7af(0xb5)](_0x20e7af(0xb0)+_0x2002c6+_0x20e7af(0xc3),{'body':_0x4266d6});return!_0x9c4dd3[_0x20e7af(0xca)][_0x20e7af(0x7b)]||_0x9c4dd3[_0x20e7af(0xca)][_0x20e7af(0x7b)][_0x20e7af(0x9c)]===0x1;}async['resolveComment'](_0x4a2393){const _0x45fd2d=_0x2fb627,{unitId:_0x358a7e}=_0x4a2393,_0x39f9f1=_0x4a2393[_0x45fd2d(0x97)],_0x48896b={'memberId':this['_userService']['getCurrentUser']()[_0x45fd2d(0xa9)],'unitId':_0x358a7e,'threadId':_0x39f9f1,'solved':_0x4a2393['resolved']?I['Solved']:I[_0x45fd2d(0xbd)]},_0x2a7d86=await this['_httpService'][_0x45fd2d(0xb5)](_0x45fd2d(0xb0)+_0x358a7e+_0x45fd2d(0xbf),{'body':_0x48896b});return!_0x2a7d86[_0x45fd2d(0xca)][_0x45fd2d(0x7b)]||_0x2a7d86[_0x45fd2d(0xca)][_0x45fd2d(0x7b)][_0x45fd2d(0x9c)]===0x1;}async[_0x2fb627(0xa7)](_0x39d236,_0x40ca8f,_0x53ad4e,_0x3a1052){const _0x545b50=_0x2fb627,_0x1523a2={'memberId':(await this[_0x545b50(0xd8)][_0x545b50(0x79)](_0x39d236))[_0x545b50(0xa2)](),'threadId':_0x53ad4e,'replyId':_0x3a1052,'unitId':_0x39d236},_0x3e00a7=await this[_0x545b50(0xc6)][_0x545b50(0xb5)](_0x545b50(0xb0)+_0x39d236+'/delete',{'body':_0x1523a2});return!_0x3e00a7[_0x545b50(0xca)][_0x545b50(0x7b)]||_0x3e00a7[_0x545b50(0xca)]['error'][_0x545b50(0x9c)]===0x1;}async[_0x2fb627(0xbe)](_0x488bd6,_0x39294e,_0x2e94bf){const _0x326b56=_0x2fb627,_0x59d90d={'unitId':_0x488bd6,'threadId':_0x2e94bf},_0x59ba31=await this['_httpService'][_0x326b56(0xb5)](_0x326b56(0xb0)+_0x488bd6+_0x326b56(0xce),{'body':_0x59d90d}),_0x3fae96=_0x2e94bf[_0x326b56(0x73)](_0x6ab117=>ee(_0x59ba31[_0x326b56(0xca)]['comments'][_0x6ab117],_0x488bd6,_0x39294e))[_0x326b56(0x8f)](Boolean);return Object['values'](_0x59ba31[_0x326b56(0xca)]['users'])['forEach'](_0x227182=>{const _0x3116ce=_0x326b56;this['_userService'][_0x3116ce(0x90)](_0x227182);}),_0x3fae96;}[_0x2fb627(0xc2)](_0x3ea70){const _0x16482e=_0x2fb627;return{'id':_0x3ea70['id'],'threadId':_0x3ea70[_0x16482e(0x97)],'ref':_0x3ea70[_0x16482e(0x77)]};}};function _0x5cb0(_0x360dbe,_0x1bda09){_0x360dbe=_0x360dbe-0x73;const _0x582b67=_0x582b();let _0x5cb0ee=_0x582b67[_0x360dbe];return _0x5cb0ee;}S=Q([b(0x0,_0x42c03f(_0x5154de)),b(0x1,_0x42c03f(_0x15993b)),b(0x2,_0x42c03f(_0x7f4081))],S);var re=Object[_0x2fb627(0x7a)],te=(_0x254bc9,_0x50587a,_0x4f7936,_0x27e136)=>{const _0x3fad4a=_0x2fb627;for(var _0x560536=_0x27e136>0x1?void 0x0:_0x27e136?re(_0x50587a,_0x4f7936):_0x50587a,_0x2a33aa=_0x254bc9[_0x3fad4a(0xd4)]-0x1,_0xb4d238;_0x2a33aa>=0x0;_0x2a33aa--)(_0xb4d238=_0x254bc9[_0x2a33aa])&&(_0x560536=_0xb4d238(_0x560536)||_0x560536);return _0x560536;},M=(_0x55bc1a,_0xc8a9aa)=>(_0x14abfd,_0x11b824)=>_0xc8a9aa(_0x14abfd,_0x11b824,_0x55bc1a);let f=class extends _0x39d51c{constructor(_0x522e2b,_0x461d60){const _0x531f63=_0x2fb627;super(),this[_0x531f63(0x98)]=_0x522e2b,this[_0x531f63(0x95)]=_0x461d60,this[_0x531f63(0xc9)]();}[_0x2fb627(0xc9)](){const _0x3c2cc4=_0x2fb627;this[_0x3c2cc4(0x98)][_0x3c2cc4(0x91)]=this['_threadCommentDataSource'],this[_0x3c2cc4(0x98)][_0x3c2cc4(0x7c)]=!0x1;}};f=te([M(0x0,_0x2a0f84),M(0x1,_0x42c03f(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5c3097,_0x55b527,_0x588ed0)=>_0x55b527 in _0x5c3097?se(_0x5c3097,_0x55b527,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x588ed0}):_0x5c3097[_0x55b527]=_0x588ed0,ie=(_0x988407,_0x22c3a1,_0x2122b6,_0x36597b)=>{for(var _0x51aac6=_0x36597b>0x1?void 0x0:_0x36597b?oe(_0x22c3a1,_0x2122b6):_0x22c3a1,_0x361489=_0x988407['length']-0x1,_0x346972;_0x361489>=0x0;_0x361489--)(_0x346972=_0x988407[_0x361489])&&(_0x51aac6=_0x346972(_0x51aac6)||_0x51aac6);return _0x51aac6;},N=(_0x52180c,_0x2aeec8)=>(_0x493c0e,_0x15214e)=>_0x2aeec8(_0x493c0e,_0x15214e,_0x52180c),$=(_0xf239b2,_0x13169a,_0x365154)=>ne(_0xf239b2,typeof _0x13169a!=_0x2fb627(0x88)?_0x13169a+'':_0x13169a,_0x365154);let g=class extends _0x452db7{constructor(_0x5efb16=O,_0x4a01d,_0x5a9adc){const _0x58db6d=_0x2fb627;super(),this[_0x58db6d(0xb6)]=_0x5efb16,this['_injector']=_0x4a01d,this[_0x58db6d(0xda)]=_0x5a9adc;const {..._0x152886}=_0xe32879({},O,this[_0x58db6d(0xb6)]);this[_0x58db6d(0xda)][_0x58db6d(0xc0)](z,_0x152886);}['onStarting'](){const _0x475251=_0x2fb627;[[S],[f],[_]][_0x475251(0x7d)](_0x225ac8=>{const _0x393a15=_0x475251;this[_0x393a15(0x9d)][_0x393a15(0x84)](_0x225ac8);});}['onReady'](){const _0x2ea09e=_0x2fb627;this[_0x2ea09e(0x9d)]['get'](f),this[_0x2ea09e(0x9d)][_0x2ea09e(0xae)](_);}};$(g,_0x2fb627(0xbc),W),$(g,_0x2fb627(0xb4),_0x516719[_0x2fb627(0xb2)]),g=ie([_0x5b97c0(_0x4c9c4f,_0x30dfaf,_0x634f96),N(0x1,_0x42c03f(_0x5f5add)),N(0x2,_0x553ed8)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x54c2e1=_0x543b;(function(_0x4f7e3f,_0x41986b){const _0x4a5cb4=_0x543b,_0x14b638=_0x4f7e3f();while(!![]){try{const _0x3107e=-parseInt(_0x4a5cb4(0x133))/0x1+parseInt(_0x4a5cb4(0x171))/0x2+-parseInt(_0x4a5cb4(0x140))/0x3*(-parseInt(_0x4a5cb4(0x17c))/0x4)+parseInt(_0x4a5cb4(0x139))/0x5*(parseInt(_0x4a5cb4(0x135))/0x6)+-parseInt(_0x4a5cb4(0x143))/0x7+parseInt(_0x4a5cb4(0x188))/0x8+-parseInt(_0x4a5cb4(0x16b))/0x9;if(_0x3107e===_0x41986b)break;else _0x14b638['push'](_0x14b638['shift']());}catch(_0x1bb1b7){_0x14b638['push'](_0x14b638['shift']());}}}(_0x5f3f,0x9eed9));import{CommentService as _0x106d32,CollaborationSessionService as _0x435820,UniverCollaborationClientPlugin as _0x4a471d}from'@univerjs-pro/collaboration-client';function _0x543b(_0xa9b0a1,_0x3a45b9){_0xa9b0a1=_0xa9b0a1-0x12d;const _0x5f3f4a=_0x5f3f();let _0x543b8a=_0x5f3f4a[_0xa9b0a1];return _0x543b8a;}import{UniverLicensePlugin as _0x319e70}from'@univerjs-pro/license';import{dayjs as _0x1cb702,UserManagerService as _0x79f5f8,Inject as _0x32a39f,Injector as _0x1b2498,Disposable as _0xf64d55,CustomRangeType as _0x28fd3d,UniverInstanceType as _0x154615,DependentOn as _0x5887db,IConfigService as _0x4268de,Plugin as _0x4e8090,merge as _0x325500}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x28dbe4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x118a66,IThreadCommentDataSourceService as _0x1c9b0a}from'@univerjs/thread-comment';import{bufferTime as _0xf247e6}from'rxjs';import{HTTPService as _0x43ff1a}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x43eb1d=>(_0x43eb1d[_0x43eb1d[_0x54c2e1(0x14a)]=0x0]=_0x54c2e1(0x14a),_0x43eb1d[_0x43eb1d[_0x54c2e1(0x152)]=0x1]='Solved',_0x43eb1d[_0x43eb1d[_0x54c2e1(0x146)]=-0x1]=_0x54c2e1(0x146),_0x43eb1d))(I||{}),v=(_0x373a64=>(_0x373a64[_0x373a64['Unknown']=0x0]=_0x54c2e1(0x17e),_0x373a64[_0x373a64[_0x54c2e1(0x14e)]=0x1]=_0x54c2e1(0x14e),_0x373a64[_0x373a64['Reply']=0x2]=_0x54c2e1(0x186),_0x373a64[_0x373a64[_0x54c2e1(0x160)]=0x3]=_0x54c2e1(0x160),_0x373a64[_0x373a64['Delete']=0x4]='Delete',_0x373a64[_0x373a64[_0x54c2e1(0x176)]=0x5]=_0x54c2e1(0x176),_0x373a64[_0x373a64[_0x54c2e1(0x146)]=-0x1]='UNRECOGNIZED',_0x373a64))(v||{});const y=_0x9f4a0f=>_0x1cb702(new Date(+_0x9f4a0f))[_0x54c2e1(0x169)](_0x54c2e1(0x159)),B=async(_0x4a4bc9,_0x4033ed)=>{const _0x48e02e=_0x54c2e1,_0x17f072=_0x4a4bc9[_0x48e02e(0x149)](_0x79f5f8),_0x16a6ed=_0x4a4bc9[_0x48e02e(0x149)](_0x43ff1a);_0x4033ed['forEach'](_0x5a1976=>{const _0x265223=_0x48e02e;_0x17f072[_0x265223(0x13b)](_0x5a1976)&&_0x4033ed[_0x265223(0x165)](_0x5a1976);}),_0x4033ed['size']&&(await _0x16a6ed[_0x48e02e(0x149)](_0x48e02e(0x142),{'params':{'userIDs':[..._0x4033ed]}}))[_0x48e02e(0x162)][_0x48e02e(0x172)][_0x48e02e(0x189)](_0x5afa4b=>{const _0x195717=_0x48e02e;_0x5afa4b&&_0x17f072[_0x195717(0x148)](_0x5afa4b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x32df73,_0x30acd3,_0x5d1962,_0x4d1171)=>{const _0x4cd9c9=_0x54c2e1;for(var _0x445063=_0x4d1171>0x1?void 0x0:_0x4d1171?K(_0x30acd3,_0x5d1962):_0x30acd3,_0x219b71=_0x32df73[_0x4cd9c9(0x13c)]-0x1,_0x16ab1c;_0x219b71>=0x0;_0x219b71--)(_0x16ab1c=_0x32df73[_0x219b71])&&(_0x445063=_0x16ab1c(_0x445063)||_0x445063);return _0x445063;},p=(_0x20b592,_0x58d8ed)=>(_0x1222b,_0x116bbe)=>_0x58d8ed(_0x1222b,_0x116bbe,_0x20b592);let _=class extends _0xf64d55{constructor(_0x571abc,_0x192abc,_0x3088a,_0x41ecab){const _0x3bc288=_0x54c2e1;super(),this['_commentService']=_0x571abc,this[_0x3bc288(0x173)]=_0x192abc,this['_userService']=_0x3088a,this['_injector']=_0x41ecab,this[_0x3bc288(0x191)](),this[_0x3bc288(0x16e)]();}[_0x54c2e1(0x16e)](){const _0x483bf8=_0x54c2e1;this['disposeWithMe'](this[_0x483bf8(0x173)][_0x483bf8(0x180)][_0x483bf8(0x190)](_0xf247e6(0x10))[_0x483bf8(0x187)](_0x343b00=>{const _0x144c63=_0x483bf8,_0x10cc92=new Set();_0x343b00[_0x144c63(0x189)](_0x43a2a5=>{const _0x1f0600=_0x144c63;switch(_0x43a2a5[_0x1f0600(0x16d)]){case _0x1f0600(0x16f):{const _0x409d37=_0x43a2a5[_0x1f0600(0x167)][_0x1f0600(0x144)];_0x10cc92[_0x1f0600(0x16f)](_0x409d37);break;}}}),B(this[_0x144c63(0x18d)],_0x10cc92);}));}[_0x54c2e1(0x191)](){const _0x3de2f7=_0x54c2e1;this['disposeWithMe'](this[_0x3de2f7(0x13e)]['commentUpdate$']['subscribe'](async _0x606312=>{const _0x26ee60=_0x3de2f7;var _0x33f970,_0x45269f,_0x493d63,_0x2a5bd8;const _0x4b80c7=(_0x33f970=this[_0x26ee60(0x173)][_0x26ee60(0x131)](_0x606312['unitId'])[_0x26ee60(0x161)](_0x3a3461=>_0x3a3461['threadId']===_0x606312[_0x26ee60(0x16c)]))==null?void 0x0:_0x33f970[_0x26ee60(0x147)];if(!_0x4b80c7)return;const {unitId:_0x35297f,subUnitId:_0x5f5691}=_0x4b80c7;switch(_0x606312[_0x26ee60(0x166)]&&this[_0x26ee60(0x155)]['addUser'](_0x606312[_0x26ee60(0x166)]),_0x606312[_0x26ee60(0x16d)]){case v['Add']:break;case v[_0x26ee60(0x186)]:{this[_0x26ee60(0x173)][_0x26ee60(0x158)](_0x35297f,_0x5f5691,{'unitId':_0x35297f,'subUnitId':_0x5f5691,'ref':'','id':_0x606312[_0x26ee60(0x17b)],'dT':y(+_0x606312[_0x26ee60(0x137)]),'threadId':_0x606312['threadId'],'personId':(_0x493d63=(_0x45269f=_0x606312[_0x26ee60(0x166)])==null?void 0x0:_0x45269f[_0x26ee60(0x18f)])!=null?_0x493d63:_0x606312[_0x26ee60(0x14c)],'text':JSON[_0x26ee60(0x150)](_0x606312[_0x26ee60(0x18b)]),'parentId':_0x4b80c7['id']});break;}case v[_0x26ee60(0x15c)]:{const _0x2733c3=this[_0x26ee60(0x173)][_0x26ee60(0x14d)](_0x35297f,_0x5f5691,_0x606312[_0x26ee60(0x17b)]);_0x2733c3&&_0x2733c3[_0x26ee60(0x15b)]&&this[_0x26ee60(0x173)][_0x26ee60(0x13a)](_0x35297f,_0x5f5691,_0x606312[_0x26ee60(0x17b)]);break;}case v[_0x26ee60(0x160)]:{this['_threadCommentModel'][_0x26ee60(0x168)](_0x35297f,_0x5f5691,{'commentId':_0x606312[_0x26ee60(0x17b)],'text':JSON[_0x26ee60(0x150)](_0x606312['content'])});break;}case v['Solve']:{const _0x5b7097=(_0x2a5bd8=this[_0x26ee60(0x173)][_0x26ee60(0x131)](_0x606312['unitId'])['find'](_0x2dfd44=>_0x2dfd44[_0x26ee60(0x16c)]===_0x606312[_0x26ee60(0x16c)]))==null?void 0x0:_0x2a5bd8[_0x26ee60(0x147)];_0x5b7097&&this[_0x26ee60(0x173)][_0x26ee60(0x18e)](_0x35297f,_0x5f5691,_0x5b7097['id'],_0x606312[_0x26ee60(0x138)]===I[_0x26ee60(0x152)]);break;}}}));}};_=V([p(0x0,_0x32a39f(_0x106d32)),p(0x1,_0x32a39f(_0x118a66)),p(0x2,_0x32a39f(_0x79f5f8)),p(0x3,_0x32a39f(_0x1b2498))],_);const z=_0x54c2e1(0x157),O={};var k=Object[_0x54c2e1(0x174)],Q=(_0x43d48b,_0xc420c8,_0x4dad32,_0x5011f1)=>{const _0x50ef9f=_0x54c2e1;for(var _0x72e235=_0x5011f1>0x1?void 0x0:_0x5011f1?k(_0xc420c8,_0x4dad32):_0xc420c8,_0x5ad328=_0x43d48b[_0x50ef9f(0x13c)]-0x1,_0x8720c2;_0x5ad328>=0x0;_0x5ad328--)(_0x8720c2=_0x43d48b[_0x5ad328])&&(_0x72e235=_0x8720c2(_0x72e235)||_0x72e235);return _0x72e235;},b=(_0x5e3800,_0x5ddac4)=>(_0xbcbe03,_0x502fa1)=>_0x5ddac4(_0xbcbe03,_0x502fa1,_0x5e3800);function X(_0x4e7b62,_0x4a094d){const _0x2924e7=_0x54c2e1,_0x48582e=_0x4e7b62['replies'][0x0];return{..._0x4a094d,'id':_0x48582e[_0x2924e7(0x17b)],'resolved':_0x4e7b62[_0x2924e7(0x138)]===0x1,'dT':y(_0x48582e[_0x2924e7(0x137)]),'personId':_0x48582e[_0x2924e7(0x14c)],'threadId':_0x48582e[_0x2924e7(0x16c)]};}function ee(_0x55adc0,_0x4eb1bf,_0x5b80a9){const _0x376837=_0x54c2e1;var _0x4187ba,_0xc64485;if(((_0xc64485=(_0x4187ba=_0x55adc0==null?void 0x0:_0x55adc0[_0x376837(0x153)])==null?void 0x0:_0x4187ba[_0x376837(0x13c)])!=null?_0xc64485:0x0)>0x0){const _0x4b60ee=(_0x2a6697,_0x33390c)=>({'id':_0x2a6697[_0x376837(0x17b)],'threadId':_0x2a6697[_0x376837(0x16c)],'dT':y(_0x2a6697[_0x376837(0x137)]),'personId':_0x2a6697[_0x376837(0x14c)],'resolved':_0x55adc0['solved']===I[_0x376837(0x152)],'unitId':_0x4eb1bf,'subUnitId':_0x5b80a9,'text':JSON[_0x376837(0x150)](_0x2a6697[_0x376837(0x18b)]),'parentId':_0x33390c}),_0x524a73=_0x4b60ee(_0x55adc0[_0x376837(0x153)][0x0]);return{..._0x524a73,'children':_0x55adc0[_0x376837(0x153)][_0x376837(0x15d)](0x1)[_0x376837(0x15a)](_0x1dd419=>_0x4b60ee(_0x1dd419,_0x524a73['id']))};}return null;}let S=class{constructor(_0x200a0f,_0x30ea00,_0x47f79a){const _0x3d6211=_0x54c2e1;this[_0x3d6211(0x15e)]=_0x200a0f,this['_userService']=_0x30ea00,this[_0x3d6211(0x15f)]=_0x47f79a;}async[_0x54c2e1(0x158)](_0x1fc770){const _0x4a8365=_0x54c2e1;var _0x23c956,_0x386c2e;const {parentId:_0x31d610,unitId:_0x556f7f,text:_0x1c9bcd,threadId:_0x3b3ee6}=_0x1fc770,_0x3fd56f=(_0x386c2e=(_0x23c956=_0x1c9bcd['customRanges'])==null?void 0x0:_0x23c956[_0x4a8365(0x12f)](_0x379377=>_0x379377['rangeType']===_0x28fd3d[_0x4a8365(0x178)])[_0x4a8365(0x15a)](_0x51a4ee=>_0x51a4ee['rangeId']))!=null?_0x386c2e:[],_0xc5a41e=JSON[_0x4a8365(0x177)](_0x1c9bcd),_0x445d8a=(await this[_0x4a8365(0x15f)][_0x4a8365(0x185)](_0x556f7f))[_0x4a8365(0x14f)]();if(_0x31d610){const _0x462e49={'memberId':_0x445d8a,'unitId':_0x556f7f,'content':_0xc5a41e,'mention':_0x3fd56f,'threadId':_0x3b3ee6},_0x24b1d5=(await this[_0x4a8365(0x15e)][_0x4a8365(0x181)](_0x4a8365(0x182)+_0x556f7f+'/reply',{'body':_0x462e49}))[_0x4a8365(0x162)][_0x4a8365(0x16a)];return{..._0x1fc770,'id':_0x24b1d5[_0x4a8365(0x17b)],'dT':_0x1cb702(+_0x24b1d5[_0x4a8365(0x137)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x24b1d5['userId']};}else{const _0x10f4b4={'memberId':_0x445d8a,'unitId':_0x556f7f,'content':_0xc5a41e,'mention':_0x3fd56f},_0x569ad2=await this[_0x4a8365(0x15e)][_0x4a8365(0x181)](_0x4a8365(0x182)+_0x556f7f+_0x4a8365(0x184),{'body':_0x10f4b4});return X(_0x569ad2[_0x4a8365(0x162)]['comment'],_0x1fc770);}}async[_0x54c2e1(0x168)](_0x5d4df6){const _0x4ff5e0=_0x54c2e1;var _0x592c9a,_0x362221;const {text:_0x430a6b,unitId:_0x52a5d3}=_0x5d4df6,_0x262dc3=(_0x362221=(_0x592c9a=_0x430a6b[_0x4ff5e0(0x179)])==null?void 0x0:_0x592c9a[_0x4ff5e0(0x12f)](_0xb434e2=>_0xb434e2['rangeType']===_0x28fd3d['COMMENT'])[_0x4ff5e0(0x15a)](_0x20aa50=>_0x20aa50[_0x4ff5e0(0x18a)]))!=null?_0x362221:[],_0x4fe966=JSON['stringify'](_0x430a6b),_0x52fba6=_0x5d4df6[_0x4ff5e0(0x16c)],_0x15c9a7=_0x5d4df6['id'],_0x516b1a={'memberId':(await this[_0x4ff5e0(0x15f)]['requireSession'](_0x52a5d3))['getMemberID'](),'unitId':_0x52a5d3,'threadId':_0x52fba6,'mention':_0x262dc3,'content':_0x4fe966,'replyId':_0x15c9a7},_0x1014d1=await this['_httpService'][_0x4ff5e0(0x181)]('/universer-api/comment/unit/'+_0x52a5d3+'/edit',{'body':_0x516b1a});return!_0x1014d1[_0x4ff5e0(0x162)][_0x4ff5e0(0x13f)]||_0x1014d1[_0x4ff5e0(0x162)]['error'][_0x4ff5e0(0x136)]===0x1;}async[_0x54c2e1(0x18e)](_0x1a9b6b){const _0x223897=_0x54c2e1,{unitId:_0x5af528}=_0x1a9b6b,_0x2db10b=_0x1a9b6b[_0x223897(0x16c)],_0x1dde0f={'memberId':this['_userService'][_0x223897(0x14b)]()[_0x223897(0x18f)],'unitId':_0x5af528,'threadId':_0x2db10b,'solved':_0x1a9b6b[_0x223897(0x12e)]?I['Solved']:I['OpenOrReOpen']},_0x1d162a=await this[_0x223897(0x15e)]['post'](_0x223897(0x182)+_0x5af528+_0x223897(0x17f),{'body':_0x1dde0f});return!_0x1d162a['body'][_0x223897(0x13f)]||_0x1d162a[_0x223897(0x162)][_0x223897(0x13f)]['code']===0x1;}async[_0x54c2e1(0x13a)](_0x5c727e,_0xaa241c,_0x17226d,_0x267ea3){const _0xc4af9c=_0x54c2e1,_0x5ea419={'memberId':(await this['_sessionService']['requireSession'](_0x5c727e))[_0xc4af9c(0x14f)](),'threadId':_0x17226d,'replyId':_0x267ea3,'unitId':_0x5c727e},_0x2733df=await this[_0xc4af9c(0x15e)]['post']('/universer-api/comment/unit/'+_0x5c727e+'/delete',{'body':_0x5ea419});return!_0x2733df[_0xc4af9c(0x162)]['error']||_0x2733df[_0xc4af9c(0x162)][_0xc4af9c(0x13f)][_0xc4af9c(0x136)]===0x1;}async[_0x54c2e1(0x130)](_0x4f6787,_0x261bfe,_0x5b5ac4){const _0x1058b4=_0x54c2e1,_0x513205={'unitId':_0x4f6787,'threadId':_0x5b5ac4},_0x4a3bda=await this[_0x1058b4(0x15e)][_0x1058b4(0x181)](_0x1058b4(0x182)+_0x4f6787+_0x1058b4(0x145),{'body':_0x513205}),_0x2b526d=_0x5b5ac4[_0x1058b4(0x15a)](_0x1e6b85=>ee(_0x4a3bda[_0x1058b4(0x162)][_0x1058b4(0x17d)][_0x1e6b85],_0x4f6787,_0x261bfe))[_0x1058b4(0x12f)](Boolean);return Object[_0x1058b4(0x151)](_0x4a3bda[_0x1058b4(0x162)]['users'])['forEach'](_0x19cdf8=>{const _0x230c53=_0x1058b4;this[_0x230c53(0x155)][_0x230c53(0x148)](_0x19cdf8);}),_0x2b526d;}[_0x54c2e1(0x175)](_0x4b0853){const _0x4310d7=_0x54c2e1;return{'id':_0x4b0853['id'],'threadId':_0x4b0853[_0x4310d7(0x16c)],'ref':_0x4b0853['ref']};}};S=Q([b(0x0,_0x32a39f(_0x43ff1a)),b(0x1,_0x32a39f(_0x79f5f8)),b(0x2,_0x32a39f(_0x435820))],S);function _0x5f3f(){const _0x3669da=['126651FZmPLJ','personId','/list','UNRECOGNIZED','root','addUser','get','OpenOrReOpen','getCurrentUser','userId','getComment','Add','getMemberID','parse','values','Solved','replies','_initDataSource','_userService','defineProperty','thread-comment-data-source.config','addComment','YYYY/MM/DD\x20HH:mm','map','parentId','Delete','slice','_httpService','_sessionService','Edit','find','body','syncUpdateMutationToColla','_configService','delete','user','payload','updateComment','format','reply','20536749rCqQzi','threadId','type','_initUserSync','add','symbol','1908808lushHT','users','_threadCommentModel','getOwnPropertyDescriptor','saveCommentToSnapshot','Solve','stringify','COMMENT','customRanges','dataSource','replyId','1239824HAwzPw','comments','Unknown','/solved','commentUpdate$','post','/universer-api/comment/unit/','_threadCommentDataSourceService','/add','requireSession','Reply','subscribe','9725344nwpAzY','forEach','rangeId','content','UNIVER_UNKNOWN','_injector','resolveComment','userID','pipe','_init','_config','resolved','filter','listComments','getUnit','onStarting','417927MXGqUm','_threadCommentDataSource','1524GVAVrp','code','createTimestamp','solved','11395XJwvUc','deleteComment','getUser','length','onReady','_commentService','error','6rComBe','pluginName','/universer-api/user/list'];_0x5f3f=function(){return _0x3669da;};return _0x5f3f();}var re=Object[_0x54c2e1(0x174)],te=(_0x2143b8,_0x17a8c3,_0x49fa0c,_0x404dca)=>{const _0x1e250d=_0x54c2e1;for(var _0xc2cf87=_0x404dca>0x1?void 0x0:_0x404dca?re(_0x17a8c3,_0x49fa0c):_0x17a8c3,_0x4339b4=_0x2143b8[_0x1e250d(0x13c)]-0x1,_0x2ce91a;_0x4339b4>=0x0;_0x4339b4--)(_0x2ce91a=_0x2143b8[_0x4339b4])&&(_0xc2cf87=_0x2ce91a(_0xc2cf87)||_0xc2cf87);return _0xc2cf87;},M=(_0x236c6e,_0x158eb)=>(_0x363c69,_0x19f75c)=>_0x158eb(_0x363c69,_0x19f75c,_0x236c6e);let f=class extends _0xf64d55{constructor(_0x52de6a,_0x120318){const _0x5c7e2f=_0x54c2e1;super(),this[_0x5c7e2f(0x183)]=_0x52de6a,this[_0x5c7e2f(0x134)]=_0x120318,this['_initDataSource']();}[_0x54c2e1(0x154)](){const _0x59cd7d=_0x54c2e1;this[_0x59cd7d(0x183)][_0x59cd7d(0x17a)]=this[_0x59cd7d(0x134)],this['_threadCommentDataSourceService'][_0x59cd7d(0x163)]=!0x1;}};f=te([M(0x0,_0x1c9b0a),M(0x1,_0x32a39f(S))],f);var se=Object[_0x54c2e1(0x156)],oe=Object[_0x54c2e1(0x174)],ne=(_0x2778fe,_0x3f4943,_0x4d7c4a)=>_0x3f4943 in _0x2778fe?se(_0x2778fe,_0x3f4943,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d7c4a}):_0x2778fe[_0x3f4943]=_0x4d7c4a,ie=(_0x3dcb61,_0x144d11,_0x1c3113,_0x409f9f)=>{const _0x323a86=_0x54c2e1;for(var _0x304bea=_0x409f9f>0x1?void 0x0:_0x409f9f?oe(_0x144d11,_0x1c3113):_0x144d11,_0x239e61=_0x3dcb61[_0x323a86(0x13c)]-0x1,_0xd9be4e;_0x239e61>=0x0;_0x239e61--)(_0xd9be4e=_0x3dcb61[_0x239e61])&&(_0x304bea=_0xd9be4e(_0x304bea)||_0x304bea);return _0x304bea;},N=(_0x236b74,_0x632758)=>(_0x43ab0a,_0x87b9ab)=>_0x632758(_0x43ab0a,_0x87b9ab,_0x236b74),$=(_0x3c5142,_0x294a72,_0x19bdd7)=>ne(_0x3c5142,typeof _0x294a72!=_0x54c2e1(0x170)?_0x294a72+'':_0x294a72,_0x19bdd7);let g=class extends _0x4e8090{constructor(_0x39feff=O,_0x4ec327,_0x55d1c7){const _0x49f6ad=_0x54c2e1;super(),this[_0x49f6ad(0x12d)]=_0x39feff,this[_0x49f6ad(0x18d)]=_0x4ec327,this[_0x49f6ad(0x164)]=_0x55d1c7;const {..._0x13503b}=_0x325500({},O,this[_0x49f6ad(0x12d)]);this['_configService']['setConfig'](z,_0x13503b);}[_0x54c2e1(0x132)](){const _0x5293db=_0x54c2e1;[[S],[f],[_]][_0x5293db(0x189)](_0x31b31a=>{const _0x1a0b5b=_0x5293db;this[_0x1a0b5b(0x18d)]['add'](_0x31b31a);});}[_0x54c2e1(0x13d)](){const _0x57395c=_0x54c2e1;this[_0x57395c(0x18d)][_0x57395c(0x149)](f),this[_0x57395c(0x18d)][_0x57395c(0x149)](_);}};$(g,_0x54c2e1(0x141),W),$(g,_0x54c2e1(0x16d),_0x154615[_0x54c2e1(0x18c)]),g=ie([_0x5887db(_0x28dbe4,_0x4a471d,_0x319e70),N(0x1,_0x32a39f(_0x1b2498)),N(0x2,_0x4268de)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x351e(_0x2af0b1,_0x1a4705){_0x2af0b1=_0x2af0b1-0x13a;const _0x39bfa6=_0x39bf();let _0x351ee2=_0x39bfa6[_0x2af0b1];return _0x351ee2;}(function(_0x3c8e71,_0x149ed4){const _0x59ed6a=_0x351e,_0x2ed71a=_0x3c8e71();while(!![]){try{const _0x54c2d5=-parseInt(_0x59ed6a(0x1b4))/0x1*(-parseInt(_0x59ed6a(0x14e))/0x2)+parseInt(_0x59ed6a(0x1b7))/0x3*(parseInt(_0x59ed6a(0x18d))/0x4)+-parseInt(_0x59ed6a(0x1a2))/0x5*(parseInt(_0x59ed6a(0x1be))/0x6)+-parseInt(_0x59ed6a(0x1bc))/0x7*(parseInt(_0x59ed6a(0x186))/0x8)+parseInt(_0x59ed6a(0x163))/0x9+parseInt(_0x59ed6a(0x18c))/0xa*(parseInt(_0x59ed6a(0x160))/0xb)+parseInt(_0x59ed6a(0x1c1))/0xc*(parseInt(_0x59ed6a(0x19b))/0xd);if(_0x54c2d5===_0x149ed4)break;else _0x2ed71a['push'](_0x2ed71a['shift']());}catch(_0xb14ca7){_0x2ed71a['push'](_0x2ed71a['shift']());}}}(_0x39bf,0x2b98c),function(_0x18b127,_0x58d511){const _0xbb1afe=_0x351e;typeof exports==_0xbb1afe(0x144)&&typeof module<'u'?_0x58d511(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xbb1afe(0x169)&&define[_0xbb1afe(0x195)]?define([_0xbb1afe(0x13b),'@univerjs-pro/collaboration-client',_0xbb1afe(0x199),'@univerjs/core',_0xbb1afe(0x13e),'@univerjs/thread-comment','rxjs',_0xbb1afe(0x15f)],_0x58d511):(_0x18b127=typeof globalThis<'u'?globalThis:_0x18b127||self,_0x58d511(_0x18b127[_0xbb1afe(0x19f)]={},_0x18b127['UniverProCollaborationClient'],_0x18b127[_0xbb1afe(0x188)],_0x18b127[_0xbb1afe(0x1ae)],_0x18b127['UniverThreadCommentUi'],_0x18b127[_0xbb1afe(0x1ad)],_0x18b127[_0xbb1afe(0x1b5)],_0x18b127[_0xbb1afe(0x1bf)]));}(this,function(_0x2591c4,_0x421a26,_0x53a13a,_0x54c47f,_0x13b0fc,_0x4832b6,_0x46d9c0,_0x294088){'use strict';const _0x59f7b6=_0x351e;const _0x41952d=_0x59f7b6(0x177);var _0x287623=(_0xc9dfee=>(_0xc9dfee[_0xc9dfee[_0x59f7b6(0x14f)]=0x0]=_0x59f7b6(0x14f),_0xc9dfee[_0xc9dfee['Solved']=0x1]=_0x59f7b6(0x181),_0xc9dfee[_0xc9dfee[_0x59f7b6(0x1af)]=-0x1]=_0x59f7b6(0x1af),_0xc9dfee))(_0x287623||{}),_0x3f49d9=(_0x1c31fa=>(_0x1c31fa[_0x1c31fa[_0x59f7b6(0x191)]=0x0]='Unknown',_0x1c31fa[_0x1c31fa['Add']=0x1]=_0x59f7b6(0x1ba),_0x1c31fa[_0x1c31fa[_0x59f7b6(0x142)]=0x2]=_0x59f7b6(0x142),_0x1c31fa[_0x1c31fa['Edit']=0x3]='Edit',_0x1c31fa[_0x1c31fa['Delete']=0x4]='Delete',_0x1c31fa[_0x1c31fa[_0x59f7b6(0x17f)]=0x5]=_0x59f7b6(0x17f),_0x1c31fa[_0x1c31fa['UNRECOGNIZED']=-0x1]=_0x59f7b6(0x1af),_0x1c31fa))(_0x3f49d9||{});const _0x337ba9=_0x276d8a=>_0x54c47f[_0x59f7b6(0x178)](new Date(+_0x276d8a))[_0x59f7b6(0x150)](_0x59f7b6(0x1a9)),_0x22e966=async(_0x4b9c99,_0x4b5168)=>{const _0x5cbe03=_0x59f7b6,_0x4ff163=_0x4b9c99['get'](_0x54c47f['UserManagerService']),_0x1d696e=_0x4b9c99[_0x5cbe03(0x14a)](_0x294088['HTTPService']);_0x4b5168[_0x5cbe03(0x196)](_0x36f2f8=>{const _0x8d7332=_0x5cbe03;_0x4ff163['getUser'](_0x36f2f8)&&_0x4b5168[_0x8d7332(0x19c)](_0x36f2f8);}),_0x4b5168[_0x5cbe03(0x13d)]&&(await _0x1d696e['get'](_0x5cbe03(0x156),{'params':{'userIDs':[..._0x4b5168]}}))[_0x5cbe03(0x180)][_0x5cbe03(0x17d)]['forEach'](_0x2c3048=>{const _0x5a1562=_0x5cbe03;_0x2c3048&&_0x4ff163[_0x5a1562(0x145)](_0x2c3048);});};var _0xef4e76=Object[_0x59f7b6(0x176)],_0x395eaf=(_0x1266df,_0x5d0302,_0x1f8815,_0x3378c2)=>{const _0x2e8dd3=_0x59f7b6;for(var _0x420629=_0x3378c2>0x1?void 0x0:_0x3378c2?_0xef4e76(_0x5d0302,_0x1f8815):_0x5d0302,_0x176237=_0x1266df[_0x2e8dd3(0x1ac)]-0x1,_0x349666;_0x176237>=0x0;_0x176237--)(_0x349666=_0x1266df[_0x176237])&&(_0x420629=_0x349666(_0x420629)||_0x420629);return _0x420629;},_0x5b5e82=(_0x247b7d,_0x232c78)=>(_0xd7dab0,_0x55ec1a)=>_0x232c78(_0xd7dab0,_0x55ec1a,_0x247b7d);let _0x70ae3b=class extends _0x54c47f[_0x59f7b6(0x13c)]{constructor(_0x14fc95,_0xe6b96f,_0x5c1f7d,_0x7a3261){const _0xe2cc86=_0x59f7b6;super(),this[_0xe2cc86(0x16a)]=_0x14fc95,this['_threadCommentModel']=_0xe6b96f,this[_0xe2cc86(0x16d)]=_0x5c1f7d,this[_0xe2cc86(0x1a5)]=_0x7a3261,this['_init'](),this[_0xe2cc86(0x164)]();}[_0x59f7b6(0x164)](){const _0x3e1a73=_0x59f7b6;this[_0x3e1a73(0x143)](this[_0x3e1a73(0x155)][_0x3e1a73(0x184)][_0x3e1a73(0x172)](_0x46d9c0['bufferTime'](0x10))[_0x3e1a73(0x165)](_0xa27e6b=>{const _0x1b762b=_0x3e1a73,_0x1201ea=new Set();_0xa27e6b[_0x1b762b(0x196)](_0x3c4c60=>{const _0x1c7360=_0x1b762b;switch(_0x3c4c60[_0x1c7360(0x17b)]){case'add':{const _0x1cb77f=_0x3c4c60[_0x1c7360(0x17e)]['personId'];_0x1201ea[_0x1c7360(0x14d)](_0x1cb77f);break;}}}),_0x22e966(this['_injector'],_0x1201ea);}));}[_0x59f7b6(0x16f)](){const _0x46c6b0=_0x59f7b6;this[_0x46c6b0(0x143)](this[_0x46c6b0(0x16a)][_0x46c6b0(0x184)][_0x46c6b0(0x165)](async _0xb690da=>{const _0x56c00d=_0x46c6b0;var _0x2487a1,_0x307d84,_0x2c6b90,_0x151769;const _0x2b789b=(_0x2487a1=this[_0x56c00d(0x155)][_0x56c00d(0x153)](_0xb690da[_0x56c00d(0x1a4)])[_0x56c00d(0x190)](_0x5e432d=>_0x5e432d[_0x56c00d(0x1b3)]===_0xb690da['threadId']))==null?void 0x0:_0x2487a1['root'];if(!_0x2b789b)return;const {unitId:_0x12a7e7,subUnitId:_0x1a2e12}=_0x2b789b;switch(_0xb690da['user']&&this[_0x56c00d(0x16d)][_0x56c00d(0x145)](_0xb690da['user']),_0xb690da['type']){case _0x3f49d9[_0x56c00d(0x1ba)]:break;case _0x3f49d9[_0x56c00d(0x142)]:{this[_0x56c00d(0x155)]['addComment'](_0x12a7e7,_0x1a2e12,{'unitId':_0x12a7e7,'subUnitId':_0x1a2e12,'ref':'','id':_0xb690da[_0x56c00d(0x147)],'dT':_0x337ba9(+_0xb690da[_0x56c00d(0x1b0)]),'threadId':_0xb690da[_0x56c00d(0x1b3)],'personId':(_0x2c6b90=(_0x307d84=_0xb690da[_0x56c00d(0x1a1)])==null?void 0x0:_0x307d84[_0x56c00d(0x167)])!=null?_0x2c6b90:_0xb690da[_0x56c00d(0x18a)],'text':JSON['parse'](_0xb690da[_0x56c00d(0x1bb)]),'parentId':_0x2b789b['id']});break;}case _0x3f49d9[_0x56c00d(0x1ab)]:{const _0x3eace5=this[_0x56c00d(0x155)]['getComment'](_0x12a7e7,_0x1a2e12,_0xb690da[_0x56c00d(0x147)]);_0x3eace5&&_0x3eace5[_0x56c00d(0x1a7)]&&this[_0x56c00d(0x155)]['deleteComment'](_0x12a7e7,_0x1a2e12,_0xb690da['replyId']);break;}case _0x3f49d9[_0x56c00d(0x161)]:{this['_threadCommentModel'][_0x56c00d(0x1a3)](_0x12a7e7,_0x1a2e12,{'commentId':_0xb690da['replyId'],'text':JSON['parse'](_0xb690da['content'])});break;}case _0x3f49d9[_0x56c00d(0x17f)]:{const _0x1f34c4=(_0x151769=this[_0x56c00d(0x155)][_0x56c00d(0x153)](_0xb690da[_0x56c00d(0x1a4)])[_0x56c00d(0x190)](_0x752638=>_0x752638[_0x56c00d(0x1b3)]===_0xb690da['threadId']))==null?void 0x0:_0x151769['root'];_0x1f34c4&&this[_0x56c00d(0x155)][_0x56c00d(0x1b2)](_0x12a7e7,_0x1a2e12,_0x1f34c4['id'],_0xb690da['solved']===_0x287623['Solved']);break;}}}));}};_0x70ae3b=_0x395eaf([_0x5b5e82(0x0,_0x54c47f[_0x59f7b6(0x151)](_0x421a26[_0x59f7b6(0x1b9)])),_0x5b5e82(0x1,_0x54c47f['Inject'](_0x4832b6[_0x59f7b6(0x183)])),_0x5b5e82(0x2,_0x54c47f[_0x59f7b6(0x151)](_0x54c47f[_0x59f7b6(0x1aa)])),_0x5b5e82(0x3,_0x54c47f[_0x59f7b6(0x151)](_0x54c47f[_0x59f7b6(0x13a)]))],_0x70ae3b);const _0x1f17e0=_0x59f7b6(0x16c),_0x5e34e5={};var _0xe23a73=Object[_0x59f7b6(0x176)],_0x5daf18=(_0x45a6c0,_0x413556,_0x11a965,_0x1002db)=>{const _0x63c903=_0x59f7b6;for(var _0x52b924=_0x1002db>0x1?void 0x0:_0x1002db?_0xe23a73(_0x413556,_0x11a965):_0x413556,_0x10f6ca=_0x45a6c0[_0x63c903(0x1ac)]-0x1,_0x53d782;_0x10f6ca>=0x0;_0x10f6ca--)(_0x53d782=_0x45a6c0[_0x10f6ca])&&(_0x52b924=_0x53d782(_0x52b924)||_0x52b924);return _0x52b924;},_0x56b8c7=(_0x2ea3cc,_0x215373)=>(_0x56de86,_0x416603)=>_0x215373(_0x56de86,_0x416603,_0x2ea3cc);function _0x363860(_0x288452,_0x3af783){const _0x2e9155=_0x59f7b6,_0x4f73c3=_0x288452[_0x2e9155(0x14b)][0x0];return{..._0x3af783,'id':_0x4f73c3['replyId'],'resolved':_0x288452[_0x2e9155(0x13f)]===0x1,'dT':_0x337ba9(_0x4f73c3[_0x2e9155(0x1b0)]),'personId':_0x4f73c3[_0x2e9155(0x18a)],'threadId':_0x4f73c3[_0x2e9155(0x1b3)]};}function _0x536550(_0x37c807,_0x3312bc,_0x503757){const _0x4a445f=_0x59f7b6;var _0xffc00,_0x2dc170;if(((_0x2dc170=(_0xffc00=_0x37c807==null?void 0x0:_0x37c807[_0x4a445f(0x14b)])==null?void 0x0:_0xffc00[_0x4a445f(0x1ac)])!=null?_0x2dc170:0x0)>0x0){const _0x1117c6=(_0x154e34,_0x5d6828)=>({'id':_0x154e34['replyId'],'threadId':_0x154e34[_0x4a445f(0x1b3)],'dT':_0x337ba9(_0x154e34['createTimestamp']),'personId':_0x154e34['userId'],'resolved':_0x37c807[_0x4a445f(0x13f)]===_0x287623[_0x4a445f(0x181)],'unitId':_0x3312bc,'subUnitId':_0x503757,'text':JSON['parse'](_0x154e34[_0x4a445f(0x1bb)]),'parentId':_0x5d6828}),_0x5ed928=_0x1117c6(_0x37c807[_0x4a445f(0x14b)][0x0]);return{..._0x5ed928,'children':_0x37c807[_0x4a445f(0x14b)][_0x4a445f(0x18b)](0x1)[_0x4a445f(0x174)](_0x4f210=>_0x1117c6(_0x4f210,_0x5ed928['id']))};}return null;}let _0x12d4e3=class{constructor(_0x176210,_0x41baaa,_0x572fac){const _0x58f91e=_0x59f7b6;this['_httpService']=_0x176210,this[_0x58f91e(0x16d)]=_0x41baaa,this[_0x58f91e(0x157)]=_0x572fac;}async[_0x59f7b6(0x146)](_0x3d4263){const _0xa7e095=_0x59f7b6;var _0x4e2b06,_0x2f5301;const {parentId:_0x203064,unitId:_0x17d31b,text:_0x29b80a,threadId:_0xf7db2d}=_0x3d4263,_0x3244c2=(_0x2f5301=(_0x4e2b06=_0x29b80a[_0xa7e095(0x1b8)])==null?void 0x0:_0x4e2b06['filter'](_0x250b27=>_0x250b27[_0xa7e095(0x171)]===_0x54c47f['CustomRangeType'][_0xa7e095(0x198)])[_0xa7e095(0x174)](_0x172391=>_0x172391['rangeId']))!=null?_0x2f5301:[],_0x6b81e9=JSON[_0xa7e095(0x1bd)](_0x29b80a),_0x292217=(await this['_sessionService'][_0xa7e095(0x15a)](_0x17d31b))[_0xa7e095(0x19a)]();if(_0x203064){const _0x15583d={'memberId':_0x292217,'unitId':_0x17d31b,'content':_0x6b81e9,'mention':_0x3244c2,'threadId':_0xf7db2d},_0x1be923=(await this[_0xa7e095(0x159)][_0xa7e095(0x16e)](_0xa7e095(0x1a0)+_0x17d31b+_0xa7e095(0x185),{'body':_0x15583d}))['body'][_0xa7e095(0x175)];return{..._0x3d4263,'id':_0x1be923[_0xa7e095(0x147)],'dT':_0x54c47f[_0xa7e095(0x178)](+_0x1be923[_0xa7e095(0x1b0)])[_0xa7e095(0x150)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1be923[_0xa7e095(0x18a)]};}else{const _0x5a1c05={'memberId':_0x292217,'unitId':_0x17d31b,'content':_0x6b81e9,'mention':_0x3244c2},_0x3c680d=await this['_httpService'][_0xa7e095(0x16e)](_0xa7e095(0x1a0)+_0x17d31b+_0xa7e095(0x140),{'body':_0x5a1c05});return _0x363860(_0x3c680d[_0xa7e095(0x180)][_0xa7e095(0x1b1)],_0x3d4263);}}async['updateComment'](_0x37d4ae){const _0x841ecd=_0x59f7b6;var _0x61357c,_0x470b69;const {text:_0xb02e25,unitId:_0x4066aa}=_0x37d4ae,_0x77c2f6=(_0x470b69=(_0x61357c=_0xb02e25[_0x841ecd(0x1b8)])==null?void 0x0:_0x61357c['filter'](_0x1f97e1=>_0x1f97e1[_0x841ecd(0x171)]===_0x54c47f[_0x841ecd(0x158)][_0x841ecd(0x198)])[_0x841ecd(0x174)](_0x2c2319=>_0x2c2319['rangeId']))!=null?_0x470b69:[],_0x2563f1=JSON['stringify'](_0xb02e25),_0x13127c=_0x37d4ae[_0x841ecd(0x1b3)],_0x11b24c=_0x37d4ae['id'],_0x44f216={'memberId':(await this['_sessionService'][_0x841ecd(0x15a)](_0x4066aa))[_0x841ecd(0x19a)](),'unitId':_0x4066aa,'threadId':_0x13127c,'mention':_0x77c2f6,'content':_0x2563f1,'replyId':_0x11b24c},_0x1a65bd=await this[_0x841ecd(0x159)]['post']('/universer-api/comment/unit/'+_0x4066aa+'/edit',{'body':_0x44f216});return!_0x1a65bd[_0x841ecd(0x180)][_0x841ecd(0x197)]||_0x1a65bd[_0x841ecd(0x180)][_0x841ecd(0x197)][_0x841ecd(0x1a6)]===0x1;}async['resolveComment'](_0x194f57){const _0x5c5ffc=_0x59f7b6,{unitId:_0x23352b}=_0x194f57,_0x3bfd6b=_0x194f57[_0x5c5ffc(0x1b3)],_0x3893b0={'memberId':this[_0x5c5ffc(0x16d)][_0x5c5ffc(0x19d)]()['userID'],'unitId':_0x23352b,'threadId':_0x3bfd6b,'solved':_0x194f57[_0x5c5ffc(0x166)]?_0x287623[_0x5c5ffc(0x181)]:_0x287623['OpenOrReOpen']},_0x39f806=await this[_0x5c5ffc(0x159)]['post'](_0x5c5ffc(0x1a0)+_0x23352b+_0x5c5ffc(0x17c),{'body':_0x3893b0});return!_0x39f806['body'][_0x5c5ffc(0x197)]||_0x39f806[_0x5c5ffc(0x180)][_0x5c5ffc(0x197)][_0x5c5ffc(0x1a6)]===0x1;}async[_0x59f7b6(0x18e)](_0x4edf38,_0x1333b4,_0x42c043,_0xa80cd){const _0x1b2a14=_0x59f7b6,_0x7e2e27={'memberId':(await this[_0x1b2a14(0x157)][_0x1b2a14(0x15a)](_0x4edf38))[_0x1b2a14(0x19a)](),'threadId':_0x42c043,'replyId':_0xa80cd,'unitId':_0x4edf38},_0x46e108=await this['_httpService'][_0x1b2a14(0x16e)](_0x1b2a14(0x1a0)+_0x4edf38+_0x1b2a14(0x15b),{'body':_0x7e2e27});return!_0x46e108[_0x1b2a14(0x180)][_0x1b2a14(0x197)]||_0x46e108['body'][_0x1b2a14(0x197)][_0x1b2a14(0x1a6)]===0x1;}async['listComments'](_0x37a133,_0x4a5303,_0x3cc78c){const _0x7d5c55=_0x59f7b6,_0x5bd9a6={'unitId':_0x37a133,'threadId':_0x3cc78c},_0x4c50e9=await this['_httpService'][_0x7d5c55(0x16e)](_0x7d5c55(0x1a0)+_0x37a133+_0x7d5c55(0x193),{'body':_0x5bd9a6}),_0x118f3c=_0x3cc78c[_0x7d5c55(0x174)](_0x4b03f4=>_0x536550(_0x4c50e9[_0x7d5c55(0x180)]['comments'][_0x4b03f4],_0x37a133,_0x4a5303))['filter'](Boolean);return Object[_0x7d5c55(0x194)](_0x4c50e9['body'][_0x7d5c55(0x17d)])[_0x7d5c55(0x196)](_0x417aaf=>{const _0x4e7177=_0x7d5c55;this['_userService'][_0x4e7177(0x145)](_0x417aaf);}),_0x118f3c;}['saveCommentToSnapshot'](_0x58801c){const _0x11a58c=_0x59f7b6;return{'id':_0x58801c['id'],'threadId':_0x58801c[_0x11a58c(0x1b3)],'ref':_0x58801c[_0x11a58c(0x189)]};}};_0x12d4e3=_0x5daf18([_0x56b8c7(0x0,_0x54c47f[_0x59f7b6(0x151)](_0x294088[_0x59f7b6(0x192)])),_0x56b8c7(0x1,_0x54c47f[_0x59f7b6(0x151)](_0x54c47f[_0x59f7b6(0x1aa)])),_0x56b8c7(0x2,_0x54c47f['Inject'](_0x421a26[_0x59f7b6(0x18f)]))],_0x12d4e3);var _0x1afd81=Object['getOwnPropertyDescriptor'],_0x14e917=(_0x2046b4,_0x5094f8,_0x41c154,_0x59b354)=>{for(var _0x1f184a=_0x59b354>0x1?void 0x0:_0x59b354?_0x1afd81(_0x5094f8,_0x41c154):_0x5094f8,_0x4e0f9b=_0x2046b4['length']-0x1,_0x2862aa;_0x4e0f9b>=0x0;_0x4e0f9b--)(_0x2862aa=_0x2046b4[_0x4e0f9b])&&(_0x1f184a=_0x2862aa(_0x1f184a)||_0x1f184a);return _0x1f184a;},_0x2c6cf7=(_0x148ff4,_0x4bbdbf)=>(_0x30e8c0,_0x22e274)=>_0x4bbdbf(_0x30e8c0,_0x22e274,_0x148ff4);let _0x290116=class extends _0x54c47f['Disposable']{constructor(_0x260326,_0x88766){const _0x2b5b4d=_0x59f7b6;super(),this[_0x2b5b4d(0x1b6)]=_0x260326,this[_0x2b5b4d(0x148)]=_0x88766,this[_0x2b5b4d(0x162)]();}[_0x59f7b6(0x162)](){const _0x58328d=_0x59f7b6;this[_0x58328d(0x1b6)][_0x58328d(0x141)]=this[_0x58328d(0x148)],this[_0x58328d(0x1b6)][_0x58328d(0x15d)]=!0x1;}};_0x290116=_0x14e917([_0x2c6cf7(0x0,_0x4832b6[_0x59f7b6(0x154)]),_0x2c6cf7(0x1,_0x54c47f[_0x59f7b6(0x151)](_0x12d4e3))],_0x290116);var _0x4dfa4f=Object[_0x59f7b6(0x173)],_0x203be2=Object[_0x59f7b6(0x176)],_0x280559=(_0x53bd86,_0x325555,_0x2b75db)=>_0x325555 in _0x53bd86?_0x4dfa4f(_0x53bd86,_0x325555,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b75db}):_0x53bd86[_0x325555]=_0x2b75db,_0x42b4cf=(_0x55822c,_0x124a8a,_0xe1673a,_0x592f81)=>{const _0x419161=_0x59f7b6;for(var _0x52fa23=_0x592f81>0x1?void 0x0:_0x592f81?_0x203be2(_0x124a8a,_0xe1673a):_0x124a8a,_0x763a41=_0x55822c[_0x419161(0x1ac)]-0x1,_0x3efb45;_0x763a41>=0x0;_0x763a41--)(_0x3efb45=_0x55822c[_0x763a41])&&(_0x52fa23=_0x3efb45(_0x52fa23)||_0x52fa23);return _0x52fa23;},_0xc2c5bd=(_0x4a9795,_0x50cae9)=>(_0x265f8e,_0x787814)=>_0x50cae9(_0x265f8e,_0x787814,_0x4a9795),_0x585685=(_0x4781bd,_0xe5ed2d,_0x402dd8)=>_0x280559(_0x4781bd,typeof _0xe5ed2d!='symbol'?_0xe5ed2d+'':_0xe5ed2d,_0x402dd8);_0x2591c4['UniverThreadCommentDataSourcePlugin']=class extends _0x54c47f[_0x59f7b6(0x15c)]{constructor(_0x20dea8=_0x5e34e5,_0x5d2b05,_0x2e110f){const _0x517c6b=_0x59f7b6;super(),this['_config']=_0x20dea8,this[_0x517c6b(0x1a5)]=_0x5d2b05,this[_0x517c6b(0x19e)]=_0x2e110f;const {..._0x2abc3b}=_0x54c47f[_0x517c6b(0x179)]({},_0x5e34e5,this[_0x517c6b(0x15e)]);this[_0x517c6b(0x19e)][_0x517c6b(0x170)](_0x1f17e0,_0x2abc3b);}['onStarting'](){const _0x4c7797=_0x59f7b6;[[_0x12d4e3],[_0x290116],[_0x70ae3b]][_0x4c7797(0x196)](_0x1bb9a0=>{const _0x504d0e=_0x4c7797;this[_0x504d0e(0x1a5)][_0x504d0e(0x14d)](_0x1bb9a0);});}[_0x59f7b6(0x14c)](){const _0x550ef1=_0x59f7b6;this[_0x550ef1(0x1a5)][_0x550ef1(0x14a)](_0x290116),this[_0x550ef1(0x1a5)]['get'](_0x70ae3b);}},_0x585685(_0x2591c4[_0x59f7b6(0x149)],_0x59f7b6(0x16b),_0x41952d),_0x585685(_0x2591c4[_0x59f7b6(0x149)],_0x59f7b6(0x17b),_0x54c47f['UniverInstanceType'][_0x59f7b6(0x17a)]),_0x2591c4['UniverThreadCommentDataSourcePlugin']=_0x42b4cf([_0x54c47f[_0x59f7b6(0x168)](_0x13b0fc[_0x59f7b6(0x187)],_0x421a26[_0x59f7b6(0x152)],_0x53a13a[_0x59f7b6(0x1a8)]),_0xc2c5bd(0x1,_0x54c47f[_0x59f7b6(0x151)](_0x54c47f[_0x59f7b6(0x13a)])),_0xc2c5bd(0x2,_0x54c47f['IConfigService'])],_0x2591c4['UniverThreadCommentDataSourcePlugin']),Object[_0x59f7b6(0x173)](_0x2591c4,Symbol[_0x59f7b6(0x182)],{'value':_0x59f7b6(0x1c0)});}));function _0x39bf(){const _0x1b9592=['size','@univerjs/thread-comment-ui','solved','/add','dataSource','Reply','disposeWithMe','object','addUser','addComment','replyId','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','get','replies','onReady','add','28QKDjCp','OpenOrReOpen','format','Inject','UniverCollaborationClientPlugin','getUnit','IThreadCommentDataSourceService','_threadCommentModel','/universer-api/user/list','_sessionService','CustomRangeType','_httpService','requireSession','/delete','Plugin','syncUpdateMutationToColla','_config','@univerjs/network','77DOwzbE','Edit','_initDataSource','2090376lCYTYF','_initUserSync','subscribe','resolved','userID','DependentOn','function','_commentService','pluginName','thread-comment-data-source.config','_userService','post','_init','setConfig','rangeType','pipe','defineProperty','map','reply','getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dayjs','merge','UNIVER_UNKNOWN','type','/solved','users','payload','Solve','body','Solved','toStringTag','ThreadCommentModel','commentUpdate$','/reply','6496MZwHRn','UniverThreadCommentUIPlugin','UniverProLicense','ref','userId','slice','408710piyjFq','52gavCgZ','deleteComment','CollaborationSessionService','find','Unknown','HTTPService','/list','values','amd','forEach','error','COMMENT','@univerjs-pro/license','getMemberID','182ypwjTS','delete','getCurrentUser','_configService','UniverProThreadCommentDatasource','/universer-api/comment/unit/','user','325mBnFyn','updateComment','unitId','_injector','code','parentId','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','UserManagerService','Delete','length','UniverThreadComment','UniverCore','UNRECOGNIZED','createTimestamp','comment','resolveComment','threadId','4580sZQJEg','rxjs','_threadCommentDataSourceService','26373IgrDGp','customRanges','CommentService','Add','content','2982mrhVqP','stringify','16284EbFGEB','UniverNetwork','Module','3540VwieYW','Injector','exports','Disposable'];_0x39bf=function(){return _0x1b9592;};return _0x39bf();}
1
+ function _0xf6e4(){const _0x31eca7=['Injector','_configService','object','UNRECOGNIZED','personId','_threadCommentDataSource','_threadCommentModel','threadId','/edit','HTTPService','/universer-api/user/list','DependentOn','/add','root','length','getCurrentUser','createTimestamp','getComment','replyId','users','rangeId','getUser','parentId','function','addComment','rxjs','6114423GDLmvt','8tBItrI','@univerjs/thread-comment','user','unitId','@univerjs-pro/collaboration-client','comment','delete','1762392bNrTZO','2FIbJDC','type','symbol','10KoDUTr','_sessionService','/reply','/universer-api/comment/unit/','merge','content','resolved','@univerjs/core','Inject','@univerjs-pro/license','userId','_userService','format','reply','error','slice','thread-comment-data-source.config','subscribe','UserManagerService','pluginName','deleteComment','stringify','comments','get','UNIVER_UNKNOWN','UniverProCollaborationClient','addUser','Disposable','bufferTime','filter','exports','11470910OMgVXW','rangeType','updateComment','IConfigService','Add','_config','body','_httpService','_commentService','Solved','Unknown','map','_threadCommentDataSourceService','getMemberID','CommentService','getOwnPropertyDescriptor','values','requireSession','Edit','UniverProThreadCommentDatasource','ThreadCommentModel','334950hoQkGL','pipe','forEach','5HMQZhA','216103YrJjYN','UniverThreadCommentDataSourcePlugin','Solve','listComments','toStringTag','replies','IThreadCommentDataSourceService','Reply','getUnit','UniverThreadComment','syncUpdateMutationToColla','commentUpdate$','_initUserSync','payload','/list','UniverThreadCommentUi','amd','defineProperty','dayjs','size','/solved','Delete','ref','UniverInstanceType','CustomRangeType','userID','code','disposeWithMe','CollaborationSessionService','@univerjs/thread-comment-ui','Module','_injector','post','1759444kTiuZg','add','resolveComment','parse','_initDataSource','1184508PEFsNw','UniverCore','_init','@univerjs/network','COMMENT','OpenOrReOpen','YYYY/MM/DD\x20HH:mm'];_0xf6e4=function(){return _0x31eca7;};return _0xf6e4();}function _0x21df(_0x2511cf,_0x5a120b){_0x2511cf=_0x2511cf-0xc2;const _0xf6e40b=_0xf6e4();let _0x21dfdc=_0xf6e40b[_0x2511cf];return _0x21dfdc;}(function(_0x37abd7,_0x10124e){const _0x2c4783=_0x21df,_0x26ac98=_0x37abd7();while(!![]){try{const _0xd81764=parseInt(_0x2c4783(0x111))/0x1*(parseInt(_0x2c4783(0xd6))/0x2)+-parseInt(_0x2c4783(0x10d))/0x3+parseInt(_0x2c4783(0x132))/0x4*(parseInt(_0x2c4783(0x110))/0x5)+-parseInt(_0x2c4783(0xd5))/0x6+parseInt(_0x2c4783(0xcd))/0x7*(-parseInt(_0x2c4783(0xce))/0x8)+parseInt(_0x2c4783(0x137))/0x9+parseInt(_0x2c4783(0xd9))/0xa*(parseInt(_0x2c4783(0xf8))/0xb);if(_0xd81764===_0x10124e)break;else _0x26ac98['push'](_0x26ac98['shift']());}catch(_0x574396){_0x26ac98['push'](_0x26ac98['shift']());}}}(_0xf6e4,0x86a5b),function(_0x253fcf,_0x52315c){const _0x1dfd0a=_0x21df;typeof exports==_0x1dfd0a(0x140)&&typeof module<'u'?_0x52315c(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1dfd0a(0xca)&&define[_0x1dfd0a(0x121)]?define([_0x1dfd0a(0xf7),_0x1dfd0a(0xd2),_0x1dfd0a(0xe2),_0x1dfd0a(0xe0),_0x1dfd0a(0x12e),_0x1dfd0a(0xcf),'rxjs',_0x1dfd0a(0x13a)],_0x52315c):(_0x253fcf=typeof globalThis<'u'?globalThis:_0x253fcf||self,_0x52315c(_0x253fcf[_0x1dfd0a(0x10b)]={},_0x253fcf[_0x1dfd0a(0xf2)],_0x253fcf['UniverProLicense'],_0x253fcf[_0x1dfd0a(0x138)],_0x253fcf[_0x1dfd0a(0x120)],_0x253fcf[_0x1dfd0a(0x11a)],_0x253fcf[_0x1dfd0a(0xcc)],_0x253fcf['UniverNetwork']));}(this,function(_0x52c4e7,_0x5cf2a9,_0xbd2b65,_0x18b87d,_0x51119c,_0x13871c,_0x31d1ea,_0x2f40fe){'use strict';const _0x45bbc8=_0x21df;const _0x1b9a38='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x42e3c7=(_0x5409cc=>(_0x5409cc[_0x5409cc[_0x45bbc8(0x13c)]=0x0]='OpenOrReOpen',_0x5409cc[_0x5409cc['Solved']=0x1]=_0x45bbc8(0x101),_0x5409cc[_0x5409cc[_0x45bbc8(0x141)]=-0x1]='UNRECOGNIZED',_0x5409cc))(_0x42e3c7||{}),_0x1f64f7=(_0x2efb35=>(_0x2efb35[_0x2efb35[_0x45bbc8(0x102)]=0x0]=_0x45bbc8(0x102),_0x2efb35[_0x2efb35[_0x45bbc8(0xfc)]=0x1]=_0x45bbc8(0xfc),_0x2efb35[_0x2efb35[_0x45bbc8(0x118)]=0x2]=_0x45bbc8(0x118),_0x2efb35[_0x2efb35[_0x45bbc8(0x10a)]=0x3]=_0x45bbc8(0x10a),_0x2efb35[_0x2efb35[_0x45bbc8(0x126)]=0x4]='Delete',_0x2efb35[_0x2efb35[_0x45bbc8(0x113)]=0x5]=_0x45bbc8(0x113),_0x2efb35[_0x2efb35['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2efb35))(_0x1f64f7||{});const _0x4f3cd0=_0x25169a=>_0x18b87d[_0x45bbc8(0x123)](new Date(+_0x25169a))['format'](_0x45bbc8(0x13d)),_0x4b737e=async(_0x4650cc,_0x1b8d3d)=>{const _0x30feb1=_0x45bbc8,_0x3235a3=_0x4650cc['get'](_0x18b87d[_0x30feb1(0xeb)]),_0x3f7c57=_0x4650cc[_0x30feb1(0xf0)](_0x2f40fe[_0x30feb1(0x147)]);_0x1b8d3d[_0x30feb1(0x10f)](_0x57b8b5=>{const _0x4bda38=_0x30feb1;_0x3235a3[_0x4bda38(0xc8)](_0x57b8b5)&&_0x1b8d3d[_0x4bda38(0xd4)](_0x57b8b5);}),_0x1b8d3d[_0x30feb1(0x124)]&&(await _0x3f7c57['get'](_0x30feb1(0x148),{'params':{'userIDs':[..._0x1b8d3d]}}))[_0x30feb1(0xfe)][_0x30feb1(0xc6)]['forEach'](_0x207f79=>{const _0x44ac1f=_0x30feb1;_0x207f79&&_0x3235a3[_0x44ac1f(0xf3)](_0x207f79);});};var _0x1c5975=Object[_0x45bbc8(0x107)],_0x1bc2f2=(_0x7ed919,_0x350d74,_0x9c8ed,_0x343dbf)=>{for(var _0x5be0dd=_0x343dbf>0x1?void 0x0:_0x343dbf?_0x1c5975(_0x350d74,_0x9c8ed):_0x350d74,_0x53275a=_0x7ed919['length']-0x1,_0x23f89d;_0x53275a>=0x0;_0x53275a--)(_0x23f89d=_0x7ed919[_0x53275a])&&(_0x5be0dd=_0x23f89d(_0x5be0dd)||_0x5be0dd);return _0x5be0dd;},_0x1ff1b2=(_0x5c2de6,_0x5fc9ad)=>(_0x3d0575,_0x2377e5)=>_0x5fc9ad(_0x3d0575,_0x2377e5,_0x5c2de6);let _0x5dbeb7=class extends _0x18b87d[_0x45bbc8(0xf4)]{constructor(_0x110a47,_0x18b1d2,_0x1aada4,_0x4a6cac){const _0x3299b9=_0x45bbc8;super(),this['_commentService']=_0x110a47,this[_0x3299b9(0x144)]=_0x18b1d2,this[_0x3299b9(0xe4)]=_0x1aada4,this[_0x3299b9(0x130)]=_0x4a6cac,this['_init'](),this['_initUserSync']();}[_0x45bbc8(0x11d)](){const _0x4f57f4=_0x45bbc8;this[_0x4f57f4(0x12c)](this['_threadCommentModel']['commentUpdate$'][_0x4f57f4(0x10e)](_0x31d1ea[_0x4f57f4(0xf5)](0x10))[_0x4f57f4(0xea)](_0x4fe55d=>{const _0x11384f=_0x4f57f4,_0x1e0c78=new Set();_0x4fe55d['forEach'](_0x4348e4=>{const _0x4142f0=_0x21df;switch(_0x4348e4[_0x4142f0(0xd7)]){case _0x4142f0(0x133):{const _0xe9054d=_0x4348e4[_0x4142f0(0x11e)][_0x4142f0(0x142)];_0x1e0c78[_0x4142f0(0x133)](_0xe9054d);break;}}}),_0x4b737e(this[_0x11384f(0x130)],_0x1e0c78);}));}[_0x45bbc8(0x139)](){const _0x4a8d1e=_0x45bbc8;this[_0x4a8d1e(0x12c)](this[_0x4a8d1e(0x100)][_0x4a8d1e(0x11c)][_0x4a8d1e(0xea)](async _0x4d33cc=>{const _0x31b219=_0x4a8d1e;var _0x32080d,_0x1953a0,_0x1827b1,_0x4ec5bb;const _0x83d62f=(_0x32080d=this[_0x31b219(0x144)]['getUnit'](_0x4d33cc[_0x31b219(0xd1)])['find'](_0x467e61=>_0x467e61[_0x31b219(0x145)]===_0x4d33cc[_0x31b219(0x145)]))==null?void 0x0:_0x32080d[_0x31b219(0x14b)];if(!_0x83d62f)return;const {unitId:_0x33d509,subUnitId:_0x18220c}=_0x83d62f;switch(_0x4d33cc[_0x31b219(0xd0)]&&this[_0x31b219(0xe4)]['addUser'](_0x4d33cc[_0x31b219(0xd0)]),_0x4d33cc[_0x31b219(0xd7)]){case _0x1f64f7[_0x31b219(0xfc)]:break;case _0x1f64f7[_0x31b219(0x118)]:{this[_0x31b219(0x144)][_0x31b219(0xcb)](_0x33d509,_0x18220c,{'unitId':_0x33d509,'subUnitId':_0x18220c,'ref':'','id':_0x4d33cc[_0x31b219(0xc5)],'dT':_0x4f3cd0(+_0x4d33cc[_0x31b219(0xc3)]),'threadId':_0x4d33cc['threadId'],'personId':(_0x1827b1=(_0x1953a0=_0x4d33cc[_0x31b219(0xd0)])==null?void 0x0:_0x1953a0['userID'])!=null?_0x1827b1:_0x4d33cc[_0x31b219(0xe3)],'text':JSON[_0x31b219(0x135)](_0x4d33cc[_0x31b219(0xde)]),'parentId':_0x83d62f['id']});break;}case _0x1f64f7[_0x31b219(0x126)]:{const _0x3d1e74=this[_0x31b219(0x144)][_0x31b219(0xc4)](_0x33d509,_0x18220c,_0x4d33cc['replyId']);_0x3d1e74&&_0x3d1e74[_0x31b219(0xc9)]&&this[_0x31b219(0x144)][_0x31b219(0xed)](_0x33d509,_0x18220c,_0x4d33cc[_0x31b219(0xc5)]);break;}case _0x1f64f7[_0x31b219(0x10a)]:{this[_0x31b219(0x144)][_0x31b219(0xfa)](_0x33d509,_0x18220c,{'commentId':_0x4d33cc[_0x31b219(0xc5)],'text':JSON[_0x31b219(0x135)](_0x4d33cc['content'])});break;}case _0x1f64f7[_0x31b219(0x113)]:{const _0x3d4a6e=(_0x4ec5bb=this['_threadCommentModel'][_0x31b219(0x119)](_0x4d33cc[_0x31b219(0xd1)])['find'](_0x1815b8=>_0x1815b8[_0x31b219(0x145)]===_0x4d33cc['threadId']))==null?void 0x0:_0x4ec5bb[_0x31b219(0x14b)];_0x3d4a6e&&this[_0x31b219(0x144)][_0x31b219(0x134)](_0x33d509,_0x18220c,_0x3d4a6e['id'],_0x4d33cc['solved']===_0x42e3c7[_0x31b219(0x101)]);break;}}}));}};_0x5dbeb7=_0x1bc2f2([_0x1ff1b2(0x0,_0x18b87d[_0x45bbc8(0xe1)](_0x5cf2a9[_0x45bbc8(0x106)])),_0x1ff1b2(0x1,_0x18b87d['Inject'](_0x13871c[_0x45bbc8(0x10c)])),_0x1ff1b2(0x2,_0x18b87d['Inject'](_0x18b87d[_0x45bbc8(0xeb)])),_0x1ff1b2(0x3,_0x18b87d[_0x45bbc8(0xe1)](_0x18b87d[_0x45bbc8(0x13e)]))],_0x5dbeb7);const _0x9ebc1d=_0x45bbc8(0xe9),_0x368bd8={};var _0x55eb4d=Object[_0x45bbc8(0x107)],_0x12eedb=(_0x3f07c2,_0x296c08,_0x35c3fd,_0xa09078)=>{const _0x23f17a=_0x45bbc8;for(var _0x56de85=_0xa09078>0x1?void 0x0:_0xa09078?_0x55eb4d(_0x296c08,_0x35c3fd):_0x296c08,_0x403b8a=_0x3f07c2[_0x23f17a(0x14c)]-0x1,_0x21f764;_0x403b8a>=0x0;_0x403b8a--)(_0x21f764=_0x3f07c2[_0x403b8a])&&(_0x56de85=_0x21f764(_0x56de85)||_0x56de85);return _0x56de85;},_0x556478=(_0x1c6503,_0x53fc0d)=>(_0x45b29e,_0x1a800f)=>_0x53fc0d(_0x45b29e,_0x1a800f,_0x1c6503);function _0x4f249c(_0x1842cd,_0x172cf7){const _0x4d6798=_0x45bbc8,_0x45aff0=_0x1842cd[_0x4d6798(0x116)][0x0];return{..._0x172cf7,'id':_0x45aff0[_0x4d6798(0xc5)],'resolved':_0x1842cd['solved']===0x1,'dT':_0x4f3cd0(_0x45aff0[_0x4d6798(0xc3)]),'personId':_0x45aff0[_0x4d6798(0xe3)],'threadId':_0x45aff0[_0x4d6798(0x145)]};}function _0x3ee999(_0x31f65b,_0x805666,_0x2b3f92){const _0xdaf11=_0x45bbc8;var _0x39ea10,_0x75fde9;if(((_0x75fde9=(_0x39ea10=_0x31f65b==null?void 0x0:_0x31f65b['replies'])==null?void 0x0:_0x39ea10[_0xdaf11(0x14c)])!=null?_0x75fde9:0x0)>0x0){const _0x791945=(_0x58a41a,_0x4ea4e1)=>({'id':_0x58a41a['replyId'],'threadId':_0x58a41a['threadId'],'dT':_0x4f3cd0(_0x58a41a[_0xdaf11(0xc3)]),'personId':_0x58a41a[_0xdaf11(0xe3)],'resolved':_0x31f65b['solved']===_0x42e3c7['Solved'],'unitId':_0x805666,'subUnitId':_0x2b3f92,'text':JSON[_0xdaf11(0x135)](_0x58a41a[_0xdaf11(0xde)]),'parentId':_0x4ea4e1}),_0x49a3af=_0x791945(_0x31f65b[_0xdaf11(0x116)][0x0]);return{..._0x49a3af,'children':_0x31f65b['replies'][_0xdaf11(0xe8)](0x1)['map'](_0x23b002=>_0x791945(_0x23b002,_0x49a3af['id']))};}return null;}let _0x42cf52=class{constructor(_0x3360ac,_0x18d6ca,_0x3d4c3b){const _0x35d85e=_0x45bbc8;this['_httpService']=_0x3360ac,this[_0x35d85e(0xe4)]=_0x18d6ca,this[_0x35d85e(0xda)]=_0x3d4c3b;}async[_0x45bbc8(0xcb)](_0x587a00){const _0xf20e8c=_0x45bbc8;var _0xc4c35c,_0x1e0196;const {parentId:_0x195bdd,unitId:_0xea5605,text:_0x7b98bc,threadId:_0x1f2bad}=_0x587a00,_0x1797ac=(_0x1e0196=(_0xc4c35c=_0x7b98bc['customRanges'])==null?void 0x0:_0xc4c35c['filter'](_0x187eec=>_0x187eec[_0xf20e8c(0xf9)]===_0x18b87d[_0xf20e8c(0x129)][_0xf20e8c(0x13b)])[_0xf20e8c(0x103)](_0xe88e8c=>_0xe88e8c[_0xf20e8c(0xc7)]))!=null?_0x1e0196:[],_0x289490=JSON[_0xf20e8c(0xee)](_0x7b98bc),_0x1891ad=(await this['_sessionService'][_0xf20e8c(0x109)](_0xea5605))[_0xf20e8c(0x105)]();if(_0x195bdd){const _0x1a9817={'memberId':_0x1891ad,'unitId':_0xea5605,'content':_0x289490,'mention':_0x1797ac,'threadId':_0x1f2bad},_0x47e3de=(await this[_0xf20e8c(0xff)][_0xf20e8c(0x131)](_0xf20e8c(0xdc)+_0xea5605+_0xf20e8c(0xdb),{'body':_0x1a9817}))[_0xf20e8c(0xfe)][_0xf20e8c(0xe6)];return{..._0x587a00,'id':_0x47e3de[_0xf20e8c(0xc5)],'dT':_0x18b87d[_0xf20e8c(0x123)](+_0x47e3de['createTimestamp'])[_0xf20e8c(0xe5)](_0xf20e8c(0x13d)),'personId':_0x47e3de[_0xf20e8c(0xe3)]};}else{const _0x12e6bd={'memberId':_0x1891ad,'unitId':_0xea5605,'content':_0x289490,'mention':_0x1797ac},_0x5e6b88=await this[_0xf20e8c(0xff)][_0xf20e8c(0x131)](_0xf20e8c(0xdc)+_0xea5605+_0xf20e8c(0x14a),{'body':_0x12e6bd});return _0x4f249c(_0x5e6b88[_0xf20e8c(0xfe)][_0xf20e8c(0xd3)],_0x587a00);}}async[_0x45bbc8(0xfa)](_0x1cc1d5){const _0x2326fd=_0x45bbc8;var _0x5f04de,_0x549395;const {text:_0x4feab4,unitId:_0x1ac905}=_0x1cc1d5,_0xcdd3f0=(_0x549395=(_0x5f04de=_0x4feab4['customRanges'])==null?void 0x0:_0x5f04de[_0x2326fd(0xf6)](_0x60c76f=>_0x60c76f[_0x2326fd(0xf9)]===_0x18b87d[_0x2326fd(0x129)][_0x2326fd(0x13b)])[_0x2326fd(0x103)](_0x52b42e=>_0x52b42e[_0x2326fd(0xc7)]))!=null?_0x549395:[],_0x44ecdd=JSON[_0x2326fd(0xee)](_0x4feab4),_0x545b7c=_0x1cc1d5[_0x2326fd(0x145)],_0x3688fa=_0x1cc1d5['id'],_0x1b8825={'memberId':(await this[_0x2326fd(0xda)][_0x2326fd(0x109)](_0x1ac905))[_0x2326fd(0x105)](),'unitId':_0x1ac905,'threadId':_0x545b7c,'mention':_0xcdd3f0,'content':_0x44ecdd,'replyId':_0x3688fa},_0x50cf6b=await this[_0x2326fd(0xff)][_0x2326fd(0x131)](_0x2326fd(0xdc)+_0x1ac905+_0x2326fd(0x146),{'body':_0x1b8825});return!_0x50cf6b[_0x2326fd(0xfe)]['error']||_0x50cf6b[_0x2326fd(0xfe)][_0x2326fd(0xe7)][_0x2326fd(0x12b)]===0x1;}async[_0x45bbc8(0x134)](_0x15070a){const _0x5ae661=_0x45bbc8,{unitId:_0x5c3e73}=_0x15070a,_0xc50f73=_0x15070a[_0x5ae661(0x145)],_0x44e24f={'memberId':this[_0x5ae661(0xe4)][_0x5ae661(0xc2)]()[_0x5ae661(0x12a)],'unitId':_0x5c3e73,'threadId':_0xc50f73,'solved':_0x15070a[_0x5ae661(0xdf)]?_0x42e3c7[_0x5ae661(0x101)]:_0x42e3c7['OpenOrReOpen']},_0x5d373a=await this[_0x5ae661(0xff)][_0x5ae661(0x131)]('/universer-api/comment/unit/'+_0x5c3e73+_0x5ae661(0x125),{'body':_0x44e24f});return!_0x5d373a['body'][_0x5ae661(0xe7)]||_0x5d373a[_0x5ae661(0xfe)][_0x5ae661(0xe7)][_0x5ae661(0x12b)]===0x1;}async['deleteComment'](_0x4d893c,_0x33d209,_0x5ceea2,_0x19ff59){const _0x4864f8=_0x45bbc8,_0x27116d={'memberId':(await this[_0x4864f8(0xda)][_0x4864f8(0x109)](_0x4d893c))[_0x4864f8(0x105)](),'threadId':_0x5ceea2,'replyId':_0x19ff59,'unitId':_0x4d893c},_0x39c487=await this[_0x4864f8(0xff)]['post']('/universer-api/comment/unit/'+_0x4d893c+'/delete',{'body':_0x27116d});return!_0x39c487[_0x4864f8(0xfe)][_0x4864f8(0xe7)]||_0x39c487['body'][_0x4864f8(0xe7)][_0x4864f8(0x12b)]===0x1;}async[_0x45bbc8(0x114)](_0x33dca7,_0x16ed7a,_0x44fc99){const _0x3da7ca=_0x45bbc8,_0x39e5f0={'unitId':_0x33dca7,'threadId':_0x44fc99},_0x5bc64a=await this[_0x3da7ca(0xff)][_0x3da7ca(0x131)](_0x3da7ca(0xdc)+_0x33dca7+_0x3da7ca(0x11f),{'body':_0x39e5f0}),_0x153aee=_0x44fc99[_0x3da7ca(0x103)](_0x1c07f9=>_0x3ee999(_0x5bc64a['body'][_0x3da7ca(0xef)][_0x1c07f9],_0x33dca7,_0x16ed7a))[_0x3da7ca(0xf6)](Boolean);return Object[_0x3da7ca(0x108)](_0x5bc64a[_0x3da7ca(0xfe)][_0x3da7ca(0xc6)])[_0x3da7ca(0x10f)](_0x1b402b=>{const _0x51dfc6=_0x3da7ca;this[_0x51dfc6(0xe4)][_0x51dfc6(0xf3)](_0x1b402b);}),_0x153aee;}['saveCommentToSnapshot'](_0x47c041){const _0xb90822=_0x45bbc8;return{'id':_0x47c041['id'],'threadId':_0x47c041[_0xb90822(0x145)],'ref':_0x47c041[_0xb90822(0x127)]};}};_0x42cf52=_0x12eedb([_0x556478(0x0,_0x18b87d[_0x45bbc8(0xe1)](_0x2f40fe[_0x45bbc8(0x147)])),_0x556478(0x1,_0x18b87d['Inject'](_0x18b87d['UserManagerService'])),_0x556478(0x2,_0x18b87d[_0x45bbc8(0xe1)](_0x5cf2a9[_0x45bbc8(0x12d)]))],_0x42cf52);var _0x382a1c=Object[_0x45bbc8(0x107)],_0x18b226=(_0x3dd4e5,_0x36094f,_0x3326b2,_0x238276)=>{for(var _0x5c1e61=_0x238276>0x1?void 0x0:_0x238276?_0x382a1c(_0x36094f,_0x3326b2):_0x36094f,_0x14ccb0=_0x3dd4e5['length']-0x1,_0x4819f8;_0x14ccb0>=0x0;_0x14ccb0--)(_0x4819f8=_0x3dd4e5[_0x14ccb0])&&(_0x5c1e61=_0x4819f8(_0x5c1e61)||_0x5c1e61);return _0x5c1e61;},_0x2b73a0=(_0x1a9c0b,_0x5c0bba)=>(_0x30c478,_0xfd2015)=>_0x5c0bba(_0x30c478,_0xfd2015,_0x1a9c0b);let _0x2c66bf=class extends _0x18b87d['Disposable']{constructor(_0x4cddc2,_0x367319){const _0x12a461=_0x45bbc8;super(),this[_0x12a461(0x104)]=_0x4cddc2,this[_0x12a461(0x143)]=_0x367319,this[_0x12a461(0x136)]();}['_initDataSource'](){const _0x3837af=_0x45bbc8;this['_threadCommentDataSourceService']['dataSource']=this[_0x3837af(0x143)],this[_0x3837af(0x104)][_0x3837af(0x11b)]=!0x1;}};_0x2c66bf=_0x18b226([_0x2b73a0(0x0,_0x13871c[_0x45bbc8(0x117)]),_0x2b73a0(0x1,_0x18b87d['Inject'](_0x42cf52))],_0x2c66bf);var _0x4534e8=Object[_0x45bbc8(0x122)],_0x393a9a=Object[_0x45bbc8(0x107)],_0x2ef53a=(_0xc86431,_0x422fa3,_0x522e22)=>_0x422fa3 in _0xc86431?_0x4534e8(_0xc86431,_0x422fa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x522e22}):_0xc86431[_0x422fa3]=_0x522e22,_0x36e344=(_0x7a8ce7,_0x2f810e,_0x3ebb1a,_0x404da7)=>{const _0x4e86df=_0x45bbc8;for(var _0x2467fb=_0x404da7>0x1?void 0x0:_0x404da7?_0x393a9a(_0x2f810e,_0x3ebb1a):_0x2f810e,_0x522589=_0x7a8ce7[_0x4e86df(0x14c)]-0x1,_0x285e62;_0x522589>=0x0;_0x522589--)(_0x285e62=_0x7a8ce7[_0x522589])&&(_0x2467fb=_0x285e62(_0x2467fb)||_0x2467fb);return _0x2467fb;},_0x48a535=(_0xeaa2e9,_0x311e8b)=>(_0x2cae75,_0x578435)=>_0x311e8b(_0x2cae75,_0x578435,_0xeaa2e9),_0x3e226e=(_0x9b223c,_0x316786,_0x627a7d)=>_0x2ef53a(_0x9b223c,typeof _0x316786!=_0x45bbc8(0xd8)?_0x316786+'':_0x316786,_0x627a7d);_0x52c4e7[_0x45bbc8(0x112)]=class extends _0x18b87d['Plugin']{constructor(_0x5ca7b3=_0x368bd8,_0x3c48ae,_0x365063){const _0x11d3e2=_0x45bbc8;super(),this[_0x11d3e2(0xfd)]=_0x5ca7b3,this[_0x11d3e2(0x130)]=_0x3c48ae,this[_0x11d3e2(0x13f)]=_0x365063;const {..._0x2ac359}=_0x18b87d[_0x11d3e2(0xdd)]({},_0x368bd8,this[_0x11d3e2(0xfd)]);this[_0x11d3e2(0x13f)]['setConfig'](_0x9ebc1d,_0x2ac359);}['onStarting'](){const _0x4dd376=_0x45bbc8;[[_0x42cf52],[_0x2c66bf],[_0x5dbeb7]][_0x4dd376(0x10f)](_0x447df5=>{const _0x5b1af8=_0x4dd376;this[_0x5b1af8(0x130)][_0x5b1af8(0x133)](_0x447df5);});}['onReady'](){const _0x4de1e0=_0x45bbc8;this['_injector'][_0x4de1e0(0xf0)](_0x2c66bf),this[_0x4de1e0(0x130)][_0x4de1e0(0xf0)](_0x5dbeb7);}},_0x3e226e(_0x52c4e7[_0x45bbc8(0x112)],_0x45bbc8(0xec),_0x1b9a38),_0x3e226e(_0x52c4e7['UniverThreadCommentDataSourcePlugin'],_0x45bbc8(0xd7),_0x18b87d[_0x45bbc8(0x128)][_0x45bbc8(0xf1)]),_0x52c4e7[_0x45bbc8(0x112)]=_0x36e344([_0x18b87d[_0x45bbc8(0x149)](_0x51119c['UniverThreadCommentUIPlugin'],_0x5cf2a9['UniverCollaborationClientPlugin'],_0xbd2b65['UniverLicensePlugin']),_0x48a535(0x1,_0x18b87d[_0x45bbc8(0xe1)](_0x18b87d[_0x45bbc8(0x13e)])),_0x48a535(0x2,_0x18b87d[_0x45bbc8(0xfb)])],_0x52c4e7[_0x45bbc8(0x112)]),Object['defineProperty'](_0x52c4e7,Symbol[_0x45bbc8(0x115)],{'value':_0x45bbc8(0x12f)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.3-experimental.20251205-71d07c3",
3
+ "version": "0.12.3-nightly.202512060617",
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.12.3-experimental.20251205-71d07c3",
49
- "@univerjs/network": "0.12.3-experimental.20251205-71d07c3",
50
- "@univerjs/core": "0.12.3-experimental.20251205-71d07c3",
51
- "@univerjs/thread-comment": "0.12.3-experimental.20251205-71d07c3",
48
+ "@univerjs-pro/collaboration-client": "0.12.3-nightly.202512060617",
49
+ "@univerjs-pro/license": "0.12.3-nightly.202512060617",
50
+ "@univerjs/core": "0.12.3-nightly.202512060617",
51
+ "@univerjs/network": "0.12.3-nightly.202512060617",
52
52
  "@univerjs/protocol": "0.1.47",
53
- "@univerjs/thread-comment-ui": "0.12.3-experimental.20251205-71d07c3",
54
- "@univerjs-pro/license": "0.12.3-experimental.20251205-71d07c3"
53
+ "@univerjs/thread-comment-ui": "0.12.3-nightly.202512060617",
54
+ "@univerjs/thread-comment": "0.12.3-nightly.202512060617"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",