@univerjs-pro/thread-comment-datasource 0.12.4 → 0.13.0-insiders.20251216-1519cb7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x53e49a=_0x3226;(function(_0x3bacf5,_0x30bd23){const _0x5d184f=_0x3226,_0x1c0d8=_0x3bacf5();while(!![]){try{const _0x50f836=-parseInt(_0x5d184f(0x1d6))/0x1*(parseInt(_0x5d184f(0x1ee))/0x2)+parseInt(_0x5d184f(0x1f1))/0x3+-parseInt(_0x5d184f(0x1b5))/0x4+-parseInt(_0x5d184f(0x1b9))/0x5+-parseInt(_0x5d184f(0x20a))/0x6+parseInt(_0x5d184f(0x1af))/0x7+parseInt(_0x5d184f(0x1b7))/0x8;if(_0x50f836===_0x30bd23)break;else _0x1c0d8['push'](_0x1c0d8['shift']());}catch(_0x41ac5d){_0x1c0d8['push'](_0x1c0d8['shift']());}}}(_0xec14,0xd1ddf));Object[_0x53e49a(0x211)](exports,Symbol['toStringTag'],{'value':_0x53e49a(0x20e)});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=_0x53e49a(0x1be);var I=(_0x3d920c=>(_0x3d920c[_0x3d920c[_0x53e49a(0x205)]=0x0]=_0x53e49a(0x205),_0x3d920c[_0x3d920c[_0x53e49a(0x1f8)]=0x1]=_0x53e49a(0x1f8),_0x3d920c[_0x3d920c[_0x53e49a(0x1ef)]=-0x1]=_0x53e49a(0x1ef),_0x3d920c))(I||{}),v=(_0x10c702=>(_0x10c702[_0x10c702['Unknown']=0x0]=_0x53e49a(0x20f),_0x10c702[_0x10c702['Add']=0x1]=_0x53e49a(0x1c4),_0x10c702[_0x10c702[_0x53e49a(0x20d)]=0x2]=_0x53e49a(0x20d),_0x10c702[_0x10c702['Edit']=0x3]=_0x53e49a(0x1e0),_0x10c702[_0x10c702[_0x53e49a(0x1b0)]=0x4]=_0x53e49a(0x1b0),_0x10c702[_0x10c702[_0x53e49a(0x214)]=0x5]=_0x53e49a(0x214),_0x10c702[_0x10c702[_0x53e49a(0x1ef)]=-0x1]=_0x53e49a(0x1ef),_0x10c702))(v||{});const f=_0x73de0b=>c[_0x53e49a(0x1d3)](new Date(+_0x73de0b))['format'](_0x53e49a(0x1d2)),R=async(_0x5546e0,_0x3f9998)=>{const _0x1ee178=_0x53e49a,_0x45b799=_0x5546e0[_0x1ee178(0x1cf)](c[_0x1ee178(0x1c0)]),_0x30d42d=_0x5546e0[_0x1ee178(0x1cf)](P[_0x1ee178(0x1a9)]);_0x3f9998[_0x1ee178(0x1e9)](_0x7ad3ca=>{const _0x3e126e=_0x1ee178;_0x45b799['getUser'](_0x7ad3ca)&&_0x3f9998[_0x3e126e(0x1bf)](_0x7ad3ca);}),_0x3f9998[_0x1ee178(0x20c)]&&(await _0x30d42d[_0x1ee178(0x1cf)](_0x1ee178(0x1de),{'params':{'userIDs':[..._0x3f9998]}}))[_0x1ee178(0x1dc)]['users'][_0x1ee178(0x1e9)](_0xf35d75=>{const _0x78f612=_0x1ee178;_0xf35d75&&_0x45b799[_0x78f612(0x1a3)](_0xf35d75);});};var $=Object[_0x53e49a(0x1c2)],E=(_0x26b516,_0x2109cc,_0x2c3b36,_0x5a88ee)=>{const _0x29cee5=_0x53e49a;for(var _0xa3e246=_0x5a88ee>0x1?void 0x0:_0x5a88ee?$(_0x2109cc,_0x2c3b36):_0x2109cc,_0x360547=_0x26b516[_0x29cee5(0x206)]-0x1,_0x2dc4dd;_0x360547>=0x0;_0x360547--)(_0x2dc4dd=_0x26b516[_0x360547])&&(_0xa3e246=_0x2dc4dd(_0xa3e246)||_0xa3e246);return _0xa3e246;},S=(_0x5693a7,_0x1e02a7)=>(_0x5e718a,_0x58a494)=>_0x1e02a7(_0x5e718a,_0x58a494,_0x5693a7);let _=class extends c[_0x53e49a(0x1a7)]{constructor(_0x2268b1,_0x32bdb8,_0x4682b0,_0x263c6c){const _0xcaf5c=_0x53e49a;super(),this[_0xcaf5c(0x1dd)]=_0x2268b1,this[_0xcaf5c(0x1f4)]=_0x32bdb8,this[_0xcaf5c(0x210)]=_0x4682b0,this[_0xcaf5c(0x201)]=_0x263c6c,this['_init'](),this[_0xcaf5c(0x1e2)]();}[_0x53e49a(0x1e2)](){const _0x32b79f=_0x53e49a;this[_0x32b79f(0x1ec)](this[_0x32b79f(0x1f4)][_0x32b79f(0x1e3)][_0x32b79f(0x1f0)](j['bufferTime'](0x10))[_0x32b79f(0x1aa)](_0x68294f=>{const _0x2f2b25=_0x32b79f,_0x144515=new Set();_0x68294f['forEach'](_0x45777c=>{const _0x2cabe0=_0x3226;switch(_0x45777c['type']){case _0x2cabe0(0x217):{const _0xaa1546=_0x45777c[_0x2cabe0(0x1f2)][_0x2cabe0(0x216)];_0x144515[_0x2cabe0(0x217)](_0xaa1546);break;}}}),R(this[_0x2f2b25(0x201)],_0x144515);}));}['_init'](){const _0x509911=_0x53e49a;this[_0x509911(0x1ec)](this['_commentService'][_0x509911(0x1e3)]['subscribe'](async _0x283973=>{const _0x1204df=_0x509911;var _0x22801b,_0x326422,_0x319e7c,_0x205600;const _0x4cef91=(_0x22801b=this[_0x1204df(0x1f4)][_0x1204df(0x1bc)](_0x283973[_0x1204df(0x1b3)])[_0x1204df(0x1f6)](_0x360030=>_0x360030[_0x1204df(0x1ad)]===_0x283973[_0x1204df(0x1ad)]))==null?void 0x0:_0x22801b['root'];if(!_0x4cef91)return;const {unitId:_0x2f3ec5,subUnitId:_0x68d722}=_0x4cef91;switch(_0x283973[_0x1204df(0x1e4)]&&this[_0x1204df(0x210)][_0x1204df(0x1a3)](_0x283973['user']),_0x283973['type']){case v[_0x1204df(0x1c4)]:break;case v[_0x1204df(0x20d)]:{this[_0x1204df(0x1f4)][_0x1204df(0x1b6)](_0x2f3ec5,_0x68d722,{'unitId':_0x2f3ec5,'subUnitId':_0x68d722,'ref':'','id':_0x283973[_0x1204df(0x1ea)],'dT':f(+_0x283973[_0x1204df(0x1fb)]),'threadId':_0x283973[_0x1204df(0x1ad)],'personId':(_0x319e7c=(_0x326422=_0x283973['user'])==null?void 0x0:_0x326422['userID'])!=null?_0x319e7c:_0x283973[_0x1204df(0x204)],'text':JSON[_0x1204df(0x1ab)](_0x283973[_0x1204df(0x1c6)]),'parentId':_0x4cef91['id']});break;}case v[_0x1204df(0x1b0)]:{const _0x3a7afb=this[_0x1204df(0x1f4)]['getComment'](_0x2f3ec5,_0x68d722,_0x283973[_0x1204df(0x1ea)]);_0x3a7afb&&_0x3a7afb[_0x1204df(0x1d0)]&&this[_0x1204df(0x1f4)][_0x1204df(0x1e1)](_0x2f3ec5,_0x68d722,_0x283973[_0x1204df(0x1ea)]);break;}case v[_0x1204df(0x1e0)]:{this[_0x1204df(0x1f4)][_0x1204df(0x1d5)](_0x2f3ec5,_0x68d722,{'commentId':_0x283973[_0x1204df(0x1ea)],'text':JSON[_0x1204df(0x1ab)](_0x283973[_0x1204df(0x1c6)])});break;}case v[_0x1204df(0x214)]:{const _0x1abecd=(_0x205600=this[_0x1204df(0x1f4)][_0x1204df(0x1bc)](_0x283973[_0x1204df(0x1b3)])['find'](_0xa8a218=>_0xa8a218[_0x1204df(0x1ad)]===_0x283973[_0x1204df(0x1ad)]))==null?void 0x0:_0x205600[_0x1204df(0x1fa)];_0x1abecd&&this[_0x1204df(0x1f4)]['resolveComment'](_0x2f3ec5,_0x68d722,_0x1abecd['id'],_0x283973['solved']===I[_0x1204df(0x1f8)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x53e49a(0x1d8)])),S(0x1,c[_0x53e49a(0x1d4)](M[_0x53e49a(0x1fe)])),S(0x2,c[_0x53e49a(0x1d4)](c['UserManagerService'])),S(0x3,c[_0x53e49a(0x1d4)](c['Injector']))],_);const q=_0x53e49a(0x1db),D={};var A=Object[_0x53e49a(0x1c2)],x=(_0x48cc9a,_0x2c5554,_0x400077,_0x10ab37)=>{for(var _0x5cf5f0=_0x10ab37>0x1?void 0x0:_0x10ab37?A(_0x2c5554,_0x400077):_0x2c5554,_0x24d939=_0x48cc9a['length']-0x1,_0x1e6bb6;_0x24d939>=0x0;_0x24d939--)(_0x1e6bb6=_0x48cc9a[_0x24d939])&&(_0x5cf5f0=_0x1e6bb6(_0x5cf5f0)||_0x5cf5f0);return _0x5cf5f0;},C=(_0x1d5c92,_0x57ef8d)=>(_0x498cde,_0x1e728a)=>_0x57ef8d(_0x498cde,_0x1e728a,_0x1d5c92);function _0xec14(){const _0x4b7853=['Reply','Module','Unknown','_userService','defineProperty','map','format','Solve','code','personId','add','/edit','IConfigService','addUser','UniverCollaborationClientPlugin','users','IThreadCommentDataSourceService','Disposable','_initDataSource','HTTPService','subscribe','parse','rangeType','threadId','customRanges','6675977CbdwyO','Delete','values','onReady','unitId','saveCommentToSnapshot','2189748jwpNxG','addComment','23081168IMqJoU','/add','3283195MePvXw','DependentOn','onStarting','getUnit','UNIVER_UNKNOWN','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','delete','UserManagerService','getMemberID','getOwnPropertyDescriptor','resolveComment','Add','getCurrentUser','content','_threadCommentDataSource','pluginName','CollaborationSessionService','UniverThreadCommentDataSourcePlugin','post','comment','COMMENT','_sessionService','get','parentId','UniverInstanceType','YYYY/MM/DD\x20HH:mm','dayjs','Inject','updateComment','3004aPnNlQ','_threadCommentDataSourceService','CommentService','Injector','replies','thread-comment-data-source.config','body','_commentService','/universer-api/user/list','requireSession','Edit','deleteComment','_initUserSync','commentUpdate$','user','listComments','_httpService','dataSource','/solved','forEach','replyId','/universer-api/comment/unit/','disposeWithMe','rangeId','450sMOIYL','UNRECOGNIZED','pipe','212865oiDWXy','payload','/delete','_threadCommentModel','/reply','find','type','Solved','error','root','createTimestamp','symbol','resolved','ThreadCommentModel','CustomRangeType','slice','_injector','filter','solved','userId','OpenOrReOpen','length','comments','syncUpdateMutationToColla','ref','7021326evgElO','setConfig','size'];_0xec14=function(){return _0x4b7853;};return _0xec14();}function _0x3226(_0xf119c1,_0x257ff4){_0xf119c1=_0xf119c1-0x1a3;const _0xec141=_0xec14();let _0x322652=_0xec141[_0xf119c1];return _0x322652;}function Y(_0x565dc7,_0x26665e){const _0x13ae2f=_0x53e49a,_0x5016c9=_0x565dc7[_0x13ae2f(0x1da)][0x0];return{..._0x26665e,'id':_0x5016c9[_0x13ae2f(0x1ea)],'resolved':_0x565dc7['solved']===0x1,'dT':f(_0x5016c9[_0x13ae2f(0x1fb)]),'personId':_0x5016c9[_0x13ae2f(0x204)],'threadId':_0x5016c9[_0x13ae2f(0x1ad)]};}function G(_0x34e2d9,_0x1a5036,_0x20753c){const _0x1dc9e1=_0x53e49a;var _0x13755d,_0x59839d;if(((_0x59839d=(_0x13755d=_0x34e2d9==null?void 0x0:_0x34e2d9[_0x1dc9e1(0x1da)])==null?void 0x0:_0x13755d[_0x1dc9e1(0x206)])!=null?_0x59839d:0x0)>0x0){const _0x2bf14e=(_0xda958c,_0x4f7b98)=>({'id':_0xda958c[_0x1dc9e1(0x1ea)],'threadId':_0xda958c[_0x1dc9e1(0x1ad)],'dT':f(_0xda958c[_0x1dc9e1(0x1fb)]),'personId':_0xda958c[_0x1dc9e1(0x204)],'resolved':_0x34e2d9[_0x1dc9e1(0x203)]===I[_0x1dc9e1(0x1f8)],'unitId':_0x1a5036,'subUnitId':_0x20753c,'text':JSON[_0x1dc9e1(0x1ab)](_0xda958c[_0x1dc9e1(0x1c6)]),'parentId':_0x4f7b98}),_0x7d71d9=_0x2bf14e(_0x34e2d9[_0x1dc9e1(0x1da)][0x0]);return{..._0x7d71d9,'children':_0x34e2d9['replies'][_0x1dc9e1(0x200)](0x1)[_0x1dc9e1(0x212)](_0x306ab5=>_0x2bf14e(_0x306ab5,_0x7d71d9['id']))};}return null;}let p=class{constructor(_0x452242,_0x10f9e0,_0x5b2560){const _0x37073a=_0x53e49a;this[_0x37073a(0x1e6)]=_0x452242,this['_userService']=_0x10f9e0,this[_0x37073a(0x1ce)]=_0x5b2560;}async[_0x53e49a(0x1b6)](_0x47373b){const _0x5c1fc3=_0x53e49a;var _0x2f314b,_0x371f1c;const {parentId:_0x278c05,unitId:_0xe3dcb,text:_0x26c610,threadId:_0x54f67c}=_0x47373b,_0x2a6372=(_0x371f1c=(_0x2f314b=_0x26c610[_0x5c1fc3(0x1ae)])==null?void 0x0:_0x2f314b['filter'](_0x3e0294=>_0x3e0294[_0x5c1fc3(0x1ac)]===c[_0x5c1fc3(0x1ff)][_0x5c1fc3(0x1cd)])['map'](_0x4d3a18=>_0x4d3a18[_0x5c1fc3(0x1ed)]))!=null?_0x371f1c:[],_0x4be59f=JSON['stringify'](_0x26c610),_0x546495=(await this[_0x5c1fc3(0x1ce)][_0x5c1fc3(0x1df)](_0xe3dcb))[_0x5c1fc3(0x1c1)]();if(_0x278c05){const _0x398f99={'memberId':_0x546495,'unitId':_0xe3dcb,'content':_0x4be59f,'mention':_0x2a6372,'threadId':_0x54f67c},_0x2136b0=(await this['_httpService'][_0x5c1fc3(0x1cb)](_0x5c1fc3(0x1eb)+_0xe3dcb+_0x5c1fc3(0x1f5),{'body':_0x398f99}))[_0x5c1fc3(0x1dc)]['reply'];return{..._0x47373b,'id':_0x2136b0[_0x5c1fc3(0x1ea)],'dT':c[_0x5c1fc3(0x1d3)](+_0x2136b0[_0x5c1fc3(0x1fb)])[_0x5c1fc3(0x213)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2136b0['userId']};}else{const _0x3f3fbf={'memberId':_0x546495,'unitId':_0xe3dcb,'content':_0x4be59f,'mention':_0x2a6372},_0x360f2f=await this['_httpService'][_0x5c1fc3(0x1cb)](_0x5c1fc3(0x1eb)+_0xe3dcb+_0x5c1fc3(0x1b8),{'body':_0x3f3fbf});return Y(_0x360f2f['body'][_0x5c1fc3(0x1cc)],_0x47373b);}}async[_0x53e49a(0x1d5)](_0x89ec9b){const _0x8d0684=_0x53e49a;var _0x5828fa,_0x13cef5;const {text:_0x45df44,unitId:_0x28058b}=_0x89ec9b,_0x6c8449=(_0x13cef5=(_0x5828fa=_0x45df44[_0x8d0684(0x1ae)])==null?void 0x0:_0x5828fa[_0x8d0684(0x202)](_0x21c30c=>_0x21c30c['rangeType']===c[_0x8d0684(0x1ff)]['COMMENT'])[_0x8d0684(0x212)](_0xab7ca9=>_0xab7ca9[_0x8d0684(0x1ed)]))!=null?_0x13cef5:[],_0x54c508=JSON['stringify'](_0x45df44),_0x40b464=_0x89ec9b['threadId'],_0x1de4c4=_0x89ec9b['id'],_0x3cae40={'memberId':(await this[_0x8d0684(0x1ce)]['requireSession'](_0x28058b))['getMemberID'](),'unitId':_0x28058b,'threadId':_0x40b464,'mention':_0x6c8449,'content':_0x54c508,'replyId':_0x1de4c4},_0x1e3885=await this[_0x8d0684(0x1e6)][_0x8d0684(0x1cb)]('/universer-api/comment/unit/'+_0x28058b+_0x8d0684(0x218),{'body':_0x3cae40});return!_0x1e3885['body'][_0x8d0684(0x1f9)]||_0x1e3885[_0x8d0684(0x1dc)][_0x8d0684(0x1f9)][_0x8d0684(0x215)]===0x1;}async[_0x53e49a(0x1c3)](_0x265beb){const _0x2f8f74=_0x53e49a,{unitId:_0x500e4d}=_0x265beb,_0x19bfa6=_0x265beb[_0x2f8f74(0x1ad)],_0x4a2eed={'memberId':this[_0x2f8f74(0x210)][_0x2f8f74(0x1c5)]()['userID'],'unitId':_0x500e4d,'threadId':_0x19bfa6,'solved':_0x265beb[_0x2f8f74(0x1fd)]?I[_0x2f8f74(0x1f8)]:I['OpenOrReOpen']},_0x10b86e=await this[_0x2f8f74(0x1e6)][_0x2f8f74(0x1cb)](_0x2f8f74(0x1eb)+_0x500e4d+_0x2f8f74(0x1e8),{'body':_0x4a2eed});return!_0x10b86e[_0x2f8f74(0x1dc)]['error']||_0x10b86e[_0x2f8f74(0x1dc)][_0x2f8f74(0x1f9)][_0x2f8f74(0x215)]===0x1;}async[_0x53e49a(0x1e1)](_0x3ed37a,_0x54767c,_0x59435a,_0x2f2431){const _0x1e6aad=_0x53e49a,_0x14ebc9={'memberId':(await this[_0x1e6aad(0x1ce)][_0x1e6aad(0x1df)](_0x3ed37a))[_0x1e6aad(0x1c1)](),'threadId':_0x59435a,'replyId':_0x2f2431,'unitId':_0x3ed37a},_0x4fb07b=await this[_0x1e6aad(0x1e6)][_0x1e6aad(0x1cb)](_0x1e6aad(0x1eb)+_0x3ed37a+_0x1e6aad(0x1f3),{'body':_0x14ebc9});return!_0x4fb07b['body'][_0x1e6aad(0x1f9)]||_0x4fb07b['body'][_0x1e6aad(0x1f9)][_0x1e6aad(0x215)]===0x1;}async[_0x53e49a(0x1e5)](_0x3f239e,_0x3d9e9f,_0x52d8f9){const _0x57028f=_0x53e49a,_0x58b21b={'unitId':_0x3f239e,'threadId':_0x52d8f9},_0x5edad7=await this[_0x57028f(0x1e6)]['post'](_0x57028f(0x1eb)+_0x3f239e+'/list',{'body':_0x58b21b}),_0x58a738=_0x52d8f9[_0x57028f(0x212)](_0x5be7c8=>G(_0x5edad7[_0x57028f(0x1dc)][_0x57028f(0x207)][_0x5be7c8],_0x3f239e,_0x3d9e9f))[_0x57028f(0x202)](Boolean);return Object[_0x57028f(0x1b1)](_0x5edad7[_0x57028f(0x1dc)][_0x57028f(0x1a5)])['forEach'](_0x5590b0=>{const _0x3de309=_0x57028f;this[_0x3de309(0x210)][_0x3de309(0x1a3)](_0x5590b0);}),_0x58a738;}[_0x53e49a(0x1b4)](_0x1aea97){const _0x1d7a7c=_0x53e49a;return{'id':_0x1aea97['id'],'threadId':_0x1aea97[_0x1d7a7c(0x1ad)],'ref':_0x1aea97[_0x1d7a7c(0x209)]};}};p=x([C(0x0,c[_0x53e49a(0x1d4)](P[_0x53e49a(0x1a9)])),C(0x1,c[_0x53e49a(0x1d4)](c[_0x53e49a(0x1c0)])),C(0x2,c[_0x53e49a(0x1d4)](b[_0x53e49a(0x1c9)]))],p);var H=Object[_0x53e49a(0x1c2)],J=(_0x20b79e,_0x500646,_0x4cd513,_0x5d9f41)=>{for(var _0x590116=_0x5d9f41>0x1?void 0x0:_0x5d9f41?H(_0x500646,_0x4cd513):_0x500646,_0xe4f35d=_0x20b79e['length']-0x1,_0x2c1905;_0xe4f35d>=0x0;_0xe4f35d--)(_0x2c1905=_0x20b79e[_0xe4f35d])&&(_0x590116=_0x2c1905(_0x590116)||_0x590116);return _0x590116;},y=(_0xe1d2b0,_0x507cea)=>(_0x23b7d1,_0x3e14e5)=>_0x507cea(_0x23b7d1,_0x3e14e5,_0xe1d2b0);let g=class extends c[_0x53e49a(0x1a7)]{constructor(_0x33e792,_0x45a273){const _0x1ad514=_0x53e49a;super(),this[_0x1ad514(0x1d7)]=_0x33e792,this[_0x1ad514(0x1c7)]=_0x45a273,this[_0x1ad514(0x1a8)]();}[_0x53e49a(0x1a8)](){const _0x3da989=_0x53e49a;this[_0x3da989(0x1d7)][_0x3da989(0x1e7)]=this[_0x3da989(0x1c7)],this[_0x3da989(0x1d7)][_0x3da989(0x208)]=!0x1;}};g=J([y(0x0,M[_0x53e49a(0x1a6)]),y(0x1,c[_0x53e49a(0x1d4)](p))],g);var F=Object[_0x53e49a(0x211)],L=Object[_0x53e49a(0x1c2)],Z=(_0x5e049a,_0x215259,_0x5f1048)=>_0x215259 in _0x5e049a?F(_0x5e049a,_0x215259,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f1048}):_0x5e049a[_0x215259]=_0x5f1048,W=(_0x386f84,_0x47c617,_0x21da70,_0x3a7fb6)=>{const _0x28dee7=_0x53e49a;for(var _0x28938b=_0x3a7fb6>0x1?void 0x0:_0x3a7fb6?L(_0x47c617,_0x21da70):_0x47c617,_0xbe0146=_0x386f84[_0x28dee7(0x206)]-0x1,_0x764f6b;_0xbe0146>=0x0;_0xbe0146--)(_0x764f6b=_0x386f84[_0xbe0146])&&(_0x28938b=_0x764f6b(_0x28938b)||_0x28938b);return _0x28938b;},O=(_0x4ba098,_0x422b33)=>(_0x796f42,_0x3c8f72)=>_0x422b33(_0x796f42,_0x3c8f72,_0x4ba098),N=(_0x44cd35,_0x1973aa,_0x518eff)=>Z(_0x44cd35,typeof _0x1973aa!=_0x53e49a(0x1fc)?_0x1973aa+'':_0x1973aa,_0x518eff);exports[_0x53e49a(0x1ca)]=class extends c['Plugin']{constructor(_0x40614f=D,_0x5b9632,_0x38d209){const _0x5273df=_0x53e49a;super(),this['_config']=_0x40614f,this[_0x5273df(0x201)]=_0x5b9632,this['_configService']=_0x38d209;const {..._0x850019}=c['merge']({},D,this['_config']);this['_configService'][_0x5273df(0x20b)](q,_0x850019);}[_0x53e49a(0x1bb)](){const _0x17cbfe=_0x53e49a;[[p],[g],[_]][_0x17cbfe(0x1e9)](_0x3002b3=>{const _0xafaf1f=_0x17cbfe;this[_0xafaf1f(0x201)]['add'](_0x3002b3);});}[_0x53e49a(0x1b2)](){const _0x48cd52=_0x53e49a;this[_0x48cd52(0x201)][_0x48cd52(0x1cf)](g),this[_0x48cd52(0x201)][_0x48cd52(0x1cf)](_);}},N(exports[_0x53e49a(0x1ca)],_0x53e49a(0x1c8),U),N(exports[_0x53e49a(0x1ca)],_0x53e49a(0x1f7),c[_0x53e49a(0x1d1)][_0x53e49a(0x1bd)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x53e49a(0x1ba)](w['UniverThreadCommentUIPlugin'],b[_0x53e49a(0x1a4)],T['UniverLicensePlugin']),O(0x1,c[_0x53e49a(0x1d4)](c[_0x53e49a(0x1d9)])),O(0x2,c[_0x53e49a(0x219)])],exports[_0x53e49a(0x1ca)]);
|
|
1
|
+
'use strict';const _0xc938f6=_0x8491;function _0x20d3(){const _0x5c8d0d=['Module','ref','getCurrentUser','140576yFGDmw','UniverCollaborationClientPlugin','UniverThreadCommentDataSourcePlugin','syncUpdateMutationToColla','Edit','error','_initUserSync','_commentService','pipe','_httpService','replyId','_threadCommentModel','resolveComment','stringify','requireSession','commentUpdate$','resolved','Plugin','rangeType','values','dayjs','_userService','12WJQEWI','forEach','addComment','deleteComment','length','/universer-api/user/list','users','body','find','UserManagerService','Disposable','16340HbVQvg','parentId','_sessionService','user','thread-comment-data-source.config','pluginName','userId','parse','OpenOrReOpen','7842888SwZCBP','HTTPService','addUser','YYYY/MM/DD\x20HH:mm','map','post','onReady','_threadCommentDataSource','Solved','CommentService','Delete','userID','reply','replies','getUser','subscribe','updateComment','createTimestamp','IThreadCommentDataSourceService','threadId','UniverInstanceType','UNRECOGNIZED','getOwnPropertyDescriptor','size','2250915vfKTLD','customRanges','payload','2853NqKUzn','Unknown','Inject','slice','Solve','_config','filter','_injector','rangeId','4600085cQvugu','bufferTime','_initDataSource','/reply','setConfig','UniverLicensePlugin','get','CustomRangeType','add','defineProperty','Add','getMemberID','/universer-api/comment/unit/','solved','/edit','type','Reply','/add','code','/list','getUnit','17740uKnzyi','103WqtgiW','unitId','content','disposeWithMe','root','Injector','onStarting','966275wurAUZ','comment','COMMENT','format','merge','_init','/solved'];_0x20d3=function(){return _0x5c8d0d;};return _0x20d3();}(function(_0x2b328e,_0x178ad5){const _0x4fd283=_0x8491,_0x4321ac=_0x2b328e();while(!![]){try{const _0x57c3d8=-parseInt(_0x4fd283(0x18d))/0x1*(parseInt(_0x4fd283(0x1bf))/0x2)+parseInt(_0x4fd283(0x16b))/0x3+-parseInt(_0x4fd283(0x19e))/0x4+-parseInt(_0x4fd283(0x194))/0x5*(parseInt(_0x4fd283(0x1b4))/0x6)+parseInt(_0x4fd283(0x177))/0x7+parseInt(_0x4fd283(0x1c8))/0x8+parseInt(_0x4fd283(0x16e))/0x9*(-parseInt(_0x4fd283(0x18c))/0xa);if(_0x57c3d8===_0x178ad5)break;else _0x4321ac['push'](_0x4321ac['shift']());}catch(_0x525b05){_0x4321ac['push'](_0x4321ac['shift']());}}}(_0x20d3,0x8947b));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0xc938f6(0x19b)});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='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5488a6=>(_0x5488a6[_0x5488a6['OpenOrReOpen']=0x0]=_0xc938f6(0x1c7),_0x5488a6[_0x5488a6['Solved']=0x1]=_0xc938f6(0x1d0),_0x5488a6[_0x5488a6[_0xc938f6(0x1dd)]=-0x1]=_0xc938f6(0x1dd),_0x5488a6))(I||{}),v=(_0x5ae9aa=>(_0x5ae9aa[_0x5ae9aa['Unknown']=0x0]=_0xc938f6(0x16f),_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x181)]=0x1]=_0xc938f6(0x181),_0x5ae9aa[_0x5ae9aa['Reply']=0x2]='Reply',_0x5ae9aa[_0x5ae9aa['Edit']=0x3]=_0xc938f6(0x1a2),_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x1d2)]=0x4]='Delete',_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x172)]=0x5]='Solve',_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x1dd)]=-0x1]=_0xc938f6(0x1dd),_0x5ae9aa))(v||{});const f=_0x45fc74=>c[_0xc938f6(0x1b2)](new Date(+_0x45fc74))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5a0dcf,_0x47fa32)=>{const _0x47702c=_0xc938f6,_0x454292=_0x5a0dcf[_0x47702c(0x17d)](c[_0x47702c(0x1bd)]),_0x4db2a6=_0x5a0dcf[_0x47702c(0x17d)](P[_0x47702c(0x1c9)]);_0x47fa32[_0x47702c(0x1b5)](_0x3b56c2=>{const _0xf4a364=_0x47702c;_0x454292[_0xf4a364(0x1d6)](_0x3b56c2)&&_0x47fa32['delete'](_0x3b56c2);}),_0x47fa32[_0x47702c(0x1df)]&&(await _0x4db2a6[_0x47702c(0x17d)](_0x47702c(0x1b9),{'params':{'userIDs':[..._0x47fa32]}}))[_0x47702c(0x1bb)][_0x47702c(0x1ba)][_0x47702c(0x1b5)](_0x1bcead=>{const _0x2a2f04=_0x47702c;_0x1bcead&&_0x454292[_0x2a2f04(0x1ca)](_0x1bcead);});};var $=Object[_0xc938f6(0x1de)],E=(_0x2dd839,_0x4e4ebf,_0x497fa5,_0x36a496)=>{const _0x33596a=_0xc938f6;for(var _0x5b39dc=_0x36a496>0x1?void 0x0:_0x36a496?$(_0x4e4ebf,_0x497fa5):_0x4e4ebf,_0x5804f4=_0x2dd839[_0x33596a(0x1b8)]-0x1,_0xb1fd18;_0x5804f4>=0x0;_0x5804f4--)(_0xb1fd18=_0x2dd839[_0x5804f4])&&(_0x5b39dc=_0xb1fd18(_0x5b39dc)||_0x5b39dc);return _0x5b39dc;},S=(_0x3c214f,_0x336ae0)=>(_0x54d317,_0x2d6c91)=>_0x336ae0(_0x54d317,_0x2d6c91,_0x3c214f);let _=class extends c['Disposable']{constructor(_0x14fbc2,_0x3c66b9,_0x49333b,_0x334664){const _0x37044f=_0xc938f6;super(),this[_0x37044f(0x1a5)]=_0x14fbc2,this[_0x37044f(0x1a9)]=_0x3c66b9,this[_0x37044f(0x1b3)]=_0x49333b,this['_injector']=_0x334664,this[_0x37044f(0x199)](),this[_0x37044f(0x1a4)]();}[_0xc938f6(0x1a4)](){const _0x56fb75=_0xc938f6;this['disposeWithMe'](this[_0x56fb75(0x1a9)][_0x56fb75(0x1ad)][_0x56fb75(0x1a6)](j[_0x56fb75(0x178)](0x10))[_0x56fb75(0x1d7)](_0x314b38=>{const _0x56ad65=_0x56fb75,_0x212d68=new Set();_0x314b38['forEach'](_0x1ba8c1=>{const _0x16a9ec=_0x8491;switch(_0x1ba8c1[_0x16a9ec(0x186)]){case'add':{const _0x832905=_0x1ba8c1[_0x16a9ec(0x16d)]['personId'];_0x212d68[_0x16a9ec(0x17f)](_0x832905);break;}}}),R(this[_0x56ad65(0x175)],_0x212d68);}));}['_init'](){const _0x552728=_0xc938f6;this[_0x552728(0x190)](this[_0x552728(0x1a5)][_0x552728(0x1ad)][_0x552728(0x1d7)](async _0xdec365=>{const _0x1dea13=_0x552728;var _0x2e3baa,_0x374bdb,_0x2ea446,_0x1a0cef;const _0x125826=(_0x2e3baa=this['_threadCommentModel'][_0x1dea13(0x18b)](_0xdec365[_0x1dea13(0x18e)])['find'](_0x106f5b=>_0x106f5b['threadId']===_0xdec365[_0x1dea13(0x1db)]))==null?void 0x0:_0x2e3baa[_0x1dea13(0x191)];if(!_0x125826)return;const {unitId:_0x38ed06,subUnitId:_0x145f9f}=_0x125826;switch(_0xdec365[_0x1dea13(0x1c2)]&&this[_0x1dea13(0x1b3)]['addUser'](_0xdec365[_0x1dea13(0x1c2)]),_0xdec365[_0x1dea13(0x186)]){case v[_0x1dea13(0x181)]:break;case v[_0x1dea13(0x187)]:{this[_0x1dea13(0x1a9)][_0x1dea13(0x1b6)](_0x38ed06,_0x145f9f,{'unitId':_0x38ed06,'subUnitId':_0x145f9f,'ref':'','id':_0xdec365[_0x1dea13(0x1a8)],'dT':f(+_0xdec365[_0x1dea13(0x1d9)]),'threadId':_0xdec365[_0x1dea13(0x1db)],'personId':(_0x2ea446=(_0x374bdb=_0xdec365['user'])==null?void 0x0:_0x374bdb[_0x1dea13(0x1d3)])!=null?_0x2ea446:_0xdec365['userId'],'text':JSON[_0x1dea13(0x1c6)](_0xdec365[_0x1dea13(0x18f)]),'parentId':_0x125826['id']});break;}case v[_0x1dea13(0x1d2)]:{const _0x31480f=this[_0x1dea13(0x1a9)]['getComment'](_0x38ed06,_0x145f9f,_0xdec365[_0x1dea13(0x1a8)]);_0x31480f&&_0x31480f[_0x1dea13(0x1c0)]&&this['_threadCommentModel']['deleteComment'](_0x38ed06,_0x145f9f,_0xdec365[_0x1dea13(0x1a8)]);break;}case v[_0x1dea13(0x1a2)]:{this['_threadCommentModel'][_0x1dea13(0x1d8)](_0x38ed06,_0x145f9f,{'commentId':_0xdec365['replyId'],'text':JSON['parse'](_0xdec365[_0x1dea13(0x18f)])});break;}case v['Solve']:{const _0x56e1a8=(_0x1a0cef=this[_0x1dea13(0x1a9)][_0x1dea13(0x18b)](_0xdec365[_0x1dea13(0x18e)])[_0x1dea13(0x1bc)](_0x51863c=>_0x51863c[_0x1dea13(0x1db)]===_0xdec365[_0x1dea13(0x1db)]))==null?void 0x0:_0x1a0cef[_0x1dea13(0x191)];_0x56e1a8&&this['_threadCommentModel'][_0x1dea13(0x1aa)](_0x38ed06,_0x145f9f,_0x56e1a8['id'],_0xdec365[_0x1dea13(0x184)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0xc938f6(0x170)](b[_0xc938f6(0x1d1)])),S(0x1,c[_0xc938f6(0x170)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0xc938f6(0x1bd)])),S(0x3,c[_0xc938f6(0x170)](c[_0xc938f6(0x192)]))],_);const q=_0xc938f6(0x1c3),D={};var A=Object[_0xc938f6(0x1de)],x=(_0x2e59d2,_0x2a8880,_0x32971c,_0x8de674)=>{for(var _0x3e0e3d=_0x8de674>0x1?void 0x0:_0x8de674?A(_0x2a8880,_0x32971c):_0x2a8880,_0x449b6d=_0x2e59d2['length']-0x1,_0x375ebd;_0x449b6d>=0x0;_0x449b6d--)(_0x375ebd=_0x2e59d2[_0x449b6d])&&(_0x3e0e3d=_0x375ebd(_0x3e0e3d)||_0x3e0e3d);return _0x3e0e3d;},C=(_0x2cdd2a,_0x419280)=>(_0x162afc,_0x6f4162)=>_0x419280(_0x162afc,_0x6f4162,_0x2cdd2a);function Y(_0x14b0c7,_0x2caea1){const _0x37659b=_0xc938f6,_0x3c5896=_0x14b0c7['replies'][0x0];return{..._0x2caea1,'id':_0x3c5896[_0x37659b(0x1a8)],'resolved':_0x14b0c7['solved']===0x1,'dT':f(_0x3c5896[_0x37659b(0x1d9)]),'personId':_0x3c5896[_0x37659b(0x1c5)],'threadId':_0x3c5896[_0x37659b(0x1db)]};}function G(_0x49f81e,_0x2ee5e4,_0x279b52){const _0x4dfa78=_0xc938f6;var _0xd84fec,_0x9545bb;if(((_0x9545bb=(_0xd84fec=_0x49f81e==null?void 0x0:_0x49f81e[_0x4dfa78(0x1d5)])==null?void 0x0:_0xd84fec[_0x4dfa78(0x1b8)])!=null?_0x9545bb:0x0)>0x0){const _0x4da43=(_0x195289,_0x403a51)=>({'id':_0x195289[_0x4dfa78(0x1a8)],'threadId':_0x195289[_0x4dfa78(0x1db)],'dT':f(_0x195289[_0x4dfa78(0x1d9)]),'personId':_0x195289['userId'],'resolved':_0x49f81e[_0x4dfa78(0x184)]===I['Solved'],'unitId':_0x2ee5e4,'subUnitId':_0x279b52,'text':JSON[_0x4dfa78(0x1c6)](_0x195289['content']),'parentId':_0x403a51}),_0x5ebaa6=_0x4da43(_0x49f81e[_0x4dfa78(0x1d5)][0x0]);return{..._0x5ebaa6,'children':_0x49f81e[_0x4dfa78(0x1d5)][_0x4dfa78(0x171)](0x1)[_0x4dfa78(0x1cc)](_0x2f854a=>_0x4da43(_0x2f854a,_0x5ebaa6['id']))};}return null;}function _0x8491(_0x2aadaf,_0xf7eb6b){_0x2aadaf=_0x2aadaf-0x16b;const _0x20d329=_0x20d3();let _0x849192=_0x20d329[_0x2aadaf];return _0x849192;}let p=class{constructor(_0x322e62,_0x30dbf2,_0x1cb237){const _0xb07b1f=_0xc938f6;this[_0xb07b1f(0x1a7)]=_0x322e62,this[_0xb07b1f(0x1b3)]=_0x30dbf2,this['_sessionService']=_0x1cb237;}async[_0xc938f6(0x1b6)](_0x2d2307){const _0x39368c=_0xc938f6;var _0x49a2bc,_0x170b07;const {parentId:_0x43a7e8,unitId:_0x15e98f,text:_0x57e494,threadId:_0x945762}=_0x2d2307,_0x389c75=(_0x170b07=(_0x49a2bc=_0x57e494[_0x39368c(0x16c)])==null?void 0x0:_0x49a2bc[_0x39368c(0x174)](_0x40fba9=>_0x40fba9[_0x39368c(0x1b0)]===c[_0x39368c(0x17e)][_0x39368c(0x196)])[_0x39368c(0x1cc)](_0x33eb48=>_0x33eb48[_0x39368c(0x176)]))!=null?_0x170b07:[],_0x2d5cb7=JSON[_0x39368c(0x1ab)](_0x57e494),_0x948412=(await this[_0x39368c(0x1c1)][_0x39368c(0x1ac)](_0x15e98f))[_0x39368c(0x182)]();if(_0x43a7e8){const _0x49c24a={'memberId':_0x948412,'unitId':_0x15e98f,'content':_0x2d5cb7,'mention':_0x389c75,'threadId':_0x945762},_0x57bb46=(await this[_0x39368c(0x1a7)][_0x39368c(0x1cd)]('/universer-api/comment/unit/'+_0x15e98f+_0x39368c(0x17a),{'body':_0x49c24a}))['body'][_0x39368c(0x1d4)];return{..._0x2d2307,'id':_0x57bb46[_0x39368c(0x1a8)],'dT':c[_0x39368c(0x1b2)](+_0x57bb46[_0x39368c(0x1d9)])[_0x39368c(0x197)](_0x39368c(0x1cb)),'personId':_0x57bb46['userId']};}else{const _0x252706={'memberId':_0x948412,'unitId':_0x15e98f,'content':_0x2d5cb7,'mention':_0x389c75},_0x57a920=await this[_0x39368c(0x1a7)][_0x39368c(0x1cd)](_0x39368c(0x183)+_0x15e98f+_0x39368c(0x188),{'body':_0x252706});return Y(_0x57a920['body'][_0x39368c(0x195)],_0x2d2307);}}async[_0xc938f6(0x1d8)](_0x48dde){const _0x3f0c09=_0xc938f6;var _0x5f155a,_0x4ef511;const {text:_0xc7f607,unitId:_0x38441d}=_0x48dde,_0x597b05=(_0x4ef511=(_0x5f155a=_0xc7f607[_0x3f0c09(0x16c)])==null?void 0x0:_0x5f155a[_0x3f0c09(0x174)](_0x2fc186=>_0x2fc186[_0x3f0c09(0x1b0)]===c[_0x3f0c09(0x17e)][_0x3f0c09(0x196)])[_0x3f0c09(0x1cc)](_0x3ffa49=>_0x3ffa49[_0x3f0c09(0x176)]))!=null?_0x4ef511:[],_0x165cef=JSON[_0x3f0c09(0x1ab)](_0xc7f607),_0xb9e493=_0x48dde['threadId'],_0x2034e8=_0x48dde['id'],_0x20bb42={'memberId':(await this[_0x3f0c09(0x1c1)][_0x3f0c09(0x1ac)](_0x38441d))[_0x3f0c09(0x182)](),'unitId':_0x38441d,'threadId':_0xb9e493,'mention':_0x597b05,'content':_0x165cef,'replyId':_0x2034e8},_0x10509a=await this['_httpService'][_0x3f0c09(0x1cd)](_0x3f0c09(0x183)+_0x38441d+_0x3f0c09(0x185),{'body':_0x20bb42});return!_0x10509a[_0x3f0c09(0x1bb)][_0x3f0c09(0x1a3)]||_0x10509a[_0x3f0c09(0x1bb)][_0x3f0c09(0x1a3)][_0x3f0c09(0x189)]===0x1;}async[_0xc938f6(0x1aa)](_0x413f5d){const _0x1918ff=_0xc938f6,{unitId:_0x109b99}=_0x413f5d,_0xe38934=_0x413f5d[_0x1918ff(0x1db)],_0x5ba7e1={'memberId':this[_0x1918ff(0x1b3)][_0x1918ff(0x19d)]()[_0x1918ff(0x1d3)],'unitId':_0x109b99,'threadId':_0xe38934,'solved':_0x413f5d[_0x1918ff(0x1ae)]?I['Solved']:I['OpenOrReOpen']},_0x2418b7=await this['_httpService'][_0x1918ff(0x1cd)](_0x1918ff(0x183)+_0x109b99+_0x1918ff(0x19a),{'body':_0x5ba7e1});return!_0x2418b7[_0x1918ff(0x1bb)]['error']||_0x2418b7['body'][_0x1918ff(0x1a3)]['code']===0x1;}async[_0xc938f6(0x1b7)](_0x149d78,_0x309eee,_0x5a4e72,_0x2bd597){const _0x1869ed=_0xc938f6,_0x545a09={'memberId':(await this[_0x1869ed(0x1c1)][_0x1869ed(0x1ac)](_0x149d78))[_0x1869ed(0x182)](),'threadId':_0x5a4e72,'replyId':_0x2bd597,'unitId':_0x149d78},_0x2a2c8b=await this['_httpService'][_0x1869ed(0x1cd)]('/universer-api/comment/unit/'+_0x149d78+'/delete',{'body':_0x545a09});return!_0x2a2c8b[_0x1869ed(0x1bb)][_0x1869ed(0x1a3)]||_0x2a2c8b[_0x1869ed(0x1bb)][_0x1869ed(0x1a3)]['code']===0x1;}async['listComments'](_0x5dd740,_0x14b4d7,_0x370340){const _0x1752b8=_0xc938f6,_0x349306={'unitId':_0x5dd740,'threadId':_0x370340},_0x1c8c24=await this[_0x1752b8(0x1a7)][_0x1752b8(0x1cd)]('/universer-api/comment/unit/'+_0x5dd740+_0x1752b8(0x18a),{'body':_0x349306}),_0x21eaa3=_0x370340['map'](_0xc4f9e0=>G(_0x1c8c24[_0x1752b8(0x1bb)]['comments'][_0xc4f9e0],_0x5dd740,_0x14b4d7))['filter'](Boolean);return Object[_0x1752b8(0x1b1)](_0x1c8c24['body']['users'])[_0x1752b8(0x1b5)](_0x527b66=>{const _0x2d134c=_0x1752b8;this[_0x2d134c(0x1b3)][_0x2d134c(0x1ca)](_0x527b66);}),_0x21eaa3;}['saveCommentToSnapshot'](_0x1dffdc){const _0x2a4fc2=_0xc938f6;return{'id':_0x1dffdc['id'],'threadId':_0x1dffdc[_0x2a4fc2(0x1db)],'ref':_0x1dffdc[_0x2a4fc2(0x19c)]};}};p=x([C(0x0,c['Inject'](P[_0xc938f6(0x1c9)])),C(0x1,c[_0xc938f6(0x170)](c[_0xc938f6(0x1bd)])),C(0x2,c[_0xc938f6(0x170)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x139876,_0x48d523,_0xd2761d,_0x5cf572)=>{const _0x10c811=_0xc938f6;for(var _0x430aa9=_0x5cf572>0x1?void 0x0:_0x5cf572?H(_0x48d523,_0xd2761d):_0x48d523,_0xbea806=_0x139876[_0x10c811(0x1b8)]-0x1,_0x357772;_0xbea806>=0x0;_0xbea806--)(_0x357772=_0x139876[_0xbea806])&&(_0x430aa9=_0x357772(_0x430aa9)||_0x430aa9);return _0x430aa9;},y=(_0x1d098b,_0x5a5648)=>(_0x4264c1,_0x234146)=>_0x5a5648(_0x4264c1,_0x234146,_0x1d098b);let g=class extends c[_0xc938f6(0x1be)]{constructor(_0xf4143a,_0x343dd5){const _0x4188e3=_0xc938f6;super(),this['_threadCommentDataSourceService']=_0xf4143a,this[_0x4188e3(0x1cf)]=_0x343dd5,this[_0x4188e3(0x179)]();}[_0xc938f6(0x179)](){const _0x292c9f=_0xc938f6;this['_threadCommentDataSourceService']['dataSource']=this[_0x292c9f(0x1cf)],this['_threadCommentDataSourceService'][_0x292c9f(0x1a1)]=!0x1;}};g=J([y(0x0,M[_0xc938f6(0x1da)]),y(0x1,c[_0xc938f6(0x170)](p))],g);var F=Object[_0xc938f6(0x180)],L=Object[_0xc938f6(0x1de)],Z=(_0x4d478d,_0x15b119,_0x6fa78)=>_0x15b119 in _0x4d478d?F(_0x4d478d,_0x15b119,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6fa78}):_0x4d478d[_0x15b119]=_0x6fa78,W=(_0x4e6a11,_0x30c5a2,_0x35a54e,_0xc67c9f)=>{const _0x2dce32=_0xc938f6;for(var _0x42e268=_0xc67c9f>0x1?void 0x0:_0xc67c9f?L(_0x30c5a2,_0x35a54e):_0x30c5a2,_0x3023a9=_0x4e6a11[_0x2dce32(0x1b8)]-0x1,_0x2462c2;_0x3023a9>=0x0;_0x3023a9--)(_0x2462c2=_0x4e6a11[_0x3023a9])&&(_0x42e268=_0x2462c2(_0x42e268)||_0x42e268);return _0x42e268;},O=(_0x5d4f95,_0x5b3ca6)=>(_0x440f74,_0x8db732)=>_0x5b3ca6(_0x440f74,_0x8db732,_0x5d4f95),N=(_0x2a7795,_0xbe8efa,_0x1e76b0)=>Z(_0x2a7795,typeof _0xbe8efa!='symbol'?_0xbe8efa+'':_0xbe8efa,_0x1e76b0);exports[_0xc938f6(0x1a0)]=class extends c[_0xc938f6(0x1af)]{constructor(_0x2e1ad5=D,_0xda7095,_0x537453){const _0x4c8f50=_0xc938f6;super(),this[_0x4c8f50(0x173)]=_0x2e1ad5,this['_injector']=_0xda7095,this['_configService']=_0x537453;const {..._0x26d0d7}=c[_0x4c8f50(0x198)]({},D,this[_0x4c8f50(0x173)]);this['_configService'][_0x4c8f50(0x17b)](q,_0x26d0d7);}[_0xc938f6(0x193)](){const _0x4c6dc0=_0xc938f6;[[p],[g],[_]][_0x4c6dc0(0x1b5)](_0x36cf9d=>{const _0x25667a=_0x4c6dc0;this[_0x25667a(0x175)]['add'](_0x36cf9d);});}[_0xc938f6(0x1ce)](){const _0x15bb24=_0xc938f6;this[_0x15bb24(0x175)]['get'](g),this[_0x15bb24(0x175)][_0x15bb24(0x17d)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xc938f6(0x1c4),U),N(exports[_0xc938f6(0x1a0)],_0xc938f6(0x186),c[_0xc938f6(0x1dc)]['UNIVER_UNKNOWN']),exports[_0xc938f6(0x1a0)]=W([c['DependentOn'](w['UniverThreadCommentUIPlugin'],b[_0xc938f6(0x19f)],T[_0xc938f6(0x17c)]),O(0x1,c[_0xc938f6(0x170)](c[_0xc938f6(0x192)])),O(0x2,c['IConfigService'])],exports[_0xc938f6(0x1a0)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x427b0c=_0x2010;(function(_0x57dbff,_0x2de5b2){const _0x2736c7=_0x2010,_0x32937e=_0x57dbff();while(!![]){try{const _0x436f77=-parseInt(_0x2736c7(0x12f))/0x1*(parseInt(_0x2736c7(0x101))/0x2)+-parseInt(_0x2736c7(0x118))/0x3+parseInt(_0x2736c7(0x146))/0x4+parseInt(_0x2736c7(0x127))/0x5+-parseInt(_0x2736c7(0x115))/0x6+-parseInt(_0x2736c7(0x110))/0x7+parseInt(_0x2736c7(0x12b))/0x8;if(_0x436f77===_0x2de5b2)break;else _0x32937e['push'](_0x32937e['shift']());}catch(_0x306f43){_0x32937e['push'](_0x32937e['shift']());}}}(_0x377c,0x64619));import{CommentService as _0x406774,CollaborationSessionService as _0x264c29,UniverCollaborationClientPlugin as _0x4f9fad}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5e191e}from'@univerjs-pro/license';import{dayjs as _0x13fc8d,UserManagerService as _0x42c2f7,Inject as _0x51d02a,Injector as _0x440100,Disposable as _0x5a35c7,CustomRangeType as _0x38fd19,UniverInstanceType as _0x5c6fb1,DependentOn as _0x475c39,IConfigService as _0x2959e9,Plugin as _0x834bcd,merge as _0x523a0c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9a2f36}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x335932,IThreadCommentDataSourceService as _0x2621a6}from'@univerjs/thread-comment';import{bufferTime as _0xe21b99}from'rxjs';import{HTTPService as _0x39ec00}from'@univerjs/network';const W=_0x427b0c(0x108);var I=(_0x2055aa=>(_0x2055aa[_0x2055aa['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2055aa[_0x2055aa[_0x427b0c(0x141)]=0x1]=_0x427b0c(0x141),_0x2055aa[_0x2055aa[_0x427b0c(0x10c)]=-0x1]='UNRECOGNIZED',_0x2055aa))(I||{}),v=(_0x137c97=>(_0x137c97[_0x137c97['Unknown']=0x0]=_0x427b0c(0x113),_0x137c97[_0x137c97[_0x427b0c(0x12a)]=0x1]=_0x427b0c(0x12a),_0x137c97[_0x137c97['Reply']=0x2]=_0x427b0c(0x11b),_0x137c97[_0x137c97['Edit']=0x3]='Edit',_0x137c97[_0x137c97['Delete']=0x4]=_0x427b0c(0x11f),_0x137c97[_0x137c97[_0x427b0c(0x121)]=0x5]=_0x427b0c(0x121),_0x137c97[_0x137c97['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x137c97))(v||{});const y=_0x5f0fc8=>_0x13fc8d(new Date(+_0x5f0fc8))[_0x427b0c(0x10f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x117742,_0x51f65e)=>{const _0x2e406f=_0x427b0c,_0x2b1424=_0x117742[_0x2e406f(0x11a)](_0x42c2f7),_0x5c5a4e=_0x117742[_0x2e406f(0x11a)](_0x39ec00);_0x51f65e[_0x2e406f(0x138)](_0x292d66=>{const _0x3f56a2=_0x2e406f;_0x2b1424[_0x3f56a2(0x11c)](_0x292d66)&&_0x51f65e[_0x3f56a2(0x13a)](_0x292d66);}),_0x51f65e[_0x2e406f(0x124)]&&(await _0x5c5a4e['get'](_0x2e406f(0x123),{'params':{'userIDs':[..._0x51f65e]}}))['body']['users'][_0x2e406f(0x138)](_0x365945=>{const _0x1ccd51=_0x2e406f;_0x365945&&_0x2b1424[_0x1ccd51(0x139)](_0x365945);});};var K=Object[_0x427b0c(0xe3)],V=(_0x18cb91,_0x497cbd,_0x5172e7,_0x4f1811)=>{const _0x33c830=_0x427b0c;for(var _0x24d2e6=_0x4f1811>0x1?void 0x0:_0x4f1811?K(_0x497cbd,_0x5172e7):_0x497cbd,_0x35a105=_0x18cb91[_0x33c830(0x13f)]-0x1,_0x5a17c1;_0x35a105>=0x0;_0x35a105--)(_0x5a17c1=_0x18cb91[_0x35a105])&&(_0x24d2e6=_0x5a17c1(_0x24d2e6)||_0x24d2e6);return _0x24d2e6;},p=(_0x175fb0,_0x35d032)=>(_0x3c588c,_0x5140d4)=>_0x35d032(_0x3c588c,_0x5140d4,_0x175fb0);let _=class extends _0x5a35c7{constructor(_0x108c68,_0xaf91c1,_0x30e61c,_0x2775fe){const _0x12bb0c=_0x427b0c;super(),this[_0x12bb0c(0x10d)]=_0x108c68,this[_0x12bb0c(0x102)]=_0xaf91c1,this[_0x12bb0c(0x12e)]=_0x30e61c,this[_0x12bb0c(0xe9)]=_0x2775fe,this[_0x12bb0c(0x130)](),this[_0x12bb0c(0x131)]();}['_initUserSync'](){const _0x5e4cab=_0x427b0c;this[_0x5e4cab(0x145)](this[_0x5e4cab(0x102)]['commentUpdate$']['pipe'](_0xe21b99(0x10))[_0x5e4cab(0xe8)](_0x15a592=>{const _0x550844=_0x5e4cab,_0x4bfbf8=new Set();_0x15a592[_0x550844(0x138)](_0x1fc900=>{const _0x36377f=_0x550844;switch(_0x1fc900[_0x36377f(0x13d)]){case _0x36377f(0xe2):{const _0x40004f=_0x1fc900['payload'][_0x36377f(0xe6)];_0x4bfbf8['add'](_0x40004f);break;}}}),B(this[_0x550844(0xe9)],_0x4bfbf8);}));}['_init'](){const _0x1a1608=_0x427b0c;this[_0x1a1608(0x145)](this[_0x1a1608(0x10d)][_0x1a1608(0x111)][_0x1a1608(0xe8)](async _0xba0dc1=>{const _0x43699d=_0x1a1608;var _0x2b91b9,_0x11f085,_0x5a1f92,_0x33a5c3;const _0x597b9b=(_0x2b91b9=this[_0x43699d(0x102)][_0x43699d(0xef)](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x42e84a=>_0x42e84a[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x2b91b9['root'];if(!_0x597b9b)return;const {unitId:_0x5b66cb,subUnitId:_0xa79809}=_0x597b9b;switch(_0xba0dc1[_0x43699d(0xf6)]&&this[_0x43699d(0x12e)][_0x43699d(0x139)](_0xba0dc1[_0x43699d(0xf6)]),_0xba0dc1[_0x43699d(0x13d)]){case v['Add']:break;case v[_0x43699d(0x11b)]:{this[_0x43699d(0x102)][_0x43699d(0xeb)](_0x5b66cb,_0xa79809,{'unitId':_0x5b66cb,'subUnitId':_0xa79809,'ref':'','id':_0xba0dc1[_0x43699d(0xfe)],'dT':y(+_0xba0dc1[_0x43699d(0x11e)]),'threadId':_0xba0dc1[_0x43699d(0xfa)],'personId':(_0x5a1f92=(_0x11f085=_0xba0dc1[_0x43699d(0xf6)])==null?void 0x0:_0x11f085[_0x43699d(0x100)])!=null?_0x5a1f92:_0xba0dc1['userId'],'text':JSON[_0x43699d(0xf7)](_0xba0dc1[_0x43699d(0x137)]),'parentId':_0x597b9b['id']});break;}case v[_0x43699d(0x11f)]:{const _0x5c1884=this[_0x43699d(0x102)]['getComment'](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);_0x5c1884&&_0x5c1884['parentId']&&this[_0x43699d(0x102)][_0x43699d(0x103)](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);break;}case v[_0x43699d(0x116)]:{this[_0x43699d(0x102)][_0x43699d(0x106)](_0x5b66cb,_0xa79809,{'commentId':_0xba0dc1[_0x43699d(0xfe)],'text':JSON['parse'](_0xba0dc1['content'])});break;}case v[_0x43699d(0x121)]:{const _0x2c178c=(_0x33a5c3=this[_0x43699d(0x102)]['getUnit'](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x57e23e=>_0x57e23e[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x33a5c3[_0x43699d(0xff)];_0x2c178c&&this[_0x43699d(0x102)][_0x43699d(0x11d)](_0x5b66cb,_0xa79809,_0x2c178c['id'],_0xba0dc1[_0x43699d(0x126)]===I[_0x43699d(0x141)]);break;}}}));}};_=V([p(0x0,_0x51d02a(_0x406774)),p(0x1,_0x51d02a(_0x335932)),p(0x2,_0x51d02a(_0x42c2f7)),p(0x3,_0x51d02a(_0x440100))],_);const z=_0x427b0c(0x129),O={};function _0x2010(_0x10d55b,_0x1006c1){_0x10d55b=_0x10d55b-0xe2;const _0x377c65=_0x377c();let _0x201066=_0x377c65[_0x10d55b];return _0x201066;}var k=Object[_0x427b0c(0xe3)],Q=(_0x4acb78,_0x3af339,_0x1465f0,_0x544465)=>{const _0x27a7e3=_0x427b0c;for(var _0x394834=_0x544465>0x1?void 0x0:_0x544465?k(_0x3af339,_0x1465f0):_0x3af339,_0x3320d6=_0x4acb78[_0x27a7e3(0x13f)]-0x1,_0x398335;_0x3320d6>=0x0;_0x3320d6--)(_0x398335=_0x4acb78[_0x3320d6])&&(_0x394834=_0x398335(_0x394834)||_0x394834);return _0x394834;},b=(_0x14c0d8,_0x98e02f)=>(_0xd323c7,_0x23bd47)=>_0x98e02f(_0xd323c7,_0x23bd47,_0x14c0d8);function X(_0x30d4e1,_0x3ddc67){const _0x5c4e94=_0x427b0c,_0x5b82be=_0x30d4e1[_0x5c4e94(0x132)][0x0];return{..._0x3ddc67,'id':_0x5b82be[_0x5c4e94(0xfe)],'resolved':_0x30d4e1[_0x5c4e94(0x126)]===0x1,'dT':y(_0x5b82be[_0x5c4e94(0x11e)]),'personId':_0x5b82be[_0x5c4e94(0xea)],'threadId':_0x5b82be['threadId']};}function _0x377c(){const _0x29caea=['body','unitId','onStarting','UNRECOGNIZED','_commentService','users','format','4723691KfrHJO','commentUpdate$','stringify','Unknown','rangeId','2042082JQQjaV','Edit','_config','1047003xsDrhE','/list','get','Reply','getUser','resolveComment','createTimestamp','Delete','onReady','Solve','syncUpdateMutationToColla','/universer-api/user/list','size','_httpService','solved','11710BRLVuU','_threadCommentDataSourceService','thread-comment-data-source.config','Add','17399304PGPVsW','/solved','COMMENT','_userService','10eVrVCL','_init','_initUserSync','replies','_sessionService','_threadCommentDataSource','find','_initDataSource','content','forEach','addUser','delete','/reply','UNIVER_UNKNOWN','type','/edit','length','values','Solved','saveCommentToSnapshot','setConfig','requireSession','disposeWithMe','132948EvmXrq','slice','add','getOwnPropertyDescriptor','ref','filter','personId','dataSource','subscribe','_injector','userId','addComment','code','customRanges','error','getUnit','/add','symbol','_configService','/universer-api/comment/unit/','OpenOrReOpen','getMemberID','user','parse','reply','resolved','threadId','post','getCurrentUser','map','replyId','root','userID','87034iRoCtl','_threadCommentModel','deleteComment','comment','rangeType','updateComment','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x377c=function(){return _0x29caea;};return _0x377c();}function ee(_0x2f8ffc,_0x5477d3,_0x2acd17){const _0x79548c=_0x427b0c;var _0x4e3de5,_0x5b958e;if(((_0x5b958e=(_0x4e3de5=_0x2f8ffc==null?void 0x0:_0x2f8ffc['replies'])==null?void 0x0:_0x4e3de5[_0x79548c(0x13f)])!=null?_0x5b958e:0x0)>0x0){const _0x202afc=(_0x3c3e3f,_0x2f2657)=>({'id':_0x3c3e3f['replyId'],'threadId':_0x3c3e3f[_0x79548c(0xfa)],'dT':y(_0x3c3e3f[_0x79548c(0x11e)]),'personId':_0x3c3e3f[_0x79548c(0xea)],'resolved':_0x2f8ffc['solved']===I['Solved'],'unitId':_0x5477d3,'subUnitId':_0x2acd17,'text':JSON['parse'](_0x3c3e3f[_0x79548c(0x137)]),'parentId':_0x2f2657}),_0x2e4d9c=_0x202afc(_0x2f8ffc['replies'][0x0]);return{..._0x2e4d9c,'children':_0x2f8ffc[_0x79548c(0x132)][_0x79548c(0x147)](0x1)[_0x79548c(0xfd)](_0x5c3140=>_0x202afc(_0x5c3140,_0x2e4d9c['id']))};}return null;}let S=class{constructor(_0x38dbdc,_0x444e35,_0x4e70aa){const _0x1c0ea3=_0x427b0c;this[_0x1c0ea3(0x125)]=_0x38dbdc,this[_0x1c0ea3(0x12e)]=_0x444e35,this[_0x1c0ea3(0x133)]=_0x4e70aa;}async[_0x427b0c(0xeb)](_0x206698){const _0x2e40a4=_0x427b0c;var _0x508dc9,_0x20a1b8;const {parentId:_0x11b922,unitId:_0x328d09,text:_0x22f7d5,threadId:_0xad0233}=_0x206698,_0xb9714c=(_0x20a1b8=(_0x508dc9=_0x22f7d5['customRanges'])==null?void 0x0:_0x508dc9[_0x2e40a4(0xe5)](_0x47d84c=>_0x47d84c[_0x2e40a4(0x105)]===_0x38fd19[_0x2e40a4(0x12d)])[_0x2e40a4(0xfd)](_0x43d2bf=>_0x43d2bf[_0x2e40a4(0x114)]))!=null?_0x20a1b8:[],_0x3c8cbc=JSON[_0x2e40a4(0x112)](_0x22f7d5),_0x128309=(await this[_0x2e40a4(0x133)][_0x2e40a4(0x144)](_0x328d09))[_0x2e40a4(0xf5)]();if(_0x11b922){const _0x35e7a0={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c,'threadId':_0xad0233},_0x29b5c2=(await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0x13b),{'body':_0x35e7a0}))['body'][_0x2e40a4(0xf8)];return{..._0x206698,'id':_0x29b5c2[_0x2e40a4(0xfe)],'dT':_0x13fc8d(+_0x29b5c2[_0x2e40a4(0x11e)])[_0x2e40a4(0x10f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x29b5c2['userId']};}else{const _0x573964={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c},_0x40e359=await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0xf0),{'body':_0x573964});return X(_0x40e359[_0x2e40a4(0x109)][_0x2e40a4(0x104)],_0x206698);}}async[_0x427b0c(0x106)](_0x3ee8dc){const _0x5e84d0=_0x427b0c;var _0x1638a8,_0x1440b;const {text:_0x26a911,unitId:_0x54dc3b}=_0x3ee8dc,_0x1c5ccb=(_0x1440b=(_0x1638a8=_0x26a911[_0x5e84d0(0xed)])==null?void 0x0:_0x1638a8[_0x5e84d0(0xe5)](_0x3971b8=>_0x3971b8[_0x5e84d0(0x105)]===_0x38fd19[_0x5e84d0(0x12d)])['map'](_0x5b5ca=>_0x5b5ca[_0x5e84d0(0x114)]))!=null?_0x1440b:[],_0x128f84=JSON['stringify'](_0x26a911),_0x51fc9e=_0x3ee8dc[_0x5e84d0(0xfa)],_0x4c3c7d=_0x3ee8dc['id'],_0xe0460f={'memberId':(await this['_sessionService'][_0x5e84d0(0x144)](_0x54dc3b))[_0x5e84d0(0xf5)](),'unitId':_0x54dc3b,'threadId':_0x51fc9e,'mention':_0x1c5ccb,'content':_0x128f84,'replyId':_0x4c3c7d},_0x1b9a85=await this[_0x5e84d0(0x125)][_0x5e84d0(0xfb)](_0x5e84d0(0xf3)+_0x54dc3b+_0x5e84d0(0x13e),{'body':_0xe0460f});return!_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]||_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]['code']===0x1;}async[_0x427b0c(0x11d)](_0x4fd442){const _0x42f27b=_0x427b0c,{unitId:_0x26f2f3}=_0x4fd442,_0x2a72f9=_0x4fd442[_0x42f27b(0xfa)],_0x961c14={'memberId':this[_0x42f27b(0x12e)][_0x42f27b(0xfc)]()[_0x42f27b(0x100)],'unitId':_0x26f2f3,'threadId':_0x2a72f9,'solved':_0x4fd442[_0x42f27b(0xf9)]?I[_0x42f27b(0x141)]:I[_0x42f27b(0xf4)]},_0x5f05c3=await this['_httpService'][_0x42f27b(0xfb)](_0x42f27b(0xf3)+_0x26f2f3+_0x42f27b(0x12c),{'body':_0x961c14});return!_0x5f05c3[_0x42f27b(0x109)][_0x42f27b(0xee)]||_0x5f05c3['body'][_0x42f27b(0xee)]['code']===0x1;}async[_0x427b0c(0x103)](_0x149f25,_0x4c1764,_0x2d3785,_0x1fcb69){const _0x5e63ee=_0x427b0c,_0xd18266={'memberId':(await this[_0x5e63ee(0x133)][_0x5e63ee(0x144)](_0x149f25))[_0x5e63ee(0xf5)](),'threadId':_0x2d3785,'replyId':_0x1fcb69,'unitId':_0x149f25},_0x5e7f8a=await this[_0x5e63ee(0x125)]['post'](_0x5e63ee(0xf3)+_0x149f25+'/delete',{'body':_0xd18266});return!_0x5e7f8a['body'][_0x5e63ee(0xee)]||_0x5e7f8a['body'][_0x5e63ee(0xee)][_0x5e63ee(0xec)]===0x1;}async['listComments'](_0x15f8d9,_0x3f392a,_0x4d90bf){const _0x229810=_0x427b0c,_0x588957={'unitId':_0x15f8d9,'threadId':_0x4d90bf},_0x3d822c=await this[_0x229810(0x125)]['post'](_0x229810(0xf3)+_0x15f8d9+_0x229810(0x119),{'body':_0x588957}),_0x38873f=_0x4d90bf[_0x229810(0xfd)](_0x555d5a=>ee(_0x3d822c[_0x229810(0x109)]['comments'][_0x555d5a],_0x15f8d9,_0x3f392a))[_0x229810(0xe5)](Boolean);return Object[_0x229810(0x140)](_0x3d822c[_0x229810(0x109)][_0x229810(0x10e)])['forEach'](_0x29f32b=>{const _0x301e58=_0x229810;this[_0x301e58(0x12e)]['addUser'](_0x29f32b);}),_0x38873f;}[_0x427b0c(0x142)](_0x521fe3){const _0x3dceac=_0x427b0c;return{'id':_0x521fe3['id'],'threadId':_0x521fe3[_0x3dceac(0xfa)],'ref':_0x521fe3[_0x3dceac(0xe4)]};}};S=Q([b(0x0,_0x51d02a(_0x39ec00)),b(0x1,_0x51d02a(_0x42c2f7)),b(0x2,_0x51d02a(_0x264c29))],S);var re=Object[_0x427b0c(0xe3)],te=(_0x3cf17f,_0x45659a,_0x177ff7,_0x77219c)=>{for(var _0x43e22d=_0x77219c>0x1?void 0x0:_0x77219c?re(_0x45659a,_0x177ff7):_0x45659a,_0x2790ad=_0x3cf17f['length']-0x1,_0x36fb3f;_0x2790ad>=0x0;_0x2790ad--)(_0x36fb3f=_0x3cf17f[_0x2790ad])&&(_0x43e22d=_0x36fb3f(_0x43e22d)||_0x43e22d);return _0x43e22d;},M=(_0x10ddbb,_0x26a2ed)=>(_0x3224c4,_0x34821d)=>_0x26a2ed(_0x3224c4,_0x34821d,_0x10ddbb);let f=class extends _0x5a35c7{constructor(_0x120284,_0x4e1185){const _0x127e87=_0x427b0c;super(),this[_0x127e87(0x128)]=_0x120284,this[_0x127e87(0x134)]=_0x4e1185,this[_0x127e87(0x136)]();}[_0x427b0c(0x136)](){const _0x4e53ff=_0x427b0c;this['_threadCommentDataSourceService'][_0x4e53ff(0xe7)]=this[_0x4e53ff(0x134)],this[_0x4e53ff(0x128)][_0x4e53ff(0x122)]=!0x1;}};f=te([M(0x0,_0x2621a6),M(0x1,_0x51d02a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2e3b18,_0x3e1d4b,_0xf82d82)=>_0x3e1d4b in _0x2e3b18?se(_0x2e3b18,_0x3e1d4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf82d82}):_0x2e3b18[_0x3e1d4b]=_0xf82d82,ie=(_0xa75447,_0x3c4f30,_0x4383ac,_0x1cbeba)=>{const _0x190e10=_0x427b0c;for(var _0x5ec70f=_0x1cbeba>0x1?void 0x0:_0x1cbeba?oe(_0x3c4f30,_0x4383ac):_0x3c4f30,_0x1050fb=_0xa75447[_0x190e10(0x13f)]-0x1,_0x24f5c7;_0x1050fb>=0x0;_0x1050fb--)(_0x24f5c7=_0xa75447[_0x1050fb])&&(_0x5ec70f=_0x24f5c7(_0x5ec70f)||_0x5ec70f);return _0x5ec70f;},N=(_0x3ffbc3,_0x54bb51)=>(_0x56a5b8,_0x5c234f)=>_0x54bb51(_0x56a5b8,_0x5c234f,_0x3ffbc3),$=(_0x13d40f,_0x3e79b0,_0x45cdff)=>ne(_0x13d40f,typeof _0x3e79b0!=_0x427b0c(0xf1)?_0x3e79b0+'':_0x3e79b0,_0x45cdff);let g=class extends _0x834bcd{constructor(_0x2f76d2=O,_0x40b013,_0x3b0b8e){const _0x2328b2=_0x427b0c;super(),this[_0x2328b2(0x117)]=_0x2f76d2,this[_0x2328b2(0xe9)]=_0x40b013,this[_0x2328b2(0xf2)]=_0x3b0b8e;const {..._0x5a5d0c}=_0x523a0c({},O,this['_config']);this[_0x2328b2(0xf2)][_0x2328b2(0x143)](z,_0x5a5d0c);}[_0x427b0c(0x10b)](){const _0x40431b=_0x427b0c;[[S],[f],[_]][_0x40431b(0x138)](_0x104ee1=>{const _0xfb3871=_0x40431b;this[_0xfb3871(0xe9)][_0xfb3871(0xe2)](_0x104ee1);});}[_0x427b0c(0x120)](){const _0x4f823c=_0x427b0c;this['_injector'][_0x4f823c(0x11a)](f),this[_0x4f823c(0xe9)][_0x4f823c(0x11a)](_);}};$(g,_0x427b0c(0x107),W),$(g,_0x427b0c(0x13d),_0x5c6fb1[_0x427b0c(0x13c)]),g=ie([_0x475c39(_0x9a2f36,_0x4f9fad,_0x5e191e),N(0x1,_0x51d02a(_0x440100)),N(0x2,_0x2959e9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x390ebd=_0xb832;(function(_0x10052c,_0x44c00b){const _0x555670=_0xb832,_0x19b972=_0x10052c();while(!![]){try{const _0x1c2fd4=parseInt(_0x555670(0x16e))/0x1+-parseInt(_0x555670(0x167))/0x2+parseInt(_0x555670(0x16d))/0x3+parseInt(_0x555670(0x159))/0x4+parseInt(_0x555670(0x15a))/0x5*(-parseInt(_0x555670(0x1be))/0x6)+parseInt(_0x555670(0x1bc))/0x7*(parseInt(_0x555670(0x16f))/0x8)+parseInt(_0x555670(0x18a))/0x9*(-parseInt(_0x555670(0x1a1))/0xa);if(_0x1c2fd4===_0x44c00b)break;else _0x19b972['push'](_0x19b972['shift']());}catch(_0x21deba){_0x19b972['push'](_0x19b972['shift']());}}}(_0x48f8,0x8f0a6));import{CommentService as _0x5b9634,CollaborationSessionService as _0x1815bc,UniverCollaborationClientPlugin as _0x395b52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x16cf6f}from'@univerjs-pro/license';import{dayjs as _0x252e0c,UserManagerService as _0x3039bd,Inject as _0x1a89d1,Injector as _0x11e476,Disposable as _0xdcc8ac,CustomRangeType as _0x339677,UniverInstanceType as _0x16c046,DependentOn as _0x5b7f34,IConfigService as _0x828273,Plugin as _0x1d42c8,merge as _0x22269a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59d47d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1356a4,IThreadCommentDataSourceService as _0x46c254}from'@univerjs/thread-comment';import{bufferTime as _0x242edb}from'rxjs';import{HTTPService as _0x28a050}from'@univerjs/network';const W=_0x390ebd(0x18f);var I=(_0x531b8b=>(_0x531b8b[_0x531b8b[_0x390ebd(0x1a5)]=0x0]=_0x390ebd(0x1a5),_0x531b8b[_0x531b8b['Solved']=0x1]=_0x390ebd(0x176),_0x531b8b[_0x531b8b['UNRECOGNIZED']=-0x1]=_0x390ebd(0x19a),_0x531b8b))(I||{}),v=(_0x1b8941=>(_0x1b8941[_0x1b8941['Unknown']=0x0]='Unknown',_0x1b8941[_0x1b8941[_0x390ebd(0x187)]=0x1]='Add',_0x1b8941[_0x1b8941['Reply']=0x2]=_0x390ebd(0x189),_0x1b8941[_0x1b8941['Edit']=0x3]=_0x390ebd(0x1a4),_0x1b8941[_0x1b8941[_0x390ebd(0x193)]=0x4]=_0x390ebd(0x193),_0x1b8941[_0x1b8941['Solve']=0x5]='Solve',_0x1b8941[_0x1b8941[_0x390ebd(0x19a)]=-0x1]=_0x390ebd(0x19a),_0x1b8941))(v||{});const y=_0x416089=>_0x252e0c(new Date(+_0x416089))['format'](_0x390ebd(0x17d)),B=async(_0x3bd88d,_0xed1b20)=>{const _0xe95c37=_0x390ebd,_0x850852=_0x3bd88d[_0xe95c37(0x194)](_0x3039bd),_0x4752c7=_0x3bd88d['get'](_0x28a050);_0xed1b20['forEach'](_0x1ced2d=>{const _0x1b55e7=_0xe95c37;_0x850852[_0x1b55e7(0x1a7)](_0x1ced2d)&&_0xed1b20[_0x1b55e7(0x18c)](_0x1ced2d);}),_0xed1b20[_0xe95c37(0x19b)]&&(await _0x4752c7[_0xe95c37(0x194)](_0xe95c37(0x171),{'params':{'userIDs':[..._0xed1b20]}}))[_0xe95c37(0x1aa)][_0xe95c37(0x190)][_0xe95c37(0x186)](_0x427edb=>{_0x427edb&&_0x850852['addUser'](_0x427edb);});};var K=Object[_0x390ebd(0x197)],V=(_0x8bbdb3,_0x57ca97,_0x7a84d6,_0x2114c8)=>{const _0x3d7b91=_0x390ebd;for(var _0x1b4225=_0x2114c8>0x1?void 0x0:_0x2114c8?K(_0x57ca97,_0x7a84d6):_0x57ca97,_0x31ce4e=_0x8bbdb3[_0x3d7b91(0x19f)]-0x1,_0x52c782;_0x31ce4e>=0x0;_0x31ce4e--)(_0x52c782=_0x8bbdb3[_0x31ce4e])&&(_0x1b4225=_0x52c782(_0x1b4225)||_0x1b4225);return _0x1b4225;},p=(_0x30effb,_0xd151e)=>(_0x339de0,_0x1df885)=>_0xd151e(_0x339de0,_0x1df885,_0x30effb);let _=class extends _0xdcc8ac{constructor(_0x4cfc7f,_0x4442dc,_0x33e7d6,_0x57f45d){const _0x1f6528=_0x390ebd;super(),this[_0x1f6528(0x179)]=_0x4cfc7f,this['_threadCommentModel']=_0x4442dc,this[_0x1f6528(0x160)]=_0x33e7d6,this['_injector']=_0x57f45d,this[_0x1f6528(0x16a)](),this[_0x1f6528(0x170)]();}[_0x390ebd(0x170)](){const _0xe28928=_0x390ebd;this[_0xe28928(0x1a3)](this[_0xe28928(0x15b)][_0xe28928(0x15c)][_0xe28928(0x161)](_0x242edb(0x10))['subscribe'](_0x810c8f=>{const _0x248e08=_0xe28928,_0xbdda71=new Set();_0x810c8f[_0x248e08(0x186)](_0x104c92=>{const _0x571adc=_0x248e08;switch(_0x104c92[_0x571adc(0x17b)]){case _0x571adc(0x198):{const _0xfff2fa=_0x104c92[_0x571adc(0x1a2)]['personId'];_0xbdda71[_0x571adc(0x198)](_0xfff2fa);break;}}}),B(this[_0x248e08(0x19e)],_0xbdda71);}));}[_0x390ebd(0x16a)](){const _0x56cae4=_0x390ebd;this[_0x56cae4(0x1a3)](this[_0x56cae4(0x179)][_0x56cae4(0x15c)][_0x56cae4(0x184)](async _0x27bf83=>{const _0x333319=_0x56cae4;var _0x476ce8,_0x3925be,_0x40bc82,_0x566ed4;const _0x1b008c=(_0x476ce8=this[_0x333319(0x15b)]['getUnit'](_0x27bf83['unitId'])[_0x333319(0x17f)](_0x174b29=>_0x174b29[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x476ce8['root'];if(!_0x1b008c)return;const {unitId:_0x12b361,subUnitId:_0x1dcd14}=_0x1b008c;switch(_0x27bf83[_0x333319(0x175)]&&this['_userService'][_0x333319(0x180)](_0x27bf83['user']),_0x27bf83[_0x333319(0x17b)]){case v[_0x333319(0x187)]:break;case v[_0x333319(0x189)]:{this[_0x333319(0x15b)][_0x333319(0x1ac)](_0x12b361,_0x1dcd14,{'unitId':_0x12b361,'subUnitId':_0x1dcd14,'ref':'','id':_0x27bf83[_0x333319(0x195)],'dT':y(+_0x27bf83['createTimestamp']),'threadId':_0x27bf83[_0x333319(0x17c)],'personId':(_0x40bc82=(_0x3925be=_0x27bf83[_0x333319(0x175)])==null?void 0x0:_0x3925be[_0x333319(0x18d)])!=null?_0x40bc82:_0x27bf83[_0x333319(0x1b8)],'text':JSON[_0x333319(0x162)](_0x27bf83[_0x333319(0x1ad)]),'parentId':_0x1b008c['id']});break;}case v['Delete']:{const _0x26410b=this[_0x333319(0x15b)]['getComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);_0x26410b&&_0x26410b[_0x333319(0x19c)]&&this[_0x333319(0x15b)]['deleteComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);break;}case v['Edit']:{this[_0x333319(0x15b)][_0x333319(0x1b6)](_0x12b361,_0x1dcd14,{'commentId':_0x27bf83[_0x333319(0x195)],'text':JSON[_0x333319(0x162)](_0x27bf83['content'])});break;}case v[_0x333319(0x1a0)]:{const _0x26202a=(_0x566ed4=this['_threadCommentModel'][_0x333319(0x181)](_0x27bf83[_0x333319(0x15f)])[_0x333319(0x17f)](_0x4b5345=>_0x4b5345[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x566ed4[_0x333319(0x1a8)];_0x26202a&&this[_0x333319(0x15b)][_0x333319(0x157)](_0x12b361,_0x1dcd14,_0x26202a['id'],_0x27bf83[_0x333319(0x196)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1a89d1(_0x5b9634)),p(0x1,_0x1a89d1(_0x1356a4)),p(0x2,_0x1a89d1(_0x3039bd)),p(0x3,_0x1a89d1(_0x11e476))],_);function _0xb832(_0x4368d3,_0x1f71ee){_0x4368d3=_0x4368d3-0x157;const _0x48f8e7=_0x48f8();let _0xb83245=_0x48f8e7[_0x4368d3];return _0xb83245;}const z=_0x390ebd(0x1b2),O={};var k=Object[_0x390ebd(0x197)],Q=(_0x32e31a,_0x34f7e7,_0x1d3f16,_0x172180)=>{const _0xfe2134=_0x390ebd;for(var _0x26c6da=_0x172180>0x1?void 0x0:_0x172180?k(_0x34f7e7,_0x1d3f16):_0x34f7e7,_0x571f89=_0x32e31a[_0xfe2134(0x19f)]-0x1,_0x1636e4;_0x571f89>=0x0;_0x571f89--)(_0x1636e4=_0x32e31a[_0x571f89])&&(_0x26c6da=_0x1636e4(_0x26c6da)||_0x26c6da);return _0x26c6da;},b=(_0x530f71,_0x368fda)=>(_0x379903,_0x172958)=>_0x368fda(_0x379903,_0x172958,_0x530f71);function X(_0x52ec88,_0x5f4cea){const _0x57ac86=_0x390ebd,_0x1b44c1=_0x52ec88['replies'][0x0];return{..._0x5f4cea,'id':_0x1b44c1['replyId'],'resolved':_0x52ec88[_0x57ac86(0x196)]===0x1,'dT':y(_0x1b44c1['createTimestamp']),'personId':_0x1b44c1[_0x57ac86(0x1b8)],'threadId':_0x1b44c1[_0x57ac86(0x17c)]};}function ee(_0x1c3ff9,_0x54b2b7,_0x499b7a){const _0xb8ea17=_0x390ebd;var _0x1b7dde,_0x52bb2e;if(((_0x52bb2e=(_0x1b7dde=_0x1c3ff9==null?void 0x0:_0x1c3ff9[_0xb8ea17(0x1b4)])==null?void 0x0:_0x1b7dde[_0xb8ea17(0x19f)])!=null?_0x52bb2e:0x0)>0x0){const _0x10d111=(_0x12acf0,_0x51a6eb)=>({'id':_0x12acf0['replyId'],'threadId':_0x12acf0['threadId'],'dT':y(_0x12acf0[_0xb8ea17(0x183)]),'personId':_0x12acf0[_0xb8ea17(0x1b8)],'resolved':_0x1c3ff9['solved']===I[_0xb8ea17(0x176)],'unitId':_0x54b2b7,'subUnitId':_0x499b7a,'text':JSON['parse'](_0x12acf0[_0xb8ea17(0x1ad)]),'parentId':_0x51a6eb}),_0x18f4ce=_0x10d111(_0x1c3ff9['replies'][0x0]);return{..._0x18f4ce,'children':_0x1c3ff9[_0xb8ea17(0x1b4)][_0xb8ea17(0x1ae)](0x1)['map'](_0xc35bea=>_0x10d111(_0xc35bea,_0x18f4ce['id']))};}return null;}let S=class{constructor(_0x46f022,_0x56f40a,_0x2cc885){const _0x28410a=_0x390ebd;this[_0x28410a(0x15e)]=_0x46f022,this[_0x28410a(0x160)]=_0x56f40a,this[_0x28410a(0x1b5)]=_0x2cc885;}async[_0x390ebd(0x1ac)](_0x39c4be){const _0x29ffc7=_0x390ebd;var _0x3f759c,_0x4d151f;const {parentId:_0x34d7c7,unitId:_0x114d34,text:_0x14d38e,threadId:_0x387a9a}=_0x39c4be,_0x45198f=(_0x4d151f=(_0x3f759c=_0x14d38e[_0x29ffc7(0x16b)])==null?void 0x0:_0x3f759c[_0x29ffc7(0x1ab)](_0x5bc132=>_0x5bc132[_0x29ffc7(0x18e)]===_0x339677[_0x29ffc7(0x1bd)])['map'](_0x40e817=>_0x40e817[_0x29ffc7(0x19d)]))!=null?_0x4d151f:[],_0x4d3bca=JSON[_0x29ffc7(0x163)](_0x14d38e),_0x360cb6=(await this[_0x29ffc7(0x1b5)][_0x29ffc7(0x172)](_0x114d34))[_0x29ffc7(0x188)]();if(_0x34d7c7){const _0x41a87e={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f,'threadId':_0x387a9a},_0x46ebc4=(await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+_0x29ffc7(0x1b0),{'body':_0x41a87e}))[_0x29ffc7(0x1aa)][_0x29ffc7(0x173)];return{..._0x39c4be,'id':_0x46ebc4[_0x29ffc7(0x195)],'dT':_0x252e0c(+_0x46ebc4['createTimestamp'])[_0x29ffc7(0x192)](_0x29ffc7(0x17d)),'personId':_0x46ebc4['userId']};}else{const _0x5122a2={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f},_0xa9d2ff=await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+'/add',{'body':_0x5122a2});return X(_0xa9d2ff[_0x29ffc7(0x1aa)][_0x29ffc7(0x1a9)],_0x39c4be);}}async[_0x390ebd(0x1b6)](_0x3315fe){const _0x5d50cc=_0x390ebd;var _0x4788a8,_0x809d75;const {text:_0x12fd68,unitId:_0x231c69}=_0x3315fe,_0x386f40=(_0x809d75=(_0x4788a8=_0x12fd68['customRanges'])==null?void 0x0:_0x4788a8[_0x5d50cc(0x1ab)](_0x42f56c=>_0x42f56c[_0x5d50cc(0x18e)]===_0x339677[_0x5d50cc(0x1bd)])[_0x5d50cc(0x1a6)](_0x514401=>_0x514401[_0x5d50cc(0x19d)]))!=null?_0x809d75:[],_0x445ca6=JSON[_0x5d50cc(0x163)](_0x12fd68),_0x2fd922=_0x3315fe[_0x5d50cc(0x17c)],_0x3057e6=_0x3315fe['id'],_0x30ba8f={'memberId':(await this[_0x5d50cc(0x1b5)][_0x5d50cc(0x172)](_0x231c69))[_0x5d50cc(0x188)](),'unitId':_0x231c69,'threadId':_0x2fd922,'mention':_0x386f40,'content':_0x445ca6,'replyId':_0x3057e6},_0x395ff9=await this[_0x5d50cc(0x15e)][_0x5d50cc(0x1ba)]('/universer-api/comment/unit/'+_0x231c69+_0x5d50cc(0x177),{'body':_0x30ba8f});return!_0x395ff9['body'][_0x5d50cc(0x174)]||_0x395ff9[_0x5d50cc(0x1aa)][_0x5d50cc(0x174)][_0x5d50cc(0x164)]===0x1;}async[_0x390ebd(0x157)](_0x44be1a){const _0x283893=_0x390ebd,{unitId:_0x36d7bc}=_0x44be1a,_0x565663=_0x44be1a['threadId'],_0x115acc={'memberId':this[_0x283893(0x160)][_0x283893(0x1bb)]()['userID'],'unitId':_0x36d7bc,'threadId':_0x565663,'solved':_0x44be1a[_0x283893(0x1af)]?I[_0x283893(0x176)]:I[_0x283893(0x1a5)]},_0x1c6b6c=await this[_0x283893(0x15e)][_0x283893(0x1ba)]('/universer-api/comment/unit/'+_0x36d7bc+_0x283893(0x165),{'body':_0x115acc});return!_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)]||_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)][_0x283893(0x164)]===0x1;}async[_0x390ebd(0x17e)](_0x4b2fc3,_0x13a00a,_0x4fadb3,_0x7a4c70){const _0x1cf08a=_0x390ebd,_0x16cfa3={'memberId':(await this[_0x1cf08a(0x1b5)][_0x1cf08a(0x172)](_0x4b2fc3))[_0x1cf08a(0x188)](),'threadId':_0x4fadb3,'replyId':_0x7a4c70,'unitId':_0x4b2fc3},_0x192dd4=await this[_0x1cf08a(0x15e)]['post'](_0x1cf08a(0x1b9)+_0x4b2fc3+_0x1cf08a(0x18b),{'body':_0x16cfa3});return!_0x192dd4['body'][_0x1cf08a(0x174)]||_0x192dd4[_0x1cf08a(0x1aa)][_0x1cf08a(0x174)][_0x1cf08a(0x164)]===0x1;}async[_0x390ebd(0x15d)](_0x58f3de,_0x90df94,_0x3f6189){const _0x5396b4=_0x390ebd,_0x2d931c={'unitId':_0x58f3de,'threadId':_0x3f6189},_0x1ca2e2=await this[_0x5396b4(0x15e)][_0x5396b4(0x1ba)]('/universer-api/comment/unit/'+_0x58f3de+_0x5396b4(0x17a),{'body':_0x2d931c}),_0x447a58=_0x3f6189['map'](_0x18e918=>ee(_0x1ca2e2[_0x5396b4(0x1aa)][_0x5396b4(0x182)][_0x18e918],_0x58f3de,_0x90df94))[_0x5396b4(0x1ab)](Boolean);return Object['values'](_0x1ca2e2['body']['users'])[_0x5396b4(0x186)](_0x471c2b=>{const _0x3fb686=_0x5396b4;this[_0x3fb686(0x160)][_0x3fb686(0x180)](_0x471c2b);}),_0x447a58;}[_0x390ebd(0x178)](_0x55cffb){const _0x3c2b42=_0x390ebd;return{'id':_0x55cffb['id'],'threadId':_0x55cffb[_0x3c2b42(0x17c)],'ref':_0x55cffb[_0x3c2b42(0x1b7)]};}};S=Q([b(0x0,_0x1a89d1(_0x28a050)),b(0x1,_0x1a89d1(_0x3039bd)),b(0x2,_0x1a89d1(_0x1815bc))],S);var re=Object[_0x390ebd(0x197)],te=(_0x1fce58,_0x58cca3,_0x1819f0,_0x39d9b6)=>{const _0x24ae52=_0x390ebd;for(var _0x43fb58=_0x39d9b6>0x1?void 0x0:_0x39d9b6?re(_0x58cca3,_0x1819f0):_0x58cca3,_0x3c82f4=_0x1fce58[_0x24ae52(0x19f)]-0x1,_0x1b0197;_0x3c82f4>=0x0;_0x3c82f4--)(_0x1b0197=_0x1fce58[_0x3c82f4])&&(_0x43fb58=_0x1b0197(_0x43fb58)||_0x43fb58);return _0x43fb58;},M=(_0x32d953,_0x4a6396)=>(_0x2dfc45,_0x3d11db)=>_0x4a6396(_0x2dfc45,_0x3d11db,_0x32d953);let f=class extends _0xdcc8ac{constructor(_0x26677a,_0x4923c7){const _0x5ab973=_0x390ebd;super(),this[_0x5ab973(0x191)]=_0x26677a,this['_threadCommentDataSource']=_0x4923c7,this[_0x5ab973(0x16c)]();}['_initDataSource'](){const _0x3cd22c=_0x390ebd;this[_0x3cd22c(0x191)][_0x3cd22c(0x1b3)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3cd22c(0x168)]=!0x1;}};f=te([M(0x0,_0x46c254),M(0x1,_0x1a89d1(S))],f);var se=Object[_0x390ebd(0x199)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xa7fc83,_0x120229,_0x87295e)=>_0x120229 in _0xa7fc83?se(_0xa7fc83,_0x120229,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x87295e}):_0xa7fc83[_0x120229]=_0x87295e,ie=(_0x391ecd,_0x46da9d,_0x44421c,_0x16df4c)=>{for(var _0x16e47f=_0x16df4c>0x1?void 0x0:_0x16df4c?oe(_0x46da9d,_0x44421c):_0x46da9d,_0x1b9df9=_0x391ecd['length']-0x1,_0x3d7a23;_0x1b9df9>=0x0;_0x1b9df9--)(_0x3d7a23=_0x391ecd[_0x1b9df9])&&(_0x16e47f=_0x3d7a23(_0x16e47f)||_0x16e47f);return _0x16e47f;},N=(_0x2b4efa,_0xb5c73c)=>(_0x558afc,_0x4cd159)=>_0xb5c73c(_0x558afc,_0x4cd159,_0x2b4efa),$=(_0x135955,_0x2bce72,_0x3b8b78)=>ne(_0x135955,typeof _0x2bce72!=_0x390ebd(0x169)?_0x2bce72+'':_0x2bce72,_0x3b8b78);function _0x48f8(){const _0x21d76e=['70188CfXhuL','resolveComment','UNIVER_UNKNOWN','860528khrtpi','90QQqvjn','_threadCommentModel','commentUpdate$','listComments','_httpService','unitId','_userService','pipe','parse','stringify','code','/solved','setConfig','2161640hjUeBk','syncUpdateMutationToColla','symbol','_init','customRanges','_initDataSource','851199pytMiX','371447MXUIly','8IMDaJC','_initUserSync','/universer-api/user/list','requireSession','reply','error','user','Solved','/edit','saveCommentToSnapshot','_commentService','/list','type','threadId','YYYY/MM/DD\x20HH:mm','deleteComment','find','addUser','getUnit','comments','createTimestamp','subscribe','_config','forEach','Add','getMemberID','Reply','313326hioooz','/delete','delete','userID','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','_threadCommentDataSourceService','format','Delete','get','replyId','solved','getOwnPropertyDescriptor','add','defineProperty','UNRECOGNIZED','size','parentId','rangeId','_injector','length','Solve','20eVjjfg','payload','disposeWithMe','Edit','OpenOrReOpen','map','getUser','root','comment','body','filter','addComment','content','slice','resolved','/reply','_configService','thread-comment-data-source.config','dataSource','replies','_sessionService','updateComment','ref','userId','/universer-api/comment/unit/','post','getCurrentUser','7536158gcvuvp','COMMENT'];_0x48f8=function(){return _0x21d76e;};return _0x48f8();}let g=class extends _0x1d42c8{constructor(_0x13a746=O,_0x47b0f9,_0x46f81b){const _0x6f45a2=_0x390ebd;super(),this[_0x6f45a2(0x185)]=_0x13a746,this[_0x6f45a2(0x19e)]=_0x47b0f9,this[_0x6f45a2(0x1b1)]=_0x46f81b;const {..._0x1da4a1}=_0x22269a({},O,this[_0x6f45a2(0x185)]);this[_0x6f45a2(0x1b1)][_0x6f45a2(0x166)](z,_0x1da4a1);}['onStarting'](){const _0xaed757=_0x390ebd;[[S],[f],[_]][_0xaed757(0x186)](_0x40bab0=>{const _0x2bfe02=_0xaed757;this[_0x2bfe02(0x19e)]['add'](_0x40bab0);});}['onReady'](){const _0x25286c=_0x390ebd;this[_0x25286c(0x19e)]['get'](f),this[_0x25286c(0x19e)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x16c046[_0x390ebd(0x158)]),g=ie([_0x5b7f34(_0x59d47d,_0x395b52,_0x16cf6f),N(0x1,_0x1a89d1(_0x11e476)),N(0x2,_0x828273)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x427b0c=_0x2010;(function(_0x57dbff,_0x2de5b2){const _0x2736c7=_0x2010,_0x32937e=_0x57dbff();while(!![]){try{const _0x436f77=-parseInt(_0x2736c7(0x12f))/0x1*(parseInt(_0x2736c7(0x101))/0x2)+-parseInt(_0x2736c7(0x118))/0x3+parseInt(_0x2736c7(0x146))/0x4+parseInt(_0x2736c7(0x127))/0x5+-parseInt(_0x2736c7(0x115))/0x6+-parseInt(_0x2736c7(0x110))/0x7+parseInt(_0x2736c7(0x12b))/0x8;if(_0x436f77===_0x2de5b2)break;else _0x32937e['push'](_0x32937e['shift']());}catch(_0x306f43){_0x32937e['push'](_0x32937e['shift']());}}}(_0x377c,0x64619));import{CommentService as _0x406774,CollaborationSessionService as _0x264c29,UniverCollaborationClientPlugin as _0x4f9fad}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5e191e}from'@univerjs-pro/license';import{dayjs as _0x13fc8d,UserManagerService as _0x42c2f7,Inject as _0x51d02a,Injector as _0x440100,Disposable as _0x5a35c7,CustomRangeType as _0x38fd19,UniverInstanceType as _0x5c6fb1,DependentOn as _0x475c39,IConfigService as _0x2959e9,Plugin as _0x834bcd,merge as _0x523a0c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9a2f36}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x335932,IThreadCommentDataSourceService as _0x2621a6}from'@univerjs/thread-comment';import{bufferTime as _0xe21b99}from'rxjs';import{HTTPService as _0x39ec00}from'@univerjs/network';const W=_0x427b0c(0x108);var I=(_0x2055aa=>(_0x2055aa[_0x2055aa['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2055aa[_0x2055aa[_0x427b0c(0x141)]=0x1]=_0x427b0c(0x141),_0x2055aa[_0x2055aa[_0x427b0c(0x10c)]=-0x1]='UNRECOGNIZED',_0x2055aa))(I||{}),v=(_0x137c97=>(_0x137c97[_0x137c97['Unknown']=0x0]=_0x427b0c(0x113),_0x137c97[_0x137c97[_0x427b0c(0x12a)]=0x1]=_0x427b0c(0x12a),_0x137c97[_0x137c97['Reply']=0x2]=_0x427b0c(0x11b),_0x137c97[_0x137c97['Edit']=0x3]='Edit',_0x137c97[_0x137c97['Delete']=0x4]=_0x427b0c(0x11f),_0x137c97[_0x137c97[_0x427b0c(0x121)]=0x5]=_0x427b0c(0x121),_0x137c97[_0x137c97['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x137c97))(v||{});const y=_0x5f0fc8=>_0x13fc8d(new Date(+_0x5f0fc8))[_0x427b0c(0x10f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x117742,_0x51f65e)=>{const _0x2e406f=_0x427b0c,_0x2b1424=_0x117742[_0x2e406f(0x11a)](_0x42c2f7),_0x5c5a4e=_0x117742[_0x2e406f(0x11a)](_0x39ec00);_0x51f65e[_0x2e406f(0x138)](_0x292d66=>{const _0x3f56a2=_0x2e406f;_0x2b1424[_0x3f56a2(0x11c)](_0x292d66)&&_0x51f65e[_0x3f56a2(0x13a)](_0x292d66);}),_0x51f65e[_0x2e406f(0x124)]&&(await _0x5c5a4e['get'](_0x2e406f(0x123),{'params':{'userIDs':[..._0x51f65e]}}))['body']['users'][_0x2e406f(0x138)](_0x365945=>{const _0x1ccd51=_0x2e406f;_0x365945&&_0x2b1424[_0x1ccd51(0x139)](_0x365945);});};var K=Object[_0x427b0c(0xe3)],V=(_0x18cb91,_0x497cbd,_0x5172e7,_0x4f1811)=>{const _0x33c830=_0x427b0c;for(var _0x24d2e6=_0x4f1811>0x1?void 0x0:_0x4f1811?K(_0x497cbd,_0x5172e7):_0x497cbd,_0x35a105=_0x18cb91[_0x33c830(0x13f)]-0x1,_0x5a17c1;_0x35a105>=0x0;_0x35a105--)(_0x5a17c1=_0x18cb91[_0x35a105])&&(_0x24d2e6=_0x5a17c1(_0x24d2e6)||_0x24d2e6);return _0x24d2e6;},p=(_0x175fb0,_0x35d032)=>(_0x3c588c,_0x5140d4)=>_0x35d032(_0x3c588c,_0x5140d4,_0x175fb0);let _=class extends _0x5a35c7{constructor(_0x108c68,_0xaf91c1,_0x30e61c,_0x2775fe){const _0x12bb0c=_0x427b0c;super(),this[_0x12bb0c(0x10d)]=_0x108c68,this[_0x12bb0c(0x102)]=_0xaf91c1,this[_0x12bb0c(0x12e)]=_0x30e61c,this[_0x12bb0c(0xe9)]=_0x2775fe,this[_0x12bb0c(0x130)](),this[_0x12bb0c(0x131)]();}['_initUserSync'](){const _0x5e4cab=_0x427b0c;this[_0x5e4cab(0x145)](this[_0x5e4cab(0x102)]['commentUpdate$']['pipe'](_0xe21b99(0x10))[_0x5e4cab(0xe8)](_0x15a592=>{const _0x550844=_0x5e4cab,_0x4bfbf8=new Set();_0x15a592[_0x550844(0x138)](_0x1fc900=>{const _0x36377f=_0x550844;switch(_0x1fc900[_0x36377f(0x13d)]){case _0x36377f(0xe2):{const _0x40004f=_0x1fc900['payload'][_0x36377f(0xe6)];_0x4bfbf8['add'](_0x40004f);break;}}}),B(this[_0x550844(0xe9)],_0x4bfbf8);}));}['_init'](){const _0x1a1608=_0x427b0c;this[_0x1a1608(0x145)](this[_0x1a1608(0x10d)][_0x1a1608(0x111)][_0x1a1608(0xe8)](async _0xba0dc1=>{const _0x43699d=_0x1a1608;var _0x2b91b9,_0x11f085,_0x5a1f92,_0x33a5c3;const _0x597b9b=(_0x2b91b9=this[_0x43699d(0x102)][_0x43699d(0xef)](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x42e84a=>_0x42e84a[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x2b91b9['root'];if(!_0x597b9b)return;const {unitId:_0x5b66cb,subUnitId:_0xa79809}=_0x597b9b;switch(_0xba0dc1[_0x43699d(0xf6)]&&this[_0x43699d(0x12e)][_0x43699d(0x139)](_0xba0dc1[_0x43699d(0xf6)]),_0xba0dc1[_0x43699d(0x13d)]){case v['Add']:break;case v[_0x43699d(0x11b)]:{this[_0x43699d(0x102)][_0x43699d(0xeb)](_0x5b66cb,_0xa79809,{'unitId':_0x5b66cb,'subUnitId':_0xa79809,'ref':'','id':_0xba0dc1[_0x43699d(0xfe)],'dT':y(+_0xba0dc1[_0x43699d(0x11e)]),'threadId':_0xba0dc1[_0x43699d(0xfa)],'personId':(_0x5a1f92=(_0x11f085=_0xba0dc1[_0x43699d(0xf6)])==null?void 0x0:_0x11f085[_0x43699d(0x100)])!=null?_0x5a1f92:_0xba0dc1['userId'],'text':JSON[_0x43699d(0xf7)](_0xba0dc1[_0x43699d(0x137)]),'parentId':_0x597b9b['id']});break;}case v[_0x43699d(0x11f)]:{const _0x5c1884=this[_0x43699d(0x102)]['getComment'](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);_0x5c1884&&_0x5c1884['parentId']&&this[_0x43699d(0x102)][_0x43699d(0x103)](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);break;}case v[_0x43699d(0x116)]:{this[_0x43699d(0x102)][_0x43699d(0x106)](_0x5b66cb,_0xa79809,{'commentId':_0xba0dc1[_0x43699d(0xfe)],'text':JSON['parse'](_0xba0dc1['content'])});break;}case v[_0x43699d(0x121)]:{const _0x2c178c=(_0x33a5c3=this[_0x43699d(0x102)]['getUnit'](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x57e23e=>_0x57e23e[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x33a5c3[_0x43699d(0xff)];_0x2c178c&&this[_0x43699d(0x102)][_0x43699d(0x11d)](_0x5b66cb,_0xa79809,_0x2c178c['id'],_0xba0dc1[_0x43699d(0x126)]===I[_0x43699d(0x141)]);break;}}}));}};_=V([p(0x0,_0x51d02a(_0x406774)),p(0x1,_0x51d02a(_0x335932)),p(0x2,_0x51d02a(_0x42c2f7)),p(0x3,_0x51d02a(_0x440100))],_);const z=_0x427b0c(0x129),O={};function _0x2010(_0x10d55b,_0x1006c1){_0x10d55b=_0x10d55b-0xe2;const _0x377c65=_0x377c();let _0x201066=_0x377c65[_0x10d55b];return _0x201066;}var k=Object[_0x427b0c(0xe3)],Q=(_0x4acb78,_0x3af339,_0x1465f0,_0x544465)=>{const _0x27a7e3=_0x427b0c;for(var _0x394834=_0x544465>0x1?void 0x0:_0x544465?k(_0x3af339,_0x1465f0):_0x3af339,_0x3320d6=_0x4acb78[_0x27a7e3(0x13f)]-0x1,_0x398335;_0x3320d6>=0x0;_0x3320d6--)(_0x398335=_0x4acb78[_0x3320d6])&&(_0x394834=_0x398335(_0x394834)||_0x394834);return _0x394834;},b=(_0x14c0d8,_0x98e02f)=>(_0xd323c7,_0x23bd47)=>_0x98e02f(_0xd323c7,_0x23bd47,_0x14c0d8);function X(_0x30d4e1,_0x3ddc67){const _0x5c4e94=_0x427b0c,_0x5b82be=_0x30d4e1[_0x5c4e94(0x132)][0x0];return{..._0x3ddc67,'id':_0x5b82be[_0x5c4e94(0xfe)],'resolved':_0x30d4e1[_0x5c4e94(0x126)]===0x1,'dT':y(_0x5b82be[_0x5c4e94(0x11e)]),'personId':_0x5b82be[_0x5c4e94(0xea)],'threadId':_0x5b82be['threadId']};}function _0x377c(){const _0x29caea=['body','unitId','onStarting','UNRECOGNIZED','_commentService','users','format','4723691KfrHJO','commentUpdate$','stringify','Unknown','rangeId','2042082JQQjaV','Edit','_config','1047003xsDrhE','/list','get','Reply','getUser','resolveComment','createTimestamp','Delete','onReady','Solve','syncUpdateMutationToColla','/universer-api/user/list','size','_httpService','solved','11710BRLVuU','_threadCommentDataSourceService','thread-comment-data-source.config','Add','17399304PGPVsW','/solved','COMMENT','_userService','10eVrVCL','_init','_initUserSync','replies','_sessionService','_threadCommentDataSource','find','_initDataSource','content','forEach','addUser','delete','/reply','UNIVER_UNKNOWN','type','/edit','length','values','Solved','saveCommentToSnapshot','setConfig','requireSession','disposeWithMe','132948EvmXrq','slice','add','getOwnPropertyDescriptor','ref','filter','personId','dataSource','subscribe','_injector','userId','addComment','code','customRanges','error','getUnit','/add','symbol','_configService','/universer-api/comment/unit/','OpenOrReOpen','getMemberID','user','parse','reply','resolved','threadId','post','getCurrentUser','map','replyId','root','userID','87034iRoCtl','_threadCommentModel','deleteComment','comment','rangeType','updateComment','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x377c=function(){return _0x29caea;};return _0x377c();}function ee(_0x2f8ffc,_0x5477d3,_0x2acd17){const _0x79548c=_0x427b0c;var _0x4e3de5,_0x5b958e;if(((_0x5b958e=(_0x4e3de5=_0x2f8ffc==null?void 0x0:_0x2f8ffc['replies'])==null?void 0x0:_0x4e3de5[_0x79548c(0x13f)])!=null?_0x5b958e:0x0)>0x0){const _0x202afc=(_0x3c3e3f,_0x2f2657)=>({'id':_0x3c3e3f['replyId'],'threadId':_0x3c3e3f[_0x79548c(0xfa)],'dT':y(_0x3c3e3f[_0x79548c(0x11e)]),'personId':_0x3c3e3f[_0x79548c(0xea)],'resolved':_0x2f8ffc['solved']===I['Solved'],'unitId':_0x5477d3,'subUnitId':_0x2acd17,'text':JSON['parse'](_0x3c3e3f[_0x79548c(0x137)]),'parentId':_0x2f2657}),_0x2e4d9c=_0x202afc(_0x2f8ffc['replies'][0x0]);return{..._0x2e4d9c,'children':_0x2f8ffc[_0x79548c(0x132)][_0x79548c(0x147)](0x1)[_0x79548c(0xfd)](_0x5c3140=>_0x202afc(_0x5c3140,_0x2e4d9c['id']))};}return null;}let S=class{constructor(_0x38dbdc,_0x444e35,_0x4e70aa){const _0x1c0ea3=_0x427b0c;this[_0x1c0ea3(0x125)]=_0x38dbdc,this[_0x1c0ea3(0x12e)]=_0x444e35,this[_0x1c0ea3(0x133)]=_0x4e70aa;}async[_0x427b0c(0xeb)](_0x206698){const _0x2e40a4=_0x427b0c;var _0x508dc9,_0x20a1b8;const {parentId:_0x11b922,unitId:_0x328d09,text:_0x22f7d5,threadId:_0xad0233}=_0x206698,_0xb9714c=(_0x20a1b8=(_0x508dc9=_0x22f7d5['customRanges'])==null?void 0x0:_0x508dc9[_0x2e40a4(0xe5)](_0x47d84c=>_0x47d84c[_0x2e40a4(0x105)]===_0x38fd19[_0x2e40a4(0x12d)])[_0x2e40a4(0xfd)](_0x43d2bf=>_0x43d2bf[_0x2e40a4(0x114)]))!=null?_0x20a1b8:[],_0x3c8cbc=JSON[_0x2e40a4(0x112)](_0x22f7d5),_0x128309=(await this[_0x2e40a4(0x133)][_0x2e40a4(0x144)](_0x328d09))[_0x2e40a4(0xf5)]();if(_0x11b922){const _0x35e7a0={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c,'threadId':_0xad0233},_0x29b5c2=(await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0x13b),{'body':_0x35e7a0}))['body'][_0x2e40a4(0xf8)];return{..._0x206698,'id':_0x29b5c2[_0x2e40a4(0xfe)],'dT':_0x13fc8d(+_0x29b5c2[_0x2e40a4(0x11e)])[_0x2e40a4(0x10f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x29b5c2['userId']};}else{const _0x573964={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c},_0x40e359=await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0xf0),{'body':_0x573964});return X(_0x40e359[_0x2e40a4(0x109)][_0x2e40a4(0x104)],_0x206698);}}async[_0x427b0c(0x106)](_0x3ee8dc){const _0x5e84d0=_0x427b0c;var _0x1638a8,_0x1440b;const {text:_0x26a911,unitId:_0x54dc3b}=_0x3ee8dc,_0x1c5ccb=(_0x1440b=(_0x1638a8=_0x26a911[_0x5e84d0(0xed)])==null?void 0x0:_0x1638a8[_0x5e84d0(0xe5)](_0x3971b8=>_0x3971b8[_0x5e84d0(0x105)]===_0x38fd19[_0x5e84d0(0x12d)])['map'](_0x5b5ca=>_0x5b5ca[_0x5e84d0(0x114)]))!=null?_0x1440b:[],_0x128f84=JSON['stringify'](_0x26a911),_0x51fc9e=_0x3ee8dc[_0x5e84d0(0xfa)],_0x4c3c7d=_0x3ee8dc['id'],_0xe0460f={'memberId':(await this['_sessionService'][_0x5e84d0(0x144)](_0x54dc3b))[_0x5e84d0(0xf5)](),'unitId':_0x54dc3b,'threadId':_0x51fc9e,'mention':_0x1c5ccb,'content':_0x128f84,'replyId':_0x4c3c7d},_0x1b9a85=await this[_0x5e84d0(0x125)][_0x5e84d0(0xfb)](_0x5e84d0(0xf3)+_0x54dc3b+_0x5e84d0(0x13e),{'body':_0xe0460f});return!_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]||_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]['code']===0x1;}async[_0x427b0c(0x11d)](_0x4fd442){const _0x42f27b=_0x427b0c,{unitId:_0x26f2f3}=_0x4fd442,_0x2a72f9=_0x4fd442[_0x42f27b(0xfa)],_0x961c14={'memberId':this[_0x42f27b(0x12e)][_0x42f27b(0xfc)]()[_0x42f27b(0x100)],'unitId':_0x26f2f3,'threadId':_0x2a72f9,'solved':_0x4fd442[_0x42f27b(0xf9)]?I[_0x42f27b(0x141)]:I[_0x42f27b(0xf4)]},_0x5f05c3=await this['_httpService'][_0x42f27b(0xfb)](_0x42f27b(0xf3)+_0x26f2f3+_0x42f27b(0x12c),{'body':_0x961c14});return!_0x5f05c3[_0x42f27b(0x109)][_0x42f27b(0xee)]||_0x5f05c3['body'][_0x42f27b(0xee)]['code']===0x1;}async[_0x427b0c(0x103)](_0x149f25,_0x4c1764,_0x2d3785,_0x1fcb69){const _0x5e63ee=_0x427b0c,_0xd18266={'memberId':(await this[_0x5e63ee(0x133)][_0x5e63ee(0x144)](_0x149f25))[_0x5e63ee(0xf5)](),'threadId':_0x2d3785,'replyId':_0x1fcb69,'unitId':_0x149f25},_0x5e7f8a=await this[_0x5e63ee(0x125)]['post'](_0x5e63ee(0xf3)+_0x149f25+'/delete',{'body':_0xd18266});return!_0x5e7f8a['body'][_0x5e63ee(0xee)]||_0x5e7f8a['body'][_0x5e63ee(0xee)][_0x5e63ee(0xec)]===0x1;}async['listComments'](_0x15f8d9,_0x3f392a,_0x4d90bf){const _0x229810=_0x427b0c,_0x588957={'unitId':_0x15f8d9,'threadId':_0x4d90bf},_0x3d822c=await this[_0x229810(0x125)]['post'](_0x229810(0xf3)+_0x15f8d9+_0x229810(0x119),{'body':_0x588957}),_0x38873f=_0x4d90bf[_0x229810(0xfd)](_0x555d5a=>ee(_0x3d822c[_0x229810(0x109)]['comments'][_0x555d5a],_0x15f8d9,_0x3f392a))[_0x229810(0xe5)](Boolean);return Object[_0x229810(0x140)](_0x3d822c[_0x229810(0x109)][_0x229810(0x10e)])['forEach'](_0x29f32b=>{const _0x301e58=_0x229810;this[_0x301e58(0x12e)]['addUser'](_0x29f32b);}),_0x38873f;}[_0x427b0c(0x142)](_0x521fe3){const _0x3dceac=_0x427b0c;return{'id':_0x521fe3['id'],'threadId':_0x521fe3[_0x3dceac(0xfa)],'ref':_0x521fe3[_0x3dceac(0xe4)]};}};S=Q([b(0x0,_0x51d02a(_0x39ec00)),b(0x1,_0x51d02a(_0x42c2f7)),b(0x2,_0x51d02a(_0x264c29))],S);var re=Object[_0x427b0c(0xe3)],te=(_0x3cf17f,_0x45659a,_0x177ff7,_0x77219c)=>{for(var _0x43e22d=_0x77219c>0x1?void 0x0:_0x77219c?re(_0x45659a,_0x177ff7):_0x45659a,_0x2790ad=_0x3cf17f['length']-0x1,_0x36fb3f;_0x2790ad>=0x0;_0x2790ad--)(_0x36fb3f=_0x3cf17f[_0x2790ad])&&(_0x43e22d=_0x36fb3f(_0x43e22d)||_0x43e22d);return _0x43e22d;},M=(_0x10ddbb,_0x26a2ed)=>(_0x3224c4,_0x34821d)=>_0x26a2ed(_0x3224c4,_0x34821d,_0x10ddbb);let f=class extends _0x5a35c7{constructor(_0x120284,_0x4e1185){const _0x127e87=_0x427b0c;super(),this[_0x127e87(0x128)]=_0x120284,this[_0x127e87(0x134)]=_0x4e1185,this[_0x127e87(0x136)]();}[_0x427b0c(0x136)](){const _0x4e53ff=_0x427b0c;this['_threadCommentDataSourceService'][_0x4e53ff(0xe7)]=this[_0x4e53ff(0x134)],this[_0x4e53ff(0x128)][_0x4e53ff(0x122)]=!0x1;}};f=te([M(0x0,_0x2621a6),M(0x1,_0x51d02a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2e3b18,_0x3e1d4b,_0xf82d82)=>_0x3e1d4b in _0x2e3b18?se(_0x2e3b18,_0x3e1d4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf82d82}):_0x2e3b18[_0x3e1d4b]=_0xf82d82,ie=(_0xa75447,_0x3c4f30,_0x4383ac,_0x1cbeba)=>{const _0x190e10=_0x427b0c;for(var _0x5ec70f=_0x1cbeba>0x1?void 0x0:_0x1cbeba?oe(_0x3c4f30,_0x4383ac):_0x3c4f30,_0x1050fb=_0xa75447[_0x190e10(0x13f)]-0x1,_0x24f5c7;_0x1050fb>=0x0;_0x1050fb--)(_0x24f5c7=_0xa75447[_0x1050fb])&&(_0x5ec70f=_0x24f5c7(_0x5ec70f)||_0x5ec70f);return _0x5ec70f;},N=(_0x3ffbc3,_0x54bb51)=>(_0x56a5b8,_0x5c234f)=>_0x54bb51(_0x56a5b8,_0x5c234f,_0x3ffbc3),$=(_0x13d40f,_0x3e79b0,_0x45cdff)=>ne(_0x13d40f,typeof _0x3e79b0!=_0x427b0c(0xf1)?_0x3e79b0+'':_0x3e79b0,_0x45cdff);let g=class extends _0x834bcd{constructor(_0x2f76d2=O,_0x40b013,_0x3b0b8e){const _0x2328b2=_0x427b0c;super(),this[_0x2328b2(0x117)]=_0x2f76d2,this[_0x2328b2(0xe9)]=_0x40b013,this[_0x2328b2(0xf2)]=_0x3b0b8e;const {..._0x5a5d0c}=_0x523a0c({},O,this['_config']);this[_0x2328b2(0xf2)][_0x2328b2(0x143)](z,_0x5a5d0c);}[_0x427b0c(0x10b)](){const _0x40431b=_0x427b0c;[[S],[f],[_]][_0x40431b(0x138)](_0x104ee1=>{const _0xfb3871=_0x40431b;this[_0xfb3871(0xe9)][_0xfb3871(0xe2)](_0x104ee1);});}[_0x427b0c(0x120)](){const _0x4f823c=_0x427b0c;this['_injector'][_0x4f823c(0x11a)](f),this[_0x4f823c(0xe9)][_0x4f823c(0x11a)](_);}};$(g,_0x427b0c(0x107),W),$(g,_0x427b0c(0x13d),_0x5c6fb1[_0x427b0c(0x13c)]),g=ie([_0x475c39(_0x9a2f36,_0x4f9fad,_0x5e191e),N(0x1,_0x51d02a(_0x440100)),N(0x2,_0x2959e9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x390ebd=_0xb832;(function(_0x10052c,_0x44c00b){const _0x555670=_0xb832,_0x19b972=_0x10052c();while(!![]){try{const _0x1c2fd4=parseInt(_0x555670(0x16e))/0x1+-parseInt(_0x555670(0x167))/0x2+parseInt(_0x555670(0x16d))/0x3+parseInt(_0x555670(0x159))/0x4+parseInt(_0x555670(0x15a))/0x5*(-parseInt(_0x555670(0x1be))/0x6)+parseInt(_0x555670(0x1bc))/0x7*(parseInt(_0x555670(0x16f))/0x8)+parseInt(_0x555670(0x18a))/0x9*(-parseInt(_0x555670(0x1a1))/0xa);if(_0x1c2fd4===_0x44c00b)break;else _0x19b972['push'](_0x19b972['shift']());}catch(_0x21deba){_0x19b972['push'](_0x19b972['shift']());}}}(_0x48f8,0x8f0a6));import{CommentService as _0x5b9634,CollaborationSessionService as _0x1815bc,UniverCollaborationClientPlugin as _0x395b52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x16cf6f}from'@univerjs-pro/license';import{dayjs as _0x252e0c,UserManagerService as _0x3039bd,Inject as _0x1a89d1,Injector as _0x11e476,Disposable as _0xdcc8ac,CustomRangeType as _0x339677,UniverInstanceType as _0x16c046,DependentOn as _0x5b7f34,IConfigService as _0x828273,Plugin as _0x1d42c8,merge as _0x22269a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59d47d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1356a4,IThreadCommentDataSourceService as _0x46c254}from'@univerjs/thread-comment';import{bufferTime as _0x242edb}from'rxjs';import{HTTPService as _0x28a050}from'@univerjs/network';const W=_0x390ebd(0x18f);var I=(_0x531b8b=>(_0x531b8b[_0x531b8b[_0x390ebd(0x1a5)]=0x0]=_0x390ebd(0x1a5),_0x531b8b[_0x531b8b['Solved']=0x1]=_0x390ebd(0x176),_0x531b8b[_0x531b8b['UNRECOGNIZED']=-0x1]=_0x390ebd(0x19a),_0x531b8b))(I||{}),v=(_0x1b8941=>(_0x1b8941[_0x1b8941['Unknown']=0x0]='Unknown',_0x1b8941[_0x1b8941[_0x390ebd(0x187)]=0x1]='Add',_0x1b8941[_0x1b8941['Reply']=0x2]=_0x390ebd(0x189),_0x1b8941[_0x1b8941['Edit']=0x3]=_0x390ebd(0x1a4),_0x1b8941[_0x1b8941[_0x390ebd(0x193)]=0x4]=_0x390ebd(0x193),_0x1b8941[_0x1b8941['Solve']=0x5]='Solve',_0x1b8941[_0x1b8941[_0x390ebd(0x19a)]=-0x1]=_0x390ebd(0x19a),_0x1b8941))(v||{});const y=_0x416089=>_0x252e0c(new Date(+_0x416089))['format'](_0x390ebd(0x17d)),B=async(_0x3bd88d,_0xed1b20)=>{const _0xe95c37=_0x390ebd,_0x850852=_0x3bd88d[_0xe95c37(0x194)](_0x3039bd),_0x4752c7=_0x3bd88d['get'](_0x28a050);_0xed1b20['forEach'](_0x1ced2d=>{const _0x1b55e7=_0xe95c37;_0x850852[_0x1b55e7(0x1a7)](_0x1ced2d)&&_0xed1b20[_0x1b55e7(0x18c)](_0x1ced2d);}),_0xed1b20[_0xe95c37(0x19b)]&&(await _0x4752c7[_0xe95c37(0x194)](_0xe95c37(0x171),{'params':{'userIDs':[..._0xed1b20]}}))[_0xe95c37(0x1aa)][_0xe95c37(0x190)][_0xe95c37(0x186)](_0x427edb=>{_0x427edb&&_0x850852['addUser'](_0x427edb);});};var K=Object[_0x390ebd(0x197)],V=(_0x8bbdb3,_0x57ca97,_0x7a84d6,_0x2114c8)=>{const _0x3d7b91=_0x390ebd;for(var _0x1b4225=_0x2114c8>0x1?void 0x0:_0x2114c8?K(_0x57ca97,_0x7a84d6):_0x57ca97,_0x31ce4e=_0x8bbdb3[_0x3d7b91(0x19f)]-0x1,_0x52c782;_0x31ce4e>=0x0;_0x31ce4e--)(_0x52c782=_0x8bbdb3[_0x31ce4e])&&(_0x1b4225=_0x52c782(_0x1b4225)||_0x1b4225);return _0x1b4225;},p=(_0x30effb,_0xd151e)=>(_0x339de0,_0x1df885)=>_0xd151e(_0x339de0,_0x1df885,_0x30effb);let _=class extends _0xdcc8ac{constructor(_0x4cfc7f,_0x4442dc,_0x33e7d6,_0x57f45d){const _0x1f6528=_0x390ebd;super(),this[_0x1f6528(0x179)]=_0x4cfc7f,this['_threadCommentModel']=_0x4442dc,this[_0x1f6528(0x160)]=_0x33e7d6,this['_injector']=_0x57f45d,this[_0x1f6528(0x16a)](),this[_0x1f6528(0x170)]();}[_0x390ebd(0x170)](){const _0xe28928=_0x390ebd;this[_0xe28928(0x1a3)](this[_0xe28928(0x15b)][_0xe28928(0x15c)][_0xe28928(0x161)](_0x242edb(0x10))['subscribe'](_0x810c8f=>{const _0x248e08=_0xe28928,_0xbdda71=new Set();_0x810c8f[_0x248e08(0x186)](_0x104c92=>{const _0x571adc=_0x248e08;switch(_0x104c92[_0x571adc(0x17b)]){case _0x571adc(0x198):{const _0xfff2fa=_0x104c92[_0x571adc(0x1a2)]['personId'];_0xbdda71[_0x571adc(0x198)](_0xfff2fa);break;}}}),B(this[_0x248e08(0x19e)],_0xbdda71);}));}[_0x390ebd(0x16a)](){const _0x56cae4=_0x390ebd;this[_0x56cae4(0x1a3)](this[_0x56cae4(0x179)][_0x56cae4(0x15c)][_0x56cae4(0x184)](async _0x27bf83=>{const _0x333319=_0x56cae4;var _0x476ce8,_0x3925be,_0x40bc82,_0x566ed4;const _0x1b008c=(_0x476ce8=this[_0x333319(0x15b)]['getUnit'](_0x27bf83['unitId'])[_0x333319(0x17f)](_0x174b29=>_0x174b29[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x476ce8['root'];if(!_0x1b008c)return;const {unitId:_0x12b361,subUnitId:_0x1dcd14}=_0x1b008c;switch(_0x27bf83[_0x333319(0x175)]&&this['_userService'][_0x333319(0x180)](_0x27bf83['user']),_0x27bf83[_0x333319(0x17b)]){case v[_0x333319(0x187)]:break;case v[_0x333319(0x189)]:{this[_0x333319(0x15b)][_0x333319(0x1ac)](_0x12b361,_0x1dcd14,{'unitId':_0x12b361,'subUnitId':_0x1dcd14,'ref':'','id':_0x27bf83[_0x333319(0x195)],'dT':y(+_0x27bf83['createTimestamp']),'threadId':_0x27bf83[_0x333319(0x17c)],'personId':(_0x40bc82=(_0x3925be=_0x27bf83[_0x333319(0x175)])==null?void 0x0:_0x3925be[_0x333319(0x18d)])!=null?_0x40bc82:_0x27bf83[_0x333319(0x1b8)],'text':JSON[_0x333319(0x162)](_0x27bf83[_0x333319(0x1ad)]),'parentId':_0x1b008c['id']});break;}case v['Delete']:{const _0x26410b=this[_0x333319(0x15b)]['getComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);_0x26410b&&_0x26410b[_0x333319(0x19c)]&&this[_0x333319(0x15b)]['deleteComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);break;}case v['Edit']:{this[_0x333319(0x15b)][_0x333319(0x1b6)](_0x12b361,_0x1dcd14,{'commentId':_0x27bf83[_0x333319(0x195)],'text':JSON[_0x333319(0x162)](_0x27bf83['content'])});break;}case v[_0x333319(0x1a0)]:{const _0x26202a=(_0x566ed4=this['_threadCommentModel'][_0x333319(0x181)](_0x27bf83[_0x333319(0x15f)])[_0x333319(0x17f)](_0x4b5345=>_0x4b5345[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x566ed4[_0x333319(0x1a8)];_0x26202a&&this[_0x333319(0x15b)][_0x333319(0x157)](_0x12b361,_0x1dcd14,_0x26202a['id'],_0x27bf83[_0x333319(0x196)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1a89d1(_0x5b9634)),p(0x1,_0x1a89d1(_0x1356a4)),p(0x2,_0x1a89d1(_0x3039bd)),p(0x3,_0x1a89d1(_0x11e476))],_);function _0xb832(_0x4368d3,_0x1f71ee){_0x4368d3=_0x4368d3-0x157;const _0x48f8e7=_0x48f8();let _0xb83245=_0x48f8e7[_0x4368d3];return _0xb83245;}const z=_0x390ebd(0x1b2),O={};var k=Object[_0x390ebd(0x197)],Q=(_0x32e31a,_0x34f7e7,_0x1d3f16,_0x172180)=>{const _0xfe2134=_0x390ebd;for(var _0x26c6da=_0x172180>0x1?void 0x0:_0x172180?k(_0x34f7e7,_0x1d3f16):_0x34f7e7,_0x571f89=_0x32e31a[_0xfe2134(0x19f)]-0x1,_0x1636e4;_0x571f89>=0x0;_0x571f89--)(_0x1636e4=_0x32e31a[_0x571f89])&&(_0x26c6da=_0x1636e4(_0x26c6da)||_0x26c6da);return _0x26c6da;},b=(_0x530f71,_0x368fda)=>(_0x379903,_0x172958)=>_0x368fda(_0x379903,_0x172958,_0x530f71);function X(_0x52ec88,_0x5f4cea){const _0x57ac86=_0x390ebd,_0x1b44c1=_0x52ec88['replies'][0x0];return{..._0x5f4cea,'id':_0x1b44c1['replyId'],'resolved':_0x52ec88[_0x57ac86(0x196)]===0x1,'dT':y(_0x1b44c1['createTimestamp']),'personId':_0x1b44c1[_0x57ac86(0x1b8)],'threadId':_0x1b44c1[_0x57ac86(0x17c)]};}function ee(_0x1c3ff9,_0x54b2b7,_0x499b7a){const _0xb8ea17=_0x390ebd;var _0x1b7dde,_0x52bb2e;if(((_0x52bb2e=(_0x1b7dde=_0x1c3ff9==null?void 0x0:_0x1c3ff9[_0xb8ea17(0x1b4)])==null?void 0x0:_0x1b7dde[_0xb8ea17(0x19f)])!=null?_0x52bb2e:0x0)>0x0){const _0x10d111=(_0x12acf0,_0x51a6eb)=>({'id':_0x12acf0['replyId'],'threadId':_0x12acf0['threadId'],'dT':y(_0x12acf0[_0xb8ea17(0x183)]),'personId':_0x12acf0[_0xb8ea17(0x1b8)],'resolved':_0x1c3ff9['solved']===I[_0xb8ea17(0x176)],'unitId':_0x54b2b7,'subUnitId':_0x499b7a,'text':JSON['parse'](_0x12acf0[_0xb8ea17(0x1ad)]),'parentId':_0x51a6eb}),_0x18f4ce=_0x10d111(_0x1c3ff9['replies'][0x0]);return{..._0x18f4ce,'children':_0x1c3ff9[_0xb8ea17(0x1b4)][_0xb8ea17(0x1ae)](0x1)['map'](_0xc35bea=>_0x10d111(_0xc35bea,_0x18f4ce['id']))};}return null;}let S=class{constructor(_0x46f022,_0x56f40a,_0x2cc885){const _0x28410a=_0x390ebd;this[_0x28410a(0x15e)]=_0x46f022,this[_0x28410a(0x160)]=_0x56f40a,this[_0x28410a(0x1b5)]=_0x2cc885;}async[_0x390ebd(0x1ac)](_0x39c4be){const _0x29ffc7=_0x390ebd;var _0x3f759c,_0x4d151f;const {parentId:_0x34d7c7,unitId:_0x114d34,text:_0x14d38e,threadId:_0x387a9a}=_0x39c4be,_0x45198f=(_0x4d151f=(_0x3f759c=_0x14d38e[_0x29ffc7(0x16b)])==null?void 0x0:_0x3f759c[_0x29ffc7(0x1ab)](_0x5bc132=>_0x5bc132[_0x29ffc7(0x18e)]===_0x339677[_0x29ffc7(0x1bd)])['map'](_0x40e817=>_0x40e817[_0x29ffc7(0x19d)]))!=null?_0x4d151f:[],_0x4d3bca=JSON[_0x29ffc7(0x163)](_0x14d38e),_0x360cb6=(await this[_0x29ffc7(0x1b5)][_0x29ffc7(0x172)](_0x114d34))[_0x29ffc7(0x188)]();if(_0x34d7c7){const _0x41a87e={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f,'threadId':_0x387a9a},_0x46ebc4=(await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+_0x29ffc7(0x1b0),{'body':_0x41a87e}))[_0x29ffc7(0x1aa)][_0x29ffc7(0x173)];return{..._0x39c4be,'id':_0x46ebc4[_0x29ffc7(0x195)],'dT':_0x252e0c(+_0x46ebc4['createTimestamp'])[_0x29ffc7(0x192)](_0x29ffc7(0x17d)),'personId':_0x46ebc4['userId']};}else{const _0x5122a2={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f},_0xa9d2ff=await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+'/add',{'body':_0x5122a2});return X(_0xa9d2ff[_0x29ffc7(0x1aa)][_0x29ffc7(0x1a9)],_0x39c4be);}}async[_0x390ebd(0x1b6)](_0x3315fe){const _0x5d50cc=_0x390ebd;var _0x4788a8,_0x809d75;const {text:_0x12fd68,unitId:_0x231c69}=_0x3315fe,_0x386f40=(_0x809d75=(_0x4788a8=_0x12fd68['customRanges'])==null?void 0x0:_0x4788a8[_0x5d50cc(0x1ab)](_0x42f56c=>_0x42f56c[_0x5d50cc(0x18e)]===_0x339677[_0x5d50cc(0x1bd)])[_0x5d50cc(0x1a6)](_0x514401=>_0x514401[_0x5d50cc(0x19d)]))!=null?_0x809d75:[],_0x445ca6=JSON[_0x5d50cc(0x163)](_0x12fd68),_0x2fd922=_0x3315fe[_0x5d50cc(0x17c)],_0x3057e6=_0x3315fe['id'],_0x30ba8f={'memberId':(await this[_0x5d50cc(0x1b5)][_0x5d50cc(0x172)](_0x231c69))[_0x5d50cc(0x188)](),'unitId':_0x231c69,'threadId':_0x2fd922,'mention':_0x386f40,'content':_0x445ca6,'replyId':_0x3057e6},_0x395ff9=await this[_0x5d50cc(0x15e)][_0x5d50cc(0x1ba)]('/universer-api/comment/unit/'+_0x231c69+_0x5d50cc(0x177),{'body':_0x30ba8f});return!_0x395ff9['body'][_0x5d50cc(0x174)]||_0x395ff9[_0x5d50cc(0x1aa)][_0x5d50cc(0x174)][_0x5d50cc(0x164)]===0x1;}async[_0x390ebd(0x157)](_0x44be1a){const _0x283893=_0x390ebd,{unitId:_0x36d7bc}=_0x44be1a,_0x565663=_0x44be1a['threadId'],_0x115acc={'memberId':this[_0x283893(0x160)][_0x283893(0x1bb)]()['userID'],'unitId':_0x36d7bc,'threadId':_0x565663,'solved':_0x44be1a[_0x283893(0x1af)]?I[_0x283893(0x176)]:I[_0x283893(0x1a5)]},_0x1c6b6c=await this[_0x283893(0x15e)][_0x283893(0x1ba)]('/universer-api/comment/unit/'+_0x36d7bc+_0x283893(0x165),{'body':_0x115acc});return!_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)]||_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)][_0x283893(0x164)]===0x1;}async[_0x390ebd(0x17e)](_0x4b2fc3,_0x13a00a,_0x4fadb3,_0x7a4c70){const _0x1cf08a=_0x390ebd,_0x16cfa3={'memberId':(await this[_0x1cf08a(0x1b5)][_0x1cf08a(0x172)](_0x4b2fc3))[_0x1cf08a(0x188)](),'threadId':_0x4fadb3,'replyId':_0x7a4c70,'unitId':_0x4b2fc3},_0x192dd4=await this[_0x1cf08a(0x15e)]['post'](_0x1cf08a(0x1b9)+_0x4b2fc3+_0x1cf08a(0x18b),{'body':_0x16cfa3});return!_0x192dd4['body'][_0x1cf08a(0x174)]||_0x192dd4[_0x1cf08a(0x1aa)][_0x1cf08a(0x174)][_0x1cf08a(0x164)]===0x1;}async[_0x390ebd(0x15d)](_0x58f3de,_0x90df94,_0x3f6189){const _0x5396b4=_0x390ebd,_0x2d931c={'unitId':_0x58f3de,'threadId':_0x3f6189},_0x1ca2e2=await this[_0x5396b4(0x15e)][_0x5396b4(0x1ba)]('/universer-api/comment/unit/'+_0x58f3de+_0x5396b4(0x17a),{'body':_0x2d931c}),_0x447a58=_0x3f6189['map'](_0x18e918=>ee(_0x1ca2e2[_0x5396b4(0x1aa)][_0x5396b4(0x182)][_0x18e918],_0x58f3de,_0x90df94))[_0x5396b4(0x1ab)](Boolean);return Object['values'](_0x1ca2e2['body']['users'])[_0x5396b4(0x186)](_0x471c2b=>{const _0x3fb686=_0x5396b4;this[_0x3fb686(0x160)][_0x3fb686(0x180)](_0x471c2b);}),_0x447a58;}[_0x390ebd(0x178)](_0x55cffb){const _0x3c2b42=_0x390ebd;return{'id':_0x55cffb['id'],'threadId':_0x55cffb[_0x3c2b42(0x17c)],'ref':_0x55cffb[_0x3c2b42(0x1b7)]};}};S=Q([b(0x0,_0x1a89d1(_0x28a050)),b(0x1,_0x1a89d1(_0x3039bd)),b(0x2,_0x1a89d1(_0x1815bc))],S);var re=Object[_0x390ebd(0x197)],te=(_0x1fce58,_0x58cca3,_0x1819f0,_0x39d9b6)=>{const _0x24ae52=_0x390ebd;for(var _0x43fb58=_0x39d9b6>0x1?void 0x0:_0x39d9b6?re(_0x58cca3,_0x1819f0):_0x58cca3,_0x3c82f4=_0x1fce58[_0x24ae52(0x19f)]-0x1,_0x1b0197;_0x3c82f4>=0x0;_0x3c82f4--)(_0x1b0197=_0x1fce58[_0x3c82f4])&&(_0x43fb58=_0x1b0197(_0x43fb58)||_0x43fb58);return _0x43fb58;},M=(_0x32d953,_0x4a6396)=>(_0x2dfc45,_0x3d11db)=>_0x4a6396(_0x2dfc45,_0x3d11db,_0x32d953);let f=class extends _0xdcc8ac{constructor(_0x26677a,_0x4923c7){const _0x5ab973=_0x390ebd;super(),this[_0x5ab973(0x191)]=_0x26677a,this['_threadCommentDataSource']=_0x4923c7,this[_0x5ab973(0x16c)]();}['_initDataSource'](){const _0x3cd22c=_0x390ebd;this[_0x3cd22c(0x191)][_0x3cd22c(0x1b3)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3cd22c(0x168)]=!0x1;}};f=te([M(0x0,_0x46c254),M(0x1,_0x1a89d1(S))],f);var se=Object[_0x390ebd(0x199)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xa7fc83,_0x120229,_0x87295e)=>_0x120229 in _0xa7fc83?se(_0xa7fc83,_0x120229,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x87295e}):_0xa7fc83[_0x120229]=_0x87295e,ie=(_0x391ecd,_0x46da9d,_0x44421c,_0x16df4c)=>{for(var _0x16e47f=_0x16df4c>0x1?void 0x0:_0x16df4c?oe(_0x46da9d,_0x44421c):_0x46da9d,_0x1b9df9=_0x391ecd['length']-0x1,_0x3d7a23;_0x1b9df9>=0x0;_0x1b9df9--)(_0x3d7a23=_0x391ecd[_0x1b9df9])&&(_0x16e47f=_0x3d7a23(_0x16e47f)||_0x16e47f);return _0x16e47f;},N=(_0x2b4efa,_0xb5c73c)=>(_0x558afc,_0x4cd159)=>_0xb5c73c(_0x558afc,_0x4cd159,_0x2b4efa),$=(_0x135955,_0x2bce72,_0x3b8b78)=>ne(_0x135955,typeof _0x2bce72!=_0x390ebd(0x169)?_0x2bce72+'':_0x2bce72,_0x3b8b78);function _0x48f8(){const _0x21d76e=['70188CfXhuL','resolveComment','UNIVER_UNKNOWN','860528khrtpi','90QQqvjn','_threadCommentModel','commentUpdate$','listComments','_httpService','unitId','_userService','pipe','parse','stringify','code','/solved','setConfig','2161640hjUeBk','syncUpdateMutationToColla','symbol','_init','customRanges','_initDataSource','851199pytMiX','371447MXUIly','8IMDaJC','_initUserSync','/universer-api/user/list','requireSession','reply','error','user','Solved','/edit','saveCommentToSnapshot','_commentService','/list','type','threadId','YYYY/MM/DD\x20HH:mm','deleteComment','find','addUser','getUnit','comments','createTimestamp','subscribe','_config','forEach','Add','getMemberID','Reply','313326hioooz','/delete','delete','userID','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','_threadCommentDataSourceService','format','Delete','get','replyId','solved','getOwnPropertyDescriptor','add','defineProperty','UNRECOGNIZED','size','parentId','rangeId','_injector','length','Solve','20eVjjfg','payload','disposeWithMe','Edit','OpenOrReOpen','map','getUser','root','comment','body','filter','addComment','content','slice','resolved','/reply','_configService','thread-comment-data-source.config','dataSource','replies','_sessionService','updateComment','ref','userId','/universer-api/comment/unit/','post','getCurrentUser','7536158gcvuvp','COMMENT'];_0x48f8=function(){return _0x21d76e;};return _0x48f8();}let g=class extends _0x1d42c8{constructor(_0x13a746=O,_0x47b0f9,_0x46f81b){const _0x6f45a2=_0x390ebd;super(),this[_0x6f45a2(0x185)]=_0x13a746,this[_0x6f45a2(0x19e)]=_0x47b0f9,this[_0x6f45a2(0x1b1)]=_0x46f81b;const {..._0x1da4a1}=_0x22269a({},O,this[_0x6f45a2(0x185)]);this[_0x6f45a2(0x1b1)][_0x6f45a2(0x166)](z,_0x1da4a1);}['onStarting'](){const _0xaed757=_0x390ebd;[[S],[f],[_]][_0xaed757(0x186)](_0x40bab0=>{const _0x2bfe02=_0xaed757;this[_0x2bfe02(0x19e)]['add'](_0x40bab0);});}['onReady'](){const _0x25286c=_0x390ebd;this[_0x25286c(0x19e)]['get'](f),this[_0x25286c(0x19e)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x16c046[_0x390ebd(0x158)]),g=ie([_0x5b7f34(_0x59d47d,_0x395b52,_0x16cf6f),N(0x1,_0x1a89d1(_0x11e476)),N(0x2,_0x828273)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1151(_0x2b2155,_0x4121c4){_0x2b2155=_0x2b2155-0xd8;const _0x975761=_0x9757();let _0x115190=_0x975761[_0x2b2155];return _0x115190;}(function(_0xb54e4e,_0x2a06dc){const _0x361048=_0x1151,_0x10f70b=_0xb54e4e();while(!![]){try{const _0x1dc94d=parseInt(_0x361048(0x10e))/0x1*(-parseInt(_0x361048(0x11e))/0x2)+-parseInt(_0x361048(0xf9))/0x3+parseInt(_0x361048(0x11c))/0x4*(-parseInt(_0x361048(0x10c))/0x5)+parseInt(_0x361048(0x14d))/0x6*(-parseInt(_0x361048(0xf8))/0x7)+-parseInt(_0x361048(0xeb))/0x8+parseInt(_0x361048(0x12b))/0x9+parseInt(_0x361048(0x122))/0xa*(parseInt(_0x361048(0x100))/0xb);if(_0x1dc94d===_0x2a06dc)break;else _0x10f70b['push'](_0x10f70b['shift']());}catch(_0x5dc0ae){_0x10f70b['push'](_0x10f70b['shift']());}}}(_0x9757,0x85107),function(_0x18b9e3,_0x5a11b3){const _0x135924=_0x1151;typeof exports=='object'&&typeof module<'u'?_0x5a11b3(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==_0x135924(0xfe)&&define[_0x135924(0x13c)]?define(['exports','@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x135924(0x154),_0x135924(0xfb),_0x135924(0xf7),'rxjs',_0x135924(0xf5)],_0x5a11b3):(_0x18b9e3=typeof globalThis<'u'?globalThis:_0x18b9e3||self,_0x5a11b3(_0x18b9e3[_0x135924(0x14b)]={},_0x18b9e3[_0x135924(0x12e)],_0x18b9e3['UniverProLicense'],_0x18b9e3[_0x135924(0x12d)],_0x18b9e3['UniverThreadCommentUi'],_0x18b9e3[_0x135924(0x14f)],_0x18b9e3[_0x135924(0x121)],_0x18b9e3[_0x135924(0x13d)]));}(this,function(_0x4295a0,_0x3869c4,_0x43efe2,_0x38b33b,_0x1d7685,_0xd1e86d,_0xbcfdf6,_0x338ad3){'use strict';const _0x7566ed=_0x1151;const _0x40d9a5='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4e36fd=(_0xf91b4e=>(_0xf91b4e[_0xf91b4e[_0x7566ed(0x109)]=0x0]=_0x7566ed(0x109),_0xf91b4e[_0xf91b4e[_0x7566ed(0xf2)]=0x1]=_0x7566ed(0xf2),_0xf91b4e[_0xf91b4e['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xf91b4e))(_0x4e36fd||{}),_0x54f0e3=(_0x2e35ee=>(_0x2e35ee[_0x2e35ee[_0x7566ed(0x136)]=0x0]=_0x7566ed(0x136),_0x2e35ee[_0x2e35ee[_0x7566ed(0x113)]=0x1]='Add',_0x2e35ee[_0x2e35ee[_0x7566ed(0xd8)]=0x2]=_0x7566ed(0xd8),_0x2e35ee[_0x2e35ee[_0x7566ed(0x10a)]=0x3]=_0x7566ed(0x10a),_0x2e35ee[_0x2e35ee[_0x7566ed(0x152)]=0x4]=_0x7566ed(0x152),_0x2e35ee[_0x2e35ee['Solve']=0x5]=_0x7566ed(0x128),_0x2e35ee[_0x2e35ee[_0x7566ed(0x11b)]=-0x1]=_0x7566ed(0x11b),_0x2e35ee))(_0x54f0e3||{});const _0xb02b86=_0x54b4dc=>_0x38b33b['dayjs'](new Date(+_0x54b4dc))[_0x7566ed(0xff)](_0x7566ed(0x103)),_0x306f5e=async(_0x21c48a,_0x2648ea)=>{const _0x33ecf3=_0x7566ed,_0xe1ce90=_0x21c48a[_0x33ecf3(0x11d)](_0x38b33b[_0x33ecf3(0x14e)]),_0x2f6b2b=_0x21c48a[_0x33ecf3(0x11d)](_0x338ad3[_0x33ecf3(0xe1)]);_0x2648ea[_0x33ecf3(0xe5)](_0x1cde4b=>{const _0x271d24=_0x33ecf3;_0xe1ce90[_0x271d24(0x10b)](_0x1cde4b)&&_0x2648ea[_0x271d24(0x137)](_0x1cde4b);}),_0x2648ea[_0x33ecf3(0xfc)]&&(await _0x2f6b2b['get'](_0x33ecf3(0x102),{'params':{'userIDs':[..._0x2648ea]}}))[_0x33ecf3(0xf1)]['users'][_0x33ecf3(0xe5)](_0x37ffc1=>{const _0x216fa9=_0x33ecf3;_0x37ffc1&&_0xe1ce90[_0x216fa9(0x104)](_0x37ffc1);});};var _0x149953=Object[_0x7566ed(0xe6)],_0x421834=(_0x54caf2,_0x40ab93,_0x31acb1,_0x5e95d2)=>{const _0xe5eea7=_0x7566ed;for(var _0x4090ed=_0x5e95d2>0x1?void 0x0:_0x5e95d2?_0x149953(_0x40ab93,_0x31acb1):_0x40ab93,_0x82175d=_0x54caf2[_0xe5eea7(0x149)]-0x1,_0x1dfea0;_0x82175d>=0x0;_0x82175d--)(_0x1dfea0=_0x54caf2[_0x82175d])&&(_0x4090ed=_0x1dfea0(_0x4090ed)||_0x4090ed);return _0x4090ed;},_0x22545f=(_0x12c7ba,_0x3c2391)=>(_0x1be9b9,_0x322fb7)=>_0x3c2391(_0x1be9b9,_0x322fb7,_0x12c7ba);let _0x1a821a=class extends _0x38b33b[_0x7566ed(0x129)]{constructor(_0x50b406,_0x53ce12,_0x2590a9,_0x1bab27){const _0x8d8246=_0x7566ed;super(),this['_commentService']=_0x50b406,this[_0x8d8246(0x148)]=_0x53ce12,this[_0x8d8246(0x118)]=_0x2590a9,this[_0x8d8246(0x123)]=_0x1bab27,this['_init'](),this['_initUserSync']();}[_0x7566ed(0x139)](){const _0x29c23d=_0x7566ed;this[_0x29c23d(0xf6)](this['_threadCommentModel'][_0x29c23d(0x144)][_0x29c23d(0xdf)](_0xbcfdf6[_0x29c23d(0x138)](0x10))['subscribe'](_0x5a32c9=>{const _0x1697a7=_0x29c23d,_0x17c3af=new Set();_0x5a32c9[_0x1697a7(0xe5)](_0x4ef9df=>{const _0x4fe433=_0x1697a7;switch(_0x4ef9df['type']){case'add':{const _0x5bfdfc=_0x4ef9df[_0x4fe433(0x106)][_0x4fe433(0x101)];_0x17c3af[_0x4fe433(0x11a)](_0x5bfdfc);break;}}}),_0x306f5e(this['_injector'],_0x17c3af);}));}['_init'](){const _0x4bd3ef=_0x7566ed;this[_0x4bd3ef(0xf6)](this[_0x4bd3ef(0xda)][_0x4bd3ef(0x144)]['subscribe'](async _0x5ce2c8=>{const _0xb50706=_0x4bd3ef;var _0x37e263,_0x1d733c,_0x540c4c,_0x4ba011;const _0x569f59=(_0x37e263=this[_0xb50706(0x148)][_0xb50706(0x150)](_0x5ce2c8[_0xb50706(0x13e)])[_0xb50706(0xfa)](_0x4a010e=>_0x4a010e['threadId']===_0x5ce2c8['threadId']))==null?void 0x0:_0x37e263[_0xb50706(0xd9)];if(!_0x569f59)return;const {unitId:_0x92b9f9,subUnitId:_0x58253d}=_0x569f59;switch(_0x5ce2c8['user']&&this['_userService']['addUser'](_0x5ce2c8[_0xb50706(0x14a)]),_0x5ce2c8[_0xb50706(0x140)]){case _0x54f0e3[_0xb50706(0x113)]:break;case _0x54f0e3[_0xb50706(0xd8)]:{this[_0xb50706(0x148)]['addComment'](_0x92b9f9,_0x58253d,{'unitId':_0x92b9f9,'subUnitId':_0x58253d,'ref':'','id':_0x5ce2c8[_0xb50706(0xf0)],'dT':_0xb02b86(+_0x5ce2c8['createTimestamp']),'threadId':_0x5ce2c8['threadId'],'personId':(_0x540c4c=(_0x1d733c=_0x5ce2c8[_0xb50706(0x14a)])==null?void 0x0:_0x1d733c[_0xb50706(0x110)])!=null?_0x540c4c:_0x5ce2c8['userId'],'text':JSON[_0xb50706(0x116)](_0x5ce2c8['content']),'parentId':_0x569f59['id']});break;}case _0x54f0e3[_0xb50706(0x152)]:{const _0x15c54f=this[_0xb50706(0x148)][_0xb50706(0xf3)](_0x92b9f9,_0x58253d,_0x5ce2c8[_0xb50706(0xf0)]);_0x15c54f&&_0x15c54f[_0xb50706(0x108)]&&this['_threadCommentModel'][_0xb50706(0x111)](_0x92b9f9,_0x58253d,_0x5ce2c8['replyId']);break;}case _0x54f0e3[_0xb50706(0x10a)]:{this[_0xb50706(0x148)][_0xb50706(0x12a)](_0x92b9f9,_0x58253d,{'commentId':_0x5ce2c8['replyId'],'text':JSON['parse'](_0x5ce2c8[_0xb50706(0x13f)])});break;}case _0x54f0e3[_0xb50706(0x128)]:{const _0x35b503=(_0x4ba011=this[_0xb50706(0x148)][_0xb50706(0x150)](_0x5ce2c8['unitId'])[_0xb50706(0xfa)](_0x2e1922=>_0x2e1922[_0xb50706(0xef)]===_0x5ce2c8['threadId']))==null?void 0x0:_0x4ba011['root'];_0x35b503&&this[_0xb50706(0x148)][_0xb50706(0xe3)](_0x92b9f9,_0x58253d,_0x35b503['id'],_0x5ce2c8[_0xb50706(0xe9)]===_0x4e36fd[_0xb50706(0xf2)]);break;}}}));}};_0x1a821a=_0x421834([_0x22545f(0x0,_0x38b33b[_0x7566ed(0x151)](_0x3869c4[_0x7566ed(0x135)])),_0x22545f(0x1,_0x38b33b[_0x7566ed(0x151)](_0xd1e86d[_0x7566ed(0xfd)])),_0x22545f(0x2,_0x38b33b[_0x7566ed(0x151)](_0x38b33b[_0x7566ed(0x14e)])),_0x22545f(0x3,_0x38b33b[_0x7566ed(0x151)](_0x38b33b[_0x7566ed(0x14c)]))],_0x1a821a);const _0x14b2d4=_0x7566ed(0x156),_0x490158={};var _0x2d7ff8=Object['getOwnPropertyDescriptor'],_0x5009c7=(_0x2cedfc,_0x32abc7,_0x623da,_0x4a5083)=>{for(var _0xea5fc=_0x4a5083>0x1?void 0x0:_0x4a5083?_0x2d7ff8(_0x32abc7,_0x623da):_0x32abc7,_0x29b5c5=_0x2cedfc['length']-0x1,_0x5ac627;_0x29b5c5>=0x0;_0x29b5c5--)(_0x5ac627=_0x2cedfc[_0x29b5c5])&&(_0xea5fc=_0x5ac627(_0xea5fc)||_0xea5fc);return _0xea5fc;},_0x4eeee0=(_0x56349b,_0x5e6c6a)=>(_0x4e9ec5,_0x48d6ee)=>_0x5e6c6a(_0x4e9ec5,_0x48d6ee,_0x56349b);function _0x11e423(_0x5d03ce,_0x18cf29){const _0x111204=_0x7566ed,_0x8b2422=_0x5d03ce['replies'][0x0];return{..._0x18cf29,'id':_0x8b2422[_0x111204(0xf0)],'resolved':_0x5d03ce[_0x111204(0xe9)]===0x1,'dT':_0xb02b86(_0x8b2422[_0x111204(0xed)]),'personId':_0x8b2422[_0x111204(0xe4)],'threadId':_0x8b2422['threadId']};}function _0x479d4e(_0x26fa9f,_0x3bcdc3,_0x4b4ce6){const _0x24bdde=_0x7566ed;var _0x1ea1a5,_0x2a6793;if(((_0x2a6793=(_0x1ea1a5=_0x26fa9f==null?void 0x0:_0x26fa9f[_0x24bdde(0x10d)])==null?void 0x0:_0x1ea1a5[_0x24bdde(0x149)])!=null?_0x2a6793:0x0)>0x0){const _0x24aad2=(_0x4a0dbe,_0x1c07ed)=>({'id':_0x4a0dbe[_0x24bdde(0xf0)],'threadId':_0x4a0dbe[_0x24bdde(0xef)],'dT':_0xb02b86(_0x4a0dbe[_0x24bdde(0xed)]),'personId':_0x4a0dbe[_0x24bdde(0xe4)],'resolved':_0x26fa9f[_0x24bdde(0xe9)]===_0x4e36fd['Solved'],'unitId':_0x3bcdc3,'subUnitId':_0x4b4ce6,'text':JSON['parse'](_0x4a0dbe[_0x24bdde(0x13f)]),'parentId':_0x1c07ed}),_0x4a9e3c=_0x24aad2(_0x26fa9f[_0x24bdde(0x10d)][0x0]);return{..._0x4a9e3c,'children':_0x26fa9f[_0x24bdde(0x10d)][_0x24bdde(0x13a)](0x1)[_0x24bdde(0x155)](_0x17f466=>_0x24aad2(_0x17f466,_0x4a9e3c['id']))};}return null;}let _0x19ffd9=class{constructor(_0x206045,_0x32358a,_0x53eda4){const _0x10e758=_0x7566ed;this[_0x10e758(0x132)]=_0x206045,this[_0x10e758(0x118)]=_0x32358a,this[_0x10e758(0xdc)]=_0x53eda4;}async[_0x7566ed(0x134)](_0x21cef8){const _0x47becd=_0x7566ed;var _0x2aa013,_0xf27626;const {parentId:_0x38c518,unitId:_0x5a560f,text:_0x5571a8,threadId:_0x5dfaf9}=_0x21cef8,_0x888524=(_0xf27626=(_0x2aa013=_0x5571a8['customRanges'])==null?void 0x0:_0x2aa013['filter'](_0x7d3907=>_0x7d3907[_0x47becd(0x127)]===_0x38b33b[_0x47becd(0x12f)][_0x47becd(0xee)])[_0x47becd(0x155)](_0x20a340=>_0x20a340[_0x47becd(0x13b)]))!=null?_0xf27626:[],_0x389840=JSON[_0x47becd(0x131)](_0x5571a8),_0x37483b=(await this[_0x47becd(0xdc)]['requireSession'](_0x5a560f))['getMemberID']();if(_0x38c518){const _0x8e03fd={'memberId':_0x37483b,'unitId':_0x5a560f,'content':_0x389840,'mention':_0x888524,'threadId':_0x5dfaf9},_0x1e506b=(await this[_0x47becd(0x132)][_0x47becd(0xe8)](_0x47becd(0xde)+_0x5a560f+'/reply',{'body':_0x8e03fd}))[_0x47becd(0xf1)]['reply'];return{..._0x21cef8,'id':_0x1e506b[_0x47becd(0xf0)],'dT':_0x38b33b[_0x47becd(0x10f)](+_0x1e506b[_0x47becd(0xed)])['format'](_0x47becd(0x103)),'personId':_0x1e506b['userId']};}else{const _0x2c4372={'memberId':_0x37483b,'unitId':_0x5a560f,'content':_0x389840,'mention':_0x888524},_0x3e2ca0=await this['_httpService'][_0x47becd(0xe8)]('/universer-api/comment/unit/'+_0x5a560f+_0x47becd(0x112),{'body':_0x2c4372});return _0x11e423(_0x3e2ca0[_0x47becd(0xf1)]['comment'],_0x21cef8);}}async[_0x7566ed(0x12a)](_0x1b4e2f){const _0x3512b1=_0x7566ed;var _0x4cf22c,_0x244e9b;const {text:_0x32e00f,unitId:_0x6753f8}=_0x1b4e2f,_0x29c3cf=(_0x244e9b=(_0x4cf22c=_0x32e00f[_0x3512b1(0x125)])==null?void 0x0:_0x4cf22c['filter'](_0x43ea83=>_0x43ea83[_0x3512b1(0x127)]===_0x38b33b[_0x3512b1(0x12f)][_0x3512b1(0xee)])[_0x3512b1(0x155)](_0x3a0b24=>_0x3a0b24['rangeId']))!=null?_0x244e9b:[],_0x16aa9e=JSON['stringify'](_0x32e00f),_0x369923=_0x1b4e2f[_0x3512b1(0xef)],_0x311891=_0x1b4e2f['id'],_0x29f99={'memberId':(await this[_0x3512b1(0xdc)][_0x3512b1(0xea)](_0x6753f8))[_0x3512b1(0x143)](),'unitId':_0x6753f8,'threadId':_0x369923,'mention':_0x29c3cf,'content':_0x16aa9e,'replyId':_0x311891},_0x52b594=await this[_0x3512b1(0x132)][_0x3512b1(0xe8)](_0x3512b1(0xde)+_0x6753f8+_0x3512b1(0x158),{'body':_0x29f99});return!_0x52b594[_0x3512b1(0xf1)][_0x3512b1(0x145)]||_0x52b594[_0x3512b1(0xf1)][_0x3512b1(0x145)]['code']===0x1;}async[_0x7566ed(0xe3)](_0x20bc7f){const _0x2f61fd=_0x7566ed,{unitId:_0x4fb01a}=_0x20bc7f,_0x24d828=_0x20bc7f[_0x2f61fd(0xef)],_0x347896={'memberId':this[_0x2f61fd(0x118)][_0x2f61fd(0xdd)]()[_0x2f61fd(0x110)],'unitId':_0x4fb01a,'threadId':_0x24d828,'solved':_0x20bc7f['resolved']?_0x4e36fd[_0x2f61fd(0xf2)]:_0x4e36fd[_0x2f61fd(0x109)]},_0x264e6c=await this['_httpService']['post'](_0x2f61fd(0xde)+_0x4fb01a+'/solved',{'body':_0x347896});return!_0x264e6c['body'][_0x2f61fd(0x145)]||_0x264e6c['body']['error']['code']===0x1;}async[_0x7566ed(0x111)](_0x4e5e1c,_0x4dff25,_0x2c2413,_0x498e1d){const _0xd12c08=_0x7566ed,_0x5365b5={'memberId':(await this[_0xd12c08(0xdc)][_0xd12c08(0xea)](_0x4e5e1c))[_0xd12c08(0x143)](),'threadId':_0x2c2413,'replyId':_0x498e1d,'unitId':_0x4e5e1c},_0x499774=await this[_0xd12c08(0x132)]['post']('/universer-api/comment/unit/'+_0x4e5e1c+_0xd12c08(0x130),{'body':_0x5365b5});return!_0x499774['body']['error']||_0x499774[_0xd12c08(0xf1)][_0xd12c08(0x145)][_0xd12c08(0x124)]===0x1;}async[_0x7566ed(0x153)](_0x11b66b,_0x23db09,_0x3c4841){const _0x3914a7=_0x7566ed,_0x28fc33={'unitId':_0x11b66b,'threadId':_0x3c4841},_0x343255=await this[_0x3914a7(0x132)]['post'](_0x3914a7(0xde)+_0x11b66b+_0x3914a7(0x105),{'body':_0x28fc33}),_0x476e7b=_0x3c4841['map'](_0x5d25c9=>_0x479d4e(_0x343255[_0x3914a7(0xf1)][_0x3914a7(0xe7)][_0x5d25c9],_0x11b66b,_0x23db09))[_0x3914a7(0x11f)](Boolean);return Object[_0x3914a7(0x12c)](_0x343255[_0x3914a7(0xf1)][_0x3914a7(0x120)])[_0x3914a7(0xe5)](_0x5beab5=>{const _0x4470a1=_0x3914a7;this[_0x4470a1(0x118)]['addUser'](_0x5beab5);}),_0x476e7b;}[_0x7566ed(0xe2)](_0x3ee35d){const _0x3ff782=_0x7566ed;return{'id':_0x3ee35d['id'],'threadId':_0x3ee35d[_0x3ff782(0xef)],'ref':_0x3ee35d['ref']};}};_0x19ffd9=_0x5009c7([_0x4eeee0(0x0,_0x38b33b[_0x7566ed(0x151)](_0x338ad3[_0x7566ed(0xe1)])),_0x4eeee0(0x1,_0x38b33b['Inject'](_0x38b33b[_0x7566ed(0x14e)])),_0x4eeee0(0x2,_0x38b33b['Inject'](_0x3869c4[_0x7566ed(0x115)]))],_0x19ffd9);var _0x463857=Object[_0x7566ed(0xe6)],_0x5d5ef0=(_0x80451a,_0x5205e0,_0x27d68d,_0x9c4edd)=>{for(var _0x4e9055=_0x9c4edd>0x1?void 0x0:_0x9c4edd?_0x463857(_0x5205e0,_0x27d68d):_0x5205e0,_0x59af36=_0x80451a['length']-0x1,_0x2fe65b;_0x59af36>=0x0;_0x59af36--)(_0x2fe65b=_0x80451a[_0x59af36])&&(_0x4e9055=_0x2fe65b(_0x4e9055)||_0x4e9055);return _0x4e9055;},_0x24a9ff=(_0x5e54fa,_0xbde856)=>(_0x3210c3,_0x7f7a63)=>_0xbde856(_0x3210c3,_0x7f7a63,_0x5e54fa);let _0x1e18ca=class extends _0x38b33b['Disposable']{constructor(_0x499364,_0x259bcb){const _0x4c119b=_0x7566ed;super(),this[_0x4c119b(0x133)]=_0x499364,this['_threadCommentDataSource']=_0x259bcb,this[_0x4c119b(0x117)]();}['_initDataSource'](){const _0x9f20a2=_0x7566ed;this[_0x9f20a2(0x133)]['dataSource']=this[_0x9f20a2(0x114)],this['_threadCommentDataSourceService'][_0x9f20a2(0x157)]=!0x1;}};_0x1e18ca=_0x5d5ef0([_0x24a9ff(0x0,_0xd1e86d[_0x7566ed(0x159)]),_0x24a9ff(0x1,_0x38b33b[_0x7566ed(0x151)](_0x19ffd9))],_0x1e18ca);var _0x210831=Object[_0x7566ed(0x141)],_0x638d1f=Object[_0x7566ed(0xe6)],_0x27d730=(_0x220b8d,_0x58a65b,_0x561b4d)=>_0x58a65b in _0x220b8d?_0x210831(_0x220b8d,_0x58a65b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x561b4d}):_0x220b8d[_0x58a65b]=_0x561b4d,_0x60a6f9=(_0x103685,_0x2b4abc,_0x43b3dd,_0x2e908a)=>{for(var _0x3ded88=_0x2e908a>0x1?void 0x0:_0x2e908a?_0x638d1f(_0x2b4abc,_0x43b3dd):_0x2b4abc,_0x47313a=_0x103685['length']-0x1,_0x49bcba;_0x47313a>=0x0;_0x47313a--)(_0x49bcba=_0x103685[_0x47313a])&&(_0x3ded88=_0x49bcba(_0x3ded88)||_0x3ded88);return _0x3ded88;},_0x1dc24c=(_0x528a11,_0x360a31)=>(_0x3c38f6,_0xb230a5)=>_0x360a31(_0x3c38f6,_0xb230a5,_0x528a11),_0x253d3c=(_0xaa0d34,_0x4b7a73,_0x4a2163)=>_0x27d730(_0xaa0d34,typeof _0x4b7a73!=_0x7566ed(0x126)?_0x4b7a73+'':_0x4b7a73,_0x4a2163);_0x4295a0[_0x7566ed(0xe0)]=class extends _0x38b33b[_0x7566ed(0xec)]{constructor(_0x389efb=_0x490158,_0x263bcc,_0x3a2ed2){const _0x1a8312=_0x7566ed;super(),this['_config']=_0x389efb,this[_0x1a8312(0x123)]=_0x263bcc,this['_configService']=_0x3a2ed2;const {..._0x173e13}=_0x38b33b['merge']({},_0x490158,this['_config']);this['_configService'][_0x1a8312(0x119)](_0x14b2d4,_0x173e13);}['onStarting'](){[[_0x19ffd9],[_0x1e18ca],[_0x1a821a]]['forEach'](_0x1c63bb=>{const _0xc269e=_0x1151;this[_0xc269e(0x123)][_0xc269e(0x11a)](_0x1c63bb);});}[_0x7566ed(0x107)](){const _0x1fb29a=_0x7566ed;this['_injector'][_0x1fb29a(0x11d)](_0x1e18ca),this[_0x1fb29a(0x123)]['get'](_0x1a821a);}},_0x253d3c(_0x4295a0[_0x7566ed(0xe0)],_0x7566ed(0x146),_0x40d9a5),_0x253d3c(_0x4295a0[_0x7566ed(0xe0)],'type',_0x38b33b[_0x7566ed(0x142)]['UNIVER_UNKNOWN']),_0x4295a0[_0x7566ed(0xe0)]=_0x60a6f9([_0x38b33b[_0x7566ed(0xf4)](_0x1d7685[_0x7566ed(0xdb)],_0x3869c4['UniverCollaborationClientPlugin'],_0x43efe2['UniverLicensePlugin']),_0x1dc24c(0x1,_0x38b33b[_0x7566ed(0x151)](_0x38b33b['Injector'])),_0x1dc24c(0x2,_0x38b33b[_0x7566ed(0x147)])],_0x4295a0[_0x7566ed(0xe0)]),Object['defineProperty'](_0x4295a0,Symbol['toStringTag'],{'value':'Module'});}));function _0x9757(){const _0xe9cf6c=['userID','deleteComment','/add','Add','_threadCommentDataSource','CollaborationSessionService','parse','_initDataSource','_userService','setConfig','add','UNRECOGNIZED','514100RoIvWT','get','2083154TFExDQ','filter','users','rxjs','1610QAHDIC','_injector','code','customRanges','symbol','rangeType','Solve','Disposable','updateComment','8529678gOIuom','values','UniverCore','UniverProCollaborationClient','CustomRangeType','/delete','stringify','_httpService','_threadCommentDataSourceService','addComment','CommentService','Unknown','delete','bufferTime','_initUserSync','slice','rangeId','amd','UniverNetwork','unitId','content','type','defineProperty','UniverInstanceType','getMemberID','commentUpdate$','error','pluginName','IConfigService','_threadCommentModel','length','user','UniverProThreadCommentDatasource','Injector','3781230PdFfZn','UserManagerService','UniverThreadComment','getUnit','Inject','Delete','listComments','@univerjs/core','map','thread-comment-data-source.config','syncUpdateMutationToColla','/edit','IThreadCommentDataSourceService','Reply','root','_commentService','UniverThreadCommentUIPlugin','_sessionService','getCurrentUser','/universer-api/comment/unit/','pipe','UniverThreadCommentDataSourcePlugin','HTTPService','saveCommentToSnapshot','resolveComment','userId','forEach','getOwnPropertyDescriptor','comments','post','solved','requireSession','1508664DoJItd','Plugin','createTimestamp','COMMENT','threadId','replyId','body','Solved','getComment','DependentOn','@univerjs/network','disposeWithMe','@univerjs/thread-comment','7tmrEgN','1770294DNLnXU','find','@univerjs/thread-comment-ui','size','ThreadCommentModel','function','format','201377mmCRVo','personId','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','addUser','/list','payload','onReady','parentId','OpenOrReOpen','Edit','getUser','35sANlOj','replies','1EhhbFm','dayjs'];_0x9757=function(){return _0xe9cf6c;};return _0x9757();}
|
|
1
|
+
function _0x4672(_0x1d5ae6,_0x56513a){_0x1d5ae6=_0x1d5ae6-0x110;const _0x1614a2=_0x1614();let _0x4672b2=_0x1614a2[_0x1d5ae6];return _0x4672b2;}function _0x1614(){const _0x47a312=['_init','/universer-api/comment/unit/','Unknown','addComment','onReady','code','reply','addUser','512916Xozhhd','UniverThreadCommentUIPlugin','UniverProCollaborationClient','@univerjs/thread-comment-ui','exports','deleteComment','user','onStarting','Solve','replyId','users','_configService','/list','listComments','map','CustomRangeType','357362cUVnfv','error','userID','@univerjs/thread-comment','find','OpenOrReOpen','UNRECOGNIZED','_commentService','thread-comment-data-source.config','commentUpdate$','userId','content','_sessionService','getUnit','comments','@univerjs/network','resolved','rangeId','_initDataSource','values','/reply','Plugin','object','Solved','get','customRanges','_config','bufferTime','getUser','rangeType','function','COMMENT','getCurrentUser','getMemberID','52262qQhFYc','_userService','merge','body','UNIVER_UNKNOWN','delete','/universer-api/user/list','ThreadCommentModel','disposeWithMe','CommentService','payload','post','UniverProLicense','createTimestamp','IConfigService','Injector','resolveComment','format','threadId','2940543MXdWPK','Disposable','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','Reply','_threadCommentDataSource','10gZgeuw','syncUpdateMutationToColla','/add','_threadCommentDataSourceService','dayjs','unitId','_httpService','HTTPService','getComment','/solved','UniverCore','size','IThreadCommentDataSourceService','pipe','subscribe','replies','UniverThreadCommentUi','saveCommentToSnapshot','55sUnDDu','add','DependentOn','UniverCollaborationClientPlugin','_injector','parse','stringify','solved','_threadCommentModel','defineProperty','pluginName','filter','1285023HBayaJ','Inject','type','ref','dataSource','updateComment','12936fDzsBv','@univerjs-pro/collaboration-client','Delete','getOwnPropertyDescriptor','Add','624580DZhnER','parentId','symbol','comment','rxjs','UniverNetwork','/delete','setConfig','personId','UserManagerService','forEach','UniverThreadCommentDataSourcePlugin','Edit','amd','272aSAqNd','root','requireSession'];_0x1614=function(){return _0x47a312;};return _0x1614();}(function(_0x34c7bd,_0x478576){const _0x39a45f=_0x4672,_0x4a38c3=_0x34c7bd();while(!![]){try{const _0x6ebd02=-parseInt(_0x39a45f(0x12e))/0x1+-parseInt(_0x39a45f(0x192))/0x2+parseInt(_0x39a45f(0x187))/0x3+-parseInt(_0x39a45f(0x18d))/0x4*(parseInt(_0x39a45f(0x17b))/0x5)+-parseInt(_0x39a45f(0x11e))/0x6+-parseInt(_0x39a45f(0x150))/0x7*(-parseInt(_0x39a45f(0x113))/0x8)+parseInt(_0x39a45f(0x163))/0x9*(parseInt(_0x39a45f(0x169))/0xa);if(_0x6ebd02===_0x478576)break;else _0x4a38c3['push'](_0x4a38c3['shift']());}catch(_0x562851){_0x4a38c3['push'](_0x4a38c3['shift']());}}}(_0x1614,0x35458),function(_0x19cdfa,_0x4dbf30){const _0x19a694=_0x4672;typeof exports==_0x19a694(0x144)&&typeof module<'u'?_0x4dbf30(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==_0x19a694(0x14c)&&define[_0x19a694(0x112)]?define([_0x19a694(0x122),_0x19a694(0x18e),'@univerjs-pro/license','@univerjs/core',_0x19a694(0x121),_0x19a694(0x131),_0x19a694(0x196),_0x19a694(0x13d)],_0x4dbf30):(_0x19cdfa=typeof globalThis<'u'?globalThis:_0x19cdfa||self,_0x4dbf30(_0x19cdfa['UniverProThreadCommentDatasource']={},_0x19cdfa[_0x19a694(0x120)],_0x19cdfa[_0x19a694(0x15c)],_0x19cdfa[_0x19a694(0x173)],_0x19cdfa[_0x19a694(0x179)],_0x19cdfa['UniverThreadComment'],_0x19cdfa[_0x19a694(0x196)],_0x19cdfa[_0x19a694(0x197)]));}(this,function(_0x3d14b1,_0x39b4a1,_0x338502,_0x782fd0,_0x145a2a,_0x1a5ffb,_0x325b90,_0x1743c9){'use strict';const _0x39bac6=_0x4672;const _0x13e2de=_0x39bac6(0x165);var _0x164965=(_0x5bcc62=>(_0x5bcc62[_0x5bcc62[_0x39bac6(0x133)]=0x0]=_0x39bac6(0x133),_0x5bcc62[_0x5bcc62[_0x39bac6(0x145)]=0x1]='Solved',_0x5bcc62[_0x5bcc62[_0x39bac6(0x134)]=-0x1]=_0x39bac6(0x134),_0x5bcc62))(_0x164965||{}),_0x121c0c=(_0x3f73e1=>(_0x3f73e1[_0x3f73e1[_0x39bac6(0x118)]=0x0]='Unknown',_0x3f73e1[_0x3f73e1[_0x39bac6(0x191)]=0x1]='Add',_0x3f73e1[_0x3f73e1[_0x39bac6(0x167)]=0x2]=_0x39bac6(0x167),_0x3f73e1[_0x3f73e1['Edit']=0x3]=_0x39bac6(0x111),_0x3f73e1[_0x3f73e1[_0x39bac6(0x18f)]=0x4]=_0x39bac6(0x18f),_0x3f73e1[_0x3f73e1[_0x39bac6(0x126)]=0x5]=_0x39bac6(0x126),_0x3f73e1[_0x3f73e1[_0x39bac6(0x134)]=-0x1]=_0x39bac6(0x134),_0x3f73e1))(_0x121c0c||{});const _0x12611a=_0x4b0ef6=>_0x782fd0[_0x39bac6(0x16d)](new Date(+_0x4b0ef6))[_0x39bac6(0x161)]('YYYY/MM/DD\x20HH:mm'),_0x43d62f=async(_0x3e0d4a,_0x349a23)=>{const _0x34e526=_0x39bac6,_0x40c71f=_0x3e0d4a['get'](_0x782fd0[_0x34e526(0x19b)]),_0x4845bf=_0x3e0d4a['get'](_0x1743c9[_0x34e526(0x170)]);_0x349a23[_0x34e526(0x19c)](_0x1e8930=>{const _0x35ad8b=_0x34e526;_0x40c71f[_0x35ad8b(0x14a)](_0x1e8930)&&_0x349a23[_0x35ad8b(0x155)](_0x1e8930);}),_0x349a23[_0x34e526(0x174)]&&(await _0x4845bf['get'](_0x34e526(0x156),{'params':{'userIDs':[..._0x349a23]}}))[_0x34e526(0x153)][_0x34e526(0x128)]['forEach'](_0x4e4156=>{const _0x4345d8=_0x34e526;_0x4e4156&&_0x40c71f[_0x4345d8(0x11d)](_0x4e4156);});};var _0x10a481=Object[_0x39bac6(0x190)],_0x23ddd7=(_0x33d954,_0x3ccbf0,_0x26231c,_0x132d78)=>{for(var _0x232ff0=_0x132d78>0x1?void 0x0:_0x132d78?_0x10a481(_0x3ccbf0,_0x26231c):_0x3ccbf0,_0x3d2cd2=_0x33d954['length']-0x1,_0x41e040;_0x3d2cd2>=0x0;_0x3d2cd2--)(_0x41e040=_0x33d954[_0x3d2cd2])&&(_0x232ff0=_0x41e040(_0x232ff0)||_0x232ff0);return _0x232ff0;},_0x102341=(_0x52ef4b,_0x364e06)=>(_0x4e89da,_0x2cd7f1)=>_0x364e06(_0x4e89da,_0x2cd7f1,_0x52ef4b);let _0x621e03=class extends _0x782fd0[_0x39bac6(0x164)]{constructor(_0x1f3a4d,_0x3b11a6,_0x2bacbe,_0x1250be){const _0x527f42=_0x39bac6;super(),this[_0x527f42(0x135)]=_0x1f3a4d,this[_0x527f42(0x183)]=_0x3b11a6,this[_0x527f42(0x151)]=_0x2bacbe,this[_0x527f42(0x17f)]=_0x1250be,this[_0x527f42(0x116)](),this['_initUserSync']();}['_initUserSync'](){const _0x22cd0f=_0x39bac6;this[_0x22cd0f(0x158)](this[_0x22cd0f(0x183)][_0x22cd0f(0x137)][_0x22cd0f(0x176)](_0x325b90[_0x22cd0f(0x149)](0x10))[_0x22cd0f(0x177)](_0x390d04=>{const _0x1d100e=_0x22cd0f,_0x5f0131=new Set();_0x390d04[_0x1d100e(0x19c)](_0x21bc3b=>{const _0xebd611=_0x1d100e;switch(_0x21bc3b[_0xebd611(0x189)]){case _0xebd611(0x17c):{const _0xd75310=_0x21bc3b[_0xebd611(0x15a)][_0xebd611(0x19a)];_0x5f0131[_0xebd611(0x17c)](_0xd75310);break;}}}),_0x43d62f(this[_0x1d100e(0x17f)],_0x5f0131);}));}[_0x39bac6(0x116)](){const _0x51ef0a=_0x39bac6;this['disposeWithMe'](this[_0x51ef0a(0x135)][_0x51ef0a(0x137)]['subscribe'](async _0x5f2877=>{const _0x31d188=_0x51ef0a;var _0x4e93bc,_0x50aa02,_0x57f041,_0x54d130;const _0x1fddcc=(_0x4e93bc=this[_0x31d188(0x183)][_0x31d188(0x13b)](_0x5f2877[_0x31d188(0x16e)])[_0x31d188(0x132)](_0x744047=>_0x744047['threadId']===_0x5f2877['threadId']))==null?void 0x0:_0x4e93bc['root'];if(!_0x1fddcc)return;const {unitId:_0x3bfe9b,subUnitId:_0x3c67a0}=_0x1fddcc;switch(_0x5f2877['user']&&this['_userService'][_0x31d188(0x11d)](_0x5f2877[_0x31d188(0x124)]),_0x5f2877[_0x31d188(0x189)]){case _0x121c0c[_0x31d188(0x191)]:break;case _0x121c0c[_0x31d188(0x167)]:{this[_0x31d188(0x183)][_0x31d188(0x119)](_0x3bfe9b,_0x3c67a0,{'unitId':_0x3bfe9b,'subUnitId':_0x3c67a0,'ref':'','id':_0x5f2877[_0x31d188(0x127)],'dT':_0x12611a(+_0x5f2877['createTimestamp']),'threadId':_0x5f2877[_0x31d188(0x162)],'personId':(_0x57f041=(_0x50aa02=_0x5f2877[_0x31d188(0x124)])==null?void 0x0:_0x50aa02['userID'])!=null?_0x57f041:_0x5f2877[_0x31d188(0x138)],'text':JSON[_0x31d188(0x180)](_0x5f2877['content']),'parentId':_0x1fddcc['id']});break;}case _0x121c0c[_0x31d188(0x18f)]:{const _0x3895d4=this[_0x31d188(0x183)][_0x31d188(0x171)](_0x3bfe9b,_0x3c67a0,_0x5f2877['replyId']);_0x3895d4&&_0x3895d4[_0x31d188(0x193)]&&this['_threadCommentModel']['deleteComment'](_0x3bfe9b,_0x3c67a0,_0x5f2877[_0x31d188(0x127)]);break;}case _0x121c0c['Edit']:{this[_0x31d188(0x183)][_0x31d188(0x18c)](_0x3bfe9b,_0x3c67a0,{'commentId':_0x5f2877[_0x31d188(0x127)],'text':JSON[_0x31d188(0x180)](_0x5f2877[_0x31d188(0x139)])});break;}case _0x121c0c[_0x31d188(0x126)]:{const _0x4792f9=(_0x54d130=this[_0x31d188(0x183)][_0x31d188(0x13b)](_0x5f2877[_0x31d188(0x16e)])[_0x31d188(0x132)](_0x1c1f72=>_0x1c1f72[_0x31d188(0x162)]===_0x5f2877[_0x31d188(0x162)]))==null?void 0x0:_0x54d130[_0x31d188(0x114)];_0x4792f9&&this['_threadCommentModel'][_0x31d188(0x160)](_0x3bfe9b,_0x3c67a0,_0x4792f9['id'],_0x5f2877[_0x31d188(0x182)]===_0x164965['Solved']);break;}}}));}};_0x621e03=_0x23ddd7([_0x102341(0x0,_0x782fd0[_0x39bac6(0x188)](_0x39b4a1[_0x39bac6(0x159)])),_0x102341(0x1,_0x782fd0['Inject'](_0x1a5ffb[_0x39bac6(0x157)])),_0x102341(0x2,_0x782fd0[_0x39bac6(0x188)](_0x782fd0[_0x39bac6(0x19b)])),_0x102341(0x3,_0x782fd0['Inject'](_0x782fd0['Injector']))],_0x621e03);const _0x6fb472=_0x39bac6(0x136),_0xb8b559={};var _0x5b95e3=Object[_0x39bac6(0x190)],_0x341482=(_0x421932,_0x319b86,_0x5866ae,_0x5740a1)=>{const _0x14b1cd=_0x39bac6;for(var _0x4a4cfa=_0x5740a1>0x1?void 0x0:_0x5740a1?_0x5b95e3(_0x319b86,_0x5866ae):_0x319b86,_0x512360=_0x421932[_0x14b1cd(0x166)]-0x1,_0x25af2e;_0x512360>=0x0;_0x512360--)(_0x25af2e=_0x421932[_0x512360])&&(_0x4a4cfa=_0x25af2e(_0x4a4cfa)||_0x4a4cfa);return _0x4a4cfa;},_0x54e373=(_0x1725c3,_0x31925e)=>(_0x47fc08,_0x569687)=>_0x31925e(_0x47fc08,_0x569687,_0x1725c3);function _0x920e66(_0x38876b,_0x51bfe3){const _0x118e88=_0x39bac6,_0x15e564=_0x38876b['replies'][0x0];return{..._0x51bfe3,'id':_0x15e564[_0x118e88(0x127)],'resolved':_0x38876b[_0x118e88(0x182)]===0x1,'dT':_0x12611a(_0x15e564[_0x118e88(0x15d)]),'personId':_0x15e564[_0x118e88(0x138)],'threadId':_0x15e564[_0x118e88(0x162)]};}function _0x457631(_0x1ffea8,_0x1ad0b1,_0x43e436){const _0x37814b=_0x39bac6;var _0x5618ae,_0xcca847;if(((_0xcca847=(_0x5618ae=_0x1ffea8==null?void 0x0:_0x1ffea8[_0x37814b(0x178)])==null?void 0x0:_0x5618ae[_0x37814b(0x166)])!=null?_0xcca847:0x0)>0x0){const _0x445749=(_0x258523,_0x16f5a3)=>({'id':_0x258523[_0x37814b(0x127)],'threadId':_0x258523[_0x37814b(0x162)],'dT':_0x12611a(_0x258523['createTimestamp']),'personId':_0x258523['userId'],'resolved':_0x1ffea8[_0x37814b(0x182)]===_0x164965[_0x37814b(0x145)],'unitId':_0x1ad0b1,'subUnitId':_0x43e436,'text':JSON['parse'](_0x258523['content']),'parentId':_0x16f5a3}),_0x1d6c9d=_0x445749(_0x1ffea8[_0x37814b(0x178)][0x0]);return{..._0x1d6c9d,'children':_0x1ffea8[_0x37814b(0x178)]['slice'](0x1)[_0x37814b(0x12c)](_0x20f24c=>_0x445749(_0x20f24c,_0x1d6c9d['id']))};}return null;}let _0xdaded3=class{constructor(_0x260e02,_0x4f3ca9,_0x233e2b){const _0x376e7b=_0x39bac6;this[_0x376e7b(0x16f)]=_0x260e02,this[_0x376e7b(0x151)]=_0x4f3ca9,this['_sessionService']=_0x233e2b;}async[_0x39bac6(0x119)](_0x308b98){const _0x10482e=_0x39bac6;var _0xb3dbeb,_0x106803;const {parentId:_0x26caab,unitId:_0x169a57,text:_0x378339,threadId:_0x19bd27}=_0x308b98,_0x3bcb37=(_0x106803=(_0xb3dbeb=_0x378339[_0x10482e(0x147)])==null?void 0x0:_0xb3dbeb[_0x10482e(0x186)](_0x5a671f=>_0x5a671f[_0x10482e(0x14b)]===_0x782fd0['CustomRangeType']['COMMENT'])[_0x10482e(0x12c)](_0x3c7d7f=>_0x3c7d7f[_0x10482e(0x13f)]))!=null?_0x106803:[],_0x506106=JSON[_0x10482e(0x181)](_0x378339),_0x139885=(await this[_0x10482e(0x13a)][_0x10482e(0x115)](_0x169a57))[_0x10482e(0x14f)]();if(_0x26caab){const _0x5d7a3f={'memberId':_0x139885,'unitId':_0x169a57,'content':_0x506106,'mention':_0x3bcb37,'threadId':_0x19bd27},_0x350feb=(await this[_0x10482e(0x16f)][_0x10482e(0x15b)](_0x10482e(0x117)+_0x169a57+_0x10482e(0x142),{'body':_0x5d7a3f}))[_0x10482e(0x153)][_0x10482e(0x11c)];return{..._0x308b98,'id':_0x350feb[_0x10482e(0x127)],'dT':_0x782fd0['dayjs'](+_0x350feb[_0x10482e(0x15d)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x350feb[_0x10482e(0x138)]};}else{const _0x3e3f56={'memberId':_0x139885,'unitId':_0x169a57,'content':_0x506106,'mention':_0x3bcb37},_0x3fe384=await this[_0x10482e(0x16f)][_0x10482e(0x15b)](_0x10482e(0x117)+_0x169a57+_0x10482e(0x16b),{'body':_0x3e3f56});return _0x920e66(_0x3fe384[_0x10482e(0x153)][_0x10482e(0x195)],_0x308b98);}}async[_0x39bac6(0x18c)](_0x8b9b46){const _0xb450c3=_0x39bac6;var _0x8625a4,_0xa71be4;const {text:_0x4a68e6,unitId:_0x106438}=_0x8b9b46,_0xde822a=(_0xa71be4=(_0x8625a4=_0x4a68e6[_0xb450c3(0x147)])==null?void 0x0:_0x8625a4[_0xb450c3(0x186)](_0xd9a070=>_0xd9a070[_0xb450c3(0x14b)]===_0x782fd0[_0xb450c3(0x12d)][_0xb450c3(0x14d)])[_0xb450c3(0x12c)](_0x4f40c7=>_0x4f40c7['rangeId']))!=null?_0xa71be4:[],_0x242bb9=JSON[_0xb450c3(0x181)](_0x4a68e6),_0x35b175=_0x8b9b46[_0xb450c3(0x162)],_0x208f13=_0x8b9b46['id'],_0x2d3823={'memberId':(await this[_0xb450c3(0x13a)][_0xb450c3(0x115)](_0x106438))[_0xb450c3(0x14f)](),'unitId':_0x106438,'threadId':_0x35b175,'mention':_0xde822a,'content':_0x242bb9,'replyId':_0x208f13},_0x893a3a=await this[_0xb450c3(0x16f)][_0xb450c3(0x15b)](_0xb450c3(0x117)+_0x106438+'/edit',{'body':_0x2d3823});return!_0x893a3a[_0xb450c3(0x153)][_0xb450c3(0x12f)]||_0x893a3a[_0xb450c3(0x153)][_0xb450c3(0x12f)][_0xb450c3(0x11b)]===0x1;}async[_0x39bac6(0x160)](_0x21de49){const _0x232b94=_0x39bac6,{unitId:_0x1a0153}=_0x21de49,_0xecdddd=_0x21de49[_0x232b94(0x162)],_0x5dea95={'memberId':this[_0x232b94(0x151)][_0x232b94(0x14e)]()[_0x232b94(0x130)],'unitId':_0x1a0153,'threadId':_0xecdddd,'solved':_0x21de49[_0x232b94(0x13e)]?_0x164965['Solved']:_0x164965[_0x232b94(0x133)]},_0x3af354=await this[_0x232b94(0x16f)]['post'](_0x232b94(0x117)+_0x1a0153+_0x232b94(0x172),{'body':_0x5dea95});return!_0x3af354[_0x232b94(0x153)][_0x232b94(0x12f)]||_0x3af354[_0x232b94(0x153)][_0x232b94(0x12f)][_0x232b94(0x11b)]===0x1;}async[_0x39bac6(0x123)](_0xadd8cf,_0x4c5b3e,_0x30661a,_0x3ef511){const _0x2daa3d=_0x39bac6,_0x140414={'memberId':(await this['_sessionService'][_0x2daa3d(0x115)](_0xadd8cf))['getMemberID'](),'threadId':_0x30661a,'replyId':_0x3ef511,'unitId':_0xadd8cf},_0x10ecf8=await this['_httpService'][_0x2daa3d(0x15b)](_0x2daa3d(0x117)+_0xadd8cf+_0x2daa3d(0x198),{'body':_0x140414});return!_0x10ecf8['body']['error']||_0x10ecf8['body'][_0x2daa3d(0x12f)][_0x2daa3d(0x11b)]===0x1;}async[_0x39bac6(0x12b)](_0x2a789e,_0x3993fc,_0x24fa13){const _0x8c7613=_0x39bac6,_0x323aba={'unitId':_0x2a789e,'threadId':_0x24fa13},_0x42c927=await this[_0x8c7613(0x16f)]['post'](_0x8c7613(0x117)+_0x2a789e+_0x8c7613(0x12a),{'body':_0x323aba}),_0x53285a=_0x24fa13[_0x8c7613(0x12c)](_0x495b07=>_0x457631(_0x42c927['body'][_0x8c7613(0x13c)][_0x495b07],_0x2a789e,_0x3993fc))[_0x8c7613(0x186)](Boolean);return Object[_0x8c7613(0x141)](_0x42c927['body'][_0x8c7613(0x128)])['forEach'](_0x317cb1=>{const _0xcf96d4=_0x8c7613;this[_0xcf96d4(0x151)]['addUser'](_0x317cb1);}),_0x53285a;}[_0x39bac6(0x17a)](_0x12cf9d){const _0x5eb4ed=_0x39bac6;return{'id':_0x12cf9d['id'],'threadId':_0x12cf9d[_0x5eb4ed(0x162)],'ref':_0x12cf9d[_0x5eb4ed(0x18a)]};}};_0xdaded3=_0x341482([_0x54e373(0x0,_0x782fd0['Inject'](_0x1743c9[_0x39bac6(0x170)])),_0x54e373(0x1,_0x782fd0[_0x39bac6(0x188)](_0x782fd0['UserManagerService'])),_0x54e373(0x2,_0x782fd0['Inject'](_0x39b4a1['CollaborationSessionService']))],_0xdaded3);var _0x35e2d3=Object[_0x39bac6(0x190)],_0x251c6c=(_0x39b604,_0x16e532,_0x3ceee9,_0x544e1f)=>{const _0x4bf264=_0x39bac6;for(var _0x189f22=_0x544e1f>0x1?void 0x0:_0x544e1f?_0x35e2d3(_0x16e532,_0x3ceee9):_0x16e532,_0xa21c5f=_0x39b604[_0x4bf264(0x166)]-0x1,_0x8a23ef;_0xa21c5f>=0x0;_0xa21c5f--)(_0x8a23ef=_0x39b604[_0xa21c5f])&&(_0x189f22=_0x8a23ef(_0x189f22)||_0x189f22);return _0x189f22;},_0xc5bf0a=(_0x4b8646,_0x3c378f)=>(_0x58a946,_0x3e73f9)=>_0x3c378f(_0x58a946,_0x3e73f9,_0x4b8646);let _0x5e86a5=class extends _0x782fd0[_0x39bac6(0x164)]{constructor(_0x5339b6,_0x5edd86){const _0x553597=_0x39bac6;super(),this['_threadCommentDataSourceService']=_0x5339b6,this[_0x553597(0x168)]=_0x5edd86,this[_0x553597(0x140)]();}[_0x39bac6(0x140)](){const _0x5e3ad4=_0x39bac6;this[_0x5e3ad4(0x16c)][_0x5e3ad4(0x18b)]=this[_0x5e3ad4(0x168)],this[_0x5e3ad4(0x16c)][_0x5e3ad4(0x16a)]=!0x1;}};_0x5e86a5=_0x251c6c([_0xc5bf0a(0x0,_0x1a5ffb[_0x39bac6(0x175)]),_0xc5bf0a(0x1,_0x782fd0[_0x39bac6(0x188)](_0xdaded3))],_0x5e86a5);var _0x3e7616=Object[_0x39bac6(0x184)],_0x1478eb=Object['getOwnPropertyDescriptor'],_0x5c00e3=(_0xa5e157,_0x56122d,_0x2608fa)=>_0x56122d in _0xa5e157?_0x3e7616(_0xa5e157,_0x56122d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2608fa}):_0xa5e157[_0x56122d]=_0x2608fa,_0x37846f=(_0x47f843,_0x989710,_0x51a3ce,_0xc9d341)=>{const _0x26911c=_0x39bac6;for(var _0x30c813=_0xc9d341>0x1?void 0x0:_0xc9d341?_0x1478eb(_0x989710,_0x51a3ce):_0x989710,_0x5496bb=_0x47f843[_0x26911c(0x166)]-0x1,_0x4810a4;_0x5496bb>=0x0;_0x5496bb--)(_0x4810a4=_0x47f843[_0x5496bb])&&(_0x30c813=_0x4810a4(_0x30c813)||_0x30c813);return _0x30c813;},_0x31ad66=(_0x4ba811,_0x45e0a8)=>(_0x5a3f4a,_0x12e7c)=>_0x45e0a8(_0x5a3f4a,_0x12e7c,_0x4ba811),_0x44b548=(_0x460ab4,_0x1cc7a1,_0x371345)=>_0x5c00e3(_0x460ab4,typeof _0x1cc7a1!=_0x39bac6(0x194)?_0x1cc7a1+'':_0x1cc7a1,_0x371345);_0x3d14b1[_0x39bac6(0x110)]=class extends _0x782fd0[_0x39bac6(0x143)]{constructor(_0x30c588=_0xb8b559,_0x282a78,_0x18f083){const _0xb35703=_0x39bac6;super(),this[_0xb35703(0x148)]=_0x30c588,this[_0xb35703(0x17f)]=_0x282a78,this[_0xb35703(0x129)]=_0x18f083;const {..._0x5e7252}=_0x782fd0[_0xb35703(0x152)]({},_0xb8b559,this['_config']);this[_0xb35703(0x129)][_0xb35703(0x199)](_0x6fb472,_0x5e7252);}[_0x39bac6(0x125)](){const _0x56a516=_0x39bac6;[[_0xdaded3],[_0x5e86a5],[_0x621e03]][_0x56a516(0x19c)](_0x208c3d=>{const _0x500d5e=_0x56a516;this['_injector'][_0x500d5e(0x17c)](_0x208c3d);});}[_0x39bac6(0x11a)](){const _0x455048=_0x39bac6;this[_0x455048(0x17f)][_0x455048(0x146)](_0x5e86a5),this[_0x455048(0x17f)]['get'](_0x621e03);}},_0x44b548(_0x3d14b1['UniverThreadCommentDataSourcePlugin'],_0x39bac6(0x185),_0x13e2de),_0x44b548(_0x3d14b1[_0x39bac6(0x110)],_0x39bac6(0x189),_0x782fd0['UniverInstanceType'][_0x39bac6(0x154)]),_0x3d14b1['UniverThreadCommentDataSourcePlugin']=_0x37846f([_0x782fd0[_0x39bac6(0x17d)](_0x145a2a[_0x39bac6(0x11f)],_0x39b4a1[_0x39bac6(0x17e)],_0x338502['UniverLicensePlugin']),_0x31ad66(0x1,_0x782fd0[_0x39bac6(0x188)](_0x782fd0[_0x39bac6(0x15f)])),_0x31ad66(0x2,_0x782fd0[_0x39bac6(0x15e)])],_0x3d14b1[_0x39bac6(0x110)]),Object[_0x39bac6(0x184)](_0x3d14b1,Symbol['toStringTag'],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0-insiders.20251216-1519cb7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/network": "0.12.4",
|
|
48
|
+
"@univerjs-pro/license": "0.13.0-insiders.20251216-1519cb7",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.13.0-insiders.20251216-1519cb7",
|
|
51
50
|
"@univerjs/protocol": "0.1.47",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs-
|
|
51
|
+
"@univerjs/network": "0.13.0-insiders.20251216-1519cb7",
|
|
52
|
+
"@univerjs/core": "0.13.0-insiders.20251216-1519cb7",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.13.0-insiders.20251216-1519cb7",
|
|
54
|
+
"@univerjs/thread-comment": "0.13.0-insiders.20251216-1519cb7"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.2.
|
|
59
|
+
"vite": "^7.2.7",
|
|
60
60
|
"vitest": "^4.0.15",
|
|
61
|
-
"@univerjs-infra/shared": "0.
|
|
61
|
+
"@univerjs-infra/shared": "0.13.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|