@univerjs-pro/thread-comment-datasource 0.12.1 → 0.12.2-experimental.20251201-5b27b55
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/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 _0x4bff12=_0x3fa3;(function(_0x35dbbf,_0x26de5b){const _0x39ba39=_0x3fa3,_0x5093da=_0x35dbbf();while(!![]){try{const _0x3ff795=parseInt(_0x39ba39(0x194))/0x1*(parseInt(_0x39ba39(0x176))/0x2)+parseInt(_0x39ba39(0x197))/0x3+-parseInt(_0x39ba39(0x18e))/0x4+-parseInt(_0x39ba39(0x141))/0x5+parseInt(_0x39ba39(0x19b))/0x6*(parseInt(_0x39ba39(0x160))/0x7)+-parseInt(_0x39ba39(0x199))/0x8+parseInt(_0x39ba39(0x191))/0x9*(-parseInt(_0x39ba39(0x186))/0xa);if(_0x3ff795===_0x26de5b)break;else _0x5093da['push'](_0x5093da['shift']());}catch(_0x268500){_0x5093da['push'](_0x5093da['shift']());}}}(_0x2437,0xc2d30));function _0x3fa3(_0x1929b4,_0x790b9b){const _0x2437cb=_0x2437();return _0x3fa3=function(_0x3fa3db,_0x41f2a4){_0x3fa3db=_0x3fa3db-0x12d;let _0x35d03d=_0x2437cb[_0x3fa3db];return _0x35d03d;},_0x3fa3(_0x1929b4,_0x790b9b);}Object[_0x4bff12(0x156)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4bff12(0x15f);var I=(_0x3ceeb3=>(_0x3ceeb3[_0x3ceeb3['OpenOrReOpen']=0x0]=_0x4bff12(0x158),_0x3ceeb3[_0x3ceeb3[_0x4bff12(0x18a)]=0x1]='Solved',_0x3ceeb3[_0x3ceeb3[_0x4bff12(0x150)]=-0x1]=_0x4bff12(0x150),_0x3ceeb3))(I||{}),v=(_0xae20c=>(_0xae20c[_0xae20c[_0x4bff12(0x193)]=0x0]=_0x4bff12(0x193),_0xae20c[_0xae20c[_0x4bff12(0x16e)]=0x1]=_0x4bff12(0x16e),_0xae20c[_0xae20c['Reply']=0x2]=_0x4bff12(0x147),_0xae20c[_0xae20c[_0x4bff12(0x16c)]=0x3]=_0x4bff12(0x16c),_0xae20c[_0xae20c[_0x4bff12(0x19e)]=0x4]=_0x4bff12(0x19e),_0xae20c[_0xae20c[_0x4bff12(0x12d)]=0x5]=_0x4bff12(0x12d),_0xae20c[_0xae20c[_0x4bff12(0x150)]=-0x1]=_0x4bff12(0x150),_0xae20c))(v||{});const f=_0x54236c=>c[_0x4bff12(0x188)](new Date(+_0x54236c))[_0x4bff12(0x1a5)](_0x4bff12(0x13c)),R=async(_0x7194ad,_0x55334c)=>{const _0x39b181=_0x4bff12,_0x5e4b79=_0x7194ad[_0x39b181(0x15b)](c[_0x39b181(0x166)]),_0x134650=_0x7194ad['get'](P['HTTPService']);_0x55334c['forEach'](_0x2e12a6=>{const _0x54ef03=_0x39b181;_0x5e4b79[_0x54ef03(0x187)](_0x2e12a6)&&_0x55334c[_0x54ef03(0x144)](_0x2e12a6);}),_0x55334c[_0x39b181(0x135)]&&(await _0x134650[_0x39b181(0x15b)](_0x39b181(0x157),{'params':{'userIDs':[..._0x55334c]}}))[_0x39b181(0x131)]['users'][_0x39b181(0x18d)](_0x1f13cd=>{const _0x55ca3c=_0x39b181;_0x1f13cd&&_0x5e4b79[_0x55ca3c(0x13b)](_0x1f13cd);});};function _0x2437(){const _0x2dc759=['3975678UIiIra','IConfigService','11085096qNsqyT','replyId','6cJqQWj','comments','thread-comment-data-source.config','Delete','COMMENT','UNIVER_UNKNOWN','resolveComment','filter','reply','code','format','Solve','_injector','UniverThreadCommentDataSourcePlugin','setConfig','body','UniverLicensePlugin','_userService','UniverThreadCommentUIPlugin','size','_threadCommentDataSource','_httpService','map','/add','getCurrentUser','addUser','YYYY/MM/DD\x20HH:mm','disposeWithMe','onStarting','rangeId','Injector','2366670cuNPCp','add','requireSession','delete','replies','_sessionService','Reply','/solved','IThreadCommentDataSourceService','_init','UniverCollaborationClientPlugin','_initDataSource','threadId','content','values','UNRECOGNIZED','createTimestamp','_threadCommentDataSourceService','DependentOn','comment','merge','defineProperty','/universer-api/user/list','OpenOrReOpen','personId','CustomRangeType','get','parentId','Plugin','Inject','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','6721274knHwvO','users','_initUserSync','CommentService','_commentService','type','UserManagerService','/list','length','getMemberID','rangeType','customRanges','Edit','_configService','Add','/delete','stringify','_threadCommentModel','/universer-api/comment/unit/','symbol','Disposable','deleteComment','4ekeBno','listComments','userID','updateComment','getComment','ThreadCommentModel','pipe','user','root','getUnit','error','subscribe','UniverInstanceType','CollaborationSessionService','/reply','parse','7162960MHTKuJ','getUser','dayjs','userId','Solved','/edit','slice','forEach','2004028mObNNU','solved','getOwnPropertyDescriptor','9YojHOp','unitId','Unknown','794433HZXmNa','payload','post'];_0x2437=function(){return _0x2dc759;};return _0x2437();}var $=Object[_0x4bff12(0x190)],E=(_0x3ef370,_0x46584c,_0x245550,_0x3de885)=>{const _0x5449e2=_0x4bff12;for(var _0x594631=_0x3de885>0x1?void 0x0:_0x3de885?$(_0x46584c,_0x245550):_0x46584c,_0x334d3e=_0x3ef370[_0x5449e2(0x168)]-0x1,_0x250470;_0x334d3e>=0x0;_0x334d3e--)(_0x250470=_0x3ef370[_0x334d3e])&&(_0x594631=_0x250470(_0x594631)||_0x594631);return _0x594631;},S=(_0xd0ab58,_0x217b9f)=>(_0x459084,_0x40cbdf)=>_0x217b9f(_0x459084,_0x40cbdf,_0xd0ab58);let _=class extends c[_0x4bff12(0x174)]{constructor(_0x58b72d,_0xaa7629,_0x1c2b68,_0x17b52a){const _0x14015d=_0x4bff12;super(),this[_0x14015d(0x164)]=_0x58b72d,this[_0x14015d(0x171)]=_0xaa7629,this[_0x14015d(0x133)]=_0x1c2b68,this[_0x14015d(0x12e)]=_0x17b52a,this[_0x14015d(0x14a)](),this[_0x14015d(0x162)]();}['_initUserSync'](){const _0x23e4ac=_0x4bff12;this[_0x23e4ac(0x13d)](this['_threadCommentModel']['commentUpdate$'][_0x23e4ac(0x17c)](j['bufferTime'](0x10))[_0x23e4ac(0x181)](_0x1c2cf4=>{const _0x18e2bd=_0x23e4ac,_0x580815=new Set();_0x1c2cf4[_0x18e2bd(0x18d)](_0x3f763a=>{const _0x3dc7fe=_0x18e2bd;switch(_0x3f763a[_0x3dc7fe(0x165)]){case _0x3dc7fe(0x142):{const _0x31af00=_0x3f763a[_0x3dc7fe(0x195)][_0x3dc7fe(0x159)];_0x580815[_0x3dc7fe(0x142)](_0x31af00);break;}}}),R(this[_0x18e2bd(0x12e)],_0x580815);}));}[_0x4bff12(0x14a)](){const _0x1cc51b=_0x4bff12;this[_0x1cc51b(0x13d)](this[_0x1cc51b(0x164)]['commentUpdate$'][_0x1cc51b(0x181)](async _0x2952b5=>{const _0x5780fb=_0x1cc51b;var _0x4a44ad,_0x1fc45c,_0xcd0030,_0x1685fa;const _0x26f005=(_0x4a44ad=this['_threadCommentModel'][_0x5780fb(0x17f)](_0x2952b5[_0x5780fb(0x192)])['find'](_0x27a152=>_0x27a152['threadId']===_0x2952b5[_0x5780fb(0x14d)]))==null?void 0x0:_0x4a44ad[_0x5780fb(0x17e)];if(!_0x26f005)return;const {unitId:_0x19ec2c,subUnitId:_0x2dd38a}=_0x26f005;switch(_0x2952b5[_0x5780fb(0x17d)]&&this[_0x5780fb(0x133)]['addUser'](_0x2952b5[_0x5780fb(0x17d)]),_0x2952b5[_0x5780fb(0x165)]){case v['Add']:break;case v[_0x5780fb(0x147)]:{this[_0x5780fb(0x171)]['addComment'](_0x19ec2c,_0x2dd38a,{'unitId':_0x19ec2c,'subUnitId':_0x2dd38a,'ref':'','id':_0x2952b5[_0x5780fb(0x19a)],'dT':f(+_0x2952b5[_0x5780fb(0x151)]),'threadId':_0x2952b5[_0x5780fb(0x14d)],'personId':(_0xcd0030=(_0x1fc45c=_0x2952b5['user'])==null?void 0x0:_0x1fc45c[_0x5780fb(0x178)])!=null?_0xcd0030:_0x2952b5[_0x5780fb(0x189)],'text':JSON[_0x5780fb(0x185)](_0x2952b5['content']),'parentId':_0x26f005['id']});break;}case v[_0x5780fb(0x19e)]:{const _0x2610bd=this[_0x5780fb(0x171)][_0x5780fb(0x17a)](_0x19ec2c,_0x2dd38a,_0x2952b5[_0x5780fb(0x19a)]);_0x2610bd&&_0x2610bd[_0x5780fb(0x15c)]&&this[_0x5780fb(0x171)][_0x5780fb(0x175)](_0x19ec2c,_0x2dd38a,_0x2952b5['replyId']);break;}case v[_0x5780fb(0x16c)]:{this['_threadCommentModel'][_0x5780fb(0x179)](_0x19ec2c,_0x2dd38a,{'commentId':_0x2952b5[_0x5780fb(0x19a)],'text':JSON[_0x5780fb(0x185)](_0x2952b5[_0x5780fb(0x14e)])});break;}case v['Solve']:{const _0x15a3ec=(_0x1685fa=this[_0x5780fb(0x171)][_0x5780fb(0x17f)](_0x2952b5['unitId'])['find'](_0x20d9d4=>_0x20d9d4[_0x5780fb(0x14d)]===_0x2952b5[_0x5780fb(0x14d)]))==null?void 0x0:_0x1685fa[_0x5780fb(0x17e)];_0x15a3ec&&this[_0x5780fb(0x171)][_0x5780fb(0x1a1)](_0x19ec2c,_0x2dd38a,_0x15a3ec['id'],_0x2952b5['solved']===I[_0x5780fb(0x18a)]);break;}}}));}};_=E([S(0x0,c[_0x4bff12(0x15e)](b[_0x4bff12(0x163)])),S(0x1,c['Inject'](M[_0x4bff12(0x17b)])),S(0x2,c['Inject'](c[_0x4bff12(0x166)])),S(0x3,c[_0x4bff12(0x15e)](c[_0x4bff12(0x140)]))],_);const q=_0x4bff12(0x19d),D={};var A=Object[_0x4bff12(0x190)],x=(_0x46068c,_0x37de42,_0xb272a5,_0x347295)=>{const _0x4711ee=_0x4bff12;for(var _0x3ba1d1=_0x347295>0x1?void 0x0:_0x347295?A(_0x37de42,_0xb272a5):_0x37de42,_0x2efd98=_0x46068c[_0x4711ee(0x168)]-0x1,_0x55d7ef;_0x2efd98>=0x0;_0x2efd98--)(_0x55d7ef=_0x46068c[_0x2efd98])&&(_0x3ba1d1=_0x55d7ef(_0x3ba1d1)||_0x3ba1d1);return _0x3ba1d1;},C=(_0xcdb6f6,_0x269e2b)=>(_0x4b5a1d,_0x159f0d)=>_0x269e2b(_0x4b5a1d,_0x159f0d,_0xcdb6f6);function Y(_0x30343b,_0x14fd29){const _0x3c935e=_0x4bff12,_0x21ae49=_0x30343b[_0x3c935e(0x145)][0x0];return{..._0x14fd29,'id':_0x21ae49['replyId'],'resolved':_0x30343b['solved']===0x1,'dT':f(_0x21ae49[_0x3c935e(0x151)]),'personId':_0x21ae49[_0x3c935e(0x189)],'threadId':_0x21ae49['threadId']};}function G(_0x485786,_0x3688dd,_0x53da58){const _0x2ee07c=_0x4bff12;var _0x4b86bb,_0x88953d;if(((_0x88953d=(_0x4b86bb=_0x485786==null?void 0x0:_0x485786['replies'])==null?void 0x0:_0x4b86bb[_0x2ee07c(0x168)])!=null?_0x88953d:0x0)>0x0){const _0x1d0603=(_0x29eff3,_0x2e0b3c)=>({'id':_0x29eff3[_0x2ee07c(0x19a)],'threadId':_0x29eff3[_0x2ee07c(0x14d)],'dT':f(_0x29eff3[_0x2ee07c(0x151)]),'personId':_0x29eff3[_0x2ee07c(0x189)],'resolved':_0x485786[_0x2ee07c(0x18f)]===I[_0x2ee07c(0x18a)],'unitId':_0x3688dd,'subUnitId':_0x53da58,'text':JSON[_0x2ee07c(0x185)](_0x29eff3['content']),'parentId':_0x2e0b3c}),_0x28adfd=_0x1d0603(_0x485786[_0x2ee07c(0x145)][0x0]);return{..._0x28adfd,'children':_0x485786[_0x2ee07c(0x145)][_0x2ee07c(0x18c)](0x1)[_0x2ee07c(0x138)](_0x3f7387=>_0x1d0603(_0x3f7387,_0x28adfd['id']))};}return null;}let p=class{constructor(_0x2369b6,_0x21224a,_0xa849b4){const _0x61d927=_0x4bff12;this[_0x61d927(0x137)]=_0x2369b6,this['_userService']=_0x21224a,this[_0x61d927(0x146)]=_0xa849b4;}async['addComment'](_0x1d4b56){const _0x4ca033=_0x4bff12;var _0x21abce,_0x4cdf7b;const {parentId:_0x50d86d,unitId:_0x573d6f,text:_0x2fbf57,threadId:_0x3b6dab}=_0x1d4b56,_0x4b31b7=(_0x4cdf7b=(_0x21abce=_0x2fbf57[_0x4ca033(0x16b)])==null?void 0x0:_0x21abce[_0x4ca033(0x1a2)](_0x47d68b=>_0x47d68b['rangeType']===c[_0x4ca033(0x15a)][_0x4ca033(0x19f)])[_0x4ca033(0x138)](_0x10e10f=>_0x10e10f[_0x4ca033(0x13f)]))!=null?_0x4cdf7b:[],_0x5144f4=JSON['stringify'](_0x2fbf57),_0x5c9fd4=(await this[_0x4ca033(0x146)][_0x4ca033(0x143)](_0x573d6f))[_0x4ca033(0x169)]();if(_0x50d86d){const _0x19cb51={'memberId':_0x5c9fd4,'unitId':_0x573d6f,'content':_0x5144f4,'mention':_0x4b31b7,'threadId':_0x3b6dab},_0x395381=(await this[_0x4ca033(0x137)]['post'](_0x4ca033(0x172)+_0x573d6f+_0x4ca033(0x184),{'body':_0x19cb51}))['body'][_0x4ca033(0x1a3)];return{..._0x1d4b56,'id':_0x395381[_0x4ca033(0x19a)],'dT':c['dayjs'](+_0x395381[_0x4ca033(0x151)])[_0x4ca033(0x1a5)](_0x4ca033(0x13c)),'personId':_0x395381[_0x4ca033(0x189)]};}else{const _0x544646={'memberId':_0x5c9fd4,'unitId':_0x573d6f,'content':_0x5144f4,'mention':_0x4b31b7},_0x4143b3=await this['_httpService'][_0x4ca033(0x196)](_0x4ca033(0x172)+_0x573d6f+_0x4ca033(0x139),{'body':_0x544646});return Y(_0x4143b3[_0x4ca033(0x131)][_0x4ca033(0x154)],_0x1d4b56);}}async[_0x4bff12(0x179)](_0x11d07c){const _0x5b5a08=_0x4bff12;var _0x1a9705,_0x2283c8;const {text:_0x341bac,unitId:_0x558414}=_0x11d07c,_0x1b019d=(_0x2283c8=(_0x1a9705=_0x341bac['customRanges'])==null?void 0x0:_0x1a9705[_0x5b5a08(0x1a2)](_0x46176d=>_0x46176d[_0x5b5a08(0x16a)]===c[_0x5b5a08(0x15a)][_0x5b5a08(0x19f)])[_0x5b5a08(0x138)](_0x4da16e=>_0x4da16e[_0x5b5a08(0x13f)]))!=null?_0x2283c8:[],_0x1f0dc7=JSON[_0x5b5a08(0x170)](_0x341bac),_0x4410c5=_0x11d07c[_0x5b5a08(0x14d)],_0x3ca959=_0x11d07c['id'],_0x51196e={'memberId':(await this[_0x5b5a08(0x146)][_0x5b5a08(0x143)](_0x558414))[_0x5b5a08(0x169)](),'unitId':_0x558414,'threadId':_0x4410c5,'mention':_0x1b019d,'content':_0x1f0dc7,'replyId':_0x3ca959},_0x46dcb4=await this[_0x5b5a08(0x137)][_0x5b5a08(0x196)](_0x5b5a08(0x172)+_0x558414+_0x5b5a08(0x18b),{'body':_0x51196e});return!_0x46dcb4[_0x5b5a08(0x131)][_0x5b5a08(0x180)]||_0x46dcb4[_0x5b5a08(0x131)][_0x5b5a08(0x180)][_0x5b5a08(0x1a4)]===0x1;}async[_0x4bff12(0x1a1)](_0x1dbd66){const _0x188cbd=_0x4bff12,{unitId:_0x6abf0c}=_0x1dbd66,_0xff84e=_0x1dbd66[_0x188cbd(0x14d)],_0x55f79a={'memberId':this[_0x188cbd(0x133)][_0x188cbd(0x13a)]()[_0x188cbd(0x178)],'unitId':_0x6abf0c,'threadId':_0xff84e,'solved':_0x1dbd66['resolved']?I[_0x188cbd(0x18a)]:I[_0x188cbd(0x158)]},_0x404d0f=await this[_0x188cbd(0x137)][_0x188cbd(0x196)]('/universer-api/comment/unit/'+_0x6abf0c+_0x188cbd(0x148),{'body':_0x55f79a});return!_0x404d0f[_0x188cbd(0x131)][_0x188cbd(0x180)]||_0x404d0f[_0x188cbd(0x131)][_0x188cbd(0x180)][_0x188cbd(0x1a4)]===0x1;}async[_0x4bff12(0x175)](_0xd275b5,_0x123b36,_0x144b2d,_0x2e3c9f){const _0x2efeb2=_0x4bff12,_0x20b907={'memberId':(await this[_0x2efeb2(0x146)][_0x2efeb2(0x143)](_0xd275b5))[_0x2efeb2(0x169)](),'threadId':_0x144b2d,'replyId':_0x2e3c9f,'unitId':_0xd275b5},_0x41f9f6=await this['_httpService']['post'](_0x2efeb2(0x172)+_0xd275b5+_0x2efeb2(0x16f),{'body':_0x20b907});return!_0x41f9f6['body'][_0x2efeb2(0x180)]||_0x41f9f6[_0x2efeb2(0x131)][_0x2efeb2(0x180)][_0x2efeb2(0x1a4)]===0x1;}async[_0x4bff12(0x177)](_0x39cf12,_0x23cc12,_0x14b29b){const _0x510128=_0x4bff12,_0x95e6ef={'unitId':_0x39cf12,'threadId':_0x14b29b},_0x369f74=await this[_0x510128(0x137)][_0x510128(0x196)](_0x510128(0x172)+_0x39cf12+_0x510128(0x167),{'body':_0x95e6ef}),_0x5395fa=_0x14b29b[_0x510128(0x138)](_0x155646=>G(_0x369f74[_0x510128(0x131)][_0x510128(0x19c)][_0x155646],_0x39cf12,_0x23cc12))[_0x510128(0x1a2)](Boolean);return Object[_0x510128(0x14f)](_0x369f74[_0x510128(0x131)][_0x510128(0x161)])[_0x510128(0x18d)](_0xafaf26=>{const _0x66110e=_0x510128;this[_0x66110e(0x133)][_0x66110e(0x13b)](_0xafaf26);}),_0x5395fa;}['saveCommentToSnapshot'](_0x41831d){return{'id':_0x41831d['id'],'threadId':_0x41831d['threadId'],'ref':_0x41831d['ref']};}};p=x([C(0x0,c[_0x4bff12(0x15e)](P['HTTPService'])),C(0x1,c[_0x4bff12(0x15e)](c[_0x4bff12(0x166)])),C(0x2,c[_0x4bff12(0x15e)](b[_0x4bff12(0x183)]))],p);var H=Object[_0x4bff12(0x190)],J=(_0x1125f8,_0x184503,_0x1ba075,_0x2bc155)=>{const _0x4530c5=_0x4bff12;for(var _0x39fbb1=_0x2bc155>0x1?void 0x0:_0x2bc155?H(_0x184503,_0x1ba075):_0x184503,_0x2be498=_0x1125f8[_0x4530c5(0x168)]-0x1,_0x420257;_0x2be498>=0x0;_0x2be498--)(_0x420257=_0x1125f8[_0x2be498])&&(_0x39fbb1=_0x420257(_0x39fbb1)||_0x39fbb1);return _0x39fbb1;},y=(_0x28a309,_0x3557cc)=>(_0x2551b9,_0x51481e)=>_0x3557cc(_0x2551b9,_0x51481e,_0x28a309);let g=class extends c['Disposable']{constructor(_0x221195,_0x3c6e05){const _0x51a9d7=_0x4bff12;super(),this['_threadCommentDataSourceService']=_0x221195,this[_0x51a9d7(0x136)]=_0x3c6e05,this[_0x51a9d7(0x14c)]();}[_0x4bff12(0x14c)](){const _0x1834a5=_0x4bff12;this[_0x1834a5(0x152)]['dataSource']=this[_0x1834a5(0x136)],this[_0x1834a5(0x152)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4bff12(0x149)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object[_0x4bff12(0x190)],Z=(_0x6f3048,_0x4cf2b4,_0x27a6d4)=>_0x4cf2b4 in _0x6f3048?F(_0x6f3048,_0x4cf2b4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x27a6d4}):_0x6f3048[_0x4cf2b4]=_0x27a6d4,W=(_0x11e8af,_0x5ab9dd,_0x32ad18,_0x43f655)=>{const _0x3f8dd4=_0x4bff12;for(var _0x110160=_0x43f655>0x1?void 0x0:_0x43f655?L(_0x5ab9dd,_0x32ad18):_0x5ab9dd,_0x2a1500=_0x11e8af[_0x3f8dd4(0x168)]-0x1,_0x135241;_0x2a1500>=0x0;_0x2a1500--)(_0x135241=_0x11e8af[_0x2a1500])&&(_0x110160=_0x135241(_0x110160)||_0x110160);return _0x110160;},O=(_0x57a9f8,_0xaa1cdf)=>(_0x50b3f7,_0x229668)=>_0xaa1cdf(_0x50b3f7,_0x229668,_0x57a9f8),N=(_0x142ef8,_0x525a45,_0x5e3ec3)=>Z(_0x142ef8,typeof _0x525a45!=_0x4bff12(0x173)?_0x525a45+'':_0x525a45,_0x5e3ec3);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4bff12(0x15d)]{constructor(_0x2e0549=D,_0xccc06a,_0x1dae27){const _0x594076=_0x4bff12;super(),this['_config']=_0x2e0549,this['_injector']=_0xccc06a,this[_0x594076(0x16d)]=_0x1dae27;const {..._0x48d92f}=c[_0x594076(0x155)]({},D,this['_config']);this[_0x594076(0x16d)][_0x594076(0x130)](q,_0x48d92f);}[_0x4bff12(0x13e)](){const _0x3ec8fd=_0x4bff12;[[p],[g],[_]][_0x3ec8fd(0x18d)](_0x46f40f=>{const _0x3ebb76=_0x3ec8fd;this[_0x3ebb76(0x12e)][_0x3ebb76(0x142)](_0x46f40f);});}['onReady'](){const _0x27153c=_0x4bff12;this[_0x27153c(0x12e)]['get'](g),this[_0x27153c(0x12e)][_0x27153c(0x15b)](_);}},N(exports[_0x4bff12(0x12f)],'pluginName',U),N(exports[_0x4bff12(0x12f)],_0x4bff12(0x165),c[_0x4bff12(0x182)][_0x4bff12(0x1a0)]),exports[_0x4bff12(0x12f)]=W([c[_0x4bff12(0x153)](w[_0x4bff12(0x134)],b[_0x4bff12(0x14b)],T[_0x4bff12(0x132)]),O(0x1,c['Inject'](c[_0x4bff12(0x140)])),O(0x2,c[_0x4bff12(0x198)])],exports[_0x4bff12(0x12f)]);
|
|
1
|
+
'use strict';const _0x4f38b=_0x197d;(function(_0xaed30e,_0x2ecd97){const _0x53f5d7=_0x197d,_0x4e42ee=_0xaed30e();while(!![]){try{const _0x395cd1=-parseInt(_0x53f5d7(0x206))/0x1+-parseInt(_0x53f5d7(0x1cb))/0x2*(-parseInt(_0x53f5d7(0x1f3))/0x3)+-parseInt(_0x53f5d7(0x1d9))/0x4+parseInt(_0x53f5d7(0x1da))/0x5+parseInt(_0x53f5d7(0x222))/0x6+-parseInt(_0x53f5d7(0x202))/0x7*(parseInt(_0x53f5d7(0x1f4))/0x8)+parseInt(_0x53f5d7(0x218))/0x9;if(_0x395cd1===_0x2ecd97)break;else _0x4e42ee['push'](_0x4e42ee['shift']());}catch(_0x334fcf){_0x4e42ee['push'](_0x4e42ee['shift']());}}}(_0x35ee,0xd0adc));Object[_0x4f38b(0x1fb)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4f38b(0x1f7);var I=(_0x2cf311=>(_0x2cf311[_0x2cf311['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2cf311[_0x2cf311[_0x4f38b(0x1ee)]=0x1]='Solved',_0x2cf311[_0x2cf311['UNRECOGNIZED']=-0x1]=_0x4f38b(0x22c),_0x2cf311))(I||{}),v=(_0xe10652=>(_0xe10652[_0xe10652['Unknown']=0x0]=_0x4f38b(0x21e),_0xe10652[_0xe10652[_0x4f38b(0x20c)]=0x1]=_0x4f38b(0x20c),_0xe10652[_0xe10652[_0x4f38b(0x20b)]=0x2]='Reply',_0xe10652[_0xe10652[_0x4f38b(0x210)]=0x3]=_0x4f38b(0x210),_0xe10652[_0xe10652[_0x4f38b(0x1c5)]=0x4]=_0x4f38b(0x1c5),_0xe10652[_0xe10652[_0x4f38b(0x1bc)]=0x5]=_0x4f38b(0x1bc),_0xe10652[_0xe10652[_0x4f38b(0x22c)]=-0x1]=_0x4f38b(0x22c),_0xe10652))(v||{});const f=_0x1854ac=>c['dayjs'](new Date(+_0x1854ac))[_0x4f38b(0x1f9)](_0x4f38b(0x1dc)),R=async(_0x1d3f45,_0x770f4a)=>{const _0x38f2ad=_0x4f38b,_0x2743b0=_0x1d3f45[_0x38f2ad(0x1de)](c[_0x38f2ad(0x1c4)]),_0x294cf7=_0x1d3f45[_0x38f2ad(0x1de)](P['HTTPService']);_0x770f4a[_0x38f2ad(0x215)](_0x4bcf1e=>{const _0x1458d6=_0x38f2ad;_0x2743b0[_0x1458d6(0x219)](_0x4bcf1e)&&_0x770f4a[_0x1458d6(0x216)](_0x4bcf1e);}),_0x770f4a['size']&&(await _0x294cf7[_0x38f2ad(0x1de)](_0x38f2ad(0x21a),{'params':{'userIDs':[..._0x770f4a]}}))[_0x38f2ad(0x1ec)]['users'][_0x38f2ad(0x215)](_0x157af8=>{const _0x438b4c=_0x38f2ad;_0x157af8&&_0x2743b0[_0x438b4c(0x1b9)](_0x157af8);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x52f295,_0x295301,_0x19ed69,_0x1aaed5)=>{const _0x478fa4=_0x4f38b;for(var _0x6eaad9=_0x1aaed5>0x1?void 0x0:_0x1aaed5?$(_0x295301,_0x19ed69):_0x295301,_0x4cb6b1=_0x52f295[_0x478fa4(0x22b)]-0x1,_0x35ef37;_0x4cb6b1>=0x0;_0x4cb6b1--)(_0x35ef37=_0x52f295[_0x4cb6b1])&&(_0x6eaad9=_0x35ef37(_0x6eaad9)||_0x6eaad9);return _0x6eaad9;},S=(_0x40f050,_0x2def6d)=>(_0x2a7c6d,_0x45a8ac)=>_0x2def6d(_0x2a7c6d,_0x45a8ac,_0x40f050);let _=class extends c['Disposable']{constructor(_0xc904a1,_0x2deec9,_0x2e459c,_0x143f24){const _0x308646=_0x4f38b;super(),this[_0x308646(0x1ea)]=_0xc904a1,this[_0x308646(0x1d2)]=_0x2deec9,this[_0x308646(0x1fe)]=_0x2e459c,this[_0x308646(0x1ef)]=_0x143f24,this[_0x308646(0x1c0)](),this['_initUserSync']();}['_initUserSync'](){const _0x36abe4=_0x4f38b;this[_0x36abe4(0x1c9)](this[_0x36abe4(0x1d2)][_0x36abe4(0x1ba)][_0x36abe4(0x1d8)](j[_0x36abe4(0x1bd)](0x10))['subscribe'](_0x24b3dc=>{const _0x496816=new Set();_0x24b3dc['forEach'](_0x47bbb4=>{const _0x1ae2ad=_0x197d;switch(_0x47bbb4[_0x1ae2ad(0x1e3)]){case _0x1ae2ad(0x1c7):{const _0x457fa8=_0x47bbb4['payload'][_0x1ae2ad(0x20a)];_0x496816['add'](_0x457fa8);break;}}}),R(this['_injector'],_0x496816);}));}[_0x4f38b(0x1c0)](){const _0x256d47=_0x4f38b;this[_0x256d47(0x1c9)](this['_commentService'][_0x256d47(0x1ba)]['subscribe'](async _0x1d00ce=>{const _0x4edfc8=_0x256d47;var _0xcafc4e,_0x36ff37,_0x1612b5,_0x269e75;const _0x3b5641=(_0xcafc4e=this['_threadCommentModel'][_0x4edfc8(0x1d5)](_0x1d00ce[_0x4edfc8(0x205)])['find'](_0x312e7d=>_0x312e7d[_0x4edfc8(0x213)]===_0x1d00ce[_0x4edfc8(0x213)]))==null?void 0x0:_0xcafc4e[_0x4edfc8(0x1ed)];if(!_0x3b5641)return;const {unitId:_0x3166f7,subUnitId:_0x7ff5fe}=_0x3b5641;switch(_0x1d00ce['user']&&this[_0x4edfc8(0x1fe)][_0x4edfc8(0x1b9)](_0x1d00ce[_0x4edfc8(0x1d4)]),_0x1d00ce[_0x4edfc8(0x1e3)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x4edfc8(0x1ce)](_0x3166f7,_0x7ff5fe,{'unitId':_0x3166f7,'subUnitId':_0x7ff5fe,'ref':'','id':_0x1d00ce[_0x4edfc8(0x1ff)],'dT':f(+_0x1d00ce[_0x4edfc8(0x22d)]),'threadId':_0x1d00ce[_0x4edfc8(0x213)],'personId':(_0x1612b5=(_0x36ff37=_0x1d00ce[_0x4edfc8(0x1d4)])==null?void 0x0:_0x36ff37['userID'])!=null?_0x1612b5:_0x1d00ce[_0x4edfc8(0x1d1)],'text':JSON[_0x4edfc8(0x1fa)](_0x1d00ce[_0x4edfc8(0x1f6)]),'parentId':_0x3b5641['id']});break;}case v['Delete']:{const _0x3db41c=this[_0x4edfc8(0x1d2)][_0x4edfc8(0x1dd)](_0x3166f7,_0x7ff5fe,_0x1d00ce['replyId']);_0x3db41c&&_0x3db41c[_0x4edfc8(0x1bb)]&&this['_threadCommentModel'][_0x4edfc8(0x221)](_0x3166f7,_0x7ff5fe,_0x1d00ce[_0x4edfc8(0x1ff)]);break;}case v[_0x4edfc8(0x210)]:{this[_0x4edfc8(0x1d2)][_0x4edfc8(0x1c2)](_0x3166f7,_0x7ff5fe,{'commentId':_0x1d00ce[_0x4edfc8(0x1ff)],'text':JSON[_0x4edfc8(0x1fa)](_0x1d00ce[_0x4edfc8(0x1f6)])});break;}case v[_0x4edfc8(0x1bc)]:{const _0xb2e13a=(_0x269e75=this['_threadCommentModel'][_0x4edfc8(0x1d5)](_0x1d00ce['unitId'])[_0x4edfc8(0x1cd)](_0x422327=>_0x422327['threadId']===_0x1d00ce[_0x4edfc8(0x213)]))==null?void 0x0:_0x269e75[_0x4edfc8(0x1ed)];_0xb2e13a&&this[_0x4edfc8(0x1d2)]['resolveComment'](_0x3166f7,_0x7ff5fe,_0xb2e13a['id'],_0x1d00ce[_0x4edfc8(0x212)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4f38b(0x226)](b[_0x4f38b(0x1cc)])),S(0x1,c[_0x4f38b(0x226)](M[_0x4f38b(0x1df)])),S(0x2,c[_0x4f38b(0x226)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x4f38b(0x21b)]))],_);const q=_0x4f38b(0x21f),D={};function _0x197d(_0x26a937,_0x4f1c7a){const _0x35ee6d=_0x35ee();return _0x197d=function(_0x197d1c,_0x3afea8){_0x197d1c=_0x197d1c-0x1b9;let _0x925a=_0x35ee6d[_0x197d1c];return _0x925a;},_0x197d(_0x26a937,_0x4f1c7a);}var A=Object[_0x4f38b(0x203)],x=(_0x56d906,_0x38ba82,_0x58e858,_0x1a1999)=>{const _0x42c6ef=_0x4f38b;for(var _0x48a824=_0x1a1999>0x1?void 0x0:_0x1a1999?A(_0x38ba82,_0x58e858):_0x38ba82,_0x4276b6=_0x56d906[_0x42c6ef(0x22b)]-0x1,_0x636c97;_0x4276b6>=0x0;_0x4276b6--)(_0x636c97=_0x56d906[_0x4276b6])&&(_0x48a824=_0x636c97(_0x48a824)||_0x48a824);return _0x48a824;},C=(_0x4de1ee,_0x5abf56)=>(_0x4306d5,_0x5582fd)=>_0x5abf56(_0x4306d5,_0x5582fd,_0x4de1ee);function Y(_0x70299c,_0x47badb){const _0x2ebc8e=_0x4f38b,_0xbd32c6=_0x70299c['replies'][0x0];return{..._0x47badb,'id':_0xbd32c6[_0x2ebc8e(0x1ff)],'resolved':_0x70299c[_0x2ebc8e(0x212)]===0x1,'dT':f(_0xbd32c6[_0x2ebc8e(0x22d)]),'personId':_0xbd32c6[_0x2ebc8e(0x1d1)],'threadId':_0xbd32c6[_0x2ebc8e(0x213)]};}function _0x35ee(){const _0x4e88f7=['Edit','_configService','solved','threadId','requireSession','forEach','delete','OpenOrReOpen','7268247moFPUP','getUser','/universer-api/user/list','Injector','UniverThreadCommentDataSourcePlugin','resolveComment','Unknown','thread-comment-data-source.config','UniverInstanceType','deleteComment','2592012zdHmrZ','/delete','rangeId','/universer-api/comment/unit/','Inject','onReady','pluginName','UNIVER_UNKNOWN','/reply','length','UNRECOGNIZED','createTimestamp','resolved','addUser','commentUpdate$','parentId','Solve','bufferTime','users','_threadCommentDataSource','_init','IThreadCommentDataSourceService','updateComment','/add','UserManagerService','Delete','slice','add','Plugin','disposeWithMe','listComments','58LgEoIS','CommentService','find','addComment','ref','UniverLicensePlugin','userId','_threadCommentModel','userID','user','getUnit','comments','/edit','pipe','5299840meBLon','5556510dseqci','dataSource','YYYY/MM/DD\x20HH:mm','getComment','get','ThreadCommentModel','values','getCurrentUser','_initDataSource','type','code','error','merge','customRanges','post','rangeType','_commentService','Disposable','body','root','Solved','_injector','_sessionService','CustomRangeType','saveCommentToSnapshot','49803GOKkip','5616MecQEx','HTTPService','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','format','parse','defineProperty','symbol','dayjs','_userService','replyId','replies','COMMENT','973gewdfN','getOwnPropertyDescriptor','_httpService','unitId','555030FphAxK','map','getMemberID','DependentOn','personId','Reply','Add','stringify','filter','_threadCommentDataSourceService'];_0x35ee=function(){return _0x4e88f7;};return _0x35ee();}function G(_0x5cb9ad,_0x23b96a,_0x19fe1c){const _0x4f7c50=_0x4f38b;var _0x1505be,_0x374e70;if(((_0x374e70=(_0x1505be=_0x5cb9ad==null?void 0x0:_0x5cb9ad[_0x4f7c50(0x200)])==null?void 0x0:_0x1505be['length'])!=null?_0x374e70:0x0)>0x0){const _0x388eb5=(_0x17f439,_0x42fcc8)=>({'id':_0x17f439[_0x4f7c50(0x1ff)],'threadId':_0x17f439[_0x4f7c50(0x213)],'dT':f(_0x17f439[_0x4f7c50(0x22d)]),'personId':_0x17f439[_0x4f7c50(0x1d1)],'resolved':_0x5cb9ad[_0x4f7c50(0x212)]===I['Solved'],'unitId':_0x23b96a,'subUnitId':_0x19fe1c,'text':JSON[_0x4f7c50(0x1fa)](_0x17f439['content']),'parentId':_0x42fcc8}),_0xfc9724=_0x388eb5(_0x5cb9ad['replies'][0x0]);return{..._0xfc9724,'children':_0x5cb9ad[_0x4f7c50(0x200)][_0x4f7c50(0x1c6)](0x1)['map'](_0x364441=>_0x388eb5(_0x364441,_0xfc9724['id']))};}return null;}let p=class{constructor(_0x4e201e,_0x137923,_0x266444){const _0x5a3bb0=_0x4f38b;this[_0x5a3bb0(0x204)]=_0x4e201e,this['_userService']=_0x137923,this[_0x5a3bb0(0x1f0)]=_0x266444;}async[_0x4f38b(0x1ce)](_0xdbe16b){const _0x29ba2d=_0x4f38b;var _0x5d38b3,_0x3076ad;const {parentId:_0x34d13b,unitId:_0x430ec2,text:_0x58772b,threadId:_0x1bee3a}=_0xdbe16b,_0x3402dc=(_0x3076ad=(_0x5d38b3=_0x58772b[_0x29ba2d(0x1e7)])==null?void 0x0:_0x5d38b3['filter'](_0xd4b430=>_0xd4b430[_0x29ba2d(0x1e9)]===c[_0x29ba2d(0x1f1)][_0x29ba2d(0x201)])['map'](_0x5b295b=>_0x5b295b[_0x29ba2d(0x224)]))!=null?_0x3076ad:[],_0x5685a6=JSON[_0x29ba2d(0x20d)](_0x58772b),_0x28cb8c=(await this[_0x29ba2d(0x1f0)][_0x29ba2d(0x214)](_0x430ec2))['getMemberID']();if(_0x34d13b){const _0xbefbac={'memberId':_0x28cb8c,'unitId':_0x430ec2,'content':_0x5685a6,'mention':_0x3402dc,'threadId':_0x1bee3a},_0x437beb=(await this[_0x29ba2d(0x204)]['post'](_0x29ba2d(0x225)+_0x430ec2+_0x29ba2d(0x22a),{'body':_0xbefbac}))['body']['reply'];return{..._0xdbe16b,'id':_0x437beb[_0x29ba2d(0x1ff)],'dT':c[_0x29ba2d(0x1fd)](+_0x437beb[_0x29ba2d(0x22d)])['format'](_0x29ba2d(0x1dc)),'personId':_0x437beb[_0x29ba2d(0x1d1)]};}else{const _0x557c3d={'memberId':_0x28cb8c,'unitId':_0x430ec2,'content':_0x5685a6,'mention':_0x3402dc},_0x33045a=await this['_httpService']['post'](_0x29ba2d(0x225)+_0x430ec2+_0x29ba2d(0x1c3),{'body':_0x557c3d});return Y(_0x33045a[_0x29ba2d(0x1ec)]['comment'],_0xdbe16b);}}async[_0x4f38b(0x1c2)](_0x1b2478){const _0xc0978e=_0x4f38b;var _0x361d7c,_0x569ebc;const {text:_0x1f2fb5,unitId:_0x50085a}=_0x1b2478,_0x4bb886=(_0x569ebc=(_0x361d7c=_0x1f2fb5[_0xc0978e(0x1e7)])==null?void 0x0:_0x361d7c[_0xc0978e(0x20e)](_0x4c245d=>_0x4c245d[_0xc0978e(0x1e9)]===c['CustomRangeType']['COMMENT'])['map'](_0x50fef7=>_0x50fef7[_0xc0978e(0x224)]))!=null?_0x569ebc:[],_0x15055b=JSON['stringify'](_0x1f2fb5),_0x245910=_0x1b2478[_0xc0978e(0x213)],_0x5bfa92=_0x1b2478['id'],_0x16e93d={'memberId':(await this[_0xc0978e(0x1f0)][_0xc0978e(0x214)](_0x50085a))[_0xc0978e(0x208)](),'unitId':_0x50085a,'threadId':_0x245910,'mention':_0x4bb886,'content':_0x15055b,'replyId':_0x5bfa92},_0x13d197=await this[_0xc0978e(0x204)][_0xc0978e(0x1e8)](_0xc0978e(0x225)+_0x50085a+_0xc0978e(0x1d7),{'body':_0x16e93d});return!_0x13d197[_0xc0978e(0x1ec)][_0xc0978e(0x1e5)]||_0x13d197[_0xc0978e(0x1ec)][_0xc0978e(0x1e5)][_0xc0978e(0x1e4)]===0x1;}async[_0x4f38b(0x21d)](_0x3a8152){const _0xea06b4=_0x4f38b,{unitId:_0x3517d8}=_0x3a8152,_0x4fd556=_0x3a8152['threadId'],_0x525d63={'memberId':this[_0xea06b4(0x1fe)][_0xea06b4(0x1e1)]()[_0xea06b4(0x1d3)],'unitId':_0x3517d8,'threadId':_0x4fd556,'solved':_0x3a8152[_0xea06b4(0x22e)]?I[_0xea06b4(0x1ee)]:I[_0xea06b4(0x217)]},_0xb32f0f=await this[_0xea06b4(0x204)][_0xea06b4(0x1e8)](_0xea06b4(0x225)+_0x3517d8+'/solved',{'body':_0x525d63});return!_0xb32f0f[_0xea06b4(0x1ec)][_0xea06b4(0x1e5)]||_0xb32f0f['body']['error']['code']===0x1;}async[_0x4f38b(0x221)](_0x504d2f,_0xc3e2d0,_0x231aea,_0x147dbd){const _0x27d514=_0x4f38b,_0x42e612={'memberId':(await this[_0x27d514(0x1f0)]['requireSession'](_0x504d2f))[_0x27d514(0x208)](),'threadId':_0x231aea,'replyId':_0x147dbd,'unitId':_0x504d2f},_0x39bd78=await this[_0x27d514(0x204)][_0x27d514(0x1e8)](_0x27d514(0x225)+_0x504d2f+_0x27d514(0x223),{'body':_0x42e612});return!_0x39bd78['body'][_0x27d514(0x1e5)]||_0x39bd78[_0x27d514(0x1ec)]['error'][_0x27d514(0x1e4)]===0x1;}async[_0x4f38b(0x1ca)](_0x4eed22,_0x24bc13,_0x366245){const _0x411b67=_0x4f38b,_0x29b1bc={'unitId':_0x4eed22,'threadId':_0x366245},_0x2ea4e1=await this[_0x411b67(0x204)][_0x411b67(0x1e8)](_0x411b67(0x225)+_0x4eed22+'/list',{'body':_0x29b1bc}),_0x3f01a2=_0x366245[_0x411b67(0x207)](_0x23959e=>G(_0x2ea4e1[_0x411b67(0x1ec)][_0x411b67(0x1d6)][_0x23959e],_0x4eed22,_0x24bc13))[_0x411b67(0x20e)](Boolean);return Object[_0x411b67(0x1e0)](_0x2ea4e1['body'][_0x411b67(0x1be)])[_0x411b67(0x215)](_0x5d185c=>{const _0x29fc9c=_0x411b67;this[_0x29fc9c(0x1fe)][_0x29fc9c(0x1b9)](_0x5d185c);}),_0x3f01a2;}[_0x4f38b(0x1f2)](_0x2766ad){const _0xe05842=_0x4f38b;return{'id':_0x2766ad['id'],'threadId':_0x2766ad[_0xe05842(0x213)],'ref':_0x2766ad[_0xe05842(0x1cf)]};}};p=x([C(0x0,c[_0x4f38b(0x226)](P[_0x4f38b(0x1f5)])),C(0x1,c[_0x4f38b(0x226)](c[_0x4f38b(0x1c4)])),C(0x2,c[_0x4f38b(0x226)](b['CollaborationSessionService']))],p);var H=Object[_0x4f38b(0x203)],J=(_0xc91105,_0x3f2f4f,_0x1d84db,_0x524e9f)=>{for(var _0x4e480c=_0x524e9f>0x1?void 0x0:_0x524e9f?H(_0x3f2f4f,_0x1d84db):_0x3f2f4f,_0x11e381=_0xc91105['length']-0x1,_0x25536d;_0x11e381>=0x0;_0x11e381--)(_0x25536d=_0xc91105[_0x11e381])&&(_0x4e480c=_0x25536d(_0x4e480c)||_0x4e480c);return _0x4e480c;},y=(_0x3884a,_0x6f5dda)=>(_0xe6837f,_0x379dd0)=>_0x6f5dda(_0xe6837f,_0x379dd0,_0x3884a);let g=class extends c[_0x4f38b(0x1eb)]{constructor(_0x2edb39,_0x16ee18){const _0x51a288=_0x4f38b;super(),this[_0x51a288(0x20f)]=_0x2edb39,this[_0x51a288(0x1bf)]=_0x16ee18,this['_initDataSource']();}[_0x4f38b(0x1e2)](){const _0xc85053=_0x4f38b;this[_0xc85053(0x20f)][_0xc85053(0x1db)]=this[_0xc85053(0x1bf)],this[_0xc85053(0x20f)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4f38b(0x1c1)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object[_0x4f38b(0x203)],Z=(_0x361f3a,_0x1075bb,_0x234ce6)=>_0x1075bb in _0x361f3a?F(_0x361f3a,_0x1075bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x234ce6}):_0x361f3a[_0x1075bb]=_0x234ce6,W=(_0x6b539c,_0x3b72fe,_0xb6b069,_0x48cc68)=>{const _0x205300=_0x4f38b;for(var _0x449d47=_0x48cc68>0x1?void 0x0:_0x48cc68?L(_0x3b72fe,_0xb6b069):_0x3b72fe,_0x418ce8=_0x6b539c[_0x205300(0x22b)]-0x1,_0x27c09b;_0x418ce8>=0x0;_0x418ce8--)(_0x27c09b=_0x6b539c[_0x418ce8])&&(_0x449d47=_0x27c09b(_0x449d47)||_0x449d47);return _0x449d47;},O=(_0x4193e4,_0x240168)=>(_0x2302fb,_0x5a58e5)=>_0x240168(_0x2302fb,_0x5a58e5,_0x4193e4),N=(_0x23e4bd,_0x24bc78,_0x1cd18f)=>Z(_0x23e4bd,typeof _0x24bc78!=_0x4f38b(0x1fc)?_0x24bc78+'':_0x24bc78,_0x1cd18f);exports[_0x4f38b(0x21c)]=class extends c[_0x4f38b(0x1c8)]{constructor(_0x399d73=D,_0x1a5840,_0x2256df){const _0x177325=_0x4f38b;super(),this[_0x177325(0x1f8)]=_0x399d73,this[_0x177325(0x1ef)]=_0x1a5840,this[_0x177325(0x211)]=_0x2256df;const {..._0x111d4f}=c[_0x177325(0x1e6)]({},D,this[_0x177325(0x1f8)]);this[_0x177325(0x211)]['setConfig'](q,_0x111d4f);}['onStarting'](){[[p],[g],[_]]['forEach'](_0x544443=>{const _0x4e3690=_0x197d;this[_0x4e3690(0x1ef)][_0x4e3690(0x1c7)](_0x544443);});}[_0x4f38b(0x227)](){const _0x5167f2=_0x4f38b;this['_injector'][_0x5167f2(0x1de)](g),this[_0x5167f2(0x1ef)]['get'](_);}},N(exports[_0x4f38b(0x21c)],_0x4f38b(0x228),U),N(exports[_0x4f38b(0x21c)],_0x4f38b(0x1e3),c[_0x4f38b(0x220)][_0x4f38b(0x229)]),exports[_0x4f38b(0x21c)]=W([c[_0x4f38b(0x209)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x4f38b(0x1d0)]),O(0x1,c[_0x4f38b(0x226)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x4f38b(0x21c)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3603e1=_0x2560;(function(_0xa1537d,_0x11af53){const _0x5ea1e0=_0x2560,_0x147c00=_0xa1537d();while(!![]){try{const _0x1295b0=-parseInt(_0x5ea1e0(0x14f))/0x1*(-parseInt(_0x5ea1e0(0x163))/0x2)+parseInt(_0x5ea1e0(0x12d))/0x3+-parseInt(_0x5ea1e0(0x145))/0x4+parseInt(_0x5ea1e0(0x14d))/0x5+parseInt(_0x5ea1e0(0x132))/0x6+-parseInt(_0x5ea1e0(0x150))/0x7+-parseInt(_0x5ea1e0(0x133))/0x8*(-parseInt(_0x5ea1e0(0x15a))/0x9);if(_0x1295b0===_0x11af53)break;else _0x147c00['push'](_0x147c00['shift']());}catch(_0x5e1b46){_0x147c00['push'](_0x147c00['shift']());}}}(_0x549c,0xb67e9));import{CommentService as _0x5d5f90,CollaborationSessionService as _0x3c4a77,UniverCollaborationClientPlugin as _0x8c2bb9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd50337}from'@univerjs-pro/license';import{dayjs as _0x2557b7,UserManagerService as _0x2bff43,Inject as _0x4c511f,Injector as _0x130911,Disposable as _0x199a3d,CustomRangeType as _0x729685,UniverInstanceType as _0x4ffa54,DependentOn as _0x414d5d,IConfigService as _0x5d98bf,Plugin as _0x2db651,merge as _0x352425}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b41d9}from'@univerjs/thread-comment-ui';function _0x549c(){const _0x3b6b96=['addUser','_configService','comment','deleteComment','/edit','pipe','Edit','resolved','2PmucyW','createTimestamp','Solve','parse','YYYY/MM/DD\x20HH:mm','rangeId','_httpService','COMMENT','saveCommentToSnapshot','map','solved','getOwnPropertyDescriptor','pluginName','_userService','unitId','threadId','filter','Solved','replies','customRanges','find','_threadCommentDataSourceService','_initDataSource','userID','size','error','_injector','user','disposeWithMe','UNRECOGNIZED','length','subscribe','root','_sessionService','Unknown','_initUserSync','content','parentId','rangeType','requireSession','OpenOrReOpen','resolveComment','reply','Add','code','ref','getCurrentUser','372465IzKdOn','userId','get','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','868542mHczTj','9946000ooByHz','post','_threadCommentDataSource','setConfig','onReady','/add','_commentService','Reply','slice','/universer-api/comment/unit/','updateComment','values','UNIVER_UNKNOWN','/solved','dataSource','getMemberID','add','delete','4405228HrwoMy','payload','format','stringify','addComment','replyId','_config','body','6636785AdUQxW','_init','319433kXmTug','9171036eFBHMz','getUnit','Delete','forEach','_threadCommentModel','commentUpdate$','personId','/list','type','syncUpdateMutationToColla','9wXcmmx'];_0x549c=function(){return _0x3b6b96;};return _0x549c();}import{ThreadCommentModel as _0x1650d8,IThreadCommentDataSourceService as _0x14c9f4}from'@univerjs/thread-comment';import{bufferTime as _0x33d3a7}from'rxjs';import{HTTPService as _0x4be4d2}from'@univerjs/network';const W=_0x3603e1(0x131);var I=(_0x1e8132=>(_0x1e8132[_0x1e8132[_0x3603e1(0x126)]=0x0]=_0x3603e1(0x126),_0x1e8132[_0x1e8132['Solved']=0x1]='Solved',_0x1e8132[_0x1e8132[_0x3603e1(0x11b)]=-0x1]=_0x3603e1(0x11b),_0x1e8132))(I||{}),v=(_0x45e0db=>(_0x45e0db[_0x45e0db[_0x3603e1(0x120)]=0x0]=_0x3603e1(0x120),_0x45e0db[_0x45e0db[_0x3603e1(0x129)]=0x1]=_0x3603e1(0x129),_0x45e0db[_0x45e0db[_0x3603e1(0x13a)]=0x2]=_0x3603e1(0x13a),_0x45e0db[_0x45e0db[_0x3603e1(0x161)]=0x3]='Edit',_0x45e0db[_0x45e0db[_0x3603e1(0x152)]=0x4]=_0x3603e1(0x152),_0x45e0db[_0x45e0db['Solve']=0x5]=_0x3603e1(0x165),_0x45e0db[_0x45e0db['UNRECOGNIZED']=-0x1]=_0x3603e1(0x11b),_0x45e0db))(v||{});const y=_0x1222d2=>_0x2557b7(new Date(+_0x1222d2))[_0x3603e1(0x147)](_0x3603e1(0x167)),B=async(_0x25f2aa,_0x3668ec)=>{const _0x38f4c6=_0x3603e1,_0x41c345=_0x25f2aa[_0x38f4c6(0x12f)](_0x2bff43),_0xdd090c=_0x25f2aa['get'](_0x4be4d2);_0x3668ec['forEach'](_0x2e82cc=>{const _0x1df16f=_0x38f4c6;_0x41c345['getUser'](_0x2e82cc)&&_0x3668ec[_0x1df16f(0x144)](_0x2e82cc);}),_0x3668ec[_0x38f4c6(0x116)]&&(await _0xdd090c[_0x38f4c6(0x12f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3668ec]}}))[_0x38f4c6(0x14c)][_0x38f4c6(0x130)][_0x38f4c6(0x153)](_0x2449c2=>{_0x2449c2&&_0x41c345['addUser'](_0x2449c2);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x42190c,_0x5cec83,_0x4907dc,_0x5e1cb7)=>{const _0xff9594=_0x3603e1;for(var _0x5e9f88=_0x5e1cb7>0x1?void 0x0:_0x5e1cb7?K(_0x5cec83,_0x4907dc):_0x5cec83,_0x3bca60=_0x42190c[_0xff9594(0x11c)]-0x1,_0x48719c;_0x3bca60>=0x0;_0x3bca60--)(_0x48719c=_0x42190c[_0x3bca60])&&(_0x5e9f88=_0x48719c(_0x5e9f88)||_0x5e9f88);return _0x5e9f88;},p=(_0x2efd0f,_0x28468f)=>(_0x408ca1,_0x15dd41)=>_0x28468f(_0x408ca1,_0x15dd41,_0x2efd0f);let _=class extends _0x199a3d{constructor(_0x39e204,_0x12cd99,_0x35f7d9,_0x18e945){const _0x36e703=_0x3603e1;super(),this[_0x36e703(0x139)]=_0x39e204,this[_0x36e703(0x154)]=_0x12cd99,this[_0x36e703(0x170)]=_0x35f7d9,this[_0x36e703(0x118)]=_0x18e945,this[_0x36e703(0x14e)](),this[_0x36e703(0x121)]();}[_0x3603e1(0x121)](){const _0xaf7b0c=_0x3603e1;this[_0xaf7b0c(0x11a)](this[_0xaf7b0c(0x154)][_0xaf7b0c(0x155)][_0xaf7b0c(0x160)](_0x33d3a7(0x10))['subscribe'](_0x46c702=>{const _0x3db001=_0xaf7b0c,_0x534f63=new Set();_0x46c702[_0x3db001(0x153)](_0x1f1752=>{const _0x32501d=_0x3db001;switch(_0x1f1752[_0x32501d(0x158)]){case _0x32501d(0x143):{const _0x3a6c10=_0x1f1752[_0x32501d(0x146)][_0x32501d(0x156)];_0x534f63[_0x32501d(0x143)](_0x3a6c10);break;}}}),B(this[_0x3db001(0x118)],_0x534f63);}));}['_init'](){const _0x50faa7=_0x3603e1;this[_0x50faa7(0x11a)](this[_0x50faa7(0x139)][_0x50faa7(0x155)][_0x50faa7(0x11d)](async _0x491b86=>{const _0x383228=_0x50faa7;var _0x4cd500,_0x933e87,_0x534ec5,_0x4394c7;const _0x170e0f=(_0x4cd500=this[_0x383228(0x154)][_0x383228(0x151)](_0x491b86[_0x383228(0x171)])[_0x383228(0x112)](_0x55e71a=>_0x55e71a[_0x383228(0x172)]===_0x491b86[_0x383228(0x172)]))==null?void 0x0:_0x4cd500[_0x383228(0x11e)];if(!_0x170e0f)return;const {unitId:_0x300389,subUnitId:_0x33d44e}=_0x170e0f;switch(_0x491b86[_0x383228(0x119)]&&this[_0x383228(0x170)][_0x383228(0x15b)](_0x491b86[_0x383228(0x119)]),_0x491b86[_0x383228(0x158)]){case v['Add']:break;case v[_0x383228(0x13a)]:{this[_0x383228(0x154)][_0x383228(0x149)](_0x300389,_0x33d44e,{'unitId':_0x300389,'subUnitId':_0x33d44e,'ref':'','id':_0x491b86['replyId'],'dT':y(+_0x491b86[_0x383228(0x164)]),'threadId':_0x491b86[_0x383228(0x172)],'personId':(_0x534ec5=(_0x933e87=_0x491b86[_0x383228(0x119)])==null?void 0x0:_0x933e87[_0x383228(0x115)])!=null?_0x534ec5:_0x491b86['userId'],'text':JSON[_0x383228(0x166)](_0x491b86[_0x383228(0x122)]),'parentId':_0x170e0f['id']});break;}case v['Delete']:{const _0x418b2e=this[_0x383228(0x154)]['getComment'](_0x300389,_0x33d44e,_0x491b86[_0x383228(0x14a)]);_0x418b2e&&_0x418b2e[_0x383228(0x123)]&&this['_threadCommentModel'][_0x383228(0x15e)](_0x300389,_0x33d44e,_0x491b86[_0x383228(0x14a)]);break;}case v['Edit']:{this[_0x383228(0x154)][_0x383228(0x13d)](_0x300389,_0x33d44e,{'commentId':_0x491b86[_0x383228(0x14a)],'text':JSON['parse'](_0x491b86[_0x383228(0x122)])});break;}case v[_0x383228(0x165)]:{const _0x578684=(_0x4394c7=this[_0x383228(0x154)][_0x383228(0x151)](_0x491b86[_0x383228(0x171)])['find'](_0x40ea88=>_0x40ea88[_0x383228(0x172)]===_0x491b86['threadId']))==null?void 0x0:_0x4394c7['root'];_0x578684&&this['_threadCommentModel'][_0x383228(0x127)](_0x300389,_0x33d44e,_0x578684['id'],_0x491b86[_0x383228(0x16d)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4c511f(_0x5d5f90)),p(0x1,_0x4c511f(_0x1650d8)),p(0x2,_0x4c511f(_0x2bff43)),p(0x3,_0x4c511f(_0x130911))],_);function _0x2560(_0x347111,_0x5da665){const _0x549c35=_0x549c();return _0x2560=function(_0x25603c,_0x2dc82c){_0x25603c=_0x25603c-0x111;let _0x23ac25=_0x549c35[_0x25603c];return _0x23ac25;},_0x2560(_0x347111,_0x5da665);}const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5bdaee,_0x255f8f,_0x2a2ca5,_0x15aaa5)=>{for(var _0x45c161=_0x15aaa5>0x1?void 0x0:_0x15aaa5?k(_0x255f8f,_0x2a2ca5):_0x255f8f,_0x3a6252=_0x5bdaee['length']-0x1,_0x1d8bd2;_0x3a6252>=0x0;_0x3a6252--)(_0x1d8bd2=_0x5bdaee[_0x3a6252])&&(_0x45c161=_0x1d8bd2(_0x45c161)||_0x45c161);return _0x45c161;},b=(_0x9fdc32,_0x2f9aeb)=>(_0x29a17d,_0x40315d)=>_0x2f9aeb(_0x29a17d,_0x40315d,_0x9fdc32);function X(_0x387955,_0x8fc331){const _0x36d2f5=_0x3603e1,_0x257eeb=_0x387955[_0x36d2f5(0x175)][0x0];return{..._0x8fc331,'id':_0x257eeb[_0x36d2f5(0x14a)],'resolved':_0x387955['solved']===0x1,'dT':y(_0x257eeb[_0x36d2f5(0x164)]),'personId':_0x257eeb['userId'],'threadId':_0x257eeb[_0x36d2f5(0x172)]};}function ee(_0x242bc8,_0x1a5118,_0x5c8298){const _0x2476dc=_0x3603e1;var _0x20f65a,_0x4ded9c;if(((_0x4ded9c=(_0x20f65a=_0x242bc8==null?void 0x0:_0x242bc8['replies'])==null?void 0x0:_0x20f65a[_0x2476dc(0x11c)])!=null?_0x4ded9c:0x0)>0x0){const _0x402548=(_0x4ae8c7,_0x314035)=>({'id':_0x4ae8c7[_0x2476dc(0x14a)],'threadId':_0x4ae8c7[_0x2476dc(0x172)],'dT':y(_0x4ae8c7[_0x2476dc(0x164)]),'personId':_0x4ae8c7[_0x2476dc(0x12e)],'resolved':_0x242bc8[_0x2476dc(0x16d)]===I[_0x2476dc(0x174)],'unitId':_0x1a5118,'subUnitId':_0x5c8298,'text':JSON[_0x2476dc(0x166)](_0x4ae8c7[_0x2476dc(0x122)]),'parentId':_0x314035}),_0x2abd8f=_0x402548(_0x242bc8[_0x2476dc(0x175)][0x0]);return{..._0x2abd8f,'children':_0x242bc8['replies'][_0x2476dc(0x13b)](0x1)[_0x2476dc(0x16c)](_0x5ab63b=>_0x402548(_0x5ab63b,_0x2abd8f['id']))};}return null;}let S=class{constructor(_0x38b591,_0x12135c,_0x43adcc){const _0x1bd914=_0x3603e1;this['_httpService']=_0x38b591,this[_0x1bd914(0x170)]=_0x12135c,this[_0x1bd914(0x11f)]=_0x43adcc;}async[_0x3603e1(0x149)](_0x576602){const _0x5d6350=_0x3603e1;var _0x49b212,_0x5030d4;const {parentId:_0x2eee08,unitId:_0x2e627e,text:_0x53aa84,threadId:_0x5e5adf}=_0x576602,_0xe0a2b0=(_0x5030d4=(_0x49b212=_0x53aa84[_0x5d6350(0x111)])==null?void 0x0:_0x49b212['filter'](_0x5a2df8=>_0x5a2df8[_0x5d6350(0x124)]===_0x729685[_0x5d6350(0x16a)])[_0x5d6350(0x16c)](_0x3a8dab=>_0x3a8dab[_0x5d6350(0x168)]))!=null?_0x5030d4:[],_0x2b50ac=JSON[_0x5d6350(0x148)](_0x53aa84),_0x4b0364=(await this[_0x5d6350(0x11f)][_0x5d6350(0x125)](_0x2e627e))['getMemberID']();if(_0x2eee08){const _0x1e1567={'memberId':_0x4b0364,'unitId':_0x2e627e,'content':_0x2b50ac,'mention':_0xe0a2b0,'threadId':_0x5e5adf},_0x29a066=(await this['_httpService'][_0x5d6350(0x134)]('/universer-api/comment/unit/'+_0x2e627e+'/reply',{'body':_0x1e1567}))[_0x5d6350(0x14c)][_0x5d6350(0x128)];return{..._0x576602,'id':_0x29a066[_0x5d6350(0x14a)],'dT':_0x2557b7(+_0x29a066['createTimestamp'])[_0x5d6350(0x147)](_0x5d6350(0x167)),'personId':_0x29a066[_0x5d6350(0x12e)]};}else{const _0x3a8725={'memberId':_0x4b0364,'unitId':_0x2e627e,'content':_0x2b50ac,'mention':_0xe0a2b0},_0x12b2f1=await this['_httpService'][_0x5d6350(0x134)]('/universer-api/comment/unit/'+_0x2e627e+_0x5d6350(0x138),{'body':_0x3a8725});return X(_0x12b2f1['body'][_0x5d6350(0x15d)],_0x576602);}}async[_0x3603e1(0x13d)](_0x7e24d7){const _0x36aeb4=_0x3603e1;var _0x562efe,_0x46c781;const {text:_0x5587f3,unitId:_0x28913b}=_0x7e24d7,_0xcd73c7=(_0x46c781=(_0x562efe=_0x5587f3[_0x36aeb4(0x111)])==null?void 0x0:_0x562efe[_0x36aeb4(0x173)](_0x3950b1=>_0x3950b1[_0x36aeb4(0x124)]===_0x729685[_0x36aeb4(0x16a)])[_0x36aeb4(0x16c)](_0x543c22=>_0x543c22['rangeId']))!=null?_0x46c781:[],_0x50513b=JSON['stringify'](_0x5587f3),_0x2d8946=_0x7e24d7[_0x36aeb4(0x172)],_0x5e1fcb=_0x7e24d7['id'],_0x309c07={'memberId':(await this[_0x36aeb4(0x11f)][_0x36aeb4(0x125)](_0x28913b))['getMemberID'](),'unitId':_0x28913b,'threadId':_0x2d8946,'mention':_0xcd73c7,'content':_0x50513b,'replyId':_0x5e1fcb},_0x316bde=await this[_0x36aeb4(0x169)][_0x36aeb4(0x134)]('/universer-api/comment/unit/'+_0x28913b+_0x36aeb4(0x15f),{'body':_0x309c07});return!_0x316bde['body']['error']||_0x316bde[_0x36aeb4(0x14c)][_0x36aeb4(0x117)][_0x36aeb4(0x12a)]===0x1;}async[_0x3603e1(0x127)](_0x17a72c){const _0x564f23=_0x3603e1,{unitId:_0x417c84}=_0x17a72c,_0x49e65b=_0x17a72c[_0x564f23(0x172)],_0x2e6561={'memberId':this[_0x564f23(0x170)][_0x564f23(0x12c)]()[_0x564f23(0x115)],'unitId':_0x417c84,'threadId':_0x49e65b,'solved':_0x17a72c[_0x564f23(0x162)]?I['Solved']:I[_0x564f23(0x126)]},_0x370a85=await this[_0x564f23(0x169)]['post'](_0x564f23(0x13c)+_0x417c84+_0x564f23(0x140),{'body':_0x2e6561});return!_0x370a85[_0x564f23(0x14c)]['error']||_0x370a85[_0x564f23(0x14c)][_0x564f23(0x117)][_0x564f23(0x12a)]===0x1;}async['deleteComment'](_0x526e13,_0x3a00f5,_0x222751,_0x442f5e){const _0x336cc6=_0x3603e1,_0x98e226={'memberId':(await this['_sessionService'][_0x336cc6(0x125)](_0x526e13))[_0x336cc6(0x142)](),'threadId':_0x222751,'replyId':_0x442f5e,'unitId':_0x526e13},_0x3705d5=await this[_0x336cc6(0x169)][_0x336cc6(0x134)]('/universer-api/comment/unit/'+_0x526e13+'/delete',{'body':_0x98e226});return!_0x3705d5[_0x336cc6(0x14c)][_0x336cc6(0x117)]||_0x3705d5[_0x336cc6(0x14c)][_0x336cc6(0x117)][_0x336cc6(0x12a)]===0x1;}async['listComments'](_0x3ab6f2,_0x21a4cd,_0x11fdb9){const _0x4636dd=_0x3603e1,_0x1e174f={'unitId':_0x3ab6f2,'threadId':_0x11fdb9},_0x36d645=await this[_0x4636dd(0x169)][_0x4636dd(0x134)](_0x4636dd(0x13c)+_0x3ab6f2+_0x4636dd(0x157),{'body':_0x1e174f}),_0x198f78=_0x11fdb9[_0x4636dd(0x16c)](_0x451b15=>ee(_0x36d645[_0x4636dd(0x14c)]['comments'][_0x451b15],_0x3ab6f2,_0x21a4cd))['filter'](Boolean);return Object[_0x4636dd(0x13e)](_0x36d645['body'][_0x4636dd(0x130)])[_0x4636dd(0x153)](_0x46054b=>{const _0x152e6e=_0x4636dd;this[_0x152e6e(0x170)][_0x152e6e(0x15b)](_0x46054b);}),_0x198f78;}[_0x3603e1(0x16b)](_0x2ecc60){const _0x478897=_0x3603e1;return{'id':_0x2ecc60['id'],'threadId':_0x2ecc60[_0x478897(0x172)],'ref':_0x2ecc60[_0x478897(0x12b)]};}};S=Q([b(0x0,_0x4c511f(_0x4be4d2)),b(0x1,_0x4c511f(_0x2bff43)),b(0x2,_0x4c511f(_0x3c4a77))],S);var re=Object[_0x3603e1(0x16e)],te=(_0x52cef3,_0x358961,_0x5869a7,_0x5b2bc1)=>{const _0x49b540=_0x3603e1;for(var _0x17ada8=_0x5b2bc1>0x1?void 0x0:_0x5b2bc1?re(_0x358961,_0x5869a7):_0x358961,_0x114f18=_0x52cef3[_0x49b540(0x11c)]-0x1,_0x2d6d13;_0x114f18>=0x0;_0x114f18--)(_0x2d6d13=_0x52cef3[_0x114f18])&&(_0x17ada8=_0x2d6d13(_0x17ada8)||_0x17ada8);return _0x17ada8;},M=(_0x3d1f7b,_0x120812)=>(_0xe48815,_0x2da559)=>_0x120812(_0xe48815,_0x2da559,_0x3d1f7b);let f=class extends _0x199a3d{constructor(_0x5294ac,_0x45bfef){const _0x510915=_0x3603e1;super(),this['_threadCommentDataSourceService']=_0x5294ac,this['_threadCommentDataSource']=_0x45bfef,this[_0x510915(0x114)]();}[_0x3603e1(0x114)](){const _0x58da72=_0x3603e1;this[_0x58da72(0x113)][_0x58da72(0x141)]=this[_0x58da72(0x135)],this[_0x58da72(0x113)][_0x58da72(0x159)]=!0x1;}};f=te([M(0x0,_0x14c9f4),M(0x1,_0x4c511f(S))],f);var se=Object['defineProperty'],oe=Object[_0x3603e1(0x16e)],ne=(_0x48ded8,_0xaa4984,_0x14a79d)=>_0xaa4984 in _0x48ded8?se(_0x48ded8,_0xaa4984,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14a79d}):_0x48ded8[_0xaa4984]=_0x14a79d,ie=(_0x1405ab,_0x4d873e,_0x1a522a,_0x129fad)=>{for(var _0x4bb661=_0x129fad>0x1?void 0x0:_0x129fad?oe(_0x4d873e,_0x1a522a):_0x4d873e,_0x376546=_0x1405ab['length']-0x1,_0x2c7adc;_0x376546>=0x0;_0x376546--)(_0x2c7adc=_0x1405ab[_0x376546])&&(_0x4bb661=_0x2c7adc(_0x4bb661)||_0x4bb661);return _0x4bb661;},N=(_0x5aa258,_0x488498)=>(_0x2c93fa,_0x5a31e6)=>_0x488498(_0x2c93fa,_0x5a31e6,_0x5aa258),$=(_0x184f22,_0x48592a,_0x1a2c9f)=>ne(_0x184f22,typeof _0x48592a!='symbol'?_0x48592a+'':_0x48592a,_0x1a2c9f);let g=class extends _0x2db651{constructor(_0x1ef4b3=O,_0x2c0d31,_0x41dc22){const _0x45abde=_0x3603e1;super(),this[_0x45abde(0x14b)]=_0x1ef4b3,this[_0x45abde(0x118)]=_0x2c0d31,this[_0x45abde(0x15c)]=_0x41dc22;const {..._0x1f6e80}=_0x352425({},O,this['_config']);this['_configService'][_0x45abde(0x136)](z,_0x1f6e80);}['onStarting'](){const _0x3c080e=_0x3603e1;[[S],[f],[_]][_0x3c080e(0x153)](_0x3b515a=>{const _0xc5e888=_0x3c080e;this[_0xc5e888(0x118)][_0xc5e888(0x143)](_0x3b515a);});}[_0x3603e1(0x137)](){const _0x2ae203=_0x3603e1;this[_0x2ae203(0x118)][_0x2ae203(0x12f)](f),this[_0x2ae203(0x118)][_0x2ae203(0x12f)](_);}};$(g,_0x3603e1(0x16f),W),$(g,_0x3603e1(0x158),_0x4ffa54[_0x3603e1(0x13f)]),g=ie([_0x414d5d(_0x5b41d9,_0x8c2bb9,_0xd50337),N(0x1,_0x4c511f(_0x130911)),N(0x2,_0x5d98bf)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x48adec=_0x110e;(function(_0x512cd4,_0x53fbb0){const _0x30b997=_0x110e,_0x53e5d6=_0x512cd4();while(!![]){try{const _0x3be485=-parseInt(_0x30b997(0x177))/0x1+parseInt(_0x30b997(0x189))/0x2*(-parseInt(_0x30b997(0x173))/0x3)+-parseInt(_0x30b997(0x15b))/0x4+parseInt(_0x30b997(0x167))/0x5+-parseInt(_0x30b997(0x174))/0x6+parseInt(_0x30b997(0x15c))/0x7+parseInt(_0x30b997(0x16a))/0x8;if(_0x3be485===_0x53fbb0)break;else _0x53e5d6['push'](_0x53e5d6['shift']());}catch(_0x136989){_0x53e5d6['push'](_0x53e5d6['shift']());}}}(_0x4c9f,0x9caf0));import{CommentService as _0x4fbbbb,CollaborationSessionService as _0x3a373c,UniverCollaborationClientPlugin as _0x542fe2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1cd485}from'@univerjs-pro/license';import{dayjs as _0x3e7d6e,UserManagerService as _0x39643a,Inject as _0x2b7fb0,Injector as _0x21ef67,Disposable as _0x274417,CustomRangeType as _0x3e7642,UniverInstanceType as _0x275ad0,DependentOn as _0x4f8b32,IConfigService as _0x1e3178,Plugin as _0x4c197b,merge as _0x4267fa}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a8b74}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x106c35,IThreadCommentDataSourceService as _0x43ec35}from'@univerjs/thread-comment';import{bufferTime as _0x54fa14}from'rxjs';import{HTTPService as _0x448a56}from'@univerjs/network';const W=_0x48adec(0x16e);var I=(_0x17e3f0=>(_0x17e3f0[_0x17e3f0[_0x48adec(0x182)]=0x0]='OpenOrReOpen',_0x17e3f0[_0x17e3f0[_0x48adec(0x197)]=0x1]=_0x48adec(0x197),_0x17e3f0[_0x17e3f0[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x17e3f0))(I||{}),v=(_0x2c3b88=>(_0x2c3b88[_0x2c3b88['Unknown']=0x0]='Unknown',_0x2c3b88[_0x2c3b88['Add']=0x1]='Add',_0x2c3b88[_0x2c3b88[_0x48adec(0x147)]=0x2]=_0x48adec(0x147),_0x2c3b88[_0x2c3b88[_0x48adec(0x160)]=0x3]=_0x48adec(0x160),_0x2c3b88[_0x2c3b88[_0x48adec(0x14e)]=0x4]='Delete',_0x2c3b88[_0x2c3b88[_0x48adec(0x196)]=0x5]='Solve',_0x2c3b88[_0x2c3b88[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x2c3b88))(v||{});const y=_0x2d8b79=>_0x3e7d6e(new Date(+_0x2d8b79))[_0x48adec(0x179)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x42f994,_0x5b6040)=>{const _0x5725e7=_0x48adec,_0x23d1a8=_0x42f994['get'](_0x39643a),_0x226caa=_0x42f994['get'](_0x448a56);_0x5b6040[_0x5725e7(0x19d)](_0x21de49=>{const _0x433b13=_0x5725e7;_0x23d1a8[_0x433b13(0x17f)](_0x21de49)&&_0x5b6040['delete'](_0x21de49);}),_0x5b6040[_0x5725e7(0x198)]&&(await _0x226caa[_0x5725e7(0x199)](_0x5725e7(0x175),{'params':{'userIDs':[..._0x5b6040]}}))[_0x5725e7(0x176)][_0x5725e7(0x1a2)][_0x5725e7(0x19d)](_0x2f6a7b=>{const _0x178472=_0x5725e7;_0x2f6a7b&&_0x23d1a8[_0x178472(0x19f)](_0x2f6a7b);});};var K=Object[_0x48adec(0x171)],V=(_0x1461d8,_0x3d3968,_0x5b25e3,_0x33fa99)=>{const _0x5536f0=_0x48adec;for(var _0x3efa94=_0x33fa99>0x1?void 0x0:_0x33fa99?K(_0x3d3968,_0x5b25e3):_0x3d3968,_0x1bb2a3=_0x1461d8[_0x5536f0(0x19b)]-0x1,_0x438df4;_0x1bb2a3>=0x0;_0x1bb2a3--)(_0x438df4=_0x1461d8[_0x1bb2a3])&&(_0x3efa94=_0x438df4(_0x3efa94)||_0x3efa94);return _0x3efa94;},p=(_0x2a495d,_0x1f925c)=>(_0x2b40b7,_0x3cd1d5)=>_0x1f925c(_0x2b40b7,_0x3cd1d5,_0x2a495d);let _=class extends _0x274417{constructor(_0x57c853,_0x4b95d6,_0x216072,_0x3a7402){const _0x25755a=_0x48adec;super(),this[_0x25755a(0x14f)]=_0x57c853,this[_0x25755a(0x170)]=_0x4b95d6,this['_userService']=_0x216072,this[_0x25755a(0x16f)]=_0x3a7402,this[_0x25755a(0x187)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f8308=_0x48adec;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f8308(0x15e)](_0x54fa14(0x10))['subscribe'](_0x588e44=>{const _0x499adb=_0x1f8308,_0x2ecb71=new Set();_0x588e44[_0x499adb(0x19d)](_0x36c054=>{const _0x35edf1=_0x499adb;switch(_0x36c054[_0x35edf1(0x18c)]){case _0x35edf1(0x15f):{const _0x5d4b55=_0x36c054[_0x35edf1(0x16b)]['personId'];_0x2ecb71['add'](_0x5d4b55);break;}}}),B(this[_0x499adb(0x16f)],_0x2ecb71);}));}[_0x48adec(0x187)](){const _0x11cc9c=_0x48adec;this[_0x11cc9c(0x17a)](this[_0x11cc9c(0x14f)][_0x11cc9c(0x155)][_0x11cc9c(0x194)](async _0x445c20=>{const _0x28092a=_0x11cc9c;var _0x315583,_0x517b99,_0x3dd92,_0x188098;const _0x3922ff=(_0x315583=this[_0x28092a(0x170)][_0x28092a(0x162)](_0x445c20['unitId'])[_0x28092a(0x1a0)](_0x504377=>_0x504377[_0x28092a(0x1a3)]===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x315583[_0x28092a(0x14a)];if(!_0x3922ff)return;const {unitId:_0x5376bb,subUnitId:_0x135b91}=_0x3922ff;switch(_0x445c20['user']&&this[_0x28092a(0x148)][_0x28092a(0x19f)](_0x445c20[_0x28092a(0x159)]),_0x445c20['type']){case v[_0x28092a(0x158)]:break;case v[_0x28092a(0x147)]:{this['_threadCommentModel'][_0x28092a(0x18a)](_0x5376bb,_0x135b91,{'unitId':_0x5376bb,'subUnitId':_0x135b91,'ref':'','id':_0x445c20[_0x28092a(0x151)],'dT':y(+_0x445c20[_0x28092a(0x15d)]),'threadId':_0x445c20[_0x28092a(0x1a3)],'personId':(_0x3dd92=(_0x517b99=_0x445c20['user'])==null?void 0x0:_0x517b99['userID'])!=null?_0x3dd92:_0x445c20[_0x28092a(0x188)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)]),'parentId':_0x3922ff['id']});break;}case v['Delete']:{const _0x293c53=this['_threadCommentModel'][_0x28092a(0x1a1)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);_0x293c53&&_0x293c53['parentId']&&this[_0x28092a(0x170)][_0x28092a(0x16c)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);break;}case v[_0x28092a(0x160)]:{this[_0x28092a(0x170)][_0x28092a(0x180)](_0x5376bb,_0x135b91,{'commentId':_0x445c20[_0x28092a(0x151)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)])});break;}case v[_0x28092a(0x196)]:{const _0x563930=(_0x188098=this['_threadCommentModel'][_0x28092a(0x162)](_0x445c20[_0x28092a(0x195)])[_0x28092a(0x1a0)](_0x5e015a=>_0x5e015a['threadId']===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x188098[_0x28092a(0x14a)];_0x563930&&this[_0x28092a(0x170)][_0x28092a(0x186)](_0x5376bb,_0x135b91,_0x563930['id'],_0x445c20[_0x28092a(0x191)]===I['Solved']);break;}}}));}};function _0x110e(_0x58bca,_0x50c825){const _0x4c9fea=_0x4c9f();return _0x110e=function(_0x110ee5,_0x54306a){_0x110ee5=_0x110ee5-0x147;let _0xe6558a=_0x4c9fea[_0x110ee5];return _0xe6558a;},_0x110e(_0x58bca,_0x50c825);}_=V([p(0x0,_0x2b7fb0(_0x4fbbbb)),p(0x1,_0x2b7fb0(_0x106c35)),p(0x2,_0x2b7fb0(_0x39643a)),p(0x3,_0x2b7fb0(_0x21ef67))],_);const z=_0x48adec(0x15a),O={};var k=Object[_0x48adec(0x171)],Q=(_0xac3178,_0x125aef,_0x4e1d1c,_0x45ba5b)=>{const _0x3573fc=_0x48adec;for(var _0x4b6ab0=_0x45ba5b>0x1?void 0x0:_0x45ba5b?k(_0x125aef,_0x4e1d1c):_0x125aef,_0x5b6cea=_0xac3178[_0x3573fc(0x19b)]-0x1,_0x598e40;_0x5b6cea>=0x0;_0x5b6cea--)(_0x598e40=_0xac3178[_0x5b6cea])&&(_0x4b6ab0=_0x598e40(_0x4b6ab0)||_0x4b6ab0);return _0x4b6ab0;},b=(_0x4cdaca,_0x329e5e)=>(_0x269a68,_0x162800)=>_0x329e5e(_0x269a68,_0x162800,_0x4cdaca);function X(_0x12184f,_0x515cb7){const _0x1dafd3=_0x48adec,_0x239333=_0x12184f[_0x1dafd3(0x14b)][0x0];return{..._0x515cb7,'id':_0x239333[_0x1dafd3(0x151)],'resolved':_0x12184f[_0x1dafd3(0x191)]===0x1,'dT':y(_0x239333[_0x1dafd3(0x15d)]),'personId':_0x239333[_0x1dafd3(0x188)],'threadId':_0x239333['threadId']};}function ee(_0x2966de,_0x13c98b,_0x53d6e4){const _0x3ca3d4=_0x48adec;var _0x4036b1,_0x28a8c4;if(((_0x28a8c4=(_0x4036b1=_0x2966de==null?void 0x0:_0x2966de[_0x3ca3d4(0x14b)])==null?void 0x0:_0x4036b1[_0x3ca3d4(0x19b)])!=null?_0x28a8c4:0x0)>0x0){const _0xa5bb15=(_0x5200a8,_0x4ad3e0)=>({'id':_0x5200a8[_0x3ca3d4(0x151)],'threadId':_0x5200a8[_0x3ca3d4(0x1a3)],'dT':y(_0x5200a8[_0x3ca3d4(0x15d)]),'personId':_0x5200a8[_0x3ca3d4(0x188)],'resolved':_0x2966de[_0x3ca3d4(0x191)]===I['Solved'],'unitId':_0x13c98b,'subUnitId':_0x53d6e4,'text':JSON[_0x3ca3d4(0x156)](_0x5200a8['content']),'parentId':_0x4ad3e0}),_0x1710a9=_0xa5bb15(_0x2966de['replies'][0x0]);return{..._0x1710a9,'children':_0x2966de[_0x3ca3d4(0x14b)][_0x3ca3d4(0x152)](0x1)[_0x3ca3d4(0x181)](_0x382878=>_0xa5bb15(_0x382878,_0x1710a9['id']))};}return null;}function _0x4c9f(){const _0x156489=['createTimestamp','pipe','add','Edit','symbol','getUnit','onReady','defineProperty','/add','post','4820640xAMSdt','getMemberID','UNRECOGNIZED','7952448MpAAEq','payload','deleteComment','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','_threadCommentModel','getOwnPropertyDescriptor','content','21lzmiOr','3028524udkfjt','/universer-api/user/list','body','857422GZvXLJ','/edit','format','disposeWithMe','onStarting','_sessionService','code','filter','getUser','updateComment','map','OpenOrReOpen','stringify','resolved','YYYY/MM/DD\x20HH:mm','resolveComment','_init','userId','50506TnmBZQ','addComment','comments','type','setConfig','_initDataSource','_configService','_threadCommentDataSourceService','solved','customRanges','rangeId','subscribe','unitId','Solve','Solved','size','get','COMMENT','length','comment','forEach','requireSession','addUser','find','getComment','users','threadId','Reply','_userService','rangeType','root','replies','/universer-api/comment/unit/','dataSource','Delete','_commentService','error','replyId','slice','values','saveCommentToSnapshot','commentUpdate$','parse','/solved','Add','user','thread-comment-data-source.config','3467216MGwWYy','7625401jQSKin'];_0x4c9f=function(){return _0x156489;};return _0x4c9f();}let S=class{constructor(_0x47cb97,_0xc18321,_0xfd51a1){const _0x4d3382=_0x48adec;this[_0x4d3382(0x16d)]=_0x47cb97,this[_0x4d3382(0x148)]=_0xc18321,this[_0x4d3382(0x17c)]=_0xfd51a1;}async[_0x48adec(0x18a)](_0x381fee){const _0x3639a0=_0x48adec;var _0x2d6db5,_0x58a9f7;const {parentId:_0x42e2d4,unitId:_0x52a6b0,text:_0x27c3ac,threadId:_0xca6043}=_0x381fee,_0x215c7a=(_0x58a9f7=(_0x2d6db5=_0x27c3ac[_0x3639a0(0x192)])==null?void 0x0:_0x2d6db5[_0x3639a0(0x17e)](_0x714043=>_0x714043[_0x3639a0(0x149)]===_0x3e7642[_0x3639a0(0x19a)])[_0x3639a0(0x181)](_0x49d69d=>_0x49d69d[_0x3639a0(0x193)]))!=null?_0x58a9f7:[],_0x112655=JSON[_0x3639a0(0x183)](_0x27c3ac),_0x2c222e=(await this['_sessionService']['requireSession'](_0x52a6b0))[_0x3639a0(0x168)]();if(_0x42e2d4){const _0x12c29c={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a,'threadId':_0xca6043},_0x77f46=(await this[_0x3639a0(0x16d)][_0x3639a0(0x166)](_0x3639a0(0x14c)+_0x52a6b0+'/reply',{'body':_0x12c29c}))['body']['reply'];return{..._0x381fee,'id':_0x77f46[_0x3639a0(0x151)],'dT':_0x3e7d6e(+_0x77f46[_0x3639a0(0x15d)])['format'](_0x3639a0(0x185)),'personId':_0x77f46[_0x3639a0(0x188)]};}else{const _0x3112f0={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a},_0x1d1f7a=await this[_0x3639a0(0x16d)]['post']('/universer-api/comment/unit/'+_0x52a6b0+_0x3639a0(0x165),{'body':_0x3112f0});return X(_0x1d1f7a[_0x3639a0(0x176)][_0x3639a0(0x19c)],_0x381fee);}}async['updateComment'](_0x1f841b){const _0x6dad84=_0x48adec;var _0x391d70,_0x2048af;const {text:_0x101eb6,unitId:_0x3e56c8}=_0x1f841b,_0x2b10fa=(_0x2048af=(_0x391d70=_0x101eb6['customRanges'])==null?void 0x0:_0x391d70[_0x6dad84(0x17e)](_0x24f515=>_0x24f515[_0x6dad84(0x149)]===_0x3e7642[_0x6dad84(0x19a)])[_0x6dad84(0x181)](_0x10dc30=>_0x10dc30[_0x6dad84(0x193)]))!=null?_0x2048af:[],_0x3f5dd3=JSON[_0x6dad84(0x183)](_0x101eb6),_0x20d790=_0x1f841b[_0x6dad84(0x1a3)],_0x2bff9a=_0x1f841b['id'],_0x1266bd={'memberId':(await this['_sessionService']['requireSession'](_0x3e56c8))['getMemberID'](),'unitId':_0x3e56c8,'threadId':_0x20d790,'mention':_0x2b10fa,'content':_0x3f5dd3,'replyId':_0x2bff9a},_0x41d163=await this[_0x6dad84(0x16d)][_0x6dad84(0x166)](_0x6dad84(0x14c)+_0x3e56c8+_0x6dad84(0x178),{'body':_0x1266bd});return!_0x41d163[_0x6dad84(0x176)][_0x6dad84(0x150)]||_0x41d163[_0x6dad84(0x176)]['error'][_0x6dad84(0x17d)]===0x1;}async[_0x48adec(0x186)](_0x1751d9){const _0x3b6a23=_0x48adec,{unitId:_0x376e7f}=_0x1751d9,_0x7019f2=_0x1751d9['threadId'],_0x184031={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x376e7f,'threadId':_0x7019f2,'solved':_0x1751d9[_0x3b6a23(0x184)]?I[_0x3b6a23(0x197)]:I[_0x3b6a23(0x182)]},_0x54fc1c=await this['_httpService'][_0x3b6a23(0x166)](_0x3b6a23(0x14c)+_0x376e7f+_0x3b6a23(0x157),{'body':_0x184031});return!_0x54fc1c[_0x3b6a23(0x176)][_0x3b6a23(0x150)]||_0x54fc1c[_0x3b6a23(0x176)]['error']['code']===0x1;}async[_0x48adec(0x16c)](_0x47c33b,_0x25efea,_0x2f238b,_0x5d24cf){const _0x3e5ce2=_0x48adec,_0x49a907={'memberId':(await this[_0x3e5ce2(0x17c)][_0x3e5ce2(0x19e)](_0x47c33b))[_0x3e5ce2(0x168)](),'threadId':_0x2f238b,'replyId':_0x5d24cf,'unitId':_0x47c33b},_0x4e5da4=await this['_httpService'][_0x3e5ce2(0x166)](_0x3e5ce2(0x14c)+_0x47c33b+'/delete',{'body':_0x49a907});return!_0x4e5da4[_0x3e5ce2(0x176)][_0x3e5ce2(0x150)]||_0x4e5da4['body']['error'][_0x3e5ce2(0x17d)]===0x1;}async['listComments'](_0x1fd226,_0x5d63e7,_0x859b81){const _0x40bded=_0x48adec,_0x44aee3={'unitId':_0x1fd226,'threadId':_0x859b81},_0x5f771f=await this['_httpService'][_0x40bded(0x166)]('/universer-api/comment/unit/'+_0x1fd226+'/list',{'body':_0x44aee3}),_0x5cb3a3=_0x859b81[_0x40bded(0x181)](_0x18b6e8=>ee(_0x5f771f[_0x40bded(0x176)][_0x40bded(0x18b)][_0x18b6e8],_0x1fd226,_0x5d63e7))[_0x40bded(0x17e)](Boolean);return Object[_0x40bded(0x153)](_0x5f771f[_0x40bded(0x176)][_0x40bded(0x1a2)])[_0x40bded(0x19d)](_0x1b37be=>{const _0x3a03e5=_0x40bded;this[_0x3a03e5(0x148)][_0x3a03e5(0x19f)](_0x1b37be);}),_0x5cb3a3;}[_0x48adec(0x154)](_0xf43c27){const _0x52d127=_0x48adec;return{'id':_0xf43c27['id'],'threadId':_0xf43c27[_0x52d127(0x1a3)],'ref':_0xf43c27['ref']};}};S=Q([b(0x0,_0x2b7fb0(_0x448a56)),b(0x1,_0x2b7fb0(_0x39643a)),b(0x2,_0x2b7fb0(_0x3a373c))],S);var re=Object[_0x48adec(0x171)],te=(_0x313d5f,_0x2d0374,_0xe96fec,_0x407950)=>{const _0x4a8f99=_0x48adec;for(var _0x37d9fb=_0x407950>0x1?void 0x0:_0x407950?re(_0x2d0374,_0xe96fec):_0x2d0374,_0x16d140=_0x313d5f[_0x4a8f99(0x19b)]-0x1,_0xbfffcd;_0x16d140>=0x0;_0x16d140--)(_0xbfffcd=_0x313d5f[_0x16d140])&&(_0x37d9fb=_0xbfffcd(_0x37d9fb)||_0x37d9fb);return _0x37d9fb;},M=(_0x41e3ab,_0x3b1625)=>(_0x8f812c,_0x3198e2)=>_0x3b1625(_0x8f812c,_0x3198e2,_0x41e3ab);let f=class extends _0x274417{constructor(_0x1fc0ec,_0x14e6ca){const _0x5acaff=_0x48adec;super(),this[_0x5acaff(0x190)]=_0x1fc0ec,this['_threadCommentDataSource']=_0x14e6ca,this['_initDataSource']();}[_0x48adec(0x18e)](){const _0x52e7e8=_0x48adec;this[_0x52e7e8(0x190)][_0x52e7e8(0x14d)]=this['_threadCommentDataSource'],this[_0x52e7e8(0x190)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x43ec35),M(0x1,_0x2b7fb0(S))],f);var se=Object[_0x48adec(0x164)],oe=Object[_0x48adec(0x171)],ne=(_0x484964,_0xfcb1af,_0xaadb2f)=>_0xfcb1af in _0x484964?se(_0x484964,_0xfcb1af,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaadb2f}):_0x484964[_0xfcb1af]=_0xaadb2f,ie=(_0x97f438,_0x506f56,_0x575599,_0x38d795)=>{for(var _0x24d440=_0x38d795>0x1?void 0x0:_0x38d795?oe(_0x506f56,_0x575599):_0x506f56,_0x122e73=_0x97f438['length']-0x1,_0x5c42d3;_0x122e73>=0x0;_0x122e73--)(_0x5c42d3=_0x97f438[_0x122e73])&&(_0x24d440=_0x5c42d3(_0x24d440)||_0x24d440);return _0x24d440;},N=(_0x5e2bbc,_0x36451a)=>(_0x3d99da,_0x42790f)=>_0x36451a(_0x3d99da,_0x42790f,_0x5e2bbc),$=(_0x1d3623,_0x5d0d1a,_0x32ef4d)=>ne(_0x1d3623,typeof _0x5d0d1a!=_0x48adec(0x161)?_0x5d0d1a+'':_0x5d0d1a,_0x32ef4d);let g=class extends _0x4c197b{constructor(_0x4c018b=O,_0x2d379d,_0x16c43d){const _0x2a81b2=_0x48adec;super(),this['_config']=_0x4c018b,this['_injector']=_0x2d379d,this[_0x2a81b2(0x18f)]=_0x16c43d;const {..._0x5bfca6}=_0x4267fa({},O,this['_config']);this['_configService'][_0x2a81b2(0x18d)](z,_0x5bfca6);}[_0x48adec(0x17b)](){const _0x1e6f3f=_0x48adec;[[S],[f],[_]][_0x1e6f3f(0x19d)](_0xfce8a4=>{const _0x3aa938=_0x1e6f3f;this[_0x3aa938(0x16f)][_0x3aa938(0x15f)](_0xfce8a4);});}[_0x48adec(0x163)](){const _0x2097c7=_0x48adec;this[_0x2097c7(0x16f)][_0x2097c7(0x199)](f),this['_injector']['get'](_);}};$(g,'pluginName',W),$(g,_0x48adec(0x18c),_0x275ad0['UNIVER_UNKNOWN']),g=ie([_0x4f8b32(_0x3a8b74,_0x542fe2,_0x1cd485),N(0x1,_0x2b7fb0(_0x21ef67)),N(0x2,_0x1e3178)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3603e1=_0x2560;(function(_0xa1537d,_0x11af53){const _0x5ea1e0=_0x2560,_0x147c00=_0xa1537d();while(!![]){try{const _0x1295b0=-parseInt(_0x5ea1e0(0x14f))/0x1*(-parseInt(_0x5ea1e0(0x163))/0x2)+parseInt(_0x5ea1e0(0x12d))/0x3+-parseInt(_0x5ea1e0(0x145))/0x4+parseInt(_0x5ea1e0(0x14d))/0x5+parseInt(_0x5ea1e0(0x132))/0x6+-parseInt(_0x5ea1e0(0x150))/0x7+-parseInt(_0x5ea1e0(0x133))/0x8*(-parseInt(_0x5ea1e0(0x15a))/0x9);if(_0x1295b0===_0x11af53)break;else _0x147c00['push'](_0x147c00['shift']());}catch(_0x5e1b46){_0x147c00['push'](_0x147c00['shift']());}}}(_0x549c,0xb67e9));import{CommentService as _0x5d5f90,CollaborationSessionService as _0x3c4a77,UniverCollaborationClientPlugin as _0x8c2bb9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd50337}from'@univerjs-pro/license';import{dayjs as _0x2557b7,UserManagerService as _0x2bff43,Inject as _0x4c511f,Injector as _0x130911,Disposable as _0x199a3d,CustomRangeType as _0x729685,UniverInstanceType as _0x4ffa54,DependentOn as _0x414d5d,IConfigService as _0x5d98bf,Plugin as _0x2db651,merge as _0x352425}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b41d9}from'@univerjs/thread-comment-ui';function _0x549c(){const _0x3b6b96=['addUser','_configService','comment','deleteComment','/edit','pipe','Edit','resolved','2PmucyW','createTimestamp','Solve','parse','YYYY/MM/DD\x20HH:mm','rangeId','_httpService','COMMENT','saveCommentToSnapshot','map','solved','getOwnPropertyDescriptor','pluginName','_userService','unitId','threadId','filter','Solved','replies','customRanges','find','_threadCommentDataSourceService','_initDataSource','userID','size','error','_injector','user','disposeWithMe','UNRECOGNIZED','length','subscribe','root','_sessionService','Unknown','_initUserSync','content','parentId','rangeType','requireSession','OpenOrReOpen','resolveComment','reply','Add','code','ref','getCurrentUser','372465IzKdOn','userId','get','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','868542mHczTj','9946000ooByHz','post','_threadCommentDataSource','setConfig','onReady','/add','_commentService','Reply','slice','/universer-api/comment/unit/','updateComment','values','UNIVER_UNKNOWN','/solved','dataSource','getMemberID','add','delete','4405228HrwoMy','payload','format','stringify','addComment','replyId','_config','body','6636785AdUQxW','_init','319433kXmTug','9171036eFBHMz','getUnit','Delete','forEach','_threadCommentModel','commentUpdate$','personId','/list','type','syncUpdateMutationToColla','9wXcmmx'];_0x549c=function(){return _0x3b6b96;};return _0x549c();}import{ThreadCommentModel as _0x1650d8,IThreadCommentDataSourceService as _0x14c9f4}from'@univerjs/thread-comment';import{bufferTime as _0x33d3a7}from'rxjs';import{HTTPService as _0x4be4d2}from'@univerjs/network';const W=_0x3603e1(0x131);var I=(_0x1e8132=>(_0x1e8132[_0x1e8132[_0x3603e1(0x126)]=0x0]=_0x3603e1(0x126),_0x1e8132[_0x1e8132['Solved']=0x1]='Solved',_0x1e8132[_0x1e8132[_0x3603e1(0x11b)]=-0x1]=_0x3603e1(0x11b),_0x1e8132))(I||{}),v=(_0x45e0db=>(_0x45e0db[_0x45e0db[_0x3603e1(0x120)]=0x0]=_0x3603e1(0x120),_0x45e0db[_0x45e0db[_0x3603e1(0x129)]=0x1]=_0x3603e1(0x129),_0x45e0db[_0x45e0db[_0x3603e1(0x13a)]=0x2]=_0x3603e1(0x13a),_0x45e0db[_0x45e0db[_0x3603e1(0x161)]=0x3]='Edit',_0x45e0db[_0x45e0db[_0x3603e1(0x152)]=0x4]=_0x3603e1(0x152),_0x45e0db[_0x45e0db['Solve']=0x5]=_0x3603e1(0x165),_0x45e0db[_0x45e0db['UNRECOGNIZED']=-0x1]=_0x3603e1(0x11b),_0x45e0db))(v||{});const y=_0x1222d2=>_0x2557b7(new Date(+_0x1222d2))[_0x3603e1(0x147)](_0x3603e1(0x167)),B=async(_0x25f2aa,_0x3668ec)=>{const _0x38f4c6=_0x3603e1,_0x41c345=_0x25f2aa[_0x38f4c6(0x12f)](_0x2bff43),_0xdd090c=_0x25f2aa['get'](_0x4be4d2);_0x3668ec['forEach'](_0x2e82cc=>{const _0x1df16f=_0x38f4c6;_0x41c345['getUser'](_0x2e82cc)&&_0x3668ec[_0x1df16f(0x144)](_0x2e82cc);}),_0x3668ec[_0x38f4c6(0x116)]&&(await _0xdd090c[_0x38f4c6(0x12f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3668ec]}}))[_0x38f4c6(0x14c)][_0x38f4c6(0x130)][_0x38f4c6(0x153)](_0x2449c2=>{_0x2449c2&&_0x41c345['addUser'](_0x2449c2);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x42190c,_0x5cec83,_0x4907dc,_0x5e1cb7)=>{const _0xff9594=_0x3603e1;for(var _0x5e9f88=_0x5e1cb7>0x1?void 0x0:_0x5e1cb7?K(_0x5cec83,_0x4907dc):_0x5cec83,_0x3bca60=_0x42190c[_0xff9594(0x11c)]-0x1,_0x48719c;_0x3bca60>=0x0;_0x3bca60--)(_0x48719c=_0x42190c[_0x3bca60])&&(_0x5e9f88=_0x48719c(_0x5e9f88)||_0x5e9f88);return _0x5e9f88;},p=(_0x2efd0f,_0x28468f)=>(_0x408ca1,_0x15dd41)=>_0x28468f(_0x408ca1,_0x15dd41,_0x2efd0f);let _=class extends _0x199a3d{constructor(_0x39e204,_0x12cd99,_0x35f7d9,_0x18e945){const _0x36e703=_0x3603e1;super(),this[_0x36e703(0x139)]=_0x39e204,this[_0x36e703(0x154)]=_0x12cd99,this[_0x36e703(0x170)]=_0x35f7d9,this[_0x36e703(0x118)]=_0x18e945,this[_0x36e703(0x14e)](),this[_0x36e703(0x121)]();}[_0x3603e1(0x121)](){const _0xaf7b0c=_0x3603e1;this[_0xaf7b0c(0x11a)](this[_0xaf7b0c(0x154)][_0xaf7b0c(0x155)][_0xaf7b0c(0x160)](_0x33d3a7(0x10))['subscribe'](_0x46c702=>{const _0x3db001=_0xaf7b0c,_0x534f63=new Set();_0x46c702[_0x3db001(0x153)](_0x1f1752=>{const _0x32501d=_0x3db001;switch(_0x1f1752[_0x32501d(0x158)]){case _0x32501d(0x143):{const _0x3a6c10=_0x1f1752[_0x32501d(0x146)][_0x32501d(0x156)];_0x534f63[_0x32501d(0x143)](_0x3a6c10);break;}}}),B(this[_0x3db001(0x118)],_0x534f63);}));}['_init'](){const _0x50faa7=_0x3603e1;this[_0x50faa7(0x11a)](this[_0x50faa7(0x139)][_0x50faa7(0x155)][_0x50faa7(0x11d)](async _0x491b86=>{const _0x383228=_0x50faa7;var _0x4cd500,_0x933e87,_0x534ec5,_0x4394c7;const _0x170e0f=(_0x4cd500=this[_0x383228(0x154)][_0x383228(0x151)](_0x491b86[_0x383228(0x171)])[_0x383228(0x112)](_0x55e71a=>_0x55e71a[_0x383228(0x172)]===_0x491b86[_0x383228(0x172)]))==null?void 0x0:_0x4cd500[_0x383228(0x11e)];if(!_0x170e0f)return;const {unitId:_0x300389,subUnitId:_0x33d44e}=_0x170e0f;switch(_0x491b86[_0x383228(0x119)]&&this[_0x383228(0x170)][_0x383228(0x15b)](_0x491b86[_0x383228(0x119)]),_0x491b86[_0x383228(0x158)]){case v['Add']:break;case v[_0x383228(0x13a)]:{this[_0x383228(0x154)][_0x383228(0x149)](_0x300389,_0x33d44e,{'unitId':_0x300389,'subUnitId':_0x33d44e,'ref':'','id':_0x491b86['replyId'],'dT':y(+_0x491b86[_0x383228(0x164)]),'threadId':_0x491b86[_0x383228(0x172)],'personId':(_0x534ec5=(_0x933e87=_0x491b86[_0x383228(0x119)])==null?void 0x0:_0x933e87[_0x383228(0x115)])!=null?_0x534ec5:_0x491b86['userId'],'text':JSON[_0x383228(0x166)](_0x491b86[_0x383228(0x122)]),'parentId':_0x170e0f['id']});break;}case v['Delete']:{const _0x418b2e=this[_0x383228(0x154)]['getComment'](_0x300389,_0x33d44e,_0x491b86[_0x383228(0x14a)]);_0x418b2e&&_0x418b2e[_0x383228(0x123)]&&this['_threadCommentModel'][_0x383228(0x15e)](_0x300389,_0x33d44e,_0x491b86[_0x383228(0x14a)]);break;}case v['Edit']:{this[_0x383228(0x154)][_0x383228(0x13d)](_0x300389,_0x33d44e,{'commentId':_0x491b86[_0x383228(0x14a)],'text':JSON['parse'](_0x491b86[_0x383228(0x122)])});break;}case v[_0x383228(0x165)]:{const _0x578684=(_0x4394c7=this[_0x383228(0x154)][_0x383228(0x151)](_0x491b86[_0x383228(0x171)])['find'](_0x40ea88=>_0x40ea88[_0x383228(0x172)]===_0x491b86['threadId']))==null?void 0x0:_0x4394c7['root'];_0x578684&&this['_threadCommentModel'][_0x383228(0x127)](_0x300389,_0x33d44e,_0x578684['id'],_0x491b86[_0x383228(0x16d)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4c511f(_0x5d5f90)),p(0x1,_0x4c511f(_0x1650d8)),p(0x2,_0x4c511f(_0x2bff43)),p(0x3,_0x4c511f(_0x130911))],_);function _0x2560(_0x347111,_0x5da665){const _0x549c35=_0x549c();return _0x2560=function(_0x25603c,_0x2dc82c){_0x25603c=_0x25603c-0x111;let _0x23ac25=_0x549c35[_0x25603c];return _0x23ac25;},_0x2560(_0x347111,_0x5da665);}const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5bdaee,_0x255f8f,_0x2a2ca5,_0x15aaa5)=>{for(var _0x45c161=_0x15aaa5>0x1?void 0x0:_0x15aaa5?k(_0x255f8f,_0x2a2ca5):_0x255f8f,_0x3a6252=_0x5bdaee['length']-0x1,_0x1d8bd2;_0x3a6252>=0x0;_0x3a6252--)(_0x1d8bd2=_0x5bdaee[_0x3a6252])&&(_0x45c161=_0x1d8bd2(_0x45c161)||_0x45c161);return _0x45c161;},b=(_0x9fdc32,_0x2f9aeb)=>(_0x29a17d,_0x40315d)=>_0x2f9aeb(_0x29a17d,_0x40315d,_0x9fdc32);function X(_0x387955,_0x8fc331){const _0x36d2f5=_0x3603e1,_0x257eeb=_0x387955[_0x36d2f5(0x175)][0x0];return{..._0x8fc331,'id':_0x257eeb[_0x36d2f5(0x14a)],'resolved':_0x387955['solved']===0x1,'dT':y(_0x257eeb[_0x36d2f5(0x164)]),'personId':_0x257eeb['userId'],'threadId':_0x257eeb[_0x36d2f5(0x172)]};}function ee(_0x242bc8,_0x1a5118,_0x5c8298){const _0x2476dc=_0x3603e1;var _0x20f65a,_0x4ded9c;if(((_0x4ded9c=(_0x20f65a=_0x242bc8==null?void 0x0:_0x242bc8['replies'])==null?void 0x0:_0x20f65a[_0x2476dc(0x11c)])!=null?_0x4ded9c:0x0)>0x0){const _0x402548=(_0x4ae8c7,_0x314035)=>({'id':_0x4ae8c7[_0x2476dc(0x14a)],'threadId':_0x4ae8c7[_0x2476dc(0x172)],'dT':y(_0x4ae8c7[_0x2476dc(0x164)]),'personId':_0x4ae8c7[_0x2476dc(0x12e)],'resolved':_0x242bc8[_0x2476dc(0x16d)]===I[_0x2476dc(0x174)],'unitId':_0x1a5118,'subUnitId':_0x5c8298,'text':JSON[_0x2476dc(0x166)](_0x4ae8c7[_0x2476dc(0x122)]),'parentId':_0x314035}),_0x2abd8f=_0x402548(_0x242bc8[_0x2476dc(0x175)][0x0]);return{..._0x2abd8f,'children':_0x242bc8['replies'][_0x2476dc(0x13b)](0x1)[_0x2476dc(0x16c)](_0x5ab63b=>_0x402548(_0x5ab63b,_0x2abd8f['id']))};}return null;}let S=class{constructor(_0x38b591,_0x12135c,_0x43adcc){const _0x1bd914=_0x3603e1;this['_httpService']=_0x38b591,this[_0x1bd914(0x170)]=_0x12135c,this[_0x1bd914(0x11f)]=_0x43adcc;}async[_0x3603e1(0x149)](_0x576602){const _0x5d6350=_0x3603e1;var _0x49b212,_0x5030d4;const {parentId:_0x2eee08,unitId:_0x2e627e,text:_0x53aa84,threadId:_0x5e5adf}=_0x576602,_0xe0a2b0=(_0x5030d4=(_0x49b212=_0x53aa84[_0x5d6350(0x111)])==null?void 0x0:_0x49b212['filter'](_0x5a2df8=>_0x5a2df8[_0x5d6350(0x124)]===_0x729685[_0x5d6350(0x16a)])[_0x5d6350(0x16c)](_0x3a8dab=>_0x3a8dab[_0x5d6350(0x168)]))!=null?_0x5030d4:[],_0x2b50ac=JSON[_0x5d6350(0x148)](_0x53aa84),_0x4b0364=(await this[_0x5d6350(0x11f)][_0x5d6350(0x125)](_0x2e627e))['getMemberID']();if(_0x2eee08){const _0x1e1567={'memberId':_0x4b0364,'unitId':_0x2e627e,'content':_0x2b50ac,'mention':_0xe0a2b0,'threadId':_0x5e5adf},_0x29a066=(await this['_httpService'][_0x5d6350(0x134)]('/universer-api/comment/unit/'+_0x2e627e+'/reply',{'body':_0x1e1567}))[_0x5d6350(0x14c)][_0x5d6350(0x128)];return{..._0x576602,'id':_0x29a066[_0x5d6350(0x14a)],'dT':_0x2557b7(+_0x29a066['createTimestamp'])[_0x5d6350(0x147)](_0x5d6350(0x167)),'personId':_0x29a066[_0x5d6350(0x12e)]};}else{const _0x3a8725={'memberId':_0x4b0364,'unitId':_0x2e627e,'content':_0x2b50ac,'mention':_0xe0a2b0},_0x12b2f1=await this['_httpService'][_0x5d6350(0x134)]('/universer-api/comment/unit/'+_0x2e627e+_0x5d6350(0x138),{'body':_0x3a8725});return X(_0x12b2f1['body'][_0x5d6350(0x15d)],_0x576602);}}async[_0x3603e1(0x13d)](_0x7e24d7){const _0x36aeb4=_0x3603e1;var _0x562efe,_0x46c781;const {text:_0x5587f3,unitId:_0x28913b}=_0x7e24d7,_0xcd73c7=(_0x46c781=(_0x562efe=_0x5587f3[_0x36aeb4(0x111)])==null?void 0x0:_0x562efe[_0x36aeb4(0x173)](_0x3950b1=>_0x3950b1[_0x36aeb4(0x124)]===_0x729685[_0x36aeb4(0x16a)])[_0x36aeb4(0x16c)](_0x543c22=>_0x543c22['rangeId']))!=null?_0x46c781:[],_0x50513b=JSON['stringify'](_0x5587f3),_0x2d8946=_0x7e24d7[_0x36aeb4(0x172)],_0x5e1fcb=_0x7e24d7['id'],_0x309c07={'memberId':(await this[_0x36aeb4(0x11f)][_0x36aeb4(0x125)](_0x28913b))['getMemberID'](),'unitId':_0x28913b,'threadId':_0x2d8946,'mention':_0xcd73c7,'content':_0x50513b,'replyId':_0x5e1fcb},_0x316bde=await this[_0x36aeb4(0x169)][_0x36aeb4(0x134)]('/universer-api/comment/unit/'+_0x28913b+_0x36aeb4(0x15f),{'body':_0x309c07});return!_0x316bde['body']['error']||_0x316bde[_0x36aeb4(0x14c)][_0x36aeb4(0x117)][_0x36aeb4(0x12a)]===0x1;}async[_0x3603e1(0x127)](_0x17a72c){const _0x564f23=_0x3603e1,{unitId:_0x417c84}=_0x17a72c,_0x49e65b=_0x17a72c[_0x564f23(0x172)],_0x2e6561={'memberId':this[_0x564f23(0x170)][_0x564f23(0x12c)]()[_0x564f23(0x115)],'unitId':_0x417c84,'threadId':_0x49e65b,'solved':_0x17a72c[_0x564f23(0x162)]?I['Solved']:I[_0x564f23(0x126)]},_0x370a85=await this[_0x564f23(0x169)]['post'](_0x564f23(0x13c)+_0x417c84+_0x564f23(0x140),{'body':_0x2e6561});return!_0x370a85[_0x564f23(0x14c)]['error']||_0x370a85[_0x564f23(0x14c)][_0x564f23(0x117)][_0x564f23(0x12a)]===0x1;}async['deleteComment'](_0x526e13,_0x3a00f5,_0x222751,_0x442f5e){const _0x336cc6=_0x3603e1,_0x98e226={'memberId':(await this['_sessionService'][_0x336cc6(0x125)](_0x526e13))[_0x336cc6(0x142)](),'threadId':_0x222751,'replyId':_0x442f5e,'unitId':_0x526e13},_0x3705d5=await this[_0x336cc6(0x169)][_0x336cc6(0x134)]('/universer-api/comment/unit/'+_0x526e13+'/delete',{'body':_0x98e226});return!_0x3705d5[_0x336cc6(0x14c)][_0x336cc6(0x117)]||_0x3705d5[_0x336cc6(0x14c)][_0x336cc6(0x117)][_0x336cc6(0x12a)]===0x1;}async['listComments'](_0x3ab6f2,_0x21a4cd,_0x11fdb9){const _0x4636dd=_0x3603e1,_0x1e174f={'unitId':_0x3ab6f2,'threadId':_0x11fdb9},_0x36d645=await this[_0x4636dd(0x169)][_0x4636dd(0x134)](_0x4636dd(0x13c)+_0x3ab6f2+_0x4636dd(0x157),{'body':_0x1e174f}),_0x198f78=_0x11fdb9[_0x4636dd(0x16c)](_0x451b15=>ee(_0x36d645[_0x4636dd(0x14c)]['comments'][_0x451b15],_0x3ab6f2,_0x21a4cd))['filter'](Boolean);return Object[_0x4636dd(0x13e)](_0x36d645['body'][_0x4636dd(0x130)])[_0x4636dd(0x153)](_0x46054b=>{const _0x152e6e=_0x4636dd;this[_0x152e6e(0x170)][_0x152e6e(0x15b)](_0x46054b);}),_0x198f78;}[_0x3603e1(0x16b)](_0x2ecc60){const _0x478897=_0x3603e1;return{'id':_0x2ecc60['id'],'threadId':_0x2ecc60[_0x478897(0x172)],'ref':_0x2ecc60[_0x478897(0x12b)]};}};S=Q([b(0x0,_0x4c511f(_0x4be4d2)),b(0x1,_0x4c511f(_0x2bff43)),b(0x2,_0x4c511f(_0x3c4a77))],S);var re=Object[_0x3603e1(0x16e)],te=(_0x52cef3,_0x358961,_0x5869a7,_0x5b2bc1)=>{const _0x49b540=_0x3603e1;for(var _0x17ada8=_0x5b2bc1>0x1?void 0x0:_0x5b2bc1?re(_0x358961,_0x5869a7):_0x358961,_0x114f18=_0x52cef3[_0x49b540(0x11c)]-0x1,_0x2d6d13;_0x114f18>=0x0;_0x114f18--)(_0x2d6d13=_0x52cef3[_0x114f18])&&(_0x17ada8=_0x2d6d13(_0x17ada8)||_0x17ada8);return _0x17ada8;},M=(_0x3d1f7b,_0x120812)=>(_0xe48815,_0x2da559)=>_0x120812(_0xe48815,_0x2da559,_0x3d1f7b);let f=class extends _0x199a3d{constructor(_0x5294ac,_0x45bfef){const _0x510915=_0x3603e1;super(),this['_threadCommentDataSourceService']=_0x5294ac,this['_threadCommentDataSource']=_0x45bfef,this[_0x510915(0x114)]();}[_0x3603e1(0x114)](){const _0x58da72=_0x3603e1;this[_0x58da72(0x113)][_0x58da72(0x141)]=this[_0x58da72(0x135)],this[_0x58da72(0x113)][_0x58da72(0x159)]=!0x1;}};f=te([M(0x0,_0x14c9f4),M(0x1,_0x4c511f(S))],f);var se=Object['defineProperty'],oe=Object[_0x3603e1(0x16e)],ne=(_0x48ded8,_0xaa4984,_0x14a79d)=>_0xaa4984 in _0x48ded8?se(_0x48ded8,_0xaa4984,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14a79d}):_0x48ded8[_0xaa4984]=_0x14a79d,ie=(_0x1405ab,_0x4d873e,_0x1a522a,_0x129fad)=>{for(var _0x4bb661=_0x129fad>0x1?void 0x0:_0x129fad?oe(_0x4d873e,_0x1a522a):_0x4d873e,_0x376546=_0x1405ab['length']-0x1,_0x2c7adc;_0x376546>=0x0;_0x376546--)(_0x2c7adc=_0x1405ab[_0x376546])&&(_0x4bb661=_0x2c7adc(_0x4bb661)||_0x4bb661);return _0x4bb661;},N=(_0x5aa258,_0x488498)=>(_0x2c93fa,_0x5a31e6)=>_0x488498(_0x2c93fa,_0x5a31e6,_0x5aa258),$=(_0x184f22,_0x48592a,_0x1a2c9f)=>ne(_0x184f22,typeof _0x48592a!='symbol'?_0x48592a+'':_0x48592a,_0x1a2c9f);let g=class extends _0x2db651{constructor(_0x1ef4b3=O,_0x2c0d31,_0x41dc22){const _0x45abde=_0x3603e1;super(),this[_0x45abde(0x14b)]=_0x1ef4b3,this[_0x45abde(0x118)]=_0x2c0d31,this[_0x45abde(0x15c)]=_0x41dc22;const {..._0x1f6e80}=_0x352425({},O,this['_config']);this['_configService'][_0x45abde(0x136)](z,_0x1f6e80);}['onStarting'](){const _0x3c080e=_0x3603e1;[[S],[f],[_]][_0x3c080e(0x153)](_0x3b515a=>{const _0xc5e888=_0x3c080e;this[_0xc5e888(0x118)][_0xc5e888(0x143)](_0x3b515a);});}[_0x3603e1(0x137)](){const _0x2ae203=_0x3603e1;this[_0x2ae203(0x118)][_0x2ae203(0x12f)](f),this[_0x2ae203(0x118)][_0x2ae203(0x12f)](_);}};$(g,_0x3603e1(0x16f),W),$(g,_0x3603e1(0x158),_0x4ffa54[_0x3603e1(0x13f)]),g=ie([_0x414d5d(_0x5b41d9,_0x8c2bb9,_0xd50337),N(0x1,_0x4c511f(_0x130911)),N(0x2,_0x5d98bf)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x48adec=_0x110e;(function(_0x512cd4,_0x53fbb0){const _0x30b997=_0x110e,_0x53e5d6=_0x512cd4();while(!![]){try{const _0x3be485=-parseInt(_0x30b997(0x177))/0x1+parseInt(_0x30b997(0x189))/0x2*(-parseInt(_0x30b997(0x173))/0x3)+-parseInt(_0x30b997(0x15b))/0x4+parseInt(_0x30b997(0x167))/0x5+-parseInt(_0x30b997(0x174))/0x6+parseInt(_0x30b997(0x15c))/0x7+parseInt(_0x30b997(0x16a))/0x8;if(_0x3be485===_0x53fbb0)break;else _0x53e5d6['push'](_0x53e5d6['shift']());}catch(_0x136989){_0x53e5d6['push'](_0x53e5d6['shift']());}}}(_0x4c9f,0x9caf0));import{CommentService as _0x4fbbbb,CollaborationSessionService as _0x3a373c,UniverCollaborationClientPlugin as _0x542fe2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1cd485}from'@univerjs-pro/license';import{dayjs as _0x3e7d6e,UserManagerService as _0x39643a,Inject as _0x2b7fb0,Injector as _0x21ef67,Disposable as _0x274417,CustomRangeType as _0x3e7642,UniverInstanceType as _0x275ad0,DependentOn as _0x4f8b32,IConfigService as _0x1e3178,Plugin as _0x4c197b,merge as _0x4267fa}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a8b74}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x106c35,IThreadCommentDataSourceService as _0x43ec35}from'@univerjs/thread-comment';import{bufferTime as _0x54fa14}from'rxjs';import{HTTPService as _0x448a56}from'@univerjs/network';const W=_0x48adec(0x16e);var I=(_0x17e3f0=>(_0x17e3f0[_0x17e3f0[_0x48adec(0x182)]=0x0]='OpenOrReOpen',_0x17e3f0[_0x17e3f0[_0x48adec(0x197)]=0x1]=_0x48adec(0x197),_0x17e3f0[_0x17e3f0[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x17e3f0))(I||{}),v=(_0x2c3b88=>(_0x2c3b88[_0x2c3b88['Unknown']=0x0]='Unknown',_0x2c3b88[_0x2c3b88['Add']=0x1]='Add',_0x2c3b88[_0x2c3b88[_0x48adec(0x147)]=0x2]=_0x48adec(0x147),_0x2c3b88[_0x2c3b88[_0x48adec(0x160)]=0x3]=_0x48adec(0x160),_0x2c3b88[_0x2c3b88[_0x48adec(0x14e)]=0x4]='Delete',_0x2c3b88[_0x2c3b88[_0x48adec(0x196)]=0x5]='Solve',_0x2c3b88[_0x2c3b88[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x2c3b88))(v||{});const y=_0x2d8b79=>_0x3e7d6e(new Date(+_0x2d8b79))[_0x48adec(0x179)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x42f994,_0x5b6040)=>{const _0x5725e7=_0x48adec,_0x23d1a8=_0x42f994['get'](_0x39643a),_0x226caa=_0x42f994['get'](_0x448a56);_0x5b6040[_0x5725e7(0x19d)](_0x21de49=>{const _0x433b13=_0x5725e7;_0x23d1a8[_0x433b13(0x17f)](_0x21de49)&&_0x5b6040['delete'](_0x21de49);}),_0x5b6040[_0x5725e7(0x198)]&&(await _0x226caa[_0x5725e7(0x199)](_0x5725e7(0x175),{'params':{'userIDs':[..._0x5b6040]}}))[_0x5725e7(0x176)][_0x5725e7(0x1a2)][_0x5725e7(0x19d)](_0x2f6a7b=>{const _0x178472=_0x5725e7;_0x2f6a7b&&_0x23d1a8[_0x178472(0x19f)](_0x2f6a7b);});};var K=Object[_0x48adec(0x171)],V=(_0x1461d8,_0x3d3968,_0x5b25e3,_0x33fa99)=>{const _0x5536f0=_0x48adec;for(var _0x3efa94=_0x33fa99>0x1?void 0x0:_0x33fa99?K(_0x3d3968,_0x5b25e3):_0x3d3968,_0x1bb2a3=_0x1461d8[_0x5536f0(0x19b)]-0x1,_0x438df4;_0x1bb2a3>=0x0;_0x1bb2a3--)(_0x438df4=_0x1461d8[_0x1bb2a3])&&(_0x3efa94=_0x438df4(_0x3efa94)||_0x3efa94);return _0x3efa94;},p=(_0x2a495d,_0x1f925c)=>(_0x2b40b7,_0x3cd1d5)=>_0x1f925c(_0x2b40b7,_0x3cd1d5,_0x2a495d);let _=class extends _0x274417{constructor(_0x57c853,_0x4b95d6,_0x216072,_0x3a7402){const _0x25755a=_0x48adec;super(),this[_0x25755a(0x14f)]=_0x57c853,this[_0x25755a(0x170)]=_0x4b95d6,this['_userService']=_0x216072,this[_0x25755a(0x16f)]=_0x3a7402,this[_0x25755a(0x187)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f8308=_0x48adec;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f8308(0x15e)](_0x54fa14(0x10))['subscribe'](_0x588e44=>{const _0x499adb=_0x1f8308,_0x2ecb71=new Set();_0x588e44[_0x499adb(0x19d)](_0x36c054=>{const _0x35edf1=_0x499adb;switch(_0x36c054[_0x35edf1(0x18c)]){case _0x35edf1(0x15f):{const _0x5d4b55=_0x36c054[_0x35edf1(0x16b)]['personId'];_0x2ecb71['add'](_0x5d4b55);break;}}}),B(this[_0x499adb(0x16f)],_0x2ecb71);}));}[_0x48adec(0x187)](){const _0x11cc9c=_0x48adec;this[_0x11cc9c(0x17a)](this[_0x11cc9c(0x14f)][_0x11cc9c(0x155)][_0x11cc9c(0x194)](async _0x445c20=>{const _0x28092a=_0x11cc9c;var _0x315583,_0x517b99,_0x3dd92,_0x188098;const _0x3922ff=(_0x315583=this[_0x28092a(0x170)][_0x28092a(0x162)](_0x445c20['unitId'])[_0x28092a(0x1a0)](_0x504377=>_0x504377[_0x28092a(0x1a3)]===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x315583[_0x28092a(0x14a)];if(!_0x3922ff)return;const {unitId:_0x5376bb,subUnitId:_0x135b91}=_0x3922ff;switch(_0x445c20['user']&&this[_0x28092a(0x148)][_0x28092a(0x19f)](_0x445c20[_0x28092a(0x159)]),_0x445c20['type']){case v[_0x28092a(0x158)]:break;case v[_0x28092a(0x147)]:{this['_threadCommentModel'][_0x28092a(0x18a)](_0x5376bb,_0x135b91,{'unitId':_0x5376bb,'subUnitId':_0x135b91,'ref':'','id':_0x445c20[_0x28092a(0x151)],'dT':y(+_0x445c20[_0x28092a(0x15d)]),'threadId':_0x445c20[_0x28092a(0x1a3)],'personId':(_0x3dd92=(_0x517b99=_0x445c20['user'])==null?void 0x0:_0x517b99['userID'])!=null?_0x3dd92:_0x445c20[_0x28092a(0x188)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)]),'parentId':_0x3922ff['id']});break;}case v['Delete']:{const _0x293c53=this['_threadCommentModel'][_0x28092a(0x1a1)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);_0x293c53&&_0x293c53['parentId']&&this[_0x28092a(0x170)][_0x28092a(0x16c)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);break;}case v[_0x28092a(0x160)]:{this[_0x28092a(0x170)][_0x28092a(0x180)](_0x5376bb,_0x135b91,{'commentId':_0x445c20[_0x28092a(0x151)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)])});break;}case v[_0x28092a(0x196)]:{const _0x563930=(_0x188098=this['_threadCommentModel'][_0x28092a(0x162)](_0x445c20[_0x28092a(0x195)])[_0x28092a(0x1a0)](_0x5e015a=>_0x5e015a['threadId']===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x188098[_0x28092a(0x14a)];_0x563930&&this[_0x28092a(0x170)][_0x28092a(0x186)](_0x5376bb,_0x135b91,_0x563930['id'],_0x445c20[_0x28092a(0x191)]===I['Solved']);break;}}}));}};function _0x110e(_0x58bca,_0x50c825){const _0x4c9fea=_0x4c9f();return _0x110e=function(_0x110ee5,_0x54306a){_0x110ee5=_0x110ee5-0x147;let _0xe6558a=_0x4c9fea[_0x110ee5];return _0xe6558a;},_0x110e(_0x58bca,_0x50c825);}_=V([p(0x0,_0x2b7fb0(_0x4fbbbb)),p(0x1,_0x2b7fb0(_0x106c35)),p(0x2,_0x2b7fb0(_0x39643a)),p(0x3,_0x2b7fb0(_0x21ef67))],_);const z=_0x48adec(0x15a),O={};var k=Object[_0x48adec(0x171)],Q=(_0xac3178,_0x125aef,_0x4e1d1c,_0x45ba5b)=>{const _0x3573fc=_0x48adec;for(var _0x4b6ab0=_0x45ba5b>0x1?void 0x0:_0x45ba5b?k(_0x125aef,_0x4e1d1c):_0x125aef,_0x5b6cea=_0xac3178[_0x3573fc(0x19b)]-0x1,_0x598e40;_0x5b6cea>=0x0;_0x5b6cea--)(_0x598e40=_0xac3178[_0x5b6cea])&&(_0x4b6ab0=_0x598e40(_0x4b6ab0)||_0x4b6ab0);return _0x4b6ab0;},b=(_0x4cdaca,_0x329e5e)=>(_0x269a68,_0x162800)=>_0x329e5e(_0x269a68,_0x162800,_0x4cdaca);function X(_0x12184f,_0x515cb7){const _0x1dafd3=_0x48adec,_0x239333=_0x12184f[_0x1dafd3(0x14b)][0x0];return{..._0x515cb7,'id':_0x239333[_0x1dafd3(0x151)],'resolved':_0x12184f[_0x1dafd3(0x191)]===0x1,'dT':y(_0x239333[_0x1dafd3(0x15d)]),'personId':_0x239333[_0x1dafd3(0x188)],'threadId':_0x239333['threadId']};}function ee(_0x2966de,_0x13c98b,_0x53d6e4){const _0x3ca3d4=_0x48adec;var _0x4036b1,_0x28a8c4;if(((_0x28a8c4=(_0x4036b1=_0x2966de==null?void 0x0:_0x2966de[_0x3ca3d4(0x14b)])==null?void 0x0:_0x4036b1[_0x3ca3d4(0x19b)])!=null?_0x28a8c4:0x0)>0x0){const _0xa5bb15=(_0x5200a8,_0x4ad3e0)=>({'id':_0x5200a8[_0x3ca3d4(0x151)],'threadId':_0x5200a8[_0x3ca3d4(0x1a3)],'dT':y(_0x5200a8[_0x3ca3d4(0x15d)]),'personId':_0x5200a8[_0x3ca3d4(0x188)],'resolved':_0x2966de[_0x3ca3d4(0x191)]===I['Solved'],'unitId':_0x13c98b,'subUnitId':_0x53d6e4,'text':JSON[_0x3ca3d4(0x156)](_0x5200a8['content']),'parentId':_0x4ad3e0}),_0x1710a9=_0xa5bb15(_0x2966de['replies'][0x0]);return{..._0x1710a9,'children':_0x2966de[_0x3ca3d4(0x14b)][_0x3ca3d4(0x152)](0x1)[_0x3ca3d4(0x181)](_0x382878=>_0xa5bb15(_0x382878,_0x1710a9['id']))};}return null;}function _0x4c9f(){const _0x156489=['createTimestamp','pipe','add','Edit','symbol','getUnit','onReady','defineProperty','/add','post','4820640xAMSdt','getMemberID','UNRECOGNIZED','7952448MpAAEq','payload','deleteComment','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','_threadCommentModel','getOwnPropertyDescriptor','content','21lzmiOr','3028524udkfjt','/universer-api/user/list','body','857422GZvXLJ','/edit','format','disposeWithMe','onStarting','_sessionService','code','filter','getUser','updateComment','map','OpenOrReOpen','stringify','resolved','YYYY/MM/DD\x20HH:mm','resolveComment','_init','userId','50506TnmBZQ','addComment','comments','type','setConfig','_initDataSource','_configService','_threadCommentDataSourceService','solved','customRanges','rangeId','subscribe','unitId','Solve','Solved','size','get','COMMENT','length','comment','forEach','requireSession','addUser','find','getComment','users','threadId','Reply','_userService','rangeType','root','replies','/universer-api/comment/unit/','dataSource','Delete','_commentService','error','replyId','slice','values','saveCommentToSnapshot','commentUpdate$','parse','/solved','Add','user','thread-comment-data-source.config','3467216MGwWYy','7625401jQSKin'];_0x4c9f=function(){return _0x156489;};return _0x4c9f();}let S=class{constructor(_0x47cb97,_0xc18321,_0xfd51a1){const _0x4d3382=_0x48adec;this[_0x4d3382(0x16d)]=_0x47cb97,this[_0x4d3382(0x148)]=_0xc18321,this[_0x4d3382(0x17c)]=_0xfd51a1;}async[_0x48adec(0x18a)](_0x381fee){const _0x3639a0=_0x48adec;var _0x2d6db5,_0x58a9f7;const {parentId:_0x42e2d4,unitId:_0x52a6b0,text:_0x27c3ac,threadId:_0xca6043}=_0x381fee,_0x215c7a=(_0x58a9f7=(_0x2d6db5=_0x27c3ac[_0x3639a0(0x192)])==null?void 0x0:_0x2d6db5[_0x3639a0(0x17e)](_0x714043=>_0x714043[_0x3639a0(0x149)]===_0x3e7642[_0x3639a0(0x19a)])[_0x3639a0(0x181)](_0x49d69d=>_0x49d69d[_0x3639a0(0x193)]))!=null?_0x58a9f7:[],_0x112655=JSON[_0x3639a0(0x183)](_0x27c3ac),_0x2c222e=(await this['_sessionService']['requireSession'](_0x52a6b0))[_0x3639a0(0x168)]();if(_0x42e2d4){const _0x12c29c={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a,'threadId':_0xca6043},_0x77f46=(await this[_0x3639a0(0x16d)][_0x3639a0(0x166)](_0x3639a0(0x14c)+_0x52a6b0+'/reply',{'body':_0x12c29c}))['body']['reply'];return{..._0x381fee,'id':_0x77f46[_0x3639a0(0x151)],'dT':_0x3e7d6e(+_0x77f46[_0x3639a0(0x15d)])['format'](_0x3639a0(0x185)),'personId':_0x77f46[_0x3639a0(0x188)]};}else{const _0x3112f0={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a},_0x1d1f7a=await this[_0x3639a0(0x16d)]['post']('/universer-api/comment/unit/'+_0x52a6b0+_0x3639a0(0x165),{'body':_0x3112f0});return X(_0x1d1f7a[_0x3639a0(0x176)][_0x3639a0(0x19c)],_0x381fee);}}async['updateComment'](_0x1f841b){const _0x6dad84=_0x48adec;var _0x391d70,_0x2048af;const {text:_0x101eb6,unitId:_0x3e56c8}=_0x1f841b,_0x2b10fa=(_0x2048af=(_0x391d70=_0x101eb6['customRanges'])==null?void 0x0:_0x391d70[_0x6dad84(0x17e)](_0x24f515=>_0x24f515[_0x6dad84(0x149)]===_0x3e7642[_0x6dad84(0x19a)])[_0x6dad84(0x181)](_0x10dc30=>_0x10dc30[_0x6dad84(0x193)]))!=null?_0x2048af:[],_0x3f5dd3=JSON[_0x6dad84(0x183)](_0x101eb6),_0x20d790=_0x1f841b[_0x6dad84(0x1a3)],_0x2bff9a=_0x1f841b['id'],_0x1266bd={'memberId':(await this['_sessionService']['requireSession'](_0x3e56c8))['getMemberID'](),'unitId':_0x3e56c8,'threadId':_0x20d790,'mention':_0x2b10fa,'content':_0x3f5dd3,'replyId':_0x2bff9a},_0x41d163=await this[_0x6dad84(0x16d)][_0x6dad84(0x166)](_0x6dad84(0x14c)+_0x3e56c8+_0x6dad84(0x178),{'body':_0x1266bd});return!_0x41d163[_0x6dad84(0x176)][_0x6dad84(0x150)]||_0x41d163[_0x6dad84(0x176)]['error'][_0x6dad84(0x17d)]===0x1;}async[_0x48adec(0x186)](_0x1751d9){const _0x3b6a23=_0x48adec,{unitId:_0x376e7f}=_0x1751d9,_0x7019f2=_0x1751d9['threadId'],_0x184031={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x376e7f,'threadId':_0x7019f2,'solved':_0x1751d9[_0x3b6a23(0x184)]?I[_0x3b6a23(0x197)]:I[_0x3b6a23(0x182)]},_0x54fc1c=await this['_httpService'][_0x3b6a23(0x166)](_0x3b6a23(0x14c)+_0x376e7f+_0x3b6a23(0x157),{'body':_0x184031});return!_0x54fc1c[_0x3b6a23(0x176)][_0x3b6a23(0x150)]||_0x54fc1c[_0x3b6a23(0x176)]['error']['code']===0x1;}async[_0x48adec(0x16c)](_0x47c33b,_0x25efea,_0x2f238b,_0x5d24cf){const _0x3e5ce2=_0x48adec,_0x49a907={'memberId':(await this[_0x3e5ce2(0x17c)][_0x3e5ce2(0x19e)](_0x47c33b))[_0x3e5ce2(0x168)](),'threadId':_0x2f238b,'replyId':_0x5d24cf,'unitId':_0x47c33b},_0x4e5da4=await this['_httpService'][_0x3e5ce2(0x166)](_0x3e5ce2(0x14c)+_0x47c33b+'/delete',{'body':_0x49a907});return!_0x4e5da4[_0x3e5ce2(0x176)][_0x3e5ce2(0x150)]||_0x4e5da4['body']['error'][_0x3e5ce2(0x17d)]===0x1;}async['listComments'](_0x1fd226,_0x5d63e7,_0x859b81){const _0x40bded=_0x48adec,_0x44aee3={'unitId':_0x1fd226,'threadId':_0x859b81},_0x5f771f=await this['_httpService'][_0x40bded(0x166)]('/universer-api/comment/unit/'+_0x1fd226+'/list',{'body':_0x44aee3}),_0x5cb3a3=_0x859b81[_0x40bded(0x181)](_0x18b6e8=>ee(_0x5f771f[_0x40bded(0x176)][_0x40bded(0x18b)][_0x18b6e8],_0x1fd226,_0x5d63e7))[_0x40bded(0x17e)](Boolean);return Object[_0x40bded(0x153)](_0x5f771f[_0x40bded(0x176)][_0x40bded(0x1a2)])[_0x40bded(0x19d)](_0x1b37be=>{const _0x3a03e5=_0x40bded;this[_0x3a03e5(0x148)][_0x3a03e5(0x19f)](_0x1b37be);}),_0x5cb3a3;}[_0x48adec(0x154)](_0xf43c27){const _0x52d127=_0x48adec;return{'id':_0xf43c27['id'],'threadId':_0xf43c27[_0x52d127(0x1a3)],'ref':_0xf43c27['ref']};}};S=Q([b(0x0,_0x2b7fb0(_0x448a56)),b(0x1,_0x2b7fb0(_0x39643a)),b(0x2,_0x2b7fb0(_0x3a373c))],S);var re=Object[_0x48adec(0x171)],te=(_0x313d5f,_0x2d0374,_0xe96fec,_0x407950)=>{const _0x4a8f99=_0x48adec;for(var _0x37d9fb=_0x407950>0x1?void 0x0:_0x407950?re(_0x2d0374,_0xe96fec):_0x2d0374,_0x16d140=_0x313d5f[_0x4a8f99(0x19b)]-0x1,_0xbfffcd;_0x16d140>=0x0;_0x16d140--)(_0xbfffcd=_0x313d5f[_0x16d140])&&(_0x37d9fb=_0xbfffcd(_0x37d9fb)||_0x37d9fb);return _0x37d9fb;},M=(_0x41e3ab,_0x3b1625)=>(_0x8f812c,_0x3198e2)=>_0x3b1625(_0x8f812c,_0x3198e2,_0x41e3ab);let f=class extends _0x274417{constructor(_0x1fc0ec,_0x14e6ca){const _0x5acaff=_0x48adec;super(),this[_0x5acaff(0x190)]=_0x1fc0ec,this['_threadCommentDataSource']=_0x14e6ca,this['_initDataSource']();}[_0x48adec(0x18e)](){const _0x52e7e8=_0x48adec;this[_0x52e7e8(0x190)][_0x52e7e8(0x14d)]=this['_threadCommentDataSource'],this[_0x52e7e8(0x190)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x43ec35),M(0x1,_0x2b7fb0(S))],f);var se=Object[_0x48adec(0x164)],oe=Object[_0x48adec(0x171)],ne=(_0x484964,_0xfcb1af,_0xaadb2f)=>_0xfcb1af in _0x484964?se(_0x484964,_0xfcb1af,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaadb2f}):_0x484964[_0xfcb1af]=_0xaadb2f,ie=(_0x97f438,_0x506f56,_0x575599,_0x38d795)=>{for(var _0x24d440=_0x38d795>0x1?void 0x0:_0x38d795?oe(_0x506f56,_0x575599):_0x506f56,_0x122e73=_0x97f438['length']-0x1,_0x5c42d3;_0x122e73>=0x0;_0x122e73--)(_0x5c42d3=_0x97f438[_0x122e73])&&(_0x24d440=_0x5c42d3(_0x24d440)||_0x24d440);return _0x24d440;},N=(_0x5e2bbc,_0x36451a)=>(_0x3d99da,_0x42790f)=>_0x36451a(_0x3d99da,_0x42790f,_0x5e2bbc),$=(_0x1d3623,_0x5d0d1a,_0x32ef4d)=>ne(_0x1d3623,typeof _0x5d0d1a!=_0x48adec(0x161)?_0x5d0d1a+'':_0x5d0d1a,_0x32ef4d);let g=class extends _0x4c197b{constructor(_0x4c018b=O,_0x2d379d,_0x16c43d){const _0x2a81b2=_0x48adec;super(),this['_config']=_0x4c018b,this['_injector']=_0x2d379d,this[_0x2a81b2(0x18f)]=_0x16c43d;const {..._0x5bfca6}=_0x4267fa({},O,this['_config']);this['_configService'][_0x2a81b2(0x18d)](z,_0x5bfca6);}[_0x48adec(0x17b)](){const _0x1e6f3f=_0x48adec;[[S],[f],[_]][_0x1e6f3f(0x19d)](_0xfce8a4=>{const _0x3aa938=_0x1e6f3f;this[_0x3aa938(0x16f)][_0x3aa938(0x15f)](_0xfce8a4);});}[_0x48adec(0x163)](){const _0x2097c7=_0x48adec;this[_0x2097c7(0x16f)][_0x2097c7(0x199)](f),this['_injector']['get'](_);}};$(g,'pluginName',W),$(g,_0x48adec(0x18c),_0x275ad0['UNIVER_UNKNOWN']),g=ie([_0x4f8b32(_0x3a8b74,_0x542fe2,_0x1cd485),N(0x1,_0x2b7fb0(_0x21ef67)),N(0x2,_0x1e3178)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x43b6(){const _0xef9192=['solved','COMMENT','users','resolved','length','replyId','UniverLicensePlugin','Add','exports','root','userId','post','Plugin','format','stringify','/edit','parse','replies','updateComment','_userService','getUnit','UniverProCollaborationClient','UniverThreadComment','filter','1141bviBpN','getOwnPropertyDescriptor','saveCommentToSnapshot','user','disposeWithMe','/solved','rangeId','getMemberID','resolveComment','10zfECVt','payload','Injector','Unknown','@univerjs/thread-comment-ui','values','ThreadCommentModel','Delete','map','4883112UJMIkP','userID','onStarting','bufferTime','thread-comment-data-source.config','409904fnSnzq','ref','Inject','UniverThreadCommentUi','1420359XwfLXu','UniverThreadCommentUIPlugin','UNIVER_UNKNOWN','UniverInstanceType','/add','DependentOn','10579BjONCy','YYYY/MM/DD\x20HH:mm','rangeType','add','_configService','rxjs','slice','_commentService','@univerjs/core','UniverProLicense','CollaborationSessionService','UNRECOGNIZED','unitId','1449789WDzaiH','Solved','dayjs','comments','forEach','_threadCommentDataSource','merge','Edit','HTTPService','code','amd','CustomRangeType','type','object','subscribe','_injector','UniverCollaborationClientPlugin','Solve','CommentService','body','UniverNetwork','@univerjs-pro/license','Reply','@univerjs/network','addUser','@univerjs/thread-comment','UniverCore','deleteComment','_sessionService','dataSource','get','symbol','toStringTag','Disposable','_init','onReady','_threadCommentModel','addComment','getCurrentUser','_threadCommentDataSourceService','OpenOrReOpen','getUser','threadId','_initUserSync','30tkyFrd','UniverThreadCommentDataSourcePlugin','error','requireSession','_config','createTimestamp','defineProperty','36192erMutX','/delete','comment','/universer-api/user/list','_httpService','_initDataSource','6570117GCYWST','function','86hjDQyc','content','/universer-api/comment/unit/','UserManagerService','Module'];_0x43b6=function(){return _0xef9192;};return _0x43b6();}function _0x2263(_0x26951e,_0x51504c){const _0x43b6ef=_0x43b6();return _0x2263=function(_0x226364,_0x39c559){_0x226364=_0x226364-0x1a3;let _0x4e8dc4=_0x43b6ef[_0x226364];return _0x4e8dc4;},_0x2263(_0x26951e,_0x51504c);}(function(_0xd14ae0,_0xf243e5){const _0x20ddf4=_0x2263,_0x5068ca=_0xd14ae0();while(!![]){try{const _0x3ed83e=parseInt(_0x20ddf4(0x1c1))/0x1*(parseInt(_0x20ddf4(0x209))/0x2)+-parseInt(_0x20ddf4(0x1bb))/0x3+-parseInt(_0x20ddf4(0x1b7))/0x4*(parseInt(_0x20ddf4(0x1a9))/0x5)+-parseInt(_0x20ddf4(0x201))/0x6*(parseInt(_0x20ddf4(0x226))/0x7)+parseInt(_0x20ddf4(0x1b2))/0x8+parseInt(_0x20ddf4(0x207))/0x9+parseInt(_0x20ddf4(0x1fa))/0xa*(parseInt(_0x20ddf4(0x1ce))/0xb);if(_0x3ed83e===_0xf243e5)break;else _0x5068ca['push'](_0x5068ca['shift']());}catch(_0x191611){_0x5068ca['push'](_0x5068ca['shift']());}}}(_0x43b6,0x812b3),function(_0x5860bf,_0x298227){const _0xa7eb1e=_0x2263;typeof exports==_0xa7eb1e(0x1db)&&typeof module<'u'?_0x298227(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xa7eb1e(0x208)&&define[_0xa7eb1e(0x1d8)]?define([_0xa7eb1e(0x216),'@univerjs-pro/collaboration-client',_0xa7eb1e(0x1e3),_0xa7eb1e(0x1c9),_0xa7eb1e(0x1ad),_0xa7eb1e(0x1e7),_0xa7eb1e(0x1c6),_0xa7eb1e(0x1e5)],_0x298227):(_0x5860bf=typeof globalThis<'u'?globalThis:_0x5860bf||self,_0x298227(_0x5860bf['UniverProThreadCommentDatasource']={},_0x5860bf[_0xa7eb1e(0x223)],_0x5860bf[_0xa7eb1e(0x1ca)],_0x5860bf[_0xa7eb1e(0x1e8)],_0x5860bf[_0xa7eb1e(0x1ba)],_0x5860bf[_0xa7eb1e(0x224)],_0x5860bf[_0xa7eb1e(0x1c6)],_0x5860bf[_0xa7eb1e(0x1e2)]));}(this,function(_0x1364c8,_0x39b02d,_0x2c286d,_0x4fe2f8,_0x4dd2a8,_0x335fb0,_0x29d836,_0x2d13c2){'use strict';const _0x621c8a=_0x2263;const _0x4696c5='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x589ea0=(_0xdf4b59=>(_0xdf4b59[_0xdf4b59[_0x621c8a(0x1f6)]=0x0]='OpenOrReOpen',_0xdf4b59[_0xdf4b59[_0x621c8a(0x1cf)]=0x1]=_0x621c8a(0x1cf),_0xdf4b59[_0xdf4b59['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xdf4b59))(_0x589ea0||{}),_0x18e293=(_0xbd6438=>(_0xbd6438[_0xbd6438['Unknown']=0x0]=_0x621c8a(0x1ac),_0xbd6438[_0xbd6438['Add']=0x1]=_0x621c8a(0x215),_0xbd6438[_0xbd6438[_0x621c8a(0x1e4)]=0x2]=_0x621c8a(0x1e4),_0xbd6438[_0xbd6438[_0x621c8a(0x1d5)]=0x3]=_0x621c8a(0x1d5),_0xbd6438[_0xbd6438[_0x621c8a(0x1b0)]=0x4]=_0x621c8a(0x1b0),_0xbd6438[_0xbd6438[_0x621c8a(0x1df)]=0x5]=_0x621c8a(0x1df),_0xbd6438[_0xbd6438['UNRECOGNIZED']=-0x1]=_0x621c8a(0x1cc),_0xbd6438))(_0x18e293||{});const _0x34ad45=_0x5444c3=>_0x4fe2f8[_0x621c8a(0x1d0)](new Date(+_0x5444c3))[_0x621c8a(0x21b)](_0x621c8a(0x1c2)),_0x32d783=async(_0x352d11,_0x3cffdd)=>{const _0x4697b0=_0x621c8a,_0x2bd54d=_0x352d11[_0x4697b0(0x1ec)](_0x4fe2f8[_0x4697b0(0x20c)]),_0x543cd3=_0x352d11[_0x4697b0(0x1ec)](_0x2d13c2[_0x4697b0(0x1d6)]);_0x3cffdd[_0x4697b0(0x1d2)](_0x5f21bd=>{const _0x2e3569=_0x4697b0;_0x2bd54d[_0x2e3569(0x1f7)](_0x5f21bd)&&_0x3cffdd['delete'](_0x5f21bd);}),_0x3cffdd['size']&&(await _0x543cd3[_0x4697b0(0x1ec)](_0x4697b0(0x204),{'params':{'userIDs':[..._0x3cffdd]}}))[_0x4697b0(0x1e1)][_0x4697b0(0x210)]['forEach'](_0x40778b=>{const _0x581ad5=_0x4697b0;_0x40778b&&_0x2bd54d[_0x581ad5(0x1e6)](_0x40778b);});};var _0x48a680=Object[_0x621c8a(0x227)],_0x2b4e8f=(_0x1e14bd,_0x410822,_0x1a27e2,_0x195c04)=>{const _0x29c8cb=_0x621c8a;for(var _0x3b7566=_0x195c04>0x1?void 0x0:_0x195c04?_0x48a680(_0x410822,_0x1a27e2):_0x410822,_0x5eb332=_0x1e14bd[_0x29c8cb(0x212)]-0x1,_0x8d7e0f;_0x5eb332>=0x0;_0x5eb332--)(_0x8d7e0f=_0x1e14bd[_0x5eb332])&&(_0x3b7566=_0x8d7e0f(_0x3b7566)||_0x3b7566);return _0x3b7566;},_0x579027=(_0x46c716,_0x483230)=>(_0x590855,_0x533cfa)=>_0x483230(_0x590855,_0x533cfa,_0x46c716);let _0x479b42=class extends _0x4fe2f8[_0x621c8a(0x1ef)]{constructor(_0x5a0169,_0x245875,_0x241c80,_0x562fa5){const _0x46e933=_0x621c8a;super(),this[_0x46e933(0x1c8)]=_0x5a0169,this[_0x46e933(0x1f2)]=_0x245875,this[_0x46e933(0x221)]=_0x241c80,this['_injector']=_0x562fa5,this[_0x46e933(0x1f0)](),this['_initUserSync']();}[_0x621c8a(0x1f9)](){const _0x10aa3b=_0x621c8a;this['disposeWithMe'](this[_0x10aa3b(0x1f2)]['commentUpdate$']['pipe'](_0x29d836[_0x10aa3b(0x1b5)](0x10))[_0x10aa3b(0x1dc)](_0x82182a=>{const _0x8f9877=_0x10aa3b,_0x2ae634=new Set();_0x82182a[_0x8f9877(0x1d2)](_0x293d12=>{const _0x2d7df9=_0x8f9877;switch(_0x293d12[_0x2d7df9(0x1da)]){case'add':{const _0x2775eb=_0x293d12[_0x2d7df9(0x1aa)]['personId'];_0x2ae634[_0x2d7df9(0x1c4)](_0x2775eb);break;}}}),_0x32d783(this['_injector'],_0x2ae634);}));}[_0x621c8a(0x1f0)](){const _0x3fbc45=_0x621c8a;this[_0x3fbc45(0x1a4)](this[_0x3fbc45(0x1c8)]['commentUpdate$'][_0x3fbc45(0x1dc)](async _0x48d7a8=>{const _0x5311f1=_0x3fbc45;var _0xcf88c0,_0x5c0372,_0xae7ec2,_0x11c52a;const _0x555409=(_0xcf88c0=this['_threadCommentModel'][_0x5311f1(0x222)](_0x48d7a8[_0x5311f1(0x1cd)])['find'](_0x1ae19b=>_0x1ae19b[_0x5311f1(0x1f8)]===_0x48d7a8[_0x5311f1(0x1f8)]))==null?void 0x0:_0xcf88c0[_0x5311f1(0x217)];if(!_0x555409)return;const {unitId:_0x2d61a9,subUnitId:_0x70e6f6}=_0x555409;switch(_0x48d7a8[_0x5311f1(0x1a3)]&&this[_0x5311f1(0x221)]['addUser'](_0x48d7a8[_0x5311f1(0x1a3)]),_0x48d7a8[_0x5311f1(0x1da)]){case _0x18e293[_0x5311f1(0x215)]:break;case _0x18e293['Reply']:{this['_threadCommentModel'][_0x5311f1(0x1f3)](_0x2d61a9,_0x70e6f6,{'unitId':_0x2d61a9,'subUnitId':_0x70e6f6,'ref':'','id':_0x48d7a8['replyId'],'dT':_0x34ad45(+_0x48d7a8[_0x5311f1(0x1ff)]),'threadId':_0x48d7a8[_0x5311f1(0x1f8)],'personId':(_0xae7ec2=(_0x5c0372=_0x48d7a8[_0x5311f1(0x1a3)])==null?void 0x0:_0x5c0372[_0x5311f1(0x1b3)])!=null?_0xae7ec2:_0x48d7a8[_0x5311f1(0x218)],'text':JSON[_0x5311f1(0x21e)](_0x48d7a8[_0x5311f1(0x20a)]),'parentId':_0x555409['id']});break;}case _0x18e293[_0x5311f1(0x1b0)]:{const _0x392d86=this[_0x5311f1(0x1f2)]['getComment'](_0x2d61a9,_0x70e6f6,_0x48d7a8[_0x5311f1(0x213)]);_0x392d86&&_0x392d86['parentId']&&this['_threadCommentModel'][_0x5311f1(0x1e9)](_0x2d61a9,_0x70e6f6,_0x48d7a8[_0x5311f1(0x213)]);break;}case _0x18e293[_0x5311f1(0x1d5)]:{this[_0x5311f1(0x1f2)][_0x5311f1(0x220)](_0x2d61a9,_0x70e6f6,{'commentId':_0x48d7a8['replyId'],'text':JSON['parse'](_0x48d7a8['content'])});break;}case _0x18e293[_0x5311f1(0x1df)]:{const _0x277692=(_0x11c52a=this['_threadCommentModel'][_0x5311f1(0x222)](_0x48d7a8[_0x5311f1(0x1cd)])['find'](_0x8967a7=>_0x8967a7[_0x5311f1(0x1f8)]===_0x48d7a8[_0x5311f1(0x1f8)]))==null?void 0x0:_0x11c52a[_0x5311f1(0x217)];_0x277692&&this['_threadCommentModel']['resolveComment'](_0x2d61a9,_0x70e6f6,_0x277692['id'],_0x48d7a8[_0x5311f1(0x20e)]===_0x589ea0[_0x5311f1(0x1cf)]);break;}}}));}};_0x479b42=_0x2b4e8f([_0x579027(0x0,_0x4fe2f8[_0x621c8a(0x1b9)](_0x39b02d[_0x621c8a(0x1e0)])),_0x579027(0x1,_0x4fe2f8[_0x621c8a(0x1b9)](_0x335fb0[_0x621c8a(0x1af)])),_0x579027(0x2,_0x4fe2f8[_0x621c8a(0x1b9)](_0x4fe2f8[_0x621c8a(0x20c)])),_0x579027(0x3,_0x4fe2f8[_0x621c8a(0x1b9)](_0x4fe2f8[_0x621c8a(0x1ab)]))],_0x479b42);const _0x492efb=_0x621c8a(0x1b6),_0x27617e={};var _0x290262=Object[_0x621c8a(0x227)],_0xe659bf=(_0x3000e6,_0x57c87c,_0x25aaef,_0x25c6a1)=>{const _0x58c15f=_0x621c8a;for(var _0x370b6e=_0x25c6a1>0x1?void 0x0:_0x25c6a1?_0x290262(_0x57c87c,_0x25aaef):_0x57c87c,_0xa18c26=_0x3000e6[_0x58c15f(0x212)]-0x1,_0x399e0b;_0xa18c26>=0x0;_0xa18c26--)(_0x399e0b=_0x3000e6[_0xa18c26])&&(_0x370b6e=_0x399e0b(_0x370b6e)||_0x370b6e);return _0x370b6e;},_0x3f08a2=(_0x556b74,_0x1c4725)=>(_0x2869fe,_0x252775)=>_0x1c4725(_0x2869fe,_0x252775,_0x556b74);function _0x13c38e(_0x5031a2,_0x170e2f){const _0x59d96f=_0x621c8a,_0xea9d2e=_0x5031a2[_0x59d96f(0x21f)][0x0];return{..._0x170e2f,'id':_0xea9d2e[_0x59d96f(0x213)],'resolved':_0x5031a2[_0x59d96f(0x20e)]===0x1,'dT':_0x34ad45(_0xea9d2e['createTimestamp']),'personId':_0xea9d2e[_0x59d96f(0x218)],'threadId':_0xea9d2e[_0x59d96f(0x1f8)]};}function _0x286105(_0x51c281,_0x40367e,_0x386aa4){const _0x4244bf=_0x621c8a;var _0x389807,_0x41fe8c;if(((_0x41fe8c=(_0x389807=_0x51c281==null?void 0x0:_0x51c281[_0x4244bf(0x21f)])==null?void 0x0:_0x389807[_0x4244bf(0x212)])!=null?_0x41fe8c:0x0)>0x0){const _0x11783f=(_0x5d8e4b,_0x1bb702)=>({'id':_0x5d8e4b[_0x4244bf(0x213)],'threadId':_0x5d8e4b[_0x4244bf(0x1f8)],'dT':_0x34ad45(_0x5d8e4b[_0x4244bf(0x1ff)]),'personId':_0x5d8e4b['userId'],'resolved':_0x51c281[_0x4244bf(0x20e)]===_0x589ea0[_0x4244bf(0x1cf)],'unitId':_0x40367e,'subUnitId':_0x386aa4,'text':JSON['parse'](_0x5d8e4b['content']),'parentId':_0x1bb702}),_0x7ceb7e=_0x11783f(_0x51c281[_0x4244bf(0x21f)][0x0]);return{..._0x7ceb7e,'children':_0x51c281[_0x4244bf(0x21f)][_0x4244bf(0x1c7)](0x1)[_0x4244bf(0x1b1)](_0x32c0cf=>_0x11783f(_0x32c0cf,_0x7ceb7e['id']))};}return null;}let _0x14208e=class{constructor(_0x3797a7,_0x2498f7,_0x367310){const _0x1abdfb=_0x621c8a;this[_0x1abdfb(0x205)]=_0x3797a7,this[_0x1abdfb(0x221)]=_0x2498f7,this[_0x1abdfb(0x1ea)]=_0x367310;}async[_0x621c8a(0x1f3)](_0x216feb){const _0x1aabdd=_0x621c8a;var _0x112b29,_0x2d497b;const {parentId:_0x57904f,unitId:_0x2b53c9,text:_0x4a91ef,threadId:_0x24a3ab}=_0x216feb,_0x227674=(_0x2d497b=(_0x112b29=_0x4a91ef['customRanges'])==null?void 0x0:_0x112b29[_0x1aabdd(0x225)](_0x52d885=>_0x52d885[_0x1aabdd(0x1c3)]===_0x4fe2f8[_0x1aabdd(0x1d9)][_0x1aabdd(0x20f)])['map'](_0x370e17=>_0x370e17[_0x1aabdd(0x1a6)]))!=null?_0x2d497b:[],_0x15bc49=JSON[_0x1aabdd(0x21c)](_0x4a91ef),_0x4bcd87=(await this[_0x1aabdd(0x1ea)][_0x1aabdd(0x1fd)](_0x2b53c9))[_0x1aabdd(0x1a7)]();if(_0x57904f){const _0x4a02bb={'memberId':_0x4bcd87,'unitId':_0x2b53c9,'content':_0x15bc49,'mention':_0x227674,'threadId':_0x24a3ab},_0x2da8d9=(await this[_0x1aabdd(0x205)][_0x1aabdd(0x219)](_0x1aabdd(0x20b)+_0x2b53c9+'/reply',{'body':_0x4a02bb}))[_0x1aabdd(0x1e1)]['reply'];return{..._0x216feb,'id':_0x2da8d9[_0x1aabdd(0x213)],'dT':_0x4fe2f8['dayjs'](+_0x2da8d9[_0x1aabdd(0x1ff)])['format'](_0x1aabdd(0x1c2)),'personId':_0x2da8d9[_0x1aabdd(0x218)]};}else{const _0x2cc378={'memberId':_0x4bcd87,'unitId':_0x2b53c9,'content':_0x15bc49,'mention':_0x227674},_0x5da2f2=await this[_0x1aabdd(0x205)][_0x1aabdd(0x219)](_0x1aabdd(0x20b)+_0x2b53c9+_0x1aabdd(0x1bf),{'body':_0x2cc378});return _0x13c38e(_0x5da2f2[_0x1aabdd(0x1e1)][_0x1aabdd(0x203)],_0x216feb);}}async[_0x621c8a(0x220)](_0xc994e9){const _0x491d2e=_0x621c8a;var _0xb15531,_0x36ac69;const {text:_0x418561,unitId:_0x26af0d}=_0xc994e9,_0x11a4b1=(_0x36ac69=(_0xb15531=_0x418561['customRanges'])==null?void 0x0:_0xb15531['filter'](_0x52e0cc=>_0x52e0cc[_0x491d2e(0x1c3)]===_0x4fe2f8[_0x491d2e(0x1d9)][_0x491d2e(0x20f)])[_0x491d2e(0x1b1)](_0x1940cc=>_0x1940cc['rangeId']))!=null?_0x36ac69:[],_0xfd37db=JSON[_0x491d2e(0x21c)](_0x418561),_0x4cc4bf=_0xc994e9[_0x491d2e(0x1f8)],_0x5f0442=_0xc994e9['id'],_0x5e5958={'memberId':(await this[_0x491d2e(0x1ea)][_0x491d2e(0x1fd)](_0x26af0d))[_0x491d2e(0x1a7)](),'unitId':_0x26af0d,'threadId':_0x4cc4bf,'mention':_0x11a4b1,'content':_0xfd37db,'replyId':_0x5f0442},_0x5058ed=await this['_httpService'][_0x491d2e(0x219)](_0x491d2e(0x20b)+_0x26af0d+_0x491d2e(0x21d),{'body':_0x5e5958});return!_0x5058ed[_0x491d2e(0x1e1)][_0x491d2e(0x1fc)]||_0x5058ed[_0x491d2e(0x1e1)][_0x491d2e(0x1fc)][_0x491d2e(0x1d7)]===0x1;}async[_0x621c8a(0x1a8)](_0x521bd1){const _0x29cd5d=_0x621c8a,{unitId:_0x35773f}=_0x521bd1,_0x531f53=_0x521bd1[_0x29cd5d(0x1f8)],_0x44a999={'memberId':this[_0x29cd5d(0x221)][_0x29cd5d(0x1f4)]()['userID'],'unitId':_0x35773f,'threadId':_0x531f53,'solved':_0x521bd1[_0x29cd5d(0x211)]?_0x589ea0[_0x29cd5d(0x1cf)]:_0x589ea0[_0x29cd5d(0x1f6)]},_0x2048bb=await this[_0x29cd5d(0x205)][_0x29cd5d(0x219)](_0x29cd5d(0x20b)+_0x35773f+_0x29cd5d(0x1a5),{'body':_0x44a999});return!_0x2048bb[_0x29cd5d(0x1e1)][_0x29cd5d(0x1fc)]||_0x2048bb['body'][_0x29cd5d(0x1fc)]['code']===0x1;}async[_0x621c8a(0x1e9)](_0x581cb1,_0x2c0d3d,_0x2ee973,_0x3a5334){const _0x43b918=_0x621c8a,_0x1ef600={'memberId':(await this[_0x43b918(0x1ea)][_0x43b918(0x1fd)](_0x581cb1))[_0x43b918(0x1a7)](),'threadId':_0x2ee973,'replyId':_0x3a5334,'unitId':_0x581cb1},_0x323014=await this[_0x43b918(0x205)][_0x43b918(0x219)](_0x43b918(0x20b)+_0x581cb1+_0x43b918(0x202),{'body':_0x1ef600});return!_0x323014[_0x43b918(0x1e1)]['error']||_0x323014[_0x43b918(0x1e1)][_0x43b918(0x1fc)][_0x43b918(0x1d7)]===0x1;}async['listComments'](_0x23d2ac,_0x568b3d,_0x63bf56){const _0x40bc64=_0x621c8a,_0xe15183={'unitId':_0x23d2ac,'threadId':_0x63bf56},_0x35e970=await this[_0x40bc64(0x205)][_0x40bc64(0x219)]('/universer-api/comment/unit/'+_0x23d2ac+'/list',{'body':_0xe15183}),_0x1b4263=_0x63bf56[_0x40bc64(0x1b1)](_0x50611d=>_0x286105(_0x35e970['body'][_0x40bc64(0x1d1)][_0x50611d],_0x23d2ac,_0x568b3d))[_0x40bc64(0x225)](Boolean);return Object[_0x40bc64(0x1ae)](_0x35e970[_0x40bc64(0x1e1)][_0x40bc64(0x210)])[_0x40bc64(0x1d2)](_0x36411f=>{const _0x33947d=_0x40bc64;this['_userService'][_0x33947d(0x1e6)](_0x36411f);}),_0x1b4263;}[_0x621c8a(0x228)](_0x2826a4){const _0x1ffd4e=_0x621c8a;return{'id':_0x2826a4['id'],'threadId':_0x2826a4['threadId'],'ref':_0x2826a4[_0x1ffd4e(0x1b8)]};}};_0x14208e=_0xe659bf([_0x3f08a2(0x0,_0x4fe2f8[_0x621c8a(0x1b9)](_0x2d13c2[_0x621c8a(0x1d6)])),_0x3f08a2(0x1,_0x4fe2f8[_0x621c8a(0x1b9)](_0x4fe2f8[_0x621c8a(0x20c)])),_0x3f08a2(0x2,_0x4fe2f8[_0x621c8a(0x1b9)](_0x39b02d[_0x621c8a(0x1cb)]))],_0x14208e);var _0x49bc21=Object[_0x621c8a(0x227)],_0x5b47dc=(_0x4db194,_0x57ca5c,_0x457608,_0x3a60b6)=>{const _0x5e58a4=_0x621c8a;for(var _0x1b0cae=_0x3a60b6>0x1?void 0x0:_0x3a60b6?_0x49bc21(_0x57ca5c,_0x457608):_0x57ca5c,_0x3807bc=_0x4db194[_0x5e58a4(0x212)]-0x1,_0x524fe6;_0x3807bc>=0x0;_0x3807bc--)(_0x524fe6=_0x4db194[_0x3807bc])&&(_0x1b0cae=_0x524fe6(_0x1b0cae)||_0x1b0cae);return _0x1b0cae;},_0x2e4e1a=(_0x56aefc,_0x411035)=>(_0x5564c1,_0x130719)=>_0x411035(_0x5564c1,_0x130719,_0x56aefc);let _0x4bf261=class extends _0x4fe2f8[_0x621c8a(0x1ef)]{constructor(_0x2fe674,_0x54cd8f){const _0x1c9525=_0x621c8a;super(),this[_0x1c9525(0x1f5)]=_0x2fe674,this[_0x1c9525(0x1d3)]=_0x54cd8f,this[_0x1c9525(0x206)]();}['_initDataSource'](){const _0x2dbd77=_0x621c8a;this['_threadCommentDataSourceService'][_0x2dbd77(0x1eb)]=this[_0x2dbd77(0x1d3)],this[_0x2dbd77(0x1f5)]['syncUpdateMutationToColla']=!0x1;}};_0x4bf261=_0x5b47dc([_0x2e4e1a(0x0,_0x335fb0['IThreadCommentDataSourceService']),_0x2e4e1a(0x1,_0x4fe2f8[_0x621c8a(0x1b9)](_0x14208e))],_0x4bf261);var _0x24e48e=Object[_0x621c8a(0x200)],_0x2b6ea3=Object[_0x621c8a(0x227)],_0x5a4e09=(_0x1b89e4,_0x601104,_0x5921c3)=>_0x601104 in _0x1b89e4?_0x24e48e(_0x1b89e4,_0x601104,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5921c3}):_0x1b89e4[_0x601104]=_0x5921c3,_0x4b39da=(_0x5d4a9f,_0x1ba3b8,_0x1708e3,_0x1df463)=>{const _0x562803=_0x621c8a;for(var _0x38b97e=_0x1df463>0x1?void 0x0:_0x1df463?_0x2b6ea3(_0x1ba3b8,_0x1708e3):_0x1ba3b8,_0x339de0=_0x5d4a9f[_0x562803(0x212)]-0x1,_0x3f85fa;_0x339de0>=0x0;_0x339de0--)(_0x3f85fa=_0x5d4a9f[_0x339de0])&&(_0x38b97e=_0x3f85fa(_0x38b97e)||_0x38b97e);return _0x38b97e;},_0x1706f7=(_0x5bc052,_0x395508)=>(_0x3dbfdd,_0x162e21)=>_0x395508(_0x3dbfdd,_0x162e21,_0x5bc052),_0x16bba0=(_0x11750b,_0x240602,_0x3997ea)=>_0x5a4e09(_0x11750b,typeof _0x240602!=_0x621c8a(0x1ed)?_0x240602+'':_0x240602,_0x3997ea);_0x1364c8['UniverThreadCommentDataSourcePlugin']=class extends _0x4fe2f8[_0x621c8a(0x21a)]{constructor(_0x3f27be=_0x27617e,_0x209b5b,_0x2b3de3){const _0x5d3465=_0x621c8a;super(),this[_0x5d3465(0x1fe)]=_0x3f27be,this['_injector']=_0x209b5b,this[_0x5d3465(0x1c5)]=_0x2b3de3;const {..._0x5e42ec}=_0x4fe2f8[_0x5d3465(0x1d4)]({},_0x27617e,this['_config']);this[_0x5d3465(0x1c5)]['setConfig'](_0x492efb,_0x5e42ec);}[_0x621c8a(0x1b4)](){[[_0x14208e],[_0x4bf261],[_0x479b42]]['forEach'](_0x4623e4=>{const _0x234546=_0x2263;this[_0x234546(0x1dd)][_0x234546(0x1c4)](_0x4623e4);});}[_0x621c8a(0x1f1)](){const _0x20d6b9=_0x621c8a;this[_0x20d6b9(0x1dd)][_0x20d6b9(0x1ec)](_0x4bf261),this[_0x20d6b9(0x1dd)][_0x20d6b9(0x1ec)](_0x479b42);}},_0x16bba0(_0x1364c8[_0x621c8a(0x1fb)],'pluginName',_0x4696c5),_0x16bba0(_0x1364c8[_0x621c8a(0x1fb)],_0x621c8a(0x1da),_0x4fe2f8[_0x621c8a(0x1be)][_0x621c8a(0x1bd)]),_0x1364c8[_0x621c8a(0x1fb)]=_0x4b39da([_0x4fe2f8[_0x621c8a(0x1c0)](_0x4dd2a8[_0x621c8a(0x1bc)],_0x39b02d[_0x621c8a(0x1de)],_0x2c286d[_0x621c8a(0x214)]),_0x1706f7(0x1,_0x4fe2f8['Inject'](_0x4fe2f8[_0x621c8a(0x1ab)])),_0x1706f7(0x2,_0x4fe2f8['IConfigService'])],_0x1364c8[_0x621c8a(0x1fb)]),Object[_0x621c8a(0x200)](_0x1364c8,Symbol[_0x621c8a(0x1ee)],{'value':_0x621c8a(0x20d)});}));
|
|
1
|
+
function _0x1c97(){const _0x10518a=['IThreadCommentDataSourceService','Delete','@univerjs/thread-comment','disposeWithMe','COMMENT','rxjs','_userService','_threadCommentDataSourceService','getUser','toStringTag','CollaborationSessionService','payload','length','createTimestamp','subscribe','add','rangeType','Solved','_injector','function','/universer-api/user/list','thread-comment-data-source.config','replies','YYYY/MM/DD\x20HH:mm','4939613DsUoVT','commentUpdate$','reply','slice','_configService','exports','UniverThreadCommentUIPlugin','map','Add','type','customRanges','size','getOwnPropertyDescriptor','filter','UniverNetwork','replyId','setConfig','onStarting','@univerjs-pro/collaboration-client','_threadCommentDataSource','_threadCommentModel','Disposable','resolved','requireSession','@univerjs/thread-comment-ui','pipe','find','object','parse','CommentService','/edit','stringify','Solve','1683sofGKa','UniverThreadCommentUi','/universer-api/comment/unit/','_commentService','OpenOrReOpen','_init','_initDataSource','dataSource','Edit','getCurrentUser','addUser','updateComment','get','error','code','_config','Module','post','Reply','saveCommentToSnapshot','73955ytZKPK','format','UserManagerService','delete','HTTPService','1013224HNnTEc','syncUpdateMutationToColla','threadId','user','userID','UniverProLicense','ref','UNIVER_UNKNOWN','@univerjs-pro/license','Unknown','values','deleteComment','UniverProThreadCommentDatasource','solved','rangeId','addComment','Inject','_httpService','_sessionService','body','symbol','onReady','DependentOn','_initUserSync','IConfigService','users','UniverThreadCommentDataSourcePlugin','1024119KaTZab','dayjs','resolveComment','defineProperty','104CYJQXC','UNRECOGNIZED','forEach','/solved','content','/add','UniverCollaborationClientPlugin','3704lsIktz','@univerjs/core','userId','24562400bFjhjL','pluginName','/reply','getMemberID','UniverProCollaborationClient','1BODdKr','personId','/delete','amd','201504cObhrz','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','listComments'];_0x1c97=function(){return _0x10518a;};return _0x1c97();}function _0x3d17(_0x4680af,_0xc88f40){const _0x1c97af=_0x1c97();return _0x3d17=function(_0x3d1744,_0x2de8d3){_0x3d1744=_0x3d1744-0x1d2;let _0x45b4b0=_0x1c97af[_0x3d1744];return _0x45b4b0;},_0x3d17(_0x4680af,_0xc88f40);}(function(_0x5ec5ea,_0x5c6187){const _0xc57454=_0x3d17,_0x19f76e=_0x5ec5ea();while(!![]){try{const _0x5d9f67=parseInt(_0xc57454(0x215))/0x1*(-parseInt(_0xc57454(0x1e7))/0x2)+-parseInt(_0xc57454(0x202))/0x3+parseInt(_0xc57454(0x206))/0x4*(-parseInt(_0xc57454(0x1e2))/0x5)+-parseInt(_0xc57454(0x219))/0x6+-parseInt(_0xc57454(0x236))/0x7+parseInt(_0xc57454(0x20d))/0x8*(-parseInt(_0xc57454(0x257))/0x9)+parseInt(_0xc57454(0x210))/0xa;if(_0x5d9f67===_0x5c6187)break;else _0x19f76e['push'](_0x19f76e['shift']());}catch(_0x5f02f4){_0x19f76e['push'](_0x19f76e['shift']());}}}(_0x1c97,0x61229),function(_0x2575bc,_0x1ce5ed){const _0x499016=_0x3d17;typeof exports==_0x499016(0x251)&&typeof module<'u'?_0x1ce5ed(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x499016(0x231)&&define[_0x499016(0x218)]?define([_0x499016(0x23b),_0x499016(0x248),_0x499016(0x1ef),_0x499016(0x20e),_0x499016(0x24e),_0x499016(0x220),_0x499016(0x223),'@univerjs/network'],_0x1ce5ed):(_0x2575bc=typeof globalThis<'u'?globalThis:_0x2575bc||self,_0x1ce5ed(_0x2575bc[_0x499016(0x1f3)]={},_0x2575bc[_0x499016(0x214)],_0x2575bc[_0x499016(0x1ec)],_0x2575bc['UniverCore'],_0x2575bc[_0x499016(0x258)],_0x2575bc['UniverThreadComment'],_0x2575bc[_0x499016(0x223)],_0x2575bc[_0x499016(0x244)]));}(this,function(_0xd744f6,_0x3be277,_0x24e1bb,_0x14156a,_0x28798b,_0x9217ca,_0x52b944,_0x12195e){'use strict';const _0x4b6f5f=_0x3d17;const _0x2e5626=_0x4b6f5f(0x21b);var _0x2db4ab=(_0x43d8a8=>(_0x43d8a8[_0x43d8a8[_0x4b6f5f(0x1d2)]=0x0]='OpenOrReOpen',_0x43d8a8[_0x43d8a8['Solved']=0x1]=_0x4b6f5f(0x22f),_0x43d8a8[_0x43d8a8['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x43d8a8))(_0x2db4ab||{}),_0x5ea982=(_0x4465b4=>(_0x4465b4[_0x4465b4[_0x4b6f5f(0x1f0)]=0x0]='Unknown',_0x4465b4[_0x4465b4[_0x4b6f5f(0x23e)]=0x1]=_0x4b6f5f(0x23e),_0x4465b4[_0x4465b4[_0x4b6f5f(0x1e0)]=0x2]='Reply',_0x4465b4[_0x4465b4[_0x4b6f5f(0x1d6)]=0x3]=_0x4b6f5f(0x1d6),_0x4465b4[_0x4465b4[_0x4b6f5f(0x21f)]=0x4]=_0x4b6f5f(0x21f),_0x4465b4[_0x4465b4[_0x4b6f5f(0x256)]=0x5]='Solve',_0x4465b4[_0x4465b4['UNRECOGNIZED']=-0x1]=_0x4b6f5f(0x207),_0x4465b4))(_0x5ea982||{});const _0x5c8641=_0x4425d8=>_0x14156a[_0x4b6f5f(0x203)](new Date(+_0x4425d8))[_0x4b6f5f(0x1e3)]('YYYY/MM/DD\x20HH:mm'),_0x253ecb=async(_0x281b8d,_0x25ee6f)=>{const _0x2d7159=_0x4b6f5f,_0x1700a7=_0x281b8d[_0x2d7159(0x1da)](_0x14156a[_0x2d7159(0x1e4)]),_0x22cd3c=_0x281b8d[_0x2d7159(0x1da)](_0x12195e[_0x2d7159(0x1e6)]);_0x25ee6f['forEach'](_0x1197ca=>{const _0x170200=_0x2d7159;_0x1700a7[_0x170200(0x226)](_0x1197ca)&&_0x25ee6f[_0x170200(0x1e5)](_0x1197ca);}),_0x25ee6f[_0x2d7159(0x241)]&&(await _0x22cd3c[_0x2d7159(0x1da)](_0x2d7159(0x232),{'params':{'userIDs':[..._0x25ee6f]}}))['body'][_0x2d7159(0x200)]['forEach'](_0x5c177a=>{const _0x2869de=_0x2d7159;_0x5c177a&&_0x1700a7[_0x2869de(0x1d8)](_0x5c177a);});};var _0x1544b4=Object[_0x4b6f5f(0x242)],_0x5ac6ad=(_0x322401,_0x45fb75,_0x4e726d,_0x1bb5cd)=>{const _0x446e37=_0x4b6f5f;for(var _0x324c31=_0x1bb5cd>0x1?void 0x0:_0x1bb5cd?_0x1544b4(_0x45fb75,_0x4e726d):_0x45fb75,_0x48c773=_0x322401[_0x446e37(0x22a)]-0x1,_0x3debe2;_0x48c773>=0x0;_0x48c773--)(_0x3debe2=_0x322401[_0x48c773])&&(_0x324c31=_0x3debe2(_0x324c31)||_0x324c31);return _0x324c31;},_0x3fcc5c=(_0x23c7fe,_0x2ce160)=>(_0x3b0bc0,_0x5eb7e2)=>_0x2ce160(_0x3b0bc0,_0x5eb7e2,_0x23c7fe);let _0x16746b=class extends _0x14156a['Disposable']{constructor(_0x291cc4,_0x227d48,_0x5ad6be,_0x5cd5b3){const _0x5594fa=_0x4b6f5f;super(),this[_0x5594fa(0x25a)]=_0x291cc4,this[_0x5594fa(0x24a)]=_0x227d48,this[_0x5594fa(0x224)]=_0x5ad6be,this[_0x5594fa(0x230)]=_0x5cd5b3,this[_0x5594fa(0x1d3)](),this[_0x5594fa(0x1fe)]();}[_0x4b6f5f(0x1fe)](){const _0x419280=_0x4b6f5f;this[_0x419280(0x221)](this[_0x419280(0x24a)][_0x419280(0x237)][_0x419280(0x24f)](_0x52b944['bufferTime'](0x10))['subscribe'](_0x2321dc=>{const _0x3a3ec9=_0x419280,_0x2436dc=new Set();_0x2321dc['forEach'](_0x2d30f5=>{const _0x2a56d9=_0x3d17;switch(_0x2d30f5[_0x2a56d9(0x23f)]){case _0x2a56d9(0x22d):{const _0x364ac4=_0x2d30f5[_0x2a56d9(0x229)][_0x2a56d9(0x216)];_0x2436dc['add'](_0x364ac4);break;}}}),_0x253ecb(this[_0x3a3ec9(0x230)],_0x2436dc);}));}[_0x4b6f5f(0x1d3)](){const _0x1cb17c=_0x4b6f5f;this[_0x1cb17c(0x221)](this[_0x1cb17c(0x25a)][_0x1cb17c(0x237)][_0x1cb17c(0x22c)](async _0x142e1a=>{const _0x3a7fc6=_0x1cb17c;var _0x594aff,_0x12f84b,_0x548a37,_0x1573f2;const _0x5dc458=(_0x594aff=this['_threadCommentModel']['getUnit'](_0x142e1a['unitId'])[_0x3a7fc6(0x250)](_0x34226=>_0x34226[_0x3a7fc6(0x1e9)]===_0x142e1a[_0x3a7fc6(0x1e9)]))==null?void 0x0:_0x594aff[_0x3a7fc6(0x21c)];if(!_0x5dc458)return;const {unitId:_0x535f9e,subUnitId:_0x39a21a}=_0x5dc458;switch(_0x142e1a[_0x3a7fc6(0x1ea)]&&this[_0x3a7fc6(0x224)][_0x3a7fc6(0x1d8)](_0x142e1a[_0x3a7fc6(0x1ea)]),_0x142e1a['type']){case _0x5ea982[_0x3a7fc6(0x23e)]:break;case _0x5ea982[_0x3a7fc6(0x1e0)]:{this['_threadCommentModel'][_0x3a7fc6(0x1f6)](_0x535f9e,_0x39a21a,{'unitId':_0x535f9e,'subUnitId':_0x39a21a,'ref':'','id':_0x142e1a[_0x3a7fc6(0x245)],'dT':_0x5c8641(+_0x142e1a[_0x3a7fc6(0x22b)]),'threadId':_0x142e1a['threadId'],'personId':(_0x548a37=(_0x12f84b=_0x142e1a[_0x3a7fc6(0x1ea)])==null?void 0x0:_0x12f84b[_0x3a7fc6(0x1eb)])!=null?_0x548a37:_0x142e1a['userId'],'text':JSON[_0x3a7fc6(0x252)](_0x142e1a[_0x3a7fc6(0x20a)]),'parentId':_0x5dc458['id']});break;}case _0x5ea982[_0x3a7fc6(0x21f)]:{const _0x5d69f3=this['_threadCommentModel']['getComment'](_0x535f9e,_0x39a21a,_0x142e1a[_0x3a7fc6(0x245)]);_0x5d69f3&&_0x5d69f3['parentId']&&this[_0x3a7fc6(0x24a)][_0x3a7fc6(0x1f2)](_0x535f9e,_0x39a21a,_0x142e1a['replyId']);break;}case _0x5ea982[_0x3a7fc6(0x1d6)]:{this[_0x3a7fc6(0x24a)][_0x3a7fc6(0x1d9)](_0x535f9e,_0x39a21a,{'commentId':_0x142e1a['replyId'],'text':JSON[_0x3a7fc6(0x252)](_0x142e1a[_0x3a7fc6(0x20a)])});break;}case _0x5ea982['Solve']:{const _0x6d670a=(_0x1573f2=this[_0x3a7fc6(0x24a)]['getUnit'](_0x142e1a['unitId'])['find'](_0xf71333=>_0xf71333[_0x3a7fc6(0x1e9)]===_0x142e1a[_0x3a7fc6(0x1e9)]))==null?void 0x0:_0x1573f2[_0x3a7fc6(0x21c)];_0x6d670a&&this['_threadCommentModel'][_0x3a7fc6(0x204)](_0x535f9e,_0x39a21a,_0x6d670a['id'],_0x142e1a[_0x3a7fc6(0x1f4)]===_0x2db4ab[_0x3a7fc6(0x22f)]);break;}}}));}};_0x16746b=_0x5ac6ad([_0x3fcc5c(0x0,_0x14156a[_0x4b6f5f(0x1f7)](_0x3be277[_0x4b6f5f(0x253)])),_0x3fcc5c(0x1,_0x14156a[_0x4b6f5f(0x1f7)](_0x9217ca['ThreadCommentModel'])),_0x3fcc5c(0x2,_0x14156a[_0x4b6f5f(0x1f7)](_0x14156a[_0x4b6f5f(0x1e4)])),_0x3fcc5c(0x3,_0x14156a['Inject'](_0x14156a['Injector']))],_0x16746b);const _0x3dd47d=_0x4b6f5f(0x233),_0x1b2a9c={};var _0x3f5512=Object['getOwnPropertyDescriptor'],_0x17b74c=(_0x5ee88d,_0x51295f,_0x16b30d,_0xa9bc42)=>{for(var _0x59cad7=_0xa9bc42>0x1?void 0x0:_0xa9bc42?_0x3f5512(_0x51295f,_0x16b30d):_0x51295f,_0xf564d9=_0x5ee88d['length']-0x1,_0x14af0f;_0xf564d9>=0x0;_0xf564d9--)(_0x14af0f=_0x5ee88d[_0xf564d9])&&(_0x59cad7=_0x14af0f(_0x59cad7)||_0x59cad7);return _0x59cad7;},_0xc9af10=(_0x464188,_0x1463fc)=>(_0x10071c,_0x41fdd9)=>_0x1463fc(_0x10071c,_0x41fdd9,_0x464188);function _0x260188(_0x2aeb7a,_0x3b1627){const _0x1c589b=_0x4b6f5f,_0xdbd2aa=_0x2aeb7a['replies'][0x0];return{..._0x3b1627,'id':_0xdbd2aa['replyId'],'resolved':_0x2aeb7a[_0x1c589b(0x1f4)]===0x1,'dT':_0x5c8641(_0xdbd2aa[_0x1c589b(0x22b)]),'personId':_0xdbd2aa[_0x1c589b(0x20f)],'threadId':_0xdbd2aa[_0x1c589b(0x1e9)]};}function _0x57f91c(_0xea106a,_0x32f874,_0x49433d){const _0x30d3de=_0x4b6f5f;var _0x505041,_0x20fd6c;if(((_0x20fd6c=(_0x505041=_0xea106a==null?void 0x0:_0xea106a['replies'])==null?void 0x0:_0x505041[_0x30d3de(0x22a)])!=null?_0x20fd6c:0x0)>0x0){const _0x58fd08=(_0x4830c0,_0x39e1b5)=>({'id':_0x4830c0[_0x30d3de(0x245)],'threadId':_0x4830c0[_0x30d3de(0x1e9)],'dT':_0x5c8641(_0x4830c0[_0x30d3de(0x22b)]),'personId':_0x4830c0['userId'],'resolved':_0xea106a['solved']===_0x2db4ab[_0x30d3de(0x22f)],'unitId':_0x32f874,'subUnitId':_0x49433d,'text':JSON['parse'](_0x4830c0[_0x30d3de(0x20a)]),'parentId':_0x39e1b5}),_0x6c4bd1=_0x58fd08(_0xea106a[_0x30d3de(0x234)][0x0]);return{..._0x6c4bd1,'children':_0xea106a[_0x30d3de(0x234)][_0x30d3de(0x239)](0x1)[_0x30d3de(0x23d)](_0x196f28=>_0x58fd08(_0x196f28,_0x6c4bd1['id']))};}return null;}let _0x2da3ad=class{constructor(_0x2ee665,_0x335029,_0x33e095){const _0x1e7673=_0x4b6f5f;this[_0x1e7673(0x1f8)]=_0x2ee665,this[_0x1e7673(0x224)]=_0x335029,this[_0x1e7673(0x1f9)]=_0x33e095;}async[_0x4b6f5f(0x1f6)](_0x4927ee){const _0x5d2234=_0x4b6f5f;var _0x1ad7c3,_0x3b75c5;const {parentId:_0x4218af,unitId:_0x5bf92f,text:_0x2258c0,threadId:_0x157741}=_0x4927ee,_0x4576b9=(_0x3b75c5=(_0x1ad7c3=_0x2258c0['customRanges'])==null?void 0x0:_0x1ad7c3[_0x5d2234(0x243)](_0x468f8d=>_0x468f8d[_0x5d2234(0x22e)]===_0x14156a['CustomRangeType'][_0x5d2234(0x222)])[_0x5d2234(0x23d)](_0x35ffa2=>_0x35ffa2[_0x5d2234(0x1f5)]))!=null?_0x3b75c5:[],_0x533b8a=JSON[_0x5d2234(0x255)](_0x2258c0),_0x29b3a8=(await this[_0x5d2234(0x1f9)]['requireSession'](_0x5bf92f))[_0x5d2234(0x213)]();if(_0x4218af){const _0x4c2fe6={'memberId':_0x29b3a8,'unitId':_0x5bf92f,'content':_0x533b8a,'mention':_0x4576b9,'threadId':_0x157741},_0xbe3567=(await this['_httpService']['post'](_0x5d2234(0x259)+_0x5bf92f+_0x5d2234(0x212),{'body':_0x4c2fe6}))[_0x5d2234(0x1fa)][_0x5d2234(0x238)];return{..._0x4927ee,'id':_0xbe3567[_0x5d2234(0x245)],'dT':_0x14156a['dayjs'](+_0xbe3567[_0x5d2234(0x22b)])[_0x5d2234(0x1e3)](_0x5d2234(0x235)),'personId':_0xbe3567[_0x5d2234(0x20f)]};}else{const _0x4bc083={'memberId':_0x29b3a8,'unitId':_0x5bf92f,'content':_0x533b8a,'mention':_0x4576b9},_0x2b7413=await this[_0x5d2234(0x1f8)][_0x5d2234(0x1df)](_0x5d2234(0x259)+_0x5bf92f+_0x5d2234(0x20b),{'body':_0x4bc083});return _0x260188(_0x2b7413[_0x5d2234(0x1fa)]['comment'],_0x4927ee);}}async[_0x4b6f5f(0x1d9)](_0x3c870c){const _0x26c01a=_0x4b6f5f;var _0x39ef5b,_0x2c7560;const {text:_0x3459c5,unitId:_0x1c8cb7}=_0x3c870c,_0x191e2d=(_0x2c7560=(_0x39ef5b=_0x3459c5[_0x26c01a(0x240)])==null?void 0x0:_0x39ef5b[_0x26c01a(0x243)](_0x5bc0f7=>_0x5bc0f7[_0x26c01a(0x22e)]===_0x14156a['CustomRangeType'][_0x26c01a(0x222)])[_0x26c01a(0x23d)](_0x130b0e=>_0x130b0e[_0x26c01a(0x1f5)]))!=null?_0x2c7560:[],_0x446b8b=JSON[_0x26c01a(0x255)](_0x3459c5),_0x18af25=_0x3c870c[_0x26c01a(0x1e9)],_0x3b2089=_0x3c870c['id'],_0x29a2c0={'memberId':(await this[_0x26c01a(0x1f9)][_0x26c01a(0x24d)](_0x1c8cb7))[_0x26c01a(0x213)](),'unitId':_0x1c8cb7,'threadId':_0x18af25,'mention':_0x191e2d,'content':_0x446b8b,'replyId':_0x3b2089},_0x220bbd=await this[_0x26c01a(0x1f8)]['post']('/universer-api/comment/unit/'+_0x1c8cb7+_0x26c01a(0x254),{'body':_0x29a2c0});return!_0x220bbd['body']['error']||_0x220bbd[_0x26c01a(0x1fa)]['error'][_0x26c01a(0x1dc)]===0x1;}async[_0x4b6f5f(0x204)](_0x511599){const _0x27d994=_0x4b6f5f,{unitId:_0x159ef2}=_0x511599,_0x385fde=_0x511599['threadId'],_0x10edcb={'memberId':this[_0x27d994(0x224)][_0x27d994(0x1d7)]()[_0x27d994(0x1eb)],'unitId':_0x159ef2,'threadId':_0x385fde,'solved':_0x511599[_0x27d994(0x24c)]?_0x2db4ab[_0x27d994(0x22f)]:_0x2db4ab[_0x27d994(0x1d2)]},_0x572a79=await this[_0x27d994(0x1f8)][_0x27d994(0x1df)](_0x27d994(0x259)+_0x159ef2+_0x27d994(0x209),{'body':_0x10edcb});return!_0x572a79['body'][_0x27d994(0x1db)]||_0x572a79[_0x27d994(0x1fa)]['error'][_0x27d994(0x1dc)]===0x1;}async['deleteComment'](_0x2dd25c,_0x57c1ea,_0x3bc636,_0x4883f4){const _0x5ca719=_0x4b6f5f,_0x1c3525={'memberId':(await this[_0x5ca719(0x1f9)]['requireSession'](_0x2dd25c))[_0x5ca719(0x213)](),'threadId':_0x3bc636,'replyId':_0x4883f4,'unitId':_0x2dd25c},_0x2cf57c=await this[_0x5ca719(0x1f8)]['post'](_0x5ca719(0x259)+_0x2dd25c+_0x5ca719(0x217),{'body':_0x1c3525});return!_0x2cf57c[_0x5ca719(0x1fa)]['error']||_0x2cf57c[_0x5ca719(0x1fa)][_0x5ca719(0x1db)][_0x5ca719(0x1dc)]===0x1;}async[_0x4b6f5f(0x21d)](_0x44ad56,_0x1728fc,_0x5a2d4f){const _0x200795=_0x4b6f5f,_0x37ec49={'unitId':_0x44ad56,'threadId':_0x5a2d4f},_0x91ef69=await this[_0x200795(0x1f8)]['post'](_0x200795(0x259)+_0x44ad56+'/list',{'body':_0x37ec49}),_0x2f7a94=_0x5a2d4f[_0x200795(0x23d)](_0x6331d1=>_0x57f91c(_0x91ef69['body'][_0x200795(0x21a)][_0x6331d1],_0x44ad56,_0x1728fc))['filter'](Boolean);return Object[_0x200795(0x1f1)](_0x91ef69[_0x200795(0x1fa)]['users'])['forEach'](_0x18e258=>{const _0x3ca2bf=_0x200795;this['_userService'][_0x3ca2bf(0x1d8)](_0x18e258);}),_0x2f7a94;}[_0x4b6f5f(0x1e1)](_0x59ed07){const _0x31be26=_0x4b6f5f;return{'id':_0x59ed07['id'],'threadId':_0x59ed07['threadId'],'ref':_0x59ed07[_0x31be26(0x1ed)]};}};_0x2da3ad=_0x17b74c([_0xc9af10(0x0,_0x14156a[_0x4b6f5f(0x1f7)](_0x12195e[_0x4b6f5f(0x1e6)])),_0xc9af10(0x1,_0x14156a[_0x4b6f5f(0x1f7)](_0x14156a['UserManagerService'])),_0xc9af10(0x2,_0x14156a[_0x4b6f5f(0x1f7)](_0x3be277[_0x4b6f5f(0x228)]))],_0x2da3ad);var _0x366615=Object[_0x4b6f5f(0x242)],_0x3f6d9f=(_0x52c399,_0x4b7bb8,_0x489cd7,_0x2e5a9a)=>{for(var _0x1e4cd4=_0x2e5a9a>0x1?void 0x0:_0x2e5a9a?_0x366615(_0x4b7bb8,_0x489cd7):_0x4b7bb8,_0x31c724=_0x52c399['length']-0x1,_0x435f7c;_0x31c724>=0x0;_0x31c724--)(_0x435f7c=_0x52c399[_0x31c724])&&(_0x1e4cd4=_0x435f7c(_0x1e4cd4)||_0x1e4cd4);return _0x1e4cd4;},_0x85678b=(_0x56f50d,_0x22ddbd)=>(_0x1be7dc,_0x134079)=>_0x22ddbd(_0x1be7dc,_0x134079,_0x56f50d);let _0x725820=class extends _0x14156a[_0x4b6f5f(0x24b)]{constructor(_0x302250,_0x42d43b){const _0x444bc2=_0x4b6f5f;super(),this[_0x444bc2(0x225)]=_0x302250,this['_threadCommentDataSource']=_0x42d43b,this[_0x444bc2(0x1d4)]();}[_0x4b6f5f(0x1d4)](){const _0x36fe00=_0x4b6f5f;this[_0x36fe00(0x225)][_0x36fe00(0x1d5)]=this[_0x36fe00(0x249)],this[_0x36fe00(0x225)][_0x36fe00(0x1e8)]=!0x1;}};_0x725820=_0x3f6d9f([_0x85678b(0x0,_0x9217ca[_0x4b6f5f(0x21e)]),_0x85678b(0x1,_0x14156a['Inject'](_0x2da3ad))],_0x725820);var _0x2c6919=Object[_0x4b6f5f(0x205)],_0x3416b5=Object[_0x4b6f5f(0x242)],_0x32a1cf=(_0x56f42b,_0x43351f,_0x462b64)=>_0x43351f in _0x56f42b?_0x2c6919(_0x56f42b,_0x43351f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x462b64}):_0x56f42b[_0x43351f]=_0x462b64,_0x2b3e92=(_0x1901b6,_0x1ac601,_0x46cf7b,_0x5ba83c)=>{const _0x236317=_0x4b6f5f;for(var _0x5c6cc0=_0x5ba83c>0x1?void 0x0:_0x5ba83c?_0x3416b5(_0x1ac601,_0x46cf7b):_0x1ac601,_0x2baf7a=_0x1901b6[_0x236317(0x22a)]-0x1,_0x52528a;_0x2baf7a>=0x0;_0x2baf7a--)(_0x52528a=_0x1901b6[_0x2baf7a])&&(_0x5c6cc0=_0x52528a(_0x5c6cc0)||_0x5c6cc0);return _0x5c6cc0;},_0x792674=(_0x9f4900,_0x3364a7)=>(_0x3abde8,_0x2ab6db)=>_0x3364a7(_0x3abde8,_0x2ab6db,_0x9f4900),_0x462b26=(_0x3ebc91,_0x3a6653,_0x35e3f3)=>_0x32a1cf(_0x3ebc91,typeof _0x3a6653!=_0x4b6f5f(0x1fb)?_0x3a6653+'':_0x3a6653,_0x35e3f3);_0xd744f6[_0x4b6f5f(0x201)]=class extends _0x14156a['Plugin']{constructor(_0x256328=_0x1b2a9c,_0x389811,_0x4cdacb){const _0x4bedd8=_0x4b6f5f;super(),this[_0x4bedd8(0x1dd)]=_0x256328,this[_0x4bedd8(0x230)]=_0x389811,this[_0x4bedd8(0x23a)]=_0x4cdacb;const {..._0x47d0ed}=_0x14156a['merge']({},_0x1b2a9c,this[_0x4bedd8(0x1dd)]);this[_0x4bedd8(0x23a)][_0x4bedd8(0x246)](_0x3dd47d,_0x47d0ed);}[_0x4b6f5f(0x247)](){const _0x696018=_0x4b6f5f;[[_0x2da3ad],[_0x725820],[_0x16746b]][_0x696018(0x208)](_0x265974=>{const _0x270c26=_0x696018;this[_0x270c26(0x230)][_0x270c26(0x22d)](_0x265974);});}[_0x4b6f5f(0x1fc)](){const _0x22e107=_0x4b6f5f;this['_injector']['get'](_0x725820),this['_injector'][_0x22e107(0x1da)](_0x16746b);}},_0x462b26(_0xd744f6[_0x4b6f5f(0x201)],_0x4b6f5f(0x211),_0x2e5626),_0x462b26(_0xd744f6['UniverThreadCommentDataSourcePlugin'],_0x4b6f5f(0x23f),_0x14156a['UniverInstanceType'][_0x4b6f5f(0x1ee)]),_0xd744f6[_0x4b6f5f(0x201)]=_0x2b3e92([_0x14156a[_0x4b6f5f(0x1fd)](_0x28798b[_0x4b6f5f(0x23c)],_0x3be277[_0x4b6f5f(0x20c)],_0x24e1bb['UniverLicensePlugin']),_0x792674(0x1,_0x14156a[_0x4b6f5f(0x1f7)](_0x14156a['Injector'])),_0x792674(0x2,_0x14156a[_0x4b6f5f(0x1ff)])],_0xd744f6[_0x4b6f5f(0x201)]),Object['defineProperty'](_0xd744f6,Symbol[_0x4b6f5f(0x227)],{'value':_0x4b6f5f(0x1de)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2-experimental.20251201-5b27b55",
|
|
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/
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.12.2-experimental.20251201-5b27b55",
|
|
49
|
+
"@univerjs-pro/license": "0.12.2-experimental.20251201-5b27b55",
|
|
50
|
+
"@univerjs/core": "0.12.2-experimental.20251201-5b27b55",
|
|
51
|
+
"@univerjs/network": "0.12.2-experimental.20251201-5b27b55",
|
|
52
|
+
"@univerjs/thread-comment": "0.12.2-experimental.20251201-5b27b55",
|
|
51
53
|
"@univerjs/protocol": "0.1.47",
|
|
52
|
-
"@univerjs/thread-comment": "0.12.
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.12.1",
|
|
54
|
-
"@univerjs-pro/collaboration-client": "0.12.1"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.12.2-experimental.20251201-5b27b55"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.2.
|
|
60
|
-
"vitest": "^
|
|
61
|
-
"@univerjs-infra/shared": "0.12.
|
|
59
|
+
"vite": "^7.2.4",
|
|
60
|
+
"vitest": "^4.0.14",
|
|
61
|
+
"@univerjs-infra/shared": "0.12.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|