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

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 _0x367232=_0x4df4;(function(_0xd779eb,_0x252f9d){const _0x3f7aa4=_0x4df4,_0x12478=_0xd779eb();while(!![]){try{const _0x3b00bd=-parseInt(_0x3f7aa4(0x1e1))/0x1+parseInt(_0x3f7aa4(0x1b4))/0x2*(-parseInt(_0x3f7aa4(0x1b8))/0x3)+-parseInt(_0x3f7aa4(0x1ab))/0x4*(parseInt(_0x3f7aa4(0x1e5))/0x5)+parseInt(_0x3f7aa4(0x1aa))/0x6*(parseInt(_0x3f7aa4(0x1b5))/0x7)+parseInt(_0x3f7aa4(0x17c))/0x8+parseInt(_0x3f7aa4(0x196))/0x9+parseInt(_0x3f7aa4(0x19a))/0xa*(-parseInt(_0x3f7aa4(0x1dd))/0xb);if(_0x3b00bd===_0x252f9d)break;else _0x12478['push'](_0x12478['shift']());}catch(_0x525dd7){_0x12478['push'](_0x12478['shift']());}}}(_0x450c,0x720d3));Object[_0x367232(0x191)](exports,Symbol[_0x367232(0x16e)],{'value':_0x367232(0x1c8)});const b=require(_0x367232(0x176)),T=require(_0x367232(0x182)),c=require('@univerjs/core'),j=require(_0x367232(0x1c1)),M=require(_0x367232(0x17f)),w=require(_0x367232(0x192)),P=require('@univerjs/network'),U=_0x367232(0x16b);var I=(_0x10cf79=>(_0x10cf79[_0x10cf79[_0x367232(0x1a8)]=0x0]=_0x367232(0x1a8),_0x10cf79[_0x10cf79[_0x367232(0x1c9)]=0x1]='Solved',_0x10cf79[_0x10cf79[_0x367232(0x184)]=-0x1]=_0x367232(0x184),_0x10cf79))(I||{}),v=(_0x5e795c=>(_0x5e795c[_0x5e795c[_0x367232(0x1cd)]=0x0]=_0x367232(0x1cd),_0x5e795c[_0x5e795c[_0x367232(0x16c)]=0x1]='Add',_0x5e795c[_0x5e795c[_0x367232(0x1ad)]=0x2]='Reply',_0x5e795c[_0x5e795c[_0x367232(0x1cb)]=0x3]=_0x367232(0x1cb),_0x5e795c[_0x5e795c['Delete']=0x4]=_0x367232(0x1e0),_0x5e795c[_0x5e795c['Solve']=0x5]=_0x367232(0x1a9),_0x5e795c[_0x5e795c['UNRECOGNIZED']=-0x1]=_0x367232(0x184),_0x5e795c))(v||{});const f=_0xf78c50=>c['dayjs'](new Date(+_0xf78c50))[_0x367232(0x1bd)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2f9629,_0x433fcb)=>{const _0x552865=_0x367232,_0x5dee73=_0x2f9629['get'](c[_0x552865(0x1bc)]),_0x4c792d=_0x2f9629['get'](P['HTTPService']);_0x433fcb[_0x552865(0x1cf)](_0xfb84a5=>{const _0x3cf832=_0x552865;_0x5dee73[_0x3cf832(0x183)](_0xfb84a5)&&_0x433fcb['delete'](_0xfb84a5);}),_0x433fcb['size']&&(await _0x4c792d[_0x552865(0x1bf)](_0x552865(0x1b7),{'params':{'userIDs':[..._0x433fcb]}}))[_0x552865(0x1a0)]['users']['forEach'](_0x155f38=>{const _0x26639b=_0x552865;_0x155f38&&_0x5dee73[_0x26639b(0x1db)](_0x155f38);});};var $=Object[_0x367232(0x1d9)],E=(_0x32bbd9,_0x2a9b0a,_0x87baaf,_0x38eef9)=>{const _0x396d57=_0x367232;for(var _0x278eb5=_0x38eef9>0x1?void 0x0:_0x38eef9?$(_0x2a9b0a,_0x87baaf):_0x2a9b0a,_0x93c396=_0x32bbd9[_0x396d57(0x19f)]-0x1,_0x5f334b;_0x93c396>=0x0;_0x93c396--)(_0x5f334b=_0x32bbd9[_0x93c396])&&(_0x278eb5=_0x5f334b(_0x278eb5)||_0x278eb5);return _0x278eb5;},S=(_0x548bd8,_0x3a51a3)=>(_0x5a542c,_0x3356e0)=>_0x3a51a3(_0x5a542c,_0x3356e0,_0x548bd8);let p=class extends c[_0x367232(0x1ae)]{constructor(_0x33aff1,_0x4c0329,_0x5be9d7,_0x486542){const _0x88a054=_0x367232;super(),this['_commentService']=_0x33aff1,this[_0x88a054(0x175)]=_0x4c0329,this['_userService']=_0x5be9d7,this[_0x88a054(0x17d)]=_0x486542,this[_0x88a054(0x1dc)](),this[_0x88a054(0x1d5)]();}[_0x367232(0x1d5)](){const _0x4e0641=_0x367232;this[_0x4e0641(0x1e4)](this['_threadCommentModel'][_0x4e0641(0x1bb)][_0x4e0641(0x1a7)](w['bufferTime'](0x10))[_0x4e0641(0x1d0)](_0x397734=>{const _0x38657b=_0x4e0641,_0x33eaf7=new Set();_0x397734[_0x38657b(0x1cf)](_0x245203=>{const _0x4c39e3=_0x38657b;switch(_0x245203[_0x4c39e3(0x195)]){case _0x4c39e3(0x1da):{const _0x156d7c=_0x245203[_0x4c39e3(0x190)]['personId'];_0x33eaf7['add'](_0x156d7c);break;}}}),R(this[_0x38657b(0x17d)],_0x33eaf7);}));}[_0x367232(0x1dc)](){const _0x3cdf32=_0x367232;this[_0x3cdf32(0x1e4)](this['_commentService'][_0x3cdf32(0x1bb)][_0x3cdf32(0x1d0)](async _0x50c80a=>{const _0x4d7d2f=_0x3cdf32;var _0x5b725a,_0x5e65a5,_0x2f8222,_0x4e75e3;const _0x3d8d71=(_0x5b725a=this[_0x4d7d2f(0x175)]['getUnit'](_0x50c80a['unitId'])[_0x4d7d2f(0x199)](_0x40ccd1=>_0x40ccd1[_0x4d7d2f(0x1ce)]===_0x50c80a[_0x4d7d2f(0x1ce)]))==null?void 0x0:_0x5b725a[_0x4d7d2f(0x169)];if(!_0x3d8d71)return;const {unitId:_0x31c8c7,subUnitId:_0x4beba0}=_0x3d8d71;switch(_0x50c80a[_0x4d7d2f(0x1c5)]&&this[_0x4d7d2f(0x186)]['addUser'](_0x50c80a['user']),_0x50c80a[_0x4d7d2f(0x195)]){case v[_0x4d7d2f(0x16c)]:break;case v[_0x4d7d2f(0x1ad)]:{this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1a3)](_0x31c8c7,_0x4beba0,{'unitId':_0x31c8c7,'subUnitId':_0x4beba0,'ref':'','id':_0x50c80a[_0x4d7d2f(0x170)],'dT':f(+_0x50c80a[_0x4d7d2f(0x1e6)]),'threadId':_0x50c80a[_0x4d7d2f(0x1ce)],'personId':(_0x2f8222=(_0x5e65a5=_0x50c80a['user'])==null?void 0x0:_0x5e65a5[_0x4d7d2f(0x19d)])!=null?_0x2f8222:_0x50c80a[_0x4d7d2f(0x1cc)],'text':JSON[_0x4d7d2f(0x1ac)](_0x50c80a[_0x4d7d2f(0x1c7)]),'parentId':_0x3d8d71['id']});break;}case v[_0x4d7d2f(0x1e0)]:{const _0x19a54b=this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1d3)](_0x31c8c7,_0x4beba0,_0x50c80a['replyId']);_0x19a54b&&_0x19a54b['parentId']&&this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1b6)](_0x31c8c7,_0x4beba0,_0x50c80a['replyId']);break;}case v[_0x4d7d2f(0x1cb)]:{this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1a2)](_0x31c8c7,_0x4beba0,{'commentId':_0x50c80a[_0x4d7d2f(0x170)],'text':JSON[_0x4d7d2f(0x1ac)](_0x50c80a[_0x4d7d2f(0x1c7)])});break;}case v['Solve']:{const _0x49df2c=(_0x4e75e3=this['_threadCommentModel'][_0x4d7d2f(0x1de)](_0x50c80a['unitId'])[_0x4d7d2f(0x199)](_0x37ec67=>_0x37ec67[_0x4d7d2f(0x1ce)]===_0x50c80a[_0x4d7d2f(0x1ce)]))==null?void 0x0:_0x4e75e3[_0x4d7d2f(0x169)];_0x49df2c&&this[_0x4d7d2f(0x175)][_0x4d7d2f(0x17a)](_0x31c8c7,_0x4beba0,_0x49df2c['id'],_0x50c80a['solved']===I[_0x4d7d2f(0x1c9)]);break;}}}));}};p=E([S(0x0,c[_0x367232(0x173)](b[_0x367232(0x16a)])),S(0x1,c[_0x367232(0x173)](M[_0x367232(0x172)])),S(0x2,c['Inject'](c[_0x367232(0x1bc)])),S(0x3,c['Inject'](c[_0x367232(0x188)]))],p);const q=_0x367232(0x1d8),D={};var A=Object[_0x367232(0x1d9)],x=(_0x46ab0a,_0x4f14c6,_0x33d409,_0x34d104)=>{const _0x4fba65=_0x367232;for(var _0x4fe326=_0x34d104>0x1?void 0x0:_0x34d104?A(_0x4f14c6,_0x33d409):_0x4f14c6,_0x182a6a=_0x46ab0a[_0x4fba65(0x19f)]-0x1,_0x1f8842;_0x182a6a>=0x0;_0x182a6a--)(_0x1f8842=_0x46ab0a[_0x182a6a])&&(_0x4fe326=_0x1f8842(_0x4fe326)||_0x4fe326);return _0x4fe326;},_=(_0x1811fd,_0x10379d)=>(_0x4688b7,_0x35aaef)=>_0x10379d(_0x4688b7,_0x35aaef,_0x1811fd);function Y(_0x18f434,_0x80f676){const _0x4f8b15=_0x367232,_0x49ab0e=_0x18f434[_0x4f8b15(0x1ba)][0x0];return{..._0x80f676,'id':_0x49ab0e[_0x4f8b15(0x170)],'resolved':_0x18f434[_0x4f8b15(0x1ca)]===0x1,'dT':f(_0x49ab0e[_0x4f8b15(0x1e6)]),'personId':_0x49ab0e[_0x4f8b15(0x1cc)],'threadId':_0x49ab0e[_0x4f8b15(0x1ce)]};}function G(_0x2c4374,_0x51abb5,_0xcd3e69){const _0x26b9e7=_0x367232;var _0x11fbc1,_0x4088d1;if(((_0x4088d1=(_0x11fbc1=_0x2c4374==null?void 0x0:_0x2c4374['replies'])==null?void 0x0:_0x11fbc1['length'])!=null?_0x4088d1:0x0)>0x0){const _0x5a8b7b=(_0x3bf35a,_0x22dd5a)=>({'id':_0x3bf35a[_0x26b9e7(0x170)],'threadId':_0x3bf35a[_0x26b9e7(0x1ce)],'dT':f(_0x3bf35a[_0x26b9e7(0x1e6)]),'personId':_0x3bf35a[_0x26b9e7(0x1cc)],'resolved':_0x2c4374['solved']===I[_0x26b9e7(0x1c9)],'unitId':_0x51abb5,'subUnitId':_0xcd3e69,'text':JSON[_0x26b9e7(0x1ac)](_0x3bf35a[_0x26b9e7(0x1c7)]),'parentId':_0x22dd5a}),_0x52b059=_0x5a8b7b(_0x2c4374['replies'][0x0]);return{..._0x52b059,'children':_0x2c4374['replies'][_0x26b9e7(0x198)](0x1)[_0x26b9e7(0x18b)](_0x2eac46=>_0x5a8b7b(_0x2eac46,_0x52b059['id']))};}return null;}let g=class{constructor(_0x34e766,_0x2f96ee,_0x553378,_0x155a29){const _0x241f72=_0x367232;this[_0x241f72(0x1b2)]=_0x34e766,this[_0x241f72(0x186)]=_0x2f96ee,this[_0x241f72(0x1df)]=_0x553378,this['_injector']=_0x155a29;}async[_0x367232(0x1a3)](_0x5564a2){const _0x1a9e03=_0x367232;var _0x1250a5,_0x7bffd4;const {parentId:_0x2daf3d,unitId:_0x1a3909,text:_0x359fcd,threadId:_0x5a5333}=_0x5564a2,_0x2f8a1a=(_0x7bffd4=(_0x1250a5=_0x359fcd[_0x1a9e03(0x1a1)])==null?void 0x0:_0x1250a5[_0x1a9e03(0x1d6)](_0xaa2cc0=>_0xaa2cc0['rangeType']===c[_0x1a9e03(0x19b)][_0x1a9e03(0x1d4)])['map'](_0x3e5099=>_0x3e5099['rangeId']))!=null?_0x7bffd4:[],_0x1c99fa=JSON[_0x1a9e03(0x16d)](_0x359fcd),_0x15a88f=(await this[_0x1a9e03(0x1df)]['requireSession'](_0x1a3909))['getMemberID']();if(_0x2daf3d){const _0x2b9a9e={'memberId':_0x15a88f,'unitId':_0x1a3909,'content':_0x1c99fa,'mention':_0x2f8a1a,'threadId':_0x5a5333},_0x4eaeb3=(await this[_0x1a9e03(0x1b2)][_0x1a9e03(0x179)](_0x1a9e03(0x1e2)+_0x1a3909+_0x1a9e03(0x1c3),{'body':_0x2b9a9e}))[_0x1a9e03(0x1a0)][_0x1a9e03(0x17b)];return{..._0x5564a2,'id':_0x4eaeb3[_0x1a9e03(0x170)],'dT':c[_0x1a9e03(0x1d7)](+_0x4eaeb3['createTimestamp'])[_0x1a9e03(0x1bd)](_0x1a9e03(0x1b1)),'personId':_0x4eaeb3['userId']};}else{const _0x2398c0={'memberId':_0x15a88f,'unitId':_0x1a3909,'content':_0x1c99fa,'mention':_0x2f8a1a},_0x4fe46=await this[_0x1a9e03(0x1b2)][_0x1a9e03(0x179)]('/universer-api/comment/unit/'+_0x1a3909+_0x1a9e03(0x18a),{'body':_0x2398c0});return Y(_0x4fe46[_0x1a9e03(0x1a0)]['comment'],_0x5564a2);}}async[_0x367232(0x1a2)](_0x50b88c){const _0xdaf4bf=_0x367232;var _0x295940,_0x301745;const {text:_0x579139,unitId:_0x2dbaff}=_0x50b88c,_0x3ec79c=(_0x301745=(_0x295940=_0x579139[_0xdaf4bf(0x1a1)])==null?void 0x0:_0x295940[_0xdaf4bf(0x1d6)](_0x59e453=>_0x59e453[_0xdaf4bf(0x19e)]===c[_0xdaf4bf(0x19b)][_0xdaf4bf(0x1d4)])['map'](_0x450c1e=>_0x450c1e['rangeId']))!=null?_0x301745:[],_0x171587=JSON[_0xdaf4bf(0x16d)](_0x579139),_0x2e0ebd=_0x50b88c['threadId'],_0x2139c7=_0x50b88c['id'],_0x294a0d={'memberId':(await this[_0xdaf4bf(0x1df)][_0xdaf4bf(0x178)](_0x2dbaff))[_0xdaf4bf(0x1c6)](),'unitId':_0x2dbaff,'threadId':_0x2e0ebd,'mention':_0x3ec79c,'content':_0x171587,'replyId':_0x2139c7},_0x37ce02=await this['_httpService'][_0xdaf4bf(0x179)](_0xdaf4bf(0x1e2)+_0x2dbaff+_0xdaf4bf(0x197),{'body':_0x294a0d});return!_0x37ce02['body'][_0xdaf4bf(0x193)]||_0x37ce02[_0xdaf4bf(0x1a0)][_0xdaf4bf(0x193)]['code']===0x1;}async[_0x367232(0x17a)](_0x7d1ca8){const _0x29e058=_0x367232,{unitId:_0x23c431}=_0x7d1ca8,_0x307c5e=_0x7d1ca8[_0x29e058(0x1ce)],_0x19eaa3={'memberId':this[_0x29e058(0x186)]['getCurrentUser']()[_0x29e058(0x19d)],'unitId':_0x23c431,'threadId':_0x307c5e,'solved':_0x7d1ca8[_0x29e058(0x185)]?I['Solved']:I[_0x29e058(0x1a8)]},_0x41a8b5=await this[_0x29e058(0x1b2)]['post']('/universer-api/comment/unit/'+_0x23c431+'/solved',{'body':_0x19eaa3});return!_0x41a8b5[_0x29e058(0x1a0)][_0x29e058(0x193)]||_0x41a8b5['body'][_0x29e058(0x193)][_0x29e058(0x18f)]===0x1;}async['deleteComment'](_0x287ca4,_0x27b070,_0x2b611e,_0x44f3a9){const _0x331e72=_0x367232,_0x14fbda={'memberId':(await this[_0x331e72(0x1df)][_0x331e72(0x178)](_0x287ca4))[_0x331e72(0x1c6)](),'threadId':_0x2b611e,'replyId':_0x44f3a9,'unitId':_0x287ca4},_0x219f61=await this[_0x331e72(0x1b2)][_0x331e72(0x179)](_0x331e72(0x1e2)+_0x287ca4+_0x331e72(0x1e3),{'body':_0x14fbda});return!_0x219f61[_0x331e72(0x1a0)]['error']||_0x219f61[_0x331e72(0x1a0)][_0x331e72(0x193)][_0x331e72(0x18f)]===0x1;}async['listComments'](_0x150692,_0x30bd69,_0x53c191){const _0x1e46d4=_0x367232,_0x12cdff={'unitId':_0x150692,'threadId':_0x53c191},_0x4a3321=await this[_0x1e46d4(0x1b2)][_0x1e46d4(0x179)]('/universer-api/comment/unit/'+_0x150692+_0x1e46d4(0x171),{'body':_0x12cdff}),_0x16a2f4=_0x53c191[_0x1e46d4(0x18b)](_0x51ab6d=>G(_0x4a3321['body'][_0x1e46d4(0x174)][_0x51ab6d],_0x150692,_0x30bd69))['filter'](Boolean);return Object[_0x1e46d4(0x1a5)](_0x4a3321[_0x1e46d4(0x1a0)][_0x1e46d4(0x1af)])[_0x1e46d4(0x1cf)](_0x5d6e58=>{const _0x3bd19b=_0x1e46d4;this[_0x3bd19b(0x186)][_0x3bd19b(0x1db)](_0x5d6e58);}),_0x16a2f4;}[_0x367232(0x18c)](_0x4f9dbe){const _0x5b2736=_0x367232;return{'id':_0x4f9dbe['id'],'threadId':_0x4f9dbe['threadId'],'ref':_0x4f9dbe[_0x5b2736(0x1be)]};}};g=x([_(0x0,c[_0x367232(0x173)](P[_0x367232(0x187)])),_(0x1,c[_0x367232(0x173)](c[_0x367232(0x1bc)])),_(0x2,c[_0x367232(0x173)](b[_0x367232(0x1b0)])),_(0x3,c[_0x367232(0x173)](c[_0x367232(0x188)]))],g);var H=Object[_0x367232(0x1d9)],J=(_0x2fc280,_0x261b27,_0x54d2f4,_0x53fcff)=>{const _0x1b746b=_0x367232;for(var _0x280d01=_0x53fcff>0x1?void 0x0:_0x53fcff?H(_0x261b27,_0x54d2f4):_0x261b27,_0x5d46bb=_0x2fc280[_0x1b746b(0x19f)]-0x1,_0x1dc319;_0x5d46bb>=0x0;_0x5d46bb--)(_0x1dc319=_0x2fc280[_0x5d46bb])&&(_0x280d01=_0x1dc319(_0x280d01)||_0x280d01);return _0x280d01;},y=(_0x1d96ae,_0x3a825b)=>(_0x46d80e,_0x27cc00)=>_0x3a825b(_0x46d80e,_0x27cc00,_0x1d96ae);let C=class extends c[_0x367232(0x1ae)]{constructor(_0x5a9de0,_0x3385bd){const _0x55c606=_0x367232;super(),this[_0x55c606(0x189)]=_0x5a9de0,this[_0x55c606(0x19c)]=_0x3385bd,this[_0x55c606(0x177)]();}[_0x367232(0x177)](){const _0x1bde51=_0x367232;this[_0x1bde51(0x189)]['dataSource']=this['_threadCommentDataSource'],this[_0x1bde51(0x189)][_0x1bde51(0x1d2)]=!0x1;}};C=J([y(0x0,M[_0x367232(0x1c4)]),y(0x1,c[_0x367232(0x173)](g))],C);function _0x4df4(_0x3b5c,_0x151c53){const _0x450c85=_0x450c();return _0x4df4=function(_0x4df499,_0x24f296){_0x4df499=_0x4df499-0x169;let _0x45c2d9=_0x450c85[_0x4df499];return _0x45c2d9;},_0x4df4(_0x3b5c,_0x151c53);}var F=Object[_0x367232(0x191)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1e259b,_0xeb17b6,_0x228973)=>_0xeb17b6 in _0x1e259b?F(_0x1e259b,_0xeb17b6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x228973}):_0x1e259b[_0xeb17b6]=_0x228973,W=(_0x5935a5,_0x5059f3,_0x5a8cd1,_0x4d5912)=>{const _0x1d3291=_0x367232;for(var _0x2720c5=_0x4d5912>0x1?void 0x0:_0x4d5912?L(_0x5059f3,_0x5a8cd1):_0x5059f3,_0x270789=_0x5935a5[_0x1d3291(0x19f)]-0x1,_0x23e82d;_0x270789>=0x0;_0x270789--)(_0x23e82d=_0x5935a5[_0x270789])&&(_0x2720c5=_0x23e82d(_0x2720c5)||_0x2720c5);return _0x2720c5;},O=(_0x2d0980,_0x1d1bf5)=>(_0x2e1606,_0x4c8a9d)=>_0x1d1bf5(_0x2e1606,_0x4c8a9d,_0x2d0980),N=(_0x4c539a,_0x438c06,_0x38f44a)=>Z(_0x4c539a,typeof _0x438c06!=_0x367232(0x180)?_0x438c06+'':_0x438c06,_0x38f44a);function _0x450c(){const _0x46f1d2=['@univerjs-pro/collaboration-client','_initDataSource','requireSession','post','resolveComment','reply','5937424SxOccx','_injector','_config','@univerjs/thread-comment','symbol','UniverCollaborationClientPlugin','@univerjs-pro/license','getUser','UNRECOGNIZED','resolved','_userService','HTTPService','Injector','_threadCommentDataSourceService','/add','map','saveCommentToSnapshot','pluginName','UniverThreadCommentUIPlugin','code','payload','defineProperty','rxjs','error','merge','type','3933198ezbhkc','/edit','slice','find','116890diYOvf','CustomRangeType','_threadCommentDataSource','userID','rangeType','length','body','customRanges','updateComment','addComment','setConfig','values','UniverLicensePlugin','pipe','OpenOrReOpen','Solve','12InTdQn','569684WXiHiy','parse','Reply','Disposable','users','CollaborationSessionService','YYYY/MM/DD\x20HH:mm','_httpService','UniverThreadCommentDataSourcePlugin','2uyETmo','2239531KDaknz','deleteComment','/universer-api/user/list','527997ERGHRt','UniverInstanceType','replies','commentUpdate$','UserManagerService','format','ref','get','IConfigService','@univerjs/thread-comment-ui','_configService','/reply','IThreadCommentDataSourceService','user','getMemberID','content','Module','Solved','solved','Edit','userId','Unknown','threadId','forEach','subscribe','Plugin','syncUpdateMutationToColla','getComment','COMMENT','_initUserSync','filter','dayjs','thread-comment-data-source.config','getOwnPropertyDescriptor','add','addUser','_init','275MbHFay','getUnit','_sessionService','Delete','741266feTEPI','/universer-api/comment/unit/','/delete','disposeWithMe','5jaSmib','createTimestamp','root','CommentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','stringify','toStringTag','UNIVER_UNKNOWN','replyId','/list','ThreadCommentModel','Inject','comments','_threadCommentModel'];_0x450c=function(){return _0x46f1d2;};return _0x450c();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x367232(0x1d1)]{constructor(_0x3b7606=D,_0x1152ca,_0x3c736e){const _0x5c9dff=_0x367232;super(),this[_0x5c9dff(0x17e)]=_0x3b7606,this[_0x5c9dff(0x17d)]=_0x1152ca,this[_0x5c9dff(0x1c2)]=_0x3c736e;const {..._0x2a21aa}=c[_0x5c9dff(0x194)]({},D,this[_0x5c9dff(0x17e)]);this['_configService'][_0x5c9dff(0x1a4)](q,_0x2a21aa);}['onStarting'](){const _0x57b935=_0x367232;[[g],[C],[p]][_0x57b935(0x1cf)](_0x43b0d8=>{const _0x497ab3=_0x57b935;this[_0x497ab3(0x17d)][_0x497ab3(0x1da)](_0x43b0d8);});}['onReady'](){const _0x28ec21=_0x367232;this['_injector'][_0x28ec21(0x1bf)](C),this[_0x28ec21(0x17d)]['get'](p);}},N(exports[_0x367232(0x1b3)],_0x367232(0x18d),U),N(exports[_0x367232(0x1b3)],_0x367232(0x195),c[_0x367232(0x1b9)][_0x367232(0x16f)]),exports[_0x367232(0x1b3)]=W([c['DependentOn'](j[_0x367232(0x18e)],b[_0x367232(0x181)],T[_0x367232(0x1a6)]),O(0x1,c[_0x367232(0x173)](c[_0x367232(0x188)])),O(0x2,c[_0x367232(0x1c0)])],exports[_0x367232(0x1b3)]);
1
+ 'use strict';const _0x30cd26=_0x1c7d;(function(_0x565df1,_0x149dd3){const _0x3b6e75=_0x1c7d,_0x50f536=_0x565df1();while(!![]){try{const _0x280626=-parseInt(_0x3b6e75(0x16e))/0x1+parseInt(_0x3b6e75(0x1ca))/0x2+-parseInt(_0x3b6e75(0x1c8))/0x3+-parseInt(_0x3b6e75(0x1bb))/0x4+parseInt(_0x3b6e75(0x1a7))/0x5*(-parseInt(_0x3b6e75(0x1af))/0x6)+parseInt(_0x3b6e75(0x187))/0x7*(parseInt(_0x3b6e75(0x16a))/0x8)+parseInt(_0x3b6e75(0x1cc))/0x9;if(_0x280626===_0x149dd3)break;else _0x50f536['push'](_0x50f536['shift']());}catch(_0x41e2ea){_0x50f536['push'](_0x50f536['shift']());}}}(_0x4690,0x6cf58));Object[_0x30cd26(0x1b8)](exports,Symbol[_0x30cd26(0x181)],{'value':_0x30cd26(0x199)});const b=require(_0x30cd26(0x1c2)),T=require(_0x30cd26(0x1cf)),c=require(_0x30cd26(0x1df)),j=require(_0x30cd26(0x179)),M=require(_0x30cd26(0x1c5)),w=require(_0x30cd26(0x18d)),P=require(_0x30cd26(0x17e)),U=_0x30cd26(0x1ac);var I=(_0x3237aa=>(_0x3237aa[_0x3237aa['OpenOrReOpen']=0x0]=_0x30cd26(0x1b1),_0x3237aa[_0x3237aa['Solved']=0x1]=_0x30cd26(0x171),_0x3237aa[_0x3237aa[_0x30cd26(0x1da)]=-0x1]='UNRECOGNIZED',_0x3237aa))(I||{}),v=(_0x196f45=>(_0x196f45[_0x196f45[_0x30cd26(0x188)]=0x0]=_0x30cd26(0x188),_0x196f45[_0x196f45[_0x30cd26(0x1d8)]=0x1]='Add',_0x196f45[_0x196f45['Reply']=0x2]=_0x30cd26(0x18c),_0x196f45[_0x196f45['Edit']=0x3]=_0x30cd26(0x1d7),_0x196f45[_0x196f45[_0x30cd26(0x1b3)]=0x4]=_0x30cd26(0x1b3),_0x196f45[_0x196f45[_0x30cd26(0x1be)]=0x5]='Solve',_0x196f45[_0x196f45[_0x30cd26(0x1da)]=-0x1]=_0x30cd26(0x1da),_0x196f45))(v||{});const f=_0x3365ca=>c[_0x30cd26(0x1c6)](new Date(+_0x3365ca))[_0x30cd26(0x1bd)](_0x30cd26(0x1c0)),R=async(_0x4c51b6,_0x59cfe2)=>{const _0x4d1a78=_0x30cd26,_0x2621ab=_0x4c51b6[_0x4d1a78(0x1a4)](c['UserManagerService']),_0x44b102=_0x4c51b6[_0x4d1a78(0x1a4)](P['HTTPService']);_0x59cfe2[_0x4d1a78(0x1d6)](_0x1e63ac=>{_0x2621ab['getUser'](_0x1e63ac)&&_0x59cfe2['delete'](_0x1e63ac);}),_0x59cfe2[_0x4d1a78(0x180)]&&(await _0x44b102[_0x4d1a78(0x1a4)](_0x4d1a78(0x19d),{'params':{'userIDs':[..._0x59cfe2]}}))[_0x4d1a78(0x19c)][_0x4d1a78(0x192)]['forEach'](_0x1326cf=>{const _0x2004ac=_0x4d1a78;_0x1326cf&&_0x2621ab[_0x2004ac(0x19e)](_0x1326cf);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x117d20,_0x3dcbe7,_0x1593d1,_0x299827)=>{const _0x347834=_0x30cd26;for(var _0xfaa55e=_0x299827>0x1?void 0x0:_0x299827?$(_0x3dcbe7,_0x1593d1):_0x3dcbe7,_0x57a01c=_0x117d20[_0x347834(0x161)]-0x1,_0x5b6449;_0x57a01c>=0x0;_0x57a01c--)(_0x5b6449=_0x117d20[_0x57a01c])&&(_0xfaa55e=_0x5b6449(_0xfaa55e)||_0xfaa55e);return _0xfaa55e;},S=(_0xd57901,_0x4766f6)=>(_0x13e635,_0x5c7e84)=>_0x4766f6(_0x13e635,_0x5c7e84,_0xd57901);function _0x1c7d(_0x12d405,_0x11aaf2){const _0x4690ef=_0x4690();return _0x1c7d=function(_0x1c7d58,_0x22c36c){_0x1c7d58=_0x1c7d58-0x160;let _0x3cc8e9=_0x4690ef[_0x1c7d58];return _0x3cc8e9;},_0x1c7d(_0x12d405,_0x11aaf2);}let p=class extends c[_0x30cd26(0x1a8)]{constructor(_0x26ae39,_0x13fe5f,_0x36356f,_0x28ce6b){const _0x56e983=_0x30cd26;super(),this[_0x56e983(0x1e0)]=_0x26ae39,this['_threadCommentModel']=_0x13fe5f,this['_userService']=_0x36356f,this[_0x56e983(0x18e)]=_0x28ce6b,this[_0x56e983(0x1c4)](),this[_0x56e983(0x1bf)]();}[_0x30cd26(0x1bf)](){const _0x2d1ff9=_0x30cd26;this[_0x2d1ff9(0x163)](this['_threadCommentModel'][_0x2d1ff9(0x1a0)][_0x2d1ff9(0x1b5)](w[_0x2d1ff9(0x1cd)](0x10))[_0x2d1ff9(0x183)](_0x49d741=>{const _0xe72ce0=_0x2d1ff9,_0x1d567c=new Set();_0x49d741[_0xe72ce0(0x1d6)](_0x596871=>{const _0x38a62d=_0xe72ce0;switch(_0x596871[_0x38a62d(0x189)]){case _0x38a62d(0x172):{const _0x4bda80=_0x596871[_0x38a62d(0x1e1)][_0x38a62d(0x16b)];_0x1d567c['add'](_0x4bda80);break;}}}),R(this[_0xe72ce0(0x18e)],_0x1d567c);}));}[_0x30cd26(0x1c4)](){const _0x13147a=_0x30cd26;this[_0x13147a(0x163)](this['_commentService'][_0x13147a(0x1a0)][_0x13147a(0x183)](async _0x5bf622=>{const _0x57ad11=_0x13147a;var _0xdc88d3,_0x1109fa,_0x4c415f,_0x5a2c22;const _0x5c7d4e=(_0xdc88d3=this[_0x57ad11(0x173)]['getUnit'](_0x5bf622[_0x57ad11(0x196)])['find'](_0x12f4c3=>_0x12f4c3['threadId']===_0x5bf622[_0x57ad11(0x170)]))==null?void 0x0:_0xdc88d3['root'];if(!_0x5c7d4e)return;const {unitId:_0x40655c,subUnitId:_0x55b96f}=_0x5c7d4e;switch(_0x5bf622[_0x57ad11(0x1d2)]&&this[_0x57ad11(0x1d1)]['addUser'](_0x5bf622['user']),_0x5bf622['type']){case v['Add']:break;case v[_0x57ad11(0x18c)]:{this[_0x57ad11(0x173)]['addComment'](_0x40655c,_0x55b96f,{'unitId':_0x40655c,'subUnitId':_0x55b96f,'ref':'','id':_0x5bf622[_0x57ad11(0x1b9)],'dT':f(+_0x5bf622['createTimestamp']),'threadId':_0x5bf622['threadId'],'personId':(_0x4c415f=(_0x1109fa=_0x5bf622[_0x57ad11(0x1d2)])==null?void 0x0:_0x1109fa['userID'])!=null?_0x4c415f:_0x5bf622[_0x57ad11(0x198)],'text':JSON[_0x57ad11(0x17a)](_0x5bf622[_0x57ad11(0x175)]),'parentId':_0x5c7d4e['id']});break;}case v['Delete']:{const _0x377e22=this[_0x57ad11(0x173)][_0x57ad11(0x197)](_0x40655c,_0x55b96f,_0x5bf622[_0x57ad11(0x1b9)]);_0x377e22&&_0x377e22[_0x57ad11(0x1dc)]&&this[_0x57ad11(0x173)][_0x57ad11(0x1aa)](_0x40655c,_0x55b96f,_0x5bf622[_0x57ad11(0x1b9)]);break;}case v[_0x57ad11(0x1d7)]:{this[_0x57ad11(0x173)][_0x57ad11(0x1bc)](_0x40655c,_0x55b96f,{'commentId':_0x5bf622[_0x57ad11(0x1b9)],'text':JSON[_0x57ad11(0x17a)](_0x5bf622[_0x57ad11(0x175)])});break;}case v[_0x57ad11(0x1be)]:{const _0x3057ff=(_0x5a2c22=this['_threadCommentModel'][_0x57ad11(0x1a2)](_0x5bf622['unitId'])[_0x57ad11(0x165)](_0x1b9840=>_0x1b9840['threadId']===_0x5bf622[_0x57ad11(0x170)]))==null?void 0x0:_0x5a2c22[_0x57ad11(0x1a6)];_0x3057ff&&this[_0x57ad11(0x173)][_0x57ad11(0x164)](_0x40655c,_0x55b96f,_0x3057ff['id'],_0x5bf622[_0x57ad11(0x1b2)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x30cd26(0x1a1)](b[_0x30cd26(0x166)])),S(0x1,c[_0x30cd26(0x1a1)](M[_0x30cd26(0x1c9)])),S(0x2,c[_0x30cd26(0x1a1)](c['UserManagerService'])),S(0x3,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x185)]))],p);const q=_0x30cd26(0x1dd),D={};var A=Object[_0x30cd26(0x195)],x=(_0x6064ec,_0x5c2f2e,_0x431713,_0x1657b7)=>{const _0x212579=_0x30cd26;for(var _0x1a1c5e=_0x1657b7>0x1?void 0x0:_0x1657b7?A(_0x5c2f2e,_0x431713):_0x5c2f2e,_0x447df0=_0x6064ec[_0x212579(0x161)]-0x1,_0x6da1e;_0x447df0>=0x0;_0x447df0--)(_0x6da1e=_0x6064ec[_0x447df0])&&(_0x1a1c5e=_0x6da1e(_0x1a1c5e)||_0x1a1c5e);return _0x1a1c5e;},_=(_0xaf6d24,_0x145a71)=>(_0x5527f1,_0x512622)=>_0x145a71(_0x5527f1,_0x512622,_0xaf6d24);function Y(_0x2ea7bc,_0x47ecdf){const _0x188c24=_0x30cd26,_0x10ad6d=_0x2ea7bc[_0x188c24(0x169)][0x0];return{..._0x47ecdf,'id':_0x10ad6d[_0x188c24(0x1b9)],'resolved':_0x2ea7bc[_0x188c24(0x1b2)]===0x1,'dT':f(_0x10ad6d[_0x188c24(0x1b0)]),'personId':_0x10ad6d[_0x188c24(0x198)],'threadId':_0x10ad6d[_0x188c24(0x170)]};}function G(_0x2be311,_0x2335d6,_0x13d896){const _0x1c2166=_0x30cd26;var _0x4938d7,_0x54d7de;if(((_0x54d7de=(_0x4938d7=_0x2be311==null?void 0x0:_0x2be311['replies'])==null?void 0x0:_0x4938d7[_0x1c2166(0x161)])!=null?_0x54d7de:0x0)>0x0){const _0x1e1fec=(_0x2a8b19,_0x590405)=>({'id':_0x2a8b19['replyId'],'threadId':_0x2a8b19['threadId'],'dT':f(_0x2a8b19[_0x1c2166(0x1b0)]),'personId':_0x2a8b19[_0x1c2166(0x198)],'resolved':_0x2be311['solved']===I['Solved'],'unitId':_0x2335d6,'subUnitId':_0x13d896,'text':JSON[_0x1c2166(0x17a)](_0x2a8b19[_0x1c2166(0x175)]),'parentId':_0x590405}),_0x4036d0=_0x1e1fec(_0x2be311[_0x1c2166(0x169)][0x0]);return{..._0x4036d0,'children':_0x2be311['replies']['slice'](0x1)[_0x1c2166(0x19a)](_0x59b294=>_0x1e1fec(_0x59b294,_0x4036d0['id']))};}return null;}let g=class{constructor(_0x48dc46,_0x191903,_0x4da51c,_0x2b850a){const _0x12b89c=_0x30cd26;this['_httpService']=_0x48dc46,this[_0x12b89c(0x1d1)]=_0x191903,this[_0x12b89c(0x1a3)]=_0x4da51c,this[_0x12b89c(0x18e)]=_0x2b850a;}async['addComment'](_0x3a0fd8){const _0x44ca1b=_0x30cd26;var _0x349959,_0x2810ce;const {parentId:_0x51ec4d,unitId:_0x57aa42,text:_0x2438e2,threadId:_0x21e5e7}=_0x3a0fd8,_0x360023=(_0x2810ce=(_0x349959=_0x2438e2[_0x44ca1b(0x1ae)])==null?void 0x0:_0x349959[_0x44ca1b(0x18a)](_0x1fa900=>_0x1fa900[_0x44ca1b(0x178)]===c[_0x44ca1b(0x184)]['COMMENT'])[_0x44ca1b(0x19a)](_0x303d21=>_0x303d21[_0x44ca1b(0x1d5)]))!=null?_0x2810ce:[],_0x336dc1=JSON[_0x44ca1b(0x160)](_0x2438e2),_0x899a80=(await this[_0x44ca1b(0x1a3)]['requireSession'](_0x57aa42))[_0x44ca1b(0x17c)]();if(_0x51ec4d){const _0x1441fc={'memberId':_0x899a80,'unitId':_0x57aa42,'content':_0x336dc1,'mention':_0x360023,'threadId':_0x21e5e7},_0x22d9d1=(await this[_0x44ca1b(0x1b7)][_0x44ca1b(0x1d0)](_0x44ca1b(0x168)+_0x57aa42+_0x44ca1b(0x1ce),{'body':_0x1441fc}))[_0x44ca1b(0x19c)]['reply'];return{..._0x3a0fd8,'id':_0x22d9d1[_0x44ca1b(0x1b9)],'dT':c[_0x44ca1b(0x1c6)](+_0x22d9d1[_0x44ca1b(0x1b0)])[_0x44ca1b(0x1bd)](_0x44ca1b(0x1c0)),'personId':_0x22d9d1[_0x44ca1b(0x198)]};}else{const _0x384678={'memberId':_0x899a80,'unitId':_0x57aa42,'content':_0x336dc1,'mention':_0x360023},_0x5f5c15=await this['_httpService'][_0x44ca1b(0x1d0)](_0x44ca1b(0x168)+_0x57aa42+_0x44ca1b(0x1d9),{'body':_0x384678});return Y(_0x5f5c15[_0x44ca1b(0x19c)]['comment'],_0x3a0fd8);}}async[_0x30cd26(0x1bc)](_0x13b212){const _0x33e816=_0x30cd26;var _0xbcfa8,_0x30716c;const {text:_0x3629b6,unitId:_0x48e2ae}=_0x13b212,_0x1df643=(_0x30716c=(_0xbcfa8=_0x3629b6['customRanges'])==null?void 0x0:_0xbcfa8[_0x33e816(0x18a)](_0x3ce110=>_0x3ce110[_0x33e816(0x178)]===c[_0x33e816(0x184)][_0x33e816(0x17d)])['map'](_0x53dcae=>_0x53dcae[_0x33e816(0x1d5)]))!=null?_0x30716c:[],_0x566823=JSON['stringify'](_0x3629b6),_0x309dbe=_0x13b212[_0x33e816(0x170)],_0x2fb104=_0x13b212['id'],_0x517261={'memberId':(await this['_sessionService']['requireSession'](_0x48e2ae))[_0x33e816(0x17c)](),'unitId':_0x48e2ae,'threadId':_0x309dbe,'mention':_0x1df643,'content':_0x566823,'replyId':_0x2fb104},_0x56e023=await this[_0x33e816(0x1b7)]['post']('/universer-api/comment/unit/'+_0x48e2ae+'/edit',{'body':_0x517261});return!_0x56e023[_0x33e816(0x19c)][_0x33e816(0x18b)]||_0x56e023[_0x33e816(0x19c)]['error'][_0x33e816(0x16f)]===0x1;}async[_0x30cd26(0x164)](_0x5e49c9){const _0x1c6d4b=_0x30cd26,{unitId:_0x4b480c}=_0x5e49c9,_0x1f0f72=_0x5e49c9[_0x1c6d4b(0x170)],_0x2c1a7f={'memberId':this[_0x1c6d4b(0x1d1)][_0x1c6d4b(0x17b)]()[_0x1c6d4b(0x1d3)],'unitId':_0x4b480c,'threadId':_0x1f0f72,'solved':_0x5e49c9[_0x1c6d4b(0x177)]?I[_0x1c6d4b(0x171)]:I['OpenOrReOpen']},_0x20b34c=await this[_0x1c6d4b(0x1b7)][_0x1c6d4b(0x1d0)](_0x1c6d4b(0x168)+_0x4b480c+_0x1c6d4b(0x1cb),{'body':_0x2c1a7f});return!_0x20b34c[_0x1c6d4b(0x19c)][_0x1c6d4b(0x18b)]||_0x20b34c[_0x1c6d4b(0x19c)][_0x1c6d4b(0x18b)][_0x1c6d4b(0x16f)]===0x1;}async['deleteComment'](_0x52b489,_0x49fd05,_0x243fee,_0x5847fb){const _0x5ece00=_0x30cd26,_0x17100d={'memberId':(await this['_sessionService'][_0x5ece00(0x194)](_0x52b489))[_0x5ece00(0x17c)](),'threadId':_0x243fee,'replyId':_0x5847fb,'unitId':_0x52b489},_0x243760=await this[_0x5ece00(0x1b7)][_0x5ece00(0x1d0)](_0x5ece00(0x168)+_0x52b489+_0x5ece00(0x17f),{'body':_0x17100d});return!_0x243760[_0x5ece00(0x19c)][_0x5ece00(0x18b)]||_0x243760[_0x5ece00(0x19c)]['error']['code']===0x1;}async['listComments'](_0x544dac,_0x37327b,_0x2bba40){const _0xc3a720=_0x30cd26,_0xb79003={'unitId':_0x544dac,'threadId':_0x2bba40},_0x1a2bd7=await this[_0xc3a720(0x1b7)]['post'](_0xc3a720(0x168)+_0x544dac+_0xc3a720(0x1ab),{'body':_0xb79003}),_0x27b7af=_0x2bba40[_0xc3a720(0x19a)](_0x498c58=>G(_0x1a2bd7['body']['comments'][_0x498c58],_0x544dac,_0x37327b))[_0xc3a720(0x18a)](Boolean);return Object[_0xc3a720(0x1c7)](_0x1a2bd7[_0xc3a720(0x19c)][_0xc3a720(0x192)])[_0xc3a720(0x1d6)](_0x2e9256=>{const _0x3bd834=_0xc3a720;this[_0x3bd834(0x1d1)]['addUser'](_0x2e9256);}),_0x27b7af;}[_0x30cd26(0x174)](_0x8a90b2){return{'id':_0x8a90b2['id'],'threadId':_0x8a90b2['threadId'],'ref':_0x8a90b2['ref']};}};g=x([_(0x0,c['Inject'](P[_0x30cd26(0x1ad)])),_(0x1,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x186)])),_(0x2,c[_0x30cd26(0x1a1)](b[_0x30cd26(0x19f)])),_(0x3,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x185)]))],g);var H=Object[_0x30cd26(0x195)],J=(_0x162238,_0x1d0780,_0x5332a9,_0x2aa5ab)=>{const _0x4d715f=_0x30cd26;for(var _0x5851e9=_0x2aa5ab>0x1?void 0x0:_0x2aa5ab?H(_0x1d0780,_0x5332a9):_0x1d0780,_0x4377b3=_0x162238[_0x4d715f(0x161)]-0x1,_0x1ecdef;_0x4377b3>=0x0;_0x4377b3--)(_0x1ecdef=_0x162238[_0x4377b3])&&(_0x5851e9=_0x1ecdef(_0x5851e9)||_0x5851e9);return _0x5851e9;},y=(_0x21913c,_0x3254a0)=>(_0x3592a2,_0x3d060d)=>_0x3254a0(_0x3592a2,_0x3d060d,_0x21913c);let C=class extends c[_0x30cd26(0x1a8)]{constructor(_0x51570e,_0xfa69b6){const _0x5220b6=_0x30cd26;super(),this['_threadCommentDataSourceService']=_0x51570e,this['_threadCommentDataSource']=_0xfa69b6,this[_0x5220b6(0x16d)]();}[_0x30cd26(0x16d)](){const _0x3ab2ce=_0x30cd26;this[_0x3ab2ce(0x193)][_0x3ab2ce(0x182)]=this[_0x3ab2ce(0x16c)],this['_threadCommentDataSourceService'][_0x3ab2ce(0x1b6)]=!0x1;}};C=J([y(0x0,M[_0x30cd26(0x162)]),y(0x1,c[_0x30cd26(0x1a1)](g))],C);var F=Object[_0x30cd26(0x1b8)],L=Object[_0x30cd26(0x195)],Z=(_0x397d5f,_0x1ac877,_0x314435)=>_0x1ac877 in _0x397d5f?F(_0x397d5f,_0x1ac877,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x314435}):_0x397d5f[_0x1ac877]=_0x314435,W=(_0x51073d,_0x122d88,_0x23f6c7,_0x29a753)=>{const _0x140739=_0x30cd26;for(var _0x1ed6b7=_0x29a753>0x1?void 0x0:_0x29a753?L(_0x122d88,_0x23f6c7):_0x122d88,_0x25c601=_0x51073d[_0x140739(0x161)]-0x1,_0x4d6f9b;_0x25c601>=0x0;_0x25c601--)(_0x4d6f9b=_0x51073d[_0x25c601])&&(_0x1ed6b7=_0x4d6f9b(_0x1ed6b7)||_0x1ed6b7);return _0x1ed6b7;},O=(_0x2c9e45,_0x4b1b20)=>(_0x5deee5,_0x4c9b6a)=>_0x4b1b20(_0x5deee5,_0x4c9b6a,_0x2c9e45),N=(_0x218633,_0x19cdc0,_0x1d0f45)=>Z(_0x218633,typeof _0x19cdc0!=_0x30cd26(0x1db)?_0x19cdc0+'':_0x19cdc0,_0x1d0f45);function _0x4690(){const _0x4ad64b=['users','_threadCommentDataSourceService','requireSession','getOwnPropertyDescriptor','unitId','getComment','userId','Module','map','UniverThreadCommentDataSourcePlugin','body','/universer-api/user/list','addUser','CollaborationSessionService','commentUpdate$','Inject','getUnit','_sessionService','get','onStarting','root','25OmhZIT','Disposable','setConfig','deleteComment','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','HTTPService','customRanges','540546jTPMUk','createTimestamp','OpenOrReOpen','solved','Delete','UniverCollaborationClientPlugin','pipe','syncUpdateMutationToColla','_httpService','defineProperty','replyId','Plugin','2729556JKpdRb','updateComment','format','Solve','_initUserSync','YYYY/MM/DD\x20HH:mm','DependentOn','@univerjs-pro/collaboration-client','UniverThreadCommentUIPlugin','_init','@univerjs/thread-comment','dayjs','values','1194417NoFvUd','ThreadCommentModel','856670muPLIt','/solved','16124868WDrdtF','bufferTime','/reply','@univerjs-pro/license','post','_userService','user','userID','_config','rangeId','forEach','Edit','Add','/add','UNRECOGNIZED','symbol','parentId','thread-comment-data-source.config','UniverInstanceType','@univerjs/core','_commentService','payload','stringify','length','IThreadCommentDataSourceService','disposeWithMe','resolveComment','find','CommentService','onReady','/universer-api/comment/unit/','replies','104AmbHkY','personId','_threadCommentDataSource','_initDataSource','473601FLaUbL','code','threadId','Solved','add','_threadCommentModel','saveCommentToSnapshot','content','UNIVER_UNKNOWN','resolved','rangeType','@univerjs/thread-comment-ui','parse','getCurrentUser','getMemberID','COMMENT','@univerjs/network','/delete','size','toStringTag','dataSource','subscribe','CustomRangeType','Injector','UserManagerService','124327dcxRLU','Unknown','type','filter','error','Reply','rxjs','_injector','merge','pluginName','_configService'];_0x4690=function(){return _0x4ad64b;};return _0x4690();}exports[_0x30cd26(0x19b)]=class extends c[_0x30cd26(0x1ba)]{constructor(_0x2c6ed0=D,_0x578323,_0x599aca){const _0x3176b5=_0x30cd26;super(),this[_0x3176b5(0x1d4)]=_0x2c6ed0,this['_injector']=_0x578323,this[_0x3176b5(0x191)]=_0x599aca;const {..._0x2de1be}=c[_0x3176b5(0x18f)]({},D,this[_0x3176b5(0x1d4)]);this[_0x3176b5(0x191)][_0x3176b5(0x1a9)](q,_0x2de1be);}[_0x30cd26(0x1a5)](){[[g],[C],[p]]['forEach'](_0x3e422e=>{const _0x1b7307=_0x1c7d;this['_injector'][_0x1b7307(0x172)](_0x3e422e);});}[_0x30cd26(0x167)](){const _0x2b9c5a=_0x30cd26;this[_0x2b9c5a(0x18e)][_0x2b9c5a(0x1a4)](C),this[_0x2b9c5a(0x18e)]['get'](p);}},N(exports[_0x30cd26(0x19b)],_0x30cd26(0x190),U),N(exports[_0x30cd26(0x19b)],'type',c[_0x30cd26(0x1de)][_0x30cd26(0x176)]),exports[_0x30cd26(0x19b)]=W([c[_0x30cd26(0x1c1)](j[_0x30cd26(0x1c3)],b[_0x30cd26(0x1b4)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x30cd26(0x185)])),O(0x2,c['IConfigService'])],exports[_0x30cd26(0x19b)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x14e8f6=_0x31ff;(function(_0x2481d2,_0x5e0d93){const _0x474d7a=_0x31ff,_0x45e3ad=_0x2481d2();while(!![]){try{const _0x759750=-parseInt(_0x474d7a(0xcc))/0x1*(-parseInt(_0x474d7a(0x118))/0x2)+parseInt(_0x474d7a(0xe9))/0x3*(parseInt(_0x474d7a(0x115))/0x4)+-parseInt(_0x474d7a(0x111))/0x5*(-parseInt(_0x474d7a(0x107))/0x6)+parseInt(_0x474d7a(0xd4))/0x7+parseInt(_0x474d7a(0xf2))/0x8+-parseInt(_0x474d7a(0x123))/0x9+parseInt(_0x474d7a(0xc5))/0xa*(-parseInt(_0x474d7a(0xf4))/0xb);if(_0x759750===_0x5e0d93)break;else _0x45e3ad['push'](_0x45e3ad['shift']());}catch(_0x3b2381){_0x45e3ad['push'](_0x45e3ad['shift']());}}}(_0x2411,0x2c294));import{CommentService as _0x6346bf,CollaborationSessionService as _0x6db0c8,UniverCollaborationClientPlugin as _0x281d67}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fa253}from'@univerjs-pro/license';import{dayjs as _0x47e258,UserManagerService as _0x44233a,Inject as _0x59bc1b,Injector as _0x5ee519,Disposable as _0x4a90c9,CustomRangeType as _0x3d1118,UniverInstanceType as _0x454a2c,DependentOn as _0x4be0bf,IConfigService as _0x38206b,Plugin as _0x41398f,merge as _0xdfd847}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xce439}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23d8a0,IThreadCommentDataSourceService as _0x1f38fa}from'@univerjs/thread-comment';function _0x31ff(_0x2aeb82,_0xbec4c){const _0x2411a4=_0x2411();return _0x31ff=function(_0x31ffb0,_0x2e9983){_0x31ffb0=_0x31ffb0-0xbe;let _0x595ea8=_0x2411a4[_0x31ffb0];return _0x595ea8;},_0x31ff(_0x2aeb82,_0xbec4c);}import{bufferTime as _0x390860}from'rxjs';import{HTTPService as _0x5ae147}from'@univerjs/network';const W=_0x14e8f6(0xee);var I=(_0x541df3=>(_0x541df3[_0x541df3['OpenOrReOpen']=0x0]=_0x14e8f6(0xe3),_0x541df3[_0x541df3[_0x14e8f6(0x104)]=0x1]=_0x14e8f6(0x104),_0x541df3[_0x541df3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x541df3))(I||{}),v=(_0x189f28=>(_0x189f28[_0x189f28[_0x14e8f6(0xf3)]=0x0]=_0x14e8f6(0xf3),_0x189f28[_0x189f28['Add']=0x1]=_0x14e8f6(0xcf),_0x189f28[_0x189f28[_0x14e8f6(0x101)]=0x2]=_0x14e8f6(0x101),_0x189f28[_0x189f28['Edit']=0x3]=_0x14e8f6(0xc1),_0x189f28[_0x189f28[_0x14e8f6(0xfd)]=0x4]=_0x14e8f6(0xfd),_0x189f28[_0x189f28[_0x14e8f6(0xbf)]=0x5]=_0x14e8f6(0xbf),_0x189f28[_0x189f28[_0x14e8f6(0xdd)]=-0x1]=_0x14e8f6(0xdd),_0x189f28))(v||{});const D=_0x5ce6cd=>_0x47e258(new Date(+_0x5ce6cd))[_0x14e8f6(0x109)](_0x14e8f6(0x119)),B=async(_0x1f5dc3,_0x59284a)=>{const _0x3f6c43=_0x14e8f6,_0x19e75=_0x1f5dc3[_0x3f6c43(0xd7)](_0x44233a),_0x4804f3=_0x1f5dc3[_0x3f6c43(0xd7)](_0x5ae147);_0x59284a[_0x3f6c43(0xc4)](_0x5d03ee=>{const _0x417b0c=_0x3f6c43;_0x19e75['getUser'](_0x5d03ee)&&_0x59284a[_0x417b0c(0xd2)](_0x5d03ee);}),_0x59284a[_0x3f6c43(0xd8)]&&(await _0x4804f3[_0x3f6c43(0xd7)](_0x3f6c43(0x116),{'params':{'userIDs':[..._0x59284a]}}))['body'][_0x3f6c43(0xe8)][_0x3f6c43(0xc4)](_0x1c410a=>{const _0x55bced=_0x3f6c43;_0x1c410a&&_0x19e75[_0x55bced(0xff)](_0x1c410a);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x27fa48,_0x26bbfa,_0x68ac5e,_0x726e5a)=>{const _0x3e9f77=_0x14e8f6;for(var _0x233cf1=_0x726e5a>0x1?void 0x0:_0x726e5a?K(_0x26bbfa,_0x68ac5e):_0x26bbfa,_0x1bc118=_0x27fa48[_0x3e9f77(0xd6)]-0x1,_0xd74061;_0x1bc118>=0x0;_0x1bc118--)(_0xd74061=_0x27fa48[_0x1bc118])&&(_0x233cf1=_0xd74061(_0x233cf1)||_0x233cf1);return _0x233cf1;},p=(_0x439f04,_0x4a7d14)=>(_0x5509cd,_0xfd9dc8)=>_0x4a7d14(_0x5509cd,_0xfd9dc8,_0x439f04);let S=class extends _0x4a90c9{constructor(_0x42cbd0,_0x24ed3d,_0x5ce4e4,_0x2e3f9f){const _0x1dd1ff=_0x14e8f6;super(),this[_0x1dd1ff(0xc9)]=_0x42cbd0,this['_threadCommentModel']=_0x24ed3d,this['_userService']=_0x5ce4e4,this[_0x1dd1ff(0xef)]=_0x2e3f9f,this[_0x1dd1ff(0xf5)](),this[_0x1dd1ff(0x11d)]();}['_initUserSync'](){const _0xa92790=_0x14e8f6;this['disposeWithMe'](this[_0xa92790(0x126)][_0xa92790(0xf8)][_0xa92790(0xf1)](_0x390860(0x10))[_0xa92790(0xe1)](_0x50acd0=>{const _0xd46a63=_0xa92790,_0x341e26=new Set();_0x50acd0[_0xd46a63(0xc4)](_0x217e8d=>{const _0x40f8ae=_0xd46a63;switch(_0x217e8d[_0x40f8ae(0xca)]){case _0x40f8ae(0xc2):{const _0x41827d=_0x217e8d[_0x40f8ae(0xdc)][_0x40f8ae(0xeb)];_0x341e26[_0x40f8ae(0xc2)](_0x41827d);break;}}}),B(this[_0xd46a63(0xef)],_0x341e26);}));}[_0x14e8f6(0xf5)](){const _0x38fe3f=_0x14e8f6;this[_0x38fe3f(0x103)](this[_0x38fe3f(0xc9)][_0x38fe3f(0xf8)][_0x38fe3f(0xe1)](async _0x4fd38f=>{const _0x2afcbc=_0x38fe3f;var _0x4fa83d,_0x26eeb6,_0x2aa72e,_0x354d6d;const _0x601859=(_0x4fa83d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])['find'](_0x446e5d=>_0x446e5d[_0x2afcbc(0x10e)]===_0x4fd38f[_0x2afcbc(0x10e)]))==null?void 0x0:_0x4fa83d[_0x2afcbc(0xd9)];if(!_0x601859)return;const {unitId:_0x221cd1,subUnitId:_0xee5ada}=_0x601859;switch(_0x4fd38f[_0x2afcbc(0x113)]&&this[_0x2afcbc(0x122)]['addUser'](_0x4fd38f['user']),_0x4fd38f[_0x2afcbc(0xca)]){case v['Add']:break;case v[_0x2afcbc(0x101)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0x128)](_0x221cd1,_0xee5ada,{'unitId':_0x221cd1,'subUnitId':_0xee5ada,'ref':'','id':_0x4fd38f[_0x2afcbc(0xd3)],'dT':D(+_0x4fd38f['createTimestamp']),'threadId':_0x4fd38f[_0x2afcbc(0x10e)],'personId':(_0x2aa72e=(_0x26eeb6=_0x4fd38f[_0x2afcbc(0x113)])==null?void 0x0:_0x26eeb6['userID'])!=null?_0x2aa72e:_0x4fd38f[_0x2afcbc(0xcd)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f[_0x2afcbc(0xfb)]),'parentId':_0x601859['id']});break;}case v['Delete']:{const _0x318e51=this['_threadCommentModel']['getComment'](_0x221cd1,_0xee5ada,_0x4fd38f['replyId']);_0x318e51&&_0x318e51[_0x2afcbc(0x10c)]&&this[_0x2afcbc(0x126)][_0x2afcbc(0xe2)](_0x221cd1,_0xee5ada,_0x4fd38f[_0x2afcbc(0xd3)]);break;}case v[_0x2afcbc(0xc1)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0xbe)](_0x221cd1,_0xee5ada,{'commentId':_0x4fd38f[_0x2afcbc(0xd3)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f['content'])});break;}case v[_0x2afcbc(0xbf)]:{const _0x458ba9=(_0x354d6d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])[_0x2afcbc(0xd1)](_0x2d0026=>_0x2d0026['threadId']===_0x4fd38f['threadId']))==null?void 0x0:_0x354d6d[_0x2afcbc(0xd9)];_0x458ba9&&this[_0x2afcbc(0x126)][_0x2afcbc(0xc8)](_0x221cd1,_0xee5ada,_0x458ba9['id'],_0x4fd38f[_0x2afcbc(0xcb)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59bc1b(_0x6346bf)),p(0x1,_0x59bc1b(_0x23d8a0)),p(0x2,_0x59bc1b(_0x44233a)),p(0x3,_0x59bc1b(_0x5ee519))],S);const z=_0x14e8f6(0xe0),M={};var k=Object[_0x14e8f6(0x10b)],Q=(_0x20ed71,_0x572fad,_0x49abcf,_0x3f6fbc)=>{for(var _0x13b9c8=_0x3f6fbc>0x1?void 0x0:_0x3f6fbc?k(_0x572fad,_0x49abcf):_0x572fad,_0x31dcc7=_0x20ed71['length']-0x1,_0x1bb3d6;_0x31dcc7>=0x0;_0x31dcc7--)(_0x1bb3d6=_0x20ed71[_0x31dcc7])&&(_0x13b9c8=_0x1bb3d6(_0x13b9c8)||_0x13b9c8);return _0x13b9c8;},_=(_0x3aced9,_0x2dc6c8)=>(_0x408e82,_0x1093c6)=>_0x2dc6c8(_0x408e82,_0x1093c6,_0x3aced9);function X(_0xe2cbb8,_0x14addc){const _0x427158=_0x14e8f6,_0x1c3b6b=_0xe2cbb8[_0x427158(0xf7)][0x0];return{..._0x14addc,'id':_0x1c3b6b[_0x427158(0xd3)],'resolved':_0xe2cbb8[_0x427158(0xcb)]===0x1,'dT':D(_0x1c3b6b[_0x427158(0x102)]),'personId':_0x1c3b6b[_0x427158(0xcd)],'threadId':_0x1c3b6b[_0x427158(0x10e)]};}function ee(_0x305687,_0x5ea6ba,_0x29aff7){const _0x9554fe=_0x14e8f6;var _0x110feb,_0x22a35e;if(((_0x22a35e=(_0x110feb=_0x305687==null?void 0x0:_0x305687['replies'])==null?void 0x0:_0x110feb[_0x9554fe(0xd6)])!=null?_0x22a35e:0x0)>0x0){const _0xc2ce31=(_0x4cb2dd,_0x3995bb)=>({'id':_0x4cb2dd['replyId'],'threadId':_0x4cb2dd[_0x9554fe(0x10e)],'dT':D(_0x4cb2dd[_0x9554fe(0x102)]),'personId':_0x4cb2dd[_0x9554fe(0xcd)],'resolved':_0x305687['solved']===I[_0x9554fe(0x104)],'unitId':_0x5ea6ba,'subUnitId':_0x29aff7,'text':JSON[_0x9554fe(0xed)](_0x4cb2dd['content']),'parentId':_0x3995bb}),_0x464e0b=_0xc2ce31(_0x305687[_0x9554fe(0xf7)][0x0]);return{..._0x464e0b,'children':_0x305687[_0x9554fe(0xf7)][_0x9554fe(0x110)](0x1)[_0x9554fe(0x105)](_0xf966cc=>_0xc2ce31(_0xf966cc,_0x464e0b['id']))};}return null;}let f=class{constructor(_0x20fce9,_0x11385d,_0x46f32b,_0x4854b4){const _0x3bc21f=_0x14e8f6;this[_0x3bc21f(0xc0)]=_0x20fce9,this[_0x3bc21f(0x122)]=_0x11385d,this[_0x3bc21f(0x124)]=_0x46f32b,this[_0x3bc21f(0xef)]=_0x4854b4;}async[_0x14e8f6(0x128)](_0x1851e4){const _0x1e6f03=_0x14e8f6;var _0x3ef62f,_0xb6fb58;const {parentId:_0x328a95,unitId:_0x468f6c,text:_0x25e55f,threadId:_0x558da0}=_0x1851e4,_0x309e67=(_0xb6fb58=(_0x3ef62f=_0x25e55f[_0x1e6f03(0x11b)])==null?void 0x0:_0x3ef62f[_0x1e6f03(0xc7)](_0x245dac=>_0x245dac[_0x1e6f03(0x114)]===_0x3d1118[_0x1e6f03(0x129)])[_0x1e6f03(0x105)](_0x457ca8=>_0x457ca8[_0x1e6f03(0xf6)]))!=null?_0xb6fb58:[],_0x326c60=JSON[_0x1e6f03(0xe6)](_0x25e55f),_0x512e66=(await this['_sessionService'][_0x1e6f03(0xde)](_0x468f6c))[_0x1e6f03(0xfe)]();if(_0x328a95){const _0x475578={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67,'threadId':_0x558da0},_0x4172a6=(await this[_0x1e6f03(0xc0)][_0x1e6f03(0xd5)]('/universer-api/comment/unit/'+_0x468f6c+_0x1e6f03(0x121),{'body':_0x475578}))[_0x1e6f03(0xdf)][_0x1e6f03(0xf0)];return{..._0x1851e4,'id':_0x4172a6['replyId'],'dT':_0x47e258(+_0x4172a6['createTimestamp'])[_0x1e6f03(0x109)](_0x1e6f03(0x119)),'personId':_0x4172a6[_0x1e6f03(0xcd)]};}else{const _0x3b7587={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67},_0x2d686b=await this['_httpService']['post'](_0x1e6f03(0xfa)+_0x468f6c+_0x1e6f03(0xda),{'body':_0x3b7587});return X(_0x2d686b[_0x1e6f03(0xdf)][_0x1e6f03(0x11c)],_0x1851e4);}}async['updateComment'](_0x4d0efc){const _0x3779b0=_0x14e8f6;var _0x4e2acc,_0xe849d6;const {text:_0x32c058,unitId:_0x184b7a}=_0x4d0efc,_0x166c3f=(_0xe849d6=(_0x4e2acc=_0x32c058['customRanges'])==null?void 0x0:_0x4e2acc[_0x3779b0(0xc7)](_0x6a6db2=>_0x6a6db2[_0x3779b0(0x114)]===_0x3d1118[_0x3779b0(0x129)])[_0x3779b0(0x105)](_0x5db9f5=>_0x5db9f5[_0x3779b0(0xf6)]))!=null?_0xe849d6:[],_0x50c451=JSON['stringify'](_0x32c058),_0x4e9ee4=_0x4d0efc[_0x3779b0(0x10e)],_0xada142=_0x4d0efc['id'],_0x423454={'memberId':(await this[_0x3779b0(0x124)]['requireSession'](_0x184b7a))[_0x3779b0(0xfe)](),'unitId':_0x184b7a,'threadId':_0x4e9ee4,'mention':_0x166c3f,'content':_0x50c451,'replyId':_0xada142},_0x4c3a38=await this[_0x3779b0(0xc0)][_0x3779b0(0xd5)](_0x3779b0(0xfa)+_0x184b7a+_0x3779b0(0xea),{'body':_0x423454});return!_0x4c3a38['body'][_0x3779b0(0xfc)]||_0x4c3a38['body'][_0x3779b0(0xfc)]['code']===0x1;}async[_0x14e8f6(0xc8)](_0x2a0fda){const _0x2a1630=_0x14e8f6,{unitId:_0x338ee6}=_0x2a0fda,_0x59efe2=_0x2a0fda['threadId'],_0x1c0d87={'memberId':this['_userService'][_0x2a1630(0x10d)]()[_0x2a1630(0x11e)],'unitId':_0x338ee6,'threadId':_0x59efe2,'solved':_0x2a0fda[_0x2a1630(0xe7)]?I['Solved']:I[_0x2a1630(0xe3)]},_0x160403=await this['_httpService'][_0x2a1630(0xd5)](_0x2a1630(0xfa)+_0x338ee6+_0x2a1630(0xce),{'body':_0x1c0d87});return!_0x160403['body']['error']||_0x160403['body'][_0x2a1630(0xfc)][_0x2a1630(0xf9)]===0x1;}async[_0x14e8f6(0xe2)](_0x4bbe02,_0x1f000e,_0x43eaa0,_0x41aa8c){const _0x2547b1=_0x14e8f6,_0xf17f68={'memberId':(await this[_0x2547b1(0x124)][_0x2547b1(0xde)](_0x4bbe02))['getMemberID'](),'threadId':_0x43eaa0,'replyId':_0x41aa8c,'unitId':_0x4bbe02},_0xa47529=await this[_0x2547b1(0xc0)][_0x2547b1(0xd5)](_0x2547b1(0xfa)+_0x4bbe02+'/delete',{'body':_0xf17f68});return!_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)]||_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)][_0x2547b1(0xf9)]===0x1;}async[_0x14e8f6(0x10f)](_0x1ad2ba,_0x1f4692,_0x15ea54){const _0x15e753=_0x14e8f6,_0x7829de={'unitId':_0x1ad2ba,'threadId':_0x15ea54},_0x36450b=await this['_httpService'][_0x15e753(0xd5)](_0x15e753(0xfa)+_0x1ad2ba+_0x15e753(0x106),{'body':_0x7829de}),_0x5e05a3=_0x15ea54[_0x15e753(0x105)](_0x5ab93c=>ee(_0x36450b[_0x15e753(0xdf)][_0x15e753(0x125)][_0x5ab93c],_0x1ad2ba,_0x1f4692))[_0x15e753(0xc7)](Boolean);return Object[_0x15e753(0xd0)](_0x36450b[_0x15e753(0xdf)][_0x15e753(0xe8)])[_0x15e753(0xc4)](_0x15d45e=>{const _0x54c674=_0x15e753;this[_0x54c674(0x122)][_0x54c674(0xff)](_0x15d45e);}),_0x5e05a3;}['saveCommentToSnapshot'](_0x4ed038){const _0x144f34=_0x14e8f6;return{'id':_0x4ed038['id'],'threadId':_0x4ed038[_0x144f34(0x10e)],'ref':_0x4ed038[_0x144f34(0x100)]};}};f=Q([_(0x0,_0x59bc1b(_0x5ae147)),_(0x1,_0x59bc1b(_0x44233a)),_(0x2,_0x59bc1b(_0x6db0c8)),_(0x3,_0x59bc1b(_0x5ee519))],f);var re=Object[_0x14e8f6(0x10b)],te=(_0x35451d,_0x25aa9b,_0x4eb219,_0x40a5b3)=>{const _0x2cefac=_0x14e8f6;for(var _0x2042e4=_0x40a5b3>0x1?void 0x0:_0x40a5b3?re(_0x25aa9b,_0x4eb219):_0x25aa9b,_0x5d4b81=_0x35451d[_0x2cefac(0xd6)]-0x1,_0x5efc5a;_0x5d4b81>=0x0;_0x5d4b81--)(_0x5efc5a=_0x35451d[_0x5d4b81])&&(_0x2042e4=_0x5efc5a(_0x2042e4)||_0x2042e4);return _0x2042e4;},N=(_0x53ef74,_0x2f595b)=>(_0x1d4661,_0x590e98)=>_0x2f595b(_0x1d4661,_0x590e98,_0x53ef74);let g=class extends _0x4a90c9{constructor(_0x1197db,_0x3b81d4){const _0x9ce958=_0x14e8f6;super(),this[_0x9ce958(0x11a)]=_0x1197db,this[_0x9ce958(0x127)]=_0x3b81d4,this[_0x9ce958(0x12a)]();}[_0x14e8f6(0x12a)](){const _0x179475=_0x14e8f6;this[_0x179475(0x11a)][_0x179475(0x10a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x179475(0xc3)]=!0x1;}};function _0x2411(){const _0x1a0e82=['dataSource','getOwnPropertyDescriptor','parentId','getCurrentUser','threadId','listComments','slice','955NRmKPp','_config','user','rangeType','156YECbnn','/universer-api/user/list','unitId','2hXAWdx','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','customRanges','comment','_initUserSync','userID','onStarting','UNIVER_UNKNOWN','/reply','_userService','2743866aybfYS','_sessionService','comments','_threadCommentModel','_threadCommentDataSource','addComment','COMMENT','_initDataSource','updateComment','Solve','_httpService','Edit','add','syncUpdateMutationToColla','forEach','22960BkdIzD','onReady','filter','resolveComment','_commentService','type','solved','12218aLEqco','userId','/solved','Add','values','find','delete','replyId','478170JPEEaa','post','length','get','size','root','/add','getUnit','payload','UNRECOGNIZED','requireSession','body','thread-comment-data-source.config','subscribe','deleteComment','OpenOrReOpen','defineProperty','setConfig','stringify','resolved','users','12387XioJrk','/edit','personId','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','reply','pipe','2627376ltFMWH','Unknown','2079eJtcOz','_init','rangeId','replies','commentUpdate$','code','/universer-api/comment/unit/','content','error','Delete','getMemberID','addUser','ref','Reply','createTimestamp','disposeWithMe','Solved','map','/list','10986hLOMHH','_configService','format'];_0x2411=function(){return _0x1a0e82;};return _0x2411();}g=te([N(0x0,_0x1f38fa),N(0x1,_0x59bc1b(f))],g);var se=Object[_0x14e8f6(0xe4)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x43cb38,_0x1f3646,_0x42ea57)=>_0x1f3646 in _0x43cb38?se(_0x43cb38,_0x1f3646,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42ea57}):_0x43cb38[_0x1f3646]=_0x42ea57,ie=(_0x375564,_0x1c0104,_0x51397b,_0x108c4f)=>{for(var _0x4d036e=_0x108c4f>0x1?void 0x0:_0x108c4f?oe(_0x1c0104,_0x51397b):_0x1c0104,_0x4a1f92=_0x375564['length']-0x1,_0x14238c;_0x4a1f92>=0x0;_0x4a1f92--)(_0x14238c=_0x375564[_0x4a1f92])&&(_0x4d036e=_0x14238c(_0x4d036e)||_0x4d036e);return _0x4d036e;},w=(_0x179abf,_0x153d70)=>(_0x16f650,_0x46cccf)=>_0x153d70(_0x16f650,_0x46cccf,_0x179abf),$=(_0x3ecd5,_0x2350f5,_0x4ace5b)=>ne(_0x3ecd5,typeof _0x2350f5!=_0x14e8f6(0xec)?_0x2350f5+'':_0x2350f5,_0x4ace5b);let b=class extends _0x41398f{constructor(_0x342318=M,_0x1801b8,_0x150ec8){const _0xc3e8ac=_0x14e8f6;super(),this[_0xc3e8ac(0x112)]=_0x342318,this['_injector']=_0x1801b8,this['_configService']=_0x150ec8;const {..._0x14cfbf}=_0xdfd847({},M,this['_config']);this[_0xc3e8ac(0x108)][_0xc3e8ac(0xe5)](z,_0x14cfbf);}[_0x14e8f6(0x11f)](){const _0x5cb8e6=_0x14e8f6;[[f],[g],[S]][_0x5cb8e6(0xc4)](_0x5459d8=>{const _0x297049=_0x5cb8e6;this[_0x297049(0xef)][_0x297049(0xc2)](_0x5459d8);});}[_0x14e8f6(0xc6)](){const _0xf28336=_0x14e8f6;this[_0xf28336(0xef)][_0xf28336(0xd7)](g),this['_injector'][_0xf28336(0xd7)](S);}};$(b,'pluginName',W),$(b,_0x14e8f6(0xca),_0x454a2c[_0x14e8f6(0x120)]),b=ie([_0x4be0bf(_0xce439,_0x281d67,_0x2fa253),w(0x1,_0x59bc1b(_0x5ee519)),w(0x2,_0x38206b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x228950=_0x496a;(function(_0x2e629a,_0x238f1f){const _0x3b6c98=_0x496a,_0x2be1d7=_0x2e629a();while(!![]){try{const _0x24f24e=parseInt(_0x3b6c98(0x13b))/0x1*(parseInt(_0x3b6c98(0x10b))/0x2)+-parseInt(_0x3b6c98(0x108))/0x3*(parseInt(_0x3b6c98(0x11c))/0x4)+-parseInt(_0x3b6c98(0xfb))/0x5+parseInt(_0x3b6c98(0x11d))/0x6+parseInt(_0x3b6c98(0x153))/0x7+parseInt(_0x3b6c98(0x13e))/0x8*(-parseInt(_0x3b6c98(0x156))/0x9)+-parseInt(_0x3b6c98(0x128))/0xa*(-parseInt(_0x3b6c98(0x11f))/0xb);if(_0x24f24e===_0x238f1f)break;else _0x2be1d7['push'](_0x2be1d7['shift']());}catch(_0x57b745){_0x2be1d7['push'](_0x2be1d7['shift']());}}}(_0x1add,0x5aa94));import{CommentService as _0x775931,CollaborationSessionService as _0x625313,UniverCollaborationClientPlugin as _0x4ce1bf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f5fb3}from'@univerjs-pro/license';import{dayjs as _0x2552d3,UserManagerService as _0x44d1fc,Inject as _0xee2d6d,Injector as _0x4801df,Disposable as _0x48bbe7,CustomRangeType as _0x2cf451,UniverInstanceType as _0x45a423,DependentOn as _0x1fb97b,IConfigService as _0x415962,Plugin as _0x1ef7b8,merge as _0x1ce58b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3e15e4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24ff45,IThreadCommentDataSourceService as _0x2e0912}from'@univerjs/thread-comment';import{bufferTime as _0x3eb001}from'rxjs';import{HTTPService as _0x490830}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4f936b=>(_0x4f936b[_0x4f936b[_0x228950(0x102)]=0x0]=_0x228950(0x102),_0x4f936b[_0x4f936b[_0x228950(0x157)]=0x1]=_0x228950(0x157),_0x4f936b[_0x4f936b[_0x228950(0x140)]=-0x1]=_0x228950(0x140),_0x4f936b))(I||{}),v=(_0x5252ec=>(_0x5252ec[_0x5252ec['Unknown']=0x0]=_0x228950(0x11e),_0x5252ec[_0x5252ec['Add']=0x1]=_0x228950(0x13c),_0x5252ec[_0x5252ec['Reply']=0x2]=_0x228950(0x12d),_0x5252ec[_0x5252ec['Edit']=0x3]=_0x228950(0x111),_0x5252ec[_0x5252ec[_0x228950(0x13a)]=0x4]=_0x228950(0x13a),_0x5252ec[_0x5252ec[_0x228950(0x107)]=0x5]=_0x228950(0x107),_0x5252ec[_0x5252ec['UNRECOGNIZED']=-0x1]=_0x228950(0x140),_0x5252ec))(v||{});const D=_0x227c78=>_0x2552d3(new Date(+_0x227c78))[_0x228950(0x117)](_0x228950(0x12b)),B=async(_0x130a41,_0xc131f9)=>{const _0x1c2f2b=_0x228950,_0x217d33=_0x130a41[_0x1c2f2b(0x121)](_0x44d1fc),_0x390e52=_0x130a41['get'](_0x490830);_0xc131f9[_0x1c2f2b(0x144)](_0x15a4fe=>{const _0x3add9e=_0x1c2f2b;_0x217d33[_0x3add9e(0x131)](_0x15a4fe)&&_0xc131f9[_0x3add9e(0x10f)](_0x15a4fe);}),_0xc131f9['size']&&(await _0x390e52[_0x1c2f2b(0x121)]('/universer-api/user/list',{'params':{'userIDs':[..._0xc131f9]}}))[_0x1c2f2b(0x136)][_0x1c2f2b(0xf3)]['forEach'](_0x294e4e=>{const _0x163187=_0x1c2f2b;_0x294e4e&&_0x217d33[_0x163187(0x118)](_0x294e4e);});};var K=Object[_0x228950(0x130)],V=(_0x39a52b,_0x410db0,_0xa1c7a7,_0x490309)=>{const _0x736133=_0x228950;for(var _0x23f9d8=_0x490309>0x1?void 0x0:_0x490309?K(_0x410db0,_0xa1c7a7):_0x410db0,_0xc15c2b=_0x39a52b[_0x736133(0x137)]-0x1,_0x23f585;_0xc15c2b>=0x0;_0xc15c2b--)(_0x23f585=_0x39a52b[_0xc15c2b])&&(_0x23f9d8=_0x23f585(_0x23f9d8)||_0x23f9d8);return _0x23f9d8;},p=(_0x3864d6,_0xc9cd8f)=>(_0x3ceb27,_0x4df8d5)=>_0xc9cd8f(_0x3ceb27,_0x4df8d5,_0x3864d6);let S=class extends _0x48bbe7{constructor(_0x5ca55d,_0x6a3c64,_0x13c37c,_0x10b2e3){const _0x590ff7=_0x228950;super(),this['_commentService']=_0x5ca55d,this['_threadCommentModel']=_0x6a3c64,this[_0x590ff7(0x110)]=_0x13c37c,this[_0x590ff7(0x112)]=_0x10b2e3,this[_0x590ff7(0x100)](),this[_0x590ff7(0x14f)]();}[_0x228950(0x14f)](){const _0x1d303c=_0x228950;this[_0x1d303c(0x132)](this[_0x1d303c(0x10c)][_0x1d303c(0x10d)]['pipe'](_0x3eb001(0x10))['subscribe'](_0xfbfa45=>{const _0x30213f=_0x1d303c,_0x1c89da=new Set();_0xfbfa45['forEach'](_0x35532d=>{const _0x41539f=_0x496a;switch(_0x35532d[_0x41539f(0x151)]){case'add':{const _0x513d6a=_0x35532d['payload'][_0x41539f(0xff)];_0x1c89da[_0x41539f(0xf2)](_0x513d6a);break;}}}),B(this[_0x30213f(0x112)],_0x1c89da);}));}['_init'](){const _0x224126=_0x228950;this[_0x224126(0x132)](this[_0x224126(0x139)][_0x224126(0x10d)]['subscribe'](async _0x4155a2=>{const _0x9be0da=_0x224126;var _0x44bb25,_0x55532a,_0x4cb58f,_0x42e6eb;const _0xba405b=(_0x44bb25=this['_threadCommentModel'][_0x9be0da(0x115)](_0x4155a2['unitId'])[_0x9be0da(0x109)](_0x4c34f6=>_0x4c34f6['threadId']===_0x4155a2[_0x9be0da(0x105)]))==null?void 0x0:_0x44bb25['root'];if(!_0xba405b)return;const {unitId:_0x3c4cfd,subUnitId:_0x5e3e5f}=_0xba405b;switch(_0x4155a2[_0x9be0da(0x116)]&&this[_0x9be0da(0x110)]['addUser'](_0x4155a2[_0x9be0da(0x116)]),_0x4155a2[_0x9be0da(0x151)]){case v[_0x9be0da(0x13c)]:break;case v['Reply']:{this[_0x9be0da(0x10c)]['addComment'](_0x3c4cfd,_0x5e3e5f,{'unitId':_0x3c4cfd,'subUnitId':_0x5e3e5f,'ref':'','id':_0x4155a2['replyId'],'dT':D(+_0x4155a2[_0x9be0da(0xfe)]),'threadId':_0x4155a2[_0x9be0da(0x105)],'personId':(_0x4cb58f=(_0x55532a=_0x4155a2[_0x9be0da(0x116)])==null?void 0x0:_0x55532a[_0x9be0da(0x14c)])!=null?_0x4cb58f:_0x4155a2[_0x9be0da(0x10a)],'text':JSON['parse'](_0x4155a2[_0x9be0da(0x10e)]),'parentId':_0xba405b['id']});break;}case v['Delete']:{const _0xa3ce9b=this['_threadCommentModel']['getComment'](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);_0xa3ce9b&&_0xa3ce9b[_0x9be0da(0x12f)]&&this[_0x9be0da(0x10c)][_0x9be0da(0x124)](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);break;}case v[_0x9be0da(0x111)]:{this[_0x9be0da(0x10c)][_0x9be0da(0x145)](_0x3c4cfd,_0x5e3e5f,{'commentId':_0x4155a2[_0x9be0da(0x129)],'text':JSON[_0x9be0da(0x104)](_0x4155a2['content'])});break;}case v[_0x9be0da(0x107)]:{const _0x588d31=(_0x42e6eb=this[_0x9be0da(0x10c)][_0x9be0da(0x115)](_0x4155a2[_0x9be0da(0x103)])[_0x9be0da(0x109)](_0x16f52a=>_0x16f52a[_0x9be0da(0x105)]===_0x4155a2['threadId']))==null?void 0x0:_0x42e6eb['root'];_0x588d31&&this[_0x9be0da(0x10c)][_0x9be0da(0x147)](_0x3c4cfd,_0x5e3e5f,_0x588d31['id'],_0x4155a2[_0x9be0da(0xfa)]===I[_0x9be0da(0x157)]);break;}}}));}};S=V([p(0x0,_0xee2d6d(_0x775931)),p(0x1,_0xee2d6d(_0x24ff45)),p(0x2,_0xee2d6d(_0x44d1fc)),p(0x3,_0xee2d6d(_0x4801df))],S);const z=_0x228950(0x154),M={};var k=Object[_0x228950(0x130)],Q=(_0x4c91e6,_0x515286,_0x2373d4,_0x1c6c0f)=>{const _0x96f1ec=_0x228950;for(var _0x1ff295=_0x1c6c0f>0x1?void 0x0:_0x1c6c0f?k(_0x515286,_0x2373d4):_0x515286,_0x391cc8=_0x4c91e6[_0x96f1ec(0x137)]-0x1,_0x14f2b3;_0x391cc8>=0x0;_0x391cc8--)(_0x14f2b3=_0x4c91e6[_0x391cc8])&&(_0x1ff295=_0x14f2b3(_0x1ff295)||_0x1ff295);return _0x1ff295;},_=(_0x595682,_0x4c8830)=>(_0x299328,_0x4751ab)=>_0x4c8830(_0x299328,_0x4751ab,_0x595682);function _0x496a(_0x4545c7,_0x1e6c0b){const _0x1add72=_0x1add();return _0x496a=function(_0x496abd,_0x189fd3){_0x496abd=_0x496abd-0xf2;let _0x265e62=_0x1add72[_0x496abd];return _0x265e62;},_0x496a(_0x4545c7,_0x1e6c0b);}function X(_0x1efdd8,_0xb834a6){const _0x33ba88=_0x228950,_0x26bf13=_0x1efdd8[_0x33ba88(0x148)][0x0];return{..._0xb834a6,'id':_0x26bf13[_0x33ba88(0x129)],'resolved':_0x1efdd8[_0x33ba88(0xfa)]===0x1,'dT':D(_0x26bf13[_0x33ba88(0xfe)]),'personId':_0x26bf13[_0x33ba88(0x10a)],'threadId':_0x26bf13[_0x33ba88(0x105)]};}function ee(_0x244ee3,_0x3da754,_0x537f44){const _0x172bbe=_0x228950;var _0x298f30,_0x521264;if(((_0x521264=(_0x298f30=_0x244ee3==null?void 0x0:_0x244ee3[_0x172bbe(0x148)])==null?void 0x0:_0x298f30[_0x172bbe(0x137)])!=null?_0x521264:0x0)>0x0){const _0x22e68e=(_0x3e9766,_0x7f5a4d)=>({'id':_0x3e9766[_0x172bbe(0x129)],'threadId':_0x3e9766[_0x172bbe(0x105)],'dT':D(_0x3e9766[_0x172bbe(0xfe)]),'personId':_0x3e9766[_0x172bbe(0x10a)],'resolved':_0x244ee3[_0x172bbe(0xfa)]===I[_0x172bbe(0x157)],'unitId':_0x3da754,'subUnitId':_0x537f44,'text':JSON['parse'](_0x3e9766[_0x172bbe(0x10e)]),'parentId':_0x7f5a4d}),_0x10c944=_0x22e68e(_0x244ee3['replies'][0x0]);return{..._0x10c944,'children':_0x244ee3[_0x172bbe(0x148)]['slice'](0x1)[_0x172bbe(0x135)](_0x220860=>_0x22e68e(_0x220860,_0x10c944['id']))};}return null;}function _0x1add(){const _0x5e61f3=['customRanges','UNRECOGNIZED','_threadCommentDataSourceService','/add','addComment','forEach','updateComment','code','resolveComment','replies','listComments','/solved','_config','userID','comments','error','_initUserSync','getCurrentUser','type','values','100100GmvaBu','thread-comment-data-source.config','comment','244017qzflvp','Solved','add','users','onReady','post','onStarting','_sessionService','saveCommentToSnapshot','/reply','solved','1435230ArYezi','_httpService','pluginName','createTimestamp','personId','_init','/universer-api/comment/unit/','OpenOrReOpen','unitId','parse','threadId','filter','Solve','3FNSrok','find','userId','1234XDTRny','_threadCommentModel','commentUpdate$','content','delete','_userService','Edit','_injector','stringify','syncUpdateMutationToColla','getUnit','user','format','addUser','requireSession','_configService','_threadCommentDataSource','148408QsJWKg','748602dmtJyg','Unknown','11QdavXu','/delete','get','resolved','COMMENT','deleteComment','getMemberID','ref','symbol','5038790bOoWVe','replyId','rangeType','YYYY/MM/DD\x20HH:mm','rangeId','Reply','defineProperty','parentId','getOwnPropertyDescriptor','getUser','disposeWithMe','_initDataSource','dataSource','map','body','length','UNIVER_UNKNOWN','_commentService','Delete','217GnPAOE','Add','/edit','24GrmAmp'];_0x1add=function(){return _0x5e61f3;};return _0x1add();}let f=class{constructor(_0x255cc5,_0x286240,_0x29f518,_0x5768cf){const _0x4542bb=_0x228950;this[_0x4542bb(0xfc)]=_0x255cc5,this['_userService']=_0x286240,this['_sessionService']=_0x29f518,this[_0x4542bb(0x112)]=_0x5768cf;}async[_0x228950(0x143)](_0x5a71ed){const _0x21922e=_0x228950;var _0x4cbdd3,_0x1d247f;const {parentId:_0x50965d,unitId:_0x2aa2d3,text:_0x238da3,threadId:_0x33ab66}=_0x5a71ed,_0x352eea=(_0x1d247f=(_0x4cbdd3=_0x238da3[_0x21922e(0x13f)])==null?void 0x0:_0x4cbdd3[_0x21922e(0x106)](_0x5aff46=>_0x5aff46[_0x21922e(0x12a)]===_0x2cf451[_0x21922e(0x123)])[_0x21922e(0x135)](_0x22d0a4=>_0x22d0a4[_0x21922e(0x12c)]))!=null?_0x1d247f:[],_0x57ffaa=JSON['stringify'](_0x238da3),_0x10eb68=(await this['_sessionService'][_0x21922e(0x119)](_0x2aa2d3))[_0x21922e(0x125)]();if(_0x50965d){const _0x133bbe={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea,'threadId':_0x33ab66},_0x13bcb0=(await this['_httpService']['post'](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0xf9),{'body':_0x133bbe}))['body']['reply'];return{..._0x5a71ed,'id':_0x13bcb0[_0x21922e(0x129)],'dT':_0x2552d3(+_0x13bcb0['createTimestamp'])['format'](_0x21922e(0x12b)),'personId':_0x13bcb0[_0x21922e(0x10a)]};}else{const _0x43a603={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea},_0x464142=await this['_httpService'][_0x21922e(0xf5)](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0x142),{'body':_0x43a603});return X(_0x464142[_0x21922e(0x136)][_0x21922e(0x155)],_0x5a71ed);}}async[_0x228950(0x145)](_0x92cc7e){const _0x4712b2=_0x228950;var _0x7c326e,_0x2fd128;const {text:_0x8cd053,unitId:_0x4b9120}=_0x92cc7e,_0x5e58e0=(_0x2fd128=(_0x7c326e=_0x8cd053['customRanges'])==null?void 0x0:_0x7c326e[_0x4712b2(0x106)](_0x5be89e=>_0x5be89e['rangeType']===_0x2cf451['COMMENT'])['map'](_0x2067e0=>_0x2067e0[_0x4712b2(0x12c)]))!=null?_0x2fd128:[],_0x28db7e=JSON[_0x4712b2(0x113)](_0x8cd053),_0x8b8ef1=_0x92cc7e[_0x4712b2(0x105)],_0x9eac1b=_0x92cc7e['id'],_0x51ff1e={'memberId':(await this[_0x4712b2(0xf7)]['requireSession'](_0x4b9120))[_0x4712b2(0x125)](),'unitId':_0x4b9120,'threadId':_0x8b8ef1,'mention':_0x5e58e0,'content':_0x28db7e,'replyId':_0x9eac1b},_0x562b35=await this[_0x4712b2(0xfc)]['post'](_0x4712b2(0x101)+_0x4b9120+_0x4712b2(0x13d),{'body':_0x51ff1e});return!_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)]||_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)][_0x4712b2(0x146)]===0x1;}async[_0x228950(0x147)](_0x28d2d6){const _0x28a32c=_0x228950,{unitId:_0xe9e900}=_0x28d2d6,_0x1ec037=_0x28d2d6[_0x28a32c(0x105)],_0x100020={'memberId':this[_0x28a32c(0x110)][_0x28a32c(0x150)]()['userID'],'unitId':_0xe9e900,'threadId':_0x1ec037,'solved':_0x28d2d6[_0x28a32c(0x122)]?I[_0x28a32c(0x157)]:I['OpenOrReOpen']},_0x4676a4=await this['_httpService'][_0x28a32c(0xf5)](_0x28a32c(0x101)+_0xe9e900+_0x28a32c(0x14a),{'body':_0x100020});return!_0x4676a4[_0x28a32c(0x136)][_0x28a32c(0x14e)]||_0x4676a4['body'][_0x28a32c(0x14e)][_0x28a32c(0x146)]===0x1;}async[_0x228950(0x124)](_0xf1b468,_0x396f5c,_0x14ba5b,_0x46cbbd){const _0x41517d=_0x228950,_0x53451d={'memberId':(await this[_0x41517d(0xf7)][_0x41517d(0x119)](_0xf1b468))[_0x41517d(0x125)](),'threadId':_0x14ba5b,'replyId':_0x46cbbd,'unitId':_0xf1b468},_0x4ee1cd=await this['_httpService']['post'](_0x41517d(0x101)+_0xf1b468+_0x41517d(0x120),{'body':_0x53451d});return!_0x4ee1cd['body'][_0x41517d(0x14e)]||_0x4ee1cd[_0x41517d(0x136)][_0x41517d(0x14e)][_0x41517d(0x146)]===0x1;}async[_0x228950(0x149)](_0x508540,_0x45e3eb,_0xfaba8d){const _0x2e6ffb=_0x228950,_0x3cc724={'unitId':_0x508540,'threadId':_0xfaba8d},_0x481081=await this['_httpService'][_0x2e6ffb(0xf5)](_0x2e6ffb(0x101)+_0x508540+'/list',{'body':_0x3cc724}),_0x396594=_0xfaba8d['map'](_0x14f6b0=>ee(_0x481081[_0x2e6ffb(0x136)][_0x2e6ffb(0x14d)][_0x14f6b0],_0x508540,_0x45e3eb))[_0x2e6ffb(0x106)](Boolean);return Object[_0x2e6ffb(0x152)](_0x481081[_0x2e6ffb(0x136)]['users'])[_0x2e6ffb(0x144)](_0x120757=>{const _0x20ece8=_0x2e6ffb;this[_0x20ece8(0x110)][_0x20ece8(0x118)](_0x120757);}),_0x396594;}[_0x228950(0xf8)](_0xfb3659){const _0x1124c4=_0x228950;return{'id':_0xfb3659['id'],'threadId':_0xfb3659[_0x1124c4(0x105)],'ref':_0xfb3659[_0x1124c4(0x126)]};}};f=Q([_(0x0,_0xee2d6d(_0x490830)),_(0x1,_0xee2d6d(_0x44d1fc)),_(0x2,_0xee2d6d(_0x625313)),_(0x3,_0xee2d6d(_0x4801df))],f);var re=Object[_0x228950(0x130)],te=(_0x3fec26,_0x576a0e,_0x143167,_0x22f35f)=>{for(var _0x4b61d2=_0x22f35f>0x1?void 0x0:_0x22f35f?re(_0x576a0e,_0x143167):_0x576a0e,_0x129c2c=_0x3fec26['length']-0x1,_0x150035;_0x129c2c>=0x0;_0x129c2c--)(_0x150035=_0x3fec26[_0x129c2c])&&(_0x4b61d2=_0x150035(_0x4b61d2)||_0x4b61d2);return _0x4b61d2;},N=(_0x49e23d,_0x12d7ca)=>(_0x68a343,_0x2a9bcc)=>_0x12d7ca(_0x68a343,_0x2a9bcc,_0x49e23d);let g=class extends _0x48bbe7{constructor(_0x2313b0,_0x5626d5){const _0x3e0a29=_0x228950;super(),this[_0x3e0a29(0x141)]=_0x2313b0,this[_0x3e0a29(0x11b)]=_0x5626d5,this[_0x3e0a29(0x133)]();}[_0x228950(0x133)](){const _0x90c8cb=_0x228950;this[_0x90c8cb(0x141)][_0x90c8cb(0x134)]=this[_0x90c8cb(0x11b)],this['_threadCommentDataSourceService'][_0x90c8cb(0x114)]=!0x1;}};g=te([N(0x0,_0x2e0912),N(0x1,_0xee2d6d(f))],g);var se=Object[_0x228950(0x12e)],oe=Object[_0x228950(0x130)],ne=(_0xbd62b0,_0x2f8557,_0x220a3f)=>_0x2f8557 in _0xbd62b0?se(_0xbd62b0,_0x2f8557,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220a3f}):_0xbd62b0[_0x2f8557]=_0x220a3f,ie=(_0x3f58f2,_0x18272a,_0x8ea51e,_0x1bf23e)=>{const _0x1b8aa4=_0x228950;for(var _0x32245a=_0x1bf23e>0x1?void 0x0:_0x1bf23e?oe(_0x18272a,_0x8ea51e):_0x18272a,_0xd447d5=_0x3f58f2[_0x1b8aa4(0x137)]-0x1,_0x2158dc;_0xd447d5>=0x0;_0xd447d5--)(_0x2158dc=_0x3f58f2[_0xd447d5])&&(_0x32245a=_0x2158dc(_0x32245a)||_0x32245a);return _0x32245a;},w=(_0x211b06,_0x5480c9)=>(_0x49ddd9,_0x467914)=>_0x5480c9(_0x49ddd9,_0x467914,_0x211b06),$=(_0x22eb36,_0x5a74e7,_0x2e82e9)=>ne(_0x22eb36,typeof _0x5a74e7!=_0x228950(0x127)?_0x5a74e7+'':_0x5a74e7,_0x2e82e9);let b=class extends _0x1ef7b8{constructor(_0xd6ce28=M,_0x524328,_0x87170a){const _0x44cfe2=_0x228950;super(),this[_0x44cfe2(0x14b)]=_0xd6ce28,this['_injector']=_0x524328,this[_0x44cfe2(0x11a)]=_0x87170a;const {..._0x3f8c4d}=_0x1ce58b({},M,this[_0x44cfe2(0x14b)]);this[_0x44cfe2(0x11a)]['setConfig'](z,_0x3f8c4d);}[_0x228950(0xf6)](){[[f],[g],[S]]['forEach'](_0x56009f=>{const _0x22e651=_0x496a;this[_0x22e651(0x112)][_0x22e651(0xf2)](_0x56009f);});}[_0x228950(0xf4)](){const _0x295f2a=_0x228950;this[_0x295f2a(0x112)][_0x295f2a(0x121)](g),this[_0x295f2a(0x112)][_0x295f2a(0x121)](S);}};$(b,_0x228950(0xfd),W),$(b,_0x228950(0x151),_0x45a423[_0x228950(0x138)]),b=ie([_0x1fb97b(_0x3e15e4,_0x4ce1bf,_0x1f5fb3),w(0x1,_0xee2d6d(_0x4801df)),w(0x2,_0x415962)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x14e8f6=_0x31ff;(function(_0x2481d2,_0x5e0d93){const _0x474d7a=_0x31ff,_0x45e3ad=_0x2481d2();while(!![]){try{const _0x759750=-parseInt(_0x474d7a(0xcc))/0x1*(-parseInt(_0x474d7a(0x118))/0x2)+parseInt(_0x474d7a(0xe9))/0x3*(parseInt(_0x474d7a(0x115))/0x4)+-parseInt(_0x474d7a(0x111))/0x5*(-parseInt(_0x474d7a(0x107))/0x6)+parseInt(_0x474d7a(0xd4))/0x7+parseInt(_0x474d7a(0xf2))/0x8+-parseInt(_0x474d7a(0x123))/0x9+parseInt(_0x474d7a(0xc5))/0xa*(-parseInt(_0x474d7a(0xf4))/0xb);if(_0x759750===_0x5e0d93)break;else _0x45e3ad['push'](_0x45e3ad['shift']());}catch(_0x3b2381){_0x45e3ad['push'](_0x45e3ad['shift']());}}}(_0x2411,0x2c294));import{CommentService as _0x6346bf,CollaborationSessionService as _0x6db0c8,UniverCollaborationClientPlugin as _0x281d67}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fa253}from'@univerjs-pro/license';import{dayjs as _0x47e258,UserManagerService as _0x44233a,Inject as _0x59bc1b,Injector as _0x5ee519,Disposable as _0x4a90c9,CustomRangeType as _0x3d1118,UniverInstanceType as _0x454a2c,DependentOn as _0x4be0bf,IConfigService as _0x38206b,Plugin as _0x41398f,merge as _0xdfd847}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xce439}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23d8a0,IThreadCommentDataSourceService as _0x1f38fa}from'@univerjs/thread-comment';function _0x31ff(_0x2aeb82,_0xbec4c){const _0x2411a4=_0x2411();return _0x31ff=function(_0x31ffb0,_0x2e9983){_0x31ffb0=_0x31ffb0-0xbe;let _0x595ea8=_0x2411a4[_0x31ffb0];return _0x595ea8;},_0x31ff(_0x2aeb82,_0xbec4c);}import{bufferTime as _0x390860}from'rxjs';import{HTTPService as _0x5ae147}from'@univerjs/network';const W=_0x14e8f6(0xee);var I=(_0x541df3=>(_0x541df3[_0x541df3['OpenOrReOpen']=0x0]=_0x14e8f6(0xe3),_0x541df3[_0x541df3[_0x14e8f6(0x104)]=0x1]=_0x14e8f6(0x104),_0x541df3[_0x541df3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x541df3))(I||{}),v=(_0x189f28=>(_0x189f28[_0x189f28[_0x14e8f6(0xf3)]=0x0]=_0x14e8f6(0xf3),_0x189f28[_0x189f28['Add']=0x1]=_0x14e8f6(0xcf),_0x189f28[_0x189f28[_0x14e8f6(0x101)]=0x2]=_0x14e8f6(0x101),_0x189f28[_0x189f28['Edit']=0x3]=_0x14e8f6(0xc1),_0x189f28[_0x189f28[_0x14e8f6(0xfd)]=0x4]=_0x14e8f6(0xfd),_0x189f28[_0x189f28[_0x14e8f6(0xbf)]=0x5]=_0x14e8f6(0xbf),_0x189f28[_0x189f28[_0x14e8f6(0xdd)]=-0x1]=_0x14e8f6(0xdd),_0x189f28))(v||{});const D=_0x5ce6cd=>_0x47e258(new Date(+_0x5ce6cd))[_0x14e8f6(0x109)](_0x14e8f6(0x119)),B=async(_0x1f5dc3,_0x59284a)=>{const _0x3f6c43=_0x14e8f6,_0x19e75=_0x1f5dc3[_0x3f6c43(0xd7)](_0x44233a),_0x4804f3=_0x1f5dc3[_0x3f6c43(0xd7)](_0x5ae147);_0x59284a[_0x3f6c43(0xc4)](_0x5d03ee=>{const _0x417b0c=_0x3f6c43;_0x19e75['getUser'](_0x5d03ee)&&_0x59284a[_0x417b0c(0xd2)](_0x5d03ee);}),_0x59284a[_0x3f6c43(0xd8)]&&(await _0x4804f3[_0x3f6c43(0xd7)](_0x3f6c43(0x116),{'params':{'userIDs':[..._0x59284a]}}))['body'][_0x3f6c43(0xe8)][_0x3f6c43(0xc4)](_0x1c410a=>{const _0x55bced=_0x3f6c43;_0x1c410a&&_0x19e75[_0x55bced(0xff)](_0x1c410a);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x27fa48,_0x26bbfa,_0x68ac5e,_0x726e5a)=>{const _0x3e9f77=_0x14e8f6;for(var _0x233cf1=_0x726e5a>0x1?void 0x0:_0x726e5a?K(_0x26bbfa,_0x68ac5e):_0x26bbfa,_0x1bc118=_0x27fa48[_0x3e9f77(0xd6)]-0x1,_0xd74061;_0x1bc118>=0x0;_0x1bc118--)(_0xd74061=_0x27fa48[_0x1bc118])&&(_0x233cf1=_0xd74061(_0x233cf1)||_0x233cf1);return _0x233cf1;},p=(_0x439f04,_0x4a7d14)=>(_0x5509cd,_0xfd9dc8)=>_0x4a7d14(_0x5509cd,_0xfd9dc8,_0x439f04);let S=class extends _0x4a90c9{constructor(_0x42cbd0,_0x24ed3d,_0x5ce4e4,_0x2e3f9f){const _0x1dd1ff=_0x14e8f6;super(),this[_0x1dd1ff(0xc9)]=_0x42cbd0,this['_threadCommentModel']=_0x24ed3d,this['_userService']=_0x5ce4e4,this[_0x1dd1ff(0xef)]=_0x2e3f9f,this[_0x1dd1ff(0xf5)](),this[_0x1dd1ff(0x11d)]();}['_initUserSync'](){const _0xa92790=_0x14e8f6;this['disposeWithMe'](this[_0xa92790(0x126)][_0xa92790(0xf8)][_0xa92790(0xf1)](_0x390860(0x10))[_0xa92790(0xe1)](_0x50acd0=>{const _0xd46a63=_0xa92790,_0x341e26=new Set();_0x50acd0[_0xd46a63(0xc4)](_0x217e8d=>{const _0x40f8ae=_0xd46a63;switch(_0x217e8d[_0x40f8ae(0xca)]){case _0x40f8ae(0xc2):{const _0x41827d=_0x217e8d[_0x40f8ae(0xdc)][_0x40f8ae(0xeb)];_0x341e26[_0x40f8ae(0xc2)](_0x41827d);break;}}}),B(this[_0xd46a63(0xef)],_0x341e26);}));}[_0x14e8f6(0xf5)](){const _0x38fe3f=_0x14e8f6;this[_0x38fe3f(0x103)](this[_0x38fe3f(0xc9)][_0x38fe3f(0xf8)][_0x38fe3f(0xe1)](async _0x4fd38f=>{const _0x2afcbc=_0x38fe3f;var _0x4fa83d,_0x26eeb6,_0x2aa72e,_0x354d6d;const _0x601859=(_0x4fa83d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])['find'](_0x446e5d=>_0x446e5d[_0x2afcbc(0x10e)]===_0x4fd38f[_0x2afcbc(0x10e)]))==null?void 0x0:_0x4fa83d[_0x2afcbc(0xd9)];if(!_0x601859)return;const {unitId:_0x221cd1,subUnitId:_0xee5ada}=_0x601859;switch(_0x4fd38f[_0x2afcbc(0x113)]&&this[_0x2afcbc(0x122)]['addUser'](_0x4fd38f['user']),_0x4fd38f[_0x2afcbc(0xca)]){case v['Add']:break;case v[_0x2afcbc(0x101)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0x128)](_0x221cd1,_0xee5ada,{'unitId':_0x221cd1,'subUnitId':_0xee5ada,'ref':'','id':_0x4fd38f[_0x2afcbc(0xd3)],'dT':D(+_0x4fd38f['createTimestamp']),'threadId':_0x4fd38f[_0x2afcbc(0x10e)],'personId':(_0x2aa72e=(_0x26eeb6=_0x4fd38f[_0x2afcbc(0x113)])==null?void 0x0:_0x26eeb6['userID'])!=null?_0x2aa72e:_0x4fd38f[_0x2afcbc(0xcd)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f[_0x2afcbc(0xfb)]),'parentId':_0x601859['id']});break;}case v['Delete']:{const _0x318e51=this['_threadCommentModel']['getComment'](_0x221cd1,_0xee5ada,_0x4fd38f['replyId']);_0x318e51&&_0x318e51[_0x2afcbc(0x10c)]&&this[_0x2afcbc(0x126)][_0x2afcbc(0xe2)](_0x221cd1,_0xee5ada,_0x4fd38f[_0x2afcbc(0xd3)]);break;}case v[_0x2afcbc(0xc1)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0xbe)](_0x221cd1,_0xee5ada,{'commentId':_0x4fd38f[_0x2afcbc(0xd3)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f['content'])});break;}case v[_0x2afcbc(0xbf)]:{const _0x458ba9=(_0x354d6d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])[_0x2afcbc(0xd1)](_0x2d0026=>_0x2d0026['threadId']===_0x4fd38f['threadId']))==null?void 0x0:_0x354d6d[_0x2afcbc(0xd9)];_0x458ba9&&this[_0x2afcbc(0x126)][_0x2afcbc(0xc8)](_0x221cd1,_0xee5ada,_0x458ba9['id'],_0x4fd38f[_0x2afcbc(0xcb)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59bc1b(_0x6346bf)),p(0x1,_0x59bc1b(_0x23d8a0)),p(0x2,_0x59bc1b(_0x44233a)),p(0x3,_0x59bc1b(_0x5ee519))],S);const z=_0x14e8f6(0xe0),M={};var k=Object[_0x14e8f6(0x10b)],Q=(_0x20ed71,_0x572fad,_0x49abcf,_0x3f6fbc)=>{for(var _0x13b9c8=_0x3f6fbc>0x1?void 0x0:_0x3f6fbc?k(_0x572fad,_0x49abcf):_0x572fad,_0x31dcc7=_0x20ed71['length']-0x1,_0x1bb3d6;_0x31dcc7>=0x0;_0x31dcc7--)(_0x1bb3d6=_0x20ed71[_0x31dcc7])&&(_0x13b9c8=_0x1bb3d6(_0x13b9c8)||_0x13b9c8);return _0x13b9c8;},_=(_0x3aced9,_0x2dc6c8)=>(_0x408e82,_0x1093c6)=>_0x2dc6c8(_0x408e82,_0x1093c6,_0x3aced9);function X(_0xe2cbb8,_0x14addc){const _0x427158=_0x14e8f6,_0x1c3b6b=_0xe2cbb8[_0x427158(0xf7)][0x0];return{..._0x14addc,'id':_0x1c3b6b[_0x427158(0xd3)],'resolved':_0xe2cbb8[_0x427158(0xcb)]===0x1,'dT':D(_0x1c3b6b[_0x427158(0x102)]),'personId':_0x1c3b6b[_0x427158(0xcd)],'threadId':_0x1c3b6b[_0x427158(0x10e)]};}function ee(_0x305687,_0x5ea6ba,_0x29aff7){const _0x9554fe=_0x14e8f6;var _0x110feb,_0x22a35e;if(((_0x22a35e=(_0x110feb=_0x305687==null?void 0x0:_0x305687['replies'])==null?void 0x0:_0x110feb[_0x9554fe(0xd6)])!=null?_0x22a35e:0x0)>0x0){const _0xc2ce31=(_0x4cb2dd,_0x3995bb)=>({'id':_0x4cb2dd['replyId'],'threadId':_0x4cb2dd[_0x9554fe(0x10e)],'dT':D(_0x4cb2dd[_0x9554fe(0x102)]),'personId':_0x4cb2dd[_0x9554fe(0xcd)],'resolved':_0x305687['solved']===I[_0x9554fe(0x104)],'unitId':_0x5ea6ba,'subUnitId':_0x29aff7,'text':JSON[_0x9554fe(0xed)](_0x4cb2dd['content']),'parentId':_0x3995bb}),_0x464e0b=_0xc2ce31(_0x305687[_0x9554fe(0xf7)][0x0]);return{..._0x464e0b,'children':_0x305687[_0x9554fe(0xf7)][_0x9554fe(0x110)](0x1)[_0x9554fe(0x105)](_0xf966cc=>_0xc2ce31(_0xf966cc,_0x464e0b['id']))};}return null;}let f=class{constructor(_0x20fce9,_0x11385d,_0x46f32b,_0x4854b4){const _0x3bc21f=_0x14e8f6;this[_0x3bc21f(0xc0)]=_0x20fce9,this[_0x3bc21f(0x122)]=_0x11385d,this[_0x3bc21f(0x124)]=_0x46f32b,this[_0x3bc21f(0xef)]=_0x4854b4;}async[_0x14e8f6(0x128)](_0x1851e4){const _0x1e6f03=_0x14e8f6;var _0x3ef62f,_0xb6fb58;const {parentId:_0x328a95,unitId:_0x468f6c,text:_0x25e55f,threadId:_0x558da0}=_0x1851e4,_0x309e67=(_0xb6fb58=(_0x3ef62f=_0x25e55f[_0x1e6f03(0x11b)])==null?void 0x0:_0x3ef62f[_0x1e6f03(0xc7)](_0x245dac=>_0x245dac[_0x1e6f03(0x114)]===_0x3d1118[_0x1e6f03(0x129)])[_0x1e6f03(0x105)](_0x457ca8=>_0x457ca8[_0x1e6f03(0xf6)]))!=null?_0xb6fb58:[],_0x326c60=JSON[_0x1e6f03(0xe6)](_0x25e55f),_0x512e66=(await this['_sessionService'][_0x1e6f03(0xde)](_0x468f6c))[_0x1e6f03(0xfe)]();if(_0x328a95){const _0x475578={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67,'threadId':_0x558da0},_0x4172a6=(await this[_0x1e6f03(0xc0)][_0x1e6f03(0xd5)]('/universer-api/comment/unit/'+_0x468f6c+_0x1e6f03(0x121),{'body':_0x475578}))[_0x1e6f03(0xdf)][_0x1e6f03(0xf0)];return{..._0x1851e4,'id':_0x4172a6['replyId'],'dT':_0x47e258(+_0x4172a6['createTimestamp'])[_0x1e6f03(0x109)](_0x1e6f03(0x119)),'personId':_0x4172a6[_0x1e6f03(0xcd)]};}else{const _0x3b7587={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67},_0x2d686b=await this['_httpService']['post'](_0x1e6f03(0xfa)+_0x468f6c+_0x1e6f03(0xda),{'body':_0x3b7587});return X(_0x2d686b[_0x1e6f03(0xdf)][_0x1e6f03(0x11c)],_0x1851e4);}}async['updateComment'](_0x4d0efc){const _0x3779b0=_0x14e8f6;var _0x4e2acc,_0xe849d6;const {text:_0x32c058,unitId:_0x184b7a}=_0x4d0efc,_0x166c3f=(_0xe849d6=(_0x4e2acc=_0x32c058['customRanges'])==null?void 0x0:_0x4e2acc[_0x3779b0(0xc7)](_0x6a6db2=>_0x6a6db2[_0x3779b0(0x114)]===_0x3d1118[_0x3779b0(0x129)])[_0x3779b0(0x105)](_0x5db9f5=>_0x5db9f5[_0x3779b0(0xf6)]))!=null?_0xe849d6:[],_0x50c451=JSON['stringify'](_0x32c058),_0x4e9ee4=_0x4d0efc[_0x3779b0(0x10e)],_0xada142=_0x4d0efc['id'],_0x423454={'memberId':(await this[_0x3779b0(0x124)]['requireSession'](_0x184b7a))[_0x3779b0(0xfe)](),'unitId':_0x184b7a,'threadId':_0x4e9ee4,'mention':_0x166c3f,'content':_0x50c451,'replyId':_0xada142},_0x4c3a38=await this[_0x3779b0(0xc0)][_0x3779b0(0xd5)](_0x3779b0(0xfa)+_0x184b7a+_0x3779b0(0xea),{'body':_0x423454});return!_0x4c3a38['body'][_0x3779b0(0xfc)]||_0x4c3a38['body'][_0x3779b0(0xfc)]['code']===0x1;}async[_0x14e8f6(0xc8)](_0x2a0fda){const _0x2a1630=_0x14e8f6,{unitId:_0x338ee6}=_0x2a0fda,_0x59efe2=_0x2a0fda['threadId'],_0x1c0d87={'memberId':this['_userService'][_0x2a1630(0x10d)]()[_0x2a1630(0x11e)],'unitId':_0x338ee6,'threadId':_0x59efe2,'solved':_0x2a0fda[_0x2a1630(0xe7)]?I['Solved']:I[_0x2a1630(0xe3)]},_0x160403=await this['_httpService'][_0x2a1630(0xd5)](_0x2a1630(0xfa)+_0x338ee6+_0x2a1630(0xce),{'body':_0x1c0d87});return!_0x160403['body']['error']||_0x160403['body'][_0x2a1630(0xfc)][_0x2a1630(0xf9)]===0x1;}async[_0x14e8f6(0xe2)](_0x4bbe02,_0x1f000e,_0x43eaa0,_0x41aa8c){const _0x2547b1=_0x14e8f6,_0xf17f68={'memberId':(await this[_0x2547b1(0x124)][_0x2547b1(0xde)](_0x4bbe02))['getMemberID'](),'threadId':_0x43eaa0,'replyId':_0x41aa8c,'unitId':_0x4bbe02},_0xa47529=await this[_0x2547b1(0xc0)][_0x2547b1(0xd5)](_0x2547b1(0xfa)+_0x4bbe02+'/delete',{'body':_0xf17f68});return!_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)]||_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)][_0x2547b1(0xf9)]===0x1;}async[_0x14e8f6(0x10f)](_0x1ad2ba,_0x1f4692,_0x15ea54){const _0x15e753=_0x14e8f6,_0x7829de={'unitId':_0x1ad2ba,'threadId':_0x15ea54},_0x36450b=await this['_httpService'][_0x15e753(0xd5)](_0x15e753(0xfa)+_0x1ad2ba+_0x15e753(0x106),{'body':_0x7829de}),_0x5e05a3=_0x15ea54[_0x15e753(0x105)](_0x5ab93c=>ee(_0x36450b[_0x15e753(0xdf)][_0x15e753(0x125)][_0x5ab93c],_0x1ad2ba,_0x1f4692))[_0x15e753(0xc7)](Boolean);return Object[_0x15e753(0xd0)](_0x36450b[_0x15e753(0xdf)][_0x15e753(0xe8)])[_0x15e753(0xc4)](_0x15d45e=>{const _0x54c674=_0x15e753;this[_0x54c674(0x122)][_0x54c674(0xff)](_0x15d45e);}),_0x5e05a3;}['saveCommentToSnapshot'](_0x4ed038){const _0x144f34=_0x14e8f6;return{'id':_0x4ed038['id'],'threadId':_0x4ed038[_0x144f34(0x10e)],'ref':_0x4ed038[_0x144f34(0x100)]};}};f=Q([_(0x0,_0x59bc1b(_0x5ae147)),_(0x1,_0x59bc1b(_0x44233a)),_(0x2,_0x59bc1b(_0x6db0c8)),_(0x3,_0x59bc1b(_0x5ee519))],f);var re=Object[_0x14e8f6(0x10b)],te=(_0x35451d,_0x25aa9b,_0x4eb219,_0x40a5b3)=>{const _0x2cefac=_0x14e8f6;for(var _0x2042e4=_0x40a5b3>0x1?void 0x0:_0x40a5b3?re(_0x25aa9b,_0x4eb219):_0x25aa9b,_0x5d4b81=_0x35451d[_0x2cefac(0xd6)]-0x1,_0x5efc5a;_0x5d4b81>=0x0;_0x5d4b81--)(_0x5efc5a=_0x35451d[_0x5d4b81])&&(_0x2042e4=_0x5efc5a(_0x2042e4)||_0x2042e4);return _0x2042e4;},N=(_0x53ef74,_0x2f595b)=>(_0x1d4661,_0x590e98)=>_0x2f595b(_0x1d4661,_0x590e98,_0x53ef74);let g=class extends _0x4a90c9{constructor(_0x1197db,_0x3b81d4){const _0x9ce958=_0x14e8f6;super(),this[_0x9ce958(0x11a)]=_0x1197db,this[_0x9ce958(0x127)]=_0x3b81d4,this[_0x9ce958(0x12a)]();}[_0x14e8f6(0x12a)](){const _0x179475=_0x14e8f6;this[_0x179475(0x11a)][_0x179475(0x10a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x179475(0xc3)]=!0x1;}};function _0x2411(){const _0x1a0e82=['dataSource','getOwnPropertyDescriptor','parentId','getCurrentUser','threadId','listComments','slice','955NRmKPp','_config','user','rangeType','156YECbnn','/universer-api/user/list','unitId','2hXAWdx','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','customRanges','comment','_initUserSync','userID','onStarting','UNIVER_UNKNOWN','/reply','_userService','2743866aybfYS','_sessionService','comments','_threadCommentModel','_threadCommentDataSource','addComment','COMMENT','_initDataSource','updateComment','Solve','_httpService','Edit','add','syncUpdateMutationToColla','forEach','22960BkdIzD','onReady','filter','resolveComment','_commentService','type','solved','12218aLEqco','userId','/solved','Add','values','find','delete','replyId','478170JPEEaa','post','length','get','size','root','/add','getUnit','payload','UNRECOGNIZED','requireSession','body','thread-comment-data-source.config','subscribe','deleteComment','OpenOrReOpen','defineProperty','setConfig','stringify','resolved','users','12387XioJrk','/edit','personId','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','reply','pipe','2627376ltFMWH','Unknown','2079eJtcOz','_init','rangeId','replies','commentUpdate$','code','/universer-api/comment/unit/','content','error','Delete','getMemberID','addUser','ref','Reply','createTimestamp','disposeWithMe','Solved','map','/list','10986hLOMHH','_configService','format'];_0x2411=function(){return _0x1a0e82;};return _0x2411();}g=te([N(0x0,_0x1f38fa),N(0x1,_0x59bc1b(f))],g);var se=Object[_0x14e8f6(0xe4)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x43cb38,_0x1f3646,_0x42ea57)=>_0x1f3646 in _0x43cb38?se(_0x43cb38,_0x1f3646,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42ea57}):_0x43cb38[_0x1f3646]=_0x42ea57,ie=(_0x375564,_0x1c0104,_0x51397b,_0x108c4f)=>{for(var _0x4d036e=_0x108c4f>0x1?void 0x0:_0x108c4f?oe(_0x1c0104,_0x51397b):_0x1c0104,_0x4a1f92=_0x375564['length']-0x1,_0x14238c;_0x4a1f92>=0x0;_0x4a1f92--)(_0x14238c=_0x375564[_0x4a1f92])&&(_0x4d036e=_0x14238c(_0x4d036e)||_0x4d036e);return _0x4d036e;},w=(_0x179abf,_0x153d70)=>(_0x16f650,_0x46cccf)=>_0x153d70(_0x16f650,_0x46cccf,_0x179abf),$=(_0x3ecd5,_0x2350f5,_0x4ace5b)=>ne(_0x3ecd5,typeof _0x2350f5!=_0x14e8f6(0xec)?_0x2350f5+'':_0x2350f5,_0x4ace5b);let b=class extends _0x41398f{constructor(_0x342318=M,_0x1801b8,_0x150ec8){const _0xc3e8ac=_0x14e8f6;super(),this[_0xc3e8ac(0x112)]=_0x342318,this['_injector']=_0x1801b8,this['_configService']=_0x150ec8;const {..._0x14cfbf}=_0xdfd847({},M,this['_config']);this[_0xc3e8ac(0x108)][_0xc3e8ac(0xe5)](z,_0x14cfbf);}[_0x14e8f6(0x11f)](){const _0x5cb8e6=_0x14e8f6;[[f],[g],[S]][_0x5cb8e6(0xc4)](_0x5459d8=>{const _0x297049=_0x5cb8e6;this[_0x297049(0xef)][_0x297049(0xc2)](_0x5459d8);});}[_0x14e8f6(0xc6)](){const _0xf28336=_0x14e8f6;this[_0xf28336(0xef)][_0xf28336(0xd7)](g),this['_injector'][_0xf28336(0xd7)](S);}};$(b,'pluginName',W),$(b,_0x14e8f6(0xca),_0x454a2c[_0x14e8f6(0x120)]),b=ie([_0x4be0bf(_0xce439,_0x281d67,_0x2fa253),w(0x1,_0x59bc1b(_0x5ee519)),w(0x2,_0x38206b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x228950=_0x496a;(function(_0x2e629a,_0x238f1f){const _0x3b6c98=_0x496a,_0x2be1d7=_0x2e629a();while(!![]){try{const _0x24f24e=parseInt(_0x3b6c98(0x13b))/0x1*(parseInt(_0x3b6c98(0x10b))/0x2)+-parseInt(_0x3b6c98(0x108))/0x3*(parseInt(_0x3b6c98(0x11c))/0x4)+-parseInt(_0x3b6c98(0xfb))/0x5+parseInt(_0x3b6c98(0x11d))/0x6+parseInt(_0x3b6c98(0x153))/0x7+parseInt(_0x3b6c98(0x13e))/0x8*(-parseInt(_0x3b6c98(0x156))/0x9)+-parseInt(_0x3b6c98(0x128))/0xa*(-parseInt(_0x3b6c98(0x11f))/0xb);if(_0x24f24e===_0x238f1f)break;else _0x2be1d7['push'](_0x2be1d7['shift']());}catch(_0x57b745){_0x2be1d7['push'](_0x2be1d7['shift']());}}}(_0x1add,0x5aa94));import{CommentService as _0x775931,CollaborationSessionService as _0x625313,UniverCollaborationClientPlugin as _0x4ce1bf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f5fb3}from'@univerjs-pro/license';import{dayjs as _0x2552d3,UserManagerService as _0x44d1fc,Inject as _0xee2d6d,Injector as _0x4801df,Disposable as _0x48bbe7,CustomRangeType as _0x2cf451,UniverInstanceType as _0x45a423,DependentOn as _0x1fb97b,IConfigService as _0x415962,Plugin as _0x1ef7b8,merge as _0x1ce58b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3e15e4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24ff45,IThreadCommentDataSourceService as _0x2e0912}from'@univerjs/thread-comment';import{bufferTime as _0x3eb001}from'rxjs';import{HTTPService as _0x490830}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4f936b=>(_0x4f936b[_0x4f936b[_0x228950(0x102)]=0x0]=_0x228950(0x102),_0x4f936b[_0x4f936b[_0x228950(0x157)]=0x1]=_0x228950(0x157),_0x4f936b[_0x4f936b[_0x228950(0x140)]=-0x1]=_0x228950(0x140),_0x4f936b))(I||{}),v=(_0x5252ec=>(_0x5252ec[_0x5252ec['Unknown']=0x0]=_0x228950(0x11e),_0x5252ec[_0x5252ec['Add']=0x1]=_0x228950(0x13c),_0x5252ec[_0x5252ec['Reply']=0x2]=_0x228950(0x12d),_0x5252ec[_0x5252ec['Edit']=0x3]=_0x228950(0x111),_0x5252ec[_0x5252ec[_0x228950(0x13a)]=0x4]=_0x228950(0x13a),_0x5252ec[_0x5252ec[_0x228950(0x107)]=0x5]=_0x228950(0x107),_0x5252ec[_0x5252ec['UNRECOGNIZED']=-0x1]=_0x228950(0x140),_0x5252ec))(v||{});const D=_0x227c78=>_0x2552d3(new Date(+_0x227c78))[_0x228950(0x117)](_0x228950(0x12b)),B=async(_0x130a41,_0xc131f9)=>{const _0x1c2f2b=_0x228950,_0x217d33=_0x130a41[_0x1c2f2b(0x121)](_0x44d1fc),_0x390e52=_0x130a41['get'](_0x490830);_0xc131f9[_0x1c2f2b(0x144)](_0x15a4fe=>{const _0x3add9e=_0x1c2f2b;_0x217d33[_0x3add9e(0x131)](_0x15a4fe)&&_0xc131f9[_0x3add9e(0x10f)](_0x15a4fe);}),_0xc131f9['size']&&(await _0x390e52[_0x1c2f2b(0x121)]('/universer-api/user/list',{'params':{'userIDs':[..._0xc131f9]}}))[_0x1c2f2b(0x136)][_0x1c2f2b(0xf3)]['forEach'](_0x294e4e=>{const _0x163187=_0x1c2f2b;_0x294e4e&&_0x217d33[_0x163187(0x118)](_0x294e4e);});};var K=Object[_0x228950(0x130)],V=(_0x39a52b,_0x410db0,_0xa1c7a7,_0x490309)=>{const _0x736133=_0x228950;for(var _0x23f9d8=_0x490309>0x1?void 0x0:_0x490309?K(_0x410db0,_0xa1c7a7):_0x410db0,_0xc15c2b=_0x39a52b[_0x736133(0x137)]-0x1,_0x23f585;_0xc15c2b>=0x0;_0xc15c2b--)(_0x23f585=_0x39a52b[_0xc15c2b])&&(_0x23f9d8=_0x23f585(_0x23f9d8)||_0x23f9d8);return _0x23f9d8;},p=(_0x3864d6,_0xc9cd8f)=>(_0x3ceb27,_0x4df8d5)=>_0xc9cd8f(_0x3ceb27,_0x4df8d5,_0x3864d6);let S=class extends _0x48bbe7{constructor(_0x5ca55d,_0x6a3c64,_0x13c37c,_0x10b2e3){const _0x590ff7=_0x228950;super(),this['_commentService']=_0x5ca55d,this['_threadCommentModel']=_0x6a3c64,this[_0x590ff7(0x110)]=_0x13c37c,this[_0x590ff7(0x112)]=_0x10b2e3,this[_0x590ff7(0x100)](),this[_0x590ff7(0x14f)]();}[_0x228950(0x14f)](){const _0x1d303c=_0x228950;this[_0x1d303c(0x132)](this[_0x1d303c(0x10c)][_0x1d303c(0x10d)]['pipe'](_0x3eb001(0x10))['subscribe'](_0xfbfa45=>{const _0x30213f=_0x1d303c,_0x1c89da=new Set();_0xfbfa45['forEach'](_0x35532d=>{const _0x41539f=_0x496a;switch(_0x35532d[_0x41539f(0x151)]){case'add':{const _0x513d6a=_0x35532d['payload'][_0x41539f(0xff)];_0x1c89da[_0x41539f(0xf2)](_0x513d6a);break;}}}),B(this[_0x30213f(0x112)],_0x1c89da);}));}['_init'](){const _0x224126=_0x228950;this[_0x224126(0x132)](this[_0x224126(0x139)][_0x224126(0x10d)]['subscribe'](async _0x4155a2=>{const _0x9be0da=_0x224126;var _0x44bb25,_0x55532a,_0x4cb58f,_0x42e6eb;const _0xba405b=(_0x44bb25=this['_threadCommentModel'][_0x9be0da(0x115)](_0x4155a2['unitId'])[_0x9be0da(0x109)](_0x4c34f6=>_0x4c34f6['threadId']===_0x4155a2[_0x9be0da(0x105)]))==null?void 0x0:_0x44bb25['root'];if(!_0xba405b)return;const {unitId:_0x3c4cfd,subUnitId:_0x5e3e5f}=_0xba405b;switch(_0x4155a2[_0x9be0da(0x116)]&&this[_0x9be0da(0x110)]['addUser'](_0x4155a2[_0x9be0da(0x116)]),_0x4155a2[_0x9be0da(0x151)]){case v[_0x9be0da(0x13c)]:break;case v['Reply']:{this[_0x9be0da(0x10c)]['addComment'](_0x3c4cfd,_0x5e3e5f,{'unitId':_0x3c4cfd,'subUnitId':_0x5e3e5f,'ref':'','id':_0x4155a2['replyId'],'dT':D(+_0x4155a2[_0x9be0da(0xfe)]),'threadId':_0x4155a2[_0x9be0da(0x105)],'personId':(_0x4cb58f=(_0x55532a=_0x4155a2[_0x9be0da(0x116)])==null?void 0x0:_0x55532a[_0x9be0da(0x14c)])!=null?_0x4cb58f:_0x4155a2[_0x9be0da(0x10a)],'text':JSON['parse'](_0x4155a2[_0x9be0da(0x10e)]),'parentId':_0xba405b['id']});break;}case v['Delete']:{const _0xa3ce9b=this['_threadCommentModel']['getComment'](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);_0xa3ce9b&&_0xa3ce9b[_0x9be0da(0x12f)]&&this[_0x9be0da(0x10c)][_0x9be0da(0x124)](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);break;}case v[_0x9be0da(0x111)]:{this[_0x9be0da(0x10c)][_0x9be0da(0x145)](_0x3c4cfd,_0x5e3e5f,{'commentId':_0x4155a2[_0x9be0da(0x129)],'text':JSON[_0x9be0da(0x104)](_0x4155a2['content'])});break;}case v[_0x9be0da(0x107)]:{const _0x588d31=(_0x42e6eb=this[_0x9be0da(0x10c)][_0x9be0da(0x115)](_0x4155a2[_0x9be0da(0x103)])[_0x9be0da(0x109)](_0x16f52a=>_0x16f52a[_0x9be0da(0x105)]===_0x4155a2['threadId']))==null?void 0x0:_0x42e6eb['root'];_0x588d31&&this[_0x9be0da(0x10c)][_0x9be0da(0x147)](_0x3c4cfd,_0x5e3e5f,_0x588d31['id'],_0x4155a2[_0x9be0da(0xfa)]===I[_0x9be0da(0x157)]);break;}}}));}};S=V([p(0x0,_0xee2d6d(_0x775931)),p(0x1,_0xee2d6d(_0x24ff45)),p(0x2,_0xee2d6d(_0x44d1fc)),p(0x3,_0xee2d6d(_0x4801df))],S);const z=_0x228950(0x154),M={};var k=Object[_0x228950(0x130)],Q=(_0x4c91e6,_0x515286,_0x2373d4,_0x1c6c0f)=>{const _0x96f1ec=_0x228950;for(var _0x1ff295=_0x1c6c0f>0x1?void 0x0:_0x1c6c0f?k(_0x515286,_0x2373d4):_0x515286,_0x391cc8=_0x4c91e6[_0x96f1ec(0x137)]-0x1,_0x14f2b3;_0x391cc8>=0x0;_0x391cc8--)(_0x14f2b3=_0x4c91e6[_0x391cc8])&&(_0x1ff295=_0x14f2b3(_0x1ff295)||_0x1ff295);return _0x1ff295;},_=(_0x595682,_0x4c8830)=>(_0x299328,_0x4751ab)=>_0x4c8830(_0x299328,_0x4751ab,_0x595682);function _0x496a(_0x4545c7,_0x1e6c0b){const _0x1add72=_0x1add();return _0x496a=function(_0x496abd,_0x189fd3){_0x496abd=_0x496abd-0xf2;let _0x265e62=_0x1add72[_0x496abd];return _0x265e62;},_0x496a(_0x4545c7,_0x1e6c0b);}function X(_0x1efdd8,_0xb834a6){const _0x33ba88=_0x228950,_0x26bf13=_0x1efdd8[_0x33ba88(0x148)][0x0];return{..._0xb834a6,'id':_0x26bf13[_0x33ba88(0x129)],'resolved':_0x1efdd8[_0x33ba88(0xfa)]===0x1,'dT':D(_0x26bf13[_0x33ba88(0xfe)]),'personId':_0x26bf13[_0x33ba88(0x10a)],'threadId':_0x26bf13[_0x33ba88(0x105)]};}function ee(_0x244ee3,_0x3da754,_0x537f44){const _0x172bbe=_0x228950;var _0x298f30,_0x521264;if(((_0x521264=(_0x298f30=_0x244ee3==null?void 0x0:_0x244ee3[_0x172bbe(0x148)])==null?void 0x0:_0x298f30[_0x172bbe(0x137)])!=null?_0x521264:0x0)>0x0){const _0x22e68e=(_0x3e9766,_0x7f5a4d)=>({'id':_0x3e9766[_0x172bbe(0x129)],'threadId':_0x3e9766[_0x172bbe(0x105)],'dT':D(_0x3e9766[_0x172bbe(0xfe)]),'personId':_0x3e9766[_0x172bbe(0x10a)],'resolved':_0x244ee3[_0x172bbe(0xfa)]===I[_0x172bbe(0x157)],'unitId':_0x3da754,'subUnitId':_0x537f44,'text':JSON['parse'](_0x3e9766[_0x172bbe(0x10e)]),'parentId':_0x7f5a4d}),_0x10c944=_0x22e68e(_0x244ee3['replies'][0x0]);return{..._0x10c944,'children':_0x244ee3[_0x172bbe(0x148)]['slice'](0x1)[_0x172bbe(0x135)](_0x220860=>_0x22e68e(_0x220860,_0x10c944['id']))};}return null;}function _0x1add(){const _0x5e61f3=['customRanges','UNRECOGNIZED','_threadCommentDataSourceService','/add','addComment','forEach','updateComment','code','resolveComment','replies','listComments','/solved','_config','userID','comments','error','_initUserSync','getCurrentUser','type','values','100100GmvaBu','thread-comment-data-source.config','comment','244017qzflvp','Solved','add','users','onReady','post','onStarting','_sessionService','saveCommentToSnapshot','/reply','solved','1435230ArYezi','_httpService','pluginName','createTimestamp','personId','_init','/universer-api/comment/unit/','OpenOrReOpen','unitId','parse','threadId','filter','Solve','3FNSrok','find','userId','1234XDTRny','_threadCommentModel','commentUpdate$','content','delete','_userService','Edit','_injector','stringify','syncUpdateMutationToColla','getUnit','user','format','addUser','requireSession','_configService','_threadCommentDataSource','148408QsJWKg','748602dmtJyg','Unknown','11QdavXu','/delete','get','resolved','COMMENT','deleteComment','getMemberID','ref','symbol','5038790bOoWVe','replyId','rangeType','YYYY/MM/DD\x20HH:mm','rangeId','Reply','defineProperty','parentId','getOwnPropertyDescriptor','getUser','disposeWithMe','_initDataSource','dataSource','map','body','length','UNIVER_UNKNOWN','_commentService','Delete','217GnPAOE','Add','/edit','24GrmAmp'];_0x1add=function(){return _0x5e61f3;};return _0x1add();}let f=class{constructor(_0x255cc5,_0x286240,_0x29f518,_0x5768cf){const _0x4542bb=_0x228950;this[_0x4542bb(0xfc)]=_0x255cc5,this['_userService']=_0x286240,this['_sessionService']=_0x29f518,this[_0x4542bb(0x112)]=_0x5768cf;}async[_0x228950(0x143)](_0x5a71ed){const _0x21922e=_0x228950;var _0x4cbdd3,_0x1d247f;const {parentId:_0x50965d,unitId:_0x2aa2d3,text:_0x238da3,threadId:_0x33ab66}=_0x5a71ed,_0x352eea=(_0x1d247f=(_0x4cbdd3=_0x238da3[_0x21922e(0x13f)])==null?void 0x0:_0x4cbdd3[_0x21922e(0x106)](_0x5aff46=>_0x5aff46[_0x21922e(0x12a)]===_0x2cf451[_0x21922e(0x123)])[_0x21922e(0x135)](_0x22d0a4=>_0x22d0a4[_0x21922e(0x12c)]))!=null?_0x1d247f:[],_0x57ffaa=JSON['stringify'](_0x238da3),_0x10eb68=(await this['_sessionService'][_0x21922e(0x119)](_0x2aa2d3))[_0x21922e(0x125)]();if(_0x50965d){const _0x133bbe={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea,'threadId':_0x33ab66},_0x13bcb0=(await this['_httpService']['post'](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0xf9),{'body':_0x133bbe}))['body']['reply'];return{..._0x5a71ed,'id':_0x13bcb0[_0x21922e(0x129)],'dT':_0x2552d3(+_0x13bcb0['createTimestamp'])['format'](_0x21922e(0x12b)),'personId':_0x13bcb0[_0x21922e(0x10a)]};}else{const _0x43a603={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea},_0x464142=await this['_httpService'][_0x21922e(0xf5)](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0x142),{'body':_0x43a603});return X(_0x464142[_0x21922e(0x136)][_0x21922e(0x155)],_0x5a71ed);}}async[_0x228950(0x145)](_0x92cc7e){const _0x4712b2=_0x228950;var _0x7c326e,_0x2fd128;const {text:_0x8cd053,unitId:_0x4b9120}=_0x92cc7e,_0x5e58e0=(_0x2fd128=(_0x7c326e=_0x8cd053['customRanges'])==null?void 0x0:_0x7c326e[_0x4712b2(0x106)](_0x5be89e=>_0x5be89e['rangeType']===_0x2cf451['COMMENT'])['map'](_0x2067e0=>_0x2067e0[_0x4712b2(0x12c)]))!=null?_0x2fd128:[],_0x28db7e=JSON[_0x4712b2(0x113)](_0x8cd053),_0x8b8ef1=_0x92cc7e[_0x4712b2(0x105)],_0x9eac1b=_0x92cc7e['id'],_0x51ff1e={'memberId':(await this[_0x4712b2(0xf7)]['requireSession'](_0x4b9120))[_0x4712b2(0x125)](),'unitId':_0x4b9120,'threadId':_0x8b8ef1,'mention':_0x5e58e0,'content':_0x28db7e,'replyId':_0x9eac1b},_0x562b35=await this[_0x4712b2(0xfc)]['post'](_0x4712b2(0x101)+_0x4b9120+_0x4712b2(0x13d),{'body':_0x51ff1e});return!_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)]||_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)][_0x4712b2(0x146)]===0x1;}async[_0x228950(0x147)](_0x28d2d6){const _0x28a32c=_0x228950,{unitId:_0xe9e900}=_0x28d2d6,_0x1ec037=_0x28d2d6[_0x28a32c(0x105)],_0x100020={'memberId':this[_0x28a32c(0x110)][_0x28a32c(0x150)]()['userID'],'unitId':_0xe9e900,'threadId':_0x1ec037,'solved':_0x28d2d6[_0x28a32c(0x122)]?I[_0x28a32c(0x157)]:I['OpenOrReOpen']},_0x4676a4=await this['_httpService'][_0x28a32c(0xf5)](_0x28a32c(0x101)+_0xe9e900+_0x28a32c(0x14a),{'body':_0x100020});return!_0x4676a4[_0x28a32c(0x136)][_0x28a32c(0x14e)]||_0x4676a4['body'][_0x28a32c(0x14e)][_0x28a32c(0x146)]===0x1;}async[_0x228950(0x124)](_0xf1b468,_0x396f5c,_0x14ba5b,_0x46cbbd){const _0x41517d=_0x228950,_0x53451d={'memberId':(await this[_0x41517d(0xf7)][_0x41517d(0x119)](_0xf1b468))[_0x41517d(0x125)](),'threadId':_0x14ba5b,'replyId':_0x46cbbd,'unitId':_0xf1b468},_0x4ee1cd=await this['_httpService']['post'](_0x41517d(0x101)+_0xf1b468+_0x41517d(0x120),{'body':_0x53451d});return!_0x4ee1cd['body'][_0x41517d(0x14e)]||_0x4ee1cd[_0x41517d(0x136)][_0x41517d(0x14e)][_0x41517d(0x146)]===0x1;}async[_0x228950(0x149)](_0x508540,_0x45e3eb,_0xfaba8d){const _0x2e6ffb=_0x228950,_0x3cc724={'unitId':_0x508540,'threadId':_0xfaba8d},_0x481081=await this['_httpService'][_0x2e6ffb(0xf5)](_0x2e6ffb(0x101)+_0x508540+'/list',{'body':_0x3cc724}),_0x396594=_0xfaba8d['map'](_0x14f6b0=>ee(_0x481081[_0x2e6ffb(0x136)][_0x2e6ffb(0x14d)][_0x14f6b0],_0x508540,_0x45e3eb))[_0x2e6ffb(0x106)](Boolean);return Object[_0x2e6ffb(0x152)](_0x481081[_0x2e6ffb(0x136)]['users'])[_0x2e6ffb(0x144)](_0x120757=>{const _0x20ece8=_0x2e6ffb;this[_0x20ece8(0x110)][_0x20ece8(0x118)](_0x120757);}),_0x396594;}[_0x228950(0xf8)](_0xfb3659){const _0x1124c4=_0x228950;return{'id':_0xfb3659['id'],'threadId':_0xfb3659[_0x1124c4(0x105)],'ref':_0xfb3659[_0x1124c4(0x126)]};}};f=Q([_(0x0,_0xee2d6d(_0x490830)),_(0x1,_0xee2d6d(_0x44d1fc)),_(0x2,_0xee2d6d(_0x625313)),_(0x3,_0xee2d6d(_0x4801df))],f);var re=Object[_0x228950(0x130)],te=(_0x3fec26,_0x576a0e,_0x143167,_0x22f35f)=>{for(var _0x4b61d2=_0x22f35f>0x1?void 0x0:_0x22f35f?re(_0x576a0e,_0x143167):_0x576a0e,_0x129c2c=_0x3fec26['length']-0x1,_0x150035;_0x129c2c>=0x0;_0x129c2c--)(_0x150035=_0x3fec26[_0x129c2c])&&(_0x4b61d2=_0x150035(_0x4b61d2)||_0x4b61d2);return _0x4b61d2;},N=(_0x49e23d,_0x12d7ca)=>(_0x68a343,_0x2a9bcc)=>_0x12d7ca(_0x68a343,_0x2a9bcc,_0x49e23d);let g=class extends _0x48bbe7{constructor(_0x2313b0,_0x5626d5){const _0x3e0a29=_0x228950;super(),this[_0x3e0a29(0x141)]=_0x2313b0,this[_0x3e0a29(0x11b)]=_0x5626d5,this[_0x3e0a29(0x133)]();}[_0x228950(0x133)](){const _0x90c8cb=_0x228950;this[_0x90c8cb(0x141)][_0x90c8cb(0x134)]=this[_0x90c8cb(0x11b)],this['_threadCommentDataSourceService'][_0x90c8cb(0x114)]=!0x1;}};g=te([N(0x0,_0x2e0912),N(0x1,_0xee2d6d(f))],g);var se=Object[_0x228950(0x12e)],oe=Object[_0x228950(0x130)],ne=(_0xbd62b0,_0x2f8557,_0x220a3f)=>_0x2f8557 in _0xbd62b0?se(_0xbd62b0,_0x2f8557,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220a3f}):_0xbd62b0[_0x2f8557]=_0x220a3f,ie=(_0x3f58f2,_0x18272a,_0x8ea51e,_0x1bf23e)=>{const _0x1b8aa4=_0x228950;for(var _0x32245a=_0x1bf23e>0x1?void 0x0:_0x1bf23e?oe(_0x18272a,_0x8ea51e):_0x18272a,_0xd447d5=_0x3f58f2[_0x1b8aa4(0x137)]-0x1,_0x2158dc;_0xd447d5>=0x0;_0xd447d5--)(_0x2158dc=_0x3f58f2[_0xd447d5])&&(_0x32245a=_0x2158dc(_0x32245a)||_0x32245a);return _0x32245a;},w=(_0x211b06,_0x5480c9)=>(_0x49ddd9,_0x467914)=>_0x5480c9(_0x49ddd9,_0x467914,_0x211b06),$=(_0x22eb36,_0x5a74e7,_0x2e82e9)=>ne(_0x22eb36,typeof _0x5a74e7!=_0x228950(0x127)?_0x5a74e7+'':_0x5a74e7,_0x2e82e9);let b=class extends _0x1ef7b8{constructor(_0xd6ce28=M,_0x524328,_0x87170a){const _0x44cfe2=_0x228950;super(),this[_0x44cfe2(0x14b)]=_0xd6ce28,this['_injector']=_0x524328,this[_0x44cfe2(0x11a)]=_0x87170a;const {..._0x3f8c4d}=_0x1ce58b({},M,this[_0x44cfe2(0x14b)]);this[_0x44cfe2(0x11a)]['setConfig'](z,_0x3f8c4d);}[_0x228950(0xf6)](){[[f],[g],[S]]['forEach'](_0x56009f=>{const _0x22e651=_0x496a;this[_0x22e651(0x112)][_0x22e651(0xf2)](_0x56009f);});}[_0x228950(0xf4)](){const _0x295f2a=_0x228950;this[_0x295f2a(0x112)][_0x295f2a(0x121)](g),this[_0x295f2a(0x112)][_0x295f2a(0x121)](S);}};$(b,_0x228950(0xfd),W),$(b,_0x228950(0x151),_0x45a423[_0x228950(0x138)]),b=ie([_0x1fb97b(_0x3e15e4,_0x4ce1bf,_0x1f5fb3),w(0x1,_0xee2d6d(_0x4801df)),w(0x2,_0x415962)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x246c(_0x3defc2,_0x4afd9e){const _0x38da22=_0x38da();return _0x246c=function(_0x246c25,_0xccc5d3){_0x246c25=_0x246c25-0xe2;let _0x3c5cab=_0x38da22[_0x246c25];return _0x3c5cab;},_0x246c(_0x3defc2,_0x4afd9e);}function _0x38da(){const _0x1990a0=['UniverProCollaborationClient','UNIVER_UNKNOWN','/edit','Unknown','11FZpYVU','values','deleteComment','getComment','getUser','IThreadCommentDataSourceService','UniverInstanceType','bufferTime','49703GfHtRf','solved','5608cfhnji','27704724yNZnRc','@univerjs-pro/collaboration-client','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','8ziojMR','onReady','_threadCommentDataSource','DependentOn','getCurrentUser','dataSource','code','UniverThreadCommentUi','addUser','UniverProLicense','reply','_initUserSync','Plugin','_httpService','_threadCommentDataSourceService','resolveComment','object','pipe','disposeWithMe','/universer-api/user/list','ref','386406YyFrqM','OpenOrReOpen','ThreadCommentModel','forEach','personId','_sessionService','Delete','rxjs','/list','defineProperty','saveCommentToSnapshot','getMemberID','@univerjs/network','createTimestamp','delete','parse','syncUpdateMutationToColla','/solved','/universer-api/comment/unit/','content','UniverThreadCommentUIPlugin','map','UniverThreadCommentDataSourcePlugin','userId','symbol','_userService','threadId','COMMENT','Inject','filter','/add','CommentService','format','commentUpdate$','_threadCommentModel','UNRECOGNIZED','_configService','comment','Solved','merge','Module','amd','UniverThreadComment','resolved','6134330mgmwua','getUnit','payload','673830kOocEy','Add','HTTPService','@univerjs/thread-comment','slice','root','find','customRanges','YYYY/MM/DD\x20HH:mm','addComment','Disposable','listComments','Reply','UniverCore','length','userID','get','type','77VBSyME','body','stringify','CustomRangeType','_init','replyId','unitId','rangeType','Edit','user','/reply','comments','_injector','2612538HvFvIB','post','6cDLHqN','_commentService','exports','UserManagerService','UniverNetwork','Injector','rangeId','subscribe','dayjs','9783FetaTW','Solve','error','updateComment','@univerjs-pro/license','add','@univerjs/thread-comment-ui','requireSession','size','getOwnPropertyDescriptor','users'];_0x38da=function(){return _0x1990a0;};return _0x38da();}(function(_0x5bd4f0,_0x213df5){const _0x40218a=_0x246c,_0x4101b2=_0x5bd4f0();while(!![]){try{const _0x20b4c2=parseInt(_0x40218a(0x141))/0x1*(-parseInt(_0x40218a(0x121))/0x2)+-parseInt(_0x40218a(0x11f))/0x3+-parseInt(_0x40218a(0x148))/0x4*(parseInt(_0x40218a(0x100))/0x5)+parseInt(_0x40218a(0x15d))/0x6*(-parseInt(_0x40218a(0x112))/0x7)+-parseInt(_0x40218a(0x143))/0x8*(-parseInt(_0x40218a(0x12a))/0x9)+-parseInt(_0x40218a(0xfd))/0xa+parseInt(_0x40218a(0x139))/0xb*(parseInt(_0x40218a(0x144))/0xc);if(_0x20b4c2===_0x213df5)break;else _0x4101b2['push'](_0x4101b2['shift']());}catch(_0x510dae){_0x4101b2['push'](_0x4101b2['shift']());}}}(_0x38da,0x70277),function(_0x6043f9,_0x45fb63){const _0x48ec58=_0x246c;typeof exports==_0x48ec58(0x158)&&typeof module<'u'?_0x45fb63(exports,require('@univerjs-pro/collaboration-client'),require(_0x48ec58(0x12e)),require('@univerjs/core'),require(_0x48ec58(0x130)),require('@univerjs/thread-comment'),require(_0x48ec58(0x164)),require(_0x48ec58(0x169))):typeof define=='function'&&define[_0x48ec58(0xfa)]?define([_0x48ec58(0x123),_0x48ec58(0x145),_0x48ec58(0x12e),'@univerjs/core',_0x48ec58(0x130),_0x48ec58(0x103),_0x48ec58(0x164),_0x48ec58(0x169)],_0x45fb63):(_0x6043f9=typeof globalThis<'u'?globalThis:_0x6043f9||self,_0x45fb63(_0x6043f9['UniverProThreadCommentDatasource']={},_0x6043f9[_0x48ec58(0x135)],_0x6043f9[_0x48ec58(0x151)],_0x6043f9[_0x48ec58(0x10d)],_0x6043f9[_0x48ec58(0x14f)],_0x6043f9[_0x48ec58(0xfb)],_0x6043f9[_0x48ec58(0x164)],_0x6043f9[_0x48ec58(0x125)]));}(this,function(_0x583ef1,_0x2e266b,_0x11f360,_0x208443,_0x2f4e2e,_0x195a9a,_0x306e6b,_0x2e4d72){'use strict';const _0x1da00a=_0x246c;const _0x36ea8d=_0x1da00a(0x147);var _0x4ea4ca=(_0x172f68=>(_0x172f68[_0x172f68['OpenOrReOpen']=0x0]=_0x1da00a(0x15e),_0x172f68[_0x172f68[_0x1da00a(0xf7)]=0x1]=_0x1da00a(0xf7),_0x172f68[_0x172f68[_0x1da00a(0xf4)]=-0x1]=_0x1da00a(0xf4),_0x172f68))(_0x4ea4ca||{}),_0x45d2dd=(_0x317a96=>(_0x317a96[_0x317a96[_0x1da00a(0x138)]=0x0]='Unknown',_0x317a96[_0x317a96['Add']=0x1]=_0x1da00a(0x101),_0x317a96[_0x317a96[_0x1da00a(0x10c)]=0x2]=_0x1da00a(0x10c),_0x317a96[_0x317a96[_0x1da00a(0x11a)]=0x3]=_0x1da00a(0x11a),_0x317a96[_0x317a96[_0x1da00a(0x163)]=0x4]='Delete',_0x317a96[_0x317a96[_0x1da00a(0x12b)]=0x5]=_0x1da00a(0x12b),_0x317a96[_0x317a96[_0x1da00a(0xf4)]=-0x1]=_0x1da00a(0xf4),_0x317a96))(_0x45d2dd||{});const _0x5392f0=_0x215fc1=>_0x208443[_0x1da00a(0x129)](new Date(+_0x215fc1))[_0x1da00a(0xf1)]('YYYY/MM/DD\x20HH:mm'),_0x3e9aa4=async(_0x28c4fc,_0x1bbb77)=>{const _0x58977e=_0x1da00a,_0x3a3732=_0x28c4fc[_0x58977e(0x110)](_0x208443[_0x58977e(0x124)]),_0x34b877=_0x28c4fc[_0x58977e(0x110)](_0x2e4d72[_0x58977e(0x102)]);_0x1bbb77[_0x58977e(0x160)](_0x45a695=>{const _0x5c5b70=_0x58977e;_0x3a3732[_0x5c5b70(0x13d)](_0x45a695)&&_0x1bbb77[_0x5c5b70(0x16b)](_0x45a695);}),_0x1bbb77[_0x58977e(0x132)]&&(await _0x34b877[_0x58977e(0x110)](_0x58977e(0x15b),{'params':{'userIDs':[..._0x1bbb77]}}))['body'][_0x58977e(0x134)][_0x58977e(0x160)](_0x51a145=>{_0x51a145&&_0x3a3732['addUser'](_0x51a145);});};var _0x7b1aae=Object[_0x1da00a(0x133)],_0xab3793=(_0xb3df,_0x4ff128,_0x57275c,_0x16708c)=>{const _0x53db84=_0x1da00a;for(var _0x544424=_0x16708c>0x1?void 0x0:_0x16708c?_0x7b1aae(_0x4ff128,_0x57275c):_0x4ff128,_0x43ca07=_0xb3df[_0x53db84(0x10e)]-0x1,_0x3ad77b;_0x43ca07>=0x0;_0x43ca07--)(_0x3ad77b=_0xb3df[_0x43ca07])&&(_0x544424=_0x3ad77b(_0x544424)||_0x544424);return _0x544424;},_0x34a507=(_0x4941cb,_0x1cf498)=>(_0x4c13fe,_0x2240ac)=>_0x1cf498(_0x4c13fe,_0x2240ac,_0x4941cb);let _0x2dbee5=class extends _0x208443[_0x1da00a(0x10a)]{constructor(_0x40ba21,_0x143e54,_0x271992,_0x12fed0){const _0x270729=_0x1da00a;super(),this['_commentService']=_0x40ba21,this['_threadCommentModel']=_0x143e54,this[_0x270729(0xea)]=_0x271992,this['_injector']=_0x12fed0,this[_0x270729(0x116)](),this[_0x270729(0x153)]();}[_0x1da00a(0x153)](){const _0x46d136=_0x1da00a;this[_0x46d136(0x15a)](this[_0x46d136(0xf3)][_0x46d136(0xf2)][_0x46d136(0x159)](_0x306e6b[_0x46d136(0x140)](0x10))[_0x46d136(0x128)](_0x1eafca=>{const _0x427f8b=_0x46d136,_0x7e6443=new Set();_0x1eafca[_0x427f8b(0x160)](_0x269ca2=>{const _0x1c7430=_0x427f8b;switch(_0x269ca2[_0x1c7430(0x111)]){case'add':{const _0x538ee4=_0x269ca2[_0x1c7430(0xff)][_0x1c7430(0x161)];_0x7e6443[_0x1c7430(0x12f)](_0x538ee4);break;}}}),_0x3e9aa4(this[_0x427f8b(0x11e)],_0x7e6443);}));}[_0x1da00a(0x116)](){const _0x5f8f62=_0x1da00a;this[_0x5f8f62(0x15a)](this[_0x5f8f62(0x122)][_0x5f8f62(0xf2)][_0x5f8f62(0x128)](async _0x80c35c=>{const _0x1135fd=_0x5f8f62;var _0x56bcba,_0x4b1355,_0x22c527,_0x1f86b5;const _0x5ccd78=(_0x56bcba=this[_0x1135fd(0xf3)]['getUnit'](_0x80c35c[_0x1135fd(0x118)])[_0x1135fd(0x106)](_0x45ddc8=>_0x45ddc8[_0x1135fd(0xeb)]===_0x80c35c[_0x1135fd(0xeb)]))==null?void 0x0:_0x56bcba[_0x1135fd(0x105)];if(!_0x5ccd78)return;const {unitId:_0x4f29ad,subUnitId:_0x31702f}=_0x5ccd78;switch(_0x80c35c[_0x1135fd(0x11b)]&&this['_userService'][_0x1135fd(0x150)](_0x80c35c['user']),_0x80c35c[_0x1135fd(0x111)]){case _0x45d2dd[_0x1135fd(0x101)]:break;case _0x45d2dd[_0x1135fd(0x10c)]:{this[_0x1135fd(0xf3)][_0x1135fd(0x109)](_0x4f29ad,_0x31702f,{'unitId':_0x4f29ad,'subUnitId':_0x31702f,'ref':'','id':_0x80c35c[_0x1135fd(0x117)],'dT':_0x5392f0(+_0x80c35c['createTimestamp']),'threadId':_0x80c35c[_0x1135fd(0xeb)],'personId':(_0x22c527=(_0x4b1355=_0x80c35c[_0x1135fd(0x11b)])==null?void 0x0:_0x4b1355['userID'])!=null?_0x22c527:_0x80c35c['userId'],'text':JSON[_0x1135fd(0x16c)](_0x80c35c['content']),'parentId':_0x5ccd78['id']});break;}case _0x45d2dd[_0x1135fd(0x163)]:{const _0xdddbee=this[_0x1135fd(0xf3)][_0x1135fd(0x13c)](_0x4f29ad,_0x31702f,_0x80c35c['replyId']);_0xdddbee&&_0xdddbee['parentId']&&this[_0x1135fd(0xf3)][_0x1135fd(0x13b)](_0x4f29ad,_0x31702f,_0x80c35c[_0x1135fd(0x117)]);break;}case _0x45d2dd[_0x1135fd(0x11a)]:{this[_0x1135fd(0xf3)][_0x1135fd(0x12d)](_0x4f29ad,_0x31702f,{'commentId':_0x80c35c['replyId'],'text':JSON[_0x1135fd(0x16c)](_0x80c35c[_0x1135fd(0xe4)])});break;}case _0x45d2dd[_0x1135fd(0x12b)]:{const _0xd231d1=(_0x1f86b5=this['_threadCommentModel'][_0x1135fd(0xfe)](_0x80c35c['unitId'])[_0x1135fd(0x106)](_0x31e5cc=>_0x31e5cc['threadId']===_0x80c35c[_0x1135fd(0xeb)]))==null?void 0x0:_0x1f86b5[_0x1135fd(0x105)];_0xd231d1&&this['_threadCommentModel']['resolveComment'](_0x4f29ad,_0x31702f,_0xd231d1['id'],_0x80c35c[_0x1135fd(0x142)]===_0x4ea4ca['Solved']);break;}}}));}};_0x2dbee5=_0xab3793([_0x34a507(0x0,_0x208443[_0x1da00a(0xed)](_0x2e266b[_0x1da00a(0xf0)])),_0x34a507(0x1,_0x208443[_0x1da00a(0xed)](_0x195a9a[_0x1da00a(0x15f)])),_0x34a507(0x2,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x124)])),_0x34a507(0x3,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x126)]))],_0x2dbee5);const _0x2fe050='thread-comment-data-source.config',_0xa39fc1={};var _0x564dd1=Object[_0x1da00a(0x133)],_0xa5ac09=(_0x424059,_0x145cb7,_0x51973e,_0xc75961)=>{const _0x39df44=_0x1da00a;for(var _0x77f3c5=_0xc75961>0x1?void 0x0:_0xc75961?_0x564dd1(_0x145cb7,_0x51973e):_0x145cb7,_0x51e797=_0x424059[_0x39df44(0x10e)]-0x1,_0x21a28a;_0x51e797>=0x0;_0x51e797--)(_0x21a28a=_0x424059[_0x51e797])&&(_0x77f3c5=_0x21a28a(_0x77f3c5)||_0x77f3c5);return _0x77f3c5;},_0x362cd7=(_0x4ae2d6,_0x11168e)=>(_0x14c35d,_0xf53835)=>_0x11168e(_0x14c35d,_0xf53835,_0x4ae2d6);function _0xb291bc(_0x16aaf8,_0x4a5225){const _0x58ec10=_0x1da00a,_0x21132e=_0x16aaf8[_0x58ec10(0x146)][0x0];return{..._0x4a5225,'id':_0x21132e['replyId'],'resolved':_0x16aaf8[_0x58ec10(0x142)]===0x1,'dT':_0x5392f0(_0x21132e['createTimestamp']),'personId':_0x21132e[_0x58ec10(0xe8)],'threadId':_0x21132e[_0x58ec10(0xeb)]};}function _0x1d691f(_0x312501,_0x5806c2,_0x3f509e){const _0x2e97c3=_0x1da00a;var _0x4c7328,_0x369dca;if(((_0x369dca=(_0x4c7328=_0x312501==null?void 0x0:_0x312501[_0x2e97c3(0x146)])==null?void 0x0:_0x4c7328[_0x2e97c3(0x10e)])!=null?_0x369dca:0x0)>0x0){const _0x4d9a4a=(_0x2c03fb,_0x19efba)=>({'id':_0x2c03fb['replyId'],'threadId':_0x2c03fb[_0x2e97c3(0xeb)],'dT':_0x5392f0(_0x2c03fb[_0x2e97c3(0x16a)]),'personId':_0x2c03fb[_0x2e97c3(0xe8)],'resolved':_0x312501[_0x2e97c3(0x142)]===_0x4ea4ca[_0x2e97c3(0xf7)],'unitId':_0x5806c2,'subUnitId':_0x3f509e,'text':JSON['parse'](_0x2c03fb[_0x2e97c3(0xe4)]),'parentId':_0x19efba}),_0x413e9a=_0x4d9a4a(_0x312501[_0x2e97c3(0x146)][0x0]);return{..._0x413e9a,'children':_0x312501['replies'][_0x2e97c3(0x104)](0x1)['map'](_0x4f3ca5=>_0x4d9a4a(_0x4f3ca5,_0x413e9a['id']))};}return null;}let _0x22d406=class{constructor(_0x5576d3,_0x493dce,_0x31aa73,_0x5958be){const _0x5cb26d=_0x1da00a;this[_0x5cb26d(0x155)]=_0x5576d3,this['_userService']=_0x493dce,this[_0x5cb26d(0x162)]=_0x31aa73,this[_0x5cb26d(0x11e)]=_0x5958be;}async[_0x1da00a(0x109)](_0x21ec71){const _0x51ef98=_0x1da00a;var _0x5a113d,_0x4eb7b0;const {parentId:_0x4261ea,unitId:_0x28d799,text:_0x21e33c,threadId:_0x3a43ca}=_0x21ec71,_0x5a3c12=(_0x4eb7b0=(_0x5a113d=_0x21e33c[_0x51ef98(0x107)])==null?void 0x0:_0x5a113d['filter'](_0x325311=>_0x325311[_0x51ef98(0x119)]===_0x208443[_0x51ef98(0x115)][_0x51ef98(0xec)])[_0x51ef98(0xe6)](_0x34cce4=>_0x34cce4[_0x51ef98(0x127)]))!=null?_0x4eb7b0:[],_0x51c40d=JSON[_0x51ef98(0x114)](_0x21e33c),_0x115c92=(await this[_0x51ef98(0x162)][_0x51ef98(0x131)](_0x28d799))[_0x51ef98(0x168)]();if(_0x4261ea){const _0x4f771b={'memberId':_0x115c92,'unitId':_0x28d799,'content':_0x51c40d,'mention':_0x5a3c12,'threadId':_0x3a43ca},_0x140f11=(await this[_0x51ef98(0x155)][_0x51ef98(0x120)]('/universer-api/comment/unit/'+_0x28d799+_0x51ef98(0x11c),{'body':_0x4f771b}))[_0x51ef98(0x113)][_0x51ef98(0x152)];return{..._0x21ec71,'id':_0x140f11[_0x51ef98(0x117)],'dT':_0x208443['dayjs'](+_0x140f11[_0x51ef98(0x16a)])[_0x51ef98(0xf1)](_0x51ef98(0x108)),'personId':_0x140f11[_0x51ef98(0xe8)]};}else{const _0x4f7e8f={'memberId':_0x115c92,'unitId':_0x28d799,'content':_0x51c40d,'mention':_0x5a3c12},_0x40f1a5=await this[_0x51ef98(0x155)]['post'](_0x51ef98(0xe3)+_0x28d799+_0x51ef98(0xef),{'body':_0x4f7e8f});return _0xb291bc(_0x40f1a5[_0x51ef98(0x113)][_0x51ef98(0xf6)],_0x21ec71);}}async[_0x1da00a(0x12d)](_0x2fa0c2){const _0x6dd98f=_0x1da00a;var _0x2dc2da,_0x12f5b7;const {text:_0x378a7c,unitId:_0x3e2a42}=_0x2fa0c2,_0x443f83=(_0x12f5b7=(_0x2dc2da=_0x378a7c['customRanges'])==null?void 0x0:_0x2dc2da[_0x6dd98f(0xee)](_0x1dfb52=>_0x1dfb52[_0x6dd98f(0x119)]===_0x208443[_0x6dd98f(0x115)]['COMMENT'])['map'](_0x32d030=>_0x32d030[_0x6dd98f(0x127)]))!=null?_0x12f5b7:[],_0x35700c=JSON['stringify'](_0x378a7c),_0x3a3816=_0x2fa0c2[_0x6dd98f(0xeb)],_0x2c2667=_0x2fa0c2['id'],_0x492bac={'memberId':(await this[_0x6dd98f(0x162)][_0x6dd98f(0x131)](_0x3e2a42))['getMemberID'](),'unitId':_0x3e2a42,'threadId':_0x3a3816,'mention':_0x443f83,'content':_0x35700c,'replyId':_0x2c2667},_0x50b7e8=await this[_0x6dd98f(0x155)][_0x6dd98f(0x120)]('/universer-api/comment/unit/'+_0x3e2a42+_0x6dd98f(0x137),{'body':_0x492bac});return!_0x50b7e8[_0x6dd98f(0x113)]['error']||_0x50b7e8[_0x6dd98f(0x113)][_0x6dd98f(0x12c)][_0x6dd98f(0x14e)]===0x1;}async[_0x1da00a(0x157)](_0x348637){const _0x3269ad=_0x1da00a,{unitId:_0x31a797}=_0x348637,_0x4f83b6=_0x348637['threadId'],_0x6e9c8c={'memberId':this[_0x3269ad(0xea)][_0x3269ad(0x14c)]()[_0x3269ad(0x10f)],'unitId':_0x31a797,'threadId':_0x4f83b6,'solved':_0x348637[_0x3269ad(0xfc)]?_0x4ea4ca[_0x3269ad(0xf7)]:_0x4ea4ca[_0x3269ad(0x15e)]},_0x1555ca=await this[_0x3269ad(0x155)][_0x3269ad(0x120)](_0x3269ad(0xe3)+_0x31a797+_0x3269ad(0xe2),{'body':_0x6e9c8c});return!_0x1555ca[_0x3269ad(0x113)][_0x3269ad(0x12c)]||_0x1555ca[_0x3269ad(0x113)][_0x3269ad(0x12c)]['code']===0x1;}async[_0x1da00a(0x13b)](_0x3ab693,_0x2bde7d,_0xd77aaa,_0x1869d8){const _0x10eb2c=_0x1da00a,_0x35b09f={'memberId':(await this['_sessionService'][_0x10eb2c(0x131)](_0x3ab693))['getMemberID'](),'threadId':_0xd77aaa,'replyId':_0x1869d8,'unitId':_0x3ab693},_0x26bc1a=await this[_0x10eb2c(0x155)]['post'](_0x10eb2c(0xe3)+_0x3ab693+'/delete',{'body':_0x35b09f});return!_0x26bc1a[_0x10eb2c(0x113)][_0x10eb2c(0x12c)]||_0x26bc1a[_0x10eb2c(0x113)]['error'][_0x10eb2c(0x14e)]===0x1;}async[_0x1da00a(0x10b)](_0x3120dc,_0x120058,_0x273baa){const _0x4d9013=_0x1da00a,_0x442927={'unitId':_0x3120dc,'threadId':_0x273baa},_0x5450f5=await this['_httpService'][_0x4d9013(0x120)](_0x4d9013(0xe3)+_0x3120dc+_0x4d9013(0x165),{'body':_0x442927}),_0xd7807f=_0x273baa[_0x4d9013(0xe6)](_0x42c744=>_0x1d691f(_0x5450f5[_0x4d9013(0x113)][_0x4d9013(0x11d)][_0x42c744],_0x3120dc,_0x120058))[_0x4d9013(0xee)](Boolean);return Object[_0x4d9013(0x13a)](_0x5450f5[_0x4d9013(0x113)][_0x4d9013(0x134)])[_0x4d9013(0x160)](_0x3bdb8d=>{const _0x2d84a6=_0x4d9013;this[_0x2d84a6(0xea)][_0x2d84a6(0x150)](_0x3bdb8d);}),_0xd7807f;}[_0x1da00a(0x167)](_0x2a607f){const _0x1580dc=_0x1da00a;return{'id':_0x2a607f['id'],'threadId':_0x2a607f[_0x1580dc(0xeb)],'ref':_0x2a607f[_0x1580dc(0x15c)]};}};_0x22d406=_0xa5ac09([_0x362cd7(0x0,_0x208443[_0x1da00a(0xed)](_0x2e4d72[_0x1da00a(0x102)])),_0x362cd7(0x1,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x124)])),_0x362cd7(0x2,_0x208443[_0x1da00a(0xed)](_0x2e266b['CollaborationSessionService'])),_0x362cd7(0x3,_0x208443['Inject'](_0x208443[_0x1da00a(0x126)]))],_0x22d406);var _0x3ec6d4=Object[_0x1da00a(0x133)],_0x418553=(_0x4a6bb3,_0x4e2cb1,_0x274f7b,_0x3684dc)=>{const _0x325e1d=_0x1da00a;for(var _0x897ae1=_0x3684dc>0x1?void 0x0:_0x3684dc?_0x3ec6d4(_0x4e2cb1,_0x274f7b):_0x4e2cb1,_0x1a9ebf=_0x4a6bb3[_0x325e1d(0x10e)]-0x1,_0x5d6253;_0x1a9ebf>=0x0;_0x1a9ebf--)(_0x5d6253=_0x4a6bb3[_0x1a9ebf])&&(_0x897ae1=_0x5d6253(_0x897ae1)||_0x897ae1);return _0x897ae1;},_0x138734=(_0x70f20d,_0x26b7a1)=>(_0x3b9d88,_0x55ad25)=>_0x26b7a1(_0x3b9d88,_0x55ad25,_0x70f20d);let _0x118433=class extends _0x208443['Disposable']{constructor(_0x2db7bf,_0x120be2){const _0x4467df=_0x1da00a;super(),this[_0x4467df(0x156)]=_0x2db7bf,this[_0x4467df(0x14a)]=_0x120be2,this['_initDataSource']();}['_initDataSource'](){const _0x410087=_0x1da00a;this['_threadCommentDataSourceService'][_0x410087(0x14d)]=this[_0x410087(0x14a)],this['_threadCommentDataSourceService'][_0x410087(0x16d)]=!0x1;}};_0x118433=_0x418553([_0x138734(0x0,_0x195a9a[_0x1da00a(0x13e)]),_0x138734(0x1,_0x208443[_0x1da00a(0xed)](_0x22d406))],_0x118433);var _0x5636cd=Object['defineProperty'],_0xdf0f0a=Object[_0x1da00a(0x133)],_0x4115d4=(_0x635056,_0xba623e,_0x30867c)=>_0xba623e in _0x635056?_0x5636cd(_0x635056,_0xba623e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30867c}):_0x635056[_0xba623e]=_0x30867c,_0xb94089=(_0x28d185,_0x5e9c0b,_0x254f84,_0xabef6d)=>{const _0x253085=_0x1da00a;for(var _0x4998ad=_0xabef6d>0x1?void 0x0:_0xabef6d?_0xdf0f0a(_0x5e9c0b,_0x254f84):_0x5e9c0b,_0x354ace=_0x28d185[_0x253085(0x10e)]-0x1,_0x1a1759;_0x354ace>=0x0;_0x354ace--)(_0x1a1759=_0x28d185[_0x354ace])&&(_0x4998ad=_0x1a1759(_0x4998ad)||_0x4998ad);return _0x4998ad;},_0x1b2bde=(_0x18f252,_0xb3c80a)=>(_0x306e25,_0x2456ea)=>_0xb3c80a(_0x306e25,_0x2456ea,_0x18f252),_0x5cb5bb=(_0x8a50b8,_0x3746a1,_0x3eb035)=>_0x4115d4(_0x8a50b8,typeof _0x3746a1!=_0x1da00a(0xe9)?_0x3746a1+'':_0x3746a1,_0x3eb035);_0x583ef1['UniverThreadCommentDataSourcePlugin']=class extends _0x208443[_0x1da00a(0x154)]{constructor(_0x1d4c5d=_0xa39fc1,_0x1fd188,_0x57a4ab){const _0x5c9617=_0x1da00a;super(),this['_config']=_0x1d4c5d,this[_0x5c9617(0x11e)]=_0x1fd188,this[_0x5c9617(0xf5)]=_0x57a4ab;const {..._0x2ceaa8}=_0x208443[_0x5c9617(0xf8)]({},_0xa39fc1,this['_config']);this['_configService']['setConfig'](_0x2fe050,_0x2ceaa8);}['onStarting'](){const _0x2aec90=_0x1da00a;[[_0x22d406],[_0x118433],[_0x2dbee5]][_0x2aec90(0x160)](_0x50ff7e=>{const _0x2faaa1=_0x2aec90;this[_0x2faaa1(0x11e)][_0x2faaa1(0x12f)](_0x50ff7e);});}[_0x1da00a(0x149)](){const _0x13ebbc=_0x1da00a;this[_0x13ebbc(0x11e)]['get'](_0x118433),this['_injector']['get'](_0x2dbee5);}},_0x5cb5bb(_0x583ef1[_0x1da00a(0xe7)],'pluginName',_0x36ea8d),_0x5cb5bb(_0x583ef1[_0x1da00a(0xe7)],_0x1da00a(0x111),_0x208443[_0x1da00a(0x13f)][_0x1da00a(0x136)]),_0x583ef1['UniverThreadCommentDataSourcePlugin']=_0xb94089([_0x208443[_0x1da00a(0x14b)](_0x2f4e2e[_0x1da00a(0xe5)],_0x2e266b['UniverCollaborationClientPlugin'],_0x11f360['UniverLicensePlugin']),_0x1b2bde(0x1,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x126)])),_0x1b2bde(0x2,_0x208443['IConfigService'])],_0x583ef1[_0x1da00a(0xe7)]),Object[_0x1da00a(0x166)](_0x583ef1,Symbol['toStringTag'],{'value':_0x1da00a(0xf9)});}));
1
+ function _0x1927(_0x4a24cb,_0xcf9027){const _0x3bd8af=_0x3bd8();return _0x1927=function(_0x192784,_0xb53684){_0x192784=_0x192784-0x1ea;let _0xb3e5f4=_0x3bd8af[_0x192784];return _0xb3e5f4;},_0x1927(_0x4a24cb,_0xcf9027);}function _0x3bd8(){const _0x23badb=['parentId','filter','userId','DependentOn','_threadCommentDataSourceService','payload','IThreadCommentDataSourceService','Disposable','/reply','user','stringify','_httpService','UniverProThreadCommentDatasource','3346aNEemi','ThreadCommentModel','slice','function','@univerjs/thread-comment-ui','1191645eeDCYF','UniverThreadCommentUIPlugin','@univerjs/network','_initDataSource','amd','listComments','defineProperty','8136fFRgWH','@univerjs-pro/license','subscribe','UniverCollaborationClientPlugin','forEach','userID','getUnit','/add','Edit','Add','syncUpdateMutationToColla','setConfig','comment','format','_userService','CustomRangeType','_init','CollaborationSessionService','onReady','disposeWithMe','/edit','Solve','get','content','_injector','customRanges','getUser','map','deleteComment','pipe','79256gviBIv','rangeType','1382LvmXKz','UniverThreadCommentDataSourcePlugin','values','parse','replies','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','commentUpdate$','UserManagerService','rangeId','Inject','updateComment','dayjs','HTTPService','8ZgQdGR','dataSource','replyId','8552502aTrOvb','getCurrentUser','8076180uIGBWW','_threadCommentDataSource','Delete','CommentService','UNIVER_UNKNOWN','_commentService','body','getMemberID','IConfigService','85yVUbUc','code','UniverProLicense','type','Injector','Solved','93313wWPjlp','root','UniverProCollaborationClient','/universer-api/comment/unit/','toStringTag','resolved','_config','comments','_threadCommentModel','users','object','1980OpvdGc','getComment','post','UNRECOGNIZED','Unknown','add','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/core','createTimestamp','addComment','_sessionService','bufferTime','rxjs','addUser','Reply','resolveComment','UniverNetwork','Plugin','length','_configService','error','/solved','requireSession','getOwnPropertyDescriptor','/delete','threadId','exports','334LmTlIT','onStarting'];_0x3bd8=function(){return _0x23badb;};return _0x3bd8();}(function(_0x4033e3,_0x540bb3){const _0x1df9e6=_0x1927,_0x4794f3=_0x4033e3();while(!![]){try{const _0x4db19b=-parseInt(_0x1df9e6(0x25f))/0x1*(parseInt(_0x1df9e6(0x216))/0x2)+parseInt(_0x1df9e6(0x1ef))/0x3+-parseInt(_0x1df9e6(0x214))/0x4*(parseInt(_0x1df9e6(0x232))/0x5)+-parseInt(_0x1df9e6(0x1f6))/0x6*(parseInt(_0x1df9e6(0x1ea))/0x7)+parseInt(_0x1df9e6(0x224))/0x8*(parseInt(_0x1df9e6(0x227))/0x9)+-parseInt(_0x1df9e6(0x229))/0xa+parseInt(_0x1df9e6(0x238))/0xb*(parseInt(_0x1df9e6(0x243))/0xc);if(_0x4db19b===_0x540bb3)break;else _0x4794f3['push'](_0x4794f3['shift']());}catch(_0x11dc93){_0x4794f3['push'](_0x4794f3['shift']());}}}(_0x3bd8,0xb0b3a),function(_0x3194d2,_0x1d4326){const _0x22d588=_0x1927;typeof exports==_0x22d588(0x242)&&typeof module<'u'?_0x1d4326(exports,require('@univerjs-pro/collaboration-client'),require(_0x22d588(0x1f7)),require(_0x22d588(0x24b)),require(_0x22d588(0x1ee)),require('@univerjs/thread-comment'),require(_0x22d588(0x250)),require('@univerjs/network')):typeof define==_0x22d588(0x1ed)&&define[_0x22d588(0x1f3)]?define([_0x22d588(0x25e),'@univerjs-pro/collaboration-client',_0x22d588(0x1f7),_0x22d588(0x24b),_0x22d588(0x1ee),'@univerjs/thread-comment','rxjs',_0x22d588(0x1f1)],_0x1d4326):(_0x3194d2=typeof globalThis<'u'?globalThis:_0x3194d2||self,_0x1d4326(_0x3194d2[_0x22d588(0x26d)]={},_0x3194d2[_0x22d588(0x23a)],_0x3194d2[_0x22d588(0x234)],_0x3194d2['UniverCore'],_0x3194d2['UniverThreadCommentUi'],_0x3194d2['UniverThreadComment'],_0x3194d2[_0x22d588(0x250)],_0x3194d2[_0x22d588(0x254)]));}(this,function(_0x4b8500,_0x410ab3,_0x3913ca,_0x43ff14,_0x315cc2,_0x293da4,_0x135669,_0xa198f5){'use strict';const _0x68cbcb=_0x1927;const _0x47759d=_0x68cbcb(0x24a);var _0xd2dbd0=(_0x4350d4=>(_0x4350d4[_0x4350d4[_0x68cbcb(0x21c)]=0x0]='OpenOrReOpen',_0x4350d4[_0x4350d4[_0x68cbcb(0x237)]=0x1]=_0x68cbcb(0x237),_0x4350d4[_0x4350d4['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4350d4))(_0xd2dbd0||{}),_0x2a6a07=(_0x1a5220=>(_0x1a5220[_0x1a5220[_0x68cbcb(0x247)]=0x0]='Unknown',_0x1a5220[_0x1a5220[_0x68cbcb(0x1ff)]=0x1]='Add',_0x1a5220[_0x1a5220[_0x68cbcb(0x252)]=0x2]=_0x68cbcb(0x252),_0x1a5220[_0x1a5220['Edit']=0x3]=_0x68cbcb(0x1fe),_0x1a5220[_0x1a5220[_0x68cbcb(0x22b)]=0x4]=_0x68cbcb(0x22b),_0x1a5220[_0x1a5220[_0x68cbcb(0x20b)]=0x5]=_0x68cbcb(0x20b),_0x1a5220[_0x1a5220[_0x68cbcb(0x246)]=-0x1]=_0x68cbcb(0x246),_0x1a5220))(_0x2a6a07||{});const _0x33033b=_0x5b8813=>_0x43ff14['dayjs'](new Date(+_0x5b8813))['format'](_0x68cbcb(0x21b)),_0x188cd1=async(_0x228e71,_0x5d105f)=>{const _0x28c1b8=_0x68cbcb,_0x3548f6=_0x228e71[_0x28c1b8(0x20c)](_0x43ff14['UserManagerService']),_0x44c9ef=_0x228e71['get'](_0xa198f5[_0x28c1b8(0x223)]);_0x5d105f['forEach'](_0xacf965=>{const _0x40d408=_0x28c1b8;_0x3548f6[_0x40d408(0x210)](_0xacf965)&&_0x5d105f['delete'](_0xacf965);}),_0x5d105f['size']&&(await _0x44c9ef[_0x28c1b8(0x20c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5d105f]}}))[_0x28c1b8(0x22f)][_0x28c1b8(0x241)]['forEach'](_0x420340=>{const _0x4ab6d8=_0x28c1b8;_0x420340&&_0x3548f6[_0x4ab6d8(0x251)](_0x420340);});};var _0x38f1f5=Object[_0x68cbcb(0x25b)],_0x22be8c=(_0x409293,_0x15e06f,_0x1886cc,_0x4505f8)=>{for(var _0x45d19e=_0x4505f8>0x1?void 0x0:_0x4505f8?_0x38f1f5(_0x15e06f,_0x1886cc):_0x15e06f,_0x2a8890=_0x409293['length']-0x1,_0x41575a;_0x2a8890>=0x0;_0x2a8890--)(_0x41575a=_0x409293[_0x2a8890])&&(_0x45d19e=_0x41575a(_0x45d19e)||_0x45d19e);return _0x45d19e;},_0x4ad2e9=(_0x44ee1c,_0x539633)=>(_0xd767a7,_0x3e18d6)=>_0x539633(_0xd767a7,_0x3e18d6,_0x44ee1c);let _0x3c98ab=class extends _0x43ff14[_0x68cbcb(0x268)]{constructor(_0xe47e05,_0x34718a,_0x2acedb,_0x3a7f5a){const _0x22812d=_0x68cbcb;super(),this[_0x22812d(0x22e)]=_0xe47e05,this[_0x22812d(0x240)]=_0x34718a,this['_userService']=_0x2acedb,this[_0x22812d(0x20e)]=_0x3a7f5a,this[_0x22812d(0x206)](),this['_initUserSync']();}['_initUserSync'](){const _0x1c99b3=_0x68cbcb;this[_0x1c99b3(0x209)](this[_0x1c99b3(0x240)][_0x1c99b3(0x21d)][_0x1c99b3(0x213)](_0x135669[_0x1c99b3(0x24f)](0x10))[_0x1c99b3(0x1f8)](_0x3904a1=>{const _0x48b5b3=_0x1c99b3,_0x294eab=new Set();_0x3904a1[_0x48b5b3(0x1fa)](_0x9db516=>{const _0x5dd85c=_0x48b5b3;switch(_0x9db516[_0x5dd85c(0x235)]){case _0x5dd85c(0x248):{const _0x1a2495=_0x9db516[_0x5dd85c(0x266)]['personId'];_0x294eab['add'](_0x1a2495);break;}}}),_0x188cd1(this[_0x48b5b3(0x20e)],_0x294eab);}));}[_0x68cbcb(0x206)](){const _0x91717f=_0x68cbcb;this['disposeWithMe'](this[_0x91717f(0x22e)]['commentUpdate$']['subscribe'](async _0x36ffac=>{const _0x4940b4=_0x91717f;var _0x474631,_0x171cac,_0x3749dc,_0xdc93ee;const _0x556af3=(_0x474631=this[_0x4940b4(0x240)]['getUnit'](_0x36ffac['unitId'])[_0x4940b4(0x249)](_0x512828=>_0x512828[_0x4940b4(0x25d)]===_0x36ffac[_0x4940b4(0x25d)]))==null?void 0x0:_0x474631[_0x4940b4(0x239)];if(!_0x556af3)return;const {unitId:_0x5d779a,subUnitId:_0x914646}=_0x556af3;switch(_0x36ffac[_0x4940b4(0x26a)]&&this[_0x4940b4(0x204)][_0x4940b4(0x251)](_0x36ffac[_0x4940b4(0x26a)]),_0x36ffac[_0x4940b4(0x235)]){case _0x2a6a07['Add']:break;case _0x2a6a07[_0x4940b4(0x252)]:{this[_0x4940b4(0x240)][_0x4940b4(0x24d)](_0x5d779a,_0x914646,{'unitId':_0x5d779a,'subUnitId':_0x914646,'ref':'','id':_0x36ffac[_0x4940b4(0x226)],'dT':_0x33033b(+_0x36ffac['createTimestamp']),'threadId':_0x36ffac[_0x4940b4(0x25d)],'personId':(_0x3749dc=(_0x171cac=_0x36ffac[_0x4940b4(0x26a)])==null?void 0x0:_0x171cac['userID'])!=null?_0x3749dc:_0x36ffac[_0x4940b4(0x263)],'text':JSON[_0x4940b4(0x219)](_0x36ffac[_0x4940b4(0x20d)]),'parentId':_0x556af3['id']});break;}case _0x2a6a07[_0x4940b4(0x22b)]:{const _0x607cdc=this[_0x4940b4(0x240)][_0x4940b4(0x244)](_0x5d779a,_0x914646,_0x36ffac[_0x4940b4(0x226)]);_0x607cdc&&_0x607cdc[_0x4940b4(0x261)]&&this[_0x4940b4(0x240)][_0x4940b4(0x212)](_0x5d779a,_0x914646,_0x36ffac['replyId']);break;}case _0x2a6a07['Edit']:{this[_0x4940b4(0x240)][_0x4940b4(0x221)](_0x5d779a,_0x914646,{'commentId':_0x36ffac[_0x4940b4(0x226)],'text':JSON['parse'](_0x36ffac[_0x4940b4(0x20d)])});break;}case _0x2a6a07[_0x4940b4(0x20b)]:{const _0x50f4fb=(_0xdc93ee=this[_0x4940b4(0x240)][_0x4940b4(0x1fc)](_0x36ffac['unitId'])['find'](_0x2c3cf5=>_0x2c3cf5[_0x4940b4(0x25d)]===_0x36ffac[_0x4940b4(0x25d)]))==null?void 0x0:_0xdc93ee[_0x4940b4(0x239)];_0x50f4fb&&this['_threadCommentModel'][_0x4940b4(0x253)](_0x5d779a,_0x914646,_0x50f4fb['id'],_0x36ffac['solved']===_0xd2dbd0[_0x4940b4(0x237)]);break;}}}));}};_0x3c98ab=_0x22be8c([_0x4ad2e9(0x0,_0x43ff14['Inject'](_0x410ab3[_0x68cbcb(0x22c)])),_0x4ad2e9(0x1,_0x43ff14['Inject'](_0x293da4[_0x68cbcb(0x1eb)])),_0x4ad2e9(0x2,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x21e)])),_0x4ad2e9(0x3,_0x43ff14['Inject'](_0x43ff14[_0x68cbcb(0x236)]))],_0x3c98ab);const _0x160666='thread-comment-data-source.config',_0x5dcb9d={};var _0x39dc30=Object[_0x68cbcb(0x25b)],_0x5ea355=(_0x1d9b05,_0x59e427,_0x2ec891,_0x58eb04)=>{for(var _0x397815=_0x58eb04>0x1?void 0x0:_0x58eb04?_0x39dc30(_0x59e427,_0x2ec891):_0x59e427,_0x327d6b=_0x1d9b05['length']-0x1,_0x49a82a;_0x327d6b>=0x0;_0x327d6b--)(_0x49a82a=_0x1d9b05[_0x327d6b])&&(_0x397815=_0x49a82a(_0x397815)||_0x397815);return _0x397815;},_0x3d193d=(_0x2b72ef,_0x2085f4)=>(_0x125f9b,_0x3d1d44)=>_0x2085f4(_0x125f9b,_0x3d1d44,_0x2b72ef);function _0x54ae88(_0x417b68,_0x5a926d){const _0x24b2d4=_0x68cbcb,_0x87ae98=_0x417b68['replies'][0x0];return{..._0x5a926d,'id':_0x87ae98['replyId'],'resolved':_0x417b68['solved']===0x1,'dT':_0x33033b(_0x87ae98[_0x24b2d4(0x24c)]),'personId':_0x87ae98[_0x24b2d4(0x263)],'threadId':_0x87ae98[_0x24b2d4(0x25d)]};}function _0x3091e0(_0x108c86,_0x12b6ec,_0x27dadb){const _0x299a81=_0x68cbcb;var _0x52e9cd,_0x10f404;if(((_0x10f404=(_0x52e9cd=_0x108c86==null?void 0x0:_0x108c86['replies'])==null?void 0x0:_0x52e9cd[_0x299a81(0x256)])!=null?_0x10f404:0x0)>0x0){const _0x7dd90b=(_0x39a54d,_0x26d5c2)=>({'id':_0x39a54d[_0x299a81(0x226)],'threadId':_0x39a54d[_0x299a81(0x25d)],'dT':_0x33033b(_0x39a54d[_0x299a81(0x24c)]),'personId':_0x39a54d[_0x299a81(0x263)],'resolved':_0x108c86['solved']===_0xd2dbd0[_0x299a81(0x237)],'unitId':_0x12b6ec,'subUnitId':_0x27dadb,'text':JSON[_0x299a81(0x219)](_0x39a54d['content']),'parentId':_0x26d5c2}),_0xdcb6b2=_0x7dd90b(_0x108c86[_0x299a81(0x21a)][0x0]);return{..._0xdcb6b2,'children':_0x108c86[_0x299a81(0x21a)][_0x299a81(0x1ec)](0x1)['map'](_0x46d9c1=>_0x7dd90b(_0x46d9c1,_0xdcb6b2['id']))};}return null;}let _0x34fd15=class{constructor(_0x4239b2,_0x55846b,_0x300515,_0xbc1cc3){const _0x457d52=_0x68cbcb;this[_0x457d52(0x26c)]=_0x4239b2,this[_0x457d52(0x204)]=_0x55846b,this[_0x457d52(0x24e)]=_0x300515,this['_injector']=_0xbc1cc3;}async[_0x68cbcb(0x24d)](_0xd8605b){const _0x3603cd=_0x68cbcb;var _0x284831,_0x48714f;const {parentId:_0x3dc4be,unitId:_0x71b2f8,text:_0x1f946f,threadId:_0x173990}=_0xd8605b,_0x5c93ee=(_0x48714f=(_0x284831=_0x1f946f[_0x3603cd(0x20f)])==null?void 0x0:_0x284831[_0x3603cd(0x262)](_0x9afc9d=>_0x9afc9d[_0x3603cd(0x215)]===_0x43ff14[_0x3603cd(0x205)]['COMMENT'])[_0x3603cd(0x211)](_0x3648fe=>_0x3648fe[_0x3603cd(0x21f)]))!=null?_0x48714f:[],_0x4b0582=JSON[_0x3603cd(0x26b)](_0x1f946f),_0x242036=(await this[_0x3603cd(0x24e)][_0x3603cd(0x25a)](_0x71b2f8))['getMemberID']();if(_0x3dc4be){const _0x19c367={'memberId':_0x242036,'unitId':_0x71b2f8,'content':_0x4b0582,'mention':_0x5c93ee,'threadId':_0x173990},_0x316036=(await this['_httpService'][_0x3603cd(0x245)](_0x3603cd(0x23b)+_0x71b2f8+_0x3603cd(0x269),{'body':_0x19c367}))[_0x3603cd(0x22f)]['reply'];return{..._0xd8605b,'id':_0x316036[_0x3603cd(0x226)],'dT':_0x43ff14[_0x3603cd(0x222)](+_0x316036[_0x3603cd(0x24c)])[_0x3603cd(0x203)](_0x3603cd(0x21b)),'personId':_0x316036[_0x3603cd(0x263)]};}else{const _0x1addb2={'memberId':_0x242036,'unitId':_0x71b2f8,'content':_0x4b0582,'mention':_0x5c93ee},_0x18f399=await this[_0x3603cd(0x26c)][_0x3603cd(0x245)](_0x3603cd(0x23b)+_0x71b2f8+_0x3603cd(0x1fd),{'body':_0x1addb2});return _0x54ae88(_0x18f399['body'][_0x3603cd(0x202)],_0xd8605b);}}async[_0x68cbcb(0x221)](_0x482f98){const _0x5c85fc=_0x68cbcb;var _0x34ee89,_0x10d9ac;const {text:_0x4e1900,unitId:_0x2a4154}=_0x482f98,_0x770e8=(_0x10d9ac=(_0x34ee89=_0x4e1900[_0x5c85fc(0x20f)])==null?void 0x0:_0x34ee89[_0x5c85fc(0x262)](_0x3d004c=>_0x3d004c[_0x5c85fc(0x215)]===_0x43ff14[_0x5c85fc(0x205)]['COMMENT'])[_0x5c85fc(0x211)](_0x8d6c66=>_0x8d6c66['rangeId']))!=null?_0x10d9ac:[],_0x56e6c4=JSON['stringify'](_0x4e1900),_0xfb8188=_0x482f98[_0x5c85fc(0x25d)],_0x4aa1eb=_0x482f98['id'],_0x2bb96a={'memberId':(await this['_sessionService'][_0x5c85fc(0x25a)](_0x2a4154))['getMemberID'](),'unitId':_0x2a4154,'threadId':_0xfb8188,'mention':_0x770e8,'content':_0x56e6c4,'replyId':_0x4aa1eb},_0x40ba5c=await this[_0x5c85fc(0x26c)][_0x5c85fc(0x245)](_0x5c85fc(0x23b)+_0x2a4154+_0x5c85fc(0x20a),{'body':_0x2bb96a});return!_0x40ba5c[_0x5c85fc(0x22f)][_0x5c85fc(0x258)]||_0x40ba5c['body'][_0x5c85fc(0x258)][_0x5c85fc(0x233)]===0x1;}async[_0x68cbcb(0x253)](_0x4d2965){const _0x233905=_0x68cbcb,{unitId:_0x2690c6}=_0x4d2965,_0x2bcc70=_0x4d2965[_0x233905(0x25d)],_0x34f353={'memberId':this[_0x233905(0x204)][_0x233905(0x228)]()[_0x233905(0x1fb)],'unitId':_0x2690c6,'threadId':_0x2bcc70,'solved':_0x4d2965[_0x233905(0x23d)]?_0xd2dbd0[_0x233905(0x237)]:_0xd2dbd0['OpenOrReOpen']},_0x2e8c71=await this[_0x233905(0x26c)][_0x233905(0x245)](_0x233905(0x23b)+_0x2690c6+_0x233905(0x259),{'body':_0x34f353});return!_0x2e8c71[_0x233905(0x22f)]['error']||_0x2e8c71[_0x233905(0x22f)][_0x233905(0x258)]['code']===0x1;}async[_0x68cbcb(0x212)](_0x565edc,_0x540feb,_0x3890f0,_0x1a9b4f){const _0x287ee9=_0x68cbcb,_0x357358={'memberId':(await this[_0x287ee9(0x24e)][_0x287ee9(0x25a)](_0x565edc))[_0x287ee9(0x230)](),'threadId':_0x3890f0,'replyId':_0x1a9b4f,'unitId':_0x565edc},_0x1bac0b=await this[_0x287ee9(0x26c)][_0x287ee9(0x245)](_0x287ee9(0x23b)+_0x565edc+_0x287ee9(0x25c),{'body':_0x357358});return!_0x1bac0b[_0x287ee9(0x22f)][_0x287ee9(0x258)]||_0x1bac0b[_0x287ee9(0x22f)][_0x287ee9(0x258)][_0x287ee9(0x233)]===0x1;}async[_0x68cbcb(0x1f4)](_0x17df38,_0x253cec,_0x18a050){const _0x445fae=_0x68cbcb,_0xa58a59={'unitId':_0x17df38,'threadId':_0x18a050},_0x4325f0=await this[_0x445fae(0x26c)][_0x445fae(0x245)]('/universer-api/comment/unit/'+_0x17df38+'/list',{'body':_0xa58a59}),_0x18477d=_0x18a050[_0x445fae(0x211)](_0x266002=>_0x3091e0(_0x4325f0[_0x445fae(0x22f)][_0x445fae(0x23f)][_0x266002],_0x17df38,_0x253cec))[_0x445fae(0x262)](Boolean);return Object[_0x445fae(0x218)](_0x4325f0[_0x445fae(0x22f)][_0x445fae(0x241)])['forEach'](_0x2a202d=>{const _0x343242=_0x445fae;this[_0x343242(0x204)]['addUser'](_0x2a202d);}),_0x18477d;}['saveCommentToSnapshot'](_0x5f0af6){return{'id':_0x5f0af6['id'],'threadId':_0x5f0af6['threadId'],'ref':_0x5f0af6['ref']};}};_0x34fd15=_0x5ea355([_0x3d193d(0x0,_0x43ff14['Inject'](_0xa198f5[_0x68cbcb(0x223)])),_0x3d193d(0x1,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x21e)])),_0x3d193d(0x2,_0x43ff14['Inject'](_0x410ab3[_0x68cbcb(0x207)])),_0x3d193d(0x3,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x236)]))],_0x34fd15);var _0x758866=Object[_0x68cbcb(0x25b)],_0x2f145d=(_0x9db884,_0x1fc576,_0x337198,_0x3366c1)=>{const _0x50a8be=_0x68cbcb;for(var _0x566b4b=_0x3366c1>0x1?void 0x0:_0x3366c1?_0x758866(_0x1fc576,_0x337198):_0x1fc576,_0xf87754=_0x9db884[_0x50a8be(0x256)]-0x1,_0x22ac67;_0xf87754>=0x0;_0xf87754--)(_0x22ac67=_0x9db884[_0xf87754])&&(_0x566b4b=_0x22ac67(_0x566b4b)||_0x566b4b);return _0x566b4b;},_0x4797b3=(_0x45a0bb,_0xfa7aa9)=>(_0x110e3a,_0x4cdd16)=>_0xfa7aa9(_0x110e3a,_0x4cdd16,_0x45a0bb);let _0x5c4d1b=class extends _0x43ff14[_0x68cbcb(0x268)]{constructor(_0x582949,_0x534909){const _0x129a93=_0x68cbcb;super(),this[_0x129a93(0x265)]=_0x582949,this[_0x129a93(0x22a)]=_0x534909,this[_0x129a93(0x1f2)]();}['_initDataSource'](){const _0x5f094d=_0x68cbcb;this['_threadCommentDataSourceService'][_0x5f094d(0x225)]=this['_threadCommentDataSource'],this[_0x5f094d(0x265)][_0x5f094d(0x200)]=!0x1;}};_0x5c4d1b=_0x2f145d([_0x4797b3(0x0,_0x293da4[_0x68cbcb(0x267)]),_0x4797b3(0x1,_0x43ff14[_0x68cbcb(0x220)](_0x34fd15))],_0x5c4d1b);var _0x4d45ec=Object[_0x68cbcb(0x1f5)],_0x508a28=Object[_0x68cbcb(0x25b)],_0x578682=(_0x4af109,_0x2c688f,_0x15c657)=>_0x2c688f in _0x4af109?_0x4d45ec(_0x4af109,_0x2c688f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15c657}):_0x4af109[_0x2c688f]=_0x15c657,_0x283ca0=(_0xd6187d,_0x3f43ab,_0x26ac37,_0x3ebbfe)=>{const _0x3c6327=_0x68cbcb;for(var _0x1bb187=_0x3ebbfe>0x1?void 0x0:_0x3ebbfe?_0x508a28(_0x3f43ab,_0x26ac37):_0x3f43ab,_0x4da1a6=_0xd6187d[_0x3c6327(0x256)]-0x1,_0x3d7615;_0x4da1a6>=0x0;_0x4da1a6--)(_0x3d7615=_0xd6187d[_0x4da1a6])&&(_0x1bb187=_0x3d7615(_0x1bb187)||_0x1bb187);return _0x1bb187;},_0x474611=(_0x28411a,_0x106dca)=>(_0x6ed0a5,_0x19c98d)=>_0x106dca(_0x6ed0a5,_0x19c98d,_0x28411a),_0x49841d=(_0x23e2fa,_0x32ee1a,_0x3dbd94)=>_0x578682(_0x23e2fa,typeof _0x32ee1a!='symbol'?_0x32ee1a+'':_0x32ee1a,_0x3dbd94);_0x4b8500['UniverThreadCommentDataSourcePlugin']=class extends _0x43ff14[_0x68cbcb(0x255)]{constructor(_0x57d416=_0x5dcb9d,_0x8094b3,_0x334860){const _0x21b420=_0x68cbcb;super(),this[_0x21b420(0x23e)]=_0x57d416,this['_injector']=_0x8094b3,this[_0x21b420(0x257)]=_0x334860;const {..._0x5001d3}=_0x43ff14['merge']({},_0x5dcb9d,this[_0x21b420(0x23e)]);this['_configService'][_0x21b420(0x201)](_0x160666,_0x5001d3);}[_0x68cbcb(0x260)](){const _0x4d1fa2=_0x68cbcb;[[_0x34fd15],[_0x5c4d1b],[_0x3c98ab]][_0x4d1fa2(0x1fa)](_0x517118=>{const _0x378f8c=_0x4d1fa2;this['_injector'][_0x378f8c(0x248)](_0x517118);});}[_0x68cbcb(0x208)](){const _0x3112bd=_0x68cbcb;this[_0x3112bd(0x20e)]['get'](_0x5c4d1b),this['_injector'][_0x3112bd(0x20c)](_0x3c98ab);}},_0x49841d(_0x4b8500['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x47759d),_0x49841d(_0x4b8500[_0x68cbcb(0x217)],_0x68cbcb(0x235),_0x43ff14['UniverInstanceType'][_0x68cbcb(0x22d)]),_0x4b8500['UniverThreadCommentDataSourcePlugin']=_0x283ca0([_0x43ff14[_0x68cbcb(0x264)](_0x315cc2[_0x68cbcb(0x1f0)],_0x410ab3[_0x68cbcb(0x1f9)],_0x3913ca['UniverLicensePlugin']),_0x474611(0x1,_0x43ff14['Inject'](_0x43ff14['Injector'])),_0x474611(0x2,_0x43ff14[_0x68cbcb(0x231)])],_0x4b8500[_0x68cbcb(0x217)]),Object[_0x68cbcb(0x1f5)](_0x4b8500,Symbol[_0x68cbcb(0x23c)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505071607",
3
+ "version": "0.7.0-nightly.202505091607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505071607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505071607",
50
- "@univerjs/core": "0.7.0-nightly.202505071607",
51
- "@univerjs/network": "0.7.0-nightly.202505071607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505091607",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505091607",
50
+ "@univerjs/core": "0.7.0-nightly.202505091607",
51
+ "@univerjs/network": "0.7.0-nightly.202505091607",
52
52
  "@univerjs/protocol": "0.1.46-alpha.3",
53
- "@univerjs/thread-comment": "0.7.0-nightly.202505071607",
54
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505071607"
53
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505091607",
54
+ "@univerjs/thread-comment": "0.7.0-nightly.202505091607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
60
  "vitest": "^3.1.3",
61
- "@univerjs-infra/shared": "0.7.0-beta.0"
61
+ "@univerjs-infra/shared": "0.7.0-beta.1"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",