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

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 _0x21325b=_0x46a9;(function(_0x2aeb16,_0x2f1503){const _0x36ae43=_0x46a9,_0x2672b6=_0x2aeb16();while(!![]){try{const _0x225948=parseInt(_0x36ae43(0xf3))/0x1*(-parseInt(_0x36ae43(0xf1))/0x2)+-parseInt(_0x36ae43(0x159))/0x3*(parseInt(_0x36ae43(0x161))/0x4)+-parseInt(_0x36ae43(0x13b))/0x5+-parseInt(_0x36ae43(0x14b))/0x6+parseInt(_0x36ae43(0x141))/0x7+parseInt(_0x36ae43(0xe7))/0x8*(-parseInt(_0x36ae43(0xea))/0x9)+parseInt(_0x36ae43(0x14d))/0xa;if(_0x225948===_0x2f1503)break;else _0x2672b6['push'](_0x2672b6['shift']());}catch(_0x2bcbd7){_0x2672b6['push'](_0x2672b6['shift']());}}}(_0x4f79,0x9327b));function _0x4f79(){const _0x335382=['pluginName','Module','userID','thread-comment-data-source.config','reply','UniverInstanceType','rxjs','resolveComment','_sessionService','requireSession','listComments','2616745xHiQZv','merge','error','Unknown','getMemberID','/add','6903617xGnvno','addComment','bufferTime','delete','getCurrentUser','_configService','UserManagerService','IThreadCommentDataSourceService','_commentService','_injector','4496202aoWWdE','replies','33274430SOKhvH','_userService','post','CustomRangeType','parentId','get','createTimestamp','forEach','disposeWithMe','/reply','format','parse','370338uOGoKl','_threadCommentDataSource','onStarting','_config','user','/solved','UNIVER_UNKNOWN','pipe','12ftLPBM','Injector','filter','rangeId','content','Reply','8iVyMbT','getOwnPropertyDescriptor','subscribe','8823537dyVyfG','Delete','UniverCollaborationClientPlugin','root','_init','payload','YYYY/MM/DD\x20HH:mm','8PUebRv','replyId','271870pmIyvw','@univerjs/network','defineProperty','userId','_initDataSource','threadId','toStringTag','users','_threadCommentModel','length','/universer-api/user/list','size','UNRECOGNIZED','@univerjs/thread-comment-ui','/list','getComment','addUser','ThreadCommentModel','customRanges','HTTPService','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','code','OpenOrReOpen','@univerjs/core','IConfigService','Disposable','symbol','UniverLicensePlugin','Plugin','dayjs','UniverThreadCommentUIPlugin','CollaborationSessionService','Solved','stringify','@univerjs/thread-comment','_httpService','solved','deleteComment','COMMENT','body','Add','rangeType','unitId','ref','values','Inject','commentUpdate$','comment','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','getUnit','personId','map','Edit','find','add','Solve','type'];_0x4f79=function(){return _0x335382;};return _0x4f79();}Object[_0x21325b(0xf5)](exports,Symbol[_0x21325b(0xf9)],{'value':_0x21325b(0x131)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x21325b(0x10c)),j=require(_0x21325b(0x100)),M=require(_0x21325b(0x117)),w=require(_0x21325b(0x136)),P=require(_0x21325b(0xf4)),U=_0x21325b(0x126);var I=(_0x4e2ac=>(_0x4e2ac[_0x4e2ac[_0x21325b(0x10b)]=0x0]=_0x21325b(0x10b),_0x4e2ac[_0x4e2ac[_0x21325b(0x115)]=0x1]='Solved',_0x4e2ac[_0x4e2ac[_0x21325b(0xff)]=-0x1]=_0x21325b(0xff),_0x4e2ac))(I||{}),v=(_0x1abbec=>(_0x1abbec[_0x1abbec[_0x21325b(0x13e)]=0x0]=_0x21325b(0x13e),_0x1abbec[_0x1abbec['Add']=0x1]=_0x21325b(0x11d),_0x1abbec[_0x1abbec[_0x21325b(0xe6)]=0x2]=_0x21325b(0xe6),_0x1abbec[_0x1abbec[_0x21325b(0x12b)]=0x3]=_0x21325b(0x12b),_0x1abbec[_0x1abbec['Delete']=0x4]='Delete',_0x1abbec[_0x1abbec[_0x21325b(0x12e)]=0x5]=_0x21325b(0x12e),_0x1abbec[_0x1abbec[_0x21325b(0xff)]=-0x1]=_0x21325b(0xff),_0x1abbec))(v||{});const f=_0x252afa=>c['dayjs'](new Date(+_0x252afa))[_0x21325b(0x157)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x4905b5,_0x3207c3)=>{const _0x54b041=_0x21325b,_0x144cea=_0x4905b5['get'](c[_0x54b041(0x147)]),_0x479df8=_0x4905b5[_0x54b041(0x152)](P[_0x54b041(0x106)]);_0x3207c3[_0x54b041(0x154)](_0x803e65=>{const _0x5e33f6=_0x54b041;_0x144cea['getUser'](_0x803e65)&&_0x3207c3[_0x5e33f6(0x144)](_0x803e65);}),_0x3207c3[_0x54b041(0xfe)]&&(await _0x479df8[_0x54b041(0x152)](_0x54b041(0xfd),{'params':{'userIDs':[..._0x3207c3]}}))[_0x54b041(0x11c)][_0x54b041(0xfa)][_0x54b041(0x154)](_0x4baf69=>{const _0x51a572=_0x54b041;_0x4baf69&&_0x144cea[_0x51a572(0x103)](_0x4baf69);});};function _0x46a9(_0x55db11,_0x45e520){const _0x4f7938=_0x4f79();return _0x46a9=function(_0x46a9ae,_0x18998e){_0x46a9ae=_0x46a9ae-0xe4;let _0x2d6e04=_0x4f7938[_0x46a9ae];return _0x2d6e04;},_0x46a9(_0x55db11,_0x45e520);}var $=Object[_0x21325b(0xe8)],E=(_0x4d0469,_0x5ad803,_0x38006e,_0x5bbc6c)=>{const _0x429d04=_0x21325b;for(var _0x22aac3=_0x5bbc6c>0x1?void 0x0:_0x5bbc6c?$(_0x5ad803,_0x38006e):_0x5ad803,_0x3cadf6=_0x4d0469[_0x429d04(0xfc)]-0x1,_0x5190e9;_0x3cadf6>=0x0;_0x3cadf6--)(_0x5190e9=_0x4d0469[_0x3cadf6])&&(_0x22aac3=_0x5190e9(_0x22aac3)||_0x22aac3);return _0x22aac3;},S=(_0x596189,_0x2a103c)=>(_0x3f9362,_0x2a7b61)=>_0x2a103c(_0x3f9362,_0x2a7b61,_0x596189);let p=class extends c[_0x21325b(0x10e)]{constructor(_0x1342a6,_0x498522,_0x1589c8,_0x4c3b06){const _0x26f142=_0x21325b;super(),this[_0x26f142(0x149)]=_0x1342a6,this[_0x26f142(0xfb)]=_0x498522,this[_0x26f142(0x14e)]=_0x1589c8,this[_0x26f142(0x14a)]=_0x4c3b06,this[_0x26f142(0xee)](),this['_initUserSync']();}[_0x21325b(0x125)](){const _0x58bfe4=_0x21325b;this[_0x58bfe4(0x155)](this['_threadCommentModel'][_0x58bfe4(0x123)][_0x58bfe4(0x160)](w[_0x58bfe4(0x143)](0x10))['subscribe'](_0x114c04=>{const _0x5ce6d7=_0x58bfe4,_0x2e92f0=new Set();_0x114c04[_0x5ce6d7(0x154)](_0x28c10b=>{const _0x302a8d=_0x5ce6d7;switch(_0x28c10b['type']){case _0x302a8d(0x12d):{const _0x1ac7a8=_0x28c10b[_0x302a8d(0xef)][_0x302a8d(0x129)];_0x2e92f0[_0x302a8d(0x12d)](_0x1ac7a8);break;}}}),R(this[_0x5ce6d7(0x14a)],_0x2e92f0);}));}[_0x21325b(0xee)](){const _0x3c5e9b=_0x21325b;this['disposeWithMe'](this[_0x3c5e9b(0x149)][_0x3c5e9b(0x123)][_0x3c5e9b(0xe9)](async _0x50e4db=>{const _0x3c3319=_0x3c5e9b;var _0x14e0ab,_0x68a8ce,_0xf89c,_0x1e7009;const _0x345019=(_0x14e0ab=this[_0x3c3319(0xfb)][_0x3c3319(0x128)](_0x50e4db[_0x3c3319(0x11f)])[_0x3c3319(0x12c)](_0x129791=>_0x129791[_0x3c3319(0xf8)]===_0x50e4db[_0x3c3319(0xf8)]))==null?void 0x0:_0x14e0ab[_0x3c3319(0xed)];if(!_0x345019)return;const {unitId:_0x49b96b,subUnitId:_0x28c2b1}=_0x345019;switch(_0x50e4db[_0x3c3319(0x15d)]&&this['_userService'][_0x3c3319(0x103)](_0x50e4db[_0x3c3319(0x15d)]),_0x50e4db['type']){case v[_0x3c3319(0x11d)]:break;case v[_0x3c3319(0xe6)]:{this[_0x3c3319(0xfb)][_0x3c3319(0x142)](_0x49b96b,_0x28c2b1,{'unitId':_0x49b96b,'subUnitId':_0x28c2b1,'ref':'','id':_0x50e4db['replyId'],'dT':f(+_0x50e4db[_0x3c3319(0x153)]),'threadId':_0x50e4db['threadId'],'personId':(_0xf89c=(_0x68a8ce=_0x50e4db[_0x3c3319(0x15d)])==null?void 0x0:_0x68a8ce[_0x3c3319(0x132)])!=null?_0xf89c:_0x50e4db[_0x3c3319(0xf6)],'text':JSON['parse'](_0x50e4db[_0x3c3319(0xe5)]),'parentId':_0x345019['id']});break;}case v[_0x3c3319(0xeb)]:{const _0x4e84df=this['_threadCommentModel'][_0x3c3319(0x102)](_0x49b96b,_0x28c2b1,_0x50e4db[_0x3c3319(0xf2)]);_0x4e84df&&_0x4e84df[_0x3c3319(0x151)]&&this['_threadCommentModel'][_0x3c3319(0x11a)](_0x49b96b,_0x28c2b1,_0x50e4db[_0x3c3319(0xf2)]);break;}case v['Edit']:{this[_0x3c3319(0xfb)]['updateComment'](_0x49b96b,_0x28c2b1,{'commentId':_0x50e4db[_0x3c3319(0xf2)],'text':JSON['parse'](_0x50e4db[_0x3c3319(0xe5)])});break;}case v[_0x3c3319(0x12e)]:{const _0x4c53f9=(_0x1e7009=this[_0x3c3319(0xfb)]['getUnit'](_0x50e4db[_0x3c3319(0x11f)])['find'](_0x1e57b1=>_0x1e57b1[_0x3c3319(0xf8)]===_0x50e4db[_0x3c3319(0xf8)]))==null?void 0x0:_0x1e7009[_0x3c3319(0xed)];_0x4c53f9&&this['_threadCommentModel']['resolveComment'](_0x49b96b,_0x28c2b1,_0x4c53f9['id'],_0x50e4db[_0x3c3319(0x119)]===I[_0x3c3319(0x115)]);break;}}}));}};p=E([S(0x0,c[_0x21325b(0x122)](b['CommentService'])),S(0x1,c[_0x21325b(0x122)](M[_0x21325b(0x104)])),S(0x2,c[_0x21325b(0x122)](c[_0x21325b(0x147)])),S(0x3,c['Inject'](c[_0x21325b(0x162)]))],p);const q=_0x21325b(0x133),D={};var A=Object[_0x21325b(0xe8)],x=(_0x441b03,_0x5edd81,_0x4afd58,_0xed62a8)=>{for(var _0x36c987=_0xed62a8>0x1?void 0x0:_0xed62a8?A(_0x5edd81,_0x4afd58):_0x5edd81,_0x2c9aea=_0x441b03['length']-0x1,_0x5d265a;_0x2c9aea>=0x0;_0x2c9aea--)(_0x5d265a=_0x441b03[_0x2c9aea])&&(_0x36c987=_0x5d265a(_0x36c987)||_0x36c987);return _0x36c987;},_=(_0x1ea148,_0x72ad5e)=>(_0x4a30c9,_0x5d9588)=>_0x72ad5e(_0x4a30c9,_0x5d9588,_0x1ea148);function Y(_0x4e99c3,_0x19091f){const _0x30078b=_0x21325b,_0x29ce43=_0x4e99c3[_0x30078b(0x14c)][0x0];return{..._0x19091f,'id':_0x29ce43['replyId'],'resolved':_0x4e99c3[_0x30078b(0x119)]===0x1,'dT':f(_0x29ce43[_0x30078b(0x153)]),'personId':_0x29ce43[_0x30078b(0xf6)],'threadId':_0x29ce43['threadId']};}function G(_0x1363aa,_0x1e09b2,_0x4cfe0d){const _0x477480=_0x21325b;var _0x3c6b64,_0x1cca4e;if(((_0x1cca4e=(_0x3c6b64=_0x1363aa==null?void 0x0:_0x1363aa[_0x477480(0x14c)])==null?void 0x0:_0x3c6b64[_0x477480(0xfc)])!=null?_0x1cca4e:0x0)>0x0){const _0x11a92d=(_0x4cd4b9,_0x399fe0)=>({'id':_0x4cd4b9['replyId'],'threadId':_0x4cd4b9[_0x477480(0xf8)],'dT':f(_0x4cd4b9['createTimestamp']),'personId':_0x4cd4b9[_0x477480(0xf6)],'resolved':_0x1363aa[_0x477480(0x119)]===I[_0x477480(0x115)],'unitId':_0x1e09b2,'subUnitId':_0x4cfe0d,'text':JSON[_0x477480(0x158)](_0x4cd4b9[_0x477480(0xe5)]),'parentId':_0x399fe0}),_0x592814=_0x11a92d(_0x1363aa[_0x477480(0x14c)][0x0]);return{..._0x592814,'children':_0x1363aa[_0x477480(0x14c)][_0x477480(0x127)](0x1)['map'](_0x40069c=>_0x11a92d(_0x40069c,_0x592814['id']))};}return null;}let g=class{constructor(_0x3fa6b6,_0x38107c,_0x4d3000,_0x5931f1){const _0x223fc0=_0x21325b;this[_0x223fc0(0x118)]=_0x3fa6b6,this['_userService']=_0x38107c,this[_0x223fc0(0x138)]=_0x4d3000,this[_0x223fc0(0x14a)]=_0x5931f1;}async['addComment'](_0xc7a085){const _0x35fede=_0x21325b;var _0x18c24e,_0x99a67f;const {parentId:_0x35969b,unitId:_0x103b37,text:_0xf6d774,threadId:_0x28fd81}=_0xc7a085,_0x2e373d=(_0x99a67f=(_0x18c24e=_0xf6d774[_0x35fede(0x105)])==null?void 0x0:_0x18c24e['filter'](_0x432964=>_0x432964[_0x35fede(0x11e)]===c[_0x35fede(0x150)]['COMMENT'])[_0x35fede(0x12a)](_0x8f8577=>_0x8f8577[_0x35fede(0xe4)]))!=null?_0x99a67f:[],_0x5bcadb=JSON['stringify'](_0xf6d774),_0x3a9495=(await this[_0x35fede(0x138)][_0x35fede(0x139)](_0x103b37))[_0x35fede(0x13f)]();if(_0x35969b){const _0x532d6e={'memberId':_0x3a9495,'unitId':_0x103b37,'content':_0x5bcadb,'mention':_0x2e373d,'threadId':_0x28fd81},_0x5000e9=(await this[_0x35fede(0x118)][_0x35fede(0x14f)](_0x35fede(0x109)+_0x103b37+_0x35fede(0x156),{'body':_0x532d6e}))[_0x35fede(0x11c)][_0x35fede(0x134)];return{..._0xc7a085,'id':_0x5000e9[_0x35fede(0xf2)],'dT':c[_0x35fede(0x112)](+_0x5000e9[_0x35fede(0x153)])[_0x35fede(0x157)](_0x35fede(0xf0)),'personId':_0x5000e9[_0x35fede(0xf6)]};}else{const _0x1ca4c5={'memberId':_0x3a9495,'unitId':_0x103b37,'content':_0x5bcadb,'mention':_0x2e373d},_0x4bc4c8=await this[_0x35fede(0x118)]['post'](_0x35fede(0x109)+_0x103b37+_0x35fede(0x140),{'body':_0x1ca4c5});return Y(_0x4bc4c8[_0x35fede(0x11c)][_0x35fede(0x124)],_0xc7a085);}}async['updateComment'](_0x1e70d6){const _0x556b42=_0x21325b;var _0x5085e3,_0x279bf6;const {text:_0x14fc6b,unitId:_0x2e1c0b}=_0x1e70d6,_0x573b1a=(_0x279bf6=(_0x5085e3=_0x14fc6b[_0x556b42(0x105)])==null?void 0x0:_0x5085e3[_0x556b42(0x163)](_0x319de6=>_0x319de6[_0x556b42(0x11e)]===c[_0x556b42(0x150)][_0x556b42(0x11b)])[_0x556b42(0x12a)](_0x5c8459=>_0x5c8459[_0x556b42(0xe4)]))!=null?_0x279bf6:[],_0x355146=JSON[_0x556b42(0x116)](_0x14fc6b),_0x27a64b=_0x1e70d6[_0x556b42(0xf8)],_0x16af89=_0x1e70d6['id'],_0x4a932a={'memberId':(await this['_sessionService'][_0x556b42(0x139)](_0x2e1c0b))[_0x556b42(0x13f)](),'unitId':_0x2e1c0b,'threadId':_0x27a64b,'mention':_0x573b1a,'content':_0x355146,'replyId':_0x16af89},_0x2ac193=await this[_0x556b42(0x118)]['post'](_0x556b42(0x109)+_0x2e1c0b+'/edit',{'body':_0x4a932a});return!_0x2ac193[_0x556b42(0x11c)][_0x556b42(0x13d)]||_0x2ac193[_0x556b42(0x11c)][_0x556b42(0x13d)][_0x556b42(0x10a)]===0x1;}async[_0x21325b(0x137)](_0x5aab2f){const _0x91a5a1=_0x21325b,{unitId:_0x573e02}=_0x5aab2f,_0x7967dc=_0x5aab2f['threadId'],_0x43d23d={'memberId':this[_0x91a5a1(0x14e)][_0x91a5a1(0x145)]()[_0x91a5a1(0x132)],'unitId':_0x573e02,'threadId':_0x7967dc,'solved':_0x5aab2f['resolved']?I['Solved']:I[_0x91a5a1(0x10b)]},_0x376f94=await this[_0x91a5a1(0x118)][_0x91a5a1(0x14f)](_0x91a5a1(0x109)+_0x573e02+_0x91a5a1(0x15e),{'body':_0x43d23d});return!_0x376f94[_0x91a5a1(0x11c)][_0x91a5a1(0x13d)]||_0x376f94[_0x91a5a1(0x11c)]['error'][_0x91a5a1(0x10a)]===0x1;}async[_0x21325b(0x11a)](_0x3c8435,_0x17ee20,_0x5c4dac,_0x54d7f4){const _0xc81f88=_0x21325b,_0xaadcc={'memberId':(await this[_0xc81f88(0x138)][_0xc81f88(0x139)](_0x3c8435))[_0xc81f88(0x13f)](),'threadId':_0x5c4dac,'replyId':_0x54d7f4,'unitId':_0x3c8435},_0x59cedd=await this[_0xc81f88(0x118)][_0xc81f88(0x14f)](_0xc81f88(0x109)+_0x3c8435+'/delete',{'body':_0xaadcc});return!_0x59cedd[_0xc81f88(0x11c)][_0xc81f88(0x13d)]||_0x59cedd['body'][_0xc81f88(0x13d)][_0xc81f88(0x10a)]===0x1;}async[_0x21325b(0x13a)](_0x4214f0,_0xdd3913,_0x21bba4){const _0x472bac=_0x21325b,_0x10b300={'unitId':_0x4214f0,'threadId':_0x21bba4},_0x5739f2=await this[_0x472bac(0x118)][_0x472bac(0x14f)](_0x472bac(0x109)+_0x4214f0+_0x472bac(0x101),{'body':_0x10b300}),_0x139bf9=_0x21bba4[_0x472bac(0x12a)](_0x1a25b4=>G(_0x5739f2[_0x472bac(0x11c)]['comments'][_0x1a25b4],_0x4214f0,_0xdd3913))[_0x472bac(0x163)](Boolean);return Object[_0x472bac(0x121)](_0x5739f2['body'][_0x472bac(0xfa)])[_0x472bac(0x154)](_0x3031b4=>{const _0x47505d=_0x472bac;this[_0x47505d(0x14e)][_0x47505d(0x103)](_0x3031b4);}),_0x139bf9;}['saveCommentToSnapshot'](_0x34a0ae){const _0x36e751=_0x21325b;return{'id':_0x34a0ae['id'],'threadId':_0x34a0ae['threadId'],'ref':_0x34a0ae[_0x36e751(0x120)]};}};g=x([_(0x0,c[_0x21325b(0x122)](P[_0x21325b(0x106)])),_(0x1,c[_0x21325b(0x122)](c['UserManagerService'])),_(0x2,c[_0x21325b(0x122)](b[_0x21325b(0x114)])),_(0x3,c[_0x21325b(0x122)](c[_0x21325b(0x162)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x32f5d6,_0x4077cc,_0x179f8c,_0x59b948)=>{const _0x398eb4=_0x21325b;for(var _0x22879f=_0x59b948>0x1?void 0x0:_0x59b948?H(_0x4077cc,_0x179f8c):_0x4077cc,_0x25c3e0=_0x32f5d6[_0x398eb4(0xfc)]-0x1,_0x4c5ab7;_0x25c3e0>=0x0;_0x25c3e0--)(_0x4c5ab7=_0x32f5d6[_0x25c3e0])&&(_0x22879f=_0x4c5ab7(_0x22879f)||_0x22879f);return _0x22879f;},y=(_0x54b555,_0xbbd3fc)=>(_0x3d706c,_0x56415a)=>_0xbbd3fc(_0x3d706c,_0x56415a,_0x54b555);let C=class extends c[_0x21325b(0x10e)]{constructor(_0x39f347,_0x2e6910){const _0x4f2ce6=_0x21325b;super(),this['_threadCommentDataSourceService']=_0x39f347,this[_0x4f2ce6(0x15a)]=_0x2e6910,this[_0x4f2ce6(0xf7)]();}[_0x21325b(0xf7)](){const _0xda75b8=_0x21325b;this[_0xda75b8(0x107)]['dataSource']=this[_0xda75b8(0x15a)],this[_0xda75b8(0x107)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x21325b(0x148)]),y(0x1,c[_0x21325b(0x122)](g))],C);var F=Object[_0x21325b(0xf5)],L=Object[_0x21325b(0xe8)],Z=(_0x1da269,_0x10da19,_0x29adf9)=>_0x10da19 in _0x1da269?F(_0x1da269,_0x10da19,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29adf9}):_0x1da269[_0x10da19]=_0x29adf9,W=(_0x5b09ab,_0x35c451,_0x1030c7,_0x27fea2)=>{const _0x49d702=_0x21325b;for(var _0x478d68=_0x27fea2>0x1?void 0x0:_0x27fea2?L(_0x35c451,_0x1030c7):_0x35c451,_0x45d431=_0x5b09ab[_0x49d702(0xfc)]-0x1,_0x1858d4;_0x45d431>=0x0;_0x45d431--)(_0x1858d4=_0x5b09ab[_0x45d431])&&(_0x478d68=_0x1858d4(_0x478d68)||_0x478d68);return _0x478d68;},O=(_0x31212d,_0x27426f)=>(_0x2e5695,_0x2d1c0a)=>_0x27426f(_0x2e5695,_0x2d1c0a,_0x31212d),N=(_0xd0aa7f,_0x49024d,_0x456771)=>Z(_0xd0aa7f,typeof _0x49024d!=_0x21325b(0x10f)?_0x49024d+'':_0x49024d,_0x456771);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x21325b(0x111)]{constructor(_0xe0722c=D,_0x351257,_0x21f43b){const _0x119606=_0x21325b;super(),this[_0x119606(0x15c)]=_0xe0722c,this[_0x119606(0x14a)]=_0x351257,this['_configService']=_0x21f43b;const {..._0x45c58e}=c[_0x119606(0x13c)]({},D,this[_0x119606(0x15c)]);this[_0x119606(0x146)]['setConfig'](q,_0x45c58e);}[_0x21325b(0x15b)](){const _0x13b2ad=_0x21325b;[[g],[C],[p]][_0x13b2ad(0x154)](_0x4468da=>{const _0x4a0306=_0x13b2ad;this[_0x4a0306(0x14a)][_0x4a0306(0x12d)](_0x4468da);});}['onReady'](){const _0x376b38=_0x21325b;this[_0x376b38(0x14a)][_0x376b38(0x152)](C),this[_0x376b38(0x14a)][_0x376b38(0x152)](p);}},N(exports[_0x21325b(0x108)],_0x21325b(0x130),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x21325b(0x12f),c[_0x21325b(0x135)][_0x21325b(0x15f)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x21325b(0x113)],b[_0x21325b(0xec)],T[_0x21325b(0x110)]),O(0x1,c[_0x21325b(0x122)](c['Injector'])),O(0x2,c[_0x21325b(0x10d)])],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 _0xd7710b=_0x1d47;function _0x1d47(_0x42c727,_0x5bfbe4){const _0x5b7d2a=_0x5b7d();return _0x1d47=function(_0x1d4756,_0x19f082){_0x1d4756=_0x1d4756-0xd7;let _0x2956af=_0x5b7d2a[_0x1d4756];return _0x2956af;},_0x1d47(_0x42c727,_0x5bfbe4);}(function(_0x438eff,_0x43a904){const _0x149fad=_0x1d47,_0x56e657=_0x438eff();while(!![]){try{const _0x45cd28=parseInt(_0x149fad(0xfa))/0x1+-parseInt(_0x149fad(0x120))/0x2*(-parseInt(_0x149fad(0x10e))/0x3)+parseInt(_0x149fad(0x128))/0x4*(-parseInt(_0x149fad(0x126))/0x5)+-parseInt(_0x149fad(0x134))/0x6+-parseInt(_0x149fad(0xe0))/0x7*(parseInt(_0x149fad(0xec))/0x8)+parseInt(_0x149fad(0x114))/0x9*(-parseInt(_0x149fad(0xd9))/0xa)+parseInt(_0x149fad(0xfe))/0xb;if(_0x45cd28===_0x43a904)break;else _0x56e657['push'](_0x56e657['shift']());}catch(_0x32d357){_0x56e657['push'](_0x56e657['shift']());}}}(_0x5b7d,0x65113));function _0x5b7d(){const _0x4b29e0=['forEach','YYYY/MM/DD\x20HH:mm','_httpService','user','585jbeixQ','getComment','onStarting','threadId','Solve','type','format','saveCommentToSnapshot','users','getUnit','resolveComment','updateComment','23468mMnySj','UNIVER_UNKNOWN','/universer-api/comment/unit/','_threadCommentDataSourceService','setConfig','map','5jyrQIZ','comments','2336444KLSkJH','requireSession','slice','getOwnPropertyDescriptor','replies','_injector','onReady','addUser','UNRECOGNIZED','error','_initUserSync','_sessionService','364824iVylat','post','/reply','Reply','find','rangeId','/delete','Add','_threadCommentDataSource','29570BRvUdm','get','rangeType','/add','Unknown','userID','_commentService','7BanChc','_config','code','Delete','root','getMemberID','userId','subscribe','length','Edit','_init','/edit','5753544WzaNCj','reply','OpenOrReOpen','createTimestamp','_configService','/solved','add','addComment','_userService','_threadCommentModel','size','deleteComment','unitId','replyId','559453mDbYvO','Solved','personId','comment','14744697uGXjLN','_initDataSource','content','body','parse','parentId','disposeWithMe','payload','COMMENT','dataSource','filter','customRanges','solved','getCurrentUser','delete','values','18qbnfNh','stringify'];_0x5b7d=function(){return _0x4b29e0;};return _0x5b7d();}import{CommentService as _0x16caf3,CollaborationSessionService as _0x457475,UniverCollaborationClientPlugin as _0x1937c0}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d8b63}from'@univerjs-pro/license';import{dayjs as _0x2f02a1,UserManagerService as _0x464d0b,Inject as _0x1eb853,Injector as _0x47d469,Disposable as _0xad8c05,CustomRangeType as _0x4ee5e9,UniverInstanceType as _0x11d5ed,DependentOn as _0x836a12,IConfigService as _0x37892c,Plugin as _0x1a8cdb,merge as _0x3392b3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4818f8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x31a474,IThreadCommentDataSourceService as _0x1f6f34}from'@univerjs/thread-comment';import{bufferTime as _0x59cf22}from'rxjs';import{HTTPService as _0xd74d41}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2c5ed3=>(_0x2c5ed3[_0x2c5ed3['OpenOrReOpen']=0x0]=_0xd7710b(0xee),_0x2c5ed3[_0x2c5ed3[_0xd7710b(0xfb)]=0x1]='Solved',_0x2c5ed3[_0x2c5ed3[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x2c5ed3))(I||{}),v=(_0x5f4b1e=>(_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xdd)]=0x0]=_0xd7710b(0xdd),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xd7)]=0x1]=_0xd7710b(0xd7),_0x5f4b1e[_0x5f4b1e['Reply']=0x2]='Reply',_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe9)]=0x3]=_0xd7710b(0xe9),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe3)]=0x4]=_0xd7710b(0xe3),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x118)]=0x5]=_0xd7710b(0x118),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x5f4b1e))(v||{});const D=_0x19b0b3=>_0x2f02a1(new Date(+_0x19b0b3))[_0xd7710b(0x11a)](_0xd7710b(0x111)),B=async(_0x424b12,_0x5a9223)=>{const _0x3ea08c=_0xd7710b,_0x4c325b=_0x424b12[_0x3ea08c(0xda)](_0x464d0b),_0x3cce24=_0x424b12[_0x3ea08c(0xda)](_0xd74d41);_0x5a9223['forEach'](_0x3eb237=>{const _0x46390a=_0x3ea08c;_0x4c325b['getUser'](_0x3eb237)&&_0x5a9223[_0x46390a(0x10c)](_0x3eb237);}),_0x5a9223[_0x3ea08c(0xf6)]&&(await _0x3cce24[_0x3ea08c(0xda)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5a9223]}}))[_0x3ea08c(0x101)][_0x3ea08c(0x11c)][_0x3ea08c(0x110)](_0x556b4c=>{_0x556b4c&&_0x4c325b['addUser'](_0x556b4c);});};var K=Object[_0xd7710b(0x12b)],V=(_0x49d2f3,_0x5a3556,_0x57b034,_0x1fa525)=>{for(var _0x14cab0=_0x1fa525>0x1?void 0x0:_0x1fa525?K(_0x5a3556,_0x57b034):_0x5a3556,_0x3fd46f=_0x49d2f3['length']-0x1,_0x14647d;_0x3fd46f>=0x0;_0x3fd46f--)(_0x14647d=_0x49d2f3[_0x3fd46f])&&(_0x14cab0=_0x14647d(_0x14cab0)||_0x14cab0);return _0x14cab0;},p=(_0x4aa503,_0x5c9c3c)=>(_0x39ca9f,_0x5446c1)=>_0x5c9c3c(_0x39ca9f,_0x5446c1,_0x4aa503);let S=class extends _0xad8c05{constructor(_0x347bfe,_0x46e80a,_0x337dc7,_0x41d25c){const _0x25b102=_0xd7710b;super(),this[_0x25b102(0xdf)]=_0x347bfe,this[_0x25b102(0xf5)]=_0x46e80a,this[_0x25b102(0xf4)]=_0x337dc7,this[_0x25b102(0x12d)]=_0x41d25c,this[_0x25b102(0xea)](),this[_0x25b102(0x132)]();}[_0xd7710b(0x132)](){const _0x589ad9=_0xd7710b;this[_0x589ad9(0x104)](this[_0x589ad9(0xf5)]['commentUpdate$']['pipe'](_0x59cf22(0x10))[_0x589ad9(0xe7)](_0x4c4e76=>{const _0x2a3a67=_0x589ad9,_0x538fd7=new Set();_0x4c4e76[_0x2a3a67(0x110)](_0x5a6288=>{const _0x5a3d76=_0x2a3a67;switch(_0x5a6288[_0x5a3d76(0x119)]){case'add':{const _0x2e9161=_0x5a6288[_0x5a3d76(0x105)][_0x5a3d76(0xfc)];_0x538fd7[_0x5a3d76(0xf2)](_0x2e9161);break;}}}),B(this[_0x2a3a67(0x12d)],_0x538fd7);}));}[_0xd7710b(0xea)](){const _0xb2c303=_0xd7710b;this['disposeWithMe'](this[_0xb2c303(0xdf)]['commentUpdate$'][_0xb2c303(0xe7)](async _0x16b2ab=>{const _0x4f1cd9=_0xb2c303;var _0x32b6ac,_0x11dbb8,_0x4728f3,_0x211002;const _0x2462e4=(_0x32b6ac=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab[_0x4f1cd9(0xf8)])[_0x4f1cd9(0x138)](_0x2ad9b7=>_0x2ad9b7[_0x4f1cd9(0x117)]===_0x16b2ab['threadId']))==null?void 0x0:_0x32b6ac[_0x4f1cd9(0xe4)];if(!_0x2462e4)return;const {unitId:_0x4e2219,subUnitId:_0xa856f1}=_0x2462e4;switch(_0x16b2ab['user']&&this[_0x4f1cd9(0xf4)][_0x4f1cd9(0x12f)](_0x16b2ab[_0x4f1cd9(0x113)]),_0x16b2ab[_0x4f1cd9(0x119)]){case v[_0x4f1cd9(0xd7)]:break;case v[_0x4f1cd9(0x137)]:{this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf3)](_0x4e2219,_0xa856f1,{'unitId':_0x4e2219,'subUnitId':_0xa856f1,'ref':'','id':_0x16b2ab[_0x4f1cd9(0xf9)],'dT':D(+_0x16b2ab[_0x4f1cd9(0xef)]),'threadId':_0x16b2ab['threadId'],'personId':(_0x4728f3=(_0x11dbb8=_0x16b2ab['user'])==null?void 0x0:_0x11dbb8['userID'])!=null?_0x4728f3:_0x16b2ab['userId'],'text':JSON['parse'](_0x16b2ab[_0x4f1cd9(0x100)]),'parentId':_0x2462e4['id']});break;}case v[_0x4f1cd9(0xe3)]:{const _0x103231=this['_threadCommentModel'][_0x4f1cd9(0x115)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);_0x103231&&_0x103231[_0x4f1cd9(0x103)]&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf7)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);break;}case v[_0x4f1cd9(0xe9)]:{this['_threadCommentModel'][_0x4f1cd9(0x11f)](_0x4e2219,_0xa856f1,{'commentId':_0x16b2ab[_0x4f1cd9(0xf9)],'text':JSON[_0x4f1cd9(0x102)](_0x16b2ab[_0x4f1cd9(0x100)])});break;}case v[_0x4f1cd9(0x118)]:{const _0x2512c3=(_0x211002=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab['unitId'])[_0x4f1cd9(0x138)](_0x466030=>_0x466030[_0x4f1cd9(0x117)]===_0x16b2ab[_0x4f1cd9(0x117)]))==null?void 0x0:_0x211002['root'];_0x2512c3&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11e)](_0x4e2219,_0xa856f1,_0x2512c3['id'],_0x16b2ab[_0x4f1cd9(0x10a)]===I[_0x4f1cd9(0xfb)]);break;}}}));}};S=V([p(0x0,_0x1eb853(_0x16caf3)),p(0x1,_0x1eb853(_0x31a474)),p(0x2,_0x1eb853(_0x464d0b)),p(0x3,_0x1eb853(_0x47d469))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2ca295,_0x1d698b,_0x17c709,_0x5bd19f)=>{const _0x54f459=_0xd7710b;for(var _0x30752a=_0x5bd19f>0x1?void 0x0:_0x5bd19f?k(_0x1d698b,_0x17c709):_0x1d698b,_0x2d17a7=_0x2ca295[_0x54f459(0xe8)]-0x1,_0x49259e;_0x2d17a7>=0x0;_0x2d17a7--)(_0x49259e=_0x2ca295[_0x2d17a7])&&(_0x30752a=_0x49259e(_0x30752a)||_0x30752a);return _0x30752a;},_=(_0x4a285a,_0x4f5511)=>(_0x4a5bad,_0xbe27a3)=>_0x4f5511(_0x4a5bad,_0xbe27a3,_0x4a285a);function X(_0x3dbcd6,_0x2c83d5){const _0x52b9a0=_0xd7710b,_0x1d3100=_0x3dbcd6[_0x52b9a0(0x12c)][0x0];return{..._0x2c83d5,'id':_0x1d3100[_0x52b9a0(0xf9)],'resolved':_0x3dbcd6[_0x52b9a0(0x10a)]===0x1,'dT':D(_0x1d3100['createTimestamp']),'personId':_0x1d3100['userId'],'threadId':_0x1d3100[_0x52b9a0(0x117)]};}function ee(_0x34d1ed,_0x30a5ce,_0x41fbef){const _0x32f5e7=_0xd7710b;var _0x3fe4ec,_0x348b5a;if(((_0x348b5a=(_0x3fe4ec=_0x34d1ed==null?void 0x0:_0x34d1ed[_0x32f5e7(0x12c)])==null?void 0x0:_0x3fe4ec[_0x32f5e7(0xe8)])!=null?_0x348b5a:0x0)>0x0){const _0x36779e=(_0x9313bd,_0x479468)=>({'id':_0x9313bd[_0x32f5e7(0xf9)],'threadId':_0x9313bd[_0x32f5e7(0x117)],'dT':D(_0x9313bd['createTimestamp']),'personId':_0x9313bd[_0x32f5e7(0xe6)],'resolved':_0x34d1ed['solved']===I[_0x32f5e7(0xfb)],'unitId':_0x30a5ce,'subUnitId':_0x41fbef,'text':JSON[_0x32f5e7(0x102)](_0x9313bd['content']),'parentId':_0x479468}),_0xa46b0c=_0x36779e(_0x34d1ed[_0x32f5e7(0x12c)][0x0]);return{..._0xa46b0c,'children':_0x34d1ed[_0x32f5e7(0x12c)][_0x32f5e7(0x12a)](0x1)['map'](_0x3f1e85=>_0x36779e(_0x3f1e85,_0xa46b0c['id']))};}return null;}let f=class{constructor(_0x3bc38f,_0x28ef09,_0x366ffe,_0x44b4f0){const _0x188712=_0xd7710b;this[_0x188712(0x112)]=_0x3bc38f,this[_0x188712(0xf4)]=_0x28ef09,this[_0x188712(0x133)]=_0x366ffe,this[_0x188712(0x12d)]=_0x44b4f0;}async['addComment'](_0x4f79e6){const _0x53c2b7=_0xd7710b;var _0x7220b9,_0x2587f3;const {parentId:_0x5c30bb,unitId:_0x1a906e,text:_0x10c847,threadId:_0x3bfbc1}=_0x4f79e6,_0x1e5cbd=(_0x2587f3=(_0x7220b9=_0x10c847[_0x53c2b7(0x109)])==null?void 0x0:_0x7220b9[_0x53c2b7(0x108)](_0xed1617=>_0xed1617[_0x53c2b7(0xdb)]===_0x4ee5e9[_0x53c2b7(0x106)])[_0x53c2b7(0x125)](_0x51b76a=>_0x51b76a[_0x53c2b7(0x139)]))!=null?_0x2587f3:[],_0x27e53b=JSON['stringify'](_0x10c847),_0x488780=(await this[_0x53c2b7(0x133)][_0x53c2b7(0x129)](_0x1a906e))[_0x53c2b7(0xe5)]();if(_0x5c30bb){const _0x1d30a0={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd,'threadId':_0x3bfbc1},_0x43c0ea=(await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)](_0x53c2b7(0x122)+_0x1a906e+_0x53c2b7(0x136),{'body':_0x1d30a0}))[_0x53c2b7(0x101)][_0x53c2b7(0xed)];return{..._0x4f79e6,'id':_0x43c0ea['replyId'],'dT':_0x2f02a1(+_0x43c0ea[_0x53c2b7(0xef)])['format'](_0x53c2b7(0x111)),'personId':_0x43c0ea['userId']};}else{const _0x36f390={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd},_0x484bcc=await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)]('/universer-api/comment/unit/'+_0x1a906e+_0x53c2b7(0xdc),{'body':_0x36f390});return X(_0x484bcc[_0x53c2b7(0x101)][_0x53c2b7(0xfd)],_0x4f79e6);}}async[_0xd7710b(0x11f)](_0x1f8a5a){const _0x5e4f97=_0xd7710b;var _0x323766,_0x288817;const {text:_0x4bf748,unitId:_0x3b66a5}=_0x1f8a5a,_0x40dd43=(_0x288817=(_0x323766=_0x4bf748[_0x5e4f97(0x109)])==null?void 0x0:_0x323766[_0x5e4f97(0x108)](_0x88f52f=>_0x88f52f['rangeType']===_0x4ee5e9['COMMENT'])[_0x5e4f97(0x125)](_0x2de504=>_0x2de504['rangeId']))!=null?_0x288817:[],_0x37a1f6=JSON[_0x5e4f97(0x10f)](_0x4bf748),_0x426190=_0x1f8a5a[_0x5e4f97(0x117)],_0x5ecd9b=_0x1f8a5a['id'],_0x48fa59={'memberId':(await this['_sessionService'][_0x5e4f97(0x129)](_0x3b66a5))[_0x5e4f97(0xe5)](),'unitId':_0x3b66a5,'threadId':_0x426190,'mention':_0x40dd43,'content':_0x37a1f6,'replyId':_0x5ecd9b},_0x3836ad=await this[_0x5e4f97(0x112)][_0x5e4f97(0x135)](_0x5e4f97(0x122)+_0x3b66a5+_0x5e4f97(0xeb),{'body':_0x48fa59});return!_0x3836ad['body'][_0x5e4f97(0x131)]||_0x3836ad[_0x5e4f97(0x101)][_0x5e4f97(0x131)][_0x5e4f97(0xe2)]===0x1;}async['resolveComment'](_0x5a30b1){const _0x2e2cde=_0xd7710b,{unitId:_0x1d38c4}=_0x5a30b1,_0x38f42b=_0x5a30b1['threadId'],_0x3e12dc={'memberId':this[_0x2e2cde(0xf4)][_0x2e2cde(0x10b)]()[_0x2e2cde(0xde)],'unitId':_0x1d38c4,'threadId':_0x38f42b,'solved':_0x5a30b1['resolved']?I['Solved']:I[_0x2e2cde(0xee)]},_0x4cc3ff=await this['_httpService']['post'](_0x2e2cde(0x122)+_0x1d38c4+_0x2e2cde(0xf1),{'body':_0x3e12dc});return!_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]||_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]['code']===0x1;}async['deleteComment'](_0x3cc431,_0x1619c0,_0x48c0b3,_0x5b4297){const _0x4cb6a6=_0xd7710b,_0x3f27dc={'memberId':(await this[_0x4cb6a6(0x133)][_0x4cb6a6(0x129)](_0x3cc431))['getMemberID'](),'threadId':_0x48c0b3,'replyId':_0x5b4297,'unitId':_0x3cc431},_0x5a2009=await this[_0x4cb6a6(0x112)]['post'](_0x4cb6a6(0x122)+_0x3cc431+_0x4cb6a6(0x13a),{'body':_0x3f27dc});return!_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]||_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]['code']===0x1;}async['listComments'](_0x3b959e,_0x3db547,_0x215cc6){const _0x2a6c4b=_0xd7710b,_0x216491={'unitId':_0x3b959e,'threadId':_0x215cc6},_0x51eba8=await this[_0x2a6c4b(0x112)][_0x2a6c4b(0x135)]('/universer-api/comment/unit/'+_0x3b959e+'/list',{'body':_0x216491}),_0x552a57=_0x215cc6[_0x2a6c4b(0x125)](_0x1625f7=>ee(_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x127)][_0x1625f7],_0x3b959e,_0x3db547))['filter'](Boolean);return Object[_0x2a6c4b(0x10d)](_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x11c)])[_0x2a6c4b(0x110)](_0x491622=>{const _0x3ea6dd=_0x2a6c4b;this[_0x3ea6dd(0xf4)]['addUser'](_0x491622);}),_0x552a57;}[_0xd7710b(0x11b)](_0xb8f4d){const _0x195ed9=_0xd7710b;return{'id':_0xb8f4d['id'],'threadId':_0xb8f4d[_0x195ed9(0x117)],'ref':_0xb8f4d['ref']};}};f=Q([_(0x0,_0x1eb853(_0xd74d41)),_(0x1,_0x1eb853(_0x464d0b)),_(0x2,_0x1eb853(_0x457475)),_(0x3,_0x1eb853(_0x47d469))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x270747,_0x203b13,_0x177d9f,_0x345a49)=>{const _0x4a256b=_0xd7710b;for(var _0x2a5226=_0x345a49>0x1?void 0x0:_0x345a49?re(_0x203b13,_0x177d9f):_0x203b13,_0xd62d08=_0x270747[_0x4a256b(0xe8)]-0x1,_0x166336;_0xd62d08>=0x0;_0xd62d08--)(_0x166336=_0x270747[_0xd62d08])&&(_0x2a5226=_0x166336(_0x2a5226)||_0x2a5226);return _0x2a5226;},N=(_0x27cf96,_0x28a9e9)=>(_0x3f4182,_0x4e1379)=>_0x28a9e9(_0x3f4182,_0x4e1379,_0x27cf96);let g=class extends _0xad8c05{constructor(_0x4a0fbf,_0x3605c0){const _0x643c7a=_0xd7710b;super(),this['_threadCommentDataSourceService']=_0x4a0fbf,this['_threadCommentDataSource']=_0x3605c0,this[_0x643c7a(0xff)]();}['_initDataSource'](){const _0x8ef8d7=_0xd7710b;this[_0x8ef8d7(0x123)][_0x8ef8d7(0x107)]=this[_0x8ef8d7(0xd8)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x1f6f34),N(0x1,_0x1eb853(f))],g);var se=Object['defineProperty'],oe=Object[_0xd7710b(0x12b)],ne=(_0x4eb572,_0x5db4db,_0xa0053a)=>_0x5db4db in _0x4eb572?se(_0x4eb572,_0x5db4db,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa0053a}):_0x4eb572[_0x5db4db]=_0xa0053a,ie=(_0x4606c9,_0x285985,_0x5f12c3,_0x3e4c41)=>{const _0x146fb5=_0xd7710b;for(var _0x279174=_0x3e4c41>0x1?void 0x0:_0x3e4c41?oe(_0x285985,_0x5f12c3):_0x285985,_0x2b574c=_0x4606c9[_0x146fb5(0xe8)]-0x1,_0x4b1dee;_0x2b574c>=0x0;_0x2b574c--)(_0x4b1dee=_0x4606c9[_0x2b574c])&&(_0x279174=_0x4b1dee(_0x279174)||_0x279174);return _0x279174;},w=(_0x3775cc,_0x21372)=>(_0x28b495,_0x41fd76)=>_0x21372(_0x28b495,_0x41fd76,_0x3775cc),$=(_0x381115,_0x5e3ba6,_0x53b04e)=>ne(_0x381115,typeof _0x5e3ba6!='symbol'?_0x5e3ba6+'':_0x5e3ba6,_0x53b04e);let b=class extends _0x1a8cdb{constructor(_0x582d38=M,_0x1484d7,_0x2431de){const _0x5a5f93=_0xd7710b;super(),this['_config']=_0x582d38,this[_0x5a5f93(0x12d)]=_0x1484d7,this[_0x5a5f93(0xf0)]=_0x2431de;const {..._0x17c7c5}=_0x3392b3({},M,this[_0x5a5f93(0xe1)]);this[_0x5a5f93(0xf0)][_0x5a5f93(0x124)](z,_0x17c7c5);}[_0xd7710b(0x116)](){const _0x5a42bf=_0xd7710b;[[f],[g],[S]][_0x5a42bf(0x110)](_0x1d372=>{const _0x57ca00=_0x5a42bf;this['_injector'][_0x57ca00(0xf2)](_0x1d372);});}[_0xd7710b(0x12e)](){const _0x571be7=_0xd7710b;this[_0x571be7(0x12d)][_0x571be7(0xda)](g),this[_0x571be7(0x12d)][_0x571be7(0xda)](S);}};$(b,'pluginName',W),$(b,'type',_0x11d5ed[_0xd7710b(0x121)]),b=ie([_0x836a12(_0x4818f8,_0x1937c0,_0x5d8b63),w(0x1,_0x1eb853(_0x47d469)),w(0x2,_0x37892c)],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 _0xd7710b=_0x1d47;function _0x1d47(_0x42c727,_0x5bfbe4){const _0x5b7d2a=_0x5b7d();return _0x1d47=function(_0x1d4756,_0x19f082){_0x1d4756=_0x1d4756-0xd7;let _0x2956af=_0x5b7d2a[_0x1d4756];return _0x2956af;},_0x1d47(_0x42c727,_0x5bfbe4);}(function(_0x438eff,_0x43a904){const _0x149fad=_0x1d47,_0x56e657=_0x438eff();while(!![]){try{const _0x45cd28=parseInt(_0x149fad(0xfa))/0x1+-parseInt(_0x149fad(0x120))/0x2*(-parseInt(_0x149fad(0x10e))/0x3)+parseInt(_0x149fad(0x128))/0x4*(-parseInt(_0x149fad(0x126))/0x5)+-parseInt(_0x149fad(0x134))/0x6+-parseInt(_0x149fad(0xe0))/0x7*(parseInt(_0x149fad(0xec))/0x8)+parseInt(_0x149fad(0x114))/0x9*(-parseInt(_0x149fad(0xd9))/0xa)+parseInt(_0x149fad(0xfe))/0xb;if(_0x45cd28===_0x43a904)break;else _0x56e657['push'](_0x56e657['shift']());}catch(_0x32d357){_0x56e657['push'](_0x56e657['shift']());}}}(_0x5b7d,0x65113));function _0x5b7d(){const _0x4b29e0=['forEach','YYYY/MM/DD\x20HH:mm','_httpService','user','585jbeixQ','getComment','onStarting','threadId','Solve','type','format','saveCommentToSnapshot','users','getUnit','resolveComment','updateComment','23468mMnySj','UNIVER_UNKNOWN','/universer-api/comment/unit/','_threadCommentDataSourceService','setConfig','map','5jyrQIZ','comments','2336444KLSkJH','requireSession','slice','getOwnPropertyDescriptor','replies','_injector','onReady','addUser','UNRECOGNIZED','error','_initUserSync','_sessionService','364824iVylat','post','/reply','Reply','find','rangeId','/delete','Add','_threadCommentDataSource','29570BRvUdm','get','rangeType','/add','Unknown','userID','_commentService','7BanChc','_config','code','Delete','root','getMemberID','userId','subscribe','length','Edit','_init','/edit','5753544WzaNCj','reply','OpenOrReOpen','createTimestamp','_configService','/solved','add','addComment','_userService','_threadCommentModel','size','deleteComment','unitId','replyId','559453mDbYvO','Solved','personId','comment','14744697uGXjLN','_initDataSource','content','body','parse','parentId','disposeWithMe','payload','COMMENT','dataSource','filter','customRanges','solved','getCurrentUser','delete','values','18qbnfNh','stringify'];_0x5b7d=function(){return _0x4b29e0;};return _0x5b7d();}import{CommentService as _0x16caf3,CollaborationSessionService as _0x457475,UniverCollaborationClientPlugin as _0x1937c0}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d8b63}from'@univerjs-pro/license';import{dayjs as _0x2f02a1,UserManagerService as _0x464d0b,Inject as _0x1eb853,Injector as _0x47d469,Disposable as _0xad8c05,CustomRangeType as _0x4ee5e9,UniverInstanceType as _0x11d5ed,DependentOn as _0x836a12,IConfigService as _0x37892c,Plugin as _0x1a8cdb,merge as _0x3392b3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4818f8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x31a474,IThreadCommentDataSourceService as _0x1f6f34}from'@univerjs/thread-comment';import{bufferTime as _0x59cf22}from'rxjs';import{HTTPService as _0xd74d41}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2c5ed3=>(_0x2c5ed3[_0x2c5ed3['OpenOrReOpen']=0x0]=_0xd7710b(0xee),_0x2c5ed3[_0x2c5ed3[_0xd7710b(0xfb)]=0x1]='Solved',_0x2c5ed3[_0x2c5ed3[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x2c5ed3))(I||{}),v=(_0x5f4b1e=>(_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xdd)]=0x0]=_0xd7710b(0xdd),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xd7)]=0x1]=_0xd7710b(0xd7),_0x5f4b1e[_0x5f4b1e['Reply']=0x2]='Reply',_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe9)]=0x3]=_0xd7710b(0xe9),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe3)]=0x4]=_0xd7710b(0xe3),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x118)]=0x5]=_0xd7710b(0x118),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x5f4b1e))(v||{});const D=_0x19b0b3=>_0x2f02a1(new Date(+_0x19b0b3))[_0xd7710b(0x11a)](_0xd7710b(0x111)),B=async(_0x424b12,_0x5a9223)=>{const _0x3ea08c=_0xd7710b,_0x4c325b=_0x424b12[_0x3ea08c(0xda)](_0x464d0b),_0x3cce24=_0x424b12[_0x3ea08c(0xda)](_0xd74d41);_0x5a9223['forEach'](_0x3eb237=>{const _0x46390a=_0x3ea08c;_0x4c325b['getUser'](_0x3eb237)&&_0x5a9223[_0x46390a(0x10c)](_0x3eb237);}),_0x5a9223[_0x3ea08c(0xf6)]&&(await _0x3cce24[_0x3ea08c(0xda)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5a9223]}}))[_0x3ea08c(0x101)][_0x3ea08c(0x11c)][_0x3ea08c(0x110)](_0x556b4c=>{_0x556b4c&&_0x4c325b['addUser'](_0x556b4c);});};var K=Object[_0xd7710b(0x12b)],V=(_0x49d2f3,_0x5a3556,_0x57b034,_0x1fa525)=>{for(var _0x14cab0=_0x1fa525>0x1?void 0x0:_0x1fa525?K(_0x5a3556,_0x57b034):_0x5a3556,_0x3fd46f=_0x49d2f3['length']-0x1,_0x14647d;_0x3fd46f>=0x0;_0x3fd46f--)(_0x14647d=_0x49d2f3[_0x3fd46f])&&(_0x14cab0=_0x14647d(_0x14cab0)||_0x14cab0);return _0x14cab0;},p=(_0x4aa503,_0x5c9c3c)=>(_0x39ca9f,_0x5446c1)=>_0x5c9c3c(_0x39ca9f,_0x5446c1,_0x4aa503);let S=class extends _0xad8c05{constructor(_0x347bfe,_0x46e80a,_0x337dc7,_0x41d25c){const _0x25b102=_0xd7710b;super(),this[_0x25b102(0xdf)]=_0x347bfe,this[_0x25b102(0xf5)]=_0x46e80a,this[_0x25b102(0xf4)]=_0x337dc7,this[_0x25b102(0x12d)]=_0x41d25c,this[_0x25b102(0xea)](),this[_0x25b102(0x132)]();}[_0xd7710b(0x132)](){const _0x589ad9=_0xd7710b;this[_0x589ad9(0x104)](this[_0x589ad9(0xf5)]['commentUpdate$']['pipe'](_0x59cf22(0x10))[_0x589ad9(0xe7)](_0x4c4e76=>{const _0x2a3a67=_0x589ad9,_0x538fd7=new Set();_0x4c4e76[_0x2a3a67(0x110)](_0x5a6288=>{const _0x5a3d76=_0x2a3a67;switch(_0x5a6288[_0x5a3d76(0x119)]){case'add':{const _0x2e9161=_0x5a6288[_0x5a3d76(0x105)][_0x5a3d76(0xfc)];_0x538fd7[_0x5a3d76(0xf2)](_0x2e9161);break;}}}),B(this[_0x2a3a67(0x12d)],_0x538fd7);}));}[_0xd7710b(0xea)](){const _0xb2c303=_0xd7710b;this['disposeWithMe'](this[_0xb2c303(0xdf)]['commentUpdate$'][_0xb2c303(0xe7)](async _0x16b2ab=>{const _0x4f1cd9=_0xb2c303;var _0x32b6ac,_0x11dbb8,_0x4728f3,_0x211002;const _0x2462e4=(_0x32b6ac=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab[_0x4f1cd9(0xf8)])[_0x4f1cd9(0x138)](_0x2ad9b7=>_0x2ad9b7[_0x4f1cd9(0x117)]===_0x16b2ab['threadId']))==null?void 0x0:_0x32b6ac[_0x4f1cd9(0xe4)];if(!_0x2462e4)return;const {unitId:_0x4e2219,subUnitId:_0xa856f1}=_0x2462e4;switch(_0x16b2ab['user']&&this[_0x4f1cd9(0xf4)][_0x4f1cd9(0x12f)](_0x16b2ab[_0x4f1cd9(0x113)]),_0x16b2ab[_0x4f1cd9(0x119)]){case v[_0x4f1cd9(0xd7)]:break;case v[_0x4f1cd9(0x137)]:{this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf3)](_0x4e2219,_0xa856f1,{'unitId':_0x4e2219,'subUnitId':_0xa856f1,'ref':'','id':_0x16b2ab[_0x4f1cd9(0xf9)],'dT':D(+_0x16b2ab[_0x4f1cd9(0xef)]),'threadId':_0x16b2ab['threadId'],'personId':(_0x4728f3=(_0x11dbb8=_0x16b2ab['user'])==null?void 0x0:_0x11dbb8['userID'])!=null?_0x4728f3:_0x16b2ab['userId'],'text':JSON['parse'](_0x16b2ab[_0x4f1cd9(0x100)]),'parentId':_0x2462e4['id']});break;}case v[_0x4f1cd9(0xe3)]:{const _0x103231=this['_threadCommentModel'][_0x4f1cd9(0x115)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);_0x103231&&_0x103231[_0x4f1cd9(0x103)]&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf7)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);break;}case v[_0x4f1cd9(0xe9)]:{this['_threadCommentModel'][_0x4f1cd9(0x11f)](_0x4e2219,_0xa856f1,{'commentId':_0x16b2ab[_0x4f1cd9(0xf9)],'text':JSON[_0x4f1cd9(0x102)](_0x16b2ab[_0x4f1cd9(0x100)])});break;}case v[_0x4f1cd9(0x118)]:{const _0x2512c3=(_0x211002=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab['unitId'])[_0x4f1cd9(0x138)](_0x466030=>_0x466030[_0x4f1cd9(0x117)]===_0x16b2ab[_0x4f1cd9(0x117)]))==null?void 0x0:_0x211002['root'];_0x2512c3&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11e)](_0x4e2219,_0xa856f1,_0x2512c3['id'],_0x16b2ab[_0x4f1cd9(0x10a)]===I[_0x4f1cd9(0xfb)]);break;}}}));}};S=V([p(0x0,_0x1eb853(_0x16caf3)),p(0x1,_0x1eb853(_0x31a474)),p(0x2,_0x1eb853(_0x464d0b)),p(0x3,_0x1eb853(_0x47d469))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2ca295,_0x1d698b,_0x17c709,_0x5bd19f)=>{const _0x54f459=_0xd7710b;for(var _0x30752a=_0x5bd19f>0x1?void 0x0:_0x5bd19f?k(_0x1d698b,_0x17c709):_0x1d698b,_0x2d17a7=_0x2ca295[_0x54f459(0xe8)]-0x1,_0x49259e;_0x2d17a7>=0x0;_0x2d17a7--)(_0x49259e=_0x2ca295[_0x2d17a7])&&(_0x30752a=_0x49259e(_0x30752a)||_0x30752a);return _0x30752a;},_=(_0x4a285a,_0x4f5511)=>(_0x4a5bad,_0xbe27a3)=>_0x4f5511(_0x4a5bad,_0xbe27a3,_0x4a285a);function X(_0x3dbcd6,_0x2c83d5){const _0x52b9a0=_0xd7710b,_0x1d3100=_0x3dbcd6[_0x52b9a0(0x12c)][0x0];return{..._0x2c83d5,'id':_0x1d3100[_0x52b9a0(0xf9)],'resolved':_0x3dbcd6[_0x52b9a0(0x10a)]===0x1,'dT':D(_0x1d3100['createTimestamp']),'personId':_0x1d3100['userId'],'threadId':_0x1d3100[_0x52b9a0(0x117)]};}function ee(_0x34d1ed,_0x30a5ce,_0x41fbef){const _0x32f5e7=_0xd7710b;var _0x3fe4ec,_0x348b5a;if(((_0x348b5a=(_0x3fe4ec=_0x34d1ed==null?void 0x0:_0x34d1ed[_0x32f5e7(0x12c)])==null?void 0x0:_0x3fe4ec[_0x32f5e7(0xe8)])!=null?_0x348b5a:0x0)>0x0){const _0x36779e=(_0x9313bd,_0x479468)=>({'id':_0x9313bd[_0x32f5e7(0xf9)],'threadId':_0x9313bd[_0x32f5e7(0x117)],'dT':D(_0x9313bd['createTimestamp']),'personId':_0x9313bd[_0x32f5e7(0xe6)],'resolved':_0x34d1ed['solved']===I[_0x32f5e7(0xfb)],'unitId':_0x30a5ce,'subUnitId':_0x41fbef,'text':JSON[_0x32f5e7(0x102)](_0x9313bd['content']),'parentId':_0x479468}),_0xa46b0c=_0x36779e(_0x34d1ed[_0x32f5e7(0x12c)][0x0]);return{..._0xa46b0c,'children':_0x34d1ed[_0x32f5e7(0x12c)][_0x32f5e7(0x12a)](0x1)['map'](_0x3f1e85=>_0x36779e(_0x3f1e85,_0xa46b0c['id']))};}return null;}let f=class{constructor(_0x3bc38f,_0x28ef09,_0x366ffe,_0x44b4f0){const _0x188712=_0xd7710b;this[_0x188712(0x112)]=_0x3bc38f,this[_0x188712(0xf4)]=_0x28ef09,this[_0x188712(0x133)]=_0x366ffe,this[_0x188712(0x12d)]=_0x44b4f0;}async['addComment'](_0x4f79e6){const _0x53c2b7=_0xd7710b;var _0x7220b9,_0x2587f3;const {parentId:_0x5c30bb,unitId:_0x1a906e,text:_0x10c847,threadId:_0x3bfbc1}=_0x4f79e6,_0x1e5cbd=(_0x2587f3=(_0x7220b9=_0x10c847[_0x53c2b7(0x109)])==null?void 0x0:_0x7220b9[_0x53c2b7(0x108)](_0xed1617=>_0xed1617[_0x53c2b7(0xdb)]===_0x4ee5e9[_0x53c2b7(0x106)])[_0x53c2b7(0x125)](_0x51b76a=>_0x51b76a[_0x53c2b7(0x139)]))!=null?_0x2587f3:[],_0x27e53b=JSON['stringify'](_0x10c847),_0x488780=(await this[_0x53c2b7(0x133)][_0x53c2b7(0x129)](_0x1a906e))[_0x53c2b7(0xe5)]();if(_0x5c30bb){const _0x1d30a0={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd,'threadId':_0x3bfbc1},_0x43c0ea=(await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)](_0x53c2b7(0x122)+_0x1a906e+_0x53c2b7(0x136),{'body':_0x1d30a0}))[_0x53c2b7(0x101)][_0x53c2b7(0xed)];return{..._0x4f79e6,'id':_0x43c0ea['replyId'],'dT':_0x2f02a1(+_0x43c0ea[_0x53c2b7(0xef)])['format'](_0x53c2b7(0x111)),'personId':_0x43c0ea['userId']};}else{const _0x36f390={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd},_0x484bcc=await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)]('/universer-api/comment/unit/'+_0x1a906e+_0x53c2b7(0xdc),{'body':_0x36f390});return X(_0x484bcc[_0x53c2b7(0x101)][_0x53c2b7(0xfd)],_0x4f79e6);}}async[_0xd7710b(0x11f)](_0x1f8a5a){const _0x5e4f97=_0xd7710b;var _0x323766,_0x288817;const {text:_0x4bf748,unitId:_0x3b66a5}=_0x1f8a5a,_0x40dd43=(_0x288817=(_0x323766=_0x4bf748[_0x5e4f97(0x109)])==null?void 0x0:_0x323766[_0x5e4f97(0x108)](_0x88f52f=>_0x88f52f['rangeType']===_0x4ee5e9['COMMENT'])[_0x5e4f97(0x125)](_0x2de504=>_0x2de504['rangeId']))!=null?_0x288817:[],_0x37a1f6=JSON[_0x5e4f97(0x10f)](_0x4bf748),_0x426190=_0x1f8a5a[_0x5e4f97(0x117)],_0x5ecd9b=_0x1f8a5a['id'],_0x48fa59={'memberId':(await this['_sessionService'][_0x5e4f97(0x129)](_0x3b66a5))[_0x5e4f97(0xe5)](),'unitId':_0x3b66a5,'threadId':_0x426190,'mention':_0x40dd43,'content':_0x37a1f6,'replyId':_0x5ecd9b},_0x3836ad=await this[_0x5e4f97(0x112)][_0x5e4f97(0x135)](_0x5e4f97(0x122)+_0x3b66a5+_0x5e4f97(0xeb),{'body':_0x48fa59});return!_0x3836ad['body'][_0x5e4f97(0x131)]||_0x3836ad[_0x5e4f97(0x101)][_0x5e4f97(0x131)][_0x5e4f97(0xe2)]===0x1;}async['resolveComment'](_0x5a30b1){const _0x2e2cde=_0xd7710b,{unitId:_0x1d38c4}=_0x5a30b1,_0x38f42b=_0x5a30b1['threadId'],_0x3e12dc={'memberId':this[_0x2e2cde(0xf4)][_0x2e2cde(0x10b)]()[_0x2e2cde(0xde)],'unitId':_0x1d38c4,'threadId':_0x38f42b,'solved':_0x5a30b1['resolved']?I['Solved']:I[_0x2e2cde(0xee)]},_0x4cc3ff=await this['_httpService']['post'](_0x2e2cde(0x122)+_0x1d38c4+_0x2e2cde(0xf1),{'body':_0x3e12dc});return!_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]||_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]['code']===0x1;}async['deleteComment'](_0x3cc431,_0x1619c0,_0x48c0b3,_0x5b4297){const _0x4cb6a6=_0xd7710b,_0x3f27dc={'memberId':(await this[_0x4cb6a6(0x133)][_0x4cb6a6(0x129)](_0x3cc431))['getMemberID'](),'threadId':_0x48c0b3,'replyId':_0x5b4297,'unitId':_0x3cc431},_0x5a2009=await this[_0x4cb6a6(0x112)]['post'](_0x4cb6a6(0x122)+_0x3cc431+_0x4cb6a6(0x13a),{'body':_0x3f27dc});return!_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]||_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]['code']===0x1;}async['listComments'](_0x3b959e,_0x3db547,_0x215cc6){const _0x2a6c4b=_0xd7710b,_0x216491={'unitId':_0x3b959e,'threadId':_0x215cc6},_0x51eba8=await this[_0x2a6c4b(0x112)][_0x2a6c4b(0x135)]('/universer-api/comment/unit/'+_0x3b959e+'/list',{'body':_0x216491}),_0x552a57=_0x215cc6[_0x2a6c4b(0x125)](_0x1625f7=>ee(_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x127)][_0x1625f7],_0x3b959e,_0x3db547))['filter'](Boolean);return Object[_0x2a6c4b(0x10d)](_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x11c)])[_0x2a6c4b(0x110)](_0x491622=>{const _0x3ea6dd=_0x2a6c4b;this[_0x3ea6dd(0xf4)]['addUser'](_0x491622);}),_0x552a57;}[_0xd7710b(0x11b)](_0xb8f4d){const _0x195ed9=_0xd7710b;return{'id':_0xb8f4d['id'],'threadId':_0xb8f4d[_0x195ed9(0x117)],'ref':_0xb8f4d['ref']};}};f=Q([_(0x0,_0x1eb853(_0xd74d41)),_(0x1,_0x1eb853(_0x464d0b)),_(0x2,_0x1eb853(_0x457475)),_(0x3,_0x1eb853(_0x47d469))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x270747,_0x203b13,_0x177d9f,_0x345a49)=>{const _0x4a256b=_0xd7710b;for(var _0x2a5226=_0x345a49>0x1?void 0x0:_0x345a49?re(_0x203b13,_0x177d9f):_0x203b13,_0xd62d08=_0x270747[_0x4a256b(0xe8)]-0x1,_0x166336;_0xd62d08>=0x0;_0xd62d08--)(_0x166336=_0x270747[_0xd62d08])&&(_0x2a5226=_0x166336(_0x2a5226)||_0x2a5226);return _0x2a5226;},N=(_0x27cf96,_0x28a9e9)=>(_0x3f4182,_0x4e1379)=>_0x28a9e9(_0x3f4182,_0x4e1379,_0x27cf96);let g=class extends _0xad8c05{constructor(_0x4a0fbf,_0x3605c0){const _0x643c7a=_0xd7710b;super(),this['_threadCommentDataSourceService']=_0x4a0fbf,this['_threadCommentDataSource']=_0x3605c0,this[_0x643c7a(0xff)]();}['_initDataSource'](){const _0x8ef8d7=_0xd7710b;this[_0x8ef8d7(0x123)][_0x8ef8d7(0x107)]=this[_0x8ef8d7(0xd8)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x1f6f34),N(0x1,_0x1eb853(f))],g);var se=Object['defineProperty'],oe=Object[_0xd7710b(0x12b)],ne=(_0x4eb572,_0x5db4db,_0xa0053a)=>_0x5db4db in _0x4eb572?se(_0x4eb572,_0x5db4db,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa0053a}):_0x4eb572[_0x5db4db]=_0xa0053a,ie=(_0x4606c9,_0x285985,_0x5f12c3,_0x3e4c41)=>{const _0x146fb5=_0xd7710b;for(var _0x279174=_0x3e4c41>0x1?void 0x0:_0x3e4c41?oe(_0x285985,_0x5f12c3):_0x285985,_0x2b574c=_0x4606c9[_0x146fb5(0xe8)]-0x1,_0x4b1dee;_0x2b574c>=0x0;_0x2b574c--)(_0x4b1dee=_0x4606c9[_0x2b574c])&&(_0x279174=_0x4b1dee(_0x279174)||_0x279174);return _0x279174;},w=(_0x3775cc,_0x21372)=>(_0x28b495,_0x41fd76)=>_0x21372(_0x28b495,_0x41fd76,_0x3775cc),$=(_0x381115,_0x5e3ba6,_0x53b04e)=>ne(_0x381115,typeof _0x5e3ba6!='symbol'?_0x5e3ba6+'':_0x5e3ba6,_0x53b04e);let b=class extends _0x1a8cdb{constructor(_0x582d38=M,_0x1484d7,_0x2431de){const _0x5a5f93=_0xd7710b;super(),this['_config']=_0x582d38,this[_0x5a5f93(0x12d)]=_0x1484d7,this[_0x5a5f93(0xf0)]=_0x2431de;const {..._0x17c7c5}=_0x3392b3({},M,this[_0x5a5f93(0xe1)]);this[_0x5a5f93(0xf0)][_0x5a5f93(0x124)](z,_0x17c7c5);}[_0xd7710b(0x116)](){const _0x5a42bf=_0xd7710b;[[f],[g],[S]][_0x5a42bf(0x110)](_0x1d372=>{const _0x57ca00=_0x5a42bf;this['_injector'][_0x57ca00(0xf2)](_0x1d372);});}[_0xd7710b(0x12e)](){const _0x571be7=_0xd7710b;this[_0x571be7(0x12d)][_0x571be7(0xda)](g),this[_0x571be7(0x12d)][_0x571be7(0xda)](S);}};$(b,'pluginName',W),$(b,'type',_0x11d5ed[_0xd7710b(0x121)]),b=ie([_0x836a12(_0x4818f8,_0x1937c0,_0x5d8b63),w(0x1,_0x1eb853(_0x47d469)),w(0x2,_0x37892c)],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(_0x4670e0,_0x158f0e){const _0x45bc9d=_0x15a3,_0x2d6c41=_0x4670e0();while(!![]){try{const _0xb96cdf=-parseInt(_0x45bc9d(0x254))/0x1*(parseInt(_0x45bc9d(0x25f))/0x2)+-parseInt(_0x45bc9d(0x21f))/0x3*(-parseInt(_0x45bc9d(0x217))/0x4)+parseInt(_0x45bc9d(0x1df))/0x5+parseInt(_0x45bc9d(0x1fb))/0x6*(parseInt(_0x45bc9d(0x214))/0x7)+-parseInt(_0x45bc9d(0x256))/0x8*(-parseInt(_0x45bc9d(0x233))/0x9)+-parseInt(_0x45bc9d(0x21e))/0xa+parseInt(_0x45bc9d(0x22a))/0xb*(parseInt(_0x45bc9d(0x212))/0xc);if(_0xb96cdf===_0x158f0e)break;else _0x2d6c41['push'](_0x2d6c41['shift']());}catch(_0xcf551f){_0x2d6c41['push'](_0x2d6c41['shift']());}}}(_0x20d6,0x1be5e),function(_0x34df6c,_0x4d28b8){const _0x43fbaa=_0x15a3;typeof exports==_0x43fbaa(0x21b)&&typeof module<'u'?_0x4d28b8(exports,require('@univerjs-pro/collaboration-client'),require(_0x43fbaa(0x257)),require(_0x43fbaa(0x24f)),require('@univerjs/thread-comment-ui'),require(_0x43fbaa(0x22e)),require(_0x43fbaa(0x1e4)),require(_0x43fbaa(0x230))):typeof define==_0x43fbaa(0x207)&&define[_0x43fbaa(0x252)]?define([_0x43fbaa(0x237),'@univerjs-pro/collaboration-client',_0x43fbaa(0x257),_0x43fbaa(0x24f),'@univerjs/thread-comment-ui',_0x43fbaa(0x22e),_0x43fbaa(0x1e4),_0x43fbaa(0x230)],_0x4d28b8):(_0x34df6c=typeof globalThis<'u'?globalThis:_0x34df6c||self,_0x4d28b8(_0x34df6c[_0x43fbaa(0x1e1)]={},_0x34df6c[_0x43fbaa(0x1eb)],_0x34df6c[_0x43fbaa(0x251)],_0x34df6c['UniverCore'],_0x34df6c[_0x43fbaa(0x23c)],_0x34df6c[_0x43fbaa(0x22b)],_0x34df6c[_0x43fbaa(0x1e4)],_0x34df6c[_0x43fbaa(0x236)]));}(this,function(_0x5e69b2,_0x3a27fd,_0x15130b,_0x1d3be7,_0x3741cb,_0x302edf,_0x4c1ac0,_0x133836){'use strict';const _0x4ae833=_0x15a3;const _0x298213=_0x4ae833(0x1ff);var _0x183da8=(_0x44a71d=>(_0x44a71d[_0x44a71d[_0x4ae833(0x224)]=0x0]=_0x4ae833(0x224),_0x44a71d[_0x44a71d[_0x4ae833(0x231)]=0x1]=_0x4ae833(0x231),_0x44a71d[_0x44a71d[_0x4ae833(0x1dd)]=-0x1]=_0x4ae833(0x1dd),_0x44a71d))(_0x183da8||{}),_0x36e997=(_0xb22c32=>(_0xb22c32[_0xb22c32[_0x4ae833(0x25a)]=0x0]=_0x4ae833(0x25a),_0xb22c32[_0xb22c32[_0x4ae833(0x1ea)]=0x1]=_0x4ae833(0x1ea),_0xb22c32[_0xb22c32[_0x4ae833(0x206)]=0x2]=_0x4ae833(0x206),_0xb22c32[_0xb22c32[_0x4ae833(0x1ef)]=0x3]=_0x4ae833(0x1ef),_0xb22c32[_0xb22c32[_0x4ae833(0x25b)]=0x4]=_0x4ae833(0x25b),_0xb22c32[_0xb22c32[_0x4ae833(0x208)]=0x5]=_0x4ae833(0x208),_0xb22c32[_0xb22c32[_0x4ae833(0x1dd)]=-0x1]=_0x4ae833(0x1dd),_0xb22c32))(_0x36e997||{});const _0x578bb4=_0x295b36=>_0x1d3be7['dayjs'](new Date(+_0x295b36))[_0x4ae833(0x201)](_0x4ae833(0x248)),_0x21e6ef=async(_0xfc7a42,_0x1b6f07)=>{const _0x567ac9=_0x4ae833,_0x35ab64=_0xfc7a42[_0x567ac9(0x259)](_0x1d3be7[_0x567ac9(0x218)]),_0x33dde5=_0xfc7a42[_0x567ac9(0x259)](_0x133836['HTTPService']);_0x1b6f07[_0x567ac9(0x24d)](_0x1d210f=>{const _0x14cc0c=_0x567ac9;_0x35ab64['getUser'](_0x1d210f)&&_0x1b6f07[_0x14cc0c(0x202)](_0x1d210f);}),_0x1b6f07[_0x567ac9(0x1f5)]&&(await _0x33dde5['get'](_0x567ac9(0x249),{'params':{'userIDs':[..._0x1b6f07]}}))['body']['users'][_0x567ac9(0x24d)](_0x5896f5=>{const _0x20ac15=_0x567ac9;_0x5896f5&&_0x35ab64[_0x20ac15(0x20e)](_0x5896f5);});};var _0x17c02b=Object[_0x4ae833(0x21d)],_0x3b2ab1=(_0x415553,_0xabf5be,_0x22cbc3,_0x31f1e4)=>{const _0x285188=_0x4ae833;for(var _0x222294=_0x31f1e4>0x1?void 0x0:_0x31f1e4?_0x17c02b(_0xabf5be,_0x22cbc3):_0xabf5be,_0x1680b5=_0x415553[_0x285188(0x23a)]-0x1,_0x395a29;_0x1680b5>=0x0;_0x1680b5--)(_0x395a29=_0x415553[_0x1680b5])&&(_0x222294=_0x395a29(_0x222294)||_0x222294);return _0x222294;},_0x1c19c8=(_0x496eb9,_0x170083)=>(_0x47c363,_0x4c0d08)=>_0x170083(_0x47c363,_0x4c0d08,_0x496eb9);let _0x999c5=class extends _0x1d3be7[_0x4ae833(0x23e)]{constructor(_0x42728f,_0x5e2384,_0x3b1c38,_0x195ed0){const _0x16135a=_0x4ae833;super(),this[_0x16135a(0x1fc)]=_0x42728f,this[_0x16135a(0x23d)]=_0x5e2384,this[_0x16135a(0x258)]=_0x3b1c38,this['_injector']=_0x195ed0,this[_0x16135a(0x247)](),this[_0x16135a(0x1e8)]();}['_initUserSync'](){const _0x77b237=_0x4ae833;this[_0x77b237(0x23b)](this[_0x77b237(0x23d)][_0x77b237(0x255)]['pipe'](_0x4c1ac0['bufferTime'](0x10))[_0x77b237(0x21c)](_0x2fa11d=>{const _0x54334a=_0x77b237,_0x208f59=new Set();_0x2fa11d['forEach'](_0x3b4357=>{const _0x4e1a55=_0x15a3;switch(_0x3b4357[_0x4e1a55(0x245)]){case'add':{const _0x55ac43=_0x3b4357[_0x4e1a55(0x24c)][_0x4e1a55(0x1de)];_0x208f59['add'](_0x55ac43);break;}}}),_0x21e6ef(this[_0x54334a(0x241)],_0x208f59);}));}[_0x4ae833(0x247)](){const _0x4f4d1a=_0x4ae833;this[_0x4f4d1a(0x23b)](this[_0x4f4d1a(0x1fc)]['commentUpdate$']['subscribe'](async _0x119759=>{const _0x22e9dc=_0x4f4d1a;var _0xcdaf04,_0x4f09a2,_0x4b43ed,_0x19a34c;const _0x3aabf0=(_0xcdaf04=this[_0x22e9dc(0x23d)][_0x22e9dc(0x1fe)](_0x119759[_0x22e9dc(0x226)])[_0x22e9dc(0x222)](_0x4624a8=>_0x4624a8[_0x22e9dc(0x229)]===_0x119759[_0x22e9dc(0x229)]))==null?void 0x0:_0xcdaf04[_0x22e9dc(0x26a)];if(!_0x3aabf0)return;const {unitId:_0x3e2383,subUnitId:_0x336f8a}=_0x3aabf0;switch(_0x119759[_0x22e9dc(0x1f8)]&&this[_0x22e9dc(0x258)][_0x22e9dc(0x20e)](_0x119759[_0x22e9dc(0x1f8)]),_0x119759[_0x22e9dc(0x245)]){case _0x36e997[_0x22e9dc(0x1ea)]:break;case _0x36e997[_0x22e9dc(0x206)]:{this['_threadCommentModel']['addComment'](_0x3e2383,_0x336f8a,{'unitId':_0x3e2383,'subUnitId':_0x336f8a,'ref':'','id':_0x119759['replyId'],'dT':_0x578bb4(+_0x119759[_0x22e9dc(0x240)]),'threadId':_0x119759[_0x22e9dc(0x229)],'personId':(_0x4b43ed=(_0x4f09a2=_0x119759[_0x22e9dc(0x1f8)])==null?void 0x0:_0x4f09a2[_0x22e9dc(0x22f)])!=null?_0x4b43ed:_0x119759[_0x22e9dc(0x1e2)],'text':JSON['parse'](_0x119759['content']),'parentId':_0x3aabf0['id']});break;}case _0x36e997[_0x22e9dc(0x25b)]:{const _0x206c77=this[_0x22e9dc(0x23d)][_0x22e9dc(0x23f)](_0x3e2383,_0x336f8a,_0x119759[_0x22e9dc(0x1f3)]);_0x206c77&&_0x206c77[_0x22e9dc(0x265)]&&this['_threadCommentModel'][_0x22e9dc(0x1e5)](_0x3e2383,_0x336f8a,_0x119759[_0x22e9dc(0x1f3)]);break;}case _0x36e997['Edit']:{this['_threadCommentModel'][_0x22e9dc(0x1ed)](_0x3e2383,_0x336f8a,{'commentId':_0x119759[_0x22e9dc(0x1f3)],'text':JSON[_0x22e9dc(0x263)](_0x119759['content'])});break;}case _0x36e997[_0x22e9dc(0x208)]:{const _0x3623ef=(_0x19a34c=this[_0x22e9dc(0x23d)][_0x22e9dc(0x1fe)](_0x119759['unitId'])['find'](_0x4a0886=>_0x4a0886[_0x22e9dc(0x229)]===_0x119759['threadId']))==null?void 0x0:_0x19a34c['root'];_0x3623ef&&this[_0x22e9dc(0x23d)][_0x22e9dc(0x1f4)](_0x3e2383,_0x336f8a,_0x3623ef['id'],_0x119759['solved']===_0x183da8[_0x22e9dc(0x231)]);break;}}}));}};_0x999c5=_0x3b2ab1([_0x1c19c8(0x0,_0x1d3be7[_0x4ae833(0x261)](_0x3a27fd[_0x4ae833(0x264)])),_0x1c19c8(0x1,_0x1d3be7[_0x4ae833(0x261)](_0x302edf[_0x4ae833(0x1e3)])),_0x1c19c8(0x2,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7[_0x4ae833(0x218)])),_0x1c19c8(0x3,_0x1d3be7['Inject'](_0x1d3be7[_0x4ae833(0x1ec)]))],_0x999c5);const _0x19325d=_0x4ae833(0x221),_0x4420f4={};var _0x5f381f=Object[_0x4ae833(0x21d)],_0x5e721b=(_0x21e780,_0xf71ff2,_0xc11aa5,_0x36c3e4)=>{const _0x5879ed=_0x4ae833;for(var _0x4cc147=_0x36c3e4>0x1?void 0x0:_0x36c3e4?_0x5f381f(_0xf71ff2,_0xc11aa5):_0xf71ff2,_0x1ed963=_0x21e780[_0x5879ed(0x23a)]-0x1,_0x47f79b;_0x1ed963>=0x0;_0x1ed963--)(_0x47f79b=_0x21e780[_0x1ed963])&&(_0x4cc147=_0x47f79b(_0x4cc147)||_0x4cc147);return _0x4cc147;},_0x438d20=(_0x2f06f7,_0x4f3af7)=>(_0xc0af89,_0x35eb6f)=>_0x4f3af7(_0xc0af89,_0x35eb6f,_0x2f06f7);function _0x59e28b(_0x454955,_0x26a893){const _0x4ba9f7=_0x4ae833,_0x28e832=_0x454955[_0x4ba9f7(0x269)][0x0];return{..._0x26a893,'id':_0x28e832[_0x4ba9f7(0x1f3)],'resolved':_0x454955['solved']===0x1,'dT':_0x578bb4(_0x28e832['createTimestamp']),'personId':_0x28e832[_0x4ba9f7(0x1e2)],'threadId':_0x28e832['threadId']};}function _0x2015e1(_0x2e4eb5,_0xb55f21,_0x10f234){const _0x3819f2=_0x4ae833;var _0x316b50,_0x1bb5e4;if(((_0x1bb5e4=(_0x316b50=_0x2e4eb5==null?void 0x0:_0x2e4eb5[_0x3819f2(0x269)])==null?void 0x0:_0x316b50[_0x3819f2(0x23a)])!=null?_0x1bb5e4:0x0)>0x0){const _0x581102=(_0x3fd19f,_0x563517)=>({'id':_0x3fd19f[_0x3819f2(0x1f3)],'threadId':_0x3fd19f[_0x3819f2(0x229)],'dT':_0x578bb4(_0x3fd19f['createTimestamp']),'personId':_0x3fd19f[_0x3819f2(0x1e2)],'resolved':_0x2e4eb5[_0x3819f2(0x213)]===_0x183da8['Solved'],'unitId':_0xb55f21,'subUnitId':_0x10f234,'text':JSON['parse'](_0x3fd19f[_0x3819f2(0x22c)]),'parentId':_0x563517}),_0x6ed6a8=_0x581102(_0x2e4eb5[_0x3819f2(0x269)][0x0]);return{..._0x6ed6a8,'children':_0x2e4eb5['replies'][_0x3819f2(0x24a)](0x1)[_0x3819f2(0x1e6)](_0x2a901f=>_0x581102(_0x2a901f,_0x6ed6a8['id']))};}return null;}let _0x506a75=class{constructor(_0xe333c2,_0x5cb154,_0x34f969,_0x1882f6){const _0x1d7064=_0x4ae833;this['_httpService']=_0xe333c2,this[_0x1d7064(0x258)]=_0x5cb154,this[_0x1d7064(0x239)]=_0x34f969,this[_0x1d7064(0x241)]=_0x1882f6;}async[_0x4ae833(0x20b)](_0x385c7d){const _0x26d027=_0x4ae833;var _0xb58262,_0x3a5fb7;const {parentId:_0x37c29f,unitId:_0x296e65,text:_0x755b9,threadId:_0x3bcf5e}=_0x385c7d,_0x1346fc=(_0x3a5fb7=(_0xb58262=_0x755b9[_0x26d027(0x1fa)])==null?void 0x0:_0xb58262[_0x26d027(0x238)](_0x928071=>_0x928071[_0x26d027(0x219)]===_0x1d3be7[_0x26d027(0x266)][_0x26d027(0x20f)])[_0x26d027(0x1e6)](_0x19c03=>_0x19c03[_0x26d027(0x260)]))!=null?_0x3a5fb7:[],_0x5af5a5=JSON[_0x26d027(0x1e0)](_0x755b9),_0x42f039=(await this[_0x26d027(0x239)][_0x26d027(0x26b)](_0x296e65))[_0x26d027(0x25c)]();if(_0x37c29f){const _0x4b95a3={'memberId':_0x42f039,'unitId':_0x296e65,'content':_0x5af5a5,'mention':_0x1346fc,'threadId':_0x3bcf5e},_0x8f66e8=(await this[_0x26d027(0x20a)][_0x26d027(0x204)](_0x26d027(0x20c)+_0x296e65+'/reply',{'body':_0x4b95a3}))[_0x26d027(0x1ee)][_0x26d027(0x20d)];return{..._0x385c7d,'id':_0x8f66e8[_0x26d027(0x1f3)],'dT':_0x1d3be7[_0x26d027(0x25d)](+_0x8f66e8[_0x26d027(0x240)])[_0x26d027(0x201)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8f66e8['userId']};}else{const _0x378142={'memberId':_0x42f039,'unitId':_0x296e65,'content':_0x5af5a5,'mention':_0x1346fc},_0x432aa3=await this[_0x26d027(0x20a)][_0x26d027(0x204)](_0x26d027(0x20c)+_0x296e65+_0x26d027(0x26c),{'body':_0x378142});return _0x59e28b(_0x432aa3[_0x26d027(0x1ee)][_0x26d027(0x250)],_0x385c7d);}}async[_0x4ae833(0x1ed)](_0x3a3b93){const _0x13ebb7=_0x4ae833;var _0x5650bf,_0x1a0909;const {text:_0x1ed33e,unitId:_0x1735f4}=_0x3a3b93,_0x4030ea=(_0x1a0909=(_0x5650bf=_0x1ed33e[_0x13ebb7(0x1fa)])==null?void 0x0:_0x5650bf[_0x13ebb7(0x238)](_0x165994=>_0x165994[_0x13ebb7(0x219)]===_0x1d3be7[_0x13ebb7(0x266)][_0x13ebb7(0x20f)])[_0x13ebb7(0x1e6)](_0xcbc08a=>_0xcbc08a[_0x13ebb7(0x260)]))!=null?_0x1a0909:[],_0x347153=JSON[_0x13ebb7(0x1e0)](_0x1ed33e),_0x1f4d5b=_0x3a3b93[_0x13ebb7(0x229)],_0x5ac5f1=_0x3a3b93['id'],_0x2a30b3={'memberId':(await this[_0x13ebb7(0x239)][_0x13ebb7(0x26b)](_0x1735f4))[_0x13ebb7(0x25c)](),'unitId':_0x1735f4,'threadId':_0x1f4d5b,'mention':_0x4030ea,'content':_0x347153,'replyId':_0x5ac5f1},_0x5a69b8=await this[_0x13ebb7(0x20a)]['post'](_0x13ebb7(0x20c)+_0x1735f4+_0x13ebb7(0x268),{'body':_0x2a30b3});return!_0x5a69b8['body'][_0x13ebb7(0x243)]||_0x5a69b8['body'][_0x13ebb7(0x243)]['code']===0x1;}async[_0x4ae833(0x1f4)](_0x66b5a9){const _0x18524c=_0x4ae833,{unitId:_0xc72529}=_0x66b5a9,_0x293b76=_0x66b5a9['threadId'],_0x37685c={'memberId':this[_0x18524c(0x258)][_0x18524c(0x205)]()[_0x18524c(0x22f)],'unitId':_0xc72529,'threadId':_0x293b76,'solved':_0x66b5a9[_0x18524c(0x227)]?_0x183da8[_0x18524c(0x231)]:_0x183da8[_0x18524c(0x224)]},_0x34cded=await this['_httpService'][_0x18524c(0x204)](_0x18524c(0x20c)+_0xc72529+_0x18524c(0x262),{'body':_0x37685c});return!_0x34cded[_0x18524c(0x1ee)]['error']||_0x34cded[_0x18524c(0x1ee)][_0x18524c(0x243)][_0x18524c(0x1f9)]===0x1;}async[_0x4ae833(0x1e5)](_0x5eb849,_0x3b0a58,_0x54170a,_0x46de50){const _0x2caad2=_0x4ae833,_0x1084e7={'memberId':(await this[_0x2caad2(0x239)][_0x2caad2(0x26b)](_0x5eb849))['getMemberID'](),'threadId':_0x54170a,'replyId':_0x46de50,'unitId':_0x5eb849},_0x285f49=await this['_httpService'][_0x2caad2(0x204)]('/universer-api/comment/unit/'+_0x5eb849+'/delete',{'body':_0x1084e7});return!_0x285f49[_0x2caad2(0x1ee)][_0x2caad2(0x243)]||_0x285f49[_0x2caad2(0x1ee)]['error'][_0x2caad2(0x1f9)]===0x1;}async[_0x4ae833(0x267)](_0x199e0d,_0x450eed,_0x565e66){const _0x543f07=_0x4ae833,_0x1ffe2d={'unitId':_0x199e0d,'threadId':_0x565e66},_0x1bbcfe=await this[_0x543f07(0x20a)]['post'](_0x543f07(0x20c)+_0x199e0d+_0x543f07(0x223),{'body':_0x1ffe2d}),_0x294408=_0x565e66[_0x543f07(0x1e6)](_0x55c0c4=>_0x2015e1(_0x1bbcfe[_0x543f07(0x1ee)][_0x543f07(0x200)][_0x55c0c4],_0x199e0d,_0x450eed))[_0x543f07(0x238)](Boolean);return Object[_0x543f07(0x1e7)](_0x1bbcfe[_0x543f07(0x1ee)][_0x543f07(0x235)])[_0x543f07(0x24d)](_0x24ca1d=>{const _0x129146=_0x543f07;this[_0x129146(0x258)]['addUser'](_0x24ca1d);}),_0x294408;}[_0x4ae833(0x1fd)](_0x48d7d7){const _0x141dd4=_0x4ae833;return{'id':_0x48d7d7['id'],'threadId':_0x48d7d7[_0x141dd4(0x229)],'ref':_0x48d7d7[_0x141dd4(0x244)]};}};_0x506a75=_0x5e721b([_0x438d20(0x0,_0x1d3be7[_0x4ae833(0x261)](_0x133836[_0x4ae833(0x22d)])),_0x438d20(0x1,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7[_0x4ae833(0x218)])),_0x438d20(0x2,_0x1d3be7['Inject'](_0x3a27fd[_0x4ae833(0x1f0)])),_0x438d20(0x3,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7['Injector']))],_0x506a75);var _0x103519=Object['getOwnPropertyDescriptor'],_0x6c21f5=(_0x5aae94,_0x3667b6,_0x31a57c,_0x32bd)=>{const _0x2a4e06=_0x4ae833;for(var _0x2310eb=_0x32bd>0x1?void 0x0:_0x32bd?_0x103519(_0x3667b6,_0x31a57c):_0x3667b6,_0x6c93d0=_0x5aae94[_0x2a4e06(0x23a)]-0x1,_0x154e6d;_0x6c93d0>=0x0;_0x6c93d0--)(_0x154e6d=_0x5aae94[_0x6c93d0])&&(_0x2310eb=_0x154e6d(_0x2310eb)||_0x2310eb);return _0x2310eb;},_0x38253f=(_0x37da73,_0x32b752)=>(_0x243a3e,_0x3f4cf1)=>_0x32b752(_0x243a3e,_0x3f4cf1,_0x37da73);let _0x540cbc=class extends _0x1d3be7['Disposable']{constructor(_0x2d2468,_0x4a5802){const _0x2b9012=_0x4ae833;super(),this[_0x2b9012(0x209)]=_0x2d2468,this[_0x2b9012(0x1e9)]=_0x4a5802,this[_0x2b9012(0x215)]();}[_0x4ae833(0x215)](){const _0x409bb9=_0x4ae833;this[_0x409bb9(0x209)][_0x409bb9(0x24e)]=this[_0x409bb9(0x1e9)],this[_0x409bb9(0x209)][_0x409bb9(0x232)]=!0x1;}};_0x540cbc=_0x6c21f5([_0x38253f(0x0,_0x302edf[_0x4ae833(0x25e)]),_0x38253f(0x1,_0x1d3be7['Inject'](_0x506a75))],_0x540cbc);var _0x2227e3=Object[_0x4ae833(0x228)],_0x3f5d22=Object[_0x4ae833(0x21d)],_0x35fe5a=(_0x19eaad,_0x467ac5,_0x3fad11)=>_0x467ac5 in _0x19eaad?_0x2227e3(_0x19eaad,_0x467ac5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fad11}):_0x19eaad[_0x467ac5]=_0x3fad11,_0x3ab630=(_0x3d8f52,_0xbb2860,_0x23bb7a,_0x618658)=>{for(var _0xbebbcd=_0x618658>0x1?void 0x0:_0x618658?_0x3f5d22(_0xbb2860,_0x23bb7a):_0xbb2860,_0x1f44cb=_0x3d8f52['length']-0x1,_0xf6fe9f;_0x1f44cb>=0x0;_0x1f44cb--)(_0xf6fe9f=_0x3d8f52[_0x1f44cb])&&(_0xbebbcd=_0xf6fe9f(_0xbebbcd)||_0xbebbcd);return _0xbebbcd;},_0x1173d9=(_0x1a07d4,_0x157b52)=>(_0x56012a,_0xe3581)=>_0x157b52(_0x56012a,_0xe3581,_0x1a07d4),_0x3f14db=(_0x4f5325,_0x1e0ccc,_0x5d3b9c)=>_0x35fe5a(_0x4f5325,typeof _0x1e0ccc!=_0x4ae833(0x216)?_0x1e0ccc+'':_0x1e0ccc,_0x5d3b9c);_0x5e69b2['UniverThreadCommentDataSourcePlugin']=class extends _0x1d3be7[_0x4ae833(0x203)]{constructor(_0x1cd846=_0x4420f4,_0x5a27a7,_0x41d251){const _0x21eec0=_0x4ae833;super(),this[_0x21eec0(0x225)]=_0x1cd846,this[_0x21eec0(0x241)]=_0x5a27a7,this[_0x21eec0(0x211)]=_0x41d251;const {..._0x43ff68}=_0x1d3be7[_0x21eec0(0x21a)]({},_0x4420f4,this[_0x21eec0(0x225)]);this[_0x21eec0(0x211)][_0x21eec0(0x253)](_0x19325d,_0x43ff68);}[_0x4ae833(0x234)](){const _0x4227b2=_0x4ae833;[[_0x506a75],[_0x540cbc],[_0x999c5]][_0x4227b2(0x24d)](_0xdcd20b=>{const _0x1ac5f4=_0x4227b2;this[_0x1ac5f4(0x241)]['add'](_0xdcd20b);});}[_0x4ae833(0x220)](){const _0x39ae2c=_0x4ae833;this[_0x39ae2c(0x241)][_0x39ae2c(0x259)](_0x540cbc),this['_injector'][_0x39ae2c(0x259)](_0x999c5);}},_0x3f14db(_0x5e69b2[_0x4ae833(0x1f6)],_0x4ae833(0x210),_0x298213),_0x3f14db(_0x5e69b2[_0x4ae833(0x1f6)],_0x4ae833(0x245),_0x1d3be7[_0x4ae833(0x1f7)]['UNIVER_UNKNOWN']),_0x5e69b2[_0x4ae833(0x1f6)]=_0x3ab630([_0x1d3be7[_0x4ae833(0x246)](_0x3741cb[_0x4ae833(0x242)],_0x3a27fd[_0x4ae833(0x1f2)],_0x15130b[_0x4ae833(0x1f1)]),_0x1173d9(0x1,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7[_0x4ae833(0x1ec)])),_0x1173d9(0x2,_0x1d3be7['IConfigService'])],_0x5e69b2[_0x4ae833(0x1f6)]),Object[_0x4ae833(0x228)](_0x5e69b2,Symbol[_0x4ae833(0x24b)],{'value':'Module'});}));function _0x15a3(_0x375057,_0x5e13ec){const _0x20d6d3=_0x20d6();return _0x15a3=function(_0x15a3fb,_0xe009ba){_0x15a3fb=_0x15a3fb-0x1dd;let _0x3b8ee0=_0x20d6d3[_0x15a3fb];return _0x3b8ee0;},_0x15a3(_0x375057,_0x5e13ec);}function _0x20d6(){const _0x1c30ae=['UniverInstanceType','user','code','customRanges','948eVUvqS','_commentService','saveCommentToSnapshot','getUnit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','format','delete','Plugin','post','getCurrentUser','Reply','function','Solve','_threadCommentDataSourceService','_httpService','addComment','/universer-api/comment/unit/','reply','addUser','COMMENT','pluginName','_configService','801576wBKbWZ','solved','5572advDKO','_initDataSource','symbol','224860qyNWmt','UserManagerService','rangeType','merge','object','subscribe','getOwnPropertyDescriptor','2007100EcPwaL','6WngzaH','onReady','thread-comment-data-source.config','find','/list','OpenOrReOpen','_config','unitId','resolved','defineProperty','threadId','22veHTne','UniverThreadComment','content','HTTPService','@univerjs/thread-comment','userID','@univerjs/network','Solved','syncUpdateMutationToColla','9GNkVtK','onStarting','users','UniverNetwork','exports','filter','_sessionService','length','disposeWithMe','UniverThreadCommentUi','_threadCommentModel','Disposable','getComment','createTimestamp','_injector','UniverThreadCommentUIPlugin','error','ref','type','DependentOn','_init','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','slice','toStringTag','payload','forEach','dataSource','@univerjs/core','comment','UniverProLicense','amd','setConfig','74883bggImY','commentUpdate$','1074704mysuzN','@univerjs-pro/license','_userService','get','Unknown','Delete','getMemberID','dayjs','IThreadCommentDataSourceService','6WzoMmQ','rangeId','Inject','/solved','parse','CommentService','parentId','CustomRangeType','listComments','/edit','replies','root','requireSession','/add','UNRECOGNIZED','personId','167485BVugSt','stringify','UniverProThreadCommentDatasource','userId','ThreadCommentModel','rxjs','deleteComment','map','values','_initUserSync','_threadCommentDataSource','Add','UniverProCollaborationClient','Injector','updateComment','body','Edit','CollaborationSessionService','UniverLicensePlugin','UniverCollaborationClientPlugin','replyId','resolveComment','size','UniverThreadCommentDataSourcePlugin'];_0x20d6=function(){return _0x1c30ae;};return _0x20d6();}
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.202506081606",
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.202506081606",
49
+ "@univerjs-pro/license": "0.8.0-nightly.202506081606",
50
+ "@univerjs/core": "0.8.0-nightly.202506081606",
51
+ "@univerjs/network": "0.8.0-nightly.202506081606",
52
+ "@univerjs/thread-comment-ui": "0.8.0-nightly.202506081606",
51
53
  "@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"
54
+ "@univerjs/thread-comment": "0.8.0-nightly.202506081606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",