@univerjs-pro/thread-comment-datasource 0.15.4 → 0.15.5-insiders.20260212-022614a

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 _0x86ef70=_0x65fb;(function(_0x3905fb,_0x439422){const _0x39018e=_0x65fb,_0x3978a2=_0x3905fb();while(!![]){try{const _0x51368c=-parseInt(_0x39018e(0x119))/0x1+-parseInt(_0x39018e(0xd3))/0x2+-parseInt(_0x39018e(0xdd))/0x3+-parseInt(_0x39018e(0x10b))/0x4+parseInt(_0x39018e(0xc0))/0x5+-parseInt(_0x39018e(0x11f))/0x6+-parseInt(_0x39018e(0xf1))/0x7*(-parseInt(_0x39018e(0xca))/0x8);if(_0x51368c===_0x439422)break;else _0x3978a2['push'](_0x3978a2['shift']());}catch(_0x14c054){_0x3978a2['push'](_0x3978a2['shift']());}}}(_0x455f,0x586d7));Object[_0x86ef70(0xbe)](exports,Symbol[_0x86ef70(0xc9)],{'value':_0x86ef70(0xe8)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x86ef70(0x10a);var I=(_0x1817b4=>(_0x1817b4[_0x1817b4[_0x86ef70(0x118)]=0x0]=_0x86ef70(0x118),_0x1817b4[_0x1817b4[_0x86ef70(0x108)]=0x1]='Solved',_0x1817b4[_0x1817b4[_0x86ef70(0xb9)]=-0x1]=_0x86ef70(0xb9),_0x1817b4))(I||{}),v=(_0xd570a6=>(_0xd570a6[_0xd570a6[_0x86ef70(0x120)]=0x0]=_0x86ef70(0x120),_0xd570a6[_0xd570a6[_0x86ef70(0x116)]=0x1]=_0x86ef70(0x116),_0xd570a6[_0xd570a6['Reply']=0x2]=_0x86ef70(0x10f),_0xd570a6[_0xd570a6[_0x86ef70(0xeb)]=0x3]=_0x86ef70(0xeb),_0xd570a6[_0xd570a6['Delete']=0x4]=_0x86ef70(0x112),_0xd570a6[_0xd570a6['Solve']=0x5]=_0x86ef70(0xb3),_0xd570a6[_0xd570a6['UNRECOGNIZED']=-0x1]=_0x86ef70(0xb9),_0xd570a6))(v||{});const f=_0x444ae2=>c['dayjs'](new Date(+_0x444ae2))[_0x86ef70(0x121)](_0x86ef70(0xf4)),R=async(_0x398f1d,_0x53edca)=>{const _0x4d2e9e=_0x86ef70,_0x545317=_0x398f1d[_0x4d2e9e(0xbf)](c[_0x4d2e9e(0xf8)]),_0x35e181=_0x398f1d['get'](P[_0x4d2e9e(0xce)]);_0x53edca[_0x4d2e9e(0x11b)](_0x12f021=>{const _0x50d1da=_0x4d2e9e;_0x545317[_0x50d1da(0xef)](_0x12f021)&&_0x53edca[_0x50d1da(0xae)](_0x12f021);}),_0x53edca[_0x4d2e9e(0xea)]&&(await _0x35e181[_0x4d2e9e(0xbf)](_0x4d2e9e(0xbb),{'params':{'userIDs':[..._0x53edca]}}))[_0x4d2e9e(0xf9)][_0x4d2e9e(0xbc)][_0x4d2e9e(0x11b)](_0x4696ff=>{const _0x5b0ba6=_0x4d2e9e;_0x4696ff&&_0x545317[_0x5b0ba6(0xfc)](_0x4696ff);});};var $=Object[_0x86ef70(0xc7)],E=(_0x1d4e9c,_0x42d4aa,_0x12427f,_0x541cff)=>{for(var _0x5dc1d1=_0x541cff>0x1?void 0x0:_0x541cff?$(_0x42d4aa,_0x12427f):_0x42d4aa,_0x44ef44=_0x1d4e9c['length']-0x1,_0x3ba037;_0x44ef44>=0x0;_0x44ef44--)(_0x3ba037=_0x1d4e9c[_0x44ef44])&&(_0x5dc1d1=_0x3ba037(_0x5dc1d1)||_0x5dc1d1);return _0x5dc1d1;},S=(_0x108248,_0x1b475c)=>(_0x1ebca1,_0x41b84d)=>_0x1b475c(_0x1ebca1,_0x41b84d,_0x108248);let _=class extends c[_0x86ef70(0xe9)]{constructor(_0xa74936,_0x3bb7a5,_0x1d38e3,_0x18cdf2){const _0x244f17=_0x86ef70;super(),this['_commentService']=_0xa74936,this[_0x244f17(0x100)]=_0x3bb7a5,this['_userService']=_0x1d38e3,this[_0x244f17(0x115)]=_0x18cdf2,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x183363=_0x86ef70;this[_0x183363(0xd0)](this[_0x183363(0x100)][_0x183363(0xd2)][_0x183363(0xd5)](j[_0x183363(0xd8)](0x10))['subscribe'](_0x8b4855=>{const _0x439a4f=_0x183363,_0x77d74c=new Set();_0x8b4855[_0x439a4f(0x11b)](_0x167d92=>{const _0x347b01=_0x439a4f;if(_0x167d92[_0x347b01(0xd6)]==='add'){const _0x3872fa=_0x167d92[_0x347b01(0xe5)][_0x347b01(0xb4)];_0x77d74c[_0x347b01(0xaf)](_0x3872fa);}}),R(this[_0x439a4f(0x115)],_0x77d74c);}));}['_init'](){const _0x96697a=_0x86ef70;this[_0x96697a(0xd0)](this[_0x96697a(0xe4)][_0x96697a(0xd2)][_0x96697a(0xba)](async _0x560eef=>{const _0x267f13=_0x96697a;var _0x428f7b,_0x1f1c7b,_0x463afc,_0x200ad8;const _0x1cb240=(_0x428f7b=this['_threadCommentModel'][_0x267f13(0xb8)](_0x560eef[_0x267f13(0x102)])['find'](_0x25d3fe=>_0x25d3fe['threadId']===_0x560eef[_0x267f13(0xb2)]))==null?void 0x0:_0x428f7b['root'];if(!_0x1cb240)return;const {unitId:_0x4ee5e5,subUnitId:_0x152627}=_0x1cb240;switch(_0x560eef['user']&&this[_0x267f13(0x103)][_0x267f13(0xfc)](_0x560eef['user']),_0x560eef[_0x267f13(0xd6)]){case v[_0x267f13(0x116)]:break;case v['Reply']:{this[_0x267f13(0x100)][_0x267f13(0x11d)](_0x4ee5e5,_0x152627,{'unitId':_0x4ee5e5,'subUnitId':_0x152627,'ref':'','id':_0x560eef[_0x267f13(0xda)],'dT':f(+_0x560eef['createTimestamp']),'threadId':_0x560eef[_0x267f13(0xb2)],'personId':(_0x463afc=(_0x1f1c7b=_0x560eef['user'])==null?void 0x0:_0x1f1c7b[_0x267f13(0xd4)])!=null?_0x463afc:_0x560eef[_0x267f13(0xfa)],'text':JSON[_0x267f13(0xec)](_0x560eef[_0x267f13(0x111)]),'parentId':_0x1cb240['id']});break;}case v['Delete']:{const _0x3145f2=this[_0x267f13(0x100)]['getComment'](_0x4ee5e5,_0x152627,_0x560eef[_0x267f13(0xda)]);_0x3145f2&&_0x3145f2['parentId']&&this[_0x267f13(0x100)][_0x267f13(0xb7)](_0x4ee5e5,_0x152627,_0x560eef[_0x267f13(0xda)]);break;}case v[_0x267f13(0xeb)]:{this['_threadCommentModel']['updateComment'](_0x4ee5e5,_0x152627,{'commentId':_0x560eef[_0x267f13(0xda)],'text':JSON[_0x267f13(0xec)](_0x560eef['content'])});break;}case v[_0x267f13(0xb3)]:{const _0x39441e=(_0x200ad8=this[_0x267f13(0x100)]['getUnit'](_0x560eef[_0x267f13(0x102)])['find'](_0x1038ed=>_0x1038ed[_0x267f13(0xb2)]===_0x560eef[_0x267f13(0xb2)]))==null?void 0x0:_0x200ad8['root'];_0x39441e&&this['_threadCommentModel'][_0x267f13(0xcb)](_0x4ee5e5,_0x152627,_0x39441e['id'],_0x560eef[_0x267f13(0xf0)]===I[_0x267f13(0x108)]);break;}}}));}};function _0x65fb(_0x129ffe,_0x1f87f3){_0x129ffe=_0x129ffe-0xae;const _0x455f55=_0x455f();let _0x65fb1e=_0x455f55[_0x129ffe];return _0x65fb1e;}_=E([S(0x0,c[_0x86ef70(0xd7)](b[_0x86ef70(0xfe)])),S(0x1,c[_0x86ef70(0xd7)](M[_0x86ef70(0x114)])),S(0x2,c['Inject'](c[_0x86ef70(0xf8)])),S(0x3,c[_0x86ef70(0xd7)](c[_0x86ef70(0x106)]))],_);const q=_0x86ef70(0xc3),D={};var A=Object[_0x86ef70(0xc7)],x=(_0x5727d1,_0x574f0c,_0x2c4b9a,_0x2ea457)=>{for(var _0x164589=_0x2ea457>0x1?void 0x0:_0x2ea457?A(_0x574f0c,_0x2c4b9a):_0x574f0c,_0x3f1ae9=_0x5727d1['length']-0x1,_0x39a167;_0x3f1ae9>=0x0;_0x3f1ae9--)(_0x39a167=_0x5727d1[_0x3f1ae9])&&(_0x164589=_0x39a167(_0x164589)||_0x164589);return _0x164589;},C=(_0x18ed48,_0x3a887c)=>(_0x1a66c8,_0x58a3ca)=>_0x3a887c(_0x1a66c8,_0x58a3ca,_0x18ed48);function Y(_0xde8fac,_0x47442c){const _0xf6a0c9=_0x86ef70,_0x5b6978=_0xde8fac[_0xf6a0c9(0xbd)][0x0];return{..._0x47442c,'id':_0x5b6978[_0xf6a0c9(0xda)],'resolved':_0xde8fac[_0xf6a0c9(0xf0)]===0x1,'dT':f(_0x5b6978[_0xf6a0c9(0xe1)]),'personId':_0x5b6978['userId'],'threadId':_0x5b6978[_0xf6a0c9(0xb2)]};}function G(_0x5b8a1e,_0xc87bd,_0x51000c){const _0x5bd504=_0x86ef70;var _0x18d9e1,_0x1154d1;if(((_0x1154d1=(_0x18d9e1=_0x5b8a1e==null?void 0x0:_0x5b8a1e[_0x5bd504(0xbd)])==null?void 0x0:_0x18d9e1[_0x5bd504(0xf2)])!=null?_0x1154d1:0x0)>0x0){const _0x565acf=(_0x59199b,_0x5f0c84)=>({'id':_0x59199b[_0x5bd504(0xda)],'threadId':_0x59199b[_0x5bd504(0xb2)],'dT':f(_0x59199b[_0x5bd504(0xe1)]),'personId':_0x59199b[_0x5bd504(0xfa)],'resolved':_0x5b8a1e['solved']===I[_0x5bd504(0x108)],'unitId':_0xc87bd,'subUnitId':_0x51000c,'text':JSON[_0x5bd504(0xec)](_0x59199b[_0x5bd504(0x111)]),'parentId':_0x5f0c84}),_0x41ac8b=_0x565acf(_0x5b8a1e['replies'][0x0]);return{..._0x41ac8b,'children':_0x5b8a1e[_0x5bd504(0xbd)][_0x5bd504(0xcc)](0x1)[_0x5bd504(0x10e)](_0x565d53=>_0x565acf(_0x565d53,_0x41ac8b['id']))};}return null;}let p=class{constructor(_0x459f36,_0x6bf34d,_0x4f2b8a){const _0x17946c=_0x86ef70;this[_0x17946c(0xcd)]=_0x459f36,this[_0x17946c(0x103)]=_0x6bf34d,this['_sessionService']=_0x4f2b8a;}async[_0x86ef70(0x11d)](_0x2ee39e){const _0x4281c1=_0x86ef70;var _0x539f51,_0x743c0e;const {parentId:_0x14b35c,unitId:_0x22e3df,text:_0x1c8c20,threadId:_0x3fc4d1}=_0x2ee39e,_0x5da9c9=(_0x743c0e=(_0x539f51=_0x1c8c20[_0x4281c1(0xe3)])==null?void 0x0:_0x539f51[_0x4281c1(0xf3)](_0x5b5fc7=>_0x5b5fc7['rangeType']===c[_0x4281c1(0xe7)][_0x4281c1(0xfb)])[_0x4281c1(0x10e)](_0x15c3b2=>_0x15c3b2[_0x4281c1(0xfd)]))!=null?_0x743c0e:[],_0x237298=JSON[_0x4281c1(0x11a)](_0x1c8c20),_0x1fb6c7=(await this[_0x4281c1(0xe6)][_0x4281c1(0xf5)](_0x22e3df))[_0x4281c1(0xc2)]();if(_0x14b35c){const _0x88abe={'memberId':_0x1fb6c7,'unitId':_0x22e3df,'content':_0x237298,'mention':_0x5da9c9,'threadId':_0x3fc4d1},_0x67f0fb=(await this[_0x4281c1(0xcd)]['post'](_0x4281c1(0x107)+_0x22e3df+'/reply',{'body':_0x88abe}))[_0x4281c1(0xf9)]['reply'];return{..._0x2ee39e,'id':_0x67f0fb['replyId'],'dT':c['dayjs'](+_0x67f0fb[_0x4281c1(0xe1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x67f0fb[_0x4281c1(0xfa)]};}else{const _0x2656c5={'memberId':_0x1fb6c7,'unitId':_0x22e3df,'content':_0x237298,'mention':_0x5da9c9},_0x259978=await this[_0x4281c1(0xcd)][_0x4281c1(0x105)](_0x4281c1(0x107)+_0x22e3df+'/add',{'body':_0x2656c5});return Y(_0x259978[_0x4281c1(0xf9)]['comment'],_0x2ee39e);}}async[_0x86ef70(0x109)](_0x569fa1){const _0xb24dce=_0x86ef70;var _0x462c37,_0x31b1d0;const {text:_0x88020f,unitId:_0x4862d4}=_0x569fa1,_0x4d4daf=(_0x31b1d0=(_0x462c37=_0x88020f[_0xb24dce(0xe3)])==null?void 0x0:_0x462c37[_0xb24dce(0xf3)](_0x1b8586=>_0x1b8586[_0xb24dce(0xcf)]===c['CustomRangeType']['COMMENT'])['map'](_0x43298d=>_0x43298d[_0xb24dce(0xfd)]))!=null?_0x31b1d0:[],_0x53a1f5=JSON[_0xb24dce(0x11a)](_0x88020f),_0x192c63=_0x569fa1[_0xb24dce(0xb2)],_0x38c3b3=_0x569fa1['id'],_0x44057e={'memberId':(await this[_0xb24dce(0xe6)][_0xb24dce(0xf5)](_0x4862d4))[_0xb24dce(0xc2)](),'unitId':_0x4862d4,'threadId':_0x192c63,'mention':_0x4d4daf,'content':_0x53a1f5,'replyId':_0x38c3b3},_0x3d31eb=await this['_httpService'][_0xb24dce(0x105)](_0xb24dce(0x107)+_0x4862d4+_0xb24dce(0x113),{'body':_0x44057e});return!_0x3d31eb[_0xb24dce(0xf9)][_0xb24dce(0xdc)]||_0x3d31eb[_0xb24dce(0xf9)]['error'][_0xb24dce(0xdb)]===0x1;}async[_0x86ef70(0xcb)](_0x2bc0c6){const _0x104007=_0x86ef70,{unitId:_0x15b2f2}=_0x2bc0c6,_0x2bccfe=_0x2bc0c6[_0x104007(0xb2)],_0x466ad3={'memberId':this[_0x104007(0x103)][_0x104007(0xf7)]()[_0x104007(0xd4)],'unitId':_0x15b2f2,'threadId':_0x2bccfe,'solved':_0x2bc0c6[_0x104007(0xb0)]?I['Solved']:I[_0x104007(0x118)]},_0x4fc6ae=await this[_0x104007(0xcd)][_0x104007(0x105)](_0x104007(0x107)+_0x15b2f2+_0x104007(0x11e),{'body':_0x466ad3});return!_0x4fc6ae['body'][_0x104007(0xdc)]||_0x4fc6ae[_0x104007(0xf9)][_0x104007(0xdc)][_0x104007(0xdb)]===0x1;}async[_0x86ef70(0xb7)](_0xcad2a8,_0x39cafa,_0x219c36,_0x1c1f68){const _0xe48fb7=_0x86ef70,_0x3c0376={'memberId':(await this[_0xe48fb7(0xe6)][_0xe48fb7(0xf5)](_0xcad2a8))[_0xe48fb7(0xc2)](),'threadId':_0x219c36,'replyId':_0x1c1f68,'unitId':_0xcad2a8},_0x476bc5=await this['_httpService'][_0xe48fb7(0x105)]('/universer-api/comment/unit/'+_0xcad2a8+_0xe48fb7(0x104),{'body':_0x3c0376});return!_0x476bc5[_0xe48fb7(0xf9)][_0xe48fb7(0xdc)]||_0x476bc5['body'][_0xe48fb7(0xdc)][_0xe48fb7(0xdb)]===0x1;}async[_0x86ef70(0xc6)](_0x2c2ee7,_0x48c0af,_0x30d6ee){const _0x3c5133=_0x86ef70,_0x7638c5={'unitId':_0x2c2ee7,'threadId':_0x30d6ee},_0x51487b=await this['_httpService']['post'](_0x3c5133(0x107)+_0x2c2ee7+_0x3c5133(0xc5),{'body':_0x7638c5}),_0x1e31a4=_0x30d6ee[_0x3c5133(0x10e)](_0x4bf754=>G(_0x51487b[_0x3c5133(0xf9)][_0x3c5133(0xee)][_0x4bf754],_0x2c2ee7,_0x48c0af))[_0x3c5133(0xf3)](Boolean);return Object[_0x3c5133(0xdf)](_0x51487b['body']['users'])[_0x3c5133(0x11b)](_0x390e06=>{const _0x5c9bc9=_0x3c5133;this[_0x5c9bc9(0x103)][_0x5c9bc9(0xfc)](_0x390e06);}),_0x1e31a4;}[_0x86ef70(0xc8)](_0x1f41e5){const _0x41e2f7=_0x86ef70;return{'id':_0x1f41e5['id'],'threadId':_0x1f41e5['threadId'],'ref':_0x1f41e5[_0x41e2f7(0xd9)]};}};p=x([C(0x0,c[_0x86ef70(0xd7)](P['HTTPService'])),C(0x1,c[_0x86ef70(0xd7)](c[_0x86ef70(0xf8)])),C(0x2,c[_0x86ef70(0xd7)](b['CollaborationSessionService']))],p);var H=Object[_0x86ef70(0xc7)],J=(_0x932c2e,_0x241f0c,_0x406111,_0x352f4f)=>{const _0x3b8691=_0x86ef70;for(var _0x26a0ff=_0x352f4f>0x1?void 0x0:_0x352f4f?H(_0x241f0c,_0x406111):_0x241f0c,_0x488340=_0x932c2e[_0x3b8691(0xf2)]-0x1,_0x5b95a4;_0x488340>=0x0;_0x488340--)(_0x5b95a4=_0x932c2e[_0x488340])&&(_0x26a0ff=_0x5b95a4(_0x26a0ff)||_0x26a0ff);return _0x26a0ff;},y=(_0x4a3f95,_0x5f318f)=>(_0x1f9a84,_0x541cd3)=>_0x5f318f(_0x1f9a84,_0x541cd3,_0x4a3f95);let g=class extends c[_0x86ef70(0xe9)]{constructor(_0x2b6acf,_0x12d34e){const _0x381f5d=_0x86ef70;super(),this[_0x381f5d(0xb5)]=_0x2b6acf,this[_0x381f5d(0x117)]=_0x12d34e,this[_0x381f5d(0xff)]();}[_0x86ef70(0xff)](){const _0x3e62fa=_0x86ef70;this[_0x3e62fa(0xb5)][_0x3e62fa(0xd1)]=this[_0x3e62fa(0x117)],this[_0x3e62fa(0xb5)][_0x3e62fa(0xb6)]=!0x1;}};g=J([y(0x0,M[_0x86ef70(0x110)]),y(0x1,c[_0x86ef70(0xd7)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x243156,_0x588ea3,_0x36407d)=>_0x588ea3 in _0x243156?F(_0x243156,_0x588ea3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x36407d}):_0x243156[_0x588ea3]=_0x36407d,W=(_0xb9cb74,_0x516f63,_0x53b549,_0x3b686d)=>{for(var _0x511e1d=_0x3b686d>0x1?void 0x0:_0x3b686d?L(_0x516f63,_0x53b549):_0x516f63,_0x5abe83=_0xb9cb74['length']-0x1,_0xf9a2b5;_0x5abe83>=0x0;_0x5abe83--)(_0xf9a2b5=_0xb9cb74[_0x5abe83])&&(_0x511e1d=_0xf9a2b5(_0x511e1d)||_0x511e1d);return _0x511e1d;},O=(_0x5b2e99,_0x4339d9)=>(_0x45e1cb,_0xf750ca)=>_0x4339d9(_0x45e1cb,_0xf750ca,_0x5b2e99),N=(_0x388905,_0x33039a,_0x390f22)=>Z(_0x388905,typeof _0x33039a!='symbol'?_0x33039a+'':_0x33039a,_0x390f22);exports[_0x86ef70(0xc1)]=class extends c[_0x86ef70(0xc4)]{constructor(_0x34ae3f=D,_0x1b7b0f,_0x32900b){const _0x2f996a=_0x86ef70;super(),this[_0x2f996a(0xb1)]=_0x34ae3f,this['_injector']=_0x1b7b0f,this[_0x2f996a(0x101)]=_0x32900b;const {..._0x51868b}=c[_0x2f996a(0xe0)]({},D,this[_0x2f996a(0xb1)]);this[_0x2f996a(0x101)]['setConfig'](q,_0x51868b);}[_0x86ef70(0xf6)](){const _0x17a99b=_0x86ef70;[[p],[g],[_]][_0x17a99b(0x11b)](_0x453229=>{const _0x28dbcd=_0x17a99b;this[_0x28dbcd(0x115)]['add'](_0x453229);});}[_0x86ef70(0xed)](){const _0xde4553=_0x86ef70;this[_0xde4553(0x115)]['get'](g),this[_0xde4553(0x115)][_0xde4553(0xbf)](_);}},N(exports[_0x86ef70(0xc1)],_0x86ef70(0xde),U),N(exports[_0x86ef70(0xc1)],'type',c[_0x86ef70(0xe2)]['UNIVER_UNKNOWN']),exports[_0x86ef70(0xc1)]=W([c[_0x86ef70(0x10c)](w['UniverThreadCommentUIPlugin'],b[_0x86ef70(0x11c)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x86ef70(0x106)])),O(0x2,c[_0x86ef70(0x10d)])],exports[_0x86ef70(0xc1)]);function _0x455f(){const _0xc97ecf=['Add','_threadCommentDataSource','OpenOrReOpen','132778rIYOkP','stringify','forEach','UniverCollaborationClientPlugin','addComment','/solved','2294214dsbKVn','Unknown','format','delete','add','resolved','_config','threadId','Solve','personId','_threadCommentDataSourceService','syncUpdateMutationToColla','deleteComment','getUnit','UNRECOGNIZED','subscribe','/universer-api/user/list','users','replies','defineProperty','get','3549370jOpzsu','UniverThreadCommentDataSourcePlugin','getMemberID','thread-comment-data-source.config','Plugin','/list','listComments','getOwnPropertyDescriptor','saveCommentToSnapshot','toStringTag','89344FUdkiG','resolveComment','slice','_httpService','HTTPService','rangeType','disposeWithMe','dataSource','commentUpdate$','744024qfbDJN','userID','pipe','type','Inject','bufferTime','ref','replyId','code','error','181755oYRQcR','pluginName','values','merge','createTimestamp','UniverInstanceType','customRanges','_commentService','payload','_sessionService','CustomRangeType','Module','Disposable','size','Edit','parse','onReady','comments','getUser','solved','392JbiXco','length','filter','YYYY/MM/DD\x20HH:mm','requireSession','onStarting','getCurrentUser','UserManagerService','body','userId','COMMENT','addUser','rangeId','CommentService','_initDataSource','_threadCommentModel','_configService','unitId','_userService','/delete','post','Injector','/universer-api/comment/unit/','Solved','updateComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','101356YsWaQe','DependentOn','IConfigService','map','Reply','IThreadCommentDataSourceService','content','Delete','/edit','ThreadCommentModel','_injector'];_0x455f=function(){return _0xc97ecf;};return _0x455f();}
1
+ 'use strict';const _0x320c2a=_0x31d9;(function(_0x2629f0,_0x85430b){const _0x12dff4=_0x31d9,_0x4a9ae3=_0x2629f0();while(!![]){try{const _0x4d5d07=parseInt(_0x12dff4(0xd0))/0x1+parseInt(_0x12dff4(0xe5))/0x2+-parseInt(_0x12dff4(0xad))/0x3+-parseInt(_0x12dff4(0xf4))/0x4*(parseInt(_0x12dff4(0xbf))/0x5)+-parseInt(_0x12dff4(0xc8))/0x6*(-parseInt(_0x12dff4(0xb6))/0x7)+parseInt(_0x12dff4(0xc3))/0x8*(parseInt(_0x12dff4(0xc7))/0x9)+parseInt(_0x12dff4(0xed))/0xa*(-parseInt(_0x12dff4(0xcb))/0xb);if(_0x4d5d07===_0x85430b)break;else _0x4a9ae3['push'](_0x4a9ae3['shift']());}catch(_0x406175){_0x4a9ae3['push'](_0x4a9ae3['shift']());}}}(_0x11b3,0xc6831));Object[_0x320c2a(0xaa)](exports,Symbol[_0x320c2a(0x86)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x320c2a(0xe3);function _0x31d9(_0x2425d3,_0x389a72){_0x2425d3=_0x2425d3-0x7e;const _0x11b301=_0x11b3();let _0x31d927=_0x11b301[_0x2425d3];return _0x31d927;}var I=(_0x7967ad=>(_0x7967ad[_0x7967ad['OpenOrReOpen']=0x0]=_0x320c2a(0x9d),_0x7967ad[_0x7967ad[_0x320c2a(0xcf)]=0x1]='Solved',_0x7967ad[_0x7967ad[_0x320c2a(0xb5)]=-0x1]=_0x320c2a(0xb5),_0x7967ad))(I||{}),v=(_0x5e7a1f=>(_0x5e7a1f[_0x5e7a1f['Unknown']=0x0]=_0x320c2a(0x93),_0x5e7a1f[_0x5e7a1f[_0x320c2a(0xa3)]=0x1]=_0x320c2a(0xa3),_0x5e7a1f[_0x5e7a1f['Reply']=0x2]=_0x320c2a(0xab),_0x5e7a1f[_0x5e7a1f[_0x320c2a(0x8f)]=0x3]=_0x320c2a(0x8f),_0x5e7a1f[_0x5e7a1f[_0x320c2a(0xca)]=0x4]=_0x320c2a(0xca),_0x5e7a1f[_0x5e7a1f['Solve']=0x5]=_0x320c2a(0x80),_0x5e7a1f[_0x5e7a1f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5e7a1f))(v||{});function _0x11b3(){const _0x236f75=['getOwnPropertyDescriptor','ThreadCommentModel','defineProperty','Reply','UniverThreadCommentUIPlugin','3399471gYZumf','users','_initDataSource','_commentService','userID','forEach','rangeId','subscribe','UNRECOGNIZED','3602557dRCbdF','/universer-api/comment/unit/','body','merge','CollaborationSessionService','/add','Plugin','getMemberID','commentUpdate$','10pQaLZY','content','get','rangeType','28432lPVfvI','UNIVER_UNKNOWN','/delete','YYYY/MM/DD\x20HH:mm','2727cyMOPQ','6QOrcuo','map','Delete','6589mhSnyW','unitId','solved','CustomRangeType','Solved','534503SZqUwn','Inject','addComment','COMMENT','_threadCommentDataSource','format','stringify','reply','setConfig','replyId','getUnit','_sessionService','requireSession','UniverThreadCommentDataSourcePlugin','disposeWithMe','userId','size','pipe','_configService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','DependentOn','2216396rcjYGT','threadId','dataSource','CommentService','resolveComment','/solved','_userService','_threadCommentModel','6220uZxVyN','parse','deleteComment','post','createTimestamp','_injector','addUser','1830748gLthiK','listComments','_httpService','Solve','pluginName','IThreadCommentDataSourceService','Injector','find','_config','toStringTag','UniverLicensePlugin','delete','UniverInstanceType','values','/universer-api/user/list','filter','comment','length','Edit','slice','code','replies','Unknown','dayjs','/list','saveCommentToSnapshot','_threadCommentDataSourceService','error','thread-comment-data-source.config','user','getCurrentUser','add','OpenOrReOpen','type','updateComment','IConfigService','HTTPService','_initUserSync','Add','UserManagerService','_init','root','Disposable'];_0x11b3=function(){return _0x236f75;};return _0x11b3();}const f=_0x24130a=>c[_0x320c2a(0x94)](new Date(+_0x24130a))['format'](_0x320c2a(0xc6)),R=async(_0x351644,_0x5035e7)=>{const _0x197dfb=_0x320c2a,_0x189a33=_0x351644[_0x197dfb(0xc1)](c[_0x197dfb(0xa4)]),_0x349aac=_0x351644[_0x197dfb(0xc1)](P[_0x197dfb(0xa1)]);_0x5035e7['forEach'](_0x192ee6=>{const _0x65c1e3=_0x197dfb;_0x189a33['getUser'](_0x192ee6)&&_0x5035e7[_0x65c1e3(0x88)](_0x192ee6);}),_0x5035e7[_0x197dfb(0xe0)]&&(await _0x349aac[_0x197dfb(0xc1)](_0x197dfb(0x8b),{'params':{'userIDs':[..._0x5035e7]}}))[_0x197dfb(0xb8)]['users'][_0x197dfb(0xb2)](_0x4d7d38=>{const _0xe4d005=_0x197dfb;_0x4d7d38&&_0x189a33[_0xe4d005(0xf3)](_0x4d7d38);});};var $=Object[_0x320c2a(0xa8)],E=(_0x157a80,_0x343bce,_0x52a479,_0x1c6f80)=>{for(var _0x2c58cd=_0x1c6f80>0x1?void 0x0:_0x1c6f80?$(_0x343bce,_0x52a479):_0x343bce,_0x349751=_0x157a80['length']-0x1,_0x2d2d2b;_0x349751>=0x0;_0x349751--)(_0x2d2d2b=_0x157a80[_0x349751])&&(_0x2c58cd=_0x2d2d2b(_0x2c58cd)||_0x2c58cd);return _0x2c58cd;},S=(_0x2e9a1c,_0x3e0993)=>(_0x3bfe04,_0x22cd40)=>_0x3e0993(_0x3bfe04,_0x22cd40,_0x2e9a1c);let _=class extends c['Disposable']{constructor(_0x303f69,_0xb12423,_0x4d7173,_0x28b8b4){const _0x30570f=_0x320c2a;super(),this[_0x30570f(0xb0)]=_0x303f69,this[_0x30570f(0xec)]=_0xb12423,this[_0x30570f(0xeb)]=_0x4d7173,this[_0x30570f(0xf2)]=_0x28b8b4,this[_0x30570f(0xa5)](),this[_0x30570f(0xa2)]();}[_0x320c2a(0xa2)](){const _0x58c61c=_0x320c2a;this[_0x58c61c(0xde)](this[_0x58c61c(0xec)][_0x58c61c(0xbe)][_0x58c61c(0xe1)](j['bufferTime'](0x10))[_0x58c61c(0xb4)](_0x171a4a=>{const _0x3b65bf=_0x58c61c,_0x2b37a7=new Set();_0x171a4a[_0x3b65bf(0xb2)](_0x20a63a=>{const _0x1b9ccb=_0x3b65bf;if(_0x20a63a[_0x1b9ccb(0x9e)]===_0x1b9ccb(0x9c)){const _0x2da84e=_0x20a63a['payload']['personId'];_0x2b37a7[_0x1b9ccb(0x9c)](_0x2da84e);}}),R(this[_0x3b65bf(0xf2)],_0x2b37a7);}));}[_0x320c2a(0xa5)](){const _0x1f7ba2=_0x320c2a;this[_0x1f7ba2(0xde)](this[_0x1f7ba2(0xb0)][_0x1f7ba2(0xbe)][_0x1f7ba2(0xb4)](async _0x4af113=>{const _0x317900=_0x1f7ba2;var _0x2ebf1f,_0x5c61be,_0x5dfaf7,_0x5f5925;const _0x16d145=(_0x2ebf1f=this[_0x317900(0xec)][_0x317900(0xda)](_0x4af113['unitId'])[_0x317900(0x84)](_0x4f1cbd=>_0x4f1cbd['threadId']===_0x4af113[_0x317900(0xe6)]))==null?void 0x0:_0x2ebf1f['root'];if(!_0x16d145)return;const {unitId:_0xcbdc8a,subUnitId:_0x5d9084}=_0x16d145;switch(_0x4af113[_0x317900(0x9a)]&&this[_0x317900(0xeb)][_0x317900(0xf3)](_0x4af113['user']),_0x4af113[_0x317900(0x9e)]){case v['Add']:break;case v[_0x317900(0xab)]:{this[_0x317900(0xec)]['addComment'](_0xcbdc8a,_0x5d9084,{'unitId':_0xcbdc8a,'subUnitId':_0x5d9084,'ref':'','id':_0x4af113[_0x317900(0xd9)],'dT':f(+_0x4af113[_0x317900(0xf1)]),'threadId':_0x4af113[_0x317900(0xe6)],'personId':(_0x5dfaf7=(_0x5c61be=_0x4af113[_0x317900(0x9a)])==null?void 0x0:_0x5c61be[_0x317900(0xb1)])!=null?_0x5dfaf7:_0x4af113[_0x317900(0xdf)],'text':JSON[_0x317900(0xee)](_0x4af113['content']),'parentId':_0x16d145['id']});break;}case v[_0x317900(0xca)]:{const _0x269fca=this[_0x317900(0xec)]['getComment'](_0xcbdc8a,_0x5d9084,_0x4af113[_0x317900(0xd9)]);_0x269fca&&_0x269fca['parentId']&&this[_0x317900(0xec)][_0x317900(0xef)](_0xcbdc8a,_0x5d9084,_0x4af113[_0x317900(0xd9)]);break;}case v[_0x317900(0x8f)]:{this['_threadCommentModel'][_0x317900(0x9f)](_0xcbdc8a,_0x5d9084,{'commentId':_0x4af113[_0x317900(0xd9)],'text':JSON[_0x317900(0xee)](_0x4af113[_0x317900(0xc0)])});break;}case v[_0x317900(0x80)]:{const _0x1ea0e4=(_0x5f5925=this['_threadCommentModel']['getUnit'](_0x4af113[_0x317900(0xcc)])['find'](_0x535e34=>_0x535e34['threadId']===_0x4af113[_0x317900(0xe6)]))==null?void 0x0:_0x5f5925[_0x317900(0xa6)];_0x1ea0e4&&this[_0x317900(0xec)][_0x317900(0xe9)](_0xcbdc8a,_0x5d9084,_0x1ea0e4['id'],_0x4af113[_0x317900(0xcd)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x320c2a(0xd1)](b[_0x320c2a(0xe8)])),S(0x1,c[_0x320c2a(0xd1)](M[_0x320c2a(0xa9)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x320c2a(0xd1)](c[_0x320c2a(0x83)]))],_);const q=_0x320c2a(0x99),D={};var A=Object[_0x320c2a(0xa8)],x=(_0x2339dd,_0x35df8a,_0x281bfd,_0x52c882)=>{const _0x38180c=_0x320c2a;for(var _0x3bd2cc=_0x52c882>0x1?void 0x0:_0x52c882?A(_0x35df8a,_0x281bfd):_0x35df8a,_0x4b5b01=_0x2339dd[_0x38180c(0x8e)]-0x1,_0x3a675c;_0x4b5b01>=0x0;_0x4b5b01--)(_0x3a675c=_0x2339dd[_0x4b5b01])&&(_0x3bd2cc=_0x3a675c(_0x3bd2cc)||_0x3bd2cc);return _0x3bd2cc;},C=(_0x49b116,_0x14bfee)=>(_0x3a76d9,_0x38bb2d)=>_0x14bfee(_0x3a76d9,_0x38bb2d,_0x49b116);function Y(_0xa1cf79,_0x1eccb8){const _0x7e1d6a=_0x320c2a,_0x555959=_0xa1cf79[_0x7e1d6a(0x92)][0x0];return{..._0x1eccb8,'id':_0x555959[_0x7e1d6a(0xd9)],'resolved':_0xa1cf79['solved']===0x1,'dT':f(_0x555959[_0x7e1d6a(0xf1)]),'personId':_0x555959['userId'],'threadId':_0x555959[_0x7e1d6a(0xe6)]};}function G(_0xabff13,_0x68d115,_0x171e96){const _0x4e05ea=_0x320c2a;var _0xeb0970,_0x276254;if(((_0x276254=(_0xeb0970=_0xabff13==null?void 0x0:_0xabff13[_0x4e05ea(0x92)])==null?void 0x0:_0xeb0970['length'])!=null?_0x276254:0x0)>0x0){const _0x4c09ba=(_0x4a7b05,_0x15e53c)=>({'id':_0x4a7b05[_0x4e05ea(0xd9)],'threadId':_0x4a7b05[_0x4e05ea(0xe6)],'dT':f(_0x4a7b05[_0x4e05ea(0xf1)]),'personId':_0x4a7b05['userId'],'resolved':_0xabff13[_0x4e05ea(0xcd)]===I[_0x4e05ea(0xcf)],'unitId':_0x68d115,'subUnitId':_0x171e96,'text':JSON[_0x4e05ea(0xee)](_0x4a7b05[_0x4e05ea(0xc0)]),'parentId':_0x15e53c}),_0xbfd42f=_0x4c09ba(_0xabff13[_0x4e05ea(0x92)][0x0]);return{..._0xbfd42f,'children':_0xabff13[_0x4e05ea(0x92)][_0x4e05ea(0x90)](0x1)[_0x4e05ea(0xc9)](_0x22ca34=>_0x4c09ba(_0x22ca34,_0xbfd42f['id']))};}return null;}let p=class{constructor(_0x21e36a,_0x48d0ef,_0x3ba907){const _0x4a1bd8=_0x320c2a;this['_httpService']=_0x21e36a,this[_0x4a1bd8(0xeb)]=_0x48d0ef,this['_sessionService']=_0x3ba907;}async[_0x320c2a(0xd2)](_0x470ad3){const _0x3c3441=_0x320c2a;var _0x24f69d,_0x44e604;const {parentId:_0x25fb30,unitId:_0x6c80e8,text:_0x48ffb4,threadId:_0x154de8}=_0x470ad3,_0x381904=(_0x44e604=(_0x24f69d=_0x48ffb4['customRanges'])==null?void 0x0:_0x24f69d[_0x3c3441(0x8c)](_0x4e5fa5=>_0x4e5fa5['rangeType']===c[_0x3c3441(0xce)][_0x3c3441(0xd3)])[_0x3c3441(0xc9)](_0x774853=>_0x774853['rangeId']))!=null?_0x44e604:[],_0x1b823c=JSON[_0x3c3441(0xd6)](_0x48ffb4),_0x33a434=(await this[_0x3c3441(0xdb)][_0x3c3441(0xdc)](_0x6c80e8))[_0x3c3441(0xbd)]();if(_0x25fb30){const _0x7579ec={'memberId':_0x33a434,'unitId':_0x6c80e8,'content':_0x1b823c,'mention':_0x381904,'threadId':_0x154de8},_0x50d379=(await this['_httpService'][_0x3c3441(0xf0)]('/universer-api/comment/unit/'+_0x6c80e8+'/reply',{'body':_0x7579ec}))[_0x3c3441(0xb8)][_0x3c3441(0xd7)];return{..._0x470ad3,'id':_0x50d379['replyId'],'dT':c[_0x3c3441(0x94)](+_0x50d379[_0x3c3441(0xf1)])[_0x3c3441(0xd5)](_0x3c3441(0xc6)),'personId':_0x50d379[_0x3c3441(0xdf)]};}else{const _0x2eb2a7={'memberId':_0x33a434,'unitId':_0x6c80e8,'content':_0x1b823c,'mention':_0x381904},_0x2f8a08=await this[_0x3c3441(0x7f)][_0x3c3441(0xf0)]('/universer-api/comment/unit/'+_0x6c80e8+_0x3c3441(0xbb),{'body':_0x2eb2a7});return Y(_0x2f8a08['body'][_0x3c3441(0x8d)],_0x470ad3);}}async['updateComment'](_0xdd1e96){const _0x55c2a9=_0x320c2a;var _0x3c6906,_0x3b7bd0;const {text:_0x29948b,unitId:_0x3381c8}=_0xdd1e96,_0x55a7d6=(_0x3b7bd0=(_0x3c6906=_0x29948b['customRanges'])==null?void 0x0:_0x3c6906[_0x55c2a9(0x8c)](_0x3fa390=>_0x3fa390[_0x55c2a9(0xc2)]===c[_0x55c2a9(0xce)]['COMMENT'])['map'](_0x2fb2d4=>_0x2fb2d4[_0x55c2a9(0xb3)]))!=null?_0x3b7bd0:[],_0x5cd13c=JSON['stringify'](_0x29948b),_0x2ce124=_0xdd1e96[_0x55c2a9(0xe6)],_0x1954a3=_0xdd1e96['id'],_0x186cba={'memberId':(await this[_0x55c2a9(0xdb)][_0x55c2a9(0xdc)](_0x3381c8))[_0x55c2a9(0xbd)](),'unitId':_0x3381c8,'threadId':_0x2ce124,'mention':_0x55a7d6,'content':_0x5cd13c,'replyId':_0x1954a3},_0x5d232b=await this[_0x55c2a9(0x7f)][_0x55c2a9(0xf0)]('/universer-api/comment/unit/'+_0x3381c8+'/edit',{'body':_0x186cba});return!_0x5d232b[_0x55c2a9(0xb8)][_0x55c2a9(0x98)]||_0x5d232b[_0x55c2a9(0xb8)][_0x55c2a9(0x98)]['code']===0x1;}async[_0x320c2a(0xe9)](_0x2b79ea){const _0x5e3a59=_0x320c2a,{unitId:_0x49a3c2}=_0x2b79ea,_0x502e4c=_0x2b79ea['threadId'],_0x1b025f={'memberId':this[_0x5e3a59(0xeb)][_0x5e3a59(0x9b)]()['userID'],'unitId':_0x49a3c2,'threadId':_0x502e4c,'solved':_0x2b79ea['resolved']?I[_0x5e3a59(0xcf)]:I['OpenOrReOpen']},_0x3fafdc=await this[_0x5e3a59(0x7f)]['post'](_0x5e3a59(0xb7)+_0x49a3c2+_0x5e3a59(0xea),{'body':_0x1b025f});return!_0x3fafdc[_0x5e3a59(0xb8)][_0x5e3a59(0x98)]||_0x3fafdc[_0x5e3a59(0xb8)]['error'][_0x5e3a59(0x91)]===0x1;}async[_0x320c2a(0xef)](_0x4c1631,_0x59f8ce,_0x3668c0,_0x590f0b){const _0x5947c2=_0x320c2a,_0x201542={'memberId':(await this[_0x5947c2(0xdb)][_0x5947c2(0xdc)](_0x4c1631))[_0x5947c2(0xbd)](),'threadId':_0x3668c0,'replyId':_0x590f0b,'unitId':_0x4c1631},_0x20cca6=await this['_httpService'][_0x5947c2(0xf0)](_0x5947c2(0xb7)+_0x4c1631+_0x5947c2(0xc5),{'body':_0x201542});return!_0x20cca6['body']['error']||_0x20cca6['body'][_0x5947c2(0x98)][_0x5947c2(0x91)]===0x1;}async[_0x320c2a(0x7e)](_0x191576,_0xdb5d0a,_0x2480f4){const _0x55f4ef=_0x320c2a,_0x1af5bb={'unitId':_0x191576,'threadId':_0x2480f4},_0x409d88=await this[_0x55f4ef(0x7f)][_0x55f4ef(0xf0)](_0x55f4ef(0xb7)+_0x191576+_0x55f4ef(0x95),{'body':_0x1af5bb}),_0x29ee77=_0x2480f4['map'](_0x554017=>G(_0x409d88[_0x55f4ef(0xb8)]['comments'][_0x554017],_0x191576,_0xdb5d0a))[_0x55f4ef(0x8c)](Boolean);return Object[_0x55f4ef(0x8a)](_0x409d88['body'][_0x55f4ef(0xae)])['forEach'](_0xad39e5=>{const _0x2b7861=_0x55f4ef;this[_0x2b7861(0xeb)]['addUser'](_0xad39e5);}),_0x29ee77;}[_0x320c2a(0x96)](_0x55e46e){const _0x1ba8eb=_0x320c2a;return{'id':_0x55e46e['id'],'threadId':_0x55e46e[_0x1ba8eb(0xe6)],'ref':_0x55e46e['ref']};}};p=x([C(0x0,c[_0x320c2a(0xd1)](P[_0x320c2a(0xa1)])),C(0x1,c[_0x320c2a(0xd1)](c['UserManagerService'])),C(0x2,c[_0x320c2a(0xd1)](b[_0x320c2a(0xba)]))],p);var H=Object[_0x320c2a(0xa8)],J=(_0x42ee28,_0x1c7ee9,_0x35ff65,_0x3781e7)=>{const _0x25c139=_0x320c2a;for(var _0x295c49=_0x3781e7>0x1?void 0x0:_0x3781e7?H(_0x1c7ee9,_0x35ff65):_0x1c7ee9,_0x1b7352=_0x42ee28[_0x25c139(0x8e)]-0x1,_0x4aaca9;_0x1b7352>=0x0;_0x1b7352--)(_0x4aaca9=_0x42ee28[_0x1b7352])&&(_0x295c49=_0x4aaca9(_0x295c49)||_0x295c49);return _0x295c49;},y=(_0x148776,_0x1fa12b)=>(_0xa9e483,_0x4395a5)=>_0x1fa12b(_0xa9e483,_0x4395a5,_0x148776);let g=class extends c[_0x320c2a(0xa7)]{constructor(_0x37610b,_0x23d09c){const _0x199dfb=_0x320c2a;super(),this[_0x199dfb(0x97)]=_0x37610b,this[_0x199dfb(0xd4)]=_0x23d09c,this['_initDataSource']();}[_0x320c2a(0xaf)](){const _0x40815c=_0x320c2a;this[_0x40815c(0x97)][_0x40815c(0xe7)]=this[_0x40815c(0xd4)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x320c2a(0x82)]),y(0x1,c[_0x320c2a(0xd1)](p))],g);var F=Object[_0x320c2a(0xaa)],L=Object[_0x320c2a(0xa8)],Z=(_0x3e8387,_0x59a83c,_0x265f3b)=>_0x59a83c in _0x3e8387?F(_0x3e8387,_0x59a83c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x265f3b}):_0x3e8387[_0x59a83c]=_0x265f3b,W=(_0x58320a,_0x5b2a47,_0x83128d,_0x314b4f)=>{const _0x3a4814=_0x320c2a;for(var _0xd64a7e=_0x314b4f>0x1?void 0x0:_0x314b4f?L(_0x5b2a47,_0x83128d):_0x5b2a47,_0x1bdf52=_0x58320a[_0x3a4814(0x8e)]-0x1,_0x51aaac;_0x1bdf52>=0x0;_0x1bdf52--)(_0x51aaac=_0x58320a[_0x1bdf52])&&(_0xd64a7e=_0x51aaac(_0xd64a7e)||_0xd64a7e);return _0xd64a7e;},O=(_0x2f24ef,_0x59cdfe)=>(_0x571bb6,_0x27b2dd)=>_0x59cdfe(_0x571bb6,_0x27b2dd,_0x2f24ef),N=(_0x19218f,_0x3182a7,_0x5c81c6)=>Z(_0x19218f,typeof _0x3182a7!='symbol'?_0x3182a7+'':_0x3182a7,_0x5c81c6);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x320c2a(0xbc)]{constructor(_0x1af8f6=D,_0x35a959,_0xc27e9a){const _0x340a47=_0x320c2a;super(),this[_0x340a47(0x85)]=_0x1af8f6,this[_0x340a47(0xf2)]=_0x35a959,this[_0x340a47(0xe2)]=_0xc27e9a;const {..._0x1e8437}=c[_0x340a47(0xb9)]({},D,this[_0x340a47(0x85)]);this[_0x340a47(0xe2)][_0x340a47(0xd8)](q,_0x1e8437);}['onStarting'](){const _0x3febbf=_0x320c2a;[[p],[g],[_]][_0x3febbf(0xb2)](_0x43ce18=>{const _0x2d19d7=_0x3febbf;this[_0x2d19d7(0xf2)][_0x2d19d7(0x9c)](_0x43ce18);});}['onReady'](){const _0x2eb1ea=_0x320c2a;this[_0x2eb1ea(0xf2)]['get'](g),this[_0x2eb1ea(0xf2)][_0x2eb1ea(0xc1)](_);}},N(exports[_0x320c2a(0xdd)],_0x320c2a(0x81),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x320c2a(0x9e),c[_0x320c2a(0x89)][_0x320c2a(0xc4)]),exports[_0x320c2a(0xdd)]=W([c[_0x320c2a(0xe4)](w[_0x320c2a(0xac)],b['UniverCollaborationClientPlugin'],T[_0x320c2a(0x87)]),O(0x1,c[_0x320c2a(0xd1)](c[_0x320c2a(0x83)])),O(0x2,c[_0x320c2a(0xa0)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x430339=_0x29df;(function(_0x5cbf55,_0x48d232){const _0x52f4c4=_0x29df,_0x1afc3c=_0x5cbf55();while(!![]){try{const _0x263434=parseInt(_0x52f4c4(0xa2))/0x1*(parseInt(_0x52f4c4(0xb8))/0x2)+parseInt(_0x52f4c4(0xc2))/0x3*(-parseInt(_0x52f4c4(0xb1))/0x4)+parseInt(_0x52f4c4(0xcb))/0x5+-parseInt(_0x52f4c4(0xf8))/0x6*(-parseInt(_0x52f4c4(0x9e))/0x7)+parseInt(_0x52f4c4(0xbd))/0x8*(-parseInt(_0x52f4c4(0xf9))/0x9)+parseInt(_0x52f4c4(0xba))/0xa+parseInt(_0x52f4c4(0xcf))/0xb*(parseInt(_0x52f4c4(0xb9))/0xc);if(_0x263434===_0x48d232)break;else _0x1afc3c['push'](_0x1afc3c['shift']());}catch(_0x134c22){_0x1afc3c['push'](_0x1afc3c['shift']());}}}(_0x342d,0x20482));import{CommentService as _0x4f2985,CollaborationSessionService as _0x11cde2,UniverCollaborationClientPlugin as _0x2663f6}from'@univerjs-pro/collaboration-client';function _0x342d(){const _0x167208=['replyId','_injector','delete','comment','format','deleteComment','stringify','_threadCommentModel','solved','_config','_init','commentUpdate$','12oMbOVA','603fwZcnw','COMMENT','dataSource','addComment','threadId','resolveComment','_threadCommentDataSource','code','getOwnPropertyDescriptor','user','/list','/delete','Reply','285628gxOFnl','_sessionService','Solve','content','97bNoncc','userID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','getUser','parse','body','payload','_initDataSource','Add','users','rangeType','_initUserSync','_httpService','OpenOrReOpen','242188zgyTEA','userId','/solved','defineProperty','add','error','_configService','402iKuuBE','279132ioqqVI','1903000qCrZYu','setConfig','getUnit','18040FYrbio','subscribe','filter','slice','map','3tIqdfH','get','post','createTimestamp','onReady','requireSession','length','find','getMemberID','29655XkNkSp','forEach','Delete','reply','22ZAewfg','values','Solved','UNRECOGNIZED','type','/universer-api/user/list','onStarting','resolved','syncUpdateMutationToColla','getComment','thread-comment-data-source.config','parentId','_threadCommentDataSourceService','replies','comments','UNIVER_UNKNOWN','unitId','rangeId','pluginName','root','pipe','_commentService','_userService','updateComment','customRanges','addUser','Unknown','/edit','/universer-api/comment/unit/'];_0x342d=function(){return _0x167208;};return _0x342d();}import{UniverLicensePlugin as _0x13710b}from'@univerjs-pro/license';import{dayjs as _0x482a8a,UserManagerService as _0x3c7f05,Inject as _0x284561,Injector as _0x42cc06,Disposable as _0x50a3fb,CustomRangeType as _0x3efa19,UniverInstanceType as _0x4be0da,DependentOn as _0x4af44e,Plugin as _0x28c80c,merge as _0x362468,IConfigService as _0x4dbdea}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x116fe9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cb6ce,IThreadCommentDataSourceService as _0x401660}from'@univerjs/thread-comment';import{bufferTime as _0x5ab57d}from'rxjs';import{HTTPService as _0x2e9b77}from'@univerjs/network';const W=_0x430339(0xa4);var I=(_0x1dbd1d=>(_0x1dbd1d[_0x1dbd1d[_0x430339(0xb0)]=0x0]=_0x430339(0xb0),_0x1dbd1d[_0x1dbd1d[_0x430339(0xd1)]=0x1]=_0x430339(0xd1),_0x1dbd1d[_0x1dbd1d[_0x430339(0xd2)]=-0x1]=_0x430339(0xd2),_0x1dbd1d))(I||{}),v=(_0x2d04d9=>(_0x2d04d9[_0x2d04d9[_0x430339(0xe9)]=0x0]=_0x430339(0xe9),_0x2d04d9[_0x2d04d9[_0x430339(0xab)]=0x1]=_0x430339(0xab),_0x2d04d9[_0x2d04d9[_0x430339(0x9d)]=0x2]=_0x430339(0x9d),_0x2d04d9[_0x2d04d9['Edit']=0x3]=_0x430339(0xa5),_0x2d04d9[_0x2d04d9['Delete']=0x4]=_0x430339(0xcd),_0x2d04d9[_0x2d04d9['Solve']=0x5]=_0x430339(0xa0),_0x2d04d9[_0x2d04d9[_0x430339(0xd2)]=-0x1]=_0x430339(0xd2),_0x2d04d9))(v||{});const y=_0x359ae5=>_0x482a8a(new Date(+_0x359ae5))[_0x430339(0xf0)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x16cea7,_0x156b5b)=>{const _0x350cb7=_0x430339,_0x133d81=_0x16cea7[_0x350cb7(0xc3)](_0x3c7f05),_0x40f182=_0x16cea7['get'](_0x2e9b77);_0x156b5b['forEach'](_0x16881c=>{const _0x3aed0f=_0x350cb7;_0x133d81[_0x3aed0f(0xa6)](_0x16881c)&&_0x156b5b[_0x3aed0f(0xee)](_0x16881c);}),_0x156b5b['size']&&(await _0x40f182[_0x350cb7(0xc3)](_0x350cb7(0xd4),{'params':{'userIDs':[..._0x156b5b]}}))[_0x350cb7(0xa8)][_0x350cb7(0xac)][_0x350cb7(0xcc)](_0x69280d=>{const _0x41f293=_0x350cb7;_0x69280d&&_0x133d81[_0x41f293(0xe8)](_0x69280d);});};var K=Object[_0x430339(0x99)],V=(_0x3402e0,_0x1857a6,_0xc3572a,_0x10c23c)=>{const _0x2f3a2d=_0x430339;for(var _0x436a7a=_0x10c23c>0x1?void 0x0:_0x10c23c?K(_0x1857a6,_0xc3572a):_0x1857a6,_0x334a2d=_0x3402e0[_0x2f3a2d(0xc8)]-0x1,_0x2b7e38;_0x334a2d>=0x0;_0x334a2d--)(_0x2b7e38=_0x3402e0[_0x334a2d])&&(_0x436a7a=_0x2b7e38(_0x436a7a)||_0x436a7a);return _0x436a7a;},p=(_0x4b1c7e,_0x100287)=>(_0x4ebeb4,_0x899d41)=>_0x100287(_0x4ebeb4,_0x899d41,_0x4b1c7e);let _=class extends _0x50a3fb{constructor(_0x208135,_0x3b69ce,_0x104d78,_0x2af8c6){const _0x3ac60e=_0x430339;super(),this['_commentService']=_0x208135,this['_threadCommentModel']=_0x3b69ce,this[_0x3ac60e(0xe5)]=_0x104d78,this['_injector']=_0x2af8c6,this['_init'](),this['_initUserSync']();}[_0x430339(0xae)](){const _0xbafe6e=_0x430339;this['disposeWithMe'](this['_threadCommentModel'][_0xbafe6e(0xf7)][_0xbafe6e(0xe3)](_0x5ab57d(0x10))[_0xbafe6e(0xbe)](_0x124065=>{const _0x1d9ebb=_0xbafe6e,_0x293812=new Set();_0x124065['forEach'](_0xb03f72=>{const _0x220e2e=_0x29df;if(_0xb03f72[_0x220e2e(0xd3)]===_0x220e2e(0xb5)){const _0x127e09=_0xb03f72[_0x220e2e(0xa9)]['personId'];_0x293812[_0x220e2e(0xb5)](_0x127e09);}}),B(this[_0x1d9ebb(0xed)],_0x293812);}));}[_0x430339(0xf6)](){const _0x324099=_0x430339;this['disposeWithMe'](this[_0x324099(0xe4)][_0x324099(0xf7)][_0x324099(0xbe)](async _0x56783b=>{const _0x4287e9=_0x324099;var _0x427263,_0x5d1e04,_0x183ff2,_0x44544e;const _0x30ef30=(_0x427263=this[_0x4287e9(0xf3)][_0x4287e9(0xbc)](_0x56783b[_0x4287e9(0xdf)])[_0x4287e9(0xc9)](_0x3f47a7=>_0x3f47a7[_0x4287e9(0x95)]===_0x56783b[_0x4287e9(0x95)]))==null?void 0x0:_0x427263[_0x4287e9(0xe2)];if(!_0x30ef30)return;const {unitId:_0x2db6f8,subUnitId:_0x20b93c}=_0x30ef30;switch(_0x56783b[_0x4287e9(0x9a)]&&this[_0x4287e9(0xe5)][_0x4287e9(0xe8)](_0x56783b[_0x4287e9(0x9a)]),_0x56783b['type']){case v[_0x4287e9(0xab)]:break;case v['Reply']:{this[_0x4287e9(0xf3)][_0x4287e9(0x94)](_0x2db6f8,_0x20b93c,{'unitId':_0x2db6f8,'subUnitId':_0x20b93c,'ref':'','id':_0x56783b[_0x4287e9(0xec)],'dT':y(+_0x56783b[_0x4287e9(0xc5)]),'threadId':_0x56783b[_0x4287e9(0x95)],'personId':(_0x183ff2=(_0x5d1e04=_0x56783b['user'])==null?void 0x0:_0x5d1e04[_0x4287e9(0xa3)])!=null?_0x183ff2:_0x56783b[_0x4287e9(0xb2)],'text':JSON['parse'](_0x56783b[_0x4287e9(0xa1)]),'parentId':_0x30ef30['id']});break;}case v[_0x4287e9(0xcd)]:{const _0x2509b2=this['_threadCommentModel'][_0x4287e9(0xd8)](_0x2db6f8,_0x20b93c,_0x56783b['replyId']);_0x2509b2&&_0x2509b2[_0x4287e9(0xda)]&&this[_0x4287e9(0xf3)][_0x4287e9(0xf1)](_0x2db6f8,_0x20b93c,_0x56783b['replyId']);break;}case v[_0x4287e9(0xa5)]:{this[_0x4287e9(0xf3)][_0x4287e9(0xe6)](_0x2db6f8,_0x20b93c,{'commentId':_0x56783b['replyId'],'text':JSON[_0x4287e9(0xa7)](_0x56783b[_0x4287e9(0xa1)])});break;}case v[_0x4287e9(0xa0)]:{const _0x476a7f=(_0x44544e=this[_0x4287e9(0xf3)][_0x4287e9(0xbc)](_0x56783b[_0x4287e9(0xdf)])[_0x4287e9(0xc9)](_0x84199b=>_0x84199b['threadId']===_0x56783b[_0x4287e9(0x95)]))==null?void 0x0:_0x44544e['root'];_0x476a7f&&this[_0x4287e9(0xf3)][_0x4287e9(0x96)](_0x2db6f8,_0x20b93c,_0x476a7f['id'],_0x56783b[_0x4287e9(0xf4)]===I[_0x4287e9(0xd1)]);break;}}}));}};_=V([p(0x0,_0x284561(_0x4f2985)),p(0x1,_0x284561(_0x2cb6ce)),p(0x2,_0x284561(_0x3c7f05)),p(0x3,_0x284561(_0x42cc06))],_);const z=_0x430339(0xd9),O={};var k=Object[_0x430339(0x99)],Q=(_0x3b9948,_0x589236,_0x34104b,_0x5880a1)=>{const _0x5ab75c=_0x430339;for(var _0x35683a=_0x5880a1>0x1?void 0x0:_0x5880a1?k(_0x589236,_0x34104b):_0x589236,_0x19aa7b=_0x3b9948[_0x5ab75c(0xc8)]-0x1,_0x5d4062;_0x19aa7b>=0x0;_0x19aa7b--)(_0x5d4062=_0x3b9948[_0x19aa7b])&&(_0x35683a=_0x5d4062(_0x35683a)||_0x35683a);return _0x35683a;},b=(_0x559dcb,_0x303e8)=>(_0x3a7406,_0x15c885)=>_0x303e8(_0x3a7406,_0x15c885,_0x559dcb);function X(_0x1131f3,_0x57c5a5){const _0x19caec=_0x430339,_0x6ea603=_0x1131f3[_0x19caec(0xdc)][0x0];return{..._0x57c5a5,'id':_0x6ea603[_0x19caec(0xec)],'resolved':_0x1131f3[_0x19caec(0xf4)]===0x1,'dT':y(_0x6ea603[_0x19caec(0xc5)]),'personId':_0x6ea603[_0x19caec(0xb2)],'threadId':_0x6ea603[_0x19caec(0x95)]};}function ee(_0xbdc744,_0x4841c7,_0x206a33){const _0x5c77de=_0x430339;var _0x344a18,_0x5d55bd;if(((_0x5d55bd=(_0x344a18=_0xbdc744==null?void 0x0:_0xbdc744['replies'])==null?void 0x0:_0x344a18['length'])!=null?_0x5d55bd:0x0)>0x0){const _0x46bd93=(_0x1832d5,_0x2bb14d)=>({'id':_0x1832d5['replyId'],'threadId':_0x1832d5[_0x5c77de(0x95)],'dT':y(_0x1832d5[_0x5c77de(0xc5)]),'personId':_0x1832d5[_0x5c77de(0xb2)],'resolved':_0xbdc744[_0x5c77de(0xf4)]===I['Solved'],'unitId':_0x4841c7,'subUnitId':_0x206a33,'text':JSON[_0x5c77de(0xa7)](_0x1832d5['content']),'parentId':_0x2bb14d}),_0x276909=_0x46bd93(_0xbdc744[_0x5c77de(0xdc)][0x0]);return{..._0x276909,'children':_0xbdc744['replies'][_0x5c77de(0xc0)](0x1)[_0x5c77de(0xc1)](_0x226d9c=>_0x46bd93(_0x226d9c,_0x276909['id']))};}return null;}let S=class{constructor(_0x53e238,_0x389ea5,_0x50741a){const _0x2f0ba3=_0x430339;this[_0x2f0ba3(0xaf)]=_0x53e238,this[_0x2f0ba3(0xe5)]=_0x389ea5,this['_sessionService']=_0x50741a;}async[_0x430339(0x94)](_0x39f384){const _0x5d6316=_0x430339;var _0x5d0fbb,_0x4f1852;const {parentId:_0x21ce8e,unitId:_0x5dd2ba,text:_0x420ce0,threadId:_0xb5bca0}=_0x39f384,_0x3009cb=(_0x4f1852=(_0x5d0fbb=_0x420ce0[_0x5d6316(0xe7)])==null?void 0x0:_0x5d0fbb[_0x5d6316(0xbf)](_0x1bd4af=>_0x1bd4af['rangeType']===_0x3efa19[_0x5d6316(0x92)])['map'](_0x329ec3=>_0x329ec3[_0x5d6316(0xe0)]))!=null?_0x4f1852:[],_0x1018cc=JSON[_0x5d6316(0xf2)](_0x420ce0),_0x198825=(await this[_0x5d6316(0x9f)]['requireSession'](_0x5dd2ba))[_0x5d6316(0xca)]();if(_0x21ce8e){const _0x393cb9={'memberId':_0x198825,'unitId':_0x5dd2ba,'content':_0x1018cc,'mention':_0x3009cb,'threadId':_0xb5bca0},_0x53c2b5=(await this[_0x5d6316(0xaf)][_0x5d6316(0xc4)](_0x5d6316(0xeb)+_0x5dd2ba+'/reply',{'body':_0x393cb9}))[_0x5d6316(0xa8)][_0x5d6316(0xce)];return{..._0x39f384,'id':_0x53c2b5[_0x5d6316(0xec)],'dT':_0x482a8a(+_0x53c2b5[_0x5d6316(0xc5)])[_0x5d6316(0xf0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x53c2b5[_0x5d6316(0xb2)]};}else{const _0x56a001={'memberId':_0x198825,'unitId':_0x5dd2ba,'content':_0x1018cc,'mention':_0x3009cb},_0x54ae32=await this['_httpService'][_0x5d6316(0xc4)](_0x5d6316(0xeb)+_0x5dd2ba+'/add',{'body':_0x56a001});return X(_0x54ae32[_0x5d6316(0xa8)][_0x5d6316(0xef)],_0x39f384);}}async[_0x430339(0xe6)](_0x4e8f44){const _0x2982ee=_0x430339;var _0x251172,_0xb2003a;const {text:_0x14d4db,unitId:_0x42b645}=_0x4e8f44,_0x2ee766=(_0xb2003a=(_0x251172=_0x14d4db[_0x2982ee(0xe7)])==null?void 0x0:_0x251172[_0x2982ee(0xbf)](_0x59e8e9=>_0x59e8e9[_0x2982ee(0xad)]===_0x3efa19[_0x2982ee(0x92)])[_0x2982ee(0xc1)](_0x3307f4=>_0x3307f4['rangeId']))!=null?_0xb2003a:[],_0x4020db=JSON[_0x2982ee(0xf2)](_0x14d4db),_0x3fbd33=_0x4e8f44[_0x2982ee(0x95)],_0x153e28=_0x4e8f44['id'],_0x1bc436={'memberId':(await this[_0x2982ee(0x9f)][_0x2982ee(0xc7)](_0x42b645))[_0x2982ee(0xca)](),'unitId':_0x42b645,'threadId':_0x3fbd33,'mention':_0x2ee766,'content':_0x4020db,'replyId':_0x153e28},_0x57b5ee=await this[_0x2982ee(0xaf)][_0x2982ee(0xc4)](_0x2982ee(0xeb)+_0x42b645+_0x2982ee(0xea),{'body':_0x1bc436});return!_0x57b5ee[_0x2982ee(0xa8)][_0x2982ee(0xb6)]||_0x57b5ee[_0x2982ee(0xa8)][_0x2982ee(0xb6)][_0x2982ee(0x98)]===0x1;}async[_0x430339(0x96)](_0x30bf2e){const _0x4cfac9=_0x430339,{unitId:_0x1982fa}=_0x30bf2e,_0x29b696=_0x30bf2e[_0x4cfac9(0x95)],_0x3ff65e={'memberId':this[_0x4cfac9(0xe5)]['getCurrentUser']()[_0x4cfac9(0xa3)],'unitId':_0x1982fa,'threadId':_0x29b696,'solved':_0x30bf2e[_0x4cfac9(0xd6)]?I['Solved']:I[_0x4cfac9(0xb0)]},_0x24b0ef=await this['_httpService'][_0x4cfac9(0xc4)](_0x4cfac9(0xeb)+_0x1982fa+_0x4cfac9(0xb3),{'body':_0x3ff65e});return!_0x24b0ef['body'][_0x4cfac9(0xb6)]||_0x24b0ef[_0x4cfac9(0xa8)][_0x4cfac9(0xb6)]['code']===0x1;}async['deleteComment'](_0x1dacb6,_0x1ed653,_0x4b3bae,_0x4ee5e6){const _0x306483=_0x430339,_0x195549={'memberId':(await this['_sessionService'][_0x306483(0xc7)](_0x1dacb6))[_0x306483(0xca)](),'threadId':_0x4b3bae,'replyId':_0x4ee5e6,'unitId':_0x1dacb6},_0x174573=await this[_0x306483(0xaf)][_0x306483(0xc4)](_0x306483(0xeb)+_0x1dacb6+_0x306483(0x9c),{'body':_0x195549});return!_0x174573['body'][_0x306483(0xb6)]||_0x174573[_0x306483(0xa8)]['error'][_0x306483(0x98)]===0x1;}async['listComments'](_0x2ec94c,_0x322a0a,_0x11a264){const _0x2190db=_0x430339,_0x4ae08f={'unitId':_0x2ec94c,'threadId':_0x11a264},_0x13193b=await this[_0x2190db(0xaf)]['post'](_0x2190db(0xeb)+_0x2ec94c+_0x2190db(0x9b),{'body':_0x4ae08f}),_0x5b586e=_0x11a264[_0x2190db(0xc1)](_0x3f4bf9=>ee(_0x13193b[_0x2190db(0xa8)][_0x2190db(0xdd)][_0x3f4bf9],_0x2ec94c,_0x322a0a))['filter'](Boolean);return Object[_0x2190db(0xd0)](_0x13193b[_0x2190db(0xa8)][_0x2190db(0xac)])[_0x2190db(0xcc)](_0x5396cc=>{const _0x291ff1=_0x2190db;this[_0x291ff1(0xe5)]['addUser'](_0x5396cc);}),_0x5b586e;}['saveCommentToSnapshot'](_0x41a4f8){const _0x21b598=_0x430339;return{'id':_0x41a4f8['id'],'threadId':_0x41a4f8[_0x21b598(0x95)],'ref':_0x41a4f8['ref']};}};S=Q([b(0x0,_0x284561(_0x2e9b77)),b(0x1,_0x284561(_0x3c7f05)),b(0x2,_0x284561(_0x11cde2))],S);var re=Object[_0x430339(0x99)],te=(_0x4622ca,_0x56c3f,_0x5a89e3,_0x499b51)=>{const _0x50d62e=_0x430339;for(var _0x40d10a=_0x499b51>0x1?void 0x0:_0x499b51?re(_0x56c3f,_0x5a89e3):_0x56c3f,_0xedc17d=_0x4622ca[_0x50d62e(0xc8)]-0x1,_0x483f84;_0xedc17d>=0x0;_0xedc17d--)(_0x483f84=_0x4622ca[_0xedc17d])&&(_0x40d10a=_0x483f84(_0x40d10a)||_0x40d10a);return _0x40d10a;},M=(_0x259df9,_0x411da4)=>(_0x38fa9c,_0x2a8a20)=>_0x411da4(_0x38fa9c,_0x2a8a20,_0x259df9);function _0x29df(_0x219580,_0xd2b0af){_0x219580=_0x219580-0x92;const _0x342d5b=_0x342d();let _0x29df42=_0x342d5b[_0x219580];return _0x29df42;}let f=class extends _0x50a3fb{constructor(_0x375f80,_0x52e351){super(),this['_threadCommentDataSourceService']=_0x375f80,this['_threadCommentDataSource']=_0x52e351,this['_initDataSource']();}[_0x430339(0xaa)](){const _0x5f1526=_0x430339;this[_0x5f1526(0xdb)][_0x5f1526(0x93)]=this[_0x5f1526(0x97)],this[_0x5f1526(0xdb)][_0x5f1526(0xd7)]=!0x1;}};f=te([M(0x0,_0x401660),M(0x1,_0x284561(S))],f);var se=Object[_0x430339(0xb4)],oe=Object[_0x430339(0x99)],ne=(_0x3f9c87,_0xd76f44,_0x55489c)=>_0xd76f44 in _0x3f9c87?se(_0x3f9c87,_0xd76f44,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55489c}):_0x3f9c87[_0xd76f44]=_0x55489c,ie=(_0x259a7b,_0x574d57,_0x2f6f5e,_0x5e2998)=>{const _0x268a03=_0x430339;for(var _0x2978da=_0x5e2998>0x1?void 0x0:_0x5e2998?oe(_0x574d57,_0x2f6f5e):_0x574d57,_0x4a192f=_0x259a7b[_0x268a03(0xc8)]-0x1,_0x3c8c45;_0x4a192f>=0x0;_0x4a192f--)(_0x3c8c45=_0x259a7b[_0x4a192f])&&(_0x2978da=_0x3c8c45(_0x2978da)||_0x2978da);return _0x2978da;},N=(_0x50db3c,_0x396c30)=>(_0x44cd32,_0x4be6f5)=>_0x396c30(_0x44cd32,_0x4be6f5,_0x50db3c),$=(_0x2a8fa2,_0x8f8dc2,_0x4464d5)=>ne(_0x2a8fa2,typeof _0x8f8dc2!='symbol'?_0x8f8dc2+'':_0x8f8dc2,_0x4464d5);let g=class extends _0x28c80c{constructor(_0x1a3b81=O,_0x505733,_0x2bd0aa){const _0x2a44c2=_0x430339;super(),this[_0x2a44c2(0xf5)]=_0x1a3b81,this['_injector']=_0x505733,this[_0x2a44c2(0xb7)]=_0x2bd0aa;const {..._0x4bee3d}=_0x362468({},O,this[_0x2a44c2(0xf5)]);this[_0x2a44c2(0xb7)][_0x2a44c2(0xbb)](z,_0x4bee3d);}[_0x430339(0xd5)](){[[S],[f],[_]]['forEach'](_0x15b678=>{const _0x54e939=_0x29df;this[_0x54e939(0xed)][_0x54e939(0xb5)](_0x15b678);});}[_0x430339(0xc6)](){const _0xc06215=_0x430339;this['_injector'][_0xc06215(0xc3)](f),this[_0xc06215(0xed)]['get'](_);}};$(g,_0x430339(0xe1),W),$(g,_0x430339(0xd3),_0x4be0da[_0x430339(0xde)]),g=ie([_0x4af44e(_0x116fe9,_0x2663f6,_0x13710b),N(0x1,_0x284561(_0x42cc06)),N(0x2,_0x4dbdea)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x45e79d=_0x9908;(function(_0x4a2f4b,_0x494ac3){const _0x2c06b1=_0x9908,_0x5d32fd=_0x4a2f4b();while(!![]){try{const _0xffcefb=-parseInt(_0x2c06b1(0x230))/0x1+-parseInt(_0x2c06b1(0x248))/0x2*(-parseInt(_0x2c06b1(0x1f2))/0x3)+parseInt(_0x2c06b1(0x1fa))/0x4+-parseInt(_0x2c06b1(0x23d))/0x5*(parseInt(_0x2c06b1(0x1ed))/0x6)+-parseInt(_0x2c06b1(0x1e8))/0x7+-parseInt(_0x2c06b1(0x219))/0x8*(-parseInt(_0x2c06b1(0x1fe))/0x9)+-parseInt(_0x2c06b1(0x1fc))/0xa*(-parseInt(_0x2c06b1(0x1f7))/0xb);if(_0xffcefb===_0x494ac3)break;else _0x5d32fd['push'](_0x5d32fd['shift']());}catch(_0x2427ff){_0x5d32fd['push'](_0x5d32fd['shift']());}}}(_0x5db2,0x27e35));import{CommentService as _0x1f2b80,CollaborationSessionService as _0xf34cc1,UniverCollaborationClientPlugin as _0x27e6ee}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x344deb}from'@univerjs-pro/license';import{dayjs as _0x20cf44,UserManagerService as _0x446986,Inject as _0x2cfc8b,Injector as _0x251dc0,Disposable as _0x70462f,CustomRangeType as _0x134576,UniverInstanceType as _0x14136f,DependentOn as _0x14b24,Plugin as _0xb90f85,merge as _0x346483,IConfigService as _0x54f232}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36ad3c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x36d4d7,IThreadCommentDataSourceService as _0x21999a}from'@univerjs/thread-comment';import{bufferTime as _0x31ded4}from'rxjs';import{HTTPService as _0x35314b}from'@univerjs/network';const W=_0x45e79d(0x233);var I=(_0x45cd17=>(_0x45cd17[_0x45cd17[_0x45e79d(0x249)]=0x0]=_0x45e79d(0x249),_0x45cd17[_0x45cd17[_0x45e79d(0x237)]=0x1]='Solved',_0x45cd17[_0x45cd17[_0x45e79d(0x207)]=-0x1]=_0x45e79d(0x207),_0x45cd17))(I||{}),v=(_0x48c451=>(_0x48c451[_0x48c451[_0x45e79d(0x243)]=0x0]=_0x45e79d(0x243),_0x48c451[_0x48c451[_0x45e79d(0x1ef)]=0x1]=_0x45e79d(0x1ef),_0x48c451[_0x48c451[_0x45e79d(0x1e6)]=0x2]='Reply',_0x48c451[_0x48c451['Edit']=0x3]='Edit',_0x48c451[_0x48c451['Delete']=0x4]=_0x45e79d(0x20c),_0x48c451[_0x48c451['Solve']=0x5]=_0x45e79d(0x22f),_0x48c451[_0x48c451[_0x45e79d(0x207)]=-0x1]=_0x45e79d(0x207),_0x48c451))(v||{});const y=_0x39eef9=>_0x20cf44(new Date(+_0x39eef9))[_0x45e79d(0x239)](_0x45e79d(0x23c)),B=async(_0x3cbbb5,_0x4eaa12)=>{const _0x225d54=_0x45e79d,_0x5c1bbf=_0x3cbbb5[_0x225d54(0x240)](_0x446986),_0xd1767f=_0x3cbbb5[_0x225d54(0x240)](_0x35314b);_0x4eaa12['forEach'](_0x330cd1=>{const _0x48c27a=_0x225d54;_0x5c1bbf[_0x48c27a(0x1f6)](_0x330cd1)&&_0x4eaa12[_0x48c27a(0x238)](_0x330cd1);}),_0x4eaa12['size']&&(await _0xd1767f[_0x225d54(0x240)](_0x225d54(0x1eb),{'params':{'userIDs':[..._0x4eaa12]}}))[_0x225d54(0x1fb)]['users']['forEach'](_0x486dac=>{const _0x590738=_0x225d54;_0x486dac&&_0x5c1bbf[_0x590738(0x246)](_0x486dac);});};var K=Object[_0x45e79d(0x209)],V=(_0x1ba4bc,_0x20a586,_0x45eaea,_0x22234d)=>{for(var _0x18d15f=_0x22234d>0x1?void 0x0:_0x22234d?K(_0x20a586,_0x45eaea):_0x20a586,_0x1c2173=_0x1ba4bc['length']-0x1,_0x3a62c1;_0x1c2173>=0x0;_0x1c2173--)(_0x3a62c1=_0x1ba4bc[_0x1c2173])&&(_0x18d15f=_0x3a62c1(_0x18d15f)||_0x18d15f);return _0x18d15f;},p=(_0x1db80e,_0x503335)=>(_0x4f77d0,_0x1f04f6)=>_0x503335(_0x4f77d0,_0x1f04f6,_0x1db80e);let _=class extends _0x70462f{constructor(_0x385563,_0x5a4c05,_0x3922ce,_0x27787d){const _0x34a87d=_0x45e79d;super(),this['_commentService']=_0x385563,this[_0x34a87d(0x23b)]=_0x5a4c05,this[_0x34a87d(0x21b)]=_0x3922ce,this['_injector']=_0x27787d,this[_0x34a87d(0x21e)](),this[_0x34a87d(0x220)]();}[_0x45e79d(0x220)](){const _0x754d05=_0x45e79d;this[_0x754d05(0x21f)](this[_0x754d05(0x23b)]['commentUpdate$']['pipe'](_0x31ded4(0x10))[_0x754d05(0x20f)](_0x352d1f=>{const _0x39dbe8=_0x754d05,_0x4f5f4c=new Set();_0x352d1f[_0x39dbe8(0x242)](_0x152b39=>{const _0x4c9146=_0x39dbe8;if(_0x152b39[_0x4c9146(0x22b)]===_0x4c9146(0x229)){const _0xf7eaf5=_0x152b39[_0x4c9146(0x245)][_0x4c9146(0x212)];_0x4f5f4c[_0x4c9146(0x229)](_0xf7eaf5);}}),B(this[_0x39dbe8(0x223)],_0x4f5f4c);}));}[_0x45e79d(0x21e)](){const _0x1cc88e=_0x45e79d;this[_0x1cc88e(0x21f)](this['_commentService'][_0x1cc88e(0x225)]['subscribe'](async _0x1400d9=>{const _0x2f0c63=_0x1cc88e;var _0x12d8c8,_0x4947a2,_0xafde79,_0x327fe3;const _0x438b24=(_0x12d8c8=this[_0x2f0c63(0x23b)][_0x2f0c63(0x1f1)](_0x1400d9[_0x2f0c63(0x206)])[_0x2f0c63(0x1ec)](_0xefecf4=>_0xefecf4[_0x2f0c63(0x20b)]===_0x1400d9[_0x2f0c63(0x20b)]))==null?void 0x0:_0x12d8c8[_0x2f0c63(0x247)];if(!_0x438b24)return;const {unitId:_0x53cc01,subUnitId:_0x578f2f}=_0x438b24;switch(_0x1400d9['user']&&this[_0x2f0c63(0x21b)][_0x2f0c63(0x246)](_0x1400d9['user']),_0x1400d9[_0x2f0c63(0x22b)]){case v[_0x2f0c63(0x1ef)]:break;case v[_0x2f0c63(0x1e6)]:{this['_threadCommentModel'][_0x2f0c63(0x205)](_0x53cc01,_0x578f2f,{'unitId':_0x53cc01,'subUnitId':_0x578f2f,'ref':'','id':_0x1400d9[_0x2f0c63(0x21d)],'dT':y(+_0x1400d9[_0x2f0c63(0x213)]),'threadId':_0x1400d9['threadId'],'personId':(_0xafde79=(_0x4947a2=_0x1400d9['user'])==null?void 0x0:_0x4947a2[_0x2f0c63(0x201)])!=null?_0xafde79:_0x1400d9[_0x2f0c63(0x208)],'text':JSON[_0x2f0c63(0x1ee)](_0x1400d9[_0x2f0c63(0x227)]),'parentId':_0x438b24['id']});break;}case v[_0x2f0c63(0x20c)]:{const _0x39173d=this['_threadCommentModel'][_0x2f0c63(0x23e)](_0x53cc01,_0x578f2f,_0x1400d9[_0x2f0c63(0x21d)]);_0x39173d&&_0x39173d[_0x2f0c63(0x1ff)]&&this[_0x2f0c63(0x23b)][_0x2f0c63(0x1fd)](_0x53cc01,_0x578f2f,_0x1400d9['replyId']);break;}case v[_0x2f0c63(0x1f5)]:{this[_0x2f0c63(0x23b)][_0x2f0c63(0x20a)](_0x53cc01,_0x578f2f,{'commentId':_0x1400d9[_0x2f0c63(0x21d)],'text':JSON[_0x2f0c63(0x1ee)](_0x1400d9['content'])});break;}case v[_0x2f0c63(0x22f)]:{const _0x57b12c=(_0x327fe3=this[_0x2f0c63(0x23b)][_0x2f0c63(0x1f1)](_0x1400d9[_0x2f0c63(0x206)])[_0x2f0c63(0x1ec)](_0x181765=>_0x181765['threadId']===_0x1400d9['threadId']))==null?void 0x0:_0x327fe3[_0x2f0c63(0x247)];_0x57b12c&&this[_0x2f0c63(0x23b)][_0x2f0c63(0x236)](_0x53cc01,_0x578f2f,_0x57b12c['id'],_0x1400d9[_0x2f0c63(0x1f4)]===I[_0x2f0c63(0x237)]);break;}}}));}};_=V([p(0x0,_0x2cfc8b(_0x1f2b80)),p(0x1,_0x2cfc8b(_0x36d4d7)),p(0x2,_0x2cfc8b(_0x446986)),p(0x3,_0x2cfc8b(_0x251dc0))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x9bd358,_0x2b813b,_0x34f7b9,_0x3dade7)=>{const _0xf80a4=_0x45e79d;for(var _0x582275=_0x3dade7>0x1?void 0x0:_0x3dade7?k(_0x2b813b,_0x34f7b9):_0x2b813b,_0x109aef=_0x9bd358[_0xf80a4(0x204)]-0x1,_0x82c707;_0x109aef>=0x0;_0x109aef--)(_0x82c707=_0x9bd358[_0x109aef])&&(_0x582275=_0x82c707(_0x582275)||_0x582275);return _0x582275;},b=(_0x4e7394,_0x365996)=>(_0x298196,_0x363f52)=>_0x365996(_0x298196,_0x363f52,_0x4e7394);function X(_0x1c7308,_0x31829c){const _0x2e4602=_0x45e79d,_0x51aede=_0x1c7308[_0x2e4602(0x234)][0x0];return{..._0x31829c,'id':_0x51aede['replyId'],'resolved':_0x1c7308[_0x2e4602(0x1f4)]===0x1,'dT':y(_0x51aede[_0x2e4602(0x213)]),'personId':_0x51aede['userId'],'threadId':_0x51aede[_0x2e4602(0x20b)]};}function ee(_0x2993b2,_0x9dbc9b,_0x19ae4a){const _0x354fba=_0x45e79d;var _0x2dd9a6,_0x2911f2;if(((_0x2911f2=(_0x2dd9a6=_0x2993b2==null?void 0x0:_0x2993b2['replies'])==null?void 0x0:_0x2dd9a6['length'])!=null?_0x2911f2:0x0)>0x0){const _0x4a50f8=(_0x4e5a77,_0x432c51)=>({'id':_0x4e5a77[_0x354fba(0x21d)],'threadId':_0x4e5a77[_0x354fba(0x20b)],'dT':y(_0x4e5a77[_0x354fba(0x213)]),'personId':_0x4e5a77['userId'],'resolved':_0x2993b2[_0x354fba(0x1f4)]===I['Solved'],'unitId':_0x9dbc9b,'subUnitId':_0x19ae4a,'text':JSON[_0x354fba(0x1ee)](_0x4e5a77[_0x354fba(0x227)]),'parentId':_0x432c51}),_0x5b9b02=_0x4a50f8(_0x2993b2[_0x354fba(0x234)][0x0]);return{..._0x5b9b02,'children':_0x2993b2[_0x354fba(0x234)][_0x354fba(0x235)](0x1)[_0x354fba(0x1f8)](_0x4f1f4e=>_0x4a50f8(_0x4f1f4e,_0x5b9b02['id']))};}return null;}let S=class{constructor(_0x1d4b03,_0x2767f1,_0x182079){const _0x281cb6=_0x45e79d;this[_0x281cb6(0x228)]=_0x1d4b03,this[_0x281cb6(0x21b)]=_0x2767f1,this[_0x281cb6(0x200)]=_0x182079;}async['addComment'](_0x646c14){const _0x120ab6=_0x45e79d;var _0x4636d1,_0x13d507;const {parentId:_0xf25a90,unitId:_0x7f6388,text:_0x13a816,threadId:_0x5d043e}=_0x646c14,_0x2c3871=(_0x13d507=(_0x4636d1=_0x13a816['customRanges'])==null?void 0x0:_0x4636d1[_0x120ab6(0x231)](_0x7ffb73=>_0x7ffb73['rangeType']===_0x134576[_0x120ab6(0x217)])[_0x120ab6(0x1f8)](_0x3e38c4=>_0x3e38c4[_0x120ab6(0x22e)]))!=null?_0x13d507:[],_0x206981=JSON[_0x120ab6(0x22c)](_0x13a816),_0x28de5e=(await this['_sessionService']['requireSession'](_0x7f6388))['getMemberID']();if(_0xf25a90){const _0x19a187={'memberId':_0x28de5e,'unitId':_0x7f6388,'content':_0x206981,'mention':_0x2c3871,'threadId':_0x5d043e},_0x24af06=(await this['_httpService']['post'](_0x120ab6(0x1f3)+_0x7f6388+_0x120ab6(0x21c),{'body':_0x19a187}))['body']['reply'];return{..._0x646c14,'id':_0x24af06[_0x120ab6(0x21d)],'dT':_0x20cf44(+_0x24af06[_0x120ab6(0x213)])[_0x120ab6(0x239)](_0x120ab6(0x23c)),'personId':_0x24af06[_0x120ab6(0x208)]};}else{const _0x1f76a7={'memberId':_0x28de5e,'unitId':_0x7f6388,'content':_0x206981,'mention':_0x2c3871},_0x5d2403=await this[_0x120ab6(0x228)]['post'](_0x120ab6(0x1f3)+_0x7f6388+_0x120ab6(0x20d),{'body':_0x1f76a7});return X(_0x5d2403['body'][_0x120ab6(0x226)],_0x646c14);}}async['updateComment'](_0x35fbdf){const _0x3ed812=_0x45e79d;var _0x59db28,_0x42ef0f;const {text:_0x235d2f,unitId:_0x912d8}=_0x35fbdf,_0x14828f=(_0x42ef0f=(_0x59db28=_0x235d2f['customRanges'])==null?void 0x0:_0x59db28[_0x3ed812(0x231)](_0x558492=>_0x558492[_0x3ed812(0x22d)]===_0x134576[_0x3ed812(0x217)])[_0x3ed812(0x1f8)](_0x53aea6=>_0x53aea6[_0x3ed812(0x22e)]))!=null?_0x42ef0f:[],_0x3486ce=JSON['stringify'](_0x235d2f),_0x16904e=_0x35fbdf[_0x3ed812(0x20b)],_0x4aa509=_0x35fbdf['id'],_0x197e78={'memberId':(await this['_sessionService'][_0x3ed812(0x1e9)](_0x912d8))['getMemberID'](),'unitId':_0x912d8,'threadId':_0x16904e,'mention':_0x14828f,'content':_0x3486ce,'replyId':_0x4aa509},_0x2601a6=await this['_httpService'][_0x3ed812(0x218)](_0x3ed812(0x1f3)+_0x912d8+_0x3ed812(0x23f),{'body':_0x197e78});return!_0x2601a6['body']['error']||_0x2601a6['body'][_0x3ed812(0x1f0)][_0x3ed812(0x224)]===0x1;}async[_0x45e79d(0x236)](_0x1511f8){const _0xb99a83=_0x45e79d,{unitId:_0x27cf5e}=_0x1511f8,_0x1cfdf7=_0x1511f8[_0xb99a83(0x20b)],_0x3afe30={'memberId':this[_0xb99a83(0x21b)][_0xb99a83(0x24a)]()[_0xb99a83(0x201)],'unitId':_0x27cf5e,'threadId':_0x1cfdf7,'solved':_0x1511f8['resolved']?I[_0xb99a83(0x237)]:I['OpenOrReOpen']},_0x575620=await this[_0xb99a83(0x228)]['post']('/universer-api/comment/unit/'+_0x27cf5e+'/solved',{'body':_0x3afe30});return!_0x575620[_0xb99a83(0x1fb)]['error']||_0x575620[_0xb99a83(0x1fb)][_0xb99a83(0x1f0)][_0xb99a83(0x224)]===0x1;}async['deleteComment'](_0x201a2c,_0x144c34,_0x4c12fe,_0x3b71de){const _0x26d1f8=_0x45e79d,_0x39b484={'memberId':(await this['_sessionService'][_0x26d1f8(0x1e9)](_0x201a2c))[_0x26d1f8(0x21a)](),'threadId':_0x4c12fe,'replyId':_0x3b71de,'unitId':_0x201a2c},_0x4211d0=await this[_0x26d1f8(0x228)]['post'](_0x26d1f8(0x1f3)+_0x201a2c+_0x26d1f8(0x244),{'body':_0x39b484});return!_0x4211d0[_0x26d1f8(0x1fb)][_0x26d1f8(0x1f0)]||_0x4211d0[_0x26d1f8(0x1fb)]['error'][_0x26d1f8(0x224)]===0x1;}async['listComments'](_0x58df93,_0x4f5c94,_0x4feac3){const _0x5e2aa2=_0x45e79d,_0x1274e4={'unitId':_0x58df93,'threadId':_0x4feac3},_0x96f4f7=await this[_0x5e2aa2(0x228)][_0x5e2aa2(0x218)]('/universer-api/comment/unit/'+_0x58df93+'/list',{'body':_0x1274e4}),_0x58413e=_0x4feac3[_0x5e2aa2(0x1f8)](_0x4f53aa=>ee(_0x96f4f7[_0x5e2aa2(0x1fb)][_0x5e2aa2(0x222)][_0x4f53aa],_0x58df93,_0x4f5c94))[_0x5e2aa2(0x231)](Boolean);return Object[_0x5e2aa2(0x22a)](_0x96f4f7[_0x5e2aa2(0x1fb)][_0x5e2aa2(0x232)])['forEach'](_0x3beb7a=>{const _0x4cd85d=_0x5e2aa2;this[_0x4cd85d(0x21b)][_0x4cd85d(0x246)](_0x3beb7a);}),_0x58413e;}[_0x45e79d(0x1ea)](_0x527c5e){const _0xa630d3=_0x45e79d;return{'id':_0x527c5e['id'],'threadId':_0x527c5e['threadId'],'ref':_0x527c5e[_0xa630d3(0x215)]};}};S=Q([b(0x0,_0x2cfc8b(_0x35314b)),b(0x1,_0x2cfc8b(_0x446986)),b(0x2,_0x2cfc8b(_0xf34cc1))],S);var re=Object[_0x45e79d(0x209)],te=(_0x272640,_0x1a75c0,_0x52c20c,_0x495a87)=>{for(var _0x448efb=_0x495a87>0x1?void 0x0:_0x495a87?re(_0x1a75c0,_0x52c20c):_0x1a75c0,_0x397b1b=_0x272640['length']-0x1,_0x154fbc;_0x397b1b>=0x0;_0x397b1b--)(_0x154fbc=_0x272640[_0x397b1b])&&(_0x448efb=_0x154fbc(_0x448efb)||_0x448efb);return _0x448efb;},M=(_0x4e7159,_0x36dc7f)=>(_0x4837ca,_0x2c30fb)=>_0x36dc7f(_0x4837ca,_0x2c30fb,_0x4e7159);let f=class extends _0x70462f{constructor(_0x54446e,_0x1c865a){const _0x33b167=_0x45e79d;super(),this[_0x33b167(0x24b)]=_0x54446e,this[_0x33b167(0x1f9)]=_0x1c865a,this[_0x33b167(0x1e7)]();}[_0x45e79d(0x1e7)](){const _0x418e11=_0x45e79d;this[_0x418e11(0x24b)][_0x418e11(0x23a)]=this[_0x418e11(0x1f9)],this[_0x418e11(0x24b)][_0x418e11(0x202)]=!0x1;}};function _0x9908(_0x4cf7be,_0x24579c){_0x4cf7be=_0x4cf7be-0x1e6;const _0x5db25d=_0x5db2();let _0x99089b=_0x5db25d[_0x4cf7be];return _0x99089b;}f=te([M(0x0,_0x21999a),M(0x1,_0x2cfc8b(S))],f);var se=Object[_0x45e79d(0x210)],oe=Object[_0x45e79d(0x209)],ne=(_0x5f2083,_0x56cd37,_0x454747)=>_0x56cd37 in _0x5f2083?se(_0x5f2083,_0x56cd37,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x454747}):_0x5f2083[_0x56cd37]=_0x454747,ie=(_0x3e9d24,_0x5f0a04,_0x4dc1ac,_0xd5cb6e)=>{const _0x467161=_0x45e79d;for(var _0x278aaf=_0xd5cb6e>0x1?void 0x0:_0xd5cb6e?oe(_0x5f0a04,_0x4dc1ac):_0x5f0a04,_0x21d522=_0x3e9d24[_0x467161(0x204)]-0x1,_0xe8e24e;_0x21d522>=0x0;_0x21d522--)(_0xe8e24e=_0x3e9d24[_0x21d522])&&(_0x278aaf=_0xe8e24e(_0x278aaf)||_0x278aaf);return _0x278aaf;},N=(_0x23efb4,_0x204add)=>(_0x3b7dc6,_0x53b270)=>_0x204add(_0x3b7dc6,_0x53b270,_0x23efb4),$=(_0x261f9b,_0x4b2b43,_0x3e5f74)=>ne(_0x261f9b,typeof _0x4b2b43!=_0x45e79d(0x221)?_0x4b2b43+'':_0x4b2b43,_0x3e5f74);let g=class extends _0xb90f85{constructor(_0x14781b=O,_0xd09ca6,_0x25a174){const _0xe62fa1=_0x45e79d;super(),this[_0xe62fa1(0x203)]=_0x14781b,this[_0xe62fa1(0x223)]=_0xd09ca6,this[_0xe62fa1(0x211)]=_0x25a174;const {..._0x5a2a3a}=_0x346483({},O,this[_0xe62fa1(0x203)]);this['_configService'][_0xe62fa1(0x241)](z,_0x5a2a3a);}[_0x45e79d(0x214)](){const _0x449411=_0x45e79d;[[S],[f],[_]][_0x449411(0x242)](_0x3ff8c6=>{const _0x47ec58=_0x449411;this[_0x47ec58(0x223)][_0x47ec58(0x229)](_0x3ff8c6);});}['onReady'](){const _0x4f971c=_0x45e79d;this[_0x4f971c(0x223)][_0x4f971c(0x240)](f),this['_injector'][_0x4f971c(0x240)](_);}};$(g,_0x45e79d(0x216),W),$(g,_0x45e79d(0x22b),_0x14136f[_0x45e79d(0x20e)]),g=ie([_0x14b24(_0x36ad3c,_0x27e6ee,_0x344deb),N(0x1,_0x2cfc8b(_0x251dc0)),N(0x2,_0x54f232)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x5db2(){const _0x2e6824=['getMemberID','_userService','/reply','replyId','_init','disposeWithMe','_initUserSync','symbol','comments','_injector','code','commentUpdate$','comment','content','_httpService','add','values','type','stringify','rangeType','rangeId','Solve','268441iCMlPc','filter','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replies','slice','resolveComment','Solved','delete','format','dataSource','_threadCommentModel','YYYY/MM/DD\x20HH:mm','61505jxMuWm','getComment','/edit','get','setConfig','forEach','Unknown','/delete','payload','addUser','root','2nXIFOh','OpenOrReOpen','getCurrentUser','_threadCommentDataSourceService','Reply','_initDataSource','364777goqrnl','requireSession','saveCommentToSnapshot','/universer-api/user/list','find','78CYZoPm','parse','Add','error','getUnit','770982WnjuBe','/universer-api/comment/unit/','solved','Edit','getUser','19415dZAbsM','map','_threadCommentDataSource','1301888FxTeUZ','body','190NaCjko','deleteComment','50121spRFhw','parentId','_sessionService','userID','syncUpdateMutationToColla','_config','length','addComment','unitId','UNRECOGNIZED','userId','getOwnPropertyDescriptor','updateComment','threadId','Delete','/add','UNIVER_UNKNOWN','subscribe','defineProperty','_configService','personId','createTimestamp','onStarting','ref','pluginName','COMMENT','post','40ZHdNeH'];_0x5db2=function(){return _0x2e6824;};return _0x5db2();}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x430339=_0x29df;(function(_0x5cbf55,_0x48d232){const _0x52f4c4=_0x29df,_0x1afc3c=_0x5cbf55();while(!![]){try{const _0x263434=parseInt(_0x52f4c4(0xa2))/0x1*(parseInt(_0x52f4c4(0xb8))/0x2)+parseInt(_0x52f4c4(0xc2))/0x3*(-parseInt(_0x52f4c4(0xb1))/0x4)+parseInt(_0x52f4c4(0xcb))/0x5+-parseInt(_0x52f4c4(0xf8))/0x6*(-parseInt(_0x52f4c4(0x9e))/0x7)+parseInt(_0x52f4c4(0xbd))/0x8*(-parseInt(_0x52f4c4(0xf9))/0x9)+parseInt(_0x52f4c4(0xba))/0xa+parseInt(_0x52f4c4(0xcf))/0xb*(parseInt(_0x52f4c4(0xb9))/0xc);if(_0x263434===_0x48d232)break;else _0x1afc3c['push'](_0x1afc3c['shift']());}catch(_0x134c22){_0x1afc3c['push'](_0x1afc3c['shift']());}}}(_0x342d,0x20482));import{CommentService as _0x4f2985,CollaborationSessionService as _0x11cde2,UniverCollaborationClientPlugin as _0x2663f6}from'@univerjs-pro/collaboration-client';function _0x342d(){const _0x167208=['replyId','_injector','delete','comment','format','deleteComment','stringify','_threadCommentModel','solved','_config','_init','commentUpdate$','12oMbOVA','603fwZcnw','COMMENT','dataSource','addComment','threadId','resolveComment','_threadCommentDataSource','code','getOwnPropertyDescriptor','user','/list','/delete','Reply','285628gxOFnl','_sessionService','Solve','content','97bNoncc','userID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','getUser','parse','body','payload','_initDataSource','Add','users','rangeType','_initUserSync','_httpService','OpenOrReOpen','242188zgyTEA','userId','/solved','defineProperty','add','error','_configService','402iKuuBE','279132ioqqVI','1903000qCrZYu','setConfig','getUnit','18040FYrbio','subscribe','filter','slice','map','3tIqdfH','get','post','createTimestamp','onReady','requireSession','length','find','getMemberID','29655XkNkSp','forEach','Delete','reply','22ZAewfg','values','Solved','UNRECOGNIZED','type','/universer-api/user/list','onStarting','resolved','syncUpdateMutationToColla','getComment','thread-comment-data-source.config','parentId','_threadCommentDataSourceService','replies','comments','UNIVER_UNKNOWN','unitId','rangeId','pluginName','root','pipe','_commentService','_userService','updateComment','customRanges','addUser','Unknown','/edit','/universer-api/comment/unit/'];_0x342d=function(){return _0x167208;};return _0x342d();}import{UniverLicensePlugin as _0x13710b}from'@univerjs-pro/license';import{dayjs as _0x482a8a,UserManagerService as _0x3c7f05,Inject as _0x284561,Injector as _0x42cc06,Disposable as _0x50a3fb,CustomRangeType as _0x3efa19,UniverInstanceType as _0x4be0da,DependentOn as _0x4af44e,Plugin as _0x28c80c,merge as _0x362468,IConfigService as _0x4dbdea}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x116fe9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cb6ce,IThreadCommentDataSourceService as _0x401660}from'@univerjs/thread-comment';import{bufferTime as _0x5ab57d}from'rxjs';import{HTTPService as _0x2e9b77}from'@univerjs/network';const W=_0x430339(0xa4);var I=(_0x1dbd1d=>(_0x1dbd1d[_0x1dbd1d[_0x430339(0xb0)]=0x0]=_0x430339(0xb0),_0x1dbd1d[_0x1dbd1d[_0x430339(0xd1)]=0x1]=_0x430339(0xd1),_0x1dbd1d[_0x1dbd1d[_0x430339(0xd2)]=-0x1]=_0x430339(0xd2),_0x1dbd1d))(I||{}),v=(_0x2d04d9=>(_0x2d04d9[_0x2d04d9[_0x430339(0xe9)]=0x0]=_0x430339(0xe9),_0x2d04d9[_0x2d04d9[_0x430339(0xab)]=0x1]=_0x430339(0xab),_0x2d04d9[_0x2d04d9[_0x430339(0x9d)]=0x2]=_0x430339(0x9d),_0x2d04d9[_0x2d04d9['Edit']=0x3]=_0x430339(0xa5),_0x2d04d9[_0x2d04d9['Delete']=0x4]=_0x430339(0xcd),_0x2d04d9[_0x2d04d9['Solve']=0x5]=_0x430339(0xa0),_0x2d04d9[_0x2d04d9[_0x430339(0xd2)]=-0x1]=_0x430339(0xd2),_0x2d04d9))(v||{});const y=_0x359ae5=>_0x482a8a(new Date(+_0x359ae5))[_0x430339(0xf0)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x16cea7,_0x156b5b)=>{const _0x350cb7=_0x430339,_0x133d81=_0x16cea7[_0x350cb7(0xc3)](_0x3c7f05),_0x40f182=_0x16cea7['get'](_0x2e9b77);_0x156b5b['forEach'](_0x16881c=>{const _0x3aed0f=_0x350cb7;_0x133d81[_0x3aed0f(0xa6)](_0x16881c)&&_0x156b5b[_0x3aed0f(0xee)](_0x16881c);}),_0x156b5b['size']&&(await _0x40f182[_0x350cb7(0xc3)](_0x350cb7(0xd4),{'params':{'userIDs':[..._0x156b5b]}}))[_0x350cb7(0xa8)][_0x350cb7(0xac)][_0x350cb7(0xcc)](_0x69280d=>{const _0x41f293=_0x350cb7;_0x69280d&&_0x133d81[_0x41f293(0xe8)](_0x69280d);});};var K=Object[_0x430339(0x99)],V=(_0x3402e0,_0x1857a6,_0xc3572a,_0x10c23c)=>{const _0x2f3a2d=_0x430339;for(var _0x436a7a=_0x10c23c>0x1?void 0x0:_0x10c23c?K(_0x1857a6,_0xc3572a):_0x1857a6,_0x334a2d=_0x3402e0[_0x2f3a2d(0xc8)]-0x1,_0x2b7e38;_0x334a2d>=0x0;_0x334a2d--)(_0x2b7e38=_0x3402e0[_0x334a2d])&&(_0x436a7a=_0x2b7e38(_0x436a7a)||_0x436a7a);return _0x436a7a;},p=(_0x4b1c7e,_0x100287)=>(_0x4ebeb4,_0x899d41)=>_0x100287(_0x4ebeb4,_0x899d41,_0x4b1c7e);let _=class extends _0x50a3fb{constructor(_0x208135,_0x3b69ce,_0x104d78,_0x2af8c6){const _0x3ac60e=_0x430339;super(),this['_commentService']=_0x208135,this['_threadCommentModel']=_0x3b69ce,this[_0x3ac60e(0xe5)]=_0x104d78,this['_injector']=_0x2af8c6,this['_init'](),this['_initUserSync']();}[_0x430339(0xae)](){const _0xbafe6e=_0x430339;this['disposeWithMe'](this['_threadCommentModel'][_0xbafe6e(0xf7)][_0xbafe6e(0xe3)](_0x5ab57d(0x10))[_0xbafe6e(0xbe)](_0x124065=>{const _0x1d9ebb=_0xbafe6e,_0x293812=new Set();_0x124065['forEach'](_0xb03f72=>{const _0x220e2e=_0x29df;if(_0xb03f72[_0x220e2e(0xd3)]===_0x220e2e(0xb5)){const _0x127e09=_0xb03f72[_0x220e2e(0xa9)]['personId'];_0x293812[_0x220e2e(0xb5)](_0x127e09);}}),B(this[_0x1d9ebb(0xed)],_0x293812);}));}[_0x430339(0xf6)](){const _0x324099=_0x430339;this['disposeWithMe'](this[_0x324099(0xe4)][_0x324099(0xf7)][_0x324099(0xbe)](async _0x56783b=>{const _0x4287e9=_0x324099;var _0x427263,_0x5d1e04,_0x183ff2,_0x44544e;const _0x30ef30=(_0x427263=this[_0x4287e9(0xf3)][_0x4287e9(0xbc)](_0x56783b[_0x4287e9(0xdf)])[_0x4287e9(0xc9)](_0x3f47a7=>_0x3f47a7[_0x4287e9(0x95)]===_0x56783b[_0x4287e9(0x95)]))==null?void 0x0:_0x427263[_0x4287e9(0xe2)];if(!_0x30ef30)return;const {unitId:_0x2db6f8,subUnitId:_0x20b93c}=_0x30ef30;switch(_0x56783b[_0x4287e9(0x9a)]&&this[_0x4287e9(0xe5)][_0x4287e9(0xe8)](_0x56783b[_0x4287e9(0x9a)]),_0x56783b['type']){case v[_0x4287e9(0xab)]:break;case v['Reply']:{this[_0x4287e9(0xf3)][_0x4287e9(0x94)](_0x2db6f8,_0x20b93c,{'unitId':_0x2db6f8,'subUnitId':_0x20b93c,'ref':'','id':_0x56783b[_0x4287e9(0xec)],'dT':y(+_0x56783b[_0x4287e9(0xc5)]),'threadId':_0x56783b[_0x4287e9(0x95)],'personId':(_0x183ff2=(_0x5d1e04=_0x56783b['user'])==null?void 0x0:_0x5d1e04[_0x4287e9(0xa3)])!=null?_0x183ff2:_0x56783b[_0x4287e9(0xb2)],'text':JSON['parse'](_0x56783b[_0x4287e9(0xa1)]),'parentId':_0x30ef30['id']});break;}case v[_0x4287e9(0xcd)]:{const _0x2509b2=this['_threadCommentModel'][_0x4287e9(0xd8)](_0x2db6f8,_0x20b93c,_0x56783b['replyId']);_0x2509b2&&_0x2509b2[_0x4287e9(0xda)]&&this[_0x4287e9(0xf3)][_0x4287e9(0xf1)](_0x2db6f8,_0x20b93c,_0x56783b['replyId']);break;}case v[_0x4287e9(0xa5)]:{this[_0x4287e9(0xf3)][_0x4287e9(0xe6)](_0x2db6f8,_0x20b93c,{'commentId':_0x56783b['replyId'],'text':JSON[_0x4287e9(0xa7)](_0x56783b[_0x4287e9(0xa1)])});break;}case v[_0x4287e9(0xa0)]:{const _0x476a7f=(_0x44544e=this[_0x4287e9(0xf3)][_0x4287e9(0xbc)](_0x56783b[_0x4287e9(0xdf)])[_0x4287e9(0xc9)](_0x84199b=>_0x84199b['threadId']===_0x56783b[_0x4287e9(0x95)]))==null?void 0x0:_0x44544e['root'];_0x476a7f&&this[_0x4287e9(0xf3)][_0x4287e9(0x96)](_0x2db6f8,_0x20b93c,_0x476a7f['id'],_0x56783b[_0x4287e9(0xf4)]===I[_0x4287e9(0xd1)]);break;}}}));}};_=V([p(0x0,_0x284561(_0x4f2985)),p(0x1,_0x284561(_0x2cb6ce)),p(0x2,_0x284561(_0x3c7f05)),p(0x3,_0x284561(_0x42cc06))],_);const z=_0x430339(0xd9),O={};var k=Object[_0x430339(0x99)],Q=(_0x3b9948,_0x589236,_0x34104b,_0x5880a1)=>{const _0x5ab75c=_0x430339;for(var _0x35683a=_0x5880a1>0x1?void 0x0:_0x5880a1?k(_0x589236,_0x34104b):_0x589236,_0x19aa7b=_0x3b9948[_0x5ab75c(0xc8)]-0x1,_0x5d4062;_0x19aa7b>=0x0;_0x19aa7b--)(_0x5d4062=_0x3b9948[_0x19aa7b])&&(_0x35683a=_0x5d4062(_0x35683a)||_0x35683a);return _0x35683a;},b=(_0x559dcb,_0x303e8)=>(_0x3a7406,_0x15c885)=>_0x303e8(_0x3a7406,_0x15c885,_0x559dcb);function X(_0x1131f3,_0x57c5a5){const _0x19caec=_0x430339,_0x6ea603=_0x1131f3[_0x19caec(0xdc)][0x0];return{..._0x57c5a5,'id':_0x6ea603[_0x19caec(0xec)],'resolved':_0x1131f3[_0x19caec(0xf4)]===0x1,'dT':y(_0x6ea603[_0x19caec(0xc5)]),'personId':_0x6ea603[_0x19caec(0xb2)],'threadId':_0x6ea603[_0x19caec(0x95)]};}function ee(_0xbdc744,_0x4841c7,_0x206a33){const _0x5c77de=_0x430339;var _0x344a18,_0x5d55bd;if(((_0x5d55bd=(_0x344a18=_0xbdc744==null?void 0x0:_0xbdc744['replies'])==null?void 0x0:_0x344a18['length'])!=null?_0x5d55bd:0x0)>0x0){const _0x46bd93=(_0x1832d5,_0x2bb14d)=>({'id':_0x1832d5['replyId'],'threadId':_0x1832d5[_0x5c77de(0x95)],'dT':y(_0x1832d5[_0x5c77de(0xc5)]),'personId':_0x1832d5[_0x5c77de(0xb2)],'resolved':_0xbdc744[_0x5c77de(0xf4)]===I['Solved'],'unitId':_0x4841c7,'subUnitId':_0x206a33,'text':JSON[_0x5c77de(0xa7)](_0x1832d5['content']),'parentId':_0x2bb14d}),_0x276909=_0x46bd93(_0xbdc744[_0x5c77de(0xdc)][0x0]);return{..._0x276909,'children':_0xbdc744['replies'][_0x5c77de(0xc0)](0x1)[_0x5c77de(0xc1)](_0x226d9c=>_0x46bd93(_0x226d9c,_0x276909['id']))};}return null;}let S=class{constructor(_0x53e238,_0x389ea5,_0x50741a){const _0x2f0ba3=_0x430339;this[_0x2f0ba3(0xaf)]=_0x53e238,this[_0x2f0ba3(0xe5)]=_0x389ea5,this['_sessionService']=_0x50741a;}async[_0x430339(0x94)](_0x39f384){const _0x5d6316=_0x430339;var _0x5d0fbb,_0x4f1852;const {parentId:_0x21ce8e,unitId:_0x5dd2ba,text:_0x420ce0,threadId:_0xb5bca0}=_0x39f384,_0x3009cb=(_0x4f1852=(_0x5d0fbb=_0x420ce0[_0x5d6316(0xe7)])==null?void 0x0:_0x5d0fbb[_0x5d6316(0xbf)](_0x1bd4af=>_0x1bd4af['rangeType']===_0x3efa19[_0x5d6316(0x92)])['map'](_0x329ec3=>_0x329ec3[_0x5d6316(0xe0)]))!=null?_0x4f1852:[],_0x1018cc=JSON[_0x5d6316(0xf2)](_0x420ce0),_0x198825=(await this[_0x5d6316(0x9f)]['requireSession'](_0x5dd2ba))[_0x5d6316(0xca)]();if(_0x21ce8e){const _0x393cb9={'memberId':_0x198825,'unitId':_0x5dd2ba,'content':_0x1018cc,'mention':_0x3009cb,'threadId':_0xb5bca0},_0x53c2b5=(await this[_0x5d6316(0xaf)][_0x5d6316(0xc4)](_0x5d6316(0xeb)+_0x5dd2ba+'/reply',{'body':_0x393cb9}))[_0x5d6316(0xa8)][_0x5d6316(0xce)];return{..._0x39f384,'id':_0x53c2b5[_0x5d6316(0xec)],'dT':_0x482a8a(+_0x53c2b5[_0x5d6316(0xc5)])[_0x5d6316(0xf0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x53c2b5[_0x5d6316(0xb2)]};}else{const _0x56a001={'memberId':_0x198825,'unitId':_0x5dd2ba,'content':_0x1018cc,'mention':_0x3009cb},_0x54ae32=await this['_httpService'][_0x5d6316(0xc4)](_0x5d6316(0xeb)+_0x5dd2ba+'/add',{'body':_0x56a001});return X(_0x54ae32[_0x5d6316(0xa8)][_0x5d6316(0xef)],_0x39f384);}}async[_0x430339(0xe6)](_0x4e8f44){const _0x2982ee=_0x430339;var _0x251172,_0xb2003a;const {text:_0x14d4db,unitId:_0x42b645}=_0x4e8f44,_0x2ee766=(_0xb2003a=(_0x251172=_0x14d4db[_0x2982ee(0xe7)])==null?void 0x0:_0x251172[_0x2982ee(0xbf)](_0x59e8e9=>_0x59e8e9[_0x2982ee(0xad)]===_0x3efa19[_0x2982ee(0x92)])[_0x2982ee(0xc1)](_0x3307f4=>_0x3307f4['rangeId']))!=null?_0xb2003a:[],_0x4020db=JSON[_0x2982ee(0xf2)](_0x14d4db),_0x3fbd33=_0x4e8f44[_0x2982ee(0x95)],_0x153e28=_0x4e8f44['id'],_0x1bc436={'memberId':(await this[_0x2982ee(0x9f)][_0x2982ee(0xc7)](_0x42b645))[_0x2982ee(0xca)](),'unitId':_0x42b645,'threadId':_0x3fbd33,'mention':_0x2ee766,'content':_0x4020db,'replyId':_0x153e28},_0x57b5ee=await this[_0x2982ee(0xaf)][_0x2982ee(0xc4)](_0x2982ee(0xeb)+_0x42b645+_0x2982ee(0xea),{'body':_0x1bc436});return!_0x57b5ee[_0x2982ee(0xa8)][_0x2982ee(0xb6)]||_0x57b5ee[_0x2982ee(0xa8)][_0x2982ee(0xb6)][_0x2982ee(0x98)]===0x1;}async[_0x430339(0x96)](_0x30bf2e){const _0x4cfac9=_0x430339,{unitId:_0x1982fa}=_0x30bf2e,_0x29b696=_0x30bf2e[_0x4cfac9(0x95)],_0x3ff65e={'memberId':this[_0x4cfac9(0xe5)]['getCurrentUser']()[_0x4cfac9(0xa3)],'unitId':_0x1982fa,'threadId':_0x29b696,'solved':_0x30bf2e[_0x4cfac9(0xd6)]?I['Solved']:I[_0x4cfac9(0xb0)]},_0x24b0ef=await this['_httpService'][_0x4cfac9(0xc4)](_0x4cfac9(0xeb)+_0x1982fa+_0x4cfac9(0xb3),{'body':_0x3ff65e});return!_0x24b0ef['body'][_0x4cfac9(0xb6)]||_0x24b0ef[_0x4cfac9(0xa8)][_0x4cfac9(0xb6)]['code']===0x1;}async['deleteComment'](_0x1dacb6,_0x1ed653,_0x4b3bae,_0x4ee5e6){const _0x306483=_0x430339,_0x195549={'memberId':(await this['_sessionService'][_0x306483(0xc7)](_0x1dacb6))[_0x306483(0xca)](),'threadId':_0x4b3bae,'replyId':_0x4ee5e6,'unitId':_0x1dacb6},_0x174573=await this[_0x306483(0xaf)][_0x306483(0xc4)](_0x306483(0xeb)+_0x1dacb6+_0x306483(0x9c),{'body':_0x195549});return!_0x174573['body'][_0x306483(0xb6)]||_0x174573[_0x306483(0xa8)]['error'][_0x306483(0x98)]===0x1;}async['listComments'](_0x2ec94c,_0x322a0a,_0x11a264){const _0x2190db=_0x430339,_0x4ae08f={'unitId':_0x2ec94c,'threadId':_0x11a264},_0x13193b=await this[_0x2190db(0xaf)]['post'](_0x2190db(0xeb)+_0x2ec94c+_0x2190db(0x9b),{'body':_0x4ae08f}),_0x5b586e=_0x11a264[_0x2190db(0xc1)](_0x3f4bf9=>ee(_0x13193b[_0x2190db(0xa8)][_0x2190db(0xdd)][_0x3f4bf9],_0x2ec94c,_0x322a0a))['filter'](Boolean);return Object[_0x2190db(0xd0)](_0x13193b[_0x2190db(0xa8)][_0x2190db(0xac)])[_0x2190db(0xcc)](_0x5396cc=>{const _0x291ff1=_0x2190db;this[_0x291ff1(0xe5)]['addUser'](_0x5396cc);}),_0x5b586e;}['saveCommentToSnapshot'](_0x41a4f8){const _0x21b598=_0x430339;return{'id':_0x41a4f8['id'],'threadId':_0x41a4f8[_0x21b598(0x95)],'ref':_0x41a4f8['ref']};}};S=Q([b(0x0,_0x284561(_0x2e9b77)),b(0x1,_0x284561(_0x3c7f05)),b(0x2,_0x284561(_0x11cde2))],S);var re=Object[_0x430339(0x99)],te=(_0x4622ca,_0x56c3f,_0x5a89e3,_0x499b51)=>{const _0x50d62e=_0x430339;for(var _0x40d10a=_0x499b51>0x1?void 0x0:_0x499b51?re(_0x56c3f,_0x5a89e3):_0x56c3f,_0xedc17d=_0x4622ca[_0x50d62e(0xc8)]-0x1,_0x483f84;_0xedc17d>=0x0;_0xedc17d--)(_0x483f84=_0x4622ca[_0xedc17d])&&(_0x40d10a=_0x483f84(_0x40d10a)||_0x40d10a);return _0x40d10a;},M=(_0x259df9,_0x411da4)=>(_0x38fa9c,_0x2a8a20)=>_0x411da4(_0x38fa9c,_0x2a8a20,_0x259df9);function _0x29df(_0x219580,_0xd2b0af){_0x219580=_0x219580-0x92;const _0x342d5b=_0x342d();let _0x29df42=_0x342d5b[_0x219580];return _0x29df42;}let f=class extends _0x50a3fb{constructor(_0x375f80,_0x52e351){super(),this['_threadCommentDataSourceService']=_0x375f80,this['_threadCommentDataSource']=_0x52e351,this['_initDataSource']();}[_0x430339(0xaa)](){const _0x5f1526=_0x430339;this[_0x5f1526(0xdb)][_0x5f1526(0x93)]=this[_0x5f1526(0x97)],this[_0x5f1526(0xdb)][_0x5f1526(0xd7)]=!0x1;}};f=te([M(0x0,_0x401660),M(0x1,_0x284561(S))],f);var se=Object[_0x430339(0xb4)],oe=Object[_0x430339(0x99)],ne=(_0x3f9c87,_0xd76f44,_0x55489c)=>_0xd76f44 in _0x3f9c87?se(_0x3f9c87,_0xd76f44,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55489c}):_0x3f9c87[_0xd76f44]=_0x55489c,ie=(_0x259a7b,_0x574d57,_0x2f6f5e,_0x5e2998)=>{const _0x268a03=_0x430339;for(var _0x2978da=_0x5e2998>0x1?void 0x0:_0x5e2998?oe(_0x574d57,_0x2f6f5e):_0x574d57,_0x4a192f=_0x259a7b[_0x268a03(0xc8)]-0x1,_0x3c8c45;_0x4a192f>=0x0;_0x4a192f--)(_0x3c8c45=_0x259a7b[_0x4a192f])&&(_0x2978da=_0x3c8c45(_0x2978da)||_0x2978da);return _0x2978da;},N=(_0x50db3c,_0x396c30)=>(_0x44cd32,_0x4be6f5)=>_0x396c30(_0x44cd32,_0x4be6f5,_0x50db3c),$=(_0x2a8fa2,_0x8f8dc2,_0x4464d5)=>ne(_0x2a8fa2,typeof _0x8f8dc2!='symbol'?_0x8f8dc2+'':_0x8f8dc2,_0x4464d5);let g=class extends _0x28c80c{constructor(_0x1a3b81=O,_0x505733,_0x2bd0aa){const _0x2a44c2=_0x430339;super(),this[_0x2a44c2(0xf5)]=_0x1a3b81,this['_injector']=_0x505733,this[_0x2a44c2(0xb7)]=_0x2bd0aa;const {..._0x4bee3d}=_0x362468({},O,this[_0x2a44c2(0xf5)]);this[_0x2a44c2(0xb7)][_0x2a44c2(0xbb)](z,_0x4bee3d);}[_0x430339(0xd5)](){[[S],[f],[_]]['forEach'](_0x15b678=>{const _0x54e939=_0x29df;this[_0x54e939(0xed)][_0x54e939(0xb5)](_0x15b678);});}[_0x430339(0xc6)](){const _0xc06215=_0x430339;this['_injector'][_0xc06215(0xc3)](f),this[_0xc06215(0xed)]['get'](_);}};$(g,_0x430339(0xe1),W),$(g,_0x430339(0xd3),_0x4be0da[_0x430339(0xde)]),g=ie([_0x4af44e(_0x116fe9,_0x2663f6,_0x13710b),N(0x1,_0x284561(_0x42cc06)),N(0x2,_0x4dbdea)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x45e79d=_0x9908;(function(_0x4a2f4b,_0x494ac3){const _0x2c06b1=_0x9908,_0x5d32fd=_0x4a2f4b();while(!![]){try{const _0xffcefb=-parseInt(_0x2c06b1(0x230))/0x1+-parseInt(_0x2c06b1(0x248))/0x2*(-parseInt(_0x2c06b1(0x1f2))/0x3)+parseInt(_0x2c06b1(0x1fa))/0x4+-parseInt(_0x2c06b1(0x23d))/0x5*(parseInt(_0x2c06b1(0x1ed))/0x6)+-parseInt(_0x2c06b1(0x1e8))/0x7+-parseInt(_0x2c06b1(0x219))/0x8*(-parseInt(_0x2c06b1(0x1fe))/0x9)+-parseInt(_0x2c06b1(0x1fc))/0xa*(-parseInt(_0x2c06b1(0x1f7))/0xb);if(_0xffcefb===_0x494ac3)break;else _0x5d32fd['push'](_0x5d32fd['shift']());}catch(_0x2427ff){_0x5d32fd['push'](_0x5d32fd['shift']());}}}(_0x5db2,0x27e35));import{CommentService as _0x1f2b80,CollaborationSessionService as _0xf34cc1,UniverCollaborationClientPlugin as _0x27e6ee}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x344deb}from'@univerjs-pro/license';import{dayjs as _0x20cf44,UserManagerService as _0x446986,Inject as _0x2cfc8b,Injector as _0x251dc0,Disposable as _0x70462f,CustomRangeType as _0x134576,UniverInstanceType as _0x14136f,DependentOn as _0x14b24,Plugin as _0xb90f85,merge as _0x346483,IConfigService as _0x54f232}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36ad3c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x36d4d7,IThreadCommentDataSourceService as _0x21999a}from'@univerjs/thread-comment';import{bufferTime as _0x31ded4}from'rxjs';import{HTTPService as _0x35314b}from'@univerjs/network';const W=_0x45e79d(0x233);var I=(_0x45cd17=>(_0x45cd17[_0x45cd17[_0x45e79d(0x249)]=0x0]=_0x45e79d(0x249),_0x45cd17[_0x45cd17[_0x45e79d(0x237)]=0x1]='Solved',_0x45cd17[_0x45cd17[_0x45e79d(0x207)]=-0x1]=_0x45e79d(0x207),_0x45cd17))(I||{}),v=(_0x48c451=>(_0x48c451[_0x48c451[_0x45e79d(0x243)]=0x0]=_0x45e79d(0x243),_0x48c451[_0x48c451[_0x45e79d(0x1ef)]=0x1]=_0x45e79d(0x1ef),_0x48c451[_0x48c451[_0x45e79d(0x1e6)]=0x2]='Reply',_0x48c451[_0x48c451['Edit']=0x3]='Edit',_0x48c451[_0x48c451['Delete']=0x4]=_0x45e79d(0x20c),_0x48c451[_0x48c451['Solve']=0x5]=_0x45e79d(0x22f),_0x48c451[_0x48c451[_0x45e79d(0x207)]=-0x1]=_0x45e79d(0x207),_0x48c451))(v||{});const y=_0x39eef9=>_0x20cf44(new Date(+_0x39eef9))[_0x45e79d(0x239)](_0x45e79d(0x23c)),B=async(_0x3cbbb5,_0x4eaa12)=>{const _0x225d54=_0x45e79d,_0x5c1bbf=_0x3cbbb5[_0x225d54(0x240)](_0x446986),_0xd1767f=_0x3cbbb5[_0x225d54(0x240)](_0x35314b);_0x4eaa12['forEach'](_0x330cd1=>{const _0x48c27a=_0x225d54;_0x5c1bbf[_0x48c27a(0x1f6)](_0x330cd1)&&_0x4eaa12[_0x48c27a(0x238)](_0x330cd1);}),_0x4eaa12['size']&&(await _0xd1767f[_0x225d54(0x240)](_0x225d54(0x1eb),{'params':{'userIDs':[..._0x4eaa12]}}))[_0x225d54(0x1fb)]['users']['forEach'](_0x486dac=>{const _0x590738=_0x225d54;_0x486dac&&_0x5c1bbf[_0x590738(0x246)](_0x486dac);});};var K=Object[_0x45e79d(0x209)],V=(_0x1ba4bc,_0x20a586,_0x45eaea,_0x22234d)=>{for(var _0x18d15f=_0x22234d>0x1?void 0x0:_0x22234d?K(_0x20a586,_0x45eaea):_0x20a586,_0x1c2173=_0x1ba4bc['length']-0x1,_0x3a62c1;_0x1c2173>=0x0;_0x1c2173--)(_0x3a62c1=_0x1ba4bc[_0x1c2173])&&(_0x18d15f=_0x3a62c1(_0x18d15f)||_0x18d15f);return _0x18d15f;},p=(_0x1db80e,_0x503335)=>(_0x4f77d0,_0x1f04f6)=>_0x503335(_0x4f77d0,_0x1f04f6,_0x1db80e);let _=class extends _0x70462f{constructor(_0x385563,_0x5a4c05,_0x3922ce,_0x27787d){const _0x34a87d=_0x45e79d;super(),this['_commentService']=_0x385563,this[_0x34a87d(0x23b)]=_0x5a4c05,this[_0x34a87d(0x21b)]=_0x3922ce,this['_injector']=_0x27787d,this[_0x34a87d(0x21e)](),this[_0x34a87d(0x220)]();}[_0x45e79d(0x220)](){const _0x754d05=_0x45e79d;this[_0x754d05(0x21f)](this[_0x754d05(0x23b)]['commentUpdate$']['pipe'](_0x31ded4(0x10))[_0x754d05(0x20f)](_0x352d1f=>{const _0x39dbe8=_0x754d05,_0x4f5f4c=new Set();_0x352d1f[_0x39dbe8(0x242)](_0x152b39=>{const _0x4c9146=_0x39dbe8;if(_0x152b39[_0x4c9146(0x22b)]===_0x4c9146(0x229)){const _0xf7eaf5=_0x152b39[_0x4c9146(0x245)][_0x4c9146(0x212)];_0x4f5f4c[_0x4c9146(0x229)](_0xf7eaf5);}}),B(this[_0x39dbe8(0x223)],_0x4f5f4c);}));}[_0x45e79d(0x21e)](){const _0x1cc88e=_0x45e79d;this[_0x1cc88e(0x21f)](this['_commentService'][_0x1cc88e(0x225)]['subscribe'](async _0x1400d9=>{const _0x2f0c63=_0x1cc88e;var _0x12d8c8,_0x4947a2,_0xafde79,_0x327fe3;const _0x438b24=(_0x12d8c8=this[_0x2f0c63(0x23b)][_0x2f0c63(0x1f1)](_0x1400d9[_0x2f0c63(0x206)])[_0x2f0c63(0x1ec)](_0xefecf4=>_0xefecf4[_0x2f0c63(0x20b)]===_0x1400d9[_0x2f0c63(0x20b)]))==null?void 0x0:_0x12d8c8[_0x2f0c63(0x247)];if(!_0x438b24)return;const {unitId:_0x53cc01,subUnitId:_0x578f2f}=_0x438b24;switch(_0x1400d9['user']&&this[_0x2f0c63(0x21b)][_0x2f0c63(0x246)](_0x1400d9['user']),_0x1400d9[_0x2f0c63(0x22b)]){case v[_0x2f0c63(0x1ef)]:break;case v[_0x2f0c63(0x1e6)]:{this['_threadCommentModel'][_0x2f0c63(0x205)](_0x53cc01,_0x578f2f,{'unitId':_0x53cc01,'subUnitId':_0x578f2f,'ref':'','id':_0x1400d9[_0x2f0c63(0x21d)],'dT':y(+_0x1400d9[_0x2f0c63(0x213)]),'threadId':_0x1400d9['threadId'],'personId':(_0xafde79=(_0x4947a2=_0x1400d9['user'])==null?void 0x0:_0x4947a2[_0x2f0c63(0x201)])!=null?_0xafde79:_0x1400d9[_0x2f0c63(0x208)],'text':JSON[_0x2f0c63(0x1ee)](_0x1400d9[_0x2f0c63(0x227)]),'parentId':_0x438b24['id']});break;}case v[_0x2f0c63(0x20c)]:{const _0x39173d=this['_threadCommentModel'][_0x2f0c63(0x23e)](_0x53cc01,_0x578f2f,_0x1400d9[_0x2f0c63(0x21d)]);_0x39173d&&_0x39173d[_0x2f0c63(0x1ff)]&&this[_0x2f0c63(0x23b)][_0x2f0c63(0x1fd)](_0x53cc01,_0x578f2f,_0x1400d9['replyId']);break;}case v[_0x2f0c63(0x1f5)]:{this[_0x2f0c63(0x23b)][_0x2f0c63(0x20a)](_0x53cc01,_0x578f2f,{'commentId':_0x1400d9[_0x2f0c63(0x21d)],'text':JSON[_0x2f0c63(0x1ee)](_0x1400d9['content'])});break;}case v[_0x2f0c63(0x22f)]:{const _0x57b12c=(_0x327fe3=this[_0x2f0c63(0x23b)][_0x2f0c63(0x1f1)](_0x1400d9[_0x2f0c63(0x206)])[_0x2f0c63(0x1ec)](_0x181765=>_0x181765['threadId']===_0x1400d9['threadId']))==null?void 0x0:_0x327fe3[_0x2f0c63(0x247)];_0x57b12c&&this[_0x2f0c63(0x23b)][_0x2f0c63(0x236)](_0x53cc01,_0x578f2f,_0x57b12c['id'],_0x1400d9[_0x2f0c63(0x1f4)]===I[_0x2f0c63(0x237)]);break;}}}));}};_=V([p(0x0,_0x2cfc8b(_0x1f2b80)),p(0x1,_0x2cfc8b(_0x36d4d7)),p(0x2,_0x2cfc8b(_0x446986)),p(0x3,_0x2cfc8b(_0x251dc0))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x9bd358,_0x2b813b,_0x34f7b9,_0x3dade7)=>{const _0xf80a4=_0x45e79d;for(var _0x582275=_0x3dade7>0x1?void 0x0:_0x3dade7?k(_0x2b813b,_0x34f7b9):_0x2b813b,_0x109aef=_0x9bd358[_0xf80a4(0x204)]-0x1,_0x82c707;_0x109aef>=0x0;_0x109aef--)(_0x82c707=_0x9bd358[_0x109aef])&&(_0x582275=_0x82c707(_0x582275)||_0x582275);return _0x582275;},b=(_0x4e7394,_0x365996)=>(_0x298196,_0x363f52)=>_0x365996(_0x298196,_0x363f52,_0x4e7394);function X(_0x1c7308,_0x31829c){const _0x2e4602=_0x45e79d,_0x51aede=_0x1c7308[_0x2e4602(0x234)][0x0];return{..._0x31829c,'id':_0x51aede['replyId'],'resolved':_0x1c7308[_0x2e4602(0x1f4)]===0x1,'dT':y(_0x51aede[_0x2e4602(0x213)]),'personId':_0x51aede['userId'],'threadId':_0x51aede[_0x2e4602(0x20b)]};}function ee(_0x2993b2,_0x9dbc9b,_0x19ae4a){const _0x354fba=_0x45e79d;var _0x2dd9a6,_0x2911f2;if(((_0x2911f2=(_0x2dd9a6=_0x2993b2==null?void 0x0:_0x2993b2['replies'])==null?void 0x0:_0x2dd9a6['length'])!=null?_0x2911f2:0x0)>0x0){const _0x4a50f8=(_0x4e5a77,_0x432c51)=>({'id':_0x4e5a77[_0x354fba(0x21d)],'threadId':_0x4e5a77[_0x354fba(0x20b)],'dT':y(_0x4e5a77[_0x354fba(0x213)]),'personId':_0x4e5a77['userId'],'resolved':_0x2993b2[_0x354fba(0x1f4)]===I['Solved'],'unitId':_0x9dbc9b,'subUnitId':_0x19ae4a,'text':JSON[_0x354fba(0x1ee)](_0x4e5a77[_0x354fba(0x227)]),'parentId':_0x432c51}),_0x5b9b02=_0x4a50f8(_0x2993b2[_0x354fba(0x234)][0x0]);return{..._0x5b9b02,'children':_0x2993b2[_0x354fba(0x234)][_0x354fba(0x235)](0x1)[_0x354fba(0x1f8)](_0x4f1f4e=>_0x4a50f8(_0x4f1f4e,_0x5b9b02['id']))};}return null;}let S=class{constructor(_0x1d4b03,_0x2767f1,_0x182079){const _0x281cb6=_0x45e79d;this[_0x281cb6(0x228)]=_0x1d4b03,this[_0x281cb6(0x21b)]=_0x2767f1,this[_0x281cb6(0x200)]=_0x182079;}async['addComment'](_0x646c14){const _0x120ab6=_0x45e79d;var _0x4636d1,_0x13d507;const {parentId:_0xf25a90,unitId:_0x7f6388,text:_0x13a816,threadId:_0x5d043e}=_0x646c14,_0x2c3871=(_0x13d507=(_0x4636d1=_0x13a816['customRanges'])==null?void 0x0:_0x4636d1[_0x120ab6(0x231)](_0x7ffb73=>_0x7ffb73['rangeType']===_0x134576[_0x120ab6(0x217)])[_0x120ab6(0x1f8)](_0x3e38c4=>_0x3e38c4[_0x120ab6(0x22e)]))!=null?_0x13d507:[],_0x206981=JSON[_0x120ab6(0x22c)](_0x13a816),_0x28de5e=(await this['_sessionService']['requireSession'](_0x7f6388))['getMemberID']();if(_0xf25a90){const _0x19a187={'memberId':_0x28de5e,'unitId':_0x7f6388,'content':_0x206981,'mention':_0x2c3871,'threadId':_0x5d043e},_0x24af06=(await this['_httpService']['post'](_0x120ab6(0x1f3)+_0x7f6388+_0x120ab6(0x21c),{'body':_0x19a187}))['body']['reply'];return{..._0x646c14,'id':_0x24af06[_0x120ab6(0x21d)],'dT':_0x20cf44(+_0x24af06[_0x120ab6(0x213)])[_0x120ab6(0x239)](_0x120ab6(0x23c)),'personId':_0x24af06[_0x120ab6(0x208)]};}else{const _0x1f76a7={'memberId':_0x28de5e,'unitId':_0x7f6388,'content':_0x206981,'mention':_0x2c3871},_0x5d2403=await this[_0x120ab6(0x228)]['post'](_0x120ab6(0x1f3)+_0x7f6388+_0x120ab6(0x20d),{'body':_0x1f76a7});return X(_0x5d2403['body'][_0x120ab6(0x226)],_0x646c14);}}async['updateComment'](_0x35fbdf){const _0x3ed812=_0x45e79d;var _0x59db28,_0x42ef0f;const {text:_0x235d2f,unitId:_0x912d8}=_0x35fbdf,_0x14828f=(_0x42ef0f=(_0x59db28=_0x235d2f['customRanges'])==null?void 0x0:_0x59db28[_0x3ed812(0x231)](_0x558492=>_0x558492[_0x3ed812(0x22d)]===_0x134576[_0x3ed812(0x217)])[_0x3ed812(0x1f8)](_0x53aea6=>_0x53aea6[_0x3ed812(0x22e)]))!=null?_0x42ef0f:[],_0x3486ce=JSON['stringify'](_0x235d2f),_0x16904e=_0x35fbdf[_0x3ed812(0x20b)],_0x4aa509=_0x35fbdf['id'],_0x197e78={'memberId':(await this['_sessionService'][_0x3ed812(0x1e9)](_0x912d8))['getMemberID'](),'unitId':_0x912d8,'threadId':_0x16904e,'mention':_0x14828f,'content':_0x3486ce,'replyId':_0x4aa509},_0x2601a6=await this['_httpService'][_0x3ed812(0x218)](_0x3ed812(0x1f3)+_0x912d8+_0x3ed812(0x23f),{'body':_0x197e78});return!_0x2601a6['body']['error']||_0x2601a6['body'][_0x3ed812(0x1f0)][_0x3ed812(0x224)]===0x1;}async[_0x45e79d(0x236)](_0x1511f8){const _0xb99a83=_0x45e79d,{unitId:_0x27cf5e}=_0x1511f8,_0x1cfdf7=_0x1511f8[_0xb99a83(0x20b)],_0x3afe30={'memberId':this[_0xb99a83(0x21b)][_0xb99a83(0x24a)]()[_0xb99a83(0x201)],'unitId':_0x27cf5e,'threadId':_0x1cfdf7,'solved':_0x1511f8['resolved']?I[_0xb99a83(0x237)]:I['OpenOrReOpen']},_0x575620=await this[_0xb99a83(0x228)]['post']('/universer-api/comment/unit/'+_0x27cf5e+'/solved',{'body':_0x3afe30});return!_0x575620[_0xb99a83(0x1fb)]['error']||_0x575620[_0xb99a83(0x1fb)][_0xb99a83(0x1f0)][_0xb99a83(0x224)]===0x1;}async['deleteComment'](_0x201a2c,_0x144c34,_0x4c12fe,_0x3b71de){const _0x26d1f8=_0x45e79d,_0x39b484={'memberId':(await this['_sessionService'][_0x26d1f8(0x1e9)](_0x201a2c))[_0x26d1f8(0x21a)](),'threadId':_0x4c12fe,'replyId':_0x3b71de,'unitId':_0x201a2c},_0x4211d0=await this[_0x26d1f8(0x228)]['post'](_0x26d1f8(0x1f3)+_0x201a2c+_0x26d1f8(0x244),{'body':_0x39b484});return!_0x4211d0[_0x26d1f8(0x1fb)][_0x26d1f8(0x1f0)]||_0x4211d0[_0x26d1f8(0x1fb)]['error'][_0x26d1f8(0x224)]===0x1;}async['listComments'](_0x58df93,_0x4f5c94,_0x4feac3){const _0x5e2aa2=_0x45e79d,_0x1274e4={'unitId':_0x58df93,'threadId':_0x4feac3},_0x96f4f7=await this[_0x5e2aa2(0x228)][_0x5e2aa2(0x218)]('/universer-api/comment/unit/'+_0x58df93+'/list',{'body':_0x1274e4}),_0x58413e=_0x4feac3[_0x5e2aa2(0x1f8)](_0x4f53aa=>ee(_0x96f4f7[_0x5e2aa2(0x1fb)][_0x5e2aa2(0x222)][_0x4f53aa],_0x58df93,_0x4f5c94))[_0x5e2aa2(0x231)](Boolean);return Object[_0x5e2aa2(0x22a)](_0x96f4f7[_0x5e2aa2(0x1fb)][_0x5e2aa2(0x232)])['forEach'](_0x3beb7a=>{const _0x4cd85d=_0x5e2aa2;this[_0x4cd85d(0x21b)][_0x4cd85d(0x246)](_0x3beb7a);}),_0x58413e;}[_0x45e79d(0x1ea)](_0x527c5e){const _0xa630d3=_0x45e79d;return{'id':_0x527c5e['id'],'threadId':_0x527c5e['threadId'],'ref':_0x527c5e[_0xa630d3(0x215)]};}};S=Q([b(0x0,_0x2cfc8b(_0x35314b)),b(0x1,_0x2cfc8b(_0x446986)),b(0x2,_0x2cfc8b(_0xf34cc1))],S);var re=Object[_0x45e79d(0x209)],te=(_0x272640,_0x1a75c0,_0x52c20c,_0x495a87)=>{for(var _0x448efb=_0x495a87>0x1?void 0x0:_0x495a87?re(_0x1a75c0,_0x52c20c):_0x1a75c0,_0x397b1b=_0x272640['length']-0x1,_0x154fbc;_0x397b1b>=0x0;_0x397b1b--)(_0x154fbc=_0x272640[_0x397b1b])&&(_0x448efb=_0x154fbc(_0x448efb)||_0x448efb);return _0x448efb;},M=(_0x4e7159,_0x36dc7f)=>(_0x4837ca,_0x2c30fb)=>_0x36dc7f(_0x4837ca,_0x2c30fb,_0x4e7159);let f=class extends _0x70462f{constructor(_0x54446e,_0x1c865a){const _0x33b167=_0x45e79d;super(),this[_0x33b167(0x24b)]=_0x54446e,this[_0x33b167(0x1f9)]=_0x1c865a,this[_0x33b167(0x1e7)]();}[_0x45e79d(0x1e7)](){const _0x418e11=_0x45e79d;this[_0x418e11(0x24b)][_0x418e11(0x23a)]=this[_0x418e11(0x1f9)],this[_0x418e11(0x24b)][_0x418e11(0x202)]=!0x1;}};function _0x9908(_0x4cf7be,_0x24579c){_0x4cf7be=_0x4cf7be-0x1e6;const _0x5db25d=_0x5db2();let _0x99089b=_0x5db25d[_0x4cf7be];return _0x99089b;}f=te([M(0x0,_0x21999a),M(0x1,_0x2cfc8b(S))],f);var se=Object[_0x45e79d(0x210)],oe=Object[_0x45e79d(0x209)],ne=(_0x5f2083,_0x56cd37,_0x454747)=>_0x56cd37 in _0x5f2083?se(_0x5f2083,_0x56cd37,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x454747}):_0x5f2083[_0x56cd37]=_0x454747,ie=(_0x3e9d24,_0x5f0a04,_0x4dc1ac,_0xd5cb6e)=>{const _0x467161=_0x45e79d;for(var _0x278aaf=_0xd5cb6e>0x1?void 0x0:_0xd5cb6e?oe(_0x5f0a04,_0x4dc1ac):_0x5f0a04,_0x21d522=_0x3e9d24[_0x467161(0x204)]-0x1,_0xe8e24e;_0x21d522>=0x0;_0x21d522--)(_0xe8e24e=_0x3e9d24[_0x21d522])&&(_0x278aaf=_0xe8e24e(_0x278aaf)||_0x278aaf);return _0x278aaf;},N=(_0x23efb4,_0x204add)=>(_0x3b7dc6,_0x53b270)=>_0x204add(_0x3b7dc6,_0x53b270,_0x23efb4),$=(_0x261f9b,_0x4b2b43,_0x3e5f74)=>ne(_0x261f9b,typeof _0x4b2b43!=_0x45e79d(0x221)?_0x4b2b43+'':_0x4b2b43,_0x3e5f74);let g=class extends _0xb90f85{constructor(_0x14781b=O,_0xd09ca6,_0x25a174){const _0xe62fa1=_0x45e79d;super(),this[_0xe62fa1(0x203)]=_0x14781b,this[_0xe62fa1(0x223)]=_0xd09ca6,this[_0xe62fa1(0x211)]=_0x25a174;const {..._0x5a2a3a}=_0x346483({},O,this[_0xe62fa1(0x203)]);this['_configService'][_0xe62fa1(0x241)](z,_0x5a2a3a);}[_0x45e79d(0x214)](){const _0x449411=_0x45e79d;[[S],[f],[_]][_0x449411(0x242)](_0x3ff8c6=>{const _0x47ec58=_0x449411;this[_0x47ec58(0x223)][_0x47ec58(0x229)](_0x3ff8c6);});}['onReady'](){const _0x4f971c=_0x45e79d;this[_0x4f971c(0x223)][_0x4f971c(0x240)](f),this['_injector'][_0x4f971c(0x240)](_);}};$(g,_0x45e79d(0x216),W),$(g,_0x45e79d(0x22b),_0x14136f[_0x45e79d(0x20e)]),g=ie([_0x14b24(_0x36ad3c,_0x27e6ee,_0x344deb),N(0x1,_0x2cfc8b(_0x251dc0)),N(0x2,_0x54f232)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x5db2(){const _0x2e6824=['getMemberID','_userService','/reply','replyId','_init','disposeWithMe','_initUserSync','symbol','comments','_injector','code','commentUpdate$','comment','content','_httpService','add','values','type','stringify','rangeType','rangeId','Solve','268441iCMlPc','filter','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replies','slice','resolveComment','Solved','delete','format','dataSource','_threadCommentModel','YYYY/MM/DD\x20HH:mm','61505jxMuWm','getComment','/edit','get','setConfig','forEach','Unknown','/delete','payload','addUser','root','2nXIFOh','OpenOrReOpen','getCurrentUser','_threadCommentDataSourceService','Reply','_initDataSource','364777goqrnl','requireSession','saveCommentToSnapshot','/universer-api/user/list','find','78CYZoPm','parse','Add','error','getUnit','770982WnjuBe','/universer-api/comment/unit/','solved','Edit','getUser','19415dZAbsM','map','_threadCommentDataSource','1301888FxTeUZ','body','190NaCjko','deleteComment','50121spRFhw','parentId','_sessionService','userID','syncUpdateMutationToColla','_config','length','addComment','unitId','UNRECOGNIZED','userId','getOwnPropertyDescriptor','updateComment','threadId','Delete','/add','UNIVER_UNKNOWN','subscribe','defineProperty','_configService','personId','createTimestamp','onStarting','ref','pluginName','COMMENT','post','40ZHdNeH'];_0x5db2=function(){return _0x2e6824;};return _0x5db2();}
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x195e(_0x309dd8,_0x233f0e){_0x309dd8=_0x309dd8-0x1ab;const _0x195675=_0x1956();let _0x195ef6=_0x195675[_0x309dd8];return _0x195ef6;}(function(_0x32f10f,_0x52ba32){const _0x5d45c9=_0x195e,_0x5d6256=_0x32f10f();while(!![]){try{const _0x2b83d6=parseInt(_0x5d45c9(0x1c9))/0x1+parseInt(_0x5d45c9(0x1c1))/0x2+-parseInt(_0x5d45c9(0x1b6))/0x3+-parseInt(_0x5d45c9(0x214))/0x4+-parseInt(_0x5d45c9(0x201))/0x5*(parseInt(_0x5d45c9(0x228))/0x6)+-parseInt(_0x5d45c9(0x1ef))/0x7*(-parseInt(_0x5d45c9(0x1ce))/0x8)+parseInt(_0x5d45c9(0x1de))/0x9*(-parseInt(_0x5d45c9(0x1bb))/0xa);if(_0x2b83d6===_0x52ba32)break;else _0x5d6256['push'](_0x5d6256['shift']());}catch(_0x562216){_0x5d6256['push'](_0x5d6256['shift']());}}}(_0x1956,0x50b73),function(_0x1ec44a,_0x58486f){const _0xd39b2c=_0x195e;typeof exports==_0xd39b2c(0x1b3)&&typeof module<'u'?_0x58486f(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==_0xd39b2c(0x212)&&define[_0xd39b2c(0x1c8)]?define([_0xd39b2c(0x1cb),'@univerjs-pro/collaboration-client',_0xd39b2c(0x233),_0xd39b2c(0x210),_0xd39b2c(0x20b),_0xd39b2c(0x1d1),_0xd39b2c(0x209),_0xd39b2c(0x1bf)],_0x58486f):(_0x1ec44a=typeof globalThis<'u'?globalThis:_0x1ec44a||self,_0x58486f(_0x1ec44a[_0xd39b2c(0x1fa)]={},_0x1ec44a[_0xd39b2c(0x1b8)],_0x1ec44a[_0xd39b2c(0x1d7)],_0x1ec44a['UniverCore'],_0x1ec44a[_0xd39b2c(0x205)],_0x1ec44a[_0xd39b2c(0x1ff)],_0x1ec44a[_0xd39b2c(0x209)],_0x1ec44a['UniverNetwork']));}(this,function(_0x4fe946,_0x1125ce,_0x414fa8,_0x223e30,_0x59a657,_0x49ccb8,_0x4945cc,_0x4cefa1){'use strict';const _0x51766c=_0x195e;const _0x3d4067=_0x51766c(0x219);var _0x58181b=(_0x473d29=>(_0x473d29[_0x473d29[_0x51766c(0x1cf)]=0x0]=_0x51766c(0x1cf),_0x473d29[_0x473d29[_0x51766c(0x1f7)]=0x1]=_0x51766c(0x1f7),_0x473d29[_0x473d29[_0x51766c(0x1c5)]=-0x1]=_0x51766c(0x1c5),_0x473d29))(_0x58181b||{}),_0x494282=(_0x4f5a70=>(_0x4f5a70[_0x4f5a70[_0x51766c(0x1d2)]=0x0]=_0x51766c(0x1d2),_0x4f5a70[_0x4f5a70[_0x51766c(0x22a)]=0x1]=_0x51766c(0x22a),_0x4f5a70[_0x4f5a70[_0x51766c(0x1f4)]=0x2]=_0x51766c(0x1f4),_0x4f5a70[_0x4f5a70['Edit']=0x3]='Edit',_0x4f5a70[_0x4f5a70['Delete']=0x4]=_0x51766c(0x22e),_0x4f5a70[_0x4f5a70[_0x51766c(0x211)]=0x5]=_0x51766c(0x211),_0x4f5a70[_0x4f5a70['UNRECOGNIZED']=-0x1]=_0x51766c(0x1c5),_0x4f5a70))(_0x494282||{});const _0x1d712a=_0x4640be=>_0x223e30[_0x51766c(0x1ae)](new Date(+_0x4640be))['format'](_0x51766c(0x234)),_0x3018fa=async(_0x47fbac,_0x203eeb)=>{const _0x25398d=_0x51766c,_0x517f12=_0x47fbac[_0x25398d(0x1ad)](_0x223e30[_0x25398d(0x229)]),_0x4f2b0c=_0x47fbac['get'](_0x4cefa1[_0x25398d(0x1e5)]);_0x203eeb['forEach'](_0x25af7b=>{const _0x4c7aec=_0x25398d;_0x517f12[_0x4c7aec(0x1b5)](_0x25af7b)&&_0x203eeb[_0x4c7aec(0x1da)](_0x25af7b);}),_0x203eeb[_0x25398d(0x1c6)]&&(await _0x4f2b0c[_0x25398d(0x1ad)](_0x25398d(0x223),{'params':{'userIDs':[..._0x203eeb]}}))[_0x25398d(0x1f9)][_0x25398d(0x207)][_0x25398d(0x206)](_0x560c74=>{_0x560c74&&_0x517f12['addUser'](_0x560c74);});};var _0x41f221=Object[_0x51766c(0x1f3)],_0x13b3cf=(_0x453ab2,_0x530c24,_0xd4d502,_0x5f4e2a)=>{const _0x26cadb=_0x51766c;for(var _0x4b6a88=_0x5f4e2a>0x1?void 0x0:_0x5f4e2a?_0x41f221(_0x530c24,_0xd4d502):_0x530c24,_0xf5b47d=_0x453ab2[_0x26cadb(0x1db)]-0x1,_0x3b237f;_0xf5b47d>=0x0;_0xf5b47d--)(_0x3b237f=_0x453ab2[_0xf5b47d])&&(_0x4b6a88=_0x3b237f(_0x4b6a88)||_0x4b6a88);return _0x4b6a88;},_0x44b5b7=(_0x6f56d4,_0x161b8d)=>(_0x4d0e33,_0x54de83)=>_0x161b8d(_0x4d0e33,_0x54de83,_0x6f56d4);let _0x35caf4=class extends _0x223e30[_0x51766c(0x216)]{constructor(_0xf57751,_0x500ea7,_0x464fc6,_0x3f8d06){const _0x36cbde=_0x51766c;super(),this[_0x36cbde(0x1ee)]=_0xf57751,this[_0x36cbde(0x1d5)]=_0x500ea7,this[_0x36cbde(0x1ca)]=_0x464fc6,this['_injector']=_0x3f8d06,this[_0x36cbde(0x20f)](),this[_0x36cbde(0x1f6)]();}['_initUserSync'](){const _0x4d6478=_0x51766c;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x4d6478(0x222)](_0x4945cc[_0x4d6478(0x1ac)](0x10))['subscribe'](_0x29d320=>{const _0x28ad24=_0x4d6478,_0x458d05=new Set();_0x29d320[_0x28ad24(0x206)](_0x54daef=>{const _0x143afc=_0x28ad24;if(_0x54daef[_0x143afc(0x202)]===_0x143afc(0x20d)){const _0x2e53c8=_0x54daef['payload'][_0x143afc(0x1d6)];_0x458d05[_0x143afc(0x20d)](_0x2e53c8);}}),_0x3018fa(this[_0x28ad24(0x21a)],_0x458d05);}));}[_0x51766c(0x20f)](){const _0x5b84ce=_0x51766c;this[_0x5b84ce(0x208)](this[_0x5b84ce(0x1ee)][_0x5b84ce(0x1cd)][_0x5b84ce(0x1f8)](async _0x510f84=>{const _0x2c535e=_0x5b84ce;var _0x19fa89,_0x4e3299,_0x556b19,_0x253e2a;const _0x4bc8fa=(_0x19fa89=this[_0x2c535e(0x1d5)]['getUnit'](_0x510f84[_0x2c535e(0x21b)])[_0x2c535e(0x225)](_0x2addff=>_0x2addff['threadId']===_0x510f84['threadId']))==null?void 0x0:_0x19fa89[_0x2c535e(0x1cc)];if(!_0x4bc8fa)return;const {unitId:_0xadf76e,subUnitId:_0x5d62f0}=_0x4bc8fa;switch(_0x510f84[_0x2c535e(0x1e3)]&&this['_userService'][_0x2c535e(0x1dd)](_0x510f84[_0x2c535e(0x1e3)]),_0x510f84['type']){case _0x494282[_0x2c535e(0x22a)]:break;case _0x494282[_0x2c535e(0x1f4)]:{this['_threadCommentModel'][_0x2c535e(0x22d)](_0xadf76e,_0x5d62f0,{'unitId':_0xadf76e,'subUnitId':_0x5d62f0,'ref':'','id':_0x510f84['replyId'],'dT':_0x1d712a(+_0x510f84[_0x2c535e(0x20e)]),'threadId':_0x510f84[_0x2c535e(0x1ec)],'personId':(_0x556b19=(_0x4e3299=_0x510f84['user'])==null?void 0x0:_0x4e3299[_0x2c535e(0x1e1)])!=null?_0x556b19:_0x510f84[_0x2c535e(0x1b0)],'text':JSON['parse'](_0x510f84['content']),'parentId':_0x4bc8fa['id']});break;}case _0x494282[_0x2c535e(0x22e)]:{const _0x59e78f=this[_0x2c535e(0x1d5)][_0x2c535e(0x1e8)](_0xadf76e,_0x5d62f0,_0x510f84['replyId']);_0x59e78f&&_0x59e78f['parentId']&&this[_0x2c535e(0x1d5)][_0x2c535e(0x1e4)](_0xadf76e,_0x5d62f0,_0x510f84[_0x2c535e(0x1ed)]);break;}case _0x494282[_0x2c535e(0x1e7)]:{this[_0x2c535e(0x1d5)]['updateComment'](_0xadf76e,_0x5d62f0,{'commentId':_0x510f84[_0x2c535e(0x1ed)],'text':JSON['parse'](_0x510f84[_0x2c535e(0x1ea)])});break;}case _0x494282[_0x2c535e(0x211)]:{const _0x35fa64=(_0x253e2a=this['_threadCommentModel'][_0x2c535e(0x1e0)](_0x510f84[_0x2c535e(0x21b)])[_0x2c535e(0x225)](_0x43e64f=>_0x43e64f['threadId']===_0x510f84[_0x2c535e(0x1ec)]))==null?void 0x0:_0x253e2a[_0x2c535e(0x1cc)];_0x35fa64&&this[_0x2c535e(0x1d5)][_0x2c535e(0x203)](_0xadf76e,_0x5d62f0,_0x35fa64['id'],_0x510f84[_0x2c535e(0x213)]===_0x58181b[_0x2c535e(0x1f7)]);break;}}}));}};_0x35caf4=_0x13b3cf([_0x44b5b7(0x0,_0x223e30[_0x51766c(0x1b1)](_0x1125ce[_0x51766c(0x21e)])),_0x44b5b7(0x1,_0x223e30[_0x51766c(0x1b1)](_0x49ccb8[_0x51766c(0x1d0)])),_0x44b5b7(0x2,_0x223e30[_0x51766c(0x1b1)](_0x223e30[_0x51766c(0x229)])),_0x44b5b7(0x3,_0x223e30[_0x51766c(0x1b1)](_0x223e30[_0x51766c(0x1b4)]))],_0x35caf4);const _0x11f380=_0x51766c(0x1bd),_0x4bddf9={};var _0x4c0013=Object[_0x51766c(0x1f3)],_0x123f5b=(_0xfd61c7,_0x258399,_0xe4da6d,_0x2ee0d9)=>{const _0x59df1a=_0x51766c;for(var _0x474aca=_0x2ee0d9>0x1?void 0x0:_0x2ee0d9?_0x4c0013(_0x258399,_0xe4da6d):_0x258399,_0x3c338d=_0xfd61c7[_0x59df1a(0x1db)]-0x1,_0x1a0e35;_0x3c338d>=0x0;_0x3c338d--)(_0x1a0e35=_0xfd61c7[_0x3c338d])&&(_0x474aca=_0x1a0e35(_0x474aca)||_0x474aca);return _0x474aca;},_0x49f320=(_0x37896e,_0x16ea02)=>(_0x14849c,_0x3b348c)=>_0x16ea02(_0x14849c,_0x3b348c,_0x37896e);function _0x3c9f02(_0x44142b,_0x279a2c){const _0x436306=_0x51766c,_0x5b95e3=_0x44142b[_0x436306(0x217)][0x0];return{..._0x279a2c,'id':_0x5b95e3[_0x436306(0x1ed)],'resolved':_0x44142b[_0x436306(0x213)]===0x1,'dT':_0x1d712a(_0x5b95e3[_0x436306(0x20e)]),'personId':_0x5b95e3[_0x436306(0x1b0)],'threadId':_0x5b95e3[_0x436306(0x1ec)]};}function _0x1aa8c2(_0x339a73,_0x28040c,_0x5e59a8){const _0x5d8880=_0x51766c;var _0x2d157a,_0x1542d4;if(((_0x1542d4=(_0x2d157a=_0x339a73==null?void 0x0:_0x339a73['replies'])==null?void 0x0:_0x2d157a[_0x5d8880(0x1db)])!=null?_0x1542d4:0x0)>0x0){const _0x2add2a=(_0x31b60d,_0x520e11)=>({'id':_0x31b60d[_0x5d8880(0x1ed)],'threadId':_0x31b60d['threadId'],'dT':_0x1d712a(_0x31b60d['createTimestamp']),'personId':_0x31b60d['userId'],'resolved':_0x339a73[_0x5d8880(0x213)]===_0x58181b[_0x5d8880(0x1f7)],'unitId':_0x28040c,'subUnitId':_0x5e59a8,'text':JSON[_0x5d8880(0x226)](_0x31b60d[_0x5d8880(0x1ea)]),'parentId':_0x520e11}),_0x211de0=_0x2add2a(_0x339a73['replies'][0x0]);return{..._0x211de0,'children':_0x339a73[_0x5d8880(0x217)][_0x5d8880(0x1d9)](0x1)[_0x5d8880(0x224)](_0x42cb9d=>_0x2add2a(_0x42cb9d,_0x211de0['id']))};}return null;}let _0x5a9f42=class{constructor(_0x17242d,_0x1590e0,_0xcccbb){const _0x236e27=_0x51766c;this['_httpService']=_0x17242d,this[_0x236e27(0x1ca)]=_0x1590e0,this[_0x236e27(0x1af)]=_0xcccbb;}async['addComment'](_0x1cee02){const _0x47e1c0=_0x51766c;var _0x5032ad,_0x4ebddb;const {parentId:_0x318a51,unitId:_0x1e71ff,text:_0x56984b,threadId:_0x3c968c}=_0x1cee02,_0x515157=(_0x4ebddb=(_0x5032ad=_0x56984b[_0x47e1c0(0x1d3)])==null?void 0x0:_0x5032ad['filter'](_0x12153a=>_0x12153a['rangeType']===_0x223e30[_0x47e1c0(0x1fb)]['COMMENT'])[_0x47e1c0(0x224)](_0x343eec=>_0x343eec[_0x47e1c0(0x1e9)]))!=null?_0x4ebddb:[],_0x341540=JSON[_0x47e1c0(0x1c7)](_0x56984b),_0x1b0f7e=(await this['_sessionService'][_0x47e1c0(0x1c3)](_0x1e71ff))[_0x47e1c0(0x1d4)]();if(_0x318a51){const _0x43948b={'memberId':_0x1b0f7e,'unitId':_0x1e71ff,'content':_0x341540,'mention':_0x515157,'threadId':_0x3c968c},_0x3d66f5=(await this[_0x47e1c0(0x1d8)][_0x47e1c0(0x200)](_0x47e1c0(0x1b9)+_0x1e71ff+_0x47e1c0(0x1b7),{'body':_0x43948b}))[_0x47e1c0(0x1f9)]['reply'];return{..._0x1cee02,'id':_0x3d66f5[_0x47e1c0(0x1ed)],'dT':_0x223e30[_0x47e1c0(0x1ae)](+_0x3d66f5['createTimestamp'])[_0x47e1c0(0x204)](_0x47e1c0(0x234)),'personId':_0x3d66f5[_0x47e1c0(0x1b0)]};}else{const _0x3c85bc={'memberId':_0x1b0f7e,'unitId':_0x1e71ff,'content':_0x341540,'mention':_0x515157},_0x362306=await this['_httpService'][_0x47e1c0(0x200)]('/universer-api/comment/unit/'+_0x1e71ff+'/add',{'body':_0x3c85bc});return _0x3c9f02(_0x362306['body'][_0x47e1c0(0x218)],_0x1cee02);}}async[_0x51766c(0x22c)](_0x2a6164){const _0x3b4fed=_0x51766c;var _0x3f2529,_0x1c3f62;const {text:_0xdf7f0,unitId:_0x2c2f04}=_0x2a6164,_0x2bfb81=(_0x1c3f62=(_0x3f2529=_0xdf7f0[_0x3b4fed(0x1d3)])==null?void 0x0:_0x3f2529[_0x3b4fed(0x22b)](_0x337719=>_0x337719[_0x3b4fed(0x21c)]===_0x223e30[_0x3b4fed(0x1fb)][_0x3b4fed(0x1f2)])[_0x3b4fed(0x224)](_0x45aa9e=>_0x45aa9e[_0x3b4fed(0x1e9)]))!=null?_0x1c3f62:[],_0x3028f2=JSON[_0x3b4fed(0x1c7)](_0xdf7f0),_0x4dfc52=_0x2a6164[_0x3b4fed(0x1ec)],_0x3326aa=_0x2a6164['id'],_0x5351d5={'memberId':(await this[_0x3b4fed(0x1af)][_0x3b4fed(0x1c3)](_0x2c2f04))['getMemberID'](),'unitId':_0x2c2f04,'threadId':_0x4dfc52,'mention':_0x2bfb81,'content':_0x3028f2,'replyId':_0x3326aa},_0x540ddf=await this[_0x3b4fed(0x1d8)]['post']('/universer-api/comment/unit/'+_0x2c2f04+'/edit',{'body':_0x5351d5});return!_0x540ddf[_0x3b4fed(0x1f9)][_0x3b4fed(0x235)]||_0x540ddf[_0x3b4fed(0x1f9)][_0x3b4fed(0x235)][_0x3b4fed(0x1c4)]===0x1;}async[_0x51766c(0x203)](_0x48363b){const _0x20a4cf=_0x51766c,{unitId:_0x1950e4}=_0x48363b,_0x403586=_0x48363b[_0x20a4cf(0x1ec)],_0x30e57={'memberId':this[_0x20a4cf(0x1ca)][_0x20a4cf(0x1eb)]()[_0x20a4cf(0x1e1)],'unitId':_0x1950e4,'threadId':_0x403586,'solved':_0x48363b[_0x20a4cf(0x22f)]?_0x58181b[_0x20a4cf(0x1f7)]:_0x58181b[_0x20a4cf(0x1cf)]},_0x589c39=await this[_0x20a4cf(0x1d8)][_0x20a4cf(0x200)](_0x20a4cf(0x1b9)+_0x1950e4+'/solved',{'body':_0x30e57});return!_0x589c39[_0x20a4cf(0x1f9)]['error']||_0x589c39[_0x20a4cf(0x1f9)][_0x20a4cf(0x235)][_0x20a4cf(0x1c4)]===0x1;}async[_0x51766c(0x1e4)](_0x34962e,_0x2d9ba3,_0x330fec,_0x26e5a9){const _0x340ced=_0x51766c,_0x48343={'memberId':(await this[_0x340ced(0x1af)]['requireSession'](_0x34962e))[_0x340ced(0x1d4)](),'threadId':_0x330fec,'replyId':_0x26e5a9,'unitId':_0x34962e},_0x5bcf5e=await this[_0x340ced(0x1d8)][_0x340ced(0x200)](_0x340ced(0x1b9)+_0x34962e+_0x340ced(0x1e6),{'body':_0x48343});return!_0x5bcf5e['body']['error']||_0x5bcf5e['body'][_0x340ced(0x235)][_0x340ced(0x1c4)]===0x1;}async[_0x51766c(0x1be)](_0xbb0a67,_0x536370,_0x5eb3a9){const _0x2cd09b=_0x51766c,_0x492c7b={'unitId':_0xbb0a67,'threadId':_0x5eb3a9},_0x2f165e=await this[_0x2cd09b(0x1d8)][_0x2cd09b(0x200)](_0x2cd09b(0x1b9)+_0xbb0a67+_0x2cd09b(0x1e2),{'body':_0x492c7b}),_0x129b94=_0x5eb3a9[_0x2cd09b(0x224)](_0x60e531=>_0x1aa8c2(_0x2f165e[_0x2cd09b(0x1f9)]['comments'][_0x60e531],_0xbb0a67,_0x536370))[_0x2cd09b(0x22b)](Boolean);return Object[_0x2cd09b(0x1ba)](_0x2f165e['body'][_0x2cd09b(0x207)])[_0x2cd09b(0x206)](_0x2e0d0d=>{const _0x321895=_0x2cd09b;this[_0x321895(0x1ca)][_0x321895(0x1dd)](_0x2e0d0d);}),_0x129b94;}[_0x51766c(0x1fd)](_0x168aea){const _0x146834=_0x51766c;return{'id':_0x168aea['id'],'threadId':_0x168aea['threadId'],'ref':_0x168aea[_0x146834(0x221)]};}};_0x5a9f42=_0x123f5b([_0x49f320(0x0,_0x223e30[_0x51766c(0x1b1)](_0x4cefa1['HTTPService'])),_0x49f320(0x1,_0x223e30[_0x51766c(0x1b1)](_0x223e30['UserManagerService'])),_0x49f320(0x2,_0x223e30[_0x51766c(0x1b1)](_0x1125ce[_0x51766c(0x1df)]))],_0x5a9f42);var _0x11bb46=Object[_0x51766c(0x1f3)],_0x2ded7c=(_0x8afdc4,_0x40ba00,_0xcbad10,_0x10ddf2)=>{const _0x5537fd=_0x51766c;for(var _0x303776=_0x10ddf2>0x1?void 0x0:_0x10ddf2?_0x11bb46(_0x40ba00,_0xcbad10):_0x40ba00,_0x33d0e5=_0x8afdc4[_0x5537fd(0x1db)]-0x1,_0x27d34f;_0x33d0e5>=0x0;_0x33d0e5--)(_0x27d34f=_0x8afdc4[_0x33d0e5])&&(_0x303776=_0x27d34f(_0x303776)||_0x303776);return _0x303776;},_0x2f2df5=(_0x3f37f2,_0x48dcaf)=>(_0x56b967,_0x550aa0)=>_0x48dcaf(_0x56b967,_0x550aa0,_0x3f37f2);let _0x1a4f00=class extends _0x223e30[_0x51766c(0x216)]{constructor(_0x52accf,_0x375067){const _0x190125=_0x51766c;super(),this[_0x190125(0x230)]=_0x52accf,this[_0x190125(0x1fe)]=_0x375067,this[_0x190125(0x1ab)]();}[_0x51766c(0x1ab)](){const _0x5c56c5=_0x51766c;this[_0x5c56c5(0x230)][_0x5c56c5(0x21d)]=this[_0x5c56c5(0x1fe)],this[_0x5c56c5(0x230)][_0x5c56c5(0x227)]=!0x1;}};_0x1a4f00=_0x2ded7c([_0x2f2df5(0x0,_0x49ccb8[_0x51766c(0x237)]),_0x2f2df5(0x1,_0x223e30[_0x51766c(0x1b1)](_0x5a9f42))],_0x1a4f00);var _0x42d920=Object['defineProperty'],_0x3bab50=Object[_0x51766c(0x1f3)],_0xc7c770=(_0x5d1ce2,_0x2cae93,_0x4442c3)=>_0x2cae93 in _0x5d1ce2?_0x42d920(_0x5d1ce2,_0x2cae93,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4442c3}):_0x5d1ce2[_0x2cae93]=_0x4442c3,_0xccd726=(_0x329bd5,_0x4c17fb,_0x46925b,_0x2eb94f)=>{const _0x168a81=_0x51766c;for(var _0x456c31=_0x2eb94f>0x1?void 0x0:_0x2eb94f?_0x3bab50(_0x4c17fb,_0x46925b):_0x4c17fb,_0x2f7d93=_0x329bd5[_0x168a81(0x1db)]-0x1,_0x2ab1e9;_0x2f7d93>=0x0;_0x2f7d93--)(_0x2ab1e9=_0x329bd5[_0x2f7d93])&&(_0x456c31=_0x2ab1e9(_0x456c31)||_0x456c31);return _0x456c31;},_0x266aa0=(_0x23387e,_0x248dff)=>(_0x3a8b4c,_0x4cd4ca)=>_0x248dff(_0x3a8b4c,_0x4cd4ca,_0x23387e),_0x258c20=(_0x2f00f2,_0x40bdc9,_0x5acb30)=>_0xc7c770(_0x2f00f2,typeof _0x40bdc9!=_0x51766c(0x215)?_0x40bdc9+'':_0x40bdc9,_0x5acb30);_0x4fe946['UniverThreadCommentDataSourcePlugin']=class extends _0x223e30['Plugin']{constructor(_0xa8a71d=_0x4bddf9,_0x3253c2,_0x127f63){const _0x17e10d=_0x51766c;super(),this[_0x17e10d(0x1c0)]=_0xa8a71d,this[_0x17e10d(0x21a)]=_0x3253c2,this['_configService']=_0x127f63;const {..._0x65369a}=_0x223e30['merge']({},_0x4bddf9,this[_0x17e10d(0x1c0)]);this['_configService'][_0x17e10d(0x1f5)](_0x11f380,_0x65369a);}[_0x51766c(0x232)](){const _0x564da0=_0x51766c;[[_0x5a9f42],[_0x1a4f00],[_0x35caf4]][_0x564da0(0x206)](_0x425580=>{const _0x3a95ef=_0x564da0;this[_0x3a95ef(0x21a)][_0x3a95ef(0x20d)](_0x425580);});}[_0x51766c(0x236)](){const _0x2167bb=_0x51766c;this[_0x2167bb(0x21a)]['get'](_0x1a4f00),this['_injector'][_0x2167bb(0x1ad)](_0x35caf4);}},_0x258c20(_0x4fe946[_0x51766c(0x1fc)],_0x51766c(0x1f0),_0x3d4067),_0x258c20(_0x4fe946[_0x51766c(0x1fc)],_0x51766c(0x202),_0x223e30[_0x51766c(0x220)][_0x51766c(0x20c)]),_0x4fe946[_0x51766c(0x1fc)]=_0xccd726([_0x223e30[_0x51766c(0x20a)](_0x59a657[_0x51766c(0x1f1)],_0x1125ce[_0x51766c(0x231)],_0x414fa8[_0x51766c(0x1c2)]),_0x266aa0(0x1,_0x223e30[_0x51766c(0x1b1)](_0x223e30['Injector'])),_0x266aa0(0x2,_0x223e30[_0x51766c(0x1bc)])],_0x4fe946['UniverThreadCommentDataSourcePlugin']),Object[_0x51766c(0x1b2)](_0x4fe946,Symbol[_0x51766c(0x1dc)],{'value':_0x51766c(0x21f)});}));function _0x1956(){const _0x2ad65a=['getComment','rangeId','content','getCurrentUser','threadId','replyId','_commentService','7CuPQvp','pluginName','UniverThreadCommentUIPlugin','COMMENT','getOwnPropertyDescriptor','Reply','setConfig','_initUserSync','Solved','subscribe','body','UniverProThreadCommentDatasource','CustomRangeType','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','_threadCommentDataSource','UniverThreadComment','post','1037165hTFJeK','type','resolveComment','format','UniverThreadCommentUi','forEach','users','disposeWithMe','rxjs','DependentOn','@univerjs/thread-comment-ui','UNIVER_UNKNOWN','add','createTimestamp','_init','@univerjs/core','Solve','function','solved','517688IoGfKb','symbol','Disposable','replies','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','unitId','rangeType','dataSource','CommentService','Module','UniverInstanceType','ref','pipe','/universer-api/user/list','map','find','parse','syncUpdateMutationToColla','6fvHqyX','UserManagerService','Add','filter','updateComment','addComment','Delete','resolved','_threadCommentDataSourceService','UniverCollaborationClientPlugin','onStarting','@univerjs-pro/license','YYYY/MM/DD\x20HH:mm','error','onReady','IThreadCommentDataSourceService','_initDataSource','bufferTime','get','dayjs','_sessionService','userId','Inject','defineProperty','object','Injector','getUser','664116YeSMyV','/reply','UniverProCollaborationClient','/universer-api/comment/unit/','values','4040jzVnCZ','IConfigService','thread-comment-data-source.config','listComments','@univerjs/network','_config','887740hmqLTb','UniverLicensePlugin','requireSession','code','UNRECOGNIZED','size','stringify','amd','623653AYtUII','_userService','exports','root','commentUpdate$','5528NpGNcV','OpenOrReOpen','ThreadCommentModel','@univerjs/thread-comment','Unknown','customRanges','getMemberID','_threadCommentModel','personId','UniverProLicense','_httpService','slice','delete','length','toStringTag','addUser','3996cAvnSE','CollaborationSessionService','getUnit','userID','/list','user','deleteComment','HTTPService','/delete','Edit'];_0x1956=function(){return _0x2ad65a;};return _0x1956();}
1
+ function _0x4f74(_0x35ee16,_0x42456f){_0x35ee16=_0x35ee16-0x111;const _0x4052a6=_0x4052();let _0x4f7461=_0x4052a6[_0x35ee16];return _0x4f7461;}function _0x4052(){const _0xfd5608=['code','saveCommentToSnapshot','/solved','/universer-api/user/list','getCurrentUser','addComment','get','UserManagerService','50957ZldMKk','HTTPService','4033832Wjhdzv','userID','Solved','_commentService','13118556MFysoK','CustomRangeType','error','subscribe','/add','4243503vrMAsi','rangeType','deleteComment','bufferTime','forEach','_httpService','/edit','@univerjs/core','_initUserSync','onReady','UniverLicensePlugin','getUnit','userId','OpenOrReOpen','Delete','Add','disposeWithMe','DependentOn','1840392boJAzN','type','COMMENT','_initDataSource','pipe','content','CommentService','format','_threadCommentDataSource','exports','root','_threadCommentDataSourceService','IConfigService','27SIIFjn','UniverThreadCommentDataSourcePlugin','solved','stringify','toStringTag','@univerjs/network','delete','users','ref','6eJuGkx','YYYY/MM/DD\x20HH:mm','2086210Dkgqba','UniverNetwork','_injector','6DgCUta','parse','@univerjs-pro/license','_sessionService','commentUpdate$','merge','personId','Reply','@univerjs/thread-comment','getMemberID','parentId','UniverThreadComment','UniverInstanceType','defineProperty','getOwnPropertyDescriptor','add','UniverThreadCommentUi','Unknown','pluginName','replyId','/reply','unitId','ThreadCommentModel','UniverCollaborationClientPlugin','_configService','Inject','length','requireSession','/universer-api/comment/unit/','dataSource','@univerjs-pro/collaboration-client','UniverProThreadCommentDatasource','body','post','replies','customRanges','addUser','_threadCommentModel','UniverThreadCommentUIPlugin','Solve','Injector','payload','thread-comment-data-source.config','function','reply','getUser','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverProCollaborationClient','UNRECOGNIZED','5719015ExKvlz','user','map','_userService','rxjs','CollaborationSessionService','rangeId','Disposable','UniverCore','listComments','threadId','Edit','_init','size','find','comment','IThreadCommentDataSourceService','7EnPYyC','createTimestamp','resolveComment','_config','updateComment'];_0x4052=function(){return _0xfd5608;};return _0x4052();}(function(_0x1e403c,_0x54503f){const _0x12b68c=_0x4f74,_0x2d1f0a=_0x1e403c();while(!![]){try{const _0x3ee5d6=-parseInt(_0x12b68c(0x152))/0x1*(parseInt(_0x12b68c(0x18a))/0x2)+parseInt(_0x12b68c(0x15d))/0x3+parseInt(_0x12b68c(0x154))/0x4+parseInt(_0x12b68c(0x134))/0x5*(-parseInt(_0x12b68c(0x185))/0x6)+parseInt(_0x12b68c(0x145))/0x7*(parseInt(_0x12b68c(0x16f))/0x8)+parseInt(_0x12b68c(0x17c))/0x9*(parseInt(_0x12b68c(0x187))/0xa)+-parseInt(_0x12b68c(0x158))/0xb;if(_0x3ee5d6===_0x54503f)break;else _0x2d1f0a['push'](_0x2d1f0a['shift']());}catch(_0x12486b){_0x2d1f0a['push'](_0x2d1f0a['shift']());}}}(_0x4052,0xc0c61),function(_0x499d4a,_0x41103e){const _0x3c0cfe=_0x4f74;typeof exports=='object'&&typeof module<'u'?_0x41103e(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==_0x3c0cfe(0x12d)&&define['amd']?define([_0x3c0cfe(0x178),_0x3c0cfe(0x120),_0x3c0cfe(0x18c),_0x3c0cfe(0x164),'@univerjs/thread-comment-ui',_0x3c0cfe(0x192),_0x3c0cfe(0x138),_0x3c0cfe(0x181)],_0x41103e):(_0x499d4a=typeof globalThis<'u'?globalThis:_0x499d4a||self,_0x41103e(_0x499d4a[_0x3c0cfe(0x121)]={},_0x499d4a[_0x3c0cfe(0x132)],_0x499d4a['UniverProLicense'],_0x499d4a[_0x3c0cfe(0x13c)],_0x499d4a[_0x3c0cfe(0x112)],_0x499d4a[_0x3c0cfe(0x195)],_0x499d4a['rxjs'],_0x499d4a[_0x3c0cfe(0x188)]));}(this,function(_0x3d3b74,_0x4e654f,_0x34bffc,_0x48f4a3,_0x5eac6e,_0x399112,_0x30a098,_0xaf1c1){'use strict';const _0x7523df=_0x4f74;const _0x174595=_0x7523df(0x131);var _0x188832=(_0x4666aa=>(_0x4666aa[_0x4666aa['OpenOrReOpen']=0x0]=_0x7523df(0x16a),_0x4666aa[_0x4666aa['Solved']=0x1]='Solved',_0x4666aa[_0x4666aa['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4666aa))(_0x188832||{}),_0x2290c2=(_0x31bea1=>(_0x31bea1[_0x31bea1[_0x7523df(0x113)]=0x0]=_0x7523df(0x113),_0x31bea1[_0x31bea1[_0x7523df(0x16c)]=0x1]='Add',_0x31bea1[_0x31bea1[_0x7523df(0x191)]=0x2]=_0x7523df(0x191),_0x31bea1[_0x31bea1[_0x7523df(0x13f)]=0x3]='Edit',_0x31bea1[_0x31bea1['Delete']=0x4]='Delete',_0x31bea1[_0x31bea1[_0x7523df(0x129)]=0x5]='Solve',_0x31bea1[_0x31bea1[_0x7523df(0x133)]=-0x1]='UNRECOGNIZED',_0x31bea1))(_0x2290c2||{});const _0x5ef1d5=_0x3dd342=>_0x48f4a3['dayjs'](new Date(+_0x3dd342))[_0x7523df(0x176)]('YYYY/MM/DD\x20HH:mm'),_0x53022d=async(_0x597bd9,_0x23529d)=>{const _0x18c13f=_0x7523df,_0x400bd9=_0x597bd9[_0x18c13f(0x150)](_0x48f4a3[_0x18c13f(0x151)]),_0x2d54e4=_0x597bd9[_0x18c13f(0x150)](_0xaf1c1[_0x18c13f(0x153)]);_0x23529d[_0x18c13f(0x161)](_0x3d3ab3=>{const _0x33a198=_0x18c13f;_0x400bd9[_0x33a198(0x12f)](_0x3d3ab3)&&_0x23529d[_0x33a198(0x182)](_0x3d3ab3);}),_0x23529d[_0x18c13f(0x141)]&&(await _0x2d54e4['get'](_0x18c13f(0x14d),{'params':{'userIDs':[..._0x23529d]}}))['body'][_0x18c13f(0x183)][_0x18c13f(0x161)](_0x4b9ea6=>{const _0x5d96a0=_0x18c13f;_0x4b9ea6&&_0x400bd9[_0x5d96a0(0x126)](_0x4b9ea6);});};var _0x3fb88c=Object[_0x7523df(0x198)],_0x27aa6e=(_0x42d518,_0x4ae735,_0x33c7d0,_0x120520)=>{for(var _0x23f47f=_0x120520>0x1?void 0x0:_0x120520?_0x3fb88c(_0x4ae735,_0x33c7d0):_0x4ae735,_0x4aa0d2=_0x42d518['length']-0x1,_0x676af8;_0x4aa0d2>=0x0;_0x4aa0d2--)(_0x676af8=_0x42d518[_0x4aa0d2])&&(_0x23f47f=_0x676af8(_0x23f47f)||_0x23f47f);return _0x23f47f;},_0x299f53=(_0x5baab8,_0xf82ad1)=>(_0x100738,_0x19ddf7)=>_0xf82ad1(_0x100738,_0x19ddf7,_0x5baab8);let _0x4b6bc5=class extends _0x48f4a3[_0x7523df(0x13b)]{constructor(_0x1e021e,_0x4f4bcb,_0x185402,_0x380d2c){const _0x4e4a82=_0x7523df;super(),this['_commentService']=_0x1e021e,this[_0x4e4a82(0x127)]=_0x4f4bcb,this[_0x4e4a82(0x137)]=_0x185402,this[_0x4e4a82(0x189)]=_0x380d2c,this[_0x4e4a82(0x140)](),this[_0x4e4a82(0x165)]();}[_0x7523df(0x165)](){const _0x5bdb79=_0x7523df;this[_0x5bdb79(0x16d)](this[_0x5bdb79(0x127)][_0x5bdb79(0x18e)][_0x5bdb79(0x173)](_0x30a098[_0x5bdb79(0x160)](0x10))[_0x5bdb79(0x15b)](_0x3239f9=>{const _0x527777=new Set();_0x3239f9['forEach'](_0x13e76=>{const _0x1d13b4=_0x4f74;if(_0x13e76[_0x1d13b4(0x170)]===_0x1d13b4(0x111)){const _0x37e197=_0x13e76[_0x1d13b4(0x12b)][_0x1d13b4(0x190)];_0x527777[_0x1d13b4(0x111)](_0x37e197);}}),_0x53022d(this['_injector'],_0x527777);}));}[_0x7523df(0x140)](){const _0x15fdfb=_0x7523df;this[_0x15fdfb(0x16d)](this[_0x15fdfb(0x157)]['commentUpdate$'][_0x15fdfb(0x15b)](async _0x4d9fe1=>{const _0x12e18b=_0x15fdfb;var _0x3509d4,_0x5d46ba,_0xd37efe,_0x5ea3d9;const _0x4d56ae=(_0x3509d4=this[_0x12e18b(0x127)]['getUnit'](_0x4d9fe1['unitId'])['find'](_0x38c27d=>_0x38c27d[_0x12e18b(0x13e)]===_0x4d9fe1[_0x12e18b(0x13e)]))==null?void 0x0:_0x3509d4[_0x12e18b(0x179)];if(!_0x4d56ae)return;const {unitId:_0x25d077,subUnitId:_0x1d0dc8}=_0x4d56ae;switch(_0x4d9fe1[_0x12e18b(0x135)]&&this[_0x12e18b(0x137)][_0x12e18b(0x126)](_0x4d9fe1[_0x12e18b(0x135)]),_0x4d9fe1[_0x12e18b(0x170)]){case _0x2290c2[_0x12e18b(0x16c)]:break;case _0x2290c2['Reply']:{this['_threadCommentModel'][_0x12e18b(0x14f)](_0x25d077,_0x1d0dc8,{'unitId':_0x25d077,'subUnitId':_0x1d0dc8,'ref':'','id':_0x4d9fe1[_0x12e18b(0x115)],'dT':_0x5ef1d5(+_0x4d9fe1[_0x12e18b(0x146)]),'threadId':_0x4d9fe1['threadId'],'personId':(_0xd37efe=(_0x5d46ba=_0x4d9fe1[_0x12e18b(0x135)])==null?void 0x0:_0x5d46ba[_0x12e18b(0x155)])!=null?_0xd37efe:_0x4d9fe1[_0x12e18b(0x169)],'text':JSON[_0x12e18b(0x18b)](_0x4d9fe1[_0x12e18b(0x174)]),'parentId':_0x4d56ae['id']});break;}case _0x2290c2[_0x12e18b(0x16b)]:{const _0x4a1540=this[_0x12e18b(0x127)]['getComment'](_0x25d077,_0x1d0dc8,_0x4d9fe1[_0x12e18b(0x115)]);_0x4a1540&&_0x4a1540[_0x12e18b(0x194)]&&this[_0x12e18b(0x127)][_0x12e18b(0x15f)](_0x25d077,_0x1d0dc8,_0x4d9fe1[_0x12e18b(0x115)]);break;}case _0x2290c2[_0x12e18b(0x13f)]:{this[_0x12e18b(0x127)][_0x12e18b(0x149)](_0x25d077,_0x1d0dc8,{'commentId':_0x4d9fe1[_0x12e18b(0x115)],'text':JSON['parse'](_0x4d9fe1[_0x12e18b(0x174)])});break;}case _0x2290c2[_0x12e18b(0x129)]:{const _0x2b93bb=(_0x5ea3d9=this[_0x12e18b(0x127)][_0x12e18b(0x168)](_0x4d9fe1[_0x12e18b(0x117)])[_0x12e18b(0x142)](_0x29ad2b=>_0x29ad2b[_0x12e18b(0x13e)]===_0x4d9fe1[_0x12e18b(0x13e)]))==null?void 0x0:_0x5ea3d9[_0x12e18b(0x179)];_0x2b93bb&&this[_0x12e18b(0x127)][_0x12e18b(0x147)](_0x25d077,_0x1d0dc8,_0x2b93bb['id'],_0x4d9fe1[_0x12e18b(0x17e)]===_0x188832[_0x12e18b(0x156)]);break;}}}));}};_0x4b6bc5=_0x27aa6e([_0x299f53(0x0,_0x48f4a3['Inject'](_0x4e654f[_0x7523df(0x175)])),_0x299f53(0x1,_0x48f4a3[_0x7523df(0x11b)](_0x399112[_0x7523df(0x118)])),_0x299f53(0x2,_0x48f4a3[_0x7523df(0x11b)](_0x48f4a3[_0x7523df(0x151)])),_0x299f53(0x3,_0x48f4a3['Inject'](_0x48f4a3[_0x7523df(0x12a)]))],_0x4b6bc5);const _0x2ecd9f=_0x7523df(0x12c),_0x1ff6aa={};var _0x5e431a=Object[_0x7523df(0x198)],_0x135bd6=(_0x3ed0dd,_0x4fe672,_0x14bacf,_0x26afd1)=>{const _0x2a3bca=_0x7523df;for(var _0x1b75ef=_0x26afd1>0x1?void 0x0:_0x26afd1?_0x5e431a(_0x4fe672,_0x14bacf):_0x4fe672,_0x4f7a77=_0x3ed0dd[_0x2a3bca(0x11c)]-0x1,_0x209aec;_0x4f7a77>=0x0;_0x4f7a77--)(_0x209aec=_0x3ed0dd[_0x4f7a77])&&(_0x1b75ef=_0x209aec(_0x1b75ef)||_0x1b75ef);return _0x1b75ef;},_0x57a061=(_0x207591,_0x1523ef)=>(_0x2a15be,_0x16e3af)=>_0x1523ef(_0x2a15be,_0x16e3af,_0x207591);function _0x1154e5(_0x5244c3,_0x588a33){const _0x25a3e3=_0x7523df,_0x30f2c7=_0x5244c3['replies'][0x0];return{..._0x588a33,'id':_0x30f2c7[_0x25a3e3(0x115)],'resolved':_0x5244c3['solved']===0x1,'dT':_0x5ef1d5(_0x30f2c7[_0x25a3e3(0x146)]),'personId':_0x30f2c7['userId'],'threadId':_0x30f2c7[_0x25a3e3(0x13e)]};}function _0x434baa(_0x375542,_0x581bc1,_0x5a4826){const _0x2c0a75=_0x7523df;var _0x155a83,_0x510954;if(((_0x510954=(_0x155a83=_0x375542==null?void 0x0:_0x375542[_0x2c0a75(0x124)])==null?void 0x0:_0x155a83[_0x2c0a75(0x11c)])!=null?_0x510954:0x0)>0x0){const _0xbe4a25=(_0x50eee4,_0x2cc1ad)=>({'id':_0x50eee4[_0x2c0a75(0x115)],'threadId':_0x50eee4[_0x2c0a75(0x13e)],'dT':_0x5ef1d5(_0x50eee4[_0x2c0a75(0x146)]),'personId':_0x50eee4[_0x2c0a75(0x169)],'resolved':_0x375542[_0x2c0a75(0x17e)]===_0x188832[_0x2c0a75(0x156)],'unitId':_0x581bc1,'subUnitId':_0x5a4826,'text':JSON[_0x2c0a75(0x18b)](_0x50eee4['content']),'parentId':_0x2cc1ad}),_0x22c162=_0xbe4a25(_0x375542['replies'][0x0]);return{..._0x22c162,'children':_0x375542[_0x2c0a75(0x124)]['slice'](0x1)[_0x2c0a75(0x136)](_0x3281ac=>_0xbe4a25(_0x3281ac,_0x22c162['id']))};}return null;}let _0x2f7c52=class{constructor(_0x5642da,_0x47f308,_0x5a5073){const _0x3fd4e3=_0x7523df;this[_0x3fd4e3(0x162)]=_0x5642da,this[_0x3fd4e3(0x137)]=_0x47f308,this[_0x3fd4e3(0x18d)]=_0x5a5073;}async['addComment'](_0xd405ee){const _0x1df2e4=_0x7523df;var _0x4e710d,_0x3b08f6;const {parentId:_0x4bbb22,unitId:_0x427468,text:_0x31f5e1,threadId:_0x551e9d}=_0xd405ee,_0x59efdf=(_0x3b08f6=(_0x4e710d=_0x31f5e1[_0x1df2e4(0x125)])==null?void 0x0:_0x4e710d[_0x1df2e4(0x130)](_0x4e99db=>_0x4e99db['rangeType']===_0x48f4a3[_0x1df2e4(0x159)]['COMMENT'])['map'](_0x39c1d7=>_0x39c1d7[_0x1df2e4(0x13a)]))!=null?_0x3b08f6:[],_0xdf163c=JSON[_0x1df2e4(0x17f)](_0x31f5e1),_0x529c74=(await this[_0x1df2e4(0x18d)]['requireSession'](_0x427468))[_0x1df2e4(0x193)]();if(_0x4bbb22){const _0x15cb10={'memberId':_0x529c74,'unitId':_0x427468,'content':_0xdf163c,'mention':_0x59efdf,'threadId':_0x551e9d},_0x8a1433=(await this[_0x1df2e4(0x162)][_0x1df2e4(0x123)](_0x1df2e4(0x11e)+_0x427468+_0x1df2e4(0x116),{'body':_0x15cb10}))[_0x1df2e4(0x122)][_0x1df2e4(0x12e)];return{..._0xd405ee,'id':_0x8a1433[_0x1df2e4(0x115)],'dT':_0x48f4a3['dayjs'](+_0x8a1433[_0x1df2e4(0x146)])['format'](_0x1df2e4(0x186)),'personId':_0x8a1433[_0x1df2e4(0x169)]};}else{const _0x5f1b68={'memberId':_0x529c74,'unitId':_0x427468,'content':_0xdf163c,'mention':_0x59efdf},_0x585b38=await this[_0x1df2e4(0x162)][_0x1df2e4(0x123)](_0x1df2e4(0x11e)+_0x427468+_0x1df2e4(0x15c),{'body':_0x5f1b68});return _0x1154e5(_0x585b38[_0x1df2e4(0x122)][_0x1df2e4(0x143)],_0xd405ee);}}async[_0x7523df(0x149)](_0x5208ea){const _0x2c764e=_0x7523df;var _0x58089b,_0xe67328;const {text:_0x255192,unitId:_0x5b9ddf}=_0x5208ea,_0x21f0a1=(_0xe67328=(_0x58089b=_0x255192[_0x2c764e(0x125)])==null?void 0x0:_0x58089b['filter'](_0x35061b=>_0x35061b[_0x2c764e(0x15e)]===_0x48f4a3[_0x2c764e(0x159)][_0x2c764e(0x171)])[_0x2c764e(0x136)](_0x3cc9ff=>_0x3cc9ff['rangeId']))!=null?_0xe67328:[],_0x56c37e=JSON[_0x2c764e(0x17f)](_0x255192),_0x51aa4d=_0x5208ea[_0x2c764e(0x13e)],_0x5d6756=_0x5208ea['id'],_0x3b1359={'memberId':(await this[_0x2c764e(0x18d)][_0x2c764e(0x11d)](_0x5b9ddf))['getMemberID'](),'unitId':_0x5b9ddf,'threadId':_0x51aa4d,'mention':_0x21f0a1,'content':_0x56c37e,'replyId':_0x5d6756},_0x18f544=await this[_0x2c764e(0x162)]['post']('/universer-api/comment/unit/'+_0x5b9ddf+_0x2c764e(0x163),{'body':_0x3b1359});return!_0x18f544[_0x2c764e(0x122)][_0x2c764e(0x15a)]||_0x18f544[_0x2c764e(0x122)][_0x2c764e(0x15a)]['code']===0x1;}async[_0x7523df(0x147)](_0x2d8e9c){const _0xf15eee=_0x7523df,{unitId:_0x11ca0e}=_0x2d8e9c,_0x2825aa=_0x2d8e9c[_0xf15eee(0x13e)],_0x4cd73f={'memberId':this[_0xf15eee(0x137)][_0xf15eee(0x14e)]()[_0xf15eee(0x155)],'unitId':_0x11ca0e,'threadId':_0x2825aa,'solved':_0x2d8e9c['resolved']?_0x188832['Solved']:_0x188832[_0xf15eee(0x16a)]},_0x1473af=await this[_0xf15eee(0x162)][_0xf15eee(0x123)](_0xf15eee(0x11e)+_0x11ca0e+_0xf15eee(0x14c),{'body':_0x4cd73f});return!_0x1473af[_0xf15eee(0x122)][_0xf15eee(0x15a)]||_0x1473af[_0xf15eee(0x122)][_0xf15eee(0x15a)][_0xf15eee(0x14a)]===0x1;}async[_0x7523df(0x15f)](_0x1b038d,_0xbccd29,_0x149405,_0xa0aed8){const _0x2b111f=_0x7523df,_0x5c3537={'memberId':(await this[_0x2b111f(0x18d)][_0x2b111f(0x11d)](_0x1b038d))[_0x2b111f(0x193)](),'threadId':_0x149405,'replyId':_0xa0aed8,'unitId':_0x1b038d},_0x7c800f=await this[_0x2b111f(0x162)][_0x2b111f(0x123)](_0x2b111f(0x11e)+_0x1b038d+'/delete',{'body':_0x5c3537});return!_0x7c800f[_0x2b111f(0x122)][_0x2b111f(0x15a)]||_0x7c800f[_0x2b111f(0x122)][_0x2b111f(0x15a)][_0x2b111f(0x14a)]===0x1;}async[_0x7523df(0x13d)](_0x3db4e5,_0x26e5d3,_0x1f366b){const _0x3b810f=_0x7523df,_0x1c2686={'unitId':_0x3db4e5,'threadId':_0x1f366b},_0x3425c7=await this[_0x3b810f(0x162)][_0x3b810f(0x123)](_0x3b810f(0x11e)+_0x3db4e5+'/list',{'body':_0x1c2686}),_0x4e30a4=_0x1f366b[_0x3b810f(0x136)](_0x4080f5=>_0x434baa(_0x3425c7[_0x3b810f(0x122)]['comments'][_0x4080f5],_0x3db4e5,_0x26e5d3))[_0x3b810f(0x130)](Boolean);return Object['values'](_0x3425c7['body'][_0x3b810f(0x183)])[_0x3b810f(0x161)](_0x19d044=>{const _0x271091=_0x3b810f;this[_0x271091(0x137)][_0x271091(0x126)](_0x19d044);}),_0x4e30a4;}[_0x7523df(0x14b)](_0x442513){const _0x39114c=_0x7523df;return{'id':_0x442513['id'],'threadId':_0x442513['threadId'],'ref':_0x442513[_0x39114c(0x184)]};}};_0x2f7c52=_0x135bd6([_0x57a061(0x0,_0x48f4a3[_0x7523df(0x11b)](_0xaf1c1[_0x7523df(0x153)])),_0x57a061(0x1,_0x48f4a3[_0x7523df(0x11b)](_0x48f4a3[_0x7523df(0x151)])),_0x57a061(0x2,_0x48f4a3[_0x7523df(0x11b)](_0x4e654f[_0x7523df(0x139)]))],_0x2f7c52);var _0x74cbab=Object[_0x7523df(0x198)],_0x406a55=(_0xc7d6cb,_0x6204a0,_0xfac706,_0x1af9a4)=>{const _0x4aee8c=_0x7523df;for(var _0x29ae70=_0x1af9a4>0x1?void 0x0:_0x1af9a4?_0x74cbab(_0x6204a0,_0xfac706):_0x6204a0,_0x4c79a2=_0xc7d6cb[_0x4aee8c(0x11c)]-0x1,_0x2f98a5;_0x4c79a2>=0x0;_0x4c79a2--)(_0x2f98a5=_0xc7d6cb[_0x4c79a2])&&(_0x29ae70=_0x2f98a5(_0x29ae70)||_0x29ae70);return _0x29ae70;},_0x5091fc=(_0x5b2d35,_0x28d987)=>(_0x4b4383,_0x4cca59)=>_0x28d987(_0x4b4383,_0x4cca59,_0x5b2d35);let _0x3f8ee4=class extends _0x48f4a3['Disposable']{constructor(_0xe40a38,_0x226163){const _0x1bf486=_0x7523df;super(),this[_0x1bf486(0x17a)]=_0xe40a38,this[_0x1bf486(0x177)]=_0x226163,this[_0x1bf486(0x172)]();}[_0x7523df(0x172)](){const _0x35f23c=_0x7523df;this[_0x35f23c(0x17a)][_0x35f23c(0x11f)]=this['_threadCommentDataSource'],this[_0x35f23c(0x17a)]['syncUpdateMutationToColla']=!0x1;}};_0x3f8ee4=_0x406a55([_0x5091fc(0x0,_0x399112[_0x7523df(0x144)]),_0x5091fc(0x1,_0x48f4a3[_0x7523df(0x11b)](_0x2f7c52))],_0x3f8ee4);var _0x4243d8=Object[_0x7523df(0x197)],_0x415ca3=Object[_0x7523df(0x198)],_0x18abd9=(_0x354805,_0x589fc8,_0xc15fad)=>_0x589fc8 in _0x354805?_0x4243d8(_0x354805,_0x589fc8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc15fad}):_0x354805[_0x589fc8]=_0xc15fad,_0x1cb4fe=(_0x2732b1,_0x1c5062,_0x9fe67b,_0x76b4f7)=>{const _0x36502b=_0x7523df;for(var _0x5616dc=_0x76b4f7>0x1?void 0x0:_0x76b4f7?_0x415ca3(_0x1c5062,_0x9fe67b):_0x1c5062,_0x916015=_0x2732b1[_0x36502b(0x11c)]-0x1,_0x716371;_0x916015>=0x0;_0x916015--)(_0x716371=_0x2732b1[_0x916015])&&(_0x5616dc=_0x716371(_0x5616dc)||_0x5616dc);return _0x5616dc;},_0x2255c8=(_0x69504d,_0x47d78d)=>(_0x56412a,_0x17a51d)=>_0x47d78d(_0x56412a,_0x17a51d,_0x69504d),_0x22b2fa=(_0x1d55fb,_0x5dd2cf,_0x591155)=>_0x18abd9(_0x1d55fb,typeof _0x5dd2cf!='symbol'?_0x5dd2cf+'':_0x5dd2cf,_0x591155);_0x3d3b74[_0x7523df(0x17d)]=class extends _0x48f4a3['Plugin']{constructor(_0x56ed34=_0x1ff6aa,_0x5556cb,_0x181897){const _0x58d648=_0x7523df;super(),this['_config']=_0x56ed34,this[_0x58d648(0x189)]=_0x5556cb,this[_0x58d648(0x11a)]=_0x181897;const {..._0x4dd894}=_0x48f4a3[_0x58d648(0x18f)]({},_0x1ff6aa,this[_0x58d648(0x148)]);this[_0x58d648(0x11a)]['setConfig'](_0x2ecd9f,_0x4dd894);}['onStarting'](){const _0x1f4bbc=_0x7523df;[[_0x2f7c52],[_0x3f8ee4],[_0x4b6bc5]][_0x1f4bbc(0x161)](_0x221f6f=>{const _0x4fce5f=_0x1f4bbc;this[_0x4fce5f(0x189)][_0x4fce5f(0x111)](_0x221f6f);});}[_0x7523df(0x166)](){const _0x2775a1=_0x7523df;this['_injector'][_0x2775a1(0x150)](_0x3f8ee4),this[_0x2775a1(0x189)][_0x2775a1(0x150)](_0x4b6bc5);}},_0x22b2fa(_0x3d3b74[_0x7523df(0x17d)],_0x7523df(0x114),_0x174595),_0x22b2fa(_0x3d3b74[_0x7523df(0x17d)],_0x7523df(0x170),_0x48f4a3[_0x7523df(0x196)]['UNIVER_UNKNOWN']),_0x3d3b74[_0x7523df(0x17d)]=_0x1cb4fe([_0x48f4a3[_0x7523df(0x16e)](_0x5eac6e[_0x7523df(0x128)],_0x4e654f[_0x7523df(0x119)],_0x34bffc[_0x7523df(0x167)]),_0x2255c8(0x1,_0x48f4a3[_0x7523df(0x11b)](_0x48f4a3['Injector'])),_0x2255c8(0x2,_0x48f4a3[_0x7523df(0x17b)])],_0x3d3b74[_0x7523df(0x17d)]),Object[_0x7523df(0x197)](_0x3d3b74,Symbol[_0x7523df(0x180)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.15.4",
3
+ "version": "0.15.5-insiders.20260212-022614a",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.15.4",
49
- "@univerjs-pro/license": "0.15.4",
50
- "@univerjs/core": "0.15.4",
51
- "@univerjs/network": "0.15.4",
48
+ "@univerjs-pro/collaboration-client": "0.15.5-insiders.20260212-022614a",
49
+ "@univerjs/core": "0.15.5-insiders.20260212-022614a",
50
+ "@univerjs-pro/license": "0.15.5-insiders.20260212-022614a",
52
51
  "@univerjs/protocol": "0.1.48",
53
- "@univerjs/thread-comment": "0.15.4",
54
- "@univerjs/thread-comment-ui": "0.15.4"
52
+ "@univerjs/network": "0.15.5-insiders.20260212-022614a",
53
+ "@univerjs/thread-comment": "0.15.5-insiders.20260212-022614a",
54
+ "@univerjs/thread-comment-ui": "0.15.5-insiders.20260212-022614a"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.3.1",
60
60
  "vitest": "^4.0.18",
61
- "@univerjs-infra/shared": "0.15.4"
61
+ "@univerjs-infra/shared": "0.15.5"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",