@univerjs-pro/thread-comment-datasource 1.0.2 → 1.0.4
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
|
-
const _0x2620c7=_0x6927;(function(_0x40313f,_0x540115){const _0x2a5f19=_0x6927,_0x1479b5=_0x40313f();while(!![]){try{const _0x5df966=-parseInt(_0x2a5f19(0xab))/0x1*(parseInt(_0x2a5f19(0x9a))/0x2)+parseInt(_0x2a5f19(0xa1))/0x3*(parseInt(_0x2a5f19(0xe2))/0x4)+parseInt(_0x2a5f19(0xa4))/0x5*(parseInt(_0x2a5f19(0xe7))/0x6)+parseInt(_0x2a5f19(0xa9))/0x7+-parseInt(_0x2a5f19(0xb0))/0x8+-parseInt(_0x2a5f19(0x86))/0x9*(-parseInt(_0x2a5f19(0xae))/0xa)+parseInt(_0x2a5f19(0xc7))/0xb*(-parseInt(_0x2a5f19(0xf3))/0xc);if(_0x5df966===_0x540115)break;else _0x1479b5['push'](_0x1479b5['shift']());}catch(_0x326467){_0x1479b5['push'](_0x1479b5['shift']());}}}(_0x974d,0x5048b),Object[_0x2620c7(0x96)](exports,Symbol[_0x2620c7(0xe3)],{'value':_0x2620c7(0xfa)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs-pro/license'),n=require('@univerjs/core'),r=require('@univerjs/network'),i=require('@univerjs/thread-comment'),a=require('@univerjs/thread-comment-ui'),o=require('@univerjs/protocol'),s=require('rxjs');var c=_0x2620c7(0x102),l=_0x2620c7(0x98);const u={},d=_0x38ac26=>(0x0,n[_0x2620c7(0xff)])(new Date(+_0x38ac26))[_0x2620c7(0x8b)](_0x2620c7(0xf6));function f(_0x13bc1a){const _0x2e59b9=_0x2620c7;if(!_0x13bc1a)return null;try{let _0x1b0b00=JSON[_0x2e59b9(0xcc)](_0x13bc1a);return(0x0,i[_0x2e59b9(0xa2)])(_0x1b0b00)?_0x1b0b00:null;}catch{return null;}}const p=async(_0x3b5f2e,_0x152136)=>{const _0x52e375=_0x2620c7;let _0x34ad0f=_0x3b5f2e[_0x52e375(0xd3)](n[_0x52e375(0xe6)]),_0x7959a8=_0x3b5f2e[_0x52e375(0xd3)](r['HTTPService']);_0x152136['forEach'](_0x11c97f=>{const _0x26c1dc=_0x52e375;_0x34ad0f['getUser'](_0x11c97f)&&_0x152136[_0x26c1dc(0xc3)](_0x11c97f);}),_0x152136[_0x52e375(0x110)]&&(await _0x7959a8[_0x52e375(0xd3)](_0x52e375(0x8a),{'params':{'userIDs':[..._0x152136]}}))['body'][_0x52e375(0xdf)][_0x52e375(0x106)](_0x367ece=>{const _0x3747d9=_0x52e375;_0x367ece&&_0x34ad0f[_0x3747d9(0xac)](_0x367ece);});};function m(_0x314d60,_0x5192d6){return function(_0x5e4ee1,_0x1d39d1){_0x5192d6(_0x5e4ee1,_0x1d39d1,_0x314d60);};}function h(_0x4152f8,_0x1a317c,_0x469149,_0xcb3dd8){const _0x1db1c7=_0x2620c7;var _0x5c13e7=arguments[_0x1db1c7(0xe9)],_0x18b1a6=_0x5c13e7<0x3?_0x1a317c:_0xcb3dd8===null?_0xcb3dd8=Object[_0x1db1c7(0xc8)](_0x1a317c,_0x469149):_0xcb3dd8,_0x2996a2;if(typeof Reflect==_0x1db1c7(0x97)&&typeof Reflect['decorate']==_0x1db1c7(0xfe))_0x18b1a6=Reflect[_0x1db1c7(0xa6)](_0x4152f8,_0x1a317c,_0x469149,_0xcb3dd8);else{for(var _0x49d698=_0x4152f8['length']-0x1;_0x49d698>=0x0;_0x49d698--)(_0x2996a2=_0x4152f8[_0x49d698])&&(_0x18b1a6=(_0x5c13e7<0x3?_0x2996a2(_0x18b1a6):_0x5c13e7>0x3?_0x2996a2(_0x1a317c,_0x469149,_0x18b1a6):_0x2996a2(_0x1a317c,_0x469149))||_0x18b1a6);}return _0x5c13e7>0x3&&_0x18b1a6&&Object[_0x1db1c7(0x96)](_0x1a317c,_0x469149,_0x18b1a6),_0x18b1a6;}function _0x6927(_0x412327,_0x41d286){_0x412327=_0x412327-0x84;const _0x974dc3=_0x974d();let _0x6927cd=_0x974dc3[_0x412327];return _0x6927cd;}let g=class extends n[_0x2620c7(0xa8)]{constructor(_0x1ea76f,_0x57c10e,_0x2a11ec,_0x3eb72d){const _0x5a4808=_0x2620c7;super(),this[_0x5a4808(0xc0)]=_0x1ea76f,this[_0x5a4808(0xfb)]=_0x57c10e,this[_0x5a4808(0x9d)]=_0x2a11ec,this[_0x5a4808(0xf0)]=_0x3eb72d,this['_init'](),this[_0x5a4808(0x113)]();}['_initUserSync'](){const _0x502ef9=_0x2620c7;this['disposeWithMe'](this['_threadCommentModel'][_0x502ef9(0x87)][_0x502ef9(0xcd)]((0x0,s['bufferTime'])(0x10))[_0x502ef9(0xe8)](_0x3fd073=>{const _0x46b802=_0x502ef9;let _0x1be255=new Set();_0x3fd073['forEach'](_0x455fe3=>{const _0x3facab=_0x6927;switch(_0x455fe3[_0x3facab(0xbb)]){case'add':{let _0xdcd666=_0x455fe3['payload'][_0x3facab(0xc6)];_0x1be255[_0x3facab(0xca)](_0xdcd666);break;}}}),p(this[_0x46b802(0xf0)],_0x1be255);}));}[_0x2620c7(0xf1)](_0x5cb4fd,_0x1cec6e,_0x2d0d90){const _0x28bb25=_0x2620c7;let _0x244900=this[_0x28bb25(0xfb)][_0x28bb25(0xd2)](_0x5cb4fd,_0x1cec6e,_0x2d0d90);_0x244900&&(_0x244900[_0x28bb25(0xd9)]?this['_threadCommentModel'][_0x28bb25(0x10a)](_0x5cb4fd,_0x1cec6e,_0x2d0d90):this[_0x28bb25(0xfb)][_0x28bb25(0x10c)](_0x5cb4fd,_0x1cec6e,_0x244900['threadId']));}[_0x2620c7(0xc9)](_0xf307d7,_0x400798,_0x4354e1,_0x3d416f){const _0x3e8bdc=_0x2620c7;(_0x3d416f===o[_0x3e8bdc(0xb8)]['Solved']||_0x3d416f===o[_0x3e8bdc(0xb8)][_0x3e8bdc(0x84)])&&this[_0x3e8bdc(0xfb)][_0x3e8bdc(0x111)](_0xf307d7,_0x400798,_0x4354e1,_0x3d416f===o[_0x3e8bdc(0xb8)][_0x3e8bdc(0x9b)]);}[_0x2620c7(0xc4)](){const _0x4a586b=_0x2620c7;this[_0x4a586b(0xe0)](this[_0x4a586b(0xc0)][_0x4a586b(0x87)]['subscribe'](_0x53fd5b=>{const _0x5d326b=_0x4a586b;var _0x596024;let _0x1c4adc=(_0x596024=this[_0x5d326b(0xfb)][_0x5d326b(0xda)](_0x53fd5b[_0x5d326b(0xdc)])['find'](_0x2bea30=>_0x2bea30['threadId']===_0x53fd5b[_0x5d326b(0xd7)]))==null?void 0x0:_0x596024['root'];if(!_0x1c4adc)return;let {unitId:_0x236ff6,subUnitId:_0x4fcb9b}=_0x1c4adc;switch(_0x53fd5b['user']&&this['_userService'][_0x5d326b(0xac)](_0x53fd5b['user']),_0x53fd5b[_0x5d326b(0xbb)]){case o[_0x5d326b(0xad)][_0x5d326b(0x107)]:{var _0x9b1680;let _0xd0c9a9=f(_0x53fd5b['content']);if(!_0x53fd5b[_0x5d326b(0x85)]||!_0x53fd5b[_0x5d326b(0xeb)]||!_0xd0c9a9)return;this[_0x5d326b(0xfb)][_0x5d326b(0xa0)](_0x236ff6,_0x4fcb9b,{'unitId':_0x236ff6,'subUnitId':_0x4fcb9b,'ref':'','id':_0x53fd5b['replyId'],'dT':d(+_0x53fd5b['createTimestamp']),'threadId':_0x53fd5b[_0x5d326b(0xd7)],'personId':((_0x9b1680=_0x53fd5b['user'])==null?void 0x0:_0x9b1680[_0x5d326b(0xde)])??_0x53fd5b[_0x5d326b(0xb9)],'text':_0xd0c9a9,'parentId':_0x1c4adc['id']});break;}case o[_0x5d326b(0xad)][_0x5d326b(0xd6)]:if(!_0x53fd5b[_0x5d326b(0x85)]){this[_0x5d326b(0xfb)][_0x5d326b(0x10c)](_0x236ff6,_0x4fcb9b,_0x1c4adc[_0x5d326b(0xd7)]);break;}this[_0x5d326b(0xf1)](_0x236ff6,_0x4fcb9b,_0x53fd5b[_0x5d326b(0x85)]);break;case o[_0x5d326b(0xad)][_0x5d326b(0xbf)]:{let _0x264ede=f(_0x53fd5b[_0x5d326b(0x100)]);if(!_0x53fd5b[_0x5d326b(0x85)]||!_0x264ede)return;this[_0x5d326b(0xfb)][_0x5d326b(0xd0)](_0x236ff6,_0x4fcb9b,{'commentId':_0x53fd5b[_0x5d326b(0x85)],'text':_0x264ede});break;}case o['CommentUpdateEventType'][_0x5d326b(0xdd)]:this['_resolveComment'](_0x236ff6,_0x4fcb9b,_0x1c4adc['id'],_0x53fd5b[_0x5d326b(0xbd)]);}}));}};function _0x974d(){const _0x20fca6=['call','body','listComments','IConfigService','replies','ref','values','_sessionService','_httpService','defineProperty','object','1.0.2','Inject','16AHEmPL','Solved','getMemberID','_userService','isFinite','prototype','addComment','2385gbSELP','isThreadCommentDocumentBody','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20comment','2954775cSDODN','packageName','decorate','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20reply','Disposable','3355772LsFWrv','_configService','50356WSjHJJ','addUser','CommentUpdateEventType','56310NCCVtz','UniverLicensePlugin','5052064VgEWNr','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','authorName','IThreadCommentDataSourceService','message','CommentService','symbol','COMMENT','CommentSolvedStatus','userId','comments','type','flatMap','solved','slice','Edit','_commentService','code','/edit','delete','_init','ThreadCommentModel','personId','4756983ACjxhH','getOwnPropertyDescriptor','_resolveComment','add','/delete','parse','pipe','rangeType','Comment\x20service\x20failed\x20to\x20list\x20comments','updateComment','customRanges','getComment','get','comment','/add','Delete','threadId','requireSession','parentId','getUnit','post','unitId','Solve','userID','users','disposeWithMe','toPrimitive','3196QwAHgl','toStringTag','map','rangeId','UserManagerService','6MYOtFw','subscribe','length','setConfig','createTimestamp','has','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_initDataSource','UniverThreadCommentUIPlugin','_injector','_deleteComment','CustomRangeType','12cgZeLA','/universer-api/comment/unit/','filter','YYYY/MM/DD\x20HH:mm','pluginName','_config','children','Module','_threadCommentModel','merge','DependentOn','function','dateKit','content','Injector','@univerjs-pro/thread-comment-datasource','error','/reply','constructor','forEach','Reply','string','stringify','deleteComment','some','deleteThread','CollaborationSessionService','iterator','Comment\x20service\x20returned\x20an\x20invalid\x20thread','size','resolveComment','HTTPService','_initUserSync','OpenOrReOpen','replyId','144PbhdyP','commentUpdate$','/solved','_threadCommentDataSourceService','/universer-api/user/list','format','UniverThreadCommentPlugin'];_0x974d=function(){return _0x20fca6;};return _0x974d();}g=h([m(0x0,(0x0,n['Inject'])(e[_0x2620c7(0xb5)])),m(0x1,(0x0,n[_0x2620c7(0x99)])(i[_0x2620c7(0xc5)])),m(0x2,(0x0,n[_0x2620c7(0x99)])(n[_0x2620c7(0xe6)])),m(0x3,(0x0,n[_0x2620c7(0x99)])(n[_0x2620c7(0x101)]))],g);function _(_0x5bd09e,_0x5c0a31){const _0xda5618=_0x2620c7;let _0x1969c9=Number(_0x5bd09e==null?void 0x0:_0x5bd09e[_0xda5618(0xeb)]);return!!(_0x5bd09e&&_0x5bd09e[_0xda5618(0x85)]&&_0x5bd09e[_0xda5618(0xd7)]===_0x5c0a31&&_0x5bd09e['userId']&&Number[_0xda5618(0x9e)](_0x1969c9)&&_0x1969c9>0x0);}function v(_0x384df7,_0x3d66d9){const _0x295633=_0x2620c7;let _0x2853a3=_0x384df7[_0x295633(0x91)][0x0];if(!_0x384df7[_0x295633(0xd7)]||!_(_0x2853a3,_0x384df7[_0x295633(0xd7)]))throw Error(_0x295633(0x10f));return{..._0x3d66d9,'id':_0x2853a3[_0x295633(0x85)],'resolved':_0x384df7[_0x295633(0xbd)]===0x1,'dT':d(_0x2853a3['createTimestamp']),'personId':_0x2853a3[_0x295633(0xb9)],'threadId':_0x2853a3[_0x295633(0xd7)]};}function y(_0x679ad7,_0x2fd08c,_0x2fa3ed,_0x2661ba){const _0x2c3cbb=_0x2620c7;if((_0x679ad7==null?void 0x0:_0x679ad7[_0x2c3cbb(0xd7)])===_0x2fd08c&&_0x679ad7[_0x2c3cbb(0x91)]['length']>0x0){let _0x219ccd=(_0x19c5d0,_0x2f5295)=>{const _0x465142=_0x2c3cbb;if(!_(_0x19c5d0,_0x2fd08c))return null;let _0x3796c7=f(_0x19c5d0[_0x465142(0x100)]);return _0x3796c7?{'id':_0x19c5d0[_0x465142(0x85)],'threadId':_0x19c5d0[_0x465142(0xd7)],'dT':d(_0x19c5d0[_0x465142(0xeb)]),'personId':_0x19c5d0[_0x465142(0xb9)],'resolved':_0x679ad7['solved']===o[_0x465142(0xb8)]['Solved'],'unitId':_0x2fa3ed,'subUnitId':_0x2661ba,'text':_0x3796c7,'parentId':_0x2f5295}:null;},_0x48b162=_0x219ccd(_0x679ad7[_0x2c3cbb(0x91)][0x0]);if(!_0x48b162)return null;let _0x7d1cfb=new Set([_0x48b162['id']]),_0x1bc700=_0x679ad7[_0x2c3cbb(0x91)][_0x2c3cbb(0xbe)](0x1)[_0x2c3cbb(0xbc)](_0x454712=>{const _0x6ca13d=_0x2c3cbb;let _0x29ca8e=_0x219ccd(_0x454712,_0x48b162['id']);return!_0x29ca8e||_0x7d1cfb[_0x6ca13d(0xec)](_0x29ca8e['id'])?[]:(_0x7d1cfb[_0x6ca13d(0xca)](_0x29ca8e['id']),[_0x29ca8e]);});return{..._0x48b162,'children':_0x1bc700};}return null;}let b=class{constructor(_0x440f4c,_0x488e47,_0x2dcfa0){const _0x4e1e51=_0x2620c7;this['_httpService']=_0x440f4c,this['_userService']=_0x488e47,this[_0x4e1e51(0x94)]=_0x2dcfa0;}async['addComment'](_0x120ca9){const _0x3ffecc=_0x2620c7;var _0x1ad841;let {parentId:_0x583869,unitId:_0x52b474,text:_0x252b81,threadId:_0x2364b6}=_0x120ca9,_0x366af7=((_0x1ad841=_0x252b81['customRanges'])==null?void 0x0:_0x1ad841['filter'](_0x351dea=>_0x351dea[_0x3ffecc(0xce)]===n[_0x3ffecc(0xf2)][_0x3ffecc(0xb7)])[_0x3ffecc(0xe4)](_0x5a688a=>_0x5a688a[_0x3ffecc(0xe5)]))??[],_0x512e98=JSON[_0x3ffecc(0x109)](_0x252b81),_0x2d2f32=(await this[_0x3ffecc(0x94)][_0x3ffecc(0xd8)](_0x52b474))['getMemberID']();if(_0x583869){let _0x1eac39={'memberId':_0x2d2f32,'unitId':_0x52b474,'content':_0x512e98,'mention':_0x366af7,'threadId':_0x2364b6},_0x5c0d40=await this[_0x3ffecc(0x95)][_0x3ffecc(0xdb)](_0x3ffecc(0xf4)+_0x52b474+_0x3ffecc(0x104),{'body':_0x1eac39}),_0x3c3bee=_0x5c0d40[_0x3ffecc(0x8e)]['reply'];if(_0x5c0d40['body']['error']&&_0x5c0d40[_0x3ffecc(0x8e)][_0x3ffecc(0x103)][_0x3ffecc(0xc1)]!==0x1||!_(_0x3c3bee,_0x2364b6)){var _0x32b79e;throw Error(((_0x32b79e=_0x5c0d40[_0x3ffecc(0x8e)]['error'])==null?void 0x0:_0x32b79e[_0x3ffecc(0xb4)])??_0x3ffecc(0xa7));}return{..._0x120ca9,'id':_0x3c3bee[_0x3ffecc(0x85)],'dT':(0x0,n['dateKit'])(+_0x3c3bee[_0x3ffecc(0xeb)])['format'](_0x3ffecc(0xf6)),'personId':_0x3c3bee[_0x3ffecc(0xb9)]};}{let _0x5f211b={'memberId':_0x2d2f32,'unitId':_0x52b474,'content':_0x512e98,'mention':_0x366af7},_0x356193=await this[_0x3ffecc(0x95)][_0x3ffecc(0xdb)](_0x3ffecc(0xf4)+_0x52b474+_0x3ffecc(0xd5),{'body':_0x5f211b});if(_0x356193[_0x3ffecc(0x8e)]['error']&&_0x356193['body'][_0x3ffecc(0x103)][_0x3ffecc(0xc1)]!==0x1||!_0x356193[_0x3ffecc(0x8e)][_0x3ffecc(0xd4)]){var _0x83a897;throw Error(((_0x83a897=_0x356193[_0x3ffecc(0x8e)][_0x3ffecc(0x103)])==null?void 0x0:_0x83a897[_0x3ffecc(0xb4)])??_0x3ffecc(0xa3));}return v(_0x356193[_0x3ffecc(0x8e)][_0x3ffecc(0xd4)],_0x120ca9);}}async[_0x2620c7(0xd0)](_0x347bef){const _0x7cf019=_0x2620c7;var _0x4fe4a0;let {text:_0x313496,unitId:_0x24bb09}=_0x347bef,_0x2d2630=((_0x4fe4a0=_0x313496[_0x7cf019(0xd1)])==null?void 0x0:_0x4fe4a0[_0x7cf019(0xf5)](_0x1d1c4c=>_0x1d1c4c['rangeType']===n[_0x7cf019(0xf2)][_0x7cf019(0xb7)])['map'](_0x5efd96=>_0x5efd96['rangeId']))??[],_0x14245d=JSON[_0x7cf019(0x109)](_0x313496),_0x22f963=_0x347bef[_0x7cf019(0xd7)],_0x142f8d=_0x347bef['id'],_0x292a9c={'memberId':(await this['_sessionService'][_0x7cf019(0xd8)](_0x24bb09))[_0x7cf019(0x9c)](),'unitId':_0x24bb09,'threadId':_0x22f963,'mention':_0x2d2630,'content':_0x14245d,'replyId':_0x142f8d},_0xd2f719=await this[_0x7cf019(0x95)][_0x7cf019(0xdb)](_0x7cf019(0xf4)+_0x24bb09+_0x7cf019(0xc2),{'body':_0x292a9c});return!_0xd2f719[_0x7cf019(0x8e)][_0x7cf019(0x103)]||_0xd2f719[_0x7cf019(0x8e)][_0x7cf019(0x103)][_0x7cf019(0xc1)]===0x1;}async[_0x2620c7(0x111)](_0x5e9b13){const _0xcfae93=_0x2620c7;let {unitId:_0x512f65}=_0x5e9b13,_0x43f0b3=_0x5e9b13[_0xcfae93(0xd7)],_0x494f39={'memberId':(await this['_sessionService'][_0xcfae93(0xd8)](_0x512f65))[_0xcfae93(0x9c)](),'unitId':_0x512f65,'threadId':_0x43f0b3,'solved':_0x5e9b13['resolved']?o['CommentSolvedStatus'][_0xcfae93(0x9b)]:o['CommentSolvedStatus'][_0xcfae93(0x84)]},_0x7c3014=await this[_0xcfae93(0x95)][_0xcfae93(0xdb)](_0xcfae93(0xf4)+_0x512f65+_0xcfae93(0x88),{'body':_0x494f39});return!_0x7c3014['body']['error']||_0x7c3014[_0xcfae93(0x8e)]['error'][_0xcfae93(0xc1)]===0x1;}[_0x2620c7(0x10a)](_0x4188e2,_0xb9dfeb,_0x470cf6,_0x4cbd8c){const _0x12872c=_0x2620c7;return this[_0x12872c(0xf1)](_0x4188e2,_0x470cf6,_0x4cbd8c);}[_0x2620c7(0x10c)](_0x2e5c92,_0x28ceb4,_0x3489d9){const _0x178614=_0x2620c7;return this[_0x178614(0xf1)](_0x2e5c92,_0x3489d9);}async[_0x2620c7(0xf1)](_0x413b67,_0x40c40c,_0x2e4ed3){const _0x42e158=_0x2620c7;let _0x20d20f={'memberId':(await this[_0x42e158(0x94)][_0x42e158(0xd8)](_0x413b67))[_0x42e158(0x9c)](),'threadId':_0x40c40c,'replyId':_0x2e4ed3,'unitId':_0x413b67},_0x2c768c=await this[_0x42e158(0x95)][_0x42e158(0xdb)](_0x42e158(0xf4)+_0x413b67+_0x42e158(0xcb),{'body':_0x20d20f});return!_0x2c768c[_0x42e158(0x8e)]['error']||_0x2c768c[_0x42e158(0x8e)][_0x42e158(0x103)]['code']===0x1;}async[_0x2620c7(0x8f)](_0xe41eb7,_0xd60167,_0x528386){const _0x1eecd9=_0x2620c7;let _0x4d7fef={'unitId':_0xe41eb7,'threadId':_0x528386},_0x4f2ac9=await this[_0x1eecd9(0x95)][_0x1eecd9(0xdb)](_0x1eecd9(0xf4)+_0xe41eb7+'/list',{'body':_0x4d7fef});if(_0x4f2ac9['body'][_0x1eecd9(0x103)]&&_0x4f2ac9[_0x1eecd9(0x8e)][_0x1eecd9(0x103)][_0x1eecd9(0xc1)]!==0x1)throw Error(_0x4f2ac9[_0x1eecd9(0x8e)][_0x1eecd9(0x103)]['message']||_0x1eecd9(0xcf));let _0x3b5cb2=_0x528386[_0x1eecd9(0xe4)](_0x12bcb3=>{const _0x2203db=_0x1eecd9;var _0x53431b;return y((_0x53431b=_0x4f2ac9['body'][_0x2203db(0xba)])==null?void 0x0:_0x53431b[_0x12bcb3],_0x12bcb3,_0xe41eb7,_0xd60167);})[_0x1eecd9(0xf5)](Boolean);return Object[_0x1eecd9(0x93)](_0x4f2ac9[_0x1eecd9(0x8e)]['users']??{})[_0x1eecd9(0x106)](_0x4739da=>{const _0x22a096=_0x1eecd9;this[_0x22a096(0x9d)][_0x22a096(0xac)](_0x4739da);}),_0x3b5cb2;}['saveCommentToSnapshot'](_0x253c6c){const _0x15e756=_0x2620c7;var _0x25655c;return{'id':_0x253c6c['id'],'threadId':_0x253c6c[_0x15e756(0xd7)],'ref':_0x253c6c[_0x15e756(0x92)],..._0x253c6c['authorName']===void 0x0?{}:{'authorName':_0x253c6c[_0x15e756(0xb2)],'personId':_0x253c6c[_0x15e756(0xc6)]},...(_0x25655c=_0x253c6c['children'])!=null&&_0x25655c[_0x15e756(0x10b)](_0x3b98a5=>_0x3b98a5[_0x15e756(0xb2)]!==void 0x0)?{'children':_0x253c6c[_0x15e756(0xf9)][_0x15e756(0xf5)](_0x10c591=>_0x10c591[_0x15e756(0xb2)]!==void 0x0)[_0x15e756(0xe4)](_0x1c9465=>({'id':_0x1c9465['id'],'threadId':_0x1c9465[_0x15e756(0xd7)],'ref':'','parentId':_0x253c6c['id'],'personId':_0x1c9465[_0x15e756(0xc6)],'authorName':_0x1c9465[_0x15e756(0xb2)]}))}:{}};}};b=h([m(0x0,(0x0,n['Inject'])(r[_0x2620c7(0x112)])),m(0x1,(0x0,n[_0x2620c7(0x99)])(n[_0x2620c7(0xe6)])),m(0x2,(0x0,n[_0x2620c7(0x99)])(e[_0x2620c7(0x10d)]))],b);let x=class extends n[_0x2620c7(0xa8)]{constructor(_0x425773,_0x5a3446){const _0x2eee17=_0x2620c7;super(),this[_0x2eee17(0x89)]=_0x425773,this['_threadCommentDataSource']=_0x5a3446,this[_0x2eee17(0xee)]();}[_0x2620c7(0xee)](){this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};x=h([m(0x0,i[_0x2620c7(0xb3)]),m(0x1,(0x0,n['Inject'])(b))],x);function S(_0x4cf982){'@babel/helpers - typeof';const _0x6a69c5=_0x2620c7;return S=typeof Symbol==_0x6a69c5(0xfe)&&typeof Symbol[_0x6a69c5(0x10e)]==_0x6a69c5(0xb6)?function(_0x113a83){return typeof _0x113a83;}:function(_0x2473ce){const _0x3d0b61=_0x6a69c5;return _0x2473ce&&typeof Symbol==_0x3d0b61(0xfe)&&_0x2473ce[_0x3d0b61(0x105)]===Symbol&&_0x2473ce!==Symbol[_0x3d0b61(0x9f)]?_0x3d0b61(0xb6):typeof _0x2473ce;},S(_0x4cf982);}function C(_0x4e1ac4,_0x57cbea){const _0x28c61d=_0x2620c7;if(S(_0x4e1ac4)!=_0x28c61d(0x97)||!_0x4e1ac4)return _0x4e1ac4;var _0x115038=_0x4e1ac4[Symbol[_0x28c61d(0xe1)]];if(_0x115038!==void 0x0){var _0x163e95=_0x115038[_0x28c61d(0x8d)](_0x4e1ac4,_0x57cbea||'default');if(S(_0x163e95)!=_0x28c61d(0x97))return _0x163e95;throw TypeError(_0x28c61d(0xed));}return(_0x57cbea===_0x28c61d(0x108)?String:Number)(_0x4e1ac4);}function w(_0x3906f3){const _0x11ccad=_0x2620c7;var _0x107fe5=C(_0x3906f3,_0x11ccad(0x108));return S(_0x107fe5)==_0x11ccad(0xb6)?_0x107fe5:_0x107fe5+'';}function T(_0x1e0b0c,_0x2900ca,_0x58373a){const _0x1a4325=_0x2620c7;return(_0x2900ca=w(_0x2900ca))in _0x1e0b0c?Object[_0x1a4325(0x96)](_0x1e0b0c,_0x2900ca,{'value':_0x58373a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1e0b0c[_0x2900ca]=_0x58373a,_0x1e0b0c;}let E=class extends n['Plugin']{constructor(_0xf3a412=u,_0xe4bfa0,_0x24f964){const _0x21bae5=_0x2620c7;super(),this[_0x21bae5(0xf8)]=_0xf3a412,this['_injector']=_0xe4bfa0,this[_0x21bae5(0xaa)]=_0x24f964;let {..._0x29229a}=(0x0,n[_0x21bae5(0xfc)])({},u,this['_config']);this['_configService'][_0x21bae5(0xea)]('thread-comment-data-source.config',_0x29229a);}['onStarting'](){[[b],[x],[g]]['forEach'](_0x5757e0=>{const _0x4f4718=_0x6927;this[_0x4f4718(0xf0)]['add'](_0x5757e0);});}['onReady'](){const _0x377637=_0x2620c7;this['_injector'][_0x377637(0xd3)](x),this[_0x377637(0xf0)][_0x377637(0xd3)](g);}};T(E,_0x2620c7(0xf7),_0x2620c7(0xb1)),T(E,_0x2620c7(0xa5),c),T(E,'version',l),E=h([(0x0,n[_0x2620c7(0xfd)])(t[_0x2620c7(0xaf)],r['UniverNetworkPlugin'],i[_0x2620c7(0x8c)],a[_0x2620c7(0xef)],e['UniverCollaborationClientPlugin']),m(0x1,(0x0,n[_0x2620c7(0x99)])(n[_0x2620c7(0x101)])),m(0x2,n[_0x2620c7(0x90)])],E),Object['defineProperty'](exports,'UniverThreadCommentDataSourcePlugin',{'enumerable':!0x0,'get':function(){return E;}});
|
|
1
|
+
const _0x300a15=_0x4584;(function(_0x594c90,_0x37645d){const _0x4bbc14=_0x4584,_0x441159=_0x594c90();while(!![]){try{const _0xbb4673=-parseInt(_0x4bbc14(0x1e7))/0x1*(parseInt(_0x4bbc14(0x22e))/0x2)+parseInt(_0x4bbc14(0x1de))/0x3*(-parseInt(_0x4bbc14(0x20d))/0x4)+parseInt(_0x4bbc14(0x224))/0x5+parseInt(_0x4bbc14(0x223))/0x6+parseInt(_0x4bbc14(0x1fc))/0x7*(parseInt(_0x4bbc14(0x1b3))/0x8)+parseInt(_0x4bbc14(0x20a))/0x9*(parseInt(_0x4bbc14(0x1c0))/0xa)+parseInt(_0x4bbc14(0x1da))/0xb*(-parseInt(_0x4bbc14(0x1ce))/0xc);if(_0xbb4673===_0x37645d)break;else _0x441159['push'](_0x441159['shift']());}catch(_0x180a2d){_0x441159['push'](_0x441159['shift']());}}}(_0x1a4f,0x52673),Object['defineProperty'](exports,Symbol[_0x300a15(0x1cc)],{'value':_0x300a15(0x1ab)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs-pro/license'),n=require('@univerjs/core'),r=require('@univerjs/network'),i=require('@univerjs/thread-comment'),a=require('@univerjs/thread-comment-ui'),o=require('@univerjs/protocol'),s=require('rxjs');var c=_0x300a15(0x21e),l='1.0.4';const u={},d=_0x372f12=>(0x0,n[_0x300a15(0x1d6)])(new Date(+_0x372f12))[_0x300a15(0x211)](_0x300a15(0x1b8));function f(_0xc9c46){const _0x376750=_0x300a15;if(!_0xc9c46)return null;try{let _0x5d2b32=JSON[_0x376750(0x1df)](_0xc9c46);return(0x0,i[_0x376750(0x22b)])(_0x5d2b32)?_0x5d2b32:null;}catch{return null;}}const p=async(_0xc6bf67,_0x55b6fe)=>{const _0x316761=_0x300a15;let _0x241657=_0xc6bf67[_0x316761(0x1bb)](n[_0x316761(0x1a6)]),_0x495e1d=_0xc6bf67[_0x316761(0x1bb)](r[_0x316761(0x1e8)]);_0x55b6fe[_0x316761(0x1b2)](_0x1aae87=>{const _0x3c7bcc=_0x316761;_0x241657['getUser'](_0x1aae87)&&_0x55b6fe[_0x3c7bcc(0x19d)](_0x1aae87);}),_0x55b6fe[_0x316761(0x220)]&&(await _0x495e1d[_0x316761(0x1bb)](_0x316761(0x1a0),{'params':{'userIDs':[..._0x55b6fe]}}))[_0x316761(0x1a9)]['users'][_0x316761(0x1b2)](_0x2aab41=>{const _0x36d268=_0x316761;_0x2aab41&&_0x241657[_0x36d268(0x1dc)](_0x2aab41);});};function m(_0x9bb379,_0x4eb5e7){return function(_0x5a515a,_0x1e9283){_0x4eb5e7(_0x5a515a,_0x1e9283,_0x9bb379);};}function h(_0x31c06d,_0x2388f7,_0x3eef69,_0x2102d3){const _0x475c78=_0x300a15;var _0x2535dd=arguments[_0x475c78(0x1c4)],_0x106375=_0x2535dd<0x3?_0x2388f7:_0x2102d3===null?_0x2102d3=Object['getOwnPropertyDescriptor'](_0x2388f7,_0x3eef69):_0x2102d3,_0x1e99d1;if(typeof Reflect=='object'&&typeof Reflect['decorate']==_0x475c78(0x200))_0x106375=Reflect[_0x475c78(0x22c)](_0x31c06d,_0x2388f7,_0x3eef69,_0x2102d3);else{for(var _0x33ccdb=_0x31c06d[_0x475c78(0x1c4)]-0x1;_0x33ccdb>=0x0;_0x33ccdb--)(_0x1e99d1=_0x31c06d[_0x33ccdb])&&(_0x106375=(_0x2535dd<0x3?_0x1e99d1(_0x106375):_0x2535dd>0x3?_0x1e99d1(_0x2388f7,_0x3eef69,_0x106375):_0x1e99d1(_0x2388f7,_0x3eef69))||_0x106375);}return _0x2535dd>0x3&&_0x106375&&Object[_0x475c78(0x1f6)](_0x2388f7,_0x3eef69,_0x106375),_0x106375;}let g=class extends n[_0x300a15(0x21f)]{constructor(_0xb0e962,_0x36680f,_0x3918ae,_0x1a7bea){const _0x20212a=_0x300a15;super(),this[_0x20212a(0x1f3)]=_0xb0e962,this['_threadCommentModel']=_0x36680f,this[_0x20212a(0x1aa)]=_0x3918ae,this[_0x20212a(0x1b5)]=_0x1a7bea,this[_0x20212a(0x225)](),this[_0x20212a(0x1c9)]();}[_0x300a15(0x1c9)](){const _0x25c659=_0x300a15;this[_0x25c659(0x1d5)](this[_0x25c659(0x202)][_0x25c659(0x1dd)][_0x25c659(0x1fd)]((0x0,s[_0x25c659(0x1ed)])(0x10))[_0x25c659(0x1e1)](_0x4a5da8=>{const _0x55a4c9=_0x25c659;let _0x4257ce=new Set();_0x4a5da8[_0x55a4c9(0x1b2)](_0x3b523c=>{const _0x560a69=_0x55a4c9;switch(_0x3b523c[_0x560a69(0x1cf)]){case _0x560a69(0x1ef):{let _0x438fb0=_0x3b523c[_0x560a69(0x1f9)][_0x560a69(0x1b1)];_0x4257ce[_0x560a69(0x1ef)](_0x438fb0);break;}}}),p(this[_0x55a4c9(0x1b5)],_0x4257ce);}));}[_0x300a15(0x1a3)](_0x149289,_0x530d2d,_0x1274f8){const _0x1349f1=_0x300a15;let _0x432bf8=this[_0x1349f1(0x202)][_0x1349f1(0x1f4)](_0x149289,_0x530d2d,_0x1274f8);_0x432bf8&&(_0x432bf8[_0x1349f1(0x1e0)]?this[_0x1349f1(0x202)]['deleteComment'](_0x149289,_0x530d2d,_0x1274f8):this['_threadCommentModel'][_0x1349f1(0x22a)](_0x149289,_0x530d2d,_0x432bf8[_0x1349f1(0x20b)]));}[_0x300a15(0x1ea)](_0x3378f1,_0x4f9f75,_0xffb7b1,_0x5c8223){const _0x24718d=_0x300a15;(_0x5c8223===o[_0x24718d(0x1ee)][_0x24718d(0x1d4)]||_0x5c8223===o['CommentSolvedStatus'][_0x24718d(0x216)])&&this['_threadCommentModel']['resolveComment'](_0x3378f1,_0x4f9f75,_0xffb7b1,_0x5c8223===o[_0x24718d(0x1ee)][_0x24718d(0x1d4)]);}[_0x300a15(0x225)](){const _0x394b71=_0x300a15;this[_0x394b71(0x1d5)](this[_0x394b71(0x1f3)]['commentUpdate$'][_0x394b71(0x1e1)](_0x22c74b=>{const _0x1c15df=_0x394b71;var _0x7fcada;let _0x465229=(_0x7fcada=this[_0x1c15df(0x202)][_0x1c15df(0x1fb)](_0x22c74b[_0x1c15df(0x1ba)])[_0x1c15df(0x1c1)](_0x545ea1=>_0x545ea1[_0x1c15df(0x20b)]===_0x22c74b[_0x1c15df(0x20b)]))==null?void 0x0:_0x7fcada[_0x1c15df(0x1a2)];if(!_0x465229)return;let {unitId:_0x3f14c7,subUnitId:_0x5d88ff}=_0x465229;switch(_0x22c74b[_0x1c15df(0x1c5)]&&this[_0x1c15df(0x1aa)][_0x1c15df(0x1dc)](_0x22c74b['user']),_0x22c74b[_0x1c15df(0x1cf)]){case o[_0x1c15df(0x217)][_0x1c15df(0x213)]:{var _0xc60612;let _0x27794d=f(_0x22c74b[_0x1c15df(0x1a5)]);if(!_0x22c74b[_0x1c15df(0x1e3)]||!_0x22c74b['createTimestamp']||!_0x27794d)return;this[_0x1c15df(0x202)][_0x1c15df(0x21d)](_0x3f14c7,_0x5d88ff,{'unitId':_0x3f14c7,'subUnitId':_0x5d88ff,'ref':'','id':_0x22c74b[_0x1c15df(0x1e3)],'dT':d(+_0x22c74b[_0x1c15df(0x1a8)]),'threadId':_0x22c74b[_0x1c15df(0x20b)],'personId':((_0xc60612=_0x22c74b[_0x1c15df(0x1c5)])==null?void 0x0:_0xc60612[_0x1c15df(0x215)])??_0x22c74b[_0x1c15df(0x1be)],'text':_0x27794d,'parentId':_0x465229['id']});break;}case o[_0x1c15df(0x217)][_0x1c15df(0x1b0)]:if(!_0x22c74b[_0x1c15df(0x1e3)]){this[_0x1c15df(0x202)][_0x1c15df(0x22a)](_0x3f14c7,_0x5d88ff,_0x465229[_0x1c15df(0x20b)]);break;}this[_0x1c15df(0x1a3)](_0x3f14c7,_0x5d88ff,_0x22c74b[_0x1c15df(0x1e3)]);break;case o[_0x1c15df(0x217)][_0x1c15df(0x20e)]:{let _0x3cd0e5=f(_0x22c74b[_0x1c15df(0x1a5)]);if(!_0x22c74b['replyId']||!_0x3cd0e5)return;this[_0x1c15df(0x202)][_0x1c15df(0x221)](_0x3f14c7,_0x5d88ff,{'commentId':_0x22c74b['replyId'],'text':_0x3cd0e5});break;}case o[_0x1c15df(0x217)][_0x1c15df(0x1fe)]:this[_0x1c15df(0x1ea)](_0x3f14c7,_0x5d88ff,_0x465229['id'],_0x22c74b[_0x1c15df(0x1e4)]);}}));}};g=h([m(0x0,(0x0,n['Inject'])(e[_0x300a15(0x19c)])),m(0x1,(0x0,n[_0x300a15(0x1d8)])(i[_0x300a15(0x226)])),m(0x2,(0x0,n[_0x300a15(0x1d8)])(n['UserManagerService'])),m(0x3,(0x0,n[_0x300a15(0x1d8)])(n[_0x300a15(0x19b)]))],g);function _(_0x1f192a,_0x493fd5){const _0x17eb1a=_0x300a15;let _0x7dc00d=Number(_0x1f192a==null?void 0x0:_0x1f192a[_0x17eb1a(0x1a8)]);return!!(_0x1f192a&&_0x1f192a[_0x17eb1a(0x1e3)]&&_0x1f192a[_0x17eb1a(0x20b)]===_0x493fd5&&_0x1f192a[_0x17eb1a(0x1be)]&&Number[_0x17eb1a(0x20f)](_0x7dc00d)&&_0x7dc00d>0x0);}function v(_0x3a55e2,_0x233b19){const _0x50cda8=_0x300a15;let _0x4bd115=_0x3a55e2['replies'][0x0];if(!_0x3a55e2[_0x50cda8(0x20b)]||!_(_0x4bd115,_0x3a55e2[_0x50cda8(0x20b)]))throw Error(_0x50cda8(0x1d9));return{..._0x233b19,'id':_0x4bd115[_0x50cda8(0x1e3)],'resolved':_0x3a55e2[_0x50cda8(0x1e4)]===0x1,'dT':d(_0x4bd115[_0x50cda8(0x1a8)]),'personId':_0x4bd115[_0x50cda8(0x1be)],'threadId':_0x4bd115[_0x50cda8(0x20b)]};}function _0x1a4f(){const _0x43f852=['_httpService','_threadCommentModel','listComments','stringify','comment','filter','CollaborationSessionService','/universer-api/comment/unit/','iterator','22941APktXs','threadId','/add','128sDMads','Edit','isFinite','string','format','call','Reply','message','userID','OpenOrReOpen','CommentUpdateEventType','users','getMemberID','_initDataSource','_config','error','addComment','@univerjs-pro/thread-comment-datasource','Disposable','size','updateComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3477384AhhsWj','1689165CwWNYN','_init','ThreadCommentModel','default','_sessionService','/solved','deleteThread','isThreadCommentDocumentBody','decorate','has','946hnPPZT','UniverCollaborationClientPlugin','Injector','CommentService','delete','symbol','rangeId','/universer-api/user/list','customRanges','root','_deleteComment','_threadCommentDataSource','content','UserManagerService','reply','createTimestamp','body','_userService','Module','version','constructor','resolved','_configService','Delete','personId','forEach','3690208JMKhhm','Plugin','_injector','DependentOn','values','YYYY/MM/DD\x20HH:mm','onReady','unitId','get','/reply','map','userId','rangeType','410XoAmSP','find','toPrimitive','saveCommentToSnapshot','length','user','replies','/delete','dataSource','_initUserSync','resolveComment','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20comment','toStringTag','CustomRangeType','399864tOuxPU','type','_threadCommentDataSourceService','IThreadCommentDataSourceService','authorName','COMMENT','Solved','disposeWithMe','dateKit','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20reply','Inject','Comment\x20service\x20returned\x20an\x20invalid\x20thread','22OMIzwZ','object','addUser','commentUpdate$','41604Hbuaok','parse','parentId','subscribe','thread-comment-data-source.config','replyId','solved','UniverThreadCommentPlugin','code','1343eXaUHq','HTTPService','slice','_resolveComment','packageName','comments','bufferTime','CommentSolvedStatus','add','setConfig','pluginName','post','_commentService','getComment','ref','defineProperty','deleteComment','children','payload','UniverNetworkPlugin','getUnit','7ghgWpN','pipe','Solve','syncUpdateMutationToColla','function'];_0x1a4f=function(){return _0x43f852;};return _0x1a4f();}function y(_0x1f0218,_0x40f8d0,_0x3467ec,_0x21c91e){const _0x167b20=_0x300a15;if((_0x1f0218==null?void 0x0:_0x1f0218['threadId'])===_0x40f8d0&&_0x1f0218['replies'][_0x167b20(0x1c4)]>0x0){let _0x1826ce=(_0x532994,_0x2c2dda)=>{const _0x1398f5=_0x167b20;if(!_(_0x532994,_0x40f8d0))return null;let _0x4ca297=f(_0x532994[_0x1398f5(0x1a5)]);return _0x4ca297?{'id':_0x532994[_0x1398f5(0x1e3)],'threadId':_0x532994['threadId'],'dT':d(_0x532994[_0x1398f5(0x1a8)]),'personId':_0x532994[_0x1398f5(0x1be)],'resolved':_0x1f0218[_0x1398f5(0x1e4)]===o[_0x1398f5(0x1ee)]['Solved'],'unitId':_0x3467ec,'subUnitId':_0x21c91e,'text':_0x4ca297,'parentId':_0x2c2dda}:null;},_0x4a4872=_0x1826ce(_0x1f0218[_0x167b20(0x1c6)][0x0]);if(!_0x4a4872)return null;let _0x4553cf=new Set([_0x4a4872['id']]),_0x3c9eb6=_0x1f0218['replies'][_0x167b20(0x1e9)](0x1)['flatMap'](_0x6e303d=>{const _0x251f5a=_0x167b20;let _0x1fdfb9=_0x1826ce(_0x6e303d,_0x4a4872['id']);return!_0x1fdfb9||_0x4553cf[_0x251f5a(0x22d)](_0x1fdfb9['id'])?[]:(_0x4553cf[_0x251f5a(0x1ef)](_0x1fdfb9['id']),[_0x1fdfb9]);});return{..._0x4a4872,'children':_0x3c9eb6};}return null;}let b=class{constructor(_0x505a57,_0x5f436f,_0x7f2205){const _0x2ec605=_0x300a15;this['_httpService']=_0x505a57,this[_0x2ec605(0x1aa)]=_0x5f436f,this[_0x2ec605(0x228)]=_0x7f2205;}async['addComment'](_0x21d58b){const _0x11168b=_0x300a15;var _0x550deb;let {parentId:_0x8e0424,unitId:_0x4b0bd7,text:_0x312176,threadId:_0x4bb667}=_0x21d58b,_0x47fbbf=((_0x550deb=_0x312176[_0x11168b(0x1a1)])==null?void 0x0:_0x550deb[_0x11168b(0x206)](_0x511fa=>_0x511fa[_0x11168b(0x1bf)]===n['CustomRangeType'][_0x11168b(0x1d3)])[_0x11168b(0x1bd)](_0x4d4bd1=>_0x4d4bd1[_0x11168b(0x19f)]))??[],_0x5621f3=JSON[_0x11168b(0x204)](_0x312176),_0x163166=(await this[_0x11168b(0x228)]['requireSession'](_0x4b0bd7))['getMemberID']();if(_0x8e0424){let _0xd92387={'memberId':_0x163166,'unitId':_0x4b0bd7,'content':_0x5621f3,'mention':_0x47fbbf,'threadId':_0x4bb667},_0x2af17c=await this[_0x11168b(0x201)]['post'](_0x11168b(0x208)+_0x4b0bd7+_0x11168b(0x1bc),{'body':_0xd92387}),_0x1b5301=_0x2af17c[_0x11168b(0x1a9)][_0x11168b(0x1a7)];if(_0x2af17c[_0x11168b(0x1a9)][_0x11168b(0x21c)]&&_0x2af17c['body'][_0x11168b(0x21c)][_0x11168b(0x1e6)]!==0x1||!_(_0x1b5301,_0x4bb667)){var _0x11a230;throw Error(((_0x11a230=_0x2af17c[_0x11168b(0x1a9)][_0x11168b(0x21c)])==null?void 0x0:_0x11a230['message'])??_0x11168b(0x1d7));}return{..._0x21d58b,'id':_0x1b5301['replyId'],'dT':(0x0,n['dateKit'])(+_0x1b5301[_0x11168b(0x1a8)])[_0x11168b(0x211)](_0x11168b(0x1b8)),'personId':_0x1b5301['userId']};}{let _0x3dbf9a={'memberId':_0x163166,'unitId':_0x4b0bd7,'content':_0x5621f3,'mention':_0x47fbbf},_0x3033eb=await this[_0x11168b(0x201)][_0x11168b(0x1f2)](_0x11168b(0x208)+_0x4b0bd7+_0x11168b(0x20c),{'body':_0x3dbf9a});if(_0x3033eb[_0x11168b(0x1a9)]['error']&&_0x3033eb[_0x11168b(0x1a9)][_0x11168b(0x21c)][_0x11168b(0x1e6)]!==0x1||!_0x3033eb[_0x11168b(0x1a9)][_0x11168b(0x205)]){var _0x56b15e;throw Error(((_0x56b15e=_0x3033eb[_0x11168b(0x1a9)][_0x11168b(0x21c)])==null?void 0x0:_0x56b15e[_0x11168b(0x214)])??_0x11168b(0x1cb));}return v(_0x3033eb[_0x11168b(0x1a9)][_0x11168b(0x205)],_0x21d58b);}}async[_0x300a15(0x221)](_0x2bb50d){const _0x3d76a5=_0x300a15;var _0x5ac90d;let {text:_0x2da7e7,unitId:_0x330157}=_0x2bb50d,_0x302fa5=((_0x5ac90d=_0x2da7e7['customRanges'])==null?void 0x0:_0x5ac90d[_0x3d76a5(0x206)](_0x27f5c5=>_0x27f5c5['rangeType']===n[_0x3d76a5(0x1cd)][_0x3d76a5(0x1d3)])[_0x3d76a5(0x1bd)](_0x23970c=>_0x23970c['rangeId']))??[],_0x51e9d7=JSON['stringify'](_0x2da7e7),_0xb0db41=_0x2bb50d['threadId'],_0x17a89e=_0x2bb50d['id'],_0x3bae27={'memberId':(await this[_0x3d76a5(0x228)]['requireSession'](_0x330157))[_0x3d76a5(0x219)](),'unitId':_0x330157,'threadId':_0xb0db41,'mention':_0x302fa5,'content':_0x51e9d7,'replyId':_0x17a89e},_0x1c3e41=await this['_httpService']['post'](_0x3d76a5(0x208)+_0x330157+'/edit',{'body':_0x3bae27});return!_0x1c3e41[_0x3d76a5(0x1a9)][_0x3d76a5(0x21c)]||_0x1c3e41[_0x3d76a5(0x1a9)][_0x3d76a5(0x21c)][_0x3d76a5(0x1e6)]===0x1;}async[_0x300a15(0x1ca)](_0x4b06d7){const _0x5cdefd=_0x300a15;let {unitId:_0xee8e41}=_0x4b06d7,_0x310906=_0x4b06d7[_0x5cdefd(0x20b)],_0x4154e4={'memberId':(await this[_0x5cdefd(0x228)]['requireSession'](_0xee8e41))[_0x5cdefd(0x219)](),'unitId':_0xee8e41,'threadId':_0x310906,'solved':_0x4b06d7[_0x5cdefd(0x1ae)]?o[_0x5cdefd(0x1ee)][_0x5cdefd(0x1d4)]:o[_0x5cdefd(0x1ee)][_0x5cdefd(0x216)]},_0x1de27f=await this[_0x5cdefd(0x201)][_0x5cdefd(0x1f2)]('/universer-api/comment/unit/'+_0xee8e41+_0x5cdefd(0x229),{'body':_0x4154e4});return!_0x1de27f[_0x5cdefd(0x1a9)][_0x5cdefd(0x21c)]||_0x1de27f[_0x5cdefd(0x1a9)][_0x5cdefd(0x21c)][_0x5cdefd(0x1e6)]===0x1;}[_0x300a15(0x1f7)](_0x1f24db,_0x436f4b,_0x4509e8,_0x3ce761){return this['_deleteComment'](_0x1f24db,_0x4509e8,_0x3ce761);}[_0x300a15(0x22a)](_0x50c632,_0x28caca,_0x8d2d8b){const _0x3f7714=_0x300a15;return this[_0x3f7714(0x1a3)](_0x50c632,_0x8d2d8b);}async[_0x300a15(0x1a3)](_0x20cc4c,_0x5d5eca,_0x3f07ed){const _0x135a46=_0x300a15;let _0x58504c={'memberId':(await this[_0x135a46(0x228)]['requireSession'](_0x20cc4c))[_0x135a46(0x219)](),'threadId':_0x5d5eca,'replyId':_0x3f07ed,'unitId':_0x20cc4c},_0x10e739=await this[_0x135a46(0x201)][_0x135a46(0x1f2)]('/universer-api/comment/unit/'+_0x20cc4c+_0x135a46(0x1c7),{'body':_0x58504c});return!_0x10e739[_0x135a46(0x1a9)][_0x135a46(0x21c)]||_0x10e739[_0x135a46(0x1a9)][_0x135a46(0x21c)][_0x135a46(0x1e6)]===0x1;}async[_0x300a15(0x203)](_0x15d041,_0x66f9a7,_0x2fc7e1){const _0x1737ec=_0x300a15;let _0x50bcc8={'unitId':_0x15d041,'threadId':_0x2fc7e1},_0x343457=await this[_0x1737ec(0x201)][_0x1737ec(0x1f2)](_0x1737ec(0x208)+_0x15d041+'/list',{'body':_0x50bcc8});if(_0x343457[_0x1737ec(0x1a9)][_0x1737ec(0x21c)]&&_0x343457[_0x1737ec(0x1a9)][_0x1737ec(0x21c)]['code']!==0x1)throw Error(_0x343457[_0x1737ec(0x1a9)]['error']['message']||'Comment\x20service\x20failed\x20to\x20list\x20comments');let _0x1385d7=_0x2fc7e1['map'](_0x4c15fe=>{const _0x379888=_0x1737ec;var _0x4ebe3a;return y((_0x4ebe3a=_0x343457[_0x379888(0x1a9)][_0x379888(0x1ec)])==null?void 0x0:_0x4ebe3a[_0x4c15fe],_0x4c15fe,_0x15d041,_0x66f9a7);})[_0x1737ec(0x206)](Boolean);return Object[_0x1737ec(0x1b7)](_0x343457[_0x1737ec(0x1a9)][_0x1737ec(0x218)]??{})[_0x1737ec(0x1b2)](_0x33d622=>{const _0x202433=_0x1737ec;this[_0x202433(0x1aa)][_0x202433(0x1dc)](_0x33d622);}),_0x1385d7;}[_0x300a15(0x1c3)](_0x2732dd){const _0x29964c=_0x300a15;var _0x165bb1;return{'id':_0x2732dd['id'],'threadId':_0x2732dd[_0x29964c(0x20b)],'ref':_0x2732dd[_0x29964c(0x1f5)],..._0x2732dd[_0x29964c(0x1d2)]===void 0x0?{}:{'authorName':_0x2732dd['authorName'],'personId':_0x2732dd[_0x29964c(0x1b1)]},...(_0x165bb1=_0x2732dd[_0x29964c(0x1f8)])!=null&&_0x165bb1['some'](_0x5c7fe9=>_0x5c7fe9['authorName']!==void 0x0)?{'children':_0x2732dd[_0x29964c(0x1f8)][_0x29964c(0x206)](_0x428123=>_0x428123[_0x29964c(0x1d2)]!==void 0x0)[_0x29964c(0x1bd)](_0xe647a3=>({'id':_0xe647a3['id'],'threadId':_0xe647a3[_0x29964c(0x20b)],'ref':'','parentId':_0x2732dd['id'],'personId':_0xe647a3['personId'],'authorName':_0xe647a3[_0x29964c(0x1d2)]}))}:{}};}};b=h([m(0x0,(0x0,n[_0x300a15(0x1d8)])(r[_0x300a15(0x1e8)])),m(0x1,(0x0,n['Inject'])(n[_0x300a15(0x1a6)])),m(0x2,(0x0,n[_0x300a15(0x1d8)])(e[_0x300a15(0x207)]))],b);let x=class extends n[_0x300a15(0x21f)]{constructor(_0x404835,_0xb45680){const _0x5bf1b8=_0x300a15;super(),this['_threadCommentDataSourceService']=_0x404835,this['_threadCommentDataSource']=_0xb45680,this[_0x5bf1b8(0x21a)]();}[_0x300a15(0x21a)](){const _0x1685fd=_0x300a15;this['_threadCommentDataSourceService'][_0x1685fd(0x1c8)]=this[_0x1685fd(0x1a4)],this[_0x1685fd(0x1d0)][_0x1685fd(0x1ff)]=!0x1;}};x=h([m(0x0,i[_0x300a15(0x1d1)]),m(0x1,(0x0,n[_0x300a15(0x1d8)])(b))],x);function _0x4584(_0x4100b0,_0x19929f){_0x4100b0=_0x4100b0-0x19a;const _0x1a4f83=_0x1a4f();let _0x45840d=_0x1a4f83[_0x4100b0];return _0x45840d;}function S(_0x1acd01){'@babel/helpers - typeof';const _0x524860=_0x300a15;return S=typeof Symbol==_0x524860(0x200)&&typeof Symbol[_0x524860(0x209)]==_0x524860(0x19e)?function(_0x33f957){return typeof _0x33f957;}:function(_0x3f7a2e){const _0x192507=_0x524860;return _0x3f7a2e&&typeof Symbol==_0x192507(0x200)&&_0x3f7a2e[_0x192507(0x1ad)]===Symbol&&_0x3f7a2e!==Symbol['prototype']?_0x192507(0x19e):typeof _0x3f7a2e;},S(_0x1acd01);}function C(_0x3a270c,_0x401f25){const _0x36b108=_0x300a15;if(S(_0x3a270c)!=_0x36b108(0x1db)||!_0x3a270c)return _0x3a270c;var _0x17c8b2=_0x3a270c[Symbol[_0x36b108(0x1c2)]];if(_0x17c8b2!==void 0x0){var _0x255e7b=_0x17c8b2[_0x36b108(0x212)](_0x3a270c,_0x401f25||_0x36b108(0x227));if(S(_0x255e7b)!=_0x36b108(0x1db))return _0x255e7b;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x401f25==='string'?String:Number)(_0x3a270c);}function w(_0x322b11){const _0x2e7b1b=_0x300a15;var _0x1b96a4=C(_0x322b11,_0x2e7b1b(0x210));return S(_0x1b96a4)==_0x2e7b1b(0x19e)?_0x1b96a4:_0x1b96a4+'';}function T(_0x1c5b23,_0x5e4e07,_0xae6fef){const _0x29c9d1=_0x300a15;return(_0x5e4e07=w(_0x5e4e07))in _0x1c5b23?Object[_0x29c9d1(0x1f6)](_0x1c5b23,_0x5e4e07,{'value':_0xae6fef,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1c5b23[_0x5e4e07]=_0xae6fef,_0x1c5b23;}let E=class extends n[_0x300a15(0x1b4)]{constructor(_0xb4d2f0=u,_0x5d8e22,_0x30e11b){const _0x12f418=_0x300a15;super(),this[_0x12f418(0x21b)]=_0xb4d2f0,this[_0x12f418(0x1b5)]=_0x5d8e22,this['_configService']=_0x30e11b;let {..._0xfcd1af}=(0x0,n['merge'])({},u,this[_0x12f418(0x21b)]);this[_0x12f418(0x1af)][_0x12f418(0x1f0)](_0x12f418(0x1e2),_0xfcd1af);}['onStarting'](){const _0x34724b=_0x300a15;[[b],[x],[g]][_0x34724b(0x1b2)](_0x581f2c=>{const _0x4265e6=_0x34724b;this[_0x4265e6(0x1b5)][_0x4265e6(0x1ef)](_0x581f2c);});}[_0x300a15(0x1b9)](){const _0x4187b7=_0x300a15;this[_0x4187b7(0x1b5)][_0x4187b7(0x1bb)](x),this[_0x4187b7(0x1b5)]['get'](g);}};T(E,_0x300a15(0x1f1),_0x300a15(0x222)),T(E,_0x300a15(0x1eb),c),T(E,_0x300a15(0x1ac),l),E=h([(0x0,n[_0x300a15(0x1b6)])(t['UniverLicensePlugin'],r[_0x300a15(0x1fa)],i[_0x300a15(0x1e5)],a['UniverThreadCommentUIPlugin'],e[_0x300a15(0x19a)]),m(0x1,(0x0,n[_0x300a15(0x1d8)])(n[_0x300a15(0x19b)])),m(0x2,n['IConfigService'])],E),Object[_0x300a15(0x1f6)](exports,'UniverThreadCommentDataSourcePlugin',{'enumerable':!0x0,'get':function(){return E;}});
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4ae6b7=_0x27a2;(function(_0x176a97,_0x5beb4f){const _0x2108b5=_0x27a2,_0xfe6f5e=_0x176a97();while(!![]){try{const _0x49bcd5=-parseInt(_0x2108b5(0x1c9))/0x1*(parseInt(_0x2108b5(0x1eb))/0x2)+-parseInt(_0x2108b5(0x1df))/0x3+parseInt(_0x2108b5(0x17e))/0x4*(-parseInt(_0x2108b5(0x19c))/0x5)+-parseInt(_0x2108b5(0x1ab))/0x6*(-parseInt(_0x2108b5(0x194))/0x7)+-parseInt(_0x2108b5(0x1de))/0x8+parseInt(_0x2108b5(0x18d))/0x9+parseInt(_0x2108b5(0x1b9))/0xa;if(_0x49bcd5===_0x5beb4f)break;else _0xfe6f5e['push'](_0xfe6f5e['shift']());}catch(_0x258df9){_0xfe6f5e['push'](_0xfe6f5e['shift']());}}}(_0x23bc,0xeed90));import{CollaborationSessionService as _0x1ba63e,CommentService as _0xcb56ab,UniverCollaborationClientPlugin as _0x5ba561}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f85ee}from'@univerjs-pro/license';import{CustomRangeType as _0x51df51,DependentOn as _0x44bca5,Disposable as _0xb3479f,IConfigService as _0x328c51,Inject as _0x353afe,Injector as _0x5f39b2,Plugin as _0x39abfb,UserManagerService as _0x31a018,dateKit as _0x5309d8,merge as _0x59db29}from'@univerjs/core';import{HTTPService as _0xfe2d3,UniverNetworkPlugin as _0xcb55bf}from'@univerjs/network';import{IThreadCommentDataSourceService as _0x5bb112,ThreadCommentModel as _0xfbbf43,UniverThreadCommentPlugin as _0x537693,isThreadCommentDocumentBody as _0x3d0213}from'@univerjs/thread-comment';import{UniverThreadCommentUIPlugin as _0x25489d}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0xc9774b,CommentUpdateEventType as _0x2c3bc7}from'@univerjs/protocol';function _0x27a2(_0x88db0,_0x711720){_0x88db0=_0x88db0-0x17c;const _0x23bc4b=_0x23bc();let _0x27a234=_0x23bc4b[_0x88db0];return _0x27a234;}import{bufferTime as _0x51d9d5}from'rxjs';var w='@univerjs-pro/thread-comment-datasource',T=_0x4ae6b7(0x180);const E={},D=_0x2f529b=>_0x5309d8(new Date(+_0x2f529b))[_0x4ae6b7(0x1c7)](_0x4ae6b7(0x1aa));function O(_0xd31763){const _0xb6c163=_0x4ae6b7;if(!_0xd31763)return null;try{let _0x3a012f=JSON[_0xb6c163(0x1b3)](_0xd31763);return _0x3d0213(_0x3a012f)?_0x3a012f:null;}catch{return null;}}const k=async(_0x4fdf04,_0x457aa6)=>{const _0x3faa36=_0x4ae6b7;let _0x354e86=_0x4fdf04[_0x3faa36(0x195)](_0x31a018),_0x8263a5=_0x4fdf04[_0x3faa36(0x195)](_0xfe2d3);_0x457aa6[_0x3faa36(0x19e)](_0x39aafc=>{const _0x346b12=_0x3faa36;_0x354e86[_0x346b12(0x182)](_0x39aafc)&&_0x457aa6['delete'](_0x39aafc);}),_0x457aa6[_0x3faa36(0x197)]&&(await _0x8263a5[_0x3faa36(0x195)](_0x3faa36(0x1cb),{'params':{'userIDs':[..._0x457aa6]}}))[_0x3faa36(0x1b1)][_0x3faa36(0x1e1)][_0x3faa36(0x19e)](_0x2b4d0a=>{const _0x3cb511=_0x3faa36;_0x2b4d0a&&_0x354e86[_0x3cb511(0x192)](_0x2b4d0a);});};function A(_0x42c9af,_0x30e1e2){return function(_0x5f5c22,_0x365565){_0x30e1e2(_0x5f5c22,_0x365565,_0x42c9af);};}function j(_0x24d2f8,_0x5ec8f1,_0x495a86,_0x280683){const _0x2094c8=_0x4ae6b7;var _0x1bc6fe=arguments[_0x2094c8(0x1bc)],_0x43db9c=_0x1bc6fe<0x3?_0x5ec8f1:_0x280683===null?_0x280683=Object[_0x2094c8(0x1d7)](_0x5ec8f1,_0x495a86):_0x280683,_0x2ba19b;if(typeof Reflect=='object'&&typeof Reflect[_0x2094c8(0x1bb)]==_0x2094c8(0x1c1))_0x43db9c=Reflect[_0x2094c8(0x1bb)](_0x24d2f8,_0x5ec8f1,_0x495a86,_0x280683);else{for(var _0x2c9eff=_0x24d2f8[_0x2094c8(0x1bc)]-0x1;_0x2c9eff>=0x0;_0x2c9eff--)(_0x2ba19b=_0x24d2f8[_0x2c9eff])&&(_0x43db9c=(_0x1bc6fe<0x3?_0x2ba19b(_0x43db9c):_0x1bc6fe>0x3?_0x2ba19b(_0x5ec8f1,_0x495a86,_0x43db9c):_0x2ba19b(_0x5ec8f1,_0x495a86))||_0x43db9c);}return _0x1bc6fe>0x3&&_0x43db9c&&Object['defineProperty'](_0x5ec8f1,_0x495a86,_0x43db9c),_0x43db9c;}let M=class extends _0xb3479f{constructor(_0x21663f,_0x1b1954,_0x30df1a,_0x6c5d85){const _0x4ceece=_0x4ae6b7;super(),this[_0x4ceece(0x1d2)]=_0x21663f,this['_threadCommentModel']=_0x1b1954,this[_0x4ceece(0x189)]=_0x30df1a,this['_injector']=_0x6c5d85,this[_0x4ceece(0x1a2)](),this['_initUserSync']();}['_initUserSync'](){const _0x337c58=_0x4ae6b7;this[_0x337c58(0x196)](this[_0x337c58(0x198)][_0x337c58(0x1ee)][_0x337c58(0x1e6)](_0x51d9d5(0x10))[_0x337c58(0x1e5)](_0x445e1f=>{const _0x2dd3ab=_0x337c58;let _0xd9cde6=new Set();_0x445e1f[_0x2dd3ab(0x19e)](_0x296a11=>{const _0x5baa70=_0x2dd3ab;switch(_0x296a11[_0x5baa70(0x1b6)]){case'add':{let _0x597cfa=_0x296a11['payload']['personId'];_0xd9cde6[_0x5baa70(0x1e0)](_0x597cfa);break;}}}),k(this[_0x2dd3ab(0x17c)],_0xd9cde6);}));}[_0x4ae6b7(0x1e3)](_0xbc77fe,_0x2d96ac,_0x488958){const _0x40e8a3=_0x4ae6b7;let _0x333588=this['_threadCommentModel']['getComment'](_0xbc77fe,_0x2d96ac,_0x488958);_0x333588&&(_0x333588[_0x40e8a3(0x1b8)]?this[_0x40e8a3(0x198)][_0x40e8a3(0x1c4)](_0xbc77fe,_0x2d96ac,_0x488958):this[_0x40e8a3(0x198)][_0x40e8a3(0x1d0)](_0xbc77fe,_0x2d96ac,_0x333588[_0x40e8a3(0x1ac)]));}[_0x4ae6b7(0x1e8)](_0x56eefd,_0x277faf,_0x234cb2,_0x35ab80){const _0x2695c0=_0x4ae6b7;(_0x35ab80===_0xc9774b['Solved']||_0x35ab80===_0xc9774b[_0x2695c0(0x18a)])&&this['_threadCommentModel'][_0x2695c0(0x1a8)](_0x56eefd,_0x277faf,_0x234cb2,_0x35ab80===_0xc9774b[_0x2695c0(0x1c3)]);}['_init'](){const _0x269053=_0x4ae6b7;this[_0x269053(0x196)](this['_commentService'][_0x269053(0x1ee)][_0x269053(0x1e5)](_0x47a8d8=>{const _0x2869e6=_0x269053;var _0x4cd337;let _0x4cd254=(_0x4cd337=this['_threadCommentModel'][_0x2869e6(0x18e)](_0x47a8d8[_0x2869e6(0x1f3)])[_0x2869e6(0x1d9)](_0x4c6d07=>_0x4c6d07['threadId']===_0x47a8d8[_0x2869e6(0x1ac)]))==null?void 0x0:_0x4cd337[_0x2869e6(0x1cf)];if(!_0x4cd254)return;let {unitId:_0x573d3d,subUnitId:_0x9c1bbd}=_0x4cd254;switch(_0x47a8d8['user']&&this[_0x2869e6(0x189)][_0x2869e6(0x192)](_0x47a8d8[_0x2869e6(0x1a9)]),_0x47a8d8[_0x2869e6(0x1b6)]){case _0x2c3bc7[_0x2869e6(0x1a0)]:{var _0x58702e;let _0x30ee97=O(_0x47a8d8[_0x2869e6(0x1f2)]);if(!_0x47a8d8['replyId']||!_0x47a8d8[_0x2869e6(0x1e2)]||!_0x30ee97)return;this[_0x2869e6(0x198)][_0x2869e6(0x1c8)](_0x573d3d,_0x9c1bbd,{'unitId':_0x573d3d,'subUnitId':_0x9c1bbd,'ref':'','id':_0x47a8d8[_0x2869e6(0x1bf)],'dT':D(+_0x47a8d8[_0x2869e6(0x1e2)]),'threadId':_0x47a8d8['threadId'],'personId':((_0x58702e=_0x47a8d8[_0x2869e6(0x1a9)])==null?void 0x0:_0x58702e[_0x2869e6(0x18c)])??_0x47a8d8[_0x2869e6(0x1d5)],'text':_0x30ee97,'parentId':_0x4cd254['id']});break;}case _0x2c3bc7[_0x2869e6(0x19a)]:if(!_0x47a8d8['replyId']){this['_threadCommentModel']['deleteThread'](_0x573d3d,_0x9c1bbd,_0x4cd254[_0x2869e6(0x1ac)]);break;}this[_0x2869e6(0x1e3)](_0x573d3d,_0x9c1bbd,_0x47a8d8['replyId']);break;case _0x2c3bc7[_0x2869e6(0x1b7)]:{let _0x56b3e5=O(_0x47a8d8[_0x2869e6(0x1f2)]);if(!_0x47a8d8[_0x2869e6(0x1bf)]||!_0x56b3e5)return;this[_0x2869e6(0x198)][_0x2869e6(0x1f1)](_0x573d3d,_0x9c1bbd,{'commentId':_0x47a8d8[_0x2869e6(0x1bf)],'text':_0x56b3e5});break;}case _0x2c3bc7[_0x2869e6(0x19b)]:this['_resolveComment'](_0x573d3d,_0x9c1bbd,_0x4cd254['id'],_0x47a8d8[_0x2869e6(0x1b5)]);}}));}};M=j([A(0x0,_0x353afe(_0xcb56ab)),A(0x1,_0x353afe(_0xfbbf43)),A(0x2,_0x353afe(_0x31a018)),A(0x3,_0x353afe(_0x5f39b2))],M);function N(_0x3dde0a,_0x3ecbb8){const _0x612733=_0x4ae6b7;let _0x2ce08a=Number(_0x3dde0a==null?void 0x0:_0x3dde0a[_0x612733(0x1e2)]);return!!(_0x3dde0a&&_0x3dde0a[_0x612733(0x1bf)]&&_0x3dde0a['threadId']===_0x3ecbb8&&_0x3dde0a[_0x612733(0x1d5)]&&Number['isFinite'](_0x2ce08a)&&_0x2ce08a>0x0);}function _0x23bc(){const _0xe957e3=['413335pCwrbc','string','forEach','_threadCommentDataSource','Reply','_config','_init','getMemberID','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20comment','customRanges','listComments','children','resolveComment','user','YYYY/MM/DD\x20HH:mm','1764246MfrPVV','threadId','constructor','replies','code','message','body','requireSession','parse','packageName','solved','type','Edit','parentId','42756210kBuyQz','/reply','decorate','length','_httpService','symbol','replyId','/solved','function','_threadCommentDataSourceService','Solved','deleteComment','version','Comment\x20service\x20returned\x20an\x20invalid\x20thread','format','addComment','426025rQKxjy','Comment\x20service\x20failed\x20to\x20list\x20comments','/universer-api/user/list','map','rangeId','comments','root','deleteThread','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','reply','COMMENT','userId','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getOwnPropertyDescriptor','stringify','find','error','some','/add','_sessionService','1560736zxJPmt','2551401YYDbnG','add','users','createTimestamp','_deleteComment','has','subscribe','pipe','/edit','_resolveComment','/delete','toPrimitive','8jvPxyB','default','_configService','commentUpdate$','iterator','authorName','updateComment','content','unitId','object','_injector','pluginName','60ZpLpFJ','/list','1.0.2','/universer-api/comment/unit/','getUser','onStarting','call','defineProperty','post','onReady','filter','_userService','OpenOrReOpen','setConfig','userID','938529morAKQ','getUnit','comment','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20reply','personId','addUser','ref','14ipdsOE','get','disposeWithMe','size','_threadCommentModel','_initDataSource','Delete','Solve'];_0x23bc=function(){return _0xe957e3;};return _0x23bc();}function P(_0x50b2be,_0x6bcce){const _0x544e47=_0x4ae6b7;let _0x36181e=_0x50b2be[_0x544e47(0x1ae)][0x0];if(!_0x50b2be['threadId']||!N(_0x36181e,_0x50b2be[_0x544e47(0x1ac)]))throw Error(_0x544e47(0x1c6));return{..._0x6bcce,'id':_0x36181e[_0x544e47(0x1bf)],'resolved':_0x50b2be[_0x544e47(0x1b5)]===0x1,'dT':D(_0x36181e[_0x544e47(0x1e2)]),'personId':_0x36181e[_0x544e47(0x1d5)],'threadId':_0x36181e[_0x544e47(0x1ac)]};}function F(_0x232468,_0x3e5556,_0x4a59f8,_0x44754f){const _0x8a597d=_0x4ae6b7;if((_0x232468==null?void 0x0:_0x232468[_0x8a597d(0x1ac)])===_0x3e5556&&_0x232468[_0x8a597d(0x1ae)][_0x8a597d(0x1bc)]>0x0){let _0x556015=(_0x411a18,_0x3af55d)=>{const _0x1053c7=_0x8a597d;if(!N(_0x411a18,_0x3e5556))return null;let _0x20dd61=O(_0x411a18[_0x1053c7(0x1f2)]);return _0x20dd61?{'id':_0x411a18['replyId'],'threadId':_0x411a18[_0x1053c7(0x1ac)],'dT':D(_0x411a18['createTimestamp']),'personId':_0x411a18[_0x1053c7(0x1d5)],'resolved':_0x232468[_0x1053c7(0x1b5)]===_0xc9774b[_0x1053c7(0x1c3)],'unitId':_0x4a59f8,'subUnitId':_0x44754f,'text':_0x20dd61,'parentId':_0x3af55d}:null;},_0x9df2f5=_0x556015(_0x232468['replies'][0x0]);if(!_0x9df2f5)return null;let _0x14ecf3=new Set([_0x9df2f5['id']]),_0x28483a=_0x232468[_0x8a597d(0x1ae)]['slice'](0x1)['flatMap'](_0x251b1e=>{const _0x10ad9c=_0x8a597d;let _0x5b7067=_0x556015(_0x251b1e,_0x9df2f5['id']);return!_0x5b7067||_0x14ecf3[_0x10ad9c(0x1e4)](_0x5b7067['id'])?[]:(_0x14ecf3[_0x10ad9c(0x1e0)](_0x5b7067['id']),[_0x5b7067]);});return{..._0x9df2f5,'children':_0x28483a};}return null;}let I=class{constructor(_0x40a5ff,_0x49a5b5,_0x2fbe5e){const _0xee55d=_0x4ae6b7;this[_0xee55d(0x1bd)]=_0x40a5ff,this[_0xee55d(0x189)]=_0x49a5b5,this[_0xee55d(0x1dd)]=_0x2fbe5e;}async[_0x4ae6b7(0x1c8)](_0x44a358){const _0x31e17b=_0x4ae6b7;var _0x32a3a9;let {parentId:_0x3f1cba,unitId:_0x409ace,text:_0x59f4dc,threadId:_0x5b2421}=_0x44a358,_0x1cd995=((_0x32a3a9=_0x59f4dc[_0x31e17b(0x1a5)])==null?void 0x0:_0x32a3a9[_0x31e17b(0x188)](_0x4386d0=>_0x4386d0['rangeType']===_0x51df51[_0x31e17b(0x1d4)])[_0x31e17b(0x1cc)](_0x5f142b=>_0x5f142b[_0x31e17b(0x1cd)]))??[],_0x478e5b=JSON[_0x31e17b(0x1d8)](_0x59f4dc),_0x1c3477=(await this[_0x31e17b(0x1dd)][_0x31e17b(0x1b2)](_0x409ace))[_0x31e17b(0x1a3)]();if(_0x3f1cba){let _0x198b0a={'memberId':_0x1c3477,'unitId':_0x409ace,'content':_0x478e5b,'mention':_0x1cd995,'threadId':_0x5b2421},_0x261951=await this['_httpService'][_0x31e17b(0x186)](_0x31e17b(0x181)+_0x409ace+_0x31e17b(0x1ba),{'body':_0x198b0a}),_0x43ae8b=_0x261951[_0x31e17b(0x1b1)][_0x31e17b(0x1d3)];if(_0x261951[_0x31e17b(0x1b1)][_0x31e17b(0x1da)]&&_0x261951['body']['error'][_0x31e17b(0x1af)]!==0x1||!N(_0x43ae8b,_0x5b2421)){var _0x23df09;throw Error(((_0x23df09=_0x261951[_0x31e17b(0x1b1)][_0x31e17b(0x1da)])==null?void 0x0:_0x23df09[_0x31e17b(0x1b0)])??_0x31e17b(0x190));}return{..._0x44a358,'id':_0x43ae8b[_0x31e17b(0x1bf)],'dT':_0x5309d8(+_0x43ae8b[_0x31e17b(0x1e2)])[_0x31e17b(0x1c7)](_0x31e17b(0x1aa)),'personId':_0x43ae8b[_0x31e17b(0x1d5)]};}{let _0x2f5811={'memberId':_0x1c3477,'unitId':_0x409ace,'content':_0x478e5b,'mention':_0x1cd995},_0x1e09d3=await this[_0x31e17b(0x1bd)][_0x31e17b(0x186)](_0x31e17b(0x181)+_0x409ace+_0x31e17b(0x1dc),{'body':_0x2f5811});if(_0x1e09d3[_0x31e17b(0x1b1)][_0x31e17b(0x1da)]&&_0x1e09d3['body'][_0x31e17b(0x1da)][_0x31e17b(0x1af)]!==0x1||!_0x1e09d3['body']['comment']){var _0x2fcc4c;throw Error(((_0x2fcc4c=_0x1e09d3[_0x31e17b(0x1b1)][_0x31e17b(0x1da)])==null?void 0x0:_0x2fcc4c[_0x31e17b(0x1b0)])??_0x31e17b(0x1a4));}return P(_0x1e09d3[_0x31e17b(0x1b1)][_0x31e17b(0x18f)],_0x44a358);}}async['updateComment'](_0x2eda6f){const _0x2c5c34=_0x4ae6b7;var _0x526a42;let {text:_0x434e4d,unitId:_0xfbf8f7}=_0x2eda6f,_0x5c526b=((_0x526a42=_0x434e4d[_0x2c5c34(0x1a5)])==null?void 0x0:_0x526a42['filter'](_0x4f1689=>_0x4f1689['rangeType']===_0x51df51[_0x2c5c34(0x1d4)])['map'](_0x2e5de2=>_0x2e5de2[_0x2c5c34(0x1cd)]))??[],_0x2273c4=JSON['stringify'](_0x434e4d),_0x489415=_0x2eda6f[_0x2c5c34(0x1ac)],_0x15e890=_0x2eda6f['id'],_0x328c88={'memberId':(await this[_0x2c5c34(0x1dd)]['requireSession'](_0xfbf8f7))[_0x2c5c34(0x1a3)](),'unitId':_0xfbf8f7,'threadId':_0x489415,'mention':_0x5c526b,'content':_0x2273c4,'replyId':_0x15e890},_0x484800=await this['_httpService'][_0x2c5c34(0x186)](_0x2c5c34(0x181)+_0xfbf8f7+_0x2c5c34(0x1e7),{'body':_0x328c88});return!_0x484800['body']['error']||_0x484800[_0x2c5c34(0x1b1)][_0x2c5c34(0x1da)][_0x2c5c34(0x1af)]===0x1;}async['resolveComment'](_0x2b0840){const _0x47097e=_0x4ae6b7;let {unitId:_0x187402}=_0x2b0840,_0x492bf8=_0x2b0840['threadId'],_0xac22c2={'memberId':(await this[_0x47097e(0x1dd)][_0x47097e(0x1b2)](_0x187402))[_0x47097e(0x1a3)](),'unitId':_0x187402,'threadId':_0x492bf8,'solved':_0x2b0840['resolved']?_0xc9774b[_0x47097e(0x1c3)]:_0xc9774b['OpenOrReOpen']},_0x523f43=await this[_0x47097e(0x1bd)][_0x47097e(0x186)](_0x47097e(0x181)+_0x187402+_0x47097e(0x1c0),{'body':_0xac22c2});return!_0x523f43[_0x47097e(0x1b1)]['error']||_0x523f43['body'][_0x47097e(0x1da)][_0x47097e(0x1af)]===0x1;}[_0x4ae6b7(0x1c4)](_0x1285b8,_0x2f7b80,_0x51ca35,_0x3e6432){return this['_deleteComment'](_0x1285b8,_0x51ca35,_0x3e6432);}[_0x4ae6b7(0x1d0)](_0x20927d,_0x3be653,_0x2c4037){const _0x23c151=_0x4ae6b7;return this[_0x23c151(0x1e3)](_0x20927d,_0x2c4037);}async[_0x4ae6b7(0x1e3)](_0x222982,_0x320cd7,_0x7e14d3){const _0x142edb=_0x4ae6b7;let _0x588b4a={'memberId':(await this[_0x142edb(0x1dd)][_0x142edb(0x1b2)](_0x222982))[_0x142edb(0x1a3)](),'threadId':_0x320cd7,'replyId':_0x7e14d3,'unitId':_0x222982},_0x2db554=await this[_0x142edb(0x1bd)][_0x142edb(0x186)](_0x142edb(0x181)+_0x222982+_0x142edb(0x1e9),{'body':_0x588b4a});return!_0x2db554[_0x142edb(0x1b1)][_0x142edb(0x1da)]||_0x2db554['body']['error'][_0x142edb(0x1af)]===0x1;}async[_0x4ae6b7(0x1a6)](_0x3eee58,_0x43b3ba,_0x1b10df){const _0xaffa81=_0x4ae6b7;let _0x540ae5={'unitId':_0x3eee58,'threadId':_0x1b10df},_0x406f96=await this[_0xaffa81(0x1bd)][_0xaffa81(0x186)]('/universer-api/comment/unit/'+_0x3eee58+_0xaffa81(0x17f),{'body':_0x540ae5});if(_0x406f96[_0xaffa81(0x1b1)]['error']&&_0x406f96[_0xaffa81(0x1b1)][_0xaffa81(0x1da)][_0xaffa81(0x1af)]!==0x1)throw Error(_0x406f96[_0xaffa81(0x1b1)][_0xaffa81(0x1da)]['message']||_0xaffa81(0x1ca));let _0x3658e2=_0x1b10df[_0xaffa81(0x1cc)](_0x3ce3ff=>{const _0x5ce9d1=_0xaffa81;var _0x1ce113;return F((_0x1ce113=_0x406f96[_0x5ce9d1(0x1b1)][_0x5ce9d1(0x1ce)])==null?void 0x0:_0x1ce113[_0x3ce3ff],_0x3ce3ff,_0x3eee58,_0x43b3ba);})[_0xaffa81(0x188)](Boolean);return Object['values'](_0x406f96[_0xaffa81(0x1b1)][_0xaffa81(0x1e1)]??{})[_0xaffa81(0x19e)](_0x40a496=>{const _0x192a24=_0xaffa81;this[_0x192a24(0x189)]['addUser'](_0x40a496);}),_0x3658e2;}['saveCommentToSnapshot'](_0x4b1e39){const _0x1bca06=_0x4ae6b7;var _0x21d318;return{'id':_0x4b1e39['id'],'threadId':_0x4b1e39[_0x1bca06(0x1ac)],'ref':_0x4b1e39[_0x1bca06(0x193)],..._0x4b1e39[_0x1bca06(0x1f0)]===void 0x0?{}:{'authorName':_0x4b1e39[_0x1bca06(0x1f0)],'personId':_0x4b1e39[_0x1bca06(0x191)]},...(_0x21d318=_0x4b1e39[_0x1bca06(0x1a7)])!=null&&_0x21d318[_0x1bca06(0x1db)](_0x46449b=>_0x46449b[_0x1bca06(0x1f0)]!==void 0x0)?{'children':_0x4b1e39['children'][_0x1bca06(0x188)](_0x4d48c9=>_0x4d48c9[_0x1bca06(0x1f0)]!==void 0x0)[_0x1bca06(0x1cc)](_0x232ebd=>({'id':_0x232ebd['id'],'threadId':_0x232ebd[_0x1bca06(0x1ac)],'ref':'','parentId':_0x4b1e39['id'],'personId':_0x232ebd[_0x1bca06(0x191)],'authorName':_0x232ebd[_0x1bca06(0x1f0)]}))}:{}};}};I=j([A(0x0,_0x353afe(_0xfe2d3)),A(0x1,_0x353afe(_0x31a018)),A(0x2,_0x353afe(_0x1ba63e))],I);let L=class extends _0xb3479f{constructor(_0x19d234,_0x521f5f){const _0x490127=_0x4ae6b7;super(),this[_0x490127(0x1c2)]=_0x19d234,this[_0x490127(0x19f)]=_0x521f5f,this['_initDataSource']();}[_0x4ae6b7(0x199)](){const _0x33f342=_0x4ae6b7;this[_0x33f342(0x1c2)]['dataSource']=this[_0x33f342(0x19f)],this[_0x33f342(0x1c2)]['syncUpdateMutationToColla']=!0x1;}};L=j([A(0x0,_0x5bb112),A(0x1,_0x353afe(I))],L);function R(_0x1987b2){'@babel/helpers - typeof';const _0x30b773=_0x4ae6b7;return R=typeof Symbol==_0x30b773(0x1c1)&&typeof Symbol[_0x30b773(0x1ef)]==_0x30b773(0x1be)?function(_0x153f97){return typeof _0x153f97;}:function(_0x39b7d0){const _0x37636c=_0x30b773;return _0x39b7d0&&typeof Symbol==_0x37636c(0x1c1)&&_0x39b7d0[_0x37636c(0x1ad)]===Symbol&&_0x39b7d0!==Symbol['prototype']?_0x37636c(0x1be):typeof _0x39b7d0;},R(_0x1987b2);}function z(_0x5066a3,_0x155b46){const _0xd2103b=_0x4ae6b7;if(R(_0x5066a3)!=_0xd2103b(0x1f4)||!_0x5066a3)return _0x5066a3;var _0x15a5c2=_0x5066a3[Symbol[_0xd2103b(0x1ea)]];if(_0x15a5c2!==void 0x0){var _0x437b50=_0x15a5c2[_0xd2103b(0x184)](_0x5066a3,_0x155b46||_0xd2103b(0x1ec));if(R(_0x437b50)!='object')return _0x437b50;throw TypeError(_0xd2103b(0x1d6));}return(_0x155b46==='string'?String:Number)(_0x5066a3);}function B(_0x566f80){const _0x1815f2=_0x4ae6b7;var _0x3ca97b=z(_0x566f80,_0x1815f2(0x19d));return R(_0x3ca97b)==_0x1815f2(0x1be)?_0x3ca97b:_0x3ca97b+'';}function V(_0x4d46d2,_0x4960ff,_0x44daf2){const _0x49e2c5=_0x4ae6b7;return(_0x4960ff=B(_0x4960ff))in _0x4d46d2?Object[_0x49e2c5(0x185)](_0x4d46d2,_0x4960ff,{'value':_0x44daf2,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4d46d2[_0x4960ff]=_0x44daf2,_0x4d46d2;}let H=class extends _0x39abfb{constructor(_0x5d4984=E,_0x32e38b,_0x380d42){const _0x415f56=_0x4ae6b7;super(),this[_0x415f56(0x1a1)]=_0x5d4984,this[_0x415f56(0x17c)]=_0x32e38b,this[_0x415f56(0x1ed)]=_0x380d42;let {..._0x4aa736}=_0x59db29({},E,this[_0x415f56(0x1a1)]);this[_0x415f56(0x1ed)][_0x415f56(0x18b)]('thread-comment-data-source.config',_0x4aa736);}[_0x4ae6b7(0x183)](){const _0x275270=_0x4ae6b7;[[I],[L],[M]][_0x275270(0x19e)](_0x3925d0=>{const _0x134eae=_0x275270;this[_0x134eae(0x17c)][_0x134eae(0x1e0)](_0x3925d0);});}[_0x4ae6b7(0x187)](){const _0x3b77a1=_0x4ae6b7;this[_0x3b77a1(0x17c)]['get'](L),this[_0x3b77a1(0x17c)][_0x3b77a1(0x195)](M);}};V(H,_0x4ae6b7(0x17d),_0x4ae6b7(0x1d1)),V(H,_0x4ae6b7(0x1b4),w),V(H,_0x4ae6b7(0x1c5),T),H=j([_0x44bca5(_0x1f85ee,_0xcb55bf,_0x537693,_0x25489d,_0x5ba561),A(0x1,_0x353afe(_0x5f39b2)),A(0x2,_0x328c51)],H);export{H as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x369715=_0x5e8b;(function(_0x30a32d,_0x3af9f4){const _0x3c4cf6=_0x5e8b,_0x128a34=_0x30a32d();while(!![]){try{const _0x4ac519=parseInt(_0x3c4cf6(0x1a5))/0x1+-parseInt(_0x3c4cf6(0x190))/0x2+parseInt(_0x3c4cf6(0x1b9))/0x3+-parseInt(_0x3c4cf6(0x17e))/0x4+parseInt(_0x3c4cf6(0x168))/0x5*(-parseInt(_0x3c4cf6(0x197))/0x6)+parseInt(_0x3c4cf6(0x152))/0x7+parseInt(_0x3c4cf6(0x1ae))/0x8*(parseInt(_0x3c4cf6(0x1b8))/0x9);if(_0x4ac519===_0x3af9f4)break;else _0x128a34['push'](_0x128a34['shift']());}catch(_0x408430){_0x128a34['push'](_0x128a34['shift']());}}}(_0x151d,0x7c2d4));import{CollaborationSessionService as _0xc5af2f,CommentService as _0x32b201,UniverCollaborationClientPlugin as _0xd94099}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x169bd4}from'@univerjs-pro/license';import{CustomRangeType as _0x483613,DependentOn as _0x3bcb4e,Disposable as _0x409b78,IConfigService as _0xfcc38c,Inject as _0x2b10fb,Injector as _0x253ff8,Plugin as _0x4a3d0a,UserManagerService as _0x21b731,dateKit as _0x11dce2,merge as _0x5b00d6}from'@univerjs/core';import{HTTPService as _0x3b384d,UniverNetworkPlugin as _0x189162}from'@univerjs/network';import{IThreadCommentDataSourceService as _0x1c00be,ThreadCommentModel as _0xdd247c,UniverThreadCommentPlugin as _0x271566,isThreadCommentDocumentBody as _0xbb0e6e}from'@univerjs/thread-comment';import{UniverThreadCommentUIPlugin as _0x4f1498}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x3b920b,CommentUpdateEventType as _0x4fb788}from'@univerjs/protocol';import{bufferTime as _0x28ca2c}from'rxjs';var w=_0x369715(0x15e),T=_0x369715(0x195);const E={},D=_0xf9ad35=>_0x11dce2(new Date(+_0xf9ad35))[_0x369715(0x19f)](_0x369715(0x185));function O(_0x352fdd){if(!_0x352fdd)return null;try{let _0x184e57=JSON['parse'](_0x352fdd);return _0xbb0e6e(_0x184e57)?_0x184e57:null;}catch{return null;}}const k=async(_0x13fb17,_0x56f3c4)=>{const _0x28a5a7=_0x369715;let _0x2b1c33=_0x13fb17['get'](_0x21b731),_0x1b0b42=_0x13fb17['get'](_0x3b384d);_0x56f3c4[_0x28a5a7(0x15c)](_0x195e66=>{const _0x1c1454=_0x28a5a7;_0x2b1c33[_0x1c1454(0x184)](_0x195e66)&&_0x56f3c4[_0x1c1454(0x161)](_0x195e66);}),_0x56f3c4[_0x28a5a7(0x18b)]&&(await _0x1b0b42[_0x28a5a7(0x16c)](_0x28a5a7(0x153),{'params':{'userIDs':[..._0x56f3c4]}}))[_0x28a5a7(0x16e)]['users'][_0x28a5a7(0x15c)](_0x5b26e6=>{_0x5b26e6&&_0x2b1c33['addUser'](_0x5b26e6);});};function A(_0x4e7d9b,_0x5f038d){return function(_0x255d91,_0x3c232d){_0x5f038d(_0x255d91,_0x3c232d,_0x4e7d9b);};}function j(_0x4453c3,_0x285253,_0x43c374,_0x2edf09){const _0x9ba0f1=_0x369715;var _0x31d6fe=arguments[_0x9ba0f1(0x150)],_0x9efdfd=_0x31d6fe<0x3?_0x285253:_0x2edf09===null?_0x2edf09=Object[_0x9ba0f1(0x1bd)](_0x285253,_0x43c374):_0x2edf09,_0x3e760a;if(typeof Reflect=='object'&&typeof Reflect[_0x9ba0f1(0x183)]==_0x9ba0f1(0x175))_0x9efdfd=Reflect[_0x9ba0f1(0x183)](_0x4453c3,_0x285253,_0x43c374,_0x2edf09);else{for(var _0x1a137c=_0x4453c3['length']-0x1;_0x1a137c>=0x0;_0x1a137c--)(_0x3e760a=_0x4453c3[_0x1a137c])&&(_0x9efdfd=(_0x31d6fe<0x3?_0x3e760a(_0x9efdfd):_0x31d6fe>0x3?_0x3e760a(_0x285253,_0x43c374,_0x9efdfd):_0x3e760a(_0x285253,_0x43c374))||_0x9efdfd);}return _0x31d6fe>0x3&&_0x9efdfd&&Object[_0x9ba0f1(0x188)](_0x285253,_0x43c374,_0x9efdfd),_0x9efdfd;}let M=class extends _0x409b78{constructor(_0x31dd8f,_0x27d297,_0x429fe0,_0x2b778c){const _0x5cf674=_0x369715;super(),this[_0x5cf674(0x1a1)]=_0x31dd8f,this[_0x5cf674(0x171)]=_0x27d297,this['_userService']=_0x429fe0,this[_0x5cf674(0x1a6)]=_0x2b778c,this[_0x5cf674(0x169)](),this[_0x5cf674(0x19b)]();}[_0x369715(0x19b)](){const _0x34d9cf=_0x369715;this[_0x34d9cf(0x16d)](this['_threadCommentModel'][_0x34d9cf(0x15a)][_0x34d9cf(0x186)](_0x28ca2c(0x10))['subscribe'](_0x3a048c=>{const _0x26dc98=_0x34d9cf;let _0x2f47df=new Set();_0x3a048c[_0x26dc98(0x15c)](_0x293854=>{const _0x3fc524=_0x26dc98;switch(_0x293854['type']){case _0x3fc524(0x18a):{let _0x4628a9=_0x293854['payload'][_0x3fc524(0x1a7)];_0x2f47df[_0x3fc524(0x18a)](_0x4628a9);break;}}}),k(this[_0x26dc98(0x1a6)],_0x2f47df);}));}[_0x369715(0x170)](_0x5bbd65,_0x324550,_0x158a3f){const _0x1d19ad=_0x369715;let _0x4180cc=this[_0x1d19ad(0x171)][_0x1d19ad(0x174)](_0x5bbd65,_0x324550,_0x158a3f);_0x4180cc&&(_0x4180cc[_0x1d19ad(0x19d)]?this['_threadCommentModel'][_0x1d19ad(0x180)](_0x5bbd65,_0x324550,_0x158a3f):this[_0x1d19ad(0x171)]['deleteThread'](_0x5bbd65,_0x324550,_0x4180cc[_0x1d19ad(0x192)]));}['_resolveComment'](_0x5e30e0,_0x53aab8,_0x1bb5e8,_0xe253c){const _0x50b0e8=_0x369715;(_0xe253c===_0x3b920b[_0x50b0e8(0x1b7)]||_0xe253c===_0x3b920b[_0x50b0e8(0x18c)])&&this[_0x50b0e8(0x171)]['resolveComment'](_0x5e30e0,_0x53aab8,_0x1bb5e8,_0xe253c===_0x3b920b[_0x50b0e8(0x1b7)]);}[_0x369715(0x169)](){const _0x1d7aeb=_0x369715;this['disposeWithMe'](this[_0x1d7aeb(0x1a1)][_0x1d7aeb(0x15a)]['subscribe'](_0x4912bc=>{const _0x518902=_0x1d7aeb;var _0x22b9d9;let _0x4ff859=(_0x22b9d9=this[_0x518902(0x171)]['getUnit'](_0x4912bc[_0x518902(0x1c1)])['find'](_0x5d3842=>_0x5d3842[_0x518902(0x192)]===_0x4912bc[_0x518902(0x192)]))==null?void 0x0:_0x22b9d9[_0x518902(0x1ba)];if(!_0x4ff859)return;let {unitId:_0x3d14bb,subUnitId:_0x62c61d}=_0x4ff859;switch(_0x4912bc[_0x518902(0x1ab)]&&this['_userService'][_0x518902(0x1af)](_0x4912bc[_0x518902(0x1ab)]),_0x4912bc['type']){case _0x4fb788[_0x518902(0x15d)]:{var _0xbe5e05;let _0x3bfb71=O(_0x4912bc[_0x518902(0x19c)]);if(!_0x4912bc[_0x518902(0x16a)]||!_0x4912bc['createTimestamp']||!_0x3bfb71)return;this['_threadCommentModel']['addComment'](_0x3d14bb,_0x62c61d,{'unitId':_0x3d14bb,'subUnitId':_0x62c61d,'ref':'','id':_0x4912bc[_0x518902(0x16a)],'dT':D(+_0x4912bc[_0x518902(0x15b)]),'threadId':_0x4912bc['threadId'],'personId':((_0xbe5e05=_0x4912bc[_0x518902(0x1ab)])==null?void 0x0:_0xbe5e05[_0x518902(0x151)])??_0x4912bc[_0x518902(0x1a3)],'text':_0x3bfb71,'parentId':_0x4ff859['id']});break;}case _0x4fb788[_0x518902(0x14f)]:if(!_0x4912bc['replyId']){this[_0x518902(0x171)][_0x518902(0x18e)](_0x3d14bb,_0x62c61d,_0x4ff859['threadId']);break;}this[_0x518902(0x170)](_0x3d14bb,_0x62c61d,_0x4912bc[_0x518902(0x16a)]);break;case _0x4fb788['Edit']:{let _0x4e514e=O(_0x4912bc[_0x518902(0x19c)]);if(!_0x4912bc[_0x518902(0x16a)]||!_0x4e514e)return;this[_0x518902(0x171)][_0x518902(0x159)](_0x3d14bb,_0x62c61d,{'commentId':_0x4912bc[_0x518902(0x16a)],'text':_0x4e514e});break;}case _0x4fb788[_0x518902(0x162)]:this[_0x518902(0x1be)](_0x3d14bb,_0x62c61d,_0x4ff859['id'],_0x4912bc['solved']);}}));}};M=j([A(0x0,_0x2b10fb(_0x32b201)),A(0x1,_0x2b10fb(_0xdd247c)),A(0x2,_0x2b10fb(_0x21b731)),A(0x3,_0x2b10fb(_0x253ff8))],M);function N(_0x3b177c,_0x1be796){const _0x3de477=_0x369715;let _0x2cb537=Number(_0x3b177c==null?void 0x0:_0x3b177c[_0x3de477(0x15b)]);return!!(_0x3b177c&&_0x3b177c[_0x3de477(0x16a)]&&_0x3b177c[_0x3de477(0x192)]===_0x1be796&&_0x3b177c[_0x3de477(0x1a3)]&&Number[_0x3de477(0x178)](_0x2cb537)&&_0x2cb537>0x0);}function P(_0x589581,_0x30205f){const _0xa1927b=_0x369715;let _0xee8977=_0x589581[_0xa1927b(0x1bf)][0x0];if(!_0x589581['threadId']||!N(_0xee8977,_0x589581[_0xa1927b(0x192)]))throw Error(_0xa1927b(0x19a));return{..._0x30205f,'id':_0xee8977[_0xa1927b(0x16a)],'resolved':_0x589581[_0xa1927b(0x18f)]===0x1,'dT':D(_0xee8977[_0xa1927b(0x15b)]),'personId':_0xee8977[_0xa1927b(0x1a3)],'threadId':_0xee8977[_0xa1927b(0x192)]};}function F(_0x40bccc,_0x1d1556,_0x596fdd,_0x1b100c){const _0x29ac8c=_0x369715;if((_0x40bccc==null?void 0x0:_0x40bccc[_0x29ac8c(0x192)])===_0x1d1556&&_0x40bccc[_0x29ac8c(0x1bf)][_0x29ac8c(0x150)]>0x0){let _0x1577fe=(_0x91f3f5,_0x210313)=>{const _0x451dd8=_0x29ac8c;if(!N(_0x91f3f5,_0x1d1556))return null;let _0xfd002e=O(_0x91f3f5[_0x451dd8(0x19c)]);return _0xfd002e?{'id':_0x91f3f5[_0x451dd8(0x16a)],'threadId':_0x91f3f5['threadId'],'dT':D(_0x91f3f5[_0x451dd8(0x15b)]),'personId':_0x91f3f5['userId'],'resolved':_0x40bccc[_0x451dd8(0x18f)]===_0x3b920b[_0x451dd8(0x1b7)],'unitId':_0x596fdd,'subUnitId':_0x1b100c,'text':_0xfd002e,'parentId':_0x210313}:null;},_0x50af62=_0x1577fe(_0x40bccc[_0x29ac8c(0x1bf)][0x0]);if(!_0x50af62)return null;let _0x479349=new Set([_0x50af62['id']]),_0x43b5e3=_0x40bccc['replies'][_0x29ac8c(0x187)](0x1)[_0x29ac8c(0x1b6)](_0x2b046b=>{const _0x5f1ce8=_0x29ac8c;let _0x5237e7=_0x1577fe(_0x2b046b,_0x50af62['id']);return!_0x5237e7||_0x479349[_0x5f1ce8(0x193)](_0x5237e7['id'])?[]:(_0x479349[_0x5f1ce8(0x18a)](_0x5237e7['id']),[_0x5237e7]);});return{..._0x50af62,'children':_0x43b5e3};}return null;}let I=class{constructor(_0x1f169c,_0x361bbf,_0x3af923){const _0x4347a7=_0x369715;this[_0x4347a7(0x1c0)]=_0x1f169c,this['_userService']=_0x361bbf,this[_0x4347a7(0x1a4)]=_0x3af923;}async[_0x369715(0x181)](_0x42a673){const _0x54fadd=_0x369715;var _0x4d8950;let {parentId:_0x49ff37,unitId:_0x5ba8da,text:_0x151477,threadId:_0x162a7e}=_0x42a673,_0x89a4af=((_0x4d8950=_0x151477['customRanges'])==null?void 0x0:_0x4d8950[_0x54fadd(0x1b5)](_0x3771a7=>_0x3771a7[_0x54fadd(0x155)]===_0x483613['COMMENT'])[_0x54fadd(0x1a0)](_0x52c8c2=>_0x52c8c2[_0x54fadd(0x198)]))??[],_0x349a75=JSON[_0x54fadd(0x182)](_0x151477),_0xb91000=(await this[_0x54fadd(0x1a4)]['requireSession'](_0x5ba8da))[_0x54fadd(0x196)]();if(_0x49ff37){let _0x603f28={'memberId':_0xb91000,'unitId':_0x5ba8da,'content':_0x349a75,'mention':_0x89a4af,'threadId':_0x162a7e},_0x4a4092=await this['_httpService'][_0x54fadd(0x199)](_0x54fadd(0x177)+_0x5ba8da+_0x54fadd(0x1ac),{'body':_0x603f28}),_0x2143fc=_0x4a4092[_0x54fadd(0x16e)]['reply'];if(_0x4a4092[_0x54fadd(0x16e)][_0x54fadd(0x1aa)]&&_0x4a4092[_0x54fadd(0x16e)]['error'][_0x54fadd(0x164)]!==0x1||!N(_0x2143fc,_0x162a7e)){var _0x5de612;throw Error(((_0x5de612=_0x4a4092['body'][_0x54fadd(0x1aa)])==null?void 0x0:_0x5de612[_0x54fadd(0x179)])??_0x54fadd(0x172));}return{..._0x42a673,'id':_0x2143fc[_0x54fadd(0x16a)],'dT':_0x11dce2(+_0x2143fc['createTimestamp'])[_0x54fadd(0x19f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2143fc['userId']};}{let _0x458b4c={'memberId':_0xb91000,'unitId':_0x5ba8da,'content':_0x349a75,'mention':_0x89a4af},_0x22d3b8=await this['_httpService'][_0x54fadd(0x199)](_0x54fadd(0x177)+_0x5ba8da+_0x54fadd(0x176),{'body':_0x458b4c});if(_0x22d3b8['body'][_0x54fadd(0x1aa)]&&_0x22d3b8[_0x54fadd(0x16e)][_0x54fadd(0x1aa)]['code']!==0x1||!_0x22d3b8['body'][_0x54fadd(0x19e)]){var _0x1084ea;throw Error(((_0x1084ea=_0x22d3b8['body'][_0x54fadd(0x1aa)])==null?void 0x0:_0x1084ea[_0x54fadd(0x179)])??_0x54fadd(0x1ad));}return P(_0x22d3b8[_0x54fadd(0x16e)][_0x54fadd(0x19e)],_0x42a673);}}async[_0x369715(0x159)](_0x44e2a0){const _0x42dbc8=_0x369715;var _0x4a0778;let {text:_0x118d7c,unitId:_0x9d6d81}=_0x44e2a0,_0x379d68=((_0x4a0778=_0x118d7c['customRanges'])==null?void 0x0:_0x4a0778[_0x42dbc8(0x1b5)](_0x11c8f2=>_0x11c8f2[_0x42dbc8(0x155)]===_0x483613[_0x42dbc8(0x166)])[_0x42dbc8(0x1a0)](_0x5cdb44=>_0x5cdb44['rangeId']))??[],_0x557d81=JSON[_0x42dbc8(0x182)](_0x118d7c),_0x35ecec=_0x44e2a0[_0x42dbc8(0x192)],_0x26da99=_0x44e2a0['id'],_0x1e770f={'memberId':(await this[_0x42dbc8(0x1a4)]['requireSession'](_0x9d6d81))[_0x42dbc8(0x196)](),'unitId':_0x9d6d81,'threadId':_0x35ecec,'mention':_0x379d68,'content':_0x557d81,'replyId':_0x26da99},_0x20e041=await this['_httpService']['post'](_0x42dbc8(0x177)+_0x9d6d81+_0x42dbc8(0x17f),{'body':_0x1e770f});return!_0x20e041[_0x42dbc8(0x16e)]['error']||_0x20e041[_0x42dbc8(0x16e)][_0x42dbc8(0x1aa)][_0x42dbc8(0x164)]===0x1;}async[_0x369715(0x18d)](_0x2fc4b9){const _0x326ede=_0x369715;let {unitId:_0x554702}=_0x2fc4b9,_0x178894=_0x2fc4b9[_0x326ede(0x192)],_0x3f5b80={'memberId':(await this['_sessionService'][_0x326ede(0x1b4)](_0x554702))[_0x326ede(0x196)](),'unitId':_0x554702,'threadId':_0x178894,'solved':_0x2fc4b9['resolved']?_0x3b920b[_0x326ede(0x1b7)]:_0x3b920b[_0x326ede(0x18c)]},_0x15005a=await this[_0x326ede(0x1c0)][_0x326ede(0x199)](_0x326ede(0x177)+_0x554702+_0x326ede(0x14e),{'body':_0x3f5b80});return!_0x15005a['body'][_0x326ede(0x1aa)]||_0x15005a[_0x326ede(0x16e)][_0x326ede(0x1aa)][_0x326ede(0x164)]===0x1;}['deleteComment'](_0x468c11,_0xd377f3,_0x2898cf,_0x58d03a){const _0x515c43=_0x369715;return this[_0x515c43(0x170)](_0x468c11,_0x2898cf,_0x58d03a);}[_0x369715(0x18e)](_0x4eb25f,_0x336be3,_0x548725){const _0x59aeba=_0x369715;return this[_0x59aeba(0x170)](_0x4eb25f,_0x548725);}async[_0x369715(0x170)](_0x9ac5da,_0x4bce19,_0x1ba71c){const _0x59878d=_0x369715;let _0x13b510={'memberId':(await this[_0x59878d(0x1a4)][_0x59878d(0x1b4)](_0x9ac5da))[_0x59878d(0x196)](),'threadId':_0x4bce19,'replyId':_0x1ba71c,'unitId':_0x9ac5da},_0x21a92c=await this[_0x59878d(0x1c0)][_0x59878d(0x199)]('/universer-api/comment/unit/'+_0x9ac5da+'/delete',{'body':_0x13b510});return!_0x21a92c[_0x59878d(0x16e)][_0x59878d(0x1aa)]||_0x21a92c[_0x59878d(0x16e)][_0x59878d(0x1aa)]['code']===0x1;}async[_0x369715(0x1a9)](_0x10cb5a,_0x5c0ba0,_0x14d56f){const _0x5bdb6c=_0x369715;let _0x2d6d07={'unitId':_0x10cb5a,'threadId':_0x14d56f},_0x31d4f3=await this[_0x5bdb6c(0x1c0)][_0x5bdb6c(0x199)](_0x5bdb6c(0x177)+_0x10cb5a+_0x5bdb6c(0x1b0),{'body':_0x2d6d07});if(_0x31d4f3[_0x5bdb6c(0x16e)][_0x5bdb6c(0x1aa)]&&_0x31d4f3[_0x5bdb6c(0x16e)][_0x5bdb6c(0x1aa)][_0x5bdb6c(0x164)]!==0x1)throw Error(_0x31d4f3['body']['error'][_0x5bdb6c(0x179)]||_0x5bdb6c(0x17d));let _0xba88a8=_0x14d56f[_0x5bdb6c(0x1a0)](_0x86caee=>{const _0x209057=_0x5bdb6c;var _0x35a890;return F((_0x35a890=_0x31d4f3[_0x209057(0x16e)][_0x209057(0x163)])==null?void 0x0:_0x35a890[_0x86caee],_0x86caee,_0x10cb5a,_0x5c0ba0);})[_0x5bdb6c(0x1b5)](Boolean);return Object[_0x5bdb6c(0x16b)](_0x31d4f3[_0x5bdb6c(0x16e)][_0x5bdb6c(0x167)]??{})[_0x5bdb6c(0x15c)](_0x124382=>{const _0x19d5a0=_0x5bdb6c;this[_0x19d5a0(0x14b)][_0x19d5a0(0x1af)](_0x124382);}),_0xba88a8;}['saveCommentToSnapshot'](_0x5b3674){const _0x21f3db=_0x369715;var _0x208bf1;return{'id':_0x5b3674['id'],'threadId':_0x5b3674[_0x21f3db(0x192)],'ref':_0x5b3674[_0x21f3db(0x17a)],..._0x5b3674[_0x21f3db(0x1bc)]===void 0x0?{}:{'authorName':_0x5b3674[_0x21f3db(0x1bc)],'personId':_0x5b3674[_0x21f3db(0x1a7)]},...(_0x208bf1=_0x5b3674[_0x21f3db(0x17b)])!=null&&_0x208bf1[_0x21f3db(0x1b3)](_0x526c11=>_0x526c11[_0x21f3db(0x1bc)]!==void 0x0)?{'children':_0x5b3674[_0x21f3db(0x17b)][_0x21f3db(0x1b5)](_0x58b345=>_0x58b345[_0x21f3db(0x1bc)]!==void 0x0)[_0x21f3db(0x1a0)](_0x471315=>({'id':_0x471315['id'],'threadId':_0x471315['threadId'],'ref':'','parentId':_0x5b3674['id'],'personId':_0x471315[_0x21f3db(0x1a7)],'authorName':_0x471315['authorName']}))}:{}};}};I=j([A(0x0,_0x2b10fb(_0x3b384d)),A(0x1,_0x2b10fb(_0x21b731)),A(0x2,_0x2b10fb(_0xc5af2f))],I);let L=class extends _0x409b78{constructor(_0x45a97f,_0x3fdb49){const _0x5250f5=_0x369715;super(),this['_threadCommentDataSourceService']=_0x45a97f,this[_0x5250f5(0x14c)]=_0x3fdb49,this[_0x5250f5(0x1b1)]();}[_0x369715(0x1b1)](){const _0x2ff59c=_0x369715;this[_0x2ff59c(0x14d)]['dataSource']=this[_0x2ff59c(0x14c)],this[_0x2ff59c(0x14d)][_0x2ff59c(0x194)]=!0x1;}};L=j([A(0x0,_0x1c00be),A(0x1,_0x2b10fb(I))],L);function R(_0x46b70d){'@babel/helpers - typeof';const _0x5b840c=_0x369715;return R=typeof Symbol=='function'&&typeof Symbol[_0x5b840c(0x15f)]==_0x5b840c(0x173)?function(_0x1c0ac9){return typeof _0x1c0ac9;}:function(_0x4aadd2){const _0x2c4f5b=_0x5b840c;return _0x4aadd2&&typeof Symbol==_0x2c4f5b(0x175)&&_0x4aadd2['constructor']===Symbol&&_0x4aadd2!==Symbol['prototype']?_0x2c4f5b(0x173):typeof _0x4aadd2;},R(_0x46b70d);}function _0x5e8b(_0x31ec0f,_0x540505){_0x31ec0f=_0x31ec0f-0x14b;const _0x151d64=_0x151d();let _0x5e8b8c=_0x151d64[_0x31ec0f];return _0x5e8b8c;}function z(_0x4f6c0e,_0x488d68){const _0x3188ea=_0x369715;if(R(_0x4f6c0e)!=_0x3188ea(0x1a2)||!_0x4f6c0e)return _0x4f6c0e;var _0x10622f=_0x4f6c0e[Symbol[_0x3188ea(0x16f)]];if(_0x10622f!==void 0x0){var _0x3470b2=_0x10622f[_0x3188ea(0x165)](_0x4f6c0e,_0x488d68||_0x3188ea(0x160));if(R(_0x3470b2)!=_0x3188ea(0x1a2))return _0x3470b2;throw TypeError(_0x3188ea(0x1bb));}return(_0x488d68===_0x3188ea(0x154)?String:Number)(_0x4f6c0e);}function B(_0x316301){var _0x3c14b8=z(_0x316301,'string');return R(_0x3c14b8)=='symbol'?_0x3c14b8:_0x3c14b8+'';}function _0x151d(){const _0x1f3b8c=['getComment','function','/add','/universer-api/comment/unit/','isFinite','message','ref','children','_configService','Comment\x20service\x20failed\x20to\x20list\x20comments','3389396hZDivN','/edit','deleteComment','addComment','stringify','decorate','getUser','YYYY/MM/DD\x20HH:mm','pipe','slice','defineProperty','onStarting','add','size','OpenOrReOpen','resolveComment','deleteThread','solved','295074oLhDxt','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','has','syncUpdateMutationToColla','1.0.4','getMemberID','6xQIgkv','rangeId','post','Comment\x20service\x20returned\x20an\x20invalid\x20thread','_initUserSync','content','parentId','comment','format','map','_commentService','object','userId','_sessionService','120229lBeBAu','_injector','personId','setConfig','listComments','error','user','/reply','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20comment','752TJRBlT','addUser','/list','_initDataSource','onReady','some','requireSession','filter','flatMap','Solved','63819eIoKbZ','263922scOWYJ','root','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','authorName','getOwnPropertyDescriptor','_resolveComment','replies','_httpService','unitId','_userService','_threadCommentDataSource','_threadCommentDataSourceService','/solved','Delete','length','userID','5177102QqQmYN','/universer-api/user/list','string','rangeType','pluginName','packageName','_config','updateComment','commentUpdate$','createTimestamp','forEach','Reply','@univerjs-pro/thread-comment-datasource','iterator','default','delete','Solve','comments','code','call','COMMENT','users','554145OBNCSn','_init','replyId','values','get','disposeWithMe','body','toPrimitive','_deleteComment','_threadCommentModel','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20reply','symbol'];_0x151d=function(){return _0x1f3b8c;};return _0x151d();}function V(_0x582711,_0x1c7810,_0x13e182){return(_0x1c7810=B(_0x1c7810))in _0x582711?Object['defineProperty'](_0x582711,_0x1c7810,{'value':_0x13e182,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x582711[_0x1c7810]=_0x13e182,_0x582711;}let H=class extends _0x4a3d0a{constructor(_0x4aa476=E,_0x1f6e98,_0x4b544c){const _0xe4e73=_0x369715;super(),this[_0xe4e73(0x158)]=_0x4aa476,this[_0xe4e73(0x1a6)]=_0x1f6e98,this[_0xe4e73(0x17c)]=_0x4b544c;let {..._0x321235}=_0x5b00d6({},E,this[_0xe4e73(0x158)]);this[_0xe4e73(0x17c)][_0xe4e73(0x1a8)]('thread-comment-data-source.config',_0x321235);}[_0x369715(0x189)](){const _0x5e5bca=_0x369715;[[I],[L],[M]][_0x5e5bca(0x15c)](_0x361e35=>{const _0x20abbe=_0x5e5bca;this[_0x20abbe(0x1a6)][_0x20abbe(0x18a)](_0x361e35);});}[_0x369715(0x1b2)](){const _0x2aa5a1=_0x369715;this['_injector'][_0x2aa5a1(0x16c)](L),this[_0x2aa5a1(0x1a6)][_0x2aa5a1(0x16c)](M);}};V(H,_0x369715(0x156),_0x369715(0x191)),V(H,_0x369715(0x157),w),V(H,'version',T),H=j([_0x3bcb4e(_0x169bd4,_0x189162,_0x271566,_0x4f1498,_0xd94099),A(0x1,_0x2b10fb(_0x253ff8)),A(0x2,_0xfcc38c)],H);export{H as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4ae6b7=_0x27a2;(function(_0x176a97,_0x5beb4f){const _0x2108b5=_0x27a2,_0xfe6f5e=_0x176a97();while(!![]){try{const _0x49bcd5=-parseInt(_0x2108b5(0x1c9))/0x1*(parseInt(_0x2108b5(0x1eb))/0x2)+-parseInt(_0x2108b5(0x1df))/0x3+parseInt(_0x2108b5(0x17e))/0x4*(-parseInt(_0x2108b5(0x19c))/0x5)+-parseInt(_0x2108b5(0x1ab))/0x6*(-parseInt(_0x2108b5(0x194))/0x7)+-parseInt(_0x2108b5(0x1de))/0x8+parseInt(_0x2108b5(0x18d))/0x9+parseInt(_0x2108b5(0x1b9))/0xa;if(_0x49bcd5===_0x5beb4f)break;else _0xfe6f5e['push'](_0xfe6f5e['shift']());}catch(_0x258df9){_0xfe6f5e['push'](_0xfe6f5e['shift']());}}}(_0x23bc,0xeed90));import{CollaborationSessionService as _0x1ba63e,CommentService as _0xcb56ab,UniverCollaborationClientPlugin as _0x5ba561}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f85ee}from'@univerjs-pro/license';import{CustomRangeType as _0x51df51,DependentOn as _0x44bca5,Disposable as _0xb3479f,IConfigService as _0x328c51,Inject as _0x353afe,Injector as _0x5f39b2,Plugin as _0x39abfb,UserManagerService as _0x31a018,dateKit as _0x5309d8,merge as _0x59db29}from'@univerjs/core';import{HTTPService as _0xfe2d3,UniverNetworkPlugin as _0xcb55bf}from'@univerjs/network';import{IThreadCommentDataSourceService as _0x5bb112,ThreadCommentModel as _0xfbbf43,UniverThreadCommentPlugin as _0x537693,isThreadCommentDocumentBody as _0x3d0213}from'@univerjs/thread-comment';import{UniverThreadCommentUIPlugin as _0x25489d}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0xc9774b,CommentUpdateEventType as _0x2c3bc7}from'@univerjs/protocol';function _0x27a2(_0x88db0,_0x711720){_0x88db0=_0x88db0-0x17c;const _0x23bc4b=_0x23bc();let _0x27a234=_0x23bc4b[_0x88db0];return _0x27a234;}import{bufferTime as _0x51d9d5}from'rxjs';var w='@univerjs-pro/thread-comment-datasource',T=_0x4ae6b7(0x180);const E={},D=_0x2f529b=>_0x5309d8(new Date(+_0x2f529b))[_0x4ae6b7(0x1c7)](_0x4ae6b7(0x1aa));function O(_0xd31763){const _0xb6c163=_0x4ae6b7;if(!_0xd31763)return null;try{let _0x3a012f=JSON[_0xb6c163(0x1b3)](_0xd31763);return _0x3d0213(_0x3a012f)?_0x3a012f:null;}catch{return null;}}const k=async(_0x4fdf04,_0x457aa6)=>{const _0x3faa36=_0x4ae6b7;let _0x354e86=_0x4fdf04[_0x3faa36(0x195)](_0x31a018),_0x8263a5=_0x4fdf04[_0x3faa36(0x195)](_0xfe2d3);_0x457aa6[_0x3faa36(0x19e)](_0x39aafc=>{const _0x346b12=_0x3faa36;_0x354e86[_0x346b12(0x182)](_0x39aafc)&&_0x457aa6['delete'](_0x39aafc);}),_0x457aa6[_0x3faa36(0x197)]&&(await _0x8263a5[_0x3faa36(0x195)](_0x3faa36(0x1cb),{'params':{'userIDs':[..._0x457aa6]}}))[_0x3faa36(0x1b1)][_0x3faa36(0x1e1)][_0x3faa36(0x19e)](_0x2b4d0a=>{const _0x3cb511=_0x3faa36;_0x2b4d0a&&_0x354e86[_0x3cb511(0x192)](_0x2b4d0a);});};function A(_0x42c9af,_0x30e1e2){return function(_0x5f5c22,_0x365565){_0x30e1e2(_0x5f5c22,_0x365565,_0x42c9af);};}function j(_0x24d2f8,_0x5ec8f1,_0x495a86,_0x280683){const _0x2094c8=_0x4ae6b7;var _0x1bc6fe=arguments[_0x2094c8(0x1bc)],_0x43db9c=_0x1bc6fe<0x3?_0x5ec8f1:_0x280683===null?_0x280683=Object[_0x2094c8(0x1d7)](_0x5ec8f1,_0x495a86):_0x280683,_0x2ba19b;if(typeof Reflect=='object'&&typeof Reflect[_0x2094c8(0x1bb)]==_0x2094c8(0x1c1))_0x43db9c=Reflect[_0x2094c8(0x1bb)](_0x24d2f8,_0x5ec8f1,_0x495a86,_0x280683);else{for(var _0x2c9eff=_0x24d2f8[_0x2094c8(0x1bc)]-0x1;_0x2c9eff>=0x0;_0x2c9eff--)(_0x2ba19b=_0x24d2f8[_0x2c9eff])&&(_0x43db9c=(_0x1bc6fe<0x3?_0x2ba19b(_0x43db9c):_0x1bc6fe>0x3?_0x2ba19b(_0x5ec8f1,_0x495a86,_0x43db9c):_0x2ba19b(_0x5ec8f1,_0x495a86))||_0x43db9c);}return _0x1bc6fe>0x3&&_0x43db9c&&Object['defineProperty'](_0x5ec8f1,_0x495a86,_0x43db9c),_0x43db9c;}let M=class extends _0xb3479f{constructor(_0x21663f,_0x1b1954,_0x30df1a,_0x6c5d85){const _0x4ceece=_0x4ae6b7;super(),this[_0x4ceece(0x1d2)]=_0x21663f,this['_threadCommentModel']=_0x1b1954,this[_0x4ceece(0x189)]=_0x30df1a,this['_injector']=_0x6c5d85,this[_0x4ceece(0x1a2)](),this['_initUserSync']();}['_initUserSync'](){const _0x337c58=_0x4ae6b7;this[_0x337c58(0x196)](this[_0x337c58(0x198)][_0x337c58(0x1ee)][_0x337c58(0x1e6)](_0x51d9d5(0x10))[_0x337c58(0x1e5)](_0x445e1f=>{const _0x2dd3ab=_0x337c58;let _0xd9cde6=new Set();_0x445e1f[_0x2dd3ab(0x19e)](_0x296a11=>{const _0x5baa70=_0x2dd3ab;switch(_0x296a11[_0x5baa70(0x1b6)]){case'add':{let _0x597cfa=_0x296a11['payload']['personId'];_0xd9cde6[_0x5baa70(0x1e0)](_0x597cfa);break;}}}),k(this[_0x2dd3ab(0x17c)],_0xd9cde6);}));}[_0x4ae6b7(0x1e3)](_0xbc77fe,_0x2d96ac,_0x488958){const _0x40e8a3=_0x4ae6b7;let _0x333588=this['_threadCommentModel']['getComment'](_0xbc77fe,_0x2d96ac,_0x488958);_0x333588&&(_0x333588[_0x40e8a3(0x1b8)]?this[_0x40e8a3(0x198)][_0x40e8a3(0x1c4)](_0xbc77fe,_0x2d96ac,_0x488958):this[_0x40e8a3(0x198)][_0x40e8a3(0x1d0)](_0xbc77fe,_0x2d96ac,_0x333588[_0x40e8a3(0x1ac)]));}[_0x4ae6b7(0x1e8)](_0x56eefd,_0x277faf,_0x234cb2,_0x35ab80){const _0x2695c0=_0x4ae6b7;(_0x35ab80===_0xc9774b['Solved']||_0x35ab80===_0xc9774b[_0x2695c0(0x18a)])&&this['_threadCommentModel'][_0x2695c0(0x1a8)](_0x56eefd,_0x277faf,_0x234cb2,_0x35ab80===_0xc9774b[_0x2695c0(0x1c3)]);}['_init'](){const _0x269053=_0x4ae6b7;this[_0x269053(0x196)](this['_commentService'][_0x269053(0x1ee)][_0x269053(0x1e5)](_0x47a8d8=>{const _0x2869e6=_0x269053;var _0x4cd337;let _0x4cd254=(_0x4cd337=this['_threadCommentModel'][_0x2869e6(0x18e)](_0x47a8d8[_0x2869e6(0x1f3)])[_0x2869e6(0x1d9)](_0x4c6d07=>_0x4c6d07['threadId']===_0x47a8d8[_0x2869e6(0x1ac)]))==null?void 0x0:_0x4cd337[_0x2869e6(0x1cf)];if(!_0x4cd254)return;let {unitId:_0x573d3d,subUnitId:_0x9c1bbd}=_0x4cd254;switch(_0x47a8d8['user']&&this[_0x2869e6(0x189)][_0x2869e6(0x192)](_0x47a8d8[_0x2869e6(0x1a9)]),_0x47a8d8[_0x2869e6(0x1b6)]){case _0x2c3bc7[_0x2869e6(0x1a0)]:{var _0x58702e;let _0x30ee97=O(_0x47a8d8[_0x2869e6(0x1f2)]);if(!_0x47a8d8['replyId']||!_0x47a8d8[_0x2869e6(0x1e2)]||!_0x30ee97)return;this[_0x2869e6(0x198)][_0x2869e6(0x1c8)](_0x573d3d,_0x9c1bbd,{'unitId':_0x573d3d,'subUnitId':_0x9c1bbd,'ref':'','id':_0x47a8d8[_0x2869e6(0x1bf)],'dT':D(+_0x47a8d8[_0x2869e6(0x1e2)]),'threadId':_0x47a8d8['threadId'],'personId':((_0x58702e=_0x47a8d8[_0x2869e6(0x1a9)])==null?void 0x0:_0x58702e[_0x2869e6(0x18c)])??_0x47a8d8[_0x2869e6(0x1d5)],'text':_0x30ee97,'parentId':_0x4cd254['id']});break;}case _0x2c3bc7[_0x2869e6(0x19a)]:if(!_0x47a8d8['replyId']){this['_threadCommentModel']['deleteThread'](_0x573d3d,_0x9c1bbd,_0x4cd254[_0x2869e6(0x1ac)]);break;}this[_0x2869e6(0x1e3)](_0x573d3d,_0x9c1bbd,_0x47a8d8['replyId']);break;case _0x2c3bc7[_0x2869e6(0x1b7)]:{let _0x56b3e5=O(_0x47a8d8[_0x2869e6(0x1f2)]);if(!_0x47a8d8[_0x2869e6(0x1bf)]||!_0x56b3e5)return;this[_0x2869e6(0x198)][_0x2869e6(0x1f1)](_0x573d3d,_0x9c1bbd,{'commentId':_0x47a8d8[_0x2869e6(0x1bf)],'text':_0x56b3e5});break;}case _0x2c3bc7[_0x2869e6(0x19b)]:this['_resolveComment'](_0x573d3d,_0x9c1bbd,_0x4cd254['id'],_0x47a8d8[_0x2869e6(0x1b5)]);}}));}};M=j([A(0x0,_0x353afe(_0xcb56ab)),A(0x1,_0x353afe(_0xfbbf43)),A(0x2,_0x353afe(_0x31a018)),A(0x3,_0x353afe(_0x5f39b2))],M);function N(_0x3dde0a,_0x3ecbb8){const _0x612733=_0x4ae6b7;let _0x2ce08a=Number(_0x3dde0a==null?void 0x0:_0x3dde0a[_0x612733(0x1e2)]);return!!(_0x3dde0a&&_0x3dde0a[_0x612733(0x1bf)]&&_0x3dde0a['threadId']===_0x3ecbb8&&_0x3dde0a[_0x612733(0x1d5)]&&Number['isFinite'](_0x2ce08a)&&_0x2ce08a>0x0);}function _0x23bc(){const _0xe957e3=['413335pCwrbc','string','forEach','_threadCommentDataSource','Reply','_config','_init','getMemberID','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20comment','customRanges','listComments','children','resolveComment','user','YYYY/MM/DD\x20HH:mm','1764246MfrPVV','threadId','constructor','replies','code','message','body','requireSession','parse','packageName','solved','type','Edit','parentId','42756210kBuyQz','/reply','decorate','length','_httpService','symbol','replyId','/solved','function','_threadCommentDataSourceService','Solved','deleteComment','version','Comment\x20service\x20returned\x20an\x20invalid\x20thread','format','addComment','426025rQKxjy','Comment\x20service\x20failed\x20to\x20list\x20comments','/universer-api/user/list','map','rangeId','comments','root','deleteThread','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','reply','COMMENT','userId','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getOwnPropertyDescriptor','stringify','find','error','some','/add','_sessionService','1560736zxJPmt','2551401YYDbnG','add','users','createTimestamp','_deleteComment','has','subscribe','pipe','/edit','_resolveComment','/delete','toPrimitive','8jvPxyB','default','_configService','commentUpdate$','iterator','authorName','updateComment','content','unitId','object','_injector','pluginName','60ZpLpFJ','/list','1.0.2','/universer-api/comment/unit/','getUser','onStarting','call','defineProperty','post','onReady','filter','_userService','OpenOrReOpen','setConfig','userID','938529morAKQ','getUnit','comment','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20reply','personId','addUser','ref','14ipdsOE','get','disposeWithMe','size','_threadCommentModel','_initDataSource','Delete','Solve'];_0x23bc=function(){return _0xe957e3;};return _0x23bc();}function P(_0x50b2be,_0x6bcce){const _0x544e47=_0x4ae6b7;let _0x36181e=_0x50b2be[_0x544e47(0x1ae)][0x0];if(!_0x50b2be['threadId']||!N(_0x36181e,_0x50b2be[_0x544e47(0x1ac)]))throw Error(_0x544e47(0x1c6));return{..._0x6bcce,'id':_0x36181e[_0x544e47(0x1bf)],'resolved':_0x50b2be[_0x544e47(0x1b5)]===0x1,'dT':D(_0x36181e[_0x544e47(0x1e2)]),'personId':_0x36181e[_0x544e47(0x1d5)],'threadId':_0x36181e[_0x544e47(0x1ac)]};}function F(_0x232468,_0x3e5556,_0x4a59f8,_0x44754f){const _0x8a597d=_0x4ae6b7;if((_0x232468==null?void 0x0:_0x232468[_0x8a597d(0x1ac)])===_0x3e5556&&_0x232468[_0x8a597d(0x1ae)][_0x8a597d(0x1bc)]>0x0){let _0x556015=(_0x411a18,_0x3af55d)=>{const _0x1053c7=_0x8a597d;if(!N(_0x411a18,_0x3e5556))return null;let _0x20dd61=O(_0x411a18[_0x1053c7(0x1f2)]);return _0x20dd61?{'id':_0x411a18['replyId'],'threadId':_0x411a18[_0x1053c7(0x1ac)],'dT':D(_0x411a18['createTimestamp']),'personId':_0x411a18[_0x1053c7(0x1d5)],'resolved':_0x232468[_0x1053c7(0x1b5)]===_0xc9774b[_0x1053c7(0x1c3)],'unitId':_0x4a59f8,'subUnitId':_0x44754f,'text':_0x20dd61,'parentId':_0x3af55d}:null;},_0x9df2f5=_0x556015(_0x232468['replies'][0x0]);if(!_0x9df2f5)return null;let _0x14ecf3=new Set([_0x9df2f5['id']]),_0x28483a=_0x232468[_0x8a597d(0x1ae)]['slice'](0x1)['flatMap'](_0x251b1e=>{const _0x10ad9c=_0x8a597d;let _0x5b7067=_0x556015(_0x251b1e,_0x9df2f5['id']);return!_0x5b7067||_0x14ecf3[_0x10ad9c(0x1e4)](_0x5b7067['id'])?[]:(_0x14ecf3[_0x10ad9c(0x1e0)](_0x5b7067['id']),[_0x5b7067]);});return{..._0x9df2f5,'children':_0x28483a};}return null;}let I=class{constructor(_0x40a5ff,_0x49a5b5,_0x2fbe5e){const _0xee55d=_0x4ae6b7;this[_0xee55d(0x1bd)]=_0x40a5ff,this[_0xee55d(0x189)]=_0x49a5b5,this[_0xee55d(0x1dd)]=_0x2fbe5e;}async[_0x4ae6b7(0x1c8)](_0x44a358){const _0x31e17b=_0x4ae6b7;var _0x32a3a9;let {parentId:_0x3f1cba,unitId:_0x409ace,text:_0x59f4dc,threadId:_0x5b2421}=_0x44a358,_0x1cd995=((_0x32a3a9=_0x59f4dc[_0x31e17b(0x1a5)])==null?void 0x0:_0x32a3a9[_0x31e17b(0x188)](_0x4386d0=>_0x4386d0['rangeType']===_0x51df51[_0x31e17b(0x1d4)])[_0x31e17b(0x1cc)](_0x5f142b=>_0x5f142b[_0x31e17b(0x1cd)]))??[],_0x478e5b=JSON[_0x31e17b(0x1d8)](_0x59f4dc),_0x1c3477=(await this[_0x31e17b(0x1dd)][_0x31e17b(0x1b2)](_0x409ace))[_0x31e17b(0x1a3)]();if(_0x3f1cba){let _0x198b0a={'memberId':_0x1c3477,'unitId':_0x409ace,'content':_0x478e5b,'mention':_0x1cd995,'threadId':_0x5b2421},_0x261951=await this['_httpService'][_0x31e17b(0x186)](_0x31e17b(0x181)+_0x409ace+_0x31e17b(0x1ba),{'body':_0x198b0a}),_0x43ae8b=_0x261951[_0x31e17b(0x1b1)][_0x31e17b(0x1d3)];if(_0x261951[_0x31e17b(0x1b1)][_0x31e17b(0x1da)]&&_0x261951['body']['error'][_0x31e17b(0x1af)]!==0x1||!N(_0x43ae8b,_0x5b2421)){var _0x23df09;throw Error(((_0x23df09=_0x261951[_0x31e17b(0x1b1)][_0x31e17b(0x1da)])==null?void 0x0:_0x23df09[_0x31e17b(0x1b0)])??_0x31e17b(0x190));}return{..._0x44a358,'id':_0x43ae8b[_0x31e17b(0x1bf)],'dT':_0x5309d8(+_0x43ae8b[_0x31e17b(0x1e2)])[_0x31e17b(0x1c7)](_0x31e17b(0x1aa)),'personId':_0x43ae8b[_0x31e17b(0x1d5)]};}{let _0x2f5811={'memberId':_0x1c3477,'unitId':_0x409ace,'content':_0x478e5b,'mention':_0x1cd995},_0x1e09d3=await this[_0x31e17b(0x1bd)][_0x31e17b(0x186)](_0x31e17b(0x181)+_0x409ace+_0x31e17b(0x1dc),{'body':_0x2f5811});if(_0x1e09d3[_0x31e17b(0x1b1)][_0x31e17b(0x1da)]&&_0x1e09d3['body'][_0x31e17b(0x1da)][_0x31e17b(0x1af)]!==0x1||!_0x1e09d3['body']['comment']){var _0x2fcc4c;throw Error(((_0x2fcc4c=_0x1e09d3[_0x31e17b(0x1b1)][_0x31e17b(0x1da)])==null?void 0x0:_0x2fcc4c[_0x31e17b(0x1b0)])??_0x31e17b(0x1a4));}return P(_0x1e09d3[_0x31e17b(0x1b1)][_0x31e17b(0x18f)],_0x44a358);}}async['updateComment'](_0x2eda6f){const _0x2c5c34=_0x4ae6b7;var _0x526a42;let {text:_0x434e4d,unitId:_0xfbf8f7}=_0x2eda6f,_0x5c526b=((_0x526a42=_0x434e4d[_0x2c5c34(0x1a5)])==null?void 0x0:_0x526a42['filter'](_0x4f1689=>_0x4f1689['rangeType']===_0x51df51[_0x2c5c34(0x1d4)])['map'](_0x2e5de2=>_0x2e5de2[_0x2c5c34(0x1cd)]))??[],_0x2273c4=JSON['stringify'](_0x434e4d),_0x489415=_0x2eda6f[_0x2c5c34(0x1ac)],_0x15e890=_0x2eda6f['id'],_0x328c88={'memberId':(await this[_0x2c5c34(0x1dd)]['requireSession'](_0xfbf8f7))[_0x2c5c34(0x1a3)](),'unitId':_0xfbf8f7,'threadId':_0x489415,'mention':_0x5c526b,'content':_0x2273c4,'replyId':_0x15e890},_0x484800=await this['_httpService'][_0x2c5c34(0x186)](_0x2c5c34(0x181)+_0xfbf8f7+_0x2c5c34(0x1e7),{'body':_0x328c88});return!_0x484800['body']['error']||_0x484800[_0x2c5c34(0x1b1)][_0x2c5c34(0x1da)][_0x2c5c34(0x1af)]===0x1;}async['resolveComment'](_0x2b0840){const _0x47097e=_0x4ae6b7;let {unitId:_0x187402}=_0x2b0840,_0x492bf8=_0x2b0840['threadId'],_0xac22c2={'memberId':(await this[_0x47097e(0x1dd)][_0x47097e(0x1b2)](_0x187402))[_0x47097e(0x1a3)](),'unitId':_0x187402,'threadId':_0x492bf8,'solved':_0x2b0840['resolved']?_0xc9774b[_0x47097e(0x1c3)]:_0xc9774b['OpenOrReOpen']},_0x523f43=await this[_0x47097e(0x1bd)][_0x47097e(0x186)](_0x47097e(0x181)+_0x187402+_0x47097e(0x1c0),{'body':_0xac22c2});return!_0x523f43[_0x47097e(0x1b1)]['error']||_0x523f43['body'][_0x47097e(0x1da)][_0x47097e(0x1af)]===0x1;}[_0x4ae6b7(0x1c4)](_0x1285b8,_0x2f7b80,_0x51ca35,_0x3e6432){return this['_deleteComment'](_0x1285b8,_0x51ca35,_0x3e6432);}[_0x4ae6b7(0x1d0)](_0x20927d,_0x3be653,_0x2c4037){const _0x23c151=_0x4ae6b7;return this[_0x23c151(0x1e3)](_0x20927d,_0x2c4037);}async[_0x4ae6b7(0x1e3)](_0x222982,_0x320cd7,_0x7e14d3){const _0x142edb=_0x4ae6b7;let _0x588b4a={'memberId':(await this[_0x142edb(0x1dd)][_0x142edb(0x1b2)](_0x222982))[_0x142edb(0x1a3)](),'threadId':_0x320cd7,'replyId':_0x7e14d3,'unitId':_0x222982},_0x2db554=await this[_0x142edb(0x1bd)][_0x142edb(0x186)](_0x142edb(0x181)+_0x222982+_0x142edb(0x1e9),{'body':_0x588b4a});return!_0x2db554[_0x142edb(0x1b1)][_0x142edb(0x1da)]||_0x2db554['body']['error'][_0x142edb(0x1af)]===0x1;}async[_0x4ae6b7(0x1a6)](_0x3eee58,_0x43b3ba,_0x1b10df){const _0xaffa81=_0x4ae6b7;let _0x540ae5={'unitId':_0x3eee58,'threadId':_0x1b10df},_0x406f96=await this[_0xaffa81(0x1bd)][_0xaffa81(0x186)]('/universer-api/comment/unit/'+_0x3eee58+_0xaffa81(0x17f),{'body':_0x540ae5});if(_0x406f96[_0xaffa81(0x1b1)]['error']&&_0x406f96[_0xaffa81(0x1b1)][_0xaffa81(0x1da)][_0xaffa81(0x1af)]!==0x1)throw Error(_0x406f96[_0xaffa81(0x1b1)][_0xaffa81(0x1da)]['message']||_0xaffa81(0x1ca));let _0x3658e2=_0x1b10df[_0xaffa81(0x1cc)](_0x3ce3ff=>{const _0x5ce9d1=_0xaffa81;var _0x1ce113;return F((_0x1ce113=_0x406f96[_0x5ce9d1(0x1b1)][_0x5ce9d1(0x1ce)])==null?void 0x0:_0x1ce113[_0x3ce3ff],_0x3ce3ff,_0x3eee58,_0x43b3ba);})[_0xaffa81(0x188)](Boolean);return Object['values'](_0x406f96[_0xaffa81(0x1b1)][_0xaffa81(0x1e1)]??{})[_0xaffa81(0x19e)](_0x40a496=>{const _0x192a24=_0xaffa81;this[_0x192a24(0x189)]['addUser'](_0x40a496);}),_0x3658e2;}['saveCommentToSnapshot'](_0x4b1e39){const _0x1bca06=_0x4ae6b7;var _0x21d318;return{'id':_0x4b1e39['id'],'threadId':_0x4b1e39[_0x1bca06(0x1ac)],'ref':_0x4b1e39[_0x1bca06(0x193)],..._0x4b1e39[_0x1bca06(0x1f0)]===void 0x0?{}:{'authorName':_0x4b1e39[_0x1bca06(0x1f0)],'personId':_0x4b1e39[_0x1bca06(0x191)]},...(_0x21d318=_0x4b1e39[_0x1bca06(0x1a7)])!=null&&_0x21d318[_0x1bca06(0x1db)](_0x46449b=>_0x46449b[_0x1bca06(0x1f0)]!==void 0x0)?{'children':_0x4b1e39['children'][_0x1bca06(0x188)](_0x4d48c9=>_0x4d48c9[_0x1bca06(0x1f0)]!==void 0x0)[_0x1bca06(0x1cc)](_0x232ebd=>({'id':_0x232ebd['id'],'threadId':_0x232ebd[_0x1bca06(0x1ac)],'ref':'','parentId':_0x4b1e39['id'],'personId':_0x232ebd[_0x1bca06(0x191)],'authorName':_0x232ebd[_0x1bca06(0x1f0)]}))}:{}};}};I=j([A(0x0,_0x353afe(_0xfe2d3)),A(0x1,_0x353afe(_0x31a018)),A(0x2,_0x353afe(_0x1ba63e))],I);let L=class extends _0xb3479f{constructor(_0x19d234,_0x521f5f){const _0x490127=_0x4ae6b7;super(),this[_0x490127(0x1c2)]=_0x19d234,this[_0x490127(0x19f)]=_0x521f5f,this['_initDataSource']();}[_0x4ae6b7(0x199)](){const _0x33f342=_0x4ae6b7;this[_0x33f342(0x1c2)]['dataSource']=this[_0x33f342(0x19f)],this[_0x33f342(0x1c2)]['syncUpdateMutationToColla']=!0x1;}};L=j([A(0x0,_0x5bb112),A(0x1,_0x353afe(I))],L);function R(_0x1987b2){'@babel/helpers - typeof';const _0x30b773=_0x4ae6b7;return R=typeof Symbol==_0x30b773(0x1c1)&&typeof Symbol[_0x30b773(0x1ef)]==_0x30b773(0x1be)?function(_0x153f97){return typeof _0x153f97;}:function(_0x39b7d0){const _0x37636c=_0x30b773;return _0x39b7d0&&typeof Symbol==_0x37636c(0x1c1)&&_0x39b7d0[_0x37636c(0x1ad)]===Symbol&&_0x39b7d0!==Symbol['prototype']?_0x37636c(0x1be):typeof _0x39b7d0;},R(_0x1987b2);}function z(_0x5066a3,_0x155b46){const _0xd2103b=_0x4ae6b7;if(R(_0x5066a3)!=_0xd2103b(0x1f4)||!_0x5066a3)return _0x5066a3;var _0x15a5c2=_0x5066a3[Symbol[_0xd2103b(0x1ea)]];if(_0x15a5c2!==void 0x0){var _0x437b50=_0x15a5c2[_0xd2103b(0x184)](_0x5066a3,_0x155b46||_0xd2103b(0x1ec));if(R(_0x437b50)!='object')return _0x437b50;throw TypeError(_0xd2103b(0x1d6));}return(_0x155b46==='string'?String:Number)(_0x5066a3);}function B(_0x566f80){const _0x1815f2=_0x4ae6b7;var _0x3ca97b=z(_0x566f80,_0x1815f2(0x19d));return R(_0x3ca97b)==_0x1815f2(0x1be)?_0x3ca97b:_0x3ca97b+'';}function V(_0x4d46d2,_0x4960ff,_0x44daf2){const _0x49e2c5=_0x4ae6b7;return(_0x4960ff=B(_0x4960ff))in _0x4d46d2?Object[_0x49e2c5(0x185)](_0x4d46d2,_0x4960ff,{'value':_0x44daf2,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4d46d2[_0x4960ff]=_0x44daf2,_0x4d46d2;}let H=class extends _0x39abfb{constructor(_0x5d4984=E,_0x32e38b,_0x380d42){const _0x415f56=_0x4ae6b7;super(),this[_0x415f56(0x1a1)]=_0x5d4984,this[_0x415f56(0x17c)]=_0x32e38b,this[_0x415f56(0x1ed)]=_0x380d42;let {..._0x4aa736}=_0x59db29({},E,this[_0x415f56(0x1a1)]);this[_0x415f56(0x1ed)][_0x415f56(0x18b)]('thread-comment-data-source.config',_0x4aa736);}[_0x4ae6b7(0x183)](){const _0x275270=_0x4ae6b7;[[I],[L],[M]][_0x275270(0x19e)](_0x3925d0=>{const _0x134eae=_0x275270;this[_0x134eae(0x17c)][_0x134eae(0x1e0)](_0x3925d0);});}[_0x4ae6b7(0x187)](){const _0x3b77a1=_0x4ae6b7;this[_0x3b77a1(0x17c)]['get'](L),this[_0x3b77a1(0x17c)][_0x3b77a1(0x195)](M);}};V(H,_0x4ae6b7(0x17d),_0x4ae6b7(0x1d1)),V(H,_0x4ae6b7(0x1b4),w),V(H,_0x4ae6b7(0x1c5),T),H=j([_0x44bca5(_0x1f85ee,_0xcb55bf,_0x537693,_0x25489d,_0x5ba561),A(0x1,_0x353afe(_0x5f39b2)),A(0x2,_0x328c51)],H);export{H as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x369715=_0x5e8b;(function(_0x30a32d,_0x3af9f4){const _0x3c4cf6=_0x5e8b,_0x128a34=_0x30a32d();while(!![]){try{const _0x4ac519=parseInt(_0x3c4cf6(0x1a5))/0x1+-parseInt(_0x3c4cf6(0x190))/0x2+parseInt(_0x3c4cf6(0x1b9))/0x3+-parseInt(_0x3c4cf6(0x17e))/0x4+parseInt(_0x3c4cf6(0x168))/0x5*(-parseInt(_0x3c4cf6(0x197))/0x6)+parseInt(_0x3c4cf6(0x152))/0x7+parseInt(_0x3c4cf6(0x1ae))/0x8*(parseInt(_0x3c4cf6(0x1b8))/0x9);if(_0x4ac519===_0x3af9f4)break;else _0x128a34['push'](_0x128a34['shift']());}catch(_0x408430){_0x128a34['push'](_0x128a34['shift']());}}}(_0x151d,0x7c2d4));import{CollaborationSessionService as _0xc5af2f,CommentService as _0x32b201,UniverCollaborationClientPlugin as _0xd94099}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x169bd4}from'@univerjs-pro/license';import{CustomRangeType as _0x483613,DependentOn as _0x3bcb4e,Disposable as _0x409b78,IConfigService as _0xfcc38c,Inject as _0x2b10fb,Injector as _0x253ff8,Plugin as _0x4a3d0a,UserManagerService as _0x21b731,dateKit as _0x11dce2,merge as _0x5b00d6}from'@univerjs/core';import{HTTPService as _0x3b384d,UniverNetworkPlugin as _0x189162}from'@univerjs/network';import{IThreadCommentDataSourceService as _0x1c00be,ThreadCommentModel as _0xdd247c,UniverThreadCommentPlugin as _0x271566,isThreadCommentDocumentBody as _0xbb0e6e}from'@univerjs/thread-comment';import{UniverThreadCommentUIPlugin as _0x4f1498}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x3b920b,CommentUpdateEventType as _0x4fb788}from'@univerjs/protocol';import{bufferTime as _0x28ca2c}from'rxjs';var w=_0x369715(0x15e),T=_0x369715(0x195);const E={},D=_0xf9ad35=>_0x11dce2(new Date(+_0xf9ad35))[_0x369715(0x19f)](_0x369715(0x185));function O(_0x352fdd){if(!_0x352fdd)return null;try{let _0x184e57=JSON['parse'](_0x352fdd);return _0xbb0e6e(_0x184e57)?_0x184e57:null;}catch{return null;}}const k=async(_0x13fb17,_0x56f3c4)=>{const _0x28a5a7=_0x369715;let _0x2b1c33=_0x13fb17['get'](_0x21b731),_0x1b0b42=_0x13fb17['get'](_0x3b384d);_0x56f3c4[_0x28a5a7(0x15c)](_0x195e66=>{const _0x1c1454=_0x28a5a7;_0x2b1c33[_0x1c1454(0x184)](_0x195e66)&&_0x56f3c4[_0x1c1454(0x161)](_0x195e66);}),_0x56f3c4[_0x28a5a7(0x18b)]&&(await _0x1b0b42[_0x28a5a7(0x16c)](_0x28a5a7(0x153),{'params':{'userIDs':[..._0x56f3c4]}}))[_0x28a5a7(0x16e)]['users'][_0x28a5a7(0x15c)](_0x5b26e6=>{_0x5b26e6&&_0x2b1c33['addUser'](_0x5b26e6);});};function A(_0x4e7d9b,_0x5f038d){return function(_0x255d91,_0x3c232d){_0x5f038d(_0x255d91,_0x3c232d,_0x4e7d9b);};}function j(_0x4453c3,_0x285253,_0x43c374,_0x2edf09){const _0x9ba0f1=_0x369715;var _0x31d6fe=arguments[_0x9ba0f1(0x150)],_0x9efdfd=_0x31d6fe<0x3?_0x285253:_0x2edf09===null?_0x2edf09=Object[_0x9ba0f1(0x1bd)](_0x285253,_0x43c374):_0x2edf09,_0x3e760a;if(typeof Reflect=='object'&&typeof Reflect[_0x9ba0f1(0x183)]==_0x9ba0f1(0x175))_0x9efdfd=Reflect[_0x9ba0f1(0x183)](_0x4453c3,_0x285253,_0x43c374,_0x2edf09);else{for(var _0x1a137c=_0x4453c3['length']-0x1;_0x1a137c>=0x0;_0x1a137c--)(_0x3e760a=_0x4453c3[_0x1a137c])&&(_0x9efdfd=(_0x31d6fe<0x3?_0x3e760a(_0x9efdfd):_0x31d6fe>0x3?_0x3e760a(_0x285253,_0x43c374,_0x9efdfd):_0x3e760a(_0x285253,_0x43c374))||_0x9efdfd);}return _0x31d6fe>0x3&&_0x9efdfd&&Object[_0x9ba0f1(0x188)](_0x285253,_0x43c374,_0x9efdfd),_0x9efdfd;}let M=class extends _0x409b78{constructor(_0x31dd8f,_0x27d297,_0x429fe0,_0x2b778c){const _0x5cf674=_0x369715;super(),this[_0x5cf674(0x1a1)]=_0x31dd8f,this[_0x5cf674(0x171)]=_0x27d297,this['_userService']=_0x429fe0,this[_0x5cf674(0x1a6)]=_0x2b778c,this[_0x5cf674(0x169)](),this[_0x5cf674(0x19b)]();}[_0x369715(0x19b)](){const _0x34d9cf=_0x369715;this[_0x34d9cf(0x16d)](this['_threadCommentModel'][_0x34d9cf(0x15a)][_0x34d9cf(0x186)](_0x28ca2c(0x10))['subscribe'](_0x3a048c=>{const _0x26dc98=_0x34d9cf;let _0x2f47df=new Set();_0x3a048c[_0x26dc98(0x15c)](_0x293854=>{const _0x3fc524=_0x26dc98;switch(_0x293854['type']){case _0x3fc524(0x18a):{let _0x4628a9=_0x293854['payload'][_0x3fc524(0x1a7)];_0x2f47df[_0x3fc524(0x18a)](_0x4628a9);break;}}}),k(this[_0x26dc98(0x1a6)],_0x2f47df);}));}[_0x369715(0x170)](_0x5bbd65,_0x324550,_0x158a3f){const _0x1d19ad=_0x369715;let _0x4180cc=this[_0x1d19ad(0x171)][_0x1d19ad(0x174)](_0x5bbd65,_0x324550,_0x158a3f);_0x4180cc&&(_0x4180cc[_0x1d19ad(0x19d)]?this['_threadCommentModel'][_0x1d19ad(0x180)](_0x5bbd65,_0x324550,_0x158a3f):this[_0x1d19ad(0x171)]['deleteThread'](_0x5bbd65,_0x324550,_0x4180cc[_0x1d19ad(0x192)]));}['_resolveComment'](_0x5e30e0,_0x53aab8,_0x1bb5e8,_0xe253c){const _0x50b0e8=_0x369715;(_0xe253c===_0x3b920b[_0x50b0e8(0x1b7)]||_0xe253c===_0x3b920b[_0x50b0e8(0x18c)])&&this[_0x50b0e8(0x171)]['resolveComment'](_0x5e30e0,_0x53aab8,_0x1bb5e8,_0xe253c===_0x3b920b[_0x50b0e8(0x1b7)]);}[_0x369715(0x169)](){const _0x1d7aeb=_0x369715;this['disposeWithMe'](this[_0x1d7aeb(0x1a1)][_0x1d7aeb(0x15a)]['subscribe'](_0x4912bc=>{const _0x518902=_0x1d7aeb;var _0x22b9d9;let _0x4ff859=(_0x22b9d9=this[_0x518902(0x171)]['getUnit'](_0x4912bc[_0x518902(0x1c1)])['find'](_0x5d3842=>_0x5d3842[_0x518902(0x192)]===_0x4912bc[_0x518902(0x192)]))==null?void 0x0:_0x22b9d9[_0x518902(0x1ba)];if(!_0x4ff859)return;let {unitId:_0x3d14bb,subUnitId:_0x62c61d}=_0x4ff859;switch(_0x4912bc[_0x518902(0x1ab)]&&this['_userService'][_0x518902(0x1af)](_0x4912bc[_0x518902(0x1ab)]),_0x4912bc['type']){case _0x4fb788[_0x518902(0x15d)]:{var _0xbe5e05;let _0x3bfb71=O(_0x4912bc[_0x518902(0x19c)]);if(!_0x4912bc[_0x518902(0x16a)]||!_0x4912bc['createTimestamp']||!_0x3bfb71)return;this['_threadCommentModel']['addComment'](_0x3d14bb,_0x62c61d,{'unitId':_0x3d14bb,'subUnitId':_0x62c61d,'ref':'','id':_0x4912bc[_0x518902(0x16a)],'dT':D(+_0x4912bc[_0x518902(0x15b)]),'threadId':_0x4912bc['threadId'],'personId':((_0xbe5e05=_0x4912bc[_0x518902(0x1ab)])==null?void 0x0:_0xbe5e05[_0x518902(0x151)])??_0x4912bc[_0x518902(0x1a3)],'text':_0x3bfb71,'parentId':_0x4ff859['id']});break;}case _0x4fb788[_0x518902(0x14f)]:if(!_0x4912bc['replyId']){this[_0x518902(0x171)][_0x518902(0x18e)](_0x3d14bb,_0x62c61d,_0x4ff859['threadId']);break;}this[_0x518902(0x170)](_0x3d14bb,_0x62c61d,_0x4912bc[_0x518902(0x16a)]);break;case _0x4fb788['Edit']:{let _0x4e514e=O(_0x4912bc[_0x518902(0x19c)]);if(!_0x4912bc[_0x518902(0x16a)]||!_0x4e514e)return;this[_0x518902(0x171)][_0x518902(0x159)](_0x3d14bb,_0x62c61d,{'commentId':_0x4912bc[_0x518902(0x16a)],'text':_0x4e514e});break;}case _0x4fb788[_0x518902(0x162)]:this[_0x518902(0x1be)](_0x3d14bb,_0x62c61d,_0x4ff859['id'],_0x4912bc['solved']);}}));}};M=j([A(0x0,_0x2b10fb(_0x32b201)),A(0x1,_0x2b10fb(_0xdd247c)),A(0x2,_0x2b10fb(_0x21b731)),A(0x3,_0x2b10fb(_0x253ff8))],M);function N(_0x3b177c,_0x1be796){const _0x3de477=_0x369715;let _0x2cb537=Number(_0x3b177c==null?void 0x0:_0x3b177c[_0x3de477(0x15b)]);return!!(_0x3b177c&&_0x3b177c[_0x3de477(0x16a)]&&_0x3b177c[_0x3de477(0x192)]===_0x1be796&&_0x3b177c[_0x3de477(0x1a3)]&&Number[_0x3de477(0x178)](_0x2cb537)&&_0x2cb537>0x0);}function P(_0x589581,_0x30205f){const _0xa1927b=_0x369715;let _0xee8977=_0x589581[_0xa1927b(0x1bf)][0x0];if(!_0x589581['threadId']||!N(_0xee8977,_0x589581[_0xa1927b(0x192)]))throw Error(_0xa1927b(0x19a));return{..._0x30205f,'id':_0xee8977[_0xa1927b(0x16a)],'resolved':_0x589581[_0xa1927b(0x18f)]===0x1,'dT':D(_0xee8977[_0xa1927b(0x15b)]),'personId':_0xee8977[_0xa1927b(0x1a3)],'threadId':_0xee8977[_0xa1927b(0x192)]};}function F(_0x40bccc,_0x1d1556,_0x596fdd,_0x1b100c){const _0x29ac8c=_0x369715;if((_0x40bccc==null?void 0x0:_0x40bccc[_0x29ac8c(0x192)])===_0x1d1556&&_0x40bccc[_0x29ac8c(0x1bf)][_0x29ac8c(0x150)]>0x0){let _0x1577fe=(_0x91f3f5,_0x210313)=>{const _0x451dd8=_0x29ac8c;if(!N(_0x91f3f5,_0x1d1556))return null;let _0xfd002e=O(_0x91f3f5[_0x451dd8(0x19c)]);return _0xfd002e?{'id':_0x91f3f5[_0x451dd8(0x16a)],'threadId':_0x91f3f5['threadId'],'dT':D(_0x91f3f5[_0x451dd8(0x15b)]),'personId':_0x91f3f5['userId'],'resolved':_0x40bccc[_0x451dd8(0x18f)]===_0x3b920b[_0x451dd8(0x1b7)],'unitId':_0x596fdd,'subUnitId':_0x1b100c,'text':_0xfd002e,'parentId':_0x210313}:null;},_0x50af62=_0x1577fe(_0x40bccc[_0x29ac8c(0x1bf)][0x0]);if(!_0x50af62)return null;let _0x479349=new Set([_0x50af62['id']]),_0x43b5e3=_0x40bccc['replies'][_0x29ac8c(0x187)](0x1)[_0x29ac8c(0x1b6)](_0x2b046b=>{const _0x5f1ce8=_0x29ac8c;let _0x5237e7=_0x1577fe(_0x2b046b,_0x50af62['id']);return!_0x5237e7||_0x479349[_0x5f1ce8(0x193)](_0x5237e7['id'])?[]:(_0x479349[_0x5f1ce8(0x18a)](_0x5237e7['id']),[_0x5237e7]);});return{..._0x50af62,'children':_0x43b5e3};}return null;}let I=class{constructor(_0x1f169c,_0x361bbf,_0x3af923){const _0x4347a7=_0x369715;this[_0x4347a7(0x1c0)]=_0x1f169c,this['_userService']=_0x361bbf,this[_0x4347a7(0x1a4)]=_0x3af923;}async[_0x369715(0x181)](_0x42a673){const _0x54fadd=_0x369715;var _0x4d8950;let {parentId:_0x49ff37,unitId:_0x5ba8da,text:_0x151477,threadId:_0x162a7e}=_0x42a673,_0x89a4af=((_0x4d8950=_0x151477['customRanges'])==null?void 0x0:_0x4d8950[_0x54fadd(0x1b5)](_0x3771a7=>_0x3771a7[_0x54fadd(0x155)]===_0x483613['COMMENT'])[_0x54fadd(0x1a0)](_0x52c8c2=>_0x52c8c2[_0x54fadd(0x198)]))??[],_0x349a75=JSON[_0x54fadd(0x182)](_0x151477),_0xb91000=(await this[_0x54fadd(0x1a4)]['requireSession'](_0x5ba8da))[_0x54fadd(0x196)]();if(_0x49ff37){let _0x603f28={'memberId':_0xb91000,'unitId':_0x5ba8da,'content':_0x349a75,'mention':_0x89a4af,'threadId':_0x162a7e},_0x4a4092=await this['_httpService'][_0x54fadd(0x199)](_0x54fadd(0x177)+_0x5ba8da+_0x54fadd(0x1ac),{'body':_0x603f28}),_0x2143fc=_0x4a4092[_0x54fadd(0x16e)]['reply'];if(_0x4a4092[_0x54fadd(0x16e)][_0x54fadd(0x1aa)]&&_0x4a4092[_0x54fadd(0x16e)]['error'][_0x54fadd(0x164)]!==0x1||!N(_0x2143fc,_0x162a7e)){var _0x5de612;throw Error(((_0x5de612=_0x4a4092['body'][_0x54fadd(0x1aa)])==null?void 0x0:_0x5de612[_0x54fadd(0x179)])??_0x54fadd(0x172));}return{..._0x42a673,'id':_0x2143fc[_0x54fadd(0x16a)],'dT':_0x11dce2(+_0x2143fc['createTimestamp'])[_0x54fadd(0x19f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2143fc['userId']};}{let _0x458b4c={'memberId':_0xb91000,'unitId':_0x5ba8da,'content':_0x349a75,'mention':_0x89a4af},_0x22d3b8=await this['_httpService'][_0x54fadd(0x199)](_0x54fadd(0x177)+_0x5ba8da+_0x54fadd(0x176),{'body':_0x458b4c});if(_0x22d3b8['body'][_0x54fadd(0x1aa)]&&_0x22d3b8[_0x54fadd(0x16e)][_0x54fadd(0x1aa)]['code']!==0x1||!_0x22d3b8['body'][_0x54fadd(0x19e)]){var _0x1084ea;throw Error(((_0x1084ea=_0x22d3b8['body'][_0x54fadd(0x1aa)])==null?void 0x0:_0x1084ea[_0x54fadd(0x179)])??_0x54fadd(0x1ad));}return P(_0x22d3b8[_0x54fadd(0x16e)][_0x54fadd(0x19e)],_0x42a673);}}async[_0x369715(0x159)](_0x44e2a0){const _0x42dbc8=_0x369715;var _0x4a0778;let {text:_0x118d7c,unitId:_0x9d6d81}=_0x44e2a0,_0x379d68=((_0x4a0778=_0x118d7c['customRanges'])==null?void 0x0:_0x4a0778[_0x42dbc8(0x1b5)](_0x11c8f2=>_0x11c8f2[_0x42dbc8(0x155)]===_0x483613[_0x42dbc8(0x166)])[_0x42dbc8(0x1a0)](_0x5cdb44=>_0x5cdb44['rangeId']))??[],_0x557d81=JSON[_0x42dbc8(0x182)](_0x118d7c),_0x35ecec=_0x44e2a0[_0x42dbc8(0x192)],_0x26da99=_0x44e2a0['id'],_0x1e770f={'memberId':(await this[_0x42dbc8(0x1a4)]['requireSession'](_0x9d6d81))[_0x42dbc8(0x196)](),'unitId':_0x9d6d81,'threadId':_0x35ecec,'mention':_0x379d68,'content':_0x557d81,'replyId':_0x26da99},_0x20e041=await this['_httpService']['post'](_0x42dbc8(0x177)+_0x9d6d81+_0x42dbc8(0x17f),{'body':_0x1e770f});return!_0x20e041[_0x42dbc8(0x16e)]['error']||_0x20e041[_0x42dbc8(0x16e)][_0x42dbc8(0x1aa)][_0x42dbc8(0x164)]===0x1;}async[_0x369715(0x18d)](_0x2fc4b9){const _0x326ede=_0x369715;let {unitId:_0x554702}=_0x2fc4b9,_0x178894=_0x2fc4b9[_0x326ede(0x192)],_0x3f5b80={'memberId':(await this['_sessionService'][_0x326ede(0x1b4)](_0x554702))[_0x326ede(0x196)](),'unitId':_0x554702,'threadId':_0x178894,'solved':_0x2fc4b9['resolved']?_0x3b920b[_0x326ede(0x1b7)]:_0x3b920b[_0x326ede(0x18c)]},_0x15005a=await this[_0x326ede(0x1c0)][_0x326ede(0x199)](_0x326ede(0x177)+_0x554702+_0x326ede(0x14e),{'body':_0x3f5b80});return!_0x15005a['body'][_0x326ede(0x1aa)]||_0x15005a[_0x326ede(0x16e)][_0x326ede(0x1aa)][_0x326ede(0x164)]===0x1;}['deleteComment'](_0x468c11,_0xd377f3,_0x2898cf,_0x58d03a){const _0x515c43=_0x369715;return this[_0x515c43(0x170)](_0x468c11,_0x2898cf,_0x58d03a);}[_0x369715(0x18e)](_0x4eb25f,_0x336be3,_0x548725){const _0x59aeba=_0x369715;return this[_0x59aeba(0x170)](_0x4eb25f,_0x548725);}async[_0x369715(0x170)](_0x9ac5da,_0x4bce19,_0x1ba71c){const _0x59878d=_0x369715;let _0x13b510={'memberId':(await this[_0x59878d(0x1a4)][_0x59878d(0x1b4)](_0x9ac5da))[_0x59878d(0x196)](),'threadId':_0x4bce19,'replyId':_0x1ba71c,'unitId':_0x9ac5da},_0x21a92c=await this[_0x59878d(0x1c0)][_0x59878d(0x199)]('/universer-api/comment/unit/'+_0x9ac5da+'/delete',{'body':_0x13b510});return!_0x21a92c[_0x59878d(0x16e)][_0x59878d(0x1aa)]||_0x21a92c[_0x59878d(0x16e)][_0x59878d(0x1aa)]['code']===0x1;}async[_0x369715(0x1a9)](_0x10cb5a,_0x5c0ba0,_0x14d56f){const _0x5bdb6c=_0x369715;let _0x2d6d07={'unitId':_0x10cb5a,'threadId':_0x14d56f},_0x31d4f3=await this[_0x5bdb6c(0x1c0)][_0x5bdb6c(0x199)](_0x5bdb6c(0x177)+_0x10cb5a+_0x5bdb6c(0x1b0),{'body':_0x2d6d07});if(_0x31d4f3[_0x5bdb6c(0x16e)][_0x5bdb6c(0x1aa)]&&_0x31d4f3[_0x5bdb6c(0x16e)][_0x5bdb6c(0x1aa)][_0x5bdb6c(0x164)]!==0x1)throw Error(_0x31d4f3['body']['error'][_0x5bdb6c(0x179)]||_0x5bdb6c(0x17d));let _0xba88a8=_0x14d56f[_0x5bdb6c(0x1a0)](_0x86caee=>{const _0x209057=_0x5bdb6c;var _0x35a890;return F((_0x35a890=_0x31d4f3[_0x209057(0x16e)][_0x209057(0x163)])==null?void 0x0:_0x35a890[_0x86caee],_0x86caee,_0x10cb5a,_0x5c0ba0);})[_0x5bdb6c(0x1b5)](Boolean);return Object[_0x5bdb6c(0x16b)](_0x31d4f3[_0x5bdb6c(0x16e)][_0x5bdb6c(0x167)]??{})[_0x5bdb6c(0x15c)](_0x124382=>{const _0x19d5a0=_0x5bdb6c;this[_0x19d5a0(0x14b)][_0x19d5a0(0x1af)](_0x124382);}),_0xba88a8;}['saveCommentToSnapshot'](_0x5b3674){const _0x21f3db=_0x369715;var _0x208bf1;return{'id':_0x5b3674['id'],'threadId':_0x5b3674[_0x21f3db(0x192)],'ref':_0x5b3674[_0x21f3db(0x17a)],..._0x5b3674[_0x21f3db(0x1bc)]===void 0x0?{}:{'authorName':_0x5b3674[_0x21f3db(0x1bc)],'personId':_0x5b3674[_0x21f3db(0x1a7)]},...(_0x208bf1=_0x5b3674[_0x21f3db(0x17b)])!=null&&_0x208bf1[_0x21f3db(0x1b3)](_0x526c11=>_0x526c11[_0x21f3db(0x1bc)]!==void 0x0)?{'children':_0x5b3674[_0x21f3db(0x17b)][_0x21f3db(0x1b5)](_0x58b345=>_0x58b345[_0x21f3db(0x1bc)]!==void 0x0)[_0x21f3db(0x1a0)](_0x471315=>({'id':_0x471315['id'],'threadId':_0x471315['threadId'],'ref':'','parentId':_0x5b3674['id'],'personId':_0x471315[_0x21f3db(0x1a7)],'authorName':_0x471315['authorName']}))}:{}};}};I=j([A(0x0,_0x2b10fb(_0x3b384d)),A(0x1,_0x2b10fb(_0x21b731)),A(0x2,_0x2b10fb(_0xc5af2f))],I);let L=class extends _0x409b78{constructor(_0x45a97f,_0x3fdb49){const _0x5250f5=_0x369715;super(),this['_threadCommentDataSourceService']=_0x45a97f,this[_0x5250f5(0x14c)]=_0x3fdb49,this[_0x5250f5(0x1b1)]();}[_0x369715(0x1b1)](){const _0x2ff59c=_0x369715;this[_0x2ff59c(0x14d)]['dataSource']=this[_0x2ff59c(0x14c)],this[_0x2ff59c(0x14d)][_0x2ff59c(0x194)]=!0x1;}};L=j([A(0x0,_0x1c00be),A(0x1,_0x2b10fb(I))],L);function R(_0x46b70d){'@babel/helpers - typeof';const _0x5b840c=_0x369715;return R=typeof Symbol=='function'&&typeof Symbol[_0x5b840c(0x15f)]==_0x5b840c(0x173)?function(_0x1c0ac9){return typeof _0x1c0ac9;}:function(_0x4aadd2){const _0x2c4f5b=_0x5b840c;return _0x4aadd2&&typeof Symbol==_0x2c4f5b(0x175)&&_0x4aadd2['constructor']===Symbol&&_0x4aadd2!==Symbol['prototype']?_0x2c4f5b(0x173):typeof _0x4aadd2;},R(_0x46b70d);}function _0x5e8b(_0x31ec0f,_0x540505){_0x31ec0f=_0x31ec0f-0x14b;const _0x151d64=_0x151d();let _0x5e8b8c=_0x151d64[_0x31ec0f];return _0x5e8b8c;}function z(_0x4f6c0e,_0x488d68){const _0x3188ea=_0x369715;if(R(_0x4f6c0e)!=_0x3188ea(0x1a2)||!_0x4f6c0e)return _0x4f6c0e;var _0x10622f=_0x4f6c0e[Symbol[_0x3188ea(0x16f)]];if(_0x10622f!==void 0x0){var _0x3470b2=_0x10622f[_0x3188ea(0x165)](_0x4f6c0e,_0x488d68||_0x3188ea(0x160));if(R(_0x3470b2)!=_0x3188ea(0x1a2))return _0x3470b2;throw TypeError(_0x3188ea(0x1bb));}return(_0x488d68===_0x3188ea(0x154)?String:Number)(_0x4f6c0e);}function B(_0x316301){var _0x3c14b8=z(_0x316301,'string');return R(_0x3c14b8)=='symbol'?_0x3c14b8:_0x3c14b8+'';}function _0x151d(){const _0x1f3b8c=['getComment','function','/add','/universer-api/comment/unit/','isFinite','message','ref','children','_configService','Comment\x20service\x20failed\x20to\x20list\x20comments','3389396hZDivN','/edit','deleteComment','addComment','stringify','decorate','getUser','YYYY/MM/DD\x20HH:mm','pipe','slice','defineProperty','onStarting','add','size','OpenOrReOpen','resolveComment','deleteThread','solved','295074oLhDxt','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','has','syncUpdateMutationToColla','1.0.4','getMemberID','6xQIgkv','rangeId','post','Comment\x20service\x20returned\x20an\x20invalid\x20thread','_initUserSync','content','parentId','comment','format','map','_commentService','object','userId','_sessionService','120229lBeBAu','_injector','personId','setConfig','listComments','error','user','/reply','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20comment','752TJRBlT','addUser','/list','_initDataSource','onReady','some','requireSession','filter','flatMap','Solved','63819eIoKbZ','263922scOWYJ','root','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','authorName','getOwnPropertyDescriptor','_resolveComment','replies','_httpService','unitId','_userService','_threadCommentDataSource','_threadCommentDataSourceService','/solved','Delete','length','userID','5177102QqQmYN','/universer-api/user/list','string','rangeType','pluginName','packageName','_config','updateComment','commentUpdate$','createTimestamp','forEach','Reply','@univerjs-pro/thread-comment-datasource','iterator','default','delete','Solve','comments','code','call','COMMENT','users','554145OBNCSn','_init','replyId','values','get','disposeWithMe','body','toPrimitive','_deleteComment','_threadCommentModel','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20reply','symbol'];_0x151d=function(){return _0x1f3b8c;};return _0x151d();}function V(_0x582711,_0x1c7810,_0x13e182){return(_0x1c7810=B(_0x1c7810))in _0x582711?Object['defineProperty'](_0x582711,_0x1c7810,{'value':_0x13e182,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x582711[_0x1c7810]=_0x13e182,_0x582711;}let H=class extends _0x4a3d0a{constructor(_0x4aa476=E,_0x1f6e98,_0x4b544c){const _0xe4e73=_0x369715;super(),this[_0xe4e73(0x158)]=_0x4aa476,this[_0xe4e73(0x1a6)]=_0x1f6e98,this[_0xe4e73(0x17c)]=_0x4b544c;let {..._0x321235}=_0x5b00d6({},E,this[_0xe4e73(0x158)]);this[_0xe4e73(0x17c)][_0xe4e73(0x1a8)]('thread-comment-data-source.config',_0x321235);}[_0x369715(0x189)](){const _0x5e5bca=_0x369715;[[I],[L],[M]][_0x5e5bca(0x15c)](_0x361e35=>{const _0x20abbe=_0x5e5bca;this[_0x20abbe(0x1a6)][_0x20abbe(0x18a)](_0x361e35);});}[_0x369715(0x1b2)](){const _0x2aa5a1=_0x369715;this['_injector'][_0x2aa5a1(0x16c)](L),this[_0x2aa5a1(0x1a6)][_0x2aa5a1(0x16c)](M);}};V(H,_0x369715(0x156),_0x369715(0x191)),V(H,_0x369715(0x157),w),V(H,'version',T),H=j([_0x3bcb4e(_0x169bd4,_0x189162,_0x271566,_0x4f1498,_0xd94099),A(0x1,_0x2b10fb(_0x253ff8)),A(0x2,_0xfcc38c)],H);export{H as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x448f(_0x49e536,_0x1b6107){_0x49e536=_0x49e536-0x1cf;const _0x17c850=_0x17c8();let _0x448f36=_0x17c850[_0x49e536];return _0x448f36;}function _0x17c8(){const _0x2a8c0c=['listComments','defineProperty','saveCommentToSnapshot','/list','/delete','packageName','delete','flatMap','OpenOrReOpen','authorName','27FHdSyi','forEach','CommentSolvedStatus','getComment','Solve','stringify','UniverThreadCommentUIPlugin','root','5830410exdOwZ','UniverThreadCommentUi','length','Inject','IThreadCommentDataSourceService','_config','UniverThreadCommentDataSourcePlugin','CommentService','isThreadCommentDocumentBody','setConfig','comment','_initDataSource','content','_init','replies','COMMENT','4339032jNWUCp','UserManagerService','UniverThreadComment','body','_commentService','object','customRanges','UniverLicensePlugin','Edit','subscribe','type','CommentUpdateEventType','getOwnPropertyDescriptor','getUnit','symbol','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','onReady','UniverProLicense','userId','HTTPService','bufferTime','UniverNetworkPlugin','/edit','3XIZuQu','_httpService','solved','_resolveComment','Module','_threadCommentDataSource','addComment','getMemberID','@univerjs-pro/thread-comment-datasource','parentId','parse','toStringTag','@univerjs/core','rangeType','exports','Solved','comments','dateKit','/reply','18isvtSE','personId','users','amd','unitId','UniverCollaborationClientPlugin','reply','threadId','_configService','userID','930057LwcHBk','requireSession','thread-comment-data-source.config','_initUserSync','_threadCommentDataSourceService','createTimestamp','@univerjs/protocol','Reply','resolveComment','string','deleteComment','isFinite','disposeWithMe','filter','add','@univerjs-pro/license','8200864ypwlmT','updateComment','1778620FBhNJZ','UniverProtocol','rangeId','@univerjs-pro/collaboration-client','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20comment','slice','CustomRangeType','pipe','_threadCommentModel','onStarting','message','get','commentUpdate$','_userService','Disposable','_deleteComment','UniverNetwork','user','decorate','UniverProThreadCommentDatasource','default','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20reply','constructor','map','payload','1.0.2','/add','@univerjs/network','Plugin','children','UniverCore','deleteThread','5970993vHHFEg','Delete','_injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','find','rxjs','code','addUser','_sessionService','/universer-api/comment/unit/','error','ThreadCommentModel','replyId','function','format','post','merge','@univerjs/thread-comment','1752wVvihN','YYYY/MM/DD\x20HH:mm','iterator'];_0x17c8=function(){return _0x2a8c0c;};return _0x17c8();}(function(_0x4470e2,_0x5584f6){const _0x560895=_0x448f,_0x4ecf34=_0x4470e2();while(!![]){try{const _0x219fe9=-parseInt(_0x560895(0x264))/0x1+parseInt(_0x560895(0x20b))/0x2+parseInt(_0x560895(0x247))/0x3*(-parseInt(_0x560895(0x230))/0x4)+-parseInt(_0x560895(0x1d9))/0x5*(-parseInt(_0x560895(0x25a))/0x6)+parseInt(_0x560895(0x1f9))/0x7+-parseInt(_0x560895(0x1d7))/0x8+parseInt(_0x560895(0x218))/0x9*(parseInt(_0x560895(0x220))/0xa);if(_0x219fe9===_0x5584f6)break;else _0x4ecf34['push'](_0x4ecf34['shift']());}catch(_0x4600f3){_0x4ecf34['push'](_0x4ecf34['shift']());}}}(_0x17c8,0x99de7),function(_0x543d09,_0xdbe8ec){const _0x54cb88=_0x448f;typeof exports==_0x54cb88(0x235)&&typeof module<'u'?_0xdbe8ec(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/network'),require('@univerjs/thread-comment'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('rxjs')):typeof define==_0x54cb88(0x206)&&define[_0x54cb88(0x25d)]?define([_0x54cb88(0x255),_0x54cb88(0x1dc),_0x54cb88(0x1d6),_0x54cb88(0x253),_0x54cb88(0x1f4),_0x54cb88(0x20a),'@univerjs/thread-comment-ui',_0x54cb88(0x26a),_0x54cb88(0x1fe)],_0xdbe8ec):(_0x543d09=typeof globalThis<'u'?globalThis:_0x543d09||self,_0xdbe8ec(_0x543d09[_0x54cb88(0x1ec)]={},_0x543d09['UniverProCollaborationClient'],_0x543d09[_0x54cb88(0x241)],_0x543d09[_0x54cb88(0x1f7)],_0x543d09[_0x54cb88(0x1e9)],_0x543d09[_0x54cb88(0x232)],_0x543d09[_0x54cb88(0x221)],_0x543d09[_0x54cb88(0x1da)],_0x543d09['rxjs']));}(this,function(_0x3d6862,_0x3967ab,_0x5e722d,_0x48447a,_0x2d7325,_0x128055,_0x3db9e4,_0x710105,_0x2a8834){const _0x15ba46=_0x448f;Object['defineProperty'](_0x3d6862,Symbol[_0x15ba46(0x252)],{'value':_0x15ba46(0x24b)});var _0x109232=_0x15ba46(0x24f),_0x2591e4=_0x15ba46(0x1f2);let _0x18d08f={},_0x265e50=_0x18b344=>(0x0,_0x48447a['dateKit'])(new Date(+_0x18b344))['format'](_0x15ba46(0x20c));function _0x4b299f(_0x5ef5bf){const _0x176703=_0x15ba46;if(!_0x5ef5bf)return null;try{let _0x69c95b=JSON[_0x176703(0x251)](_0x5ef5bf);return(0x0,_0x128055[_0x176703(0x228)])(_0x69c95b)?_0x69c95b:null;}catch{return null;}}let _0x3c9271=async(_0x30c709,_0x3834cb)=>{const _0x2ab665=_0x15ba46;let _0x1e74b7=_0x30c709[_0x2ab665(0x1e4)](_0x48447a[_0x2ab665(0x231)]),_0x5ef195=_0x30c709['get'](_0x2d7325[_0x2ab665(0x243)]);_0x3834cb['forEach'](_0x3e5794=>{const _0x583f12=_0x2ab665;_0x1e74b7['getUser'](_0x3e5794)&&_0x3834cb[_0x583f12(0x214)](_0x3e5794);}),_0x3834cb['size']&&(await _0x5ef195[_0x2ab665(0x1e4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3834cb]}}))[_0x2ab665(0x233)]['users'][_0x2ab665(0x219)](_0x5af29d=>{const _0x7eae1a=_0x2ab665;_0x5af29d&&_0x1e74b7[_0x7eae1a(0x200)](_0x5af29d);});};function _0x358749(_0x57c55d,_0x1e1a9c){return function(_0x16c1e4,_0x51e96c){_0x1e1a9c(_0x16c1e4,_0x51e96c,_0x57c55d);};}function _0x50f2f8(_0x287027,_0x20066b,_0x516257,_0x509a9c){const _0x56e934=_0x15ba46;var _0x5afa02=arguments['length'],_0x3445d0=_0x5afa02<0x3?_0x20066b:_0x509a9c===null?_0x509a9c=Object[_0x56e934(0x23c)](_0x20066b,_0x516257):_0x509a9c,_0xb1b1b6;if(typeof Reflect==_0x56e934(0x235)&&typeof Reflect[_0x56e934(0x1eb)]==_0x56e934(0x206))_0x3445d0=Reflect[_0x56e934(0x1eb)](_0x287027,_0x20066b,_0x516257,_0x509a9c);else{for(var _0x207f28=_0x287027[_0x56e934(0x222)]-0x1;_0x207f28>=0x0;_0x207f28--)(_0xb1b1b6=_0x287027[_0x207f28])&&(_0x3445d0=(_0x5afa02<0x3?_0xb1b1b6(_0x3445d0):_0x5afa02>0x3?_0xb1b1b6(_0x20066b,_0x516257,_0x3445d0):_0xb1b1b6(_0x20066b,_0x516257))||_0x3445d0);}return _0x5afa02>0x3&&_0x3445d0&&Object[_0x56e934(0x20f)](_0x20066b,_0x516257,_0x3445d0),_0x3445d0;}let _0x4cf6c4=class extends _0x48447a['Disposable']{constructor(_0x5d4e78,_0x4cc5f2,_0x480d31,_0x339b78){const _0x25adb7=_0x15ba46;super(),this[_0x25adb7(0x234)]=_0x5d4e78,this['_threadCommentModel']=_0x4cc5f2,this[_0x25adb7(0x1e6)]=_0x480d31,this[_0x25adb7(0x1fb)]=_0x339b78,this[_0x25adb7(0x22d)](),this['_initUserSync']();}[_0x15ba46(0x267)](){const _0x509e80=_0x15ba46;this[_0x509e80(0x1d3)](this[_0x509e80(0x1e1)][_0x509e80(0x1e5)][_0x509e80(0x1e0)]((0x0,_0x2a8834[_0x509e80(0x244)])(0x10))[_0x509e80(0x239)](_0x919f3e=>{const _0x174bd=_0x509e80;let _0x4ebd70=new Set();_0x919f3e[_0x174bd(0x219)](_0x444fa7=>{const _0x3cefe2=_0x174bd;switch(_0x444fa7[_0x3cefe2(0x23a)]){case'add':{let _0x2f43c8=_0x444fa7[_0x3cefe2(0x1f1)]['personId'];_0x4ebd70[_0x3cefe2(0x1d5)](_0x2f43c8);break;}}}),_0x3c9271(this[_0x174bd(0x1fb)],_0x4ebd70);}));}['_deleteComment'](_0x39703a,_0x2ea6ca,_0x6fdb8f){const _0x1af01f=_0x15ba46;let _0x4dd972=this[_0x1af01f(0x1e1)][_0x1af01f(0x21b)](_0x39703a,_0x2ea6ca,_0x6fdb8f);_0x4dd972&&(_0x4dd972[_0x1af01f(0x250)]?this[_0x1af01f(0x1e1)]['deleteComment'](_0x39703a,_0x2ea6ca,_0x6fdb8f):this[_0x1af01f(0x1e1)][_0x1af01f(0x1f8)](_0x39703a,_0x2ea6ca,_0x4dd972[_0x1af01f(0x261)]));}[_0x15ba46(0x24a)](_0x22708b,_0x28de63,_0x3589ec,_0x31f6a5){const _0x45d7f7=_0x15ba46;(_0x31f6a5===_0x710105[_0x45d7f7(0x21a)][_0x45d7f7(0x256)]||_0x31f6a5===_0x710105[_0x45d7f7(0x21a)][_0x45d7f7(0x216)])&&this['_threadCommentModel'][_0x45d7f7(0x1cf)](_0x22708b,_0x28de63,_0x3589ec,_0x31f6a5===_0x710105[_0x45d7f7(0x21a)][_0x45d7f7(0x256)]);}[_0x15ba46(0x22d)](){const _0x2d4026=_0x15ba46;this[_0x2d4026(0x1d3)](this['_commentService'][_0x2d4026(0x1e5)]['subscribe'](_0x52cbfa=>{const _0x3ca4d7=_0x2d4026;var _0x283451;let _0x2d10da=(_0x283451=this[_0x3ca4d7(0x1e1)][_0x3ca4d7(0x23d)](_0x52cbfa[_0x3ca4d7(0x25e)])[_0x3ca4d7(0x1fd)](_0x1b692b=>_0x1b692b[_0x3ca4d7(0x261)]===_0x52cbfa[_0x3ca4d7(0x261)]))==null?void 0x0:_0x283451[_0x3ca4d7(0x21f)];if(!_0x2d10da)return;let {unitId:_0x4e82d8,subUnitId:_0x49078b}=_0x2d10da;switch(_0x52cbfa[_0x3ca4d7(0x1ea)]&&this['_userService'][_0x3ca4d7(0x200)](_0x52cbfa['user']),_0x52cbfa[_0x3ca4d7(0x23a)]){case _0x710105[_0x3ca4d7(0x23b)][_0x3ca4d7(0x26b)]:{var _0x371763;let _0x27e055=_0x4b299f(_0x52cbfa[_0x3ca4d7(0x22c)]);if(!_0x52cbfa[_0x3ca4d7(0x205)]||!_0x52cbfa['createTimestamp']||!_0x27e055)return;this[_0x3ca4d7(0x1e1)][_0x3ca4d7(0x24d)](_0x4e82d8,_0x49078b,{'unitId':_0x4e82d8,'subUnitId':_0x49078b,'ref':'','id':_0x52cbfa[_0x3ca4d7(0x205)],'dT':_0x265e50(+_0x52cbfa[_0x3ca4d7(0x269)]),'threadId':_0x52cbfa['threadId'],'personId':((_0x371763=_0x52cbfa[_0x3ca4d7(0x1ea)])==null?void 0x0:_0x371763[_0x3ca4d7(0x263)])??_0x52cbfa[_0x3ca4d7(0x242)],'text':_0x27e055,'parentId':_0x2d10da['id']});break;}case _0x710105[_0x3ca4d7(0x23b)][_0x3ca4d7(0x1fa)]:if(!_0x52cbfa['replyId']){this[_0x3ca4d7(0x1e1)][_0x3ca4d7(0x1f8)](_0x4e82d8,_0x49078b,_0x2d10da['threadId']);break;}this[_0x3ca4d7(0x1e8)](_0x4e82d8,_0x49078b,_0x52cbfa[_0x3ca4d7(0x205)]);break;case _0x710105[_0x3ca4d7(0x23b)][_0x3ca4d7(0x238)]:{let _0x3fb070=_0x4b299f(_0x52cbfa['content']);if(!_0x52cbfa[_0x3ca4d7(0x205)]||!_0x3fb070)return;this[_0x3ca4d7(0x1e1)]['updateComment'](_0x4e82d8,_0x49078b,{'commentId':_0x52cbfa[_0x3ca4d7(0x205)],'text':_0x3fb070});break;}case _0x710105['CommentUpdateEventType'][_0x3ca4d7(0x21c)]:this[_0x3ca4d7(0x24a)](_0x4e82d8,_0x49078b,_0x2d10da['id'],_0x52cbfa['solved']);}}));}};_0x4cf6c4=_0x50f2f8([_0x358749(0x0,(0x0,_0x48447a[_0x15ba46(0x223)])(_0x3967ab[_0x15ba46(0x227)])),_0x358749(0x1,(0x0,_0x48447a[_0x15ba46(0x223)])(_0x128055[_0x15ba46(0x204)])),_0x358749(0x2,(0x0,_0x48447a['Inject'])(_0x48447a[_0x15ba46(0x231)])),_0x358749(0x3,(0x0,_0x48447a[_0x15ba46(0x223)])(_0x48447a['Injector']))],_0x4cf6c4);function _0x108d45(_0x54ab43,_0x310102){const _0x1e16ac=_0x15ba46;let _0xa38db5=Number(_0x54ab43==null?void 0x0:_0x54ab43[_0x1e16ac(0x269)]);return!!(_0x54ab43&&_0x54ab43[_0x1e16ac(0x205)]&&_0x54ab43[_0x1e16ac(0x261)]===_0x310102&&_0x54ab43[_0x1e16ac(0x242)]&&Number[_0x1e16ac(0x1d2)](_0xa38db5)&&_0xa38db5>0x0);}function _0xc89a70(_0x46338e,_0xc0ed1f){const _0x5049a1=_0x15ba46;let _0x2396df=_0x46338e[_0x5049a1(0x22e)][0x0];if(!_0x46338e[_0x5049a1(0x261)]||!_0x108d45(_0x2396df,_0x46338e[_0x5049a1(0x261)]))throw Error('Comment\x20service\x20returned\x20an\x20invalid\x20thread');return{..._0xc0ed1f,'id':_0x2396df[_0x5049a1(0x205)],'resolved':_0x46338e[_0x5049a1(0x249)]===0x1,'dT':_0x265e50(_0x2396df['createTimestamp']),'personId':_0x2396df['userId'],'threadId':_0x2396df[_0x5049a1(0x261)]};}function _0x4b687e(_0x222b0a,_0x824e99,_0x227ca5,_0x5d31a2){const _0xf8319d=_0x15ba46;if((_0x222b0a==null?void 0x0:_0x222b0a[_0xf8319d(0x261)])===_0x824e99&&_0x222b0a[_0xf8319d(0x22e)]['length']>0x0){let _0x1f4690=(_0x2f0375,_0x23932a)=>{const _0x26fd0e=_0xf8319d;if(!_0x108d45(_0x2f0375,_0x824e99))return null;let _0x46a422=_0x4b299f(_0x2f0375[_0x26fd0e(0x22c)]);return _0x46a422?{'id':_0x2f0375[_0x26fd0e(0x205)],'threadId':_0x2f0375[_0x26fd0e(0x261)],'dT':_0x265e50(_0x2f0375[_0x26fd0e(0x269)]),'personId':_0x2f0375[_0x26fd0e(0x242)],'resolved':_0x222b0a[_0x26fd0e(0x249)]===_0x710105[_0x26fd0e(0x21a)]['Solved'],'unitId':_0x227ca5,'subUnitId':_0x5d31a2,'text':_0x46a422,'parentId':_0x23932a}:null;},_0xd9ac81=_0x1f4690(_0x222b0a[_0xf8319d(0x22e)][0x0]);if(!_0xd9ac81)return null;let _0x4992dd=new Set([_0xd9ac81['id']]),_0x557444=_0x222b0a[_0xf8319d(0x22e)][_0xf8319d(0x1de)](0x1)[_0xf8319d(0x215)](_0x3a4884=>{const _0xbf56d6=_0xf8319d;let _0xfcc9c4=_0x1f4690(_0x3a4884,_0xd9ac81['id']);return!_0xfcc9c4||_0x4992dd['has'](_0xfcc9c4['id'])?[]:(_0x4992dd[_0xbf56d6(0x1d5)](_0xfcc9c4['id']),[_0xfcc9c4]);});return{..._0xd9ac81,'children':_0x557444};}return null;}let _0x2c982b=class{constructor(_0x421a05,_0x2aa4c6,_0x28571a){const _0x51e352=_0x15ba46;this[_0x51e352(0x248)]=_0x421a05,this[_0x51e352(0x1e6)]=_0x2aa4c6,this['_sessionService']=_0x28571a;}async[_0x15ba46(0x24d)](_0x25e034){const _0x51dd3d=_0x15ba46;var _0x2da42e;let {parentId:_0x1316c1,unitId:_0xd7b132,text:_0x22bd23,threadId:_0x1038f2}=_0x25e034,_0x208a41=((_0x2da42e=_0x22bd23[_0x51dd3d(0x236)])==null?void 0x0:_0x2da42e[_0x51dd3d(0x1d4)](_0x122987=>_0x122987[_0x51dd3d(0x254)]===_0x48447a['CustomRangeType'][_0x51dd3d(0x22f)])[_0x51dd3d(0x1f0)](_0xe19198=>_0xe19198[_0x51dd3d(0x1db)]))??[],_0x199878=JSON['stringify'](_0x22bd23),_0x19d9f3=(await this['_sessionService']['requireSession'](_0xd7b132))[_0x51dd3d(0x24e)]();if(_0x1316c1){let _0x256f51={'memberId':_0x19d9f3,'unitId':_0xd7b132,'content':_0x199878,'mention':_0x208a41,'threadId':_0x1038f2},_0x3db3fe=await this[_0x51dd3d(0x248)][_0x51dd3d(0x208)]('/universer-api/comment/unit/'+_0xd7b132+_0x51dd3d(0x259),{'body':_0x256f51}),_0x831981=_0x3db3fe['body'][_0x51dd3d(0x260)];if(_0x3db3fe[_0x51dd3d(0x233)][_0x51dd3d(0x203)]&&_0x3db3fe[_0x51dd3d(0x233)]['error'][_0x51dd3d(0x1ff)]!==0x1||!_0x108d45(_0x831981,_0x1038f2)){var _0x2d6058;throw Error(((_0x2d6058=_0x3db3fe['body'][_0x51dd3d(0x203)])==null?void 0x0:_0x2d6058[_0x51dd3d(0x1e3)])??_0x51dd3d(0x1ee));}return{..._0x25e034,'id':_0x831981[_0x51dd3d(0x205)],'dT':(0x0,_0x48447a[_0x51dd3d(0x258)])(+_0x831981[_0x51dd3d(0x269)])[_0x51dd3d(0x207)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x831981[_0x51dd3d(0x242)]};}{let _0x509d34={'memberId':_0x19d9f3,'unitId':_0xd7b132,'content':_0x199878,'mention':_0x208a41},_0x239558=await this[_0x51dd3d(0x248)]['post']('/universer-api/comment/unit/'+_0xd7b132+_0x51dd3d(0x1f3),{'body':_0x509d34});if(_0x239558[_0x51dd3d(0x233)][_0x51dd3d(0x203)]&&_0x239558[_0x51dd3d(0x233)][_0x51dd3d(0x203)][_0x51dd3d(0x1ff)]!==0x1||!_0x239558[_0x51dd3d(0x233)][_0x51dd3d(0x22a)]){var _0x10fc99;throw Error(((_0x10fc99=_0x239558[_0x51dd3d(0x233)][_0x51dd3d(0x203)])==null?void 0x0:_0x10fc99[_0x51dd3d(0x1e3)])??_0x51dd3d(0x1dd));}return _0xc89a70(_0x239558[_0x51dd3d(0x233)][_0x51dd3d(0x22a)],_0x25e034);}}async[_0x15ba46(0x1d8)](_0x147ae0){const _0x2ce724=_0x15ba46;var _0x1521f1;let {text:_0x133774,unitId:_0x340881}=_0x147ae0,_0x44712b=((_0x1521f1=_0x133774['customRanges'])==null?void 0x0:_0x1521f1['filter'](_0x424631=>_0x424631[_0x2ce724(0x254)]===_0x48447a[_0x2ce724(0x1df)][_0x2ce724(0x22f)])['map'](_0x558703=>_0x558703[_0x2ce724(0x1db)]))??[],_0x5f29f3=JSON[_0x2ce724(0x21d)](_0x133774),_0x35a456=_0x147ae0[_0x2ce724(0x261)],_0x6d8e48=_0x147ae0['id'],_0x386cda={'memberId':(await this[_0x2ce724(0x201)][_0x2ce724(0x265)](_0x340881))['getMemberID'](),'unitId':_0x340881,'threadId':_0x35a456,'mention':_0x44712b,'content':_0x5f29f3,'replyId':_0x6d8e48},_0x4f83f2=await this['_httpService']['post'](_0x2ce724(0x202)+_0x340881+_0x2ce724(0x246),{'body':_0x386cda});return!_0x4f83f2[_0x2ce724(0x233)][_0x2ce724(0x203)]||_0x4f83f2['body'][_0x2ce724(0x203)][_0x2ce724(0x1ff)]===0x1;}async[_0x15ba46(0x1cf)](_0x2ba7dd){const _0x14ec69=_0x15ba46;let {unitId:_0xcc6d0e}=_0x2ba7dd,_0x2920ca=_0x2ba7dd[_0x14ec69(0x261)],_0xa9aa2d={'memberId':(await this[_0x14ec69(0x201)][_0x14ec69(0x265)](_0xcc6d0e))['getMemberID'](),'unitId':_0xcc6d0e,'threadId':_0x2920ca,'solved':_0x2ba7dd['resolved']?_0x710105[_0x14ec69(0x21a)][_0x14ec69(0x256)]:_0x710105['CommentSolvedStatus'][_0x14ec69(0x216)]},_0x4a2462=await this[_0x14ec69(0x248)]['post'](_0x14ec69(0x202)+_0xcc6d0e+'/solved',{'body':_0xa9aa2d});return!_0x4a2462[_0x14ec69(0x233)][_0x14ec69(0x203)]||_0x4a2462[_0x14ec69(0x233)]['error'][_0x14ec69(0x1ff)]===0x1;}[_0x15ba46(0x1d1)](_0x330f7b,_0x5c6463,_0x24762d,_0x3a0861){const _0x237d38=_0x15ba46;return this[_0x237d38(0x1e8)](_0x330f7b,_0x24762d,_0x3a0861);}[_0x15ba46(0x1f8)](_0x4e5502,_0xeb10f9,_0x34fa96){const _0xfd969a=_0x15ba46;return this[_0xfd969a(0x1e8)](_0x4e5502,_0x34fa96);}async[_0x15ba46(0x1e8)](_0x122b84,_0x3c6dda,_0x33d873){const _0x53e195=_0x15ba46;let _0x854351={'memberId':(await this[_0x53e195(0x201)][_0x53e195(0x265)](_0x122b84))[_0x53e195(0x24e)](),'threadId':_0x3c6dda,'replyId':_0x33d873,'unitId':_0x122b84},_0x5553eb=await this['_httpService'][_0x53e195(0x208)](_0x53e195(0x202)+_0x122b84+_0x53e195(0x212),{'body':_0x854351});return!_0x5553eb['body'][_0x53e195(0x203)]||_0x5553eb[_0x53e195(0x233)]['error']['code']===0x1;}async[_0x15ba46(0x20e)](_0x399456,_0x3e2a67,_0x3ddcd7){const _0xf04a2f=_0x15ba46;let _0x391829={'unitId':_0x399456,'threadId':_0x3ddcd7},_0x115a12=await this[_0xf04a2f(0x248)][_0xf04a2f(0x208)](_0xf04a2f(0x202)+_0x399456+_0xf04a2f(0x211),{'body':_0x391829});if(_0x115a12[_0xf04a2f(0x233)][_0xf04a2f(0x203)]&&_0x115a12[_0xf04a2f(0x233)][_0xf04a2f(0x203)]['code']!==0x1)throw Error(_0x115a12['body'][_0xf04a2f(0x203)]['message']||'Comment\x20service\x20failed\x20to\x20list\x20comments');let _0x2e2513=_0x3ddcd7['map'](_0x8b3f15=>{const _0x47fb5b=_0xf04a2f;var _0x582bed;return _0x4b687e((_0x582bed=_0x115a12[_0x47fb5b(0x233)][_0x47fb5b(0x257)])==null?void 0x0:_0x582bed[_0x8b3f15],_0x8b3f15,_0x399456,_0x3e2a67);})[_0xf04a2f(0x1d4)](Boolean);return Object['values'](_0x115a12['body'][_0xf04a2f(0x25c)]??{})[_0xf04a2f(0x219)](_0x138151=>{const _0x1d2f8f=_0xf04a2f;this[_0x1d2f8f(0x1e6)][_0x1d2f8f(0x200)](_0x138151);}),_0x2e2513;}[_0x15ba46(0x210)](_0x20fcf5){const _0x5c9973=_0x15ba46;var _0x10880d;return{'id':_0x20fcf5['id'],'threadId':_0x20fcf5[_0x5c9973(0x261)],'ref':_0x20fcf5['ref'],..._0x20fcf5[_0x5c9973(0x217)]===void 0x0?{}:{'authorName':_0x20fcf5[_0x5c9973(0x217)],'personId':_0x20fcf5['personId']},...(_0x10880d=_0x20fcf5[_0x5c9973(0x1f6)])!=null&&_0x10880d['some'](_0x40b5c3=>_0x40b5c3[_0x5c9973(0x217)]!==void 0x0)?{'children':_0x20fcf5[_0x5c9973(0x1f6)][_0x5c9973(0x1d4)](_0x39f06e=>_0x39f06e[_0x5c9973(0x217)]!==void 0x0)['map'](_0x1d5761=>({'id':_0x1d5761['id'],'threadId':_0x1d5761['threadId'],'ref':'','parentId':_0x20fcf5['id'],'personId':_0x1d5761[_0x5c9973(0x25b)],'authorName':_0x1d5761[_0x5c9973(0x217)]}))}:{}};}};_0x2c982b=_0x50f2f8([_0x358749(0x0,(0x0,_0x48447a['Inject'])(_0x2d7325[_0x15ba46(0x243)])),_0x358749(0x1,(0x0,_0x48447a[_0x15ba46(0x223)])(_0x48447a[_0x15ba46(0x231)])),_0x358749(0x2,(0x0,_0x48447a[_0x15ba46(0x223)])(_0x3967ab['CollaborationSessionService']))],_0x2c982b);let _0x33b786=class extends _0x48447a[_0x15ba46(0x1e7)]{constructor(_0x271dea,_0x4f87a5){const _0x5a962b=_0x15ba46;super(),this['_threadCommentDataSourceService']=_0x271dea,this[_0x5a962b(0x24c)]=_0x4f87a5,this[_0x5a962b(0x22b)]();}[_0x15ba46(0x22b)](){const _0xee108f=_0x15ba46;this[_0xee108f(0x268)]['dataSource']=this[_0xee108f(0x24c)],this[_0xee108f(0x268)]['syncUpdateMutationToColla']=!0x1;}};_0x33b786=_0x50f2f8([_0x358749(0x0,_0x128055[_0x15ba46(0x224)]),_0x358749(0x1,(0x0,_0x48447a['Inject'])(_0x2c982b))],_0x33b786);function _0xb4709a(_0x498bf5){'@babel/helpers - typeof';const _0x406cd0=_0x15ba46;return _0xb4709a=typeof Symbol==_0x406cd0(0x206)&&typeof Symbol[_0x406cd0(0x20d)]==_0x406cd0(0x23e)?function(_0xe48d34){return typeof _0xe48d34;}:function(_0x3f9b7e){const _0xc1fa59=_0x406cd0;return _0x3f9b7e&&typeof Symbol==_0xc1fa59(0x206)&&_0x3f9b7e[_0xc1fa59(0x1ef)]===Symbol&&_0x3f9b7e!==Symbol['prototype']?_0xc1fa59(0x23e):typeof _0x3f9b7e;},_0xb4709a(_0x498bf5);}function _0x2fac15(_0x5aeff4,_0x40a8bd){const _0x3fcdab=_0x15ba46;if(_0xb4709a(_0x5aeff4)!=_0x3fcdab(0x235)||!_0x5aeff4)return _0x5aeff4;var _0x2ea7b4=_0x5aeff4[Symbol['toPrimitive']];if(_0x2ea7b4!==void 0x0){var _0x44db7f=_0x2ea7b4['call'](_0x5aeff4,_0x40a8bd||_0x3fcdab(0x1ed));if(_0xb4709a(_0x44db7f)!='object')return _0x44db7f;throw TypeError(_0x3fcdab(0x23f));}return(_0x40a8bd===_0x3fcdab(0x1d0)?String:Number)(_0x5aeff4);}function _0x3a90a5(_0x7b7b9d){const _0x181c4f=_0x15ba46;var _0x49a8ae=_0x2fac15(_0x7b7b9d,_0x181c4f(0x1d0));return _0xb4709a(_0x49a8ae)==_0x181c4f(0x23e)?_0x49a8ae:_0x49a8ae+'';}function _0x174884(_0x29bf4b,_0x10d4b1,_0xfaefdd){const _0x15364c=_0x15ba46;return(_0x10d4b1=_0x3a90a5(_0x10d4b1))in _0x29bf4b?Object[_0x15364c(0x20f)](_0x29bf4b,_0x10d4b1,{'value':_0xfaefdd,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x29bf4b[_0x10d4b1]=_0xfaefdd,_0x29bf4b;}let _0x30b8ce=class extends _0x48447a[_0x15ba46(0x1f5)]{constructor(_0x6f1cd7=_0x18d08f,_0x14bbfe,_0xd8c529){const _0x2b5256=_0x15ba46;super(),this[_0x2b5256(0x225)]=_0x6f1cd7,this['_injector']=_0x14bbfe,this['_configService']=_0xd8c529;let {..._0x1f9ef3}=(0x0,_0x48447a[_0x2b5256(0x209)])({},_0x18d08f,this[_0x2b5256(0x225)]);this[_0x2b5256(0x262)][_0x2b5256(0x229)](_0x2b5256(0x266),_0x1f9ef3);}[_0x15ba46(0x1e2)](){const _0x4a73dd=_0x15ba46;[[_0x2c982b],[_0x33b786],[_0x4cf6c4]][_0x4a73dd(0x219)](_0x57bde9=>{const _0x4f29d6=_0x4a73dd;this[_0x4f29d6(0x1fb)][_0x4f29d6(0x1d5)](_0x57bde9);});}[_0x15ba46(0x240)](){const _0x33a8d7=_0x15ba46;this['_injector']['get'](_0x33b786),this[_0x33a8d7(0x1fb)][_0x33a8d7(0x1e4)](_0x4cf6c4);}};_0x174884(_0x30b8ce,'pluginName',_0x15ba46(0x1fc)),_0x174884(_0x30b8ce,_0x15ba46(0x213),_0x109232),_0x174884(_0x30b8ce,'version',_0x2591e4),_0x30b8ce=_0x50f2f8([(0x0,_0x48447a['DependentOn'])(_0x5e722d[_0x15ba46(0x237)],_0x2d7325[_0x15ba46(0x245)],_0x128055['UniverThreadCommentPlugin'],_0x3db9e4[_0x15ba46(0x21e)],_0x3967ab[_0x15ba46(0x25f)]),_0x358749(0x1,(0x0,_0x48447a[_0x15ba46(0x223)])(_0x48447a['Injector'])),_0x358749(0x2,_0x48447a['IConfigService'])],_0x30b8ce),Object[_0x15ba46(0x20f)](_0x3d6862,_0x15ba46(0x226),{'enumerable':!0x0,'get':function(){return _0x30b8ce;}});}));
|
|
1
|
+
function _0xc1fb(_0x423ea6,_0x4ef380){_0x423ea6=_0x423ea6-0x1e3;const _0x15d1e0=_0x15d1();let _0xc1fb10=_0x15d1e0[_0x423ea6];return _0xc1fb10;}(function(_0x4b9f93,_0x29f246){const _0x440b51=_0xc1fb,_0x5ddcdb=_0x4b9f93();while(!![]){try{const _0x233aac=parseInt(_0x440b51(0x276))/0x1*(parseInt(_0x440b51(0x259))/0x2)+-parseInt(_0x440b51(0x241))/0x3*(-parseInt(_0x440b51(0x23f))/0x4)+parseInt(_0x440b51(0x200))/0x5*(-parseInt(_0x440b51(0x1f2))/0x6)+-parseInt(_0x440b51(0x205))/0x7*(parseInt(_0x440b51(0x203))/0x8)+parseInt(_0x440b51(0x226))/0x9+-parseInt(_0x440b51(0x217))/0xa+-parseInt(_0x440b51(0x25a))/0xb*(-parseInt(_0x440b51(0x1ed))/0xc);if(_0x233aac===_0x29f246)break;else _0x5ddcdb['push'](_0x5ddcdb['shift']());}catch(_0x8a0348){_0x5ddcdb['push'](_0x5ddcdb['shift']());}}}(_0x15d1,0xf2edd),function(_0x20aa7d,_0x14fec1){const _0x21378a=_0xc1fb;typeof exports==_0x21378a(0x1fa)&&typeof module<'u'?_0x14fec1(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/network'),require('@univerjs/thread-comment'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('rxjs')):typeof define==_0x21378a(0x20d)&&define[_0x21378a(0x27f)]?define([_0x21378a(0x248),_0x21378a(0x270),_0x21378a(0x245),_0x21378a(0x21c),'@univerjs/network','@univerjs/thread-comment',_0x21378a(0x26a),_0x21378a(0x1e5),_0x21378a(0x24c)],_0x14fec1):(_0x20aa7d=typeof globalThis<'u'?globalThis:_0x20aa7d||self,_0x14fec1(_0x20aa7d['UniverProThreadCommentDatasource']={},_0x20aa7d[_0x21378a(0x207)],_0x20aa7d[_0x21378a(0x23d)],_0x20aa7d['UniverCore'],_0x20aa7d['UniverNetwork'],_0x20aa7d[_0x21378a(0x25d)],_0x20aa7d[_0x21378a(0x204)],_0x20aa7d['UniverProtocol'],_0x20aa7d[_0x21378a(0x24c)]));}(this,function(_0x1ae5b7,_0x540468,_0x1b265a,_0x8309e7,_0x1e536c,_0x42788c,_0x51b126,_0xf8093e,_0x4f8280){const _0x1ee40e=_0xc1fb;Object['defineProperty'](_0x1ae5b7,Symbol[_0x1ee40e(0x258)],{'value':_0x1ee40e(0x280)});var _0x1c22db=_0x1ee40e(0x247),_0x589195='1.0.4';let _0x1a6fa4={},_0x2ef3f1=_0x2a509a=>(0x0,_0x8309e7[_0x1ee40e(0x242)])(new Date(+_0x2a509a))[_0x1ee40e(0x273)]('YYYY/MM/DD\x20HH:mm');function _0xfe1798(_0x5e082d){const _0x21cf0d=_0x1ee40e;if(!_0x5e082d)return null;try{let _0x58caeb=JSON[_0x21cf0d(0x22d)](_0x5e082d);return(0x0,_0x42788c[_0x21cf0d(0x235)])(_0x58caeb)?_0x58caeb:null;}catch{return null;}}let _0x2ba5f4=async(_0x2a1528,_0x1f6f39)=>{const _0x5502ad=_0x1ee40e;let _0x59b250=_0x2a1528[_0x5502ad(0x22c)](_0x8309e7[_0x5502ad(0x234)]),_0xe7abc2=_0x2a1528[_0x5502ad(0x22c)](_0x1e536c[_0x5502ad(0x250)]);_0x1f6f39[_0x5502ad(0x25b)](_0xe4eea6=>{const _0x4d2a75=_0x5502ad;_0x59b250[_0x4d2a75(0x20e)](_0xe4eea6)&&_0x1f6f39[_0x4d2a75(0x243)](_0xe4eea6);}),_0x1f6f39[_0x5502ad(0x255)]&&(await _0xe7abc2[_0x5502ad(0x22c)](_0x5502ad(0x21a),{'params':{'userIDs':[..._0x1f6f39]}}))[_0x5502ad(0x279)][_0x5502ad(0x237)][_0x5502ad(0x25b)](_0x367463=>{_0x367463&&_0x59b250['addUser'](_0x367463);});};function _0x434cf0(_0x50a21e,_0x5b105c){return function(_0xafc8c4,_0x24913c){_0x5b105c(_0xafc8c4,_0x24913c,_0x50a21e);};}function _0x132a3a(_0xff9139,_0x12d01a,_0x111c68,_0x54af2f){const _0x158020=_0x1ee40e;var _0x2058fa=arguments[_0x158020(0x26c)],_0x20083f=_0x2058fa<0x3?_0x12d01a:_0x54af2f===null?_0x54af2f=Object[_0x158020(0x23b)](_0x12d01a,_0x111c68):_0x54af2f,_0x58606e;if(typeof Reflect==_0x158020(0x1fa)&&typeof Reflect[_0x158020(0x246)]==_0x158020(0x20d))_0x20083f=Reflect[_0x158020(0x246)](_0xff9139,_0x12d01a,_0x111c68,_0x54af2f);else{for(var _0x2b4cb2=_0xff9139['length']-0x1;_0x2b4cb2>=0x0;_0x2b4cb2--)(_0x58606e=_0xff9139[_0x2b4cb2])&&(_0x20083f=(_0x2058fa<0x3?_0x58606e(_0x20083f):_0x2058fa>0x3?_0x58606e(_0x12d01a,_0x111c68,_0x20083f):_0x58606e(_0x12d01a,_0x111c68))||_0x20083f);}return _0x2058fa>0x3&&_0x20083f&&Object[_0x158020(0x228)](_0x12d01a,_0x111c68,_0x20083f),_0x20083f;}let _0x1d6411=class extends _0x8309e7[_0x1ee40e(0x209)]{constructor(_0x50551d,_0x13e5dd,_0x338352,_0x3caef5){const _0x52ae68=_0x1ee40e;super(),this[_0x52ae68(0x253)]=_0x50551d,this[_0x52ae68(0x227)]=_0x13e5dd,this['_userService']=_0x338352,this[_0x52ae68(0x23a)]=_0x3caef5,this[_0x52ae68(0x257)](),this['_initUserSync']();}[_0x1ee40e(0x262)](){const _0x1ba1ae=_0x1ee40e;this[_0x1ba1ae(0x213)](this['_threadCommentModel'][_0x1ba1ae(0x27b)][_0x1ba1ae(0x275)]((0x0,_0x4f8280['bufferTime'])(0x10))[_0x1ba1ae(0x256)](_0x2a8562=>{const _0x338a3e=_0x1ba1ae;let _0x84e1e7=new Set();_0x2a8562['forEach'](_0x49cecc=>{const _0x56ef88=_0xc1fb;switch(_0x49cecc[_0x56ef88(0x269)]){case _0x56ef88(0x251):{let _0x363544=_0x49cecc[_0x56ef88(0x1f3)][_0x56ef88(0x20c)];_0x84e1e7[_0x56ef88(0x251)](_0x363544);break;}}}),_0x2ba5f4(this[_0x338a3e(0x23a)],_0x84e1e7);}));}[_0x1ee40e(0x20a)](_0x4d033a,_0x3ad184,_0x4dfe8b){const _0x56cd29=_0x1ee40e;let _0x45842b=this[_0x56cd29(0x227)]['getComment'](_0x4d033a,_0x3ad184,_0x4dfe8b);_0x45842b&&(_0x45842b['parentId']?this['_threadCommentModel'][_0x56cd29(0x261)](_0x4d033a,_0x3ad184,_0x4dfe8b):this[_0x56cd29(0x227)][_0x56cd29(0x1f4)](_0x4d033a,_0x3ad184,_0x45842b[_0x56cd29(0x229)]));}['_resolveComment'](_0x1e4ea1,_0x155ac5,_0xf47d8f,_0x39bd66){const _0x197cf2=_0x1ee40e;(_0x39bd66===_0xf8093e[_0x197cf2(0x26e)][_0x197cf2(0x239)]||_0x39bd66===_0xf8093e['CommentSolvedStatus'][_0x197cf2(0x219)])&&this['_threadCommentModel'][_0x197cf2(0x218)](_0x1e4ea1,_0x155ac5,_0xf47d8f,_0x39bd66===_0xf8093e['CommentSolvedStatus'][_0x197cf2(0x239)]);}[_0x1ee40e(0x257)](){const _0x167ddb=_0x1ee40e;this[_0x167ddb(0x213)](this[_0x167ddb(0x253)][_0x167ddb(0x27b)][_0x167ddb(0x256)](_0x4aef94=>{const _0x43c74f=_0x167ddb;var _0x2c61c7;let _0x1b24f4=(_0x2c61c7=this[_0x43c74f(0x227)][_0x43c74f(0x1fc)](_0x4aef94[_0x43c74f(0x231)])[_0x43c74f(0x22e)](_0x5c1a1a=>_0x5c1a1a[_0x43c74f(0x229)]===_0x4aef94[_0x43c74f(0x229)]))==null?void 0x0:_0x2c61c7[_0x43c74f(0x266)];if(!_0x1b24f4)return;let {unitId:_0x4a56d9,subUnitId:_0x236756}=_0x1b24f4;switch(_0x4aef94['user']&&this[_0x43c74f(0x1e9)][_0x43c74f(0x271)](_0x4aef94[_0x43c74f(0x27c)]),_0x4aef94[_0x43c74f(0x269)]){case _0xf8093e[_0x43c74f(0x1ef)][_0x43c74f(0x20f)]:{var _0x408862;let _0x504ea3=_0xfe1798(_0x4aef94[_0x43c74f(0x1e8)]);if(!_0x4aef94[_0x43c74f(0x26b)]||!_0x4aef94[_0x43c74f(0x24b)]||!_0x504ea3)return;this[_0x43c74f(0x227)]['addComment'](_0x4a56d9,_0x236756,{'unitId':_0x4a56d9,'subUnitId':_0x236756,'ref':'','id':_0x4aef94['replyId'],'dT':_0x2ef3f1(+_0x4aef94[_0x43c74f(0x24b)]),'threadId':_0x4aef94[_0x43c74f(0x229)],'personId':((_0x408862=_0x4aef94[_0x43c74f(0x27c)])==null?void 0x0:_0x408862[_0x43c74f(0x232)])??_0x4aef94[_0x43c74f(0x1fe)],'text':_0x504ea3,'parentId':_0x1b24f4['id']});break;}case _0xf8093e[_0x43c74f(0x1ef)][_0x43c74f(0x238)]:if(!_0x4aef94[_0x43c74f(0x26b)]){this['_threadCommentModel'][_0x43c74f(0x1f4)](_0x4a56d9,_0x236756,_0x1b24f4['threadId']);break;}this['_deleteComment'](_0x4a56d9,_0x236756,_0x4aef94[_0x43c74f(0x26b)]);break;case _0xf8093e[_0x43c74f(0x1ef)][_0x43c74f(0x211)]:{let _0x956abf=_0xfe1798(_0x4aef94[_0x43c74f(0x1e8)]);if(!_0x4aef94[_0x43c74f(0x26b)]||!_0x956abf)return;this[_0x43c74f(0x227)][_0x43c74f(0x1e3)](_0x4a56d9,_0x236756,{'commentId':_0x4aef94[_0x43c74f(0x26b)],'text':_0x956abf});break;}case _0xf8093e['CommentUpdateEventType'][_0x43c74f(0x210)]:this['_resolveComment'](_0x4a56d9,_0x236756,_0x1b24f4['id'],_0x4aef94[_0x43c74f(0x1f9)]);}}));}};_0x1d6411=_0x132a3a([_0x434cf0(0x0,(0x0,_0x8309e7['Inject'])(_0x540468[_0x1ee40e(0x21e)])),_0x434cf0(0x1,(0x0,_0x8309e7[_0x1ee40e(0x1e7)])(_0x42788c['ThreadCommentModel'])),_0x434cf0(0x2,(0x0,_0x8309e7['Inject'])(_0x8309e7[_0x1ee40e(0x234)])),_0x434cf0(0x3,(0x0,_0x8309e7[_0x1ee40e(0x1e7)])(_0x8309e7['Injector']))],_0x1d6411);function _0x43f21d(_0x20cc6e,_0x1dd7ce){const _0x1fb3ef=_0x1ee40e;let _0x463ec4=Number(_0x20cc6e==null?void 0x0:_0x20cc6e['createTimestamp']);return!!(_0x20cc6e&&_0x20cc6e[_0x1fb3ef(0x26b)]&&_0x20cc6e[_0x1fb3ef(0x229)]===_0x1dd7ce&&_0x20cc6e[_0x1fb3ef(0x1fe)]&&Number['isFinite'](_0x463ec4)&&_0x463ec4>0x0);}function _0x416452(_0x357ae4,_0x591fd2){const _0xcd6b64=_0x1ee40e;let _0x235656=_0x357ae4[_0xcd6b64(0x216)][0x0];if(!_0x357ae4[_0xcd6b64(0x229)]||!_0x43f21d(_0x235656,_0x357ae4[_0xcd6b64(0x229)]))throw Error(_0xcd6b64(0x254));return{..._0x591fd2,'id':_0x235656['replyId'],'resolved':_0x357ae4[_0xcd6b64(0x1f9)]===0x1,'dT':_0x2ef3f1(_0x235656[_0xcd6b64(0x24b)]),'personId':_0x235656[_0xcd6b64(0x1fe)],'threadId':_0x235656['threadId']};}function _0x382ea0(_0x400185,_0x5203cd,_0x5e2ac6,_0x249d5b){const _0x3e9a46=_0x1ee40e;if((_0x400185==null?void 0x0:_0x400185[_0x3e9a46(0x229)])===_0x5203cd&&_0x400185[_0x3e9a46(0x216)][_0x3e9a46(0x26c)]>0x0){let _0x31bf48=(_0x50323f,_0x35546b)=>{const _0x3ee9ee=_0x3e9a46;if(!_0x43f21d(_0x50323f,_0x5203cd))return null;let _0x4cc16e=_0xfe1798(_0x50323f[_0x3ee9ee(0x1e8)]);return _0x4cc16e?{'id':_0x50323f['replyId'],'threadId':_0x50323f[_0x3ee9ee(0x229)],'dT':_0x2ef3f1(_0x50323f[_0x3ee9ee(0x24b)]),'personId':_0x50323f[_0x3ee9ee(0x1fe)],'resolved':_0x400185[_0x3ee9ee(0x1f9)]===_0xf8093e[_0x3ee9ee(0x26e)][_0x3ee9ee(0x239)],'unitId':_0x5e2ac6,'subUnitId':_0x249d5b,'text':_0x4cc16e,'parentId':_0x35546b}:null;},_0x4f5730=_0x31bf48(_0x400185[_0x3e9a46(0x216)][0x0]);if(!_0x4f5730)return null;let _0x624197=new Set([_0x4f5730['id']]),_0x5249f9=_0x400185['replies'][_0x3e9a46(0x225)](0x1)[_0x3e9a46(0x278)](_0x51af70=>{const _0x445224=_0x3e9a46;let _0x2a2afb=_0x31bf48(_0x51af70,_0x4f5730['id']);return!_0x2a2afb||_0x624197[_0x445224(0x215)](_0x2a2afb['id'])?[]:(_0x624197[_0x445224(0x251)](_0x2a2afb['id']),[_0x2a2afb]);});return{..._0x4f5730,'children':_0x5249f9};}return null;}let _0x3053d3=class{constructor(_0x1841c8,_0x488b51,_0x43ebcd){const _0x68d79=_0x1ee40e;this[_0x68d79(0x1e4)]=_0x1841c8,this['_userService']=_0x488b51,this[_0x68d79(0x223)]=_0x43ebcd;}async['addComment'](_0x3a3d34){const _0x24a81f=_0x1ee40e;var _0x2092d9;let {parentId:_0x6d8c9d,unitId:_0x39bbbe,text:_0xe94462,threadId:_0x58d7d9}=_0x3a3d34,_0xb0e41f=((_0x2092d9=_0xe94462[_0x24a81f(0x1ff)])==null?void 0x0:_0x2092d9[_0x24a81f(0x21b)](_0x5b4f2e=>_0x5b4f2e[_0x24a81f(0x27d)]===_0x8309e7[_0x24a81f(0x24f)]['COMMENT'])[_0x24a81f(0x1eb)](_0x2e8b7a=>_0x2e8b7a['rangeId']))??[],_0x2bee93=JSON[_0x24a81f(0x26f)](_0xe94462),_0x3d20c6=(await this['_sessionService'][_0x24a81f(0x22a)](_0x39bbbe))[_0x24a81f(0x20b)]();if(_0x6d8c9d){let _0x41a99b={'memberId':_0x3d20c6,'unitId':_0x39bbbe,'content':_0x2bee93,'mention':_0xb0e41f,'threadId':_0x58d7d9},_0x1f8775=await this['_httpService']['post'](_0x24a81f(0x221)+_0x39bbbe+_0x24a81f(0x263),{'body':_0x41a99b}),_0x4336d7=_0x1f8775['body'][_0x24a81f(0x267)];if(_0x1f8775[_0x24a81f(0x279)][_0x24a81f(0x22b)]&&_0x1f8775['body'][_0x24a81f(0x22b)]['code']!==0x1||!_0x43f21d(_0x4336d7,_0x58d7d9)){var _0x3331e1;throw Error(((_0x3331e1=_0x1f8775[_0x24a81f(0x279)][_0x24a81f(0x22b)])==null?void 0x0:_0x3331e1[_0x24a81f(0x222)])??'Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20reply');}return{..._0x3a3d34,'id':_0x4336d7[_0x24a81f(0x26b)],'dT':(0x0,_0x8309e7[_0x24a81f(0x242)])(+_0x4336d7[_0x24a81f(0x24b)])['format'](_0x24a81f(0x1f0)),'personId':_0x4336d7['userId']};}{let _0x1f8239={'memberId':_0x3d20c6,'unitId':_0x39bbbe,'content':_0x2bee93,'mention':_0xb0e41f},_0x4bc512=await this[_0x24a81f(0x1e4)][_0x24a81f(0x26d)]('/universer-api/comment/unit/'+_0x39bbbe+_0x24a81f(0x265),{'body':_0x1f8239});if(_0x4bc512[_0x24a81f(0x279)][_0x24a81f(0x22b)]&&_0x4bc512['body'][_0x24a81f(0x22b)][_0x24a81f(0x1ec)]!==0x1||!_0x4bc512[_0x24a81f(0x279)][_0x24a81f(0x1f8)]){var _0x1a81dc;throw Error(((_0x1a81dc=_0x4bc512[_0x24a81f(0x279)][_0x24a81f(0x22b)])==null?void 0x0:_0x1a81dc[_0x24a81f(0x222)])??_0x24a81f(0x230));}return _0x416452(_0x4bc512['body'][_0x24a81f(0x1f8)],_0x3a3d34);}}async[_0x1ee40e(0x1e3)](_0x61a9d5){const _0x28504f=_0x1ee40e;var _0x30a55a;let {text:_0x130395,unitId:_0x25928b}=_0x61a9d5,_0x41ba68=((_0x30a55a=_0x130395['customRanges'])==null?void 0x0:_0x30a55a[_0x28504f(0x21b)](_0xa69ae1=>_0xa69ae1[_0x28504f(0x27d)]===_0x8309e7[_0x28504f(0x24f)]['COMMENT'])[_0x28504f(0x1eb)](_0x1ffe9a=>_0x1ffe9a[_0x28504f(0x27a)]))??[],_0x3fd22a=JSON[_0x28504f(0x26f)](_0x130395),_0x2d2fa5=_0x61a9d5[_0x28504f(0x229)],_0x613e30=_0x61a9d5['id'],_0x13236f={'memberId':(await this[_0x28504f(0x223)][_0x28504f(0x22a)](_0x25928b))[_0x28504f(0x20b)](),'unitId':_0x25928b,'threadId':_0x2d2fa5,'mention':_0x41ba68,'content':_0x3fd22a,'replyId':_0x613e30},_0x51b563=await this[_0x28504f(0x1e4)][_0x28504f(0x26d)]('/universer-api/comment/unit/'+_0x25928b+_0x28504f(0x27e),{'body':_0x13236f});return!_0x51b563[_0x28504f(0x279)][_0x28504f(0x22b)]||_0x51b563[_0x28504f(0x279)][_0x28504f(0x22b)][_0x28504f(0x1ec)]===0x1;}async[_0x1ee40e(0x218)](_0x3e6d34){const _0x222577=_0x1ee40e;let {unitId:_0x3a6901}=_0x3e6d34,_0x2aa1eb=_0x3e6d34[_0x222577(0x229)],_0x2ba051={'memberId':(await this[_0x222577(0x223)][_0x222577(0x22a)](_0x3a6901))[_0x222577(0x20b)](),'unitId':_0x3a6901,'threadId':_0x2aa1eb,'solved':_0x3e6d34['resolved']?_0xf8093e[_0x222577(0x26e)]['Solved']:_0xf8093e['CommentSolvedStatus']['OpenOrReOpen']},_0x5e2b6b=await this[_0x222577(0x1e4)]['post']('/universer-api/comment/unit/'+_0x3a6901+_0x222577(0x252),{'body':_0x2ba051});return!_0x5e2b6b[_0x222577(0x279)]['error']||_0x5e2b6b[_0x222577(0x279)][_0x222577(0x22b)][_0x222577(0x1ec)]===0x1;}[_0x1ee40e(0x261)](_0x83a20f,_0x106a08,_0x7c14da,_0x57a702){const _0x407efa=_0x1ee40e;return this[_0x407efa(0x20a)](_0x83a20f,_0x7c14da,_0x57a702);}[_0x1ee40e(0x1f4)](_0x363653,_0x224f7f,_0x297280){const _0x15f3ee=_0x1ee40e;return this[_0x15f3ee(0x20a)](_0x363653,_0x297280);}async[_0x1ee40e(0x20a)](_0x245429,_0x183a7b,_0x5f5cd0){const _0x18c3b3=_0x1ee40e;let _0x234749={'memberId':(await this[_0x18c3b3(0x223)][_0x18c3b3(0x22a)](_0x245429))['getMemberID'](),'threadId':_0x183a7b,'replyId':_0x5f5cd0,'unitId':_0x245429},_0x4ce076=await this[_0x18c3b3(0x1e4)][_0x18c3b3(0x26d)](_0x18c3b3(0x221)+_0x245429+_0x18c3b3(0x22f),{'body':_0x234749});return!_0x4ce076[_0x18c3b3(0x279)][_0x18c3b3(0x22b)]||_0x4ce076['body'][_0x18c3b3(0x22b)][_0x18c3b3(0x1ec)]===0x1;}async[_0x1ee40e(0x1fb)](_0x2242d9,_0x245ba2,_0x17a139){const _0x5a1780=_0x1ee40e;let _0x47f7d7={'unitId':_0x2242d9,'threadId':_0x17a139},_0xf65cd0=await this[_0x5a1780(0x1e4)]['post'](_0x5a1780(0x221)+_0x2242d9+_0x5a1780(0x21d),{'body':_0x47f7d7});if(_0xf65cd0[_0x5a1780(0x279)][_0x5a1780(0x22b)]&&_0xf65cd0['body']['error'][_0x5a1780(0x1ec)]!==0x1)throw Error(_0xf65cd0[_0x5a1780(0x279)][_0x5a1780(0x22b)][_0x5a1780(0x222)]||_0x5a1780(0x233));let _0x5a3aac=_0x17a139[_0x5a1780(0x1eb)](_0x177eac=>{const _0xa1ec9=_0x5a1780;var _0x19a9cc;return _0x382ea0((_0x19a9cc=_0xf65cd0[_0xa1ec9(0x279)][_0xa1ec9(0x25c)])==null?void 0x0:_0x19a9cc[_0x177eac],_0x177eac,_0x2242d9,_0x245ba2);})['filter'](Boolean);return Object[_0x5a1780(0x23e)](_0xf65cd0[_0x5a1780(0x279)][_0x5a1780(0x237)]??{})[_0x5a1780(0x25b)](_0x1b8d60=>{const _0x35a300=_0x5a1780;this[_0x35a300(0x1e9)][_0x35a300(0x271)](_0x1b8d60);}),_0x5a3aac;}[_0x1ee40e(0x236)](_0x33f4db){const _0x58e3c2=_0x1ee40e;var _0x515684;return{'id':_0x33f4db['id'],'threadId':_0x33f4db[_0x58e3c2(0x229)],'ref':_0x33f4db[_0x58e3c2(0x240)],..._0x33f4db[_0x58e3c2(0x1ea)]===void 0x0?{}:{'authorName':_0x33f4db[_0x58e3c2(0x1ea)],'personId':_0x33f4db['personId']},...(_0x515684=_0x33f4db['children'])!=null&&_0x515684[_0x58e3c2(0x208)](_0x5d5ed1=>_0x5d5ed1[_0x58e3c2(0x1ea)]!==void 0x0)?{'children':_0x33f4db[_0x58e3c2(0x1ee)]['filter'](_0x298456=>_0x298456['authorName']!==void 0x0)['map'](_0x1f40cf=>({'id':_0x1f40cf['id'],'threadId':_0x1f40cf[_0x58e3c2(0x229)],'ref':'','parentId':_0x33f4db['id'],'personId':_0x1f40cf['personId'],'authorName':_0x1f40cf[_0x58e3c2(0x1ea)]}))}:{}};}};_0x3053d3=_0x132a3a([_0x434cf0(0x0,(0x0,_0x8309e7[_0x1ee40e(0x1e7)])(_0x1e536c['HTTPService'])),_0x434cf0(0x1,(0x0,_0x8309e7[_0x1ee40e(0x1e7)])(_0x8309e7[_0x1ee40e(0x234)])),_0x434cf0(0x2,(0x0,_0x8309e7[_0x1ee40e(0x1e7)])(_0x540468['CollaborationSessionService']))],_0x3053d3);let _0x3666d4=class extends _0x8309e7[_0x1ee40e(0x209)]{constructor(_0x23b52b,_0x41ceb0){const _0xc67425=_0x1ee40e;super(),this['_threadCommentDataSourceService']=_0x23b52b,this[_0xc67425(0x25e)]=_0x41ceb0,this['_initDataSource']();}[_0x1ee40e(0x1f7)](){const _0x45eef7=_0x1ee40e;this[_0x45eef7(0x1fd)][_0x45eef7(0x1e6)]=this[_0x45eef7(0x25e)],this['_threadCommentDataSourceService'][_0x45eef7(0x212)]=!0x1;}};_0x3666d4=_0x132a3a([_0x434cf0(0x0,_0x42788c[_0x1ee40e(0x249)]),_0x434cf0(0x1,(0x0,_0x8309e7[_0x1ee40e(0x1e7)])(_0x3053d3))],_0x3666d4);function _0x1d236f(_0x16a7e6){'@babel/helpers - typeof';const _0xa9ef33=_0x1ee40e;return _0x1d236f=typeof Symbol==_0xa9ef33(0x20d)&&typeof Symbol[_0xa9ef33(0x1f5)]==_0xa9ef33(0x24d)?function(_0x5b5c07){return typeof _0x5b5c07;}:function(_0x16ebce){const _0x363c06=_0xa9ef33;return _0x16ebce&&typeof Symbol==_0x363c06(0x20d)&&_0x16ebce[_0x363c06(0x1f6)]===Symbol&&_0x16ebce!==Symbol[_0x363c06(0x202)]?_0x363c06(0x24d):typeof _0x16ebce;},_0x1d236f(_0x16a7e6);}function _0x10e272(_0x45dd43,_0x4f0936){const _0x37da33=_0x1ee40e;if(_0x1d236f(_0x45dd43)!=_0x37da33(0x1fa)||!_0x45dd43)return _0x45dd43;var _0x7febe=_0x45dd43[Symbol['toPrimitive']];if(_0x7febe!==void 0x0){var _0x4fd12c=_0x7febe['call'](_0x45dd43,_0x4f0936||_0x37da33(0x272));if(_0x1d236f(_0x4fd12c)!=_0x37da33(0x1fa))return _0x4fd12c;throw TypeError(_0x37da33(0x24e));}return(_0x4f0936===_0x37da33(0x244)?String:Number)(_0x45dd43);}function _0x4d9deb(_0x583da3){const _0x1b1858=_0x1ee40e;var _0x4f09aa=_0x10e272(_0x583da3,_0x1b1858(0x244));return _0x1d236f(_0x4f09aa)==_0x1b1858(0x24d)?_0x4f09aa:_0x4f09aa+'';}function _0x1aba85(_0x28ef8c,_0x4c90db,_0x5f4ee2){const _0x34274a=_0x1ee40e;return(_0x4c90db=_0x4d9deb(_0x4c90db))in _0x28ef8c?Object[_0x34274a(0x228)](_0x28ef8c,_0x4c90db,{'value':_0x5f4ee2,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x28ef8c[_0x4c90db]=_0x5f4ee2,_0x28ef8c;}let _0xade79d=class extends _0x8309e7[_0x1ee40e(0x274)]{constructor(_0x29a6f0=_0x1a6fa4,_0x267b07,_0x3a6198){const _0x3dc1ce=_0x1ee40e;super(),this[_0x3dc1ce(0x220)]=_0x29a6f0,this[_0x3dc1ce(0x23a)]=_0x267b07,this[_0x3dc1ce(0x277)]=_0x3a6198;let {..._0xca51a1}=(0x0,_0x8309e7[_0x3dc1ce(0x1f1)])({},_0x1a6fa4,this[_0x3dc1ce(0x220)]);this[_0x3dc1ce(0x277)][_0x3dc1ce(0x264)]('thread-comment-data-source.config',_0xca51a1);}[_0x1ee40e(0x268)](){[[_0x3053d3],[_0x3666d4],[_0x1d6411]]['forEach'](_0x307a3c=>{const _0x3e1d4c=_0xc1fb;this[_0x3e1d4c(0x23a)][_0x3e1d4c(0x251)](_0x307a3c);});}['onReady'](){const _0x333626=_0x1ee40e;this['_injector']['get'](_0x3666d4),this['_injector'][_0x333626(0x22c)](_0x1d6411);}};_0x1aba85(_0xade79d,_0x1ee40e(0x281),_0x1ee40e(0x201)),_0x1aba85(_0xade79d,_0x1ee40e(0x206),_0x1c22db),_0x1aba85(_0xade79d,'version',_0x589195),_0xade79d=_0x132a3a([(0x0,_0x8309e7['DependentOn'])(_0x1b265a[_0x1ee40e(0x260)],_0x1e536c[_0x1ee40e(0x214)],_0x42788c[_0x1ee40e(0x25f)],_0x51b126[_0x1ee40e(0x21f)],_0x540468[_0x1ee40e(0x24a)]),_0x434cf0(0x1,(0x0,_0x8309e7[_0x1ee40e(0x1e7)])(_0x8309e7['Injector'])),_0x434cf0(0x2,_0x8309e7[_0x1ee40e(0x224)])],_0xade79d),Object[_0x1ee40e(0x228)](_0x1ae5b7,_0x1ee40e(0x23c),{'enumerable':!0x0,'get':function(){return _0xade79d;}});}));function _0x15d1(){const _0x28f5db=['getUnit','_threadCommentDataSourceService','userId','customRanges','9238690ijDbFi','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','prototype','641832yBvmLW','UniverThreadCommentUi','49rqSLan','packageName','UniverProCollaborationClient','some','Disposable','_deleteComment','getMemberID','personId','function','getUser','Reply','Solve','Edit','syncUpdateMutationToColla','disposeWithMe','UniverNetworkPlugin','has','replies','18422920fxavxa','resolveComment','OpenOrReOpen','/universer-api/user/list','filter','@univerjs/core','/list','CommentService','UniverThreadCommentUIPlugin','_config','/universer-api/comment/unit/','message','_sessionService','IConfigService','slice','13009122AiHqkD','_threadCommentModel','defineProperty','threadId','requireSession','error','get','parse','find','/delete','Comment\x20service\x20did\x20not\x20return\x20the\x20created\x20comment','unitId','userID','Comment\x20service\x20failed\x20to\x20list\x20comments','UserManagerService','isThreadCommentDocumentBody','saveCommentToSnapshot','users','Delete','Solved','_injector','getOwnPropertyDescriptor','UniverThreadCommentDataSourcePlugin','UniverProLicense','values','824468Uyyvja','ref','3RiMyKz','dateKit','delete','string','@univerjs-pro/license','decorate','@univerjs-pro/thread-comment-datasource','exports','IThreadCommentDataSourceService','UniverCollaborationClientPlugin','createTimestamp','rxjs','symbol','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','CustomRangeType','HTTPService','add','/solved','_commentService','Comment\x20service\x20returned\x20an\x20invalid\x20thread','size','subscribe','_init','toStringTag','21686QUwJoO','737WfwsXQ','forEach','comments','UniverThreadComment','_threadCommentDataSource','UniverThreadCommentPlugin','UniverLicensePlugin','deleteComment','_initUserSync','/reply','setConfig','/add','root','reply','onStarting','type','@univerjs/thread-comment-ui','replyId','length','post','CommentSolvedStatus','stringify','@univerjs-pro/collaboration-client','addUser','default','format','Plugin','pipe','121KGxLNK','_configService','flatMap','body','rangeId','commentUpdate$','user','rangeType','/edit','amd','Module','pluginName','updateComment','_httpService','@univerjs/protocol','dataSource','Inject','content','_userService','authorName','map','code','408912iUeBYt','children','CommentUpdateEventType','YYYY/MM/DD\x20HH:mm','merge','6iWEcpz','payload','deleteThread','iterator','constructor','_initDataSource','comment','solved','object','listComments'];_0x15d1=function(){return _0x28f5db;};return _0x15d1();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Remote data source integration for Univer thread comments.",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
"rxjs": ">=7.0.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@univerjs-pro/collaboration-client": "1.0.
|
|
55
|
-
"@univerjs-pro/license": "1.0.
|
|
56
|
-
"@univerjs/core": "1.0.
|
|
57
|
-
"@univerjs/network": "1.0.
|
|
58
|
-
"@univerjs/protocol": "1.0.
|
|
59
|
-
"@univerjs/thread-comment": "1.0.
|
|
60
|
-
"@univerjs/thread-comment-ui": "1.0.
|
|
54
|
+
"@univerjs-pro/collaboration-client": "1.0.4",
|
|
55
|
+
"@univerjs-pro/license": "1.0.4",
|
|
56
|
+
"@univerjs/core": "1.0.4",
|
|
57
|
+
"@univerjs/network": "1.0.4",
|
|
58
|
+
"@univerjs/protocol": "1.0.4",
|
|
59
|
+
"@univerjs/thread-comment": "1.0.4",
|
|
60
|
+
"@univerjs/thread-comment-ui": "1.0.4"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@univerjs-infra/shared": "1.0.
|
|
63
|
+
"@univerjs-infra/shared": "1.0.4",
|
|
64
64
|
"rxjs": "7.8.2",
|
|
65
65
|
"typescript": "^6.0.3",
|
|
66
66
|
"vitest": "^5.0.0"
|