@univerjs-pro/thread-comment-datasource 0.25.0 → 0.25.1

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
- const _0x2bc402=_0x1155;(function(_0x31900c,_0x33a890){const _0x2066d8=_0x1155,_0x514f39=_0x31900c();while(!![]){try{const _0x3d4d8e=-parseInt(_0x2066d8(0x198))/0x1+parseInt(_0x2066d8(0x1cc))/0x2*(-parseInt(_0x2066d8(0x1e1))/0x3)+-parseInt(_0x2066d8(0x1ae))/0x4*(parseInt(_0x2066d8(0x1f2))/0x5)+parseInt(_0x2066d8(0x1a2))/0x6*(parseInt(_0x2066d8(0x1f4))/0x7)+parseInt(_0x2066d8(0x1bf))/0x8+parseInt(_0x2066d8(0x1c4))/0x9*(parseInt(_0x2066d8(0x1e4))/0xa)+parseInt(_0x2066d8(0x185))/0xb*(-parseInt(_0x2066d8(0x1e8))/0xc);if(_0x3d4d8e===_0x33a890)break;else _0x514f39['push'](_0x514f39['shift']());}catch(_0x58d80f){_0x514f39['push'](_0x514f39['shift']());}}}(_0x489b,0xbe682),Object[_0x2bc402(0x1f3)](exports,Symbol['toStringTag'],{'value':_0x2bc402(0x1ab)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs-pro/license'),n=require('@univerjs/core'),r=require('@univerjs/thread-comment-ui'),i=require('@univerjs/protocol'),a=require('@univerjs/thread-comment'),o=require('rxjs'),s=require('@univerjs/network');var c=_0x2bc402(0x1da),l='0.25.0';const u=_0x1f81f2=>(0x0,n[_0x2bc402(0x1af)])(new Date(+_0x1f81f2))[_0x2bc402(0x1a0)](_0x2bc402(0x1c5)),d=async(_0x4ce29e,_0x4b2491)=>{const _0x17c145=_0x2bc402;let _0x5230a6=_0x4ce29e[_0x17c145(0x1f0)](n[_0x17c145(0x1cb)]),_0x19cb08=_0x4ce29e[_0x17c145(0x1f0)](s[_0x17c145(0x199)]);_0x4b2491[_0x17c145(0x197)](_0x3bfda6=>{const _0x5c0d35=_0x17c145;_0x5230a6[_0x5c0d35(0x19a)](_0x3bfda6)&&_0x4b2491[_0x5c0d35(0x177)](_0x3bfda6);}),_0x4b2491['size']&&(await _0x19cb08[_0x17c145(0x1f0)](_0x17c145(0x1ed),{'params':{'userIDs':[..._0x4b2491]}}))[_0x17c145(0x1b1)][_0x17c145(0x188)]['forEach'](_0x1c38de=>{const _0x32a999=_0x17c145;_0x1c38de&&_0x5230a6[_0x32a999(0x17f)](_0x1c38de);});};function f(_0xf427ee,_0x3379f1){return function(_0x20613d,_0x53236b){_0x3379f1(_0x20613d,_0x53236b,_0xf427ee);};}function p(_0x15928e,_0x4d2888,_0x5f35e8,_0x12413a){const _0x539bef=_0x2bc402;var _0x5ebb4b=arguments[_0x539bef(0x178)],_0x289ea6=_0x5ebb4b<0x3?_0x4d2888:_0x12413a===null?_0x12413a=Object[_0x539bef(0x1c6)](_0x4d2888,_0x5f35e8):_0x12413a,_0x211a00;if(typeof Reflect==_0x539bef(0x1d0)&&typeof Reflect[_0x539bef(0x1d9)]=='function')_0x289ea6=Reflect[_0x539bef(0x1d9)](_0x15928e,_0x4d2888,_0x5f35e8,_0x12413a);else{for(var _0x3ef1ca=_0x15928e[_0x539bef(0x178)]-0x1;_0x3ef1ca>=0x0;_0x3ef1ca--)(_0x211a00=_0x15928e[_0x3ef1ca])&&(_0x289ea6=(_0x5ebb4b<0x3?_0x211a00(_0x289ea6):_0x5ebb4b>0x3?_0x211a00(_0x4d2888,_0x5f35e8,_0x289ea6):_0x211a00(_0x4d2888,_0x5f35e8))||_0x289ea6);}return _0x5ebb4b>0x3&&_0x289ea6&&Object[_0x539bef(0x1f3)](_0x4d2888,_0x5f35e8,_0x289ea6),_0x289ea6;}let m=class extends n['Disposable']{constructor(_0xfaf5d6,_0x4a61e5,_0x545cc7,_0x82e2e3){const _0x24210a=_0x2bc402;super(),this['_commentService']=_0xfaf5d6,this[_0x24210a(0x1e2)]=_0x4a61e5,this[_0x24210a(0x1ce)]=_0x545cc7,this[_0x24210a(0x17c)]=_0x82e2e3,this[_0x24210a(0x184)](),this[_0x24210a(0x1cf)]();}[_0x2bc402(0x1cf)](){const _0x45dde0=_0x2bc402;this['disposeWithMe'](this[_0x45dde0(0x1e2)]['commentUpdate$']['pipe']((0x0,o[_0x45dde0(0x1e0)])(0x10))[_0x45dde0(0x1d8)](_0x18a07b=>{const _0x30783d=_0x45dde0;let _0x29c04b=new Set();_0x18a07b[_0x30783d(0x197)](_0x1dbb80=>{const _0xd69e35=_0x30783d;switch(_0x1dbb80[_0xd69e35(0x1a7)]){case _0xd69e35(0x1be):{let _0x7f900f=_0x1dbb80[_0xd69e35(0x1e5)][_0xd69e35(0x1ca)];_0x29c04b[_0xd69e35(0x1be)](_0x7f900f);break;}default:break;}}),d(this['_injector'],_0x29c04b);}));}[_0x2bc402(0x184)](){const _0x1a70b8=_0x2bc402;this['disposeWithMe'](this[_0x1a70b8(0x1f1)][_0x1a70b8(0x182)]['subscribe'](async _0x4809dd=>{const _0x55ec5d=_0x1a70b8;var _0x5700ca;let _0x30cc5e=(_0x5700ca=this[_0x55ec5d(0x1e2)]['getUnit'](_0x4809dd[_0x55ec5d(0x1e6)])['find'](_0x1339b8=>_0x1339b8['threadId']===_0x4809dd[_0x55ec5d(0x1d3)]))==null?void 0x0:_0x5700ca['root'];if(!_0x30cc5e)return;let {unitId:_0x5daa9e,subUnitId:_0x2adb84}=_0x30cc5e;switch(_0x4809dd[_0x55ec5d(0x176)]&&this['_userService'][_0x55ec5d(0x17f)](_0x4809dd[_0x55ec5d(0x176)]),_0x4809dd[_0x55ec5d(0x1a7)]){case i[_0x55ec5d(0x1bc)][_0x55ec5d(0x1d7)]:break;case i['CommentUpdateEventType'][_0x55ec5d(0x19d)]:var _0x5a359d,_0x297245;this['_threadCommentModel'][_0x55ec5d(0x19b)](_0x5daa9e,_0x2adb84,{'unitId':_0x5daa9e,'subUnitId':_0x2adb84,'ref':'','id':_0x4809dd[_0x55ec5d(0x1dd)],'dT':u(+_0x4809dd[_0x55ec5d(0x1f5)]),'threadId':_0x4809dd[_0x55ec5d(0x1d3)],'personId':(_0x5a359d=(_0x297245=_0x4809dd[_0x55ec5d(0x176)])==null?void 0x0:_0x297245[_0x55ec5d(0x1b9)])==null?_0x4809dd['userId']:_0x5a359d,'text':JSON['parse'](_0x4809dd['content']),'parentId':_0x30cc5e['id']});break;case i['CommentUpdateEventType'][_0x55ec5d(0x1f6)]:{let _0x1c382a=this['_threadCommentModel']['getComment'](_0x5daa9e,_0x2adb84,_0x4809dd['replyId']);_0x1c382a&&_0x1c382a[_0x55ec5d(0x17a)]&&this[_0x55ec5d(0x1e2)][_0x55ec5d(0x1ba)](_0x5daa9e,_0x2adb84,_0x4809dd[_0x55ec5d(0x1dd)]);break;}case i[_0x55ec5d(0x1bc)][_0x55ec5d(0x1a1)]:this[_0x55ec5d(0x1e2)][_0x55ec5d(0x1e9)](_0x5daa9e,_0x2adb84,{'commentId':_0x4809dd['replyId'],'text':JSON[_0x55ec5d(0x1ee)](_0x4809dd['content'])});break;case i['CommentUpdateEventType']['Solve']:{var _0x4db0be;let _0x6cea71=(_0x4db0be=this[_0x55ec5d(0x1e2)]['getUnit'](_0x4809dd['unitId'])['find'](_0x55044a=>_0x55044a[_0x55ec5d(0x1d3)]===_0x4809dd[_0x55ec5d(0x1d3)]))==null?void 0x0:_0x4db0be[_0x55ec5d(0x183)];_0x6cea71&&this[_0x55ec5d(0x1e2)]['resolveComment'](_0x5daa9e,_0x2adb84,_0x6cea71['id'],_0x4809dd['solved']===i[_0x55ec5d(0x196)][_0x55ec5d(0x17b)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n['Inject'])(e[_0x2bc402(0x179)])),f(0x1,(0x0,n[_0x2bc402(0x19f)])(a['ThreadCommentModel'])),f(0x2,(0x0,n[_0x2bc402(0x19f)])(n[_0x2bc402(0x1cb)])),f(0x3,(0x0,n[_0x2bc402(0x19f)])(n[_0x2bc402(0x18b)]))],m);const h={};function _0x1155(_0x3a7cc5,_0x727ba5){_0x3a7cc5=_0x3a7cc5-0x176;const _0x489b4b=_0x489b();let _0x1155a6=_0x489b4b[_0x3a7cc5];return _0x1155a6;}function g(_0xf03bec,_0x4e4327){const _0x447d1b=_0x2bc402;let _0x274c4d=_0xf03bec['replies'][0x0];return{..._0x4e4327,'id':_0x274c4d[_0x447d1b(0x1dd)],'resolved':_0xf03bec[_0x447d1b(0x18f)]===0x1,'dT':u(_0x274c4d[_0x447d1b(0x1f5)]),'personId':_0x274c4d[_0x447d1b(0x1df)],'threadId':_0x274c4d[_0x447d1b(0x1d3)]};}function _(_0x162e6d,_0x381db5,_0x28e70e){const _0x236a5c=_0x2bc402;var _0xa49f20,_0x487ca0;if(((_0xa49f20=_0x162e6d==null||(_0x487ca0=_0x162e6d[_0x236a5c(0x1c0)])==null?void 0x0:_0x487ca0[_0x236a5c(0x178)])==null?0x0:_0xa49f20)>0x0){let _0x15af5f=(_0x1e439e,_0x6f123d)=>({'id':_0x1e439e['replyId'],'threadId':_0x1e439e[_0x236a5c(0x1d3)],'dT':u(_0x1e439e[_0x236a5c(0x1f5)]),'personId':_0x1e439e[_0x236a5c(0x1df)],'resolved':_0x162e6d[_0x236a5c(0x18f)]===i['CommentSolvedStatus'][_0x236a5c(0x17b)],'unitId':_0x381db5,'subUnitId':_0x28e70e,'text':JSON['parse'](_0x1e439e[_0x236a5c(0x195)]),'parentId':_0x6f123d}),_0x21cb6c=_0x15af5f(_0x162e6d[_0x236a5c(0x1c0)][0x0]);return{..._0x21cb6c,'children':_0x162e6d['replies']['slice'](0x1)['map'](_0x5116be=>_0x15af5f(_0x5116be,_0x21cb6c['id']))};}return null;}let v=class{constructor(_0xc9b325,_0xd2814e,_0x3e7b7f){const _0x1b558c=_0x2bc402;this[_0x1b558c(0x180)]=_0xc9b325,this[_0x1b558c(0x1ce)]=_0xd2814e,this[_0x1b558c(0x1a5)]=_0x3e7b7f;}async['addComment'](_0x13b868){const _0x388f41=_0x2bc402;var _0x3430bb,_0x53e642;let {parentId:_0x59bf14,unitId:_0x301cc9,text:_0x265e2b,threadId:_0x37e87c}=_0x13b868,_0xfb3aa6=(_0x3430bb=(_0x53e642=_0x265e2b[_0x388f41(0x1ec)])==null?void 0x0:_0x53e642[_0x388f41(0x1b0)](_0x373ea7=>_0x373ea7[_0x388f41(0x1aa)]===n[_0x388f41(0x1b8)]['COMMENT'])[_0x388f41(0x1b2)](_0x409941=>_0x409941['rangeId']))==null?[]:_0x3430bb,_0x292e69=JSON['stringify'](_0x265e2b),_0x4eaf78=(await this['_sessionService'][_0x388f41(0x1ad)](_0x301cc9))['getMemberID']();if(_0x59bf14){let _0x584bb2={'memberId':_0x4eaf78,'unitId':_0x301cc9,'content':_0x292e69,'mention':_0xfb3aa6,'threadId':_0x37e87c},_0x1a5018=(await this[_0x388f41(0x180)][_0x388f41(0x1c7)](_0x388f41(0x1c8)+_0x301cc9+_0x388f41(0x187),{'body':_0x584bb2}))[_0x388f41(0x1b1)][_0x388f41(0x1b7)];return{..._0x13b868,'id':_0x1a5018[_0x388f41(0x1dd)],'dT':(0x0,n[_0x388f41(0x1af)])(+_0x1a5018[_0x388f41(0x1f5)])[_0x388f41(0x1a0)](_0x388f41(0x1c5)),'personId':_0x1a5018[_0x388f41(0x1df)]};}else{let _0x1ac503={'memberId':_0x4eaf78,'unitId':_0x301cc9,'content':_0x292e69,'mention':_0xfb3aa6};return g((await this[_0x388f41(0x180)]['post']('/universer-api/comment/unit/'+_0x301cc9+_0x388f41(0x18d),{'body':_0x1ac503}))[_0x388f41(0x1b1)]['comment'],_0x13b868);}}async['updateComment'](_0x4911ec){const _0x259542=_0x2bc402;var _0x555fd8,_0xede843;let {text:_0x28b3cc,unitId:_0x130d1f}=_0x4911ec,_0x1eee41=(_0x555fd8=(_0xede843=_0x28b3cc[_0x259542(0x1ec)])==null?void 0x0:_0xede843[_0x259542(0x1b0)](_0x543427=>_0x543427[_0x259542(0x1aa)]===n[_0x259542(0x1b8)][_0x259542(0x1eb)])['map'](_0x165696=>_0x165696['rangeId']))==null?[]:_0x555fd8,_0x5a65ef=JSON[_0x259542(0x1bb)](_0x28b3cc),_0x3d0089=_0x4911ec[_0x259542(0x1d3)],_0x895418=_0x4911ec['id'],_0x1fb538={'memberId':(await this[_0x259542(0x1a5)]['requireSession'](_0x130d1f))['getMemberID'](),'unitId':_0x130d1f,'threadId':_0x3d0089,'mention':_0x1eee41,'content':_0x5a65ef,'replyId':_0x895418},_0x22f566=await this[_0x259542(0x180)]['post'](_0x259542(0x1c8)+_0x130d1f+_0x259542(0x1db),{'body':_0x1fb538});return!_0x22f566['body'][_0x259542(0x1a3)]||_0x22f566[_0x259542(0x1b1)]['error']['code']===0x1;}async['resolveComment'](_0x2c378d){const _0x560663=_0x2bc402;let {unitId:_0x6efdc6}=_0x2c378d,_0x457579=_0x2c378d[_0x560663(0x1d3)],_0x3ab721={'memberId':this[_0x560663(0x1ce)][_0x560663(0x19e)]()[_0x560663(0x1b9)],'unitId':_0x6efdc6,'threadId':_0x457579,'solved':_0x2c378d[_0x560663(0x190)]?i[_0x560663(0x196)][_0x560663(0x17b)]:i[_0x560663(0x196)]['OpenOrReOpen']},_0x193339=await this['_httpService'][_0x560663(0x1c7)]('/universer-api/comment/unit/'+_0x6efdc6+_0x560663(0x194),{'body':_0x3ab721});return!_0x193339[_0x560663(0x1b1)][_0x560663(0x1a3)]||_0x193339[_0x560663(0x1b1)]['error'][_0x560663(0x17d)]===0x1;}async[_0x2bc402(0x1ba)](_0x3712fc,_0x426c93,_0x563839,_0x40faec){const _0x55ec91=_0x2bc402;let _0x3ab6a0={'memberId':(await this[_0x55ec91(0x1a5)][_0x55ec91(0x1ad)](_0x3712fc))[_0x55ec91(0x1d2)](),'threadId':_0x563839,'replyId':_0x40faec,'unitId':_0x3712fc},_0x416b03=await this[_0x55ec91(0x180)][_0x55ec91(0x1c7)](_0x55ec91(0x1c8)+_0x3712fc+_0x55ec91(0x1a9),{'body':_0x3ab6a0});return!_0x416b03['body'][_0x55ec91(0x1a3)]||_0x416b03[_0x55ec91(0x1b1)][_0x55ec91(0x1a3)][_0x55ec91(0x17d)]===0x1;}async[_0x2bc402(0x1ef)](_0x3bd688,_0x352810,_0x9ef82d){const _0x288a03=_0x2bc402;let _0x15606c={'unitId':_0x3bd688,'threadId':_0x9ef82d},_0x1db47e=await this[_0x288a03(0x180)][_0x288a03(0x1c7)](_0x288a03(0x1c8)+_0x3bd688+_0x288a03(0x1de),{'body':_0x15606c}),_0x2f924d=_0x9ef82d[_0x288a03(0x1b2)](_0xbbaa96=>_(_0x1db47e[_0x288a03(0x1b1)][_0x288a03(0x19c)][_0xbbaa96],_0x3bd688,_0x352810))['filter'](Boolean);return Object[_0x288a03(0x1a4)](_0x1db47e['body'][_0x288a03(0x188)])[_0x288a03(0x197)](_0xa864ea=>{const _0xb1a21a=_0x288a03;this[_0xb1a21a(0x1ce)][_0xb1a21a(0x17f)](_0xa864ea);}),_0x2f924d;}['saveCommentToSnapshot'](_0x355982){const _0x191feb=_0x2bc402;return{'id':_0x355982['id'],'threadId':_0x355982[_0x191feb(0x1d3)],'ref':_0x355982['ref']};}};v=p([f(0x0,(0x0,n[_0x2bc402(0x19f)])(s[_0x2bc402(0x199)])),f(0x1,(0x0,n[_0x2bc402(0x19f)])(n[_0x2bc402(0x1cb)])),f(0x2,(0x0,n[_0x2bc402(0x19f)])(e[_0x2bc402(0x193)]))],v);let y=class extends n[_0x2bc402(0x1a6)]{constructor(_0x19f9d1,_0x4d2b7c){const _0x1c8ce2=_0x2bc402;super(),this[_0x1c8ce2(0x18e)]=_0x19f9d1,this[_0x1c8ce2(0x1cd)]=_0x4d2b7c,this[_0x1c8ce2(0x1d5)]();}[_0x2bc402(0x1d5)](){const _0x2b52ef=_0x2bc402;this[_0x2b52ef(0x18e)]['dataSource']=this[_0x2b52ef(0x1cd)],this[_0x2b52ef(0x18e)][_0x2b52ef(0x1ac)]=!0x1;}};y=p([f(0x0,a[_0x2bc402(0x18c)]),f(0x1,(0x0,n[_0x2bc402(0x19f)])(v))],y);function b(_0x21e9bd){'@babel/helpers - typeof';const _0x33d4ef=_0x2bc402;return b=typeof Symbol=='function'&&typeof Symbol[_0x33d4ef(0x181)]==_0x33d4ef(0x1c2)?function(_0x43439){return typeof _0x43439;}:function(_0xb2b8a5){const _0x420254=_0x33d4ef;return _0xb2b8a5&&typeof Symbol==_0x420254(0x186)&&_0xb2b8a5[_0x420254(0x1a8)]===Symbol&&_0xb2b8a5!==Symbol[_0x420254(0x1d6)]?'symbol':typeof _0xb2b8a5;},b(_0x21e9bd);}function x(_0x10c715,_0x193d02){const _0x2c2ba5=_0x2bc402;if(b(_0x10c715)!=_0x2c2ba5(0x1d0)||!_0x10c715)return _0x10c715;var _0x5d6ad4=_0x10c715[Symbol[_0x2c2ba5(0x17e)]];if(_0x5d6ad4!==void 0x0){var _0x256568=_0x5d6ad4[_0x2c2ba5(0x1b3)](_0x10c715,_0x193d02||_0x2c2ba5(0x1c3));if(b(_0x256568)!=_0x2c2ba5(0x1d0))return _0x256568;throw TypeError(_0x2c2ba5(0x1d4));}return(_0x193d02===_0x2c2ba5(0x1e3)?String:Number)(_0x10c715);}function S(_0x37e4e9){const _0x5e454e=_0x2bc402;var _0x15db19=x(_0x37e4e9,_0x5e454e(0x1e3));return b(_0x15db19)==_0x5e454e(0x1c2)?_0x15db19:_0x15db19+'';}function _0x489b(){const _0x509c40=['DependentOn','COMMENT','customRanges','/universer-api/user/list','parse','listComments','get','_commentService','1990845HCDQLD','defineProperty','6018607FsXOjX','createTimestamp','Delete','user','delete','length','CommentService','parentId','Solved','_injector','code','toPrimitive','addUser','_httpService','iterator','commentUpdate$','root','_init','11DKEDru','function','/reply','users','Plugin','IConfigService','Injector','IThreadCommentDataSourceService','/add','_threadCommentDataSourceService','solved','resolved','setConfig','UniverThreadCommentUIPlugin','CollaborationSessionService','/solved','content','CommentSolvedStatus','forEach','360151FcgBeJ','HTTPService','getUser','addComment','comments','Reply','getCurrentUser','Inject','format','Edit','6JmrWVw','error','values','_sessionService','Disposable','type','constructor','/delete','rangeType','Module','syncUpdateMutationToColla','requireSession','4MJjeWd','dateKit','filter','body','map','call','_config','pluginName','thread-comment-data-source.config','reply','CustomRangeType','userID','deleteComment','stringify','CommentUpdateEventType','UniverThreadCommentDataSourcePlugin','add','7610552imVNLz','replies','onReady','symbol','default','9873vUHhew','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','post','/universer-api/comment/unit/','_configService','personId','UserManagerService','262386tRIPiu','_threadCommentDataSource','_userService','_initUserSync','object','packageName','getMemberID','threadId','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_initDataSource','prototype','Add','subscribe','decorate','@univerjs-pro/thread-comment-datasource','/edit','UniverLicensePlugin','replyId','/list','userId','bufferTime','9zeNvem','_threadCommentModel','string','9910FECWnm','payload','unitId','UniverCollaborationClientPlugin','11597304WeMKUl','updateComment'];_0x489b=function(){return _0x509c40;};return _0x489b();}function C(_0x329798,_0x309263,_0x507941){const _0x43087a=_0x2bc402;return(_0x309263=S(_0x309263))in _0x329798?Object[_0x43087a(0x1f3)](_0x329798,_0x309263,{'value':_0x507941,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x329798[_0x309263]=_0x507941,_0x329798;}let w=class extends n[_0x2bc402(0x189)]{constructor(_0x3ea70e=h,_0x755852,_0x7c0514){const _0x36cfa8=_0x2bc402;super(),this[_0x36cfa8(0x1b4)]=_0x3ea70e,this[_0x36cfa8(0x17c)]=_0x755852,this[_0x36cfa8(0x1c9)]=_0x7c0514;let {..._0x3bd109}=(0x0,n['merge'])({},h,this[_0x36cfa8(0x1b4)]);this[_0x36cfa8(0x1c9)][_0x36cfa8(0x191)](_0x36cfa8(0x1b6),_0x3bd109);}['onStarting'](){[[v],[y],[m]]['forEach'](_0x4261ea=>{const _0x5ceb42=_0x1155;this[_0x5ceb42(0x17c)][_0x5ceb42(0x1be)](_0x4261ea);});}[_0x2bc402(0x1c1)](){const _0x4179e1=_0x2bc402;this['_injector'][_0x4179e1(0x1f0)](y),this[_0x4179e1(0x17c)][_0x4179e1(0x1f0)](m);}};C(w,_0x2bc402(0x1b5),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),C(w,_0x2bc402(0x1d1),c),C(w,'version',l),w=p([(0x0,n[_0x2bc402(0x1ea)])(r[_0x2bc402(0x192)],e[_0x2bc402(0x1e7)],t[_0x2bc402(0x1dc)]),f(0x1,(0x0,n['Inject'])(n[_0x2bc402(0x18b)])),f(0x2,n[_0x2bc402(0x18a)])],w),Object[_0x2bc402(0x1f3)](exports,_0x2bc402(0x1bd),{'enumerable':!0x0,'get':function(){return w;}});
1
+ const _0x4c6b37=_0x31d6;(function(_0x50dc1c,_0xc6eb47){const _0x2a8cfc=_0x31d6,_0x1fed79=_0x50dc1c();while(!![]){try{const _0x18a1b9=-parseInt(_0x2a8cfc(0x13a))/0x1*(-parseInt(_0x2a8cfc(0x18b))/0x2)+parseInt(_0x2a8cfc(0x11f))/0x3+parseInt(_0x2a8cfc(0x11d))/0x4+-parseInt(_0x2a8cfc(0x152))/0x5*(parseInt(_0x2a8cfc(0x113))/0x6)+-parseInt(_0x2a8cfc(0x16f))/0x7+-parseInt(_0x2a8cfc(0x129))/0x8*(-parseInt(_0x2a8cfc(0x11c))/0x9)+parseInt(_0x2a8cfc(0x150))/0xa*(parseInt(_0x2a8cfc(0x15f))/0xb);if(_0x18a1b9===_0xc6eb47)break;else _0x1fed79['push'](_0x1fed79['shift']());}catch(_0x45e02c){_0x1fed79['push'](_0x1fed79['shift']());}}}(_0x30a1,0x66179),Object['defineProperty'](exports,Symbol[_0x4c6b37(0x164)],{'value':_0x4c6b37(0x126)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs-pro/license'),n=require('@univerjs/core'),r=require('@univerjs/thread-comment-ui'),i=require('@univerjs/protocol'),a=require('@univerjs/thread-comment'),o=require('rxjs'),s=require('@univerjs/network');var c=_0x4c6b37(0x116),l='0.25.1';const u=_0x54c3a8=>(0x0,n[_0x4c6b37(0x14d)])(new Date(+_0x54c3a8))[_0x4c6b37(0x131)](_0x4c6b37(0x171)),d=async(_0x3c770f,_0xab6e5b)=>{const _0x2b25bb=_0x4c6b37;let _0xd15b92=_0x3c770f['get'](n[_0x2b25bb(0x128)]),_0x373b04=_0x3c770f['get'](s[_0x2b25bb(0x144)]);_0xab6e5b[_0x2b25bb(0x16d)](_0x4b9cab=>{const _0xae46d2=_0x2b25bb;_0xd15b92[_0xae46d2(0x121)](_0x4b9cab)&&_0xab6e5b[_0xae46d2(0x17d)](_0x4b9cab);}),_0xab6e5b[_0x2b25bb(0x139)]&&(await _0x373b04[_0x2b25bb(0x15c)](_0x2b25bb(0x173),{'params':{'userIDs':[..._0xab6e5b]}}))[_0x2b25bb(0x125)][_0x2b25bb(0x130)][_0x2b25bb(0x16d)](_0x40c518=>{_0x40c518&&_0xd15b92['addUser'](_0x40c518);});};function f(_0x32daae,_0x34a6ff){return function(_0x20ff42,_0x53c656){_0x34a6ff(_0x20ff42,_0x53c656,_0x32daae);};}function p(_0x4df889,_0x54e9d2,_0x52be09,_0x4a0dc8){const _0x16f40e=_0x4c6b37;var _0x3a45c1=arguments[_0x16f40e(0x141)],_0x562038=_0x3a45c1<0x3?_0x54e9d2:_0x4a0dc8===null?_0x4a0dc8=Object[_0x16f40e(0x158)](_0x54e9d2,_0x52be09):_0x4a0dc8,_0x5c85e3;if(typeof Reflect=='object'&&typeof Reflect[_0x16f40e(0x138)]==_0x16f40e(0x15d))_0x562038=Reflect[_0x16f40e(0x138)](_0x4df889,_0x54e9d2,_0x52be09,_0x4a0dc8);else{for(var _0x2787e8=_0x4df889[_0x16f40e(0x141)]-0x1;_0x2787e8>=0x0;_0x2787e8--)(_0x5c85e3=_0x4df889[_0x2787e8])&&(_0x562038=(_0x3a45c1<0x3?_0x5c85e3(_0x562038):_0x3a45c1>0x3?_0x5c85e3(_0x54e9d2,_0x52be09,_0x562038):_0x5c85e3(_0x54e9d2,_0x52be09))||_0x562038);}return _0x3a45c1>0x3&&_0x562038&&Object[_0x16f40e(0x177)](_0x54e9d2,_0x52be09,_0x562038),_0x562038;}let m=class extends n['Disposable']{constructor(_0x10611d,_0x22675d,_0x316936,_0xb4718){const _0x4f8b90=_0x4c6b37;super(),this[_0x4f8b90(0x16b)]=_0x10611d,this[_0x4f8b90(0x13f)]=_0x22675d,this[_0x4f8b90(0x157)]=_0x316936,this[_0x4f8b90(0x14e)]=_0xb4718,this[_0x4f8b90(0x16e)](),this['_initUserSync']();}[_0x4c6b37(0x188)](){const _0x492932=_0x4c6b37;this[_0x492932(0x12b)](this[_0x492932(0x13f)][_0x492932(0x174)]['pipe']((0x0,o['bufferTime'])(0x10))[_0x492932(0x12e)](_0x516f87=>{const _0x46f4ab=_0x492932;let _0x48272b=new Set();_0x516f87[_0x46f4ab(0x16d)](_0x38942c=>{const _0x2d7990=_0x46f4ab;switch(_0x38942c[_0x2d7990(0x146)]){case _0x2d7990(0x185):{let _0xdb24ad=_0x38942c[_0x2d7990(0x182)]['personId'];_0x48272b[_0x2d7990(0x185)](_0xdb24ad);break;}default:break;}}),d(this[_0x46f4ab(0x14e)],_0x48272b);}));}[_0x4c6b37(0x16e)](){const _0x5e6bad=_0x4c6b37;this[_0x5e6bad(0x12b)](this[_0x5e6bad(0x16b)][_0x5e6bad(0x174)][_0x5e6bad(0x12e)](async _0x30d660=>{const _0x3cfdc9=_0x5e6bad;var _0x49df9e;let _0x4d15c7=(_0x49df9e=this[_0x3cfdc9(0x13f)][_0x3cfdc9(0x10e)](_0x30d660[_0x3cfdc9(0x114)])[_0x3cfdc9(0x13d)](_0x5e8582=>_0x5e8582['threadId']===_0x30d660[_0x3cfdc9(0x12c)]))==null?void 0x0:_0x49df9e['root'];if(!_0x4d15c7)return;let {unitId:_0x367c83,subUnitId:_0x437fde}=_0x4d15c7;switch(_0x30d660[_0x3cfdc9(0x17a)]&&this[_0x3cfdc9(0x157)]['addUser'](_0x30d660['user']),_0x30d660['type']){case i['CommentUpdateEventType'][_0x3cfdc9(0x160)]:break;case i[_0x3cfdc9(0x178)][_0x3cfdc9(0x176)]:var _0x14dadd,_0x23ec22;this['_threadCommentModel'][_0x3cfdc9(0x135)](_0x367c83,_0x437fde,{'unitId':_0x367c83,'subUnitId':_0x437fde,'ref':'','id':_0x30d660[_0x3cfdc9(0x11a)],'dT':u(+_0x30d660['createTimestamp']),'threadId':_0x30d660[_0x3cfdc9(0x12c)],'personId':(_0x14dadd=(_0x23ec22=_0x30d660[_0x3cfdc9(0x17a)])==null?void 0x0:_0x23ec22[_0x3cfdc9(0x18c)])==null?_0x30d660[_0x3cfdc9(0x15a)]:_0x14dadd,'text':JSON['parse'](_0x30d660['content']),'parentId':_0x4d15c7['id']});break;case i['CommentUpdateEventType'][_0x3cfdc9(0x17f)]:{let _0x201e23=this[_0x3cfdc9(0x13f)][_0x3cfdc9(0x187)](_0x367c83,_0x437fde,_0x30d660[_0x3cfdc9(0x11a)]);_0x201e23&&_0x201e23[_0x3cfdc9(0x14b)]&&this['_threadCommentModel'][_0x3cfdc9(0x13c)](_0x367c83,_0x437fde,_0x30d660['replyId']);break;}case i[_0x3cfdc9(0x178)][_0x3cfdc9(0x15e)]:this['_threadCommentModel'][_0x3cfdc9(0x154)](_0x367c83,_0x437fde,{'commentId':_0x30d660[_0x3cfdc9(0x11a)],'text':JSON['parse'](_0x30d660[_0x3cfdc9(0x191)])});break;case i[_0x3cfdc9(0x178)][_0x3cfdc9(0x151)]:{var _0x14fba5;let _0x52a42b=(_0x14fba5=this[_0x3cfdc9(0x13f)][_0x3cfdc9(0x10e)](_0x30d660[_0x3cfdc9(0x114)])['find'](_0x23db13=>_0x23db13[_0x3cfdc9(0x12c)]===_0x30d660[_0x3cfdc9(0x12c)]))==null?void 0x0:_0x14fba5[_0x3cfdc9(0x120)];_0x52a42b&&this[_0x3cfdc9(0x13f)]['resolveComment'](_0x367c83,_0x437fde,_0x52a42b['id'],_0x30d660['solved']===i[_0x3cfdc9(0x14f)][_0x3cfdc9(0x12d)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x4c6b37(0x10d)])(e['CommentService'])),f(0x1,(0x0,n[_0x4c6b37(0x10d)])(a[_0x4c6b37(0x13b)])),f(0x2,(0x0,n[_0x4c6b37(0x10d)])(n['UserManagerService'])),f(0x3,(0x0,n[_0x4c6b37(0x10d)])(n[_0x4c6b37(0x168)]))],m);const h={};function g(_0x1b037b,_0x3d2e85){const _0xd2eb9f=_0x4c6b37;let _0x5b7d70=_0x1b037b['replies'][0x0];return{..._0x3d2e85,'id':_0x5b7d70[_0xd2eb9f(0x11a)],'resolved':_0x1b037b[_0xd2eb9f(0x15b)]===0x1,'dT':u(_0x5b7d70[_0xd2eb9f(0x12f)]),'personId':_0x5b7d70[_0xd2eb9f(0x15a)],'threadId':_0x5b7d70[_0xd2eb9f(0x12c)]};}function _(_0x490504,_0x5ce6ab,_0x40a729){const _0x3d7298=_0x4c6b37;var _0x15f1b3,_0x2b66b9;if(((_0x15f1b3=_0x490504==null||(_0x2b66b9=_0x490504['replies'])==null?void 0x0:_0x2b66b9[_0x3d7298(0x141)])==null?0x0:_0x15f1b3)>0x0){let _0x52a09f=(_0x16e326,_0x3b2c72)=>({'id':_0x16e326[_0x3d7298(0x11a)],'threadId':_0x16e326[_0x3d7298(0x12c)],'dT':u(_0x16e326['createTimestamp']),'personId':_0x16e326['userId'],'resolved':_0x490504[_0x3d7298(0x15b)]===i[_0x3d7298(0x14f)][_0x3d7298(0x12d)],'unitId':_0x5ce6ab,'subUnitId':_0x40a729,'text':JSON[_0x3d7298(0x137)](_0x16e326[_0x3d7298(0x191)]),'parentId':_0x3b2c72}),_0x48fc33=_0x52a09f(_0x490504['replies'][0x0]);return{..._0x48fc33,'children':_0x490504[_0x3d7298(0x18f)][_0x3d7298(0x16a)](0x1)[_0x3d7298(0x10f)](_0x5464b4=>_0x52a09f(_0x5464b4,_0x48fc33['id']))};}return null;}let v=class{constructor(_0x58c12f,_0x310d2a,_0x475335){const _0x1c076c=_0x4c6b37;this[_0x1c076c(0x175)]=_0x58c12f,this[_0x1c076c(0x157)]=_0x310d2a,this[_0x1c076c(0x110)]=_0x475335;}async['addComment'](_0x4d2b5a){const _0x1a6826=_0x4c6b37;var _0x201bc7,_0x5085ea;let {parentId:_0x3adde0,unitId:_0x5b202c,text:_0x23cc8e,threadId:_0x575bf9}=_0x4d2b5a,_0x2061ff=(_0x201bc7=(_0x5085ea=_0x23cc8e['customRanges'])==null?void 0x0:_0x5085ea[_0x1a6826(0x180)](_0x4376f0=>_0x4376f0[_0x1a6826(0x140)]===n[_0x1a6826(0x149)][_0x1a6826(0x190)])[_0x1a6826(0x10f)](_0x4a298a=>_0x4a298a[_0x1a6826(0x12a)]))==null?[]:_0x201bc7,_0xb64b17=JSON[_0x1a6826(0x10b)](_0x23cc8e),_0x5a7a5f=(await this[_0x1a6826(0x110)][_0x1a6826(0x18d)](_0x5b202c))[_0x1a6826(0x186)]();if(_0x3adde0){let _0x263888={'memberId':_0x5a7a5f,'unitId':_0x5b202c,'content':_0xb64b17,'mention':_0x2061ff,'threadId':_0x575bf9},_0x1d0580=(await this[_0x1a6826(0x175)][_0x1a6826(0x145)](_0x1a6826(0x118)+_0x5b202c+_0x1a6826(0x134),{'body':_0x263888}))[_0x1a6826(0x125)][_0x1a6826(0x189)];return{..._0x4d2b5a,'id':_0x1d0580[_0x1a6826(0x11a)],'dT':(0x0,n['dateKit'])(+_0x1d0580[_0x1a6826(0x12f)])['format'](_0x1a6826(0x171)),'personId':_0x1d0580[_0x1a6826(0x15a)]};}else{let _0x440797={'memberId':_0x5a7a5f,'unitId':_0x5b202c,'content':_0xb64b17,'mention':_0x2061ff};return g((await this[_0x1a6826(0x175)]['post'](_0x1a6826(0x118)+_0x5b202c+_0x1a6826(0x170),{'body':_0x440797}))[_0x1a6826(0x125)][_0x1a6826(0x153)],_0x4d2b5a);}}async[_0x4c6b37(0x154)](_0x168dd8){const _0x528ad1=_0x4c6b37;var _0x4253ee,_0x485074;let {text:_0xe40a3f,unitId:_0xfcb3b5}=_0x168dd8,_0x295aed=(_0x4253ee=(_0x485074=_0xe40a3f['customRanges'])==null?void 0x0:_0x485074[_0x528ad1(0x180)](_0x1e0a18=>_0x1e0a18['rangeType']===n[_0x528ad1(0x149)][_0x528ad1(0x190)])[_0x528ad1(0x10f)](_0xdc6167=>_0xdc6167[_0x528ad1(0x12a)]))==null?[]:_0x4253ee,_0x465977=JSON[_0x528ad1(0x10b)](_0xe40a3f),_0x28284a=_0x168dd8['threadId'],_0x4f2d20=_0x168dd8['id'],_0x559a30={'memberId':(await this[_0x528ad1(0x110)][_0x528ad1(0x18d)](_0xfcb3b5))[_0x528ad1(0x186)](),'unitId':_0xfcb3b5,'threadId':_0x28284a,'mention':_0x295aed,'content':_0x465977,'replyId':_0x4f2d20},_0x467e0f=await this[_0x528ad1(0x175)][_0x528ad1(0x145)](_0x528ad1(0x118)+_0xfcb3b5+_0x528ad1(0x123),{'body':_0x559a30});return!_0x467e0f[_0x528ad1(0x125)][_0x528ad1(0x10c)]||_0x467e0f['body'][_0x528ad1(0x10c)][_0x528ad1(0x111)]===0x1;}async[_0x4c6b37(0x147)](_0xbc89fb){const _0x310762=_0x4c6b37;let {unitId:_0x3683b9}=_0xbc89fb,_0x329521=_0xbc89fb[_0x310762(0x12c)],_0x537ca2={'memberId':this[_0x310762(0x157)][_0x310762(0x133)]()[_0x310762(0x18c)],'unitId':_0x3683b9,'threadId':_0x329521,'solved':_0xbc89fb['resolved']?i[_0x310762(0x14f)][_0x310762(0x12d)]:i['CommentSolvedStatus'][_0x310762(0x117)]},_0x3ab45a=await this[_0x310762(0x175)][_0x310762(0x145)](_0x310762(0x118)+_0x3683b9+_0x310762(0x14a),{'body':_0x537ca2});return!_0x3ab45a[_0x310762(0x125)][_0x310762(0x10c)]||_0x3ab45a[_0x310762(0x125)][_0x310762(0x10c)]['code']===0x1;}async[_0x4c6b37(0x13c)](_0x3e95cb,_0x4f727e,_0x39d10f,_0x51513e){const _0x2690b6=_0x4c6b37;let _0x3eb6a7={'memberId':(await this[_0x2690b6(0x110)][_0x2690b6(0x18d)](_0x3e95cb))[_0x2690b6(0x186)](),'threadId':_0x39d10f,'replyId':_0x51513e,'unitId':_0x3e95cb},_0x34d12f=await this[_0x2690b6(0x175)][_0x2690b6(0x145)](_0x2690b6(0x118)+_0x3e95cb+_0x2690b6(0x148),{'body':_0x3eb6a7});return!_0x34d12f[_0x2690b6(0x125)]['error']||_0x34d12f[_0x2690b6(0x125)]['error'][_0x2690b6(0x111)]===0x1;}async[_0x4c6b37(0x132)](_0x1e37c1,_0x14c082,_0x711abd){const _0x1be11e=_0x4c6b37;let _0x37a442={'unitId':_0x1e37c1,'threadId':_0x711abd},_0x3d3a9b=await this[_0x1be11e(0x175)][_0x1be11e(0x145)](_0x1be11e(0x118)+_0x1e37c1+_0x1be11e(0x136),{'body':_0x37a442}),_0x198d5d=_0x711abd['map'](_0x3342aa=>_(_0x3d3a9b[_0x1be11e(0x125)]['comments'][_0x3342aa],_0x1e37c1,_0x14c082))[_0x1be11e(0x180)](Boolean);return Object[_0x1be11e(0x184)](_0x3d3a9b[_0x1be11e(0x125)][_0x1be11e(0x130)])['forEach'](_0x2f87c4=>{const _0x2c83b2=_0x1be11e;this[_0x2c83b2(0x157)]['addUser'](_0x2f87c4);}),_0x198d5d;}[_0x4c6b37(0x124)](_0x1b3bbe){const _0x16cd08=_0x4c6b37;return{'id':_0x1b3bbe['id'],'threadId':_0x1b3bbe[_0x16cd08(0x12c)],'ref':_0x1b3bbe[_0x16cd08(0x11b)]};}};v=p([f(0x0,(0x0,n['Inject'])(s[_0x4c6b37(0x144)])),f(0x1,(0x0,n['Inject'])(n[_0x4c6b37(0x128)])),f(0x2,(0x0,n[_0x4c6b37(0x10d)])(e[_0x4c6b37(0x163)]))],v);let y=class extends n[_0x4c6b37(0x16c)]{constructor(_0x205747,_0x47a867){const _0x1bdeae=_0x4c6b37;super(),this[_0x1bdeae(0x169)]=_0x205747,this['_threadCommentDataSource']=_0x47a867,this['_initDataSource']();}['_initDataSource'](){const _0x25c13b=_0x4c6b37;this[_0x25c13b(0x169)][_0x25c13b(0x166)]=this[_0x25c13b(0x119)],this[_0x25c13b(0x169)][_0x25c13b(0x13e)]=!0x1;}};y=p([f(0x0,a[_0x4c6b37(0x127)]),f(0x1,(0x0,n['Inject'])(v))],y);function b(_0x69d4a7){'@babel/helpers - typeof';const _0x36c815=_0x4c6b37;return b=typeof Symbol==_0x36c815(0x15d)&&typeof Symbol[_0x36c815(0x143)]=='symbol'?function(_0x582a87){return typeof _0x582a87;}:function(_0x245bc6){const _0xf620fd=_0x36c815;return _0x245bc6&&typeof Symbol==_0xf620fd(0x15d)&&_0x245bc6[_0xf620fd(0x115)]===Symbol&&_0x245bc6!==Symbol[_0xf620fd(0x179)]?_0xf620fd(0x11e):typeof _0x245bc6;},b(_0x69d4a7);}function x(_0x49ce75,_0x4ddbb5){const _0x102e5a=_0x4c6b37;if(b(_0x49ce75)!=_0x102e5a(0x181)||!_0x49ce75)return _0x49ce75;var _0xefc069=_0x49ce75[Symbol[_0x102e5a(0x155)]];if(_0xefc069!==void 0x0){var _0x5580c4=_0xefc069[_0x102e5a(0x18a)](_0x49ce75,_0x4ddbb5||_0x102e5a(0x14c));if(b(_0x5580c4)!='object')return _0x5580c4;throw TypeError(_0x102e5a(0x165));}return(_0x4ddbb5===_0x102e5a(0x159)?String:Number)(_0x49ce75);}function S(_0x104980){var _0x5f22ce=x(_0x104980,'string');return b(_0x5f22ce)=='symbol'?_0x5f22ce:_0x5f22ce+'';}function C(_0x5e98ad,_0x1a8632,_0x26b432){const _0x49c1e2=_0x4c6b37;return(_0x1a8632=S(_0x1a8632))in _0x5e98ad?Object[_0x49c1e2(0x177)](_0x5e98ad,_0x1a8632,{'value':_0x26b432,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5e98ad[_0x1a8632]=_0x26b432,_0x5e98ad;}function _0x31d6(_0x2540e5,_0x455136){_0x2540e5=_0x2540e5-0x10b;const _0x30a12e=_0x30a1();let _0x31d6af=_0x30a12e[_0x2540e5];return _0x31d6af;}function _0x30a1(){const _0xe3124f=['getOwnPropertyDescriptor','string','userId','solved','get','function','Edit','3968591HFesKW','Add','UniverThreadCommentUIPlugin','version','CollaborationSessionService','toStringTag','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','dataSource','merge','Injector','_threadCommentDataSourceService','slice','_commentService','Disposable','forEach','_init','4434808VoZuri','/add','YYYY/MM/DD\x20HH:mm','Plugin','/universer-api/user/list','commentUpdate$','_httpService','Reply','defineProperty','CommentUpdateEventType','prototype','user','IConfigService','DependentOn','delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','filter','object','payload','_config','values','add','getMemberID','getComment','_initUserSync','reply','call','911042EBIpek','userID','requireSession','UniverThreadCommentDataSourcePlugin','replies','COMMENT','content','stringify','error','Inject','getUnit','map','_sessionService','code','UniverCollaborationClientPlugin','4258830ZRoyGx','unitId','constructor','@univerjs-pro/thread-comment-datasource','OpenOrReOpen','/universer-api/comment/unit/','_threadCommentDataSource','replyId','ref','1350CuutTZ','134208lBIsep','symbol','445656ZRLKYR','root','getUser','setConfig','/edit','saveCommentToSnapshot','body','Module','IThreadCommentDataSourceService','UserManagerService','2216lhQhxL','rangeId','disposeWithMe','threadId','Solved','subscribe','createTimestamp','users','format','listComments','getCurrentUser','/reply','addComment','/list','parse','decorate','size','1nEtJOc','ThreadCommentModel','deleteComment','find','syncUpdateMutationToColla','_threadCommentModel','rangeType','length','packageName','iterator','HTTPService','post','type','resolveComment','/delete','CustomRangeType','/solved','parentId','default','dateKit','_injector','CommentSolvedStatus','30NXnRHs','Solve','5CIvvQE','comment','updateComment','toPrimitive','_configService','_userService'];_0x30a1=function(){return _0xe3124f;};return _0x30a1();}let w=class extends n[_0x4c6b37(0x172)]{constructor(_0x4c63b3=h,_0x46b423,_0x35cf0b){const _0x350b2a=_0x4c6b37;super(),this[_0x350b2a(0x183)]=_0x4c63b3,this[_0x350b2a(0x14e)]=_0x46b423,this[_0x350b2a(0x156)]=_0x35cf0b;let {..._0xf2a53d}=(0x0,n[_0x350b2a(0x167)])({},h,this[_0x350b2a(0x183)]);this[_0x350b2a(0x156)][_0x350b2a(0x122)]('thread-comment-data-source.config',_0xf2a53d);}['onStarting'](){[[v],[y],[m]]['forEach'](_0x517658=>{const _0x154f47=_0x31d6;this[_0x154f47(0x14e)][_0x154f47(0x185)](_0x517658);});}['onReady'](){const _0x4fa94e=_0x4c6b37;this[_0x4fa94e(0x14e)][_0x4fa94e(0x15c)](y),this[_0x4fa94e(0x14e)][_0x4fa94e(0x15c)](m);}};C(w,'pluginName',_0x4c6b37(0x17e)),C(w,_0x4c6b37(0x142),c),C(w,_0x4c6b37(0x162),l),w=p([(0x0,n[_0x4c6b37(0x17c)])(r[_0x4c6b37(0x161)],e[_0x4c6b37(0x112)],t['UniverLicensePlugin']),f(0x1,(0x0,n[_0x4c6b37(0x10d)])(n[_0x4c6b37(0x168)])),f(0x2,n[_0x4c6b37(0x17b)])],w),Object[_0x4c6b37(0x177)](exports,_0x4c6b37(0x18e),{'enumerable':!0x0,'get':function(){return w;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x30d60c=_0xf7f0;function _0x276b(){const _0x1283fc=['decorate','159246jLOnUU','slice','setConfig','resolveComment','updateComment','subscribe','_initUserSync','map','type','deleteComment','125535dPcwwl','getUser','version','getCurrentUser','find','39033zSMyXx','users','userID','ref','call','Edit','length','commentUpdate$','addComment','0.25.0','dataSource','/add','@univerjs-pro/thread-comment-datasource','2eGweuE','/list','Solved','_injector','values','4zuriKL','_userService','rangeType','336QqltrL','toPrimitive','replyId','21LcAZCn','iterator','YYYY/MM/DD\x20HH:mm','parse','content','onStarting','constructor','comment','forEach','replies','getMemberID','_initDataSource','format','_httpService','/reply','259149ngrAjZ','customRanges','solved','disposeWithMe','/universer-api/user/list','/universer-api/comment/unit/','getUnit','syncUpdateMutationToColla','add','filter','Solve','_threadCommentDataSource','_commentService','createTimestamp','unitId','post','string','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','error','userId','_init','function','132ydDZwC','packageName','requireSession','122769VfUIco','Delete','_configService','user','object','symbol','_threadCommentModel','905760vYWEZW','saveCommentToSnapshot','Add','body','getComment','comments','get','_sessionService','reply','rangeId','defineProperty','code','addUser','personId','_threadCommentDataSourceService','root','payload','/delete','getOwnPropertyDescriptor','121343zpQQAl','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.'];_0x276b=function(){return _0x1283fc;};return _0x276b();}(function(_0x546782,_0x4e807e){const _0x5c7a53=_0xf7f0,_0x48d52b=_0x546782();while(!![]){try{const _0x3ded35=-parseInt(_0x5c7a53(0x1e6))/0x1*(parseInt(_0x5c7a53(0x205))/0x2)+-parseInt(_0x5c7a53(0x1cc))/0x3+parseInt(_0x5c7a53(0x20a))/0x4*(parseInt(_0x5c7a53(0x1f3))/0x5)+-parseInt(_0x5c7a53(0x1e9))/0x6*(-parseInt(_0x5c7a53(0x210))/0x7)+-parseInt(_0x5c7a53(0x20d))/0x8*(parseInt(_0x5c7a53(0x1f8))/0x9)+parseInt(_0x5c7a53(0x1d3))/0xa+parseInt(_0x5c7a53(0x21f))/0xb*(parseInt(_0x5c7a53(0x1c9))/0xc);if(_0x3ded35===_0x4e807e)break;else _0x48d52b['push'](_0x48d52b['shift']());}catch(_0x139f53){_0x48d52b['push'](_0x48d52b['shift']());}}}(_0x276b,0x1add3));import{CollaborationSessionService as _0xcc4a3a,CommentService as _0x420efb,UniverCollaborationClientPlugin as _0x451638}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2f1693}from'@univerjs-pro/license';import{CustomRangeType as _0x159add,DependentOn as _0x440d4c,Disposable as _0xa24c4f,IConfigService as _0x26cff9,Inject as _0xf702a3,Injector as _0x808c4a,Plugin as _0x46bfd6,UserManagerService as _0xf26d74,dateKit as _0xaa0568,merge as _0x538276}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x99cca3}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x5e9acf,CommentUpdateEventType as _0x1dbf30}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x5a65e7,ThreadCommentModel as _0x28efe7}from'@univerjs/thread-comment';import{bufferTime as _0x895c05}from'rxjs';import{HTTPService as _0x284d85}from'@univerjs/network';var x=_0x30d60c(0x204),S=_0x30d60c(0x201);const C=_0x4dc612=>_0xaa0568(new Date(+_0x4dc612))[_0x30d60c(0x21c)](_0x30d60c(0x212)),w=async(_0x15e3e0,_0x2d2519)=>{const _0x11eb53=_0x30d60c;let _0x304971=_0x15e3e0[_0x11eb53(0x1d9)](_0xf26d74),_0x77131f=_0x15e3e0['get'](_0x284d85);_0x2d2519[_0x11eb53(0x218)](_0x30810b=>{const _0x184736=_0x11eb53;_0x304971[_0x184736(0x1f4)](_0x30810b)&&_0x2d2519['delete'](_0x30810b);}),_0x2d2519['size']&&(await _0x77131f[_0x11eb53(0x1d9)](_0x11eb53(0x223),{'params':{'userIDs':[..._0x2d2519]}}))[_0x11eb53(0x1d6)]['users'][_0x11eb53(0x218)](_0x29ca35=>{_0x29ca35&&_0x304971['addUser'](_0x29ca35);});};function T(_0x682ded,_0x32ad75){return function(_0x289587,_0x327335){_0x32ad75(_0x289587,_0x327335,_0x682ded);};}function E(_0xebeac3,_0x2582dd,_0x58b655,_0x4474a3){const _0x1e2f49=_0x30d60c;var _0x137d6e=arguments[_0x1e2f49(0x1fe)],_0x542c8a=_0x137d6e<0x3?_0x2582dd:_0x4474a3===null?_0x4474a3=Object[_0x1e2f49(0x1e5)](_0x2582dd,_0x58b655):_0x4474a3,_0x2921d2;if(typeof Reflect=='object'&&typeof Reflect[_0x1e2f49(0x1e8)]=='function')_0x542c8a=Reflect['decorate'](_0xebeac3,_0x2582dd,_0x58b655,_0x4474a3);else{for(var _0x395ffd=_0xebeac3[_0x1e2f49(0x1fe)]-0x1;_0x395ffd>=0x0;_0x395ffd--)(_0x2921d2=_0xebeac3[_0x395ffd])&&(_0x542c8a=(_0x137d6e<0x3?_0x2921d2(_0x542c8a):_0x137d6e>0x3?_0x2921d2(_0x2582dd,_0x58b655,_0x542c8a):_0x2921d2(_0x2582dd,_0x58b655))||_0x542c8a);}return _0x137d6e>0x3&&_0x542c8a&&Object[_0x1e2f49(0x1dd)](_0x2582dd,_0x58b655,_0x542c8a),_0x542c8a;}let D=class extends _0xa24c4f{constructor(_0x14ae0d,_0x108fb1,_0x4bc47c,_0x15fbbd){const _0x189570=_0x30d60c;super(),this[_0x189570(0x1be)]=_0x14ae0d,this[_0x189570(0x1d2)]=_0x108fb1,this[_0x189570(0x20b)]=_0x4bc47c,this['_injector']=_0x15fbbd,this[_0x189570(0x1c7)](),this[_0x189570(0x1ef)]();}[_0x30d60c(0x1ef)](){const _0x5ac8d1=_0x30d60c;this[_0x5ac8d1(0x222)](this[_0x5ac8d1(0x1d2)]['commentUpdate$']['pipe'](_0x895c05(0x10))[_0x5ac8d1(0x1ee)](_0x1facc8=>{const _0x318853=_0x5ac8d1;let _0x4cb712=new Set();_0x1facc8[_0x318853(0x218)](_0x272fbd=>{const _0x29aa61=_0x318853;switch(_0x272fbd[_0x29aa61(0x1f1)]){case _0x29aa61(0x1ba):{let _0x3ab617=_0x272fbd[_0x29aa61(0x1e3)][_0x29aa61(0x1e0)];_0x4cb712[_0x29aa61(0x1ba)](_0x3ab617);break;}default:break;}}),w(this[_0x318853(0x208)],_0x4cb712);}));}[_0x30d60c(0x1c7)](){const _0x1db72f=_0x30d60c;this[_0x1db72f(0x222)](this[_0x1db72f(0x1be)][_0x1db72f(0x1ff)][_0x1db72f(0x1ee)](async _0x2e3632=>{const _0x231c6=_0x1db72f;var _0x257960;let _0x3f7151=(_0x257960=this['_threadCommentModel'][_0x231c6(0x225)](_0x2e3632[_0x231c6(0x1c0)])['find'](_0x2d0bcd=>_0x2d0bcd[_0x231c6(0x1c4)]===_0x2e3632['threadId']))==null?void 0x0:_0x257960[_0x231c6(0x1e2)];if(!_0x3f7151)return;let {unitId:_0x14b89a,subUnitId:_0x3ac9ad}=_0x3f7151;switch(_0x2e3632[_0x231c6(0x1cf)]&&this['_userService'][_0x231c6(0x1df)](_0x2e3632['user']),_0x2e3632[_0x231c6(0x1f1)]){case _0x1dbf30[_0x231c6(0x1d5)]:break;case _0x1dbf30['Reply']:var _0x4c7292,_0xb26eca;this['_threadCommentModel'][_0x231c6(0x200)](_0x14b89a,_0x3ac9ad,{'unitId':_0x14b89a,'subUnitId':_0x3ac9ad,'ref':'','id':_0x2e3632[_0x231c6(0x20f)],'dT':C(+_0x2e3632[_0x231c6(0x1bf)]),'threadId':_0x2e3632[_0x231c6(0x1c4)],'personId':(_0x4c7292=(_0xb26eca=_0x2e3632[_0x231c6(0x1cf)])==null?void 0x0:_0xb26eca[_0x231c6(0x1fa)])==null?_0x2e3632[_0x231c6(0x1c6)]:_0x4c7292,'text':JSON[_0x231c6(0x213)](_0x2e3632[_0x231c6(0x214)]),'parentId':_0x3f7151['id']});break;case _0x1dbf30[_0x231c6(0x1cd)]:{let _0x597914=this['_threadCommentModel'][_0x231c6(0x1d7)](_0x14b89a,_0x3ac9ad,_0x2e3632['replyId']);_0x597914&&_0x597914['parentId']&&this[_0x231c6(0x1d2)][_0x231c6(0x1f2)](_0x14b89a,_0x3ac9ad,_0x2e3632['replyId']);break;}case _0x1dbf30[_0x231c6(0x1fd)]:this[_0x231c6(0x1d2)]['updateComment'](_0x14b89a,_0x3ac9ad,{'commentId':_0x2e3632[_0x231c6(0x20f)],'text':JSON[_0x231c6(0x213)](_0x2e3632[_0x231c6(0x214)])});break;case _0x1dbf30[_0x231c6(0x1bc)]:{var _0x28a9d5;let _0x2cf047=(_0x28a9d5=this['_threadCommentModel'][_0x231c6(0x225)](_0x2e3632[_0x231c6(0x1c0)])[_0x231c6(0x1f7)](_0x2693da=>_0x2693da['threadId']===_0x2e3632[_0x231c6(0x1c4)]))==null?void 0x0:_0x28a9d5['root'];_0x2cf047&&this[_0x231c6(0x1d2)][_0x231c6(0x1ec)](_0x14b89a,_0x3ac9ad,_0x2cf047['id'],_0x2e3632[_0x231c6(0x221)]===_0x5e9acf['Solved']);break;}default:break;}}));}};D=E([T(0x0,_0xf702a3(_0x420efb)),T(0x1,_0xf702a3(_0x28efe7)),T(0x2,_0xf702a3(_0xf26d74)),T(0x3,_0xf702a3(_0x808c4a))],D);const O={};function k(_0x41b4bc,_0x5185a0){const _0x38971d=_0x30d60c;let _0x16a15a=_0x41b4bc[_0x38971d(0x219)][0x0];return{..._0x5185a0,'id':_0x16a15a['replyId'],'resolved':_0x41b4bc[_0x38971d(0x221)]===0x1,'dT':C(_0x16a15a['createTimestamp']),'personId':_0x16a15a[_0x38971d(0x1c6)],'threadId':_0x16a15a['threadId']};}function A(_0x2bf69d,_0x29badf,_0x2d2d94){const _0x3e5c22=_0x30d60c;var _0x2385d9,_0x5dd7d2;if(((_0x2385d9=_0x2bf69d==null||(_0x5dd7d2=_0x2bf69d[_0x3e5c22(0x219)])==null?void 0x0:_0x5dd7d2[_0x3e5c22(0x1fe)])==null?0x0:_0x2385d9)>0x0){let _0x344250=(_0x3c83b0,_0x35781f)=>({'id':_0x3c83b0[_0x3e5c22(0x20f)],'threadId':_0x3c83b0[_0x3e5c22(0x1c4)],'dT':C(_0x3c83b0[_0x3e5c22(0x1bf)]),'personId':_0x3c83b0[_0x3e5c22(0x1c6)],'resolved':_0x2bf69d['solved']===_0x5e9acf[_0x3e5c22(0x207)],'unitId':_0x29badf,'subUnitId':_0x2d2d94,'text':JSON['parse'](_0x3c83b0[_0x3e5c22(0x214)]),'parentId':_0x35781f}),_0xa4a4ed=_0x344250(_0x2bf69d[_0x3e5c22(0x219)][0x0]);return{..._0xa4a4ed,'children':_0x2bf69d[_0x3e5c22(0x219)][_0x3e5c22(0x1ea)](0x1)[_0x3e5c22(0x1f0)](_0x4f19d0=>_0x344250(_0x4f19d0,_0xa4a4ed['id']))};}return null;}let j=class{constructor(_0x477e73,_0x587d13,_0x1c8308){const _0x3b4601=_0x30d60c;this[_0x3b4601(0x21d)]=_0x477e73,this[_0x3b4601(0x20b)]=_0x587d13,this[_0x3b4601(0x1da)]=_0x1c8308;}async['addComment'](_0x3c21bb){const _0x374386=_0x30d60c;var _0x53fbae,_0x18cfeb;let {parentId:_0x2e27db,unitId:_0x5e713e,text:_0x3bb652,threadId:_0x33684d}=_0x3c21bb,_0x242767=(_0x53fbae=(_0x18cfeb=_0x3bb652[_0x374386(0x220)])==null?void 0x0:_0x18cfeb[_0x374386(0x1bb)](_0x11751b=>_0x11751b[_0x374386(0x20c)]===_0x159add['COMMENT'])['map'](_0x4392e0=>_0x4392e0[_0x374386(0x1dc)]))==null?[]:_0x53fbae,_0x34217c=JSON['stringify'](_0x3bb652),_0x425a10=(await this[_0x374386(0x1da)][_0x374386(0x1cb)](_0x5e713e))['getMemberID']();if(_0x2e27db){let _0x471179={'memberId':_0x425a10,'unitId':_0x5e713e,'content':_0x34217c,'mention':_0x242767,'threadId':_0x33684d},_0x319f6b=(await this[_0x374386(0x21d)][_0x374386(0x1c1)](_0x374386(0x224)+_0x5e713e+_0x374386(0x21e),{'body':_0x471179}))['body'][_0x374386(0x1db)];return{..._0x3c21bb,'id':_0x319f6b['replyId'],'dT':_0xaa0568(+_0x319f6b[_0x374386(0x1bf)])[_0x374386(0x21c)](_0x374386(0x212)),'personId':_0x319f6b[_0x374386(0x1c6)]};}else{let _0x57a484={'memberId':_0x425a10,'unitId':_0x5e713e,'content':_0x34217c,'mention':_0x242767};return k((await this[_0x374386(0x21d)][_0x374386(0x1c1)]('/universer-api/comment/unit/'+_0x5e713e+_0x374386(0x203),{'body':_0x57a484}))[_0x374386(0x1d6)][_0x374386(0x217)],_0x3c21bb);}}async[_0x30d60c(0x1ed)](_0x157104){const _0x20a809=_0x30d60c;var _0x5425ce,_0xee7973;let {text:_0x5e22b9,unitId:_0x29942a}=_0x157104,_0x2ea2f1=(_0x5425ce=(_0xee7973=_0x5e22b9[_0x20a809(0x220)])==null?void 0x0:_0xee7973[_0x20a809(0x1bb)](_0x337435=>_0x337435['rangeType']===_0x159add['COMMENT'])[_0x20a809(0x1f0)](_0x19520c=>_0x19520c[_0x20a809(0x1dc)]))==null?[]:_0x5425ce,_0x12ce13=JSON['stringify'](_0x5e22b9),_0x556d5d=_0x157104['threadId'],_0x1d48d3=_0x157104['id'],_0x3ea600={'memberId':(await this['_sessionService'][_0x20a809(0x1cb)](_0x29942a))[_0x20a809(0x21a)](),'unitId':_0x29942a,'threadId':_0x556d5d,'mention':_0x2ea2f1,'content':_0x12ce13,'replyId':_0x1d48d3},_0x299949=await this[_0x20a809(0x21d)][_0x20a809(0x1c1)](_0x20a809(0x224)+_0x29942a+'/edit',{'body':_0x3ea600});return!_0x299949['body'][_0x20a809(0x1c5)]||_0x299949[_0x20a809(0x1d6)][_0x20a809(0x1c5)][_0x20a809(0x1de)]===0x1;}async[_0x30d60c(0x1ec)](_0x3103c5){const _0x251703=_0x30d60c;let {unitId:_0x2ca0cc}=_0x3103c5,_0xe0ddc9=_0x3103c5[_0x251703(0x1c4)],_0x5a8ceb={'memberId':this[_0x251703(0x20b)][_0x251703(0x1f6)]()[_0x251703(0x1fa)],'unitId':_0x2ca0cc,'threadId':_0xe0ddc9,'solved':_0x3103c5['resolved']?_0x5e9acf[_0x251703(0x207)]:_0x5e9acf['OpenOrReOpen']},_0x4f4527=await this['_httpService']['post'](_0x251703(0x224)+_0x2ca0cc+'/solved',{'body':_0x5a8ceb});return!_0x4f4527['body'][_0x251703(0x1c5)]||_0x4f4527[_0x251703(0x1d6)][_0x251703(0x1c5)]['code']===0x1;}async[_0x30d60c(0x1f2)](_0x504aca,_0x3e4b6c,_0x476943,_0x1e4563){const _0x5c58c9=_0x30d60c;let _0x310357={'memberId':(await this[_0x5c58c9(0x1da)][_0x5c58c9(0x1cb)](_0x504aca))[_0x5c58c9(0x21a)](),'threadId':_0x476943,'replyId':_0x1e4563,'unitId':_0x504aca},_0x4e1036=await this[_0x5c58c9(0x21d)][_0x5c58c9(0x1c1)](_0x5c58c9(0x224)+_0x504aca+_0x5c58c9(0x1e4),{'body':_0x310357});return!_0x4e1036[_0x5c58c9(0x1d6)][_0x5c58c9(0x1c5)]||_0x4e1036['body'][_0x5c58c9(0x1c5)][_0x5c58c9(0x1de)]===0x1;}async['listComments'](_0x291c84,_0xfb981d,_0x1bac2){const _0x3e301c=_0x30d60c;let _0x46861c={'unitId':_0x291c84,'threadId':_0x1bac2},_0x526536=await this['_httpService'][_0x3e301c(0x1c1)]('/universer-api/comment/unit/'+_0x291c84+_0x3e301c(0x206),{'body':_0x46861c}),_0x369d75=_0x1bac2[_0x3e301c(0x1f0)](_0x4fd42e=>A(_0x526536[_0x3e301c(0x1d6)][_0x3e301c(0x1d8)][_0x4fd42e],_0x291c84,_0xfb981d))['filter'](Boolean);return Object[_0x3e301c(0x209)](_0x526536[_0x3e301c(0x1d6)][_0x3e301c(0x1f9)])[_0x3e301c(0x218)](_0x131fcc=>{const _0x424fda=_0x3e301c;this['_userService'][_0x424fda(0x1df)](_0x131fcc);}),_0x369d75;}[_0x30d60c(0x1d4)](_0x2bb987){const _0x3f0cdd=_0x30d60c;return{'id':_0x2bb987['id'],'threadId':_0x2bb987[_0x3f0cdd(0x1c4)],'ref':_0x2bb987[_0x3f0cdd(0x1fb)]};}};j=E([T(0x0,_0xf702a3(_0x284d85)),T(0x1,_0xf702a3(_0xf26d74)),T(0x2,_0xf702a3(_0xcc4a3a))],j);function _0xf7f0(_0x38dd1e,_0x50e1d6){_0x38dd1e=_0x38dd1e-0x1b9;const _0x276b79=_0x276b();let _0xf7f099=_0x276b79[_0x38dd1e];return _0xf7f099;}let M=class extends _0xa24c4f{constructor(_0x484ec2,_0x4a2488){const _0xab65db=_0x30d60c;super(),this[_0xab65db(0x1e1)]=_0x484ec2,this[_0xab65db(0x1bd)]=_0x4a2488,this[_0xab65db(0x21b)]();}[_0x30d60c(0x21b)](){const _0x4f638b=_0x30d60c;this[_0x4f638b(0x1e1)][_0x4f638b(0x202)]=this[_0x4f638b(0x1bd)],this[_0x4f638b(0x1e1)][_0x4f638b(0x1b9)]=!0x1;}};M=E([T(0x0,_0x5a65e7),T(0x1,_0xf702a3(j))],M);function N(_0x4a8424){'@babel/helpers - typeof';const _0x43e7c3=_0x30d60c;return N=typeof Symbol==_0x43e7c3(0x1c8)&&typeof Symbol[_0x43e7c3(0x211)]==_0x43e7c3(0x1d1)?function(_0x2affef){return typeof _0x2affef;}:function(_0x5b9ecd){const _0x479014=_0x43e7c3;return _0x5b9ecd&&typeof Symbol==_0x479014(0x1c8)&&_0x5b9ecd[_0x479014(0x216)]===Symbol&&_0x5b9ecd!==Symbol['prototype']?_0x479014(0x1d1):typeof _0x5b9ecd;},N(_0x4a8424);}function P(_0x5abe03,_0x605251){const _0x200f00=_0x30d60c;if(N(_0x5abe03)!=_0x200f00(0x1d0)||!_0x5abe03)return _0x5abe03;var _0x458993=_0x5abe03[Symbol[_0x200f00(0x20e)]];if(_0x458993!==void 0x0){var _0x4f4e51=_0x458993[_0x200f00(0x1fc)](_0x5abe03,_0x605251||'default');if(N(_0x4f4e51)!=_0x200f00(0x1d0))return _0x4f4e51;throw TypeError(_0x200f00(0x1e7));}return(_0x605251===_0x200f00(0x1c2)?String:Number)(_0x5abe03);}function F(_0x87ed8){const _0x169284=_0x30d60c;var _0x5527bc=P(_0x87ed8,_0x169284(0x1c2));return N(_0x5527bc)==_0x169284(0x1d1)?_0x5527bc:_0x5527bc+'';}function I(_0x4bba1a,_0xf8f16d,_0x5f2a31){const _0x43d2a7=_0x30d60c;return(_0xf8f16d=F(_0xf8f16d))in _0x4bba1a?Object[_0x43d2a7(0x1dd)](_0x4bba1a,_0xf8f16d,{'value':_0x5f2a31,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4bba1a[_0xf8f16d]=_0x5f2a31,_0x4bba1a;}let L=class extends _0x46bfd6{constructor(_0x2704e7=O,_0x40c90c,_0x6f89f){const _0x66b0c3=_0x30d60c;super(),this['_config']=_0x2704e7,this[_0x66b0c3(0x208)]=_0x40c90c,this[_0x66b0c3(0x1ce)]=_0x6f89f;let {..._0x168a8}=_0x538276({},O,this['_config']);this[_0x66b0c3(0x1ce)][_0x66b0c3(0x1eb)]('thread-comment-data-source.config',_0x168a8);}[_0x30d60c(0x215)](){const _0x42c603=_0x30d60c;[[j],[M],[D]][_0x42c603(0x218)](_0x22323f=>{this['_injector']['add'](_0x22323f);});}['onReady'](){const _0x44d48a=_0x30d60c;this[_0x44d48a(0x208)][_0x44d48a(0x1d9)](M),this['_injector']['get'](D);}};I(L,'pluginName',_0x30d60c(0x1c3)),I(L,_0x30d60c(0x1ca),x),I(L,_0x30d60c(0x1f5),S),L=E([_0x440d4c(_0x99cca3,_0x451638,_0x2f1693),T(0x1,_0xf702a3(_0x808c4a)),T(0x2,_0x26cff9)],L);export{L as UniverThreadCommentDataSourcePlugin};
1
+ const _0x24acd3=_0x39e8;(function(_0x2a93d6,_0x3a5e4b){const _0x2314c8=_0x39e8,_0x5c9a6c=_0x2a93d6();while(!![]){try{const _0x5c82ff=parseInt(_0x2314c8(0xa6))/0x1*(-parseInt(_0x2314c8(0xf2))/0x2)+-parseInt(_0x2314c8(0xab))/0x3+parseInt(_0x2314c8(0xbd))/0x4+-parseInt(_0x2314c8(0xfb))/0x5*(parseInt(_0x2314c8(0xa2))/0x6)+-parseInt(_0x2314c8(0xbb))/0x7*(-parseInt(_0x2314c8(0xaf))/0x8)+parseInt(_0x2314c8(0xb6))/0x9+parseInt(_0x2314c8(0xd8))/0xa;if(_0x5c82ff===_0x3a5e4b)break;else _0x5c9a6c['push'](_0x5c9a6c['shift']());}catch(_0x592f1a){_0x5c9a6c['push'](_0x5c9a6c['shift']());}}}(_0x54e5,0x205de));import{CollaborationSessionService as _0x549419,CommentService as _0x210ea5,UniverCollaborationClientPlugin as _0x47bbe9}from'@univerjs-pro/collaboration-client';function _0x39e8(_0x3a7771,_0x563b8e){_0x3a7771=_0x3a7771-0x92;const _0x54e582=_0x54e5();let _0x39e896=_0x54e582[_0x3a7771];return _0x39e896;}import{UniverLicensePlugin as _0x5ccbdc}from'@univerjs-pro/license';import{CustomRangeType as _0x55bffa,DependentOn as _0x4924db,Disposable as _0x342d50,IConfigService as _0x1812ba,Inject as _0x5da4f4,Injector as _0x536f47,Plugin as _0x31f5c5,UserManagerService as _0x45ef85,dateKit as _0x4abfbd,merge as _0x31c2fd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x26a07e}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x4f3934,CommentUpdateEventType as _0x53a39d}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x448d8f,ThreadCommentModel as _0x3b0840}from'@univerjs/thread-comment';import{bufferTime as _0x306e76}from'rxjs';import{HTTPService as _0x4b97da}from'@univerjs/network';var x=_0x24acd3(0xc1),S=_0x24acd3(0xf5);const C=_0x291d0e=>_0x4abfbd(new Date(+_0x291d0e))[_0x24acd3(0xe6)](_0x24acd3(0xda)),w=async(_0x12b975,_0x5c229e)=>{const _0x7c3f2c=_0x24acd3;let _0x195174=_0x12b975['get'](_0x45ef85),_0x32b62d=_0x12b975[_0x7c3f2c(0xe5)](_0x4b97da);_0x5c229e['forEach'](_0x26510a=>{const _0x2d9438=_0x7c3f2c;_0x195174[_0x2d9438(0xf8)](_0x26510a)&&_0x5c229e['delete'](_0x26510a);}),_0x5c229e[_0x7c3f2c(0xdc)]&&(await _0x32b62d[_0x7c3f2c(0xe5)](_0x7c3f2c(0xf6),{'params':{'userIDs':[..._0x5c229e]}}))['body'][_0x7c3f2c(0xdb)][_0x7c3f2c(0x96)](_0x54a051=>{_0x54a051&&_0x195174['addUser'](_0x54a051);});};function T(_0x3f5c2c,_0x1d1bda){return function(_0x27ab11,_0x5d2b8d){_0x1d1bda(_0x27ab11,_0x5d2b8d,_0x3f5c2c);};}function E(_0x3b8efa,_0x39d806,_0xd72a11,_0x17dfcf){const _0x3c62a8=_0x24acd3;var _0xcdd043=arguments[_0x3c62a8(0x94)],_0x32d010=_0xcdd043<0x3?_0x39d806:_0x17dfcf===null?_0x17dfcf=Object['getOwnPropertyDescriptor'](_0x39d806,_0xd72a11):_0x17dfcf,_0x510d0f;if(typeof Reflect==_0x3c62a8(0xb7)&&typeof Reflect[_0x3c62a8(0xee)]==_0x3c62a8(0xf4))_0x32d010=Reflect[_0x3c62a8(0xee)](_0x3b8efa,_0x39d806,_0xd72a11,_0x17dfcf);else{for(var _0xb49db=_0x3b8efa[_0x3c62a8(0x94)]-0x1;_0xb49db>=0x0;_0xb49db--)(_0x510d0f=_0x3b8efa[_0xb49db])&&(_0x32d010=(_0xcdd043<0x3?_0x510d0f(_0x32d010):_0xcdd043>0x3?_0x510d0f(_0x39d806,_0xd72a11,_0x32d010):_0x510d0f(_0x39d806,_0xd72a11))||_0x32d010);}return _0xcdd043>0x3&&_0x32d010&&Object['defineProperty'](_0x39d806,_0xd72a11,_0x32d010),_0x32d010;}let D=class extends _0x342d50{constructor(_0x5d165f,_0x2bff6f,_0x773819,_0x6df37b){const _0xc08f54=_0x24acd3;super(),this[_0xc08f54(0xa1)]=_0x5d165f,this[_0xc08f54(0x9b)]=_0x2bff6f,this[_0xc08f54(0xd0)]=_0x773819,this['_injector']=_0x6df37b,this[_0xc08f54(0xa5)](),this[_0xc08f54(0xce)]();}[_0x24acd3(0xce)](){const _0x258172=_0x24acd3;this['disposeWithMe'](this[_0x258172(0x9b)]['commentUpdate$'][_0x258172(0xd1)](_0x306e76(0x10))[_0x258172(0xba)](_0x355dc7=>{const _0x39ae22=_0x258172;let _0x55d635=new Set();_0x355dc7[_0x39ae22(0x96)](_0x4cc324=>{const _0x1b923b=_0x39ae22;switch(_0x4cc324[_0x1b923b(0xcd)]){case _0x1b923b(0xe1):{let _0x20a06a=_0x4cc324[_0x1b923b(0xc3)][_0x1b923b(0xe7)];_0x55d635['add'](_0x20a06a);break;}default:break;}}),w(this[_0x39ae22(0xa3)],_0x55d635);}));}[_0x24acd3(0xa5)](){const _0x3b69aa=_0x24acd3;this[_0x3b69aa(0xe0)](this['_commentService'][_0x3b69aa(0xdf)][_0x3b69aa(0xba)](async _0x1d7362=>{const _0x42494a=_0x3b69aa;var _0x1d6c46;let _0x2aec70=(_0x1d6c46=this[_0x42494a(0x9b)][_0x42494a(0xf7)](_0x1d7362[_0x42494a(0xd4)])['find'](_0xe9a3d6=>_0xe9a3d6[_0x42494a(0xb1)]===_0x1d7362[_0x42494a(0xb1)]))==null?void 0x0:_0x1d6c46[_0x42494a(0xb8)];if(!_0x2aec70)return;let {unitId:_0x4692b9,subUnitId:_0x56df8a}=_0x2aec70;switch(_0x1d7362['user']&&this['_userService'][_0x42494a(0xd5)](_0x1d7362['user']),_0x1d7362[_0x42494a(0xcd)]){case _0x53a39d['Add']:break;case _0x53a39d[_0x42494a(0xa8)]:var _0x1eaa59,_0x2d595b;this['_threadCommentModel'][_0x42494a(0xa0)](_0x4692b9,_0x56df8a,{'unitId':_0x4692b9,'subUnitId':_0x56df8a,'ref':'','id':_0x1d7362[_0x42494a(0xe4)],'dT':C(+_0x1d7362[_0x42494a(0xe2)]),'threadId':_0x1d7362[_0x42494a(0xb1)],'personId':(_0x1eaa59=(_0x2d595b=_0x1d7362[_0x42494a(0xbc)])==null?void 0x0:_0x2d595b['userID'])==null?_0x1d7362[_0x42494a(0x9d)]:_0x1eaa59,'text':JSON['parse'](_0x1d7362['content']),'parentId':_0x2aec70['id']});break;case _0x53a39d['Delete']:{let _0x5995c6=this[_0x42494a(0x9b)][_0x42494a(0xf9)](_0x4692b9,_0x56df8a,_0x1d7362[_0x42494a(0xe4)]);_0x5995c6&&_0x5995c6[_0x42494a(0xc8)]&&this[_0x42494a(0x9b)][_0x42494a(0xd6)](_0x4692b9,_0x56df8a,_0x1d7362[_0x42494a(0xe4)]);break;}case _0x53a39d[_0x42494a(0xec)]:this[_0x42494a(0x9b)][_0x42494a(0xef)](_0x4692b9,_0x56df8a,{'commentId':_0x1d7362[_0x42494a(0xe4)],'text':JSON[_0x42494a(0xde)](_0x1d7362[_0x42494a(0xc5)])});break;case _0x53a39d[_0x42494a(0xac)]:{var _0x130222;let _0x3a8a1f=(_0x130222=this[_0x42494a(0x9b)][_0x42494a(0xf7)](_0x1d7362['unitId'])[_0x42494a(0xc9)](_0x2f5f2d=>_0x2f5f2d['threadId']===_0x1d7362[_0x42494a(0xb1)]))==null?void 0x0:_0x130222[_0x42494a(0xb8)];_0x3a8a1f&&this[_0x42494a(0x9b)][_0x42494a(0xc0)](_0x4692b9,_0x56df8a,_0x3a8a1f['id'],_0x1d7362[_0x42494a(0x95)]===_0x4f3934[_0x42494a(0xc2)]);break;}default:break;}}));}};D=E([T(0x0,_0x5da4f4(_0x210ea5)),T(0x1,_0x5da4f4(_0x3b0840)),T(0x2,_0x5da4f4(_0x45ef85)),T(0x3,_0x5da4f4(_0x536f47))],D);const O={};function k(_0x3d90b7,_0x1871aa){const _0xad39ce=_0x24acd3;let _0x53dc2d=_0x3d90b7[_0xad39ce(0xe8)][0x0];return{..._0x1871aa,'id':_0x53dc2d[_0xad39ce(0xe4)],'resolved':_0x3d90b7[_0xad39ce(0x95)]===0x1,'dT':C(_0x53dc2d[_0xad39ce(0xe2)]),'personId':_0x53dc2d[_0xad39ce(0x9d)],'threadId':_0x53dc2d[_0xad39ce(0xb1)]};}function A(_0x6b217b,_0x3df929,_0x1f19eb){const _0x35a93a=_0x24acd3;var _0x36d169,_0x41f264;if(((_0x36d169=_0x6b217b==null||(_0x41f264=_0x6b217b[_0x35a93a(0xe8)])==null?void 0x0:_0x41f264[_0x35a93a(0x94)])==null?0x0:_0x36d169)>0x0){let _0x1a2cd1=(_0x571c82,_0x51870b)=>({'id':_0x571c82['replyId'],'threadId':_0x571c82[_0x35a93a(0xb1)],'dT':C(_0x571c82[_0x35a93a(0xe2)]),'personId':_0x571c82[_0x35a93a(0x9d)],'resolved':_0x6b217b[_0x35a93a(0x95)]===_0x4f3934[_0x35a93a(0xc2)],'unitId':_0x3df929,'subUnitId':_0x1f19eb,'text':JSON[_0x35a93a(0xde)](_0x571c82[_0x35a93a(0xc5)]),'parentId':_0x51870b}),_0x3deb14=_0x1a2cd1(_0x6b217b[_0x35a93a(0xe8)][0x0]);return{..._0x3deb14,'children':_0x6b217b[_0x35a93a(0xe8)][_0x35a93a(0xc4)](0x1)[_0x35a93a(0xae)](_0x11ef58=>_0x1a2cd1(_0x11ef58,_0x3deb14['id']))};}return null;}function _0x54e5(){const _0x291d64=['resolveComment','@univerjs-pro/thread-comment-datasource','Solved','payload','slice','content','prototype','post','parentId','find','toPrimitive','thread-comment-data-source.config','_config','type','_initUserSync','comment','_userService','pipe','error','userID','unitId','addUser','deleteComment','_sessionService','2729650IZCrsf','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','users','size','string','parse','commentUpdate$','disposeWithMe','add','createTimestamp','constructor','replyId','get','format','personId','replies','symbol','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','customRanges','decorate','updateComment','/edit','rangeType','68462ezTOLe','COMMENT','function','0.25.1','/universer-api/user/list','getUnit','getUser','getComment','version','10xDAXSM','stringify','_initDataSource','OpenOrReOpen','length','solved','forEach','default','defineProperty','filter','/list','_threadCommentModel','call','userId','body','code','addComment','_commentService','502392ZiELDC','_injector','getMemberID','_init','7WNrAMk','iterator','Reply','saveCommentToSnapshot','/delete','581988RiDhoI','Solve','syncUpdateMutationToColla','map','1815640KzmUrH','rangeId','threadId','ref','_threadCommentDataSource','/reply','_threadCommentDataSourceService','752571mmrUtg','object','root','_configService','subscribe','7DxmBJg','user','600448bcBhdL','onStarting','requireSession'];_0x54e5=function(){return _0x291d64;};return _0x54e5();}let j=class{constructor(_0x200ec5,_0x4779c1,_0x3b55e4){const _0x48e10e=_0x24acd3;this[_0x48e10e(0xea)]=_0x200ec5,this[_0x48e10e(0xd0)]=_0x4779c1,this[_0x48e10e(0xd7)]=_0x3b55e4;}async[_0x24acd3(0xa0)](_0x3185a4){const _0x29185d=_0x24acd3;var _0x408b88,_0x592d01;let {parentId:_0x3785f9,unitId:_0x4a4570,text:_0x4d4cdb,threadId:_0x365890}=_0x3185a4,_0x4c0730=(_0x408b88=(_0x592d01=_0x4d4cdb['customRanges'])==null?void 0x0:_0x592d01[_0x29185d(0x99)](_0xaa1f4=>_0xaa1f4[_0x29185d(0xf1)]===_0x55bffa[_0x29185d(0xf3)])[_0x29185d(0xae)](_0x31784d=>_0x31784d[_0x29185d(0xb0)]))==null?[]:_0x408b88,_0x4a9488=JSON[_0x29185d(0xfc)](_0x4d4cdb),_0xc5dad9=(await this[_0x29185d(0xd7)][_0x29185d(0xbf)](_0x4a4570))['getMemberID']();if(_0x3785f9){let _0x3a55eb={'memberId':_0xc5dad9,'unitId':_0x4a4570,'content':_0x4a9488,'mention':_0x4c0730,'threadId':_0x365890},_0x40f120=(await this[_0x29185d(0xea)][_0x29185d(0xc7)](_0x29185d(0xd9)+_0x4a4570+_0x29185d(0xb4),{'body':_0x3a55eb}))[_0x29185d(0x9e)]['reply'];return{..._0x3185a4,'id':_0x40f120[_0x29185d(0xe4)],'dT':_0x4abfbd(+_0x40f120[_0x29185d(0xe2)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x40f120[_0x29185d(0x9d)]};}else{let _0x2883fc={'memberId':_0xc5dad9,'unitId':_0x4a4570,'content':_0x4a9488,'mention':_0x4c0730};return k((await this[_0x29185d(0xea)][_0x29185d(0xc7)](_0x29185d(0xd9)+_0x4a4570+'/add',{'body':_0x2883fc}))[_0x29185d(0x9e)][_0x29185d(0xcf)],_0x3185a4);}}async[_0x24acd3(0xef)](_0x533cb7){const _0xd153f7=_0x24acd3;var _0x558b51,_0x5ebd5d;let {text:_0x116f99,unitId:_0xba2143}=_0x533cb7,_0x2c8ad9=(_0x558b51=(_0x5ebd5d=_0x116f99[_0xd153f7(0xed)])==null?void 0x0:_0x5ebd5d[_0xd153f7(0x99)](_0x57d374=>_0x57d374[_0xd153f7(0xf1)]===_0x55bffa['COMMENT'])[_0xd153f7(0xae)](_0x426074=>_0x426074[_0xd153f7(0xb0)]))==null?[]:_0x558b51,_0x3faed3=JSON[_0xd153f7(0xfc)](_0x116f99),_0x3d03be=_0x533cb7[_0xd153f7(0xb1)],_0x322b41=_0x533cb7['id'],_0x552043={'memberId':(await this[_0xd153f7(0xd7)][_0xd153f7(0xbf)](_0xba2143))[_0xd153f7(0xa4)](),'unitId':_0xba2143,'threadId':_0x3d03be,'mention':_0x2c8ad9,'content':_0x3faed3,'replyId':_0x322b41},_0x30f023=await this[_0xd153f7(0xea)]['post'](_0xd153f7(0xd9)+_0xba2143+_0xd153f7(0xf0),{'body':_0x552043});return!_0x30f023[_0xd153f7(0x9e)][_0xd153f7(0xd2)]||_0x30f023[_0xd153f7(0x9e)][_0xd153f7(0xd2)][_0xd153f7(0x9f)]===0x1;}async[_0x24acd3(0xc0)](_0x30ad4f){const _0x1afcca=_0x24acd3;let {unitId:_0x44f50e}=_0x30ad4f,_0x4e435c=_0x30ad4f[_0x1afcca(0xb1)],_0x3adaa4={'memberId':this['_userService']['getCurrentUser']()[_0x1afcca(0xd3)],'unitId':_0x44f50e,'threadId':_0x4e435c,'solved':_0x30ad4f['resolved']?_0x4f3934[_0x1afcca(0xc2)]:_0x4f3934[_0x1afcca(0x93)]},_0x3e7a49=await this[_0x1afcca(0xea)][_0x1afcca(0xc7)](_0x1afcca(0xd9)+_0x44f50e+'/solved',{'body':_0x3adaa4});return!_0x3e7a49['body'][_0x1afcca(0xd2)]||_0x3e7a49['body'][_0x1afcca(0xd2)][_0x1afcca(0x9f)]===0x1;}async[_0x24acd3(0xd6)](_0x5ee32f,_0x448583,_0xc8e4f8,_0x26451f){const _0x33fc85=_0x24acd3;let _0x4d73d3={'memberId':(await this[_0x33fc85(0xd7)]['requireSession'](_0x5ee32f))['getMemberID'](),'threadId':_0xc8e4f8,'replyId':_0x26451f,'unitId':_0x5ee32f},_0x19fb06=await this[_0x33fc85(0xea)][_0x33fc85(0xc7)]('/universer-api/comment/unit/'+_0x5ee32f+_0x33fc85(0xaa),{'body':_0x4d73d3});return!_0x19fb06[_0x33fc85(0x9e)]['error']||_0x19fb06['body'][_0x33fc85(0xd2)]['code']===0x1;}async['listComments'](_0xad7b9,_0x59a0fd,_0x32bb0b){const _0x2b9c76=_0x24acd3;let _0x299530={'unitId':_0xad7b9,'threadId':_0x32bb0b},_0x5b42da=await this[_0x2b9c76(0xea)][_0x2b9c76(0xc7)](_0x2b9c76(0xd9)+_0xad7b9+_0x2b9c76(0x9a),{'body':_0x299530}),_0xa566de=_0x32bb0b[_0x2b9c76(0xae)](_0x574020=>A(_0x5b42da[_0x2b9c76(0x9e)]['comments'][_0x574020],_0xad7b9,_0x59a0fd))[_0x2b9c76(0x99)](Boolean);return Object['values'](_0x5b42da['body'][_0x2b9c76(0xdb)])['forEach'](_0x31939f=>{const _0x13461e=_0x2b9c76;this[_0x13461e(0xd0)][_0x13461e(0xd5)](_0x31939f);}),_0xa566de;}[_0x24acd3(0xa9)](_0x4c9a21){const _0x2d9b42=_0x24acd3;return{'id':_0x4c9a21['id'],'threadId':_0x4c9a21[_0x2d9b42(0xb1)],'ref':_0x4c9a21[_0x2d9b42(0xb2)]};}};j=E([T(0x0,_0x5da4f4(_0x4b97da)),T(0x1,_0x5da4f4(_0x45ef85)),T(0x2,_0x5da4f4(_0x549419))],j);let M=class extends _0x342d50{constructor(_0x1c5125,_0x3b1865){const _0x439b07=_0x24acd3;super(),this[_0x439b07(0xb5)]=_0x1c5125,this[_0x439b07(0xb3)]=_0x3b1865,this[_0x439b07(0x92)]();}[_0x24acd3(0x92)](){const _0x3cacf2=_0x24acd3;this[_0x3cacf2(0xb5)]['dataSource']=this['_threadCommentDataSource'],this[_0x3cacf2(0xb5)][_0x3cacf2(0xad)]=!0x1;}};M=E([T(0x0,_0x448d8f),T(0x1,_0x5da4f4(j))],M);function N(_0x3209ad){'@babel/helpers - typeof';const _0x408d7c=_0x24acd3;return N=typeof Symbol==_0x408d7c(0xf4)&&typeof Symbol[_0x408d7c(0xa7)]=='symbol'?function(_0x452f1c){return typeof _0x452f1c;}:function(_0x854b23){const _0x519483=_0x408d7c;return _0x854b23&&typeof Symbol==_0x519483(0xf4)&&_0x854b23[_0x519483(0xe3)]===Symbol&&_0x854b23!==Symbol[_0x519483(0xc6)]?'symbol':typeof _0x854b23;},N(_0x3209ad);}function P(_0xeb782,_0x2d8502){const _0x48f160=_0x24acd3;if(N(_0xeb782)!='object'||!_0xeb782)return _0xeb782;var _0x578782=_0xeb782[Symbol[_0x48f160(0xca)]];if(_0x578782!==void 0x0){var _0x5df045=_0x578782[_0x48f160(0x9c)](_0xeb782,_0x2d8502||_0x48f160(0x97));if(N(_0x5df045)!=_0x48f160(0xb7))return _0x5df045;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2d8502==='string'?String:Number)(_0xeb782);}function F(_0x5cd295){const _0x4b95d5=_0x24acd3;var _0x2928a9=P(_0x5cd295,_0x4b95d5(0xdd));return N(_0x2928a9)==_0x4b95d5(0xe9)?_0x2928a9:_0x2928a9+'';}function I(_0x1b0afa,_0x2d6d8c,_0x97eb01){const _0x16ef3=_0x24acd3;return(_0x2d6d8c=F(_0x2d6d8c))in _0x1b0afa?Object[_0x16ef3(0x98)](_0x1b0afa,_0x2d6d8c,{'value':_0x97eb01,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1b0afa[_0x2d6d8c]=_0x97eb01,_0x1b0afa;}let L=class extends _0x31f5c5{constructor(_0x542cc7=O,_0xb45a14,_0x1f3c7){const _0x3e5b0f=_0x24acd3;super(),this[_0x3e5b0f(0xcc)]=_0x542cc7,this[_0x3e5b0f(0xa3)]=_0xb45a14,this['_configService']=_0x1f3c7;let {..._0xdcf65e}=_0x31c2fd({},O,this[_0x3e5b0f(0xcc)]);this[_0x3e5b0f(0xb9)]['setConfig'](_0x3e5b0f(0xcb),_0xdcf65e);}[_0x24acd3(0xbe)](){const _0xb521c4=_0x24acd3;[[j],[M],[D]][_0xb521c4(0x96)](_0x6d6dda=>{const _0x48db2f=_0xb521c4;this[_0x48db2f(0xa3)][_0x48db2f(0xe1)](_0x6d6dda);});}['onReady'](){const _0x24a3b0=_0x24acd3;this['_injector'][_0x24a3b0(0xe5)](M),this[_0x24a3b0(0xa3)]['get'](D);}};I(L,'pluginName',_0x24acd3(0xeb)),I(L,'packageName',x),I(L,_0x24acd3(0xfa),S),L=E([_0x4924db(_0x26a07e,_0x47bbe9,_0x5ccbdc),T(0x1,_0x5da4f4(_0x536f47)),T(0x2,_0x1812ba)],L);export{L as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x30d60c=_0xf7f0;function _0x276b(){const _0x1283fc=['decorate','159246jLOnUU','slice','setConfig','resolveComment','updateComment','subscribe','_initUserSync','map','type','deleteComment','125535dPcwwl','getUser','version','getCurrentUser','find','39033zSMyXx','users','userID','ref','call','Edit','length','commentUpdate$','addComment','0.25.0','dataSource','/add','@univerjs-pro/thread-comment-datasource','2eGweuE','/list','Solved','_injector','values','4zuriKL','_userService','rangeType','336QqltrL','toPrimitive','replyId','21LcAZCn','iterator','YYYY/MM/DD\x20HH:mm','parse','content','onStarting','constructor','comment','forEach','replies','getMemberID','_initDataSource','format','_httpService','/reply','259149ngrAjZ','customRanges','solved','disposeWithMe','/universer-api/user/list','/universer-api/comment/unit/','getUnit','syncUpdateMutationToColla','add','filter','Solve','_threadCommentDataSource','_commentService','createTimestamp','unitId','post','string','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','error','userId','_init','function','132ydDZwC','packageName','requireSession','122769VfUIco','Delete','_configService','user','object','symbol','_threadCommentModel','905760vYWEZW','saveCommentToSnapshot','Add','body','getComment','comments','get','_sessionService','reply','rangeId','defineProperty','code','addUser','personId','_threadCommentDataSourceService','root','payload','/delete','getOwnPropertyDescriptor','121343zpQQAl','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.'];_0x276b=function(){return _0x1283fc;};return _0x276b();}(function(_0x546782,_0x4e807e){const _0x5c7a53=_0xf7f0,_0x48d52b=_0x546782();while(!![]){try{const _0x3ded35=-parseInt(_0x5c7a53(0x1e6))/0x1*(parseInt(_0x5c7a53(0x205))/0x2)+-parseInt(_0x5c7a53(0x1cc))/0x3+parseInt(_0x5c7a53(0x20a))/0x4*(parseInt(_0x5c7a53(0x1f3))/0x5)+-parseInt(_0x5c7a53(0x1e9))/0x6*(-parseInt(_0x5c7a53(0x210))/0x7)+-parseInt(_0x5c7a53(0x20d))/0x8*(parseInt(_0x5c7a53(0x1f8))/0x9)+parseInt(_0x5c7a53(0x1d3))/0xa+parseInt(_0x5c7a53(0x21f))/0xb*(parseInt(_0x5c7a53(0x1c9))/0xc);if(_0x3ded35===_0x4e807e)break;else _0x48d52b['push'](_0x48d52b['shift']());}catch(_0x139f53){_0x48d52b['push'](_0x48d52b['shift']());}}}(_0x276b,0x1add3));import{CollaborationSessionService as _0xcc4a3a,CommentService as _0x420efb,UniverCollaborationClientPlugin as _0x451638}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2f1693}from'@univerjs-pro/license';import{CustomRangeType as _0x159add,DependentOn as _0x440d4c,Disposable as _0xa24c4f,IConfigService as _0x26cff9,Inject as _0xf702a3,Injector as _0x808c4a,Plugin as _0x46bfd6,UserManagerService as _0xf26d74,dateKit as _0xaa0568,merge as _0x538276}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x99cca3}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x5e9acf,CommentUpdateEventType as _0x1dbf30}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x5a65e7,ThreadCommentModel as _0x28efe7}from'@univerjs/thread-comment';import{bufferTime as _0x895c05}from'rxjs';import{HTTPService as _0x284d85}from'@univerjs/network';var x=_0x30d60c(0x204),S=_0x30d60c(0x201);const C=_0x4dc612=>_0xaa0568(new Date(+_0x4dc612))[_0x30d60c(0x21c)](_0x30d60c(0x212)),w=async(_0x15e3e0,_0x2d2519)=>{const _0x11eb53=_0x30d60c;let _0x304971=_0x15e3e0[_0x11eb53(0x1d9)](_0xf26d74),_0x77131f=_0x15e3e0['get'](_0x284d85);_0x2d2519[_0x11eb53(0x218)](_0x30810b=>{const _0x184736=_0x11eb53;_0x304971[_0x184736(0x1f4)](_0x30810b)&&_0x2d2519['delete'](_0x30810b);}),_0x2d2519['size']&&(await _0x77131f[_0x11eb53(0x1d9)](_0x11eb53(0x223),{'params':{'userIDs':[..._0x2d2519]}}))[_0x11eb53(0x1d6)]['users'][_0x11eb53(0x218)](_0x29ca35=>{_0x29ca35&&_0x304971['addUser'](_0x29ca35);});};function T(_0x682ded,_0x32ad75){return function(_0x289587,_0x327335){_0x32ad75(_0x289587,_0x327335,_0x682ded);};}function E(_0xebeac3,_0x2582dd,_0x58b655,_0x4474a3){const _0x1e2f49=_0x30d60c;var _0x137d6e=arguments[_0x1e2f49(0x1fe)],_0x542c8a=_0x137d6e<0x3?_0x2582dd:_0x4474a3===null?_0x4474a3=Object[_0x1e2f49(0x1e5)](_0x2582dd,_0x58b655):_0x4474a3,_0x2921d2;if(typeof Reflect=='object'&&typeof Reflect[_0x1e2f49(0x1e8)]=='function')_0x542c8a=Reflect['decorate'](_0xebeac3,_0x2582dd,_0x58b655,_0x4474a3);else{for(var _0x395ffd=_0xebeac3[_0x1e2f49(0x1fe)]-0x1;_0x395ffd>=0x0;_0x395ffd--)(_0x2921d2=_0xebeac3[_0x395ffd])&&(_0x542c8a=(_0x137d6e<0x3?_0x2921d2(_0x542c8a):_0x137d6e>0x3?_0x2921d2(_0x2582dd,_0x58b655,_0x542c8a):_0x2921d2(_0x2582dd,_0x58b655))||_0x542c8a);}return _0x137d6e>0x3&&_0x542c8a&&Object[_0x1e2f49(0x1dd)](_0x2582dd,_0x58b655,_0x542c8a),_0x542c8a;}let D=class extends _0xa24c4f{constructor(_0x14ae0d,_0x108fb1,_0x4bc47c,_0x15fbbd){const _0x189570=_0x30d60c;super(),this[_0x189570(0x1be)]=_0x14ae0d,this[_0x189570(0x1d2)]=_0x108fb1,this[_0x189570(0x20b)]=_0x4bc47c,this['_injector']=_0x15fbbd,this[_0x189570(0x1c7)](),this[_0x189570(0x1ef)]();}[_0x30d60c(0x1ef)](){const _0x5ac8d1=_0x30d60c;this[_0x5ac8d1(0x222)](this[_0x5ac8d1(0x1d2)]['commentUpdate$']['pipe'](_0x895c05(0x10))[_0x5ac8d1(0x1ee)](_0x1facc8=>{const _0x318853=_0x5ac8d1;let _0x4cb712=new Set();_0x1facc8[_0x318853(0x218)](_0x272fbd=>{const _0x29aa61=_0x318853;switch(_0x272fbd[_0x29aa61(0x1f1)]){case _0x29aa61(0x1ba):{let _0x3ab617=_0x272fbd[_0x29aa61(0x1e3)][_0x29aa61(0x1e0)];_0x4cb712[_0x29aa61(0x1ba)](_0x3ab617);break;}default:break;}}),w(this[_0x318853(0x208)],_0x4cb712);}));}[_0x30d60c(0x1c7)](){const _0x1db72f=_0x30d60c;this[_0x1db72f(0x222)](this[_0x1db72f(0x1be)][_0x1db72f(0x1ff)][_0x1db72f(0x1ee)](async _0x2e3632=>{const _0x231c6=_0x1db72f;var _0x257960;let _0x3f7151=(_0x257960=this['_threadCommentModel'][_0x231c6(0x225)](_0x2e3632[_0x231c6(0x1c0)])['find'](_0x2d0bcd=>_0x2d0bcd[_0x231c6(0x1c4)]===_0x2e3632['threadId']))==null?void 0x0:_0x257960[_0x231c6(0x1e2)];if(!_0x3f7151)return;let {unitId:_0x14b89a,subUnitId:_0x3ac9ad}=_0x3f7151;switch(_0x2e3632[_0x231c6(0x1cf)]&&this['_userService'][_0x231c6(0x1df)](_0x2e3632['user']),_0x2e3632[_0x231c6(0x1f1)]){case _0x1dbf30[_0x231c6(0x1d5)]:break;case _0x1dbf30['Reply']:var _0x4c7292,_0xb26eca;this['_threadCommentModel'][_0x231c6(0x200)](_0x14b89a,_0x3ac9ad,{'unitId':_0x14b89a,'subUnitId':_0x3ac9ad,'ref':'','id':_0x2e3632[_0x231c6(0x20f)],'dT':C(+_0x2e3632[_0x231c6(0x1bf)]),'threadId':_0x2e3632[_0x231c6(0x1c4)],'personId':(_0x4c7292=(_0xb26eca=_0x2e3632[_0x231c6(0x1cf)])==null?void 0x0:_0xb26eca[_0x231c6(0x1fa)])==null?_0x2e3632[_0x231c6(0x1c6)]:_0x4c7292,'text':JSON[_0x231c6(0x213)](_0x2e3632[_0x231c6(0x214)]),'parentId':_0x3f7151['id']});break;case _0x1dbf30[_0x231c6(0x1cd)]:{let _0x597914=this['_threadCommentModel'][_0x231c6(0x1d7)](_0x14b89a,_0x3ac9ad,_0x2e3632['replyId']);_0x597914&&_0x597914['parentId']&&this[_0x231c6(0x1d2)][_0x231c6(0x1f2)](_0x14b89a,_0x3ac9ad,_0x2e3632['replyId']);break;}case _0x1dbf30[_0x231c6(0x1fd)]:this[_0x231c6(0x1d2)]['updateComment'](_0x14b89a,_0x3ac9ad,{'commentId':_0x2e3632[_0x231c6(0x20f)],'text':JSON[_0x231c6(0x213)](_0x2e3632[_0x231c6(0x214)])});break;case _0x1dbf30[_0x231c6(0x1bc)]:{var _0x28a9d5;let _0x2cf047=(_0x28a9d5=this['_threadCommentModel'][_0x231c6(0x225)](_0x2e3632[_0x231c6(0x1c0)])[_0x231c6(0x1f7)](_0x2693da=>_0x2693da['threadId']===_0x2e3632[_0x231c6(0x1c4)]))==null?void 0x0:_0x28a9d5['root'];_0x2cf047&&this[_0x231c6(0x1d2)][_0x231c6(0x1ec)](_0x14b89a,_0x3ac9ad,_0x2cf047['id'],_0x2e3632[_0x231c6(0x221)]===_0x5e9acf['Solved']);break;}default:break;}}));}};D=E([T(0x0,_0xf702a3(_0x420efb)),T(0x1,_0xf702a3(_0x28efe7)),T(0x2,_0xf702a3(_0xf26d74)),T(0x3,_0xf702a3(_0x808c4a))],D);const O={};function k(_0x41b4bc,_0x5185a0){const _0x38971d=_0x30d60c;let _0x16a15a=_0x41b4bc[_0x38971d(0x219)][0x0];return{..._0x5185a0,'id':_0x16a15a['replyId'],'resolved':_0x41b4bc[_0x38971d(0x221)]===0x1,'dT':C(_0x16a15a['createTimestamp']),'personId':_0x16a15a[_0x38971d(0x1c6)],'threadId':_0x16a15a['threadId']};}function A(_0x2bf69d,_0x29badf,_0x2d2d94){const _0x3e5c22=_0x30d60c;var _0x2385d9,_0x5dd7d2;if(((_0x2385d9=_0x2bf69d==null||(_0x5dd7d2=_0x2bf69d[_0x3e5c22(0x219)])==null?void 0x0:_0x5dd7d2[_0x3e5c22(0x1fe)])==null?0x0:_0x2385d9)>0x0){let _0x344250=(_0x3c83b0,_0x35781f)=>({'id':_0x3c83b0[_0x3e5c22(0x20f)],'threadId':_0x3c83b0[_0x3e5c22(0x1c4)],'dT':C(_0x3c83b0[_0x3e5c22(0x1bf)]),'personId':_0x3c83b0[_0x3e5c22(0x1c6)],'resolved':_0x2bf69d['solved']===_0x5e9acf[_0x3e5c22(0x207)],'unitId':_0x29badf,'subUnitId':_0x2d2d94,'text':JSON['parse'](_0x3c83b0[_0x3e5c22(0x214)]),'parentId':_0x35781f}),_0xa4a4ed=_0x344250(_0x2bf69d[_0x3e5c22(0x219)][0x0]);return{..._0xa4a4ed,'children':_0x2bf69d[_0x3e5c22(0x219)][_0x3e5c22(0x1ea)](0x1)[_0x3e5c22(0x1f0)](_0x4f19d0=>_0x344250(_0x4f19d0,_0xa4a4ed['id']))};}return null;}let j=class{constructor(_0x477e73,_0x587d13,_0x1c8308){const _0x3b4601=_0x30d60c;this[_0x3b4601(0x21d)]=_0x477e73,this[_0x3b4601(0x20b)]=_0x587d13,this[_0x3b4601(0x1da)]=_0x1c8308;}async['addComment'](_0x3c21bb){const _0x374386=_0x30d60c;var _0x53fbae,_0x18cfeb;let {parentId:_0x2e27db,unitId:_0x5e713e,text:_0x3bb652,threadId:_0x33684d}=_0x3c21bb,_0x242767=(_0x53fbae=(_0x18cfeb=_0x3bb652[_0x374386(0x220)])==null?void 0x0:_0x18cfeb[_0x374386(0x1bb)](_0x11751b=>_0x11751b[_0x374386(0x20c)]===_0x159add['COMMENT'])['map'](_0x4392e0=>_0x4392e0[_0x374386(0x1dc)]))==null?[]:_0x53fbae,_0x34217c=JSON['stringify'](_0x3bb652),_0x425a10=(await this[_0x374386(0x1da)][_0x374386(0x1cb)](_0x5e713e))['getMemberID']();if(_0x2e27db){let _0x471179={'memberId':_0x425a10,'unitId':_0x5e713e,'content':_0x34217c,'mention':_0x242767,'threadId':_0x33684d},_0x319f6b=(await this[_0x374386(0x21d)][_0x374386(0x1c1)](_0x374386(0x224)+_0x5e713e+_0x374386(0x21e),{'body':_0x471179}))['body'][_0x374386(0x1db)];return{..._0x3c21bb,'id':_0x319f6b['replyId'],'dT':_0xaa0568(+_0x319f6b[_0x374386(0x1bf)])[_0x374386(0x21c)](_0x374386(0x212)),'personId':_0x319f6b[_0x374386(0x1c6)]};}else{let _0x57a484={'memberId':_0x425a10,'unitId':_0x5e713e,'content':_0x34217c,'mention':_0x242767};return k((await this[_0x374386(0x21d)][_0x374386(0x1c1)]('/universer-api/comment/unit/'+_0x5e713e+_0x374386(0x203),{'body':_0x57a484}))[_0x374386(0x1d6)][_0x374386(0x217)],_0x3c21bb);}}async[_0x30d60c(0x1ed)](_0x157104){const _0x20a809=_0x30d60c;var _0x5425ce,_0xee7973;let {text:_0x5e22b9,unitId:_0x29942a}=_0x157104,_0x2ea2f1=(_0x5425ce=(_0xee7973=_0x5e22b9[_0x20a809(0x220)])==null?void 0x0:_0xee7973[_0x20a809(0x1bb)](_0x337435=>_0x337435['rangeType']===_0x159add['COMMENT'])[_0x20a809(0x1f0)](_0x19520c=>_0x19520c[_0x20a809(0x1dc)]))==null?[]:_0x5425ce,_0x12ce13=JSON['stringify'](_0x5e22b9),_0x556d5d=_0x157104['threadId'],_0x1d48d3=_0x157104['id'],_0x3ea600={'memberId':(await this['_sessionService'][_0x20a809(0x1cb)](_0x29942a))[_0x20a809(0x21a)](),'unitId':_0x29942a,'threadId':_0x556d5d,'mention':_0x2ea2f1,'content':_0x12ce13,'replyId':_0x1d48d3},_0x299949=await this[_0x20a809(0x21d)][_0x20a809(0x1c1)](_0x20a809(0x224)+_0x29942a+'/edit',{'body':_0x3ea600});return!_0x299949['body'][_0x20a809(0x1c5)]||_0x299949[_0x20a809(0x1d6)][_0x20a809(0x1c5)][_0x20a809(0x1de)]===0x1;}async[_0x30d60c(0x1ec)](_0x3103c5){const _0x251703=_0x30d60c;let {unitId:_0x2ca0cc}=_0x3103c5,_0xe0ddc9=_0x3103c5[_0x251703(0x1c4)],_0x5a8ceb={'memberId':this[_0x251703(0x20b)][_0x251703(0x1f6)]()[_0x251703(0x1fa)],'unitId':_0x2ca0cc,'threadId':_0xe0ddc9,'solved':_0x3103c5['resolved']?_0x5e9acf[_0x251703(0x207)]:_0x5e9acf['OpenOrReOpen']},_0x4f4527=await this['_httpService']['post'](_0x251703(0x224)+_0x2ca0cc+'/solved',{'body':_0x5a8ceb});return!_0x4f4527['body'][_0x251703(0x1c5)]||_0x4f4527[_0x251703(0x1d6)][_0x251703(0x1c5)]['code']===0x1;}async[_0x30d60c(0x1f2)](_0x504aca,_0x3e4b6c,_0x476943,_0x1e4563){const _0x5c58c9=_0x30d60c;let _0x310357={'memberId':(await this[_0x5c58c9(0x1da)][_0x5c58c9(0x1cb)](_0x504aca))[_0x5c58c9(0x21a)](),'threadId':_0x476943,'replyId':_0x1e4563,'unitId':_0x504aca},_0x4e1036=await this[_0x5c58c9(0x21d)][_0x5c58c9(0x1c1)](_0x5c58c9(0x224)+_0x504aca+_0x5c58c9(0x1e4),{'body':_0x310357});return!_0x4e1036[_0x5c58c9(0x1d6)][_0x5c58c9(0x1c5)]||_0x4e1036['body'][_0x5c58c9(0x1c5)][_0x5c58c9(0x1de)]===0x1;}async['listComments'](_0x291c84,_0xfb981d,_0x1bac2){const _0x3e301c=_0x30d60c;let _0x46861c={'unitId':_0x291c84,'threadId':_0x1bac2},_0x526536=await this['_httpService'][_0x3e301c(0x1c1)]('/universer-api/comment/unit/'+_0x291c84+_0x3e301c(0x206),{'body':_0x46861c}),_0x369d75=_0x1bac2[_0x3e301c(0x1f0)](_0x4fd42e=>A(_0x526536[_0x3e301c(0x1d6)][_0x3e301c(0x1d8)][_0x4fd42e],_0x291c84,_0xfb981d))['filter'](Boolean);return Object[_0x3e301c(0x209)](_0x526536[_0x3e301c(0x1d6)][_0x3e301c(0x1f9)])[_0x3e301c(0x218)](_0x131fcc=>{const _0x424fda=_0x3e301c;this['_userService'][_0x424fda(0x1df)](_0x131fcc);}),_0x369d75;}[_0x30d60c(0x1d4)](_0x2bb987){const _0x3f0cdd=_0x30d60c;return{'id':_0x2bb987['id'],'threadId':_0x2bb987[_0x3f0cdd(0x1c4)],'ref':_0x2bb987[_0x3f0cdd(0x1fb)]};}};j=E([T(0x0,_0xf702a3(_0x284d85)),T(0x1,_0xf702a3(_0xf26d74)),T(0x2,_0xf702a3(_0xcc4a3a))],j);function _0xf7f0(_0x38dd1e,_0x50e1d6){_0x38dd1e=_0x38dd1e-0x1b9;const _0x276b79=_0x276b();let _0xf7f099=_0x276b79[_0x38dd1e];return _0xf7f099;}let M=class extends _0xa24c4f{constructor(_0x484ec2,_0x4a2488){const _0xab65db=_0x30d60c;super(),this[_0xab65db(0x1e1)]=_0x484ec2,this[_0xab65db(0x1bd)]=_0x4a2488,this[_0xab65db(0x21b)]();}[_0x30d60c(0x21b)](){const _0x4f638b=_0x30d60c;this[_0x4f638b(0x1e1)][_0x4f638b(0x202)]=this[_0x4f638b(0x1bd)],this[_0x4f638b(0x1e1)][_0x4f638b(0x1b9)]=!0x1;}};M=E([T(0x0,_0x5a65e7),T(0x1,_0xf702a3(j))],M);function N(_0x4a8424){'@babel/helpers - typeof';const _0x43e7c3=_0x30d60c;return N=typeof Symbol==_0x43e7c3(0x1c8)&&typeof Symbol[_0x43e7c3(0x211)]==_0x43e7c3(0x1d1)?function(_0x2affef){return typeof _0x2affef;}:function(_0x5b9ecd){const _0x479014=_0x43e7c3;return _0x5b9ecd&&typeof Symbol==_0x479014(0x1c8)&&_0x5b9ecd[_0x479014(0x216)]===Symbol&&_0x5b9ecd!==Symbol['prototype']?_0x479014(0x1d1):typeof _0x5b9ecd;},N(_0x4a8424);}function P(_0x5abe03,_0x605251){const _0x200f00=_0x30d60c;if(N(_0x5abe03)!=_0x200f00(0x1d0)||!_0x5abe03)return _0x5abe03;var _0x458993=_0x5abe03[Symbol[_0x200f00(0x20e)]];if(_0x458993!==void 0x0){var _0x4f4e51=_0x458993[_0x200f00(0x1fc)](_0x5abe03,_0x605251||'default');if(N(_0x4f4e51)!=_0x200f00(0x1d0))return _0x4f4e51;throw TypeError(_0x200f00(0x1e7));}return(_0x605251===_0x200f00(0x1c2)?String:Number)(_0x5abe03);}function F(_0x87ed8){const _0x169284=_0x30d60c;var _0x5527bc=P(_0x87ed8,_0x169284(0x1c2));return N(_0x5527bc)==_0x169284(0x1d1)?_0x5527bc:_0x5527bc+'';}function I(_0x4bba1a,_0xf8f16d,_0x5f2a31){const _0x43d2a7=_0x30d60c;return(_0xf8f16d=F(_0xf8f16d))in _0x4bba1a?Object[_0x43d2a7(0x1dd)](_0x4bba1a,_0xf8f16d,{'value':_0x5f2a31,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4bba1a[_0xf8f16d]=_0x5f2a31,_0x4bba1a;}let L=class extends _0x46bfd6{constructor(_0x2704e7=O,_0x40c90c,_0x6f89f){const _0x66b0c3=_0x30d60c;super(),this['_config']=_0x2704e7,this[_0x66b0c3(0x208)]=_0x40c90c,this[_0x66b0c3(0x1ce)]=_0x6f89f;let {..._0x168a8}=_0x538276({},O,this['_config']);this[_0x66b0c3(0x1ce)][_0x66b0c3(0x1eb)]('thread-comment-data-source.config',_0x168a8);}[_0x30d60c(0x215)](){const _0x42c603=_0x30d60c;[[j],[M],[D]][_0x42c603(0x218)](_0x22323f=>{this['_injector']['add'](_0x22323f);});}['onReady'](){const _0x44d48a=_0x30d60c;this[_0x44d48a(0x208)][_0x44d48a(0x1d9)](M),this['_injector']['get'](D);}};I(L,'pluginName',_0x30d60c(0x1c3)),I(L,_0x30d60c(0x1ca),x),I(L,_0x30d60c(0x1f5),S),L=E([_0x440d4c(_0x99cca3,_0x451638,_0x2f1693),T(0x1,_0xf702a3(_0x808c4a)),T(0x2,_0x26cff9)],L);export{L as UniverThreadCommentDataSourcePlugin};
1
+ const _0x24acd3=_0x39e8;(function(_0x2a93d6,_0x3a5e4b){const _0x2314c8=_0x39e8,_0x5c9a6c=_0x2a93d6();while(!![]){try{const _0x5c82ff=parseInt(_0x2314c8(0xa6))/0x1*(-parseInt(_0x2314c8(0xf2))/0x2)+-parseInt(_0x2314c8(0xab))/0x3+parseInt(_0x2314c8(0xbd))/0x4+-parseInt(_0x2314c8(0xfb))/0x5*(parseInt(_0x2314c8(0xa2))/0x6)+-parseInt(_0x2314c8(0xbb))/0x7*(-parseInt(_0x2314c8(0xaf))/0x8)+parseInt(_0x2314c8(0xb6))/0x9+parseInt(_0x2314c8(0xd8))/0xa;if(_0x5c82ff===_0x3a5e4b)break;else _0x5c9a6c['push'](_0x5c9a6c['shift']());}catch(_0x592f1a){_0x5c9a6c['push'](_0x5c9a6c['shift']());}}}(_0x54e5,0x205de));import{CollaborationSessionService as _0x549419,CommentService as _0x210ea5,UniverCollaborationClientPlugin as _0x47bbe9}from'@univerjs-pro/collaboration-client';function _0x39e8(_0x3a7771,_0x563b8e){_0x3a7771=_0x3a7771-0x92;const _0x54e582=_0x54e5();let _0x39e896=_0x54e582[_0x3a7771];return _0x39e896;}import{UniverLicensePlugin as _0x5ccbdc}from'@univerjs-pro/license';import{CustomRangeType as _0x55bffa,DependentOn as _0x4924db,Disposable as _0x342d50,IConfigService as _0x1812ba,Inject as _0x5da4f4,Injector as _0x536f47,Plugin as _0x31f5c5,UserManagerService as _0x45ef85,dateKit as _0x4abfbd,merge as _0x31c2fd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x26a07e}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x4f3934,CommentUpdateEventType as _0x53a39d}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x448d8f,ThreadCommentModel as _0x3b0840}from'@univerjs/thread-comment';import{bufferTime as _0x306e76}from'rxjs';import{HTTPService as _0x4b97da}from'@univerjs/network';var x=_0x24acd3(0xc1),S=_0x24acd3(0xf5);const C=_0x291d0e=>_0x4abfbd(new Date(+_0x291d0e))[_0x24acd3(0xe6)](_0x24acd3(0xda)),w=async(_0x12b975,_0x5c229e)=>{const _0x7c3f2c=_0x24acd3;let _0x195174=_0x12b975['get'](_0x45ef85),_0x32b62d=_0x12b975[_0x7c3f2c(0xe5)](_0x4b97da);_0x5c229e['forEach'](_0x26510a=>{const _0x2d9438=_0x7c3f2c;_0x195174[_0x2d9438(0xf8)](_0x26510a)&&_0x5c229e['delete'](_0x26510a);}),_0x5c229e[_0x7c3f2c(0xdc)]&&(await _0x32b62d[_0x7c3f2c(0xe5)](_0x7c3f2c(0xf6),{'params':{'userIDs':[..._0x5c229e]}}))['body'][_0x7c3f2c(0xdb)][_0x7c3f2c(0x96)](_0x54a051=>{_0x54a051&&_0x195174['addUser'](_0x54a051);});};function T(_0x3f5c2c,_0x1d1bda){return function(_0x27ab11,_0x5d2b8d){_0x1d1bda(_0x27ab11,_0x5d2b8d,_0x3f5c2c);};}function E(_0x3b8efa,_0x39d806,_0xd72a11,_0x17dfcf){const _0x3c62a8=_0x24acd3;var _0xcdd043=arguments[_0x3c62a8(0x94)],_0x32d010=_0xcdd043<0x3?_0x39d806:_0x17dfcf===null?_0x17dfcf=Object['getOwnPropertyDescriptor'](_0x39d806,_0xd72a11):_0x17dfcf,_0x510d0f;if(typeof Reflect==_0x3c62a8(0xb7)&&typeof Reflect[_0x3c62a8(0xee)]==_0x3c62a8(0xf4))_0x32d010=Reflect[_0x3c62a8(0xee)](_0x3b8efa,_0x39d806,_0xd72a11,_0x17dfcf);else{for(var _0xb49db=_0x3b8efa[_0x3c62a8(0x94)]-0x1;_0xb49db>=0x0;_0xb49db--)(_0x510d0f=_0x3b8efa[_0xb49db])&&(_0x32d010=(_0xcdd043<0x3?_0x510d0f(_0x32d010):_0xcdd043>0x3?_0x510d0f(_0x39d806,_0xd72a11,_0x32d010):_0x510d0f(_0x39d806,_0xd72a11))||_0x32d010);}return _0xcdd043>0x3&&_0x32d010&&Object['defineProperty'](_0x39d806,_0xd72a11,_0x32d010),_0x32d010;}let D=class extends _0x342d50{constructor(_0x5d165f,_0x2bff6f,_0x773819,_0x6df37b){const _0xc08f54=_0x24acd3;super(),this[_0xc08f54(0xa1)]=_0x5d165f,this[_0xc08f54(0x9b)]=_0x2bff6f,this[_0xc08f54(0xd0)]=_0x773819,this['_injector']=_0x6df37b,this[_0xc08f54(0xa5)](),this[_0xc08f54(0xce)]();}[_0x24acd3(0xce)](){const _0x258172=_0x24acd3;this['disposeWithMe'](this[_0x258172(0x9b)]['commentUpdate$'][_0x258172(0xd1)](_0x306e76(0x10))[_0x258172(0xba)](_0x355dc7=>{const _0x39ae22=_0x258172;let _0x55d635=new Set();_0x355dc7[_0x39ae22(0x96)](_0x4cc324=>{const _0x1b923b=_0x39ae22;switch(_0x4cc324[_0x1b923b(0xcd)]){case _0x1b923b(0xe1):{let _0x20a06a=_0x4cc324[_0x1b923b(0xc3)][_0x1b923b(0xe7)];_0x55d635['add'](_0x20a06a);break;}default:break;}}),w(this[_0x39ae22(0xa3)],_0x55d635);}));}[_0x24acd3(0xa5)](){const _0x3b69aa=_0x24acd3;this[_0x3b69aa(0xe0)](this['_commentService'][_0x3b69aa(0xdf)][_0x3b69aa(0xba)](async _0x1d7362=>{const _0x42494a=_0x3b69aa;var _0x1d6c46;let _0x2aec70=(_0x1d6c46=this[_0x42494a(0x9b)][_0x42494a(0xf7)](_0x1d7362[_0x42494a(0xd4)])['find'](_0xe9a3d6=>_0xe9a3d6[_0x42494a(0xb1)]===_0x1d7362[_0x42494a(0xb1)]))==null?void 0x0:_0x1d6c46[_0x42494a(0xb8)];if(!_0x2aec70)return;let {unitId:_0x4692b9,subUnitId:_0x56df8a}=_0x2aec70;switch(_0x1d7362['user']&&this['_userService'][_0x42494a(0xd5)](_0x1d7362['user']),_0x1d7362[_0x42494a(0xcd)]){case _0x53a39d['Add']:break;case _0x53a39d[_0x42494a(0xa8)]:var _0x1eaa59,_0x2d595b;this['_threadCommentModel'][_0x42494a(0xa0)](_0x4692b9,_0x56df8a,{'unitId':_0x4692b9,'subUnitId':_0x56df8a,'ref':'','id':_0x1d7362[_0x42494a(0xe4)],'dT':C(+_0x1d7362[_0x42494a(0xe2)]),'threadId':_0x1d7362[_0x42494a(0xb1)],'personId':(_0x1eaa59=(_0x2d595b=_0x1d7362[_0x42494a(0xbc)])==null?void 0x0:_0x2d595b['userID'])==null?_0x1d7362[_0x42494a(0x9d)]:_0x1eaa59,'text':JSON['parse'](_0x1d7362['content']),'parentId':_0x2aec70['id']});break;case _0x53a39d['Delete']:{let _0x5995c6=this[_0x42494a(0x9b)][_0x42494a(0xf9)](_0x4692b9,_0x56df8a,_0x1d7362[_0x42494a(0xe4)]);_0x5995c6&&_0x5995c6[_0x42494a(0xc8)]&&this[_0x42494a(0x9b)][_0x42494a(0xd6)](_0x4692b9,_0x56df8a,_0x1d7362[_0x42494a(0xe4)]);break;}case _0x53a39d[_0x42494a(0xec)]:this[_0x42494a(0x9b)][_0x42494a(0xef)](_0x4692b9,_0x56df8a,{'commentId':_0x1d7362[_0x42494a(0xe4)],'text':JSON[_0x42494a(0xde)](_0x1d7362[_0x42494a(0xc5)])});break;case _0x53a39d[_0x42494a(0xac)]:{var _0x130222;let _0x3a8a1f=(_0x130222=this[_0x42494a(0x9b)][_0x42494a(0xf7)](_0x1d7362['unitId'])[_0x42494a(0xc9)](_0x2f5f2d=>_0x2f5f2d['threadId']===_0x1d7362[_0x42494a(0xb1)]))==null?void 0x0:_0x130222[_0x42494a(0xb8)];_0x3a8a1f&&this[_0x42494a(0x9b)][_0x42494a(0xc0)](_0x4692b9,_0x56df8a,_0x3a8a1f['id'],_0x1d7362[_0x42494a(0x95)]===_0x4f3934[_0x42494a(0xc2)]);break;}default:break;}}));}};D=E([T(0x0,_0x5da4f4(_0x210ea5)),T(0x1,_0x5da4f4(_0x3b0840)),T(0x2,_0x5da4f4(_0x45ef85)),T(0x3,_0x5da4f4(_0x536f47))],D);const O={};function k(_0x3d90b7,_0x1871aa){const _0xad39ce=_0x24acd3;let _0x53dc2d=_0x3d90b7[_0xad39ce(0xe8)][0x0];return{..._0x1871aa,'id':_0x53dc2d[_0xad39ce(0xe4)],'resolved':_0x3d90b7[_0xad39ce(0x95)]===0x1,'dT':C(_0x53dc2d[_0xad39ce(0xe2)]),'personId':_0x53dc2d[_0xad39ce(0x9d)],'threadId':_0x53dc2d[_0xad39ce(0xb1)]};}function A(_0x6b217b,_0x3df929,_0x1f19eb){const _0x35a93a=_0x24acd3;var _0x36d169,_0x41f264;if(((_0x36d169=_0x6b217b==null||(_0x41f264=_0x6b217b[_0x35a93a(0xe8)])==null?void 0x0:_0x41f264[_0x35a93a(0x94)])==null?0x0:_0x36d169)>0x0){let _0x1a2cd1=(_0x571c82,_0x51870b)=>({'id':_0x571c82['replyId'],'threadId':_0x571c82[_0x35a93a(0xb1)],'dT':C(_0x571c82[_0x35a93a(0xe2)]),'personId':_0x571c82[_0x35a93a(0x9d)],'resolved':_0x6b217b[_0x35a93a(0x95)]===_0x4f3934[_0x35a93a(0xc2)],'unitId':_0x3df929,'subUnitId':_0x1f19eb,'text':JSON[_0x35a93a(0xde)](_0x571c82[_0x35a93a(0xc5)]),'parentId':_0x51870b}),_0x3deb14=_0x1a2cd1(_0x6b217b[_0x35a93a(0xe8)][0x0]);return{..._0x3deb14,'children':_0x6b217b[_0x35a93a(0xe8)][_0x35a93a(0xc4)](0x1)[_0x35a93a(0xae)](_0x11ef58=>_0x1a2cd1(_0x11ef58,_0x3deb14['id']))};}return null;}function _0x54e5(){const _0x291d64=['resolveComment','@univerjs-pro/thread-comment-datasource','Solved','payload','slice','content','prototype','post','parentId','find','toPrimitive','thread-comment-data-source.config','_config','type','_initUserSync','comment','_userService','pipe','error','userID','unitId','addUser','deleteComment','_sessionService','2729650IZCrsf','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','users','size','string','parse','commentUpdate$','disposeWithMe','add','createTimestamp','constructor','replyId','get','format','personId','replies','symbol','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','customRanges','decorate','updateComment','/edit','rangeType','68462ezTOLe','COMMENT','function','0.25.1','/universer-api/user/list','getUnit','getUser','getComment','version','10xDAXSM','stringify','_initDataSource','OpenOrReOpen','length','solved','forEach','default','defineProperty','filter','/list','_threadCommentModel','call','userId','body','code','addComment','_commentService','502392ZiELDC','_injector','getMemberID','_init','7WNrAMk','iterator','Reply','saveCommentToSnapshot','/delete','581988RiDhoI','Solve','syncUpdateMutationToColla','map','1815640KzmUrH','rangeId','threadId','ref','_threadCommentDataSource','/reply','_threadCommentDataSourceService','752571mmrUtg','object','root','_configService','subscribe','7DxmBJg','user','600448bcBhdL','onStarting','requireSession'];_0x54e5=function(){return _0x291d64;};return _0x54e5();}let j=class{constructor(_0x200ec5,_0x4779c1,_0x3b55e4){const _0x48e10e=_0x24acd3;this[_0x48e10e(0xea)]=_0x200ec5,this[_0x48e10e(0xd0)]=_0x4779c1,this[_0x48e10e(0xd7)]=_0x3b55e4;}async[_0x24acd3(0xa0)](_0x3185a4){const _0x29185d=_0x24acd3;var _0x408b88,_0x592d01;let {parentId:_0x3785f9,unitId:_0x4a4570,text:_0x4d4cdb,threadId:_0x365890}=_0x3185a4,_0x4c0730=(_0x408b88=(_0x592d01=_0x4d4cdb['customRanges'])==null?void 0x0:_0x592d01[_0x29185d(0x99)](_0xaa1f4=>_0xaa1f4[_0x29185d(0xf1)]===_0x55bffa[_0x29185d(0xf3)])[_0x29185d(0xae)](_0x31784d=>_0x31784d[_0x29185d(0xb0)]))==null?[]:_0x408b88,_0x4a9488=JSON[_0x29185d(0xfc)](_0x4d4cdb),_0xc5dad9=(await this[_0x29185d(0xd7)][_0x29185d(0xbf)](_0x4a4570))['getMemberID']();if(_0x3785f9){let _0x3a55eb={'memberId':_0xc5dad9,'unitId':_0x4a4570,'content':_0x4a9488,'mention':_0x4c0730,'threadId':_0x365890},_0x40f120=(await this[_0x29185d(0xea)][_0x29185d(0xc7)](_0x29185d(0xd9)+_0x4a4570+_0x29185d(0xb4),{'body':_0x3a55eb}))[_0x29185d(0x9e)]['reply'];return{..._0x3185a4,'id':_0x40f120[_0x29185d(0xe4)],'dT':_0x4abfbd(+_0x40f120[_0x29185d(0xe2)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x40f120[_0x29185d(0x9d)]};}else{let _0x2883fc={'memberId':_0xc5dad9,'unitId':_0x4a4570,'content':_0x4a9488,'mention':_0x4c0730};return k((await this[_0x29185d(0xea)][_0x29185d(0xc7)](_0x29185d(0xd9)+_0x4a4570+'/add',{'body':_0x2883fc}))[_0x29185d(0x9e)][_0x29185d(0xcf)],_0x3185a4);}}async[_0x24acd3(0xef)](_0x533cb7){const _0xd153f7=_0x24acd3;var _0x558b51,_0x5ebd5d;let {text:_0x116f99,unitId:_0xba2143}=_0x533cb7,_0x2c8ad9=(_0x558b51=(_0x5ebd5d=_0x116f99[_0xd153f7(0xed)])==null?void 0x0:_0x5ebd5d[_0xd153f7(0x99)](_0x57d374=>_0x57d374[_0xd153f7(0xf1)]===_0x55bffa['COMMENT'])[_0xd153f7(0xae)](_0x426074=>_0x426074[_0xd153f7(0xb0)]))==null?[]:_0x558b51,_0x3faed3=JSON[_0xd153f7(0xfc)](_0x116f99),_0x3d03be=_0x533cb7[_0xd153f7(0xb1)],_0x322b41=_0x533cb7['id'],_0x552043={'memberId':(await this[_0xd153f7(0xd7)][_0xd153f7(0xbf)](_0xba2143))[_0xd153f7(0xa4)](),'unitId':_0xba2143,'threadId':_0x3d03be,'mention':_0x2c8ad9,'content':_0x3faed3,'replyId':_0x322b41},_0x30f023=await this[_0xd153f7(0xea)]['post'](_0xd153f7(0xd9)+_0xba2143+_0xd153f7(0xf0),{'body':_0x552043});return!_0x30f023[_0xd153f7(0x9e)][_0xd153f7(0xd2)]||_0x30f023[_0xd153f7(0x9e)][_0xd153f7(0xd2)][_0xd153f7(0x9f)]===0x1;}async[_0x24acd3(0xc0)](_0x30ad4f){const _0x1afcca=_0x24acd3;let {unitId:_0x44f50e}=_0x30ad4f,_0x4e435c=_0x30ad4f[_0x1afcca(0xb1)],_0x3adaa4={'memberId':this['_userService']['getCurrentUser']()[_0x1afcca(0xd3)],'unitId':_0x44f50e,'threadId':_0x4e435c,'solved':_0x30ad4f['resolved']?_0x4f3934[_0x1afcca(0xc2)]:_0x4f3934[_0x1afcca(0x93)]},_0x3e7a49=await this[_0x1afcca(0xea)][_0x1afcca(0xc7)](_0x1afcca(0xd9)+_0x44f50e+'/solved',{'body':_0x3adaa4});return!_0x3e7a49['body'][_0x1afcca(0xd2)]||_0x3e7a49['body'][_0x1afcca(0xd2)][_0x1afcca(0x9f)]===0x1;}async[_0x24acd3(0xd6)](_0x5ee32f,_0x448583,_0xc8e4f8,_0x26451f){const _0x33fc85=_0x24acd3;let _0x4d73d3={'memberId':(await this[_0x33fc85(0xd7)]['requireSession'](_0x5ee32f))['getMemberID'](),'threadId':_0xc8e4f8,'replyId':_0x26451f,'unitId':_0x5ee32f},_0x19fb06=await this[_0x33fc85(0xea)][_0x33fc85(0xc7)]('/universer-api/comment/unit/'+_0x5ee32f+_0x33fc85(0xaa),{'body':_0x4d73d3});return!_0x19fb06[_0x33fc85(0x9e)]['error']||_0x19fb06['body'][_0x33fc85(0xd2)]['code']===0x1;}async['listComments'](_0xad7b9,_0x59a0fd,_0x32bb0b){const _0x2b9c76=_0x24acd3;let _0x299530={'unitId':_0xad7b9,'threadId':_0x32bb0b},_0x5b42da=await this[_0x2b9c76(0xea)][_0x2b9c76(0xc7)](_0x2b9c76(0xd9)+_0xad7b9+_0x2b9c76(0x9a),{'body':_0x299530}),_0xa566de=_0x32bb0b[_0x2b9c76(0xae)](_0x574020=>A(_0x5b42da[_0x2b9c76(0x9e)]['comments'][_0x574020],_0xad7b9,_0x59a0fd))[_0x2b9c76(0x99)](Boolean);return Object['values'](_0x5b42da['body'][_0x2b9c76(0xdb)])['forEach'](_0x31939f=>{const _0x13461e=_0x2b9c76;this[_0x13461e(0xd0)][_0x13461e(0xd5)](_0x31939f);}),_0xa566de;}[_0x24acd3(0xa9)](_0x4c9a21){const _0x2d9b42=_0x24acd3;return{'id':_0x4c9a21['id'],'threadId':_0x4c9a21[_0x2d9b42(0xb1)],'ref':_0x4c9a21[_0x2d9b42(0xb2)]};}};j=E([T(0x0,_0x5da4f4(_0x4b97da)),T(0x1,_0x5da4f4(_0x45ef85)),T(0x2,_0x5da4f4(_0x549419))],j);let M=class extends _0x342d50{constructor(_0x1c5125,_0x3b1865){const _0x439b07=_0x24acd3;super(),this[_0x439b07(0xb5)]=_0x1c5125,this[_0x439b07(0xb3)]=_0x3b1865,this[_0x439b07(0x92)]();}[_0x24acd3(0x92)](){const _0x3cacf2=_0x24acd3;this[_0x3cacf2(0xb5)]['dataSource']=this['_threadCommentDataSource'],this[_0x3cacf2(0xb5)][_0x3cacf2(0xad)]=!0x1;}};M=E([T(0x0,_0x448d8f),T(0x1,_0x5da4f4(j))],M);function N(_0x3209ad){'@babel/helpers - typeof';const _0x408d7c=_0x24acd3;return N=typeof Symbol==_0x408d7c(0xf4)&&typeof Symbol[_0x408d7c(0xa7)]=='symbol'?function(_0x452f1c){return typeof _0x452f1c;}:function(_0x854b23){const _0x519483=_0x408d7c;return _0x854b23&&typeof Symbol==_0x519483(0xf4)&&_0x854b23[_0x519483(0xe3)]===Symbol&&_0x854b23!==Symbol[_0x519483(0xc6)]?'symbol':typeof _0x854b23;},N(_0x3209ad);}function P(_0xeb782,_0x2d8502){const _0x48f160=_0x24acd3;if(N(_0xeb782)!='object'||!_0xeb782)return _0xeb782;var _0x578782=_0xeb782[Symbol[_0x48f160(0xca)]];if(_0x578782!==void 0x0){var _0x5df045=_0x578782[_0x48f160(0x9c)](_0xeb782,_0x2d8502||_0x48f160(0x97));if(N(_0x5df045)!=_0x48f160(0xb7))return _0x5df045;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2d8502==='string'?String:Number)(_0xeb782);}function F(_0x5cd295){const _0x4b95d5=_0x24acd3;var _0x2928a9=P(_0x5cd295,_0x4b95d5(0xdd));return N(_0x2928a9)==_0x4b95d5(0xe9)?_0x2928a9:_0x2928a9+'';}function I(_0x1b0afa,_0x2d6d8c,_0x97eb01){const _0x16ef3=_0x24acd3;return(_0x2d6d8c=F(_0x2d6d8c))in _0x1b0afa?Object[_0x16ef3(0x98)](_0x1b0afa,_0x2d6d8c,{'value':_0x97eb01,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1b0afa[_0x2d6d8c]=_0x97eb01,_0x1b0afa;}let L=class extends _0x31f5c5{constructor(_0x542cc7=O,_0xb45a14,_0x1f3c7){const _0x3e5b0f=_0x24acd3;super(),this[_0x3e5b0f(0xcc)]=_0x542cc7,this[_0x3e5b0f(0xa3)]=_0xb45a14,this['_configService']=_0x1f3c7;let {..._0xdcf65e}=_0x31c2fd({},O,this[_0x3e5b0f(0xcc)]);this[_0x3e5b0f(0xb9)]['setConfig'](_0x3e5b0f(0xcb),_0xdcf65e);}[_0x24acd3(0xbe)](){const _0xb521c4=_0x24acd3;[[j],[M],[D]][_0xb521c4(0x96)](_0x6d6dda=>{const _0x48db2f=_0xb521c4;this[_0x48db2f(0xa3)][_0x48db2f(0xe1)](_0x6d6dda);});}['onReady'](){const _0x24a3b0=_0x24acd3;this['_injector'][_0x24a3b0(0xe5)](M),this[_0x24a3b0(0xa3)]['get'](D);}};I(L,'pluginName',_0x24acd3(0xeb)),I(L,'packageName',x),I(L,_0x24acd3(0xfa),S),L=E([_0x4924db(_0x26a07e,_0x47bbe9,_0x5ccbdc),T(0x1,_0x5da4f4(_0x536f47)),T(0x2,_0x1812ba)],L);export{L as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3265(_0x62a693,_0x2d2f14){_0x62a693=_0x62a693-0x1bc;const _0xdb5b7d=_0xdb5b();let _0x326527=_0xdb5b7d[_0x62a693];return _0x326527;}(function(_0x473a3b,_0x4a559b){const _0x310ad4=_0x3265,_0x1f3493=_0x473a3b();while(!![]){try{const _0x3940f6=parseInt(_0x310ad4(0x1ea))/0x1*(parseInt(_0x310ad4(0x23e))/0x2)+-parseInt(_0x310ad4(0x206))/0x3*(parseInt(_0x310ad4(0x22a))/0x4)+parseInt(_0x310ad4(0x1cd))/0x5+parseInt(_0x310ad4(0x246))/0x6*(-parseInt(_0x310ad4(0x20b))/0x7)+-parseInt(_0x310ad4(0x21c))/0x8*(parseInt(_0x310ad4(0x234))/0x9)+-parseInt(_0x310ad4(0x209))/0xa+-parseInt(_0x310ad4(0x217))/0xb*(-parseInt(_0x310ad4(0x200))/0xc);if(_0x3940f6===_0x4a559b)break;else _0x1f3493['push'](_0x1f3493['shift']());}catch(_0x183b98){_0x1f3493['push'](_0x1f3493['shift']());}}}(_0xdb5b,0x7d1b0),function(_0x47e2bc,_0x5c249d){const _0xa730dc=_0x3265;typeof exports==_0xa730dc(0x1e9)&&typeof module<'u'?_0x5c249d(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xa730dc(0x1f2)&&define[_0xa730dc(0x1ed)]?define([_0xa730dc(0x1d0),_0xa730dc(0x220),'@univerjs-pro/license',_0xa730dc(0x1c7),_0xa730dc(0x210),'@univerjs/protocol',_0xa730dc(0x23f),_0xa730dc(0x231),'@univerjs/network'],_0x5c249d):(_0x47e2bc=typeof globalThis<'u'?globalThis:_0x47e2bc||self,_0x5c249d(_0x47e2bc[_0xa730dc(0x23a)]={},_0x47e2bc[_0xa730dc(0x1f4)],_0x47e2bc[_0xa730dc(0x241)],_0x47e2bc[_0xa730dc(0x1fb)],_0x47e2bc[_0xa730dc(0x248)],_0x47e2bc[_0xa730dc(0x1c2)],_0x47e2bc[_0xa730dc(0x1c3)],_0x47e2bc[_0xa730dc(0x231)],_0x47e2bc[_0xa730dc(0x223)]));}(this,function(_0x39c76f,_0x10cb6d,_0x502b3e,_0x5f2200,_0x316987,_0x43efdd,_0xd76d68,_0x2a9748,_0x3af597){const _0x2e50fe=_0x3265;Object[_0x2e50fe(0x1ca)](_0x39c76f,Symbol[_0x2e50fe(0x1ee)],{'value':'Module'});var _0x23677e=_0x2e50fe(0x1d1),_0xd7839e=_0x2e50fe(0x1f1);let _0x3f072b=_0x30320c=>(0x0,_0x5f2200[_0x2e50fe(0x201)])(new Date(+_0x30320c))[_0x2e50fe(0x1e8)]('YYYY/MM/DD\x20HH:mm'),_0x33f7c9=async(_0x282a4a,_0x309d42)=>{const _0x21e2ea=_0x2e50fe;let _0x3f2b3e=_0x282a4a[_0x21e2ea(0x240)](_0x5f2200['UserManagerService']),_0x33899a=_0x282a4a['get'](_0x3af597[_0x21e2ea(0x20e)]);_0x309d42[_0x21e2ea(0x20f)](_0x504c35=>{const _0x1a60fa=_0x21e2ea;_0x3f2b3e[_0x1a60fa(0x238)](_0x504c35)&&_0x309d42[_0x1a60fa(0x221)](_0x504c35);}),_0x309d42['size']&&(await _0x33899a[_0x21e2ea(0x240)](_0x21e2ea(0x22b),{'params':{'userIDs':[..._0x309d42]}}))['body'][_0x21e2ea(0x211)]['forEach'](_0xacf036=>{_0xacf036&&_0x3f2b3e['addUser'](_0xacf036);});};function _0x2d38ec(_0x186fa0,_0x3ccd97){return function(_0x5ef872,_0xe67784){_0x3ccd97(_0x5ef872,_0xe67784,_0x186fa0);};}function _0x3e3186(_0x447317,_0x186d14,_0x5c3762,_0x561b4e){const _0xb3c268=_0x2e50fe;var _0x2ca9fe=arguments['length'],_0x39000e=_0x2ca9fe<0x3?_0x186d14:_0x561b4e===null?_0x561b4e=Object[_0xb3c268(0x249)](_0x186d14,_0x5c3762):_0x561b4e,_0x485408;if(typeof Reflect==_0xb3c268(0x1e9)&&typeof Reflect[_0xb3c268(0x247)]==_0xb3c268(0x1f2))_0x39000e=Reflect[_0xb3c268(0x247)](_0x447317,_0x186d14,_0x5c3762,_0x561b4e);else{for(var _0x29ad8b=_0x447317['length']-0x1;_0x29ad8b>=0x0;_0x29ad8b--)(_0x485408=_0x447317[_0x29ad8b])&&(_0x39000e=(_0x2ca9fe<0x3?_0x485408(_0x39000e):_0x2ca9fe>0x3?_0x485408(_0x186d14,_0x5c3762,_0x39000e):_0x485408(_0x186d14,_0x5c3762))||_0x39000e);}return _0x2ca9fe>0x3&&_0x39000e&&Object[_0xb3c268(0x1ca)](_0x186d14,_0x5c3762,_0x39000e),_0x39000e;}let _0x4bc8c0=class extends _0x5f2200[_0x2e50fe(0x1e0)]{constructor(_0x5e18d8,_0xefa44b,_0x4a3d6b,_0x358641){const _0x39c2b3=_0x2e50fe;super(),this[_0x39c2b3(0x1c6)]=_0x5e18d8,this[_0x39c2b3(0x20c)]=_0xefa44b,this[_0x39c2b3(0x1f0)]=_0x4a3d6b,this['_injector']=_0x358641,this[_0x39c2b3(0x1de)](),this[_0x39c2b3(0x1d6)]();}[_0x2e50fe(0x1d6)](){const _0x2f056e=_0x2e50fe;this[_0x2f056e(0x205)](this[_0x2f056e(0x20c)][_0x2f056e(0x1e3)][_0x2f056e(0x230)]((0x0,_0x2a9748['bufferTime'])(0x10))[_0x2f056e(0x1d3)](_0x44200c=>{const _0x2b3fbd=_0x2f056e;let _0x59444d=new Set();_0x44200c[_0x2b3fbd(0x20f)](_0x1e93cc=>{const _0x3dddb3=_0x2b3fbd;switch(_0x1e93cc[_0x3dddb3(0x1f7)]){case _0x3dddb3(0x1e4):{let _0x4eb50c=_0x1e93cc[_0x3dddb3(0x239)]['personId'];_0x59444d[_0x3dddb3(0x1e4)](_0x4eb50c);break;}default:break;}}),_0x33f7c9(this[_0x2b3fbd(0x21b)],_0x59444d);}));}[_0x2e50fe(0x1de)](){const _0x6e83cf=_0x2e50fe;this[_0x6e83cf(0x205)](this[_0x6e83cf(0x1c6)][_0x6e83cf(0x1e3)][_0x6e83cf(0x1d3)](async _0x55ced6=>{const _0x439a63=_0x6e83cf;var _0x46062c;let _0x13559d=(_0x46062c=this[_0x439a63(0x20c)][_0x439a63(0x232)](_0x55ced6[_0x439a63(0x1cc)])[_0x439a63(0x1f8)](_0x3bff08=>_0x3bff08['threadId']===_0x55ced6[_0x439a63(0x1fe)]))==null?void 0x0:_0x46062c[_0x439a63(0x1e7)];if(!_0x13559d)return;let {unitId:_0x5c88f9,subUnitId:_0x5e789d}=_0x13559d;switch(_0x55ced6[_0x439a63(0x21f)]&&this[_0x439a63(0x1f0)][_0x439a63(0x1ce)](_0x55ced6['user']),_0x55ced6['type']){case _0x43efdd['CommentUpdateEventType']['Add']:break;case _0x43efdd[_0x439a63(0x22d)][_0x439a63(0x213)]:var _0x54b67a,_0x260897;this['_threadCommentModel'][_0x439a63(0x20d)](_0x5c88f9,_0x5e789d,{'unitId':_0x5c88f9,'subUnitId':_0x5e789d,'ref':'','id':_0x55ced6[_0x439a63(0x1d4)],'dT':_0x3f072b(+_0x55ced6['createTimestamp']),'threadId':_0x55ced6['threadId'],'personId':(_0x54b67a=(_0x260897=_0x55ced6['user'])==null?void 0x0:_0x260897[_0x439a63(0x21d)])==null?_0x55ced6['userId']:_0x54b67a,'text':JSON['parse'](_0x55ced6[_0x439a63(0x1db)]),'parentId':_0x13559d['id']});break;case _0x43efdd[_0x439a63(0x22d)]['Delete']:{let _0xb7a4b3=this[_0x439a63(0x20c)]['getComment'](_0x5c88f9,_0x5e789d,_0x55ced6[_0x439a63(0x1d4)]);_0xb7a4b3&&_0xb7a4b3[_0x439a63(0x20a)]&&this[_0x439a63(0x20c)][_0x439a63(0x224)](_0x5c88f9,_0x5e789d,_0x55ced6['replyId']);break;}case _0x43efdd[_0x439a63(0x22d)]['Edit']:this[_0x439a63(0x20c)][_0x439a63(0x1fc)](_0x5c88f9,_0x5e789d,{'commentId':_0x55ced6[_0x439a63(0x1d4)],'text':JSON[_0x439a63(0x1c9)](_0x55ced6[_0x439a63(0x1db)])});break;case _0x43efdd[_0x439a63(0x22d)][_0x439a63(0x22c)]:{var _0x41588a;let _0x4d070f=(_0x41588a=this[_0x439a63(0x20c)][_0x439a63(0x232)](_0x55ced6['unitId'])[_0x439a63(0x1f8)](_0x3e0bf0=>_0x3e0bf0[_0x439a63(0x1fe)]===_0x55ced6[_0x439a63(0x1fe)]))==null?void 0x0:_0x41588a[_0x439a63(0x1e7)];_0x4d070f&&this[_0x439a63(0x20c)]['resolveComment'](_0x5c88f9,_0x5e789d,_0x4d070f['id'],_0x55ced6[_0x439a63(0x1eb)]===_0x43efdd[_0x439a63(0x233)][_0x439a63(0x1da)]);break;}default:break;}}));}};_0x4bc8c0=_0x3e3186([_0x2d38ec(0x0,(0x0,_0x5f2200[_0x2e50fe(0x1dc)])(_0x10cb6d[_0x2e50fe(0x245)])),_0x2d38ec(0x1,(0x0,_0x5f2200['Inject'])(_0xd76d68['ThreadCommentModel'])),_0x2d38ec(0x2,(0x0,_0x5f2200['Inject'])(_0x5f2200[_0x2e50fe(0x1e2)])),_0x2d38ec(0x3,(0x0,_0x5f2200[_0x2e50fe(0x1dc)])(_0x5f2200[_0x2e50fe(0x1bc)]))],_0x4bc8c0);let _0x2f957c={};function _0x143fcf(_0x6339ea,_0x3d69be){const _0x4e26f0=_0x2e50fe;let _0x1d1236=_0x6339ea['replies'][0x0];return{..._0x3d69be,'id':_0x1d1236[_0x4e26f0(0x1d4)],'resolved':_0x6339ea[_0x4e26f0(0x1eb)]===0x1,'dT':_0x3f072b(_0x1d1236['createTimestamp']),'personId':_0x1d1236[_0x4e26f0(0x1d9)],'threadId':_0x1d1236[_0x4e26f0(0x1fe)]};}function _0x1c0122(_0xfe5b5,_0x37d2c5,_0x2b84b4){const _0x21f9ea=_0x2e50fe;var _0x3ecb0f,_0x399ef5;if(((_0x3ecb0f=_0xfe5b5==null||(_0x399ef5=_0xfe5b5[_0x21f9ea(0x1ec)])==null?void 0x0:_0x399ef5['length'])==null?0x0:_0x3ecb0f)>0x0){let _0x1a0b6c=(_0xd78c5f,_0x3179e0)=>({'id':_0xd78c5f[_0x21f9ea(0x1d4)],'threadId':_0xd78c5f[_0x21f9ea(0x1fe)],'dT':_0x3f072b(_0xd78c5f[_0x21f9ea(0x1d2)]),'personId':_0xd78c5f[_0x21f9ea(0x1d9)],'resolved':_0xfe5b5[_0x21f9ea(0x1eb)]===_0x43efdd[_0x21f9ea(0x233)][_0x21f9ea(0x1da)],'unitId':_0x37d2c5,'subUnitId':_0x2b84b4,'text':JSON['parse'](_0xd78c5f[_0x21f9ea(0x1db)]),'parentId':_0x3179e0}),_0x443770=_0x1a0b6c(_0xfe5b5['replies'][0x0]);return{..._0x443770,'children':_0xfe5b5['replies'][_0x21f9ea(0x1cb)](0x1)[_0x21f9ea(0x1fa)](_0x244ad1=>_0x1a0b6c(_0x244ad1,_0x443770['id']))};}return null;}let _0x51163f=class{constructor(_0x46c361,_0x6f7802,_0x3eb22d){const _0x3f21bf=_0x2e50fe;this['_httpService']=_0x46c361,this[_0x3f21bf(0x1f0)]=_0x6f7802,this[_0x3f21bf(0x1d7)]=_0x3eb22d;}async[_0x2e50fe(0x20d)](_0x208d03){const _0x131499=_0x2e50fe;var _0x9fb02f,_0x4d1889;let {parentId:_0x5bfa56,unitId:_0x5de0c3,text:_0x31d910,threadId:_0x13cfa3}=_0x208d03,_0x37418a=(_0x9fb02f=(_0x4d1889=_0x31d910[_0x131499(0x1f5)])==null?void 0x0:_0x4d1889['filter'](_0x3cd81f=>_0x3cd81f[_0x131499(0x22f)]===_0x5f2200[_0x131499(0x1ef)][_0x131499(0x219)])[_0x131499(0x1fa)](_0x48bba6=>_0x48bba6[_0x131499(0x1cf)]))==null?[]:_0x9fb02f,_0xa4627f=JSON[_0x131499(0x23d)](_0x31d910),_0x49636a=(await this[_0x131499(0x1d7)][_0x131499(0x1e1)](_0x5de0c3))[_0x131499(0x1ff)]();if(_0x5bfa56){let _0xfd2e80={'memberId':_0x49636a,'unitId':_0x5de0c3,'content':_0xa4627f,'mention':_0x37418a,'threadId':_0x13cfa3},_0x546425=(await this[_0x131499(0x1c4)]['post']('/universer-api/comment/unit/'+_0x5de0c3+_0x131499(0x1bd),{'body':_0xfd2e80}))['body']['reply'];return{..._0x208d03,'id':_0x546425[_0x131499(0x1d4)],'dT':(0x0,_0x5f2200['dateKit'])(+_0x546425['createTimestamp'])[_0x131499(0x1e8)](_0x131499(0x225)),'personId':_0x546425['userId']};}else{let _0x306ecb={'memberId':_0x49636a,'unitId':_0x5de0c3,'content':_0xa4627f,'mention':_0x37418a};return _0x143fcf((await this[_0x131499(0x1c4)]['post'](_0x131499(0x1f6)+_0x5de0c3+_0x131499(0x207),{'body':_0x306ecb}))[_0x131499(0x1e6)][_0x131499(0x202)],_0x208d03);}}async[_0x2e50fe(0x1fc)](_0x326e84){const _0x11969c=_0x2e50fe;var _0x1d0d46,_0x342053;let {text:_0x31c4d8,unitId:_0x91edd1}=_0x326e84,_0x28d9a5=(_0x1d0d46=(_0x342053=_0x31c4d8['customRanges'])==null?void 0x0:_0x342053[_0x11969c(0x203)](_0x2aa028=>_0x2aa028[_0x11969c(0x22f)]===_0x5f2200[_0x11969c(0x1ef)][_0x11969c(0x219)])['map'](_0x58189a=>_0x58189a[_0x11969c(0x1cf)]))==null?[]:_0x1d0d46,_0x31fcf9=JSON[_0x11969c(0x23d)](_0x31c4d8),_0x2de7ea=_0x326e84['threadId'],_0x4e087a=_0x326e84['id'],_0x269a22={'memberId':(await this[_0x11969c(0x1d7)][_0x11969c(0x1e1)](_0x91edd1))['getMemberID'](),'unitId':_0x91edd1,'threadId':_0x2de7ea,'mention':_0x28d9a5,'content':_0x31fcf9,'replyId':_0x4e087a},_0x4719bd=await this['_httpService'][_0x11969c(0x214)](_0x11969c(0x1f6)+_0x91edd1+_0x11969c(0x23b),{'body':_0x269a22});return!_0x4719bd['body'][_0x11969c(0x235)]||_0x4719bd[_0x11969c(0x1e6)]['error'][_0x11969c(0x1dd)]===0x1;}async[_0x2e50fe(0x228)](_0x43427a){const _0x5e0741=_0x2e50fe;let {unitId:_0x104961}=_0x43427a,_0x58849e=_0x43427a['threadId'],_0x2b5a79={'memberId':this[_0x5e0741(0x1f0)]['getCurrentUser']()[_0x5e0741(0x21d)],'unitId':_0x104961,'threadId':_0x58849e,'solved':_0x43427a[_0x5e0741(0x21a)]?_0x43efdd[_0x5e0741(0x233)][_0x5e0741(0x1da)]:_0x43efdd[_0x5e0741(0x233)][_0x5e0741(0x216)]},_0x973eba=await this[_0x5e0741(0x1c4)][_0x5e0741(0x214)](_0x5e0741(0x1f6)+_0x104961+_0x5e0741(0x229),{'body':_0x2b5a79});return!_0x973eba['body']['error']||_0x973eba['body']['error'][_0x5e0741(0x1dd)]===0x1;}async[_0x2e50fe(0x224)](_0x5a64fa,_0xf6f01a,_0x1ae1a,_0x3b28a8){const _0x3343e4=_0x2e50fe;let _0x4b6f0b={'memberId':(await this[_0x3343e4(0x1d7)][_0x3343e4(0x1e1)](_0x5a64fa))[_0x3343e4(0x1ff)](),'threadId':_0x1ae1a,'replyId':_0x3b28a8,'unitId':_0x5a64fa},_0x3ea1d2=await this[_0x3343e4(0x1c4)][_0x3343e4(0x214)]('/universer-api/comment/unit/'+_0x5a64fa+_0x3343e4(0x226),{'body':_0x4b6f0b});return!_0x3ea1d2['body']['error']||_0x3ea1d2[_0x3343e4(0x1e6)][_0x3343e4(0x235)][_0x3343e4(0x1dd)]===0x1;}async[_0x2e50fe(0x204)](_0x5f493a,_0x496302,_0x4b24b3){const _0xeb4d04=_0x2e50fe;let _0x2fa118={'unitId':_0x5f493a,'threadId':_0x4b24b3},_0x22c356=await this[_0xeb4d04(0x1c4)][_0xeb4d04(0x214)](_0xeb4d04(0x1f6)+_0x5f493a+'/list',{'body':_0x2fa118}),_0x10080f=_0x4b24b3[_0xeb4d04(0x1fa)](_0x2c155a=>_0x1c0122(_0x22c356[_0xeb4d04(0x1e6)]['comments'][_0x2c155a],_0x5f493a,_0x496302))['filter'](Boolean);return Object[_0xeb4d04(0x243)](_0x22c356[_0xeb4d04(0x1e6)][_0xeb4d04(0x211)])[_0xeb4d04(0x20f)](_0x591917=>{const _0x18b0b2=_0xeb4d04;this[_0x18b0b2(0x1f0)][_0x18b0b2(0x1ce)](_0x591917);}),_0x10080f;}[_0x2e50fe(0x23c)](_0x107527){const _0x43b799=_0x2e50fe;return{'id':_0x107527['id'],'threadId':_0x107527[_0x43b799(0x1fe)],'ref':_0x107527[_0x43b799(0x1fd)]};}};_0x51163f=_0x3e3186([_0x2d38ec(0x0,(0x0,_0x5f2200['Inject'])(_0x3af597[_0x2e50fe(0x20e)])),_0x2d38ec(0x1,(0x0,_0x5f2200['Inject'])(_0x5f2200['UserManagerService'])),_0x2d38ec(0x2,(0x0,_0x5f2200['Inject'])(_0x10cb6d['CollaborationSessionService']))],_0x51163f);let _0x273e93=class extends _0x5f2200['Disposable']{constructor(_0x190140,_0x530466){const _0x48c12e=_0x2e50fe;super(),this[_0x48c12e(0x236)]=_0x190140,this[_0x48c12e(0x244)]=_0x530466,this['_initDataSource']();}['_initDataSource'](){const _0x39de5e=_0x2e50fe;this[_0x39de5e(0x236)][_0x39de5e(0x1e5)]=this[_0x39de5e(0x244)],this[_0x39de5e(0x236)][_0x39de5e(0x1c8)]=!0x1;}};_0x273e93=_0x3e3186([_0x2d38ec(0x0,_0xd76d68[_0x2e50fe(0x208)]),_0x2d38ec(0x1,(0x0,_0x5f2200['Inject'])(_0x51163f))],_0x273e93);function _0x3e620a(_0x17b5ce){'@babel/helpers - typeof';const _0x6516e0=_0x2e50fe;return _0x3e620a=typeof Symbol=='function'&&typeof Symbol[_0x6516e0(0x1c1)]==_0x6516e0(0x1f3)?function(_0x1142c1){return typeof _0x1142c1;}:function(_0x549a36){const _0x1e8b3f=_0x6516e0;return _0x549a36&&typeof Symbol=='function'&&_0x549a36[_0x1e8b3f(0x1d8)]===Symbol&&_0x549a36!==Symbol[_0x1e8b3f(0x1be)]?_0x1e8b3f(0x1f3):typeof _0x549a36;},_0x3e620a(_0x17b5ce);}function _0x463c88(_0x567d3a,_0x244ef1){const _0x50abc8=_0x2e50fe;if(_0x3e620a(_0x567d3a)!=_0x50abc8(0x1e9)||!_0x567d3a)return _0x567d3a;var _0x3460d8=_0x567d3a[Symbol[_0x50abc8(0x242)]];if(_0x3460d8!==void 0x0){var _0x1c2cab=_0x3460d8['call'](_0x567d3a,_0x244ef1||_0x50abc8(0x1df));if(_0x3e620a(_0x1c2cab)!=_0x50abc8(0x1e9))return _0x1c2cab;throw TypeError(_0x50abc8(0x222));}return(_0x244ef1===_0x50abc8(0x218)?String:Number)(_0x567d3a);}function _0x19345f(_0x1a70b3){const _0x21f037=_0x2e50fe;var _0x3e6ff3=_0x463c88(_0x1a70b3,_0x21f037(0x218));return _0x3e620a(_0x3e6ff3)==_0x21f037(0x1f3)?_0x3e6ff3:_0x3e6ff3+'';}function _0x595969(_0xe5f749,_0x18cbd3,_0x39a0e4){const _0x51ffef=_0x2e50fe;return(_0x18cbd3=_0x19345f(_0x18cbd3))in _0xe5f749?Object[_0x51ffef(0x1ca)](_0xe5f749,_0x18cbd3,{'value':_0x39a0e4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xe5f749[_0x18cbd3]=_0x39a0e4,_0xe5f749;}let _0x4b4129=class extends _0x5f2200[_0x2e50fe(0x21e)]{constructor(_0x217f38=_0x2f957c,_0x571a42,_0x1f747d){const _0x17bc77=_0x2e50fe;super(),this[_0x17bc77(0x22e)]=_0x217f38,this[_0x17bc77(0x21b)]=_0x571a42,this[_0x17bc77(0x1f9)]=_0x1f747d;let {..._0x4be440}=(0x0,_0x5f2200['merge'])({},_0x2f957c,this['_config']);this[_0x17bc77(0x1f9)]['setConfig']('thread-comment-data-source.config',_0x4be440);}['onStarting'](){const _0x1bc2c4=_0x2e50fe;[[_0x51163f],[_0x273e93],[_0x4bc8c0]][_0x1bc2c4(0x20f)](_0x402efc=>{const _0x4ca5f7=_0x1bc2c4;this[_0x4ca5f7(0x21b)][_0x4ca5f7(0x1e4)](_0x402efc);});}[_0x2e50fe(0x237)](){const _0x55ed06=_0x2e50fe;this[_0x55ed06(0x21b)]['get'](_0x273e93),this[_0x55ed06(0x21b)][_0x55ed06(0x240)](_0x4bc8c0);}};_0x595969(_0x4b4129,_0x2e50fe(0x227),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),_0x595969(_0x4b4129,'packageName',_0x23677e),_0x595969(_0x4b4129,_0x2e50fe(0x1bf),_0xd7839e),_0x4b4129=_0x3e3186([(0x0,_0x5f2200[_0x2e50fe(0x215)])(_0x316987[_0x2e50fe(0x1c0)],_0x10cb6d['UniverCollaborationClientPlugin'],_0x502b3e[_0x2e50fe(0x1c5)]),_0x2d38ec(0x1,(0x0,_0x5f2200['Inject'])(_0x5f2200[_0x2e50fe(0x1bc)])),_0x2d38ec(0x2,_0x5f2200[_0x2e50fe(0x212)])],_0x4b4129),Object[_0x2e50fe(0x1ca)](_0x39c76f,_0x2e50fe(0x1d5),{'enumerable':!0x0,'get':function(){return _0x4b4129;}});}));function _0xdb5b(){const _0x2516f3=['function','symbol','UniverProCollaborationClient','customRanges','/universer-api/comment/unit/','type','find','_configService','map','UniverCore','updateComment','ref','threadId','getMemberID','96lCvpZp','dateKit','comment','filter','listComments','disposeWithMe','222SfgfvD','/add','IThreadCommentDataSourceService','9177440KHvHXt','parentId','553pDdliR','_threadCommentModel','addComment','HTTPService','forEach','@univerjs/thread-comment-ui','users','IConfigService','Reply','post','DependentOn','OpenOrReOpen','3302552asEpbt','string','COMMENT','resolved','_injector','677296AWGgTt','userID','Plugin','user','@univerjs-pro/collaboration-client','delete','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','UniverNetwork','deleteComment','YYYY/MM/DD\x20HH:mm','/delete','pluginName','resolveComment','/solved','51036Kytiof','/universer-api/user/list','Solve','CommentUpdateEventType','_config','rangeType','pipe','rxjs','getUnit','CommentSolvedStatus','99AJZoCD','error','_threadCommentDataSourceService','onReady','getUser','payload','UniverProThreadCommentDatasource','/edit','saveCommentToSnapshot','stringify','30xjolOg','@univerjs/thread-comment','get','UniverProLicense','toPrimitive','values','_threadCommentDataSource','CommentService','35010ADLEdH','decorate','UniverThreadCommentUi','getOwnPropertyDescriptor','Injector','/reply','prototype','version','UniverThreadCommentUIPlugin','iterator','UniverProtocol','UniverThreadComment','_httpService','UniverLicensePlugin','_commentService','@univerjs/core','syncUpdateMutationToColla','parse','defineProperty','slice','unitId','3799590nYsond','addUser','rangeId','exports','@univerjs-pro/thread-comment-datasource','createTimestamp','subscribe','replyId','UniverThreadCommentDataSourcePlugin','_initUserSync','_sessionService','constructor','userId','Solved','content','Inject','code','_init','default','Disposable','requireSession','UserManagerService','commentUpdate$','add','dataSource','body','root','format','object','40321JUMDne','solved','replies','amd','toStringTag','CustomRangeType','_userService','0.25.0'];_0xdb5b=function(){return _0x2516f3;};return _0xdb5b();}
1
+ function _0x5ebb(_0x5364e5,_0x5d2c8b){_0x5364e5=_0x5364e5-0x12d;const _0x1704cf=_0x1704();let _0x5ebbfc=_0x1704cf[_0x5364e5];return _0x5ebbfc;}function _0x1704(){const _0x614eb=['744780PRbKZP','exports','CustomRangeType','symbol','Solved','delete','getComment','onStarting','UserManagerService','_httpService','@univerjs/thread-comment','Delete','get','UniverThreadCommentUIPlugin','22281tudmAf','@univerjs/protocol','UniverProLicense','listComments','amd','_sessionService','534kYwJYm','pipe','IThreadCommentDataSourceService','requireSession','Solve','bufferTime','Inject','UniverProThreadCommentDatasource','payload','onReady','UniverProCollaborationClient','map','COMMENT','getUnit','OpenOrReOpen','270288OXFEXS','Add','users','userID','disposeWithMe','Disposable','_threadCommentDataSource','/delete','@univerjs/thread-comment-ui','_threadCommentModel','DependentOn','packageName','content','body','_init','slice','IConfigService','addComment','unitId','_commentService','stringify','136xdOIgL','1616vxypTs','getUser','type','personId','1584162oHlPZb','toPrimitive','_config','_userService','forEach','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','Reply','@univerjs/core','prototype','getCurrentUser','values','dateKit','@univerjs-pro/thread-comment-datasource','commentUpdate$','_configService','0.25.1','length','/universer-api/comment/unit/','HTTPService','post','customRanges','_threadCommentDataSourceService','/universer-api/user/list','UniverCore','CommentUpdateEventType','comments','UniverCollaborationClientPlugin','17427dmaKiM','/solved','replies','saveCommentToSnapshot','deleteComment','CommentSolvedStatus','toStringTag','addUser','@univerjs/network','replyId','size','getMemberID','call','filter','3207017EMQVWq','decorate','ThreadCommentModel','format','find','/reply','UniverThreadCommentUi','CommentService','comment','solved','UniverProtocol','UniverThreadCommentDataSourcePlugin','10YzmEpS','reply','@univerjs-pro/license','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','default','rxjs','root','function','rangeId','parse','Injector','error','userId','subscribe','syncUpdateMutationToColla','parentId','UniverThreadComment','/add','threadId','defineProperty','CollaborationSessionService','/edit','user','_injector','object','string','updateComment','Plugin','code','createTimestamp','UniverNetwork','resolved','2QLVzid'];_0x1704=function(){return _0x614eb;};return _0x1704();}(function(_0x339319,_0x459c98){const _0x2090e4=_0x5ebb,_0x55ce25=_0x339319();while(!![]){try{const _0x4ae687=parseInt(_0x2090e4(0x164))/0x1*(parseInt(_0x2090e4(0x1a0))/0x2)+parseInt(_0x2090e4(0x1b5))/0x3*(-parseInt(_0x2090e4(0x145))/0x4)+parseInt(_0x2090e4(0x1a1))/0x5+-parseInt(_0x2090e4(0x12f))/0x6+parseInt(_0x2090e4(0x1af))/0x7*(-parseInt(_0x2090e4(0x144))/0x8)+parseInt(_0x2090e4(0x149))/0x9*(-parseInt(_0x2090e4(0x17e))/0xa)+parseInt(_0x2090e4(0x172))/0xb;if(_0x4ae687===_0x459c98)break;else _0x55ce25['push'](_0x55ce25['shift']());}catch(_0x1d8066){_0x55ce25['push'](_0x55ce25['shift']());}}}(_0x1704,0x1b0f9),function(_0x3706bb,_0x3706c7){const _0x519a8d=_0x5ebb;typeof exports==_0x519a8d(0x198)&&typeof module<'u'?_0x3706c7(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x519a8d(0x187)&&define[_0x519a8d(0x1b3)]?define([_0x519a8d(0x1a2),'@univerjs-pro/collaboration-client',_0x519a8d(0x180),_0x519a8d(0x150),_0x519a8d(0x137),_0x519a8d(0x1b0),_0x519a8d(0x1ab),_0x519a8d(0x185),_0x519a8d(0x16c)],_0x3706c7):(_0x3706bb=typeof globalThis<'u'?globalThis:_0x3706bb||self,_0x3706c7(_0x3706bb[_0x519a8d(0x1bc)]={},_0x3706bb[_0x519a8d(0x1bf)],_0x3706bb[_0x519a8d(0x1b1)],_0x3706bb[_0x519a8d(0x160)],_0x3706bb[_0x519a8d(0x178)],_0x3706bb[_0x519a8d(0x17c)],_0x3706bb[_0x519a8d(0x190)],_0x3706bb[_0x519a8d(0x185)],_0x3706bb[_0x519a8d(0x19e)]));}(this,function(_0x33f0e5,_0x24426e,_0x4a513d,_0xcafa72,_0x48398d,_0x34bcc5,_0x36a034,_0x4d6f3c,_0x54a381){const _0x282255=_0x5ebb;Object['defineProperty'](_0x33f0e5,Symbol[_0x282255(0x16a)],{'value':'Module'});var _0xee7654=_0x282255(0x155),_0x1b82ed=_0x282255(0x158);let _0x2793cb=_0x2e070e=>(0x0,_0xcafa72[_0x282255(0x154)])(new Date(+_0x2e070e))[_0x282255(0x175)]('YYYY/MM/DD\x20HH:mm'),_0x1d3002=async(_0x4de39d,_0x2f4b21)=>{const _0x5f59ae=_0x282255;let _0x174d81=_0x4de39d[_0x5f59ae(0x1ad)](_0xcafa72[_0x5f59ae(0x1a9)]),_0x100ae1=_0x4de39d[_0x5f59ae(0x1ad)](_0x54a381['HTTPService']);_0x2f4b21[_0x5f59ae(0x14d)](_0x109ad4=>{const _0xbc0340=_0x5f59ae;_0x174d81[_0xbc0340(0x146)](_0x109ad4)&&_0x2f4b21[_0xbc0340(0x1a6)](_0x109ad4);}),_0x2f4b21[_0x5f59ae(0x16e)]&&(await _0x100ae1['get'](_0x5f59ae(0x15f),{'params':{'userIDs':[..._0x2f4b21]}}))[_0x5f59ae(0x13c)][_0x5f59ae(0x131)]['forEach'](_0x2158c3=>{const _0x1b393d=_0x5f59ae;_0x2158c3&&_0x174d81[_0x1b393d(0x16b)](_0x2158c3);});};function _0x12fa85(_0x6faef3,_0x3a908a){return function(_0x1421bf,_0x884309){_0x3a908a(_0x1421bf,_0x884309,_0x6faef3);};}function _0x443909(_0x4c8afc,_0x420bfc,_0x54af09,_0x2c892d){const _0x3ad38f=_0x282255;var _0x51163b=arguments[_0x3ad38f(0x159)],_0x37a471=_0x51163b<0x3?_0x420bfc:_0x2c892d===null?_0x2c892d=Object['getOwnPropertyDescriptor'](_0x420bfc,_0x54af09):_0x2c892d,_0x447d2a;if(typeof Reflect==_0x3ad38f(0x198)&&typeof Reflect[_0x3ad38f(0x173)]==_0x3ad38f(0x187))_0x37a471=Reflect[_0x3ad38f(0x173)](_0x4c8afc,_0x420bfc,_0x54af09,_0x2c892d);else{for(var _0x318b3e=_0x4c8afc[_0x3ad38f(0x159)]-0x1;_0x318b3e>=0x0;_0x318b3e--)(_0x447d2a=_0x4c8afc[_0x318b3e])&&(_0x37a471=(_0x51163b<0x3?_0x447d2a(_0x37a471):_0x51163b>0x3?_0x447d2a(_0x420bfc,_0x54af09,_0x37a471):_0x447d2a(_0x420bfc,_0x54af09))||_0x37a471);}return _0x51163b>0x3&&_0x37a471&&Object[_0x3ad38f(0x193)](_0x420bfc,_0x54af09,_0x37a471),_0x37a471;}let _0x51eb27=class extends _0xcafa72[_0x282255(0x134)]{constructor(_0x177ecb,_0x39698c,_0x476560,_0x417068){const _0xb600c8=_0x282255;super(),this[_0xb600c8(0x142)]=_0x177ecb,this['_threadCommentModel']=_0x39698c,this[_0xb600c8(0x14c)]=_0x476560,this[_0xb600c8(0x197)]=_0x417068,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x41e85f=_0x282255;this[_0x41e85f(0x133)](this['_threadCommentModel'][_0x41e85f(0x156)][_0x41e85f(0x1b6)]((0x0,_0x4d6f3c[_0x41e85f(0x1ba)])(0x10))[_0x41e85f(0x18d)](_0x46233d=>{const _0x5bd83e=_0x41e85f;let _0x5b668f=new Set();_0x46233d['forEach'](_0x24fd19=>{const _0x1b08e4=_0x5ebb;switch(_0x24fd19[_0x1b08e4(0x147)]){case _0x1b08e4(0x181):{let _0x3215c9=_0x24fd19[_0x1b08e4(0x1bd)][_0x1b08e4(0x148)];_0x5b668f[_0x1b08e4(0x181)](_0x3215c9);break;}default:break;}}),_0x1d3002(this[_0x5bd83e(0x197)],_0x5b668f);}));}[_0x282255(0x13d)](){const _0x4bde80=_0x282255;this[_0x4bde80(0x133)](this[_0x4bde80(0x142)][_0x4bde80(0x156)][_0x4bde80(0x18d)](async _0x5c44d1=>{const _0x4b9353=_0x4bde80;var _0x1cc970;let _0x1cfaf1=(_0x1cc970=this['_threadCommentModel'][_0x4b9353(0x12d)](_0x5c44d1[_0x4b9353(0x141)])['find'](_0x35101f=>_0x35101f[_0x4b9353(0x192)]===_0x5c44d1['threadId']))==null?void 0x0:_0x1cc970['root'];if(!_0x1cfaf1)return;let {unitId:_0x55130a,subUnitId:_0x582222}=_0x1cfaf1;switch(_0x5c44d1[_0x4b9353(0x196)]&&this['_userService'][_0x4b9353(0x16b)](_0x5c44d1[_0x4b9353(0x196)]),_0x5c44d1[_0x4b9353(0x147)]){case _0x34bcc5[_0x4b9353(0x161)][_0x4b9353(0x130)]:break;case _0x34bcc5[_0x4b9353(0x161)][_0x4b9353(0x14f)]:var _0x1259a2,_0x41a9cb;this[_0x4b9353(0x138)][_0x4b9353(0x140)](_0x55130a,_0x582222,{'unitId':_0x55130a,'subUnitId':_0x582222,'ref':'','id':_0x5c44d1[_0x4b9353(0x16d)],'dT':_0x2793cb(+_0x5c44d1[_0x4b9353(0x19d)]),'threadId':_0x5c44d1[_0x4b9353(0x192)],'personId':(_0x1259a2=(_0x41a9cb=_0x5c44d1[_0x4b9353(0x196)])==null?void 0x0:_0x41a9cb['userID'])==null?_0x5c44d1['userId']:_0x1259a2,'text':JSON[_0x4b9353(0x189)](_0x5c44d1[_0x4b9353(0x13b)]),'parentId':_0x1cfaf1['id']});break;case _0x34bcc5[_0x4b9353(0x161)][_0x4b9353(0x1ac)]:{let _0x1690f7=this['_threadCommentModel'][_0x4b9353(0x1a7)](_0x55130a,_0x582222,_0x5c44d1[_0x4b9353(0x16d)]);_0x1690f7&&_0x1690f7[_0x4b9353(0x18f)]&&this['_threadCommentModel'][_0x4b9353(0x168)](_0x55130a,_0x582222,_0x5c44d1[_0x4b9353(0x16d)]);break;}case _0x34bcc5[_0x4b9353(0x161)]['Edit']:this[_0x4b9353(0x138)][_0x4b9353(0x19a)](_0x55130a,_0x582222,{'commentId':_0x5c44d1[_0x4b9353(0x16d)],'text':JSON[_0x4b9353(0x189)](_0x5c44d1['content'])});break;case _0x34bcc5[_0x4b9353(0x161)][_0x4b9353(0x1b9)]:{var _0x1b3b84;let _0x4257fa=(_0x1b3b84=this['_threadCommentModel'][_0x4b9353(0x12d)](_0x5c44d1[_0x4b9353(0x141)])[_0x4b9353(0x176)](_0x3b7099=>_0x3b7099[_0x4b9353(0x192)]===_0x5c44d1[_0x4b9353(0x192)]))==null?void 0x0:_0x1b3b84[_0x4b9353(0x186)];_0x4257fa&&this['_threadCommentModel']['resolveComment'](_0x55130a,_0x582222,_0x4257fa['id'],_0x5c44d1[_0x4b9353(0x17b)]===_0x34bcc5[_0x4b9353(0x169)][_0x4b9353(0x1a5)]);break;}default:break;}}));}};_0x51eb27=_0x443909([_0x12fa85(0x0,(0x0,_0xcafa72['Inject'])(_0x24426e[_0x282255(0x179)])),_0x12fa85(0x1,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0x36a034[_0x282255(0x174)])),_0x12fa85(0x2,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0xcafa72[_0x282255(0x1a9)])),_0x12fa85(0x3,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0xcafa72[_0x282255(0x18a)]))],_0x51eb27);let _0x59a1a7={};function _0x27cc44(_0x60304c,_0x1be19b){const _0x2f0ab5=_0x282255;let _0x441010=_0x60304c[_0x2f0ab5(0x166)][0x0];return{..._0x1be19b,'id':_0x441010[_0x2f0ab5(0x16d)],'resolved':_0x60304c[_0x2f0ab5(0x17b)]===0x1,'dT':_0x2793cb(_0x441010[_0x2f0ab5(0x19d)]),'personId':_0x441010[_0x2f0ab5(0x18c)],'threadId':_0x441010['threadId']};}function _0x57f6cb(_0x1ccc0c,_0x1d418c,_0x855974){const _0x3f88d9=_0x282255;var _0x56e5f9,_0x279784;if(((_0x56e5f9=_0x1ccc0c==null||(_0x279784=_0x1ccc0c[_0x3f88d9(0x166)])==null?void 0x0:_0x279784['length'])==null?0x0:_0x56e5f9)>0x0){let _0x5447f9=(_0x411b3c,_0x518b6a)=>({'id':_0x411b3c[_0x3f88d9(0x16d)],'threadId':_0x411b3c['threadId'],'dT':_0x2793cb(_0x411b3c[_0x3f88d9(0x19d)]),'personId':_0x411b3c[_0x3f88d9(0x18c)],'resolved':_0x1ccc0c['solved']===_0x34bcc5['CommentSolvedStatus'][_0x3f88d9(0x1a5)],'unitId':_0x1d418c,'subUnitId':_0x855974,'text':JSON[_0x3f88d9(0x189)](_0x411b3c['content']),'parentId':_0x518b6a}),_0x291921=_0x5447f9(_0x1ccc0c[_0x3f88d9(0x166)][0x0]);return{..._0x291921,'children':_0x1ccc0c[_0x3f88d9(0x166)][_0x3f88d9(0x13e)](0x1)[_0x3f88d9(0x1c0)](_0x51f602=>_0x5447f9(_0x51f602,_0x291921['id']))};}return null;}let _0xed0191=class{constructor(_0x287cd6,_0x38e343,_0x4d2667){const _0x3defc6=_0x282255;this[_0x3defc6(0x1aa)]=_0x287cd6,this[_0x3defc6(0x14c)]=_0x38e343,this[_0x3defc6(0x1b4)]=_0x4d2667;}async['addComment'](_0x1968c2){const _0x4d825b=_0x282255;var _0x356122,_0x5073df;let {parentId:_0x20ae10,unitId:_0x4109a3,text:_0x32fc71,threadId:_0x416361}=_0x1968c2,_0x45a5a1=(_0x356122=(_0x5073df=_0x32fc71[_0x4d825b(0x15d)])==null?void 0x0:_0x5073df['filter'](_0x3076d3=>_0x3076d3['rangeType']===_0xcafa72['CustomRangeType'][_0x4d825b(0x1c1)])[_0x4d825b(0x1c0)](_0x559545=>_0x559545['rangeId']))==null?[]:_0x356122,_0x1ae202=JSON[_0x4d825b(0x143)](_0x32fc71),_0x758534=(await this[_0x4d825b(0x1b4)]['requireSession'](_0x4109a3))['getMemberID']();if(_0x20ae10){let _0x68c23={'memberId':_0x758534,'unitId':_0x4109a3,'content':_0x1ae202,'mention':_0x45a5a1,'threadId':_0x416361},_0x1266cf=(await this[_0x4d825b(0x1aa)][_0x4d825b(0x15c)](_0x4d825b(0x15a)+_0x4109a3+_0x4d825b(0x177),{'body':_0x68c23}))[_0x4d825b(0x13c)][_0x4d825b(0x17f)];return{..._0x1968c2,'id':_0x1266cf[_0x4d825b(0x16d)],'dT':(0x0,_0xcafa72[_0x4d825b(0x154)])(+_0x1266cf['createTimestamp'])[_0x4d825b(0x175)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1266cf['userId']};}else{let _0x29495d={'memberId':_0x758534,'unitId':_0x4109a3,'content':_0x1ae202,'mention':_0x45a5a1};return _0x27cc44((await this[_0x4d825b(0x1aa)][_0x4d825b(0x15c)]('/universer-api/comment/unit/'+_0x4109a3+_0x4d825b(0x191),{'body':_0x29495d}))[_0x4d825b(0x13c)][_0x4d825b(0x17a)],_0x1968c2);}}async['updateComment'](_0x48af7a){const _0x428da3=_0x282255;var _0x1cfd85,_0x3dbd25;let {text:_0x539d3b,unitId:_0x5cf529}=_0x48af7a,_0x146065=(_0x1cfd85=(_0x3dbd25=_0x539d3b['customRanges'])==null?void 0x0:_0x3dbd25[_0x428da3(0x171)](_0x2af93b=>_0x2af93b['rangeType']===_0xcafa72[_0x428da3(0x1a3)][_0x428da3(0x1c1)])['map'](_0x11429e=>_0x11429e[_0x428da3(0x188)]))==null?[]:_0x1cfd85,_0x38debc=JSON['stringify'](_0x539d3b),_0x4a4415=_0x48af7a[_0x428da3(0x192)],_0x364861=_0x48af7a['id'],_0x569828={'memberId':(await this[_0x428da3(0x1b4)][_0x428da3(0x1b8)](_0x5cf529))[_0x428da3(0x16f)](),'unitId':_0x5cf529,'threadId':_0x4a4415,'mention':_0x146065,'content':_0x38debc,'replyId':_0x364861},_0x5b7db0=await this[_0x428da3(0x1aa)][_0x428da3(0x15c)](_0x428da3(0x15a)+_0x5cf529+_0x428da3(0x195),{'body':_0x569828});return!_0x5b7db0[_0x428da3(0x13c)][_0x428da3(0x18b)]||_0x5b7db0['body'][_0x428da3(0x18b)][_0x428da3(0x19c)]===0x1;}async['resolveComment'](_0x3c0325){const _0x251a29=_0x282255;let {unitId:_0x290a2b}=_0x3c0325,_0x8b6e7d=_0x3c0325['threadId'],_0x5aa88b={'memberId':this['_userService'][_0x251a29(0x152)]()[_0x251a29(0x132)],'unitId':_0x290a2b,'threadId':_0x8b6e7d,'solved':_0x3c0325[_0x251a29(0x19f)]?_0x34bcc5[_0x251a29(0x169)]['Solved']:_0x34bcc5[_0x251a29(0x169)][_0x251a29(0x12e)]},_0x1ea437=await this[_0x251a29(0x1aa)]['post'](_0x251a29(0x15a)+_0x290a2b+_0x251a29(0x165),{'body':_0x5aa88b});return!_0x1ea437[_0x251a29(0x13c)][_0x251a29(0x18b)]||_0x1ea437[_0x251a29(0x13c)]['error'][_0x251a29(0x19c)]===0x1;}async[_0x282255(0x168)](_0x1c3013,_0x525dd7,_0x9ffb92,_0x510f82){const _0xc976b4=_0x282255;let _0xd104f5={'memberId':(await this['_sessionService'][_0xc976b4(0x1b8)](_0x1c3013))[_0xc976b4(0x16f)](),'threadId':_0x9ffb92,'replyId':_0x510f82,'unitId':_0x1c3013},_0x2dc3b6=await this[_0xc976b4(0x1aa)][_0xc976b4(0x15c)](_0xc976b4(0x15a)+_0x1c3013+_0xc976b4(0x136),{'body':_0xd104f5});return!_0x2dc3b6[_0xc976b4(0x13c)][_0xc976b4(0x18b)]||_0x2dc3b6[_0xc976b4(0x13c)]['error'][_0xc976b4(0x19c)]===0x1;}async[_0x282255(0x1b2)](_0x229519,_0x3f105b,_0x355f14){const _0x23b20c=_0x282255;let _0x294902={'unitId':_0x229519,'threadId':_0x355f14},_0x58feaa=await this['_httpService']['post'](_0x23b20c(0x15a)+_0x229519+'/list',{'body':_0x294902}),_0x303f54=_0x355f14[_0x23b20c(0x1c0)](_0x5f2cae=>_0x57f6cb(_0x58feaa['body'][_0x23b20c(0x162)][_0x5f2cae],_0x229519,_0x3f105b))['filter'](Boolean);return Object[_0x23b20c(0x153)](_0x58feaa[_0x23b20c(0x13c)][_0x23b20c(0x131)])['forEach'](_0x2c6bad=>{const _0x3fdbbd=_0x23b20c;this[_0x3fdbbd(0x14c)][_0x3fdbbd(0x16b)](_0x2c6bad);}),_0x303f54;}[_0x282255(0x167)](_0x5c6b7f){const _0x8304ae=_0x282255;return{'id':_0x5c6b7f['id'],'threadId':_0x5c6b7f[_0x8304ae(0x192)],'ref':_0x5c6b7f['ref']};}};_0xed0191=_0x443909([_0x12fa85(0x0,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0x54a381[_0x282255(0x15b)])),_0x12fa85(0x1,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0xcafa72[_0x282255(0x1a9)])),_0x12fa85(0x2,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0x24426e[_0x282255(0x194)]))],_0xed0191);let _0x3824e5=class extends _0xcafa72[_0x282255(0x134)]{constructor(_0x326af4,_0x5aed8f){const _0x12dd6c=_0x282255;super(),this[_0x12dd6c(0x15e)]=_0x326af4,this[_0x12dd6c(0x135)]=_0x5aed8f,this[_0x12dd6c(0x183)]();}[_0x282255(0x183)](){const _0x5c6d31=_0x282255;this[_0x5c6d31(0x15e)]['dataSource']=this[_0x5c6d31(0x135)],this['_threadCommentDataSourceService'][_0x5c6d31(0x18e)]=!0x1;}};_0x3824e5=_0x443909([_0x12fa85(0x0,_0x36a034[_0x282255(0x1b7)]),_0x12fa85(0x1,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0xed0191))],_0x3824e5);function _0x39446a(_0x29c46c){'@babel/helpers - typeof';const _0x1b66ac=_0x282255;return _0x39446a=typeof Symbol==_0x1b66ac(0x187)&&typeof Symbol['iterator']=='symbol'?function(_0x3a4e50){return typeof _0x3a4e50;}:function(_0xbe2e2d){const _0x200ed6=_0x1b66ac;return _0xbe2e2d&&typeof Symbol==_0x200ed6(0x187)&&_0xbe2e2d['constructor']===Symbol&&_0xbe2e2d!==Symbol[_0x200ed6(0x151)]?_0x200ed6(0x1a4):typeof _0xbe2e2d;},_0x39446a(_0x29c46c);}function _0x37691a(_0x5d5835,_0x137d55){const _0x1f7164=_0x282255;if(_0x39446a(_0x5d5835)!=_0x1f7164(0x198)||!_0x5d5835)return _0x5d5835;var _0x313f72=_0x5d5835[Symbol[_0x1f7164(0x14a)]];if(_0x313f72!==void 0x0){var _0x5883fa=_0x313f72[_0x1f7164(0x170)](_0x5d5835,_0x137d55||_0x1f7164(0x184));if(_0x39446a(_0x5883fa)!=_0x1f7164(0x198))return _0x5883fa;throw TypeError(_0x1f7164(0x14e));}return(_0x137d55===_0x1f7164(0x199)?String:Number)(_0x5d5835);}function _0x369642(_0x5e7d56){const _0xa31c96=_0x282255;var _0x1ad395=_0x37691a(_0x5e7d56,_0xa31c96(0x199));return _0x39446a(_0x1ad395)==_0xa31c96(0x1a4)?_0x1ad395:_0x1ad395+'';}function _0xba2950(_0x3ba3c0,_0x257317,_0x50bf5f){const _0x37916f=_0x282255;return(_0x257317=_0x369642(_0x257317))in _0x3ba3c0?Object[_0x37916f(0x193)](_0x3ba3c0,_0x257317,{'value':_0x50bf5f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3ba3c0[_0x257317]=_0x50bf5f,_0x3ba3c0;}let _0xd1b644=class extends _0xcafa72[_0x282255(0x19b)]{constructor(_0x58de19=_0x59a1a7,_0x511526,_0x35f073){const _0x457cee=_0x282255;super(),this[_0x457cee(0x14b)]=_0x58de19,this[_0x457cee(0x197)]=_0x511526,this[_0x457cee(0x157)]=_0x35f073;let {..._0xe96e15}=(0x0,_0xcafa72['merge'])({},_0x59a1a7,this['_config']);this[_0x457cee(0x157)]['setConfig']('thread-comment-data-source.config',_0xe96e15);}[_0x282255(0x1a8)](){[[_0xed0191],[_0x3824e5],[_0x51eb27]]['forEach'](_0x15d335=>{const _0x3e61bb=_0x5ebb;this[_0x3e61bb(0x197)]['add'](_0x15d335);});}[_0x282255(0x1be)](){const _0xe0cca=_0x282255;this['_injector'][_0xe0cca(0x1ad)](_0x3824e5),this['_injector'][_0xe0cca(0x1ad)](_0x51eb27);}};_0xba2950(_0xd1b644,'pluginName',_0x282255(0x182)),_0xba2950(_0xd1b644,_0x282255(0x13a),_0xee7654),_0xba2950(_0xd1b644,'version',_0x1b82ed),_0xd1b644=_0x443909([(0x0,_0xcafa72[_0x282255(0x139)])(_0x48398d[_0x282255(0x1ae)],_0x24426e[_0x282255(0x163)],_0x4a513d['UniverLicensePlugin']),_0x12fa85(0x1,(0x0,_0xcafa72[_0x282255(0x1bb)])(_0xcafa72[_0x282255(0x18a)])),_0x12fa85(0x2,_0xcafa72[_0x282255(0x13f)])],_0xd1b644),Object['defineProperty'](_0x33f0e5,_0x282255(0x17d),{'enumerable':!0x0,'get':function(){return _0xd1b644;}});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "private": false,
5
5
  "description": "Remote data source integration for Univer thread comments.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -51,19 +51,19 @@
51
51
  "rxjs": ">=7.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "@univerjs-pro/license": "0.25.0",
55
- "@univerjs-pro/collaboration-client": "0.25.0",
56
- "@univerjs/network": "0.25.0",
57
- "@univerjs/protocol": "0.25.0",
58
- "@univerjs/core": "0.25.0",
59
- "@univerjs/thread-comment": "0.25.0",
60
- "@univerjs/thread-comment-ui": "0.25.0"
54
+ "@univerjs-pro/collaboration-client": "0.25.1",
55
+ "@univerjs/core": "0.25.1",
56
+ "@univerjs-pro/license": "0.25.1",
57
+ "@univerjs/network": "0.25.1",
58
+ "@univerjs/thread-comment": "0.25.1",
59
+ "@univerjs/thread-comment-ui": "0.25.1",
60
+ "@univerjs/protocol": "0.25.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "rxjs": "7.8.2",
64
64
  "typescript": "^6.0.3",
65
65
  "vitest": "^4.1.6",
66
- "@univerjs-infra/shared": "0.25.0"
66
+ "@univerjs-infra/shared": "0.25.1"
67
67
  },
68
68
  "scripts": {
69
69
  "test": "vitest run",