@univerjs-pro/thread-comment-datasource 0.12.3 → 0.12.4-experimental.20251210-8d33c6e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x15a997=_0x5748;(function(_0x35cf59,_0x2adf24){const _0x92dd60=_0x5748,_0x1e1910=_0x35cf59();while(!![]){try{const _0x5371ae=-parseInt(_0x92dd60(0x226))/0x1*(parseInt(_0x92dd60(0x1c2))/0x2)+parseInt(_0x92dd60(0x210))/0x3*(parseInt(_0x92dd60(0x1dd))/0x4)+-parseInt(_0x92dd60(0x1e9))/0x5*(-parseInt(_0x92dd60(0x1c6))/0x6)+parseInt(_0x92dd60(0x1c5))/0x7+parseInt(_0x92dd60(0x1b8))/0x8+parseInt(_0x92dd60(0x22a))/0x9+parseInt(_0x92dd60(0x228))/0xa*(-parseInt(_0x92dd60(0x1fe))/0xb);if(_0x5371ae===_0x2adf24)break;else _0x1e1910['push'](_0x1e1910['shift']());}catch(_0x3b58bd){_0x1e1910['push'](_0x1e1910['shift']());}}}(_0x532b,0xb16b5));Object[_0x15a997(0x1f5)](exports,Symbol[_0x15a997(0x1e7)],{'value':_0x15a997(0x1b2)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x165252=>(_0x165252[_0x165252[_0x15a997(0x220)]=0x0]=_0x15a997(0x220),_0x165252[_0x165252[_0x15a997(0x1f7)]=0x1]='Solved',_0x165252[_0x165252[_0x15a997(0x1f8)]=-0x1]=_0x15a997(0x1f8),_0x165252))(I||{}),v=(_0x10786b=>(_0x10786b[_0x10786b['Unknown']=0x0]=_0x15a997(0x223),_0x10786b[_0x10786b['Add']=0x1]=_0x15a997(0x227),_0x10786b[_0x10786b[_0x15a997(0x21b)]=0x2]='Reply',_0x10786b[_0x10786b['Edit']=0x3]='Edit',_0x10786b[_0x10786b['Delete']=0x4]='Delete',_0x10786b[_0x10786b[_0x15a997(0x1bd)]=0x5]=_0x15a997(0x1bd),_0x10786b[_0x10786b[_0x15a997(0x1f8)]=-0x1]=_0x15a997(0x1f8),_0x10786b))(v||{});const f=_0x5497e3=>c[_0x15a997(0x205)](new Date(+_0x5497e3))[_0x15a997(0x22b)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x281528,_0x26248f)=>{const _0x5d36e1=_0x15a997,_0x5fe2e9=_0x281528[_0x5d36e1(0x1ea)](c['UserManagerService']),_0x436a23=_0x281528[_0x5d36e1(0x1ea)](P[_0x5d36e1(0x1d3)]);_0x26248f[_0x5d36e1(0x1fd)](_0x16ef47=>{const _0x53a1ef=_0x5d36e1;_0x5fe2e9[_0x53a1ef(0x1d9)](_0x16ef47)&&_0x26248f['delete'](_0x16ef47);}),_0x26248f[_0x5d36e1(0x1c1)]&&(await _0x436a23['get'](_0x5d36e1(0x1d5),{'params':{'userIDs':[..._0x26248f]}}))[_0x5d36e1(0x219)]['users'][_0x5d36e1(0x1fd)](_0x38440c=>{const _0x376eee=_0x5d36e1;_0x38440c&&_0x5fe2e9[_0x376eee(0x1fb)](_0x38440c);});};var $=Object[_0x15a997(0x1bb)],E=(_0x1a8947,_0x2c5bad,_0x5d5441,_0x447673)=>{const _0x52edeb=_0x15a997;for(var _0x59610a=_0x447673>0x1?void 0x0:_0x447673?$(_0x2c5bad,_0x5d5441):_0x2c5bad,_0x1a3f55=_0x1a8947[_0x52edeb(0x217)]-0x1,_0x5b82bb;_0x1a3f55>=0x0;_0x1a3f55--)(_0x5b82bb=_0x1a8947[_0x1a3f55])&&(_0x59610a=_0x5b82bb(_0x59610a)||_0x59610a);return _0x59610a;},S=(_0x47042b,_0x17272b)=>(_0x49da53,_0x463677)=>_0x17272b(_0x49da53,_0x463677,_0x47042b);let _=class extends c[_0x15a997(0x1e1)]{constructor(_0x4f17f0,_0x1827dc,_0x45c786,_0x13f1ce){const _0x15cb68=_0x15a997;super(),this[_0x15cb68(0x218)]=_0x4f17f0,this[_0x15cb68(0x202)]=_0x1827dc,this[_0x15cb68(0x21a)]=_0x45c786,this['_injector']=_0x13f1ce,this['_init'](),this[_0x15cb68(0x214)]();}[_0x15a997(0x214)](){const _0x475779=_0x15a997;this[_0x475779(0x222)](this[_0x475779(0x202)][_0x475779(0x204)][_0x475779(0x1f3)](j[_0x475779(0x211)](0x10))[_0x475779(0x21c)](_0xa83222=>{const _0x4e2246=_0x475779,_0x358653=new Set();_0xa83222[_0x4e2246(0x1fd)](_0x575efc=>{const _0x59be20=_0x4e2246;switch(_0x575efc[_0x59be20(0x1be)]){case'add':{const _0x214152=_0x575efc[_0x59be20(0x21f)]['personId'];_0x358653[_0x59be20(0x1e8)](_0x214152);break;}}}),R(this[_0x4e2246(0x1c3)],_0x358653);}));}['_init'](){const _0x1bf17f=_0x15a997;this[_0x1bf17f(0x222)](this[_0x1bf17f(0x218)]['commentUpdate$'][_0x1bf17f(0x21c)](async _0x3c33c8=>{const _0x5d29fe=_0x1bf17f;var _0x565205,_0x2484a8,_0x3b47e6,_0x1deccb;const _0x192599=(_0x565205=this[_0x5d29fe(0x202)]['getUnit'](_0x3c33c8[_0x5d29fe(0x1dc)])['find'](_0x547349=>_0x547349[_0x5d29fe(0x1c7)]===_0x3c33c8[_0x5d29fe(0x1c7)]))==null?void 0x0:_0x565205[_0x5d29fe(0x216)];if(!_0x192599)return;const {unitId:_0x437549,subUnitId:_0x1d1c08}=_0x192599;switch(_0x3c33c8[_0x5d29fe(0x215)]&&this[_0x5d29fe(0x21a)][_0x5d29fe(0x1fb)](_0x3c33c8[_0x5d29fe(0x215)]),_0x3c33c8[_0x5d29fe(0x1be)]){case v['Add']:break;case v[_0x5d29fe(0x21b)]:{this[_0x5d29fe(0x202)][_0x5d29fe(0x1e3)](_0x437549,_0x1d1c08,{'unitId':_0x437549,'subUnitId':_0x1d1c08,'ref':'','id':_0x3c33c8[_0x5d29fe(0x20f)],'dT':f(+_0x3c33c8[_0x5d29fe(0x1cb)]),'threadId':_0x3c33c8['threadId'],'personId':(_0x3b47e6=(_0x2484a8=_0x3c33c8['user'])==null?void 0x0:_0x2484a8['userID'])!=null?_0x3b47e6:_0x3c33c8[_0x5d29fe(0x20a)],'text':JSON[_0x5d29fe(0x1e5)](_0x3c33c8[_0x5d29fe(0x225)]),'parentId':_0x192599['id']});break;}case v[_0x5d29fe(0x209)]:{const _0x4366c0=this['_threadCommentModel'][_0x5d29fe(0x213)](_0x437549,_0x1d1c08,_0x3c33c8[_0x5d29fe(0x20f)]);_0x4366c0&&_0x4366c0[_0x5d29fe(0x203)]&&this[_0x5d29fe(0x202)][_0x5d29fe(0x206)](_0x437549,_0x1d1c08,_0x3c33c8[_0x5d29fe(0x20f)]);break;}case v[_0x5d29fe(0x20e)]:{this[_0x5d29fe(0x202)][_0x5d29fe(0x1fa)](_0x437549,_0x1d1c08,{'commentId':_0x3c33c8[_0x5d29fe(0x20f)],'text':JSON[_0x5d29fe(0x1e5)](_0x3c33c8[_0x5d29fe(0x225)])});break;}case v[_0x5d29fe(0x1bd)]:{const _0xe369b4=(_0x1deccb=this['_threadCommentModel'][_0x5d29fe(0x1d8)](_0x3c33c8[_0x5d29fe(0x1dc)])[_0x5d29fe(0x1d6)](_0x2f62bf=>_0x2f62bf[_0x5d29fe(0x1c7)]===_0x3c33c8[_0x5d29fe(0x1c7)]))==null?void 0x0:_0x1deccb[_0x5d29fe(0x216)];_0xe369b4&&this[_0x5d29fe(0x202)][_0x5d29fe(0x1e4)](_0x437549,_0x1d1c08,_0xe369b4['id'],_0x3c33c8[_0x5d29fe(0x212)]===I[_0x5d29fe(0x1f7)]);break;}}}));}};_=E([S(0x0,c[_0x15a997(0x1de)](b[_0x15a997(0x1df)])),S(0x1,c[_0x15a997(0x1de)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x15a997(0x1de)](c[_0x15a997(0x207)]))],_);const q=_0x15a997(0x21d),D={};function _0x5748(_0x3577b2,_0x44bd10){const _0x532b7b=_0x532b();return _0x5748=function(_0x5748d6,_0x4215c9){_0x5748d6=_0x5748d6-0x1b1;let _0x1fb448=_0x532b7b[_0x5748d6];return _0x1fb448;},_0x5748(_0x3577b2,_0x44bd10);}var A=Object[_0x15a997(0x1bb)],x=(_0xb35001,_0x7a4f67,_0x50ed9f,_0x288d63)=>{for(var _0x4a6863=_0x288d63>0x1?void 0x0:_0x288d63?A(_0x7a4f67,_0x50ed9f):_0x7a4f67,_0x99ac6=_0xb35001['length']-0x1,_0x1d2f38;_0x99ac6>=0x0;_0x99ac6--)(_0x1d2f38=_0xb35001[_0x99ac6])&&(_0x4a6863=_0x1d2f38(_0x4a6863)||_0x4a6863);return _0x4a6863;},C=(_0x5c9e53,_0x52ca93)=>(_0x140e1b,_0x2bae03)=>_0x52ca93(_0x140e1b,_0x2bae03,_0x5c9e53);function Y(_0x301fbc,_0x79c39b){const _0x5cb637=_0x15a997,_0x51c106=_0x301fbc['replies'][0x0];return{..._0x79c39b,'id':_0x51c106[_0x5cb637(0x20f)],'resolved':_0x301fbc[_0x5cb637(0x212)]===0x1,'dT':f(_0x51c106[_0x5cb637(0x1cb)]),'personId':_0x51c106[_0x5cb637(0x20a)],'threadId':_0x51c106[_0x5cb637(0x1c7)]};}function G(_0x2f6f72,_0x397559,_0x252094){const _0x2f6bd4=_0x15a997;var _0x314d53,_0x2d1d7e;if(((_0x2d1d7e=(_0x314d53=_0x2f6f72==null?void 0x0:_0x2f6f72[_0x2f6bd4(0x208)])==null?void 0x0:_0x314d53['length'])!=null?_0x2d1d7e:0x0)>0x0){const _0x284399=(_0x34fa9d,_0x177cb1)=>({'id':_0x34fa9d[_0x2f6bd4(0x20f)],'threadId':_0x34fa9d['threadId'],'dT':f(_0x34fa9d[_0x2f6bd4(0x1cb)]),'personId':_0x34fa9d[_0x2f6bd4(0x20a)],'resolved':_0x2f6f72[_0x2f6bd4(0x212)]===I[_0x2f6bd4(0x1f7)],'unitId':_0x397559,'subUnitId':_0x252094,'text':JSON[_0x2f6bd4(0x1e5)](_0x34fa9d['content']),'parentId':_0x177cb1}),_0x4e418f=_0x284399(_0x2f6f72[_0x2f6bd4(0x208)][0x0]);return{..._0x4e418f,'children':_0x2f6f72[_0x2f6bd4(0x208)][_0x2f6bd4(0x1f6)](0x1)[_0x2f6bd4(0x1cd)](_0x52ac40=>_0x284399(_0x52ac40,_0x4e418f['id']))};}return null;}let p=class{constructor(_0x553c17,_0x5b40dd,_0x3f9a89){const _0x34400f=_0x15a997;this[_0x34400f(0x1ce)]=_0x553c17,this[_0x34400f(0x21a)]=_0x5b40dd,this[_0x34400f(0x1b4)]=_0x3f9a89;}async[_0x15a997(0x1e3)](_0x2732ce){const _0x54b979=_0x15a997;var _0x5ca4e8,_0x300f1b;const {parentId:_0x2bf8d0,unitId:_0x387365,text:_0xf197a5,threadId:_0x2e6526}=_0x2732ce,_0xcfa58c=(_0x300f1b=(_0x5ca4e8=_0xf197a5['customRanges'])==null?void 0x0:_0x5ca4e8['filter'](_0x5cf4dd=>_0x5cf4dd[_0x54b979(0x1bc)]===c[_0x54b979(0x1d1)]['COMMENT'])[_0x54b979(0x1cd)](_0x52233c=>_0x52233c['rangeId']))!=null?_0x300f1b:[],_0x5eb873=JSON['stringify'](_0xf197a5),_0x25b0cc=(await this[_0x54b979(0x1b4)][_0x54b979(0x1e6)](_0x387365))['getMemberID']();if(_0x2bf8d0){const _0x456e8d={'memberId':_0x25b0cc,'unitId':_0x387365,'content':_0x5eb873,'mention':_0xcfa58c,'threadId':_0x2e6526},_0x5bcfea=(await this['_httpService'][_0x54b979(0x1c9)](_0x54b979(0x1cf)+_0x387365+_0x54b979(0x22c),{'body':_0x456e8d}))[_0x54b979(0x219)][_0x54b979(0x1d2)];return{..._0x2732ce,'id':_0x5bcfea[_0x54b979(0x20f)],'dT':c[_0x54b979(0x205)](+_0x5bcfea[_0x54b979(0x1cb)])[_0x54b979(0x22b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5bcfea[_0x54b979(0x20a)]};}else{const _0x5c20fc={'memberId':_0x25b0cc,'unitId':_0x387365,'content':_0x5eb873,'mention':_0xcfa58c},_0x46eee9=await this[_0x54b979(0x1ce)]['post']('/universer-api/comment/unit/'+_0x387365+_0x54b979(0x1db),{'body':_0x5c20fc});return Y(_0x46eee9[_0x54b979(0x219)][_0x54b979(0x1ef)],_0x2732ce);}}async['updateComment'](_0x3de5be){const _0xb392aa=_0x15a997;var _0x31c4d0,_0x354d48;const {text:_0x1ca0cf,unitId:_0x5cb877}=_0x3de5be,_0xbd752b=(_0x354d48=(_0x31c4d0=_0x1ca0cf[_0xb392aa(0x1ee)])==null?void 0x0:_0x31c4d0[_0xb392aa(0x1b6)](_0x186152=>_0x186152[_0xb392aa(0x1bc)]===c[_0xb392aa(0x1d1)][_0xb392aa(0x1f1)])[_0xb392aa(0x1cd)](_0x480d16=>_0x480d16[_0xb392aa(0x20c)]))!=null?_0x354d48:[],_0x4687c2=JSON[_0xb392aa(0x1d7)](_0x1ca0cf),_0x6629b1=_0x3de5be[_0xb392aa(0x1c7)],_0x4c6345=_0x3de5be['id'],_0x2386e9={'memberId':(await this['_sessionService']['requireSession'](_0x5cb877))['getMemberID'](),'unitId':_0x5cb877,'threadId':_0x6629b1,'mention':_0xbd752b,'content':_0x4687c2,'replyId':_0x4c6345},_0x42db5f=await this[_0xb392aa(0x1ce)][_0xb392aa(0x1c9)](_0xb392aa(0x1cf)+_0x5cb877+'/edit',{'body':_0x2386e9});return!_0x42db5f['body'][_0xb392aa(0x1f0)]||_0x42db5f[_0xb392aa(0x219)][_0xb392aa(0x1f0)]['code']===0x1;}async[_0x15a997(0x1e4)](_0x3fbdd0){const _0x265b15=_0x15a997,{unitId:_0x171b5e}=_0x3fbdd0,_0xa76af=_0x3fbdd0[_0x265b15(0x1c7)],_0x5a0cea={'memberId':this['_userService'][_0x265b15(0x1ec)]()[_0x265b15(0x201)],'unitId':_0x171b5e,'threadId':_0xa76af,'solved':_0x3fbdd0[_0x265b15(0x1fc)]?I[_0x265b15(0x1f7)]:I[_0x265b15(0x220)]},_0x3ee6a2=await this[_0x265b15(0x1ce)]['post'](_0x265b15(0x1cf)+_0x171b5e+'/solved',{'body':_0x5a0cea});return!_0x3ee6a2[_0x265b15(0x219)][_0x265b15(0x1f0)]||_0x3ee6a2[_0x265b15(0x219)][_0x265b15(0x1f0)][_0x265b15(0x221)]===0x1;}async[_0x15a997(0x206)](_0xa6a345,_0x400ecf,_0x1a1fff,_0x1ce96a){const _0x2c35f9=_0x15a997,_0x29e94c={'memberId':(await this[_0x2c35f9(0x1b4)][_0x2c35f9(0x1e6)](_0xa6a345))['getMemberID'](),'threadId':_0x1a1fff,'replyId':_0x1ce96a,'unitId':_0xa6a345},_0x2c25b1=await this[_0x2c35f9(0x1ce)][_0x2c35f9(0x1c9)](_0x2c35f9(0x1cf)+_0xa6a345+_0x2c35f9(0x1ed),{'body':_0x29e94c});return!_0x2c25b1['body'][_0x2c35f9(0x1f0)]||_0x2c25b1[_0x2c35f9(0x219)][_0x2c35f9(0x1f0)][_0x2c35f9(0x221)]===0x1;}async[_0x15a997(0x1c0)](_0x204f8d,_0x4bcd05,_0x5ba462){const _0xf936df=_0x15a997,_0x362418={'unitId':_0x204f8d,'threadId':_0x5ba462},_0x49c38b=await this[_0xf936df(0x1ce)][_0xf936df(0x1c9)]('/universer-api/comment/unit/'+_0x204f8d+_0xf936df(0x1ff),{'body':_0x362418}),_0x5c048b=_0x5ba462[_0xf936df(0x1cd)](_0x22d230=>G(_0x49c38b['body'][_0xf936df(0x1b9)][_0x22d230],_0x204f8d,_0x4bcd05))['filter'](Boolean);return Object[_0xf936df(0x1d4)](_0x49c38b[_0xf936df(0x219)][_0xf936df(0x1f9)])[_0xf936df(0x1fd)](_0x520919=>{const _0x4d99d1=_0xf936df;this[_0x4d99d1(0x21a)][_0x4d99d1(0x1fb)](_0x520919);}),_0x5c048b;}[_0x15a997(0x1ca)](_0x460596){const _0xf438fe=_0x15a997;return{'id':_0x460596['id'],'threadId':_0x460596['threadId'],'ref':_0x460596[_0xf438fe(0x1eb)]};}};p=x([C(0x0,c[_0x15a997(0x1de)](P[_0x15a997(0x1d3)])),C(0x1,c['Inject'](c[_0x15a997(0x1c4)])),C(0x2,c[_0x15a997(0x1de)](b[_0x15a997(0x1f4)]))],p);function _0x532b(){const _0x4c4cdf=['stringify','getUnit','getUser','_config','/add','unitId','8ULQCoo','Inject','CommentService','onStarting','Disposable','_configService','addComment','resolveComment','parse','requireSession','toStringTag','add','5VWgTKH','get','ref','getCurrentUser','/delete','customRanges','comment','error','COMMENT','_initDataSource','pipe','CollaborationSessionService','defineProperty','slice','Solved','UNRECOGNIZED','users','updateComment','addUser','resolved','forEach','34166BrflDe','/list','UniverCollaborationClientPlugin','userID','_threadCommentModel','parentId','commentUpdate$','dayjs','deleteComment','Injector','replies','Delete','userId','setConfig','rangeId','DependentOn','Edit','replyId','1109154MVUlAy','bufferTime','solved','getComment','_initUserSync','user','root','length','_commentService','body','_userService','Reply','subscribe','thread-comment-data-source.config','IThreadCommentDataSourceService','payload','OpenOrReOpen','code','disposeWithMe','Unknown','IConfigService','content','2339nxZRDo','Add','5790QCinHI','Plugin','5297175rBKDCy','format','/reply','UniverLicensePlugin','_threadCommentDataSource','Module','UNIVER_UNKNOWN','_sessionService','_threadCommentDataSourceService','filter','symbol','7240376EdIoxV','comments','UniverInstanceType','getOwnPropertyDescriptor','rangeType','Solve','type','UniverThreadCommentUIPlugin','listComments','size','802XaGiKL','_injector','UserManagerService','1219253jdtqVj','6334710Gzdsoe','threadId','dataSource','post','saveCommentToSnapshot','createTimestamp','pluginName','map','_httpService','/universer-api/comment/unit/','UniverThreadCommentDataSourcePlugin','CustomRangeType','reply','HTTPService','values','/universer-api/user/list','find'];_0x532b=function(){return _0x4c4cdf;};return _0x532b();}var H=Object[_0x15a997(0x1bb)],J=(_0x5d6208,_0x3a4fc0,_0x56173f,_0x575b5f)=>{const _0x6c855a=_0x15a997;for(var _0x5c0feb=_0x575b5f>0x1?void 0x0:_0x575b5f?H(_0x3a4fc0,_0x56173f):_0x3a4fc0,_0x4d7b3b=_0x5d6208[_0x6c855a(0x217)]-0x1,_0x8051f4;_0x4d7b3b>=0x0;_0x4d7b3b--)(_0x8051f4=_0x5d6208[_0x4d7b3b])&&(_0x5c0feb=_0x8051f4(_0x5c0feb)||_0x5c0feb);return _0x5c0feb;},y=(_0x2fd9ab,_0x385d7f)=>(_0x278747,_0x1c1ab1)=>_0x385d7f(_0x278747,_0x1c1ab1,_0x2fd9ab);let g=class extends c[_0x15a997(0x1e1)]{constructor(_0x309199,_0x31eefa){const _0x4a6a33=_0x15a997;super(),this['_threadCommentDataSourceService']=_0x309199,this[_0x4a6a33(0x1b1)]=_0x31eefa,this[_0x4a6a33(0x1f2)]();}['_initDataSource'](){const _0xf4b7ec=_0x15a997;this[_0xf4b7ec(0x1b5)][_0xf4b7ec(0x1c8)]=this[_0xf4b7ec(0x1b1)],this[_0xf4b7ec(0x1b5)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x15a997(0x21e)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x15a997(0x1f5)],L=Object[_0x15a997(0x1bb)],Z=(_0x21cbca,_0x5295dc,_0x23292a)=>_0x5295dc in _0x21cbca?F(_0x21cbca,_0x5295dc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23292a}):_0x21cbca[_0x5295dc]=_0x23292a,W=(_0x3b9afe,_0x3b1a61,_0x1043ef,_0x348d42)=>{const _0x278083=_0x15a997;for(var _0x29ba33=_0x348d42>0x1?void 0x0:_0x348d42?L(_0x3b1a61,_0x1043ef):_0x3b1a61,_0x364840=_0x3b9afe[_0x278083(0x217)]-0x1,_0x5b4049;_0x364840>=0x0;_0x364840--)(_0x5b4049=_0x3b9afe[_0x364840])&&(_0x29ba33=_0x5b4049(_0x29ba33)||_0x29ba33);return _0x29ba33;},O=(_0x587ef7,_0x54df89)=>(_0x25f1ab,_0x12a783)=>_0x54df89(_0x25f1ab,_0x12a783,_0x587ef7),N=(_0x58736f,_0x3f3aae,_0x29c8a8)=>Z(_0x58736f,typeof _0x3f3aae!=_0x15a997(0x1b7)?_0x3f3aae+'':_0x3f3aae,_0x29c8a8);exports[_0x15a997(0x1d0)]=class extends c[_0x15a997(0x229)]{constructor(_0x3154db=D,_0x4f94bd,_0xa0573b){const _0x441c93=_0x15a997;super(),this['_config']=_0x3154db,this[_0x441c93(0x1c3)]=_0x4f94bd,this[_0x441c93(0x1e2)]=_0xa0573b;const {..._0x59a8f6}=c['merge']({},D,this[_0x441c93(0x1da)]);this[_0x441c93(0x1e2)][_0x441c93(0x20b)](q,_0x59a8f6);}[_0x15a997(0x1e0)](){const _0x34aa84=_0x15a997;[[p],[g],[_]][_0x34aa84(0x1fd)](_0x1e7e9e=>{const _0x2ef6d0=_0x34aa84;this[_0x2ef6d0(0x1c3)][_0x2ef6d0(0x1e8)](_0x1e7e9e);});}['onReady'](){const _0x5b8e85=_0x15a997;this[_0x5b8e85(0x1c3)][_0x5b8e85(0x1ea)](g),this[_0x5b8e85(0x1c3)][_0x5b8e85(0x1ea)](_);}},N(exports[_0x15a997(0x1d0)],_0x15a997(0x1cc),U),N(exports[_0x15a997(0x1d0)],_0x15a997(0x1be),c[_0x15a997(0x1ba)][_0x15a997(0x1b3)]),exports[_0x15a997(0x1d0)]=W([c[_0x15a997(0x20d)](w[_0x15a997(0x1bf)],b[_0x15a997(0x200)],T[_0x15a997(0x22d)]),O(0x1,c[_0x15a997(0x1de)](c['Injector'])),O(0x2,c[_0x15a997(0x224)])],exports[_0x15a997(0x1d0)]);
1
+ 'use strict';const _0x28d56f=_0xa6c0;(function(_0x18585f,_0x4ba20f){const _0x2d4015=_0xa6c0,_0x3f62b0=_0x18585f();while(!![]){try{const _0x22489d=-parseInt(_0x2d4015(0x22e))/0x1+-parseInt(_0x2d4015(0x21e))/0x2+parseInt(_0x2d4015(0x205))/0x3+-parseInt(_0x2d4015(0x1db))/0x4+-parseInt(_0x2d4015(0x208))/0x5+-parseInt(_0x2d4015(0x202))/0x6*(-parseInt(_0x2d4015(0x1de))/0x7)+parseInt(_0x2d4015(0x23d))/0x8;if(_0x22489d===_0x4ba20f)break;else _0x3f62b0['push'](_0x3f62b0['shift']());}catch(_0x22586e){_0x3f62b0['push'](_0x3f62b0['shift']());}}}(_0x4240,0xdcb17));Object[_0x28d56f(0x1e2)](exports,Symbol[_0x28d56f(0x1d9)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x28d56f(0x1ed);function _0xa6c0(_0x3b0839,_0x5af8dd){_0x3b0839=_0x3b0839-0x1cc;const _0x4240fb=_0x4240();let _0xa6c063=_0x4240fb[_0x3b0839];return _0xa6c063;}var I=(_0x30daf0=>(_0x30daf0[_0x30daf0[_0x28d56f(0x1e7)]=0x0]=_0x28d56f(0x1e7),_0x30daf0[_0x30daf0[_0x28d56f(0x1f1)]=0x1]=_0x28d56f(0x1f1),_0x30daf0[_0x30daf0[_0x28d56f(0x1e1)]=-0x1]=_0x28d56f(0x1e1),_0x30daf0))(I||{}),v=(_0x39f364=>(_0x39f364[_0x39f364[_0x28d56f(0x1fd)]=0x0]=_0x28d56f(0x1fd),_0x39f364[_0x39f364[_0x28d56f(0x1e5)]=0x1]=_0x28d56f(0x1e5),_0x39f364[_0x39f364['Reply']=0x2]=_0x28d56f(0x225),_0x39f364[_0x39f364['Edit']=0x3]=_0x28d56f(0x1d3),_0x39f364[_0x39f364['Delete']=0x4]=_0x28d56f(0x209),_0x39f364[_0x39f364['Solve']=0x5]=_0x28d56f(0x1e4),_0x39f364[_0x39f364[_0x28d56f(0x1e1)]=-0x1]=_0x28d56f(0x1e1),_0x39f364))(v||{});const f=_0x1ed9a5=>c[_0x28d56f(0x1e9)](new Date(+_0x1ed9a5))[_0x28d56f(0x22a)](_0x28d56f(0x223)),R=async(_0x36c6fe,_0x4f428c)=>{const _0x5a78a9=_0x28d56f,_0x58c1e4=_0x36c6fe[_0x5a78a9(0x224)](c[_0x5a78a9(0x217)]),_0x5e2531=_0x36c6fe[_0x5a78a9(0x224)](P[_0x5a78a9(0x1ec)]);_0x4f428c['forEach'](_0x4ea9b8=>{const _0x38a885=_0x5a78a9;_0x58c1e4[_0x38a885(0x1d0)](_0x4ea9b8)&&_0x4f428c[_0x38a885(0x220)](_0x4ea9b8);}),_0x4f428c[_0x5a78a9(0x23a)]&&(await _0x5e2531['get'](_0x5a78a9(0x200),{'params':{'userIDs':[..._0x4f428c]}}))['body']['users']['forEach'](_0x213201=>{const _0x596385=_0x5a78a9;_0x213201&&_0x58c1e4[_0x596385(0x218)](_0x213201);});};var $=Object[_0x28d56f(0x1e8)],E=(_0x2d6d77,_0x21a4e8,_0xd0357b,_0x4d91ff)=>{const _0x41a01f=_0x28d56f;for(var _0x411914=_0x4d91ff>0x1?void 0x0:_0x4d91ff?$(_0x21a4e8,_0xd0357b):_0x21a4e8,_0x53addd=_0x2d6d77[_0x41a01f(0x20b)]-0x1,_0x5c9e2c;_0x53addd>=0x0;_0x53addd--)(_0x5c9e2c=_0x2d6d77[_0x53addd])&&(_0x411914=_0x5c9e2c(_0x411914)||_0x411914);return _0x411914;},S=(_0x1fc235,_0x423dde)=>(_0x47f8d1,_0x483375)=>_0x423dde(_0x47f8d1,_0x483375,_0x1fc235);let _=class extends c[_0x28d56f(0x240)]{constructor(_0x2ea5d2,_0x2798d4,_0x4bc340,_0x4e06b2){const _0x298117=_0x28d56f;super(),this['_commentService']=_0x2ea5d2,this['_threadCommentModel']=_0x2798d4,this[_0x298117(0x20a)]=_0x4bc340,this[_0x298117(0x21d)]=_0x4e06b2,this[_0x298117(0x1ef)](),this[_0x298117(0x228)]();}[_0x28d56f(0x228)](){const _0x1e9553=_0x28d56f;this[_0x1e9553(0x206)](this[_0x1e9553(0x216)]['commentUpdate$'][_0x1e9553(0x203)](j[_0x1e9553(0x1d5)](0x10))[_0x1e9553(0x207)](_0x1e8472=>{const _0x467132=_0x1e9553,_0x47e0a9=new Set();_0x1e8472['forEach'](_0x52d306=>{const _0x5b0a28=_0xa6c0;switch(_0x52d306[_0x5b0a28(0x1d7)]){case'add':{const _0x3fdc64=_0x52d306[_0x5b0a28(0x1fc)][_0x5b0a28(0x239)];_0x47e0a9[_0x5b0a28(0x231)](_0x3fdc64);break;}}}),R(this[_0x467132(0x21d)],_0x47e0a9);}));}[_0x28d56f(0x1ef)](){const _0x3e6f68=_0x28d56f;this[_0x3e6f68(0x206)](this[_0x3e6f68(0x23b)][_0x3e6f68(0x234)][_0x3e6f68(0x207)](async _0x565678=>{const _0x315926=_0x3e6f68;var _0x68f716,_0x3f4691,_0x3c4cb3,_0x10beb1;const _0x4aa3d5=(_0x68f716=this[_0x315926(0x216)][_0x315926(0x1cd)](_0x565678[_0x315926(0x1e3)])[_0x315926(0x219)](_0x520b59=>_0x520b59[_0x315926(0x21a)]===_0x565678[_0x315926(0x21a)]))==null?void 0x0:_0x68f716[_0x315926(0x1f4)];if(!_0x4aa3d5)return;const {unitId:_0x78e629,subUnitId:_0x282c8d}=_0x4aa3d5;switch(_0x565678[_0x315926(0x1d1)]&&this[_0x315926(0x20a)][_0x315926(0x218)](_0x565678[_0x315926(0x1d1)]),_0x565678[_0x315926(0x1d7)]){case v[_0x315926(0x1e5)]:break;case v[_0x315926(0x225)]:{this[_0x315926(0x216)][_0x315926(0x1f5)](_0x78e629,_0x282c8d,{'unitId':_0x78e629,'subUnitId':_0x282c8d,'ref':'','id':_0x565678[_0x315926(0x1f7)],'dT':f(+_0x565678[_0x315926(0x1da)]),'threadId':_0x565678[_0x315926(0x21a)],'personId':(_0x3c4cb3=(_0x3f4691=_0x565678['user'])==null?void 0x0:_0x3f4691[_0x315926(0x1f9)])!=null?_0x3c4cb3:_0x565678['userId'],'text':JSON[_0x315926(0x1dd)](_0x565678[_0x315926(0x22d)]),'parentId':_0x4aa3d5['id']});break;}case v[_0x315926(0x209)]:{const _0x345061=this[_0x315926(0x216)][_0x315926(0x21f)](_0x78e629,_0x282c8d,_0x565678['replyId']);_0x345061&&_0x345061['parentId']&&this['_threadCommentModel'][_0x315926(0x214)](_0x78e629,_0x282c8d,_0x565678[_0x315926(0x1f7)]);break;}case v[_0x315926(0x1d3)]:{this[_0x315926(0x216)][_0x315926(0x23c)](_0x78e629,_0x282c8d,{'commentId':_0x565678[_0x315926(0x1f7)],'text':JSON['parse'](_0x565678['content'])});break;}case v[_0x315926(0x1e4)]:{const _0x4f84c0=(_0x10beb1=this[_0x315926(0x216)][_0x315926(0x1cd)](_0x565678[_0x315926(0x1e3)])['find'](_0x5e4b5b=>_0x5e4b5b[_0x315926(0x21a)]===_0x565678[_0x315926(0x21a)]))==null?void 0x0:_0x10beb1[_0x315926(0x1f4)];_0x4f84c0&&this[_0x315926(0x216)][_0x315926(0x1fe)](_0x78e629,_0x282c8d,_0x4f84c0['id'],_0x565678[_0x315926(0x1d8)]===I[_0x315926(0x1f1)]);break;}}}));}};function _0x4240(){const _0x5ca9af=['UniverInstanceType','_threadCommentDataSourceService','ThreadCommentModel','thread-comment-data-source.config','requireSession','getUnit','/list','CustomRangeType','getUser','user','rangeId','Edit','saveCommentToSnapshot','bufferTime','Inject','type','solved','toStringTag','createTimestamp','5528652bUvOwL','getCurrentUser','parse','186011WOIwUp','symbol','resolved','UNRECOGNIZED','defineProperty','unitId','Solve','Add','forEach','OpenOrReOpen','getOwnPropertyDescriptor','dayjs','rangeType','syncUpdateMutationToColla','HTTPService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','_init','getMemberID','Solved','ref','map','root','addComment','customRanges','replyId','onStarting','userID','_httpService','_sessionService','payload','Unknown','resolveComment','DependentOn','/universer-api/user/list','comments','30OuCZxi','pipe','_configService','4842231KvmAAL','disposeWithMe','subscribe','4288345wRVwUy','Delete','_userService','length','_threadCommentDataSource','values','Injector','onReady','UniverThreadCommentUIPlugin','/reply','/add','error','deleteComment','Plugin','_threadCommentModel','UserManagerService','addUser','find','threadId','comment','/universer-api/comment/unit/','_injector','1966776HoiUmT','getComment','delete','code','listComments','YYYY/MM/DD\x20HH:mm','get','Reply','CommentService','filter','_initUserSync','/solved','format','UniverCollaborationClientPlugin','COMMENT','content','1171837qNmdoM','post','body','add','/delete','UniverThreadCommentDataSourcePlugin','commentUpdate$','_config','UNIVER_UNKNOWN','CollaborationSessionService','replies','personId','size','_commentService','updateComment','28416592UBEOvQ','userId','_initDataSource','Disposable'];_0x4240=function(){return _0x5ca9af;};return _0x4240();}_=E([S(0x0,c[_0x28d56f(0x1d6)](b[_0x28d56f(0x226)])),S(0x1,c['Inject'](M[_0x28d56f(0x243)])),S(0x2,c[_0x28d56f(0x1d6)](c['UserManagerService'])),S(0x3,c[_0x28d56f(0x1d6)](c[_0x28d56f(0x20e)]))],_);const q=_0x28d56f(0x244),D={};var A=Object[_0x28d56f(0x1e8)],x=(_0x223d2c,_0x3f383c,_0x87e35c,_0x138e1e)=>{for(var _0x5af175=_0x138e1e>0x1?void 0x0:_0x138e1e?A(_0x3f383c,_0x87e35c):_0x3f383c,_0x2a21e1=_0x223d2c['length']-0x1,_0x887c43;_0x2a21e1>=0x0;_0x2a21e1--)(_0x887c43=_0x223d2c[_0x2a21e1])&&(_0x5af175=_0x887c43(_0x5af175)||_0x5af175);return _0x5af175;},C=(_0x394ee3,_0x3f077a)=>(_0x24b19c,_0xee089d)=>_0x3f077a(_0x24b19c,_0xee089d,_0x394ee3);function Y(_0x2bbd2a,_0x29ec0c){const _0x5688cf=_0x28d56f,_0x2a7a5e=_0x2bbd2a[_0x5688cf(0x238)][0x0];return{..._0x29ec0c,'id':_0x2a7a5e['replyId'],'resolved':_0x2bbd2a[_0x5688cf(0x1d8)]===0x1,'dT':f(_0x2a7a5e['createTimestamp']),'personId':_0x2a7a5e['userId'],'threadId':_0x2a7a5e[_0x5688cf(0x21a)]};}function G(_0x596c93,_0x3b07ee,_0x5f510f){const _0x4b7698=_0x28d56f;var _0x2e3a0e,_0x1d6f7e;if(((_0x1d6f7e=(_0x2e3a0e=_0x596c93==null?void 0x0:_0x596c93[_0x4b7698(0x238)])==null?void 0x0:_0x2e3a0e['length'])!=null?_0x1d6f7e:0x0)>0x0){const _0x418c1f=(_0x45740b,_0x1790ec)=>({'id':_0x45740b[_0x4b7698(0x1f7)],'threadId':_0x45740b['threadId'],'dT':f(_0x45740b[_0x4b7698(0x1da)]),'personId':_0x45740b[_0x4b7698(0x23e)],'resolved':_0x596c93[_0x4b7698(0x1d8)]===I[_0x4b7698(0x1f1)],'unitId':_0x3b07ee,'subUnitId':_0x5f510f,'text':JSON[_0x4b7698(0x1dd)](_0x45740b['content']),'parentId':_0x1790ec}),_0x31cf47=_0x418c1f(_0x596c93['replies'][0x0]);return{..._0x31cf47,'children':_0x596c93[_0x4b7698(0x238)][_0x4b7698(0x1ee)](0x1)[_0x4b7698(0x1f3)](_0x55ad72=>_0x418c1f(_0x55ad72,_0x31cf47['id']))};}return null;}let p=class{constructor(_0x3de022,_0x33ca90,_0x583fe7){const _0x32119c=_0x28d56f;this[_0x32119c(0x1fa)]=_0x3de022,this[_0x32119c(0x20a)]=_0x33ca90,this[_0x32119c(0x1fb)]=_0x583fe7;}async['addComment'](_0x5b2833){const _0x3f4703=_0x28d56f;var _0x4641fb,_0x2c89c7;const {parentId:_0xefef75,unitId:_0x3666c8,text:_0x16e396,threadId:_0x1b5f4a}=_0x5b2833,_0x3ac9ad=(_0x2c89c7=(_0x4641fb=_0x16e396['customRanges'])==null?void 0x0:_0x4641fb[_0x3f4703(0x227)](_0x2c6394=>_0x2c6394[_0x3f4703(0x1ea)]===c[_0x3f4703(0x1cf)][_0x3f4703(0x22c)])[_0x3f4703(0x1f3)](_0x35063f=>_0x35063f[_0x3f4703(0x1d2)]))!=null?_0x2c89c7:[],_0xcc4b33=JSON['stringify'](_0x16e396),_0x2506de=(await this[_0x3f4703(0x1fb)][_0x3f4703(0x1cc)](_0x3666c8))['getMemberID']();if(_0xefef75){const _0x134f54={'memberId':_0x2506de,'unitId':_0x3666c8,'content':_0xcc4b33,'mention':_0x3ac9ad,'threadId':_0x1b5f4a},_0x54cdf7=(await this[_0x3f4703(0x1fa)]['post'](_0x3f4703(0x21c)+_0x3666c8+_0x3f4703(0x211),{'body':_0x134f54}))['body']['reply'];return{..._0x5b2833,'id':_0x54cdf7['replyId'],'dT':c[_0x3f4703(0x1e9)](+_0x54cdf7[_0x3f4703(0x1da)])[_0x3f4703(0x22a)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x54cdf7['userId']};}else{const _0x2c1fab={'memberId':_0x2506de,'unitId':_0x3666c8,'content':_0xcc4b33,'mention':_0x3ac9ad},_0x5291c8=await this['_httpService'][_0x3f4703(0x22f)](_0x3f4703(0x21c)+_0x3666c8+_0x3f4703(0x212),{'body':_0x2c1fab});return Y(_0x5291c8['body'][_0x3f4703(0x21b)],_0x5b2833);}}async[_0x28d56f(0x23c)](_0x30ebc1){const _0x1eb27b=_0x28d56f;var _0x3bdbc8,_0x43c0b5;const {text:_0x2cdc64,unitId:_0x235fcf}=_0x30ebc1,_0xd2eb8=(_0x43c0b5=(_0x3bdbc8=_0x2cdc64[_0x1eb27b(0x1f6)])==null?void 0x0:_0x3bdbc8['filter'](_0xe409da=>_0xe409da[_0x1eb27b(0x1ea)]===c['CustomRangeType'][_0x1eb27b(0x22c)])[_0x1eb27b(0x1f3)](_0x26443f=>_0x26443f[_0x1eb27b(0x1d2)]))!=null?_0x43c0b5:[],_0x2f8c72=JSON['stringify'](_0x2cdc64),_0x4a0ad2=_0x30ebc1[_0x1eb27b(0x21a)],_0x16d97c=_0x30ebc1['id'],_0x1198c7={'memberId':(await this['_sessionService'][_0x1eb27b(0x1cc)](_0x235fcf))[_0x1eb27b(0x1f0)](),'unitId':_0x235fcf,'threadId':_0x4a0ad2,'mention':_0xd2eb8,'content':_0x2f8c72,'replyId':_0x16d97c},_0x4c0977=await this[_0x1eb27b(0x1fa)][_0x1eb27b(0x22f)](_0x1eb27b(0x21c)+_0x235fcf+'/edit',{'body':_0x1198c7});return!_0x4c0977[_0x1eb27b(0x230)]['error']||_0x4c0977[_0x1eb27b(0x230)][_0x1eb27b(0x213)][_0x1eb27b(0x221)]===0x1;}async[_0x28d56f(0x1fe)](_0x46c185){const _0xa3cc9b=_0x28d56f,{unitId:_0x546617}=_0x46c185,_0x2196d2=_0x46c185[_0xa3cc9b(0x21a)],_0x383842={'memberId':this[_0xa3cc9b(0x20a)][_0xa3cc9b(0x1dc)]()['userID'],'unitId':_0x546617,'threadId':_0x2196d2,'solved':_0x46c185[_0xa3cc9b(0x1e0)]?I[_0xa3cc9b(0x1f1)]:I[_0xa3cc9b(0x1e7)]},_0x9fcbe1=await this[_0xa3cc9b(0x1fa)][_0xa3cc9b(0x22f)](_0xa3cc9b(0x21c)+_0x546617+_0xa3cc9b(0x229),{'body':_0x383842});return!_0x9fcbe1[_0xa3cc9b(0x230)][_0xa3cc9b(0x213)]||_0x9fcbe1['body'][_0xa3cc9b(0x213)]['code']===0x1;}async[_0x28d56f(0x214)](_0x3745e2,_0x4aaa93,_0xa10f7d,_0x174c32){const _0x594945=_0x28d56f,_0xd687ed={'memberId':(await this[_0x594945(0x1fb)][_0x594945(0x1cc)](_0x3745e2))[_0x594945(0x1f0)](),'threadId':_0xa10f7d,'replyId':_0x174c32,'unitId':_0x3745e2},_0x230b4c=await this['_httpService']['post'](_0x594945(0x21c)+_0x3745e2+_0x594945(0x232),{'body':_0xd687ed});return!_0x230b4c[_0x594945(0x230)][_0x594945(0x213)]||_0x230b4c[_0x594945(0x230)][_0x594945(0x213)][_0x594945(0x221)]===0x1;}async[_0x28d56f(0x222)](_0x1be9ba,_0x10bc87,_0x3d4aec){const _0xc48cdb=_0x28d56f,_0x52830b={'unitId':_0x1be9ba,'threadId':_0x3d4aec},_0x4ed1b6=await this[_0xc48cdb(0x1fa)][_0xc48cdb(0x22f)]('/universer-api/comment/unit/'+_0x1be9ba+_0xc48cdb(0x1ce),{'body':_0x52830b}),_0x38c029=_0x3d4aec['map'](_0x47a15d=>G(_0x4ed1b6[_0xc48cdb(0x230)][_0xc48cdb(0x201)][_0x47a15d],_0x1be9ba,_0x10bc87))['filter'](Boolean);return Object[_0xc48cdb(0x20d)](_0x4ed1b6[_0xc48cdb(0x230)]['users'])[_0xc48cdb(0x1e6)](_0x435856=>{const _0x54e831=_0xc48cdb;this['_userService'][_0x54e831(0x218)](_0x435856);}),_0x38c029;}[_0x28d56f(0x1d4)](_0x569c8e){const _0x17b3b2=_0x28d56f;return{'id':_0x569c8e['id'],'threadId':_0x569c8e['threadId'],'ref':_0x569c8e[_0x17b3b2(0x1f2)]};}};p=x([C(0x0,c[_0x28d56f(0x1d6)](P['HTTPService'])),C(0x1,c[_0x28d56f(0x1d6)](c[_0x28d56f(0x217)])),C(0x2,c[_0x28d56f(0x1d6)](b[_0x28d56f(0x237)]))],p);var H=Object[_0x28d56f(0x1e8)],J=(_0x36dccc,_0x20c3e1,_0x9406a8,_0x355012)=>{const _0x21d918=_0x28d56f;for(var _0x41291e=_0x355012>0x1?void 0x0:_0x355012?H(_0x20c3e1,_0x9406a8):_0x20c3e1,_0x1c62c0=_0x36dccc[_0x21d918(0x20b)]-0x1,_0x1294a5;_0x1c62c0>=0x0;_0x1c62c0--)(_0x1294a5=_0x36dccc[_0x1c62c0])&&(_0x41291e=_0x1294a5(_0x41291e)||_0x41291e);return _0x41291e;},y=(_0x35be39,_0x44e165)=>(_0xec0097,_0x2c4bbf)=>_0x44e165(_0xec0097,_0x2c4bbf,_0x35be39);let g=class extends c['Disposable']{constructor(_0xa27751,_0x3593f1){const _0x3b695c=_0x28d56f;super(),this[_0x3b695c(0x242)]=_0xa27751,this[_0x3b695c(0x20c)]=_0x3593f1,this[_0x3b695c(0x23f)]();}[_0x28d56f(0x23f)](){const _0x4f8bb2=_0x28d56f;this[_0x4f8bb2(0x242)]['dataSource']=this[_0x4f8bb2(0x20c)],this[_0x4f8bb2(0x242)][_0x4f8bb2(0x1eb)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x28d56f(0x1d6)](p))],g);var F=Object[_0x28d56f(0x1e2)],L=Object['getOwnPropertyDescriptor'],Z=(_0x2c76f6,_0x4fcfa8,_0x3fb0bb)=>_0x4fcfa8 in _0x2c76f6?F(_0x2c76f6,_0x4fcfa8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fb0bb}):_0x2c76f6[_0x4fcfa8]=_0x3fb0bb,W=(_0x283ec0,_0x325550,_0x1a18f6,_0x229c56)=>{const _0x37dcea=_0x28d56f;for(var _0x1e9145=_0x229c56>0x1?void 0x0:_0x229c56?L(_0x325550,_0x1a18f6):_0x325550,_0x59dc0d=_0x283ec0[_0x37dcea(0x20b)]-0x1,_0x1f0343;_0x59dc0d>=0x0;_0x59dc0d--)(_0x1f0343=_0x283ec0[_0x59dc0d])&&(_0x1e9145=_0x1f0343(_0x1e9145)||_0x1e9145);return _0x1e9145;},O=(_0x59f610,_0x32d623)=>(_0x183832,_0x5f5750)=>_0x32d623(_0x183832,_0x5f5750,_0x59f610),N=(_0x355a68,_0x2463f8,_0x53221a)=>Z(_0x355a68,typeof _0x2463f8!=_0x28d56f(0x1df)?_0x2463f8+'':_0x2463f8,_0x53221a);exports[_0x28d56f(0x233)]=class extends c[_0x28d56f(0x215)]{constructor(_0x2715fe=D,_0x3ec710,_0x3ffb2f){const _0x677cc5=_0x28d56f;super(),this[_0x677cc5(0x235)]=_0x2715fe,this[_0x677cc5(0x21d)]=_0x3ec710,this[_0x677cc5(0x204)]=_0x3ffb2f;const {..._0x73481e}=c['merge']({},D,this[_0x677cc5(0x235)]);this[_0x677cc5(0x204)]['setConfig'](q,_0x73481e);}[_0x28d56f(0x1f8)](){const _0xe23203=_0x28d56f;[[p],[g],[_]][_0xe23203(0x1e6)](_0x48d4ce=>{const _0x381bb3=_0xe23203;this['_injector'][_0x381bb3(0x231)](_0x48d4ce);});}[_0x28d56f(0x20f)](){const _0x45d86b=_0x28d56f;this[_0x45d86b(0x21d)][_0x45d86b(0x224)](g),this[_0x45d86b(0x21d)][_0x45d86b(0x224)](_);}},N(exports[_0x28d56f(0x233)],'pluginName',U),N(exports[_0x28d56f(0x233)],'type',c[_0x28d56f(0x241)][_0x28d56f(0x236)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x28d56f(0x1ff)](w[_0x28d56f(0x210)],b[_0x28d56f(0x22b)],T['UniverLicensePlugin']),O(0x1,c[_0x28d56f(0x1d6)](c[_0x28d56f(0x20e)])),O(0x2,c['IConfigService'])],exports[_0x28d56f(0x233)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3b7ea6=_0x5f2a;(function(_0x283cf7,_0x46fba3){const _0x6d5814=_0x5f2a,_0x146e4a=_0x283cf7();while(!![]){try{const _0x48feeb=-parseInt(_0x6d5814(0x10e))/0x1*(-parseInt(_0x6d5814(0xe7))/0x2)+-parseInt(_0x6d5814(0x112))/0x3*(-parseInt(_0x6d5814(0x119))/0x4)+-parseInt(_0x6d5814(0x116))/0x5*(parseInt(_0x6d5814(0xf7))/0x6)+-parseInt(_0x6d5814(0xbc))/0x7+parseInt(_0x6d5814(0x118))/0x8*(-parseInt(_0x6d5814(0x106))/0x9)+parseInt(_0x6d5814(0xfe))/0xa+-parseInt(_0x6d5814(0xfc))/0xb;if(_0x48feeb===_0x46fba3)break;else _0x146e4a['push'](_0x146e4a['shift']());}catch(_0x4aa755){_0x146e4a['push'](_0x146e4a['shift']());}}}(_0x33ad,0x276c2));import{CommentService as _0x470bf5,CollaborationSessionService as _0x3a4aed,UniverCollaborationClientPlugin as _0x5ecb4e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2d5534}from'@univerjs-pro/license';function _0x5f2a(_0x1a7afe,_0x5db058){const _0x33ad5d=_0x33ad();return _0x5f2a=function(_0x5f2a9e,_0x4773ad){_0x5f2a9e=_0x5f2a9e-0xb7;let _0x448c39=_0x33ad5d[_0x5f2a9e];return _0x448c39;},_0x5f2a(_0x1a7afe,_0x5db058);}import{dayjs as _0x595df9,UserManagerService as _0x5458cd,Inject as _0x28ae67,Injector as _0x44647b,Disposable as _0x5ac438,CustomRangeType as _0x325494,UniverInstanceType as _0x3366af,DependentOn as _0x31c2de,IConfigService as _0x3c3efa,Plugin as _0x59bcbe,merge as _0x4f527c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52729f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2e7a6e,IThreadCommentDataSourceService as _0x482fdc}from'@univerjs/thread-comment';import{bufferTime as _0x466a99}from'rxjs';import{HTTPService as _0x568a11}from'@univerjs/network';const W=_0x3b7ea6(0xc1);var I=(_0x4105a8=>(_0x4105a8[_0x4105a8['OpenOrReOpen']=0x0]=_0x3b7ea6(0x105),_0x4105a8[_0x4105a8[_0x3b7ea6(0xd4)]=0x1]=_0x3b7ea6(0xd4),_0x4105a8[_0x4105a8[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x4105a8))(I||{}),v=(_0x2e3b70=>(_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xcc)]=0x0]='Unknown',_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc0)]=0x1]=_0x3b7ea6(0xc0),_0x2e3b70[_0x2e3b70['Reply']=0x2]=_0x3b7ea6(0xb9),_0x2e3b70[_0x2e3b70['Edit']=0x3]=_0x3b7ea6(0xdd),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xf0)]=0x4]=_0x3b7ea6(0xf0),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc3)]=0x5]=_0x3b7ea6(0xc3),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x2e3b70))(v||{});const y=_0x3d6e20=>_0x595df9(new Date(+_0x3d6e20))[_0x3b7ea6(0xe5)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1e3f5f,_0x14e3f4)=>{const _0x2499b7=_0x3b7ea6,_0x19398d=_0x1e3f5f['get'](_0x5458cd),_0x296854=_0x1e3f5f[_0x2499b7(0xfa)](_0x568a11);_0x14e3f4['forEach'](_0x303083=>{const _0x20c0fd=_0x2499b7;_0x19398d[_0x20c0fd(0xbf)](_0x303083)&&_0x14e3f4[_0x20c0fd(0xf9)](_0x303083);}),_0x14e3f4[_0x2499b7(0xed)]&&(await _0x296854[_0x2499b7(0xfa)](_0x2499b7(0x115),{'params':{'userIDs':[..._0x14e3f4]}}))['body'][_0x2499b7(0xec)]['forEach'](_0x308462=>{const _0x12b557=_0x2499b7;_0x308462&&_0x19398d[_0x12b557(0xd9)](_0x308462);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x55a740,_0x472917,_0x5ab5b7,_0x564069)=>{const _0x320701=_0x3b7ea6;for(var _0xed6a3e=_0x564069>0x1?void 0x0:_0x564069?K(_0x472917,_0x5ab5b7):_0x472917,_0x4a0ac7=_0x55a740[_0x320701(0xf1)]-0x1,_0x5b64c4;_0x4a0ac7>=0x0;_0x4a0ac7--)(_0x5b64c4=_0x55a740[_0x4a0ac7])&&(_0xed6a3e=_0x5b64c4(_0xed6a3e)||_0xed6a3e);return _0xed6a3e;},p=(_0x2acd49,_0x29790c)=>(_0x23de51,_0x1fb4f4)=>_0x29790c(_0x23de51,_0x1fb4f4,_0x2acd49);let _=class extends _0x5ac438{constructor(_0x59bb49,_0x35bcf7,_0x583288,_0x241f1d){const _0x2ed31a=_0x3b7ea6;super(),this[_0x2ed31a(0x10c)]=_0x59bb49,this[_0x2ed31a(0xf5)]=_0x35bcf7,this[_0x2ed31a(0x113)]=_0x583288,this[_0x2ed31a(0xee)]=_0x241f1d,this[_0x2ed31a(0x110)](),this['_initUserSync']();}[_0x3b7ea6(0x100)](){const _0x36266e=_0x3b7ea6;this[_0x36266e(0x11d)](this['_threadCommentModel'][_0x36266e(0xb7)][_0x36266e(0xef)](_0x466a99(0x10))[_0x36266e(0xc7)](_0x36c9ce=>{const _0x4b5914=_0x36266e,_0x2ed94f=new Set();_0x36c9ce[_0x4b5914(0xea)](_0x54ac1b=>{const _0x51df4c=_0x4b5914;switch(_0x54ac1b[_0x51df4c(0xe4)]){case _0x51df4c(0x10b):{const _0x13d840=_0x54ac1b['payload'][_0x51df4c(0xf6)];_0x2ed94f['add'](_0x13d840);break;}}}),B(this[_0x4b5914(0xee)],_0x2ed94f);}));}['_init'](){const _0x3f5275=_0x3b7ea6;this['disposeWithMe'](this[_0x3f5275(0x10c)][_0x3f5275(0xb7)][_0x3f5275(0xc7)](async _0x4430b7=>{const _0xb0ca1a=_0x3f5275;var _0x9b3c3f,_0x3faf20,_0xb07964,_0x3e0545;const _0x46a076=(_0x9b3c3f=this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf3)](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x37fa0f=>_0x37fa0f[_0xb0ca1a(0x11c)]===_0x4430b7['threadId']))==null?void 0x0:_0x9b3c3f['root'];if(!_0x46a076)return;const {unitId:_0x4636d2,subUnitId:_0x2214ff}=_0x46a076;switch(_0x4430b7[_0xb0ca1a(0x10a)]&&this['_userService'][_0xb0ca1a(0xd9)](_0x4430b7[_0xb0ca1a(0x10a)]),_0x4430b7[_0xb0ca1a(0xe4)]){case v[_0xb0ca1a(0xc0)]:break;case v['Reply']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xdc)](_0x4636d2,_0x2214ff,{'unitId':_0x4636d2,'subUnitId':_0x2214ff,'ref':'','id':_0x4430b7['replyId'],'dT':y(+_0x4430b7[_0xb0ca1a(0xcb)]),'threadId':_0x4430b7[_0xb0ca1a(0x11c)],'personId':(_0xb07964=(_0x3faf20=_0x4430b7[_0xb0ca1a(0x10a)])==null?void 0x0:_0x3faf20[_0xb0ca1a(0x107)])!=null?_0xb07964:_0x4430b7[_0xb0ca1a(0xd7)],'text':JSON['parse'](_0x4430b7[_0xb0ca1a(0xbe)]),'parentId':_0x46a076['id']});break;}case v[_0xb0ca1a(0xf0)]:{const _0x1fc21b=this[_0xb0ca1a(0xf5)]['getComment'](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);_0x1fc21b&&_0x1fc21b[_0xb0ca1a(0x104)]&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0x11a)](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);break;}case v['Edit']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xb8)](_0x4636d2,_0x2214ff,{'commentId':_0x4430b7[_0xb0ca1a(0x101)],'text':JSON[_0xb0ca1a(0xc6)](_0x4430b7[_0xb0ca1a(0xbe)])});break;}case v[_0xb0ca1a(0xc3)]:{const _0x37eb1e=(_0x3e0545=this[_0xb0ca1a(0xf5)]['getUnit'](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x176e72=>_0x176e72[_0xb0ca1a(0x11c)]===_0x4430b7[_0xb0ca1a(0x11c)]))==null?void 0x0:_0x3e0545['root'];_0x37eb1e&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf4)](_0x4636d2,_0x2214ff,_0x37eb1e['id'],_0x4430b7[_0xb0ca1a(0xeb)]===I[_0xb0ca1a(0xd4)]);break;}}}));}};function _0x33ad(){const _0xfa4135=['_injector','pipe','Delete','length','code','getUnit','resolveComment','_threadCommentModel','personId','462MsFwhA','resolved','delete','get','_threadCommentDataSourceService','499026QHqcSv','/list','277920zILiob','listComments','_initUserSync','replyId','getMemberID','_configService','parentId','OpenOrReOpen','17163VKLgkr','userID','error','post','user','add','_commentService','_threadCommentDataSource','57993WWaqIB','syncUpdateMutationToColla','_init','saveCommentToSnapshot','6093zsLgaG','_userService','/delete','/universer-api/user/list','14205EGlZoX','map','144xWSrgm','596IFinBc','deleteComment','stringify','threadId','disposeWithMe','COMMENT','/universer-api/comment/unit/','commentUpdate$','updateComment','Reply','body','/add','311269JQnICV','setConfig','content','getUser','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','Solve','_httpService','_config','parse','subscribe','UNRECOGNIZED','_initDataSource','comments','createTimestamp','Unknown','/reply','slice','_sessionService','values','replies','unitId','filter','Solved','customRanges','pluginName','userId','ref','addUser','find','/solved','addComment','Edit','onReady','comment','rangeType','requireSession','onStarting','/edit','type','format','rangeId','6QohJIs','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','solved','users','size'];_0x33ad=function(){return _0xfa4135;};return _0x33ad();}_=V([p(0x0,_0x28ae67(_0x470bf5)),p(0x1,_0x28ae67(_0x2e7a6e)),p(0x2,_0x28ae67(_0x5458cd)),p(0x3,_0x28ae67(_0x44647b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x3b7ea6(0xe9)],Q=(_0x1937be,_0x594851,_0x40c47c,_0x380bd7)=>{for(var _0xbf1e64=_0x380bd7>0x1?void 0x0:_0x380bd7?k(_0x594851,_0x40c47c):_0x594851,_0x210a3e=_0x1937be['length']-0x1,_0x3ad3ef;_0x210a3e>=0x0;_0x210a3e--)(_0x3ad3ef=_0x1937be[_0x210a3e])&&(_0xbf1e64=_0x3ad3ef(_0xbf1e64)||_0xbf1e64);return _0xbf1e64;},b=(_0x4aeb2b,_0x4b65cf)=>(_0x267662,_0x77c4da)=>_0x4b65cf(_0x267662,_0x77c4da,_0x4aeb2b);function X(_0x1bfc6f,_0x496a2c){const _0x155726=_0x3b7ea6,_0x504f6c=_0x1bfc6f[_0x155726(0xd1)][0x0];return{..._0x496a2c,'id':_0x504f6c[_0x155726(0x101)],'resolved':_0x1bfc6f[_0x155726(0xeb)]===0x1,'dT':y(_0x504f6c[_0x155726(0xcb)]),'personId':_0x504f6c['userId'],'threadId':_0x504f6c[_0x155726(0x11c)]};}function ee(_0x5dbdc0,_0x5250e6,_0x2c0a8f){const _0x1134aa=_0x3b7ea6;var _0x3591e1,_0x58ee36;if(((_0x58ee36=(_0x3591e1=_0x5dbdc0==null?void 0x0:_0x5dbdc0[_0x1134aa(0xd1)])==null?void 0x0:_0x3591e1[_0x1134aa(0xf1)])!=null?_0x58ee36:0x0)>0x0){const _0x266b3f=(_0x5b6109,_0x3a124d)=>({'id':_0x5b6109[_0x1134aa(0x101)],'threadId':_0x5b6109[_0x1134aa(0x11c)],'dT':y(_0x5b6109['createTimestamp']),'personId':_0x5b6109[_0x1134aa(0xd7)],'resolved':_0x5dbdc0[_0x1134aa(0xeb)]===I[_0x1134aa(0xd4)],'unitId':_0x5250e6,'subUnitId':_0x2c0a8f,'text':JSON[_0x1134aa(0xc6)](_0x5b6109[_0x1134aa(0xbe)]),'parentId':_0x3a124d}),_0x35a508=_0x266b3f(_0x5dbdc0[_0x1134aa(0xd1)][0x0]);return{..._0x35a508,'children':_0x5dbdc0[_0x1134aa(0xd1)][_0x1134aa(0xce)](0x1)[_0x1134aa(0x117)](_0x5e937b=>_0x266b3f(_0x5e937b,_0x35a508['id']))};}return null;}let S=class{constructor(_0x3a7f5a,_0x3d747e,_0x3aad76){const _0x478ea6=_0x3b7ea6;this['_httpService']=_0x3a7f5a,this[_0x478ea6(0x113)]=_0x3d747e,this[_0x478ea6(0xcf)]=_0x3aad76;}async[_0x3b7ea6(0xdc)](_0x486127){const _0x151f9b=_0x3b7ea6;var _0x59e20e,_0x581230;const {parentId:_0x4c2cf1,unitId:_0x224636,text:_0x1d4c9c,threadId:_0x4f7eec}=_0x486127,_0x29a171=(_0x581230=(_0x59e20e=_0x1d4c9c[_0x151f9b(0xd5)])==null?void 0x0:_0x59e20e['filter'](_0x239ea0=>_0x239ea0[_0x151f9b(0xe0)]===_0x325494[_0x151f9b(0x11e)])['map'](_0x437cb2=>_0x437cb2[_0x151f9b(0xe6)]))!=null?_0x581230:[],_0x2b35d1=JSON[_0x151f9b(0x11b)](_0x1d4c9c),_0x45145e=(await this[_0x151f9b(0xcf)][_0x151f9b(0xe1)](_0x224636))[_0x151f9b(0x102)]();if(_0x4c2cf1){const _0x4098e0={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171,'threadId':_0x4f7eec},_0x39797a=(await this['_httpService'][_0x151f9b(0x109)]('/universer-api/comment/unit/'+_0x224636+_0x151f9b(0xcd),{'body':_0x4098e0}))['body']['reply'];return{..._0x486127,'id':_0x39797a[_0x151f9b(0x101)],'dT':_0x595df9(+_0x39797a['createTimestamp'])[_0x151f9b(0xe5)](_0x151f9b(0xe8)),'personId':_0x39797a[_0x151f9b(0xd7)]};}else{const _0x56e93b={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171},_0x560e94=await this[_0x151f9b(0xc4)][_0x151f9b(0x109)](_0x151f9b(0x11f)+_0x224636+_0x151f9b(0xbb),{'body':_0x56e93b});return X(_0x560e94['body'][_0x151f9b(0xdf)],_0x486127);}}async[_0x3b7ea6(0xb8)](_0x2d2cae){const _0x540afd=_0x3b7ea6;var _0x3f4b8c,_0x433ab3;const {text:_0x4f45d0,unitId:_0x59d4c3}=_0x2d2cae,_0x2fac39=(_0x433ab3=(_0x3f4b8c=_0x4f45d0[_0x540afd(0xd5)])==null?void 0x0:_0x3f4b8c[_0x540afd(0xd3)](_0x4d1f20=>_0x4d1f20[_0x540afd(0xe0)]===_0x325494[_0x540afd(0x11e)])[_0x540afd(0x117)](_0x5e5d95=>_0x5e5d95[_0x540afd(0xe6)]))!=null?_0x433ab3:[],_0x476e2f=JSON[_0x540afd(0x11b)](_0x4f45d0),_0x1e40cd=_0x2d2cae[_0x540afd(0x11c)],_0x45cbc4=_0x2d2cae['id'],_0x5d94a2={'memberId':(await this[_0x540afd(0xcf)][_0x540afd(0xe1)](_0x59d4c3))['getMemberID'](),'unitId':_0x59d4c3,'threadId':_0x1e40cd,'mention':_0x2fac39,'content':_0x476e2f,'replyId':_0x45cbc4},_0x132de1=await this[_0x540afd(0xc4)]['post'](_0x540afd(0x11f)+_0x59d4c3+_0x540afd(0xe3),{'body':_0x5d94a2});return!_0x132de1['body'][_0x540afd(0x108)]||_0x132de1[_0x540afd(0xba)][_0x540afd(0x108)]['code']===0x1;}async['resolveComment'](_0x5d8666){const _0x3e014f=_0x3b7ea6,{unitId:_0x43f062}=_0x5d8666,_0x423ce3=_0x5d8666[_0x3e014f(0x11c)],_0x3f8100={'memberId':this[_0x3e014f(0x113)]['getCurrentUser']()[_0x3e014f(0x107)],'unitId':_0x43f062,'threadId':_0x423ce3,'solved':_0x5d8666[_0x3e014f(0xf8)]?I[_0x3e014f(0xd4)]:I[_0x3e014f(0x105)]},_0x32155c=await this[_0x3e014f(0xc4)][_0x3e014f(0x109)](_0x3e014f(0x11f)+_0x43f062+_0x3e014f(0xdb),{'body':_0x3f8100});return!_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]||_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]['code']===0x1;}async[_0x3b7ea6(0x11a)](_0x1414ea,_0x4845dd,_0x2e9fdb,_0x4d0a4c){const _0x4ae809=_0x3b7ea6,_0x6f1db={'memberId':(await this[_0x4ae809(0xcf)][_0x4ae809(0xe1)](_0x1414ea))[_0x4ae809(0x102)](),'threadId':_0x2e9fdb,'replyId':_0x4d0a4c,'unitId':_0x1414ea},_0x5be884=await this[_0x4ae809(0xc4)][_0x4ae809(0x109)]('/universer-api/comment/unit/'+_0x1414ea+_0x4ae809(0x114),{'body':_0x6f1db});return!_0x5be884[_0x4ae809(0xba)]['error']||_0x5be884[_0x4ae809(0xba)][_0x4ae809(0x108)][_0x4ae809(0xf2)]===0x1;}async[_0x3b7ea6(0xff)](_0x574952,_0x40bf25,_0x364d30){const _0x2a19a5=_0x3b7ea6,_0x3760a1={'unitId':_0x574952,'threadId':_0x364d30},_0x280d86=await this[_0x2a19a5(0xc4)][_0x2a19a5(0x109)]('/universer-api/comment/unit/'+_0x574952+_0x2a19a5(0xfd),{'body':_0x3760a1}),_0x585d06=_0x364d30[_0x2a19a5(0x117)](_0x2e852a=>ee(_0x280d86[_0x2a19a5(0xba)][_0x2a19a5(0xca)][_0x2e852a],_0x574952,_0x40bf25))[_0x2a19a5(0xd3)](Boolean);return Object[_0x2a19a5(0xd0)](_0x280d86['body'][_0x2a19a5(0xec)])[_0x2a19a5(0xea)](_0x6acb74=>{const _0x316bec=_0x2a19a5;this[_0x316bec(0x113)][_0x316bec(0xd9)](_0x6acb74);}),_0x585d06;}[_0x3b7ea6(0x111)](_0xd032ca){const _0x5564a1=_0x3b7ea6;return{'id':_0xd032ca['id'],'threadId':_0xd032ca['threadId'],'ref':_0xd032ca[_0x5564a1(0xd8)]};}};S=Q([b(0x0,_0x28ae67(_0x568a11)),b(0x1,_0x28ae67(_0x5458cd)),b(0x2,_0x28ae67(_0x3a4aed))],S);var re=Object[_0x3b7ea6(0xe9)],te=(_0x15046b,_0x3e2467,_0xca2b8a,_0x374fe8)=>{const _0x20f4ec=_0x3b7ea6;for(var _0x13f899=_0x374fe8>0x1?void 0x0:_0x374fe8?re(_0x3e2467,_0xca2b8a):_0x3e2467,_0x2cad7a=_0x15046b[_0x20f4ec(0xf1)]-0x1,_0x28d9e3;_0x2cad7a>=0x0;_0x2cad7a--)(_0x28d9e3=_0x15046b[_0x2cad7a])&&(_0x13f899=_0x28d9e3(_0x13f899)||_0x13f899);return _0x13f899;},M=(_0x21d738,_0x2a29de)=>(_0x2454bc,_0x324117)=>_0x2a29de(_0x2454bc,_0x324117,_0x21d738);let f=class extends _0x5ac438{constructor(_0x17697d,_0x1ecef1){const _0x4ae032=_0x3b7ea6;super(),this[_0x4ae032(0xfb)]=_0x17697d,this[_0x4ae032(0x10d)]=_0x1ecef1,this[_0x4ae032(0xc9)]();}[_0x3b7ea6(0xc9)](){const _0x54f0f5=_0x3b7ea6;this['_threadCommentDataSourceService']['dataSource']=this[_0x54f0f5(0x10d)],this[_0x54f0f5(0xfb)][_0x54f0f5(0x10f)]=!0x1;}};f=te([M(0x0,_0x482fdc),M(0x1,_0x28ae67(S))],f);var se=Object[_0x3b7ea6(0xc2)],oe=Object[_0x3b7ea6(0xe9)],ne=(_0x112089,_0x405bc4,_0x452caf)=>_0x405bc4 in _0x112089?se(_0x112089,_0x405bc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x452caf}):_0x112089[_0x405bc4]=_0x452caf,ie=(_0xf9d878,_0x57d109,_0x505f1b,_0x215772)=>{const _0xe616f3=_0x3b7ea6;for(var _0x121ce1=_0x215772>0x1?void 0x0:_0x215772?oe(_0x57d109,_0x505f1b):_0x57d109,_0x5bcf89=_0xf9d878[_0xe616f3(0xf1)]-0x1,_0x20bf0f;_0x5bcf89>=0x0;_0x5bcf89--)(_0x20bf0f=_0xf9d878[_0x5bcf89])&&(_0x121ce1=_0x20bf0f(_0x121ce1)||_0x121ce1);return _0x121ce1;},N=(_0x3a12eb,_0x2c1df4)=>(_0xc25808,_0x32a293)=>_0x2c1df4(_0xc25808,_0x32a293,_0x3a12eb),$=(_0x34edef,_0x32ea1e,_0x278cfc)=>ne(_0x34edef,typeof _0x32ea1e!='symbol'?_0x32ea1e+'':_0x32ea1e,_0x278cfc);let g=class extends _0x59bcbe{constructor(_0x268b0e=O,_0x41015c,_0x58833f){const _0x4bb2a2=_0x3b7ea6;super(),this[_0x4bb2a2(0xc5)]=_0x268b0e,this[_0x4bb2a2(0xee)]=_0x41015c,this[_0x4bb2a2(0x103)]=_0x58833f;const {..._0xdd0711}=_0x4f527c({},O,this[_0x4bb2a2(0xc5)]);this[_0x4bb2a2(0x103)][_0x4bb2a2(0xbd)](z,_0xdd0711);}[_0x3b7ea6(0xe2)](){const _0x5ed5ac=_0x3b7ea6;[[S],[f],[_]][_0x5ed5ac(0xea)](_0x173cc4=>{const _0x302ebb=_0x5ed5ac;this[_0x302ebb(0xee)][_0x302ebb(0x10b)](_0x173cc4);});}[_0x3b7ea6(0xde)](){const _0x50740b=_0x3b7ea6;this[_0x50740b(0xee)][_0x50740b(0xfa)](f),this[_0x50740b(0xee)]['get'](_);}};$(g,_0x3b7ea6(0xd6),W),$(g,'type',_0x3366af['UNIVER_UNKNOWN']),g=ie([_0x31c2de(_0x52729f,_0x5ecb4e,_0x2d5534),N(0x1,_0x28ae67(_0x44647b)),N(0x2,_0x3c3efa)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x8ad51f=_0x8773;(function(_0x306054,_0x1732e1){const _0x500f51=_0x8773,_0x4e6d2d=_0x306054();while(!![]){try{const _0x591468=-parseInt(_0x500f51(0xee))/0x1+-parseInt(_0x500f51(0xed))/0x2*(parseInt(_0x500f51(0xb4))/0x3)+parseInt(_0x500f51(0xe0))/0x4+-parseInt(_0x500f51(0xc2))/0x5+-parseInt(_0x500f51(0x9e))/0x6+parseInt(_0x500f51(0xd5))/0x7+parseInt(_0x500f51(0x99))/0x8;if(_0x591468===_0x1732e1)break;else _0x4e6d2d['push'](_0x4e6d2d['shift']());}catch(_0x131558){_0x4e6d2d['push'](_0x4e6d2d['shift']());}}}(_0x4bac,0x1d70e));import{CommentService as _0x275388,CollaborationSessionService as _0x4cdd12,UniverCollaborationClientPlugin as _0x141d43}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ff23d}from'@univerjs-pro/license';import{dayjs as _0x5b8721,UserManagerService as _0x5a8710,Inject as _0x262c9f,Injector as _0x4193c8,Disposable as _0x2134bf,CustomRangeType as _0x43b0a5,UniverInstanceType as _0x5a1685,DependentOn as _0x21e9b2,IConfigService as _0x592896,Plugin as _0x9beacc,merge as _0x4ed15d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x207a34}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x18e41d,IThreadCommentDataSourceService as _0x240ba1}from'@univerjs/thread-comment';function _0x8773(_0x302079,_0x1a27c2){_0x302079=_0x302079-0x8f;const _0x4bac1e=_0x4bac();let _0x87736d=_0x4bac1e[_0x302079];return _0x87736d;}import{bufferTime as _0x237e27}from'rxjs';import{HTTPService as _0x3d8493}from'@univerjs/network';const W=_0x8ad51f(0xf3);var I=(_0x5e5e84=>(_0x5e5e84[_0x5e5e84[_0x8ad51f(0x92)]=0x0]='OpenOrReOpen',_0x5e5e84[_0x5e5e84[_0x8ad51f(0xf0)]=0x1]='Solved',_0x5e5e84[_0x5e5e84[_0x8ad51f(0x9a)]=-0x1]=_0x8ad51f(0x9a),_0x5e5e84))(I||{}),v=(_0x4fb332=>(_0x4fb332[_0x4fb332['Unknown']=0x0]=_0x8ad51f(0xaa),_0x4fb332[_0x4fb332[_0x8ad51f(0xb6)]=0x1]=_0x8ad51f(0xb6),_0x4fb332[_0x4fb332[_0x8ad51f(0xac)]=0x2]=_0x8ad51f(0xac),_0x4fb332[_0x4fb332[_0x8ad51f(0x94)]=0x3]='Edit',_0x4fb332[_0x4fb332['Delete']=0x4]='Delete',_0x4fb332[_0x4fb332['Solve']=0x5]=_0x8ad51f(0x93),_0x4fb332[_0x4fb332['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4fb332))(v||{});const y=_0x53755a=>_0x5b8721(new Date(+_0x53755a))['format'](_0x8ad51f(0xae)),B=async(_0x4d513c,_0x5dfb64)=>{const _0x1dbf0c=_0x8ad51f,_0x145f43=_0x4d513c['get'](_0x5a8710),_0x17bb54=_0x4d513c[_0x1dbf0c(0x97)](_0x3d8493);_0x5dfb64[_0x1dbf0c(0xdf)](_0x2fd628=>{const _0x134d25=_0x1dbf0c;_0x145f43[_0x134d25(0xd2)](_0x2fd628)&&_0x5dfb64[_0x134d25(0xc6)](_0x2fd628);}),_0x5dfb64[_0x1dbf0c(0xdc)]&&(await _0x17bb54['get'](_0x1dbf0c(0xaf),{'params':{'userIDs':[..._0x5dfb64]}}))[_0x1dbf0c(0xab)][_0x1dbf0c(0xbd)][_0x1dbf0c(0xdf)](_0x264357=>{_0x264357&&_0x145f43['addUser'](_0x264357);});};var K=Object[_0x8ad51f(0xd9)],V=(_0x120dbe,_0x753c9f,_0x4f8203,_0x365282)=>{for(var _0x477a06=_0x365282>0x1?void 0x0:_0x365282?K(_0x753c9f,_0x4f8203):_0x753c9f,_0x439e53=_0x120dbe['length']-0x1,_0x3325ca;_0x439e53>=0x0;_0x439e53--)(_0x3325ca=_0x120dbe[_0x439e53])&&(_0x477a06=_0x3325ca(_0x477a06)||_0x477a06);return _0x477a06;},p=(_0x1eea65,_0x4f4a15)=>(_0x504e26,_0x4eb83d)=>_0x4f4a15(_0x504e26,_0x4eb83d,_0x1eea65);let _=class extends _0x2134bf{constructor(_0x3d0d8d,_0x5b16fb,_0x1655ff,_0x5a7ce3){const _0x12e0bb=_0x8ad51f;super(),this[_0x12e0bb(0xc0)]=_0x3d0d8d,this[_0x12e0bb(0x95)]=_0x5b16fb,this[_0x12e0bb(0xcb)]=_0x1655ff,this[_0x12e0bb(0x9c)]=_0x5a7ce3,this['_init'](),this[_0x12e0bb(0xe4)]();}[_0x8ad51f(0xe4)](){const _0x530ba5=_0x8ad51f;this[_0x530ba5(0x96)](this[_0x530ba5(0x95)][_0x530ba5(0xeb)][_0x530ba5(0xb5)](_0x237e27(0x10))[_0x530ba5(0xa8)](_0x5ee955=>{const _0x23a248=_0x530ba5,_0x53334b=new Set();_0x5ee955[_0x23a248(0xdf)](_0xe95445=>{const _0x21c59d=_0x23a248;switch(_0xe95445[_0x21c59d(0xdd)]){case'add':{const _0x290b7e=_0xe95445[_0x21c59d(0xbe)]['personId'];_0x53334b['add'](_0x290b7e);break;}}}),B(this[_0x23a248(0x9c)],_0x53334b);}));}[_0x8ad51f(0xa2)](){const _0x1b44ea=_0x8ad51f;this[_0x1b44ea(0x96)](this[_0x1b44ea(0xc0)]['commentUpdate$'][_0x1b44ea(0xa8)](async _0x55cc83=>{const _0x67d1ef=_0x1b44ea;var _0x4e19ab,_0x243c75,_0x4f1837,_0x71de14;const _0xe812c5=(_0x4e19ab=this[_0x67d1ef(0x95)]['getUnit'](_0x55cc83[_0x67d1ef(0xb0)])[_0x67d1ef(0xc4)](_0xf07b48=>_0xf07b48[_0x67d1ef(0xbb)]===_0x55cc83[_0x67d1ef(0xbb)]))==null?void 0x0:_0x4e19ab[_0x67d1ef(0xa3)];if(!_0xe812c5)return;const {unitId:_0x413764,subUnitId:_0x3d785f}=_0xe812c5;switch(_0x55cc83[_0x67d1ef(0xec)]&&this[_0x67d1ef(0xcb)]['addUser'](_0x55cc83['user']),_0x55cc83[_0x67d1ef(0xdd)]){case v['Add']:break;case v[_0x67d1ef(0xac)]:{this['_threadCommentModel'][_0x67d1ef(0x8f)](_0x413764,_0x3d785f,{'unitId':_0x413764,'subUnitId':_0x3d785f,'ref':'','id':_0x55cc83[_0x67d1ef(0xe7)],'dT':y(+_0x55cc83[_0x67d1ef(0xd4)]),'threadId':_0x55cc83[_0x67d1ef(0xbb)],'personId':(_0x4f1837=(_0x243c75=_0x55cc83[_0x67d1ef(0xec)])==null?void 0x0:_0x243c75[_0x67d1ef(0xc1)])!=null?_0x4f1837:_0x55cc83[_0x67d1ef(0xa6)],'text':JSON['parse'](_0x55cc83[_0x67d1ef(0xd0)]),'parentId':_0xe812c5['id']});break;}case v[_0x67d1ef(0xb1)]:{const _0x16e5d8=this['_threadCommentModel']['getComment'](_0x413764,_0x3d785f,_0x55cc83[_0x67d1ef(0xe7)]);_0x16e5d8&&_0x16e5d8[_0x67d1ef(0xa7)]&&this[_0x67d1ef(0x95)][_0x67d1ef(0xe5)](_0x413764,_0x3d785f,_0x55cc83[_0x67d1ef(0xe7)]);break;}case v['Edit']:{this[_0x67d1ef(0x95)][_0x67d1ef(0x90)](_0x413764,_0x3d785f,{'commentId':_0x55cc83['replyId'],'text':JSON[_0x67d1ef(0xce)](_0x55cc83['content'])});break;}case v[_0x67d1ef(0x93)]:{const _0x131190=(_0x71de14=this[_0x67d1ef(0x95)][_0x67d1ef(0x98)](_0x55cc83[_0x67d1ef(0xb0)])[_0x67d1ef(0xc4)](_0x7d27f1=>_0x7d27f1[_0x67d1ef(0xbb)]===_0x55cc83[_0x67d1ef(0xbb)]))==null?void 0x0:_0x71de14[_0x67d1ef(0xa3)];_0x131190&&this[_0x67d1ef(0x95)][_0x67d1ef(0xb2)](_0x413764,_0x3d785f,_0x131190['id'],_0x55cc83['solved']===I[_0x67d1ef(0xf0)]);break;}}}));}};_=V([p(0x0,_0x262c9f(_0x275388)),p(0x1,_0x262c9f(_0x18e41d)),p(0x2,_0x262c9f(_0x5a8710)),p(0x3,_0x262c9f(_0x4193c8))],_);const z=_0x8ad51f(0x9b),O={};var k=Object[_0x8ad51f(0xd9)],Q=(_0x2357bb,_0x18e432,_0x16fe54,_0x2ea563)=>{const _0x26cd6b=_0x8ad51f;for(var _0x2c9f58=_0x2ea563>0x1?void 0x0:_0x2ea563?k(_0x18e432,_0x16fe54):_0x18e432,_0x1289ef=_0x2357bb[_0x26cd6b(0xf2)]-0x1,_0x1b4652;_0x1289ef>=0x0;_0x1289ef--)(_0x1b4652=_0x2357bb[_0x1289ef])&&(_0x2c9f58=_0x1b4652(_0x2c9f58)||_0x2c9f58);return _0x2c9f58;},b=(_0x518589,_0x17abdc)=>(_0x416285,_0x2d0a08)=>_0x17abdc(_0x416285,_0x2d0a08,_0x518589);function X(_0x5d7c98,_0x308ebd){const _0x1c9fbc=_0x8ad51f,_0x31ea06=_0x5d7c98[_0x1c9fbc(0xa0)][0x0];return{..._0x308ebd,'id':_0x31ea06[_0x1c9fbc(0xe7)],'resolved':_0x5d7c98[_0x1c9fbc(0xc5)]===0x1,'dT':y(_0x31ea06[_0x1c9fbc(0xd4)]),'personId':_0x31ea06[_0x1c9fbc(0xa6)],'threadId':_0x31ea06[_0x1c9fbc(0xbb)]};}function ee(_0x39f866,_0xaaf33a,_0x32e883){const _0x3dcb71=_0x8ad51f;var _0x1b91ad,_0x2c6c85;if(((_0x2c6c85=(_0x1b91ad=_0x39f866==null?void 0x0:_0x39f866[_0x3dcb71(0xa0)])==null?void 0x0:_0x1b91ad[_0x3dcb71(0xf2)])!=null?_0x2c6c85:0x0)>0x0){const _0x51a23b=(_0x7e773b,_0x323cf5)=>({'id':_0x7e773b[_0x3dcb71(0xe7)],'threadId':_0x7e773b['threadId'],'dT':y(_0x7e773b['createTimestamp']),'personId':_0x7e773b[_0x3dcb71(0xa6)],'resolved':_0x39f866[_0x3dcb71(0xc5)]===I[_0x3dcb71(0xf0)],'unitId':_0xaaf33a,'subUnitId':_0x32e883,'text':JSON[_0x3dcb71(0xce)](_0x7e773b[_0x3dcb71(0xd0)]),'parentId':_0x323cf5}),_0x56fa93=_0x51a23b(_0x39f866[_0x3dcb71(0xa0)][0x0]);return{..._0x56fa93,'children':_0x39f866['replies']['slice'](0x1)['map'](_0x314a39=>_0x51a23b(_0x314a39,_0x56fa93['id']))};}return null;}let S=class{constructor(_0x143f67,_0x28a788,_0x22d435){const _0x270fac=_0x8ad51f;this[_0x270fac(0xa1)]=_0x143f67,this[_0x270fac(0xcb)]=_0x28a788,this[_0x270fac(0xca)]=_0x22d435;}async['addComment'](_0x36b279){const _0x80f055=_0x8ad51f;var _0x295607,_0x512565;const {parentId:_0x4781f9,unitId:_0x641ddc,text:_0x31b6e1,threadId:_0x3d9574}=_0x36b279,_0x5c6ca3=(_0x512565=(_0x295607=_0x31b6e1['customRanges'])==null?void 0x0:_0x295607['filter'](_0x35d978=>_0x35d978[_0x80f055(0xd3)]===_0x43b0a5['COMMENT'])[_0x80f055(0xe6)](_0x56efd9=>_0x56efd9[_0x80f055(0xe2)]))!=null?_0x512565:[],_0x5bcefd=JSON[_0x80f055(0xcc)](_0x31b6e1),_0x2d451a=(await this[_0x80f055(0xca)][_0x80f055(0xe3)](_0x641ddc))['getMemberID']();if(_0x4781f9){const _0x3f563b={'memberId':_0x2d451a,'unitId':_0x641ddc,'content':_0x5bcefd,'mention':_0x5c6ca3,'threadId':_0x3d9574},_0x1738e0=(await this[_0x80f055(0xa1)]['post'](_0x80f055(0xd6)+_0x641ddc+'/reply',{'body':_0x3f563b}))['body']['reply'];return{..._0x36b279,'id':_0x1738e0['replyId'],'dT':_0x5b8721(+_0x1738e0[_0x80f055(0xd4)])[_0x80f055(0xda)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1738e0[_0x80f055(0xa6)]};}else{const _0x21cb50={'memberId':_0x2d451a,'unitId':_0x641ddc,'content':_0x5bcefd,'mention':_0x5c6ca3},_0x377129=await this[_0x80f055(0xa1)][_0x80f055(0xe8)](_0x80f055(0xd6)+_0x641ddc+_0x80f055(0xd7),{'body':_0x21cb50});return X(_0x377129[_0x80f055(0xab)]['comment'],_0x36b279);}}async[_0x8ad51f(0x90)](_0x1b2b7e){const _0x3e25aa=_0x8ad51f;var _0x242d99,_0x4704e2;const {text:_0x174f74,unitId:_0x3d0bbd}=_0x1b2b7e,_0x261d17=(_0x4704e2=(_0x242d99=_0x174f74[_0x3e25aa(0xb8)])==null?void 0x0:_0x242d99['filter'](_0x18fd9c=>_0x18fd9c[_0x3e25aa(0xd3)]===_0x43b0a5['COMMENT'])[_0x3e25aa(0xe6)](_0x10fde5=>_0x10fde5['rangeId']))!=null?_0x4704e2:[],_0x2dcd71=JSON[_0x3e25aa(0xcc)](_0x174f74),_0xc66813=_0x1b2b7e['threadId'],_0x5ba491=_0x1b2b7e['id'],_0x4858fb={'memberId':(await this[_0x3e25aa(0xca)]['requireSession'](_0x3d0bbd))[_0x3e25aa(0xa5)](),'unitId':_0x3d0bbd,'threadId':_0xc66813,'mention':_0x261d17,'content':_0x2dcd71,'replyId':_0x5ba491},_0x9b72b7=await this[_0x3e25aa(0xa1)]['post']('/universer-api/comment/unit/'+_0x3d0bbd+_0x3e25aa(0xf1),{'body':_0x4858fb});return!_0x9b72b7['body']['error']||_0x9b72b7[_0x3e25aa(0xab)]['error'][_0x3e25aa(0xea)]===0x1;}async['resolveComment'](_0x46ed9a){const _0x4c176f=_0x8ad51f,{unitId:_0x257513}=_0x46ed9a,_0x2e8ac4=_0x46ed9a[_0x4c176f(0xbb)],_0x265f92={'memberId':this[_0x4c176f(0xcb)][_0x4c176f(0xba)]()[_0x4c176f(0xc1)],'unitId':_0x257513,'threadId':_0x2e8ac4,'solved':_0x46ed9a[_0x4c176f(0xd8)]?I[_0x4c176f(0xf0)]:I[_0x4c176f(0x92)]},_0x4bb6ed=await this[_0x4c176f(0xa1)]['post'](_0x4c176f(0xd6)+_0x257513+_0x4c176f(0xdb),{'body':_0x265f92});return!_0x4bb6ed[_0x4c176f(0xab)][_0x4c176f(0xde)]||_0x4bb6ed[_0x4c176f(0xab)][_0x4c176f(0xde)][_0x4c176f(0xea)]===0x1;}async[_0x8ad51f(0xe5)](_0x32f95d,_0x3da458,_0x283a54,_0x5ef288){const _0x22f736=_0x8ad51f,_0x1f498e={'memberId':(await this[_0x22f736(0xca)][_0x22f736(0xe3)](_0x32f95d))['getMemberID'](),'threadId':_0x283a54,'replyId':_0x5ef288,'unitId':_0x32f95d},_0x55fc61=await this['_httpService'][_0x22f736(0xe8)](_0x22f736(0xd6)+_0x32f95d+_0x22f736(0x9f),{'body':_0x1f498e});return!_0x55fc61[_0x22f736(0xab)][_0x22f736(0xde)]||_0x55fc61['body'][_0x22f736(0xde)][_0x22f736(0xea)]===0x1;}async[_0x8ad51f(0x9d)](_0x1076d8,_0x5bb4a3,_0x489b3d){const _0x59c2ac=_0x8ad51f,_0x2232de={'unitId':_0x1076d8,'threadId':_0x489b3d},_0x18bf12=await this[_0x59c2ac(0xa1)]['post']('/universer-api/comment/unit/'+_0x1076d8+_0x59c2ac(0x91),{'body':_0x2232de}),_0x694b9f=_0x489b3d[_0x59c2ac(0xe6)](_0x1428fe=>ee(_0x18bf12[_0x59c2ac(0xab)][_0x59c2ac(0xbc)][_0x1428fe],_0x1076d8,_0x5bb4a3))[_0x59c2ac(0xb9)](Boolean);return Object[_0x59c2ac(0xc3)](_0x18bf12[_0x59c2ac(0xab)]['users'])[_0x59c2ac(0xdf)](_0x216203=>{const _0x16f714=_0x59c2ac;this[_0x16f714(0xcb)][_0x16f714(0xe9)](_0x216203);}),_0x694b9f;}[_0x8ad51f(0xbf)](_0x52d61a){const _0x535968=_0x8ad51f;return{'id':_0x52d61a['id'],'threadId':_0x52d61a[_0x535968(0xbb)],'ref':_0x52d61a['ref']};}};function _0x4bac(){const _0x5c4b55=['stringify','pluginName','parse','_configService','content','UNIVER_UNKNOWN','getUser','rangeType','createTimestamp','996079wdmfTd','/universer-api/comment/unit/','/add','resolved','getOwnPropertyDescriptor','format','/solved','size','type','error','forEach','65500eXhvMl','onStarting','rangeId','requireSession','_initUserSync','deleteComment','map','replyId','post','addUser','code','commentUpdate$','user','2070gmdnOt','235882iNKakf','_threadCommentDataSourceService','Solved','/edit','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addComment','updateComment','/list','OpenOrReOpen','Solve','Edit','_threadCommentModel','disposeWithMe','get','getUnit','4889416AVMROx','UNRECOGNIZED','thread-comment-data-source.config','_injector','listComments','115914ywnlFj','/delete','replies','_httpService','_init','root','setConfig','getMemberID','userId','parentId','subscribe','_threadCommentDataSource','Unknown','body','Reply','_config','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','unitId','Delete','resolveComment','syncUpdateMutationToColla','627gyARgb','pipe','Add','add','customRanges','filter','getCurrentUser','threadId','comments','users','payload','saveCommentToSnapshot','_commentService','userID','888715fcIxOd','values','find','solved','delete','symbol','onReady','defineProperty','_sessionService','_userService'];_0x4bac=function(){return _0x5c4b55;};return _0x4bac();}S=Q([b(0x0,_0x262c9f(_0x3d8493)),b(0x1,_0x262c9f(_0x5a8710)),b(0x2,_0x262c9f(_0x4cdd12))],S);var re=Object[_0x8ad51f(0xd9)],te=(_0xae06ec,_0x56bfe4,_0x12d5df,_0xb082e2)=>{const _0x42c264=_0x8ad51f;for(var _0x4f30bd=_0xb082e2>0x1?void 0x0:_0xb082e2?re(_0x56bfe4,_0x12d5df):_0x56bfe4,_0x752e89=_0xae06ec[_0x42c264(0xf2)]-0x1,_0x3184df;_0x752e89>=0x0;_0x752e89--)(_0x3184df=_0xae06ec[_0x752e89])&&(_0x4f30bd=_0x3184df(_0x4f30bd)||_0x4f30bd);return _0x4f30bd;},M=(_0x569782,_0x407a0a)=>(_0x285b74,_0x2a9d33)=>_0x407a0a(_0x285b74,_0x2a9d33,_0x569782);let f=class extends _0x2134bf{constructor(_0x4480da,_0x10a7dc){super(),this['_threadCommentDataSourceService']=_0x4480da,this['_threadCommentDataSource']=_0x10a7dc,this['_initDataSource']();}['_initDataSource'](){const _0x2422be=_0x8ad51f;this[_0x2422be(0xef)]['dataSource']=this[_0x2422be(0xa9)],this[_0x2422be(0xef)][_0x2422be(0xb3)]=!0x1;}};f=te([M(0x0,_0x240ba1),M(0x1,_0x262c9f(S))],f);var se=Object[_0x8ad51f(0xc9)],oe=Object[_0x8ad51f(0xd9)],ne=(_0x4d07a2,_0x55fab5,_0x5dd008)=>_0x55fab5 in _0x4d07a2?se(_0x4d07a2,_0x55fab5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5dd008}):_0x4d07a2[_0x55fab5]=_0x5dd008,ie=(_0x361730,_0x3e6ad9,_0x47b45d,_0x23b611)=>{const _0x51470a=_0x8ad51f;for(var _0x252da8=_0x23b611>0x1?void 0x0:_0x23b611?oe(_0x3e6ad9,_0x47b45d):_0x3e6ad9,_0x911678=_0x361730[_0x51470a(0xf2)]-0x1,_0x247d15;_0x911678>=0x0;_0x911678--)(_0x247d15=_0x361730[_0x911678])&&(_0x252da8=_0x247d15(_0x252da8)||_0x252da8);return _0x252da8;},N=(_0x4416a9,_0xb0c7f1)=>(_0x5e84b3,_0x5e2702)=>_0xb0c7f1(_0x5e84b3,_0x5e2702,_0x4416a9),$=(_0xfd1638,_0x24a8f8,_0xd71daf)=>ne(_0xfd1638,typeof _0x24a8f8!=_0x8ad51f(0xc7)?_0x24a8f8+'':_0x24a8f8,_0xd71daf);let g=class extends _0x9beacc{constructor(_0x55d7e4=O,_0x1981a3,_0x1c9e29){const _0xe16fe1=_0x8ad51f;super(),this[_0xe16fe1(0xad)]=_0x55d7e4,this[_0xe16fe1(0x9c)]=_0x1981a3,this[_0xe16fe1(0xcf)]=_0x1c9e29;const {..._0x5b37ee}=_0x4ed15d({},O,this[_0xe16fe1(0xad)]);this[_0xe16fe1(0xcf)][_0xe16fe1(0xa4)](z,_0x5b37ee);}[_0x8ad51f(0xe1)](){const _0x309146=_0x8ad51f;[[S],[f],[_]][_0x309146(0xdf)](_0x54bb4b=>{const _0x48d653=_0x309146;this[_0x48d653(0x9c)][_0x48d653(0xb7)](_0x54bb4b);});}[_0x8ad51f(0xc8)](){const _0x1de0f8=_0x8ad51f;this[_0x1de0f8(0x9c)][_0x1de0f8(0x97)](f),this[_0x1de0f8(0x9c)]['get'](_);}};$(g,_0x8ad51f(0xcd),W),$(g,_0x8ad51f(0xdd),_0x5a1685[_0x8ad51f(0xd1)]),g=ie([_0x21e9b2(_0x207a34,_0x141d43,_0x4ff23d),N(0x1,_0x262c9f(_0x4193c8)),N(0x2,_0x592896)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3b7ea6=_0x5f2a;(function(_0x283cf7,_0x46fba3){const _0x6d5814=_0x5f2a,_0x146e4a=_0x283cf7();while(!![]){try{const _0x48feeb=-parseInt(_0x6d5814(0x10e))/0x1*(-parseInt(_0x6d5814(0xe7))/0x2)+-parseInt(_0x6d5814(0x112))/0x3*(-parseInt(_0x6d5814(0x119))/0x4)+-parseInt(_0x6d5814(0x116))/0x5*(parseInt(_0x6d5814(0xf7))/0x6)+-parseInt(_0x6d5814(0xbc))/0x7+parseInt(_0x6d5814(0x118))/0x8*(-parseInt(_0x6d5814(0x106))/0x9)+parseInt(_0x6d5814(0xfe))/0xa+-parseInt(_0x6d5814(0xfc))/0xb;if(_0x48feeb===_0x46fba3)break;else _0x146e4a['push'](_0x146e4a['shift']());}catch(_0x4aa755){_0x146e4a['push'](_0x146e4a['shift']());}}}(_0x33ad,0x276c2));import{CommentService as _0x470bf5,CollaborationSessionService as _0x3a4aed,UniverCollaborationClientPlugin as _0x5ecb4e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2d5534}from'@univerjs-pro/license';function _0x5f2a(_0x1a7afe,_0x5db058){const _0x33ad5d=_0x33ad();return _0x5f2a=function(_0x5f2a9e,_0x4773ad){_0x5f2a9e=_0x5f2a9e-0xb7;let _0x448c39=_0x33ad5d[_0x5f2a9e];return _0x448c39;},_0x5f2a(_0x1a7afe,_0x5db058);}import{dayjs as _0x595df9,UserManagerService as _0x5458cd,Inject as _0x28ae67,Injector as _0x44647b,Disposable as _0x5ac438,CustomRangeType as _0x325494,UniverInstanceType as _0x3366af,DependentOn as _0x31c2de,IConfigService as _0x3c3efa,Plugin as _0x59bcbe,merge as _0x4f527c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52729f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2e7a6e,IThreadCommentDataSourceService as _0x482fdc}from'@univerjs/thread-comment';import{bufferTime as _0x466a99}from'rxjs';import{HTTPService as _0x568a11}from'@univerjs/network';const W=_0x3b7ea6(0xc1);var I=(_0x4105a8=>(_0x4105a8[_0x4105a8['OpenOrReOpen']=0x0]=_0x3b7ea6(0x105),_0x4105a8[_0x4105a8[_0x3b7ea6(0xd4)]=0x1]=_0x3b7ea6(0xd4),_0x4105a8[_0x4105a8[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x4105a8))(I||{}),v=(_0x2e3b70=>(_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xcc)]=0x0]='Unknown',_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc0)]=0x1]=_0x3b7ea6(0xc0),_0x2e3b70[_0x2e3b70['Reply']=0x2]=_0x3b7ea6(0xb9),_0x2e3b70[_0x2e3b70['Edit']=0x3]=_0x3b7ea6(0xdd),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xf0)]=0x4]=_0x3b7ea6(0xf0),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc3)]=0x5]=_0x3b7ea6(0xc3),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x2e3b70))(v||{});const y=_0x3d6e20=>_0x595df9(new Date(+_0x3d6e20))[_0x3b7ea6(0xe5)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1e3f5f,_0x14e3f4)=>{const _0x2499b7=_0x3b7ea6,_0x19398d=_0x1e3f5f['get'](_0x5458cd),_0x296854=_0x1e3f5f[_0x2499b7(0xfa)](_0x568a11);_0x14e3f4['forEach'](_0x303083=>{const _0x20c0fd=_0x2499b7;_0x19398d[_0x20c0fd(0xbf)](_0x303083)&&_0x14e3f4[_0x20c0fd(0xf9)](_0x303083);}),_0x14e3f4[_0x2499b7(0xed)]&&(await _0x296854[_0x2499b7(0xfa)](_0x2499b7(0x115),{'params':{'userIDs':[..._0x14e3f4]}}))['body'][_0x2499b7(0xec)]['forEach'](_0x308462=>{const _0x12b557=_0x2499b7;_0x308462&&_0x19398d[_0x12b557(0xd9)](_0x308462);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x55a740,_0x472917,_0x5ab5b7,_0x564069)=>{const _0x320701=_0x3b7ea6;for(var _0xed6a3e=_0x564069>0x1?void 0x0:_0x564069?K(_0x472917,_0x5ab5b7):_0x472917,_0x4a0ac7=_0x55a740[_0x320701(0xf1)]-0x1,_0x5b64c4;_0x4a0ac7>=0x0;_0x4a0ac7--)(_0x5b64c4=_0x55a740[_0x4a0ac7])&&(_0xed6a3e=_0x5b64c4(_0xed6a3e)||_0xed6a3e);return _0xed6a3e;},p=(_0x2acd49,_0x29790c)=>(_0x23de51,_0x1fb4f4)=>_0x29790c(_0x23de51,_0x1fb4f4,_0x2acd49);let _=class extends _0x5ac438{constructor(_0x59bb49,_0x35bcf7,_0x583288,_0x241f1d){const _0x2ed31a=_0x3b7ea6;super(),this[_0x2ed31a(0x10c)]=_0x59bb49,this[_0x2ed31a(0xf5)]=_0x35bcf7,this[_0x2ed31a(0x113)]=_0x583288,this[_0x2ed31a(0xee)]=_0x241f1d,this[_0x2ed31a(0x110)](),this['_initUserSync']();}[_0x3b7ea6(0x100)](){const _0x36266e=_0x3b7ea6;this[_0x36266e(0x11d)](this['_threadCommentModel'][_0x36266e(0xb7)][_0x36266e(0xef)](_0x466a99(0x10))[_0x36266e(0xc7)](_0x36c9ce=>{const _0x4b5914=_0x36266e,_0x2ed94f=new Set();_0x36c9ce[_0x4b5914(0xea)](_0x54ac1b=>{const _0x51df4c=_0x4b5914;switch(_0x54ac1b[_0x51df4c(0xe4)]){case _0x51df4c(0x10b):{const _0x13d840=_0x54ac1b['payload'][_0x51df4c(0xf6)];_0x2ed94f['add'](_0x13d840);break;}}}),B(this[_0x4b5914(0xee)],_0x2ed94f);}));}['_init'](){const _0x3f5275=_0x3b7ea6;this['disposeWithMe'](this[_0x3f5275(0x10c)][_0x3f5275(0xb7)][_0x3f5275(0xc7)](async _0x4430b7=>{const _0xb0ca1a=_0x3f5275;var _0x9b3c3f,_0x3faf20,_0xb07964,_0x3e0545;const _0x46a076=(_0x9b3c3f=this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf3)](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x37fa0f=>_0x37fa0f[_0xb0ca1a(0x11c)]===_0x4430b7['threadId']))==null?void 0x0:_0x9b3c3f['root'];if(!_0x46a076)return;const {unitId:_0x4636d2,subUnitId:_0x2214ff}=_0x46a076;switch(_0x4430b7[_0xb0ca1a(0x10a)]&&this['_userService'][_0xb0ca1a(0xd9)](_0x4430b7[_0xb0ca1a(0x10a)]),_0x4430b7[_0xb0ca1a(0xe4)]){case v[_0xb0ca1a(0xc0)]:break;case v['Reply']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xdc)](_0x4636d2,_0x2214ff,{'unitId':_0x4636d2,'subUnitId':_0x2214ff,'ref':'','id':_0x4430b7['replyId'],'dT':y(+_0x4430b7[_0xb0ca1a(0xcb)]),'threadId':_0x4430b7[_0xb0ca1a(0x11c)],'personId':(_0xb07964=(_0x3faf20=_0x4430b7[_0xb0ca1a(0x10a)])==null?void 0x0:_0x3faf20[_0xb0ca1a(0x107)])!=null?_0xb07964:_0x4430b7[_0xb0ca1a(0xd7)],'text':JSON['parse'](_0x4430b7[_0xb0ca1a(0xbe)]),'parentId':_0x46a076['id']});break;}case v[_0xb0ca1a(0xf0)]:{const _0x1fc21b=this[_0xb0ca1a(0xf5)]['getComment'](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);_0x1fc21b&&_0x1fc21b[_0xb0ca1a(0x104)]&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0x11a)](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);break;}case v['Edit']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xb8)](_0x4636d2,_0x2214ff,{'commentId':_0x4430b7[_0xb0ca1a(0x101)],'text':JSON[_0xb0ca1a(0xc6)](_0x4430b7[_0xb0ca1a(0xbe)])});break;}case v[_0xb0ca1a(0xc3)]:{const _0x37eb1e=(_0x3e0545=this[_0xb0ca1a(0xf5)]['getUnit'](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x176e72=>_0x176e72[_0xb0ca1a(0x11c)]===_0x4430b7[_0xb0ca1a(0x11c)]))==null?void 0x0:_0x3e0545['root'];_0x37eb1e&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf4)](_0x4636d2,_0x2214ff,_0x37eb1e['id'],_0x4430b7[_0xb0ca1a(0xeb)]===I[_0xb0ca1a(0xd4)]);break;}}}));}};function _0x33ad(){const _0xfa4135=['_injector','pipe','Delete','length','code','getUnit','resolveComment','_threadCommentModel','personId','462MsFwhA','resolved','delete','get','_threadCommentDataSourceService','499026QHqcSv','/list','277920zILiob','listComments','_initUserSync','replyId','getMemberID','_configService','parentId','OpenOrReOpen','17163VKLgkr','userID','error','post','user','add','_commentService','_threadCommentDataSource','57993WWaqIB','syncUpdateMutationToColla','_init','saveCommentToSnapshot','6093zsLgaG','_userService','/delete','/universer-api/user/list','14205EGlZoX','map','144xWSrgm','596IFinBc','deleteComment','stringify','threadId','disposeWithMe','COMMENT','/universer-api/comment/unit/','commentUpdate$','updateComment','Reply','body','/add','311269JQnICV','setConfig','content','getUser','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','Solve','_httpService','_config','parse','subscribe','UNRECOGNIZED','_initDataSource','comments','createTimestamp','Unknown','/reply','slice','_sessionService','values','replies','unitId','filter','Solved','customRanges','pluginName','userId','ref','addUser','find','/solved','addComment','Edit','onReady','comment','rangeType','requireSession','onStarting','/edit','type','format','rangeId','6QohJIs','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','solved','users','size'];_0x33ad=function(){return _0xfa4135;};return _0x33ad();}_=V([p(0x0,_0x28ae67(_0x470bf5)),p(0x1,_0x28ae67(_0x2e7a6e)),p(0x2,_0x28ae67(_0x5458cd)),p(0x3,_0x28ae67(_0x44647b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x3b7ea6(0xe9)],Q=(_0x1937be,_0x594851,_0x40c47c,_0x380bd7)=>{for(var _0xbf1e64=_0x380bd7>0x1?void 0x0:_0x380bd7?k(_0x594851,_0x40c47c):_0x594851,_0x210a3e=_0x1937be['length']-0x1,_0x3ad3ef;_0x210a3e>=0x0;_0x210a3e--)(_0x3ad3ef=_0x1937be[_0x210a3e])&&(_0xbf1e64=_0x3ad3ef(_0xbf1e64)||_0xbf1e64);return _0xbf1e64;},b=(_0x4aeb2b,_0x4b65cf)=>(_0x267662,_0x77c4da)=>_0x4b65cf(_0x267662,_0x77c4da,_0x4aeb2b);function X(_0x1bfc6f,_0x496a2c){const _0x155726=_0x3b7ea6,_0x504f6c=_0x1bfc6f[_0x155726(0xd1)][0x0];return{..._0x496a2c,'id':_0x504f6c[_0x155726(0x101)],'resolved':_0x1bfc6f[_0x155726(0xeb)]===0x1,'dT':y(_0x504f6c[_0x155726(0xcb)]),'personId':_0x504f6c['userId'],'threadId':_0x504f6c[_0x155726(0x11c)]};}function ee(_0x5dbdc0,_0x5250e6,_0x2c0a8f){const _0x1134aa=_0x3b7ea6;var _0x3591e1,_0x58ee36;if(((_0x58ee36=(_0x3591e1=_0x5dbdc0==null?void 0x0:_0x5dbdc0[_0x1134aa(0xd1)])==null?void 0x0:_0x3591e1[_0x1134aa(0xf1)])!=null?_0x58ee36:0x0)>0x0){const _0x266b3f=(_0x5b6109,_0x3a124d)=>({'id':_0x5b6109[_0x1134aa(0x101)],'threadId':_0x5b6109[_0x1134aa(0x11c)],'dT':y(_0x5b6109['createTimestamp']),'personId':_0x5b6109[_0x1134aa(0xd7)],'resolved':_0x5dbdc0[_0x1134aa(0xeb)]===I[_0x1134aa(0xd4)],'unitId':_0x5250e6,'subUnitId':_0x2c0a8f,'text':JSON[_0x1134aa(0xc6)](_0x5b6109[_0x1134aa(0xbe)]),'parentId':_0x3a124d}),_0x35a508=_0x266b3f(_0x5dbdc0[_0x1134aa(0xd1)][0x0]);return{..._0x35a508,'children':_0x5dbdc0[_0x1134aa(0xd1)][_0x1134aa(0xce)](0x1)[_0x1134aa(0x117)](_0x5e937b=>_0x266b3f(_0x5e937b,_0x35a508['id']))};}return null;}let S=class{constructor(_0x3a7f5a,_0x3d747e,_0x3aad76){const _0x478ea6=_0x3b7ea6;this['_httpService']=_0x3a7f5a,this[_0x478ea6(0x113)]=_0x3d747e,this[_0x478ea6(0xcf)]=_0x3aad76;}async[_0x3b7ea6(0xdc)](_0x486127){const _0x151f9b=_0x3b7ea6;var _0x59e20e,_0x581230;const {parentId:_0x4c2cf1,unitId:_0x224636,text:_0x1d4c9c,threadId:_0x4f7eec}=_0x486127,_0x29a171=(_0x581230=(_0x59e20e=_0x1d4c9c[_0x151f9b(0xd5)])==null?void 0x0:_0x59e20e['filter'](_0x239ea0=>_0x239ea0[_0x151f9b(0xe0)]===_0x325494[_0x151f9b(0x11e)])['map'](_0x437cb2=>_0x437cb2[_0x151f9b(0xe6)]))!=null?_0x581230:[],_0x2b35d1=JSON[_0x151f9b(0x11b)](_0x1d4c9c),_0x45145e=(await this[_0x151f9b(0xcf)][_0x151f9b(0xe1)](_0x224636))[_0x151f9b(0x102)]();if(_0x4c2cf1){const _0x4098e0={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171,'threadId':_0x4f7eec},_0x39797a=(await this['_httpService'][_0x151f9b(0x109)]('/universer-api/comment/unit/'+_0x224636+_0x151f9b(0xcd),{'body':_0x4098e0}))['body']['reply'];return{..._0x486127,'id':_0x39797a[_0x151f9b(0x101)],'dT':_0x595df9(+_0x39797a['createTimestamp'])[_0x151f9b(0xe5)](_0x151f9b(0xe8)),'personId':_0x39797a[_0x151f9b(0xd7)]};}else{const _0x56e93b={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171},_0x560e94=await this[_0x151f9b(0xc4)][_0x151f9b(0x109)](_0x151f9b(0x11f)+_0x224636+_0x151f9b(0xbb),{'body':_0x56e93b});return X(_0x560e94['body'][_0x151f9b(0xdf)],_0x486127);}}async[_0x3b7ea6(0xb8)](_0x2d2cae){const _0x540afd=_0x3b7ea6;var _0x3f4b8c,_0x433ab3;const {text:_0x4f45d0,unitId:_0x59d4c3}=_0x2d2cae,_0x2fac39=(_0x433ab3=(_0x3f4b8c=_0x4f45d0[_0x540afd(0xd5)])==null?void 0x0:_0x3f4b8c[_0x540afd(0xd3)](_0x4d1f20=>_0x4d1f20[_0x540afd(0xe0)]===_0x325494[_0x540afd(0x11e)])[_0x540afd(0x117)](_0x5e5d95=>_0x5e5d95[_0x540afd(0xe6)]))!=null?_0x433ab3:[],_0x476e2f=JSON[_0x540afd(0x11b)](_0x4f45d0),_0x1e40cd=_0x2d2cae[_0x540afd(0x11c)],_0x45cbc4=_0x2d2cae['id'],_0x5d94a2={'memberId':(await this[_0x540afd(0xcf)][_0x540afd(0xe1)](_0x59d4c3))['getMemberID'](),'unitId':_0x59d4c3,'threadId':_0x1e40cd,'mention':_0x2fac39,'content':_0x476e2f,'replyId':_0x45cbc4},_0x132de1=await this[_0x540afd(0xc4)]['post'](_0x540afd(0x11f)+_0x59d4c3+_0x540afd(0xe3),{'body':_0x5d94a2});return!_0x132de1['body'][_0x540afd(0x108)]||_0x132de1[_0x540afd(0xba)][_0x540afd(0x108)]['code']===0x1;}async['resolveComment'](_0x5d8666){const _0x3e014f=_0x3b7ea6,{unitId:_0x43f062}=_0x5d8666,_0x423ce3=_0x5d8666[_0x3e014f(0x11c)],_0x3f8100={'memberId':this[_0x3e014f(0x113)]['getCurrentUser']()[_0x3e014f(0x107)],'unitId':_0x43f062,'threadId':_0x423ce3,'solved':_0x5d8666[_0x3e014f(0xf8)]?I[_0x3e014f(0xd4)]:I[_0x3e014f(0x105)]},_0x32155c=await this[_0x3e014f(0xc4)][_0x3e014f(0x109)](_0x3e014f(0x11f)+_0x43f062+_0x3e014f(0xdb),{'body':_0x3f8100});return!_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]||_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]['code']===0x1;}async[_0x3b7ea6(0x11a)](_0x1414ea,_0x4845dd,_0x2e9fdb,_0x4d0a4c){const _0x4ae809=_0x3b7ea6,_0x6f1db={'memberId':(await this[_0x4ae809(0xcf)][_0x4ae809(0xe1)](_0x1414ea))[_0x4ae809(0x102)](),'threadId':_0x2e9fdb,'replyId':_0x4d0a4c,'unitId':_0x1414ea},_0x5be884=await this[_0x4ae809(0xc4)][_0x4ae809(0x109)]('/universer-api/comment/unit/'+_0x1414ea+_0x4ae809(0x114),{'body':_0x6f1db});return!_0x5be884[_0x4ae809(0xba)]['error']||_0x5be884[_0x4ae809(0xba)][_0x4ae809(0x108)][_0x4ae809(0xf2)]===0x1;}async[_0x3b7ea6(0xff)](_0x574952,_0x40bf25,_0x364d30){const _0x2a19a5=_0x3b7ea6,_0x3760a1={'unitId':_0x574952,'threadId':_0x364d30},_0x280d86=await this[_0x2a19a5(0xc4)][_0x2a19a5(0x109)]('/universer-api/comment/unit/'+_0x574952+_0x2a19a5(0xfd),{'body':_0x3760a1}),_0x585d06=_0x364d30[_0x2a19a5(0x117)](_0x2e852a=>ee(_0x280d86[_0x2a19a5(0xba)][_0x2a19a5(0xca)][_0x2e852a],_0x574952,_0x40bf25))[_0x2a19a5(0xd3)](Boolean);return Object[_0x2a19a5(0xd0)](_0x280d86['body'][_0x2a19a5(0xec)])[_0x2a19a5(0xea)](_0x6acb74=>{const _0x316bec=_0x2a19a5;this[_0x316bec(0x113)][_0x316bec(0xd9)](_0x6acb74);}),_0x585d06;}[_0x3b7ea6(0x111)](_0xd032ca){const _0x5564a1=_0x3b7ea6;return{'id':_0xd032ca['id'],'threadId':_0xd032ca['threadId'],'ref':_0xd032ca[_0x5564a1(0xd8)]};}};S=Q([b(0x0,_0x28ae67(_0x568a11)),b(0x1,_0x28ae67(_0x5458cd)),b(0x2,_0x28ae67(_0x3a4aed))],S);var re=Object[_0x3b7ea6(0xe9)],te=(_0x15046b,_0x3e2467,_0xca2b8a,_0x374fe8)=>{const _0x20f4ec=_0x3b7ea6;for(var _0x13f899=_0x374fe8>0x1?void 0x0:_0x374fe8?re(_0x3e2467,_0xca2b8a):_0x3e2467,_0x2cad7a=_0x15046b[_0x20f4ec(0xf1)]-0x1,_0x28d9e3;_0x2cad7a>=0x0;_0x2cad7a--)(_0x28d9e3=_0x15046b[_0x2cad7a])&&(_0x13f899=_0x28d9e3(_0x13f899)||_0x13f899);return _0x13f899;},M=(_0x21d738,_0x2a29de)=>(_0x2454bc,_0x324117)=>_0x2a29de(_0x2454bc,_0x324117,_0x21d738);let f=class extends _0x5ac438{constructor(_0x17697d,_0x1ecef1){const _0x4ae032=_0x3b7ea6;super(),this[_0x4ae032(0xfb)]=_0x17697d,this[_0x4ae032(0x10d)]=_0x1ecef1,this[_0x4ae032(0xc9)]();}[_0x3b7ea6(0xc9)](){const _0x54f0f5=_0x3b7ea6;this['_threadCommentDataSourceService']['dataSource']=this[_0x54f0f5(0x10d)],this[_0x54f0f5(0xfb)][_0x54f0f5(0x10f)]=!0x1;}};f=te([M(0x0,_0x482fdc),M(0x1,_0x28ae67(S))],f);var se=Object[_0x3b7ea6(0xc2)],oe=Object[_0x3b7ea6(0xe9)],ne=(_0x112089,_0x405bc4,_0x452caf)=>_0x405bc4 in _0x112089?se(_0x112089,_0x405bc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x452caf}):_0x112089[_0x405bc4]=_0x452caf,ie=(_0xf9d878,_0x57d109,_0x505f1b,_0x215772)=>{const _0xe616f3=_0x3b7ea6;for(var _0x121ce1=_0x215772>0x1?void 0x0:_0x215772?oe(_0x57d109,_0x505f1b):_0x57d109,_0x5bcf89=_0xf9d878[_0xe616f3(0xf1)]-0x1,_0x20bf0f;_0x5bcf89>=0x0;_0x5bcf89--)(_0x20bf0f=_0xf9d878[_0x5bcf89])&&(_0x121ce1=_0x20bf0f(_0x121ce1)||_0x121ce1);return _0x121ce1;},N=(_0x3a12eb,_0x2c1df4)=>(_0xc25808,_0x32a293)=>_0x2c1df4(_0xc25808,_0x32a293,_0x3a12eb),$=(_0x34edef,_0x32ea1e,_0x278cfc)=>ne(_0x34edef,typeof _0x32ea1e!='symbol'?_0x32ea1e+'':_0x32ea1e,_0x278cfc);let g=class extends _0x59bcbe{constructor(_0x268b0e=O,_0x41015c,_0x58833f){const _0x4bb2a2=_0x3b7ea6;super(),this[_0x4bb2a2(0xc5)]=_0x268b0e,this[_0x4bb2a2(0xee)]=_0x41015c,this[_0x4bb2a2(0x103)]=_0x58833f;const {..._0xdd0711}=_0x4f527c({},O,this[_0x4bb2a2(0xc5)]);this[_0x4bb2a2(0x103)][_0x4bb2a2(0xbd)](z,_0xdd0711);}[_0x3b7ea6(0xe2)](){const _0x5ed5ac=_0x3b7ea6;[[S],[f],[_]][_0x5ed5ac(0xea)](_0x173cc4=>{const _0x302ebb=_0x5ed5ac;this[_0x302ebb(0xee)][_0x302ebb(0x10b)](_0x173cc4);});}[_0x3b7ea6(0xde)](){const _0x50740b=_0x3b7ea6;this[_0x50740b(0xee)][_0x50740b(0xfa)](f),this[_0x50740b(0xee)]['get'](_);}};$(g,_0x3b7ea6(0xd6),W),$(g,'type',_0x3366af['UNIVER_UNKNOWN']),g=ie([_0x31c2de(_0x52729f,_0x5ecb4e,_0x2d5534),N(0x1,_0x28ae67(_0x44647b)),N(0x2,_0x3c3efa)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x8ad51f=_0x8773;(function(_0x306054,_0x1732e1){const _0x500f51=_0x8773,_0x4e6d2d=_0x306054();while(!![]){try{const _0x591468=-parseInt(_0x500f51(0xee))/0x1+-parseInt(_0x500f51(0xed))/0x2*(parseInt(_0x500f51(0xb4))/0x3)+parseInt(_0x500f51(0xe0))/0x4+-parseInt(_0x500f51(0xc2))/0x5+-parseInt(_0x500f51(0x9e))/0x6+parseInt(_0x500f51(0xd5))/0x7+parseInt(_0x500f51(0x99))/0x8;if(_0x591468===_0x1732e1)break;else _0x4e6d2d['push'](_0x4e6d2d['shift']());}catch(_0x131558){_0x4e6d2d['push'](_0x4e6d2d['shift']());}}}(_0x4bac,0x1d70e));import{CommentService as _0x275388,CollaborationSessionService as _0x4cdd12,UniverCollaborationClientPlugin as _0x141d43}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ff23d}from'@univerjs-pro/license';import{dayjs as _0x5b8721,UserManagerService as _0x5a8710,Inject as _0x262c9f,Injector as _0x4193c8,Disposable as _0x2134bf,CustomRangeType as _0x43b0a5,UniverInstanceType as _0x5a1685,DependentOn as _0x21e9b2,IConfigService as _0x592896,Plugin as _0x9beacc,merge as _0x4ed15d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x207a34}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x18e41d,IThreadCommentDataSourceService as _0x240ba1}from'@univerjs/thread-comment';function _0x8773(_0x302079,_0x1a27c2){_0x302079=_0x302079-0x8f;const _0x4bac1e=_0x4bac();let _0x87736d=_0x4bac1e[_0x302079];return _0x87736d;}import{bufferTime as _0x237e27}from'rxjs';import{HTTPService as _0x3d8493}from'@univerjs/network';const W=_0x8ad51f(0xf3);var I=(_0x5e5e84=>(_0x5e5e84[_0x5e5e84[_0x8ad51f(0x92)]=0x0]='OpenOrReOpen',_0x5e5e84[_0x5e5e84[_0x8ad51f(0xf0)]=0x1]='Solved',_0x5e5e84[_0x5e5e84[_0x8ad51f(0x9a)]=-0x1]=_0x8ad51f(0x9a),_0x5e5e84))(I||{}),v=(_0x4fb332=>(_0x4fb332[_0x4fb332['Unknown']=0x0]=_0x8ad51f(0xaa),_0x4fb332[_0x4fb332[_0x8ad51f(0xb6)]=0x1]=_0x8ad51f(0xb6),_0x4fb332[_0x4fb332[_0x8ad51f(0xac)]=0x2]=_0x8ad51f(0xac),_0x4fb332[_0x4fb332[_0x8ad51f(0x94)]=0x3]='Edit',_0x4fb332[_0x4fb332['Delete']=0x4]='Delete',_0x4fb332[_0x4fb332['Solve']=0x5]=_0x8ad51f(0x93),_0x4fb332[_0x4fb332['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4fb332))(v||{});const y=_0x53755a=>_0x5b8721(new Date(+_0x53755a))['format'](_0x8ad51f(0xae)),B=async(_0x4d513c,_0x5dfb64)=>{const _0x1dbf0c=_0x8ad51f,_0x145f43=_0x4d513c['get'](_0x5a8710),_0x17bb54=_0x4d513c[_0x1dbf0c(0x97)](_0x3d8493);_0x5dfb64[_0x1dbf0c(0xdf)](_0x2fd628=>{const _0x134d25=_0x1dbf0c;_0x145f43[_0x134d25(0xd2)](_0x2fd628)&&_0x5dfb64[_0x134d25(0xc6)](_0x2fd628);}),_0x5dfb64[_0x1dbf0c(0xdc)]&&(await _0x17bb54['get'](_0x1dbf0c(0xaf),{'params':{'userIDs':[..._0x5dfb64]}}))[_0x1dbf0c(0xab)][_0x1dbf0c(0xbd)][_0x1dbf0c(0xdf)](_0x264357=>{_0x264357&&_0x145f43['addUser'](_0x264357);});};var K=Object[_0x8ad51f(0xd9)],V=(_0x120dbe,_0x753c9f,_0x4f8203,_0x365282)=>{for(var _0x477a06=_0x365282>0x1?void 0x0:_0x365282?K(_0x753c9f,_0x4f8203):_0x753c9f,_0x439e53=_0x120dbe['length']-0x1,_0x3325ca;_0x439e53>=0x0;_0x439e53--)(_0x3325ca=_0x120dbe[_0x439e53])&&(_0x477a06=_0x3325ca(_0x477a06)||_0x477a06);return _0x477a06;},p=(_0x1eea65,_0x4f4a15)=>(_0x504e26,_0x4eb83d)=>_0x4f4a15(_0x504e26,_0x4eb83d,_0x1eea65);let _=class extends _0x2134bf{constructor(_0x3d0d8d,_0x5b16fb,_0x1655ff,_0x5a7ce3){const _0x12e0bb=_0x8ad51f;super(),this[_0x12e0bb(0xc0)]=_0x3d0d8d,this[_0x12e0bb(0x95)]=_0x5b16fb,this[_0x12e0bb(0xcb)]=_0x1655ff,this[_0x12e0bb(0x9c)]=_0x5a7ce3,this['_init'](),this[_0x12e0bb(0xe4)]();}[_0x8ad51f(0xe4)](){const _0x530ba5=_0x8ad51f;this[_0x530ba5(0x96)](this[_0x530ba5(0x95)][_0x530ba5(0xeb)][_0x530ba5(0xb5)](_0x237e27(0x10))[_0x530ba5(0xa8)](_0x5ee955=>{const _0x23a248=_0x530ba5,_0x53334b=new Set();_0x5ee955[_0x23a248(0xdf)](_0xe95445=>{const _0x21c59d=_0x23a248;switch(_0xe95445[_0x21c59d(0xdd)]){case'add':{const _0x290b7e=_0xe95445[_0x21c59d(0xbe)]['personId'];_0x53334b['add'](_0x290b7e);break;}}}),B(this[_0x23a248(0x9c)],_0x53334b);}));}[_0x8ad51f(0xa2)](){const _0x1b44ea=_0x8ad51f;this[_0x1b44ea(0x96)](this[_0x1b44ea(0xc0)]['commentUpdate$'][_0x1b44ea(0xa8)](async _0x55cc83=>{const _0x67d1ef=_0x1b44ea;var _0x4e19ab,_0x243c75,_0x4f1837,_0x71de14;const _0xe812c5=(_0x4e19ab=this[_0x67d1ef(0x95)]['getUnit'](_0x55cc83[_0x67d1ef(0xb0)])[_0x67d1ef(0xc4)](_0xf07b48=>_0xf07b48[_0x67d1ef(0xbb)]===_0x55cc83[_0x67d1ef(0xbb)]))==null?void 0x0:_0x4e19ab[_0x67d1ef(0xa3)];if(!_0xe812c5)return;const {unitId:_0x413764,subUnitId:_0x3d785f}=_0xe812c5;switch(_0x55cc83[_0x67d1ef(0xec)]&&this[_0x67d1ef(0xcb)]['addUser'](_0x55cc83['user']),_0x55cc83[_0x67d1ef(0xdd)]){case v['Add']:break;case v[_0x67d1ef(0xac)]:{this['_threadCommentModel'][_0x67d1ef(0x8f)](_0x413764,_0x3d785f,{'unitId':_0x413764,'subUnitId':_0x3d785f,'ref':'','id':_0x55cc83[_0x67d1ef(0xe7)],'dT':y(+_0x55cc83[_0x67d1ef(0xd4)]),'threadId':_0x55cc83[_0x67d1ef(0xbb)],'personId':(_0x4f1837=(_0x243c75=_0x55cc83[_0x67d1ef(0xec)])==null?void 0x0:_0x243c75[_0x67d1ef(0xc1)])!=null?_0x4f1837:_0x55cc83[_0x67d1ef(0xa6)],'text':JSON['parse'](_0x55cc83[_0x67d1ef(0xd0)]),'parentId':_0xe812c5['id']});break;}case v[_0x67d1ef(0xb1)]:{const _0x16e5d8=this['_threadCommentModel']['getComment'](_0x413764,_0x3d785f,_0x55cc83[_0x67d1ef(0xe7)]);_0x16e5d8&&_0x16e5d8[_0x67d1ef(0xa7)]&&this[_0x67d1ef(0x95)][_0x67d1ef(0xe5)](_0x413764,_0x3d785f,_0x55cc83[_0x67d1ef(0xe7)]);break;}case v['Edit']:{this[_0x67d1ef(0x95)][_0x67d1ef(0x90)](_0x413764,_0x3d785f,{'commentId':_0x55cc83['replyId'],'text':JSON[_0x67d1ef(0xce)](_0x55cc83['content'])});break;}case v[_0x67d1ef(0x93)]:{const _0x131190=(_0x71de14=this[_0x67d1ef(0x95)][_0x67d1ef(0x98)](_0x55cc83[_0x67d1ef(0xb0)])[_0x67d1ef(0xc4)](_0x7d27f1=>_0x7d27f1[_0x67d1ef(0xbb)]===_0x55cc83[_0x67d1ef(0xbb)]))==null?void 0x0:_0x71de14[_0x67d1ef(0xa3)];_0x131190&&this[_0x67d1ef(0x95)][_0x67d1ef(0xb2)](_0x413764,_0x3d785f,_0x131190['id'],_0x55cc83['solved']===I[_0x67d1ef(0xf0)]);break;}}}));}};_=V([p(0x0,_0x262c9f(_0x275388)),p(0x1,_0x262c9f(_0x18e41d)),p(0x2,_0x262c9f(_0x5a8710)),p(0x3,_0x262c9f(_0x4193c8))],_);const z=_0x8ad51f(0x9b),O={};var k=Object[_0x8ad51f(0xd9)],Q=(_0x2357bb,_0x18e432,_0x16fe54,_0x2ea563)=>{const _0x26cd6b=_0x8ad51f;for(var _0x2c9f58=_0x2ea563>0x1?void 0x0:_0x2ea563?k(_0x18e432,_0x16fe54):_0x18e432,_0x1289ef=_0x2357bb[_0x26cd6b(0xf2)]-0x1,_0x1b4652;_0x1289ef>=0x0;_0x1289ef--)(_0x1b4652=_0x2357bb[_0x1289ef])&&(_0x2c9f58=_0x1b4652(_0x2c9f58)||_0x2c9f58);return _0x2c9f58;},b=(_0x518589,_0x17abdc)=>(_0x416285,_0x2d0a08)=>_0x17abdc(_0x416285,_0x2d0a08,_0x518589);function X(_0x5d7c98,_0x308ebd){const _0x1c9fbc=_0x8ad51f,_0x31ea06=_0x5d7c98[_0x1c9fbc(0xa0)][0x0];return{..._0x308ebd,'id':_0x31ea06[_0x1c9fbc(0xe7)],'resolved':_0x5d7c98[_0x1c9fbc(0xc5)]===0x1,'dT':y(_0x31ea06[_0x1c9fbc(0xd4)]),'personId':_0x31ea06[_0x1c9fbc(0xa6)],'threadId':_0x31ea06[_0x1c9fbc(0xbb)]};}function ee(_0x39f866,_0xaaf33a,_0x32e883){const _0x3dcb71=_0x8ad51f;var _0x1b91ad,_0x2c6c85;if(((_0x2c6c85=(_0x1b91ad=_0x39f866==null?void 0x0:_0x39f866[_0x3dcb71(0xa0)])==null?void 0x0:_0x1b91ad[_0x3dcb71(0xf2)])!=null?_0x2c6c85:0x0)>0x0){const _0x51a23b=(_0x7e773b,_0x323cf5)=>({'id':_0x7e773b[_0x3dcb71(0xe7)],'threadId':_0x7e773b['threadId'],'dT':y(_0x7e773b['createTimestamp']),'personId':_0x7e773b[_0x3dcb71(0xa6)],'resolved':_0x39f866[_0x3dcb71(0xc5)]===I[_0x3dcb71(0xf0)],'unitId':_0xaaf33a,'subUnitId':_0x32e883,'text':JSON[_0x3dcb71(0xce)](_0x7e773b[_0x3dcb71(0xd0)]),'parentId':_0x323cf5}),_0x56fa93=_0x51a23b(_0x39f866[_0x3dcb71(0xa0)][0x0]);return{..._0x56fa93,'children':_0x39f866['replies']['slice'](0x1)['map'](_0x314a39=>_0x51a23b(_0x314a39,_0x56fa93['id']))};}return null;}let S=class{constructor(_0x143f67,_0x28a788,_0x22d435){const _0x270fac=_0x8ad51f;this[_0x270fac(0xa1)]=_0x143f67,this[_0x270fac(0xcb)]=_0x28a788,this[_0x270fac(0xca)]=_0x22d435;}async['addComment'](_0x36b279){const _0x80f055=_0x8ad51f;var _0x295607,_0x512565;const {parentId:_0x4781f9,unitId:_0x641ddc,text:_0x31b6e1,threadId:_0x3d9574}=_0x36b279,_0x5c6ca3=(_0x512565=(_0x295607=_0x31b6e1['customRanges'])==null?void 0x0:_0x295607['filter'](_0x35d978=>_0x35d978[_0x80f055(0xd3)]===_0x43b0a5['COMMENT'])[_0x80f055(0xe6)](_0x56efd9=>_0x56efd9[_0x80f055(0xe2)]))!=null?_0x512565:[],_0x5bcefd=JSON[_0x80f055(0xcc)](_0x31b6e1),_0x2d451a=(await this[_0x80f055(0xca)][_0x80f055(0xe3)](_0x641ddc))['getMemberID']();if(_0x4781f9){const _0x3f563b={'memberId':_0x2d451a,'unitId':_0x641ddc,'content':_0x5bcefd,'mention':_0x5c6ca3,'threadId':_0x3d9574},_0x1738e0=(await this[_0x80f055(0xa1)]['post'](_0x80f055(0xd6)+_0x641ddc+'/reply',{'body':_0x3f563b}))['body']['reply'];return{..._0x36b279,'id':_0x1738e0['replyId'],'dT':_0x5b8721(+_0x1738e0[_0x80f055(0xd4)])[_0x80f055(0xda)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1738e0[_0x80f055(0xa6)]};}else{const _0x21cb50={'memberId':_0x2d451a,'unitId':_0x641ddc,'content':_0x5bcefd,'mention':_0x5c6ca3},_0x377129=await this[_0x80f055(0xa1)][_0x80f055(0xe8)](_0x80f055(0xd6)+_0x641ddc+_0x80f055(0xd7),{'body':_0x21cb50});return X(_0x377129[_0x80f055(0xab)]['comment'],_0x36b279);}}async[_0x8ad51f(0x90)](_0x1b2b7e){const _0x3e25aa=_0x8ad51f;var _0x242d99,_0x4704e2;const {text:_0x174f74,unitId:_0x3d0bbd}=_0x1b2b7e,_0x261d17=(_0x4704e2=(_0x242d99=_0x174f74[_0x3e25aa(0xb8)])==null?void 0x0:_0x242d99['filter'](_0x18fd9c=>_0x18fd9c[_0x3e25aa(0xd3)]===_0x43b0a5['COMMENT'])[_0x3e25aa(0xe6)](_0x10fde5=>_0x10fde5['rangeId']))!=null?_0x4704e2:[],_0x2dcd71=JSON[_0x3e25aa(0xcc)](_0x174f74),_0xc66813=_0x1b2b7e['threadId'],_0x5ba491=_0x1b2b7e['id'],_0x4858fb={'memberId':(await this[_0x3e25aa(0xca)]['requireSession'](_0x3d0bbd))[_0x3e25aa(0xa5)](),'unitId':_0x3d0bbd,'threadId':_0xc66813,'mention':_0x261d17,'content':_0x2dcd71,'replyId':_0x5ba491},_0x9b72b7=await this[_0x3e25aa(0xa1)]['post']('/universer-api/comment/unit/'+_0x3d0bbd+_0x3e25aa(0xf1),{'body':_0x4858fb});return!_0x9b72b7['body']['error']||_0x9b72b7[_0x3e25aa(0xab)]['error'][_0x3e25aa(0xea)]===0x1;}async['resolveComment'](_0x46ed9a){const _0x4c176f=_0x8ad51f,{unitId:_0x257513}=_0x46ed9a,_0x2e8ac4=_0x46ed9a[_0x4c176f(0xbb)],_0x265f92={'memberId':this[_0x4c176f(0xcb)][_0x4c176f(0xba)]()[_0x4c176f(0xc1)],'unitId':_0x257513,'threadId':_0x2e8ac4,'solved':_0x46ed9a[_0x4c176f(0xd8)]?I[_0x4c176f(0xf0)]:I[_0x4c176f(0x92)]},_0x4bb6ed=await this[_0x4c176f(0xa1)]['post'](_0x4c176f(0xd6)+_0x257513+_0x4c176f(0xdb),{'body':_0x265f92});return!_0x4bb6ed[_0x4c176f(0xab)][_0x4c176f(0xde)]||_0x4bb6ed[_0x4c176f(0xab)][_0x4c176f(0xde)][_0x4c176f(0xea)]===0x1;}async[_0x8ad51f(0xe5)](_0x32f95d,_0x3da458,_0x283a54,_0x5ef288){const _0x22f736=_0x8ad51f,_0x1f498e={'memberId':(await this[_0x22f736(0xca)][_0x22f736(0xe3)](_0x32f95d))['getMemberID'](),'threadId':_0x283a54,'replyId':_0x5ef288,'unitId':_0x32f95d},_0x55fc61=await this['_httpService'][_0x22f736(0xe8)](_0x22f736(0xd6)+_0x32f95d+_0x22f736(0x9f),{'body':_0x1f498e});return!_0x55fc61[_0x22f736(0xab)][_0x22f736(0xde)]||_0x55fc61['body'][_0x22f736(0xde)][_0x22f736(0xea)]===0x1;}async[_0x8ad51f(0x9d)](_0x1076d8,_0x5bb4a3,_0x489b3d){const _0x59c2ac=_0x8ad51f,_0x2232de={'unitId':_0x1076d8,'threadId':_0x489b3d},_0x18bf12=await this[_0x59c2ac(0xa1)]['post']('/universer-api/comment/unit/'+_0x1076d8+_0x59c2ac(0x91),{'body':_0x2232de}),_0x694b9f=_0x489b3d[_0x59c2ac(0xe6)](_0x1428fe=>ee(_0x18bf12[_0x59c2ac(0xab)][_0x59c2ac(0xbc)][_0x1428fe],_0x1076d8,_0x5bb4a3))[_0x59c2ac(0xb9)](Boolean);return Object[_0x59c2ac(0xc3)](_0x18bf12[_0x59c2ac(0xab)]['users'])[_0x59c2ac(0xdf)](_0x216203=>{const _0x16f714=_0x59c2ac;this[_0x16f714(0xcb)][_0x16f714(0xe9)](_0x216203);}),_0x694b9f;}[_0x8ad51f(0xbf)](_0x52d61a){const _0x535968=_0x8ad51f;return{'id':_0x52d61a['id'],'threadId':_0x52d61a[_0x535968(0xbb)],'ref':_0x52d61a['ref']};}};function _0x4bac(){const _0x5c4b55=['stringify','pluginName','parse','_configService','content','UNIVER_UNKNOWN','getUser','rangeType','createTimestamp','996079wdmfTd','/universer-api/comment/unit/','/add','resolved','getOwnPropertyDescriptor','format','/solved','size','type','error','forEach','65500eXhvMl','onStarting','rangeId','requireSession','_initUserSync','deleteComment','map','replyId','post','addUser','code','commentUpdate$','user','2070gmdnOt','235882iNKakf','_threadCommentDataSourceService','Solved','/edit','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addComment','updateComment','/list','OpenOrReOpen','Solve','Edit','_threadCommentModel','disposeWithMe','get','getUnit','4889416AVMROx','UNRECOGNIZED','thread-comment-data-source.config','_injector','listComments','115914ywnlFj','/delete','replies','_httpService','_init','root','setConfig','getMemberID','userId','parentId','subscribe','_threadCommentDataSource','Unknown','body','Reply','_config','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','unitId','Delete','resolveComment','syncUpdateMutationToColla','627gyARgb','pipe','Add','add','customRanges','filter','getCurrentUser','threadId','comments','users','payload','saveCommentToSnapshot','_commentService','userID','888715fcIxOd','values','find','solved','delete','symbol','onReady','defineProperty','_sessionService','_userService'];_0x4bac=function(){return _0x5c4b55;};return _0x4bac();}S=Q([b(0x0,_0x262c9f(_0x3d8493)),b(0x1,_0x262c9f(_0x5a8710)),b(0x2,_0x262c9f(_0x4cdd12))],S);var re=Object[_0x8ad51f(0xd9)],te=(_0xae06ec,_0x56bfe4,_0x12d5df,_0xb082e2)=>{const _0x42c264=_0x8ad51f;for(var _0x4f30bd=_0xb082e2>0x1?void 0x0:_0xb082e2?re(_0x56bfe4,_0x12d5df):_0x56bfe4,_0x752e89=_0xae06ec[_0x42c264(0xf2)]-0x1,_0x3184df;_0x752e89>=0x0;_0x752e89--)(_0x3184df=_0xae06ec[_0x752e89])&&(_0x4f30bd=_0x3184df(_0x4f30bd)||_0x4f30bd);return _0x4f30bd;},M=(_0x569782,_0x407a0a)=>(_0x285b74,_0x2a9d33)=>_0x407a0a(_0x285b74,_0x2a9d33,_0x569782);let f=class extends _0x2134bf{constructor(_0x4480da,_0x10a7dc){super(),this['_threadCommentDataSourceService']=_0x4480da,this['_threadCommentDataSource']=_0x10a7dc,this['_initDataSource']();}['_initDataSource'](){const _0x2422be=_0x8ad51f;this[_0x2422be(0xef)]['dataSource']=this[_0x2422be(0xa9)],this[_0x2422be(0xef)][_0x2422be(0xb3)]=!0x1;}};f=te([M(0x0,_0x240ba1),M(0x1,_0x262c9f(S))],f);var se=Object[_0x8ad51f(0xc9)],oe=Object[_0x8ad51f(0xd9)],ne=(_0x4d07a2,_0x55fab5,_0x5dd008)=>_0x55fab5 in _0x4d07a2?se(_0x4d07a2,_0x55fab5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5dd008}):_0x4d07a2[_0x55fab5]=_0x5dd008,ie=(_0x361730,_0x3e6ad9,_0x47b45d,_0x23b611)=>{const _0x51470a=_0x8ad51f;for(var _0x252da8=_0x23b611>0x1?void 0x0:_0x23b611?oe(_0x3e6ad9,_0x47b45d):_0x3e6ad9,_0x911678=_0x361730[_0x51470a(0xf2)]-0x1,_0x247d15;_0x911678>=0x0;_0x911678--)(_0x247d15=_0x361730[_0x911678])&&(_0x252da8=_0x247d15(_0x252da8)||_0x252da8);return _0x252da8;},N=(_0x4416a9,_0xb0c7f1)=>(_0x5e84b3,_0x5e2702)=>_0xb0c7f1(_0x5e84b3,_0x5e2702,_0x4416a9),$=(_0xfd1638,_0x24a8f8,_0xd71daf)=>ne(_0xfd1638,typeof _0x24a8f8!=_0x8ad51f(0xc7)?_0x24a8f8+'':_0x24a8f8,_0xd71daf);let g=class extends _0x9beacc{constructor(_0x55d7e4=O,_0x1981a3,_0x1c9e29){const _0xe16fe1=_0x8ad51f;super(),this[_0xe16fe1(0xad)]=_0x55d7e4,this[_0xe16fe1(0x9c)]=_0x1981a3,this[_0xe16fe1(0xcf)]=_0x1c9e29;const {..._0x5b37ee}=_0x4ed15d({},O,this[_0xe16fe1(0xad)]);this[_0xe16fe1(0xcf)][_0xe16fe1(0xa4)](z,_0x5b37ee);}[_0x8ad51f(0xe1)](){const _0x309146=_0x8ad51f;[[S],[f],[_]][_0x309146(0xdf)](_0x54bb4b=>{const _0x48d653=_0x309146;this[_0x48d653(0x9c)][_0x48d653(0xb7)](_0x54bb4b);});}[_0x8ad51f(0xc8)](){const _0x1de0f8=_0x8ad51f;this[_0x1de0f8(0x9c)][_0x1de0f8(0x97)](f),this[_0x1de0f8(0x9c)]['get'](_);}};$(g,_0x8ad51f(0xcd),W),$(g,_0x8ad51f(0xdd),_0x5a1685[_0x8ad51f(0xd1)]),g=ie([_0x21e9b2(_0x207a34,_0x141d43,_0x4ff23d),N(0x1,_0x262c9f(_0x4193c8)),N(0x2,_0x592896)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x257b(_0x2edf39,_0x31084c){const _0x3ff652=_0x3ff6();return _0x257b=function(_0x257b18,_0x10e1f4){_0x257b18=_0x257b18-0x1c7;let _0x4fe5c9=_0x3ff652[_0x257b18];return _0x4fe5c9;},_0x257b(_0x2edf39,_0x31084c);}function _0x3ff6(){const _0x5e816a=['delete','_init','onReady','10wLvSJy','getUnit','exports','resolveComment','/delete','IThreadCommentDataSourceService','Injector','addComment','object','_config','173868fyoVSl','UNRECOGNIZED','customRanges','/universer-api/user/list','setConfig','/universer-api/comment/unit/','user','Reply','getMemberID','UniverProCollaborationClient','CustomRangeType','UniverThreadComment','reply','ref','unitId','threadId','getOwnPropertyDescriptor','map','rxjs','/edit','rangeId','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','addUser','CollaborationSessionService','_initDataSource','216787pnsVSD','IConfigService','solved','UniverThreadCommentUi','@univerjs/thread-comment-ui','personId','body','_threadCommentModel','Add','/list','150MgzQiG','Delete','CommentService','/solved','_sessionService','format','pluginName','forEach','createTimestamp','7471360vDBnWK','HTTPService','deleteComment','@univerjs/network','OpenOrReOpen','Module','Unknown','parentId','_commentService','defineProperty','2630466PBVnzZ','filter','UniverLicensePlugin','resolved','thread-comment-data-source.config','type','comments','dayjs','code','listComments','add','slice','bufferTime','function','COMMENT','/add','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','10787562rtvPWF','merge','_configService','Inject','dataSource','userID','pipe','post','root','@univerjs-pro/license','error','@univerjs/core','subscribe','syncUpdateMutationToColla','UniverProLicense','commentUpdate$','parse','userId','_httpService','Disposable','Edit','1465270qKziDz','get','users','stringify','values','UserManagerService','payload','find','amd','symbol','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','DependentOn','requireSession','size','Plugin','UniverInstanceType','updateComment','Solve','65ZeVMOj','getUser','replyId','length','_initUserSync','@univerjs-pro/collaboration-client','Solved','replies','230503kSVOCG','comment','_userService','_injector','rangeType','disposeWithMe'];_0x3ff6=function(){return _0x5e816a;};return _0x3ff6();}(function(_0x4c20ba,_0x24cf92){const _0x1334c7=_0x257b,_0x5e2b50=_0x4c20ba();while(!![]){try{const _0x31660c=parseInt(_0x1334c7(0x1e8))/0x1+parseInt(_0x1334c7(0x22c))/0x2+-parseInt(_0x1334c7(0x205))/0x3+-parseInt(_0x1334c7(0x1cc))/0x4*(parseInt(_0x1334c7(0x23f))/0x5)+parseInt(_0x1334c7(0x1f2))/0x6*(parseInt(_0x1334c7(0x247))/0x7)+-parseInt(_0x1334c7(0x1fb))/0x8+-parseInt(_0x1334c7(0x217))/0x9*(-parseInt(_0x1334c7(0x250))/0xa);if(_0x31660c===_0x24cf92)break;else _0x5e2b50['push'](_0x5e2b50['shift']());}catch(_0x1448c3){_0x5e2b50['push'](_0x5e2b50['shift']());}}}(_0x3ff6,0x915fc),function(_0x2138b7,_0x22b525){const _0xe1e551=_0x257b;typeof exports==_0xe1e551(0x1ca)&&typeof module<'u'?_0x22b525(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xe1e551(0x212)&&define[_0xe1e551(0x234)]?define([_0xe1e551(0x252),_0xe1e551(0x244),_0xe1e551(0x220),_0xe1e551(0x222),_0xe1e551(0x1ec),'@univerjs/thread-comment','rxjs',_0xe1e551(0x1fe)],_0x22b525):(_0x2138b7=typeof globalThis<'u'?globalThis:_0x2138b7||self,_0x22b525(_0x2138b7['UniverProThreadCommentDatasource']={},_0x2138b7[_0xe1e551(0x1d5)],_0x2138b7[_0xe1e551(0x225)],_0x2138b7['UniverCore'],_0x2138b7[_0xe1e551(0x1eb)],_0x2138b7[_0xe1e551(0x1d7)],_0x2138b7[_0xe1e551(0x1de)],_0x2138b7['UniverNetwork']));}(this,function(_0x389f2b,_0x268431,_0x198b16,_0xa92e6,_0x203d16,_0x2437b5,_0x2d260e,_0x1524a4){'use strict';const _0x593213=_0x257b;const _0x3cc975=_0x593213(0x237);var _0x4656cb=(_0x440c2d=>(_0x440c2d[_0x440c2d[_0x593213(0x1ff)]=0x0]='OpenOrReOpen',_0x440c2d[_0x440c2d[_0x593213(0x245)]=0x1]=_0x593213(0x245),_0x440c2d[_0x440c2d['UNRECOGNIZED']=-0x1]=_0x593213(0x1cd),_0x440c2d))(_0x4656cb||{}),_0x11237e=(_0x5adf41=>(_0x5adf41[_0x5adf41[_0x593213(0x201)]=0x0]='Unknown',_0x5adf41[_0x5adf41[_0x593213(0x1f0)]=0x1]=_0x593213(0x1f0),_0x5adf41[_0x5adf41[_0x593213(0x1d3)]=0x2]='Reply',_0x5adf41[_0x5adf41[_0x593213(0x22b)]=0x3]='Edit',_0x5adf41[_0x5adf41[_0x593213(0x1f3)]=0x4]=_0x593213(0x1f3),_0x5adf41[_0x5adf41[_0x593213(0x23e)]=0x5]=_0x593213(0x23e),_0x5adf41[_0x5adf41[_0x593213(0x1cd)]=-0x1]=_0x593213(0x1cd),_0x5adf41))(_0x11237e||{});const _0x3993c6=_0x36e3e0=>_0xa92e6['dayjs'](new Date(+_0x36e3e0))[_0x593213(0x1f7)](_0x593213(0x1e3)),_0x48e0e6=async(_0x16125f,_0x3e13a4)=>{const _0x531044=_0x593213,_0x24c7fa=_0x16125f[_0x531044(0x22d)](_0xa92e6[_0x531044(0x231)]),_0x33fb2c=_0x16125f[_0x531044(0x22d)](_0x1524a4[_0x531044(0x1fc)]);_0x3e13a4['forEach'](_0x3e9da1=>{const _0x157dae=_0x531044;_0x24c7fa[_0x157dae(0x240)](_0x3e9da1)&&_0x3e13a4[_0x157dae(0x24d)](_0x3e9da1);}),_0x3e13a4[_0x531044(0x23a)]&&(await _0x33fb2c[_0x531044(0x22d)](_0x531044(0x1cf),{'params':{'userIDs':[..._0x3e13a4]}}))['body'][_0x531044(0x22e)][_0x531044(0x1f9)](_0x27090b=>{_0x27090b&&_0x24c7fa['addUser'](_0x27090b);});};var _0x21964f=Object[_0x593213(0x1dc)],_0x4c8e28=(_0xaedd71,_0x5a111f,_0x542856,_0x2d8dfc)=>{const _0x2dc28d=_0x593213;for(var _0x47d22f=_0x2d8dfc>0x1?void 0x0:_0x2d8dfc?_0x21964f(_0x5a111f,_0x542856):_0x5a111f,_0x14fb77=_0xaedd71[_0x2dc28d(0x242)]-0x1,_0x3381f4;_0x14fb77>=0x0;_0x14fb77--)(_0x3381f4=_0xaedd71[_0x14fb77])&&(_0x47d22f=_0x3381f4(_0x47d22f)||_0x47d22f);return _0x47d22f;},_0x9d97ee=(_0x193981,_0x496e4b)=>(_0xff3690,_0xdf6322)=>_0x496e4b(_0xff3690,_0xdf6322,_0x193981);let _0x862e64=class extends _0xa92e6[_0x593213(0x22a)]{constructor(_0x5b045d,_0x19ff15,_0xc63f01,_0x48542e){const _0x58d619=_0x593213;super(),this['_commentService']=_0x5b045d,this[_0x58d619(0x1ef)]=_0x19ff15,this[_0x58d619(0x249)]=_0xc63f01,this[_0x58d619(0x24a)]=_0x48542e,this['_init'](),this['_initUserSync']();}[_0x593213(0x243)](){const _0x2e2be2=_0x593213;this['disposeWithMe'](this[_0x2e2be2(0x1ef)][_0x2e2be2(0x226)][_0x2e2be2(0x21d)](_0x2d260e[_0x2e2be2(0x211)](0x10))[_0x2e2be2(0x223)](_0x52160b=>{const _0x3df8ed=_0x2e2be2,_0x1fb321=new Set();_0x52160b[_0x3df8ed(0x1f9)](_0x16efb7=>{const _0x5c02c2=_0x3df8ed;switch(_0x16efb7[_0x5c02c2(0x20a)]){case'add':{const _0x44c595=_0x16efb7[_0x5c02c2(0x232)][_0x5c02c2(0x1ed)];_0x1fb321['add'](_0x44c595);break;}}}),_0x48e0e6(this[_0x3df8ed(0x24a)],_0x1fb321);}));}[_0x593213(0x24e)](){const _0xa31507=_0x593213;this[_0xa31507(0x24c)](this[_0xa31507(0x203)][_0xa31507(0x226)][_0xa31507(0x223)](async _0x56a656=>{const _0x363870=_0xa31507;var _0x1b18a6,_0x6665f7,_0x4da948,_0x405840;const _0x585a6a=(_0x1b18a6=this[_0x363870(0x1ef)][_0x363870(0x251)](_0x56a656['unitId'])[_0x363870(0x233)](_0x26931e=>_0x26931e['threadId']===_0x56a656[_0x363870(0x1db)]))==null?void 0x0:_0x1b18a6['root'];if(!_0x585a6a)return;const {unitId:_0x36db4d,subUnitId:_0x14699d}=_0x585a6a;switch(_0x56a656[_0x363870(0x1d2)]&&this[_0x363870(0x249)][_0x363870(0x1e5)](_0x56a656['user']),_0x56a656[_0x363870(0x20a)]){case _0x11237e[_0x363870(0x1f0)]:break;case _0x11237e['Reply']:{this[_0x363870(0x1ef)]['addComment'](_0x36db4d,_0x14699d,{'unitId':_0x36db4d,'subUnitId':_0x14699d,'ref':'','id':_0x56a656[_0x363870(0x241)],'dT':_0x3993c6(+_0x56a656[_0x363870(0x1fa)]),'threadId':_0x56a656[_0x363870(0x1db)],'personId':(_0x4da948=(_0x6665f7=_0x56a656[_0x363870(0x1d2)])==null?void 0x0:_0x6665f7[_0x363870(0x21c)])!=null?_0x4da948:_0x56a656[_0x363870(0x228)],'text':JSON[_0x363870(0x227)](_0x56a656[_0x363870(0x236)]),'parentId':_0x585a6a['id']});break;}case _0x11237e[_0x363870(0x1f3)]:{const _0x222c4=this[_0x363870(0x1ef)]['getComment'](_0x36db4d,_0x14699d,_0x56a656['replyId']);_0x222c4&&_0x222c4[_0x363870(0x202)]&&this[_0x363870(0x1ef)][_0x363870(0x1fd)](_0x36db4d,_0x14699d,_0x56a656['replyId']);break;}case _0x11237e[_0x363870(0x22b)]:{this[_0x363870(0x1ef)]['updateComment'](_0x36db4d,_0x14699d,{'commentId':_0x56a656[_0x363870(0x241)],'text':JSON[_0x363870(0x227)](_0x56a656[_0x363870(0x236)])});break;}case _0x11237e[_0x363870(0x23e)]:{const _0x4bc996=(_0x405840=this[_0x363870(0x1ef)][_0x363870(0x251)](_0x56a656[_0x363870(0x1da)])[_0x363870(0x233)](_0x4fd80b=>_0x4fd80b[_0x363870(0x1db)]===_0x56a656[_0x363870(0x1db)]))==null?void 0x0:_0x405840[_0x363870(0x21f)];_0x4bc996&&this[_0x363870(0x1ef)][_0x363870(0x253)](_0x36db4d,_0x14699d,_0x4bc996['id'],_0x56a656[_0x363870(0x1ea)]===_0x4656cb[_0x363870(0x245)]);break;}}}));}};_0x862e64=_0x4c8e28([_0x9d97ee(0x0,_0xa92e6[_0x593213(0x21a)](_0x268431[_0x593213(0x1f4)])),_0x9d97ee(0x1,_0xa92e6[_0x593213(0x21a)](_0x2437b5['ThreadCommentModel'])),_0x9d97ee(0x2,_0xa92e6[_0x593213(0x21a)](_0xa92e6[_0x593213(0x231)])),_0x9d97ee(0x3,_0xa92e6[_0x593213(0x21a)](_0xa92e6['Injector']))],_0x862e64);const _0x1ad1d7=_0x593213(0x209),_0x440bb2={};var _0x5547ec=Object['getOwnPropertyDescriptor'],_0x59c3c0=(_0xa556be,_0x321ca2,_0x5261f3,_0x3367f9)=>{const _0x1b03ca=_0x593213;for(var _0x452ac4=_0x3367f9>0x1?void 0x0:_0x3367f9?_0x5547ec(_0x321ca2,_0x5261f3):_0x321ca2,_0x13db4c=_0xa556be[_0x1b03ca(0x242)]-0x1,_0x5f3500;_0x13db4c>=0x0;_0x13db4c--)(_0x5f3500=_0xa556be[_0x13db4c])&&(_0x452ac4=_0x5f3500(_0x452ac4)||_0x452ac4);return _0x452ac4;},_0x456707=(_0x514e41,_0x179e7c)=>(_0x3bfc3d,_0x51e36c)=>_0x179e7c(_0x3bfc3d,_0x51e36c,_0x514e41);function _0x595c81(_0x3e1be3,_0x2c7b7f){const _0x3a8e28=_0x593213,_0x5e5353=_0x3e1be3[_0x3a8e28(0x246)][0x0];return{..._0x2c7b7f,'id':_0x5e5353[_0x3a8e28(0x241)],'resolved':_0x3e1be3[_0x3a8e28(0x1ea)]===0x1,'dT':_0x3993c6(_0x5e5353[_0x3a8e28(0x1fa)]),'personId':_0x5e5353['userId'],'threadId':_0x5e5353[_0x3a8e28(0x1db)]};}function _0x4278a4(_0x57fc8a,_0x223a49,_0x47afef){const _0x32b4ab=_0x593213;var _0x36012f,_0x63dc8f;if(((_0x63dc8f=(_0x36012f=_0x57fc8a==null?void 0x0:_0x57fc8a['replies'])==null?void 0x0:_0x36012f['length'])!=null?_0x63dc8f:0x0)>0x0){const _0x2a978a=(_0x4130eb,_0x619b78)=>({'id':_0x4130eb[_0x32b4ab(0x241)],'threadId':_0x4130eb[_0x32b4ab(0x1db)],'dT':_0x3993c6(_0x4130eb[_0x32b4ab(0x1fa)]),'personId':_0x4130eb[_0x32b4ab(0x228)],'resolved':_0x57fc8a[_0x32b4ab(0x1ea)]===_0x4656cb[_0x32b4ab(0x245)],'unitId':_0x223a49,'subUnitId':_0x47afef,'text':JSON[_0x32b4ab(0x227)](_0x4130eb['content']),'parentId':_0x619b78}),_0x4c034d=_0x2a978a(_0x57fc8a[_0x32b4ab(0x246)][0x0]);return{..._0x4c034d,'children':_0x57fc8a[_0x32b4ab(0x246)][_0x32b4ab(0x210)](0x1)[_0x32b4ab(0x1dd)](_0x2fb18c=>_0x2a978a(_0x2fb18c,_0x4c034d['id']))};}return null;}let _0xf6b40f=class{constructor(_0x50ac40,_0x435a35,_0x1fff76){const _0x43ccac=_0x593213;this['_httpService']=_0x50ac40,this[_0x43ccac(0x249)]=_0x435a35,this[_0x43ccac(0x1f6)]=_0x1fff76;}async[_0x593213(0x1c9)](_0x1ea2f5){const _0x2a63c4=_0x593213;var _0x92c0bd,_0x1e5354;const {parentId:_0x55e23f,unitId:_0x416c36,text:_0x3c6355,threadId:_0x5dbd10}=_0x1ea2f5,_0x29f371=(_0x1e5354=(_0x92c0bd=_0x3c6355[_0x2a63c4(0x1ce)])==null?void 0x0:_0x92c0bd[_0x2a63c4(0x206)](_0x1cff8e=>_0x1cff8e['rangeType']===_0xa92e6[_0x2a63c4(0x1d6)][_0x2a63c4(0x213)])[_0x2a63c4(0x1dd)](_0x3af89d=>_0x3af89d[_0x2a63c4(0x1e0)]))!=null?_0x1e5354:[],_0xc9fa09=JSON['stringify'](_0x3c6355),_0x5d7d42=(await this['_sessionService'][_0x2a63c4(0x239)](_0x416c36))[_0x2a63c4(0x1d4)]();if(_0x55e23f){const _0x38de80={'memberId':_0x5d7d42,'unitId':_0x416c36,'content':_0xc9fa09,'mention':_0x29f371,'threadId':_0x5dbd10},_0x5ac00c=(await this[_0x2a63c4(0x229)][_0x2a63c4(0x21e)](_0x2a63c4(0x1d1)+_0x416c36+'/reply',{'body':_0x38de80}))[_0x2a63c4(0x1ee)][_0x2a63c4(0x1d8)];return{..._0x1ea2f5,'id':_0x5ac00c[_0x2a63c4(0x241)],'dT':_0xa92e6[_0x2a63c4(0x20c)](+_0x5ac00c[_0x2a63c4(0x1fa)])[_0x2a63c4(0x1f7)](_0x2a63c4(0x1e3)),'personId':_0x5ac00c[_0x2a63c4(0x228)]};}else{const _0x1243a8={'memberId':_0x5d7d42,'unitId':_0x416c36,'content':_0xc9fa09,'mention':_0x29f371},_0x3135db=await this[_0x2a63c4(0x229)][_0x2a63c4(0x21e)](_0x2a63c4(0x1d1)+_0x416c36+_0x2a63c4(0x214),{'body':_0x1243a8});return _0x595c81(_0x3135db[_0x2a63c4(0x1ee)][_0x2a63c4(0x248)],_0x1ea2f5);}}async[_0x593213(0x23d)](_0x1bcec6){const _0x3e9cf9=_0x593213;var _0x214a24,_0x5066d8;const {text:_0x5322e1,unitId:_0x3cb955}=_0x1bcec6,_0x31e9f1=(_0x5066d8=(_0x214a24=_0x5322e1['customRanges'])==null?void 0x0:_0x214a24[_0x3e9cf9(0x206)](_0x48c1ed=>_0x48c1ed[_0x3e9cf9(0x24b)]===_0xa92e6[_0x3e9cf9(0x1d6)][_0x3e9cf9(0x213)])[_0x3e9cf9(0x1dd)](_0x4fe6fa=>_0x4fe6fa['rangeId']))!=null?_0x5066d8:[],_0x4c4e27=JSON[_0x3e9cf9(0x22f)](_0x5322e1),_0xf9f2c4=_0x1bcec6[_0x3e9cf9(0x1db)],_0x55e83c=_0x1bcec6['id'],_0x1a1916={'memberId':(await this[_0x3e9cf9(0x1f6)][_0x3e9cf9(0x239)](_0x3cb955))['getMemberID'](),'unitId':_0x3cb955,'threadId':_0xf9f2c4,'mention':_0x31e9f1,'content':_0x4c4e27,'replyId':_0x55e83c},_0x41423d=await this[_0x3e9cf9(0x229)][_0x3e9cf9(0x21e)](_0x3e9cf9(0x1d1)+_0x3cb955+_0x3e9cf9(0x1df),{'body':_0x1a1916});return!_0x41423d[_0x3e9cf9(0x1ee)][_0x3e9cf9(0x221)]||_0x41423d[_0x3e9cf9(0x1ee)][_0x3e9cf9(0x221)][_0x3e9cf9(0x20d)]===0x1;}async[_0x593213(0x253)](_0x347245){const _0x3897f0=_0x593213,{unitId:_0x2e6b3d}=_0x347245,_0x4251ef=_0x347245[_0x3897f0(0x1db)],_0x3b0e00={'memberId':this[_0x3897f0(0x249)]['getCurrentUser']()[_0x3897f0(0x21c)],'unitId':_0x2e6b3d,'threadId':_0x4251ef,'solved':_0x347245[_0x3897f0(0x208)]?_0x4656cb['Solved']:_0x4656cb[_0x3897f0(0x1ff)]},_0x300dcd=await this['_httpService'][_0x3897f0(0x21e)](_0x3897f0(0x1d1)+_0x2e6b3d+_0x3897f0(0x1f5),{'body':_0x3b0e00});return!_0x300dcd[_0x3897f0(0x1ee)][_0x3897f0(0x221)]||_0x300dcd[_0x3897f0(0x1ee)][_0x3897f0(0x221)][_0x3897f0(0x20d)]===0x1;}async[_0x593213(0x1fd)](_0x3f137b,_0x29e5e4,_0x51b05c,_0x3096dc){const _0x3ad491=_0x593213,_0x4b255c={'memberId':(await this[_0x3ad491(0x1f6)][_0x3ad491(0x239)](_0x3f137b))['getMemberID'](),'threadId':_0x51b05c,'replyId':_0x3096dc,'unitId':_0x3f137b},_0x1d7cd4=await this[_0x3ad491(0x229)][_0x3ad491(0x21e)](_0x3ad491(0x1d1)+_0x3f137b+_0x3ad491(0x254),{'body':_0x4b255c});return!_0x1d7cd4[_0x3ad491(0x1ee)][_0x3ad491(0x221)]||_0x1d7cd4['body'][_0x3ad491(0x221)][_0x3ad491(0x20d)]===0x1;}async[_0x593213(0x20e)](_0x64c3b3,_0x299b77,_0xfc454b){const _0xc82b67=_0x593213,_0x12b6dc={'unitId':_0x64c3b3,'threadId':_0xfc454b},_0x1ead42=await this[_0xc82b67(0x229)]['post']('/universer-api/comment/unit/'+_0x64c3b3+_0xc82b67(0x1f1),{'body':_0x12b6dc}),_0x50f23a=_0xfc454b[_0xc82b67(0x1dd)](_0x5b706e=>_0x4278a4(_0x1ead42['body'][_0xc82b67(0x20b)][_0x5b706e],_0x64c3b3,_0x299b77))[_0xc82b67(0x206)](Boolean);return Object[_0xc82b67(0x230)](_0x1ead42[_0xc82b67(0x1ee)][_0xc82b67(0x22e)])[_0xc82b67(0x1f9)](_0x56b0d6=>{const _0x463e72=_0xc82b67;this[_0x463e72(0x249)][_0x463e72(0x1e5)](_0x56b0d6);}),_0x50f23a;}['saveCommentToSnapshot'](_0x1733fd){const _0x1ea7eb=_0x593213;return{'id':_0x1733fd['id'],'threadId':_0x1733fd['threadId'],'ref':_0x1733fd[_0x1ea7eb(0x1d9)]};}};_0xf6b40f=_0x59c3c0([_0x456707(0x0,_0xa92e6[_0x593213(0x21a)](_0x1524a4[_0x593213(0x1fc)])),_0x456707(0x1,_0xa92e6[_0x593213(0x21a)](_0xa92e6[_0x593213(0x231)])),_0x456707(0x2,_0xa92e6[_0x593213(0x21a)](_0x268431[_0x593213(0x1e6)]))],_0xf6b40f);var _0x5992e2=Object[_0x593213(0x1dc)],_0x134d50=(_0x429f9c,_0x31fc94,_0x5af2c8,_0x443d68)=>{const _0x5b9b1b=_0x593213;for(var _0x1f797c=_0x443d68>0x1?void 0x0:_0x443d68?_0x5992e2(_0x31fc94,_0x5af2c8):_0x31fc94,_0x54ffd8=_0x429f9c[_0x5b9b1b(0x242)]-0x1,_0x4d3b0d;_0x54ffd8>=0x0;_0x54ffd8--)(_0x4d3b0d=_0x429f9c[_0x54ffd8])&&(_0x1f797c=_0x4d3b0d(_0x1f797c)||_0x1f797c);return _0x1f797c;},_0x3d9f78=(_0x22605c,_0x57c8f7)=>(_0x93928e,_0x579fa6)=>_0x57c8f7(_0x93928e,_0x579fa6,_0x22605c);let _0x5a2af2=class extends _0xa92e6[_0x593213(0x22a)]{constructor(_0x5d557f,_0x115a10){const _0x62b6cb=_0x593213;super(),this[_0x62b6cb(0x216)]=_0x5d557f,this[_0x62b6cb(0x1e4)]=_0x115a10,this[_0x62b6cb(0x1e7)]();}['_initDataSource'](){const _0x28ae58=_0x593213;this[_0x28ae58(0x216)][_0x28ae58(0x21b)]=this[_0x28ae58(0x1e4)],this['_threadCommentDataSourceService'][_0x28ae58(0x224)]=!0x1;}};_0x5a2af2=_0x134d50([_0x3d9f78(0x0,_0x2437b5[_0x593213(0x1c7)]),_0x3d9f78(0x1,_0xa92e6[_0x593213(0x21a)](_0xf6b40f))],_0x5a2af2);var _0x22255f=Object[_0x593213(0x204)],_0xd6f677=Object[_0x593213(0x1dc)],_0x4373c9=(_0x1d2281,_0x4dc788,_0x1d7ec1)=>_0x4dc788 in _0x1d2281?_0x22255f(_0x1d2281,_0x4dc788,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d7ec1}):_0x1d2281[_0x4dc788]=_0x1d7ec1,_0x43b263=(_0x47e61d,_0x111354,_0x28579e,_0x467b8f)=>{const _0x15fc5d=_0x593213;for(var _0x20a4e9=_0x467b8f>0x1?void 0x0:_0x467b8f?_0xd6f677(_0x111354,_0x28579e):_0x111354,_0x3d3c2=_0x47e61d[_0x15fc5d(0x242)]-0x1,_0x28d6f8;_0x3d3c2>=0x0;_0x3d3c2--)(_0x28d6f8=_0x47e61d[_0x3d3c2])&&(_0x20a4e9=_0x28d6f8(_0x20a4e9)||_0x20a4e9);return _0x20a4e9;},_0x3d2c34=(_0x5f3c13,_0x214544)=>(_0x4e4bfb,_0x34e4a4)=>_0x214544(_0x4e4bfb,_0x34e4a4,_0x5f3c13),_0x4a64e6=(_0x1c52c1,_0x2d9e6f,_0x4031d4)=>_0x4373c9(_0x1c52c1,typeof _0x2d9e6f!=_0x593213(0x235)?_0x2d9e6f+'':_0x2d9e6f,_0x4031d4);_0x389f2b[_0x593213(0x1e1)]=class extends _0xa92e6[_0x593213(0x23b)]{constructor(_0x31cb9a=_0x440bb2,_0x297b52,_0x436ed2){const _0x41401c=_0x593213;super(),this[_0x41401c(0x1cb)]=_0x31cb9a,this[_0x41401c(0x24a)]=_0x297b52,this[_0x41401c(0x219)]=_0x436ed2;const {..._0x46adeb}=_0xa92e6[_0x41401c(0x218)]({},_0x440bb2,this[_0x41401c(0x1cb)]);this[_0x41401c(0x219)][_0x41401c(0x1d0)](_0x1ad1d7,_0x46adeb);}['onStarting'](){const _0x628fa0=_0x593213;[[_0xf6b40f],[_0x5a2af2],[_0x862e64]][_0x628fa0(0x1f9)](_0x15a2f4=>{const _0xa199be=_0x628fa0;this[_0xa199be(0x24a)][_0xa199be(0x20f)](_0x15a2f4);});}[_0x593213(0x24f)](){const _0x330277=_0x593213;this[_0x330277(0x24a)]['get'](_0x5a2af2),this[_0x330277(0x24a)][_0x330277(0x22d)](_0x862e64);}},_0x4a64e6(_0x389f2b[_0x593213(0x1e1)],_0x593213(0x1f8),_0x3cc975),_0x4a64e6(_0x389f2b[_0x593213(0x1e1)],_0x593213(0x20a),_0xa92e6[_0x593213(0x23c)]['UNIVER_UNKNOWN']),_0x389f2b['UniverThreadCommentDataSourcePlugin']=_0x43b263([_0xa92e6[_0x593213(0x238)](_0x203d16[_0x593213(0x215)],_0x268431[_0x593213(0x1e2)],_0x198b16[_0x593213(0x207)]),_0x3d2c34(0x1,_0xa92e6['Inject'](_0xa92e6[_0x593213(0x1c8)])),_0x3d2c34(0x2,_0xa92e6[_0x593213(0x1e9)])],_0x389f2b[_0x593213(0x1e1)]),Object[_0x593213(0x204)](_0x389f2b,Symbol['toStringTag'],{'value':_0x593213(0x200)});}));
1
+ function _0xd7e4(_0x1c38a0,_0x136738){_0x1c38a0=_0x1c38a0-0x193;const _0x340a0=_0x340a();let _0xd7e4c2=_0x340a0[_0x1c38a0];return _0xd7e4c2;}(function(_0x2f0bf7,_0x36dd8c){const _0x304d76=_0xd7e4,_0x3ae3ae=_0x2f0bf7();while(!![]){try{const _0x24f9f0=-parseInt(_0x304d76(0x1a6))/0x1*(-parseInt(_0x304d76(0x1ef))/0x2)+parseInt(_0x304d76(0x199))/0x3+-parseInt(_0x304d76(0x1df))/0x4+parseInt(_0x304d76(0x218))/0x5*(-parseInt(_0x304d76(0x202))/0x6)+parseInt(_0x304d76(0x19c))/0x7+-parseInt(_0x304d76(0x209))/0x8*(parseInt(_0x304d76(0x1d5))/0x9)+parseInt(_0x304d76(0x1ea))/0xa;if(_0x24f9f0===_0x36dd8c)break;else _0x3ae3ae['push'](_0x3ae3ae['shift']());}catch(_0x50ac5e){_0x3ae3ae['push'](_0x3ae3ae['shift']());}}}(_0x340a,0x44705),function(_0x3650f1,_0x353dd4){const _0x1124a4=_0xd7e4;typeof exports==_0x1124a4(0x1a2)&&typeof module<'u'?_0x353dd4(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1124a4(0x21b)&&define['amd']?define(['exports',_0x1124a4(0x1be),_0x1124a4(0x198),_0x1124a4(0x1a8),_0x1124a4(0x204),'@univerjs/thread-comment','rxjs',_0x1124a4(0x1f0)],_0x353dd4):(_0x3650f1=typeof globalThis<'u'?globalThis:_0x3650f1||self,_0x353dd4(_0x3650f1[_0x1124a4(0x208)]={},_0x3650f1['UniverProCollaborationClient'],_0x3650f1[_0x1124a4(0x1f2)],_0x3650f1[_0x1124a4(0x20d)],_0x3650f1['UniverThreadCommentUi'],_0x3650f1[_0x1124a4(0x21c)],_0x3650f1[_0x1124a4(0x205)],_0x3650f1[_0x1124a4(0x1e0)]));}(this,function(_0x136b8b,_0x1e62b2,_0x379707,_0x4dad3b,_0x3f674b,_0x53582d,_0x1912ef,_0x508d1f){'use strict';const _0x2e613c=_0xd7e4;const _0x1e414f=_0x2e613c(0x19b);var _0x517355=(_0x1971fa=>(_0x1971fa[_0x1971fa['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1971fa[_0x1971fa[_0x2e613c(0x201)]=0x1]=_0x2e613c(0x201),_0x1971fa[_0x1971fa['UNRECOGNIZED']=-0x1]=_0x2e613c(0x1cc),_0x1971fa))(_0x517355||{}),_0x1b5a67=(_0x361100=>(_0x361100[_0x361100[_0x2e613c(0x1e2)]=0x0]=_0x2e613c(0x1e2),_0x361100[_0x361100[_0x2e613c(0x195)]=0x1]='Add',_0x361100[_0x361100[_0x2e613c(0x214)]=0x2]=_0x2e613c(0x214),_0x361100[_0x361100[_0x2e613c(0x1c5)]=0x3]='Edit',_0x361100[_0x361100[_0x2e613c(0x207)]=0x4]=_0x2e613c(0x207),_0x361100[_0x361100[_0x2e613c(0x1bf)]=0x5]=_0x2e613c(0x1bf),_0x361100[_0x361100[_0x2e613c(0x1cc)]=-0x1]='UNRECOGNIZED',_0x361100))(_0x1b5a67||{});const _0x2111b8=_0xdaf244=>_0x4dad3b[_0x2e613c(0x1bb)](new Date(+_0xdaf244))[_0x2e613c(0x20c)](_0x2e613c(0x1cf)),_0x5a77de=async(_0x5499ed,_0xa49b55)=>{const _0x39d489=_0x2e613c,_0x2c956c=_0x5499ed[_0x39d489(0x1f6)](_0x4dad3b[_0x39d489(0x1ce)]),_0x96ee67=_0x5499ed[_0x39d489(0x1f6)](_0x508d1f['HTTPService']);_0xa49b55['forEach'](_0x42aed8=>{const _0x43e892=_0x39d489;_0x2c956c[_0x43e892(0x1a1)](_0x42aed8)&&_0xa49b55['delete'](_0x42aed8);}),_0xa49b55[_0x39d489(0x217)]&&(await _0x96ee67[_0x39d489(0x1f6)](_0x39d489(0x1e1),{'params':{'userIDs':[..._0xa49b55]}}))[_0x39d489(0x1f5)][_0x39d489(0x1d2)][_0x39d489(0x1b7)](_0x2be67f=>{const _0x36f7de=_0x39d489;_0x2be67f&&_0x2c956c[_0x36f7de(0x1af)](_0x2be67f);});};var _0x4e5df8=Object[_0x2e613c(0x1b3)],_0x4cb8a8=(_0x3935be,_0x114c8b,_0x379162,_0xa8b4)=>{const _0x9fb803=_0x2e613c;for(var _0x29a86f=_0xa8b4>0x1?void 0x0:_0xa8b4?_0x4e5df8(_0x114c8b,_0x379162):_0x114c8b,_0x47f362=_0x3935be[_0x9fb803(0x1b0)]-0x1,_0x4a94e5;_0x47f362>=0x0;_0x47f362--)(_0x4a94e5=_0x3935be[_0x47f362])&&(_0x29a86f=_0x4a94e5(_0x29a86f)||_0x29a86f);return _0x29a86f;},_0x2fb38e=(_0x4866c9,_0x3a8f76)=>(_0x3d66f4,_0x198209)=>_0x3a8f76(_0x3d66f4,_0x198209,_0x4866c9);let _0x5eb8aa=class extends _0x4dad3b[_0x2e613c(0x1d8)]{constructor(_0x5f0130,_0x1a6da2,_0x17fd87,_0x4323ec){const _0x54d017=_0x2e613c;super(),this['_commentService']=_0x5f0130,this['_threadCommentModel']=_0x1a6da2,this['_userService']=_0x17fd87,this[_0x54d017(0x1e9)]=_0x4323ec,this[_0x54d017(0x1eb)](),this[_0x54d017(0x1ae)]();}[_0x2e613c(0x1ae)](){const _0x35610a=_0x2e613c;this[_0x35610a(0x1a7)](this[_0x35610a(0x1b2)][_0x35610a(0x1c6)]['pipe'](_0x1912ef[_0x35610a(0x1c1)](0x10))[_0x35610a(0x19e)](_0x40fd72=>{const _0xb37e04=_0x35610a,_0x37530a=new Set();_0x40fd72['forEach'](_0x33e2a8=>{const _0x502284=_0xd7e4;switch(_0x33e2a8[_0x502284(0x1d1)]){case _0x502284(0x1b8):{const _0x2a089b=_0x33e2a8[_0x502284(0x1d4)][_0x502284(0x20a)];_0x37530a[_0x502284(0x1b8)](_0x2a089b);break;}}}),_0x5a77de(this[_0xb37e04(0x1e9)],_0x37530a);}));}[_0x2e613c(0x1eb)](){const _0x288d0d=_0x2e613c;this[_0x288d0d(0x1a7)](this[_0x288d0d(0x19a)][_0x288d0d(0x1c6)][_0x288d0d(0x19e)](async _0x8c7dc9=>{const _0x3369ef=_0x288d0d;var _0x4b9091,_0x175cd5,_0x525d1c,_0x28cd57;const _0x24c6db=(_0x4b9091=this[_0x3369ef(0x1b2)][_0x3369ef(0x1a0)](_0x8c7dc9['unitId'])['find'](_0x9b7ef3=>_0x9b7ef3[_0x3369ef(0x1c7)]===_0x8c7dc9[_0x3369ef(0x1c7)]))==null?void 0x0:_0x4b9091[_0x3369ef(0x19f)];if(!_0x24c6db)return;const {unitId:_0x2b0006,subUnitId:_0x1dd0b2}=_0x24c6db;switch(_0x8c7dc9['user']&&this['_userService'][_0x3369ef(0x1af)](_0x8c7dc9[_0x3369ef(0x1fd)]),_0x8c7dc9[_0x3369ef(0x1d1)]){case _0x1b5a67['Add']:break;case _0x1b5a67[_0x3369ef(0x214)]:{this[_0x3369ef(0x1b2)][_0x3369ef(0x1da)](_0x2b0006,_0x1dd0b2,{'unitId':_0x2b0006,'subUnitId':_0x1dd0b2,'ref':'','id':_0x8c7dc9[_0x3369ef(0x216)],'dT':_0x2111b8(+_0x8c7dc9[_0x3369ef(0x1a3)]),'threadId':_0x8c7dc9[_0x3369ef(0x1c7)],'personId':(_0x525d1c=(_0x175cd5=_0x8c7dc9['user'])==null?void 0x0:_0x175cd5[_0x3369ef(0x1e6)])!=null?_0x525d1c:_0x8c7dc9[_0x3369ef(0x1ed)],'text':JSON[_0x3369ef(0x210)](_0x8c7dc9[_0x3369ef(0x1d3)]),'parentId':_0x24c6db['id']});break;}case _0x1b5a67['Delete']:{const _0x3fc100=this[_0x3369ef(0x1b2)][_0x3369ef(0x20f)](_0x2b0006,_0x1dd0b2,_0x8c7dc9[_0x3369ef(0x216)]);_0x3fc100&&_0x3fc100['parentId']&&this[_0x3369ef(0x1b2)][_0x3369ef(0x1f7)](_0x2b0006,_0x1dd0b2,_0x8c7dc9[_0x3369ef(0x216)]);break;}case _0x1b5a67[_0x3369ef(0x1c5)]:{this[_0x3369ef(0x1b2)][_0x3369ef(0x1b9)](_0x2b0006,_0x1dd0b2,{'commentId':_0x8c7dc9[_0x3369ef(0x216)],'text':JSON[_0x3369ef(0x210)](_0x8c7dc9[_0x3369ef(0x1d3)])});break;}case _0x1b5a67[_0x3369ef(0x1bf)]:{const _0x202df6=(_0x28cd57=this[_0x3369ef(0x1b2)]['getUnit'](_0x8c7dc9[_0x3369ef(0x1c2)])[_0x3369ef(0x1dc)](_0xcf2925=>_0xcf2925[_0x3369ef(0x1c7)]===_0x8c7dc9[_0x3369ef(0x1c7)]))==null?void 0x0:_0x28cd57[_0x3369ef(0x19f)];_0x202df6&&this[_0x3369ef(0x1b2)][_0x3369ef(0x1c8)](_0x2b0006,_0x1dd0b2,_0x202df6['id'],_0x8c7dc9[_0x3369ef(0x1db)]===_0x517355[_0x3369ef(0x201)]);break;}}}));}};_0x5eb8aa=_0x4cb8a8([_0x2fb38e(0x0,_0x4dad3b[_0x2e613c(0x206)](_0x1e62b2[_0x2e613c(0x1c9)])),_0x2fb38e(0x1,_0x4dad3b[_0x2e613c(0x206)](_0x53582d[_0x2e613c(0x219)])),_0x2fb38e(0x2,_0x4dad3b[_0x2e613c(0x206)](_0x4dad3b[_0x2e613c(0x1ce)])),_0x2fb38e(0x3,_0x4dad3b[_0x2e613c(0x206)](_0x4dad3b['Injector']))],_0x5eb8aa);const _0x36af6e='thread-comment-data-source.config',_0x3ec8a4={};var _0x9b3fee=Object[_0x2e613c(0x1b3)],_0x447f49=(_0x115fd4,_0x190d32,_0x41a662,_0x4379e9)=>{const _0x10c5e9=_0x2e613c;for(var _0x5cf9b2=_0x4379e9>0x1?void 0x0:_0x4379e9?_0x9b3fee(_0x190d32,_0x41a662):_0x190d32,_0x45fdbb=_0x115fd4[_0x10c5e9(0x1b0)]-0x1,_0x50926f;_0x45fdbb>=0x0;_0x45fdbb--)(_0x50926f=_0x115fd4[_0x45fdbb])&&(_0x5cf9b2=_0x50926f(_0x5cf9b2)||_0x5cf9b2);return _0x5cf9b2;},_0xea352=(_0x1b0096,_0x144788)=>(_0x27cc0d,_0x57323c)=>_0x144788(_0x27cc0d,_0x57323c,_0x1b0096);function _0x12e7fd(_0x249416,_0x42f2ff){const _0x28cb8c=_0x2e613c,_0x1beb91=_0x249416[_0x28cb8c(0x1f8)][0x0];return{..._0x42f2ff,'id':_0x1beb91[_0x28cb8c(0x216)],'resolved':_0x249416[_0x28cb8c(0x1db)]===0x1,'dT':_0x2111b8(_0x1beb91[_0x28cb8c(0x1a3)]),'personId':_0x1beb91[_0x28cb8c(0x1ed)],'threadId':_0x1beb91[_0x28cb8c(0x1c7)]};}function _0x9fc0db(_0x565296,_0x485340,_0x35c945){const _0x29a6c0=_0x2e613c;var _0x5a6ebc,_0x103a3d;if(((_0x103a3d=(_0x5a6ebc=_0x565296==null?void 0x0:_0x565296[_0x29a6c0(0x1f8)])==null?void 0x0:_0x5a6ebc['length'])!=null?_0x103a3d:0x0)>0x0){const _0x382e77=(_0x166afa,_0xaded)=>({'id':_0x166afa[_0x29a6c0(0x216)],'threadId':_0x166afa[_0x29a6c0(0x1c7)],'dT':_0x2111b8(_0x166afa[_0x29a6c0(0x1a3)]),'personId':_0x166afa[_0x29a6c0(0x1ed)],'resolved':_0x565296[_0x29a6c0(0x1db)]===_0x517355[_0x29a6c0(0x201)],'unitId':_0x485340,'subUnitId':_0x35c945,'text':JSON['parse'](_0x166afa[_0x29a6c0(0x1d3)]),'parentId':_0xaded}),_0x23949a=_0x382e77(_0x565296[_0x29a6c0(0x1f8)][0x0]);return{..._0x23949a,'children':_0x565296[_0x29a6c0(0x1f8)][_0x29a6c0(0x213)](0x1)['map'](_0x1b25a8=>_0x382e77(_0x1b25a8,_0x23949a['id']))};}return null;}let _0x136092=class{constructor(_0x33319c,_0x2e58fa,_0x22a1ea){const _0x18556b=_0x2e613c;this[_0x18556b(0x1aa)]=_0x33319c,this[_0x18556b(0x21a)]=_0x2e58fa,this['_sessionService']=_0x22a1ea;}async[_0x2e613c(0x1da)](_0x82e42a){const _0x172f00=_0x2e613c;var _0x55cf29,_0x180eb3;const {parentId:_0x38bf67,unitId:_0x4acb5e,text:_0x110b57,threadId:_0x16072e}=_0x82e42a,_0x3cf0af=(_0x180eb3=(_0x55cf29=_0x110b57[_0x172f00(0x1c0)])==null?void 0x0:_0x55cf29[_0x172f00(0x1dd)](_0x31c672=>_0x31c672['rangeType']===_0x4dad3b[_0x172f00(0x20b)][_0x172f00(0x1b5)])[_0x172f00(0x1a9)](_0x18ddc8=>_0x18ddc8['rangeId']))!=null?_0x180eb3:[],_0x2eb393=JSON['stringify'](_0x110b57),_0x27cfda=(await this[_0x172f00(0x20e)]['requireSession'](_0x4acb5e))[_0x172f00(0x215)]();if(_0x38bf67){const _0x25ff50={'memberId':_0x27cfda,'unitId':_0x4acb5e,'content':_0x2eb393,'mention':_0x3cf0af,'threadId':_0x16072e},_0x573dc4=(await this[_0x172f00(0x1aa)]['post'](_0x172f00(0x1fb)+_0x4acb5e+_0x172f00(0x1f1),{'body':_0x25ff50}))[_0x172f00(0x1f5)]['reply'];return{..._0x82e42a,'id':_0x573dc4[_0x172f00(0x216)],'dT':_0x4dad3b[_0x172f00(0x1bb)](+_0x573dc4[_0x172f00(0x1a3)])['format'](_0x172f00(0x1cf)),'personId':_0x573dc4[_0x172f00(0x1ed)]};}else{const _0x361c73={'memberId':_0x27cfda,'unitId':_0x4acb5e,'content':_0x2eb393,'mention':_0x3cf0af},_0x5165d8=await this[_0x172f00(0x1aa)][_0x172f00(0x1fc)](_0x172f00(0x1fb)+_0x4acb5e+_0x172f00(0x194),{'body':_0x361c73});return _0x12e7fd(_0x5165d8[_0x172f00(0x1f5)][_0x172f00(0x1fe)],_0x82e42a);}}async['updateComment'](_0x419822){const _0x51ceb4=_0x2e613c;var _0x285db0,_0x2731c4;const {text:_0x18548c,unitId:_0x233367}=_0x419822,_0xbed82e=(_0x2731c4=(_0x285db0=_0x18548c[_0x51ceb4(0x1c0)])==null?void 0x0:_0x285db0[_0x51ceb4(0x1dd)](_0x3556c4=>_0x3556c4[_0x51ceb4(0x1ca)]===_0x4dad3b[_0x51ceb4(0x20b)]['COMMENT'])[_0x51ceb4(0x1a9)](_0x5a7089=>_0x5a7089[_0x51ceb4(0x1b1)]))!=null?_0x2731c4:[],_0x30c437=JSON['stringify'](_0x18548c),_0x6ea17=_0x419822['threadId'],_0x5dc985=_0x419822['id'],_0x17d99d={'memberId':(await this[_0x51ceb4(0x20e)][_0x51ceb4(0x1f9)](_0x233367))[_0x51ceb4(0x215)](),'unitId':_0x233367,'threadId':_0x6ea17,'mention':_0xbed82e,'content':_0x30c437,'replyId':_0x5dc985},_0x5eddd3=await this[_0x51ceb4(0x1aa)][_0x51ceb4(0x1fc)](_0x51ceb4(0x1fb)+_0x233367+_0x51ceb4(0x1a4),{'body':_0x17d99d});return!_0x5eddd3[_0x51ceb4(0x1f5)]['error']||_0x5eddd3['body'][_0x51ceb4(0x212)][_0x51ceb4(0x1b6)]===0x1;}async[_0x2e613c(0x1c8)](_0x350c04){const _0x48bb80=_0x2e613c,{unitId:_0x2f5c6e}=_0x350c04,_0x985c3d=_0x350c04[_0x48bb80(0x1c7)],_0x58ef20={'memberId':this[_0x48bb80(0x21a)][_0x48bb80(0x1ac)]()[_0x48bb80(0x1e6)],'unitId':_0x2f5c6e,'threadId':_0x985c3d,'solved':_0x350c04[_0x48bb80(0x1e3)]?_0x517355[_0x48bb80(0x201)]:_0x517355[_0x48bb80(0x1b4)]},_0x32edc3=await this['_httpService'][_0x48bb80(0x1fc)](_0x48bb80(0x1fb)+_0x2f5c6e+_0x48bb80(0x1bc),{'body':_0x58ef20});return!_0x32edc3[_0x48bb80(0x1f5)]['error']||_0x32edc3['body']['error'][_0x48bb80(0x1b6)]===0x1;}async['deleteComment'](_0x38cb46,_0x222b8c,_0x24a6a7,_0x1df7bd){const _0x558eb9=_0x2e613c,_0x271614={'memberId':(await this[_0x558eb9(0x20e)][_0x558eb9(0x1f9)](_0x38cb46))['getMemberID'](),'threadId':_0x24a6a7,'replyId':_0x1df7bd,'unitId':_0x38cb46},_0x318d69=await this['_httpService']['post'](_0x558eb9(0x1fb)+_0x38cb46+_0x558eb9(0x211),{'body':_0x271614});return!_0x318d69['body'][_0x558eb9(0x212)]||_0x318d69[_0x558eb9(0x1f5)][_0x558eb9(0x212)]['code']===0x1;}async['listComments'](_0x25b19d,_0xace74e,_0x52088c){const _0x41a31f=_0x2e613c,_0x40a196={'unitId':_0x25b19d,'threadId':_0x52088c},_0x574658=await this[_0x41a31f(0x1aa)]['post'](_0x41a31f(0x1fb)+_0x25b19d+_0x41a31f(0x1d6),{'body':_0x40a196}),_0x276aa1=_0x52088c[_0x41a31f(0x1a9)](_0x265751=>_0x9fc0db(_0x574658[_0x41a31f(0x1f5)][_0x41a31f(0x1e4)][_0x265751],_0x25b19d,_0xace74e))['filter'](Boolean);return Object[_0x41a31f(0x203)](_0x574658[_0x41a31f(0x1f5)][_0x41a31f(0x1d2)])[_0x41a31f(0x1b7)](_0x5c89b4=>{const _0x22e910=_0x41a31f;this[_0x22e910(0x21a)]['addUser'](_0x5c89b4);}),_0x276aa1;}[_0x2e613c(0x196)](_0x400272){const _0x28a83d=_0x2e613c;return{'id':_0x400272['id'],'threadId':_0x400272[_0x28a83d(0x1c7)],'ref':_0x400272[_0x28a83d(0x1d7)]};}};_0x136092=_0x447f49([_0xea352(0x0,_0x4dad3b['Inject'](_0x508d1f[_0x2e613c(0x1e7)])),_0xea352(0x1,_0x4dad3b[_0x2e613c(0x206)](_0x4dad3b[_0x2e613c(0x1ce)])),_0xea352(0x2,_0x4dad3b[_0x2e613c(0x206)](_0x1e62b2[_0x2e613c(0x1ad)]))],_0x136092);var _0x548b2d=Object['getOwnPropertyDescriptor'],_0x18496e=(_0x15a08f,_0x95ae03,_0x394059,_0x2b5f1e)=>{const _0x1d4742=_0x2e613c;for(var _0x5c2819=_0x2b5f1e>0x1?void 0x0:_0x2b5f1e?_0x548b2d(_0x95ae03,_0x394059):_0x95ae03,_0x1332d9=_0x15a08f[_0x1d4742(0x1b0)]-0x1,_0x519093;_0x1332d9>=0x0;_0x1332d9--)(_0x519093=_0x15a08f[_0x1332d9])&&(_0x5c2819=_0x519093(_0x5c2819)||_0x5c2819);return _0x5c2819;},_0x7695e8=(_0x42d9f0,_0x231943)=>(_0x125e41,_0x3835b6)=>_0x231943(_0x125e41,_0x3835b6,_0x42d9f0);let _0x5f0b9b=class extends _0x4dad3b['Disposable']{constructor(_0x2876a4,_0x968718){const _0x53fe7e=_0x2e613c;super(),this[_0x53fe7e(0x193)]=_0x2876a4,this['_threadCommentDataSource']=_0x968718,this['_initDataSource']();}[_0x2e613c(0x1ab)](){const _0x4ef63b=_0x2e613c;this[_0x4ef63b(0x193)][_0x4ef63b(0x1c3)]=this['_threadCommentDataSource'],this[_0x4ef63b(0x193)][_0x4ef63b(0x1e8)]=!0x1;}};_0x5f0b9b=_0x18496e([_0x7695e8(0x0,_0x53582d[_0x2e613c(0x1d9)]),_0x7695e8(0x1,_0x4dad3b[_0x2e613c(0x206)](_0x136092))],_0x5f0b9b);var _0x1a7f9a=Object[_0x2e613c(0x1ff)],_0x5b518a=Object[_0x2e613c(0x1b3)],_0xdad162=(_0x1fabf0,_0x181ebb,_0x19debf)=>_0x181ebb in _0x1fabf0?_0x1a7f9a(_0x1fabf0,_0x181ebb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19debf}):_0x1fabf0[_0x181ebb]=_0x19debf,_0x256bd2=(_0x294e74,_0x4b9a03,_0x26aa8c,_0x10490b)=>{const _0x13b040=_0x2e613c;for(var _0x2b9c03=_0x10490b>0x1?void 0x0:_0x10490b?_0x5b518a(_0x4b9a03,_0x26aa8c):_0x4b9a03,_0x51143d=_0x294e74[_0x13b040(0x1b0)]-0x1,_0x654688;_0x51143d>=0x0;_0x51143d--)(_0x654688=_0x294e74[_0x51143d])&&(_0x2b9c03=_0x654688(_0x2b9c03)||_0x2b9c03);return _0x2b9c03;},_0x304f70=(_0x317fb3,_0x5bdded)=>(_0x3b9d71,_0x52d641)=>_0x5bdded(_0x3b9d71,_0x52d641,_0x317fb3),_0x3a8b80=(_0x6793e8,_0x1fb532,_0x22b8e3)=>_0xdad162(_0x6793e8,typeof _0x1fb532!='symbol'?_0x1fb532+'':_0x1fb532,_0x22b8e3);_0x136b8b[_0x2e613c(0x1cd)]=class extends _0x4dad3b[_0x2e613c(0x1cb)]{constructor(_0x577002=_0x3ec8a4,_0x52fb20,_0x2e0c08){const _0x190bb2=_0x2e613c;super(),this['_config']=_0x577002,this['_injector']=_0x52fb20,this['_configService']=_0x2e0c08;const {..._0x2da69d}=_0x4dad3b[_0x190bb2(0x1de)]({},_0x3ec8a4,this[_0x190bb2(0x197)]);this[_0x190bb2(0x19d)][_0x190bb2(0x1fa)](_0x36af6e,_0x2da69d);}[_0x2e613c(0x200)](){[[_0x136092],[_0x5f0b9b],[_0x5eb8aa]]['forEach'](_0x19c807=>{const _0x3b8b1a=_0xd7e4;this[_0x3b8b1a(0x1e9)][_0x3b8b1a(0x1b8)](_0x19c807);});}[_0x2e613c(0x1d0)](){const _0x1cf937=_0x2e613c;this[_0x1cf937(0x1e9)][_0x1cf937(0x1f6)](_0x5f0b9b),this[_0x1cf937(0x1e9)][_0x1cf937(0x1f6)](_0x5eb8aa);}},_0x3a8b80(_0x136b8b[_0x2e613c(0x1cd)],_0x2e613c(0x1f4),_0x1e414f),_0x3a8b80(_0x136b8b['UniverThreadCommentDataSourcePlugin'],_0x2e613c(0x1d1),_0x4dad3b[_0x2e613c(0x1f3)]['UNIVER_UNKNOWN']),_0x136b8b[_0x2e613c(0x1cd)]=_0x256bd2([_0x4dad3b[_0x2e613c(0x1e5)](_0x3f674b['UniverThreadCommentUIPlugin'],_0x1e62b2[_0x2e613c(0x1ee)],_0x379707[_0x2e613c(0x1a5)]),_0x304f70(0x1,_0x4dad3b[_0x2e613c(0x206)](_0x4dad3b[_0x2e613c(0x1bd)])),_0x304f70(0x2,_0x4dad3b[_0x2e613c(0x1c4)])],_0x136b8b['UniverThreadCommentDataSourcePlugin']),Object[_0x2e613c(0x1ff)](_0x136b8b,Symbol[_0x2e613c(0x1ba)],{'value':_0x2e613c(0x1ec)});}));function _0x340a(){const _0x435c69=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3080140glZyDF','_configService','subscribe','root','getUnit','getUser','object','createTimestamp','/edit','UniverLicensePlugin','617KoNxSA','disposeWithMe','@univerjs/core','map','_httpService','_initDataSource','getCurrentUser','CollaborationSessionService','_initUserSync','addUser','length','rangeId','_threadCommentModel','getOwnPropertyDescriptor','OpenOrReOpen','COMMENT','code','forEach','add','updateComment','toStringTag','dayjs','/solved','Injector','@univerjs-pro/collaboration-client','Solve','customRanges','bufferTime','unitId','dataSource','IConfigService','Edit','commentUpdate$','threadId','resolveComment','CommentService','rangeType','Plugin','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','UserManagerService','YYYY/MM/DD\x20HH:mm','onReady','type','users','content','payload','2833227EqaESc','/list','ref','Disposable','IThreadCommentDataSourceService','addComment','solved','find','filter','merge','145704PRTCyZ','UniverNetwork','/universer-api/user/list','Unknown','resolved','comments','DependentOn','userID','HTTPService','syncUpdateMutationToColla','_injector','882310GGbyzB','_init','Module','userId','UniverCollaborationClientPlugin','1442ULPxAu','@univerjs/network','/reply','UniverProLicense','UniverInstanceType','pluginName','body','get','deleteComment','replies','requireSession','setConfig','/universer-api/comment/unit/','post','user','comment','defineProperty','onStarting','Solved','1902AdLIst','values','@univerjs/thread-comment-ui','rxjs','Inject','Delete','UniverProThreadCommentDatasource','8PKKXfo','personId','CustomRangeType','format','UniverCore','_sessionService','getComment','parse','/delete','error','slice','Reply','getMemberID','replyId','size','8115ISZozO','ThreadCommentModel','_userService','function','UniverThreadComment','_threadCommentDataSourceService','/add','Add','saveCommentToSnapshot','_config','@univerjs-pro/license','518811uwmwtx','_commentService'];_0x340a=function(){return _0x435c69;};return _0x340a();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.3",
3
+ "version": "0.12.4-experimental.20251210-8d33c6e",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.12.3",
49
- "@univerjs-pro/license": "0.12.3",
50
- "@univerjs/core": "0.12.3",
51
- "@univerjs/network": "0.12.3",
52
- "@univerjs/thread-comment-ui": "0.12.3",
53
- "@univerjs/thread-comment": "0.12.3",
54
- "@univerjs/protocol": "0.1.47"
48
+ "@univerjs-pro/collaboration-client": "0.12.4-experimental.20251210-8d33c6e",
49
+ "@univerjs-pro/license": "0.12.4-experimental.20251210-8d33c6e",
50
+ "@univerjs/network": "0.12.4-experimental.20251210-8d33c6e",
51
+ "@univerjs/thread-comment": "0.12.4-experimental.20251210-8d33c6e",
52
+ "@univerjs/thread-comment-ui": "0.12.4-experimental.20251210-8d33c6e",
53
+ "@univerjs/protocol": "0.1.47",
54
+ "@univerjs/core": "0.12.4-experimental.20251210-8d33c6e"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
- "vite": "^7.2.4",
60
- "vitest": "^4.0.14",
61
- "@univerjs-infra/shared": "0.12.3"
59
+ "vite": "^7.2.6",
60
+ "vitest": "^4.0.15",
61
+ "@univerjs-infra/shared": "0.12.4"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",