@univerjs-pro/thread-comment-datasource 0.5.5 → 0.6.0-experimental.20250125-1d060b9
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x23f222=_0x4cad;(function(_0x5d823e,_0x517ee6){const _0x56edcb=_0x4cad,_0x3fe19e=_0x5d823e();while(!![]){try{const _0x35cfd5=-parseInt(_0x56edcb(0x1fd))/0x1+parseInt(_0x56edcb(0x20c))/0x2+parseInt(_0x56edcb(0x264))/0x3+-parseInt(_0x56edcb(0x24a))/0x4+-parseInt(_0x56edcb(0x24d))/0x5+parseInt(_0x56edcb(0x215))/0x6+-parseInt(_0x56edcb(0x1f5))/0x7*(-parseInt(_0x56edcb(0x21c))/0x8);if(_0x35cfd5===_0x517ee6)break;else _0x3fe19e['push'](_0x3fe19e['shift']());}catch(_0x25ca21){_0x3fe19e['push'](_0x3fe19e['shift']());}}}(_0x3963,0xd48bd));Object[_0x23f222(0x25d)](exports,Symbol[_0x23f222(0x217)],{'value':_0x23f222(0x241)});const C=require(_0x23f222(0x232)),T=require(_0x23f222(0x212)),c=require(_0x23f222(0x1f4)),w=require(_0x23f222(0x234)),P=require(_0x23f222(0x247)),U=require(_0x23f222(0x254)),M=require(_0x23f222(0x1f6)),R=_0x23f222(0x261);var v=(_0xac695a=>(_0xac695a[_0xac695a[_0x23f222(0x263)]=0x0]='OpenOrReOpen',_0xac695a[_0xac695a[_0x23f222(0x231)]=0x1]=_0x23f222(0x231),_0xac695a[_0xac695a['UNRECOGNIZED']=-0x1]=_0x23f222(0x21d),_0xac695a))(v||{}),I=(_0x1104ff=>(_0x1104ff[_0x1104ff[_0x23f222(0x266)]=0x0]=_0x23f222(0x266),_0x1104ff[_0x1104ff['Add']=0x1]=_0x23f222(0x208),_0x1104ff[_0x1104ff['Reply']=0x2]='Reply',_0x1104ff[_0x1104ff[_0x23f222(0x213)]=0x3]=_0x23f222(0x213),_0x1104ff[_0x1104ff[_0x23f222(0x244)]=0x4]='Delete',_0x1104ff[_0x1104ff[_0x23f222(0x25c)]=0x5]=_0x23f222(0x25c),_0x1104ff[_0x1104ff[_0x23f222(0x21d)]=-0x1]='UNRECOGNIZED',_0x1104ff))(I||{});const g=_0x41ea95=>c[_0x23f222(0x1fb)](new Date(+_0x41ea95))[_0x23f222(0x20d)]('YYYY/MM/DD\x20HH:mm'),$=async(_0x21321e,_0x132f51)=>{const _0x1ee5ad=_0x23f222,_0x12471d=_0x21321e[_0x1ee5ad(0x1fe)](c[_0x1ee5ad(0x20a)]),_0x28dfa8=_0x21321e[_0x1ee5ad(0x1fe)](M[_0x1ee5ad(0x204)]);_0x132f51[_0x1ee5ad(0x236)](_0x217d2f=>{const _0xe7b9ff=_0x1ee5ad;_0x12471d[_0xe7b9ff(0x246)](_0x217d2f)&&_0x132f51[_0xe7b9ff(0x222)](_0x217d2f);}),_0x132f51[_0x1ee5ad(0x233)]&&(await _0x28dfa8[_0x1ee5ad(0x1fe)](_0x1ee5ad(0x225),{'params':{'userIDs':[..._0x132f51]}}))[_0x1ee5ad(0x21e)]['users'][_0x1ee5ad(0x236)](_0x240e1f=>{const _0x3d9557=_0x1ee5ad;_0x240e1f&&_0x12471d[_0x3d9557(0x260)](_0x240e1f);});};var E=Object[_0x23f222(0x25d)],q=Object['getOwnPropertyDescriptor'],A=(_0x4d1f71,_0x457010,_0x432351,_0x4abb65)=>{for(var _0x58d798=_0x4abb65>0x1?void 0x0:_0x4abb65?q(_0x457010,_0x432351):_0x457010,_0x2d4d69=_0x4d1f71['length']-0x1,_0x101ed5;_0x2d4d69>=0x0;_0x2d4d69--)(_0x101ed5=_0x4d1f71[_0x2d4d69])&&(_0x58d798=(_0x4abb65?_0x101ed5(_0x457010,_0x432351,_0x58d798):_0x101ed5(_0x58d798))||_0x58d798);return _0x4abb65&&_0x58d798&&E(_0x457010,_0x432351,_0x58d798),_0x58d798;},_=(_0x16515a,_0x5d62c6)=>(_0x13dc0a,_0x135c17)=>_0x5d62c6(_0x13dc0a,_0x135c17,_0x16515a);let S=class extends c['Disposable']{constructor(_0x57a2ba,_0x4fcbf4,_0x4b069c,_0xc41759){const _0x3c4400=_0x23f222;super(),this[_0x3c4400(0x22a)]=_0x57a2ba,this[_0x3c4400(0x23e)]=_0x4fcbf4,this[_0x3c4400(0x22e)]=_0x4b069c,this[_0x3c4400(0x23d)]=_0xc41759,this[_0x3c4400(0x25b)](),this[_0x3c4400(0x250)]();}[_0x23f222(0x250)](){const _0x34cfc4=_0x23f222;this['disposeWithMe'](this[_0x34cfc4(0x23e)][_0x34cfc4(0x238)]['pipe'](U[_0x34cfc4(0x257)](0x10))['subscribe'](_0x55c9c9=>{const _0x9f5119=_0x34cfc4,_0x1c01e1=new Set();_0x55c9c9[_0x9f5119(0x236)](_0xee1f81=>{const _0x2c9c76=_0x9f5119;switch(_0xee1f81[_0x2c9c76(0x1f9)]){case'add':{const _0xb41739=_0xee1f81[_0x2c9c76(0x223)][_0x2c9c76(0x235)];_0x1c01e1[_0x2c9c76(0x203)](_0xb41739);break;}}}),$(this[_0x9f5119(0x23d)],_0x1c01e1);}));}[_0x23f222(0x25b)](){const _0x3ae9cc=_0x23f222;this['disposeWithMe'](this[_0x3ae9cc(0x22a)][_0x3ae9cc(0x238)][_0x3ae9cc(0x211)](async _0x1c1559=>{const _0x2ee455=_0x3ae9cc;var _0x389901,_0x565ebe,_0x13d573,_0x44662a;const _0x4faf65=(_0x389901=this[_0x2ee455(0x23e)][_0x2ee455(0x242)](_0x1c1559['unitId'])['find'](_0x3c261a=>_0x3c261a['threadId']===_0x1c1559[_0x2ee455(0x20f)]))==null?void 0x0:_0x389901[_0x2ee455(0x21f)];if(!_0x4faf65)return;const {unitId:_0x20ed56,subUnitId:_0x2e91fa}=_0x4faf65;switch(_0x1c1559[_0x2ee455(0x249)]&&this[_0x2ee455(0x22e)]['addUser'](_0x1c1559[_0x2ee455(0x249)]),_0x1c1559[_0x2ee455(0x1f9)]){case I['Add']:break;case I[_0x2ee455(0x22c)]:{this[_0x2ee455(0x23e)][_0x2ee455(0x253)](_0x20ed56,_0x2e91fa,{'unitId':_0x20ed56,'subUnitId':_0x2e91fa,'ref':'','id':_0x1c1559['replyId'],'dT':g(+_0x1c1559[_0x2ee455(0x201)]),'threadId':_0x1c1559[_0x2ee455(0x20f)],'personId':(_0x13d573=(_0x565ebe=_0x1c1559[_0x2ee455(0x249)])==null?void 0x0:_0x565ebe[_0x2ee455(0x21b)])!=null?_0x13d573:_0x1c1559[_0x2ee455(0x200)],'text':JSON['parse'](_0x1c1559[_0x2ee455(0x20b)]),'parentId':_0x4faf65['id']});break;}case I[_0x2ee455(0x244)]:{const _0x279914=this['_threadCommentModel'][_0x2ee455(0x23a)](_0x20ed56,_0x2e91fa,_0x1c1559['replyId']);_0x279914&&_0x279914['parentId']&&this[_0x2ee455(0x23e)]['deleteComment'](_0x20ed56,_0x2e91fa,_0x1c1559['replyId']);break;}case I[_0x2ee455(0x213)]:{this[_0x2ee455(0x23e)][_0x2ee455(0x255)](_0x20ed56,_0x2e91fa,{'commentId':_0x1c1559[_0x2ee455(0x265)],'text':JSON[_0x2ee455(0x259)](_0x1c1559['content'])});break;}case I[_0x2ee455(0x25c)]:{const _0x390a76=(_0x44662a=this[_0x2ee455(0x23e)][_0x2ee455(0x242)](_0x1c1559['unitId'])['find'](_0x42ad21=>_0x42ad21[_0x2ee455(0x20f)]===_0x1c1559[_0x2ee455(0x20f)]))==null?void 0x0:_0x44662a['root'];_0x390a76&&this[_0x2ee455(0x23e)][_0x2ee455(0x207)](_0x20ed56,_0x2e91fa,_0x390a76['id'],_0x1c1559['solved']===v['Solved']);break;}}}));}};S=A([_(0x0,c[_0x23f222(0x221)](C[_0x23f222(0x22b)])),_(0x1,c['Inject'](P[_0x23f222(0x256)])),_(0x2,c[_0x23f222(0x221)](c[_0x23f222(0x20a)])),_(0x3,c[_0x23f222(0x221)](c[_0x23f222(0x209)]))],S);function _0x3963(){const _0x529508=['bufferTime','IConfigService','parse','map','_init','Solve','defineProperty','requireSession','CollaborationSessionService','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','OpenOrReOpen','1872801MgiTPq','replyId','Unknown','_initDataSource','rangeId','replies','values','error','length','UniverThreadCommentDataSourcePlugin','stringify','@univerjs/core','50393hJFxih','@univerjs/network','IThreadCommentDataSourceService','filter','type','_httpService','dayjs','getCurrentUser','1689233xYhJvK','get','DependentOn','userId','createTimestamp','ref','add','HTTPService','Plugin','/delete','resolveComment','Add','Injector','UserManagerService','content','2688076tpDnso','format','/edit','threadId','/universer-api/comment/unit/','subscribe','@univerjs-pro/license','Edit','code','7528446JwCRmM','getOwnPropertyDescriptor','toStringTag','UniverInstanceType','resolved','rangeType','userID','1720LyMGVm','UNRECOGNIZED','body','root','customRanges','Inject','delete','payload','listComments','/universer-api/user/list','post','getMemberID','CustomRangeType','users','_commentService','CommentService','Reply','_config','_userService','solved','/solved','Solved','@univerjs-pro/collaboration-client','size','@univerjs/thread-comment-ui','personId','forEach','UniverLicensePlugin','commentUpdate$','Disposable','getComment','reply','saveCommentToSnapshot','_injector','_threadCommentModel','onStarting','symbol','Module','getUnit','comments','Delete','slice','getUser','@univerjs/thread-comment','comment','user','2348364tZbAAE','_threadCommentDataSource','_sessionService','8119590ainFCB','YYYY/MM/DD\x20HH:mm','deleteComment','_initUserSync','_configService','pluginName','addComment','rxjs','updateComment','ThreadCommentModel'];_0x3963=function(){return _0x529508;};return _0x3963();}const x='thread-comment-data-source.config',D={};function _0x4cad(_0xa095c7,_0x1fffd3){const _0x396398=_0x3963();return _0x4cad=function(_0x4cad9a,_0x1f2de5){_0x4cad9a=_0x4cad9a-0x1f0;let _0xa597e=_0x396398[_0x4cad9a];return _0xa597e;},_0x4cad(_0xa095c7,_0x1fffd3);}var Y=Object[_0x23f222(0x25d)],G=Object[_0x23f222(0x216)],H=(_0x2cd30a,_0x8a917d,_0x55d329,_0x407a9f)=>{const _0x3c709b=_0x23f222;for(var _0x59dec7=_0x407a9f>0x1?void 0x0:_0x407a9f?G(_0x8a917d,_0x55d329):_0x8a917d,_0x777cbe=_0x2cd30a[_0x3c709b(0x1f1)]-0x1,_0x561546;_0x777cbe>=0x0;_0x777cbe--)(_0x561546=_0x2cd30a[_0x777cbe])&&(_0x59dec7=(_0x407a9f?_0x561546(_0x8a917d,_0x55d329,_0x59dec7):_0x561546(_0x59dec7))||_0x59dec7);return _0x407a9f&&_0x59dec7&&Y(_0x8a917d,_0x55d329,_0x59dec7),_0x59dec7;},p=(_0x2ba737,_0x46fd5c)=>(_0x586ccf,_0x482533)=>_0x46fd5c(_0x586ccf,_0x482533,_0x2ba737);function J(_0x1b53bd,_0x209449){const _0x3350bb=_0x23f222,_0x3e7499=_0x1b53bd[_0x3350bb(0x269)][0x0];return{..._0x209449,'id':_0x3e7499[_0x3350bb(0x265)],'resolved':_0x1b53bd['solved']===0x1,'dT':g(_0x3e7499[_0x3350bb(0x201)]),'personId':_0x3e7499[_0x3350bb(0x200)],'threadId':_0x3e7499[_0x3350bb(0x20f)]};}function F(_0x1f0b62,_0x580288,_0x35fd7c){const _0x5aeb6b=_0x23f222;var _0x4c1568,_0x51af6e;if(((_0x51af6e=(_0x4c1568=_0x1f0b62==null?void 0x0:_0x1f0b62[_0x5aeb6b(0x269)])==null?void 0x0:_0x4c1568[_0x5aeb6b(0x1f1)])!=null?_0x51af6e:0x0)>0x0){const _0x44558d=(_0x5736ba,_0x50c718)=>({'id':_0x5736ba[_0x5aeb6b(0x265)],'threadId':_0x5736ba['threadId'],'dT':g(_0x5736ba['createTimestamp']),'personId':_0x5736ba[_0x5aeb6b(0x200)],'resolved':_0x1f0b62[_0x5aeb6b(0x22f)]===v['Solved'],'unitId':_0x580288,'subUnitId':_0x35fd7c,'text':JSON[_0x5aeb6b(0x259)](_0x5736ba[_0x5aeb6b(0x20b)]),'parentId':_0x50c718}),_0x4818dc=_0x44558d(_0x1f0b62[_0x5aeb6b(0x269)][0x0]);return{..._0x4818dc,'children':_0x1f0b62[_0x5aeb6b(0x269)][_0x5aeb6b(0x245)](0x1)['map'](_0x128fe5=>_0x44558d(_0x128fe5,_0x4818dc['id']))};}return null;}let f=class{constructor(_0x2e470e,_0x29b96e,_0x4f7669,_0x2fdc2b){const _0x5e5ccb=_0x23f222;this['_httpService']=_0x2e470e,this[_0x5e5ccb(0x22e)]=_0x29b96e,this[_0x5e5ccb(0x24c)]=_0x4f7669,this[_0x5e5ccb(0x23d)]=_0x2fdc2b;}async[_0x23f222(0x253)](_0x291788){const _0xe441cb=_0x23f222;var _0x89a92a,_0x4eb2df;const {parentId:_0x4f69fc,unitId:_0x434b86,text:_0x3334b2,threadId:_0x548048}=_0x291788,_0x409d32=(_0x4eb2df=(_0x89a92a=_0x3334b2[_0xe441cb(0x220)])==null?void 0x0:_0x89a92a[_0xe441cb(0x1f8)](_0x267df8=>_0x267df8[_0xe441cb(0x21a)]===c[_0xe441cb(0x228)]['COMMENT'])[_0xe441cb(0x25a)](_0x13acdb=>_0x13acdb['rangeId']))!=null?_0x4eb2df:[],_0x592bb7=JSON[_0xe441cb(0x1f3)](_0x3334b2),_0x39c818=(await this['_sessionService'][_0xe441cb(0x25e)](_0x434b86))[_0xe441cb(0x227)]();if(_0x4f69fc){const _0x62c99e={'memberId':_0x39c818,'unitId':_0x434b86,'content':_0x592bb7,'mention':_0x409d32,'threadId':_0x548048},_0x33ad6b=(await this['_httpService'][_0xe441cb(0x226)](_0xe441cb(0x210)+_0x434b86+'/reply',{'body':_0x62c99e}))['body'][_0xe441cb(0x23b)];return{..._0x291788,'id':_0x33ad6b[_0xe441cb(0x265)],'dT':c[_0xe441cb(0x1fb)](+_0x33ad6b[_0xe441cb(0x201)])[_0xe441cb(0x20d)](_0xe441cb(0x24e)),'personId':_0x33ad6b[_0xe441cb(0x200)]};}else{const _0x4d491b={'memberId':_0x39c818,'unitId':_0x434b86,'content':_0x592bb7,'mention':_0x409d32},_0x25b1d6=await this['_httpService'][_0xe441cb(0x226)]('/universer-api/comment/unit/'+_0x434b86+'/add',{'body':_0x4d491b});return J(_0x25b1d6['body'][_0xe441cb(0x248)],_0x291788);}}async[_0x23f222(0x255)](_0x5daa8e){const _0x357736=_0x23f222;var _0x5de41f,_0x4273a5;const {text:_0xde9737,unitId:_0x3f971c}=_0x5daa8e,_0x1ad2b9=(_0x4273a5=(_0x5de41f=_0xde9737[_0x357736(0x220)])==null?void 0x0:_0x5de41f['filter'](_0x3f269c=>_0x3f269c[_0x357736(0x21a)]===c[_0x357736(0x228)]['COMMENT'])[_0x357736(0x25a)](_0x59163b=>_0x59163b[_0x357736(0x268)]))!=null?_0x4273a5:[],_0x2c63b1=JSON[_0x357736(0x1f3)](_0xde9737),_0x117a04=_0x5daa8e[_0x357736(0x20f)],_0x5827db=_0x5daa8e['id'],_0x3cb843={'memberId':(await this[_0x357736(0x24c)][_0x357736(0x25e)](_0x3f971c))[_0x357736(0x227)](),'unitId':_0x3f971c,'threadId':_0x117a04,'mention':_0x1ad2b9,'content':_0x2c63b1,'replyId':_0x5827db},_0x406876=await this[_0x357736(0x1fa)]['post']('/universer-api/comment/unit/'+_0x3f971c+_0x357736(0x20e),{'body':_0x3cb843});return!_0x406876[_0x357736(0x21e)][_0x357736(0x1f0)]||_0x406876[_0x357736(0x21e)][_0x357736(0x1f0)]['code']===0x1;}async['resolveComment'](_0x1850c2){const _0x5c1300=_0x23f222,{unitId:_0x30ddcc}=_0x1850c2,_0xa3325c=_0x1850c2['threadId'],_0x5502d0={'memberId':this[_0x5c1300(0x22e)][_0x5c1300(0x1fc)]()['userID'],'unitId':_0x30ddcc,'threadId':_0xa3325c,'solved':_0x1850c2[_0x5c1300(0x219)]?v[_0x5c1300(0x231)]:v[_0x5c1300(0x263)]},_0x3932a2=await this[_0x5c1300(0x1fa)][_0x5c1300(0x226)](_0x5c1300(0x210)+_0x30ddcc+_0x5c1300(0x230),{'body':_0x5502d0});return!_0x3932a2[_0x5c1300(0x21e)]['error']||_0x3932a2['body'][_0x5c1300(0x1f0)][_0x5c1300(0x214)]===0x1;}async[_0x23f222(0x24f)](_0x46b2f6,_0x39bdac,_0x2ff7ba,_0x4485ed){const _0x52c123=_0x23f222,_0x5a34e3={'memberId':(await this[_0x52c123(0x24c)]['requireSession'](_0x46b2f6))['getMemberID'](),'threadId':_0x2ff7ba,'replyId':_0x4485ed,'unitId':_0x46b2f6},_0x10b26a=await this[_0x52c123(0x1fa)][_0x52c123(0x226)](_0x52c123(0x210)+_0x46b2f6+_0x52c123(0x206),{'body':_0x5a34e3});return!_0x10b26a['body'][_0x52c123(0x1f0)]||_0x10b26a['body'][_0x52c123(0x1f0)][_0x52c123(0x214)]===0x1;}async[_0x23f222(0x224)](_0x2c18b0,_0x47e956,_0x51c00f){const _0x5dd094=_0x23f222,_0x16578c={'unitId':_0x2c18b0,'threadId':_0x51c00f},_0x156eda=await this['_httpService']['post'](_0x5dd094(0x210)+_0x2c18b0+'/list',{'body':_0x16578c}),_0x25967b=_0x51c00f[_0x5dd094(0x25a)](_0x4765b5=>F(_0x156eda[_0x5dd094(0x21e)][_0x5dd094(0x243)][_0x4765b5],_0x2c18b0,_0x47e956))['filter'](Boolean);return Object[_0x5dd094(0x26a)](_0x156eda[_0x5dd094(0x21e)][_0x5dd094(0x229)])[_0x5dd094(0x236)](_0x4a470e=>{const _0x1f26f2=_0x5dd094;this['_userService'][_0x1f26f2(0x260)](_0x4a470e);}),_0x25967b;}[_0x23f222(0x23c)](_0x17e88b){const _0x336d31=_0x23f222;return{'id':_0x17e88b['id'],'threadId':_0x17e88b[_0x336d31(0x20f)],'ref':_0x17e88b[_0x336d31(0x202)]};}};f=H([p(0x0,c[_0x23f222(0x221)](M['HTTPService'])),p(0x1,c[_0x23f222(0x221)](c[_0x23f222(0x20a)])),p(0x2,c['Inject'](C[_0x23f222(0x25f)])),p(0x3,c[_0x23f222(0x221)](c[_0x23f222(0x209)]))],f);var L=Object[_0x23f222(0x25d)],Z=Object[_0x23f222(0x216)],W=(_0x262176,_0x86096f,_0x59b3ba,_0x1d61cb)=>{const _0x1aac28=_0x23f222;for(var _0x5391d9=_0x1d61cb>0x1?void 0x0:_0x1d61cb?Z(_0x86096f,_0x59b3ba):_0x86096f,_0x1a9d36=_0x262176[_0x1aac28(0x1f1)]-0x1,_0x5ac0c9;_0x1a9d36>=0x0;_0x1a9d36--)(_0x5ac0c9=_0x262176[_0x1a9d36])&&(_0x5391d9=(_0x1d61cb?_0x5ac0c9(_0x86096f,_0x59b3ba,_0x5391d9):_0x5ac0c9(_0x5391d9))||_0x5391d9);return _0x1d61cb&&_0x5391d9&&L(_0x86096f,_0x59b3ba,_0x5391d9),_0x5391d9;},O=(_0x1f7cb1,_0x91601)=>(_0x362750,_0x5dd07a)=>_0x91601(_0x362750,_0x5dd07a,_0x1f7cb1);let b=class extends c[_0x23f222(0x239)]{constructor(_0x48cba0,_0x241c41){const _0x1e8da2=_0x23f222;super(),this['_threadCommentDataSourceService']=_0x48cba0,this[_0x1e8da2(0x24b)]=_0x241c41,this[_0x1e8da2(0x267)]();}[_0x23f222(0x267)](){const _0x575531=_0x23f222;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x575531(0x262)]['syncUpdateMutationToColla']=!0x1;}};b=W([O(0x0,P[_0x23f222(0x1f7)]),O(0x1,c[_0x23f222(0x221)](f))],b);var j=Object[_0x23f222(0x25d)],B=Object['getOwnPropertyDescriptor'],K=(_0x3fb40d,_0x5cc5f2,_0x1be52b)=>_0x5cc5f2 in _0x3fb40d?j(_0x3fb40d,_0x5cc5f2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1be52b}):_0x3fb40d[_0x5cc5f2]=_0x1be52b,V=(_0x26f67c,_0x258045,_0x5bbefd,_0x4d9542)=>{const _0x22d2d6=_0x23f222;for(var _0x426f37=_0x4d9542>0x1?void 0x0:_0x4d9542?B(_0x258045,_0x5bbefd):_0x258045,_0x12e2fa=_0x26f67c[_0x22d2d6(0x1f1)]-0x1,_0x581590;_0x12e2fa>=0x0;_0x12e2fa--)(_0x581590=_0x26f67c[_0x12e2fa])&&(_0x426f37=(_0x4d9542?_0x581590(_0x258045,_0x5bbefd,_0x426f37):_0x581590(_0x426f37))||_0x426f37);return _0x4d9542&&_0x426f37&&j(_0x258045,_0x5bbefd,_0x426f37),_0x426f37;},y=(_0x137fab,_0x546017)=>(_0x4d3d93,_0x37afb1)=>_0x546017(_0x4d3d93,_0x37afb1,_0x137fab),N=(_0x2c85e1,_0x1227a1,_0x35d17d)=>K(_0x2c85e1,typeof _0x1227a1!=_0x23f222(0x240)?_0x1227a1+'':_0x1227a1,_0x35d17d);exports[_0x23f222(0x1f2)]=class extends c[_0x23f222(0x205)]{constructor(_0x565d39=D,_0x33b868,_0x19ac59){const _0x39beb2=_0x23f222;super(),this[_0x39beb2(0x22d)]=_0x565d39,this[_0x39beb2(0x23d)]=_0x33b868,this[_0x39beb2(0x251)]=_0x19ac59;const {..._0x2034c5}=c['merge']({},D,this[_0x39beb2(0x22d)]);this['_configService']['setConfig'](x,_0x2034c5);}[_0x23f222(0x23f)](){const _0x2100fe=_0x23f222;[[f],[b],[S]][_0x2100fe(0x236)](_0x4ee298=>{const _0x5e4302=_0x2100fe;this['_injector'][_0x5e4302(0x203)](_0x4ee298);});}['onReady'](){const _0x189727=_0x23f222;this[_0x189727(0x23d)][_0x189727(0x1fe)](b),this[_0x189727(0x23d)][_0x189727(0x1fe)](S);}},N(exports[_0x23f222(0x1f2)],_0x23f222(0x252),R),N(exports[_0x23f222(0x1f2)],_0x23f222(0x1f9),c[_0x23f222(0x218)]['UNIVER_UNKNOWN']),exports[_0x23f222(0x1f2)]=V([c[_0x23f222(0x1ff)](w['UniverThreadCommentUIPlugin'],C['UniverCollaborationClientPlugin'],T[_0x23f222(0x237)]),y(0x1,c[_0x23f222(0x221)](c['Injector'])),y(0x2,c[_0x23f222(0x258)])],exports[_0x23f222(0x1f2)]);
|
|
1
|
+
'use strict';const _0xfec871=_0x5f38;(function(_0x1120f3,_0x5488ea){const _0x56da6e=_0x5f38,_0x1f1b1d=_0x1120f3();while(!![]){try{const _0x428aa9=parseInt(_0x56da6e(0x1ed))/0x1+-parseInt(_0x56da6e(0x1dc))/0x2+parseInt(_0x56da6e(0x1bd))/0x3+-parseInt(_0x56da6e(0x1ad))/0x4*(-parseInt(_0x56da6e(0x196))/0x5)+parseInt(_0x56da6e(0x178))/0x6+parseInt(_0x56da6e(0x1a7))/0x7+-parseInt(_0x56da6e(0x189))/0x8;if(_0x428aa9===_0x5488ea)break;else _0x1f1b1d['push'](_0x1f1b1d['shift']());}catch(_0x5d46c5){_0x1f1b1d['push'](_0x1f1b1d['shift']());}}}(_0x414a,0xba694));Object['defineProperty'](exports,Symbol[_0xfec871(0x1e6)],{'value':_0xfec871(0x17b)});const C=require('@univerjs-pro/collaboration-client'),T=require(_0xfec871(0x1bc)),c=require('@univerjs/core'),w=require(_0xfec871(0x1d1)),P=require(_0xfec871(0x185)),U=require(_0xfec871(0x1de)),M=require(_0xfec871(0x1a5)),R=_0xfec871(0x1e5);var v=(_0x40346c=>(_0x40346c[_0x40346c['OpenOrReOpen']=0x0]=_0xfec871(0x17e),_0x40346c[_0x40346c[_0xfec871(0x1a6)]=0x1]='Solved',_0x40346c[_0x40346c[_0xfec871(0x18d)]=-0x1]='UNRECOGNIZED',_0x40346c))(v||{}),I=(_0x152084=>(_0x152084[_0x152084[_0xfec871(0x18c)]=0x0]=_0xfec871(0x18c),_0x152084[_0x152084[_0xfec871(0x1cb)]=0x1]='Add',_0x152084[_0x152084[_0xfec871(0x1b3)]=0x2]=_0xfec871(0x1b3),_0x152084[_0x152084['Edit']=0x3]=_0xfec871(0x195),_0x152084[_0x152084[_0xfec871(0x179)]=0x4]=_0xfec871(0x179),_0x152084[_0x152084[_0xfec871(0x1a4)]=0x5]=_0xfec871(0x1a4),_0x152084[_0x152084[_0xfec871(0x18d)]=-0x1]=_0xfec871(0x18d),_0x152084))(I||{});const g=_0x32e03b=>c[_0xfec871(0x1af)](new Date(+_0x32e03b))[_0xfec871(0x1c5)](_0xfec871(0x198)),$=async(_0x356af6,_0xf5379a)=>{const _0x3d1b8e=_0xfec871,_0x17ce5a=_0x356af6[_0x3d1b8e(0x182)](c[_0x3d1b8e(0x191)]),_0x566594=_0x356af6[_0x3d1b8e(0x182)](M['HTTPService']);_0xf5379a[_0x3d1b8e(0x1ab)](_0x56d77c=>{const _0x5f0522=_0x3d1b8e;_0x17ce5a[_0x5f0522(0x17f)](_0x56d77c)&&_0xf5379a[_0x5f0522(0x197)](_0x56d77c);}),_0xf5379a['size']&&(await _0x566594[_0x3d1b8e(0x182)](_0x3d1b8e(0x19f),{'params':{'userIDs':[..._0xf5379a]}}))['body'][_0x3d1b8e(0x176)][_0x3d1b8e(0x1ab)](_0x2f80c8=>{const _0x2271ad=_0x3d1b8e;_0x2f80c8&&_0x17ce5a[_0x2271ad(0x1ea)](_0x2f80c8);});};var E=Object['defineProperty'],q=Object[_0xfec871(0x1b6)],A=(_0x52910d,_0x215f3a,_0x32568b,_0x319f53)=>{const _0x7ac14e=_0xfec871;for(var _0xf5a7d1=_0x319f53>0x1?void 0x0:_0x319f53?q(_0x215f3a,_0x32568b):_0x215f3a,_0x502a59=_0x52910d[_0x7ac14e(0x1db)]-0x1,_0x55ad9e;_0x502a59>=0x0;_0x502a59--)(_0x55ad9e=_0x52910d[_0x502a59])&&(_0xf5a7d1=(_0x319f53?_0x55ad9e(_0x215f3a,_0x32568b,_0xf5a7d1):_0x55ad9e(_0xf5a7d1))||_0xf5a7d1);return _0x319f53&&_0xf5a7d1&&E(_0x215f3a,_0x32568b,_0xf5a7d1),_0xf5a7d1;},_=(_0x263681,_0x2b1f4b)=>(_0x271df0,_0x42b611)=>_0x2b1f4b(_0x271df0,_0x42b611,_0x263681);let S=class extends c['Disposable']{constructor(_0x588540,_0x152046,_0x409d9f,_0x11d210){const _0x360e13=_0xfec871;super(),this[_0x360e13(0x1a0)]=_0x588540,this[_0x360e13(0x1ac)]=_0x152046,this[_0x360e13(0x1d6)]=_0x409d9f,this[_0x360e13(0x188)]=_0x11d210,this['_init'](),this[_0x360e13(0x19c)]();}[_0xfec871(0x19c)](){const _0x1bfe51=_0xfec871;this[_0x1bfe51(0x1e8)](this[_0x1bfe51(0x1ac)]['commentUpdate$'][_0x1bfe51(0x19e)](U[_0x1bfe51(0x1b2)](0x10))[_0x1bfe51(0x1da)](_0x584afa=>{const _0x57d718=_0x1bfe51,_0x55a758=new Set();_0x584afa[_0x57d718(0x1ab)](_0x307f51=>{const _0x21cff4=_0x57d718;switch(_0x307f51[_0x21cff4(0x1eb)]){case _0x21cff4(0x1ae):{const _0x158d31=_0x307f51[_0x21cff4(0x18f)][_0x21cff4(0x1a2)];_0x55a758[_0x21cff4(0x1ae)](_0x158d31);break;}}}),$(this[_0x57d718(0x188)],_0x55a758);}));}[_0xfec871(0x1d7)](){const _0x584038=_0xfec871;this['disposeWithMe'](this[_0x584038(0x1a0)][_0x584038(0x1df)][_0x584038(0x1da)](async _0x3905d5=>{const _0x301bf8=_0x584038;var _0x395d83,_0x5962bf,_0x572fc4,_0x4833cd;const _0x118349=(_0x395d83=this[_0x301bf8(0x1ac)]['getUnit'](_0x3905d5[_0x301bf8(0x1b0)])[_0x301bf8(0x175)](_0x50d592=>_0x50d592['threadId']===_0x3905d5['threadId']))==null?void 0x0:_0x395d83[_0x301bf8(0x1b1)];if(!_0x118349)return;const {unitId:_0x4cacd1,subUnitId:_0x38793f}=_0x118349;switch(_0x3905d5[_0x301bf8(0x1a3)]&&this['_userService'][_0x301bf8(0x1ea)](_0x3905d5[_0x301bf8(0x1a3)]),_0x3905d5[_0x301bf8(0x1eb)]){case I[_0x301bf8(0x1cb)]:break;case I[_0x301bf8(0x1b3)]:{this[_0x301bf8(0x1ac)][_0x301bf8(0x1a9)](_0x4cacd1,_0x38793f,{'unitId':_0x4cacd1,'subUnitId':_0x38793f,'ref':'','id':_0x3905d5[_0x301bf8(0x187)],'dT':g(+_0x3905d5[_0x301bf8(0x1be)]),'threadId':_0x3905d5['threadId'],'personId':(_0x572fc4=(_0x5962bf=_0x3905d5[_0x301bf8(0x1a3)])==null?void 0x0:_0x5962bf['userID'])!=null?_0x572fc4:_0x3905d5[_0x301bf8(0x1aa)],'text':JSON[_0x301bf8(0x1c2)](_0x3905d5[_0x301bf8(0x18b)]),'parentId':_0x118349['id']});break;}case I[_0x301bf8(0x179)]:{const _0x489967=this[_0x301bf8(0x1ac)]['getComment'](_0x4cacd1,_0x38793f,_0x3905d5['replyId']);_0x489967&&_0x489967[_0x301bf8(0x1d2)]&&this[_0x301bf8(0x1ac)][_0x301bf8(0x186)](_0x4cacd1,_0x38793f,_0x3905d5['replyId']);break;}case I['Edit']:{this['_threadCommentModel'][_0x301bf8(0x18e)](_0x4cacd1,_0x38793f,{'commentId':_0x3905d5['replyId'],'text':JSON['parse'](_0x3905d5[_0x301bf8(0x18b)])});break;}case I['Solve']:{const _0x50b0d3=(_0x4833cd=this[_0x301bf8(0x1ac)][_0x301bf8(0x1c3)](_0x3905d5['unitId'])[_0x301bf8(0x175)](_0x11fe41=>_0x11fe41[_0x301bf8(0x193)]===_0x3905d5[_0x301bf8(0x193)]))==null?void 0x0:_0x4833cd[_0x301bf8(0x1b1)];_0x50b0d3&&this[_0x301bf8(0x1ac)][_0x301bf8(0x1e3)](_0x4cacd1,_0x38793f,_0x50b0d3['id'],_0x3905d5['solved']===v[_0x301bf8(0x1a6)]);break;}}}));}};S=A([_(0x0,c['Inject'](C[_0xfec871(0x184)])),_(0x1,c['Inject'](P[_0xfec871(0x1bf)])),_(0x2,c[_0xfec871(0x1b4)](c['UserManagerService'])),_(0x3,c[_0xfec871(0x1b4)](c['Injector']))],S);const x=_0xfec871(0x199),D={};var Y=Object[_0xfec871(0x1cd)],G=Object[_0xfec871(0x1b6)],H=(_0x5a4143,_0x391494,_0x3afc00,_0x3cba7d)=>{for(var _0x3b2b7b=_0x3cba7d>0x1?void 0x0:_0x3cba7d?G(_0x391494,_0x3afc00):_0x391494,_0x3c73f0=_0x5a4143['length']-0x1,_0x5e6b4d;_0x3c73f0>=0x0;_0x3c73f0--)(_0x5e6b4d=_0x5a4143[_0x3c73f0])&&(_0x3b2b7b=(_0x3cba7d?_0x5e6b4d(_0x391494,_0x3afc00,_0x3b2b7b):_0x5e6b4d(_0x3b2b7b))||_0x3b2b7b);return _0x3cba7d&&_0x3b2b7b&&Y(_0x391494,_0x3afc00,_0x3b2b7b),_0x3b2b7b;},p=(_0x1420e5,_0x57054d)=>(_0x2bddcb,_0x4741b1)=>_0x57054d(_0x2bddcb,_0x4741b1,_0x1420e5);function _0x414a(){const _0x54b82e=['syncUpdateMutationToColla','UniverInstanceType','subscribe','length','844800enJCdE','HTTPService','rxjs','commentUpdate$','pluginName','UniverCollaborationClientPlugin','_sessionService','resolveComment','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','toStringTag','_httpService','disposeWithMe','/list','addUser','type','saveCommentToSnapshot','993204SgKiPl','rangeId','dataSource','CustomRangeType','find','users','UniverLicensePlugin','4111134dkOPLH','Delete','/edit','Module','comment','filter','OpenOrReOpen','getUser','_threadCommentDataSource','IConfigService','get','comments','CommentService','@univerjs/thread-comment','deleteComment','replyId','_injector','25479992ZtSskQ','replies','content','Unknown','UNRECOGNIZED','updateComment','payload','_configService','UserManagerService','/universer-api/comment/unit/','threadId','/reply','Edit','5oRIXQo','delete','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','onReady','UniverThreadCommentUIPlugin','_initUserSync','requireSession','pipe','/universer-api/user/list','_commentService','Disposable','personId','user','Solve','@univerjs/network','Solved','7444262gkfkQK','ref','addComment','userId','forEach','_threadCommentModel','5539652tILcdD','add','dayjs','unitId','root','bufferTime','Reply','Inject','error','getOwnPropertyDescriptor','_initDataSource','/delete','COMMENT','DependentOn','reply','@univerjs-pro/license','732501gdBUfr','createTimestamp','ThreadCommentModel','getMemberID','/add','parse','getUnit','UniverThreadCommentDataSourcePlugin','format','values','getCurrentUser','_config','map','/solved','Add','body','defineProperty','resolved','code','Injector','@univerjs/thread-comment-ui','parentId','merge','customRanges','post','_userService','_init'];_0x414a=function(){return _0x54b82e;};return _0x414a();}function J(_0x5e9434,_0x2da724){const _0x581ca4=_0xfec871,_0x3f8e51=_0x5e9434[_0x581ca4(0x18a)][0x0];return{..._0x2da724,'id':_0x3f8e51[_0x581ca4(0x187)],'resolved':_0x5e9434['solved']===0x1,'dT':g(_0x3f8e51[_0x581ca4(0x1be)]),'personId':_0x3f8e51['userId'],'threadId':_0x3f8e51[_0x581ca4(0x193)]};}function F(_0x3bc60a,_0x5bd96d,_0x44d3a2){const _0x1b8f1e=_0xfec871;var _0x179daf,_0x32d7de;if(((_0x32d7de=(_0x179daf=_0x3bc60a==null?void 0x0:_0x3bc60a[_0x1b8f1e(0x18a)])==null?void 0x0:_0x179daf['length'])!=null?_0x32d7de:0x0)>0x0){const _0xbd29ff=(_0x31b8f4,_0x47773f)=>({'id':_0x31b8f4[_0x1b8f1e(0x187)],'threadId':_0x31b8f4['threadId'],'dT':g(_0x31b8f4['createTimestamp']),'personId':_0x31b8f4['userId'],'resolved':_0x3bc60a['solved']===v[_0x1b8f1e(0x1a6)],'unitId':_0x5bd96d,'subUnitId':_0x44d3a2,'text':JSON[_0x1b8f1e(0x1c2)](_0x31b8f4[_0x1b8f1e(0x18b)]),'parentId':_0x47773f}),_0x863bba=_0xbd29ff(_0x3bc60a[_0x1b8f1e(0x18a)][0x0]);return{..._0x863bba,'children':_0x3bc60a[_0x1b8f1e(0x18a)]['slice'](0x1)[_0x1b8f1e(0x1c9)](_0x23d87c=>_0xbd29ff(_0x23d87c,_0x863bba['id']))};}return null;}let f=class{constructor(_0x1f348c,_0x7a1b34,_0x51b6a4,_0xe12000){const _0xdd4990=_0xfec871;this['_httpService']=_0x1f348c,this[_0xdd4990(0x1d6)]=_0x7a1b34,this[_0xdd4990(0x1e2)]=_0x51b6a4,this['_injector']=_0xe12000;}async[_0xfec871(0x1a9)](_0x56d7f3){const _0x5eede8=_0xfec871;var _0x571e1f,_0x41a6f6;const {parentId:_0x2325cc,unitId:_0x5b4ffb,text:_0x1f70f1,threadId:_0x42532e}=_0x56d7f3,_0x4db341=(_0x41a6f6=(_0x571e1f=_0x1f70f1[_0x5eede8(0x1d4)])==null?void 0x0:_0x571e1f[_0x5eede8(0x17d)](_0x420fc7=>_0x420fc7['rangeType']===c[_0x5eede8(0x174)][_0x5eede8(0x1b9)])[_0x5eede8(0x1c9)](_0xc1da45=>_0xc1da45[_0x5eede8(0x172)]))!=null?_0x41a6f6:[],_0x510ef9=JSON['stringify'](_0x1f70f1),_0x515250=(await this['_sessionService']['requireSession'](_0x5b4ffb))[_0x5eede8(0x1c0)]();if(_0x2325cc){const _0x4d1cca={'memberId':_0x515250,'unitId':_0x5b4ffb,'content':_0x510ef9,'mention':_0x4db341,'threadId':_0x42532e},_0x36e3d5=(await this['_httpService'][_0x5eede8(0x1d5)](_0x5eede8(0x192)+_0x5b4ffb+_0x5eede8(0x194),{'body':_0x4d1cca}))['body'][_0x5eede8(0x1bb)];return{..._0x56d7f3,'id':_0x36e3d5[_0x5eede8(0x187)],'dT':c[_0x5eede8(0x1af)](+_0x36e3d5[_0x5eede8(0x1be)])[_0x5eede8(0x1c5)](_0x5eede8(0x198)),'personId':_0x36e3d5[_0x5eede8(0x1aa)]};}else{const _0xde8100={'memberId':_0x515250,'unitId':_0x5b4ffb,'content':_0x510ef9,'mention':_0x4db341},_0x40b1b1=await this[_0x5eede8(0x1e7)][_0x5eede8(0x1d5)](_0x5eede8(0x192)+_0x5b4ffb+_0x5eede8(0x1c1),{'body':_0xde8100});return J(_0x40b1b1['body'][_0x5eede8(0x17c)],_0x56d7f3);}}async[_0xfec871(0x18e)](_0x2d9ad0){const _0x5a96a0=_0xfec871;var _0x234269,_0x36575a;const {text:_0x577ae3,unitId:_0x120ac3}=_0x2d9ad0,_0x27ffe5=(_0x36575a=(_0x234269=_0x577ae3[_0x5a96a0(0x1d4)])==null?void 0x0:_0x234269[_0x5a96a0(0x17d)](_0x1b5032=>_0x1b5032['rangeType']===c[_0x5a96a0(0x174)][_0x5a96a0(0x1b9)])[_0x5a96a0(0x1c9)](_0x450925=>_0x450925['rangeId']))!=null?_0x36575a:[],_0x2c25a5=JSON['stringify'](_0x577ae3),_0x202d56=_0x2d9ad0['threadId'],_0x411af3=_0x2d9ad0['id'],_0x59a10c={'memberId':(await this[_0x5a96a0(0x1e2)]['requireSession'](_0x120ac3))[_0x5a96a0(0x1c0)](),'unitId':_0x120ac3,'threadId':_0x202d56,'mention':_0x27ffe5,'content':_0x2c25a5,'replyId':_0x411af3},_0x27f449=await this[_0x5a96a0(0x1e7)]['post'](_0x5a96a0(0x192)+_0x120ac3+_0x5a96a0(0x17a),{'body':_0x59a10c});return!_0x27f449[_0x5a96a0(0x1cc)][_0x5a96a0(0x1b5)]||_0x27f449[_0x5a96a0(0x1cc)][_0x5a96a0(0x1b5)][_0x5a96a0(0x1cf)]===0x1;}async[_0xfec871(0x1e3)](_0x5b43f){const _0x4cc180=_0xfec871,{unitId:_0x1db9ed}=_0x5b43f,_0x2e3b4e=_0x5b43f[_0x4cc180(0x193)],_0x2656f2={'memberId':this[_0x4cc180(0x1d6)][_0x4cc180(0x1c7)]()['userID'],'unitId':_0x1db9ed,'threadId':_0x2e3b4e,'solved':_0x5b43f[_0x4cc180(0x1ce)]?v['Solved']:v['OpenOrReOpen']},_0x3facbf=await this[_0x4cc180(0x1e7)][_0x4cc180(0x1d5)](_0x4cc180(0x192)+_0x1db9ed+_0x4cc180(0x1ca),{'body':_0x2656f2});return!_0x3facbf['body'][_0x4cc180(0x1b5)]||_0x3facbf[_0x4cc180(0x1cc)][_0x4cc180(0x1b5)][_0x4cc180(0x1cf)]===0x1;}async[_0xfec871(0x186)](_0x577091,_0x3f3237,_0xb6c672,_0xba6e94){const _0x36acb1=_0xfec871,_0x5e4459={'memberId':(await this[_0x36acb1(0x1e2)][_0x36acb1(0x19d)](_0x577091))[_0x36acb1(0x1c0)](),'threadId':_0xb6c672,'replyId':_0xba6e94,'unitId':_0x577091},_0x3ef597=await this['_httpService']['post'](_0x36acb1(0x192)+_0x577091+_0x36acb1(0x1b8),{'body':_0x5e4459});return!_0x3ef597[_0x36acb1(0x1cc)][_0x36acb1(0x1b5)]||_0x3ef597[_0x36acb1(0x1cc)][_0x36acb1(0x1b5)][_0x36acb1(0x1cf)]===0x1;}async['listComments'](_0x3d9384,_0x2bdb38,_0x3e406a){const _0xd7bee7=_0xfec871,_0x4b93e2={'unitId':_0x3d9384,'threadId':_0x3e406a},_0x2ff7e5=await this[_0xd7bee7(0x1e7)][_0xd7bee7(0x1d5)]('/universer-api/comment/unit/'+_0x3d9384+_0xd7bee7(0x1e9),{'body':_0x4b93e2}),_0x45db93=_0x3e406a[_0xd7bee7(0x1c9)](_0x9e051e=>F(_0x2ff7e5[_0xd7bee7(0x1cc)][_0xd7bee7(0x183)][_0x9e051e],_0x3d9384,_0x2bdb38))[_0xd7bee7(0x17d)](Boolean);return Object[_0xd7bee7(0x1c6)](_0x2ff7e5[_0xd7bee7(0x1cc)][_0xd7bee7(0x176)])['forEach'](_0x5b9b60=>{this['_userService']['addUser'](_0x5b9b60);}),_0x45db93;}[_0xfec871(0x1ec)](_0x1004d3){const _0x14fd75=_0xfec871;return{'id':_0x1004d3['id'],'threadId':_0x1004d3[_0x14fd75(0x193)],'ref':_0x1004d3[_0x14fd75(0x1a8)]};}};f=H([p(0x0,c[_0xfec871(0x1b4)](M[_0xfec871(0x1dd)])),p(0x1,c[_0xfec871(0x1b4)](c['UserManagerService'])),p(0x2,c[_0xfec871(0x1b4)](C['CollaborationSessionService'])),p(0x3,c[_0xfec871(0x1b4)](c[_0xfec871(0x1d0)]))],f);function _0x5f38(_0x27a6a6,_0x43234b){const _0x414afc=_0x414a();return _0x5f38=function(_0x5f3845,_0x444a9b){_0x5f3845=_0x5f3845-0x172;let _0x735538=_0x414afc[_0x5f3845];return _0x735538;},_0x5f38(_0x27a6a6,_0x43234b);}var L=Object[_0xfec871(0x1cd)],Z=Object[_0xfec871(0x1b6)],W=(_0x2fd8f3,_0x4d6658,_0x24b6f2,_0x113774)=>{for(var _0x11ee74=_0x113774>0x1?void 0x0:_0x113774?Z(_0x4d6658,_0x24b6f2):_0x4d6658,_0x336291=_0x2fd8f3['length']-0x1,_0x3366d0;_0x336291>=0x0;_0x336291--)(_0x3366d0=_0x2fd8f3[_0x336291])&&(_0x11ee74=(_0x113774?_0x3366d0(_0x4d6658,_0x24b6f2,_0x11ee74):_0x3366d0(_0x11ee74))||_0x11ee74);return _0x113774&&_0x11ee74&&L(_0x4d6658,_0x24b6f2,_0x11ee74),_0x11ee74;},O=(_0x76eb60,_0x2691cf)=>(_0x3efd7a,_0x110221)=>_0x2691cf(_0x3efd7a,_0x110221,_0x76eb60);let b=class extends c[_0xfec871(0x1a1)]{constructor(_0x5a8bf2,_0x45993e){const _0x3dec6d=_0xfec871;super(),this[_0x3dec6d(0x1e4)]=_0x5a8bf2,this[_0x3dec6d(0x180)]=_0x45993e,this[_0x3dec6d(0x1b7)]();}[_0xfec871(0x1b7)](){const _0x51da1f=_0xfec871;this[_0x51da1f(0x1e4)][_0x51da1f(0x173)]=this['_threadCommentDataSource'],this[_0x51da1f(0x1e4)][_0x51da1f(0x1d8)]=!0x1;}};b=W([O(0x0,P['IThreadCommentDataSourceService']),O(0x1,c[_0xfec871(0x1b4)](f))],b);var j=Object[_0xfec871(0x1cd)],B=Object[_0xfec871(0x1b6)],K=(_0x10b4bd,_0x2a34ac,_0xb82f4e)=>_0x2a34ac in _0x10b4bd?j(_0x10b4bd,_0x2a34ac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb82f4e}):_0x10b4bd[_0x2a34ac]=_0xb82f4e,V=(_0x4a4955,_0x23fffa,_0x31ab76,_0x5d0796)=>{const _0x1d40df=_0xfec871;for(var _0x54c823=_0x5d0796>0x1?void 0x0:_0x5d0796?B(_0x23fffa,_0x31ab76):_0x23fffa,_0x514e24=_0x4a4955[_0x1d40df(0x1db)]-0x1,_0x54672b;_0x514e24>=0x0;_0x514e24--)(_0x54672b=_0x4a4955[_0x514e24])&&(_0x54c823=(_0x5d0796?_0x54672b(_0x23fffa,_0x31ab76,_0x54c823):_0x54672b(_0x54c823))||_0x54c823);return _0x5d0796&&_0x54c823&&j(_0x23fffa,_0x31ab76,_0x54c823),_0x54c823;},y=(_0xff88a2,_0x13ab78)=>(_0x4e5f23,_0x12e19c)=>_0x13ab78(_0x4e5f23,_0x12e19c,_0xff88a2),N=(_0x207aca,_0x56d504,_0x2299e3)=>K(_0x207aca,typeof _0x56d504!='symbol'?_0x56d504+'':_0x56d504,_0x2299e3);exports[_0xfec871(0x1c4)]=class extends c['Plugin']{constructor(_0x4fc387=D,_0xab283d,_0x21171c){const _0x5b774e=_0xfec871;super(),this[_0x5b774e(0x1c8)]=_0x4fc387,this[_0x5b774e(0x188)]=_0xab283d,this[_0x5b774e(0x190)]=_0x21171c;const {..._0x8ba02a}=c[_0x5b774e(0x1d3)]({},D,this['_config']);this[_0x5b774e(0x190)]['setConfig'](x,_0x8ba02a);}['onStarting'](){const _0x3c6f54=_0xfec871;[[f],[b],[S]][_0x3c6f54(0x1ab)](_0x172f82=>{const _0x58c1ac=_0x3c6f54;this[_0x58c1ac(0x188)][_0x58c1ac(0x1ae)](_0x172f82);});}[_0xfec871(0x19a)](){const _0x34c0bc=_0xfec871;this[_0x34c0bc(0x188)][_0x34c0bc(0x182)](b),this[_0x34c0bc(0x188)][_0x34c0bc(0x182)](S);}},N(exports[_0xfec871(0x1c4)],_0xfec871(0x1e0),R),N(exports[_0xfec871(0x1c4)],_0xfec871(0x1eb),c[_0xfec871(0x1d9)]['UNIVER_UNKNOWN']),exports[_0xfec871(0x1c4)]=V([c[_0xfec871(0x1ba)](w[_0xfec871(0x19b)],C[_0xfec871(0x1e1)],T[_0xfec871(0x177)]),y(0x1,c[_0xfec871(0x1b4)](c[_0xfec871(0x1d0)])),y(0x2,c[_0xfec871(0x181)])],exports[_0xfec871(0x1c4)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x261e27=_0x5ae5;(function(_0x28069f,_0x170b09){const _0x43e99f=_0x5ae5,_0x43bd63=_0x28069f();while(!![]){try{const _0x38fbdd=-parseInt(_0x43e99f(0x1dc))/0x1+parseInt(_0x43e99f(0x1c3))/0x2*(-parseInt(_0x43e99f(0x1ff))/0x3)+-parseInt(_0x43e99f(0x209))/0x4+parseInt(_0x43e99f(0x1c1))/0x5*(parseInt(_0x43e99f(0x1bc))/0x6)+-parseInt(_0x43e99f(0x1ea))/0x7+parseInt(_0x43e99f(0x1fd))/0x8+parseInt(_0x43e99f(0x1eb))/0x9;if(_0x38fbdd===_0x170b09)break;else _0x43bd63['push'](_0x43bd63['shift']());}catch(_0x12d112){_0x43bd63['push'](_0x43bd63['shift']());}}}(_0x1df9,0xee287));import{CommentService as _0x214a9b,CollaborationSessionService as _0x530eba,UniverCollaborationClientPlugin as _0x541e65}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x47994c}from'@univerjs-pro/license';import{dayjs as _0x13f5be,UserManagerService as _0x5851a2,Inject as _0x3f6240,Injector as _0x1ccb8a,Disposable as _0x34dba8,CustomRangeType as _0x4bfc54,UniverInstanceType as _0x150667,DependentOn as _0x212ca6,Plugin as _0x248539,merge as _0x4ff709,IConfigService as _0x1a65e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x328c2c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x15862a,IThreadCommentDataSourceService as _0x370691}from'@univerjs/thread-comment';import{bufferTime as _0x18c6da}from'rxjs';import{HTTPService as _0x436005}from'@univerjs/network';const B='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _=(_0x119373=>(_0x119373[_0x119373[_0x261e27(0x1be)]=0x0]=_0x261e27(0x1be),_0x119373[_0x119373['Solved']=0x1]=_0x261e27(0x206),_0x119373[_0x119373['UNRECOGNIZED']=-0x1]=_0x261e27(0x1f4),_0x119373))(_||{}),p=(_0x5f4bf0=>(_0x5f4bf0[_0x5f4bf0[_0x261e27(0x1f6)]=0x0]=_0x261e27(0x1f6),_0x5f4bf0[_0x5f4bf0['Add']=0x1]=_0x261e27(0x20f),_0x5f4bf0[_0x5f4bf0['Reply']=0x2]=_0x261e27(0x1f2),_0x5f4bf0[_0x5f4bf0['Edit']=0x3]=_0x261e27(0x1c8),_0x5f4bf0[_0x5f4bf0[_0x261e27(0x200)]=0x4]=_0x261e27(0x200),_0x5f4bf0[_0x5f4bf0[_0x261e27(0x1da)]=0x5]='Solve',_0x5f4bf0[_0x5f4bf0[_0x261e27(0x1f4)]=-0x1]=_0x261e27(0x1f4),_0x5f4bf0))(p||{});const O=_0x35704f=>_0x13f5be(new Date(+_0x35704f))[_0x261e27(0x1c2)]('YYYY/MM/DD\x20HH:mm'),K=async(_0x462260,_0x2da3e7)=>{const _0xe56c3=_0x261e27,_0x48e4b0=_0x462260[_0xe56c3(0x1de)](_0x5851a2),_0x520cdd=_0x462260[_0xe56c3(0x1de)](_0x436005);_0x2da3e7[_0xe56c3(0x1bf)](_0xcd761b=>{const _0x13b4ea=_0xe56c3;_0x48e4b0[_0x13b4ea(0x203)](_0xcd761b)&&_0x2da3e7[_0x13b4ea(0x1c9)](_0xcd761b);}),_0x2da3e7[_0xe56c3(0x1c4)]&&(await _0x520cdd['get'](_0xe56c3(0x1d3),{'params':{'userIDs':[..._0x2da3e7]}}))[_0xe56c3(0x1d1)][_0xe56c3(0x1e1)]['forEach'](_0x56b83b=>{_0x56b83b&&_0x48e4b0['addUser'](_0x56b83b);});};var V=Object[_0x261e27(0x1fe)],z=Object[_0x261e27(0x1f8)],Q=(_0x3ed310,_0x1a5695,_0x1d572e,_0x55fee8)=>{for(var _0x312f3b=_0x55fee8>0x1?void 0x0:_0x55fee8?z(_0x1a5695,_0x1d572e):_0x1a5695,_0x102dd2=_0x3ed310['length']-0x1,_0x7dba8b;_0x102dd2>=0x0;_0x102dd2--)(_0x7dba8b=_0x3ed310[_0x102dd2])&&(_0x312f3b=(_0x55fee8?_0x7dba8b(_0x1a5695,_0x1d572e,_0x312f3b):_0x7dba8b(_0x312f3b))||_0x312f3b);return _0x55fee8&&_0x312f3b&&V(_0x1a5695,_0x1d572e,_0x312f3b),_0x312f3b;},v=(_0x322512,_0x15932d)=>(_0xcc88b3,_0x60ff4)=>_0x15932d(_0xcc88b3,_0x60ff4,_0x322512);let I=class extends _0x34dba8{constructor(_0x2fca3c,_0x14bc14,_0x53ad22,_0x1af711){const _0xa23af2=_0x261e27;super(),this['_commentService']=_0x2fca3c,this['_threadCommentModel']=_0x14bc14,this[_0xa23af2(0x1cd)]=_0x53ad22,this[_0xa23af2(0x212)]=_0x1af711,this['_init'](),this[_0xa23af2(0x1f0)]();}[_0x261e27(0x1f0)](){const _0x27fb17=_0x261e27;this[_0x27fb17(0x20b)](this['_threadCommentModel'][_0x27fb17(0x216)]['pipe'](_0x18c6da(0x10))['subscribe'](_0x39eef9=>{const _0x1debfd=_0x27fb17,_0x376710=new Set();_0x39eef9[_0x1debfd(0x1bf)](_0x5b75c8=>{const _0x43bf02=_0x1debfd;switch(_0x5b75c8['type']){case _0x43bf02(0x1ec):{const _0x269682=_0x5b75c8['payload'][_0x43bf02(0x1fb)];_0x376710[_0x43bf02(0x1ec)](_0x269682);break;}}}),K(this['_injector'],_0x376710);}));}['_init'](){const _0x1d3ee9=_0x261e27;this[_0x1d3ee9(0x20b)](this[_0x1d3ee9(0x1e7)][_0x1d3ee9(0x216)][_0x1d3ee9(0x215)](async _0x3d80c7=>{const _0x545c47=_0x1d3ee9;var _0x2ba4fc,_0x1cc097,_0xe509d8,_0x8692c2;const _0x189507=(_0x2ba4fc=this[_0x545c47(0x20a)]['getUnit'](_0x3d80c7[_0x545c47(0x20d)])[_0x545c47(0x1d8)](_0x463595=>_0x463595[_0x545c47(0x1df)]===_0x3d80c7[_0x545c47(0x1df)]))==null?void 0x0:_0x2ba4fc[_0x545c47(0x1c7)];if(!_0x189507)return;const {unitId:_0xaa40f4,subUnitId:_0x31a9cd}=_0x189507;switch(_0x3d80c7[_0x545c47(0x20e)]&&this['_userService'][_0x545c47(0x1e3)](_0x3d80c7['user']),_0x3d80c7[_0x545c47(0x1cf)]){case p[_0x545c47(0x20f)]:break;case p[_0x545c47(0x1f2)]:{this[_0x545c47(0x20a)][_0x545c47(0x1d7)](_0xaa40f4,_0x31a9cd,{'unitId':_0xaa40f4,'subUnitId':_0x31a9cd,'ref':'','id':_0x3d80c7[_0x545c47(0x1c0)],'dT':O(+_0x3d80c7[_0x545c47(0x1c6)]),'threadId':_0x3d80c7[_0x545c47(0x1df)],'personId':(_0xe509d8=(_0x1cc097=_0x3d80c7[_0x545c47(0x20e)])==null?void 0x0:_0x1cc097['userID'])!=null?_0xe509d8:_0x3d80c7['userId'],'text':JSON['parse'](_0x3d80c7[_0x545c47(0x205)]),'parentId':_0x189507['id']});break;}case p['Delete']:{const _0xa734e3=this[_0x545c47(0x20a)][_0x545c47(0x1e5)](_0xaa40f4,_0x31a9cd,_0x3d80c7[_0x545c47(0x1c0)]);_0xa734e3&&_0xa734e3[_0x545c47(0x208)]&&this[_0x545c47(0x20a)][_0x545c47(0x1f9)](_0xaa40f4,_0x31a9cd,_0x3d80c7[_0x545c47(0x1c0)]);break;}case p['Edit']:{this[_0x545c47(0x20a)][_0x545c47(0x211)](_0xaa40f4,_0x31a9cd,{'commentId':_0x3d80c7[_0x545c47(0x1c0)],'text':JSON[_0x545c47(0x1f3)](_0x3d80c7['content'])});break;}case p[_0x545c47(0x1da)]:{const _0x11c031=(_0x8692c2=this[_0x545c47(0x20a)][_0x545c47(0x1b7)](_0x3d80c7[_0x545c47(0x20d)])['find'](_0x5ab41f=>_0x5ab41f[_0x545c47(0x1df)]===_0x3d80c7['threadId']))==null?void 0x0:_0x8692c2[_0x545c47(0x1c7)];_0x11c031&&this['_threadCommentModel'][_0x545c47(0x1e2)](_0xaa40f4,_0x31a9cd,_0x11c031['id'],_0x3d80c7[_0x545c47(0x1bd)]===_[_0x545c47(0x206)]);break;}}}));}};I=Q([v(0x0,_0x3f6240(_0x214a9b)),v(0x1,_0x3f6240(_0x15862a)),v(0x2,_0x3f6240(_0x5851a2)),v(0x3,_0x3f6240(_0x1ccb8a))],I);const X=_0x261e27(0x1fc),P={};var k=Object[_0x261e27(0x1fe)],ee=Object['getOwnPropertyDescriptor'],re=(_0x1c9595,_0x12ae47,_0x205b56,_0xbb3cd3)=>{const _0x49cbeb=_0x261e27;for(var _0x5dd5f5=_0xbb3cd3>0x1?void 0x0:_0xbb3cd3?ee(_0x12ae47,_0x205b56):_0x12ae47,_0x5b2aad=_0x1c9595[_0x49cbeb(0x1d4)]-0x1,_0x46513f;_0x5b2aad>=0x0;_0x5b2aad--)(_0x46513f=_0x1c9595[_0x5b2aad])&&(_0x5dd5f5=(_0xbb3cd3?_0x46513f(_0x12ae47,_0x205b56,_0x5dd5f5):_0x46513f(_0x5dd5f5))||_0x5dd5f5);return _0xbb3cd3&&_0x5dd5f5&&k(_0x12ae47,_0x205b56,_0x5dd5f5),_0x5dd5f5;},f=(_0xa352e9,_0x26ec19)=>(_0x52eb01,_0x334819)=>_0x26ec19(_0x52eb01,_0x334819,_0xa352e9);function te(_0x554655,_0x3d69ca){const _0x5336de=_0x261e27,_0x141cda=_0x554655[_0x5336de(0x1ed)][0x0];return{..._0x3d69ca,'id':_0x141cda['replyId'],'resolved':_0x554655[_0x5336de(0x1bd)]===0x1,'dT':O(_0x141cda['createTimestamp']),'personId':_0x141cda[_0x5336de(0x1d2)],'threadId':_0x141cda['threadId']};}function se(_0x3d88e4,_0x1c94ba,_0x7d88cc){const _0x12462d=_0x261e27;var _0x44245e,_0x1e18c4;if(((_0x1e18c4=(_0x44245e=_0x3d88e4==null?void 0x0:_0x3d88e4[_0x12462d(0x1ed)])==null?void 0x0:_0x44245e[_0x12462d(0x1d4)])!=null?_0x1e18c4:0x0)>0x0){const _0x3f25f4=(_0xae3a43,_0x40f84f)=>({'id':_0xae3a43[_0x12462d(0x1c0)],'threadId':_0xae3a43[_0x12462d(0x1df)],'dT':O(_0xae3a43[_0x12462d(0x1c6)]),'personId':_0xae3a43[_0x12462d(0x1d2)],'resolved':_0x3d88e4[_0x12462d(0x1bd)]===_[_0x12462d(0x206)],'unitId':_0x1c94ba,'subUnitId':_0x7d88cc,'text':JSON[_0x12462d(0x1f3)](_0xae3a43[_0x12462d(0x205)]),'parentId':_0x40f84f}),_0x5489c2=_0x3f25f4(_0x3d88e4['replies'][0x0]);return{..._0x5489c2,'children':_0x3d88e4[_0x12462d(0x1ed)]['slice'](0x1)[_0x12462d(0x207)](_0x17c027=>_0x3f25f4(_0x17c027,_0x5489c2['id']))};}return null;}let S=class{constructor(_0x36aaad,_0x49e796,_0x1324bc,_0x2b05b9){const _0x479399=_0x261e27;this['_httpService']=_0x36aaad,this[_0x479399(0x1cd)]=_0x49e796,this[_0x479399(0x1e8)]=_0x1324bc,this[_0x479399(0x212)]=_0x2b05b9;}async[_0x261e27(0x1d7)](_0x34f383){const _0x35434a=_0x261e27;var _0xb4847e,_0x4cb071;const {parentId:_0x10bed9,unitId:_0x2d3d2a,text:_0x49d0f3,threadId:_0x5ddf98}=_0x34f383,_0xc0f122=(_0x4cb071=(_0xb4847e=_0x49d0f3[_0x35434a(0x1ce)])==null?void 0x0:_0xb4847e[_0x35434a(0x1b8)](_0x44ab66=>_0x44ab66['rangeType']===_0x4bfc54[_0x35434a(0x201)])[_0x35434a(0x207)](_0x120f4a=>_0x120f4a[_0x35434a(0x1ef)]))!=null?_0x4cb071:[],_0x432f22=JSON[_0x35434a(0x1cc)](_0x49d0f3),_0xe2307d=(await this[_0x35434a(0x1e8)][_0x35434a(0x1f7)](_0x2d3d2a))['getMemberID']();if(_0x10bed9){const _0x142d58={'memberId':_0xe2307d,'unitId':_0x2d3d2a,'content':_0x432f22,'mention':_0xc0f122,'threadId':_0x5ddf98},_0x4a165b=(await this[_0x35434a(0x1ba)][_0x35434a(0x1d9)](_0x35434a(0x1b9)+_0x2d3d2a+_0x35434a(0x204),{'body':_0x142d58}))['body'][_0x35434a(0x1f1)];return{..._0x34f383,'id':_0x4a165b[_0x35434a(0x1c0)],'dT':_0x13f5be(+_0x4a165b[_0x35434a(0x1c6)])[_0x35434a(0x1c2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4a165b[_0x35434a(0x1d2)]};}else{const _0x30704b={'memberId':_0xe2307d,'unitId':_0x2d3d2a,'content':_0x432f22,'mention':_0xc0f122},_0xe21ed0=await this['_httpService'][_0x35434a(0x1d9)](_0x35434a(0x1b9)+_0x2d3d2a+'/add',{'body':_0x30704b});return te(_0xe21ed0[_0x35434a(0x1d1)][_0x35434a(0x1e0)],_0x34f383);}}async['updateComment'](_0x3818d0){const _0x38d53d=_0x261e27;var _0x198a0e,_0x4918be;const {text:_0x5d6aa5,unitId:_0x41a555}=_0x3818d0,_0x5162b9=(_0x4918be=(_0x198a0e=_0x5d6aa5['customRanges'])==null?void 0x0:_0x198a0e[_0x38d53d(0x1b8)](_0x43be30=>_0x43be30[_0x38d53d(0x1b6)]===_0x4bfc54[_0x38d53d(0x201)])[_0x38d53d(0x207)](_0xfca7d3=>_0xfca7d3[_0x38d53d(0x1ef)]))!=null?_0x4918be:[],_0x47d493=JSON['stringify'](_0x5d6aa5),_0x279326=_0x3818d0[_0x38d53d(0x1df)],_0x3b9749=_0x3818d0['id'],_0x4f9a9c={'memberId':(await this['_sessionService']['requireSession'](_0x41a555))['getMemberID'](),'unitId':_0x41a555,'threadId':_0x279326,'mention':_0x5162b9,'content':_0x47d493,'replyId':_0x3b9749},_0x4ec280=await this[_0x38d53d(0x1ba)][_0x38d53d(0x1d9)](_0x38d53d(0x1b9)+_0x41a555+'/edit',{'body':_0x4f9a9c});return!_0x4ec280[_0x38d53d(0x1d1)]['error']||_0x4ec280['body'][_0x38d53d(0x1d5)][_0x38d53d(0x1ca)]===0x1;}async[_0x261e27(0x1e2)](_0x5952c9){const _0x564023=_0x261e27,{unitId:_0x26bcf1}=_0x5952c9,_0x4b8408=_0x5952c9[_0x564023(0x1df)],_0x2d679f={'memberId':this[_0x564023(0x1cd)]['getCurrentUser']()['userID'],'unitId':_0x26bcf1,'threadId':_0x4b8408,'solved':_0x5952c9[_0x564023(0x1e6)]?_[_0x564023(0x206)]:_[_0x564023(0x1be)]},_0x1eff10=await this[_0x564023(0x1ba)][_0x564023(0x1d9)](_0x564023(0x1b9)+_0x26bcf1+_0x564023(0x213),{'body':_0x2d679f});return!_0x1eff10[_0x564023(0x1d1)]['error']||_0x1eff10[_0x564023(0x1d1)][_0x564023(0x1d5)][_0x564023(0x1ca)]===0x1;}async[_0x261e27(0x1f9)](_0x2d7f3f,_0x42c594,_0x10f389,_0x26fa37){const _0x51dadf=_0x261e27,_0x50a15e={'memberId':(await this['_sessionService']['requireSession'](_0x2d7f3f))[_0x51dadf(0x1fa)](),'threadId':_0x10f389,'replyId':_0x26fa37,'unitId':_0x2d7f3f},_0x281e07=await this['_httpService'][_0x51dadf(0x1d9)](_0x51dadf(0x1b9)+_0x2d7f3f+'/delete',{'body':_0x50a15e});return!_0x281e07[_0x51dadf(0x1d1)][_0x51dadf(0x1d5)]||_0x281e07[_0x51dadf(0x1d1)][_0x51dadf(0x1d5)][_0x51dadf(0x1ca)]===0x1;}async[_0x261e27(0x202)](_0x39500e,_0x3548f8,_0x6e359e){const _0x1c3fcf=_0x261e27,_0x1abbda={'unitId':_0x39500e,'threadId':_0x6e359e},_0x55301f=await this[_0x1c3fcf(0x1ba)][_0x1c3fcf(0x1d9)](_0x1c3fcf(0x1b9)+_0x39500e+_0x1c3fcf(0x1ee),{'body':_0x1abbda}),_0xaf6729=_0x6e359e[_0x1c3fcf(0x207)](_0x31990f=>se(_0x55301f['body'][_0x1c3fcf(0x210)][_0x31990f],_0x39500e,_0x3548f8))['filter'](Boolean);return Object[_0x1c3fcf(0x1f5)](_0x55301f[_0x1c3fcf(0x1d1)][_0x1c3fcf(0x1e1)])[_0x1c3fcf(0x1bf)](_0x16435d=>{const _0x3c5a5e=_0x1c3fcf;this['_userService'][_0x3c5a5e(0x1e3)](_0x16435d);}),_0xaf6729;}['saveCommentToSnapshot'](_0x54db61){const _0x52cf28=_0x261e27;return{'id':_0x54db61['id'],'threadId':_0x54db61[_0x52cf28(0x1df)],'ref':_0x54db61['ref']};}};function _0x5ae5(_0x565684,_0x5f16e0){const _0x1df971=_0x1df9();return _0x5ae5=function(_0x5ae5ed,_0x1ddb88){_0x5ae5ed=_0x5ae5ed-0x1b5;let _0x55051e=_0x1df971[_0x5ae5ed];return _0x55051e;},_0x5ae5(_0x565684,_0x5f16e0);}function _0x1df9(){const _0x482137=['_commentService','_sessionService','syncUpdateMutationToColla','7188335tEnOCk','35670762hGKrHi','add','replies','/list','rangeId','_initUserSync','reply','Reply','parse','UNRECOGNIZED','values','Unknown','requireSession','getOwnPropertyDescriptor','deleteComment','getMemberID','personId','thread-comment-data-source.config','5117016UdgBMn','defineProperty','1734534gVKhSW','Delete','COMMENT','listComments','getUser','/reply','content','Solved','map','parentId','3244984kwsTgH','_threadCommentModel','disposeWithMe','_initDataSource','unitId','user','Add','comments','updateComment','_injector','/solved','_configService','subscribe','commentUpdate$','setConfig','rangeType','getUnit','filter','/universer-api/comment/unit/','_httpService','_config','5743902XMjdZG','solved','OpenOrReOpen','forEach','replyId','5lQldFr','format','4PTTkTm','size','onStarting','createTimestamp','root','Edit','delete','code','UNIVER_UNKNOWN','stringify','_userService','customRanges','type','pluginName','body','userId','/universer-api/user/list','length','error','_threadCommentDataSourceService','addComment','find','post','Solve','dataSource','1590360DCWUvn','_threadCommentDataSource','get','threadId','comment','users','resolveComment','addUser','onReady','getComment','resolved'];_0x1df9=function(){return _0x482137;};return _0x1df9();}S=re([f(0x0,_0x3f6240(_0x436005)),f(0x1,_0x3f6240(_0x5851a2)),f(0x2,_0x3f6240(_0x530eba)),f(0x3,_0x3f6240(_0x1ccb8a))],S);var oe=Object[_0x261e27(0x1fe)],ne=Object[_0x261e27(0x1f8)],ie=(_0x4b7345,_0x3e33a6,_0x54feb4,_0x2310a3)=>{for(var _0x58b801=_0x2310a3>0x1?void 0x0:_0x2310a3?ne(_0x3e33a6,_0x54feb4):_0x3e33a6,_0x2aba7a=_0x4b7345['length']-0x1,_0x3ad9c9;_0x2aba7a>=0x0;_0x2aba7a--)(_0x3ad9c9=_0x4b7345[_0x2aba7a])&&(_0x58b801=(_0x2310a3?_0x3ad9c9(_0x3e33a6,_0x54feb4,_0x58b801):_0x3ad9c9(_0x58b801))||_0x58b801);return _0x2310a3&&_0x58b801&&oe(_0x3e33a6,_0x54feb4,_0x58b801),_0x58b801;},M=(_0x50e543,_0x2dc905)=>(_0x15e699,_0x3b4303)=>_0x2dc905(_0x15e699,_0x3b4303,_0x50e543);let b=class extends _0x34dba8{constructor(_0x4c0e5a,_0x45f73c){const _0x17ba29=_0x261e27;super(),this['_threadCommentDataSourceService']=_0x4c0e5a,this['_threadCommentDataSource']=_0x45f73c,this[_0x17ba29(0x20c)]();}[_0x261e27(0x20c)](){const _0x3a3d1d=_0x261e27;this[_0x3a3d1d(0x1d6)][_0x3a3d1d(0x1db)]=this[_0x3a3d1d(0x1dd)],this[_0x3a3d1d(0x1d6)][_0x3a3d1d(0x1e9)]=!0x1;}};b=ie([M(0x0,_0x370691),M(0x1,_0x3f6240(S))],b);var $=Object[_0x261e27(0x1fe)],ce=Object[_0x261e27(0x1f8)],ae=(_0x4c79e9,_0x35e02d,_0x4a5d9d)=>_0x35e02d in _0x4c79e9?$(_0x4c79e9,_0x35e02d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4a5d9d}):_0x4c79e9[_0x35e02d]=_0x4a5d9d,de=(_0x1f75c0,_0x421fb0,_0x16f65e,_0x5a8253)=>{const _0x1b56dd=_0x261e27;for(var _0x375b1b=_0x5a8253>0x1?void 0x0:_0x5a8253?ce(_0x421fb0,_0x16f65e):_0x421fb0,_0x113551=_0x1f75c0[_0x1b56dd(0x1d4)]-0x1,_0x2401a9;_0x113551>=0x0;_0x113551--)(_0x2401a9=_0x1f75c0[_0x113551])&&(_0x375b1b=(_0x5a8253?_0x2401a9(_0x421fb0,_0x16f65e,_0x375b1b):_0x2401a9(_0x375b1b))||_0x375b1b);return _0x5a8253&&_0x375b1b&&$(_0x421fb0,_0x16f65e,_0x375b1b),_0x375b1b;},N=(_0x4226f7,_0x30fcf8)=>(_0x3d4f6b,_0x49f92d)=>_0x30fcf8(_0x3d4f6b,_0x49f92d,_0x4226f7),j=(_0x412fa7,_0x5785c2,_0x449334)=>ae(_0x412fa7,typeof _0x5785c2!='symbol'?_0x5785c2+'':_0x5785c2,_0x449334);let C=class extends _0x248539{constructor(_0x8b7fd6=P,_0x24c70c,_0x207a61){const _0x19a3e2=_0x261e27;super(),this[_0x19a3e2(0x1bb)]=_0x8b7fd6,this['_injector']=_0x24c70c,this[_0x19a3e2(0x214)]=_0x207a61;const {..._0x2a012d}=_0x4ff709({},P,this[_0x19a3e2(0x1bb)]);this[_0x19a3e2(0x214)][_0x19a3e2(0x1b5)](X,_0x2a012d);}[_0x261e27(0x1c5)](){const _0x3825d1=_0x261e27;[[S],[b],[I]][_0x3825d1(0x1bf)](_0x291470=>{const _0x238bc6=_0x3825d1;this[_0x238bc6(0x212)][_0x238bc6(0x1ec)](_0x291470);});}[_0x261e27(0x1e4)](){const _0xfe78f4=_0x261e27;this[_0xfe78f4(0x212)][_0xfe78f4(0x1de)](b),this[_0xfe78f4(0x212)]['get'](I);}};j(C,_0x261e27(0x1d0),B),j(C,_0x261e27(0x1cf),_0x150667[_0x261e27(0x1cb)]),C=de([_0x212ca6(_0x328c2c,_0x541e65,_0x47994c),N(0x1,_0x3f6240(_0x1ccb8a)),N(0x2,_0x1a65e)],C);export{C as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1c060a=_0x1a43;(function(_0x2b48b5,_0x224aa4){const _0x27e343=_0x1a43,_0x316f62=_0x2b48b5();while(!![]){try{const _0x2e8d4=-parseInt(_0x27e343(0x1c3))/0x1+-parseInt(_0x27e343(0x1a9))/0x2+-parseInt(_0x27e343(0x1c2))/0x3+-parseInt(_0x27e343(0x199))/0x4*(parseInt(_0x27e343(0x1a0))/0x5)+-parseInt(_0x27e343(0x1bc))/0x6*(parseInt(_0x27e343(0x1ba))/0x7)+-parseInt(_0x27e343(0x1a7))/0x8+parseInt(_0x27e343(0x19b))/0x9;if(_0x2e8d4===_0x224aa4)break;else _0x316f62['push'](_0x316f62['shift']());}catch(_0x2d3375){_0x316f62['push'](_0x316f62['shift']());}}}(_0x4b62,0xa4391));import{CommentService as _0x5b86b0,CollaborationSessionService as _0x320aac,UniverCollaborationClientPlugin as _0x303a7f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4a4c8d}from'@univerjs-pro/license';import{dayjs as _0x3dba7e,UserManagerService as _0x1c5421,Inject as _0x58c13e,Injector as _0x521d83,Disposable as _0x550cf5,CustomRangeType as _0x4918f4,UniverInstanceType as _0x2756f3,DependentOn as _0x34a373,Plugin as _0x57c9b6,merge as _0x2f3f8c,IConfigService as _0x402eb0}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x425263}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x57f949,IThreadCommentDataSourceService as _0xa84ab7}from'@univerjs/thread-comment';import{bufferTime as _0x2b5592}from'rxjs';import{HTTPService as _0xef12b4}from'@univerjs/network';const B=_0x1c060a(0x192);var _=(_0x33a13f=>(_0x33a13f[_0x33a13f[_0x1c060a(0x1b3)]=0x0]=_0x1c060a(0x1b3),_0x33a13f[_0x33a13f[_0x1c060a(0x1ae)]=0x1]=_0x1c060a(0x1ae),_0x33a13f[_0x33a13f[_0x1c060a(0x1c6)]=-0x1]='UNRECOGNIZED',_0x33a13f))(_||{}),p=(_0x2bb77d=>(_0x2bb77d[_0x2bb77d[_0x1c060a(0x1c7)]=0x0]=_0x1c060a(0x1c7),_0x2bb77d[_0x2bb77d[_0x1c060a(0x1c0)]=0x1]=_0x1c060a(0x1c0),_0x2bb77d[_0x2bb77d[_0x1c060a(0x187)]=0x2]=_0x1c060a(0x187),_0x2bb77d[_0x2bb77d[_0x1c060a(0x1be)]=0x3]='Edit',_0x2bb77d[_0x2bb77d['Delete']=0x4]=_0x1c060a(0x1b6),_0x2bb77d[_0x2bb77d[_0x1c060a(0x183)]=0x5]=_0x1c060a(0x183),_0x2bb77d[_0x2bb77d[_0x1c060a(0x1c6)]=-0x1]=_0x1c060a(0x1c6),_0x2bb77d))(p||{});const O=_0x1b6810=>_0x3dba7e(new Date(+_0x1b6810))[_0x1c060a(0x1d9)]('YYYY/MM/DD\x20HH:mm'),K=async(_0x3ff5a5,_0x49eabb)=>{const _0x1c8597=_0x1c060a,_0x5ee8ed=_0x3ff5a5[_0x1c8597(0x186)](_0x1c5421),_0x34e30d=_0x3ff5a5[_0x1c8597(0x186)](_0xef12b4);_0x49eabb['forEach'](_0x68fc2e=>{const _0x438e5e=_0x1c8597;_0x5ee8ed[_0x438e5e(0x19c)](_0x68fc2e)&&_0x49eabb[_0x438e5e(0x18b)](_0x68fc2e);}),_0x49eabb[_0x1c8597(0x1d7)]&&(await _0x34e30d[_0x1c8597(0x186)](_0x1c8597(0x18d),{'params':{'userIDs':[..._0x49eabb]}}))['body'][_0x1c8597(0x194)]['forEach'](_0x45a2f8=>{const _0x124d8c=_0x1c8597;_0x45a2f8&&_0x5ee8ed[_0x124d8c(0x184)](_0x45a2f8);});};var V=Object[_0x1c060a(0x191)],z=Object['getOwnPropertyDescriptor'],Q=(_0x276cbb,_0x3cc784,_0x400094,_0x1af6bd)=>{for(var _0x27fbb2=_0x1af6bd>0x1?void 0x0:_0x1af6bd?z(_0x3cc784,_0x400094):_0x3cc784,_0x1800a5=_0x276cbb['length']-0x1,_0x3b8b97;_0x1800a5>=0x0;_0x1800a5--)(_0x3b8b97=_0x276cbb[_0x1800a5])&&(_0x27fbb2=(_0x1af6bd?_0x3b8b97(_0x3cc784,_0x400094,_0x27fbb2):_0x3b8b97(_0x27fbb2))||_0x27fbb2);return _0x1af6bd&&_0x27fbb2&&V(_0x3cc784,_0x400094,_0x27fbb2),_0x27fbb2;},v=(_0x9536fe,_0x5a7adf)=>(_0x5ad283,_0x1b1f2e)=>_0x5a7adf(_0x5ad283,_0x1b1f2e,_0x9536fe);let I=class extends _0x550cf5{constructor(_0x11fd56,_0x3b853f,_0x389d6f,_0x37dba6){const _0x3df3a=_0x1c060a;super(),this[_0x3df3a(0x1a4)]=_0x11fd56,this[_0x3df3a(0x18a)]=_0x3b853f,this['_userService']=_0x389d6f,this[_0x3df3a(0x196)]=_0x37dba6,this[_0x3df3a(0x171)](),this[_0x3df3a(0x1d5)]();}[_0x1c060a(0x1d5)](){const _0x1d17c1=_0x1c060a;this[_0x1d17c1(0x1bd)](this[_0x1d17c1(0x18a)]['commentUpdate$'][_0x1d17c1(0x19e)](_0x2b5592(0x10))[_0x1d17c1(0x181)](_0x52d0c2=>{const _0xdbd172=_0x1d17c1,_0x188fb3=new Set();_0x52d0c2[_0xdbd172(0x182)](_0x2ab259=>{const _0x2b47b=_0xdbd172;switch(_0x2ab259[_0x2b47b(0x180)]){case'add':{const _0x33e092=_0x2ab259[_0x2b47b(0x173)][_0x2b47b(0x19f)];_0x188fb3[_0x2b47b(0x1c5)](_0x33e092);break;}}}),K(this['_injector'],_0x188fb3);}));}[_0x1c060a(0x171)](){const _0x55329b=_0x1c060a;this['disposeWithMe'](this[_0x55329b(0x1a4)]['commentUpdate$'][_0x55329b(0x181)](async _0x2049a9=>{const _0x516ac6=_0x55329b;var _0x35b5b4,_0x38e2f0,_0x4f1106,_0x5ae9d5;const _0xeef639=(_0x35b5b4=this[_0x516ac6(0x18a)]['getUnit'](_0x2049a9[_0x516ac6(0x1bf)])[_0x516ac6(0x1ab)](_0x273749=>_0x273749['threadId']===_0x2049a9[_0x516ac6(0x1cf)]))==null?void 0x0:_0x35b5b4[_0x516ac6(0x1d8)];if(!_0xeef639)return;const {unitId:_0x1419cc,subUnitId:_0x521525}=_0xeef639;switch(_0x2049a9[_0x516ac6(0x1af)]&&this[_0x516ac6(0x190)][_0x516ac6(0x184)](_0x2049a9[_0x516ac6(0x1af)]),_0x2049a9[_0x516ac6(0x180)]){case p[_0x516ac6(0x1c0)]:break;case p[_0x516ac6(0x187)]:{this[_0x516ac6(0x18a)]['addComment'](_0x1419cc,_0x521525,{'unitId':_0x1419cc,'subUnitId':_0x521525,'ref':'','id':_0x2049a9['replyId'],'dT':O(+_0x2049a9[_0x516ac6(0x1d0)]),'threadId':_0x2049a9[_0x516ac6(0x1cf)],'personId':(_0x4f1106=(_0x38e2f0=_0x2049a9[_0x516ac6(0x1af)])==null?void 0x0:_0x38e2f0[_0x516ac6(0x17a)])!=null?_0x4f1106:_0x2049a9['userId'],'text':JSON[_0x516ac6(0x1d1)](_0x2049a9['content']),'parentId':_0xeef639['id']});break;}case p[_0x516ac6(0x1b6)]:{const _0x31876a=this['_threadCommentModel'][_0x516ac6(0x1cd)](_0x1419cc,_0x521525,_0x2049a9['replyId']);_0x31876a&&_0x31876a['parentId']&&this[_0x516ac6(0x18a)][_0x516ac6(0x1a3)](_0x1419cc,_0x521525,_0x2049a9[_0x516ac6(0x1c8)]);break;}case p[_0x516ac6(0x1be)]:{this[_0x516ac6(0x18a)]['updateComment'](_0x1419cc,_0x521525,{'commentId':_0x2049a9[_0x516ac6(0x1c8)],'text':JSON[_0x516ac6(0x1d1)](_0x2049a9['content'])});break;}case p[_0x516ac6(0x183)]:{const _0x3014f8=(_0x5ae9d5=this['_threadCommentModel'][_0x516ac6(0x1a1)](_0x2049a9['unitId'])['find'](_0x2b9fbe=>_0x2b9fbe[_0x516ac6(0x1cf)]===_0x2049a9['threadId']))==null?void 0x0:_0x5ae9d5[_0x516ac6(0x1d8)];_0x3014f8&&this[_0x516ac6(0x18a)][_0x516ac6(0x17d)](_0x1419cc,_0x521525,_0x3014f8['id'],_0x2049a9['solved']===_[_0x516ac6(0x1ae)]);break;}}}));}};I=Q([v(0x0,_0x58c13e(_0x5b86b0)),v(0x1,_0x58c13e(_0x57f949)),v(0x2,_0x58c13e(_0x1c5421)),v(0x3,_0x58c13e(_0x521d83))],I);const X='thread-comment-data-source.config',P={};var k=Object[_0x1c060a(0x191)],ee=Object['getOwnPropertyDescriptor'],re=(_0xc56df9,_0x38aa04,_0x2dbb08,_0x260fd8)=>{const _0x5a8dd7=_0x1c060a;for(var _0x1d8bd9=_0x260fd8>0x1?void 0x0:_0x260fd8?ee(_0x38aa04,_0x2dbb08):_0x38aa04,_0x42f2e4=_0xc56df9[_0x5a8dd7(0x1a8)]-0x1,_0x33f21e;_0x42f2e4>=0x0;_0x42f2e4--)(_0x33f21e=_0xc56df9[_0x42f2e4])&&(_0x1d8bd9=(_0x260fd8?_0x33f21e(_0x38aa04,_0x2dbb08,_0x1d8bd9):_0x33f21e(_0x1d8bd9))||_0x1d8bd9);return _0x260fd8&&_0x1d8bd9&&k(_0x38aa04,_0x2dbb08,_0x1d8bd9),_0x1d8bd9;},f=(_0x455a21,_0x5e8c6d)=>(_0x43c7aa,_0x18e9cd)=>_0x5e8c6d(_0x43c7aa,_0x18e9cd,_0x455a21);function te(_0x5cb071,_0x797928){const _0x4d81ec=_0x1c060a,_0x45ab1b=_0x5cb071[_0x4d81ec(0x197)][0x0];return{..._0x797928,'id':_0x45ab1b[_0x4d81ec(0x1c8)],'resolved':_0x5cb071[_0x4d81ec(0x1cc)]===0x1,'dT':O(_0x45ab1b['createTimestamp']),'personId':_0x45ab1b[_0x4d81ec(0x17e)],'threadId':_0x45ab1b[_0x4d81ec(0x1cf)]};}function _0x1a43(_0x19f53d,_0x3aea8f){const _0x4b6284=_0x4b62();return _0x1a43=function(_0x1a43b2,_0x54f52b){_0x1a43b2=_0x1a43b2-0x171;let _0x466b39=_0x4b6284[_0x1a43b2];return _0x466b39;},_0x1a43(_0x19f53d,_0x3aea8f);}function se(_0x14048e,_0x3bab63,_0x4fd43a){const _0x27a21c=_0x1c060a;var _0x14ec59,_0x1ce173;if(((_0x1ce173=(_0x14ec59=_0x14048e==null?void 0x0:_0x14048e[_0x27a21c(0x197)])==null?void 0x0:_0x14ec59['length'])!=null?_0x1ce173:0x0)>0x0){const _0x2d34a9=(_0x26f235,_0x3eba9a)=>({'id':_0x26f235['replyId'],'threadId':_0x26f235[_0x27a21c(0x1cf)],'dT':O(_0x26f235[_0x27a21c(0x1d0)]),'personId':_0x26f235[_0x27a21c(0x17e)],'resolved':_0x14048e[_0x27a21c(0x1cc)]===_['Solved'],'unitId':_0x3bab63,'subUnitId':_0x4fd43a,'text':JSON[_0x27a21c(0x1d1)](_0x26f235[_0x27a21c(0x1d3)]),'parentId':_0x3eba9a}),_0x214923=_0x2d34a9(_0x14048e[_0x27a21c(0x197)][0x0]);return{..._0x214923,'children':_0x14048e[_0x27a21c(0x197)]['slice'](0x1)[_0x27a21c(0x174)](_0x55a40d=>_0x2d34a9(_0x55a40d,_0x214923['id']))};}return null;}let S=class{constructor(_0x48afd9,_0x117cb1,_0x6b836f,_0x4c197b){const _0x23b7b6=_0x1c060a;this[_0x23b7b6(0x1b8)]=_0x48afd9,this['_userService']=_0x117cb1,this['_sessionService']=_0x6b836f,this[_0x23b7b6(0x196)]=_0x4c197b;}async['addComment'](_0x7eb979){const _0x1272a3=_0x1c060a;var _0x22574e,_0xb0e62f;const {parentId:_0x5449b7,unitId:_0x24691e,text:_0x5e379f,threadId:_0x44764b}=_0x7eb979,_0x554531=(_0xb0e62f=(_0x22574e=_0x5e379f['customRanges'])==null?void 0x0:_0x22574e[_0x1272a3(0x1c9)](_0x516388=>_0x516388[_0x1272a3(0x185)]===_0x4918f4[_0x1272a3(0x1b9)])[_0x1272a3(0x174)](_0x612cac=>_0x612cac[_0x1272a3(0x1a2)]))!=null?_0xb0e62f:[],_0x58a258=JSON[_0x1272a3(0x1b2)](_0x5e379f),_0x24f085=(await this[_0x1272a3(0x1bb)]['requireSession'](_0x24691e))[_0x1272a3(0x188)]();if(_0x5449b7){const _0x1d5299={'memberId':_0x24f085,'unitId':_0x24691e,'content':_0x58a258,'mention':_0x554531,'threadId':_0x44764b},_0x13f009=(await this[_0x1272a3(0x1b8)][_0x1272a3(0x195)](_0x1272a3(0x17c)+_0x24691e+_0x1272a3(0x189),{'body':_0x1d5299}))[_0x1272a3(0x177)][_0x1272a3(0x179)];return{..._0x7eb979,'id':_0x13f009[_0x1272a3(0x1c8)],'dT':_0x3dba7e(+_0x13f009[_0x1272a3(0x1d0)])[_0x1272a3(0x1d9)](_0x1272a3(0x198)),'personId':_0x13f009[_0x1272a3(0x17e)]};}else{const _0x45cc77={'memberId':_0x24f085,'unitId':_0x24691e,'content':_0x58a258,'mention':_0x554531},_0x2b0714=await this[_0x1272a3(0x1b8)][_0x1272a3(0x195)](_0x1272a3(0x17c)+_0x24691e+_0x1272a3(0x1b4),{'body':_0x45cc77});return te(_0x2b0714['body'][_0x1272a3(0x172)],_0x7eb979);}}async[_0x1c060a(0x1c4)](_0x30d06a){const _0x1a3854=_0x1c060a;var _0x20581d,_0x479566;const {text:_0x55d760,unitId:_0x41ec3a}=_0x30d06a,_0x19c02b=(_0x479566=(_0x20581d=_0x55d760[_0x1a3854(0x18c)])==null?void 0x0:_0x20581d[_0x1a3854(0x1c9)](_0x1e90f5=>_0x1e90f5[_0x1a3854(0x185)]===_0x4918f4['COMMENT'])[_0x1a3854(0x174)](_0x3ba7a2=>_0x3ba7a2[_0x1a3854(0x1a2)]))!=null?_0x479566:[],_0xe552ce=JSON[_0x1a3854(0x1b2)](_0x55d760),_0x55737f=_0x30d06a[_0x1a3854(0x1cf)],_0x548609=_0x30d06a['id'],_0x197026={'memberId':(await this[_0x1a3854(0x1bb)][_0x1a3854(0x1d6)](_0x41ec3a))[_0x1a3854(0x188)](),'unitId':_0x41ec3a,'threadId':_0x55737f,'mention':_0x19c02b,'content':_0xe552ce,'replyId':_0x548609},_0x5eaf46=await this[_0x1a3854(0x1b8)][_0x1a3854(0x195)](_0x1a3854(0x17c)+_0x41ec3a+_0x1a3854(0x1d4),{'body':_0x197026});return!_0x5eaf46['body'][_0x1a3854(0x178)]||_0x5eaf46[_0x1a3854(0x177)][_0x1a3854(0x178)][_0x1a3854(0x1aa)]===0x1;}async[_0x1c060a(0x17d)](_0x239901){const _0x52e772=_0x1c060a,{unitId:_0x596335}=_0x239901,_0x218581=_0x239901['threadId'],_0x5d679f={'memberId':this[_0x52e772(0x190)][_0x52e772(0x1ad)]()['userID'],'unitId':_0x596335,'threadId':_0x218581,'solved':_0x239901[_0x52e772(0x1ce)]?_['Solved']:_[_0x52e772(0x1b3)]},_0x2dc2eb=await this[_0x52e772(0x1b8)][_0x52e772(0x195)](_0x52e772(0x17c)+_0x596335+_0x52e772(0x1a5),{'body':_0x5d679f});return!_0x2dc2eb['body'][_0x52e772(0x178)]||_0x2dc2eb['body']['error'][_0x52e772(0x1aa)]===0x1;}async['deleteComment'](_0x33a660,_0xc89e31,_0x317870,_0x4a7d52){const _0x110eae=_0x1c060a,_0x50242f={'memberId':(await this[_0x110eae(0x1bb)][_0x110eae(0x1d6)](_0x33a660))[_0x110eae(0x188)](),'threadId':_0x317870,'replyId':_0x4a7d52,'unitId':_0x33a660},_0x522a21=await this[_0x110eae(0x1b8)][_0x110eae(0x195)](_0x110eae(0x17c)+_0x33a660+'/delete',{'body':_0x50242f});return!_0x522a21[_0x110eae(0x177)]['error']||_0x522a21[_0x110eae(0x177)]['error']['code']===0x1;}async[_0x1c060a(0x176)](_0x1a8281,_0x5d8ac2,_0x2c7488){const _0x43b39f=_0x1c060a,_0x5414ac={'unitId':_0x1a8281,'threadId':_0x2c7488},_0x476a2e=await this[_0x43b39f(0x1b8)]['post']('/universer-api/comment/unit/'+_0x1a8281+_0x43b39f(0x193),{'body':_0x5414ac}),_0x2f8c63=_0x2c7488[_0x43b39f(0x174)](_0x34c18f=>se(_0x476a2e[_0x43b39f(0x177)][_0x43b39f(0x19d)][_0x34c18f],_0x1a8281,_0x5d8ac2))[_0x43b39f(0x1c9)](Boolean);return Object[_0x43b39f(0x17f)](_0x476a2e[_0x43b39f(0x177)][_0x43b39f(0x194)])[_0x43b39f(0x182)](_0x5be379=>{const _0x1101a8=_0x43b39f;this['_userService'][_0x1101a8(0x184)](_0x5be379);}),_0x2f8c63;}[_0x1c060a(0x1b7)](_0x244f8d){const _0x12de9a=_0x1c060a;return{'id':_0x244f8d['id'],'threadId':_0x244f8d[_0x12de9a(0x1cf)],'ref':_0x244f8d[_0x12de9a(0x1ca)]};}};function _0x4b62(){const _0x574bf0=['959912QllHbx','code','find','_threadCommentDataSource','getCurrentUser','Solved','user','onStarting','UNIVER_UNKNOWN','stringify','OpenOrReOpen','/add','dataSource','Delete','saveCommentToSnapshot','_httpService','COMMENT','5558yGvuBQ','_sessionService','7578xqCIvL','disposeWithMe','Edit','unitId','Add','_configService','1509345pYxdBK','329520lrvifU','updateComment','add','UNRECOGNIZED','Unknown','replyId','filter','ref','setConfig','solved','getComment','resolved','threadId','createTimestamp','parse','syncUpdateMutationToColla','content','/edit','_initUserSync','requireSession','size','root','format','_init','comment','payload','map','_threadCommentDataSourceService','listComments','body','error','reply','userID','onReady','/universer-api/comment/unit/','resolveComment','userId','values','type','subscribe','forEach','Solve','addUser','rangeType','get','Reply','getMemberID','/reply','_threadCommentModel','delete','customRanges','/universer-api/user/list','symbol','_config','_userService','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','users','post','_injector','replies','YYYY/MM/DD\x20HH:mm','158120xJcXXA','_initDataSource','47008017wNzNAC','getUser','comments','pipe','personId','170fJrqDs','getUnit','rangeId','deleteComment','_commentService','/solved','getOwnPropertyDescriptor','7128184dCwHhk','length'];_0x4b62=function(){return _0x574bf0;};return _0x4b62();}S=re([f(0x0,_0x58c13e(_0xef12b4)),f(0x1,_0x58c13e(_0x1c5421)),f(0x2,_0x58c13e(_0x320aac)),f(0x3,_0x58c13e(_0x521d83))],S);var oe=Object[_0x1c060a(0x191)],ne=Object[_0x1c060a(0x1a6)],ie=(_0x193a61,_0x3ec318,_0xa55682,_0x2f81e7)=>{const _0x5a1ec4=_0x1c060a;for(var _0x35fc16=_0x2f81e7>0x1?void 0x0:_0x2f81e7?ne(_0x3ec318,_0xa55682):_0x3ec318,_0x2e600b=_0x193a61[_0x5a1ec4(0x1a8)]-0x1,_0x18f269;_0x2e600b>=0x0;_0x2e600b--)(_0x18f269=_0x193a61[_0x2e600b])&&(_0x35fc16=(_0x2f81e7?_0x18f269(_0x3ec318,_0xa55682,_0x35fc16):_0x18f269(_0x35fc16))||_0x35fc16);return _0x2f81e7&&_0x35fc16&&oe(_0x3ec318,_0xa55682,_0x35fc16),_0x35fc16;},M=(_0x495496,_0x16953f)=>(_0x321fe1,_0xca420a)=>_0x16953f(_0x321fe1,_0xca420a,_0x495496);let b=class extends _0x550cf5{constructor(_0x122790,_0x54f3da){const _0x21a08d=_0x1c060a;super(),this['_threadCommentDataSourceService']=_0x122790,this[_0x21a08d(0x1ac)]=_0x54f3da,this[_0x21a08d(0x19a)]();}[_0x1c060a(0x19a)](){const _0x4868e5=_0x1c060a;this[_0x4868e5(0x175)][_0x4868e5(0x1b5)]=this[_0x4868e5(0x1ac)],this[_0x4868e5(0x175)][_0x4868e5(0x1d2)]=!0x1;}};b=ie([M(0x0,_0xa84ab7),M(0x1,_0x58c13e(S))],b);var $=Object[_0x1c060a(0x191)],ce=Object[_0x1c060a(0x1a6)],ae=(_0x10f327,_0x1fe6d0,_0x3807af)=>_0x1fe6d0 in _0x10f327?$(_0x10f327,_0x1fe6d0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3807af}):_0x10f327[_0x1fe6d0]=_0x3807af,de=(_0x25ee14,_0x4b5cc3,_0x39af96,_0x3f578d)=>{const _0x2f98c3=_0x1c060a;for(var _0x208d04=_0x3f578d>0x1?void 0x0:_0x3f578d?ce(_0x4b5cc3,_0x39af96):_0x4b5cc3,_0xe490e2=_0x25ee14[_0x2f98c3(0x1a8)]-0x1,_0x85d073;_0xe490e2>=0x0;_0xe490e2--)(_0x85d073=_0x25ee14[_0xe490e2])&&(_0x208d04=(_0x3f578d?_0x85d073(_0x4b5cc3,_0x39af96,_0x208d04):_0x85d073(_0x208d04))||_0x208d04);return _0x3f578d&&_0x208d04&&$(_0x4b5cc3,_0x39af96,_0x208d04),_0x208d04;},N=(_0x4d0415,_0x3b1083)=>(_0x984b19,_0x33b9e7)=>_0x3b1083(_0x984b19,_0x33b9e7,_0x4d0415),j=(_0x179a5b,_0x2c9ef2,_0x326e2d)=>ae(_0x179a5b,typeof _0x2c9ef2!=_0x1c060a(0x18e)?_0x2c9ef2+'':_0x2c9ef2,_0x326e2d);let C=class extends _0x57c9b6{constructor(_0x19a67d=P,_0x136e17,_0x30c3a4){const _0x20ee4b=_0x1c060a;super(),this[_0x20ee4b(0x18f)]=_0x19a67d,this[_0x20ee4b(0x196)]=_0x136e17,this[_0x20ee4b(0x1c1)]=_0x30c3a4;const {..._0x559f5a}=_0x2f3f8c({},P,this[_0x20ee4b(0x18f)]);this[_0x20ee4b(0x1c1)][_0x20ee4b(0x1cb)](X,_0x559f5a);}[_0x1c060a(0x1b0)](){const _0x5e4d77=_0x1c060a;[[S],[b],[I]][_0x5e4d77(0x182)](_0x4c9934=>{this['_injector']['add'](_0x4c9934);});}[_0x1c060a(0x17b)](){const _0x2d7122=_0x1c060a;this[_0x2d7122(0x196)][_0x2d7122(0x186)](b),this[_0x2d7122(0x196)][_0x2d7122(0x186)](I);}};j(C,'pluginName',B),j(C,_0x1c060a(0x180),_0x2756f3[_0x1c060a(0x1b1)]),C=de([_0x34a373(_0x425263,_0x303a7f,_0x4a4c8d),N(0x1,_0x58c13e(_0x521d83)),N(0x2,_0x402eb0)],C);export{C as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2b03(_0x16179e,_0x214350){const _0x2e316b=_0x2e31();return _0x2b03=function(_0x2b036d,_0x6af26c){_0x2b036d=_0x2b036d-0x1d7;let _0x2aab7d=_0x2e316b[_0x2b036d];return _0x2aab7d;},_0x2b03(_0x16179e,_0x214350);}function _0x2e31(){const _0x5a25c1=['setConfig','Add','UniverThreadCommentUi','3921720ltNzgB','rangeType','onReady','users','@univerjs/thread-comment-ui','root','UniverLicensePlugin','_commentService','UniverInstanceType','IThreadCommentDataSourceService','stringify','user','CollaborationSessionService','customRanges','format','HTTPService','getUser','UniverProLicense','/universer-api/user/list','1943530OKXjcn','map','5472260ostqbi','@univerjs/network','thread-comment-data-source.config','18mMLcnl','resolveComment','/add','_threadCommentModel','deleteComment','post','threadId','solved','6142276adbdAR','content','_configService','5016148VDpfWN','personId','Injector','userID','forEach','defineProperty','replyId','@univerjs-pro/license','getMemberID','UniverCore','Disposable','replies','_initUserSync','object','type','Solved','COMMENT','UniverNetwork','Inject','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','rxjs','@univerjs/thread-comment','rangeId','UniverProCollaborationClient','function','OpenOrReOpen','toStringTag','@univerjs/core','19852IJpGyR','_userService','_initDataSource','body','UNRECOGNIZED','/delete','50eNilTf','getOwnPropertyDescriptor','CommentService','Unknown','UserManagerService','createTimestamp','pluginName','dayjs','updateComment','DependentOn','pipe','@univerjs-pro/collaboration-client','Module','_injector','CustomRangeType','onStarting','disposeWithMe','getUnit','addComment','Edit','comment','reply','addUser','_sessionService','Delete','requireSession','/universer-api/comment/unit/','subscribe','UniverProThreadCommentDatasource','8766FEMCyv','UniverThreadCommentDataSourcePlugin','listComments','parse','_config','Solve','UniverThreadCommentUIPlugin','exports','6LOyHLb','_httpService','filter','userId','unitId','syncUpdateMutationToColla','commentUpdate$','error','UniverThreadComment','comments','_threadCommentDataSource','values','find','_init','Reply','IConfigService','get','UniverCollaborationClientPlugin','amd','length','add','delete'];_0x2e31=function(){return _0x5a25c1;};return _0x2e31();}(function(_0xbedb78,_0x5b9c83){const _0x62ac10=_0x2b03,_0x58c64a=_0xbedb78();while(!![]){try{const _0xfe6d53=parseInt(_0x62ac10(0x1ff))/0x1*(parseInt(_0x62ac10(0x1f9))/0x2)+-parseInt(_0x62ac10(0x21c))/0x3+parseInt(_0x62ac10(0x1dc))/0x4+-parseInt(_0x62ac10(0x252))/0x5+parseInt(_0x62ac10(0x224))/0x6*(parseInt(_0x62ac10(0x1d9))/0x7)+-parseInt(_0x62ac10(0x23d))/0x8+-parseInt(_0x62ac10(0x255))/0x9*(parseInt(_0x62ac10(0x250))/0xa);if(_0xfe6d53===_0x5b9c83)break;else _0x58c64a['push'](_0x58c64a['shift']());}catch(_0x476393){_0x58c64a['push'](_0x58c64a['shift']());}}}(_0x2e31,0x9f0f6),function(_0x27c0bd,_0x1938c6){const _0x1d5b03=_0x2b03;typeof exports==_0x1d5b03(0x1e9)&&typeof module<'u'?_0x1938c6(exports,require(_0x1d5b03(0x20a)),require('@univerjs-pro/license'),require(_0x1d5b03(0x1f8)),require(_0x1d5b03(0x241)),require(_0x1d5b03(0x1f2)),require('rxjs'),require(_0x1d5b03(0x253))):typeof define==_0x1d5b03(0x1f5)&&define[_0x1d5b03(0x236)]?define([_0x1d5b03(0x223),_0x1d5b03(0x20a),_0x1d5b03(0x1e3),'@univerjs/core',_0x1d5b03(0x241),_0x1d5b03(0x1f2),_0x1d5b03(0x1f1),_0x1d5b03(0x253)],_0x1938c6):(_0x27c0bd=typeof globalThis<'u'?globalThis:_0x27c0bd||self,_0x1938c6(_0x27c0bd[_0x1d5b03(0x21b)]={},_0x27c0bd[_0x1d5b03(0x1f4)],_0x27c0bd[_0x1d5b03(0x24e)],_0x27c0bd[_0x1d5b03(0x1e5)],_0x27c0bd[_0x1d5b03(0x23c)],_0x27c0bd[_0x1d5b03(0x22c)],_0x27c0bd[_0x1d5b03(0x1f1)],_0x27c0bd[_0x1d5b03(0x1ed)]));}(this,function(_0x2718f4,_0x5f5cf2,_0xea7ec2,_0x160b92,_0x160ee0,_0x366c04,_0x470924,_0x519750){'use strict';const _0xba9176=_0x2b03;const _0x522b00='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x2d0677=(_0x89c8ee=>(_0x89c8ee[_0x89c8ee[_0xba9176(0x1f6)]=0x0]=_0xba9176(0x1f6),_0x89c8ee[_0x89c8ee[_0xba9176(0x1eb)]=0x1]='Solved',_0x89c8ee[_0x89c8ee[_0xba9176(0x1fd)]=-0x1]=_0xba9176(0x1fd),_0x89c8ee))(_0x2d0677||{}),_0x289780=(_0x977b52=>(_0x977b52[_0x977b52['Unknown']=0x0]=_0xba9176(0x202),_0x977b52[_0x977b52[_0xba9176(0x23b)]=0x1]=_0xba9176(0x23b),_0x977b52[_0x977b52[_0xba9176(0x232)]=0x2]='Reply',_0x977b52[_0x977b52['Edit']=0x3]='Edit',_0x977b52[_0x977b52[_0xba9176(0x217)]=0x4]=_0xba9176(0x217),_0x977b52[_0x977b52[_0xba9176(0x221)]=0x5]=_0xba9176(0x221),_0x977b52[_0x977b52[_0xba9176(0x1fd)]=-0x1]=_0xba9176(0x1fd),_0x977b52))(_0x289780||{});const _0x521e26=_0x2f74f2=>_0x160b92[_0xba9176(0x206)](new Date(+_0x2f74f2))[_0xba9176(0x24b)](_0xba9176(0x1ef)),_0x1d131c=async(_0x1a283f,_0x6393bd)=>{const _0x1edf68=_0xba9176,_0x2840f8=_0x1a283f[_0x1edf68(0x234)](_0x160b92[_0x1edf68(0x203)]),_0x1a2270=_0x1a283f['get'](_0x519750['HTTPService']);_0x6393bd[_0x1edf68(0x1e0)](_0x3966c6=>{const _0x427459=_0x1edf68;_0x2840f8[_0x427459(0x24d)](_0x3966c6)&&_0x6393bd[_0x427459(0x239)](_0x3966c6);}),_0x6393bd['size']&&(await _0x1a2270['get'](_0x1edf68(0x24f),{'params':{'userIDs':[..._0x6393bd]}}))[_0x1edf68(0x1fc)][_0x1edf68(0x240)][_0x1edf68(0x1e0)](_0x2f7f48=>{const _0x454702=_0x1edf68;_0x2f7f48&&_0x2840f8[_0x454702(0x215)](_0x2f7f48);});};var _0x3bfdab=Object['defineProperty'],_0x237784=Object[_0xba9176(0x200)],_0x2b0223=(_0x5b1315,_0x244a40,_0x1ead0a,_0x59f723)=>{const _0x4ae01c=_0xba9176;for(var _0x127385=_0x59f723>0x1?void 0x0:_0x59f723?_0x237784(_0x244a40,_0x1ead0a):_0x244a40,_0x4dd42b=_0x5b1315[_0x4ae01c(0x237)]-0x1,_0x33032a;_0x4dd42b>=0x0;_0x4dd42b--)(_0x33032a=_0x5b1315[_0x4dd42b])&&(_0x127385=(_0x59f723?_0x33032a(_0x244a40,_0x1ead0a,_0x127385):_0x33032a(_0x127385))||_0x127385);return _0x59f723&&_0x127385&&_0x3bfdab(_0x244a40,_0x1ead0a,_0x127385),_0x127385;},_0x49cf6e=(_0x5f4000,_0x22c88c)=>(_0x1d2a20,_0x2013d1)=>_0x22c88c(_0x1d2a20,_0x2013d1,_0x5f4000);let _0x382135=class extends _0x160b92['Disposable']{constructor(_0x754206,_0x524bfc,_0x56a46e,_0x1cd07d){const _0x460fa3=_0xba9176;super(),this[_0x460fa3(0x244)]=_0x754206,this[_0x460fa3(0x258)]=_0x524bfc,this['_userService']=_0x56a46e,this['_injector']=_0x1cd07d,this[_0x460fa3(0x231)](),this[_0x460fa3(0x1e8)]();}['_initUserSync'](){const _0x6ec86d=_0xba9176;this['disposeWithMe'](this[_0x6ec86d(0x258)][_0x6ec86d(0x22a)][_0x6ec86d(0x209)](_0x470924['bufferTime'](0x10))[_0x6ec86d(0x21a)](_0x59de01=>{const _0x3dd07c=_0x6ec86d,_0x26b093=new Set();_0x59de01[_0x3dd07c(0x1e0)](_0x16e668=>{const _0x230003=_0x3dd07c;switch(_0x16e668[_0x230003(0x1ea)]){case _0x230003(0x238):{const _0x33f4d3=_0x16e668['payload'][_0x230003(0x1dd)];_0x26b093[_0x230003(0x238)](_0x33f4d3);break;}}}),_0x1d131c(this[_0x3dd07c(0x20c)],_0x26b093);}));}['_init'](){const _0x5608cf=_0xba9176;this[_0x5608cf(0x20f)](this[_0x5608cf(0x244)][_0x5608cf(0x22a)][_0x5608cf(0x21a)](async _0x3a9dad=>{const _0xe151cc=_0x5608cf;var _0x188823,_0x3a1998,_0x37b7fb,_0x1bc60b;const _0x5d0d36=(_0x188823=this[_0xe151cc(0x258)][_0xe151cc(0x210)](_0x3a9dad[_0xe151cc(0x228)])[_0xe151cc(0x230)](_0x58be47=>_0x58be47[_0xe151cc(0x1d7)]===_0x3a9dad['threadId']))==null?void 0x0:_0x188823[_0xe151cc(0x242)];if(!_0x5d0d36)return;const {unitId:_0x183a32,subUnitId:_0x35ebb4}=_0x5d0d36;switch(_0x3a9dad[_0xe151cc(0x248)]&&this[_0xe151cc(0x1fa)][_0xe151cc(0x215)](_0x3a9dad[_0xe151cc(0x248)]),_0x3a9dad[_0xe151cc(0x1ea)]){case _0x289780[_0xe151cc(0x23b)]:break;case _0x289780[_0xe151cc(0x232)]:{this[_0xe151cc(0x258)][_0xe151cc(0x211)](_0x183a32,_0x35ebb4,{'unitId':_0x183a32,'subUnitId':_0x35ebb4,'ref':'','id':_0x3a9dad['replyId'],'dT':_0x521e26(+_0x3a9dad[_0xe151cc(0x204)]),'threadId':_0x3a9dad[_0xe151cc(0x1d7)],'personId':(_0x37b7fb=(_0x3a1998=_0x3a9dad[_0xe151cc(0x248)])==null?void 0x0:_0x3a1998['userID'])!=null?_0x37b7fb:_0x3a9dad[_0xe151cc(0x227)],'text':JSON[_0xe151cc(0x21f)](_0x3a9dad[_0xe151cc(0x1da)]),'parentId':_0x5d0d36['id']});break;}case _0x289780[_0xe151cc(0x217)]:{const _0x1fd347=this[_0xe151cc(0x258)]['getComment'](_0x183a32,_0x35ebb4,_0x3a9dad['replyId']);_0x1fd347&&_0x1fd347['parentId']&&this['_threadCommentModel'][_0xe151cc(0x259)](_0x183a32,_0x35ebb4,_0x3a9dad[_0xe151cc(0x1e2)]);break;}case _0x289780[_0xe151cc(0x212)]:{this[_0xe151cc(0x258)][_0xe151cc(0x207)](_0x183a32,_0x35ebb4,{'commentId':_0x3a9dad[_0xe151cc(0x1e2)],'text':JSON[_0xe151cc(0x21f)](_0x3a9dad[_0xe151cc(0x1da)])});break;}case _0x289780['Solve']:{const _0x38c57b=(_0x1bc60b=this[_0xe151cc(0x258)]['getUnit'](_0x3a9dad['unitId'])[_0xe151cc(0x230)](_0x26df73=>_0x26df73[_0xe151cc(0x1d7)]===_0x3a9dad[_0xe151cc(0x1d7)]))==null?void 0x0:_0x1bc60b[_0xe151cc(0x242)];_0x38c57b&&this[_0xe151cc(0x258)][_0xe151cc(0x256)](_0x183a32,_0x35ebb4,_0x38c57b['id'],_0x3a9dad[_0xe151cc(0x1d8)]===_0x2d0677['Solved']);break;}}}));}};_0x382135=_0x2b0223([_0x49cf6e(0x0,_0x160b92[_0xba9176(0x1ee)](_0x5f5cf2[_0xba9176(0x201)])),_0x49cf6e(0x1,_0x160b92[_0xba9176(0x1ee)](_0x366c04['ThreadCommentModel'])),_0x49cf6e(0x2,_0x160b92[_0xba9176(0x1ee)](_0x160b92[_0xba9176(0x203)])),_0x49cf6e(0x3,_0x160b92['Inject'](_0x160b92[_0xba9176(0x1de)]))],_0x382135);const _0x332b0e=_0xba9176(0x254),_0x5d8a00={};var _0x4130d3=Object[_0xba9176(0x1e1)],_0x186062=Object[_0xba9176(0x200)],_0x3feb5=(_0x45daef,_0x461100,_0x3fba56,_0x543691)=>{for(var _0x4ff2d6=_0x543691>0x1?void 0x0:_0x543691?_0x186062(_0x461100,_0x3fba56):_0x461100,_0x2edfa8=_0x45daef['length']-0x1,_0xad6cc6;_0x2edfa8>=0x0;_0x2edfa8--)(_0xad6cc6=_0x45daef[_0x2edfa8])&&(_0x4ff2d6=(_0x543691?_0xad6cc6(_0x461100,_0x3fba56,_0x4ff2d6):_0xad6cc6(_0x4ff2d6))||_0x4ff2d6);return _0x543691&&_0x4ff2d6&&_0x4130d3(_0x461100,_0x3fba56,_0x4ff2d6),_0x4ff2d6;},_0x321f5a=(_0x514136,_0x447913)=>(_0xd3a594,_0x5a40e2)=>_0x447913(_0xd3a594,_0x5a40e2,_0x514136);function _0x2c6206(_0x58ce4b,_0x11e8b6){const _0x34c26e=_0xba9176,_0x226b08=_0x58ce4b['replies'][0x0];return{..._0x11e8b6,'id':_0x226b08[_0x34c26e(0x1e2)],'resolved':_0x58ce4b[_0x34c26e(0x1d8)]===0x1,'dT':_0x521e26(_0x226b08[_0x34c26e(0x204)]),'personId':_0x226b08[_0x34c26e(0x227)],'threadId':_0x226b08['threadId']};}function _0x1f7655(_0x3db542,_0x3c5ee4,_0x257556){const _0x1bc28f=_0xba9176;var _0x335db1,_0x5651c1;if(((_0x5651c1=(_0x335db1=_0x3db542==null?void 0x0:_0x3db542[_0x1bc28f(0x1e7)])==null?void 0x0:_0x335db1['length'])!=null?_0x5651c1:0x0)>0x0){const _0x4ac735=(_0x3c4072,_0x31d5bd)=>({'id':_0x3c4072[_0x1bc28f(0x1e2)],'threadId':_0x3c4072[_0x1bc28f(0x1d7)],'dT':_0x521e26(_0x3c4072[_0x1bc28f(0x204)]),'personId':_0x3c4072[_0x1bc28f(0x227)],'resolved':_0x3db542[_0x1bc28f(0x1d8)]===_0x2d0677[_0x1bc28f(0x1eb)],'unitId':_0x3c5ee4,'subUnitId':_0x257556,'text':JSON['parse'](_0x3c4072[_0x1bc28f(0x1da)]),'parentId':_0x31d5bd}),_0x42a1b9=_0x4ac735(_0x3db542[_0x1bc28f(0x1e7)][0x0]);return{..._0x42a1b9,'children':_0x3db542[_0x1bc28f(0x1e7)]['slice'](0x1)[_0x1bc28f(0x251)](_0x3b7baf=>_0x4ac735(_0x3b7baf,_0x42a1b9['id']))};}return null;}let _0x78f03c=class{constructor(_0x55fa8a,_0x3332c8,_0x137940,_0x35ea13){const _0x1162f4=_0xba9176;this[_0x1162f4(0x225)]=_0x55fa8a,this[_0x1162f4(0x1fa)]=_0x3332c8,this[_0x1162f4(0x216)]=_0x137940,this[_0x1162f4(0x20c)]=_0x35ea13;}async[_0xba9176(0x211)](_0x24d7cf){const _0x590d3f=_0xba9176;var _0x5b7fe1,_0x3379aa;const {parentId:_0x29f072,unitId:_0x30385c,text:_0x2e5433,threadId:_0x332a47}=_0x24d7cf,_0x4a5cae=(_0x3379aa=(_0x5b7fe1=_0x2e5433[_0x590d3f(0x24a)])==null?void 0x0:_0x5b7fe1[_0x590d3f(0x226)](_0x423ef9=>_0x423ef9[_0x590d3f(0x23e)]===_0x160b92[_0x590d3f(0x20d)][_0x590d3f(0x1ec)])[_0x590d3f(0x251)](_0x4aafe1=>_0x4aafe1[_0x590d3f(0x1f3)]))!=null?_0x3379aa:[],_0xcb785f=JSON[_0x590d3f(0x247)](_0x2e5433),_0x3121b9=(await this[_0x590d3f(0x216)][_0x590d3f(0x218)](_0x30385c))[_0x590d3f(0x1e4)]();if(_0x29f072){const _0x1faad6={'memberId':_0x3121b9,'unitId':_0x30385c,'content':_0xcb785f,'mention':_0x4a5cae,'threadId':_0x332a47},_0x4e5e34=(await this[_0x590d3f(0x225)][_0x590d3f(0x25a)](_0x590d3f(0x219)+_0x30385c+'/reply',{'body':_0x1faad6}))[_0x590d3f(0x1fc)][_0x590d3f(0x214)];return{..._0x24d7cf,'id':_0x4e5e34[_0x590d3f(0x1e2)],'dT':_0x160b92[_0x590d3f(0x206)](+_0x4e5e34['createTimestamp'])[_0x590d3f(0x24b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4e5e34[_0x590d3f(0x227)]};}else{const _0x4a7f83={'memberId':_0x3121b9,'unitId':_0x30385c,'content':_0xcb785f,'mention':_0x4a5cae},_0x445cac=await this['_httpService'][_0x590d3f(0x25a)](_0x590d3f(0x219)+_0x30385c+_0x590d3f(0x257),{'body':_0x4a7f83});return _0x2c6206(_0x445cac[_0x590d3f(0x1fc)][_0x590d3f(0x213)],_0x24d7cf);}}async['updateComment'](_0x3596f1){const _0x930f31=_0xba9176;var _0x4e5536,_0x679c7a;const {text:_0x492f6c,unitId:_0x3d5329}=_0x3596f1,_0x418d54=(_0x679c7a=(_0x4e5536=_0x492f6c[_0x930f31(0x24a)])==null?void 0x0:_0x4e5536[_0x930f31(0x226)](_0x11527c=>_0x11527c[_0x930f31(0x23e)]===_0x160b92[_0x930f31(0x20d)][_0x930f31(0x1ec)])[_0x930f31(0x251)](_0x13a924=>_0x13a924[_0x930f31(0x1f3)]))!=null?_0x679c7a:[],_0x1f66d5=JSON[_0x930f31(0x247)](_0x492f6c),_0xc45b25=_0x3596f1[_0x930f31(0x1d7)],_0x3be1e3=_0x3596f1['id'],_0x31cff2={'memberId':(await this['_sessionService'][_0x930f31(0x218)](_0x3d5329))[_0x930f31(0x1e4)](),'unitId':_0x3d5329,'threadId':_0xc45b25,'mention':_0x418d54,'content':_0x1f66d5,'replyId':_0x3be1e3},_0x17399e=await this[_0x930f31(0x225)]['post']('/universer-api/comment/unit/'+_0x3d5329+'/edit',{'body':_0x31cff2});return!_0x17399e[_0x930f31(0x1fc)][_0x930f31(0x22b)]||_0x17399e['body'][_0x930f31(0x22b)]['code']===0x1;}async[_0xba9176(0x256)](_0x390846){const _0x368b7e=_0xba9176,{unitId:_0x1e5d98}=_0x390846,_0x3c8678=_0x390846[_0x368b7e(0x1d7)],_0x280b06={'memberId':this[_0x368b7e(0x1fa)]['getCurrentUser']()[_0x368b7e(0x1df)],'unitId':_0x1e5d98,'threadId':_0x3c8678,'solved':_0x390846['resolved']?_0x2d0677['Solved']:_0x2d0677[_0x368b7e(0x1f6)]},_0x2b2438=await this[_0x368b7e(0x225)]['post'](_0x368b7e(0x219)+_0x1e5d98+'/solved',{'body':_0x280b06});return!_0x2b2438['body']['error']||_0x2b2438['body'][_0x368b7e(0x22b)]['code']===0x1;}async['deleteComment'](_0x5df6fd,_0x489a13,_0x237a4e,_0x485348){const _0x251761=_0xba9176,_0x363788={'memberId':(await this[_0x251761(0x216)]['requireSession'](_0x5df6fd))[_0x251761(0x1e4)](),'threadId':_0x237a4e,'replyId':_0x485348,'unitId':_0x5df6fd},_0x1de337=await this[_0x251761(0x225)][_0x251761(0x25a)](_0x251761(0x219)+_0x5df6fd+_0x251761(0x1fe),{'body':_0x363788});return!_0x1de337['body'][_0x251761(0x22b)]||_0x1de337[_0x251761(0x1fc)]['error']['code']===0x1;}async[_0xba9176(0x21e)](_0xaf5c59,_0x390a31,_0x262989){const _0x32a43a=_0xba9176,_0x5cfa6e={'unitId':_0xaf5c59,'threadId':_0x262989},_0x26337d=await this[_0x32a43a(0x225)][_0x32a43a(0x25a)]('/universer-api/comment/unit/'+_0xaf5c59+'/list',{'body':_0x5cfa6e}),_0x306f47=_0x262989[_0x32a43a(0x251)](_0x37264a=>_0x1f7655(_0x26337d[_0x32a43a(0x1fc)][_0x32a43a(0x22d)][_0x37264a],_0xaf5c59,_0x390a31))['filter'](Boolean);return Object[_0x32a43a(0x22f)](_0x26337d[_0x32a43a(0x1fc)][_0x32a43a(0x240)])['forEach'](_0x512c4f=>{const _0x58a42b=_0x32a43a;this[_0x58a42b(0x1fa)]['addUser'](_0x512c4f);}),_0x306f47;}['saveCommentToSnapshot'](_0x1f2f5d){return{'id':_0x1f2f5d['id'],'threadId':_0x1f2f5d['threadId'],'ref':_0x1f2f5d['ref']};}};_0x78f03c=_0x3feb5([_0x321f5a(0x0,_0x160b92[_0xba9176(0x1ee)](_0x519750[_0xba9176(0x24c)])),_0x321f5a(0x1,_0x160b92['Inject'](_0x160b92[_0xba9176(0x203)])),_0x321f5a(0x2,_0x160b92[_0xba9176(0x1ee)](_0x5f5cf2[_0xba9176(0x249)])),_0x321f5a(0x3,_0x160b92[_0xba9176(0x1ee)](_0x160b92['Injector']))],_0x78f03c);var _0x27dfc4=Object['defineProperty'],_0x332892=Object[_0xba9176(0x200)],_0x366438=(_0x4d26d5,_0x372943,_0x4ef713,_0x44f078)=>{const _0x2f3cba=_0xba9176;for(var _0x536a35=_0x44f078>0x1?void 0x0:_0x44f078?_0x332892(_0x372943,_0x4ef713):_0x372943,_0x3cae21=_0x4d26d5[_0x2f3cba(0x237)]-0x1,_0x34910e;_0x3cae21>=0x0;_0x3cae21--)(_0x34910e=_0x4d26d5[_0x3cae21])&&(_0x536a35=(_0x44f078?_0x34910e(_0x372943,_0x4ef713,_0x536a35):_0x34910e(_0x536a35))||_0x536a35);return _0x44f078&&_0x536a35&&_0x27dfc4(_0x372943,_0x4ef713,_0x536a35),_0x536a35;},_0x3b5494=(_0x465311,_0x2c7ca1)=>(_0x9a3ae3,_0x2f64d9)=>_0x2c7ca1(_0x9a3ae3,_0x2f64d9,_0x465311);let _0x1ca896=class extends _0x160b92[_0xba9176(0x1e6)]{constructor(_0x563c8f,_0x1bc32c){const _0x47b52e=_0xba9176;super(),this[_0x47b52e(0x1f0)]=_0x563c8f,this[_0x47b52e(0x22e)]=_0x1bc32c,this[_0x47b52e(0x1fb)]();}['_initDataSource'](){const _0x540ed6=_0xba9176;this['_threadCommentDataSourceService']['dataSource']=this[_0x540ed6(0x22e)],this[_0x540ed6(0x1f0)][_0x540ed6(0x229)]=!0x1;}};_0x1ca896=_0x366438([_0x3b5494(0x0,_0x366c04[_0xba9176(0x246)]),_0x3b5494(0x1,_0x160b92['Inject'](_0x78f03c))],_0x1ca896);var _0x4bcbc0=Object[_0xba9176(0x1e1)],_0x56940d=Object[_0xba9176(0x200)],_0x18e835=(_0xbd2c76,_0x4a449c,_0x23bb9b)=>_0x4a449c in _0xbd2c76?_0x4bcbc0(_0xbd2c76,_0x4a449c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23bb9b}):_0xbd2c76[_0x4a449c]=_0x23bb9b,_0x41b32e=(_0x3547bf,_0x31dea1,_0x11b543,_0x32cd80)=>{const _0x567daf=_0xba9176;for(var _0x3cb2df=_0x32cd80>0x1?void 0x0:_0x32cd80?_0x56940d(_0x31dea1,_0x11b543):_0x31dea1,_0x296d61=_0x3547bf[_0x567daf(0x237)]-0x1,_0x4c21df;_0x296d61>=0x0;_0x296d61--)(_0x4c21df=_0x3547bf[_0x296d61])&&(_0x3cb2df=(_0x32cd80?_0x4c21df(_0x31dea1,_0x11b543,_0x3cb2df):_0x4c21df(_0x3cb2df))||_0x3cb2df);return _0x32cd80&&_0x3cb2df&&_0x4bcbc0(_0x31dea1,_0x11b543,_0x3cb2df),_0x3cb2df;},_0x1c8dbc=(_0xa91c0f,_0x273bbd)=>(_0xb27f7,_0x5e93fa)=>_0x273bbd(_0xb27f7,_0x5e93fa,_0xa91c0f),_0x17247c=(_0x15c3f1,_0x4559d0,_0x40898f)=>_0x18e835(_0x15c3f1,typeof _0x4559d0!='symbol'?_0x4559d0+'':_0x4559d0,_0x40898f);_0x2718f4['UniverThreadCommentDataSourcePlugin']=class extends _0x160b92['Plugin']{constructor(_0x55017a=_0x5d8a00,_0x17a784,_0x566a75){const _0x331f16=_0xba9176;super(),this[_0x331f16(0x220)]=_0x55017a,this[_0x331f16(0x20c)]=_0x17a784,this[_0x331f16(0x1db)]=_0x566a75;const {..._0x8b8f34}=_0x160b92['merge']({},_0x5d8a00,this['_config']);this[_0x331f16(0x1db)][_0x331f16(0x23a)](_0x332b0e,_0x8b8f34);}[_0xba9176(0x20e)](){const _0x39ba51=_0xba9176;[[_0x78f03c],[_0x1ca896],[_0x382135]][_0x39ba51(0x1e0)](_0x2a6f96=>{const _0x5e495c=_0x39ba51;this[_0x5e495c(0x20c)][_0x5e495c(0x238)](_0x2a6f96);});}[_0xba9176(0x23f)](){const _0x2787c4=_0xba9176;this[_0x2787c4(0x20c)][_0x2787c4(0x234)](_0x1ca896),this[_0x2787c4(0x20c)]['get'](_0x382135);}},_0x17247c(_0x2718f4['UniverThreadCommentDataSourcePlugin'],_0xba9176(0x205),_0x522b00),_0x17247c(_0x2718f4['UniverThreadCommentDataSourcePlugin'],_0xba9176(0x1ea),_0x160b92[_0xba9176(0x245)]['UNIVER_UNKNOWN']),_0x2718f4[_0xba9176(0x21d)]=_0x41b32e([_0x160b92[_0xba9176(0x208)](_0x160ee0[_0xba9176(0x222)],_0x5f5cf2[_0xba9176(0x235)],_0xea7ec2[_0xba9176(0x243)]),_0x1c8dbc(0x1,_0x160b92[_0xba9176(0x1ee)](_0x160b92[_0xba9176(0x1de)])),_0x1c8dbc(0x2,_0x160b92[_0xba9176(0x233)])],_0x2718f4[_0xba9176(0x21d)]),Object[_0xba9176(0x1e1)](_0x2718f4,Symbol[_0xba9176(0x1f7)],{'value':_0xba9176(0x20b)});}));
|
|
1
|
+
function _0x3663(_0x34ba98,_0x76873){const _0x17a816=_0x17a8();return _0x3663=function(_0x36638b,_0x17618c){_0x36638b=_0x36638b-0x1d1;let _0x5dc8fb=_0x17a816[_0x36638b];return _0x5dc8fb;},_0x3663(_0x34ba98,_0x76873);}(function(_0x4fe2d6,_0x2cfe17){const _0x5ab82d=_0x3663,_0x2536b5=_0x4fe2d6();while(!![]){try{const _0x4b9ba9=-parseInt(_0x5ab82d(0x20c))/0x1+-parseInt(_0x5ab82d(0x251))/0x2+-parseInt(_0x5ab82d(0x238))/0x3*(-parseInt(_0x5ab82d(0x24f))/0x4)+-parseInt(_0x5ab82d(0x1ee))/0x5+-parseInt(_0x5ab82d(0x206))/0x6+parseInt(_0x5ab82d(0x1e7))/0x7*(parseInt(_0x5ab82d(0x23a))/0x8)+parseInt(_0x5ab82d(0x234))/0x9*(parseInt(_0x5ab82d(0x242))/0xa);if(_0x4b9ba9===_0x2cfe17)break;else _0x2536b5['push'](_0x2536b5['shift']());}catch(_0x478031){_0x2536b5['push'](_0x2536b5['shift']());}}}(_0x17a8,0x2710f),function(_0x5f5291,_0x1bf399){const _0x26d9ce=_0x3663;typeof exports==_0x26d9ce(0x243)&&typeof module<'u'?_0x1bf399(exports,require(_0x26d9ce(0x1e9)),require('@univerjs-pro/license'),require(_0x26d9ce(0x204)),require(_0x26d9ce(0x22b)),require('@univerjs/thread-comment'),require(_0x26d9ce(0x22d)),require(_0x26d9ce(0x24b))):typeof define==_0x26d9ce(0x1d2)&&define[_0x26d9ce(0x248)]?define(['exports',_0x26d9ce(0x1e9),'@univerjs-pro/license',_0x26d9ce(0x204),_0x26d9ce(0x22b),_0x26d9ce(0x241),_0x26d9ce(0x22d),'@univerjs/network'],_0x1bf399):(_0x5f5291=typeof globalThis<'u'?globalThis:_0x5f5291||self,_0x1bf399(_0x5f5291[_0x26d9ce(0x209)]={},_0x5f5291['UniverProCollaborationClient'],_0x5f5291[_0x26d9ce(0x1d5)],_0x5f5291[_0x26d9ce(0x246)],_0x5f5291[_0x26d9ce(0x219)],_0x5f5291['UniverThreadComment'],_0x5f5291[_0x26d9ce(0x22d)],_0x5f5291[_0x26d9ce(0x21f)]));}(this,function(_0x1efa69,_0x4d245d,_0x19f981,_0x476eec,_0x5bff04,_0xfcf424,_0x5482e9,_0x3f1f8c){'use strict';const _0x3e294a=_0x3663;const _0x380b7e=_0x3e294a(0x1df);var _0x4c58e7=(_0x53ab49=>(_0x53ab49[_0x53ab49[_0x3e294a(0x1f1)]=0x0]=_0x3e294a(0x1f1),_0x53ab49[_0x53ab49[_0x3e294a(0x229)]=0x1]=_0x3e294a(0x229),_0x53ab49[_0x53ab49[_0x3e294a(0x1e5)]=-0x1]='UNRECOGNIZED',_0x53ab49))(_0x4c58e7||{}),_0xe24067=(_0xdc9655=>(_0xdc9655[_0xdc9655['Unknown']=0x0]=_0x3e294a(0x221),_0xdc9655[_0xdc9655[_0x3e294a(0x1fa)]=0x1]=_0x3e294a(0x1fa),_0xdc9655[_0xdc9655[_0x3e294a(0x1eb)]=0x2]='Reply',_0xdc9655[_0xdc9655[_0x3e294a(0x257)]=0x3]='Edit',_0xdc9655[_0xdc9655['Delete']=0x4]=_0x3e294a(0x1e0),_0xdc9655[_0xdc9655[_0x3e294a(0x239)]=0x5]='Solve',_0xdc9655[_0xdc9655[_0x3e294a(0x1e5)]=-0x1]=_0x3e294a(0x1e5),_0xdc9655))(_0xe24067||{});const _0x3eba5b=_0x55d94d=>_0x476eec['dayjs'](new Date(+_0x55d94d))['format'](_0x3e294a(0x252)),_0x24d62e=async(_0x593418,_0x5327a8)=>{const _0x2a0ffa=_0x3e294a,_0x240d7f=_0x593418[_0x2a0ffa(0x224)](_0x476eec['UserManagerService']),_0x5de257=_0x593418[_0x2a0ffa(0x224)](_0x3f1f8c[_0x2a0ffa(0x21d)]);_0x5327a8[_0x2a0ffa(0x210)](_0x523aaf=>{const _0x35d37b=_0x2a0ffa;_0x240d7f[_0x35d37b(0x222)](_0x523aaf)&&_0x5327a8['delete'](_0x523aaf);}),_0x5327a8['size']&&(await _0x5de257['get'](_0x2a0ffa(0x226),{'params':{'userIDs':[..._0x5327a8]}}))[_0x2a0ffa(0x1f0)][_0x2a0ffa(0x228)][_0x2a0ffa(0x210)](_0x44fc0c=>{const _0x5a1a83=_0x2a0ffa;_0x44fc0c&&_0x240d7f[_0x5a1a83(0x1ed)](_0x44fc0c);});};var _0x2ae0fd=Object[_0x3e294a(0x231)],_0x134253=Object[_0x3e294a(0x245)],_0x45db67=(_0x2b25c5,_0x4c1c66,_0x42167c,_0x2e9eae)=>{const _0x1f574d=_0x3e294a;for(var _0x25e451=_0x2e9eae>0x1?void 0x0:_0x2e9eae?_0x134253(_0x4c1c66,_0x42167c):_0x4c1c66,_0x169b31=_0x2b25c5[_0x1f574d(0x1d7)]-0x1,_0x1ea44d;_0x169b31>=0x0;_0x169b31--)(_0x1ea44d=_0x2b25c5[_0x169b31])&&(_0x25e451=(_0x2e9eae?_0x1ea44d(_0x4c1c66,_0x42167c,_0x25e451):_0x1ea44d(_0x25e451))||_0x25e451);return _0x2e9eae&&_0x25e451&&_0x2ae0fd(_0x4c1c66,_0x42167c,_0x25e451),_0x25e451;},_0x71746=(_0x28b399,_0x25281a)=>(_0x2144b8,_0x2a380e)=>_0x25281a(_0x2144b8,_0x2a380e,_0x28b399);let _0x51f9b9=class extends _0x476eec[_0x3e294a(0x1d6)]{constructor(_0x1766c9,_0x3c106d,_0x516c96,_0x41756e){const _0x2d62d9=_0x3e294a;super(),this[_0x2d62d9(0x23b)]=_0x1766c9,this[_0x2d62d9(0x1ea)]=_0x3c106d,this[_0x2d62d9(0x23c)]=_0x516c96,this[_0x2d62d9(0x24e)]=_0x41756e,this['_init'](),this[_0x2d62d9(0x23e)]();}[_0x3e294a(0x23e)](){const _0x2c3d29=_0x3e294a;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x5482e9[_0x2c3d29(0x20f)](0x10))[_0x2c3d29(0x253)](_0xe9a313=>{const _0x388edd=_0x2c3d29,_0x457608=new Set();_0xe9a313[_0x388edd(0x210)](_0x128d71=>{const _0x591b56=_0x388edd;switch(_0x128d71['type']){case'add':{const _0x41039d=_0x128d71[_0x591b56(0x20e)]['personId'];_0x457608[_0x591b56(0x203)](_0x41039d);break;}}}),_0x24d62e(this[_0x388edd(0x24e)],_0x457608);}));}[_0x3e294a(0x233)](){const _0x7fb4ad=_0x3e294a;this['disposeWithMe'](this[_0x7fb4ad(0x23b)][_0x7fb4ad(0x1f9)][_0x7fb4ad(0x253)](async _0x1d815a=>{const _0x47776a=_0x7fb4ad;var _0x638c26,_0x375bac,_0x37bc8b,_0x2e9fbf;const _0x186566=(_0x638c26=this[_0x47776a(0x1ea)][_0x47776a(0x1e8)](_0x1d815a[_0x47776a(0x232)])[_0x47776a(0x207)](_0x34ae84=>_0x34ae84['threadId']===_0x1d815a[_0x47776a(0x1ef)]))==null?void 0x0:_0x638c26[_0x47776a(0x22a)];if(!_0x186566)return;const {unitId:_0x4b08ec,subUnitId:_0x12ae2b}=_0x186566;switch(_0x1d815a[_0x47776a(0x200)]&&this['_userService'][_0x47776a(0x1ed)](_0x1d815a[_0x47776a(0x200)]),_0x1d815a['type']){case _0xe24067[_0x47776a(0x1fa)]:break;case _0xe24067['Reply']:{this[_0x47776a(0x1ea)][_0x47776a(0x20a)](_0x4b08ec,_0x12ae2b,{'unitId':_0x4b08ec,'subUnitId':_0x12ae2b,'ref':'','id':_0x1d815a['replyId'],'dT':_0x3eba5b(+_0x1d815a[_0x47776a(0x23f)]),'threadId':_0x1d815a[_0x47776a(0x1ef)],'personId':(_0x37bc8b=(_0x375bac=_0x1d815a[_0x47776a(0x200)])==null?void 0x0:_0x375bac[_0x47776a(0x20b)])!=null?_0x37bc8b:_0x1d815a[_0x47776a(0x1d4)],'text':JSON['parse'](_0x1d815a['content']),'parentId':_0x186566['id']});break;}case _0xe24067[_0x47776a(0x1e0)]:{const _0xa66673=this[_0x47776a(0x1ea)]['getComment'](_0x4b08ec,_0x12ae2b,_0x1d815a['replyId']);_0xa66673&&_0xa66673[_0x47776a(0x211)]&&this[_0x47776a(0x1ea)][_0x47776a(0x236)](_0x4b08ec,_0x12ae2b,_0x1d815a[_0x47776a(0x230)]);break;}case _0xe24067['Edit']:{this[_0x47776a(0x1ea)]['updateComment'](_0x4b08ec,_0x12ae2b,{'commentId':_0x1d815a['replyId'],'text':JSON[_0x47776a(0x218)](_0x1d815a[_0x47776a(0x1f2)])});break;}case _0xe24067['Solve']:{const _0x40898e=(_0x2e9fbf=this['_threadCommentModel']['getUnit'](_0x1d815a[_0x47776a(0x232)])[_0x47776a(0x207)](_0x19e519=>_0x19e519[_0x47776a(0x1ef)]===_0x1d815a[_0x47776a(0x1ef)]))==null?void 0x0:_0x2e9fbf[_0x47776a(0x22a)];_0x40898e&&this[_0x47776a(0x1ea)][_0x47776a(0x1e1)](_0x4b08ec,_0x12ae2b,_0x40898e['id'],_0x1d815a[_0x47776a(0x237)]===_0x4c58e7['Solved']);break;}}}));}};_0x51f9b9=_0x45db67([_0x71746(0x0,_0x476eec['Inject'](_0x4d245d[_0x3e294a(0x212)])),_0x71746(0x1,_0x476eec['Inject'](_0xfcf424[_0x3e294a(0x255)])),_0x71746(0x2,_0x476eec[_0x3e294a(0x208)](_0x476eec['UserManagerService'])),_0x71746(0x3,_0x476eec[_0x3e294a(0x208)](_0x476eec['Injector']))],_0x51f9b9);const _0x14994f=_0x3e294a(0x1e2),_0xdcb753={};var _0x3e13eb=Object[_0x3e294a(0x231)],_0x5d6a1e=Object['getOwnPropertyDescriptor'],_0x40c353=(_0x41b4b9,_0x6d2f1b,_0x3eb7e8,_0x2ed277)=>{const _0x5a841f=_0x3e294a;for(var _0x99c1c0=_0x2ed277>0x1?void 0x0:_0x2ed277?_0x5d6a1e(_0x6d2f1b,_0x3eb7e8):_0x6d2f1b,_0x1491f8=_0x41b4b9[_0x5a841f(0x1d7)]-0x1,_0xa915bc;_0x1491f8>=0x0;_0x1491f8--)(_0xa915bc=_0x41b4b9[_0x1491f8])&&(_0x99c1c0=(_0x2ed277?_0xa915bc(_0x6d2f1b,_0x3eb7e8,_0x99c1c0):_0xa915bc(_0x99c1c0))||_0x99c1c0);return _0x2ed277&&_0x99c1c0&&_0x3e13eb(_0x6d2f1b,_0x3eb7e8,_0x99c1c0),_0x99c1c0;},_0x585dbc=(_0x2a65ab,_0x1a5167)=>(_0x43c6ec,_0x1cb495)=>_0x1a5167(_0x43c6ec,_0x1cb495,_0x2a65ab);function _0x4d1c3f(_0x3974ad,_0x21668f){const _0x49f871=_0x3e294a,_0x4aa73c=_0x3974ad[_0x49f871(0x23d)][0x0];return{..._0x21668f,'id':_0x4aa73c[_0x49f871(0x230)],'resolved':_0x3974ad[_0x49f871(0x237)]===0x1,'dT':_0x3eba5b(_0x4aa73c[_0x49f871(0x23f)]),'personId':_0x4aa73c[_0x49f871(0x1d4)],'threadId':_0x4aa73c['threadId']};}function _0x5af800(_0xbe5010,_0x4ae72c,_0x21e231){const _0x5d8f9a=_0x3e294a;var _0x3f49ab,_0x17da88;if(((_0x17da88=(_0x3f49ab=_0xbe5010==null?void 0x0:_0xbe5010['replies'])==null?void 0x0:_0x3f49ab['length'])!=null?_0x17da88:0x0)>0x0){const _0x2fa691=(_0x25ad1f,_0x5de307)=>({'id':_0x25ad1f['replyId'],'threadId':_0x25ad1f[_0x5d8f9a(0x1ef)],'dT':_0x3eba5b(_0x25ad1f['createTimestamp']),'personId':_0x25ad1f[_0x5d8f9a(0x1d4)],'resolved':_0xbe5010[_0x5d8f9a(0x237)]===_0x4c58e7[_0x5d8f9a(0x229)],'unitId':_0x4ae72c,'subUnitId':_0x21e231,'text':JSON[_0x5d8f9a(0x218)](_0x25ad1f['content']),'parentId':_0x5de307}),_0x30abbd=_0x2fa691(_0xbe5010['replies'][0x0]);return{..._0x30abbd,'children':_0xbe5010[_0x5d8f9a(0x23d)]['slice'](0x1)['map'](_0x30adfc=>_0x2fa691(_0x30adfc,_0x30abbd['id']))};}return null;}let _0x1dacc1=class{constructor(_0x44ffe6,_0x267385,_0x131bee,_0x32ef60){const _0x1f4b22=_0x3e294a;this[_0x1f4b22(0x1dd)]=_0x44ffe6,this['_userService']=_0x267385,this[_0x1f4b22(0x223)]=_0x131bee,this[_0x1f4b22(0x24e)]=_0x32ef60;}async[_0x3e294a(0x20a)](_0x54f3cf){const _0x309e0e=_0x3e294a;var _0x45b921,_0x408933;const {parentId:_0xb095a4,unitId:_0x98ed81,text:_0x479cc7,threadId:_0x2a2e1a}=_0x54f3cf,_0x46a346=(_0x408933=(_0x45b921=_0x479cc7[_0x309e0e(0x21a)])==null?void 0x0:_0x45b921['filter'](_0xe9a4f1=>_0xe9a4f1[_0x309e0e(0x247)]===_0x476eec[_0x309e0e(0x227)][_0x309e0e(0x254)])[_0x309e0e(0x1ff)](_0x5e11d0=>_0x5e11d0[_0x309e0e(0x216)]))!=null?_0x408933:[],_0x232715=JSON['stringify'](_0x479cc7),_0x6b02df=(await this['_sessionService']['requireSession'](_0x98ed81))[_0x309e0e(0x1da)]();if(_0xb095a4){const _0xe816ee={'memberId':_0x6b02df,'unitId':_0x98ed81,'content':_0x232715,'mention':_0x46a346,'threadId':_0x2a2e1a},_0x538eb1=(await this[_0x309e0e(0x1dd)][_0x309e0e(0x205)](_0x309e0e(0x1de)+_0x98ed81+_0x309e0e(0x249),{'body':_0xe816ee}))[_0x309e0e(0x1f0)][_0x309e0e(0x24c)];return{..._0x54f3cf,'id':_0x538eb1['replyId'],'dT':_0x476eec[_0x309e0e(0x1fc)](+_0x538eb1['createTimestamp'])[_0x309e0e(0x217)](_0x309e0e(0x252)),'personId':_0x538eb1[_0x309e0e(0x1d4)]};}else{const _0x5119ea={'memberId':_0x6b02df,'unitId':_0x98ed81,'content':_0x232715,'mention':_0x46a346},_0x4b9e60=await this[_0x309e0e(0x1dd)]['post'](_0x309e0e(0x1de)+_0x98ed81+'/add',{'body':_0x5119ea});return _0x4d1c3f(_0x4b9e60['body']['comment'],_0x54f3cf);}}async[_0x3e294a(0x1e6)](_0x528069){const _0x210779=_0x3e294a;var _0x4b98d6,_0x4c79e6;const {text:_0x4e3523,unitId:_0x20d06c}=_0x528069,_0x1cefc1=(_0x4c79e6=(_0x4b98d6=_0x4e3523[_0x210779(0x21a)])==null?void 0x0:_0x4b98d6[_0x210779(0x21b)](_0x4b1c50=>_0x4b1c50[_0x210779(0x247)]===_0x476eec[_0x210779(0x227)][_0x210779(0x254)])[_0x210779(0x1ff)](_0x5ed1ee=>_0x5ed1ee['rangeId']))!=null?_0x4c79e6:[],_0x58464c=JSON[_0x210779(0x1dc)](_0x4e3523),_0x3c1cfb=_0x528069[_0x210779(0x1ef)],_0x2a6c22=_0x528069['id'],_0x2e8935={'memberId':(await this['_sessionService']['requireSession'](_0x20d06c))[_0x210779(0x1da)](),'unitId':_0x20d06c,'threadId':_0x3c1cfb,'mention':_0x1cefc1,'content':_0x58464c,'replyId':_0x2a6c22},_0x32b7aa=await this[_0x210779(0x1dd)][_0x210779(0x205)](_0x210779(0x1de)+_0x20d06c+_0x210779(0x1fd),{'body':_0x2e8935});return!_0x32b7aa[_0x210779(0x1f0)][_0x210779(0x250)]||_0x32b7aa['body'][_0x210779(0x250)][_0x210779(0x244)]===0x1;}async[_0x3e294a(0x1e1)](_0x2a71d0){const _0x10b82b=_0x3e294a,{unitId:_0x36d656}=_0x2a71d0,_0x56f46a=_0x2a71d0[_0x10b82b(0x1ef)],_0x43eff7={'memberId':this[_0x10b82b(0x23c)]['getCurrentUser']()[_0x10b82b(0x20b)],'unitId':_0x36d656,'threadId':_0x56f46a,'solved':_0x2a71d0[_0x10b82b(0x215)]?_0x4c58e7[_0x10b82b(0x229)]:_0x4c58e7[_0x10b82b(0x1f1)]},_0x4616f5=await this[_0x10b82b(0x1dd)][_0x10b82b(0x205)](_0x10b82b(0x1de)+_0x36d656+_0x10b82b(0x1d8),{'body':_0x43eff7});return!_0x4616f5['body'][_0x10b82b(0x250)]||_0x4616f5['body'][_0x10b82b(0x250)][_0x10b82b(0x244)]===0x1;}async[_0x3e294a(0x236)](_0x2e2ba9,_0x5987f1,_0x573a80,_0x26e41d){const _0x53962c=_0x3e294a,_0x3f61cd={'memberId':(await this[_0x53962c(0x223)][_0x53962c(0x21e)](_0x2e2ba9))[_0x53962c(0x1da)](),'threadId':_0x573a80,'replyId':_0x26e41d,'unitId':_0x2e2ba9},_0x41f6bd=await this['_httpService'][_0x53962c(0x205)](_0x53962c(0x1de)+_0x2e2ba9+_0x53962c(0x22f),{'body':_0x3f61cd});return!_0x41f6bd[_0x53962c(0x1f0)][_0x53962c(0x250)]||_0x41f6bd[_0x53962c(0x1f0)]['error'][_0x53962c(0x244)]===0x1;}async[_0x3e294a(0x1ec)](_0x146978,_0x5a8262,_0xc13d59){const _0x293d8c=_0x3e294a,_0x2996ea={'unitId':_0x146978,'threadId':_0xc13d59},_0x12a10b=await this[_0x293d8c(0x1dd)]['post'](_0x293d8c(0x1de)+_0x146978+_0x293d8c(0x1d3),{'body':_0x2996ea}),_0x288161=_0xc13d59[_0x293d8c(0x1ff)](_0x6cf263=>_0x5af800(_0x12a10b[_0x293d8c(0x1f0)][_0x293d8c(0x256)][_0x6cf263],_0x146978,_0x5a8262))['filter'](Boolean);return Object[_0x293d8c(0x202)](_0x12a10b['body'][_0x293d8c(0x228)])[_0x293d8c(0x210)](_0x38e1dd=>{const _0xaff1c3=_0x293d8c;this['_userService'][_0xaff1c3(0x1ed)](_0x38e1dd);}),_0x288161;}[_0x3e294a(0x220)](_0x5de62b){return{'id':_0x5de62b['id'],'threadId':_0x5de62b['threadId'],'ref':_0x5de62b['ref']};}};_0x1dacc1=_0x40c353([_0x585dbc(0x0,_0x476eec[_0x3e294a(0x208)](_0x3f1f8c['HTTPService'])),_0x585dbc(0x1,_0x476eec[_0x3e294a(0x208)](_0x476eec[_0x3e294a(0x1e3)])),_0x585dbc(0x2,_0x476eec[_0x3e294a(0x208)](_0x4d245d[_0x3e294a(0x213)])),_0x585dbc(0x3,_0x476eec[_0x3e294a(0x208)](_0x476eec[_0x3e294a(0x1f8)]))],_0x1dacc1);var _0x26d19d=Object['defineProperty'],_0x75aa3f=Object[_0x3e294a(0x245)],_0xd87127=(_0x23610e,_0x2cf505,_0x31429f,_0x6f56c1)=>{const _0x1ededc=_0x3e294a;for(var _0x5ac461=_0x6f56c1>0x1?void 0x0:_0x6f56c1?_0x75aa3f(_0x2cf505,_0x31429f):_0x2cf505,_0x24a1b9=_0x23610e[_0x1ededc(0x1d7)]-0x1,_0x2a6ad9;_0x24a1b9>=0x0;_0x24a1b9--)(_0x2a6ad9=_0x23610e[_0x24a1b9])&&(_0x5ac461=(_0x6f56c1?_0x2a6ad9(_0x2cf505,_0x31429f,_0x5ac461):_0x2a6ad9(_0x5ac461))||_0x5ac461);return _0x6f56c1&&_0x5ac461&&_0x26d19d(_0x2cf505,_0x31429f,_0x5ac461),_0x5ac461;},_0x301d1b=(_0x5afdcf,_0x11f077)=>(_0x3b7aef,_0x428e2c)=>_0x11f077(_0x3b7aef,_0x428e2c,_0x5afdcf);let _0x3681c6=class extends _0x476eec['Disposable']{constructor(_0x465275,_0x1bac0a){const _0x3901f4=_0x3e294a;super(),this[_0x3901f4(0x1f4)]=_0x465275,this['_threadCommentDataSource']=_0x1bac0a,this['_initDataSource']();}[_0x3e294a(0x1fe)](){const _0x2933b8=_0x3e294a;this[_0x2933b8(0x1f4)][_0x2933b8(0x1e4)]=this[_0x2933b8(0x1f7)],this[_0x2933b8(0x1f4)][_0x2933b8(0x24d)]=!0x1;}};_0x3681c6=_0xd87127([_0x301d1b(0x0,_0xfcf424[_0x3e294a(0x1f3)]),_0x301d1b(0x1,_0x476eec[_0x3e294a(0x208)](_0x1dacc1))],_0x3681c6);var _0x125270=Object['defineProperty'],_0x485858=Object['getOwnPropertyDescriptor'],_0x340507=(_0x24f6a9,_0x3953f7,_0x5fd6f3)=>_0x3953f7 in _0x24f6a9?_0x125270(_0x24f6a9,_0x3953f7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5fd6f3}):_0x24f6a9[_0x3953f7]=_0x5fd6f3,_0x187bc9=(_0x1ae1bc,_0x5f2e77,_0x87263e,_0x2756bf)=>{const _0x59ea9b=_0x3e294a;for(var _0x5e7906=_0x2756bf>0x1?void 0x0:_0x2756bf?_0x485858(_0x5f2e77,_0x87263e):_0x5f2e77,_0x2fc6fe=_0x1ae1bc[_0x59ea9b(0x1d7)]-0x1,_0x22355b;_0x2fc6fe>=0x0;_0x2fc6fe--)(_0x22355b=_0x1ae1bc[_0x2fc6fe])&&(_0x5e7906=(_0x2756bf?_0x22355b(_0x5f2e77,_0x87263e,_0x5e7906):_0x22355b(_0x5e7906))||_0x5e7906);return _0x2756bf&&_0x5e7906&&_0x125270(_0x5f2e77,_0x87263e,_0x5e7906),_0x5e7906;},_0x2f92d2=(_0x5c57bd,_0xad792e)=>(_0x1e32fb,_0x2295bc)=>_0xad792e(_0x1e32fb,_0x2295bc,_0x5c57bd),_0xa42806=(_0x5f6c4e,_0x55b0c8,_0x3ac180)=>_0x340507(_0x5f6c4e,typeof _0x55b0c8!=_0x3e294a(0x240)?_0x55b0c8+'':_0x55b0c8,_0x3ac180);_0x1efa69[_0x3e294a(0x1d9)]=class extends _0x476eec[_0x3e294a(0x21c)]{constructor(_0x561332=_0xdcb753,_0xa9b4f8,_0x5b6f3f){const _0x218a1a=_0x3e294a;super(),this[_0x218a1a(0x235)]=_0x561332,this[_0x218a1a(0x24e)]=_0xa9b4f8,this['_configService']=_0x5b6f3f;const {..._0x266942}=_0x476eec[_0x218a1a(0x1fb)]({},_0xdcb753,this[_0x218a1a(0x235)]);this['_configService'][_0x218a1a(0x22c)](_0x14994f,_0x266942);}[_0x3e294a(0x214)](){const _0xced05d=_0x3e294a;[[_0x1dacc1],[_0x3681c6],[_0x51f9b9]][_0xced05d(0x210)](_0x37a1c1=>{const _0x220b20=_0xced05d;this[_0x220b20(0x24e)]['add'](_0x37a1c1);});}[_0x3e294a(0x1f6)](){const _0x4fb3bc=_0x3e294a;this[_0x4fb3bc(0x24e)][_0x4fb3bc(0x224)](_0x3681c6),this['_injector']['get'](_0x51f9b9);}},_0xa42806(_0x1efa69[_0x3e294a(0x1d9)],_0x3e294a(0x1db),_0x380b7e),_0xa42806(_0x1efa69[_0x3e294a(0x1d9)],_0x3e294a(0x20d),_0x476eec[_0x3e294a(0x201)][_0x3e294a(0x225)]),_0x1efa69[_0x3e294a(0x1d9)]=_0x187bc9([_0x476eec[_0x3e294a(0x22e)](_0x5bff04[_0x3e294a(0x1d1)],_0x4d245d['UniverCollaborationClientPlugin'],_0x19f981['UniverLicensePlugin']),_0x2f92d2(0x1,_0x476eec[_0x3e294a(0x208)](_0x476eec['Injector'])),_0x2f92d2(0x2,_0x476eec['IConfigService'])],_0x1efa69[_0x3e294a(0x1d9)]),Object[_0x3e294a(0x231)](_0x1efa69,Symbol[_0x3e294a(0x24a)],{'value':_0x3e294a(0x1f5)});}));function _0x17a8(){const _0x56fcae=['Module','onReady','_threadCommentDataSource','Injector','commentUpdate$','Add','merge','dayjs','/edit','_initDataSource','map','user','UniverInstanceType','values','add','@univerjs/core','post','1436556QArusp','find','Inject','UniverProThreadCommentDatasource','addComment','userID','260368ziZIAO','type','payload','bufferTime','forEach','parentId','CommentService','CollaborationSessionService','onStarting','resolved','rangeId','format','parse','UniverThreadCommentUi','customRanges','filter','Plugin','HTTPService','requireSession','UniverNetwork','saveCommentToSnapshot','Unknown','getUser','_sessionService','get','UNIVER_UNKNOWN','/universer-api/user/list','CustomRangeType','users','Solved','root','@univerjs/thread-comment-ui','setConfig','rxjs','DependentOn','/delete','replyId','defineProperty','unitId','_init','5265UDvXOb','_config','deleteComment','solved','3bmUKdS','Solve','180496esVtzu','_commentService','_userService','replies','_initUserSync','createTimestamp','symbol','@univerjs/thread-comment','12950DgShmi','object','code','getOwnPropertyDescriptor','UniverCore','rangeType','amd','/reply','toStringTag','@univerjs/network','reply','syncUpdateMutationToColla','_injector','81460tzjEZH','error','21714CqMklB','YYYY/MM/DD\x20HH:mm','subscribe','COMMENT','ThreadCommentModel','comments','Edit','UniverThreadCommentUIPlugin','function','/list','userId','UniverProLicense','Disposable','length','/solved','UniverThreadCommentDataSourcePlugin','getMemberID','pluginName','stringify','_httpService','/universer-api/comment/unit/','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','resolveComment','thread-comment-data-source.config','UserManagerService','dataSource','UNRECOGNIZED','updateComment','7KTQKeG','getUnit','@univerjs-pro/collaboration-client','_threadCommentModel','Reply','listComments','addUser','649180eCvFqh','threadId','body','OpenOrReOpen','content','IThreadCommentDataSourceService','_threadCommentDataSourceService'];_0x17a8=function(){return _0x56fcae;};return _0x17a8();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0-experimental.20250125-1d060b9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.0-experimental.20250125-1d060b9",
|
|
49
|
+
"@univerjs-pro/license": "0.6.0-experimental.20250125-1d060b9",
|
|
50
|
+
"@univerjs/core": "0.6.0-experimental.20250125-1d060b9",
|
|
51
|
+
"@univerjs/thread-comment": "0.6.0-experimental.20250125-1d060b9",
|
|
52
|
+
"@univerjs/network": "0.6.0-experimental.20250125-1d060b9",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.0-experimental.20250125-1d060b9",
|
|
54
|
+
"@univerjs/protocol": "0.1.42"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
|
-
"typescript": "^5.7.
|
|
58
|
+
"typescript": "^5.7.3",
|
|
59
59
|
"vite": "^6.0.7",
|
|
60
60
|
"vitest": "^2.1.8",
|
|
61
|
-
"@univerjs-infra/shared": "0.
|
|
61
|
+
"@univerjs-infra/shared": "0.6.0-alpha.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|