@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202506071606 → 0.8.0-nightly.202506091607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x304d9e=_0x3547;(function(_0x443140,_0x293e6a){const _0x20c6d6=_0x3547,_0x4c44bf=_0x443140();while(!![]){try{const _0xbb50c=-parseInt(_0x20c6d6(0xef))/0x1*(parseInt(_0x20c6d6(0x129))/0x2)+-parseInt(_0x20c6d6(0xe5))/0x3+-parseInt(_0x20c6d6(0xe0))/0x4*(parseInt(_0x20c6d6(0x147))/0x5)+-parseInt(_0x20c6d6(0x150))/0x6+-parseInt(_0x20c6d6(0x14c))/0x7*(-parseInt(_0x20c6d6(0x126))/0x8)+-parseInt(_0x20c6d6(0xd9))/0x9*(-parseInt(_0x20c6d6(0x10b))/0xa)+-parseInt(_0x20c6d6(0x128))/0xb*(-parseInt(_0x20c6d6(0xfe))/0xc);if(_0xbb50c===_0x293e6a)break;else _0x4c44bf['push'](_0x4c44bf['shift']());}catch(_0x1133a6){_0x4c44bf['push'](_0x4c44bf['shift']());}}}(_0x53e7,0xd8ecf));Object[_0x304d9e(0x12f)](exports,Symbol[_0x304d9e(0xd4)],{'value':_0x304d9e(0x146)});const b=require(_0x304d9e(0xf0)),T=require(_0x304d9e(0xe1)),c=require('@univerjs/core'),j=require(_0x304d9e(0xd1)),M=require(_0x304d9e(0x140)),w=require(_0x304d9e(0x118)),P=require(_0x304d9e(0x135)),U=_0x304d9e(0x104);var I=(_0x358d0f=>(_0x358d0f[_0x358d0f[_0x304d9e(0x105)]=0x0]=_0x304d9e(0x105),_0x358d0f[_0x358d0f[_0x304d9e(0x106)]=0x1]=_0x304d9e(0x106),_0x358d0f[_0x358d0f[_0x304d9e(0x141)]=-0x1]=_0x304d9e(0x141),_0x358d0f))(I||{}),v=(_0x473ab5=>(_0x473ab5[_0x473ab5['Unknown']=0x0]=_0x304d9e(0xdb),_0x473ab5[_0x473ab5[_0x304d9e(0xf3)]=0x1]=_0x304d9e(0xf3),_0x473ab5[_0x473ab5[_0x304d9e(0x13f)]=0x2]=_0x304d9e(0x13f),_0x473ab5[_0x473ab5['Edit']=0x3]=_0x304d9e(0x145),_0x473ab5[_0x473ab5[_0x304d9e(0xe9)]=0x4]='Delete',_0x473ab5[_0x473ab5[_0x304d9e(0xfa)]=0x5]=_0x304d9e(0xfa),_0x473ab5[_0x473ab5[_0x304d9e(0x141)]=-0x1]=_0x304d9e(0x141),_0x473ab5))(v||{});const f=_0x34192b=>c[_0x304d9e(0x13e)](new Date(+_0x34192b))[_0x304d9e(0x116)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x446538,_0x2e21eb)=>{const _0x527070=_0x304d9e,_0x5ceb62=_0x446538[_0x527070(0x122)](c[_0x527070(0xe7)]),_0x267a2d=_0x446538[_0x527070(0x122)](P[_0x527070(0xe8)]);_0x2e21eb[_0x527070(0xfb)](_0x4bf513=>{const _0x126780=_0x527070;_0x5ceb62[_0x126780(0x127)](_0x4bf513)&&_0x2e21eb[_0x126780(0x155)](_0x4bf513);}),_0x2e21eb[_0x527070(0x107)]&&(await _0x267a2d[_0x527070(0x122)](_0x527070(0x10f),{'params':{'userIDs':[..._0x2e21eb]}}))[_0x527070(0xf2)][_0x527070(0x119)][_0x527070(0xfb)](_0xfbf166=>{const _0x1df6f7=_0x527070;_0xfbf166&&_0x5ceb62[_0x1df6f7(0xfd)](_0xfbf166);});};var $=Object[_0x304d9e(0xea)],E=(_0x16fced,_0x422c7d,_0x428ca2,_0xe6d4eb)=>{const _0x3b8a30=_0x304d9e;for(var _0x4950ea=_0xe6d4eb>0x1?void 0x0:_0xe6d4eb?$(_0x422c7d,_0x428ca2):_0x422c7d,_0x56eb68=_0x16fced[_0x3b8a30(0x151)]-0x1,_0xb9b9db;_0x56eb68>=0x0;_0x56eb68--)(_0xb9b9db=_0x16fced[_0x56eb68])&&(_0x4950ea=_0xb9b9db(_0x4950ea)||_0x4950ea);return _0x4950ea;},S=(_0x387518,_0x2e1a56)=>(_0x24552d,_0x5b5ebd)=>_0x2e1a56(_0x24552d,_0x5b5ebd,_0x387518);let p=class extends c['Disposable']{constructor(_0x26b9a3,_0x104de8,_0xf2f2ce,_0x511fa3){const _0x185b8d=_0x304d9e;super(),this[_0x185b8d(0xec)]=_0x26b9a3,this[_0x185b8d(0xe4)]=_0x104de8,this['_userService']=_0xf2f2ce,this[_0x185b8d(0x10c)]=_0x511fa3,this[_0x185b8d(0xf9)](),this[_0x185b8d(0x10e)]();}[_0x304d9e(0x10e)](){const _0x2879b6=_0x304d9e;this[_0x2879b6(0x120)](this[_0x2879b6(0xe4)][_0x2879b6(0x139)][_0x2879b6(0x12c)](w[_0x2879b6(0x124)](0x10))['subscribe'](_0x106022=>{const _0xa6719b=_0x2879b6,_0x53c81b=new Set();_0x106022['forEach'](_0x52cfcf=>{const _0x553f1c=_0x3547;switch(_0x52cfcf[_0x553f1c(0x11d)]){case _0x553f1c(0x117):{const _0x3966ba=_0x52cfcf['payload'][_0x553f1c(0xdd)];_0x53c81b[_0x553f1c(0x117)](_0x3966ba);break;}}}),R(this[_0xa6719b(0x10c)],_0x53c81b);}));}[_0x304d9e(0xf9)](){const _0x4a138f=_0x304d9e;this[_0x4a138f(0x120)](this['_commentService'][_0x4a138f(0x139)][_0x4a138f(0xf5)](async _0x4435c7=>{const _0x597d85=_0x4a138f;var _0x556b61,_0x32ef8f,_0x259fb0,_0x49624c;const _0x3770d2=(_0x556b61=this[_0x597d85(0xe4)]['getUnit'](_0x4435c7['unitId'])[_0x597d85(0x11e)](_0x2b111e=>_0x2b111e['threadId']===_0x4435c7[_0x597d85(0xe2)]))==null?void 0x0:_0x556b61[_0x597d85(0xd2)];if(!_0x3770d2)return;const {unitId:_0x5847b4,subUnitId:_0x49d11c}=_0x3770d2;switch(_0x4435c7[_0x597d85(0xd5)]&&this[_0x597d85(0x132)]['addUser'](_0x4435c7[_0x597d85(0xd5)]),_0x4435c7[_0x597d85(0x11d)]){case v[_0x597d85(0xf3)]:break;case v[_0x597d85(0x13f)]:{this[_0x597d85(0xe4)][_0x597d85(0x12a)](_0x5847b4,_0x49d11c,{'unitId':_0x5847b4,'subUnitId':_0x49d11c,'ref':'','id':_0x4435c7[_0x597d85(0xf6)],'dT':f(+_0x4435c7[_0x597d85(0xf4)]),'threadId':_0x4435c7[_0x597d85(0xe2)],'personId':(_0x259fb0=(_0x32ef8f=_0x4435c7[_0x597d85(0xd5)])==null?void 0x0:_0x32ef8f[_0x597d85(0x138)])!=null?_0x259fb0:_0x4435c7[_0x597d85(0x121)],'text':JSON[_0x597d85(0x110)](_0x4435c7[_0x597d85(0x14b)]),'parentId':_0x3770d2['id']});break;}case v[_0x597d85(0xe9)]:{const _0x5c90f9=this[_0x597d85(0xe4)][_0x597d85(0xd7)](_0x5847b4,_0x49d11c,_0x4435c7[_0x597d85(0xf6)]);_0x5c90f9&&_0x5c90f9[_0x597d85(0x108)]&&this[_0x597d85(0xe4)][_0x597d85(0x14a)](_0x5847b4,_0x49d11c,_0x4435c7[_0x597d85(0xf6)]);break;}case v[_0x597d85(0x145)]:{this[_0x597d85(0xe4)][_0x597d85(0x12b)](_0x5847b4,_0x49d11c,{'commentId':_0x4435c7[_0x597d85(0xf6)],'text':JSON[_0x597d85(0x110)](_0x4435c7[_0x597d85(0x14b)])});break;}case v[_0x597d85(0xfa)]:{const _0x43a82f=(_0x49624c=this['_threadCommentModel'][_0x597d85(0x131)](_0x4435c7[_0x597d85(0x113)])['find'](_0x21904c=>_0x21904c[_0x597d85(0xe2)]===_0x4435c7[_0x597d85(0xe2)]))==null?void 0x0:_0x49624c['root'];_0x43a82f&&this['_threadCommentModel'][_0x597d85(0xf8)](_0x5847b4,_0x49d11c,_0x43a82f['id'],_0x4435c7[_0x597d85(0xeb)]===I[_0x597d85(0x106)]);break;}}}));}};p=E([S(0x0,c[_0x304d9e(0xd8)](b[_0x304d9e(0xda)])),S(0x1,c[_0x304d9e(0xd8)](M[_0x304d9e(0x111)])),S(0x2,c[_0x304d9e(0xd8)](c['UserManagerService'])),S(0x3,c[_0x304d9e(0xd8)](c['Injector']))],p);const q=_0x304d9e(0x100),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x187184,_0x52f755,_0x5d3b1f,_0x784f18)=>{const _0xbd1dbc=_0x304d9e;for(var _0x18c836=_0x784f18>0x1?void 0x0:_0x784f18?A(_0x52f755,_0x5d3b1f):_0x52f755,_0x208378=_0x187184[_0xbd1dbc(0x151)]-0x1,_0x513150;_0x208378>=0x0;_0x208378--)(_0x513150=_0x187184[_0x208378])&&(_0x18c836=_0x513150(_0x18c836)||_0x18c836);return _0x18c836;},_=(_0x46aca7,_0x4b0acc)=>(_0x55b432,_0x15aa31)=>_0x4b0acc(_0x55b432,_0x15aa31,_0x46aca7);function Y(_0x5872e0,_0x295d9b){const _0xb5c573=_0x304d9e,_0x7e29e2=_0x5872e0[_0xb5c573(0xfc)][0x0];return{..._0x295d9b,'id':_0x7e29e2[_0xb5c573(0xf6)],'resolved':_0x5872e0[_0xb5c573(0xeb)]===0x1,'dT':f(_0x7e29e2[_0xb5c573(0xf4)]),'personId':_0x7e29e2[_0xb5c573(0x121)],'threadId':_0x7e29e2[_0xb5c573(0xe2)]};}function G(_0x2b8f80,_0xf011d5,_0x4c6e68){const _0x2bd8b6=_0x304d9e;var _0x4d519d,_0x301d99;if(((_0x301d99=(_0x4d519d=_0x2b8f80==null?void 0x0:_0x2b8f80[_0x2bd8b6(0xfc)])==null?void 0x0:_0x4d519d[_0x2bd8b6(0x151)])!=null?_0x301d99:0x0)>0x0){const _0x191d68=(_0x4026f8,_0x2fdfe3)=>({'id':_0x4026f8[_0x2bd8b6(0xf6)],'threadId':_0x4026f8[_0x2bd8b6(0xe2)],'dT':f(_0x4026f8[_0x2bd8b6(0xf4)]),'personId':_0x4026f8[_0x2bd8b6(0x121)],'resolved':_0x2b8f80[_0x2bd8b6(0xeb)]===I[_0x2bd8b6(0x106)],'unitId':_0xf011d5,'subUnitId':_0x4c6e68,'text':JSON[_0x2bd8b6(0x110)](_0x4026f8[_0x2bd8b6(0x14b)]),'parentId':_0x2fdfe3}),_0x149756=_0x191d68(_0x2b8f80[_0x2bd8b6(0xfc)][0x0]);return{..._0x149756,'children':_0x2b8f80[_0x2bd8b6(0xfc)][_0x2bd8b6(0x14d)](0x1)['map'](_0x261560=>_0x191d68(_0x261560,_0x149756['id']))};}return null;}let g=class{constructor(_0x498cea,_0x2dcb22,_0x271af2,_0x3c4380){const _0x5606e8=_0x304d9e;this[_0x5606e8(0xee)]=_0x498cea,this[_0x5606e8(0x132)]=_0x2dcb22,this['_sessionService']=_0x271af2,this['_injector']=_0x3c4380;}async[_0x304d9e(0x12a)](_0x57e0ea){const _0x1b7110=_0x304d9e;var _0x353601,_0x63d6e3;const {parentId:_0x12437e,unitId:_0x103d2f,text:_0x2dc4a2,threadId:_0x355d04}=_0x57e0ea,_0x4af134=(_0x63d6e3=(_0x353601=_0x2dc4a2['customRanges'])==null?void 0x0:_0x353601[_0x1b7110(0xd6)](_0x18a66b=>_0x18a66b[_0x1b7110(0x11c)]===c[_0x1b7110(0x13b)][_0x1b7110(0x102)])[_0x1b7110(0xe6)](_0x9388a3=>_0x9388a3[_0x1b7110(0x152)]))!=null?_0x63d6e3:[],_0x18a299=JSON[_0x1b7110(0x14f)](_0x2dc4a2),_0x50f1d7=(await this['_sessionService']['requireSession'](_0x103d2f))[_0x1b7110(0x109)]();if(_0x12437e){const _0x58a7c5={'memberId':_0x50f1d7,'unitId':_0x103d2f,'content':_0x18a299,'mention':_0x4af134,'threadId':_0x355d04},_0x1e37c9=(await this[_0x1b7110(0xee)]['post'](_0x1b7110(0x13d)+_0x103d2f+'/reply',{'body':_0x58a7c5}))[_0x1b7110(0xf2)][_0x1b7110(0x11b)];return{..._0x57e0ea,'id':_0x1e37c9['replyId'],'dT':c[_0x1b7110(0x13e)](+_0x1e37c9[_0x1b7110(0xf4)])[_0x1b7110(0x116)](_0x1b7110(0x142)),'personId':_0x1e37c9[_0x1b7110(0x121)]};}else{const _0x4a6411={'memberId':_0x50f1d7,'unitId':_0x103d2f,'content':_0x18a299,'mention':_0x4af134},_0x3bd57f=await this[_0x1b7110(0xee)][_0x1b7110(0x114)](_0x1b7110(0x13d)+_0x103d2f+_0x1b7110(0x14e),{'body':_0x4a6411});return Y(_0x3bd57f[_0x1b7110(0xf2)][_0x1b7110(0x103)],_0x57e0ea);}}async[_0x304d9e(0x12b)](_0x442698){const _0x12e087=_0x304d9e;var _0x1ac0df,_0x49b716;const {text:_0x2b7c12,unitId:_0x1e0800}=_0x442698,_0x22831f=(_0x49b716=(_0x1ac0df=_0x2b7c12['customRanges'])==null?void 0x0:_0x1ac0df['filter'](_0x4074d3=>_0x4074d3[_0x12e087(0x11c)]===c[_0x12e087(0x13b)][_0x12e087(0x102)])[_0x12e087(0xe6)](_0x561ce9=>_0x561ce9[_0x12e087(0x152)]))!=null?_0x49b716:[],_0xf9ed53=JSON['stringify'](_0x2b7c12),_0x352fd5=_0x442698[_0x12e087(0xe2)],_0x52f2f6=_0x442698['id'],_0x3d7ab4={'memberId':(await this['_sessionService']['requireSession'](_0x1e0800))['getMemberID'](),'unitId':_0x1e0800,'threadId':_0x352fd5,'mention':_0x22831f,'content':_0xf9ed53,'replyId':_0x52f2f6},_0x353f2c=await this[_0x12e087(0xee)]['post'](_0x12e087(0x13d)+_0x1e0800+_0x12e087(0x153),{'body':_0x3d7ab4});return!_0x353f2c[_0x12e087(0xf2)][_0x12e087(0x123)]||_0x353f2c[_0x12e087(0xf2)][_0x12e087(0x123)][_0x12e087(0xdc)]===0x1;}async[_0x304d9e(0xf8)](_0xdd8856){const _0x29a694=_0x304d9e,{unitId:_0x411af6}=_0xdd8856,_0x3b2d26=_0xdd8856[_0x29a694(0xe2)],_0x24403a={'memberId':this[_0x29a694(0x132)]['getCurrentUser']()['userID'],'unitId':_0x411af6,'threadId':_0x3b2d26,'solved':_0xdd8856['resolved']?I[_0x29a694(0x106)]:I[_0x29a694(0x105)]},_0x319616=await this[_0x29a694(0xee)][_0x29a694(0x114)](_0x29a694(0x13d)+_0x411af6+'/solved',{'body':_0x24403a});return!_0x319616[_0x29a694(0xf2)][_0x29a694(0x123)]||_0x319616[_0x29a694(0xf2)]['error'][_0x29a694(0xdc)]===0x1;}async[_0x304d9e(0x14a)](_0x572577,_0x1b0a6c,_0xcbdab9,_0x33cdda){const _0x249b4a=_0x304d9e,_0x3b6cb6={'memberId':(await this[_0x249b4a(0xf7)]['requireSession'](_0x572577))['getMemberID'](),'threadId':_0xcbdab9,'replyId':_0x33cdda,'unitId':_0x572577},_0x4c3482=await this[_0x249b4a(0xee)][_0x249b4a(0x114)](_0x249b4a(0x13d)+_0x572577+'/delete',{'body':_0x3b6cb6});return!_0x4c3482['body']['error']||_0x4c3482[_0x249b4a(0xf2)][_0x249b4a(0x123)]['code']===0x1;}async[_0x304d9e(0x134)](_0x35ebd5,_0x13abc5,_0x2ac33b){const _0x3d7d96=_0x304d9e,_0x101173={'unitId':_0x35ebd5,'threadId':_0x2ac33b},_0xc25e6=await this[_0x3d7d96(0xee)][_0x3d7d96(0x114)](_0x3d7d96(0x13d)+_0x35ebd5+_0x3d7d96(0x154),{'body':_0x101173}),_0x29526d=_0x2ac33b['map'](_0x387801=>G(_0xc25e6[_0x3d7d96(0xf2)]['comments'][_0x387801],_0x35ebd5,_0x13abc5))[_0x3d7d96(0xd6)](Boolean);return Object[_0x3d7d96(0xf1)](_0xc25e6[_0x3d7d96(0xf2)]['users'])[_0x3d7d96(0xfb)](_0x31a29a=>{const _0x22b7ec=_0x3d7d96;this[_0x22b7ec(0x132)][_0x22b7ec(0xfd)](_0x31a29a);}),_0x29526d;}['saveCommentToSnapshot'](_0x5c491f){const _0x5ab681=_0x304d9e;return{'id':_0x5c491f['id'],'threadId':_0x5c491f[_0x5ab681(0xe2)],'ref':_0x5c491f[_0x5ab681(0xdf)]};}};g=x([_(0x0,c[_0x304d9e(0xd8)](P['HTTPService'])),_(0x1,c['Inject'](c[_0x304d9e(0xe7)])),_(0x2,c[_0x304d9e(0xd8)](b[_0x304d9e(0x143)])),_(0x3,c[_0x304d9e(0xd8)](c[_0x304d9e(0x12d)]))],g);var H=Object[_0x304d9e(0xea)],J=(_0x5491cb,_0x27c241,_0x1dc706,_0x5eda00)=>{const _0xa38af=_0x304d9e;for(var _0x1ecfae=_0x5eda00>0x1?void 0x0:_0x5eda00?H(_0x27c241,_0x1dc706):_0x27c241,_0x2c2ca9=_0x5491cb[_0xa38af(0x151)]-0x1,_0x55c82f;_0x2c2ca9>=0x0;_0x2c2ca9--)(_0x55c82f=_0x5491cb[_0x2c2ca9])&&(_0x1ecfae=_0x55c82f(_0x1ecfae)||_0x1ecfae);return _0x1ecfae;},y=(_0x1ef2a8,_0x2f9703)=>(_0x1ba01b,_0x51d30a)=>_0x2f9703(_0x1ba01b,_0x51d30a,_0x1ef2a8);function _0x3547(_0x40469b,_0x163c54){const _0x53e76f=_0x53e7();return _0x3547=function(_0x354700,_0x56198b){_0x354700=_0x354700-0xd1;let _0x57b9ee=_0x53e76f[_0x354700];return _0x57b9ee;},_0x3547(_0x40469b,_0x163c54);}function _0x53e7(){const _0x2d56b3=['commentUpdate$','onStarting','CustomRangeType','IThreadCommentDataSourceService','/universer-api/comment/unit/','dayjs','Reply','@univerjs/thread-comment','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','CollaborationSessionService','_threadCommentDataSource','Edit','Module','835EOQADp','UniverThreadCommentUIPlugin','onReady','deleteComment','content','528787AGaiBP','slice','/add','stringify','3946992DxadkW','length','rangeId','/edit','/list','delete','@univerjs/thread-comment-ui','root','Disposable','toStringTag','user','filter','getComment','Inject','41301VTtBky','CommentService','Unknown','code','personId','Plugin','ref','2996LvRPlC','@univerjs-pro/license','threadId','symbol','_threadCommentModel','4117986sxKCiI','map','UserManagerService','HTTPService','Delete','getOwnPropertyDescriptor','solved','_commentService','UniverThreadCommentDataSourcePlugin','_httpService','26ZVsyRa','@univerjs-pro/collaboration-client','values','body','Add','createTimestamp','subscribe','replyId','_sessionService','resolveComment','_init','Solve','forEach','replies','addUser','48576XgNzGF','DependentOn','thread-comment-data-source.config','_threadCommentDataSourceService','COMMENT','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','Solved','size','parentId','getMemberID','dataSource','2630DshkGw','_injector','UniverInstanceType','_initUserSync','/universer-api/user/list','parse','ThreadCommentModel','_initDataSource','unitId','post','_config','format','add','rxjs','users','UniverCollaborationClientPlugin','reply','rangeType','type','find','_configService','disposeWithMe','userId','get','error','bufferTime','pluginName','168TyremL','getUser','4664XtGfvM','112732KbAzey','addComment','updateComment','pipe','Injector','UniverLicensePlugin','defineProperty','setConfig','getUnit','_userService','IConfigService','listComments','@univerjs/network','syncUpdateMutationToColla','UNIVER_UNKNOWN','userID'];_0x53e7=function(){return _0x2d56b3;};return _0x53e7();}let C=class extends c[_0x304d9e(0xd3)]{constructor(_0x401304,_0x50f048){const _0x353907=_0x304d9e;super(),this[_0x353907(0x101)]=_0x401304,this[_0x353907(0x144)]=_0x50f048,this[_0x353907(0x112)]();}[_0x304d9e(0x112)](){const _0x48e7cc=_0x304d9e;this[_0x48e7cc(0x101)][_0x48e7cc(0x10a)]=this[_0x48e7cc(0x144)],this[_0x48e7cc(0x101)][_0x48e7cc(0x136)]=!0x1;}};C=J([y(0x0,M[_0x304d9e(0x13c)]),y(0x1,c[_0x304d9e(0xd8)](g))],C);var F=Object[_0x304d9e(0x12f)],L=Object[_0x304d9e(0xea)],Z=(_0x319649,_0x483ee0,_0xa1a1bb)=>_0x483ee0 in _0x319649?F(_0x319649,_0x483ee0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa1a1bb}):_0x319649[_0x483ee0]=_0xa1a1bb,W=(_0x14fa5a,_0x25a611,_0x5cf3e1,_0xb1ad69)=>{const _0x38ea65=_0x304d9e;for(var _0x1cb146=_0xb1ad69>0x1?void 0x0:_0xb1ad69?L(_0x25a611,_0x5cf3e1):_0x25a611,_0x56a853=_0x14fa5a[_0x38ea65(0x151)]-0x1,_0x385e1b;_0x56a853>=0x0;_0x56a853--)(_0x385e1b=_0x14fa5a[_0x56a853])&&(_0x1cb146=_0x385e1b(_0x1cb146)||_0x1cb146);return _0x1cb146;},O=(_0x3d089c,_0x1c11a3)=>(_0x12fe09,_0x397cf9)=>_0x1c11a3(_0x12fe09,_0x397cf9,_0x3d089c),N=(_0x57f61b,_0x3a9160,_0x46676e)=>Z(_0x57f61b,typeof _0x3a9160!=_0x304d9e(0xe3)?_0x3a9160+'':_0x3a9160,_0x46676e);exports[_0x304d9e(0xed)]=class extends c[_0x304d9e(0xde)]{constructor(_0x52bdcc=D,_0x147462,_0x1196f3){const _0x21c89f=_0x304d9e;super(),this[_0x21c89f(0x115)]=_0x52bdcc,this[_0x21c89f(0x10c)]=_0x147462,this[_0x21c89f(0x11f)]=_0x1196f3;const {..._0x32b2d6}=c['merge']({},D,this[_0x21c89f(0x115)]);this['_configService'][_0x21c89f(0x130)](q,_0x32b2d6);}[_0x304d9e(0x13a)](){const _0x5829df=_0x304d9e;[[g],[C],[p]][_0x5829df(0xfb)](_0x72d9c=>{const _0x334a31=_0x5829df;this[_0x334a31(0x10c)][_0x334a31(0x117)](_0x72d9c);});}[_0x304d9e(0x149)](){const _0x5c2a32=_0x304d9e;this[_0x5c2a32(0x10c)]['get'](C),this[_0x5c2a32(0x10c)][_0x5c2a32(0x122)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x304d9e(0x125),U),N(exports[_0x304d9e(0xed)],'type',c[_0x304d9e(0x10d)][_0x304d9e(0x137)]),exports[_0x304d9e(0xed)]=W([c[_0x304d9e(0xff)](j[_0x304d9e(0x148)],b[_0x304d9e(0x11a)],T[_0x304d9e(0x12e)]),O(0x1,c[_0x304d9e(0xd8)](c[_0x304d9e(0x12d)])),O(0x2,c[_0x304d9e(0x133)])],exports[_0x304d9e(0xed)]);
1
+ 'use strict';const _0x1d7798=_0x3869;(function(_0x177410,_0x5e7d6b){const _0x24a8dc=_0x3869,_0x470920=_0x177410();while(!![]){try{const _0x15e108=-parseInt(_0x24a8dc(0x21a))/0x1*(-parseInt(_0x24a8dc(0x1e4))/0x2)+-parseInt(_0x24a8dc(0x208))/0x3*(-parseInt(_0x24a8dc(0x1ef))/0x4)+-parseInt(_0x24a8dc(0x1db))/0x5+-parseInt(_0x24a8dc(0x244))/0x6*(-parseInt(_0x24a8dc(0x1e9))/0x7)+parseInt(_0x24a8dc(0x23c))/0x8+parseInt(_0x24a8dc(0x1f9))/0x9*(parseInt(_0x24a8dc(0x20c))/0xa)+-parseInt(_0x24a8dc(0x236))/0xb;if(_0x15e108===_0x5e7d6b)break;else _0x470920['push'](_0x470920['shift']());}catch(_0x490fba){_0x470920['push'](_0x470920['shift']());}}}(_0x36c7,0xd175f));Object[_0x1d7798(0x1fd)](exports,Symbol[_0x1d7798(0x225)],{'value':_0x1d7798(0x209)});const b=require(_0x1d7798(0x246)),T=require(_0x1d7798(0x23b)),c=require('@univerjs/core'),j=require(_0x1d7798(0x23f)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x1d7798(0x239)),U=_0x1d7798(0x217);var I=(_0x2c36a6=>(_0x2c36a6[_0x2c36a6['OpenOrReOpen']=0x0]=_0x1d7798(0x22e),_0x2c36a6[_0x2c36a6[_0x1d7798(0x1e5)]=0x1]=_0x1d7798(0x1e5),_0x2c36a6[_0x2c36a6['UNRECOGNIZED']=-0x1]=_0x1d7798(0x1f5),_0x2c36a6))(I||{}),v=(_0x3aadaf=>(_0x3aadaf[_0x3aadaf[_0x1d7798(0x201)]=0x0]=_0x1d7798(0x201),_0x3aadaf[_0x3aadaf[_0x1d7798(0x1e6)]=0x1]=_0x1d7798(0x1e6),_0x3aadaf[_0x3aadaf[_0x1d7798(0x221)]=0x2]=_0x1d7798(0x221),_0x3aadaf[_0x3aadaf[_0x1d7798(0x20f)]=0x3]=_0x1d7798(0x20f),_0x3aadaf[_0x3aadaf[_0x1d7798(0x1eb)]=0x4]='Delete',_0x3aadaf[_0x3aadaf[_0x1d7798(0x232)]=0x5]=_0x1d7798(0x232),_0x3aadaf[_0x3aadaf[_0x1d7798(0x1f5)]=-0x1]='UNRECOGNIZED',_0x3aadaf))(v||{});const f=_0x2d48fa=>c[_0x1d7798(0x204)](new Date(+_0x2d48fa))[_0x1d7798(0x226)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x5efb1d,_0x44c0b)=>{const _0x5f4044=_0x1d7798,_0x4a739d=_0x5efb1d[_0x5f4044(0x20a)](c['UserManagerService']),_0x18465b=_0x5efb1d[_0x5f4044(0x20a)](P[_0x5f4044(0x1d6)]);_0x44c0b[_0x5f4044(0x1d1)](_0x1d03b1=>{const _0x67974b=_0x5f4044;_0x4a739d[_0x67974b(0x1ec)](_0x1d03b1)&&_0x44c0b[_0x67974b(0x215)](_0x1d03b1);}),_0x44c0b[_0x5f4044(0x1fc)]&&(await _0x18465b[_0x5f4044(0x20a)](_0x5f4044(0x1cb),{'params':{'userIDs':[..._0x44c0b]}}))[_0x5f4044(0x1fa)]['users'][_0x5f4044(0x1d1)](_0xf2eacd=>{const _0x5ce26a=_0x5f4044;_0xf2eacd&&_0x4a739d[_0x5ce26a(0x1ee)](_0xf2eacd);});};var $=Object[_0x1d7798(0x1e2)],E=(_0x1c5e1e,_0x386156,_0x9aa504,_0x5833f2)=>{const _0x5bb9be=_0x1d7798;for(var _0x35fae8=_0x5833f2>0x1?void 0x0:_0x5833f2?$(_0x386156,_0x9aa504):_0x386156,_0x13c441=_0x1c5e1e[_0x5bb9be(0x1d4)]-0x1,_0x382859;_0x13c441>=0x0;_0x13c441--)(_0x382859=_0x1c5e1e[_0x13c441])&&(_0x35fae8=_0x382859(_0x35fae8)||_0x35fae8);return _0x35fae8;},S=(_0x13859a,_0x2bd1a1)=>(_0x1be4e2,_0x3977e2)=>_0x2bd1a1(_0x1be4e2,_0x3977e2,_0x13859a);let p=class extends c[_0x1d7798(0x1f6)]{constructor(_0x2b4ec6,_0x2b2674,_0x253ffe,_0x5a9967){const _0x45225f=_0x1d7798;super(),this[_0x45225f(0x203)]=_0x2b4ec6,this['_threadCommentModel']=_0x2b2674,this[_0x45225f(0x240)]=_0x253ffe,this[_0x45225f(0x202)]=_0x5a9967,this[_0x45225f(0x1f8)](),this[_0x45225f(0x212)]();}[_0x1d7798(0x212)](){const _0x2684cb=_0x1d7798;this['disposeWithMe'](this['_threadCommentModel'][_0x2684cb(0x22f)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x41d66c=>{const _0x3e73b1=_0x2684cb,_0x426860=new Set();_0x41d66c[_0x3e73b1(0x1d1)](_0x1b3244=>{const _0x105363=_0x3e73b1;switch(_0x1b3244[_0x105363(0x21d)]){case _0x105363(0x228):{const _0x536d46=_0x1b3244[_0x105363(0x231)]['personId'];_0x426860['add'](_0x536d46);break;}}}),R(this[_0x3e73b1(0x202)],_0x426860);}));}['_init'](){const _0x15ea75=_0x1d7798;this[_0x15ea75(0x1d9)](this[_0x15ea75(0x203)]['commentUpdate$'][_0x15ea75(0x23d)](async _0x4ba01c=>{const _0x5367f9=_0x15ea75;var _0x28c56e,_0x465841,_0x10bba1,_0xd90d2d;const _0x2a6986=(_0x28c56e=this[_0x5367f9(0x1f1)]['getUnit'](_0x4ba01c[_0x5367f9(0x1d8)])[_0x5367f9(0x214)](_0x4dbcb5=>_0x4dbcb5[_0x5367f9(0x245)]===_0x4ba01c[_0x5367f9(0x245)]))==null?void 0x0:_0x28c56e[_0x5367f9(0x22d)];if(!_0x2a6986)return;const {unitId:_0x226590,subUnitId:_0xfd97ba}=_0x2a6986;switch(_0x4ba01c['user']&&this['_userService'][_0x5367f9(0x1ee)](_0x4ba01c['user']),_0x4ba01c[_0x5367f9(0x21d)]){case v[_0x5367f9(0x1e6)]:break;case v[_0x5367f9(0x221)]:{this[_0x5367f9(0x1f1)][_0x5367f9(0x213)](_0x226590,_0xfd97ba,{'unitId':_0x226590,'subUnitId':_0xfd97ba,'ref':'','id':_0x4ba01c[_0x5367f9(0x21b)],'dT':f(+_0x4ba01c[_0x5367f9(0x1f3)]),'threadId':_0x4ba01c[_0x5367f9(0x245)],'personId':(_0x10bba1=(_0x465841=_0x4ba01c[_0x5367f9(0x1d3)])==null?void 0x0:_0x465841[_0x5367f9(0x237)])!=null?_0x10bba1:_0x4ba01c[_0x5367f9(0x1f4)],'text':JSON[_0x5367f9(0x210)](_0x4ba01c[_0x5367f9(0x1fe)]),'parentId':_0x2a6986['id']});break;}case v[_0x5367f9(0x1eb)]:{const _0x2b9f21=this[_0x5367f9(0x1f1)][_0x5367f9(0x1cd)](_0x226590,_0xfd97ba,_0x4ba01c['replyId']);_0x2b9f21&&_0x2b9f21[_0x5367f9(0x230)]&&this[_0x5367f9(0x1f1)][_0x5367f9(0x22b)](_0x226590,_0xfd97ba,_0x4ba01c[_0x5367f9(0x21b)]);break;}case v[_0x5367f9(0x20f)]:{this[_0x5367f9(0x1f1)][_0x5367f9(0x242)](_0x226590,_0xfd97ba,{'commentId':_0x4ba01c[_0x5367f9(0x21b)],'text':JSON[_0x5367f9(0x210)](_0x4ba01c[_0x5367f9(0x1fe)])});break;}case v[_0x5367f9(0x232)]:{const _0x4d225f=(_0xd90d2d=this['_threadCommentModel'][_0x5367f9(0x21e)](_0x4ba01c[_0x5367f9(0x1d8)])[_0x5367f9(0x214)](_0x20ebb5=>_0x20ebb5['threadId']===_0x4ba01c[_0x5367f9(0x245)]))==null?void 0x0:_0xd90d2d['root'];_0x4d225f&&this['_threadCommentModel'][_0x5367f9(0x1fb)](_0x226590,_0xfd97ba,_0x4d225f['id'],_0x4ba01c[_0x5367f9(0x1dc)]===I[_0x5367f9(0x1e5)]);break;}}}));}};p=E([S(0x0,c[_0x1d7798(0x1da)](b[_0x1d7798(0x21f)])),S(0x1,c[_0x1d7798(0x1da)](M[_0x1d7798(0x218)])),S(0x2,c['Inject'](c[_0x1d7798(0x22a)])),S(0x3,c[_0x1d7798(0x1da)](c[_0x1d7798(0x1ed)]))],p);const q=_0x1d7798(0x1cc),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x19dae1,_0x465edc,_0x21955,_0x67b5e8)=>{const _0x462886=_0x1d7798;for(var _0x4a8572=_0x67b5e8>0x1?void 0x0:_0x67b5e8?A(_0x465edc,_0x21955):_0x465edc,_0x5e8654=_0x19dae1[_0x462886(0x1d4)]-0x1,_0x2ef215;_0x5e8654>=0x0;_0x5e8654--)(_0x2ef215=_0x19dae1[_0x5e8654])&&(_0x4a8572=_0x2ef215(_0x4a8572)||_0x4a8572);return _0x4a8572;},_=(_0x113eb9,_0x17a1e5)=>(_0xe82460,_0x2ae5a5)=>_0x17a1e5(_0xe82460,_0x2ae5a5,_0x113eb9);function Y(_0x3958bd,_0x3dc23f){const _0x4748eb=_0x1d7798,_0x86d3e3=_0x3958bd[_0x4748eb(0x219)][0x0];return{..._0x3dc23f,'id':_0x86d3e3[_0x4748eb(0x21b)],'resolved':_0x3958bd[_0x4748eb(0x1dc)]===0x1,'dT':f(_0x86d3e3['createTimestamp']),'personId':_0x86d3e3['userId'],'threadId':_0x86d3e3[_0x4748eb(0x245)]};}function _0x36c7(){const _0x125066=['replyId','dataSource','type','getUnit','CommentService','/universer-api/comment/unit/','Reply','/edit','map','UNIVER_UNKNOWN','toStringTag','format','Plugin','add','UniverLicensePlugin','UserManagerService','deleteComment','DependentOn','root','OpenOrReOpen','commentUpdate$','parentId','payload','Solve','getCurrentUser','listComments','resolved','31775843PeIvIU','userID','requireSession','@univerjs/network','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','4645840sLxlJC','subscribe','_config','@univerjs/thread-comment-ui','_userService','_initDataSource','updateComment','filter','8429838NihfCL','threadId','@univerjs-pro/collaboration-client','rangeType','/universer-api/user/list','thread-comment-data-source.config','getComment','pluginName','customRanges','_sessionService','forEach','UniverInstanceType','user','length','reply','HTTPService','IConfigService','unitId','disposeWithMe','Inject','8152825UqeLBG','solved','values','UniverThreadCommentDataSourcePlugin','setConfig','post','_configService','getOwnPropertyDescriptor','onReady','1258jjMVUF','Solved','Add','users','/delete','7kyljSi','getMemberID','Delete','getUser','Injector','addUser','88jaWDQM','ref','_threadCommentModel','/reply','createTimestamp','userId','UNRECOGNIZED','Disposable','/solved','_init','198MivWYe','body','resolveComment','size','defineProperty','content','saveCommentToSnapshot','CustomRangeType','Unknown','_injector','_commentService','dayjs','COMMENT','_threadCommentDataSourceService','_threadCommentDataSource','192039VGulDp','Module','get','UniverCollaborationClientPlugin','696190kqbWBC','stringify','_httpService','Edit','parse','code','_initUserSync','addComment','find','delete','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','replies','718XpsqxC'];_0x36c7=function(){return _0x125066;};return _0x36c7();}function G(_0x38a823,_0x2f9ee9,_0x25e3cf){const _0x3cd7ee=_0x1d7798;var _0x5c6d11,_0xb98527;if(((_0xb98527=(_0x5c6d11=_0x38a823==null?void 0x0:_0x38a823[_0x3cd7ee(0x219)])==null?void 0x0:_0x5c6d11['length'])!=null?_0xb98527:0x0)>0x0){const _0x1e515c=(_0x8f14c3,_0x395360)=>({'id':_0x8f14c3[_0x3cd7ee(0x21b)],'threadId':_0x8f14c3[_0x3cd7ee(0x245)],'dT':f(_0x8f14c3[_0x3cd7ee(0x1f3)]),'personId':_0x8f14c3[_0x3cd7ee(0x1f4)],'resolved':_0x38a823[_0x3cd7ee(0x1dc)]===I['Solved'],'unitId':_0x2f9ee9,'subUnitId':_0x25e3cf,'text':JSON[_0x3cd7ee(0x210)](_0x8f14c3[_0x3cd7ee(0x1fe)]),'parentId':_0x395360}),_0x4db97a=_0x1e515c(_0x38a823['replies'][0x0]);return{..._0x4db97a,'children':_0x38a823[_0x3cd7ee(0x219)]['slice'](0x1)[_0x3cd7ee(0x223)](_0x211807=>_0x1e515c(_0x211807,_0x4db97a['id']))};}return null;}function _0x3869(_0x1a0ff3,_0x34160b){const _0x36c742=_0x36c7();return _0x3869=function(_0x3869fe,_0x3746f3){_0x3869fe=_0x3869fe-0x1cb;let _0x1caeda=_0x36c742[_0x3869fe];return _0x1caeda;},_0x3869(_0x1a0ff3,_0x34160b);}let g=class{constructor(_0x1df9f8,_0xccd4a1,_0x574912,_0x12003f){const _0x4c3663=_0x1d7798;this[_0x4c3663(0x20e)]=_0x1df9f8,this['_userService']=_0xccd4a1,this[_0x4c3663(0x1d0)]=_0x574912,this[_0x4c3663(0x202)]=_0x12003f;}async[_0x1d7798(0x213)](_0x18e979){const _0x321b35=_0x1d7798;var _0x4c39d6,_0x326874;const {parentId:_0x1a0867,unitId:_0x2424ac,text:_0xafedba,threadId:_0x46a027}=_0x18e979,_0x182b1a=(_0x326874=(_0x4c39d6=_0xafedba[_0x321b35(0x1cf)])==null?void 0x0:_0x4c39d6['filter'](_0x9f7d00=>_0x9f7d00[_0x321b35(0x247)]===c['CustomRangeType'][_0x321b35(0x205)])[_0x321b35(0x223)](_0x1a41ae=>_0x1a41ae['rangeId']))!=null?_0x326874:[],_0x420b87=JSON['stringify'](_0xafedba),_0x2f796d=(await this[_0x321b35(0x1d0)][_0x321b35(0x238)](_0x2424ac))[_0x321b35(0x1ea)]();if(_0x1a0867){const _0x1e1c3a={'memberId':_0x2f796d,'unitId':_0x2424ac,'content':_0x420b87,'mention':_0x182b1a,'threadId':_0x46a027},_0x5dde0b=(await this['_httpService'][_0x321b35(0x1e0)](_0x321b35(0x220)+_0x2424ac+_0x321b35(0x1f2),{'body':_0x1e1c3a}))[_0x321b35(0x1fa)][_0x321b35(0x1d5)];return{..._0x18e979,'id':_0x5dde0b['replyId'],'dT':c['dayjs'](+_0x5dde0b[_0x321b35(0x1f3)])[_0x321b35(0x226)](_0x321b35(0x23a)),'personId':_0x5dde0b['userId']};}else{const _0x4db070={'memberId':_0x2f796d,'unitId':_0x2424ac,'content':_0x420b87,'mention':_0x182b1a},_0x230dca=await this[_0x321b35(0x20e)][_0x321b35(0x1e0)]('/universer-api/comment/unit/'+_0x2424ac+'/add',{'body':_0x4db070});return Y(_0x230dca['body']['comment'],_0x18e979);}}async[_0x1d7798(0x242)](_0x40e904){const _0x16e57b=_0x1d7798;var _0x59fd00,_0x4ca93b;const {text:_0x4a615b,unitId:_0x329d36}=_0x40e904,_0x8d3adc=(_0x4ca93b=(_0x59fd00=_0x4a615b[_0x16e57b(0x1cf)])==null?void 0x0:_0x59fd00[_0x16e57b(0x243)](_0x1bd5e3=>_0x1bd5e3[_0x16e57b(0x247)]===c[_0x16e57b(0x200)][_0x16e57b(0x205)])[_0x16e57b(0x223)](_0x14ab6b=>_0x14ab6b['rangeId']))!=null?_0x4ca93b:[],_0x583526=JSON[_0x16e57b(0x20d)](_0x4a615b),_0x2bcfd3=_0x40e904[_0x16e57b(0x245)],_0x2214c4=_0x40e904['id'],_0x4f34d5={'memberId':(await this[_0x16e57b(0x1d0)][_0x16e57b(0x238)](_0x329d36))[_0x16e57b(0x1ea)](),'unitId':_0x329d36,'threadId':_0x2bcfd3,'mention':_0x8d3adc,'content':_0x583526,'replyId':_0x2214c4},_0x1512b7=await this[_0x16e57b(0x20e)][_0x16e57b(0x1e0)](_0x16e57b(0x220)+_0x329d36+_0x16e57b(0x222),{'body':_0x4f34d5});return!_0x1512b7['body'][_0x16e57b(0x216)]||_0x1512b7[_0x16e57b(0x1fa)]['error'][_0x16e57b(0x211)]===0x1;}async[_0x1d7798(0x1fb)](_0x2faf0e){const _0x4a24ee=_0x1d7798,{unitId:_0x787e5c}=_0x2faf0e,_0x552626=_0x2faf0e[_0x4a24ee(0x245)],_0x1ea417={'memberId':this[_0x4a24ee(0x240)][_0x4a24ee(0x233)]()[_0x4a24ee(0x237)],'unitId':_0x787e5c,'threadId':_0x552626,'solved':_0x2faf0e[_0x4a24ee(0x235)]?I[_0x4a24ee(0x1e5)]:I[_0x4a24ee(0x22e)]},_0x304c64=await this[_0x4a24ee(0x20e)][_0x4a24ee(0x1e0)](_0x4a24ee(0x220)+_0x787e5c+_0x4a24ee(0x1f7),{'body':_0x1ea417});return!_0x304c64['body'][_0x4a24ee(0x216)]||_0x304c64[_0x4a24ee(0x1fa)]['error'][_0x4a24ee(0x211)]===0x1;}async[_0x1d7798(0x22b)](_0x30fe19,_0x541999,_0x3081ff,_0x1e1496){const _0x3e3d3e=_0x1d7798,_0x42d1b6={'memberId':(await this[_0x3e3d3e(0x1d0)][_0x3e3d3e(0x238)](_0x30fe19))[_0x3e3d3e(0x1ea)](),'threadId':_0x3081ff,'replyId':_0x1e1496,'unitId':_0x30fe19},_0x60f175=await this[_0x3e3d3e(0x20e)]['post'](_0x3e3d3e(0x220)+_0x30fe19+_0x3e3d3e(0x1e8),{'body':_0x42d1b6});return!_0x60f175[_0x3e3d3e(0x1fa)][_0x3e3d3e(0x216)]||_0x60f175[_0x3e3d3e(0x1fa)][_0x3e3d3e(0x216)]['code']===0x1;}async[_0x1d7798(0x234)](_0x1f0d32,_0x20a2cb,_0x2847f2){const _0x483069=_0x1d7798,_0xad3a8f={'unitId':_0x1f0d32,'threadId':_0x2847f2},_0x52da4e=await this[_0x483069(0x20e)][_0x483069(0x1e0)](_0x483069(0x220)+_0x1f0d32+'/list',{'body':_0xad3a8f}),_0x36e866=_0x2847f2[_0x483069(0x223)](_0x4efee2=>G(_0x52da4e[_0x483069(0x1fa)]['comments'][_0x4efee2],_0x1f0d32,_0x20a2cb))[_0x483069(0x243)](Boolean);return Object[_0x483069(0x1dd)](_0x52da4e[_0x483069(0x1fa)][_0x483069(0x1e7)])['forEach'](_0x25467a=>{const _0x1ccc5d=_0x483069;this['_userService'][_0x1ccc5d(0x1ee)](_0x25467a);}),_0x36e866;}[_0x1d7798(0x1ff)](_0x12d2d0){const _0x2b7847=_0x1d7798;return{'id':_0x12d2d0['id'],'threadId':_0x12d2d0[_0x2b7847(0x245)],'ref':_0x12d2d0[_0x2b7847(0x1f0)]};}};g=x([_(0x0,c[_0x1d7798(0x1da)](P[_0x1d7798(0x1d6)])),_(0x1,c[_0x1d7798(0x1da)](c['UserManagerService'])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c[_0x1d7798(0x1da)](c['Injector']))],g);var H=Object[_0x1d7798(0x1e2)],J=(_0x1ebd56,_0x5ec5b1,_0x2542d3,_0x5a905f)=>{const _0x1699ce=_0x1d7798;for(var _0x5a61b0=_0x5a905f>0x1?void 0x0:_0x5a905f?H(_0x5ec5b1,_0x2542d3):_0x5ec5b1,_0x4e869e=_0x1ebd56[_0x1699ce(0x1d4)]-0x1,_0x4bf1d8;_0x4e869e>=0x0;_0x4e869e--)(_0x4bf1d8=_0x1ebd56[_0x4e869e])&&(_0x5a61b0=_0x4bf1d8(_0x5a61b0)||_0x5a61b0);return _0x5a61b0;},y=(_0x3c8be7,_0x5c218c)=>(_0x32a090,_0x495329)=>_0x5c218c(_0x32a090,_0x495329,_0x3c8be7);let C=class extends c[_0x1d7798(0x1f6)]{constructor(_0x4e8038,_0x21b911){const _0x3eb792=_0x1d7798;super(),this[_0x3eb792(0x206)]=_0x4e8038,this[_0x3eb792(0x207)]=_0x21b911,this['_initDataSource']();}[_0x1d7798(0x241)](){const _0x49ba38=_0x1d7798;this[_0x49ba38(0x206)][_0x49ba38(0x21c)]=this['_threadCommentDataSource'],this[_0x49ba38(0x206)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x1d7798(0x1fd)],L=Object[_0x1d7798(0x1e2)],Z=(_0x443e21,_0x1b356e,_0x74c0fb)=>_0x1b356e in _0x443e21?F(_0x443e21,_0x1b356e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x74c0fb}):_0x443e21[_0x1b356e]=_0x74c0fb,W=(_0xcab3a5,_0xb13cb4,_0x367361,_0x206c69)=>{for(var _0x3c2880=_0x206c69>0x1?void 0x0:_0x206c69?L(_0xb13cb4,_0x367361):_0xb13cb4,_0xa25326=_0xcab3a5['length']-0x1,_0x5c4391;_0xa25326>=0x0;_0xa25326--)(_0x5c4391=_0xcab3a5[_0xa25326])&&(_0x3c2880=_0x5c4391(_0x3c2880)||_0x3c2880);return _0x3c2880;},O=(_0x5dad2b,_0xf7bf78)=>(_0x5bb27d,_0xf894c8)=>_0xf7bf78(_0x5bb27d,_0xf894c8,_0x5dad2b),N=(_0x25d534,_0x4ef787,_0x5da181)=>Z(_0x25d534,typeof _0x4ef787!='symbol'?_0x4ef787+'':_0x4ef787,_0x5da181);exports[_0x1d7798(0x1de)]=class extends c[_0x1d7798(0x227)]{constructor(_0x31b56c=D,_0x503565,_0x50e5c5){const _0x360a15=_0x1d7798;super(),this[_0x360a15(0x23e)]=_0x31b56c,this['_injector']=_0x503565,this[_0x360a15(0x1e1)]=_0x50e5c5;const {..._0x266c6e}=c['merge']({},D,this[_0x360a15(0x23e)]);this[_0x360a15(0x1e1)][_0x360a15(0x1df)](q,_0x266c6e);}['onStarting'](){const _0x4ea53f=_0x1d7798;[[g],[C],[p]][_0x4ea53f(0x1d1)](_0x21939f=>{const _0x8dd500=_0x4ea53f;this[_0x8dd500(0x202)][_0x8dd500(0x228)](_0x21939f);});}[_0x1d7798(0x1e3)](){const _0x1af042=_0x1d7798;this[_0x1af042(0x202)][_0x1af042(0x20a)](C),this[_0x1af042(0x202)][_0x1af042(0x20a)](p);}},N(exports[_0x1d7798(0x1de)],_0x1d7798(0x1ce),U),N(exports[_0x1d7798(0x1de)],'type',c[_0x1d7798(0x1d2)][_0x1d7798(0x224)]),exports[_0x1d7798(0x1de)]=W([c[_0x1d7798(0x22c)](j['UniverThreadCommentUIPlugin'],b[_0x1d7798(0x20b)],T[_0x1d7798(0x229)]),O(0x1,c[_0x1d7798(0x1da)](c[_0x1d7798(0x1ed)])),O(0x2,c[_0x1d7798(0x1d7)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3a55ee=_0x498a;(function(_0x28b60f,_0x1e2be7){const _0x2366d7=_0x498a,_0x1e197d=_0x28b60f();while(!![]){try{const _0x396ebb=-parseInt(_0x2366d7(0xd7))/0x1*(parseInt(_0x2366d7(0xad))/0x2)+-parseInt(_0x2366d7(0xe1))/0x3*(parseInt(_0x2366d7(0xdc))/0x4)+parseInt(_0x2366d7(0xfc))/0x5*(parseInt(_0x2366d7(0x103))/0x6)+-parseInt(_0x2366d7(0xcf))/0x7+-parseInt(_0x2366d7(0xe9))/0x8*(-parseInt(_0x2366d7(0xfd))/0x9)+-parseInt(_0x2366d7(0xb2))/0xa*(-parseInt(_0x2366d7(0xf7))/0xb)+parseInt(_0x2366d7(0xe0))/0xc;if(_0x396ebb===_0x1e2be7)break;else _0x1e197d['push'](_0x1e197d['shift']());}catch(_0x25b5dc){_0x1e197d['push'](_0x1e197d['shift']());}}}(_0x499e,0x8141b));import{CommentService as _0x2821d4,CollaborationSessionService as _0x494660,UniverCollaborationClientPlugin as _0xec1e5b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38dfbc}from'@univerjs-pro/license';import{dayjs as _0x13ae37,UserManagerService as _0x3b0c80,Inject as _0x4b2b1a,Injector as _0x2ec43c,Disposable as _0x49ba1d,CustomRangeType as _0x2f0881,UniverInstanceType as _0x13d7fd,DependentOn as _0xc2b821,IConfigService as _0x30a2d6,Plugin as _0x1948c2,merge as _0x5e1ed8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4d6c0a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x231289,IThreadCommentDataSourceService as _0x160153}from'@univerjs/thread-comment';import{bufferTime as _0x4b3cb8}from'rxjs';function _0x498a(_0x3c2a3c,_0x1a6d6){const _0x499ef6=_0x499e();return _0x498a=function(_0x498a75,_0x19c8d9){_0x498a75=_0x498a75-0xa5;let _0x2c6ddb=_0x499ef6[_0x498a75];return _0x2c6ddb;},_0x498a(_0x3c2a3c,_0x1a6d6);}import{HTTPService as _0x4597fd}from'@univerjs/network';const W=_0x3a55ee(0xb6);var I=(_0x674145=>(_0x674145[_0x674145[_0x3a55ee(0xda)]=0x0]='OpenOrReOpen',_0x674145[_0x674145['Solved']=0x1]=_0x3a55ee(0xdf),_0x674145[_0x674145[_0x3a55ee(0x105)]=-0x1]=_0x3a55ee(0x105),_0x674145))(I||{}),v=(_0x3b4d8c=>(_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xb7)]=0x0]=_0x3a55ee(0xb7),_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xcb)]=0x1]='Add',_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xa8)]=0x2]='Reply',_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xd1)]=0x3]=_0x3a55ee(0xd1),_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xe3)]=0x4]='Delete',_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xaf)]=0x5]=_0x3a55ee(0xaf),_0x3b4d8c[_0x3b4d8c['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3b4d8c))(v||{});const D=_0x3306a9=>_0x13ae37(new Date(+_0x3306a9))['format'](_0x3a55ee(0xba)),B=async(_0x14bd97,_0x49b781)=>{const _0x2f2f0d=_0x3a55ee,_0x1c0e20=_0x14bd97[_0x2f2f0d(0xfe)](_0x3b0c80),_0x592f2d=_0x14bd97[_0x2f2f0d(0xfe)](_0x4597fd);_0x49b781[_0x2f2f0d(0xff)](_0x297741=>{const _0x5f5591=_0x2f2f0d;_0x1c0e20[_0x5f5591(0xd2)](_0x297741)&&_0x49b781['delete'](_0x297741);}),_0x49b781[_0x2f2f0d(0xfb)]&&(await _0x592f2d['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x49b781]}}))['body'][_0x2f2f0d(0xb4)][_0x2f2f0d(0xff)](_0x280e45=>{_0x280e45&&_0x1c0e20['addUser'](_0x280e45);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4b0bc3,_0x2466b1,_0x4e5315,_0x368e05)=>{for(var _0xa96da8=_0x368e05>0x1?void 0x0:_0x368e05?K(_0x2466b1,_0x4e5315):_0x2466b1,_0x34934f=_0x4b0bc3['length']-0x1,_0x57f160;_0x34934f>=0x0;_0x34934f--)(_0x57f160=_0x4b0bc3[_0x34934f])&&(_0xa96da8=_0x57f160(_0xa96da8)||_0xa96da8);return _0xa96da8;},p=(_0x14613e,_0x529ec9)=>(_0x3c16c0,_0x5c8a81)=>_0x529ec9(_0x3c16c0,_0x5c8a81,_0x14613e);let S=class extends _0x49ba1d{constructor(_0x65e289,_0x401a7f,_0x1d8eac,_0x2e6aed){const _0x138b15=_0x3a55ee;super(),this[_0x138b15(0xc0)]=_0x65e289,this[_0x138b15(0xf5)]=_0x401a7f,this['_userService']=_0x1d8eac,this[_0x138b15(0x109)]=_0x2e6aed,this[_0x138b15(0xaa)](),this[_0x138b15(0xed)]();}['_initUserSync'](){const _0x4c4acc=_0x3a55ee;this[_0x4c4acc(0xc7)](this[_0x4c4acc(0xf5)]['commentUpdate$'][_0x4c4acc(0xd6)](_0x4b3cb8(0x10))[_0x4c4acc(0x101)](_0x3d1751=>{const _0x28e9ea=_0x4c4acc,_0x50c45e=new Set();_0x3d1751[_0x28e9ea(0xff)](_0x79f09f=>{const _0x59f2b5=_0x28e9ea;switch(_0x79f09f['type']){case _0x59f2b5(0xe5):{const _0x69d25b=_0x79f09f[_0x59f2b5(0xe2)]['personId'];_0x50c45e[_0x59f2b5(0xe5)](_0x69d25b);break;}}}),B(this[_0x28e9ea(0x109)],_0x50c45e);}));}[_0x3a55ee(0xaa)](){const _0x375259=_0x3a55ee;this[_0x375259(0xc7)](this['_commentService'][_0x375259(0xbf)][_0x375259(0x101)](async _0x2efea5=>{const _0xd5c458=_0x375259;var _0x499898,_0x39683e,_0x58b055,_0x59b283;const _0x23e3f5=(_0x499898=this[_0xd5c458(0xf5)][_0xd5c458(0xf0)](_0x2efea5[_0xd5c458(0x106)])['find'](_0x34ea13=>_0x34ea13[_0xd5c458(0xe4)]===_0x2efea5[_0xd5c458(0xe4)]))==null?void 0x0:_0x499898[_0xd5c458(0xf4)];if(!_0x23e3f5)return;const {unitId:_0x178a30,subUnitId:_0x4416f3}=_0x23e3f5;switch(_0x2efea5[_0xd5c458(0xa6)]&&this[_0xd5c458(0xa5)][_0xd5c458(0x108)](_0x2efea5['user']),_0x2efea5[_0xd5c458(0xd5)]){case v[_0xd5c458(0xcb)]:break;case v[_0xd5c458(0xa8)]:{this['_threadCommentModel']['addComment'](_0x178a30,_0x4416f3,{'unitId':_0x178a30,'subUnitId':_0x4416f3,'ref':'','id':_0x2efea5['replyId'],'dT':D(+_0x2efea5[_0xd5c458(0xbe)]),'threadId':_0x2efea5[_0xd5c458(0xe4)],'personId':(_0x58b055=(_0x39683e=_0x2efea5[_0xd5c458(0xa6)])==null?void 0x0:_0x39683e[_0xd5c458(0xd0)])!=null?_0x58b055:_0x2efea5['userId'],'text':JSON[_0xd5c458(0x10a)](_0x2efea5[_0xd5c458(0xd3)]),'parentId':_0x23e3f5['id']});break;}case v[_0xd5c458(0xe3)]:{const _0x272914=this[_0xd5c458(0xf5)][_0xd5c458(0x100)](_0x178a30,_0x4416f3,_0x2efea5[_0xd5c458(0xf1)]);_0x272914&&_0x272914[_0xd5c458(0x104)]&&this['_threadCommentModel'][_0xd5c458(0xc5)](_0x178a30,_0x4416f3,_0x2efea5[_0xd5c458(0xf1)]);break;}case v[_0xd5c458(0xd1)]:{this[_0xd5c458(0xf5)]['updateComment'](_0x178a30,_0x4416f3,{'commentId':_0x2efea5[_0xd5c458(0xf1)],'text':JSON[_0xd5c458(0x10a)](_0x2efea5['content'])});break;}case v[_0xd5c458(0xaf)]:{const _0x3775f3=(_0x59b283=this[_0xd5c458(0xf5)]['getUnit'](_0x2efea5[_0xd5c458(0x106)])[_0xd5c458(0xae)](_0x156cd7=>_0x156cd7['threadId']===_0x2efea5[_0xd5c458(0xe4)]))==null?void 0x0:_0x59b283['root'];_0x3775f3&&this[_0xd5c458(0xf5)][_0xd5c458(0xea)](_0x178a30,_0x4416f3,_0x3775f3['id'],_0x2efea5[_0xd5c458(0xb1)]===I[_0xd5c458(0xdf)]);break;}}}));}};S=V([p(0x0,_0x4b2b1a(_0x2821d4)),p(0x1,_0x4b2b1a(_0x231289)),p(0x2,_0x4b2b1a(_0x3b0c80)),p(0x3,_0x4b2b1a(_0x2ec43c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3a55ee(0xb3)],Q=(_0x5ad039,_0x55f436,_0x4ac1ec,_0x5a5012)=>{const _0x36d1e5=_0x3a55ee;for(var _0x206aeb=_0x5a5012>0x1?void 0x0:_0x5a5012?k(_0x55f436,_0x4ac1ec):_0x55f436,_0xf95169=_0x5ad039[_0x36d1e5(0xcc)]-0x1,_0x38401c;_0xf95169>=0x0;_0xf95169--)(_0x38401c=_0x5ad039[_0xf95169])&&(_0x206aeb=_0x38401c(_0x206aeb)||_0x206aeb);return _0x206aeb;},_=(_0x17ffb8,_0x471152)=>(_0x2ae304,_0x5e0cbb)=>_0x471152(_0x2ae304,_0x5e0cbb,_0x17ffb8);function X(_0x33c00c,_0x4e4e3d){const _0x37f32c=_0x3a55ee,_0x26994a=_0x33c00c[_0x37f32c(0xa7)][0x0];return{..._0x4e4e3d,'id':_0x26994a['replyId'],'resolved':_0x33c00c[_0x37f32c(0xb1)]===0x1,'dT':D(_0x26994a[_0x37f32c(0xbe)]),'personId':_0x26994a[_0x37f32c(0xde)],'threadId':_0x26994a[_0x37f32c(0xe4)]};}function ee(_0x5f3952,_0x500c0a,_0x1fabee){const _0x4f42bb=_0x3a55ee;var _0x5b9359,_0x32a6a4;if(((_0x32a6a4=(_0x5b9359=_0x5f3952==null?void 0x0:_0x5f3952[_0x4f42bb(0xa7)])==null?void 0x0:_0x5b9359[_0x4f42bb(0xcc)])!=null?_0x32a6a4:0x0)>0x0){const _0x4b7d14=(_0x4a63d6,_0x4905e3)=>({'id':_0x4a63d6[_0x4f42bb(0xf1)],'threadId':_0x4a63d6[_0x4f42bb(0xe4)],'dT':D(_0x4a63d6[_0x4f42bb(0xbe)]),'personId':_0x4a63d6['userId'],'resolved':_0x5f3952[_0x4f42bb(0xb1)]===I[_0x4f42bb(0xdf)],'unitId':_0x500c0a,'subUnitId':_0x1fabee,'text':JSON['parse'](_0x4a63d6[_0x4f42bb(0xd3)]),'parentId':_0x4905e3}),_0x537631=_0x4b7d14(_0x5f3952[_0x4f42bb(0xa7)][0x0]);return{..._0x537631,'children':_0x5f3952[_0x4f42bb(0xa7)][_0x4f42bb(0xf6)](0x1)['map'](_0x4fca76=>_0x4b7d14(_0x4fca76,_0x537631['id']))};}return null;}let f=class{constructor(_0x222da,_0x2b677b,_0x2a0697,_0x40e0f0){const _0x910381=_0x3a55ee;this['_httpService']=_0x222da,this[_0x910381(0xa5)]=_0x2b677b,this[_0x910381(0xf9)]=_0x2a0697,this[_0x910381(0x109)]=_0x40e0f0;}async['addComment'](_0x4ca27e){const _0x2d4396=_0x3a55ee;var _0x51cd3,_0xe9d37f;const {parentId:_0xe323da,unitId:_0x87e5d4,text:_0x2e0cca,threadId:_0x14f919}=_0x4ca27e,_0x3babd5=(_0xe9d37f=(_0x51cd3=_0x2e0cca['customRanges'])==null?void 0x0:_0x51cd3[_0x2d4396(0x107)](_0x148469=>_0x148469[_0x2d4396(0xd9)]===_0x2f0881[_0x2d4396(0xf8)])[_0x2d4396(0xc9)](_0xa8b30=>_0xa8b30[_0x2d4396(0xd8)]))!=null?_0xe9d37f:[],_0x3ca602=JSON[_0x2d4396(0xb5)](_0x2e0cca),_0xd51a60=(await this['_sessionService'][_0x2d4396(0xee)](_0x87e5d4))[_0x2d4396(0xc8)]();if(_0xe323da){const _0x21d9bc={'memberId':_0xd51a60,'unitId':_0x87e5d4,'content':_0x3ca602,'mention':_0x3babd5,'threadId':_0x14f919},_0x8b407e=(await this[_0x2d4396(0xe7)]['post']('/universer-api/comment/unit/'+_0x87e5d4+_0x2d4396(0x10c),{'body':_0x21d9bc}))[_0x2d4396(0xb9)][_0x2d4396(0xc3)];return{..._0x4ca27e,'id':_0x8b407e[_0x2d4396(0xf1)],'dT':_0x13ae37(+_0x8b407e[_0x2d4396(0xbe)])[_0x2d4396(0xe6)](_0x2d4396(0xba)),'personId':_0x8b407e['userId']};}else{const _0x2491de={'memberId':_0xd51a60,'unitId':_0x87e5d4,'content':_0x3ca602,'mention':_0x3babd5},_0x189165=await this[_0x2d4396(0xe7)][_0x2d4396(0xf3)]('/universer-api/comment/unit/'+_0x87e5d4+_0x2d4396(0xab),{'body':_0x2491de});return X(_0x189165[_0x2d4396(0xb9)][_0x2d4396(0xcd)],_0x4ca27e);}}async[_0x3a55ee(0xbc)](_0x28c347){const _0x1fefcd=_0x3a55ee;var _0x4d8d94,_0x2f9fe9;const {text:_0x3b374c,unitId:_0x5a93dd}=_0x28c347,_0x549774=(_0x2f9fe9=(_0x4d8d94=_0x3b374c[_0x1fefcd(0xbb)])==null?void 0x0:_0x4d8d94[_0x1fefcd(0x107)](_0x3de24f=>_0x3de24f['rangeType']===_0x2f0881['COMMENT'])[_0x1fefcd(0xc9)](_0x43a857=>_0x43a857[_0x1fefcd(0xd8)]))!=null?_0x2f9fe9:[],_0x20591d=JSON['stringify'](_0x3b374c),_0x1ec467=_0x28c347[_0x1fefcd(0xe4)],_0x120b4c=_0x28c347['id'],_0x280da9={'memberId':(await this['_sessionService'][_0x1fefcd(0xee)](_0x5a93dd))[_0x1fefcd(0xc8)](),'unitId':_0x5a93dd,'threadId':_0x1ec467,'mention':_0x549774,'content':_0x20591d,'replyId':_0x120b4c},_0x448f0b=await this[_0x1fefcd(0xe7)]['post']('/universer-api/comment/unit/'+_0x5a93dd+'/edit',{'body':_0x280da9});return!_0x448f0b[_0x1fefcd(0xb9)][_0x1fefcd(0xfa)]||_0x448f0b[_0x1fefcd(0xb9)][_0x1fefcd(0xfa)][_0x1fefcd(0xbd)]===0x1;}async[_0x3a55ee(0xea)](_0x1fcc6f){const _0x74097b=_0x3a55ee,{unitId:_0x162463}=_0x1fcc6f,_0x2a4256=_0x1fcc6f[_0x74097b(0xe4)],_0x3288fb={'memberId':this[_0x74097b(0xa5)][_0x74097b(0xf2)]()[_0x74097b(0xd0)],'unitId':_0x162463,'threadId':_0x2a4256,'solved':_0x1fcc6f[_0x74097b(0xca)]?I['Solved']:I[_0x74097b(0xda)]},_0x4ee561=await this[_0x74097b(0xe7)][_0x74097b(0xf3)]('/universer-api/comment/unit/'+_0x162463+_0x74097b(0xac),{'body':_0x3288fb});return!_0x4ee561[_0x74097b(0xb9)][_0x74097b(0xfa)]||_0x4ee561[_0x74097b(0xb9)][_0x74097b(0xfa)][_0x74097b(0xbd)]===0x1;}async[_0x3a55ee(0xc5)](_0x252e10,_0x2f29bc,_0xdeed1a,_0x5853db){const _0x4a6a0f=_0x3a55ee,_0x497708={'memberId':(await this['_sessionService']['requireSession'](_0x252e10))[_0x4a6a0f(0xc8)](),'threadId':_0xdeed1a,'replyId':_0x5853db,'unitId':_0x252e10},_0x24c97c=await this['_httpService'][_0x4a6a0f(0xf3)](_0x4a6a0f(0xc2)+_0x252e10+_0x4a6a0f(0xdb),{'body':_0x497708});return!_0x24c97c[_0x4a6a0f(0xb9)][_0x4a6a0f(0xfa)]||_0x24c97c[_0x4a6a0f(0xb9)]['error'][_0x4a6a0f(0xbd)]===0x1;}async['listComments'](_0x322961,_0x5902db,_0x5866df){const _0x361771=_0x3a55ee,_0x172a56={'unitId':_0x322961,'threadId':_0x5866df},_0x441a0c=await this[_0x361771(0xe7)][_0x361771(0xf3)]('/universer-api/comment/unit/'+_0x322961+_0x361771(0xec),{'body':_0x172a56}),_0x3e9444=_0x5866df[_0x361771(0xc9)](_0x570467=>ee(_0x441a0c[_0x361771(0xb9)]['comments'][_0x570467],_0x322961,_0x5902db))['filter'](Boolean);return Object[_0x361771(0xc1)](_0x441a0c[_0x361771(0xb9)]['users'])['forEach'](_0x1d3319=>{const _0x26d109=_0x361771;this[_0x26d109(0xa5)]['addUser'](_0x1d3319);}),_0x3e9444;}[_0x3a55ee(0xa9)](_0x36221e){const _0x18f907=_0x3a55ee;return{'id':_0x36221e['id'],'threadId':_0x36221e[_0x18f907(0xe4)],'ref':_0x36221e['ref']};}};f=Q([_(0x0,_0x4b2b1a(_0x4597fd)),_(0x1,_0x4b2b1a(_0x3b0c80)),_(0x2,_0x4b2b1a(_0x494660)),_(0x3,_0x4b2b1a(_0x2ec43c))],f);var re=Object[_0x3a55ee(0xb3)],te=(_0x57976d,_0x18c24c,_0xe1cbad,_0x4bfbdd)=>{const _0x2efd6b=_0x3a55ee;for(var _0x45774a=_0x4bfbdd>0x1?void 0x0:_0x4bfbdd?re(_0x18c24c,_0xe1cbad):_0x18c24c,_0x4c1063=_0x57976d[_0x2efd6b(0xcc)]-0x1,_0x2aa92b;_0x4c1063>=0x0;_0x4c1063--)(_0x2aa92b=_0x57976d[_0x4c1063])&&(_0x45774a=_0x2aa92b(_0x45774a)||_0x45774a);return _0x45774a;},N=(_0x591303,_0x4dda89)=>(_0x2a413b,_0x573776)=>_0x4dda89(_0x2a413b,_0x573776,_0x591303);let g=class extends _0x49ba1d{constructor(_0x2a54db,_0x8ea6e0){const _0xffb47b=_0x3a55ee;super(),this['_threadCommentDataSourceService']=_0x2a54db,this[_0xffb47b(0xd4)]=_0x8ea6e0,this[_0xffb47b(0x102)]();}[_0x3a55ee(0x102)](){const _0x219f99=_0x3a55ee;this[_0x219f99(0xb8)][_0x219f99(0xc6)]=this[_0x219f99(0xd4)],this['_threadCommentDataSourceService'][_0x219f99(0x10b)]=!0x1;}};function _0x499e(){const _0x5d2241=['getUnit','replyId','getCurrentUser','post','root','_threadCommentModel','slice','150667PFfqTm','COMMENT','_sessionService','error','size','727465feRCBj','18VbEaBe','get','forEach','getComment','subscribe','_initDataSource','12ATprzn','parentId','UNRECOGNIZED','unitId','filter','addUser','_injector','parse','syncUpdateMutationToColla','/reply','symbol','_userService','user','replies','Reply','saveCommentToSnapshot','_init','/add','/solved','559672omStCP','find','Solve','defineProperty','solved','390sSvVXL','getOwnPropertyDescriptor','users','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Unknown','_threadCommentDataSourceService','body','YYYY/MM/DD\x20HH:mm','customRanges','updateComment','code','createTimestamp','commentUpdate$','_commentService','values','/universer-api/comment/unit/','reply','setConfig','deleteComment','dataSource','disposeWithMe','getMemberID','map','resolved','Add','length','comment','_configService','4133080JRHTrJ','userID','Edit','getUser','content','_threadCommentDataSource','type','pipe','2tzhIZR','rangeId','rangeType','OpenOrReOpen','/delete','2164BaiXDA','pluginName','userId','Solved','8536584uMJsJb','4110ZlBYdh','payload','Delete','threadId','add','format','_httpService','onReady','3536664QchBbV','resolveComment','_config','/list','_initUserSync','requireSession','UNIVER_UNKNOWN'];_0x499e=function(){return _0x5d2241;};return _0x499e();}g=te([N(0x0,_0x160153),N(0x1,_0x4b2b1a(f))],g);var se=Object[_0x3a55ee(0xb0)],oe=Object[_0x3a55ee(0xb3)],ne=(_0xe5ae43,_0x55c28e,_0x29e9c4)=>_0x55c28e in _0xe5ae43?se(_0xe5ae43,_0x55c28e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29e9c4}):_0xe5ae43[_0x55c28e]=_0x29e9c4,ie=(_0x29f749,_0x34facd,_0x4b7e7c,_0x5daae9)=>{const _0x23818b=_0x3a55ee;for(var _0x190753=_0x5daae9>0x1?void 0x0:_0x5daae9?oe(_0x34facd,_0x4b7e7c):_0x34facd,_0x527df3=_0x29f749[_0x23818b(0xcc)]-0x1,_0x3bdab0;_0x527df3>=0x0;_0x527df3--)(_0x3bdab0=_0x29f749[_0x527df3])&&(_0x190753=_0x3bdab0(_0x190753)||_0x190753);return _0x190753;},w=(_0x8a5d23,_0x36ac88)=>(_0x59e5cf,_0x1b3067)=>_0x36ac88(_0x59e5cf,_0x1b3067,_0x8a5d23),$=(_0x153ae5,_0x364a3c,_0x46e83c)=>ne(_0x153ae5,typeof _0x364a3c!=_0x3a55ee(0x10d)?_0x364a3c+'':_0x364a3c,_0x46e83c);let b=class extends _0x1948c2{constructor(_0x446890=M,_0x904863,_0x5c959e){const _0x4c085e=_0x3a55ee;super(),this['_config']=_0x446890,this[_0x4c085e(0x109)]=_0x904863,this[_0x4c085e(0xce)]=_0x5c959e;const {..._0x5df44c}=_0x5e1ed8({},M,this[_0x4c085e(0xeb)]);this[_0x4c085e(0xce)][_0x4c085e(0xc4)](z,_0x5df44c);}['onStarting'](){[[f],[g],[S]]['forEach'](_0xdd4521=>{const _0x11337=_0x498a;this['_injector'][_0x11337(0xe5)](_0xdd4521);});}[_0x3a55ee(0xe8)](){const _0x36cc87=_0x3a55ee;this[_0x36cc87(0x109)][_0x36cc87(0xfe)](g),this['_injector'][_0x36cc87(0xfe)](S);}};$(b,_0x3a55ee(0xdd),W),$(b,_0x3a55ee(0xd5),_0x13d7fd[_0x3a55ee(0xef)]),b=ie([_0xc2b821(_0x4d6c0a,_0xec1e5b,_0x38dfbc),w(0x1,_0x4b2b1a(_0x2ec43c)),w(0x2,_0x30a2d6)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x23fa6f=_0x50e2;(function(_0x34d748,_0x3b8ba5){const _0x26f94b=_0x50e2,_0x16dbaf=_0x34d748();while(!![]){try{const _0x3c29d6=parseInt(_0x26f94b(0x143))/0x1+parseInt(_0x26f94b(0x18f))/0x2+-parseInt(_0x26f94b(0x151))/0x3+-parseInt(_0x26f94b(0x132))/0x4+parseInt(_0x26f94b(0x159))/0x5+-parseInt(_0x26f94b(0x185))/0x6*(-parseInt(_0x26f94b(0x14a))/0x7)+parseInt(_0x26f94b(0x169))/0x8*(parseInt(_0x26f94b(0x173))/0x9);if(_0x3c29d6===_0x3b8ba5)break;else _0x16dbaf['push'](_0x16dbaf['shift']());}catch(_0x4b36c2){_0x16dbaf['push'](_0x16dbaf['shift']());}}}(_0x232d,0x587c4));import{CommentService as _0x20a661,CollaborationSessionService as _0xea13e3,UniverCollaborationClientPlugin as _0x3dcb68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1dbdb7}from'@univerjs-pro/license';import{dayjs as _0x3a9660,UserManagerService as _0x469b81,Inject as _0x3c5570,Injector as _0x375bf6,Disposable as _0x34d19b,CustomRangeType as _0x445314,UniverInstanceType as _0x43fc88,DependentOn as _0x1e041b,IConfigService as _0x1e8b56,Plugin as _0x9156f8,merge as _0x110a0b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b0210}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5f0ff,IThreadCommentDataSourceService as _0x2ecb1d}from'@univerjs/thread-comment';import{bufferTime as _0x5b8e83}from'rxjs';import{HTTPService as _0x46056e}from'@univerjs/network';const W=_0x23fa6f(0x166);var I=(_0x48f0cc=>(_0x48f0cc[_0x48f0cc[_0x23fa6f(0x158)]=0x0]=_0x23fa6f(0x158),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x137)]=0x1]=_0x23fa6f(0x137),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x48f0cc))(I||{}),v=(_0x2822d8=>(_0x2822d8[_0x2822d8[_0x23fa6f(0x188)]=0x0]=_0x23fa6f(0x188),_0x2822d8[_0x2822d8['Add']=0x1]='Add',_0x2822d8[_0x2822d8[_0x23fa6f(0x156)]=0x2]='Reply',_0x2822d8[_0x2822d8['Edit']=0x3]='Edit',_0x2822d8[_0x2822d8[_0x23fa6f(0x13d)]=0x4]=_0x23fa6f(0x13d),_0x2822d8[_0x2822d8[_0x23fa6f(0x177)]=0x5]=_0x23fa6f(0x177),_0x2822d8[_0x2822d8[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x2822d8))(v||{});const D=_0x57489c=>_0x3a9660(new Date(+_0x57489c))[_0x23fa6f(0x17f)](_0x23fa6f(0x15e)),B=async(_0x1dd44f,_0x40b698)=>{const _0x7afd01=_0x23fa6f,_0x238c72=_0x1dd44f[_0x7afd01(0x13b)](_0x469b81),_0x315977=_0x1dd44f['get'](_0x46056e);_0x40b698['forEach'](_0x53849b=>{const _0x57666f=_0x7afd01;_0x238c72[_0x57666f(0x164)](_0x53849b)&&_0x40b698[_0x57666f(0x16e)](_0x53849b);}),_0x40b698[_0x7afd01(0x14e)]&&(await _0x315977[_0x7afd01(0x13b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40b698]}}))['body'][_0x7afd01(0x18c)][_0x7afd01(0x193)](_0x2c6970=>{const _0x32f084=_0x7afd01;_0x2c6970&&_0x238c72[_0x32f084(0x138)](_0x2c6970);});};var K=Object[_0x23fa6f(0x191)],V=(_0x240725,_0x301fe1,_0x7f5cca,_0x6aa73)=>{for(var _0x230780=_0x6aa73>0x1?void 0x0:_0x6aa73?K(_0x301fe1,_0x7f5cca):_0x301fe1,_0x2a8a03=_0x240725['length']-0x1,_0x17b4a7;_0x2a8a03>=0x0;_0x2a8a03--)(_0x17b4a7=_0x240725[_0x2a8a03])&&(_0x230780=_0x17b4a7(_0x230780)||_0x230780);return _0x230780;},p=(_0x538cbd,_0x7bae1)=>(_0xa0f7c1,_0x563fe3)=>_0x7bae1(_0xa0f7c1,_0x563fe3,_0x538cbd);let S=class extends _0x34d19b{constructor(_0x6cc892,_0x16fee6,_0x4db590,_0x23de98){const _0x3ffb7d=_0x23fa6f;super(),this[_0x3ffb7d(0x14d)]=_0x6cc892,this['_threadCommentModel']=_0x16fee6,this['_userService']=_0x4db590,this['_injector']=_0x23de98,this['_init'](),this[_0x3ffb7d(0x181)]();}['_initUserSync'](){const _0x19eeb0=_0x23fa6f;this[_0x19eeb0(0x14b)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x5b8e83(0x10))[_0x19eeb0(0x135)](_0x3b37b8=>{const _0x282ad1=_0x19eeb0,_0x582357=new Set();_0x3b37b8[_0x282ad1(0x193)](_0x514d50=>{const _0x328e3f=_0x282ad1;switch(_0x514d50[_0x328e3f(0x178)]){case _0x328e3f(0x170):{const _0x1e96c4=_0x514d50[_0x328e3f(0x13e)][_0x328e3f(0x144)];_0x582357['add'](_0x1e96c4);break;}}}),B(this[_0x282ad1(0x140)],_0x582357);}));}['_init'](){const _0x33ec78=_0x23fa6f;this[_0x33ec78(0x14b)](this['_commentService'][_0x33ec78(0x134)][_0x33ec78(0x135)](async _0x2ef939=>{const _0xcfd235=_0x33ec78;var _0x52fc42,_0x55b9ab,_0x18afa9,_0x2f5a17;const _0x58bbe5=(_0x52fc42=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939['unitId'])[_0xcfd235(0x183)](_0x31f112=>_0x31f112[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x52fc42[_0xcfd235(0x17d)];if(!_0x58bbe5)return;const {unitId:_0x468376,subUnitId:_0x48c59b}=_0x58bbe5;switch(_0x2ef939[_0xcfd235(0x155)]&&this['_userService'][_0xcfd235(0x138)](_0x2ef939[_0xcfd235(0x155)]),_0x2ef939[_0xcfd235(0x178)]){case v[_0xcfd235(0x17b)]:break;case v['Reply']:{this[_0xcfd235(0x18d)][_0xcfd235(0x162)](_0x468376,_0x48c59b,{'unitId':_0x468376,'subUnitId':_0x48c59b,'ref':'','id':_0x2ef939[_0xcfd235(0x194)],'dT':D(+_0x2ef939[_0xcfd235(0x13a)]),'threadId':_0x2ef939['threadId'],'personId':(_0x18afa9=(_0x55b9ab=_0x2ef939[_0xcfd235(0x155)])==null?void 0x0:_0x55b9ab[_0xcfd235(0x184)])!=null?_0x18afa9:_0x2ef939[_0xcfd235(0x172)],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)]),'parentId':_0x58bbe5['id']});break;}case v['Delete']:{const _0x49e090=this['_threadCommentModel'][_0xcfd235(0x14f)](_0x468376,_0x48c59b,_0x2ef939[_0xcfd235(0x194)]);_0x49e090&&_0x49e090[_0xcfd235(0x196)]&&this[_0xcfd235(0x18d)][_0xcfd235(0x175)](_0x468376,_0x48c59b,_0x2ef939['replyId']);break;}case v[_0xcfd235(0x131)]:{this[_0xcfd235(0x18d)][_0xcfd235(0x163)](_0x468376,_0x48c59b,{'commentId':_0x2ef939['replyId'],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)])});break;}case v['Solve']:{const _0x9465d2=(_0x2f5a17=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939[_0xcfd235(0x152)])[_0xcfd235(0x183)](_0x55bd72=>_0x55bd72[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x2f5a17[_0xcfd235(0x17d)];_0x9465d2&&this['_threadCommentModel'][_0xcfd235(0x150)](_0x468376,_0x48c59b,_0x9465d2['id'],_0x2ef939['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c5570(_0x20a661)),p(0x1,_0x3c5570(_0x5f0ff)),p(0x2,_0x3c5570(_0x469b81)),p(0x3,_0x3c5570(_0x375bf6))],S);const z=_0x23fa6f(0x16c),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x82b03f,_0x4b6cee,_0x499727,_0x5f1d63)=>{for(var _0x1e114d=_0x5f1d63>0x1?void 0x0:_0x5f1d63?k(_0x4b6cee,_0x499727):_0x4b6cee,_0x3d66e0=_0x82b03f['length']-0x1,_0x467409;_0x3d66e0>=0x0;_0x3d66e0--)(_0x467409=_0x82b03f[_0x3d66e0])&&(_0x1e114d=_0x467409(_0x1e114d)||_0x1e114d);return _0x1e114d;},_=(_0x2ca03f,_0x153acf)=>(_0x988932,_0x25f323)=>_0x153acf(_0x988932,_0x25f323,_0x2ca03f);function X(_0x88b89b,_0x19ffdd){const _0x2ab970=_0x23fa6f,_0x7fee40=_0x88b89b[_0x2ab970(0x15a)][0x0];return{..._0x19ffdd,'id':_0x7fee40[_0x2ab970(0x194)],'resolved':_0x88b89b['solved']===0x1,'dT':D(_0x7fee40[_0x2ab970(0x13a)]),'personId':_0x7fee40[_0x2ab970(0x172)],'threadId':_0x7fee40[_0x2ab970(0x149)]};}function ee(_0x1f58a7,_0x149fdf,_0x153be4){const _0x24b445=_0x23fa6f;var _0x45511a,_0x445262;if(((_0x445262=(_0x45511a=_0x1f58a7==null?void 0x0:_0x1f58a7[_0x24b445(0x15a)])==null?void 0x0:_0x45511a[_0x24b445(0x182)])!=null?_0x445262:0x0)>0x0){const _0xca0303=(_0x48a89e,_0x2e9b24)=>({'id':_0x48a89e[_0x24b445(0x194)],'threadId':_0x48a89e[_0x24b445(0x149)],'dT':D(_0x48a89e['createTimestamp']),'personId':_0x48a89e['userId'],'resolved':_0x1f58a7[_0x24b445(0x15c)]===I[_0x24b445(0x137)],'unitId':_0x149fdf,'subUnitId':_0x153be4,'text':JSON[_0x24b445(0x17a)](_0x48a89e[_0x24b445(0x157)]),'parentId':_0x2e9b24}),_0x45d7e5=_0xca0303(_0x1f58a7[_0x24b445(0x15a)][0x0]);return{..._0x45d7e5,'children':_0x1f58a7[_0x24b445(0x15a)][_0x24b445(0x165)](0x1)[_0x24b445(0x141)](_0x3ded48=>_0xca0303(_0x3ded48,_0x45d7e5['id']))};}return null;}let f=class{constructor(_0x59501d,_0x3353d5,_0x31333c,_0x2b0455){const _0x176980=_0x23fa6f;this[_0x176980(0x16b)]=_0x59501d,this[_0x176980(0x139)]=_0x3353d5,this['_sessionService']=_0x31333c,this[_0x176980(0x140)]=_0x2b0455;}async['addComment'](_0x3369af){const _0x4dfc58=_0x23fa6f;var _0x1f7b0f,_0xdb71e2;const {parentId:_0x1f6c5d,unitId:_0x141d05,text:_0x14ea23,threadId:_0x4de648}=_0x3369af,_0xc577b4=(_0xdb71e2=(_0x1f7b0f=_0x14ea23['customRanges'])==null?void 0x0:_0x1f7b0f[_0x4dfc58(0x13c)](_0x682a48=>_0x682a48[_0x4dfc58(0x154)]===_0x445314[_0x4dfc58(0x15f)])[_0x4dfc58(0x141)](_0x43ddbc=>_0x43ddbc[_0x4dfc58(0x195)]))!=null?_0xdb71e2:[],_0x83fa7b=JSON[_0x4dfc58(0x192)](_0x14ea23),_0x492dcc=(await this[_0x4dfc58(0x186)][_0x4dfc58(0x18a)](_0x141d05))[_0x4dfc58(0x179)]();if(_0x1f6c5d){const _0x55cf12={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4,'threadId':_0x4de648},_0x569c35=(await this['_httpService'][_0x4dfc58(0x133)]('/universer-api/comment/unit/'+_0x141d05+_0x4dfc58(0x17c),{'body':_0x55cf12}))[_0x4dfc58(0x148)]['reply'];return{..._0x3369af,'id':_0x569c35['replyId'],'dT':_0x3a9660(+_0x569c35[_0x4dfc58(0x13a)])[_0x4dfc58(0x17f)](_0x4dfc58(0x15e)),'personId':_0x569c35[_0x4dfc58(0x172)]};}else{const _0x339d43={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4},_0x36639c=await this[_0x4dfc58(0x16b)]['post'](_0x4dfc58(0x146)+_0x141d05+_0x4dfc58(0x190),{'body':_0x339d43});return X(_0x36639c['body'][_0x4dfc58(0x136)],_0x3369af);}}async['updateComment'](_0x2272bb){const _0x4a829a=_0x23fa6f;var _0x4ed306,_0x33f969;const {text:_0x3bff7c,unitId:_0xaa685e}=_0x2272bb,_0x1ef3a8=(_0x33f969=(_0x4ed306=_0x3bff7c[_0x4a829a(0x16f)])==null?void 0x0:_0x4ed306[_0x4a829a(0x13c)](_0x505a42=>_0x505a42[_0x4a829a(0x154)]===_0x445314[_0x4a829a(0x15f)])[_0x4a829a(0x141)](_0xd5023c=>_0xd5023c[_0x4a829a(0x195)]))!=null?_0x33f969:[],_0x495eec=JSON[_0x4a829a(0x192)](_0x3bff7c),_0x396c5d=_0x2272bb[_0x4a829a(0x149)],_0x2dbfc2=_0x2272bb['id'],_0x42711a={'memberId':(await this[_0x4a829a(0x186)][_0x4a829a(0x18a)](_0xaa685e))[_0x4a829a(0x179)](),'unitId':_0xaa685e,'threadId':_0x396c5d,'mention':_0x1ef3a8,'content':_0x495eec,'replyId':_0x2dbfc2},_0x228803=await this[_0x4a829a(0x16b)]['post'](_0x4a829a(0x146)+_0xaa685e+_0x4a829a(0x153),{'body':_0x42711a});return!_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)]||_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)][_0x4a829a(0x187)]===0x1;}async[_0x23fa6f(0x150)](_0x3a102e){const _0x893dad=_0x23fa6f,{unitId:_0x1a4ee8}=_0x3a102e,_0x52948d=_0x3a102e[_0x893dad(0x149)],_0x315da6={'memberId':this[_0x893dad(0x139)][_0x893dad(0x168)]()[_0x893dad(0x184)],'unitId':_0x1a4ee8,'threadId':_0x52948d,'solved':_0x3a102e[_0x893dad(0x180)]?I['Solved']:I[_0x893dad(0x158)]},_0x5daa18=await this[_0x893dad(0x16b)][_0x893dad(0x133)](_0x893dad(0x146)+_0x1a4ee8+'/solved',{'body':_0x315da6});return!_0x5daa18[_0x893dad(0x148)][_0x893dad(0x13f)]||_0x5daa18['body'][_0x893dad(0x13f)]['code']===0x1;}async[_0x23fa6f(0x175)](_0x492fbe,_0x20aa2b,_0x47dc38,_0x43ed9a){const _0x338c77=_0x23fa6f,_0x37979b={'memberId':(await this[_0x338c77(0x186)][_0x338c77(0x18a)](_0x492fbe))[_0x338c77(0x179)](),'threadId':_0x47dc38,'replyId':_0x43ed9a,'unitId':_0x492fbe},_0x2a8e9b=await this[_0x338c77(0x16b)]['post'](_0x338c77(0x146)+_0x492fbe+_0x338c77(0x161),{'body':_0x37979b});return!_0x2a8e9b[_0x338c77(0x148)][_0x338c77(0x13f)]||_0x2a8e9b['body'][_0x338c77(0x13f)]['code']===0x1;}async[_0x23fa6f(0x160)](_0x45031e,_0x5a6ec3,_0x31447f){const _0x1baba2=_0x23fa6f,_0x14c29c={'unitId':_0x45031e,'threadId':_0x31447f},_0x49cb52=await this[_0x1baba2(0x16b)]['post'](_0x1baba2(0x146)+_0x45031e+_0x1baba2(0x189),{'body':_0x14c29c}),_0x2b2ae0=_0x31447f['map'](_0x43a8dc=>ee(_0x49cb52[_0x1baba2(0x148)]['comments'][_0x43a8dc],_0x45031e,_0x5a6ec3))['filter'](Boolean);return Object[_0x1baba2(0x18b)](_0x49cb52[_0x1baba2(0x148)]['users'])[_0x1baba2(0x193)](_0x446848=>{const _0x2db9d7=_0x1baba2;this[_0x2db9d7(0x139)][_0x2db9d7(0x138)](_0x446848);}),_0x2b2ae0;}[_0x23fa6f(0x16a)](_0x5b137d){const _0x42a704=_0x23fa6f;return{'id':_0x5b137d['id'],'threadId':_0x5b137d[_0x42a704(0x149)],'ref':_0x5b137d[_0x42a704(0x17e)]};}};f=Q([_(0x0,_0x3c5570(_0x46056e)),_(0x1,_0x3c5570(_0x469b81)),_(0x2,_0x3c5570(_0xea13e3)),_(0x3,_0x3c5570(_0x375bf6))],f);function _0x232d(){const _0x2cb19f=['UNRECOGNIZED','userId','81fieKZb','_config','deleteComment','_initDataSource','Solve','type','getMemberID','parse','Add','/reply','root','ref','format','resolved','_initUserSync','length','find','userID','1063266tWPabu','_sessionService','code','Unknown','/list','requireSession','values','users','_threadCommentModel','syncUpdateMutationToColla','207964FpCeoe','/add','getOwnPropertyDescriptor','stringify','forEach','replyId','rangeId','parentId','Edit','2124856atNMAs','post','commentUpdate$','subscribe','comment','Solved','addUser','_userService','createTimestamp','get','filter','Delete','payload','error','_injector','map','UNIVER_UNKNOWN','305756dYqwOB','personId','onStarting','/universer-api/comment/unit/','_configService','body','threadId','7WQHcox','disposeWithMe','defineProperty','_commentService','size','getComment','resolveComment','2131896lnGvoZ','unitId','/edit','rangeType','user','Reply','content','OpenOrReOpen','1998990evNXKx','replies','symbol','solved','_threadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','COMMENT','listComments','/delete','addComment','updateComment','getUser','slice','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pluginName','getCurrentUser','548920WTNLwF','saveCommentToSnapshot','_httpService','thread-comment-data-source.config','getUnit','delete','customRanges','add'];_0x232d=function(){return _0x2cb19f;};return _0x232d();}var re=Object['getOwnPropertyDescriptor'],te=(_0x4cdb3b,_0x5c6053,_0x306b0a,_0x11af14)=>{const _0xd59cd6=_0x23fa6f;for(var _0x4f0cb9=_0x11af14>0x1?void 0x0:_0x11af14?re(_0x5c6053,_0x306b0a):_0x5c6053,_0x27f433=_0x4cdb3b[_0xd59cd6(0x182)]-0x1,_0x228e1d;_0x27f433>=0x0;_0x27f433--)(_0x228e1d=_0x4cdb3b[_0x27f433])&&(_0x4f0cb9=_0x228e1d(_0x4f0cb9)||_0x4f0cb9);return _0x4f0cb9;},N=(_0x4b1047,_0x40107a)=>(_0x4df5fc,_0x3bbf7b)=>_0x40107a(_0x4df5fc,_0x3bbf7b,_0x4b1047);let g=class extends _0x34d19b{constructor(_0x3a2768,_0x29ad6b){const _0x159e26=_0x23fa6f;super(),this['_threadCommentDataSourceService']=_0x3a2768,this['_threadCommentDataSource']=_0x29ad6b,this[_0x159e26(0x176)]();}[_0x23fa6f(0x176)](){const _0x64a5cc=_0x23fa6f;this[_0x64a5cc(0x15d)]['dataSource']=this['_threadCommentDataSource'],this[_0x64a5cc(0x15d)][_0x64a5cc(0x18e)]=!0x1;}};function _0x50e2(_0x767746,_0x4ac769){const _0x232d80=_0x232d();return _0x50e2=function(_0x50e299,_0x5ddb01){_0x50e299=_0x50e299-0x131;let _0x470b70=_0x232d80[_0x50e299];return _0x470b70;},_0x50e2(_0x767746,_0x4ac769);}g=te([N(0x0,_0x2ecb1d),N(0x1,_0x3c5570(f))],g);var se=Object[_0x23fa6f(0x14c)],oe=Object[_0x23fa6f(0x191)],ne=(_0x467322,_0x45c742,_0x1aff4f)=>_0x45c742 in _0x467322?se(_0x467322,_0x45c742,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1aff4f}):_0x467322[_0x45c742]=_0x1aff4f,ie=(_0x3fff74,_0x8420e7,_0x267e03,_0x3404c7)=>{const _0x199b92=_0x23fa6f;for(var _0x538b59=_0x3404c7>0x1?void 0x0:_0x3404c7?oe(_0x8420e7,_0x267e03):_0x8420e7,_0x23f855=_0x3fff74[_0x199b92(0x182)]-0x1,_0x2c5833;_0x23f855>=0x0;_0x23f855--)(_0x2c5833=_0x3fff74[_0x23f855])&&(_0x538b59=_0x2c5833(_0x538b59)||_0x538b59);return _0x538b59;},w=(_0x40970d,_0x4c0f04)=>(_0x30f643,_0x376f4d)=>_0x4c0f04(_0x30f643,_0x376f4d,_0x40970d),$=(_0x33098c,_0x2bf3a0,_0x1592f6)=>ne(_0x33098c,typeof _0x2bf3a0!=_0x23fa6f(0x15b)?_0x2bf3a0+'':_0x2bf3a0,_0x1592f6);let b=class extends _0x9156f8{constructor(_0x4d938c=M,_0x49d268,_0x4636dc){const _0x1bba38=_0x23fa6f;super(),this[_0x1bba38(0x174)]=_0x4d938c,this[_0x1bba38(0x140)]=_0x49d268,this[_0x1bba38(0x147)]=_0x4636dc;const {..._0x3cd3b9}=_0x110a0b({},M,this[_0x1bba38(0x174)]);this['_configService']['setConfig'](z,_0x3cd3b9);}[_0x23fa6f(0x145)](){const _0x50f6a0=_0x23fa6f;[[f],[g],[S]][_0x50f6a0(0x193)](_0x2ea6bc=>{const _0x4837c2=_0x50f6a0;this['_injector'][_0x4837c2(0x170)](_0x2ea6bc);});}['onReady'](){const _0x1fc511=_0x23fa6f;this[_0x1fc511(0x140)][_0x1fc511(0x13b)](g),this[_0x1fc511(0x140)][_0x1fc511(0x13b)](S);}};$(b,_0x23fa6f(0x167),W),$(b,_0x23fa6f(0x178),_0x43fc88[_0x23fa6f(0x142)]),b=ie([_0x1e041b(_0x4b0210,_0x3dcb68,_0x1dbdb7),w(0x1,_0x3c5570(_0x375bf6)),w(0x2,_0x1e8b56)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3a55ee=_0x498a;(function(_0x28b60f,_0x1e2be7){const _0x2366d7=_0x498a,_0x1e197d=_0x28b60f();while(!![]){try{const _0x396ebb=-parseInt(_0x2366d7(0xd7))/0x1*(parseInt(_0x2366d7(0xad))/0x2)+-parseInt(_0x2366d7(0xe1))/0x3*(parseInt(_0x2366d7(0xdc))/0x4)+parseInt(_0x2366d7(0xfc))/0x5*(parseInt(_0x2366d7(0x103))/0x6)+-parseInt(_0x2366d7(0xcf))/0x7+-parseInt(_0x2366d7(0xe9))/0x8*(-parseInt(_0x2366d7(0xfd))/0x9)+-parseInt(_0x2366d7(0xb2))/0xa*(-parseInt(_0x2366d7(0xf7))/0xb)+parseInt(_0x2366d7(0xe0))/0xc;if(_0x396ebb===_0x1e2be7)break;else _0x1e197d['push'](_0x1e197d['shift']());}catch(_0x25b5dc){_0x1e197d['push'](_0x1e197d['shift']());}}}(_0x499e,0x8141b));import{CommentService as _0x2821d4,CollaborationSessionService as _0x494660,UniverCollaborationClientPlugin as _0xec1e5b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38dfbc}from'@univerjs-pro/license';import{dayjs as _0x13ae37,UserManagerService as _0x3b0c80,Inject as _0x4b2b1a,Injector as _0x2ec43c,Disposable as _0x49ba1d,CustomRangeType as _0x2f0881,UniverInstanceType as _0x13d7fd,DependentOn as _0xc2b821,IConfigService as _0x30a2d6,Plugin as _0x1948c2,merge as _0x5e1ed8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4d6c0a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x231289,IThreadCommentDataSourceService as _0x160153}from'@univerjs/thread-comment';import{bufferTime as _0x4b3cb8}from'rxjs';function _0x498a(_0x3c2a3c,_0x1a6d6){const _0x499ef6=_0x499e();return _0x498a=function(_0x498a75,_0x19c8d9){_0x498a75=_0x498a75-0xa5;let _0x2c6ddb=_0x499ef6[_0x498a75];return _0x2c6ddb;},_0x498a(_0x3c2a3c,_0x1a6d6);}import{HTTPService as _0x4597fd}from'@univerjs/network';const W=_0x3a55ee(0xb6);var I=(_0x674145=>(_0x674145[_0x674145[_0x3a55ee(0xda)]=0x0]='OpenOrReOpen',_0x674145[_0x674145['Solved']=0x1]=_0x3a55ee(0xdf),_0x674145[_0x674145[_0x3a55ee(0x105)]=-0x1]=_0x3a55ee(0x105),_0x674145))(I||{}),v=(_0x3b4d8c=>(_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xb7)]=0x0]=_0x3a55ee(0xb7),_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xcb)]=0x1]='Add',_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xa8)]=0x2]='Reply',_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xd1)]=0x3]=_0x3a55ee(0xd1),_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xe3)]=0x4]='Delete',_0x3b4d8c[_0x3b4d8c[_0x3a55ee(0xaf)]=0x5]=_0x3a55ee(0xaf),_0x3b4d8c[_0x3b4d8c['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3b4d8c))(v||{});const D=_0x3306a9=>_0x13ae37(new Date(+_0x3306a9))['format'](_0x3a55ee(0xba)),B=async(_0x14bd97,_0x49b781)=>{const _0x2f2f0d=_0x3a55ee,_0x1c0e20=_0x14bd97[_0x2f2f0d(0xfe)](_0x3b0c80),_0x592f2d=_0x14bd97[_0x2f2f0d(0xfe)](_0x4597fd);_0x49b781[_0x2f2f0d(0xff)](_0x297741=>{const _0x5f5591=_0x2f2f0d;_0x1c0e20[_0x5f5591(0xd2)](_0x297741)&&_0x49b781['delete'](_0x297741);}),_0x49b781[_0x2f2f0d(0xfb)]&&(await _0x592f2d['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x49b781]}}))['body'][_0x2f2f0d(0xb4)][_0x2f2f0d(0xff)](_0x280e45=>{_0x280e45&&_0x1c0e20['addUser'](_0x280e45);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4b0bc3,_0x2466b1,_0x4e5315,_0x368e05)=>{for(var _0xa96da8=_0x368e05>0x1?void 0x0:_0x368e05?K(_0x2466b1,_0x4e5315):_0x2466b1,_0x34934f=_0x4b0bc3['length']-0x1,_0x57f160;_0x34934f>=0x0;_0x34934f--)(_0x57f160=_0x4b0bc3[_0x34934f])&&(_0xa96da8=_0x57f160(_0xa96da8)||_0xa96da8);return _0xa96da8;},p=(_0x14613e,_0x529ec9)=>(_0x3c16c0,_0x5c8a81)=>_0x529ec9(_0x3c16c0,_0x5c8a81,_0x14613e);let S=class extends _0x49ba1d{constructor(_0x65e289,_0x401a7f,_0x1d8eac,_0x2e6aed){const _0x138b15=_0x3a55ee;super(),this[_0x138b15(0xc0)]=_0x65e289,this[_0x138b15(0xf5)]=_0x401a7f,this['_userService']=_0x1d8eac,this[_0x138b15(0x109)]=_0x2e6aed,this[_0x138b15(0xaa)](),this[_0x138b15(0xed)]();}['_initUserSync'](){const _0x4c4acc=_0x3a55ee;this[_0x4c4acc(0xc7)](this[_0x4c4acc(0xf5)]['commentUpdate$'][_0x4c4acc(0xd6)](_0x4b3cb8(0x10))[_0x4c4acc(0x101)](_0x3d1751=>{const _0x28e9ea=_0x4c4acc,_0x50c45e=new Set();_0x3d1751[_0x28e9ea(0xff)](_0x79f09f=>{const _0x59f2b5=_0x28e9ea;switch(_0x79f09f['type']){case _0x59f2b5(0xe5):{const _0x69d25b=_0x79f09f[_0x59f2b5(0xe2)]['personId'];_0x50c45e[_0x59f2b5(0xe5)](_0x69d25b);break;}}}),B(this[_0x28e9ea(0x109)],_0x50c45e);}));}[_0x3a55ee(0xaa)](){const _0x375259=_0x3a55ee;this[_0x375259(0xc7)](this['_commentService'][_0x375259(0xbf)][_0x375259(0x101)](async _0x2efea5=>{const _0xd5c458=_0x375259;var _0x499898,_0x39683e,_0x58b055,_0x59b283;const _0x23e3f5=(_0x499898=this[_0xd5c458(0xf5)][_0xd5c458(0xf0)](_0x2efea5[_0xd5c458(0x106)])['find'](_0x34ea13=>_0x34ea13[_0xd5c458(0xe4)]===_0x2efea5[_0xd5c458(0xe4)]))==null?void 0x0:_0x499898[_0xd5c458(0xf4)];if(!_0x23e3f5)return;const {unitId:_0x178a30,subUnitId:_0x4416f3}=_0x23e3f5;switch(_0x2efea5[_0xd5c458(0xa6)]&&this[_0xd5c458(0xa5)][_0xd5c458(0x108)](_0x2efea5['user']),_0x2efea5[_0xd5c458(0xd5)]){case v[_0xd5c458(0xcb)]:break;case v[_0xd5c458(0xa8)]:{this['_threadCommentModel']['addComment'](_0x178a30,_0x4416f3,{'unitId':_0x178a30,'subUnitId':_0x4416f3,'ref':'','id':_0x2efea5['replyId'],'dT':D(+_0x2efea5[_0xd5c458(0xbe)]),'threadId':_0x2efea5[_0xd5c458(0xe4)],'personId':(_0x58b055=(_0x39683e=_0x2efea5[_0xd5c458(0xa6)])==null?void 0x0:_0x39683e[_0xd5c458(0xd0)])!=null?_0x58b055:_0x2efea5['userId'],'text':JSON[_0xd5c458(0x10a)](_0x2efea5[_0xd5c458(0xd3)]),'parentId':_0x23e3f5['id']});break;}case v[_0xd5c458(0xe3)]:{const _0x272914=this[_0xd5c458(0xf5)][_0xd5c458(0x100)](_0x178a30,_0x4416f3,_0x2efea5[_0xd5c458(0xf1)]);_0x272914&&_0x272914[_0xd5c458(0x104)]&&this['_threadCommentModel'][_0xd5c458(0xc5)](_0x178a30,_0x4416f3,_0x2efea5[_0xd5c458(0xf1)]);break;}case v[_0xd5c458(0xd1)]:{this[_0xd5c458(0xf5)]['updateComment'](_0x178a30,_0x4416f3,{'commentId':_0x2efea5[_0xd5c458(0xf1)],'text':JSON[_0xd5c458(0x10a)](_0x2efea5['content'])});break;}case v[_0xd5c458(0xaf)]:{const _0x3775f3=(_0x59b283=this[_0xd5c458(0xf5)]['getUnit'](_0x2efea5[_0xd5c458(0x106)])[_0xd5c458(0xae)](_0x156cd7=>_0x156cd7['threadId']===_0x2efea5[_0xd5c458(0xe4)]))==null?void 0x0:_0x59b283['root'];_0x3775f3&&this[_0xd5c458(0xf5)][_0xd5c458(0xea)](_0x178a30,_0x4416f3,_0x3775f3['id'],_0x2efea5[_0xd5c458(0xb1)]===I[_0xd5c458(0xdf)]);break;}}}));}};S=V([p(0x0,_0x4b2b1a(_0x2821d4)),p(0x1,_0x4b2b1a(_0x231289)),p(0x2,_0x4b2b1a(_0x3b0c80)),p(0x3,_0x4b2b1a(_0x2ec43c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3a55ee(0xb3)],Q=(_0x5ad039,_0x55f436,_0x4ac1ec,_0x5a5012)=>{const _0x36d1e5=_0x3a55ee;for(var _0x206aeb=_0x5a5012>0x1?void 0x0:_0x5a5012?k(_0x55f436,_0x4ac1ec):_0x55f436,_0xf95169=_0x5ad039[_0x36d1e5(0xcc)]-0x1,_0x38401c;_0xf95169>=0x0;_0xf95169--)(_0x38401c=_0x5ad039[_0xf95169])&&(_0x206aeb=_0x38401c(_0x206aeb)||_0x206aeb);return _0x206aeb;},_=(_0x17ffb8,_0x471152)=>(_0x2ae304,_0x5e0cbb)=>_0x471152(_0x2ae304,_0x5e0cbb,_0x17ffb8);function X(_0x33c00c,_0x4e4e3d){const _0x37f32c=_0x3a55ee,_0x26994a=_0x33c00c[_0x37f32c(0xa7)][0x0];return{..._0x4e4e3d,'id':_0x26994a['replyId'],'resolved':_0x33c00c[_0x37f32c(0xb1)]===0x1,'dT':D(_0x26994a[_0x37f32c(0xbe)]),'personId':_0x26994a[_0x37f32c(0xde)],'threadId':_0x26994a[_0x37f32c(0xe4)]};}function ee(_0x5f3952,_0x500c0a,_0x1fabee){const _0x4f42bb=_0x3a55ee;var _0x5b9359,_0x32a6a4;if(((_0x32a6a4=(_0x5b9359=_0x5f3952==null?void 0x0:_0x5f3952[_0x4f42bb(0xa7)])==null?void 0x0:_0x5b9359[_0x4f42bb(0xcc)])!=null?_0x32a6a4:0x0)>0x0){const _0x4b7d14=(_0x4a63d6,_0x4905e3)=>({'id':_0x4a63d6[_0x4f42bb(0xf1)],'threadId':_0x4a63d6[_0x4f42bb(0xe4)],'dT':D(_0x4a63d6[_0x4f42bb(0xbe)]),'personId':_0x4a63d6['userId'],'resolved':_0x5f3952[_0x4f42bb(0xb1)]===I[_0x4f42bb(0xdf)],'unitId':_0x500c0a,'subUnitId':_0x1fabee,'text':JSON['parse'](_0x4a63d6[_0x4f42bb(0xd3)]),'parentId':_0x4905e3}),_0x537631=_0x4b7d14(_0x5f3952[_0x4f42bb(0xa7)][0x0]);return{..._0x537631,'children':_0x5f3952[_0x4f42bb(0xa7)][_0x4f42bb(0xf6)](0x1)['map'](_0x4fca76=>_0x4b7d14(_0x4fca76,_0x537631['id']))};}return null;}let f=class{constructor(_0x222da,_0x2b677b,_0x2a0697,_0x40e0f0){const _0x910381=_0x3a55ee;this['_httpService']=_0x222da,this[_0x910381(0xa5)]=_0x2b677b,this[_0x910381(0xf9)]=_0x2a0697,this[_0x910381(0x109)]=_0x40e0f0;}async['addComment'](_0x4ca27e){const _0x2d4396=_0x3a55ee;var _0x51cd3,_0xe9d37f;const {parentId:_0xe323da,unitId:_0x87e5d4,text:_0x2e0cca,threadId:_0x14f919}=_0x4ca27e,_0x3babd5=(_0xe9d37f=(_0x51cd3=_0x2e0cca['customRanges'])==null?void 0x0:_0x51cd3[_0x2d4396(0x107)](_0x148469=>_0x148469[_0x2d4396(0xd9)]===_0x2f0881[_0x2d4396(0xf8)])[_0x2d4396(0xc9)](_0xa8b30=>_0xa8b30[_0x2d4396(0xd8)]))!=null?_0xe9d37f:[],_0x3ca602=JSON[_0x2d4396(0xb5)](_0x2e0cca),_0xd51a60=(await this['_sessionService'][_0x2d4396(0xee)](_0x87e5d4))[_0x2d4396(0xc8)]();if(_0xe323da){const _0x21d9bc={'memberId':_0xd51a60,'unitId':_0x87e5d4,'content':_0x3ca602,'mention':_0x3babd5,'threadId':_0x14f919},_0x8b407e=(await this[_0x2d4396(0xe7)]['post']('/universer-api/comment/unit/'+_0x87e5d4+_0x2d4396(0x10c),{'body':_0x21d9bc}))[_0x2d4396(0xb9)][_0x2d4396(0xc3)];return{..._0x4ca27e,'id':_0x8b407e[_0x2d4396(0xf1)],'dT':_0x13ae37(+_0x8b407e[_0x2d4396(0xbe)])[_0x2d4396(0xe6)](_0x2d4396(0xba)),'personId':_0x8b407e['userId']};}else{const _0x2491de={'memberId':_0xd51a60,'unitId':_0x87e5d4,'content':_0x3ca602,'mention':_0x3babd5},_0x189165=await this[_0x2d4396(0xe7)][_0x2d4396(0xf3)]('/universer-api/comment/unit/'+_0x87e5d4+_0x2d4396(0xab),{'body':_0x2491de});return X(_0x189165[_0x2d4396(0xb9)][_0x2d4396(0xcd)],_0x4ca27e);}}async[_0x3a55ee(0xbc)](_0x28c347){const _0x1fefcd=_0x3a55ee;var _0x4d8d94,_0x2f9fe9;const {text:_0x3b374c,unitId:_0x5a93dd}=_0x28c347,_0x549774=(_0x2f9fe9=(_0x4d8d94=_0x3b374c[_0x1fefcd(0xbb)])==null?void 0x0:_0x4d8d94[_0x1fefcd(0x107)](_0x3de24f=>_0x3de24f['rangeType']===_0x2f0881['COMMENT'])[_0x1fefcd(0xc9)](_0x43a857=>_0x43a857[_0x1fefcd(0xd8)]))!=null?_0x2f9fe9:[],_0x20591d=JSON['stringify'](_0x3b374c),_0x1ec467=_0x28c347[_0x1fefcd(0xe4)],_0x120b4c=_0x28c347['id'],_0x280da9={'memberId':(await this['_sessionService'][_0x1fefcd(0xee)](_0x5a93dd))[_0x1fefcd(0xc8)](),'unitId':_0x5a93dd,'threadId':_0x1ec467,'mention':_0x549774,'content':_0x20591d,'replyId':_0x120b4c},_0x448f0b=await this[_0x1fefcd(0xe7)]['post']('/universer-api/comment/unit/'+_0x5a93dd+'/edit',{'body':_0x280da9});return!_0x448f0b[_0x1fefcd(0xb9)][_0x1fefcd(0xfa)]||_0x448f0b[_0x1fefcd(0xb9)][_0x1fefcd(0xfa)][_0x1fefcd(0xbd)]===0x1;}async[_0x3a55ee(0xea)](_0x1fcc6f){const _0x74097b=_0x3a55ee,{unitId:_0x162463}=_0x1fcc6f,_0x2a4256=_0x1fcc6f[_0x74097b(0xe4)],_0x3288fb={'memberId':this[_0x74097b(0xa5)][_0x74097b(0xf2)]()[_0x74097b(0xd0)],'unitId':_0x162463,'threadId':_0x2a4256,'solved':_0x1fcc6f[_0x74097b(0xca)]?I['Solved']:I[_0x74097b(0xda)]},_0x4ee561=await this[_0x74097b(0xe7)][_0x74097b(0xf3)]('/universer-api/comment/unit/'+_0x162463+_0x74097b(0xac),{'body':_0x3288fb});return!_0x4ee561[_0x74097b(0xb9)][_0x74097b(0xfa)]||_0x4ee561[_0x74097b(0xb9)][_0x74097b(0xfa)][_0x74097b(0xbd)]===0x1;}async[_0x3a55ee(0xc5)](_0x252e10,_0x2f29bc,_0xdeed1a,_0x5853db){const _0x4a6a0f=_0x3a55ee,_0x497708={'memberId':(await this['_sessionService']['requireSession'](_0x252e10))[_0x4a6a0f(0xc8)](),'threadId':_0xdeed1a,'replyId':_0x5853db,'unitId':_0x252e10},_0x24c97c=await this['_httpService'][_0x4a6a0f(0xf3)](_0x4a6a0f(0xc2)+_0x252e10+_0x4a6a0f(0xdb),{'body':_0x497708});return!_0x24c97c[_0x4a6a0f(0xb9)][_0x4a6a0f(0xfa)]||_0x24c97c[_0x4a6a0f(0xb9)]['error'][_0x4a6a0f(0xbd)]===0x1;}async['listComments'](_0x322961,_0x5902db,_0x5866df){const _0x361771=_0x3a55ee,_0x172a56={'unitId':_0x322961,'threadId':_0x5866df},_0x441a0c=await this[_0x361771(0xe7)][_0x361771(0xf3)]('/universer-api/comment/unit/'+_0x322961+_0x361771(0xec),{'body':_0x172a56}),_0x3e9444=_0x5866df[_0x361771(0xc9)](_0x570467=>ee(_0x441a0c[_0x361771(0xb9)]['comments'][_0x570467],_0x322961,_0x5902db))['filter'](Boolean);return Object[_0x361771(0xc1)](_0x441a0c[_0x361771(0xb9)]['users'])['forEach'](_0x1d3319=>{const _0x26d109=_0x361771;this[_0x26d109(0xa5)]['addUser'](_0x1d3319);}),_0x3e9444;}[_0x3a55ee(0xa9)](_0x36221e){const _0x18f907=_0x3a55ee;return{'id':_0x36221e['id'],'threadId':_0x36221e[_0x18f907(0xe4)],'ref':_0x36221e['ref']};}};f=Q([_(0x0,_0x4b2b1a(_0x4597fd)),_(0x1,_0x4b2b1a(_0x3b0c80)),_(0x2,_0x4b2b1a(_0x494660)),_(0x3,_0x4b2b1a(_0x2ec43c))],f);var re=Object[_0x3a55ee(0xb3)],te=(_0x57976d,_0x18c24c,_0xe1cbad,_0x4bfbdd)=>{const _0x2efd6b=_0x3a55ee;for(var _0x45774a=_0x4bfbdd>0x1?void 0x0:_0x4bfbdd?re(_0x18c24c,_0xe1cbad):_0x18c24c,_0x4c1063=_0x57976d[_0x2efd6b(0xcc)]-0x1,_0x2aa92b;_0x4c1063>=0x0;_0x4c1063--)(_0x2aa92b=_0x57976d[_0x4c1063])&&(_0x45774a=_0x2aa92b(_0x45774a)||_0x45774a);return _0x45774a;},N=(_0x591303,_0x4dda89)=>(_0x2a413b,_0x573776)=>_0x4dda89(_0x2a413b,_0x573776,_0x591303);let g=class extends _0x49ba1d{constructor(_0x2a54db,_0x8ea6e0){const _0xffb47b=_0x3a55ee;super(),this['_threadCommentDataSourceService']=_0x2a54db,this[_0xffb47b(0xd4)]=_0x8ea6e0,this[_0xffb47b(0x102)]();}[_0x3a55ee(0x102)](){const _0x219f99=_0x3a55ee;this[_0x219f99(0xb8)][_0x219f99(0xc6)]=this[_0x219f99(0xd4)],this['_threadCommentDataSourceService'][_0x219f99(0x10b)]=!0x1;}};function _0x499e(){const _0x5d2241=['getUnit','replyId','getCurrentUser','post','root','_threadCommentModel','slice','150667PFfqTm','COMMENT','_sessionService','error','size','727465feRCBj','18VbEaBe','get','forEach','getComment','subscribe','_initDataSource','12ATprzn','parentId','UNRECOGNIZED','unitId','filter','addUser','_injector','parse','syncUpdateMutationToColla','/reply','symbol','_userService','user','replies','Reply','saveCommentToSnapshot','_init','/add','/solved','559672omStCP','find','Solve','defineProperty','solved','390sSvVXL','getOwnPropertyDescriptor','users','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Unknown','_threadCommentDataSourceService','body','YYYY/MM/DD\x20HH:mm','customRanges','updateComment','code','createTimestamp','commentUpdate$','_commentService','values','/universer-api/comment/unit/','reply','setConfig','deleteComment','dataSource','disposeWithMe','getMemberID','map','resolved','Add','length','comment','_configService','4133080JRHTrJ','userID','Edit','getUser','content','_threadCommentDataSource','type','pipe','2tzhIZR','rangeId','rangeType','OpenOrReOpen','/delete','2164BaiXDA','pluginName','userId','Solved','8536584uMJsJb','4110ZlBYdh','payload','Delete','threadId','add','format','_httpService','onReady','3536664QchBbV','resolveComment','_config','/list','_initUserSync','requireSession','UNIVER_UNKNOWN'];_0x499e=function(){return _0x5d2241;};return _0x499e();}g=te([N(0x0,_0x160153),N(0x1,_0x4b2b1a(f))],g);var se=Object[_0x3a55ee(0xb0)],oe=Object[_0x3a55ee(0xb3)],ne=(_0xe5ae43,_0x55c28e,_0x29e9c4)=>_0x55c28e in _0xe5ae43?se(_0xe5ae43,_0x55c28e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29e9c4}):_0xe5ae43[_0x55c28e]=_0x29e9c4,ie=(_0x29f749,_0x34facd,_0x4b7e7c,_0x5daae9)=>{const _0x23818b=_0x3a55ee;for(var _0x190753=_0x5daae9>0x1?void 0x0:_0x5daae9?oe(_0x34facd,_0x4b7e7c):_0x34facd,_0x527df3=_0x29f749[_0x23818b(0xcc)]-0x1,_0x3bdab0;_0x527df3>=0x0;_0x527df3--)(_0x3bdab0=_0x29f749[_0x527df3])&&(_0x190753=_0x3bdab0(_0x190753)||_0x190753);return _0x190753;},w=(_0x8a5d23,_0x36ac88)=>(_0x59e5cf,_0x1b3067)=>_0x36ac88(_0x59e5cf,_0x1b3067,_0x8a5d23),$=(_0x153ae5,_0x364a3c,_0x46e83c)=>ne(_0x153ae5,typeof _0x364a3c!=_0x3a55ee(0x10d)?_0x364a3c+'':_0x364a3c,_0x46e83c);let b=class extends _0x1948c2{constructor(_0x446890=M,_0x904863,_0x5c959e){const _0x4c085e=_0x3a55ee;super(),this['_config']=_0x446890,this[_0x4c085e(0x109)]=_0x904863,this[_0x4c085e(0xce)]=_0x5c959e;const {..._0x5df44c}=_0x5e1ed8({},M,this[_0x4c085e(0xeb)]);this[_0x4c085e(0xce)][_0x4c085e(0xc4)](z,_0x5df44c);}['onStarting'](){[[f],[g],[S]]['forEach'](_0xdd4521=>{const _0x11337=_0x498a;this['_injector'][_0x11337(0xe5)](_0xdd4521);});}[_0x3a55ee(0xe8)](){const _0x36cc87=_0x3a55ee;this[_0x36cc87(0x109)][_0x36cc87(0xfe)](g),this['_injector'][_0x36cc87(0xfe)](S);}};$(b,_0x3a55ee(0xdd),W),$(b,_0x3a55ee(0xd5),_0x13d7fd[_0x3a55ee(0xef)]),b=ie([_0xc2b821(_0x4d6c0a,_0xec1e5b,_0x38dfbc),w(0x1,_0x4b2b1a(_0x2ec43c)),w(0x2,_0x30a2d6)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x23fa6f=_0x50e2;(function(_0x34d748,_0x3b8ba5){const _0x26f94b=_0x50e2,_0x16dbaf=_0x34d748();while(!![]){try{const _0x3c29d6=parseInt(_0x26f94b(0x143))/0x1+parseInt(_0x26f94b(0x18f))/0x2+-parseInt(_0x26f94b(0x151))/0x3+-parseInt(_0x26f94b(0x132))/0x4+parseInt(_0x26f94b(0x159))/0x5+-parseInt(_0x26f94b(0x185))/0x6*(-parseInt(_0x26f94b(0x14a))/0x7)+parseInt(_0x26f94b(0x169))/0x8*(parseInt(_0x26f94b(0x173))/0x9);if(_0x3c29d6===_0x3b8ba5)break;else _0x16dbaf['push'](_0x16dbaf['shift']());}catch(_0x4b36c2){_0x16dbaf['push'](_0x16dbaf['shift']());}}}(_0x232d,0x587c4));import{CommentService as _0x20a661,CollaborationSessionService as _0xea13e3,UniverCollaborationClientPlugin as _0x3dcb68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1dbdb7}from'@univerjs-pro/license';import{dayjs as _0x3a9660,UserManagerService as _0x469b81,Inject as _0x3c5570,Injector as _0x375bf6,Disposable as _0x34d19b,CustomRangeType as _0x445314,UniverInstanceType as _0x43fc88,DependentOn as _0x1e041b,IConfigService as _0x1e8b56,Plugin as _0x9156f8,merge as _0x110a0b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b0210}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5f0ff,IThreadCommentDataSourceService as _0x2ecb1d}from'@univerjs/thread-comment';import{bufferTime as _0x5b8e83}from'rxjs';import{HTTPService as _0x46056e}from'@univerjs/network';const W=_0x23fa6f(0x166);var I=(_0x48f0cc=>(_0x48f0cc[_0x48f0cc[_0x23fa6f(0x158)]=0x0]=_0x23fa6f(0x158),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x137)]=0x1]=_0x23fa6f(0x137),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x48f0cc))(I||{}),v=(_0x2822d8=>(_0x2822d8[_0x2822d8[_0x23fa6f(0x188)]=0x0]=_0x23fa6f(0x188),_0x2822d8[_0x2822d8['Add']=0x1]='Add',_0x2822d8[_0x2822d8[_0x23fa6f(0x156)]=0x2]='Reply',_0x2822d8[_0x2822d8['Edit']=0x3]='Edit',_0x2822d8[_0x2822d8[_0x23fa6f(0x13d)]=0x4]=_0x23fa6f(0x13d),_0x2822d8[_0x2822d8[_0x23fa6f(0x177)]=0x5]=_0x23fa6f(0x177),_0x2822d8[_0x2822d8[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x2822d8))(v||{});const D=_0x57489c=>_0x3a9660(new Date(+_0x57489c))[_0x23fa6f(0x17f)](_0x23fa6f(0x15e)),B=async(_0x1dd44f,_0x40b698)=>{const _0x7afd01=_0x23fa6f,_0x238c72=_0x1dd44f[_0x7afd01(0x13b)](_0x469b81),_0x315977=_0x1dd44f['get'](_0x46056e);_0x40b698['forEach'](_0x53849b=>{const _0x57666f=_0x7afd01;_0x238c72[_0x57666f(0x164)](_0x53849b)&&_0x40b698[_0x57666f(0x16e)](_0x53849b);}),_0x40b698[_0x7afd01(0x14e)]&&(await _0x315977[_0x7afd01(0x13b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40b698]}}))['body'][_0x7afd01(0x18c)][_0x7afd01(0x193)](_0x2c6970=>{const _0x32f084=_0x7afd01;_0x2c6970&&_0x238c72[_0x32f084(0x138)](_0x2c6970);});};var K=Object[_0x23fa6f(0x191)],V=(_0x240725,_0x301fe1,_0x7f5cca,_0x6aa73)=>{for(var _0x230780=_0x6aa73>0x1?void 0x0:_0x6aa73?K(_0x301fe1,_0x7f5cca):_0x301fe1,_0x2a8a03=_0x240725['length']-0x1,_0x17b4a7;_0x2a8a03>=0x0;_0x2a8a03--)(_0x17b4a7=_0x240725[_0x2a8a03])&&(_0x230780=_0x17b4a7(_0x230780)||_0x230780);return _0x230780;},p=(_0x538cbd,_0x7bae1)=>(_0xa0f7c1,_0x563fe3)=>_0x7bae1(_0xa0f7c1,_0x563fe3,_0x538cbd);let S=class extends _0x34d19b{constructor(_0x6cc892,_0x16fee6,_0x4db590,_0x23de98){const _0x3ffb7d=_0x23fa6f;super(),this[_0x3ffb7d(0x14d)]=_0x6cc892,this['_threadCommentModel']=_0x16fee6,this['_userService']=_0x4db590,this['_injector']=_0x23de98,this['_init'](),this[_0x3ffb7d(0x181)]();}['_initUserSync'](){const _0x19eeb0=_0x23fa6f;this[_0x19eeb0(0x14b)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x5b8e83(0x10))[_0x19eeb0(0x135)](_0x3b37b8=>{const _0x282ad1=_0x19eeb0,_0x582357=new Set();_0x3b37b8[_0x282ad1(0x193)](_0x514d50=>{const _0x328e3f=_0x282ad1;switch(_0x514d50[_0x328e3f(0x178)]){case _0x328e3f(0x170):{const _0x1e96c4=_0x514d50[_0x328e3f(0x13e)][_0x328e3f(0x144)];_0x582357['add'](_0x1e96c4);break;}}}),B(this[_0x282ad1(0x140)],_0x582357);}));}['_init'](){const _0x33ec78=_0x23fa6f;this[_0x33ec78(0x14b)](this['_commentService'][_0x33ec78(0x134)][_0x33ec78(0x135)](async _0x2ef939=>{const _0xcfd235=_0x33ec78;var _0x52fc42,_0x55b9ab,_0x18afa9,_0x2f5a17;const _0x58bbe5=(_0x52fc42=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939['unitId'])[_0xcfd235(0x183)](_0x31f112=>_0x31f112[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x52fc42[_0xcfd235(0x17d)];if(!_0x58bbe5)return;const {unitId:_0x468376,subUnitId:_0x48c59b}=_0x58bbe5;switch(_0x2ef939[_0xcfd235(0x155)]&&this['_userService'][_0xcfd235(0x138)](_0x2ef939[_0xcfd235(0x155)]),_0x2ef939[_0xcfd235(0x178)]){case v[_0xcfd235(0x17b)]:break;case v['Reply']:{this[_0xcfd235(0x18d)][_0xcfd235(0x162)](_0x468376,_0x48c59b,{'unitId':_0x468376,'subUnitId':_0x48c59b,'ref':'','id':_0x2ef939[_0xcfd235(0x194)],'dT':D(+_0x2ef939[_0xcfd235(0x13a)]),'threadId':_0x2ef939['threadId'],'personId':(_0x18afa9=(_0x55b9ab=_0x2ef939[_0xcfd235(0x155)])==null?void 0x0:_0x55b9ab[_0xcfd235(0x184)])!=null?_0x18afa9:_0x2ef939[_0xcfd235(0x172)],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)]),'parentId':_0x58bbe5['id']});break;}case v['Delete']:{const _0x49e090=this['_threadCommentModel'][_0xcfd235(0x14f)](_0x468376,_0x48c59b,_0x2ef939[_0xcfd235(0x194)]);_0x49e090&&_0x49e090[_0xcfd235(0x196)]&&this[_0xcfd235(0x18d)][_0xcfd235(0x175)](_0x468376,_0x48c59b,_0x2ef939['replyId']);break;}case v[_0xcfd235(0x131)]:{this[_0xcfd235(0x18d)][_0xcfd235(0x163)](_0x468376,_0x48c59b,{'commentId':_0x2ef939['replyId'],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)])});break;}case v['Solve']:{const _0x9465d2=(_0x2f5a17=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939[_0xcfd235(0x152)])[_0xcfd235(0x183)](_0x55bd72=>_0x55bd72[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x2f5a17[_0xcfd235(0x17d)];_0x9465d2&&this['_threadCommentModel'][_0xcfd235(0x150)](_0x468376,_0x48c59b,_0x9465d2['id'],_0x2ef939['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c5570(_0x20a661)),p(0x1,_0x3c5570(_0x5f0ff)),p(0x2,_0x3c5570(_0x469b81)),p(0x3,_0x3c5570(_0x375bf6))],S);const z=_0x23fa6f(0x16c),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x82b03f,_0x4b6cee,_0x499727,_0x5f1d63)=>{for(var _0x1e114d=_0x5f1d63>0x1?void 0x0:_0x5f1d63?k(_0x4b6cee,_0x499727):_0x4b6cee,_0x3d66e0=_0x82b03f['length']-0x1,_0x467409;_0x3d66e0>=0x0;_0x3d66e0--)(_0x467409=_0x82b03f[_0x3d66e0])&&(_0x1e114d=_0x467409(_0x1e114d)||_0x1e114d);return _0x1e114d;},_=(_0x2ca03f,_0x153acf)=>(_0x988932,_0x25f323)=>_0x153acf(_0x988932,_0x25f323,_0x2ca03f);function X(_0x88b89b,_0x19ffdd){const _0x2ab970=_0x23fa6f,_0x7fee40=_0x88b89b[_0x2ab970(0x15a)][0x0];return{..._0x19ffdd,'id':_0x7fee40[_0x2ab970(0x194)],'resolved':_0x88b89b['solved']===0x1,'dT':D(_0x7fee40[_0x2ab970(0x13a)]),'personId':_0x7fee40[_0x2ab970(0x172)],'threadId':_0x7fee40[_0x2ab970(0x149)]};}function ee(_0x1f58a7,_0x149fdf,_0x153be4){const _0x24b445=_0x23fa6f;var _0x45511a,_0x445262;if(((_0x445262=(_0x45511a=_0x1f58a7==null?void 0x0:_0x1f58a7[_0x24b445(0x15a)])==null?void 0x0:_0x45511a[_0x24b445(0x182)])!=null?_0x445262:0x0)>0x0){const _0xca0303=(_0x48a89e,_0x2e9b24)=>({'id':_0x48a89e[_0x24b445(0x194)],'threadId':_0x48a89e[_0x24b445(0x149)],'dT':D(_0x48a89e['createTimestamp']),'personId':_0x48a89e['userId'],'resolved':_0x1f58a7[_0x24b445(0x15c)]===I[_0x24b445(0x137)],'unitId':_0x149fdf,'subUnitId':_0x153be4,'text':JSON[_0x24b445(0x17a)](_0x48a89e[_0x24b445(0x157)]),'parentId':_0x2e9b24}),_0x45d7e5=_0xca0303(_0x1f58a7[_0x24b445(0x15a)][0x0]);return{..._0x45d7e5,'children':_0x1f58a7[_0x24b445(0x15a)][_0x24b445(0x165)](0x1)[_0x24b445(0x141)](_0x3ded48=>_0xca0303(_0x3ded48,_0x45d7e5['id']))};}return null;}let f=class{constructor(_0x59501d,_0x3353d5,_0x31333c,_0x2b0455){const _0x176980=_0x23fa6f;this[_0x176980(0x16b)]=_0x59501d,this[_0x176980(0x139)]=_0x3353d5,this['_sessionService']=_0x31333c,this[_0x176980(0x140)]=_0x2b0455;}async['addComment'](_0x3369af){const _0x4dfc58=_0x23fa6f;var _0x1f7b0f,_0xdb71e2;const {parentId:_0x1f6c5d,unitId:_0x141d05,text:_0x14ea23,threadId:_0x4de648}=_0x3369af,_0xc577b4=(_0xdb71e2=(_0x1f7b0f=_0x14ea23['customRanges'])==null?void 0x0:_0x1f7b0f[_0x4dfc58(0x13c)](_0x682a48=>_0x682a48[_0x4dfc58(0x154)]===_0x445314[_0x4dfc58(0x15f)])[_0x4dfc58(0x141)](_0x43ddbc=>_0x43ddbc[_0x4dfc58(0x195)]))!=null?_0xdb71e2:[],_0x83fa7b=JSON[_0x4dfc58(0x192)](_0x14ea23),_0x492dcc=(await this[_0x4dfc58(0x186)][_0x4dfc58(0x18a)](_0x141d05))[_0x4dfc58(0x179)]();if(_0x1f6c5d){const _0x55cf12={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4,'threadId':_0x4de648},_0x569c35=(await this['_httpService'][_0x4dfc58(0x133)]('/universer-api/comment/unit/'+_0x141d05+_0x4dfc58(0x17c),{'body':_0x55cf12}))[_0x4dfc58(0x148)]['reply'];return{..._0x3369af,'id':_0x569c35['replyId'],'dT':_0x3a9660(+_0x569c35[_0x4dfc58(0x13a)])[_0x4dfc58(0x17f)](_0x4dfc58(0x15e)),'personId':_0x569c35[_0x4dfc58(0x172)]};}else{const _0x339d43={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4},_0x36639c=await this[_0x4dfc58(0x16b)]['post'](_0x4dfc58(0x146)+_0x141d05+_0x4dfc58(0x190),{'body':_0x339d43});return X(_0x36639c['body'][_0x4dfc58(0x136)],_0x3369af);}}async['updateComment'](_0x2272bb){const _0x4a829a=_0x23fa6f;var _0x4ed306,_0x33f969;const {text:_0x3bff7c,unitId:_0xaa685e}=_0x2272bb,_0x1ef3a8=(_0x33f969=(_0x4ed306=_0x3bff7c[_0x4a829a(0x16f)])==null?void 0x0:_0x4ed306[_0x4a829a(0x13c)](_0x505a42=>_0x505a42[_0x4a829a(0x154)]===_0x445314[_0x4a829a(0x15f)])[_0x4a829a(0x141)](_0xd5023c=>_0xd5023c[_0x4a829a(0x195)]))!=null?_0x33f969:[],_0x495eec=JSON[_0x4a829a(0x192)](_0x3bff7c),_0x396c5d=_0x2272bb[_0x4a829a(0x149)],_0x2dbfc2=_0x2272bb['id'],_0x42711a={'memberId':(await this[_0x4a829a(0x186)][_0x4a829a(0x18a)](_0xaa685e))[_0x4a829a(0x179)](),'unitId':_0xaa685e,'threadId':_0x396c5d,'mention':_0x1ef3a8,'content':_0x495eec,'replyId':_0x2dbfc2},_0x228803=await this[_0x4a829a(0x16b)]['post'](_0x4a829a(0x146)+_0xaa685e+_0x4a829a(0x153),{'body':_0x42711a});return!_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)]||_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)][_0x4a829a(0x187)]===0x1;}async[_0x23fa6f(0x150)](_0x3a102e){const _0x893dad=_0x23fa6f,{unitId:_0x1a4ee8}=_0x3a102e,_0x52948d=_0x3a102e[_0x893dad(0x149)],_0x315da6={'memberId':this[_0x893dad(0x139)][_0x893dad(0x168)]()[_0x893dad(0x184)],'unitId':_0x1a4ee8,'threadId':_0x52948d,'solved':_0x3a102e[_0x893dad(0x180)]?I['Solved']:I[_0x893dad(0x158)]},_0x5daa18=await this[_0x893dad(0x16b)][_0x893dad(0x133)](_0x893dad(0x146)+_0x1a4ee8+'/solved',{'body':_0x315da6});return!_0x5daa18[_0x893dad(0x148)][_0x893dad(0x13f)]||_0x5daa18['body'][_0x893dad(0x13f)]['code']===0x1;}async[_0x23fa6f(0x175)](_0x492fbe,_0x20aa2b,_0x47dc38,_0x43ed9a){const _0x338c77=_0x23fa6f,_0x37979b={'memberId':(await this[_0x338c77(0x186)][_0x338c77(0x18a)](_0x492fbe))[_0x338c77(0x179)](),'threadId':_0x47dc38,'replyId':_0x43ed9a,'unitId':_0x492fbe},_0x2a8e9b=await this[_0x338c77(0x16b)]['post'](_0x338c77(0x146)+_0x492fbe+_0x338c77(0x161),{'body':_0x37979b});return!_0x2a8e9b[_0x338c77(0x148)][_0x338c77(0x13f)]||_0x2a8e9b['body'][_0x338c77(0x13f)]['code']===0x1;}async[_0x23fa6f(0x160)](_0x45031e,_0x5a6ec3,_0x31447f){const _0x1baba2=_0x23fa6f,_0x14c29c={'unitId':_0x45031e,'threadId':_0x31447f},_0x49cb52=await this[_0x1baba2(0x16b)]['post'](_0x1baba2(0x146)+_0x45031e+_0x1baba2(0x189),{'body':_0x14c29c}),_0x2b2ae0=_0x31447f['map'](_0x43a8dc=>ee(_0x49cb52[_0x1baba2(0x148)]['comments'][_0x43a8dc],_0x45031e,_0x5a6ec3))['filter'](Boolean);return Object[_0x1baba2(0x18b)](_0x49cb52[_0x1baba2(0x148)]['users'])[_0x1baba2(0x193)](_0x446848=>{const _0x2db9d7=_0x1baba2;this[_0x2db9d7(0x139)][_0x2db9d7(0x138)](_0x446848);}),_0x2b2ae0;}[_0x23fa6f(0x16a)](_0x5b137d){const _0x42a704=_0x23fa6f;return{'id':_0x5b137d['id'],'threadId':_0x5b137d[_0x42a704(0x149)],'ref':_0x5b137d[_0x42a704(0x17e)]};}};f=Q([_(0x0,_0x3c5570(_0x46056e)),_(0x1,_0x3c5570(_0x469b81)),_(0x2,_0x3c5570(_0xea13e3)),_(0x3,_0x3c5570(_0x375bf6))],f);function _0x232d(){const _0x2cb19f=['UNRECOGNIZED','userId','81fieKZb','_config','deleteComment','_initDataSource','Solve','type','getMemberID','parse','Add','/reply','root','ref','format','resolved','_initUserSync','length','find','userID','1063266tWPabu','_sessionService','code','Unknown','/list','requireSession','values','users','_threadCommentModel','syncUpdateMutationToColla','207964FpCeoe','/add','getOwnPropertyDescriptor','stringify','forEach','replyId','rangeId','parentId','Edit','2124856atNMAs','post','commentUpdate$','subscribe','comment','Solved','addUser','_userService','createTimestamp','get','filter','Delete','payload','error','_injector','map','UNIVER_UNKNOWN','305756dYqwOB','personId','onStarting','/universer-api/comment/unit/','_configService','body','threadId','7WQHcox','disposeWithMe','defineProperty','_commentService','size','getComment','resolveComment','2131896lnGvoZ','unitId','/edit','rangeType','user','Reply','content','OpenOrReOpen','1998990evNXKx','replies','symbol','solved','_threadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','COMMENT','listComments','/delete','addComment','updateComment','getUser','slice','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pluginName','getCurrentUser','548920WTNLwF','saveCommentToSnapshot','_httpService','thread-comment-data-source.config','getUnit','delete','customRanges','add'];_0x232d=function(){return _0x2cb19f;};return _0x232d();}var re=Object['getOwnPropertyDescriptor'],te=(_0x4cdb3b,_0x5c6053,_0x306b0a,_0x11af14)=>{const _0xd59cd6=_0x23fa6f;for(var _0x4f0cb9=_0x11af14>0x1?void 0x0:_0x11af14?re(_0x5c6053,_0x306b0a):_0x5c6053,_0x27f433=_0x4cdb3b[_0xd59cd6(0x182)]-0x1,_0x228e1d;_0x27f433>=0x0;_0x27f433--)(_0x228e1d=_0x4cdb3b[_0x27f433])&&(_0x4f0cb9=_0x228e1d(_0x4f0cb9)||_0x4f0cb9);return _0x4f0cb9;},N=(_0x4b1047,_0x40107a)=>(_0x4df5fc,_0x3bbf7b)=>_0x40107a(_0x4df5fc,_0x3bbf7b,_0x4b1047);let g=class extends _0x34d19b{constructor(_0x3a2768,_0x29ad6b){const _0x159e26=_0x23fa6f;super(),this['_threadCommentDataSourceService']=_0x3a2768,this['_threadCommentDataSource']=_0x29ad6b,this[_0x159e26(0x176)]();}[_0x23fa6f(0x176)](){const _0x64a5cc=_0x23fa6f;this[_0x64a5cc(0x15d)]['dataSource']=this['_threadCommentDataSource'],this[_0x64a5cc(0x15d)][_0x64a5cc(0x18e)]=!0x1;}};function _0x50e2(_0x767746,_0x4ac769){const _0x232d80=_0x232d();return _0x50e2=function(_0x50e299,_0x5ddb01){_0x50e299=_0x50e299-0x131;let _0x470b70=_0x232d80[_0x50e299];return _0x470b70;},_0x50e2(_0x767746,_0x4ac769);}g=te([N(0x0,_0x2ecb1d),N(0x1,_0x3c5570(f))],g);var se=Object[_0x23fa6f(0x14c)],oe=Object[_0x23fa6f(0x191)],ne=(_0x467322,_0x45c742,_0x1aff4f)=>_0x45c742 in _0x467322?se(_0x467322,_0x45c742,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1aff4f}):_0x467322[_0x45c742]=_0x1aff4f,ie=(_0x3fff74,_0x8420e7,_0x267e03,_0x3404c7)=>{const _0x199b92=_0x23fa6f;for(var _0x538b59=_0x3404c7>0x1?void 0x0:_0x3404c7?oe(_0x8420e7,_0x267e03):_0x8420e7,_0x23f855=_0x3fff74[_0x199b92(0x182)]-0x1,_0x2c5833;_0x23f855>=0x0;_0x23f855--)(_0x2c5833=_0x3fff74[_0x23f855])&&(_0x538b59=_0x2c5833(_0x538b59)||_0x538b59);return _0x538b59;},w=(_0x40970d,_0x4c0f04)=>(_0x30f643,_0x376f4d)=>_0x4c0f04(_0x30f643,_0x376f4d,_0x40970d),$=(_0x33098c,_0x2bf3a0,_0x1592f6)=>ne(_0x33098c,typeof _0x2bf3a0!=_0x23fa6f(0x15b)?_0x2bf3a0+'':_0x2bf3a0,_0x1592f6);let b=class extends _0x9156f8{constructor(_0x4d938c=M,_0x49d268,_0x4636dc){const _0x1bba38=_0x23fa6f;super(),this[_0x1bba38(0x174)]=_0x4d938c,this[_0x1bba38(0x140)]=_0x49d268,this[_0x1bba38(0x147)]=_0x4636dc;const {..._0x3cd3b9}=_0x110a0b({},M,this[_0x1bba38(0x174)]);this['_configService']['setConfig'](z,_0x3cd3b9);}[_0x23fa6f(0x145)](){const _0x50f6a0=_0x23fa6f;[[f],[g],[S]][_0x50f6a0(0x193)](_0x2ea6bc=>{const _0x4837c2=_0x50f6a0;this['_injector'][_0x4837c2(0x170)](_0x2ea6bc);});}['onReady'](){const _0x1fc511=_0x23fa6f;this[_0x1fc511(0x140)][_0x1fc511(0x13b)](g),this[_0x1fc511(0x140)][_0x1fc511(0x13b)](S);}};$(b,_0x23fa6f(0x167),W),$(b,_0x23fa6f(0x178),_0x43fc88[_0x23fa6f(0x142)]),b=ie([_0x1e041b(_0x4b0210,_0x3dcb68,_0x1dbdb7),w(0x1,_0x3c5570(_0x375bf6)),w(0x2,_0x1e8b56)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2d07(_0x4c384c,_0x5109be){const _0x37c8a5=_0x37c8();return _0x2d07=function(_0x2d0764,_0x4ab608){_0x2d0764=_0x2d0764-0x133;let _0x3ac26a=_0x37c8a5[_0x2d0764];return _0x3ac26a;},_0x2d07(_0x4c384c,_0x5109be);}function _0x37c8(){const _0x20b7d4=['91038fNRolD','solved','parse','UniverProCollaborationClient','getUser','root','/add','body','_threadCommentDataSourceService','dayjs','delete','updateComment','function','getMemberID','amd','@univerjs/thread-comment','@univerjs-pro/collaboration-client','Injector','UniverCollaborationClientPlugin','get','UniverThreadCommentUIPlugin','HTTPService','onStarting','UniverLicensePlugin','1197375TEQbtl','DependentOn','commentUpdate$','resolveComment','listComments','payload','content','user','6646800lCChVM','_initUserSync','Inject','exports','filter','subscribe','_configService','UniverThreadCommentUi','_initDataSource','find','rangeType','createTimestamp','stringify','add','thread-comment-data-source.config','rangeId','_init','code','pipe','_commentService','post','IConfigService','UniverProLicense','Unknown','comment','@univerjs/core','357428ahXTjw','@univerjs/thread-comment-ui','/universer-api/comment/unit/','resolved','Plugin','reply','getOwnPropertyDescriptor','OpenOrReOpen','Solve','dataSource','userID','Delete','type','getComment','parentId','ThreadCommentModel','UNRECOGNIZED','CollaborationSessionService','customRanges','COMMENT','forEach','Reply','@univerjs-pro/license','getCurrentUser','_threadCommentDataSource','threadId','_sessionService','2176374pjVTDu','UserManagerService','CustomRangeType','userId','4855585uWvEEi','Add','users','ref','/reply','syncUpdateMutationToColla','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CommentService','disposeWithMe','replyId','pluginName','_userService','map','/universer-api/user/list','merge','2609680vbacOH','UniverThreadCommentDataSourcePlugin','length','@univerjs/network','_threadCommentModel','personId','Disposable','addComment','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','requireSession','_config','error','_injector','object','values','saveCommentToSnapshot','rxjs','replies','unitId','Edit','setConfig','Solved','427VzKmMT','getUnit','_httpService','format'];_0x37c8=function(){return _0x20b7d4;};return _0x37c8();}(function(_0x2ae4fa,_0x2aa6e0){const _0x25b056=_0x2d07,_0x2f0b09=_0x2ae4fa();while(!![]){try{const _0x30a4f7=parseInt(_0x25b056(0x1a8))/0x1+-parseInt(_0x25b056(0x147))/0x2+-parseInt(_0x25b056(0x162))/0x3+-parseInt(_0x25b056(0x175))/0x4+parseInt(_0x25b056(0x166))/0x5+-parseInt(_0x25b056(0x190))/0x6*(-parseInt(_0x25b056(0x18c))/0x7)+-parseInt(_0x25b056(0x1b0))/0x8;if(_0x30a4f7===_0x2aa6e0)break;else _0x2f0b09['push'](_0x2f0b09['shift']());}catch(_0x506a4e){_0x2f0b09['push'](_0x2f0b09['shift']());}}}(_0x37c8,0xac82b),function(_0x137b4f,_0x561945){const _0x2187db=_0x2d07;typeof exports==_0x2187db(0x183)&&typeof module<'u'?_0x561945(exports,require(_0x2187db(0x1a0)),require(_0x2187db(0x15d)),require('@univerjs/core'),require(_0x2187db(0x148)),require(_0x2187db(0x19f)),require(_0x2187db(0x186)),require(_0x2187db(0x178))):typeof define==_0x2187db(0x19c)&&define[_0x2187db(0x19e)]?define([_0x2187db(0x1b3),_0x2187db(0x1a0),_0x2187db(0x15d),_0x2187db(0x146),'@univerjs/thread-comment-ui',_0x2187db(0x19f),_0x2187db(0x186),_0x2187db(0x178)],_0x561945):(_0x137b4f=typeof globalThis<'u'?globalThis:_0x137b4f||self,_0x561945(_0x137b4f[_0x2187db(0x17d)]={},_0x137b4f[_0x2187db(0x193)],_0x137b4f[_0x2187db(0x143)],_0x137b4f['UniverCore'],_0x137b4f[_0x2187db(0x134)],_0x137b4f['UniverThreadComment'],_0x137b4f[_0x2187db(0x186)],_0x137b4f['UniverNetwork']));}(this,function(_0x5744d5,_0x3eaf89,_0x25a51d,_0x31c190,_0x213a6d,_0x27b2b8,_0x15e188,_0x5d9160){'use strict';const _0x140dba=_0x2d07;const _0x319d14=_0x140dba(0x16c);var _0x5f590d=(_0x546fdf=>(_0x546fdf[_0x546fdf['OpenOrReOpen']=0x0]=_0x140dba(0x14e),_0x546fdf[_0x546fdf[_0x140dba(0x18b)]=0x1]=_0x140dba(0x18b),_0x546fdf[_0x546fdf[_0x140dba(0x157)]=-0x1]='UNRECOGNIZED',_0x546fdf))(_0x5f590d||{}),_0x5507d2=(_0x32e53a=>(_0x32e53a[_0x32e53a['Unknown']=0x0]=_0x140dba(0x144),_0x32e53a[_0x32e53a[_0x140dba(0x167)]=0x1]=_0x140dba(0x167),_0x32e53a[_0x32e53a[_0x140dba(0x15c)]=0x2]=_0x140dba(0x15c),_0x32e53a[_0x32e53a['Edit']=0x3]=_0x140dba(0x189),_0x32e53a[_0x32e53a[_0x140dba(0x152)]=0x4]=_0x140dba(0x152),_0x32e53a[_0x32e53a['Solve']=0x5]='Solve',_0x32e53a[_0x32e53a[_0x140dba(0x157)]=-0x1]='UNRECOGNIZED',_0x32e53a))(_0x5507d2||{});const _0x371f6d=_0x5e58cf=>_0x31c190[_0x140dba(0x199)](new Date(+_0x5e58cf))[_0x140dba(0x18f)](_0x140dba(0x17e)),_0x52b61b=async(_0x5aeda9,_0xb47cf3)=>{const _0x4da284=_0x140dba,_0x495400=_0x5aeda9['get'](_0x31c190[_0x4da284(0x163)]),_0xcbc250=_0x5aeda9['get'](_0x5d9160[_0x4da284(0x1a5)]);_0xb47cf3[_0x4da284(0x15b)](_0x47b580=>{const _0x2ed86a=_0x4da284;_0x495400[_0x2ed86a(0x194)](_0x47b580)&&_0xb47cf3[_0x2ed86a(0x19a)](_0x47b580);}),_0xb47cf3['size']&&(await _0xcbc250[_0x4da284(0x1a3)](_0x4da284(0x173),{'params':{'userIDs':[..._0xb47cf3]}}))[_0x4da284(0x197)]['users'][_0x4da284(0x15b)](_0x77e75c=>{_0x77e75c&&_0x495400['addUser'](_0x77e75c);});};var _0x1276be=Object['getOwnPropertyDescriptor'],_0x2640c1=(_0x23bd6d,_0x4cd3f9,_0x3da1de,_0x1ad65e)=>{const _0xa94ae7=_0x140dba;for(var _0x1f6bed=_0x1ad65e>0x1?void 0x0:_0x1ad65e?_0x1276be(_0x4cd3f9,_0x3da1de):_0x4cd3f9,_0x5f0e95=_0x23bd6d[_0xa94ae7(0x177)]-0x1,_0x545770;_0x5f0e95>=0x0;_0x5f0e95--)(_0x545770=_0x23bd6d[_0x5f0e95])&&(_0x1f6bed=_0x545770(_0x1f6bed)||_0x1f6bed);return _0x1f6bed;},_0x3fabe2=(_0x132f6d,_0x5ad121)=>(_0xca686e,_0x4439d8)=>_0x5ad121(_0xca686e,_0x4439d8,_0x132f6d);let _0x52e12f=class extends _0x31c190[_0x140dba(0x17b)]{constructor(_0x2f465e,_0x48e096,_0x971557,_0x5ee8c7){const _0x36b8cb=_0x140dba;super(),this[_0x36b8cb(0x140)]=_0x2f465e,this['_threadCommentModel']=_0x48e096,this[_0x36b8cb(0x171)]=_0x971557,this['_injector']=_0x5ee8c7,this['_init'](),this[_0x36b8cb(0x1b1)]();}[_0x140dba(0x1b1)](){const _0x50feb3=_0x140dba;this[_0x50feb3(0x16e)](this['_threadCommentModel']['commentUpdate$'][_0x50feb3(0x13f)](_0x15e188['bufferTime'](0x10))[_0x50feb3(0x1b5)](_0xc512c0=>{const _0x251578=_0x50feb3,_0x2f46da=new Set();_0xc512c0[_0x251578(0x15b)](_0x141f16=>{const _0x302f46=_0x251578;switch(_0x141f16[_0x302f46(0x153)]){case'add':{const _0x1ddfd1=_0x141f16[_0x302f46(0x1ad)][_0x302f46(0x17a)];_0x2f46da['add'](_0x1ddfd1);break;}}}),_0x52b61b(this[_0x251578(0x182)],_0x2f46da);}));}[_0x140dba(0x13d)](){const _0x1da38a=_0x140dba;this[_0x1da38a(0x16e)](this[_0x1da38a(0x140)][_0x1da38a(0x1aa)][_0x1da38a(0x1b5)](async _0x347260=>{const _0x5adafc=_0x1da38a;var _0x26f334,_0x36bea9,_0x2d8737,_0x24d95e;const _0x1ebea1=(_0x26f334=this[_0x5adafc(0x179)]['getUnit'](_0x347260[_0x5adafc(0x188)])['find'](_0x200a7c=>_0x200a7c[_0x5adafc(0x160)]===_0x347260['threadId']))==null?void 0x0:_0x26f334[_0x5adafc(0x195)];if(!_0x1ebea1)return;const {unitId:_0x33d562,subUnitId:_0xbb15c2}=_0x1ebea1;switch(_0x347260[_0x5adafc(0x1af)]&&this['_userService']['addUser'](_0x347260['user']),_0x347260['type']){case _0x5507d2['Add']:break;case _0x5507d2[_0x5adafc(0x15c)]:{this['_threadCommentModel'][_0x5adafc(0x17c)](_0x33d562,_0xbb15c2,{'unitId':_0x33d562,'subUnitId':_0xbb15c2,'ref':'','id':_0x347260[_0x5adafc(0x16f)],'dT':_0x371f6d(+_0x347260['createTimestamp']),'threadId':_0x347260['threadId'],'personId':(_0x2d8737=(_0x36bea9=_0x347260['user'])==null?void 0x0:_0x36bea9[_0x5adafc(0x151)])!=null?_0x2d8737:_0x347260['userId'],'text':JSON[_0x5adafc(0x192)](_0x347260['content']),'parentId':_0x1ebea1['id']});break;}case _0x5507d2[_0x5adafc(0x152)]:{const _0x546645=this[_0x5adafc(0x179)][_0x5adafc(0x154)](_0x33d562,_0xbb15c2,_0x347260[_0x5adafc(0x16f)]);_0x546645&&_0x546645[_0x5adafc(0x155)]&&this[_0x5adafc(0x179)]['deleteComment'](_0x33d562,_0xbb15c2,_0x347260[_0x5adafc(0x16f)]);break;}case _0x5507d2[_0x5adafc(0x189)]:{this[_0x5adafc(0x179)][_0x5adafc(0x19b)](_0x33d562,_0xbb15c2,{'commentId':_0x347260[_0x5adafc(0x16f)],'text':JSON['parse'](_0x347260[_0x5adafc(0x1ae)])});break;}case _0x5507d2[_0x5adafc(0x14f)]:{const _0x5c2b0c=(_0x24d95e=this[_0x5adafc(0x179)][_0x5adafc(0x18d)](_0x347260[_0x5adafc(0x188)])[_0x5adafc(0x136)](_0x2f93c2=>_0x2f93c2[_0x5adafc(0x160)]===_0x347260['threadId']))==null?void 0x0:_0x24d95e[_0x5adafc(0x195)];_0x5c2b0c&&this[_0x5adafc(0x179)][_0x5adafc(0x1ab)](_0x33d562,_0xbb15c2,_0x5c2b0c['id'],_0x347260[_0x5adafc(0x191)]===_0x5f590d[_0x5adafc(0x18b)]);break;}}}));}};_0x52e12f=_0x2640c1([_0x3fabe2(0x0,_0x31c190[_0x140dba(0x1b2)](_0x3eaf89[_0x140dba(0x16d)])),_0x3fabe2(0x1,_0x31c190[_0x140dba(0x1b2)](_0x27b2b8[_0x140dba(0x156)])),_0x3fabe2(0x2,_0x31c190[_0x140dba(0x1b2)](_0x31c190[_0x140dba(0x163)])),_0x3fabe2(0x3,_0x31c190[_0x140dba(0x1b2)](_0x31c190[_0x140dba(0x1a1)]))],_0x52e12f);const _0x298293=_0x140dba(0x13b),_0x3f7334={};var _0x3d450d=Object[_0x140dba(0x14d)],_0x1475a1=(_0x510882,_0xd7fe30,_0x1948df,_0x2f1d6f)=>{const _0x3d4ec3=_0x140dba;for(var _0x3993c7=_0x2f1d6f>0x1?void 0x0:_0x2f1d6f?_0x3d450d(_0xd7fe30,_0x1948df):_0xd7fe30,_0x35b158=_0x510882[_0x3d4ec3(0x177)]-0x1,_0x132979;_0x35b158>=0x0;_0x35b158--)(_0x132979=_0x510882[_0x35b158])&&(_0x3993c7=_0x132979(_0x3993c7)||_0x3993c7);return _0x3993c7;},_0x194801=(_0x3b5f1e,_0x22a059)=>(_0xb0d7a5,_0x27f184)=>_0x22a059(_0xb0d7a5,_0x27f184,_0x3b5f1e);function _0x3695b9(_0x3d0283,_0x51045e){const _0x16d8ca=_0x140dba,_0x3f2a63=_0x3d0283['replies'][0x0];return{..._0x51045e,'id':_0x3f2a63[_0x16d8ca(0x16f)],'resolved':_0x3d0283[_0x16d8ca(0x191)]===0x1,'dT':_0x371f6d(_0x3f2a63[_0x16d8ca(0x138)]),'personId':_0x3f2a63[_0x16d8ca(0x165)],'threadId':_0x3f2a63['threadId']};}function _0x3f7e73(_0x1ecca7,_0x54467a,_0x4a74cc){const _0x161ed9=_0x140dba;var _0x5affdd,_0x4ee715;if(((_0x4ee715=(_0x5affdd=_0x1ecca7==null?void 0x0:_0x1ecca7['replies'])==null?void 0x0:_0x5affdd['length'])!=null?_0x4ee715:0x0)>0x0){const _0x141c5e=(_0x3d8c0f,_0x53fec3)=>({'id':_0x3d8c0f[_0x161ed9(0x16f)],'threadId':_0x3d8c0f['threadId'],'dT':_0x371f6d(_0x3d8c0f[_0x161ed9(0x138)]),'personId':_0x3d8c0f['userId'],'resolved':_0x1ecca7[_0x161ed9(0x191)]===_0x5f590d[_0x161ed9(0x18b)],'unitId':_0x54467a,'subUnitId':_0x4a74cc,'text':JSON[_0x161ed9(0x192)](_0x3d8c0f[_0x161ed9(0x1ae)]),'parentId':_0x53fec3}),_0x2f26a8=_0x141c5e(_0x1ecca7[_0x161ed9(0x187)][0x0]);return{..._0x2f26a8,'children':_0x1ecca7[_0x161ed9(0x187)]['slice'](0x1)[_0x161ed9(0x172)](_0x29f981=>_0x141c5e(_0x29f981,_0x2f26a8['id']))};}return null;}let _0x2cb150=class{constructor(_0x905463,_0x4d9269,_0x1f8540,_0x280b7b){const _0x494e80=_0x140dba;this[_0x494e80(0x18e)]=_0x905463,this[_0x494e80(0x171)]=_0x4d9269,this[_0x494e80(0x161)]=_0x1f8540,this[_0x494e80(0x182)]=_0x280b7b;}async[_0x140dba(0x17c)](_0x59ade6){const _0x5ea9d0=_0x140dba;var _0x233be5,_0x5793a1;const {parentId:_0x4acea7,unitId:_0x484331,text:_0x6c0e25,threadId:_0x4b67de}=_0x59ade6,_0x3305a2=(_0x5793a1=(_0x233be5=_0x6c0e25['customRanges'])==null?void 0x0:_0x233be5['filter'](_0x91812=>_0x91812[_0x5ea9d0(0x137)]===_0x31c190[_0x5ea9d0(0x164)][_0x5ea9d0(0x15a)])[_0x5ea9d0(0x172)](_0x12e5a1=>_0x12e5a1[_0x5ea9d0(0x13c)]))!=null?_0x5793a1:[],_0x17679b=JSON[_0x5ea9d0(0x139)](_0x6c0e25),_0x20f5de=(await this[_0x5ea9d0(0x161)][_0x5ea9d0(0x17f)](_0x484331))['getMemberID']();if(_0x4acea7){const _0x556aeb={'memberId':_0x20f5de,'unitId':_0x484331,'content':_0x17679b,'mention':_0x3305a2,'threadId':_0x4b67de},_0x282285=(await this['_httpService'][_0x5ea9d0(0x141)](_0x5ea9d0(0x149)+_0x484331+_0x5ea9d0(0x16a),{'body':_0x556aeb}))[_0x5ea9d0(0x197)][_0x5ea9d0(0x14c)];return{..._0x59ade6,'id':_0x282285[_0x5ea9d0(0x16f)],'dT':_0x31c190[_0x5ea9d0(0x199)](+_0x282285[_0x5ea9d0(0x138)])[_0x5ea9d0(0x18f)](_0x5ea9d0(0x17e)),'personId':_0x282285[_0x5ea9d0(0x165)]};}else{const _0x55e1f0={'memberId':_0x20f5de,'unitId':_0x484331,'content':_0x17679b,'mention':_0x3305a2},_0x4b03c2=await this[_0x5ea9d0(0x18e)][_0x5ea9d0(0x141)](_0x5ea9d0(0x149)+_0x484331+_0x5ea9d0(0x196),{'body':_0x55e1f0});return _0x3695b9(_0x4b03c2[_0x5ea9d0(0x197)][_0x5ea9d0(0x145)],_0x59ade6);}}async[_0x140dba(0x19b)](_0x1765ef){const _0x2c6903=_0x140dba;var _0x367767,_0x1f54c7;const {text:_0x2b564b,unitId:_0x5b114b}=_0x1765ef,_0x5b9f86=(_0x1f54c7=(_0x367767=_0x2b564b[_0x2c6903(0x159)])==null?void 0x0:_0x367767[_0x2c6903(0x1b4)](_0x34a9c8=>_0x34a9c8[_0x2c6903(0x137)]===_0x31c190[_0x2c6903(0x164)][_0x2c6903(0x15a)])[_0x2c6903(0x172)](_0x1bb479=>_0x1bb479[_0x2c6903(0x13c)]))!=null?_0x1f54c7:[],_0x506a6b=JSON['stringify'](_0x2b564b),_0x49ea40=_0x1765ef['threadId'],_0xc38f7d=_0x1765ef['id'],_0x372527={'memberId':(await this['_sessionService'][_0x2c6903(0x17f)](_0x5b114b))[_0x2c6903(0x19d)](),'unitId':_0x5b114b,'threadId':_0x49ea40,'mention':_0x5b9f86,'content':_0x506a6b,'replyId':_0xc38f7d},_0x2aefa6=await this[_0x2c6903(0x18e)][_0x2c6903(0x141)]('/universer-api/comment/unit/'+_0x5b114b+'/edit',{'body':_0x372527});return!_0x2aefa6[_0x2c6903(0x197)][_0x2c6903(0x181)]||_0x2aefa6[_0x2c6903(0x197)][_0x2c6903(0x181)][_0x2c6903(0x13e)]===0x1;}async[_0x140dba(0x1ab)](_0x29efd0){const _0x4e463f=_0x140dba,{unitId:_0xc5939d}=_0x29efd0,_0x177765=_0x29efd0['threadId'],_0x4ae42e={'memberId':this[_0x4e463f(0x171)][_0x4e463f(0x15e)]()[_0x4e463f(0x151)],'unitId':_0xc5939d,'threadId':_0x177765,'solved':_0x29efd0[_0x4e463f(0x14a)]?_0x5f590d[_0x4e463f(0x18b)]:_0x5f590d['OpenOrReOpen']},_0x4bc7ee=await this[_0x4e463f(0x18e)][_0x4e463f(0x141)]('/universer-api/comment/unit/'+_0xc5939d+'/solved',{'body':_0x4ae42e});return!_0x4bc7ee['body'][_0x4e463f(0x181)]||_0x4bc7ee[_0x4e463f(0x197)][_0x4e463f(0x181)]['code']===0x1;}async['deleteComment'](_0x15a59f,_0x2f311f,_0x31f8a3,_0x3d0ec0){const _0x28d6c6=_0x140dba,_0x1b2511={'memberId':(await this['_sessionService'][_0x28d6c6(0x17f)](_0x15a59f))[_0x28d6c6(0x19d)](),'threadId':_0x31f8a3,'replyId':_0x3d0ec0,'unitId':_0x15a59f},_0x22f03e=await this['_httpService'][_0x28d6c6(0x141)](_0x28d6c6(0x149)+_0x15a59f+'/delete',{'body':_0x1b2511});return!_0x22f03e[_0x28d6c6(0x197)][_0x28d6c6(0x181)]||_0x22f03e[_0x28d6c6(0x197)][_0x28d6c6(0x181)][_0x28d6c6(0x13e)]===0x1;}async[_0x140dba(0x1ac)](_0xc395c0,_0x600254,_0x526dd0){const _0xb1325e=_0x140dba,_0x1eb5b2={'unitId':_0xc395c0,'threadId':_0x526dd0},_0xe5eaa9=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xc395c0+'/list',{'body':_0x1eb5b2}),_0x1ba0cf=_0x526dd0[_0xb1325e(0x172)](_0x5edbaf=>_0x3f7e73(_0xe5eaa9[_0xb1325e(0x197)]['comments'][_0x5edbaf],_0xc395c0,_0x600254))['filter'](Boolean);return Object[_0xb1325e(0x184)](_0xe5eaa9['body'][_0xb1325e(0x168)])[_0xb1325e(0x15b)](_0xf89d0a=>{this['_userService']['addUser'](_0xf89d0a);}),_0x1ba0cf;}[_0x140dba(0x185)](_0xa776f9){const _0x59ea18=_0x140dba;return{'id':_0xa776f9['id'],'threadId':_0xa776f9[_0x59ea18(0x160)],'ref':_0xa776f9[_0x59ea18(0x169)]};}};_0x2cb150=_0x1475a1([_0x194801(0x0,_0x31c190[_0x140dba(0x1b2)](_0x5d9160[_0x140dba(0x1a5)])),_0x194801(0x1,_0x31c190[_0x140dba(0x1b2)](_0x31c190[_0x140dba(0x163)])),_0x194801(0x2,_0x31c190[_0x140dba(0x1b2)](_0x3eaf89[_0x140dba(0x158)])),_0x194801(0x3,_0x31c190['Inject'](_0x31c190[_0x140dba(0x1a1)]))],_0x2cb150);var _0x475131=Object['getOwnPropertyDescriptor'],_0x456cf6=(_0x5e9a08,_0x5260e9,_0x31636a,_0x236f92)=>{const _0x30470a=_0x140dba;for(var _0x1ccabb=_0x236f92>0x1?void 0x0:_0x236f92?_0x475131(_0x5260e9,_0x31636a):_0x5260e9,_0xf99fd=_0x5e9a08[_0x30470a(0x177)]-0x1,_0x30a0ac;_0xf99fd>=0x0;_0xf99fd--)(_0x30a0ac=_0x5e9a08[_0xf99fd])&&(_0x1ccabb=_0x30a0ac(_0x1ccabb)||_0x1ccabb);return _0x1ccabb;},_0x4b6b52=(_0x3bf908,_0x1d2a8b)=>(_0x39bb74,_0x2d378b)=>_0x1d2a8b(_0x39bb74,_0x2d378b,_0x3bf908);let _0x1de4f6=class extends _0x31c190[_0x140dba(0x17b)]{constructor(_0x5f4346,_0x4437b9){const _0x5e3965=_0x140dba;super(),this[_0x5e3965(0x198)]=_0x5f4346,this['_threadCommentDataSource']=_0x4437b9,this[_0x5e3965(0x135)]();}[_0x140dba(0x135)](){const _0x471eca=_0x140dba;this[_0x471eca(0x198)][_0x471eca(0x150)]=this[_0x471eca(0x15f)],this[_0x471eca(0x198)][_0x471eca(0x16b)]=!0x1;}};_0x1de4f6=_0x456cf6([_0x4b6b52(0x0,_0x27b2b8['IThreadCommentDataSourceService']),_0x4b6b52(0x1,_0x31c190[_0x140dba(0x1b2)](_0x2cb150))],_0x1de4f6);var _0x3e96c5=Object['defineProperty'],_0x20d12a=Object['getOwnPropertyDescriptor'],_0x452841=(_0x5dfa97,_0x5ede6c,_0x171777)=>_0x5ede6c in _0x5dfa97?_0x3e96c5(_0x5dfa97,_0x5ede6c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x171777}):_0x5dfa97[_0x5ede6c]=_0x171777,_0x3058d9=(_0x8c5861,_0x4f0196,_0x24edcf,_0x5edd28)=>{for(var _0xe921b5=_0x5edd28>0x1?void 0x0:_0x5edd28?_0x20d12a(_0x4f0196,_0x24edcf):_0x4f0196,_0x2ec327=_0x8c5861['length']-0x1,_0x276bf9;_0x2ec327>=0x0;_0x2ec327--)(_0x276bf9=_0x8c5861[_0x2ec327])&&(_0xe921b5=_0x276bf9(_0xe921b5)||_0xe921b5);return _0xe921b5;},_0x4bdfba=(_0x13c0f2,_0x1a76d1)=>(_0xe54968,_0x949ec6)=>_0x1a76d1(_0xe54968,_0x949ec6,_0x13c0f2),_0x4e7fa2=(_0xfb7c36,_0xe6df17,_0x207417)=>_0x452841(_0xfb7c36,typeof _0xe6df17!='symbol'?_0xe6df17+'':_0xe6df17,_0x207417);_0x5744d5[_0x140dba(0x176)]=class extends _0x31c190[_0x140dba(0x14b)]{constructor(_0x369060=_0x3f7334,_0x423626,_0x1cd4f3){const _0x2aee1c=_0x140dba;super(),this[_0x2aee1c(0x180)]=_0x369060,this[_0x2aee1c(0x182)]=_0x423626,this[_0x2aee1c(0x133)]=_0x1cd4f3;const {..._0x4387d5}=_0x31c190[_0x2aee1c(0x174)]({},_0x3f7334,this['_config']);this[_0x2aee1c(0x133)][_0x2aee1c(0x18a)](_0x298293,_0x4387d5);}[_0x140dba(0x1a6)](){[[_0x2cb150],[_0x1de4f6],[_0x52e12f]]['forEach'](_0x9946dc=>{const _0x4b37e5=_0x2d07;this[_0x4b37e5(0x182)][_0x4b37e5(0x13a)](_0x9946dc);});}['onReady'](){const _0x545ee9=_0x140dba;this[_0x545ee9(0x182)][_0x545ee9(0x1a3)](_0x1de4f6),this[_0x545ee9(0x182)][_0x545ee9(0x1a3)](_0x52e12f);}},_0x4e7fa2(_0x5744d5[_0x140dba(0x176)],_0x140dba(0x170),_0x319d14),_0x4e7fa2(_0x5744d5['UniverThreadCommentDataSourcePlugin'],_0x140dba(0x153),_0x31c190['UniverInstanceType']['UNIVER_UNKNOWN']),_0x5744d5['UniverThreadCommentDataSourcePlugin']=_0x3058d9([_0x31c190[_0x140dba(0x1a9)](_0x213a6d[_0x140dba(0x1a4)],_0x3eaf89[_0x140dba(0x1a2)],_0x25a51d[_0x140dba(0x1a7)]),_0x4bdfba(0x1,_0x31c190[_0x140dba(0x1b2)](_0x31c190[_0x140dba(0x1a1)])),_0x4bdfba(0x2,_0x31c190[_0x140dba(0x142)])],_0x5744d5[_0x140dba(0x176)]),Object['defineProperty'](_0x5744d5,Symbol['toStringTag'],{'value':'Module'});}));
1
+ function _0x484d(_0x31ae11,_0x3f40f5){const _0x2515c7=_0x2515();return _0x484d=function(_0x484db5,_0x3a9436){_0x484db5=_0x484db5-0x179;let _0x2920e0=_0x2515c7[_0x484db5];return _0x2920e0;},_0x484d(_0x31ae11,_0x3f40f5);}function _0x2515(){const _0x16ad8d=['@univerjs-pro/collaboration-client','thread-comment-data-source.config','getComment','@univerjs/core','UniverInstanceType','UserManagerService','619027bbgRGd','UniverThreadCommentDataSourcePlugin','addUser','UniverProCollaborationClient','createTimestamp','function','Add','customRanges','_config','amd','UniverCollaborationClientPlugin','16730YFGOaw','length','getMemberID','2134689PIeWeo','_injector','rangeId','disposeWithMe','forEach','size','_initUserSync','userId','getOwnPropertyDescriptor','UniverCore','commentUpdate$','5093890PsiodC','comments','onStarting','dataSource','UniverProLicense','/edit','Reply','error','@univerjs-pro/license','replies','add','_commentService','rangeType','4hVBuRA','@univerjs/thread-comment-ui','_threadCommentModel','map','OpenOrReOpen','solved','format','UniverThreadCommentUi','10vzcgqS','payload','_threadCommentDataSourceService','root','/list','get','personId','IThreadCommentDataSourceService','addComment','exports','body','post','UNRECOGNIZED','resolveComment','UniverProThreadCommentDatasource','/solved','Edit','getUser','CollaborationSessionService','setConfig','Module','listComments','@univerjs/thread-comment','_configService','getCurrentUser','comment','user','delete','8840227McgQPG','pluginName','dayjs','find','CommentService','defineProperty','_httpService','merge','subscribe','/delete','4wBcLrT','Disposable','Solved','UniverThreadComment','_initDataSource','3787312BJHNXp','slice','updateComment','unitId','_sessionService','YYYY/MM/DD\x20HH:mm','userID','Solve','resolved','CustomRangeType','_threadCommentDataSource','@univerjs/network','parse','_init','Delete','syncUpdateMutationToColla','/universer-api/comment/unit/','requireSession','UNIVER_UNKNOWN','Injector','Plugin','stringify','type','threadId','COMMENT','reply','1398hjoqal','users','Inject','content','object','code','_userService','saveCommentToSnapshot','replyId','getUnit','18CtZiQI','HTTPService','pipe','toStringTag','Unknown','3448464zNrjNd','filter'];_0x2515=function(){return _0x16ad8d;};return _0x2515();}(function(_0x19045f,_0x98417a){const _0x4259e9=_0x484d,_0x40e4f1=_0x19045f();while(!![]){try{const _0x204bd8=-parseInt(_0x4259e9(0x17d))/0x1+parseInt(_0x4259e9(0x1d1))/0x2*(parseInt(_0x4259e9(0x18b))/0x3)+-parseInt(_0x4259e9(0x1a3))/0x4*(parseInt(_0x4259e9(0x196))/0x5)+parseInt(_0x4259e9(0x1f0))/0x6*(parseInt(_0x4259e9(0x188))/0x7)+parseInt(_0x4259e9(0x1d6))/0x8*(parseInt(_0x4259e9(0x1fa))/0x9)+parseInt(_0x4259e9(0x1ab))/0xa*(-parseInt(_0x4259e9(0x1c7))/0xb)+parseInt(_0x4259e9(0x1ff))/0xc;if(_0x204bd8===_0x98417a)break;else _0x40e4f1['push'](_0x40e4f1['shift']());}catch(_0x3866fa){_0x40e4f1['push'](_0x40e4f1['shift']());}}}(_0x2515,0xbca7e),function(_0x40c7e1,_0x555120){const _0x3bb550=_0x484d;typeof exports==_0x3bb550(0x1f4)&&typeof module<'u'?_0x555120(exports,require(_0x3bb550(0x201)),require('@univerjs-pro/license'),require(_0x3bb550(0x17a)),require(_0x3bb550(0x1a4)),require(_0x3bb550(0x1c1)),require('rxjs'),require(_0x3bb550(0x1e1))):typeof define==_0x3bb550(0x182)&&define[_0x3bb550(0x186)]?define([_0x3bb550(0x1b4),_0x3bb550(0x201),_0x3bb550(0x19e),_0x3bb550(0x17a),_0x3bb550(0x1a4),_0x3bb550(0x1c1),'rxjs','@univerjs/network'],_0x555120):(_0x40c7e1=typeof globalThis<'u'?globalThis:_0x40c7e1||self,_0x555120(_0x40c7e1[_0x3bb550(0x1b9)]={},_0x40c7e1[_0x3bb550(0x180)],_0x40c7e1[_0x3bb550(0x19a)],_0x40c7e1[_0x3bb550(0x194)],_0x40c7e1[_0x3bb550(0x1aa)],_0x40c7e1[_0x3bb550(0x1d4)],_0x40c7e1['rxjs'],_0x40c7e1['UniverNetwork']));}(this,function(_0x3fdf36,_0x1bf240,_0x10c06b,_0x34b4ef,_0x54799e,_0x2920d2,_0x3a6403,_0x422bd1){'use strict';const _0x484063=_0x484d;const _0x163e9e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4c4f19=(_0x50523f=>(_0x50523f[_0x50523f['OpenOrReOpen']=0x0]=_0x484063(0x1a7),_0x50523f[_0x50523f[_0x484063(0x1d3)]=0x1]='Solved',_0x50523f[_0x50523f[_0x484063(0x1b7)]=-0x1]=_0x484063(0x1b7),_0x50523f))(_0x4c4f19||{}),_0x150b2e=(_0x33b155=>(_0x33b155[_0x33b155[_0x484063(0x1fe)]=0x0]='Unknown',_0x33b155[_0x33b155['Add']=0x1]=_0x484063(0x183),_0x33b155[_0x33b155['Reply']=0x2]='Reply',_0x33b155[_0x33b155[_0x484063(0x1bb)]=0x3]='Edit',_0x33b155[_0x33b155['Delete']=0x4]='Delete',_0x33b155[_0x33b155[_0x484063(0x1dd)]=0x5]=_0x484063(0x1dd),_0x33b155[_0x33b155['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x33b155))(_0x150b2e||{});const _0x13a113=_0x467e19=>_0x34b4ef[_0x484063(0x1c9)](new Date(+_0x467e19))[_0x484063(0x1a9)](_0x484063(0x1db)),_0x45285c=async(_0x587df8,_0x2ee803)=>{const _0x9b42e1=_0x484063,_0x23dce7=_0x587df8['get'](_0x34b4ef['UserManagerService']),_0xc81ee3=_0x587df8[_0x9b42e1(0x1b0)](_0x422bd1['HTTPService']);_0x2ee803[_0x9b42e1(0x18f)](_0xfe9869=>{const _0x535196=_0x9b42e1;_0x23dce7[_0x535196(0x1bc)](_0xfe9869)&&_0x2ee803[_0x535196(0x1c6)](_0xfe9869);}),_0x2ee803[_0x9b42e1(0x190)]&&(await _0xc81ee3['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ee803]}}))[_0x9b42e1(0x1b5)][_0x9b42e1(0x1f1)][_0x9b42e1(0x18f)](_0x193c35=>{const _0x1319ec=_0x9b42e1;_0x193c35&&_0x23dce7[_0x1319ec(0x17f)](_0x193c35);});};var _0x2a5fba=Object[_0x484063(0x193)],_0x5f1d92=(_0x3d6629,_0x65c04a,_0x5a7bf5,_0x4e2486)=>{const _0x2dfb84=_0x484063;for(var _0x23990d=_0x4e2486>0x1?void 0x0:_0x4e2486?_0x2a5fba(_0x65c04a,_0x5a7bf5):_0x65c04a,_0xbc36e3=_0x3d6629[_0x2dfb84(0x189)]-0x1,_0x5f27d8;_0xbc36e3>=0x0;_0xbc36e3--)(_0x5f27d8=_0x3d6629[_0xbc36e3])&&(_0x23990d=_0x5f27d8(_0x23990d)||_0x23990d);return _0x23990d;},_0x415f6f=(_0x279836,_0x11337a)=>(_0x25b53d,_0x91a6c1)=>_0x11337a(_0x25b53d,_0x91a6c1,_0x279836);let _0x4fffe9=class extends _0x34b4ef['Disposable']{constructor(_0x275dd7,_0x3a78a5,_0x4e34a0,_0x2cc8fd){const _0x28cf6d=_0x484063;super(),this[_0x28cf6d(0x1a1)]=_0x275dd7,this['_threadCommentModel']=_0x3a78a5,this[_0x28cf6d(0x1f6)]=_0x4e34a0,this['_injector']=_0x2cc8fd,this[_0x28cf6d(0x1e3)](),this[_0x28cf6d(0x191)]();}['_initUserSync'](){const _0x1ca266=_0x484063;this[_0x1ca266(0x18e)](this[_0x1ca266(0x1a5)][_0x1ca266(0x195)][_0x1ca266(0x1fc)](_0x3a6403['bufferTime'](0x10))[_0x1ca266(0x1cf)](_0x8a30ab=>{const _0x19da2c=_0x1ca266,_0x100427=new Set();_0x8a30ab[_0x19da2c(0x18f)](_0x567032=>{const _0x884667=_0x19da2c;switch(_0x567032[_0x884667(0x1ec)]){case _0x884667(0x1a0):{const _0x4fe343=_0x567032[_0x884667(0x1ac)][_0x884667(0x1b1)];_0x100427[_0x884667(0x1a0)](_0x4fe343);break;}}}),_0x45285c(this['_injector'],_0x100427);}));}[_0x484063(0x1e3)](){const _0x53a94a=_0x484063;this[_0x53a94a(0x18e)](this[_0x53a94a(0x1a1)]['commentUpdate$'][_0x53a94a(0x1cf)](async _0x546594=>{const _0x532c54=_0x53a94a;var _0x28c71a,_0x14b135,_0x5e4969,_0x3fbd9a;const _0x5a949c=(_0x28c71a=this[_0x532c54(0x1a5)][_0x532c54(0x1f9)](_0x546594['unitId'])[_0x532c54(0x1ca)](_0x2f757d=>_0x2f757d['threadId']===_0x546594['threadId']))==null?void 0x0:_0x28c71a[_0x532c54(0x1ae)];if(!_0x5a949c)return;const {unitId:_0x239278,subUnitId:_0x3368fd}=_0x5a949c;switch(_0x546594['user']&&this[_0x532c54(0x1f6)][_0x532c54(0x17f)](_0x546594[_0x532c54(0x1c5)]),_0x546594[_0x532c54(0x1ec)]){case _0x150b2e[_0x532c54(0x183)]:break;case _0x150b2e[_0x532c54(0x19c)]:{this[_0x532c54(0x1a5)][_0x532c54(0x1b3)](_0x239278,_0x3368fd,{'unitId':_0x239278,'subUnitId':_0x3368fd,'ref':'','id':_0x546594[_0x532c54(0x1f8)],'dT':_0x13a113(+_0x546594['createTimestamp']),'threadId':_0x546594['threadId'],'personId':(_0x5e4969=(_0x14b135=_0x546594[_0x532c54(0x1c5)])==null?void 0x0:_0x14b135[_0x532c54(0x1dc)])!=null?_0x5e4969:_0x546594[_0x532c54(0x192)],'text':JSON[_0x532c54(0x1e2)](_0x546594[_0x532c54(0x1f3)]),'parentId':_0x5a949c['id']});break;}case _0x150b2e[_0x532c54(0x1e4)]:{const _0x264636=this[_0x532c54(0x1a5)][_0x532c54(0x179)](_0x239278,_0x3368fd,_0x546594[_0x532c54(0x1f8)]);_0x264636&&_0x264636['parentId']&&this[_0x532c54(0x1a5)]['deleteComment'](_0x239278,_0x3368fd,_0x546594[_0x532c54(0x1f8)]);break;}case _0x150b2e[_0x532c54(0x1bb)]:{this[_0x532c54(0x1a5)][_0x532c54(0x1d8)](_0x239278,_0x3368fd,{'commentId':_0x546594['replyId'],'text':JSON['parse'](_0x546594[_0x532c54(0x1f3)])});break;}case _0x150b2e['Solve']:{const _0x5d830f=(_0x3fbd9a=this[_0x532c54(0x1a5)][_0x532c54(0x1f9)](_0x546594[_0x532c54(0x1d9)])[_0x532c54(0x1ca)](_0x58d7d6=>_0x58d7d6[_0x532c54(0x1ed)]===_0x546594['threadId']))==null?void 0x0:_0x3fbd9a['root'];_0x5d830f&&this[_0x532c54(0x1a5)][_0x532c54(0x1b8)](_0x239278,_0x3368fd,_0x5d830f['id'],_0x546594[_0x532c54(0x1a8)]===_0x4c4f19[_0x532c54(0x1d3)]);break;}}}));}};_0x4fffe9=_0x5f1d92([_0x415f6f(0x0,_0x34b4ef[_0x484063(0x1f2)](_0x1bf240[_0x484063(0x1cb)])),_0x415f6f(0x1,_0x34b4ef[_0x484063(0x1f2)](_0x2920d2['ThreadCommentModel'])),_0x415f6f(0x2,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x17c)])),_0x415f6f(0x3,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x1e9)]))],_0x4fffe9);const _0xbc477f=_0x484063(0x202),_0x1286f6={};var _0x229259=Object[_0x484063(0x193)],_0x5e2b04=(_0x50ea21,_0x5a57e9,_0x1607b4,_0x4b98f1)=>{for(var _0x4126e6=_0x4b98f1>0x1?void 0x0:_0x4b98f1?_0x229259(_0x5a57e9,_0x1607b4):_0x5a57e9,_0x5ce110=_0x50ea21['length']-0x1,_0x5316d3;_0x5ce110>=0x0;_0x5ce110--)(_0x5316d3=_0x50ea21[_0x5ce110])&&(_0x4126e6=_0x5316d3(_0x4126e6)||_0x4126e6);return _0x4126e6;},_0x27daaf=(_0x419c69,_0x46e1be)=>(_0x5d08b2,_0x38e5e0)=>_0x46e1be(_0x5d08b2,_0x38e5e0,_0x419c69);function _0x9cd3d5(_0x1bab5a,_0x4fbd83){const _0x228d76=_0x484063,_0x10a0db=_0x1bab5a[_0x228d76(0x19f)][0x0];return{..._0x4fbd83,'id':_0x10a0db[_0x228d76(0x1f8)],'resolved':_0x1bab5a[_0x228d76(0x1a8)]===0x1,'dT':_0x13a113(_0x10a0db[_0x228d76(0x181)]),'personId':_0x10a0db[_0x228d76(0x192)],'threadId':_0x10a0db[_0x228d76(0x1ed)]};}function _0x5ea313(_0x4c87fa,_0x294f25,_0x1bb164){const _0x455e8c=_0x484063;var _0x3ea11a,_0x1442ba;if(((_0x1442ba=(_0x3ea11a=_0x4c87fa==null?void 0x0:_0x4c87fa['replies'])==null?void 0x0:_0x3ea11a[_0x455e8c(0x189)])!=null?_0x1442ba:0x0)>0x0){const _0x53143c=(_0x255a87,_0x43ee0f)=>({'id':_0x255a87[_0x455e8c(0x1f8)],'threadId':_0x255a87[_0x455e8c(0x1ed)],'dT':_0x13a113(_0x255a87['createTimestamp']),'personId':_0x255a87[_0x455e8c(0x192)],'resolved':_0x4c87fa[_0x455e8c(0x1a8)]===_0x4c4f19[_0x455e8c(0x1d3)],'unitId':_0x294f25,'subUnitId':_0x1bb164,'text':JSON['parse'](_0x255a87[_0x455e8c(0x1f3)]),'parentId':_0x43ee0f}),_0x50a8ad=_0x53143c(_0x4c87fa['replies'][0x0]);return{..._0x50a8ad,'children':_0x4c87fa[_0x455e8c(0x19f)][_0x455e8c(0x1d7)](0x1)['map'](_0x536bd0=>_0x53143c(_0x536bd0,_0x50a8ad['id']))};}return null;}let _0x335a5d=class{constructor(_0x19fca8,_0x5b394a,_0x1a1c21,_0xec7ace){const _0x5403cb=_0x484063;this[_0x5403cb(0x1cd)]=_0x19fca8,this[_0x5403cb(0x1f6)]=_0x5b394a,this[_0x5403cb(0x1da)]=_0x1a1c21,this['_injector']=_0xec7ace;}async['addComment'](_0x1e69ea){const _0x18ff7e=_0x484063;var _0x54122b,_0x200a86;const {parentId:_0x5f4ee4,unitId:_0xed720c,text:_0x2bf2eb,threadId:_0x2ebe4d}=_0x1e69ea,_0x53d79d=(_0x200a86=(_0x54122b=_0x2bf2eb[_0x18ff7e(0x184)])==null?void 0x0:_0x54122b[_0x18ff7e(0x200)](_0x169f20=>_0x169f20[_0x18ff7e(0x1a2)]===_0x34b4ef[_0x18ff7e(0x1df)][_0x18ff7e(0x1ee)])['map'](_0x48f923=>_0x48f923[_0x18ff7e(0x18d)]))!=null?_0x200a86:[],_0x5c042b=JSON[_0x18ff7e(0x1eb)](_0x2bf2eb),_0x1c3874=(await this[_0x18ff7e(0x1da)][_0x18ff7e(0x1e7)](_0xed720c))[_0x18ff7e(0x18a)]();if(_0x5f4ee4){const _0x3b3524={'memberId':_0x1c3874,'unitId':_0xed720c,'content':_0x5c042b,'mention':_0x53d79d,'threadId':_0x2ebe4d},_0x52864d=(await this['_httpService'][_0x18ff7e(0x1b6)](_0x18ff7e(0x1e6)+_0xed720c+'/reply',{'body':_0x3b3524}))[_0x18ff7e(0x1b5)][_0x18ff7e(0x1ef)];return{..._0x1e69ea,'id':_0x52864d['replyId'],'dT':_0x34b4ef[_0x18ff7e(0x1c9)](+_0x52864d[_0x18ff7e(0x181)])[_0x18ff7e(0x1a9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x52864d[_0x18ff7e(0x192)]};}else{const _0x5100fa={'memberId':_0x1c3874,'unitId':_0xed720c,'content':_0x5c042b,'mention':_0x53d79d},_0x36b3ff=await this[_0x18ff7e(0x1cd)][_0x18ff7e(0x1b6)](_0x18ff7e(0x1e6)+_0xed720c+'/add',{'body':_0x5100fa});return _0x9cd3d5(_0x36b3ff[_0x18ff7e(0x1b5)][_0x18ff7e(0x1c4)],_0x1e69ea);}}async[_0x484063(0x1d8)](_0x14c4bd){const _0x26d2c8=_0x484063;var _0x52e7ea,_0xb6f8e5;const {text:_0x24e1cf,unitId:_0x305c20}=_0x14c4bd,_0x3d0bbe=(_0xb6f8e5=(_0x52e7ea=_0x24e1cf[_0x26d2c8(0x184)])==null?void 0x0:_0x52e7ea[_0x26d2c8(0x200)](_0xa5a394=>_0xa5a394['rangeType']===_0x34b4ef[_0x26d2c8(0x1df)][_0x26d2c8(0x1ee)])[_0x26d2c8(0x1a6)](_0x3b1183=>_0x3b1183[_0x26d2c8(0x18d)]))!=null?_0xb6f8e5:[],_0x3453ff=JSON[_0x26d2c8(0x1eb)](_0x24e1cf),_0x19a3de=_0x14c4bd[_0x26d2c8(0x1ed)],_0x4ebf63=_0x14c4bd['id'],_0x11fba4={'memberId':(await this[_0x26d2c8(0x1da)][_0x26d2c8(0x1e7)](_0x305c20))[_0x26d2c8(0x18a)](),'unitId':_0x305c20,'threadId':_0x19a3de,'mention':_0x3d0bbe,'content':_0x3453ff,'replyId':_0x4ebf63},_0xd4fc09=await this[_0x26d2c8(0x1cd)]['post'](_0x26d2c8(0x1e6)+_0x305c20+_0x26d2c8(0x19b),{'body':_0x11fba4});return!_0xd4fc09[_0x26d2c8(0x1b5)][_0x26d2c8(0x19d)]||_0xd4fc09[_0x26d2c8(0x1b5)][_0x26d2c8(0x19d)]['code']===0x1;}async[_0x484063(0x1b8)](_0x16b7a3){const _0x53edf6=_0x484063,{unitId:_0x2259bb}=_0x16b7a3,_0x2e80c9=_0x16b7a3[_0x53edf6(0x1ed)],_0x35fc4e={'memberId':this['_userService'][_0x53edf6(0x1c3)]()[_0x53edf6(0x1dc)],'unitId':_0x2259bb,'threadId':_0x2e80c9,'solved':_0x16b7a3[_0x53edf6(0x1de)]?_0x4c4f19[_0x53edf6(0x1d3)]:_0x4c4f19[_0x53edf6(0x1a7)]},_0x452131=await this[_0x53edf6(0x1cd)]['post']('/universer-api/comment/unit/'+_0x2259bb+_0x53edf6(0x1ba),{'body':_0x35fc4e});return!_0x452131[_0x53edf6(0x1b5)][_0x53edf6(0x19d)]||_0x452131[_0x53edf6(0x1b5)][_0x53edf6(0x19d)][_0x53edf6(0x1f5)]===0x1;}async['deleteComment'](_0x4ef713,_0x5a3777,_0x1a3672,_0x5db3d6){const _0x154aa6=_0x484063,_0xf0e353={'memberId':(await this[_0x154aa6(0x1da)][_0x154aa6(0x1e7)](_0x4ef713))[_0x154aa6(0x18a)](),'threadId':_0x1a3672,'replyId':_0x5db3d6,'unitId':_0x4ef713},_0x464e54=await this['_httpService'][_0x154aa6(0x1b6)](_0x154aa6(0x1e6)+_0x4ef713+_0x154aa6(0x1d0),{'body':_0xf0e353});return!_0x464e54['body']['error']||_0x464e54[_0x154aa6(0x1b5)][_0x154aa6(0x19d)][_0x154aa6(0x1f5)]===0x1;}async[_0x484063(0x1c0)](_0x2ac79d,_0x216714,_0x134451){const _0x1b122e=_0x484063,_0x471fb1={'unitId':_0x2ac79d,'threadId':_0x134451},_0x1afbf7=await this[_0x1b122e(0x1cd)][_0x1b122e(0x1b6)](_0x1b122e(0x1e6)+_0x2ac79d+_0x1b122e(0x1af),{'body':_0x471fb1}),_0x5cb3d3=_0x134451[_0x1b122e(0x1a6)](_0x46b6ba=>_0x5ea313(_0x1afbf7[_0x1b122e(0x1b5)][_0x1b122e(0x197)][_0x46b6ba],_0x2ac79d,_0x216714))[_0x1b122e(0x200)](Boolean);return Object['values'](_0x1afbf7[_0x1b122e(0x1b5)][_0x1b122e(0x1f1)])[_0x1b122e(0x18f)](_0x1b4e30=>{const _0x221933=_0x1b122e;this['_userService'][_0x221933(0x17f)](_0x1b4e30);}),_0x5cb3d3;}[_0x484063(0x1f7)](_0x20f106){return{'id':_0x20f106['id'],'threadId':_0x20f106['threadId'],'ref':_0x20f106['ref']};}};_0x335a5d=_0x5e2b04([_0x27daaf(0x0,_0x34b4ef[_0x484063(0x1f2)](_0x422bd1[_0x484063(0x1fb)])),_0x27daaf(0x1,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x17c)])),_0x27daaf(0x2,_0x34b4ef['Inject'](_0x1bf240[_0x484063(0x1bd)])),_0x27daaf(0x3,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x1e9)]))],_0x335a5d);var _0x1b68b7=Object[_0x484063(0x193)],_0x205289=(_0x361fac,_0x36b883,_0x1087c8,_0x474f73)=>{const _0xf6e30a=_0x484063;for(var _0x3beea2=_0x474f73>0x1?void 0x0:_0x474f73?_0x1b68b7(_0x36b883,_0x1087c8):_0x36b883,_0xfc7df8=_0x361fac[_0xf6e30a(0x189)]-0x1,_0x4810fe;_0xfc7df8>=0x0;_0xfc7df8--)(_0x4810fe=_0x361fac[_0xfc7df8])&&(_0x3beea2=_0x4810fe(_0x3beea2)||_0x3beea2);return _0x3beea2;},_0x3f38a6=(_0x3c5971,_0x25ed71)=>(_0x1dbe61,_0x1b5c32)=>_0x25ed71(_0x1dbe61,_0x1b5c32,_0x3c5971);let _0x4fcbcf=class extends _0x34b4ef[_0x484063(0x1d2)]{constructor(_0x2bae56,_0x7dc1ce){const _0x4a2acf=_0x484063;super(),this['_threadCommentDataSourceService']=_0x2bae56,this[_0x4a2acf(0x1e0)]=_0x7dc1ce,this[_0x4a2acf(0x1d5)]();}[_0x484063(0x1d5)](){const _0x23eabd=_0x484063;this[_0x23eabd(0x1ad)][_0x23eabd(0x199)]=this['_threadCommentDataSource'],this[_0x23eabd(0x1ad)][_0x23eabd(0x1e5)]=!0x1;}};_0x4fcbcf=_0x205289([_0x3f38a6(0x0,_0x2920d2[_0x484063(0x1b2)]),_0x3f38a6(0x1,_0x34b4ef['Inject'](_0x335a5d))],_0x4fcbcf);var _0x481b92=Object[_0x484063(0x1cc)],_0x8198b4=Object[_0x484063(0x193)],_0x11d010=(_0x107fcc,_0x23ad9c,_0xd32992)=>_0x23ad9c in _0x107fcc?_0x481b92(_0x107fcc,_0x23ad9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd32992}):_0x107fcc[_0x23ad9c]=_0xd32992,_0x5ae950=(_0x3d6166,_0x5a217f,_0x5d8420,_0x51e913)=>{const _0x427bee=_0x484063;for(var _0x2647ca=_0x51e913>0x1?void 0x0:_0x51e913?_0x8198b4(_0x5a217f,_0x5d8420):_0x5a217f,_0x3246b3=_0x3d6166[_0x427bee(0x189)]-0x1,_0x447571;_0x3246b3>=0x0;_0x3246b3--)(_0x447571=_0x3d6166[_0x3246b3])&&(_0x2647ca=_0x447571(_0x2647ca)||_0x2647ca);return _0x2647ca;},_0x1654b8=(_0x36d800,_0xed8a69)=>(_0x51aa90,_0x20ec7a)=>_0xed8a69(_0x51aa90,_0x20ec7a,_0x36d800),_0x481fe2=(_0x146507,_0x153b2f,_0xc93d25)=>_0x11d010(_0x146507,typeof _0x153b2f!='symbol'?_0x153b2f+'':_0x153b2f,_0xc93d25);_0x3fdf36[_0x484063(0x17e)]=class extends _0x34b4ef[_0x484063(0x1ea)]{constructor(_0x2604d8=_0x1286f6,_0x343d21,_0x66e901){const _0x526890=_0x484063;super(),this[_0x526890(0x185)]=_0x2604d8,this[_0x526890(0x18c)]=_0x343d21,this[_0x526890(0x1c2)]=_0x66e901;const {..._0x46caad}=_0x34b4ef[_0x526890(0x1ce)]({},_0x1286f6,this[_0x526890(0x185)]);this[_0x526890(0x1c2)][_0x526890(0x1be)](_0xbc477f,_0x46caad);}[_0x484063(0x198)](){const _0x38d491=_0x484063;[[_0x335a5d],[_0x4fcbcf],[_0x4fffe9]][_0x38d491(0x18f)](_0x1b1235=>{const _0x5c133c=_0x38d491;this[_0x5c133c(0x18c)][_0x5c133c(0x1a0)](_0x1b1235);});}['onReady'](){const _0x2d0175=_0x484063;this[_0x2d0175(0x18c)][_0x2d0175(0x1b0)](_0x4fcbcf),this[_0x2d0175(0x18c)]['get'](_0x4fffe9);}},_0x481fe2(_0x3fdf36[_0x484063(0x17e)],_0x484063(0x1c8),_0x163e9e),_0x481fe2(_0x3fdf36[_0x484063(0x17e)],_0x484063(0x1ec),_0x34b4ef[_0x484063(0x17b)][_0x484063(0x1e8)]),_0x3fdf36[_0x484063(0x17e)]=_0x5ae950([_0x34b4ef['DependentOn'](_0x54799e['UniverThreadCommentUIPlugin'],_0x1bf240[_0x484063(0x187)],_0x10c06b['UniverLicensePlugin']),_0x1654b8(0x1,_0x34b4ef['Inject'](_0x34b4ef[_0x484063(0x1e9)])),_0x1654b8(0x2,_0x34b4ef['IConfigService'])],_0x3fdf36[_0x484063(0x17e)]),Object[_0x484063(0x1cc)](_0x3fdf36,Symbol[_0x484063(0x1fd)],{'value':_0x484063(0x1bf)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.0-nightly.202506071606",
3
+ "version": "0.8.0-nightly.202506091607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/license": "0.8.0-nightly.202506071606",
49
- "@univerjs-pro/collaboration-client": "0.8.0-nightly.202506071606",
50
- "@univerjs/network": "0.8.0-nightly.202506071606",
48
+ "@univerjs-pro/collaboration-client": "0.8.0-nightly.202506091607",
49
+ "@univerjs/core": "0.8.0-nightly.202506091607",
50
+ "@univerjs-pro/license": "0.8.0-nightly.202506091607",
51
+ "@univerjs/network": "0.8.0-nightly.202506091607",
51
52
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/core": "0.8.0-nightly.202506071606",
53
- "@univerjs/thread-comment": "0.8.0-nightly.202506071606",
54
- "@univerjs/thread-comment-ui": "0.8.0-nightly.202506071606"
53
+ "@univerjs/thread-comment": "0.8.0-nightly.202506091607",
54
+ "@univerjs/thread-comment-ui": "0.8.0-nightly.202506091607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",