@univerjs-pro/thread-comment-datasource 0.2.10 → 0.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function _0x5904(){const _0x198e6c=['name','defineProperty','@univerjs/network','threadId','solved','searchParams','forEach','UNRECOGNIZED','Inject','filter','CustomRangeType','_threadCommentDataSource','CollaborationSessionService','host','@univerjs/core','getMemberID','rxjs','parse','customRanges','2337376uYJUsP','@univerjs/thread-comment','body','map','/universer-api/authz/collaborator','https','payload','syncUpdateMutationToColla','_threadCommentModel','slice','https:','resolved','/add','UNIVER_UNKNOWN','_threadCommentDataSourceService','LifecycleStages','replies','subscribe','unitId','Unknown','post','subject','_initDataSource','Ready','dayjs','location','UniverCollaborationClientPlugin','getUser','add','@univerjs/thread-comment-ui','ThreadCommentModel','IThreadCommentDataSourceService','userId','getComment','toStringTag','COMMENT','listComments','_commentService','2681uEMLUs','comments','rangeId','52228EMOgjB','190dQULxo','://','length','deleteComment','_threadCommentMentionDataSource','Solved','content','9bkvHLc','6912CQSpGB','UserManagerService','1926UiNuCm','UniverThreadCommentDataSourcePlugin','5iAmIAz','collaborators','comment','YYYY/MM/DD\x20HH:mm','_initUserSync','requireSession','/reply','rangeType','Disposable','Add','257496XkEvJc','Plugin','Module','UniverInstanceType','get','Solve','users','protocol','OpenOrReOpen','/delete','_injector','delete','UniverThreadCommentPlugin','_userService','userID','OnLifecycle','getOwnPropertyDescriptor','createTimestamp','UniverThreadCommentUIPlugin','369242JJxSIr','disposeWithMe','444504yuqPXr','_threadCommentMentionDataService','_init','code','@univerjs-pro/collaboration-client','type','size','_sessionService','getThread','_httpService','Reply','Injector','/universer-api/comment/unit/','onStarting','error','user','href','addUser','Edit','getMentions','stringify','unit','updateComment','dataSource','format','commentUpdate$','Starting','saveCommentToSnapshot','addComment','replyId','Delete','THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolveComment','/list','getCurrentUser','/edit','HTTPService','reply'];_0x5904=function(){return _0x198e6c;};return _0x5904();}function _0x5554(_0x32f276,_0xc2d6fd){const _0x590415=_0x5904();return _0x5554=function(_0x555472,_0x369520){_0x555472=_0x555472-0x108;let _0x47dcb7=_0x590415[_0x555472];return _0x47dcb7;},_0x5554(_0x32f276,_0xc2d6fd);}const _0x1a4ae5=_0x5554;(function(_0x50e187,_0x5e4b30){const _0x4a75ec=_0x5554,_0x5f2498=_0x50e187();while(!![]){try{const _0x40462b=-parseInt(_0x4a75ec(0x109))/0x1+parseInt(_0x4a75ec(0x12a))/0x2+-parseInt(_0x4a75ec(0x12c))/0x3+parseInt(_0x4a75ec(0x117))/0x4*(parseInt(_0x4a75ec(0x10d))/0x5)+-parseInt(_0x4a75ec(0x10b))/0x6*(parseInt(_0x4a75ec(0x18b))/0x7)+-parseInt(_0x4a75ec(0x165))/0x8*(-parseInt(_0x4a75ec(0x108))/0x9)+-parseInt(_0x4a75ec(0x18f))/0xa*(parseInt(_0x4a75ec(0x18e))/0xb);if(_0x40462b===_0x5e4b30)break;else _0x5f2498['push'](_0x5f2498['shift']());}catch(_0x1a58d3){_0x5f2498['push'](_0x5f2498['shift']());}}}(_0x5904,0x2a384));Object[_0x1a4ae5(0x153)](exports,Symbol[_0x1a4ae5(0x187)],{'value':_0x1a4ae5(0x119)});const a=require(_0x1a4ae5(0x160)),g=require(_0x1a4ae5(0x166)),T=require(_0x1a4ae5(0x182)),y=require(_0x1a4ae5(0x130)),O=require(_0x1a4ae5(0x154)),$=require(_0x1a4ae5(0x17d)),R=require(_0x1a4ae5(0x162)),q=_0x1a4ae5(0x14b);var p=(_0x2627a2=>(_0x2627a2[_0x2627a2[_0x1a4ae5(0x11f)]=0x0]=_0x1a4ae5(0x11f),_0x2627a2[_0x2627a2[_0x1a4ae5(0x194)]=0x1]=_0x1a4ae5(0x194),_0x2627a2[_0x2627a2[_0x1a4ae5(0x159)]=-0x1]=_0x1a4ae5(0x159),_0x2627a2))(p||{}),v=(_0x3d23ef=>(_0x3d23ef[_0x3d23ef[_0x1a4ae5(0x178)]=0x0]=_0x1a4ae5(0x178),_0x3d23ef[_0x3d23ef['Add']=0x1]=_0x1a4ae5(0x116),_0x3d23ef[_0x3d23ef[_0x1a4ae5(0x136)]=0x2]='Reply',_0x3d23ef[_0x3d23ef[_0x1a4ae5(0x13e)]=0x3]=_0x1a4ae5(0x13e),_0x3d23ef[_0x3d23ef['Delete']=0x4]=_0x1a4ae5(0x14a),_0x3d23ef[_0x3d23ef['Solve']=0x5]=_0x1a4ae5(0x11c),_0x3d23ef[_0x3d23ef['UNRECOGNIZED']=-0x1]=_0x1a4ae5(0x159),_0x3d23ef))(v||{});const P=_0x33a07c=>$(new Date(+_0x33a07c))[_0x1a4ae5(0x144)](_0x1a4ae5(0x110)),E=async(_0x52d5bc,_0x4ba91c)=>{const _0x109fef=_0x1a4ae5,_0xd8c5ab=_0x52d5bc[_0x109fef(0x11b)](a[_0x109fef(0x10a)]),_0x1b4c03=_0x52d5bc[_0x109fef(0x11b)](O[_0x109fef(0x150)]);_0x4ba91c['forEach'](_0x195ef1=>{const _0x1127ce=_0x109fef;_0xd8c5ab[_0x1127ce(0x180)](_0x195ef1)&&_0x4ba91c[_0x1127ce(0x122)](_0x195ef1);}),_0x4ba91c[_0x109fef(0x132)]&&(await _0x1b4c03['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x4ba91c]}}))[_0x109fef(0x167)]['users']['forEach'](_0x28a138=>{_0x28a138&&_0xd8c5ab['addUser'](_0x28a138);});};var x=Object['defineProperty'],H=Object[_0x1a4ae5(0x127)],Y=(_0x3edaa8,_0x389403,_0x33be58,_0x4b9caf)=>{for(var _0x40d5a3=_0x4b9caf>0x1?void 0x0:_0x4b9caf?H(_0x389403,_0x33be58):_0x389403,_0x1cd300=_0x3edaa8['length']-0x1,_0x29e011;_0x1cd300>=0x0;_0x1cd300--)(_0x29e011=_0x3edaa8[_0x1cd300])&&(_0x40d5a3=(_0x4b9caf?_0x29e011(_0x389403,_0x33be58,_0x40d5a3):_0x29e011(_0x40d5a3))||_0x40d5a3);return _0x4b9caf&&_0x40d5a3&&x(_0x389403,_0x33be58,_0x40d5a3),_0x40d5a3;},I=(_0x567ae3,_0x3e84c1)=>(_0x233cfa,_0x45fcb6)=>_0x3e84c1(_0x233cfa,_0x45fcb6,_0x567ae3);function A(_0x58a508,_0x37c49c){const _0x41022a=_0x1a4ae5,_0x496354=_0x58a508['replies'][0x0];return{..._0x37c49c,'id':_0x496354[_0x41022a(0x149)],'resolved':_0x58a508[_0x41022a(0x156)]===0x1,'dT':P(_0x496354[_0x41022a(0x128)]),'personId':_0x496354[_0x41022a(0x185)],'threadId':_0x496354[_0x41022a(0x155)]};}function L(_0x161dd7,_0x5a9d19,_0xe11461){const _0x248b40=_0x1a4ae5;var _0x494cd7,_0x343262;if(((_0x343262=(_0x494cd7=_0x161dd7==null?void 0x0:_0x161dd7[_0x248b40(0x175)])==null?void 0x0:_0x494cd7['length'])!=null?_0x343262:0x0)>0x0){const _0x366790=(_0x5599a8,_0x450656)=>({'id':_0x5599a8[_0x248b40(0x149)],'threadId':_0x5599a8[_0x248b40(0x155)],'dT':P(_0x5599a8['createTimestamp']),'personId':_0x5599a8[_0x248b40(0x185)],'resolved':_0x161dd7['solved']===p['Solved'],'unitId':_0x5a9d19,'subUnitId':_0xe11461,'text':JSON['parse'](_0x5599a8[_0x248b40(0x195)]),'parentId':_0x450656}),_0x56f180=_0x366790(_0x161dd7[_0x248b40(0x175)][0x0]);return{..._0x56f180,'children':_0x161dd7[_0x248b40(0x175)][_0x248b40(0x16e)](0x1)[_0x248b40(0x168)](_0x514319=>_0x366790(_0x514319,_0x56f180['id']))};}return null;}let D=class{constructor(_0x56bd70,_0x5d1e1c,_0x542623,_0x5245e1){const _0x33ce3c=_0x1a4ae5;this[_0x33ce3c(0x135)]=_0x56bd70,this[_0x33ce3c(0x124)]=_0x5d1e1c,this[_0x33ce3c(0x133)]=_0x542623,this[_0x33ce3c(0x121)]=_0x5245e1;}async[_0x1a4ae5(0x148)](_0x344c4b){const _0x4a6950=_0x1a4ae5;var _0x43d43f,_0x16e183;const {parentId:_0x3b8df3,unitId:_0x25ff1d,text:_0x48f2db,threadId:_0x3889a5}=_0x344c4b,_0x4d13e5=(_0x16e183=(_0x43d43f=_0x48f2db[_0x4a6950(0x164)])==null?void 0x0:_0x43d43f[_0x4a6950(0x15b)](_0x4988ef=>_0x4988ef[_0x4a6950(0x114)]===a[_0x4a6950(0x15c)][_0x4a6950(0x188)])['map'](_0x440cc1=>_0x440cc1['rangeId']))!=null?_0x16e183:[],_0x40145e=JSON[_0x4a6950(0x140)](_0x48f2db),_0x5d4a73=(await this[_0x4a6950(0x133)][_0x4a6950(0x112)](_0x25ff1d))[_0x4a6950(0x161)]();if(_0x3b8df3){const _0x4c5ee6={'memberId':_0x5d4a73,'unitId':_0x25ff1d,'content':_0x40145e,'mention':_0x4d13e5,'threadId':_0x3889a5},_0x2cc501=(await this[_0x4a6950(0x135)][_0x4a6950(0x179)](_0x4a6950(0x138)+_0x25ff1d+_0x4a6950(0x113),{'body':_0x4c5ee6}))[_0x4a6950(0x167)][_0x4a6950(0x151)];return{..._0x344c4b,'id':_0x2cc501[_0x4a6950(0x149)],'dT':$(+_0x2cc501['createTimestamp'])[_0x4a6950(0x144)](_0x4a6950(0x110)),'personId':_0x2cc501['userId']};}else{const _0x100c63={'memberId':_0x5d4a73,'unitId':_0x25ff1d,'content':_0x40145e,'mention':_0x4d13e5},_0x3a7e90=await this[_0x4a6950(0x135)][_0x4a6950(0x179)](_0x4a6950(0x138)+_0x25ff1d+_0x4a6950(0x171),{'body':_0x100c63});return A(_0x3a7e90['body'][_0x4a6950(0x10f)],_0x344c4b);}}async[_0x1a4ae5(0x142)](_0x4f6a13){const _0x33b790=_0x1a4ae5;var _0x466ccb,_0x5ae477;const {text:_0x487fbb,unitId:_0x5d0d47}=_0x4f6a13,_0x2533a1=(_0x5ae477=(_0x466ccb=_0x487fbb[_0x33b790(0x164)])==null?void 0x0:_0x466ccb[_0x33b790(0x15b)](_0x3cd54a=>_0x3cd54a[_0x33b790(0x114)]===a[_0x33b790(0x15c)][_0x33b790(0x188)])[_0x33b790(0x168)](_0x30868a=>_0x30868a[_0x33b790(0x18d)]))!=null?_0x5ae477:[],_0x1aff6b=JSON[_0x33b790(0x140)](_0x487fbb),_0x317f4d=_0x4f6a13['threadId'],_0x4f268c=_0x4f6a13['id'],_0x4eb05f={'memberId':(await this[_0x33b790(0x133)]['requireSession'](_0x5d0d47))['getMemberID'](),'unitId':_0x5d0d47,'threadId':_0x317f4d,'mention':_0x2533a1,'content':_0x1aff6b,'replyId':_0x4f268c},_0x359c9e=await this[_0x33b790(0x135)][_0x33b790(0x179)](_0x33b790(0x138)+_0x5d0d47+_0x33b790(0x14f),{'body':_0x4eb05f});return!_0x359c9e[_0x33b790(0x167)][_0x33b790(0x13a)]||_0x359c9e[_0x33b790(0x167)][_0x33b790(0x13a)]['code']===0x1;}async['resolveComment'](_0xad371c){const _0x1906bb=_0x1a4ae5,{unitId:_0x2d4578}=_0xad371c,_0x27f9e9=_0xad371c['threadId'],_0x51fb4d={'memberId':this[_0x1906bb(0x124)][_0x1906bb(0x14e)]()[_0x1906bb(0x125)],'unitId':_0x2d4578,'threadId':_0x27f9e9,'solved':_0xad371c[_0x1906bb(0x170)]?p['Solved']:p[_0x1906bb(0x11f)]},_0x141d7b=await this[_0x1906bb(0x135)][_0x1906bb(0x179)](_0x1906bb(0x138)+_0x2d4578+'/solved',{'body':_0x51fb4d});return!_0x141d7b[_0x1906bb(0x167)][_0x1906bb(0x13a)]||_0x141d7b['body'][_0x1906bb(0x13a)][_0x1906bb(0x12f)]===0x1;}async[_0x1a4ae5(0x192)](_0x381f86,_0x34591c,_0x31213f,_0x3ccf0c){const _0xf466f2=_0x1a4ae5,_0x350163={'memberId':(await this[_0xf466f2(0x133)]['requireSession'](_0x381f86))['getMemberID'](),'threadId':_0x31213f,'replyId':_0x3ccf0c,'unitId':_0x381f86},_0xe10299=await this[_0xf466f2(0x135)][_0xf466f2(0x179)]('/universer-api/comment/unit/'+_0x381f86+_0xf466f2(0x120),{'body':_0x350163});return!_0xe10299[_0xf466f2(0x167)][_0xf466f2(0x13a)]||_0xe10299[_0xf466f2(0x167)][_0xf466f2(0x13a)][_0xf466f2(0x12f)]===0x1;}async[_0x1a4ae5(0x189)](_0x47bdd8,_0x26c1be,_0x16b270){const _0x558b09=_0x1a4ae5,_0x33ee64={'unitId':_0x47bdd8,'threadId':_0x16b270},_0xa371e2=await this[_0x558b09(0x135)][_0x558b09(0x179)](_0x558b09(0x138)+_0x47bdd8+_0x558b09(0x14d),{'body':_0x33ee64}),_0x2dc9fd=_0x16b270['map'](_0x188364=>L(_0xa371e2['body'][_0x558b09(0x18c)][_0x188364],_0x47bdd8,_0x26c1be))['filter'](Boolean);return Object['values'](_0xa371e2[_0x558b09(0x167)][_0x558b09(0x11d)])[_0x558b09(0x158)](_0x376c66=>{const _0x461d11=_0x558b09;this[_0x461d11(0x124)][_0x461d11(0x13d)](_0x376c66);}),_0x2dc9fd;}[_0x1a4ae5(0x147)](_0x40c7d9){const _0x1897bf=_0x1a4ae5;return{'id':_0x40c7d9['id'],'threadId':_0x40c7d9[_0x1897bf(0x155)],'ref':_0x40c7d9['ref']};}};D=Y([I(0x0,a[_0x1a4ae5(0x15a)](O['HTTPService'])),I(0x1,a['Inject'](a['UserManagerService'])),I(0x2,a[_0x1a4ae5(0x15a)](y[_0x1a4ae5(0x15e)])),I(0x3,a[_0x1a4ae5(0x15a)](a[_0x1a4ae5(0x137)]))],D);var G=Object[_0x1a4ae5(0x153)],J=Object[_0x1a4ae5(0x127)],Z=(_0x214914,_0x4ee77b,_0x5cd99f,_0x36b468)=>{const _0xb9261d=_0x1a4ae5;for(var _0x109a93=_0x36b468>0x1?void 0x0:_0x36b468?J(_0x4ee77b,_0x5cd99f):_0x4ee77b,_0x209371=_0x214914[_0xb9261d(0x191)]-0x1,_0xc6b550;_0x209371>=0x0;_0x209371--)(_0xc6b550=_0x214914[_0x209371])&&(_0x109a93=(_0x36b468?_0xc6b550(_0x4ee77b,_0x5cd99f,_0x109a93):_0xc6b550(_0x109a93))||_0x109a93);return _0x36b468&&_0x109a93&&G(_0x4ee77b,_0x5cd99f,_0x109a93),_0x109a93;},F=(_0x4d4aa9,_0xb167da)=>(_0x4f0930,_0x454a0a)=>_0xb167da(_0x4f0930,_0x454a0a,_0x4d4aa9);let C=class{constructor(_0x1dd8a){const _0xec3da6=_0x1a4ae5;this[_0xec3da6(0x135)]=_0x1dd8a;}async[_0x1a4ae5(0x13f)](_0x29eda8,_0x2d7d23,_0x2fffd0){const _0x5259aa=_0x1a4ae5,_0x1bccfc=new URL(window[_0x5259aa(0x17e)][_0x5259aa(0x13c)])[_0x5259aa(0x157)]['get'](_0x5259aa(0x141));if(!_0x1bccfc)return[];const _0x319d89=window[_0x5259aa(0x17e)][_0x5259aa(0x15f)],_0x1e6171=window[_0x5259aa(0x17e)][_0x5259aa(0x11e)]===_0x5259aa(0x16f)?_0x5259aa(0x16a):'http';return(await this[_0x5259aa(0x135)][_0x5259aa(0x11b)](_0x1e6171+_0x5259aa(0x190)+_0x319d89+_0x5259aa(0x169),{'params':{'objectID':_0x1bccfc,'unitID':_0x1bccfc}}))[_0x5259aa(0x167)][_0x5259aa(0x10e)][_0x5259aa(0x168)](_0x3edf65=>{const _0x23ffb7=_0x5259aa;var _0x262fce,_0x1ac879,_0x812903,_0x4f42c5,_0x1248f9,_0x199343;return{'id':(_0x1ac879=(_0x262fce=_0x3edf65['subject'])==null?void 0x0:_0x262fce[_0x23ffb7(0x125)])!=null?_0x1ac879:'','label':(_0x4f42c5=(_0x812903=_0x3edf65[_0x23ffb7(0x17a)])==null?void 0x0:_0x812903[_0x23ffb7(0x152)])!=null?_0x4f42c5:'','icon':(_0x199343=(_0x1248f9=_0x3edf65[_0x23ffb7(0x17a)])==null?void 0x0:_0x1248f9['avatar'])!=null?_0x199343:'','type':_0x23ffb7(0x13b)};});}};C=Z([F(0x0,a[_0x1a4ae5(0x15a)](O[_0x1a4ae5(0x150)]))],C);var W=Object[_0x1a4ae5(0x153)],z=Object[_0x1a4ae5(0x127)],B=(_0x2e3cbd,_0xd1a3ac,_0x37fb22,_0x520e94)=>{const _0x2b4341=_0x1a4ae5;for(var _0x36bedf=_0x520e94>0x1?void 0x0:_0x520e94?z(_0xd1a3ac,_0x37fb22):_0xd1a3ac,_0x376ebb=_0x2e3cbd[_0x2b4341(0x191)]-0x1,_0x138b06;_0x376ebb>=0x0;_0x376ebb--)(_0x138b06=_0x2e3cbd[_0x376ebb])&&(_0x36bedf=(_0x520e94?_0x138b06(_0xd1a3ac,_0x37fb22,_0x36bedf):_0x138b06(_0x36bedf))||_0x36bedf);return _0x520e94&&_0x36bedf&&W(_0xd1a3ac,_0x37fb22,_0x36bedf),_0x36bedf;},S=(_0x128071,_0x169d2f)=>(_0x8aff81,_0x29828c)=>_0x169d2f(_0x8aff81,_0x29828c,_0x128071);let b=class extends a[_0x1a4ae5(0x115)]{constructor(_0xc64409,_0x4ab59e,_0x5103bc,_0x32de27){const _0x22d362=_0x1a4ae5;super(),this[_0x22d362(0x173)]=_0xc64409,this[_0x22d362(0x15d)]=_0x4ab59e,this['_threadCommentMentionDataService']=_0x5103bc,this[_0x22d362(0x193)]=_0x32de27,this[_0x22d362(0x17b)]();}[_0x1a4ae5(0x17b)](){const _0x2434e6=_0x1a4ae5;this['_threadCommentDataSourceService']['dataSource']=this[_0x2434e6(0x15d)],this[_0x2434e6(0x173)][_0x2434e6(0x16c)]=!0x1,this[_0x2434e6(0x12d)][_0x2434e6(0x143)]=this[_0x2434e6(0x193)];}};b=B([a[_0x1a4ae5(0x126)](a[_0x1a4ae5(0x174)][_0x1a4ae5(0x146)],b),S(0x0,g[_0x1a4ae5(0x184)]),S(0x1,a[_0x1a4ae5(0x15a)](D)),S(0x2,T['IThreadCommentMentionDataService']),S(0x3,a['Inject'](C))],b);var K=Object[_0x1a4ae5(0x153)],V=Object['getOwnPropertyDescriptor'],Q=(_0x2584b8,_0x4c80ba,_0x7808f4,_0x430868)=>{const _0xafbb7e=_0x1a4ae5;for(var _0x12de42=_0x430868>0x1?void 0x0:_0x430868?V(_0x4c80ba,_0x7808f4):_0x4c80ba,_0x154118=_0x2584b8[_0xafbb7e(0x191)]-0x1,_0x41d7f2;_0x154118>=0x0;_0x154118--)(_0x41d7f2=_0x2584b8[_0x154118])&&(_0x12de42=(_0x430868?_0x41d7f2(_0x4c80ba,_0x7808f4,_0x12de42):_0x41d7f2(_0x12de42))||_0x12de42);return _0x430868&&_0x12de42&&K(_0x4c80ba,_0x7808f4,_0x12de42),_0x12de42;},_=(_0x5b3d0a,_0x522e78)=>(_0x264fc8,_0x5ae0e1)=>_0x522e78(_0x264fc8,_0x5ae0e1,_0x5b3d0a);let f=class extends a['Disposable']{constructor(_0x3dc206,_0x550ff2,_0x5b78bc,_0x1a2b3e){const _0x19e8d1=_0x1a4ae5;super(),this[_0x19e8d1(0x18a)]=_0x3dc206,this[_0x19e8d1(0x16d)]=_0x550ff2,this[_0x19e8d1(0x124)]=_0x5b78bc,this[_0x19e8d1(0x121)]=_0x1a2b3e,this[_0x19e8d1(0x12e)](),this[_0x19e8d1(0x111)]();}[_0x1a4ae5(0x111)](){const _0x539261=_0x1a4ae5;this[_0x539261(0x12b)](this['_threadCommentModel'][_0x539261(0x145)]['pipe'](R['bufferTime'](0x10))[_0x539261(0x176)](_0x395eff=>{const _0x56b4ec=_0x539261,_0x27e881=new Set();_0x395eff[_0x56b4ec(0x158)](_0x4bc47b=>{const _0x2f8a29=_0x56b4ec;switch(_0x4bc47b[_0x2f8a29(0x131)]){case'add':{const _0x2f5c4d=_0x4bc47b[_0x2f8a29(0x16b)]['personId'];_0x27e881[_0x2f8a29(0x181)](_0x2f5c4d);break;}}}),E(this[_0x56b4ec(0x121)],_0x27e881);}));}[_0x1a4ae5(0x12e)](){const _0x3b4dae=_0x1a4ae5;this[_0x3b4dae(0x12b)](this[_0x3b4dae(0x18a)]['commentUpdate$'][_0x3b4dae(0x176)](async _0x2311fc=>{const _0x22b28a=_0x3b4dae;var _0x261f04,_0x56d681;const _0x57fe42=this[_0x22b28a(0x16d)][_0x22b28a(0x134)](_0x2311fc[_0x22b28a(0x177)],_0x2311fc['threadId']);if(!_0x57fe42)return;const {unitId:_0x36e476,subUnitId:_0x469aba}=_0x57fe42;switch(_0x2311fc[_0x22b28a(0x13b)]&&this['_userService'][_0x22b28a(0x13d)](_0x2311fc[_0x22b28a(0x13b)]),_0x2311fc[_0x22b28a(0x131)]){case v[_0x22b28a(0x116)]:break;case v['Reply']:{this[_0x22b28a(0x16d)][_0x22b28a(0x148)](_0x36e476,_0x469aba,{'unitId':_0x36e476,'subUnitId':_0x469aba,'ref':'','id':_0x2311fc[_0x22b28a(0x149)],'dT':P(+_0x2311fc[_0x22b28a(0x128)]),'threadId':_0x2311fc[_0x22b28a(0x155)],'personId':(_0x56d681=(_0x261f04=_0x2311fc['user'])==null?void 0x0:_0x261f04[_0x22b28a(0x125)])!=null?_0x56d681:_0x2311fc[_0x22b28a(0x185)],'text':JSON['parse'](_0x2311fc['content']),'parentId':_0x57fe42['id']});break;}case v[_0x22b28a(0x14a)]:{const _0x4bc52f=this[_0x22b28a(0x16d)][_0x22b28a(0x186)](_0x36e476,_0x469aba,_0x2311fc[_0x22b28a(0x149)]);_0x4bc52f&&_0x4bc52f['parentId']&&this[_0x22b28a(0x16d)]['deleteComment'](_0x36e476,_0x469aba,_0x2311fc[_0x22b28a(0x149)]);break;}case v[_0x22b28a(0x13e)]:{this['_threadCommentModel'][_0x22b28a(0x142)](_0x36e476,_0x469aba,{'commentId':_0x2311fc[_0x22b28a(0x149)],'text':JSON[_0x22b28a(0x163)](_0x2311fc[_0x22b28a(0x195)])});break;}case v[_0x22b28a(0x11c)]:{const _0x40ca42=this[_0x22b28a(0x16d)][_0x22b28a(0x134)](_0x36e476,_0x2311fc[_0x22b28a(0x155)]);_0x40ca42&&this[_0x22b28a(0x16d)][_0x22b28a(0x14c)](_0x36e476,_0x469aba,_0x40ca42['id'],_0x2311fc[_0x22b28a(0x156)]===p[_0x22b28a(0x194)]);break;}}}));}};f=Q([a['OnLifecycle'](a[_0x1a4ae5(0x174)][_0x1a4ae5(0x17c)],f),_(0x0,a[_0x1a4ae5(0x15a)](y['CommentService'])),_(0x1,a[_0x1a4ae5(0x15a)](g[_0x1a4ae5(0x183)])),_(0x2,a[_0x1a4ae5(0x15a)](a[_0x1a4ae5(0x10a)])),_(0x3,a[_0x1a4ae5(0x15a)](a[_0x1a4ae5(0x137)]))],f);var N=Object[_0x1a4ae5(0x153)],X=Object['getOwnPropertyDescriptor'],k=(_0x3ffe67,_0x28df39,_0x15dc98)=>_0x28df39 in _0x3ffe67?N(_0x3ffe67,_0x28df39,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15dc98}):_0x3ffe67[_0x28df39]=_0x15dc98,ee=(_0x41c937,_0x152f2a,_0x59fa3b,_0x409206)=>{const _0x2fce71=_0x1a4ae5;for(var _0x38e892=_0x409206>0x1?void 0x0:_0x409206?X(_0x152f2a,_0x59fa3b):_0x152f2a,_0x41c6c4=_0x41c937[_0x2fce71(0x191)]-0x1,_0x15b1e2;_0x41c6c4>=0x0;_0x41c6c4--)(_0x15b1e2=_0x41c937[_0x41c6c4])&&(_0x38e892=(_0x409206?_0x15b1e2(_0x152f2a,_0x59fa3b,_0x38e892):_0x15b1e2(_0x38e892))||_0x38e892);return _0x409206&&_0x38e892&&N(_0x152f2a,_0x59fa3b,_0x38e892),_0x38e892;},re=(_0xf0a674,_0x1faae6)=>(_0x344e41,_0xa2a831)=>_0x1faae6(_0x344e41,_0xa2a831,_0xf0a674),U=(_0x26bbb2,_0x8443cb,_0x206191)=>k(_0x26bbb2,typeof _0x8443cb!='symbol'?_0x8443cb+'':_0x8443cb,_0x206191);exports[_0x1a4ae5(0x10c)]=class extends a[_0x1a4ae5(0x118)]{constructor(_0x2a5569,_0xa650f6){super(),this['_injector']=_0xa650f6;}[_0x1a4ae5(0x139)](_0x3299fc){const _0x3a97ec=_0x1a4ae5;[[C],[D],[b],[f]][_0x3a97ec(0x158)](_0x3c3b81=>{const _0x55ecaa=_0x3a97ec;_0x3299fc[_0x55ecaa(0x181)](_0x3c3b81);});}},U(exports[_0x1a4ae5(0x10c)],'pluginName',q),U(exports[_0x1a4ae5(0x10c)],_0x1a4ae5(0x131),a[_0x1a4ae5(0x11a)][_0x1a4ae5(0x172)]),exports[_0x1a4ae5(0x10c)]=ee([a['DependentOn'](g[_0x1a4ae5(0x123)],T[_0x1a4ae5(0x129)],y[_0x1a4ae5(0x17f)]),re(0x1,a[_0x1a4ae5(0x15a)](a[_0x1a4ae5(0x137)]))],exports[_0x1a4ae5(0x10c)]);
1
+ 'use strict';const _0x554ab8=_0x4252;(function(_0x325eba,_0x21a7e9){const _0xd8f1b6=_0x4252,_0x15abb0=_0x325eba();while(!![]){try{const _0x4948fc=parseInt(_0xd8f1b6(0xb6))/0x1*(parseInt(_0xd8f1b6(0xaf))/0x2)+parseInt(_0xd8f1b6(0xd4))/0x3*(-parseInt(_0xd8f1b6(0xb3))/0x4)+parseInt(_0xd8f1b6(0xd7))/0x5+parseInt(_0xd8f1b6(0xff))/0x6+parseInt(_0xd8f1b6(0x8d))/0x7*(parseInt(_0xd8f1b6(0xaa))/0x8)+parseInt(_0xd8f1b6(0xe2))/0x9*(-parseInt(_0xd8f1b6(0x110))/0xa)+parseInt(_0xd8f1b6(0xfe))/0xb*(parseInt(_0xd8f1b6(0x86))/0xc);if(_0x4948fc===_0x21a7e9)break;else _0x15abb0['push'](_0x15abb0['shift']());}catch(_0x1e0335){_0x15abb0['push'](_0x15abb0['shift']());}}}(_0x3a83,0x81de5));function _0x4252(_0x1f4175,_0x35d423){const _0x3a83d2=_0x3a83();return _0x4252=function(_0x4252fc,_0x332ab1){_0x4252fc=_0x4252fc-0x82;let _0x43c411=_0x3a83d2[_0x4252fc];return _0x43c411;},_0x4252(_0x1f4175,_0x35d423);}Object['defineProperty'](exports,Symbol[_0x554ab8(0x95)],{'value':_0x554ab8(0x102)});const c=require(_0x554ab8(0xa3)),g=require('@univerjs/thread-comment'),N=require(_0x554ab8(0xe1)),y=require('@univerjs-pro/collaboration-client'),O=require(_0x554ab8(0xb9)),$=require(_0x554ab8(0xcd)),E=require(_0x554ab8(0x10e)),q='THREAD_COMMENT_DATA_SOURCE_PLUGIN';var p=(_0x574f7e=>(_0x574f7e[_0x574f7e[_0x554ab8(0x8b)]=0x0]=_0x554ab8(0x8b),_0x574f7e[_0x574f7e[_0x554ab8(0x8e)]=0x1]='Solved',_0x574f7e[_0x574f7e[_0x554ab8(0xbc)]=-0x1]=_0x554ab8(0xbc),_0x574f7e))(p||{}),v=(_0x71c60e=>(_0x71c60e[_0x71c60e[_0x554ab8(0xa0)]=0x0]='Unknown',_0x71c60e[_0x71c60e[_0x554ab8(0x101)]=0x1]=_0x554ab8(0x101),_0x71c60e[_0x71c60e[_0x554ab8(0xf1)]=0x2]='Reply',_0x71c60e[_0x71c60e[_0x554ab8(0x97)]=0x3]=_0x554ab8(0x97),_0x71c60e[_0x71c60e['Delete']=0x4]=_0x554ab8(0xd8),_0x71c60e[_0x71c60e[_0x554ab8(0x104)]=0x5]='Solve',_0x71c60e[_0x71c60e[_0x554ab8(0xbc)]=-0x1]=_0x554ab8(0xbc),_0x71c60e))(v||{});const P=_0x3db542=>$(new Date(+_0x3db542))[_0x554ab8(0x99)](_0x554ab8(0xd6)),x=async(_0x522bca,_0x2f4224)=>{const _0x59aca9=_0x554ab8,_0x590ba6=_0x522bca[_0x59aca9(0xac)](c[_0x59aca9(0xc3)]),_0x2ec2f4=_0x522bca['get'](O[_0x59aca9(0x10f)]);_0x2f4224['forEach'](_0x266a36=>{const _0x17e4a2=_0x59aca9;_0x590ba6[_0x17e4a2(0xae)](_0x266a36)&&_0x2f4224['delete'](_0x266a36);}),_0x2f4224[_0x59aca9(0x10b)]&&(await _0x2ec2f4[_0x59aca9(0xac)](_0x59aca9(0x108),{'params':{'userIDs':[..._0x2f4224]}}))['body'][_0x59aca9(0x106)][_0x59aca9(0x9e)](_0x5032a3=>{const _0x10cbbb=_0x59aca9;_0x5032a3&&_0x590ba6[_0x10cbbb(0xf5)](_0x5032a3);});};var Y=Object[_0x554ab8(0xd9)],G=Object[_0x554ab8(0xc7)],H=(_0x372fe3,_0x425ac1,_0x45964a,_0x23891f)=>{const _0xc78a78=_0x554ab8;for(var _0x1af61b=_0x23891f>0x1?void 0x0:_0x23891f?G(_0x425ac1,_0x45964a):_0x425ac1,_0x506a3a=_0x372fe3[_0xc78a78(0xde)]-0x1,_0x539e63;_0x506a3a>=0x0;_0x506a3a--)(_0x539e63=_0x372fe3[_0x506a3a])&&(_0x1af61b=(_0x23891f?_0x539e63(_0x425ac1,_0x45964a,_0x1af61b):_0x539e63(_0x1af61b))||_0x1af61b);return _0x23891f&&_0x1af61b&&Y(_0x425ac1,_0x45964a,_0x1af61b),_0x1af61b;},I=(_0x25a735,_0x5bea31)=>(_0x27888f,_0x21370d)=>_0x5bea31(_0x27888f,_0x21370d,_0x25a735);function L(_0x8f7121,_0x3ecf05){const _0x5d2d35=_0x554ab8,_0x4412c2=_0x8f7121[_0x5d2d35(0xb2)][0x0];return{..._0x3ecf05,'id':_0x4412c2[_0x5d2d35(0xec)],'resolved':_0x8f7121[_0x5d2d35(0x85)]===0x1,'dT':P(_0x4412c2[_0x5d2d35(0xe4)]),'personId':_0x4412c2[_0x5d2d35(0xa2)],'threadId':_0x4412c2[_0x5d2d35(0xdd)]};}function A(_0x2f3083,_0x15d175,_0x5badce){const _0x37c518=_0x554ab8;var _0x239d3a,_0x5877ea;if(((_0x5877ea=(_0x239d3a=_0x2f3083==null?void 0x0:_0x2f3083[_0x37c518(0xb2)])==null?void 0x0:_0x239d3a[_0x37c518(0xde)])!=null?_0x5877ea:0x0)>0x0){const _0x20804c=(_0x4ee987,_0x3f5cf0)=>({'id':_0x4ee987[_0x37c518(0xec)],'threadId':_0x4ee987[_0x37c518(0xdd)],'dT':P(_0x4ee987[_0x37c518(0xe4)]),'personId':_0x4ee987[_0x37c518(0xa2)],'resolved':_0x2f3083['solved']===p[_0x37c518(0x8e)],'unitId':_0x15d175,'subUnitId':_0x5badce,'text':JSON[_0x37c518(0xd1)](_0x4ee987['content']),'parentId':_0x3f5cf0}),_0x83e9a9=_0x20804c(_0x2f3083[_0x37c518(0xb2)][0x0]);return{..._0x83e9a9,'children':_0x2f3083[_0x37c518(0xb2)][_0x37c518(0xab)](0x1)[_0x37c518(0x90)](_0x17942f=>_0x20804c(_0x17942f,_0x83e9a9['id']))};}return null;}let C=class{constructor(_0x856ee6,_0x37bd05,_0x5297e0,_0x35990d){const _0x291a0a=_0x554ab8;this[_0x291a0a(0xdb)]=_0x856ee6,this[_0x291a0a(0xa7)]=_0x37bd05,this['_sessionService']=_0x5297e0,this[_0x291a0a(0xc5)]=_0x35990d;}async[_0x554ab8(0x107)](_0x27da1f){const _0x13e524=_0x554ab8;var _0x227b06,_0xd561c0;const {parentId:_0x385269,unitId:_0x1ca3f2,text:_0x630829,threadId:_0x26c955}=_0x27da1f,_0x511f64=(_0xd561c0=(_0x227b06=_0x630829[_0x13e524(0xfa)])==null?void 0x0:_0x227b06[_0x13e524(0xc8)](_0x5a2a5c=>_0x5a2a5c[_0x13e524(0xf2)]===c['CustomRangeType'][_0x13e524(0xe9)])[_0x13e524(0x90)](_0x45fb83=>_0x45fb83[_0x13e524(0x9b)]))!=null?_0xd561c0:[],_0x3e9aa8=JSON[_0x13e524(0x96)](_0x630829),_0x364029=(await this['_sessionService']['requireSession'](_0x1ca3f2))[_0x13e524(0x10a)]();if(_0x385269){const _0x5bc2d9={'memberId':_0x364029,'unitId':_0x1ca3f2,'content':_0x3e9aa8,'mention':_0x511f64,'threadId':_0x26c955},_0x5f23db=(await this[_0x13e524(0xdb)][_0x13e524(0x87)](_0x13e524(0xe6)+_0x1ca3f2+_0x13e524(0x89),{'body':_0x5bc2d9}))['body'][_0x13e524(0xc0)];return{..._0x27da1f,'id':_0x5f23db[_0x13e524(0xec)],'dT':$(+_0x5f23db[_0x13e524(0xe4)])[_0x13e524(0x99)](_0x13e524(0xd6)),'personId':_0x5f23db[_0x13e524(0xa2)]};}else{const _0x31f3a2={'memberId':_0x364029,'unitId':_0x1ca3f2,'content':_0x3e9aa8,'mention':_0x511f64},_0xb2438=await this[_0x13e524(0xdb)][_0x13e524(0x87)](_0x13e524(0xe6)+_0x1ca3f2+_0x13e524(0xcb),{'body':_0x31f3a2});return L(_0xb2438['body']['comment'],_0x27da1f);}}async[_0x554ab8(0xb0)](_0x2bc45c){const _0x587b41=_0x554ab8;var _0x1ad05b,_0x275b24;const {text:_0x549799,unitId:_0x51da56}=_0x2bc45c,_0x18142b=(_0x275b24=(_0x1ad05b=_0x549799[_0x587b41(0xfa)])==null?void 0x0:_0x1ad05b[_0x587b41(0xc8)](_0x12d5c5=>_0x12d5c5['rangeType']===c[_0x587b41(0xe8)][_0x587b41(0xe9)])[_0x587b41(0x90)](_0x35ee9e=>_0x35ee9e['rangeId']))!=null?_0x275b24:[],_0x37dbc8=JSON[_0x587b41(0x96)](_0x549799),_0x4554ec=_0x2bc45c[_0x587b41(0xdd)],_0x1c4f17=_0x2bc45c['id'],_0x2e6e57={'memberId':(await this['_sessionService'][_0x587b41(0xca)](_0x51da56))[_0x587b41(0x10a)](),'unitId':_0x51da56,'threadId':_0x4554ec,'mention':_0x18142b,'content':_0x37dbc8,'replyId':_0x1c4f17},_0x267fa4=await this[_0x587b41(0xdb)]['post'](_0x587b41(0xe6)+_0x51da56+_0x587b41(0xce),{'body':_0x2e6e57});return!_0x267fa4[_0x587b41(0xf4)][_0x587b41(0xdc)]||_0x267fa4[_0x587b41(0xf4)][_0x587b41(0xdc)][_0x587b41(0xef)]===0x1;}async[_0x554ab8(0xbb)](_0x321238){const _0x15c654=_0x554ab8,{unitId:_0x5e1df0}=_0x321238,_0x344d8a=_0x321238[_0x15c654(0xdd)],_0x11f762={'memberId':this[_0x15c654(0xa7)][_0x15c654(0xc4)]()[_0x15c654(0xf6)],'unitId':_0x5e1df0,'threadId':_0x344d8a,'solved':_0x321238[_0x15c654(0xf8)]?p[_0x15c654(0x8e)]:p[_0x15c654(0x8b)]},_0x518452=await this['_httpService']['post'](_0x15c654(0xe6)+_0x5e1df0+_0x15c654(0xa5),{'body':_0x11f762});return!_0x518452[_0x15c654(0xf4)][_0x15c654(0xdc)]||_0x518452[_0x15c654(0xf4)][_0x15c654(0xdc)]['code']===0x1;}async[_0x554ab8(0xcc)](_0x4a9244,_0x3fb863,_0x5127cc,_0x3a2bef){const _0x318e2c=_0x554ab8,_0x439932={'memberId':(await this[_0x318e2c(0xa8)][_0x318e2c(0xca)](_0x4a9244))[_0x318e2c(0x10a)](),'threadId':_0x5127cc,'replyId':_0x3a2bef,'unitId':_0x4a9244},_0x1b4deb=await this['_httpService'][_0x318e2c(0x87)](_0x318e2c(0xe6)+_0x4a9244+_0x318e2c(0xb4),{'body':_0x439932});return!_0x1b4deb[_0x318e2c(0xf4)][_0x318e2c(0xdc)]||_0x1b4deb[_0x318e2c(0xf4)][_0x318e2c(0xdc)][_0x318e2c(0xef)]===0x1;}async[_0x554ab8(0xfb)](_0x506b95,_0x4f8710,_0x1480d5){const _0x27b36=_0x554ab8,_0x4bac95={'unitId':_0x506b95,'threadId':_0x1480d5},_0x431236=await this[_0x27b36(0xdb)][_0x27b36(0x87)](_0x27b36(0xe6)+_0x506b95+_0x27b36(0x10d),{'body':_0x4bac95}),_0x144553=_0x1480d5['map'](_0x5582e6=>A(_0x431236[_0x27b36(0xf4)][_0x27b36(0x84)][_0x5582e6],_0x506b95,_0x4f8710))[_0x27b36(0xc8)](Boolean);return Object[_0x27b36(0x109)](_0x431236[_0x27b36(0xf4)][_0x27b36(0x106)])['forEach'](_0x478a75=>{const _0x2f1968=_0x27b36;this[_0x2f1968(0xa7)][_0x2f1968(0xf5)](_0x478a75);}),_0x144553;}[_0x554ab8(0x8f)](_0x273d8d){const _0x22aac5=_0x554ab8;return{'id':_0x273d8d['id'],'threadId':_0x273d8d[_0x22aac5(0xdd)],'ref':_0x273d8d['ref']};}};C=H([I(0x0,c[_0x554ab8(0x105)](O[_0x554ab8(0x10f)])),I(0x1,c[_0x554ab8(0x105)](c[_0x554ab8(0xc3)])),I(0x2,c[_0x554ab8(0x105)](y['CollaborationSessionService'])),I(0x3,c[_0x554ab8(0x105)](c[_0x554ab8(0xbe)]))],C);var J=Object['defineProperty'],F=Object[_0x554ab8(0xc7)],Z=(_0x2173aa,_0x86ca3,_0x2af8ab,_0x40c3e8)=>{const _0x49990a=_0x554ab8;for(var _0x2f9722=_0x40c3e8>0x1?void 0x0:_0x40c3e8?F(_0x86ca3,_0x2af8ab):_0x86ca3,_0x96eae8=_0x2173aa[_0x49990a(0xde)]-0x1,_0x36f788;_0x96eae8>=0x0;_0x96eae8--)(_0x36f788=_0x2173aa[_0x96eae8])&&(_0x2f9722=(_0x40c3e8?_0x36f788(_0x86ca3,_0x2af8ab,_0x2f9722):_0x36f788(_0x2f9722))||_0x2f9722);return _0x40c3e8&&_0x2f9722&&J(_0x86ca3,_0x2af8ab,_0x2f9722),_0x2f9722;},W=(_0x316da8,_0x240a01)=>(_0x4d7511,_0x21debf)=>_0x240a01(_0x4d7511,_0x21debf,_0x316da8);let D=class{constructor(_0x5c8d90){const _0x5c94b9=_0x554ab8;this[_0x5c94b9(0xdb)]=_0x5c8d90;}async[_0x554ab8(0xc9)](_0x2ab793,_0x1f9330,_0x2d69bb){const _0x2e7e5c=_0x554ab8,_0x6f6bbe=new URL(window[_0x2e7e5c(0xfc)][_0x2e7e5c(0xda)])[_0x2e7e5c(0xbf)][_0x2e7e5c(0xac)](_0x2e7e5c(0xe5));if(!_0x6f6bbe)return[];const _0x273fc4=window[_0x2e7e5c(0xfc)][_0x2e7e5c(0x10c)],_0x4fcaab=window[_0x2e7e5c(0xfc)][_0x2e7e5c(0x112)]==='https:'?_0x2e7e5c(0xc2):_0x2e7e5c(0xf7);return(await this[_0x2e7e5c(0xdb)][_0x2e7e5c(0xac)](_0x4fcaab+_0x2e7e5c(0xa9)+_0x273fc4+_0x2e7e5c(0xfd),{'params':{'objectID':_0x6f6bbe,'unitID':_0x6f6bbe}}))[_0x2e7e5c(0xf4)][_0x2e7e5c(0x100)][_0x2e7e5c(0x90)](_0xbc78e9=>{const _0x7de3db=_0x2e7e5c;var _0x394686,_0x22851f,_0x1627ba,_0x216901,_0xc8b96f,_0x384f1d;return{'id':(_0x22851f=(_0x394686=_0xbc78e9['subject'])==null?void 0x0:_0x394686[_0x7de3db(0xf6)])!=null?_0x22851f:'','label':(_0x216901=(_0x1627ba=_0xbc78e9[_0x7de3db(0xa6)])==null?void 0x0:_0x1627ba[_0x7de3db(0x88)])!=null?_0x216901:'','icon':(_0x384f1d=(_0xc8b96f=_0xbc78e9[_0x7de3db(0xa6)])==null?void 0x0:_0xc8b96f[_0x7de3db(0xe0)])!=null?_0x384f1d:'','type':_0x7de3db(0xa1)};});}};D=Z([W(0x0,c[_0x554ab8(0x105)](O[_0x554ab8(0x10f)]))],D);var z=Object['defineProperty'],B=Object[_0x554ab8(0xc7)],K=(_0x3a155e,_0x51e748,_0x11d325,_0x457d6f)=>{const _0x52489a=_0x554ab8;for(var _0x54c06a=_0x457d6f>0x1?void 0x0:_0x457d6f?B(_0x51e748,_0x11d325):_0x51e748,_0x5ccc48=_0x3a155e[_0x52489a(0xde)]-0x1,_0x531392;_0x5ccc48>=0x0;_0x5ccc48--)(_0x531392=_0x3a155e[_0x5ccc48])&&(_0x54c06a=(_0x457d6f?_0x531392(_0x51e748,_0x11d325,_0x54c06a):_0x531392(_0x54c06a))||_0x54c06a);return _0x457d6f&&_0x54c06a&&z(_0x51e748,_0x11d325,_0x54c06a),_0x54c06a;},S=(_0x3316a5,_0xf352d1)=>(_0x393ea9,_0x1a57e2)=>_0xf352d1(_0x393ea9,_0x1a57e2,_0x3316a5);let f=class extends c['Disposable']{constructor(_0x39eb8d,_0x1c91a9,_0xba7d24,_0x2b470d){const _0x203a18=_0x554ab8;super(),this[_0x203a18(0xd0)]=_0x39eb8d,this[_0x203a18(0xdf)]=_0x1c91a9,this[_0x203a18(0xb5)]=_0xba7d24,this[_0x203a18(0xb7)]=_0x2b470d,this[_0x203a18(0x98)]();}[_0x554ab8(0x98)](){const _0xe564ac=_0x554ab8;this[_0xe564ac(0xd0)][_0xe564ac(0x111)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xe564ac(0x113)]=!0x1,this['_threadCommentMentionDataService'][_0xe564ac(0x111)]=this[_0xe564ac(0xb7)];}};f=K([c[_0x554ab8(0x9c)](c['LifecycleStages'][_0x554ab8(0x9d)],f),S(0x0,g[_0x554ab8(0xc1)]),S(0x1,c[_0x554ab8(0x105)](C)),S(0x2,N[_0x554ab8(0x93)]),S(0x3,c['Inject'](D))],f);var V=Object['defineProperty'],Q=Object[_0x554ab8(0xc7)],X=(_0x4f13d5,_0x4ebc90,_0x47f22f,_0x1bbcfd)=>{const _0x302872=_0x554ab8;for(var _0x1b4baf=_0x1bbcfd>0x1?void 0x0:_0x1bbcfd?Q(_0x4ebc90,_0x47f22f):_0x4ebc90,_0x5286f2=_0x4f13d5[_0x302872(0xde)]-0x1,_0x28c8e3;_0x5286f2>=0x0;_0x5286f2--)(_0x28c8e3=_0x4f13d5[_0x5286f2])&&(_0x1b4baf=(_0x1bbcfd?_0x28c8e3(_0x4ebc90,_0x47f22f,_0x1b4baf):_0x28c8e3(_0x1b4baf))||_0x1b4baf);return _0x1bbcfd&&_0x1b4baf&&V(_0x4ebc90,_0x47f22f,_0x1b4baf),_0x1b4baf;},_=(_0x8b1144,_0x1442a4)=>(_0x49d049,_0x46c4e5)=>_0x1442a4(_0x49d049,_0x46c4e5,_0x8b1144);let b=class extends c[_0x554ab8(0x103)]{constructor(_0x1a3564,_0x5719fb,_0x4c8146,_0x4018d5){const _0x18f7fe=_0x554ab8;super(),this[_0x18f7fe(0xe3)]=_0x1a3564,this[_0x18f7fe(0xd3)]=_0x5719fb,this[_0x18f7fe(0xa7)]=_0x4c8146,this['_injector']=_0x4018d5,this[_0x18f7fe(0xcf)](),this[_0x18f7fe(0xed)]();}[_0x554ab8(0xed)](){const _0x15536d=_0x554ab8;this[_0x15536d(0xf0)](this[_0x15536d(0xd3)][_0x15536d(0xa4)]['pipe'](E[_0x15536d(0x9a)](0x10))[_0x15536d(0xea)](_0x333207=>{const _0x1fbb1c=_0x15536d,_0x392b3c=new Set();_0x333207[_0x1fbb1c(0x9e)](_0x9525f1=>{const _0x5c040b=_0x1fbb1c;switch(_0x9525f1[_0x5c040b(0xee)]){case _0x5c040b(0xf3):{const _0x29fb73=_0x9525f1['payload'][_0x5c040b(0xb8)];_0x392b3c[_0x5c040b(0xf3)](_0x29fb73);break;}}}),x(this[_0x1fbb1c(0xc5)],_0x392b3c);}));}[_0x554ab8(0xcf)](){const _0xcdb557=_0x554ab8;this[_0xcdb557(0xf0)](this[_0xcdb557(0xe3)]['commentUpdate$']['subscribe'](async _0xe135ea=>{const _0x423f26=_0xcdb557;var _0x5808fb,_0x443816;const _0x4595a7=this[_0x423f26(0xd3)][_0x423f26(0xd2)](_0xe135ea['unitId'],_0xe135ea[_0x423f26(0xdd)]);if(!_0x4595a7)return;const {unitId:_0x13f44e,subUnitId:_0x5ec348}=_0x4595a7;switch(_0xe135ea[_0x423f26(0xa1)]&&this['_userService']['addUser'](_0xe135ea['user']),_0xe135ea[_0x423f26(0xee)]){case v[_0x423f26(0x101)]:break;case v[_0x423f26(0xf1)]:{this[_0x423f26(0xd3)][_0x423f26(0x107)](_0x13f44e,_0x5ec348,{'unitId':_0x13f44e,'subUnitId':_0x5ec348,'ref':'','id':_0xe135ea[_0x423f26(0xec)],'dT':P(+_0xe135ea['createTimestamp']),'threadId':_0xe135ea['threadId'],'personId':(_0x443816=(_0x5808fb=_0xe135ea[_0x423f26(0xa1)])==null?void 0x0:_0x5808fb[_0x423f26(0xf6)])!=null?_0x443816:_0xe135ea[_0x423f26(0xa2)],'text':JSON['parse'](_0xe135ea[_0x423f26(0xc6)]),'parentId':_0x4595a7['id']});break;}case v[_0x423f26(0xd8)]:{const _0x15b312=this[_0x423f26(0xd3)][_0x423f26(0x82)](_0x13f44e,_0x5ec348,_0xe135ea[_0x423f26(0xec)]);_0x15b312&&_0x15b312[_0x423f26(0xba)]&&this[_0x423f26(0xd3)][_0x423f26(0xcc)](_0x13f44e,_0x5ec348,_0xe135ea[_0x423f26(0xec)]);break;}case v[_0x423f26(0x97)]:{this[_0x423f26(0xd3)][_0x423f26(0xb0)](_0x13f44e,_0x5ec348,{'commentId':_0xe135ea[_0x423f26(0xec)],'text':JSON[_0x423f26(0xd1)](_0xe135ea['content'])});break;}case v['Solve']:{const _0x5c6a7a=this['_threadCommentModel']['getThread'](_0x13f44e,_0xe135ea[_0x423f26(0xdd)]);_0x5c6a7a&&this[_0x423f26(0xd3)][_0x423f26(0xbb)](_0x13f44e,_0x5ec348,_0x5c6a7a['id'],_0xe135ea['solved']===p[_0x423f26(0x8e)]);break;}}}));}};b=X([c['OnLifecycle'](c[_0x554ab8(0xe7)][_0x554ab8(0xad)],b),_(0x0,c[_0x554ab8(0x105)](y['CommentService'])),_(0x1,c['Inject'](g[_0x554ab8(0xbd)])),_(0x2,c[_0x554ab8(0x105)](c['UserManagerService'])),_(0x3,c[_0x554ab8(0x105)](c[_0x554ab8(0xbe)]))],b);const k=_0x554ab8(0xf9),ee={};var U=Object[_0x554ab8(0xd9)],re=Object['getOwnPropertyDescriptor'],te=(_0x583835,_0x5a496c,_0x5af694)=>_0x5a496c in _0x583835?U(_0x583835,_0x5a496c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5af694}):_0x583835[_0x5a496c]=_0x5af694,se=(_0x1a48a9,_0x861c7e,_0x3c4f4f,_0x48bbcf)=>{const _0x295832=_0x554ab8;for(var _0x246baa=_0x48bbcf>0x1?void 0x0:_0x48bbcf?re(_0x861c7e,_0x3c4f4f):_0x861c7e,_0x399b66=_0x1a48a9[_0x295832(0xde)]-0x1,_0x508e87;_0x399b66>=0x0;_0x399b66--)(_0x508e87=_0x1a48a9[_0x399b66])&&(_0x246baa=(_0x48bbcf?_0x508e87(_0x861c7e,_0x3c4f4f,_0x246baa):_0x508e87(_0x246baa))||_0x246baa);return _0x48bbcf&&_0x246baa&&U(_0x861c7e,_0x3c4f4f,_0x246baa),_0x246baa;},T=(_0x2d42fb,_0x4c691e)=>(_0x4f749c,_0x3efd98)=>_0x4c691e(_0x4f749c,_0x3efd98,_0x2d42fb),R=(_0x54bfc4,_0x12cd1d,_0x3e9748)=>te(_0x54bfc4,typeof _0x12cd1d!=_0x554ab8(0xb1)?_0x12cd1d+'':_0x12cd1d,_0x3e9748);function _0x3a83(){const _0x99fc82=['syncUpdateMutationToColla','getComment','UNIVER_UNKNOWN','comments','solved','12yJMlTP','post','name','/reply','UniverInstanceType','OpenOrReOpen','IConfigService','5473153DRacKP','Solved','saveCommentToSnapshot','map','DependentOn','UniverThreadCommentDataSourcePlugin','IThreadCommentMentionDataService','pluginName','toStringTag','stringify','Edit','_initDataSource','format','bufferTime','rangeId','OnLifecycle','Starting','forEach','UniverThreadCommentPlugin','Unknown','user','userId','@univerjs/core','commentUpdate$','/solved','subject','_userService','_sessionService','://','8cGKrvQ','slice','get','Ready','getUser','174516BJXyyJ','updateComment','symbol','replies','3736172gvGDWx','/delete','_threadCommentMentionDataService','3NpnCBL','_threadCommentMentionDataSource','personId','@univerjs/network','parentId','resolveComment','UNRECOGNIZED','ThreadCommentModel','Injector','searchParams','reply','IThreadCommentDataSourceService','https','UserManagerService','getCurrentUser','_injector','content','getOwnPropertyDescriptor','filter','getMentions','requireSession','/add','deleteComment','dayjs','/edit','_init','_threadCommentDataSourceService','parse','getThread','_threadCommentModel','3NtsUwu','onStarting','YYYY/MM/DD\x20HH:mm','3773670qOnlSW','Delete','defineProperty','href','_httpService','error','threadId','length','_threadCommentDataSource','avatar','@univerjs/thread-comment-ui','387oIAQLN','_commentService','createTimestamp','unit','/universer-api/comment/unit/','LifecycleStages','CustomRangeType','COMMENT','subscribe','_configService','replyId','_initUserSync','type','code','disposeWithMe','Reply','rangeType','add','body','addUser','userID','http','resolved','thread-comment-data-source.config','customRanges','listComments','location','/universer-api/authz/collaborator','6130069ubMJHd','141054jwtNeJ','collaborators','Add','Module','Disposable','Solve','Inject','users','addComment','/universer-api/user/list','values','getMemberID','size','host','/list','rxjs','HTTPService','212370ERVyPu','dataSource','protocol'];_0x3a83=function(){return _0x99fc82;};return _0x3a83();}exports[_0x554ab8(0x92)]=class extends c['Plugin']{constructor(_0x1773fb=ee,_0x35d89a,_0x461e64){const _0x56cfc9=_0x554ab8;super(),this['_config']=_0x1773fb,this[_0x56cfc9(0xc5)]=_0x35d89a,this[_0x56cfc9(0xeb)]=_0x461e64;const {..._0x4f669c}=this['_config'];this[_0x56cfc9(0xeb)]['setConfig'](k,_0x4f669c);}[_0x554ab8(0xd5)](){const _0x4aec82=_0x554ab8;[[D],[C],[f],[b]][_0x4aec82(0x9e)](_0x53fdac=>{const _0xa19662=_0x4aec82;this[_0xa19662(0xc5)]['add'](_0x53fdac);});}},R(exports[_0x554ab8(0x92)],_0x554ab8(0x94),q),R(exports[_0x554ab8(0x92)],'type',c[_0x554ab8(0x8a)][_0x554ab8(0x83)]),exports[_0x554ab8(0x92)]=se([c[_0x554ab8(0x91)](g[_0x554ab8(0x9f)],N['UniverThreadCommentUIPlugin'],y['UniverCollaborationClientPlugin']),T(0x1,c[_0x554ab8(0x105)](c[_0x554ab8(0xbe)])),T(0x2,c[_0x554ab8(0x8c)])],exports[_0x554ab8(0x92)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x449fa0=_0x4c89;(function(_0x3fab0d,_0x3e432f){const _0x4b98ab=_0x4c89,_0x132643=_0x3fab0d();while(!![]){try{const _0x2155af=parseInt(_0x4b98ab(0xc1))/0x1*(parseInt(_0x4b98ab(0x111))/0x2)+-parseInt(_0x4b98ab(0x108))/0x3*(-parseInt(_0x4b98ab(0xd3))/0x4)+-parseInt(_0x4b98ab(0xb7))/0x5*(-parseInt(_0x4b98ab(0x10f))/0x6)+-parseInt(_0x4b98ab(0xe5))/0x7*(parseInt(_0x4b98ab(0x107))/0x8)+parseInt(_0x4b98ab(0xf7))/0x9+parseInt(_0x4b98ab(0x112))/0xa*(parseInt(_0x4b98ab(0x103))/0xb)+-parseInt(_0x4b98ab(0x110))/0xc;if(_0x2155af===_0x3e432f)break;else _0x132643['push'](_0x132643['shift']());}catch(_0x23569f){_0x132643['push'](_0x132643['shift']());}}}(_0x2931,0x5013e));import{UserManagerService as _0x5e0385,Inject as _0x488ff8,Injector as _0x1468ab,CustomRangeType as _0x1fa406,OnLifecycle as _0x46e263,LifecycleStages as _0x2b1af3,Disposable as _0x5b184e,UniverInstanceType as _0x4c730c,DependentOn as _0x18ba29,Plugin as _0x39b8a8}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x54da55,ThreadCommentModel as _0x30bcad,UniverThreadCommentPlugin as _0x25e0f0}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x163338,UniverThreadCommentUIPlugin as _0x507e21}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x4004b7,CommentService as _0x4a7b16,UniverCollaborationClientPlugin as _0x8b1ab2}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x4fb354}from'@univerjs/network';function _0x4c89(_0x13d6ed,_0x374a7e){const _0x2931e4=_0x2931();return _0x4c89=function(_0x4c89b6,_0x362d43){_0x4c89b6=_0x4c89b6-0xa6;let _0x59118f=_0x2931e4[_0x4c89b6];return _0x59118f;},_0x4c89(_0x13d6ed,_0x374a7e);}import _0x2e2657 from'dayjs';import{bufferTime as _0x8961d1}from'rxjs';const V=_0x449fa0(0xd0);var v=(_0xc38901=>(_0xc38901[_0xc38901[_0x449fa0(0xdb)]=0x0]=_0x449fa0(0xdb),_0xc38901[_0xc38901[_0x449fa0(0xe0)]=0x1]='Solved',_0xc38901[_0xc38901[_0x449fa0(0xf0)]=-0x1]=_0x449fa0(0xf0),_0xc38901))(v||{}),p=(_0x4c0471=>(_0x4c0471[_0x4c0471[_0x449fa0(0xe2)]=0x0]=_0x449fa0(0xe2),_0x4c0471[_0x4c0471[_0x449fa0(0xff)]=0x1]=_0x449fa0(0xff),_0x4c0471[_0x4c0471['Reply']=0x2]=_0x449fa0(0xd5),_0x4c0471[_0x4c0471[_0x449fa0(0xd7)]=0x3]=_0x449fa0(0xd7),_0x4c0471[_0x4c0471['Delete']=0x4]=_0x449fa0(0xc4),_0x4c0471[_0x4c0471[_0x449fa0(0xee)]=0x5]=_0x449fa0(0xee),_0x4c0471[_0x4c0471[_0x449fa0(0xf0)]=-0x1]=_0x449fa0(0xf0),_0x4c0471))(p||{});const w=_0x5cb723=>_0x2e2657(new Date(+_0x5cb723))['format'](_0x449fa0(0xc8)),Q=async(_0x1a51ef,_0x21fe8f)=>{const _0x4059eb=_0x449fa0,_0x5330d8=_0x1a51ef[_0x4059eb(0xdd)](_0x5e0385),_0x1cd53e=_0x1a51ef[_0x4059eb(0xdd)](_0x4fb354);_0x21fe8f[_0x4059eb(0xc7)](_0x3c4c39=>{const _0x2c3099=_0x4059eb;_0x5330d8[_0x2c3099(0xa6)](_0x3c4c39)&&_0x21fe8f[_0x2c3099(0xb4)](_0x3c4c39);}),_0x21fe8f[_0x4059eb(0xe9)]&&(await _0x1cd53e[_0x4059eb(0xdd)](_0x4059eb(0xed),{'params':{'userIDs':[..._0x21fe8f]}}))['body'][_0x4059eb(0xd8)]['forEach'](_0x1bc196=>{const _0x1150cc=_0x4059eb;_0x1bc196&&_0x5330d8[_0x1150cc(0xcb)](_0x1bc196);});};var X=Object[_0x449fa0(0xf9)],k=Object[_0x449fa0(0x101)],ee=(_0x33ecf4,_0x5a852b,_0x3b306c,_0x51945e)=>{const _0x571e31=_0x449fa0;for(var _0x17af11=_0x51945e>0x1?void 0x0:_0x51945e?k(_0x5a852b,_0x3b306c):_0x5a852b,_0x30591b=_0x33ecf4[_0x571e31(0x105)]-0x1,_0x5b43a3;_0x30591b>=0x0;_0x30591b--)(_0x5b43a3=_0x33ecf4[_0x30591b])&&(_0x17af11=(_0x51945e?_0x5b43a3(_0x5a852b,_0x3b306c,_0x17af11):_0x5b43a3(_0x17af11))||_0x17af11);return _0x51945e&&_0x17af11&&X(_0x5a852b,_0x3b306c,_0x17af11),_0x17af11;},_=(_0x802282,_0x1e1832)=>(_0xfb92f0,_0x4dffe7)=>_0x1e1832(_0xfb92f0,_0x4dffe7,_0x802282);function re(_0x5ea4d1,_0x42d036){const _0x4581bb=_0x449fa0,_0x2b9c13=_0x5ea4d1[_0x4581bb(0xda)][0x0];return{..._0x42d036,'id':_0x2b9c13[_0x4581bb(0xd4)],'resolved':_0x5ea4d1[_0x4581bb(0xde)]===0x1,'dT':w(_0x2b9c13['createTimestamp']),'personId':_0x2b9c13[_0x4581bb(0xe3)],'threadId':_0x2b9c13[_0x4581bb(0xbb)]};}function te(_0x51b99d,_0x45dfc9,_0xc54e72){const _0x1c71ee=_0x449fa0;var _0x2a1957,_0x4fb677;if(((_0x4fb677=(_0x2a1957=_0x51b99d==null?void 0x0:_0x51b99d[_0x1c71ee(0xda)])==null?void 0x0:_0x2a1957[_0x1c71ee(0x105)])!=null?_0x4fb677:0x0)>0x0){const _0x2e5e0c=(_0x430790,_0x3c0c83)=>({'id':_0x430790[_0x1c71ee(0xd4)],'threadId':_0x430790[_0x1c71ee(0xbb)],'dT':w(_0x430790[_0x1c71ee(0xcf)]),'personId':_0x430790[_0x1c71ee(0xe3)],'resolved':_0x51b99d[_0x1c71ee(0xde)]===v[_0x1c71ee(0xe0)],'unitId':_0x45dfc9,'subUnitId':_0xc54e72,'text':JSON['parse'](_0x430790[_0x1c71ee(0xeb)]),'parentId':_0x3c0c83}),_0x54eda5=_0x2e5e0c(_0x51b99d[_0x1c71ee(0xda)][0x0]);return{..._0x54eda5,'children':_0x51b99d[_0x1c71ee(0xda)][_0x1c71ee(0xaf)](0x1)[_0x1c71ee(0xa7)](_0x38fc6d=>_0x2e5e0c(_0x38fc6d,_0x54eda5['id']))};}return null;}let D=class{constructor(_0x4fe603,_0x53680d,_0x4f8d03,_0x4861ea){const _0x44ff28=_0x449fa0;this[_0x44ff28(0xc9)]=_0x4fe603,this[_0x44ff28(0x109)]=_0x53680d,this[_0x44ff28(0xd1)]=_0x4f8d03,this[_0x44ff28(0xdf)]=_0x4861ea;}async[_0x449fa0(0xfc)](_0x6725b2){const _0x5791a4=_0x449fa0;var _0x337392,_0x383a32;const {parentId:_0x184c47,unitId:_0x24d0ee,text:_0x42bb65,threadId:_0x558549}=_0x6725b2,_0x26c054=(_0x383a32=(_0x337392=_0x42bb65[_0x5791a4(0xae)])==null?void 0x0:_0x337392['filter'](_0x2171a3=>_0x2171a3[_0x5791a4(0xf4)]===_0x1fa406[_0x5791a4(0xe6)])['map'](_0x331535=>_0x331535[_0x5791a4(0xec)]))!=null?_0x383a32:[],_0x5a8230=JSON[_0x5791a4(0xc0)](_0x42bb65),_0x1965dd=(await this['_sessionService'][_0x5791a4(0xe1)](_0x24d0ee))['getMemberID']();if(_0x184c47){const _0x40badc={'memberId':_0x1965dd,'unitId':_0x24d0ee,'content':_0x5a8230,'mention':_0x26c054,'threadId':_0x558549},_0x3f9871=(await this['_httpService'][_0x5791a4(0x100)](_0x5791a4(0xab)+_0x24d0ee+_0x5791a4(0x113),{'body':_0x40badc}))[_0x5791a4(0xbe)][_0x5791a4(0xb9)];return{..._0x6725b2,'id':_0x3f9871[_0x5791a4(0xd4)],'dT':_0x2e2657(+_0x3f9871[_0x5791a4(0xcf)])[_0x5791a4(0xb6)](_0x5791a4(0xc8)),'personId':_0x3f9871[_0x5791a4(0xe3)]};}else{const _0x1a0092={'memberId':_0x1965dd,'unitId':_0x24d0ee,'content':_0x5a8230,'mention':_0x26c054},_0xb956c6=await this[_0x5791a4(0xc9)][_0x5791a4(0x100)](_0x5791a4(0xab)+_0x24d0ee+_0x5791a4(0xfe),{'body':_0x1a0092});return re(_0xb956c6['body'][_0x5791a4(0xb2)],_0x6725b2);}}async['updateComment'](_0x59cd35){const _0x2a8c14=_0x449fa0;var _0x559846,_0x9209d9;const {text:_0x3e6915,unitId:_0x4b67f1}=_0x59cd35,_0x4646e7=(_0x9209d9=(_0x559846=_0x3e6915[_0x2a8c14(0xae)])==null?void 0x0:_0x559846[_0x2a8c14(0xa8)](_0x3d0459=>_0x3d0459[_0x2a8c14(0xf4)]===_0x1fa406[_0x2a8c14(0xe6)])[_0x2a8c14(0xa7)](_0x68015b=>_0x68015b[_0x2a8c14(0xec)]))!=null?_0x9209d9:[],_0x2349c0=JSON['stringify'](_0x3e6915),_0x46d40a=_0x59cd35[_0x2a8c14(0xbb)],_0x3b2d8f=_0x59cd35['id'],_0x851642={'memberId':(await this[_0x2a8c14(0xd1)][_0x2a8c14(0xe1)](_0x4b67f1))['getMemberID'](),'unitId':_0x4b67f1,'threadId':_0x46d40a,'mention':_0x4646e7,'content':_0x2349c0,'replyId':_0x3b2d8f},_0x44f4d1=await this[_0x2a8c14(0xc9)][_0x2a8c14(0x100)](_0x2a8c14(0xab)+_0x4b67f1+_0x2a8c14(0xe7),{'body':_0x851642});return!_0x44f4d1[_0x2a8c14(0xbe)][_0x2a8c14(0xb1)]||_0x44f4d1[_0x2a8c14(0xbe)]['error'][_0x2a8c14(0xce)]===0x1;}async[_0x449fa0(0x10d)](_0x216421){const _0x15dc41=_0x449fa0,{unitId:_0x58d027}=_0x216421,_0x812e49=_0x216421[_0x15dc41(0xbb)],_0x2ed8db={'memberId':this[_0x15dc41(0x109)][_0x15dc41(0xc3)]()[_0x15dc41(0xf2)],'unitId':_0x58d027,'threadId':_0x812e49,'solved':_0x216421[_0x15dc41(0xf8)]?v[_0x15dc41(0xe0)]:v[_0x15dc41(0xdb)]},_0x2cdb5a=await this['_httpService'][_0x15dc41(0x100)](_0x15dc41(0xab)+_0x58d027+'/solved',{'body':_0x2ed8db});return!_0x2cdb5a['body'][_0x15dc41(0xb1)]||_0x2cdb5a['body'][_0x15dc41(0xb1)][_0x15dc41(0xce)]===0x1;}async[_0x449fa0(0xfb)](_0x19b8fc,_0x5ac74b,_0x2bbf08,_0x508df5){const _0x315968=_0x449fa0,_0x288c3d={'memberId':(await this[_0x315968(0xd1)]['requireSession'](_0x19b8fc))[_0x315968(0x104)](),'threadId':_0x2bbf08,'replyId':_0x508df5,'unitId':_0x19b8fc},_0x2558e9=await this[_0x315968(0xc9)][_0x315968(0x100)](_0x315968(0xab)+_0x19b8fc+_0x315968(0xf5),{'body':_0x288c3d});return!_0x2558e9['body']['error']||_0x2558e9[_0x315968(0xbe)][_0x315968(0xb1)][_0x315968(0xce)]===0x1;}async[_0x449fa0(0xa9)](_0x3c943c,_0x46a3a6,_0x47461d){const _0x1e4e89=_0x449fa0,_0x3f42cd={'unitId':_0x3c943c,'threadId':_0x47461d},_0x36bb75=await this[_0x1e4e89(0xc9)][_0x1e4e89(0x100)](_0x1e4e89(0xab)+_0x3c943c+_0x1e4e89(0xd6),{'body':_0x3f42cd}),_0x4b09c0=_0x47461d[_0x1e4e89(0xa7)](_0x1751f9=>te(_0x36bb75[_0x1e4e89(0xbe)][_0x1e4e89(0x10a)][_0x1751f9],_0x3c943c,_0x46a3a6))[_0x1e4e89(0xa8)](Boolean);return Object['values'](_0x36bb75[_0x1e4e89(0xbe)][_0x1e4e89(0xd8)])[_0x1e4e89(0xc7)](_0x56621f=>{const _0x2c5054=_0x1e4e89;this[_0x2c5054(0x109)][_0x2c5054(0xcb)](_0x56621f);}),_0x4b09c0;}[_0x449fa0(0x106)](_0x1aff2a){const _0x5eb5e0=_0x449fa0;return{'id':_0x1aff2a['id'],'threadId':_0x1aff2a[_0x5eb5e0(0xbb)],'ref':_0x1aff2a['ref']};}};D=ee([_(0x0,_0x488ff8(_0x4fb354)),_(0x1,_0x488ff8(_0x5e0385)),_(0x2,_0x488ff8(_0x4004b7)),_(0x3,_0x488ff8(_0x1468ab))],D);function _0x2931(){const _0x2df98c=['https','_commentService','forEach','YYYY/MM/DD\x20HH:mm','_httpService','_init','addUser','_initUserSync','type','code','createTimestamp','THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','onStarting','4oBBBYT','replyId','Reply','/list','Edit','users','parse','replies','OpenOrReOpen','user','get','solved','_injector','Solved','requireSession','Unknown','userId','Starting','84567QiMGmT','COMMENT','/edit','href','size','personId','content','rangeId','/universer-api/user/list','Solve','commentUpdate$','UNRECOGNIZED','_threadCommentDataSource','userID','subject','rangeType','/delete','location','5604975fSKdKy','resolved','defineProperty','://','deleteComment','addComment','Ready','/add','Add','post','getOwnPropertyDescriptor','protocol','437789WcecRw','getMemberID','length','saveCommentToSnapshot','24poMDMG','1483029cYiPcS','_userService','comments','pluginName','_threadCommentDataSourceService','resolveComment','_threadCommentModel','102YLIbQq','19040028csdkdD','323614MWncoc','40XPYbwv','/reply','getMentions','name','https:','getThread','subscribe','updateComment','getUser','map','filter','listComments','payload','/universer-api/comment/unit/','disposeWithMe','unit','customRanges','slice','collaborators','error','comment','parentId','delete','host','format','103230YGKSvc','pipe','reply','getComment','threadId','_initDataSource','add','body','_threadCommentMentionDataSource','stringify','2PapNeK','_threadCommentMentionDataService','getCurrentUser','Delete'];_0x2931=function(){return _0x2df98c;};return _0x2931();}var se=Object[_0x449fa0(0xf9)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x56b2e3,_0xf2f0d1,_0x439ebf,_0x482f76)=>{const _0x13dfe3=_0x449fa0;for(var _0x5251f8=_0x482f76>0x1?void 0x0:_0x482f76?oe(_0xf2f0d1,_0x439ebf):_0xf2f0d1,_0x4e28d5=_0x56b2e3[_0x13dfe3(0x105)]-0x1,_0x1ce97a;_0x4e28d5>=0x0;_0x4e28d5--)(_0x1ce97a=_0x56b2e3[_0x4e28d5])&&(_0x5251f8=(_0x482f76?_0x1ce97a(_0xf2f0d1,_0x439ebf,_0x5251f8):_0x1ce97a(_0x5251f8))||_0x5251f8);return _0x482f76&&_0x5251f8&&se(_0xf2f0d1,_0x439ebf,_0x5251f8),_0x5251f8;},ie=(_0x11189a,_0x23b6a2)=>(_0x4684a9,_0x7577c4)=>_0x23b6a2(_0x4684a9,_0x7577c4,_0x11189a);let C=class{constructor(_0x44a8cd){this['_httpService']=_0x44a8cd;}async[_0x449fa0(0x114)](_0x349dcb,_0x32aba6,_0x5c1ec9){const _0xbe4af1=_0x449fa0,_0x5e9358=new URL(window[_0xbe4af1(0xf6)][_0xbe4af1(0xe8)])['searchParams'][_0xbe4af1(0xdd)](_0xbe4af1(0xad));if(!_0x5e9358)return[];const _0x5f02de=window[_0xbe4af1(0xf6)][_0xbe4af1(0xb5)],_0x382159=window[_0xbe4af1(0xf6)][_0xbe4af1(0x102)]===_0xbe4af1(0x116)?_0xbe4af1(0xc5):'http';return(await this[_0xbe4af1(0xc9)][_0xbe4af1(0xdd)](_0x382159+_0xbe4af1(0xfa)+_0x5f02de+'/universer-api/authz/collaborator',{'params':{'objectID':_0x5e9358,'unitID':_0x5e9358}}))['body'][_0xbe4af1(0xb0)]['map'](_0x31cf8b=>{const _0x9af755=_0xbe4af1;var _0x46775e,_0x32acbe,_0x31f987,_0x2a86a8,_0x29a39c,_0x3c456c;return{'id':(_0x32acbe=(_0x46775e=_0x31cf8b[_0x9af755(0xf3)])==null?void 0x0:_0x46775e[_0x9af755(0xf2)])!=null?_0x32acbe:'','label':(_0x2a86a8=(_0x31f987=_0x31cf8b[_0x9af755(0xf3)])==null?void 0x0:_0x31f987[_0x9af755(0x115)])!=null?_0x2a86a8:'','icon':(_0x3c456c=(_0x29a39c=_0x31cf8b['subject'])==null?void 0x0:_0x29a39c['avatar'])!=null?_0x3c456c:'','type':_0x9af755(0xdc)};});}};C=ne([ie(0x0,_0x488ff8(_0x4fb354))],C);var ae=Object[_0x449fa0(0xf9)],ce=Object[_0x449fa0(0x101)],de=(_0x5a74b8,_0x346db0,_0x1faa48,_0x3daf74)=>{const _0x3ae45b=_0x449fa0;for(var _0x25989e=_0x3daf74>0x1?void 0x0:_0x3daf74?ce(_0x346db0,_0x1faa48):_0x346db0,_0x48314f=_0x5a74b8[_0x3ae45b(0x105)]-0x1,_0x508ff9;_0x48314f>=0x0;_0x48314f--)(_0x508ff9=_0x5a74b8[_0x48314f])&&(_0x25989e=(_0x3daf74?_0x508ff9(_0x346db0,_0x1faa48,_0x25989e):_0x508ff9(_0x25989e))||_0x25989e);return _0x3daf74&&_0x25989e&&ae(_0x346db0,_0x1faa48,_0x25989e),_0x25989e;},I=(_0x396f1d,_0x14d633)=>(_0x5d6436,_0x18a874)=>_0x14d633(_0x5d6436,_0x18a874,_0x396f1d);let f=class extends _0x5b184e{constructor(_0x4667db,_0x32b0d0,_0x13a94f,_0x320253){const _0x3902f2=_0x449fa0;super(),this[_0x3902f2(0x10c)]=_0x4667db,this[_0x3902f2(0xf1)]=_0x32b0d0,this['_threadCommentMentionDataService']=_0x13a94f,this[_0x3902f2(0xbf)]=_0x320253,this['_initDataSource']();}[_0x449fa0(0xbc)](){const _0x48118f=_0x449fa0;this[_0x48118f(0x10c)]['dataSource']=this[_0x48118f(0xf1)],this[_0x48118f(0x10c)]['syncUpdateMutationToColla']=!0x1,this[_0x48118f(0xc2)]['dataSource']=this['_threadCommentMentionDataSource'];}};f=de([_0x46e263(_0x2b1af3[_0x449fa0(0xe4)],f),I(0x0,_0x54da55),I(0x1,_0x488ff8(D)),I(0x2,_0x163338),I(0x3,_0x488ff8(C))],f);var me=Object[_0x449fa0(0xf9)],le=Object['getOwnPropertyDescriptor'],he=(_0x68d231,_0x155bd7,_0x3045be,_0x2c3acf)=>{const _0x2452e3=_0x449fa0;for(var _0x13a93c=_0x2c3acf>0x1?void 0x0:_0x2c3acf?le(_0x155bd7,_0x3045be):_0x155bd7,_0xb80a62=_0x68d231[_0x2452e3(0x105)]-0x1,_0xe5fd52;_0xb80a62>=0x0;_0xb80a62--)(_0xe5fd52=_0x68d231[_0xb80a62])&&(_0x13a93c=(_0x2c3acf?_0xe5fd52(_0x155bd7,_0x3045be,_0x13a93c):_0xe5fd52(_0x13a93c))||_0x13a93c);return _0x2c3acf&&_0x13a93c&&me(_0x155bd7,_0x3045be,_0x13a93c),_0x13a93c;},S=(_0x24b25f,_0x49224a)=>(_0x565873,_0x315d86)=>_0x49224a(_0x565873,_0x315d86,_0x24b25f);let b=class extends _0x5b184e{constructor(_0x5c48f8,_0x58258f,_0x383b49,_0x3f98e0){const _0x3eac86=_0x449fa0;super(),this[_0x3eac86(0xc6)]=_0x5c48f8,this[_0x3eac86(0x10e)]=_0x58258f,this[_0x3eac86(0x109)]=_0x383b49,this[_0x3eac86(0xdf)]=_0x3f98e0,this[_0x3eac86(0xca)](),this[_0x3eac86(0xcc)]();}['_initUserSync'](){const _0x336cf7=_0x449fa0;this[_0x336cf7(0xac)](this[_0x336cf7(0x10e)][_0x336cf7(0xef)][_0x336cf7(0xb8)](_0x8961d1(0x10))[_0x336cf7(0x118)](_0x30b562=>{const _0x15a4b5=_0x336cf7,_0xf34ab7=new Set();_0x30b562[_0x15a4b5(0xc7)](_0x14afdb=>{const _0x500f3b=_0x15a4b5;switch(_0x14afdb['type']){case _0x500f3b(0xbd):{const _0x39c36a=_0x14afdb[_0x500f3b(0xaa)][_0x500f3b(0xea)];_0xf34ab7[_0x500f3b(0xbd)](_0x39c36a);break;}}}),Q(this[_0x15a4b5(0xdf)],_0xf34ab7);}));}[_0x449fa0(0xca)](){const _0x1823d2=_0x449fa0;this[_0x1823d2(0xac)](this[_0x1823d2(0xc6)][_0x1823d2(0xef)]['subscribe'](async _0x448e4f=>{const _0x8a122c=_0x1823d2;var _0xddb666,_0x2f2e71;const _0x36f7e9=this[_0x8a122c(0x10e)][_0x8a122c(0x117)](_0x448e4f['unitId'],_0x448e4f['threadId']);if(!_0x36f7e9)return;const {unitId:_0x3df278,subUnitId:_0x5c21b9}=_0x36f7e9;switch(_0x448e4f[_0x8a122c(0xdc)]&&this[_0x8a122c(0x109)][_0x8a122c(0xcb)](_0x448e4f[_0x8a122c(0xdc)]),_0x448e4f[_0x8a122c(0xcd)]){case p[_0x8a122c(0xff)]:break;case p[_0x8a122c(0xd5)]:{this[_0x8a122c(0x10e)]['addComment'](_0x3df278,_0x5c21b9,{'unitId':_0x3df278,'subUnitId':_0x5c21b9,'ref':'','id':_0x448e4f['replyId'],'dT':w(+_0x448e4f[_0x8a122c(0xcf)]),'threadId':_0x448e4f['threadId'],'personId':(_0x2f2e71=(_0xddb666=_0x448e4f[_0x8a122c(0xdc)])==null?void 0x0:_0xddb666['userID'])!=null?_0x2f2e71:_0x448e4f[_0x8a122c(0xe3)],'text':JSON[_0x8a122c(0xd9)](_0x448e4f[_0x8a122c(0xeb)]),'parentId':_0x36f7e9['id']});break;}case p[_0x8a122c(0xc4)]:{const _0x531b21=this['_threadCommentModel'][_0x8a122c(0xba)](_0x3df278,_0x5c21b9,_0x448e4f['replyId']);_0x531b21&&_0x531b21[_0x8a122c(0xb3)]&&this[_0x8a122c(0x10e)][_0x8a122c(0xfb)](_0x3df278,_0x5c21b9,_0x448e4f[_0x8a122c(0xd4)]);break;}case p[_0x8a122c(0xd7)]:{this[_0x8a122c(0x10e)][_0x8a122c(0x119)](_0x3df278,_0x5c21b9,{'commentId':_0x448e4f[_0x8a122c(0xd4)],'text':JSON[_0x8a122c(0xd9)](_0x448e4f['content'])});break;}case p[_0x8a122c(0xee)]:{const _0x4e9972=this[_0x8a122c(0x10e)][_0x8a122c(0x117)](_0x3df278,_0x448e4f[_0x8a122c(0xbb)]);_0x4e9972&&this[_0x8a122c(0x10e)][_0x8a122c(0x10d)](_0x3df278,_0x5c21b9,_0x4e9972['id'],_0x448e4f[_0x8a122c(0xde)]===v['Solved']);break;}}}));}};b=he([_0x46e263(_0x2b1af3[_0x449fa0(0xfd)],b),S(0x0,_0x488ff8(_0x4a7b16)),S(0x1,_0x488ff8(_0x30bcad)),S(0x2,_0x488ff8(_0x5e0385)),S(0x3,_0x488ff8(_0x1468ab))],b);var x=Object[_0x449fa0(0xf9)],ue=Object[_0x449fa0(0x101)],pe=(_0x125d1f,_0x1f073d,_0x31318f)=>_0x1f073d in _0x125d1f?x(_0x125d1f,_0x1f073d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31318f}):_0x125d1f[_0x1f073d]=_0x31318f,ve=(_0x5361fa,_0x2fd036,_0x5324b8,_0x2323aa)=>{const _0x490071=_0x449fa0;for(var _0x48d71b=_0x2323aa>0x1?void 0x0:_0x2323aa?ue(_0x2fd036,_0x5324b8):_0x2fd036,_0x1263e7=_0x5361fa[_0x490071(0x105)]-0x1,_0xc976e7;_0x1263e7>=0x0;_0x1263e7--)(_0xc976e7=_0x5361fa[_0x1263e7])&&(_0x48d71b=(_0x2323aa?_0xc976e7(_0x2fd036,_0x5324b8,_0x48d71b):_0xc976e7(_0x48d71b))||_0x48d71b);return _0x2323aa&&_0x48d71b&&x(_0x2fd036,_0x5324b8,_0x48d71b),_0x48d71b;},_e=(_0x572666,_0x1aa04e)=>(_0x7a2e1f,_0x53130d)=>_0x1aa04e(_0x7a2e1f,_0x53130d,_0x572666),Y=(_0x534061,_0x25fbf7,_0x340629)=>pe(_0x534061,typeof _0x25fbf7!='symbol'?_0x25fbf7+'':_0x25fbf7,_0x340629);let O=class extends _0x39b8a8{constructor(_0x199f0f,_0x5b772b){super(),this['_injector']=_0x5b772b;}[_0x449fa0(0xd2)](_0x1df1c4){const _0x225872=_0x449fa0;[[C],[D],[f],[b]][_0x225872(0xc7)](_0xbde1a6=>{const _0x2271a0=_0x225872;_0x1df1c4[_0x2271a0(0xbd)](_0xbde1a6);});}};Y(O,_0x449fa0(0x10b),V),Y(O,_0x449fa0(0xcd),_0x4c730c['UNIVER_UNKNOWN']),O=ve([_0x18ba29(_0x25e0f0,_0x507e21,_0x8b1ab2),_e(0x1,_0x488ff8(_0x1468ab))],O);export{O as UniverThreadCommentDataSourcePlugin};
1
+ const _0x57daae=_0x5e66;(function(_0x4f5e39,_0x42dbb6){const _0x93238a=_0x5e66,_0x5db486=_0x4f5e39();while(!![]){try{const _0x41bf0a=-parseInt(_0x93238a(0x152))/0x1*(-parseInt(_0x93238a(0x162))/0x2)+parseInt(_0x93238a(0x188))/0x3*(-parseInt(_0x93238a(0x174))/0x4)+-parseInt(_0x93238a(0x144))/0x5*(-parseInt(_0x93238a(0x13e))/0x6)+parseInt(_0x93238a(0x163))/0x7*(parseInt(_0x93238a(0x120))/0x8)+-parseInt(_0x93238a(0x177))/0x9+parseInt(_0x93238a(0x169))/0xa*(parseInt(_0x93238a(0x12f))/0xb)+parseInt(_0x93238a(0x189))/0xc*(-parseInt(_0x93238a(0x153))/0xd);if(_0x41bf0a===_0x42dbb6)break;else _0x5db486['push'](_0x5db486['shift']());}catch(_0x3f689){_0x5db486['push'](_0x5db486['shift']());}}}(_0x3651,0x840d5));import{UserManagerService as _0x144469,Inject as _0x48b871,Injector as _0x5bb0c9,CustomRangeType as _0x51828c,OnLifecycle as _0x51226a,LifecycleStages as _0x11d02a,Disposable as _0x37edbf,UniverInstanceType as _0x47e4f5,DependentOn as _0x188278,Plugin as _0x4ad81d,IConfigService as _0x13fea4}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x2f460a,ThreadCommentModel as _0xe49716,UniverThreadCommentPlugin as _0x500e98}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x1adcd6,UniverThreadCommentUIPlugin as _0x2867c8}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x273871,CommentService as _0x5726aa,UniverCollaborationClientPlugin as _0x2d92ac}from'@univerjs-pro/collaboration-client';import{HTTPService as _0xda76fa}from'@univerjs/network';import _0x5351a1 from'dayjs';import{bufferTime as _0x3b9b80}from'rxjs';const X=_0x57daae(0x124);var v=(_0x1b6924=>(_0x1b6924[_0x1b6924[_0x57daae(0x16a)]=0x0]='OpenOrReOpen',_0x1b6924[_0x1b6924[_0x57daae(0x155)]=0x1]=_0x57daae(0x155),_0x1b6924[_0x1b6924[_0x57daae(0x12a)]=-0x1]=_0x57daae(0x12a),_0x1b6924))(v||{}),p=(_0x402959=>(_0x402959[_0x402959[_0x57daae(0x14c)]=0x0]=_0x57daae(0x14c),_0x402959[_0x402959[_0x57daae(0x182)]=0x1]=_0x57daae(0x182),_0x402959[_0x402959[_0x57daae(0x15b)]=0x2]=_0x57daae(0x15b),_0x402959[_0x402959[_0x57daae(0x14b)]=0x3]=_0x57daae(0x14b),_0x402959[_0x402959['Delete']=0x4]='Delete',_0x402959[_0x402959[_0x57daae(0x15a)]=0x5]=_0x57daae(0x15a),_0x402959[_0x402959[_0x57daae(0x12a)]=-0x1]=_0x57daae(0x12a),_0x402959))(p||{});const w=_0x34d2a2=>_0x5351a1(new Date(+_0x34d2a2))[_0x57daae(0x175)](_0x57daae(0x136)),k=async(_0xda2644,_0x134207)=>{const _0x4e4fb9=_0x57daae,_0x5aa99c=_0xda2644[_0x4e4fb9(0x157)](_0x144469),_0x3989b2=_0xda2644[_0x4e4fb9(0x157)](_0xda76fa);_0x134207['forEach'](_0x16c553=>{const _0x440a5f=_0x4e4fb9;_0x5aa99c[_0x440a5f(0x151)](_0x16c553)&&_0x134207[_0x440a5f(0x13d)](_0x16c553);}),_0x134207[_0x4e4fb9(0x126)]&&(await _0x3989b2[_0x4e4fb9(0x157)](_0x4e4fb9(0x170),{'params':{'userIDs':[..._0x134207]}}))[_0x4e4fb9(0x14e)][_0x4e4fb9(0x167)][_0x4e4fb9(0x171)](_0x11f894=>{const _0x484193=_0x4e4fb9;_0x11f894&&_0x5aa99c[_0x484193(0x11f)](_0x11f894);});};var ee=Object[_0x57daae(0x18a)],re=Object[_0x57daae(0x148)],te=(_0x3a82ed,_0x1a4336,_0x323126,_0x29f1e4)=>{const _0x49d476=_0x57daae;for(var _0x158d1a=_0x29f1e4>0x1?void 0x0:_0x29f1e4?re(_0x1a4336,_0x323126):_0x1a4336,_0x4b0e19=_0x3a82ed[_0x49d476(0x154)]-0x1,_0x547e1e;_0x4b0e19>=0x0;_0x4b0e19--)(_0x547e1e=_0x3a82ed[_0x4b0e19])&&(_0x158d1a=(_0x29f1e4?_0x547e1e(_0x1a4336,_0x323126,_0x158d1a):_0x547e1e(_0x158d1a))||_0x158d1a);return _0x29f1e4&&_0x158d1a&&ee(_0x1a4336,_0x323126,_0x158d1a),_0x158d1a;},_=(_0x21acda,_0x34e35b)=>(_0x346092,_0x5196ba)=>_0x34e35b(_0x346092,_0x5196ba,_0x21acda);function se(_0x4b2747,_0x131dff){const _0x1dd221=_0x57daae,_0x296b8a=_0x4b2747[_0x1dd221(0x12e)][0x0];return{..._0x131dff,'id':_0x296b8a[_0x1dd221(0x186)],'resolved':_0x4b2747[_0x1dd221(0x172)]===0x1,'dT':w(_0x296b8a['createTimestamp']),'personId':_0x296b8a['userId'],'threadId':_0x296b8a[_0x1dd221(0x164)]};}function oe(_0x5d7cc3,_0x2738c1,_0x4967d9){const _0x329299=_0x57daae;var _0xbad04b,_0x18bd05;if(((_0x18bd05=(_0xbad04b=_0x5d7cc3==null?void 0x0:_0x5d7cc3[_0x329299(0x12e)])==null?void 0x0:_0xbad04b['length'])!=null?_0x18bd05:0x0)>0x0){const _0x3e4942=(_0xf5b4bf,_0x3fcf00)=>({'id':_0xf5b4bf[_0x329299(0x186)],'threadId':_0xf5b4bf[_0x329299(0x164)],'dT':w(_0xf5b4bf['createTimestamp']),'personId':_0xf5b4bf[_0x329299(0x15e)],'resolved':_0x5d7cc3[_0x329299(0x172)]===v[_0x329299(0x155)],'unitId':_0x2738c1,'subUnitId':_0x4967d9,'text':JSON[_0x329299(0x150)](_0xf5b4bf[_0x329299(0x137)]),'parentId':_0x3fcf00}),_0x377a5f=_0x3e4942(_0x5d7cc3[_0x329299(0x12e)][0x0]);return{..._0x377a5f,'children':_0x5d7cc3[_0x329299(0x12e)]['slice'](0x1)['map'](_0xe7bd51=>_0x3e4942(_0xe7bd51,_0x377a5f['id']))};}return null;}let D=class{constructor(_0x5ae976,_0x3daaa6,_0x541823,_0x1112e5){const _0x54cb83=_0x57daae;this[_0x54cb83(0x13f)]=_0x5ae976,this[_0x54cb83(0x12d)]=_0x3daaa6,this[_0x54cb83(0x17a)]=_0x541823,this[_0x54cb83(0x143)]=_0x1112e5;}async[_0x57daae(0x149)](_0x2cf591){const _0x2cc369=_0x57daae;var _0x3224bd,_0x1cddd6;const {parentId:_0x38aed0,unitId:_0x814b66,text:_0x2cc43b,threadId:_0x547260}=_0x2cf591,_0x5b86f8=(_0x1cddd6=(_0x3224bd=_0x2cc43b[_0x2cc369(0x139)])==null?void 0x0:_0x3224bd[_0x2cc369(0x140)](_0x4cebfc=>_0x4cebfc[_0x2cc369(0x16f)]===_0x51828c['COMMENT'])['map'](_0x5cd4b4=>_0x5cd4b4[_0x2cc369(0x17e)]))!=null?_0x1cddd6:[],_0x363783=JSON['stringify'](_0x2cc43b),_0x490087=(await this[_0x2cc369(0x17a)][_0x2cc369(0x127)](_0x814b66))[_0x2cc369(0x11d)]();if(_0x38aed0){const _0x57dd13={'memberId':_0x490087,'unitId':_0x814b66,'content':_0x363783,'mention':_0x5b86f8,'threadId':_0x547260},_0x1e1faf=(await this[_0x2cc369(0x13f)][_0x2cc369(0x12c)](_0x2cc369(0x145)+_0x814b66+_0x2cc369(0x16e),{'body':_0x57dd13}))[_0x2cc369(0x14e)][_0x2cc369(0x18e)];return{..._0x2cf591,'id':_0x1e1faf[_0x2cc369(0x186)],'dT':_0x5351a1(+_0x1e1faf['createTimestamp'])[_0x2cc369(0x175)](_0x2cc369(0x136)),'personId':_0x1e1faf[_0x2cc369(0x15e)]};}else{const _0x260621={'memberId':_0x490087,'unitId':_0x814b66,'content':_0x363783,'mention':_0x5b86f8},_0x2639e8=await this[_0x2cc369(0x13f)]['post'](_0x2cc369(0x145)+_0x814b66+_0x2cc369(0x17c),{'body':_0x260621});return se(_0x2639e8[_0x2cc369(0x14e)][_0x2cc369(0x166)],_0x2cf591);}}async[_0x57daae(0x12b)](_0x230fe8){const _0x58a85d=_0x57daae;var _0x421443,_0x2b79e6;const {text:_0x4c9f07,unitId:_0x3f023b}=_0x230fe8,_0x2a1995=(_0x2b79e6=(_0x421443=_0x4c9f07[_0x58a85d(0x139)])==null?void 0x0:_0x421443['filter'](_0x235206=>_0x235206['rangeType']===_0x51828c[_0x58a85d(0x187)])[_0x58a85d(0x11e)](_0x2d2a87=>_0x2d2a87[_0x58a85d(0x17e)]))!=null?_0x2b79e6:[],_0x41c92d=JSON['stringify'](_0x4c9f07),_0x3ad964=_0x230fe8[_0x58a85d(0x164)],_0x104126=_0x230fe8['id'],_0x188ca0={'memberId':(await this['_sessionService']['requireSession'](_0x3f023b))['getMemberID'](),'unitId':_0x3f023b,'threadId':_0x3ad964,'mention':_0x2a1995,'content':_0x41c92d,'replyId':_0x104126},_0x17ab08=await this[_0x58a85d(0x13f)]['post'](_0x58a85d(0x145)+_0x3f023b+_0x58a85d(0x11c),{'body':_0x188ca0});return!_0x17ab08[_0x58a85d(0x14e)][_0x58a85d(0x181)]||_0x17ab08[_0x58a85d(0x14e)]['error'][_0x58a85d(0x14a)]===0x1;}async['resolveComment'](_0x21922a){const _0x2e9ab2=_0x57daae,{unitId:_0x55e4af}=_0x21922a,_0x2d160b=_0x21922a[_0x2e9ab2(0x164)],_0x4c543a={'memberId':this[_0x2e9ab2(0x12d)][_0x2e9ab2(0x158)]()['userID'],'unitId':_0x55e4af,'threadId':_0x2d160b,'solved':_0x21922a[_0x2e9ab2(0x13a)]?v[_0x2e9ab2(0x155)]:v['OpenOrReOpen']},_0x51d300=await this[_0x2e9ab2(0x13f)]['post']('/universer-api/comment/unit/'+_0x55e4af+'/solved',{'body':_0x4c543a});return!_0x51d300[_0x2e9ab2(0x14e)][_0x2e9ab2(0x181)]||_0x51d300[_0x2e9ab2(0x14e)]['error']['code']===0x1;}async[_0x57daae(0x176)](_0x2cb512,_0x2f3823,_0x477857,_0x379c1c){const _0x253f61=_0x57daae,_0x1f0350={'memberId':(await this['_sessionService']['requireSession'](_0x2cb512))[_0x253f61(0x11d)](),'threadId':_0x477857,'replyId':_0x379c1c,'unitId':_0x2cb512},_0x55f460=await this[_0x253f61(0x13f)]['post']('/universer-api/comment/unit/'+_0x2cb512+_0x253f61(0x180),{'body':_0x1f0350});return!_0x55f460[_0x253f61(0x14e)]['error']||_0x55f460[_0x253f61(0x14e)][_0x253f61(0x181)][_0x253f61(0x14a)]===0x1;}async['listComments'](_0x3386a2,_0x3a0c9c,_0x5130c2){const _0x30bc9d=_0x57daae,_0x5f169d={'unitId':_0x3386a2,'threadId':_0x5130c2},_0x4e1687=await this[_0x30bc9d(0x13f)]['post'](_0x30bc9d(0x145)+_0x3386a2+_0x30bc9d(0x13c),{'body':_0x5f169d}),_0x169ecb=_0x5130c2[_0x30bc9d(0x11e)](_0x38d7d1=>oe(_0x4e1687[_0x30bc9d(0x14e)][_0x30bc9d(0x135)][_0x38d7d1],_0x3386a2,_0x3a0c9c))['filter'](Boolean);return Object[_0x30bc9d(0x17b)](_0x4e1687[_0x30bc9d(0x14e)][_0x30bc9d(0x167)])[_0x30bc9d(0x171)](_0x553b09=>{const _0x5bdd34=_0x30bc9d;this[_0x5bdd34(0x12d)][_0x5bdd34(0x11f)](_0x553b09);}),_0x169ecb;}[_0x57daae(0x123)](_0x37839e){const _0x2cc4ca=_0x57daae;return{'id':_0x37839e['id'],'threadId':_0x37839e[_0x2cc4ca(0x164)],'ref':_0x37839e[_0x2cc4ca(0x168)]};}};D=te([_(0x0,_0x48b871(_0xda76fa)),_(0x1,_0x48b871(_0x144469)),_(0x2,_0x48b871(_0x273871)),_(0x3,_0x48b871(_0x5bb0c9))],D);function _0x5e66(_0x1579a6,_0x3e1ca7){const _0x365181=_0x3651();return _0x5e66=function(_0x5e6673,_0x2e36bc){_0x5e6673=_0x5e6673-0x11b;let _0x49e7fa=_0x365181[_0x5e6673];return _0x49e7fa;},_0x5e66(_0x1579a6,_0x3e1ca7);}var ne=Object[_0x57daae(0x18a)],ie=Object[_0x57daae(0x148)],ae=(_0x4ba5a4,_0x269fac,_0xb8fe56,_0x17841f)=>{const _0x4a3258=_0x57daae;for(var _0x4045ab=_0x17841f>0x1?void 0x0:_0x17841f?ie(_0x269fac,_0xb8fe56):_0x269fac,_0x808105=_0x4ba5a4[_0x4a3258(0x154)]-0x1,_0x50b1b2;_0x808105>=0x0;_0x808105--)(_0x50b1b2=_0x4ba5a4[_0x808105])&&(_0x4045ab=(_0x17841f?_0x50b1b2(_0x269fac,_0xb8fe56,_0x4045ab):_0x50b1b2(_0x4045ab))||_0x4045ab);return _0x17841f&&_0x4045ab&&ne(_0x269fac,_0xb8fe56,_0x4045ab),_0x4045ab;},ce=(_0x32073c,_0x32e8dd)=>(_0x50efcc,_0x230083)=>_0x32e8dd(_0x50efcc,_0x230083,_0x32073c);let C=class{constructor(_0x2acfe8){this['_httpService']=_0x2acfe8;}async[_0x57daae(0x138)](_0x1e4b2e,_0x10e5ba,_0x20c308){const _0x1d2d35=_0x57daae,_0x4abed3=new URL(window[_0x1d2d35(0x14f)][_0x1d2d35(0x161)])['searchParams'][_0x1d2d35(0x157)](_0x1d2d35(0x156));if(!_0x4abed3)return[];const _0x4a2c14=window[_0x1d2d35(0x14f)][_0x1d2d35(0x125)],_0x595079=window['location'][_0x1d2d35(0x18d)]==='https:'?'https':_0x1d2d35(0x165);return(await this['_httpService'][_0x1d2d35(0x157)](_0x595079+'://'+_0x4a2c14+'/universer-api/authz/collaborator',{'params':{'objectID':_0x4abed3,'unitID':_0x4abed3}}))[_0x1d2d35(0x14e)]['collaborators'][_0x1d2d35(0x11e)](_0x412968=>{const _0x2504e1=_0x1d2d35;var _0x4dc623,_0x4eef6f,_0x415884,_0x5a546c,_0x30f157,_0xc89b98;return{'id':(_0x4eef6f=(_0x4dc623=_0x412968[_0x2504e1(0x134)])==null?void 0x0:_0x4dc623[_0x2504e1(0x133)])!=null?_0x4eef6f:'','label':(_0x5a546c=(_0x415884=_0x412968[_0x2504e1(0x134)])==null?void 0x0:_0x415884[_0x2504e1(0x146)])!=null?_0x5a546c:'','icon':(_0xc89b98=(_0x30f157=_0x412968[_0x2504e1(0x134)])==null?void 0x0:_0x30f157[_0x2504e1(0x159)])!=null?_0xc89b98:'','type':_0x2504e1(0x18b)};});}};C=ae([ce(0x0,_0x48b871(_0xda76fa))],C);var de=Object[_0x57daae(0x18a)],me=Object[_0x57daae(0x148)],le=(_0x38b808,_0x3b71fc,_0xdc3f33,_0x239502)=>{for(var _0x3de3ae=_0x239502>0x1?void 0x0:_0x239502?me(_0x3b71fc,_0xdc3f33):_0x3b71fc,_0x55e455=_0x38b808['length']-0x1,_0x1d3f10;_0x55e455>=0x0;_0x55e455--)(_0x1d3f10=_0x38b808[_0x55e455])&&(_0x3de3ae=(_0x239502?_0x1d3f10(_0x3b71fc,_0xdc3f33,_0x3de3ae):_0x1d3f10(_0x3de3ae))||_0x3de3ae);return _0x239502&&_0x3de3ae&&de(_0x3b71fc,_0xdc3f33,_0x3de3ae),_0x3de3ae;},f=(_0x14ba9e,_0x1eae69)=>(_0x2b20fa,_0x1d0d82)=>_0x1eae69(_0x2b20fa,_0x1d0d82,_0x14ba9e);let S=class extends _0x37edbf{constructor(_0x2ee944,_0x49fecb,_0x4e1000,_0x3d53d4){const _0x1d2403=_0x57daae;super(),this[_0x1d2403(0x16c)]=_0x2ee944,this[_0x1d2403(0x15d)]=_0x49fecb,this['_threadCommentMentionDataService']=_0x4e1000,this[_0x1d2403(0x160)]=_0x3d53d4,this[_0x1d2403(0x16b)]();}[_0x57daae(0x16b)](){const _0x4ba05b=_0x57daae;this['_threadCommentDataSourceService'][_0x4ba05b(0x15c)]=this[_0x4ba05b(0x15d)],this['_threadCommentDataSourceService'][_0x4ba05b(0x130)]=!0x1,this[_0x4ba05b(0x17d)][_0x4ba05b(0x15c)]=this['_threadCommentMentionDataSource'];}};S=le([_0x51226a(_0x11d02a['Starting'],S),f(0x0,_0x2f460a),f(0x1,_0x48b871(D)),f(0x2,_0x1adcd6),f(0x3,_0x48b871(C))],S);var he=Object[_0x57daae(0x18a)],ue=Object[_0x57daae(0x148)],pe=(_0xc7551,_0x4ea1e5,_0xa55741,_0x5e2dda)=>{const _0x497a89=_0x57daae;for(var _0x239e17=_0x5e2dda>0x1?void 0x0:_0x5e2dda?ue(_0x4ea1e5,_0xa55741):_0x4ea1e5,_0xe74f65=_0xc7551[_0x497a89(0x154)]-0x1,_0x824189;_0xe74f65>=0x0;_0xe74f65--)(_0x824189=_0xc7551[_0xe74f65])&&(_0x239e17=(_0x5e2dda?_0x824189(_0x4ea1e5,_0xa55741,_0x239e17):_0x824189(_0x239e17))||_0x239e17);return _0x5e2dda&&_0x239e17&&he(_0x4ea1e5,_0xa55741,_0x239e17),_0x239e17;},I=(_0x51e988,_0x5f24ac)=>(_0x60932c,_0x50e884)=>_0x5f24ac(_0x60932c,_0x50e884,_0x51e988);let b=class extends _0x37edbf{constructor(_0x1f61cc,_0x5c7786,_0x223401,_0x4710e8){const _0xca6b9c=_0x57daae;super(),this['_commentService']=_0x1f61cc,this[_0xca6b9c(0x179)]=_0x5c7786,this['_userService']=_0x223401,this[_0xca6b9c(0x143)]=_0x4710e8,this[_0xca6b9c(0x183)](),this[_0xca6b9c(0x15f)]();}[_0x57daae(0x15f)](){const _0x18c1dc=_0x57daae;this[_0x18c1dc(0x128)](this[_0x18c1dc(0x179)][_0x18c1dc(0x122)][_0x18c1dc(0x131)](_0x3b9b80(0x10))[_0x18c1dc(0x178)](_0x45c274=>{const _0x4987ac=_0x18c1dc,_0x77c438=new Set();_0x45c274[_0x4987ac(0x171)](_0x1c6efd=>{const _0x47e2ac=_0x4987ac;switch(_0x1c6efd[_0x47e2ac(0x173)]){case _0x47e2ac(0x185):{const _0x807625=_0x1c6efd['payload'][_0x47e2ac(0x17f)];_0x77c438[_0x47e2ac(0x185)](_0x807625);break;}}}),k(this[_0x4987ac(0x143)],_0x77c438);}));}[_0x57daae(0x183)](){const _0x4d0097=_0x57daae;this['disposeWithMe'](this[_0x4d0097(0x142)][_0x4d0097(0x122)][_0x4d0097(0x178)](async _0x275e17=>{const _0x1f236b=_0x4d0097;var _0x59e0a0,_0x153c05;const _0x78932a=this[_0x1f236b(0x179)][_0x1f236b(0x13b)](_0x275e17[_0x1f236b(0x129)],_0x275e17[_0x1f236b(0x164)]);if(!_0x78932a)return;const {unitId:_0x18f174,subUnitId:_0x5c478b}=_0x78932a;switch(_0x275e17['user']&&this['_userService']['addUser'](_0x275e17[_0x1f236b(0x18b)]),_0x275e17[_0x1f236b(0x173)]){case p[_0x1f236b(0x182)]:break;case p['Reply']:{this[_0x1f236b(0x179)][_0x1f236b(0x149)](_0x18f174,_0x5c478b,{'unitId':_0x18f174,'subUnitId':_0x5c478b,'ref':'','id':_0x275e17[_0x1f236b(0x186)],'dT':w(+_0x275e17[_0x1f236b(0x18c)]),'threadId':_0x275e17[_0x1f236b(0x164)],'personId':(_0x153c05=(_0x59e0a0=_0x275e17[_0x1f236b(0x18b)])==null?void 0x0:_0x59e0a0[_0x1f236b(0x133)])!=null?_0x153c05:_0x275e17[_0x1f236b(0x15e)],'text':JSON[_0x1f236b(0x150)](_0x275e17[_0x1f236b(0x137)]),'parentId':_0x78932a['id']});break;}case p['Delete']:{const _0xea9d35=this[_0x1f236b(0x179)][_0x1f236b(0x11b)](_0x18f174,_0x5c478b,_0x275e17['replyId']);_0xea9d35&&_0xea9d35[_0x1f236b(0x147)]&&this['_threadCommentModel'][_0x1f236b(0x176)](_0x18f174,_0x5c478b,_0x275e17[_0x1f236b(0x186)]);break;}case p['Edit']:{this['_threadCommentModel'][_0x1f236b(0x12b)](_0x18f174,_0x5c478b,{'commentId':_0x275e17[_0x1f236b(0x186)],'text':JSON[_0x1f236b(0x150)](_0x275e17[_0x1f236b(0x137)])});break;}case p[_0x1f236b(0x15a)]:{const _0x51bdd5=this[_0x1f236b(0x179)][_0x1f236b(0x13b)](_0x18f174,_0x275e17[_0x1f236b(0x164)]);_0x51bdd5&&this[_0x1f236b(0x179)][_0x1f236b(0x16d)](_0x18f174,_0x5c478b,_0x51bdd5['id'],_0x275e17['solved']===v['Solved']);break;}}}));}};b=pe([_0x51226a(_0x11d02a[_0x57daae(0x184)],b),I(0x0,_0x48b871(_0x5726aa)),I(0x1,_0x48b871(_0xe49716)),I(0x2,_0x48b871(_0x144469)),I(0x3,_0x48b871(_0x5bb0c9))],b);const ve='thread-comment-data-source.config',_e={};var Y=Object[_0x57daae(0x18a)],fe=Object[_0x57daae(0x148)],Ie=(_0x191cbc,_0x5bb1b7,_0x32a02f)=>_0x5bb1b7 in _0x191cbc?Y(_0x191cbc,_0x5bb1b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x32a02f}):_0x191cbc[_0x5bb1b7]=_0x32a02f,Se=(_0x4fb411,_0x53082c,_0x32a239,_0x107c10)=>{const _0x512030=_0x57daae;for(var _0x238611=_0x107c10>0x1?void 0x0:_0x107c10?fe(_0x53082c,_0x32a239):_0x53082c,_0x3b3dfb=_0x4fb411[_0x512030(0x154)]-0x1,_0x4df032;_0x3b3dfb>=0x0;_0x3b3dfb--)(_0x4df032=_0x4fb411[_0x3b3dfb])&&(_0x238611=(_0x107c10?_0x4df032(_0x53082c,_0x32a239,_0x238611):_0x4df032(_0x238611))||_0x238611);return _0x107c10&&_0x238611&&Y(_0x53082c,_0x32a239,_0x238611),_0x238611;},j=(_0x33540f,_0x75ad13)=>(_0xc61f77,_0x18600c)=>_0x75ad13(_0xc61f77,_0x18600c,_0x33540f),G=(_0x5d27f2,_0x43e539,_0x27be54)=>Ie(_0x5d27f2,typeof _0x43e539!='symbol'?_0x43e539+'':_0x43e539,_0x27be54);let O=class extends _0x4ad81d{constructor(_0x387449=_e,_0x4caed9,_0x39b338){const _0x22f84a=_0x57daae;super(),this[_0x22f84a(0x121)]=_0x387449,this['_injector']=_0x4caed9,this['_configService']=_0x39b338;const {..._0x6f6781}=this['_config'];this[_0x22f84a(0x141)][_0x22f84a(0x14d)](ve,_0x6f6781);}['onStarting'](){const _0x3d9d41=_0x57daae;[[C],[D],[S],[b]][_0x3d9d41(0x171)](_0x1a844b=>{const _0x4ef853=_0x3d9d41;this['_injector'][_0x4ef853(0x185)](_0x1a844b);});}};G(O,'pluginName',X),G(O,'type',_0x47e4f5[_0x57daae(0x132)]),O=Se([_0x188278(_0x500e98,_0x2867c8,_0x2d92ac),j(0x1,_0x48b871(_0x5bb0c9)),j(0x2,_0x13fea4)],O);export{O as UniverThreadCommentDataSourcePlugin};function _0x3651(){const _0xc8bc0b=['userID','subject','comments','YYYY/MM/DD\x20HH:mm','content','getMentions','customRanges','resolved','getThread','/list','delete','6bQWZHF','_httpService','filter','_configService','_commentService','_injector','177545mPKQrM','/universer-api/comment/unit/','name','parentId','getOwnPropertyDescriptor','addComment','code','Edit','Unknown','setConfig','body','location','parse','getUser','21gqAWEC','70265rkrIEO','length','Solved','unit','get','getCurrentUser','avatar','Solve','Reply','dataSource','_threadCommentDataSource','userId','_initUserSync','_threadCommentMentionDataSource','href','88702gscnqA','42KYFjQN','threadId','http','comment','users','ref','3829710padcIf','OpenOrReOpen','_initDataSource','_threadCommentDataSourceService','resolveComment','/reply','rangeType','/universer-api/user/list','forEach','solved','type','948076QySzms','format','deleteComment','4185549Xgwrsa','subscribe','_threadCommentModel','_sessionService','values','/add','_threadCommentMentionDataService','rangeId','personId','/delete','error','Add','_init','Ready','add','replyId','COMMENT','6pOWHNE','1752qWIFki','defineProperty','user','createTimestamp','protocol','reply','getComment','/edit','getMemberID','map','addUser','715056fnhiJL','_config','commentUpdate$','saveCommentToSnapshot','THREAD_COMMENT_DATA_SOURCE_PLUGIN','host','size','requireSession','disposeWithMe','unitId','UNRECOGNIZED','updateComment','post','_userService','replies','22LrDtcK','syncUpdateMutationToColla','pipe','UNIVER_UNKNOWN'];_0x3651=function(){return _0xc8bc0b;};return _0x3651();}
@@ -0,0 +1,5 @@
1
+ export declare const PLUGIN_CONFIG_KEY = "thread-comment-data-source.config";
2
+ export declare const configSymbol: unique symbol;
3
+ export interface IUniverThreadCommentDataSourceConfig {
4
+ }
5
+ export declare const defaultPluginConfig: IUniverThreadCommentDataSourceConfig;
@@ -1,8 +1,11 @@
1
- import { Injector, Plugin, UniverInstanceType } from '@univerjs/core';
1
+ import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
2
+ import { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
2
3
  export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
4
+ private readonly _config;
3
5
  protected _injector: Injector;
6
+ private readonly _configService;
4
7
  static pluginName: string;
5
8
  static type: UniverInstanceType;
6
- constructor(config: unknown, _injector: Injector);
7
- onStarting(injector: Injector): void;
9
+ constructor(_config: IUniverThreadCommentDataSourceConfig, _injector: Injector, _configService: IConfigService);
10
+ onStarting(): void;
8
11
  }
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x27ea(){const _0x3ee896=['getCurrentUser','CommentService','pluginName','16429bpzlhE','10kWHNsU','searchParams','toStringTag','5016969zebjPf','Module','body','@univerjs/core','exports','UniverThreadCommentUi','HTTPService','Edit','format','1312998bgdqnI','getThread','comments','resolveComment','users','syncUpdateMutationToColla','stringify','rangeId','/universer-api/comment/unit/','Disposable','threadId','Reply','personId','_threadCommentModel','UserManagerService','_commentService','2960555QjdfAz','parentId','UNRECOGNIZED','IThreadCommentMentionDataService','3761296SCzWRX','getMemberID','UniverThreadCommentDatasource','comment','https:','delete','OnLifecycle','UniverThreadCommentUIPlugin','/reply','replies','rxjs','location','solved','avatar','42UfZBWw','/list','Delete','listComments','_httpService','@univerjs-pro/collaboration-client','unitId','/universer-api/user/list','_threadCommentDataSource','type','length','12guFeVm','LifecycleStages','defineProperty','userID','323188LzVnTg','user','Add','addUser','slice','UniverCollaborationClient','YYYY/MM/DD\x20HH:mm','UniverThreadCommentPlugin','@univerjs/network','error','DependentOn','collaborators','resolved','799085nvnZEo','COMMENT','@univerjs/thread-comment','parse','get','/solved','Plugin','name','UniverThreadCommentDataSourcePlugin','_sessionService','disposeWithMe','pipe','Injector','://','bufferTime','_threadCommentMentionDataService','CollaborationSessionService','@univerjs/thread-comment-ui','Unknown','_init','filter','Starting','function','createTimestamp','THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','UniverInstanceType','_initDataSource','UniverCollaborationClientPlugin','commentUpdate$','dayjs','ThreadCommentModel','map','post','userId','updateComment','customRanges','add','content','CustomRangeType','_injector','unit','Inject','getMentions','host','_userService','OpenOrReOpen','Solved','Ready','symbol','https','amd','object','addComment','deleteComment','_threadCommentMentionDataSource','getUser','replyId','_threadCommentDataSourceService','http','dataSource','UNIVER_UNKNOWN','href','payload','subject','code','forEach','/edit','getOwnPropertyDescriptor'];_0x27ea=function(){return _0x3ee896;};return _0x27ea();}function _0x5df9(_0x6b9a3e,_0x37c6fb){const _0x27eaf7=_0x27ea();return _0x5df9=function(_0x5df912,_0x360992){_0x5df912=_0x5df912-0x174;let _0x160cca=_0x27eaf7[_0x5df912];return _0x160cca;},_0x5df9(_0x6b9a3e,_0x37c6fb);}(function(_0x27b4c6,_0x311dca){const _0x3a4de4=_0x5df9,_0x4ec385=_0x27b4c6();while(!![]){try{const _0x4d0b38=parseInt(_0x3a4de4(0x188))/0x1+-parseInt(_0x3a4de4(0x1dd))/0x2+parseInt(_0x3a4de4(0x177))/0x3*(-parseInt(_0x3a4de4(0x17b))/0x4)+parseInt(_0x3a4de4(0x1ed))/0x5+-parseInt(_0x3a4de4(0x1ff))/0x6*(parseInt(_0x3a4de4(0x1d0))/0x7)+-parseInt(_0x3a4de4(0x1f1))/0x8+parseInt(_0x3a4de4(0x1d4))/0x9*(parseInt(_0x3a4de4(0x1d1))/0xa);if(_0x4d0b38===_0x311dca)break;else _0x4ec385['push'](_0x4ec385['shift']());}catch(_0x4cb575){_0x4ec385['push'](_0x4ec385['shift']());}}}(_0x27ea,0x75c37),function(_0x287b01,_0x1c67d4){const _0x5f4286=_0x5df9;typeof exports==_0x5f4286(0x1bc)&&typeof module<'u'?_0x1c67d4(exports,require(_0x5f4286(0x1d7)),require('@univerjs/thread-comment'),require(_0x5f4286(0x199)),require(_0x5f4286(0x204)),require('@univerjs/network'),require(_0x5f4286(0x1a6)),require(_0x5f4286(0x1fb))):typeof define==_0x5f4286(0x19e)&&define[_0x5f4286(0x1bb)]?define([_0x5f4286(0x1d8),_0x5f4286(0x1d7),_0x5f4286(0x18a),_0x5f4286(0x199),'@univerjs-pro/collaboration-client',_0x5f4286(0x183),'dayjs',_0x5f4286(0x1fb)],_0x1c67d4):(_0x287b01=typeof globalThis<'u'?globalThis:_0x287b01||self,_0x1c67d4(_0x287b01[_0x5f4286(0x1f3)]={},_0x287b01['UniverCore'],_0x287b01['UniverThreadComment'],_0x287b01[_0x5f4286(0x1d9)],_0x287b01[_0x5f4286(0x180)],_0x287b01['UniverNetwork'],_0x287b01[_0x5f4286(0x1a6)],_0x287b01[_0x5f4286(0x1fb)]));}(this,function(_0x1f34a,_0x3bbb87,_0xc9c7df,_0x1fafcf,_0x2bde6d,_0xd5d448,_0x1448cd,_0x1e4b4b){'use strict';const _0x35cf93=_0x5df9;const _0x17869c=_0x35cf93(0x1a0);var _0x204c77=(_0x1d77a8=>(_0x1d77a8[_0x1d77a8[_0x35cf93(0x1b6)]=0x0]='OpenOrReOpen',_0x1d77a8[_0x1d77a8[_0x35cf93(0x1b7)]=0x1]=_0x35cf93(0x1b7),_0x1d77a8[_0x1d77a8[_0x35cf93(0x1ef)]=-0x1]=_0x35cf93(0x1ef),_0x1d77a8))(_0x204c77||{}),_0x5cd0cb=(_0x2c1634=>(_0x2c1634[_0x2c1634[_0x35cf93(0x19a)]=0x0]=_0x35cf93(0x19a),_0x2c1634[_0x2c1634[_0x35cf93(0x17d)]=0x1]=_0x35cf93(0x17d),_0x2c1634[_0x2c1634[_0x35cf93(0x1e8)]=0x2]=_0x35cf93(0x1e8),_0x2c1634[_0x2c1634[_0x35cf93(0x1db)]=0x3]=_0x35cf93(0x1db),_0x2c1634[_0x2c1634[_0x35cf93(0x201)]=0x4]=_0x35cf93(0x201),_0x2c1634[_0x2c1634['Solve']=0x5]='Solve',_0x2c1634[_0x2c1634[_0x35cf93(0x1ef)]=-0x1]=_0x35cf93(0x1ef),_0x2c1634))(_0x5cd0cb||{});const _0x210087=_0x1d486d=>_0x1448cd(new Date(+_0x1d486d))[_0x35cf93(0x1dc)](_0x35cf93(0x181)),_0x34520b=async(_0xce024f,_0x1cc680)=>{const _0x248a93=_0x35cf93,_0x29b3b3=_0xce024f[_0x248a93(0x18c)](_0x3bbb87[_0x248a93(0x1eb)]),_0x37c769=_0xce024f[_0x248a93(0x18c)](_0xd5d448[_0x248a93(0x1da)]);_0x1cc680['forEach'](_0x3a102e=>{const _0x383532=_0x248a93;_0x29b3b3[_0x383532(0x1c0)](_0x3a102e)&&_0x1cc680[_0x383532(0x1f6)](_0x3a102e);}),_0x1cc680['size']&&(await _0x37c769['get'](_0x248a93(0x206),{'params':{'userIDs':[..._0x1cc680]}}))[_0x248a93(0x1d6)][_0x248a93(0x1e1)][_0x248a93(0x1ca)](_0x1f0dbe=>{const _0x1e67c2=_0x248a93;_0x1f0dbe&&_0x29b3b3[_0x1e67c2(0x17e)](_0x1f0dbe);});};var _0x255cec=Object['defineProperty'],_0x51b0c1=Object[_0x35cf93(0x1cc)],_0x1b2bb8=(_0x2a4236,_0x122127,_0x559ee1,_0x326128)=>{const _0x10b321=_0x35cf93;for(var _0x57dc1a=_0x326128>0x1?void 0x0:_0x326128?_0x51b0c1(_0x122127,_0x559ee1):_0x122127,_0x426b8c=_0x2a4236[_0x10b321(0x176)]-0x1,_0x486a50;_0x426b8c>=0x0;_0x426b8c--)(_0x486a50=_0x2a4236[_0x426b8c])&&(_0x57dc1a=(_0x326128?_0x486a50(_0x122127,_0x559ee1,_0x57dc1a):_0x486a50(_0x57dc1a))||_0x57dc1a);return _0x326128&&_0x57dc1a&&_0x255cec(_0x122127,_0x559ee1,_0x57dc1a),_0x57dc1a;},_0xc81802=(_0x5919d5,_0x2189bc)=>(_0x3a9d0c,_0x63f918)=>_0x2189bc(_0x3a9d0c,_0x63f918,_0x5919d5);function _0x286314(_0x1a3f76,_0x5bcd4e){const _0x36e956=_0x35cf93,_0x47dd25=_0x1a3f76[_0x36e956(0x1fa)][0x0];return{..._0x5bcd4e,'id':_0x47dd25[_0x36e956(0x1c1)],'resolved':_0x1a3f76['solved']===0x1,'dT':_0x210087(_0x47dd25[_0x36e956(0x19f)]),'personId':_0x47dd25['userId'],'threadId':_0x47dd25[_0x36e956(0x1e7)]};}function _0x557f8c(_0x1759a2,_0x58da73,_0x2515ae){const _0x152efb=_0x35cf93;var _0xfa59ce,_0x2fd975;if(((_0x2fd975=(_0xfa59ce=_0x1759a2==null?void 0x0:_0x1759a2['replies'])==null?void 0x0:_0xfa59ce['length'])!=null?_0x2fd975:0x0)>0x0){const _0x5a2d79=(_0x120117,_0x5bb5c7)=>({'id':_0x120117[_0x152efb(0x1c1)],'threadId':_0x120117[_0x152efb(0x1e7)],'dT':_0x210087(_0x120117[_0x152efb(0x19f)]),'personId':_0x120117[_0x152efb(0x1aa)],'resolved':_0x1759a2[_0x152efb(0x1fd)]===_0x204c77[_0x152efb(0x1b7)],'unitId':_0x58da73,'subUnitId':_0x2515ae,'text':JSON[_0x152efb(0x18b)](_0x120117[_0x152efb(0x1ae)]),'parentId':_0x5bb5c7}),_0x25a4c1=_0x5a2d79(_0x1759a2['replies'][0x0]);return{..._0x25a4c1,'children':_0x1759a2[_0x152efb(0x1fa)][_0x152efb(0x17f)](0x1)[_0x152efb(0x1a8)](_0x4092de=>_0x5a2d79(_0x4092de,_0x25a4c1['id']))};}return null;}let _0x1b9a23=class{constructor(_0xeac1dc,_0x36f5c3,_0x2d4aa6,_0x3ee0da){const _0x54d619=_0x35cf93;this[_0x54d619(0x203)]=_0xeac1dc,this[_0x54d619(0x1b5)]=_0x36f5c3,this[_0x54d619(0x191)]=_0x2d4aa6,this[_0x54d619(0x1b0)]=_0x3ee0da;}async[_0x35cf93(0x1bd)](_0x5a796b){const _0x3af5a4=_0x35cf93;var _0x4d241c,_0x52ef41;const {parentId:_0x22a08d,unitId:_0x107885,text:_0x38bf4a,threadId:_0x3fc4b0}=_0x5a796b,_0x5c2acf=(_0x52ef41=(_0x4d241c=_0x38bf4a['customRanges'])==null?void 0x0:_0x4d241c[_0x3af5a4(0x19c)](_0x2a77a9=>_0x2a77a9['rangeType']===_0x3bbb87['CustomRangeType'][_0x3af5a4(0x189)])['map'](_0x5110ba=>_0x5110ba[_0x3af5a4(0x1e4)]))!=null?_0x52ef41:[],_0x2bea0e=JSON[_0x3af5a4(0x1e3)](_0x38bf4a),_0x38cd7a=(await this[_0x3af5a4(0x191)][_0x3af5a4(0x1a1)](_0x107885))[_0x3af5a4(0x1f2)]();if(_0x22a08d){const _0x66c2ec={'memberId':_0x38cd7a,'unitId':_0x107885,'content':_0x2bea0e,'mention':_0x5c2acf,'threadId':_0x3fc4b0},_0x589c5c=(await this[_0x3af5a4(0x203)][_0x3af5a4(0x1a9)](_0x3af5a4(0x1e5)+_0x107885+_0x3af5a4(0x1f9),{'body':_0x66c2ec}))['body']['reply'];return{..._0x5a796b,'id':_0x589c5c[_0x3af5a4(0x1c1)],'dT':_0x1448cd(+_0x589c5c[_0x3af5a4(0x19f)])[_0x3af5a4(0x1dc)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x589c5c['userId']};}else{const _0x1e1b0c={'memberId':_0x38cd7a,'unitId':_0x107885,'content':_0x2bea0e,'mention':_0x5c2acf},_0x2cc048=await this['_httpService'][_0x3af5a4(0x1a9)]('/universer-api/comment/unit/'+_0x107885+'/add',{'body':_0x1e1b0c});return _0x286314(_0x2cc048[_0x3af5a4(0x1d6)][_0x3af5a4(0x1f4)],_0x5a796b);}}async[_0x35cf93(0x1ab)](_0xc54d23){const _0x37f171=_0x35cf93;var _0x1fe481,_0xa40dda;const {text:_0x2c7b6b,unitId:_0x1e489a}=_0xc54d23,_0x486a07=(_0xa40dda=(_0x1fe481=_0x2c7b6b[_0x37f171(0x1ac)])==null?void 0x0:_0x1fe481[_0x37f171(0x19c)](_0x48cc3a=>_0x48cc3a['rangeType']===_0x3bbb87[_0x37f171(0x1af)][_0x37f171(0x189)])[_0x37f171(0x1a8)](_0x2b58ce=>_0x2b58ce[_0x37f171(0x1e4)]))!=null?_0xa40dda:[],_0xd6b106=JSON['stringify'](_0x2c7b6b),_0x4ad78d=_0xc54d23[_0x37f171(0x1e7)],_0x5e4f8f=_0xc54d23['id'],_0x5e465f={'memberId':(await this[_0x37f171(0x191)]['requireSession'](_0x1e489a))[_0x37f171(0x1f2)](),'unitId':_0x1e489a,'threadId':_0x4ad78d,'mention':_0x486a07,'content':_0xd6b106,'replyId':_0x5e4f8f},_0x31cee0=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x1e489a+_0x37f171(0x1cb),{'body':_0x5e465f});return!_0x31cee0[_0x37f171(0x1d6)][_0x37f171(0x184)]||_0x31cee0[_0x37f171(0x1d6)][_0x37f171(0x184)][_0x37f171(0x1c9)]===0x1;}async[_0x35cf93(0x1e0)](_0xcb4e9e){const _0x582595=_0x35cf93,{unitId:_0x4d1cd0}=_0xcb4e9e,_0x5090df=_0xcb4e9e[_0x582595(0x1e7)],_0x3454f0={'memberId':this[_0x582595(0x1b5)][_0x582595(0x1cd)]()[_0x582595(0x17a)],'unitId':_0x4d1cd0,'threadId':_0x5090df,'solved':_0xcb4e9e[_0x582595(0x187)]?_0x204c77[_0x582595(0x1b7)]:_0x204c77['OpenOrReOpen']},_0x59bfdf=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4d1cd0+_0x582595(0x18d),{'body':_0x3454f0});return!_0x59bfdf[_0x582595(0x1d6)]['error']||_0x59bfdf[_0x582595(0x1d6)]['error'][_0x582595(0x1c9)]===0x1;}async[_0x35cf93(0x1be)](_0x286799,_0x50de12,_0x76ebd4,_0x4e09ea){const _0x4d7b2d=_0x35cf93,_0x45cc99={'memberId':(await this[_0x4d7b2d(0x191)][_0x4d7b2d(0x1a1)](_0x286799))[_0x4d7b2d(0x1f2)](),'threadId':_0x76ebd4,'replyId':_0x4e09ea,'unitId':_0x286799},_0x36b07c=await this[_0x4d7b2d(0x203)][_0x4d7b2d(0x1a9)](_0x4d7b2d(0x1e5)+_0x286799+'/delete',{'body':_0x45cc99});return!_0x36b07c[_0x4d7b2d(0x1d6)][_0x4d7b2d(0x184)]||_0x36b07c[_0x4d7b2d(0x1d6)][_0x4d7b2d(0x184)][_0x4d7b2d(0x1c9)]===0x1;}async[_0x35cf93(0x202)](_0x42bca1,_0x599e57,_0x5b5fb6){const _0xed7378=_0x35cf93,_0x38a461={'unitId':_0x42bca1,'threadId':_0x5b5fb6},_0x7a46c8=await this[_0xed7378(0x203)][_0xed7378(0x1a9)](_0xed7378(0x1e5)+_0x42bca1+_0xed7378(0x200),{'body':_0x38a461}),_0x183741=_0x5b5fb6['map'](_0x840820=>_0x557f8c(_0x7a46c8[_0xed7378(0x1d6)][_0xed7378(0x1df)][_0x840820],_0x42bca1,_0x599e57))['filter'](Boolean);return Object['values'](_0x7a46c8['body'][_0xed7378(0x1e1)])[_0xed7378(0x1ca)](_0xd35df5=>{const _0x594b60=_0xed7378;this['_userService'][_0x594b60(0x17e)](_0xd35df5);}),_0x183741;}['saveCommentToSnapshot'](_0x2e2b73){return{'id':_0x2e2b73['id'],'threadId':_0x2e2b73['threadId'],'ref':_0x2e2b73['ref']};}};_0x1b9a23=_0x1b2bb8([_0xc81802(0x0,_0x3bbb87[_0x35cf93(0x1b2)](_0xd5d448['HTTPService'])),_0xc81802(0x1,_0x3bbb87[_0x35cf93(0x1b2)](_0x3bbb87['UserManagerService'])),_0xc81802(0x2,_0x3bbb87[_0x35cf93(0x1b2)](_0x2bde6d[_0x35cf93(0x198)])),_0xc81802(0x3,_0x3bbb87['Inject'](_0x3bbb87[_0x35cf93(0x194)]))],_0x1b9a23);var _0x3d53d6=Object[_0x35cf93(0x179)],_0x10ead6=Object[_0x35cf93(0x1cc)],_0x27aa7d=(_0xb0a7d9,_0x573c4d,_0x53aa0f,_0x49f5d5)=>{const _0xcf373c=_0x35cf93;for(var _0x5367db=_0x49f5d5>0x1?void 0x0:_0x49f5d5?_0x10ead6(_0x573c4d,_0x53aa0f):_0x573c4d,_0x33da0f=_0xb0a7d9[_0xcf373c(0x176)]-0x1,_0x484b6d;_0x33da0f>=0x0;_0x33da0f--)(_0x484b6d=_0xb0a7d9[_0x33da0f])&&(_0x5367db=(_0x49f5d5?_0x484b6d(_0x573c4d,_0x53aa0f,_0x5367db):_0x484b6d(_0x5367db))||_0x5367db);return _0x49f5d5&&_0x5367db&&_0x3d53d6(_0x573c4d,_0x53aa0f,_0x5367db),_0x5367db;},_0x3938f1=(_0x4b6940,_0x9e9011)=>(_0xff4eb0,_0x2ac991)=>_0x9e9011(_0xff4eb0,_0x2ac991,_0x4b6940);let _0x341550=class{constructor(_0x45ba99){const _0x32444d=_0x35cf93;this[_0x32444d(0x203)]=_0x45ba99;}async[_0x35cf93(0x1b3)](_0x7e8896,_0x6885c4,_0x3f06fc){const _0x31884a=_0x35cf93,_0x18e5d4=new URL(window[_0x31884a(0x1fc)][_0x31884a(0x1c6)])[_0x31884a(0x1d2)]['get'](_0x31884a(0x1b1));if(!_0x18e5d4)return[];const _0x32eb81=window[_0x31884a(0x1fc)][_0x31884a(0x1b4)],_0x49501e=window['location']['protocol']===_0x31884a(0x1f5)?_0x31884a(0x1ba):_0x31884a(0x1c3);return(await this[_0x31884a(0x203)][_0x31884a(0x18c)](_0x49501e+_0x31884a(0x195)+_0x32eb81+'/universer-api/authz/collaborator',{'params':{'objectID':_0x18e5d4,'unitID':_0x18e5d4}}))[_0x31884a(0x1d6)][_0x31884a(0x186)][_0x31884a(0x1a8)](_0xcfb311=>{const _0x4860d5=_0x31884a;var _0xc633d,_0x254363,_0x2c7087,_0x5678e9,_0x583e38,_0x26379f;return{'id':(_0x254363=(_0xc633d=_0xcfb311[_0x4860d5(0x1c8)])==null?void 0x0:_0xc633d[_0x4860d5(0x17a)])!=null?_0x254363:'','label':(_0x5678e9=(_0x2c7087=_0xcfb311[_0x4860d5(0x1c8)])==null?void 0x0:_0x2c7087[_0x4860d5(0x18f)])!=null?_0x5678e9:'','icon':(_0x26379f=(_0x583e38=_0xcfb311[_0x4860d5(0x1c8)])==null?void 0x0:_0x583e38[_0x4860d5(0x1fe)])!=null?_0x26379f:'','type':_0x4860d5(0x17c)};});}};_0x341550=_0x27aa7d([_0x3938f1(0x0,_0x3bbb87[_0x35cf93(0x1b2)](_0xd5d448['HTTPService']))],_0x341550);var _0xee4a4f=Object['defineProperty'],_0x5c2511=Object['getOwnPropertyDescriptor'],_0x1d49af=(_0x57ebd3,_0x33dba7,_0x57c66c,_0x203f69)=>{const _0x2cb177=_0x35cf93;for(var _0x410863=_0x203f69>0x1?void 0x0:_0x203f69?_0x5c2511(_0x33dba7,_0x57c66c):_0x33dba7,_0x16670e=_0x57ebd3[_0x2cb177(0x176)]-0x1,_0xfa2566;_0x16670e>=0x0;_0x16670e--)(_0xfa2566=_0x57ebd3[_0x16670e])&&(_0x410863=(_0x203f69?_0xfa2566(_0x33dba7,_0x57c66c,_0x410863):_0xfa2566(_0x410863))||_0x410863);return _0x203f69&&_0x410863&&_0xee4a4f(_0x33dba7,_0x57c66c,_0x410863),_0x410863;},_0x24e90f=(_0x13771b,_0x257326)=>(_0xeeabbe,_0xa47d05)=>_0x257326(_0xeeabbe,_0xa47d05,_0x13771b);let _0x19f56d=class extends _0x3bbb87[_0x35cf93(0x1e6)]{constructor(_0x323845,_0x3c15e6,_0x2d9e50,_0xa4bc5f){const _0xa9fe4b=_0x35cf93;super(),this[_0xa9fe4b(0x1c2)]=_0x323845,this[_0xa9fe4b(0x174)]=_0x3c15e6,this[_0xa9fe4b(0x197)]=_0x2d9e50,this['_threadCommentMentionDataSource']=_0xa4bc5f,this['_initDataSource']();}[_0x35cf93(0x1a3)](){const _0xec25b5=_0x35cf93;this[_0xec25b5(0x1c2)][_0xec25b5(0x1c4)]=this[_0xec25b5(0x174)],this[_0xec25b5(0x1c2)][_0xec25b5(0x1e2)]=!0x1,this[_0xec25b5(0x197)]['dataSource']=this[_0xec25b5(0x1bf)];}};_0x19f56d=_0x1d49af([_0x3bbb87[_0x35cf93(0x1f7)](_0x3bbb87[_0x35cf93(0x178)][_0x35cf93(0x19d)],_0x19f56d),_0x24e90f(0x0,_0xc9c7df['IThreadCommentDataSourceService']),_0x24e90f(0x1,_0x3bbb87[_0x35cf93(0x1b2)](_0x1b9a23)),_0x24e90f(0x2,_0x1fafcf[_0x35cf93(0x1f0)]),_0x24e90f(0x3,_0x3bbb87[_0x35cf93(0x1b2)](_0x341550))],_0x19f56d);var _0x31a891=Object[_0x35cf93(0x179)],_0xb2e99d=Object[_0x35cf93(0x1cc)],_0x56e615=(_0x13a870,_0x397725,_0x590bdd,_0x2be6ca)=>{const _0x1c7352=_0x35cf93;for(var _0x198e07=_0x2be6ca>0x1?void 0x0:_0x2be6ca?_0xb2e99d(_0x397725,_0x590bdd):_0x397725,_0x438e76=_0x13a870[_0x1c7352(0x176)]-0x1,_0x123297;_0x438e76>=0x0;_0x438e76--)(_0x123297=_0x13a870[_0x438e76])&&(_0x198e07=(_0x2be6ca?_0x123297(_0x397725,_0x590bdd,_0x198e07):_0x123297(_0x198e07))||_0x198e07);return _0x2be6ca&&_0x198e07&&_0x31a891(_0x397725,_0x590bdd,_0x198e07),_0x198e07;},_0x3eb63e=(_0x4a18e0,_0x42fba3)=>(_0x19557c,_0x5e8f3a)=>_0x42fba3(_0x19557c,_0x5e8f3a,_0x4a18e0);let _0x3118a9=class extends _0x3bbb87[_0x35cf93(0x1e6)]{constructor(_0x24b22f,_0x38a5da,_0x380d75,_0x48b067){const _0x15cf3c=_0x35cf93;super(),this[_0x15cf3c(0x1ec)]=_0x24b22f,this['_threadCommentModel']=_0x38a5da,this[_0x15cf3c(0x1b5)]=_0x380d75,this['_injector']=_0x48b067,this[_0x15cf3c(0x19b)](),this['_initUserSync']();}['_initUserSync'](){const _0x3c5bcf=_0x35cf93;this[_0x3c5bcf(0x192)](this[_0x3c5bcf(0x1ea)][_0x3c5bcf(0x1a5)][_0x3c5bcf(0x193)](_0x1e4b4b[_0x3c5bcf(0x196)](0x10))['subscribe'](_0x34ae56=>{const _0x393821=_0x3c5bcf,_0x984d69=new Set();_0x34ae56[_0x393821(0x1ca)](_0x819b52=>{const _0x20dc11=_0x393821;switch(_0x819b52[_0x20dc11(0x175)]){case'add':{const _0x3760e2=_0x819b52[_0x20dc11(0x1c7)][_0x20dc11(0x1e9)];_0x984d69[_0x20dc11(0x1ad)](_0x3760e2);break;}}}),_0x34520b(this[_0x393821(0x1b0)],_0x984d69);}));}[_0x35cf93(0x19b)](){const _0x2508a5=_0x35cf93;this[_0x2508a5(0x192)](this['_commentService']['commentUpdate$']['subscribe'](async _0x5c2a12=>{const _0x48dbf1=_0x2508a5;var _0x5a0d84,_0x413fae;const _0x568e37=this[_0x48dbf1(0x1ea)][_0x48dbf1(0x1de)](_0x5c2a12[_0x48dbf1(0x205)],_0x5c2a12[_0x48dbf1(0x1e7)]);if(!_0x568e37)return;const {unitId:_0x1aeb5e,subUnitId:_0x14a727}=_0x568e37;switch(_0x5c2a12['user']&&this[_0x48dbf1(0x1b5)][_0x48dbf1(0x17e)](_0x5c2a12[_0x48dbf1(0x17c)]),_0x5c2a12[_0x48dbf1(0x175)]){case _0x5cd0cb['Add']:break;case _0x5cd0cb['Reply']:{this['_threadCommentModel']['addComment'](_0x1aeb5e,_0x14a727,{'unitId':_0x1aeb5e,'subUnitId':_0x14a727,'ref':'','id':_0x5c2a12[_0x48dbf1(0x1c1)],'dT':_0x210087(+_0x5c2a12[_0x48dbf1(0x19f)]),'threadId':_0x5c2a12[_0x48dbf1(0x1e7)],'personId':(_0x413fae=(_0x5a0d84=_0x5c2a12[_0x48dbf1(0x17c)])==null?void 0x0:_0x5a0d84['userID'])!=null?_0x413fae:_0x5c2a12['userId'],'text':JSON[_0x48dbf1(0x18b)](_0x5c2a12[_0x48dbf1(0x1ae)]),'parentId':_0x568e37['id']});break;}case _0x5cd0cb[_0x48dbf1(0x201)]:{const _0xdab5ab=this[_0x48dbf1(0x1ea)]['getComment'](_0x1aeb5e,_0x14a727,_0x5c2a12[_0x48dbf1(0x1c1)]);_0xdab5ab&&_0xdab5ab[_0x48dbf1(0x1ee)]&&this[_0x48dbf1(0x1ea)][_0x48dbf1(0x1be)](_0x1aeb5e,_0x14a727,_0x5c2a12[_0x48dbf1(0x1c1)]);break;}case _0x5cd0cb[_0x48dbf1(0x1db)]:{this[_0x48dbf1(0x1ea)]['updateComment'](_0x1aeb5e,_0x14a727,{'commentId':_0x5c2a12[_0x48dbf1(0x1c1)],'text':JSON[_0x48dbf1(0x18b)](_0x5c2a12[_0x48dbf1(0x1ae)])});break;}case _0x5cd0cb['Solve']:{const _0x46f5bc=this[_0x48dbf1(0x1ea)]['getThread'](_0x1aeb5e,_0x5c2a12[_0x48dbf1(0x1e7)]);_0x46f5bc&&this['_threadCommentModel'][_0x48dbf1(0x1e0)](_0x1aeb5e,_0x14a727,_0x46f5bc['id'],_0x5c2a12['solved']===_0x204c77['Solved']);break;}}}));}};_0x3118a9=_0x56e615([_0x3bbb87[_0x35cf93(0x1f7)](_0x3bbb87[_0x35cf93(0x178)][_0x35cf93(0x1b8)],_0x3118a9),_0x3eb63e(0x0,_0x3bbb87[_0x35cf93(0x1b2)](_0x2bde6d[_0x35cf93(0x1ce)])),_0x3eb63e(0x1,_0x3bbb87[_0x35cf93(0x1b2)](_0xc9c7df[_0x35cf93(0x1a7)])),_0x3eb63e(0x2,_0x3bbb87['Inject'](_0x3bbb87['UserManagerService'])),_0x3eb63e(0x3,_0x3bbb87[_0x35cf93(0x1b2)](_0x3bbb87[_0x35cf93(0x194)]))],_0x3118a9);var _0x44218d=Object['defineProperty'],_0x52f258=Object[_0x35cf93(0x1cc)],_0x12b048=(_0x41a16b,_0x45574a,_0x3d073b)=>_0x45574a in _0x41a16b?_0x44218d(_0x41a16b,_0x45574a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d073b}):_0x41a16b[_0x45574a]=_0x3d073b,_0x4deb2b=(_0x22c4ce,_0x1fbe93,_0x12190a,_0x1ccbc7)=>{const _0x5f1f02=_0x35cf93;for(var _0x128150=_0x1ccbc7>0x1?void 0x0:_0x1ccbc7?_0x52f258(_0x1fbe93,_0x12190a):_0x1fbe93,_0x4f3be7=_0x22c4ce[_0x5f1f02(0x176)]-0x1,_0x49bc3b;_0x4f3be7>=0x0;_0x4f3be7--)(_0x49bc3b=_0x22c4ce[_0x4f3be7])&&(_0x128150=(_0x1ccbc7?_0x49bc3b(_0x1fbe93,_0x12190a,_0x128150):_0x49bc3b(_0x128150))||_0x128150);return _0x1ccbc7&&_0x128150&&_0x44218d(_0x1fbe93,_0x12190a,_0x128150),_0x128150;},_0x280d2f=(_0x22fca9,_0x5de6f5)=>(_0x3ecef0,_0x28558a)=>_0x5de6f5(_0x3ecef0,_0x28558a,_0x22fca9),_0x4b7805=(_0x59ba5c,_0x586fa9,_0x39fb7e)=>_0x12b048(_0x59ba5c,typeof _0x586fa9!=_0x35cf93(0x1b9)?_0x586fa9+'':_0x586fa9,_0x39fb7e);_0x1f34a[_0x35cf93(0x190)]=class extends _0x3bbb87[_0x35cf93(0x18e)]{constructor(_0x11ea48,_0x2ae724){super(),this['_injector']=_0x2ae724;}['onStarting'](_0x226fac){[[_0x341550],[_0x1b9a23],[_0x19f56d],[_0x3118a9]]['forEach'](_0x5ac29a=>{const _0x410e89=_0x5df9;_0x226fac[_0x410e89(0x1ad)](_0x5ac29a);});}},_0x4b7805(_0x1f34a[_0x35cf93(0x190)],_0x35cf93(0x1cf),_0x17869c),_0x4b7805(_0x1f34a['UniverThreadCommentDataSourcePlugin'],'type',_0x3bbb87[_0x35cf93(0x1a2)][_0x35cf93(0x1c5)]),_0x1f34a[_0x35cf93(0x190)]=_0x4deb2b([_0x3bbb87[_0x35cf93(0x185)](_0xc9c7df[_0x35cf93(0x182)],_0x1fafcf[_0x35cf93(0x1f8)],_0x2bde6d[_0x35cf93(0x1a4)]),_0x280d2f(0x1,_0x3bbb87['Inject'](_0x3bbb87[_0x35cf93(0x194)]))],_0x1f34a[_0x35cf93(0x190)]),Object[_0x35cf93(0x179)](_0x1f34a,Symbol[_0x35cf93(0x1d3)],{'value':_0x35cf93(0x1d5)});}));
1
+ (function(_0x18fec8,_0xf4c64e){const _0x1bbc00=_0xe498,_0xdb3ca7=_0x18fec8();while(!![]){try{const _0x10a951=-parseInt(_0x1bbc00(0x1c4))/0x1*(parseInt(_0x1bbc00(0x1c3))/0x2)+-parseInt(_0x1bbc00(0x231))/0x3*(-parseInt(_0x1bbc00(0x1c1))/0x4)+-parseInt(_0x1bbc00(0x1ce))/0x5*(parseInt(_0x1bbc00(0x1c0))/0x6)+-parseInt(_0x1bbc00(0x220))/0x7*(parseInt(_0x1bbc00(0x20a))/0x8)+-parseInt(_0x1bbc00(0x21d))/0x9+-parseInt(_0x1bbc00(0x1e9))/0xa+parseInt(_0x1bbc00(0x19f))/0xb;if(_0x10a951===_0xf4c64e)break;else _0xdb3ca7['push'](_0xdb3ca7['shift']());}catch(_0x476d7a){_0xdb3ca7['push'](_0xdb3ca7['shift']());}}}(_0x49cf,0x9e36f),function(_0x57caa8,_0x52dd98){const _0x5136a7=_0xe498;typeof exports==_0x5136a7(0x1b2)&&typeof module<'u'?_0x52dd98(exports,require(_0x5136a7(0x22c)),require(_0x5136a7(0x221)),require('@univerjs/thread-comment-ui'),require(_0x5136a7(0x228)),require(_0x5136a7(0x1ab)),require(_0x5136a7(0x230)),require(_0x5136a7(0x21e))):typeof define==_0x5136a7(0x1bc)&&define[_0x5136a7(0x1d6)]?define([_0x5136a7(0x22b),_0x5136a7(0x22c),'@univerjs/thread-comment',_0x5136a7(0x1ef),_0x5136a7(0x228),'@univerjs/network',_0x5136a7(0x230),_0x5136a7(0x21e)],_0x52dd98):(_0x57caa8=typeof globalThis<'u'?globalThis:_0x57caa8||self,_0x52dd98(_0x57caa8['UniverThreadCommentDatasource']={},_0x57caa8[_0x5136a7(0x1a5)],_0x57caa8[_0x5136a7(0x22e)],_0x57caa8[_0x5136a7(0x1a8)],_0x57caa8['UniverCollaborationClient'],_0x57caa8[_0x5136a7(0x212)],_0x57caa8[_0x5136a7(0x230)],_0x57caa8[_0x5136a7(0x21e)]));}(this,function(_0x5d32d4,_0x256344,_0x15323b,_0x1cba50,_0x5a3410,_0xcb20d2,_0x277d76,_0x45de69){'use strict';const _0xa0760e=_0xe498;const _0x5d21e7=_0xa0760e(0x1e3);var _0x176c49=(_0x1ede3c=>(_0x1ede3c[_0x1ede3c['OpenOrReOpen']=0x0]=_0xa0760e(0x1bd),_0x1ede3c[_0x1ede3c[_0xa0760e(0x1df)]=0x1]=_0xa0760e(0x1df),_0x1ede3c[_0x1ede3c[_0xa0760e(0x19c)]=-0x1]=_0xa0760e(0x19c),_0x1ede3c))(_0x176c49||{}),_0x2e242a=(_0x5e4557=>(_0x5e4557[_0x5e4557[_0xa0760e(0x205)]=0x0]='Unknown',_0x5e4557[_0x5e4557['Add']=0x1]=_0xa0760e(0x20e),_0x5e4557[_0x5e4557[_0xa0760e(0x214)]=0x2]=_0xa0760e(0x214),_0x5e4557[_0x5e4557['Edit']=0x3]='Edit',_0x5e4557[_0x5e4557[_0xa0760e(0x1b6)]=0x4]=_0xa0760e(0x1b6),_0x5e4557[_0x5e4557['Solve']=0x5]='Solve',_0x5e4557[_0x5e4557['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5e4557))(_0x2e242a||{});const _0x1b8871=_0x25c869=>_0x277d76(new Date(+_0x25c869))[_0xa0760e(0x1f2)](_0xa0760e(0x1ea)),_0x4517f9=async(_0x21ea25,_0x37419b)=>{const _0xb7855=_0xa0760e,_0xddd8ff=_0x21ea25[_0xb7855(0x1b4)](_0x256344[_0xb7855(0x1f7)]),_0x55df9a=_0x21ea25[_0xb7855(0x1b4)](_0xcb20d2[_0xb7855(0x1b1)]);_0x37419b[_0xb7855(0x215)](_0x408285=>{const _0x33208d=_0xb7855;_0xddd8ff[_0x33208d(0x223)](_0x408285)&&_0x37419b['delete'](_0x408285);}),_0x37419b['size']&&(await _0x55df9a[_0xb7855(0x1b4)](_0xb7855(0x20b),{'params':{'userIDs':[..._0x37419b]}}))[_0xb7855(0x200)][_0xb7855(0x227)][_0xb7855(0x215)](_0x534940=>{const _0xf0bc02=_0xb7855;_0x534940&&_0xddd8ff[_0xf0bc02(0x1d0)](_0x534940);});};var _0x2a4f1e=Object[_0xa0760e(0x1a0)],_0x217bc8=Object[_0xa0760e(0x1bf)],_0x6bd9b4=(_0x41f386,_0x3b3716,_0x20b0cd,_0x344e56)=>{const _0x52d5cd=_0xa0760e;for(var _0x3f6dd9=_0x344e56>0x1?void 0x0:_0x344e56?_0x217bc8(_0x3b3716,_0x20b0cd):_0x3b3716,_0x2d77e8=_0x41f386[_0x52d5cd(0x208)]-0x1,_0xb93e81;_0x2d77e8>=0x0;_0x2d77e8--)(_0xb93e81=_0x41f386[_0x2d77e8])&&(_0x3f6dd9=(_0x344e56?_0xb93e81(_0x3b3716,_0x20b0cd,_0x3f6dd9):_0xb93e81(_0x3f6dd9))||_0x3f6dd9);return _0x344e56&&_0x3f6dd9&&_0x2a4f1e(_0x3b3716,_0x20b0cd,_0x3f6dd9),_0x3f6dd9;},_0x58e376=(_0x4c6d5b,_0x448d51)=>(_0x3db175,_0x8bd0f1)=>_0x448d51(_0x3db175,_0x8bd0f1,_0x4c6d5b);function _0x455bbf(_0x568cf6,_0x5f18f0){const _0x97a69f=_0xa0760e,_0x3383e6=_0x568cf6['replies'][0x0];return{..._0x5f18f0,'id':_0x3383e6[_0x97a69f(0x1fd)],'resolved':_0x568cf6[_0x97a69f(0x1a1)]===0x1,'dT':_0x1b8871(_0x3383e6['createTimestamp']),'personId':_0x3383e6[_0x97a69f(0x1f5)],'threadId':_0x3383e6[_0x97a69f(0x1d9)]};}function _0x10db83(_0x48ad93,_0x461576,_0x59196a){const _0x4c26c2=_0xa0760e;var _0x5a6ab5,_0x5b03eb;if(((_0x5b03eb=(_0x5a6ab5=_0x48ad93==null?void 0x0:_0x48ad93[_0x4c26c2(0x20c)])==null?void 0x0:_0x5a6ab5[_0x4c26c2(0x208)])!=null?_0x5b03eb:0x0)>0x0){const _0x1f8721=(_0x56d461,_0x354243)=>({'id':_0x56d461[_0x4c26c2(0x1fd)],'threadId':_0x56d461[_0x4c26c2(0x1d9)],'dT':_0x1b8871(_0x56d461[_0x4c26c2(0x1da)]),'personId':_0x56d461['userId'],'resolved':_0x48ad93['solved']===_0x176c49[_0x4c26c2(0x1df)],'unitId':_0x461576,'subUnitId':_0x59196a,'text':JSON['parse'](_0x56d461[_0x4c26c2(0x1a9)]),'parentId':_0x354243}),_0x270820=_0x1f8721(_0x48ad93[_0x4c26c2(0x20c)][0x0]);return{..._0x270820,'children':_0x48ad93['replies'][_0x4c26c2(0x1f0)](0x1)[_0x4c26c2(0x206)](_0x35c2dd=>_0x1f8721(_0x35c2dd,_0x270820['id']))};}return null;}let _0x74e989=class{constructor(_0x38aacc,_0x351b88,_0x416a9a,_0x2ea562){const _0x2e7e82=_0xa0760e;this['_httpService']=_0x38aacc,this['_userService']=_0x351b88,this['_sessionService']=_0x416a9a,this[_0x2e7e82(0x1c8)]=_0x2ea562;}async['addComment'](_0x51524d){const _0x55beb4=_0xa0760e;var _0x3e0e8d,_0x5acd3d;const {parentId:_0x52addb,unitId:_0x2f831f,text:_0x1a6e24,threadId:_0x35eea9}=_0x51524d,_0x497934=(_0x5acd3d=(_0x3e0e8d=_0x1a6e24[_0x55beb4(0x19d)])==null?void 0x0:_0x3e0e8d[_0x55beb4(0x22f)](_0x23da08=>_0x23da08[_0x55beb4(0x1d1)]===_0x256344[_0x55beb4(0x1a3)][_0x55beb4(0x1ad)])[_0x55beb4(0x206)](_0x50f3fc=>_0x50f3fc[_0x55beb4(0x21b)]))!=null?_0x5acd3d:[],_0x5ef27c=JSON['stringify'](_0x1a6e24),_0x35fe60=(await this['_sessionService'][_0x55beb4(0x1e7)](_0x2f831f))[_0x55beb4(0x224)]();if(_0x52addb){const _0x51622e={'memberId':_0x35fe60,'unitId':_0x2f831f,'content':_0x5ef27c,'mention':_0x497934,'threadId':_0x35eea9},_0x519d70=(await this[_0x55beb4(0x1d8)][_0x55beb4(0x1dd)](_0x55beb4(0x201)+_0x2f831f+_0x55beb4(0x1fc),{'body':_0x51622e}))['body'][_0x55beb4(0x1b0)];return{..._0x51524d,'id':_0x519d70[_0x55beb4(0x1fd)],'dT':_0x277d76(+_0x519d70[_0x55beb4(0x1da)])[_0x55beb4(0x1f2)](_0x55beb4(0x1ea)),'personId':_0x519d70['userId']};}else{const _0xcb020e={'memberId':_0x35fe60,'unitId':_0x2f831f,'content':_0x5ef27c,'mention':_0x497934},_0x1914cc=await this['_httpService'][_0x55beb4(0x1dd)](_0x55beb4(0x201)+_0x2f831f+'/add',{'body':_0xcb020e});return _0x455bbf(_0x1914cc[_0x55beb4(0x200)]['comment'],_0x51524d);}}async['updateComment'](_0x1aa8c5){const _0x5abfc9=_0xa0760e;var _0x35602a,_0x2dc503;const {text:_0x90967,unitId:_0x2f1ea3}=_0x1aa8c5,_0x830c4b=(_0x2dc503=(_0x35602a=_0x90967[_0x5abfc9(0x19d)])==null?void 0x0:_0x35602a['filter'](_0x3517f6=>_0x3517f6[_0x5abfc9(0x1d1)]===_0x256344['CustomRangeType'][_0x5abfc9(0x1ad)])[_0x5abfc9(0x206)](_0x140a24=>_0x140a24[_0x5abfc9(0x21b)]))!=null?_0x2dc503:[],_0x24b4f9=JSON['stringify'](_0x90967),_0x4b7cfa=_0x1aa8c5['threadId'],_0x4c367f=_0x1aa8c5['id'],_0x228996={'memberId':(await this[_0x5abfc9(0x1c2)][_0x5abfc9(0x1e7)](_0x2f1ea3))['getMemberID'](),'unitId':_0x2f1ea3,'threadId':_0x4b7cfa,'mention':_0x830c4b,'content':_0x24b4f9,'replyId':_0x4c367f},_0x5d056e=await this['_httpService'][_0x5abfc9(0x1dd)](_0x5abfc9(0x201)+_0x2f1ea3+_0x5abfc9(0x19a),{'body':_0x228996});return!_0x5d056e[_0x5abfc9(0x200)][_0x5abfc9(0x1c9)]||_0x5d056e[_0x5abfc9(0x200)][_0x5abfc9(0x1c9)][_0x5abfc9(0x210)]===0x1;}async[_0xa0760e(0x1cd)](_0x214701){const _0x5880da=_0xa0760e,{unitId:_0x349582}=_0x214701,_0x5710e3=_0x214701[_0x5880da(0x1d9)],_0x499d9d={'memberId':this['_userService']['getCurrentUser']()[_0x5880da(0x1e1)],'unitId':_0x349582,'threadId':_0x5710e3,'solved':_0x214701[_0x5880da(0x1d2)]?_0x176c49['Solved']:_0x176c49[_0x5880da(0x1bd)]},_0x19467f=await this[_0x5880da(0x1d8)][_0x5880da(0x1dd)]('/universer-api/comment/unit/'+_0x349582+_0x5880da(0x20d),{'body':_0x499d9d});return!_0x19467f[_0x5880da(0x200)][_0x5880da(0x1c9)]||_0x19467f[_0x5880da(0x200)]['error']['code']===0x1;}async[_0xa0760e(0x1c6)](_0x120c91,_0x4dccc3,_0x49e3eb,_0x24a4d6){const _0x33e831=_0xa0760e,_0x255007={'memberId':(await this[_0x33e831(0x1c2)]['requireSession'](_0x120c91))[_0x33e831(0x224)](),'threadId':_0x49e3eb,'replyId':_0x24a4d6,'unitId':_0x120c91},_0xc873b3=await this['_httpService'][_0x33e831(0x1dd)]('/universer-api/comment/unit/'+_0x120c91+_0x33e831(0x21f),{'body':_0x255007});return!_0xc873b3[_0x33e831(0x200)]['error']||_0xc873b3[_0x33e831(0x200)]['error']['code']===0x1;}async[_0xa0760e(0x1be)](_0xd792dd,_0x47f958,_0x2bd239){const _0xea57b3=_0xa0760e,_0x44c53c={'unitId':_0xd792dd,'threadId':_0x2bd239},_0x31c9e1=await this[_0xea57b3(0x1d8)]['post'](_0xea57b3(0x201)+_0xd792dd+_0xea57b3(0x1ae),{'body':_0x44c53c}),_0x19f9a0=_0x2bd239['map'](_0x2f61d5=>_0x10db83(_0x31c9e1[_0xea57b3(0x200)][_0xea57b3(0x1db)][_0x2f61d5],_0xd792dd,_0x47f958))[_0xea57b3(0x22f)](Boolean);return Object['values'](_0x31c9e1[_0xea57b3(0x200)][_0xea57b3(0x227)])['forEach'](_0x5bb9a2=>{const _0x220b16=_0xea57b3;this[_0x220b16(0x1f9)][_0x220b16(0x1d0)](_0x5bb9a2);}),_0x19f9a0;}[_0xa0760e(0x1ba)](_0x175ea7){const _0x5c422c=_0xa0760e;return{'id':_0x175ea7['id'],'threadId':_0x175ea7[_0x5c422c(0x1d9)],'ref':_0x175ea7[_0x5c422c(0x207)]};}};_0x74e989=_0x6bd9b4([_0x58e376(0x0,_0x256344[_0xa0760e(0x1a4)](_0xcb20d2['HTTPService'])),_0x58e376(0x1,_0x256344[_0xa0760e(0x1a4)](_0x256344[_0xa0760e(0x1f7)])),_0x58e376(0x2,_0x256344[_0xa0760e(0x1a4)](_0x5a3410[_0xa0760e(0x1a2)])),_0x58e376(0x3,_0x256344['Inject'](_0x256344[_0xa0760e(0x213)]))],_0x74e989);var _0x3c1606=Object[_0xa0760e(0x1a0)],_0x2ea119=Object[_0xa0760e(0x1bf)],_0x171e30=(_0x43e67b,_0x5ab0d6,_0x55258f,_0x32f498)=>{const _0x3c1433=_0xa0760e;for(var _0x94b192=_0x32f498>0x1?void 0x0:_0x32f498?_0x2ea119(_0x5ab0d6,_0x55258f):_0x5ab0d6,_0x2cabfb=_0x43e67b[_0x3c1433(0x208)]-0x1,_0x8fe507;_0x2cabfb>=0x0;_0x2cabfb--)(_0x8fe507=_0x43e67b[_0x2cabfb])&&(_0x94b192=(_0x32f498?_0x8fe507(_0x5ab0d6,_0x55258f,_0x94b192):_0x8fe507(_0x94b192))||_0x94b192);return _0x32f498&&_0x94b192&&_0x3c1606(_0x5ab0d6,_0x55258f,_0x94b192),_0x94b192;},_0x1ece0=(_0x4aee51,_0x77ab8f)=>(_0x8acf61,_0x12dce8)=>_0x77ab8f(_0x8acf61,_0x12dce8,_0x4aee51);let _0x2afb07=class{constructor(_0x503381){this['_httpService']=_0x503381;}async[_0xa0760e(0x1d3)](_0x143260,_0x476118,_0x2e9a2a){const _0x5cdce7=_0xa0760e,_0x45fa4b=new URL(window['location'][_0x5cdce7(0x226)])[_0x5cdce7(0x1b7)][_0x5cdce7(0x1b4)](_0x5cdce7(0x1dc));if(!_0x45fa4b)return[];const _0x544646=window[_0x5cdce7(0x1c7)]['host'],_0x3440ef=window[_0x5cdce7(0x1c7)]['protocol']===_0x5cdce7(0x1ff)?_0x5cdce7(0x1d7):_0x5cdce7(0x1cf);return(await this[_0x5cdce7(0x1d8)][_0x5cdce7(0x1b4)](_0x3440ef+'://'+_0x544646+_0x5cdce7(0x1cb),{'params':{'objectID':_0x45fa4b,'unitID':_0x45fa4b}}))['body'][_0x5cdce7(0x1de)][_0x5cdce7(0x206)](_0x2893df=>{const _0x200097=_0x5cdce7;var _0x3a6bfc,_0x198061,_0x447f1f,_0x12bcd6,_0x2ab2b0,_0x32cdee;return{'id':(_0x198061=(_0x3a6bfc=_0x2893df[_0x200097(0x21a)])==null?void 0x0:_0x3a6bfc[_0x200097(0x1e1)])!=null?_0x198061:'','label':(_0x12bcd6=(_0x447f1f=_0x2893df[_0x200097(0x21a)])==null?void 0x0:_0x447f1f['name'])!=null?_0x12bcd6:'','icon':(_0x32cdee=(_0x2ab2b0=_0x2893df[_0x200097(0x21a)])==null?void 0x0:_0x2ab2b0[_0x200097(0x1a6)])!=null?_0x32cdee:'','type':_0x200097(0x1f6)};});}};_0x2afb07=_0x171e30([_0x1ece0(0x0,_0x256344['Inject'](_0xcb20d2['HTTPService']))],_0x2afb07);var _0x4215f7=Object[_0xa0760e(0x1a0)],_0x234fc9=Object[_0xa0760e(0x1bf)],_0x50f521=(_0x215e74,_0x1299ea,_0x4c22da,_0x5cefdd)=>{const _0x3464cd=_0xa0760e;for(var _0x58babd=_0x5cefdd>0x1?void 0x0:_0x5cefdd?_0x234fc9(_0x1299ea,_0x4c22da):_0x1299ea,_0x13db21=_0x215e74[_0x3464cd(0x208)]-0x1,_0x3d64d2;_0x13db21>=0x0;_0x13db21--)(_0x3d64d2=_0x215e74[_0x13db21])&&(_0x58babd=(_0x5cefdd?_0x3d64d2(_0x1299ea,_0x4c22da,_0x58babd):_0x3d64d2(_0x58babd))||_0x58babd);return _0x5cefdd&&_0x58babd&&_0x4215f7(_0x1299ea,_0x4c22da,_0x58babd),_0x58babd;},_0x4f6ef2=(_0x56b3e1,_0x2a6d08)=>(_0x4abe62,_0xb8c978)=>_0x2a6d08(_0x4abe62,_0xb8c978,_0x56b3e1);let _0x39dbf4=class extends _0x256344['Disposable']{constructor(_0x39ef2d,_0x3ee405,_0x5edb58,_0xa3fe53){const _0xd01397=_0xa0760e;super(),this[_0xd01397(0x204)]=_0x39ef2d,this[_0xd01397(0x1f4)]=_0x3ee405,this[_0xd01397(0x218)]=_0x5edb58,this[_0xd01397(0x1e0)]=_0xa3fe53,this[_0xd01397(0x203)]();}[_0xa0760e(0x203)](){const _0x3e470d=_0xa0760e;this[_0x3e470d(0x204)][_0x3e470d(0x1aa)]=this['_threadCommentDataSource'],this[_0x3e470d(0x204)][_0x3e470d(0x1f8)]=!0x1,this[_0x3e470d(0x218)][_0x3e470d(0x1aa)]=this[_0x3e470d(0x1e0)];}};_0x39dbf4=_0x50f521([_0x256344[_0xa0760e(0x1d4)](_0x256344[_0xa0760e(0x1fe)][_0xa0760e(0x1e8)],_0x39dbf4),_0x4f6ef2(0x0,_0x15323b[_0xa0760e(0x1e4)]),_0x4f6ef2(0x1,_0x256344[_0xa0760e(0x1a4)](_0x74e989)),_0x4f6ef2(0x2,_0x1cba50[_0xa0760e(0x1e5)]),_0x4f6ef2(0x3,_0x256344['Inject'](_0x2afb07))],_0x39dbf4);var _0x2d7bfa=Object['defineProperty'],_0x3b66bd=Object['getOwnPropertyDescriptor'],_0x4e1aae=(_0x1c1ba8,_0x407236,_0xa60909,_0x28c862)=>{const _0x1de321=_0xa0760e;for(var _0x59b415=_0x28c862>0x1?void 0x0:_0x28c862?_0x3b66bd(_0x407236,_0xa60909):_0x407236,_0x5cf20c=_0x1c1ba8[_0x1de321(0x208)]-0x1,_0x1623b4;_0x5cf20c>=0x0;_0x5cf20c--)(_0x1623b4=_0x1c1ba8[_0x5cf20c])&&(_0x59b415=(_0x28c862?_0x1623b4(_0x407236,_0xa60909,_0x59b415):_0x1623b4(_0x59b415))||_0x59b415);return _0x28c862&&_0x59b415&&_0x2d7bfa(_0x407236,_0xa60909,_0x59b415),_0x59b415;},_0x653e47=(_0x460e66,_0x3ac5c6)=>(_0x4cbee2,_0x32bc7e)=>_0x3ac5c6(_0x4cbee2,_0x32bc7e,_0x460e66);let _0x16bfcd=class extends _0x256344['Disposable']{constructor(_0x5cfa3c,_0x4a2cf3,_0x30b8fc,_0x4f1970){const _0x9dfbcd=_0xa0760e;super(),this[_0x9dfbcd(0x1ee)]=_0x5cfa3c,this[_0x9dfbcd(0x19e)]=_0x4a2cf3,this[_0x9dfbcd(0x1f9)]=_0x30b8fc,this[_0x9dfbcd(0x1c8)]=_0x4f1970,this[_0x9dfbcd(0x211)](),this['_initUserSync']();}[_0xa0760e(0x216)](){const _0x67510a=_0xa0760e;this[_0x67510a(0x22a)](this[_0x67510a(0x19e)][_0x67510a(0x19b)][_0x67510a(0x20f)](_0x45de69[_0x67510a(0x209)](0x10))[_0x67510a(0x1c5)](_0x124eb4=>{const _0x1d07e8=_0x67510a,_0x183073=new Set();_0x124eb4[_0x1d07e8(0x215)](_0x4c4e3d=>{const _0x3fd604=_0x1d07e8;switch(_0x4c4e3d['type']){case _0x3fd604(0x1f3):{const _0x3877d6=_0x4c4e3d[_0x3fd604(0x1b3)][_0x3fd604(0x202)];_0x183073[_0x3fd604(0x1f3)](_0x3877d6);break;}}}),_0x4517f9(this[_0x1d07e8(0x1c8)],_0x183073);}));}['_init'](){const _0x1105f4=_0xa0760e;this[_0x1105f4(0x22a)](this[_0x1105f4(0x1ee)][_0x1105f4(0x19b)][_0x1105f4(0x1c5)](async _0x5b40b1=>{const _0x3debc4=_0x1105f4;var _0x3c442f,_0x2b49d2;const _0xe78af4=this[_0x3debc4(0x19e)][_0x3debc4(0x1ca)](_0x5b40b1[_0x3debc4(0x1e2)],_0x5b40b1[_0x3debc4(0x1d9)]);if(!_0xe78af4)return;const {unitId:_0x5e1292,subUnitId:_0x6898a8}=_0xe78af4;switch(_0x5b40b1['user']&&this['_userService']['addUser'](_0x5b40b1[_0x3debc4(0x1f6)]),_0x5b40b1[_0x3debc4(0x1ec)]){case _0x2e242a['Add']:break;case _0x2e242a[_0x3debc4(0x214)]:{this[_0x3debc4(0x19e)]['addComment'](_0x5e1292,_0x6898a8,{'unitId':_0x5e1292,'subUnitId':_0x6898a8,'ref':'','id':_0x5b40b1[_0x3debc4(0x1fd)],'dT':_0x1b8871(+_0x5b40b1[_0x3debc4(0x1da)]),'threadId':_0x5b40b1[_0x3debc4(0x1d9)],'personId':(_0x2b49d2=(_0x3c442f=_0x5b40b1[_0x3debc4(0x1f6)])==null?void 0x0:_0x3c442f['userID'])!=null?_0x2b49d2:_0x5b40b1[_0x3debc4(0x1f5)],'text':JSON[_0x3debc4(0x1a7)](_0x5b40b1[_0x3debc4(0x1a9)]),'parentId':_0xe78af4['id']});break;}case _0x2e242a[_0x3debc4(0x1b6)]:{const _0x4bdcff=this[_0x3debc4(0x19e)][_0x3debc4(0x1ed)](_0x5e1292,_0x6898a8,_0x5b40b1[_0x3debc4(0x1fd)]);_0x4bdcff&&_0x4bdcff[_0x3debc4(0x1d5)]&&this['_threadCommentModel'][_0x3debc4(0x1c6)](_0x5e1292,_0x6898a8,_0x5b40b1['replyId']);break;}case _0x2e242a[_0x3debc4(0x1fa)]:{this[_0x3debc4(0x19e)][_0x3debc4(0x229)](_0x5e1292,_0x6898a8,{'commentId':_0x5b40b1['replyId'],'text':JSON[_0x3debc4(0x1a7)](_0x5b40b1[_0x3debc4(0x1a9)])});break;}case _0x2e242a[_0x3debc4(0x1bb)]:{const _0x231261=this[_0x3debc4(0x19e)][_0x3debc4(0x1ca)](_0x5e1292,_0x5b40b1[_0x3debc4(0x1d9)]);_0x231261&&this[_0x3debc4(0x19e)][_0x3debc4(0x1cd)](_0x5e1292,_0x6898a8,_0x231261['id'],_0x5b40b1[_0x3debc4(0x1a1)]===_0x176c49['Solved']);break;}}}));}};_0x16bfcd=_0x4e1aae([_0x256344[_0xa0760e(0x1d4)](_0x256344[_0xa0760e(0x1fe)]['Ready'],_0x16bfcd),_0x653e47(0x0,_0x256344['Inject'](_0x5a3410['CommentService'])),_0x653e47(0x1,_0x256344[_0xa0760e(0x1a4)](_0x15323b[_0xa0760e(0x1fb)])),_0x653e47(0x2,_0x256344[_0xa0760e(0x1a4)](_0x256344['UserManagerService'])),_0x653e47(0x3,_0x256344[_0xa0760e(0x1a4)](_0x256344[_0xa0760e(0x213)]))],_0x16bfcd);const _0x33be12=_0xa0760e(0x1b5),_0x24153f={};var _0x55e0b0=Object[_0xa0760e(0x1a0)],_0x17f14b=Object['getOwnPropertyDescriptor'],_0x3808a8=(_0x2f3e2d,_0x461ded,_0x529289)=>_0x461ded in _0x2f3e2d?_0x55e0b0(_0x2f3e2d,_0x461ded,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x529289}):_0x2f3e2d[_0x461ded]=_0x529289,_0x5d0c8c=(_0x4e6d13,_0x3332ed,_0xee94a2,_0xe3fc07)=>{for(var _0x5e66b9=_0xe3fc07>0x1?void 0x0:_0xe3fc07?_0x17f14b(_0x3332ed,_0xee94a2):_0x3332ed,_0x1c0bee=_0x4e6d13['length']-0x1,_0x348ce5;_0x1c0bee>=0x0;_0x1c0bee--)(_0x348ce5=_0x4e6d13[_0x1c0bee])&&(_0x5e66b9=(_0xe3fc07?_0x348ce5(_0x3332ed,_0xee94a2,_0x5e66b9):_0x348ce5(_0x5e66b9))||_0x5e66b9);return _0xe3fc07&&_0x5e66b9&&_0x55e0b0(_0x3332ed,_0xee94a2,_0x5e66b9),_0x5e66b9;},_0x2ca5f7=(_0x288606,_0x3d380a)=>(_0x148893,_0x238e26)=>_0x3d380a(_0x148893,_0x238e26,_0x288606),_0x5f4c54=(_0x26c50a,_0x21baaf,_0x4ee91d)=>_0x3808a8(_0x26c50a,typeof _0x21baaf!=_0xa0760e(0x22d)?_0x21baaf+'':_0x21baaf,_0x4ee91d);_0x5d32d4[_0xa0760e(0x1eb)]=class extends _0x256344[_0xa0760e(0x1b9)]{constructor(_0x11a610=_0x24153f,_0x5d429b,_0x4cea2e){const _0x24c697=_0xa0760e;super(),this[_0x24c697(0x222)]=_0x11a610,this[_0x24c697(0x1c8)]=_0x5d429b,this[_0x24c697(0x217)]=_0x4cea2e;const {..._0xa3a50}=this['_config'];this[_0x24c697(0x217)][_0x24c697(0x225)](_0x33be12,_0xa3a50);}['onStarting'](){const _0x1bc39d=_0xa0760e;[[_0x2afb07],[_0x74e989],[_0x39dbf4],[_0x16bfcd]][_0x1bc39d(0x215)](_0x5b9a6c=>{const _0x28aec0=_0x1bc39d;this[_0x28aec0(0x1c8)][_0x28aec0(0x1f3)](_0x5b9a6c);});}},_0x5f4c54(_0x5d32d4[_0xa0760e(0x1eb)],_0xa0760e(0x1af),_0x5d21e7),_0x5f4c54(_0x5d32d4[_0xa0760e(0x1eb)],_0xa0760e(0x1ec),_0x256344[_0xa0760e(0x1cc)][_0xa0760e(0x1e6)]),_0x5d32d4['UniverThreadCommentDataSourcePlugin']=_0x5d0c8c([_0x256344['DependentOn'](_0x15323b['UniverThreadCommentPlugin'],_0x1cba50[_0xa0760e(0x21c)],_0x5a3410[_0xa0760e(0x219)]),_0x2ca5f7(0x1,_0x256344[_0xa0760e(0x1a4)](_0x256344[_0xa0760e(0x213)])),_0x2ca5f7(0x2,_0x256344[_0xa0760e(0x1f1)])],_0x5d32d4[_0xa0760e(0x1eb)]),Object[_0xa0760e(0x1a0)](_0x5d32d4,Symbol[_0xa0760e(0x1b8)],{'value':_0xa0760e(0x1ac)});}));function _0xe498(_0x4c856f,_0x45de7a){const _0x49cf1f=_0x49cf();return _0xe498=function(_0xe498be,_0x4deb3c){_0xe498be=_0xe498be-0x19a;let _0xf1f6df=_0x49cf1f[_0xe498be];return _0xf1f6df;},_0xe498(_0x4c856f,_0x45de7a);}function _0x49cf(){const _0x2fa7d7=['href','users','@univerjs-pro/collaboration-client','updateComment','disposeWithMe','exports','@univerjs/core','symbol','UniverThreadComment','filter','dayjs','3JZZSIi','/edit','commentUpdate$','UNRECOGNIZED','customRanges','_threadCommentModel','13497044oHPokG','defineProperty','solved','CollaborationSessionService','CustomRangeType','Inject','UniverCore','avatar','parse','UniverThreadCommentUi','content','dataSource','@univerjs/network','Module','COMMENT','/list','pluginName','reply','HTTPService','object','payload','get','thread-comment-data-source.config','Delete','searchParams','toStringTag','Plugin','saveCommentToSnapshot','Solve','function','OpenOrReOpen','listComments','getOwnPropertyDescriptor','558qrqSRe','3118012ftWVtg','_sessionService','33846fpULjO','8bNikFa','subscribe','deleteComment','location','_injector','error','getThread','/universer-api/authz/collaborator','UniverInstanceType','resolveComment','5530EgCCKW','http','addUser','rangeType','resolved','getMentions','OnLifecycle','parentId','amd','https','_httpService','threadId','createTimestamp','comments','unit','post','collaborators','Solved','_threadCommentMentionDataSource','userID','unitId','THREAD_COMMENT_DATA_SOURCE_PLUGIN','IThreadCommentDataSourceService','IThreadCommentMentionDataService','UNIVER_UNKNOWN','requireSession','Starting','368500CeTsTK','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','type','getComment','_commentService','@univerjs/thread-comment-ui','slice','IConfigService','format','add','_threadCommentDataSource','userId','user','UserManagerService','syncUpdateMutationToColla','_userService','Edit','ThreadCommentModel','/reply','replyId','LifecycleStages','https:','body','/universer-api/comment/unit/','personId','_initDataSource','_threadCommentDataSourceService','Unknown','map','ref','length','bufferTime','5688DrDlpE','/universer-api/user/list','replies','/solved','Add','pipe','code','_init','UniverNetwork','Injector','Reply','forEach','_initUserSync','_configService','_threadCommentMentionDataService','UniverCollaborationClientPlugin','subject','rangeId','UniverThreadCommentUIPlugin','7235505owjyGS','rxjs','/delete','2751LYWwXJ','@univerjs/thread-comment','_config','getUser','getMemberID','setConfig'];_0x49cf=function(){return _0x2fa7d7;};return _0x49cf();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,11 +45,11 @@
45
45
  "peerDependencies": {
46
46
  "dayjs": ">=1.11.0",
47
47
  "rxjs": ">=7.0.0",
48
- "@univerjs-pro/collaboration-client": "0.2.10",
49
- "@univerjs/network": "0.2.10",
50
- "@univerjs/thread-comment-ui": "0.2.10",
51
- "@univerjs/core": "0.2.10",
52
- "@univerjs/thread-comment": "0.2.10"
48
+ "@univerjs-pro/collaboration-client": "0.2.12",
49
+ "@univerjs/core": "0.2.12",
50
+ "@univerjs/network": "0.2.12",
51
+ "@univerjs/thread-comment": "0.2.12",
52
+ "@univerjs/thread-comment-ui": "0.2.12"
53
53
  },
54
54
  "dependencies": {
55
55
  "@univerjs/protocol": "0.1.39-alpha.15"
@@ -60,11 +60,11 @@
60
60
  "typescript": "^5.5.4",
61
61
  "vite": "^5.4.0",
62
62
  "vitest": "^2.0.5",
63
- "@univerjs-pro/facade": "0.2.10",
64
- "@univerjs/core": "0.2.10",
65
- "@univerjs/shared": "0.2.10",
66
- "@univerjs/uniscript": "0.2.10",
67
- "@univerjs/network": "0.2.10"
63
+ "@univerjs-pro/facade": "0.2.12",
64
+ "@univerjs/core": "0.2.12",
65
+ "@univerjs/network": "0.2.12",
66
+ "@univerjs/uniscript": "0.2.12",
67
+ "@univerjs/shared": "0.2.12"
68
68
  },
69
69
  "univerSpace": {
70
70
  ".": {