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

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 _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)]);
1
+ 'use strict';const _0x1888c3=_0x43bd;(function(_0x2ba05b,_0x4bb40b){const _0x3e1b85=_0x43bd,_0x1e4cbd=_0x2ba05b();while(!![]){try{const _0x11a6b7=parseInt(_0x3e1b85(0x115))/0x1*(-parseInt(_0x3e1b85(0xf8))/0x2)+parseInt(_0x3e1b85(0x117))/0x3*(-parseInt(_0x3e1b85(0x14b))/0x4)+parseInt(_0x3e1b85(0x150))/0x5+parseInt(_0x3e1b85(0x111))/0x6*(-parseInt(_0x3e1b85(0x106))/0x7)+-parseInt(_0x3e1b85(0x127))/0x8*(-parseInt(_0x3e1b85(0x167))/0x9)+parseInt(_0x3e1b85(0x118))/0xa*(parseInt(_0x3e1b85(0x124))/0xb)+-parseInt(_0x3e1b85(0x149))/0xc;if(_0x11a6b7===_0x4bb40b)break;else _0x1e4cbd['push'](_0x1e4cbd['shift']());}catch(_0x140c51){_0x1e4cbd['push'](_0x1e4cbd['shift']());}}}(_0x2d3f,0x74d5f));Object[_0x1888c3(0xf6)](exports,Symbol['toStringTag'],{'value':_0x1888c3(0x15d)});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=_0x1888c3(0x101);var I=(_0x384f36=>(_0x384f36[_0x384f36[_0x1888c3(0x11b)]=0x0]='OpenOrReOpen',_0x384f36[_0x384f36[_0x1888c3(0x158)]=0x1]=_0x1888c3(0x158),_0x384f36[_0x384f36['UNRECOGNIZED']=-0x1]=_0x1888c3(0xf1),_0x384f36))(I||{}),v=(_0x3ef90b=>(_0x3ef90b[_0x3ef90b[_0x1888c3(0x125)]=0x0]=_0x1888c3(0x125),_0x3ef90b[_0x3ef90b[_0x1888c3(0x162)]=0x1]=_0x1888c3(0x162),_0x3ef90b[_0x3ef90b[_0x1888c3(0x15b)]=0x2]='Reply',_0x3ef90b[_0x3ef90b[_0x1888c3(0x12a)]=0x3]=_0x1888c3(0x12a),_0x3ef90b[_0x3ef90b[_0x1888c3(0x10d)]=0x4]='Delete',_0x3ef90b[_0x3ef90b[_0x1888c3(0x143)]=0x5]=_0x1888c3(0x143),_0x3ef90b[_0x3ef90b[_0x1888c3(0xf1)]=-0x1]=_0x1888c3(0xf1),_0x3ef90b))(v||{});const f=_0x47bdcd=>c[_0x1888c3(0x137)](new Date(+_0x47bdcd))['format'](_0x1888c3(0xfc)),R=async(_0x95942,_0x47576a)=>{const _0x393920=_0x1888c3,_0x5d1200=_0x95942[_0x393920(0x142)](c[_0x393920(0x128)]),_0x27b64d=_0x95942[_0x393920(0x142)](P[_0x393920(0x10b)]);_0x47576a[_0x393920(0x140)](_0x16832c=>{const _0x5f50e4=_0x393920;_0x5d1200[_0x5f50e4(0x13e)](_0x16832c)&&_0x47576a[_0x5f50e4(0x14c)](_0x16832c);}),_0x47576a[_0x393920(0x163)]&&(await _0x27b64d[_0x393920(0x142)](_0x393920(0xfb),{'params':{'userIDs':[..._0x47576a]}}))['body']['users'][_0x393920(0x140)](_0x3963ed=>{_0x3963ed&&_0x5d1200['addUser'](_0x3963ed);});};var $=Object[_0x1888c3(0x116)],E=(_0x45ce24,_0x599d5d,_0x38b08a,_0x7dc6a1)=>{const _0x4ac7ff=_0x1888c3;for(var _0x571d9b=_0x7dc6a1>0x1?void 0x0:_0x7dc6a1?$(_0x599d5d,_0x38b08a):_0x599d5d,_0x9c72ae=_0x45ce24[_0x4ac7ff(0x15a)]-0x1,_0x55b343;_0x9c72ae>=0x0;_0x9c72ae--)(_0x55b343=_0x45ce24[_0x9c72ae])&&(_0x571d9b=_0x55b343(_0x571d9b)||_0x571d9b);return _0x571d9b;},S=(_0x27b5dc,_0x2e39cb)=>(_0x1d5108,_0x47b0c9)=>_0x2e39cb(_0x1d5108,_0x47b0c9,_0x27b5dc);let _=class extends c[_0x1888c3(0x152)]{constructor(_0x712adb,_0x404caf,_0x5a7ed5,_0x49cd83){const _0x5c96c1=_0x1888c3;super(),this['_commentService']=_0x712adb,this[_0x5c96c1(0x107)]=_0x404caf,this[_0x5c96c1(0x155)]=_0x5a7ed5,this['_injector']=_0x49cd83,this[_0x5c96c1(0x130)](),this[_0x5c96c1(0x159)]();}['_initUserSync'](){const _0x443a9d=_0x1888c3;this[_0x443a9d(0xf7)](this['_threadCommentModel'][_0x443a9d(0x120)][_0x443a9d(0x138)](j['bufferTime'](0x10))['subscribe'](_0x1af942=>{const _0x4954d7=_0x443a9d,_0x5d9958=new Set();_0x1af942[_0x4954d7(0x140)](_0x2c19a2=>{const _0x1b4eb6=_0x4954d7;switch(_0x2c19a2[_0x1b4eb6(0x121)]){case _0x1b4eb6(0x119):{const _0x2f7f2d=_0x2c19a2[_0x1b4eb6(0x11a)][_0x1b4eb6(0x11f)];_0x5d9958[_0x1b4eb6(0x119)](_0x2f7f2d);break;}}}),R(this['_injector'],_0x5d9958);}));}['_init'](){const _0x3b9995=_0x1888c3;this[_0x3b9995(0xf7)](this[_0x3b9995(0x123)][_0x3b9995(0x120)][_0x3b9995(0xf0)](async _0x644664=>{const _0x16025a=_0x3b9995;var _0x34a0ba,_0xdb0160,_0x346d56,_0x226f33;const _0x57d2cb=(_0x34a0ba=this[_0x16025a(0x107)][_0x16025a(0x133)](_0x644664['unitId'])[_0x16025a(0x160)](_0x5e8efe=>_0x5e8efe[_0x16025a(0xfe)]===_0x644664[_0x16025a(0xfe)]))==null?void 0x0:_0x34a0ba[_0x16025a(0x144)];if(!_0x57d2cb)return;const {unitId:_0x168825,subUnitId:_0x4e8c45}=_0x57d2cb;switch(_0x644664['user']&&this['_userService']['addUser'](_0x644664['user']),_0x644664['type']){case v[_0x16025a(0x162)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x168825,_0x4e8c45,{'unitId':_0x168825,'subUnitId':_0x4e8c45,'ref':'','id':_0x644664[_0x16025a(0x164)],'dT':f(+_0x644664['createTimestamp']),'threadId':_0x644664[_0x16025a(0xfe)],'personId':(_0x346d56=(_0xdb0160=_0x644664[_0x16025a(0x13f)])==null?void 0x0:_0xdb0160[_0x16025a(0x161)])!=null?_0x346d56:_0x644664[_0x16025a(0x153)],'text':JSON['parse'](_0x644664[_0x16025a(0xfd)]),'parentId':_0x57d2cb['id']});break;}case v[_0x16025a(0x10d)]:{const _0x57a1df=this[_0x16025a(0x107)][_0x16025a(0x139)](_0x168825,_0x4e8c45,_0x644664[_0x16025a(0x164)]);_0x57a1df&&_0x57a1df[_0x16025a(0x10e)]&&this[_0x16025a(0x107)][_0x16025a(0x15e)](_0x168825,_0x4e8c45,_0x644664[_0x16025a(0x164)]);break;}case v[_0x16025a(0x12a)]:{this[_0x16025a(0x107)][_0x16025a(0xfa)](_0x168825,_0x4e8c45,{'commentId':_0x644664['replyId'],'text':JSON['parse'](_0x644664[_0x16025a(0xfd)])});break;}case v[_0x16025a(0x143)]:{const _0x42c666=(_0x226f33=this['_threadCommentModel'][_0x16025a(0x133)](_0x644664[_0x16025a(0x110)])[_0x16025a(0x160)](_0x25184c=>_0x25184c[_0x16025a(0xfe)]===_0x644664[_0x16025a(0xfe)]))==null?void 0x0:_0x226f33['root'];_0x42c666&&this['_threadCommentModel']['resolveComment'](_0x168825,_0x4e8c45,_0x42c666['id'],_0x644664[_0x16025a(0x12f)]===I[_0x16025a(0x158)]);break;}}}));}};function _0x2d3f(){const _0x2e8b30=['slice','Disposable','userId','symbol','_userService','thread-comment-data-source.config','dataSource','Solved','_initUserSync','length','Reply','COMMENT','Module','deleteComment','/add','find','userID','Add','size','replyId','Inject','stringify','333cyqofo','IConfigService','subscribe','UNRECOGNIZED','rangeType','CustomRangeType','UniverThreadCommentDataSourcePlugin','rangeId','defineProperty','disposeWithMe','19442Dvdwpw','Plugin','updateComment','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','content','threadId','/universer-api/comment/unit/','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','filter','addUser','_threadCommentDataSource','78785YUjqrG','_threadCommentModel','UNIVER_UNKNOWN','_injector','_configService','HTTPService','syncUpdateMutationToColla','Delete','parentId','DependentOn','unitId','150RgKQMM','resolved','_initDataSource','createTimestamp','1hnrEUR','getOwnPropertyDescriptor','3fqRGbW','1070WkGaGz','add','payload','OpenOrReOpen','/reply','pluginName','_threadCommentDataSourceService','personId','commentUpdate$','type','getCurrentUser','_commentService','78133XiXKrM','Unknown','ThreadCommentModel','64184zjQVJf','UserManagerService','UniverInstanceType','Edit','getMemberID','body','_httpService','comment','solved','_init','values','UniverThreadCommentUIPlugin','getUnit','map','listComments','Injector','dayjs','pipe','getComment','CommentService','/delete','requireSession','post','getUser','user','forEach','CollaborationSessionService','get','Solve','root','error','format','_config','customRanges','238584agLnzt','merge','2664092LJxKTF','delete','code','ref','_sessionService','1993440fxbYSD'];_0x2d3f=function(){return _0x2e8b30;};return _0x2d3f();}_=E([S(0x0,c['Inject'](b[_0x1888c3(0x13a)])),S(0x1,c['Inject'](M[_0x1888c3(0x126)])),S(0x2,c['Inject'](c[_0x1888c3(0x128)])),S(0x3,c[_0x1888c3(0x165)](c[_0x1888c3(0x136)]))],_);const q=_0x1888c3(0x156),D={};var A=Object[_0x1888c3(0x116)],x=(_0x37fe40,_0x158bb5,_0x5143df,_0x5c1a51)=>{const _0xfe44ad=_0x1888c3;for(var _0x10da52=_0x5c1a51>0x1?void 0x0:_0x5c1a51?A(_0x158bb5,_0x5143df):_0x158bb5,_0x4ee92e=_0x37fe40[_0xfe44ad(0x15a)]-0x1,_0x229636;_0x4ee92e>=0x0;_0x4ee92e--)(_0x229636=_0x37fe40[_0x4ee92e])&&(_0x10da52=_0x229636(_0x10da52)||_0x10da52);return _0x10da52;},C=(_0x2b5a6f,_0x47c57c)=>(_0x3d43f7,_0x30a94d)=>_0x47c57c(_0x3d43f7,_0x30a94d,_0x2b5a6f);function Y(_0x100041,_0x443287){const _0x13106e=_0x1888c3,_0x3164cd=_0x100041[_0x13106e(0x100)][0x0];return{..._0x443287,'id':_0x3164cd[_0x13106e(0x164)],'resolved':_0x100041['solved']===0x1,'dT':f(_0x3164cd[_0x13106e(0x114)]),'personId':_0x3164cd[_0x13106e(0x153)],'threadId':_0x3164cd[_0x13106e(0xfe)]};}function G(_0x5ed0e9,_0x4a5b94,_0x17b073){const _0x2c06d9=_0x1888c3;var _0x383261,_0x240e18;if(((_0x240e18=(_0x383261=_0x5ed0e9==null?void 0x0:_0x5ed0e9[_0x2c06d9(0x100)])==null?void 0x0:_0x383261[_0x2c06d9(0x15a)])!=null?_0x240e18:0x0)>0x0){const _0x49d696=(_0x25ec7e,_0x849351)=>({'id':_0x25ec7e['replyId'],'threadId':_0x25ec7e['threadId'],'dT':f(_0x25ec7e[_0x2c06d9(0x114)]),'personId':_0x25ec7e['userId'],'resolved':_0x5ed0e9[_0x2c06d9(0x12f)]===I[_0x2c06d9(0x158)],'unitId':_0x4a5b94,'subUnitId':_0x17b073,'text':JSON[_0x2c06d9(0x102)](_0x25ec7e['content']),'parentId':_0x849351}),_0x221515=_0x49d696(_0x5ed0e9[_0x2c06d9(0x100)][0x0]);return{..._0x221515,'children':_0x5ed0e9[_0x2c06d9(0x100)][_0x2c06d9(0x151)](0x1)[_0x2c06d9(0x134)](_0x5496c6=>_0x49d696(_0x5496c6,_0x221515['id']))};}return null;}let p=class{constructor(_0x376885,_0x18a3bf,_0x4befc7){const _0x26f50a=_0x1888c3;this[_0x26f50a(0x12d)]=_0x376885,this[_0x26f50a(0x155)]=_0x18a3bf,this[_0x26f50a(0x14f)]=_0x4befc7;}async['addComment'](_0x330d9e){const _0x202c88=_0x1888c3;var _0xaabada,_0x8d1291;const {parentId:_0x266295,unitId:_0x2944a2,text:_0x41b459,threadId:_0x3e8abd}=_0x330d9e,_0x392a2b=(_0x8d1291=(_0xaabada=_0x41b459['customRanges'])==null?void 0x0:_0xaabada['filter'](_0x1ced1d=>_0x1ced1d[_0x202c88(0xf2)]===c[_0x202c88(0xf3)][_0x202c88(0x15c)])['map'](_0x88b8ef=>_0x88b8ef[_0x202c88(0xf5)]))!=null?_0x8d1291:[],_0x1e0dcf=JSON['stringify'](_0x41b459),_0x39c75d=(await this[_0x202c88(0x14f)][_0x202c88(0x13c)](_0x2944a2))[_0x202c88(0x12b)]();if(_0x266295){const _0x261019={'memberId':_0x39c75d,'unitId':_0x2944a2,'content':_0x1e0dcf,'mention':_0x392a2b,'threadId':_0x3e8abd},_0x7e9e79=(await this[_0x202c88(0x12d)][_0x202c88(0x13d)](_0x202c88(0xff)+_0x2944a2+_0x202c88(0x11c),{'body':_0x261019}))['body']['reply'];return{..._0x330d9e,'id':_0x7e9e79[_0x202c88(0x164)],'dT':c[_0x202c88(0x137)](+_0x7e9e79[_0x202c88(0x114)])[_0x202c88(0x146)](_0x202c88(0xfc)),'personId':_0x7e9e79[_0x202c88(0x153)]};}else{const _0x470466={'memberId':_0x39c75d,'unitId':_0x2944a2,'content':_0x1e0dcf,'mention':_0x392a2b},_0x4124a6=await this[_0x202c88(0x12d)]['post'](_0x202c88(0xff)+_0x2944a2+_0x202c88(0x15f),{'body':_0x470466});return Y(_0x4124a6['body'][_0x202c88(0x12e)],_0x330d9e);}}async[_0x1888c3(0xfa)](_0x2a873d){const _0x2eeb14=_0x1888c3;var _0x3c0fe8,_0x4b2330;const {text:_0x5be4b2,unitId:_0x24c828}=_0x2a873d,_0x10d790=(_0x4b2330=(_0x3c0fe8=_0x5be4b2[_0x2eeb14(0x148)])==null?void 0x0:_0x3c0fe8[_0x2eeb14(0x103)](_0x1cb946=>_0x1cb946['rangeType']===c[_0x2eeb14(0xf3)]['COMMENT'])[_0x2eeb14(0x134)](_0x5f23eb=>_0x5f23eb[_0x2eeb14(0xf5)]))!=null?_0x4b2330:[],_0xd83c93=JSON[_0x2eeb14(0x166)](_0x5be4b2),_0x31ce00=_0x2a873d['threadId'],_0x1e3941=_0x2a873d['id'],_0x4565f7={'memberId':(await this['_sessionService']['requireSession'](_0x24c828))['getMemberID'](),'unitId':_0x24c828,'threadId':_0x31ce00,'mention':_0x10d790,'content':_0xd83c93,'replyId':_0x1e3941},_0x38b216=await this['_httpService'][_0x2eeb14(0x13d)](_0x2eeb14(0xff)+_0x24c828+'/edit',{'body':_0x4565f7});return!_0x38b216[_0x2eeb14(0x12c)][_0x2eeb14(0x145)]||_0x38b216[_0x2eeb14(0x12c)][_0x2eeb14(0x145)]['code']===0x1;}async['resolveComment'](_0x447063){const _0xbbd85a=_0x1888c3,{unitId:_0x5f3a07}=_0x447063,_0x3d1d4d=_0x447063[_0xbbd85a(0xfe)],_0x2e0432={'memberId':this[_0xbbd85a(0x155)][_0xbbd85a(0x122)]()[_0xbbd85a(0x161)],'unitId':_0x5f3a07,'threadId':_0x3d1d4d,'solved':_0x447063[_0xbbd85a(0x112)]?I[_0xbbd85a(0x158)]:I['OpenOrReOpen']},_0x5efcb4=await this[_0xbbd85a(0x12d)][_0xbbd85a(0x13d)]('/universer-api/comment/unit/'+_0x5f3a07+'/solved',{'body':_0x2e0432});return!_0x5efcb4['body'][_0xbbd85a(0x145)]||_0x5efcb4['body'][_0xbbd85a(0x145)][_0xbbd85a(0x14d)]===0x1;}async[_0x1888c3(0x15e)](_0x51f123,_0x9512fd,_0x1a70d2,_0x28feff){const _0xe4e6a1=_0x1888c3,_0x521122={'memberId':(await this['_sessionService'][_0xe4e6a1(0x13c)](_0x51f123))[_0xe4e6a1(0x12b)](),'threadId':_0x1a70d2,'replyId':_0x28feff,'unitId':_0x51f123},_0x163300=await this[_0xe4e6a1(0x12d)][_0xe4e6a1(0x13d)](_0xe4e6a1(0xff)+_0x51f123+_0xe4e6a1(0x13b),{'body':_0x521122});return!_0x163300['body'][_0xe4e6a1(0x145)]||_0x163300[_0xe4e6a1(0x12c)]['error']['code']===0x1;}async[_0x1888c3(0x135)](_0x4e4743,_0x529182,_0x10a06f){const _0x360190=_0x1888c3,_0x3abc90={'unitId':_0x4e4743,'threadId':_0x10a06f},_0x170259=await this[_0x360190(0x12d)]['post'](_0x360190(0xff)+_0x4e4743+'/list',{'body':_0x3abc90}),_0x54df3b=_0x10a06f[_0x360190(0x134)](_0x402bd4=>G(_0x170259[_0x360190(0x12c)]['comments'][_0x402bd4],_0x4e4743,_0x529182))[_0x360190(0x103)](Boolean);return Object[_0x360190(0x131)](_0x170259[_0x360190(0x12c)]['users'])[_0x360190(0x140)](_0x585efe=>{const _0x364d2e=_0x360190;this['_userService'][_0x364d2e(0x104)](_0x585efe);}),_0x54df3b;}['saveCommentToSnapshot'](_0x4beb55){const _0x4a4191=_0x1888c3;return{'id':_0x4beb55['id'],'threadId':_0x4beb55[_0x4a4191(0xfe)],'ref':_0x4beb55[_0x4a4191(0x14e)]};}};p=x([C(0x0,c[_0x1888c3(0x165)](P[_0x1888c3(0x10b)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x1888c3(0x165)](b[_0x1888c3(0x141)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x27ef8a,_0x10fb27,_0x425d6a,_0x2395f2)=>{for(var _0x5aa957=_0x2395f2>0x1?void 0x0:_0x2395f2?H(_0x10fb27,_0x425d6a):_0x10fb27,_0x3188a3=_0x27ef8a['length']-0x1,_0x28008a;_0x3188a3>=0x0;_0x3188a3--)(_0x28008a=_0x27ef8a[_0x3188a3])&&(_0x5aa957=_0x28008a(_0x5aa957)||_0x5aa957);return _0x5aa957;},y=(_0x26766f,_0x11fcc7)=>(_0x543db4,_0xaaefcc)=>_0x11fcc7(_0x543db4,_0xaaefcc,_0x26766f);function _0x43bd(_0x3240d3,_0x54e897){_0x3240d3=_0x3240d3-0xf0;const _0x2d3f02=_0x2d3f();let _0x43bd8a=_0x2d3f02[_0x3240d3];return _0x43bd8a;}let g=class extends c[_0x1888c3(0x152)]{constructor(_0xc42b85,_0x40d4b1){const _0x45b12c=_0x1888c3;super(),this[_0x45b12c(0x11e)]=_0xc42b85,this[_0x45b12c(0x105)]=_0x40d4b1,this[_0x45b12c(0x113)]();}['_initDataSource'](){const _0x543c6f=_0x1888c3;this[_0x543c6f(0x11e)][_0x543c6f(0x157)]=this['_threadCommentDataSource'],this[_0x543c6f(0x11e)][_0x543c6f(0x10c)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1888c3(0x165)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x485531,_0x12e569,_0x4823ea)=>_0x12e569 in _0x485531?F(_0x485531,_0x12e569,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4823ea}):_0x485531[_0x12e569]=_0x4823ea,W=(_0x4a5115,_0x984356,_0x4479d1,_0x1ffde3)=>{for(var _0x66e163=_0x1ffde3>0x1?void 0x0:_0x1ffde3?L(_0x984356,_0x4479d1):_0x984356,_0x2f56da=_0x4a5115['length']-0x1,_0x54eb55;_0x2f56da>=0x0;_0x2f56da--)(_0x54eb55=_0x4a5115[_0x2f56da])&&(_0x66e163=_0x54eb55(_0x66e163)||_0x66e163);return _0x66e163;},O=(_0x44c1b6,_0x1a42e6)=>(_0x556fa3,_0x4b792a)=>_0x1a42e6(_0x556fa3,_0x4b792a,_0x44c1b6),N=(_0x53b36e,_0x3fa555,_0x3466f9)=>Z(_0x53b36e,typeof _0x3fa555!=_0x1888c3(0x154)?_0x3fa555+'':_0x3fa555,_0x3466f9);exports[_0x1888c3(0xf4)]=class extends c[_0x1888c3(0xf9)]{constructor(_0x1c496f=D,_0x2605bb,_0xab95b6){const _0x23eb8b=_0x1888c3;super(),this['_config']=_0x1c496f,this['_injector']=_0x2605bb,this[_0x23eb8b(0x10a)]=_0xab95b6;const {..._0x2a20c2}=c[_0x23eb8b(0x14a)]({},D,this[_0x23eb8b(0x147)]);this[_0x23eb8b(0x10a)]['setConfig'](q,_0x2a20c2);}['onStarting'](){const _0x27f504=_0x1888c3;[[p],[g],[_]][_0x27f504(0x140)](_0x1f5e21=>{const _0x3e794a=_0x27f504;this[_0x3e794a(0x109)]['add'](_0x1f5e21);});}['onReady'](){const _0x228b78=_0x1888c3;this['_injector']['get'](g),this[_0x228b78(0x109)][_0x228b78(0x142)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1888c3(0x11d),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x1888c3(0x121),c[_0x1888c3(0x129)][_0x1888c3(0x108)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1888c3(0x10f)](w[_0x1888c3(0x132)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x1888c3(0x136)])),O(0x2,c[_0x1888c3(0x168)])],exports[_0x1888c3(0xf4)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
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};
1
+ const _0x32b9dc=_0x1b1b;(function(_0x549bd0,_0x293035){const _0x34e972=_0x1b1b,_0x31e4d9=_0x549bd0();while(!![]){try{const _0x481c4b=-parseInt(_0x34e972(0x129))/0x1*(parseInt(_0x34e972(0x147))/0x2)+-parseInt(_0x34e972(0x180))/0x3*(parseInt(_0x34e972(0x169))/0x4)+-parseInt(_0x34e972(0x16a))/0x5+-parseInt(_0x34e972(0x156))/0x6*(parseInt(_0x34e972(0x151))/0x7)+parseInt(_0x34e972(0x163))/0x8*(-parseInt(_0x34e972(0x15a))/0x9)+-parseInt(_0x34e972(0x164))/0xa*(parseInt(_0x34e972(0x13b))/0xb)+parseInt(_0x34e972(0x158))/0xc;if(_0x481c4b===_0x293035)break;else _0x31e4d9['push'](_0x31e4d9['shift']());}catch(_0x4b059a){_0x31e4d9['push'](_0x31e4d9['shift']());}}}(_0x20ab,0x20c9a));import{CommentService as _0x3ea4c9,CollaborationSessionService as _0x40bdf6,UniverCollaborationClientPlugin as _0x4fc8ae}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41d447}from'@univerjs-pro/license';import{dayjs as _0x13af09,UserManagerService as _0x4fcaa5,Inject as _0x437868,Injector as _0xae6f09,Disposable as _0x503dbf,CustomRangeType as _0x5ee21e,UniverInstanceType as _0x49071b,DependentOn as _0x4e1f0a,IConfigService as _0x4968d2,Plugin as _0x5b3091,merge as _0x3695bb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e766f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d12fa,IThreadCommentDataSourceService as _0x52765f}from'@univerjs/thread-comment';import{bufferTime as _0x84f976}from'rxjs';import{HTTPService as _0x3ff6a4}from'@univerjs/network';const W=_0x32b9dc(0x136);var I=(_0x33b554=>(_0x33b554[_0x33b554[_0x32b9dc(0x14d)]=0x0]=_0x32b9dc(0x14d),_0x33b554[_0x33b554[_0x32b9dc(0x17e)]=0x1]=_0x32b9dc(0x17e),_0x33b554[_0x33b554[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x33b554))(I||{}),v=(_0x119e4d=>(_0x119e4d[_0x119e4d['Unknown']=0x0]='Unknown',_0x119e4d[_0x119e4d[_0x32b9dc(0x12d)]=0x1]=_0x32b9dc(0x12d),_0x119e4d[_0x119e4d[_0x32b9dc(0x16c)]=0x2]=_0x32b9dc(0x16c),_0x119e4d[_0x119e4d[_0x32b9dc(0x166)]=0x3]=_0x32b9dc(0x166),_0x119e4d[_0x119e4d[_0x32b9dc(0x149)]=0x4]='Delete',_0x119e4d[_0x119e4d[_0x32b9dc(0x179)]=0x5]=_0x32b9dc(0x179),_0x119e4d[_0x119e4d[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x119e4d))(v||{});const y=_0x28e007=>_0x13af09(new Date(+_0x28e007))['format'](_0x32b9dc(0x16b)),B=async(_0x5998df,_0x5319eb)=>{const _0x508a57=_0x32b9dc,_0x137d18=_0x5998df['get'](_0x4fcaa5),_0x55ce6f=_0x5998df[_0x508a57(0x171)](_0x3ff6a4);_0x5319eb[_0x508a57(0x15d)](_0x43175e=>{const _0x200b65=_0x508a57;_0x137d18[_0x200b65(0x15e)](_0x43175e)&&_0x5319eb[_0x200b65(0x178)](_0x43175e);}),_0x5319eb['size']&&(await _0x55ce6f[_0x508a57(0x171)](_0x508a57(0x173),{'params':{'userIDs':[..._0x5319eb]}}))[_0x508a57(0x143)][_0x508a57(0x14e)][_0x508a57(0x15d)](_0x5005ea=>{const _0x2e6e6c=_0x508a57;_0x5005ea&&_0x137d18[_0x2e6e6c(0x135)](_0x5005ea);});};var K=Object[_0x32b9dc(0x161)],V=(_0x544eb3,_0x681674,_0x127d7b,_0x4d671a)=>{const _0x338166=_0x32b9dc;for(var _0x56ea57=_0x4d671a>0x1?void 0x0:_0x4d671a?K(_0x681674,_0x127d7b):_0x681674,_0x5f5807=_0x544eb3[_0x338166(0x155)]-0x1,_0x2a02c2;_0x5f5807>=0x0;_0x5f5807--)(_0x2a02c2=_0x544eb3[_0x5f5807])&&(_0x56ea57=_0x2a02c2(_0x56ea57)||_0x56ea57);return _0x56ea57;},p=(_0x526ece,_0x2eadeb)=>(_0x2e0510,_0x2b0463)=>_0x2eadeb(_0x2e0510,_0x2b0463,_0x526ece);let _=class extends _0x503dbf{constructor(_0x169431,_0xf19e1e,_0x208cc0,_0x558310){const _0x5395cd=_0x32b9dc;super(),this[_0x5395cd(0x152)]=_0x169431,this[_0x5395cd(0x12c)]=_0xf19e1e,this[_0x5395cd(0x123)]=_0x208cc0,this[_0x5395cd(0x12f)]=_0x558310,this[_0x5395cd(0x146)](),this['_initUserSync']();}[_0x32b9dc(0x172)](){const _0x2a9a4e=_0x32b9dc;this[_0x2a9a4e(0x126)](this[_0x2a9a4e(0x12c)][_0x2a9a4e(0x160)][_0x2a9a4e(0x137)](_0x84f976(0x10))[_0x2a9a4e(0x15b)](_0x15e6e4=>{const _0x4bd91e=_0x2a9a4e,_0x35d067=new Set();_0x15e6e4[_0x4bd91e(0x15d)](_0x456f3f=>{const _0x45da7b=_0x4bd91e;switch(_0x456f3f['type']){case _0x45da7b(0x182):{const _0x1e6426=_0x456f3f[_0x45da7b(0x142)]['personId'];_0x35d067[_0x45da7b(0x182)](_0x1e6426);break;}}}),B(this[_0x4bd91e(0x12f)],_0x35d067);}));}[_0x32b9dc(0x146)](){const _0x12ca6e=_0x32b9dc;this[_0x12ca6e(0x126)](this[_0x12ca6e(0x152)][_0x12ca6e(0x160)][_0x12ca6e(0x15b)](async _0x952833=>{const _0x194a9d=_0x12ca6e;var _0x4c02da,_0x46e0da,_0x41b64e,_0x5346a5;const _0xc95e14=(_0x4c02da=this['_threadCommentModel']['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x334f25=>_0x334f25[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x4c02da['root'];if(!_0xc95e14)return;const {unitId:_0x3653c8,subUnitId:_0x15ff5b}=_0xc95e14;switch(_0x952833['user']&&this['_userService'][_0x194a9d(0x135)](_0x952833[_0x194a9d(0x154)]),_0x952833[_0x194a9d(0x181)]){case v[_0x194a9d(0x12d)]:break;case v['Reply']:{this[_0x194a9d(0x12c)][_0x194a9d(0x15c)](_0x3653c8,_0x15ff5b,{'unitId':_0x3653c8,'subUnitId':_0x15ff5b,'ref':'','id':_0x952833[_0x194a9d(0x139)],'dT':y(+_0x952833[_0x194a9d(0x127)]),'threadId':_0x952833[_0x194a9d(0x130)],'personId':(_0x41b64e=(_0x46e0da=_0x952833[_0x194a9d(0x154)])==null?void 0x0:_0x46e0da[_0x194a9d(0x162)])!=null?_0x41b64e:_0x952833['userId'],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)]),'parentId':_0xc95e14['id']});break;}case v['Delete']:{const _0x328f8d=this[_0x194a9d(0x12c)]['getComment'](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);_0x328f8d&&_0x328f8d[_0x194a9d(0x14f)]&&this[_0x194a9d(0x12c)][_0x194a9d(0x167)](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);break;}case v[_0x194a9d(0x166)]:{this['_threadCommentModel'][_0x194a9d(0x131)](_0x3653c8,_0x15ff5b,{'commentId':_0x952833[_0x194a9d(0x139)],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)])});break;}case v['Solve']:{const _0x3d093c=(_0x5346a5=this[_0x194a9d(0x12c)]['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x216dfd=>_0x216dfd[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x5346a5[_0x194a9d(0x17f)];_0x3d093c&&this[_0x194a9d(0x12c)][_0x194a9d(0x132)](_0x3653c8,_0x15ff5b,_0x3d093c['id'],_0x952833[_0x194a9d(0x12e)]===I[_0x194a9d(0x17e)]);break;}}}));}};_=V([p(0x0,_0x437868(_0x3ea4c9)),p(0x1,_0x437868(_0x1d12fa)),p(0x2,_0x437868(_0x4fcaa5)),p(0x3,_0x437868(_0xae6f09))],_);const z=_0x32b9dc(0x170),O={};function _0x20ab(){const _0x1d63e5=['type','add','parse','rangeId','_userService','getMemberID','content','disposeWithMe','createTimestamp','find','1mUhyuV','map','customRanges','_threadCommentModel','Add','solved','_injector','threadId','updateComment','resolveComment','_initDataSource','error','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','setConfig','replyId','/edit','275ViNTCq','_config','_sessionService','values','_threadCommentDataSourceService','requireSession','stringify','payload','body','/universer-api/comment/unit/','syncUpdateMutationToColla','_init','147218XCpKWq','slice','Delete','/list','unitId','symbol','OpenOrReOpen','users','parentId','userId','184373ORNzhJ','_commentService','filter','user','length','18jWDwEY','onStarting','10397688VDmLKo','dataSource','27oRNQdW','subscribe','addComment','forEach','getUser','replies','commentUpdate$','getOwnPropertyDescriptor','userID','485864LnRzIY','34230aMjVlb','UNRECOGNIZED','Edit','deleteComment','listComments','2972BXReBG','485245XYJzWU','YYYY/MM/DD\x20HH:mm','Reply','code','ref','_httpService','thread-comment-data-source.config','get','_initUserSync','/universer-api/user/list','_configService','/add','rangeType','resolved','delete','Solve','_threadCommentDataSource','comments','pluginName','getCurrentUser','Solved','root','867WGvHcU'];_0x20ab=function(){return _0x1d63e5;};return _0x20ab();}function _0x1b1b(_0x39870a,_0x834e9d){_0x39870a=_0x39870a-0x122;const _0x20abc2=_0x20ab();let _0x1b1b6a=_0x20abc2[_0x39870a];return _0x1b1b6a;}var k=Object[_0x32b9dc(0x161)],Q=(_0x587e6c,_0x36ab8d,_0x512beb,_0x37bd2c)=>{const _0x52d762=_0x32b9dc;for(var _0x47b8ac=_0x37bd2c>0x1?void 0x0:_0x37bd2c?k(_0x36ab8d,_0x512beb):_0x36ab8d,_0x7e51af=_0x587e6c[_0x52d762(0x155)]-0x1,_0x2df0a6;_0x7e51af>=0x0;_0x7e51af--)(_0x2df0a6=_0x587e6c[_0x7e51af])&&(_0x47b8ac=_0x2df0a6(_0x47b8ac)||_0x47b8ac);return _0x47b8ac;},b=(_0x2fa719,_0x50f9c4)=>(_0x3ecc74,_0x35f349)=>_0x50f9c4(_0x3ecc74,_0x35f349,_0x2fa719);function X(_0x226259,_0x4ce389){const _0x2d703a=_0x32b9dc,_0x47449a=_0x226259['replies'][0x0];return{..._0x4ce389,'id':_0x47449a['replyId'],'resolved':_0x226259[_0x2d703a(0x12e)]===0x1,'dT':y(_0x47449a['createTimestamp']),'personId':_0x47449a['userId'],'threadId':_0x47449a[_0x2d703a(0x130)]};}function ee(_0x48d912,_0x5bba16,_0x9d8cb9){const _0x169b55=_0x32b9dc;var _0x492131,_0x9665aa;if(((_0x9665aa=(_0x492131=_0x48d912==null?void 0x0:_0x48d912[_0x169b55(0x15f)])==null?void 0x0:_0x492131['length'])!=null?_0x9665aa:0x0)>0x0){const _0xac84a0=(_0x1f4208,_0x19a437)=>({'id':_0x1f4208[_0x169b55(0x139)],'threadId':_0x1f4208[_0x169b55(0x130)],'dT':y(_0x1f4208[_0x169b55(0x127)]),'personId':_0x1f4208['userId'],'resolved':_0x48d912[_0x169b55(0x12e)]===I[_0x169b55(0x17e)],'unitId':_0x5bba16,'subUnitId':_0x9d8cb9,'text':JSON[_0x169b55(0x183)](_0x1f4208['content']),'parentId':_0x19a437}),_0x2e4c6f=_0xac84a0(_0x48d912['replies'][0x0]);return{..._0x2e4c6f,'children':_0x48d912[_0x169b55(0x15f)][_0x169b55(0x148)](0x1)[_0x169b55(0x12a)](_0x12df48=>_0xac84a0(_0x12df48,_0x2e4c6f['id']))};}return null;}let S=class{constructor(_0x17e3c9,_0x576942,_0x446493){const _0x2931f9=_0x32b9dc;this['_httpService']=_0x17e3c9,this['_userService']=_0x576942,this[_0x2931f9(0x13d)]=_0x446493;}async[_0x32b9dc(0x15c)](_0x362dbc){const _0x5bca19=_0x32b9dc;var _0x39801e,_0x42bae0;const {parentId:_0x199acc,unitId:_0x6a7324,text:_0x2f44c0,threadId:_0x295837}=_0x362dbc,_0x416f67=(_0x42bae0=(_0x39801e=_0x2f44c0[_0x5bca19(0x12b)])==null?void 0x0:_0x39801e[_0x5bca19(0x153)](_0x197da5=>_0x197da5['rangeType']===_0x5ee21e['COMMENT'])['map'](_0x3677d3=>_0x3677d3['rangeId']))!=null?_0x42bae0:[],_0x348611=JSON['stringify'](_0x2f44c0),_0x3d3312=(await this[_0x5bca19(0x13d)]['requireSession'](_0x6a7324))['getMemberID']();if(_0x199acc){const _0x3b6d28={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67,'threadId':_0x295837},_0x1fe2e9=(await this[_0x5bca19(0x16f)]['post']('/universer-api/comment/unit/'+_0x6a7324+'/reply',{'body':_0x3b6d28}))[_0x5bca19(0x143)]['reply'];return{..._0x362dbc,'id':_0x1fe2e9[_0x5bca19(0x139)],'dT':_0x13af09(+_0x1fe2e9[_0x5bca19(0x127)])['format'](_0x5bca19(0x16b)),'personId':_0x1fe2e9[_0x5bca19(0x150)]};}else{const _0x1fd6e3={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67},_0x6a7b3=await this['_httpService']['post'](_0x5bca19(0x144)+_0x6a7324+_0x5bca19(0x175),{'body':_0x1fd6e3});return X(_0x6a7b3[_0x5bca19(0x143)]['comment'],_0x362dbc);}}async['updateComment'](_0x35c8f0){const _0x4db05d=_0x32b9dc;var _0x216a24,_0x31332a;const {text:_0x1cf7e5,unitId:_0x118d09}=_0x35c8f0,_0x4ad272=(_0x31332a=(_0x216a24=_0x1cf7e5[_0x4db05d(0x12b)])==null?void 0x0:_0x216a24[_0x4db05d(0x153)](_0x552ab2=>_0x552ab2[_0x4db05d(0x176)]===_0x5ee21e['COMMENT'])[_0x4db05d(0x12a)](_0x29c0b6=>_0x29c0b6[_0x4db05d(0x122)]))!=null?_0x31332a:[],_0x1a3e17=JSON[_0x4db05d(0x141)](_0x1cf7e5),_0x3ae251=_0x35c8f0[_0x4db05d(0x130)],_0x68b2d7=_0x35c8f0['id'],_0x44cdff={'memberId':(await this[_0x4db05d(0x13d)][_0x4db05d(0x140)](_0x118d09))[_0x4db05d(0x124)](),'unitId':_0x118d09,'threadId':_0x3ae251,'mention':_0x4ad272,'content':_0x1a3e17,'replyId':_0x68b2d7},_0x321893=await this[_0x4db05d(0x16f)]['post']('/universer-api/comment/unit/'+_0x118d09+_0x4db05d(0x13a),{'body':_0x44cdff});return!_0x321893[_0x4db05d(0x143)][_0x4db05d(0x134)]||_0x321893['body'][_0x4db05d(0x134)][_0x4db05d(0x16d)]===0x1;}async[_0x32b9dc(0x132)](_0x28e9f4){const _0x18eb42=_0x32b9dc,{unitId:_0x21aca1}=_0x28e9f4,_0x943c3f=_0x28e9f4[_0x18eb42(0x130)],_0x29dbdf={'memberId':this[_0x18eb42(0x123)][_0x18eb42(0x17d)]()['userID'],'unitId':_0x21aca1,'threadId':_0x943c3f,'solved':_0x28e9f4[_0x18eb42(0x177)]?I[_0x18eb42(0x17e)]:I['OpenOrReOpen']},_0x461232=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x21aca1+'/solved',{'body':_0x29dbdf});return!_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]||_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]['code']===0x1;}async[_0x32b9dc(0x167)](_0xc2b08d,_0x440db4,_0x22e24c,_0x109188){const _0x4673da=_0x32b9dc,_0xf69d18={'memberId':(await this[_0x4673da(0x13d)][_0x4673da(0x140)](_0xc2b08d))[_0x4673da(0x124)](),'threadId':_0x22e24c,'replyId':_0x109188,'unitId':_0xc2b08d},_0x1a46c9=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xc2b08d+'/delete',{'body':_0xf69d18});return!_0x1a46c9[_0x4673da(0x143)][_0x4673da(0x134)]||_0x1a46c9['body'][_0x4673da(0x134)][_0x4673da(0x16d)]===0x1;}async[_0x32b9dc(0x168)](_0x1ceecd,_0x5e2036,_0x1a1bb0){const _0x2ddf99=_0x32b9dc,_0x45aa66={'unitId':_0x1ceecd,'threadId':_0x1a1bb0},_0x11942a=await this[_0x2ddf99(0x16f)]['post'](_0x2ddf99(0x144)+_0x1ceecd+_0x2ddf99(0x14a),{'body':_0x45aa66}),_0x16d59b=_0x1a1bb0[_0x2ddf99(0x12a)](_0xbba3bc=>ee(_0x11942a['body'][_0x2ddf99(0x17b)][_0xbba3bc],_0x1ceecd,_0x5e2036))['filter'](Boolean);return Object[_0x2ddf99(0x13e)](_0x11942a['body'][_0x2ddf99(0x14e)])['forEach'](_0xffcd40=>{const _0x128ac2=_0x2ddf99;this['_userService'][_0x128ac2(0x135)](_0xffcd40);}),_0x16d59b;}['saveCommentToSnapshot'](_0x330ef1){const _0xe1a238=_0x32b9dc;return{'id':_0x330ef1['id'],'threadId':_0x330ef1['threadId'],'ref':_0x330ef1[_0xe1a238(0x16e)]};}};S=Q([b(0x0,_0x437868(_0x3ff6a4)),b(0x1,_0x437868(_0x4fcaa5)),b(0x2,_0x437868(_0x40bdf6))],S);var re=Object[_0x32b9dc(0x161)],te=(_0x95256f,_0x53083f,_0x5c70e6,_0x1365ed)=>{const _0x5872b1=_0x32b9dc;for(var _0x29db7a=_0x1365ed>0x1?void 0x0:_0x1365ed?re(_0x53083f,_0x5c70e6):_0x53083f,_0x5155f5=_0x95256f[_0x5872b1(0x155)]-0x1,_0x40a691;_0x5155f5>=0x0;_0x5155f5--)(_0x40a691=_0x95256f[_0x5155f5])&&(_0x29db7a=_0x40a691(_0x29db7a)||_0x29db7a);return _0x29db7a;},M=(_0x365fc3,_0x3d2b04)=>(_0x1dadad,_0x5a6819)=>_0x3d2b04(_0x1dadad,_0x5a6819,_0x365fc3);let f=class extends _0x503dbf{constructor(_0x432daf,_0x1afe1b){const _0x513a70=_0x32b9dc;super(),this[_0x513a70(0x13f)]=_0x432daf,this[_0x513a70(0x17a)]=_0x1afe1b,this['_initDataSource']();}[_0x32b9dc(0x133)](){const _0x4a258f=_0x32b9dc;this[_0x4a258f(0x13f)][_0x4a258f(0x159)]=this[_0x4a258f(0x17a)],this['_threadCommentDataSourceService'][_0x4a258f(0x145)]=!0x1;}};f=te([M(0x0,_0x52765f),M(0x1,_0x437868(S))],f);var se=Object['defineProperty'],oe=Object[_0x32b9dc(0x161)],ne=(_0x428ca5,_0x4b7e47,_0x3cf2eb)=>_0x4b7e47 in _0x428ca5?se(_0x428ca5,_0x4b7e47,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cf2eb}):_0x428ca5[_0x4b7e47]=_0x3cf2eb,ie=(_0x46aa9b,_0x5224b5,_0x7edbe7,_0x2c5cc4)=>{const _0x199e2a=_0x32b9dc;for(var _0x4d3fc4=_0x2c5cc4>0x1?void 0x0:_0x2c5cc4?oe(_0x5224b5,_0x7edbe7):_0x5224b5,_0x555892=_0x46aa9b[_0x199e2a(0x155)]-0x1,_0x5cd87f;_0x555892>=0x0;_0x555892--)(_0x5cd87f=_0x46aa9b[_0x555892])&&(_0x4d3fc4=_0x5cd87f(_0x4d3fc4)||_0x4d3fc4);return _0x4d3fc4;},N=(_0x4b1894,_0x1c8ac9)=>(_0x1c1bce,_0x17f771)=>_0x1c8ac9(_0x1c1bce,_0x17f771,_0x4b1894),$=(_0x22658d,_0x5080c6,_0x2b0d4c)=>ne(_0x22658d,typeof _0x5080c6!=_0x32b9dc(0x14c)?_0x5080c6+'':_0x5080c6,_0x2b0d4c);let g=class extends _0x5b3091{constructor(_0x2c0ad1=O,_0x34be79,_0x413d60){const _0x55c274=_0x32b9dc;super(),this[_0x55c274(0x13c)]=_0x2c0ad1,this[_0x55c274(0x12f)]=_0x34be79,this[_0x55c274(0x174)]=_0x413d60;const {..._0x3aba16}=_0x3695bb({},O,this[_0x55c274(0x13c)]);this[_0x55c274(0x174)][_0x55c274(0x138)](z,_0x3aba16);}[_0x32b9dc(0x157)](){const _0x5d6ad4=_0x32b9dc;[[S],[f],[_]][_0x5d6ad4(0x15d)](_0x3cb404=>{const _0x5c0870=_0x5d6ad4;this[_0x5c0870(0x12f)][_0x5c0870(0x182)](_0x3cb404);});}['onReady'](){const _0x105523=_0x32b9dc;this[_0x105523(0x12f)]['get'](f),this['_injector'][_0x105523(0x171)](_);}};$(g,_0x32b9dc(0x17c),W),$(g,_0x32b9dc(0x181),_0x49071b['UNIVER_UNKNOWN']),g=ie([_0x4e1f0a(_0x5e766f,_0x4fc8ae,_0x41d447),N(0x1,_0x437868(_0xae6f09)),N(0x2,_0x4968d2)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
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};
1
+ const _0x32b9dc=_0x1b1b;(function(_0x549bd0,_0x293035){const _0x34e972=_0x1b1b,_0x31e4d9=_0x549bd0();while(!![]){try{const _0x481c4b=-parseInt(_0x34e972(0x129))/0x1*(parseInt(_0x34e972(0x147))/0x2)+-parseInt(_0x34e972(0x180))/0x3*(parseInt(_0x34e972(0x169))/0x4)+-parseInt(_0x34e972(0x16a))/0x5+-parseInt(_0x34e972(0x156))/0x6*(parseInt(_0x34e972(0x151))/0x7)+parseInt(_0x34e972(0x163))/0x8*(-parseInt(_0x34e972(0x15a))/0x9)+-parseInt(_0x34e972(0x164))/0xa*(parseInt(_0x34e972(0x13b))/0xb)+parseInt(_0x34e972(0x158))/0xc;if(_0x481c4b===_0x293035)break;else _0x31e4d9['push'](_0x31e4d9['shift']());}catch(_0x4b059a){_0x31e4d9['push'](_0x31e4d9['shift']());}}}(_0x20ab,0x20c9a));import{CommentService as _0x3ea4c9,CollaborationSessionService as _0x40bdf6,UniverCollaborationClientPlugin as _0x4fc8ae}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41d447}from'@univerjs-pro/license';import{dayjs as _0x13af09,UserManagerService as _0x4fcaa5,Inject as _0x437868,Injector as _0xae6f09,Disposable as _0x503dbf,CustomRangeType as _0x5ee21e,UniverInstanceType as _0x49071b,DependentOn as _0x4e1f0a,IConfigService as _0x4968d2,Plugin as _0x5b3091,merge as _0x3695bb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e766f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d12fa,IThreadCommentDataSourceService as _0x52765f}from'@univerjs/thread-comment';import{bufferTime as _0x84f976}from'rxjs';import{HTTPService as _0x3ff6a4}from'@univerjs/network';const W=_0x32b9dc(0x136);var I=(_0x33b554=>(_0x33b554[_0x33b554[_0x32b9dc(0x14d)]=0x0]=_0x32b9dc(0x14d),_0x33b554[_0x33b554[_0x32b9dc(0x17e)]=0x1]=_0x32b9dc(0x17e),_0x33b554[_0x33b554[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x33b554))(I||{}),v=(_0x119e4d=>(_0x119e4d[_0x119e4d['Unknown']=0x0]='Unknown',_0x119e4d[_0x119e4d[_0x32b9dc(0x12d)]=0x1]=_0x32b9dc(0x12d),_0x119e4d[_0x119e4d[_0x32b9dc(0x16c)]=0x2]=_0x32b9dc(0x16c),_0x119e4d[_0x119e4d[_0x32b9dc(0x166)]=0x3]=_0x32b9dc(0x166),_0x119e4d[_0x119e4d[_0x32b9dc(0x149)]=0x4]='Delete',_0x119e4d[_0x119e4d[_0x32b9dc(0x179)]=0x5]=_0x32b9dc(0x179),_0x119e4d[_0x119e4d[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x119e4d))(v||{});const y=_0x28e007=>_0x13af09(new Date(+_0x28e007))['format'](_0x32b9dc(0x16b)),B=async(_0x5998df,_0x5319eb)=>{const _0x508a57=_0x32b9dc,_0x137d18=_0x5998df['get'](_0x4fcaa5),_0x55ce6f=_0x5998df[_0x508a57(0x171)](_0x3ff6a4);_0x5319eb[_0x508a57(0x15d)](_0x43175e=>{const _0x200b65=_0x508a57;_0x137d18[_0x200b65(0x15e)](_0x43175e)&&_0x5319eb[_0x200b65(0x178)](_0x43175e);}),_0x5319eb['size']&&(await _0x55ce6f[_0x508a57(0x171)](_0x508a57(0x173),{'params':{'userIDs':[..._0x5319eb]}}))[_0x508a57(0x143)][_0x508a57(0x14e)][_0x508a57(0x15d)](_0x5005ea=>{const _0x2e6e6c=_0x508a57;_0x5005ea&&_0x137d18[_0x2e6e6c(0x135)](_0x5005ea);});};var K=Object[_0x32b9dc(0x161)],V=(_0x544eb3,_0x681674,_0x127d7b,_0x4d671a)=>{const _0x338166=_0x32b9dc;for(var _0x56ea57=_0x4d671a>0x1?void 0x0:_0x4d671a?K(_0x681674,_0x127d7b):_0x681674,_0x5f5807=_0x544eb3[_0x338166(0x155)]-0x1,_0x2a02c2;_0x5f5807>=0x0;_0x5f5807--)(_0x2a02c2=_0x544eb3[_0x5f5807])&&(_0x56ea57=_0x2a02c2(_0x56ea57)||_0x56ea57);return _0x56ea57;},p=(_0x526ece,_0x2eadeb)=>(_0x2e0510,_0x2b0463)=>_0x2eadeb(_0x2e0510,_0x2b0463,_0x526ece);let _=class extends _0x503dbf{constructor(_0x169431,_0xf19e1e,_0x208cc0,_0x558310){const _0x5395cd=_0x32b9dc;super(),this[_0x5395cd(0x152)]=_0x169431,this[_0x5395cd(0x12c)]=_0xf19e1e,this[_0x5395cd(0x123)]=_0x208cc0,this[_0x5395cd(0x12f)]=_0x558310,this[_0x5395cd(0x146)](),this['_initUserSync']();}[_0x32b9dc(0x172)](){const _0x2a9a4e=_0x32b9dc;this[_0x2a9a4e(0x126)](this[_0x2a9a4e(0x12c)][_0x2a9a4e(0x160)][_0x2a9a4e(0x137)](_0x84f976(0x10))[_0x2a9a4e(0x15b)](_0x15e6e4=>{const _0x4bd91e=_0x2a9a4e,_0x35d067=new Set();_0x15e6e4[_0x4bd91e(0x15d)](_0x456f3f=>{const _0x45da7b=_0x4bd91e;switch(_0x456f3f['type']){case _0x45da7b(0x182):{const _0x1e6426=_0x456f3f[_0x45da7b(0x142)]['personId'];_0x35d067[_0x45da7b(0x182)](_0x1e6426);break;}}}),B(this[_0x4bd91e(0x12f)],_0x35d067);}));}[_0x32b9dc(0x146)](){const _0x12ca6e=_0x32b9dc;this[_0x12ca6e(0x126)](this[_0x12ca6e(0x152)][_0x12ca6e(0x160)][_0x12ca6e(0x15b)](async _0x952833=>{const _0x194a9d=_0x12ca6e;var _0x4c02da,_0x46e0da,_0x41b64e,_0x5346a5;const _0xc95e14=(_0x4c02da=this['_threadCommentModel']['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x334f25=>_0x334f25[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x4c02da['root'];if(!_0xc95e14)return;const {unitId:_0x3653c8,subUnitId:_0x15ff5b}=_0xc95e14;switch(_0x952833['user']&&this['_userService'][_0x194a9d(0x135)](_0x952833[_0x194a9d(0x154)]),_0x952833[_0x194a9d(0x181)]){case v[_0x194a9d(0x12d)]:break;case v['Reply']:{this[_0x194a9d(0x12c)][_0x194a9d(0x15c)](_0x3653c8,_0x15ff5b,{'unitId':_0x3653c8,'subUnitId':_0x15ff5b,'ref':'','id':_0x952833[_0x194a9d(0x139)],'dT':y(+_0x952833[_0x194a9d(0x127)]),'threadId':_0x952833[_0x194a9d(0x130)],'personId':(_0x41b64e=(_0x46e0da=_0x952833[_0x194a9d(0x154)])==null?void 0x0:_0x46e0da[_0x194a9d(0x162)])!=null?_0x41b64e:_0x952833['userId'],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)]),'parentId':_0xc95e14['id']});break;}case v['Delete']:{const _0x328f8d=this[_0x194a9d(0x12c)]['getComment'](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);_0x328f8d&&_0x328f8d[_0x194a9d(0x14f)]&&this[_0x194a9d(0x12c)][_0x194a9d(0x167)](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);break;}case v[_0x194a9d(0x166)]:{this['_threadCommentModel'][_0x194a9d(0x131)](_0x3653c8,_0x15ff5b,{'commentId':_0x952833[_0x194a9d(0x139)],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)])});break;}case v['Solve']:{const _0x3d093c=(_0x5346a5=this[_0x194a9d(0x12c)]['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x216dfd=>_0x216dfd[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x5346a5[_0x194a9d(0x17f)];_0x3d093c&&this[_0x194a9d(0x12c)][_0x194a9d(0x132)](_0x3653c8,_0x15ff5b,_0x3d093c['id'],_0x952833[_0x194a9d(0x12e)]===I[_0x194a9d(0x17e)]);break;}}}));}};_=V([p(0x0,_0x437868(_0x3ea4c9)),p(0x1,_0x437868(_0x1d12fa)),p(0x2,_0x437868(_0x4fcaa5)),p(0x3,_0x437868(_0xae6f09))],_);const z=_0x32b9dc(0x170),O={};function _0x20ab(){const _0x1d63e5=['type','add','parse','rangeId','_userService','getMemberID','content','disposeWithMe','createTimestamp','find','1mUhyuV','map','customRanges','_threadCommentModel','Add','solved','_injector','threadId','updateComment','resolveComment','_initDataSource','error','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','setConfig','replyId','/edit','275ViNTCq','_config','_sessionService','values','_threadCommentDataSourceService','requireSession','stringify','payload','body','/universer-api/comment/unit/','syncUpdateMutationToColla','_init','147218XCpKWq','slice','Delete','/list','unitId','symbol','OpenOrReOpen','users','parentId','userId','184373ORNzhJ','_commentService','filter','user','length','18jWDwEY','onStarting','10397688VDmLKo','dataSource','27oRNQdW','subscribe','addComment','forEach','getUser','replies','commentUpdate$','getOwnPropertyDescriptor','userID','485864LnRzIY','34230aMjVlb','UNRECOGNIZED','Edit','deleteComment','listComments','2972BXReBG','485245XYJzWU','YYYY/MM/DD\x20HH:mm','Reply','code','ref','_httpService','thread-comment-data-source.config','get','_initUserSync','/universer-api/user/list','_configService','/add','rangeType','resolved','delete','Solve','_threadCommentDataSource','comments','pluginName','getCurrentUser','Solved','root','867WGvHcU'];_0x20ab=function(){return _0x1d63e5;};return _0x20ab();}function _0x1b1b(_0x39870a,_0x834e9d){_0x39870a=_0x39870a-0x122;const _0x20abc2=_0x20ab();let _0x1b1b6a=_0x20abc2[_0x39870a];return _0x1b1b6a;}var k=Object[_0x32b9dc(0x161)],Q=(_0x587e6c,_0x36ab8d,_0x512beb,_0x37bd2c)=>{const _0x52d762=_0x32b9dc;for(var _0x47b8ac=_0x37bd2c>0x1?void 0x0:_0x37bd2c?k(_0x36ab8d,_0x512beb):_0x36ab8d,_0x7e51af=_0x587e6c[_0x52d762(0x155)]-0x1,_0x2df0a6;_0x7e51af>=0x0;_0x7e51af--)(_0x2df0a6=_0x587e6c[_0x7e51af])&&(_0x47b8ac=_0x2df0a6(_0x47b8ac)||_0x47b8ac);return _0x47b8ac;},b=(_0x2fa719,_0x50f9c4)=>(_0x3ecc74,_0x35f349)=>_0x50f9c4(_0x3ecc74,_0x35f349,_0x2fa719);function X(_0x226259,_0x4ce389){const _0x2d703a=_0x32b9dc,_0x47449a=_0x226259['replies'][0x0];return{..._0x4ce389,'id':_0x47449a['replyId'],'resolved':_0x226259[_0x2d703a(0x12e)]===0x1,'dT':y(_0x47449a['createTimestamp']),'personId':_0x47449a['userId'],'threadId':_0x47449a[_0x2d703a(0x130)]};}function ee(_0x48d912,_0x5bba16,_0x9d8cb9){const _0x169b55=_0x32b9dc;var _0x492131,_0x9665aa;if(((_0x9665aa=(_0x492131=_0x48d912==null?void 0x0:_0x48d912[_0x169b55(0x15f)])==null?void 0x0:_0x492131['length'])!=null?_0x9665aa:0x0)>0x0){const _0xac84a0=(_0x1f4208,_0x19a437)=>({'id':_0x1f4208[_0x169b55(0x139)],'threadId':_0x1f4208[_0x169b55(0x130)],'dT':y(_0x1f4208[_0x169b55(0x127)]),'personId':_0x1f4208['userId'],'resolved':_0x48d912[_0x169b55(0x12e)]===I[_0x169b55(0x17e)],'unitId':_0x5bba16,'subUnitId':_0x9d8cb9,'text':JSON[_0x169b55(0x183)](_0x1f4208['content']),'parentId':_0x19a437}),_0x2e4c6f=_0xac84a0(_0x48d912['replies'][0x0]);return{..._0x2e4c6f,'children':_0x48d912[_0x169b55(0x15f)][_0x169b55(0x148)](0x1)[_0x169b55(0x12a)](_0x12df48=>_0xac84a0(_0x12df48,_0x2e4c6f['id']))};}return null;}let S=class{constructor(_0x17e3c9,_0x576942,_0x446493){const _0x2931f9=_0x32b9dc;this['_httpService']=_0x17e3c9,this['_userService']=_0x576942,this[_0x2931f9(0x13d)]=_0x446493;}async[_0x32b9dc(0x15c)](_0x362dbc){const _0x5bca19=_0x32b9dc;var _0x39801e,_0x42bae0;const {parentId:_0x199acc,unitId:_0x6a7324,text:_0x2f44c0,threadId:_0x295837}=_0x362dbc,_0x416f67=(_0x42bae0=(_0x39801e=_0x2f44c0[_0x5bca19(0x12b)])==null?void 0x0:_0x39801e[_0x5bca19(0x153)](_0x197da5=>_0x197da5['rangeType']===_0x5ee21e['COMMENT'])['map'](_0x3677d3=>_0x3677d3['rangeId']))!=null?_0x42bae0:[],_0x348611=JSON['stringify'](_0x2f44c0),_0x3d3312=(await this[_0x5bca19(0x13d)]['requireSession'](_0x6a7324))['getMemberID']();if(_0x199acc){const _0x3b6d28={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67,'threadId':_0x295837},_0x1fe2e9=(await this[_0x5bca19(0x16f)]['post']('/universer-api/comment/unit/'+_0x6a7324+'/reply',{'body':_0x3b6d28}))[_0x5bca19(0x143)]['reply'];return{..._0x362dbc,'id':_0x1fe2e9[_0x5bca19(0x139)],'dT':_0x13af09(+_0x1fe2e9[_0x5bca19(0x127)])['format'](_0x5bca19(0x16b)),'personId':_0x1fe2e9[_0x5bca19(0x150)]};}else{const _0x1fd6e3={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67},_0x6a7b3=await this['_httpService']['post'](_0x5bca19(0x144)+_0x6a7324+_0x5bca19(0x175),{'body':_0x1fd6e3});return X(_0x6a7b3[_0x5bca19(0x143)]['comment'],_0x362dbc);}}async['updateComment'](_0x35c8f0){const _0x4db05d=_0x32b9dc;var _0x216a24,_0x31332a;const {text:_0x1cf7e5,unitId:_0x118d09}=_0x35c8f0,_0x4ad272=(_0x31332a=(_0x216a24=_0x1cf7e5[_0x4db05d(0x12b)])==null?void 0x0:_0x216a24[_0x4db05d(0x153)](_0x552ab2=>_0x552ab2[_0x4db05d(0x176)]===_0x5ee21e['COMMENT'])[_0x4db05d(0x12a)](_0x29c0b6=>_0x29c0b6[_0x4db05d(0x122)]))!=null?_0x31332a:[],_0x1a3e17=JSON[_0x4db05d(0x141)](_0x1cf7e5),_0x3ae251=_0x35c8f0[_0x4db05d(0x130)],_0x68b2d7=_0x35c8f0['id'],_0x44cdff={'memberId':(await this[_0x4db05d(0x13d)][_0x4db05d(0x140)](_0x118d09))[_0x4db05d(0x124)](),'unitId':_0x118d09,'threadId':_0x3ae251,'mention':_0x4ad272,'content':_0x1a3e17,'replyId':_0x68b2d7},_0x321893=await this[_0x4db05d(0x16f)]['post']('/universer-api/comment/unit/'+_0x118d09+_0x4db05d(0x13a),{'body':_0x44cdff});return!_0x321893[_0x4db05d(0x143)][_0x4db05d(0x134)]||_0x321893['body'][_0x4db05d(0x134)][_0x4db05d(0x16d)]===0x1;}async[_0x32b9dc(0x132)](_0x28e9f4){const _0x18eb42=_0x32b9dc,{unitId:_0x21aca1}=_0x28e9f4,_0x943c3f=_0x28e9f4[_0x18eb42(0x130)],_0x29dbdf={'memberId':this[_0x18eb42(0x123)][_0x18eb42(0x17d)]()['userID'],'unitId':_0x21aca1,'threadId':_0x943c3f,'solved':_0x28e9f4[_0x18eb42(0x177)]?I[_0x18eb42(0x17e)]:I['OpenOrReOpen']},_0x461232=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x21aca1+'/solved',{'body':_0x29dbdf});return!_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]||_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]['code']===0x1;}async[_0x32b9dc(0x167)](_0xc2b08d,_0x440db4,_0x22e24c,_0x109188){const _0x4673da=_0x32b9dc,_0xf69d18={'memberId':(await this[_0x4673da(0x13d)][_0x4673da(0x140)](_0xc2b08d))[_0x4673da(0x124)](),'threadId':_0x22e24c,'replyId':_0x109188,'unitId':_0xc2b08d},_0x1a46c9=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xc2b08d+'/delete',{'body':_0xf69d18});return!_0x1a46c9[_0x4673da(0x143)][_0x4673da(0x134)]||_0x1a46c9['body'][_0x4673da(0x134)][_0x4673da(0x16d)]===0x1;}async[_0x32b9dc(0x168)](_0x1ceecd,_0x5e2036,_0x1a1bb0){const _0x2ddf99=_0x32b9dc,_0x45aa66={'unitId':_0x1ceecd,'threadId':_0x1a1bb0},_0x11942a=await this[_0x2ddf99(0x16f)]['post'](_0x2ddf99(0x144)+_0x1ceecd+_0x2ddf99(0x14a),{'body':_0x45aa66}),_0x16d59b=_0x1a1bb0[_0x2ddf99(0x12a)](_0xbba3bc=>ee(_0x11942a['body'][_0x2ddf99(0x17b)][_0xbba3bc],_0x1ceecd,_0x5e2036))['filter'](Boolean);return Object[_0x2ddf99(0x13e)](_0x11942a['body'][_0x2ddf99(0x14e)])['forEach'](_0xffcd40=>{const _0x128ac2=_0x2ddf99;this['_userService'][_0x128ac2(0x135)](_0xffcd40);}),_0x16d59b;}['saveCommentToSnapshot'](_0x330ef1){const _0xe1a238=_0x32b9dc;return{'id':_0x330ef1['id'],'threadId':_0x330ef1['threadId'],'ref':_0x330ef1[_0xe1a238(0x16e)]};}};S=Q([b(0x0,_0x437868(_0x3ff6a4)),b(0x1,_0x437868(_0x4fcaa5)),b(0x2,_0x437868(_0x40bdf6))],S);var re=Object[_0x32b9dc(0x161)],te=(_0x95256f,_0x53083f,_0x5c70e6,_0x1365ed)=>{const _0x5872b1=_0x32b9dc;for(var _0x29db7a=_0x1365ed>0x1?void 0x0:_0x1365ed?re(_0x53083f,_0x5c70e6):_0x53083f,_0x5155f5=_0x95256f[_0x5872b1(0x155)]-0x1,_0x40a691;_0x5155f5>=0x0;_0x5155f5--)(_0x40a691=_0x95256f[_0x5155f5])&&(_0x29db7a=_0x40a691(_0x29db7a)||_0x29db7a);return _0x29db7a;},M=(_0x365fc3,_0x3d2b04)=>(_0x1dadad,_0x5a6819)=>_0x3d2b04(_0x1dadad,_0x5a6819,_0x365fc3);let f=class extends _0x503dbf{constructor(_0x432daf,_0x1afe1b){const _0x513a70=_0x32b9dc;super(),this[_0x513a70(0x13f)]=_0x432daf,this[_0x513a70(0x17a)]=_0x1afe1b,this['_initDataSource']();}[_0x32b9dc(0x133)](){const _0x4a258f=_0x32b9dc;this[_0x4a258f(0x13f)][_0x4a258f(0x159)]=this[_0x4a258f(0x17a)],this['_threadCommentDataSourceService'][_0x4a258f(0x145)]=!0x1;}};f=te([M(0x0,_0x52765f),M(0x1,_0x437868(S))],f);var se=Object['defineProperty'],oe=Object[_0x32b9dc(0x161)],ne=(_0x428ca5,_0x4b7e47,_0x3cf2eb)=>_0x4b7e47 in _0x428ca5?se(_0x428ca5,_0x4b7e47,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cf2eb}):_0x428ca5[_0x4b7e47]=_0x3cf2eb,ie=(_0x46aa9b,_0x5224b5,_0x7edbe7,_0x2c5cc4)=>{const _0x199e2a=_0x32b9dc;for(var _0x4d3fc4=_0x2c5cc4>0x1?void 0x0:_0x2c5cc4?oe(_0x5224b5,_0x7edbe7):_0x5224b5,_0x555892=_0x46aa9b[_0x199e2a(0x155)]-0x1,_0x5cd87f;_0x555892>=0x0;_0x555892--)(_0x5cd87f=_0x46aa9b[_0x555892])&&(_0x4d3fc4=_0x5cd87f(_0x4d3fc4)||_0x4d3fc4);return _0x4d3fc4;},N=(_0x4b1894,_0x1c8ac9)=>(_0x1c1bce,_0x17f771)=>_0x1c8ac9(_0x1c1bce,_0x17f771,_0x4b1894),$=(_0x22658d,_0x5080c6,_0x2b0d4c)=>ne(_0x22658d,typeof _0x5080c6!=_0x32b9dc(0x14c)?_0x5080c6+'':_0x5080c6,_0x2b0d4c);let g=class extends _0x5b3091{constructor(_0x2c0ad1=O,_0x34be79,_0x413d60){const _0x55c274=_0x32b9dc;super(),this[_0x55c274(0x13c)]=_0x2c0ad1,this[_0x55c274(0x12f)]=_0x34be79,this[_0x55c274(0x174)]=_0x413d60;const {..._0x3aba16}=_0x3695bb({},O,this[_0x55c274(0x13c)]);this[_0x55c274(0x174)][_0x55c274(0x138)](z,_0x3aba16);}[_0x32b9dc(0x157)](){const _0x5d6ad4=_0x32b9dc;[[S],[f],[_]][_0x5d6ad4(0x15d)](_0x3cb404=>{const _0x5c0870=_0x5d6ad4;this[_0x5c0870(0x12f)][_0x5c0870(0x182)](_0x3cb404);});}['onReady'](){const _0x105523=_0x32b9dc;this[_0x105523(0x12f)]['get'](f),this['_injector'][_0x105523(0x171)](_);}};$(g,_0x32b9dc(0x17c),W),$(g,_0x32b9dc(0x181),_0x49071b['UNIVER_UNKNOWN']),g=ie([_0x4e1f0a(_0x5e766f,_0x4fc8ae,_0x41d447),N(0x1,_0x437868(_0xae6f09)),N(0x2,_0x4968d2)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
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();}
1
+ function _0x49bd(){const _0x2b4341=['disposeWithMe','UniverThreadCommentUIPlugin','rxjs','post','_injector','updateComment','221076jHqOjz','customRanges','Unknown','OpenOrReOpen','reply','UniverProLicense','@univerjs-pro/license','parentId','Edit','comment','userId','format','addComment','CommentService','filter','_commentService','Add','content','map','requireSession','Solve','6821270CtaySs','symbol','getMemberID','UserManagerService','_initDataSource','saveCommentToSnapshot','subscribe','_config','getUser','Reply','createTimestamp','delete','1Tsschq','1097278WoxlRt','getOwnPropertyDescriptor','exports','object','1892421mhYmly','add','unitId','_httpService','Solved','/solved','_threadCommentModel','_initUserSync','18tvPwal','users','UniverProCollaborationClient','_threadCommentDataSource','threadId','userID','merge','_threadCommentDataSourceService','bufferTime','UniverInstanceType','@univerjs/network','replyId','_userService','error','deleteComment','slice','CustomRangeType','/delete','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','604445kxbWLG','Injector','UNIVER_UNKNOWN','forEach','onReady','_sessionService','getUnit','body','addUser','toStringTag','rangeId','@univerjs/thread-comment','find','getComment','@univerjs/core','DependentOn','459468UuUfVu','_init','stringify','UNRECOGNIZED','@univerjs/thread-comment-ui','personId','24FLrZwF','COMMENT','rangeType','IConfigService','_configService','payload','parse','defineProperty','UniverCore','values','code','length','Delete','amd','HTTPService','syncUpdateMutationToColla','IThreadCommentDataSourceService','dayjs','user','get','/edit','setConfig','Inject','/universer-api/comment/unit/','resolveComment','/universer-api/user/list','comments','root','UniverThreadCommentDataSourcePlugin','602358dhCeKY','type','/list','pipe','replies','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CollaborationSessionService','UniverThreadComment'];_0x49bd=function(){return _0x2b4341;};return _0x49bd();}function _0x304b(_0x1341da,_0x37a169){_0x1341da=_0x1341da-0xae;const _0x49bdda=_0x49bd();let _0x304bb9=_0x49bdda[_0x1341da];return _0x304bb9;}(function(_0x1f9b10,_0x5800d4){const _0x5a9bc0=_0x304b,_0xa178ef=_0x1f9b10();while(!![]){try{const _0xaf423b=-parseInt(_0x5a9bc0(0xfb))/0x1*(-parseInt(_0x5a9bc0(0xcb))/0x2)+-parseInt(_0x5a9bc0(0x12c))/0x3+parseInt(_0x5a9bc0(0xda))/0x4+-parseInt(_0x5a9bc0(0x11c))/0x5*(parseInt(_0x5a9bc0(0x108))/0x6)+parseInt(_0x5a9bc0(0xfc))/0x7*(-parseInt(_0x5a9bc0(0xae))/0x8)+parseInt(_0x5a9bc0(0x100))/0x9+parseInt(_0x5a9bc0(0xef))/0xa;if(_0xaf423b===_0x5800d4)break;else _0xa178ef['push'](_0xa178ef['shift']());}catch(_0x367177){_0xa178ef['push'](_0xa178ef['shift']());}}}(_0x49bd,0x40267),function(_0x2c1fb6,_0x423ad1){const _0x353b80=_0x304b;typeof exports==_0x353b80(0xff)&&typeof module<'u'?_0x423ad1(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=='function'&&define[_0x353b80(0xbb)]?define([_0x353b80(0xfe),'@univerjs-pro/collaboration-client',_0x353b80(0xe0),_0x353b80(0x12a),_0x353b80(0x130),_0x353b80(0x127),_0x353b80(0xd6),_0x353b80(0x112)],_0x423ad1):(_0x2c1fb6=typeof globalThis<'u'?globalThis:_0x2c1fb6||self,_0x423ad1(_0x2c1fb6['UniverProThreadCommentDatasource']={},_0x2c1fb6[_0x353b80(0x10a)],_0x2c1fb6[_0x353b80(0xdf)],_0x2c1fb6[_0x353b80(0xb6)],_0x2c1fb6['UniverThreadCommentUi'],_0x2c1fb6[_0x353b80(0xd3)],_0x2c1fb6[_0x353b80(0xd6)],_0x2c1fb6['UniverNetwork']));}(this,function(_0x9e9bf4,_0x210bf8,_0x362b49,_0x202475,_0x373872,_0x4dc4ac,_0x2cd9a9,_0x507eab){'use strict';const _0x3e5609=_0x304b;const _0x279a9d=_0x3e5609(0xd1);var _0x19b0c8=(_0x15fcc5=>(_0x15fcc5[_0x15fcc5['OpenOrReOpen']=0x0]=_0x3e5609(0xdd),_0x15fcc5[_0x15fcc5[_0x3e5609(0x104)]=0x1]='Solved',_0x15fcc5[_0x15fcc5['UNRECOGNIZED']=-0x1]=_0x3e5609(0x12f),_0x15fcc5))(_0x19b0c8||{}),_0x3fcc7f=(_0x320b82=>(_0x320b82[_0x320b82[_0x3e5609(0xdc)]=0x0]=_0x3e5609(0xdc),_0x320b82[_0x320b82[_0x3e5609(0xea)]=0x1]='Add',_0x320b82[_0x320b82['Reply']=0x2]=_0x3e5609(0xf8),_0x320b82[_0x320b82[_0x3e5609(0xe2)]=0x3]=_0x3e5609(0xe2),_0x320b82[_0x320b82[_0x3e5609(0xba)]=0x4]=_0x3e5609(0xba),_0x320b82[_0x320b82[_0x3e5609(0xee)]=0x5]=_0x3e5609(0xee),_0x320b82[_0x320b82['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x320b82))(_0x3fcc7f||{});const _0x1eabda=_0x148376=>_0x202475['dayjs'](new Date(+_0x148376))[_0x3e5609(0xe5)](_0x3e5609(0x11b)),_0x22f5ce=async(_0x144b2b,_0x3c541d)=>{const _0x4dcc88=_0x3e5609,_0x4fcb45=_0x144b2b[_0x4dcc88(0xc1)](_0x202475[_0x4dcc88(0xf2)]),_0x1ccee2=_0x144b2b[_0x4dcc88(0xc1)](_0x507eab[_0x4dcc88(0xbc)]);_0x3c541d[_0x4dcc88(0x11f)](_0x4d5634=>{const _0xea520f=_0x4dcc88;_0x4fcb45[_0xea520f(0xf7)](_0x4d5634)&&_0x3c541d[_0xea520f(0xfa)](_0x4d5634);}),_0x3c541d['size']&&(await _0x1ccee2[_0x4dcc88(0xc1)](_0x4dcc88(0xc7),{'params':{'userIDs':[..._0x3c541d]}}))[_0x4dcc88(0x123)][_0x4dcc88(0x109)][_0x4dcc88(0x11f)](_0x4470f5=>{const _0xc69f1e=_0x4dcc88;_0x4470f5&&_0x4fcb45[_0xc69f1e(0x124)](_0x4470f5);});};var _0x4c9b0d=Object[_0x3e5609(0xfd)],_0x230cee=(_0x3fdcee,_0x33ebd6,_0x24ed6c,_0x51ae92)=>{for(var _0x48f846=_0x51ae92>0x1?void 0x0:_0x51ae92?_0x4c9b0d(_0x33ebd6,_0x24ed6c):_0x33ebd6,_0x2381ea=_0x3fdcee['length']-0x1,_0x4ede50;_0x2381ea>=0x0;_0x2381ea--)(_0x4ede50=_0x3fdcee[_0x2381ea])&&(_0x48f846=_0x4ede50(_0x48f846)||_0x48f846);return _0x48f846;},_0x212e72=(_0x37ec27,_0x3348ef)=>(_0x1f1ce7,_0x1ece43)=>_0x3348ef(_0x1f1ce7,_0x1ece43,_0x37ec27);let _0x4f3510=class extends _0x202475['Disposable']{constructor(_0x547705,_0x7eb2ad,_0x1e49f9,_0x395dba){const _0x350d4a=_0x3e5609;super(),this[_0x350d4a(0xe9)]=_0x547705,this[_0x350d4a(0x106)]=_0x7eb2ad,this[_0x350d4a(0x114)]=_0x1e49f9,this[_0x350d4a(0xd8)]=_0x395dba,this[_0x350d4a(0x12d)](),this[_0x350d4a(0x107)]();}[_0x3e5609(0x107)](){const _0xa7f7eb=_0x3e5609;this[_0xa7f7eb(0xd4)](this[_0xa7f7eb(0x106)]['commentUpdate$'][_0xa7f7eb(0xce)](_0x2cd9a9[_0xa7f7eb(0x110)](0x10))[_0xa7f7eb(0xf5)](_0xc625e2=>{const _0x15ede7=_0xa7f7eb,_0x33afd3=new Set();_0xc625e2[_0x15ede7(0x11f)](_0x5c84c6=>{const _0x5112ae=_0x15ede7;switch(_0x5c84c6['type']){case _0x5112ae(0x101):{const _0x3161b3=_0x5c84c6[_0x5112ae(0xb3)][_0x5112ae(0x131)];_0x33afd3[_0x5112ae(0x101)](_0x3161b3);break;}}}),_0x22f5ce(this[_0x15ede7(0xd8)],_0x33afd3);}));}[_0x3e5609(0x12d)](){const _0xc52f5b=_0x3e5609;this[_0xc52f5b(0xd4)](this[_0xc52f5b(0xe9)]['commentUpdate$'][_0xc52f5b(0xf5)](async _0x4f07fb=>{const _0x4bc363=_0xc52f5b;var _0x5aa5a0,_0x1816e0,_0x370da7,_0x2c8d62;const _0x12df3f=(_0x5aa5a0=this[_0x4bc363(0x106)][_0x4bc363(0x122)](_0x4f07fb[_0x4bc363(0x102)])[_0x4bc363(0x128)](_0x216a37=>_0x216a37[_0x4bc363(0x10c)]===_0x4f07fb['threadId']))==null?void 0x0:_0x5aa5a0[_0x4bc363(0xc9)];if(!_0x12df3f)return;const {unitId:_0x485f78,subUnitId:_0x568ef5}=_0x12df3f;switch(_0x4f07fb[_0x4bc363(0xc0)]&&this['_userService'][_0x4bc363(0x124)](_0x4f07fb[_0x4bc363(0xc0)]),_0x4f07fb[_0x4bc363(0xcc)]){case _0x3fcc7f[_0x4bc363(0xea)]:break;case _0x3fcc7f['Reply']:{this[_0x4bc363(0x106)][_0x4bc363(0xe6)](_0x485f78,_0x568ef5,{'unitId':_0x485f78,'subUnitId':_0x568ef5,'ref':'','id':_0x4f07fb[_0x4bc363(0x113)],'dT':_0x1eabda(+_0x4f07fb['createTimestamp']),'threadId':_0x4f07fb[_0x4bc363(0x10c)],'personId':(_0x370da7=(_0x1816e0=_0x4f07fb['user'])==null?void 0x0:_0x1816e0[_0x4bc363(0x10d)])!=null?_0x370da7:_0x4f07fb[_0x4bc363(0xe4)],'text':JSON['parse'](_0x4f07fb[_0x4bc363(0xeb)]),'parentId':_0x12df3f['id']});break;}case _0x3fcc7f['Delete']:{const _0x329df3=this[_0x4bc363(0x106)][_0x4bc363(0x129)](_0x485f78,_0x568ef5,_0x4f07fb[_0x4bc363(0x113)]);_0x329df3&&_0x329df3[_0x4bc363(0xe1)]&&this['_threadCommentModel']['deleteComment'](_0x485f78,_0x568ef5,_0x4f07fb[_0x4bc363(0x113)]);break;}case _0x3fcc7f[_0x4bc363(0xe2)]:{this[_0x4bc363(0x106)][_0x4bc363(0xd9)](_0x485f78,_0x568ef5,{'commentId':_0x4f07fb[_0x4bc363(0x113)],'text':JSON['parse'](_0x4f07fb[_0x4bc363(0xeb)])});break;}case _0x3fcc7f[_0x4bc363(0xee)]:{const _0x1d3f2b=(_0x2c8d62=this[_0x4bc363(0x106)][_0x4bc363(0x122)](_0x4f07fb[_0x4bc363(0x102)])['find'](_0x34b950=>_0x34b950[_0x4bc363(0x10c)]===_0x4f07fb['threadId']))==null?void 0x0:_0x2c8d62[_0x4bc363(0xc9)];_0x1d3f2b&&this[_0x4bc363(0x106)]['resolveComment'](_0x485f78,_0x568ef5,_0x1d3f2b['id'],_0x4f07fb[_0x4bc363(0xd0)]===_0x19b0c8[_0x4bc363(0x104)]);break;}}}));}};_0x4f3510=_0x230cee([_0x212e72(0x0,_0x202475[_0x3e5609(0xc4)](_0x210bf8[_0x3e5609(0xe7)])),_0x212e72(0x1,_0x202475['Inject'](_0x4dc4ac['ThreadCommentModel'])),_0x212e72(0x2,_0x202475[_0x3e5609(0xc4)](_0x202475[_0x3e5609(0xf2)])),_0x212e72(0x3,_0x202475['Inject'](_0x202475[_0x3e5609(0x11d)]))],_0x4f3510);const _0x5626f9=_0x3e5609(0x11a),_0x4f5793={};var _0x2207e8=Object[_0x3e5609(0xfd)],_0xb4a31d=(_0x26f0f6,_0x585f36,_0x803e07,_0x1d2a11)=>{const _0x412a91=_0x3e5609;for(var _0xcd4c23=_0x1d2a11>0x1?void 0x0:_0x1d2a11?_0x2207e8(_0x585f36,_0x803e07):_0x585f36,_0x3c2410=_0x26f0f6[_0x412a91(0xb9)]-0x1,_0x98604e;_0x3c2410>=0x0;_0x3c2410--)(_0x98604e=_0x26f0f6[_0x3c2410])&&(_0xcd4c23=_0x98604e(_0xcd4c23)||_0xcd4c23);return _0xcd4c23;},_0x208ff8=(_0x5cb5ee,_0x1d0691)=>(_0x21c860,_0x2bc8cd)=>_0x1d0691(_0x21c860,_0x2bc8cd,_0x5cb5ee);function _0x33b9b5(_0x403073,_0x421578){const _0x3d2876=_0x3e5609,_0x27f513=_0x403073[_0x3d2876(0xcf)][0x0];return{..._0x421578,'id':_0x27f513[_0x3d2876(0x113)],'resolved':_0x403073[_0x3d2876(0xd0)]===0x1,'dT':_0x1eabda(_0x27f513[_0x3d2876(0xf9)]),'personId':_0x27f513[_0x3d2876(0xe4)],'threadId':_0x27f513[_0x3d2876(0x10c)]};}function _0x2311b1(_0x56ee2b,_0x4f3cfa,_0x416fce){const _0x311ff3=_0x3e5609;var _0xbc7c97,_0x28487c;if(((_0x28487c=(_0xbc7c97=_0x56ee2b==null?void 0x0:_0x56ee2b['replies'])==null?void 0x0:_0xbc7c97[_0x311ff3(0xb9)])!=null?_0x28487c:0x0)>0x0){const _0xfcf787=(_0x270c80,_0x125a21)=>({'id':_0x270c80[_0x311ff3(0x113)],'threadId':_0x270c80[_0x311ff3(0x10c)],'dT':_0x1eabda(_0x270c80[_0x311ff3(0xf9)]),'personId':_0x270c80[_0x311ff3(0xe4)],'resolved':_0x56ee2b[_0x311ff3(0xd0)]===_0x19b0c8[_0x311ff3(0x104)],'unitId':_0x4f3cfa,'subUnitId':_0x416fce,'text':JSON[_0x311ff3(0xb4)](_0x270c80['content']),'parentId':_0x125a21}),_0x290e2f=_0xfcf787(_0x56ee2b['replies'][0x0]);return{..._0x290e2f,'children':_0x56ee2b['replies'][_0x311ff3(0x117)](0x1)['map'](_0x50099c=>_0xfcf787(_0x50099c,_0x290e2f['id']))};}return null;}let _0xdf0bdf=class{constructor(_0x56624b,_0x56d3f4,_0x1c217d){const _0x5bce36=_0x3e5609;this[_0x5bce36(0x103)]=_0x56624b,this['_userService']=_0x56d3f4,this[_0x5bce36(0x121)]=_0x1c217d;}async[_0x3e5609(0xe6)](_0x168e59){const _0x49cbfa=_0x3e5609;var _0x5c6078,_0x47ff27;const {parentId:_0x4da86b,unitId:_0x3914fe,text:_0x1dca7c,threadId:_0x5a989c}=_0x168e59,_0x29aef3=(_0x47ff27=(_0x5c6078=_0x1dca7c[_0x49cbfa(0xdb)])==null?void 0x0:_0x5c6078[_0x49cbfa(0xe8)](_0x3e8fa7=>_0x3e8fa7['rangeType']===_0x202475[_0x49cbfa(0x118)]['COMMENT'])[_0x49cbfa(0xec)](_0x385e81=>_0x385e81[_0x49cbfa(0x126)]))!=null?_0x47ff27:[],_0x4a149c=JSON[_0x49cbfa(0x12e)](_0x1dca7c),_0x362605=(await this[_0x49cbfa(0x121)][_0x49cbfa(0xed)](_0x3914fe))['getMemberID']();if(_0x4da86b){const _0x52f095={'memberId':_0x362605,'unitId':_0x3914fe,'content':_0x4a149c,'mention':_0x29aef3,'threadId':_0x5a989c},_0x395666=(await this[_0x49cbfa(0x103)][_0x49cbfa(0xd7)](_0x49cbfa(0xc5)+_0x3914fe+'/reply',{'body':_0x52f095}))['body'][_0x49cbfa(0xde)];return{..._0x168e59,'id':_0x395666[_0x49cbfa(0x113)],'dT':_0x202475[_0x49cbfa(0xbf)](+_0x395666[_0x49cbfa(0xf9)])[_0x49cbfa(0xe5)](_0x49cbfa(0x11b)),'personId':_0x395666['userId']};}else{const _0x1fa894={'memberId':_0x362605,'unitId':_0x3914fe,'content':_0x4a149c,'mention':_0x29aef3},_0x248c99=await this[_0x49cbfa(0x103)][_0x49cbfa(0xd7)]('/universer-api/comment/unit/'+_0x3914fe+'/add',{'body':_0x1fa894});return _0x33b9b5(_0x248c99[_0x49cbfa(0x123)][_0x49cbfa(0xe3)],_0x168e59);}}async['updateComment'](_0x5a535c){const _0x13bb1c=_0x3e5609;var _0x16e342,_0x25abcf;const {text:_0x5b4232,unitId:_0x2b2e10}=_0x5a535c,_0x549b7f=(_0x25abcf=(_0x16e342=_0x5b4232[_0x13bb1c(0xdb)])==null?void 0x0:_0x16e342[_0x13bb1c(0xe8)](_0x211152=>_0x211152[_0x13bb1c(0xb0)]===_0x202475[_0x13bb1c(0x118)][_0x13bb1c(0xaf)])[_0x13bb1c(0xec)](_0x3d69b8=>_0x3d69b8[_0x13bb1c(0x126)]))!=null?_0x25abcf:[],_0x4c6c13=JSON[_0x13bb1c(0x12e)](_0x5b4232),_0x919a62=_0x5a535c[_0x13bb1c(0x10c)],_0x482d0d=_0x5a535c['id'],_0x51f671={'memberId':(await this[_0x13bb1c(0x121)][_0x13bb1c(0xed)](_0x2b2e10))['getMemberID'](),'unitId':_0x2b2e10,'threadId':_0x919a62,'mention':_0x549b7f,'content':_0x4c6c13,'replyId':_0x482d0d},_0x3e61bd=await this[_0x13bb1c(0x103)][_0x13bb1c(0xd7)](_0x13bb1c(0xc5)+_0x2b2e10+_0x13bb1c(0xc2),{'body':_0x51f671});return!_0x3e61bd[_0x13bb1c(0x123)][_0x13bb1c(0x115)]||_0x3e61bd[_0x13bb1c(0x123)]['error']['code']===0x1;}async[_0x3e5609(0xc6)](_0x2303b8){const _0xc9f1ab=_0x3e5609,{unitId:_0x10386b}=_0x2303b8,_0x5c6a51=_0x2303b8['threadId'],_0x8bf873={'memberId':this[_0xc9f1ab(0x114)]['getCurrentUser']()[_0xc9f1ab(0x10d)],'unitId':_0x10386b,'threadId':_0x5c6a51,'solved':_0x2303b8['resolved']?_0x19b0c8[_0xc9f1ab(0x104)]:_0x19b0c8['OpenOrReOpen']},_0x12ba0a=await this[_0xc9f1ab(0x103)][_0xc9f1ab(0xd7)](_0xc9f1ab(0xc5)+_0x10386b+_0xc9f1ab(0x105),{'body':_0x8bf873});return!_0x12ba0a[_0xc9f1ab(0x123)]['error']||_0x12ba0a[_0xc9f1ab(0x123)][_0xc9f1ab(0x115)][_0xc9f1ab(0xb8)]===0x1;}async[_0x3e5609(0x116)](_0x3bc1be,_0x9e9625,_0x41ef59,_0x11f5cd){const _0x30a97f=_0x3e5609,_0x1c01f7={'memberId':(await this['_sessionService'][_0x30a97f(0xed)](_0x3bc1be))[_0x30a97f(0xf1)](),'threadId':_0x41ef59,'replyId':_0x11f5cd,'unitId':_0x3bc1be},_0x3f8fa8=await this['_httpService']['post'](_0x30a97f(0xc5)+_0x3bc1be+_0x30a97f(0x119),{'body':_0x1c01f7});return!_0x3f8fa8[_0x30a97f(0x123)][_0x30a97f(0x115)]||_0x3f8fa8[_0x30a97f(0x123)][_0x30a97f(0x115)][_0x30a97f(0xb8)]===0x1;}async['listComments'](_0x4ee892,_0x5d17b6,_0xbf7b2b){const _0x303bf2=_0x3e5609,_0xe64dc0={'unitId':_0x4ee892,'threadId':_0xbf7b2b},_0x88718a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4ee892+_0x303bf2(0xcd),{'body':_0xe64dc0}),_0x5e1eef=_0xbf7b2b[_0x303bf2(0xec)](_0x551f24=>_0x2311b1(_0x88718a[_0x303bf2(0x123)][_0x303bf2(0xc8)][_0x551f24],_0x4ee892,_0x5d17b6))[_0x303bf2(0xe8)](Boolean);return Object[_0x303bf2(0xb7)](_0x88718a[_0x303bf2(0x123)][_0x303bf2(0x109)])[_0x303bf2(0x11f)](_0x272551=>{const _0x23fb14=_0x303bf2;this[_0x23fb14(0x114)][_0x23fb14(0x124)](_0x272551);}),_0x5e1eef;}[_0x3e5609(0xf4)](_0x2c8f99){const _0x1ae9fa=_0x3e5609;return{'id':_0x2c8f99['id'],'threadId':_0x2c8f99[_0x1ae9fa(0x10c)],'ref':_0x2c8f99['ref']};}};_0xdf0bdf=_0xb4a31d([_0x208ff8(0x0,_0x202475['Inject'](_0x507eab['HTTPService'])),_0x208ff8(0x1,_0x202475[_0x3e5609(0xc4)](_0x202475[_0x3e5609(0xf2)])),_0x208ff8(0x2,_0x202475[_0x3e5609(0xc4)](_0x210bf8[_0x3e5609(0xd2)]))],_0xdf0bdf);var _0x27ff12=Object['getOwnPropertyDescriptor'],_0x5a430b=(_0x804519,_0xa83008,_0x22a1a4,_0x58094b)=>{const _0x33e9d6=_0x3e5609;for(var _0xfef8e4=_0x58094b>0x1?void 0x0:_0x58094b?_0x27ff12(_0xa83008,_0x22a1a4):_0xa83008,_0x45c851=_0x804519[_0x33e9d6(0xb9)]-0x1,_0x26e74b;_0x45c851>=0x0;_0x45c851--)(_0x26e74b=_0x804519[_0x45c851])&&(_0xfef8e4=_0x26e74b(_0xfef8e4)||_0xfef8e4);return _0xfef8e4;},_0x5d785c=(_0x1229f5,_0x2abb33)=>(_0x438bce,_0x41c468)=>_0x2abb33(_0x438bce,_0x41c468,_0x1229f5);let _0x2bb563=class extends _0x202475['Disposable']{constructor(_0x4803ab,_0x3adaf8){const _0x21160b=_0x3e5609;super(),this[_0x21160b(0x10f)]=_0x4803ab,this[_0x21160b(0x10b)]=_0x3adaf8,this[_0x21160b(0xf3)]();}['_initDataSource'](){const _0x378b7c=_0x3e5609;this[_0x378b7c(0x10f)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x378b7c(0xbd)]=!0x1;}};_0x2bb563=_0x5a430b([_0x5d785c(0x0,_0x4dc4ac[_0x3e5609(0xbe)]),_0x5d785c(0x1,_0x202475['Inject'](_0xdf0bdf))],_0x2bb563);var _0x371113=Object[_0x3e5609(0xb5)],_0x304192=Object[_0x3e5609(0xfd)],_0xb62991=(_0x174803,_0xd98d41,_0x3bb23a)=>_0xd98d41 in _0x174803?_0x371113(_0x174803,_0xd98d41,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3bb23a}):_0x174803[_0xd98d41]=_0x3bb23a,_0x251a17=(_0xfbf9af,_0x4ad050,_0x1a95f7,_0x4b9a68)=>{const _0x45803d=_0x3e5609;for(var _0x19a345=_0x4b9a68>0x1?void 0x0:_0x4b9a68?_0x304192(_0x4ad050,_0x1a95f7):_0x4ad050,_0x3bf28a=_0xfbf9af[_0x45803d(0xb9)]-0x1,_0x4373e3;_0x3bf28a>=0x0;_0x3bf28a--)(_0x4373e3=_0xfbf9af[_0x3bf28a])&&(_0x19a345=_0x4373e3(_0x19a345)||_0x19a345);return _0x19a345;},_0x360acd=(_0x4056c6,_0x2b1797)=>(_0x31bd9f,_0x2ae1da)=>_0x2b1797(_0x31bd9f,_0x2ae1da,_0x4056c6),_0x54f9de=(_0x144489,_0x480160,_0x5d9d6f)=>_0xb62991(_0x144489,typeof _0x480160!=_0x3e5609(0xf0)?_0x480160+'':_0x480160,_0x5d9d6f);_0x9e9bf4[_0x3e5609(0xca)]=class extends _0x202475['Plugin']{constructor(_0x42c1ca=_0x4f5793,_0x21479e,_0xfb189d){const _0x31c4b9=_0x3e5609;super(),this[_0x31c4b9(0xf6)]=_0x42c1ca,this[_0x31c4b9(0xd8)]=_0x21479e,this[_0x31c4b9(0xb2)]=_0xfb189d;const {..._0x5ade38}=_0x202475[_0x31c4b9(0x10e)]({},_0x4f5793,this[_0x31c4b9(0xf6)]);this[_0x31c4b9(0xb2)][_0x31c4b9(0xc3)](_0x5626f9,_0x5ade38);}['onStarting'](){[[_0xdf0bdf],[_0x2bb563],[_0x4f3510]]['forEach'](_0xb2c998=>{const _0x31f197=_0x304b;this[_0x31f197(0xd8)]['add'](_0xb2c998);});}[_0x3e5609(0x120)](){const _0x3f4ad0=_0x3e5609;this['_injector']['get'](_0x2bb563),this['_injector'][_0x3f4ad0(0xc1)](_0x4f3510);}},_0x54f9de(_0x9e9bf4[_0x3e5609(0xca)],'pluginName',_0x279a9d),_0x54f9de(_0x9e9bf4['UniverThreadCommentDataSourcePlugin'],_0x3e5609(0xcc),_0x202475[_0x3e5609(0x111)][_0x3e5609(0x11e)]),_0x9e9bf4[_0x3e5609(0xca)]=_0x251a17([_0x202475[_0x3e5609(0x12b)](_0x373872[_0x3e5609(0xd5)],_0x210bf8['UniverCollaborationClientPlugin'],_0x362b49['UniverLicensePlugin']),_0x360acd(0x1,_0x202475['Inject'](_0x202475[_0x3e5609(0x11d)])),_0x360acd(0x2,_0x202475[_0x3e5609(0xb1)])],_0x9e9bf4[_0x3e5609(0xca)]),Object['defineProperty'](_0x9e9bf4,Symbol[_0x3e5609(0x125)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.4-experimental.20251210-8d33c6e",
3
+ "version": "0.12.4-experimental.20251210-d708bff",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/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",
48
+ "@univerjs-pro/license": "0.12.4-experimental.20251210-d708bff",
49
+ "@univerjs/network": "0.12.4-experimental.20251210-d708bff",
50
+ "@univerjs/core": "0.12.4-experimental.20251210-d708bff",
51
+ "@univerjs-pro/collaboration-client": "0.12.4-experimental.20251210-d708bff",
52
+ "@univerjs/thread-comment": "0.12.4-experimental.20251210-d708bff",
53
53
  "@univerjs/protocol": "0.1.47",
54
- "@univerjs/core": "0.12.4-experimental.20251210-8d33c6e"
54
+ "@univerjs/thread-comment-ui": "0.12.4-experimental.20251210-d708bff"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",