@univerjs-pro/thread-comment-datasource 0.9.2-nightly.202507151607 → 0.9.2-nightly.202507171607

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 _0x38cf71=_0xbe46;(function(_0x2ccc20,_0x11d3fd){const _0x1dc531=_0xbe46,_0x3b29af=_0x2ccc20();while(!![]){try{const _0x3ceb30=-parseInt(_0x1dc531(0x22d))/0x1+parseInt(_0x1dc531(0x239))/0x2+parseInt(_0x1dc531(0x23b))/0x3*(parseInt(_0x1dc531(0x20b))/0x4)+-parseInt(_0x1dc531(0x249))/0x5+parseInt(_0x1dc531(0x215))/0x6*(-parseInt(_0x1dc531(0x251))/0x7)+parseInt(_0x1dc531(0x242))/0x8*(parseInt(_0x1dc531(0x22a))/0x9)+parseInt(_0x1dc531(0x201))/0xa;if(_0x3ceb30===_0x11d3fd)break;else _0x3b29af['push'](_0x3b29af['shift']());}catch(_0xdd7cc1){_0x3b29af['push'](_0x3b29af['shift']());}}}(_0x471a,0x6f91f));Object['defineProperty'](exports,Symbol[_0x38cf71(0x255)],{'value':_0x38cf71(0x260)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x38cf71(0x268);var I=(_0x533055=>(_0x533055[_0x533055['OpenOrReOpen']=0x0]=_0x38cf71(0x227),_0x533055[_0x533055['Solved']=0x1]=_0x38cf71(0x212),_0x533055[_0x533055[_0x38cf71(0x1f3)]=-0x1]=_0x38cf71(0x1f3),_0x533055))(I||{}),v=(_0x5937ec=>(_0x5937ec[_0x5937ec[_0x38cf71(0x23a)]=0x0]=_0x38cf71(0x23a),_0x5937ec[_0x5937ec['Add']=0x1]=_0x38cf71(0x200),_0x5937ec[_0x5937ec[_0x38cf71(0x20f)]=0x2]=_0x38cf71(0x20f),_0x5937ec[_0x5937ec[_0x38cf71(0x258)]=0x3]=_0x38cf71(0x258),_0x5937ec[_0x5937ec[_0x38cf71(0x23e)]=0x4]=_0x38cf71(0x23e),_0x5937ec[_0x5937ec[_0x38cf71(0x23d)]=0x5]=_0x38cf71(0x23d),_0x5937ec[_0x5937ec[_0x38cf71(0x1f3)]=-0x1]=_0x38cf71(0x1f3),_0x5937ec))(v||{});const f=_0x34fbe9=>c[_0x38cf71(0x1f8)](new Date(+_0x34fbe9))['format'](_0x38cf71(0x25e)),R=async(_0xc02434,_0x26283f)=>{const _0x1382bc=_0x38cf71,_0x320f1a=_0xc02434[_0x1382bc(0x247)](c['UserManagerService']),_0x2392b8=_0xc02434[_0x1382bc(0x247)](P[_0x1382bc(0x1f5)]);_0x26283f[_0x1382bc(0x24f)](_0x682db8=>{const _0x32545e=_0x1382bc;_0x320f1a[_0x32545e(0x233)](_0x682db8)&&_0x26283f['delete'](_0x682db8);}),_0x26283f[_0x1382bc(0x1f4)]&&(await _0x2392b8['get'](_0x1382bc(0x21a),{'params':{'userIDs':[..._0x26283f]}}))['body'][_0x1382bc(0x211)][_0x1382bc(0x24f)](_0x945d38=>{const _0xbe284c=_0x1382bc;_0x945d38&&_0x320f1a[_0xbe284c(0x22c)](_0x945d38);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x1b4ee5,_0x12116d,_0x5a6854,_0x364e19)=>{for(var _0xe4a10c=_0x364e19>0x1?void 0x0:_0x364e19?$(_0x12116d,_0x5a6854):_0x12116d,_0x206f8=_0x1b4ee5['length']-0x1,_0x16a6bc;_0x206f8>=0x0;_0x206f8--)(_0x16a6bc=_0x1b4ee5[_0x206f8])&&(_0xe4a10c=_0x16a6bc(_0xe4a10c)||_0xe4a10c);return _0xe4a10c;},S=(_0x5f3911,_0x5a0ce6)=>(_0x2ea251,_0x28c609)=>_0x5a0ce6(_0x2ea251,_0x28c609,_0x5f3911);let p=class extends c[_0x38cf71(0x207)]{constructor(_0x320e1f,_0x23d909,_0x34844c,_0x1c84a1){const _0x377399=_0x38cf71;super(),this[_0x377399(0x24c)]=_0x320e1f,this[_0x377399(0x219)]=_0x23d909,this[_0x377399(0x263)]=_0x34844c,this[_0x377399(0x224)]=_0x1c84a1,this[_0x377399(0x20a)](),this[_0x377399(0x22f)]();}[_0x38cf71(0x22f)](){const _0x276017=_0x38cf71;this['disposeWithMe'](this[_0x276017(0x219)][_0x276017(0x248)][_0x276017(0x234)](w['bufferTime'](0x10))[_0x276017(0x216)](_0x3ea89b=>{const _0x51e929=_0x276017,_0xe52298=new Set();_0x3ea89b[_0x51e929(0x24f)](_0x70fd5d=>{const _0x3532e0=_0x51e929;switch(_0x70fd5d['type']){case _0x3532e0(0x267):{const _0x67c44b=_0x70fd5d[_0x3532e0(0x226)][_0x3532e0(0x202)];_0xe52298[_0x3532e0(0x267)](_0x67c44b);break;}}}),R(this[_0x51e929(0x224)],_0xe52298);}));}['_init'](){const _0x41d8f0=_0x38cf71;this[_0x41d8f0(0x243)](this[_0x41d8f0(0x24c)][_0x41d8f0(0x248)][_0x41d8f0(0x216)](async _0x59d78d=>{const _0x112de2=_0x41d8f0;var _0x32fc9e,_0x263229,_0x52cb7f,_0x39280a;const _0x2015d9=(_0x32fc9e=this[_0x112de2(0x219)][_0x112de2(0x225)](_0x59d78d['unitId'])[_0x112de2(0x232)](_0x2d0325=>_0x2d0325[_0x112de2(0x25b)]===_0x59d78d[_0x112de2(0x25b)]))==null?void 0x0:_0x32fc9e['root'];if(!_0x2015d9)return;const {unitId:_0x3ffbea,subUnitId:_0x38f303}=_0x2015d9;switch(_0x59d78d[_0x112de2(0x252)]&&this[_0x112de2(0x263)][_0x112de2(0x22c)](_0x59d78d[_0x112de2(0x252)]),_0x59d78d[_0x112de2(0x264)]){case v['Add']:break;case v['Reply']:{this[_0x112de2(0x219)][_0x112de2(0x230)](_0x3ffbea,_0x38f303,{'unitId':_0x3ffbea,'subUnitId':_0x38f303,'ref':'','id':_0x59d78d['replyId'],'dT':f(+_0x59d78d[_0x112de2(0x24b)]),'threadId':_0x59d78d[_0x112de2(0x25b)],'personId':(_0x52cb7f=(_0x263229=_0x59d78d['user'])==null?void 0x0:_0x263229[_0x112de2(0x21c)])!=null?_0x52cb7f:_0x59d78d[_0x112de2(0x1fd)],'text':JSON[_0x112de2(0x22b)](_0x59d78d['content']),'parentId':_0x2015d9['id']});break;}case v[_0x112de2(0x23e)]:{const _0x20702a=this[_0x112de2(0x219)]['getComment'](_0x3ffbea,_0x38f303,_0x59d78d['replyId']);_0x20702a&&_0x20702a[_0x112de2(0x253)]&&this[_0x112de2(0x219)][_0x112de2(0x23f)](_0x3ffbea,_0x38f303,_0x59d78d[_0x112de2(0x1fe)]);break;}case v[_0x112de2(0x258)]:{this[_0x112de2(0x219)][_0x112de2(0x24a)](_0x3ffbea,_0x38f303,{'commentId':_0x59d78d[_0x112de2(0x1fe)],'text':JSON[_0x112de2(0x22b)](_0x59d78d['content'])});break;}case v['Solve']:{const _0x1cca83=(_0x39280a=this[_0x112de2(0x219)][_0x112de2(0x225)](_0x59d78d[_0x112de2(0x266)])['find'](_0x52f581=>_0x52f581['threadId']===_0x59d78d[_0x112de2(0x25b)]))==null?void 0x0:_0x39280a['root'];_0x1cca83&&this[_0x112de2(0x219)][_0x112de2(0x250)](_0x3ffbea,_0x38f303,_0x1cca83['id'],_0x59d78d['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x38cf71(0x24d)](b[_0x38cf71(0x1fc)])),S(0x1,c[_0x38cf71(0x24d)](M['ThreadCommentModel'])),S(0x2,c[_0x38cf71(0x24d)](c[_0x38cf71(0x231)])),S(0x3,c[_0x38cf71(0x24d)](c['Injector']))],p);const q=_0x38cf71(0x25c),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x2a3409,_0x58297a,_0x50bfbb,_0x145843)=>{for(var _0xff3638=_0x145843>0x1?void 0x0:_0x145843?A(_0x58297a,_0x50bfbb):_0x58297a,_0x2a5843=_0x2a3409['length']-0x1,_0xf1f2bc;_0x2a5843>=0x0;_0x2a5843--)(_0xf1f2bc=_0x2a3409[_0x2a5843])&&(_0xff3638=_0xf1f2bc(_0xff3638)||_0xff3638);return _0xff3638;},_=(_0x5e2289,_0x8461a)=>(_0x27ccbc,_0x348fd8)=>_0x8461a(_0x27ccbc,_0x348fd8,_0x5e2289);function Y(_0x445b5e,_0x1e642a){const _0x186209=_0x38cf71,_0x31af47=_0x445b5e['replies'][0x0];return{..._0x1e642a,'id':_0x31af47['replyId'],'resolved':_0x445b5e[_0x186209(0x262)]===0x1,'dT':f(_0x31af47['createTimestamp']),'personId':_0x31af47[_0x186209(0x1fd)],'threadId':_0x31af47['threadId']};}function G(_0xefe291,_0x3839e1,_0x7de2c0){const _0x1b03f5=_0x38cf71;var _0x462264,_0x27b2b5;if(((_0x27b2b5=(_0x462264=_0xefe291==null?void 0x0:_0xefe291['replies'])==null?void 0x0:_0x462264[_0x1b03f5(0x235)])!=null?_0x27b2b5:0x0)>0x0){const _0x33f4d3=(_0x247c51,_0x5e8cb1)=>({'id':_0x247c51[_0x1b03f5(0x1fe)],'threadId':_0x247c51[_0x1b03f5(0x25b)],'dT':f(_0x247c51[_0x1b03f5(0x24b)]),'personId':_0x247c51[_0x1b03f5(0x1fd)],'resolved':_0xefe291[_0x1b03f5(0x262)]===I['Solved'],'unitId':_0x3839e1,'subUnitId':_0x7de2c0,'text':JSON['parse'](_0x247c51[_0x1b03f5(0x20d)]),'parentId':_0x5e8cb1}),_0x397c24=_0x33f4d3(_0xefe291[_0x1b03f5(0x21e)][0x0]);return{..._0x397c24,'children':_0xefe291[_0x1b03f5(0x21e)]['slice'](0x1)['map'](_0x327059=>_0x33f4d3(_0x327059,_0x397c24['id']))};}return null;}function _0xbe46(_0x5e0777,_0x1ada5f){const _0x471a55=_0x471a();return _0xbe46=function(_0xbe46d1,_0x1ae117){_0xbe46d1=_0xbe46d1-0x1f1;let _0x1017da=_0x471a55[_0xbe46d1];return _0x1017da;},_0xbe46(_0x5e0777,_0x1ada5f);}let g=class{constructor(_0x4e29f3,_0x3c9cfa,_0x27e758,_0x32473d){const _0x411ba8=_0x38cf71;this[_0x411ba8(0x1ff)]=_0x4e29f3,this[_0x411ba8(0x263)]=_0x3c9cfa,this['_sessionService']=_0x27e758,this[_0x411ba8(0x224)]=_0x32473d;}async[_0x38cf71(0x230)](_0x369935){const _0x42b082=_0x38cf71;var _0x1350b9,_0xfc5582;const {parentId:_0x2167e0,unitId:_0x35516c,text:_0x3310e8,threadId:_0x1690c9}=_0x369935,_0x1728d5=(_0xfc5582=(_0x1350b9=_0x3310e8[_0x42b082(0x209)])==null?void 0x0:_0x1350b9[_0x42b082(0x245)](_0x278812=>_0x278812[_0x42b082(0x214)]===c[_0x42b082(0x1f6)][_0x42b082(0x1f7)])[_0x42b082(0x1f2)](_0x14f23b=>_0x14f23b[_0x42b082(0x213)]))!=null?_0xfc5582:[],_0x498da9=JSON['stringify'](_0x3310e8),_0x3d3ded=(await this[_0x42b082(0x23c)][_0x42b082(0x20c)](_0x35516c))['getMemberID']();if(_0x2167e0){const _0x235681={'memberId':_0x3d3ded,'unitId':_0x35516c,'content':_0x498da9,'mention':_0x1728d5,'threadId':_0x1690c9},_0x4120a5=(await this[_0x42b082(0x1ff)][_0x42b082(0x256)](_0x42b082(0x21f)+_0x35516c+_0x42b082(0x244),{'body':_0x235681}))[_0x42b082(0x21d)][_0x42b082(0x21b)];return{..._0x369935,'id':_0x4120a5[_0x42b082(0x1fe)],'dT':c[_0x42b082(0x1f8)](+_0x4120a5[_0x42b082(0x24b)])['format'](_0x42b082(0x25e)),'personId':_0x4120a5[_0x42b082(0x1fd)]};}else{const _0x3dcee3={'memberId':_0x3d3ded,'unitId':_0x35516c,'content':_0x498da9,'mention':_0x1728d5},_0x2c01a5=await this['_httpService'][_0x42b082(0x256)](_0x42b082(0x21f)+_0x35516c+_0x42b082(0x257),{'body':_0x3dcee3});return Y(_0x2c01a5[_0x42b082(0x21d)][_0x42b082(0x246)],_0x369935);}}async[_0x38cf71(0x24a)](_0x58bf31){const _0x319bb3=_0x38cf71;var _0x3cf514,_0xd0fd93;const {text:_0x599fc5,unitId:_0x505184}=_0x58bf31,_0xe42af2=(_0xd0fd93=(_0x3cf514=_0x599fc5[_0x319bb3(0x209)])==null?void 0x0:_0x3cf514[_0x319bb3(0x245)](_0x36d598=>_0x36d598['rangeType']===c[_0x319bb3(0x1f6)][_0x319bb3(0x1f7)])[_0x319bb3(0x1f2)](_0x198f34=>_0x198f34[_0x319bb3(0x213)]))!=null?_0xd0fd93:[],_0xd92408=JSON[_0x319bb3(0x228)](_0x599fc5),_0x238c31=_0x58bf31[_0x319bb3(0x25b)],_0x354715=_0x58bf31['id'],_0x281b07={'memberId':(await this['_sessionService'][_0x319bb3(0x20c)](_0x505184))['getMemberID'](),'unitId':_0x505184,'threadId':_0x238c31,'mention':_0xe42af2,'content':_0xd92408,'replyId':_0x354715},_0x14f732=await this['_httpService'][_0x319bb3(0x256)]('/universer-api/comment/unit/'+_0x505184+'/edit',{'body':_0x281b07});return!_0x14f732[_0x319bb3(0x21d)][_0x319bb3(0x240)]||_0x14f732[_0x319bb3(0x21d)]['error']['code']===0x1;}async[_0x38cf71(0x250)](_0x13577c){const _0x535a5f=_0x38cf71,{unitId:_0x590850}=_0x13577c,_0xa9c6c2=_0x13577c[_0x535a5f(0x25b)],_0x11c5d6={'memberId':this[_0x535a5f(0x263)][_0x535a5f(0x222)]()[_0x535a5f(0x21c)],'unitId':_0x590850,'threadId':_0xa9c6c2,'solved':_0x13577c[_0x535a5f(0x261)]?I[_0x535a5f(0x212)]:I['OpenOrReOpen']},_0xb127f5=await this[_0x535a5f(0x1ff)][_0x535a5f(0x256)](_0x535a5f(0x21f)+_0x590850+_0x535a5f(0x22e),{'body':_0x11c5d6});return!_0xb127f5[_0x535a5f(0x21d)][_0x535a5f(0x240)]||_0xb127f5[_0x535a5f(0x21d)]['error'][_0x535a5f(0x238)]===0x1;}async[_0x38cf71(0x23f)](_0xd391bf,_0x50f7e2,_0x1733a3,_0x4171b7){const _0x483921=_0x38cf71,_0x21dd59={'memberId':(await this[_0x483921(0x23c)][_0x483921(0x20c)](_0xd391bf))['getMemberID'](),'threadId':_0x1733a3,'replyId':_0x4171b7,'unitId':_0xd391bf},_0x15d71a=await this['_httpService'][_0x483921(0x256)](_0x483921(0x21f)+_0xd391bf+_0x483921(0x236),{'body':_0x21dd59});return!_0x15d71a['body'][_0x483921(0x240)]||_0x15d71a[_0x483921(0x21d)][_0x483921(0x240)][_0x483921(0x238)]===0x1;}async[_0x38cf71(0x24e)](_0x12e28b,_0x2d9809,_0x2f7f3b){const _0x46dd27=_0x38cf71,_0x704b2b={'unitId':_0x12e28b,'threadId':_0x2f7f3b},_0x9b1c45=await this[_0x46dd27(0x1ff)]['post']('/universer-api/comment/unit/'+_0x12e28b+_0x46dd27(0x204),{'body':_0x704b2b}),_0x3e9029=_0x2f7f3b[_0x46dd27(0x1f2)](_0x508846=>G(_0x9b1c45[_0x46dd27(0x21d)]['comments'][_0x508846],_0x12e28b,_0x2d9809))[_0x46dd27(0x245)](Boolean);return Object[_0x46dd27(0x259)](_0x9b1c45[_0x46dd27(0x21d)][_0x46dd27(0x211)])['forEach'](_0xab8496=>{const _0x50ef25=_0x46dd27;this[_0x50ef25(0x263)][_0x50ef25(0x22c)](_0xab8496);}),_0x3e9029;}['saveCommentToSnapshot'](_0x1ec8b5){const _0x2eadf8=_0x38cf71;return{'id':_0x1ec8b5['id'],'threadId':_0x1ec8b5[_0x2eadf8(0x25b)],'ref':_0x1ec8b5[_0x2eadf8(0x1f1)]};}};g=x([_(0x0,c[_0x38cf71(0x24d)](P[_0x38cf71(0x1f5)])),_(0x1,c[_0x38cf71(0x24d)](c[_0x38cf71(0x231)])),_(0x2,c['Inject'](b[_0x38cf71(0x221)])),_(0x3,c[_0x38cf71(0x24d)](c[_0x38cf71(0x1fb)]))],g);var H=Object[_0x38cf71(0x25d)],J=(_0x37e67e,_0x25d995,_0x43ae40,_0x1eb05e)=>{const _0x26cb6b=_0x38cf71;for(var _0x50fffc=_0x1eb05e>0x1?void 0x0:_0x1eb05e?H(_0x25d995,_0x43ae40):_0x25d995,_0x211658=_0x37e67e[_0x26cb6b(0x235)]-0x1,_0x2e751c;_0x211658>=0x0;_0x211658--)(_0x2e751c=_0x37e67e[_0x211658])&&(_0x50fffc=_0x2e751c(_0x50fffc)||_0x50fffc);return _0x50fffc;},y=(_0x4c2564,_0x5f1d23)=>(_0x3f9419,_0x1fd8b2)=>_0x5f1d23(_0x3f9419,_0x1fd8b2,_0x4c2564);let C=class extends c[_0x38cf71(0x207)]{constructor(_0x38cbdc,_0x182e9c){const _0x1dbdbe=_0x38cf71;super(),this['_threadCommentDataSourceService']=_0x38cbdc,this[_0x1dbdbe(0x229)]=_0x182e9c,this[_0x1dbdbe(0x241)]();}[_0x38cf71(0x241)](){const _0x87c0c0=_0x38cf71;this[_0x87c0c0(0x223)][_0x87c0c0(0x220)]=this[_0x87c0c0(0x229)],this[_0x87c0c0(0x223)][_0x87c0c0(0x25f)]=!0x1;}};C=J([y(0x0,M[_0x38cf71(0x1f9)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x38cf71(0x254)],L=Object[_0x38cf71(0x25d)],Z=(_0x4ecabd,_0x527837,_0x5a8e8c)=>_0x527837 in _0x4ecabd?F(_0x4ecabd,_0x527837,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a8e8c}):_0x4ecabd[_0x527837]=_0x5a8e8c,W=(_0x131d6a,_0x30782f,_0x56155b,_0x2562e4)=>{for(var _0x19fd61=_0x2562e4>0x1?void 0x0:_0x2562e4?L(_0x30782f,_0x56155b):_0x30782f,_0x2c66ec=_0x131d6a['length']-0x1,_0x45be89;_0x2c66ec>=0x0;_0x2c66ec--)(_0x45be89=_0x131d6a[_0x2c66ec])&&(_0x19fd61=_0x45be89(_0x19fd61)||_0x19fd61);return _0x19fd61;},O=(_0x3757d8,_0x50a102)=>(_0xdc49e6,_0x2440d7)=>_0x50a102(_0xdc49e6,_0x2440d7,_0x3757d8),N=(_0x5499f3,_0x111cae,_0x4b78ba)=>Z(_0x5499f3,typeof _0x111cae!='symbol'?_0x111cae+'':_0x111cae,_0x4b78ba);exports[_0x38cf71(0x25a)]=class extends c[_0x38cf71(0x205)]{constructor(_0xbd1d88=D,_0x34efee,_0x545385){const _0x59505d=_0x38cf71;super(),this[_0x59505d(0x210)]=_0xbd1d88,this['_injector']=_0x34efee,this[_0x59505d(0x203)]=_0x545385;const {..._0x3c1e95}=c['merge']({},D,this[_0x59505d(0x210)]);this['_configService'][_0x59505d(0x265)](q,_0x3c1e95);}[_0x38cf71(0x208)](){const _0x2af158=_0x38cf71;[[g],[C],[p]][_0x2af158(0x24f)](_0x3b235a=>{const _0x3f9823=_0x2af158;this[_0x3f9823(0x224)][_0x3f9823(0x267)](_0x3b235a);});}[_0x38cf71(0x206)](){const _0x3b1f48=_0x38cf71;this[_0x3b1f48(0x224)][_0x3b1f48(0x247)](C),this[_0x3b1f48(0x224)][_0x3b1f48(0x247)](p);}},N(exports[_0x38cf71(0x25a)],_0x38cf71(0x217),U),N(exports[_0x38cf71(0x25a)],'type',c['UniverInstanceType'][_0x38cf71(0x20e)]),exports[_0x38cf71(0x25a)]=W([c['DependentOn'](j[_0x38cf71(0x218)],b[_0x38cf71(0x269)],T[_0x38cf71(0x237)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x38cf71(0x1fa)])],exports[_0x38cf71(0x25a)]);function _0x471a(){const _0x462e62=['_configService','/list','Plugin','onReady','Disposable','onStarting','customRanges','_init','368bUvyZW','requireSession','content','UNIVER_UNKNOWN','Reply','_config','users','Solved','rangeId','rangeType','1098zwZRyG','subscribe','pluginName','UniverThreadCommentUIPlugin','_threadCommentModel','/universer-api/user/list','reply','userID','body','replies','/universer-api/comment/unit/','dataSource','CollaborationSessionService','getCurrentUser','_threadCommentDataSourceService','_injector','getUnit','payload','OpenOrReOpen','stringify','_threadCommentDataSource','12240eujxuZ','parse','addUser','422005GcUGrP','/solved','_initUserSync','addComment','UserManagerService','find','getUser','pipe','length','/delete','UniverLicensePlugin','code','1790988anasjg','Unknown','13023gApdRJ','_sessionService','Solve','Delete','deleteComment','error','_initDataSource','1048hbaQoR','disposeWithMe','/reply','filter','comment','get','commentUpdate$','2822175GHbELb','updateComment','createTimestamp','_commentService','Inject','listComments','forEach','resolveComment','27867nyspuN','user','parentId','defineProperty','toStringTag','post','/add','Edit','values','UniverThreadCommentDataSourcePlugin','threadId','thread-comment-data-source.config','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','Module','resolved','solved','_userService','type','setConfig','unitId','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverCollaborationClientPlugin','ref','map','UNRECOGNIZED','size','HTTPService','CustomRangeType','COMMENT','dayjs','IThreadCommentDataSourceService','IConfigService','Injector','CommentService','userId','replyId','_httpService','Add','6989280DJOiWP','personId'];_0x471a=function(){return _0x462e62;};return _0x471a();}
1
+ 'use strict';const _0x1ee313=_0x8821;(function(_0xd6125e,_0x2e894d){const _0x52bbd9=_0x8821,_0x4f9197=_0xd6125e();while(!![]){try{const _0x418bf8=-parseInt(_0x52bbd9(0x16a))/0x1*(-parseInt(_0x52bbd9(0x13c))/0x2)+-parseInt(_0x52bbd9(0x156))/0x3+-parseInt(_0x52bbd9(0x175))/0x4+-parseInt(_0x52bbd9(0x11b))/0x5*(-parseInt(_0x52bbd9(0x10f))/0x6)+parseInt(_0x52bbd9(0x14c))/0x7+-parseInt(_0x52bbd9(0x158))/0x8*(parseInt(_0x52bbd9(0x17a))/0x9)+parseInt(_0x52bbd9(0x138))/0xa*(-parseInt(_0x52bbd9(0x15e))/0xb);if(_0x418bf8===_0x2e894d)break;else _0x4f9197['push'](_0x4f9197['shift']());}catch(_0x6c81ff){_0x4f9197['push'](_0x4f9197['shift']());}}}(_0x285e,0x5f575));Object[_0x1ee313(0x14b)](exports,Symbol[_0x1ee313(0x143)],{'value':_0x1ee313(0x125)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x1ee313(0x146);var I=(_0x40ff79=>(_0x40ff79[_0x40ff79[_0x1ee313(0x119)]=0x0]='OpenOrReOpen',_0x40ff79[_0x40ff79[_0x1ee313(0x115)]=0x1]=_0x1ee313(0x115),_0x40ff79[_0x40ff79[_0x1ee313(0x159)]=-0x1]='UNRECOGNIZED',_0x40ff79))(I||{}),v=(_0xdea46e=>(_0xdea46e[_0xdea46e[_0x1ee313(0x11c)]=0x0]=_0x1ee313(0x11c),_0xdea46e[_0xdea46e[_0x1ee313(0x150)]=0x1]='Add',_0xdea46e[_0xdea46e[_0x1ee313(0x11f)]=0x2]=_0x1ee313(0x11f),_0xdea46e[_0xdea46e['Edit']=0x3]=_0x1ee313(0x165),_0xdea46e[_0xdea46e[_0x1ee313(0x121)]=0x4]=_0x1ee313(0x121),_0xdea46e[_0xdea46e[_0x1ee313(0x177)]=0x5]='Solve',_0xdea46e[_0xdea46e['UNRECOGNIZED']=-0x1]=_0x1ee313(0x159),_0xdea46e))(v||{});const f=_0x4eb6d1=>c[_0x1ee313(0x116)](new Date(+_0x4eb6d1))['format'](_0x1ee313(0x149)),R=async(_0x539232,_0xe057)=>{const _0x20e06c=_0x1ee313,_0x341d8b=_0x539232[_0x20e06c(0x169)](c['UserManagerService']),_0x4aa305=_0x539232[_0x20e06c(0x169)](P[_0x20e06c(0x15d)]);_0xe057[_0x20e06c(0x12a)](_0x2d07a6=>{const _0x47e970=_0x20e06c;_0x341d8b['getUser'](_0x2d07a6)&&_0xe057[_0x47e970(0x133)](_0x2d07a6);}),_0xe057[_0x20e06c(0xfe)]&&(await _0x4aa305[_0x20e06c(0x169)](_0x20e06c(0x132),{'params':{'userIDs':[..._0xe057]}}))[_0x20e06c(0xfd)]['users']['forEach'](_0x5b7221=>{_0x5b7221&&_0x341d8b['addUser'](_0x5b7221);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x59e2b5,_0xc24bb3,_0x1d8274,_0x4db8b2)=>{const _0x4c633c=_0x1ee313;for(var _0x5c0e9e=_0x4db8b2>0x1?void 0x0:_0x4db8b2?$(_0xc24bb3,_0x1d8274):_0xc24bb3,_0x39ae1b=_0x59e2b5[_0x4c633c(0x154)]-0x1,_0x3af85d;_0x39ae1b>=0x0;_0x39ae1b--)(_0x3af85d=_0x59e2b5[_0x39ae1b])&&(_0x5c0e9e=_0x3af85d(_0x5c0e9e)||_0x5c0e9e);return _0x5c0e9e;},S=(_0x1039d4,_0x5d0c9a)=>(_0x546ff8,_0x5bb6ce)=>_0x5d0c9a(_0x546ff8,_0x5bb6ce,_0x1039d4);let p=class extends c[_0x1ee313(0x120)]{constructor(_0x74f46c,_0x1f5821,_0x1d3d13,_0x196ab0){const _0x2331bf=_0x1ee313;super(),this[_0x2331bf(0x144)]=_0x74f46c,this[_0x2331bf(0x112)]=_0x1f5821,this[_0x2331bf(0x172)]=_0x1d3d13,this['_injector']=_0x196ab0,this[_0x2331bf(0x107)](),this[_0x2331bf(0x111)]();}[_0x1ee313(0x111)](){const _0x75501f=_0x1ee313;this[_0x75501f(0x179)](this[_0x75501f(0x112)][_0x75501f(0x12b)][_0x75501f(0x12e)](w[_0x75501f(0x103)](0x10))['subscribe'](_0x303f12=>{const _0x521f6a=_0x75501f,_0x4d77e1=new Set();_0x303f12['forEach'](_0x3df2d5=>{const _0x5bd2f2=_0x8821;switch(_0x3df2d5[_0x5bd2f2(0x14f)]){case _0x5bd2f2(0x13a):{const _0x4de8e6=_0x3df2d5[_0x5bd2f2(0x137)]['personId'];_0x4d77e1[_0x5bd2f2(0x13a)](_0x4de8e6);break;}}}),R(this[_0x521f6a(0x106)],_0x4d77e1);}));}[_0x1ee313(0x107)](){const _0x3cfd66=_0x1ee313;this[_0x3cfd66(0x179)](this['_commentService'][_0x3cfd66(0x12b)][_0x3cfd66(0x155)](async _0x554f39=>{const _0x12c074=_0x3cfd66;var _0x44b1e7,_0x4d3117,_0x457ffb,_0x471487;const _0x3f1be2=(_0x44b1e7=this[_0x12c074(0x112)][_0x12c074(0x162)](_0x554f39[_0x12c074(0x147)])[_0x12c074(0x16f)](_0x2fb9c1=>_0x2fb9c1[_0x12c074(0x136)]===_0x554f39[_0x12c074(0x136)]))==null?void 0x0:_0x44b1e7[_0x12c074(0x16b)];if(!_0x3f1be2)return;const {unitId:_0x56f8bf,subUnitId:_0x2d138d}=_0x3f1be2;switch(_0x554f39[_0x12c074(0x166)]&&this[_0x12c074(0x172)]['addUser'](_0x554f39[_0x12c074(0x166)]),_0x554f39[_0x12c074(0x14f)]){case v[_0x12c074(0x150)]:break;case v[_0x12c074(0x11f)]:{this[_0x12c074(0x112)][_0x12c074(0x105)](_0x56f8bf,_0x2d138d,{'unitId':_0x56f8bf,'subUnitId':_0x2d138d,'ref':'','id':_0x554f39[_0x12c074(0x15b)],'dT':f(+_0x554f39[_0x12c074(0x170)]),'threadId':_0x554f39[_0x12c074(0x136)],'personId':(_0x457ffb=(_0x4d3117=_0x554f39[_0x12c074(0x166)])==null?void 0x0:_0x4d3117[_0x12c074(0x140)])!=null?_0x457ffb:_0x554f39[_0x12c074(0x118)],'text':JSON[_0x12c074(0x13b)](_0x554f39[_0x12c074(0x13d)]),'parentId':_0x3f1be2['id']});break;}case v['Delete']:{const _0x5f171b=this[_0x12c074(0x112)][_0x12c074(0x163)](_0x56f8bf,_0x2d138d,_0x554f39[_0x12c074(0x15b)]);_0x5f171b&&_0x5f171b[_0x12c074(0x12c)]&&this[_0x12c074(0x112)][_0x12c074(0x174)](_0x56f8bf,_0x2d138d,_0x554f39[_0x12c074(0x15b)]);break;}case v[_0x12c074(0x165)]:{this[_0x12c074(0x112)]['updateComment'](_0x56f8bf,_0x2d138d,{'commentId':_0x554f39[_0x12c074(0x15b)],'text':JSON['parse'](_0x554f39[_0x12c074(0x13d)])});break;}case v[_0x12c074(0x177)]:{const _0x5bdbc8=(_0x471487=this[_0x12c074(0x112)][_0x12c074(0x162)](_0x554f39[_0x12c074(0x147)])[_0x12c074(0x16f)](_0x1e5e55=>_0x1e5e55[_0x12c074(0x136)]===_0x554f39[_0x12c074(0x136)]))==null?void 0x0:_0x471487[_0x12c074(0x16b)];_0x5bdbc8&&this[_0x12c074(0x112)][_0x12c074(0x168)](_0x56f8bf,_0x2d138d,_0x5bdbc8['id'],_0x554f39[_0x12c074(0x142)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x1ee313(0x122)](b[_0x1ee313(0x14e)])),S(0x1,c[_0x1ee313(0x122)](M[_0x1ee313(0x167)])),S(0x2,c[_0x1ee313(0x122)](c[_0x1ee313(0x100)])),S(0x3,c[_0x1ee313(0x122)](c[_0x1ee313(0x10c)]))],p);function _0x8821(_0x124200,_0x1b3e5e){const _0x285e0c=_0x285e();return _0x8821=function(_0x882193,_0x41ff5f){_0x882193=_0x882193-0xfd;let _0xfe0b0c=_0x285e0c[_0x882193];return _0xfe0b0c;},_0x8821(_0x124200,_0x1b3e5e);}const q=_0x1ee313(0x126),D={};var A=Object[_0x1ee313(0x130)],x=(_0x5f0cf4,_0x3506f0,_0x51460,_0xc5d3e8)=>{const _0x174994=_0x1ee313;for(var _0x54bcfb=_0xc5d3e8>0x1?void 0x0:_0xc5d3e8?A(_0x3506f0,_0x51460):_0x3506f0,_0x53dc55=_0x5f0cf4[_0x174994(0x154)]-0x1,_0x39b2af;_0x53dc55>=0x0;_0x53dc55--)(_0x39b2af=_0x5f0cf4[_0x53dc55])&&(_0x54bcfb=_0x39b2af(_0x54bcfb)||_0x54bcfb);return _0x54bcfb;},_=(_0x1f20db,_0x262c5a)=>(_0x113cac,_0x38f838)=>_0x262c5a(_0x113cac,_0x38f838,_0x1f20db);function Y(_0x171864,_0x42feff){const _0x2e9a3f=_0x1ee313,_0x4e87df=_0x171864[_0x2e9a3f(0x11d)][0x0];return{..._0x42feff,'id':_0x4e87df[_0x2e9a3f(0x15b)],'resolved':_0x171864[_0x2e9a3f(0x142)]===0x1,'dT':f(_0x4e87df['createTimestamp']),'personId':_0x4e87df[_0x2e9a3f(0x118)],'threadId':_0x4e87df[_0x2e9a3f(0x136)]};}function G(_0x40b8b0,_0x520e26,_0x5cd030){const _0x1c16ae=_0x1ee313;var _0x2c35b6,_0x56fdce;if(((_0x56fdce=(_0x2c35b6=_0x40b8b0==null?void 0x0:_0x40b8b0[_0x1c16ae(0x11d)])==null?void 0x0:_0x2c35b6[_0x1c16ae(0x154)])!=null?_0x56fdce:0x0)>0x0){const _0x375027=(_0x4f1d46,_0x2bdc2b)=>({'id':_0x4f1d46['replyId'],'threadId':_0x4f1d46[_0x1c16ae(0x136)],'dT':f(_0x4f1d46['createTimestamp']),'personId':_0x4f1d46[_0x1c16ae(0x118)],'resolved':_0x40b8b0[_0x1c16ae(0x142)]===I[_0x1c16ae(0x115)],'unitId':_0x520e26,'subUnitId':_0x5cd030,'text':JSON[_0x1c16ae(0x13b)](_0x4f1d46[_0x1c16ae(0x13d)]),'parentId':_0x2bdc2b}),_0xf2e19c=_0x375027(_0x40b8b0[_0x1c16ae(0x11d)][0x0]);return{..._0xf2e19c,'children':_0x40b8b0[_0x1c16ae(0x11d)][_0x1c16ae(0x114)](0x1)[_0x1c16ae(0x151)](_0xf5aada=>_0x375027(_0xf5aada,_0xf2e19c['id']))};}return null;}let g=class{constructor(_0x61d8ae,_0x33f10b,_0x368f37,_0x536d5c){const _0x77204c=_0x1ee313;this[_0x77204c(0x104)]=_0x61d8ae,this[_0x77204c(0x172)]=_0x33f10b,this[_0x77204c(0x128)]=_0x368f37,this[_0x77204c(0x106)]=_0x536d5c;}async[_0x1ee313(0x105)](_0x5ef236){const _0x557e2a=_0x1ee313;var _0x22dbca,_0x4b6e78;const {parentId:_0x4aad23,unitId:_0x511126,text:_0x2450a7,threadId:_0x591ab9}=_0x5ef236,_0x445569=(_0x4b6e78=(_0x22dbca=_0x2450a7[_0x557e2a(0x10e)])==null?void 0x0:_0x22dbca['filter'](_0x5d13a1=>_0x5d13a1[_0x557e2a(0x135)]===c[_0x557e2a(0x15f)][_0x557e2a(0x127)])[_0x557e2a(0x151)](_0x42e654=>_0x42e654[_0x557e2a(0x13e)]))!=null?_0x4b6e78:[],_0x53e5db=JSON[_0x557e2a(0x139)](_0x2450a7),_0x123a9c=(await this[_0x557e2a(0x128)][_0x557e2a(0x14a)](_0x511126))['getMemberID']();if(_0x4aad23){const _0x11e868={'memberId':_0x123a9c,'unitId':_0x511126,'content':_0x53e5db,'mention':_0x445569,'threadId':_0x591ab9},_0x2b4278=(await this[_0x557e2a(0x104)][_0x557e2a(0x102)](_0x557e2a(0x110)+_0x511126+_0x557e2a(0x109),{'body':_0x11e868}))[_0x557e2a(0xfd)][_0x557e2a(0x161)];return{..._0x5ef236,'id':_0x2b4278[_0x557e2a(0x15b)],'dT':c['dayjs'](+_0x2b4278[_0x557e2a(0x170)])[_0x557e2a(0x157)](_0x557e2a(0x149)),'personId':_0x2b4278[_0x557e2a(0x118)]};}else{const _0x3582dd={'memberId':_0x123a9c,'unitId':_0x511126,'content':_0x53e5db,'mention':_0x445569},_0x40c654=await this[_0x557e2a(0x104)]['post'](_0x557e2a(0x110)+_0x511126+_0x557e2a(0x17b),{'body':_0x3582dd});return Y(_0x40c654['body'][_0x557e2a(0x12f)],_0x5ef236);}}async[_0x1ee313(0x11e)](_0x41f330){const _0x4578ca=_0x1ee313;var _0x2dd795,_0x5de8e9;const {text:_0x3ea936,unitId:_0x574ccd}=_0x41f330,_0x5b3e23=(_0x5de8e9=(_0x2dd795=_0x3ea936[_0x4578ca(0x10e)])==null?void 0x0:_0x2dd795[_0x4578ca(0x141)](_0x424670=>_0x424670[_0x4578ca(0x135)]===c[_0x4578ca(0x15f)][_0x4578ca(0x127)])[_0x4578ca(0x151)](_0x5d71f7=>_0x5d71f7[_0x4578ca(0x13e)]))!=null?_0x5de8e9:[],_0x101959=JSON['stringify'](_0x3ea936),_0x272672=_0x41f330[_0x4578ca(0x136)],_0x34fdb1=_0x41f330['id'],_0xbcc5f6={'memberId':(await this[_0x4578ca(0x128)][_0x4578ca(0x14a)](_0x574ccd))['getMemberID'](),'unitId':_0x574ccd,'threadId':_0x272672,'mention':_0x5b3e23,'content':_0x101959,'replyId':_0x34fdb1},_0x352a86=await this[_0x4578ca(0x104)]['post'](_0x4578ca(0x110)+_0x574ccd+_0x4578ca(0x164),{'body':_0xbcc5f6});return!_0x352a86[_0x4578ca(0xfd)]['error']||_0x352a86[_0x4578ca(0xfd)]['error'][_0x4578ca(0x13f)]===0x1;}async[_0x1ee313(0x168)](_0x5594bb){const _0x3d2212=_0x1ee313,{unitId:_0x373f3c}=_0x5594bb,_0x14d44b=_0x5594bb[_0x3d2212(0x136)],_0x15d3bc={'memberId':this[_0x3d2212(0x172)]['getCurrentUser']()['userID'],'unitId':_0x373f3c,'threadId':_0x14d44b,'solved':_0x5594bb[_0x3d2212(0x129)]?I[_0x3d2212(0x115)]:I[_0x3d2212(0x119)]},_0x59aca0=await this[_0x3d2212(0x104)][_0x3d2212(0x102)]('/universer-api/comment/unit/'+_0x373f3c+_0x3d2212(0x16e),{'body':_0x15d3bc});return!_0x59aca0['body'][_0x3d2212(0x14d)]||_0x59aca0[_0x3d2212(0xfd)][_0x3d2212(0x14d)]['code']===0x1;}async[_0x1ee313(0x174)](_0x22e5ab,_0x32a87d,_0x2281ad,_0x39190d){const _0x1a07ed=_0x1ee313,_0x4ceb28={'memberId':(await this[_0x1a07ed(0x128)][_0x1a07ed(0x14a)](_0x22e5ab))[_0x1a07ed(0x153)](),'threadId':_0x2281ad,'replyId':_0x39190d,'unitId':_0x22e5ab},_0x4ad1ab=await this[_0x1a07ed(0x104)][_0x1a07ed(0x102)]('/universer-api/comment/unit/'+_0x22e5ab+_0x1a07ed(0x117),{'body':_0x4ceb28});return!_0x4ad1ab[_0x1a07ed(0xfd)][_0x1a07ed(0x14d)]||_0x4ad1ab['body']['error'][_0x1a07ed(0x13f)]===0x1;}async['listComments'](_0x595262,_0x5cbf30,_0x4b5078){const _0x5d0e80=_0x1ee313,_0x342db0={'unitId':_0x595262,'threadId':_0x4b5078},_0x2c26ea=await this[_0x5d0e80(0x104)][_0x5d0e80(0x102)](_0x5d0e80(0x110)+_0x595262+_0x5d0e80(0x15c),{'body':_0x342db0}),_0x4bdaba=_0x4b5078[_0x5d0e80(0x151)](_0x184b6f=>G(_0x2c26ea[_0x5d0e80(0xfd)][_0x5d0e80(0x152)][_0x184b6f],_0x595262,_0x5cbf30))[_0x5d0e80(0x141)](Boolean);return Object[_0x5d0e80(0x145)](_0x2c26ea[_0x5d0e80(0xfd)]['users'])[_0x5d0e80(0x12a)](_0x50fabc=>{const _0x16150a=_0x5d0e80;this[_0x16150a(0x172)][_0x16150a(0x16c)](_0x50fabc);}),_0x4bdaba;}['saveCommentToSnapshot'](_0x3c70be){const _0x4bd35d=_0x1ee313;return{'id':_0x3c70be['id'],'threadId':_0x3c70be[_0x4bd35d(0x136)],'ref':_0x3c70be[_0x4bd35d(0x11a)]};}};g=x([_(0x0,c[_0x1ee313(0x122)](P[_0x1ee313(0x15d)])),_(0x1,c[_0x1ee313(0x122)](c[_0x1ee313(0x100)])),_(0x2,c[_0x1ee313(0x122)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x1ee313(0x10c)]))],g);var H=Object[_0x1ee313(0x130)],J=(_0x505bbd,_0x345574,_0x2dbf18,_0x196ce3)=>{for(var _0x119194=_0x196ce3>0x1?void 0x0:_0x196ce3?H(_0x345574,_0x2dbf18):_0x345574,_0x1c7256=_0x505bbd['length']-0x1,_0x493458;_0x1c7256>=0x0;_0x1c7256--)(_0x493458=_0x505bbd[_0x1c7256])&&(_0x119194=_0x493458(_0x119194)||_0x119194);return _0x119194;},y=(_0x22d24b,_0x30510e)=>(_0x5d233a,_0x31622b)=>_0x30510e(_0x5d233a,_0x31622b,_0x22d24b);let C=class extends c[_0x1ee313(0x120)]{constructor(_0x30b563,_0x1fa986){const _0x25df2d=_0x1ee313;super(),this[_0x25df2d(0x123)]=_0x30b563,this[_0x25df2d(0x160)]=_0x1fa986,this[_0x25df2d(0x12d)]();}[_0x1ee313(0x12d)](){const _0x22b58c=_0x1ee313;this[_0x22b58c(0x123)]['dataSource']=this[_0x22b58c(0x160)],this[_0x22b58c(0x123)][_0x22b58c(0x124)]=!0x1;}};C=J([y(0x0,M[_0x1ee313(0x10b)]),y(0x1,c[_0x1ee313(0x122)](g))],C);var F=Object['defineProperty'],L=Object[_0x1ee313(0x130)],Z=(_0xa9cc32,_0x518f0a,_0x5df569)=>_0x518f0a in _0xa9cc32?F(_0xa9cc32,_0x518f0a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5df569}):_0xa9cc32[_0x518f0a]=_0x5df569,W=(_0x34b1cf,_0xf7a7df,_0xd6c18a,_0x18d284)=>{for(var _0x35b102=_0x18d284>0x1?void 0x0:_0x18d284?L(_0xf7a7df,_0xd6c18a):_0xf7a7df,_0x1f2f2d=_0x34b1cf['length']-0x1,_0x19b835;_0x1f2f2d>=0x0;_0x1f2f2d--)(_0x19b835=_0x34b1cf[_0x1f2f2d])&&(_0x35b102=_0x19b835(_0x35b102)||_0x35b102);return _0x35b102;},O=(_0x44f149,_0xf0b2b)=>(_0x2df297,_0x6ba8eb)=>_0xf0b2b(_0x2df297,_0x6ba8eb,_0x44f149),N=(_0xcb12ae,_0x4fa359,_0x40d2af)=>Z(_0xcb12ae,typeof _0x4fa359!='symbol'?_0x4fa359+'':_0x4fa359,_0x40d2af);function _0x285e(){const _0x38b8a4=['/solved','find','createTimestamp','_configService','_userService','setConfig','deleteComment','1043140wivEkF','UniverLicensePlugin','Solve','UNIVER_UNKNOWN','disposeWithMe','27gKEula','/add','body','size','merge','UserManagerService','onStarting','post','bufferTime','_httpService','addComment','_injector','_init','DependentOn','/reply','UniverInstanceType','IThreadCommentDataSourceService','Injector','IConfigService','customRanges','42ftgftb','/universer-api/comment/unit/','_initUserSync','_threadCommentModel','Plugin','slice','Solved','dayjs','/delete','userId','OpenOrReOpen','ref','549205HGHRyf','Unknown','replies','updateComment','Reply','Disposable','Delete','Inject','_threadCommentDataSourceService','syncUpdateMutationToColla','Module','thread-comment-data-source.config','COMMENT','_sessionService','resolved','forEach','commentUpdate$','parentId','_initDataSource','pipe','comment','getOwnPropertyDescriptor','pluginName','/universer-api/user/list','delete','_config','rangeType','threadId','payload','2526070OujRHZ','stringify','add','parse','2SnAHrM','content','rangeId','code','userID','filter','solved','toStringTag','_commentService','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','requireSession','defineProperty','4746791pYIeXJ','error','CommentService','type','Add','map','comments','getMemberID','length','subscribe','586437IsXDWy','format','1334584NddCjx','UNRECOGNIZED','onReady','replyId','/list','HTTPService','22YqfgeR','CustomRangeType','_threadCommentDataSource','reply','getUnit','getComment','/edit','Edit','user','ThreadCommentModel','resolveComment','get','405464xUiwrx','root','addUser','UniverThreadCommentDataSourcePlugin'];_0x285e=function(){return _0x38b8a4;};return _0x285e();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1ee313(0x113)]{constructor(_0x21a91f=D,_0x595c06,_0x270881){const _0x1c2804=_0x1ee313;super(),this[_0x1c2804(0x134)]=_0x21a91f,this[_0x1c2804(0x106)]=_0x595c06,this[_0x1c2804(0x171)]=_0x270881;const {..._0x450b60}=c[_0x1c2804(0xff)]({},D,this[_0x1c2804(0x134)]);this['_configService'][_0x1c2804(0x173)](q,_0x450b60);}[_0x1ee313(0x101)](){[[g],[C],[p]]['forEach'](_0x1e13bc=>{const _0x532581=_0x8821;this[_0x532581(0x106)][_0x532581(0x13a)](_0x1e13bc);});}[_0x1ee313(0x15a)](){const _0x1ae853=_0x1ee313;this[_0x1ae853(0x106)][_0x1ae853(0x169)](C),this[_0x1ae853(0x106)][_0x1ae853(0x169)](p);}},N(exports[_0x1ee313(0x16d)],_0x1ee313(0x131),U),N(exports[_0x1ee313(0x16d)],'type',c[_0x1ee313(0x10a)][_0x1ee313(0x178)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1ee313(0x108)](j['UniverThreadCommentUIPlugin'],b[_0x1ee313(0x148)],T[_0x1ee313(0x176)]),O(0x1,c[_0x1ee313(0x122)](c[_0x1ee313(0x10c)])),O(0x2,c[_0x1ee313(0x10d)])],exports[_0x1ee313(0x16d)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2b67(_0x2aefbe,_0x588d6f){const _0x559265=_0x5592();return _0x2b67=function(_0x2b67e1,_0xae60de){_0x2b67e1=_0x2b67e1-0x1d4;let _0x579e86=_0x559265[_0x2b67e1];return _0x579e86;},_0x2b67(_0x2aefbe,_0x588d6f);}const _0x275b95=_0x2b67;(function(_0x9479bb,_0x500c32){const _0x185372=_0x2b67,_0xd16a45=_0x9479bb();while(!![]){try{const _0x4d6f60=-parseInt(_0x185372(0x211))/0x1*(parseInt(_0x185372(0x1ea))/0x2)+-parseInt(_0x185372(0x224))/0x3+-parseInt(_0x185372(0x1dd))/0x4*(parseInt(_0x185372(0x227))/0x5)+parseInt(_0x185372(0x200))/0x6+parseInt(_0x185372(0x1fe))/0x7*(-parseInt(_0x185372(0x22e))/0x8)+-parseInt(_0x185372(0x1e3))/0x9+-parseInt(_0x185372(0x1ff))/0xa*(-parseInt(_0x185372(0x1d9))/0xb);if(_0x4d6f60===_0x500c32)break;else _0xd16a45['push'](_0xd16a45['shift']());}catch(_0x48112f){_0xd16a45['push'](_0xd16a45['shift']());}}}(_0x5592,0x5045d));import{CommentService as _0x4c6d8e,CollaborationSessionService as _0x528287,UniverCollaborationClientPlugin as _0x1b7631}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1b92c7}from'@univerjs-pro/license';import{dayjs as _0x9eacb9,UserManagerService as _0x3c6fd5,Inject as _0x33b5e2,Injector as _0x1950b2,Disposable as _0x2f3545,CustomRangeType as _0xacb558,UniverInstanceType as _0x4a5fef,DependentOn as _0x4301fe,IConfigService as _0x4ef3a8,Plugin as _0x5bf589,merge as _0x35101e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x998630}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1fa1fb,IThreadCommentDataSourceService as _0x1c0daa}from'@univerjs/thread-comment';import{bufferTime as _0x49b8b8}from'rxjs';import{HTTPService as _0x770764}from'@univerjs/network';const W=_0x275b95(0x225);var I=(_0x1d8b21=>(_0x1d8b21[_0x1d8b21[_0x275b95(0x226)]=0x0]=_0x275b95(0x226),_0x1d8b21[_0x1d8b21[_0x275b95(0x214)]=0x1]=_0x275b95(0x214),_0x1d8b21[_0x1d8b21[_0x275b95(0x1d4)]=-0x1]=_0x275b95(0x1d4),_0x1d8b21))(I||{}),v=(_0x2d17aa=>(_0x2d17aa[_0x2d17aa[_0x275b95(0x20f)]=0x0]='Unknown',_0x2d17aa[_0x2d17aa[_0x275b95(0x232)]=0x1]=_0x275b95(0x232),_0x2d17aa[_0x2d17aa[_0x275b95(0x1d8)]=0x2]=_0x275b95(0x1d8),_0x2d17aa[_0x2d17aa[_0x275b95(0x223)]=0x3]=_0x275b95(0x223),_0x2d17aa[_0x2d17aa[_0x275b95(0x1e4)]=0x4]=_0x275b95(0x1e4),_0x2d17aa[_0x2d17aa[_0x275b95(0x209)]=0x5]='Solve',_0x2d17aa[_0x2d17aa['UNRECOGNIZED']=-0x1]=_0x275b95(0x1d4),_0x2d17aa))(v||{});const D=_0x4f4d96=>_0x9eacb9(new Date(+_0x4f4d96))[_0x275b95(0x217)](_0x275b95(0x1f9)),B=async(_0x201528,_0x90313a)=>{const _0x398b34=_0x275b95,_0x26f22a=_0x201528[_0x398b34(0x212)](_0x3c6fd5),_0x2e69ad=_0x201528['get'](_0x770764);_0x90313a[_0x398b34(0x1e5)](_0xcffbd=>{const _0x236b65=_0x398b34;_0x26f22a[_0x236b65(0x20e)](_0xcffbd)&&_0x90313a[_0x236b65(0x20d)](_0xcffbd);}),_0x90313a[_0x398b34(0x1e0)]&&(await _0x2e69ad['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x90313a]}}))[_0x398b34(0x1f1)][_0x398b34(0x1ed)][_0x398b34(0x1e5)](_0x4fafcc=>{const _0x48b44d=_0x398b34;_0x4fafcc&&_0x26f22a[_0x48b44d(0x1df)](_0x4fafcc);});};var K=Object[_0x275b95(0x228)],V=(_0xf5cc96,_0x210b97,_0xa2e178,_0x5922da)=>{for(var _0x28489c=_0x5922da>0x1?void 0x0:_0x5922da?K(_0x210b97,_0xa2e178):_0x210b97,_0x221bad=_0xf5cc96['length']-0x1,_0x5ab146;_0x221bad>=0x0;_0x221bad--)(_0x5ab146=_0xf5cc96[_0x221bad])&&(_0x28489c=_0x5ab146(_0x28489c)||_0x28489c);return _0x28489c;},p=(_0x3ea34f,_0x13d03c)=>(_0x54ddf2,_0x82609f)=>_0x13d03c(_0x54ddf2,_0x82609f,_0x3ea34f);let S=class extends _0x2f3545{constructor(_0x289017,_0xeb0336,_0x22280e,_0x298870){const _0x17b64d=_0x275b95;super(),this[_0x17b64d(0x203)]=_0x289017,this[_0x17b64d(0x205)]=_0xeb0336,this['_userService']=_0x22280e,this[_0x17b64d(0x229)]=_0x298870,this[_0x17b64d(0x20b)](),this['_initUserSync']();}[_0x275b95(0x237)](){const _0x8820c=_0x275b95;this[_0x8820c(0x207)](this['_threadCommentModel']['commentUpdate$'][_0x8820c(0x1ee)](_0x49b8b8(0x10))[_0x8820c(0x218)](_0x20e8ce=>{const _0x560ed5=_0x8820c,_0xccb9c5=new Set();_0x20e8ce['forEach'](_0x2ecd40=>{const _0x343aeb=_0x2b67;switch(_0x2ecd40['type']){case'add':{const _0x503129=_0x2ecd40[_0x343aeb(0x219)][_0x343aeb(0x23a)];_0xccb9c5[_0x343aeb(0x1f4)](_0x503129);break;}}}),B(this[_0x560ed5(0x229)],_0xccb9c5);}));}[_0x275b95(0x20b)](){const _0x4d6d2f=_0x275b95;this[_0x4d6d2f(0x207)](this[_0x4d6d2f(0x203)][_0x4d6d2f(0x1dc)][_0x4d6d2f(0x218)](async _0x29a217=>{const _0x271beb=_0x4d6d2f;var _0x490851,_0x4614bd,_0x1d0cd2,_0x33999b;const _0x234be6=(_0x490851=this[_0x271beb(0x205)]['getUnit'](_0x29a217[_0x271beb(0x235)])['find'](_0x28b820=>_0x28b820[_0x271beb(0x21b)]===_0x29a217[_0x271beb(0x21b)]))==null?void 0x0:_0x490851[_0x271beb(0x234)];if(!_0x234be6)return;const {unitId:_0x4cf2ce,subUnitId:_0x49add2}=_0x234be6;switch(_0x29a217[_0x271beb(0x1f0)]&&this['_userService'][_0x271beb(0x1df)](_0x29a217[_0x271beb(0x1f0)]),_0x29a217[_0x271beb(0x1e7)]){case v['Add']:break;case v[_0x271beb(0x1d8)]:{this[_0x271beb(0x205)][_0x271beb(0x216)](_0x4cf2ce,_0x49add2,{'unitId':_0x4cf2ce,'subUnitId':_0x49add2,'ref':'','id':_0x29a217[_0x271beb(0x1f7)],'dT':D(+_0x29a217['createTimestamp']),'threadId':_0x29a217[_0x271beb(0x21b)],'personId':(_0x1d0cd2=(_0x4614bd=_0x29a217[_0x271beb(0x1f0)])==null?void 0x0:_0x4614bd['userID'])!=null?_0x1d0cd2:_0x29a217['userId'],'text':JSON['parse'](_0x29a217[_0x271beb(0x230)]),'parentId':_0x234be6['id']});break;}case v['Delete']:{const _0x2e1cc0=this[_0x271beb(0x205)][_0x271beb(0x21e)](_0x4cf2ce,_0x49add2,_0x29a217[_0x271beb(0x1f7)]);_0x2e1cc0&&_0x2e1cc0[_0x271beb(0x236)]&&this[_0x271beb(0x205)][_0x271beb(0x1de)](_0x4cf2ce,_0x49add2,_0x29a217[_0x271beb(0x1f7)]);break;}case v[_0x271beb(0x223)]:{this[_0x271beb(0x205)][_0x271beb(0x1ef)](_0x4cf2ce,_0x49add2,{'commentId':_0x29a217['replyId'],'text':JSON[_0x271beb(0x202)](_0x29a217[_0x271beb(0x230)])});break;}case v['Solve']:{const _0x450c1b=(_0x33999b=this[_0x271beb(0x205)]['getUnit'](_0x29a217[_0x271beb(0x235)])[_0x271beb(0x1d5)](_0x5bd099=>_0x5bd099['threadId']===_0x29a217[_0x271beb(0x21b)]))==null?void 0x0:_0x33999b['root'];_0x450c1b&&this[_0x271beb(0x205)][_0x271beb(0x1d7)](_0x4cf2ce,_0x49add2,_0x450c1b['id'],_0x29a217[_0x271beb(0x1f6)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x33b5e2(_0x4c6d8e)),p(0x1,_0x33b5e2(_0x1fa1fb)),p(0x2,_0x33b5e2(_0x3c6fd5)),p(0x3,_0x33b5e2(_0x1950b2))],S);const z=_0x275b95(0x1e6),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0xd51ebb,_0x3db3a6,_0x28b687,_0x363ae2)=>{for(var _0x25042b=_0x363ae2>0x1?void 0x0:_0x363ae2?k(_0x3db3a6,_0x28b687):_0x3db3a6,_0x4f98ef=_0xd51ebb['length']-0x1,_0x53c0ea;_0x4f98ef>=0x0;_0x4f98ef--)(_0x53c0ea=_0xd51ebb[_0x4f98ef])&&(_0x25042b=_0x53c0ea(_0x25042b)||_0x25042b);return _0x25042b;},_=(_0x1a449d,_0x264f35)=>(_0x2c4109,_0x5c5958)=>_0x264f35(_0x2c4109,_0x5c5958,_0x1a449d);function X(_0x5ea3ac,_0x40c56a){const _0x5df8b2=_0x275b95,_0x3a945a=_0x5ea3ac[_0x5df8b2(0x1d6)][0x0];return{..._0x40c56a,'id':_0x3a945a['replyId'],'resolved':_0x5ea3ac['solved']===0x1,'dT':D(_0x3a945a[_0x5df8b2(0x1f8)]),'personId':_0x3a945a[_0x5df8b2(0x1fb)],'threadId':_0x3a945a[_0x5df8b2(0x21b)]};}function ee(_0x530031,_0x497de7,_0x1753f2){const _0x23b595=_0x275b95;var _0x1088d5,_0x318004;if(((_0x318004=(_0x1088d5=_0x530031==null?void 0x0:_0x530031['replies'])==null?void 0x0:_0x1088d5[_0x23b595(0x206)])!=null?_0x318004:0x0)>0x0){const _0x5b3359=(_0x20e18d,_0x51c9bb)=>({'id':_0x20e18d[_0x23b595(0x1f7)],'threadId':_0x20e18d[_0x23b595(0x21b)],'dT':D(_0x20e18d[_0x23b595(0x1f8)]),'personId':_0x20e18d['userId'],'resolved':_0x530031['solved']===I[_0x23b595(0x214)],'unitId':_0x497de7,'subUnitId':_0x1753f2,'text':JSON[_0x23b595(0x202)](_0x20e18d['content']),'parentId':_0x51c9bb}),_0x124239=_0x5b3359(_0x530031['replies'][0x0]);return{..._0x124239,'children':_0x530031[_0x23b595(0x1d6)]['slice'](0x1)[_0x23b595(0x22d)](_0x5dd067=>_0x5b3359(_0x5dd067,_0x124239['id']))};}return null;}let f=class{constructor(_0x341b34,_0x30c65b,_0x2ce72b,_0x435bef){const _0x3ff33c=_0x275b95;this[_0x3ff33c(0x233)]=_0x341b34,this['_userService']=_0x30c65b,this[_0x3ff33c(0x1fa)]=_0x2ce72b,this['_injector']=_0x435bef;}async[_0x275b95(0x216)](_0x41cf8c){const _0x263cdb=_0x275b95;var _0xe47435,_0x2f602c;const {parentId:_0x32bcbe,unitId:_0x42eb6e,text:_0x2f933c,threadId:_0x2caf26}=_0x41cf8c,_0x2df969=(_0x2f602c=(_0xe47435=_0x2f933c[_0x263cdb(0x204)])==null?void 0x0:_0xe47435[_0x263cdb(0x1fc)](_0x46c108=>_0x46c108[_0x263cdb(0x1ec)]===_0xacb558['COMMENT'])['map'](_0x43dc2d=>_0x43dc2d[_0x263cdb(0x21d)]))!=null?_0x2f602c:[],_0x4b2aab=JSON[_0x263cdb(0x1e1)](_0x2f933c),_0x2cb6d7=(await this[_0x263cdb(0x1fa)]['requireSession'](_0x42eb6e))[_0x263cdb(0x21a)]();if(_0x32bcbe){const _0x4e2921={'memberId':_0x2cb6d7,'unitId':_0x42eb6e,'content':_0x4b2aab,'mention':_0x2df969,'threadId':_0x2caf26},_0x4a2386=(await this[_0x263cdb(0x233)][_0x263cdb(0x222)](_0x263cdb(0x221)+_0x42eb6e+_0x263cdb(0x208),{'body':_0x4e2921}))[_0x263cdb(0x1f1)]['reply'];return{..._0x41cf8c,'id':_0x4a2386[_0x263cdb(0x1f7)],'dT':_0x9eacb9(+_0x4a2386[_0x263cdb(0x1f8)])[_0x263cdb(0x217)](_0x263cdb(0x1f9)),'personId':_0x4a2386[_0x263cdb(0x1fb)]};}else{const _0x4d4ad1={'memberId':_0x2cb6d7,'unitId':_0x42eb6e,'content':_0x4b2aab,'mention':_0x2df969},_0x5ba3a2=await this['_httpService']['post'](_0x263cdb(0x221)+_0x42eb6e+_0x263cdb(0x1f5),{'body':_0x4d4ad1});return X(_0x5ba3a2[_0x263cdb(0x1f1)][_0x263cdb(0x1e8)],_0x41cf8c);}}async[_0x275b95(0x1ef)](_0x7b7443){const _0xd1570b=_0x275b95;var _0x5d2cef,_0x40b0e3;const {text:_0x195957,unitId:_0x38a52e}=_0x7b7443,_0x455058=(_0x40b0e3=(_0x5d2cef=_0x195957['customRanges'])==null?void 0x0:_0x5d2cef[_0xd1570b(0x1fc)](_0x515a60=>_0x515a60[_0xd1570b(0x1ec)]===_0xacb558[_0xd1570b(0x1e9)])['map'](_0x5d8306=>_0x5d8306[_0xd1570b(0x21d)]))!=null?_0x40b0e3:[],_0x5cbea7=JSON[_0xd1570b(0x1e1)](_0x195957),_0x2ae763=_0x7b7443[_0xd1570b(0x21b)],_0x46478c=_0x7b7443['id'],_0x43ae0c={'memberId':(await this[_0xd1570b(0x1fa)][_0xd1570b(0x215)](_0x38a52e))['getMemberID'](),'unitId':_0x38a52e,'threadId':_0x2ae763,'mention':_0x455058,'content':_0x5cbea7,'replyId':_0x46478c},_0x585552=await this[_0xd1570b(0x233)][_0xd1570b(0x222)](_0xd1570b(0x221)+_0x38a52e+'/edit',{'body':_0x43ae0c});return!_0x585552[_0xd1570b(0x1f1)][_0xd1570b(0x1e2)]||_0x585552['body']['error'][_0xd1570b(0x1f3)]===0x1;}async['resolveComment'](_0xca686b){const _0x8c06e=_0x275b95,{unitId:_0x29ad12}=_0xca686b,_0x2a9f27=_0xca686b[_0x8c06e(0x21b)],_0x48051b={'memberId':this[_0x8c06e(0x21f)][_0x8c06e(0x1fd)]()[_0x8c06e(0x21c)],'unitId':_0x29ad12,'threadId':_0x2a9f27,'solved':_0xca686b[_0x8c06e(0x201)]?I[_0x8c06e(0x214)]:I[_0x8c06e(0x226)]},_0x239d28=await this[_0x8c06e(0x233)]['post']('/universer-api/comment/unit/'+_0x29ad12+_0x8c06e(0x20a),{'body':_0x48051b});return!_0x239d28[_0x8c06e(0x1f1)]['error']||_0x239d28[_0x8c06e(0x1f1)][_0x8c06e(0x1e2)][_0x8c06e(0x1f3)]===0x1;}async['deleteComment'](_0x3747da,_0x442aa0,_0x2f66d6,_0x3303fb){const _0x1387c5=_0x275b95,_0x5c615f={'memberId':(await this[_0x1387c5(0x1fa)][_0x1387c5(0x215)](_0x3747da))[_0x1387c5(0x21a)](),'threadId':_0x2f66d6,'replyId':_0x3303fb,'unitId':_0x3747da},_0x5c8d51=await this['_httpService'][_0x1387c5(0x222)](_0x1387c5(0x221)+_0x3747da+_0x1387c5(0x210),{'body':_0x5c615f});return!_0x5c8d51[_0x1387c5(0x1f1)][_0x1387c5(0x1e2)]||_0x5c8d51[_0x1387c5(0x1f1)][_0x1387c5(0x1e2)][_0x1387c5(0x1f3)]===0x1;}async['listComments'](_0x446e61,_0x116b2d,_0x462806){const _0x58807d=_0x275b95,_0x1cf671={'unitId':_0x446e61,'threadId':_0x462806},_0x274d35=await this[_0x58807d(0x233)]['post'](_0x58807d(0x221)+_0x446e61+_0x58807d(0x22c),{'body':_0x1cf671}),_0xa4f917=_0x462806[_0x58807d(0x22d)](_0x2f33e1=>ee(_0x274d35['body']['comments'][_0x2f33e1],_0x446e61,_0x116b2d))[_0x58807d(0x1fc)](Boolean);return Object['values'](_0x274d35[_0x58807d(0x1f1)]['users'])[_0x58807d(0x1e5)](_0x77cf57=>{const _0x311d9b=_0x58807d;this[_0x311d9b(0x21f)][_0x311d9b(0x1df)](_0x77cf57);}),_0xa4f917;}[_0x275b95(0x22a)](_0x4b033c){const _0x3a75bb=_0x275b95;return{'id':_0x4b033c['id'],'threadId':_0x4b033c[_0x3a75bb(0x21b)],'ref':_0x4b033c[_0x3a75bb(0x239)]};}};f=Q([_(0x0,_0x33b5e2(_0x770764)),_(0x1,_0x33b5e2(_0x3c6fd5)),_(0x2,_0x33b5e2(_0x528287)),_(0x3,_0x33b5e2(_0x1950b2))],f);var re=Object[_0x275b95(0x228)],te=(_0x5e5a51,_0x4bbdc1,_0x33c179,_0x2c46f2)=>{const _0x2bcefd=_0x275b95;for(var _0x1ae56e=_0x2c46f2>0x1?void 0x0:_0x2c46f2?re(_0x4bbdc1,_0x33c179):_0x4bbdc1,_0xf39c6c=_0x5e5a51[_0x2bcefd(0x206)]-0x1,_0x1fe845;_0xf39c6c>=0x0;_0xf39c6c--)(_0x1fe845=_0x5e5a51[_0xf39c6c])&&(_0x1ae56e=_0x1fe845(_0x1ae56e)||_0x1ae56e);return _0x1ae56e;},N=(_0x5eed83,_0x515f56)=>(_0x58d733,_0xc73ad9)=>_0x515f56(_0x58d733,_0xc73ad9,_0x5eed83);let g=class extends _0x2f3545{constructor(_0x253d15,_0x1d1423){const _0x21ac39=_0x275b95;super(),this[_0x21ac39(0x238)]=_0x253d15,this[_0x21ac39(0x213)]=_0x1d1423,this[_0x21ac39(0x231)]();}[_0x275b95(0x231)](){const _0xaa7db5=_0x275b95;this[_0xaa7db5(0x238)][_0xaa7db5(0x20c)]=this[_0xaa7db5(0x213)],this['_threadCommentDataSourceService'][_0xaa7db5(0x1f2)]=!0x1;}};g=te([N(0x0,_0x1c0daa),N(0x1,_0x33b5e2(f))],g);var se=Object[_0x275b95(0x22f)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x206c38,_0x5308f5,_0x371d05)=>_0x5308f5 in _0x206c38?se(_0x206c38,_0x5308f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x371d05}):_0x206c38[_0x5308f5]=_0x371d05,ie=(_0x43c10e,_0x17befc,_0x315e66,_0x2848d6)=>{const _0xad8bee=_0x275b95;for(var _0xe16107=_0x2848d6>0x1?void 0x0:_0x2848d6?oe(_0x17befc,_0x315e66):_0x17befc,_0x72d651=_0x43c10e[_0xad8bee(0x206)]-0x1,_0x189f1b;_0x72d651>=0x0;_0x72d651--)(_0x189f1b=_0x43c10e[_0x72d651])&&(_0xe16107=_0x189f1b(_0xe16107)||_0xe16107);return _0xe16107;},w=(_0x41e185,_0x1bde63)=>(_0x361297,_0x42d316)=>_0x1bde63(_0x361297,_0x42d316,_0x41e185),$=(_0x3dc3de,_0x236c2c,_0x5d4fd9)=>ne(_0x3dc3de,typeof _0x236c2c!='symbol'?_0x236c2c+'':_0x236c2c,_0x5d4fd9);let b=class extends _0x5bf589{constructor(_0x4d21b4=M,_0x33d063,_0xf58dcf){const _0x46bdf9=_0x275b95;super(),this[_0x46bdf9(0x1eb)]=_0x4d21b4,this['_injector']=_0x33d063,this[_0x46bdf9(0x1da)]=_0xf58dcf;const {..._0x5f437c}=_0x35101e({},M,this[_0x46bdf9(0x1eb)]);this[_0x46bdf9(0x1da)][_0x46bdf9(0x22b)](z,_0x5f437c);}[_0x275b95(0x220)](){const _0x46be27=_0x275b95;[[f],[g],[S]][_0x46be27(0x1e5)](_0x38bdb1=>{const _0x1fe3ce=_0x46be27;this[_0x1fe3ce(0x229)]['add'](_0x38bdb1);});}['onReady'](){const _0x3d9e22=_0x275b95;this[_0x3d9e22(0x229)][_0x3d9e22(0x212)](g),this['_injector'][_0x3d9e22(0x212)](S);}};function _0x5592(){const _0x243c69=['1659432wxyFNC','deleteComment','addUser','size','stringify','error','5808294EHAHvs','Delete','forEach','thread-comment-data-source.config','type','comment','COMMENT','144gwSvjH','_config','rangeType','users','pipe','updateComment','user','body','syncUpdateMutationToColla','code','add','/add','solved','replyId','createTimestamp','YYYY/MM/DD\x20HH:mm','_sessionService','userId','filter','getCurrentUser','3002629TxjzXv','10sDQvxa','1356690AhvgXl','resolved','parse','_commentService','customRanges','_threadCommentModel','length','disposeWithMe','/reply','Solve','/solved','_init','dataSource','delete','getUser','Unknown','/delete','7151KRtGYh','get','_threadCommentDataSource','Solved','requireSession','addComment','format','subscribe','payload','getMemberID','threadId','userID','rangeId','getComment','_userService','onStarting','/universer-api/comment/unit/','post','Edit','1408572QrQPrA','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','5ruQtSL','getOwnPropertyDescriptor','_injector','saveCommentToSnapshot','setConfig','/list','map','8NNBjvL','defineProperty','content','_initDataSource','Add','_httpService','root','unitId','parentId','_initUserSync','_threadCommentDataSourceService','ref','personId','UNRECOGNIZED','find','replies','resolveComment','Reply','28338739QkpKDS','_configService','pluginName','commentUpdate$'];_0x5592=function(){return _0x243c69;};return _0x5592();}$(b,_0x275b95(0x1db),W),$(b,_0x275b95(0x1e7),_0x4a5fef['UNIVER_UNKNOWN']),b=ie([_0x4301fe(_0x998630,_0x1b7631,_0x1b92c7),w(0x1,_0x33b5e2(_0x1950b2)),w(0x2,_0x4ef3a8)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1b47a9=_0x124b;(function(_0x1408a1,_0x2c6ce2){const _0x3d0917=_0x124b,_0x165aa9=_0x1408a1();while(!![]){try{const _0x4d02f0=parseInt(_0x3d0917(0x16b))/0x1+-parseInt(_0x3d0917(0x166))/0x2*(-parseInt(_0x3d0917(0x179))/0x3)+parseInt(_0x3d0917(0x156))/0x4+parseInt(_0x3d0917(0x12a))/0x5+-parseInt(_0x3d0917(0x146))/0x6*(parseInt(_0x3d0917(0x170))/0x7)+-parseInt(_0x3d0917(0x159))/0x8*(-parseInt(_0x3d0917(0x162))/0x9)+parseInt(_0x3d0917(0x16c))/0xa*(-parseInt(_0x3d0917(0x147))/0xb);if(_0x4d02f0===_0x2c6ce2)break;else _0x165aa9['push'](_0x165aa9['shift']());}catch(_0xfe2161){_0x165aa9['push'](_0x165aa9['shift']());}}}(_0x1078,0x76658));import{CommentService as _0x3c4083,CollaborationSessionService as _0x2ae918,UniverCollaborationClientPlugin as _0x3a519b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ef8f5}from'@univerjs-pro/license';import{dayjs as _0x4bf675,UserManagerService as _0x571c24,Inject as _0x113128,Injector as _0x59dbaa,Disposable as _0x434d24,CustomRangeType as _0x59c86f,UniverInstanceType as _0x1ce2d1,DependentOn as _0x8a9abb,IConfigService as _0x575a65,Plugin as _0x5b100b,merge as _0x4ebc5a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x18e6d7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x656ab3,IThreadCommentDataSourceService as _0x5e6fac}from'@univerjs/thread-comment';import{bufferTime as _0x4c390f}from'rxjs';import{HTTPService as _0x4b42b5}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x17bfe8=>(_0x17bfe8[_0x17bfe8[_0x1b47a9(0x17b)]=0x0]=_0x1b47a9(0x17b),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x142)]=0x1]=_0x1b47a9(0x142),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x17bfe8))(I||{}),v=(_0x5d2623=>(_0x5d2623[_0x5d2623['Unknown']=0x0]='Unknown',_0x5d2623[_0x5d2623[_0x1b47a9(0x136)]=0x1]='Add',_0x5d2623[_0x5d2623[_0x1b47a9(0x149)]=0x2]=_0x1b47a9(0x149),_0x5d2623[_0x5d2623[_0x1b47a9(0x133)]=0x3]=_0x1b47a9(0x133),_0x5d2623[_0x5d2623[_0x1b47a9(0x13a)]=0x4]=_0x1b47a9(0x13a),_0x5d2623[_0x5d2623['Solve']=0x5]=_0x1b47a9(0x17f),_0x5d2623[_0x5d2623[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x5d2623))(v||{});const D=_0x24b4b9=>_0x4bf675(new Date(+_0x24b4b9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x41edec,_0x2df88d)=>{const _0x43f763=_0x1b47a9,_0x425b3f=_0x41edec[_0x43f763(0x180)](_0x571c24),_0x4351ff=_0x41edec[_0x43f763(0x180)](_0x4b42b5);_0x2df88d[_0x43f763(0x132)](_0x50b0e2=>{const _0x2a286b=_0x43f763;_0x425b3f[_0x2a286b(0x183)](_0x50b0e2)&&_0x2df88d['delete'](_0x50b0e2);}),_0x2df88d['size']&&(await _0x4351ff['get'](_0x43f763(0x169),{'params':{'userIDs':[..._0x2df88d]}}))[_0x43f763(0x174)][_0x43f763(0x140)][_0x43f763(0x132)](_0x260e2b=>{const _0x3598f1=_0x43f763;_0x260e2b&&_0x425b3f[_0x3598f1(0x165)](_0x260e2b);});};var K=Object[_0x1b47a9(0x14c)],V=(_0x331caf,_0x4fb274,_0x4949c4,_0x285b94)=>{const _0x1158e8=_0x1b47a9;for(var _0x8e58dc=_0x285b94>0x1?void 0x0:_0x285b94?K(_0x4fb274,_0x4949c4):_0x4fb274,_0x5d1558=_0x331caf[_0x1158e8(0x137)]-0x1,_0x285046;_0x5d1558>=0x0;_0x5d1558--)(_0x285046=_0x331caf[_0x5d1558])&&(_0x8e58dc=_0x285046(_0x8e58dc)||_0x8e58dc);return _0x8e58dc;},p=(_0x4b234c,_0x307f76)=>(_0x24f8b8,_0x4be3c7)=>_0x307f76(_0x24f8b8,_0x4be3c7,_0x4b234c);let S=class extends _0x434d24{constructor(_0x46160f,_0x2384e2,_0x104f20,_0x58c874){const _0x12eee3=_0x1b47a9;super(),this[_0x12eee3(0x167)]=_0x46160f,this[_0x12eee3(0x16e)]=_0x2384e2,this['_userService']=_0x104f20,this[_0x12eee3(0x151)]=_0x58c874,this[_0x12eee3(0x13d)](),this[_0x12eee3(0x18a)]();}[_0x1b47a9(0x18a)](){const _0x645c7d=_0x1b47a9;this[_0x645c7d(0x143)](this[_0x645c7d(0x16e)]['commentUpdate$'][_0x645c7d(0x14f)](_0x4c390f(0x10))[_0x645c7d(0x139)](_0x2d3b68=>{const _0x4fe041=_0x645c7d,_0x53cb17=new Set();_0x2d3b68[_0x4fe041(0x132)](_0x5f57db=>{const _0x27aa12=_0x4fe041;switch(_0x5f57db['type']){case'add':{const _0x5c6029=_0x5f57db['payload'][_0x27aa12(0x12e)];_0x53cb17[_0x27aa12(0x164)](_0x5c6029);break;}}}),B(this[_0x4fe041(0x151)],_0x53cb17);}));}['_init'](){const _0x5eb9af=_0x1b47a9;this[_0x5eb9af(0x143)](this[_0x5eb9af(0x167)][_0x5eb9af(0x15e)]['subscribe'](async _0x2645b9=>{const _0x5e46c5=_0x5eb9af;var _0x35ad58,_0x430761,_0x5d9380,_0xa36b2d;const _0x18888d=(_0x35ad58=this['_threadCommentModel'][_0x5e46c5(0x153)](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xdac173=>_0xdac173[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0x35ad58['root'];if(!_0x18888d)return;const {unitId:_0x53990f,subUnitId:_0x5cf4c3}=_0x18888d;switch(_0x2645b9[_0x5e46c5(0x188)]&&this[_0x5e46c5(0x157)][_0x5e46c5(0x165)](_0x2645b9[_0x5e46c5(0x188)]),_0x2645b9[_0x5e46c5(0x168)]){case v[_0x5e46c5(0x136)]:break;case v['Reply']:{this['_threadCommentModel'][_0x5e46c5(0x171)](_0x53990f,_0x5cf4c3,{'unitId':_0x53990f,'subUnitId':_0x5cf4c3,'ref':'','id':_0x2645b9[_0x5e46c5(0x185)],'dT':D(+_0x2645b9[_0x5e46c5(0x12f)]),'threadId':_0x2645b9[_0x5e46c5(0x13c)],'personId':(_0x5d9380=(_0x430761=_0x2645b9[_0x5e46c5(0x188)])==null?void 0x0:_0x430761[_0x5e46c5(0x14a)])!=null?_0x5d9380:_0x2645b9[_0x5e46c5(0x13b)],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9[_0x5e46c5(0x150)]),'parentId':_0x18888d['id']});break;}case v[_0x5e46c5(0x13a)]:{const _0x1a85bd=this[_0x5e46c5(0x16e)][_0x5e46c5(0x161)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);_0x1a85bd&&_0x1a85bd[_0x5e46c5(0x15f)]&&this[_0x5e46c5(0x16e)][_0x5e46c5(0x145)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);break;}case v['Edit']:{this[_0x5e46c5(0x16e)][_0x5e46c5(0x12c)](_0x53990f,_0x5cf4c3,{'commentId':_0x2645b9['replyId'],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9['content'])});break;}case v['Solve']:{const _0x5991eb=(_0xa36b2d=this[_0x5e46c5(0x16e)]['getUnit'](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xa100fb=>_0xa100fb[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0xa36b2d['root'];_0x5991eb&&this[_0x5e46c5(0x16e)]['resolveComment'](_0x53990f,_0x5cf4c3,_0x5991eb['id'],_0x2645b9[_0x5e46c5(0x181)]===I[_0x5e46c5(0x142)]);break;}}}));}};S=V([p(0x0,_0x113128(_0x3c4083)),p(0x1,_0x113128(_0x656ab3)),p(0x2,_0x113128(_0x571c24)),p(0x3,_0x113128(_0x59dbaa))],S);const z=_0x1b47a9(0x15b),M={};var k=Object[_0x1b47a9(0x14c)],Q=(_0xb999c0,_0x2ee177,_0x5f3de2,_0x588de5)=>{for(var _0x48e4c1=_0x588de5>0x1?void 0x0:_0x588de5?k(_0x2ee177,_0x5f3de2):_0x2ee177,_0xd1d785=_0xb999c0['length']-0x1,_0x483119;_0xd1d785>=0x0;_0xd1d785--)(_0x483119=_0xb999c0[_0xd1d785])&&(_0x48e4c1=_0x483119(_0x48e4c1)||_0x48e4c1);return _0x48e4c1;},_=(_0x52cda2,_0x8d120e)=>(_0x3604f2,_0x49eb53)=>_0x8d120e(_0x3604f2,_0x49eb53,_0x52cda2);function _0x1078(){const _0x21f48d=['length','comment','subscribe','Delete','userId','threadId','_init','ref','/reply','users','saveCommentToSnapshot','Solved','disposeWithMe','getMemberID','deleteComment','16266qGfYTQ','264kTZotR','symbol','Reply','userID','UNRECOGNIZED','getOwnPropertyDescriptor','listComments','values','pipe','content','_injector','error','getUnit','requireSession','reply','3139272lxGjsh','_userService','_sessionService','3166168fNLdNd','code','thread-comment-data-source.config','format','post','commentUpdate$','parentId','/universer-api/comment/unit/','getComment','18YvJMwz','_config','add','addUser','26Ujyzeo','_commentService','type','/universer-api/user/list','rangeId','388256zjzrzm','1014080uqDzpX','onStarting','_threadCommentModel','COMMENT','133uHGCTn','addComment','filter','customRanges','body','/list','rangeType','replies','_threadCommentDataSourceService','40530lKjasH','find','OpenOrReOpen','/delete','resolveComment','map','Solve','get','solved','UNIVER_UNKNOWN','getUser','onReady','replyId','_threadCommentDataSource','unitId','user','pluginName','_initUserSync','parse','defineProperty','/edit','4150035pzosFe','YYYY/MM/DD\x20HH:mm','updateComment','_configService','personId','createTimestamp','resolved','_httpService','forEach','Edit','stringify','comments','Add'];_0x1078=function(){return _0x21f48d;};return _0x1078();}function X(_0x3384a0,_0x1e30ec){const _0x1527a6=_0x1b47a9,_0x25d1ed=_0x3384a0[_0x1527a6(0x177)][0x0];return{..._0x1e30ec,'id':_0x25d1ed[_0x1527a6(0x185)],'resolved':_0x3384a0['solved']===0x1,'dT':D(_0x25d1ed['createTimestamp']),'personId':_0x25d1ed[_0x1527a6(0x13b)],'threadId':_0x25d1ed[_0x1527a6(0x13c)]};}function ee(_0x1d7063,_0x13bfb3,_0x515b2f){const _0x34571b=_0x1b47a9;var _0x532f15,_0xfe0932;if(((_0xfe0932=(_0x532f15=_0x1d7063==null?void 0x0:_0x1d7063[_0x34571b(0x177)])==null?void 0x0:_0x532f15[_0x34571b(0x137)])!=null?_0xfe0932:0x0)>0x0){const _0x46c30b=(_0x578d94,_0x4949b1)=>({'id':_0x578d94[_0x34571b(0x185)],'threadId':_0x578d94[_0x34571b(0x13c)],'dT':D(_0x578d94['createTimestamp']),'personId':_0x578d94[_0x34571b(0x13b)],'resolved':_0x1d7063[_0x34571b(0x181)]===I[_0x34571b(0x142)],'unitId':_0x13bfb3,'subUnitId':_0x515b2f,'text':JSON[_0x34571b(0x18b)](_0x578d94['content']),'parentId':_0x4949b1}),_0x55554b=_0x46c30b(_0x1d7063[_0x34571b(0x177)][0x0]);return{..._0x55554b,'children':_0x1d7063[_0x34571b(0x177)]['slice'](0x1)[_0x34571b(0x17e)](_0x3797ad=>_0x46c30b(_0x3797ad,_0x55554b['id']))};}return null;}let f=class{constructor(_0xd7d389,_0x5170f1,_0xba759f,_0x2f555d){const _0xac69f6=_0x1b47a9;this[_0xac69f6(0x131)]=_0xd7d389,this['_userService']=_0x5170f1,this['_sessionService']=_0xba759f,this[_0xac69f6(0x151)]=_0x2f555d;}async[_0x1b47a9(0x171)](_0x437b36){const _0x492901=_0x1b47a9;var _0x14a6a0,_0x2d42e8;const {parentId:_0x59a8aa,unitId:_0x43e6a2,text:_0x53a797,threadId:_0x200249}=_0x437b36,_0x330226=(_0x2d42e8=(_0x14a6a0=_0x53a797[_0x492901(0x173)])==null?void 0x0:_0x14a6a0[_0x492901(0x172)](_0x4dd281=>_0x4dd281[_0x492901(0x176)]===_0x59c86f[_0x492901(0x16f)])[_0x492901(0x17e)](_0x3c51c3=>_0x3c51c3[_0x492901(0x16a)]))!=null?_0x2d42e8:[],_0x2b7661=JSON[_0x492901(0x134)](_0x53a797),_0x1d9c91=(await this[_0x492901(0x158)]['requireSession'](_0x43e6a2))[_0x492901(0x144)]();if(_0x59a8aa){const _0x206c38={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226,'threadId':_0x200249},_0x2c03f1=(await this[_0x492901(0x131)]['post'](_0x492901(0x160)+_0x43e6a2+_0x492901(0x13f),{'body':_0x206c38}))[_0x492901(0x174)][_0x492901(0x155)];return{..._0x437b36,'id':_0x2c03f1['replyId'],'dT':_0x4bf675(+_0x2c03f1[_0x492901(0x12f)])[_0x492901(0x15c)](_0x492901(0x12b)),'personId':_0x2c03f1[_0x492901(0x13b)]};}else{const _0x3d1b2d={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226},_0xed89b4=await this[_0x492901(0x131)][_0x492901(0x15d)]('/universer-api/comment/unit/'+_0x43e6a2+'/add',{'body':_0x3d1b2d});return X(_0xed89b4[_0x492901(0x174)][_0x492901(0x138)],_0x437b36);}}async[_0x1b47a9(0x12c)](_0xafc3d6){const _0x2f89cc=_0x1b47a9;var _0x394edb,_0x487bfa;const {text:_0x2f57e6,unitId:_0x356a2d}=_0xafc3d6,_0x3d0c33=(_0x487bfa=(_0x394edb=_0x2f57e6[_0x2f89cc(0x173)])==null?void 0x0:_0x394edb[_0x2f89cc(0x172)](_0x4f9172=>_0x4f9172[_0x2f89cc(0x176)]===_0x59c86f[_0x2f89cc(0x16f)])[_0x2f89cc(0x17e)](_0x4751a8=>_0x4751a8['rangeId']))!=null?_0x487bfa:[],_0x527833=JSON[_0x2f89cc(0x134)](_0x2f57e6),_0x8e5aa5=_0xafc3d6[_0x2f89cc(0x13c)],_0x14177e=_0xafc3d6['id'],_0x8ef920={'memberId':(await this[_0x2f89cc(0x158)][_0x2f89cc(0x154)](_0x356a2d))[_0x2f89cc(0x144)](),'unitId':_0x356a2d,'threadId':_0x8e5aa5,'mention':_0x3d0c33,'content':_0x527833,'replyId':_0x14177e},_0x388dc4=await this[_0x2f89cc(0x131)]['post'](_0x2f89cc(0x160)+_0x356a2d+_0x2f89cc(0x129),{'body':_0x8ef920});return!_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)]||_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)][_0x2f89cc(0x15a)]===0x1;}async[_0x1b47a9(0x17d)](_0xe3bac4){const _0x199eb9=_0x1b47a9,{unitId:_0x294724}=_0xe3bac4,_0x2645e3=_0xe3bac4['threadId'],_0x21caae={'memberId':this[_0x199eb9(0x157)]['getCurrentUser']()['userID'],'unitId':_0x294724,'threadId':_0x2645e3,'solved':_0xe3bac4[_0x199eb9(0x130)]?I[_0x199eb9(0x142)]:I[_0x199eb9(0x17b)]},_0xbfbc0=await this[_0x199eb9(0x131)][_0x199eb9(0x15d)](_0x199eb9(0x160)+_0x294724+'/solved',{'body':_0x21caae});return!_0xbfbc0[_0x199eb9(0x174)]['error']||_0xbfbc0[_0x199eb9(0x174)][_0x199eb9(0x152)][_0x199eb9(0x15a)]===0x1;}async['deleteComment'](_0x253e02,_0x45ee23,_0x4195ec,_0x3d1092){const _0x407fdd=_0x1b47a9,_0x24adc9={'memberId':(await this[_0x407fdd(0x158)][_0x407fdd(0x154)](_0x253e02))[_0x407fdd(0x144)](),'threadId':_0x4195ec,'replyId':_0x3d1092,'unitId':_0x253e02},_0x2c57eb=await this[_0x407fdd(0x131)]['post'](_0x407fdd(0x160)+_0x253e02+_0x407fdd(0x17c),{'body':_0x24adc9});return!_0x2c57eb['body']['error']||_0x2c57eb['body'][_0x407fdd(0x152)][_0x407fdd(0x15a)]===0x1;}async[_0x1b47a9(0x14d)](_0x11c094,_0x25eeea,_0x2b5a89){const _0x10647d=_0x1b47a9,_0x397229={'unitId':_0x11c094,'threadId':_0x2b5a89},_0x31ad5f=await this['_httpService']['post'](_0x10647d(0x160)+_0x11c094+_0x10647d(0x175),{'body':_0x397229}),_0xc95385=_0x2b5a89[_0x10647d(0x17e)](_0x4dd222=>ee(_0x31ad5f[_0x10647d(0x174)][_0x10647d(0x135)][_0x4dd222],_0x11c094,_0x25eeea))[_0x10647d(0x172)](Boolean);return Object[_0x10647d(0x14e)](_0x31ad5f['body'][_0x10647d(0x140)])[_0x10647d(0x132)](_0x1ef004=>{const _0x32d1a7=_0x10647d;this['_userService'][_0x32d1a7(0x165)](_0x1ef004);}),_0xc95385;}[_0x1b47a9(0x141)](_0x29293e){const _0x3bd35d=_0x1b47a9;return{'id':_0x29293e['id'],'threadId':_0x29293e['threadId'],'ref':_0x29293e[_0x3bd35d(0x13e)]};}};f=Q([_(0x0,_0x113128(_0x4b42b5)),_(0x1,_0x113128(_0x571c24)),_(0x2,_0x113128(_0x2ae918)),_(0x3,_0x113128(_0x59dbaa))],f);var re=Object[_0x1b47a9(0x14c)],te=(_0x49d31e,_0x2a2084,_0x42b57d,_0x3ea695)=>{const _0x1be6f3=_0x1b47a9;for(var _0x13e953=_0x3ea695>0x1?void 0x0:_0x3ea695?re(_0x2a2084,_0x42b57d):_0x2a2084,_0x45ee68=_0x49d31e[_0x1be6f3(0x137)]-0x1,_0x5b2cc4;_0x45ee68>=0x0;_0x45ee68--)(_0x5b2cc4=_0x49d31e[_0x45ee68])&&(_0x13e953=_0x5b2cc4(_0x13e953)||_0x13e953);return _0x13e953;},N=(_0x4cad79,_0x5b61c3)=>(_0x313213,_0x2dec8f)=>_0x5b61c3(_0x313213,_0x2dec8f,_0x4cad79);let g=class extends _0x434d24{constructor(_0x3ff894,_0x2f0269){const _0x6bfc3d=_0x1b47a9;super(),this[_0x6bfc3d(0x178)]=_0x3ff894,this[_0x6bfc3d(0x186)]=_0x2f0269,this['_initDataSource']();}['_initDataSource'](){const _0x3acc06=_0x1b47a9;this['_threadCommentDataSourceService']['dataSource']=this[_0x3acc06(0x186)],this[_0x3acc06(0x178)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x5e6fac),N(0x1,_0x113128(f))],g);function _0x124b(_0x420d37,_0x4a2db5){const _0x107845=_0x1078();return _0x124b=function(_0x124bf7,_0x11fe76){_0x124bf7=_0x124bf7-0x128;let _0x248c88=_0x107845[_0x124bf7];return _0x248c88;},_0x124b(_0x420d37,_0x4a2db5);}var se=Object[_0x1b47a9(0x128)],oe=Object[_0x1b47a9(0x14c)],ne=(_0x421412,_0x15296a,_0x23e0d5)=>_0x15296a in _0x421412?se(_0x421412,_0x15296a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23e0d5}):_0x421412[_0x15296a]=_0x23e0d5,ie=(_0x291359,_0x335706,_0x22d712,_0x50b4e6)=>{const _0x13cf79=_0x1b47a9;for(var _0x2b9f2a=_0x50b4e6>0x1?void 0x0:_0x50b4e6?oe(_0x335706,_0x22d712):_0x335706,_0x1a94be=_0x291359[_0x13cf79(0x137)]-0x1,_0x118a7b;_0x1a94be>=0x0;_0x1a94be--)(_0x118a7b=_0x291359[_0x1a94be])&&(_0x2b9f2a=_0x118a7b(_0x2b9f2a)||_0x2b9f2a);return _0x2b9f2a;},w=(_0x4c3a1d,_0x5fa085)=>(_0x38419c,_0x439a2c)=>_0x5fa085(_0x38419c,_0x439a2c,_0x4c3a1d),$=(_0x4d61aa,_0x5eccb4,_0x727677)=>ne(_0x4d61aa,typeof _0x5eccb4!=_0x1b47a9(0x148)?_0x5eccb4+'':_0x5eccb4,_0x727677);let b=class extends _0x5b100b{constructor(_0x292d01=M,_0x421f76,_0x5698bc){const _0x56cdb9=_0x1b47a9;super(),this[_0x56cdb9(0x163)]=_0x292d01,this[_0x56cdb9(0x151)]=_0x421f76,this[_0x56cdb9(0x12d)]=_0x5698bc;const {..._0x1ce176}=_0x4ebc5a({},M,this[_0x56cdb9(0x163)]);this[_0x56cdb9(0x12d)]['setConfig'](z,_0x1ce176);}[_0x1b47a9(0x16d)](){const _0x442a09=_0x1b47a9;[[f],[g],[S]][_0x442a09(0x132)](_0x3f89f3=>{const _0x3b4375=_0x442a09;this[_0x3b4375(0x151)][_0x3b4375(0x164)](_0x3f89f3);});}[_0x1b47a9(0x184)](){const _0x24dae9=_0x1b47a9;this[_0x24dae9(0x151)][_0x24dae9(0x180)](g),this[_0x24dae9(0x151)][_0x24dae9(0x180)](S);}};$(b,_0x1b47a9(0x189),W),$(b,_0x1b47a9(0x168),_0x1ce2d1[_0x1b47a9(0x182)]),b=ie([_0x8a9abb(_0x18e6d7,_0x3a519b,_0x4ef8f5),w(0x1,_0x113128(_0x59dbaa)),w(0x2,_0x575a65)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2b67(_0x2aefbe,_0x588d6f){const _0x559265=_0x5592();return _0x2b67=function(_0x2b67e1,_0xae60de){_0x2b67e1=_0x2b67e1-0x1d4;let _0x579e86=_0x559265[_0x2b67e1];return _0x579e86;},_0x2b67(_0x2aefbe,_0x588d6f);}const _0x275b95=_0x2b67;(function(_0x9479bb,_0x500c32){const _0x185372=_0x2b67,_0xd16a45=_0x9479bb();while(!![]){try{const _0x4d6f60=-parseInt(_0x185372(0x211))/0x1*(parseInt(_0x185372(0x1ea))/0x2)+-parseInt(_0x185372(0x224))/0x3+-parseInt(_0x185372(0x1dd))/0x4*(parseInt(_0x185372(0x227))/0x5)+parseInt(_0x185372(0x200))/0x6+parseInt(_0x185372(0x1fe))/0x7*(-parseInt(_0x185372(0x22e))/0x8)+-parseInt(_0x185372(0x1e3))/0x9+-parseInt(_0x185372(0x1ff))/0xa*(-parseInt(_0x185372(0x1d9))/0xb);if(_0x4d6f60===_0x500c32)break;else _0xd16a45['push'](_0xd16a45['shift']());}catch(_0x48112f){_0xd16a45['push'](_0xd16a45['shift']());}}}(_0x5592,0x5045d));import{CommentService as _0x4c6d8e,CollaborationSessionService as _0x528287,UniverCollaborationClientPlugin as _0x1b7631}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1b92c7}from'@univerjs-pro/license';import{dayjs as _0x9eacb9,UserManagerService as _0x3c6fd5,Inject as _0x33b5e2,Injector as _0x1950b2,Disposable as _0x2f3545,CustomRangeType as _0xacb558,UniverInstanceType as _0x4a5fef,DependentOn as _0x4301fe,IConfigService as _0x4ef3a8,Plugin as _0x5bf589,merge as _0x35101e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x998630}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1fa1fb,IThreadCommentDataSourceService as _0x1c0daa}from'@univerjs/thread-comment';import{bufferTime as _0x49b8b8}from'rxjs';import{HTTPService as _0x770764}from'@univerjs/network';const W=_0x275b95(0x225);var I=(_0x1d8b21=>(_0x1d8b21[_0x1d8b21[_0x275b95(0x226)]=0x0]=_0x275b95(0x226),_0x1d8b21[_0x1d8b21[_0x275b95(0x214)]=0x1]=_0x275b95(0x214),_0x1d8b21[_0x1d8b21[_0x275b95(0x1d4)]=-0x1]=_0x275b95(0x1d4),_0x1d8b21))(I||{}),v=(_0x2d17aa=>(_0x2d17aa[_0x2d17aa[_0x275b95(0x20f)]=0x0]='Unknown',_0x2d17aa[_0x2d17aa[_0x275b95(0x232)]=0x1]=_0x275b95(0x232),_0x2d17aa[_0x2d17aa[_0x275b95(0x1d8)]=0x2]=_0x275b95(0x1d8),_0x2d17aa[_0x2d17aa[_0x275b95(0x223)]=0x3]=_0x275b95(0x223),_0x2d17aa[_0x2d17aa[_0x275b95(0x1e4)]=0x4]=_0x275b95(0x1e4),_0x2d17aa[_0x2d17aa[_0x275b95(0x209)]=0x5]='Solve',_0x2d17aa[_0x2d17aa['UNRECOGNIZED']=-0x1]=_0x275b95(0x1d4),_0x2d17aa))(v||{});const D=_0x4f4d96=>_0x9eacb9(new Date(+_0x4f4d96))[_0x275b95(0x217)](_0x275b95(0x1f9)),B=async(_0x201528,_0x90313a)=>{const _0x398b34=_0x275b95,_0x26f22a=_0x201528[_0x398b34(0x212)](_0x3c6fd5),_0x2e69ad=_0x201528['get'](_0x770764);_0x90313a[_0x398b34(0x1e5)](_0xcffbd=>{const _0x236b65=_0x398b34;_0x26f22a[_0x236b65(0x20e)](_0xcffbd)&&_0x90313a[_0x236b65(0x20d)](_0xcffbd);}),_0x90313a[_0x398b34(0x1e0)]&&(await _0x2e69ad['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x90313a]}}))[_0x398b34(0x1f1)][_0x398b34(0x1ed)][_0x398b34(0x1e5)](_0x4fafcc=>{const _0x48b44d=_0x398b34;_0x4fafcc&&_0x26f22a[_0x48b44d(0x1df)](_0x4fafcc);});};var K=Object[_0x275b95(0x228)],V=(_0xf5cc96,_0x210b97,_0xa2e178,_0x5922da)=>{for(var _0x28489c=_0x5922da>0x1?void 0x0:_0x5922da?K(_0x210b97,_0xa2e178):_0x210b97,_0x221bad=_0xf5cc96['length']-0x1,_0x5ab146;_0x221bad>=0x0;_0x221bad--)(_0x5ab146=_0xf5cc96[_0x221bad])&&(_0x28489c=_0x5ab146(_0x28489c)||_0x28489c);return _0x28489c;},p=(_0x3ea34f,_0x13d03c)=>(_0x54ddf2,_0x82609f)=>_0x13d03c(_0x54ddf2,_0x82609f,_0x3ea34f);let S=class extends _0x2f3545{constructor(_0x289017,_0xeb0336,_0x22280e,_0x298870){const _0x17b64d=_0x275b95;super(),this[_0x17b64d(0x203)]=_0x289017,this[_0x17b64d(0x205)]=_0xeb0336,this['_userService']=_0x22280e,this[_0x17b64d(0x229)]=_0x298870,this[_0x17b64d(0x20b)](),this['_initUserSync']();}[_0x275b95(0x237)](){const _0x8820c=_0x275b95;this[_0x8820c(0x207)](this['_threadCommentModel']['commentUpdate$'][_0x8820c(0x1ee)](_0x49b8b8(0x10))[_0x8820c(0x218)](_0x20e8ce=>{const _0x560ed5=_0x8820c,_0xccb9c5=new Set();_0x20e8ce['forEach'](_0x2ecd40=>{const _0x343aeb=_0x2b67;switch(_0x2ecd40['type']){case'add':{const _0x503129=_0x2ecd40[_0x343aeb(0x219)][_0x343aeb(0x23a)];_0xccb9c5[_0x343aeb(0x1f4)](_0x503129);break;}}}),B(this[_0x560ed5(0x229)],_0xccb9c5);}));}[_0x275b95(0x20b)](){const _0x4d6d2f=_0x275b95;this[_0x4d6d2f(0x207)](this[_0x4d6d2f(0x203)][_0x4d6d2f(0x1dc)][_0x4d6d2f(0x218)](async _0x29a217=>{const _0x271beb=_0x4d6d2f;var _0x490851,_0x4614bd,_0x1d0cd2,_0x33999b;const _0x234be6=(_0x490851=this[_0x271beb(0x205)]['getUnit'](_0x29a217[_0x271beb(0x235)])['find'](_0x28b820=>_0x28b820[_0x271beb(0x21b)]===_0x29a217[_0x271beb(0x21b)]))==null?void 0x0:_0x490851[_0x271beb(0x234)];if(!_0x234be6)return;const {unitId:_0x4cf2ce,subUnitId:_0x49add2}=_0x234be6;switch(_0x29a217[_0x271beb(0x1f0)]&&this['_userService'][_0x271beb(0x1df)](_0x29a217[_0x271beb(0x1f0)]),_0x29a217[_0x271beb(0x1e7)]){case v['Add']:break;case v[_0x271beb(0x1d8)]:{this[_0x271beb(0x205)][_0x271beb(0x216)](_0x4cf2ce,_0x49add2,{'unitId':_0x4cf2ce,'subUnitId':_0x49add2,'ref':'','id':_0x29a217[_0x271beb(0x1f7)],'dT':D(+_0x29a217['createTimestamp']),'threadId':_0x29a217[_0x271beb(0x21b)],'personId':(_0x1d0cd2=(_0x4614bd=_0x29a217[_0x271beb(0x1f0)])==null?void 0x0:_0x4614bd['userID'])!=null?_0x1d0cd2:_0x29a217['userId'],'text':JSON['parse'](_0x29a217[_0x271beb(0x230)]),'parentId':_0x234be6['id']});break;}case v['Delete']:{const _0x2e1cc0=this[_0x271beb(0x205)][_0x271beb(0x21e)](_0x4cf2ce,_0x49add2,_0x29a217[_0x271beb(0x1f7)]);_0x2e1cc0&&_0x2e1cc0[_0x271beb(0x236)]&&this[_0x271beb(0x205)][_0x271beb(0x1de)](_0x4cf2ce,_0x49add2,_0x29a217[_0x271beb(0x1f7)]);break;}case v[_0x271beb(0x223)]:{this[_0x271beb(0x205)][_0x271beb(0x1ef)](_0x4cf2ce,_0x49add2,{'commentId':_0x29a217['replyId'],'text':JSON[_0x271beb(0x202)](_0x29a217[_0x271beb(0x230)])});break;}case v['Solve']:{const _0x450c1b=(_0x33999b=this[_0x271beb(0x205)]['getUnit'](_0x29a217[_0x271beb(0x235)])[_0x271beb(0x1d5)](_0x5bd099=>_0x5bd099['threadId']===_0x29a217[_0x271beb(0x21b)]))==null?void 0x0:_0x33999b['root'];_0x450c1b&&this[_0x271beb(0x205)][_0x271beb(0x1d7)](_0x4cf2ce,_0x49add2,_0x450c1b['id'],_0x29a217[_0x271beb(0x1f6)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x33b5e2(_0x4c6d8e)),p(0x1,_0x33b5e2(_0x1fa1fb)),p(0x2,_0x33b5e2(_0x3c6fd5)),p(0x3,_0x33b5e2(_0x1950b2))],S);const z=_0x275b95(0x1e6),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0xd51ebb,_0x3db3a6,_0x28b687,_0x363ae2)=>{for(var _0x25042b=_0x363ae2>0x1?void 0x0:_0x363ae2?k(_0x3db3a6,_0x28b687):_0x3db3a6,_0x4f98ef=_0xd51ebb['length']-0x1,_0x53c0ea;_0x4f98ef>=0x0;_0x4f98ef--)(_0x53c0ea=_0xd51ebb[_0x4f98ef])&&(_0x25042b=_0x53c0ea(_0x25042b)||_0x25042b);return _0x25042b;},_=(_0x1a449d,_0x264f35)=>(_0x2c4109,_0x5c5958)=>_0x264f35(_0x2c4109,_0x5c5958,_0x1a449d);function X(_0x5ea3ac,_0x40c56a){const _0x5df8b2=_0x275b95,_0x3a945a=_0x5ea3ac[_0x5df8b2(0x1d6)][0x0];return{..._0x40c56a,'id':_0x3a945a['replyId'],'resolved':_0x5ea3ac['solved']===0x1,'dT':D(_0x3a945a[_0x5df8b2(0x1f8)]),'personId':_0x3a945a[_0x5df8b2(0x1fb)],'threadId':_0x3a945a[_0x5df8b2(0x21b)]};}function ee(_0x530031,_0x497de7,_0x1753f2){const _0x23b595=_0x275b95;var _0x1088d5,_0x318004;if(((_0x318004=(_0x1088d5=_0x530031==null?void 0x0:_0x530031['replies'])==null?void 0x0:_0x1088d5[_0x23b595(0x206)])!=null?_0x318004:0x0)>0x0){const _0x5b3359=(_0x20e18d,_0x51c9bb)=>({'id':_0x20e18d[_0x23b595(0x1f7)],'threadId':_0x20e18d[_0x23b595(0x21b)],'dT':D(_0x20e18d[_0x23b595(0x1f8)]),'personId':_0x20e18d['userId'],'resolved':_0x530031['solved']===I[_0x23b595(0x214)],'unitId':_0x497de7,'subUnitId':_0x1753f2,'text':JSON[_0x23b595(0x202)](_0x20e18d['content']),'parentId':_0x51c9bb}),_0x124239=_0x5b3359(_0x530031['replies'][0x0]);return{..._0x124239,'children':_0x530031[_0x23b595(0x1d6)]['slice'](0x1)[_0x23b595(0x22d)](_0x5dd067=>_0x5b3359(_0x5dd067,_0x124239['id']))};}return null;}let f=class{constructor(_0x341b34,_0x30c65b,_0x2ce72b,_0x435bef){const _0x3ff33c=_0x275b95;this[_0x3ff33c(0x233)]=_0x341b34,this['_userService']=_0x30c65b,this[_0x3ff33c(0x1fa)]=_0x2ce72b,this['_injector']=_0x435bef;}async[_0x275b95(0x216)](_0x41cf8c){const _0x263cdb=_0x275b95;var _0xe47435,_0x2f602c;const {parentId:_0x32bcbe,unitId:_0x42eb6e,text:_0x2f933c,threadId:_0x2caf26}=_0x41cf8c,_0x2df969=(_0x2f602c=(_0xe47435=_0x2f933c[_0x263cdb(0x204)])==null?void 0x0:_0xe47435[_0x263cdb(0x1fc)](_0x46c108=>_0x46c108[_0x263cdb(0x1ec)]===_0xacb558['COMMENT'])['map'](_0x43dc2d=>_0x43dc2d[_0x263cdb(0x21d)]))!=null?_0x2f602c:[],_0x4b2aab=JSON[_0x263cdb(0x1e1)](_0x2f933c),_0x2cb6d7=(await this[_0x263cdb(0x1fa)]['requireSession'](_0x42eb6e))[_0x263cdb(0x21a)]();if(_0x32bcbe){const _0x4e2921={'memberId':_0x2cb6d7,'unitId':_0x42eb6e,'content':_0x4b2aab,'mention':_0x2df969,'threadId':_0x2caf26},_0x4a2386=(await this[_0x263cdb(0x233)][_0x263cdb(0x222)](_0x263cdb(0x221)+_0x42eb6e+_0x263cdb(0x208),{'body':_0x4e2921}))[_0x263cdb(0x1f1)]['reply'];return{..._0x41cf8c,'id':_0x4a2386[_0x263cdb(0x1f7)],'dT':_0x9eacb9(+_0x4a2386[_0x263cdb(0x1f8)])[_0x263cdb(0x217)](_0x263cdb(0x1f9)),'personId':_0x4a2386[_0x263cdb(0x1fb)]};}else{const _0x4d4ad1={'memberId':_0x2cb6d7,'unitId':_0x42eb6e,'content':_0x4b2aab,'mention':_0x2df969},_0x5ba3a2=await this['_httpService']['post'](_0x263cdb(0x221)+_0x42eb6e+_0x263cdb(0x1f5),{'body':_0x4d4ad1});return X(_0x5ba3a2[_0x263cdb(0x1f1)][_0x263cdb(0x1e8)],_0x41cf8c);}}async[_0x275b95(0x1ef)](_0x7b7443){const _0xd1570b=_0x275b95;var _0x5d2cef,_0x40b0e3;const {text:_0x195957,unitId:_0x38a52e}=_0x7b7443,_0x455058=(_0x40b0e3=(_0x5d2cef=_0x195957['customRanges'])==null?void 0x0:_0x5d2cef[_0xd1570b(0x1fc)](_0x515a60=>_0x515a60[_0xd1570b(0x1ec)]===_0xacb558[_0xd1570b(0x1e9)])['map'](_0x5d8306=>_0x5d8306[_0xd1570b(0x21d)]))!=null?_0x40b0e3:[],_0x5cbea7=JSON[_0xd1570b(0x1e1)](_0x195957),_0x2ae763=_0x7b7443[_0xd1570b(0x21b)],_0x46478c=_0x7b7443['id'],_0x43ae0c={'memberId':(await this[_0xd1570b(0x1fa)][_0xd1570b(0x215)](_0x38a52e))['getMemberID'](),'unitId':_0x38a52e,'threadId':_0x2ae763,'mention':_0x455058,'content':_0x5cbea7,'replyId':_0x46478c},_0x585552=await this[_0xd1570b(0x233)][_0xd1570b(0x222)](_0xd1570b(0x221)+_0x38a52e+'/edit',{'body':_0x43ae0c});return!_0x585552[_0xd1570b(0x1f1)][_0xd1570b(0x1e2)]||_0x585552['body']['error'][_0xd1570b(0x1f3)]===0x1;}async['resolveComment'](_0xca686b){const _0x8c06e=_0x275b95,{unitId:_0x29ad12}=_0xca686b,_0x2a9f27=_0xca686b[_0x8c06e(0x21b)],_0x48051b={'memberId':this[_0x8c06e(0x21f)][_0x8c06e(0x1fd)]()[_0x8c06e(0x21c)],'unitId':_0x29ad12,'threadId':_0x2a9f27,'solved':_0xca686b[_0x8c06e(0x201)]?I[_0x8c06e(0x214)]:I[_0x8c06e(0x226)]},_0x239d28=await this[_0x8c06e(0x233)]['post']('/universer-api/comment/unit/'+_0x29ad12+_0x8c06e(0x20a),{'body':_0x48051b});return!_0x239d28[_0x8c06e(0x1f1)]['error']||_0x239d28[_0x8c06e(0x1f1)][_0x8c06e(0x1e2)][_0x8c06e(0x1f3)]===0x1;}async['deleteComment'](_0x3747da,_0x442aa0,_0x2f66d6,_0x3303fb){const _0x1387c5=_0x275b95,_0x5c615f={'memberId':(await this[_0x1387c5(0x1fa)][_0x1387c5(0x215)](_0x3747da))[_0x1387c5(0x21a)](),'threadId':_0x2f66d6,'replyId':_0x3303fb,'unitId':_0x3747da},_0x5c8d51=await this['_httpService'][_0x1387c5(0x222)](_0x1387c5(0x221)+_0x3747da+_0x1387c5(0x210),{'body':_0x5c615f});return!_0x5c8d51[_0x1387c5(0x1f1)][_0x1387c5(0x1e2)]||_0x5c8d51[_0x1387c5(0x1f1)][_0x1387c5(0x1e2)][_0x1387c5(0x1f3)]===0x1;}async['listComments'](_0x446e61,_0x116b2d,_0x462806){const _0x58807d=_0x275b95,_0x1cf671={'unitId':_0x446e61,'threadId':_0x462806},_0x274d35=await this[_0x58807d(0x233)]['post'](_0x58807d(0x221)+_0x446e61+_0x58807d(0x22c),{'body':_0x1cf671}),_0xa4f917=_0x462806[_0x58807d(0x22d)](_0x2f33e1=>ee(_0x274d35['body']['comments'][_0x2f33e1],_0x446e61,_0x116b2d))[_0x58807d(0x1fc)](Boolean);return Object['values'](_0x274d35[_0x58807d(0x1f1)]['users'])[_0x58807d(0x1e5)](_0x77cf57=>{const _0x311d9b=_0x58807d;this[_0x311d9b(0x21f)][_0x311d9b(0x1df)](_0x77cf57);}),_0xa4f917;}[_0x275b95(0x22a)](_0x4b033c){const _0x3a75bb=_0x275b95;return{'id':_0x4b033c['id'],'threadId':_0x4b033c[_0x3a75bb(0x21b)],'ref':_0x4b033c[_0x3a75bb(0x239)]};}};f=Q([_(0x0,_0x33b5e2(_0x770764)),_(0x1,_0x33b5e2(_0x3c6fd5)),_(0x2,_0x33b5e2(_0x528287)),_(0x3,_0x33b5e2(_0x1950b2))],f);var re=Object[_0x275b95(0x228)],te=(_0x5e5a51,_0x4bbdc1,_0x33c179,_0x2c46f2)=>{const _0x2bcefd=_0x275b95;for(var _0x1ae56e=_0x2c46f2>0x1?void 0x0:_0x2c46f2?re(_0x4bbdc1,_0x33c179):_0x4bbdc1,_0xf39c6c=_0x5e5a51[_0x2bcefd(0x206)]-0x1,_0x1fe845;_0xf39c6c>=0x0;_0xf39c6c--)(_0x1fe845=_0x5e5a51[_0xf39c6c])&&(_0x1ae56e=_0x1fe845(_0x1ae56e)||_0x1ae56e);return _0x1ae56e;},N=(_0x5eed83,_0x515f56)=>(_0x58d733,_0xc73ad9)=>_0x515f56(_0x58d733,_0xc73ad9,_0x5eed83);let g=class extends _0x2f3545{constructor(_0x253d15,_0x1d1423){const _0x21ac39=_0x275b95;super(),this[_0x21ac39(0x238)]=_0x253d15,this[_0x21ac39(0x213)]=_0x1d1423,this[_0x21ac39(0x231)]();}[_0x275b95(0x231)](){const _0xaa7db5=_0x275b95;this[_0xaa7db5(0x238)][_0xaa7db5(0x20c)]=this[_0xaa7db5(0x213)],this['_threadCommentDataSourceService'][_0xaa7db5(0x1f2)]=!0x1;}};g=te([N(0x0,_0x1c0daa),N(0x1,_0x33b5e2(f))],g);var se=Object[_0x275b95(0x22f)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x206c38,_0x5308f5,_0x371d05)=>_0x5308f5 in _0x206c38?se(_0x206c38,_0x5308f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x371d05}):_0x206c38[_0x5308f5]=_0x371d05,ie=(_0x43c10e,_0x17befc,_0x315e66,_0x2848d6)=>{const _0xad8bee=_0x275b95;for(var _0xe16107=_0x2848d6>0x1?void 0x0:_0x2848d6?oe(_0x17befc,_0x315e66):_0x17befc,_0x72d651=_0x43c10e[_0xad8bee(0x206)]-0x1,_0x189f1b;_0x72d651>=0x0;_0x72d651--)(_0x189f1b=_0x43c10e[_0x72d651])&&(_0xe16107=_0x189f1b(_0xe16107)||_0xe16107);return _0xe16107;},w=(_0x41e185,_0x1bde63)=>(_0x361297,_0x42d316)=>_0x1bde63(_0x361297,_0x42d316,_0x41e185),$=(_0x3dc3de,_0x236c2c,_0x5d4fd9)=>ne(_0x3dc3de,typeof _0x236c2c!='symbol'?_0x236c2c+'':_0x236c2c,_0x5d4fd9);let b=class extends _0x5bf589{constructor(_0x4d21b4=M,_0x33d063,_0xf58dcf){const _0x46bdf9=_0x275b95;super(),this[_0x46bdf9(0x1eb)]=_0x4d21b4,this['_injector']=_0x33d063,this[_0x46bdf9(0x1da)]=_0xf58dcf;const {..._0x5f437c}=_0x35101e({},M,this[_0x46bdf9(0x1eb)]);this[_0x46bdf9(0x1da)][_0x46bdf9(0x22b)](z,_0x5f437c);}[_0x275b95(0x220)](){const _0x46be27=_0x275b95;[[f],[g],[S]][_0x46be27(0x1e5)](_0x38bdb1=>{const _0x1fe3ce=_0x46be27;this[_0x1fe3ce(0x229)]['add'](_0x38bdb1);});}['onReady'](){const _0x3d9e22=_0x275b95;this[_0x3d9e22(0x229)][_0x3d9e22(0x212)](g),this['_injector'][_0x3d9e22(0x212)](S);}};function _0x5592(){const _0x243c69=['1659432wxyFNC','deleteComment','addUser','size','stringify','error','5808294EHAHvs','Delete','forEach','thread-comment-data-source.config','type','comment','COMMENT','144gwSvjH','_config','rangeType','users','pipe','updateComment','user','body','syncUpdateMutationToColla','code','add','/add','solved','replyId','createTimestamp','YYYY/MM/DD\x20HH:mm','_sessionService','userId','filter','getCurrentUser','3002629TxjzXv','10sDQvxa','1356690AhvgXl','resolved','parse','_commentService','customRanges','_threadCommentModel','length','disposeWithMe','/reply','Solve','/solved','_init','dataSource','delete','getUser','Unknown','/delete','7151KRtGYh','get','_threadCommentDataSource','Solved','requireSession','addComment','format','subscribe','payload','getMemberID','threadId','userID','rangeId','getComment','_userService','onStarting','/universer-api/comment/unit/','post','Edit','1408572QrQPrA','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','5ruQtSL','getOwnPropertyDescriptor','_injector','saveCommentToSnapshot','setConfig','/list','map','8NNBjvL','defineProperty','content','_initDataSource','Add','_httpService','root','unitId','parentId','_initUserSync','_threadCommentDataSourceService','ref','personId','UNRECOGNIZED','find','replies','resolveComment','Reply','28338739QkpKDS','_configService','pluginName','commentUpdate$'];_0x5592=function(){return _0x243c69;};return _0x5592();}$(b,_0x275b95(0x1db),W),$(b,_0x275b95(0x1e7),_0x4a5fef['UNIVER_UNKNOWN']),b=ie([_0x4301fe(_0x998630,_0x1b7631,_0x1b92c7),w(0x1,_0x33b5e2(_0x1950b2)),w(0x2,_0x4ef3a8)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1b47a9=_0x124b;(function(_0x1408a1,_0x2c6ce2){const _0x3d0917=_0x124b,_0x165aa9=_0x1408a1();while(!![]){try{const _0x4d02f0=parseInt(_0x3d0917(0x16b))/0x1+-parseInt(_0x3d0917(0x166))/0x2*(-parseInt(_0x3d0917(0x179))/0x3)+parseInt(_0x3d0917(0x156))/0x4+parseInt(_0x3d0917(0x12a))/0x5+-parseInt(_0x3d0917(0x146))/0x6*(parseInt(_0x3d0917(0x170))/0x7)+-parseInt(_0x3d0917(0x159))/0x8*(-parseInt(_0x3d0917(0x162))/0x9)+parseInt(_0x3d0917(0x16c))/0xa*(-parseInt(_0x3d0917(0x147))/0xb);if(_0x4d02f0===_0x2c6ce2)break;else _0x165aa9['push'](_0x165aa9['shift']());}catch(_0xfe2161){_0x165aa9['push'](_0x165aa9['shift']());}}}(_0x1078,0x76658));import{CommentService as _0x3c4083,CollaborationSessionService as _0x2ae918,UniverCollaborationClientPlugin as _0x3a519b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ef8f5}from'@univerjs-pro/license';import{dayjs as _0x4bf675,UserManagerService as _0x571c24,Inject as _0x113128,Injector as _0x59dbaa,Disposable as _0x434d24,CustomRangeType as _0x59c86f,UniverInstanceType as _0x1ce2d1,DependentOn as _0x8a9abb,IConfigService as _0x575a65,Plugin as _0x5b100b,merge as _0x4ebc5a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x18e6d7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x656ab3,IThreadCommentDataSourceService as _0x5e6fac}from'@univerjs/thread-comment';import{bufferTime as _0x4c390f}from'rxjs';import{HTTPService as _0x4b42b5}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x17bfe8=>(_0x17bfe8[_0x17bfe8[_0x1b47a9(0x17b)]=0x0]=_0x1b47a9(0x17b),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x142)]=0x1]=_0x1b47a9(0x142),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x17bfe8))(I||{}),v=(_0x5d2623=>(_0x5d2623[_0x5d2623['Unknown']=0x0]='Unknown',_0x5d2623[_0x5d2623[_0x1b47a9(0x136)]=0x1]='Add',_0x5d2623[_0x5d2623[_0x1b47a9(0x149)]=0x2]=_0x1b47a9(0x149),_0x5d2623[_0x5d2623[_0x1b47a9(0x133)]=0x3]=_0x1b47a9(0x133),_0x5d2623[_0x5d2623[_0x1b47a9(0x13a)]=0x4]=_0x1b47a9(0x13a),_0x5d2623[_0x5d2623['Solve']=0x5]=_0x1b47a9(0x17f),_0x5d2623[_0x5d2623[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x5d2623))(v||{});const D=_0x24b4b9=>_0x4bf675(new Date(+_0x24b4b9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x41edec,_0x2df88d)=>{const _0x43f763=_0x1b47a9,_0x425b3f=_0x41edec[_0x43f763(0x180)](_0x571c24),_0x4351ff=_0x41edec[_0x43f763(0x180)](_0x4b42b5);_0x2df88d[_0x43f763(0x132)](_0x50b0e2=>{const _0x2a286b=_0x43f763;_0x425b3f[_0x2a286b(0x183)](_0x50b0e2)&&_0x2df88d['delete'](_0x50b0e2);}),_0x2df88d['size']&&(await _0x4351ff['get'](_0x43f763(0x169),{'params':{'userIDs':[..._0x2df88d]}}))[_0x43f763(0x174)][_0x43f763(0x140)][_0x43f763(0x132)](_0x260e2b=>{const _0x3598f1=_0x43f763;_0x260e2b&&_0x425b3f[_0x3598f1(0x165)](_0x260e2b);});};var K=Object[_0x1b47a9(0x14c)],V=(_0x331caf,_0x4fb274,_0x4949c4,_0x285b94)=>{const _0x1158e8=_0x1b47a9;for(var _0x8e58dc=_0x285b94>0x1?void 0x0:_0x285b94?K(_0x4fb274,_0x4949c4):_0x4fb274,_0x5d1558=_0x331caf[_0x1158e8(0x137)]-0x1,_0x285046;_0x5d1558>=0x0;_0x5d1558--)(_0x285046=_0x331caf[_0x5d1558])&&(_0x8e58dc=_0x285046(_0x8e58dc)||_0x8e58dc);return _0x8e58dc;},p=(_0x4b234c,_0x307f76)=>(_0x24f8b8,_0x4be3c7)=>_0x307f76(_0x24f8b8,_0x4be3c7,_0x4b234c);let S=class extends _0x434d24{constructor(_0x46160f,_0x2384e2,_0x104f20,_0x58c874){const _0x12eee3=_0x1b47a9;super(),this[_0x12eee3(0x167)]=_0x46160f,this[_0x12eee3(0x16e)]=_0x2384e2,this['_userService']=_0x104f20,this[_0x12eee3(0x151)]=_0x58c874,this[_0x12eee3(0x13d)](),this[_0x12eee3(0x18a)]();}[_0x1b47a9(0x18a)](){const _0x645c7d=_0x1b47a9;this[_0x645c7d(0x143)](this[_0x645c7d(0x16e)]['commentUpdate$'][_0x645c7d(0x14f)](_0x4c390f(0x10))[_0x645c7d(0x139)](_0x2d3b68=>{const _0x4fe041=_0x645c7d,_0x53cb17=new Set();_0x2d3b68[_0x4fe041(0x132)](_0x5f57db=>{const _0x27aa12=_0x4fe041;switch(_0x5f57db['type']){case'add':{const _0x5c6029=_0x5f57db['payload'][_0x27aa12(0x12e)];_0x53cb17[_0x27aa12(0x164)](_0x5c6029);break;}}}),B(this[_0x4fe041(0x151)],_0x53cb17);}));}['_init'](){const _0x5eb9af=_0x1b47a9;this[_0x5eb9af(0x143)](this[_0x5eb9af(0x167)][_0x5eb9af(0x15e)]['subscribe'](async _0x2645b9=>{const _0x5e46c5=_0x5eb9af;var _0x35ad58,_0x430761,_0x5d9380,_0xa36b2d;const _0x18888d=(_0x35ad58=this['_threadCommentModel'][_0x5e46c5(0x153)](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xdac173=>_0xdac173[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0x35ad58['root'];if(!_0x18888d)return;const {unitId:_0x53990f,subUnitId:_0x5cf4c3}=_0x18888d;switch(_0x2645b9[_0x5e46c5(0x188)]&&this[_0x5e46c5(0x157)][_0x5e46c5(0x165)](_0x2645b9[_0x5e46c5(0x188)]),_0x2645b9[_0x5e46c5(0x168)]){case v[_0x5e46c5(0x136)]:break;case v['Reply']:{this['_threadCommentModel'][_0x5e46c5(0x171)](_0x53990f,_0x5cf4c3,{'unitId':_0x53990f,'subUnitId':_0x5cf4c3,'ref':'','id':_0x2645b9[_0x5e46c5(0x185)],'dT':D(+_0x2645b9[_0x5e46c5(0x12f)]),'threadId':_0x2645b9[_0x5e46c5(0x13c)],'personId':(_0x5d9380=(_0x430761=_0x2645b9[_0x5e46c5(0x188)])==null?void 0x0:_0x430761[_0x5e46c5(0x14a)])!=null?_0x5d9380:_0x2645b9[_0x5e46c5(0x13b)],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9[_0x5e46c5(0x150)]),'parentId':_0x18888d['id']});break;}case v[_0x5e46c5(0x13a)]:{const _0x1a85bd=this[_0x5e46c5(0x16e)][_0x5e46c5(0x161)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);_0x1a85bd&&_0x1a85bd[_0x5e46c5(0x15f)]&&this[_0x5e46c5(0x16e)][_0x5e46c5(0x145)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);break;}case v['Edit']:{this[_0x5e46c5(0x16e)][_0x5e46c5(0x12c)](_0x53990f,_0x5cf4c3,{'commentId':_0x2645b9['replyId'],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9['content'])});break;}case v['Solve']:{const _0x5991eb=(_0xa36b2d=this[_0x5e46c5(0x16e)]['getUnit'](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xa100fb=>_0xa100fb[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0xa36b2d['root'];_0x5991eb&&this[_0x5e46c5(0x16e)]['resolveComment'](_0x53990f,_0x5cf4c3,_0x5991eb['id'],_0x2645b9[_0x5e46c5(0x181)]===I[_0x5e46c5(0x142)]);break;}}}));}};S=V([p(0x0,_0x113128(_0x3c4083)),p(0x1,_0x113128(_0x656ab3)),p(0x2,_0x113128(_0x571c24)),p(0x3,_0x113128(_0x59dbaa))],S);const z=_0x1b47a9(0x15b),M={};var k=Object[_0x1b47a9(0x14c)],Q=(_0xb999c0,_0x2ee177,_0x5f3de2,_0x588de5)=>{for(var _0x48e4c1=_0x588de5>0x1?void 0x0:_0x588de5?k(_0x2ee177,_0x5f3de2):_0x2ee177,_0xd1d785=_0xb999c0['length']-0x1,_0x483119;_0xd1d785>=0x0;_0xd1d785--)(_0x483119=_0xb999c0[_0xd1d785])&&(_0x48e4c1=_0x483119(_0x48e4c1)||_0x48e4c1);return _0x48e4c1;},_=(_0x52cda2,_0x8d120e)=>(_0x3604f2,_0x49eb53)=>_0x8d120e(_0x3604f2,_0x49eb53,_0x52cda2);function _0x1078(){const _0x21f48d=['length','comment','subscribe','Delete','userId','threadId','_init','ref','/reply','users','saveCommentToSnapshot','Solved','disposeWithMe','getMemberID','deleteComment','16266qGfYTQ','264kTZotR','symbol','Reply','userID','UNRECOGNIZED','getOwnPropertyDescriptor','listComments','values','pipe','content','_injector','error','getUnit','requireSession','reply','3139272lxGjsh','_userService','_sessionService','3166168fNLdNd','code','thread-comment-data-source.config','format','post','commentUpdate$','parentId','/universer-api/comment/unit/','getComment','18YvJMwz','_config','add','addUser','26Ujyzeo','_commentService','type','/universer-api/user/list','rangeId','388256zjzrzm','1014080uqDzpX','onStarting','_threadCommentModel','COMMENT','133uHGCTn','addComment','filter','customRanges','body','/list','rangeType','replies','_threadCommentDataSourceService','40530lKjasH','find','OpenOrReOpen','/delete','resolveComment','map','Solve','get','solved','UNIVER_UNKNOWN','getUser','onReady','replyId','_threadCommentDataSource','unitId','user','pluginName','_initUserSync','parse','defineProperty','/edit','4150035pzosFe','YYYY/MM/DD\x20HH:mm','updateComment','_configService','personId','createTimestamp','resolved','_httpService','forEach','Edit','stringify','comments','Add'];_0x1078=function(){return _0x21f48d;};return _0x1078();}function X(_0x3384a0,_0x1e30ec){const _0x1527a6=_0x1b47a9,_0x25d1ed=_0x3384a0[_0x1527a6(0x177)][0x0];return{..._0x1e30ec,'id':_0x25d1ed[_0x1527a6(0x185)],'resolved':_0x3384a0['solved']===0x1,'dT':D(_0x25d1ed['createTimestamp']),'personId':_0x25d1ed[_0x1527a6(0x13b)],'threadId':_0x25d1ed[_0x1527a6(0x13c)]};}function ee(_0x1d7063,_0x13bfb3,_0x515b2f){const _0x34571b=_0x1b47a9;var _0x532f15,_0xfe0932;if(((_0xfe0932=(_0x532f15=_0x1d7063==null?void 0x0:_0x1d7063[_0x34571b(0x177)])==null?void 0x0:_0x532f15[_0x34571b(0x137)])!=null?_0xfe0932:0x0)>0x0){const _0x46c30b=(_0x578d94,_0x4949b1)=>({'id':_0x578d94[_0x34571b(0x185)],'threadId':_0x578d94[_0x34571b(0x13c)],'dT':D(_0x578d94['createTimestamp']),'personId':_0x578d94[_0x34571b(0x13b)],'resolved':_0x1d7063[_0x34571b(0x181)]===I[_0x34571b(0x142)],'unitId':_0x13bfb3,'subUnitId':_0x515b2f,'text':JSON[_0x34571b(0x18b)](_0x578d94['content']),'parentId':_0x4949b1}),_0x55554b=_0x46c30b(_0x1d7063[_0x34571b(0x177)][0x0]);return{..._0x55554b,'children':_0x1d7063[_0x34571b(0x177)]['slice'](0x1)[_0x34571b(0x17e)](_0x3797ad=>_0x46c30b(_0x3797ad,_0x55554b['id']))};}return null;}let f=class{constructor(_0xd7d389,_0x5170f1,_0xba759f,_0x2f555d){const _0xac69f6=_0x1b47a9;this[_0xac69f6(0x131)]=_0xd7d389,this['_userService']=_0x5170f1,this['_sessionService']=_0xba759f,this[_0xac69f6(0x151)]=_0x2f555d;}async[_0x1b47a9(0x171)](_0x437b36){const _0x492901=_0x1b47a9;var _0x14a6a0,_0x2d42e8;const {parentId:_0x59a8aa,unitId:_0x43e6a2,text:_0x53a797,threadId:_0x200249}=_0x437b36,_0x330226=(_0x2d42e8=(_0x14a6a0=_0x53a797[_0x492901(0x173)])==null?void 0x0:_0x14a6a0[_0x492901(0x172)](_0x4dd281=>_0x4dd281[_0x492901(0x176)]===_0x59c86f[_0x492901(0x16f)])[_0x492901(0x17e)](_0x3c51c3=>_0x3c51c3[_0x492901(0x16a)]))!=null?_0x2d42e8:[],_0x2b7661=JSON[_0x492901(0x134)](_0x53a797),_0x1d9c91=(await this[_0x492901(0x158)]['requireSession'](_0x43e6a2))[_0x492901(0x144)]();if(_0x59a8aa){const _0x206c38={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226,'threadId':_0x200249},_0x2c03f1=(await this[_0x492901(0x131)]['post'](_0x492901(0x160)+_0x43e6a2+_0x492901(0x13f),{'body':_0x206c38}))[_0x492901(0x174)][_0x492901(0x155)];return{..._0x437b36,'id':_0x2c03f1['replyId'],'dT':_0x4bf675(+_0x2c03f1[_0x492901(0x12f)])[_0x492901(0x15c)](_0x492901(0x12b)),'personId':_0x2c03f1[_0x492901(0x13b)]};}else{const _0x3d1b2d={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226},_0xed89b4=await this[_0x492901(0x131)][_0x492901(0x15d)]('/universer-api/comment/unit/'+_0x43e6a2+'/add',{'body':_0x3d1b2d});return X(_0xed89b4[_0x492901(0x174)][_0x492901(0x138)],_0x437b36);}}async[_0x1b47a9(0x12c)](_0xafc3d6){const _0x2f89cc=_0x1b47a9;var _0x394edb,_0x487bfa;const {text:_0x2f57e6,unitId:_0x356a2d}=_0xafc3d6,_0x3d0c33=(_0x487bfa=(_0x394edb=_0x2f57e6[_0x2f89cc(0x173)])==null?void 0x0:_0x394edb[_0x2f89cc(0x172)](_0x4f9172=>_0x4f9172[_0x2f89cc(0x176)]===_0x59c86f[_0x2f89cc(0x16f)])[_0x2f89cc(0x17e)](_0x4751a8=>_0x4751a8['rangeId']))!=null?_0x487bfa:[],_0x527833=JSON[_0x2f89cc(0x134)](_0x2f57e6),_0x8e5aa5=_0xafc3d6[_0x2f89cc(0x13c)],_0x14177e=_0xafc3d6['id'],_0x8ef920={'memberId':(await this[_0x2f89cc(0x158)][_0x2f89cc(0x154)](_0x356a2d))[_0x2f89cc(0x144)](),'unitId':_0x356a2d,'threadId':_0x8e5aa5,'mention':_0x3d0c33,'content':_0x527833,'replyId':_0x14177e},_0x388dc4=await this[_0x2f89cc(0x131)]['post'](_0x2f89cc(0x160)+_0x356a2d+_0x2f89cc(0x129),{'body':_0x8ef920});return!_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)]||_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)][_0x2f89cc(0x15a)]===0x1;}async[_0x1b47a9(0x17d)](_0xe3bac4){const _0x199eb9=_0x1b47a9,{unitId:_0x294724}=_0xe3bac4,_0x2645e3=_0xe3bac4['threadId'],_0x21caae={'memberId':this[_0x199eb9(0x157)]['getCurrentUser']()['userID'],'unitId':_0x294724,'threadId':_0x2645e3,'solved':_0xe3bac4[_0x199eb9(0x130)]?I[_0x199eb9(0x142)]:I[_0x199eb9(0x17b)]},_0xbfbc0=await this[_0x199eb9(0x131)][_0x199eb9(0x15d)](_0x199eb9(0x160)+_0x294724+'/solved',{'body':_0x21caae});return!_0xbfbc0[_0x199eb9(0x174)]['error']||_0xbfbc0[_0x199eb9(0x174)][_0x199eb9(0x152)][_0x199eb9(0x15a)]===0x1;}async['deleteComment'](_0x253e02,_0x45ee23,_0x4195ec,_0x3d1092){const _0x407fdd=_0x1b47a9,_0x24adc9={'memberId':(await this[_0x407fdd(0x158)][_0x407fdd(0x154)](_0x253e02))[_0x407fdd(0x144)](),'threadId':_0x4195ec,'replyId':_0x3d1092,'unitId':_0x253e02},_0x2c57eb=await this[_0x407fdd(0x131)]['post'](_0x407fdd(0x160)+_0x253e02+_0x407fdd(0x17c),{'body':_0x24adc9});return!_0x2c57eb['body']['error']||_0x2c57eb['body'][_0x407fdd(0x152)][_0x407fdd(0x15a)]===0x1;}async[_0x1b47a9(0x14d)](_0x11c094,_0x25eeea,_0x2b5a89){const _0x10647d=_0x1b47a9,_0x397229={'unitId':_0x11c094,'threadId':_0x2b5a89},_0x31ad5f=await this['_httpService']['post'](_0x10647d(0x160)+_0x11c094+_0x10647d(0x175),{'body':_0x397229}),_0xc95385=_0x2b5a89[_0x10647d(0x17e)](_0x4dd222=>ee(_0x31ad5f[_0x10647d(0x174)][_0x10647d(0x135)][_0x4dd222],_0x11c094,_0x25eeea))[_0x10647d(0x172)](Boolean);return Object[_0x10647d(0x14e)](_0x31ad5f['body'][_0x10647d(0x140)])[_0x10647d(0x132)](_0x1ef004=>{const _0x32d1a7=_0x10647d;this['_userService'][_0x32d1a7(0x165)](_0x1ef004);}),_0xc95385;}[_0x1b47a9(0x141)](_0x29293e){const _0x3bd35d=_0x1b47a9;return{'id':_0x29293e['id'],'threadId':_0x29293e['threadId'],'ref':_0x29293e[_0x3bd35d(0x13e)]};}};f=Q([_(0x0,_0x113128(_0x4b42b5)),_(0x1,_0x113128(_0x571c24)),_(0x2,_0x113128(_0x2ae918)),_(0x3,_0x113128(_0x59dbaa))],f);var re=Object[_0x1b47a9(0x14c)],te=(_0x49d31e,_0x2a2084,_0x42b57d,_0x3ea695)=>{const _0x1be6f3=_0x1b47a9;for(var _0x13e953=_0x3ea695>0x1?void 0x0:_0x3ea695?re(_0x2a2084,_0x42b57d):_0x2a2084,_0x45ee68=_0x49d31e[_0x1be6f3(0x137)]-0x1,_0x5b2cc4;_0x45ee68>=0x0;_0x45ee68--)(_0x5b2cc4=_0x49d31e[_0x45ee68])&&(_0x13e953=_0x5b2cc4(_0x13e953)||_0x13e953);return _0x13e953;},N=(_0x4cad79,_0x5b61c3)=>(_0x313213,_0x2dec8f)=>_0x5b61c3(_0x313213,_0x2dec8f,_0x4cad79);let g=class extends _0x434d24{constructor(_0x3ff894,_0x2f0269){const _0x6bfc3d=_0x1b47a9;super(),this[_0x6bfc3d(0x178)]=_0x3ff894,this[_0x6bfc3d(0x186)]=_0x2f0269,this['_initDataSource']();}['_initDataSource'](){const _0x3acc06=_0x1b47a9;this['_threadCommentDataSourceService']['dataSource']=this[_0x3acc06(0x186)],this[_0x3acc06(0x178)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x5e6fac),N(0x1,_0x113128(f))],g);function _0x124b(_0x420d37,_0x4a2db5){const _0x107845=_0x1078();return _0x124b=function(_0x124bf7,_0x11fe76){_0x124bf7=_0x124bf7-0x128;let _0x248c88=_0x107845[_0x124bf7];return _0x248c88;},_0x124b(_0x420d37,_0x4a2db5);}var se=Object[_0x1b47a9(0x128)],oe=Object[_0x1b47a9(0x14c)],ne=(_0x421412,_0x15296a,_0x23e0d5)=>_0x15296a in _0x421412?se(_0x421412,_0x15296a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23e0d5}):_0x421412[_0x15296a]=_0x23e0d5,ie=(_0x291359,_0x335706,_0x22d712,_0x50b4e6)=>{const _0x13cf79=_0x1b47a9;for(var _0x2b9f2a=_0x50b4e6>0x1?void 0x0:_0x50b4e6?oe(_0x335706,_0x22d712):_0x335706,_0x1a94be=_0x291359[_0x13cf79(0x137)]-0x1,_0x118a7b;_0x1a94be>=0x0;_0x1a94be--)(_0x118a7b=_0x291359[_0x1a94be])&&(_0x2b9f2a=_0x118a7b(_0x2b9f2a)||_0x2b9f2a);return _0x2b9f2a;},w=(_0x4c3a1d,_0x5fa085)=>(_0x38419c,_0x439a2c)=>_0x5fa085(_0x38419c,_0x439a2c,_0x4c3a1d),$=(_0x4d61aa,_0x5eccb4,_0x727677)=>ne(_0x4d61aa,typeof _0x5eccb4!=_0x1b47a9(0x148)?_0x5eccb4+'':_0x5eccb4,_0x727677);let b=class extends _0x5b100b{constructor(_0x292d01=M,_0x421f76,_0x5698bc){const _0x56cdb9=_0x1b47a9;super(),this[_0x56cdb9(0x163)]=_0x292d01,this[_0x56cdb9(0x151)]=_0x421f76,this[_0x56cdb9(0x12d)]=_0x5698bc;const {..._0x1ce176}=_0x4ebc5a({},M,this[_0x56cdb9(0x163)]);this[_0x56cdb9(0x12d)]['setConfig'](z,_0x1ce176);}[_0x1b47a9(0x16d)](){const _0x442a09=_0x1b47a9;[[f],[g],[S]][_0x442a09(0x132)](_0x3f89f3=>{const _0x3b4375=_0x442a09;this[_0x3b4375(0x151)][_0x3b4375(0x164)](_0x3f89f3);});}[_0x1b47a9(0x184)](){const _0x24dae9=_0x1b47a9;this[_0x24dae9(0x151)][_0x24dae9(0x180)](g),this[_0x24dae9(0x151)][_0x24dae9(0x180)](S);}};$(b,_0x1b47a9(0x189),W),$(b,_0x1b47a9(0x168),_0x1ce2d1[_0x1b47a9(0x182)]),b=ie([_0x8a9abb(_0x18e6d7,_0x3a519b,_0x4ef8f5),w(0x1,_0x113128(_0x59dbaa)),w(0x2,_0x575a65)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3bd9(){const _0x27064e=['UNIVER_UNKNOWN','UniverProCollaborationClient','UniverInstanceType','Edit','703275phEWoa','comments','_initDataSource','pluginName','saveCommentToSnapshot','addUser','filter','subscribe','UniverNetwork','function','solved','getUnit','Solved','userID','Unknown','listComments','@univerjs/network','IConfigService','getOwnPropertyDescriptor','ref','@univerjs/thread-comment-ui','/universer-api/user/list','merge','personId','_userService','UniverThreadCommentUIPlugin','/universer-api/comment/unit/','_httpService','customRanges','@univerjs/core','slice','21OigmuU','_threadCommentDataSource','userId','size','Injector','Reply','UserManagerService','Solve','content','CustomRangeType','_initUserSync','UniverCore','Plugin','getComment','5053512XFdYZT','_configService','thread-comment-data-source.config','pipe','UniverCollaborationClientPlugin','deleteComment','rangeId','@univerjs-pro/collaboration-client','CollaborationSessionService','updateComment','8855166wjMkbv','UNRECOGNIZED','/edit','COMMENT','10ZqsFDA','UniverLicensePlugin','Inject','_sessionService','delete','Delete','error','11198151GubkfO','get','UniverProLicense','/list','_init','_commentService','DependentOn','resolved','post','@univerjs/thread-comment','requireSession','3560264uUmwdA','object','3300805yYgYom','rxjs','values','OpenOrReOpen','defineProperty','threadId','onReady','payload','user','reply','getCurrentUser','bufferTime','forEach','Module','map','code','replies','parse','parentId','disposeWithMe','YYYY/MM/DD\x20HH:mm','addComment','rangeType','getMemberID','UniverThreadCommentDataSourcePlugin','createTimestamp','format','users','commentUpdate$','Disposable','body','36594jIddZe','_injector','toStringTag','unitId','_config','_threadCommentModel','type','length','add','@univerjs-pro/license','exports','/add','replyId','root','_threadCommentDataSourceService','Add'];_0x3bd9=function(){return _0x27064e;};return _0x3bd9();}function _0x13b2(_0x3b145c,_0x3124f0){const _0x3bd94d=_0x3bd9();return _0x13b2=function(_0x13b22b,_0x3288b1){_0x13b22b=_0x13b22b-0x1a5;let _0x4f6a1c=_0x3bd94d[_0x13b22b];return _0x4f6a1c;},_0x13b2(_0x3b145c,_0x3124f0);}(function(_0x2e033d,_0xdcda1d){const _0x377fe2=_0x13b2,_0x5cf754=_0x2e033d();while(!![]){try{const _0x54e211=parseInt(_0x377fe2(0x1df))/0x1+-parseInt(_0x377fe2(0x1ac))/0x2*(parseInt(_0x377fe2(0x1f3))/0x3)+parseInt(_0x377fe2(0x220))/0x4+-parseInt(_0x377fe2(0x1c0))/0x5+parseInt(_0x377fe2(0x1a8))/0x6+-parseInt(_0x377fe2(0x212))/0x7*(parseInt(_0x377fe2(0x1be))/0x8)+parseInt(_0x377fe2(0x1b3))/0x9;if(_0x54e211===_0xdcda1d)break;else _0x5cf754['push'](_0x5cf754['shift']());}catch(_0x263201){_0x5cf754['push'](_0x5cf754['shift']());}}}(_0x3bd9,0xd02cf),function(_0x1c0bb8,_0x45b1c3){const _0x1c0291=_0x13b2;typeof exports==_0x1c0291(0x1bf)&&typeof module<'u'?_0x45b1c3(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==_0x1c0291(0x1fc)&&define['amd']?define([_0x1c0291(0x1e9),_0x1c0291(0x1a5),_0x1c0291(0x1e8),_0x1c0291(0x210),_0x1c0291(0x207),_0x1c0291(0x1bc),_0x1c0291(0x1c1),_0x1c0291(0x203)],_0x45b1c3):(_0x1c0bb8=typeof globalThis<'u'?globalThis:_0x1c0bb8||self,_0x45b1c3(_0x1c0bb8['UniverProThreadCommentDatasource']={},_0x1c0bb8[_0x1c0291(0x1f0)],_0x1c0bb8[_0x1c0291(0x1b5)],_0x1c0bb8[_0x1c0291(0x21d)],_0x1c0bb8['UniverThreadCommentUi'],_0x1c0bb8['UniverThreadComment'],_0x1c0bb8[_0x1c0291(0x1c1)],_0x1c0bb8[_0x1c0291(0x1fb)]));}(this,function(_0x1ae276,_0x37084b,_0x207f1e,_0x5ba056,_0x3baf1d,_0x3ad7b4,_0x4c59a4,_0x154ab6){'use strict';const _0x4a77d2=_0x13b2;const _0x14cf78='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x16f4e7=(_0x3a3151=>(_0x3a3151[_0x3a3151[_0x4a77d2(0x1c3)]=0x0]='OpenOrReOpen',_0x3a3151[_0x3a3151['Solved']=0x1]=_0x4a77d2(0x1ff),_0x3a3151[_0x3a3151[_0x4a77d2(0x1a9)]=-0x1]=_0x4a77d2(0x1a9),_0x3a3151))(_0x16f4e7||{}),_0x11d891=(_0x1f4f27=>(_0x1f4f27[_0x1f4f27[_0x4a77d2(0x201)]=0x0]='Unknown',_0x1f4f27[_0x1f4f27[_0x4a77d2(0x1ee)]=0x1]=_0x4a77d2(0x1ee),_0x1f4f27[_0x1f4f27[_0x4a77d2(0x217)]=0x2]='Reply',_0x1f4f27[_0x1f4f27['Edit']=0x3]=_0x4a77d2(0x1f2),_0x1f4f27[_0x1f4f27[_0x4a77d2(0x1b1)]=0x4]=_0x4a77d2(0x1b1),_0x1f4f27[_0x1f4f27[_0x4a77d2(0x219)]=0x5]=_0x4a77d2(0x219),_0x1f4f27[_0x1f4f27['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1f4f27))(_0x11d891||{});const _0x8c1d59=_0x3dbb1e=>_0x5ba056['dayjs'](new Date(+_0x3dbb1e))[_0x4a77d2(0x1da)](_0x4a77d2(0x1d4)),_0x5cb37d=async(_0x1897d5,_0x4023cf)=>{const _0x2505cc=_0x4a77d2,_0x4017b0=_0x1897d5[_0x2505cc(0x1b4)](_0x5ba056[_0x2505cc(0x218)]),_0x3f3bee=_0x1897d5['get'](_0x154ab6['HTTPService']);_0x4023cf[_0x2505cc(0x1cc)](_0x548610=>{const _0x119aa7=_0x2505cc;_0x4017b0['getUser'](_0x548610)&&_0x4023cf[_0x119aa7(0x1b0)](_0x548610);}),_0x4023cf[_0x2505cc(0x215)]&&(await _0x3f3bee[_0x2505cc(0x1b4)](_0x2505cc(0x208),{'params':{'userIDs':[..._0x4023cf]}}))[_0x2505cc(0x1de)][_0x2505cc(0x1db)][_0x2505cc(0x1cc)](_0xe373cf=>{const _0x52cd06=_0x2505cc;_0xe373cf&&_0x4017b0[_0x52cd06(0x1f8)](_0xe373cf);});};var _0x15bd2b=Object[_0x4a77d2(0x205)],_0x494bb5=(_0x313337,_0x24462a,_0x171c99,_0x5ccaec)=>{const _0x55ab2c=_0x4a77d2;for(var _0x111e1b=_0x5ccaec>0x1?void 0x0:_0x5ccaec?_0x15bd2b(_0x24462a,_0x171c99):_0x24462a,_0xe449a7=_0x313337[_0x55ab2c(0x1e6)]-0x1,_0x383503;_0xe449a7>=0x0;_0xe449a7--)(_0x383503=_0x313337[_0xe449a7])&&(_0x111e1b=_0x383503(_0x111e1b)||_0x111e1b);return _0x111e1b;},_0x2aa092=(_0x4ce067,_0x14d22c)=>(_0x37c37e,_0x3af679)=>_0x14d22c(_0x37c37e,_0x3af679,_0x4ce067);let _0x56ef11=class extends _0x5ba056[_0x4a77d2(0x1dd)]{constructor(_0x44b6cf,_0x192aa8,_0x146859,_0x24ce0e){const _0x5b912a=_0x4a77d2;super(),this['_commentService']=_0x44b6cf,this[_0x5b912a(0x1e4)]=_0x192aa8,this['_userService']=_0x146859,this[_0x5b912a(0x1e0)]=_0x24ce0e,this['_init'](),this[_0x5b912a(0x21c)]();}['_initUserSync'](){const _0x1e1470=_0x4a77d2;this[_0x1e1470(0x1d3)](this['_threadCommentModel']['commentUpdate$'][_0x1e1470(0x223)](_0x4c59a4[_0x1e1470(0x1cb)](0x10))['subscribe'](_0x3ce1bc=>{const _0x2c5ebf=_0x1e1470,_0x18e68a=new Set();_0x3ce1bc[_0x2c5ebf(0x1cc)](_0x1af7e3=>{const _0x303ff2=_0x2c5ebf;switch(_0x1af7e3[_0x303ff2(0x1e5)]){case _0x303ff2(0x1e7):{const _0x261086=_0x1af7e3[_0x303ff2(0x1c7)][_0x303ff2(0x20a)];_0x18e68a[_0x303ff2(0x1e7)](_0x261086);break;}}}),_0x5cb37d(this[_0x2c5ebf(0x1e0)],_0x18e68a);}));}[_0x4a77d2(0x1b7)](){const _0x1cc549=_0x4a77d2;this['disposeWithMe'](this[_0x1cc549(0x1b8)][_0x1cc549(0x1dc)][_0x1cc549(0x1fa)](async _0x5ceae3=>{const _0x3b440d=_0x1cc549;var _0x5674a0,_0x410fe9,_0x5ad048,_0x68c832;const _0x12be65=(_0x5674a0=this[_0x3b440d(0x1e4)]['getUnit'](_0x5ceae3[_0x3b440d(0x1e2)])['find'](_0x3b6e6e=>_0x3b6e6e[_0x3b440d(0x1c5)]===_0x5ceae3[_0x3b440d(0x1c5)]))==null?void 0x0:_0x5674a0[_0x3b440d(0x1ec)];if(!_0x12be65)return;const {unitId:_0x50b940,subUnitId:_0x26edad}=_0x12be65;switch(_0x5ceae3[_0x3b440d(0x1c8)]&&this[_0x3b440d(0x20b)][_0x3b440d(0x1f8)](_0x5ceae3['user']),_0x5ceae3[_0x3b440d(0x1e5)]){case _0x11d891['Add']:break;case _0x11d891['Reply']:{this['_threadCommentModel'][_0x3b440d(0x1d5)](_0x50b940,_0x26edad,{'unitId':_0x50b940,'subUnitId':_0x26edad,'ref':'','id':_0x5ceae3['replyId'],'dT':_0x8c1d59(+_0x5ceae3[_0x3b440d(0x1d9)]),'threadId':_0x5ceae3[_0x3b440d(0x1c5)],'personId':(_0x5ad048=(_0x410fe9=_0x5ceae3[_0x3b440d(0x1c8)])==null?void 0x0:_0x410fe9[_0x3b440d(0x200)])!=null?_0x5ad048:_0x5ceae3[_0x3b440d(0x214)],'text':JSON[_0x3b440d(0x1d1)](_0x5ceae3[_0x3b440d(0x21a)]),'parentId':_0x12be65['id']});break;}case _0x11d891[_0x3b440d(0x1b1)]:{const _0x1a32d9=this[_0x3b440d(0x1e4)][_0x3b440d(0x21f)](_0x50b940,_0x26edad,_0x5ceae3[_0x3b440d(0x1eb)]);_0x1a32d9&&_0x1a32d9[_0x3b440d(0x1d2)]&&this['_threadCommentModel'][_0x3b440d(0x225)](_0x50b940,_0x26edad,_0x5ceae3['replyId']);break;}case _0x11d891[_0x3b440d(0x1f2)]:{this['_threadCommentModel'][_0x3b440d(0x1a7)](_0x50b940,_0x26edad,{'commentId':_0x5ceae3[_0x3b440d(0x1eb)],'text':JSON['parse'](_0x5ceae3[_0x3b440d(0x21a)])});break;}case _0x11d891['Solve']:{const _0x59873f=(_0x68c832=this[_0x3b440d(0x1e4)][_0x3b440d(0x1fe)](_0x5ceae3['unitId'])['find'](_0x3fc3c=>_0x3fc3c[_0x3b440d(0x1c5)]===_0x5ceae3[_0x3b440d(0x1c5)]))==null?void 0x0:_0x68c832['root'];_0x59873f&&this[_0x3b440d(0x1e4)]['resolveComment'](_0x50b940,_0x26edad,_0x59873f['id'],_0x5ceae3[_0x3b440d(0x1fd)]===_0x16f4e7[_0x3b440d(0x1ff)]);break;}}}));}};_0x56ef11=_0x494bb5([_0x2aa092(0x0,_0x5ba056[_0x4a77d2(0x1ae)](_0x37084b['CommentService'])),_0x2aa092(0x1,_0x5ba056['Inject'](_0x3ad7b4['ThreadCommentModel'])),_0x2aa092(0x2,_0x5ba056[_0x4a77d2(0x1ae)](_0x5ba056[_0x4a77d2(0x218)])),_0x2aa092(0x3,_0x5ba056[_0x4a77d2(0x1ae)](_0x5ba056[_0x4a77d2(0x216)]))],_0x56ef11);const _0x13f207=_0x4a77d2(0x222),_0x567400={};var _0x1353fb=Object[_0x4a77d2(0x205)],_0x1afa7b=(_0x602cf4,_0x103383,_0x58c6dd,_0x314c2d)=>{const _0x41b428=_0x4a77d2;for(var _0x5a6516=_0x314c2d>0x1?void 0x0:_0x314c2d?_0x1353fb(_0x103383,_0x58c6dd):_0x103383,_0x404091=_0x602cf4[_0x41b428(0x1e6)]-0x1,_0x498315;_0x404091>=0x0;_0x404091--)(_0x498315=_0x602cf4[_0x404091])&&(_0x5a6516=_0x498315(_0x5a6516)||_0x5a6516);return _0x5a6516;},_0x3efadf=(_0x9a4306,_0x10e2a1)=>(_0x43e080,_0x15e2e3)=>_0x10e2a1(_0x43e080,_0x15e2e3,_0x9a4306);function _0x367e8e(_0x3898a9,_0x31d7ec){const _0x384d53=_0x4a77d2,_0x5a8240=_0x3898a9['replies'][0x0];return{..._0x31d7ec,'id':_0x5a8240[_0x384d53(0x1eb)],'resolved':_0x3898a9['solved']===0x1,'dT':_0x8c1d59(_0x5a8240[_0x384d53(0x1d9)]),'personId':_0x5a8240['userId'],'threadId':_0x5a8240[_0x384d53(0x1c5)]};}function _0x500961(_0x34675f,_0x3a0b84,_0xd72941){const _0x541e47=_0x4a77d2;var _0x14436f,_0x415fec;if(((_0x415fec=(_0x14436f=_0x34675f==null?void 0x0:_0x34675f[_0x541e47(0x1d0)])==null?void 0x0:_0x14436f['length'])!=null?_0x415fec:0x0)>0x0){const _0x8a1507=(_0x27f9b9,_0x11fe49)=>({'id':_0x27f9b9[_0x541e47(0x1eb)],'threadId':_0x27f9b9[_0x541e47(0x1c5)],'dT':_0x8c1d59(_0x27f9b9[_0x541e47(0x1d9)]),'personId':_0x27f9b9[_0x541e47(0x214)],'resolved':_0x34675f['solved']===_0x16f4e7[_0x541e47(0x1ff)],'unitId':_0x3a0b84,'subUnitId':_0xd72941,'text':JSON['parse'](_0x27f9b9['content']),'parentId':_0x11fe49}),_0x12c3fa=_0x8a1507(_0x34675f[_0x541e47(0x1d0)][0x0]);return{..._0x12c3fa,'children':_0x34675f[_0x541e47(0x1d0)][_0x541e47(0x211)](0x1)[_0x541e47(0x1ce)](_0x6b0197=>_0x8a1507(_0x6b0197,_0x12c3fa['id']))};}return null;}let _0x454689=class{constructor(_0x57601e,_0x540e3b,_0xaf8c81,_0x31a67d){const _0xa5a0f6=_0x4a77d2;this['_httpService']=_0x57601e,this[_0xa5a0f6(0x20b)]=_0x540e3b,this[_0xa5a0f6(0x1af)]=_0xaf8c81,this[_0xa5a0f6(0x1e0)]=_0x31a67d;}async[_0x4a77d2(0x1d5)](_0x2454cb){const _0x541b6e=_0x4a77d2;var _0x3eebb6,_0x206302;const {parentId:_0xb0b706,unitId:_0x4e11a0,text:_0x47b23b,threadId:_0x3c73d6}=_0x2454cb,_0x1fd88d=(_0x206302=(_0x3eebb6=_0x47b23b[_0x541b6e(0x20f)])==null?void 0x0:_0x3eebb6[_0x541b6e(0x1f9)](_0xa74120=>_0xa74120[_0x541b6e(0x1d6)]===_0x5ba056[_0x541b6e(0x21b)][_0x541b6e(0x1ab)])[_0x541b6e(0x1ce)](_0x5998f7=>_0x5998f7[_0x541b6e(0x226)]))!=null?_0x206302:[],_0x3ef05b=JSON['stringify'](_0x47b23b),_0x6065c9=(await this[_0x541b6e(0x1af)]['requireSession'](_0x4e11a0))[_0x541b6e(0x1d7)]();if(_0xb0b706){const _0x15aeea={'memberId':_0x6065c9,'unitId':_0x4e11a0,'content':_0x3ef05b,'mention':_0x1fd88d,'threadId':_0x3c73d6},_0x6ef600=(await this[_0x541b6e(0x20e)][_0x541b6e(0x1bb)](_0x541b6e(0x20d)+_0x4e11a0+'/reply',{'body':_0x15aeea}))[_0x541b6e(0x1de)][_0x541b6e(0x1c9)];return{..._0x2454cb,'id':_0x6ef600[_0x541b6e(0x1eb)],'dT':_0x5ba056['dayjs'](+_0x6ef600[_0x541b6e(0x1d9)])[_0x541b6e(0x1da)](_0x541b6e(0x1d4)),'personId':_0x6ef600[_0x541b6e(0x214)]};}else{const _0x284fba={'memberId':_0x6065c9,'unitId':_0x4e11a0,'content':_0x3ef05b,'mention':_0x1fd88d},_0x194200=await this[_0x541b6e(0x20e)][_0x541b6e(0x1bb)]('/universer-api/comment/unit/'+_0x4e11a0+_0x541b6e(0x1ea),{'body':_0x284fba});return _0x367e8e(_0x194200['body']['comment'],_0x2454cb);}}async[_0x4a77d2(0x1a7)](_0x2490a1){const _0x8508c0=_0x4a77d2;var _0x2c1677,_0x1e6d22;const {text:_0x8db7b1,unitId:_0x5a9b71}=_0x2490a1,_0x4dd245=(_0x1e6d22=(_0x2c1677=_0x8db7b1[_0x8508c0(0x20f)])==null?void 0x0:_0x2c1677[_0x8508c0(0x1f9)](_0x490fc2=>_0x490fc2[_0x8508c0(0x1d6)]===_0x5ba056[_0x8508c0(0x21b)][_0x8508c0(0x1ab)])[_0x8508c0(0x1ce)](_0x38a9d9=>_0x38a9d9['rangeId']))!=null?_0x1e6d22:[],_0x49a68e=JSON['stringify'](_0x8db7b1),_0x1996a9=_0x2490a1['threadId'],_0x2b443b=_0x2490a1['id'],_0x29a821={'memberId':(await this['_sessionService'][_0x8508c0(0x1bd)](_0x5a9b71))[_0x8508c0(0x1d7)](),'unitId':_0x5a9b71,'threadId':_0x1996a9,'mention':_0x4dd245,'content':_0x49a68e,'replyId':_0x2b443b},_0xf91b5f=await this[_0x8508c0(0x20e)][_0x8508c0(0x1bb)]('/universer-api/comment/unit/'+_0x5a9b71+_0x8508c0(0x1aa),{'body':_0x29a821});return!_0xf91b5f[_0x8508c0(0x1de)][_0x8508c0(0x1b2)]||_0xf91b5f['body'][_0x8508c0(0x1b2)][_0x8508c0(0x1cf)]===0x1;}async['resolveComment'](_0x11a8a2){const _0x24abb9=_0x4a77d2,{unitId:_0x24171f}=_0x11a8a2,_0x540cb1=_0x11a8a2['threadId'],_0x309ba0={'memberId':this['_userService'][_0x24abb9(0x1ca)]()[_0x24abb9(0x200)],'unitId':_0x24171f,'threadId':_0x540cb1,'solved':_0x11a8a2[_0x24abb9(0x1ba)]?_0x16f4e7['Solved']:_0x16f4e7[_0x24abb9(0x1c3)]},_0x290f1d=await this[_0x24abb9(0x20e)][_0x24abb9(0x1bb)](_0x24abb9(0x20d)+_0x24171f+'/solved',{'body':_0x309ba0});return!_0x290f1d[_0x24abb9(0x1de)]['error']||_0x290f1d[_0x24abb9(0x1de)]['error'][_0x24abb9(0x1cf)]===0x1;}async[_0x4a77d2(0x225)](_0x4aff81,_0x4f6ef1,_0x3bfc52,_0x548950){const _0x5c5f7f=_0x4a77d2,_0x191f72={'memberId':(await this[_0x5c5f7f(0x1af)][_0x5c5f7f(0x1bd)](_0x4aff81))['getMemberID'](),'threadId':_0x3bfc52,'replyId':_0x548950,'unitId':_0x4aff81},_0x578a97=await this[_0x5c5f7f(0x20e)][_0x5c5f7f(0x1bb)](_0x5c5f7f(0x20d)+_0x4aff81+'/delete',{'body':_0x191f72});return!_0x578a97[_0x5c5f7f(0x1de)][_0x5c5f7f(0x1b2)]||_0x578a97['body']['error'][_0x5c5f7f(0x1cf)]===0x1;}async[_0x4a77d2(0x202)](_0x23706d,_0x3ac011,_0x31b3d){const _0x36960b=_0x4a77d2,_0x100915={'unitId':_0x23706d,'threadId':_0x31b3d},_0x564f=await this[_0x36960b(0x20e)][_0x36960b(0x1bb)](_0x36960b(0x20d)+_0x23706d+_0x36960b(0x1b6),{'body':_0x100915}),_0x466272=_0x31b3d[_0x36960b(0x1ce)](_0x4a4acf=>_0x500961(_0x564f['body'][_0x36960b(0x1f4)][_0x4a4acf],_0x23706d,_0x3ac011))[_0x36960b(0x1f9)](Boolean);return Object[_0x36960b(0x1c2)](_0x564f['body']['users'])[_0x36960b(0x1cc)](_0x3993ed=>{const _0x682021=_0x36960b;this[_0x682021(0x20b)]['addUser'](_0x3993ed);}),_0x466272;}[_0x4a77d2(0x1f7)](_0x8659d5){const _0x345793=_0x4a77d2;return{'id':_0x8659d5['id'],'threadId':_0x8659d5[_0x345793(0x1c5)],'ref':_0x8659d5[_0x345793(0x206)]};}};_0x454689=_0x1afa7b([_0x3efadf(0x0,_0x5ba056[_0x4a77d2(0x1ae)](_0x154ab6['HTTPService'])),_0x3efadf(0x1,_0x5ba056['Inject'](_0x5ba056[_0x4a77d2(0x218)])),_0x3efadf(0x2,_0x5ba056['Inject'](_0x37084b[_0x4a77d2(0x1a6)])),_0x3efadf(0x3,_0x5ba056[_0x4a77d2(0x1ae)](_0x5ba056[_0x4a77d2(0x216)]))],_0x454689);var _0x2e48d5=Object['getOwnPropertyDescriptor'],_0x5c7d2f=(_0x4d9967,_0x363717,_0xacb51a,_0xf0f8fa)=>{const _0x42d150=_0x4a77d2;for(var _0x587ebd=_0xf0f8fa>0x1?void 0x0:_0xf0f8fa?_0x2e48d5(_0x363717,_0xacb51a):_0x363717,_0x40b3be=_0x4d9967[_0x42d150(0x1e6)]-0x1,_0x1b6a90;_0x40b3be>=0x0;_0x40b3be--)(_0x1b6a90=_0x4d9967[_0x40b3be])&&(_0x587ebd=_0x1b6a90(_0x587ebd)||_0x587ebd);return _0x587ebd;},_0xff89c5=(_0x163155,_0x102d5)=>(_0x28d2a7,_0x505713)=>_0x102d5(_0x28d2a7,_0x505713,_0x163155);let _0xf61aef=class extends _0x5ba056[_0x4a77d2(0x1dd)]{constructor(_0x23484f,_0x1b2f82){const _0xa0dcc=_0x4a77d2;super(),this[_0xa0dcc(0x1ed)]=_0x23484f,this['_threadCommentDataSource']=_0x1b2f82,this[_0xa0dcc(0x1f5)]();}[_0x4a77d2(0x1f5)](){const _0x2d5177=_0x4a77d2;this[_0x2d5177(0x1ed)]['dataSource']=this[_0x2d5177(0x213)],this[_0x2d5177(0x1ed)]['syncUpdateMutationToColla']=!0x1;}};_0xf61aef=_0x5c7d2f([_0xff89c5(0x0,_0x3ad7b4['IThreadCommentDataSourceService']),_0xff89c5(0x1,_0x5ba056[_0x4a77d2(0x1ae)](_0x454689))],_0xf61aef);var _0x4059ad=Object['defineProperty'],_0x2c4921=Object['getOwnPropertyDescriptor'],_0x2135ef=(_0x35b308,_0x38950b,_0x3d11c1)=>_0x38950b in _0x35b308?_0x4059ad(_0x35b308,_0x38950b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d11c1}):_0x35b308[_0x38950b]=_0x3d11c1,_0x119253=(_0x7f5303,_0x508984,_0x5e3b01,_0xedfddb)=>{const _0x333720=_0x4a77d2;for(var _0x1b527d=_0xedfddb>0x1?void 0x0:_0xedfddb?_0x2c4921(_0x508984,_0x5e3b01):_0x508984,_0x5373e7=_0x7f5303[_0x333720(0x1e6)]-0x1,_0x476bc1;_0x5373e7>=0x0;_0x5373e7--)(_0x476bc1=_0x7f5303[_0x5373e7])&&(_0x1b527d=_0x476bc1(_0x1b527d)||_0x1b527d);return _0x1b527d;},_0x28c9a6=(_0x4d2277,_0x3cce15)=>(_0x2b25bc,_0x44976e)=>_0x3cce15(_0x2b25bc,_0x44976e,_0x4d2277),_0x4f8223=(_0x22ec63,_0x3454d3,_0x456fde)=>_0x2135ef(_0x22ec63,typeof _0x3454d3!='symbol'?_0x3454d3+'':_0x3454d3,_0x456fde);_0x1ae276[_0x4a77d2(0x1d8)]=class extends _0x5ba056[_0x4a77d2(0x21e)]{constructor(_0x2b8742=_0x567400,_0x150fe7,_0x4525ad){const _0x64d217=_0x4a77d2;super(),this[_0x64d217(0x1e3)]=_0x2b8742,this[_0x64d217(0x1e0)]=_0x150fe7,this[_0x64d217(0x221)]=_0x4525ad;const {..._0x1da929}=_0x5ba056[_0x64d217(0x209)]({},_0x567400,this[_0x64d217(0x1e3)]);this[_0x64d217(0x221)]['setConfig'](_0x13f207,_0x1da929);}['onStarting'](){const _0x4e9512=_0x4a77d2;[[_0x454689],[_0xf61aef],[_0x56ef11]][_0x4e9512(0x1cc)](_0x379a2b=>{const _0x304845=_0x4e9512;this[_0x304845(0x1e0)][_0x304845(0x1e7)](_0x379a2b);});}[_0x4a77d2(0x1c6)](){const _0x2de493=_0x4a77d2;this['_injector'][_0x2de493(0x1b4)](_0xf61aef),this['_injector'][_0x2de493(0x1b4)](_0x56ef11);}},_0x4f8223(_0x1ae276[_0x4a77d2(0x1d8)],_0x4a77d2(0x1f6),_0x14cf78),_0x4f8223(_0x1ae276['UniverThreadCommentDataSourcePlugin'],_0x4a77d2(0x1e5),_0x5ba056[_0x4a77d2(0x1f1)][_0x4a77d2(0x1ef)]),_0x1ae276[_0x4a77d2(0x1d8)]=_0x119253([_0x5ba056[_0x4a77d2(0x1b9)](_0x3baf1d[_0x4a77d2(0x20c)],_0x37084b[_0x4a77d2(0x224)],_0x207f1e[_0x4a77d2(0x1ad)]),_0x28c9a6(0x1,_0x5ba056[_0x4a77d2(0x1ae)](_0x5ba056[_0x4a77d2(0x216)])),_0x28c9a6(0x2,_0x5ba056[_0x4a77d2(0x204)])],_0x1ae276['UniverThreadCommentDataSourcePlugin']),Object[_0x4a77d2(0x1c4)](_0x1ae276,Symbol[_0x4a77d2(0x1e1)],{'value':_0x4a77d2(0x1cd)});}));
1
+ (function(_0x48388f,_0x4f3d0c){const _0x5ae752=_0x1bc3,_0x511721=_0x48388f();while(!![]){try{const _0x3974e4=parseInt(_0x5ae752(0x18c))/0x1*(parseInt(_0x5ae752(0x19a))/0x2)+-parseInt(_0x5ae752(0x1e8))/0x3+-parseInt(_0x5ae752(0x1e6))/0x4+-parseInt(_0x5ae752(0x175))/0x5+parseInt(_0x5ae752(0x1a2))/0x6+parseInt(_0x5ae752(0x1c6))/0x7+-parseInt(_0x5ae752(0x193))/0x8*(-parseInt(_0x5ae752(0x1b3))/0x9);if(_0x3974e4===_0x4f3d0c)break;else _0x511721['push'](_0x511721['shift']());}catch(_0x455c26){_0x511721['push'](_0x511721['shift']());}}}(_0x3990,0x46a64),function(_0x1f7b8e,_0x3557a3){const _0x531889=_0x1bc3;typeof exports==_0x531889(0x184)&&typeof module<'u'?_0x3557a3(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==_0x531889(0x196)&&define[_0x531889(0x1b1)]?define(['exports',_0x531889(0x1d5),_0x531889(0x1bf),'@univerjs/core',_0x531889(0x1d6),'@univerjs/thread-comment',_0x531889(0x194),_0x531889(0x1de)],_0x3557a3):(_0x1f7b8e=typeof globalThis<'u'?globalThis:_0x1f7b8e||self,_0x3557a3(_0x1f7b8e[_0x531889(0x1f4)]={},_0x1f7b8e[_0x531889(0x1a0)],_0x1f7b8e['UniverProLicense'],_0x1f7b8e[_0x531889(0x1c0)],_0x1f7b8e[_0x531889(0x1ac)],_0x1f7b8e[_0x531889(0x1cb)],_0x1f7b8e[_0x531889(0x194)],_0x1f7b8e['UniverNetwork']));}(this,function(_0x5742a6,_0x2a4d49,_0x46234c,_0x42b4da,_0x22a6ec,_0x2f850a,_0x282e99,_0x2bc6d0){'use strict';const _0x122b3b=_0x1bc3;const _0xafa4fc=_0x122b3b(0x176);var _0x57db8b=(_0x44f346=>(_0x44f346[_0x44f346[_0x122b3b(0x182)]=0x0]=_0x122b3b(0x182),_0x44f346[_0x44f346[_0x122b3b(0x1ae)]=0x1]=_0x122b3b(0x1ae),_0x44f346[_0x44f346[_0x122b3b(0x1ec)]=-0x1]='UNRECOGNIZED',_0x44f346))(_0x57db8b||{}),_0x46ba33=(_0x1f9a5b=>(_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x180)]=0x0]=_0x122b3b(0x180),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x17a)]=0x1]=_0x122b3b(0x17a),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x170)]=0x2]=_0x122b3b(0x170),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x1d2)]=0x3]='Edit',_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x18b)]=0x4]=_0x122b3b(0x18b),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x1bd)]=0x5]=_0x122b3b(0x1bd),_0x1f9a5b[_0x1f9a5b['UNRECOGNIZED']=-0x1]=_0x122b3b(0x1ec),_0x1f9a5b))(_0x46ba33||{});const _0x34f9fe=_0x2eb2c5=>_0x42b4da[_0x122b3b(0x1f0)](new Date(+_0x2eb2c5))[_0x122b3b(0x173)](_0x122b3b(0x16f)),_0x1cf215=async(_0x4466be,_0x5ae8db)=>{const _0x559242=_0x122b3b,_0x4153ee=_0x4466be[_0x559242(0x1d0)](_0x42b4da['UserManagerService']),_0xacdfb9=_0x4466be[_0x559242(0x1d0)](_0x2bc6d0['HTTPService']);_0x5ae8db[_0x559242(0x1b0)](_0xbb231b=>{const _0x53629a=_0x559242;_0x4153ee[_0x53629a(0x198)](_0xbb231b)&&_0x5ae8db[_0x53629a(0x1a5)](_0xbb231b);}),_0x5ae8db[_0x559242(0x1bb)]&&(await _0xacdfb9[_0x559242(0x1d0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5ae8db]}}))[_0x559242(0x1b2)]['users'][_0x559242(0x1b0)](_0x542166=>{const _0x338b36=_0x559242;_0x542166&&_0x4153ee[_0x338b36(0x1d4)](_0x542166);});};var _0x47ab2f=Object[_0x122b3b(0x183)],_0x4d4340=(_0x1b8664,_0x2ffc17,_0x246eec,_0x27e73f)=>{const _0x35e67f=_0x122b3b;for(var _0x329962=_0x27e73f>0x1?void 0x0:_0x27e73f?_0x47ab2f(_0x2ffc17,_0x246eec):_0x2ffc17,_0x3729ef=_0x1b8664[_0x35e67f(0x1d8)]-0x1,_0x161966;_0x3729ef>=0x0;_0x3729ef--)(_0x161966=_0x1b8664[_0x3729ef])&&(_0x329962=_0x161966(_0x329962)||_0x329962);return _0x329962;},_0x400e87=(_0x269321,_0x415ed7)=>(_0xa38473,_0x5b645b)=>_0x415ed7(_0xa38473,_0x5b645b,_0x269321);let _0xdbacdc=class extends _0x42b4da['Disposable']{constructor(_0x1e91d4,_0x26e949,_0x7baf7,_0x10e369){const _0x50e4cc=_0x122b3b;super(),this[_0x50e4cc(0x1da)]=_0x1e91d4,this[_0x50e4cc(0x1c1)]=_0x26e949,this[_0x50e4cc(0x18a)]=_0x7baf7,this[_0x50e4cc(0x1d9)]=_0x10e369,this[_0x50e4cc(0x1b9)](),this[_0x50e4cc(0x1ee)]();}['_initUserSync'](){const _0x5db026=_0x122b3b;this[_0x5db026(0x1af)](this[_0x5db026(0x1c1)][_0x5db026(0x18f)][_0x5db026(0x1c9)](_0x282e99[_0x5db026(0x17f)](0x10))['subscribe'](_0x39de58=>{const _0x28707c=_0x5db026,_0x44abf7=new Set();_0x39de58[_0x28707c(0x1b0)](_0x554c61=>{const _0x52ebd2=_0x28707c;switch(_0x554c61[_0x52ebd2(0x19d)]){case'add':{const _0x23cfc6=_0x554c61[_0x52ebd2(0x1e7)][_0x52ebd2(0x1ba)];_0x44abf7[_0x52ebd2(0x179)](_0x23cfc6);break;}}}),_0x1cf215(this[_0x28707c(0x1d9)],_0x44abf7);}));}['_init'](){const _0x5c959e=_0x122b3b;this[_0x5c959e(0x1af)](this[_0x5c959e(0x1da)][_0x5c959e(0x18f)][_0x5c959e(0x1c3)](async _0x3b0bf8=>{const _0x30364c=_0x5c959e;var _0x3ac4c6,_0x562951,_0x171449,_0x39187c;const _0x55aa5f=(_0x3ac4c6=this['_threadCommentModel'][_0x30364c(0x1eb)](_0x3b0bf8['unitId'])[_0x30364c(0x1c4)](_0x18d7c3=>_0x18d7c3[_0x30364c(0x17d)]===_0x3b0bf8['threadId']))==null?void 0x0:_0x3ac4c6['root'];if(!_0x55aa5f)return;const {unitId:_0x2b6fb2,subUnitId:_0x343696}=_0x55aa5f;switch(_0x3b0bf8['user']&&this[_0x30364c(0x18a)][_0x30364c(0x1d4)](_0x3b0bf8['user']),_0x3b0bf8[_0x30364c(0x19d)]){case _0x46ba33[_0x30364c(0x17a)]:break;case _0x46ba33['Reply']:{this[_0x30364c(0x1c1)][_0x30364c(0x1ef)](_0x2b6fb2,_0x343696,{'unitId':_0x2b6fb2,'subUnitId':_0x343696,'ref':'','id':_0x3b0bf8[_0x30364c(0x1ad)],'dT':_0x34f9fe(+_0x3b0bf8[_0x30364c(0x1e1)]),'threadId':_0x3b0bf8['threadId'],'personId':(_0x171449=(_0x562951=_0x3b0bf8[_0x30364c(0x1d7)])==null?void 0x0:_0x562951[_0x30364c(0x177)])!=null?_0x171449:_0x3b0bf8[_0x30364c(0x1e0)],'text':JSON[_0x30364c(0x1d3)](_0x3b0bf8[_0x30364c(0x1b7)]),'parentId':_0x55aa5f['id']});break;}case _0x46ba33[_0x30364c(0x18b)]:{const _0x340d4e=this[_0x30364c(0x1c1)][_0x30364c(0x1e9)](_0x2b6fb2,_0x343696,_0x3b0bf8[_0x30364c(0x1ad)]);_0x340d4e&&_0x340d4e[_0x30364c(0x186)]&&this[_0x30364c(0x1c1)]['deleteComment'](_0x2b6fb2,_0x343696,_0x3b0bf8[_0x30364c(0x1ad)]);break;}case _0x46ba33['Edit']:{this['_threadCommentModel'][_0x30364c(0x181)](_0x2b6fb2,_0x343696,{'commentId':_0x3b0bf8[_0x30364c(0x1ad)],'text':JSON[_0x30364c(0x1d3)](_0x3b0bf8['content'])});break;}case _0x46ba33[_0x30364c(0x1bd)]:{const _0x4bf5e4=(_0x39187c=this['_threadCommentModel']['getUnit'](_0x3b0bf8[_0x30364c(0x1e2)])['find'](_0x2cf4b2=>_0x2cf4b2[_0x30364c(0x17d)]===_0x3b0bf8[_0x30364c(0x17d)]))==null?void 0x0:_0x39187c[_0x30364c(0x187)];_0x4bf5e4&&this[_0x30364c(0x1c1)][_0x30364c(0x191)](_0x2b6fb2,_0x343696,_0x4bf5e4['id'],_0x3b0bf8[_0x30364c(0x178)]===_0x57db8b[_0x30364c(0x1ae)]);break;}}}));}};_0xdbacdc=_0x4d4340([_0x400e87(0x0,_0x42b4da[_0x122b3b(0x1b5)](_0x2a4d49[_0x122b3b(0x18d)])),_0x400e87(0x1,_0x42b4da['Inject'](_0x2f850a[_0x122b3b(0x17b)])),_0x400e87(0x2,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1a3)])),_0x400e87(0x3,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1f1)]))],_0xdbacdc);const _0x5ec5d5='thread-comment-data-source.config',_0x9982d4={};var _0x9ebb9c=Object[_0x122b3b(0x183)],_0x22df30=(_0xa93d51,_0x20a638,_0x56d5de,_0x2a9543)=>{const _0x3609a9=_0x122b3b;for(var _0x3c0297=_0x2a9543>0x1?void 0x0:_0x2a9543?_0x9ebb9c(_0x20a638,_0x56d5de):_0x20a638,_0x3820aa=_0xa93d51[_0x3609a9(0x1d8)]-0x1,_0x48f868;_0x3820aa>=0x0;_0x3820aa--)(_0x48f868=_0xa93d51[_0x3820aa])&&(_0x3c0297=_0x48f868(_0x3c0297)||_0x3c0297);return _0x3c0297;},_0x10ea5c=(_0x12fa5a,_0x18a2de)=>(_0x37d452,_0x451165)=>_0x18a2de(_0x37d452,_0x451165,_0x12fa5a);function _0x2b078e(_0x352814,_0x22b4de){const _0x18c8eb=_0x122b3b,_0x25ec76=_0x352814['replies'][0x0];return{..._0x22b4de,'id':_0x25ec76[_0x18c8eb(0x1ad)],'resolved':_0x352814[_0x18c8eb(0x178)]===0x1,'dT':_0x34f9fe(_0x25ec76['createTimestamp']),'personId':_0x25ec76[_0x18c8eb(0x1e0)],'threadId':_0x25ec76['threadId']};}function _0x4cf10f(_0x1b23dc,_0x335cfe,_0x251efe){const _0x1db216=_0x122b3b;var _0x2bab98,_0x380bc2;if(((_0x380bc2=(_0x2bab98=_0x1b23dc==null?void 0x0:_0x1b23dc['replies'])==null?void 0x0:_0x2bab98[_0x1db216(0x1d8)])!=null?_0x380bc2:0x0)>0x0){const _0x597942=(_0x44c6fb,_0x285f3d)=>({'id':_0x44c6fb['replyId'],'threadId':_0x44c6fb[_0x1db216(0x17d)],'dT':_0x34f9fe(_0x44c6fb[_0x1db216(0x1e1)]),'personId':_0x44c6fb[_0x1db216(0x1e0)],'resolved':_0x1b23dc[_0x1db216(0x178)]===_0x57db8b[_0x1db216(0x1ae)],'unitId':_0x335cfe,'subUnitId':_0x251efe,'text':JSON[_0x1db216(0x1d3)](_0x44c6fb[_0x1db216(0x1b7)]),'parentId':_0x285f3d}),_0xff1e6c=_0x597942(_0x1b23dc[_0x1db216(0x174)][0x0]);return{..._0xff1e6c,'children':_0x1b23dc['replies'][_0x1db216(0x1dc)](0x1)[_0x1db216(0x1b6)](_0x1d444e=>_0x597942(_0x1d444e,_0xff1e6c['id']))};}return null;}let _0x3a7176=class{constructor(_0x134048,_0x2549da,_0x38ca75,_0x3e6007){const _0x3bb81b=_0x122b3b;this[_0x3bb81b(0x1e3)]=_0x134048,this[_0x3bb81b(0x18a)]=_0x2549da,this[_0x3bb81b(0x1a4)]=_0x38ca75,this[_0x3bb81b(0x1d9)]=_0x3e6007;}async[_0x122b3b(0x1ef)](_0x26f332){const _0xa4e361=_0x122b3b;var _0x7b2361,_0x527f7f;const {parentId:_0x868d75,unitId:_0x302691,text:_0x58d2ff,threadId:_0x38ce47}=_0x26f332,_0x5970fd=(_0x527f7f=(_0x7b2361=_0x58d2ff[_0xa4e361(0x17e)])==null?void 0x0:_0x7b2361[_0xa4e361(0x19c)](_0x2e6542=>_0x2e6542['rangeType']===_0x42b4da['CustomRangeType'][_0xa4e361(0x1ed)])[_0xa4e361(0x1b6)](_0x423c5e=>_0x423c5e[_0xa4e361(0x1aa)]))!=null?_0x527f7f:[],_0x3f2a94=JSON['stringify'](_0x58d2ff),_0xc8a71f=(await this['_sessionService'][_0xa4e361(0x1f2)](_0x302691))[_0xa4e361(0x1db)]();if(_0x868d75){const _0x2b1a5e={'memberId':_0xc8a71f,'unitId':_0x302691,'content':_0x3f2a94,'mention':_0x5970fd,'threadId':_0x38ce47},_0x1ddee4=(await this[_0xa4e361(0x1e3)][_0xa4e361(0x1a9)](_0xa4e361(0x1a8)+_0x302691+_0xa4e361(0x1ca),{'body':_0x2b1a5e}))[_0xa4e361(0x1b2)][_0xa4e361(0x1be)];return{..._0x26f332,'id':_0x1ddee4[_0xa4e361(0x1ad)],'dT':_0x42b4da[_0xa4e361(0x1f0)](+_0x1ddee4[_0xa4e361(0x1e1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1ddee4[_0xa4e361(0x1e0)]};}else{const _0x11730a={'memberId':_0xc8a71f,'unitId':_0x302691,'content':_0x3f2a94,'mention':_0x5970fd},_0x301ec6=await this['_httpService'][_0xa4e361(0x1a9)](_0xa4e361(0x1a8)+_0x302691+'/add',{'body':_0x11730a});return _0x2b078e(_0x301ec6[_0xa4e361(0x1b2)]['comment'],_0x26f332);}}async[_0x122b3b(0x181)](_0x538633){const _0x2581c9=_0x122b3b;var _0x1ad2fe,_0x4e9c10;const {text:_0x3b078f,unitId:_0x1d08c5}=_0x538633,_0x15083f=(_0x4e9c10=(_0x1ad2fe=_0x3b078f[_0x2581c9(0x17e)])==null?void 0x0:_0x1ad2fe[_0x2581c9(0x19c)](_0x56fb66=>_0x56fb66[_0x2581c9(0x1e5)]===_0x42b4da[_0x2581c9(0x1cc)]['COMMENT'])['map'](_0x364b10=>_0x364b10[_0x2581c9(0x1aa)]))!=null?_0x4e9c10:[],_0x304e6b=JSON['stringify'](_0x3b078f),_0x1e1dbf=_0x538633[_0x2581c9(0x17d)],_0x527701=_0x538633['id'],_0x55d75f={'memberId':(await this['_sessionService'][_0x2581c9(0x1f2)](_0x1d08c5))[_0x2581c9(0x1db)](),'unitId':_0x1d08c5,'threadId':_0x1e1dbf,'mention':_0x15083f,'content':_0x304e6b,'replyId':_0x527701},_0x2106f7=await this['_httpService'][_0x2581c9(0x1a9)](_0x2581c9(0x1a8)+_0x1d08c5+'/edit',{'body':_0x55d75f});return!_0x2106f7['body']['error']||_0x2106f7[_0x2581c9(0x1b2)][_0x2581c9(0x1e4)][_0x2581c9(0x172)]===0x1;}async['resolveComment'](_0x322a8c){const _0x3816da=_0x122b3b,{unitId:_0x4d191f}=_0x322a8c,_0x57a606=_0x322a8c[_0x3816da(0x17d)],_0x42197d={'memberId':this[_0x3816da(0x18a)][_0x3816da(0x1df)]()[_0x3816da(0x177)],'unitId':_0x4d191f,'threadId':_0x57a606,'solved':_0x322a8c[_0x3816da(0x1cd)]?_0x57db8b[_0x3816da(0x1ae)]:_0x57db8b[_0x3816da(0x182)]},_0x28235d=await this[_0x3816da(0x1e3)][_0x3816da(0x1a9)](_0x3816da(0x1a8)+_0x4d191f+'/solved',{'body':_0x42197d});return!_0x28235d[_0x3816da(0x1b2)]['error']||_0x28235d[_0x3816da(0x1b2)][_0x3816da(0x1e4)][_0x3816da(0x172)]===0x1;}async[_0x122b3b(0x1ce)](_0x301bd6,_0x534bfe,_0x4af9b3,_0x3f1edc){const _0xacc608=_0x122b3b,_0x4b5031={'memberId':(await this[_0xacc608(0x1a4)][_0xacc608(0x1f2)](_0x301bd6))[_0xacc608(0x1db)](),'threadId':_0x4af9b3,'replyId':_0x3f1edc,'unitId':_0x301bd6},_0x5bf123=await this[_0xacc608(0x1e3)][_0xacc608(0x1a9)](_0xacc608(0x1a8)+_0x301bd6+_0xacc608(0x1d1),{'body':_0x4b5031});return!_0x5bf123[_0xacc608(0x1b2)][_0xacc608(0x1e4)]||_0x5bf123[_0xacc608(0x1b2)]['error']['code']===0x1;}async['listComments'](_0x272624,_0x59846e,_0x421c0c){const _0x589349=_0x122b3b,_0x47c1d1={'unitId':_0x272624,'threadId':_0x421c0c},_0x4f2ea1=await this[_0x589349(0x1e3)]['post'](_0x589349(0x1a8)+_0x272624+_0x589349(0x1ab),{'body':_0x47c1d1}),_0x54f01d=_0x421c0c[_0x589349(0x1b6)](_0x4844cf=>_0x4cf10f(_0x4f2ea1[_0x589349(0x1b2)]['comments'][_0x4844cf],_0x272624,_0x59846e))[_0x589349(0x19c)](Boolean);return Object[_0x589349(0x1bc)](_0x4f2ea1[_0x589349(0x1b2)][_0x589349(0x188)])[_0x589349(0x1b0)](_0x277732=>{const _0x48d72e=_0x589349;this[_0x48d72e(0x18a)][_0x48d72e(0x1d4)](_0x277732);}),_0x54f01d;}[_0x122b3b(0x197)](_0x2ba70d){const _0x4120d9=_0x122b3b;return{'id':_0x2ba70d['id'],'threadId':_0x2ba70d['threadId'],'ref':_0x2ba70d[_0x4120d9(0x1f3)]};}};_0x3a7176=_0x22df30([_0x10ea5c(0x0,_0x42b4da[_0x122b3b(0x1b5)](_0x2bc6d0[_0x122b3b(0x1c2)])),_0x10ea5c(0x1,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1a3)])),_0x10ea5c(0x2,_0x42b4da[_0x122b3b(0x1b5)](_0x2a4d49['CollaborationSessionService'])),_0x10ea5c(0x3,_0x42b4da['Inject'](_0x42b4da[_0x122b3b(0x1f1)]))],_0x3a7176);var _0x337f26=Object[_0x122b3b(0x183)],_0x11098e=(_0x483488,_0xcfa3ee,_0x5002b7,_0x5a5396)=>{for(var _0xb90790=_0x5a5396>0x1?void 0x0:_0x5a5396?_0x337f26(_0xcfa3ee,_0x5002b7):_0xcfa3ee,_0x21437e=_0x483488['length']-0x1,_0xe7d30d;_0x21437e>=0x0;_0x21437e--)(_0xe7d30d=_0x483488[_0x21437e])&&(_0xb90790=_0xe7d30d(_0xb90790)||_0xb90790);return _0xb90790;},_0x110b96=(_0x36198d,_0x3dda8a)=>(_0x1c02cd,_0x28d07e)=>_0x3dda8a(_0x1c02cd,_0x28d07e,_0x36198d);let _0x1de9d9=class extends _0x42b4da[_0x122b3b(0x1a7)]{constructor(_0x3c68a6,_0x5f5b81){const _0x2011e0=_0x122b3b;super(),this['_threadCommentDataSourceService']=_0x3c68a6,this[_0x2011e0(0x19e)]=_0x5f5b81,this['_initDataSource']();}[_0x122b3b(0x17c)](){const _0x44e0ca=_0x122b3b;this[_0x44e0ca(0x1a1)][_0x44e0ca(0x189)]=this[_0x44e0ca(0x19e)],this[_0x44e0ca(0x1a1)][_0x44e0ca(0x1c8)]=!0x1;}};_0x1de9d9=_0x11098e([_0x110b96(0x0,_0x2f850a[_0x122b3b(0x1c5)]),_0x110b96(0x1,_0x42b4da[_0x122b3b(0x1b5)](_0x3a7176))],_0x1de9d9);var _0x3731c1=Object[_0x122b3b(0x1dd)],_0x2e46be=Object[_0x122b3b(0x183)],_0x2319a4=(_0x31b083,_0x36db80,_0x361987)=>_0x36db80 in _0x31b083?_0x3731c1(_0x31b083,_0x36db80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x361987}):_0x31b083[_0x36db80]=_0x361987,_0x34b03a=(_0x2816af,_0x5e717a,_0x26f231,_0x45867c)=>{const _0x57ad69=_0x122b3b;for(var _0x20f0bd=_0x45867c>0x1?void 0x0:_0x45867c?_0x2e46be(_0x5e717a,_0x26f231):_0x5e717a,_0x22f5fa=_0x2816af[_0x57ad69(0x1d8)]-0x1,_0x1fe57b;_0x22f5fa>=0x0;_0x22f5fa--)(_0x1fe57b=_0x2816af[_0x22f5fa])&&(_0x20f0bd=_0x1fe57b(_0x20f0bd)||_0x20f0bd);return _0x20f0bd;},_0x496077=(_0x5875a3,_0x5c2eab)=>(_0x866b76,_0x38f397)=>_0x5c2eab(_0x866b76,_0x38f397,_0x5875a3),_0x5ceb2f=(_0x4dd71c,_0x2acd9f,_0x69cfcc)=>_0x2319a4(_0x4dd71c,typeof _0x2acd9f!=_0x122b3b(0x185)?_0x2acd9f+'':_0x2acd9f,_0x69cfcc);_0x5742a6[_0x122b3b(0x19b)]=class extends _0x42b4da[_0x122b3b(0x195)]{constructor(_0x6ebdd7=_0x9982d4,_0x31fa37,_0x475da8){const _0x2ac580=_0x122b3b;super(),this[_0x2ac580(0x190)]=_0x6ebdd7,this['_injector']=_0x31fa37,this[_0x2ac580(0x171)]=_0x475da8;const {..._0x3defac}=_0x42b4da['merge']({},_0x9982d4,this['_config']);this[_0x2ac580(0x171)][_0x2ac580(0x18e)](_0x5ec5d5,_0x3defac);}[_0x122b3b(0x192)](){const _0x37a8c6=_0x122b3b;[[_0x3a7176],[_0x1de9d9],[_0xdbacdc]][_0x37a8c6(0x1b0)](_0x16e48b=>{const _0x34da19=_0x37a8c6;this[_0x34da19(0x1d9)][_0x34da19(0x179)](_0x16e48b);});}[_0x122b3b(0x1c7)](){const _0x40f144=_0x122b3b;this[_0x40f144(0x1d9)]['get'](_0x1de9d9),this['_injector'][_0x40f144(0x1d0)](_0xdbacdc);}},_0x5ceb2f(_0x5742a6[_0x122b3b(0x19b)],_0x122b3b(0x1b4),_0xafa4fc),_0x5ceb2f(_0x5742a6[_0x122b3b(0x19b)],'type',_0x42b4da[_0x122b3b(0x1ea)]['UNIVER_UNKNOWN']),_0x5742a6[_0x122b3b(0x19b)]=_0x34b03a([_0x42b4da['DependentOn'](_0x22a6ec[_0x122b3b(0x1cf)],_0x2a4d49['UniverCollaborationClientPlugin'],_0x46234c[_0x122b3b(0x1a6)]),_0x496077(0x1,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1f1)])),_0x496077(0x2,_0x42b4da[_0x122b3b(0x19f)])],_0x5742a6['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x5742a6,Symbol[_0x122b3b(0x199)],{'value':_0x122b3b(0x1b8)});}));function _0x1bc3(_0x5e24ec,_0x2e8aef){const _0x399028=_0x3990();return _0x1bc3=function(_0x1bc330,_0x4c463e){_0x1bc330=_0x1bc330-0x16f;let _0x4fd966=_0x399028[_0x1bc330];return _0x4fd966;},_0x1bc3(_0x5e24ec,_0x2e8aef);}function _0x3990(){const _0x446cd8=['body','9AmELoI','pluginName','Inject','map','content','Module','_init','personId','size','values','Solve','reply','@univerjs-pro/license','UniverCore','_threadCommentModel','HTTPService','subscribe','find','IThreadCommentDataSourceService','1117557HOsraH','onReady','syncUpdateMutationToColla','pipe','/reply','UniverThreadComment','CustomRangeType','resolved','deleteComment','UniverThreadCommentUIPlugin','get','/delete','Edit','parse','addUser','@univerjs-pro/collaboration-client','@univerjs/thread-comment-ui','user','length','_injector','_commentService','getMemberID','slice','defineProperty','@univerjs/network','getCurrentUser','userId','createTimestamp','unitId','_httpService','error','rangeType','1734368pyhdlf','payload','877011WOVKAf','getComment','UniverInstanceType','getUnit','UNRECOGNIZED','COMMENT','_initUserSync','addComment','dayjs','Injector','requireSession','ref','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','Reply','_configService','code','format','replies','1978420dSykST','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userID','solved','add','Add','ThreadCommentModel','_initDataSource','threadId','customRanges','bufferTime','Unknown','updateComment','OpenOrReOpen','getOwnPropertyDescriptor','object','symbol','parentId','root','users','dataSource','_userService','Delete','11uJEaQW','CommentService','setConfig','commentUpdate$','_config','resolveComment','onStarting','6524104vHIAWj','rxjs','Plugin','function','saveCommentToSnapshot','getUser','toStringTag','9968edBpkS','UniverThreadCommentDataSourcePlugin','filter','type','_threadCommentDataSource','IConfigService','UniverProCollaborationClient','_threadCommentDataSourceService','2286030GHIuDh','UserManagerService','_sessionService','delete','UniverLicensePlugin','Disposable','/universer-api/comment/unit/','post','rangeId','/list','UniverThreadCommentUi','replyId','Solved','disposeWithMe','forEach','amd'];_0x3990=function(){return _0x446cd8;};return _0x3990();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.2-nightly.202507151607",
3
+ "version": "0.9.2-nightly.202507171607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,18 +45,18 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507151607",
49
- "@univerjs-pro/license": "0.9.2-nightly.202507151607",
50
- "@univerjs/network": "0.9.2-nightly.202507151607",
51
- "@univerjs/core": "0.9.2-nightly.202507151607",
48
+ "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507171607",
49
+ "@univerjs-pro/license": "0.9.2-nightly.202507171607",
50
+ "@univerjs/core": "0.9.2-nightly.202507171607",
52
51
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment": "0.9.2-nightly.202507151607",
54
- "@univerjs/thread-comment-ui": "0.9.2-nightly.202507151607"
52
+ "@univerjs/thread-comment": "0.9.2-nightly.202507171607",
53
+ "@univerjs/network": "0.9.2-nightly.202507171607",
54
+ "@univerjs/thread-comment-ui": "0.9.2-nightly.202507171607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^6.3.5",
59
+ "vite": "^7.0.5",
60
60
  "vitest": "^3.2.4",
61
61
  "@univerjs-infra/shared": "0.9.2"
62
62
  },