@univerjs-pro/thread-comment-datasource 0.9.3 → 0.9.4-nightly.202507290713
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/services/comment.data-source.d.ts +2 -3
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x537e25=_0x28fc;(function(_0x3d7770,_0x3ca40f){const _0x1b99c0=_0x28fc,_0x5735e2=_0x3d7770();while(!![]){try{const _0x569e07=parseInt(_0x1b99c0(0xc0))/0x1*(parseInt(_0x1b99c0(0x10e))/0x2)+-parseInt(_0x1b99c0(0xbf))/0x3*(parseInt(_0x1b99c0(0x11b))/0x4)+-parseInt(_0x1b99c0(0x123))/0x5+-parseInt(_0x1b99c0(0x116))/0x6*(parseInt(_0x1b99c0(0xdb))/0x7)+parseInt(_0x1b99c0(0x105))/0x8*(parseInt(_0x1b99c0(0xd9))/0x9)+parseInt(_0x1b99c0(0x10c))/0xa+parseInt(_0x1b99c0(0xf7))/0xb*(parseInt(_0x1b99c0(0x103))/0xc);if(_0x569e07===_0x3ca40f)break;else _0x5735e2['push'](_0x5735e2['shift']());}catch(_0x36b8a1){_0x5735e2['push'](_0x5735e2['shift']());}}}(_0x43e7,0x57a5f));Object[_0x537e25(0xaf)](exports,Symbol[_0x537e25(0x111)],{'value':_0x537e25(0x126)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x537e25(0xb0);var I=(_0x2f6e2b=>(_0x2f6e2b[_0x2f6e2b['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2f6e2b[_0x2f6e2b[_0x537e25(0xac)]=0x1]=_0x537e25(0xac),_0x2f6e2b[_0x2f6e2b['UNRECOGNIZED']=-0x1]=_0x537e25(0xf2),_0x2f6e2b))(I||{}),v=(_0x241dc0=>(_0x241dc0[_0x241dc0[_0x537e25(0x114)]=0x0]='Unknown',_0x241dc0[_0x241dc0['Add']=0x1]=_0x537e25(0xd4),_0x241dc0[_0x241dc0[_0x537e25(0x102)]=0x2]=_0x537e25(0x102),_0x241dc0[_0x241dc0[_0x537e25(0xc9)]=0x3]=_0x537e25(0xc9),_0x241dc0[_0x241dc0[_0x537e25(0x119)]=0x4]=_0x537e25(0x119),_0x241dc0[_0x241dc0['Solve']=0x5]='Solve',_0x241dc0[_0x241dc0[_0x537e25(0xf2)]=-0x1]=_0x537e25(0xf2),_0x241dc0))(v||{});const f=_0x599bf6=>c[_0x537e25(0xe1)](new Date(+_0x599bf6))['format'](_0x537e25(0xff)),R=async(_0x5b01e5,_0x554425)=>{const _0x148884=_0x537e25,_0x55092e=_0x5b01e5['get'](c[_0x148884(0xd7)]),_0xe91d8f=_0x5b01e5[_0x148884(0x109)](P['HTTPService']);_0x554425[_0x148884(0xe9)](_0x223e37=>{const _0x3e35c0=_0x148884;_0x55092e[_0x3e35c0(0xf9)](_0x223e37)&&_0x554425[_0x3e35c0(0x104)](_0x223e37);}),_0x554425[_0x148884(0x124)]&&(await _0xe91d8f[_0x148884(0x109)](_0x148884(0xd0),{'params':{'userIDs':[..._0x554425]}}))[_0x148884(0xe0)][_0x148884(0xf8)][_0x148884(0xe9)](_0x4b8757=>{const _0x99ae40=_0x148884;_0x4b8757&&_0x55092e[_0x99ae40(0xe3)](_0x4b8757);});};function _0x43e7(){const _0x52e6c0=['_initUserSync','getComment','UserManagerService','stringify','289287aIFvOA','userId','29869IdMftz','_config','root','add','rangeType','body','dayjs','getUnit','addUser','pluginName','unitId','map','UNIVER_UNKNOWN','replies','forEach','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','user','/edit','/reply','replyId','/universer-api/comment/unit/','type','UNRECOGNIZED','OpenOrReOpen','IConfigService','_init','parentId','303039LlFzFk','users','getUser','_userService','values','HTTPService','find','_httpService','YYYY/MM/DD\x20HH:mm','UniverLicensePlugin','getOwnPropertyDescriptor','Reply','120xZqsxX','delete','8FlbzwJ','/solved','error','CommentService','get','payload','_commentService','6406120vdakte','merge','159754qOyxDF','customRanges','Disposable','toStringTag','resolved','rangeId','Unknown','Inject','318OksRSt','threadId','createTimestamp','Delete','subscribe','36oLTbjz','code','Solve','DependentOn','length','COMMENT','reply','disposeWithMe','1569295LGTVjU','size','UniverThreadCommentDataSourcePlugin','Module','Solved','addComment','content','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','_sessionService','onReady','resolveComment','userID','_injector','post','IThreadCommentDataSourceService','personId','bufferTime','slice','comments','pipe','setConfig','43035RSFaRi','1WklhnS','thread-comment-data-source.config','updateComment','/add','/delete','onStarting','ThreadCommentModel','getCurrentUser','parse','Edit','_configService','saveCommentToSnapshot','_initDataSource','filter','comment','requireSession','/universer-api/user/list','getMemberID','_threadCommentModel','solved','Add'];_0x43e7=function(){return _0x52e6c0;};return _0x43e7();}var $=Object[_0x537e25(0x101)],E=(_0x25f78d,_0x345e63,_0x26fe70,_0x338327)=>{const _0x22f9f1=_0x537e25;for(var _0x2fa20a=_0x338327>0x1?void 0x0:_0x338327?$(_0x345e63,_0x26fe70):_0x345e63,_0x4f2d5d=_0x25f78d[_0x22f9f1(0x11f)]-0x1,_0x3b679f;_0x4f2d5d>=0x0;_0x4f2d5d--)(_0x3b679f=_0x25f78d[_0x4f2d5d])&&(_0x2fa20a=_0x3b679f(_0x2fa20a)||_0x2fa20a);return _0x2fa20a;},S=(_0x3f8610,_0x3ab7f2)=>(_0x3c4136,_0x5c7990)=>_0x3ab7f2(_0x3c4136,_0x5c7990,_0x3f8610);function _0x28fc(_0x20aa04,_0x196297){const _0x43e73e=_0x43e7();return _0x28fc=function(_0x28fce2,_0x502005){_0x28fce2=_0x28fce2-0xac;let _0x143b90=_0x43e73e[_0x28fce2];return _0x143b90;},_0x28fc(_0x20aa04,_0x196297);}let p=class extends c['Disposable']{constructor(_0x436a32,_0x791b2f,_0x32ea79,_0x146f5e){const _0x1dec4b=_0x537e25;super(),this[_0x1dec4b(0x10b)]=_0x436a32,this[_0x1dec4b(0xd2)]=_0x791b2f,this[_0x1dec4b(0xfa)]=_0x32ea79,this[_0x1dec4b(0xb6)]=_0x146f5e,this[_0x1dec4b(0xf5)](),this[_0x1dec4b(0xd5)]();}[_0x537e25(0xd5)](){const _0x25c184=_0x537e25;this[_0x25c184(0x122)](this[_0x25c184(0xd2)]['commentUpdate$'][_0x25c184(0xbd)](w[_0x25c184(0xba)](0x10))[_0x25c184(0x11a)](_0x1044c0=>{const _0x45a007=_0x25c184,_0x53159b=new Set();_0x1044c0[_0x45a007(0xe9)](_0x48357a=>{const _0x287f3e=_0x45a007;switch(_0x48357a['type']){case _0x287f3e(0xde):{const _0x24bb2b=_0x48357a[_0x287f3e(0x10a)][_0x287f3e(0xb9)];_0x53159b[_0x287f3e(0xde)](_0x24bb2b);break;}}}),R(this[_0x45a007(0xb6)],_0x53159b);}));}[_0x537e25(0xf5)](){const _0x6b0ae6=_0x537e25;this[_0x6b0ae6(0x122)](this[_0x6b0ae6(0x10b)]['commentUpdate$'][_0x6b0ae6(0x11a)](async _0x2413c2=>{const _0x118ca4=_0x6b0ae6;var _0x291608,_0x56fc14,_0x3b23d7,_0x24e08f;const _0x29f28a=(_0x291608=this[_0x118ca4(0xd2)][_0x118ca4(0xe2)](_0x2413c2[_0x118ca4(0xe5)])[_0x118ca4(0xfd)](_0x2847a5=>_0x2847a5[_0x118ca4(0x117)]===_0x2413c2[_0x118ca4(0x117)]))==null?void 0x0:_0x291608[_0x118ca4(0xdd)];if(!_0x29f28a)return;const {unitId:_0x52d860,subUnitId:_0x56b0ff}=_0x29f28a;switch(_0x2413c2[_0x118ca4(0xec)]&&this[_0x118ca4(0xfa)][_0x118ca4(0xe3)](_0x2413c2[_0x118ca4(0xec)]),_0x2413c2[_0x118ca4(0xf1)]){case v[_0x118ca4(0xd4)]:break;case v['Reply']:{this[_0x118ca4(0xd2)][_0x118ca4(0xad)](_0x52d860,_0x56b0ff,{'unitId':_0x52d860,'subUnitId':_0x56b0ff,'ref':'','id':_0x2413c2[_0x118ca4(0xef)],'dT':f(+_0x2413c2[_0x118ca4(0x118)]),'threadId':_0x2413c2['threadId'],'personId':(_0x3b23d7=(_0x56fc14=_0x2413c2[_0x118ca4(0xec)])==null?void 0x0:_0x56fc14[_0x118ca4(0xb5)])!=null?_0x3b23d7:_0x2413c2['userId'],'text':JSON['parse'](_0x2413c2[_0x118ca4(0xae)]),'parentId':_0x29f28a['id']});break;}case v[_0x118ca4(0x119)]:{const _0x1a7c0c=this[_0x118ca4(0xd2)][_0x118ca4(0xd6)](_0x52d860,_0x56b0ff,_0x2413c2[_0x118ca4(0xef)]);_0x1a7c0c&&_0x1a7c0c[_0x118ca4(0xf6)]&&this[_0x118ca4(0xd2)]['deleteComment'](_0x52d860,_0x56b0ff,_0x2413c2[_0x118ca4(0xef)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x118ca4(0xc2)](_0x52d860,_0x56b0ff,{'commentId':_0x2413c2[_0x118ca4(0xef)],'text':JSON[_0x118ca4(0xc8)](_0x2413c2['content'])});break;}case v[_0x118ca4(0x11d)]:{const _0x33134f=(_0x24e08f=this[_0x118ca4(0xd2)][_0x118ca4(0xe2)](_0x2413c2['unitId'])['find'](_0x483573=>_0x483573['threadId']===_0x2413c2[_0x118ca4(0x117)]))==null?void 0x0:_0x24e08f[_0x118ca4(0xdd)];_0x33134f&&this['_threadCommentModel'][_0x118ca4(0xb4)](_0x52d860,_0x56b0ff,_0x33134f['id'],_0x2413c2[_0x118ca4(0xd3)]===I[_0x118ca4(0xac)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x537e25(0x108)])),S(0x1,c[_0x537e25(0x115)](M[_0x537e25(0xc6)])),S(0x2,c[_0x537e25(0x115)](c['UserManagerService'])),S(0x3,c[_0x537e25(0x115)](c['Injector']))],p);const q=_0x537e25(0xc1),D={};var A=Object[_0x537e25(0x101)],x=(_0x46b23a,_0x183003,_0x378d78,_0x5ac0e8)=>{for(var _0x2236a4=_0x5ac0e8>0x1?void 0x0:_0x5ac0e8?A(_0x183003,_0x378d78):_0x183003,_0x3e3f30=_0x46b23a['length']-0x1,_0x496946;_0x3e3f30>=0x0;_0x3e3f30--)(_0x496946=_0x46b23a[_0x3e3f30])&&(_0x2236a4=_0x496946(_0x2236a4)||_0x2236a4);return _0x2236a4;},_=(_0x544788,_0x59d85b)=>(_0x460181,_0xe5bcea)=>_0x59d85b(_0x460181,_0xe5bcea,_0x544788);function Y(_0xa4b98b,_0x17c63d){const _0x24f4b6=_0x537e25,_0x361ce3=_0xa4b98b[_0x24f4b6(0xe8)][0x0];return{..._0x17c63d,'id':_0x361ce3['replyId'],'resolved':_0xa4b98b[_0x24f4b6(0xd3)]===0x1,'dT':f(_0x361ce3[_0x24f4b6(0x118)]),'personId':_0x361ce3[_0x24f4b6(0xda)],'threadId':_0x361ce3[_0x24f4b6(0x117)]};}function G(_0xd166dc,_0x15ae85,_0x10ad5e){const _0x4bbde8=_0x537e25;var _0xbb440e,_0x480962;if(((_0x480962=(_0xbb440e=_0xd166dc==null?void 0x0:_0xd166dc['replies'])==null?void 0x0:_0xbb440e['length'])!=null?_0x480962:0x0)>0x0){const _0x18cefd=(_0x598173,_0x2a7359)=>({'id':_0x598173[_0x4bbde8(0xef)],'threadId':_0x598173['threadId'],'dT':f(_0x598173[_0x4bbde8(0x118)]),'personId':_0x598173['userId'],'resolved':_0xd166dc[_0x4bbde8(0xd3)]===I[_0x4bbde8(0xac)],'unitId':_0x15ae85,'subUnitId':_0x10ad5e,'text':JSON[_0x4bbde8(0xc8)](_0x598173[_0x4bbde8(0xae)]),'parentId':_0x2a7359}),_0x2e59fe=_0x18cefd(_0xd166dc[_0x4bbde8(0xe8)][0x0]);return{..._0x2e59fe,'children':_0xd166dc[_0x4bbde8(0xe8)][_0x4bbde8(0xbb)](0x1)[_0x4bbde8(0xe6)](_0x279bf7=>_0x18cefd(_0x279bf7,_0x2e59fe['id']))};}return null;}let g=class{constructor(_0x4fb84d,_0x4b9d39,_0x17ab6a,_0x2d5e5c){const _0x343df8=_0x537e25;this['_httpService']=_0x4fb84d,this[_0x343df8(0xfa)]=_0x4b9d39,this[_0x343df8(0xb2)]=_0x17ab6a,this[_0x343df8(0xb6)]=_0x2d5e5c;}async[_0x537e25(0xad)](_0xc35956){const _0x2d4571=_0x537e25;var _0x37dfe7,_0x9b3a4c;const {parentId:_0x52fdf0,unitId:_0x1ad11d,text:_0x3c89cb,threadId:_0x3a5c6f}=_0xc35956,_0x5a26c4=(_0x9b3a4c=(_0x37dfe7=_0x3c89cb['customRanges'])==null?void 0x0:_0x37dfe7['filter'](_0x5bdf15=>_0x5bdf15['rangeType']===c['CustomRangeType'][_0x2d4571(0x120)])[_0x2d4571(0xe6)](_0x4ae2a9=>_0x4ae2a9[_0x2d4571(0x113)]))!=null?_0x9b3a4c:[],_0x253c2e=JSON['stringify'](_0x3c89cb),_0x1c84ba=(await this[_0x2d4571(0xb2)][_0x2d4571(0xcf)](_0x1ad11d))[_0x2d4571(0xd1)]();if(_0x52fdf0){const _0x5aefae={'memberId':_0x1c84ba,'unitId':_0x1ad11d,'content':_0x253c2e,'mention':_0x5a26c4,'threadId':_0x3a5c6f},_0x200713=(await this[_0x2d4571(0xfe)]['post'](_0x2d4571(0xf0)+_0x1ad11d+_0x2d4571(0xee),{'body':_0x5aefae}))['body'][_0x2d4571(0x121)];return{..._0xc35956,'id':_0x200713['replyId'],'dT':c[_0x2d4571(0xe1)](+_0x200713[_0x2d4571(0x118)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x200713['userId']};}else{const _0x297e05={'memberId':_0x1c84ba,'unitId':_0x1ad11d,'content':_0x253c2e,'mention':_0x5a26c4},_0x5163bb=await this[_0x2d4571(0xfe)][_0x2d4571(0xb7)](_0x2d4571(0xf0)+_0x1ad11d+_0x2d4571(0xc3),{'body':_0x297e05});return Y(_0x5163bb[_0x2d4571(0xe0)][_0x2d4571(0xce)],_0xc35956);}}async[_0x537e25(0xc2)](_0x106ec9){const _0x2d6a23=_0x537e25;var _0x457b86,_0x4aa8f7;const {text:_0x3ae864,unitId:_0x482cc4}=_0x106ec9,_0x5eecc1=(_0x4aa8f7=(_0x457b86=_0x3ae864[_0x2d6a23(0x10f)])==null?void 0x0:_0x457b86[_0x2d6a23(0xcd)](_0x1e2b3c=>_0x1e2b3c[_0x2d6a23(0xdf)]===c['CustomRangeType'][_0x2d6a23(0x120)])['map'](_0x213ae3=>_0x213ae3[_0x2d6a23(0x113)]))!=null?_0x4aa8f7:[],_0x2274a0=JSON[_0x2d6a23(0xd8)](_0x3ae864),_0x551287=_0x106ec9['threadId'],_0x37e2b3=_0x106ec9['id'],_0x36fafc={'memberId':(await this[_0x2d6a23(0xb2)][_0x2d6a23(0xcf)](_0x482cc4))[_0x2d6a23(0xd1)](),'unitId':_0x482cc4,'threadId':_0x551287,'mention':_0x5eecc1,'content':_0x2274a0,'replyId':_0x37e2b3},_0x10f10a=await this['_httpService'][_0x2d6a23(0xb7)](_0x2d6a23(0xf0)+_0x482cc4+_0x2d6a23(0xed),{'body':_0x36fafc});return!_0x10f10a[_0x2d6a23(0xe0)][_0x2d6a23(0x107)]||_0x10f10a[_0x2d6a23(0xe0)]['error'][_0x2d6a23(0x11c)]===0x1;}async['resolveComment'](_0x38c9a9){const _0x3d63d8=_0x537e25,{unitId:_0x4444d6}=_0x38c9a9,_0x219343=_0x38c9a9[_0x3d63d8(0x117)],_0x44f15c={'memberId':this['_userService'][_0x3d63d8(0xc7)]()[_0x3d63d8(0xb5)],'unitId':_0x4444d6,'threadId':_0x219343,'solved':_0x38c9a9[_0x3d63d8(0x112)]?I[_0x3d63d8(0xac)]:I[_0x3d63d8(0xf3)]},_0x1351d7=await this[_0x3d63d8(0xfe)]['post'](_0x3d63d8(0xf0)+_0x4444d6+_0x3d63d8(0x106),{'body':_0x44f15c});return!_0x1351d7[_0x3d63d8(0xe0)][_0x3d63d8(0x107)]||_0x1351d7[_0x3d63d8(0xe0)]['error']['code']===0x1;}async['deleteComment'](_0xb0cb48,_0xf5b0fd,_0x33803c,_0x44fa68){const _0x3a4ec4=_0x537e25,_0x16431a={'memberId':(await this[_0x3a4ec4(0xb2)][_0x3a4ec4(0xcf)](_0xb0cb48))[_0x3a4ec4(0xd1)](),'threadId':_0x33803c,'replyId':_0x44fa68,'unitId':_0xb0cb48},_0x58318=await this[_0x3a4ec4(0xfe)][_0x3a4ec4(0xb7)](_0x3a4ec4(0xf0)+_0xb0cb48+_0x3a4ec4(0xc4),{'body':_0x16431a});return!_0x58318['body'][_0x3a4ec4(0x107)]||_0x58318[_0x3a4ec4(0xe0)][_0x3a4ec4(0x107)][_0x3a4ec4(0x11c)]===0x1;}async['listComments'](_0x2c4ad8,_0x4a695b,_0x5ed734){const _0x4f82ad=_0x537e25,_0x53023c={'unitId':_0x2c4ad8,'threadId':_0x5ed734},_0x30a8bc=await this['_httpService'][_0x4f82ad(0xb7)](_0x4f82ad(0xf0)+_0x2c4ad8+'/list',{'body':_0x53023c}),_0x44a6d9=_0x5ed734[_0x4f82ad(0xe6)](_0xe1820=>G(_0x30a8bc[_0x4f82ad(0xe0)][_0x4f82ad(0xbc)][_0xe1820],_0x2c4ad8,_0x4a695b))[_0x4f82ad(0xcd)](Boolean);return Object[_0x4f82ad(0xfb)](_0x30a8bc[_0x4f82ad(0xe0)][_0x4f82ad(0xf8)])[_0x4f82ad(0xe9)](_0x418acb=>{const _0x570462=_0x4f82ad;this[_0x570462(0xfa)]['addUser'](_0x418acb);}),_0x44a6d9;}[_0x537e25(0xcb)](_0x591586){return{'id':_0x591586['id'],'threadId':_0x591586['threadId'],'ref':_0x591586['ref']};}};g=x([_(0x0,c[_0x537e25(0x115)](P[_0x537e25(0xfc)])),_(0x1,c[_0x537e25(0x115)](c[_0x537e25(0xd7)])),_(0x2,c[_0x537e25(0x115)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x537e25(0x101)],J=(_0xca9081,_0x393739,_0x4926a6,_0x1e62ec)=>{for(var _0x1f3bd=_0x1e62ec>0x1?void 0x0:_0x1e62ec?H(_0x393739,_0x4926a6):_0x393739,_0x3e06ed=_0xca9081['length']-0x1,_0x3f1fb1;_0x3e06ed>=0x0;_0x3e06ed--)(_0x3f1fb1=_0xca9081[_0x3e06ed])&&(_0x1f3bd=_0x3f1fb1(_0x1f3bd)||_0x1f3bd);return _0x1f3bd;},y=(_0x510d14,_0xe382f1)=>(_0x5bc488,_0x5aba03)=>_0xe382f1(_0x5bc488,_0x5aba03,_0x510d14);let C=class extends c[_0x537e25(0x110)]{constructor(_0x41313a,_0xcf6f00){const _0x38f279=_0x537e25;super(),this['_threadCommentDataSourceService']=_0x41313a,this['_threadCommentDataSource']=_0xcf6f00,this[_0x38f279(0xcc)]();}[_0x537e25(0xcc)](){const _0x43fcdf=_0x537e25;this[_0x43fcdf(0xeb)][_0x43fcdf(0xb1)]=this['_threadCommentDataSource'],this[_0x43fcdf(0xeb)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x537e25(0xb8)]),y(0x1,c[_0x537e25(0x115)](g))],C);var F=Object[_0x537e25(0xaf)],L=Object[_0x537e25(0x101)],Z=(_0x483c4c,_0x561605,_0x19c3c9)=>_0x561605 in _0x483c4c?F(_0x483c4c,_0x561605,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19c3c9}):_0x483c4c[_0x561605]=_0x19c3c9,W=(_0x1dccb7,_0x2e8fcc,_0x548089,_0x3429dd)=>{for(var _0x3e8f5b=_0x3429dd>0x1?void 0x0:_0x3429dd?L(_0x2e8fcc,_0x548089):_0x2e8fcc,_0x97b84d=_0x1dccb7['length']-0x1,_0x129f1c;_0x97b84d>=0x0;_0x97b84d--)(_0x129f1c=_0x1dccb7[_0x97b84d])&&(_0x3e8f5b=_0x129f1c(_0x3e8f5b)||_0x3e8f5b);return _0x3e8f5b;},O=(_0x21ef7d,_0x5e11d9)=>(_0x4acc8c,_0x3ad932)=>_0x5e11d9(_0x4acc8c,_0x3ad932,_0x21ef7d),N=(_0x3901bf,_0x503a5d,_0x155087)=>Z(_0x3901bf,typeof _0x503a5d!='symbol'?_0x503a5d+'':_0x503a5d,_0x155087);exports[_0x537e25(0x125)]=class extends c['Plugin']{constructor(_0x182ebd=D,_0x2608c8,_0x5840d8){const _0xf15156=_0x537e25;super(),this[_0xf15156(0xdc)]=_0x182ebd,this[_0xf15156(0xb6)]=_0x2608c8,this[_0xf15156(0xca)]=_0x5840d8;const {..._0xf23c28}=c[_0xf15156(0x10d)]({},D,this[_0xf15156(0xdc)]);this[_0xf15156(0xca)][_0xf15156(0xbe)](q,_0xf23c28);}[_0x537e25(0xc5)](){[[g],[C],[p]]['forEach'](_0x216b4e=>{const _0x185a8d=_0x28fc;this['_injector'][_0x185a8d(0xde)](_0x216b4e);});}[_0x537e25(0xb3)](){const _0xcf05d9=_0x537e25;this[_0xcf05d9(0xb6)][_0xcf05d9(0x109)](C),this[_0xcf05d9(0xb6)][_0xcf05d9(0x109)](p);}},N(exports[_0x537e25(0x125)],_0x537e25(0xe4),U),N(exports[_0x537e25(0x125)],_0x537e25(0xf1),c['UniverInstanceType'][_0x537e25(0xe7)]),exports[_0x537e25(0x125)]=W([c[_0x537e25(0x11e)](j[_0x537e25(0xea)],b['UniverCollaborationClientPlugin'],T[_0x537e25(0x100)]),O(0x1,c[_0x537e25(0x115)](c['Injector'])),O(0x2,c[_0x537e25(0xf4)])],exports[_0x537e25(0x125)]);
|
|
1
|
+
'use strict';const _0x3d5420=_0x111b;(function(_0x47ef3e,_0x7169b8){const _0x35746f=_0x111b,_0x3b7652=_0x47ef3e();while(!![]){try{const _0xd147e3=parseInt(_0x35746f(0x11f))/0x1+-parseInt(_0x35746f(0x158))/0x2*(parseInt(_0x35746f(0x12f))/0x3)+-parseInt(_0x35746f(0x130))/0x4+parseInt(_0x35746f(0x140))/0x5+-parseInt(_0x35746f(0x14d))/0x6*(parseInt(_0x35746f(0x154))/0x7)+parseInt(_0x35746f(0x132))/0x8+parseInt(_0x35746f(0x15d))/0x9*(-parseInt(_0x35746f(0x18b))/0xa);if(_0xd147e3===_0x7169b8)break;else _0x3b7652['push'](_0x3b7652['shift']());}catch(_0x277980){_0x3b7652['push'](_0x3b7652['shift']());}}}(_0x5b97,0xb6eaf));Object[_0x3d5420(0x174)](exports,Symbol['toStringTag'],{'value':_0x3d5420(0x126)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x3d5420(0x11e);var I=(_0x10bb0d=>(_0x10bb0d[_0x10bb0d[_0x3d5420(0x15f)]=0x0]='OpenOrReOpen',_0x10bb0d[_0x10bb0d[_0x3d5420(0x16e)]=0x1]=_0x3d5420(0x16e),_0x10bb0d[_0x10bb0d[_0x3d5420(0x114)]=-0x1]=_0x3d5420(0x114),_0x10bb0d))(I||{}),v=(_0x3613b9=>(_0x3613b9[_0x3613b9['Unknown']=0x0]=_0x3d5420(0x14b),_0x3613b9[_0x3613b9[_0x3d5420(0x16c)]=0x1]=_0x3d5420(0x16c),_0x3613b9[_0x3613b9[_0x3d5420(0x157)]=0x2]=_0x3d5420(0x157),_0x3613b9[_0x3613b9[_0x3d5420(0x167)]=0x3]=_0x3d5420(0x167),_0x3613b9[_0x3613b9[_0x3d5420(0x115)]=0x4]=_0x3d5420(0x115),_0x3613b9[_0x3613b9[_0x3d5420(0x11d)]=0x5]=_0x3d5420(0x11d),_0x3613b9[_0x3613b9['UNRECOGNIZED']=-0x1]=_0x3d5420(0x114),_0x3613b9))(v||{});const f=_0x38d48d=>c[_0x3d5420(0x15c)](new Date(+_0x38d48d))[_0x3d5420(0x128)](_0x3d5420(0x151)),R=async(_0x252d82,_0x3ff60d)=>{const _0x276264=_0x3d5420,_0x8daabf=_0x252d82[_0x276264(0x147)](c['UserManagerService']),_0x4217a3=_0x252d82[_0x276264(0x147)](P[_0x276264(0x17b)]);_0x3ff60d['forEach'](_0x347531=>{const _0x4d54da=_0x276264;_0x8daabf[_0x4d54da(0x16d)](_0x347531)&&_0x3ff60d[_0x4d54da(0x117)](_0x347531);}),_0x3ff60d[_0x276264(0x155)]&&(await _0x4217a3[_0x276264(0x147)](_0x276264(0x135),{'params':{'userIDs':[..._0x3ff60d]}}))['body'][_0x276264(0x13f)]['forEach'](_0x1c10ba=>{const _0x1fe7c6=_0x276264;_0x1c10ba&&_0x8daabf[_0x1fe7c6(0x133)](_0x1c10ba);});};var $=Object[_0x3d5420(0x12d)],E=(_0x3080c0,_0x564317,_0x237dda,_0x37c94a)=>{for(var _0x3595f3=_0x37c94a>0x1?void 0x0:_0x37c94a?$(_0x564317,_0x237dda):_0x564317,_0x3da47d=_0x3080c0['length']-0x1,_0x46efd4;_0x3da47d>=0x0;_0x3da47d--)(_0x46efd4=_0x3080c0[_0x3da47d])&&(_0x3595f3=_0x46efd4(_0x3595f3)||_0x3595f3);return _0x3595f3;},S=(_0x7f7f9,_0xd328a9)=>(_0x6aae2b,_0x234823)=>_0xd328a9(_0x6aae2b,_0x234823,_0x7f7f9);let _=class extends c[_0x3d5420(0x119)]{constructor(_0x4d4330,_0x11bbee,_0x44d3d5,_0x1447f2){const _0x4f5a49=_0x3d5420;super(),this[_0x4f5a49(0x185)]=_0x4d4330,this['_threadCommentModel']=_0x11bbee,this[_0x4f5a49(0x15e)]=_0x44d3d5,this['_injector']=_0x1447f2,this['_init'](),this[_0x4f5a49(0x17c)]();}[_0x3d5420(0x17c)](){const _0x490ed6=_0x3d5420;this[_0x490ed6(0x16b)](this[_0x490ed6(0x163)][_0x490ed6(0x14f)][_0x490ed6(0x188)](j[_0x490ed6(0x18e)](0x10))[_0x490ed6(0x11b)](_0x29d482=>{const _0xe730ad=_0x490ed6,_0xec92b8=new Set();_0x29d482[_0xe730ad(0x16f)](_0x339095=>{const _0x27fffc=_0xe730ad;switch(_0x339095[_0x27fffc(0x172)]){case _0x27fffc(0x170):{const _0x535d26=_0x339095[_0x27fffc(0x13a)][_0x27fffc(0x12e)];_0xec92b8[_0x27fffc(0x170)](_0x535d26);break;}}}),R(this[_0xe730ad(0x173)],_0xec92b8);}));}[_0x3d5420(0x148)](){const _0xe32a3e=_0x3d5420;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0xe32a3e(0x11b)](async _0x56f45a=>{const _0x166176=_0xe32a3e;var _0x4ea2e5,_0x1e4a83,_0x591494,_0xa1f3bc;const _0x535cd5=(_0x4ea2e5=this[_0x166176(0x163)][_0x166176(0x125)](_0x56f45a['unitId'])[_0x166176(0x17d)](_0x8f9436=>_0x8f9436['threadId']===_0x56f45a[_0x166176(0x120)]))==null?void 0x0:_0x4ea2e5[_0x166176(0x12c)];if(!_0x535cd5)return;const {unitId:_0x52b4fc,subUnitId:_0x80ade3}=_0x535cd5;switch(_0x56f45a[_0x166176(0x187)]&&this['_userService'][_0x166176(0x133)](_0x56f45a['user']),_0x56f45a[_0x166176(0x172)]){case v[_0x166176(0x16c)]:break;case v[_0x166176(0x157)]:{this['_threadCommentModel'][_0x166176(0x181)](_0x52b4fc,_0x80ade3,{'unitId':_0x52b4fc,'subUnitId':_0x80ade3,'ref':'','id':_0x56f45a[_0x166176(0x153)],'dT':f(+_0x56f45a[_0x166176(0x116)]),'threadId':_0x56f45a[_0x166176(0x120)],'personId':(_0x591494=(_0x1e4a83=_0x56f45a[_0x166176(0x187)])==null?void 0x0:_0x1e4a83[_0x166176(0x12a)])!=null?_0x591494:_0x56f45a[_0x166176(0x129)],'text':JSON['parse'](_0x56f45a[_0x166176(0x12b)]),'parentId':_0x535cd5['id']});break;}case v[_0x166176(0x115)]:{const _0x5d2f64=this['_threadCommentModel'][_0x166176(0x166)](_0x52b4fc,_0x80ade3,_0x56f45a[_0x166176(0x153)]);_0x5d2f64&&_0x5d2f64[_0x166176(0x180)]&&this[_0x166176(0x163)]['deleteComment'](_0x52b4fc,_0x80ade3,_0x56f45a[_0x166176(0x153)]);break;}case v[_0x166176(0x167)]:{this[_0x166176(0x163)][_0x166176(0x144)](_0x52b4fc,_0x80ade3,{'commentId':_0x56f45a['replyId'],'text':JSON[_0x166176(0x145)](_0x56f45a[_0x166176(0x12b)])});break;}case v['Solve']:{const _0x266662=(_0xa1f3bc=this[_0x166176(0x163)][_0x166176(0x125)](_0x56f45a['unitId'])[_0x166176(0x17d)](_0x312b1a=>_0x312b1a[_0x166176(0x120)]===_0x56f45a[_0x166176(0x120)]))==null?void 0x0:_0xa1f3bc[_0x166176(0x12c)];_0x266662&&this[_0x166176(0x163)]['resolveComment'](_0x52b4fc,_0x80ade3,_0x266662['id'],_0x56f45a['solved']===I[_0x166176(0x16e)]);break;}}}));}};_=E([S(0x0,c[_0x3d5420(0x189)](b[_0x3d5420(0x11a)])),S(0x1,c[_0x3d5420(0x189)](M[_0x3d5420(0x136)])),S(0x2,c[_0x3d5420(0x189)](c[_0x3d5420(0x118)])),S(0x3,c[_0x3d5420(0x189)](c[_0x3d5420(0x156)]))],_);const q='thread-comment-data-source.config',D={};function _0x111b(_0x2cb04b,_0x4de542){const _0x5b9799=_0x5b97();return _0x111b=function(_0x111b3f,_0x319a2c){_0x111b3f=_0x111b3f-0x114;let _0x5e7ea7=_0x5b9799[_0x111b3f];return _0x5e7ea7;},_0x111b(_0x2cb04b,_0x4de542);}var A=Object[_0x3d5420(0x12d)],x=(_0x37423f,_0x5de3aa,_0x1f2626,_0x112685)=>{for(var _0x3931b7=_0x112685>0x1?void 0x0:_0x112685?A(_0x5de3aa,_0x1f2626):_0x5de3aa,_0x2dbf90=_0x37423f['length']-0x1,_0x1176c4;_0x2dbf90>=0x0;_0x2dbf90--)(_0x1176c4=_0x37423f[_0x2dbf90])&&(_0x3931b7=_0x1176c4(_0x3931b7)||_0x3931b7);return _0x3931b7;},C=(_0x5ba353,_0x20a97e)=>(_0x45df47,_0x1151de)=>_0x20a97e(_0x45df47,_0x1151de,_0x5ba353);function Y(_0xe1b44b,_0x1fdaa9){const _0x56063d=_0x3d5420,_0x572e62=_0xe1b44b[_0x56063d(0x164)][0x0];return{..._0x1fdaa9,'id':_0x572e62[_0x56063d(0x153)],'resolved':_0xe1b44b[_0x56063d(0x162)]===0x1,'dT':f(_0x572e62[_0x56063d(0x116)]),'personId':_0x572e62['userId'],'threadId':_0x572e62[_0x56063d(0x120)]};}function G(_0x11d03f,_0x2973fa,_0x40005a){const _0x468b15=_0x3d5420;var _0x27d04a,_0x4bbf40;if(((_0x4bbf40=(_0x27d04a=_0x11d03f==null?void 0x0:_0x11d03f['replies'])==null?void 0x0:_0x27d04a['length'])!=null?_0x4bbf40:0x0)>0x0){const _0x492f04=(_0x3e8ab8,_0x5f32bc)=>({'id':_0x3e8ab8['replyId'],'threadId':_0x3e8ab8[_0x468b15(0x120)],'dT':f(_0x3e8ab8['createTimestamp']),'personId':_0x3e8ab8[_0x468b15(0x129)],'resolved':_0x11d03f[_0x468b15(0x162)]===I[_0x468b15(0x16e)],'unitId':_0x2973fa,'subUnitId':_0x40005a,'text':JSON['parse'](_0x3e8ab8[_0x468b15(0x12b)]),'parentId':_0x5f32bc}),_0x26cd75=_0x492f04(_0x11d03f[_0x468b15(0x164)][0x0]);return{..._0x26cd75,'children':_0x11d03f[_0x468b15(0x164)][_0x468b15(0x17a)](0x1)['map'](_0x5b9931=>_0x492f04(_0x5b9931,_0x26cd75['id']))};}return null;}let p=class{constructor(_0x2db495,_0x1a1751,_0x2143e1){const _0x45a894=_0x3d5420;this[_0x45a894(0x15b)]=_0x2db495,this[_0x45a894(0x15e)]=_0x1a1751,this['_sessionService']=_0x2143e1;}async[_0x3d5420(0x181)](_0x22bc61){const _0x10951d=_0x3d5420;var _0x3a9614,_0x27bc44;const {parentId:_0x1497c1,unitId:_0x3776c9,text:_0x2026c9,threadId:_0x306b82}=_0x22bc61,_0x421e12=(_0x27bc44=(_0x3a9614=_0x2026c9[_0x10951d(0x14a)])==null?void 0x0:_0x3a9614[_0x10951d(0x14c)](_0x4a94ca=>_0x4a94ca['rangeType']===c[_0x10951d(0x150)]['COMMENT'])[_0x10951d(0x143)](_0x35c187=>_0x35c187[_0x10951d(0x165)]))!=null?_0x27bc44:[],_0x4a14c5=JSON[_0x10951d(0x17e)](_0x2026c9),_0x2f7f34=(await this['_sessionService'][_0x10951d(0x16a)](_0x3776c9))[_0x10951d(0x123)]();if(_0x1497c1){const _0xca0c9={'memberId':_0x2f7f34,'unitId':_0x3776c9,'content':_0x4a14c5,'mention':_0x421e12,'threadId':_0x306b82},_0x1fcd37=(await this[_0x10951d(0x15b)]['post']('/universer-api/comment/unit/'+_0x3776c9+'/reply',{'body':_0xca0c9}))['body'][_0x10951d(0x146)];return{..._0x22bc61,'id':_0x1fcd37['replyId'],'dT':c['dayjs'](+_0x1fcd37['createTimestamp'])[_0x10951d(0x128)](_0x10951d(0x151)),'personId':_0x1fcd37[_0x10951d(0x129)]};}else{const _0x598400={'memberId':_0x2f7f34,'unitId':_0x3776c9,'content':_0x4a14c5,'mention':_0x421e12},_0x5ec4da=await this[_0x10951d(0x15b)][_0x10951d(0x184)](_0x10951d(0x11c)+_0x3776c9+_0x10951d(0x134),{'body':_0x598400});return Y(_0x5ec4da[_0x10951d(0x183)]['comment'],_0x22bc61);}}async[_0x3d5420(0x144)](_0x1e0ccf){const _0x1d2a42=_0x3d5420;var _0x45c5c4,_0xdf7e0a;const {text:_0x1b2bc9,unitId:_0x117372}=_0x1e0ccf,_0x1e8e6b=(_0xdf7e0a=(_0x45c5c4=_0x1b2bc9['customRanges'])==null?void 0x0:_0x45c5c4[_0x1d2a42(0x14c)](_0x207fcd=>_0x207fcd['rangeType']===c[_0x1d2a42(0x150)][_0x1d2a42(0x139)])['map'](_0x518a0b=>_0x518a0b['rangeId']))!=null?_0xdf7e0a:[],_0x3548c8=JSON[_0x1d2a42(0x17e)](_0x1b2bc9),_0x364066=_0x1e0ccf[_0x1d2a42(0x120)],_0x31348b=_0x1e0ccf['id'],_0x2d715c={'memberId':(await this['_sessionService'][_0x1d2a42(0x16a)](_0x117372))['getMemberID'](),'unitId':_0x117372,'threadId':_0x364066,'mention':_0x1e8e6b,'content':_0x3548c8,'replyId':_0x31348b},_0xdfd0f=await this[_0x1d2a42(0x15b)]['post'](_0x1d2a42(0x11c)+_0x117372+_0x1d2a42(0x138),{'body':_0x2d715c});return!_0xdfd0f[_0x1d2a42(0x183)]['error']||_0xdfd0f[_0x1d2a42(0x183)]['error'][_0x1d2a42(0x177)]===0x1;}async[_0x3d5420(0x152)](_0x108d1b){const _0x198d37=_0x3d5420,{unitId:_0x45524e}=_0x108d1b,_0xa5e1cb=_0x108d1b['threadId'],_0x23d978={'memberId':this['_userService'][_0x198d37(0x13d)]()[_0x198d37(0x12a)],'unitId':_0x45524e,'threadId':_0xa5e1cb,'solved':_0x108d1b[_0x198d37(0x137)]?I[_0x198d37(0x16e)]:I[_0x198d37(0x15f)]},_0x206c67=await this[_0x198d37(0x15b)][_0x198d37(0x184)](_0x198d37(0x11c)+_0x45524e+'/solved',{'body':_0x23d978});return!_0x206c67[_0x198d37(0x183)][_0x198d37(0x176)]||_0x206c67['body'][_0x198d37(0x176)][_0x198d37(0x177)]===0x1;}async[_0x3d5420(0x122)](_0x3e82e8,_0x55cc50,_0x3e48e5,_0x159d25){const _0x1f7a9f=_0x3d5420,_0x2a09e7={'memberId':(await this[_0x1f7a9f(0x13c)][_0x1f7a9f(0x16a)](_0x3e82e8))['getMemberID'](),'threadId':_0x3e48e5,'replyId':_0x159d25,'unitId':_0x3e82e8},_0x5c3004=await this['_httpService'][_0x1f7a9f(0x184)](_0x1f7a9f(0x11c)+_0x3e82e8+_0x1f7a9f(0x171),{'body':_0x2a09e7});return!_0x5c3004[_0x1f7a9f(0x183)]['error']||_0x5c3004['body'][_0x1f7a9f(0x176)][_0x1f7a9f(0x177)]===0x1;}async['listComments'](_0x59017d,_0x363926,_0x2f620d){const _0x9dbd03=_0x3d5420,_0x4d4433={'unitId':_0x59017d,'threadId':_0x2f620d},_0xf51dfa=await this[_0x9dbd03(0x15b)][_0x9dbd03(0x184)](_0x9dbd03(0x11c)+_0x59017d+'/list',{'body':_0x4d4433}),_0x1c2f20=_0x2f620d[_0x9dbd03(0x143)](_0xb0acac=>G(_0xf51dfa['body'][_0x9dbd03(0x159)][_0xb0acac],_0x59017d,_0x363926))[_0x9dbd03(0x14c)](Boolean);return Object[_0x9dbd03(0x18a)](_0xf51dfa[_0x9dbd03(0x183)]['users'])[_0x9dbd03(0x16f)](_0x391a52=>{const _0x482b37=_0x9dbd03;this[_0x482b37(0x15e)][_0x482b37(0x133)](_0x391a52);}),_0x1c2f20;}[_0x3d5420(0x182)](_0x4034bd){const _0x3f8ed7=_0x3d5420;return{'id':_0x4034bd['id'],'threadId':_0x4034bd[_0x3f8ed7(0x120)],'ref':_0x4034bd[_0x3f8ed7(0x18d)]};}};p=x([C(0x0,c[_0x3d5420(0x189)](P[_0x3d5420(0x17b)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x3d5420(0x189)](b[_0x3d5420(0x124)]))],p);function _0x5b97(){const _0x2a75c7=['defineProperty','dataSource','error','code','setConfig','symbol','slice','HTTPService','_initUserSync','find','stringify','UniverThreadCommentUIPlugin','parentId','addComment','saveCommentToSnapshot','body','post','_commentService','UniverThreadCommentDataSourcePlugin','user','pipe','Inject','values','7607870qqXnXS','DependentOn','ref','bufferTime','UNRECOGNIZED','Delete','createTimestamp','delete','UserManagerService','Disposable','CommentService','subscribe','/universer-api/comment/unit/','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1495449cKzGxF','threadId','onStarting','deleteComment','getMemberID','CollaborationSessionService','getUnit','Module','_threadCommentDataSourceService','format','userId','userID','content','root','getOwnPropertyDescriptor','personId','93pHbixn','874136qQJDHf','_initDataSource','5885936NczQTa','addUser','/add','/universer-api/user/list','ThreadCommentModel','resolved','/edit','COMMENT','payload','UniverCollaborationClientPlugin','_sessionService','getCurrentUser','length','users','1231385mNqjxX','UNIVER_UNKNOWN','Plugin','map','updateComment','parse','reply','get','_init','IConfigService','customRanges','Unknown','filter','312VGxLQt','_configService','commentUpdate$','CustomRangeType','YYYY/MM/DD\x20HH:mm','resolveComment','replyId','70469JyFtbm','size','Injector','Reply','14544hYCvdP','comments','_threadCommentDataSource','_httpService','dayjs','9HABcIN','_userService','OpenOrReOpen','merge','IThreadCommentDataSourceService','solved','_threadCommentModel','replies','rangeId','getComment','Edit','_config','UniverLicensePlugin','requireSession','disposeWithMe','Add','getUser','Solved','forEach','add','/delete','type','_injector'];_0x5b97=function(){return _0x2a75c7;};return _0x5b97();}var H=Object[_0x3d5420(0x12d)],J=(_0x582e0f,_0xa948f7,_0x295ede,_0x1386a0)=>{for(var _0x2eebdb=_0x1386a0>0x1?void 0x0:_0x1386a0?H(_0xa948f7,_0x295ede):_0xa948f7,_0x2218e7=_0x582e0f['length']-0x1,_0x40197c;_0x2218e7>=0x0;_0x2218e7--)(_0x40197c=_0x582e0f[_0x2218e7])&&(_0x2eebdb=_0x40197c(_0x2eebdb)||_0x2eebdb);return _0x2eebdb;},y=(_0xc9a477,_0x5d5d6d)=>(_0x568657,_0x349cbe)=>_0x5d5d6d(_0x568657,_0x349cbe,_0xc9a477);let g=class extends c['Disposable']{constructor(_0x20e23d,_0x5c5f5b){const _0x3aebb5=_0x3d5420;super(),this['_threadCommentDataSourceService']=_0x20e23d,this[_0x3aebb5(0x15a)]=_0x5c5f5b,this[_0x3aebb5(0x131)]();}[_0x3d5420(0x131)](){const _0x36e922=_0x3d5420;this[_0x36e922(0x127)][_0x36e922(0x175)]=this['_threadCommentDataSource'],this[_0x36e922(0x127)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x3d5420(0x161)]),y(0x1,c[_0x3d5420(0x189)](p))],g);var F=Object[_0x3d5420(0x174)],L=Object[_0x3d5420(0x12d)],Z=(_0x1f6c78,_0x598816,_0x28f9b9)=>_0x598816 in _0x1f6c78?F(_0x1f6c78,_0x598816,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x28f9b9}):_0x1f6c78[_0x598816]=_0x28f9b9,W=(_0x1f50bd,_0x5973c0,_0x2102b1,_0xfab39e)=>{const _0x40db28=_0x3d5420;for(var _0x196e98=_0xfab39e>0x1?void 0x0:_0xfab39e?L(_0x5973c0,_0x2102b1):_0x5973c0,_0x1d23f9=_0x1f50bd[_0x40db28(0x13e)]-0x1,_0x349765;_0x1d23f9>=0x0;_0x1d23f9--)(_0x349765=_0x1f50bd[_0x1d23f9])&&(_0x196e98=_0x349765(_0x196e98)||_0x196e98);return _0x196e98;},O=(_0x253211,_0x5ade0f)=>(_0x9a0c24,_0x5d282d)=>_0x5ade0f(_0x9a0c24,_0x5d282d,_0x253211),N=(_0x2a9012,_0x444af2,_0x3cbba1)=>Z(_0x2a9012,typeof _0x444af2!=_0x3d5420(0x179)?_0x444af2+'':_0x444af2,_0x3cbba1);exports[_0x3d5420(0x186)]=class extends c[_0x3d5420(0x142)]{constructor(_0x1fdf59=D,_0x138cca,_0x4f8a82){const _0x37ddaa=_0x3d5420;super(),this[_0x37ddaa(0x168)]=_0x1fdf59,this[_0x37ddaa(0x173)]=_0x138cca,this['_configService']=_0x4f8a82;const {..._0x57938e}=c[_0x37ddaa(0x160)]({},D,this[_0x37ddaa(0x168)]);this[_0x37ddaa(0x14e)][_0x37ddaa(0x178)](q,_0x57938e);}[_0x3d5420(0x121)](){const _0x4a09c5=_0x3d5420;[[p],[g],[_]][_0x4a09c5(0x16f)](_0x8270ae=>{this['_injector']['add'](_0x8270ae);});}['onReady'](){const _0x4b3960=_0x3d5420;this['_injector'][_0x4b3960(0x147)](g),this[_0x4b3960(0x173)][_0x4b3960(0x147)](_);}},N(exports[_0x3d5420(0x186)],'pluginName',U),N(exports[_0x3d5420(0x186)],_0x3d5420(0x172),c['UniverInstanceType'][_0x3d5420(0x141)]),exports[_0x3d5420(0x186)]=W([c[_0x3d5420(0x18c)](w[_0x3d5420(0x17f)],b[_0x3d5420(0x13b)],T[_0x3d5420(0x169)]),O(0x1,c['Inject'](c[_0x3d5420(0x156)])),O(0x2,c[_0x3d5420(0x149)])],exports[_0x3d5420(0x186)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4119(_0x33c396,_0x7ecedc){const _0x3a31fa=_0x3a31();return _0x4119=function(_0x411952,_0x372456){_0x411952=_0x411952-0xab;let _0x2b7fee=_0x3a31fa[_0x411952];return _0x2b7fee;},_0x4119(_0x33c396,_0x7ecedc);}const _0x425e5f=_0x4119;(function(_0x4e8257,_0x4fb90c){const _0x64ad97=_0x4119,_0x46e20c=_0x4e8257();while(!![]){try{const _0x4641a8=-parseInt(_0x64ad97(0xab))/0x1*(-parseInt(_0x64ad97(0xc0))/0x2)+-parseInt(_0x64ad97(0x103))/0x3+-parseInt(_0x64ad97(0xfd))/0x4*(parseInt(_0x64ad97(0x10f))/0x5)+-parseInt(_0x64ad97(0xf6))/0x6*(parseInt(_0x64ad97(0xb9))/0x7)+parseInt(_0x64ad97(0xc1))/0x8*(parseInt(_0x64ad97(0xdf))/0x9)+-parseInt(_0x64ad97(0xbe))/0xa+-parseInt(_0x64ad97(0xd7))/0xb*(-parseInt(_0x64ad97(0xdc))/0xc);if(_0x4641a8===_0x4fb90c)break;else _0x46e20c['push'](_0x46e20c['shift']());}catch(_0x269378){_0x46e20c['push'](_0x46e20c['shift']());}}}(_0x3a31,0xdad0c));import{CommentService as _0x241de7,CollaborationSessionService as _0x1c1e03,UniverCollaborationClientPlugin as _0x21f04b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x548071}from'@univerjs-pro/license';import{dayjs as _0x56839b,UserManagerService as _0x517fcb,Inject as _0x722246,Injector as _0x25b10c,Disposable as _0x4d0fd0,CustomRangeType as _0x5dbbf9,UniverInstanceType as _0x1d123f,DependentOn as _0x5a38b0,IConfigService as _0x54164f,Plugin as _0x5d2b76,merge as _0x316a9a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49f318}from'@univerjs/thread-comment-ui';function _0x3a31(){const _0xd4b343=['_initDataSource','_userService','ref','_sessionService','_httpService','rangeId','root','listComments','forEach','add','error','filter','type','UNRECOGNIZED','saveCommentToSnapshot','addUser','4376614JRHNeu','syncUpdateMutationToColla','personId','post','solved','36EegEBS','YYYY/MM/DD\x20HH:mm','_configService','15938298nApGbu','getOwnPropertyDescriptor','threadId','symbol','subscribe','_commentService','get','COMMENT','deleteComment','pluginName','replyId','stringify','length','UNIVER_UNKNOWN','userId','user','values','reply','getUnit','/edit','_config','/solved','users','6lzmEmW','parse','Delete','defineProperty','content','_threadCommentDataSourceService','code','956JswijB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','Edit','_threadCommentDataSource','2998938AVjVwi','onReady','rangeType','comment','body','Unknown','_initUserSync','/universer-api/user/list','comments','Reply','map','OpenOrReOpen','17040GOukcz','replies','pipe','5KrXTfL','getCurrentUser','onStarting','userID','_threadCommentModel','Solve','createTimestamp','addComment','_init','/list','/universer-api/comment/unit/','getUser','payload','updateComment','6410089oSZpGB','unitId','_injector','customRanges','resolveComment','6631360LdEBdm','requireSession','529898THPCxt','8cvOfnx','Solved','Add','disposeWithMe','find','getMemberID'];_0x3a31=function(){return _0xd4b343;};return _0x3a31();}import{ThreadCommentModel as _0x33a7b8,IThreadCommentDataSourceService as _0x36983c}from'@univerjs/thread-comment';import{bufferTime as _0x250bbc}from'rxjs';import{HTTPService as _0x199b25}from'@univerjs/network';const W=_0x425e5f(0xfe);var I=(_0x42248f=>(_0x42248f[_0x42248f['OpenOrReOpen']=0x0]=_0x425e5f(0x10e),_0x42248f[_0x42248f[_0x425e5f(0xc2)]=0x1]='Solved',_0x42248f[_0x42248f[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x42248f))(I||{}),v=(_0x5abfa2=>(_0x5abfa2[_0x5abfa2[_0x425e5f(0x108)]=0x0]=_0x425e5f(0x108),_0x5abfa2[_0x5abfa2[_0x425e5f(0xc3)]=0x1]=_0x425e5f(0xc3),_0x5abfa2[_0x5abfa2[_0x425e5f(0x10c)]=0x2]=_0x425e5f(0x10c),_0x5abfa2[_0x5abfa2[_0x425e5f(0x101)]=0x3]='Edit',_0x5abfa2[_0x5abfa2[_0x425e5f(0xf8)]=0x4]=_0x425e5f(0xf8),_0x5abfa2[_0x5abfa2[_0x425e5f(0xb0)]=0x5]=_0x425e5f(0xb0),_0x5abfa2[_0x5abfa2[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x5abfa2))(v||{});const D=_0x284839=>_0x56839b(new Date(+_0x284839))[_0x425e5f(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4507a7,_0x31b235)=>{const _0x3ce1d8=_0x425e5f,_0x2f7b8d=_0x4507a7[_0x3ce1d8(0xe5)](_0x517fcb),_0x2c8720=_0x4507a7[_0x3ce1d8(0xe5)](_0x199b25);_0x31b235['forEach'](_0xc331e7=>{const _0x356049=_0x3ce1d8;_0x2f7b8d[_0x356049(0xb6)](_0xc331e7)&&_0x31b235['delete'](_0xc331e7);}),_0x31b235['size']&&(await _0x2c8720[_0x3ce1d8(0xe5)](_0x3ce1d8(0x10a),{'params':{'userIDs':[..._0x31b235]}}))[_0x3ce1d8(0x107)][_0x3ce1d8(0xf5)][_0x3ce1d8(0xcf)](_0x424c44=>{const _0x144387=_0x3ce1d8;_0x424c44&&_0x2f7b8d[_0x144387(0xd6)](_0x424c44);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x500302,_0x2e2fd0,_0x404d4e,_0x17012f)=>{const _0x525ac6=_0x425e5f;for(var _0x383411=_0x17012f>0x1?void 0x0:_0x17012f?K(_0x2e2fd0,_0x404d4e):_0x2e2fd0,_0xd73450=_0x500302[_0x525ac6(0xeb)]-0x1,_0x396eca;_0xd73450>=0x0;_0xd73450--)(_0x396eca=_0x500302[_0xd73450])&&(_0x383411=_0x396eca(_0x383411)||_0x383411);return _0x383411;},p=(_0x36b10a,_0x517527)=>(_0x3a8b79,_0x3dfb77)=>_0x517527(_0x3a8b79,_0x3dfb77,_0x36b10a);let S=class extends _0x4d0fd0{constructor(_0x1fa63b,_0x14cb90,_0x295174,_0x1b7135){const _0x3a2ad7=_0x425e5f;super(),this[_0x3a2ad7(0xe4)]=_0x1fa63b,this[_0x3a2ad7(0xaf)]=_0x14cb90,this['_userService']=_0x295174,this[_0x3a2ad7(0xbb)]=_0x1b7135,this['_init'](),this[_0x3a2ad7(0x109)]();}[_0x425e5f(0x109)](){const _0x4a568c=_0x425e5f;this[_0x4a568c(0xc4)](this[_0x4a568c(0xaf)]['commentUpdate$'][_0x4a568c(0x111)](_0x250bbc(0x10))[_0x4a568c(0xe3)](_0x3fad4e=>{const _0x245149=_0x4a568c,_0x5666d7=new Set();_0x3fad4e[_0x245149(0xcf)](_0x17fa86=>{const _0x8bf604=_0x245149;switch(_0x17fa86[_0x8bf604(0xd3)]){case _0x8bf604(0xd0):{const _0x46d500=_0x17fa86[_0x8bf604(0xb7)][_0x8bf604(0xd9)];_0x5666d7[_0x8bf604(0xd0)](_0x46d500);break;}}}),B(this['_injector'],_0x5666d7);}));}[_0x425e5f(0xb3)](){const _0x302938=_0x425e5f;this[_0x302938(0xc4)](this['_commentService']['commentUpdate$'][_0x302938(0xe3)](async _0x27400f=>{const _0x125426=_0x302938;var _0x290c8b,_0x27b31d,_0x128787,_0x55de0e;const _0x434ff4=(_0x290c8b=this[_0x125426(0xaf)][_0x125426(0xf1)](_0x27400f[_0x125426(0xba)])[_0x125426(0xc5)](_0x3e61dd=>_0x3e61dd['threadId']===_0x27400f['threadId']))==null?void 0x0:_0x290c8b[_0x125426(0xcd)];if(!_0x434ff4)return;const {unitId:_0x3bc7cb,subUnitId:_0x188ab5}=_0x434ff4;switch(_0x27400f[_0x125426(0xee)]&&this[_0x125426(0xc8)]['addUser'](_0x27400f[_0x125426(0xee)]),_0x27400f[_0x125426(0xd3)]){case v['Add']:break;case v[_0x125426(0x10c)]:{this[_0x125426(0xaf)][_0x125426(0xb2)](_0x3bc7cb,_0x188ab5,{'unitId':_0x3bc7cb,'subUnitId':_0x188ab5,'ref':'','id':_0x27400f[_0x125426(0xe9)],'dT':D(+_0x27400f[_0x125426(0xb1)]),'threadId':_0x27400f['threadId'],'personId':(_0x128787=(_0x27b31d=_0x27400f[_0x125426(0xee)])==null?void 0x0:_0x27b31d[_0x125426(0xae)])!=null?_0x128787:_0x27400f[_0x125426(0xed)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)]),'parentId':_0x434ff4['id']});break;}case v['Delete']:{const _0xb1ffec=this[_0x125426(0xaf)]['getComment'](_0x3bc7cb,_0x188ab5,_0x27400f[_0x125426(0xe9)]);_0xb1ffec&&_0xb1ffec['parentId']&&this[_0x125426(0xaf)]['deleteComment'](_0x3bc7cb,_0x188ab5,_0x27400f['replyId']);break;}case v['Edit']:{this[_0x125426(0xaf)]['updateComment'](_0x3bc7cb,_0x188ab5,{'commentId':_0x27400f[_0x125426(0xe9)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)])});break;}case v['Solve']:{const _0x30b031=(_0x55de0e=this['_threadCommentModel'][_0x125426(0xf1)](_0x27400f['unitId'])['find'](_0x50d026=>_0x50d026[_0x125426(0xe1)]===_0x27400f[_0x125426(0xe1)]))==null?void 0x0:_0x55de0e[_0x125426(0xcd)];_0x30b031&&this[_0x125426(0xaf)][_0x125426(0xbd)](_0x3bc7cb,_0x188ab5,_0x30b031['id'],_0x27400f['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x722246(_0x241de7)),p(0x1,_0x722246(_0x33a7b8)),p(0x2,_0x722246(_0x517fcb)),p(0x3,_0x722246(_0x25b10c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x425e5f(0xe0)],Q=(_0x2c9e87,_0x5bbf41,_0xc0d470,_0x3ca685)=>{for(var _0x150eff=_0x3ca685>0x1?void 0x0:_0x3ca685?k(_0x5bbf41,_0xc0d470):_0x5bbf41,_0x4b8d08=_0x2c9e87['length']-0x1,_0x1a0084;_0x4b8d08>=0x0;_0x4b8d08--)(_0x1a0084=_0x2c9e87[_0x4b8d08])&&(_0x150eff=_0x1a0084(_0x150eff)||_0x150eff);return _0x150eff;},_=(_0x35841f,_0x122090)=>(_0x5452d1,_0x397167)=>_0x122090(_0x5452d1,_0x397167,_0x35841f);function X(_0x45627c,_0x2314e5){const _0x3425bc=_0x425e5f,_0x494270=_0x45627c[_0x3425bc(0x110)][0x0];return{..._0x2314e5,'id':_0x494270[_0x3425bc(0xe9)],'resolved':_0x45627c[_0x3425bc(0xdb)]===0x1,'dT':D(_0x494270[_0x3425bc(0xb1)]),'personId':_0x494270['userId'],'threadId':_0x494270[_0x3425bc(0xe1)]};}function ee(_0x5bb631,_0x51d510,_0x56c115){const _0x265688=_0x425e5f;var _0x2b78d2,_0x94154a;if(((_0x94154a=(_0x2b78d2=_0x5bb631==null?void 0x0:_0x5bb631[_0x265688(0x110)])==null?void 0x0:_0x2b78d2[_0x265688(0xeb)])!=null?_0x94154a:0x0)>0x0){const _0x4bc798=(_0x193266,_0x145d37)=>({'id':_0x193266[_0x265688(0xe9)],'threadId':_0x193266[_0x265688(0xe1)],'dT':D(_0x193266[_0x265688(0xb1)]),'personId':_0x193266[_0x265688(0xed)],'resolved':_0x5bb631[_0x265688(0xdb)]===I['Solved'],'unitId':_0x51d510,'subUnitId':_0x56c115,'text':JSON[_0x265688(0xf7)](_0x193266[_0x265688(0xfa)]),'parentId':_0x145d37}),_0x5badc1=_0x4bc798(_0x5bb631['replies'][0x0]);return{..._0x5badc1,'children':_0x5bb631['replies']['slice'](0x1)['map'](_0x4cd4a4=>_0x4bc798(_0x4cd4a4,_0x5badc1['id']))};}return null;}let f=class{constructor(_0x4664a5,_0x1bc530,_0x453a75,_0x1da0e6){const _0x1027f7=_0x425e5f;this[_0x1027f7(0xcb)]=_0x4664a5,this[_0x1027f7(0xc8)]=_0x1bc530,this[_0x1027f7(0xca)]=_0x453a75,this[_0x1027f7(0xbb)]=_0x1da0e6;}async[_0x425e5f(0xb2)](_0x689999){const _0x86f68c=_0x425e5f;var _0x1faf94,_0x4b25bc;const {parentId:_0x53a94,unitId:_0x50aa87,text:_0x52355e,threadId:_0x2e3457}=_0x689999,_0x3c684e=(_0x4b25bc=(_0x1faf94=_0x52355e[_0x86f68c(0xbc)])==null?void 0x0:_0x1faf94[_0x86f68c(0xd2)](_0x5728cd=>_0x5728cd[_0x86f68c(0x105)]===_0x5dbbf9[_0x86f68c(0xe6)])[_0x86f68c(0x10d)](_0x4200a0=>_0x4200a0[_0x86f68c(0xcc)]))!=null?_0x4b25bc:[],_0x229563=JSON['stringify'](_0x52355e),_0x2c1fa3=(await this[_0x86f68c(0xca)][_0x86f68c(0xbf)](_0x50aa87))[_0x86f68c(0xc6)]();if(_0x53a94){const _0x47317a={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e,'threadId':_0x2e3457},_0x3dfa63=(await this['_httpService'][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/reply',{'body':_0x47317a}))[_0x86f68c(0x107)][_0x86f68c(0xf0)];return{..._0x689999,'id':_0x3dfa63[_0x86f68c(0xe9)],'dT':_0x56839b(+_0x3dfa63[_0x86f68c(0xb1)])[_0x86f68c(0xff)](_0x86f68c(0xdd)),'personId':_0x3dfa63[_0x86f68c(0xed)]};}else{const _0x51d8e1={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e},_0x1d87d9=await this[_0x86f68c(0xcb)][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/add',{'body':_0x51d8e1});return X(_0x1d87d9[_0x86f68c(0x107)][_0x86f68c(0x106)],_0x689999);}}async[_0x425e5f(0xb8)](_0x54c835){const _0x54e91c=_0x425e5f;var _0x40dafe,_0x5ef016;const {text:_0x5177ac,unitId:_0x6575d}=_0x54c835,_0x37d918=(_0x5ef016=(_0x40dafe=_0x5177ac['customRanges'])==null?void 0x0:_0x40dafe[_0x54e91c(0xd2)](_0x5721ab=>_0x5721ab[_0x54e91c(0x105)]===_0x5dbbf9['COMMENT'])['map'](_0x2ce100=>_0x2ce100['rangeId']))!=null?_0x5ef016:[],_0x381bc6=JSON[_0x54e91c(0xea)](_0x5177ac),_0x17e5f7=_0x54c835[_0x54e91c(0xe1)],_0x13cb70=_0x54c835['id'],_0x461bec={'memberId':(await this[_0x54e91c(0xca)]['requireSession'](_0x6575d))[_0x54e91c(0xc6)](),'unitId':_0x6575d,'threadId':_0x17e5f7,'mention':_0x37d918,'content':_0x381bc6,'replyId':_0x13cb70},_0x38e3a2=await this[_0x54e91c(0xcb)][_0x54e91c(0xda)](_0x54e91c(0xb5)+_0x6575d+_0x54e91c(0xf2),{'body':_0x461bec});return!_0x38e3a2[_0x54e91c(0x107)]['error']||_0x38e3a2['body'][_0x54e91c(0xd1)][_0x54e91c(0xfc)]===0x1;}async[_0x425e5f(0xbd)](_0x30762f){const _0x1cbdd4=_0x425e5f,{unitId:_0x4980a6}=_0x30762f,_0x5227a3=_0x30762f[_0x1cbdd4(0xe1)],_0x2cd44d={'memberId':this[_0x1cbdd4(0xc8)][_0x1cbdd4(0xac)]()[_0x1cbdd4(0xae)],'unitId':_0x4980a6,'threadId':_0x5227a3,'solved':_0x30762f['resolved']?I['Solved']:I['OpenOrReOpen']},_0x540e0c=await this[_0x1cbdd4(0xcb)][_0x1cbdd4(0xda)](_0x1cbdd4(0xb5)+_0x4980a6+_0x1cbdd4(0xf4),{'body':_0x2cd44d});return!_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)]||_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)][_0x1cbdd4(0xfc)]===0x1;}async[_0x425e5f(0xe7)](_0x562ce5,_0x31c8ae,_0x5d192c,_0x51c657){const _0x27aa85=_0x425e5f,_0x527fc1={'memberId':(await this[_0x27aa85(0xca)]['requireSession'](_0x562ce5))[_0x27aa85(0xc6)](),'threadId':_0x5d192c,'replyId':_0x51c657,'unitId':_0x562ce5},_0x255052=await this['_httpService'][_0x27aa85(0xda)](_0x27aa85(0xb5)+_0x562ce5+'/delete',{'body':_0x527fc1});return!_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]||_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]['code']===0x1;}async[_0x425e5f(0xce)](_0x22ca3f,_0x1dcfce,_0x4dafc7){const _0x5a5b03=_0x425e5f,_0x5dbc47={'unitId':_0x22ca3f,'threadId':_0x4dafc7},_0x2a0489=await this['_httpService']['post'](_0x5a5b03(0xb5)+_0x22ca3f+_0x5a5b03(0xb4),{'body':_0x5dbc47}),_0x533b53=_0x4dafc7[_0x5a5b03(0x10d)](_0x54fb20=>ee(_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0x10b)][_0x54fb20],_0x22ca3f,_0x1dcfce))[_0x5a5b03(0xd2)](Boolean);return Object[_0x5a5b03(0xef)](_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0xf5)])[_0x5a5b03(0xcf)](_0x16fd25=>{const _0x81b8fd=_0x5a5b03;this[_0x81b8fd(0xc8)]['addUser'](_0x16fd25);}),_0x533b53;}[_0x425e5f(0xd5)](_0x3a387d){const _0x597b38=_0x425e5f;return{'id':_0x3a387d['id'],'threadId':_0x3a387d['threadId'],'ref':_0x3a387d[_0x597b38(0xc9)]};}};f=Q([_(0x0,_0x722246(_0x199b25)),_(0x1,_0x722246(_0x517fcb)),_(0x2,_0x722246(_0x1c1e03)),_(0x3,_0x722246(_0x25b10c))],f);var re=Object[_0x425e5f(0xe0)],te=(_0x9f81f9,_0x54c8b6,_0x266938,_0xa26a6a)=>{const _0x394d41=_0x425e5f;for(var _0x3fa3cb=_0xa26a6a>0x1?void 0x0:_0xa26a6a?re(_0x54c8b6,_0x266938):_0x54c8b6,_0x4f72cb=_0x9f81f9[_0x394d41(0xeb)]-0x1,_0x59c7bb;_0x4f72cb>=0x0;_0x4f72cb--)(_0x59c7bb=_0x9f81f9[_0x4f72cb])&&(_0x3fa3cb=_0x59c7bb(_0x3fa3cb)||_0x3fa3cb);return _0x3fa3cb;},N=(_0x16bcfb,_0x1b5152)=>(_0xaedfca,_0x27e232)=>_0x1b5152(_0xaedfca,_0x27e232,_0x16bcfb);let g=class extends _0x4d0fd0{constructor(_0x2434d1,_0x318b48){const _0x42aafc=_0x425e5f;super(),this['_threadCommentDataSourceService']=_0x2434d1,this['_threadCommentDataSource']=_0x318b48,this[_0x42aafc(0xc7)]();}[_0x425e5f(0xc7)](){const _0x14d606=_0x425e5f;this[_0x14d606(0xfb)][_0x14d606(0x100)]=this[_0x14d606(0x102)],this[_0x14d606(0xfb)][_0x14d606(0xd8)]=!0x1;}};g=te([N(0x0,_0x36983c),N(0x1,_0x722246(f))],g);var se=Object[_0x425e5f(0xf9)],oe=Object[_0x425e5f(0xe0)],ne=(_0x5a9072,_0x5ec4fc,_0x6da4c2)=>_0x5ec4fc in _0x5a9072?se(_0x5a9072,_0x5ec4fc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6da4c2}):_0x5a9072[_0x5ec4fc]=_0x6da4c2,ie=(_0x4bb8e5,_0x19a3e5,_0x55390e,_0x43e9a5)=>{for(var _0x5a7cec=_0x43e9a5>0x1?void 0x0:_0x43e9a5?oe(_0x19a3e5,_0x55390e):_0x19a3e5,_0x48a66c=_0x4bb8e5['length']-0x1,_0x1d0097;_0x48a66c>=0x0;_0x48a66c--)(_0x1d0097=_0x4bb8e5[_0x48a66c])&&(_0x5a7cec=_0x1d0097(_0x5a7cec)||_0x5a7cec);return _0x5a7cec;},w=(_0x5de127,_0xc2847b)=>(_0x3d3baf,_0x514773)=>_0xc2847b(_0x3d3baf,_0x514773,_0x5de127),$=(_0x4a50ef,_0xdaae1c,_0x148dd2)=>ne(_0x4a50ef,typeof _0xdaae1c!=_0x425e5f(0xe2)?_0xdaae1c+'':_0xdaae1c,_0x148dd2);let b=class extends _0x5d2b76{constructor(_0x45c136=M,_0x4fe88f,_0x1a949d){const _0x41c0d3=_0x425e5f;super(),this[_0x41c0d3(0xf3)]=_0x45c136,this[_0x41c0d3(0xbb)]=_0x4fe88f,this[_0x41c0d3(0xde)]=_0x1a949d;const {..._0x3fbf03}=_0x316a9a({},M,this[_0x41c0d3(0xf3)]);this[_0x41c0d3(0xde)]['setConfig'](z,_0x3fbf03);}[_0x425e5f(0xad)](){const _0x5490df=_0x425e5f;[[f],[g],[S]][_0x5490df(0xcf)](_0xf0efb=>{const _0x533850=_0x5490df;this[_0x533850(0xbb)]['add'](_0xf0efb);});}[_0x425e5f(0x104)](){this['_injector']['get'](g),this['_injector']['get'](S);}};$(b,_0x425e5f(0xe8),W),$(b,_0x425e5f(0xd3),_0x1d123f[_0x425e5f(0xec)]),b=ie([_0x5a38b0(_0x49f318,_0x21f04b,_0x548071),w(0x1,_0x722246(_0x25b10c)),w(0x2,_0x54164f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3ccefd=_0x31d0;(function(_0x5ebe59,_0x22eb5f){const _0x31856b=_0x31d0,_0x130a96=_0x5ebe59();while(!![]){try{const _0x103ec5=parseInt(_0x31856b(0x149))/0x1+parseInt(_0x31856b(0x114))/0x2+parseInt(_0x31856b(0x14a))/0x3*(-parseInt(_0x31856b(0x126))/0x4)+-parseInt(_0x31856b(0x102))/0x5+parseInt(_0x31856b(0xf4))/0x6+-parseInt(_0x31856b(0xf9))/0x7*(parseInt(_0x31856b(0x145))/0x8)+parseInt(_0x31856b(0xff))/0x9;if(_0x103ec5===_0x22eb5f)break;else _0x130a96['push'](_0x130a96['shift']());}catch(_0x548ed6){_0x130a96['push'](_0x130a96['shift']());}}}(_0x3b75,0x88f40));import{CommentService as _0x11f515,CollaborationSessionService as _0x52cf24,UniverCollaborationClientPlugin as _0x12ae43}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38eead}from'@univerjs-pro/license';import{dayjs as _0x4e68e8,UserManagerService as _0x4d85ee,Inject as _0x5c1e64,Injector as _0x31e86f,Disposable as _0x2cd795,CustomRangeType as _0x4ac1a8,UniverInstanceType as _0x5f0730,DependentOn as _0x7f6732,IConfigService as _0x405fde,Plugin as _0x1c4223,merge as _0x1a1877}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe87a7f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37ae10,IThreadCommentDataSourceService as _0x241c59}from'@univerjs/thread-comment';import{bufferTime as _0x56fda4}from'rxjs';import{HTTPService as _0x2cb4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2abd50=>(_0x2abd50[_0x2abd50['OpenOrReOpen']=0x0]=_0x3ccefd(0x113),_0x2abd50[_0x2abd50[_0x3ccefd(0x118)]=0x1]=_0x3ccefd(0x118),_0x2abd50[_0x2abd50['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x2abd50))(I||{}),v=(_0x107047=>(_0x107047[_0x107047[_0x3ccefd(0x12a)]=0x0]=_0x3ccefd(0x12a),_0x107047[_0x107047[_0x3ccefd(0xf7)]=0x1]=_0x3ccefd(0xf7),_0x107047[_0x107047['Reply']=0x2]=_0x3ccefd(0x125),_0x107047[_0x107047[_0x3ccefd(0x112)]=0x3]='Edit',_0x107047[_0x107047[_0x3ccefd(0x110)]=0x4]=_0x3ccefd(0x110),_0x107047[_0x107047[_0x3ccefd(0x121)]=0x5]=_0x3ccefd(0x121),_0x107047[_0x107047['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x107047))(v||{});const y=_0x2866e2=>_0x4e68e8(new Date(+_0x2866e2))[_0x3ccefd(0xfe)](_0x3ccefd(0x14c)),B=async(_0x374df5,_0x5aa73e)=>{const _0x569b22=_0x3ccefd,_0x5ab53f=_0x374df5[_0x569b22(0x107)](_0x4d85ee),_0x25f72d=_0x374df5[_0x569b22(0x107)](_0x2cb4a2);_0x5aa73e['forEach'](_0x204518=>{const _0x573f43=_0x569b22;_0x5ab53f['getUser'](_0x204518)&&_0x5aa73e[_0x573f43(0x139)](_0x204518);}),_0x5aa73e[_0x569b22(0x12e)]&&(await _0x25f72d[_0x569b22(0x107)](_0x569b22(0xef),{'params':{'userIDs':[..._0x5aa73e]}}))[_0x569b22(0x127)]['users'][_0x569b22(0x10e)](_0x6955af=>{const _0x192893=_0x569b22;_0x6955af&&_0x5ab53f[_0x192893(0x10c)](_0x6955af);});};var K=Object[_0x3ccefd(0x12d)],V=(_0x7fa101,_0x57a0ef,_0x152c37,_0x13fac5)=>{const _0x1013b6=_0x3ccefd;for(var _0x3dac30=_0x13fac5>0x1?void 0x0:_0x13fac5?K(_0x57a0ef,_0x152c37):_0x57a0ef,_0x4553b8=_0x7fa101[_0x1013b6(0x148)]-0x1,_0x5d89b6;_0x4553b8>=0x0;_0x4553b8--)(_0x5d89b6=_0x7fa101[_0x4553b8])&&(_0x3dac30=_0x5d89b6(_0x3dac30)||_0x3dac30);return _0x3dac30;},p=(_0x1ba73e,_0x3b9ac2)=>(_0x57402e,_0x5109e4)=>_0x3b9ac2(_0x57402e,_0x5109e4,_0x1ba73e);function _0x31d0(_0x210e77,_0x483dd1){const _0x3b758=_0x3b75();return _0x31d0=function(_0x31d025,_0x45120c){_0x31d025=_0x31d025-0xec;let _0x3bb48e=_0x3b758[_0x31d025];return _0x3bb48e;},_0x31d0(_0x210e77,_0x483dd1);}let _=class extends _0x2cd795{constructor(_0x274955,_0x4fb634,_0x5b6808,_0x765ab2){const _0x1049da=_0x3ccefd;super(),this['_commentService']=_0x274955,this['_threadCommentModel']=_0x4fb634,this[_0x1049da(0x14d)]=_0x5b6808,this[_0x1049da(0x144)]=_0x765ab2,this[_0x1049da(0x103)](),this[_0x1049da(0x124)]();}[_0x3ccefd(0x124)](){const _0x5d0790=_0x3ccefd;this[_0x5d0790(0x11e)](this[_0x5d0790(0xee)][_0x5d0790(0x12f)]['pipe'](_0x56fda4(0x10))[_0x5d0790(0x122)](_0xae9b10=>{const _0x2751eb=_0x5d0790,_0x35c84b=new Set();_0xae9b10[_0x2751eb(0x10e)](_0x33dcae=>{const _0x17442d=_0x2751eb;switch(_0x33dcae[_0x17442d(0xec)]){case'add':{const _0x20347d=_0x33dcae[_0x17442d(0x132)]['personId'];_0x35c84b[_0x17442d(0x13a)](_0x20347d);break;}}}),B(this[_0x2751eb(0x144)],_0x35c84b);}));}[_0x3ccefd(0x103)](){const _0x281a8a=_0x3ccefd;this['disposeWithMe'](this[_0x281a8a(0x11c)]['commentUpdate$'][_0x281a8a(0x122)](async _0x2f2ffc=>{const _0x3df794=_0x281a8a;var _0x264cdc,_0x38a36f,_0x33f983,_0x3893b5;const _0x178381=(_0x264cdc=this[_0x3df794(0xee)][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0x4a0aa=>_0x4a0aa[_0x3df794(0xf5)]===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x264cdc[_0x3df794(0x133)];if(!_0x178381)return;const {unitId:_0x218998,subUnitId:_0x41ceef}=_0x178381;switch(_0x2f2ffc[_0x3df794(0x14f)]&&this['_userService'][_0x3df794(0x10c)](_0x2f2ffc['user']),_0x2f2ffc[_0x3df794(0xec)]){case v[_0x3df794(0xf7)]:break;case v['Reply']:{this[_0x3df794(0xee)][_0x3df794(0x146)](_0x218998,_0x41ceef,{'unitId':_0x218998,'subUnitId':_0x41ceef,'ref':'','id':_0x2f2ffc[_0x3df794(0x137)],'dT':y(+_0x2f2ffc['createTimestamp']),'threadId':_0x2f2ffc[_0x3df794(0xf5)],'personId':(_0x33f983=(_0x38a36f=_0x2f2ffc['user'])==null?void 0x0:_0x38a36f[_0x3df794(0x117)])!=null?_0x33f983:_0x2f2ffc[_0x3df794(0x150)],'text':JSON[_0x3df794(0x13d)](_0x2f2ffc[_0x3df794(0x130)]),'parentId':_0x178381['id']});break;}case v[_0x3df794(0x110)]:{const _0x305619=this['_threadCommentModel']['getComment'](_0x218998,_0x41ceef,_0x2f2ffc[_0x3df794(0x137)]);_0x305619&&_0x305619[_0x3df794(0x123)]&&this[_0x3df794(0xee)][_0x3df794(0x128)](_0x218998,_0x41ceef,_0x2f2ffc['replyId']);break;}case v[_0x3df794(0x112)]:{this[_0x3df794(0xee)][_0x3df794(0x111)](_0x218998,_0x41ceef,{'commentId':_0x2f2ffc[_0x3df794(0x137)],'text':JSON['parse'](_0x2f2ffc[_0x3df794(0x130)])});break;}case v[_0x3df794(0x121)]:{const _0x24a089=(_0x3893b5=this['_threadCommentModel'][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0xd45349=>_0xd45349['threadId']===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x3893b5['root'];_0x24a089&&this[_0x3df794(0xee)][_0x3df794(0x151)](_0x218998,_0x41ceef,_0x24a089['id'],_0x2f2ffc[_0x3df794(0x142)]===I[_0x3df794(0x118)]);break;}}}));}};_=V([p(0x0,_0x5c1e64(_0x11f515)),p(0x1,_0x5c1e64(_0x37ae10)),p(0x2,_0x5c1e64(_0x4d85ee)),p(0x3,_0x5c1e64(_0x31e86f))],_);const z=_0x3ccefd(0xed),O={};var k=Object[_0x3ccefd(0x12d)],Q=(_0x49c27c,_0xf52f21,_0x2afed6,_0x5c1fb0)=>{for(var _0x585dc9=_0x5c1fb0>0x1?void 0x0:_0x5c1fb0?k(_0xf52f21,_0x2afed6):_0xf52f21,_0x46f74e=_0x49c27c['length']-0x1,_0x51b0d3;_0x46f74e>=0x0;_0x46f74e--)(_0x51b0d3=_0x49c27c[_0x46f74e])&&(_0x585dc9=_0x51b0d3(_0x585dc9)||_0x585dc9);return _0x585dc9;},b=(_0x9467c4,_0x594426)=>(_0x26ff81,_0x17203d)=>_0x594426(_0x26ff81,_0x17203d,_0x9467c4);function _0x3b75(){const _0x1b25a9=['length','678751IzuesV','102wVuUhu','resolved','YYYY/MM/DD\x20HH:mm','_userService','values','user','userId','resolveComment','_threadCommentDataSource','type','thread-comment-data-source.config','_threadCommentModel','/universer-api/user/list','map','rangeType','getUnit','post','2221356YdmSXd','threadId','listComments','Add','error','21TVhohE','/universer-api/comment/unit/','ref','getMemberID','/delete','format','6148818sDMiDc','defineProperty','comment','3131365cEGDqf','_init','/reply','/list','users','get','syncUpdateMutationToColla','filter','saveCommentToSnapshot','comments','addUser','COMMENT','forEach','pluginName','Delete','updateComment','Edit','OpenOrReOpen','1152250SHIiiw','/solved','stringify','userID','Solved','_configService','setConfig','rangeId','_commentService','requireSession','disposeWithMe','createTimestamp','_sessionService','Solve','subscribe','parentId','_initUserSync','Reply','14548PIgJpc','body','deleteComment','customRanges','Unknown','UNIVER_UNKNOWN','find','getOwnPropertyDescriptor','size','commentUpdate$','content','dataSource','payload','root','reply','_httpService','unitId','replyId','getCurrentUser','delete','add','/edit','_config','parse','code','replies','_initDataSource','onReady','solved','UNRECOGNIZED','_injector','2659768TAqmiq','addComment','_threadCommentDataSourceService'];_0x3b75=function(){return _0x1b25a9;};return _0x3b75();}function X(_0x14c934,_0x51d512){const _0x406020=_0x3ccefd,_0x2827b6=_0x14c934[_0x406020(0x13f)][0x0];return{..._0x51d512,'id':_0x2827b6[_0x406020(0x137)],'resolved':_0x14c934[_0x406020(0x142)]===0x1,'dT':y(_0x2827b6[_0x406020(0x11f)]),'personId':_0x2827b6['userId'],'threadId':_0x2827b6['threadId']};}function ee(_0x2953fb,_0x523705,_0x18edb4){const _0x1c238d=_0x3ccefd;var _0x5d0a99,_0x3c7187;if(((_0x3c7187=(_0x5d0a99=_0x2953fb==null?void 0x0:_0x2953fb['replies'])==null?void 0x0:_0x5d0a99[_0x1c238d(0x148)])!=null?_0x3c7187:0x0)>0x0){const _0x3fae91=(_0x1cf9bd,_0x986a53)=>({'id':_0x1cf9bd[_0x1c238d(0x137)],'threadId':_0x1cf9bd[_0x1c238d(0xf5)],'dT':y(_0x1cf9bd['createTimestamp']),'personId':_0x1cf9bd[_0x1c238d(0x150)],'resolved':_0x2953fb[_0x1c238d(0x142)]===I['Solved'],'unitId':_0x523705,'subUnitId':_0x18edb4,'text':JSON[_0x1c238d(0x13d)](_0x1cf9bd['content']),'parentId':_0x986a53}),_0x2fdaae=_0x3fae91(_0x2953fb[_0x1c238d(0x13f)][0x0]);return{..._0x2fdaae,'children':_0x2953fb[_0x1c238d(0x13f)]['slice'](0x1)[_0x1c238d(0xf0)](_0x12fd77=>_0x3fae91(_0x12fd77,_0x2fdaae['id']))};}return null;}let S=class{constructor(_0x1083dc,_0x10f3ca,_0x5105fe){const _0x565799=_0x3ccefd;this[_0x565799(0x135)]=_0x1083dc,this[_0x565799(0x14d)]=_0x10f3ca,this[_0x565799(0x120)]=_0x5105fe;}async[_0x3ccefd(0x146)](_0x45f7d0){const _0x3b146d=_0x3ccefd;var _0x41eebf,_0xc142d4;const {parentId:_0x922980,unitId:_0x1d672d,text:_0x655913,threadId:_0x1b6aaa}=_0x45f7d0,_0x391e4f=(_0xc142d4=(_0x41eebf=_0x655913[_0x3b146d(0x129)])==null?void 0x0:_0x41eebf[_0x3b146d(0x109)](_0xd5e750=>_0xd5e750[_0x3b146d(0xf1)]===_0x4ac1a8[_0x3b146d(0x10d)])[_0x3b146d(0xf0)](_0xab0eeb=>_0xab0eeb[_0x3b146d(0x11b)]))!=null?_0xc142d4:[],_0x2faa26=JSON['stringify'](_0x655913),_0x56fe15=(await this[_0x3b146d(0x120)][_0x3b146d(0x11d)](_0x1d672d))[_0x3b146d(0xfc)]();if(_0x922980){const _0x536167={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f,'threadId':_0x1b6aaa},_0x597694=(await this[_0x3b146d(0x135)][_0x3b146d(0xf3)](_0x3b146d(0xfa)+_0x1d672d+_0x3b146d(0x104),{'body':_0x536167}))[_0x3b146d(0x127)][_0x3b146d(0x134)];return{..._0x45f7d0,'id':_0x597694[_0x3b146d(0x137)],'dT':_0x4e68e8(+_0x597694['createTimestamp'])[_0x3b146d(0xfe)](_0x3b146d(0x14c)),'personId':_0x597694[_0x3b146d(0x150)]};}else{const _0x255ac0={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f},_0x398d9a=await this[_0x3b146d(0x135)]['post'](_0x3b146d(0xfa)+_0x1d672d+'/add',{'body':_0x255ac0});return X(_0x398d9a[_0x3b146d(0x127)][_0x3b146d(0x101)],_0x45f7d0);}}async[_0x3ccefd(0x111)](_0x20e337){const _0x107189=_0x3ccefd;var _0x312e0e,_0x54be81;const {text:_0x49954d,unitId:_0x407518}=_0x20e337,_0x19a98a=(_0x54be81=(_0x312e0e=_0x49954d[_0x107189(0x129)])==null?void 0x0:_0x312e0e[_0x107189(0x109)](_0x1b6015=>_0x1b6015[_0x107189(0xf1)]===_0x4ac1a8[_0x107189(0x10d)])[_0x107189(0xf0)](_0x2ea468=>_0x2ea468[_0x107189(0x11b)]))!=null?_0x54be81:[],_0x11459d=JSON[_0x107189(0x116)](_0x49954d),_0x334776=_0x20e337[_0x107189(0xf5)],_0x529bd2=_0x20e337['id'],_0x365a24={'memberId':(await this['_sessionService'][_0x107189(0x11d)](_0x407518))[_0x107189(0xfc)](),'unitId':_0x407518,'threadId':_0x334776,'mention':_0x19a98a,'content':_0x11459d,'replyId':_0x529bd2},_0x54e038=await this[_0x107189(0x135)][_0x107189(0xf3)](_0x107189(0xfa)+_0x407518+_0x107189(0x13b),{'body':_0x365a24});return!_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]||_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]['code']===0x1;}async['resolveComment'](_0x1c4381){const _0x1220ca=_0x3ccefd,{unitId:_0x5879ab}=_0x1c4381,_0x1683be=_0x1c4381['threadId'],_0xbc7437={'memberId':this[_0x1220ca(0x14d)][_0x1220ca(0x138)]()[_0x1220ca(0x117)],'unitId':_0x5879ab,'threadId':_0x1683be,'solved':_0x1c4381[_0x1220ca(0x14b)]?I['Solved']:I[_0x1220ca(0x113)]},_0x330228=await this[_0x1220ca(0x135)][_0x1220ca(0xf3)](_0x1220ca(0xfa)+_0x5879ab+_0x1220ca(0x115),{'body':_0xbc7437});return!_0x330228[_0x1220ca(0x127)][_0x1220ca(0xf8)]||_0x330228[_0x1220ca(0x127)]['error'][_0x1220ca(0x13e)]===0x1;}async[_0x3ccefd(0x128)](_0x4f3cda,_0x150a81,_0x45fdd2,_0xa1883b){const _0xbc72d4=_0x3ccefd,_0x384011={'memberId':(await this[_0xbc72d4(0x120)][_0xbc72d4(0x11d)](_0x4f3cda))[_0xbc72d4(0xfc)](),'threadId':_0x45fdd2,'replyId':_0xa1883b,'unitId':_0x4f3cda},_0x126a78=await this[_0xbc72d4(0x135)][_0xbc72d4(0xf3)](_0xbc72d4(0xfa)+_0x4f3cda+_0xbc72d4(0xfd),{'body':_0x384011});return!_0x126a78['body'][_0xbc72d4(0xf8)]||_0x126a78[_0xbc72d4(0x127)][_0xbc72d4(0xf8)][_0xbc72d4(0x13e)]===0x1;}async[_0x3ccefd(0xf6)](_0x4796a9,_0x29db,_0x4969ca){const _0x1dfeec=_0x3ccefd,_0x4c9f8b={'unitId':_0x4796a9,'threadId':_0x4969ca},_0x267ad7=await this[_0x1dfeec(0x135)][_0x1dfeec(0xf3)](_0x1dfeec(0xfa)+_0x4796a9+_0x1dfeec(0x105),{'body':_0x4c9f8b}),_0x553820=_0x4969ca[_0x1dfeec(0xf0)](_0x126f65=>ee(_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x10b)][_0x126f65],_0x4796a9,_0x29db))[_0x1dfeec(0x109)](Boolean);return Object[_0x1dfeec(0x14e)](_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x106)])['forEach'](_0x5d6cf1=>{const _0x3bedd0=_0x1dfeec;this[_0x3bedd0(0x14d)][_0x3bedd0(0x10c)](_0x5d6cf1);}),_0x553820;}[_0x3ccefd(0x10a)](_0x4d5477){const _0x532a03=_0x3ccefd;return{'id':_0x4d5477['id'],'threadId':_0x4d5477[_0x532a03(0xf5)],'ref':_0x4d5477[_0x532a03(0xfb)]};}};S=Q([b(0x0,_0x5c1e64(_0x2cb4a2)),b(0x1,_0x5c1e64(_0x4d85ee)),b(0x2,_0x5c1e64(_0x52cf24))],S);var re=Object[_0x3ccefd(0x12d)],te=(_0x16735f,_0xd526ed,_0x107b61,_0x41fae0)=>{const _0x47c169=_0x3ccefd;for(var _0x456b28=_0x41fae0>0x1?void 0x0:_0x41fae0?re(_0xd526ed,_0x107b61):_0xd526ed,_0x5d4811=_0x16735f[_0x47c169(0x148)]-0x1,_0x8bdefb;_0x5d4811>=0x0;_0x5d4811--)(_0x8bdefb=_0x16735f[_0x5d4811])&&(_0x456b28=_0x8bdefb(_0x456b28)||_0x456b28);return _0x456b28;},M=(_0x181509,_0x3220d4)=>(_0x316aa5,_0x398c1c)=>_0x3220d4(_0x316aa5,_0x398c1c,_0x181509);let f=class extends _0x2cd795{constructor(_0x1d0bd3,_0x176758){const _0x146518=_0x3ccefd;super(),this['_threadCommentDataSourceService']=_0x1d0bd3,this[_0x146518(0x152)]=_0x176758,this[_0x146518(0x140)]();}[_0x3ccefd(0x140)](){const _0x19c71c=_0x3ccefd;this[_0x19c71c(0x147)][_0x19c71c(0x131)]=this[_0x19c71c(0x152)],this[_0x19c71c(0x147)][_0x19c71c(0x108)]=!0x1;}};f=te([M(0x0,_0x241c59),M(0x1,_0x5c1e64(S))],f);var se=Object[_0x3ccefd(0x100)],oe=Object[_0x3ccefd(0x12d)],ne=(_0x3fe621,_0x36983a,_0x49134e)=>_0x36983a in _0x3fe621?se(_0x3fe621,_0x36983a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49134e}):_0x3fe621[_0x36983a]=_0x49134e,ie=(_0xb59861,_0x18b867,_0x30e764,_0x3d61e1)=>{const _0x26fb94=_0x3ccefd;for(var _0x3d2bf8=_0x3d61e1>0x1?void 0x0:_0x3d61e1?oe(_0x18b867,_0x30e764):_0x18b867,_0x38debd=_0xb59861[_0x26fb94(0x148)]-0x1,_0x32db52;_0x38debd>=0x0;_0x38debd--)(_0x32db52=_0xb59861[_0x38debd])&&(_0x3d2bf8=_0x32db52(_0x3d2bf8)||_0x3d2bf8);return _0x3d2bf8;},N=(_0x3d8e0f,_0x8ff587)=>(_0x174dd2,_0x14e34d)=>_0x8ff587(_0x174dd2,_0x14e34d,_0x3d8e0f),$=(_0x48c3f9,_0x1ed7a5,_0x3a4819)=>ne(_0x48c3f9,typeof _0x1ed7a5!='symbol'?_0x1ed7a5+'':_0x1ed7a5,_0x3a4819);let g=class extends _0x1c4223{constructor(_0x2de67e=O,_0x445e94,_0xa998df){const _0x22417c=_0x3ccefd;super(),this[_0x22417c(0x13c)]=_0x2de67e,this['_injector']=_0x445e94,this['_configService']=_0xa998df;const {..._0x5c02f3}=_0x1a1877({},O,this[_0x22417c(0x13c)]);this[_0x22417c(0x119)][_0x22417c(0x11a)](z,_0x5c02f3);}['onStarting'](){const _0x1aaef6=_0x3ccefd;[[S],[f],[_]][_0x1aaef6(0x10e)](_0x25a859=>{const _0x3215da=_0x1aaef6;this[_0x3215da(0x144)][_0x3215da(0x13a)](_0x25a859);});}[_0x3ccefd(0x141)](){const _0x226725=_0x3ccefd;this[_0x226725(0x144)][_0x226725(0x107)](f),this['_injector'][_0x226725(0x107)](_);}};$(g,_0x3ccefd(0x10f),W),$(g,_0x3ccefd(0xec),_0x5f0730[_0x3ccefd(0x12b)]),g=ie([_0x7f6732(_0xe87a7f,_0x12ae43,_0x38eead),N(0x1,_0x5c1e64(_0x31e86f)),N(0x2,_0x405fde)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4119(_0x33c396,_0x7ecedc){const _0x3a31fa=_0x3a31();return _0x4119=function(_0x411952,_0x372456){_0x411952=_0x411952-0xab;let _0x2b7fee=_0x3a31fa[_0x411952];return _0x2b7fee;},_0x4119(_0x33c396,_0x7ecedc);}const _0x425e5f=_0x4119;(function(_0x4e8257,_0x4fb90c){const _0x64ad97=_0x4119,_0x46e20c=_0x4e8257();while(!![]){try{const _0x4641a8=-parseInt(_0x64ad97(0xab))/0x1*(-parseInt(_0x64ad97(0xc0))/0x2)+-parseInt(_0x64ad97(0x103))/0x3+-parseInt(_0x64ad97(0xfd))/0x4*(parseInt(_0x64ad97(0x10f))/0x5)+-parseInt(_0x64ad97(0xf6))/0x6*(parseInt(_0x64ad97(0xb9))/0x7)+parseInt(_0x64ad97(0xc1))/0x8*(parseInt(_0x64ad97(0xdf))/0x9)+-parseInt(_0x64ad97(0xbe))/0xa+-parseInt(_0x64ad97(0xd7))/0xb*(-parseInt(_0x64ad97(0xdc))/0xc);if(_0x4641a8===_0x4fb90c)break;else _0x46e20c['push'](_0x46e20c['shift']());}catch(_0x269378){_0x46e20c['push'](_0x46e20c['shift']());}}}(_0x3a31,0xdad0c));import{CommentService as _0x241de7,CollaborationSessionService as _0x1c1e03,UniverCollaborationClientPlugin as _0x21f04b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x548071}from'@univerjs-pro/license';import{dayjs as _0x56839b,UserManagerService as _0x517fcb,Inject as _0x722246,Injector as _0x25b10c,Disposable as _0x4d0fd0,CustomRangeType as _0x5dbbf9,UniverInstanceType as _0x1d123f,DependentOn as _0x5a38b0,IConfigService as _0x54164f,Plugin as _0x5d2b76,merge as _0x316a9a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49f318}from'@univerjs/thread-comment-ui';function _0x3a31(){const _0xd4b343=['_initDataSource','_userService','ref','_sessionService','_httpService','rangeId','root','listComments','forEach','add','error','filter','type','UNRECOGNIZED','saveCommentToSnapshot','addUser','4376614JRHNeu','syncUpdateMutationToColla','personId','post','solved','36EegEBS','YYYY/MM/DD\x20HH:mm','_configService','15938298nApGbu','getOwnPropertyDescriptor','threadId','symbol','subscribe','_commentService','get','COMMENT','deleteComment','pluginName','replyId','stringify','length','UNIVER_UNKNOWN','userId','user','values','reply','getUnit','/edit','_config','/solved','users','6lzmEmW','parse','Delete','defineProperty','content','_threadCommentDataSourceService','code','956JswijB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','Edit','_threadCommentDataSource','2998938AVjVwi','onReady','rangeType','comment','body','Unknown','_initUserSync','/universer-api/user/list','comments','Reply','map','OpenOrReOpen','17040GOukcz','replies','pipe','5KrXTfL','getCurrentUser','onStarting','userID','_threadCommentModel','Solve','createTimestamp','addComment','_init','/list','/universer-api/comment/unit/','getUser','payload','updateComment','6410089oSZpGB','unitId','_injector','customRanges','resolveComment','6631360LdEBdm','requireSession','529898THPCxt','8cvOfnx','Solved','Add','disposeWithMe','find','getMemberID'];_0x3a31=function(){return _0xd4b343;};return _0x3a31();}import{ThreadCommentModel as _0x33a7b8,IThreadCommentDataSourceService as _0x36983c}from'@univerjs/thread-comment';import{bufferTime as _0x250bbc}from'rxjs';import{HTTPService as _0x199b25}from'@univerjs/network';const W=_0x425e5f(0xfe);var I=(_0x42248f=>(_0x42248f[_0x42248f['OpenOrReOpen']=0x0]=_0x425e5f(0x10e),_0x42248f[_0x42248f[_0x425e5f(0xc2)]=0x1]='Solved',_0x42248f[_0x42248f[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x42248f))(I||{}),v=(_0x5abfa2=>(_0x5abfa2[_0x5abfa2[_0x425e5f(0x108)]=0x0]=_0x425e5f(0x108),_0x5abfa2[_0x5abfa2[_0x425e5f(0xc3)]=0x1]=_0x425e5f(0xc3),_0x5abfa2[_0x5abfa2[_0x425e5f(0x10c)]=0x2]=_0x425e5f(0x10c),_0x5abfa2[_0x5abfa2[_0x425e5f(0x101)]=0x3]='Edit',_0x5abfa2[_0x5abfa2[_0x425e5f(0xf8)]=0x4]=_0x425e5f(0xf8),_0x5abfa2[_0x5abfa2[_0x425e5f(0xb0)]=0x5]=_0x425e5f(0xb0),_0x5abfa2[_0x5abfa2[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x5abfa2))(v||{});const D=_0x284839=>_0x56839b(new Date(+_0x284839))[_0x425e5f(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4507a7,_0x31b235)=>{const _0x3ce1d8=_0x425e5f,_0x2f7b8d=_0x4507a7[_0x3ce1d8(0xe5)](_0x517fcb),_0x2c8720=_0x4507a7[_0x3ce1d8(0xe5)](_0x199b25);_0x31b235['forEach'](_0xc331e7=>{const _0x356049=_0x3ce1d8;_0x2f7b8d[_0x356049(0xb6)](_0xc331e7)&&_0x31b235['delete'](_0xc331e7);}),_0x31b235['size']&&(await _0x2c8720[_0x3ce1d8(0xe5)](_0x3ce1d8(0x10a),{'params':{'userIDs':[..._0x31b235]}}))[_0x3ce1d8(0x107)][_0x3ce1d8(0xf5)][_0x3ce1d8(0xcf)](_0x424c44=>{const _0x144387=_0x3ce1d8;_0x424c44&&_0x2f7b8d[_0x144387(0xd6)](_0x424c44);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x500302,_0x2e2fd0,_0x404d4e,_0x17012f)=>{const _0x525ac6=_0x425e5f;for(var _0x383411=_0x17012f>0x1?void 0x0:_0x17012f?K(_0x2e2fd0,_0x404d4e):_0x2e2fd0,_0xd73450=_0x500302[_0x525ac6(0xeb)]-0x1,_0x396eca;_0xd73450>=0x0;_0xd73450--)(_0x396eca=_0x500302[_0xd73450])&&(_0x383411=_0x396eca(_0x383411)||_0x383411);return _0x383411;},p=(_0x36b10a,_0x517527)=>(_0x3a8b79,_0x3dfb77)=>_0x517527(_0x3a8b79,_0x3dfb77,_0x36b10a);let S=class extends _0x4d0fd0{constructor(_0x1fa63b,_0x14cb90,_0x295174,_0x1b7135){const _0x3a2ad7=_0x425e5f;super(),this[_0x3a2ad7(0xe4)]=_0x1fa63b,this[_0x3a2ad7(0xaf)]=_0x14cb90,this['_userService']=_0x295174,this[_0x3a2ad7(0xbb)]=_0x1b7135,this['_init'](),this[_0x3a2ad7(0x109)]();}[_0x425e5f(0x109)](){const _0x4a568c=_0x425e5f;this[_0x4a568c(0xc4)](this[_0x4a568c(0xaf)]['commentUpdate$'][_0x4a568c(0x111)](_0x250bbc(0x10))[_0x4a568c(0xe3)](_0x3fad4e=>{const _0x245149=_0x4a568c,_0x5666d7=new Set();_0x3fad4e[_0x245149(0xcf)](_0x17fa86=>{const _0x8bf604=_0x245149;switch(_0x17fa86[_0x8bf604(0xd3)]){case _0x8bf604(0xd0):{const _0x46d500=_0x17fa86[_0x8bf604(0xb7)][_0x8bf604(0xd9)];_0x5666d7[_0x8bf604(0xd0)](_0x46d500);break;}}}),B(this['_injector'],_0x5666d7);}));}[_0x425e5f(0xb3)](){const _0x302938=_0x425e5f;this[_0x302938(0xc4)](this['_commentService']['commentUpdate$'][_0x302938(0xe3)](async _0x27400f=>{const _0x125426=_0x302938;var _0x290c8b,_0x27b31d,_0x128787,_0x55de0e;const _0x434ff4=(_0x290c8b=this[_0x125426(0xaf)][_0x125426(0xf1)](_0x27400f[_0x125426(0xba)])[_0x125426(0xc5)](_0x3e61dd=>_0x3e61dd['threadId']===_0x27400f['threadId']))==null?void 0x0:_0x290c8b[_0x125426(0xcd)];if(!_0x434ff4)return;const {unitId:_0x3bc7cb,subUnitId:_0x188ab5}=_0x434ff4;switch(_0x27400f[_0x125426(0xee)]&&this[_0x125426(0xc8)]['addUser'](_0x27400f[_0x125426(0xee)]),_0x27400f[_0x125426(0xd3)]){case v['Add']:break;case v[_0x125426(0x10c)]:{this[_0x125426(0xaf)][_0x125426(0xb2)](_0x3bc7cb,_0x188ab5,{'unitId':_0x3bc7cb,'subUnitId':_0x188ab5,'ref':'','id':_0x27400f[_0x125426(0xe9)],'dT':D(+_0x27400f[_0x125426(0xb1)]),'threadId':_0x27400f['threadId'],'personId':(_0x128787=(_0x27b31d=_0x27400f[_0x125426(0xee)])==null?void 0x0:_0x27b31d[_0x125426(0xae)])!=null?_0x128787:_0x27400f[_0x125426(0xed)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)]),'parentId':_0x434ff4['id']});break;}case v['Delete']:{const _0xb1ffec=this[_0x125426(0xaf)]['getComment'](_0x3bc7cb,_0x188ab5,_0x27400f[_0x125426(0xe9)]);_0xb1ffec&&_0xb1ffec['parentId']&&this[_0x125426(0xaf)]['deleteComment'](_0x3bc7cb,_0x188ab5,_0x27400f['replyId']);break;}case v['Edit']:{this[_0x125426(0xaf)]['updateComment'](_0x3bc7cb,_0x188ab5,{'commentId':_0x27400f[_0x125426(0xe9)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)])});break;}case v['Solve']:{const _0x30b031=(_0x55de0e=this['_threadCommentModel'][_0x125426(0xf1)](_0x27400f['unitId'])['find'](_0x50d026=>_0x50d026[_0x125426(0xe1)]===_0x27400f[_0x125426(0xe1)]))==null?void 0x0:_0x55de0e[_0x125426(0xcd)];_0x30b031&&this[_0x125426(0xaf)][_0x125426(0xbd)](_0x3bc7cb,_0x188ab5,_0x30b031['id'],_0x27400f['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x722246(_0x241de7)),p(0x1,_0x722246(_0x33a7b8)),p(0x2,_0x722246(_0x517fcb)),p(0x3,_0x722246(_0x25b10c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x425e5f(0xe0)],Q=(_0x2c9e87,_0x5bbf41,_0xc0d470,_0x3ca685)=>{for(var _0x150eff=_0x3ca685>0x1?void 0x0:_0x3ca685?k(_0x5bbf41,_0xc0d470):_0x5bbf41,_0x4b8d08=_0x2c9e87['length']-0x1,_0x1a0084;_0x4b8d08>=0x0;_0x4b8d08--)(_0x1a0084=_0x2c9e87[_0x4b8d08])&&(_0x150eff=_0x1a0084(_0x150eff)||_0x150eff);return _0x150eff;},_=(_0x35841f,_0x122090)=>(_0x5452d1,_0x397167)=>_0x122090(_0x5452d1,_0x397167,_0x35841f);function X(_0x45627c,_0x2314e5){const _0x3425bc=_0x425e5f,_0x494270=_0x45627c[_0x3425bc(0x110)][0x0];return{..._0x2314e5,'id':_0x494270[_0x3425bc(0xe9)],'resolved':_0x45627c[_0x3425bc(0xdb)]===0x1,'dT':D(_0x494270[_0x3425bc(0xb1)]),'personId':_0x494270['userId'],'threadId':_0x494270[_0x3425bc(0xe1)]};}function ee(_0x5bb631,_0x51d510,_0x56c115){const _0x265688=_0x425e5f;var _0x2b78d2,_0x94154a;if(((_0x94154a=(_0x2b78d2=_0x5bb631==null?void 0x0:_0x5bb631[_0x265688(0x110)])==null?void 0x0:_0x2b78d2[_0x265688(0xeb)])!=null?_0x94154a:0x0)>0x0){const _0x4bc798=(_0x193266,_0x145d37)=>({'id':_0x193266[_0x265688(0xe9)],'threadId':_0x193266[_0x265688(0xe1)],'dT':D(_0x193266[_0x265688(0xb1)]),'personId':_0x193266[_0x265688(0xed)],'resolved':_0x5bb631[_0x265688(0xdb)]===I['Solved'],'unitId':_0x51d510,'subUnitId':_0x56c115,'text':JSON[_0x265688(0xf7)](_0x193266[_0x265688(0xfa)]),'parentId':_0x145d37}),_0x5badc1=_0x4bc798(_0x5bb631['replies'][0x0]);return{..._0x5badc1,'children':_0x5bb631['replies']['slice'](0x1)['map'](_0x4cd4a4=>_0x4bc798(_0x4cd4a4,_0x5badc1['id']))};}return null;}let f=class{constructor(_0x4664a5,_0x1bc530,_0x453a75,_0x1da0e6){const _0x1027f7=_0x425e5f;this[_0x1027f7(0xcb)]=_0x4664a5,this[_0x1027f7(0xc8)]=_0x1bc530,this[_0x1027f7(0xca)]=_0x453a75,this[_0x1027f7(0xbb)]=_0x1da0e6;}async[_0x425e5f(0xb2)](_0x689999){const _0x86f68c=_0x425e5f;var _0x1faf94,_0x4b25bc;const {parentId:_0x53a94,unitId:_0x50aa87,text:_0x52355e,threadId:_0x2e3457}=_0x689999,_0x3c684e=(_0x4b25bc=(_0x1faf94=_0x52355e[_0x86f68c(0xbc)])==null?void 0x0:_0x1faf94[_0x86f68c(0xd2)](_0x5728cd=>_0x5728cd[_0x86f68c(0x105)]===_0x5dbbf9[_0x86f68c(0xe6)])[_0x86f68c(0x10d)](_0x4200a0=>_0x4200a0[_0x86f68c(0xcc)]))!=null?_0x4b25bc:[],_0x229563=JSON['stringify'](_0x52355e),_0x2c1fa3=(await this[_0x86f68c(0xca)][_0x86f68c(0xbf)](_0x50aa87))[_0x86f68c(0xc6)]();if(_0x53a94){const _0x47317a={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e,'threadId':_0x2e3457},_0x3dfa63=(await this['_httpService'][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/reply',{'body':_0x47317a}))[_0x86f68c(0x107)][_0x86f68c(0xf0)];return{..._0x689999,'id':_0x3dfa63[_0x86f68c(0xe9)],'dT':_0x56839b(+_0x3dfa63[_0x86f68c(0xb1)])[_0x86f68c(0xff)](_0x86f68c(0xdd)),'personId':_0x3dfa63[_0x86f68c(0xed)]};}else{const _0x51d8e1={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e},_0x1d87d9=await this[_0x86f68c(0xcb)][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/add',{'body':_0x51d8e1});return X(_0x1d87d9[_0x86f68c(0x107)][_0x86f68c(0x106)],_0x689999);}}async[_0x425e5f(0xb8)](_0x54c835){const _0x54e91c=_0x425e5f;var _0x40dafe,_0x5ef016;const {text:_0x5177ac,unitId:_0x6575d}=_0x54c835,_0x37d918=(_0x5ef016=(_0x40dafe=_0x5177ac['customRanges'])==null?void 0x0:_0x40dafe[_0x54e91c(0xd2)](_0x5721ab=>_0x5721ab[_0x54e91c(0x105)]===_0x5dbbf9['COMMENT'])['map'](_0x2ce100=>_0x2ce100['rangeId']))!=null?_0x5ef016:[],_0x381bc6=JSON[_0x54e91c(0xea)](_0x5177ac),_0x17e5f7=_0x54c835[_0x54e91c(0xe1)],_0x13cb70=_0x54c835['id'],_0x461bec={'memberId':(await this[_0x54e91c(0xca)]['requireSession'](_0x6575d))[_0x54e91c(0xc6)](),'unitId':_0x6575d,'threadId':_0x17e5f7,'mention':_0x37d918,'content':_0x381bc6,'replyId':_0x13cb70},_0x38e3a2=await this[_0x54e91c(0xcb)][_0x54e91c(0xda)](_0x54e91c(0xb5)+_0x6575d+_0x54e91c(0xf2),{'body':_0x461bec});return!_0x38e3a2[_0x54e91c(0x107)]['error']||_0x38e3a2['body'][_0x54e91c(0xd1)][_0x54e91c(0xfc)]===0x1;}async[_0x425e5f(0xbd)](_0x30762f){const _0x1cbdd4=_0x425e5f,{unitId:_0x4980a6}=_0x30762f,_0x5227a3=_0x30762f[_0x1cbdd4(0xe1)],_0x2cd44d={'memberId':this[_0x1cbdd4(0xc8)][_0x1cbdd4(0xac)]()[_0x1cbdd4(0xae)],'unitId':_0x4980a6,'threadId':_0x5227a3,'solved':_0x30762f['resolved']?I['Solved']:I['OpenOrReOpen']},_0x540e0c=await this[_0x1cbdd4(0xcb)][_0x1cbdd4(0xda)](_0x1cbdd4(0xb5)+_0x4980a6+_0x1cbdd4(0xf4),{'body':_0x2cd44d});return!_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)]||_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)][_0x1cbdd4(0xfc)]===0x1;}async[_0x425e5f(0xe7)](_0x562ce5,_0x31c8ae,_0x5d192c,_0x51c657){const _0x27aa85=_0x425e5f,_0x527fc1={'memberId':(await this[_0x27aa85(0xca)]['requireSession'](_0x562ce5))[_0x27aa85(0xc6)](),'threadId':_0x5d192c,'replyId':_0x51c657,'unitId':_0x562ce5},_0x255052=await this['_httpService'][_0x27aa85(0xda)](_0x27aa85(0xb5)+_0x562ce5+'/delete',{'body':_0x527fc1});return!_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]||_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]['code']===0x1;}async[_0x425e5f(0xce)](_0x22ca3f,_0x1dcfce,_0x4dafc7){const _0x5a5b03=_0x425e5f,_0x5dbc47={'unitId':_0x22ca3f,'threadId':_0x4dafc7},_0x2a0489=await this['_httpService']['post'](_0x5a5b03(0xb5)+_0x22ca3f+_0x5a5b03(0xb4),{'body':_0x5dbc47}),_0x533b53=_0x4dafc7[_0x5a5b03(0x10d)](_0x54fb20=>ee(_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0x10b)][_0x54fb20],_0x22ca3f,_0x1dcfce))[_0x5a5b03(0xd2)](Boolean);return Object[_0x5a5b03(0xef)](_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0xf5)])[_0x5a5b03(0xcf)](_0x16fd25=>{const _0x81b8fd=_0x5a5b03;this[_0x81b8fd(0xc8)]['addUser'](_0x16fd25);}),_0x533b53;}[_0x425e5f(0xd5)](_0x3a387d){const _0x597b38=_0x425e5f;return{'id':_0x3a387d['id'],'threadId':_0x3a387d['threadId'],'ref':_0x3a387d[_0x597b38(0xc9)]};}};f=Q([_(0x0,_0x722246(_0x199b25)),_(0x1,_0x722246(_0x517fcb)),_(0x2,_0x722246(_0x1c1e03)),_(0x3,_0x722246(_0x25b10c))],f);var re=Object[_0x425e5f(0xe0)],te=(_0x9f81f9,_0x54c8b6,_0x266938,_0xa26a6a)=>{const _0x394d41=_0x425e5f;for(var _0x3fa3cb=_0xa26a6a>0x1?void 0x0:_0xa26a6a?re(_0x54c8b6,_0x266938):_0x54c8b6,_0x4f72cb=_0x9f81f9[_0x394d41(0xeb)]-0x1,_0x59c7bb;_0x4f72cb>=0x0;_0x4f72cb--)(_0x59c7bb=_0x9f81f9[_0x4f72cb])&&(_0x3fa3cb=_0x59c7bb(_0x3fa3cb)||_0x3fa3cb);return _0x3fa3cb;},N=(_0x16bcfb,_0x1b5152)=>(_0xaedfca,_0x27e232)=>_0x1b5152(_0xaedfca,_0x27e232,_0x16bcfb);let g=class extends _0x4d0fd0{constructor(_0x2434d1,_0x318b48){const _0x42aafc=_0x425e5f;super(),this['_threadCommentDataSourceService']=_0x2434d1,this['_threadCommentDataSource']=_0x318b48,this[_0x42aafc(0xc7)]();}[_0x425e5f(0xc7)](){const _0x14d606=_0x425e5f;this[_0x14d606(0xfb)][_0x14d606(0x100)]=this[_0x14d606(0x102)],this[_0x14d606(0xfb)][_0x14d606(0xd8)]=!0x1;}};g=te([N(0x0,_0x36983c),N(0x1,_0x722246(f))],g);var se=Object[_0x425e5f(0xf9)],oe=Object[_0x425e5f(0xe0)],ne=(_0x5a9072,_0x5ec4fc,_0x6da4c2)=>_0x5ec4fc in _0x5a9072?se(_0x5a9072,_0x5ec4fc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6da4c2}):_0x5a9072[_0x5ec4fc]=_0x6da4c2,ie=(_0x4bb8e5,_0x19a3e5,_0x55390e,_0x43e9a5)=>{for(var _0x5a7cec=_0x43e9a5>0x1?void 0x0:_0x43e9a5?oe(_0x19a3e5,_0x55390e):_0x19a3e5,_0x48a66c=_0x4bb8e5['length']-0x1,_0x1d0097;_0x48a66c>=0x0;_0x48a66c--)(_0x1d0097=_0x4bb8e5[_0x48a66c])&&(_0x5a7cec=_0x1d0097(_0x5a7cec)||_0x5a7cec);return _0x5a7cec;},w=(_0x5de127,_0xc2847b)=>(_0x3d3baf,_0x514773)=>_0xc2847b(_0x3d3baf,_0x514773,_0x5de127),$=(_0x4a50ef,_0xdaae1c,_0x148dd2)=>ne(_0x4a50ef,typeof _0xdaae1c!=_0x425e5f(0xe2)?_0xdaae1c+'':_0xdaae1c,_0x148dd2);let b=class extends _0x5d2b76{constructor(_0x45c136=M,_0x4fe88f,_0x1a949d){const _0x41c0d3=_0x425e5f;super(),this[_0x41c0d3(0xf3)]=_0x45c136,this[_0x41c0d3(0xbb)]=_0x4fe88f,this[_0x41c0d3(0xde)]=_0x1a949d;const {..._0x3fbf03}=_0x316a9a({},M,this[_0x41c0d3(0xf3)]);this[_0x41c0d3(0xde)]['setConfig'](z,_0x3fbf03);}[_0x425e5f(0xad)](){const _0x5490df=_0x425e5f;[[f],[g],[S]][_0x5490df(0xcf)](_0xf0efb=>{const _0x533850=_0x5490df;this[_0x533850(0xbb)]['add'](_0xf0efb);});}[_0x425e5f(0x104)](){this['_injector']['get'](g),this['_injector']['get'](S);}};$(b,_0x425e5f(0xe8),W),$(b,_0x425e5f(0xd3),_0x1d123f[_0x425e5f(0xec)]),b=ie([_0x5a38b0(_0x49f318,_0x21f04b,_0x548071),w(0x1,_0x722246(_0x25b10c)),w(0x2,_0x54164f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3ccefd=_0x31d0;(function(_0x5ebe59,_0x22eb5f){const _0x31856b=_0x31d0,_0x130a96=_0x5ebe59();while(!![]){try{const _0x103ec5=parseInt(_0x31856b(0x149))/0x1+parseInt(_0x31856b(0x114))/0x2+parseInt(_0x31856b(0x14a))/0x3*(-parseInt(_0x31856b(0x126))/0x4)+-parseInt(_0x31856b(0x102))/0x5+parseInt(_0x31856b(0xf4))/0x6+-parseInt(_0x31856b(0xf9))/0x7*(parseInt(_0x31856b(0x145))/0x8)+parseInt(_0x31856b(0xff))/0x9;if(_0x103ec5===_0x22eb5f)break;else _0x130a96['push'](_0x130a96['shift']());}catch(_0x548ed6){_0x130a96['push'](_0x130a96['shift']());}}}(_0x3b75,0x88f40));import{CommentService as _0x11f515,CollaborationSessionService as _0x52cf24,UniverCollaborationClientPlugin as _0x12ae43}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38eead}from'@univerjs-pro/license';import{dayjs as _0x4e68e8,UserManagerService as _0x4d85ee,Inject as _0x5c1e64,Injector as _0x31e86f,Disposable as _0x2cd795,CustomRangeType as _0x4ac1a8,UniverInstanceType as _0x5f0730,DependentOn as _0x7f6732,IConfigService as _0x405fde,Plugin as _0x1c4223,merge as _0x1a1877}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe87a7f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37ae10,IThreadCommentDataSourceService as _0x241c59}from'@univerjs/thread-comment';import{bufferTime as _0x56fda4}from'rxjs';import{HTTPService as _0x2cb4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2abd50=>(_0x2abd50[_0x2abd50['OpenOrReOpen']=0x0]=_0x3ccefd(0x113),_0x2abd50[_0x2abd50[_0x3ccefd(0x118)]=0x1]=_0x3ccefd(0x118),_0x2abd50[_0x2abd50['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x2abd50))(I||{}),v=(_0x107047=>(_0x107047[_0x107047[_0x3ccefd(0x12a)]=0x0]=_0x3ccefd(0x12a),_0x107047[_0x107047[_0x3ccefd(0xf7)]=0x1]=_0x3ccefd(0xf7),_0x107047[_0x107047['Reply']=0x2]=_0x3ccefd(0x125),_0x107047[_0x107047[_0x3ccefd(0x112)]=0x3]='Edit',_0x107047[_0x107047[_0x3ccefd(0x110)]=0x4]=_0x3ccefd(0x110),_0x107047[_0x107047[_0x3ccefd(0x121)]=0x5]=_0x3ccefd(0x121),_0x107047[_0x107047['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x107047))(v||{});const y=_0x2866e2=>_0x4e68e8(new Date(+_0x2866e2))[_0x3ccefd(0xfe)](_0x3ccefd(0x14c)),B=async(_0x374df5,_0x5aa73e)=>{const _0x569b22=_0x3ccefd,_0x5ab53f=_0x374df5[_0x569b22(0x107)](_0x4d85ee),_0x25f72d=_0x374df5[_0x569b22(0x107)](_0x2cb4a2);_0x5aa73e['forEach'](_0x204518=>{const _0x573f43=_0x569b22;_0x5ab53f['getUser'](_0x204518)&&_0x5aa73e[_0x573f43(0x139)](_0x204518);}),_0x5aa73e[_0x569b22(0x12e)]&&(await _0x25f72d[_0x569b22(0x107)](_0x569b22(0xef),{'params':{'userIDs':[..._0x5aa73e]}}))[_0x569b22(0x127)]['users'][_0x569b22(0x10e)](_0x6955af=>{const _0x192893=_0x569b22;_0x6955af&&_0x5ab53f[_0x192893(0x10c)](_0x6955af);});};var K=Object[_0x3ccefd(0x12d)],V=(_0x7fa101,_0x57a0ef,_0x152c37,_0x13fac5)=>{const _0x1013b6=_0x3ccefd;for(var _0x3dac30=_0x13fac5>0x1?void 0x0:_0x13fac5?K(_0x57a0ef,_0x152c37):_0x57a0ef,_0x4553b8=_0x7fa101[_0x1013b6(0x148)]-0x1,_0x5d89b6;_0x4553b8>=0x0;_0x4553b8--)(_0x5d89b6=_0x7fa101[_0x4553b8])&&(_0x3dac30=_0x5d89b6(_0x3dac30)||_0x3dac30);return _0x3dac30;},p=(_0x1ba73e,_0x3b9ac2)=>(_0x57402e,_0x5109e4)=>_0x3b9ac2(_0x57402e,_0x5109e4,_0x1ba73e);function _0x31d0(_0x210e77,_0x483dd1){const _0x3b758=_0x3b75();return _0x31d0=function(_0x31d025,_0x45120c){_0x31d025=_0x31d025-0xec;let _0x3bb48e=_0x3b758[_0x31d025];return _0x3bb48e;},_0x31d0(_0x210e77,_0x483dd1);}let _=class extends _0x2cd795{constructor(_0x274955,_0x4fb634,_0x5b6808,_0x765ab2){const _0x1049da=_0x3ccefd;super(),this['_commentService']=_0x274955,this['_threadCommentModel']=_0x4fb634,this[_0x1049da(0x14d)]=_0x5b6808,this[_0x1049da(0x144)]=_0x765ab2,this[_0x1049da(0x103)](),this[_0x1049da(0x124)]();}[_0x3ccefd(0x124)](){const _0x5d0790=_0x3ccefd;this[_0x5d0790(0x11e)](this[_0x5d0790(0xee)][_0x5d0790(0x12f)]['pipe'](_0x56fda4(0x10))[_0x5d0790(0x122)](_0xae9b10=>{const _0x2751eb=_0x5d0790,_0x35c84b=new Set();_0xae9b10[_0x2751eb(0x10e)](_0x33dcae=>{const _0x17442d=_0x2751eb;switch(_0x33dcae[_0x17442d(0xec)]){case'add':{const _0x20347d=_0x33dcae[_0x17442d(0x132)]['personId'];_0x35c84b[_0x17442d(0x13a)](_0x20347d);break;}}}),B(this[_0x2751eb(0x144)],_0x35c84b);}));}[_0x3ccefd(0x103)](){const _0x281a8a=_0x3ccefd;this['disposeWithMe'](this[_0x281a8a(0x11c)]['commentUpdate$'][_0x281a8a(0x122)](async _0x2f2ffc=>{const _0x3df794=_0x281a8a;var _0x264cdc,_0x38a36f,_0x33f983,_0x3893b5;const _0x178381=(_0x264cdc=this[_0x3df794(0xee)][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0x4a0aa=>_0x4a0aa[_0x3df794(0xf5)]===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x264cdc[_0x3df794(0x133)];if(!_0x178381)return;const {unitId:_0x218998,subUnitId:_0x41ceef}=_0x178381;switch(_0x2f2ffc[_0x3df794(0x14f)]&&this['_userService'][_0x3df794(0x10c)](_0x2f2ffc['user']),_0x2f2ffc[_0x3df794(0xec)]){case v[_0x3df794(0xf7)]:break;case v['Reply']:{this[_0x3df794(0xee)][_0x3df794(0x146)](_0x218998,_0x41ceef,{'unitId':_0x218998,'subUnitId':_0x41ceef,'ref':'','id':_0x2f2ffc[_0x3df794(0x137)],'dT':y(+_0x2f2ffc['createTimestamp']),'threadId':_0x2f2ffc[_0x3df794(0xf5)],'personId':(_0x33f983=(_0x38a36f=_0x2f2ffc['user'])==null?void 0x0:_0x38a36f[_0x3df794(0x117)])!=null?_0x33f983:_0x2f2ffc[_0x3df794(0x150)],'text':JSON[_0x3df794(0x13d)](_0x2f2ffc[_0x3df794(0x130)]),'parentId':_0x178381['id']});break;}case v[_0x3df794(0x110)]:{const _0x305619=this['_threadCommentModel']['getComment'](_0x218998,_0x41ceef,_0x2f2ffc[_0x3df794(0x137)]);_0x305619&&_0x305619[_0x3df794(0x123)]&&this[_0x3df794(0xee)][_0x3df794(0x128)](_0x218998,_0x41ceef,_0x2f2ffc['replyId']);break;}case v[_0x3df794(0x112)]:{this[_0x3df794(0xee)][_0x3df794(0x111)](_0x218998,_0x41ceef,{'commentId':_0x2f2ffc[_0x3df794(0x137)],'text':JSON['parse'](_0x2f2ffc[_0x3df794(0x130)])});break;}case v[_0x3df794(0x121)]:{const _0x24a089=(_0x3893b5=this['_threadCommentModel'][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0xd45349=>_0xd45349['threadId']===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x3893b5['root'];_0x24a089&&this[_0x3df794(0xee)][_0x3df794(0x151)](_0x218998,_0x41ceef,_0x24a089['id'],_0x2f2ffc[_0x3df794(0x142)]===I[_0x3df794(0x118)]);break;}}}));}};_=V([p(0x0,_0x5c1e64(_0x11f515)),p(0x1,_0x5c1e64(_0x37ae10)),p(0x2,_0x5c1e64(_0x4d85ee)),p(0x3,_0x5c1e64(_0x31e86f))],_);const z=_0x3ccefd(0xed),O={};var k=Object[_0x3ccefd(0x12d)],Q=(_0x49c27c,_0xf52f21,_0x2afed6,_0x5c1fb0)=>{for(var _0x585dc9=_0x5c1fb0>0x1?void 0x0:_0x5c1fb0?k(_0xf52f21,_0x2afed6):_0xf52f21,_0x46f74e=_0x49c27c['length']-0x1,_0x51b0d3;_0x46f74e>=0x0;_0x46f74e--)(_0x51b0d3=_0x49c27c[_0x46f74e])&&(_0x585dc9=_0x51b0d3(_0x585dc9)||_0x585dc9);return _0x585dc9;},b=(_0x9467c4,_0x594426)=>(_0x26ff81,_0x17203d)=>_0x594426(_0x26ff81,_0x17203d,_0x9467c4);function _0x3b75(){const _0x1b25a9=['length','678751IzuesV','102wVuUhu','resolved','YYYY/MM/DD\x20HH:mm','_userService','values','user','userId','resolveComment','_threadCommentDataSource','type','thread-comment-data-source.config','_threadCommentModel','/universer-api/user/list','map','rangeType','getUnit','post','2221356YdmSXd','threadId','listComments','Add','error','21TVhohE','/universer-api/comment/unit/','ref','getMemberID','/delete','format','6148818sDMiDc','defineProperty','comment','3131365cEGDqf','_init','/reply','/list','users','get','syncUpdateMutationToColla','filter','saveCommentToSnapshot','comments','addUser','COMMENT','forEach','pluginName','Delete','updateComment','Edit','OpenOrReOpen','1152250SHIiiw','/solved','stringify','userID','Solved','_configService','setConfig','rangeId','_commentService','requireSession','disposeWithMe','createTimestamp','_sessionService','Solve','subscribe','parentId','_initUserSync','Reply','14548PIgJpc','body','deleteComment','customRanges','Unknown','UNIVER_UNKNOWN','find','getOwnPropertyDescriptor','size','commentUpdate$','content','dataSource','payload','root','reply','_httpService','unitId','replyId','getCurrentUser','delete','add','/edit','_config','parse','code','replies','_initDataSource','onReady','solved','UNRECOGNIZED','_injector','2659768TAqmiq','addComment','_threadCommentDataSourceService'];_0x3b75=function(){return _0x1b25a9;};return _0x3b75();}function X(_0x14c934,_0x51d512){const _0x406020=_0x3ccefd,_0x2827b6=_0x14c934[_0x406020(0x13f)][0x0];return{..._0x51d512,'id':_0x2827b6[_0x406020(0x137)],'resolved':_0x14c934[_0x406020(0x142)]===0x1,'dT':y(_0x2827b6[_0x406020(0x11f)]),'personId':_0x2827b6['userId'],'threadId':_0x2827b6['threadId']};}function ee(_0x2953fb,_0x523705,_0x18edb4){const _0x1c238d=_0x3ccefd;var _0x5d0a99,_0x3c7187;if(((_0x3c7187=(_0x5d0a99=_0x2953fb==null?void 0x0:_0x2953fb['replies'])==null?void 0x0:_0x5d0a99[_0x1c238d(0x148)])!=null?_0x3c7187:0x0)>0x0){const _0x3fae91=(_0x1cf9bd,_0x986a53)=>({'id':_0x1cf9bd[_0x1c238d(0x137)],'threadId':_0x1cf9bd[_0x1c238d(0xf5)],'dT':y(_0x1cf9bd['createTimestamp']),'personId':_0x1cf9bd[_0x1c238d(0x150)],'resolved':_0x2953fb[_0x1c238d(0x142)]===I['Solved'],'unitId':_0x523705,'subUnitId':_0x18edb4,'text':JSON[_0x1c238d(0x13d)](_0x1cf9bd['content']),'parentId':_0x986a53}),_0x2fdaae=_0x3fae91(_0x2953fb[_0x1c238d(0x13f)][0x0]);return{..._0x2fdaae,'children':_0x2953fb[_0x1c238d(0x13f)]['slice'](0x1)[_0x1c238d(0xf0)](_0x12fd77=>_0x3fae91(_0x12fd77,_0x2fdaae['id']))};}return null;}let S=class{constructor(_0x1083dc,_0x10f3ca,_0x5105fe){const _0x565799=_0x3ccefd;this[_0x565799(0x135)]=_0x1083dc,this[_0x565799(0x14d)]=_0x10f3ca,this[_0x565799(0x120)]=_0x5105fe;}async[_0x3ccefd(0x146)](_0x45f7d0){const _0x3b146d=_0x3ccefd;var _0x41eebf,_0xc142d4;const {parentId:_0x922980,unitId:_0x1d672d,text:_0x655913,threadId:_0x1b6aaa}=_0x45f7d0,_0x391e4f=(_0xc142d4=(_0x41eebf=_0x655913[_0x3b146d(0x129)])==null?void 0x0:_0x41eebf[_0x3b146d(0x109)](_0xd5e750=>_0xd5e750[_0x3b146d(0xf1)]===_0x4ac1a8[_0x3b146d(0x10d)])[_0x3b146d(0xf0)](_0xab0eeb=>_0xab0eeb[_0x3b146d(0x11b)]))!=null?_0xc142d4:[],_0x2faa26=JSON['stringify'](_0x655913),_0x56fe15=(await this[_0x3b146d(0x120)][_0x3b146d(0x11d)](_0x1d672d))[_0x3b146d(0xfc)]();if(_0x922980){const _0x536167={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f,'threadId':_0x1b6aaa},_0x597694=(await this[_0x3b146d(0x135)][_0x3b146d(0xf3)](_0x3b146d(0xfa)+_0x1d672d+_0x3b146d(0x104),{'body':_0x536167}))[_0x3b146d(0x127)][_0x3b146d(0x134)];return{..._0x45f7d0,'id':_0x597694[_0x3b146d(0x137)],'dT':_0x4e68e8(+_0x597694['createTimestamp'])[_0x3b146d(0xfe)](_0x3b146d(0x14c)),'personId':_0x597694[_0x3b146d(0x150)]};}else{const _0x255ac0={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f},_0x398d9a=await this[_0x3b146d(0x135)]['post'](_0x3b146d(0xfa)+_0x1d672d+'/add',{'body':_0x255ac0});return X(_0x398d9a[_0x3b146d(0x127)][_0x3b146d(0x101)],_0x45f7d0);}}async[_0x3ccefd(0x111)](_0x20e337){const _0x107189=_0x3ccefd;var _0x312e0e,_0x54be81;const {text:_0x49954d,unitId:_0x407518}=_0x20e337,_0x19a98a=(_0x54be81=(_0x312e0e=_0x49954d[_0x107189(0x129)])==null?void 0x0:_0x312e0e[_0x107189(0x109)](_0x1b6015=>_0x1b6015[_0x107189(0xf1)]===_0x4ac1a8[_0x107189(0x10d)])[_0x107189(0xf0)](_0x2ea468=>_0x2ea468[_0x107189(0x11b)]))!=null?_0x54be81:[],_0x11459d=JSON[_0x107189(0x116)](_0x49954d),_0x334776=_0x20e337[_0x107189(0xf5)],_0x529bd2=_0x20e337['id'],_0x365a24={'memberId':(await this['_sessionService'][_0x107189(0x11d)](_0x407518))[_0x107189(0xfc)](),'unitId':_0x407518,'threadId':_0x334776,'mention':_0x19a98a,'content':_0x11459d,'replyId':_0x529bd2},_0x54e038=await this[_0x107189(0x135)][_0x107189(0xf3)](_0x107189(0xfa)+_0x407518+_0x107189(0x13b),{'body':_0x365a24});return!_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]||_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]['code']===0x1;}async['resolveComment'](_0x1c4381){const _0x1220ca=_0x3ccefd,{unitId:_0x5879ab}=_0x1c4381,_0x1683be=_0x1c4381['threadId'],_0xbc7437={'memberId':this[_0x1220ca(0x14d)][_0x1220ca(0x138)]()[_0x1220ca(0x117)],'unitId':_0x5879ab,'threadId':_0x1683be,'solved':_0x1c4381[_0x1220ca(0x14b)]?I['Solved']:I[_0x1220ca(0x113)]},_0x330228=await this[_0x1220ca(0x135)][_0x1220ca(0xf3)](_0x1220ca(0xfa)+_0x5879ab+_0x1220ca(0x115),{'body':_0xbc7437});return!_0x330228[_0x1220ca(0x127)][_0x1220ca(0xf8)]||_0x330228[_0x1220ca(0x127)]['error'][_0x1220ca(0x13e)]===0x1;}async[_0x3ccefd(0x128)](_0x4f3cda,_0x150a81,_0x45fdd2,_0xa1883b){const _0xbc72d4=_0x3ccefd,_0x384011={'memberId':(await this[_0xbc72d4(0x120)][_0xbc72d4(0x11d)](_0x4f3cda))[_0xbc72d4(0xfc)](),'threadId':_0x45fdd2,'replyId':_0xa1883b,'unitId':_0x4f3cda},_0x126a78=await this[_0xbc72d4(0x135)][_0xbc72d4(0xf3)](_0xbc72d4(0xfa)+_0x4f3cda+_0xbc72d4(0xfd),{'body':_0x384011});return!_0x126a78['body'][_0xbc72d4(0xf8)]||_0x126a78[_0xbc72d4(0x127)][_0xbc72d4(0xf8)][_0xbc72d4(0x13e)]===0x1;}async[_0x3ccefd(0xf6)](_0x4796a9,_0x29db,_0x4969ca){const _0x1dfeec=_0x3ccefd,_0x4c9f8b={'unitId':_0x4796a9,'threadId':_0x4969ca},_0x267ad7=await this[_0x1dfeec(0x135)][_0x1dfeec(0xf3)](_0x1dfeec(0xfa)+_0x4796a9+_0x1dfeec(0x105),{'body':_0x4c9f8b}),_0x553820=_0x4969ca[_0x1dfeec(0xf0)](_0x126f65=>ee(_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x10b)][_0x126f65],_0x4796a9,_0x29db))[_0x1dfeec(0x109)](Boolean);return Object[_0x1dfeec(0x14e)](_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x106)])['forEach'](_0x5d6cf1=>{const _0x3bedd0=_0x1dfeec;this[_0x3bedd0(0x14d)][_0x3bedd0(0x10c)](_0x5d6cf1);}),_0x553820;}[_0x3ccefd(0x10a)](_0x4d5477){const _0x532a03=_0x3ccefd;return{'id':_0x4d5477['id'],'threadId':_0x4d5477[_0x532a03(0xf5)],'ref':_0x4d5477[_0x532a03(0xfb)]};}};S=Q([b(0x0,_0x5c1e64(_0x2cb4a2)),b(0x1,_0x5c1e64(_0x4d85ee)),b(0x2,_0x5c1e64(_0x52cf24))],S);var re=Object[_0x3ccefd(0x12d)],te=(_0x16735f,_0xd526ed,_0x107b61,_0x41fae0)=>{const _0x47c169=_0x3ccefd;for(var _0x456b28=_0x41fae0>0x1?void 0x0:_0x41fae0?re(_0xd526ed,_0x107b61):_0xd526ed,_0x5d4811=_0x16735f[_0x47c169(0x148)]-0x1,_0x8bdefb;_0x5d4811>=0x0;_0x5d4811--)(_0x8bdefb=_0x16735f[_0x5d4811])&&(_0x456b28=_0x8bdefb(_0x456b28)||_0x456b28);return _0x456b28;},M=(_0x181509,_0x3220d4)=>(_0x316aa5,_0x398c1c)=>_0x3220d4(_0x316aa5,_0x398c1c,_0x181509);let f=class extends _0x2cd795{constructor(_0x1d0bd3,_0x176758){const _0x146518=_0x3ccefd;super(),this['_threadCommentDataSourceService']=_0x1d0bd3,this[_0x146518(0x152)]=_0x176758,this[_0x146518(0x140)]();}[_0x3ccefd(0x140)](){const _0x19c71c=_0x3ccefd;this[_0x19c71c(0x147)][_0x19c71c(0x131)]=this[_0x19c71c(0x152)],this[_0x19c71c(0x147)][_0x19c71c(0x108)]=!0x1;}};f=te([M(0x0,_0x241c59),M(0x1,_0x5c1e64(S))],f);var se=Object[_0x3ccefd(0x100)],oe=Object[_0x3ccefd(0x12d)],ne=(_0x3fe621,_0x36983a,_0x49134e)=>_0x36983a in _0x3fe621?se(_0x3fe621,_0x36983a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49134e}):_0x3fe621[_0x36983a]=_0x49134e,ie=(_0xb59861,_0x18b867,_0x30e764,_0x3d61e1)=>{const _0x26fb94=_0x3ccefd;for(var _0x3d2bf8=_0x3d61e1>0x1?void 0x0:_0x3d61e1?oe(_0x18b867,_0x30e764):_0x18b867,_0x38debd=_0xb59861[_0x26fb94(0x148)]-0x1,_0x32db52;_0x38debd>=0x0;_0x38debd--)(_0x32db52=_0xb59861[_0x38debd])&&(_0x3d2bf8=_0x32db52(_0x3d2bf8)||_0x3d2bf8);return _0x3d2bf8;},N=(_0x3d8e0f,_0x8ff587)=>(_0x174dd2,_0x14e34d)=>_0x8ff587(_0x174dd2,_0x14e34d,_0x3d8e0f),$=(_0x48c3f9,_0x1ed7a5,_0x3a4819)=>ne(_0x48c3f9,typeof _0x1ed7a5!='symbol'?_0x1ed7a5+'':_0x1ed7a5,_0x3a4819);let g=class extends _0x1c4223{constructor(_0x2de67e=O,_0x445e94,_0xa998df){const _0x22417c=_0x3ccefd;super(),this[_0x22417c(0x13c)]=_0x2de67e,this['_injector']=_0x445e94,this['_configService']=_0xa998df;const {..._0x5c02f3}=_0x1a1877({},O,this[_0x22417c(0x13c)]);this[_0x22417c(0x119)][_0x22417c(0x11a)](z,_0x5c02f3);}['onStarting'](){const _0x1aaef6=_0x3ccefd;[[S],[f],[_]][_0x1aaef6(0x10e)](_0x25a859=>{const _0x3215da=_0x1aaef6;this[_0x3215da(0x144)][_0x3215da(0x13a)](_0x25a859);});}[_0x3ccefd(0x141)](){const _0x226725=_0x3ccefd;this[_0x226725(0x144)][_0x226725(0x107)](f),this['_injector'][_0x226725(0x107)](_);}};$(g,_0x3ccefd(0x10f),W),$(g,_0x3ccefd(0xec),_0x5f0730[_0x3ccefd(0x12b)]),g=ie([_0x7f6732(_0xe87a7f,_0x12ae43,_0x38eead),N(0x1,_0x5c1e64(_0x31e86f)),N(0x2,_0x405fde)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { IBaseComment, IThreadComment, IThreadCommentDataSource } from '@univerjs/thread-comment';
|
|
2
2
|
import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
|
|
3
|
-
import {
|
|
3
|
+
import { UserManagerService } from '@univerjs/core';
|
|
4
4
|
import { HTTPService } from '@univerjs/network';
|
|
5
5
|
export declare class ThreadCommentServerDataSource implements IThreadCommentDataSource {
|
|
6
6
|
private readonly _httpService;
|
|
7
7
|
private readonly _userService;
|
|
8
8
|
private readonly _sessionService;
|
|
9
|
-
|
|
10
|
-
constructor(_httpService: HTTPService, _userService: UserManagerService, _sessionService: CollaborationSessionService, _injector: Injector);
|
|
9
|
+
constructor(_httpService: HTTPService, _userService: UserManagerService, _sessionService: CollaborationSessionService);
|
|
11
10
|
addComment(comment: IThreadComment): Promise<IThreadComment>;
|
|
12
11
|
updateComment(comment: IThreadComment): Promise<boolean>;
|
|
13
12
|
resolveComment(comment: IThreadComment): Promise<boolean>;
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xac8b(_0x349f53,_0x1b7620){const _0x210c8d=_0x210c();return _0xac8b=function(_0xac8bb9,_0x4e2e7b){_0xac8bb9=_0xac8bb9-0xa4;let _0x235519=_0x210c8d[_0xac8bb9];return _0x235519;},_0xac8b(_0x349f53,_0x1b7620);}(function(_0x38003a,_0x17c3e0){const _0x5ed62e=_0xac8b,_0x231e73=_0x38003a();while(!![]){try{const _0x3e5fc9=parseInt(_0x5ed62e(0x11f))/0x1*(parseInt(_0x5ed62e(0xd8))/0x2)+parseInt(_0x5ed62e(0xcf))/0x3+parseInt(_0x5ed62e(0xd0))/0x4*(parseInt(_0x5ed62e(0xc2))/0x5)+-parseInt(_0x5ed62e(0xe5))/0x6+-parseInt(_0x5ed62e(0xbd))/0x7*(-parseInt(_0x5ed62e(0xb4))/0x8)+-parseInt(_0x5ed62e(0xe3))/0x9*(parseInt(_0x5ed62e(0xf7))/0xa)+-parseInt(_0x5ed62e(0x103))/0xb;if(_0x3e5fc9===_0x17c3e0)break;else _0x231e73['push'](_0x231e73['shift']());}catch(_0xb42b70){_0x231e73['push'](_0x231e73['shift']());}}}(_0x210c,0x78ea9),function(_0x472981,_0x10d18d){const _0x24b9d0=_0xac8b;typeof exports==_0x24b9d0(0xbf)&&typeof module<'u'?_0x10d18d(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x24b9d0(0x116)]?define([_0x24b9d0(0xda),_0x24b9d0(0x122),_0x24b9d0(0xe4),_0x24b9d0(0xa9),_0x24b9d0(0xba),'@univerjs/thread-comment',_0x24b9d0(0xd5),_0x24b9d0(0xd7)],_0x10d18d):(_0x472981=typeof globalThis<'u'?globalThis:_0x472981||self,_0x10d18d(_0x472981[_0x24b9d0(0xc1)]={},_0x472981[_0x24b9d0(0xdb)],_0x472981[_0x24b9d0(0xa8)],_0x472981['UniverCore'],_0x472981[_0x24b9d0(0x110)],_0x472981[_0x24b9d0(0xb9)],_0x472981[_0x24b9d0(0xd5)],_0x472981[_0x24b9d0(0x121)]));}(this,function(_0x3f28f9,_0x464d37,_0x3841b4,_0x4175d3,_0x14644c,_0x391618,_0x399f04,_0x3c568e){'use strict';const _0x3e564b=_0xac8b;const _0x3eb321=_0x3e564b(0x10e);var _0x58b7cb=(_0x3b7cf9=>(_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xe7)]=0x0]='OpenOrReOpen',_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xf5)]=0x1]='Solved',_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xe0)]=-0x1]='UNRECOGNIZED',_0x3b7cf9))(_0x58b7cb||{}),_0x3503fc=(_0x506305=>(_0x506305[_0x506305[_0x3e564b(0x120)]=0x0]=_0x3e564b(0x120),_0x506305[_0x506305[_0x3e564b(0xc9)]=0x1]=_0x3e564b(0xc9),_0x506305[_0x506305['Reply']=0x2]=_0x3e564b(0xd4),_0x506305[_0x506305[_0x3e564b(0xbc)]=0x3]=_0x3e564b(0xbc),_0x506305[_0x506305[_0x3e564b(0xff)]=0x4]=_0x3e564b(0xff),_0x506305[_0x506305[_0x3e564b(0xf1)]=0x5]=_0x3e564b(0xf1),_0x506305[_0x506305[_0x3e564b(0xe0)]=-0x1]='UNRECOGNIZED',_0x506305))(_0x3503fc||{});const _0x658574=_0x3819c9=>_0x4175d3[_0x3e564b(0x109)](new Date(+_0x3819c9))['format']('YYYY/MM/DD\x20HH:mm'),_0x3ecf13=async(_0x4f5c70,_0x3b711f)=>{const _0x2d7db1=_0x3e564b,_0x5c4c6e=_0x4f5c70[_0x2d7db1(0x10f)](_0x4175d3[_0x2d7db1(0x10a)]),_0x540302=_0x4f5c70['get'](_0x3c568e[_0x2d7db1(0xcd)]);_0x3b711f[_0x2d7db1(0xcc)](_0xfbe496=>{const _0x4347a0=_0x2d7db1;_0x5c4c6e[_0x4347a0(0x119)](_0xfbe496)&&_0x3b711f[_0x4347a0(0xf0)](_0xfbe496);}),_0x3b711f[_0x2d7db1(0x11e)]&&(await _0x540302[_0x2d7db1(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b711f]}}))[_0x2d7db1(0xd2)]['users'][_0x2d7db1(0xcc)](_0x35314e=>{const _0x1dc96a=_0x2d7db1;_0x35314e&&_0x5c4c6e[_0x1dc96a(0xfb)](_0x35314e);});};var _0x47a7c6=Object[_0x3e564b(0xc8)],_0x2cd025=(_0x90ba7d,_0x564a02,_0x5d5e0c,_0x2eb20e)=>{const _0x28d1a6=_0x3e564b;for(var _0x35cd4c=_0x2eb20e>0x1?void 0x0:_0x2eb20e?_0x47a7c6(_0x564a02,_0x5d5e0c):_0x564a02,_0x362b74=_0x90ba7d[_0x28d1a6(0xc7)]-0x1,_0x5ca26b;_0x362b74>=0x0;_0x362b74--)(_0x5ca26b=_0x90ba7d[_0x362b74])&&(_0x35cd4c=_0x5ca26b(_0x35cd4c)||_0x35cd4c);return _0x35cd4c;},_0x52f777=(_0x3a51d2,_0x5527f1)=>(_0x1537b4,_0x105b2c)=>_0x5527f1(_0x1537b4,_0x105b2c,_0x3a51d2);let _0x96850c=class extends _0x4175d3[_0x3e564b(0x124)]{constructor(_0x20d0f9,_0x287d0b,_0x32c68d,_0x36ff36){const _0x2e2b96=_0x3e564b;super(),this[_0x2e2b96(0xf9)]=_0x20d0f9,this['_threadCommentModel']=_0x287d0b,this[_0x2e2b96(0xdc)]=_0x32c68d,this[_0x2e2b96(0xdd)]=_0x36ff36,this['_init'](),this[_0x2e2b96(0x108)]();}['_initUserSync'](){const _0x36c5c6=_0x3e564b;this['disposeWithMe'](this['_threadCommentModel'][_0x36c5c6(0xf3)][_0x36c5c6(0xab)](_0x399f04[_0x36c5c6(0x101)](0x10))[_0x36c5c6(0x11a)](_0x2c3fcc=>{const _0x595183=_0x36c5c6,_0x5d52f2=new Set();_0x2c3fcc[_0x595183(0xcc)](_0x268d27=>{const _0x3fd078=_0x595183;switch(_0x268d27[_0x3fd078(0x115)]){case _0x3fd078(0xa5):{const _0x556f0a=_0x268d27[_0x3fd078(0xaf)][_0x3fd078(0xfa)];_0x5d52f2[_0x3fd078(0xa5)](_0x556f0a);break;}}}),_0x3ecf13(this[_0x595183(0xdd)],_0x5d52f2);}));}[_0x3e564b(0xec)](){const _0x29fdf2=_0x3e564b;this[_0x29fdf2(0x10c)](this[_0x29fdf2(0xf9)]['commentUpdate$'][_0x29fdf2(0x11a)](async _0x5a13c6=>{const _0x5c4bb2=_0x29fdf2;var _0x5b570e,_0x4a6f68,_0x3e6bf4,_0x25353c;const _0x131a71=(_0x5b570e=this[_0x5c4bb2(0xae)]['getUnit'](_0x5a13c6[_0x5c4bb2(0xa6)])[_0x5c4bb2(0xb7)](_0x85e900=>_0x85e900[_0x5c4bb2(0xf8)]===_0x5a13c6[_0x5c4bb2(0xf8)]))==null?void 0x0:_0x5b570e[_0x5c4bb2(0xad)];if(!_0x131a71)return;const {unitId:_0x9f94a6,subUnitId:_0x21bc47}=_0x131a71;switch(_0x5a13c6[_0x5c4bb2(0xf6)]&&this['_userService']['addUser'](_0x5a13c6[_0x5c4bb2(0xf6)]),_0x5a13c6[_0x5c4bb2(0x115)]){case _0x3503fc[_0x5c4bb2(0xc9)]:break;case _0x3503fc[_0x5c4bb2(0xd4)]:{this[_0x5c4bb2(0xae)][_0x5c4bb2(0x104)](_0x9f94a6,_0x21bc47,{'unitId':_0x9f94a6,'subUnitId':_0x21bc47,'ref':'','id':_0x5a13c6[_0x5c4bb2(0xce)],'dT':_0x658574(+_0x5a13c6[_0x5c4bb2(0xd9)]),'threadId':_0x5a13c6[_0x5c4bb2(0xf8)],'personId':(_0x3e6bf4=(_0x4a6f68=_0x5a13c6['user'])==null?void 0x0:_0x4a6f68[_0x5c4bb2(0x10b)])!=null?_0x3e6bf4:_0x5a13c6[_0x5c4bb2(0x11c)],'text':JSON[_0x5c4bb2(0xc5)](_0x5a13c6[_0x5c4bb2(0x118)]),'parentId':_0x131a71['id']});break;}case _0x3503fc[_0x5c4bb2(0xff)]:{const _0x259ad8=this[_0x5c4bb2(0xae)]['getComment'](_0x9f94a6,_0x21bc47,_0x5a13c6['replyId']);_0x259ad8&&_0x259ad8[_0x5c4bb2(0x11b)]&&this[_0x5c4bb2(0xae)]['deleteComment'](_0x9f94a6,_0x21bc47,_0x5a13c6[_0x5c4bb2(0xce)]);break;}case _0x3503fc['Edit']:{this[_0x5c4bb2(0xae)][_0x5c4bb2(0xd6)](_0x9f94a6,_0x21bc47,{'commentId':_0x5a13c6[_0x5c4bb2(0xce)],'text':JSON['parse'](_0x5a13c6[_0x5c4bb2(0x118)])});break;}case _0x3503fc['Solve']:{const _0x34e606=(_0x25353c=this[_0x5c4bb2(0xae)][_0x5c4bb2(0xb1)](_0x5a13c6[_0x5c4bb2(0xa6)])[_0x5c4bb2(0xb7)](_0x2afe88=>_0x2afe88[_0x5c4bb2(0xf8)]===_0x5a13c6[_0x5c4bb2(0xf8)]))==null?void 0x0:_0x25353c[_0x5c4bb2(0xad)];_0x34e606&&this[_0x5c4bb2(0xae)][_0x5c4bb2(0xcb)](_0x9f94a6,_0x21bc47,_0x34e606['id'],_0x5a13c6[_0x5c4bb2(0xfe)]===_0x58b7cb[_0x5c4bb2(0xf5)]);break;}}}));}};_0x96850c=_0x2cd025([_0x52f777(0x0,_0x4175d3[_0x3e564b(0xca)](_0x464d37[_0x3e564b(0xe8)])),_0x52f777(0x1,_0x4175d3[_0x3e564b(0xca)](_0x391618[_0x3e564b(0xea)])),_0x52f777(0x2,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x10a)])),_0x52f777(0x3,_0x4175d3['Inject'](_0x4175d3[_0x3e564b(0x113)]))],_0x96850c);const _0x7b069a='thread-comment-data-source.config',_0x4dbde8={};var _0x467f3a=Object[_0x3e564b(0xc8)],_0x287e6a=(_0xcf2adb,_0x3ee68e,_0x41a483,_0x5d5741)=>{for(var _0x30e891=_0x5d5741>0x1?void 0x0:_0x5d5741?_0x467f3a(_0x3ee68e,_0x41a483):_0x3ee68e,_0x52e78e=_0xcf2adb['length']-0x1,_0x3824a7;_0x52e78e>=0x0;_0x52e78e--)(_0x3824a7=_0xcf2adb[_0x52e78e])&&(_0x30e891=_0x3824a7(_0x30e891)||_0x30e891);return _0x30e891;},_0x46a99e=(_0x222e6d,_0x5a5a22)=>(_0x32f9ae,_0x2e5302)=>_0x5a5a22(_0x32f9ae,_0x2e5302,_0x222e6d);function _0x1fe52e(_0x302cd0,_0x4c4c81){const _0x7e5952=_0x3e564b,_0x3ba1de=_0x302cd0['replies'][0x0];return{..._0x4c4c81,'id':_0x3ba1de['replyId'],'resolved':_0x302cd0[_0x7e5952(0xfe)]===0x1,'dT':_0x658574(_0x3ba1de[_0x7e5952(0xd9)]),'personId':_0x3ba1de['userId'],'threadId':_0x3ba1de[_0x7e5952(0xf8)]};}function _0x22ae1d(_0x2a93d1,_0x2129dd,_0x35f1ce){const _0x17a96a=_0x3e564b;var _0x9be277,_0xc8a0fc;if(((_0xc8a0fc=(_0x9be277=_0x2a93d1==null?void 0x0:_0x2a93d1['replies'])==null?void 0x0:_0x9be277[_0x17a96a(0xc7)])!=null?_0xc8a0fc:0x0)>0x0){const _0x3ff6e4=(_0xe02805,_0x40a35c)=>({'id':_0xe02805['replyId'],'threadId':_0xe02805[_0x17a96a(0xf8)],'dT':_0x658574(_0xe02805[_0x17a96a(0xd9)]),'personId':_0xe02805[_0x17a96a(0x11c)],'resolved':_0x2a93d1[_0x17a96a(0xfe)]===_0x58b7cb[_0x17a96a(0xf5)],'unitId':_0x2129dd,'subUnitId':_0x35f1ce,'text':JSON['parse'](_0xe02805[_0x17a96a(0x118)]),'parentId':_0x40a35c}),_0xd27222=_0x3ff6e4(_0x2a93d1[_0x17a96a(0x10d)][0x0]);return{..._0xd27222,'children':_0x2a93d1[_0x17a96a(0x10d)][_0x17a96a(0x106)](0x1)[_0x17a96a(0xb8)](_0x2db525=>_0x3ff6e4(_0x2db525,_0xd27222['id']))};}return null;}let _0x369bbe=class{constructor(_0x46a5b0,_0x42e198,_0x2c2bab,_0x411807){const _0x3080ff=_0x3e564b;this[_0x3080ff(0xde)]=_0x46a5b0,this[_0x3080ff(0xdc)]=_0x42e198,this[_0x3080ff(0x100)]=_0x2c2bab,this[_0x3080ff(0xdd)]=_0x411807;}async[_0x3e564b(0x104)](_0x51c8fe){const _0x3e00c5=_0x3e564b;var _0x227dd3,_0x38417a;const {parentId:_0x249894,unitId:_0xe80e5a,text:_0x3dfb2b,threadId:_0x42adc3}=_0x51c8fe,_0x1904a4=(_0x38417a=(_0x227dd3=_0x3dfb2b['customRanges'])==null?void 0x0:_0x227dd3[_0x3e00c5(0x111)](_0x1f54d0=>_0x1f54d0[_0x3e00c5(0xd1)]===_0x4175d3[_0x3e00c5(0x102)][_0x3e00c5(0x125)])[_0x3e00c5(0xb8)](_0x58aa17=>_0x58aa17[_0x3e00c5(0xfc)]))!=null?_0x38417a:[],_0x12bb57=JSON[_0x3e00c5(0x11d)](_0x3dfb2b),_0x233b85=(await this[_0x3e00c5(0x100)]['requireSession'](_0xe80e5a))[_0x3e00c5(0xe6)]();if(_0x249894){const _0x35f514={'memberId':_0x233b85,'unitId':_0xe80e5a,'content':_0x12bb57,'mention':_0x1904a4,'threadId':_0x42adc3},_0x36eb4b=(await this['_httpService'][_0x3e00c5(0xf4)]('/universer-api/comment/unit/'+_0xe80e5a+'/reply',{'body':_0x35f514}))['body']['reply'];return{..._0x51c8fe,'id':_0x36eb4b[_0x3e00c5(0xce)],'dT':_0x4175d3[_0x3e00c5(0x109)](+_0x36eb4b[_0x3e00c5(0xd9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x36eb4b['userId']};}else{const _0x1d0074={'memberId':_0x233b85,'unitId':_0xe80e5a,'content':_0x12bb57,'mention':_0x1904a4},_0x4bc478=await this[_0x3e00c5(0xde)]['post'](_0x3e00c5(0xeb)+_0xe80e5a+_0x3e00c5(0xac),{'body':_0x1d0074});return _0x1fe52e(_0x4bc478['body']['comment'],_0x51c8fe);}}async[_0x3e564b(0xd6)](_0x244ca8){const _0x32d504=_0x3e564b;var _0x3aef65,_0x309d8b;const {text:_0x24f84e,unitId:_0x122036}=_0x244ca8,_0x136274=(_0x309d8b=(_0x3aef65=_0x24f84e['customRanges'])==null?void 0x0:_0x3aef65[_0x32d504(0x111)](_0x176e2b=>_0x176e2b[_0x32d504(0xd1)]===_0x4175d3[_0x32d504(0x102)]['COMMENT'])['map'](_0x20881b=>_0x20881b[_0x32d504(0xfc)]))!=null?_0x309d8b:[],_0x436414=JSON[_0x32d504(0x11d)](_0x24f84e),_0x821e43=_0x244ca8[_0x32d504(0xf8)],_0x171a8a=_0x244ca8['id'],_0x40fe34={'memberId':(await this['_sessionService'][_0x32d504(0x117)](_0x122036))[_0x32d504(0xe6)](),'unitId':_0x122036,'threadId':_0x821e43,'mention':_0x136274,'content':_0x436414,'replyId':_0x171a8a},_0x1f8d4f=await this[_0x32d504(0xde)][_0x32d504(0xf4)](_0x32d504(0xeb)+_0x122036+_0x32d504(0xe1),{'body':_0x40fe34});return!_0x1f8d4f[_0x32d504(0xd2)]['error']||_0x1f8d4f[_0x32d504(0xd2)][_0x32d504(0xc6)][_0x32d504(0xb5)]===0x1;}async[_0x3e564b(0xcb)](_0x5dfd00){const _0x3d360f=_0x3e564b,{unitId:_0x2ca0b6}=_0x5dfd00,_0x1a2cc4=_0x5dfd00[_0x3d360f(0xf8)],_0x4f80f1={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x2ca0b6,'threadId':_0x1a2cc4,'solved':_0x5dfd00['resolved']?_0x58b7cb[_0x3d360f(0xf5)]:_0x58b7cb[_0x3d360f(0xe7)]},_0x915efb=await this[_0x3d360f(0xde)][_0x3d360f(0xf4)](_0x3d360f(0xeb)+_0x2ca0b6+_0x3d360f(0xb0),{'body':_0x4f80f1});return!_0x915efb[_0x3d360f(0xd2)][_0x3d360f(0xc6)]||_0x915efb[_0x3d360f(0xd2)]['error'][_0x3d360f(0xb5)]===0x1;}async[_0x3e564b(0xd3)](_0x42d30a,_0x2d39af,_0x2b96ec,_0x4fdefd){const _0x86e240=_0x3e564b,_0x41cb9b={'memberId':(await this[_0x86e240(0x100)]['requireSession'](_0x42d30a))['getMemberID'](),'threadId':_0x2b96ec,'replyId':_0x4fdefd,'unitId':_0x42d30a},_0x29a43c=await this['_httpService'][_0x86e240(0xf4)](_0x86e240(0xeb)+_0x42d30a+_0x86e240(0xee),{'body':_0x41cb9b});return!_0x29a43c[_0x86e240(0xd2)][_0x86e240(0xc6)]||_0x29a43c[_0x86e240(0xd2)][_0x86e240(0xc6)][_0x86e240(0xb5)]===0x1;}async[_0x3e564b(0xed)](_0x395c90,_0x1d13a1,_0x70230e){const _0x1366cd=_0x3e564b,_0x13e976={'unitId':_0x395c90,'threadId':_0x70230e},_0x18e67c=await this['_httpService'][_0x1366cd(0xf4)]('/universer-api/comment/unit/'+_0x395c90+_0x1366cd(0xc0),{'body':_0x13e976}),_0x32f4da=_0x70230e[_0x1366cd(0xb8)](_0x595a0d=>_0x22ae1d(_0x18e67c[_0x1366cd(0xd2)]['comments'][_0x595a0d],_0x395c90,_0x1d13a1))['filter'](Boolean);return Object[_0x1366cd(0xc3)](_0x18e67c['body']['users'])[_0x1366cd(0xcc)](_0x682e37=>{const _0x1fb726=_0x1366cd;this['_userService'][_0x1fb726(0xfb)](_0x682e37);}),_0x32f4da;}[_0x3e564b(0xc4)](_0x47ae3c){const _0x1cb56e=_0x3e564b;return{'id':_0x47ae3c['id'],'threadId':_0x47ae3c['threadId'],'ref':_0x47ae3c[_0x1cb56e(0x114)]};}};_0x369bbe=_0x287e6a([_0x46a99e(0x0,_0x4175d3[_0x3e564b(0xca)](_0x3c568e[_0x3e564b(0xcd)])),_0x46a99e(0x1,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x10a)])),_0x46a99e(0x2,_0x4175d3[_0x3e564b(0xca)](_0x464d37['CollaborationSessionService'])),_0x46a99e(0x3,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x113)]))],_0x369bbe);var _0x2bc4de=Object[_0x3e564b(0xc8)],_0x371cfc=(_0x5a0b52,_0x26efad,_0x46baf9,_0x2e57e0)=>{const _0x156372=_0x3e564b;for(var _0x1e2c62=_0x2e57e0>0x1?void 0x0:_0x2e57e0?_0x2bc4de(_0x26efad,_0x46baf9):_0x26efad,_0x4708e9=_0x5a0b52[_0x156372(0xc7)]-0x1,_0x511da0;_0x4708e9>=0x0;_0x4708e9--)(_0x511da0=_0x5a0b52[_0x4708e9])&&(_0x1e2c62=_0x511da0(_0x1e2c62)||_0x1e2c62);return _0x1e2c62;},_0x95ec7b=(_0x240974,_0x366164)=>(_0x1a7414,_0x1c7fd7)=>_0x366164(_0x1a7414,_0x1c7fd7,_0x240974);let _0x360983=class extends _0x4175d3[_0x3e564b(0x124)]{constructor(_0x3d6a10,_0x1ff145){const _0x3f06eb=_0x3e564b;super(),this[_0x3f06eb(0xe9)]=_0x3d6a10,this[_0x3f06eb(0xbb)]=_0x1ff145,this[_0x3f06eb(0xa7)]();}[_0x3e564b(0xa7)](){const _0x16958f=_0x3e564b;this[_0x16958f(0xe9)]['dataSource']=this[_0x16958f(0xbb)],this[_0x16958f(0xe9)][_0x16958f(0x105)]=!0x1;}};_0x360983=_0x371cfc([_0x95ec7b(0x0,_0x391618['IThreadCommentDataSourceService']),_0x95ec7b(0x1,_0x4175d3[_0x3e564b(0xca)](_0x369bbe))],_0x360983);var _0x2a9408=Object[_0x3e564b(0x107)],_0x1361a4=Object[_0x3e564b(0xc8)],_0x4fb667=(_0x2d3bd2,_0x984f08,_0x2eceb6)=>_0x984f08 in _0x2d3bd2?_0x2a9408(_0x2d3bd2,_0x984f08,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eceb6}):_0x2d3bd2[_0x984f08]=_0x2eceb6,_0x5055dc=(_0x1aa075,_0x1ee6c1,_0x3b7c90,_0x616a0b)=>{const _0x43b492=_0x3e564b;for(var _0x5a47cc=_0x616a0b>0x1?void 0x0:_0x616a0b?_0x1361a4(_0x1ee6c1,_0x3b7c90):_0x1ee6c1,_0x12ba76=_0x1aa075[_0x43b492(0xc7)]-0x1,_0x25bf1a;_0x12ba76>=0x0;_0x12ba76--)(_0x25bf1a=_0x1aa075[_0x12ba76])&&(_0x5a47cc=_0x25bf1a(_0x5a47cc)||_0x5a47cc);return _0x5a47cc;},_0x1f8e79=(_0x310d99,_0x59d82a)=>(_0x2c9bdc,_0x3cb947)=>_0x59d82a(_0x2c9bdc,_0x3cb947,_0x310d99),_0x593af9=(_0x578f18,_0x45fa19,_0x58abc8)=>_0x4fb667(_0x578f18,typeof _0x45fa19!='symbol'?_0x45fa19+'':_0x45fa19,_0x58abc8);_0x3f28f9[_0x3e564b(0xaa)]=class extends _0x4175d3[_0x3e564b(0xa4)]{constructor(_0x25447d=_0x4dbde8,_0x5d657a,_0x90cca0){const _0x778fd=_0x3e564b;super(),this[_0x778fd(0xbe)]=_0x25447d,this[_0x778fd(0xdd)]=_0x5d657a,this[_0x778fd(0xef)]=_0x90cca0;const {..._0x47ef4e}=_0x4175d3[_0x778fd(0xe2)]({},_0x4dbde8,this[_0x778fd(0xbe)]);this[_0x778fd(0xef)][_0x778fd(0xb2)](_0x7b069a,_0x47ef4e);}[_0x3e564b(0x123)](){const _0x5b5ef7=_0x3e564b;[[_0x369bbe],[_0x360983],[_0x96850c]][_0x5b5ef7(0xcc)](_0x456643=>{const _0x262ea1=_0x5b5ef7;this['_injector'][_0x262ea1(0xa5)](_0x456643);});}['onReady'](){const _0x4b108c=_0x3e564b;this[_0x4b108c(0xdd)][_0x4b108c(0x10f)](_0x360983),this[_0x4b108c(0xdd)][_0x4b108c(0x10f)](_0x96850c);}},_0x593af9(_0x3f28f9[_0x3e564b(0xaa)],_0x3e564b(0xb3),_0x3eb321),_0x593af9(_0x3f28f9['UniverThreadCommentDataSourcePlugin'],_0x3e564b(0x115),_0x4175d3[_0x3e564b(0xb6)]['UNIVER_UNKNOWN']),_0x3f28f9[_0x3e564b(0xaa)]=_0x5055dc([_0x4175d3['DependentOn'](_0x14644c['UniverThreadCommentUIPlugin'],_0x464d37[_0x3e564b(0xfd)],_0x3841b4[_0x3e564b(0xdf)]),_0x1f8e79(0x1,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x113)])),_0x1f8e79(0x2,_0x4175d3[_0x3e564b(0xf2)])],_0x3f28f9[_0x3e564b(0xaa)]),Object[_0x3e564b(0x107)](_0x3f28f9,Symbol[_0x3e564b(0x112)],{'value':'Module'});}));function _0x210c(){const _0x267a4a=['userId','stringify','size','1091MCqtuA','Unknown','UniverNetwork','@univerjs-pro/collaboration-client','onStarting','Disposable','COMMENT','Plugin','add','unitId','_initDataSource','UniverProLicense','@univerjs/core','UniverThreadCommentDataSourcePlugin','pipe','/add','root','_threadCommentModel','payload','/solved','getUnit','setConfig','pluginName','70664OmCdrq','code','UniverInstanceType','find','map','UniverThreadComment','@univerjs/thread-comment-ui','_threadCommentDataSource','Edit','7YUqZoz','_config','object','/list','UniverProThreadCommentDatasource','185buNbAc','values','saveCommentToSnapshot','parse','error','length','getOwnPropertyDescriptor','Add','Inject','resolveComment','forEach','HTTPService','replyId','2592711cDDvxi','31368VamJlx','rangeType','body','deleteComment','Reply','rxjs','updateComment','@univerjs/network','1074UZXkCH','createTimestamp','exports','UniverProCollaborationClient','_userService','_injector','_httpService','UniverLicensePlugin','UNRECOGNIZED','/edit','merge','162VtWLJt','@univerjs-pro/license','4738914HFaisk','getMemberID','OpenOrReOpen','CommentService','_threadCommentDataSourceService','ThreadCommentModel','/universer-api/comment/unit/','_init','listComments','/delete','_configService','delete','Solve','IConfigService','commentUpdate$','post','Solved','user','243670fLqxUZ','threadId','_commentService','personId','addUser','rangeId','UniverCollaborationClientPlugin','solved','Delete','_sessionService','bufferTime','CustomRangeType','279323UhsFrU','addComment','syncUpdateMutationToColla','slice','defineProperty','_initUserSync','dayjs','UserManagerService','userID','disposeWithMe','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','UniverThreadCommentUi','filter','toStringTag','Injector','ref','type','amd','requireSession','content','getUser','subscribe','parentId'];_0x210c=function(){return _0x267a4a;};return _0x210c();}
|
|
1
|
+
function _0x18cd(){const _0x29ed4d=['content','syncUpdateMutationToColla','error','body','/solved','resolveComment','_threadCommentModel','dayjs','createTimestamp','DependentOn','UNRECOGNIZED','UniverLicensePlugin','_initUserSync','UserManagerService','size','_injector','UniverInstanceType','customRanges','requireSession','getComment','rxjs','@univerjs/core','commentUpdate$','format','reply','139517swleBo','getUser','1432192BkFRJd','_initDataSource','disposeWithMe','type','_commentService','replies','updateComment','payload','UniverThreadCommentDataSourcePlugin','dataSource','thread-comment-data-source.config','UniverProCollaborationClient','getUnit','getMemberID','@univerjs/network','setConfig','userId','code','Unknown','Solve','getOwnPropertyDescriptor','_httpService','/universer-api/user/list','resolved','filter','/add','_configService','pipe','UniverProThreadCommentDatasource','Edit','YYYY/MM/DD\x20HH:mm','_sessionService','get','UNIVER_UNKNOWN','Inject','rangeId','onReady','map','4080213hMDUKk','UniverProLicense','subscribe','IConfigService','length','1415110Unngbj','replyId','stringify','COMMENT','user','ThreadCommentModel','find','/delete','Injector','comments','values','Reply','addUser','IThreadCommentDataSourceService','addComment','comment','saveCommentToSnapshot','Solved','Delete','/universer-api/comment/unit/','parse','Disposable','UniverThreadComment','defineProperty','userID','_init','@univerjs/thread-comment','/reply','onStarting','solved','post','personId','/edit','pluginName','@univerjs-pro/license','Module','add','amd','UniverThreadCommentUIPlugin','3306414KJhkqm','317500wzoKqb','rangeType','_threadCommentDataSourceService','_userService','/list','Add','UniverThreadCommentUi','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CustomRangeType','root','OpenOrReOpen','3849064uCHQGh','UniverCore','merge','@univerjs-pro/collaboration-client','delete','unitId','_config','users','slice','5QnJwen','CollaborationSessionService','threadId','HTTPService','getCurrentUser','Plugin'];_0x18cd=function(){return _0x29ed4d;};return _0x18cd();}function _0x21bd(_0x19f3be,_0x3d6957){const _0x18cda1=_0x18cd();return _0x21bd=function(_0x21bdc9,_0x50edc7){_0x21bdc9=_0x21bdc9-0x1ee;let _0x359c03=_0x18cda1[_0x21bdc9];return _0x359c03;},_0x21bd(_0x19f3be,_0x3d6957);}(function(_0x40ee5b,_0x1f970e){const _0xf6bea9=_0x21bd,_0x6e6f9=_0x40ee5b();while(!![]){try{const _0x321b40=parseInt(_0xf6bea9(0x264))/0x1+parseInt(_0xf6bea9(0x239))/0x2+-parseInt(_0xf6bea9(0x25f))/0x3+-parseInt(_0xf6bea9(0x204))/0x4+parseInt(_0xf6bea9(0x218))/0x5*(parseInt(_0xf6bea9(0x203))/0x6)+-parseInt(_0xf6bea9(0x237))/0x7+-parseInt(_0xf6bea9(0x20f))/0x8;if(_0x321b40===_0x1f970e)break;else _0x6e6f9['push'](_0x6e6f9['shift']());}catch(_0x5f2dc2){_0x6e6f9['push'](_0x6e6f9['shift']());}}}(_0x18cd,0xb5185),function(_0x2815f9,_0x424347){const _0x5d0b6a=_0x21bd;typeof exports=='object'&&typeof module<'u'?_0x424347(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x5d0b6a(0x201)]?define(['exports',_0x5d0b6a(0x212),_0x5d0b6a(0x1fe),_0x5d0b6a(0x233),'@univerjs/thread-comment-ui',_0x5d0b6a(0x1f6),'rxjs',_0x5d0b6a(0x247)],_0x424347):(_0x2815f9=typeof globalThis<'u'?globalThis:_0x2815f9||self,_0x424347(_0x2815f9[_0x5d0b6a(0x255)]={},_0x2815f9[_0x5d0b6a(0x244)],_0x2815f9[_0x5d0b6a(0x260)],_0x2815f9[_0x5d0b6a(0x210)],_0x2815f9[_0x5d0b6a(0x20a)],_0x2815f9[_0x5d0b6a(0x1f2)],_0x2815f9[_0x5d0b6a(0x232)],_0x2815f9['UniverNetwork']));}(this,function(_0x27515b,_0x52cb44,_0x994417,_0x2f449e,_0x4c01bf,_0xeaa709,_0x1cef5f,_0xdb3e66){'use strict';const _0x2a1f0a=_0x21bd;const _0x3fa4ba=_0x2a1f0a(0x20b);var _0x365e4e=(_0x5e2645=>(_0x5e2645[_0x5e2645[_0x2a1f0a(0x20e)]=0x0]=_0x2a1f0a(0x20e),_0x5e2645[_0x5e2645[_0x2a1f0a(0x275)]=0x1]=_0x2a1f0a(0x275),_0x5e2645[_0x5e2645[_0x2a1f0a(0x228)]=-0x1]=_0x2a1f0a(0x228),_0x5e2645))(_0x365e4e||{}),_0xafc27a=(_0xa9a600=>(_0xa9a600[_0xa9a600[_0x2a1f0a(0x24b)]=0x0]=_0x2a1f0a(0x24b),_0xa9a600[_0xa9a600[_0x2a1f0a(0x209)]=0x1]=_0x2a1f0a(0x209),_0xa9a600[_0xa9a600[_0x2a1f0a(0x26f)]=0x2]=_0x2a1f0a(0x26f),_0xa9a600[_0xa9a600['Edit']=0x3]=_0x2a1f0a(0x256),_0xa9a600[_0xa9a600['Delete']=0x4]='Delete',_0xa9a600[_0xa9a600[_0x2a1f0a(0x24c)]=0x5]=_0x2a1f0a(0x24c),_0xa9a600[_0xa9a600[_0x2a1f0a(0x228)]=-0x1]='UNRECOGNIZED',_0xa9a600))(_0xafc27a||{});const _0x49676d=_0x1cc192=>_0x2f449e[_0x2a1f0a(0x225)](new Date(+_0x1cc192))[_0x2a1f0a(0x235)](_0x2a1f0a(0x257)),_0x1e1fdc=async(_0x30434b,_0x3691db)=>{const _0x315e4f=_0x2a1f0a,_0x3f40be=_0x30434b['get'](_0x2f449e[_0x315e4f(0x22b)]),_0x5efc67=_0x30434b[_0x315e4f(0x259)](_0xdb3e66['HTTPService']);_0x3691db['forEach'](_0x4ba4ed=>{const _0x55138f=_0x315e4f;_0x3f40be[_0x55138f(0x238)](_0x4ba4ed)&&_0x3691db[_0x55138f(0x213)](_0x4ba4ed);}),_0x3691db[_0x315e4f(0x22c)]&&(await _0x5efc67[_0x315e4f(0x259)](_0x315e4f(0x24f),{'params':{'userIDs':[..._0x3691db]}}))[_0x315e4f(0x221)][_0x315e4f(0x216)]['forEach'](_0x1753ed=>{const _0x370b03=_0x315e4f;_0x1753ed&&_0x3f40be[_0x370b03(0x270)](_0x1753ed);});};var _0x1a245e=Object['getOwnPropertyDescriptor'],_0x466507=(_0xb15a4,_0x220c24,_0x505d3a,_0x2c5990)=>{const _0x40c0b4=_0x2a1f0a;for(var _0x16d92d=_0x2c5990>0x1?void 0x0:_0x2c5990?_0x1a245e(_0x220c24,_0x505d3a):_0x220c24,_0x302937=_0xb15a4[_0x40c0b4(0x263)]-0x1,_0x1a5339;_0x302937>=0x0;_0x302937--)(_0x1a5339=_0xb15a4[_0x302937])&&(_0x16d92d=_0x1a5339(_0x16d92d)||_0x16d92d);return _0x16d92d;},_0x2e3d12=(_0x4ca03e,_0x2d4a88)=>(_0x3aa91c,_0x11339f)=>_0x2d4a88(_0x3aa91c,_0x11339f,_0x4ca03e);let _0x5a1ff1=class extends _0x2f449e[_0x2a1f0a(0x1f1)]{constructor(_0x3aa9eb,_0x152794,_0x5bdd04,_0x5ebe0a){const _0x5a7fa9=_0x2a1f0a;super(),this[_0x5a7fa9(0x23d)]=_0x3aa9eb,this[_0x5a7fa9(0x224)]=_0x152794,this[_0x5a7fa9(0x207)]=_0x5bdd04,this[_0x5a7fa9(0x22d)]=_0x5ebe0a,this[_0x5a7fa9(0x1f5)](),this[_0x5a7fa9(0x22a)]();}[_0x2a1f0a(0x22a)](){const _0x6cd00b=_0x2a1f0a;this[_0x6cd00b(0x23b)](this[_0x6cd00b(0x224)][_0x6cd00b(0x234)][_0x6cd00b(0x254)](_0x1cef5f['bufferTime'](0x10))[_0x6cd00b(0x261)](_0x520fac=>{const _0x5ef5a1=_0x6cd00b,_0x4f6a9d=new Set();_0x520fac['forEach'](_0x2e4636=>{const _0x22dd45=_0x21bd;switch(_0x2e4636[_0x22dd45(0x23c)]){case _0x22dd45(0x200):{const _0x36ac42=_0x2e4636[_0x22dd45(0x240)][_0x22dd45(0x1fb)];_0x4f6a9d[_0x22dd45(0x200)](_0x36ac42);break;}}}),_0x1e1fdc(this[_0x5ef5a1(0x22d)],_0x4f6a9d);}));}[_0x2a1f0a(0x1f5)](){const _0x5698d4=_0x2a1f0a;this[_0x5698d4(0x23b)](this[_0x5698d4(0x23d)][_0x5698d4(0x234)]['subscribe'](async _0x54be78=>{const _0x32bf65=_0x5698d4;var _0x582849,_0x3f8879,_0x564ef1,_0x5449a4;const _0x4596d2=(_0x582849=this[_0x32bf65(0x224)][_0x32bf65(0x245)](_0x54be78[_0x32bf65(0x214)])['find'](_0x413f60=>_0x413f60[_0x32bf65(0x21a)]===_0x54be78[_0x32bf65(0x21a)]))==null?void 0x0:_0x582849[_0x32bf65(0x20d)];if(!_0x4596d2)return;const {unitId:_0x1e3187,subUnitId:_0x3f96cb}=_0x4596d2;switch(_0x54be78['user']&&this['_userService'][_0x32bf65(0x270)](_0x54be78['user']),_0x54be78[_0x32bf65(0x23c)]){case _0xafc27a[_0x32bf65(0x209)]:break;case _0xafc27a['Reply']:{this[_0x32bf65(0x224)][_0x32bf65(0x272)](_0x1e3187,_0x3f96cb,{'unitId':_0x1e3187,'subUnitId':_0x3f96cb,'ref':'','id':_0x54be78[_0x32bf65(0x265)],'dT':_0x49676d(+_0x54be78['createTimestamp']),'threadId':_0x54be78[_0x32bf65(0x21a)],'personId':(_0x564ef1=(_0x3f8879=_0x54be78[_0x32bf65(0x268)])==null?void 0x0:_0x3f8879['userID'])!=null?_0x564ef1:_0x54be78[_0x32bf65(0x249)],'text':JSON[_0x32bf65(0x1f0)](_0x54be78['content']),'parentId':_0x4596d2['id']});break;}case _0xafc27a[_0x32bf65(0x1ee)]:{const _0xafd251=this[_0x32bf65(0x224)][_0x32bf65(0x231)](_0x1e3187,_0x3f96cb,_0x54be78[_0x32bf65(0x265)]);_0xafd251&&_0xafd251['parentId']&&this[_0x32bf65(0x224)]['deleteComment'](_0x1e3187,_0x3f96cb,_0x54be78[_0x32bf65(0x265)]);break;}case _0xafc27a[_0x32bf65(0x256)]:{this[_0x32bf65(0x224)]['updateComment'](_0x1e3187,_0x3f96cb,{'commentId':_0x54be78[_0x32bf65(0x265)],'text':JSON[_0x32bf65(0x1f0)](_0x54be78[_0x32bf65(0x21e)])});break;}case _0xafc27a[_0x32bf65(0x24c)]:{const _0x4203f4=(_0x5449a4=this['_threadCommentModel'][_0x32bf65(0x245)](_0x54be78[_0x32bf65(0x214)])[_0x32bf65(0x26a)](_0x29d03b=>_0x29d03b[_0x32bf65(0x21a)]===_0x54be78['threadId']))==null?void 0x0:_0x5449a4[_0x32bf65(0x20d)];_0x4203f4&&this[_0x32bf65(0x224)][_0x32bf65(0x223)](_0x1e3187,_0x3f96cb,_0x4203f4['id'],_0x54be78[_0x32bf65(0x1f9)]===_0x365e4e[_0x32bf65(0x275)]);break;}}}));}};_0x5a1ff1=_0x466507([_0x2e3d12(0x0,_0x2f449e[_0x2a1f0a(0x25b)](_0x52cb44['CommentService'])),_0x2e3d12(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0xeaa709[_0x2a1f0a(0x269)])),_0x2e3d12(0x2,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x22b)])),_0x2e3d12(0x3,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x26c)]))],_0x5a1ff1);const _0x130cb8=_0x2a1f0a(0x243),_0x3e0813={};var _0x4b2d51=Object[_0x2a1f0a(0x24d)],_0x3a023b=(_0x2f54bd,_0x34dc13,_0x26f52c,_0x29e742)=>{const _0x271c1c=_0x2a1f0a;for(var _0x520512=_0x29e742>0x1?void 0x0:_0x29e742?_0x4b2d51(_0x34dc13,_0x26f52c):_0x34dc13,_0x43dba7=_0x2f54bd[_0x271c1c(0x263)]-0x1,_0x3453f2;_0x43dba7>=0x0;_0x43dba7--)(_0x3453f2=_0x2f54bd[_0x43dba7])&&(_0x520512=_0x3453f2(_0x520512)||_0x520512);return _0x520512;},_0xf9f6f1=(_0x15d460,_0x48fe94)=>(_0x590267,_0x4b7f00)=>_0x48fe94(_0x590267,_0x4b7f00,_0x15d460);function _0xac99f6(_0x12b9a7,_0x5e27c2){const _0x4651e1=_0x2a1f0a,_0x416b3c=_0x12b9a7[_0x4651e1(0x23e)][0x0];return{..._0x5e27c2,'id':_0x416b3c['replyId'],'resolved':_0x12b9a7[_0x4651e1(0x1f9)]===0x1,'dT':_0x49676d(_0x416b3c[_0x4651e1(0x226)]),'personId':_0x416b3c[_0x4651e1(0x249)],'threadId':_0x416b3c[_0x4651e1(0x21a)]};}function _0x464fed(_0x11b343,_0x59542f,_0x1d9f8f){const _0x2f3f28=_0x2a1f0a;var _0x15f4d3,_0x549280;if(((_0x549280=(_0x15f4d3=_0x11b343==null?void 0x0:_0x11b343[_0x2f3f28(0x23e)])==null?void 0x0:_0x15f4d3[_0x2f3f28(0x263)])!=null?_0x549280:0x0)>0x0){const _0x41e44c=(_0x28f6b9,_0x32029b)=>({'id':_0x28f6b9['replyId'],'threadId':_0x28f6b9[_0x2f3f28(0x21a)],'dT':_0x49676d(_0x28f6b9[_0x2f3f28(0x226)]),'personId':_0x28f6b9[_0x2f3f28(0x249)],'resolved':_0x11b343[_0x2f3f28(0x1f9)]===_0x365e4e[_0x2f3f28(0x275)],'unitId':_0x59542f,'subUnitId':_0x1d9f8f,'text':JSON[_0x2f3f28(0x1f0)](_0x28f6b9['content']),'parentId':_0x32029b}),_0x1067e6=_0x41e44c(_0x11b343[_0x2f3f28(0x23e)][0x0]);return{..._0x1067e6,'children':_0x11b343[_0x2f3f28(0x23e)][_0x2f3f28(0x217)](0x1)[_0x2f3f28(0x25e)](_0x165b5c=>_0x41e44c(_0x165b5c,_0x1067e6['id']))};}return null;}let _0x4908a6=class{constructor(_0x7011ad,_0x457677,_0x16198f){const _0x3c2695=_0x2a1f0a;this[_0x3c2695(0x24e)]=_0x7011ad,this[_0x3c2695(0x207)]=_0x457677,this[_0x3c2695(0x258)]=_0x16198f;}async[_0x2a1f0a(0x272)](_0x533311){const _0x54d2e9=_0x2a1f0a;var _0x12a1c8,_0x4b2aab;const {parentId:_0x58c4b,unitId:_0xc1f2e7,text:_0x50e023,threadId:_0x5d628d}=_0x533311,_0x216e72=(_0x4b2aab=(_0x12a1c8=_0x50e023[_0x54d2e9(0x22f)])==null?void 0x0:_0x12a1c8[_0x54d2e9(0x251)](_0x166d4f=>_0x166d4f['rangeType']===_0x2f449e[_0x54d2e9(0x20c)][_0x54d2e9(0x267)])[_0x54d2e9(0x25e)](_0x2ef3d6=>_0x2ef3d6[_0x54d2e9(0x25c)]))!=null?_0x4b2aab:[],_0xec6452=JSON[_0x54d2e9(0x266)](_0x50e023),_0x2cb12d=(await this[_0x54d2e9(0x258)][_0x54d2e9(0x230)](_0xc1f2e7))['getMemberID']();if(_0x58c4b){const _0x104a4a={'memberId':_0x2cb12d,'unitId':_0xc1f2e7,'content':_0xec6452,'mention':_0x216e72,'threadId':_0x5d628d},_0x23c721=(await this['_httpService'][_0x54d2e9(0x1fa)](_0x54d2e9(0x1ef)+_0xc1f2e7+_0x54d2e9(0x1f7),{'body':_0x104a4a}))[_0x54d2e9(0x221)][_0x54d2e9(0x236)];return{..._0x533311,'id':_0x23c721[_0x54d2e9(0x265)],'dT':_0x2f449e[_0x54d2e9(0x225)](+_0x23c721[_0x54d2e9(0x226)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x23c721[_0x54d2e9(0x249)]};}else{const _0x461de2={'memberId':_0x2cb12d,'unitId':_0xc1f2e7,'content':_0xec6452,'mention':_0x216e72},_0x7670f=await this[_0x54d2e9(0x24e)]['post']('/universer-api/comment/unit/'+_0xc1f2e7+_0x54d2e9(0x252),{'body':_0x461de2});return _0xac99f6(_0x7670f[_0x54d2e9(0x221)][_0x54d2e9(0x273)],_0x533311);}}async[_0x2a1f0a(0x23f)](_0x5069c4){const _0x14c96f=_0x2a1f0a;var _0x272ddb,_0x37c6b5;const {text:_0x3488c9,unitId:_0x1ed827}=_0x5069c4,_0x59d158=(_0x37c6b5=(_0x272ddb=_0x3488c9[_0x14c96f(0x22f)])==null?void 0x0:_0x272ddb['filter'](_0x41528b=>_0x41528b[_0x14c96f(0x205)]===_0x2f449e[_0x14c96f(0x20c)][_0x14c96f(0x267)])['map'](_0x37b03e=>_0x37b03e[_0x14c96f(0x25c)]))!=null?_0x37c6b5:[],_0x159bdc=JSON[_0x14c96f(0x266)](_0x3488c9),_0x1dc6ff=_0x5069c4[_0x14c96f(0x21a)],_0x30b668=_0x5069c4['id'],_0x3df81b={'memberId':(await this['_sessionService']['requireSession'](_0x1ed827))[_0x14c96f(0x246)](),'unitId':_0x1ed827,'threadId':_0x1dc6ff,'mention':_0x59d158,'content':_0x159bdc,'replyId':_0x30b668},_0x3ddfa6=await this[_0x14c96f(0x24e)][_0x14c96f(0x1fa)](_0x14c96f(0x1ef)+_0x1ed827+_0x14c96f(0x1fc),{'body':_0x3df81b});return!_0x3ddfa6[_0x14c96f(0x221)][_0x14c96f(0x220)]||_0x3ddfa6[_0x14c96f(0x221)][_0x14c96f(0x220)]['code']===0x1;}async['resolveComment'](_0x1c13e0){const _0x5bc950=_0x2a1f0a,{unitId:_0x463c95}=_0x1c13e0,_0x392c86=_0x1c13e0[_0x5bc950(0x21a)],_0x5550de={'memberId':this[_0x5bc950(0x207)][_0x5bc950(0x21c)]()[_0x5bc950(0x1f4)],'unitId':_0x463c95,'threadId':_0x392c86,'solved':_0x1c13e0[_0x5bc950(0x250)]?_0x365e4e[_0x5bc950(0x275)]:_0x365e4e[_0x5bc950(0x20e)]},_0x2f11bc=await this[_0x5bc950(0x24e)][_0x5bc950(0x1fa)]('/universer-api/comment/unit/'+_0x463c95+_0x5bc950(0x222),{'body':_0x5550de});return!_0x2f11bc[_0x5bc950(0x221)][_0x5bc950(0x220)]||_0x2f11bc[_0x5bc950(0x221)][_0x5bc950(0x220)][_0x5bc950(0x24a)]===0x1;}async['deleteComment'](_0x47fb6e,_0x482798,_0x365873,_0x1ad033){const _0x41e14c=_0x2a1f0a,_0x14f13b={'memberId':(await this['_sessionService'][_0x41e14c(0x230)](_0x47fb6e))['getMemberID'](),'threadId':_0x365873,'replyId':_0x1ad033,'unitId':_0x47fb6e},_0x1b882b=await this[_0x41e14c(0x24e)][_0x41e14c(0x1fa)](_0x41e14c(0x1ef)+_0x47fb6e+_0x41e14c(0x26b),{'body':_0x14f13b});return!_0x1b882b['body']['error']||_0x1b882b['body']['error'][_0x41e14c(0x24a)]===0x1;}async['listComments'](_0x24226d,_0x252860,_0x4226aa){const _0x3dc007=_0x2a1f0a,_0x4ff5ab={'unitId':_0x24226d,'threadId':_0x4226aa},_0x50d308=await this[_0x3dc007(0x24e)][_0x3dc007(0x1fa)]('/universer-api/comment/unit/'+_0x24226d+_0x3dc007(0x208),{'body':_0x4ff5ab}),_0x4fe9ed=_0x4226aa['map'](_0x3d3a15=>_0x464fed(_0x50d308['body'][_0x3dc007(0x26d)][_0x3d3a15],_0x24226d,_0x252860))[_0x3dc007(0x251)](Boolean);return Object[_0x3dc007(0x26e)](_0x50d308['body'][_0x3dc007(0x216)])['forEach'](_0x2bcc96=>{const _0x182266=_0x3dc007;this[_0x182266(0x207)][_0x182266(0x270)](_0x2bcc96);}),_0x4fe9ed;}[_0x2a1f0a(0x274)](_0x22a6cd){const _0x2b7e0b=_0x2a1f0a;return{'id':_0x22a6cd['id'],'threadId':_0x22a6cd[_0x2b7e0b(0x21a)],'ref':_0x22a6cd['ref']};}};_0x4908a6=_0x3a023b([_0xf9f6f1(0x0,_0x2f449e[_0x2a1f0a(0x25b)](_0xdb3e66[_0x2a1f0a(0x21b)])),_0xf9f6f1(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x22b)])),_0xf9f6f1(0x2,_0x2f449e[_0x2a1f0a(0x25b)](_0x52cb44[_0x2a1f0a(0x219)]))],_0x4908a6);var _0x100e17=Object['getOwnPropertyDescriptor'],_0x4e5a0a=(_0x1ccba6,_0x467d0f,_0x5771f4,_0x2b2249)=>{const _0x13d0e4=_0x2a1f0a;for(var _0x171cd2=_0x2b2249>0x1?void 0x0:_0x2b2249?_0x100e17(_0x467d0f,_0x5771f4):_0x467d0f,_0x3753ac=_0x1ccba6[_0x13d0e4(0x263)]-0x1,_0x5899eb;_0x3753ac>=0x0;_0x3753ac--)(_0x5899eb=_0x1ccba6[_0x3753ac])&&(_0x171cd2=_0x5899eb(_0x171cd2)||_0x171cd2);return _0x171cd2;},_0x39eb33=(_0x36b5e5,_0xf83182)=>(_0xdd770,_0x19cc7d)=>_0xf83182(_0xdd770,_0x19cc7d,_0x36b5e5);let _0x1c935f=class extends _0x2f449e[_0x2a1f0a(0x1f1)]{constructor(_0x155142,_0x29f31d){const _0x44d033=_0x2a1f0a;super(),this[_0x44d033(0x206)]=_0x155142,this['_threadCommentDataSource']=_0x29f31d,this['_initDataSource']();}[_0x2a1f0a(0x23a)](){const _0x184c3b=_0x2a1f0a;this[_0x184c3b(0x206)][_0x184c3b(0x242)]=this['_threadCommentDataSource'],this[_0x184c3b(0x206)][_0x184c3b(0x21f)]=!0x1;}};_0x1c935f=_0x4e5a0a([_0x39eb33(0x0,_0xeaa709[_0x2a1f0a(0x271)]),_0x39eb33(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0x4908a6))],_0x1c935f);var _0x19103d=Object[_0x2a1f0a(0x1f3)],_0x303029=Object[_0x2a1f0a(0x24d)],_0x1371d1=(_0x4c744d,_0x177277,_0x549094)=>_0x177277 in _0x4c744d?_0x19103d(_0x4c744d,_0x177277,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x549094}):_0x4c744d[_0x177277]=_0x549094,_0x5f5b5b=(_0x328712,_0x1841c8,_0x5694cb,_0x27c115)=>{const _0x3d22f9=_0x2a1f0a;for(var _0x2a3a3c=_0x27c115>0x1?void 0x0:_0x27c115?_0x303029(_0x1841c8,_0x5694cb):_0x1841c8,_0x2a6807=_0x328712[_0x3d22f9(0x263)]-0x1,_0x2f952f;_0x2a6807>=0x0;_0x2a6807--)(_0x2f952f=_0x328712[_0x2a6807])&&(_0x2a3a3c=_0x2f952f(_0x2a3a3c)||_0x2a3a3c);return _0x2a3a3c;},_0x1946cc=(_0x34e0ab,_0x2a775a)=>(_0x214b05,_0x26af21)=>_0x2a775a(_0x214b05,_0x26af21,_0x34e0ab),_0x4a6d5d=(_0x6b57a4,_0x6890c,_0x413b37)=>_0x1371d1(_0x6b57a4,typeof _0x6890c!='symbol'?_0x6890c+'':_0x6890c,_0x413b37);_0x27515b['UniverThreadCommentDataSourcePlugin']=class extends _0x2f449e[_0x2a1f0a(0x21d)]{constructor(_0x59eb5c=_0x3e0813,_0x5b9acd,_0x680156){const _0x224e34=_0x2a1f0a;super(),this[_0x224e34(0x215)]=_0x59eb5c,this[_0x224e34(0x22d)]=_0x5b9acd,this[_0x224e34(0x253)]=_0x680156;const {..._0x33998a}=_0x2f449e[_0x224e34(0x211)]({},_0x3e0813,this[_0x224e34(0x215)]);this[_0x224e34(0x253)][_0x224e34(0x248)](_0x130cb8,_0x33998a);}[_0x2a1f0a(0x1f8)](){[[_0x4908a6],[_0x1c935f],[_0x5a1ff1]]['forEach'](_0x2eddb3=>{const _0x2b9224=_0x21bd;this[_0x2b9224(0x22d)][_0x2b9224(0x200)](_0x2eddb3);});}[_0x2a1f0a(0x25d)](){const _0x536bf1=_0x2a1f0a;this[_0x536bf1(0x22d)][_0x536bf1(0x259)](_0x1c935f),this[_0x536bf1(0x22d)]['get'](_0x5a1ff1);}},_0x4a6d5d(_0x27515b['UniverThreadCommentDataSourcePlugin'],_0x2a1f0a(0x1fd),_0x3fa4ba),_0x4a6d5d(_0x27515b[_0x2a1f0a(0x241)],_0x2a1f0a(0x23c),_0x2f449e[_0x2a1f0a(0x22e)][_0x2a1f0a(0x25a)]),_0x27515b[_0x2a1f0a(0x241)]=_0x5f5b5b([_0x2f449e[_0x2a1f0a(0x227)](_0x4c01bf[_0x2a1f0a(0x202)],_0x52cb44['UniverCollaborationClientPlugin'],_0x994417[_0x2a1f0a(0x229)]),_0x1946cc(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x26c)])),_0x1946cc(0x2,_0x2f449e[_0x2a1f0a(0x262)])],_0x27515b['UniverThreadCommentDataSourcePlugin']),Object[_0x2a1f0a(0x1f3)](_0x27515b,Symbol['toStringTag'],{'value':_0x2a1f0a(0x1ff)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4-nightly.202507290713",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.9.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.9.4-nightly.202507290713",
|
|
49
|
+
"@univerjs-pro/license": "0.9.4-nightly.202507290713",
|
|
50
|
+
"@univerjs/core": "0.9.4-nightly.202507290713",
|
|
51
|
+
"@univerjs/network": "0.9.4-nightly.202507290713",
|
|
52
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment
|
|
54
|
-
"@univerjs-
|
|
53
|
+
"@univerjs/thread-comment": "0.9.4-nightly.202507290713",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.9.4-nightly.202507290713"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
|
-
"vite": "^7.0.
|
|
59
|
+
"vite": "^7.0.6",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.9.
|
|
61
|
+
"@univerjs-infra/shared": "0.9.4"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|