@univerjs-pro/thread-comment-datasource 0.6.7 → 0.6.9-experimental.20250403-d914ddc

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 _0x5c8879=_0x26b1;(function(_0x2ae74f,_0xf0dce){const _0x4a80bd=_0x26b1,_0x6e6e34=_0x2ae74f();while(!![]){try{const _0x35e151=parseInt(_0x4a80bd(0xe4))/0x1*(parseInt(_0x4a80bd(0x117))/0x2)+parseInt(_0x4a80bd(0x131))/0x3+parseInt(_0x4a80bd(0x11a))/0x4+-parseInt(_0x4a80bd(0xee))/0x5+parseInt(_0x4a80bd(0xd7))/0x6+-parseInt(_0x4a80bd(0x108))/0x7*(parseInt(_0x4a80bd(0xe1))/0x8)+-parseInt(_0x4a80bd(0x140))/0x9;if(_0x35e151===_0xf0dce)break;else _0x6e6e34['push'](_0x6e6e34['shift']());}catch(_0x5be39a){_0x6e6e34['push'](_0x6e6e34['shift']());}}}(_0x4ca3,0x540aa));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x5c8879(0x11f)),j=require(_0x5c8879(0x101)),M=require(_0x5c8879(0xd0)),w=require('rxjs'),P=require(_0x5c8879(0xed)),U=_0x5c8879(0x112);var I=(_0x245d61=>(_0x245d61[_0x245d61[_0x5c8879(0x118)]=0x0]=_0x5c8879(0x118),_0x245d61[_0x245d61[_0x5c8879(0xd5)]=0x1]=_0x5c8879(0xd5),_0x245d61[_0x245d61[_0x5c8879(0xdd)]=-0x1]=_0x5c8879(0xdd),_0x245d61))(I||{}),v=(_0x35143e=>(_0x35143e[_0x35143e['Unknown']=0x0]=_0x5c8879(0x12a),_0x35143e[_0x35143e[_0x5c8879(0x10d)]=0x1]=_0x5c8879(0x10d),_0x35143e[_0x35143e[_0x5c8879(0x121)]=0x2]=_0x5c8879(0x121),_0x35143e[_0x35143e[_0x5c8879(0xdc)]=0x3]='Edit',_0x35143e[_0x35143e[_0x5c8879(0x120)]=0x4]=_0x5c8879(0x120),_0x35143e[_0x35143e['Solve']=0x5]='Solve',_0x35143e[_0x35143e[_0x5c8879(0xdd)]=-0x1]=_0x5c8879(0xdd),_0x35143e))(v||{});const f=_0x2b4eaf=>c['dayjs'](new Date(+_0x2b4eaf))[_0x5c8879(0xfb)](_0x5c8879(0xf9)),R=async(_0x2b75bf,_0x5ea0b8)=>{const _0x464365=_0x5c8879,_0x56431f=_0x2b75bf[_0x464365(0x136)](c['UserManagerService']),_0x467872=_0x2b75bf[_0x464365(0x136)](P[_0x464365(0x11b)]);_0x5ea0b8['forEach'](_0x3bb78d=>{const _0x187340=_0x464365;_0x56431f['getUser'](_0x3bb78d)&&_0x5ea0b8[_0x187340(0x13a)](_0x3bb78d);}),_0x5ea0b8['size']&&(await _0x467872[_0x464365(0x136)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5ea0b8]}}))['body'][_0x464365(0xfc)][_0x464365(0x138)](_0x5cf56d=>{const _0x19da6a=_0x464365;_0x5cf56d&&_0x56431f[_0x19da6a(0xd8)](_0x5cf56d);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x129c64,_0x27b946,_0x5c89a8,_0x3af25e)=>{const _0x4bbd90=_0x5c8879;for(var _0x5efc44=_0x3af25e>0x1?void 0x0:_0x3af25e?$(_0x27b946,_0x5c89a8):_0x27b946,_0x1402f1=_0x129c64[_0x4bbd90(0xec)]-0x1,_0x1cf428;_0x1402f1>=0x0;_0x1402f1--)(_0x1cf428=_0x129c64[_0x1402f1])&&(_0x5efc44=_0x1cf428(_0x5efc44)||_0x5efc44);return _0x5efc44;},S=(_0x28fef0,_0x48f688)=>(_0x160303,_0x4062ab)=>_0x48f688(_0x160303,_0x4062ab,_0x28fef0);let p=class extends c['Disposable']{constructor(_0x3ba1cf,_0x5a6eca,_0x532cf8,_0xab1d5a){const _0x587693=_0x5c8879;super(),this['_commentService']=_0x3ba1cf,this[_0x587693(0x105)]=_0x5a6eca,this[_0x587693(0xd3)]=_0x532cf8,this[_0x587693(0xe7)]=_0xab1d5a,this[_0x587693(0xd1)](),this['_initUserSync']();}[_0x5c8879(0xdb)](){const _0x5b8d37=_0x5c8879;this[_0x5b8d37(0x10a)](this['_threadCommentModel'][_0x5b8d37(0xf1)][_0x5b8d37(0xe8)](w['bufferTime'](0x10))['subscribe'](_0x3bf4d4=>{const _0x36ca97=_0x5b8d37,_0x27025d=new Set();_0x3bf4d4[_0x36ca97(0x138)](_0xf43eac=>{const _0x467dc9=_0x36ca97;switch(_0xf43eac[_0x467dc9(0xfd)]){case _0x467dc9(0xfe):{const _0x8052fc=_0xf43eac[_0x467dc9(0x139)][_0x467dc9(0xe6)];_0x27025d['add'](_0x8052fc);break;}}}),R(this[_0x36ca97(0xe7)],_0x27025d);}));}[_0x5c8879(0xd1)](){const _0x402fa9=_0x5c8879;this[_0x402fa9(0x10a)](this[_0x402fa9(0xf5)][_0x402fa9(0xf1)][_0x402fa9(0x111)](async _0x494304=>{const _0x568204=_0x402fa9;var _0x44c771,_0x118857,_0x15fa2e,_0x328916;const _0x18dc08=(_0x44c771=this[_0x568204(0x105)]['getUnit'](_0x494304[_0x568204(0x119)])[_0x568204(0x128)](_0xa3da6d=>_0xa3da6d[_0x568204(0xf0)]===_0x494304[_0x568204(0xf0)]))==null?void 0x0:_0x44c771[_0x568204(0x13c)];if(!_0x18dc08)return;const {unitId:_0x5c96cb,subUnitId:_0x4190c5}=_0x18dc08;switch(_0x494304[_0x568204(0x11e)]&&this[_0x568204(0xd3)][_0x568204(0xd8)](_0x494304[_0x568204(0x11e)]),_0x494304[_0x568204(0xfd)]){case v[_0x568204(0x10d)]:break;case v[_0x568204(0x121)]:{this[_0x568204(0x105)][_0x568204(0x107)](_0x5c96cb,_0x4190c5,{'unitId':_0x5c96cb,'subUnitId':_0x4190c5,'ref':'','id':_0x494304[_0x568204(0xea)],'dT':f(+_0x494304[_0x568204(0xda)]),'threadId':_0x494304[_0x568204(0xf0)],'personId':(_0x15fa2e=(_0x118857=_0x494304[_0x568204(0x11e)])==null?void 0x0:_0x118857['userID'])!=null?_0x15fa2e:_0x494304[_0x568204(0x10b)],'text':JSON[_0x568204(0x110)](_0x494304[_0x568204(0x13b)]),'parentId':_0x18dc08['id']});break;}case v['Delete']:{const _0x2f3796=this[_0x568204(0x105)][_0x568204(0x106)](_0x5c96cb,_0x4190c5,_0x494304[_0x568204(0xea)]);_0x2f3796&&_0x2f3796[_0x568204(0x12b)]&&this['_threadCommentModel']['deleteComment'](_0x5c96cb,_0x4190c5,_0x494304['replyId']);break;}case v[_0x568204(0xdc)]:{this['_threadCommentModel'][_0x568204(0x114)](_0x5c96cb,_0x4190c5,{'commentId':_0x494304['replyId'],'text':JSON[_0x568204(0x110)](_0x494304[_0x568204(0x13b)])});break;}case v[_0x568204(0xe2)]:{const _0x486cea=(_0x328916=this[_0x568204(0x105)][_0x568204(0xd2)](_0x494304[_0x568204(0x119)])[_0x568204(0x128)](_0x4c37b7=>_0x4c37b7[_0x568204(0xf0)]===_0x494304['threadId']))==null?void 0x0:_0x328916[_0x568204(0x13c)];_0x486cea&&this[_0x568204(0x105)]['resolveComment'](_0x5c96cb,_0x4190c5,_0x486cea['id'],_0x494304[_0x568204(0xf2)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x5c8879(0x13d)](b[_0x5c8879(0x137)])),S(0x1,c['Inject'](M[_0x5c8879(0x13e)])),S(0x2,c[_0x5c8879(0x13d)](c[_0x5c8879(0xde)])),S(0x3,c['Inject'](c[_0x5c8879(0x122)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3cd882,_0xc3a71c,_0x552046,_0x171daa)=>{const _0x10e23d=_0x5c8879;for(var _0x170c05=_0x171daa>0x1?void 0x0:_0x171daa?A(_0xc3a71c,_0x552046):_0xc3a71c,_0x591230=_0x3cd882[_0x10e23d(0xec)]-0x1,_0x13332c;_0x591230>=0x0;_0x591230--)(_0x13332c=_0x3cd882[_0x591230])&&(_0x170c05=_0x13332c(_0x170c05)||_0x170c05);return _0x170c05;},_=(_0x58683f,_0x5b7f3f)=>(_0x4db33d,_0x312922)=>_0x5b7f3f(_0x4db33d,_0x312922,_0x58683f);function Y(_0x2b4859,_0xbb70f7){const _0x295321=_0x5c8879,_0x5dae2e=_0x2b4859[_0x295321(0xf4)][0x0];return{..._0xbb70f7,'id':_0x5dae2e[_0x295321(0xea)],'resolved':_0x2b4859[_0x295321(0xf2)]===0x1,'dT':f(_0x5dae2e[_0x295321(0xda)]),'personId':_0x5dae2e[_0x295321(0x10b)],'threadId':_0x5dae2e[_0x295321(0xf0)]};}function _0x26b1(_0x47012b,_0x2f84b7){const _0x4ca3df=_0x4ca3();return _0x26b1=function(_0x26b12f,_0x49d862){_0x26b12f=_0x26b12f-0xd0;let _0x2ee4db=_0x4ca3df[_0x26b12f];return _0x2ee4db;},_0x26b1(_0x47012b,_0x2f84b7);}function G(_0x2218e9,_0x55f95c,_0x2512c6){const _0x3c52b2=_0x5c8879;var _0x5c0b0f,_0x1b5534;if(((_0x1b5534=(_0x5c0b0f=_0x2218e9==null?void 0x0:_0x2218e9['replies'])==null?void 0x0:_0x5c0b0f[_0x3c52b2(0xec)])!=null?_0x1b5534:0x0)>0x0){const _0x514902=(_0x20c1f5,_0x284b34)=>({'id':_0x20c1f5[_0x3c52b2(0xea)],'threadId':_0x20c1f5[_0x3c52b2(0xf0)],'dT':f(_0x20c1f5[_0x3c52b2(0xda)]),'personId':_0x20c1f5[_0x3c52b2(0x10b)],'resolved':_0x2218e9[_0x3c52b2(0xf2)]===I[_0x3c52b2(0xd5)],'unitId':_0x55f95c,'subUnitId':_0x2512c6,'text':JSON[_0x3c52b2(0x110)](_0x20c1f5[_0x3c52b2(0x13b)]),'parentId':_0x284b34}),_0x30a96a=_0x514902(_0x2218e9[_0x3c52b2(0xf4)][0x0]);return{..._0x30a96a,'children':_0x2218e9['replies'][_0x3c52b2(0xf8)](0x1)[_0x3c52b2(0xef)](_0x49be02=>_0x514902(_0x49be02,_0x30a96a['id']))};}return null;}let g=class{constructor(_0x14ad32,_0x213f25,_0x1d2263,_0x411db2){const _0x7be7f1=_0x5c8879;this[_0x7be7f1(0x132)]=_0x14ad32,this[_0x7be7f1(0xd3)]=_0x213f25,this['_sessionService']=_0x1d2263,this[_0x7be7f1(0xe7)]=_0x411db2;}async[_0x5c8879(0x107)](_0x355ed6){const _0x51eeed=_0x5c8879;var _0x3b151b,_0x1269fc;const {parentId:_0x43045c,unitId:_0x20e8b5,text:_0x12a543,threadId:_0x24867e}=_0x355ed6,_0x26e03f=(_0x1269fc=(_0x3b151b=_0x12a543[_0x51eeed(0x104)])==null?void 0x0:_0x3b151b[_0x51eeed(0xeb)](_0x19b49e=>_0x19b49e[_0x51eeed(0x126)]===c['CustomRangeType'][_0x51eeed(0x141)])[_0x51eeed(0xef)](_0x2ad6cc=>_0x2ad6cc['rangeId']))!=null?_0x1269fc:[],_0x2bede9=JSON[_0x51eeed(0xd9)](_0x12a543),_0x37479b=(await this[_0x51eeed(0x113)][_0x51eeed(0x109)](_0x20e8b5))[_0x51eeed(0xe3)]();if(_0x43045c){const _0x5e1eaf={'memberId':_0x37479b,'unitId':_0x20e8b5,'content':_0x2bede9,'mention':_0x26e03f,'threadId':_0x24867e},_0x191172=(await this[_0x51eeed(0x132)]['post'](_0x51eeed(0x124)+_0x20e8b5+_0x51eeed(0x135),{'body':_0x5e1eaf}))[_0x51eeed(0x12f)]['reply'];return{..._0x355ed6,'id':_0x191172['replyId'],'dT':c[_0x51eeed(0x125)](+_0x191172[_0x51eeed(0xda)])[_0x51eeed(0xfb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x191172[_0x51eeed(0x10b)]};}else{const _0x582b82={'memberId':_0x37479b,'unitId':_0x20e8b5,'content':_0x2bede9,'mention':_0x26e03f},_0x26d2f3=await this[_0x51eeed(0x132)][_0x51eeed(0xd4)](_0x51eeed(0x124)+_0x20e8b5+_0x51eeed(0xf7),{'body':_0x582b82});return Y(_0x26d2f3[_0x51eeed(0x12f)]['comment'],_0x355ed6);}}async['updateComment'](_0x103e72){const _0x1e0fb1=_0x5c8879;var _0x300b24,_0x3a7b12;const {text:_0xd13ae8,unitId:_0x3f8c13}=_0x103e72,_0x31196b=(_0x3a7b12=(_0x300b24=_0xd13ae8[_0x1e0fb1(0x104)])==null?void 0x0:_0x300b24[_0x1e0fb1(0xeb)](_0x248566=>_0x248566[_0x1e0fb1(0x126)]===c['CustomRangeType'][_0x1e0fb1(0x141)])[_0x1e0fb1(0xef)](_0x57f632=>_0x57f632[_0x1e0fb1(0xdf)]))!=null?_0x3a7b12:[],_0x206970=JSON[_0x1e0fb1(0xd9)](_0xd13ae8),_0x238345=_0x103e72[_0x1e0fb1(0xf0)],_0x28c519=_0x103e72['id'],_0x4a6f3b={'memberId':(await this[_0x1e0fb1(0x113)][_0x1e0fb1(0x109)](_0x3f8c13))['getMemberID'](),'unitId':_0x3f8c13,'threadId':_0x238345,'mention':_0x31196b,'content':_0x206970,'replyId':_0x28c519},_0x189821=await this[_0x1e0fb1(0x132)][_0x1e0fb1(0xd4)]('/universer-api/comment/unit/'+_0x3f8c13+'/edit',{'body':_0x4a6f3b});return!_0x189821[_0x1e0fb1(0x12f)][_0x1e0fb1(0x116)]||_0x189821[_0x1e0fb1(0x12f)][_0x1e0fb1(0x116)][_0x1e0fb1(0x123)]===0x1;}async[_0x5c8879(0xe9)](_0xe27b5d){const _0xd57b9e=_0x5c8879,{unitId:_0xe92a6a}=_0xe27b5d,_0x478310=_0xe27b5d[_0xd57b9e(0xf0)],_0x5a1c30={'memberId':this[_0xd57b9e(0xd3)]['getCurrentUser']()[_0xd57b9e(0x13f)],'unitId':_0xe92a6a,'threadId':_0x478310,'solved':_0xe27b5d[_0xd57b9e(0x11c)]?I[_0xd57b9e(0xd5)]:I['OpenOrReOpen']},_0x57659f=await this[_0xd57b9e(0x132)][_0xd57b9e(0xd4)]('/universer-api/comment/unit/'+_0xe92a6a+_0xd57b9e(0xff),{'body':_0x5a1c30});return!_0x57659f['body'][_0xd57b9e(0x116)]||_0x57659f['body'][_0xd57b9e(0x116)][_0xd57b9e(0x123)]===0x1;}async[_0x5c8879(0x11d)](_0x4f9529,_0x54baac,_0x7a5cb2,_0xad90e2){const _0x34a189=_0x5c8879,_0x286185={'memberId':(await this[_0x34a189(0x113)][_0x34a189(0x109)](_0x4f9529))[_0x34a189(0xe3)](),'threadId':_0x7a5cb2,'replyId':_0xad90e2,'unitId':_0x4f9529},_0x4b41fe=await this[_0x34a189(0x132)][_0x34a189(0xd4)](_0x34a189(0x124)+_0x4f9529+_0x34a189(0x103),{'body':_0x286185});return!_0x4b41fe[_0x34a189(0x12f)][_0x34a189(0x116)]||_0x4b41fe[_0x34a189(0x12f)][_0x34a189(0x116)][_0x34a189(0x123)]===0x1;}async['listComments'](_0xa7f53,_0x6c2fe9,_0x9e5918){const _0x5e1e82=_0x5c8879,_0x585a69={'unitId':_0xa7f53,'threadId':_0x9e5918},_0x5f5603=await this['_httpService']['post'](_0x5e1e82(0x124)+_0xa7f53+'/list',{'body':_0x585a69}),_0x1df143=_0x9e5918[_0x5e1e82(0xef)](_0x5f12c6=>G(_0x5f5603[_0x5e1e82(0x12f)][_0x5e1e82(0x12c)][_0x5f12c6],_0xa7f53,_0x6c2fe9))[_0x5e1e82(0xeb)](Boolean);return Object['values'](_0x5f5603[_0x5e1e82(0x12f)][_0x5e1e82(0xfc)])[_0x5e1e82(0x138)](_0x4c17a5=>{const _0x45709b=_0x5e1e82;this[_0x45709b(0xd3)][_0x45709b(0xd8)](_0x4c17a5);}),_0x1df143;}['saveCommentToSnapshot'](_0x28d9f1){const _0x586b7c=_0x5c8879;return{'id':_0x28d9f1['id'],'threadId':_0x28d9f1['threadId'],'ref':_0x28d9f1[_0x586b7c(0xf6)]};}};g=x([_(0x0,c[_0x5c8879(0x13d)](P['HTTPService'])),_(0x1,c[_0x5c8879(0x13d)](c['UserManagerService'])),_(0x2,c[_0x5c8879(0x13d)](b['CollaborationSessionService'])),_(0x3,c[_0x5c8879(0x13d)](c[_0x5c8879(0x122)]))],g);var H=Object[_0x5c8879(0x130)],J=(_0x10b377,_0x55a9e6,_0x3f44e6,_0x3a168a)=>{const _0x5a7d6b=_0x5c8879;for(var _0x4fe689=_0x3a168a>0x1?void 0x0:_0x3a168a?H(_0x55a9e6,_0x3f44e6):_0x55a9e6,_0x3cd5da=_0x10b377[_0x5a7d6b(0xec)]-0x1,_0x22096f;_0x3cd5da>=0x0;_0x3cd5da--)(_0x22096f=_0x10b377[_0x3cd5da])&&(_0x4fe689=_0x22096f(_0x4fe689)||_0x4fe689);return _0x4fe689;},y=(_0x594e2d,_0x2eb7ef)=>(_0x41ec4b,_0x54a0ec)=>_0x2eb7ef(_0x41ec4b,_0x54a0ec,_0x594e2d);function _0x4ca3(){const _0x4aa27c=['defineProperty','/delete','customRanges','_threadCommentModel','getComment','addComment','35021XaHxEk','requireSession','disposeWithMe','userId','IThreadCommentDataSourceService','Add','_configService','syncUpdateMutationToColla','parse','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','updateComment','_threadCommentDataSourceService','error','2EgNsJo','OpenOrReOpen','unitId','1863848erEMZo','HTTPService','resolved','deleteComment','user','@univerjs/core','Delete','Reply','Injector','code','/universer-api/comment/unit/','dayjs','rangeType','dataSource','find','DependentOn','Unknown','parentId','comments','_initDataSource','symbol','body','getOwnPropertyDescriptor','519807Dbvvya','_httpService','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','/reply','get','CommentService','forEach','payload','delete','content','root','Inject','ThreadCommentModel','userID','2298618sAWpSy','COMMENT','@univerjs/thread-comment','_init','getUnit','_userService','post','Solved','UNIVER_UNKNOWN','339024SKYxYG','addUser','stringify','createTimestamp','_initUserSync','Edit','UNRECOGNIZED','UserManagerService','rangeId','merge','1056VwABUN','Solve','getMemberID','603127OjaQBs','UniverLicensePlugin','personId','_injector','pipe','resolveComment','replyId','filter','length','@univerjs/network','194150URBItd','map','threadId','commentUpdate$','solved','UniverCollaborationClientPlugin','replies','_commentService','ref','/add','slice','YYYY/MM/DD\x20HH:mm','Plugin','format','users','type','add','/solved','UniverThreadCommentUIPlugin','@univerjs/thread-comment-ui'];_0x4ca3=function(){return _0x4aa27c;};return _0x4ca3();}let C=class extends c['Disposable']{constructor(_0x50a5ae,_0x5b121b){const _0x4971ef=_0x5c8879;super(),this[_0x4971ef(0x115)]=_0x50a5ae,this[_0x4971ef(0x133)]=_0x5b121b,this[_0x4971ef(0x12d)]();}[_0x5c8879(0x12d)](){const _0x11256f=_0x5c8879;this[_0x11256f(0x115)][_0x11256f(0x127)]=this[_0x11256f(0x133)],this[_0x11256f(0x115)][_0x11256f(0x10f)]=!0x1;}};C=J([y(0x0,M[_0x5c8879(0x10c)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x5c8879(0x102)],L=Object[_0x5c8879(0x130)],Z=(_0x23cb7e,_0x471531,_0x14242b)=>_0x471531 in _0x23cb7e?F(_0x23cb7e,_0x471531,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14242b}):_0x23cb7e[_0x471531]=_0x14242b,W=(_0x5c3665,_0x343a2b,_0x5e45dd,_0x8e7615)=>{const _0x4589f3=_0x5c8879;for(var _0x79fbc3=_0x8e7615>0x1?void 0x0:_0x8e7615?L(_0x343a2b,_0x5e45dd):_0x343a2b,_0x2271d7=_0x5c3665[_0x4589f3(0xec)]-0x1,_0x546003;_0x2271d7>=0x0;_0x2271d7--)(_0x546003=_0x5c3665[_0x2271d7])&&(_0x79fbc3=_0x546003(_0x79fbc3)||_0x79fbc3);return _0x79fbc3;},O=(_0x4c59ba,_0x1ef164)=>(_0x56913e,_0x2a8991)=>_0x1ef164(_0x56913e,_0x2a8991,_0x4c59ba),N=(_0x428079,_0x2f1e27,_0x5b4150)=>Z(_0x428079,typeof _0x2f1e27!=_0x5c8879(0x12e)?_0x2f1e27+'':_0x2f1e27,_0x5b4150);exports[_0x5c8879(0x134)]=class extends c[_0x5c8879(0xfa)]{constructor(_0x4157ac=D,_0x2d2fcc,_0x1f792b){const _0x2dd356=_0x5c8879;super(),this['_config']=_0x4157ac,this['_injector']=_0x2d2fcc,this[_0x2dd356(0x10e)]=_0x1f792b;const {..._0xe00792}=c[_0x2dd356(0xe0)]({},D,this['_config']);this[_0x2dd356(0x10e)]['setConfig'](q,_0xe00792);}['onStarting'](){const _0x2082c6=_0x5c8879;[[g],[C],[p]][_0x2082c6(0x138)](_0x3be5b9=>{const _0x2b1584=_0x2082c6;this[_0x2b1584(0xe7)][_0x2b1584(0xfe)](_0x3be5b9);});}['onReady'](){const _0x365506=_0x5c8879;this[_0x365506(0xe7)][_0x365506(0x136)](C),this['_injector'][_0x365506(0x136)](p);}},N(exports[_0x5c8879(0x134)],'pluginName',U),N(exports[_0x5c8879(0x134)],'type',c['UniverInstanceType'][_0x5c8879(0xd6)]),exports[_0x5c8879(0x134)]=W([c[_0x5c8879(0x129)](j[_0x5c8879(0x100)],b[_0x5c8879(0xf3)],T[_0x5c8879(0xe5)]),O(0x1,c[_0x5c8879(0x13d)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x5c8879(0x134)]);
1
+ 'use strict';const _0x50241b=_0x37c3;(function(_0x15892d,_0x572d4a){const _0x29f803=_0x37c3,_0x1cbdb1=_0x15892d();while(!![]){try{const _0x42cc38=-parseInt(_0x29f803(0x1eb))/0x1+parseInt(_0x29f803(0x1e0))/0x2*(parseInt(_0x29f803(0x1f5))/0x3)+-parseInt(_0x29f803(0x19e))/0x4*(-parseInt(_0x29f803(0x1da))/0x5)+-parseInt(_0x29f803(0x1e3))/0x6+parseInt(_0x29f803(0x1e5))/0x7*(parseInt(_0x29f803(0x1dd))/0x8)+-parseInt(_0x29f803(0x1c0))/0x9+parseInt(_0x29f803(0x1c1))/0xa*(parseInt(_0x29f803(0x197))/0xb);if(_0x42cc38===_0x572d4a)break;else _0x1cbdb1['push'](_0x1cbdb1['shift']());}catch(_0x239cf4){_0x1cbdb1['push'](_0x1cbdb1['shift']());}}}(_0x51d5,0xe4e98));Object[_0x50241b(0x194)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require(_0x50241b(0x183)),T=require(_0x50241b(0x19a)),c=require(_0x50241b(0x1d4)),j=require('@univerjs/thread-comment-ui'),M=require(_0x50241b(0x1af)),w=require('rxjs'),P=require(_0x50241b(0x1ab)),U=_0x50241b(0x184);var I=(_0x573e76=>(_0x573e76[_0x573e76[_0x50241b(0x1a4)]=0x0]=_0x50241b(0x1a4),_0x573e76[_0x573e76[_0x50241b(0x1b3)]=0x1]='Solved',_0x573e76[_0x573e76[_0x50241b(0x1a3)]=-0x1]=_0x50241b(0x1a3),_0x573e76))(I||{}),v=(_0x29f7fd=>(_0x29f7fd[_0x29f7fd['Unknown']=0x0]='Unknown',_0x29f7fd[_0x29f7fd[_0x50241b(0x199)]=0x1]=_0x50241b(0x199),_0x29f7fd[_0x29f7fd[_0x50241b(0x1e7)]=0x2]=_0x50241b(0x1e7),_0x29f7fd[_0x29f7fd[_0x50241b(0x1a9)]=0x3]=_0x50241b(0x1a9),_0x29f7fd[_0x29f7fd[_0x50241b(0x17e)]=0x4]=_0x50241b(0x17e),_0x29f7fd[_0x29f7fd[_0x50241b(0x1de)]=0x5]=_0x50241b(0x1de),_0x29f7fd[_0x29f7fd[_0x50241b(0x1a3)]=-0x1]=_0x50241b(0x1a3),_0x29f7fd))(v||{});const f=_0xd013d5=>c[_0x50241b(0x1e9)](new Date(+_0xd013d5))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x10ed43,_0xb030e0)=>{const _0x4f52a1=_0x50241b,_0x1dbc32=_0x10ed43[_0x4f52a1(0x1e4)](c[_0x4f52a1(0x1b9)]),_0xc353e7=_0x10ed43['get'](P[_0x4f52a1(0x188)]);_0xb030e0['forEach'](_0x1d7d8a=>{const _0x3134f2=_0x4f52a1;_0x1dbc32[_0x3134f2(0x1f3)](_0x1d7d8a)&&_0xb030e0['delete'](_0x1d7d8a);}),_0xb030e0[_0x4f52a1(0x1d7)]&&(await _0xc353e7[_0x4f52a1(0x1e4)]('/universer-api/user/list',{'params':{'userIDs':[..._0xb030e0]}}))[_0x4f52a1(0x185)]['users']['forEach'](_0x1d05b2=>{const _0x2484c1=_0x4f52a1;_0x1d05b2&&_0x1dbc32[_0x2484c1(0x1a7)](_0x1d05b2);});};var $=Object[_0x50241b(0x1c2)],E=(_0xc03d73,_0xf9cd7c,_0x108cae,_0x1b11b3)=>{for(var _0x9dce69=_0x1b11b3>0x1?void 0x0:_0x1b11b3?$(_0xf9cd7c,_0x108cae):_0xf9cd7c,_0x31ff0f=_0xc03d73['length']-0x1,_0x34cdcc;_0x31ff0f>=0x0;_0x31ff0f--)(_0x34cdcc=_0xc03d73[_0x31ff0f])&&(_0x9dce69=_0x34cdcc(_0x9dce69)||_0x9dce69);return _0x9dce69;},S=(_0x56a064,_0x22d9ce)=>(_0x5e76fa,_0x40e2b3)=>_0x22d9ce(_0x5e76fa,_0x40e2b3,_0x56a064);let p=class extends c[_0x50241b(0x1ca)]{constructor(_0x2a69b9,_0x127902,_0x31d055,_0xf229ec){const _0x258de8=_0x50241b;super(),this[_0x258de8(0x18c)]=_0x2a69b9,this['_threadCommentModel']=_0x127902,this['_userService']=_0x31d055,this[_0x258de8(0x187)]=_0xf229ec,this[_0x258de8(0x17d)](),this[_0x258de8(0x19f)]();}[_0x50241b(0x19f)](){const _0x1a6984=_0x50241b;this[_0x1a6984(0x190)](this[_0x1a6984(0x1cc)][_0x1a6984(0x1ad)]['pipe'](w[_0x1a6984(0x1b1)](0x10))[_0x1a6984(0x1f4)](_0x193022=>{const _0x45645e=_0x1a6984,_0x40aea9=new Set();_0x193022[_0x45645e(0x1cd)](_0x332924=>{const _0x52f947=_0x45645e;switch(_0x332924[_0x52f947(0x1f1)]){case _0x52f947(0x1f0):{const _0x49183d=_0x332924['payload'][_0x52f947(0x1db)];_0x40aea9[_0x52f947(0x1f0)](_0x49183d);break;}}}),R(this[_0x45645e(0x187)],_0x40aea9);}));}[_0x50241b(0x17d)](){const _0x1ddc4e=_0x50241b;this[_0x1ddc4e(0x190)](this[_0x1ddc4e(0x18c)]['commentUpdate$'][_0x1ddc4e(0x1f4)](async _0x4fe9c1=>{const _0x44c0d7=_0x1ddc4e;var _0x874fb,_0x36b2e9,_0x538c32,_0x3692fc;const _0x5646e9=(_0x874fb=this[_0x44c0d7(0x1cc)][_0x44c0d7(0x1f7)](_0x4fe9c1['unitId'])[_0x44c0d7(0x1e8)](_0xfb3f26=>_0xfb3f26[_0x44c0d7(0x186)]===_0x4fe9c1[_0x44c0d7(0x186)]))==null?void 0x0:_0x874fb[_0x44c0d7(0x1c9)];if(!_0x5646e9)return;const {unitId:_0x574f10,subUnitId:_0x52b10e}=_0x5646e9;switch(_0x4fe9c1['user']&&this[_0x44c0d7(0x1d1)][_0x44c0d7(0x1a7)](_0x4fe9c1[_0x44c0d7(0x1b6)]),_0x4fe9c1[_0x44c0d7(0x1f1)]){case v[_0x44c0d7(0x199)]:break;case v['Reply']:{this[_0x44c0d7(0x1cc)][_0x44c0d7(0x1a6)](_0x574f10,_0x52b10e,{'unitId':_0x574f10,'subUnitId':_0x52b10e,'ref':'','id':_0x4fe9c1[_0x44c0d7(0x1bc)],'dT':f(+_0x4fe9c1[_0x44c0d7(0x1b5)]),'threadId':_0x4fe9c1['threadId'],'personId':(_0x538c32=(_0x36b2e9=_0x4fe9c1[_0x44c0d7(0x1b6)])==null?void 0x0:_0x36b2e9[_0x44c0d7(0x18e)])!=null?_0x538c32:_0x4fe9c1['userId'],'text':JSON[_0x44c0d7(0x1a0)](_0x4fe9c1[_0x44c0d7(0x1d5)]),'parentId':_0x5646e9['id']});break;}case v['Delete']:{const _0x269bdc=this['_threadCommentModel']['getComment'](_0x574f10,_0x52b10e,_0x4fe9c1['replyId']);_0x269bdc&&_0x269bdc[_0x44c0d7(0x1d8)]&&this['_threadCommentModel'][_0x44c0d7(0x189)](_0x574f10,_0x52b10e,_0x4fe9c1[_0x44c0d7(0x1bc)]);break;}case v[_0x44c0d7(0x1a9)]:{this[_0x44c0d7(0x1cc)]['updateComment'](_0x574f10,_0x52b10e,{'commentId':_0x4fe9c1[_0x44c0d7(0x1bc)],'text':JSON[_0x44c0d7(0x1a0)](_0x4fe9c1['content'])});break;}case v[_0x44c0d7(0x1de)]:{const _0x43755c=(_0x3692fc=this[_0x44c0d7(0x1cc)]['getUnit'](_0x4fe9c1[_0x44c0d7(0x1c3)])[_0x44c0d7(0x1e8)](_0x30691f=>_0x30691f['threadId']===_0x4fe9c1[_0x44c0d7(0x186)]))==null?void 0x0:_0x3692fc[_0x44c0d7(0x1c9)];_0x43755c&&this[_0x44c0d7(0x1cc)][_0x44c0d7(0x1df)](_0x574f10,_0x52b10e,_0x43755c['id'],_0x4fe9c1[_0x44c0d7(0x18a)]===I[_0x44c0d7(0x1b3)]);break;}}}));}};p=E([S(0x0,c[_0x50241b(0x1b4)](b['CommentService'])),S(0x1,c[_0x50241b(0x1b4)](M[_0x50241b(0x1e6)])),S(0x2,c['Inject'](c[_0x50241b(0x1b9)])),S(0x3,c[_0x50241b(0x1b4)](c['Injector']))],p);const q=_0x50241b(0x193),D={};var A=Object[_0x50241b(0x1c2)],x=(_0x3711c0,_0x3f8e73,_0x3d0a67,_0xc3e4b9)=>{for(var _0x4063f5=_0xc3e4b9>0x1?void 0x0:_0xc3e4b9?A(_0x3f8e73,_0x3d0a67):_0x3f8e73,_0x3319bf=_0x3711c0['length']-0x1,_0x214129;_0x3319bf>=0x0;_0x3319bf--)(_0x214129=_0x3711c0[_0x3319bf])&&(_0x4063f5=_0x214129(_0x4063f5)||_0x4063f5);return _0x4063f5;},_=(_0x3e1bef,_0x287151)=>(_0x2fdda4,_0x22c5ed)=>_0x287151(_0x2fdda4,_0x22c5ed,_0x3e1bef);function _0x37c3(_0x2e8b34,_0x144c0d){const _0x51d529=_0x51d5();return _0x37c3=function(_0x37c353,_0x32b3d9){_0x37c353=_0x37c353-0x17d;let _0x1084be=_0x51d529[_0x37c353];return _0x1084be;},_0x37c3(_0x2e8b34,_0x144c0d);}function _0x51d5(){const _0x2ec4f4=['@univerjs-pro/license','_threadCommentDataSource','stringify','slice','37864thPPiu','_initUserSync','parse','setConfig','UniverInstanceType','UNRECOGNIZED','OpenOrReOpen','/add','addComment','addUser','requireSession','Edit','format','@univerjs/network','/delete','commentUpdate$','UniverLicensePlugin','@univerjs/thread-comment','ref','bufferTime','rangeType','Solved','Inject','createTimestamp','user','map','listComments','UserManagerService','_sessionService','UNIVER_UNKNOWN','replyId','Plugin','comment','COMMENT','10365768aiNDPj','3939930cfigBH','getOwnPropertyDescriptor','unitId','_threadCommentDataSourceService','/edit','values','resolved','comments','root','Disposable','UniverCollaborationClientPlugin','_threadCommentModel','forEach','/solved','post','getMemberID','_userService','pluginName','saveCommentToSnapshot','@univerjs/core','content','replies','size','parentId','/reply','815GBqDKl','personId','code','1816976TRWVtH','Solve','resolveComment','386768sFyUfA','customRanges','getCurrentUser','4474338SbbKRX','get','35KoHthy','ThreadCommentModel','Reply','find','dayjs','merge','1806209JNFMAG','error','_config','length','filter','add','type','IConfigService','getUser','subscribe','6QxPXks','CustomRangeType','getUnit','_init','Delete','dataSource','_initDataSource','UniverThreadCommentDataSourcePlugin','reply','@univerjs-pro/collaboration-client','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','threadId','_injector','HTTPService','deleteComment','solved','userId','_commentService','_httpService','userID','_configService','disposeWithMe','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','thread-comment-data-source.config','defineProperty','Injector','onStarting','44ZvzRrj','DependentOn','Add'];_0x51d5=function(){return _0x2ec4f4;};return _0x51d5();}function Y(_0x371851,_0x47ad44){const _0x2b14ea=_0x50241b,_0x9554e8=_0x371851['replies'][0x0];return{..._0x47ad44,'id':_0x9554e8[_0x2b14ea(0x1bc)],'resolved':_0x371851['solved']===0x1,'dT':f(_0x9554e8[_0x2b14ea(0x1b5)]),'personId':_0x9554e8[_0x2b14ea(0x18b)],'threadId':_0x9554e8[_0x2b14ea(0x186)]};}function G(_0x579e60,_0x10d969,_0x581e12){const _0x1b40eb=_0x50241b;var _0x4846d6,_0x179aac;if(((_0x179aac=(_0x4846d6=_0x579e60==null?void 0x0:_0x579e60[_0x1b40eb(0x1d6)])==null?void 0x0:_0x4846d6[_0x1b40eb(0x1ee)])!=null?_0x179aac:0x0)>0x0){const _0x471f04=(_0x1bce84,_0x570632)=>({'id':_0x1bce84['replyId'],'threadId':_0x1bce84[_0x1b40eb(0x186)],'dT':f(_0x1bce84[_0x1b40eb(0x1b5)]),'personId':_0x1bce84[_0x1b40eb(0x18b)],'resolved':_0x579e60[_0x1b40eb(0x18a)]===I[_0x1b40eb(0x1b3)],'unitId':_0x10d969,'subUnitId':_0x581e12,'text':JSON[_0x1b40eb(0x1a0)](_0x1bce84['content']),'parentId':_0x570632}),_0x594474=_0x471f04(_0x579e60['replies'][0x0]);return{..._0x594474,'children':_0x579e60[_0x1b40eb(0x1d6)][_0x1b40eb(0x19d)](0x1)[_0x1b40eb(0x1b7)](_0x2f359a=>_0x471f04(_0x2f359a,_0x594474['id']))};}return null;}let g=class{constructor(_0x9655b4,_0x4254a7,_0x575d68,_0x4c3b68){const _0x2bb037=_0x50241b;this[_0x2bb037(0x18d)]=_0x9655b4,this['_userService']=_0x4254a7,this[_0x2bb037(0x1ba)]=_0x575d68,this[_0x2bb037(0x187)]=_0x4c3b68;}async['addComment'](_0x4a7957){const _0x4a3a6e=_0x50241b;var _0x53517b,_0x10ebab;const {parentId:_0x63ed07,unitId:_0x2529fe,text:_0x26fa81,threadId:_0x237292}=_0x4a7957,_0x171617=(_0x10ebab=(_0x53517b=_0x26fa81[_0x4a3a6e(0x1e1)])==null?void 0x0:_0x53517b[_0x4a3a6e(0x1ef)](_0x11bf98=>_0x11bf98[_0x4a3a6e(0x1b2)]===c[_0x4a3a6e(0x1f6)][_0x4a3a6e(0x1bf)])[_0x4a3a6e(0x1b7)](_0x2edfbe=>_0x2edfbe['rangeId']))!=null?_0x10ebab:[],_0x1ae871=JSON[_0x4a3a6e(0x19c)](_0x26fa81),_0x2066fc=(await this[_0x4a3a6e(0x1ba)]['requireSession'](_0x2529fe))[_0x4a3a6e(0x1d0)]();if(_0x63ed07){const _0xf142f9={'memberId':_0x2066fc,'unitId':_0x2529fe,'content':_0x1ae871,'mention':_0x171617,'threadId':_0x237292},_0xdc9cb9=(await this['_httpService']['post'](_0x4a3a6e(0x192)+_0x2529fe+_0x4a3a6e(0x1d9),{'body':_0xf142f9}))['body'][_0x4a3a6e(0x182)];return{..._0x4a7957,'id':_0xdc9cb9[_0x4a3a6e(0x1bc)],'dT':c[_0x4a3a6e(0x1e9)](+_0xdc9cb9[_0x4a3a6e(0x1b5)])[_0x4a3a6e(0x1aa)](_0x4a3a6e(0x191)),'personId':_0xdc9cb9[_0x4a3a6e(0x18b)]};}else{const _0x3ec6a0={'memberId':_0x2066fc,'unitId':_0x2529fe,'content':_0x1ae871,'mention':_0x171617},_0xde2a15=await this[_0x4a3a6e(0x18d)][_0x4a3a6e(0x1cf)](_0x4a3a6e(0x192)+_0x2529fe+_0x4a3a6e(0x1a5),{'body':_0x3ec6a0});return Y(_0xde2a15[_0x4a3a6e(0x185)][_0x4a3a6e(0x1be)],_0x4a7957);}}async['updateComment'](_0x5843db){const _0x5ce308=_0x50241b;var _0x2b583a,_0x541a35;const {text:_0x1a03d4,unitId:_0x4a3bcb}=_0x5843db,_0x151d47=(_0x541a35=(_0x2b583a=_0x1a03d4['customRanges'])==null?void 0x0:_0x2b583a[_0x5ce308(0x1ef)](_0x388b23=>_0x388b23[_0x5ce308(0x1b2)]===c[_0x5ce308(0x1f6)]['COMMENT'])[_0x5ce308(0x1b7)](_0x549faf=>_0x549faf['rangeId']))!=null?_0x541a35:[],_0x465797=JSON['stringify'](_0x1a03d4),_0xa91f20=_0x5843db[_0x5ce308(0x186)],_0x1d8a75=_0x5843db['id'],_0x37ad59={'memberId':(await this[_0x5ce308(0x1ba)][_0x5ce308(0x1a8)](_0x4a3bcb))['getMemberID'](),'unitId':_0x4a3bcb,'threadId':_0xa91f20,'mention':_0x151d47,'content':_0x465797,'replyId':_0x1d8a75},_0x2c421c=await this[_0x5ce308(0x18d)][_0x5ce308(0x1cf)]('/universer-api/comment/unit/'+_0x4a3bcb+_0x5ce308(0x1c5),{'body':_0x37ad59});return!_0x2c421c[_0x5ce308(0x185)][_0x5ce308(0x1ec)]||_0x2c421c[_0x5ce308(0x185)][_0x5ce308(0x1ec)]['code']===0x1;}async[_0x50241b(0x1df)](_0x20ad96){const _0x3938b6=_0x50241b,{unitId:_0xb7e8be}=_0x20ad96,_0x3b3351=_0x20ad96[_0x3938b6(0x186)],_0x4f480f={'memberId':this['_userService'][_0x3938b6(0x1e2)]()[_0x3938b6(0x18e)],'unitId':_0xb7e8be,'threadId':_0x3b3351,'solved':_0x20ad96[_0x3938b6(0x1c7)]?I['Solved']:I[_0x3938b6(0x1a4)]},_0x3928fb=await this[_0x3938b6(0x18d)]['post'](_0x3938b6(0x192)+_0xb7e8be+_0x3938b6(0x1ce),{'body':_0x4f480f});return!_0x3928fb['body'][_0x3938b6(0x1ec)]||_0x3928fb[_0x3938b6(0x185)]['error'][_0x3938b6(0x1dc)]===0x1;}async[_0x50241b(0x189)](_0x1c1670,_0x1d1081,_0x28969a,_0x10eecb){const _0x44f8cb=_0x50241b,_0x1d93d5={'memberId':(await this[_0x44f8cb(0x1ba)][_0x44f8cb(0x1a8)](_0x1c1670))[_0x44f8cb(0x1d0)](),'threadId':_0x28969a,'replyId':_0x10eecb,'unitId':_0x1c1670},_0x3a70b5=await this['_httpService'][_0x44f8cb(0x1cf)]('/universer-api/comment/unit/'+_0x1c1670+_0x44f8cb(0x1ac),{'body':_0x1d93d5});return!_0x3a70b5['body'][_0x44f8cb(0x1ec)]||_0x3a70b5[_0x44f8cb(0x185)][_0x44f8cb(0x1ec)][_0x44f8cb(0x1dc)]===0x1;}async[_0x50241b(0x1b8)](_0x4940ff,_0x5118fb,_0x29d73b){const _0x2ec649=_0x50241b,_0x306e79={'unitId':_0x4940ff,'threadId':_0x29d73b},_0x40dbc1=await this[_0x2ec649(0x18d)][_0x2ec649(0x1cf)](_0x2ec649(0x192)+_0x4940ff+'/list',{'body':_0x306e79}),_0x41d82d=_0x29d73b[_0x2ec649(0x1b7)](_0x3c8a2c=>G(_0x40dbc1[_0x2ec649(0x185)][_0x2ec649(0x1c8)][_0x3c8a2c],_0x4940ff,_0x5118fb))[_0x2ec649(0x1ef)](Boolean);return Object[_0x2ec649(0x1c6)](_0x40dbc1['body']['users'])[_0x2ec649(0x1cd)](_0x877a32=>{const _0x5eaebf=_0x2ec649;this[_0x5eaebf(0x1d1)]['addUser'](_0x877a32);}),_0x41d82d;}[_0x50241b(0x1d3)](_0x4f78c2){const _0x4eb93c=_0x50241b;return{'id':_0x4f78c2['id'],'threadId':_0x4f78c2['threadId'],'ref':_0x4f78c2[_0x4eb93c(0x1b0)]};}};g=x([_(0x0,c[_0x50241b(0x1b4)](P['HTTPService'])),_(0x1,c[_0x50241b(0x1b4)](c[_0x50241b(0x1b9)])),_(0x2,c[_0x50241b(0x1b4)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x50241b(0x195)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x38f4eb,_0x7affe7,_0xdcfc96,_0xe62cc7)=>{for(var _0x5a2c09=_0xe62cc7>0x1?void 0x0:_0xe62cc7?H(_0x7affe7,_0xdcfc96):_0x7affe7,_0x20a717=_0x38f4eb['length']-0x1,_0x13d45f;_0x20a717>=0x0;_0x20a717--)(_0x13d45f=_0x38f4eb[_0x20a717])&&(_0x5a2c09=_0x13d45f(_0x5a2c09)||_0x5a2c09);return _0x5a2c09;},y=(_0x3992c8,_0x338c28)=>(_0x4bcbc5,_0x382196)=>_0x338c28(_0x4bcbc5,_0x382196,_0x3992c8);let C=class extends c['Disposable']{constructor(_0xaaf72b,_0x55de09){const _0x2dce05=_0x50241b;super(),this['_threadCommentDataSourceService']=_0xaaf72b,this[_0x2dce05(0x19b)]=_0x55de09,this[_0x2dce05(0x180)]();}[_0x50241b(0x180)](){const _0x200465=_0x50241b;this[_0x200465(0x1c4)][_0x200465(0x17f)]=this[_0x200465(0x19b)],this[_0x200465(0x1c4)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x50241b(0x1b4)](g))],C);var F=Object[_0x50241b(0x194)],L=Object['getOwnPropertyDescriptor'],Z=(_0x119e4d,_0x17273d,_0x2d901f)=>_0x17273d in _0x119e4d?F(_0x119e4d,_0x17273d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d901f}):_0x119e4d[_0x17273d]=_0x2d901f,W=(_0x42a00e,_0x149fef,_0x231eba,_0x16734d)=>{for(var _0x12a90f=_0x16734d>0x1?void 0x0:_0x16734d?L(_0x149fef,_0x231eba):_0x149fef,_0x53fa69=_0x42a00e['length']-0x1,_0x58849f;_0x53fa69>=0x0;_0x53fa69--)(_0x58849f=_0x42a00e[_0x53fa69])&&(_0x12a90f=_0x58849f(_0x12a90f)||_0x12a90f);return _0x12a90f;},O=(_0x5df2a4,_0x4d709c)=>(_0x38691e,_0x3ad729)=>_0x4d709c(_0x38691e,_0x3ad729,_0x5df2a4),N=(_0x1e81eb,_0x47dec2,_0x58826c)=>Z(_0x1e81eb,typeof _0x47dec2!='symbol'?_0x47dec2+'':_0x47dec2,_0x58826c);exports[_0x50241b(0x181)]=class extends c[_0x50241b(0x1bd)]{constructor(_0x275e9e=D,_0x413eb0,_0x262074){const _0x5eee8a=_0x50241b;super(),this['_config']=_0x275e9e,this[_0x5eee8a(0x187)]=_0x413eb0,this[_0x5eee8a(0x18f)]=_0x262074;const {..._0x274f48}=c[_0x5eee8a(0x1ea)]({},D,this[_0x5eee8a(0x1ed)]);this[_0x5eee8a(0x18f)][_0x5eee8a(0x1a1)](q,_0x274f48);}[_0x50241b(0x196)](){const _0xb13186=_0x50241b;[[g],[C],[p]][_0xb13186(0x1cd)](_0x9c8792=>{this['_injector']['add'](_0x9c8792);});}['onReady'](){const _0x4f7c2f=_0x50241b;this['_injector']['get'](C),this['_injector'][_0x4f7c2f(0x1e4)](p);}},N(exports[_0x50241b(0x181)],_0x50241b(0x1d2),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x50241b(0x1a2)][_0x50241b(0x1bb)]),exports[_0x50241b(0x181)]=W([c[_0x50241b(0x198)](j['UniverThreadCommentUIPlugin'],b[_0x50241b(0x1cb)],T[_0x50241b(0x1ae)]),O(0x1,c[_0x50241b(0x1b4)](c[_0x50241b(0x195)])),O(0x2,c[_0x50241b(0x1f2)])],exports[_0x50241b(0x181)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x211bde=_0x388b;(function(_0x2b393c,_0x589954){const _0x153e1a=_0x388b,_0x50d92c=_0x2b393c();while(!![]){try{const _0x327d19=parseInt(_0x153e1a(0x114))/0x1+parseInt(_0x153e1a(0xcb))/0x2*(parseInt(_0x153e1a(0xce))/0x3)+parseInt(_0x153e1a(0xcc))/0x4+parseInt(_0x153e1a(0x10a))/0x5*(parseInt(_0x153e1a(0xd0))/0x6)+parseInt(_0x153e1a(0x127))/0x7*(-parseInt(_0x153e1a(0xf5))/0x8)+parseInt(_0x153e1a(0x125))/0x9+-parseInt(_0x153e1a(0xf0))/0xa;if(_0x327d19===_0x589954)break;else _0x50d92c['push'](_0x50d92c['shift']());}catch(_0x5ab1a8){_0x50d92c['push'](_0x50d92c['shift']());}}}(_0x3c62,0xba9e1));import{CommentService as _0x6f41dc,CollaborationSessionService as _0x1fd352,UniverCollaborationClientPlugin as _0x5b3884}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5c33e6}from'@univerjs-pro/license';import{dayjs as _0x564eec,UserManagerService as _0x5e058e,Inject as _0x114847,Injector as _0x56bcbf,Disposable as _0x338462,CustomRangeType as _0x33585b,UniverInstanceType as _0x3efd1b,DependentOn as _0x56b92e,IConfigService as _0x2fe5b9,Plugin as _0x2e1d79,merge as _0x4c8ee9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3ab2fe}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xc915,IThreadCommentDataSourceService as _0x15b35b}from'@univerjs/thread-comment';function _0x388b(_0x577d2c,_0x5f4520){const _0x3c62d4=_0x3c62();return _0x388b=function(_0x388beb,_0x14495c){_0x388beb=_0x388beb-0xca;let _0x2790fa=_0x3c62d4[_0x388beb];return _0x2790fa;},_0x388b(_0x577d2c,_0x5f4520);}import{bufferTime as _0xb35024}from'rxjs';import{HTTPService as _0x4160d8}from'@univerjs/network';const W=_0x211bde(0xf6);var I=(_0x15c1d8=>(_0x15c1d8[_0x15c1d8['OpenOrReOpen']=0x0]=_0x211bde(0xf9),_0x15c1d8[_0x15c1d8[_0x211bde(0xd7)]=0x1]=_0x211bde(0xd7),_0x15c1d8[_0x15c1d8[_0x211bde(0x12c)]=-0x1]=_0x211bde(0x12c),_0x15c1d8))(I||{}),v=(_0x591c45=>(_0x591c45[_0x591c45[_0x211bde(0x118)]=0x0]=_0x211bde(0x118),_0x591c45[_0x591c45[_0x211bde(0x12d)]=0x1]=_0x211bde(0x12d),_0x591c45[_0x591c45[_0x211bde(0xed)]=0x2]='Reply',_0x591c45[_0x591c45[_0x211bde(0xdb)]=0x3]=_0x211bde(0xdb),_0x591c45[_0x591c45['Delete']=0x4]='Delete',_0x591c45[_0x591c45[_0x211bde(0xe5)]=0x5]=_0x211bde(0xe5),_0x591c45[_0x591c45['UNRECOGNIZED']=-0x1]=_0x211bde(0x12c),_0x591c45))(v||{});const D=_0x314dc5=>_0x564eec(new Date(+_0x314dc5))[_0x211bde(0x128)](_0x211bde(0x123)),B=async(_0x34d9aa,_0x191063)=>{const _0x124b03=_0x211bde,_0x1a8494=_0x34d9aa['get'](_0x5e058e),_0x424991=_0x34d9aa[_0x124b03(0x130)](_0x4160d8);_0x191063['forEach'](_0x156f30=>{const _0x481523=_0x124b03;_0x1a8494[_0x481523(0xde)](_0x156f30)&&_0x191063[_0x481523(0x116)](_0x156f30);}),_0x191063['size']&&(await _0x424991['get'](_0x124b03(0x11d),{'params':{'userIDs':[..._0x191063]}}))['body'][_0x124b03(0xca)][_0x124b03(0xec)](_0x61772c=>{const _0x2e767c=_0x124b03;_0x61772c&&_0x1a8494[_0x2e767c(0xcf)](_0x61772c);});};var K=Object[_0x211bde(0xd3)],V=(_0x494490,_0x5b24da,_0x401cb6,_0x193ad6)=>{const _0x491dba=_0x211bde;for(var _0x4db771=_0x193ad6>0x1?void 0x0:_0x193ad6?K(_0x5b24da,_0x401cb6):_0x5b24da,_0x260980=_0x494490[_0x491dba(0x122)]-0x1,_0x5f48b9;_0x260980>=0x0;_0x260980--)(_0x5f48b9=_0x494490[_0x260980])&&(_0x4db771=_0x5f48b9(_0x4db771)||_0x4db771);return _0x4db771;},p=(_0x4eb53c,_0x12f725)=>(_0x21524a,_0x233c86)=>_0x12f725(_0x21524a,_0x233c86,_0x4eb53c);let S=class extends _0x338462{constructor(_0x16ef9a,_0x47b473,_0x416350,_0x4f3b79){const _0x416c29=_0x211bde;super(),this[_0x416c29(0x102)]=_0x16ef9a,this[_0x416c29(0xe6)]=_0x47b473,this[_0x416c29(0xeb)]=_0x416350,this[_0x416c29(0x101)]=_0x4f3b79,this[_0x416c29(0xef)](),this[_0x416c29(0x110)]();}[_0x211bde(0x110)](){const _0x145363=_0x211bde;this[_0x145363(0xdc)](this['_threadCommentModel'][_0x145363(0x119)][_0x145363(0xe1)](_0xb35024(0x10))[_0x145363(0xd9)](_0x181b07=>{const _0x296062=_0x145363,_0x304e3b=new Set();_0x181b07[_0x296062(0xec)](_0x4b0fc6=>{const _0x4046e8=_0x296062;switch(_0x4b0fc6[_0x4046e8(0xd2)]){case _0x4046e8(0x112):{const _0x3e2f02=_0x4b0fc6['payload'][_0x4046e8(0xff)];_0x304e3b[_0x4046e8(0x112)](_0x3e2f02);break;}}}),B(this[_0x296062(0x101)],_0x304e3b);}));}[_0x211bde(0xef)](){const _0x464589=_0x211bde;this[_0x464589(0xdc)](this[_0x464589(0x102)][_0x464589(0x119)][_0x464589(0xd9)](async _0x3c9b56=>{const _0x5d941b=_0x464589;var _0x463341,_0x2df6f4,_0x1e0334,_0x2fa2f6;const _0x5124ca=(_0x463341=this[_0x5d941b(0xe6)]['getUnit'](_0x3c9b56['unitId'])[_0x5d941b(0x12b)](_0x12ad02=>_0x12ad02['threadId']===_0x3c9b56['threadId']))==null?void 0x0:_0x463341['root'];if(!_0x5124ca)return;const {unitId:_0x1106db,subUnitId:_0x5c08e2}=_0x5124ca;switch(_0x3c9b56[_0x5d941b(0xd1)]&&this[_0x5d941b(0xeb)]['addUser'](_0x3c9b56[_0x5d941b(0xd1)]),_0x3c9b56[_0x5d941b(0xd2)]){case v[_0x5d941b(0x12d)]:break;case v[_0x5d941b(0xed)]:{this[_0x5d941b(0xe6)][_0x5d941b(0x12a)](_0x1106db,_0x5c08e2,{'unitId':_0x1106db,'subUnitId':_0x5c08e2,'ref':'','id':_0x3c9b56[_0x5d941b(0x108)],'dT':D(+_0x3c9b56[_0x5d941b(0xfa)]),'threadId':_0x3c9b56['threadId'],'personId':(_0x1e0334=(_0x2df6f4=_0x3c9b56[_0x5d941b(0xd1)])==null?void 0x0:_0x2df6f4[_0x5d941b(0x10b)])!=null?_0x1e0334:_0x3c9b56['userId'],'text':JSON['parse'](_0x3c9b56['content']),'parentId':_0x5124ca['id']});break;}case v['Delete']:{const _0x2404ac=this['_threadCommentModel'][_0x5d941b(0x111)](_0x1106db,_0x5c08e2,_0x3c9b56[_0x5d941b(0x108)]);_0x2404ac&&_0x2404ac[_0x5d941b(0x100)]&&this[_0x5d941b(0xe6)]['deleteComment'](_0x1106db,_0x5c08e2,_0x3c9b56[_0x5d941b(0x108)]);break;}case v[_0x5d941b(0xdb)]:{this[_0x5d941b(0xe6)][_0x5d941b(0xe2)](_0x1106db,_0x5c08e2,{'commentId':_0x3c9b56[_0x5d941b(0x108)],'text':JSON[_0x5d941b(0xe9)](_0x3c9b56['content'])});break;}case v[_0x5d941b(0xe5)]:{const _0x4e5a7d=(_0x2fa2f6=this[_0x5d941b(0xe6)][_0x5d941b(0xf4)](_0x3c9b56[_0x5d941b(0xd6)])[_0x5d941b(0x12b)](_0x1bbf0e=>_0x1bbf0e[_0x5d941b(0xdf)]===_0x3c9b56[_0x5d941b(0xdf)]))==null?void 0x0:_0x2fa2f6[_0x5d941b(0x11f)];_0x4e5a7d&&this[_0x5d941b(0xe6)][_0x5d941b(0x10d)](_0x1106db,_0x5c08e2,_0x4e5a7d['id'],_0x3c9b56[_0x5d941b(0x11a)]===I[_0x5d941b(0xd7)]);break;}}}));}};function _0x3c62(){const _0x45c3c7=['_httpService','_sessionService','defineProperty','getUnit','376uYILWS','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','symbol','rangeId','OpenOrReOpen','createTimestamp','map','rangeType','setConfig','/reply','personId','parentId','_injector','_commentService','comments','onStarting','requireSession','slice','replies','replyId','userId','1864540KVdIWY','userID','comment','resolveComment','_config','values','_initUserSync','getComment','add','getCurrentUser','742080ejLSXY','COMMENT','delete','resolved','Unknown','commentUpdate$','solved','/list','stringify','/universer-api/user/list','error','root','/solved','_threadCommentDataSource','length','YYYY/MM/DD\x20HH:mm','post','5348610RmyZnw','filter','163205dMQJTR','format','body','addComment','find','UNRECOGNIZED','Add','reply','/universer-api/comment/unit/','get','code','users','4YQbhla','397764qENvQL','listComments','2036427zRWLPK','addUser','6lcGhGM','user','type','getOwnPropertyDescriptor','ref','dataSource','unitId','Solved','onReady','subscribe','/add','Edit','disposeWithMe','/delete','getUser','threadId','pluginName','pipe','updateComment','/edit','content','Solve','_threadCommentModel','_configService','_threadCommentDataSourceService','parse','_initDataSource','_userService','forEach','Reply','customRanges','_init','13061470KooLPG'];_0x3c62=function(){return _0x45c3c7;};return _0x3c62();}S=V([p(0x0,_0x114847(_0x6f41dc)),p(0x1,_0x114847(_0xc915)),p(0x2,_0x114847(_0x5e058e)),p(0x3,_0x114847(_0x56bcbf))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x211bde(0xd3)],Q=(_0x4db1f3,_0x88896d,_0x734a55,_0x3e676b)=>{const _0x38d2fa=_0x211bde;for(var _0x328177=_0x3e676b>0x1?void 0x0:_0x3e676b?k(_0x88896d,_0x734a55):_0x88896d,_0x3f91e1=_0x4db1f3[_0x38d2fa(0x122)]-0x1,_0x29577d;_0x3f91e1>=0x0;_0x3f91e1--)(_0x29577d=_0x4db1f3[_0x3f91e1])&&(_0x328177=_0x29577d(_0x328177)||_0x328177);return _0x328177;},_=(_0x2e60d1,_0x551779)=>(_0x41bd81,_0x4a4d66)=>_0x551779(_0x41bd81,_0x4a4d66,_0x2e60d1);function X(_0x40f902,_0x4fde23){const _0x118391=_0x211bde,_0x369fa8=_0x40f902[_0x118391(0x107)][0x0];return{..._0x4fde23,'id':_0x369fa8['replyId'],'resolved':_0x40f902[_0x118391(0x11a)]===0x1,'dT':D(_0x369fa8[_0x118391(0xfa)]),'personId':_0x369fa8['userId'],'threadId':_0x369fa8[_0x118391(0xdf)]};}function ee(_0x6ff4e6,_0x37a564,_0x16e05b){const _0xe759ee=_0x211bde;var _0x3365ef,_0x538e9e;if(((_0x538e9e=(_0x3365ef=_0x6ff4e6==null?void 0x0:_0x6ff4e6[_0xe759ee(0x107)])==null?void 0x0:_0x3365ef[_0xe759ee(0x122)])!=null?_0x538e9e:0x0)>0x0){const _0xa35d2b=(_0x31bd3a,_0x279af3)=>({'id':_0x31bd3a['replyId'],'threadId':_0x31bd3a[_0xe759ee(0xdf)],'dT':D(_0x31bd3a[_0xe759ee(0xfa)]),'personId':_0x31bd3a[_0xe759ee(0x109)],'resolved':_0x6ff4e6['solved']===I[_0xe759ee(0xd7)],'unitId':_0x37a564,'subUnitId':_0x16e05b,'text':JSON[_0xe759ee(0xe9)](_0x31bd3a[_0xe759ee(0xe4)]),'parentId':_0x279af3}),_0x20c331=_0xa35d2b(_0x6ff4e6[_0xe759ee(0x107)][0x0]);return{..._0x20c331,'children':_0x6ff4e6[_0xe759ee(0x107)][_0xe759ee(0x106)](0x1)['map'](_0xf8cb13=>_0xa35d2b(_0xf8cb13,_0x20c331['id']))};}return null;}let f=class{constructor(_0x3c5db8,_0x47f759,_0x428644,_0x16e674){const _0x52d9f8=_0x211bde;this[_0x52d9f8(0xf1)]=_0x3c5db8,this['_userService']=_0x47f759,this[_0x52d9f8(0xf2)]=_0x428644,this['_injector']=_0x16e674;}async[_0x211bde(0x12a)](_0x5703bb){const _0x3f9817=_0x211bde;var _0x56aebe,_0x19703e;const {parentId:_0x1e1c9c,unitId:_0x4a6a6a,text:_0x16f956,threadId:_0x477702}=_0x5703bb,_0x2cb715=(_0x19703e=(_0x56aebe=_0x16f956[_0x3f9817(0xee)])==null?void 0x0:_0x56aebe[_0x3f9817(0x126)](_0x389be7=>_0x389be7[_0x3f9817(0xfc)]===_0x33585b[_0x3f9817(0x115)])[_0x3f9817(0xfb)](_0x284652=>_0x284652[_0x3f9817(0xf8)]))!=null?_0x19703e:[],_0x3be92e=JSON[_0x3f9817(0x11c)](_0x16f956),_0xbfc260=(await this[_0x3f9817(0xf2)][_0x3f9817(0x105)](_0x4a6a6a))['getMemberID']();if(_0x1e1c9c){const _0x3d3784={'memberId':_0xbfc260,'unitId':_0x4a6a6a,'content':_0x3be92e,'mention':_0x2cb715,'threadId':_0x477702},_0x477775=(await this[_0x3f9817(0xf1)]['post'](_0x3f9817(0x12f)+_0x4a6a6a+_0x3f9817(0xfe),{'body':_0x3d3784}))['body'][_0x3f9817(0x12e)];return{..._0x5703bb,'id':_0x477775[_0x3f9817(0x108)],'dT':_0x564eec(+_0x477775[_0x3f9817(0xfa)])[_0x3f9817(0x128)](_0x3f9817(0x123)),'personId':_0x477775[_0x3f9817(0x109)]};}else{const _0x7344ba={'memberId':_0xbfc260,'unitId':_0x4a6a6a,'content':_0x3be92e,'mention':_0x2cb715},_0x206632=await this[_0x3f9817(0xf1)][_0x3f9817(0x124)]('/universer-api/comment/unit/'+_0x4a6a6a+_0x3f9817(0xda),{'body':_0x7344ba});return X(_0x206632[_0x3f9817(0x129)][_0x3f9817(0x10c)],_0x5703bb);}}async[_0x211bde(0xe2)](_0x4d0118){const _0x365944=_0x211bde;var _0x48bf19,_0x38254e;const {text:_0x153a71,unitId:_0x3f6f85}=_0x4d0118,_0x305c4c=(_0x38254e=(_0x48bf19=_0x153a71[_0x365944(0xee)])==null?void 0x0:_0x48bf19[_0x365944(0x126)](_0x37cd88=>_0x37cd88[_0x365944(0xfc)]===_0x33585b[_0x365944(0x115)])[_0x365944(0xfb)](_0xd41d27=>_0xd41d27[_0x365944(0xf8)]))!=null?_0x38254e:[],_0x108942=JSON[_0x365944(0x11c)](_0x153a71),_0x33a675=_0x4d0118[_0x365944(0xdf)],_0x32149f=_0x4d0118['id'],_0x2d38d4={'memberId':(await this[_0x365944(0xf2)][_0x365944(0x105)](_0x3f6f85))['getMemberID'](),'unitId':_0x3f6f85,'threadId':_0x33a675,'mention':_0x305c4c,'content':_0x108942,'replyId':_0x32149f},_0x1dce60=await this['_httpService'][_0x365944(0x124)]('/universer-api/comment/unit/'+_0x3f6f85+_0x365944(0xe3),{'body':_0x2d38d4});return!_0x1dce60[_0x365944(0x129)][_0x365944(0x11e)]||_0x1dce60[_0x365944(0x129)][_0x365944(0x11e)]['code']===0x1;}async[_0x211bde(0x10d)](_0x2b8264){const _0x4ddc80=_0x211bde,{unitId:_0x2d09c3}=_0x2b8264,_0x587b76=_0x2b8264[_0x4ddc80(0xdf)],_0x3c22bb={'memberId':this[_0x4ddc80(0xeb)][_0x4ddc80(0x113)]()[_0x4ddc80(0x10b)],'unitId':_0x2d09c3,'threadId':_0x587b76,'solved':_0x2b8264[_0x4ddc80(0x117)]?I[_0x4ddc80(0xd7)]:I[_0x4ddc80(0xf9)]},_0x18c0f1=await this[_0x4ddc80(0xf1)]['post']('/universer-api/comment/unit/'+_0x2d09c3+_0x4ddc80(0x120),{'body':_0x3c22bb});return!_0x18c0f1['body']['error']||_0x18c0f1[_0x4ddc80(0x129)][_0x4ddc80(0x11e)][_0x4ddc80(0x131)]===0x1;}async['deleteComment'](_0x3a26b8,_0x3c3bec,_0x174fcb,_0x523475){const _0x14c49c=_0x211bde,_0x288bf1={'memberId':(await this[_0x14c49c(0xf2)][_0x14c49c(0x105)](_0x3a26b8))['getMemberID'](),'threadId':_0x174fcb,'replyId':_0x523475,'unitId':_0x3a26b8},_0x1855da=await this[_0x14c49c(0xf1)][_0x14c49c(0x124)]('/universer-api/comment/unit/'+_0x3a26b8+_0x14c49c(0xdd),{'body':_0x288bf1});return!_0x1855da[_0x14c49c(0x129)][_0x14c49c(0x11e)]||_0x1855da[_0x14c49c(0x129)]['error']['code']===0x1;}async[_0x211bde(0xcd)](_0x2ccd0f,_0x55fb2b,_0x5b1703){const _0x1f41b4=_0x211bde,_0x4d989c={'unitId':_0x2ccd0f,'threadId':_0x5b1703},_0x303cad=await this['_httpService'][_0x1f41b4(0x124)]('/universer-api/comment/unit/'+_0x2ccd0f+_0x1f41b4(0x11b),{'body':_0x4d989c}),_0xb5eb34=_0x5b1703[_0x1f41b4(0xfb)](_0x292104=>ee(_0x303cad[_0x1f41b4(0x129)][_0x1f41b4(0x103)][_0x292104],_0x2ccd0f,_0x55fb2b))['filter'](Boolean);return Object[_0x1f41b4(0x10f)](_0x303cad['body'][_0x1f41b4(0xca)])[_0x1f41b4(0xec)](_0xe1d6be=>{this['_userService']['addUser'](_0xe1d6be);}),_0xb5eb34;}['saveCommentToSnapshot'](_0x135988){const _0x4a2779=_0x211bde;return{'id':_0x135988['id'],'threadId':_0x135988[_0x4a2779(0xdf)],'ref':_0x135988[_0x4a2779(0xd4)]};}};f=Q([_(0x0,_0x114847(_0x4160d8)),_(0x1,_0x114847(_0x5e058e)),_(0x2,_0x114847(_0x1fd352)),_(0x3,_0x114847(_0x56bcbf))],f);var re=Object[_0x211bde(0xd3)],te=(_0x1a6be6,_0xecdfb7,_0x12cee2,_0x421ac3)=>{const _0x8d02c6=_0x211bde;for(var _0x5056e1=_0x421ac3>0x1?void 0x0:_0x421ac3?re(_0xecdfb7,_0x12cee2):_0xecdfb7,_0x49582c=_0x1a6be6[_0x8d02c6(0x122)]-0x1,_0x250407;_0x49582c>=0x0;_0x49582c--)(_0x250407=_0x1a6be6[_0x49582c])&&(_0x5056e1=_0x250407(_0x5056e1)||_0x5056e1);return _0x5056e1;},N=(_0x78cabc,_0x4479af)=>(_0x19d27e,_0x101c6f)=>_0x4479af(_0x19d27e,_0x101c6f,_0x78cabc);let g=class extends _0x338462{constructor(_0x41eace,_0x3ec01a){const _0x1b3730=_0x211bde;super(),this[_0x1b3730(0xe8)]=_0x41eace,this[_0x1b3730(0x121)]=_0x3ec01a,this[_0x1b3730(0xea)]();}[_0x211bde(0xea)](){const _0xfc1cd0=_0x211bde;this[_0xfc1cd0(0xe8)][_0xfc1cd0(0xd5)]=this['_threadCommentDataSource'],this[_0xfc1cd0(0xe8)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x15b35b),N(0x1,_0x114847(f))],g);var se=Object[_0x211bde(0xf3)],oe=Object[_0x211bde(0xd3)],ne=(_0x4b3b27,_0x24d04f,_0x1b65eb)=>_0x24d04f in _0x4b3b27?se(_0x4b3b27,_0x24d04f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1b65eb}):_0x4b3b27[_0x24d04f]=_0x1b65eb,ie=(_0x20c240,_0x13c3f3,_0x5dc0df,_0x71e8ce)=>{const _0x4cd79c=_0x211bde;for(var _0x2dad7b=_0x71e8ce>0x1?void 0x0:_0x71e8ce?oe(_0x13c3f3,_0x5dc0df):_0x13c3f3,_0x521624=_0x20c240[_0x4cd79c(0x122)]-0x1,_0x29f4ae;_0x521624>=0x0;_0x521624--)(_0x29f4ae=_0x20c240[_0x521624])&&(_0x2dad7b=_0x29f4ae(_0x2dad7b)||_0x2dad7b);return _0x2dad7b;},w=(_0x3e923b,_0xe73b6d)=>(_0x5c68c2,_0x7f97ca)=>_0xe73b6d(_0x5c68c2,_0x7f97ca,_0x3e923b),$=(_0x310de6,_0x4e93d9,_0x661f12)=>ne(_0x310de6,typeof _0x4e93d9!=_0x211bde(0xf7)?_0x4e93d9+'':_0x4e93d9,_0x661f12);let b=class extends _0x2e1d79{constructor(_0x464c6e=M,_0x5aff55,_0x49ea7b){const _0x4e676d=_0x211bde;super(),this[_0x4e676d(0x10e)]=_0x464c6e,this[_0x4e676d(0x101)]=_0x5aff55,this[_0x4e676d(0xe7)]=_0x49ea7b;const {..._0x41e517}=_0x4c8ee9({},M,this['_config']);this[_0x4e676d(0xe7)][_0x4e676d(0xfd)](z,_0x41e517);}[_0x211bde(0x104)](){const _0x459232=_0x211bde;[[f],[g],[S]][_0x459232(0xec)](_0x2ff89c=>{const _0x2d7059=_0x459232;this['_injector'][_0x2d7059(0x112)](_0x2ff89c);});}[_0x211bde(0xd8)](){const _0x557180=_0x211bde;this['_injector'][_0x557180(0x130)](g),this[_0x557180(0x101)][_0x557180(0x130)](S);}};$(b,_0x211bde(0xe0),W),$(b,_0x211bde(0xd2),_0x3efd1b['UNIVER_UNKNOWN']),b=ie([_0x56b92e(_0x3ab2fe,_0x5b3884,_0x5c33e6),w(0x1,_0x114847(_0x56bcbf)),w(0x2,_0x2fe5b9)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1b63d2=_0x1578;(function(_0x5431e3,_0xd6a9ca){const _0xa3f024=_0x1578,_0x207776=_0x5431e3();while(!![]){try{const _0x25ba84=-parseInt(_0xa3f024(0x13d))/0x1*(parseInt(_0xa3f024(0xf2))/0x2)+parseInt(_0xa3f024(0xf1))/0x3+parseInt(_0xa3f024(0x10d))/0x4+parseInt(_0xa3f024(0x115))/0x5+parseInt(_0xa3f024(0x109))/0x6+-parseInt(_0xa3f024(0x13a))/0x7+-parseInt(_0xa3f024(0x118))/0x8;if(_0x25ba84===_0xd6a9ca)break;else _0x207776['push'](_0x207776['shift']());}catch(_0x57cc54){_0x207776['push'](_0x207776['shift']());}}}(_0xfba9,0x92efd));import{CommentService as _0x1efde7,CollaborationSessionService as _0x1b2657,UniverCollaborationClientPlugin as _0x29d8d6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x314a4b}from'@univerjs-pro/license';import{dayjs as _0x8cd0d1,UserManagerService as _0x50aa43,Inject as _0x1f1d44,Injector as _0x37d13d,Disposable as _0x3a39fe,CustomRangeType as _0x590602,UniverInstanceType as _0x2bdad0,DependentOn as _0x284154,IConfigService as _0x4d3760,Plugin as _0x3e09ee,merge as _0x3b8c01}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29e253}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x153911,IThreadCommentDataSourceService as _0x4bf1ef}from'@univerjs/thread-comment';import{bufferTime as _0x426407}from'rxjs';import{HTTPService as _0x1f9932}from'@univerjs/network';const W=_0x1b63d2(0xf8);var I=(_0x2cf4d9=>(_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0xe6)]=0x0]=_0x1b63d2(0xe6),_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0x12d)]=0x1]='Solved',_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0x131)]=-0x1]=_0x1b63d2(0x131),_0x2cf4d9))(I||{}),v=(_0x4fec35=>(_0x4fec35[_0x4fec35[_0x1b63d2(0xdd)]=0x0]=_0x1b63d2(0xdd),_0x4fec35[_0x4fec35[_0x1b63d2(0x117)]=0x1]=_0x1b63d2(0x117),_0x4fec35[_0x4fec35[_0x1b63d2(0x129)]=0x2]='Reply',_0x4fec35[_0x4fec35['Edit']=0x3]='Edit',_0x4fec35[_0x4fec35[_0x1b63d2(0x132)]=0x4]=_0x1b63d2(0x132),_0x4fec35[_0x4fec35['Solve']=0x5]=_0x1b63d2(0xde),_0x4fec35[_0x4fec35[_0x1b63d2(0x131)]=-0x1]=_0x1b63d2(0x131),_0x4fec35))(v||{});const D=_0x2a37cc=>_0x8cd0d1(new Date(+_0x2a37cc))[_0x1b63d2(0xf4)](_0x1b63d2(0x10e)),B=async(_0x28fc55,_0x34c8ed)=>{const _0x4d46f7=_0x1b63d2,_0x72a9f3=_0x28fc55[_0x4d46f7(0xe8)](_0x50aa43),_0x8311af=_0x28fc55[_0x4d46f7(0xe8)](_0x1f9932);_0x34c8ed['forEach'](_0x131182=>{const _0x5b2f45=_0x4d46f7;_0x72a9f3[_0x5b2f45(0xe7)](_0x131182)&&_0x34c8ed[_0x5b2f45(0xed)](_0x131182);}),_0x34c8ed[_0x4d46f7(0xe9)]&&(await _0x8311af[_0x4d46f7(0xe8)](_0x4d46f7(0x12f),{'params':{'userIDs':[..._0x34c8ed]}}))['body'][_0x4d46f7(0x12a)][_0x4d46f7(0x110)](_0x116a67=>{const _0x5e22d0=_0x4d46f7;_0x116a67&&_0x72a9f3[_0x5e22d0(0xdb)](_0x116a67);});};var K=Object[_0x1b63d2(0x10f)],V=(_0x5a09ab,_0x240573,_0x1a9479,_0x11f1eb)=>{for(var _0x1c7a36=_0x11f1eb>0x1?void 0x0:_0x11f1eb?K(_0x240573,_0x1a9479):_0x240573,_0x3ed78f=_0x5a09ab['length']-0x1,_0x58b219;_0x3ed78f>=0x0;_0x3ed78f--)(_0x58b219=_0x5a09ab[_0x3ed78f])&&(_0x1c7a36=_0x58b219(_0x1c7a36)||_0x1c7a36);return _0x1c7a36;},p=(_0x412509,_0xb6238d)=>(_0x2d1c3a,_0x55d765)=>_0xb6238d(_0x2d1c3a,_0x55d765,_0x412509);let S=class extends _0x3a39fe{constructor(_0x14f531,_0x4b7826,_0xd6e308,_0x449742){const _0x29c25b=_0x1b63d2;super(),this[_0x29c25b(0x11b)]=_0x14f531,this[_0x29c25b(0x13b)]=_0x4b7826,this[_0x29c25b(0x134)]=_0xd6e308,this[_0x29c25b(0xd8)]=_0x449742,this[_0x29c25b(0x137)](),this[_0x29c25b(0x133)]();}[_0x1b63d2(0x133)](){const _0x14e99e=_0x1b63d2;this[_0x14e99e(0x106)](this[_0x14e99e(0x13b)][_0x14e99e(0xe5)][_0x14e99e(0xfe)](_0x426407(0x10))['subscribe'](_0x45fbe3=>{const _0x49b6a3=_0x14e99e,_0x358fbc=new Set();_0x45fbe3[_0x49b6a3(0x110)](_0x599637=>{const _0x5b2001=_0x49b6a3;switch(_0x599637[_0x5b2001(0x122)]){case'add':{const _0xd8a688=_0x599637['payload'][_0x5b2001(0x10a)];_0x358fbc['add'](_0xd8a688);break;}}}),B(this[_0x49b6a3(0xd8)],_0x358fbc);}));}[_0x1b63d2(0x137)](){const _0x188efe=_0x1b63d2;this[_0x188efe(0x106)](this[_0x188efe(0x11b)]['commentUpdate$'][_0x188efe(0xf9)](async _0x37e2d4=>{const _0xc63fe0=_0x188efe;var _0x1b16de,_0x3261a1,_0x434e51,_0xbec997;const _0x1a9d2c=(_0x1b16de=this['_threadCommentModel'][_0xc63fe0(0xf5)](_0x37e2d4[_0xc63fe0(0x11d)])[_0xc63fe0(0xdf)](_0x561aad=>_0x561aad[_0xc63fe0(0x136)]===_0x37e2d4[_0xc63fe0(0x136)]))==null?void 0x0:_0x1b16de['root'];if(!_0x1a9d2c)return;const {unitId:_0x2a1173,subUnitId:_0x78a3f4}=_0x1a9d2c;switch(_0x37e2d4[_0xc63fe0(0xf6)]&&this[_0xc63fe0(0x134)]['addUser'](_0x37e2d4[_0xc63fe0(0xf6)]),_0x37e2d4['type']){case v[_0xc63fe0(0x117)]:break;case v[_0xc63fe0(0x129)]:{this['_threadCommentModel']['addComment'](_0x2a1173,_0x78a3f4,{'unitId':_0x2a1173,'subUnitId':_0x78a3f4,'ref':'','id':_0x37e2d4[_0xc63fe0(0x108)],'dT':D(+_0x37e2d4[_0xc63fe0(0x12c)]),'threadId':_0x37e2d4[_0xc63fe0(0x136)],'personId':(_0x434e51=(_0x3261a1=_0x37e2d4['user'])==null?void 0x0:_0x3261a1[_0xc63fe0(0xf0)])!=null?_0x434e51:_0x37e2d4['userId'],'text':JSON[_0xc63fe0(0x126)](_0x37e2d4[_0xc63fe0(0x12b)]),'parentId':_0x1a9d2c['id']});break;}case v['Delete']:{const _0xb9e28f=this[_0xc63fe0(0x13b)][_0xc63fe0(0xe1)](_0x2a1173,_0x78a3f4,_0x37e2d4[_0xc63fe0(0x108)]);_0xb9e28f&&_0xb9e28f[_0xc63fe0(0xea)]&&this[_0xc63fe0(0x13b)][_0xc63fe0(0x119)](_0x2a1173,_0x78a3f4,_0x37e2d4[_0xc63fe0(0x108)]);break;}case v[_0xc63fe0(0xda)]:{this[_0xc63fe0(0x13b)][_0xc63fe0(0xeb)](_0x2a1173,_0x78a3f4,{'commentId':_0x37e2d4[_0xc63fe0(0x108)],'text':JSON[_0xc63fe0(0x126)](_0x37e2d4[_0xc63fe0(0x12b)])});break;}case v[_0xc63fe0(0xde)]:{const _0x82479=(_0xbec997=this[_0xc63fe0(0x13b)]['getUnit'](_0x37e2d4[_0xc63fe0(0x11d)])[_0xc63fe0(0xdf)](_0xf53bd6=>_0xf53bd6[_0xc63fe0(0x136)]===_0x37e2d4[_0xc63fe0(0x136)]))==null?void 0x0:_0xbec997[_0xc63fe0(0x124)];_0x82479&&this[_0xc63fe0(0x13b)][_0xc63fe0(0x107)](_0x2a1173,_0x78a3f4,_0x82479['id'],_0x37e2d4['solved']===I[_0xc63fe0(0x12d)]);break;}}}));}};S=V([p(0x0,_0x1f1d44(_0x1efde7)),p(0x1,_0x1f1d44(_0x153911)),p(0x2,_0x1f1d44(_0x50aa43)),p(0x3,_0x1f1d44(_0x37d13d))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1b63d2(0x10f)],Q=(_0x453d60,_0x1035bd,_0x3cadbd,_0x1afb87)=>{const _0x53ba2e=_0x1b63d2;for(var _0x2d1bbf=_0x1afb87>0x1?void 0x0:_0x1afb87?k(_0x1035bd,_0x3cadbd):_0x1035bd,_0x2c3e49=_0x453d60[_0x53ba2e(0x139)]-0x1,_0x4270a3;_0x2c3e49>=0x0;_0x2c3e49--)(_0x4270a3=_0x453d60[_0x2c3e49])&&(_0x2d1bbf=_0x4270a3(_0x2d1bbf)||_0x2d1bbf);return _0x2d1bbf;},_=(_0x35eb53,_0x3cdcf6)=>(_0x2d11b1,_0xff17e)=>_0x3cdcf6(_0x2d11b1,_0xff17e,_0x35eb53);function _0x1578(_0x42b4a1,_0x583ca4){const _0xfba9bc=_0xfba9();return _0x1578=function(_0x157888,_0xa6824){_0x157888=_0x157888-0xd7;let _0x26eb3d=_0xfba9bc[_0x157888];return _0x26eb3d;},_0x1578(_0x42b4a1,_0x583ca4);}function X(_0x22d0b4,_0x32a958){const _0x10d340=_0x1b63d2,_0x1899d2=_0x22d0b4[_0x10d340(0x11e)][0x0];return{..._0x32a958,'id':_0x1899d2[_0x10d340(0x108)],'resolved':_0x22d0b4[_0x10d340(0xff)]===0x1,'dT':D(_0x1899d2[_0x10d340(0x12c)]),'personId':_0x1899d2[_0x10d340(0x127)],'threadId':_0x1899d2[_0x10d340(0x136)]};}function ee(_0x49a07f,_0xca14b8,_0x3ab95d){const _0x137da6=_0x1b63d2;var _0x281e00,_0x52347c;if(((_0x52347c=(_0x281e00=_0x49a07f==null?void 0x0:_0x49a07f[_0x137da6(0x11e)])==null?void 0x0:_0x281e00[_0x137da6(0x139)])!=null?_0x52347c:0x0)>0x0){const _0x3738e0=(_0x89f30a,_0x49e8bf)=>({'id':_0x89f30a[_0x137da6(0x108)],'threadId':_0x89f30a[_0x137da6(0x136)],'dT':D(_0x89f30a[_0x137da6(0x12c)]),'personId':_0x89f30a[_0x137da6(0x127)],'resolved':_0x49a07f[_0x137da6(0xff)]===I[_0x137da6(0x12d)],'unitId':_0xca14b8,'subUnitId':_0x3ab95d,'text':JSON[_0x137da6(0x126)](_0x89f30a['content']),'parentId':_0x49e8bf}),_0x39a866=_0x3738e0(_0x49a07f[_0x137da6(0x11e)][0x0]);return{..._0x39a866,'children':_0x49a07f[_0x137da6(0x11e)][_0x137da6(0x103)](0x1)[_0x137da6(0x113)](_0x18717b=>_0x3738e0(_0x18717b,_0x39a866['id']))};}return null;}let f=class{constructor(_0x3048c6,_0x20bfbe,_0x1a2128,_0x3a7f7b){this['_httpService']=_0x3048c6,this['_userService']=_0x20bfbe,this['_sessionService']=_0x1a2128,this['_injector']=_0x3a7f7b;}async[_0x1b63d2(0xe3)](_0x4ac19c){const _0x289498=_0x1b63d2;var _0x48c935,_0x47f404;const {parentId:_0x2f65a2,unitId:_0x408e88,text:_0x2ff9d3,threadId:_0x758987}=_0x4ac19c,_0x48d83c=(_0x47f404=(_0x48c935=_0x2ff9d3[_0x289498(0xee)])==null?void 0x0:_0x48c935[_0x289498(0x125)](_0x55e0cc=>_0x55e0cc['rangeType']===_0x590602[_0x289498(0xfd)])['map'](_0x19f725=>_0x19f725[_0x289498(0x123)]))!=null?_0x47f404:[],_0x1029e6=JSON[_0x289498(0x11f)](_0x2ff9d3),_0x10b909=(await this[_0x289498(0xe2)]['requireSession'](_0x408e88))[_0x289498(0xec)]();if(_0x2f65a2){const _0x1a7730={'memberId':_0x10b909,'unitId':_0x408e88,'content':_0x1029e6,'mention':_0x48d83c,'threadId':_0x758987},_0x37f8b2=(await this['_httpService'][_0x289498(0x121)](_0x289498(0xfa)+_0x408e88+'/reply',{'body':_0x1a7730}))[_0x289498(0xd9)][_0x289498(0x116)];return{..._0x4ac19c,'id':_0x37f8b2['replyId'],'dT':_0x8cd0d1(+_0x37f8b2[_0x289498(0x12c)])[_0x289498(0xf4)](_0x289498(0x10e)),'personId':_0x37f8b2[_0x289498(0x127)]};}else{const _0x4d24cf={'memberId':_0x10b909,'unitId':_0x408e88,'content':_0x1029e6,'mention':_0x48d83c},_0x14b85c=await this[_0x289498(0x135)][_0x289498(0x121)](_0x289498(0xfa)+_0x408e88+_0x289498(0xe4),{'body':_0x4d24cf});return X(_0x14b85c[_0x289498(0xd9)][_0x289498(0x12e)],_0x4ac19c);}}async[_0x1b63d2(0xeb)](_0x339605){const _0x1a653e=_0x1b63d2;var _0x47c22c,_0x3ef7f4;const {text:_0x527f01,unitId:_0xaf5f68}=_0x339605,_0x2a569d=(_0x3ef7f4=(_0x47c22c=_0x527f01[_0x1a653e(0xee)])==null?void 0x0:_0x47c22c['filter'](_0x4bcd50=>_0x4bcd50['rangeType']===_0x590602[_0x1a653e(0xfd)])['map'](_0x117cfa=>_0x117cfa[_0x1a653e(0x123)]))!=null?_0x3ef7f4:[],_0x2c0242=JSON[_0x1a653e(0x11f)](_0x527f01),_0xd3145b=_0x339605[_0x1a653e(0x136)],_0x566c92=_0x339605['id'],_0x234bd1={'memberId':(await this['_sessionService']['requireSession'](_0xaf5f68))[_0x1a653e(0xec)](),'unitId':_0xaf5f68,'threadId':_0xd3145b,'mention':_0x2a569d,'content':_0x2c0242,'replyId':_0x566c92},_0x4a2109=await this[_0x1a653e(0x135)][_0x1a653e(0x121)](_0x1a653e(0xfa)+_0xaf5f68+_0x1a653e(0x100),{'body':_0x234bd1});return!_0x4a2109['body'][_0x1a653e(0x102)]||_0x4a2109[_0x1a653e(0xd9)][_0x1a653e(0x102)][_0x1a653e(0x138)]===0x1;}async[_0x1b63d2(0x107)](_0x23f1f6){const _0x8aa3f4=_0x1b63d2,{unitId:_0x28e0ce}=_0x23f1f6,_0x1dbca8=_0x23f1f6[_0x8aa3f4(0x136)],_0x29a476={'memberId':this[_0x8aa3f4(0x134)]['getCurrentUser']()[_0x8aa3f4(0xf0)],'unitId':_0x28e0ce,'threadId':_0x1dbca8,'solved':_0x23f1f6[_0x8aa3f4(0x104)]?I['Solved']:I[_0x8aa3f4(0xe6)]},_0xb8c5ef=await this['_httpService'][_0x8aa3f4(0x121)](_0x8aa3f4(0xfa)+_0x28e0ce+_0x8aa3f4(0x10c),{'body':_0x29a476});return!_0xb8c5ef[_0x8aa3f4(0xd9)][_0x8aa3f4(0x102)]||_0xb8c5ef[_0x8aa3f4(0xd9)][_0x8aa3f4(0x102)][_0x8aa3f4(0x138)]===0x1;}async['deleteComment'](_0x3f6c3e,_0x31d976,_0x22dae2,_0xd02e8c){const _0x3d9fd4=_0x1b63d2,_0x1e3707={'memberId':(await this[_0x3d9fd4(0xe2)][_0x3d9fd4(0x11a)](_0x3f6c3e))[_0x3d9fd4(0xec)](),'threadId':_0x22dae2,'replyId':_0xd02e8c,'unitId':_0x3f6c3e},_0xbdddf7=await this[_0x3d9fd4(0x135)][_0x3d9fd4(0x121)]('/universer-api/comment/unit/'+_0x3f6c3e+_0x3d9fd4(0x11c),{'body':_0x1e3707});return!_0xbdddf7['body'][_0x3d9fd4(0x102)]||_0xbdddf7[_0x3d9fd4(0xd9)]['error'][_0x3d9fd4(0x138)]===0x1;}async[_0x1b63d2(0xf3)](_0x432f70,_0x2c301f,_0x3ade9f){const _0x250ee3=_0x1b63d2,_0x12742b={'unitId':_0x432f70,'threadId':_0x3ade9f},_0x1cd2b2=await this[_0x250ee3(0x135)][_0x250ee3(0x121)](_0x250ee3(0xfa)+_0x432f70+_0x250ee3(0xf7),{'body':_0x12742b}),_0x1af759=_0x3ade9f[_0x250ee3(0x113)](_0x40c5d7=>ee(_0x1cd2b2[_0x250ee3(0xd9)][_0x250ee3(0x111)][_0x40c5d7],_0x432f70,_0x2c301f))[_0x250ee3(0x125)](Boolean);return Object[_0x250ee3(0x120)](_0x1cd2b2[_0x250ee3(0xd9)][_0x250ee3(0x12a)])[_0x250ee3(0x110)](_0x25e561=>{const _0x236a0e=_0x250ee3;this[_0x236a0e(0x134)][_0x236a0e(0xdb)](_0x25e561);}),_0x1af759;}[_0x1b63d2(0x130)](_0x4955ae){const _0x210ab0=_0x1b63d2;return{'id':_0x4955ae['id'],'threadId':_0x4955ae[_0x210ab0(0x136)],'ref':_0x4955ae['ref']};}};f=Q([_(0x0,_0x1f1d44(_0x1f9932)),_(0x1,_0x1f1d44(_0x50aa43)),_(0x2,_0x1f1d44(_0x1b2657)),_(0x3,_0x1f1d44(_0x37d13d))],f);var re=Object[_0x1b63d2(0x10f)],te=(_0x263e91,_0x5ecfe5,_0x2f168b,_0x35def6)=>{const _0x41b960=_0x1b63d2;for(var _0x413aee=_0x35def6>0x1?void 0x0:_0x35def6?re(_0x5ecfe5,_0x2f168b):_0x5ecfe5,_0x2cd164=_0x263e91[_0x41b960(0x139)]-0x1,_0x2cd06c;_0x2cd164>=0x0;_0x2cd164--)(_0x2cd06c=_0x263e91[_0x2cd164])&&(_0x413aee=_0x2cd06c(_0x413aee)||_0x413aee);return _0x413aee;},N=(_0x489731,_0x1e01d9)=>(_0x28a08c,_0x2f9626)=>_0x1e01d9(_0x28a08c,_0x2f9626,_0x489731);function _0xfba9(){const _0x2bf505=['getUnit','user','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','/universer-api/comment/unit/','_threadCommentDataSourceService','_configService','COMMENT','pipe','solved','/edit','onStarting','error','slice','resolved','_initDataSource','disposeWithMe','resolveComment','replyId','6338838HviQuS','personId','pluginName','/solved','4211868wttVTZ','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','comments','_threadCommentDataSource','map','symbol','3668980qfjQNm','reply','Add','12610432nzXeGX','deleteComment','requireSession','_commentService','/delete','unitId','replies','stringify','values','post','type','rangeId','root','filter','parse','userId','UNIVER_UNKNOWN','Reply','users','content','createTimestamp','Solved','comment','/universer-api/user/list','saveCommentToSnapshot','UNRECOGNIZED','Delete','_initUserSync','_userService','_httpService','threadId','_init','code','length','3565982qajZxx','_threadCommentModel','_config','785661hOKPUE','add','_injector','body','Edit','addUser','onReady','Unknown','Solve','find','dataSource','getComment','_sessionService','addComment','/add','commentUpdate$','OpenOrReOpen','getUser','get','size','parentId','updateComment','getMemberID','delete','customRanges','setConfig','userID','1890024LdKSjp','2iPCWvR','listComments','format'];_0xfba9=function(){return _0x2bf505;};return _0xfba9();}let g=class extends _0x3a39fe{constructor(_0x38a4fa,_0x111500){const _0xfd3f1b=_0x1b63d2;super(),this['_threadCommentDataSourceService']=_0x38a4fa,this[_0xfd3f1b(0x112)]=_0x111500,this['_initDataSource']();}[_0x1b63d2(0x105)](){const _0x16ec98=_0x1b63d2;this[_0x16ec98(0xfb)][_0x16ec98(0xe0)]=this[_0x16ec98(0x112)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4bf1ef),N(0x1,_0x1f1d44(f))],g);var se=Object['defineProperty'],oe=Object[_0x1b63d2(0x10f)],ne=(_0x5a342d,_0x2810b9,_0x54928b)=>_0x2810b9 in _0x5a342d?se(_0x5a342d,_0x2810b9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x54928b}):_0x5a342d[_0x2810b9]=_0x54928b,ie=(_0x3de797,_0x421b53,_0x1f05ea,_0x2875a4)=>{const _0x2dad89=_0x1b63d2;for(var _0x3e394d=_0x2875a4>0x1?void 0x0:_0x2875a4?oe(_0x421b53,_0x1f05ea):_0x421b53,_0x4d63c6=_0x3de797[_0x2dad89(0x139)]-0x1,_0x50698f;_0x4d63c6>=0x0;_0x4d63c6--)(_0x50698f=_0x3de797[_0x4d63c6])&&(_0x3e394d=_0x50698f(_0x3e394d)||_0x3e394d);return _0x3e394d;},w=(_0x3ec69d,_0x466188)=>(_0x591ba9,_0x3b9278)=>_0x466188(_0x591ba9,_0x3b9278,_0x3ec69d),$=(_0x57ae81,_0x20131d,_0x9ae2f1)=>ne(_0x57ae81,typeof _0x20131d!=_0x1b63d2(0x114)?_0x20131d+'':_0x20131d,_0x9ae2f1);let b=class extends _0x3e09ee{constructor(_0x2b56d2=M,_0x12ed5a,_0x21be15){const _0x5c649c=_0x1b63d2;super(),this[_0x5c649c(0x13c)]=_0x2b56d2,this['_injector']=_0x12ed5a,this[_0x5c649c(0xfc)]=_0x21be15;const {..._0x575b49}=_0x3b8c01({},M,this[_0x5c649c(0x13c)]);this[_0x5c649c(0xfc)][_0x5c649c(0xef)](z,_0x575b49);}[_0x1b63d2(0x101)](){[[f],[g],[S]]['forEach'](_0x8a592a=>{const _0x381d2c=_0x1578;this[_0x381d2c(0xd8)][_0x381d2c(0xd7)](_0x8a592a);});}[_0x1b63d2(0xdc)](){const _0x3db257=_0x1b63d2;this['_injector'][_0x3db257(0xe8)](g),this['_injector'][_0x3db257(0xe8)](S);}};$(b,_0x1b63d2(0x10b),W),$(b,_0x1b63d2(0x122),_0x2bdad0[_0x1b63d2(0x128)]),b=ie([_0x284154(_0x29e253,_0x29d8d6,_0x314a4b),w(0x1,_0x1f1d44(_0x37d13d)),w(0x2,_0x4d3760)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js ADDED
@@ -0,0 +1 @@
1
+ const _0x1b63d2=_0x1578;(function(_0x5431e3,_0xd6a9ca){const _0xa3f024=_0x1578,_0x207776=_0x5431e3();while(!![]){try{const _0x25ba84=-parseInt(_0xa3f024(0x13d))/0x1*(parseInt(_0xa3f024(0xf2))/0x2)+parseInt(_0xa3f024(0xf1))/0x3+parseInt(_0xa3f024(0x10d))/0x4+parseInt(_0xa3f024(0x115))/0x5+parseInt(_0xa3f024(0x109))/0x6+-parseInt(_0xa3f024(0x13a))/0x7+-parseInt(_0xa3f024(0x118))/0x8;if(_0x25ba84===_0xd6a9ca)break;else _0x207776['push'](_0x207776['shift']());}catch(_0x57cc54){_0x207776['push'](_0x207776['shift']());}}}(_0xfba9,0x92efd));import{CommentService as _0x1efde7,CollaborationSessionService as _0x1b2657,UniverCollaborationClientPlugin as _0x29d8d6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x314a4b}from'@univerjs-pro/license';import{dayjs as _0x8cd0d1,UserManagerService as _0x50aa43,Inject as _0x1f1d44,Injector as _0x37d13d,Disposable as _0x3a39fe,CustomRangeType as _0x590602,UniverInstanceType as _0x2bdad0,DependentOn as _0x284154,IConfigService as _0x4d3760,Plugin as _0x3e09ee,merge as _0x3b8c01}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29e253}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x153911,IThreadCommentDataSourceService as _0x4bf1ef}from'@univerjs/thread-comment';import{bufferTime as _0x426407}from'rxjs';import{HTTPService as _0x1f9932}from'@univerjs/network';const W=_0x1b63d2(0xf8);var I=(_0x2cf4d9=>(_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0xe6)]=0x0]=_0x1b63d2(0xe6),_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0x12d)]=0x1]='Solved',_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0x131)]=-0x1]=_0x1b63d2(0x131),_0x2cf4d9))(I||{}),v=(_0x4fec35=>(_0x4fec35[_0x4fec35[_0x1b63d2(0xdd)]=0x0]=_0x1b63d2(0xdd),_0x4fec35[_0x4fec35[_0x1b63d2(0x117)]=0x1]=_0x1b63d2(0x117),_0x4fec35[_0x4fec35[_0x1b63d2(0x129)]=0x2]='Reply',_0x4fec35[_0x4fec35['Edit']=0x3]='Edit',_0x4fec35[_0x4fec35[_0x1b63d2(0x132)]=0x4]=_0x1b63d2(0x132),_0x4fec35[_0x4fec35['Solve']=0x5]=_0x1b63d2(0xde),_0x4fec35[_0x4fec35[_0x1b63d2(0x131)]=-0x1]=_0x1b63d2(0x131),_0x4fec35))(v||{});const D=_0x2a37cc=>_0x8cd0d1(new Date(+_0x2a37cc))[_0x1b63d2(0xf4)](_0x1b63d2(0x10e)),B=async(_0x28fc55,_0x34c8ed)=>{const _0x4d46f7=_0x1b63d2,_0x72a9f3=_0x28fc55[_0x4d46f7(0xe8)](_0x50aa43),_0x8311af=_0x28fc55[_0x4d46f7(0xe8)](_0x1f9932);_0x34c8ed['forEach'](_0x131182=>{const _0x5b2f45=_0x4d46f7;_0x72a9f3[_0x5b2f45(0xe7)](_0x131182)&&_0x34c8ed[_0x5b2f45(0xed)](_0x131182);}),_0x34c8ed[_0x4d46f7(0xe9)]&&(await _0x8311af[_0x4d46f7(0xe8)](_0x4d46f7(0x12f),{'params':{'userIDs':[..._0x34c8ed]}}))['body'][_0x4d46f7(0x12a)][_0x4d46f7(0x110)](_0x116a67=>{const _0x5e22d0=_0x4d46f7;_0x116a67&&_0x72a9f3[_0x5e22d0(0xdb)](_0x116a67);});};var K=Object[_0x1b63d2(0x10f)],V=(_0x5a09ab,_0x240573,_0x1a9479,_0x11f1eb)=>{for(var _0x1c7a36=_0x11f1eb>0x1?void 0x0:_0x11f1eb?K(_0x240573,_0x1a9479):_0x240573,_0x3ed78f=_0x5a09ab['length']-0x1,_0x58b219;_0x3ed78f>=0x0;_0x3ed78f--)(_0x58b219=_0x5a09ab[_0x3ed78f])&&(_0x1c7a36=_0x58b219(_0x1c7a36)||_0x1c7a36);return _0x1c7a36;},p=(_0x412509,_0xb6238d)=>(_0x2d1c3a,_0x55d765)=>_0xb6238d(_0x2d1c3a,_0x55d765,_0x412509);let S=class extends _0x3a39fe{constructor(_0x14f531,_0x4b7826,_0xd6e308,_0x449742){const _0x29c25b=_0x1b63d2;super(),this[_0x29c25b(0x11b)]=_0x14f531,this[_0x29c25b(0x13b)]=_0x4b7826,this[_0x29c25b(0x134)]=_0xd6e308,this[_0x29c25b(0xd8)]=_0x449742,this[_0x29c25b(0x137)](),this[_0x29c25b(0x133)]();}[_0x1b63d2(0x133)](){const _0x14e99e=_0x1b63d2;this[_0x14e99e(0x106)](this[_0x14e99e(0x13b)][_0x14e99e(0xe5)][_0x14e99e(0xfe)](_0x426407(0x10))['subscribe'](_0x45fbe3=>{const _0x49b6a3=_0x14e99e,_0x358fbc=new Set();_0x45fbe3[_0x49b6a3(0x110)](_0x599637=>{const _0x5b2001=_0x49b6a3;switch(_0x599637[_0x5b2001(0x122)]){case'add':{const _0xd8a688=_0x599637['payload'][_0x5b2001(0x10a)];_0x358fbc['add'](_0xd8a688);break;}}}),B(this[_0x49b6a3(0xd8)],_0x358fbc);}));}[_0x1b63d2(0x137)](){const _0x188efe=_0x1b63d2;this[_0x188efe(0x106)](this[_0x188efe(0x11b)]['commentUpdate$'][_0x188efe(0xf9)](async _0x37e2d4=>{const _0xc63fe0=_0x188efe;var _0x1b16de,_0x3261a1,_0x434e51,_0xbec997;const _0x1a9d2c=(_0x1b16de=this['_threadCommentModel'][_0xc63fe0(0xf5)](_0x37e2d4[_0xc63fe0(0x11d)])[_0xc63fe0(0xdf)](_0x561aad=>_0x561aad[_0xc63fe0(0x136)]===_0x37e2d4[_0xc63fe0(0x136)]))==null?void 0x0:_0x1b16de['root'];if(!_0x1a9d2c)return;const {unitId:_0x2a1173,subUnitId:_0x78a3f4}=_0x1a9d2c;switch(_0x37e2d4[_0xc63fe0(0xf6)]&&this[_0xc63fe0(0x134)]['addUser'](_0x37e2d4[_0xc63fe0(0xf6)]),_0x37e2d4['type']){case v[_0xc63fe0(0x117)]:break;case v[_0xc63fe0(0x129)]:{this['_threadCommentModel']['addComment'](_0x2a1173,_0x78a3f4,{'unitId':_0x2a1173,'subUnitId':_0x78a3f4,'ref':'','id':_0x37e2d4[_0xc63fe0(0x108)],'dT':D(+_0x37e2d4[_0xc63fe0(0x12c)]),'threadId':_0x37e2d4[_0xc63fe0(0x136)],'personId':(_0x434e51=(_0x3261a1=_0x37e2d4['user'])==null?void 0x0:_0x3261a1[_0xc63fe0(0xf0)])!=null?_0x434e51:_0x37e2d4['userId'],'text':JSON[_0xc63fe0(0x126)](_0x37e2d4[_0xc63fe0(0x12b)]),'parentId':_0x1a9d2c['id']});break;}case v['Delete']:{const _0xb9e28f=this[_0xc63fe0(0x13b)][_0xc63fe0(0xe1)](_0x2a1173,_0x78a3f4,_0x37e2d4[_0xc63fe0(0x108)]);_0xb9e28f&&_0xb9e28f[_0xc63fe0(0xea)]&&this[_0xc63fe0(0x13b)][_0xc63fe0(0x119)](_0x2a1173,_0x78a3f4,_0x37e2d4[_0xc63fe0(0x108)]);break;}case v[_0xc63fe0(0xda)]:{this[_0xc63fe0(0x13b)][_0xc63fe0(0xeb)](_0x2a1173,_0x78a3f4,{'commentId':_0x37e2d4[_0xc63fe0(0x108)],'text':JSON[_0xc63fe0(0x126)](_0x37e2d4[_0xc63fe0(0x12b)])});break;}case v[_0xc63fe0(0xde)]:{const _0x82479=(_0xbec997=this[_0xc63fe0(0x13b)]['getUnit'](_0x37e2d4[_0xc63fe0(0x11d)])[_0xc63fe0(0xdf)](_0xf53bd6=>_0xf53bd6[_0xc63fe0(0x136)]===_0x37e2d4[_0xc63fe0(0x136)]))==null?void 0x0:_0xbec997[_0xc63fe0(0x124)];_0x82479&&this[_0xc63fe0(0x13b)][_0xc63fe0(0x107)](_0x2a1173,_0x78a3f4,_0x82479['id'],_0x37e2d4['solved']===I[_0xc63fe0(0x12d)]);break;}}}));}};S=V([p(0x0,_0x1f1d44(_0x1efde7)),p(0x1,_0x1f1d44(_0x153911)),p(0x2,_0x1f1d44(_0x50aa43)),p(0x3,_0x1f1d44(_0x37d13d))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1b63d2(0x10f)],Q=(_0x453d60,_0x1035bd,_0x3cadbd,_0x1afb87)=>{const _0x53ba2e=_0x1b63d2;for(var _0x2d1bbf=_0x1afb87>0x1?void 0x0:_0x1afb87?k(_0x1035bd,_0x3cadbd):_0x1035bd,_0x2c3e49=_0x453d60[_0x53ba2e(0x139)]-0x1,_0x4270a3;_0x2c3e49>=0x0;_0x2c3e49--)(_0x4270a3=_0x453d60[_0x2c3e49])&&(_0x2d1bbf=_0x4270a3(_0x2d1bbf)||_0x2d1bbf);return _0x2d1bbf;},_=(_0x35eb53,_0x3cdcf6)=>(_0x2d11b1,_0xff17e)=>_0x3cdcf6(_0x2d11b1,_0xff17e,_0x35eb53);function _0x1578(_0x42b4a1,_0x583ca4){const _0xfba9bc=_0xfba9();return _0x1578=function(_0x157888,_0xa6824){_0x157888=_0x157888-0xd7;let _0x26eb3d=_0xfba9bc[_0x157888];return _0x26eb3d;},_0x1578(_0x42b4a1,_0x583ca4);}function X(_0x22d0b4,_0x32a958){const _0x10d340=_0x1b63d2,_0x1899d2=_0x22d0b4[_0x10d340(0x11e)][0x0];return{..._0x32a958,'id':_0x1899d2[_0x10d340(0x108)],'resolved':_0x22d0b4[_0x10d340(0xff)]===0x1,'dT':D(_0x1899d2[_0x10d340(0x12c)]),'personId':_0x1899d2[_0x10d340(0x127)],'threadId':_0x1899d2[_0x10d340(0x136)]};}function ee(_0x49a07f,_0xca14b8,_0x3ab95d){const _0x137da6=_0x1b63d2;var _0x281e00,_0x52347c;if(((_0x52347c=(_0x281e00=_0x49a07f==null?void 0x0:_0x49a07f[_0x137da6(0x11e)])==null?void 0x0:_0x281e00[_0x137da6(0x139)])!=null?_0x52347c:0x0)>0x0){const _0x3738e0=(_0x89f30a,_0x49e8bf)=>({'id':_0x89f30a[_0x137da6(0x108)],'threadId':_0x89f30a[_0x137da6(0x136)],'dT':D(_0x89f30a[_0x137da6(0x12c)]),'personId':_0x89f30a[_0x137da6(0x127)],'resolved':_0x49a07f[_0x137da6(0xff)]===I[_0x137da6(0x12d)],'unitId':_0xca14b8,'subUnitId':_0x3ab95d,'text':JSON[_0x137da6(0x126)](_0x89f30a['content']),'parentId':_0x49e8bf}),_0x39a866=_0x3738e0(_0x49a07f[_0x137da6(0x11e)][0x0]);return{..._0x39a866,'children':_0x49a07f[_0x137da6(0x11e)][_0x137da6(0x103)](0x1)[_0x137da6(0x113)](_0x18717b=>_0x3738e0(_0x18717b,_0x39a866['id']))};}return null;}let f=class{constructor(_0x3048c6,_0x20bfbe,_0x1a2128,_0x3a7f7b){this['_httpService']=_0x3048c6,this['_userService']=_0x20bfbe,this['_sessionService']=_0x1a2128,this['_injector']=_0x3a7f7b;}async[_0x1b63d2(0xe3)](_0x4ac19c){const _0x289498=_0x1b63d2;var _0x48c935,_0x47f404;const {parentId:_0x2f65a2,unitId:_0x408e88,text:_0x2ff9d3,threadId:_0x758987}=_0x4ac19c,_0x48d83c=(_0x47f404=(_0x48c935=_0x2ff9d3[_0x289498(0xee)])==null?void 0x0:_0x48c935[_0x289498(0x125)](_0x55e0cc=>_0x55e0cc['rangeType']===_0x590602[_0x289498(0xfd)])['map'](_0x19f725=>_0x19f725[_0x289498(0x123)]))!=null?_0x47f404:[],_0x1029e6=JSON[_0x289498(0x11f)](_0x2ff9d3),_0x10b909=(await this[_0x289498(0xe2)]['requireSession'](_0x408e88))[_0x289498(0xec)]();if(_0x2f65a2){const _0x1a7730={'memberId':_0x10b909,'unitId':_0x408e88,'content':_0x1029e6,'mention':_0x48d83c,'threadId':_0x758987},_0x37f8b2=(await this['_httpService'][_0x289498(0x121)](_0x289498(0xfa)+_0x408e88+'/reply',{'body':_0x1a7730}))[_0x289498(0xd9)][_0x289498(0x116)];return{..._0x4ac19c,'id':_0x37f8b2['replyId'],'dT':_0x8cd0d1(+_0x37f8b2[_0x289498(0x12c)])[_0x289498(0xf4)](_0x289498(0x10e)),'personId':_0x37f8b2[_0x289498(0x127)]};}else{const _0x4d24cf={'memberId':_0x10b909,'unitId':_0x408e88,'content':_0x1029e6,'mention':_0x48d83c},_0x14b85c=await this[_0x289498(0x135)][_0x289498(0x121)](_0x289498(0xfa)+_0x408e88+_0x289498(0xe4),{'body':_0x4d24cf});return X(_0x14b85c[_0x289498(0xd9)][_0x289498(0x12e)],_0x4ac19c);}}async[_0x1b63d2(0xeb)](_0x339605){const _0x1a653e=_0x1b63d2;var _0x47c22c,_0x3ef7f4;const {text:_0x527f01,unitId:_0xaf5f68}=_0x339605,_0x2a569d=(_0x3ef7f4=(_0x47c22c=_0x527f01[_0x1a653e(0xee)])==null?void 0x0:_0x47c22c['filter'](_0x4bcd50=>_0x4bcd50['rangeType']===_0x590602[_0x1a653e(0xfd)])['map'](_0x117cfa=>_0x117cfa[_0x1a653e(0x123)]))!=null?_0x3ef7f4:[],_0x2c0242=JSON[_0x1a653e(0x11f)](_0x527f01),_0xd3145b=_0x339605[_0x1a653e(0x136)],_0x566c92=_0x339605['id'],_0x234bd1={'memberId':(await this['_sessionService']['requireSession'](_0xaf5f68))[_0x1a653e(0xec)](),'unitId':_0xaf5f68,'threadId':_0xd3145b,'mention':_0x2a569d,'content':_0x2c0242,'replyId':_0x566c92},_0x4a2109=await this[_0x1a653e(0x135)][_0x1a653e(0x121)](_0x1a653e(0xfa)+_0xaf5f68+_0x1a653e(0x100),{'body':_0x234bd1});return!_0x4a2109['body'][_0x1a653e(0x102)]||_0x4a2109[_0x1a653e(0xd9)][_0x1a653e(0x102)][_0x1a653e(0x138)]===0x1;}async[_0x1b63d2(0x107)](_0x23f1f6){const _0x8aa3f4=_0x1b63d2,{unitId:_0x28e0ce}=_0x23f1f6,_0x1dbca8=_0x23f1f6[_0x8aa3f4(0x136)],_0x29a476={'memberId':this[_0x8aa3f4(0x134)]['getCurrentUser']()[_0x8aa3f4(0xf0)],'unitId':_0x28e0ce,'threadId':_0x1dbca8,'solved':_0x23f1f6[_0x8aa3f4(0x104)]?I['Solved']:I[_0x8aa3f4(0xe6)]},_0xb8c5ef=await this['_httpService'][_0x8aa3f4(0x121)](_0x8aa3f4(0xfa)+_0x28e0ce+_0x8aa3f4(0x10c),{'body':_0x29a476});return!_0xb8c5ef[_0x8aa3f4(0xd9)][_0x8aa3f4(0x102)]||_0xb8c5ef[_0x8aa3f4(0xd9)][_0x8aa3f4(0x102)][_0x8aa3f4(0x138)]===0x1;}async['deleteComment'](_0x3f6c3e,_0x31d976,_0x22dae2,_0xd02e8c){const _0x3d9fd4=_0x1b63d2,_0x1e3707={'memberId':(await this[_0x3d9fd4(0xe2)][_0x3d9fd4(0x11a)](_0x3f6c3e))[_0x3d9fd4(0xec)](),'threadId':_0x22dae2,'replyId':_0xd02e8c,'unitId':_0x3f6c3e},_0xbdddf7=await this[_0x3d9fd4(0x135)][_0x3d9fd4(0x121)]('/universer-api/comment/unit/'+_0x3f6c3e+_0x3d9fd4(0x11c),{'body':_0x1e3707});return!_0xbdddf7['body'][_0x3d9fd4(0x102)]||_0xbdddf7[_0x3d9fd4(0xd9)]['error'][_0x3d9fd4(0x138)]===0x1;}async[_0x1b63d2(0xf3)](_0x432f70,_0x2c301f,_0x3ade9f){const _0x250ee3=_0x1b63d2,_0x12742b={'unitId':_0x432f70,'threadId':_0x3ade9f},_0x1cd2b2=await this[_0x250ee3(0x135)][_0x250ee3(0x121)](_0x250ee3(0xfa)+_0x432f70+_0x250ee3(0xf7),{'body':_0x12742b}),_0x1af759=_0x3ade9f[_0x250ee3(0x113)](_0x40c5d7=>ee(_0x1cd2b2[_0x250ee3(0xd9)][_0x250ee3(0x111)][_0x40c5d7],_0x432f70,_0x2c301f))[_0x250ee3(0x125)](Boolean);return Object[_0x250ee3(0x120)](_0x1cd2b2[_0x250ee3(0xd9)][_0x250ee3(0x12a)])[_0x250ee3(0x110)](_0x25e561=>{const _0x236a0e=_0x250ee3;this[_0x236a0e(0x134)][_0x236a0e(0xdb)](_0x25e561);}),_0x1af759;}[_0x1b63d2(0x130)](_0x4955ae){const _0x210ab0=_0x1b63d2;return{'id':_0x4955ae['id'],'threadId':_0x4955ae[_0x210ab0(0x136)],'ref':_0x4955ae['ref']};}};f=Q([_(0x0,_0x1f1d44(_0x1f9932)),_(0x1,_0x1f1d44(_0x50aa43)),_(0x2,_0x1f1d44(_0x1b2657)),_(0x3,_0x1f1d44(_0x37d13d))],f);var re=Object[_0x1b63d2(0x10f)],te=(_0x263e91,_0x5ecfe5,_0x2f168b,_0x35def6)=>{const _0x41b960=_0x1b63d2;for(var _0x413aee=_0x35def6>0x1?void 0x0:_0x35def6?re(_0x5ecfe5,_0x2f168b):_0x5ecfe5,_0x2cd164=_0x263e91[_0x41b960(0x139)]-0x1,_0x2cd06c;_0x2cd164>=0x0;_0x2cd164--)(_0x2cd06c=_0x263e91[_0x2cd164])&&(_0x413aee=_0x2cd06c(_0x413aee)||_0x413aee);return _0x413aee;},N=(_0x489731,_0x1e01d9)=>(_0x28a08c,_0x2f9626)=>_0x1e01d9(_0x28a08c,_0x2f9626,_0x489731);function _0xfba9(){const _0x2bf505=['getUnit','user','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','/universer-api/comment/unit/','_threadCommentDataSourceService','_configService','COMMENT','pipe','solved','/edit','onStarting','error','slice','resolved','_initDataSource','disposeWithMe','resolveComment','replyId','6338838HviQuS','personId','pluginName','/solved','4211868wttVTZ','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','comments','_threadCommentDataSource','map','symbol','3668980qfjQNm','reply','Add','12610432nzXeGX','deleteComment','requireSession','_commentService','/delete','unitId','replies','stringify','values','post','type','rangeId','root','filter','parse','userId','UNIVER_UNKNOWN','Reply','users','content','createTimestamp','Solved','comment','/universer-api/user/list','saveCommentToSnapshot','UNRECOGNIZED','Delete','_initUserSync','_userService','_httpService','threadId','_init','code','length','3565982qajZxx','_threadCommentModel','_config','785661hOKPUE','add','_injector','body','Edit','addUser','onReady','Unknown','Solve','find','dataSource','getComment','_sessionService','addComment','/add','commentUpdate$','OpenOrReOpen','getUser','get','size','parentId','updateComment','getMemberID','delete','customRanges','setConfig','userID','1890024LdKSjp','2iPCWvR','listComments','format'];_0xfba9=function(){return _0x2bf505;};return _0xfba9();}let g=class extends _0x3a39fe{constructor(_0x38a4fa,_0x111500){const _0xfd3f1b=_0x1b63d2;super(),this['_threadCommentDataSourceService']=_0x38a4fa,this[_0xfd3f1b(0x112)]=_0x111500,this['_initDataSource']();}[_0x1b63d2(0x105)](){const _0x16ec98=_0x1b63d2;this[_0x16ec98(0xfb)][_0x16ec98(0xe0)]=this[_0x16ec98(0x112)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4bf1ef),N(0x1,_0x1f1d44(f))],g);var se=Object['defineProperty'],oe=Object[_0x1b63d2(0x10f)],ne=(_0x5a342d,_0x2810b9,_0x54928b)=>_0x2810b9 in _0x5a342d?se(_0x5a342d,_0x2810b9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x54928b}):_0x5a342d[_0x2810b9]=_0x54928b,ie=(_0x3de797,_0x421b53,_0x1f05ea,_0x2875a4)=>{const _0x2dad89=_0x1b63d2;for(var _0x3e394d=_0x2875a4>0x1?void 0x0:_0x2875a4?oe(_0x421b53,_0x1f05ea):_0x421b53,_0x4d63c6=_0x3de797[_0x2dad89(0x139)]-0x1,_0x50698f;_0x4d63c6>=0x0;_0x4d63c6--)(_0x50698f=_0x3de797[_0x4d63c6])&&(_0x3e394d=_0x50698f(_0x3e394d)||_0x3e394d);return _0x3e394d;},w=(_0x3ec69d,_0x466188)=>(_0x591ba9,_0x3b9278)=>_0x466188(_0x591ba9,_0x3b9278,_0x3ec69d),$=(_0x57ae81,_0x20131d,_0x9ae2f1)=>ne(_0x57ae81,typeof _0x20131d!=_0x1b63d2(0x114)?_0x20131d+'':_0x20131d,_0x9ae2f1);let b=class extends _0x3e09ee{constructor(_0x2b56d2=M,_0x12ed5a,_0x21be15){const _0x5c649c=_0x1b63d2;super(),this[_0x5c649c(0x13c)]=_0x2b56d2,this['_injector']=_0x12ed5a,this[_0x5c649c(0xfc)]=_0x21be15;const {..._0x575b49}=_0x3b8c01({},M,this[_0x5c649c(0x13c)]);this[_0x5c649c(0xfc)][_0x5c649c(0xef)](z,_0x575b49);}[_0x1b63d2(0x101)](){[[f],[g],[S]]['forEach'](_0x8a592a=>{const _0x381d2c=_0x1578;this[_0x381d2c(0xd8)][_0x381d2c(0xd7)](_0x8a592a);});}[_0x1b63d2(0xdc)](){const _0x3db257=_0x1b63d2;this['_injector'][_0x3db257(0xe8)](g),this['_injector'][_0x3db257(0xe8)](S);}};$(b,_0x1b63d2(0x10b),W),$(b,_0x1b63d2(0x122),_0x2bdad0[_0x1b63d2(0x128)]),b=ie([_0x284154(_0x29e253,_0x29d8d6,_0x314a4b),w(0x1,_0x1f1d44(_0x37d13d)),w(0x2,_0x4d3760)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x4a55(_0x3134ef,_0x1e74ce){const _0x32c137=_0x32c1();return _0x4a55=function(_0x4a551e,_0x15fbbd){_0x4a551e=_0x4a551e-0x13d;let _0x15e020=_0x32c137[_0x4a551e];return _0x15e020;},_0x4a55(_0x3134ef,_0x1e74ce);}function _0x32c1(){const _0x3c6766=['find','/edit','post','function','forEach','UniverThreadCommentUi','Solved','OpenOrReOpen','Unknown','thread-comment-data-source.config','_threadCommentDataSourceService','solved','_initUserSync','UniverProLicense','parse','get','_httpService','UniverProThreadCommentDatasource','userID','getUnit','Module','requireSession','dataSource','_userService','Edit','customRanges','Inject','/solved','map','UniverThreadCommentDataSourcePlugin','disposeWithMe','/reply','11638629XXovKI','content','setConfig','4spbUQN','@univerjs/core','Solve','filter','2838746rTaMdW','/delete','defineProperty','203090lwlAqR','userId','getMemberID','amd','comments','Injector','COMMENT','UniverCore','createTimestamp','@univerjs-pro/collaboration-client','rangeType','UniverNetwork','_sessionService','16591030scDprF','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CustomRangeType','add','merge','_threadCommentModel','UniverInstanceType','/list','threadId','@univerjs-pro/license','rangeId','@univerjs/network','getUser','Reply','Disposable','UserManagerService','_threadCommentDataSource','replies','parentId','Add','UniverThreadComment','/add','HTTPService','delete','updateComment','toStringTag','code','stringify','resolved','unitId','4999608UtzpCY','length','symbol','Delete','_configService','_commentService','replyId','size','UNIVER_UNKNOWN','dayjs','ThreadCommentModel','_injector','users','UniverProCollaborationClient','getOwnPropertyDescriptor','_config','CommentService','resolveComment','getCurrentUser','commentUpdate$','saveCommentToSnapshot','slice','user','addUser','listComments','3765503GfuAwY','Plugin','getComment','onStarting','8OwAbec','rxjs','body','@univerjs/thread-comment-ui','syncUpdateMutationToColla','comment','UniverCollaborationClientPlugin','error','root','3YADYxX','type','/universer-api/comment/unit/','_init','_initDataSource','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','4452280peTFWx','deleteComment'];_0x32c1=function(){return _0x3c6766;};return _0x32c1();}(function(_0xa40a65,_0xe5b979){const _0x3dd6d9=_0x4a55,_0x3fcac4=_0xa40a65();while(!![]){try{const _0x289346=parseInt(_0x3dd6d9(0x16d))/0x1+parseInt(_0x3dd6d9(0x16a))/0x2*(parseInt(_0x3dd6d9(0x1be))/0x3)+parseInt(_0x3dd6d9(0x166))/0x4*(parseInt(_0x3dd6d9(0x141))/0x5)+-parseInt(_0x3dd6d9(0x198))/0x6+-parseInt(_0x3dd6d9(0x1b1))/0x7+parseInt(_0x3dd6d9(0x1b5))/0x8*(parseInt(_0x3dd6d9(0x163))/0x9)+-parseInt(_0x3dd6d9(0x17a))/0xa;if(_0x289346===_0xe5b979)break;else _0x3fcac4['push'](_0x3fcac4['shift']());}catch(_0xb20c9e){_0x3fcac4['push'](_0x3fcac4['shift']());}}}(_0x32c1,0xbd678),function(_0x4ae0ae,_0x19210a){const _0x5a6d80=_0x4a55;typeof exports=='object'&&typeof module<'u'?_0x19210a(exports,require(_0x5a6d80(0x176)),require(_0x5a6d80(0x183)),require(_0x5a6d80(0x167)),require(_0x5a6d80(0x1b8)),require('@univerjs/thread-comment'),require(_0x5a6d80(0x1b6)),require(_0x5a6d80(0x185))):typeof define==_0x5a6d80(0x146)&&define[_0x5a6d80(0x170)]?define(['exports',_0x5a6d80(0x176),_0x5a6d80(0x183),_0x5a6d80(0x167),_0x5a6d80(0x1b8),'@univerjs/thread-comment','rxjs','@univerjs/network'],_0x19210a):(_0x4ae0ae=typeof globalThis<'u'?globalThis:_0x4ae0ae||self,_0x19210a(_0x4ae0ae[_0x5a6d80(0x154)]={},_0x4ae0ae[_0x5a6d80(0x1a5)],_0x4ae0ae[_0x5a6d80(0x150)],_0x4ae0ae[_0x5a6d80(0x174)],_0x4ae0ae[_0x5a6d80(0x148)],_0x4ae0ae[_0x5a6d80(0x18e)],_0x4ae0ae[_0x5a6d80(0x1b6)],_0x4ae0ae[_0x5a6d80(0x178)]));}(this,function(_0x24ba54,_0x2b4b2b,_0x9c264e,_0x73a9fb,_0x246312,_0x3a25c2,_0x59bb03,_0x414b20){'use strict';const _0x157c37=_0x4a55;const _0x57d03f=_0x157c37(0x17b);var _0x42fe13=(_0x4644ea=>(_0x4644ea[_0x4644ea[_0x157c37(0x14a)]=0x0]=_0x157c37(0x14a),_0x4644ea[_0x4644ea[_0x157c37(0x149)]=0x1]='Solved',_0x4644ea[_0x4644ea[_0x157c37(0x140)]=-0x1]=_0x157c37(0x140),_0x4644ea))(_0x42fe13||{}),_0x548c16=(_0x29566d=>(_0x29566d[_0x29566d[_0x157c37(0x14b)]=0x0]='Unknown',_0x29566d[_0x29566d[_0x157c37(0x18d)]=0x1]=_0x157c37(0x18d),_0x29566d[_0x29566d[_0x157c37(0x187)]=0x2]=_0x157c37(0x187),_0x29566d[_0x29566d[_0x157c37(0x15b)]=0x3]=_0x157c37(0x15b),_0x29566d[_0x29566d[_0x157c37(0x19b)]=0x4]=_0x157c37(0x19b),_0x29566d[_0x29566d[_0x157c37(0x168)]=0x5]=_0x157c37(0x168),_0x29566d[_0x29566d[_0x157c37(0x140)]=-0x1]=_0x157c37(0x140),_0x29566d))(_0x548c16||{});const _0x2c835b=_0x13bf2b=>_0x73a9fb['dayjs'](new Date(+_0x13bf2b))['format']('YYYY/MM/DD\x20HH:mm'),_0x4157cc=async(_0x254172,_0x275cfa)=>{const _0x2f4530=_0x157c37,_0x39b69e=_0x254172['get'](_0x73a9fb[_0x2f4530(0x189)]),_0x306028=_0x254172[_0x2f4530(0x152)](_0x414b20[_0x2f4530(0x190)]);_0x275cfa[_0x2f4530(0x147)](_0x5f09dd=>{const _0x84693c=_0x2f4530;_0x39b69e[_0x84693c(0x186)](_0x5f09dd)&&_0x275cfa[_0x84693c(0x191)](_0x5f09dd);}),_0x275cfa[_0x2f4530(0x19f)]&&(await _0x306028[_0x2f4530(0x152)]('/universer-api/user/list',{'params':{'userIDs':[..._0x275cfa]}}))[_0x2f4530(0x1b7)][_0x2f4530(0x1a4)][_0x2f4530(0x147)](_0x4818cc=>{const _0x8fdf08=_0x2f4530;_0x4818cc&&_0x39b69e[_0x8fdf08(0x1af)](_0x4818cc);});};var _0x2240b2=Object[_0x157c37(0x1a6)],_0x552137=(_0xae6bc5,_0x3111df,_0x8940ce,_0x750b1a)=>{const _0x1101e2=_0x157c37;for(var _0x2e9b2f=_0x750b1a>0x1?void 0x0:_0x750b1a?_0x2240b2(_0x3111df,_0x8940ce):_0x3111df,_0x25417f=_0xae6bc5[_0x1101e2(0x199)]-0x1,_0x3f0afd;_0x25417f>=0x0;_0x25417f--)(_0x3f0afd=_0xae6bc5[_0x25417f])&&(_0x2e9b2f=_0x3f0afd(_0x2e9b2f)||_0x2e9b2f);return _0x2e9b2f;},_0x95b99c=(_0x5b6f3f,_0x290560)=>(_0x195a72,_0x41cfe2)=>_0x290560(_0x195a72,_0x41cfe2,_0x5b6f3f);let _0x47a343=class extends _0x73a9fb[_0x157c37(0x188)]{constructor(_0x3557e2,_0x40b785,_0x1d298e,_0x53a821){const _0x153d3e=_0x157c37;super(),this[_0x153d3e(0x19d)]=_0x3557e2,this['_threadCommentModel']=_0x40b785,this[_0x153d3e(0x15a)]=_0x1d298e,this['_injector']=_0x53a821,this[_0x153d3e(0x1c1)](),this['_initUserSync']();}[_0x157c37(0x14f)](){const _0x2e28c7=_0x157c37;this['disposeWithMe'](this[_0x2e28c7(0x17f)][_0x2e28c7(0x1ab)]['pipe'](_0x59bb03['bufferTime'](0x10))['subscribe'](_0xbf6074=>{const _0x5bea57=_0x2e28c7,_0x5a8128=new Set();_0xbf6074[_0x5bea57(0x147)](_0x44c8d6=>{const _0x57a8ae=_0x5bea57;switch(_0x44c8d6[_0x57a8ae(0x1bf)]){case _0x57a8ae(0x17d):{const _0x48e9b4=_0x44c8d6['payload']['personId'];_0x5a8128[_0x57a8ae(0x17d)](_0x48e9b4);break;}}}),_0x4157cc(this[_0x5bea57(0x1a3)],_0x5a8128);}));}[_0x157c37(0x1c1)](){const _0x5dc2cd=_0x157c37;this[_0x5dc2cd(0x161)](this[_0x5dc2cd(0x19d)][_0x5dc2cd(0x1ab)]['subscribe'](async _0x381664=>{const _0x464e76=_0x5dc2cd;var _0x36dce7,_0x3755d0,_0x9aad52,_0x449c1b;const _0x1e8eb7=(_0x36dce7=this['_threadCommentModel'][_0x464e76(0x156)](_0x381664[_0x464e76(0x197)])[_0x464e76(0x143)](_0x4cea49=>_0x4cea49[_0x464e76(0x182)]===_0x381664[_0x464e76(0x182)]))==null?void 0x0:_0x36dce7[_0x464e76(0x1bd)];if(!_0x1e8eb7)return;const {unitId:_0x2d7369,subUnitId:_0x19888f}=_0x1e8eb7;switch(_0x381664['user']&&this[_0x464e76(0x15a)][_0x464e76(0x1af)](_0x381664[_0x464e76(0x1ae)]),_0x381664[_0x464e76(0x1bf)]){case _0x548c16['Add']:break;case _0x548c16[_0x464e76(0x187)]:{this[_0x464e76(0x17f)]['addComment'](_0x2d7369,_0x19888f,{'unitId':_0x2d7369,'subUnitId':_0x19888f,'ref':'','id':_0x381664[_0x464e76(0x19e)],'dT':_0x2c835b(+_0x381664[_0x464e76(0x175)]),'threadId':_0x381664[_0x464e76(0x182)],'personId':(_0x9aad52=(_0x3755d0=_0x381664[_0x464e76(0x1ae)])==null?void 0x0:_0x3755d0[_0x464e76(0x155)])!=null?_0x9aad52:_0x381664[_0x464e76(0x16e)],'text':JSON[_0x464e76(0x151)](_0x381664['content']),'parentId':_0x1e8eb7['id']});break;}case _0x548c16[_0x464e76(0x19b)]:{const _0x24a1f2=this[_0x464e76(0x17f)][_0x464e76(0x1b3)](_0x2d7369,_0x19888f,_0x381664[_0x464e76(0x19e)]);_0x24a1f2&&_0x24a1f2[_0x464e76(0x18c)]&&this[_0x464e76(0x17f)]['deleteComment'](_0x2d7369,_0x19888f,_0x381664[_0x464e76(0x19e)]);break;}case _0x548c16[_0x464e76(0x15b)]:{this[_0x464e76(0x17f)]['updateComment'](_0x2d7369,_0x19888f,{'commentId':_0x381664[_0x464e76(0x19e)],'text':JSON['parse'](_0x381664[_0x464e76(0x164)])});break;}case _0x548c16[_0x464e76(0x168)]:{const _0x3a19ff=(_0x449c1b=this[_0x464e76(0x17f)][_0x464e76(0x156)](_0x381664['unitId'])[_0x464e76(0x143)](_0xf9473f=>_0xf9473f['threadId']===_0x381664[_0x464e76(0x182)]))==null?void 0x0:_0x449c1b[_0x464e76(0x1bd)];_0x3a19ff&&this[_0x464e76(0x17f)]['resolveComment'](_0x2d7369,_0x19888f,_0x3a19ff['id'],_0x381664[_0x464e76(0x14e)]===_0x42fe13[_0x464e76(0x149)]);break;}}}));}};_0x47a343=_0x552137([_0x95b99c(0x0,_0x73a9fb[_0x157c37(0x15d)](_0x2b4b2b[_0x157c37(0x1a8)])),_0x95b99c(0x1,_0x73a9fb[_0x157c37(0x15d)](_0x3a25c2[_0x157c37(0x1a2)])),_0x95b99c(0x2,_0x73a9fb[_0x157c37(0x15d)](_0x73a9fb[_0x157c37(0x189)])),_0x95b99c(0x3,_0x73a9fb[_0x157c37(0x15d)](_0x73a9fb[_0x157c37(0x172)]))],_0x47a343);const _0x510045=_0x157c37(0x14c),_0x3052ea={};var _0x5af0ca=Object[_0x157c37(0x1a6)],_0x5e173d=(_0x2fad5a,_0x3c9174,_0x3ff5a0,_0x2dc707)=>{const _0x404cd4=_0x157c37;for(var _0x1fa16a=_0x2dc707>0x1?void 0x0:_0x2dc707?_0x5af0ca(_0x3c9174,_0x3ff5a0):_0x3c9174,_0x380b1c=_0x2fad5a[_0x404cd4(0x199)]-0x1,_0x13b559;_0x380b1c>=0x0;_0x380b1c--)(_0x13b559=_0x2fad5a[_0x380b1c])&&(_0x1fa16a=_0x13b559(_0x1fa16a)||_0x1fa16a);return _0x1fa16a;},_0x2ec172=(_0x1f7503,_0x1901f)=>(_0x3ae533,_0x437370)=>_0x1901f(_0x3ae533,_0x437370,_0x1f7503);function _0x37dd0e(_0x304b62,_0x5739ab){const _0x180167=_0x157c37,_0x3dcc13=_0x304b62[_0x180167(0x18b)][0x0];return{..._0x5739ab,'id':_0x3dcc13['replyId'],'resolved':_0x304b62[_0x180167(0x14e)]===0x1,'dT':_0x2c835b(_0x3dcc13[_0x180167(0x175)]),'personId':_0x3dcc13[_0x180167(0x16e)],'threadId':_0x3dcc13[_0x180167(0x182)]};}function _0x286026(_0x3aba3f,_0x3c17a7,_0x4f26cf){const _0x2167e7=_0x157c37;var _0x53d116,_0x1f2210;if(((_0x1f2210=(_0x53d116=_0x3aba3f==null?void 0x0:_0x3aba3f[_0x2167e7(0x18b)])==null?void 0x0:_0x53d116[_0x2167e7(0x199)])!=null?_0x1f2210:0x0)>0x0){const _0x29eccb=(_0x1cb0e9,_0x12e3ff)=>({'id':_0x1cb0e9[_0x2167e7(0x19e)],'threadId':_0x1cb0e9[_0x2167e7(0x182)],'dT':_0x2c835b(_0x1cb0e9[_0x2167e7(0x175)]),'personId':_0x1cb0e9['userId'],'resolved':_0x3aba3f[_0x2167e7(0x14e)]===_0x42fe13[_0x2167e7(0x149)],'unitId':_0x3c17a7,'subUnitId':_0x4f26cf,'text':JSON[_0x2167e7(0x151)](_0x1cb0e9[_0x2167e7(0x164)]),'parentId':_0x12e3ff}),_0x8c105=_0x29eccb(_0x3aba3f[_0x2167e7(0x18b)][0x0]);return{..._0x8c105,'children':_0x3aba3f['replies'][_0x2167e7(0x1ad)](0x1)[_0x2167e7(0x15f)](_0x392c13=>_0x29eccb(_0x392c13,_0x8c105['id']))};}return null;}let _0x4df378=class{constructor(_0x4eda3e,_0x42fc37,_0x12d5a9,_0x3a12c9){const _0x4b0df5=_0x157c37;this['_httpService']=_0x4eda3e,this['_userService']=_0x42fc37,this[_0x4b0df5(0x179)]=_0x12d5a9,this[_0x4b0df5(0x1a3)]=_0x3a12c9;}async['addComment'](_0x5b857b){const _0x455824=_0x157c37;var _0x3a9bba,_0x2da241;const {parentId:_0xb3206e,unitId:_0x420431,text:_0x5d27ff,threadId:_0x442d09}=_0x5b857b,_0x1e19f6=(_0x2da241=(_0x3a9bba=_0x5d27ff['customRanges'])==null?void 0x0:_0x3a9bba[_0x455824(0x169)](_0x27ea32=>_0x27ea32[_0x455824(0x177)]===_0x73a9fb[_0x455824(0x17c)][_0x455824(0x173)])[_0x455824(0x15f)](_0x40a48f=>_0x40a48f[_0x455824(0x184)]))!=null?_0x2da241:[],_0x5de28f=JSON[_0x455824(0x195)](_0x5d27ff),_0x258c48=(await this[_0x455824(0x179)][_0x455824(0x158)](_0x420431))[_0x455824(0x16f)]();if(_0xb3206e){const _0x280698={'memberId':_0x258c48,'unitId':_0x420431,'content':_0x5de28f,'mention':_0x1e19f6,'threadId':_0x442d09},_0x31f81c=(await this[_0x455824(0x153)]['post'](_0x455824(0x1c0)+_0x420431+_0x455824(0x162),{'body':_0x280698}))[_0x455824(0x1b7)]['reply'];return{..._0x5b857b,'id':_0x31f81c['replyId'],'dT':_0x73a9fb[_0x455824(0x1a1)](+_0x31f81c[_0x455824(0x175)])['format'](_0x455824(0x13f)),'personId':_0x31f81c[_0x455824(0x16e)]};}else{const _0xba6037={'memberId':_0x258c48,'unitId':_0x420431,'content':_0x5de28f,'mention':_0x1e19f6},_0x1c432d=await this[_0x455824(0x153)][_0x455824(0x145)](_0x455824(0x1c0)+_0x420431+_0x455824(0x18f),{'body':_0xba6037});return _0x37dd0e(_0x1c432d['body'][_0x455824(0x1ba)],_0x5b857b);}}async[_0x157c37(0x192)](_0x4e4ebf){const _0x26de26=_0x157c37;var _0x44421d,_0xa84115;const {text:_0x4e1115,unitId:_0x58274b}=_0x4e4ebf,_0x3bab5f=(_0xa84115=(_0x44421d=_0x4e1115[_0x26de26(0x15c)])==null?void 0x0:_0x44421d[_0x26de26(0x169)](_0x4b9912=>_0x4b9912['rangeType']===_0x73a9fb[_0x26de26(0x17c)]['COMMENT'])[_0x26de26(0x15f)](_0x457c7a=>_0x457c7a['rangeId']))!=null?_0xa84115:[],_0x40aceb=JSON[_0x26de26(0x195)](_0x4e1115),_0x6efd04=_0x4e4ebf['threadId'],_0x2c7a97=_0x4e4ebf['id'],_0x587cc8={'memberId':(await this['_sessionService'][_0x26de26(0x158)](_0x58274b))[_0x26de26(0x16f)](),'unitId':_0x58274b,'threadId':_0x6efd04,'mention':_0x3bab5f,'content':_0x40aceb,'replyId':_0x2c7a97},_0x747d9d=await this['_httpService']['post'](_0x26de26(0x1c0)+_0x58274b+_0x26de26(0x144),{'body':_0x587cc8});return!_0x747d9d[_0x26de26(0x1b7)][_0x26de26(0x1bc)]||_0x747d9d[_0x26de26(0x1b7)][_0x26de26(0x1bc)][_0x26de26(0x194)]===0x1;}async[_0x157c37(0x1a9)](_0x5786a0){const _0x459552=_0x157c37,{unitId:_0x3bcfd3}=_0x5786a0,_0x2566af=_0x5786a0['threadId'],_0xbda9ce={'memberId':this['_userService'][_0x459552(0x1aa)]()[_0x459552(0x155)],'unitId':_0x3bcfd3,'threadId':_0x2566af,'solved':_0x5786a0[_0x459552(0x196)]?_0x42fe13[_0x459552(0x149)]:_0x42fe13[_0x459552(0x14a)]},_0xbff5ba=await this[_0x459552(0x153)][_0x459552(0x145)]('/universer-api/comment/unit/'+_0x3bcfd3+_0x459552(0x15e),{'body':_0xbda9ce});return!_0xbff5ba[_0x459552(0x1b7)]['error']||_0xbff5ba[_0x459552(0x1b7)]['error']['code']===0x1;}async[_0x157c37(0x142)](_0x214bb9,_0x4e712c,_0x4df44e,_0x14cdd6){const _0x2c0451=_0x157c37,_0x3eee05={'memberId':(await this['_sessionService'][_0x2c0451(0x158)](_0x214bb9))[_0x2c0451(0x16f)](),'threadId':_0x4df44e,'replyId':_0x14cdd6,'unitId':_0x214bb9},_0x3bee1f=await this[_0x2c0451(0x153)][_0x2c0451(0x145)]('/universer-api/comment/unit/'+_0x214bb9+_0x2c0451(0x16b),{'body':_0x3eee05});return!_0x3bee1f[_0x2c0451(0x1b7)][_0x2c0451(0x1bc)]||_0x3bee1f[_0x2c0451(0x1b7)][_0x2c0451(0x1bc)][_0x2c0451(0x194)]===0x1;}async[_0x157c37(0x1b0)](_0x430c33,_0xeeba28,_0x3fdd01){const _0x556ae7=_0x157c37,_0x1a8466={'unitId':_0x430c33,'threadId':_0x3fdd01},_0x2d72b5=await this[_0x556ae7(0x153)][_0x556ae7(0x145)](_0x556ae7(0x1c0)+_0x430c33+_0x556ae7(0x181),{'body':_0x1a8466}),_0x533def=_0x3fdd01[_0x556ae7(0x15f)](_0x2543f2=>_0x286026(_0x2d72b5[_0x556ae7(0x1b7)][_0x556ae7(0x171)][_0x2543f2],_0x430c33,_0xeeba28))['filter'](Boolean);return Object['values'](_0x2d72b5[_0x556ae7(0x1b7)]['users'])[_0x556ae7(0x147)](_0x24224b=>{const _0x35e8f5=_0x556ae7;this[_0x35e8f5(0x15a)][_0x35e8f5(0x1af)](_0x24224b);}),_0x533def;}[_0x157c37(0x1ac)](_0x194bf2){const _0x10d283=_0x157c37;return{'id':_0x194bf2['id'],'threadId':_0x194bf2[_0x10d283(0x182)],'ref':_0x194bf2['ref']};}};_0x4df378=_0x5e173d([_0x2ec172(0x0,_0x73a9fb['Inject'](_0x414b20[_0x157c37(0x190)])),_0x2ec172(0x1,_0x73a9fb[_0x157c37(0x15d)](_0x73a9fb[_0x157c37(0x189)])),_0x2ec172(0x2,_0x73a9fb[_0x157c37(0x15d)](_0x2b4b2b['CollaborationSessionService'])),_0x2ec172(0x3,_0x73a9fb[_0x157c37(0x15d)](_0x73a9fb['Injector']))],_0x4df378);var _0x3ce939=Object[_0x157c37(0x1a6)],_0x414da0=(_0x5b4b92,_0x3cf2da,_0x4ae3ee,_0x23e5c0)=>{const _0x353994=_0x157c37;for(var _0x2bdc7e=_0x23e5c0>0x1?void 0x0:_0x23e5c0?_0x3ce939(_0x3cf2da,_0x4ae3ee):_0x3cf2da,_0x46e9de=_0x5b4b92[_0x353994(0x199)]-0x1,_0x5eb9fc;_0x46e9de>=0x0;_0x46e9de--)(_0x5eb9fc=_0x5b4b92[_0x46e9de])&&(_0x2bdc7e=_0x5eb9fc(_0x2bdc7e)||_0x2bdc7e);return _0x2bdc7e;},_0x1ad8be=(_0x43fec2,_0x266d8d)=>(_0x59a400,_0x3d5967)=>_0x266d8d(_0x59a400,_0x3d5967,_0x43fec2);let _0xf9fbc2=class extends _0x73a9fb[_0x157c37(0x188)]{constructor(_0x21f388,_0x3e1be6){const _0x47f93e=_0x157c37;super(),this[_0x47f93e(0x14d)]=_0x21f388,this[_0x47f93e(0x18a)]=_0x3e1be6,this[_0x47f93e(0x13d)]();}[_0x157c37(0x13d)](){const _0xb29e01=_0x157c37;this[_0xb29e01(0x14d)][_0xb29e01(0x159)]=this[_0xb29e01(0x18a)],this[_0xb29e01(0x14d)][_0xb29e01(0x1b9)]=!0x1;}};_0xf9fbc2=_0x414da0([_0x1ad8be(0x0,_0x3a25c2['IThreadCommentDataSourceService']),_0x1ad8be(0x1,_0x73a9fb[_0x157c37(0x15d)](_0x4df378))],_0xf9fbc2);var _0x54371a=Object[_0x157c37(0x16c)],_0x114715=Object[_0x157c37(0x1a6)],_0x3ce6c3=(_0x174fe0,_0x4ab8ad,_0x1aea7d)=>_0x4ab8ad in _0x174fe0?_0x54371a(_0x174fe0,_0x4ab8ad,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1aea7d}):_0x174fe0[_0x4ab8ad]=_0x1aea7d,_0x21487c=(_0x538dde,_0x1ca66b,_0x27ced0,_0x57a644)=>{const _0x58acf8=_0x157c37;for(var _0x9201ac=_0x57a644>0x1?void 0x0:_0x57a644?_0x114715(_0x1ca66b,_0x27ced0):_0x1ca66b,_0x52e691=_0x538dde[_0x58acf8(0x199)]-0x1,_0x5b088f;_0x52e691>=0x0;_0x52e691--)(_0x5b088f=_0x538dde[_0x52e691])&&(_0x9201ac=_0x5b088f(_0x9201ac)||_0x9201ac);return _0x9201ac;},_0x3bf28b=(_0x5b8622,_0x1c9cab)=>(_0x15f3e2,_0x379497)=>_0x1c9cab(_0x15f3e2,_0x379497,_0x5b8622),_0x2e9fd0=(_0x10fd2b,_0x470afb,_0x1f211b)=>_0x3ce6c3(_0x10fd2b,typeof _0x470afb!=_0x157c37(0x19a)?_0x470afb+'':_0x470afb,_0x1f211b);_0x24ba54[_0x157c37(0x160)]=class extends _0x73a9fb[_0x157c37(0x1b2)]{constructor(_0x5bac6b=_0x3052ea,_0x19f3ac,_0x295fff){const _0x1827fb=_0x157c37;super(),this['_config']=_0x5bac6b,this[_0x1827fb(0x1a3)]=_0x19f3ac,this[_0x1827fb(0x19c)]=_0x295fff;const {..._0x845cc1}=_0x73a9fb[_0x1827fb(0x17e)]({},_0x3052ea,this[_0x1827fb(0x1a7)]);this[_0x1827fb(0x19c)][_0x1827fb(0x165)](_0x510045,_0x845cc1);}[_0x157c37(0x1b4)](){[[_0x4df378],[_0xf9fbc2],[_0x47a343]]['forEach'](_0x3727b8=>{const _0x1d26d9=_0x4a55;this[_0x1d26d9(0x1a3)][_0x1d26d9(0x17d)](_0x3727b8);});}['onReady'](){const _0x2e7ffc=_0x157c37;this[_0x2e7ffc(0x1a3)][_0x2e7ffc(0x152)](_0xf9fbc2),this['_injector'][_0x2e7ffc(0x152)](_0x47a343);}},_0x2e9fd0(_0x24ba54['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x57d03f),_0x2e9fd0(_0x24ba54['UniverThreadCommentDataSourcePlugin'],_0x157c37(0x1bf),_0x73a9fb[_0x157c37(0x180)][_0x157c37(0x1a0)]),_0x24ba54[_0x157c37(0x160)]=_0x21487c([_0x73a9fb['DependentOn'](_0x246312['UniverThreadCommentUIPlugin'],_0x2b4b2b[_0x157c37(0x1bb)],_0x9c264e[_0x157c37(0x13e)]),_0x3bf28b(0x1,_0x73a9fb['Inject'](_0x73a9fb['Injector'])),_0x3bf28b(0x2,_0x73a9fb['IConfigService'])],_0x24ba54['UniverThreadCommentDataSourcePlugin']),Object[_0x157c37(0x16c)](_0x24ba54,Symbol[_0x157c37(0x193)],{'value':_0x157c37(0x157)});}));
1
+ function _0x1d71(_0x35b4c9,_0x1f14a5){const _0x3ca37b=_0x3ca3();return _0x1d71=function(_0x1d712f,_0x20cfc7){_0x1d712f=_0x1d712f-0x14e;let _0x19ca1a=_0x3ca37b[_0x1d712f];return _0x19ca1a;},_0x1d71(_0x35b4c9,_0x1f14a5);}(function(_0x5d3e81,_0x1b4c87){const _0x48ebbb=_0x1d71,_0x2fa0e8=_0x5d3e81();while(!![]){try{const _0x3c46c3=parseInt(_0x48ebbb(0x16b))/0x1+-parseInt(_0x48ebbb(0x19a))/0x2*(parseInt(_0x48ebbb(0x1ae))/0x3)+parseInt(_0x48ebbb(0x1af))/0x4+-parseInt(_0x48ebbb(0x1a0))/0x5+-parseInt(_0x48ebbb(0x1b6))/0x6*(-parseInt(_0x48ebbb(0x16d))/0x7)+parseInt(_0x48ebbb(0x160))/0x8+parseInt(_0x48ebbb(0x187))/0x9*(-parseInt(_0x48ebbb(0x1b7))/0xa);if(_0x3c46c3===_0x1b4c87)break;else _0x2fa0e8['push'](_0x2fa0e8['shift']());}catch(_0x586423){_0x2fa0e8['push'](_0x2fa0e8['shift']());}}}(_0x3ca3,0x1e2c0),function(_0x1b18ad,_0x3f92a9){const _0x1ffe43=_0x1d71;typeof exports==_0x1ffe43(0x171)&&typeof module<'u'?_0x3f92a9(exports,require(_0x1ffe43(0x18c)),require('@univerjs-pro/license'),require('@univerjs/core'),require(_0x1ffe43(0x1cd)),require(_0x1ffe43(0x19e)),require(_0x1ffe43(0x153)),require('@univerjs/network')):typeof define==_0x1ffe43(0x1c6)&&define['amd']?define(['exports',_0x1ffe43(0x18c),_0x1ffe43(0x196),_0x1ffe43(0x189),'@univerjs/thread-comment-ui',_0x1ffe43(0x19e),_0x1ffe43(0x153),_0x1ffe43(0x172)],_0x3f92a9):(_0x1b18ad=typeof globalThis<'u'?globalThis:_0x1b18ad||self,_0x3f92a9(_0x1b18ad['UniverProThreadCommentDatasource']={},_0x1b18ad[_0x1ffe43(0x1a2)],_0x1b18ad[_0x1ffe43(0x1a6)],_0x1b18ad['UniverCore'],_0x1b18ad[_0x1ffe43(0x179)],_0x1b18ad['UniverThreadComment'],_0x1b18ad[_0x1ffe43(0x153)],_0x1b18ad[_0x1ffe43(0x15a)]));}(this,function(_0x4bb04a,_0x231508,_0x58ba6e,_0x51fa93,_0x1a4e41,_0x11221a,_0x5323bf,_0x5f50e0){'use strict';const _0x1a890b=_0x1d71;const _0x358dee=_0x1a890b(0x165);var _0x358345=(_0x23fb2a=>(_0x23fb2a[_0x23fb2a['OpenOrReOpen']=0x0]=_0x1a890b(0x16e),_0x23fb2a[_0x23fb2a[_0x1a890b(0x154)]=0x1]=_0x1a890b(0x154),_0x23fb2a[_0x23fb2a['UNRECOGNIZED']=-0x1]=_0x1a890b(0x1ba),_0x23fb2a))(_0x358345||{}),_0x7b9b6b=(_0x1c8e35=>(_0x1c8e35[_0x1c8e35[_0x1a890b(0x157)]=0x0]=_0x1a890b(0x157),_0x1c8e35[_0x1c8e35[_0x1a890b(0x1b2)]=0x1]='Add',_0x1c8e35[_0x1c8e35[_0x1a890b(0x1b8)]=0x2]=_0x1a890b(0x1b8),_0x1c8e35[_0x1c8e35[_0x1a890b(0x150)]=0x3]=_0x1a890b(0x150),_0x1c8e35[_0x1c8e35[_0x1a890b(0x1cb)]=0x4]=_0x1a890b(0x1cb),_0x1c8e35[_0x1c8e35[_0x1a890b(0x1a3)]=0x5]=_0x1a890b(0x1a3),_0x1c8e35[_0x1c8e35['UNRECOGNIZED']=-0x1]=_0x1a890b(0x1ba),_0x1c8e35))(_0x7b9b6b||{});const _0x1d2abd=_0x12a52c=>_0x51fa93[_0x1a890b(0x18a)](new Date(+_0x12a52c))[_0x1a890b(0x15f)](_0x1a890b(0x168)),_0x48c9de=async(_0x4c7bfa,_0x1729c8)=>{const _0x211020=_0x1a890b,_0x59c121=_0x4c7bfa[_0x211020(0x1d0)](_0x51fa93[_0x211020(0x1b9)]),_0x56f4e0=_0x4c7bfa['get'](_0x5f50e0['HTTPService']);_0x1729c8[_0x211020(0x1d6)](_0x1f4bb2=>{const _0x52dd3a=_0x211020;_0x59c121[_0x52dd3a(0x1c8)](_0x1f4bb2)&&_0x1729c8[_0x52dd3a(0x17e)](_0x1f4bb2);}),_0x1729c8[_0x211020(0x169)]&&(await _0x56f4e0[_0x211020(0x1d0)](_0x211020(0x151),{'params':{'userIDs':[..._0x1729c8]}}))['body'][_0x211020(0x1d2)][_0x211020(0x1d6)](_0x2ee77e=>{const _0x147319=_0x211020;_0x2ee77e&&_0x59c121[_0x147319(0x17a)](_0x2ee77e);});};var _0x5271ec=Object[_0x1a890b(0x161)],_0x426765=(_0x469070,_0x857ef0,_0x3bb69e,_0x2e722f)=>{const _0x5eb309=_0x1a890b;for(var _0x4abfff=_0x2e722f>0x1?void 0x0:_0x2e722f?_0x5271ec(_0x857ef0,_0x3bb69e):_0x857ef0,_0x4483c2=_0x469070[_0x5eb309(0x188)]-0x1,_0x1db081;_0x4483c2>=0x0;_0x4483c2--)(_0x1db081=_0x469070[_0x4483c2])&&(_0x4abfff=_0x1db081(_0x4abfff)||_0x4abfff);return _0x4abfff;},_0xc4c72e=(_0x4ec054,_0x4d33fd)=>(_0x5092ed,_0x3f4bc7)=>_0x4d33fd(_0x5092ed,_0x3f4bc7,_0x4ec054);let _0x49d52b=class extends _0x51fa93[_0x1a890b(0x1c7)]{constructor(_0x248723,_0x3f1814,_0x4fc229,_0x3937b5){const _0x3a099e=_0x1a890b;super(),this['_commentService']=_0x248723,this[_0x3a099e(0x1c5)]=_0x3f1814,this['_userService']=_0x4fc229,this[_0x3a099e(0x18e)]=_0x3937b5,this[_0x3a099e(0x19d)](),this[_0x3a099e(0x1d8)]();}[_0x1a890b(0x1d8)](){const _0x3529e9=_0x1a890b;this['disposeWithMe'](this['_threadCommentModel'][_0x3529e9(0x1aa)]['pipe'](_0x5323bf['bufferTime'](0x10))[_0x3529e9(0x18b)](_0xcdf9a=>{const _0x4bb08f=_0x3529e9,_0x165cc8=new Set();_0xcdf9a[_0x4bb08f(0x1d6)](_0x5d1511=>{const _0x340531=_0x4bb08f;switch(_0x5d1511[_0x340531(0x170)]){case _0x340531(0x1cc):{const _0x59a14b=_0x5d1511[_0x340531(0x1b0)][_0x340531(0x1a1)];_0x165cc8[_0x340531(0x1cc)](_0x59a14b);break;}}}),_0x48c9de(this[_0x4bb08f(0x18e)],_0x165cc8);}));}[_0x1a890b(0x19d)](){const _0x4477a6=_0x1a890b;this[_0x4477a6(0x1be)](this[_0x4477a6(0x14e)]['commentUpdate$'][_0x4477a6(0x18b)](async _0x28b9c8=>{const _0x2e0c15=_0x4477a6;var _0x36504a,_0x2f5193,_0x304432,_0x17e4c9;const _0x2b5169=(_0x36504a=this[_0x2e0c15(0x1c5)][_0x2e0c15(0x19c)](_0x28b9c8[_0x2e0c15(0x190)])[_0x2e0c15(0x1d3)](_0x2d72fb=>_0x2d72fb[_0x2e0c15(0x191)]===_0x28b9c8[_0x2e0c15(0x191)]))==null?void 0x0:_0x36504a[_0x2e0c15(0x19f)];if(!_0x2b5169)return;const {unitId:_0x2fdf4c,subUnitId:_0x111498}=_0x2b5169;switch(_0x28b9c8[_0x2e0c15(0x19b)]&&this[_0x2e0c15(0x15c)][_0x2e0c15(0x17a)](_0x28b9c8[_0x2e0c15(0x19b)]),_0x28b9c8[_0x2e0c15(0x170)]){case _0x7b9b6b[_0x2e0c15(0x1b2)]:break;case _0x7b9b6b['Reply']:{this[_0x2e0c15(0x1c5)]['addComment'](_0x2fdf4c,_0x111498,{'unitId':_0x2fdf4c,'subUnitId':_0x111498,'ref':'','id':_0x28b9c8['replyId'],'dT':_0x1d2abd(+_0x28b9c8[_0x2e0c15(0x1ab)]),'threadId':_0x28b9c8[_0x2e0c15(0x191)],'personId':(_0x304432=(_0x2f5193=_0x28b9c8[_0x2e0c15(0x19b)])==null?void 0x0:_0x2f5193[_0x2e0c15(0x1c2)])!=null?_0x304432:_0x28b9c8[_0x2e0c15(0x1a5)],'text':JSON[_0x2e0c15(0x177)](_0x28b9c8[_0x2e0c15(0x175)]),'parentId':_0x2b5169['id']});break;}case _0x7b9b6b['Delete']:{const _0x393844=this[_0x2e0c15(0x1c5)][_0x2e0c15(0x192)](_0x2fdf4c,_0x111498,_0x28b9c8[_0x2e0c15(0x197)]);_0x393844&&_0x393844[_0x2e0c15(0x1c4)]&&this[_0x2e0c15(0x1c5)]['deleteComment'](_0x2fdf4c,_0x111498,_0x28b9c8[_0x2e0c15(0x197)]);break;}case _0x7b9b6b[_0x2e0c15(0x150)]:{this['_threadCommentModel'][_0x2e0c15(0x198)](_0x2fdf4c,_0x111498,{'commentId':_0x28b9c8[_0x2e0c15(0x197)],'text':JSON[_0x2e0c15(0x177)](_0x28b9c8[_0x2e0c15(0x175)])});break;}case _0x7b9b6b[_0x2e0c15(0x1a3)]:{const _0x438ed1=(_0x17e4c9=this[_0x2e0c15(0x1c5)]['getUnit'](_0x28b9c8[_0x2e0c15(0x190)])[_0x2e0c15(0x1d3)](_0x5b0d13=>_0x5b0d13[_0x2e0c15(0x191)]===_0x28b9c8[_0x2e0c15(0x191)]))==null?void 0x0:_0x17e4c9['root'];_0x438ed1&&this[_0x2e0c15(0x1c5)][_0x2e0c15(0x173)](_0x2fdf4c,_0x111498,_0x438ed1['id'],_0x28b9c8[_0x2e0c15(0x162)]===_0x358345[_0x2e0c15(0x154)]);break;}}}));}};_0x49d52b=_0x426765([_0xc4c72e(0x0,_0x51fa93[_0x1a890b(0x1ad)](_0x231508[_0x1a890b(0x183)])),_0xc4c72e(0x1,_0x51fa93[_0x1a890b(0x1ad)](_0x11221a[_0x1a890b(0x199)])),_0xc4c72e(0x2,_0x51fa93[_0x1a890b(0x1ad)](_0x51fa93['UserManagerService'])),_0xc4c72e(0x3,_0x51fa93[_0x1a890b(0x1ad)](_0x51fa93['Injector']))],_0x49d52b);const _0x2d2a41=_0x1a890b(0x1a9),_0xe7c797={};var _0x5707e4=Object[_0x1a890b(0x161)],_0x245ee6=(_0x571c93,_0x18b03f,_0x50ba2c,_0xd66515)=>{const _0x100bda=_0x1a890b;for(var _0x100c6c=_0xd66515>0x1?void 0x0:_0xd66515?_0x5707e4(_0x18b03f,_0x50ba2c):_0x18b03f,_0x6b794=_0x571c93[_0x100bda(0x188)]-0x1,_0x39ebff;_0x6b794>=0x0;_0x6b794--)(_0x39ebff=_0x571c93[_0x6b794])&&(_0x100c6c=_0x39ebff(_0x100c6c)||_0x100c6c);return _0x100c6c;},_0x7dede2=(_0x2ffbf6,_0x51b56)=>(_0x3ca1e8,_0x35ccba)=>_0x51b56(_0x3ca1e8,_0x35ccba,_0x2ffbf6);function _0x5316c2(_0x16ebc7,_0x25684b){const _0x1d647d=_0x1a890b,_0x1be0e7=_0x16ebc7[_0x1d647d(0x18f)][0x0];return{..._0x25684b,'id':_0x1be0e7[_0x1d647d(0x197)],'resolved':_0x16ebc7[_0x1d647d(0x162)]===0x1,'dT':_0x1d2abd(_0x1be0e7[_0x1d647d(0x1ab)]),'personId':_0x1be0e7['userId'],'threadId':_0x1be0e7[_0x1d647d(0x191)]};}function _0x471ce5(_0x322c58,_0x24ad29,_0x1b9b93){const _0x48779b=_0x1a890b;var _0x1aaeb4,_0x1193ce;if(((_0x1193ce=(_0x1aaeb4=_0x322c58==null?void 0x0:_0x322c58[_0x48779b(0x18f)])==null?void 0x0:_0x1aaeb4[_0x48779b(0x188)])!=null?_0x1193ce:0x0)>0x0){const _0x3dc01c=(_0x7e6b35,_0x57b259)=>({'id':_0x7e6b35[_0x48779b(0x197)],'threadId':_0x7e6b35['threadId'],'dT':_0x1d2abd(_0x7e6b35[_0x48779b(0x1ab)]),'personId':_0x7e6b35[_0x48779b(0x1a5)],'resolved':_0x322c58[_0x48779b(0x162)]===_0x358345[_0x48779b(0x154)],'unitId':_0x24ad29,'subUnitId':_0x1b9b93,'text':JSON['parse'](_0x7e6b35[_0x48779b(0x175)]),'parentId':_0x57b259}),_0x5dd364=_0x3dc01c(_0x322c58[_0x48779b(0x18f)][0x0]);return{..._0x5dd364,'children':_0x322c58[_0x48779b(0x18f)][_0x48779b(0x194)](0x1)['map'](_0x580174=>_0x3dc01c(_0x580174,_0x5dd364['id']))};}return null;}let _0x5e0620=class{constructor(_0x31f484,_0x3d758d,_0x3bf14c,_0x4b3a95){const _0x5a7cec=_0x1a890b;this[_0x5a7cec(0x184)]=_0x31f484,this[_0x5a7cec(0x15c)]=_0x3d758d,this['_sessionService']=_0x3bf14c,this[_0x5a7cec(0x18e)]=_0x4b3a95;}async[_0x1a890b(0x1d5)](_0x354617){const _0x394aeb=_0x1a890b;var _0x26e8f3,_0x42490f;const {parentId:_0x2fa80d,unitId:_0x3d930b,text:_0x172b9e,threadId:_0x36e593}=_0x354617,_0x353a75=(_0x42490f=(_0x26e8f3=_0x172b9e[_0x394aeb(0x1bb)])==null?void 0x0:_0x26e8f3[_0x394aeb(0x185)](_0x597e30=>_0x597e30[_0x394aeb(0x1bc)]===_0x51fa93[_0x394aeb(0x1a4)][_0x394aeb(0x1ce)])[_0x394aeb(0x164)](_0x20ca55=>_0x20ca55[_0x394aeb(0x1b3)]))!=null?_0x42490f:[],_0x43ea16=JSON[_0x394aeb(0x17d)](_0x172b9e),_0xdbb8a1=(await this['_sessionService'][_0x394aeb(0x1a7)](_0x3d930b))['getMemberID']();if(_0x2fa80d){const _0x3b88fe={'memberId':_0xdbb8a1,'unitId':_0x3d930b,'content':_0x43ea16,'mention':_0x353a75,'threadId':_0x36e593},_0x1b3273=(await this['_httpService'][_0x394aeb(0x152)]('/universer-api/comment/unit/'+_0x3d930b+_0x394aeb(0x195),{'body':_0x3b88fe}))[_0x394aeb(0x155)][_0x394aeb(0x17f)];return{..._0x354617,'id':_0x1b3273[_0x394aeb(0x197)],'dT':_0x51fa93[_0x394aeb(0x18a)](+_0x1b3273['createTimestamp'])[_0x394aeb(0x15f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b3273[_0x394aeb(0x1a5)]};}else{const _0x594183={'memberId':_0xdbb8a1,'unitId':_0x3d930b,'content':_0x43ea16,'mention':_0x353a75},_0x3b74fe=await this['_httpService'][_0x394aeb(0x152)](_0x394aeb(0x176)+_0x3d930b+_0x394aeb(0x174),{'body':_0x594183});return _0x5316c2(_0x3b74fe[_0x394aeb(0x155)][_0x394aeb(0x181)],_0x354617);}}async[_0x1a890b(0x198)](_0x1eb411){const _0x356a36=_0x1a890b;var _0x27e9c7,_0x58bd49;const {text:_0x2464a4,unitId:_0x1cab8e}=_0x1eb411,_0x331395=(_0x58bd49=(_0x27e9c7=_0x2464a4['customRanges'])==null?void 0x0:_0x27e9c7[_0x356a36(0x185)](_0x959539=>_0x959539['rangeType']===_0x51fa93[_0x356a36(0x1a4)][_0x356a36(0x1ce)])[_0x356a36(0x164)](_0x1f4819=>_0x1f4819['rangeId']))!=null?_0x58bd49:[],_0x515c18=JSON[_0x356a36(0x17d)](_0x2464a4),_0x214694=_0x1eb411[_0x356a36(0x191)],_0x58189d=_0x1eb411['id'],_0x301fce={'memberId':(await this['_sessionService'][_0x356a36(0x1a7)](_0x1cab8e))[_0x356a36(0x16a)](),'unitId':_0x1cab8e,'threadId':_0x214694,'mention':_0x331395,'content':_0x515c18,'replyId':_0x58189d},_0x7abaf6=await this[_0x356a36(0x184)]['post'](_0x356a36(0x176)+_0x1cab8e+'/edit',{'body':_0x301fce});return!_0x7abaf6[_0x356a36(0x155)][_0x356a36(0x1b1)]||_0x7abaf6[_0x356a36(0x155)]['error']['code']===0x1;}async[_0x1a890b(0x173)](_0x5c8bbd){const _0x86a8b8=_0x1a890b,{unitId:_0x4bdcb6}=_0x5c8bbd,_0x139503=_0x5c8bbd['threadId'],_0x4772ae={'memberId':this['_userService'][_0x86a8b8(0x182)]()[_0x86a8b8(0x1c2)],'unitId':_0x4bdcb6,'threadId':_0x139503,'solved':_0x5c8bbd[_0x86a8b8(0x1c9)]?_0x358345['Solved']:_0x358345[_0x86a8b8(0x16e)]},_0x5ca9ca=await this[_0x86a8b8(0x184)]['post'](_0x86a8b8(0x176)+_0x4bdcb6+'/solved',{'body':_0x4772ae});return!_0x5ca9ca['body']['error']||_0x5ca9ca[_0x86a8b8(0x155)][_0x86a8b8(0x1b1)]['code']===0x1;}async[_0x1a890b(0x180)](_0x1d6e2c,_0x53137c,_0x5772c0,_0x515d86){const _0x6a9f3d=_0x1a890b,_0x154b2e={'memberId':(await this[_0x6a9f3d(0x1ca)][_0x6a9f3d(0x1a7)](_0x1d6e2c))[_0x6a9f3d(0x16a)](),'threadId':_0x5772c0,'replyId':_0x515d86,'unitId':_0x1d6e2c},_0x21fb1f=await this[_0x6a9f3d(0x184)][_0x6a9f3d(0x152)](_0x6a9f3d(0x176)+_0x1d6e2c+_0x6a9f3d(0x14f),{'body':_0x154b2e});return!_0x21fb1f[_0x6a9f3d(0x155)]['error']||_0x21fb1f['body'][_0x6a9f3d(0x1b1)][_0x6a9f3d(0x193)]===0x1;}async[_0x1a890b(0x1d1)](_0x5c4920,_0x5b581a,_0x1c5eea){const _0x534bc3=_0x1a890b,_0x5bdad3={'unitId':_0x5c4920,'threadId':_0x1c5eea},_0x5a6d6d=await this['_httpService'][_0x534bc3(0x152)](_0x534bc3(0x176)+_0x5c4920+_0x534bc3(0x166),{'body':_0x5bdad3}),_0x3a1d18=_0x1c5eea[_0x534bc3(0x164)](_0x2ce17b=>_0x471ce5(_0x5a6d6d[_0x534bc3(0x155)][_0x534bc3(0x15d)][_0x2ce17b],_0x5c4920,_0x5b581a))[_0x534bc3(0x185)](Boolean);return Object[_0x534bc3(0x1b5)](_0x5a6d6d[_0x534bc3(0x155)][_0x534bc3(0x1d2)])[_0x534bc3(0x1d6)](_0x3bd3a2=>{const _0x20edc5=_0x534bc3;this[_0x20edc5(0x15c)][_0x20edc5(0x17a)](_0x3bd3a2);}),_0x3a1d18;}[_0x1a890b(0x1bf)](_0x4fa6c8){const _0x5c9df2=_0x1a890b;return{'id':_0x4fa6c8['id'],'threadId':_0x4fa6c8[_0x5c9df2(0x191)],'ref':_0x4fa6c8['ref']};}};_0x5e0620=_0x245ee6([_0x7dede2(0x0,_0x51fa93['Inject'](_0x5f50e0[_0x1a890b(0x15b)])),_0x7dede2(0x1,_0x51fa93[_0x1a890b(0x1ad)](_0x51fa93[_0x1a890b(0x1b9)])),_0x7dede2(0x2,_0x51fa93['Inject'](_0x231508[_0x1a890b(0x1d4)])),_0x7dede2(0x3,_0x51fa93[_0x1a890b(0x1ad)](_0x51fa93['Injector']))],_0x5e0620);var _0x4f3f68=Object['getOwnPropertyDescriptor'],_0x50dfbc=(_0x261130,_0xcdbff9,_0x1d1c7c,_0x28dd91)=>{const _0x3ca55e=_0x1a890b;for(var _0x17ffcb=_0x28dd91>0x1?void 0x0:_0x28dd91?_0x4f3f68(_0xcdbff9,_0x1d1c7c):_0xcdbff9,_0x2872ad=_0x261130[_0x3ca55e(0x188)]-0x1,_0x3878b1;_0x2872ad>=0x0;_0x2872ad--)(_0x3878b1=_0x261130[_0x2872ad])&&(_0x17ffcb=_0x3878b1(_0x17ffcb)||_0x17ffcb);return _0x17ffcb;},_0x46dbe4=(_0xf73938,_0x377cd0)=>(_0x58ff43,_0x30c4d6)=>_0x377cd0(_0x58ff43,_0x30c4d6,_0xf73938);let _0x94cf98=class extends _0x51fa93[_0x1a890b(0x1c7)]{constructor(_0x416422,_0x2e474b){const _0xb06615=_0x1a890b;super(),this['_threadCommentDataSourceService']=_0x416422,this[_0xb06615(0x186)]=_0x2e474b,this[_0xb06615(0x1b4)]();}[_0x1a890b(0x1b4)](){const _0x5a4482=_0x1a890b;this[_0x5a4482(0x1d7)][_0x5a4482(0x17b)]=this[_0x5a4482(0x186)],this[_0x5a4482(0x1d7)][_0x5a4482(0x1ac)]=!0x1;}};_0x94cf98=_0x50dfbc([_0x46dbe4(0x0,_0x11221a[_0x1a890b(0x158)]),_0x46dbe4(0x1,_0x51fa93['Inject'](_0x5e0620))],_0x94cf98);var _0xa802e9=Object[_0x1a890b(0x17c)],_0x40054e=Object[_0x1a890b(0x161)],_0x138cbd=(_0x4c942c,_0x1d769e,_0xe8082e)=>_0x1d769e in _0x4c942c?_0xa802e9(_0x4c942c,_0x1d769e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe8082e}):_0x4c942c[_0x1d769e]=_0xe8082e,_0x36b0f7=(_0x8fc20b,_0x51e8ca,_0x45a0f4,_0x654798)=>{const _0x283bad=_0x1a890b;for(var _0x434566=_0x654798>0x1?void 0x0:_0x654798?_0x40054e(_0x51e8ca,_0x45a0f4):_0x51e8ca,_0x141d39=_0x8fc20b[_0x283bad(0x188)]-0x1,_0x1c4f2c;_0x141d39>=0x0;_0x141d39--)(_0x1c4f2c=_0x8fc20b[_0x141d39])&&(_0x434566=_0x1c4f2c(_0x434566)||_0x434566);return _0x434566;},_0x109467=(_0x476619,_0x2e388e)=>(_0x350e1b,_0x26b329)=>_0x2e388e(_0x350e1b,_0x26b329,_0x476619),_0x158acc=(_0x3a18af,_0xf99cd,_0x59f257)=>_0x138cbd(_0x3a18af,typeof _0xf99cd!='symbol'?_0xf99cd+'':_0xf99cd,_0x59f257);_0x4bb04a[_0x1a890b(0x1c3)]=class extends _0x51fa93['Plugin']{constructor(_0x1fe90a=_0xe7c797,_0x5499dd,_0x3f6921){const _0x140fcc=_0x1a890b;super(),this[_0x140fcc(0x163)]=_0x1fe90a,this[_0x140fcc(0x18e)]=_0x5499dd,this[_0x140fcc(0x1c0)]=_0x3f6921;const {..._0x4b13bb}=_0x51fa93[_0x140fcc(0x1c1)]({},_0xe7c797,this[_0x140fcc(0x163)]);this[_0x140fcc(0x1c0)]['setConfig'](_0x2d2a41,_0x4b13bb);}[_0x1a890b(0x167)](){const _0x2b108a=_0x1a890b;[[_0x5e0620],[_0x94cf98],[_0x49d52b]][_0x2b108a(0x1d6)](_0x1ab1d8=>{const _0x387e2c=_0x2b108a;this[_0x387e2c(0x18e)][_0x387e2c(0x1cc)](_0x1ab1d8);});}[_0x1a890b(0x178)](){const _0x13e3b9=_0x1a890b;this['_injector'][_0x13e3b9(0x1d0)](_0x94cf98),this[_0x13e3b9(0x18e)]['get'](_0x49d52b);}},_0x158acc(_0x4bb04a[_0x1a890b(0x1c3)],'pluginName',_0x358dee),_0x158acc(_0x4bb04a['UniverThreadCommentDataSourcePlugin'],_0x1a890b(0x170),_0x51fa93['UniverInstanceType'][_0x1a890b(0x18d)]),_0x4bb04a[_0x1a890b(0x1c3)]=_0x36b0f7([_0x51fa93[_0x1a890b(0x1cf)](_0x1a4e41[_0x1a890b(0x159)],_0x231508[_0x1a890b(0x16c)],_0x58ba6e[_0x1a890b(0x1a8)]),_0x109467(0x1,_0x51fa93[_0x1a890b(0x1ad)](_0x51fa93[_0x1a890b(0x15e)])),_0x109467(0x2,_0x51fa93[_0x1a890b(0x156)])],_0x4bb04a['UniverThreadCommentDataSourcePlugin']),Object[_0x1a890b(0x17c)](_0x4bb04a,Symbol[_0x1a890b(0x16f)],{'value':_0x1a890b(0x1bd)});}));function _0x3ca3(){const _0x29f9fb=['resolveComment','/add','content','/universer-api/comment/unit/','parse','onReady','UniverThreadCommentUi','addUser','dataSource','defineProperty','stringify','delete','reply','deleteComment','comment','getCurrentUser','CommentService','_httpService','filter','_threadCommentDataSource','1482993PlctLC','length','@univerjs/core','dayjs','subscribe','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','_injector','replies','unitId','threadId','getComment','code','slice','/reply','@univerjs-pro/license','replyId','updateComment','ThreadCommentModel','15402GVCrQG','user','getUnit','_init','@univerjs/thread-comment','root','924300fCYChi','personId','UniverProCollaborationClient','Solve','CustomRangeType','userId','UniverProLicense','requireSession','UniverLicensePlugin','thread-comment-data-source.config','commentUpdate$','createTimestamp','syncUpdateMutationToColla','Inject','9OxZmZM','66200ewqoLq','payload','error','Add','rangeId','_initDataSource','values','12yPrGvp','10ZjCeMq','Reply','UserManagerService','UNRECOGNIZED','customRanges','rangeType','Module','disposeWithMe','saveCommentToSnapshot','_configService','merge','userID','UniverThreadCommentDataSourcePlugin','parentId','_threadCommentModel','function','Disposable','getUser','resolved','_sessionService','Delete','add','@univerjs/thread-comment-ui','COMMENT','DependentOn','get','listComments','users','find','CollaborationSessionService','addComment','forEach','_threadCommentDataSourceService','_initUserSync','_commentService','/delete','Edit','/universer-api/user/list','post','rxjs','Solved','body','IConfigService','Unknown','IThreadCommentDataSourceService','UniverThreadCommentUIPlugin','UniverNetwork','HTTPService','_userService','comments','Injector','format','1593344Tbhncn','getOwnPropertyDescriptor','solved','_config','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','onStarting','YYYY/MM/DD\x20HH:mm','size','getMemberID','159900TWHjNS','UniverCollaborationClientPlugin','422471VnwHRZ','OpenOrReOpen','toStringTag','type','object','@univerjs/network'];_0x3ca3=function(){return _0x29f9fb;};return _0x3ca3();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.7",
3
+ "version": "0.6.9-experimental.20250403-d914ddc",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.7",
49
- "@univerjs-pro/license": "0.6.7",
50
- "@univerjs/core": "0.6.7",
51
- "@univerjs/network": "0.6.7",
52
- "@univerjs/thread-comment": "0.6.7",
48
+ "@univerjs-pro/collaboration-client": "0.6.9-experimental.20250403-d914ddc",
49
+ "@univerjs/core": "0.6.9-experimental.20250403-d914ddc",
50
+ "@univerjs-pro/license": "0.6.9-experimental.20250403-d914ddc",
53
51
  "@univerjs/protocol": "0.1.45",
54
- "@univerjs/thread-comment-ui": "0.6.7"
52
+ "@univerjs/thread-comment": "0.6.9-experimental.20250403-d914ddc",
53
+ "@univerjs/network": "0.6.9-experimental.20250403-d914ddc",
54
+ "@univerjs/thread-comment-ui": "0.6.9-experimental.20250403-d914ddc"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.2",
59
59
  "vite": "^6.2.2",
60
60
  "vitest": "^3.0.9",
61
- "@univerjs-infra/shared": "0.6.7"
61
+ "@univerjs-infra/shared": "0.6.9"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",