@univerjs-pro/thread-comment-datasource 0.9.3-nightly.202507250750 → 0.9.3-nightly.202507250819
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -15
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1dd4ba=_0x2691;function _0x2691(_0x1b07ce,_0x247264){const _0x3cebcb=_0x3ceb();return _0x2691=function(_0x26915e,_0x52f6fc){_0x26915e=_0x26915e-0xd9;let _0x5630c6=_0x3cebcb[_0x26915e];return _0x5630c6;},_0x2691(_0x1b07ce,_0x247264);}(function(_0x53eccb,_0x3a5021){const _0x7b97f1=_0x2691,_0x437919=_0x53eccb();while(!![]){try{const _0x2fbc95=parseInt(_0x7b97f1(0xe7))/0x1*(parseInt(_0x7b97f1(0x106))/0x2)+-parseInt(_0x7b97f1(0x132))/0x3+-parseInt(_0x7b97f1(0x100))/0x4+parseInt(_0x7b97f1(0x103))/0x5+parseInt(_0x7b97f1(0x107))/0x6+-parseInt(_0x7b97f1(0xe8))/0x7+-parseInt(_0x7b97f1(0xf4))/0x8*(-parseInt(_0x7b97f1(0x117))/0x9);if(_0x2fbc95===_0x3a5021)break;else _0x437919['push'](_0x437919['shift']());}catch(_0x4087e7){_0x437919['push'](_0x437919['shift']());}}}(_0x3ceb,0xf00f1));Object[_0x1dd4ba(0xf6)](exports,Symbol[_0x1dd4ba(0x143)],{'value':_0x1dd4ba(0x11c)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x1dd4ba(0x10e);var I=(_0x206243=>(_0x206243[_0x206243[_0x1dd4ba(0xe0)]=0x0]=_0x1dd4ba(0xe0),_0x206243[_0x206243[_0x1dd4ba(0x112)]=0x1]=_0x1dd4ba(0x112),_0x206243[_0x206243[_0x1dd4ba(0x10d)]=-0x1]='UNRECOGNIZED',_0x206243))(I||{}),v=(_0x4ddfcf=>(_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x14e)]=0x0]='Unknown',_0x4ddfcf[_0x4ddfcf['Add']=0x1]=_0x1dd4ba(0x126),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x125)]=0x2]=_0x1dd4ba(0x125),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0xfe)]=0x3]=_0x1dd4ba(0xfe),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x131)]=0x4]=_0x1dd4ba(0x131),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0xe1)]=0x5]=_0x1dd4ba(0xe1),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x10d)]=-0x1]=_0x1dd4ba(0x10d),_0x4ddfcf))(v||{});const f=_0x155566=>c[_0x1dd4ba(0x150)](new Date(+_0x155566))[_0x1dd4ba(0xf0)](_0x1dd4ba(0xf2)),R=async(_0x2e5c41,_0x1dbe25)=>{const _0x56dada=_0x1dd4ba,_0x4407fd=_0x2e5c41[_0x56dada(0x122)](c[_0x56dada(0x14b)]),_0x1672e4=_0x2e5c41[_0x56dada(0x122)](P[_0x56dada(0x14f)]);_0x1dbe25['forEach'](_0x26efb6=>{const _0x41b9a4=_0x56dada;_0x4407fd[_0x41b9a4(0x121)](_0x26efb6)&&_0x1dbe25[_0x41b9a4(0x142)](_0x26efb6);}),_0x1dbe25[_0x56dada(0x149)]&&(await _0x1672e4[_0x56dada(0x122)](_0x56dada(0xfd),{'params':{'userIDs':[..._0x1dbe25]}}))[_0x56dada(0x102)]['users'][_0x56dada(0x135)](_0x4ca107=>{const _0xd1cee6=_0x56dada;_0x4ca107&&_0x4407fd[_0xd1cee6(0x138)](_0x4ca107);});};var $=Object[_0x1dd4ba(0x147)],E=(_0x16db06,_0x4c64cb,_0x2c5255,_0x400812)=>{const _0x57f013=_0x1dd4ba;for(var _0x2e9b48=_0x400812>0x1?void 0x0:_0x400812?$(_0x4c64cb,_0x2c5255):_0x4c64cb,_0x1d160b=_0x16db06[_0x57f013(0x146)]-0x1,_0x4ad2cc;_0x1d160b>=0x0;_0x1d160b--)(_0x4ad2cc=_0x16db06[_0x1d160b])&&(_0x2e9b48=_0x4ad2cc(_0x2e9b48)||_0x2e9b48);return _0x2e9b48;},S=(_0x2db835,_0x114d2a)=>(_0x672b6a,_0x46579d)=>_0x114d2a(_0x672b6a,_0x46579d,_0x2db835);let p=class extends c[_0x1dd4ba(0x139)]{constructor(_0x5c7fa9,_0x3a7846,_0x321c12,_0x13ac4e){const _0x3b78ea=_0x1dd4ba;super(),this[_0x3b78ea(0x153)]=_0x5c7fa9,this[_0x3b78ea(0x11f)]=_0x3a7846,this[_0x3b78ea(0x12d)]=_0x321c12,this['_injector']=_0x13ac4e,this['_init'](),this[_0x3b78ea(0x145)]();}[_0x1dd4ba(0x145)](){const _0x2a602b=_0x1dd4ba;this[_0x2a602b(0x10b)](this['_threadCommentModel'][_0x2a602b(0x10a)][_0x2a602b(0x144)](w[_0x2a602b(0x152)](0x10))['subscribe'](_0x5af9e7=>{const _0xad85ba=_0x2a602b,_0x45e8fc=new Set();_0x5af9e7[_0xad85ba(0x135)](_0x2a18b5=>{const _0x4e24eb=_0xad85ba;switch(_0x2a18b5['type']){case'add':{const _0x19ab8a=_0x2a18b5[_0x4e24eb(0x14d)]['personId'];_0x45e8fc['add'](_0x19ab8a);break;}}}),R(this['_injector'],_0x45e8fc);}));}[_0x1dd4ba(0x129)](){const _0x4fa95b=_0x1dd4ba;this[_0x4fa95b(0x10b)](this[_0x4fa95b(0x153)]['commentUpdate$'][_0x4fa95b(0x119)](async _0x334025=>{const _0x1dd918=_0x4fa95b;var _0x2df40b,_0x9b70d8,_0x2fdf0c,_0x5176f8;const _0x5454c2=(_0x2df40b=this[_0x1dd918(0x11f)][_0x1dd918(0xee)](_0x334025[_0x1dd918(0xe9)])[_0x1dd918(0x10c)](_0x11f648=>_0x11f648[_0x1dd918(0x13f)]===_0x334025[_0x1dd918(0x13f)]))==null?void 0x0:_0x2df40b['root'];if(!_0x5454c2)return;const {unitId:_0x5ef7cc,subUnitId:_0x57a49a}=_0x5454c2;switch(_0x334025[_0x1dd918(0x14c)]&&this[_0x1dd918(0x12d)]['addUser'](_0x334025[_0x1dd918(0x14c)]),_0x334025[_0x1dd918(0x12c)]){case v[_0x1dd918(0x126)]:break;case v[_0x1dd918(0x125)]:{this['_threadCommentModel'][_0x1dd918(0xef)](_0x5ef7cc,_0x57a49a,{'unitId':_0x5ef7cc,'subUnitId':_0x57a49a,'ref':'','id':_0x334025[_0x1dd918(0x140)],'dT':f(+_0x334025['createTimestamp']),'threadId':_0x334025[_0x1dd918(0x13f)],'personId':(_0x2fdf0c=(_0x9b70d8=_0x334025[_0x1dd918(0x14c)])==null?void 0x0:_0x9b70d8[_0x1dd918(0x137)])!=null?_0x2fdf0c:_0x334025['userId'],'text':JSON[_0x1dd918(0x123)](_0x334025['content']),'parentId':_0x5454c2['id']});break;}case v[_0x1dd918(0x131)]:{const _0x5b2ade=this[_0x1dd918(0x11f)][_0x1dd918(0x12a)](_0x5ef7cc,_0x57a49a,_0x334025[_0x1dd918(0x140)]);_0x5b2ade&&_0x5b2ade['parentId']&&this[_0x1dd918(0x11f)][_0x1dd918(0xe2)](_0x5ef7cc,_0x57a49a,_0x334025[_0x1dd918(0x140)]);break;}case v[_0x1dd918(0xfe)]:{this[_0x1dd918(0x11f)][_0x1dd918(0x118)](_0x5ef7cc,_0x57a49a,{'commentId':_0x334025[_0x1dd918(0x140)],'text':JSON[_0x1dd918(0x123)](_0x334025['content'])});break;}case v['Solve']:{const _0xd8ab48=(_0x5176f8=this[_0x1dd918(0x11f)][_0x1dd918(0xee)](_0x334025[_0x1dd918(0xe9)])[_0x1dd918(0x10c)](_0x46f7c4=>_0x46f7c4[_0x1dd918(0x13f)]===_0x334025[_0x1dd918(0x13f)]))==null?void 0x0:_0x5176f8['root'];_0xd8ab48&&this[_0x1dd918(0x11f)][_0x1dd918(0xdc)](_0x5ef7cc,_0x57a49a,_0xd8ab48['id'],_0x334025[_0x1dd918(0x113)]===I[_0x1dd918(0x112)]);break;}}}));}};p=E([S(0x0,c[_0x1dd4ba(0xe4)](b[_0x1dd4ba(0xfa)])),S(0x1,c['Inject'](M[_0x1dd4ba(0xec)])),S(0x2,c[_0x1dd4ba(0xe4)](c[_0x1dd4ba(0x14b)])),S(0x3,c['Inject'](c[_0x1dd4ba(0xe5)]))],p);const q=_0x1dd4ba(0xde),D={};var A=Object[_0x1dd4ba(0x147)],x=(_0x501def,_0x11389a,_0xc35fdf,_0x3c6367)=>{const _0x4a466d=_0x1dd4ba;for(var _0x5bc73a=_0x3c6367>0x1?void 0x0:_0x3c6367?A(_0x11389a,_0xc35fdf):_0x11389a,_0x51cc16=_0x501def[_0x4a466d(0x146)]-0x1,_0x578325;_0x51cc16>=0x0;_0x51cc16--)(_0x578325=_0x501def[_0x51cc16])&&(_0x5bc73a=_0x578325(_0x5bc73a)||_0x5bc73a);return _0x5bc73a;},_=(_0x30c47e,_0x75f420)=>(_0x5a6cf6,_0x320b6a)=>_0x75f420(_0x5a6cf6,_0x320b6a,_0x30c47e);function Y(_0x2e56a2,_0x1a3d9b){const _0x1adf42=_0x1dd4ba,_0x12c422=_0x2e56a2[_0x1adf42(0x110)][0x0];return{..._0x1a3d9b,'id':_0x12c422[_0x1adf42(0x140)],'resolved':_0x2e56a2['solved']===0x1,'dT':f(_0x12c422[_0x1adf42(0xfb)]),'personId':_0x12c422['userId'],'threadId':_0x12c422['threadId']};}function G(_0x1415a6,_0x1165af,_0x462036){const _0x15860d=_0x1dd4ba;var _0x4a0744,_0x1578b0;if(((_0x1578b0=(_0x4a0744=_0x1415a6==null?void 0x0:_0x1415a6[_0x15860d(0x110)])==null?void 0x0:_0x4a0744[_0x15860d(0x146)])!=null?_0x1578b0:0x0)>0x0){const _0xc174bb=(_0x5e4de1,_0x152c8d)=>({'id':_0x5e4de1[_0x15860d(0x140)],'threadId':_0x5e4de1[_0x15860d(0x13f)],'dT':f(_0x5e4de1[_0x15860d(0xfb)]),'personId':_0x5e4de1[_0x15860d(0x10f)],'resolved':_0x1415a6['solved']===I[_0x15860d(0x112)],'unitId':_0x1165af,'subUnitId':_0x462036,'text':JSON[_0x15860d(0x123)](_0x5e4de1[_0x15860d(0x13a)]),'parentId':_0x152c8d}),_0x3b61d0=_0xc174bb(_0x1415a6[_0x15860d(0x110)][0x0]);return{..._0x3b61d0,'children':_0x1415a6[_0x15860d(0x110)][_0x15860d(0x13c)](0x1)['map'](_0x4710c6=>_0xc174bb(_0x4710c6,_0x3b61d0['id']))};}return null;}let g=class{constructor(_0x43380a,_0x8b4e5d,_0x28098c,_0x34b009){const _0x1c2708=_0x1dd4ba;this[_0x1c2708(0xeb)]=_0x43380a,this[_0x1c2708(0x12d)]=_0x8b4e5d,this[_0x1c2708(0x108)]=_0x28098c,this[_0x1c2708(0x151)]=_0x34b009;}async[_0x1dd4ba(0xef)](_0x30a778){const _0x3a34a1=_0x1dd4ba;var _0x34453e,_0x5b5920;const {parentId:_0x29a5a4,unitId:_0x1fe86c,text:_0x450b72,threadId:_0x292110}=_0x30a778,_0x3dd852=(_0x5b5920=(_0x34453e=_0x450b72[_0x3a34a1(0xf8)])==null?void 0x0:_0x34453e['filter'](_0x162a23=>_0x162a23[_0x3a34a1(0x13b)]===c['CustomRangeType'][_0x3a34a1(0x11a)])['map'](_0x17afe7=>_0x17afe7[_0x3a34a1(0xfc)]))!=null?_0x5b5920:[],_0x49c600=JSON[_0x3a34a1(0x11b)](_0x450b72),_0x471ed8=(await this[_0x3a34a1(0x108)]['requireSession'](_0x1fe86c))[_0x3a34a1(0x12f)]();if(_0x29a5a4){const _0x3ee836={'memberId':_0x471ed8,'unitId':_0x1fe86c,'content':_0x49c600,'mention':_0x3dd852,'threadId':_0x292110},_0x14120b=(await this[_0x3a34a1(0xeb)]['post']('/universer-api/comment/unit/'+_0x1fe86c+'/reply',{'body':_0x3ee836}))[_0x3a34a1(0x102)][_0x3a34a1(0x115)];return{..._0x30a778,'id':_0x14120b[_0x3a34a1(0x140)],'dT':c[_0x3a34a1(0x150)](+_0x14120b[_0x3a34a1(0xfb)])[_0x3a34a1(0xf0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x14120b['userId']};}else{const _0x4f9d06={'memberId':_0x471ed8,'unitId':_0x1fe86c,'content':_0x49c600,'mention':_0x3dd852},_0x545a93=await this[_0x3a34a1(0xeb)]['post'](_0x3a34a1(0xdd)+_0x1fe86c+_0x3a34a1(0x136),{'body':_0x4f9d06});return Y(_0x545a93[_0x3a34a1(0x102)][_0x3a34a1(0x116)],_0x30a778);}}async[_0x1dd4ba(0x118)](_0x4a9836){const _0x3c8a06=_0x1dd4ba;var _0x43ad1c,_0x23556e;const {text:_0x5b75c9,unitId:_0x2851}=_0x4a9836,_0x40dc32=(_0x23556e=(_0x43ad1c=_0x5b75c9[_0x3c8a06(0xf8)])==null?void 0x0:_0x43ad1c['filter'](_0x443b56=>_0x443b56[_0x3c8a06(0x13b)]===c[_0x3c8a06(0xf3)][_0x3c8a06(0x11a)])['map'](_0x51767b=>_0x51767b[_0x3c8a06(0xfc)]))!=null?_0x23556e:[],_0x5f0708=JSON[_0x3c8a06(0x11b)](_0x5b75c9),_0x2156ff=_0x4a9836[_0x3c8a06(0x13f)],_0x2de1cb=_0x4a9836['id'],_0x42964b={'memberId':(await this['_sessionService'][_0x3c8a06(0xea)](_0x2851))[_0x3c8a06(0x12f)](),'unitId':_0x2851,'threadId':_0x2156ff,'mention':_0x40dc32,'content':_0x5f0708,'replyId':_0x2de1cb},_0x1024fc=await this['_httpService'][_0x3c8a06(0xf9)]('/universer-api/comment/unit/'+_0x2851+_0x3c8a06(0xe6),{'body':_0x42964b});return!_0x1024fc['body'][_0x3c8a06(0xf1)]||_0x1024fc['body'][_0x3c8a06(0xf1)][_0x3c8a06(0x127)]===0x1;}async[_0x1dd4ba(0xdc)](_0x401945){const _0x2e87b4=_0x1dd4ba,{unitId:_0x5ecc09}=_0x401945,_0xf810df=_0x401945[_0x2e87b4(0x13f)],_0x236787={'memberId':this[_0x2e87b4(0x12d)][_0x2e87b4(0xf7)]()['userID'],'unitId':_0x5ecc09,'threadId':_0xf810df,'solved':_0x401945['resolved']?I[_0x2e87b4(0x112)]:I[_0x2e87b4(0xe0)]},_0x39a68a=await this[_0x2e87b4(0xeb)][_0x2e87b4(0xf9)]('/universer-api/comment/unit/'+_0x5ecc09+_0x2e87b4(0x128),{'body':_0x236787});return!_0x39a68a['body'][_0x2e87b4(0xf1)]||_0x39a68a[_0x2e87b4(0x102)][_0x2e87b4(0xf1)][_0x2e87b4(0x127)]===0x1;}async[_0x1dd4ba(0xe2)](_0x286fa5,_0x36cf28,_0x293534,_0x531a11){const _0x2aff67=_0x1dd4ba,_0x1a2bce={'memberId':(await this[_0x2aff67(0x108)][_0x2aff67(0xea)](_0x286fa5))[_0x2aff67(0x12f)](),'threadId':_0x293534,'replyId':_0x531a11,'unitId':_0x286fa5},_0x3a9dbf=await this[_0x2aff67(0xeb)][_0x2aff67(0xf9)](_0x2aff67(0xdd)+_0x286fa5+'/delete',{'body':_0x1a2bce});return!_0x3a9dbf[_0x2aff67(0x102)][_0x2aff67(0xf1)]||_0x3a9dbf[_0x2aff67(0x102)][_0x2aff67(0xf1)][_0x2aff67(0x127)]===0x1;}async[_0x1dd4ba(0x11d)](_0x863158,_0x40844a,_0x25c547){const _0x24478c=_0x1dd4ba,_0x207a1e={'unitId':_0x863158,'threadId':_0x25c547},_0x4e1326=await this[_0x24478c(0xeb)]['post'](_0x24478c(0xdd)+_0x863158+_0x24478c(0x109),{'body':_0x207a1e}),_0x173ba2=_0x25c547[_0x24478c(0x12e)](_0x22ab9b=>G(_0x4e1326[_0x24478c(0x102)][_0x24478c(0x124)][_0x22ab9b],_0x863158,_0x40844a))['filter'](Boolean);return Object[_0x24478c(0xff)](_0x4e1326[_0x24478c(0x102)][_0x24478c(0xdb)])['forEach'](_0x42dee3=>{const _0x425fe9=_0x24478c;this['_userService'][_0x425fe9(0x138)](_0x42dee3);}),_0x173ba2;}[_0x1dd4ba(0x134)](_0x5aab80){const _0x22133c=_0x1dd4ba;return{'id':_0x5aab80['id'],'threadId':_0x5aab80[_0x22133c(0x13f)],'ref':_0x5aab80[_0x22133c(0x120)]};}};g=x([_(0x0,c[_0x1dd4ba(0xe4)](P[_0x1dd4ba(0x14f)])),_(0x1,c['Inject'](c[_0x1dd4ba(0x14b)])),_(0x2,c[_0x1dd4ba(0xe4)](b[_0x1dd4ba(0xed)])),_(0x3,c[_0x1dd4ba(0xe4)](c[_0x1dd4ba(0xe5)]))],g);var H=Object[_0x1dd4ba(0x147)],J=(_0x3b6937,_0x50b52b,_0xd8e354,_0x400615)=>{const _0x488675=_0x1dd4ba;for(var _0x47581d=_0x400615>0x1?void 0x0:_0x400615?H(_0x50b52b,_0xd8e354):_0x50b52b,_0x49411f=_0x3b6937[_0x488675(0x146)]-0x1,_0x1865d8;_0x49411f>=0x0;_0x49411f--)(_0x1865d8=_0x3b6937[_0x49411f])&&(_0x47581d=_0x1865d8(_0x47581d)||_0x47581d);return _0x47581d;},y=(_0x26eb6c,_0x5f1949)=>(_0x4ba766,_0x22c923)=>_0x5f1949(_0x4ba766,_0x22c923,_0x26eb6c);let C=class extends c[_0x1dd4ba(0x139)]{constructor(_0x210352,_0x3fdd45){const _0x572963=_0x1dd4ba;super(),this[_0x572963(0x141)]=_0x210352,this[_0x572963(0x13e)]=_0x3fdd45,this['_initDataSource']();}[_0x1dd4ba(0x148)](){const _0x3ec04e=_0x1dd4ba;this['_threadCommentDataSourceService'][_0x3ec04e(0x130)]=this[_0x3ec04e(0x13e)],this[_0x3ec04e(0x141)]['syncUpdateMutationToColla']=!0x1;}};function _0x3ceb(){const _0x533463=['setConfig','_threadCommentDataSource','threadId','replyId','_threadCommentDataSourceService','delete','toStringTag','pipe','_initUserSync','length','getOwnPropertyDescriptor','_initDataSource','size','DependentOn','UserManagerService','user','payload','Unknown','HTTPService','dayjs','_injector','bufferTime','_commentService','add','onStarting','users','resolveComment','/universer-api/comment/unit/','thread-comment-data-source.config','symbol','OpenOrReOpen','Solve','deleteComment','UniverCollaborationClientPlugin','Inject','Injector','/edit','5okaMNQ','13373241HbrqyW','unitId','requireSession','_httpService','ThreadCommentModel','CollaborationSessionService','getUnit','addComment','format','error','YYYY/MM/DD\x20HH:mm','CustomRangeType','1548280gOvbjZ','UniverThreadCommentDataSourcePlugin','defineProperty','getCurrentUser','customRanges','post','CommentService','createTimestamp','rangeId','/universer-api/user/list','Edit','values','2090572sndTWy','_configService','body','235955UlEtEj','_config','IConfigService','708560iXpwUk','10664838giXSqk','_sessionService','/list','commentUpdate$','disposeWithMe','find','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','replies','IThreadCommentDataSourceService','Solved','solved','pluginName','reply','comment','72HOEfnn','updateComment','subscribe','COMMENT','stringify','Module','listComments','UniverThreadCommentUIPlugin','_threadCommentModel','ref','getUser','get','parse','comments','Reply','Add','code','/solved','_init','getComment','Plugin','type','_userService','map','getMemberID','dataSource','Delete','5183871Kykrzs','merge','saveCommentToSnapshot','forEach','/add','userID','addUser','Disposable','content','rangeType','slice'];_0x3ceb=function(){return _0x533463;};return _0x3ceb();}C=J([y(0x0,M[_0x1dd4ba(0x111)]),y(0x1,c[_0x1dd4ba(0xe4)](g))],C);var F=Object['defineProperty'],L=Object[_0x1dd4ba(0x147)],Z=(_0x431a09,_0x266a6b,_0x1a6902)=>_0x266a6b in _0x431a09?F(_0x431a09,_0x266a6b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a6902}):_0x431a09[_0x266a6b]=_0x1a6902,W=(_0xd4d7cc,_0x55114d,_0x1ab601,_0x24441f)=>{const _0x477570=_0x1dd4ba;for(var _0x2c482b=_0x24441f>0x1?void 0x0:_0x24441f?L(_0x55114d,_0x1ab601):_0x55114d,_0x42abf1=_0xd4d7cc[_0x477570(0x146)]-0x1,_0x3a7e14;_0x42abf1>=0x0;_0x42abf1--)(_0x3a7e14=_0xd4d7cc[_0x42abf1])&&(_0x2c482b=_0x3a7e14(_0x2c482b)||_0x2c482b);return _0x2c482b;},O=(_0x322710,_0x37b6a7)=>(_0xce5305,_0x32180a)=>_0x37b6a7(_0xce5305,_0x32180a,_0x322710),N=(_0x5dbbab,_0x83840,_0x1a9103)=>Z(_0x5dbbab,typeof _0x83840!=_0x1dd4ba(0xdf)?_0x83840+'':_0x83840,_0x1a9103);exports[_0x1dd4ba(0xf5)]=class extends c[_0x1dd4ba(0x12b)]{constructor(_0xb8c392=D,_0x3e7b0b,_0x650ecf){const _0x605506=_0x1dd4ba;super(),this['_config']=_0xb8c392,this[_0x605506(0x151)]=_0x3e7b0b,this[_0x605506(0x101)]=_0x650ecf;const {..._0x1f7e33}=c[_0x605506(0x133)]({},D,this[_0x605506(0x104)]);this['_configService'][_0x605506(0x13d)](q,_0x1f7e33);}[_0x1dd4ba(0xda)](){[[g],[C],[p]]['forEach'](_0x5a758c=>{const _0x3158d0=_0x2691;this[_0x3158d0(0x151)][_0x3158d0(0xd9)](_0x5a758c);});}['onReady'](){const _0x268ce3=_0x1dd4ba;this[_0x268ce3(0x151)]['get'](C),this[_0x268ce3(0x151)][_0x268ce3(0x122)](p);}},N(exports[_0x1dd4ba(0xf5)],_0x1dd4ba(0x114),U),N(exports[_0x1dd4ba(0xf5)],_0x1dd4ba(0x12c),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x1dd4ba(0xf5)]=W([c[_0x1dd4ba(0x14a)](j[_0x1dd4ba(0x11e)],b[_0x1dd4ba(0xe3)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x1dd4ba(0x105)])],exports[_0x1dd4ba(0xf5)]);
|
|
1
|
+
'use strict';function _0x6213(){const _0x239b3d=['resolved','getMemberID','slice','339621BwzGdV','commentUpdate$','1406850WmbGTT','_sessionService','getOwnPropertyDescriptor','/reply','map','getUnit','1797816oAPyba','format','/universer-api/user/list','OpenOrReOpen','/list','defineProperty','rangeId','_initUserSync','onReady','payload','Inject','getCurrentUser','subscribe','type','userID','pluginName','pipe','addComment','bufferTime','replies','303108pezlaa','UniverThreadCommentDataSourcePlugin','/add','7554eGSZKh','user','length','Add','unitId','createTimestamp','_commentService','comments','content','/solved','UniverThreadCommentUIPlugin','_init','body','UniverLicensePlugin','stringify','add','989019TrtANV','_userService','_threadCommentDataSource','error','getUser','solved','/delete','thread-comment-data-source.config','CustomRangeType','IThreadCommentDataSourceService','Module','CollaborationSessionService','Solved','addUser','onStarting','HTTPService','_httpService','requireSession','customRanges','reply','resolveComment','_threadCommentModel','2241yMuAfz','find','Injector','_configService','listComments','replyId','ref','UniverInstanceType','UserManagerService','disposeWithMe','code','UNIVER_UNKNOWN','_config','YYYY/MM/DD\x20HH:mm','DependentOn','COMMENT','get','410lIJfdx','rangeType','/universer-api/comment/unit/','filter','Reply','users','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solve','threadId','parse','Delete','dayjs','UniverCollaborationClientPlugin','size','Edit','deleteComment','Plugin','_threadCommentDataSourceService','UNRECOGNIZED','IConfigService','/edit','toStringTag','comment','userId','forEach','root','_initDataSource','symbol','_injector','dataSource','1127dImVsE'];_0x6213=function(){return _0x239b3d;};return _0x6213();}const _0x350e0a=_0x3deb;(function(_0x4b30a9,_0x3d23d5){const _0x23b2d6=_0x3deb,_0x212bf5=_0x4b30a9();while(!![]){try{const _0x229cad=-parseInt(_0x23b2d6(0x222))/0x1+parseInt(_0x23b2d6(0x1ff))/0x2*(-parseInt(_0x23b2d6(0x1ee))/0x3)+parseInt(_0x23b2d6(0x1c5))/0x4+parseInt(_0x23b2d6(0x224))/0x5+-parseInt(_0x23b2d6(0x1c8))/0x6*(-parseInt(_0x23b2d6(0x21e))/0x7)+parseInt(_0x23b2d6(0x1b1))/0x8+-parseInt(_0x23b2d6(0x1d8))/0x9;if(_0x229cad===_0x3d23d5)break;else _0x212bf5['push'](_0x212bf5['shift']());}catch(_0x1be531){_0x212bf5['push'](_0x212bf5['shift']());}}}(_0x6213,0x2c6a6));Object[_0x350e0a(0x1b6)](exports,Symbol[_0x350e0a(0x215)],{'value':_0x350e0a(0x1e2)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x350e0a(0x206);var I=(_0xa8d8d8=>(_0xa8d8d8[_0xa8d8d8[_0x350e0a(0x1b4)]=0x0]='OpenOrReOpen',_0xa8d8d8[_0xa8d8d8[_0x350e0a(0x1e4)]=0x1]=_0x350e0a(0x1e4),_0xa8d8d8[_0xa8d8d8[_0x350e0a(0x212)]=-0x1]=_0x350e0a(0x212),_0xa8d8d8))(I||{}),v=(_0x5e5dc6=>(_0x5e5dc6[_0x5e5dc6['Unknown']=0x0]='Unknown',_0x5e5dc6[_0x5e5dc6['Add']=0x1]=_0x350e0a(0x1cb),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x203)]=0x2]=_0x350e0a(0x203),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x20e)]=0x3]=_0x350e0a(0x20e),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x20a)]=0x4]='Delete',_0x5e5dc6[_0x5e5dc6['Solve']=0x5]=_0x350e0a(0x207),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x212)]=-0x1]=_0x350e0a(0x212),_0x5e5dc6))(v||{});const f=_0x32b45e=>c[_0x350e0a(0x20b)](new Date(+_0x32b45e))[_0x350e0a(0x1b2)](_0x350e0a(0x1fb)),R=async(_0x9a20fc,_0x3613b9)=>{const _0x26c842=_0x350e0a,_0x437748=_0x9a20fc[_0x26c842(0x1fe)](c[_0x26c842(0x1f6)]),_0x161646=_0x9a20fc[_0x26c842(0x1fe)](P[_0x26c842(0x1e7)]);_0x3613b9['forEach'](_0x405735=>{const _0x579405=_0x26c842;_0x437748[_0x579405(0x1dc)](_0x405735)&&_0x3613b9['delete'](_0x405735);}),_0x3613b9[_0x26c842(0x20d)]&&(await _0x161646[_0x26c842(0x1fe)](_0x26c842(0x1b3),{'params':{'userIDs':[..._0x3613b9]}}))[_0x26c842(0x1d4)]['users'][_0x26c842(0x218)](_0x2793ab=>{const _0x567c3a=_0x26c842;_0x2793ab&&_0x437748[_0x567c3a(0x1e5)](_0x2793ab);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x681a24,_0x23d092,_0x363cdb,_0x4fc3d2)=>{for(var _0x1ab2e6=_0x4fc3d2>0x1?void 0x0:_0x4fc3d2?$(_0x23d092,_0x363cdb):_0x23d092,_0x20020e=_0x681a24['length']-0x1,_0xc98a0f;_0x20020e>=0x0;_0x20020e--)(_0xc98a0f=_0x681a24[_0x20020e])&&(_0x1ab2e6=_0xc98a0f(_0x1ab2e6)||_0x1ab2e6);return _0x1ab2e6;},S=(_0x15cf1a,_0x3378bd)=>(_0xfe9d1d,_0x235d0b)=>_0x3378bd(_0xfe9d1d,_0x235d0b,_0x15cf1a);let p=class extends c['Disposable']{constructor(_0x50bb3c,_0x244169,_0xfce9ee,_0x3e8a18){const _0x5887da=_0x350e0a;super(),this['_commentService']=_0x50bb3c,this[_0x5887da(0x1ed)]=_0x244169,this[_0x5887da(0x1d9)]=_0xfce9ee,this['_injector']=_0x3e8a18,this['_init'](),this[_0x5887da(0x1b8)]();}[_0x350e0a(0x1b8)](){const _0x369e84=_0x350e0a;this[_0x369e84(0x1f7)](this[_0x369e84(0x1ed)][_0x369e84(0x223)][_0x369e84(0x1c1)](w[_0x369e84(0x1c3)](0x10))[_0x369e84(0x1bd)](_0x59af6a=>{const _0x3004cf=_0x369e84,_0x40f844=new Set();_0x59af6a['forEach'](_0x27bc4d=>{const _0xab37b2=_0x3deb;switch(_0x27bc4d[_0xab37b2(0x1be)]){case _0xab37b2(0x1d7):{const _0x29c351=_0x27bc4d[_0xab37b2(0x1ba)]['personId'];_0x40f844['add'](_0x29c351);break;}}}),R(this[_0x3004cf(0x21c)],_0x40f844);}));}[_0x350e0a(0x1d3)](){const _0x4737fc=_0x350e0a;this[_0x4737fc(0x1f7)](this[_0x4737fc(0x1ce)][_0x4737fc(0x223)][_0x4737fc(0x1bd)](async _0xb149cf=>{const _0x3cdc34=_0x4737fc;var _0x542f7c,_0x552d7c,_0x2ece01,_0x257214;const _0x271b15=(_0x542f7c=this['_threadCommentModel'][_0x3cdc34(0x1b0)](_0xb149cf[_0x3cdc34(0x1cc)])[_0x3cdc34(0x1ef)](_0x220dbd=>_0x220dbd[_0x3cdc34(0x208)]===_0xb149cf[_0x3cdc34(0x208)]))==null?void 0x0:_0x542f7c['root'];if(!_0x271b15)return;const {unitId:_0x37e57a,subUnitId:_0x269dcc}=_0x271b15;switch(_0xb149cf[_0x3cdc34(0x1c9)]&&this[_0x3cdc34(0x1d9)][_0x3cdc34(0x1e5)](_0xb149cf[_0x3cdc34(0x1c9)]),_0xb149cf[_0x3cdc34(0x1be)]){case v[_0x3cdc34(0x1cb)]:break;case v[_0x3cdc34(0x203)]:{this[_0x3cdc34(0x1ed)][_0x3cdc34(0x1c2)](_0x37e57a,_0x269dcc,{'unitId':_0x37e57a,'subUnitId':_0x269dcc,'ref':'','id':_0xb149cf[_0x3cdc34(0x1f3)],'dT':f(+_0xb149cf[_0x3cdc34(0x1cd)]),'threadId':_0xb149cf[_0x3cdc34(0x208)],'personId':(_0x2ece01=(_0x552d7c=_0xb149cf[_0x3cdc34(0x1c9)])==null?void 0x0:_0x552d7c[_0x3cdc34(0x1bf)])!=null?_0x2ece01:_0xb149cf[_0x3cdc34(0x217)],'text':JSON[_0x3cdc34(0x209)](_0xb149cf['content']),'parentId':_0x271b15['id']});break;}case v['Delete']:{const _0x16f2fd=this[_0x3cdc34(0x1ed)]['getComment'](_0x37e57a,_0x269dcc,_0xb149cf[_0x3cdc34(0x1f3)]);_0x16f2fd&&_0x16f2fd['parentId']&&this[_0x3cdc34(0x1ed)][_0x3cdc34(0x20f)](_0x37e57a,_0x269dcc,_0xb149cf[_0x3cdc34(0x1f3)]);break;}case v['Edit']:{this[_0x3cdc34(0x1ed)]['updateComment'](_0x37e57a,_0x269dcc,{'commentId':_0xb149cf[_0x3cdc34(0x1f3)],'text':JSON['parse'](_0xb149cf[_0x3cdc34(0x1d0)])});break;}case v[_0x3cdc34(0x207)]:{const _0x304c71=(_0x257214=this[_0x3cdc34(0x1ed)][_0x3cdc34(0x1b0)](_0xb149cf[_0x3cdc34(0x1cc)])[_0x3cdc34(0x1ef)](_0x3210b3=>_0x3210b3[_0x3cdc34(0x208)]===_0xb149cf[_0x3cdc34(0x208)]))==null?void 0x0:_0x257214[_0x3cdc34(0x219)];_0x304c71&&this[_0x3cdc34(0x1ed)][_0x3cdc34(0x1ec)](_0x37e57a,_0x269dcc,_0x304c71['id'],_0xb149cf[_0x3cdc34(0x1dd)]===I[_0x3cdc34(0x1e4)]);break;}}}));}};p=E([S(0x0,c[_0x350e0a(0x1bb)](b['CommentService'])),S(0x1,c[_0x350e0a(0x1bb)](M['ThreadCommentModel'])),S(0x2,c[_0x350e0a(0x1bb)](c[_0x350e0a(0x1f6)])),S(0x3,c[_0x350e0a(0x1bb)](c[_0x350e0a(0x1f0)]))],p);const q=_0x350e0a(0x1df),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3dd700,_0x10d10e,_0x33da3b,_0x2bec58)=>{const _0xa30039=_0x350e0a;for(var _0x2d8707=_0x2bec58>0x1?void 0x0:_0x2bec58?A(_0x10d10e,_0x33da3b):_0x10d10e,_0x73fc5b=_0x3dd700[_0xa30039(0x1ca)]-0x1,_0x1caba2;_0x73fc5b>=0x0;_0x73fc5b--)(_0x1caba2=_0x3dd700[_0x73fc5b])&&(_0x2d8707=_0x1caba2(_0x2d8707)||_0x2d8707);return _0x2d8707;},_=(_0x304452,_0x465f87)=>(_0xb2e25,_0x30f876)=>_0x465f87(_0xb2e25,_0x30f876,_0x304452);function Y(_0x477f7b,_0x56b6e8){const _0x765c5c=_0x350e0a,_0x1e2f11=_0x477f7b[_0x765c5c(0x1c4)][0x0];return{..._0x56b6e8,'id':_0x1e2f11['replyId'],'resolved':_0x477f7b[_0x765c5c(0x1dd)]===0x1,'dT':f(_0x1e2f11[_0x765c5c(0x1cd)]),'personId':_0x1e2f11[_0x765c5c(0x217)],'threadId':_0x1e2f11[_0x765c5c(0x208)]};}function G(_0x4c2874,_0x150fb7,_0x1768b6){const _0x328228=_0x350e0a;var _0x18d347,_0x1898be;if(((_0x1898be=(_0x18d347=_0x4c2874==null?void 0x0:_0x4c2874['replies'])==null?void 0x0:_0x18d347[_0x328228(0x1ca)])!=null?_0x1898be:0x0)>0x0){const _0x20f120=(_0x21c704,_0x1b7b00)=>({'id':_0x21c704[_0x328228(0x1f3)],'threadId':_0x21c704[_0x328228(0x208)],'dT':f(_0x21c704[_0x328228(0x1cd)]),'personId':_0x21c704['userId'],'resolved':_0x4c2874[_0x328228(0x1dd)]===I[_0x328228(0x1e4)],'unitId':_0x150fb7,'subUnitId':_0x1768b6,'text':JSON[_0x328228(0x209)](_0x21c704[_0x328228(0x1d0)]),'parentId':_0x1b7b00}),_0x17fc1d=_0x20f120(_0x4c2874[_0x328228(0x1c4)][0x0]);return{..._0x17fc1d,'children':_0x4c2874[_0x328228(0x1c4)][_0x328228(0x221)](0x1)[_0x328228(0x1af)](_0x5633b3=>_0x20f120(_0x5633b3,_0x17fc1d['id']))};}return null;}let g=class{constructor(_0x5cf275,_0x316786,_0x5a8d44,_0xe622c4){const _0x32d98f=_0x350e0a;this[_0x32d98f(0x1e8)]=_0x5cf275,this[_0x32d98f(0x1d9)]=_0x316786,this[_0x32d98f(0x225)]=_0x5a8d44,this[_0x32d98f(0x21c)]=_0xe622c4;}async[_0x350e0a(0x1c2)](_0x8084cf){const _0x3a7e32=_0x350e0a;var _0x3bb030,_0x5ce36f;const {parentId:_0x1f43d7,unitId:_0x3face3,text:_0x3db784,threadId:_0x548423}=_0x8084cf,_0x2d009f=(_0x5ce36f=(_0x3bb030=_0x3db784[_0x3a7e32(0x1ea)])==null?void 0x0:_0x3bb030[_0x3a7e32(0x202)](_0xd929a1=>_0xd929a1['rangeType']===c[_0x3a7e32(0x1e0)][_0x3a7e32(0x1fd)])[_0x3a7e32(0x1af)](_0x54203c=>_0x54203c['rangeId']))!=null?_0x5ce36f:[],_0x9cd30c=JSON[_0x3a7e32(0x1d6)](_0x3db784),_0x7cf503=(await this[_0x3a7e32(0x225)][_0x3a7e32(0x1e9)](_0x3face3))[_0x3a7e32(0x220)]();if(_0x1f43d7){const _0x8c12a0={'memberId':_0x7cf503,'unitId':_0x3face3,'content':_0x9cd30c,'mention':_0x2d009f,'threadId':_0x548423},_0x1d71b9=(await this[_0x3a7e32(0x1e8)][_0x3a7e32(0x205)](_0x3a7e32(0x201)+_0x3face3+_0x3a7e32(0x1ae),{'body':_0x8c12a0}))[_0x3a7e32(0x1d4)][_0x3a7e32(0x1eb)];return{..._0x8084cf,'id':_0x1d71b9[_0x3a7e32(0x1f3)],'dT':c['dayjs'](+_0x1d71b9[_0x3a7e32(0x1cd)])[_0x3a7e32(0x1b2)](_0x3a7e32(0x1fb)),'personId':_0x1d71b9[_0x3a7e32(0x217)]};}else{const _0x5c6d58={'memberId':_0x7cf503,'unitId':_0x3face3,'content':_0x9cd30c,'mention':_0x2d009f},_0x49e4d4=await this[_0x3a7e32(0x1e8)][_0x3a7e32(0x205)]('/universer-api/comment/unit/'+_0x3face3+_0x3a7e32(0x1c7),{'body':_0x5c6d58});return Y(_0x49e4d4[_0x3a7e32(0x1d4)][_0x3a7e32(0x216)],_0x8084cf);}}async['updateComment'](_0x36e78d){const _0x16e338=_0x350e0a;var _0x3f540a,_0x36120d;const {text:_0x52c3d2,unitId:_0x46ecbd}=_0x36e78d,_0x7ea661=(_0x36120d=(_0x3f540a=_0x52c3d2[_0x16e338(0x1ea)])==null?void 0x0:_0x3f540a[_0x16e338(0x202)](_0x416680=>_0x416680[_0x16e338(0x200)]===c[_0x16e338(0x1e0)][_0x16e338(0x1fd)])[_0x16e338(0x1af)](_0x3a5473=>_0x3a5473[_0x16e338(0x1b7)]))!=null?_0x36120d:[],_0x178d30=JSON[_0x16e338(0x1d6)](_0x52c3d2),_0xb3d528=_0x36e78d[_0x16e338(0x208)],_0x14c1a4=_0x36e78d['id'],_0x5162a6={'memberId':(await this[_0x16e338(0x225)]['requireSession'](_0x46ecbd))['getMemberID'](),'unitId':_0x46ecbd,'threadId':_0xb3d528,'mention':_0x7ea661,'content':_0x178d30,'replyId':_0x14c1a4},_0x2c0737=await this[_0x16e338(0x1e8)]['post'](_0x16e338(0x201)+_0x46ecbd+_0x16e338(0x214),{'body':_0x5162a6});return!_0x2c0737[_0x16e338(0x1d4)]['error']||_0x2c0737[_0x16e338(0x1d4)][_0x16e338(0x1db)][_0x16e338(0x1f8)]===0x1;}async[_0x350e0a(0x1ec)](_0xddecd6){const _0xa85d16=_0x350e0a,{unitId:_0x5da228}=_0xddecd6,_0x11ccf8=_0xddecd6[_0xa85d16(0x208)],_0x80bc7f={'memberId':this[_0xa85d16(0x1d9)][_0xa85d16(0x1bc)]()[_0xa85d16(0x1bf)],'unitId':_0x5da228,'threadId':_0x11ccf8,'solved':_0xddecd6[_0xa85d16(0x21f)]?I['Solved']:I[_0xa85d16(0x1b4)]},_0x2d2501=await this[_0xa85d16(0x1e8)][_0xa85d16(0x205)](_0xa85d16(0x201)+_0x5da228+_0xa85d16(0x1d1),{'body':_0x80bc7f});return!_0x2d2501['body'][_0xa85d16(0x1db)]||_0x2d2501['body'][_0xa85d16(0x1db)]['code']===0x1;}async['deleteComment'](_0x3b07ae,_0xbb72b9,_0x4a5942,_0x69de27){const _0x4f7985=_0x350e0a,_0x5b2266={'memberId':(await this[_0x4f7985(0x225)][_0x4f7985(0x1e9)](_0x3b07ae))['getMemberID'](),'threadId':_0x4a5942,'replyId':_0x69de27,'unitId':_0x3b07ae},_0xe19a53=await this['_httpService']['post'](_0x4f7985(0x201)+_0x3b07ae+_0x4f7985(0x1de),{'body':_0x5b2266});return!_0xe19a53[_0x4f7985(0x1d4)][_0x4f7985(0x1db)]||_0xe19a53[_0x4f7985(0x1d4)]['error']['code']===0x1;}async[_0x350e0a(0x1f2)](_0x4345a6,_0x14a293,_0x2c7ceb){const _0x392680=_0x350e0a,_0x3fe90d={'unitId':_0x4345a6,'threadId':_0x2c7ceb},_0x270c0c=await this['_httpService'][_0x392680(0x205)](_0x392680(0x201)+_0x4345a6+_0x392680(0x1b5),{'body':_0x3fe90d}),_0xd55bc5=_0x2c7ceb[_0x392680(0x1af)](_0x3c6aaf=>G(_0x270c0c[_0x392680(0x1d4)][_0x392680(0x1cf)][_0x3c6aaf],_0x4345a6,_0x14a293))[_0x392680(0x202)](Boolean);return Object['values'](_0x270c0c['body'][_0x392680(0x204)])[_0x392680(0x218)](_0x5de9df=>{const _0x24a4e9=_0x392680;this[_0x24a4e9(0x1d9)]['addUser'](_0x5de9df);}),_0xd55bc5;}['saveCommentToSnapshot'](_0x483c68){const _0xc7afee=_0x350e0a;return{'id':_0x483c68['id'],'threadId':_0x483c68[_0xc7afee(0x208)],'ref':_0x483c68[_0xc7afee(0x1f4)]};}};g=x([_(0x0,c[_0x350e0a(0x1bb)](P[_0x350e0a(0x1e7)])),_(0x1,c[_0x350e0a(0x1bb)](c[_0x350e0a(0x1f6)])),_(0x2,c['Inject'](b[_0x350e0a(0x1e3)])),_(0x3,c[_0x350e0a(0x1bb)](c['Injector']))],g);var H=Object[_0x350e0a(0x1ad)],J=(_0x3422f2,_0x188eef,_0x4958c4,_0x4b62a2)=>{const _0x84b886=_0x350e0a;for(var _0x32b621=_0x4b62a2>0x1?void 0x0:_0x4b62a2?H(_0x188eef,_0x4958c4):_0x188eef,_0x1c1c26=_0x3422f2[_0x84b886(0x1ca)]-0x1,_0xa3768c;_0x1c1c26>=0x0;_0x1c1c26--)(_0xa3768c=_0x3422f2[_0x1c1c26])&&(_0x32b621=_0xa3768c(_0x32b621)||_0x32b621);return _0x32b621;},y=(_0x5b4ca4,_0x11a451)=>(_0x15551d,_0x360f6c)=>_0x11a451(_0x15551d,_0x360f6c,_0x5b4ca4);let C=class extends c['Disposable']{constructor(_0x4891a1,_0x4798d0){const _0x30f266=_0x350e0a;super(),this[_0x30f266(0x211)]=_0x4891a1,this[_0x30f266(0x1da)]=_0x4798d0,this[_0x30f266(0x21a)]();}[_0x350e0a(0x21a)](){const _0x3f46d0=_0x350e0a;this[_0x3f46d0(0x211)][_0x3f46d0(0x21d)]=this[_0x3f46d0(0x1da)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x350e0a(0x1e1)]),y(0x1,c['Inject'](g))],C);function _0x3deb(_0x380944,_0x3d39c5){const _0x621387=_0x6213();return _0x3deb=function(_0x3debbd,_0x4fe00f){_0x3debbd=_0x3debbd-0x1ad;let _0x57266b=_0x621387[_0x3debbd];return _0x57266b;},_0x3deb(_0x380944,_0x3d39c5);}var F=Object[_0x350e0a(0x1b6)],L=Object[_0x350e0a(0x1ad)],Z=(_0x5078f7,_0x210dfb,_0xc6f117)=>_0x210dfb in _0x5078f7?F(_0x5078f7,_0x210dfb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc6f117}):_0x5078f7[_0x210dfb]=_0xc6f117,W=(_0x38217b,_0x7e1625,_0x570f83,_0x3cd66c)=>{const _0x247942=_0x350e0a;for(var _0x26249f=_0x3cd66c>0x1?void 0x0:_0x3cd66c?L(_0x7e1625,_0x570f83):_0x7e1625,_0x5e20a1=_0x38217b[_0x247942(0x1ca)]-0x1,_0x14032f;_0x5e20a1>=0x0;_0x5e20a1--)(_0x14032f=_0x38217b[_0x5e20a1])&&(_0x26249f=_0x14032f(_0x26249f)||_0x26249f);return _0x26249f;},O=(_0xea6060,_0xfc08f2)=>(_0x578d89,_0x1a0cce)=>_0xfc08f2(_0x578d89,_0x1a0cce,_0xea6060),N=(_0x318db4,_0x3e8fcd,_0x1204d1)=>Z(_0x318db4,typeof _0x3e8fcd!=_0x350e0a(0x21b)?_0x3e8fcd+'':_0x3e8fcd,_0x1204d1);exports[_0x350e0a(0x1c6)]=class extends c[_0x350e0a(0x210)]{constructor(_0x2ec87d=D,_0x16a19d,_0x193816){const _0x2de292=_0x350e0a;super(),this[_0x2de292(0x1fa)]=_0x2ec87d,this[_0x2de292(0x21c)]=_0x16a19d,this[_0x2de292(0x1f1)]=_0x193816;const {..._0x28e782}=c['merge']({},D,this[_0x2de292(0x1fa)]);this[_0x2de292(0x1f1)]['setConfig'](q,_0x28e782);}[_0x350e0a(0x1e6)](){const _0x461aac=_0x350e0a;[[g],[C],[p]][_0x461aac(0x218)](_0x1cf5b8=>{const _0x491e1a=_0x461aac;this['_injector'][_0x491e1a(0x1d7)](_0x1cf5b8);});}[_0x350e0a(0x1b9)](){const _0x566094=_0x350e0a;this['_injector'][_0x566094(0x1fe)](C),this[_0x566094(0x21c)][_0x566094(0x1fe)](p);}},N(exports[_0x350e0a(0x1c6)],_0x350e0a(0x1c0),U),N(exports[_0x350e0a(0x1c6)],'type',c[_0x350e0a(0x1f5)][_0x350e0a(0x1f9)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x350e0a(0x1fc)](j[_0x350e0a(0x1d2)],b[_0x350e0a(0x20c)],T[_0x350e0a(0x1d5)]),O(0x1,c['Inject'](c[_0x350e0a(0x1f0)])),O(0x2,c[_0x350e0a(0x213)])],exports[_0x350e0a(0x1c6)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2319(){const _0x5d0f62=['/delete','parse','payload','rangeType','OpenOrReOpen','_injector','user','subscribe','users','/list','body','getCurrentUser','updateComment','userId','replies','40ZLfDWk','172BrtCUe','root','YYYY/MM/DD\x20HH:mm','_httpService','ref','1042281EYBXlf','_threadCommentDataSource','_initUserSync','code','get','Solve','281969ILZRYe','delete','/solved','resolveComment','_configService','requireSession','values','disposeWithMe','find','threadId','userID','UNRECOGNIZED','getMemberID','error','addUser','content','_commentService','onReady','slice','replyId','getOwnPropertyDescriptor','getUser','format','createTimestamp','getComment','_sessionService','solved','syncUpdateMutationToColla','resolved','/add','Solved','type','setConfig','_threadCommentModel','UNIVER_UNKNOWN','Reply','onStarting','17280aVxQUW','_initDataSource','addComment','Delete','1274862hFUalg','reply','_threadCommentDataSourceService','symbol','saveCommentToSnapshot','filter','forEach','237534gtaeKT','_userService','/universer-api/user/list','stringify','/universer-api/comment/unit/','thread-comment-data-source.config','rangeId','post','add','Edit','map','length','commentUpdate$','customRanges','getUnit','comments','Unknown','73479LMqijt','unitId','17646GVUvGS','/edit','COMMENT','Add'];_0x2319=function(){return _0x5d0f62;};return _0x2319();}const _0x47fc26=_0x260c;(function(_0x34ba70,_0x281d95){const _0x164bb9=_0x260c,_0x41c8a0=_0x34ba70();while(!![]){try{const _0x5d2c18=parseInt(_0x164bb9(0x1e7))/0x1+-parseInt(_0x164bb9(0x1c8))/0x2+-parseInt(_0x164bb9(0x1ae))/0x3+parseInt(_0x164bb9(0x1dc))/0x4*(-parseInt(_0x164bb9(0x1aa))/0x5)+-parseInt(_0x164bb9(0x1b5))/0x6+-parseInt(_0x164bb9(0x1c6))/0x7+-parseInt(_0x164bb9(0x1db))/0x8*(-parseInt(_0x164bb9(0x1e1))/0x9);if(_0x5d2c18===_0x281d95)break;else _0x41c8a0['push'](_0x41c8a0['shift']());}catch(_0x57ff1e){_0x41c8a0['push'](_0x41c8a0['shift']());}}}(_0x2319,0x37cbf));import{CommentService as _0x5dcb26,CollaborationSessionService as _0xf33af6,UniverCollaborationClientPlugin as _0x83ef3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xc79184}from'@univerjs-pro/license';import{dayjs as _0x9aa364,UserManagerService as _0x3be824,Inject as _0x321edf,Injector as _0x1f30c6,Disposable as _0x585462,CustomRangeType as _0x2d49c8,UniverInstanceType as _0xede23f,DependentOn as _0xa6f944,IConfigService as _0x54450d,Plugin as _0x2d2250,merge as _0x54b819}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ec74e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2f0c98,IThreadCommentDataSourceService as _0x41c736}from'@univerjs/thread-comment';import{bufferTime as _0x5c1b54}from'rxjs';import{HTTPService as _0x1c9089}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x260c(_0x1b6059,_0x4b5457){const _0x2319c2=_0x2319();return _0x260c=function(_0x260cb4,_0x1d9c9f){_0x260cb4=_0x260cb4-0x196;let _0x2ba24f=_0x2319c2[_0x260cb4];return _0x2ba24f;},_0x260c(_0x1b6059,_0x4b5457);}var I=(_0x1735f5=>(_0x1735f5[_0x1735f5['OpenOrReOpen']=0x0]=_0x47fc26(0x1d0),_0x1735f5[_0x1735f5[_0x47fc26(0x1a3)]=0x1]=_0x47fc26(0x1a3),_0x1735f5[_0x1735f5[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0x1735f5))(I||{}),v=(_0xa927a8=>(_0xa927a8[_0xa927a8[_0x47fc26(0x1c5)]=0x0]=_0x47fc26(0x1c5),_0xa927a8[_0xa927a8[_0x47fc26(0x1cb)]=0x1]=_0x47fc26(0x1cb),_0xa927a8[_0xa927a8['Reply']=0x2]=_0x47fc26(0x1a8),_0xa927a8[_0xa927a8[_0x47fc26(0x1be)]=0x3]=_0x47fc26(0x1be),_0xa927a8[_0xa927a8[_0x47fc26(0x1ad)]=0x4]='Delete',_0xa927a8[_0xa927a8['Solve']=0x5]=_0x47fc26(0x1e6),_0xa927a8[_0xa927a8[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0xa927a8))(v||{});const D=_0x16a323=>_0x9aa364(new Date(+_0x16a323))[_0x47fc26(0x19b)](_0x47fc26(0x1de)),B=async(_0x2b5b34,_0xb608ae)=>{const _0x5e9aa2=_0x47fc26,_0x166a96=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x3be824),_0x53447d=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x1c9089);_0xb608ae[_0x5e9aa2(0x1b4)](_0x12b073=>{const _0x50362d=_0x5e9aa2;_0x166a96[_0x50362d(0x19a)](_0x12b073)&&_0xb608ae[_0x50362d(0x1e8)](_0x12b073);}),_0xb608ae['size']&&(await _0x53447d[_0x5e9aa2(0x1e5)](_0x5e9aa2(0x1b7),{'params':{'userIDs':[..._0xb608ae]}}))[_0x5e9aa2(0x1d6)][_0x5e9aa2(0x1d4)]['forEach'](_0x218867=>{const _0x55796c=_0x5e9aa2;_0x218867&&_0x166a96[_0x55796c(0x1f5)](_0x218867);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x927c31,_0x5203ba,_0x7daad,_0x33d3a2)=>{for(var _0x13fef0=_0x33d3a2>0x1?void 0x0:_0x33d3a2?K(_0x5203ba,_0x7daad):_0x5203ba,_0x3ab8a3=_0x927c31['length']-0x1,_0x15c4ec;_0x3ab8a3>=0x0;_0x3ab8a3--)(_0x15c4ec=_0x927c31[_0x3ab8a3])&&(_0x13fef0=_0x15c4ec(_0x13fef0)||_0x13fef0);return _0x13fef0;},p=(_0x319415,_0x408d31)=>(_0x3ce163,_0x330555)=>_0x408d31(_0x3ce163,_0x330555,_0x319415);let S=class extends _0x585462{constructor(_0x328b88,_0x299aec,_0x4122a8,_0x371c70){const _0xe29ead=_0x47fc26;super(),this[_0xe29ead(0x1f7)]=_0x328b88,this['_threadCommentModel']=_0x299aec,this[_0xe29ead(0x1b6)]=_0x4122a8,this[_0xe29ead(0x1d1)]=_0x371c70,this['_init'](),this[_0xe29ead(0x1e3)]();}[_0x47fc26(0x1e3)](){const _0x17bd23=_0x47fc26;this[_0x17bd23(0x1ee)](this[_0x17bd23(0x1a6)][_0x17bd23(0x1c1)]['pipe'](_0x5c1b54(0x10))[_0x17bd23(0x1d3)](_0x4c50a4=>{const _0x39c352=new Set();_0x4c50a4['forEach'](_0x4ced81=>{const _0x293fa5=_0x260c;switch(_0x4ced81['type']){case _0x293fa5(0x1bd):{const _0x1259e1=_0x4ced81[_0x293fa5(0x1ce)]['personId'];_0x39c352[_0x293fa5(0x1bd)](_0x1259e1);break;}}}),B(this['_injector'],_0x39c352);}));}['_init'](){const _0x488d94=_0x47fc26;this[_0x488d94(0x1ee)](this['_commentService'][_0x488d94(0x1c1)]['subscribe'](async _0x1d5bc8=>{const _0x117830=_0x488d94;var _0x375766,_0x1b270a,_0x140070,_0x3ca7fa;const _0x1520a3=(_0x375766=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8[_0x117830(0x1c7)])[_0x117830(0x1ef)](_0x3d2791=>_0x3d2791[_0x117830(0x1f0)]===_0x1d5bc8['threadId']))==null?void 0x0:_0x375766['root'];if(!_0x1520a3)return;const {unitId:_0xeef3a8,subUnitId:_0x46d4dd}=_0x1520a3;switch(_0x1d5bc8[_0x117830(0x1d2)]&&this[_0x117830(0x1b6)]['addUser'](_0x1d5bc8['user']),_0x1d5bc8[_0x117830(0x1a4)]){case v['Add']:break;case v[_0x117830(0x1a8)]:{this[_0x117830(0x1a6)][_0x117830(0x1ac)](_0xeef3a8,_0x46d4dd,{'unitId':_0xeef3a8,'subUnitId':_0x46d4dd,'ref':'','id':_0x1d5bc8[_0x117830(0x198)],'dT':D(+_0x1d5bc8[_0x117830(0x19c)]),'threadId':_0x1d5bc8['threadId'],'personId':(_0x140070=(_0x1b270a=_0x1d5bc8[_0x117830(0x1d2)])==null?void 0x0:_0x1b270a[_0x117830(0x1f1)])!=null?_0x140070:_0x1d5bc8[_0x117830(0x1d9)],'text':JSON['parse'](_0x1d5bc8[_0x117830(0x1f6)]),'parentId':_0x1520a3['id']});break;}case v[_0x117830(0x1ad)]:{const _0x1583aa=this[_0x117830(0x1a6)][_0x117830(0x19d)](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);_0x1583aa&&_0x1583aa['parentId']&&this[_0x117830(0x1a6)]['deleteComment'](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);break;}case v[_0x117830(0x1be)]:{this[_0x117830(0x1a6)][_0x117830(0x1d8)](_0xeef3a8,_0x46d4dd,{'commentId':_0x1d5bc8['replyId'],'text':JSON[_0x117830(0x1cd)](_0x1d5bc8[_0x117830(0x1f6)])});break;}case v[_0x117830(0x1e6)]:{const _0x43ddca=(_0x3ca7fa=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8['unitId'])[_0x117830(0x1ef)](_0x1ead56=>_0x1ead56[_0x117830(0x1f0)]===_0x1d5bc8[_0x117830(0x1f0)]))==null?void 0x0:_0x3ca7fa[_0x117830(0x1dd)];_0x43ddca&&this[_0x117830(0x1a6)][_0x117830(0x1ea)](_0xeef3a8,_0x46d4dd,_0x43ddca['id'],_0x1d5bc8[_0x117830(0x19f)]===I[_0x117830(0x1a3)]);break;}}}));}};S=V([p(0x0,_0x321edf(_0x5dcb26)),p(0x1,_0x321edf(_0x2f0c98)),p(0x2,_0x321edf(_0x3be824)),p(0x3,_0x321edf(_0x1f30c6))],S);const z=_0x47fc26(0x1ba),M={};var k=Object[_0x47fc26(0x199)],Q=(_0xb09a87,_0x49f828,_0x39d4ac,_0x11304b)=>{const _0x5f43b1=_0x47fc26;for(var _0x2a38ae=_0x11304b>0x1?void 0x0:_0x11304b?k(_0x49f828,_0x39d4ac):_0x49f828,_0xae389=_0xb09a87[_0x5f43b1(0x1c0)]-0x1,_0x4b9d81;_0xae389>=0x0;_0xae389--)(_0x4b9d81=_0xb09a87[_0xae389])&&(_0x2a38ae=_0x4b9d81(_0x2a38ae)||_0x2a38ae);return _0x2a38ae;},_=(_0x35d2f9,_0x1ad20e)=>(_0x437467,_0x3bf411)=>_0x1ad20e(_0x437467,_0x3bf411,_0x35d2f9);function X(_0x13a250,_0x3481b4){const _0x4c4870=_0x47fc26,_0x30cb26=_0x13a250[_0x4c4870(0x1da)][0x0];return{..._0x3481b4,'id':_0x30cb26['replyId'],'resolved':_0x13a250[_0x4c4870(0x19f)]===0x1,'dT':D(_0x30cb26[_0x4c4870(0x19c)]),'personId':_0x30cb26[_0x4c4870(0x1d9)],'threadId':_0x30cb26[_0x4c4870(0x1f0)]};}function ee(_0x36cb90,_0x243ef9,_0x36dd4b){const _0x491b54=_0x47fc26;var _0x1bdd23,_0x3e3238;if(((_0x3e3238=(_0x1bdd23=_0x36cb90==null?void 0x0:_0x36cb90[_0x491b54(0x1da)])==null?void 0x0:_0x1bdd23[_0x491b54(0x1c0)])!=null?_0x3e3238:0x0)>0x0){const _0x2ee385=(_0x4deaeb,_0x527cf1)=>({'id':_0x4deaeb[_0x491b54(0x198)],'threadId':_0x4deaeb[_0x491b54(0x1f0)],'dT':D(_0x4deaeb[_0x491b54(0x19c)]),'personId':_0x4deaeb[_0x491b54(0x1d9)],'resolved':_0x36cb90[_0x491b54(0x19f)]===I[_0x491b54(0x1a3)],'unitId':_0x243ef9,'subUnitId':_0x36dd4b,'text':JSON[_0x491b54(0x1cd)](_0x4deaeb[_0x491b54(0x1f6)]),'parentId':_0x527cf1}),_0x28a5c6=_0x2ee385(_0x36cb90[_0x491b54(0x1da)][0x0]);return{..._0x28a5c6,'children':_0x36cb90[_0x491b54(0x1da)][_0x491b54(0x197)](0x1)[_0x491b54(0x1bf)](_0x43b292=>_0x2ee385(_0x43b292,_0x28a5c6['id']))};}return null;}let f=class{constructor(_0xabc3b9,_0x3519ce,_0x521326,_0x36f213){const _0x283bd4=_0x47fc26;this[_0x283bd4(0x1df)]=_0xabc3b9,this[_0x283bd4(0x1b6)]=_0x3519ce,this['_sessionService']=_0x521326,this[_0x283bd4(0x1d1)]=_0x36f213;}async[_0x47fc26(0x1ac)](_0x52630d){const _0x2eb6c6=_0x47fc26;var _0x23bfc9,_0x42c2ba;const {parentId:_0x25451b,unitId:_0x31df77,text:_0x5e6e3e,threadId:_0x3794f7}=_0x52630d,_0x6d3777=(_0x42c2ba=(_0x23bfc9=_0x5e6e3e[_0x2eb6c6(0x1c2)])==null?void 0x0:_0x23bfc9[_0x2eb6c6(0x1b3)](_0x549e21=>_0x549e21[_0x2eb6c6(0x1cf)]===_0x2d49c8[_0x2eb6c6(0x1ca)])[_0x2eb6c6(0x1bf)](_0x3ae6da=>_0x3ae6da[_0x2eb6c6(0x1bb)]))!=null?_0x42c2ba:[],_0xfc668a=JSON[_0x2eb6c6(0x1b8)](_0x5e6e3e),_0xa4f0eb=(await this[_0x2eb6c6(0x19e)][_0x2eb6c6(0x1ec)](_0x31df77))['getMemberID']();if(_0x25451b){const _0x549871={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777,'threadId':_0x3794f7},_0x3343f1=(await this[_0x2eb6c6(0x1df)]['post'](_0x2eb6c6(0x1b9)+_0x31df77+'/reply',{'body':_0x549871}))['body'][_0x2eb6c6(0x1af)];return{..._0x52630d,'id':_0x3343f1[_0x2eb6c6(0x198)],'dT':_0x9aa364(+_0x3343f1[_0x2eb6c6(0x19c)])['format'](_0x2eb6c6(0x1de)),'personId':_0x3343f1[_0x2eb6c6(0x1d9)]};}else{const _0x3b5f58={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777},_0x1064e7=await this[_0x2eb6c6(0x1df)][_0x2eb6c6(0x1bc)](_0x2eb6c6(0x1b9)+_0x31df77+_0x2eb6c6(0x1a2),{'body':_0x3b5f58});return X(_0x1064e7['body']['comment'],_0x52630d);}}async[_0x47fc26(0x1d8)](_0x3f2525){const _0x135b2c=_0x47fc26;var _0x532785,_0x1c5ce6;const {text:_0x34b779,unitId:_0x45480a}=_0x3f2525,_0x2555c6=(_0x1c5ce6=(_0x532785=_0x34b779[_0x135b2c(0x1c2)])==null?void 0x0:_0x532785[_0x135b2c(0x1b3)](_0x356601=>_0x356601[_0x135b2c(0x1cf)]===_0x2d49c8[_0x135b2c(0x1ca)])[_0x135b2c(0x1bf)](_0x16f542=>_0x16f542[_0x135b2c(0x1bb)]))!=null?_0x1c5ce6:[],_0x1f488d=JSON[_0x135b2c(0x1b8)](_0x34b779),_0x346b58=_0x3f2525[_0x135b2c(0x1f0)],_0x576f41=_0x3f2525['id'],_0xc798ea={'memberId':(await this[_0x135b2c(0x19e)][_0x135b2c(0x1ec)](_0x45480a))[_0x135b2c(0x1f3)](),'unitId':_0x45480a,'threadId':_0x346b58,'mention':_0x2555c6,'content':_0x1f488d,'replyId':_0x576f41},_0x56a8b3=await this['_httpService']['post'](_0x135b2c(0x1b9)+_0x45480a+_0x135b2c(0x1c9),{'body':_0xc798ea});return!_0x56a8b3[_0x135b2c(0x1d6)]['error']||_0x56a8b3[_0x135b2c(0x1d6)][_0x135b2c(0x1f4)][_0x135b2c(0x1e4)]===0x1;}async[_0x47fc26(0x1ea)](_0x4cdbc9){const _0x352b68=_0x47fc26,{unitId:_0x395a1e}=_0x4cdbc9,_0x248276=_0x4cdbc9[_0x352b68(0x1f0)],_0x395e81={'memberId':this[_0x352b68(0x1b6)][_0x352b68(0x1d7)]()[_0x352b68(0x1f1)],'unitId':_0x395a1e,'threadId':_0x248276,'solved':_0x4cdbc9[_0x352b68(0x1a1)]?I[_0x352b68(0x1a3)]:I['OpenOrReOpen']},_0x3938f9=await this['_httpService'][_0x352b68(0x1bc)](_0x352b68(0x1b9)+_0x395a1e+_0x352b68(0x1e9),{'body':_0x395e81});return!_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]||_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]['code']===0x1;}async['deleteComment'](_0x19388c,_0x13ffcc,_0x109415,_0x536d68){const _0x4a289e=_0x47fc26,_0x2b09eb={'memberId':(await this['_sessionService'][_0x4a289e(0x1ec)](_0x19388c))['getMemberID'](),'threadId':_0x109415,'replyId':_0x536d68,'unitId':_0x19388c},_0x223195=await this[_0x4a289e(0x1df)][_0x4a289e(0x1bc)](_0x4a289e(0x1b9)+_0x19388c+_0x4a289e(0x1cc),{'body':_0x2b09eb});return!_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]||_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]['code']===0x1;}async['listComments'](_0x57d844,_0xe2c5f7,_0x474ede){const _0x248abd=_0x47fc26,_0x384bc3={'unitId':_0x57d844,'threadId':_0x474ede},_0x1e8b60=await this[_0x248abd(0x1df)][_0x248abd(0x1bc)](_0x248abd(0x1b9)+_0x57d844+_0x248abd(0x1d5),{'body':_0x384bc3}),_0x5d5815=_0x474ede['map'](_0x3835e5=>ee(_0x1e8b60['body'][_0x248abd(0x1c4)][_0x3835e5],_0x57d844,_0xe2c5f7))['filter'](Boolean);return Object[_0x248abd(0x1ed)](_0x1e8b60[_0x248abd(0x1d6)][_0x248abd(0x1d4)])[_0x248abd(0x1b4)](_0x20a2ef=>{const _0x9d257f=_0x248abd;this['_userService'][_0x9d257f(0x1f5)](_0x20a2ef);}),_0x5d5815;}[_0x47fc26(0x1b2)](_0x565e7e){const _0x52ea76=_0x47fc26;return{'id':_0x565e7e['id'],'threadId':_0x565e7e[_0x52ea76(0x1f0)],'ref':_0x565e7e[_0x52ea76(0x1e0)]};}};f=Q([_(0x0,_0x321edf(_0x1c9089)),_(0x1,_0x321edf(_0x3be824)),_(0x2,_0x321edf(_0xf33af6)),_(0x3,_0x321edf(_0x1f30c6))],f);var re=Object[_0x47fc26(0x199)],te=(_0x4a0a8d,_0x678ea1,_0x36a12c,_0x508e21)=>{const _0x359bd0=_0x47fc26;for(var _0x1986fb=_0x508e21>0x1?void 0x0:_0x508e21?re(_0x678ea1,_0x36a12c):_0x678ea1,_0x14943a=_0x4a0a8d[_0x359bd0(0x1c0)]-0x1,_0x5b2474;_0x14943a>=0x0;_0x14943a--)(_0x5b2474=_0x4a0a8d[_0x14943a])&&(_0x1986fb=_0x5b2474(_0x1986fb)||_0x1986fb);return _0x1986fb;},N=(_0x50fb3c,_0x55a612)=>(_0x3d1b84,_0x389020)=>_0x55a612(_0x3d1b84,_0x389020,_0x50fb3c);let g=class extends _0x585462{constructor(_0x2dd2b4,_0x59b55b){const _0x109c38=_0x47fc26;super(),this['_threadCommentDataSourceService']=_0x2dd2b4,this[_0x109c38(0x1e2)]=_0x59b55b,this[_0x109c38(0x1ab)]();}['_initDataSource'](){const _0x49f5d8=_0x47fc26;this['_threadCommentDataSourceService']['dataSource']=this[_0x49f5d8(0x1e2)],this[_0x49f5d8(0x1b0)][_0x49f5d8(0x1a0)]=!0x1;}};g=te([N(0x0,_0x41c736),N(0x1,_0x321edf(f))],g);var se=Object['defineProperty'],oe=Object[_0x47fc26(0x199)],ne=(_0x1efed7,_0x3878e0,_0x1dfefd)=>_0x3878e0 in _0x1efed7?se(_0x1efed7,_0x3878e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1dfefd}):_0x1efed7[_0x3878e0]=_0x1dfefd,ie=(_0x49bc90,_0x15fb9c,_0x19e5c9,_0xfb9733)=>{const _0x51b755=_0x47fc26;for(var _0x4b70bb=_0xfb9733>0x1?void 0x0:_0xfb9733?oe(_0x15fb9c,_0x19e5c9):_0x15fb9c,_0x2b4c59=_0x49bc90[_0x51b755(0x1c0)]-0x1,_0x5e1f2a;_0x2b4c59>=0x0;_0x2b4c59--)(_0x5e1f2a=_0x49bc90[_0x2b4c59])&&(_0x4b70bb=_0x5e1f2a(_0x4b70bb)||_0x4b70bb);return _0x4b70bb;},w=(_0x39523f,_0x2f4b3c)=>(_0x34bfe4,_0x237f64)=>_0x2f4b3c(_0x34bfe4,_0x237f64,_0x39523f),$=(_0x4a94e3,_0x1c03af,_0x5e4f58)=>ne(_0x4a94e3,typeof _0x1c03af!=_0x47fc26(0x1b1)?_0x1c03af+'':_0x1c03af,_0x5e4f58);let b=class extends _0x2d2250{constructor(_0x45ee8c=M,_0x2f3010,_0x1dd338){const _0x372e26=_0x47fc26;super(),this['_config']=_0x45ee8c,this[_0x372e26(0x1d1)]=_0x2f3010,this[_0x372e26(0x1eb)]=_0x1dd338;const {..._0x59f697}=_0x54b819({},M,this['_config']);this[_0x372e26(0x1eb)][_0x372e26(0x1a5)](z,_0x59f697);}[_0x47fc26(0x1a9)](){[[f],[g],[S]]['forEach'](_0x18c6a2=>{const _0x284bd3=_0x260c;this[_0x284bd3(0x1d1)][_0x284bd3(0x1bd)](_0x18c6a2);});}[_0x47fc26(0x196)](){const _0x9ed62=_0x47fc26;this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](g),this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](S);}};$(b,'pluginName',W),$(b,_0x47fc26(0x1a4),_0xede23f[_0x47fc26(0x1a7)]),b=ie([_0xa6f944(_0x5ec74e,_0x83ef3,_0xc79184),w(0x1,_0x321edf(_0x1f30c6)),w(0x2,_0x54450d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x58fd22=_0x16ea;(function(_0x1b16e0,_0xb8f6c6){const _0xd61e42=_0x16ea,_0x38b61d=_0x1b16e0();while(!![]){try{const _0x453853=parseInt(_0xd61e42(0x15d))/0x1+-parseInt(_0xd61e42(0x1b1))/0x2*(parseInt(_0xd61e42(0x18b))/0x3)+parseInt(_0xd61e42(0x19e))/0x4*(parseInt(_0xd61e42(0x1b4))/0x5)+-parseInt(_0xd61e42(0x192))/0x6+-parseInt(_0xd61e42(0x179))/0x7*(-parseInt(_0xd61e42(0x195))/0x8)+parseInt(_0xd61e42(0x181))/0x9+parseInt(_0xd61e42(0x155))/0xa*(-parseInt(_0xd61e42(0x1a3))/0xb);if(_0x453853===_0xb8f6c6)break;else _0x38b61d['push'](_0x38b61d['shift']());}catch(_0x49645a){_0x38b61d['push'](_0x38b61d['shift']());}}}(_0xad37,0x6639a));import{CommentService as _0x5fbae9,CollaborationSessionService as _0x326a1a,UniverCollaborationClientPlugin as _0x37bf58}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x273301}from'@univerjs-pro/license';import{dayjs as _0x173349,UserManagerService as _0x2fbd9e,Inject as _0x4562eb,Injector as _0x585bfd,Disposable as _0x2a378a,CustomRangeType as _0x2eb19a,UniverInstanceType as _0x25802b,DependentOn as _0x501549,IConfigService as _0x2316e1,Plugin as _0x19daed,merge as _0x5457dd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2240b0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f581d,IThreadCommentDataSourceService as _0x2dd5cd}from'@univerjs/thread-comment';import{bufferTime as _0x58c650}from'rxjs';import{HTTPService as _0x13a52b}from'@univerjs/network';const W=_0x58fd22(0x1ae);var I=(_0xe3eb80=>(_0xe3eb80[_0xe3eb80['OpenOrReOpen']=0x0]=_0x58fd22(0x19c),_0xe3eb80[_0xe3eb80[_0x58fd22(0x190)]=0x1]='Solved',_0xe3eb80[_0xe3eb80[_0x58fd22(0x183)]=-0x1]=_0x58fd22(0x183),_0xe3eb80))(I||{}),v=(_0x5930d8=>(_0x5930d8[_0x5930d8['Unknown']=0x0]='Unknown',_0x5930d8[_0x5930d8[_0x58fd22(0x19d)]=0x1]=_0x58fd22(0x19d),_0x5930d8[_0x5930d8['Reply']=0x2]='Reply',_0x5930d8[_0x5930d8[_0x58fd22(0x184)]=0x3]=_0x58fd22(0x184),_0x5930d8[_0x5930d8[_0x58fd22(0x16f)]=0x4]=_0x58fd22(0x16f),_0x5930d8[_0x5930d8[_0x58fd22(0x164)]=0x5]=_0x58fd22(0x164),_0x5930d8[_0x5930d8['UNRECOGNIZED']=-0x1]=_0x58fd22(0x183),_0x5930d8))(v||{});const D=_0x27e30b=>_0x173349(new Date(+_0x27e30b))[_0x58fd22(0x17e)](_0x58fd22(0x168)),B=async(_0x3ddb92,_0x191148)=>{const _0x821bb6=_0x58fd22,_0x326825=_0x3ddb92[_0x821bb6(0x1aa)](_0x2fbd9e),_0xb2a280=_0x3ddb92[_0x821bb6(0x1aa)](_0x13a52b);_0x191148[_0x821bb6(0x1b9)](_0x275beb=>{const _0x161776=_0x821bb6;_0x326825[_0x161776(0x18e)](_0x275beb)&&_0x191148['delete'](_0x275beb);}),_0x191148[_0x821bb6(0x176)]&&(await _0xb2a280[_0x821bb6(0x1aa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x191148]}}))[_0x821bb6(0x16c)][_0x821bb6(0x19a)]['forEach'](_0x2b9ba0=>{_0x2b9ba0&&_0x326825['addUser'](_0x2b9ba0);});};var K=Object[_0x58fd22(0x1b6)],V=(_0x395dd9,_0x22196b,_0x23b540,_0x147bc5)=>{const _0x1211f9=_0x58fd22;for(var _0x13a604=_0x147bc5>0x1?void 0x0:_0x147bc5?K(_0x22196b,_0x23b540):_0x22196b,_0x385a50=_0x395dd9[_0x1211f9(0x17f)]-0x1,_0x294ad9;_0x385a50>=0x0;_0x385a50--)(_0x294ad9=_0x395dd9[_0x385a50])&&(_0x13a604=_0x294ad9(_0x13a604)||_0x13a604);return _0x13a604;},p=(_0x6e4e42,_0x567722)=>(_0x30f72f,_0x2a5ccb)=>_0x567722(_0x30f72f,_0x2a5ccb,_0x6e4e42);function _0xad37(){const _0x3cf088=['getUnit','1465155NIttkb','userId','UNRECOGNIZED','Edit','_commentService','map','_sessionService','find','pluginName','syncUpdateMutationToColla','1302nkDuMJ','parse','rangeType','getUser','addUser','Solved','/reply','2264154MKdtSe','/delete','saveCommentToSnapshot','89936eeprXG','subscribe','resolved','ref','error','users','updateComment','OpenOrReOpen','Add','8WhpeoO','thread-comment-data-source.config','deleteComment','onReady','requireSession','7953QWiczd','addComment','getMemberID','stringify','replies','content','UNIVER_UNKNOWN','get','pipe','onStarting','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','replyId','966jCUVNH','_injector','filter','876790sVtOKK','Reply','getOwnPropertyDescriptor','_threadCommentDataSourceService','root','forEach','commentUpdate$','5190EuNQwj','/universer-api/comment/unit/','solved','userID','defineProperty','getComment','slice','setConfig','552645psvpyk','payload','/add','threadId','_httpService','parentId','createTimestamp','Solve','_userService','post','_initDataSource','YYYY/MM/DD\x20HH:mm','_init','add','customRanges','body','rangeId','resolveComment','Delete','COMMENT','/list','values','disposeWithMe','_threadCommentDataSource','type','size','code','comment','196lahryy','user','_threadCommentModel','/edit','listComments','format','length'];_0xad37=function(){return _0x3cf088;};return _0xad37();}let S=class extends _0x2a378a{constructor(_0x15698d,_0x15ba86,_0x456fd6,_0x4b26e2){const _0x26811e=_0x58fd22;super(),this[_0x26811e(0x185)]=_0x15698d,this[_0x26811e(0x17b)]=_0x15ba86,this[_0x26811e(0x165)]=_0x456fd6,this[_0x26811e(0x1b2)]=_0x4b26e2,this[_0x26811e(0x169)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f7f45=_0x58fd22;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f7f45(0x1ab)](_0x58c650(0x10))[_0x1f7f45(0x196)](_0x1b5190=>{const _0x9dbeee=_0x1f7f45,_0x330851=new Set();_0x1b5190[_0x9dbeee(0x1b9)](_0x1a86cf=>{const _0x569a5e=_0x9dbeee;switch(_0x1a86cf[_0x569a5e(0x175)]){case _0x569a5e(0x16a):{const _0x515c50=_0x1a86cf[_0x569a5e(0x15e)][_0x569a5e(0x1af)];_0x330851[_0x569a5e(0x16a)](_0x515c50);break;}}}),B(this['_injector'],_0x330851);}));}[_0x58fd22(0x169)](){const _0x2c052b=_0x58fd22;this[_0x2c052b(0x173)](this[_0x2c052b(0x185)][_0x2c052b(0x1ba)][_0x2c052b(0x196)](async _0x3bb92b=>{const _0x19bb49=_0x2c052b;var _0x12f6f6,_0x29b2c7,_0x3b3d2b,_0x3d4cca;const _0x3b3149=(_0x12f6f6=this[_0x19bb49(0x17b)]['getUnit'](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x57d144=>_0x57d144[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x12f6f6[_0x19bb49(0x1b8)];if(!_0x3b3149)return;const {unitId:_0x5b4b9a,subUnitId:_0xc4bc6a}=_0x3b3149;switch(_0x3bb92b['user']&&this['_userService'][_0x19bb49(0x18f)](_0x3bb92b['user']),_0x3bb92b[_0x19bb49(0x175)]){case v[_0x19bb49(0x19d)]:break;case v[_0x19bb49(0x1b5)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x1a4)](_0x5b4b9a,_0xc4bc6a,{'unitId':_0x5b4b9a,'subUnitId':_0xc4bc6a,'ref':'','id':_0x3bb92b['replyId'],'dT':D(+_0x3bb92b[_0x19bb49(0x163)]),'threadId':_0x3bb92b[_0x19bb49(0x160)],'personId':(_0x3b3d2b=(_0x29b2c7=_0x3bb92b[_0x19bb49(0x17a)])==null?void 0x0:_0x29b2c7[_0x19bb49(0x158)])!=null?_0x3b3d2b:_0x3bb92b[_0x19bb49(0x182)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)]),'parentId':_0x3b3149['id']});break;}case v['Delete']:{const _0x26b5d=this[_0x19bb49(0x17b)][_0x19bb49(0x15a)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b[_0x19bb49(0x1b0)]);_0x26b5d&&_0x26b5d[_0x19bb49(0x162)]&&this['_threadCommentModel'][_0x19bb49(0x1a0)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b['replyId']);break;}case v[_0x19bb49(0x184)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x19b)](_0x5b4b9a,_0xc4bc6a,{'commentId':_0x3bb92b[_0x19bb49(0x1b0)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)])});break;}case v['Solve']:{const _0x508438=(_0x3d4cca=this[_0x19bb49(0x17b)][_0x19bb49(0x180)](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x663629=>_0x663629[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x3d4cca['root'];_0x508438&&this[_0x19bb49(0x17b)][_0x19bb49(0x16e)](_0x5b4b9a,_0xc4bc6a,_0x508438['id'],_0x3bb92b[_0x19bb49(0x157)]===I[_0x19bb49(0x190)]);break;}}}));}};S=V([p(0x0,_0x4562eb(_0x5fbae9)),p(0x1,_0x4562eb(_0x3f581d)),p(0x2,_0x4562eb(_0x2fbd9e)),p(0x3,_0x4562eb(_0x585bfd))],S);const z=_0x58fd22(0x19f),M={};var k=Object[_0x58fd22(0x1b6)],Q=(_0x394dd7,_0x15f782,_0xcb43c9,_0x44157b)=>{const _0x597b23=_0x58fd22;for(var _0xf577bf=_0x44157b>0x1?void 0x0:_0x44157b?k(_0x15f782,_0xcb43c9):_0x15f782,_0x48d22c=_0x394dd7[_0x597b23(0x17f)]-0x1,_0x4c57fd;_0x48d22c>=0x0;_0x48d22c--)(_0x4c57fd=_0x394dd7[_0x48d22c])&&(_0xf577bf=_0x4c57fd(_0xf577bf)||_0xf577bf);return _0xf577bf;},_=(_0x40bd62,_0x56d04f)=>(_0x37b067,_0x28c342)=>_0x56d04f(_0x37b067,_0x28c342,_0x40bd62);function X(_0x2a90ab,_0x435890){const _0x52f859=_0x58fd22,_0x3402b7=_0x2a90ab['replies'][0x0];return{..._0x435890,'id':_0x3402b7[_0x52f859(0x1b0)],'resolved':_0x2a90ab[_0x52f859(0x157)]===0x1,'dT':D(_0x3402b7[_0x52f859(0x163)]),'personId':_0x3402b7[_0x52f859(0x182)],'threadId':_0x3402b7[_0x52f859(0x160)]};}function _0x16ea(_0x1dc657,_0x4995e3){const _0xad373f=_0xad37();return _0x16ea=function(_0x16ea38,_0x59514a){_0x16ea38=_0x16ea38-0x155;let _0x9f5d87=_0xad373f[_0x16ea38];return _0x9f5d87;},_0x16ea(_0x1dc657,_0x4995e3);}function ee(_0x1b8a43,_0x4962bb,_0x246040){const _0x458f0c=_0x58fd22;var _0x15b54e,_0x41b9c8;if(((_0x41b9c8=(_0x15b54e=_0x1b8a43==null?void 0x0:_0x1b8a43[_0x458f0c(0x1a7)])==null?void 0x0:_0x15b54e[_0x458f0c(0x17f)])!=null?_0x41b9c8:0x0)>0x0){const _0x3828d5=(_0x329919,_0x2ac365)=>({'id':_0x329919['replyId'],'threadId':_0x329919[_0x458f0c(0x160)],'dT':D(_0x329919[_0x458f0c(0x163)]),'personId':_0x329919['userId'],'resolved':_0x1b8a43[_0x458f0c(0x157)]===I[_0x458f0c(0x190)],'unitId':_0x4962bb,'subUnitId':_0x246040,'text':JSON[_0x458f0c(0x18c)](_0x329919[_0x458f0c(0x1a8)]),'parentId':_0x2ac365}),_0x5d9f87=_0x3828d5(_0x1b8a43[_0x458f0c(0x1a7)][0x0]);return{..._0x5d9f87,'children':_0x1b8a43[_0x458f0c(0x1a7)][_0x458f0c(0x15b)](0x1)[_0x458f0c(0x186)](_0x42d326=>_0x3828d5(_0x42d326,_0x5d9f87['id']))};}return null;}let f=class{constructor(_0x461529,_0x1cc612,_0x415457,_0x5dfa83){const _0x13a573=_0x58fd22;this['_httpService']=_0x461529,this[_0x13a573(0x165)]=_0x1cc612,this[_0x13a573(0x187)]=_0x415457,this['_injector']=_0x5dfa83;}async[_0x58fd22(0x1a4)](_0x41b4c6){const _0x496db8=_0x58fd22;var _0x394191,_0x8577f3;const {parentId:_0x235add,unitId:_0x2b2774,text:_0xfb5b0d,threadId:_0x24dd57}=_0x41b4c6,_0x5d69bc=(_0x8577f3=(_0x394191=_0xfb5b0d[_0x496db8(0x16b)])==null?void 0x0:_0x394191[_0x496db8(0x1b3)](_0x4eb990=>_0x4eb990[_0x496db8(0x18d)]===_0x2eb19a['COMMENT'])[_0x496db8(0x186)](_0x350f07=>_0x350f07[_0x496db8(0x16d)]))!=null?_0x8577f3:[],_0x10665a=JSON[_0x496db8(0x1a6)](_0xfb5b0d),_0x192f7f=(await this[_0x496db8(0x187)][_0x496db8(0x1a2)](_0x2b2774))['getMemberID']();if(_0x235add){const _0x31d8b5={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc,'threadId':_0x24dd57},_0x3111eb=(await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x191),{'body':_0x31d8b5}))[_0x496db8(0x16c)]['reply'];return{..._0x41b4c6,'id':_0x3111eb[_0x496db8(0x1b0)],'dT':_0x173349(+_0x3111eb[_0x496db8(0x163)])[_0x496db8(0x17e)](_0x496db8(0x168)),'personId':_0x3111eb[_0x496db8(0x182)]};}else{const _0x36945d={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc},_0x20f370=await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x15f),{'body':_0x36945d});return X(_0x20f370['body'][_0x496db8(0x178)],_0x41b4c6);}}async[_0x58fd22(0x19b)](_0x4230f0){const _0x29c86e=_0x58fd22;var _0x3f9a5a,_0xfb19a8;const {text:_0x16cbb3,unitId:_0x3a1001}=_0x4230f0,_0x1cbe7e=(_0xfb19a8=(_0x3f9a5a=_0x16cbb3[_0x29c86e(0x16b)])==null?void 0x0:_0x3f9a5a[_0x29c86e(0x1b3)](_0x11cd3b=>_0x11cd3b[_0x29c86e(0x18d)]===_0x2eb19a[_0x29c86e(0x170)])['map'](_0xbae054=>_0xbae054[_0x29c86e(0x16d)]))!=null?_0xfb19a8:[],_0x38e607=JSON[_0x29c86e(0x1a6)](_0x16cbb3),_0x9fdeaf=_0x4230f0[_0x29c86e(0x160)],_0x9a4aa7=_0x4230f0['id'],_0x3a087b={'memberId':(await this[_0x29c86e(0x187)]['requireSession'](_0x3a1001))[_0x29c86e(0x1a5)](),'unitId':_0x3a1001,'threadId':_0x9fdeaf,'mention':_0x1cbe7e,'content':_0x38e607,'replyId':_0x9a4aa7},_0x406b30=await this['_httpService'][_0x29c86e(0x166)]('/universer-api/comment/unit/'+_0x3a1001+_0x29c86e(0x17c),{'body':_0x3a087b});return!_0x406b30[_0x29c86e(0x16c)]['error']||_0x406b30[_0x29c86e(0x16c)][_0x29c86e(0x199)][_0x29c86e(0x177)]===0x1;}async[_0x58fd22(0x16e)](_0x1420b1){const _0x4efe60=_0x58fd22,{unitId:_0x3c7a60}=_0x1420b1,_0x16c72f=_0x1420b1[_0x4efe60(0x160)],_0x4206ed={'memberId':this['_userService']['getCurrentUser']()[_0x4efe60(0x158)],'unitId':_0x3c7a60,'threadId':_0x16c72f,'solved':_0x1420b1[_0x4efe60(0x197)]?I['Solved']:I[_0x4efe60(0x19c)]},_0x3702df=await this[_0x4efe60(0x161)][_0x4efe60(0x166)](_0x4efe60(0x156)+_0x3c7a60+'/solved',{'body':_0x4206ed});return!_0x3702df['body'][_0x4efe60(0x199)]||_0x3702df['body'][_0x4efe60(0x199)][_0x4efe60(0x177)]===0x1;}async['deleteComment'](_0x5a00ca,_0x3d6913,_0x2c5c78,_0x1b2209){const _0x4f5521=_0x58fd22,_0x2b0042={'memberId':(await this[_0x4f5521(0x187)][_0x4f5521(0x1a2)](_0x5a00ca))[_0x4f5521(0x1a5)](),'threadId':_0x2c5c78,'replyId':_0x1b2209,'unitId':_0x5a00ca},_0x56b6ab=await this[_0x4f5521(0x161)][_0x4f5521(0x166)](_0x4f5521(0x156)+_0x5a00ca+_0x4f5521(0x193),{'body':_0x2b0042});return!_0x56b6ab[_0x4f5521(0x16c)][_0x4f5521(0x199)]||_0x56b6ab[_0x4f5521(0x16c)]['error'][_0x4f5521(0x177)]===0x1;}async[_0x58fd22(0x17d)](_0x463ab3,_0x5a9bfd,_0x2c3185){const _0x2f9829=_0x58fd22,_0x5305d6={'unitId':_0x463ab3,'threadId':_0x2c3185},_0x2ea6fc=await this[_0x2f9829(0x161)][_0x2f9829(0x166)]('/universer-api/comment/unit/'+_0x463ab3+_0x2f9829(0x171),{'body':_0x5305d6}),_0x218675=_0x2c3185[_0x2f9829(0x186)](_0x25085c=>ee(_0x2ea6fc[_0x2f9829(0x16c)]['comments'][_0x25085c],_0x463ab3,_0x5a9bfd))[_0x2f9829(0x1b3)](Boolean);return Object[_0x2f9829(0x172)](_0x2ea6fc['body']['users'])[_0x2f9829(0x1b9)](_0x202a2e=>{const _0x41626c=_0x2f9829;this[_0x41626c(0x165)][_0x41626c(0x18f)](_0x202a2e);}),_0x218675;}[_0x58fd22(0x194)](_0x3c1d50){const _0x49e362=_0x58fd22;return{'id':_0x3c1d50['id'],'threadId':_0x3c1d50['threadId'],'ref':_0x3c1d50[_0x49e362(0x198)]};}};f=Q([_(0x0,_0x4562eb(_0x13a52b)),_(0x1,_0x4562eb(_0x2fbd9e)),_(0x2,_0x4562eb(_0x326a1a)),_(0x3,_0x4562eb(_0x585bfd))],f);var re=Object[_0x58fd22(0x1b6)],te=(_0x3e8d81,_0xdfad50,_0x32bccc,_0x507499)=>{const _0x207b61=_0x58fd22;for(var _0x3da565=_0x507499>0x1?void 0x0:_0x507499?re(_0xdfad50,_0x32bccc):_0xdfad50,_0x5b7280=_0x3e8d81[_0x207b61(0x17f)]-0x1,_0x6ef0ac;_0x5b7280>=0x0;_0x5b7280--)(_0x6ef0ac=_0x3e8d81[_0x5b7280])&&(_0x3da565=_0x6ef0ac(_0x3da565)||_0x3da565);return _0x3da565;},N=(_0xa46f4,_0x219765)=>(_0x10a144,_0x2d5b4d)=>_0x219765(_0x10a144,_0x2d5b4d,_0xa46f4);let g=class extends _0x2a378a{constructor(_0x599a52,_0x106610){const _0x410e0c=_0x58fd22;super(),this[_0x410e0c(0x1b7)]=_0x599a52,this[_0x410e0c(0x174)]=_0x106610,this['_initDataSource']();}[_0x58fd22(0x167)](){const _0x48f6ce=_0x58fd22;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x48f6ce(0x1b7)][_0x48f6ce(0x18a)]=!0x1;}};g=te([N(0x0,_0x2dd5cd),N(0x1,_0x4562eb(f))],g);var se=Object[_0x58fd22(0x159)],oe=Object[_0x58fd22(0x1b6)],ne=(_0x280a66,_0x59f894,_0x165366)=>_0x59f894 in _0x280a66?se(_0x280a66,_0x59f894,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x165366}):_0x280a66[_0x59f894]=_0x165366,ie=(_0x5df299,_0x231500,_0x32e302,_0x1cafd8)=>{const _0x1a777d=_0x58fd22;for(var _0x105164=_0x1cafd8>0x1?void 0x0:_0x1cafd8?oe(_0x231500,_0x32e302):_0x231500,_0x4a26ed=_0x5df299[_0x1a777d(0x17f)]-0x1,_0x2f3dbe;_0x4a26ed>=0x0;_0x4a26ed--)(_0x2f3dbe=_0x5df299[_0x4a26ed])&&(_0x105164=_0x2f3dbe(_0x105164)||_0x105164);return _0x105164;},w=(_0x299ef1,_0x6d2661)=>(_0x56f68c,_0x27bc63)=>_0x6d2661(_0x56f68c,_0x27bc63,_0x299ef1),$=(_0x1d591a,_0x5bc19b,_0x2f71d2)=>ne(_0x1d591a,typeof _0x5bc19b!='symbol'?_0x5bc19b+'':_0x5bc19b,_0x2f71d2);let b=class extends _0x19daed{constructor(_0xe6a8b8=M,_0x18f36c,_0x3e7e45){const _0x2d75db=_0x58fd22;super(),this[_0x2d75db(0x1ad)]=_0xe6a8b8,this[_0x2d75db(0x1b2)]=_0x18f36c,this['_configService']=_0x3e7e45;const {..._0x5a6823}=_0x5457dd({},M,this['_config']);this['_configService'][_0x2d75db(0x15c)](z,_0x5a6823);}[_0x58fd22(0x1ac)](){const _0x80950b=_0x58fd22;[[f],[g],[S]][_0x80950b(0x1b9)](_0x4416ce=>{const _0x36f6a5=_0x80950b;this['_injector'][_0x36f6a5(0x16a)](_0x4416ce);});}[_0x58fd22(0x1a1)](){const _0x57db93=_0x58fd22;this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](g),this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](S);}};$(b,_0x58fd22(0x189),W),$(b,_0x58fd22(0x175),_0x25802b[_0x58fd22(0x1a9)]),b=ie([_0x501549(_0x2240b0,_0x37bf58,_0x273301),w(0x1,_0x4562eb(_0x585bfd)),w(0x2,_0x2316e1)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2319(){const _0x5d0f62=['/delete','parse','payload','rangeType','OpenOrReOpen','_injector','user','subscribe','users','/list','body','getCurrentUser','updateComment','userId','replies','40ZLfDWk','172BrtCUe','root','YYYY/MM/DD\x20HH:mm','_httpService','ref','1042281EYBXlf','_threadCommentDataSource','_initUserSync','code','get','Solve','281969ILZRYe','delete','/solved','resolveComment','_configService','requireSession','values','disposeWithMe','find','threadId','userID','UNRECOGNIZED','getMemberID','error','addUser','content','_commentService','onReady','slice','replyId','getOwnPropertyDescriptor','getUser','format','createTimestamp','getComment','_sessionService','solved','syncUpdateMutationToColla','resolved','/add','Solved','type','setConfig','_threadCommentModel','UNIVER_UNKNOWN','Reply','onStarting','17280aVxQUW','_initDataSource','addComment','Delete','1274862hFUalg','reply','_threadCommentDataSourceService','symbol','saveCommentToSnapshot','filter','forEach','237534gtaeKT','_userService','/universer-api/user/list','stringify','/universer-api/comment/unit/','thread-comment-data-source.config','rangeId','post','add','Edit','map','length','commentUpdate$','customRanges','getUnit','comments','Unknown','73479LMqijt','unitId','17646GVUvGS','/edit','COMMENT','Add'];_0x2319=function(){return _0x5d0f62;};return _0x2319();}const _0x47fc26=_0x260c;(function(_0x34ba70,_0x281d95){const _0x164bb9=_0x260c,_0x41c8a0=_0x34ba70();while(!![]){try{const _0x5d2c18=parseInt(_0x164bb9(0x1e7))/0x1+-parseInt(_0x164bb9(0x1c8))/0x2+-parseInt(_0x164bb9(0x1ae))/0x3+parseInt(_0x164bb9(0x1dc))/0x4*(-parseInt(_0x164bb9(0x1aa))/0x5)+-parseInt(_0x164bb9(0x1b5))/0x6+-parseInt(_0x164bb9(0x1c6))/0x7+-parseInt(_0x164bb9(0x1db))/0x8*(-parseInt(_0x164bb9(0x1e1))/0x9);if(_0x5d2c18===_0x281d95)break;else _0x41c8a0['push'](_0x41c8a0['shift']());}catch(_0x57ff1e){_0x41c8a0['push'](_0x41c8a0['shift']());}}}(_0x2319,0x37cbf));import{CommentService as _0x5dcb26,CollaborationSessionService as _0xf33af6,UniverCollaborationClientPlugin as _0x83ef3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xc79184}from'@univerjs-pro/license';import{dayjs as _0x9aa364,UserManagerService as _0x3be824,Inject as _0x321edf,Injector as _0x1f30c6,Disposable as _0x585462,CustomRangeType as _0x2d49c8,UniverInstanceType as _0xede23f,DependentOn as _0xa6f944,IConfigService as _0x54450d,Plugin as _0x2d2250,merge as _0x54b819}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ec74e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2f0c98,IThreadCommentDataSourceService as _0x41c736}from'@univerjs/thread-comment';import{bufferTime as _0x5c1b54}from'rxjs';import{HTTPService as _0x1c9089}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x260c(_0x1b6059,_0x4b5457){const _0x2319c2=_0x2319();return _0x260c=function(_0x260cb4,_0x1d9c9f){_0x260cb4=_0x260cb4-0x196;let _0x2ba24f=_0x2319c2[_0x260cb4];return _0x2ba24f;},_0x260c(_0x1b6059,_0x4b5457);}var I=(_0x1735f5=>(_0x1735f5[_0x1735f5['OpenOrReOpen']=0x0]=_0x47fc26(0x1d0),_0x1735f5[_0x1735f5[_0x47fc26(0x1a3)]=0x1]=_0x47fc26(0x1a3),_0x1735f5[_0x1735f5[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0x1735f5))(I||{}),v=(_0xa927a8=>(_0xa927a8[_0xa927a8[_0x47fc26(0x1c5)]=0x0]=_0x47fc26(0x1c5),_0xa927a8[_0xa927a8[_0x47fc26(0x1cb)]=0x1]=_0x47fc26(0x1cb),_0xa927a8[_0xa927a8['Reply']=0x2]=_0x47fc26(0x1a8),_0xa927a8[_0xa927a8[_0x47fc26(0x1be)]=0x3]=_0x47fc26(0x1be),_0xa927a8[_0xa927a8[_0x47fc26(0x1ad)]=0x4]='Delete',_0xa927a8[_0xa927a8['Solve']=0x5]=_0x47fc26(0x1e6),_0xa927a8[_0xa927a8[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0xa927a8))(v||{});const D=_0x16a323=>_0x9aa364(new Date(+_0x16a323))[_0x47fc26(0x19b)](_0x47fc26(0x1de)),B=async(_0x2b5b34,_0xb608ae)=>{const _0x5e9aa2=_0x47fc26,_0x166a96=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x3be824),_0x53447d=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x1c9089);_0xb608ae[_0x5e9aa2(0x1b4)](_0x12b073=>{const _0x50362d=_0x5e9aa2;_0x166a96[_0x50362d(0x19a)](_0x12b073)&&_0xb608ae[_0x50362d(0x1e8)](_0x12b073);}),_0xb608ae['size']&&(await _0x53447d[_0x5e9aa2(0x1e5)](_0x5e9aa2(0x1b7),{'params':{'userIDs':[..._0xb608ae]}}))[_0x5e9aa2(0x1d6)][_0x5e9aa2(0x1d4)]['forEach'](_0x218867=>{const _0x55796c=_0x5e9aa2;_0x218867&&_0x166a96[_0x55796c(0x1f5)](_0x218867);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x927c31,_0x5203ba,_0x7daad,_0x33d3a2)=>{for(var _0x13fef0=_0x33d3a2>0x1?void 0x0:_0x33d3a2?K(_0x5203ba,_0x7daad):_0x5203ba,_0x3ab8a3=_0x927c31['length']-0x1,_0x15c4ec;_0x3ab8a3>=0x0;_0x3ab8a3--)(_0x15c4ec=_0x927c31[_0x3ab8a3])&&(_0x13fef0=_0x15c4ec(_0x13fef0)||_0x13fef0);return _0x13fef0;},p=(_0x319415,_0x408d31)=>(_0x3ce163,_0x330555)=>_0x408d31(_0x3ce163,_0x330555,_0x319415);let S=class extends _0x585462{constructor(_0x328b88,_0x299aec,_0x4122a8,_0x371c70){const _0xe29ead=_0x47fc26;super(),this[_0xe29ead(0x1f7)]=_0x328b88,this['_threadCommentModel']=_0x299aec,this[_0xe29ead(0x1b6)]=_0x4122a8,this[_0xe29ead(0x1d1)]=_0x371c70,this['_init'](),this[_0xe29ead(0x1e3)]();}[_0x47fc26(0x1e3)](){const _0x17bd23=_0x47fc26;this[_0x17bd23(0x1ee)](this[_0x17bd23(0x1a6)][_0x17bd23(0x1c1)]['pipe'](_0x5c1b54(0x10))[_0x17bd23(0x1d3)](_0x4c50a4=>{const _0x39c352=new Set();_0x4c50a4['forEach'](_0x4ced81=>{const _0x293fa5=_0x260c;switch(_0x4ced81['type']){case _0x293fa5(0x1bd):{const _0x1259e1=_0x4ced81[_0x293fa5(0x1ce)]['personId'];_0x39c352[_0x293fa5(0x1bd)](_0x1259e1);break;}}}),B(this['_injector'],_0x39c352);}));}['_init'](){const _0x488d94=_0x47fc26;this[_0x488d94(0x1ee)](this['_commentService'][_0x488d94(0x1c1)]['subscribe'](async _0x1d5bc8=>{const _0x117830=_0x488d94;var _0x375766,_0x1b270a,_0x140070,_0x3ca7fa;const _0x1520a3=(_0x375766=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8[_0x117830(0x1c7)])[_0x117830(0x1ef)](_0x3d2791=>_0x3d2791[_0x117830(0x1f0)]===_0x1d5bc8['threadId']))==null?void 0x0:_0x375766['root'];if(!_0x1520a3)return;const {unitId:_0xeef3a8,subUnitId:_0x46d4dd}=_0x1520a3;switch(_0x1d5bc8[_0x117830(0x1d2)]&&this[_0x117830(0x1b6)]['addUser'](_0x1d5bc8['user']),_0x1d5bc8[_0x117830(0x1a4)]){case v['Add']:break;case v[_0x117830(0x1a8)]:{this[_0x117830(0x1a6)][_0x117830(0x1ac)](_0xeef3a8,_0x46d4dd,{'unitId':_0xeef3a8,'subUnitId':_0x46d4dd,'ref':'','id':_0x1d5bc8[_0x117830(0x198)],'dT':D(+_0x1d5bc8[_0x117830(0x19c)]),'threadId':_0x1d5bc8['threadId'],'personId':(_0x140070=(_0x1b270a=_0x1d5bc8[_0x117830(0x1d2)])==null?void 0x0:_0x1b270a[_0x117830(0x1f1)])!=null?_0x140070:_0x1d5bc8[_0x117830(0x1d9)],'text':JSON['parse'](_0x1d5bc8[_0x117830(0x1f6)]),'parentId':_0x1520a3['id']});break;}case v[_0x117830(0x1ad)]:{const _0x1583aa=this[_0x117830(0x1a6)][_0x117830(0x19d)](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);_0x1583aa&&_0x1583aa['parentId']&&this[_0x117830(0x1a6)]['deleteComment'](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);break;}case v[_0x117830(0x1be)]:{this[_0x117830(0x1a6)][_0x117830(0x1d8)](_0xeef3a8,_0x46d4dd,{'commentId':_0x1d5bc8['replyId'],'text':JSON[_0x117830(0x1cd)](_0x1d5bc8[_0x117830(0x1f6)])});break;}case v[_0x117830(0x1e6)]:{const _0x43ddca=(_0x3ca7fa=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8['unitId'])[_0x117830(0x1ef)](_0x1ead56=>_0x1ead56[_0x117830(0x1f0)]===_0x1d5bc8[_0x117830(0x1f0)]))==null?void 0x0:_0x3ca7fa[_0x117830(0x1dd)];_0x43ddca&&this[_0x117830(0x1a6)][_0x117830(0x1ea)](_0xeef3a8,_0x46d4dd,_0x43ddca['id'],_0x1d5bc8[_0x117830(0x19f)]===I[_0x117830(0x1a3)]);break;}}}));}};S=V([p(0x0,_0x321edf(_0x5dcb26)),p(0x1,_0x321edf(_0x2f0c98)),p(0x2,_0x321edf(_0x3be824)),p(0x3,_0x321edf(_0x1f30c6))],S);const z=_0x47fc26(0x1ba),M={};var k=Object[_0x47fc26(0x199)],Q=(_0xb09a87,_0x49f828,_0x39d4ac,_0x11304b)=>{const _0x5f43b1=_0x47fc26;for(var _0x2a38ae=_0x11304b>0x1?void 0x0:_0x11304b?k(_0x49f828,_0x39d4ac):_0x49f828,_0xae389=_0xb09a87[_0x5f43b1(0x1c0)]-0x1,_0x4b9d81;_0xae389>=0x0;_0xae389--)(_0x4b9d81=_0xb09a87[_0xae389])&&(_0x2a38ae=_0x4b9d81(_0x2a38ae)||_0x2a38ae);return _0x2a38ae;},_=(_0x35d2f9,_0x1ad20e)=>(_0x437467,_0x3bf411)=>_0x1ad20e(_0x437467,_0x3bf411,_0x35d2f9);function X(_0x13a250,_0x3481b4){const _0x4c4870=_0x47fc26,_0x30cb26=_0x13a250[_0x4c4870(0x1da)][0x0];return{..._0x3481b4,'id':_0x30cb26['replyId'],'resolved':_0x13a250[_0x4c4870(0x19f)]===0x1,'dT':D(_0x30cb26[_0x4c4870(0x19c)]),'personId':_0x30cb26[_0x4c4870(0x1d9)],'threadId':_0x30cb26[_0x4c4870(0x1f0)]};}function ee(_0x36cb90,_0x243ef9,_0x36dd4b){const _0x491b54=_0x47fc26;var _0x1bdd23,_0x3e3238;if(((_0x3e3238=(_0x1bdd23=_0x36cb90==null?void 0x0:_0x36cb90[_0x491b54(0x1da)])==null?void 0x0:_0x1bdd23[_0x491b54(0x1c0)])!=null?_0x3e3238:0x0)>0x0){const _0x2ee385=(_0x4deaeb,_0x527cf1)=>({'id':_0x4deaeb[_0x491b54(0x198)],'threadId':_0x4deaeb[_0x491b54(0x1f0)],'dT':D(_0x4deaeb[_0x491b54(0x19c)]),'personId':_0x4deaeb[_0x491b54(0x1d9)],'resolved':_0x36cb90[_0x491b54(0x19f)]===I[_0x491b54(0x1a3)],'unitId':_0x243ef9,'subUnitId':_0x36dd4b,'text':JSON[_0x491b54(0x1cd)](_0x4deaeb[_0x491b54(0x1f6)]),'parentId':_0x527cf1}),_0x28a5c6=_0x2ee385(_0x36cb90[_0x491b54(0x1da)][0x0]);return{..._0x28a5c6,'children':_0x36cb90[_0x491b54(0x1da)][_0x491b54(0x197)](0x1)[_0x491b54(0x1bf)](_0x43b292=>_0x2ee385(_0x43b292,_0x28a5c6['id']))};}return null;}let f=class{constructor(_0xabc3b9,_0x3519ce,_0x521326,_0x36f213){const _0x283bd4=_0x47fc26;this[_0x283bd4(0x1df)]=_0xabc3b9,this[_0x283bd4(0x1b6)]=_0x3519ce,this['_sessionService']=_0x521326,this[_0x283bd4(0x1d1)]=_0x36f213;}async[_0x47fc26(0x1ac)](_0x52630d){const _0x2eb6c6=_0x47fc26;var _0x23bfc9,_0x42c2ba;const {parentId:_0x25451b,unitId:_0x31df77,text:_0x5e6e3e,threadId:_0x3794f7}=_0x52630d,_0x6d3777=(_0x42c2ba=(_0x23bfc9=_0x5e6e3e[_0x2eb6c6(0x1c2)])==null?void 0x0:_0x23bfc9[_0x2eb6c6(0x1b3)](_0x549e21=>_0x549e21[_0x2eb6c6(0x1cf)]===_0x2d49c8[_0x2eb6c6(0x1ca)])[_0x2eb6c6(0x1bf)](_0x3ae6da=>_0x3ae6da[_0x2eb6c6(0x1bb)]))!=null?_0x42c2ba:[],_0xfc668a=JSON[_0x2eb6c6(0x1b8)](_0x5e6e3e),_0xa4f0eb=(await this[_0x2eb6c6(0x19e)][_0x2eb6c6(0x1ec)](_0x31df77))['getMemberID']();if(_0x25451b){const _0x549871={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777,'threadId':_0x3794f7},_0x3343f1=(await this[_0x2eb6c6(0x1df)]['post'](_0x2eb6c6(0x1b9)+_0x31df77+'/reply',{'body':_0x549871}))['body'][_0x2eb6c6(0x1af)];return{..._0x52630d,'id':_0x3343f1[_0x2eb6c6(0x198)],'dT':_0x9aa364(+_0x3343f1[_0x2eb6c6(0x19c)])['format'](_0x2eb6c6(0x1de)),'personId':_0x3343f1[_0x2eb6c6(0x1d9)]};}else{const _0x3b5f58={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777},_0x1064e7=await this[_0x2eb6c6(0x1df)][_0x2eb6c6(0x1bc)](_0x2eb6c6(0x1b9)+_0x31df77+_0x2eb6c6(0x1a2),{'body':_0x3b5f58});return X(_0x1064e7['body']['comment'],_0x52630d);}}async[_0x47fc26(0x1d8)](_0x3f2525){const _0x135b2c=_0x47fc26;var _0x532785,_0x1c5ce6;const {text:_0x34b779,unitId:_0x45480a}=_0x3f2525,_0x2555c6=(_0x1c5ce6=(_0x532785=_0x34b779[_0x135b2c(0x1c2)])==null?void 0x0:_0x532785[_0x135b2c(0x1b3)](_0x356601=>_0x356601[_0x135b2c(0x1cf)]===_0x2d49c8[_0x135b2c(0x1ca)])[_0x135b2c(0x1bf)](_0x16f542=>_0x16f542[_0x135b2c(0x1bb)]))!=null?_0x1c5ce6:[],_0x1f488d=JSON[_0x135b2c(0x1b8)](_0x34b779),_0x346b58=_0x3f2525[_0x135b2c(0x1f0)],_0x576f41=_0x3f2525['id'],_0xc798ea={'memberId':(await this[_0x135b2c(0x19e)][_0x135b2c(0x1ec)](_0x45480a))[_0x135b2c(0x1f3)](),'unitId':_0x45480a,'threadId':_0x346b58,'mention':_0x2555c6,'content':_0x1f488d,'replyId':_0x576f41},_0x56a8b3=await this['_httpService']['post'](_0x135b2c(0x1b9)+_0x45480a+_0x135b2c(0x1c9),{'body':_0xc798ea});return!_0x56a8b3[_0x135b2c(0x1d6)]['error']||_0x56a8b3[_0x135b2c(0x1d6)][_0x135b2c(0x1f4)][_0x135b2c(0x1e4)]===0x1;}async[_0x47fc26(0x1ea)](_0x4cdbc9){const _0x352b68=_0x47fc26,{unitId:_0x395a1e}=_0x4cdbc9,_0x248276=_0x4cdbc9[_0x352b68(0x1f0)],_0x395e81={'memberId':this[_0x352b68(0x1b6)][_0x352b68(0x1d7)]()[_0x352b68(0x1f1)],'unitId':_0x395a1e,'threadId':_0x248276,'solved':_0x4cdbc9[_0x352b68(0x1a1)]?I[_0x352b68(0x1a3)]:I['OpenOrReOpen']},_0x3938f9=await this['_httpService'][_0x352b68(0x1bc)](_0x352b68(0x1b9)+_0x395a1e+_0x352b68(0x1e9),{'body':_0x395e81});return!_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]||_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]['code']===0x1;}async['deleteComment'](_0x19388c,_0x13ffcc,_0x109415,_0x536d68){const _0x4a289e=_0x47fc26,_0x2b09eb={'memberId':(await this['_sessionService'][_0x4a289e(0x1ec)](_0x19388c))['getMemberID'](),'threadId':_0x109415,'replyId':_0x536d68,'unitId':_0x19388c},_0x223195=await this[_0x4a289e(0x1df)][_0x4a289e(0x1bc)](_0x4a289e(0x1b9)+_0x19388c+_0x4a289e(0x1cc),{'body':_0x2b09eb});return!_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]||_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]['code']===0x1;}async['listComments'](_0x57d844,_0xe2c5f7,_0x474ede){const _0x248abd=_0x47fc26,_0x384bc3={'unitId':_0x57d844,'threadId':_0x474ede},_0x1e8b60=await this[_0x248abd(0x1df)][_0x248abd(0x1bc)](_0x248abd(0x1b9)+_0x57d844+_0x248abd(0x1d5),{'body':_0x384bc3}),_0x5d5815=_0x474ede['map'](_0x3835e5=>ee(_0x1e8b60['body'][_0x248abd(0x1c4)][_0x3835e5],_0x57d844,_0xe2c5f7))['filter'](Boolean);return Object[_0x248abd(0x1ed)](_0x1e8b60[_0x248abd(0x1d6)][_0x248abd(0x1d4)])[_0x248abd(0x1b4)](_0x20a2ef=>{const _0x9d257f=_0x248abd;this['_userService'][_0x9d257f(0x1f5)](_0x20a2ef);}),_0x5d5815;}[_0x47fc26(0x1b2)](_0x565e7e){const _0x52ea76=_0x47fc26;return{'id':_0x565e7e['id'],'threadId':_0x565e7e[_0x52ea76(0x1f0)],'ref':_0x565e7e[_0x52ea76(0x1e0)]};}};f=Q([_(0x0,_0x321edf(_0x1c9089)),_(0x1,_0x321edf(_0x3be824)),_(0x2,_0x321edf(_0xf33af6)),_(0x3,_0x321edf(_0x1f30c6))],f);var re=Object[_0x47fc26(0x199)],te=(_0x4a0a8d,_0x678ea1,_0x36a12c,_0x508e21)=>{const _0x359bd0=_0x47fc26;for(var _0x1986fb=_0x508e21>0x1?void 0x0:_0x508e21?re(_0x678ea1,_0x36a12c):_0x678ea1,_0x14943a=_0x4a0a8d[_0x359bd0(0x1c0)]-0x1,_0x5b2474;_0x14943a>=0x0;_0x14943a--)(_0x5b2474=_0x4a0a8d[_0x14943a])&&(_0x1986fb=_0x5b2474(_0x1986fb)||_0x1986fb);return _0x1986fb;},N=(_0x50fb3c,_0x55a612)=>(_0x3d1b84,_0x389020)=>_0x55a612(_0x3d1b84,_0x389020,_0x50fb3c);let g=class extends _0x585462{constructor(_0x2dd2b4,_0x59b55b){const _0x109c38=_0x47fc26;super(),this['_threadCommentDataSourceService']=_0x2dd2b4,this[_0x109c38(0x1e2)]=_0x59b55b,this[_0x109c38(0x1ab)]();}['_initDataSource'](){const _0x49f5d8=_0x47fc26;this['_threadCommentDataSourceService']['dataSource']=this[_0x49f5d8(0x1e2)],this[_0x49f5d8(0x1b0)][_0x49f5d8(0x1a0)]=!0x1;}};g=te([N(0x0,_0x41c736),N(0x1,_0x321edf(f))],g);var se=Object['defineProperty'],oe=Object[_0x47fc26(0x199)],ne=(_0x1efed7,_0x3878e0,_0x1dfefd)=>_0x3878e0 in _0x1efed7?se(_0x1efed7,_0x3878e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1dfefd}):_0x1efed7[_0x3878e0]=_0x1dfefd,ie=(_0x49bc90,_0x15fb9c,_0x19e5c9,_0xfb9733)=>{const _0x51b755=_0x47fc26;for(var _0x4b70bb=_0xfb9733>0x1?void 0x0:_0xfb9733?oe(_0x15fb9c,_0x19e5c9):_0x15fb9c,_0x2b4c59=_0x49bc90[_0x51b755(0x1c0)]-0x1,_0x5e1f2a;_0x2b4c59>=0x0;_0x2b4c59--)(_0x5e1f2a=_0x49bc90[_0x2b4c59])&&(_0x4b70bb=_0x5e1f2a(_0x4b70bb)||_0x4b70bb);return _0x4b70bb;},w=(_0x39523f,_0x2f4b3c)=>(_0x34bfe4,_0x237f64)=>_0x2f4b3c(_0x34bfe4,_0x237f64,_0x39523f),$=(_0x4a94e3,_0x1c03af,_0x5e4f58)=>ne(_0x4a94e3,typeof _0x1c03af!=_0x47fc26(0x1b1)?_0x1c03af+'':_0x1c03af,_0x5e4f58);let b=class extends _0x2d2250{constructor(_0x45ee8c=M,_0x2f3010,_0x1dd338){const _0x372e26=_0x47fc26;super(),this['_config']=_0x45ee8c,this[_0x372e26(0x1d1)]=_0x2f3010,this[_0x372e26(0x1eb)]=_0x1dd338;const {..._0x59f697}=_0x54b819({},M,this['_config']);this[_0x372e26(0x1eb)][_0x372e26(0x1a5)](z,_0x59f697);}[_0x47fc26(0x1a9)](){[[f],[g],[S]]['forEach'](_0x18c6a2=>{const _0x284bd3=_0x260c;this[_0x284bd3(0x1d1)][_0x284bd3(0x1bd)](_0x18c6a2);});}[_0x47fc26(0x196)](){const _0x9ed62=_0x47fc26;this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](g),this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](S);}};$(b,'pluginName',W),$(b,_0x47fc26(0x1a4),_0xede23f[_0x47fc26(0x1a7)]),b=ie([_0xa6f944(_0x5ec74e,_0x83ef3,_0xc79184),w(0x1,_0x321edf(_0x1f30c6)),w(0x2,_0x54450d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x58fd22=_0x16ea;(function(_0x1b16e0,_0xb8f6c6){const _0xd61e42=_0x16ea,_0x38b61d=_0x1b16e0();while(!![]){try{const _0x453853=parseInt(_0xd61e42(0x15d))/0x1+-parseInt(_0xd61e42(0x1b1))/0x2*(parseInt(_0xd61e42(0x18b))/0x3)+parseInt(_0xd61e42(0x19e))/0x4*(parseInt(_0xd61e42(0x1b4))/0x5)+-parseInt(_0xd61e42(0x192))/0x6+-parseInt(_0xd61e42(0x179))/0x7*(-parseInt(_0xd61e42(0x195))/0x8)+parseInt(_0xd61e42(0x181))/0x9+parseInt(_0xd61e42(0x155))/0xa*(-parseInt(_0xd61e42(0x1a3))/0xb);if(_0x453853===_0xb8f6c6)break;else _0x38b61d['push'](_0x38b61d['shift']());}catch(_0x49645a){_0x38b61d['push'](_0x38b61d['shift']());}}}(_0xad37,0x6639a));import{CommentService as _0x5fbae9,CollaborationSessionService as _0x326a1a,UniverCollaborationClientPlugin as _0x37bf58}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x273301}from'@univerjs-pro/license';import{dayjs as _0x173349,UserManagerService as _0x2fbd9e,Inject as _0x4562eb,Injector as _0x585bfd,Disposable as _0x2a378a,CustomRangeType as _0x2eb19a,UniverInstanceType as _0x25802b,DependentOn as _0x501549,IConfigService as _0x2316e1,Plugin as _0x19daed,merge as _0x5457dd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2240b0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f581d,IThreadCommentDataSourceService as _0x2dd5cd}from'@univerjs/thread-comment';import{bufferTime as _0x58c650}from'rxjs';import{HTTPService as _0x13a52b}from'@univerjs/network';const W=_0x58fd22(0x1ae);var I=(_0xe3eb80=>(_0xe3eb80[_0xe3eb80['OpenOrReOpen']=0x0]=_0x58fd22(0x19c),_0xe3eb80[_0xe3eb80[_0x58fd22(0x190)]=0x1]='Solved',_0xe3eb80[_0xe3eb80[_0x58fd22(0x183)]=-0x1]=_0x58fd22(0x183),_0xe3eb80))(I||{}),v=(_0x5930d8=>(_0x5930d8[_0x5930d8['Unknown']=0x0]='Unknown',_0x5930d8[_0x5930d8[_0x58fd22(0x19d)]=0x1]=_0x58fd22(0x19d),_0x5930d8[_0x5930d8['Reply']=0x2]='Reply',_0x5930d8[_0x5930d8[_0x58fd22(0x184)]=0x3]=_0x58fd22(0x184),_0x5930d8[_0x5930d8[_0x58fd22(0x16f)]=0x4]=_0x58fd22(0x16f),_0x5930d8[_0x5930d8[_0x58fd22(0x164)]=0x5]=_0x58fd22(0x164),_0x5930d8[_0x5930d8['UNRECOGNIZED']=-0x1]=_0x58fd22(0x183),_0x5930d8))(v||{});const D=_0x27e30b=>_0x173349(new Date(+_0x27e30b))[_0x58fd22(0x17e)](_0x58fd22(0x168)),B=async(_0x3ddb92,_0x191148)=>{const _0x821bb6=_0x58fd22,_0x326825=_0x3ddb92[_0x821bb6(0x1aa)](_0x2fbd9e),_0xb2a280=_0x3ddb92[_0x821bb6(0x1aa)](_0x13a52b);_0x191148[_0x821bb6(0x1b9)](_0x275beb=>{const _0x161776=_0x821bb6;_0x326825[_0x161776(0x18e)](_0x275beb)&&_0x191148['delete'](_0x275beb);}),_0x191148[_0x821bb6(0x176)]&&(await _0xb2a280[_0x821bb6(0x1aa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x191148]}}))[_0x821bb6(0x16c)][_0x821bb6(0x19a)]['forEach'](_0x2b9ba0=>{_0x2b9ba0&&_0x326825['addUser'](_0x2b9ba0);});};var K=Object[_0x58fd22(0x1b6)],V=(_0x395dd9,_0x22196b,_0x23b540,_0x147bc5)=>{const _0x1211f9=_0x58fd22;for(var _0x13a604=_0x147bc5>0x1?void 0x0:_0x147bc5?K(_0x22196b,_0x23b540):_0x22196b,_0x385a50=_0x395dd9[_0x1211f9(0x17f)]-0x1,_0x294ad9;_0x385a50>=0x0;_0x385a50--)(_0x294ad9=_0x395dd9[_0x385a50])&&(_0x13a604=_0x294ad9(_0x13a604)||_0x13a604);return _0x13a604;},p=(_0x6e4e42,_0x567722)=>(_0x30f72f,_0x2a5ccb)=>_0x567722(_0x30f72f,_0x2a5ccb,_0x6e4e42);function _0xad37(){const _0x3cf088=['getUnit','1465155NIttkb','userId','UNRECOGNIZED','Edit','_commentService','map','_sessionService','find','pluginName','syncUpdateMutationToColla','1302nkDuMJ','parse','rangeType','getUser','addUser','Solved','/reply','2264154MKdtSe','/delete','saveCommentToSnapshot','89936eeprXG','subscribe','resolved','ref','error','users','updateComment','OpenOrReOpen','Add','8WhpeoO','thread-comment-data-source.config','deleteComment','onReady','requireSession','7953QWiczd','addComment','getMemberID','stringify','replies','content','UNIVER_UNKNOWN','get','pipe','onStarting','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','replyId','966jCUVNH','_injector','filter','876790sVtOKK','Reply','getOwnPropertyDescriptor','_threadCommentDataSourceService','root','forEach','commentUpdate$','5190EuNQwj','/universer-api/comment/unit/','solved','userID','defineProperty','getComment','slice','setConfig','552645psvpyk','payload','/add','threadId','_httpService','parentId','createTimestamp','Solve','_userService','post','_initDataSource','YYYY/MM/DD\x20HH:mm','_init','add','customRanges','body','rangeId','resolveComment','Delete','COMMENT','/list','values','disposeWithMe','_threadCommentDataSource','type','size','code','comment','196lahryy','user','_threadCommentModel','/edit','listComments','format','length'];_0xad37=function(){return _0x3cf088;};return _0xad37();}let S=class extends _0x2a378a{constructor(_0x15698d,_0x15ba86,_0x456fd6,_0x4b26e2){const _0x26811e=_0x58fd22;super(),this[_0x26811e(0x185)]=_0x15698d,this[_0x26811e(0x17b)]=_0x15ba86,this[_0x26811e(0x165)]=_0x456fd6,this[_0x26811e(0x1b2)]=_0x4b26e2,this[_0x26811e(0x169)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f7f45=_0x58fd22;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f7f45(0x1ab)](_0x58c650(0x10))[_0x1f7f45(0x196)](_0x1b5190=>{const _0x9dbeee=_0x1f7f45,_0x330851=new Set();_0x1b5190[_0x9dbeee(0x1b9)](_0x1a86cf=>{const _0x569a5e=_0x9dbeee;switch(_0x1a86cf[_0x569a5e(0x175)]){case _0x569a5e(0x16a):{const _0x515c50=_0x1a86cf[_0x569a5e(0x15e)][_0x569a5e(0x1af)];_0x330851[_0x569a5e(0x16a)](_0x515c50);break;}}}),B(this['_injector'],_0x330851);}));}[_0x58fd22(0x169)](){const _0x2c052b=_0x58fd22;this[_0x2c052b(0x173)](this[_0x2c052b(0x185)][_0x2c052b(0x1ba)][_0x2c052b(0x196)](async _0x3bb92b=>{const _0x19bb49=_0x2c052b;var _0x12f6f6,_0x29b2c7,_0x3b3d2b,_0x3d4cca;const _0x3b3149=(_0x12f6f6=this[_0x19bb49(0x17b)]['getUnit'](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x57d144=>_0x57d144[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x12f6f6[_0x19bb49(0x1b8)];if(!_0x3b3149)return;const {unitId:_0x5b4b9a,subUnitId:_0xc4bc6a}=_0x3b3149;switch(_0x3bb92b['user']&&this['_userService'][_0x19bb49(0x18f)](_0x3bb92b['user']),_0x3bb92b[_0x19bb49(0x175)]){case v[_0x19bb49(0x19d)]:break;case v[_0x19bb49(0x1b5)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x1a4)](_0x5b4b9a,_0xc4bc6a,{'unitId':_0x5b4b9a,'subUnitId':_0xc4bc6a,'ref':'','id':_0x3bb92b['replyId'],'dT':D(+_0x3bb92b[_0x19bb49(0x163)]),'threadId':_0x3bb92b[_0x19bb49(0x160)],'personId':(_0x3b3d2b=(_0x29b2c7=_0x3bb92b[_0x19bb49(0x17a)])==null?void 0x0:_0x29b2c7[_0x19bb49(0x158)])!=null?_0x3b3d2b:_0x3bb92b[_0x19bb49(0x182)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)]),'parentId':_0x3b3149['id']});break;}case v['Delete']:{const _0x26b5d=this[_0x19bb49(0x17b)][_0x19bb49(0x15a)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b[_0x19bb49(0x1b0)]);_0x26b5d&&_0x26b5d[_0x19bb49(0x162)]&&this['_threadCommentModel'][_0x19bb49(0x1a0)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b['replyId']);break;}case v[_0x19bb49(0x184)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x19b)](_0x5b4b9a,_0xc4bc6a,{'commentId':_0x3bb92b[_0x19bb49(0x1b0)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)])});break;}case v['Solve']:{const _0x508438=(_0x3d4cca=this[_0x19bb49(0x17b)][_0x19bb49(0x180)](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x663629=>_0x663629[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x3d4cca['root'];_0x508438&&this[_0x19bb49(0x17b)][_0x19bb49(0x16e)](_0x5b4b9a,_0xc4bc6a,_0x508438['id'],_0x3bb92b[_0x19bb49(0x157)]===I[_0x19bb49(0x190)]);break;}}}));}};S=V([p(0x0,_0x4562eb(_0x5fbae9)),p(0x1,_0x4562eb(_0x3f581d)),p(0x2,_0x4562eb(_0x2fbd9e)),p(0x3,_0x4562eb(_0x585bfd))],S);const z=_0x58fd22(0x19f),M={};var k=Object[_0x58fd22(0x1b6)],Q=(_0x394dd7,_0x15f782,_0xcb43c9,_0x44157b)=>{const _0x597b23=_0x58fd22;for(var _0xf577bf=_0x44157b>0x1?void 0x0:_0x44157b?k(_0x15f782,_0xcb43c9):_0x15f782,_0x48d22c=_0x394dd7[_0x597b23(0x17f)]-0x1,_0x4c57fd;_0x48d22c>=0x0;_0x48d22c--)(_0x4c57fd=_0x394dd7[_0x48d22c])&&(_0xf577bf=_0x4c57fd(_0xf577bf)||_0xf577bf);return _0xf577bf;},_=(_0x40bd62,_0x56d04f)=>(_0x37b067,_0x28c342)=>_0x56d04f(_0x37b067,_0x28c342,_0x40bd62);function X(_0x2a90ab,_0x435890){const _0x52f859=_0x58fd22,_0x3402b7=_0x2a90ab['replies'][0x0];return{..._0x435890,'id':_0x3402b7[_0x52f859(0x1b0)],'resolved':_0x2a90ab[_0x52f859(0x157)]===0x1,'dT':D(_0x3402b7[_0x52f859(0x163)]),'personId':_0x3402b7[_0x52f859(0x182)],'threadId':_0x3402b7[_0x52f859(0x160)]};}function _0x16ea(_0x1dc657,_0x4995e3){const _0xad373f=_0xad37();return _0x16ea=function(_0x16ea38,_0x59514a){_0x16ea38=_0x16ea38-0x155;let _0x9f5d87=_0xad373f[_0x16ea38];return _0x9f5d87;},_0x16ea(_0x1dc657,_0x4995e3);}function ee(_0x1b8a43,_0x4962bb,_0x246040){const _0x458f0c=_0x58fd22;var _0x15b54e,_0x41b9c8;if(((_0x41b9c8=(_0x15b54e=_0x1b8a43==null?void 0x0:_0x1b8a43[_0x458f0c(0x1a7)])==null?void 0x0:_0x15b54e[_0x458f0c(0x17f)])!=null?_0x41b9c8:0x0)>0x0){const _0x3828d5=(_0x329919,_0x2ac365)=>({'id':_0x329919['replyId'],'threadId':_0x329919[_0x458f0c(0x160)],'dT':D(_0x329919[_0x458f0c(0x163)]),'personId':_0x329919['userId'],'resolved':_0x1b8a43[_0x458f0c(0x157)]===I[_0x458f0c(0x190)],'unitId':_0x4962bb,'subUnitId':_0x246040,'text':JSON[_0x458f0c(0x18c)](_0x329919[_0x458f0c(0x1a8)]),'parentId':_0x2ac365}),_0x5d9f87=_0x3828d5(_0x1b8a43[_0x458f0c(0x1a7)][0x0]);return{..._0x5d9f87,'children':_0x1b8a43[_0x458f0c(0x1a7)][_0x458f0c(0x15b)](0x1)[_0x458f0c(0x186)](_0x42d326=>_0x3828d5(_0x42d326,_0x5d9f87['id']))};}return null;}let f=class{constructor(_0x461529,_0x1cc612,_0x415457,_0x5dfa83){const _0x13a573=_0x58fd22;this['_httpService']=_0x461529,this[_0x13a573(0x165)]=_0x1cc612,this[_0x13a573(0x187)]=_0x415457,this['_injector']=_0x5dfa83;}async[_0x58fd22(0x1a4)](_0x41b4c6){const _0x496db8=_0x58fd22;var _0x394191,_0x8577f3;const {parentId:_0x235add,unitId:_0x2b2774,text:_0xfb5b0d,threadId:_0x24dd57}=_0x41b4c6,_0x5d69bc=(_0x8577f3=(_0x394191=_0xfb5b0d[_0x496db8(0x16b)])==null?void 0x0:_0x394191[_0x496db8(0x1b3)](_0x4eb990=>_0x4eb990[_0x496db8(0x18d)]===_0x2eb19a['COMMENT'])[_0x496db8(0x186)](_0x350f07=>_0x350f07[_0x496db8(0x16d)]))!=null?_0x8577f3:[],_0x10665a=JSON[_0x496db8(0x1a6)](_0xfb5b0d),_0x192f7f=(await this[_0x496db8(0x187)][_0x496db8(0x1a2)](_0x2b2774))['getMemberID']();if(_0x235add){const _0x31d8b5={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc,'threadId':_0x24dd57},_0x3111eb=(await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x191),{'body':_0x31d8b5}))[_0x496db8(0x16c)]['reply'];return{..._0x41b4c6,'id':_0x3111eb[_0x496db8(0x1b0)],'dT':_0x173349(+_0x3111eb[_0x496db8(0x163)])[_0x496db8(0x17e)](_0x496db8(0x168)),'personId':_0x3111eb[_0x496db8(0x182)]};}else{const _0x36945d={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc},_0x20f370=await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x15f),{'body':_0x36945d});return X(_0x20f370['body'][_0x496db8(0x178)],_0x41b4c6);}}async[_0x58fd22(0x19b)](_0x4230f0){const _0x29c86e=_0x58fd22;var _0x3f9a5a,_0xfb19a8;const {text:_0x16cbb3,unitId:_0x3a1001}=_0x4230f0,_0x1cbe7e=(_0xfb19a8=(_0x3f9a5a=_0x16cbb3[_0x29c86e(0x16b)])==null?void 0x0:_0x3f9a5a[_0x29c86e(0x1b3)](_0x11cd3b=>_0x11cd3b[_0x29c86e(0x18d)]===_0x2eb19a[_0x29c86e(0x170)])['map'](_0xbae054=>_0xbae054[_0x29c86e(0x16d)]))!=null?_0xfb19a8:[],_0x38e607=JSON[_0x29c86e(0x1a6)](_0x16cbb3),_0x9fdeaf=_0x4230f0[_0x29c86e(0x160)],_0x9a4aa7=_0x4230f0['id'],_0x3a087b={'memberId':(await this[_0x29c86e(0x187)]['requireSession'](_0x3a1001))[_0x29c86e(0x1a5)](),'unitId':_0x3a1001,'threadId':_0x9fdeaf,'mention':_0x1cbe7e,'content':_0x38e607,'replyId':_0x9a4aa7},_0x406b30=await this['_httpService'][_0x29c86e(0x166)]('/universer-api/comment/unit/'+_0x3a1001+_0x29c86e(0x17c),{'body':_0x3a087b});return!_0x406b30[_0x29c86e(0x16c)]['error']||_0x406b30[_0x29c86e(0x16c)][_0x29c86e(0x199)][_0x29c86e(0x177)]===0x1;}async[_0x58fd22(0x16e)](_0x1420b1){const _0x4efe60=_0x58fd22,{unitId:_0x3c7a60}=_0x1420b1,_0x16c72f=_0x1420b1[_0x4efe60(0x160)],_0x4206ed={'memberId':this['_userService']['getCurrentUser']()[_0x4efe60(0x158)],'unitId':_0x3c7a60,'threadId':_0x16c72f,'solved':_0x1420b1[_0x4efe60(0x197)]?I['Solved']:I[_0x4efe60(0x19c)]},_0x3702df=await this[_0x4efe60(0x161)][_0x4efe60(0x166)](_0x4efe60(0x156)+_0x3c7a60+'/solved',{'body':_0x4206ed});return!_0x3702df['body'][_0x4efe60(0x199)]||_0x3702df['body'][_0x4efe60(0x199)][_0x4efe60(0x177)]===0x1;}async['deleteComment'](_0x5a00ca,_0x3d6913,_0x2c5c78,_0x1b2209){const _0x4f5521=_0x58fd22,_0x2b0042={'memberId':(await this[_0x4f5521(0x187)][_0x4f5521(0x1a2)](_0x5a00ca))[_0x4f5521(0x1a5)](),'threadId':_0x2c5c78,'replyId':_0x1b2209,'unitId':_0x5a00ca},_0x56b6ab=await this[_0x4f5521(0x161)][_0x4f5521(0x166)](_0x4f5521(0x156)+_0x5a00ca+_0x4f5521(0x193),{'body':_0x2b0042});return!_0x56b6ab[_0x4f5521(0x16c)][_0x4f5521(0x199)]||_0x56b6ab[_0x4f5521(0x16c)]['error'][_0x4f5521(0x177)]===0x1;}async[_0x58fd22(0x17d)](_0x463ab3,_0x5a9bfd,_0x2c3185){const _0x2f9829=_0x58fd22,_0x5305d6={'unitId':_0x463ab3,'threadId':_0x2c3185},_0x2ea6fc=await this[_0x2f9829(0x161)][_0x2f9829(0x166)]('/universer-api/comment/unit/'+_0x463ab3+_0x2f9829(0x171),{'body':_0x5305d6}),_0x218675=_0x2c3185[_0x2f9829(0x186)](_0x25085c=>ee(_0x2ea6fc[_0x2f9829(0x16c)]['comments'][_0x25085c],_0x463ab3,_0x5a9bfd))[_0x2f9829(0x1b3)](Boolean);return Object[_0x2f9829(0x172)](_0x2ea6fc['body']['users'])[_0x2f9829(0x1b9)](_0x202a2e=>{const _0x41626c=_0x2f9829;this[_0x41626c(0x165)][_0x41626c(0x18f)](_0x202a2e);}),_0x218675;}[_0x58fd22(0x194)](_0x3c1d50){const _0x49e362=_0x58fd22;return{'id':_0x3c1d50['id'],'threadId':_0x3c1d50['threadId'],'ref':_0x3c1d50[_0x49e362(0x198)]};}};f=Q([_(0x0,_0x4562eb(_0x13a52b)),_(0x1,_0x4562eb(_0x2fbd9e)),_(0x2,_0x4562eb(_0x326a1a)),_(0x3,_0x4562eb(_0x585bfd))],f);var re=Object[_0x58fd22(0x1b6)],te=(_0x3e8d81,_0xdfad50,_0x32bccc,_0x507499)=>{const _0x207b61=_0x58fd22;for(var _0x3da565=_0x507499>0x1?void 0x0:_0x507499?re(_0xdfad50,_0x32bccc):_0xdfad50,_0x5b7280=_0x3e8d81[_0x207b61(0x17f)]-0x1,_0x6ef0ac;_0x5b7280>=0x0;_0x5b7280--)(_0x6ef0ac=_0x3e8d81[_0x5b7280])&&(_0x3da565=_0x6ef0ac(_0x3da565)||_0x3da565);return _0x3da565;},N=(_0xa46f4,_0x219765)=>(_0x10a144,_0x2d5b4d)=>_0x219765(_0x10a144,_0x2d5b4d,_0xa46f4);let g=class extends _0x2a378a{constructor(_0x599a52,_0x106610){const _0x410e0c=_0x58fd22;super(),this[_0x410e0c(0x1b7)]=_0x599a52,this[_0x410e0c(0x174)]=_0x106610,this['_initDataSource']();}[_0x58fd22(0x167)](){const _0x48f6ce=_0x58fd22;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x48f6ce(0x1b7)][_0x48f6ce(0x18a)]=!0x1;}};g=te([N(0x0,_0x2dd5cd),N(0x1,_0x4562eb(f))],g);var se=Object[_0x58fd22(0x159)],oe=Object[_0x58fd22(0x1b6)],ne=(_0x280a66,_0x59f894,_0x165366)=>_0x59f894 in _0x280a66?se(_0x280a66,_0x59f894,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x165366}):_0x280a66[_0x59f894]=_0x165366,ie=(_0x5df299,_0x231500,_0x32e302,_0x1cafd8)=>{const _0x1a777d=_0x58fd22;for(var _0x105164=_0x1cafd8>0x1?void 0x0:_0x1cafd8?oe(_0x231500,_0x32e302):_0x231500,_0x4a26ed=_0x5df299[_0x1a777d(0x17f)]-0x1,_0x2f3dbe;_0x4a26ed>=0x0;_0x4a26ed--)(_0x2f3dbe=_0x5df299[_0x4a26ed])&&(_0x105164=_0x2f3dbe(_0x105164)||_0x105164);return _0x105164;},w=(_0x299ef1,_0x6d2661)=>(_0x56f68c,_0x27bc63)=>_0x6d2661(_0x56f68c,_0x27bc63,_0x299ef1),$=(_0x1d591a,_0x5bc19b,_0x2f71d2)=>ne(_0x1d591a,typeof _0x5bc19b!='symbol'?_0x5bc19b+'':_0x5bc19b,_0x2f71d2);let b=class extends _0x19daed{constructor(_0xe6a8b8=M,_0x18f36c,_0x3e7e45){const _0x2d75db=_0x58fd22;super(),this[_0x2d75db(0x1ad)]=_0xe6a8b8,this[_0x2d75db(0x1b2)]=_0x18f36c,this['_configService']=_0x3e7e45;const {..._0x5a6823}=_0x5457dd({},M,this['_config']);this['_configService'][_0x2d75db(0x15c)](z,_0x5a6823);}[_0x58fd22(0x1ac)](){const _0x80950b=_0x58fd22;[[f],[g],[S]][_0x80950b(0x1b9)](_0x4416ce=>{const _0x36f6a5=_0x80950b;this['_injector'][_0x36f6a5(0x16a)](_0x4416ce);});}[_0x58fd22(0x1a1)](){const _0x57db93=_0x58fd22;this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](g),this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](S);}};$(b,_0x58fd22(0x189),W),$(b,_0x58fd22(0x175),_0x25802b[_0x58fd22(0x1a9)]),b=ie([_0x501549(_0x2240b0,_0x37bf58,_0x273301),w(0x1,_0x4562eb(_0x585bfd)),w(0x2,_0x2316e1)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x20017f,_0x9da6d5){const _0x9cea28=_0x3c17,_0x4fda3d=_0x20017f();while(!![]){try{const _0x15636a=-parseInt(_0x9cea28(0x1ce))/0x1*(-parseInt(_0x9cea28(0x1fd))/0x2)+-parseInt(_0x9cea28(0x1f2))/0x3+parseInt(_0x9cea28(0x1f0))/0x4*(-parseInt(_0x9cea28(0x226))/0x5)+parseInt(_0x9cea28(0x1fb))/0x6*(parseInt(_0x9cea28(0x1d7))/0x7)+parseInt(_0x9cea28(0x1eb))/0x8+-parseInt(_0x9cea28(0x1e1))/0x9*(parseInt(_0x9cea28(0x1b5))/0xa)+-parseInt(_0x9cea28(0x1ad))/0xb*(-parseInt(_0x9cea28(0x1f3))/0xc);if(_0x15636a===_0x9da6d5)break;else _0x4fda3d['push'](_0x4fda3d['shift']());}catch(_0x19b3c6){_0x4fda3d['push'](_0x4fda3d['shift']());}}}(_0xe3de,0xcf058),function(_0x441c75,_0x28be67){const _0xf37031=_0x3c17;typeof exports=='object'&&typeof module<'u'?_0x28be67(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==_0xf37031(0x1a4)&&define[_0xf37031(0x218)]?define([_0xf37031(0x1b0),_0xf37031(0x20b),'@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0xf37031(0x1e8),_0xf37031(0x22a),_0xf37031(0x21c)],_0x28be67):(_0x441c75=typeof globalThis<'u'?globalThis:_0x441c75||self,_0x28be67(_0x441c75[_0xf37031(0x1a9)]={},_0x441c75['UniverProCollaborationClient'],_0x441c75['UniverProLicense'],_0x441c75[_0xf37031(0x204)],_0x441c75[_0xf37031(0x208)],_0x441c75[_0xf37031(0x1ff)],_0x441c75[_0xf37031(0x22a)],_0x441c75['UniverNetwork']));}(this,function(_0x4f18fd,_0x27707d,_0x2e38c4,_0x36e2ec,_0x53f578,_0x1a56f1,_0x5e0e6d,_0x49a291){'use strict';const _0x162ef1=_0x3c17;const _0x1be69d=_0x162ef1(0x1a8);var _0x4fe311=(_0x1fe0e3=>(_0x1fe0e3[_0x1fe0e3['OpenOrReOpen']=0x0]=_0x162ef1(0x1a2),_0x1fe0e3[_0x1fe0e3['Solved']=0x1]=_0x162ef1(0x20d),_0x1fe0e3[_0x1fe0e3[_0x162ef1(0x1cb)]=-0x1]='UNRECOGNIZED',_0x1fe0e3))(_0x4fe311||{}),_0x2fcded=(_0x50243f=>(_0x50243f[_0x50243f[_0x162ef1(0x216)]=0x0]='Unknown',_0x50243f[_0x50243f['Add']=0x1]='Add',_0x50243f[_0x50243f[_0x162ef1(0x1ac)]=0x2]=_0x162ef1(0x1ac),_0x50243f[_0x50243f[_0x162ef1(0x1d2)]=0x3]=_0x162ef1(0x1d2),_0x50243f[_0x50243f[_0x162ef1(0x1e3)]=0x4]=_0x162ef1(0x1e3),_0x50243f[_0x50243f[_0x162ef1(0x210)]=0x5]=_0x162ef1(0x210),_0x50243f[_0x50243f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x50243f))(_0x2fcded||{});const _0x4b5b8b=_0x23e4f5=>_0x36e2ec['dayjs'](new Date(+_0x23e4f5))[_0x162ef1(0x200)](_0x162ef1(0x1d9)),_0x2e3032=async(_0x12be96,_0x5110b0)=>{const _0x1fe7b0=_0x162ef1,_0x238f7d=_0x12be96[_0x1fe7b0(0x229)](_0x36e2ec['UserManagerService']),_0x49ca52=_0x12be96[_0x1fe7b0(0x229)](_0x49a291[_0x1fe7b0(0x1e9)]);_0x5110b0['forEach'](_0x21b4a5=>{const _0x532a84=_0x1fe7b0;_0x238f7d[_0x532a84(0x1af)](_0x21b4a5)&&_0x5110b0[_0x532a84(0x1bd)](_0x21b4a5);}),_0x5110b0['size']&&(await _0x49ca52[_0x1fe7b0(0x229)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5110b0]}}))[_0x1fe7b0(0x20e)][_0x1fe7b0(0x1d5)][_0x1fe7b0(0x1dd)](_0x12f942=>{const _0x45aa9c=_0x1fe7b0;_0x12f942&&_0x238f7d[_0x45aa9c(0x219)](_0x12f942);});};var _0x52240f=Object[_0x162ef1(0x206)],_0x5568ba=(_0x59e142,_0x1adeea,_0x57bf8d,_0x3c650e)=>{const _0xdf4eb1=_0x162ef1;for(var _0x38e378=_0x3c650e>0x1?void 0x0:_0x3c650e?_0x52240f(_0x1adeea,_0x57bf8d):_0x1adeea,_0x75fae8=_0x59e142[_0xdf4eb1(0x1d6)]-0x1,_0x3e3437;_0x75fae8>=0x0;_0x75fae8--)(_0x3e3437=_0x59e142[_0x75fae8])&&(_0x38e378=_0x3e3437(_0x38e378)||_0x38e378);return _0x38e378;},_0x3f603f=(_0x117571,_0x1ef572)=>(_0x465310,_0x3b3ba0)=>_0x1ef572(_0x465310,_0x3b3ba0,_0x117571);let _0x26bce3=class extends _0x36e2ec['Disposable']{constructor(_0x895ad,_0x28f732,_0x1d5370,_0x162010){const _0x43549c=_0x162ef1;super(),this['_commentService']=_0x895ad,this[_0x43549c(0x21d)]=_0x28f732,this[_0x43549c(0x20c)]=_0x1d5370,this[_0x43549c(0x21a)]=_0x162010,this[_0x43549c(0x1e5)](),this[_0x43549c(0x1cd)]();}[_0x162ef1(0x1cd)](){const _0x21592a=_0x162ef1;this['disposeWithMe'](this[_0x21592a(0x21d)]['commentUpdate$'][_0x21592a(0x1b6)](_0x5e0e6d[_0x21592a(0x202)](0x10))[_0x21592a(0x1c8)](_0x53c964=>{const _0x3fde3d=_0x21592a,_0x4e1bdb=new Set();_0x53c964[_0x3fde3d(0x1dd)](_0x2265c5=>{const _0x618ed0=_0x3fde3d;switch(_0x2265c5[_0x618ed0(0x1cc)]){case _0x618ed0(0x207):{const _0x6eb410=_0x2265c5[_0x618ed0(0x1d1)][_0x618ed0(0x225)];_0x4e1bdb[_0x618ed0(0x207)](_0x6eb410);break;}}}),_0x2e3032(this[_0x3fde3d(0x21a)],_0x4e1bdb);}));}[_0x162ef1(0x1e5)](){const _0x5b6fe3=_0x162ef1;this[_0x5b6fe3(0x1a1)](this[_0x5b6fe3(0x1c6)][_0x5b6fe3(0x1ca)][_0x5b6fe3(0x1c8)](async _0x2838b7=>{const _0x4a5155=_0x5b6fe3;var _0x3b1395,_0x147285,_0x1fe734,_0xbcf770;const _0x361017=(_0x3b1395=this[_0x4a5155(0x21d)][_0x4a5155(0x1ab)](_0x2838b7[_0x4a5155(0x1ee)])[_0x4a5155(0x1e7)](_0x35ecd9=>_0x35ecd9[_0x4a5155(0x21f)]===_0x2838b7['threadId']))==null?void 0x0:_0x3b1395['root'];if(!_0x361017)return;const {unitId:_0x4edb60,subUnitId:_0x260997}=_0x361017;switch(_0x2838b7[_0x4a5155(0x1bc)]&&this[_0x4a5155(0x20c)][_0x4a5155(0x219)](_0x2838b7[_0x4a5155(0x1bc)]),_0x2838b7['type']){case _0x2fcded['Add']:break;case _0x2fcded[_0x4a5155(0x1ac)]:{this['_threadCommentModel'][_0x4a5155(0x1c3)](_0x4edb60,_0x260997,{'unitId':_0x4edb60,'subUnitId':_0x260997,'ref':'','id':_0x2838b7['replyId'],'dT':_0x4b5b8b(+_0x2838b7[_0x4a5155(0x1b8)]),'threadId':_0x2838b7[_0x4a5155(0x21f)],'personId':(_0x1fe734=(_0x147285=_0x2838b7[_0x4a5155(0x1bc)])==null?void 0x0:_0x147285[_0x4a5155(0x1c0)])!=null?_0x1fe734:_0x2838b7[_0x4a5155(0x227)],'text':JSON['parse'](_0x2838b7[_0x4a5155(0x1f7)]),'parentId':_0x361017['id']});break;}case _0x2fcded[_0x4a5155(0x1e3)]:{const _0x4a3483=this['_threadCommentModel'][_0x4a5155(0x1c9)](_0x4edb60,_0x260997,_0x2838b7[_0x4a5155(0x1b4)]);_0x4a3483&&_0x4a3483[_0x4a5155(0x20f)]&&this[_0x4a5155(0x21d)][_0x4a5155(0x1b2)](_0x4edb60,_0x260997,_0x2838b7['replyId']);break;}case _0x2fcded['Edit']:{this[_0x4a5155(0x21d)][_0x4a5155(0x1b9)](_0x4edb60,_0x260997,{'commentId':_0x2838b7[_0x4a5155(0x1b4)],'text':JSON[_0x4a5155(0x1dc)](_0x2838b7[_0x4a5155(0x1f7)])});break;}case _0x2fcded['Solve']:{const _0x3c6a27=(_0xbcf770=this[_0x4a5155(0x21d)]['getUnit'](_0x2838b7[_0x4a5155(0x1ee)])[_0x4a5155(0x1e7)](_0x151e5e=>_0x151e5e[_0x4a5155(0x21f)]===_0x2838b7[_0x4a5155(0x21f)]))==null?void 0x0:_0xbcf770[_0x4a5155(0x1ef)];_0x3c6a27&&this['_threadCommentModel']['resolveComment'](_0x4edb60,_0x260997,_0x3c6a27['id'],_0x2838b7[_0x4a5155(0x1fc)]===_0x4fe311[_0x4a5155(0x20d)]);break;}}}));}};_0x26bce3=_0x5568ba([_0x3f603f(0x0,_0x36e2ec[_0x162ef1(0x1a6)](_0x27707d['CommentService'])),_0x3f603f(0x1,_0x36e2ec['Inject'](_0x1a56f1[_0x162ef1(0x1be)])),_0x3f603f(0x2,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1df)])),_0x3f603f(0x3,_0x36e2ec['Inject'](_0x36e2ec[_0x162ef1(0x1c4)]))],_0x26bce3);const _0x2a6a6e=_0x162ef1(0x212),_0x2d0d8f={};var _0x4c7736=Object['getOwnPropertyDescriptor'],_0x4b5860=(_0x557e34,_0x3ef565,_0x3486cd,_0x39a76b)=>{const _0x4e5818=_0x162ef1;for(var _0x3c2ecc=_0x39a76b>0x1?void 0x0:_0x39a76b?_0x4c7736(_0x3ef565,_0x3486cd):_0x3ef565,_0x5b8fa9=_0x557e34[_0x4e5818(0x1d6)]-0x1,_0x59ad06;_0x5b8fa9>=0x0;_0x5b8fa9--)(_0x59ad06=_0x557e34[_0x5b8fa9])&&(_0x3c2ecc=_0x59ad06(_0x3c2ecc)||_0x3c2ecc);return _0x3c2ecc;},_0x8e5bc9=(_0x161d2d,_0x86ace)=>(_0xa3eae2,_0x277b7a)=>_0x86ace(_0xa3eae2,_0x277b7a,_0x161d2d);function _0x24ed59(_0x351768,_0x4d4818){const _0x55d84a=_0x162ef1,_0x4f26df=_0x351768[_0x55d84a(0x1fa)][0x0];return{..._0x4d4818,'id':_0x4f26df['replyId'],'resolved':_0x351768['solved']===0x1,'dT':_0x4b5b8b(_0x4f26df[_0x55d84a(0x1b8)]),'personId':_0x4f26df[_0x55d84a(0x227)],'threadId':_0x4f26df[_0x55d84a(0x21f)]};}function _0x2db9fb(_0x1e614c,_0x13ee02,_0x24774f){const _0x5ac472=_0x162ef1;var _0x33da79,_0x55fdc2;if(((_0x55fdc2=(_0x33da79=_0x1e614c==null?void 0x0:_0x1e614c['replies'])==null?void 0x0:_0x33da79[_0x5ac472(0x1d6)])!=null?_0x55fdc2:0x0)>0x0){const _0x3135a5=(_0x7ae1a8,_0x456b31)=>({'id':_0x7ae1a8[_0x5ac472(0x1b4)],'threadId':_0x7ae1a8[_0x5ac472(0x21f)],'dT':_0x4b5b8b(_0x7ae1a8[_0x5ac472(0x1b8)]),'personId':_0x7ae1a8['userId'],'resolved':_0x1e614c[_0x5ac472(0x1fc)]===_0x4fe311[_0x5ac472(0x20d)],'unitId':_0x13ee02,'subUnitId':_0x24774f,'text':JSON['parse'](_0x7ae1a8[_0x5ac472(0x1f7)]),'parentId':_0x456b31}),_0x2e9a2c=_0x3135a5(_0x1e614c['replies'][0x0]);return{..._0x2e9a2c,'children':_0x1e614c[_0x5ac472(0x1fa)][_0x5ac472(0x1cf)](0x1)[_0x5ac472(0x217)](_0x16cd70=>_0x3135a5(_0x16cd70,_0x2e9a2c['id']))};}return null;}let _0x39b1bf=class{constructor(_0x911241,_0x3c0e3d,_0x10dea7,_0x383024){const _0x591153=_0x162ef1;this[_0x591153(0x1bb)]=_0x911241,this[_0x591153(0x20c)]=_0x3c0e3d,this['_sessionService']=_0x10dea7,this[_0x591153(0x21a)]=_0x383024;}async[_0x162ef1(0x1c3)](_0x143599){const _0x31a9f3=_0x162ef1;var _0x5d83e2,_0x1cfb64;const {parentId:_0x388039,unitId:_0x4f9ecd,text:_0x46745d,threadId:_0x509d0a}=_0x143599,_0xa9a6d6=(_0x1cfb64=(_0x5d83e2=_0x46745d[_0x31a9f3(0x20a)])==null?void 0x0:_0x5d83e2['filter'](_0x1cdcb0=>_0x1cdcb0[_0x31a9f3(0x1b7)]===_0x36e2ec[_0x31a9f3(0x1e4)][_0x31a9f3(0x213)])[_0x31a9f3(0x217)](_0x505480=>_0x505480['rangeId']))!=null?_0x1cfb64:[],_0x3a54e0=JSON[_0x31a9f3(0x1ba)](_0x46745d),_0x91760=(await this['_sessionService'][_0x31a9f3(0x1c7)](_0x4f9ecd))[_0x31a9f3(0x205)]();if(_0x388039){const _0xa4ab4b={'memberId':_0x91760,'unitId':_0x4f9ecd,'content':_0x3a54e0,'mention':_0xa9a6d6,'threadId':_0x509d0a},_0x1644f7=(await this[_0x31a9f3(0x1bb)]['post']('/universer-api/comment/unit/'+_0x4f9ecd+_0x31a9f3(0x1c2),{'body':_0xa4ab4b}))[_0x31a9f3(0x20e)][_0x31a9f3(0x1ae)];return{..._0x143599,'id':_0x1644f7[_0x31a9f3(0x1b4)],'dT':_0x36e2ec['dayjs'](+_0x1644f7[_0x31a9f3(0x1b8)])[_0x31a9f3(0x200)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1644f7[_0x31a9f3(0x227)]};}else{const _0x5741fa={'memberId':_0x91760,'unitId':_0x4f9ecd,'content':_0x3a54e0,'mention':_0xa9a6d6},_0x367f0d=await this[_0x31a9f3(0x1bb)]['post'](_0x31a9f3(0x1f1)+_0x4f9ecd+_0x31a9f3(0x1bf),{'body':_0x5741fa});return _0x24ed59(_0x367f0d[_0x31a9f3(0x20e)][_0x31a9f3(0x1ed)],_0x143599);}}async[_0x162ef1(0x1b9)](_0x5920c1){const _0x24c8af=_0x162ef1;var _0x5d7696,_0x17ba2a;const {text:_0x141ee8,unitId:_0x417d63}=_0x5920c1,_0x49f208=(_0x17ba2a=(_0x5d7696=_0x141ee8['customRanges'])==null?void 0x0:_0x5d7696[_0x24c8af(0x1f4)](_0x49794b=>_0x49794b[_0x24c8af(0x1b7)]===_0x36e2ec['CustomRangeType']['COMMENT'])[_0x24c8af(0x217)](_0x495a01=>_0x495a01[_0x24c8af(0x1f5)]))!=null?_0x17ba2a:[],_0x488fa8=JSON['stringify'](_0x141ee8),_0x3a446a=_0x5920c1[_0x24c8af(0x21f)],_0x199d67=_0x5920c1['id'],_0x24c635={'memberId':(await this[_0x24c8af(0x1b1)][_0x24c8af(0x1c7)](_0x417d63))[_0x24c8af(0x205)](),'unitId':_0x417d63,'threadId':_0x3a446a,'mention':_0x49f208,'content':_0x488fa8,'replyId':_0x199d67},_0x2631ed=await this[_0x24c8af(0x1bb)][_0x24c8af(0x1e0)](_0x24c8af(0x1f1)+_0x417d63+_0x24c8af(0x1f6),{'body':_0x24c635});return!_0x2631ed['body'][_0x24c8af(0x1d4)]||_0x2631ed[_0x24c8af(0x20e)][_0x24c8af(0x1d4)]['code']===0x1;}async[_0x162ef1(0x1f8)](_0x4a9958){const _0x3c35ff=_0x162ef1,{unitId:_0x56720c}=_0x4a9958,_0x321e5d=_0x4a9958[_0x3c35ff(0x21f)],_0x567d6c={'memberId':this[_0x3c35ff(0x20c)][_0x3c35ff(0x1e2)]()[_0x3c35ff(0x1c0)],'unitId':_0x56720c,'threadId':_0x321e5d,'solved':_0x4a9958[_0x3c35ff(0x1e6)]?_0x4fe311[_0x3c35ff(0x20d)]:_0x4fe311[_0x3c35ff(0x1a2)]},_0x268382=await this[_0x3c35ff(0x1bb)]['post']('/universer-api/comment/unit/'+_0x56720c+_0x3c35ff(0x1a7),{'body':_0x567d6c});return!_0x268382[_0x3c35ff(0x20e)]['error']||_0x268382['body'][_0x3c35ff(0x1d4)][_0x3c35ff(0x1ec)]===0x1;}async[_0x162ef1(0x1b2)](_0x3f3c33,_0x1caf73,_0x2f208d,_0x272fe4){const _0x4012e4=_0x162ef1,_0x44aeae={'memberId':(await this[_0x4012e4(0x1b1)][_0x4012e4(0x1c7)](_0x3f3c33))['getMemberID'](),'threadId':_0x2f208d,'replyId':_0x272fe4,'unitId':_0x3f3c33},_0x2397d7=await this[_0x4012e4(0x1bb)][_0x4012e4(0x1e0)]('/universer-api/comment/unit/'+_0x3f3c33+'/delete',{'body':_0x44aeae});return!_0x2397d7['body'][_0x4012e4(0x1d4)]||_0x2397d7[_0x4012e4(0x20e)][_0x4012e4(0x1d4)][_0x4012e4(0x1ec)]===0x1;}async[_0x162ef1(0x21e)](_0x49d0e9,_0x35de42,_0x26e106){const _0x4b754d=_0x162ef1,_0x4ecfcc={'unitId':_0x49d0e9,'threadId':_0x26e106},_0x42ee52=await this[_0x4b754d(0x1bb)][_0x4b754d(0x1e0)](_0x4b754d(0x1f1)+_0x49d0e9+_0x4b754d(0x209),{'body':_0x4ecfcc}),_0x45239a=_0x26e106[_0x4b754d(0x217)](_0x3d8495=>_0x2db9fb(_0x42ee52[_0x4b754d(0x20e)][_0x4b754d(0x1d8)][_0x3d8495],_0x49d0e9,_0x35de42))[_0x4b754d(0x1f4)](Boolean);return Object[_0x4b754d(0x21b)](_0x42ee52[_0x4b754d(0x20e)][_0x4b754d(0x1d5)])[_0x4b754d(0x1dd)](_0x1f8509=>{const _0x54ec3d=_0x4b754d;this[_0x54ec3d(0x20c)][_0x54ec3d(0x219)](_0x1f8509);}),_0x45239a;}[_0x162ef1(0x201)](_0x2f5c64){const _0x482819=_0x162ef1;return{'id':_0x2f5c64['id'],'threadId':_0x2f5c64[_0x482819(0x21f)],'ref':_0x2f5c64[_0x482819(0x1d3)]};}};_0x39b1bf=_0x4b5860([_0x8e5bc9(0x0,_0x36e2ec[_0x162ef1(0x1a6)](_0x49a291['HTTPService'])),_0x8e5bc9(0x1,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1df)])),_0x8e5bc9(0x2,_0x36e2ec[_0x162ef1(0x1a6)](_0x27707d[_0x162ef1(0x228)])),_0x8e5bc9(0x3,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1c4)]))],_0x39b1bf);var _0x209822=Object[_0x162ef1(0x206)],_0x1afb0a=(_0x1c784a,_0x29dc53,_0x225288,_0x1ca312)=>{const _0x35655e=_0x162ef1;for(var _0x4c3f69=_0x1ca312>0x1?void 0x0:_0x1ca312?_0x209822(_0x29dc53,_0x225288):_0x29dc53,_0x552c91=_0x1c784a[_0x35655e(0x1d6)]-0x1,_0xe7313b;_0x552c91>=0x0;_0x552c91--)(_0xe7313b=_0x1c784a[_0x552c91])&&(_0x4c3f69=_0xe7313b(_0x4c3f69)||_0x4c3f69);return _0x4c3f69;},_0x122138=(_0x2b7042,_0x3ea823)=>(_0x354de3,_0x4bd542)=>_0x3ea823(_0x354de3,_0x4bd542,_0x2b7042);let _0x44ea26=class extends _0x36e2ec['Disposable']{constructor(_0x5dee39,_0x5f0d4c){const _0xd9fc6e=_0x162ef1;super(),this[_0xd9fc6e(0x222)]=_0x5dee39,this[_0xd9fc6e(0x1c5)]=_0x5f0d4c,this[_0xd9fc6e(0x1da)]();}[_0x162ef1(0x1da)](){const _0x2d82ef=_0x162ef1;this[_0x2d82ef(0x222)][_0x2d82ef(0x224)]=this['_threadCommentDataSource'],this[_0x2d82ef(0x222)][_0x2d82ef(0x215)]=!0x1;}};_0x44ea26=_0x1afb0a([_0x122138(0x0,_0x1a56f1[_0x162ef1(0x223)]),_0x122138(0x1,_0x36e2ec[_0x162ef1(0x1a6)](_0x39b1bf))],_0x44ea26);var _0x2a0ab3=Object[_0x162ef1(0x1a3)],_0x51772b=Object[_0x162ef1(0x206)],_0x538a6c=(_0x107c4d,_0x241348,_0x5e7ba3)=>_0x241348 in _0x107c4d?_0x2a0ab3(_0x107c4d,_0x241348,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e7ba3}):_0x107c4d[_0x241348]=_0x5e7ba3,_0x43c099=(_0x2f4979,_0x52ff32,_0x3982e8,_0x2012e8)=>{const _0x59f018=_0x162ef1;for(var _0x772624=_0x2012e8>0x1?void 0x0:_0x2012e8?_0x51772b(_0x52ff32,_0x3982e8):_0x52ff32,_0x4c60cd=_0x2f4979[_0x59f018(0x1d6)]-0x1,_0x494008;_0x4c60cd>=0x0;_0x4c60cd--)(_0x494008=_0x2f4979[_0x4c60cd])&&(_0x772624=_0x494008(_0x772624)||_0x772624);return _0x772624;},_0x114544=(_0x4ce7bd,_0x544e5b)=>(_0xd1d86d,_0x30a6d3)=>_0x544e5b(_0xd1d86d,_0x30a6d3,_0x4ce7bd),_0x93394a=(_0x48fcb9,_0x2786ed,_0x2b8bf2)=>_0x538a6c(_0x48fcb9,typeof _0x2786ed!=_0x162ef1(0x1f9)?_0x2786ed+'':_0x2786ed,_0x2b8bf2);_0x4f18fd[_0x162ef1(0x203)]=class extends _0x36e2ec[_0x162ef1(0x1b3)]{constructor(_0x568446=_0x2d0d8f,_0x5d063a,_0x4a6416){const _0xc30e35=_0x162ef1;super(),this[_0xc30e35(0x1aa)]=_0x568446,this['_injector']=_0x5d063a,this[_0xc30e35(0x1ea)]=_0x4a6416;const {..._0x41de00}=_0x36e2ec[_0xc30e35(0x220)]({},_0x2d0d8f,this[_0xc30e35(0x1aa)]);this[_0xc30e35(0x1ea)]['setConfig'](_0x2a6a6e,_0x41de00);}[_0x162ef1(0x211)](){const _0x50e7cd=_0x162ef1;[[_0x39b1bf],[_0x44ea26],[_0x26bce3]][_0x50e7cd(0x1dd)](_0x2f2045=>{const _0x39b2db=_0x50e7cd;this[_0x39b2db(0x21a)][_0x39b2db(0x207)](_0x2f2045);});}[_0x162ef1(0x1c1)](){const _0x592fdb=_0x162ef1;this[_0x592fdb(0x21a)][_0x592fdb(0x229)](_0x44ea26),this[_0x592fdb(0x21a)][_0x592fdb(0x229)](_0x26bce3);}},_0x93394a(_0x4f18fd[_0x162ef1(0x203)],'pluginName',_0x1be69d),_0x93394a(_0x4f18fd['UniverThreadCommentDataSourcePlugin'],_0x162ef1(0x1cc),_0x36e2ec['UniverInstanceType'][_0x162ef1(0x214)]),_0x4f18fd['UniverThreadCommentDataSourcePlugin']=_0x43c099([_0x36e2ec[_0x162ef1(0x221)](_0x53f578[_0x162ef1(0x1de)],_0x27707d[_0x162ef1(0x1fe)],_0x2e38c4['UniverLicensePlugin']),_0x114544(0x1,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1c4)])),_0x114544(0x2,_0x36e2ec[_0x162ef1(0x1a5)])],_0x4f18fd[_0x162ef1(0x203)]),Object[_0x162ef1(0x1a3)](_0x4f18fd,Symbol[_0x162ef1(0x1d0)],{'value':_0x162ef1(0x1db)});}));function _0x3c17(_0x58a67f,_0xce7fd0){const _0xe3ded8=_0xe3de();return _0x3c17=function(_0x3c176c,_0x25da38){_0x3c176c=_0x3c176c-0x1a1;let _0x27aad5=_0xe3ded8[_0x3c176c];return _0x27aad5;},_0x3c17(_0x58a67f,_0xce7fd0);}function _0xe3de(){const _0x113e14=['/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverProThreadCommentDatasource','_config','getUnit','Reply','2211TiPzUR','reply','getUser','exports','_sessionService','deleteComment','Plugin','replyId','123790vpVVyz','pipe','rangeType','createTimestamp','updateComment','stringify','_httpService','user','delete','ThreadCommentModel','/add','userID','onReady','/reply','addComment','Injector','_threadCommentDataSource','_commentService','requireSession','subscribe','getComment','commentUpdate$','UNRECOGNIZED','type','_initUserSync','166tFsiXf','slice','toStringTag','payload','Edit','ref','error','users','length','38290PCopLF','comments','YYYY/MM/DD\x20HH:mm','_initDataSource','Module','parse','forEach','UniverThreadCommentUIPlugin','UserManagerService','post','135UIwMsx','getCurrentUser','Delete','CustomRangeType','_init','resolved','find','@univerjs/thread-comment','HTTPService','_configService','12744928HdIozL','code','comment','unitId','root','2176mQgNqn','/universer-api/comment/unit/','3484770UORplT','28716BMuwwA','filter','rangeId','/edit','content','resolveComment','symbol','replies','612huUfDH','solved','7046kmzkFx','UniverCollaborationClientPlugin','UniverThreadComment','format','saveCommentToSnapshot','bufferTime','UniverThreadCommentDataSourcePlugin','UniverCore','getMemberID','getOwnPropertyDescriptor','add','UniverThreadCommentUi','/list','customRanges','@univerjs-pro/collaboration-client','_userService','Solved','body','parentId','Solve','onStarting','thread-comment-data-source.config','COMMENT','UNIVER_UNKNOWN','syncUpdateMutationToColla','Unknown','map','amd','addUser','_injector','values','@univerjs/network','_threadCommentModel','listComments','threadId','merge','DependentOn','_threadCommentDataSourceService','IThreadCommentDataSourceService','dataSource','personId','9390xBwBQW','userId','CollaborationSessionService','get','rxjs','disposeWithMe','OpenOrReOpen','defineProperty','function','IConfigService','Inject'];_0xe3de=function(){return _0x113e14;};return _0xe3de();}
|
|
1
|
+
(function(_0x29e1fc,_0x45c552){const _0x4105bd=_0x28b1,_0x12b092=_0x29e1fc();while(!![]){try{const _0x5a2298=parseInt(_0x4105bd(0xff))/0x1+parseInt(_0x4105bd(0xd8))/0x2*(parseInt(_0x4105bd(0xcd))/0x3)+-parseInt(_0x4105bd(0x113))/0x4+-parseInt(_0x4105bd(0x120))/0x5+-parseInt(_0x4105bd(0x11e))/0x6*(parseInt(_0x4105bd(0x115))/0x7)+-parseInt(_0x4105bd(0x133))/0x8*(parseInt(_0x4105bd(0xcc))/0x9)+-parseInt(_0x4105bd(0xfd))/0xa*(-parseInt(_0x4105bd(0xfb))/0xb);if(_0x5a2298===_0x45c552)break;else _0x12b092['push'](_0x12b092['shift']());}catch(_0x996dca){_0x12b092['push'](_0x12b092['shift']());}}}(_0x1f1a,0xa5276),function(_0x250a0b,_0x1b83f3){const _0x2bd7a1=_0x28b1;typeof exports==_0x2bd7a1(0xf2)&&typeof module<'u'?_0x1b83f3(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==_0x2bd7a1(0xd2)&&define[_0x2bd7a1(0x134)]?define([_0x2bd7a1(0x125),_0x2bd7a1(0xdf),_0x2bd7a1(0xee),_0x2bd7a1(0x13c),'@univerjs/thread-comment-ui',_0x2bd7a1(0xeb),_0x2bd7a1(0xd6),_0x2bd7a1(0xd9)],_0x1b83f3):(_0x250a0b=typeof globalThis<'u'?globalThis:_0x250a0b||self,_0x1b83f3(_0x250a0b[_0x2bd7a1(0x12e)]={},_0x250a0b[_0x2bd7a1(0xc2)],_0x250a0b[_0x2bd7a1(0xe6)],_0x250a0b[_0x2bd7a1(0xbd)],_0x250a0b[_0x2bd7a1(0xfe)],_0x250a0b[_0x2bd7a1(0x128)],_0x250a0b[_0x2bd7a1(0xd6)],_0x250a0b[_0x2bd7a1(0xe4)]));}(this,function(_0x2a52e4,_0x1522df,_0x225c7e,_0x420862,_0x179658,_0x337128,_0x4b5f23,_0xbc6973){'use strict';const _0x5310d2=_0x28b1;const _0x1bcd07='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x17afe3=(_0x1a4f29=>(_0x1a4f29[_0x1a4f29[_0x5310d2(0xf3)]=0x0]=_0x5310d2(0xf3),_0x1a4f29[_0x1a4f29[_0x5310d2(0x13d)]=0x1]=_0x5310d2(0x13d),_0x1a4f29[_0x1a4f29['UNRECOGNIZED']=-0x1]=_0x5310d2(0x129),_0x1a4f29))(_0x17afe3||{}),_0x317030=(_0x899f80=>(_0x899f80[_0x899f80['Unknown']=0x0]=_0x5310d2(0x10e),_0x899f80[_0x899f80[_0x5310d2(0xe2)]=0x1]=_0x5310d2(0xe2),_0x899f80[_0x899f80['Reply']=0x2]=_0x5310d2(0xca),_0x899f80[_0x899f80[_0x5310d2(0xf5)]=0x3]='Edit',_0x899f80[_0x899f80[_0x5310d2(0x121)]=0x4]=_0x5310d2(0x121),_0x899f80[_0x899f80[_0x5310d2(0x100)]=0x5]=_0x5310d2(0x100),_0x899f80[_0x899f80[_0x5310d2(0x129)]=-0x1]=_0x5310d2(0x129),_0x899f80))(_0x317030||{});const _0x4a67e9=_0x34a369=>_0x420862[_0x5310d2(0xea)](new Date(+_0x34a369))[_0x5310d2(0xc9)](_0x5310d2(0x10b)),_0x22a23e=async(_0x2cd59a,_0x100be8)=>{const _0x5a8982=_0x5310d2,_0x26cbae=_0x2cd59a['get'](_0x420862[_0x5a8982(0xf1)]),_0x466cc4=_0x2cd59a[_0x5a8982(0x143)](_0xbc6973['HTTPService']);_0x100be8[_0x5a8982(0x114)](_0x4474aa=>{const _0x4bbd3f=_0x5a8982;_0x26cbae[_0x4bbd3f(0x137)](_0x4474aa)&&_0x100be8[_0x4bbd3f(0x124)](_0x4474aa);}),_0x100be8[_0x5a8982(0x11a)]&&(await _0x466cc4[_0x5a8982(0x143)](_0x5a8982(0x12a),{'params':{'userIDs':[..._0x100be8]}}))[_0x5a8982(0xdd)][_0x5a8982(0x11b)]['forEach'](_0x334034=>{_0x334034&&_0x26cbae['addUser'](_0x334034);});};var _0x27a6bb=Object['getOwnPropertyDescriptor'],_0x51d98b=(_0x2a185a,_0x5ebee9,_0x16ccd5,_0x2124b7)=>{const _0x312674=_0x5310d2;for(var _0x1bdb87=_0x2124b7>0x1?void 0x0:_0x2124b7?_0x27a6bb(_0x5ebee9,_0x16ccd5):_0x5ebee9,_0x28bd5a=_0x2a185a[_0x312674(0x10c)]-0x1,_0x29cb20;_0x28bd5a>=0x0;_0x28bd5a--)(_0x29cb20=_0x2a185a[_0x28bd5a])&&(_0x1bdb87=_0x29cb20(_0x1bdb87)||_0x1bdb87);return _0x1bdb87;},_0x326893=(_0x4e1350,_0x16c273)=>(_0x9c1966,_0x4c4f76)=>_0x16c273(_0x9c1966,_0x4c4f76,_0x4e1350);let _0x516b24=class extends _0x420862[_0x5310d2(0xc4)]{constructor(_0x491696,_0x86bbaa,_0x2a7814,_0x263c20){const _0x919d8b=_0x5310d2;super(),this[_0x919d8b(0xd5)]=_0x491696,this[_0x919d8b(0xec)]=_0x86bbaa,this['_userService']=_0x2a7814,this[_0x919d8b(0x136)]=_0x263c20,this[_0x919d8b(0xfc)](),this['_initUserSync']();}['_initUserSync'](){const _0x2490b4=_0x5310d2;this['disposeWithMe'](this[_0x2490b4(0xec)][_0x2490b4(0x13a)]['pipe'](_0x4b5f23[_0x2490b4(0xe7)](0x10))[_0x2490b4(0x126)](_0x1e95f4=>{const _0x320ac5=_0x2490b4,_0x3cccde=new Set();_0x1e95f4[_0x320ac5(0x114)](_0x156b84=>{const _0x373e01=_0x320ac5;switch(_0x156b84[_0x373e01(0x138)]){case _0x373e01(0xc1):{const _0x25a847=_0x156b84[_0x373e01(0x10a)][_0x373e01(0x13f)];_0x3cccde[_0x373e01(0xc1)](_0x25a847);break;}}}),_0x22a23e(this[_0x320ac5(0x136)],_0x3cccde);}));}[_0x5310d2(0xfc)](){const _0x5a024a=_0x5310d2;this['disposeWithMe'](this[_0x5a024a(0xd5)][_0x5a024a(0x13a)]['subscribe'](async _0x118272=>{const _0x52c431=_0x5a024a;var _0x8121c,_0x3399fb,_0x158c6b,_0x454772;const _0x3a7c3e=(_0x8121c=this[_0x52c431(0xec)][_0x52c431(0x130)](_0x118272[_0x52c431(0xe9)])[_0x52c431(0x127)](_0x106d3c=>_0x106d3c[_0x52c431(0x103)]===_0x118272[_0x52c431(0x103)]))==null?void 0x0:_0x8121c['root'];if(!_0x3a7c3e)return;const {unitId:_0x46b953,subUnitId:_0x408bde}=_0x3a7c3e;switch(_0x118272[_0x52c431(0x106)]&&this['_userService'][_0x52c431(0x11f)](_0x118272[_0x52c431(0x106)]),_0x118272['type']){case _0x317030[_0x52c431(0xe2)]:break;case _0x317030[_0x52c431(0xca)]:{this[_0x52c431(0xec)][_0x52c431(0xed)](_0x46b953,_0x408bde,{'unitId':_0x46b953,'subUnitId':_0x408bde,'ref':'','id':_0x118272['replyId'],'dT':_0x4a67e9(+_0x118272[_0x52c431(0x101)]),'threadId':_0x118272[_0x52c431(0x103)],'personId':(_0x158c6b=(_0x3399fb=_0x118272[_0x52c431(0x106)])==null?void 0x0:_0x3399fb[_0x52c431(0xbe)])!=null?_0x158c6b:_0x118272[_0x52c431(0x102)],'text':JSON['parse'](_0x118272[_0x52c431(0xf7)]),'parentId':_0x3a7c3e['id']});break;}case _0x317030[_0x52c431(0x121)]:{const _0x47a64c=this[_0x52c431(0xec)]['getComment'](_0x46b953,_0x408bde,_0x118272[_0x52c431(0x104)]);_0x47a64c&&_0x47a64c[_0x52c431(0x141)]&&this['_threadCommentModel'][_0x52c431(0xc5)](_0x46b953,_0x408bde,_0x118272['replyId']);break;}case _0x317030[_0x52c431(0xf5)]:{this[_0x52c431(0xec)][_0x52c431(0x11d)](_0x46b953,_0x408bde,{'commentId':_0x118272[_0x52c431(0x104)],'text':JSON[_0x52c431(0x12b)](_0x118272[_0x52c431(0xf7)])});break;}case _0x317030[_0x52c431(0x100)]:{const _0x55e200=(_0x454772=this['_threadCommentModel'][_0x52c431(0x130)](_0x118272[_0x52c431(0xe9)])[_0x52c431(0x127)](_0x4a2c87=>_0x4a2c87[_0x52c431(0x103)]===_0x118272[_0x52c431(0x103)]))==null?void 0x0:_0x454772[_0x52c431(0xf8)];_0x55e200&&this['_threadCommentModel'][_0x52c431(0x122)](_0x46b953,_0x408bde,_0x55e200['id'],_0x118272[_0x52c431(0x10d)]===_0x17afe3[_0x52c431(0x13d)]);break;}}}));}};_0x516b24=_0x51d98b([_0x326893(0x0,_0x420862[_0x5310d2(0x144)](_0x1522df[_0x5310d2(0x110)])),_0x326893(0x1,_0x420862['Inject'](_0x337128[_0x5310d2(0xf4)])),_0x326893(0x2,_0x420862[_0x5310d2(0x144)](_0x420862[_0x5310d2(0xf1)])),_0x326893(0x3,_0x420862[_0x5310d2(0x144)](_0x420862[_0x5310d2(0x131)]))],_0x516b24);const _0x1de666=_0x5310d2(0xdc),_0x3be7fa={};var _0x36a0da=Object[_0x5310d2(0x116)],_0x4a0e71=(_0x4764ba,_0x25e2fe,_0xb1018c,_0x76364a)=>{const _0xb4ce10=_0x5310d2;for(var _0x41217c=_0x76364a>0x1?void 0x0:_0x76364a?_0x36a0da(_0x25e2fe,_0xb1018c):_0x25e2fe,_0x8897ea=_0x4764ba[_0xb4ce10(0x10c)]-0x1,_0x1f13d9;_0x8897ea>=0x0;_0x8897ea--)(_0x1f13d9=_0x4764ba[_0x8897ea])&&(_0x41217c=_0x1f13d9(_0x41217c)||_0x41217c);return _0x41217c;},_0x4af0a1=(_0x244873,_0x533c77)=>(_0x493194,_0x3df72a)=>_0x533c77(_0x493194,_0x3df72a,_0x244873);function _0x3e7798(_0x16b0cf,_0x14126d){const _0x41aea2=_0x5310d2,_0x5c0729=_0x16b0cf[_0x41aea2(0x140)][0x0];return{..._0x14126d,'id':_0x5c0729[_0x41aea2(0x104)],'resolved':_0x16b0cf[_0x41aea2(0x10d)]===0x1,'dT':_0x4a67e9(_0x5c0729[_0x41aea2(0x101)]),'personId':_0x5c0729['userId'],'threadId':_0x5c0729[_0x41aea2(0x103)]};}function _0x11d5e1(_0x5d7298,_0x1ca270,_0x121fd2){const _0x362350=_0x5310d2;var _0x59489a,_0x2fc933;if(((_0x2fc933=(_0x59489a=_0x5d7298==null?void 0x0:_0x5d7298[_0x362350(0x140)])==null?void 0x0:_0x59489a['length'])!=null?_0x2fc933:0x0)>0x0){const _0x165dfa=(_0xf4c0ce,_0xdb94f8)=>({'id':_0xf4c0ce['replyId'],'threadId':_0xf4c0ce[_0x362350(0x103)],'dT':_0x4a67e9(_0xf4c0ce[_0x362350(0x101)]),'personId':_0xf4c0ce[_0x362350(0x102)],'resolved':_0x5d7298[_0x362350(0x10d)]===_0x17afe3[_0x362350(0x13d)],'unitId':_0x1ca270,'subUnitId':_0x121fd2,'text':JSON[_0x362350(0x12b)](_0xf4c0ce['content']),'parentId':_0xdb94f8}),_0x55f483=_0x165dfa(_0x5d7298[_0x362350(0x140)][0x0]);return{..._0x55f483,'children':_0x5d7298['replies'][_0x362350(0xbc)](0x1)['map'](_0x337350=>_0x165dfa(_0x337350,_0x55f483['id']))};}return null;}let _0x45da3a=class{constructor(_0x201c45,_0x4f0ae9,_0x6a61d5,_0x1a4d7b){const _0x591889=_0x5310d2;this[_0x591889(0xe3)]=_0x201c45,this[_0x591889(0xf9)]=_0x4f0ae9,this[_0x591889(0xfa)]=_0x6a61d5,this[_0x591889(0x136)]=_0x1a4d7b;}async['addComment'](_0x31e614){const _0x86443b=_0x5310d2;var _0x787a83,_0x387fe4;const {parentId:_0x4efba5,unitId:_0x41d9f0,text:_0x55132d,threadId:_0x151086}=_0x31e614,_0x1cf330=(_0x387fe4=(_0x787a83=_0x55132d[_0x86443b(0xd0)])==null?void 0x0:_0x787a83[_0x86443b(0xbb)](_0x5339f1=>_0x5339f1[_0x86443b(0x118)]===_0x420862[_0x86443b(0xbf)][_0x86443b(0xce)])[_0x86443b(0xcf)](_0x43dd0c=>_0x43dd0c[_0x86443b(0x111)]))!=null?_0x387fe4:[],_0x4f7c50=JSON[_0x86443b(0xe5)](_0x55132d),_0x2dec5e=(await this[_0x86443b(0xfa)][_0x86443b(0x142)](_0x41d9f0))[_0x86443b(0xd3)]();if(_0x4efba5){const _0x68892e={'memberId':_0x2dec5e,'unitId':_0x41d9f0,'content':_0x4f7c50,'mention':_0x1cf330,'threadId':_0x151086},_0x2decd3=(await this[_0x86443b(0xe3)][_0x86443b(0x139)](_0x86443b(0x109)+_0x41d9f0+_0x86443b(0x11c),{'body':_0x68892e}))[_0x86443b(0xdd)]['reply'];return{..._0x31e614,'id':_0x2decd3[_0x86443b(0x104)],'dT':_0x420862[_0x86443b(0xea)](+_0x2decd3[_0x86443b(0x101)])['format'](_0x86443b(0x10b)),'personId':_0x2decd3[_0x86443b(0x102)]};}else{const _0x5838fc={'memberId':_0x2dec5e,'unitId':_0x41d9f0,'content':_0x4f7c50,'mention':_0x1cf330},_0x231540=await this['_httpService'][_0x86443b(0x139)]('/universer-api/comment/unit/'+_0x41d9f0+_0x86443b(0x107),{'body':_0x5838fc});return _0x3e7798(_0x231540['body'][_0x86443b(0xc3)],_0x31e614);}}async[_0x5310d2(0x11d)](_0xfc1e5c){const _0x52ed5e=_0x5310d2;var _0x4e5a17,_0x1fe12e;const {text:_0x405523,unitId:_0x4ed17a}=_0xfc1e5c,_0x530572=(_0x1fe12e=(_0x4e5a17=_0x405523[_0x52ed5e(0xd0)])==null?void 0x0:_0x4e5a17['filter'](_0x371e26=>_0x371e26[_0x52ed5e(0x118)]===_0x420862[_0x52ed5e(0xbf)][_0x52ed5e(0xce)])[_0x52ed5e(0xcf)](_0x4eed1b=>_0x4eed1b[_0x52ed5e(0x111)]))!=null?_0x1fe12e:[],_0xc870a8=JSON['stringify'](_0x405523),_0x116774=_0xfc1e5c[_0x52ed5e(0x103)],_0x596ed7=_0xfc1e5c['id'],_0x372de8={'memberId':(await this['_sessionService'][_0x52ed5e(0x142)](_0x4ed17a))[_0x52ed5e(0xd3)](),'unitId':_0x4ed17a,'threadId':_0x116774,'mention':_0x530572,'content':_0xc870a8,'replyId':_0x596ed7},_0x393e9c=await this[_0x52ed5e(0xe3)][_0x52ed5e(0x139)](_0x52ed5e(0x109)+_0x4ed17a+_0x52ed5e(0x108),{'body':_0x372de8});return!_0x393e9c[_0x52ed5e(0xdd)][_0x52ed5e(0xf6)]||_0x393e9c[_0x52ed5e(0xdd)][_0x52ed5e(0xf6)][_0x52ed5e(0xe0)]===0x1;}async[_0x5310d2(0x122)](_0x5692e3){const _0x232853=_0x5310d2,{unitId:_0x1c1b66}=_0x5692e3,_0xbe9f18=_0x5692e3['threadId'],_0x522f11={'memberId':this[_0x232853(0xf9)][_0x232853(0xda)]()[_0x232853(0xbe)],'unitId':_0x1c1b66,'threadId':_0xbe9f18,'solved':_0x5692e3[_0x232853(0x145)]?_0x17afe3[_0x232853(0x13d)]:_0x17afe3[_0x232853(0xf3)]},_0x13f582=await this[_0x232853(0xe3)][_0x232853(0x139)](_0x232853(0x109)+_0x1c1b66+_0x232853(0x13e),{'body':_0x522f11});return!_0x13f582[_0x232853(0xdd)][_0x232853(0xf6)]||_0x13f582['body'][_0x232853(0xf6)][_0x232853(0xe0)]===0x1;}async[_0x5310d2(0xc5)](_0x56bace,_0x4f58d0,_0x1bd3e1,_0x14fa72){const _0x512b61=_0x5310d2,_0x1696a6={'memberId':(await this['_sessionService'][_0x512b61(0x142)](_0x56bace))[_0x512b61(0xd3)](),'threadId':_0x1bd3e1,'replyId':_0x14fa72,'unitId':_0x56bace},_0x40509d=await this[_0x512b61(0xe3)]['post'](_0x512b61(0x109)+_0x56bace+_0x512b61(0xd7),{'body':_0x1696a6});return!_0x40509d['body'][_0x512b61(0xf6)]||_0x40509d[_0x512b61(0xdd)]['error'][_0x512b61(0xe0)]===0x1;}async[_0x5310d2(0xe8)](_0x10e401,_0x5ec516,_0x7764e6){const _0x1b21dc=_0x5310d2,_0x29f989={'unitId':_0x10e401,'threadId':_0x7764e6},_0x30b384=await this[_0x1b21dc(0xe3)][_0x1b21dc(0x139)](_0x1b21dc(0x109)+_0x10e401+_0x1b21dc(0x105),{'body':_0x29f989}),_0xb3fa02=_0x7764e6[_0x1b21dc(0xcf)](_0x24ce3d=>_0x11d5e1(_0x30b384[_0x1b21dc(0xdd)][_0x1b21dc(0xd1)][_0x24ce3d],_0x10e401,_0x5ec516))['filter'](Boolean);return Object['values'](_0x30b384[_0x1b21dc(0xdd)][_0x1b21dc(0x11b)])[_0x1b21dc(0x114)](_0x786440=>{const _0x58e976=_0x1b21dc;this[_0x58e976(0xf9)][_0x58e976(0x11f)](_0x786440);}),_0xb3fa02;}['saveCommentToSnapshot'](_0x55e199){const _0x175a26=_0x5310d2;return{'id':_0x55e199['id'],'threadId':_0x55e199[_0x175a26(0x103)],'ref':_0x55e199[_0x175a26(0xc8)]};}};_0x45da3a=_0x4a0e71([_0x4af0a1(0x0,_0x420862[_0x5310d2(0x144)](_0xbc6973['HTTPService'])),_0x4af0a1(0x1,_0x420862[_0x5310d2(0x144)](_0x420862['UserManagerService'])),_0x4af0a1(0x2,_0x420862[_0x5310d2(0x144)](_0x1522df['CollaborationSessionService'])),_0x4af0a1(0x3,_0x420862[_0x5310d2(0x144)](_0x420862[_0x5310d2(0x131)]))],_0x45da3a);var _0x539f15=Object[_0x5310d2(0x116)],_0x4e2cc8=(_0x4a6f47,_0x48f692,_0x192dc0,_0x1f83b2)=>{const _0x2b2b8b=_0x5310d2;for(var _0x42eb7c=_0x1f83b2>0x1?void 0x0:_0x1f83b2?_0x539f15(_0x48f692,_0x192dc0):_0x48f692,_0x186c19=_0x4a6f47[_0x2b2b8b(0x10c)]-0x1,_0x1f10dd;_0x186c19>=0x0;_0x186c19--)(_0x1f10dd=_0x4a6f47[_0x186c19])&&(_0x42eb7c=_0x1f10dd(_0x42eb7c)||_0x42eb7c);return _0x42eb7c;},_0x4ee8ea=(_0x31b129,_0x5251a5)=>(_0x377a4c,_0x436a38)=>_0x5251a5(_0x377a4c,_0x436a38,_0x31b129);let _0x178f52=class extends _0x420862[_0x5310d2(0xc4)]{constructor(_0x365a1e,_0x3a5335){const _0x47e6ff=_0x5310d2;super(),this[_0x47e6ff(0xc7)]=_0x365a1e,this['_threadCommentDataSource']=_0x3a5335,this['_initDataSource']();}[_0x5310d2(0x132)](){const _0x2ccb11=_0x5310d2;this[_0x2ccb11(0xc7)][_0x2ccb11(0xc0)]=this[_0x2ccb11(0x12f)],this[_0x2ccb11(0xc7)][_0x2ccb11(0xc6)]=!0x1;}};_0x178f52=_0x4e2cc8([_0x4ee8ea(0x0,_0x337128[_0x5310d2(0xde)]),_0x4ee8ea(0x1,_0x420862[_0x5310d2(0x144)](_0x45da3a))],_0x178f52);var _0x114938=Object[_0x5310d2(0x112)],_0x4e5376=Object[_0x5310d2(0x116)],_0x144dc7=(_0x517628,_0x1c05c8,_0x5c8295)=>_0x1c05c8 in _0x517628?_0x114938(_0x517628,_0x1c05c8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c8295}):_0x517628[_0x1c05c8]=_0x5c8295,_0x23b69a=(_0x1e9cbb,_0x3fc3f4,_0x232b68,_0x1abf4f)=>{const _0x37c575=_0x5310d2;for(var _0x37937b=_0x1abf4f>0x1?void 0x0:_0x1abf4f?_0x4e5376(_0x3fc3f4,_0x232b68):_0x3fc3f4,_0xf37a26=_0x1e9cbb[_0x37c575(0x10c)]-0x1,_0x1a6935;_0xf37a26>=0x0;_0xf37a26--)(_0x1a6935=_0x1e9cbb[_0xf37a26])&&(_0x37937b=_0x1a6935(_0x37937b)||_0x37937b);return _0x37937b;},_0x33f302=(_0x58e78e,_0x161646)=>(_0x30832e,_0xab70de)=>_0x161646(_0x30832e,_0xab70de,_0x58e78e),_0x1f0fa0=(_0x2ba609,_0xf1e61d,_0x2426f4)=>_0x144dc7(_0x2ba609,typeof _0xf1e61d!=_0x5310d2(0x12d)?_0xf1e61d+'':_0xf1e61d,_0x2426f4);_0x2a52e4[_0x5310d2(0x119)]=class extends _0x420862[_0x5310d2(0xcb)]{constructor(_0x329bd6=_0x3be7fa,_0x4a6b9a,_0x5c4e16){const _0x62f0ea=_0x5310d2;super(),this[_0x62f0ea(0xef)]=_0x329bd6,this[_0x62f0ea(0x136)]=_0x4a6b9a,this[_0x62f0ea(0x123)]=_0x5c4e16;const {..._0x20f9a5}=_0x420862[_0x62f0ea(0xf0)]({},_0x3be7fa,this[_0x62f0ea(0xef)]);this['_configService']['setConfig'](_0x1de666,_0x20f9a5);}[_0x5310d2(0x117)](){const _0x321d6e=_0x5310d2;[[_0x45da3a],[_0x178f52],[_0x516b24]][_0x321d6e(0x114)](_0x129291=>{const _0x237c4f=_0x321d6e;this[_0x237c4f(0x136)]['add'](_0x129291);});}[_0x5310d2(0xba)](){const _0x2e2132=_0x5310d2;this['_injector']['get'](_0x178f52),this['_injector'][_0x2e2132(0x143)](_0x516b24);}},_0x1f0fa0(_0x2a52e4['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x1bcd07),_0x1f0fa0(_0x2a52e4[_0x5310d2(0x119)],_0x5310d2(0x138),_0x420862[_0x5310d2(0xd4)][_0x5310d2(0x13b)]),_0x2a52e4[_0x5310d2(0x119)]=_0x23b69a([_0x420862[_0x5310d2(0x12c)](_0x179658[_0x5310d2(0x10f)],_0x1522df[_0x5310d2(0x135)],_0x225c7e[_0x5310d2(0xe1)]),_0x33f302(0x1,_0x420862['Inject'](_0x420862['Injector'])),_0x33f302(0x2,_0x420862['IConfigService'])],_0x2a52e4[_0x5310d2(0x119)]),Object[_0x5310d2(0x112)](_0x2a52e4,Symbol['toStringTag'],{'value':_0x5310d2(0xdb)});}));function _0x28b1(_0x4066a3,_0x13c5dc){const _0x1f1ae7=_0x1f1a();return _0x28b1=function(_0x28b190,_0x3e47e5){_0x28b190=_0x28b190-0xba;let _0x582217=_0x1f1ae7[_0x28b190];return _0x582217;},_0x28b1(_0x4066a3,_0x13c5dc);}function _0x1f1a(){const _0x3537b7=['deleteComment','syncUpdateMutationToColla','_threadCommentDataSourceService','ref','format','Reply','Plugin','716598aFcUEc','57SriLNR','COMMENT','map','customRanges','comments','function','getMemberID','UniverInstanceType','_commentService','rxjs','/delete','41872vROaDt','@univerjs/network','getCurrentUser','Module','thread-comment-data-source.config','body','IThreadCommentDataSourceService','@univerjs-pro/collaboration-client','code','UniverLicensePlugin','Add','_httpService','UniverNetwork','stringify','UniverProLicense','bufferTime','listComments','unitId','dayjs','@univerjs/thread-comment','_threadCommentModel','addComment','@univerjs-pro/license','_config','merge','UserManagerService','object','OpenOrReOpen','ThreadCommentModel','Edit','error','content','root','_userService','_sessionService','20473079luRMfj','_init','10qpHSCU','UniverThreadCommentUi','201908icuUTs','Solve','createTimestamp','userId','threadId','replyId','/list','user','/add','/edit','/universer-api/comment/unit/','payload','YYYY/MM/DD\x20HH:mm','length','solved','Unknown','UniverThreadCommentUIPlugin','CommentService','rangeId','defineProperty','1726980MdvKwi','forEach','161VCSwmo','getOwnPropertyDescriptor','onStarting','rangeType','UniverThreadCommentDataSourcePlugin','size','users','/reply','updateComment','61482OmtqFV','addUser','3992485WCaKaK','Delete','resolveComment','_configService','delete','exports','subscribe','find','UniverThreadComment','UNRECOGNIZED','/universer-api/user/list','parse','DependentOn','symbol','UniverProThreadCommentDatasource','_threadCommentDataSource','getUnit','Injector','_initDataSource','32dnfAuB','amd','UniverCollaborationClientPlugin','_injector','getUser','type','post','commentUpdate$','UNIVER_UNKNOWN','@univerjs/core','Solved','/solved','personId','replies','parentId','requireSession','get','Inject','resolved','onReady','filter','slice','UniverCore','userID','CustomRangeType','dataSource','add','UniverProCollaborationClient','comment','Disposable'];_0x1f1a=function(){return _0x3537b7;};return _0x1f1a();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.3-nightly.
|
|
3
|
+
"version": "0.9.3-nightly.202507250819",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -42,23 +42,16 @@
|
|
|
42
42
|
"lib"
|
|
43
43
|
],
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"rxjs": ">=7.0.0"
|
|
46
|
-
"@univerjs-pro/collaboration-client": "0.9.3-nightly.202507250750",
|
|
47
|
-
"@univerjs/core": "0.9.3-nightly.202507250750",
|
|
48
|
-
"@univerjs/network": "0.9.3-nightly.202507250750",
|
|
49
|
-
"@univerjs-pro/license": "0.9.3-nightly.202507250750",
|
|
50
|
-
"@univerjs/thread-comment": "0.9.3-nightly.202507250750",
|
|
51
|
-
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs/thread-comment-ui": "0.9.3-nightly.202507250750"
|
|
45
|
+
"rxjs": ">=7.0.0"
|
|
53
46
|
},
|
|
54
47
|
"dependencies": {
|
|
55
|
-
"@univerjs-pro/collaboration-client": "0.9.3-nightly.
|
|
56
|
-
"@univerjs-pro/license": "0.9.3-nightly.
|
|
57
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.9.3-nightly.202507250819",
|
|
49
|
+
"@univerjs-pro/license": "0.9.3-nightly.202507250819",
|
|
50
|
+
"@univerjs/core": "0.9.3-nightly.202507250819",
|
|
58
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
59
|
-
"@univerjs/thread-comment": "0.9.3-nightly.
|
|
60
|
-
"@univerjs/
|
|
61
|
-
"@univerjs/thread-comment-ui": "0.9.3-nightly.
|
|
52
|
+
"@univerjs/thread-comment": "0.9.3-nightly.202507250819",
|
|
53
|
+
"@univerjs/network": "0.9.3-nightly.202507250819",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.9.3-nightly.202507250819"
|
|
62
55
|
},
|
|
63
56
|
"devDependencies": {
|
|
64
57
|
"rxjs": "7.8.2",
|