@univerjs-pro/thread-comment-datasource 0.10.10-experimental.20251016-33b0941 → 0.10.10-nightly.202510170942

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 _0x132b13=_0x945c;(function(_0x2079f3,_0x5b4760){const _0x304f65=_0x945c,_0xb87e17=_0x2079f3();while(!![]){try{const _0x46d16e=-parseInt(_0x304f65(0x1b0))/0x1*(-parseInt(_0x304f65(0x195))/0x2)+parseInt(_0x304f65(0x1dc))/0x3*(-parseInt(_0x304f65(0x1ca))/0x4)+-parseInt(_0x304f65(0x1ce))/0x5+parseInt(_0x304f65(0x1c8))/0x6+-parseInt(_0x304f65(0x1ac))/0x7*(-parseInt(_0x304f65(0x184))/0x8)+parseInt(_0x304f65(0x1e0))/0x9+-parseInt(_0x304f65(0x18e))/0xa*(parseInt(_0x304f65(0x1d9))/0xb);if(_0x46d16e===_0x5b4760)break;else _0xb87e17['push'](_0xb87e17['shift']());}catch(_0x483740){_0xb87e17['push'](_0xb87e17['shift']());}}}(_0x3995,0x6543d));Object[_0x132b13(0x1b4)](exports,Symbol[_0x132b13(0x1c2)],{'value':_0x132b13(0x190)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x132b13(0x1a9);var I=(_0x5af7e2=>(_0x5af7e2[_0x5af7e2[_0x132b13(0x1a5)]=0x0]=_0x132b13(0x1a5),_0x5af7e2[_0x5af7e2[_0x132b13(0x1cb)]=0x1]=_0x132b13(0x1cb),_0x5af7e2[_0x5af7e2[_0x132b13(0x1b8)]=-0x1]=_0x132b13(0x1b8),_0x5af7e2))(I||{}),v=(_0xbf7754=>(_0xbf7754[_0xbf7754[_0x132b13(0x1bb)]=0x0]=_0x132b13(0x1bb),_0xbf7754[_0xbf7754[_0x132b13(0x1d6)]=0x1]=_0x132b13(0x1d6),_0xbf7754[_0xbf7754[_0x132b13(0x1e9)]=0x2]=_0x132b13(0x1e9),_0xbf7754[_0xbf7754[_0x132b13(0x1f5)]=0x3]=_0x132b13(0x1f5),_0xbf7754[_0xbf7754[_0x132b13(0x1ea)]=0x4]=_0x132b13(0x1ea),_0xbf7754[_0xbf7754['Solve']=0x5]='Solve',_0xbf7754[_0xbf7754[_0x132b13(0x1b8)]=-0x1]=_0x132b13(0x1b8),_0xbf7754))(v||{});const f=_0x545b2b=>c['dayjs'](new Date(+_0x545b2b))['format'](_0x132b13(0x18a)),R=async(_0x3bef04,_0x475b74)=>{const _0x119afa=_0x132b13,_0x24a14b=_0x3bef04[_0x119afa(0x187)](c[_0x119afa(0x1e1)]),_0x821c45=_0x3bef04['get'](P[_0x119afa(0x183)]);_0x475b74[_0x119afa(0x19b)](_0x44584b=>{const _0x130e9f=_0x119afa;_0x24a14b[_0x130e9f(0x189)](_0x44584b)&&_0x475b74[_0x130e9f(0x1e5)](_0x44584b);}),_0x475b74['size']&&(await _0x821c45['get'](_0x119afa(0x1b3),{'params':{'userIDs':[..._0x475b74]}}))[_0x119afa(0x1f1)]['users'][_0x119afa(0x19b)](_0x292fd6=>{const _0x23656f=_0x119afa;_0x292fd6&&_0x24a14b[_0x23656f(0x19a)](_0x292fd6);});};var $=Object[_0x132b13(0x1a2)],E=(_0x493d1c,_0x370f04,_0x537ed5,_0x542a0a)=>{for(var _0x4f40e9=_0x542a0a>0x1?void 0x0:_0x542a0a?$(_0x370f04,_0x537ed5):_0x370f04,_0x1c4590=_0x493d1c['length']-0x1,_0x1e4951;_0x1c4590>=0x0;_0x1c4590--)(_0x1e4951=_0x493d1c[_0x1c4590])&&(_0x4f40e9=_0x1e4951(_0x4f40e9)||_0x4f40e9);return _0x4f40e9;},S=(_0xc2e3f8,_0x161b2c)=>(_0x2aa27e,_0x2b573a)=>_0x161b2c(_0x2aa27e,_0x2b573a,_0xc2e3f8);let _=class extends c[_0x132b13(0x1d8)]{constructor(_0x47f551,_0x374554,_0x392f9a,_0x4bccb7){const _0x972968=_0x132b13;super(),this[_0x972968(0x1a4)]=_0x47f551,this[_0x972968(0x1f3)]=_0x374554,this[_0x972968(0x186)]=_0x392f9a,this[_0x972968(0x1c5)]=_0x4bccb7,this[_0x972968(0x17f)](),this[_0x972968(0x1b2)]();}[_0x132b13(0x1b2)](){const _0x273e01=_0x132b13;this[_0x273e01(0x1cf)](this['_threadCommentModel'][_0x273e01(0x1d2)][_0x273e01(0x1e6)](j[_0x273e01(0x1e8)](0x10))[_0x273e01(0x1a8)](_0x386449=>{const _0x555909=_0x273e01,_0x4e02f4=new Set();_0x386449['forEach'](_0x47cb36=>{const _0x18a235=_0x945c;switch(_0x47cb36['type']){case _0x18a235(0x1ec):{const _0x1ba972=_0x47cb36['payload']['personId'];_0x4e02f4[_0x18a235(0x1ec)](_0x1ba972);break;}}}),R(this[_0x555909(0x1c5)],_0x4e02f4);}));}[_0x132b13(0x17f)](){const _0x4d497f=_0x132b13;this['disposeWithMe'](this[_0x4d497f(0x1a4)][_0x4d497f(0x1d2)][_0x4d497f(0x1a8)](async _0x3468af=>{const _0x425e56=_0x4d497f;var _0x2d076b,_0x506a4c,_0xb50d5a,_0x57cf25;const _0x501ad9=(_0x2d076b=this[_0x425e56(0x1f3)][_0x425e56(0x17e)](_0x3468af[_0x425e56(0x19c)])['find'](_0x1cd0fa=>_0x1cd0fa['threadId']===_0x3468af[_0x425e56(0x1e4)]))==null?void 0x0:_0x2d076b[_0x425e56(0x1bd)];if(!_0x501ad9)return;const {unitId:_0x783209,subUnitId:_0x1b9e5e}=_0x501ad9;switch(_0x3468af[_0x425e56(0x1b1)]&&this[_0x425e56(0x186)]['addUser'](_0x3468af[_0x425e56(0x1b1)]),_0x3468af[_0x425e56(0x1c0)]){case v[_0x425e56(0x1d6)]:break;case v[_0x425e56(0x1e9)]:{this['_threadCommentModel']['addComment'](_0x783209,_0x1b9e5e,{'unitId':_0x783209,'subUnitId':_0x1b9e5e,'ref':'','id':_0x3468af['replyId'],'dT':f(+_0x3468af[_0x425e56(0x1ed)]),'threadId':_0x3468af[_0x425e56(0x1e4)],'personId':(_0xb50d5a=(_0x506a4c=_0x3468af[_0x425e56(0x1b1)])==null?void 0x0:_0x506a4c[_0x425e56(0x1b9)])!=null?_0xb50d5a:_0x3468af[_0x425e56(0x18d)],'text':JSON[_0x425e56(0x1d0)](_0x3468af[_0x425e56(0x180)]),'parentId':_0x501ad9['id']});break;}case v[_0x425e56(0x1ea)]:{const _0xc76486=this['_threadCommentModel'][_0x425e56(0x1dd)](_0x783209,_0x1b9e5e,_0x3468af[_0x425e56(0x19f)]);_0xc76486&&_0xc76486[_0x425e56(0x1ad)]&&this[_0x425e56(0x1f3)][_0x425e56(0x1ee)](_0x783209,_0x1b9e5e,_0x3468af[_0x425e56(0x19f)]);break;}case v[_0x425e56(0x1f5)]:{this[_0x425e56(0x1f3)][_0x425e56(0x194)](_0x783209,_0x1b9e5e,{'commentId':_0x3468af['replyId'],'text':JSON[_0x425e56(0x1d0)](_0x3468af[_0x425e56(0x180)])});break;}case v[_0x425e56(0x1be)]:{const _0x56a7fa=(_0x57cf25=this[_0x425e56(0x1f3)][_0x425e56(0x17e)](_0x3468af[_0x425e56(0x19c)])['find'](_0x437c3c=>_0x437c3c[_0x425e56(0x1e4)]===_0x3468af[_0x425e56(0x1e4)]))==null?void 0x0:_0x57cf25[_0x425e56(0x1bd)];_0x56a7fa&&this[_0x425e56(0x1f3)][_0x425e56(0x1a6)](_0x783209,_0x1b9e5e,_0x56a7fa['id'],_0x3468af[_0x425e56(0x1aa)]===I['Solved']);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x132b13(0x196)])),S(0x1,c['Inject'](M[_0x132b13(0x182)])),S(0x2,c[_0x132b13(0x188)](c[_0x132b13(0x1e1)])),S(0x3,c['Inject'](c['Injector']))],_);const q=_0x132b13(0x185),D={};var A=Object[_0x132b13(0x1a2)],x=(_0x260f55,_0x4720a7,_0x3cb87d,_0x425b36)=>{const _0x3cf6a9=_0x132b13;for(var _0x455da3=_0x425b36>0x1?void 0x0:_0x425b36?A(_0x4720a7,_0x3cb87d):_0x4720a7,_0x4443ce=_0x260f55[_0x3cf6a9(0x1c6)]-0x1,_0x363868;_0x4443ce>=0x0;_0x4443ce--)(_0x363868=_0x260f55[_0x4443ce])&&(_0x455da3=_0x363868(_0x455da3)||_0x455da3);return _0x455da3;},C=(_0x361c02,_0x4f8d0a)=>(_0x4168e8,_0x5eaf4d)=>_0x4f8d0a(_0x4168e8,_0x5eaf4d,_0x361c02);function Y(_0x303a2d,_0x18f85d){const _0x3536af=_0x132b13,_0x48ee72=_0x303a2d[_0x3536af(0x1a7)][0x0];return{..._0x18f85d,'id':_0x48ee72[_0x3536af(0x19f)],'resolved':_0x303a2d[_0x3536af(0x1aa)]===0x1,'dT':f(_0x48ee72[_0x3536af(0x1ed)]),'personId':_0x48ee72[_0x3536af(0x18d)],'threadId':_0x48ee72[_0x3536af(0x1e4)]};}function G(_0x13f1f8,_0x227bd9,_0x1b9bbd){const _0x2d40a1=_0x132b13;var _0x3e8b6c,_0x109d1f;if(((_0x109d1f=(_0x3e8b6c=_0x13f1f8==null?void 0x0:_0x13f1f8[_0x2d40a1(0x1a7)])==null?void 0x0:_0x3e8b6c[_0x2d40a1(0x1c6)])!=null?_0x109d1f:0x0)>0x0){const _0x107ad1=(_0xdc34b8,_0x33fc6a)=>({'id':_0xdc34b8[_0x2d40a1(0x19f)],'threadId':_0xdc34b8[_0x2d40a1(0x1e4)],'dT':f(_0xdc34b8['createTimestamp']),'personId':_0xdc34b8['userId'],'resolved':_0x13f1f8[_0x2d40a1(0x1aa)]===I['Solved'],'unitId':_0x227bd9,'subUnitId':_0x1b9bbd,'text':JSON[_0x2d40a1(0x1d0)](_0xdc34b8[_0x2d40a1(0x180)]),'parentId':_0x33fc6a}),_0x47cae7=_0x107ad1(_0x13f1f8['replies'][0x0]);return{..._0x47cae7,'children':_0x13f1f8[_0x2d40a1(0x1a7)][_0x2d40a1(0x197)](0x1)[_0x2d40a1(0x1f4)](_0x55de8c=>_0x107ad1(_0x55de8c,_0x47cae7['id']))};}return null;}function _0x945c(_0x3a371f,_0x1fdfaa){const _0x3995c0=_0x3995();return _0x945c=function(_0x945c88,_0x4fc1ab){_0x945c88=_0x945c88-0x17e;let _0x37c6a9=_0x3995c0[_0x945c88];return _0x37c6a9;},_0x945c(_0x3a371f,_0x1fdfaa);}let p=class{constructor(_0x245bdd,_0x3d82ef,_0x5b0ee1){const _0x206872=_0x132b13;this[_0x206872(0x1e3)]=_0x245bdd,this[_0x206872(0x186)]=_0x3d82ef,this['_sessionService']=_0x5b0ee1;}async['addComment'](_0x1f2848){const _0x11e61f=_0x132b13;var _0x2c4c38,_0x361120;const {parentId:_0x343534,unitId:_0x2f25af,text:_0x1db73c,threadId:_0x5b8d6f}=_0x1f2848,_0x4ee166=(_0x361120=(_0x2c4c38=_0x1db73c[_0x11e61f(0x1a0)])==null?void 0x0:_0x2c4c38[_0x11e61f(0x1f0)](_0x518803=>_0x518803[_0x11e61f(0x1b6)]===c[_0x11e61f(0x1ae)][_0x11e61f(0x1f7)])[_0x11e61f(0x1f4)](_0x2b0407=>_0x2b0407[_0x11e61f(0x191)]))!=null?_0x361120:[],_0x4aafad=JSON[_0x11e61f(0x1d1)](_0x1db73c),_0xe017e3=(await this[_0x11e61f(0x1ef)][_0x11e61f(0x1e2)](_0x2f25af))[_0x11e61f(0x199)]();if(_0x343534){const _0x47801d={'memberId':_0xe017e3,'unitId':_0x2f25af,'content':_0x4aafad,'mention':_0x4ee166,'threadId':_0x5b8d6f},_0x1ae6b7=(await this['_httpService']['post'](_0x11e61f(0x181)+_0x2f25af+_0x11e61f(0x1a1),{'body':_0x47801d}))[_0x11e61f(0x1f1)][_0x11e61f(0x1c1)];return{..._0x1f2848,'id':_0x1ae6b7[_0x11e61f(0x19f)],'dT':c['dayjs'](+_0x1ae6b7[_0x11e61f(0x1ed)])[_0x11e61f(0x1df)](_0x11e61f(0x18a)),'personId':_0x1ae6b7[_0x11e61f(0x18d)]};}else{const _0x4c34a6={'memberId':_0xe017e3,'unitId':_0x2f25af,'content':_0x4aafad,'mention':_0x4ee166},_0x2b33bd=await this['_httpService'][_0x11e61f(0x19d)]('/universer-api/comment/unit/'+_0x2f25af+'/add',{'body':_0x4c34a6});return Y(_0x2b33bd[_0x11e61f(0x1f1)][_0x11e61f(0x18b)],_0x1f2848);}}async[_0x132b13(0x194)](_0x3dce3b){const _0x19824c=_0x132b13;var _0x24c5f2,_0x4a54f2;const {text:_0x4f80f4,unitId:_0x2d2046}=_0x3dce3b,_0xa832e0=(_0x4a54f2=(_0x24c5f2=_0x4f80f4['customRanges'])==null?void 0x0:_0x24c5f2['filter'](_0x415bc7=>_0x415bc7[_0x19824c(0x1b6)]===c[_0x19824c(0x1ae)]['COMMENT'])[_0x19824c(0x1f4)](_0x48d30d=>_0x48d30d['rangeId']))!=null?_0x4a54f2:[],_0x5e878d=JSON[_0x19824c(0x1d1)](_0x4f80f4),_0x414a53=_0x3dce3b[_0x19824c(0x1e4)],_0x3e1a63=_0x3dce3b['id'],_0x113cc8={'memberId':(await this['_sessionService'][_0x19824c(0x1e2)](_0x2d2046))[_0x19824c(0x199)](),'unitId':_0x2d2046,'threadId':_0x414a53,'mention':_0xa832e0,'content':_0x5e878d,'replyId':_0x3e1a63},_0x1f100c=await this[_0x19824c(0x1e3)][_0x19824c(0x19d)](_0x19824c(0x181)+_0x2d2046+_0x19824c(0x1bf),{'body':_0x113cc8});return!_0x1f100c[_0x19824c(0x1f1)]['error']||_0x1f100c[_0x19824c(0x1f1)][_0x19824c(0x1a3)][_0x19824c(0x1de)]===0x1;}async[_0x132b13(0x1a6)](_0x44dcbe){const _0x1523f7=_0x132b13,{unitId:_0x970ce7}=_0x44dcbe,_0x40399e=_0x44dcbe['threadId'],_0x13a613={'memberId':this[_0x1523f7(0x186)][_0x1523f7(0x1d3)]()[_0x1523f7(0x1b9)],'unitId':_0x970ce7,'threadId':_0x40399e,'solved':_0x44dcbe[_0x1523f7(0x1da)]?I[_0x1523f7(0x1cb)]:I['OpenOrReOpen']},_0x316d58=await this[_0x1523f7(0x1e3)][_0x1523f7(0x19d)](_0x1523f7(0x181)+_0x970ce7+_0x1523f7(0x1b5),{'body':_0x13a613});return!_0x316d58[_0x1523f7(0x1f1)]['error']||_0x316d58[_0x1523f7(0x1f1)]['error'][_0x1523f7(0x1de)]===0x1;}async[_0x132b13(0x1ee)](_0x567e40,_0x32085b,_0x10914e,_0x190362){const _0x5f2a7f=_0x132b13,_0x4d84ab={'memberId':(await this[_0x5f2a7f(0x1ef)][_0x5f2a7f(0x1e2)](_0x567e40))[_0x5f2a7f(0x199)](),'threadId':_0x10914e,'replyId':_0x190362,'unitId':_0x567e40},_0x199c43=await this[_0x5f2a7f(0x1e3)][_0x5f2a7f(0x19d)](_0x5f2a7f(0x181)+_0x567e40+_0x5f2a7f(0x1c7),{'body':_0x4d84ab});return!_0x199c43[_0x5f2a7f(0x1f1)][_0x5f2a7f(0x1a3)]||_0x199c43[_0x5f2a7f(0x1f1)][_0x5f2a7f(0x1a3)][_0x5f2a7f(0x1de)]===0x1;}async[_0x132b13(0x1bc)](_0x273bb7,_0xe5f740,_0x380192){const _0x1c14c5=_0x132b13,_0x701a50={'unitId':_0x273bb7,'threadId':_0x380192},_0x230d57=await this[_0x1c14c5(0x1e3)][_0x1c14c5(0x19d)](_0x1c14c5(0x181)+_0x273bb7+'/list',{'body':_0x701a50}),_0x5114e5=_0x380192[_0x1c14c5(0x1f4)](_0x5c2a0f=>G(_0x230d57['body'][_0x1c14c5(0x1f8)][_0x5c2a0f],_0x273bb7,_0xe5f740))[_0x1c14c5(0x1f0)](Boolean);return Object[_0x1c14c5(0x192)](_0x230d57['body'][_0x1c14c5(0x18f)])[_0x1c14c5(0x19b)](_0x2452b7=>{const _0x51c87d=_0x1c14c5;this[_0x51c87d(0x186)][_0x51c87d(0x19a)](_0x2452b7);}),_0x5114e5;}[_0x132b13(0x1ab)](_0x58db4d){const _0x12f0a0=_0x132b13;return{'id':_0x58db4d['id'],'threadId':_0x58db4d['threadId'],'ref':_0x58db4d[_0x12f0a0(0x193)]};}};p=x([C(0x0,c[_0x132b13(0x188)](P[_0x132b13(0x183)])),C(0x1,c[_0x132b13(0x188)](c[_0x132b13(0x1e1)])),C(0x2,c[_0x132b13(0x188)](b[_0x132b13(0x1cd)]))],p);var H=Object[_0x132b13(0x1a2)],J=(_0x4ab1e6,_0x33474c,_0x473e5f,_0xbe4b41)=>{const _0x34b7e8=_0x132b13;for(var _0x28d004=_0xbe4b41>0x1?void 0x0:_0xbe4b41?H(_0x33474c,_0x473e5f):_0x33474c,_0x5250d6=_0x4ab1e6[_0x34b7e8(0x1c6)]-0x1,_0x21a875;_0x5250d6>=0x0;_0x5250d6--)(_0x21a875=_0x4ab1e6[_0x5250d6])&&(_0x28d004=_0x21a875(_0x28d004)||_0x28d004);return _0x28d004;},y=(_0x1fda84,_0x121ad5)=>(_0x8a8d48,_0x406419)=>_0x121ad5(_0x8a8d48,_0x406419,_0x1fda84);let g=class extends c[_0x132b13(0x1d8)]{constructor(_0x326d30,_0x110ac9){const _0x2aca46=_0x132b13;super(),this['_threadCommentDataSourceService']=_0x326d30,this[_0x2aca46(0x19e)]=_0x110ac9,this[_0x2aca46(0x1af)]();}[_0x132b13(0x1af)](){const _0x15bf84=_0x132b13;this[_0x15bf84(0x1c3)][_0x15bf84(0x1d4)]=this[_0x15bf84(0x19e)],this[_0x15bf84(0x1c3)][_0x15bf84(0x1c9)]=!0x1;}};g=J([y(0x0,M[_0x132b13(0x1e7)]),y(0x1,c[_0x132b13(0x188)](p))],g);var F=Object[_0x132b13(0x1b4)],L=Object[_0x132b13(0x1a2)],Z=(_0x16442e,_0x105fe1,_0x18a7f8)=>_0x105fe1 in _0x16442e?F(_0x16442e,_0x105fe1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x18a7f8}):_0x16442e[_0x105fe1]=_0x18a7f8,W=(_0x2c4327,_0x5e0b83,_0x56d152,_0x1f1c57)=>{const _0x216494=_0x132b13;for(var _0x91772e=_0x1f1c57>0x1?void 0x0:_0x1f1c57?L(_0x5e0b83,_0x56d152):_0x5e0b83,_0x489efc=_0x2c4327[_0x216494(0x1c6)]-0x1,_0x419676;_0x489efc>=0x0;_0x489efc--)(_0x419676=_0x2c4327[_0x489efc])&&(_0x91772e=_0x419676(_0x91772e)||_0x91772e);return _0x91772e;},O=(_0x4ca5b2,_0x5318fc)=>(_0x46deb6,_0x488159)=>_0x5318fc(_0x46deb6,_0x488159,_0x4ca5b2),N=(_0x4e126d,_0x269321,_0x1ce4f9)=>Z(_0x4e126d,typeof _0x269321!=_0x132b13(0x1ba)?_0x269321+'':_0x269321,_0x1ce4f9);function _0x3995(){const _0x45b34a=['CollaborationSessionService','192680cjDJyw','disposeWithMe','parse','stringify','commentUpdate$','getCurrentUser','dataSource','DependentOn','Add','_config','Disposable','79321iUhfMX','resolved','onReady','18597KPfMbM','getComment','code','format','4917060DPwlFG','UserManagerService','requireSession','_httpService','threadId','delete','pipe','IThreadCommentDataSourceService','bufferTime','Reply','Delete','UniverCollaborationClientPlugin','add','createTimestamp','deleteComment','_sessionService','filter','body','UNIVER_UNKNOWN','_threadCommentModel','map','Edit','Injector','COMMENT','comments','getUnit','_init','content','/universer-api/comment/unit/','ThreadCommentModel','HTTPService','2009776kpzyxx','thread-comment-data-source.config','_userService','get','Inject','getUser','YYYY/MM/DD\x20HH:mm','comment','_configService','userId','1270jDLVwq','users','Module','rangeId','values','ref','updateComment','1308668hFffon','CommentService','slice','UniverLicensePlugin','getMemberID','addUser','forEach','unitId','post','_threadCommentDataSource','replyId','customRanges','/reply','getOwnPropertyDescriptor','error','_commentService','OpenOrReOpen','resolveComment','replies','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','saveCommentToSnapshot','7WlKvdR','parentId','CustomRangeType','_initDataSource','1QAYWPB','user','_initUserSync','/universer-api/user/list','defineProperty','/solved','rangeType','setConfig','UNRECOGNIZED','userID','symbol','Unknown','listComments','root','Solve','/edit','type','reply','toStringTag','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','_injector','length','/delete','3036738lwiEuu','syncUpdateMutationToColla','380UrhXSj','Solved','IConfigService'];_0x3995=function(){return _0x45b34a;};return _0x3995();}exports[_0x132b13(0x1c4)]=class extends c['Plugin']{constructor(_0x11928d=D,_0x352a00,_0x3a5352){const _0x3eb237=_0x132b13;super(),this[_0x3eb237(0x1d7)]=_0x11928d,this[_0x3eb237(0x1c5)]=_0x352a00,this[_0x3eb237(0x18c)]=_0x3a5352;const {..._0x289a14}=c['merge']({},D,this['_config']);this[_0x3eb237(0x18c)][_0x3eb237(0x1b7)](q,_0x289a14);}['onStarting'](){const _0x34076b=_0x132b13;[[p],[g],[_]][_0x34076b(0x19b)](_0x3344a1=>{const _0x20e4ab=_0x34076b;this[_0x20e4ab(0x1c5)][_0x20e4ab(0x1ec)](_0x3344a1);});}[_0x132b13(0x1db)](){const _0x2a8e6b=_0x132b13;this['_injector']['get'](g),this['_injector'][_0x2a8e6b(0x187)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x132b13(0x1c4)],'type',c['UniverInstanceType'][_0x132b13(0x1f2)]),exports[_0x132b13(0x1c4)]=W([c[_0x132b13(0x1d5)](w['UniverThreadCommentUIPlugin'],b[_0x132b13(0x1eb)],T[_0x132b13(0x198)]),O(0x1,c['Inject'](c[_0x132b13(0x1f6)])),O(0x2,c[_0x132b13(0x1cc)])],exports[_0x132b13(0x1c4)]);
1
+ 'use strict';const _0x530ce1=_0x45ed;(function(_0x272742,_0x81af4e){const _0x3b03b4=_0x45ed,_0x372c40=_0x272742();while(!![]){try{const _0x2ec5d3=-parseInt(_0x3b03b4(0xbb))/0x1*(parseInt(_0x3b03b4(0xca))/0x2)+parseInt(_0x3b03b4(0xc7))/0x3+parseInt(_0x3b03b4(0x10b))/0x4+parseInt(_0x3b03b4(0xa2))/0x5+parseInt(_0x3b03b4(0xaa))/0x6+-parseInt(_0x3b03b4(0x106))/0x7*(-parseInt(_0x3b03b4(0xb5))/0x8)+-parseInt(_0x3b03b4(0x105))/0x9*(parseInt(_0x3b03b4(0xe1))/0xa);if(_0x2ec5d3===_0x81af4e)break;else _0x372c40['push'](_0x372c40['shift']());}catch(_0x1dab5a){_0x372c40['push'](_0x372c40['shift']());}}}(_0x4522,0x90d55));Object['defineProperty'](exports,Symbol[_0x530ce1(0xcb)],{'value':_0x530ce1(0xff)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x530ce1(0xa1);var I=(_0x6f206e=>(_0x6f206e[_0x6f206e[_0x530ce1(0xfc)]=0x0]=_0x530ce1(0xfc),_0x6f206e[_0x6f206e[_0x530ce1(0xa9)]=0x1]=_0x530ce1(0xa9),_0x6f206e[_0x6f206e[_0x530ce1(0xfa)]=-0x1]=_0x530ce1(0xfa),_0x6f206e))(I||{}),v=(_0x37b619=>(_0x37b619[_0x37b619['Unknown']=0x0]=_0x530ce1(0xe3),_0x37b619[_0x37b619[_0x530ce1(0xfb)]=0x1]='Add',_0x37b619[_0x37b619['Reply']=0x2]='Reply',_0x37b619[_0x37b619[_0x530ce1(0xf2)]=0x3]=_0x530ce1(0xf2),_0x37b619[_0x37b619[_0x530ce1(0xb1)]=0x4]=_0x530ce1(0xb1),_0x37b619[_0x37b619['Solve']=0x5]=_0x530ce1(0xc5),_0x37b619[_0x37b619[_0x530ce1(0xfa)]=-0x1]=_0x530ce1(0xfa),_0x37b619))(v||{});const f=_0x545393=>c['dayjs'](new Date(+_0x545393))[_0x530ce1(0x8f)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x5b664f,_0x18004d)=>{const _0x3b2c2f=_0x530ce1,_0x3742f2=_0x5b664f[_0x3b2c2f(0x100)](c[_0x3b2c2f(0xbf)]),_0x2629db=_0x5b664f['get'](P[_0x3b2c2f(0xf6)]);_0x18004d[_0x3b2c2f(0xae)](_0x57d610=>{const _0x5b7dbb=_0x3b2c2f;_0x3742f2[_0x5b7dbb(0xfe)](_0x57d610)&&_0x18004d[_0x5b7dbb(0xec)](_0x57d610);}),_0x18004d['size']&&(await _0x2629db['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x18004d]}}))['body'][_0x3b2c2f(0x98)]['forEach'](_0x57d839=>{_0x57d839&&_0x3742f2['addUser'](_0x57d839);});};var $=Object[_0x530ce1(0xf0)],E=(_0x2c4c40,_0x55a9ae,_0x320810,_0x27cf92)=>{for(var _0x34b939=_0x27cf92>0x1?void 0x0:_0x27cf92?$(_0x55a9ae,_0x320810):_0x55a9ae,_0x3c1fd5=_0x2c4c40['length']-0x1,_0x2c12a1;_0x3c1fd5>=0x0;_0x3c1fd5--)(_0x2c12a1=_0x2c4c40[_0x3c1fd5])&&(_0x34b939=_0x2c12a1(_0x34b939)||_0x34b939);return _0x34b939;},S=(_0x28041b,_0x4b5212)=>(_0x387503,_0x567088)=>_0x4b5212(_0x387503,_0x567088,_0x28041b);function _0x45ed(_0x49d172,_0x22f7c7){const _0x452220=_0x4522();return _0x45ed=function(_0x45ed1b,_0x2385c6){_0x45ed1b=_0x45ed1b-0x8f;let _0x210bdd=_0x452220[_0x45ed1b];return _0x210bdd;},_0x45ed(_0x49d172,_0x22f7c7);}let _=class extends c[_0x530ce1(0x9f)]{constructor(_0xdfd30f,_0x3f9df6,_0x3ea3fa,_0xcd6c6e){const _0x3088e4=_0x530ce1;super(),this[_0x3088e4(0x102)]=_0xdfd30f,this['_threadCommentModel']=_0x3f9df6,this[_0x3088e4(0xda)]=_0x3ea3fa,this[_0x3088e4(0xb6)]=_0xcd6c6e,this[_0x3088e4(0xaf)](),this[_0x3088e4(0xb0)]();}[_0x530ce1(0xb0)](){const _0x342782=_0x530ce1;this[_0x342782(0xf7)](this[_0x342782(0xdd)][_0x342782(0xe7)][_0x342782(0x10c)](j['bufferTime'](0x10))[_0x342782(0x9c)](_0x3ed176=>{const _0x52d7d6=_0x342782,_0x20c474=new Set();_0x3ed176[_0x52d7d6(0xae)](_0x55110b=>{const _0x2bf5e7=_0x52d7d6;switch(_0x55110b[_0x2bf5e7(0xc9)]){case _0x2bf5e7(0xb3):{const _0x378157=_0x55110b['payload'][_0x2bf5e7(0xbe)];_0x20c474[_0x2bf5e7(0xb3)](_0x378157);break;}}}),R(this[_0x52d7d6(0xb6)],_0x20c474);}));}[_0x530ce1(0xaf)](){const _0x490ddb=_0x530ce1;this[_0x490ddb(0xf7)](this[_0x490ddb(0x102)][_0x490ddb(0xe7)][_0x490ddb(0x9c)](async _0x2d8a45=>{const _0x10b6f6=_0x490ddb;var _0x55de05,_0x152fa1,_0x327f0c,_0x5054b1;const _0xf3f434=(_0x55de05=this['_threadCommentModel'][_0x10b6f6(0x101)](_0x2d8a45['unitId'])[_0x10b6f6(0x10d)](_0x1d382d=>_0x1d382d[_0x10b6f6(0x9d)]===_0x2d8a45['threadId']))==null?void 0x0:_0x55de05[_0x10b6f6(0xdc)];if(!_0xf3f434)return;const {unitId:_0x2f59a3,subUnitId:_0x4b8131}=_0xf3f434;switch(_0x2d8a45[_0x10b6f6(0x93)]&&this['_userService'][_0x10b6f6(0x9a)](_0x2d8a45[_0x10b6f6(0x93)]),_0x2d8a45[_0x10b6f6(0xc9)]){case v[_0x10b6f6(0xfb)]:break;case v[_0x10b6f6(0x109)]:{this[_0x10b6f6(0xdd)][_0x10b6f6(0xf3)](_0x2f59a3,_0x4b8131,{'unitId':_0x2f59a3,'subUnitId':_0x4b8131,'ref':'','id':_0x2d8a45[_0x10b6f6(0x97)],'dT':f(+_0x2d8a45[_0x10b6f6(0x92)]),'threadId':_0x2d8a45[_0x10b6f6(0x9d)],'personId':(_0x327f0c=(_0x152fa1=_0x2d8a45[_0x10b6f6(0x93)])==null?void 0x0:_0x152fa1[_0x10b6f6(0x94)])!=null?_0x327f0c:_0x2d8a45[_0x10b6f6(0x9e)],'text':JSON['parse'](_0x2d8a45[_0x10b6f6(0xb8)]),'parentId':_0xf3f434['id']});break;}case v[_0x10b6f6(0xb1)]:{const _0x3ae63a=this[_0x10b6f6(0xdd)][_0x10b6f6(0x90)](_0x2f59a3,_0x4b8131,_0x2d8a45[_0x10b6f6(0x97)]);_0x3ae63a&&_0x3ae63a[_0x10b6f6(0xba)]&&this[_0x10b6f6(0xdd)][_0x10b6f6(0xac)](_0x2f59a3,_0x4b8131,_0x2d8a45[_0x10b6f6(0x97)]);break;}case v[_0x10b6f6(0xf2)]:{this['_threadCommentModel'][_0x10b6f6(0xfd)](_0x2f59a3,_0x4b8131,{'commentId':_0x2d8a45[_0x10b6f6(0x97)],'text':JSON[_0x10b6f6(0x96)](_0x2d8a45[_0x10b6f6(0xb8)])});break;}case v[_0x10b6f6(0xc5)]:{const _0x3f4810=(_0x5054b1=this[_0x10b6f6(0xdd)]['getUnit'](_0x2d8a45[_0x10b6f6(0xc1)])['find'](_0x24620a=>_0x24620a[_0x10b6f6(0x9d)]===_0x2d8a45[_0x10b6f6(0x9d)]))==null?void 0x0:_0x5054b1[_0x10b6f6(0xdc)];_0x3f4810&&this[_0x10b6f6(0xdd)]['resolveComment'](_0x2f59a3,_0x4b8131,_0x3f4810['id'],_0x2d8a45['solved']===I[_0x10b6f6(0xa9)]);break;}}}));}};_=E([S(0x0,c[_0x530ce1(0xab)](b[_0x530ce1(0x108)])),S(0x1,c['Inject'](M[_0x530ce1(0xc8)])),S(0x2,c[_0x530ce1(0xab)](c[_0x530ce1(0xbf)])),S(0x3,c[_0x530ce1(0xab)](c['Injector']))],_);function _0x4522(){const _0x134f7f=['CustomRangeType','reply','values','symbol','delete','replies','CollaborationSessionService','_configService','getOwnPropertyDescriptor','dayjs','Edit','addComment','body','/solved','HTTPService','disposeWithMe','Injector','UNIVER_UNKNOWN','UNRECOGNIZED','Add','OpenOrReOpen','updateComment','getUser','Module','get','getUnit','_commentService','getCurrentUser','resolved','19264788jHxJfq','299670fUWNPd','pluginName','CommentService','Reply','onStarting','3816700PHrxLt','pipe','find','format','getComment','YYYY/MM/DD\x20HH:mm','createTimestamp','user','userID','/universer-api/comment/unit/','parse','replyId','users','map','addUser','UniverThreadCommentUIPlugin','subscribe','threadId','userId','Disposable','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','5784915iyMyzN','merge','requireSession','rangeId','resolveComment','onReady','filter','Solved','3571962PRDfcN','Inject','deleteComment','getMemberID','forEach','_init','_initUserSync','Delete','UniverCollaborationClientPlugin','add','Plugin','104vYtipR','_injector','comments','content','slice','parentId','4fjFxio','stringify','DependentOn','personId','UserManagerService','/delete','unitId','post','error','code','Solve','UniverThreadCommentDataSourcePlugin','474486YRMhFq','ThreadCommentModel','type','343704UEUIYo','toStringTag','_threadCommentDataSourceService','comment','_threadCommentDataSource','customRanges','_httpService','UniverLicensePlugin','length','/add','IConfigService','syncUpdateMutationToColla','_config','saveCommentToSnapshot','/edit','thread-comment-data-source.config','_userService','_initDataSource','root','_threadCommentModel','solved','_sessionService','UniverInstanceType','10UwcIWr','IThreadCommentDataSourceService','Unknown','COMMENT','/reply','defineProperty','commentUpdate$'];_0x4522=function(){return _0x134f7f;};return _0x4522();}const q=_0x530ce1(0xd9),D={};var A=Object[_0x530ce1(0xf0)],x=(_0x55fd29,_0x529cd4,_0x2c3fcd,_0x537ee3)=>{for(var _0x3a5e55=_0x537ee3>0x1?void 0x0:_0x537ee3?A(_0x529cd4,_0x2c3fcd):_0x529cd4,_0xb812cd=_0x55fd29['length']-0x1,_0x561b99;_0xb812cd>=0x0;_0xb812cd--)(_0x561b99=_0x55fd29[_0xb812cd])&&(_0x3a5e55=_0x561b99(_0x3a5e55)||_0x3a5e55);return _0x3a5e55;},C=(_0x2af737,_0x3f77b3)=>(_0x2d09e7,_0x46b74c)=>_0x3f77b3(_0x2d09e7,_0x46b74c,_0x2af737);function Y(_0x477a33,_0x5889bf){const _0x5221b5=_0x530ce1,_0x3ea1c7=_0x477a33[_0x5221b5(0xed)][0x0];return{..._0x5889bf,'id':_0x3ea1c7[_0x5221b5(0x97)],'resolved':_0x477a33[_0x5221b5(0xde)]===0x1,'dT':f(_0x3ea1c7[_0x5221b5(0x92)]),'personId':_0x3ea1c7[_0x5221b5(0x9e)],'threadId':_0x3ea1c7[_0x5221b5(0x9d)]};}function G(_0x170dff,_0x31bfd9,_0x38ace8){const _0x1c6bdf=_0x530ce1;var _0x19dba3,_0x4debe3;if(((_0x4debe3=(_0x19dba3=_0x170dff==null?void 0x0:_0x170dff[_0x1c6bdf(0xed)])==null?void 0x0:_0x19dba3[_0x1c6bdf(0xd2)])!=null?_0x4debe3:0x0)>0x0){const _0x4c62bb=(_0x13a50e,_0x9cba1d)=>({'id':_0x13a50e['replyId'],'threadId':_0x13a50e['threadId'],'dT':f(_0x13a50e[_0x1c6bdf(0x92)]),'personId':_0x13a50e[_0x1c6bdf(0x9e)],'resolved':_0x170dff[_0x1c6bdf(0xde)]===I['Solved'],'unitId':_0x31bfd9,'subUnitId':_0x38ace8,'text':JSON[_0x1c6bdf(0x96)](_0x13a50e[_0x1c6bdf(0xb8)]),'parentId':_0x9cba1d}),_0x44f6bc=_0x4c62bb(_0x170dff[_0x1c6bdf(0xed)][0x0]);return{..._0x44f6bc,'children':_0x170dff[_0x1c6bdf(0xed)][_0x1c6bdf(0xb9)](0x1)[_0x1c6bdf(0x99)](_0xa7b1ce=>_0x4c62bb(_0xa7b1ce,_0x44f6bc['id']))};}return null;}let p=class{constructor(_0xde0092,_0x212163,_0x484c99){const _0x4926b2=_0x530ce1;this[_0x4926b2(0xd0)]=_0xde0092,this[_0x4926b2(0xda)]=_0x212163,this[_0x4926b2(0xdf)]=_0x484c99;}async[_0x530ce1(0xf3)](_0x3e3f96){const _0x2f55ab=_0x530ce1;var _0x2e497e,_0x5108c8;const {parentId:_0x352144,unitId:_0x297fcf,text:_0x13c3fa,threadId:_0x457410}=_0x3e3f96,_0x156507=(_0x5108c8=(_0x2e497e=_0x13c3fa[_0x2f55ab(0xcf)])==null?void 0x0:_0x2e497e['filter'](_0xc219b3=>_0xc219b3['rangeType']===c['CustomRangeType'][_0x2f55ab(0xe4)])['map'](_0x482ddc=>_0x482ddc[_0x2f55ab(0xa5)]))!=null?_0x5108c8:[],_0x530594=JSON[_0x2f55ab(0xbc)](_0x13c3fa),_0x3a59e7=(await this[_0x2f55ab(0xdf)][_0x2f55ab(0xa4)](_0x297fcf))['getMemberID']();if(_0x352144){const _0x39b2fd={'memberId':_0x3a59e7,'unitId':_0x297fcf,'content':_0x530594,'mention':_0x156507,'threadId':_0x457410},_0x350a1a=(await this['_httpService'][_0x2f55ab(0xc2)](_0x2f55ab(0x95)+_0x297fcf+_0x2f55ab(0xe5),{'body':_0x39b2fd}))[_0x2f55ab(0xf4)][_0x2f55ab(0xe9)];return{..._0x3e3f96,'id':_0x350a1a[_0x2f55ab(0x97)],'dT':c[_0x2f55ab(0xf1)](+_0x350a1a[_0x2f55ab(0x92)])['format'](_0x2f55ab(0x91)),'personId':_0x350a1a[_0x2f55ab(0x9e)]};}else{const _0x5dc7f9={'memberId':_0x3a59e7,'unitId':_0x297fcf,'content':_0x530594,'mention':_0x156507},_0x4b7eac=await this['_httpService']['post'](_0x2f55ab(0x95)+_0x297fcf+_0x2f55ab(0xd3),{'body':_0x5dc7f9});return Y(_0x4b7eac['body'][_0x2f55ab(0xcd)],_0x3e3f96);}}async['updateComment'](_0x126bc1){const _0x4977b5=_0x530ce1;var _0x14c113,_0xbc6808;const {text:_0x7d7a00,unitId:_0x57c378}=_0x126bc1,_0x38dd2e=(_0xbc6808=(_0x14c113=_0x7d7a00[_0x4977b5(0xcf)])==null?void 0x0:_0x14c113[_0x4977b5(0xa8)](_0x1553b2=>_0x1553b2['rangeType']===c[_0x4977b5(0xe8)]['COMMENT'])[_0x4977b5(0x99)](_0x40856c=>_0x40856c[_0x4977b5(0xa5)]))!=null?_0xbc6808:[],_0x42ed61=JSON['stringify'](_0x7d7a00),_0x63203c=_0x126bc1['threadId'],_0x3dbb47=_0x126bc1['id'],_0x2ea675={'memberId':(await this['_sessionService'][_0x4977b5(0xa4)](_0x57c378))['getMemberID'](),'unitId':_0x57c378,'threadId':_0x63203c,'mention':_0x38dd2e,'content':_0x42ed61,'replyId':_0x3dbb47},_0x302f1d=await this[_0x4977b5(0xd0)]['post'](_0x4977b5(0x95)+_0x57c378+_0x4977b5(0xd8),{'body':_0x2ea675});return!_0x302f1d[_0x4977b5(0xf4)][_0x4977b5(0xc3)]||_0x302f1d['body'][_0x4977b5(0xc3)]['code']===0x1;}async[_0x530ce1(0xa6)](_0x87477f){const _0x351f5b=_0x530ce1,{unitId:_0x472206}=_0x87477f,_0xe9436f=_0x87477f[_0x351f5b(0x9d)],_0x280af5={'memberId':this[_0x351f5b(0xda)][_0x351f5b(0x103)]()[_0x351f5b(0x94)],'unitId':_0x472206,'threadId':_0xe9436f,'solved':_0x87477f[_0x351f5b(0x104)]?I[_0x351f5b(0xa9)]:I[_0x351f5b(0xfc)]},_0x32eee3=await this[_0x351f5b(0xd0)][_0x351f5b(0xc2)](_0x351f5b(0x95)+_0x472206+_0x351f5b(0xf5),{'body':_0x280af5});return!_0x32eee3[_0x351f5b(0xf4)][_0x351f5b(0xc3)]||_0x32eee3['body']['error'][_0x351f5b(0xc4)]===0x1;}async[_0x530ce1(0xac)](_0x25003f,_0x26d490,_0xec2053,_0x130938){const _0xc2c00a=_0x530ce1,_0x450eda={'memberId':(await this[_0xc2c00a(0xdf)]['requireSession'](_0x25003f))[_0xc2c00a(0xad)](),'threadId':_0xec2053,'replyId':_0x130938,'unitId':_0x25003f},_0x2bc135=await this['_httpService'][_0xc2c00a(0xc2)](_0xc2c00a(0x95)+_0x25003f+_0xc2c00a(0xc0),{'body':_0x450eda});return!_0x2bc135[_0xc2c00a(0xf4)][_0xc2c00a(0xc3)]||_0x2bc135[_0xc2c00a(0xf4)][_0xc2c00a(0xc3)][_0xc2c00a(0xc4)]===0x1;}async[_0x530ce1(0xa0)](_0xc5935c,_0x1dce97,_0x22a089){const _0x4f93e5=_0x530ce1,_0x284747={'unitId':_0xc5935c,'threadId':_0x22a089},_0x3f0b2f=await this[_0x4f93e5(0xd0)][_0x4f93e5(0xc2)](_0x4f93e5(0x95)+_0xc5935c+'/list',{'body':_0x284747}),_0x396844=_0x22a089['map'](_0x2d8cea=>G(_0x3f0b2f[_0x4f93e5(0xf4)][_0x4f93e5(0xb7)][_0x2d8cea],_0xc5935c,_0x1dce97))['filter'](Boolean);return Object[_0x4f93e5(0xea)](_0x3f0b2f[_0x4f93e5(0xf4)]['users'])[_0x4f93e5(0xae)](_0x376937=>{const _0x201907=_0x4f93e5;this[_0x201907(0xda)][_0x201907(0x9a)](_0x376937);}),_0x396844;}[_0x530ce1(0xd7)](_0x15737e){const _0x285661=_0x530ce1;return{'id':_0x15737e['id'],'threadId':_0x15737e[_0x285661(0x9d)],'ref':_0x15737e['ref']};}};p=x([C(0x0,c[_0x530ce1(0xab)](P[_0x530ce1(0xf6)])),C(0x1,c[_0x530ce1(0xab)](c[_0x530ce1(0xbf)])),C(0x2,c['Inject'](b[_0x530ce1(0xee)]))],p);var H=Object[_0x530ce1(0xf0)],J=(_0x17682b,_0x51ad21,_0xdb20d1,_0x2c1412)=>{const _0x57244a=_0x530ce1;for(var _0x5cda3b=_0x2c1412>0x1?void 0x0:_0x2c1412?H(_0x51ad21,_0xdb20d1):_0x51ad21,_0x3047ef=_0x17682b[_0x57244a(0xd2)]-0x1,_0x2c27db;_0x3047ef>=0x0;_0x3047ef--)(_0x2c27db=_0x17682b[_0x3047ef])&&(_0x5cda3b=_0x2c27db(_0x5cda3b)||_0x5cda3b);return _0x5cda3b;},y=(_0x2f706a,_0x4fbb13)=>(_0x4a130d,_0x280e87)=>_0x4fbb13(_0x4a130d,_0x280e87,_0x2f706a);let g=class extends c[_0x530ce1(0x9f)]{constructor(_0x525480,_0x16e06c){const _0x526224=_0x530ce1;super(),this[_0x526224(0xcc)]=_0x525480,this[_0x526224(0xce)]=_0x16e06c,this[_0x526224(0xdb)]();}[_0x530ce1(0xdb)](){const _0x435da3=_0x530ce1;this['_threadCommentDataSourceService']['dataSource']=this[_0x435da3(0xce)],this['_threadCommentDataSourceService'][_0x435da3(0xd5)]=!0x1;}};g=J([y(0x0,M[_0x530ce1(0xe2)]),y(0x1,c[_0x530ce1(0xab)](p))],g);var F=Object[_0x530ce1(0xe6)],L=Object[_0x530ce1(0xf0)],Z=(_0x4bb772,_0x75293a,_0x19141c)=>_0x75293a in _0x4bb772?F(_0x4bb772,_0x75293a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19141c}):_0x4bb772[_0x75293a]=_0x19141c,W=(_0x263f55,_0x151354,_0x528e52,_0xe8e93c)=>{for(var _0x4dec99=_0xe8e93c>0x1?void 0x0:_0xe8e93c?L(_0x151354,_0x528e52):_0x151354,_0x3f0955=_0x263f55['length']-0x1,_0x576274;_0x3f0955>=0x0;_0x3f0955--)(_0x576274=_0x263f55[_0x3f0955])&&(_0x4dec99=_0x576274(_0x4dec99)||_0x4dec99);return _0x4dec99;},O=(_0x19880c,_0x15ec9e)=>(_0x2f75ef,_0x35fa03)=>_0x15ec9e(_0x2f75ef,_0x35fa03,_0x19880c),N=(_0x270e0a,_0x2f8d74,_0x134609)=>Z(_0x270e0a,typeof _0x2f8d74!=_0x530ce1(0xeb)?_0x2f8d74+'':_0x2f8d74,_0x134609);exports[_0x530ce1(0xc6)]=class extends c[_0x530ce1(0xb4)]{constructor(_0x562051=D,_0x44459e,_0x33c061){const _0x30e0a7=_0x530ce1;super(),this['_config']=_0x562051,this[_0x30e0a7(0xb6)]=_0x44459e,this[_0x30e0a7(0xef)]=_0x33c061;const {..._0x22dfe8}=c[_0x30e0a7(0xa3)]({},D,this[_0x30e0a7(0xd6)]);this[_0x30e0a7(0xef)]['setConfig'](q,_0x22dfe8);}[_0x530ce1(0x10a)](){const _0x1ef951=_0x530ce1;[[p],[g],[_]][_0x1ef951(0xae)](_0x5ccf41=>{const _0x5c9bc4=_0x1ef951;this[_0x5c9bc4(0xb6)]['add'](_0x5ccf41);});}[_0x530ce1(0xa7)](){const _0x1f67f9=_0x530ce1;this[_0x1f67f9(0xb6)][_0x1f67f9(0x100)](g),this['_injector'][_0x1f67f9(0x100)](_);}},N(exports[_0x530ce1(0xc6)],_0x530ce1(0x107),U),N(exports[_0x530ce1(0xc6)],_0x530ce1(0xc9),c[_0x530ce1(0xe0)][_0x530ce1(0xf9)]),exports[_0x530ce1(0xc6)]=W([c[_0x530ce1(0xbd)](w[_0x530ce1(0x9b)],b[_0x530ce1(0xb2)],T[_0x530ce1(0xd1)]),O(0x1,c[_0x530ce1(0xab)](c[_0x530ce1(0xf8)])),O(0x2,c[_0x530ce1(0xd4)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3d4b15=_0x4964;(function(_0x2700ee,_0x18ca3d){const _0x3831dd=_0x4964,_0x3da2cc=_0x2700ee();while(!![]){try{const _0x2269ce=parseInt(_0x3831dd(0xbe))/0x1*(-parseInt(_0x3831dd(0x90))/0x2)+parseInt(_0x3831dd(0xca))/0x3+parseInt(_0x3831dd(0x7c))/0x4+-parseInt(_0x3831dd(0xcb))/0x5*(parseInt(_0x3831dd(0xb9))/0x6)+parseInt(_0x3831dd(0x88))/0x7*(parseInt(_0x3831dd(0x94))/0x8)+-parseInt(_0x3831dd(0x87))/0x9+-parseInt(_0x3831dd(0xa7))/0xa*(-parseInt(_0x3831dd(0xc8))/0xb);if(_0x2269ce===_0x18ca3d)break;else _0x3da2cc['push'](_0x3da2cc['shift']());}catch(_0xa727dd){_0x3da2cc['push'](_0x3da2cc['shift']());}}}(_0x3903,0xaaabf));import{CommentService as _0x4ff073,CollaborationSessionService as _0x1f42c9,UniverCollaborationClientPlugin as _0x4de362}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd07243}from'@univerjs-pro/license';import{dayjs as _0x30e3e3,UserManagerService as _0x54b721,Inject as _0x301881,Injector as _0x121d33,Disposable as _0x411f66,CustomRangeType as _0x534e27,UniverInstanceType as _0x19d629,DependentOn as _0x1e9873,IConfigService as _0x3a3a63,Plugin as _0x1846da,merge as _0x5d93fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9000b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x330db4,IThreadCommentDataSourceService as _0x304249}from'@univerjs/thread-comment';import{bufferTime as _0x5917c9}from'rxjs';import{HTTPService as _0x2c9e19}from'@univerjs/network';const W=_0x3d4b15(0xb5);var I=(_0x57b403=>(_0x57b403[_0x57b403[_0x3d4b15(0x7d)]=0x0]=_0x3d4b15(0x7d),_0x57b403[_0x57b403[_0x3d4b15(0x8c)]=0x1]=_0x3d4b15(0x8c),_0x57b403[_0x57b403[_0x3d4b15(0x95)]=-0x1]=_0x3d4b15(0x95),_0x57b403))(I||{}),v=(_0x415462=>(_0x415462[_0x415462[_0x3d4b15(0xd4)]=0x0]=_0x3d4b15(0xd4),_0x415462[_0x415462[_0x3d4b15(0xd1)]=0x1]=_0x3d4b15(0xd1),_0x415462[_0x415462[_0x3d4b15(0xb3)]=0x2]=_0x3d4b15(0xb3),_0x415462[_0x415462[_0x3d4b15(0xb1)]=0x3]=_0x3d4b15(0xb1),_0x415462[_0x415462[_0x3d4b15(0xd5)]=0x4]=_0x3d4b15(0xd5),_0x415462[_0x415462['Solve']=0x5]=_0x3d4b15(0x81),_0x415462[_0x415462['UNRECOGNIZED']=-0x1]=_0x3d4b15(0x95),_0x415462))(v||{});const y=_0x272194=>_0x30e3e3(new Date(+_0x272194))[_0x3d4b15(0xb4)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xfa5f07,_0x4cc590)=>{const _0x3e39ff=_0x3d4b15,_0x2ccc69=_0xfa5f07[_0x3e39ff(0x83)](_0x54b721),_0x352722=_0xfa5f07[_0x3e39ff(0x83)](_0x2c9e19);_0x4cc590['forEach'](_0x3a63b8=>{const _0x4e5509=_0x3e39ff;_0x2ccc69[_0x4e5509(0xcc)](_0x3a63b8)&&_0x4cc590[_0x4e5509(0x7e)](_0x3a63b8);}),_0x4cc590[_0x3e39ff(0xb8)]&&(await _0x352722[_0x3e39ff(0x83)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4cc590]}}))[_0x3e39ff(0xc6)]['users'][_0x3e39ff(0xab)](_0x59b3dd=>{_0x59b3dd&&_0x2ccc69['addUser'](_0x59b3dd);});};var K=Object[_0x3d4b15(0x8d)],V=(_0x3dc105,_0x25573b,_0x5b4db8,_0x2bffde)=>{for(var _0x388dec=_0x2bffde>0x1?void 0x0:_0x2bffde?K(_0x25573b,_0x5b4db8):_0x25573b,_0x5c82fd=_0x3dc105['length']-0x1,_0x3e9d15;_0x5c82fd>=0x0;_0x5c82fd--)(_0x3e9d15=_0x3dc105[_0x5c82fd])&&(_0x388dec=_0x3e9d15(_0x388dec)||_0x388dec);return _0x388dec;},p=(_0x10cd96,_0x5e07c1)=>(_0xcfe85e,_0x138eb2)=>_0x5e07c1(_0xcfe85e,_0x138eb2,_0x10cd96);let _=class extends _0x411f66{constructor(_0x209aa6,_0x2d13cf,_0x36d7e4,_0x81dd4d){const _0x3857d6=_0x3d4b15;super(),this[_0x3857d6(0xae)]=_0x209aa6,this[_0x3857d6(0x92)]=_0x2d13cf,this['_userService']=_0x36d7e4,this[_0x3857d6(0xd3)]=_0x81dd4d,this['_init'](),this[_0x3857d6(0x7f)]();}[_0x3d4b15(0x7f)](){const _0x301ea3=_0x3d4b15;this[_0x301ea3(0x74)](this[_0x301ea3(0x92)][_0x301ea3(0x99)]['pipe'](_0x5917c9(0x10))[_0x301ea3(0x78)](_0x22f156=>{const _0x5ebe8f=new Set();_0x22f156['forEach'](_0xdba62a=>{const _0x15a635=_0x4964;switch(_0xdba62a[_0x15a635(0x77)]){case'add':{const _0x5bd0d5=_0xdba62a[_0x15a635(0x91)][_0x15a635(0xa2)];_0x5ebe8f[_0x15a635(0xba)](_0x5bd0d5);break;}}}),B(this['_injector'],_0x5ebe8f);}));}['_init'](){const _0x4b1f59=_0x3d4b15;this[_0x4b1f59(0x74)](this[_0x4b1f59(0xae)][_0x4b1f59(0x99)]['subscribe'](async _0x1a47b4=>{const _0x38c0e3=_0x4b1f59;var _0x130dc7,_0x5991ac,_0x1c358e,_0x394686;const _0xb8f519=(_0x130dc7=this[_0x38c0e3(0x92)][_0x38c0e3(0xc9)](_0x1a47b4['unitId'])[_0x38c0e3(0x82)](_0xc2e4bd=>_0xc2e4bd[_0x38c0e3(0xcd)]===_0x1a47b4[_0x38c0e3(0xcd)]))==null?void 0x0:_0x130dc7['root'];if(!_0xb8f519)return;const {unitId:_0x498768,subUnitId:_0x300a5a}=_0xb8f519;switch(_0x1a47b4['user']&&this['_userService']['addUser'](_0x1a47b4[_0x38c0e3(0xa8)]),_0x1a47b4[_0x38c0e3(0x77)]){case v[_0x38c0e3(0xd1)]:break;case v[_0x38c0e3(0xb3)]:{this[_0x38c0e3(0x92)][_0x38c0e3(0xc7)](_0x498768,_0x300a5a,{'unitId':_0x498768,'subUnitId':_0x300a5a,'ref':'','id':_0x1a47b4[_0x38c0e3(0xa9)],'dT':y(+_0x1a47b4[_0x38c0e3(0xc5)]),'threadId':_0x1a47b4[_0x38c0e3(0xcd)],'personId':(_0x1c358e=(_0x5991ac=_0x1a47b4[_0x38c0e3(0xa8)])==null?void 0x0:_0x5991ac[_0x38c0e3(0xbd)])!=null?_0x1c358e:_0x1a47b4[_0x38c0e3(0xb6)],'text':JSON[_0x38c0e3(0xd6)](_0x1a47b4[_0x38c0e3(0x9a)]),'parentId':_0xb8f519['id']});break;}case v[_0x38c0e3(0xd5)]:{const _0x2ad1d0=this[_0x38c0e3(0x92)][_0x38c0e3(0xac)](_0x498768,_0x300a5a,_0x1a47b4[_0x38c0e3(0xa9)]);_0x2ad1d0&&_0x2ad1d0[_0x38c0e3(0x80)]&&this[_0x38c0e3(0x92)][_0x38c0e3(0x9e)](_0x498768,_0x300a5a,_0x1a47b4[_0x38c0e3(0xa9)]);break;}case v['Edit']:{this[_0x38c0e3(0x92)]['updateComment'](_0x498768,_0x300a5a,{'commentId':_0x1a47b4[_0x38c0e3(0xa9)],'text':JSON[_0x38c0e3(0xd6)](_0x1a47b4['content'])});break;}case v[_0x38c0e3(0x81)]:{const _0xa42100=(_0x394686=this[_0x38c0e3(0x92)]['getUnit'](_0x1a47b4['unitId'])[_0x38c0e3(0x82)](_0x5a5d18=>_0x5a5d18['threadId']===_0x1a47b4[_0x38c0e3(0xcd)]))==null?void 0x0:_0x394686['root'];_0xa42100&&this[_0x38c0e3(0x92)][_0x38c0e3(0x8e)](_0x498768,_0x300a5a,_0xa42100['id'],_0x1a47b4[_0x38c0e3(0x9d)]===I[_0x38c0e3(0x8c)]);break;}}}));}};_=V([p(0x0,_0x301881(_0x4ff073)),p(0x1,_0x301881(_0x330db4)),p(0x2,_0x301881(_0x54b721)),p(0x3,_0x301881(_0x121d33))],_);const z=_0x3d4b15(0x8f),O={};function _0x4964(_0x291565,_0x15b74f){const _0x39039b=_0x3903();return _0x4964=function(_0x4964cf,_0x5584a0){_0x4964cf=_0x4964cf-0x74;let _0x4af8fd=_0x39039b[_0x4964cf];return _0x4af8fd;},_0x4964(_0x291565,_0x15b74f);}var k=Object[_0x3d4b15(0x8d)],Q=(_0x4f72dc,_0x5d9d97,_0x1bb8ab,_0x12c7bc)=>{for(var _0x3880ad=_0x12c7bc>0x1?void 0x0:_0x12c7bc?k(_0x5d9d97,_0x1bb8ab):_0x5d9d97,_0x2d7479=_0x4f72dc['length']-0x1,_0x1f675f;_0x2d7479>=0x0;_0x2d7479--)(_0x1f675f=_0x4f72dc[_0x2d7479])&&(_0x3880ad=_0x1f675f(_0x3880ad)||_0x3880ad);return _0x3880ad;},b=(_0x50e765,_0x43b36e)=>(_0xb8b818,_0x333aed)=>_0x43b36e(_0xb8b818,_0x333aed,_0x50e765);function X(_0x56d5e7,_0x4d8856){const _0x4d1543=_0x3d4b15,_0x5060e9=_0x56d5e7[_0x4d1543(0xd0)][0x0];return{..._0x4d8856,'id':_0x5060e9['replyId'],'resolved':_0x56d5e7['solved']===0x1,'dT':y(_0x5060e9['createTimestamp']),'personId':_0x5060e9[_0x4d1543(0xb6)],'threadId':_0x5060e9['threadId']};}function ee(_0x516476,_0x4ca81a,_0x535e66){const _0x53c3d2=_0x3d4b15;var _0x1c1a61,_0x4133f3;if(((_0x4133f3=(_0x1c1a61=_0x516476==null?void 0x0:_0x516476[_0x53c3d2(0xd0)])==null?void 0x0:_0x1c1a61[_0x53c3d2(0x98)])!=null?_0x4133f3:0x0)>0x0){const _0x1b31d2=(_0x3888f4,_0x1f5a49)=>({'id':_0x3888f4['replyId'],'threadId':_0x3888f4['threadId'],'dT':y(_0x3888f4['createTimestamp']),'personId':_0x3888f4[_0x53c3d2(0xb6)],'resolved':_0x516476[_0x53c3d2(0x9d)]===I[_0x53c3d2(0x8c)],'unitId':_0x4ca81a,'subUnitId':_0x535e66,'text':JSON['parse'](_0x3888f4[_0x53c3d2(0x9a)]),'parentId':_0x1f5a49}),_0x27530c=_0x1b31d2(_0x516476[_0x53c3d2(0xd0)][0x0]);return{..._0x27530c,'children':_0x516476[_0x53c3d2(0xd0)][_0x53c3d2(0xcf)](0x1)[_0x53c3d2(0xa0)](_0xa30fb0=>_0x1b31d2(_0xa30fb0,_0x27530c['id']))};}return null;}let S=class{constructor(_0x37ee87,_0x502db7,_0x1a43ad){const _0x4da2a7=_0x3d4b15;this[_0x4da2a7(0xa4)]=_0x37ee87,this[_0x4da2a7(0x75)]=_0x502db7,this[_0x4da2a7(0xc3)]=_0x1a43ad;}async[_0x3d4b15(0xc7)](_0x197994){const _0x12d25a=_0x3d4b15;var _0x541214,_0x18ee4b;const {parentId:_0x49ec91,unitId:_0x56ce79,text:_0x545db7,threadId:_0x5e1443}=_0x197994,_0x1e11ed=(_0x18ee4b=(_0x541214=_0x545db7[_0x12d25a(0x8b)])==null?void 0x0:_0x541214[_0x12d25a(0xb0)](_0x5e7e44=>_0x5e7e44[_0x12d25a(0x76)]===_0x534e27['COMMENT'])['map'](_0xe1ed43=>_0xe1ed43[_0x12d25a(0xb7)]))!=null?_0x18ee4b:[],_0x184b7c=JSON[_0x12d25a(0x7b)](_0x545db7),_0x2ef6dd=(await this[_0x12d25a(0xc3)][_0x12d25a(0xa6)](_0x56ce79))[_0x12d25a(0xbc)]();if(_0x49ec91){const _0x469add={'memberId':_0x2ef6dd,'unitId':_0x56ce79,'content':_0x184b7c,'mention':_0x1e11ed,'threadId':_0x5e1443},_0x5352e5=(await this[_0x12d25a(0xa4)]['post'](_0x12d25a(0xce)+_0x56ce79+_0x12d25a(0x84),{'body':_0x469add}))[_0x12d25a(0xc6)][_0x12d25a(0xaa)];return{..._0x197994,'id':_0x5352e5[_0x12d25a(0xa9)],'dT':_0x30e3e3(+_0x5352e5[_0x12d25a(0xc5)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x5352e5[_0x12d25a(0xb6)]};}else{const _0x21c80f={'memberId':_0x2ef6dd,'unitId':_0x56ce79,'content':_0x184b7c,'mention':_0x1e11ed},_0x2ef7e1=await this[_0x12d25a(0xa4)][_0x12d25a(0x85)](_0x12d25a(0xce)+_0x56ce79+_0x12d25a(0x8a),{'body':_0x21c80f});return X(_0x2ef7e1[_0x12d25a(0xc6)][_0x12d25a(0x86)],_0x197994);}}async['updateComment'](_0x2b8464){const _0x13fd2c=_0x3d4b15;var _0x1b533c,_0x132d56;const {text:_0x3b0ced,unitId:_0x4101f5}=_0x2b8464,_0x212f0d=(_0x132d56=(_0x1b533c=_0x3b0ced['customRanges'])==null?void 0x0:_0x1b533c[_0x13fd2c(0xb0)](_0x580e1a=>_0x580e1a['rangeType']===_0x534e27[_0x13fd2c(0xa1)])[_0x13fd2c(0xa0)](_0x291540=>_0x291540['rangeId']))!=null?_0x132d56:[],_0x2bbc0e=JSON[_0x13fd2c(0x7b)](_0x3b0ced),_0x5aa3fe=_0x2b8464[_0x13fd2c(0xcd)],_0x5cd3a9=_0x2b8464['id'],_0x53d564={'memberId':(await this[_0x13fd2c(0xc3)][_0x13fd2c(0xa6)](_0x4101f5))[_0x13fd2c(0xbc)](),'unitId':_0x4101f5,'threadId':_0x5aa3fe,'mention':_0x212f0d,'content':_0x2bbc0e,'replyId':_0x5cd3a9},_0x147505=await this[_0x13fd2c(0xa4)][_0x13fd2c(0x85)](_0x13fd2c(0xce)+_0x4101f5+'/edit',{'body':_0x53d564});return!_0x147505[_0x13fd2c(0xc6)][_0x13fd2c(0xaf)]||_0x147505[_0x13fd2c(0xc6)][_0x13fd2c(0xaf)]['code']===0x1;}async['resolveComment'](_0x5e6797){const _0x49b5bf=_0x3d4b15,{unitId:_0x50b85b}=_0x5e6797,_0xf54bae=_0x5e6797[_0x49b5bf(0xcd)],_0x1392fb={'memberId':this[_0x49b5bf(0x75)][_0x49b5bf(0x9c)]()['userID'],'unitId':_0x50b85b,'threadId':_0xf54bae,'solved':_0x5e6797['resolved']?I['Solved']:I[_0x49b5bf(0x7d)]},_0x19dae6=await this[_0x49b5bf(0xa4)]['post'](_0x49b5bf(0xce)+_0x50b85b+_0x49b5bf(0x9b),{'body':_0x1392fb});return!_0x19dae6[_0x49b5bf(0xc6)][_0x49b5bf(0xaf)]||_0x19dae6['body'][_0x49b5bf(0xaf)][_0x49b5bf(0xbb)]===0x1;}async[_0x3d4b15(0x9e)](_0x87745,_0x579663,_0x182c01,_0x5e4cf3){const _0x1b8107=_0x3d4b15,_0x33788a={'memberId':(await this['_sessionService'][_0x1b8107(0xa6)](_0x87745))['getMemberID'](),'threadId':_0x182c01,'replyId':_0x5e4cf3,'unitId':_0x87745},_0x56f182=await this[_0x1b8107(0xa4)][_0x1b8107(0x85)](_0x1b8107(0xce)+_0x87745+'/delete',{'body':_0x33788a});return!_0x56f182['body'][_0x1b8107(0xaf)]||_0x56f182[_0x1b8107(0xc6)][_0x1b8107(0xaf)][_0x1b8107(0xbb)]===0x1;}async[_0x3d4b15(0xbf)](_0x1441a9,_0x47b53f,_0x2f8aa6){const _0x34140d=_0x3d4b15,_0x1c9f28={'unitId':_0x1441a9,'threadId':_0x2f8aa6},_0x4c11e8=await this['_httpService'][_0x34140d(0x85)]('/universer-api/comment/unit/'+_0x1441a9+_0x34140d(0xc4),{'body':_0x1c9f28}),_0xc76362=_0x2f8aa6[_0x34140d(0xa0)](_0x2779e8=>ee(_0x4c11e8[_0x34140d(0xc6)][_0x34140d(0xc0)][_0x2779e8],_0x1441a9,_0x47b53f))[_0x34140d(0xb0)](Boolean);return Object['values'](_0x4c11e8[_0x34140d(0xc6)][_0x34140d(0x79)])[_0x34140d(0xab)](_0x32cd63=>{const _0x5d96db=_0x34140d;this['_userService'][_0x5d96db(0xd7)](_0x32cd63);}),_0xc76362;}[_0x3d4b15(0x93)](_0x489324){const _0x59a40d=_0x3d4b15;return{'id':_0x489324['id'],'threadId':_0x489324[_0x59a40d(0xcd)],'ref':_0x489324[_0x59a40d(0xc1)]};}};S=Q([b(0x0,_0x301881(_0x2c9e19)),b(0x1,_0x301881(_0x54b721)),b(0x2,_0x301881(_0x1f42c9))],S);function _0x3903(){const _0x551eba=['249380KKtZMB','OpenOrReOpen','delete','_initUserSync','parentId','Solve','find','get','/reply','post','comment','3610962heVJoH','155561vLiyvU','onStarting','/add','customRanges','Solved','getOwnPropertyDescriptor','resolveComment','thread-comment-data-source.config','84azRBeU','payload','_threadCommentModel','saveCommentToSnapshot','296gxmKnz','UNRECOGNIZED','syncUpdateMutationToColla','_threadCommentDataSourceService','length','commentUpdate$','content','/solved','getCurrentUser','solved','deleteComment','_threadCommentDataSource','map','COMMENT','personId','dataSource','_httpService','_initDataSource','requireSession','20zOmXGt','user','replyId','reply','forEach','getComment','pluginName','_commentService','error','filter','Edit','setConfig','Reply','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','rangeId','size','5355006wrPeHr','add','code','getMemberID','userID','10439XwVYJH','listComments','comments','ref','symbol','_sessionService','/list','createTimestamp','body','addComment','7667495roFwVG','getUnit','457626fIjLQS','5SDjxtE','getUser','threadId','/universer-api/comment/unit/','slice','replies','Add','_configService','_injector','Unknown','Delete','parse','addUser','onReady','disposeWithMe','_userService','rangeType','type','subscribe','users','_config','stringify'];_0x3903=function(){return _0x551eba;};return _0x3903();}var re=Object[_0x3d4b15(0x8d)],te=(_0xbeb986,_0x391904,_0x49e84d,_0x2e067f)=>{const _0x1df60c=_0x3d4b15;for(var _0x1fe391=_0x2e067f>0x1?void 0x0:_0x2e067f?re(_0x391904,_0x49e84d):_0x391904,_0xe3d959=_0xbeb986[_0x1df60c(0x98)]-0x1,_0x4f3964;_0xe3d959>=0x0;_0xe3d959--)(_0x4f3964=_0xbeb986[_0xe3d959])&&(_0x1fe391=_0x4f3964(_0x1fe391)||_0x1fe391);return _0x1fe391;},M=(_0x532164,_0x2fe722)=>(_0x365e15,_0x36e7bc)=>_0x2fe722(_0x365e15,_0x36e7bc,_0x532164);let f=class extends _0x411f66{constructor(_0x592074,_0x533428){const _0x19b12e=_0x3d4b15;super(),this[_0x19b12e(0x97)]=_0x592074,this['_threadCommentDataSource']=_0x533428,this[_0x19b12e(0xa5)]();}['_initDataSource'](){const _0x5e44de=_0x3d4b15;this[_0x5e44de(0x97)][_0x5e44de(0xa3)]=this[_0x5e44de(0x9f)],this[_0x5e44de(0x97)][_0x5e44de(0x96)]=!0x1;}};f=te([M(0x0,_0x304249),M(0x1,_0x301881(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2c746c,_0x2679c0,_0x18812f)=>_0x2679c0 in _0x2c746c?se(_0x2c746c,_0x2679c0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x18812f}):_0x2c746c[_0x2679c0]=_0x18812f,ie=(_0x2a559a,_0x19cca4,_0x1b4246,_0x15cdc3)=>{for(var _0x20e72a=_0x15cdc3>0x1?void 0x0:_0x15cdc3?oe(_0x19cca4,_0x1b4246):_0x19cca4,_0x5cbdfc=_0x2a559a['length']-0x1,_0x236936;_0x5cbdfc>=0x0;_0x5cbdfc--)(_0x236936=_0x2a559a[_0x5cbdfc])&&(_0x20e72a=_0x236936(_0x20e72a)||_0x20e72a);return _0x20e72a;},N=(_0x263002,_0xb282c8)=>(_0x27df8d,_0x31f602)=>_0xb282c8(_0x27df8d,_0x31f602,_0x263002),$=(_0x3ac0d8,_0x455cb7,_0x1e1614)=>ne(_0x3ac0d8,typeof _0x455cb7!=_0x3d4b15(0xc2)?_0x455cb7+'':_0x455cb7,_0x1e1614);let g=class extends _0x1846da{constructor(_0x429fa6=O,_0x102a4b,_0x386f05){const _0x574785=_0x3d4b15;super(),this['_config']=_0x429fa6,this['_injector']=_0x102a4b,this[_0x574785(0xd2)]=_0x386f05;const {..._0x1b049d}=_0x5d93fc({},O,this[_0x574785(0x7a)]);this[_0x574785(0xd2)][_0x574785(0xb2)](z,_0x1b049d);}[_0x3d4b15(0x89)](){const _0x1012c6=_0x3d4b15;[[S],[f],[_]][_0x1012c6(0xab)](_0x2fa754=>{const _0x186386=_0x1012c6;this[_0x186386(0xd3)]['add'](_0x2fa754);});}[_0x3d4b15(0xd8)](){const _0xd10b=_0x3d4b15;this[_0xd10b(0xd3)][_0xd10b(0x83)](f),this['_injector'][_0xd10b(0x83)](_);}};$(g,_0x3d4b15(0xad),W),$(g,_0x3d4b15(0x77),_0x19d629['UNIVER_UNKNOWN']),g=ie([_0x1e9873(_0x9000b7,_0x4de362,_0xd07243),N(0x1,_0x301881(_0x121d33)),N(0x2,_0x3a3a63)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x486ffb=_0x2815;(function(_0x4563c7,_0x1cca7b){const _0x31ac7c=_0x2815,_0x5c6bb5=_0x4563c7();while(!![]){try{const _0x10b8f5=parseInt(_0x31ac7c(0x18f))/0x1*(-parseInt(_0x31ac7c(0x19b))/0x2)+parseInt(_0x31ac7c(0x1b8))/0x3*(parseInt(_0x31ac7c(0x1bf))/0x4)+-parseInt(_0x31ac7c(0x1a8))/0x5*(-parseInt(_0x31ac7c(0x1b7))/0x6)+parseInt(_0x31ac7c(0x180))/0x7*(parseInt(_0x31ac7c(0x1aa))/0x8)+parseInt(_0x31ac7c(0x1b2))/0x9*(parseInt(_0x31ac7c(0x19f))/0xa)+-parseInt(_0x31ac7c(0x18d))/0xb*(parseInt(_0x31ac7c(0x1d1))/0xc)+parseInt(_0x31ac7c(0x1cb))/0xd*(parseInt(_0x31ac7c(0x1ac))/0xe);if(_0x10b8f5===_0x1cca7b)break;else _0x5c6bb5['push'](_0x5c6bb5['shift']());}catch(_0x5ad90f){_0x5c6bb5['push'](_0x5c6bb5['shift']());}}}(_0x3e06,0x3932c));import{CommentService as _0x1e5874,CollaborationSessionService as _0xd17a1d,UniverCollaborationClientPlugin as _0x1998af}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2035}from'@univerjs-pro/license';import{dayjs as _0x15742b,UserManagerService as _0x3aacc4,Inject as _0x482f93,Injector as _0x4b0e42,Disposable as _0x2ad136,CustomRangeType as _0x3c700b,UniverInstanceType as _0x36f100,DependentOn as _0x2af10a,IConfigService as _0x4e5e6a,Plugin as _0x848ee9,merge as _0x558285}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x53556b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x18fd51,IThreadCommentDataSourceService as _0x24134a}from'@univerjs/thread-comment';import{bufferTime as _0x1355f9}from'rxjs';import{HTTPService as _0x3392dc}from'@univerjs/network';const W=_0x486ffb(0x1c7);function _0x2815(_0x51144a,_0x54781d){const _0x3e0637=_0x3e06();return _0x2815=function(_0x281582,_0x472afc){_0x281582=_0x281582-0x16f;let _0x2eeab9=_0x3e0637[_0x281582];return _0x2eeab9;},_0x2815(_0x51144a,_0x54781d);}var I=(_0x397f43=>(_0x397f43[_0x397f43[_0x486ffb(0x194)]=0x0]=_0x486ffb(0x194),_0x397f43[_0x397f43[_0x486ffb(0x178)]=0x1]=_0x486ffb(0x178),_0x397f43[_0x397f43[_0x486ffb(0x1c3)]=-0x1]='UNRECOGNIZED',_0x397f43))(I||{}),v=(_0x503d37=>(_0x503d37[_0x503d37[_0x486ffb(0x1ba)]=0x0]=_0x486ffb(0x1ba),_0x503d37[_0x503d37[_0x486ffb(0x17e)]=0x1]=_0x486ffb(0x17e),_0x503d37[_0x503d37[_0x486ffb(0x1ca)]=0x2]=_0x486ffb(0x1ca),_0x503d37[_0x503d37[_0x486ffb(0x196)]=0x3]='Edit',_0x503d37[_0x503d37[_0x486ffb(0x1bc)]=0x4]=_0x486ffb(0x1bc),_0x503d37[_0x503d37[_0x486ffb(0x175)]=0x5]=_0x486ffb(0x175),_0x503d37[_0x503d37['UNRECOGNIZED']=-0x1]=_0x486ffb(0x1c3),_0x503d37))(v||{});function _0x3e06(){const _0x2053ff=['_threadCommentDataSource','body','_initUserSync','parse','onStarting','solved','getOwnPropertyDescriptor','Solve','resolveComment','/list','Solved','ref','getUser','deleteComment','UNIVER_UNKNOWN','/universer-api/user/list','Add','/reply','833wUQXPZ','length','replies','defineProperty','symbol','getMemberID','/universer-api/comment/unit/','COMMENT','user','userID','comments','map','syncUpdateMutationToColla','11HcNZED','get','107DZOKlO','format','_threadCommentDataSourceService','updateComment','threadId','OpenOrReOpen','root','Edit','resolved','type','replyId','subscribe','5030rHHLeU','comment','setConfig','/solved','10kjZAIz','rangeId','YYYY/MM/DD\x20HH:mm','userId','getUnit','_httpService','saveCommentToSnapshot','requireSession','_userService','45ANntfT','add','9784FgpnPM','stringify','1619492mkSpxR','disposeWithMe','customRanges','getCurrentUser','users','values','2010465ZnHsLK','code','/edit','pipe','unitId','70410gQaezg','1047BkDoVc','_injector','Unknown','createTimestamp','Delete','_threadCommentModel','personId','172YNmQjd','filter','_initDataSource','content','UNRECOGNIZED','rangeType','onReady','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','_configService','Reply','13AIYDeC','size','addComment','parentId','error','find','1221996AzIKef','forEach','getComment','pluginName','_commentService','_sessionService'];_0x3e06=function(){return _0x2053ff;};return _0x3e06();}const y=_0x5ced77=>_0x15742b(new Date(+_0x5ced77))[_0x486ffb(0x190)](_0x486ffb(0x1a1)),B=async(_0x1a700b,_0x450d82)=>{const _0x37aab1=_0x486ffb,_0xb6fcd4=_0x1a700b[_0x37aab1(0x18e)](_0x3aacc4),_0x4eaebd=_0x1a700b[_0x37aab1(0x18e)](_0x3392dc);_0x450d82['forEach'](_0x24dbac=>{const _0x3ef48e=_0x37aab1;_0xb6fcd4[_0x3ef48e(0x17a)](_0x24dbac)&&_0x450d82['delete'](_0x24dbac);}),_0x450d82[_0x37aab1(0x1cc)]&&(await _0x4eaebd['get'](_0x37aab1(0x17d),{'params':{'userIDs':[..._0x450d82]}}))['body'][_0x37aab1(0x1b0)]['forEach'](_0x9ec2eb=>{const _0x51ba2b=_0x37aab1;_0x9ec2eb&&_0xb6fcd4[_0x51ba2b(0x1c6)](_0x9ec2eb);});};var K=Object[_0x486ffb(0x174)],V=(_0x132b1f,_0x15bb25,_0x4aa2f2,_0x15912b)=>{const _0x2fd9a2=_0x486ffb;for(var _0x879095=_0x15912b>0x1?void 0x0:_0x15912b?K(_0x15bb25,_0x4aa2f2):_0x15bb25,_0x75028e=_0x132b1f[_0x2fd9a2(0x181)]-0x1,_0x1c227f;_0x75028e>=0x0;_0x75028e--)(_0x1c227f=_0x132b1f[_0x75028e])&&(_0x879095=_0x1c227f(_0x879095)||_0x879095);return _0x879095;},p=(_0x549ebb,_0x3cd74e)=>(_0x419c0f,_0x469dd6)=>_0x3cd74e(_0x419c0f,_0x469dd6,_0x549ebb);let _=class extends _0x2ad136{constructor(_0x305e2b,_0x2792ef,_0x3a0d6d,_0x55ffb2){const _0x2c0895=_0x486ffb;super(),this[_0x2c0895(0x1d5)]=_0x305e2b,this['_threadCommentModel']=_0x2792ef,this[_0x2c0895(0x1a7)]=_0x3a0d6d,this[_0x2c0895(0x1b9)]=_0x55ffb2,this['_init'](),this[_0x2c0895(0x170)]();}[_0x486ffb(0x170)](){const _0x1077ca=_0x486ffb;this[_0x1077ca(0x1ad)](this[_0x1077ca(0x1bd)]['commentUpdate$'][_0x1077ca(0x1b5)](_0x1355f9(0x10))['subscribe'](_0x2151ff=>{const _0x458774=_0x1077ca,_0x4389d8=new Set();_0x2151ff[_0x458774(0x1d2)](_0x44f906=>{const _0x12e811=_0x458774;switch(_0x44f906[_0x12e811(0x198)]){case _0x12e811(0x1a9):{const _0x38e751=_0x44f906['payload'][_0x12e811(0x1be)];_0x4389d8[_0x12e811(0x1a9)](_0x38e751);break;}}}),B(this[_0x458774(0x1b9)],_0x4389d8);}));}['_init'](){const _0x1bdf27=_0x486ffb;this[_0x1bdf27(0x1ad)](this[_0x1bdf27(0x1d5)]['commentUpdate$'][_0x1bdf27(0x19a)](async _0x823661=>{const _0x2c50e3=_0x1bdf27;var _0x4ff4ee,_0x2a8c4c,_0x50823e,_0x58b5ed;const _0x2c74b6=(_0x4ff4ee=this['_threadCommentModel'][_0x2c50e3(0x1a3)](_0x823661[_0x2c50e3(0x1b6)])[_0x2c50e3(0x1d0)](_0x94ff37=>_0x94ff37['threadId']===_0x823661[_0x2c50e3(0x193)]))==null?void 0x0:_0x4ff4ee[_0x2c50e3(0x195)];if(!_0x2c74b6)return;const {unitId:_0x1f1c30,subUnitId:_0xa77f18}=_0x2c74b6;switch(_0x823661['user']&&this[_0x2c50e3(0x1a7)][_0x2c50e3(0x1c6)](_0x823661[_0x2c50e3(0x188)]),_0x823661[_0x2c50e3(0x198)]){case v['Add']:break;case v['Reply']:{this[_0x2c50e3(0x1bd)]['addComment'](_0x1f1c30,_0xa77f18,{'unitId':_0x1f1c30,'subUnitId':_0xa77f18,'ref':'','id':_0x823661[_0x2c50e3(0x199)],'dT':y(+_0x823661[_0x2c50e3(0x1bb)]),'threadId':_0x823661['threadId'],'personId':(_0x50823e=(_0x2a8c4c=_0x823661[_0x2c50e3(0x188)])==null?void 0x0:_0x2a8c4c[_0x2c50e3(0x189)])!=null?_0x50823e:_0x823661[_0x2c50e3(0x1a2)],'text':JSON[_0x2c50e3(0x171)](_0x823661['content']),'parentId':_0x2c74b6['id']});break;}case v[_0x2c50e3(0x1bc)]:{const _0x4dc3c5=this['_threadCommentModel'][_0x2c50e3(0x1d3)](_0x1f1c30,_0xa77f18,_0x823661[_0x2c50e3(0x199)]);_0x4dc3c5&&_0x4dc3c5[_0x2c50e3(0x1ce)]&&this[_0x2c50e3(0x1bd)][_0x2c50e3(0x17b)](_0x1f1c30,_0xa77f18,_0x823661[_0x2c50e3(0x199)]);break;}case v[_0x2c50e3(0x196)]:{this[_0x2c50e3(0x1bd)][_0x2c50e3(0x192)](_0x1f1c30,_0xa77f18,{'commentId':_0x823661[_0x2c50e3(0x199)],'text':JSON[_0x2c50e3(0x171)](_0x823661[_0x2c50e3(0x1c2)])});break;}case v[_0x2c50e3(0x175)]:{const _0xf3abac=(_0x58b5ed=this[_0x2c50e3(0x1bd)]['getUnit'](_0x823661['unitId'])['find'](_0x4daa19=>_0x4daa19['threadId']===_0x823661[_0x2c50e3(0x193)]))==null?void 0x0:_0x58b5ed[_0x2c50e3(0x195)];_0xf3abac&&this[_0x2c50e3(0x1bd)][_0x2c50e3(0x176)](_0x1f1c30,_0xa77f18,_0xf3abac['id'],_0x823661[_0x2c50e3(0x173)]===I[_0x2c50e3(0x178)]);break;}}}));}};_=V([p(0x0,_0x482f93(_0x1e5874)),p(0x1,_0x482f93(_0x18fd51)),p(0x2,_0x482f93(_0x3aacc4)),p(0x3,_0x482f93(_0x4b0e42))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x18cbb2,_0x8d0e85,_0xf9a8bb,_0x2e4fb0)=>{const _0x4f4034=_0x486ffb;for(var _0x193e65=_0x2e4fb0>0x1?void 0x0:_0x2e4fb0?k(_0x8d0e85,_0xf9a8bb):_0x8d0e85,_0x54696e=_0x18cbb2[_0x4f4034(0x181)]-0x1,_0x272866;_0x54696e>=0x0;_0x54696e--)(_0x272866=_0x18cbb2[_0x54696e])&&(_0x193e65=_0x272866(_0x193e65)||_0x193e65);return _0x193e65;},b=(_0x5b9a61,_0xcefecf)=>(_0x5a70f0,_0x48e822)=>_0xcefecf(_0x5a70f0,_0x48e822,_0x5b9a61);function X(_0xddea89,_0x206ec3){const _0x159940=_0x486ffb,_0x56efac=_0xddea89['replies'][0x0];return{..._0x206ec3,'id':_0x56efac[_0x159940(0x199)],'resolved':_0xddea89['solved']===0x1,'dT':y(_0x56efac[_0x159940(0x1bb)]),'personId':_0x56efac[_0x159940(0x1a2)],'threadId':_0x56efac['threadId']};}function ee(_0x33e2fd,_0x383d2e,_0x325be7){const _0x16e2c1=_0x486ffb;var _0xeca0ce,_0x39ad5a;if(((_0x39ad5a=(_0xeca0ce=_0x33e2fd==null?void 0x0:_0x33e2fd[_0x16e2c1(0x182)])==null?void 0x0:_0xeca0ce[_0x16e2c1(0x181)])!=null?_0x39ad5a:0x0)>0x0){const _0x4ea8c2=(_0x2f725a,_0x31b7e6)=>({'id':_0x2f725a[_0x16e2c1(0x199)],'threadId':_0x2f725a[_0x16e2c1(0x193)],'dT':y(_0x2f725a[_0x16e2c1(0x1bb)]),'personId':_0x2f725a[_0x16e2c1(0x1a2)],'resolved':_0x33e2fd[_0x16e2c1(0x173)]===I[_0x16e2c1(0x178)],'unitId':_0x383d2e,'subUnitId':_0x325be7,'text':JSON['parse'](_0x2f725a[_0x16e2c1(0x1c2)]),'parentId':_0x31b7e6}),_0x345988=_0x4ea8c2(_0x33e2fd[_0x16e2c1(0x182)][0x0]);return{..._0x345988,'children':_0x33e2fd[_0x16e2c1(0x182)]['slice'](0x1)[_0x16e2c1(0x18b)](_0x3b9ef7=>_0x4ea8c2(_0x3b9ef7,_0x345988['id']))};}return null;}let S=class{constructor(_0x366091,_0x2a5b7d,_0x12d3c1){const _0x10655c=_0x486ffb;this[_0x10655c(0x1a4)]=_0x366091,this[_0x10655c(0x1a7)]=_0x2a5b7d,this[_0x10655c(0x1d6)]=_0x12d3c1;}async[_0x486ffb(0x1cd)](_0x249887){const _0x215b63=_0x486ffb;var _0x10abd7,_0xbdb248;const {parentId:_0x32f1c1,unitId:_0x54fbc0,text:_0x1e7943,threadId:_0x4f481f}=_0x249887,_0x244263=(_0xbdb248=(_0x10abd7=_0x1e7943[_0x215b63(0x1ae)])==null?void 0x0:_0x10abd7[_0x215b63(0x1c0)](_0x3c44ff=>_0x3c44ff[_0x215b63(0x1c4)]===_0x3c700b[_0x215b63(0x187)])[_0x215b63(0x18b)](_0x53cf83=>_0x53cf83[_0x215b63(0x1a0)]))!=null?_0xbdb248:[],_0x2a0d22=JSON['stringify'](_0x1e7943),_0x4715d4=(await this[_0x215b63(0x1d6)][_0x215b63(0x1a6)](_0x54fbc0))['getMemberID']();if(_0x32f1c1){const _0x1c44f7={'memberId':_0x4715d4,'unitId':_0x54fbc0,'content':_0x2a0d22,'mention':_0x244263,'threadId':_0x4f481f},_0x1f939b=(await this[_0x215b63(0x1a4)]['post']('/universer-api/comment/unit/'+_0x54fbc0+_0x215b63(0x17f),{'body':_0x1c44f7}))[_0x215b63(0x16f)]['reply'];return{..._0x249887,'id':_0x1f939b['replyId'],'dT':_0x15742b(+_0x1f939b[_0x215b63(0x1bb)])[_0x215b63(0x190)](_0x215b63(0x1a1)),'personId':_0x1f939b[_0x215b63(0x1a2)]};}else{const _0x1d41f9={'memberId':_0x4715d4,'unitId':_0x54fbc0,'content':_0x2a0d22,'mention':_0x244263},_0x1ca483=await this['_httpService']['post'](_0x215b63(0x186)+_0x54fbc0+'/add',{'body':_0x1d41f9});return X(_0x1ca483[_0x215b63(0x16f)][_0x215b63(0x19c)],_0x249887);}}async[_0x486ffb(0x192)](_0x4be5db){const _0x5962f4=_0x486ffb;var _0x4a962b,_0x29e334;const {text:_0x149d9f,unitId:_0x3ec656}=_0x4be5db,_0x505b2d=(_0x29e334=(_0x4a962b=_0x149d9f[_0x5962f4(0x1ae)])==null?void 0x0:_0x4a962b[_0x5962f4(0x1c0)](_0x509995=>_0x509995[_0x5962f4(0x1c4)]===_0x3c700b[_0x5962f4(0x187)])[_0x5962f4(0x18b)](_0x5f43ce=>_0x5f43ce['rangeId']))!=null?_0x29e334:[],_0x148662=JSON[_0x5962f4(0x1ab)](_0x149d9f),_0x24fade=_0x4be5db[_0x5962f4(0x193)],_0x4d9bec=_0x4be5db['id'],_0x53d037={'memberId':(await this[_0x5962f4(0x1d6)][_0x5962f4(0x1a6)](_0x3ec656))[_0x5962f4(0x185)](),'unitId':_0x3ec656,'threadId':_0x24fade,'mention':_0x505b2d,'content':_0x148662,'replyId':_0x4d9bec},_0x5087f6=await this[_0x5962f4(0x1a4)][_0x5962f4(0x1c8)](_0x5962f4(0x186)+_0x3ec656+_0x5962f4(0x1b4),{'body':_0x53d037});return!_0x5087f6['body'][_0x5962f4(0x1cf)]||_0x5087f6[_0x5962f4(0x16f)]['error'][_0x5962f4(0x1b3)]===0x1;}async[_0x486ffb(0x176)](_0x4deb3c){const _0x1f5bf5=_0x486ffb,{unitId:_0x34b529}=_0x4deb3c,_0x5519a3=_0x4deb3c[_0x1f5bf5(0x193)],_0x56b828={'memberId':this[_0x1f5bf5(0x1a7)][_0x1f5bf5(0x1af)]()['userID'],'unitId':_0x34b529,'threadId':_0x5519a3,'solved':_0x4deb3c[_0x1f5bf5(0x197)]?I[_0x1f5bf5(0x178)]:I['OpenOrReOpen']},_0x2a3abf=await this[_0x1f5bf5(0x1a4)][_0x1f5bf5(0x1c8)](_0x1f5bf5(0x186)+_0x34b529+_0x1f5bf5(0x19e),{'body':_0x56b828});return!_0x2a3abf[_0x1f5bf5(0x16f)][_0x1f5bf5(0x1cf)]||_0x2a3abf[_0x1f5bf5(0x16f)][_0x1f5bf5(0x1cf)][_0x1f5bf5(0x1b3)]===0x1;}async[_0x486ffb(0x17b)](_0x33b385,_0x2d4477,_0x5277dd,_0x496503){const _0x5d6144=_0x486ffb,_0x36eda9={'memberId':(await this[_0x5d6144(0x1d6)]['requireSession'](_0x33b385))['getMemberID'](),'threadId':_0x5277dd,'replyId':_0x496503,'unitId':_0x33b385},_0x5a2d44=await this[_0x5d6144(0x1a4)]['post'](_0x5d6144(0x186)+_0x33b385+'/delete',{'body':_0x36eda9});return!_0x5a2d44[_0x5d6144(0x16f)]['error']||_0x5a2d44[_0x5d6144(0x16f)][_0x5d6144(0x1cf)][_0x5d6144(0x1b3)]===0x1;}async['listComments'](_0x3aa5dc,_0x2ebc15,_0x321d00){const _0x30bae3=_0x486ffb,_0x210336={'unitId':_0x3aa5dc,'threadId':_0x321d00},_0x4f598f=await this[_0x30bae3(0x1a4)][_0x30bae3(0x1c8)](_0x30bae3(0x186)+_0x3aa5dc+_0x30bae3(0x177),{'body':_0x210336}),_0x45be17=_0x321d00[_0x30bae3(0x18b)](_0x5cd6ff=>ee(_0x4f598f[_0x30bae3(0x16f)][_0x30bae3(0x18a)][_0x5cd6ff],_0x3aa5dc,_0x2ebc15))['filter'](Boolean);return Object[_0x30bae3(0x1b1)](_0x4f598f['body'][_0x30bae3(0x1b0)])[_0x30bae3(0x1d2)](_0x464403=>{const _0x18c33f=_0x30bae3;this['_userService'][_0x18c33f(0x1c6)](_0x464403);}),_0x45be17;}[_0x486ffb(0x1a5)](_0x382e76){const _0x11c7a4=_0x486ffb;return{'id':_0x382e76['id'],'threadId':_0x382e76[_0x11c7a4(0x193)],'ref':_0x382e76[_0x11c7a4(0x179)]};}};S=Q([b(0x0,_0x482f93(_0x3392dc)),b(0x1,_0x482f93(_0x3aacc4)),b(0x2,_0x482f93(_0xd17a1d))],S);var re=Object[_0x486ffb(0x174)],te=(_0x55ccb9,_0x566512,_0x2d7d11,_0x504518)=>{const _0x1356e8=_0x486ffb;for(var _0x5e3734=_0x504518>0x1?void 0x0:_0x504518?re(_0x566512,_0x2d7d11):_0x566512,_0xad20fd=_0x55ccb9[_0x1356e8(0x181)]-0x1,_0x5e7b4e;_0xad20fd>=0x0;_0xad20fd--)(_0x5e7b4e=_0x55ccb9[_0xad20fd])&&(_0x5e3734=_0x5e7b4e(_0x5e3734)||_0x5e3734);return _0x5e3734;},M=(_0x593d09,_0x92e988)=>(_0x34f8b6,_0x34bef8)=>_0x92e988(_0x34f8b6,_0x34bef8,_0x593d09);let f=class extends _0x2ad136{constructor(_0x36325c,_0x499851){const _0x85d66f=_0x486ffb;super(),this[_0x85d66f(0x191)]=_0x36325c,this[_0x85d66f(0x1d7)]=_0x499851,this['_initDataSource']();}[_0x486ffb(0x1c1)](){const _0x4a78ca=_0x486ffb;this[_0x4a78ca(0x191)]['dataSource']=this[_0x4a78ca(0x1d7)],this[_0x4a78ca(0x191)][_0x4a78ca(0x18c)]=!0x1;}};f=te([M(0x0,_0x24134a),M(0x1,_0x482f93(S))],f);var se=Object[_0x486ffb(0x183)],oe=Object[_0x486ffb(0x174)],ne=(_0x43e484,_0x554af3,_0x4da8d5)=>_0x554af3 in _0x43e484?se(_0x43e484,_0x554af3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4da8d5}):_0x43e484[_0x554af3]=_0x4da8d5,ie=(_0x29004e,_0x459384,_0x2d8c3b,_0x1450dd)=>{const _0x55379c=_0x486ffb;for(var _0x42a8d9=_0x1450dd>0x1?void 0x0:_0x1450dd?oe(_0x459384,_0x2d8c3b):_0x459384,_0x1226c3=_0x29004e[_0x55379c(0x181)]-0x1,_0x46e74d;_0x1226c3>=0x0;_0x1226c3--)(_0x46e74d=_0x29004e[_0x1226c3])&&(_0x42a8d9=_0x46e74d(_0x42a8d9)||_0x42a8d9);return _0x42a8d9;},N=(_0x587b0f,_0x491874)=>(_0x14a516,_0x46f24b)=>_0x491874(_0x14a516,_0x46f24b,_0x587b0f),$=(_0x2d702b,_0xa1fd09,_0x476d54)=>ne(_0x2d702b,typeof _0xa1fd09!=_0x486ffb(0x184)?_0xa1fd09+'':_0xa1fd09,_0x476d54);let g=class extends _0x848ee9{constructor(_0xfebba2=O,_0x154565,_0x879283){const _0x35d77e=_0x486ffb;super(),this['_config']=_0xfebba2,this[_0x35d77e(0x1b9)]=_0x154565,this[_0x35d77e(0x1c9)]=_0x879283;const {..._0x3c20be}=_0x558285({},O,this['_config']);this[_0x35d77e(0x1c9)][_0x35d77e(0x19d)](z,_0x3c20be);}[_0x486ffb(0x172)](){const _0x1b6491=_0x486ffb;[[S],[f],[_]][_0x1b6491(0x1d2)](_0x598de5=>{const _0x2b010f=_0x1b6491;this[_0x2b010f(0x1b9)][_0x2b010f(0x1a9)](_0x598de5);});}[_0x486ffb(0x1c5)](){const _0x497ff2=_0x486ffb;this[_0x497ff2(0x1b9)][_0x497ff2(0x18e)](f),this[_0x497ff2(0x1b9)][_0x497ff2(0x18e)](_);}};$(g,_0x486ffb(0x1d4),W),$(g,'type',_0x36f100[_0x486ffb(0x17c)]),g=ie([_0x2af10a(_0x53556b,_0x1998af,_0x2b2035),N(0x1,_0x482f93(_0x4b0e42)),N(0x2,_0x4e5e6a)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3d4b15=_0x4964;(function(_0x2700ee,_0x18ca3d){const _0x3831dd=_0x4964,_0x3da2cc=_0x2700ee();while(!![]){try{const _0x2269ce=parseInt(_0x3831dd(0xbe))/0x1*(-parseInt(_0x3831dd(0x90))/0x2)+parseInt(_0x3831dd(0xca))/0x3+parseInt(_0x3831dd(0x7c))/0x4+-parseInt(_0x3831dd(0xcb))/0x5*(parseInt(_0x3831dd(0xb9))/0x6)+parseInt(_0x3831dd(0x88))/0x7*(parseInt(_0x3831dd(0x94))/0x8)+-parseInt(_0x3831dd(0x87))/0x9+-parseInt(_0x3831dd(0xa7))/0xa*(-parseInt(_0x3831dd(0xc8))/0xb);if(_0x2269ce===_0x18ca3d)break;else _0x3da2cc['push'](_0x3da2cc['shift']());}catch(_0xa727dd){_0x3da2cc['push'](_0x3da2cc['shift']());}}}(_0x3903,0xaaabf));import{CommentService as _0x4ff073,CollaborationSessionService as _0x1f42c9,UniverCollaborationClientPlugin as _0x4de362}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd07243}from'@univerjs-pro/license';import{dayjs as _0x30e3e3,UserManagerService as _0x54b721,Inject as _0x301881,Injector as _0x121d33,Disposable as _0x411f66,CustomRangeType as _0x534e27,UniverInstanceType as _0x19d629,DependentOn as _0x1e9873,IConfigService as _0x3a3a63,Plugin as _0x1846da,merge as _0x5d93fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9000b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x330db4,IThreadCommentDataSourceService as _0x304249}from'@univerjs/thread-comment';import{bufferTime as _0x5917c9}from'rxjs';import{HTTPService as _0x2c9e19}from'@univerjs/network';const W=_0x3d4b15(0xb5);var I=(_0x57b403=>(_0x57b403[_0x57b403[_0x3d4b15(0x7d)]=0x0]=_0x3d4b15(0x7d),_0x57b403[_0x57b403[_0x3d4b15(0x8c)]=0x1]=_0x3d4b15(0x8c),_0x57b403[_0x57b403[_0x3d4b15(0x95)]=-0x1]=_0x3d4b15(0x95),_0x57b403))(I||{}),v=(_0x415462=>(_0x415462[_0x415462[_0x3d4b15(0xd4)]=0x0]=_0x3d4b15(0xd4),_0x415462[_0x415462[_0x3d4b15(0xd1)]=0x1]=_0x3d4b15(0xd1),_0x415462[_0x415462[_0x3d4b15(0xb3)]=0x2]=_0x3d4b15(0xb3),_0x415462[_0x415462[_0x3d4b15(0xb1)]=0x3]=_0x3d4b15(0xb1),_0x415462[_0x415462[_0x3d4b15(0xd5)]=0x4]=_0x3d4b15(0xd5),_0x415462[_0x415462['Solve']=0x5]=_0x3d4b15(0x81),_0x415462[_0x415462['UNRECOGNIZED']=-0x1]=_0x3d4b15(0x95),_0x415462))(v||{});const y=_0x272194=>_0x30e3e3(new Date(+_0x272194))[_0x3d4b15(0xb4)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xfa5f07,_0x4cc590)=>{const _0x3e39ff=_0x3d4b15,_0x2ccc69=_0xfa5f07[_0x3e39ff(0x83)](_0x54b721),_0x352722=_0xfa5f07[_0x3e39ff(0x83)](_0x2c9e19);_0x4cc590['forEach'](_0x3a63b8=>{const _0x4e5509=_0x3e39ff;_0x2ccc69[_0x4e5509(0xcc)](_0x3a63b8)&&_0x4cc590[_0x4e5509(0x7e)](_0x3a63b8);}),_0x4cc590[_0x3e39ff(0xb8)]&&(await _0x352722[_0x3e39ff(0x83)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4cc590]}}))[_0x3e39ff(0xc6)]['users'][_0x3e39ff(0xab)](_0x59b3dd=>{_0x59b3dd&&_0x2ccc69['addUser'](_0x59b3dd);});};var K=Object[_0x3d4b15(0x8d)],V=(_0x3dc105,_0x25573b,_0x5b4db8,_0x2bffde)=>{for(var _0x388dec=_0x2bffde>0x1?void 0x0:_0x2bffde?K(_0x25573b,_0x5b4db8):_0x25573b,_0x5c82fd=_0x3dc105['length']-0x1,_0x3e9d15;_0x5c82fd>=0x0;_0x5c82fd--)(_0x3e9d15=_0x3dc105[_0x5c82fd])&&(_0x388dec=_0x3e9d15(_0x388dec)||_0x388dec);return _0x388dec;},p=(_0x10cd96,_0x5e07c1)=>(_0xcfe85e,_0x138eb2)=>_0x5e07c1(_0xcfe85e,_0x138eb2,_0x10cd96);let _=class extends _0x411f66{constructor(_0x209aa6,_0x2d13cf,_0x36d7e4,_0x81dd4d){const _0x3857d6=_0x3d4b15;super(),this[_0x3857d6(0xae)]=_0x209aa6,this[_0x3857d6(0x92)]=_0x2d13cf,this['_userService']=_0x36d7e4,this[_0x3857d6(0xd3)]=_0x81dd4d,this['_init'](),this[_0x3857d6(0x7f)]();}[_0x3d4b15(0x7f)](){const _0x301ea3=_0x3d4b15;this[_0x301ea3(0x74)](this[_0x301ea3(0x92)][_0x301ea3(0x99)]['pipe'](_0x5917c9(0x10))[_0x301ea3(0x78)](_0x22f156=>{const _0x5ebe8f=new Set();_0x22f156['forEach'](_0xdba62a=>{const _0x15a635=_0x4964;switch(_0xdba62a[_0x15a635(0x77)]){case'add':{const _0x5bd0d5=_0xdba62a[_0x15a635(0x91)][_0x15a635(0xa2)];_0x5ebe8f[_0x15a635(0xba)](_0x5bd0d5);break;}}}),B(this['_injector'],_0x5ebe8f);}));}['_init'](){const _0x4b1f59=_0x3d4b15;this[_0x4b1f59(0x74)](this[_0x4b1f59(0xae)][_0x4b1f59(0x99)]['subscribe'](async _0x1a47b4=>{const _0x38c0e3=_0x4b1f59;var _0x130dc7,_0x5991ac,_0x1c358e,_0x394686;const _0xb8f519=(_0x130dc7=this[_0x38c0e3(0x92)][_0x38c0e3(0xc9)](_0x1a47b4['unitId'])[_0x38c0e3(0x82)](_0xc2e4bd=>_0xc2e4bd[_0x38c0e3(0xcd)]===_0x1a47b4[_0x38c0e3(0xcd)]))==null?void 0x0:_0x130dc7['root'];if(!_0xb8f519)return;const {unitId:_0x498768,subUnitId:_0x300a5a}=_0xb8f519;switch(_0x1a47b4['user']&&this['_userService']['addUser'](_0x1a47b4[_0x38c0e3(0xa8)]),_0x1a47b4[_0x38c0e3(0x77)]){case v[_0x38c0e3(0xd1)]:break;case v[_0x38c0e3(0xb3)]:{this[_0x38c0e3(0x92)][_0x38c0e3(0xc7)](_0x498768,_0x300a5a,{'unitId':_0x498768,'subUnitId':_0x300a5a,'ref':'','id':_0x1a47b4[_0x38c0e3(0xa9)],'dT':y(+_0x1a47b4[_0x38c0e3(0xc5)]),'threadId':_0x1a47b4[_0x38c0e3(0xcd)],'personId':(_0x1c358e=(_0x5991ac=_0x1a47b4[_0x38c0e3(0xa8)])==null?void 0x0:_0x5991ac[_0x38c0e3(0xbd)])!=null?_0x1c358e:_0x1a47b4[_0x38c0e3(0xb6)],'text':JSON[_0x38c0e3(0xd6)](_0x1a47b4[_0x38c0e3(0x9a)]),'parentId':_0xb8f519['id']});break;}case v[_0x38c0e3(0xd5)]:{const _0x2ad1d0=this[_0x38c0e3(0x92)][_0x38c0e3(0xac)](_0x498768,_0x300a5a,_0x1a47b4[_0x38c0e3(0xa9)]);_0x2ad1d0&&_0x2ad1d0[_0x38c0e3(0x80)]&&this[_0x38c0e3(0x92)][_0x38c0e3(0x9e)](_0x498768,_0x300a5a,_0x1a47b4[_0x38c0e3(0xa9)]);break;}case v['Edit']:{this[_0x38c0e3(0x92)]['updateComment'](_0x498768,_0x300a5a,{'commentId':_0x1a47b4[_0x38c0e3(0xa9)],'text':JSON[_0x38c0e3(0xd6)](_0x1a47b4['content'])});break;}case v[_0x38c0e3(0x81)]:{const _0xa42100=(_0x394686=this[_0x38c0e3(0x92)]['getUnit'](_0x1a47b4['unitId'])[_0x38c0e3(0x82)](_0x5a5d18=>_0x5a5d18['threadId']===_0x1a47b4[_0x38c0e3(0xcd)]))==null?void 0x0:_0x394686['root'];_0xa42100&&this[_0x38c0e3(0x92)][_0x38c0e3(0x8e)](_0x498768,_0x300a5a,_0xa42100['id'],_0x1a47b4[_0x38c0e3(0x9d)]===I[_0x38c0e3(0x8c)]);break;}}}));}};_=V([p(0x0,_0x301881(_0x4ff073)),p(0x1,_0x301881(_0x330db4)),p(0x2,_0x301881(_0x54b721)),p(0x3,_0x301881(_0x121d33))],_);const z=_0x3d4b15(0x8f),O={};function _0x4964(_0x291565,_0x15b74f){const _0x39039b=_0x3903();return _0x4964=function(_0x4964cf,_0x5584a0){_0x4964cf=_0x4964cf-0x74;let _0x4af8fd=_0x39039b[_0x4964cf];return _0x4af8fd;},_0x4964(_0x291565,_0x15b74f);}var k=Object[_0x3d4b15(0x8d)],Q=(_0x4f72dc,_0x5d9d97,_0x1bb8ab,_0x12c7bc)=>{for(var _0x3880ad=_0x12c7bc>0x1?void 0x0:_0x12c7bc?k(_0x5d9d97,_0x1bb8ab):_0x5d9d97,_0x2d7479=_0x4f72dc['length']-0x1,_0x1f675f;_0x2d7479>=0x0;_0x2d7479--)(_0x1f675f=_0x4f72dc[_0x2d7479])&&(_0x3880ad=_0x1f675f(_0x3880ad)||_0x3880ad);return _0x3880ad;},b=(_0x50e765,_0x43b36e)=>(_0xb8b818,_0x333aed)=>_0x43b36e(_0xb8b818,_0x333aed,_0x50e765);function X(_0x56d5e7,_0x4d8856){const _0x4d1543=_0x3d4b15,_0x5060e9=_0x56d5e7[_0x4d1543(0xd0)][0x0];return{..._0x4d8856,'id':_0x5060e9['replyId'],'resolved':_0x56d5e7['solved']===0x1,'dT':y(_0x5060e9['createTimestamp']),'personId':_0x5060e9[_0x4d1543(0xb6)],'threadId':_0x5060e9['threadId']};}function ee(_0x516476,_0x4ca81a,_0x535e66){const _0x53c3d2=_0x3d4b15;var _0x1c1a61,_0x4133f3;if(((_0x4133f3=(_0x1c1a61=_0x516476==null?void 0x0:_0x516476[_0x53c3d2(0xd0)])==null?void 0x0:_0x1c1a61[_0x53c3d2(0x98)])!=null?_0x4133f3:0x0)>0x0){const _0x1b31d2=(_0x3888f4,_0x1f5a49)=>({'id':_0x3888f4['replyId'],'threadId':_0x3888f4['threadId'],'dT':y(_0x3888f4['createTimestamp']),'personId':_0x3888f4[_0x53c3d2(0xb6)],'resolved':_0x516476[_0x53c3d2(0x9d)]===I[_0x53c3d2(0x8c)],'unitId':_0x4ca81a,'subUnitId':_0x535e66,'text':JSON['parse'](_0x3888f4[_0x53c3d2(0x9a)]),'parentId':_0x1f5a49}),_0x27530c=_0x1b31d2(_0x516476[_0x53c3d2(0xd0)][0x0]);return{..._0x27530c,'children':_0x516476[_0x53c3d2(0xd0)][_0x53c3d2(0xcf)](0x1)[_0x53c3d2(0xa0)](_0xa30fb0=>_0x1b31d2(_0xa30fb0,_0x27530c['id']))};}return null;}let S=class{constructor(_0x37ee87,_0x502db7,_0x1a43ad){const _0x4da2a7=_0x3d4b15;this[_0x4da2a7(0xa4)]=_0x37ee87,this[_0x4da2a7(0x75)]=_0x502db7,this[_0x4da2a7(0xc3)]=_0x1a43ad;}async[_0x3d4b15(0xc7)](_0x197994){const _0x12d25a=_0x3d4b15;var _0x541214,_0x18ee4b;const {parentId:_0x49ec91,unitId:_0x56ce79,text:_0x545db7,threadId:_0x5e1443}=_0x197994,_0x1e11ed=(_0x18ee4b=(_0x541214=_0x545db7[_0x12d25a(0x8b)])==null?void 0x0:_0x541214[_0x12d25a(0xb0)](_0x5e7e44=>_0x5e7e44[_0x12d25a(0x76)]===_0x534e27['COMMENT'])['map'](_0xe1ed43=>_0xe1ed43[_0x12d25a(0xb7)]))!=null?_0x18ee4b:[],_0x184b7c=JSON[_0x12d25a(0x7b)](_0x545db7),_0x2ef6dd=(await this[_0x12d25a(0xc3)][_0x12d25a(0xa6)](_0x56ce79))[_0x12d25a(0xbc)]();if(_0x49ec91){const _0x469add={'memberId':_0x2ef6dd,'unitId':_0x56ce79,'content':_0x184b7c,'mention':_0x1e11ed,'threadId':_0x5e1443},_0x5352e5=(await this[_0x12d25a(0xa4)]['post'](_0x12d25a(0xce)+_0x56ce79+_0x12d25a(0x84),{'body':_0x469add}))[_0x12d25a(0xc6)][_0x12d25a(0xaa)];return{..._0x197994,'id':_0x5352e5[_0x12d25a(0xa9)],'dT':_0x30e3e3(+_0x5352e5[_0x12d25a(0xc5)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x5352e5[_0x12d25a(0xb6)]};}else{const _0x21c80f={'memberId':_0x2ef6dd,'unitId':_0x56ce79,'content':_0x184b7c,'mention':_0x1e11ed},_0x2ef7e1=await this[_0x12d25a(0xa4)][_0x12d25a(0x85)](_0x12d25a(0xce)+_0x56ce79+_0x12d25a(0x8a),{'body':_0x21c80f});return X(_0x2ef7e1[_0x12d25a(0xc6)][_0x12d25a(0x86)],_0x197994);}}async['updateComment'](_0x2b8464){const _0x13fd2c=_0x3d4b15;var _0x1b533c,_0x132d56;const {text:_0x3b0ced,unitId:_0x4101f5}=_0x2b8464,_0x212f0d=(_0x132d56=(_0x1b533c=_0x3b0ced['customRanges'])==null?void 0x0:_0x1b533c[_0x13fd2c(0xb0)](_0x580e1a=>_0x580e1a['rangeType']===_0x534e27[_0x13fd2c(0xa1)])[_0x13fd2c(0xa0)](_0x291540=>_0x291540['rangeId']))!=null?_0x132d56:[],_0x2bbc0e=JSON[_0x13fd2c(0x7b)](_0x3b0ced),_0x5aa3fe=_0x2b8464[_0x13fd2c(0xcd)],_0x5cd3a9=_0x2b8464['id'],_0x53d564={'memberId':(await this[_0x13fd2c(0xc3)][_0x13fd2c(0xa6)](_0x4101f5))[_0x13fd2c(0xbc)](),'unitId':_0x4101f5,'threadId':_0x5aa3fe,'mention':_0x212f0d,'content':_0x2bbc0e,'replyId':_0x5cd3a9},_0x147505=await this[_0x13fd2c(0xa4)][_0x13fd2c(0x85)](_0x13fd2c(0xce)+_0x4101f5+'/edit',{'body':_0x53d564});return!_0x147505[_0x13fd2c(0xc6)][_0x13fd2c(0xaf)]||_0x147505[_0x13fd2c(0xc6)][_0x13fd2c(0xaf)]['code']===0x1;}async['resolveComment'](_0x5e6797){const _0x49b5bf=_0x3d4b15,{unitId:_0x50b85b}=_0x5e6797,_0xf54bae=_0x5e6797[_0x49b5bf(0xcd)],_0x1392fb={'memberId':this[_0x49b5bf(0x75)][_0x49b5bf(0x9c)]()['userID'],'unitId':_0x50b85b,'threadId':_0xf54bae,'solved':_0x5e6797['resolved']?I['Solved']:I[_0x49b5bf(0x7d)]},_0x19dae6=await this[_0x49b5bf(0xa4)]['post'](_0x49b5bf(0xce)+_0x50b85b+_0x49b5bf(0x9b),{'body':_0x1392fb});return!_0x19dae6[_0x49b5bf(0xc6)][_0x49b5bf(0xaf)]||_0x19dae6['body'][_0x49b5bf(0xaf)][_0x49b5bf(0xbb)]===0x1;}async[_0x3d4b15(0x9e)](_0x87745,_0x579663,_0x182c01,_0x5e4cf3){const _0x1b8107=_0x3d4b15,_0x33788a={'memberId':(await this['_sessionService'][_0x1b8107(0xa6)](_0x87745))['getMemberID'](),'threadId':_0x182c01,'replyId':_0x5e4cf3,'unitId':_0x87745},_0x56f182=await this[_0x1b8107(0xa4)][_0x1b8107(0x85)](_0x1b8107(0xce)+_0x87745+'/delete',{'body':_0x33788a});return!_0x56f182['body'][_0x1b8107(0xaf)]||_0x56f182[_0x1b8107(0xc6)][_0x1b8107(0xaf)][_0x1b8107(0xbb)]===0x1;}async[_0x3d4b15(0xbf)](_0x1441a9,_0x47b53f,_0x2f8aa6){const _0x34140d=_0x3d4b15,_0x1c9f28={'unitId':_0x1441a9,'threadId':_0x2f8aa6},_0x4c11e8=await this['_httpService'][_0x34140d(0x85)]('/universer-api/comment/unit/'+_0x1441a9+_0x34140d(0xc4),{'body':_0x1c9f28}),_0xc76362=_0x2f8aa6[_0x34140d(0xa0)](_0x2779e8=>ee(_0x4c11e8[_0x34140d(0xc6)][_0x34140d(0xc0)][_0x2779e8],_0x1441a9,_0x47b53f))[_0x34140d(0xb0)](Boolean);return Object['values'](_0x4c11e8[_0x34140d(0xc6)][_0x34140d(0x79)])[_0x34140d(0xab)](_0x32cd63=>{const _0x5d96db=_0x34140d;this['_userService'][_0x5d96db(0xd7)](_0x32cd63);}),_0xc76362;}[_0x3d4b15(0x93)](_0x489324){const _0x59a40d=_0x3d4b15;return{'id':_0x489324['id'],'threadId':_0x489324[_0x59a40d(0xcd)],'ref':_0x489324[_0x59a40d(0xc1)]};}};S=Q([b(0x0,_0x301881(_0x2c9e19)),b(0x1,_0x301881(_0x54b721)),b(0x2,_0x301881(_0x1f42c9))],S);function _0x3903(){const _0x551eba=['249380KKtZMB','OpenOrReOpen','delete','_initUserSync','parentId','Solve','find','get','/reply','post','comment','3610962heVJoH','155561vLiyvU','onStarting','/add','customRanges','Solved','getOwnPropertyDescriptor','resolveComment','thread-comment-data-source.config','84azRBeU','payload','_threadCommentModel','saveCommentToSnapshot','296gxmKnz','UNRECOGNIZED','syncUpdateMutationToColla','_threadCommentDataSourceService','length','commentUpdate$','content','/solved','getCurrentUser','solved','deleteComment','_threadCommentDataSource','map','COMMENT','personId','dataSource','_httpService','_initDataSource','requireSession','20zOmXGt','user','replyId','reply','forEach','getComment','pluginName','_commentService','error','filter','Edit','setConfig','Reply','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','rangeId','size','5355006wrPeHr','add','code','getMemberID','userID','10439XwVYJH','listComments','comments','ref','symbol','_sessionService','/list','createTimestamp','body','addComment','7667495roFwVG','getUnit','457626fIjLQS','5SDjxtE','getUser','threadId','/universer-api/comment/unit/','slice','replies','Add','_configService','_injector','Unknown','Delete','parse','addUser','onReady','disposeWithMe','_userService','rangeType','type','subscribe','users','_config','stringify'];_0x3903=function(){return _0x551eba;};return _0x3903();}var re=Object[_0x3d4b15(0x8d)],te=(_0xbeb986,_0x391904,_0x49e84d,_0x2e067f)=>{const _0x1df60c=_0x3d4b15;for(var _0x1fe391=_0x2e067f>0x1?void 0x0:_0x2e067f?re(_0x391904,_0x49e84d):_0x391904,_0xe3d959=_0xbeb986[_0x1df60c(0x98)]-0x1,_0x4f3964;_0xe3d959>=0x0;_0xe3d959--)(_0x4f3964=_0xbeb986[_0xe3d959])&&(_0x1fe391=_0x4f3964(_0x1fe391)||_0x1fe391);return _0x1fe391;},M=(_0x532164,_0x2fe722)=>(_0x365e15,_0x36e7bc)=>_0x2fe722(_0x365e15,_0x36e7bc,_0x532164);let f=class extends _0x411f66{constructor(_0x592074,_0x533428){const _0x19b12e=_0x3d4b15;super(),this[_0x19b12e(0x97)]=_0x592074,this['_threadCommentDataSource']=_0x533428,this[_0x19b12e(0xa5)]();}['_initDataSource'](){const _0x5e44de=_0x3d4b15;this[_0x5e44de(0x97)][_0x5e44de(0xa3)]=this[_0x5e44de(0x9f)],this[_0x5e44de(0x97)][_0x5e44de(0x96)]=!0x1;}};f=te([M(0x0,_0x304249),M(0x1,_0x301881(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2c746c,_0x2679c0,_0x18812f)=>_0x2679c0 in _0x2c746c?se(_0x2c746c,_0x2679c0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x18812f}):_0x2c746c[_0x2679c0]=_0x18812f,ie=(_0x2a559a,_0x19cca4,_0x1b4246,_0x15cdc3)=>{for(var _0x20e72a=_0x15cdc3>0x1?void 0x0:_0x15cdc3?oe(_0x19cca4,_0x1b4246):_0x19cca4,_0x5cbdfc=_0x2a559a['length']-0x1,_0x236936;_0x5cbdfc>=0x0;_0x5cbdfc--)(_0x236936=_0x2a559a[_0x5cbdfc])&&(_0x20e72a=_0x236936(_0x20e72a)||_0x20e72a);return _0x20e72a;},N=(_0x263002,_0xb282c8)=>(_0x27df8d,_0x31f602)=>_0xb282c8(_0x27df8d,_0x31f602,_0x263002),$=(_0x3ac0d8,_0x455cb7,_0x1e1614)=>ne(_0x3ac0d8,typeof _0x455cb7!=_0x3d4b15(0xc2)?_0x455cb7+'':_0x455cb7,_0x1e1614);let g=class extends _0x1846da{constructor(_0x429fa6=O,_0x102a4b,_0x386f05){const _0x574785=_0x3d4b15;super(),this['_config']=_0x429fa6,this['_injector']=_0x102a4b,this[_0x574785(0xd2)]=_0x386f05;const {..._0x1b049d}=_0x5d93fc({},O,this[_0x574785(0x7a)]);this[_0x574785(0xd2)][_0x574785(0xb2)](z,_0x1b049d);}[_0x3d4b15(0x89)](){const _0x1012c6=_0x3d4b15;[[S],[f],[_]][_0x1012c6(0xab)](_0x2fa754=>{const _0x186386=_0x1012c6;this[_0x186386(0xd3)]['add'](_0x2fa754);});}[_0x3d4b15(0xd8)](){const _0xd10b=_0x3d4b15;this[_0xd10b(0xd3)][_0xd10b(0x83)](f),this['_injector'][_0xd10b(0x83)](_);}};$(g,_0x3d4b15(0xad),W),$(g,_0x3d4b15(0x77),_0x19d629['UNIVER_UNKNOWN']),g=ie([_0x1e9873(_0x9000b7,_0x4de362,_0xd07243),N(0x1,_0x301881(_0x121d33)),N(0x2,_0x3a3a63)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x486ffb=_0x2815;(function(_0x4563c7,_0x1cca7b){const _0x31ac7c=_0x2815,_0x5c6bb5=_0x4563c7();while(!![]){try{const _0x10b8f5=parseInt(_0x31ac7c(0x18f))/0x1*(-parseInt(_0x31ac7c(0x19b))/0x2)+parseInt(_0x31ac7c(0x1b8))/0x3*(parseInt(_0x31ac7c(0x1bf))/0x4)+-parseInt(_0x31ac7c(0x1a8))/0x5*(-parseInt(_0x31ac7c(0x1b7))/0x6)+parseInt(_0x31ac7c(0x180))/0x7*(parseInt(_0x31ac7c(0x1aa))/0x8)+parseInt(_0x31ac7c(0x1b2))/0x9*(parseInt(_0x31ac7c(0x19f))/0xa)+-parseInt(_0x31ac7c(0x18d))/0xb*(parseInt(_0x31ac7c(0x1d1))/0xc)+parseInt(_0x31ac7c(0x1cb))/0xd*(parseInt(_0x31ac7c(0x1ac))/0xe);if(_0x10b8f5===_0x1cca7b)break;else _0x5c6bb5['push'](_0x5c6bb5['shift']());}catch(_0x5ad90f){_0x5c6bb5['push'](_0x5c6bb5['shift']());}}}(_0x3e06,0x3932c));import{CommentService as _0x1e5874,CollaborationSessionService as _0xd17a1d,UniverCollaborationClientPlugin as _0x1998af}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2035}from'@univerjs-pro/license';import{dayjs as _0x15742b,UserManagerService as _0x3aacc4,Inject as _0x482f93,Injector as _0x4b0e42,Disposable as _0x2ad136,CustomRangeType as _0x3c700b,UniverInstanceType as _0x36f100,DependentOn as _0x2af10a,IConfigService as _0x4e5e6a,Plugin as _0x848ee9,merge as _0x558285}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x53556b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x18fd51,IThreadCommentDataSourceService as _0x24134a}from'@univerjs/thread-comment';import{bufferTime as _0x1355f9}from'rxjs';import{HTTPService as _0x3392dc}from'@univerjs/network';const W=_0x486ffb(0x1c7);function _0x2815(_0x51144a,_0x54781d){const _0x3e0637=_0x3e06();return _0x2815=function(_0x281582,_0x472afc){_0x281582=_0x281582-0x16f;let _0x2eeab9=_0x3e0637[_0x281582];return _0x2eeab9;},_0x2815(_0x51144a,_0x54781d);}var I=(_0x397f43=>(_0x397f43[_0x397f43[_0x486ffb(0x194)]=0x0]=_0x486ffb(0x194),_0x397f43[_0x397f43[_0x486ffb(0x178)]=0x1]=_0x486ffb(0x178),_0x397f43[_0x397f43[_0x486ffb(0x1c3)]=-0x1]='UNRECOGNIZED',_0x397f43))(I||{}),v=(_0x503d37=>(_0x503d37[_0x503d37[_0x486ffb(0x1ba)]=0x0]=_0x486ffb(0x1ba),_0x503d37[_0x503d37[_0x486ffb(0x17e)]=0x1]=_0x486ffb(0x17e),_0x503d37[_0x503d37[_0x486ffb(0x1ca)]=0x2]=_0x486ffb(0x1ca),_0x503d37[_0x503d37[_0x486ffb(0x196)]=0x3]='Edit',_0x503d37[_0x503d37[_0x486ffb(0x1bc)]=0x4]=_0x486ffb(0x1bc),_0x503d37[_0x503d37[_0x486ffb(0x175)]=0x5]=_0x486ffb(0x175),_0x503d37[_0x503d37['UNRECOGNIZED']=-0x1]=_0x486ffb(0x1c3),_0x503d37))(v||{});function _0x3e06(){const _0x2053ff=['_threadCommentDataSource','body','_initUserSync','parse','onStarting','solved','getOwnPropertyDescriptor','Solve','resolveComment','/list','Solved','ref','getUser','deleteComment','UNIVER_UNKNOWN','/universer-api/user/list','Add','/reply','833wUQXPZ','length','replies','defineProperty','symbol','getMemberID','/universer-api/comment/unit/','COMMENT','user','userID','comments','map','syncUpdateMutationToColla','11HcNZED','get','107DZOKlO','format','_threadCommentDataSourceService','updateComment','threadId','OpenOrReOpen','root','Edit','resolved','type','replyId','subscribe','5030rHHLeU','comment','setConfig','/solved','10kjZAIz','rangeId','YYYY/MM/DD\x20HH:mm','userId','getUnit','_httpService','saveCommentToSnapshot','requireSession','_userService','45ANntfT','add','9784FgpnPM','stringify','1619492mkSpxR','disposeWithMe','customRanges','getCurrentUser','users','values','2010465ZnHsLK','code','/edit','pipe','unitId','70410gQaezg','1047BkDoVc','_injector','Unknown','createTimestamp','Delete','_threadCommentModel','personId','172YNmQjd','filter','_initDataSource','content','UNRECOGNIZED','rangeType','onReady','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','_configService','Reply','13AIYDeC','size','addComment','parentId','error','find','1221996AzIKef','forEach','getComment','pluginName','_commentService','_sessionService'];_0x3e06=function(){return _0x2053ff;};return _0x3e06();}const y=_0x5ced77=>_0x15742b(new Date(+_0x5ced77))[_0x486ffb(0x190)](_0x486ffb(0x1a1)),B=async(_0x1a700b,_0x450d82)=>{const _0x37aab1=_0x486ffb,_0xb6fcd4=_0x1a700b[_0x37aab1(0x18e)](_0x3aacc4),_0x4eaebd=_0x1a700b[_0x37aab1(0x18e)](_0x3392dc);_0x450d82['forEach'](_0x24dbac=>{const _0x3ef48e=_0x37aab1;_0xb6fcd4[_0x3ef48e(0x17a)](_0x24dbac)&&_0x450d82['delete'](_0x24dbac);}),_0x450d82[_0x37aab1(0x1cc)]&&(await _0x4eaebd['get'](_0x37aab1(0x17d),{'params':{'userIDs':[..._0x450d82]}}))['body'][_0x37aab1(0x1b0)]['forEach'](_0x9ec2eb=>{const _0x51ba2b=_0x37aab1;_0x9ec2eb&&_0xb6fcd4[_0x51ba2b(0x1c6)](_0x9ec2eb);});};var K=Object[_0x486ffb(0x174)],V=(_0x132b1f,_0x15bb25,_0x4aa2f2,_0x15912b)=>{const _0x2fd9a2=_0x486ffb;for(var _0x879095=_0x15912b>0x1?void 0x0:_0x15912b?K(_0x15bb25,_0x4aa2f2):_0x15bb25,_0x75028e=_0x132b1f[_0x2fd9a2(0x181)]-0x1,_0x1c227f;_0x75028e>=0x0;_0x75028e--)(_0x1c227f=_0x132b1f[_0x75028e])&&(_0x879095=_0x1c227f(_0x879095)||_0x879095);return _0x879095;},p=(_0x549ebb,_0x3cd74e)=>(_0x419c0f,_0x469dd6)=>_0x3cd74e(_0x419c0f,_0x469dd6,_0x549ebb);let _=class extends _0x2ad136{constructor(_0x305e2b,_0x2792ef,_0x3a0d6d,_0x55ffb2){const _0x2c0895=_0x486ffb;super(),this[_0x2c0895(0x1d5)]=_0x305e2b,this['_threadCommentModel']=_0x2792ef,this[_0x2c0895(0x1a7)]=_0x3a0d6d,this[_0x2c0895(0x1b9)]=_0x55ffb2,this['_init'](),this[_0x2c0895(0x170)]();}[_0x486ffb(0x170)](){const _0x1077ca=_0x486ffb;this[_0x1077ca(0x1ad)](this[_0x1077ca(0x1bd)]['commentUpdate$'][_0x1077ca(0x1b5)](_0x1355f9(0x10))['subscribe'](_0x2151ff=>{const _0x458774=_0x1077ca,_0x4389d8=new Set();_0x2151ff[_0x458774(0x1d2)](_0x44f906=>{const _0x12e811=_0x458774;switch(_0x44f906[_0x12e811(0x198)]){case _0x12e811(0x1a9):{const _0x38e751=_0x44f906['payload'][_0x12e811(0x1be)];_0x4389d8[_0x12e811(0x1a9)](_0x38e751);break;}}}),B(this[_0x458774(0x1b9)],_0x4389d8);}));}['_init'](){const _0x1bdf27=_0x486ffb;this[_0x1bdf27(0x1ad)](this[_0x1bdf27(0x1d5)]['commentUpdate$'][_0x1bdf27(0x19a)](async _0x823661=>{const _0x2c50e3=_0x1bdf27;var _0x4ff4ee,_0x2a8c4c,_0x50823e,_0x58b5ed;const _0x2c74b6=(_0x4ff4ee=this['_threadCommentModel'][_0x2c50e3(0x1a3)](_0x823661[_0x2c50e3(0x1b6)])[_0x2c50e3(0x1d0)](_0x94ff37=>_0x94ff37['threadId']===_0x823661[_0x2c50e3(0x193)]))==null?void 0x0:_0x4ff4ee[_0x2c50e3(0x195)];if(!_0x2c74b6)return;const {unitId:_0x1f1c30,subUnitId:_0xa77f18}=_0x2c74b6;switch(_0x823661['user']&&this[_0x2c50e3(0x1a7)][_0x2c50e3(0x1c6)](_0x823661[_0x2c50e3(0x188)]),_0x823661[_0x2c50e3(0x198)]){case v['Add']:break;case v['Reply']:{this[_0x2c50e3(0x1bd)]['addComment'](_0x1f1c30,_0xa77f18,{'unitId':_0x1f1c30,'subUnitId':_0xa77f18,'ref':'','id':_0x823661[_0x2c50e3(0x199)],'dT':y(+_0x823661[_0x2c50e3(0x1bb)]),'threadId':_0x823661['threadId'],'personId':(_0x50823e=(_0x2a8c4c=_0x823661[_0x2c50e3(0x188)])==null?void 0x0:_0x2a8c4c[_0x2c50e3(0x189)])!=null?_0x50823e:_0x823661[_0x2c50e3(0x1a2)],'text':JSON[_0x2c50e3(0x171)](_0x823661['content']),'parentId':_0x2c74b6['id']});break;}case v[_0x2c50e3(0x1bc)]:{const _0x4dc3c5=this['_threadCommentModel'][_0x2c50e3(0x1d3)](_0x1f1c30,_0xa77f18,_0x823661[_0x2c50e3(0x199)]);_0x4dc3c5&&_0x4dc3c5[_0x2c50e3(0x1ce)]&&this[_0x2c50e3(0x1bd)][_0x2c50e3(0x17b)](_0x1f1c30,_0xa77f18,_0x823661[_0x2c50e3(0x199)]);break;}case v[_0x2c50e3(0x196)]:{this[_0x2c50e3(0x1bd)][_0x2c50e3(0x192)](_0x1f1c30,_0xa77f18,{'commentId':_0x823661[_0x2c50e3(0x199)],'text':JSON[_0x2c50e3(0x171)](_0x823661[_0x2c50e3(0x1c2)])});break;}case v[_0x2c50e3(0x175)]:{const _0xf3abac=(_0x58b5ed=this[_0x2c50e3(0x1bd)]['getUnit'](_0x823661['unitId'])['find'](_0x4daa19=>_0x4daa19['threadId']===_0x823661[_0x2c50e3(0x193)]))==null?void 0x0:_0x58b5ed[_0x2c50e3(0x195)];_0xf3abac&&this[_0x2c50e3(0x1bd)][_0x2c50e3(0x176)](_0x1f1c30,_0xa77f18,_0xf3abac['id'],_0x823661[_0x2c50e3(0x173)]===I[_0x2c50e3(0x178)]);break;}}}));}};_=V([p(0x0,_0x482f93(_0x1e5874)),p(0x1,_0x482f93(_0x18fd51)),p(0x2,_0x482f93(_0x3aacc4)),p(0x3,_0x482f93(_0x4b0e42))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x18cbb2,_0x8d0e85,_0xf9a8bb,_0x2e4fb0)=>{const _0x4f4034=_0x486ffb;for(var _0x193e65=_0x2e4fb0>0x1?void 0x0:_0x2e4fb0?k(_0x8d0e85,_0xf9a8bb):_0x8d0e85,_0x54696e=_0x18cbb2[_0x4f4034(0x181)]-0x1,_0x272866;_0x54696e>=0x0;_0x54696e--)(_0x272866=_0x18cbb2[_0x54696e])&&(_0x193e65=_0x272866(_0x193e65)||_0x193e65);return _0x193e65;},b=(_0x5b9a61,_0xcefecf)=>(_0x5a70f0,_0x48e822)=>_0xcefecf(_0x5a70f0,_0x48e822,_0x5b9a61);function X(_0xddea89,_0x206ec3){const _0x159940=_0x486ffb,_0x56efac=_0xddea89['replies'][0x0];return{..._0x206ec3,'id':_0x56efac[_0x159940(0x199)],'resolved':_0xddea89['solved']===0x1,'dT':y(_0x56efac[_0x159940(0x1bb)]),'personId':_0x56efac[_0x159940(0x1a2)],'threadId':_0x56efac['threadId']};}function ee(_0x33e2fd,_0x383d2e,_0x325be7){const _0x16e2c1=_0x486ffb;var _0xeca0ce,_0x39ad5a;if(((_0x39ad5a=(_0xeca0ce=_0x33e2fd==null?void 0x0:_0x33e2fd[_0x16e2c1(0x182)])==null?void 0x0:_0xeca0ce[_0x16e2c1(0x181)])!=null?_0x39ad5a:0x0)>0x0){const _0x4ea8c2=(_0x2f725a,_0x31b7e6)=>({'id':_0x2f725a[_0x16e2c1(0x199)],'threadId':_0x2f725a[_0x16e2c1(0x193)],'dT':y(_0x2f725a[_0x16e2c1(0x1bb)]),'personId':_0x2f725a[_0x16e2c1(0x1a2)],'resolved':_0x33e2fd[_0x16e2c1(0x173)]===I[_0x16e2c1(0x178)],'unitId':_0x383d2e,'subUnitId':_0x325be7,'text':JSON['parse'](_0x2f725a[_0x16e2c1(0x1c2)]),'parentId':_0x31b7e6}),_0x345988=_0x4ea8c2(_0x33e2fd[_0x16e2c1(0x182)][0x0]);return{..._0x345988,'children':_0x33e2fd[_0x16e2c1(0x182)]['slice'](0x1)[_0x16e2c1(0x18b)](_0x3b9ef7=>_0x4ea8c2(_0x3b9ef7,_0x345988['id']))};}return null;}let S=class{constructor(_0x366091,_0x2a5b7d,_0x12d3c1){const _0x10655c=_0x486ffb;this[_0x10655c(0x1a4)]=_0x366091,this[_0x10655c(0x1a7)]=_0x2a5b7d,this[_0x10655c(0x1d6)]=_0x12d3c1;}async[_0x486ffb(0x1cd)](_0x249887){const _0x215b63=_0x486ffb;var _0x10abd7,_0xbdb248;const {parentId:_0x32f1c1,unitId:_0x54fbc0,text:_0x1e7943,threadId:_0x4f481f}=_0x249887,_0x244263=(_0xbdb248=(_0x10abd7=_0x1e7943[_0x215b63(0x1ae)])==null?void 0x0:_0x10abd7[_0x215b63(0x1c0)](_0x3c44ff=>_0x3c44ff[_0x215b63(0x1c4)]===_0x3c700b[_0x215b63(0x187)])[_0x215b63(0x18b)](_0x53cf83=>_0x53cf83[_0x215b63(0x1a0)]))!=null?_0xbdb248:[],_0x2a0d22=JSON['stringify'](_0x1e7943),_0x4715d4=(await this[_0x215b63(0x1d6)][_0x215b63(0x1a6)](_0x54fbc0))['getMemberID']();if(_0x32f1c1){const _0x1c44f7={'memberId':_0x4715d4,'unitId':_0x54fbc0,'content':_0x2a0d22,'mention':_0x244263,'threadId':_0x4f481f},_0x1f939b=(await this[_0x215b63(0x1a4)]['post']('/universer-api/comment/unit/'+_0x54fbc0+_0x215b63(0x17f),{'body':_0x1c44f7}))[_0x215b63(0x16f)]['reply'];return{..._0x249887,'id':_0x1f939b['replyId'],'dT':_0x15742b(+_0x1f939b[_0x215b63(0x1bb)])[_0x215b63(0x190)](_0x215b63(0x1a1)),'personId':_0x1f939b[_0x215b63(0x1a2)]};}else{const _0x1d41f9={'memberId':_0x4715d4,'unitId':_0x54fbc0,'content':_0x2a0d22,'mention':_0x244263},_0x1ca483=await this['_httpService']['post'](_0x215b63(0x186)+_0x54fbc0+'/add',{'body':_0x1d41f9});return X(_0x1ca483[_0x215b63(0x16f)][_0x215b63(0x19c)],_0x249887);}}async[_0x486ffb(0x192)](_0x4be5db){const _0x5962f4=_0x486ffb;var _0x4a962b,_0x29e334;const {text:_0x149d9f,unitId:_0x3ec656}=_0x4be5db,_0x505b2d=(_0x29e334=(_0x4a962b=_0x149d9f[_0x5962f4(0x1ae)])==null?void 0x0:_0x4a962b[_0x5962f4(0x1c0)](_0x509995=>_0x509995[_0x5962f4(0x1c4)]===_0x3c700b[_0x5962f4(0x187)])[_0x5962f4(0x18b)](_0x5f43ce=>_0x5f43ce['rangeId']))!=null?_0x29e334:[],_0x148662=JSON[_0x5962f4(0x1ab)](_0x149d9f),_0x24fade=_0x4be5db[_0x5962f4(0x193)],_0x4d9bec=_0x4be5db['id'],_0x53d037={'memberId':(await this[_0x5962f4(0x1d6)][_0x5962f4(0x1a6)](_0x3ec656))[_0x5962f4(0x185)](),'unitId':_0x3ec656,'threadId':_0x24fade,'mention':_0x505b2d,'content':_0x148662,'replyId':_0x4d9bec},_0x5087f6=await this[_0x5962f4(0x1a4)][_0x5962f4(0x1c8)](_0x5962f4(0x186)+_0x3ec656+_0x5962f4(0x1b4),{'body':_0x53d037});return!_0x5087f6['body'][_0x5962f4(0x1cf)]||_0x5087f6[_0x5962f4(0x16f)]['error'][_0x5962f4(0x1b3)]===0x1;}async[_0x486ffb(0x176)](_0x4deb3c){const _0x1f5bf5=_0x486ffb,{unitId:_0x34b529}=_0x4deb3c,_0x5519a3=_0x4deb3c[_0x1f5bf5(0x193)],_0x56b828={'memberId':this[_0x1f5bf5(0x1a7)][_0x1f5bf5(0x1af)]()['userID'],'unitId':_0x34b529,'threadId':_0x5519a3,'solved':_0x4deb3c[_0x1f5bf5(0x197)]?I[_0x1f5bf5(0x178)]:I['OpenOrReOpen']},_0x2a3abf=await this[_0x1f5bf5(0x1a4)][_0x1f5bf5(0x1c8)](_0x1f5bf5(0x186)+_0x34b529+_0x1f5bf5(0x19e),{'body':_0x56b828});return!_0x2a3abf[_0x1f5bf5(0x16f)][_0x1f5bf5(0x1cf)]||_0x2a3abf[_0x1f5bf5(0x16f)][_0x1f5bf5(0x1cf)][_0x1f5bf5(0x1b3)]===0x1;}async[_0x486ffb(0x17b)](_0x33b385,_0x2d4477,_0x5277dd,_0x496503){const _0x5d6144=_0x486ffb,_0x36eda9={'memberId':(await this[_0x5d6144(0x1d6)]['requireSession'](_0x33b385))['getMemberID'](),'threadId':_0x5277dd,'replyId':_0x496503,'unitId':_0x33b385},_0x5a2d44=await this[_0x5d6144(0x1a4)]['post'](_0x5d6144(0x186)+_0x33b385+'/delete',{'body':_0x36eda9});return!_0x5a2d44[_0x5d6144(0x16f)]['error']||_0x5a2d44[_0x5d6144(0x16f)][_0x5d6144(0x1cf)][_0x5d6144(0x1b3)]===0x1;}async['listComments'](_0x3aa5dc,_0x2ebc15,_0x321d00){const _0x30bae3=_0x486ffb,_0x210336={'unitId':_0x3aa5dc,'threadId':_0x321d00},_0x4f598f=await this[_0x30bae3(0x1a4)][_0x30bae3(0x1c8)](_0x30bae3(0x186)+_0x3aa5dc+_0x30bae3(0x177),{'body':_0x210336}),_0x45be17=_0x321d00[_0x30bae3(0x18b)](_0x5cd6ff=>ee(_0x4f598f[_0x30bae3(0x16f)][_0x30bae3(0x18a)][_0x5cd6ff],_0x3aa5dc,_0x2ebc15))['filter'](Boolean);return Object[_0x30bae3(0x1b1)](_0x4f598f['body'][_0x30bae3(0x1b0)])[_0x30bae3(0x1d2)](_0x464403=>{const _0x18c33f=_0x30bae3;this['_userService'][_0x18c33f(0x1c6)](_0x464403);}),_0x45be17;}[_0x486ffb(0x1a5)](_0x382e76){const _0x11c7a4=_0x486ffb;return{'id':_0x382e76['id'],'threadId':_0x382e76[_0x11c7a4(0x193)],'ref':_0x382e76[_0x11c7a4(0x179)]};}};S=Q([b(0x0,_0x482f93(_0x3392dc)),b(0x1,_0x482f93(_0x3aacc4)),b(0x2,_0x482f93(_0xd17a1d))],S);var re=Object[_0x486ffb(0x174)],te=(_0x55ccb9,_0x566512,_0x2d7d11,_0x504518)=>{const _0x1356e8=_0x486ffb;for(var _0x5e3734=_0x504518>0x1?void 0x0:_0x504518?re(_0x566512,_0x2d7d11):_0x566512,_0xad20fd=_0x55ccb9[_0x1356e8(0x181)]-0x1,_0x5e7b4e;_0xad20fd>=0x0;_0xad20fd--)(_0x5e7b4e=_0x55ccb9[_0xad20fd])&&(_0x5e3734=_0x5e7b4e(_0x5e3734)||_0x5e3734);return _0x5e3734;},M=(_0x593d09,_0x92e988)=>(_0x34f8b6,_0x34bef8)=>_0x92e988(_0x34f8b6,_0x34bef8,_0x593d09);let f=class extends _0x2ad136{constructor(_0x36325c,_0x499851){const _0x85d66f=_0x486ffb;super(),this[_0x85d66f(0x191)]=_0x36325c,this[_0x85d66f(0x1d7)]=_0x499851,this['_initDataSource']();}[_0x486ffb(0x1c1)](){const _0x4a78ca=_0x486ffb;this[_0x4a78ca(0x191)]['dataSource']=this[_0x4a78ca(0x1d7)],this[_0x4a78ca(0x191)][_0x4a78ca(0x18c)]=!0x1;}};f=te([M(0x0,_0x24134a),M(0x1,_0x482f93(S))],f);var se=Object[_0x486ffb(0x183)],oe=Object[_0x486ffb(0x174)],ne=(_0x43e484,_0x554af3,_0x4da8d5)=>_0x554af3 in _0x43e484?se(_0x43e484,_0x554af3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4da8d5}):_0x43e484[_0x554af3]=_0x4da8d5,ie=(_0x29004e,_0x459384,_0x2d8c3b,_0x1450dd)=>{const _0x55379c=_0x486ffb;for(var _0x42a8d9=_0x1450dd>0x1?void 0x0:_0x1450dd?oe(_0x459384,_0x2d8c3b):_0x459384,_0x1226c3=_0x29004e[_0x55379c(0x181)]-0x1,_0x46e74d;_0x1226c3>=0x0;_0x1226c3--)(_0x46e74d=_0x29004e[_0x1226c3])&&(_0x42a8d9=_0x46e74d(_0x42a8d9)||_0x42a8d9);return _0x42a8d9;},N=(_0x587b0f,_0x491874)=>(_0x14a516,_0x46f24b)=>_0x491874(_0x14a516,_0x46f24b,_0x587b0f),$=(_0x2d702b,_0xa1fd09,_0x476d54)=>ne(_0x2d702b,typeof _0xa1fd09!=_0x486ffb(0x184)?_0xa1fd09+'':_0xa1fd09,_0x476d54);let g=class extends _0x848ee9{constructor(_0xfebba2=O,_0x154565,_0x879283){const _0x35d77e=_0x486ffb;super(),this['_config']=_0xfebba2,this[_0x35d77e(0x1b9)]=_0x154565,this[_0x35d77e(0x1c9)]=_0x879283;const {..._0x3c20be}=_0x558285({},O,this['_config']);this[_0x35d77e(0x1c9)][_0x35d77e(0x19d)](z,_0x3c20be);}[_0x486ffb(0x172)](){const _0x1b6491=_0x486ffb;[[S],[f],[_]][_0x1b6491(0x1d2)](_0x598de5=>{const _0x2b010f=_0x1b6491;this[_0x2b010f(0x1b9)][_0x2b010f(0x1a9)](_0x598de5);});}[_0x486ffb(0x1c5)](){const _0x497ff2=_0x486ffb;this[_0x497ff2(0x1b9)][_0x497ff2(0x18e)](f),this[_0x497ff2(0x1b9)][_0x497ff2(0x18e)](_);}};$(g,_0x486ffb(0x1d4),W),$(g,'type',_0x36f100[_0x486ffb(0x17c)]),g=ie([_0x2af10a(_0x53556b,_0x1998af,_0x2b2035),N(0x1,_0x482f93(_0x4b0e42)),N(0x2,_0x4e5e6a)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x29ac59,_0x1f0af9){const _0x522a06=_0xf4cc,_0x3dee3d=_0x29ac59();while(!![]){try{const _0x2c0bc0=parseInt(_0x522a06(0x89))/0x1+-parseInt(_0x522a06(0xc5))/0x2*(-parseInt(_0x522a06(0xac))/0x3)+-parseInt(_0x522a06(0x84))/0x4+-parseInt(_0x522a06(0xae))/0x5+-parseInt(_0x522a06(0xaf))/0x6*(parseInt(_0x522a06(0x75))/0x7)+-parseInt(_0x522a06(0x92))/0x8*(parseInt(_0x522a06(0xe4))/0x9)+parseInt(_0x522a06(0x91))/0xa;if(_0x2c0bc0===_0x1f0af9)break;else _0x3dee3d['push'](_0x3dee3d['shift']());}catch(_0x3c7003){_0x3dee3d['push'](_0x3dee3d['shift']());}}}(_0x4bd8,0xb7622),function(_0x363c85,_0x2fca43){const _0x1bf32d=_0xf4cc;typeof exports=='object'&&typeof module<'u'?_0x2fca43(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1bf32d(0x7d)&&define[_0x1bf32d(0xc6)]?define([_0x1bf32d(0xd1),_0x1bf32d(0xb4),_0x1bf32d(0xc0),_0x1bf32d(0x6b),'@univerjs/thread-comment-ui',_0x1bf32d(0xa3),'rxjs',_0x1bf32d(0x7b)],_0x2fca43):(_0x363c85=typeof globalThis<'u'?globalThis:_0x363c85||self,_0x2fca43(_0x363c85[_0x1bf32d(0x9d)]={},_0x363c85[_0x1bf32d(0x8a)],_0x363c85['UniverProLicense'],_0x363c85[_0x1bf32d(0xc2)],_0x363c85[_0x1bf32d(0xd4)],_0x363c85['UniverThreadComment'],_0x363c85[_0x1bf32d(0xb7)],_0x363c85[_0x1bf32d(0xee)]));}(this,function(_0x255510,_0x5beb16,_0x20aa55,_0x5c2b51,_0x47412d,_0x5cdcf0,_0x38310e,_0x641e5f){'use strict';const _0x47a928=_0xf4cc;const _0x14b483=_0x47a928(0xa7);var _0x2b2b95=(_0x57bfa3=>(_0x57bfa3[_0x57bfa3[_0x47a928(0x6d)]=0x0]=_0x47a928(0x6d),_0x57bfa3[_0x57bfa3[_0x47a928(0x9e)]=0x1]=_0x47a928(0x9e),_0x57bfa3[_0x57bfa3[_0x47a928(0xbb)]=-0x1]='UNRECOGNIZED',_0x57bfa3))(_0x2b2b95||{}),_0xe4fbd=(_0x2ef0b9=>(_0x2ef0b9[_0x2ef0b9[_0x47a928(0xdc)]=0x0]=_0x47a928(0xdc),_0x2ef0b9[_0x2ef0b9[_0x47a928(0x8b)]=0x1]=_0x47a928(0x8b),_0x2ef0b9[_0x2ef0b9[_0x47a928(0x69)]=0x2]=_0x47a928(0x69),_0x2ef0b9[_0x2ef0b9[_0x47a928(0xdb)]=0x3]=_0x47a928(0xdb),_0x2ef0b9[_0x2ef0b9[_0x47a928(0x7c)]=0x4]='Delete',_0x2ef0b9[_0x2ef0b9[_0x47a928(0xc1)]=0x5]=_0x47a928(0xc1),_0x2ef0b9[_0x2ef0b9[_0x47a928(0xbb)]=-0x1]=_0x47a928(0xbb),_0x2ef0b9))(_0xe4fbd||{});const _0x49b0b0=_0x57f168=>_0x5c2b51['dayjs'](new Date(+_0x57f168))[_0x47a928(0x8c)](_0x47a928(0xb6)),_0x1a36c1=async(_0x5d23d7,_0x1db48d)=>{const _0x19f30f=_0x47a928,_0x1aee71=_0x5d23d7[_0x19f30f(0x90)](_0x5c2b51['UserManagerService']),_0x85c2fc=_0x5d23d7[_0x19f30f(0x90)](_0x641e5f[_0x19f30f(0xca)]);_0x1db48d[_0x19f30f(0x74)](_0x3f2e9a=>{const _0x44ffdb=_0x19f30f;_0x1aee71['getUser'](_0x3f2e9a)&&_0x1db48d[_0x44ffdb(0x8e)](_0x3f2e9a);}),_0x1db48d[_0x19f30f(0x70)]&&(await _0x85c2fc['get'](_0x19f30f(0xd9),{'params':{'userIDs':[..._0x1db48d]}}))[_0x19f30f(0xe9)][_0x19f30f(0x8f)]['forEach'](_0x568dbf=>{const _0x5f9e0e=_0x19f30f;_0x568dbf&&_0x1aee71[_0x5f9e0e(0xcb)](_0x568dbf);});};var _0x313756=Object[_0x47a928(0xe7)],_0x5e041e=(_0x9bc280,_0x2fb63e,_0x468bd9,_0x182e5a)=>{const _0x4ae5a4=_0x47a928;for(var _0x69b79a=_0x182e5a>0x1?void 0x0:_0x182e5a?_0x313756(_0x2fb63e,_0x468bd9):_0x2fb63e,_0x22a5ab=_0x9bc280[_0x4ae5a4(0xab)]-0x1,_0xf40b6c;_0x22a5ab>=0x0;_0x22a5ab--)(_0xf40b6c=_0x9bc280[_0x22a5ab])&&(_0x69b79a=_0xf40b6c(_0x69b79a)||_0x69b79a);return _0x69b79a;},_0x262dd3=(_0x4854b0,_0x2acf1b)=>(_0x2df1b4,_0x599d8d)=>_0x2acf1b(_0x2df1b4,_0x599d8d,_0x4854b0);let _0x1efd36=class extends _0x5c2b51[_0x47a928(0xef)]{constructor(_0x54f02d,_0x57a6e9,_0x11c7f4,_0x48f05d){const _0x2e95b6=_0x47a928;super(),this['_commentService']=_0x54f02d,this['_threadCommentModel']=_0x57a6e9,this['_userService']=_0x11c7f4,this[_0x2e95b6(0xd6)]=_0x48f05d,this[_0x2e95b6(0xbd)](),this['_initUserSync']();}['_initUserSync'](){const _0x4bd916=_0x47a928;this[_0x4bd916(0xce)](this[_0x4bd916(0x99)][_0x4bd916(0xc8)][_0x4bd916(0x87)](_0x38310e[_0x4bd916(0x7e)](0x10))['subscribe'](_0x1aea82=>{const _0x545117=_0x4bd916,_0x389f5f=new Set();_0x1aea82[_0x545117(0x74)](_0x3645c6=>{const _0x4d855a=_0x545117;switch(_0x3645c6['type']){case _0x4d855a(0x9b):{const _0x473aed=_0x3645c6[_0x4d855a(0xd2)][_0x4d855a(0x72)];_0x389f5f[_0x4d855a(0x9b)](_0x473aed);break;}}}),_0x1a36c1(this['_injector'],_0x389f5f);}));}[_0x47a928(0xbd)](){const _0xec3ec6=_0x47a928;this[_0xec3ec6(0xce)](this[_0xec3ec6(0xeb)][_0xec3ec6(0xc8)]['subscribe'](async _0x104420=>{const _0x3fbe30=_0xec3ec6;var _0x6c47ee,_0x48f28b,_0x4bb896,_0x5bf890;const _0x12e5ca=(_0x6c47ee=this[_0x3fbe30(0x99)]['getUnit'](_0x104420[_0x3fbe30(0x6c)])[_0x3fbe30(0xd8)](_0xf33c55=>_0xf33c55['threadId']===_0x104420['threadId']))==null?void 0x0:_0x6c47ee['root'];if(!_0x12e5ca)return;const {unitId:_0x2ef2fa,subUnitId:_0x46464c}=_0x12e5ca;switch(_0x104420[_0x3fbe30(0x85)]&&this[_0x3fbe30(0x77)][_0x3fbe30(0xcb)](_0x104420[_0x3fbe30(0x85)]),_0x104420['type']){case _0xe4fbd[_0x3fbe30(0x8b)]:break;case _0xe4fbd['Reply']:{this[_0x3fbe30(0x99)][_0x3fbe30(0x79)](_0x2ef2fa,_0x46464c,{'unitId':_0x2ef2fa,'subUnitId':_0x46464c,'ref':'','id':_0x104420[_0x3fbe30(0xe0)],'dT':_0x49b0b0(+_0x104420[_0x3fbe30(0xbe)]),'threadId':_0x104420[_0x3fbe30(0xde)],'personId':(_0x4bb896=(_0x48f28b=_0x104420[_0x3fbe30(0x85)])==null?void 0x0:_0x48f28b[_0x3fbe30(0x86)])!=null?_0x4bb896:_0x104420[_0x3fbe30(0x6a)],'text':JSON[_0x3fbe30(0x6e)](_0x104420[_0x3fbe30(0xea)]),'parentId':_0x12e5ca['id']});break;}case _0xe4fbd['Delete']:{const _0x2571f4=this[_0x3fbe30(0x99)][_0x3fbe30(0xcc)](_0x2ef2fa,_0x46464c,_0x104420[_0x3fbe30(0xe0)]);_0x2571f4&&_0x2571f4[_0x3fbe30(0xd7)]&&this[_0x3fbe30(0x99)][_0x3fbe30(0xa4)](_0x2ef2fa,_0x46464c,_0x104420[_0x3fbe30(0xe0)]);break;}case _0xe4fbd['Edit']:{this[_0x3fbe30(0x99)][_0x3fbe30(0xba)](_0x2ef2fa,_0x46464c,{'commentId':_0x104420[_0x3fbe30(0xe0)],'text':JSON['parse'](_0x104420[_0x3fbe30(0xea)])});break;}case _0xe4fbd[_0x3fbe30(0xc1)]:{const _0x479deb=(_0x5bf890=this[_0x3fbe30(0x99)][_0x3fbe30(0x9a)](_0x104420['unitId'])[_0x3fbe30(0xd8)](_0xb9be0e=>_0xb9be0e['threadId']===_0x104420[_0x3fbe30(0xde)]))==null?void 0x0:_0x5bf890['root'];_0x479deb&&this[_0x3fbe30(0x99)][_0x3fbe30(0xbf)](_0x2ef2fa,_0x46464c,_0x479deb['id'],_0x104420['solved']===_0x2b2b95['Solved']);break;}}}));}};_0x1efd36=_0x5e041e([_0x262dd3(0x0,_0x5c2b51[_0x47a928(0xb2)](_0x5beb16[_0x47a928(0xa1)])),_0x262dd3(0x1,_0x5c2b51['Inject'](_0x5cdcf0[_0x47a928(0xd0)])),_0x262dd3(0x2,_0x5c2b51['Inject'](_0x5c2b51['UserManagerService'])),_0x262dd3(0x3,_0x5c2b51[_0x47a928(0xb2)](_0x5c2b51[_0x47a928(0xf1)]))],_0x1efd36);const _0x42b33f=_0x47a928(0xe1),_0x41a568={};var _0x416f90=Object[_0x47a928(0xe7)],_0x288735=(_0x1ba603,_0x183786,_0x23d409,_0xf593b9)=>{const _0x14509e=_0x47a928;for(var _0x144f7b=_0xf593b9>0x1?void 0x0:_0xf593b9?_0x416f90(_0x183786,_0x23d409):_0x183786,_0x45c729=_0x1ba603[_0x14509e(0xab)]-0x1,_0x58dde9;_0x45c729>=0x0;_0x45c729--)(_0x58dde9=_0x1ba603[_0x45c729])&&(_0x144f7b=_0x58dde9(_0x144f7b)||_0x144f7b);return _0x144f7b;},_0x257946=(_0x5e70aa,_0x56c774)=>(_0x49eb0f,_0x2d89cc)=>_0x56c774(_0x49eb0f,_0x2d89cc,_0x5e70aa);function _0xcb6c07(_0xc2c50d,_0x5095eb){const _0x549e97=_0x47a928,_0x1a0d4b=_0xc2c50d[_0x549e97(0x68)][0x0];return{..._0x5095eb,'id':_0x1a0d4b[_0x549e97(0xe0)],'resolved':_0xc2c50d[_0x549e97(0x95)]===0x1,'dT':_0x49b0b0(_0x1a0d4b[_0x549e97(0xbe)]),'personId':_0x1a0d4b[_0x549e97(0x6a)],'threadId':_0x1a0d4b[_0x549e97(0xde)]};}function _0x3b1887(_0x584c6f,_0x5367f8,_0x4aae6f){const _0x17e185=_0x47a928;var _0x507f1e,_0xc133ad;if(((_0xc133ad=(_0x507f1e=_0x584c6f==null?void 0x0:_0x584c6f[_0x17e185(0x68)])==null?void 0x0:_0x507f1e[_0x17e185(0xab)])!=null?_0xc133ad:0x0)>0x0){const _0x48e443=(_0x2f46aa,_0x22f0a0)=>({'id':_0x2f46aa[_0x17e185(0xe0)],'threadId':_0x2f46aa[_0x17e185(0xde)],'dT':_0x49b0b0(_0x2f46aa['createTimestamp']),'personId':_0x2f46aa[_0x17e185(0x6a)],'resolved':_0x584c6f[_0x17e185(0x95)]===_0x2b2b95[_0x17e185(0x9e)],'unitId':_0x5367f8,'subUnitId':_0x4aae6f,'text':JSON[_0x17e185(0x6e)](_0x2f46aa[_0x17e185(0xea)]),'parentId':_0x22f0a0}),_0x3e3641=_0x48e443(_0x584c6f[_0x17e185(0x68)][0x0]);return{..._0x3e3641,'children':_0x584c6f['replies'][_0x17e185(0xcf)](0x1)[_0x17e185(0x76)](_0x25f7e5=>_0x48e443(_0x25f7e5,_0x3e3641['id']))};}return null;}let _0x13c2f7=class{constructor(_0x19d798,_0x46804d,_0x2af795){const _0xb756ca=_0x47a928;this[_0xb756ca(0xc9)]=_0x19d798,this[_0xb756ca(0x77)]=_0x46804d,this[_0xb756ca(0xb3)]=_0x2af795;}async['addComment'](_0x23cfb2){const _0x4d2c0c=_0x47a928;var _0x213b09,_0x12f28a;const {parentId:_0x172c4f,unitId:_0x1f3a5b,text:_0x2d8358,threadId:_0x518fe7}=_0x23cfb2,_0x5e29d4=(_0x12f28a=(_0x213b09=_0x2d8358[_0x4d2c0c(0xe2)])==null?void 0x0:_0x213b09['filter'](_0xf02cb6=>_0xf02cb6[_0x4d2c0c(0xa6)]===_0x5c2b51['CustomRangeType'][_0x4d2c0c(0xb1)])[_0x4d2c0c(0x76)](_0x145581=>_0x145581[_0x4d2c0c(0xc4)]))!=null?_0x12f28a:[],_0x1dac13=JSON[_0x4d2c0c(0xbc)](_0x2d8358),_0x374885=(await this[_0x4d2c0c(0xb3)][_0x4d2c0c(0x7a)](_0x1f3a5b))[_0x4d2c0c(0x9c)]();if(_0x172c4f){const _0x23f476={'memberId':_0x374885,'unitId':_0x1f3a5b,'content':_0x1dac13,'mention':_0x5e29d4,'threadId':_0x518fe7},_0x1def4f=(await this[_0x4d2c0c(0xc9)][_0x4d2c0c(0x83)](_0x4d2c0c(0xb9)+_0x1f3a5b+'/reply',{'body':_0x23f476}))['body'][_0x4d2c0c(0x96)];return{..._0x23cfb2,'id':_0x1def4f[_0x4d2c0c(0xe0)],'dT':_0x5c2b51[_0x4d2c0c(0xe8)](+_0x1def4f[_0x4d2c0c(0xbe)])[_0x4d2c0c(0x8c)](_0x4d2c0c(0xb6)),'personId':_0x1def4f[_0x4d2c0c(0x6a)]};}else{const _0x7bc535={'memberId':_0x374885,'unitId':_0x1f3a5b,'content':_0x1dac13,'mention':_0x5e29d4},_0x50d827=await this[_0x4d2c0c(0xc9)][_0x4d2c0c(0x83)](_0x4d2c0c(0xb9)+_0x1f3a5b+_0x4d2c0c(0xc7),{'body':_0x7bc535});return _0xcb6c07(_0x50d827['body'][_0x4d2c0c(0x94)],_0x23cfb2);}}async['updateComment'](_0x3bfe45){const _0xc6ab92=_0x47a928;var _0x504d75,_0x1c7c90;const {text:_0x180c29,unitId:_0x1a251c}=_0x3bfe45,_0x2c5522=(_0x1c7c90=(_0x504d75=_0x180c29[_0xc6ab92(0xe2)])==null?void 0x0:_0x504d75[_0xc6ab92(0xd3)](_0x3c4034=>_0x3c4034[_0xc6ab92(0xa6)]===_0x5c2b51[_0xc6ab92(0xb8)][_0xc6ab92(0xb1)])[_0xc6ab92(0x76)](_0x5d496c=>_0x5d496c['rangeId']))!=null?_0x1c7c90:[],_0x29eaba=JSON[_0xc6ab92(0xbc)](_0x180c29),_0x56f0b4=_0x3bfe45[_0xc6ab92(0xde)],_0x3907de=_0x3bfe45['id'],_0x4445d8={'memberId':(await this[_0xc6ab92(0xb3)]['requireSession'](_0x1a251c))[_0xc6ab92(0x9c)](),'unitId':_0x1a251c,'threadId':_0x56f0b4,'mention':_0x2c5522,'content':_0x29eaba,'replyId':_0x3907de},_0x47bd1a=await this[_0xc6ab92(0xc9)][_0xc6ab92(0x83)](_0xc6ab92(0xb9)+_0x1a251c+_0xc6ab92(0xe6),{'body':_0x4445d8});return!_0x47bd1a[_0xc6ab92(0xe9)][_0xc6ab92(0x6f)]||_0x47bd1a['body'][_0xc6ab92(0x6f)]['code']===0x1;}async[_0x47a928(0xbf)](_0x2f4b19){const _0x33d859=_0x47a928,{unitId:_0x2a45d0}=_0x2f4b19,_0x521f78=_0x2f4b19[_0x33d859(0xde)],_0x26a1ba={'memberId':this['_userService'][_0x33d859(0xcd)]()['userID'],'unitId':_0x2a45d0,'threadId':_0x521f78,'solved':_0x2f4b19[_0x33d859(0xe3)]?_0x2b2b95[_0x33d859(0x9e)]:_0x2b2b95[_0x33d859(0x6d)]},_0x65676=await this[_0x33d859(0xc9)][_0x33d859(0x83)](_0x33d859(0xb9)+_0x2a45d0+'/solved',{'body':_0x26a1ba});return!_0x65676['body']['error']||_0x65676['body'][_0x33d859(0x6f)][_0x33d859(0xa5)]===0x1;}async[_0x47a928(0xa4)](_0x2f93c3,_0x49d0e7,_0x41b25e,_0x295167){const _0x2f6ef5=_0x47a928,_0x4ade5a={'memberId':(await this[_0x2f6ef5(0xb3)][_0x2f6ef5(0x7a)](_0x2f93c3))[_0x2f6ef5(0x9c)](),'threadId':_0x41b25e,'replyId':_0x295167,'unitId':_0x2f93c3},_0xb7874a=await this[_0x2f6ef5(0xc9)]['post'](_0x2f6ef5(0xb9)+_0x2f93c3+_0x2f6ef5(0xdd),{'body':_0x4ade5a});return!_0xb7874a['body'][_0x2f6ef5(0x6f)]||_0xb7874a[_0x2f6ef5(0xe9)]['error'][_0x2f6ef5(0xa5)]===0x1;}async[_0x47a928(0x73)](_0x5dbec2,_0x1aa888,_0x66022e){const _0x1325ff=_0x47a928,_0x242a1e={'unitId':_0x5dbec2,'threadId':_0x66022e},_0x4ec07c=await this[_0x1325ff(0xc9)]['post'](_0x1325ff(0xb9)+_0x5dbec2+_0x1325ff(0xad),{'body':_0x242a1e}),_0x5662e6=_0x66022e[_0x1325ff(0x76)](_0x32ed07=>_0x3b1887(_0x4ec07c[_0x1325ff(0xe9)][_0x1325ff(0x97)][_0x32ed07],_0x5dbec2,_0x1aa888))[_0x1325ff(0xd3)](Boolean);return Object[_0x1325ff(0x82)](_0x4ec07c[_0x1325ff(0xe9)]['users'])['forEach'](_0x2e9fb5=>{const _0x1008ca=_0x1325ff;this[_0x1008ca(0x77)][_0x1008ca(0xcb)](_0x2e9fb5);}),_0x5662e6;}[_0x47a928(0x9f)](_0xb99d97){const _0x3334fc=_0x47a928;return{'id':_0xb99d97['id'],'threadId':_0xb99d97['threadId'],'ref':_0xb99d97[_0x3334fc(0x81)]};}};_0x13c2f7=_0x288735([_0x257946(0x0,_0x5c2b51[_0x47a928(0xb2)](_0x641e5f[_0x47a928(0xca)])),_0x257946(0x1,_0x5c2b51['Inject'](_0x5c2b51[_0x47a928(0x93)])),_0x257946(0x2,_0x5c2b51[_0x47a928(0xb2)](_0x5beb16[_0x47a928(0x80)]))],_0x13c2f7);var _0x3ae0c2=Object[_0x47a928(0xe7)],_0x1dcd1c=(_0x3f90b1,_0x263a08,_0x19f206,_0x583a51)=>{const _0x36ea07=_0x47a928;for(var _0x4e5f74=_0x583a51>0x1?void 0x0:_0x583a51?_0x3ae0c2(_0x263a08,_0x19f206):_0x263a08,_0x1229eb=_0x3f90b1[_0x36ea07(0xab)]-0x1,_0x1df546;_0x1229eb>=0x0;_0x1229eb--)(_0x1df546=_0x3f90b1[_0x1229eb])&&(_0x4e5f74=_0x1df546(_0x4e5f74)||_0x4e5f74);return _0x4e5f74;},_0x2784f8=(_0x2f3de0,_0x2a193a)=>(_0x49c8ad,_0x182833)=>_0x2a193a(_0x49c8ad,_0x182833,_0x2f3de0);let _0x43c4a3=class extends _0x5c2b51[_0x47a928(0xef)]{constructor(_0x4e2a08,_0x6cfa7b){const _0x506239=_0x47a928;super(),this[_0x506239(0xa0)]=_0x4e2a08,this[_0x506239(0x88)]=_0x6cfa7b,this[_0x506239(0xb0)]();}[_0x47a928(0xb0)](){const _0xe06cf9=_0x47a928;this[_0xe06cf9(0xa0)]['dataSource']=this[_0xe06cf9(0x88)],this[_0xe06cf9(0xa0)][_0xe06cf9(0x7f)]=!0x1;}};_0x43c4a3=_0x1dcd1c([_0x2784f8(0x0,_0x5cdcf0[_0x47a928(0x8d)]),_0x2784f8(0x1,_0x5c2b51[_0x47a928(0xb2)](_0x13c2f7))],_0x43c4a3);var _0x3a7f42=Object[_0x47a928(0xa2)],_0x5d4beb=Object[_0x47a928(0xe7)],_0x17e9d3=(_0x35191f,_0x41ae5a,_0x1ebd89)=>_0x41ae5a in _0x35191f?_0x3a7f42(_0x35191f,_0x41ae5a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ebd89}):_0x35191f[_0x41ae5a]=_0x1ebd89,_0xd5159f=(_0x233a2b,_0x4aa836,_0x23c72b,_0x43b856)=>{for(var _0x37f63a=_0x43b856>0x1?void 0x0:_0x43b856?_0x5d4beb(_0x4aa836,_0x23c72b):_0x4aa836,_0x2aca5f=_0x233a2b['length']-0x1,_0x1305ca;_0x2aca5f>=0x0;_0x2aca5f--)(_0x1305ca=_0x233a2b[_0x2aca5f])&&(_0x37f63a=_0x1305ca(_0x37f63a)||_0x37f63a);return _0x37f63a;},_0x61ad8c=(_0x1a95f0,_0x1df6d5)=>(_0xee41ee,_0x544f61)=>_0x1df6d5(_0xee41ee,_0x544f61,_0x1a95f0),_0x2e362a=(_0x479e15,_0x47bfdf,_0x4a401f)=>_0x17e9d3(_0x479e15,typeof _0x47bfdf!=_0x47a928(0x71)?_0x47bfdf+'':_0x47bfdf,_0x4a401f);_0x255510[_0x47a928(0xed)]=class extends _0x5c2b51['Plugin']{constructor(_0x44341d=_0x41a568,_0x11339f,_0x804bd){const _0x311447=_0x47a928;super(),this['_config']=_0x44341d,this['_injector']=_0x11339f,this[_0x311447(0xec)]=_0x804bd;const {..._0x505180}=_0x5c2b51[_0x311447(0xda)]({},_0x41a568,this[_0x311447(0xc3)]);this[_0x311447(0xec)][_0x311447(0xf0)](_0x42b33f,_0x505180);}[_0x47a928(0xdf)](){[[_0x13c2f7],[_0x43c4a3],[_0x1efd36]]['forEach'](_0x109d67=>{const _0x10ed45=_0xf4cc;this[_0x10ed45(0xd6)][_0x10ed45(0x9b)](_0x109d67);});}[_0x47a928(0xa9)](){const _0x201e1b=_0x47a928;this[_0x201e1b(0xd6)]['get'](_0x43c4a3),this['_injector'][_0x201e1b(0x90)](_0x1efd36);}},_0x2e362a(_0x255510[_0x47a928(0xed)],_0x47a928(0xaa),_0x14b483),_0x2e362a(_0x255510[_0x47a928(0xed)],'type',_0x5c2b51['UniverInstanceType'][_0x47a928(0xa8)]),_0x255510[_0x47a928(0xed)]=_0xd5159f([_0x5c2b51['DependentOn'](_0x47412d[_0x47a928(0xe5)],_0x5beb16[_0x47a928(0x98)],_0x20aa55[_0x47a928(0xb5)]),_0x61ad8c(0x1,_0x5c2b51['Inject'](_0x5c2b51[_0x47a928(0xf1)])),_0x61ad8c(0x2,_0x5c2b51['IConfigService'])],_0x255510['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x255510,Symbol[_0x47a928(0x78)],{'value':_0x47a928(0xd5)});}));function _0xf4cc(_0x25adc7,_0x276e3f){const _0x4bd82f=_0x4bd8();return _0xf4cc=function(_0xf4cc77,_0x57a488){_0xf4cc77=_0xf4cc77-0x68;let _0x196d2f=_0x4bd82f[_0xf4cc77];return _0x196d2f;},_0xf4cc(_0x25adc7,_0x276e3f);}function _0x4bd8(){const _0x714a48=['amd','/add','commentUpdate$','_httpService','HTTPService','addUser','getComment','getCurrentUser','disposeWithMe','slice','ThreadCommentModel','exports','payload','filter','UniverThreadCommentUi','Module','_injector','parentId','find','/universer-api/user/list','merge','Edit','Unknown','/delete','threadId','onStarting','replyId','thread-comment-data-source.config','customRanges','resolved','686025uerEoG','UniverThreadCommentUIPlugin','/edit','getOwnPropertyDescriptor','dayjs','body','content','_commentService','_configService','UniverThreadCommentDataSourcePlugin','UniverNetwork','Disposable','setConfig','Injector','replies','Reply','userId','@univerjs/core','unitId','OpenOrReOpen','parse','error','size','symbol','personId','listComments','forEach','7EoZJAQ','map','_userService','toStringTag','addComment','requireSession','@univerjs/network','Delete','function','bufferTime','syncUpdateMutationToColla','CollaborationSessionService','ref','values','post','5631700PGVrKW','user','userID','pipe','_threadCommentDataSource','558461tviGtI','UniverProCollaborationClient','Add','format','IThreadCommentDataSourceService','delete','users','get','36239460SftDBi','72GSyNom','UserManagerService','comment','solved','reply','comments','UniverCollaborationClientPlugin','_threadCommentModel','getUnit','add','getMemberID','UniverProThreadCommentDatasource','Solved','saveCommentToSnapshot','_threadCommentDataSourceService','CommentService','defineProperty','@univerjs/thread-comment','deleteComment','code','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UNIVER_UNKNOWN','onReady','pluginName','length','3kVsTib','/list','5407690vCGtRi','6523176GAflTr','_initDataSource','COMMENT','Inject','_sessionService','@univerjs-pro/collaboration-client','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','rxjs','CustomRangeType','/universer-api/comment/unit/','updateComment','UNRECOGNIZED','stringify','_init','createTimestamp','resolveComment','@univerjs-pro/license','Solve','UniverCore','_config','rangeId','1662830OwRPMW'];_0x4bd8=function(){return _0x714a48;};return _0x4bd8();}
1
+ (function(_0x2c1892,_0x2eea3b){const _0x24b824=_0x2801,_0x166dc0=_0x2c1892();while(!![]){try{const _0x1534ff=parseInt(_0x24b824(0x189))/0x1*(parseInt(_0x24b824(0x1a4))/0x2)+-parseInt(_0x24b824(0x1cf))/0x3+-parseInt(_0x24b824(0x16c))/0x4+parseInt(_0x24b824(0x182))/0x5*(parseInt(_0x24b824(0x1e8))/0x6)+parseInt(_0x24b824(0x1cb))/0x7*(-parseInt(_0x24b824(0x1da))/0x8)+-parseInt(_0x24b824(0x1d4))/0x9+parseInt(_0x24b824(0x1b4))/0xa;if(_0x1534ff===_0x2eea3b)break;else _0x166dc0['push'](_0x166dc0['shift']());}catch(_0x215d3c){_0x166dc0['push'](_0x166dc0['shift']());}}}(_0x1f75,0x651b1),function(_0x4b1bf1,_0x1a1e83){const _0x243567=_0x2801;typeof exports==_0x243567(0x1e2)&&typeof module<'u'?_0x1a1e83(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x243567(0x171)&&define[_0x243567(0x1c9)]?define([_0x243567(0x184),'@univerjs-pro/collaboration-client',_0x243567(0x19f),_0x243567(0x178),_0x243567(0x1bd),_0x243567(0x1ba),_0x243567(0x192),_0x243567(0x18a)],_0x1a1e83):(_0x4b1bf1=typeof globalThis<'u'?globalThis:_0x4b1bf1||self,_0x1a1e83(_0x4b1bf1['UniverProThreadCommentDatasource']={},_0x4b1bf1[_0x243567(0x1c3)],_0x4b1bf1['UniverProLicense'],_0x4b1bf1[_0x243567(0x1d1)],_0x4b1bf1[_0x243567(0x1bb)],_0x4b1bf1[_0x243567(0x1b2)],_0x4b1bf1[_0x243567(0x192)],_0x4b1bf1[_0x243567(0x1a1)]));}(this,function(_0x2051bf,_0x108668,_0xf9f6b,_0x414d42,_0x48e9ff,_0x53b9c4,_0x3d0ab0,_0x3eca16){'use strict';const _0x1fa543=_0x2801;const _0x2f798e=_0x1fa543(0x1a5);var _0x422942=(_0x55dc4f=>(_0x55dc4f[_0x55dc4f[_0x1fa543(0x1d9)]=0x0]=_0x1fa543(0x1d9),_0x55dc4f[_0x55dc4f[_0x1fa543(0x164)]=0x1]='Solved',_0x55dc4f[_0x55dc4f['UNRECOGNIZED']=-0x1]=_0x1fa543(0x1cc),_0x55dc4f))(_0x422942||{}),_0x4deea9=(_0x31badd=>(_0x31badd[_0x31badd[_0x1fa543(0x163)]=0x0]=_0x1fa543(0x163),_0x31badd[_0x31badd[_0x1fa543(0x16f)]=0x1]='Add',_0x31badd[_0x31badd[_0x1fa543(0x1e4)]=0x2]=_0x1fa543(0x1e4),_0x31badd[_0x31badd[_0x1fa543(0x187)]=0x3]=_0x1fa543(0x187),_0x31badd[_0x31badd['Delete']=0x4]=_0x1fa543(0x199),_0x31badd[_0x31badd[_0x1fa543(0x1af)]=0x5]=_0x1fa543(0x1af),_0x31badd[_0x31badd[_0x1fa543(0x1cc)]=-0x1]='UNRECOGNIZED',_0x31badd))(_0x4deea9||{});const _0x496893=_0x4ecbb4=>_0x414d42['dayjs'](new Date(+_0x4ecbb4))[_0x1fa543(0x1bf)](_0x1fa543(0x160)),_0x322198=async(_0x43cb7a,_0x3af98f)=>{const _0x48717b=_0x1fa543,_0x52029e=_0x43cb7a[_0x48717b(0x17d)](_0x414d42[_0x48717b(0x170)]),_0x2919da=_0x43cb7a['get'](_0x3eca16[_0x48717b(0x191)]);_0x3af98f[_0x48717b(0x18f)](_0x4b1efb=>{const _0xa0976e=_0x48717b;_0x52029e['getUser'](_0x4b1efb)&&_0x3af98f[_0xa0976e(0x174)](_0x4b1efb);}),_0x3af98f[_0x48717b(0x1c0)]&&(await _0x2919da[_0x48717b(0x17d)](_0x48717b(0x1a3),{'params':{'userIDs':[..._0x3af98f]}}))[_0x48717b(0x1d7)][_0x48717b(0x15f)][_0x48717b(0x18f)](_0x220a3b=>{const _0x55789=_0x48717b;_0x220a3b&&_0x52029e[_0x55789(0x1e7)](_0x220a3b);});};var _0x287cde=Object['getOwnPropertyDescriptor'],_0x55bb93=(_0x18f8a3,_0x40843b,_0x1bd488,_0x4a0c64)=>{const _0x4fcd15=_0x1fa543;for(var _0x375f80=_0x4a0c64>0x1?void 0x0:_0x4a0c64?_0x287cde(_0x40843b,_0x1bd488):_0x40843b,_0x54e1f2=_0x18f8a3[_0x4fcd15(0x1c7)]-0x1,_0x3fc2e8;_0x54e1f2>=0x0;_0x54e1f2--)(_0x3fc2e8=_0x18f8a3[_0x54e1f2])&&(_0x375f80=_0x3fc2e8(_0x375f80)||_0x375f80);return _0x375f80;},_0x36571e=(_0x2948a9,_0x2628f0)=>(_0x1f2591,_0x4205ea)=>_0x2628f0(_0x1f2591,_0x4205ea,_0x2948a9);let _0x189ed9=class extends _0x414d42[_0x1fa543(0x1a6)]{constructor(_0x2e3ee5,_0x12ee06,_0x2aa830,_0x490c3e){const _0x55b657=_0x1fa543;super(),this[_0x55b657(0x193)]=_0x2e3ee5,this['_threadCommentModel']=_0x12ee06,this['_userService']=_0x2aa830,this[_0x55b657(0x1df)]=_0x490c3e,this[_0x55b657(0x176)](),this[_0x55b657(0x1a0)]();}['_initUserSync'](){const _0x5699af=_0x1fa543;this['disposeWithMe'](this[_0x5699af(0x15d)][_0x5699af(0x173)][_0x5699af(0x1be)](_0x3d0ab0[_0x5699af(0x188)](0x10))[_0x5699af(0x175)](_0x691312=>{const _0x18d077=_0x5699af,_0x525224=new Set();_0x691312[_0x18d077(0x18f)](_0x5a373a=>{const _0x51af2e=_0x18d077;switch(_0x5a373a['type']){case _0x51af2e(0x1d3):{const _0x3cc469=_0x5a373a[_0x51af2e(0x1c8)]['personId'];_0x525224[_0x51af2e(0x1d3)](_0x3cc469);break;}}}),_0x322198(this[_0x18d077(0x1df)],_0x525224);}));}[_0x1fa543(0x176)](){const _0x14bde1=_0x1fa543;this[_0x14bde1(0x1b8)](this['_commentService'][_0x14bde1(0x173)][_0x14bde1(0x175)](async _0x7456c2=>{const _0x12b181=_0x14bde1;var _0x518af6,_0x2bf550,_0x53d0d8,_0x4c9e09;const _0xca13e7=(_0x518af6=this[_0x12b181(0x15d)]['getUnit'](_0x7456c2[_0x12b181(0x168)])[_0x12b181(0x1b1)](_0x499e67=>_0x499e67[_0x12b181(0x196)]===_0x7456c2[_0x12b181(0x196)]))==null?void 0x0:_0x518af6['root'];if(!_0xca13e7)return;const {unitId:_0x47b7d4,subUnitId:_0x108c36}=_0xca13e7;switch(_0x7456c2[_0x12b181(0x17a)]&&this[_0x12b181(0x185)][_0x12b181(0x1e7)](_0x7456c2[_0x12b181(0x17a)]),_0x7456c2['type']){case _0x4deea9[_0x12b181(0x16f)]:break;case _0x4deea9[_0x12b181(0x1e4)]:{this[_0x12b181(0x15d)][_0x12b181(0x1d8)](_0x47b7d4,_0x108c36,{'unitId':_0x47b7d4,'subUnitId':_0x108c36,'ref':'','id':_0x7456c2[_0x12b181(0x1cd)],'dT':_0x496893(+_0x7456c2[_0x12b181(0x190)]),'threadId':_0x7456c2[_0x12b181(0x196)],'personId':(_0x53d0d8=(_0x2bf550=_0x7456c2[_0x12b181(0x17a)])==null?void 0x0:_0x2bf550[_0x12b181(0x18b)])!=null?_0x53d0d8:_0x7456c2[_0x12b181(0x1e1)],'text':JSON[_0x12b181(0x198)](_0x7456c2[_0x12b181(0x17c)]),'parentId':_0xca13e7['id']});break;}case _0x4deea9['Delete']:{const _0x3d7727=this[_0x12b181(0x15d)][_0x12b181(0x161)](_0x47b7d4,_0x108c36,_0x7456c2['replyId']);_0x3d7727&&_0x3d7727[_0x12b181(0x181)]&&this[_0x12b181(0x15d)][_0x12b181(0x166)](_0x47b7d4,_0x108c36,_0x7456c2[_0x12b181(0x1cd)]);break;}case _0x4deea9[_0x12b181(0x187)]:{this['_threadCommentModel'][_0x12b181(0x19b)](_0x47b7d4,_0x108c36,{'commentId':_0x7456c2[_0x12b181(0x1cd)],'text':JSON[_0x12b181(0x198)](_0x7456c2[_0x12b181(0x17c)])});break;}case _0x4deea9[_0x12b181(0x1af)]:{const _0x4d35fe=(_0x4c9e09=this[_0x12b181(0x15d)][_0x12b181(0x1b7)](_0x7456c2[_0x12b181(0x168)])['find'](_0x4fe79a=>_0x4fe79a[_0x12b181(0x196)]===_0x7456c2[_0x12b181(0x196)]))==null?void 0x0:_0x4c9e09[_0x12b181(0x1d5)];_0x4d35fe&&this[_0x12b181(0x15d)][_0x12b181(0x1bc)](_0x47b7d4,_0x108c36,_0x4d35fe['id'],_0x7456c2[_0x12b181(0x1c5)]===_0x422942['Solved']);break;}}}));}};_0x189ed9=_0x55bb93([_0x36571e(0x0,_0x414d42[_0x1fa543(0x1ac)](_0x108668[_0x1fa543(0x19c)])),_0x36571e(0x1,_0x414d42[_0x1fa543(0x1ac)](_0x53b9c4[_0x1fa543(0x1a2)])),_0x36571e(0x2,_0x414d42[_0x1fa543(0x1ac)](_0x414d42[_0x1fa543(0x170)])),_0x36571e(0x3,_0x414d42[_0x1fa543(0x1ac)](_0x414d42['Injector']))],_0x189ed9);const _0x320495=_0x1fa543(0x1b5),_0x497619={};var _0x479837=Object[_0x1fa543(0x19e)],_0xd5e5e9=(_0x5b02b7,_0x25982b,_0x15227f,_0x2241ee)=>{const _0x447854=_0x1fa543;for(var _0x11c5a3=_0x2241ee>0x1?void 0x0:_0x2241ee?_0x479837(_0x25982b,_0x15227f):_0x25982b,_0x314332=_0x5b02b7[_0x447854(0x1c7)]-0x1,_0x178426;_0x314332>=0x0;_0x314332--)(_0x178426=_0x5b02b7[_0x314332])&&(_0x11c5a3=_0x178426(_0x11c5a3)||_0x11c5a3);return _0x11c5a3;},_0xc5380=(_0x2e1a80,_0x55514e)=>(_0x26e634,_0x4ab9b0)=>_0x55514e(_0x26e634,_0x4ab9b0,_0x2e1a80);function _0x4a9715(_0x579b7a,_0x2d2f81){const _0x1d1546=_0x1fa543,_0xdbbc1c=_0x579b7a['replies'][0x0];return{..._0x2d2f81,'id':_0xdbbc1c[_0x1d1546(0x1cd)],'resolved':_0x579b7a[_0x1d1546(0x1c5)]===0x1,'dT':_0x496893(_0xdbbc1c['createTimestamp']),'personId':_0xdbbc1c[_0x1d1546(0x1e1)],'threadId':_0xdbbc1c[_0x1d1546(0x196)]};}function _0x991e71(_0x659ef6,_0x5a3ef4,_0x404c25){const _0x107d7e=_0x1fa543;var _0x5ef934,_0x139510;if(((_0x139510=(_0x5ef934=_0x659ef6==null?void 0x0:_0x659ef6[_0x107d7e(0x16a)])==null?void 0x0:_0x5ef934[_0x107d7e(0x1c7)])!=null?_0x139510:0x0)>0x0){const _0x421c92=(_0x15d5b4,_0x2ebb85)=>({'id':_0x15d5b4[_0x107d7e(0x1cd)],'threadId':_0x15d5b4[_0x107d7e(0x196)],'dT':_0x496893(_0x15d5b4[_0x107d7e(0x190)]),'personId':_0x15d5b4[_0x107d7e(0x1e1)],'resolved':_0x659ef6[_0x107d7e(0x1c5)]===_0x422942['Solved'],'unitId':_0x5a3ef4,'subUnitId':_0x404c25,'text':JSON[_0x107d7e(0x198)](_0x15d5b4[_0x107d7e(0x17c)]),'parentId':_0x2ebb85}),_0x1e5c74=_0x421c92(_0x659ef6[_0x107d7e(0x16a)][0x0]);return{..._0x1e5c74,'children':_0x659ef6['replies']['slice'](0x1)['map'](_0x1caaaa=>_0x421c92(_0x1caaaa,_0x1e5c74['id']))};}return null;}let _0x476c4c=class{constructor(_0x1b1685,_0x67af8b,_0x226c7c){const _0x19b859=_0x1fa543;this[_0x19b859(0x17b)]=_0x1b1685,this[_0x19b859(0x185)]=_0x67af8b,this[_0x19b859(0x18c)]=_0x226c7c;}async[_0x1fa543(0x1d8)](_0x21615b){const _0x4522fa=_0x1fa543;var _0x4e0b73,_0x5ac60d;const {parentId:_0x4658ca,unitId:_0x15abe8,text:_0x372d1c,threadId:_0x48fcda}=_0x21615b,_0x2df3bd=(_0x5ac60d=(_0x4e0b73=_0x372d1c[_0x4522fa(0x1c4)])==null?void 0x0:_0x4e0b73[_0x4522fa(0x177)](_0x2f4295=>_0x2f4295['rangeType']===_0x414d42[_0x4522fa(0x1e5)][_0x4522fa(0x19d)])['map'](_0x2f5fe6=>_0x2f5fe6[_0x4522fa(0x1b9)]))!=null?_0x5ac60d:[],_0x3dce8e=JSON[_0x4522fa(0x186)](_0x372d1c),_0x405a5b=(await this[_0x4522fa(0x18c)][_0x4522fa(0x195)](_0x15abe8))[_0x4522fa(0x19a)]();if(_0x4658ca){const _0x31c9bb={'memberId':_0x405a5b,'unitId':_0x15abe8,'content':_0x3dce8e,'mention':_0x2df3bd,'threadId':_0x48fcda},_0x5a5688=(await this['_httpService'][_0x4522fa(0x1aa)]('/universer-api/comment/unit/'+_0x15abe8+_0x4522fa(0x1b0),{'body':_0x31c9bb}))[_0x4522fa(0x1d7)][_0x4522fa(0x197)];return{..._0x21615b,'id':_0x5a5688[_0x4522fa(0x1cd)],'dT':_0x414d42['dayjs'](+_0x5a5688[_0x4522fa(0x190)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a5688[_0x4522fa(0x1e1)]};}else{const _0x466279={'memberId':_0x405a5b,'unitId':_0x15abe8,'content':_0x3dce8e,'mention':_0x2df3bd},_0x3bb0db=await this[_0x4522fa(0x17b)]['post'](_0x4522fa(0x1d6)+_0x15abe8+_0x4522fa(0x18d),{'body':_0x466279});return _0x4a9715(_0x3bb0db['body'][_0x4522fa(0x1d0)],_0x21615b);}}async[_0x1fa543(0x19b)](_0x37e596){const _0x1e93bc=_0x1fa543;var _0x3ea1e0,_0x1849f0;const {text:_0x3a7d3b,unitId:_0x25bb58}=_0x37e596,_0x576eef=(_0x1849f0=(_0x3ea1e0=_0x3a7d3b[_0x1e93bc(0x1c4)])==null?void 0x0:_0x3ea1e0[_0x1e93bc(0x177)](_0x37200c=>_0x37200c[_0x1e93bc(0x18e)]===_0x414d42[_0x1e93bc(0x1e5)][_0x1e93bc(0x19d)])[_0x1e93bc(0x167)](_0x4a3124=>_0x4a3124[_0x1e93bc(0x1b9)]))!=null?_0x1849f0:[],_0x357917=JSON['stringify'](_0x3a7d3b),_0x15d079=_0x37e596[_0x1e93bc(0x196)],_0x473922=_0x37e596['id'],_0x35991c={'memberId':(await this[_0x1e93bc(0x18c)]['requireSession'](_0x25bb58))[_0x1e93bc(0x19a)](),'unitId':_0x25bb58,'threadId':_0x15d079,'mention':_0x576eef,'content':_0x357917,'replyId':_0x473922},_0x517ec3=await this[_0x1e93bc(0x17b)]['post'](_0x1e93bc(0x1d6)+_0x25bb58+_0x1e93bc(0x1c1),{'body':_0x35991c});return!_0x517ec3[_0x1e93bc(0x1d7)][_0x1e93bc(0x1e0)]||_0x517ec3['body'][_0x1e93bc(0x1e0)][_0x1e93bc(0x1b3)]===0x1;}async[_0x1fa543(0x1bc)](_0x1c87f0){const _0x421d52=_0x1fa543,{unitId:_0x36b5bc}=_0x1c87f0,_0x216d01=_0x1c87f0[_0x421d52(0x196)],_0x4ab52={'memberId':this[_0x421d52(0x185)][_0x421d52(0x165)]()[_0x421d52(0x18b)],'unitId':_0x36b5bc,'threadId':_0x216d01,'solved':_0x1c87f0[_0x421d52(0x1de)]?_0x422942[_0x421d52(0x164)]:_0x422942[_0x421d52(0x1d9)]},_0x43233e=await this[_0x421d52(0x17b)][_0x421d52(0x1aa)](_0x421d52(0x1d6)+_0x36b5bc+_0x421d52(0x1d2),{'body':_0x4ab52});return!_0x43233e[_0x421d52(0x1d7)][_0x421d52(0x1e0)]||_0x43233e[_0x421d52(0x1d7)][_0x421d52(0x1e0)][_0x421d52(0x1b3)]===0x1;}async[_0x1fa543(0x166)](_0x381faa,_0x3788e6,_0x3247cb,_0x2664e7){const _0x4690bf=_0x1fa543,_0x276967={'memberId':(await this[_0x4690bf(0x18c)][_0x4690bf(0x195)](_0x381faa))['getMemberID'](),'threadId':_0x3247cb,'replyId':_0x2664e7,'unitId':_0x381faa},_0x7d6559=await this['_httpService']['post'](_0x4690bf(0x1d6)+_0x381faa+_0x4690bf(0x16b),{'body':_0x276967});return!_0x7d6559[_0x4690bf(0x1d7)]['error']||_0x7d6559[_0x4690bf(0x1d7)]['error'][_0x4690bf(0x1b3)]===0x1;}async[_0x1fa543(0x15e)](_0x5c26eb,_0xa3175,_0x24bac6){const _0x4573ae=_0x1fa543,_0x82e0f8={'unitId':_0x5c26eb,'threadId':_0x24bac6},_0x27607b=await this[_0x4573ae(0x17b)]['post'](_0x4573ae(0x1d6)+_0x5c26eb+'/list',{'body':_0x82e0f8}),_0x24eae9=_0x24bac6[_0x4573ae(0x167)](_0x35fae9=>_0x991e71(_0x27607b[_0x4573ae(0x1d7)][_0x4573ae(0x17e)][_0x35fae9],_0x5c26eb,_0xa3175))['filter'](Boolean);return Object[_0x4573ae(0x1a7)](_0x27607b[_0x4573ae(0x1d7)][_0x4573ae(0x15f)])[_0x4573ae(0x18f)](_0x39eab5=>{const _0x143d2d=_0x4573ae;this[_0x143d2d(0x185)][_0x143d2d(0x1e7)](_0x39eab5);}),_0x24eae9;}[_0x1fa543(0x1ae)](_0x861e11){const _0x17606b=_0x1fa543;return{'id':_0x861e11['id'],'threadId':_0x861e11['threadId'],'ref':_0x861e11[_0x17606b(0x1b6)]};}};_0x476c4c=_0xd5e5e9([_0xc5380(0x0,_0x414d42['Inject'](_0x3eca16[_0x1fa543(0x191)])),_0xc5380(0x1,_0x414d42[_0x1fa543(0x1ac)](_0x414d42[_0x1fa543(0x170)])),_0xc5380(0x2,_0x414d42[_0x1fa543(0x1ac)](_0x108668['CollaborationSessionService']))],_0x476c4c);var _0x1b8f27=Object[_0x1fa543(0x19e)],_0x4b9609=(_0x1113fd,_0x3bcca7,_0x8597b1,_0x2a5785)=>{const _0x59193e=_0x1fa543;for(var _0x2586eb=_0x2a5785>0x1?void 0x0:_0x2a5785?_0x1b8f27(_0x3bcca7,_0x8597b1):_0x3bcca7,_0x7f59aa=_0x1113fd[_0x59193e(0x1c7)]-0x1,_0x123a8f;_0x7f59aa>=0x0;_0x7f59aa--)(_0x123a8f=_0x1113fd[_0x7f59aa])&&(_0x2586eb=_0x123a8f(_0x2586eb)||_0x2586eb);return _0x2586eb;},_0x32eeef=(_0x1a9279,_0x4a032c)=>(_0x2843dc,_0x36500d)=>_0x4a032c(_0x2843dc,_0x36500d,_0x1a9279);let _0x17905e=class extends _0x414d42[_0x1fa543(0x1a6)]{constructor(_0x2c40bd,_0x2c5483){const _0x1ce2d8=_0x1fa543;super(),this[_0x1ce2d8(0x1db)]=_0x2c40bd,this[_0x1ce2d8(0x1e3)]=_0x2c5483,this[_0x1ce2d8(0x162)]();}[_0x1fa543(0x162)](){const _0x12c485=_0x1fa543;this['_threadCommentDataSourceService'][_0x12c485(0x1ca)]=this[_0x12c485(0x1e3)],this[_0x12c485(0x1db)][_0x12c485(0x1e6)]=!0x1;}};_0x17905e=_0x4b9609([_0x32eeef(0x0,_0x53b9c4[_0x1fa543(0x1ad)]),_0x32eeef(0x1,_0x414d42[_0x1fa543(0x1ac)](_0x476c4c))],_0x17905e);var _0x4f432f=Object['defineProperty'],_0x193544=Object['getOwnPropertyDescriptor'],_0xd123a1=(_0x691701,_0x1b7ba8,_0x4b980c)=>_0x1b7ba8 in _0x691701?_0x4f432f(_0x691701,_0x1b7ba8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b980c}):_0x691701[_0x1b7ba8]=_0x4b980c,_0x29b98f=(_0x53a786,_0x313615,_0x3314c5,_0x52ca2f)=>{const _0xc78dab=_0x1fa543;for(var _0x52e895=_0x52ca2f>0x1?void 0x0:_0x52ca2f?_0x193544(_0x313615,_0x3314c5):_0x313615,_0x27cb98=_0x53a786[_0xc78dab(0x1c7)]-0x1,_0x355716;_0x27cb98>=0x0;_0x27cb98--)(_0x355716=_0x53a786[_0x27cb98])&&(_0x52e895=_0x355716(_0x52e895)||_0x52e895);return _0x52e895;},_0x5a7533=(_0x448f63,_0x247442)=>(_0x107b03,_0x5eb264)=>_0x247442(_0x107b03,_0x5eb264,_0x448f63),_0x1c6f25=(_0x2258fa,_0x392b0c,_0x59fc70)=>_0xd123a1(_0x2258fa,typeof _0x392b0c!=_0x1fa543(0x16d)?_0x392b0c+'':_0x392b0c,_0x59fc70);_0x2051bf[_0x1fa543(0x1ab)]=class extends _0x414d42[_0x1fa543(0x1ce)]{constructor(_0x4ef504=_0x497619,_0x47a8c2,_0x216dd7){const _0x1912e5=_0x1fa543;super(),this[_0x1912e5(0x17f)]=_0x4ef504,this[_0x1912e5(0x1df)]=_0x47a8c2,this['_configService']=_0x216dd7;const {..._0x9fd53}=_0x414d42[_0x1912e5(0x194)]({},_0x497619,this[_0x1912e5(0x17f)]);this['_configService'][_0x1912e5(0x172)](_0x320495,_0x9fd53);}[_0x1fa543(0x1dc)](){const _0x3c36b7=_0x1fa543;[[_0x476c4c],[_0x17905e],[_0x189ed9]][_0x3c36b7(0x18f)](_0x4af8a6=>{const _0xe36790=_0x3c36b7;this[_0xe36790(0x1df)]['add'](_0x4af8a6);});}[_0x1fa543(0x1c2)](){const _0x30c709=_0x1fa543;this[_0x30c709(0x1df)][_0x30c709(0x17d)](_0x17905e),this[_0x30c709(0x1df)][_0x30c709(0x17d)](_0x189ed9);}},_0x1c6f25(_0x2051bf[_0x1fa543(0x1ab)],_0x1fa543(0x16e),_0x2f798e),_0x1c6f25(_0x2051bf['UniverThreadCommentDataSourcePlugin'],_0x1fa543(0x1a9),_0x414d42['UniverInstanceType']['UNIVER_UNKNOWN']),_0x2051bf[_0x1fa543(0x1ab)]=_0x29b98f([_0x414d42[_0x1fa543(0x169)](_0x48e9ff['UniverThreadCommentUIPlugin'],_0x108668[_0x1fa543(0x1c6)],_0xf9f6b[_0x1fa543(0x1dd)]),_0x5a7533(0x1,_0x414d42[_0x1fa543(0x1ac)](_0x414d42['Injector'])),_0x5a7533(0x2,_0x414d42[_0x1fa543(0x179)])],_0x2051bf[_0x1fa543(0x1ab)]),Object[_0x1fa543(0x180)](_0x2051bf,Symbol[_0x1fa543(0x183)],{'value':_0x1fa543(0x1a8)});}));function _0x2801(_0x5a8238,_0x334e51){const _0x1f75f5=_0x1f75();return _0x2801=function(_0x2801aa,_0x2c94c9){_0x2801aa=_0x2801aa-0x15d;let _0x14924a=_0x1f75f5[_0x2801aa];return _0x14924a;},_0x2801(_0x5a8238,_0x334e51);}function _0x1f75(){const _0x503fd0=['IConfigService','user','_httpService','content','get','comments','_config','defineProperty','parentId','24995ImmicQ','toStringTag','exports','_userService','stringify','Edit','bufferTime','243994nJocLm','@univerjs/network','userID','_sessionService','/add','rangeType','forEach','createTimestamp','HTTPService','rxjs','_commentService','merge','requireSession','threadId','reply','parse','Delete','getMemberID','updateComment','CommentService','COMMENT','getOwnPropertyDescriptor','@univerjs-pro/license','_initUserSync','UniverNetwork','ThreadCommentModel','/universer-api/user/list','4HHcqoA','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Disposable','values','Module','type','post','UniverThreadCommentDataSourcePlugin','Inject','IThreadCommentDataSourceService','saveCommentToSnapshot','Solve','/reply','find','UniverThreadComment','code','11124160qPGlye','thread-comment-data-source.config','ref','getUnit','disposeWithMe','rangeId','@univerjs/thread-comment','UniverThreadCommentUi','resolveComment','@univerjs/thread-comment-ui','pipe','format','size','/edit','onReady','UniverProCollaborationClient','customRanges','solved','UniverCollaborationClientPlugin','length','payload','amd','dataSource','7bkExrW','UNRECOGNIZED','replyId','Plugin','549801YaGvKg','comment','UniverCore','/solved','add','2059533DslXKv','root','/universer-api/comment/unit/','body','addComment','OpenOrReOpen','6536560wmPnQl','_threadCommentDataSourceService','onStarting','UniverLicensePlugin','resolved','_injector','error','userId','object','_threadCommentDataSource','Reply','CustomRangeType','syncUpdateMutationToColla','addUser','894tSTEjO','_threadCommentModel','listComments','users','YYYY/MM/DD\x20HH:mm','getComment','_initDataSource','Unknown','Solved','getCurrentUser','deleteComment','map','unitId','DependentOn','replies','/delete','2807808xvbZYu','symbol','pluginName','Add','UserManagerService','function','setConfig','commentUpdate$','delete','subscribe','_init','filter','@univerjs/core'];_0x1f75=function(){return _0x503fd0;};return _0x1f75();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.10-experimental.20251016-33b0941",
3
+ "version": "0.10.10-nightly.202510170942",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.10-experimental.20251016-33b0941",
49
- "@univerjs/core": "0.10.10-experimental.20251016-33b0941",
50
- "@univerjs-pro/license": "0.10.10-experimental.20251016-33b0941",
51
- "@univerjs/thread-comment": "0.10.10-experimental.20251016-33b0941",
48
+ "@univerjs-pro/collaboration-client": "0.10.10-nightly.202510170942",
49
+ "@univerjs-pro/license": "0.10.10-nightly.202510170942",
50
+ "@univerjs/network": "0.10.10-nightly.202510170942",
52
51
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment-ui": "0.10.10-experimental.20251016-33b0941",
54
- "@univerjs/network": "0.10.10-experimental.20251016-33b0941"
52
+ "@univerjs/thread-comment": "0.10.10-nightly.202510170942",
53
+ "@univerjs/core": "0.10.10-nightly.202510170942",
54
+ "@univerjs/thread-comment-ui": "0.10.10-nightly.202510170942"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",