@univerjs-pro/thread-comment-datasource 0.25.0-insiders.20260623-012b5a8 → 1.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- function _0x9f19(){const _0x26f657=['228DFeeZt','error','YYYY/MM/DD\x20HH:mm','users','HTTPService','onStarting','Edit','DependentOn','dateKit','/universer-api/user/list','requireSession','function','post','CommentSolvedStatus','defineProperty','Disposable','decorate','Plugin','Inject','listComments','length','userId','/edit','_userService','Module','parse','syncUpdateMutationToColla','CollaborationSessionService','body','OpenOrReOpen','IThreadCommentDataSourceService','addComment','resolved','personId','map','replies','_init','COMMENT','call','/reply','type','CommentUpdateEventType','453464iAsQed','4167042gryJjf','Solve','iterator','filter','_threadCommentDataSourceService','2826TbZEXT','_threadCommentDataSource','getOwnPropertyDescriptor','_threadCommentModel','version','getComment','userID','_injector','threadId','get','reply','solved','unitId','prototype','addUser','ref','disposeWithMe','toStringTag','root','stringify','add','_configService','Injector','object','_commentService','_httpService','user','getUser','rangeId','bufferTime','1921120xhyaYa','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','forEach','273039yTqvad','getMemberID','symbol','deleteComment','replyId','size','4934643jNiuLA','Delete','content','slice','UniverThreadCommentUIPlugin','ThreadCommentModel','code','find','subscribe','CustomRangeType','comments','format','updateComment','values','parentId','getUnit','string','resolveComment','customRanges','createTimestamp','payload','saveCommentToSnapshot','Reply','UserManagerService','/delete','_sessionService','_initDataSource','2TIjwxK','Add','_config','commentUpdate$','rangeType','22424mXhOgt','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','/universer-api/comment/unit/','37655FGrSaM','Solved'];_0x9f19=function(){return _0x26f657;};return _0x9f19();}function _0x4197(_0x108a2b,_0x576f5e){_0x108a2b=_0x108a2b-0x115;const _0x9f19a=_0x9f19();let _0x41975=_0x9f19a[_0x108a2b];return _0x41975;}const _0x28ec3e=_0x4197;(function(_0x301c59,_0x526b3e){const _0x5e65f5=_0x4197,_0x378292=_0x301c59();while(!![]){try{const _0x41dc4e=parseInt(_0x5e65f5(0x15d))/0x1+-parseInt(_0x5e65f5(0x129))/0x2*(parseInt(_0x5e65f5(0x184))/0x3)+-parseInt(_0x5e65f5(0x133))/0x4*(parseInt(_0x5e65f5(0x131))/0x5)+parseInt(_0x5e65f5(0x15e))/0x6+-parseInt(_0x5e65f5(0x18a))/0x7+-parseInt(_0x5e65f5(0x12e))/0x8*(-parseInt(_0x5e65f5(0x163))/0x9)+-parseInt(_0x5e65f5(0x181))/0xa;if(_0x41dc4e===_0x526b3e)break;else _0x378292['push'](_0x378292['shift']());}catch(_0x5f4d86){_0x378292['push'](_0x378292['shift']());}}}(_0x9f19,0x951d4),Object[_0x28ec3e(0x141)](exports,Symbol[_0x28ec3e(0x174)],{'value':_0x28ec3e(0x14b)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs-pro/license'),n=require('@univerjs/core'),r=require('@univerjs/thread-comment-ui'),i=require('@univerjs/protocol'),a=require('@univerjs/thread-comment'),o=require('rxjs'),s=require('@univerjs/network');var c='@univerjs-pro/thread-comment-datasource',l='0.25.0-insiders.20260623-012b5a8';const u=_0x3ae58b=>(0x0,n[_0x28ec3e(0x13b)])(new Date(+_0x3ae58b))[_0x28ec3e(0x119)](_0x28ec3e(0x135)),d=async(_0x43a911,_0x2a758f)=>{const _0x1b67a8=_0x28ec3e;let _0x592c98=_0x43a911[_0x1b67a8(0x16c)](n[_0x1b67a8(0x125)]),_0x205037=_0x43a911['get'](s[_0x1b67a8(0x137)]);_0x2a758f[_0x1b67a8(0x183)](_0xec7091=>{const _0x1b9b2c=_0x1b67a8;_0x592c98[_0x1b9b2c(0x17e)](_0xec7091)&&_0x2a758f['delete'](_0xec7091);}),_0x2a758f[_0x1b67a8(0x189)]&&(await _0x205037[_0x1b67a8(0x16c)](_0x1b67a8(0x13c),{'params':{'userIDs':[..._0x2a758f]}}))[_0x1b67a8(0x14f)][_0x1b67a8(0x136)][_0x1b67a8(0x183)](_0x1cd323=>{const _0x23d797=_0x1b67a8;_0x1cd323&&_0x592c98[_0x23d797(0x171)](_0x1cd323);});};function f(_0x22d357,_0x51b78d){return function(_0x149d47,_0x1143e4){_0x51b78d(_0x149d47,_0x1143e4,_0x22d357);};}function p(_0x3f4981,_0x5388f2,_0x574621,_0x2d9632){const _0x3fec68=_0x28ec3e;var _0x677917=arguments[_0x3fec68(0x147)],_0x143755=_0x677917<0x3?_0x5388f2:_0x2d9632===null?_0x2d9632=Object[_0x3fec68(0x165)](_0x5388f2,_0x574621):_0x2d9632,_0x6e5c1;if(typeof Reflect==_0x3fec68(0x17a)&&typeof Reflect[_0x3fec68(0x143)]==_0x3fec68(0x13e))_0x143755=Reflect['decorate'](_0x3f4981,_0x5388f2,_0x574621,_0x2d9632);else{for(var _0x558636=_0x3f4981['length']-0x1;_0x558636>=0x0;_0x558636--)(_0x6e5c1=_0x3f4981[_0x558636])&&(_0x143755=(_0x677917<0x3?_0x6e5c1(_0x143755):_0x677917>0x3?_0x6e5c1(_0x5388f2,_0x574621,_0x143755):_0x6e5c1(_0x5388f2,_0x574621))||_0x143755);}return _0x677917>0x3&&_0x143755&&Object['defineProperty'](_0x5388f2,_0x574621,_0x143755),_0x143755;}let m=class extends n[_0x28ec3e(0x142)]{constructor(_0x13c80c,_0x4a1b58,_0x5af297,_0x159d1f){const _0x263032=_0x28ec3e;super(),this[_0x263032(0x17b)]=_0x13c80c,this[_0x263032(0x166)]=_0x4a1b58,this[_0x263032(0x14a)]=_0x5af297,this[_0x263032(0x16a)]=_0x159d1f,this[_0x263032(0x157)](),this['_initUserSync']();}['_initUserSync'](){const _0x5e8edf=_0x28ec3e;this['disposeWithMe'](this['_threadCommentModel'][_0x5e8edf(0x12c)]['pipe']((0x0,o[_0x5e8edf(0x180)])(0x10))[_0x5e8edf(0x116)](_0x143095=>{const _0x54ad39=_0x5e8edf;let _0x3c8d48=new Set();_0x143095[_0x54ad39(0x183)](_0x422095=>{const _0x53aa4e=_0x54ad39;switch(_0x422095['type']){case'add':{let _0x126b71=_0x422095[_0x53aa4e(0x122)][_0x53aa4e(0x154)];_0x3c8d48['add'](_0x126b71);break;}default:break;}}),d(this[_0x54ad39(0x16a)],_0x3c8d48);}));}[_0x28ec3e(0x157)](){const _0x160bff=_0x28ec3e;this[_0x160bff(0x173)](this['_commentService']['commentUpdate$'][_0x160bff(0x116)](async _0x23021f=>{const _0xdcb9ce=_0x160bff;var _0x27b24f;let _0x4a9c4d=(_0x27b24f=this[_0xdcb9ce(0x166)][_0xdcb9ce(0x11d)](_0x23021f[_0xdcb9ce(0x16f)])[_0xdcb9ce(0x115)](_0x240fae=>_0x240fae[_0xdcb9ce(0x16b)]===_0x23021f[_0xdcb9ce(0x16b)]))==null?void 0x0:_0x27b24f[_0xdcb9ce(0x175)];if(!_0x4a9c4d)return;let {unitId:_0x3a1518,subUnitId:_0x1a0a0b}=_0x4a9c4d;switch(_0x23021f[_0xdcb9ce(0x17d)]&&this[_0xdcb9ce(0x14a)][_0xdcb9ce(0x171)](_0x23021f['user']),_0x23021f[_0xdcb9ce(0x15b)]){case i[_0xdcb9ce(0x15c)][_0xdcb9ce(0x12a)]:break;case i[_0xdcb9ce(0x15c)][_0xdcb9ce(0x124)]:var _0x5e14d0,_0x1675a0;this[_0xdcb9ce(0x166)]['addComment'](_0x3a1518,_0x1a0a0b,{'unitId':_0x3a1518,'subUnitId':_0x1a0a0b,'ref':'','id':_0x23021f['replyId'],'dT':u(+_0x23021f[_0xdcb9ce(0x121)]),'threadId':_0x23021f[_0xdcb9ce(0x16b)],'personId':(_0x5e14d0=(_0x1675a0=_0x23021f[_0xdcb9ce(0x17d)])==null?void 0x0:_0x1675a0['userID'])==null?_0x23021f[_0xdcb9ce(0x148)]:_0x5e14d0,'text':JSON[_0xdcb9ce(0x14c)](_0x23021f['content']),'parentId':_0x4a9c4d['id']});break;case i[_0xdcb9ce(0x15c)][_0xdcb9ce(0x18b)]:{let _0x43c44e=this['_threadCommentModel'][_0xdcb9ce(0x168)](_0x3a1518,_0x1a0a0b,_0x23021f[_0xdcb9ce(0x188)]);_0x43c44e&&_0x43c44e[_0xdcb9ce(0x11c)]&&this[_0xdcb9ce(0x166)][_0xdcb9ce(0x187)](_0x3a1518,_0x1a0a0b,_0x23021f['replyId']);break;}case i[_0xdcb9ce(0x15c)][_0xdcb9ce(0x139)]:this['_threadCommentModel'][_0xdcb9ce(0x11a)](_0x3a1518,_0x1a0a0b,{'commentId':_0x23021f[_0xdcb9ce(0x188)],'text':JSON[_0xdcb9ce(0x14c)](_0x23021f[_0xdcb9ce(0x18c)])});break;case i[_0xdcb9ce(0x15c)][_0xdcb9ce(0x15f)]:{var _0x132686;let _0x303e2f=(_0x132686=this['_threadCommentModel'][_0xdcb9ce(0x11d)](_0x23021f[_0xdcb9ce(0x16f)])[_0xdcb9ce(0x115)](_0x477a60=>_0x477a60[_0xdcb9ce(0x16b)]===_0x23021f[_0xdcb9ce(0x16b)]))==null?void 0x0:_0x132686['root'];_0x303e2f&&this[_0xdcb9ce(0x166)][_0xdcb9ce(0x11f)](_0x3a1518,_0x1a0a0b,_0x303e2f['id'],_0x23021f[_0xdcb9ce(0x16e)]===i[_0xdcb9ce(0x140)][_0xdcb9ce(0x132)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x28ec3e(0x145)])(e['CommentService'])),f(0x1,(0x0,n[_0x28ec3e(0x145)])(a[_0x28ec3e(0x18f)])),f(0x2,(0x0,n['Inject'])(n[_0x28ec3e(0x125)])),f(0x3,(0x0,n[_0x28ec3e(0x145)])(n[_0x28ec3e(0x179)]))],m);const h={};function g(_0x5a05eb,_0x4787fc){const _0x4a101c=_0x28ec3e;let _0x289c57=_0x5a05eb[_0x4a101c(0x156)][0x0];return{..._0x4787fc,'id':_0x289c57['replyId'],'resolved':_0x5a05eb[_0x4a101c(0x16e)]===0x1,'dT':u(_0x289c57[_0x4a101c(0x121)]),'personId':_0x289c57[_0x4a101c(0x148)],'threadId':_0x289c57[_0x4a101c(0x16b)]};}function _(_0x4d464a,_0x311738,_0x53416d){const _0x405292=_0x28ec3e;var _0x348081,_0x7fe28c;if(((_0x348081=_0x4d464a==null||(_0x7fe28c=_0x4d464a[_0x405292(0x156)])==null?void 0x0:_0x7fe28c['length'])==null?0x0:_0x348081)>0x0){let _0x44114a=(_0x138a27,_0x550c0c)=>({'id':_0x138a27[_0x405292(0x188)],'threadId':_0x138a27[_0x405292(0x16b)],'dT':u(_0x138a27[_0x405292(0x121)]),'personId':_0x138a27[_0x405292(0x148)],'resolved':_0x4d464a[_0x405292(0x16e)]===i[_0x405292(0x140)]['Solved'],'unitId':_0x311738,'subUnitId':_0x53416d,'text':JSON['parse'](_0x138a27[_0x405292(0x18c)]),'parentId':_0x550c0c}),_0x4280dd=_0x44114a(_0x4d464a[_0x405292(0x156)][0x0]);return{..._0x4280dd,'children':_0x4d464a['replies'][_0x405292(0x18d)](0x1)[_0x405292(0x155)](_0xc25f51=>_0x44114a(_0xc25f51,_0x4280dd['id']))};}return null;}let v=class{constructor(_0x1185ee,_0x309482,_0x27607e){const _0x5c33b0=_0x28ec3e;this[_0x5c33b0(0x17c)]=_0x1185ee,this[_0x5c33b0(0x14a)]=_0x309482,this[_0x5c33b0(0x127)]=_0x27607e;}async[_0x28ec3e(0x152)](_0x5846b1){const _0xc8d824=_0x28ec3e;var _0x39dd05,_0x3e3bfa;let {parentId:_0x12533b,unitId:_0x4808fe,text:_0x5b2464,threadId:_0x2d649d}=_0x5846b1,_0x35c0f6=(_0x39dd05=(_0x3e3bfa=_0x5b2464[_0xc8d824(0x120)])==null?void 0x0:_0x3e3bfa[_0xc8d824(0x161)](_0x5af278=>_0x5af278[_0xc8d824(0x12d)]===n['CustomRangeType'][_0xc8d824(0x158)])[_0xc8d824(0x155)](_0x1779dd=>_0x1779dd['rangeId']))==null?[]:_0x39dd05,_0x8b9b6d=JSON['stringify'](_0x5b2464),_0x466b0=(await this[_0xc8d824(0x127)]['requireSession'](_0x4808fe))[_0xc8d824(0x185)]();if(_0x12533b){let _0x3fc4ed={'memberId':_0x466b0,'unitId':_0x4808fe,'content':_0x8b9b6d,'mention':_0x35c0f6,'threadId':_0x2d649d},_0x5caf4c=(await this[_0xc8d824(0x17c)][_0xc8d824(0x13f)]('/universer-api/comment/unit/'+_0x4808fe+_0xc8d824(0x15a),{'body':_0x3fc4ed}))['body'][_0xc8d824(0x16d)];return{..._0x5846b1,'id':_0x5caf4c['replyId'],'dT':(0x0,n[_0xc8d824(0x13b)])(+_0x5caf4c['createTimestamp'])[_0xc8d824(0x119)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5caf4c[_0xc8d824(0x148)]};}else{let _0x5731b8={'memberId':_0x466b0,'unitId':_0x4808fe,'content':_0x8b9b6d,'mention':_0x35c0f6};return g((await this[_0xc8d824(0x17c)][_0xc8d824(0x13f)]('/universer-api/comment/unit/'+_0x4808fe+'/add',{'body':_0x5731b8}))['body']['comment'],_0x5846b1);}}async[_0x28ec3e(0x11a)](_0x6e63e7){const _0x361206=_0x28ec3e;var _0x57ad7c,_0x523e30;let {text:_0x11012a,unitId:_0x2df191}=_0x6e63e7,_0xcbdba0=(_0x57ad7c=(_0x523e30=_0x11012a[_0x361206(0x120)])==null?void 0x0:_0x523e30[_0x361206(0x161)](_0x4faaa6=>_0x4faaa6[_0x361206(0x12d)]===n[_0x361206(0x117)][_0x361206(0x158)])[_0x361206(0x155)](_0x511fa9=>_0x511fa9[_0x361206(0x17f)]))==null?[]:_0x57ad7c,_0x370e7c=JSON[_0x361206(0x176)](_0x11012a),_0xc95879=_0x6e63e7[_0x361206(0x16b)],_0xc25c9d=_0x6e63e7['id'],_0x17baea={'memberId':(await this[_0x361206(0x127)][_0x361206(0x13d)](_0x2df191))[_0x361206(0x185)](),'unitId':_0x2df191,'threadId':_0xc95879,'mention':_0xcbdba0,'content':_0x370e7c,'replyId':_0xc25c9d},_0x16f22b=await this[_0x361206(0x17c)]['post'](_0x361206(0x130)+_0x2df191+_0x361206(0x149),{'body':_0x17baea});return!_0x16f22b['body'][_0x361206(0x134)]||_0x16f22b[_0x361206(0x14f)]['error']['code']===0x1;}async['resolveComment'](_0x44ddb6){const _0x4531b6=_0x28ec3e;let {unitId:_0x5138c6}=_0x44ddb6,_0x319ab2=_0x44ddb6[_0x4531b6(0x16b)],_0x30f0a9={'memberId':this['_userService']['getCurrentUser']()[_0x4531b6(0x169)],'unitId':_0x5138c6,'threadId':_0x319ab2,'solved':_0x44ddb6[_0x4531b6(0x153)]?i[_0x4531b6(0x140)][_0x4531b6(0x132)]:i[_0x4531b6(0x140)][_0x4531b6(0x150)]},_0x4b562f=await this[_0x4531b6(0x17c)][_0x4531b6(0x13f)]('/universer-api/comment/unit/'+_0x5138c6+'/solved',{'body':_0x30f0a9});return!_0x4b562f[_0x4531b6(0x14f)][_0x4531b6(0x134)]||_0x4b562f[_0x4531b6(0x14f)][_0x4531b6(0x134)][_0x4531b6(0x190)]===0x1;}async[_0x28ec3e(0x187)](_0x2c9f59,_0x490027,_0x5295f0,_0x277c35){const _0x3f6343=_0x28ec3e;let _0x24fe7b={'memberId':(await this['_sessionService'][_0x3f6343(0x13d)](_0x2c9f59))[_0x3f6343(0x185)](),'threadId':_0x5295f0,'replyId':_0x277c35,'unitId':_0x2c9f59},_0x25671b=await this['_httpService'][_0x3f6343(0x13f)](_0x3f6343(0x130)+_0x2c9f59+_0x3f6343(0x126),{'body':_0x24fe7b});return!_0x25671b['body'][_0x3f6343(0x134)]||_0x25671b[_0x3f6343(0x14f)][_0x3f6343(0x134)][_0x3f6343(0x190)]===0x1;}async[_0x28ec3e(0x146)](_0x6eb7b2,_0x1c06e0,_0x3dd9ef){const _0x22ce4c=_0x28ec3e;let _0x3af57d={'unitId':_0x6eb7b2,'threadId':_0x3dd9ef},_0x1d4883=await this[_0x22ce4c(0x17c)][_0x22ce4c(0x13f)](_0x22ce4c(0x130)+_0x6eb7b2+'/list',{'body':_0x3af57d}),_0x1d1ae9=_0x3dd9ef[_0x22ce4c(0x155)](_0x11e7f8=>_(_0x1d4883['body'][_0x22ce4c(0x118)][_0x11e7f8],_0x6eb7b2,_0x1c06e0))[_0x22ce4c(0x161)](Boolean);return Object[_0x22ce4c(0x11b)](_0x1d4883[_0x22ce4c(0x14f)][_0x22ce4c(0x136)])[_0x22ce4c(0x183)](_0x5cd862=>{const _0x468079=_0x22ce4c;this[_0x468079(0x14a)][_0x468079(0x171)](_0x5cd862);}),_0x1d1ae9;}[_0x28ec3e(0x123)](_0x3d8ba5){const _0x2c7daa=_0x28ec3e;return{'id':_0x3d8ba5['id'],'threadId':_0x3d8ba5[_0x2c7daa(0x16b)],'ref':_0x3d8ba5[_0x2c7daa(0x172)]};}};v=p([f(0x0,(0x0,n['Inject'])(s[_0x28ec3e(0x137)])),f(0x1,(0x0,n[_0x28ec3e(0x145)])(n[_0x28ec3e(0x125)])),f(0x2,(0x0,n[_0x28ec3e(0x145)])(e[_0x28ec3e(0x14e)]))],v);let y=class extends n[_0x28ec3e(0x142)]{constructor(_0x546b9a,_0x13cfd3){const _0x3a6957=_0x28ec3e;super(),this[_0x3a6957(0x162)]=_0x546b9a,this[_0x3a6957(0x164)]=_0x13cfd3,this[_0x3a6957(0x128)]();}['_initDataSource'](){const _0x58ba8=_0x28ec3e;this[_0x58ba8(0x162)]['dataSource']=this['_threadCommentDataSource'],this[_0x58ba8(0x162)][_0x58ba8(0x14d)]=!0x1;}};y=p([f(0x0,a[_0x28ec3e(0x151)]),f(0x1,(0x0,n[_0x28ec3e(0x145)])(v))],y);function b(_0xd6a5d){'@babel/helpers - typeof';const _0x27d198=_0x28ec3e;return b=typeof Symbol==_0x27d198(0x13e)&&typeof Symbol[_0x27d198(0x160)]==_0x27d198(0x186)?function(_0x2360ea){return typeof _0x2360ea;}:function(_0x55178c){const _0xa66757=_0x27d198;return _0x55178c&&typeof Symbol==_0xa66757(0x13e)&&_0x55178c['constructor']===Symbol&&_0x55178c!==Symbol[_0xa66757(0x170)]?'symbol':typeof _0x55178c;},b(_0xd6a5d);}function x(_0x6b2ad3,_0x5c6374){const _0x4a7140=_0x28ec3e;if(b(_0x6b2ad3)!=_0x4a7140(0x17a)||!_0x6b2ad3)return _0x6b2ad3;var _0x365ae0=_0x6b2ad3[Symbol['toPrimitive']];if(_0x365ae0!==void 0x0){var _0x85307c=_0x365ae0[_0x4a7140(0x159)](_0x6b2ad3,_0x5c6374||'default');if(b(_0x85307c)!='object')return _0x85307c;throw TypeError(_0x4a7140(0x12f));}return(_0x5c6374===_0x4a7140(0x11e)?String:Number)(_0x6b2ad3);}function S(_0x36bdde){const _0x1ea64c=_0x28ec3e;var _0x5110ce=x(_0x36bdde,_0x1ea64c(0x11e));return b(_0x5110ce)==_0x1ea64c(0x186)?_0x5110ce:_0x5110ce+'';}function C(_0xa6e4e,_0x509a99,_0x2ab64e){return(_0x509a99=S(_0x509a99))in _0xa6e4e?Object['defineProperty'](_0xa6e4e,_0x509a99,{'value':_0x2ab64e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xa6e4e[_0x509a99]=_0x2ab64e,_0xa6e4e;}let w=class extends n[_0x28ec3e(0x144)]{constructor(_0x2d8705=h,_0x57d6b6,_0x49f441){const _0x397dd1=_0x28ec3e;super(),this[_0x397dd1(0x12b)]=_0x2d8705,this['_injector']=_0x57d6b6,this[_0x397dd1(0x178)]=_0x49f441;let {..._0x44d2a1}=(0x0,n['merge'])({},h,this['_config']);this[_0x397dd1(0x178)]['setConfig']('thread-comment-data-source.config',_0x44d2a1);}[_0x28ec3e(0x138)](){const _0x415a33=_0x28ec3e;[[v],[y],[m]][_0x415a33(0x183)](_0x3e9d19=>{const _0x258811=_0x415a33;this['_injector'][_0x258811(0x177)](_0x3e9d19);});}['onReady'](){const _0x58d344=_0x28ec3e;this[_0x58d344(0x16a)]['get'](y),this[_0x58d344(0x16a)][_0x58d344(0x16c)](m);}};C(w,'pluginName',_0x28ec3e(0x182)),C(w,'packageName',c),C(w,_0x28ec3e(0x167),l),w=p([(0x0,n[_0x28ec3e(0x13a)])(r[_0x28ec3e(0x18e)],e['UniverCollaborationClientPlugin'],t['UniverLicensePlugin']),f(0x1,(0x0,n[_0x28ec3e(0x145)])(n[_0x28ec3e(0x179)])),f(0x2,n['IConfigService'])],w),Object[_0x28ec3e(0x141)](exports,'UniverThreadCommentDataSourcePlugin',{'enumerable':!0x0,'get':function(){return w;}});
1
+ const _0x34c5be=_0xbc60;(function(_0x5664a7,_0x5535c4){const _0x4398be=_0xbc60,_0x4b7422=_0x5664a7();while(!![]){try{const _0x2d67e1=parseInt(_0x4398be(0x14e))/0x1+parseInt(_0x4398be(0x136))/0x2+parseInt(_0x4398be(0x168))/0x3*(parseInt(_0x4398be(0x1a9))/0x4)+parseInt(_0x4398be(0x17d))/0x5*(parseInt(_0x4398be(0x180))/0x6)+parseInt(_0x4398be(0x192))/0x7*(parseInt(_0x4398be(0x14b))/0x8)+-parseInt(_0x4398be(0x134))/0x9*(-parseInt(_0x4398be(0x16b))/0xa)+-parseInt(_0x4398be(0x18c))/0xb*(parseInt(_0x4398be(0x1a1))/0xc);if(_0x2d67e1===_0x5535c4)break;else _0x4b7422['push'](_0x4b7422['shift']());}catch(_0x48ad1c){_0x4b7422['push'](_0x4b7422['shift']());}}}(_0xfa0b,0x36f0a),Object['defineProperty'](exports,Symbol[_0x34c5be(0x176)],{'value':'Module'}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs-pro/license'),n=require('@univerjs/core'),r=require('@univerjs/thread-comment-ui'),i=require('@univerjs/protocol'),a=require('@univerjs/thread-comment'),o=require('rxjs'),s=require('@univerjs/network');var c='@univerjs-pro/thread-comment-datasource',l='1.0.0-alpha.0';const u=_0x4ffa80=>(0x0,n[_0x34c5be(0x167)])(new Date(+_0x4ffa80))[_0x34c5be(0x1a5)](_0x34c5be(0x13c)),d=async(_0x25193e,_0x33bb20)=>{const _0x5db1d8=_0x34c5be;let _0x3950b1=_0x25193e[_0x5db1d8(0x184)](n[_0x5db1d8(0x18f)]),_0x3d495a=_0x25193e['get'](s[_0x5db1d8(0x177)]);_0x33bb20[_0x5db1d8(0x15d)](_0x52ea17=>{const _0x2d2c4e=_0x5db1d8;_0x3950b1[_0x2d2c4e(0x17a)](_0x52ea17)&&_0x33bb20['delete'](_0x52ea17);}),_0x33bb20[_0x5db1d8(0x13e)]&&(await _0x3d495a[_0x5db1d8(0x184)](_0x5db1d8(0x18e),{'params':{'userIDs':[..._0x33bb20]}}))['body'][_0x5db1d8(0x12e)][_0x5db1d8(0x15d)](_0x51346b=>{const _0x138b66=_0x5db1d8;_0x51346b&&_0x3950b1[_0x138b66(0x182)](_0x51346b);});};function f(_0x33b597,_0x32735b){return function(_0x31a22b,_0x392c7b){_0x32735b(_0x31a22b,_0x392c7b,_0x33b597);};}function p(_0x3c68d5,_0x4505cd,_0x48cf3f,_0x4abdc2){const _0xfc1174=_0x34c5be;var _0x1bffc1=arguments[_0xfc1174(0x161)],_0x49546f=_0x1bffc1<0x3?_0x4505cd:_0x4abdc2===null?_0x4abdc2=Object[_0xfc1174(0x145)](_0x4505cd,_0x48cf3f):_0x4abdc2,_0x3d1766;if(typeof Reflect==_0xfc1174(0x138)&&typeof Reflect['decorate']=='function')_0x49546f=Reflect[_0xfc1174(0x15f)](_0x3c68d5,_0x4505cd,_0x48cf3f,_0x4abdc2);else{for(var _0xf24a7f=_0x3c68d5[_0xfc1174(0x161)]-0x1;_0xf24a7f>=0x0;_0xf24a7f--)(_0x3d1766=_0x3c68d5[_0xf24a7f])&&(_0x49546f=(_0x1bffc1<0x3?_0x3d1766(_0x49546f):_0x1bffc1>0x3?_0x3d1766(_0x4505cd,_0x48cf3f,_0x49546f):_0x3d1766(_0x4505cd,_0x48cf3f))||_0x49546f);}return _0x1bffc1>0x3&&_0x49546f&&Object[_0xfc1174(0x179)](_0x4505cd,_0x48cf3f,_0x49546f),_0x49546f;}let m=class extends n[_0x34c5be(0x162)]{constructor(_0x582605,_0x1d1d5e,_0x11719b,_0xc28c81){const _0x4d215e=_0x34c5be;super(),this[_0x4d215e(0x18a)]=_0x582605,this[_0x4d215e(0x197)]=_0x1d1d5e,this[_0x4d215e(0x183)]=_0x11719b,this[_0x4d215e(0x130)]=_0xc28c81,this[_0x4d215e(0x160)](),this['_initUserSync']();}[_0x34c5be(0x19f)](){const _0x5accc0=_0x34c5be;this[_0x5accc0(0x14c)](this[_0x5accc0(0x197)]['commentUpdate$'][_0x5accc0(0x140)]((0x0,o[_0x5accc0(0x152)])(0x10))['subscribe'](_0x52d522=>{let _0x34912a=new Set();_0x52d522['forEach'](_0x16a76e=>{const _0x5a4c4e=_0xbc60;switch(_0x16a76e['type']){case _0x5a4c4e(0x19a):{let _0xae83b1=_0x16a76e[_0x5a4c4e(0x166)]['personId'];_0x34912a[_0x5a4c4e(0x19a)](_0xae83b1);break;}default:break;}}),d(this['_injector'],_0x34912a);}));}[_0x34c5be(0x160)](){const _0x6e6c28=_0x34c5be;this[_0x6e6c28(0x14c)](this[_0x6e6c28(0x18a)][_0x6e6c28(0x16f)]['subscribe'](async _0x35982c=>{const _0x54248f=_0x6e6c28;var _0x28be3f;let _0x2ab21e=(_0x28be3f=this[_0x54248f(0x197)][_0x54248f(0x17b)](_0x35982c[_0x54248f(0x1a4)])[_0x54248f(0x142)](_0x3e5bcc=>_0x3e5bcc['threadId']===_0x35982c[_0x54248f(0x13a)]))==null?void 0x0:_0x28be3f[_0x54248f(0x181)];if(!_0x2ab21e)return;let {unitId:_0x176977,subUnitId:_0x32dcb4}=_0x2ab21e;switch(_0x35982c['user']&&this[_0x54248f(0x183)][_0x54248f(0x182)](_0x35982c[_0x54248f(0x159)]),_0x35982c[_0x54248f(0x1a8)]){case i['CommentUpdateEventType'][_0x54248f(0x193)]:break;case i['CommentUpdateEventType'][_0x54248f(0x169)]:var _0x558c8b,_0x5c4703;this[_0x54248f(0x197)][_0x54248f(0x150)](_0x176977,_0x32dcb4,{'unitId':_0x176977,'subUnitId':_0x32dcb4,'ref':'','id':_0x35982c['replyId'],'dT':u(+_0x35982c['createTimestamp']),'threadId':_0x35982c['threadId'],'personId':(_0x558c8b=(_0x5c4703=_0x35982c[_0x54248f(0x159)])==null?void 0x0:_0x5c4703[_0x54248f(0x131)])==null?_0x35982c['userId']:_0x558c8b,'text':JSON[_0x54248f(0x128)](_0x35982c[_0x54248f(0x1a0)]),'parentId':_0x2ab21e['id']});break;case i[_0x54248f(0x156)][_0x54248f(0x196)]:{let _0x1b6ade=this['_threadCommentModel']['getComment'](_0x176977,_0x32dcb4,_0x35982c[_0x54248f(0x19c)]);_0x1b6ade&&_0x1b6ade['parentId']&&this[_0x54248f(0x197)][_0x54248f(0x189)](_0x176977,_0x32dcb4,_0x35982c[_0x54248f(0x19c)]);break;}case i[_0x54248f(0x156)][_0x54248f(0x194)]:this[_0x54248f(0x197)][_0x54248f(0x199)](_0x176977,_0x32dcb4,{'commentId':_0x35982c[_0x54248f(0x19c)],'text':JSON[_0x54248f(0x128)](_0x35982c[_0x54248f(0x1a0)])});break;case i['CommentUpdateEventType'][_0x54248f(0x133)]:{var _0x350c4d;let _0x114f23=(_0x350c4d=this[_0x54248f(0x197)][_0x54248f(0x17b)](_0x35982c[_0x54248f(0x1a4)])[_0x54248f(0x142)](_0x552494=>_0x552494[_0x54248f(0x13a)]===_0x35982c['threadId']))==null?void 0x0:_0x350c4d[_0x54248f(0x181)];_0x114f23&&this['_threadCommentModel']['resolveComment'](_0x176977,_0x32dcb4,_0x114f23['id'],_0x35982c['solved']===i['CommentSolvedStatus'][_0x54248f(0x12d)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n['Inject'])(e[_0x34c5be(0x190)])),f(0x1,(0x0,n[_0x34c5be(0x15c)])(a[_0x34c5be(0x15e)])),f(0x2,(0x0,n[_0x34c5be(0x15c)])(n[_0x34c5be(0x18f)])),f(0x3,(0x0,n[_0x34c5be(0x15c)])(n['Injector']))],m);const h={};function g(_0x10b504,_0x4122a9){const _0x5eb9f6=_0x34c5be;let _0x2b625b=_0x10b504['replies'][0x0];return{..._0x4122a9,'id':_0x2b625b[_0x5eb9f6(0x19c)],'resolved':_0x10b504[_0x5eb9f6(0x187)]===0x1,'dT':u(_0x2b625b['createTimestamp']),'personId':_0x2b625b['userId'],'threadId':_0x2b625b[_0x5eb9f6(0x13a)]};}function _(_0x19ba2c,_0x3689f3,_0x2aff13){const _0xbf6c6=_0x34c5be;var _0x4818fd,_0x2ce685;if(((_0x4818fd=_0x19ba2c==null||(_0x2ce685=_0x19ba2c[_0xbf6c6(0x15a)])==null?void 0x0:_0x2ce685[_0xbf6c6(0x161)])==null?0x0:_0x4818fd)>0x0){let _0x4f5c81=(_0x17b6c7,_0x190b38)=>({'id':_0x17b6c7[_0xbf6c6(0x19c)],'threadId':_0x17b6c7['threadId'],'dT':u(_0x17b6c7[_0xbf6c6(0x16a)]),'personId':_0x17b6c7[_0xbf6c6(0x155)],'resolved':_0x19ba2c[_0xbf6c6(0x187)]===i[_0xbf6c6(0x147)]['Solved'],'unitId':_0x3689f3,'subUnitId':_0x2aff13,'text':JSON[_0xbf6c6(0x128)](_0x17b6c7[_0xbf6c6(0x1a0)]),'parentId':_0x190b38}),_0x24eff3=_0x4f5c81(_0x19ba2c['replies'][0x0]);return{..._0x24eff3,'children':_0x19ba2c[_0xbf6c6(0x15a)][_0xbf6c6(0x16e)](0x1)[_0xbf6c6(0x19b)](_0x5dd612=>_0x4f5c81(_0x5dd612,_0x24eff3['id']))};}return null;}function _0xfa0b(){const _0x4a0c6a=['CustomRangeType','symbol','reply','toStringTag','HTTPService','merge','defineProperty','getUser','getUnit','customRanges','5VsEzTz','ref','CollaborationSessionService','1536978Cflcrw','root','addUser','_userService','get','post','filter','solved','_httpService','deleteComment','_commentService','function','5768158bqQEjs','onReady','/universer-api/user/list','UserManagerService','CommentService','UniverCollaborationClientPlugin','14ZENkmZ','Add','Edit','UniverThreadCommentDataSourcePlugin','Delete','_threadCommentModel','/solved','updateComment','add','map','replyId','rangeId','/edit','_initUserSync','content','24gKFTxg','_threadCommentDataSourceService','OpenOrReOpen','unitId','format','comment','COMMENT','type','16gVBbfd','string','parse','UniverThreadCommentUIPlugin','_configService','IConfigService','/reply','Solved','users','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_injector','userID','_config','Solve','9WstrKo','error','671480lhvLFG','code','object','IThreadCommentDataSourceService','threadId','/delete','YYYY/MM/DD\x20HH:mm','listComments','size','values','pipe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','find','Plugin','/list','getOwnPropertyDescriptor','stringify','CommentSolvedStatus','body','default','resolved','947184fXPFAl','disposeWithMe','rangeType','354310puxKHF','UniverLicensePlugin','addComment','/add','bufferTime','prototype','_threadCommentDataSource','userId','CommentUpdateEventType','/universer-api/comment/unit/','dataSource','user','replies','saveCommentToSnapshot','Inject','forEach','ThreadCommentModel','decorate','_init','length','Disposable','resolveComment','pluginName','_sessionService','payload','dateKit','5487veWyXG','Reply','createTimestamp','834650FZlBsk','getMemberID','version','slice','commentUpdate$','constructor','requireSession','packageName'];_0xfa0b=function(){return _0x4a0c6a;};return _0xfa0b();}let v=class{constructor(_0x325696,_0x5946b7,_0x423449){const _0x3da50b=_0x34c5be;this['_httpService']=_0x325696,this[_0x3da50b(0x183)]=_0x5946b7,this[_0x3da50b(0x165)]=_0x423449;}async[_0x34c5be(0x150)](_0x1419f8){const _0x440281=_0x34c5be;var _0x530530,_0x17a10e;let {parentId:_0x47b2,unitId:_0xe89084,text:_0x5beb4a,threadId:_0x5c371e}=_0x1419f8,_0x4cf204=(_0x530530=(_0x17a10e=_0x5beb4a[_0x440281(0x17c)])==null?void 0x0:_0x17a10e[_0x440281(0x186)](_0x241a1c=>_0x241a1c[_0x440281(0x14d)]===n[_0x440281(0x173)]['COMMENT'])['map'](_0x587403=>_0x587403['rangeId']))==null?[]:_0x530530,_0x4a8f4f=JSON['stringify'](_0x5beb4a),_0x31aa5a=(await this[_0x440281(0x165)][_0x440281(0x171)](_0xe89084))[_0x440281(0x16c)]();if(_0x47b2){let _0x39decf={'memberId':_0x31aa5a,'unitId':_0xe89084,'content':_0x4a8f4f,'mention':_0x4cf204,'threadId':_0x5c371e},_0x19b364=(await this[_0x440281(0x188)][_0x440281(0x185)](_0x440281(0x157)+_0xe89084+_0x440281(0x12c),{'body':_0x39decf}))['body'][_0x440281(0x175)];return{..._0x1419f8,'id':_0x19b364[_0x440281(0x19c)],'dT':(0x0,n[_0x440281(0x167)])(+_0x19b364[_0x440281(0x16a)])[_0x440281(0x1a5)](_0x440281(0x13c)),'personId':_0x19b364[_0x440281(0x155)]};}else{let _0x1fbc4c={'memberId':_0x31aa5a,'unitId':_0xe89084,'content':_0x4a8f4f,'mention':_0x4cf204};return g((await this[_0x440281(0x188)]['post'](_0x440281(0x157)+_0xe89084+_0x440281(0x151),{'body':_0x1fbc4c}))[_0x440281(0x148)][_0x440281(0x1a6)],_0x1419f8);}}async[_0x34c5be(0x199)](_0x41d7ce){const _0x3afb9e=_0x34c5be;var _0xb7d038,_0x5393a2;let {text:_0x3cbb7f,unitId:_0x44ebe0}=_0x41d7ce,_0x10f92f=(_0xb7d038=(_0x5393a2=_0x3cbb7f[_0x3afb9e(0x17c)])==null?void 0x0:_0x5393a2[_0x3afb9e(0x186)](_0x505d18=>_0x505d18['rangeType']===n[_0x3afb9e(0x173)][_0x3afb9e(0x1a7)])[_0x3afb9e(0x19b)](_0x50abc1=>_0x50abc1[_0x3afb9e(0x19d)]))==null?[]:_0xb7d038,_0xbb2dbd=JSON[_0x3afb9e(0x146)](_0x3cbb7f),_0x28c94d=_0x41d7ce['threadId'],_0xd3f73f=_0x41d7ce['id'],_0x4578f5={'memberId':(await this[_0x3afb9e(0x165)][_0x3afb9e(0x171)](_0x44ebe0))[_0x3afb9e(0x16c)](),'unitId':_0x44ebe0,'threadId':_0x28c94d,'mention':_0x10f92f,'content':_0xbb2dbd,'replyId':_0xd3f73f},_0x56738c=await this[_0x3afb9e(0x188)][_0x3afb9e(0x185)](_0x3afb9e(0x157)+_0x44ebe0+_0x3afb9e(0x19e),{'body':_0x4578f5});return!_0x56738c[_0x3afb9e(0x148)][_0x3afb9e(0x135)]||_0x56738c['body'][_0x3afb9e(0x135)][_0x3afb9e(0x137)]===0x1;}async[_0x34c5be(0x163)](_0x59b7b2){const _0x30fad6=_0x34c5be;let {unitId:_0x376361}=_0x59b7b2,_0x395a95=_0x59b7b2['threadId'],_0x4cf0f8={'memberId':this[_0x30fad6(0x183)]['getCurrentUser']()['userID'],'unitId':_0x376361,'threadId':_0x395a95,'solved':_0x59b7b2[_0x30fad6(0x14a)]?i[_0x30fad6(0x147)]['Solved']:i[_0x30fad6(0x147)][_0x30fad6(0x1a3)]},_0x4ef2fa=await this[_0x30fad6(0x188)][_0x30fad6(0x185)](_0x30fad6(0x157)+_0x376361+_0x30fad6(0x198),{'body':_0x4cf0f8});return!_0x4ef2fa['body'][_0x30fad6(0x135)]||_0x4ef2fa[_0x30fad6(0x148)]['error'][_0x30fad6(0x137)]===0x1;}async[_0x34c5be(0x189)](_0xaab568,_0x5ef09b,_0xe02f76,_0x148b26){const _0x2b849d=_0x34c5be;let _0x41c61a={'memberId':(await this[_0x2b849d(0x165)][_0x2b849d(0x171)](_0xaab568))['getMemberID'](),'threadId':_0xe02f76,'replyId':_0x148b26,'unitId':_0xaab568},_0x4390da=await this[_0x2b849d(0x188)][_0x2b849d(0x185)](_0x2b849d(0x157)+_0xaab568+_0x2b849d(0x13b),{'body':_0x41c61a});return!_0x4390da[_0x2b849d(0x148)]['error']||_0x4390da['body'][_0x2b849d(0x135)]['code']===0x1;}async[_0x34c5be(0x13d)](_0x4341ad,_0x53df8b,_0xe4f2b1){const _0x351ae0=_0x34c5be;let _0x5313c0={'unitId':_0x4341ad,'threadId':_0xe4f2b1},_0x3f87e5=await this[_0x351ae0(0x188)][_0x351ae0(0x185)](_0x351ae0(0x157)+_0x4341ad+_0x351ae0(0x144),{'body':_0x5313c0}),_0x104707=_0xe4f2b1[_0x351ae0(0x19b)](_0x7e8cc5=>_(_0x3f87e5[_0x351ae0(0x148)]['comments'][_0x7e8cc5],_0x4341ad,_0x53df8b))[_0x351ae0(0x186)](Boolean);return Object[_0x351ae0(0x13f)](_0x3f87e5[_0x351ae0(0x148)]['users'])[_0x351ae0(0x15d)](_0x189c9c=>{const _0x525c2d=_0x351ae0;this[_0x525c2d(0x183)]['addUser'](_0x189c9c);}),_0x104707;}[_0x34c5be(0x15b)](_0x1686b8){const _0x1f9cc3=_0x34c5be;return{'id':_0x1686b8['id'],'threadId':_0x1686b8[_0x1f9cc3(0x13a)],'ref':_0x1686b8[_0x1f9cc3(0x17e)]};}};v=p([f(0x0,(0x0,n[_0x34c5be(0x15c)])(s[_0x34c5be(0x177)])),f(0x1,(0x0,n[_0x34c5be(0x15c)])(n[_0x34c5be(0x18f)])),f(0x2,(0x0,n[_0x34c5be(0x15c)])(e[_0x34c5be(0x17f)]))],v);let y=class extends n['Disposable']{constructor(_0x59745f,_0x1681f4){const _0x160661=_0x34c5be;super(),this[_0x160661(0x1a2)]=_0x59745f,this[_0x160661(0x154)]=_0x1681f4,this['_initDataSource']();}['_initDataSource'](){const _0x5ce29f=_0x34c5be;this[_0x5ce29f(0x1a2)][_0x5ce29f(0x158)]=this[_0x5ce29f(0x154)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};y=p([f(0x0,a[_0x34c5be(0x139)]),f(0x1,(0x0,n['Inject'])(v))],y);function _0xbc60(_0x38706e,_0x39c763){_0x38706e=_0x38706e-0x127;const _0xfa0bd6=_0xfa0b();let _0xbc60e5=_0xfa0bd6[_0x38706e];return _0xbc60e5;}function b(_0x50e897){'@babel/helpers - typeof';const _0x1a2d52=_0x34c5be;return b=typeof Symbol=='function'&&typeof Symbol['iterator']==_0x1a2d52(0x174)?function(_0x5b1d19){return typeof _0x5b1d19;}:function(_0x3d7de8){const _0x3d73d8=_0x1a2d52;return _0x3d7de8&&typeof Symbol==_0x3d73d8(0x18b)&&_0x3d7de8[_0x3d73d8(0x170)]===Symbol&&_0x3d7de8!==Symbol[_0x3d73d8(0x153)]?_0x3d73d8(0x174):typeof _0x3d7de8;},b(_0x50e897);}function x(_0x3f8e65,_0x2b8c04){const _0x1606d7=_0x34c5be;if(b(_0x3f8e65)!=_0x1606d7(0x138)||!_0x3f8e65)return _0x3f8e65;var _0xcb2d11=_0x3f8e65[Symbol['toPrimitive']];if(_0xcb2d11!==void 0x0){var _0x79d785=_0xcb2d11['call'](_0x3f8e65,_0x2b8c04||_0x1606d7(0x149));if(b(_0x79d785)!=_0x1606d7(0x138))return _0x79d785;throw TypeError(_0x1606d7(0x12f));}return(_0x2b8c04===_0x1606d7(0x127)?String:Number)(_0x3f8e65);}function S(_0xba8887){const _0x5e62ae=_0x34c5be;var _0x14b368=x(_0xba8887,_0x5e62ae(0x127));return b(_0x14b368)==_0x5e62ae(0x174)?_0x14b368:_0x14b368+'';}function C(_0x34c42d,_0x20ab3c,_0x89263e){const _0x38a6d5=_0x34c5be;return(_0x20ab3c=S(_0x20ab3c))in _0x34c42d?Object[_0x38a6d5(0x179)](_0x34c42d,_0x20ab3c,{'value':_0x89263e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x34c42d[_0x20ab3c]=_0x89263e,_0x34c42d;}let w=class extends n[_0x34c5be(0x143)]{constructor(_0xb1412b=h,_0x54e5cc,_0xa3d13f){const _0x5bd8be=_0x34c5be;super(),this['_config']=_0xb1412b,this['_injector']=_0x54e5cc,this['_configService']=_0xa3d13f;let {..._0x5e5fa9}=(0x0,n[_0x5bd8be(0x178)])({},h,this[_0x5bd8be(0x132)]);this[_0x5bd8be(0x12a)]['setConfig']('thread-comment-data-source.config',_0x5e5fa9);}['onStarting'](){const _0xe60874=_0x34c5be;[[v],[y],[m]][_0xe60874(0x15d)](_0xa0cd61=>{const _0x5afabd=_0xe60874;this['_injector'][_0x5afabd(0x19a)](_0xa0cd61);});}[_0x34c5be(0x18d)](){const _0x54d4ce=_0x34c5be;this[_0x54d4ce(0x130)][_0x54d4ce(0x184)](y),this[_0x54d4ce(0x130)][_0x54d4ce(0x184)](m);}};C(w,_0x34c5be(0x164),_0x34c5be(0x141)),C(w,_0x34c5be(0x172),c),C(w,_0x34c5be(0x16d),l),w=p([(0x0,n['DependentOn'])(r[_0x34c5be(0x129)],e[_0x34c5be(0x191)],t[_0x34c5be(0x14f)]),f(0x1,(0x0,n[_0x34c5be(0x15c)])(n['Injector'])),f(0x2,n[_0x34c5be(0x12b)])],w),Object['defineProperty'](exports,_0x34c5be(0x195),{'enumerable':!0x0,'get':function(){return w;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1519fa=_0x1838;(function(_0x2e8c19,_0x597352){const _0x2b8067=_0x1838,_0x2b5090=_0x2e8c19();while(!![]){try{const _0x335c75=parseInt(_0x2b8067(0xe1))/0x1+-parseInt(_0x2b8067(0x90))/0x2*(parseInt(_0x2b8067(0xb8))/0x3)+parseInt(_0x2b8067(0x8a))/0x4+-parseInt(_0x2b8067(0xe0))/0x5*(-parseInt(_0x2b8067(0xa8))/0x6)+parseInt(_0x2b8067(0x91))/0x7*(-parseInt(_0x2b8067(0xdb))/0x8)+-parseInt(_0x2b8067(0xeb))/0x9*(parseInt(_0x2b8067(0xe2))/0xa)+parseInt(_0x2b8067(0x95))/0xb*(-parseInt(_0x2b8067(0x8e))/0xc);if(_0x335c75===_0x597352)break;else _0x2b5090['push'](_0x2b5090['shift']());}catch(_0x205595){_0x2b5090['push'](_0x2b5090['shift']());}}}(_0x3041,0x80c68));import{CollaborationSessionService as _0x8cd17a,CommentService as _0x5dcb19,UniverCollaborationClientPlugin as _0x5ca470}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4b2402}from'@univerjs-pro/license';import{CustomRangeType as _0x2b3f20,DependentOn as _0x34a858,Disposable as _0x529dfc,IConfigService as _0x45fc64,Inject as _0x2a2077,Injector as _0x28841a,Plugin as _0x4742b4,UserManagerService as _0x30db26,dateKit as _0x207f3d,merge as _0x221b8a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x211f11}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x113f1e,CommentUpdateEventType as _0x589fe7}from'@univerjs/protocol';function _0x3041(){const _0x7843ea=['/reply','threadId','customRanges','_commentService','error','/list','Solve','reply','comments','getMemberID','18808DmFiWa','listComments','subscribe','decorate','symbol','2470vGAVaI','647796rxpCSc','144610iGbZNr','string','createTimestamp','find','payload','length','code','0.25.0-insiders.20260623-012b5a8','_threadCommentDataSourceService','522keaLtf','call','setConfig','version','_threadCommentDataSource','comment','/edit','deleteComment','post','addComment','getCurrentUser','replyId','resolved','replies','YYYY/MM/DD\x20HH:mm','size','4161260TzEvTr','_injector','parse','unitId','15660TRGvPU','onStarting','178174iKByJr','1463uOWcQA','_initDataSource','updateComment','body','605Jwutuk','filter','map','_init','_config','function','getUser','users','Delete','defineProperty','values','/add','pluginName','slice','rangeId','personId','/universer-api/comment/unit/','_threadCommentModel','dataSource','8340SSHonF','solved','userId','_httpService','Reply','getComment','addUser','resolveComment','add','_userService','get','default','/delete','thread-comment-data-source.config','stringify','_sessionService','15CFJczi','object','format','root','user','rangeType','commentUpdate$','syncUpdateMutationToColla','_initUserSync','disposeWithMe','@univerjs-pro/thread-comment-datasource','content','constructor','prototype','onReady','toPrimitive','Add','Edit','Solved','forEach','requireSession','parentId','_configService','COMMENT','/universer-api/user/list'];_0x3041=function(){return _0x7843ea;};return _0x3041();}import{IThreadCommentDataSourceService as _0x4433a9,ThreadCommentModel as _0x2d391d}from'@univerjs/thread-comment';import{bufferTime as _0x55c1c5}from'rxjs';import{HTTPService as _0x3d2034}from'@univerjs/network';var x=_0x1519fa(0xc2),S=_0x1519fa(0xe9);const C=_0x46e5bc=>_0x207f3d(new Date(+_0x46e5bc))[_0x1519fa(0xba)](_0x1519fa(0x88)),w=async(_0x18e1b4,_0x2e3aad)=>{const _0x17ac45=_0x1519fa;let _0x3d0809=_0x18e1b4['get'](_0x30db26),_0x480e23=_0x18e1b4[_0x17ac45(0xb2)](_0x3d2034);_0x2e3aad['forEach'](_0x102e5a=>{const _0xd43854=_0x17ac45;_0x3d0809[_0xd43854(0x9b)](_0x102e5a)&&_0x2e3aad['delete'](_0x102e5a);}),_0x2e3aad[_0x17ac45(0x89)]&&(await _0x480e23[_0x17ac45(0xb2)](_0x17ac45(0xd0),{'params':{'userIDs':[..._0x2e3aad]}}))[_0x17ac45(0x94)][_0x17ac45(0x9c)][_0x17ac45(0xcb)](_0x354ecd=>{_0x354ecd&&_0x3d0809['addUser'](_0x354ecd);});};function T(_0x4f09bd,_0x559924){return function(_0x2af10f,_0x291dc0){_0x559924(_0x2af10f,_0x291dc0,_0x4f09bd);};}function E(_0x72f3c6,_0x3f3f63,_0x2ab700,_0x48896c){const _0x1bd8ce=_0x1519fa;var _0x5d138c=arguments[_0x1bd8ce(0xe7)],_0x48582e=_0x5d138c<0x3?_0x3f3f63:_0x48896c===null?_0x48896c=Object['getOwnPropertyDescriptor'](_0x3f3f63,_0x2ab700):_0x48896c,_0x4227d5;if(typeof Reflect=='object'&&typeof Reflect[_0x1bd8ce(0xde)]==_0x1bd8ce(0x9a))_0x48582e=Reflect[_0x1bd8ce(0xde)](_0x72f3c6,_0x3f3f63,_0x2ab700,_0x48896c);else{for(var _0x4baa77=_0x72f3c6[_0x1bd8ce(0xe7)]-0x1;_0x4baa77>=0x0;_0x4baa77--)(_0x4227d5=_0x72f3c6[_0x4baa77])&&(_0x48582e=(_0x5d138c<0x3?_0x4227d5(_0x48582e):_0x5d138c>0x3?_0x4227d5(_0x3f3f63,_0x2ab700,_0x48582e):_0x4227d5(_0x3f3f63,_0x2ab700))||_0x48582e);}return _0x5d138c>0x3&&_0x48582e&&Object['defineProperty'](_0x3f3f63,_0x2ab700,_0x48582e),_0x48582e;}let D=class extends _0x529dfc{constructor(_0xf674e,_0x4e0a67,_0x496997,_0x16e701){const _0x3d62e4=_0x1519fa;super(),this['_commentService']=_0xf674e,this['_threadCommentModel']=_0x4e0a67,this[_0x3d62e4(0xb1)]=_0x496997,this['_injector']=_0x16e701,this['_init'](),this[_0x3d62e4(0xc0)]();}[_0x1519fa(0xc0)](){const _0x3e9bbf=_0x1519fa;this[_0x3e9bbf(0xc1)](this[_0x3e9bbf(0xa6)][_0x3e9bbf(0xbe)]['pipe'](_0x55c1c5(0x10))['subscribe'](_0xdd79c=>{const _0x42b414=_0x3e9bbf;let _0x523edc=new Set();_0xdd79c[_0x42b414(0xcb)](_0x3522e7=>{const _0x2ce883=_0x42b414;switch(_0x3522e7['type']){case _0x2ce883(0xb0):{let _0x37af45=_0x3522e7[_0x2ce883(0xe6)][_0x2ce883(0xa4)];_0x523edc[_0x2ce883(0xb0)](_0x37af45);break;}default:break;}}),w(this[_0x42b414(0x8b)],_0x523edc);}));}[_0x1519fa(0x98)](){const _0x23e2ec=_0x1519fa;this[_0x23e2ec(0xc1)](this[_0x23e2ec(0xd4)][_0x23e2ec(0xbe)][_0x23e2ec(0xdd)](async _0x15e635=>{const _0x466eb0=_0x23e2ec;var _0x38cc9d;let _0x3b9ea8=(_0x38cc9d=this[_0x466eb0(0xa6)]['getUnit'](_0x15e635[_0x466eb0(0x8d)])[_0x466eb0(0xe5)](_0x3963aa=>_0x3963aa[_0x466eb0(0xd2)]===_0x15e635[_0x466eb0(0xd2)]))==null?void 0x0:_0x38cc9d['root'];if(!_0x3b9ea8)return;let {unitId:_0xb4be97,subUnitId:_0x59cfd3}=_0x3b9ea8;switch(_0x15e635[_0x466eb0(0xbc)]&&this[_0x466eb0(0xb1)][_0x466eb0(0xae)](_0x15e635['user']),_0x15e635['type']){case _0x589fe7[_0x466eb0(0xc8)]:break;case _0x589fe7[_0x466eb0(0xac)]:var _0x4e296f,_0x5bb82;this['_threadCommentModel'][_0x466eb0(0xf4)](_0xb4be97,_0x59cfd3,{'unitId':_0xb4be97,'subUnitId':_0x59cfd3,'ref':'','id':_0x15e635[_0x466eb0(0xf6)],'dT':C(+_0x15e635['createTimestamp']),'threadId':_0x15e635['threadId'],'personId':(_0x4e296f=(_0x5bb82=_0x15e635[_0x466eb0(0xbc)])==null?void 0x0:_0x5bb82['userID'])==null?_0x15e635['userId']:_0x4e296f,'text':JSON[_0x466eb0(0x8c)](_0x15e635[_0x466eb0(0xc3)]),'parentId':_0x3b9ea8['id']});break;case _0x589fe7[_0x466eb0(0x9d)]:{let _0x469847=this[_0x466eb0(0xa6)][_0x466eb0(0xad)](_0xb4be97,_0x59cfd3,_0x15e635['replyId']);_0x469847&&_0x469847[_0x466eb0(0xcd)]&&this[_0x466eb0(0xa6)][_0x466eb0(0xf2)](_0xb4be97,_0x59cfd3,_0x15e635[_0x466eb0(0xf6)]);break;}case _0x589fe7[_0x466eb0(0xc9)]:this[_0x466eb0(0xa6)][_0x466eb0(0x93)](_0xb4be97,_0x59cfd3,{'commentId':_0x15e635[_0x466eb0(0xf6)],'text':JSON[_0x466eb0(0x8c)](_0x15e635[_0x466eb0(0xc3)])});break;case _0x589fe7[_0x466eb0(0xd7)]:{var _0x49f26e;let _0x1fb546=(_0x49f26e=this['_threadCommentModel']['getUnit'](_0x15e635['unitId'])[_0x466eb0(0xe5)](_0x4b0a68=>_0x4b0a68[_0x466eb0(0xd2)]===_0x15e635['threadId']))==null?void 0x0:_0x49f26e[_0x466eb0(0xbb)];_0x1fb546&&this[_0x466eb0(0xa6)][_0x466eb0(0xaf)](_0xb4be97,_0x59cfd3,_0x1fb546['id'],_0x15e635[_0x466eb0(0xa9)]===_0x113f1e[_0x466eb0(0xca)]);break;}default:break;}}));}};D=E([T(0x0,_0x2a2077(_0x5dcb19)),T(0x1,_0x2a2077(_0x2d391d)),T(0x2,_0x2a2077(_0x30db26)),T(0x3,_0x2a2077(_0x28841a))],D);function _0x1838(_0x2e90af,_0x20f374){_0x2e90af=_0x2e90af-0x88;const _0x30410a=_0x3041();let _0x18383e=_0x30410a[_0x2e90af];return _0x18383e;}const O={};function k(_0x4a641e,_0x3c125f){const _0xc0c84d=_0x1519fa;let _0x48707e=_0x4a641e[_0xc0c84d(0xf8)][0x0];return{..._0x3c125f,'id':_0x48707e['replyId'],'resolved':_0x4a641e[_0xc0c84d(0xa9)]===0x1,'dT':C(_0x48707e[_0xc0c84d(0xe4)]),'personId':_0x48707e[_0xc0c84d(0xaa)],'threadId':_0x48707e['threadId']};}function A(_0x77f81,_0x4db2ba,_0x55c998){const _0x3db60b=_0x1519fa;var _0x21da8c,_0x34f7a0;if(((_0x21da8c=_0x77f81==null||(_0x34f7a0=_0x77f81[_0x3db60b(0xf8)])==null?void 0x0:_0x34f7a0[_0x3db60b(0xe7)])==null?0x0:_0x21da8c)>0x0){let _0x12f93a=(_0x27469a,_0xa050f8)=>({'id':_0x27469a[_0x3db60b(0xf6)],'threadId':_0x27469a['threadId'],'dT':C(_0x27469a['createTimestamp']),'personId':_0x27469a[_0x3db60b(0xaa)],'resolved':_0x77f81[_0x3db60b(0xa9)]===_0x113f1e[_0x3db60b(0xca)],'unitId':_0x4db2ba,'subUnitId':_0x55c998,'text':JSON[_0x3db60b(0x8c)](_0x27469a[_0x3db60b(0xc3)]),'parentId':_0xa050f8}),_0x2d5e2a=_0x12f93a(_0x77f81[_0x3db60b(0xf8)][0x0]);return{..._0x2d5e2a,'children':_0x77f81['replies'][_0x3db60b(0xa2)](0x1)[_0x3db60b(0x97)](_0x3ff9f3=>_0x12f93a(_0x3ff9f3,_0x2d5e2a['id']))};}return null;}let j=class{constructor(_0x594d15,_0x5c238a,_0x47ba16){const _0xc74304=_0x1519fa;this[_0xc74304(0xab)]=_0x594d15,this[_0xc74304(0xb1)]=_0x5c238a,this[_0xc74304(0xb7)]=_0x47ba16;}async[_0x1519fa(0xf4)](_0xd5f8b8){const _0x3bcf6a=_0x1519fa;var _0x214ec9,_0x12976f;let {parentId:_0x38b2f4,unitId:_0x581356,text:_0x586279,threadId:_0x5db894}=_0xd5f8b8,_0x1bbba6=(_0x214ec9=(_0x12976f=_0x586279[_0x3bcf6a(0xd3)])==null?void 0x0:_0x12976f['filter'](_0x57a217=>_0x57a217['rangeType']===_0x2b3f20[_0x3bcf6a(0xcf)])['map'](_0x8bebde=>_0x8bebde[_0x3bcf6a(0xa3)]))==null?[]:_0x214ec9,_0xa95b29=JSON['stringify'](_0x586279),_0x27b32c=(await this[_0x3bcf6a(0xb7)][_0x3bcf6a(0xcc)](_0x581356))[_0x3bcf6a(0xda)]();if(_0x38b2f4){let _0x33c949={'memberId':_0x27b32c,'unitId':_0x581356,'content':_0xa95b29,'mention':_0x1bbba6,'threadId':_0x5db894},_0x1692c0=(await this[_0x3bcf6a(0xab)][_0x3bcf6a(0xf3)](_0x3bcf6a(0xa5)+_0x581356+_0x3bcf6a(0xd1),{'body':_0x33c949}))['body'][_0x3bcf6a(0xd8)];return{..._0xd5f8b8,'id':_0x1692c0['replyId'],'dT':_0x207f3d(+_0x1692c0[_0x3bcf6a(0xe4)])['format'](_0x3bcf6a(0x88)),'personId':_0x1692c0[_0x3bcf6a(0xaa)]};}else{let _0x5837f3={'memberId':_0x27b32c,'unitId':_0x581356,'content':_0xa95b29,'mention':_0x1bbba6};return k((await this[_0x3bcf6a(0xab)][_0x3bcf6a(0xf3)](_0x3bcf6a(0xa5)+_0x581356+_0x3bcf6a(0xa0),{'body':_0x5837f3}))[_0x3bcf6a(0x94)][_0x3bcf6a(0xf0)],_0xd5f8b8);}}async[_0x1519fa(0x93)](_0x434e23){const _0x2fb13d=_0x1519fa;var _0x2a4ae6,_0x3483a2;let {text:_0x817009,unitId:_0x4b8bf2}=_0x434e23,_0x418e7d=(_0x2a4ae6=(_0x3483a2=_0x817009[_0x2fb13d(0xd3)])==null?void 0x0:_0x3483a2[_0x2fb13d(0x96)](_0x1b820d=>_0x1b820d[_0x2fb13d(0xbd)]===_0x2b3f20[_0x2fb13d(0xcf)])[_0x2fb13d(0x97)](_0x2f080a=>_0x2f080a[_0x2fb13d(0xa3)]))==null?[]:_0x2a4ae6,_0x40dac7=JSON[_0x2fb13d(0xb6)](_0x817009),_0x3cf275=_0x434e23[_0x2fb13d(0xd2)],_0x39f524=_0x434e23['id'],_0x3edec9={'memberId':(await this[_0x2fb13d(0xb7)][_0x2fb13d(0xcc)](_0x4b8bf2))[_0x2fb13d(0xda)](),'unitId':_0x4b8bf2,'threadId':_0x3cf275,'mention':_0x418e7d,'content':_0x40dac7,'replyId':_0x39f524},_0x380e5c=await this[_0x2fb13d(0xab)][_0x2fb13d(0xf3)](_0x2fb13d(0xa5)+_0x4b8bf2+_0x2fb13d(0xf1),{'body':_0x3edec9});return!_0x380e5c[_0x2fb13d(0x94)]['error']||_0x380e5c[_0x2fb13d(0x94)][_0x2fb13d(0xd5)]['code']===0x1;}async[_0x1519fa(0xaf)](_0x56f18c){const _0x1a843d=_0x1519fa;let {unitId:_0x4a37e7}=_0x56f18c,_0x244059=_0x56f18c[_0x1a843d(0xd2)],_0x3bd177={'memberId':this[_0x1a843d(0xb1)][_0x1a843d(0xf5)]()['userID'],'unitId':_0x4a37e7,'threadId':_0x244059,'solved':_0x56f18c[_0x1a843d(0xf7)]?_0x113f1e[_0x1a843d(0xca)]:_0x113f1e['OpenOrReOpen']},_0x2ef059=await this[_0x1a843d(0xab)][_0x1a843d(0xf3)](_0x1a843d(0xa5)+_0x4a37e7+'/solved',{'body':_0x3bd177});return!_0x2ef059['body'][_0x1a843d(0xd5)]||_0x2ef059[_0x1a843d(0x94)][_0x1a843d(0xd5)]['code']===0x1;}async[_0x1519fa(0xf2)](_0x53b4c2,_0x2620d1,_0x6067ac,_0x2b566a){const _0x18bd7e=_0x1519fa;let _0x376ea6={'memberId':(await this[_0x18bd7e(0xb7)][_0x18bd7e(0xcc)](_0x53b4c2))[_0x18bd7e(0xda)](),'threadId':_0x6067ac,'replyId':_0x2b566a,'unitId':_0x53b4c2},_0x3cd26d=await this[_0x18bd7e(0xab)][_0x18bd7e(0xf3)](_0x18bd7e(0xa5)+_0x53b4c2+_0x18bd7e(0xb4),{'body':_0x376ea6});return!_0x3cd26d[_0x18bd7e(0x94)]['error']||_0x3cd26d[_0x18bd7e(0x94)][_0x18bd7e(0xd5)][_0x18bd7e(0xe8)]===0x1;}async[_0x1519fa(0xdc)](_0x7d6bbe,_0xb48c17,_0x2baa79){const _0x1f7441=_0x1519fa;let _0x336f84={'unitId':_0x7d6bbe,'threadId':_0x2baa79},_0x2e1078=await this[_0x1f7441(0xab)][_0x1f7441(0xf3)]('/universer-api/comment/unit/'+_0x7d6bbe+_0x1f7441(0xd6),{'body':_0x336f84}),_0x27321a=_0x2baa79['map'](_0x54ff85=>A(_0x2e1078[_0x1f7441(0x94)][_0x1f7441(0xd9)][_0x54ff85],_0x7d6bbe,_0xb48c17))['filter'](Boolean);return Object[_0x1f7441(0x9f)](_0x2e1078[_0x1f7441(0x94)]['users'])['forEach'](_0x2ebf00=>{const _0x5126e5=_0x1f7441;this[_0x5126e5(0xb1)]['addUser'](_0x2ebf00);}),_0x27321a;}['saveCommentToSnapshot'](_0x519eb7){const _0xbd4cac=_0x1519fa;return{'id':_0x519eb7['id'],'threadId':_0x519eb7[_0xbd4cac(0xd2)],'ref':_0x519eb7['ref']};}};j=E([T(0x0,_0x2a2077(_0x3d2034)),T(0x1,_0x2a2077(_0x30db26)),T(0x2,_0x2a2077(_0x8cd17a))],j);let M=class extends _0x529dfc{constructor(_0x920371,_0x56ba4a){const _0x6d76d6=_0x1519fa;super(),this[_0x6d76d6(0xea)]=_0x920371,this[_0x6d76d6(0xef)]=_0x56ba4a,this['_initDataSource']();}[_0x1519fa(0x92)](){const _0xb47a40=_0x1519fa;this[_0xb47a40(0xea)][_0xb47a40(0xa7)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xb47a40(0xbf)]=!0x1;}};M=E([T(0x0,_0x4433a9),T(0x1,_0x2a2077(j))],M);function N(_0x1dd919){'@babel/helpers - typeof';const _0x463aab=_0x1519fa;return N=typeof Symbol==_0x463aab(0x9a)&&typeof Symbol['iterator']==_0x463aab(0xdf)?function(_0x6f70a8){return typeof _0x6f70a8;}:function(_0x5c86ac){const _0x132baf=_0x463aab;return _0x5c86ac&&typeof Symbol=='function'&&_0x5c86ac[_0x132baf(0xc4)]===Symbol&&_0x5c86ac!==Symbol[_0x132baf(0xc5)]?_0x132baf(0xdf):typeof _0x5c86ac;},N(_0x1dd919);}function P(_0x3687f5,_0xfc48bd){const _0x3b1695=_0x1519fa;if(N(_0x3687f5)!=_0x3b1695(0xb9)||!_0x3687f5)return _0x3687f5;var _0x57d29f=_0x3687f5[Symbol[_0x3b1695(0xc7)]];if(_0x57d29f!==void 0x0){var _0x2f75b2=_0x57d29f[_0x3b1695(0xec)](_0x3687f5,_0xfc48bd||_0x3b1695(0xb3));if(N(_0x2f75b2)!='object')return _0x2f75b2;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0xfc48bd===_0x3b1695(0xe3)?String:Number)(_0x3687f5);}function F(_0x14280c){const _0x1112be=_0x1519fa;var _0x1d4204=P(_0x14280c,'string');return N(_0x1d4204)==_0x1112be(0xdf)?_0x1d4204:_0x1d4204+'';}function I(_0x51f186,_0x3e4614,_0x1d917c){const _0x22c384=_0x1519fa;return(_0x3e4614=F(_0x3e4614))in _0x51f186?Object[_0x22c384(0x9e)](_0x51f186,_0x3e4614,{'value':_0x1d917c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x51f186[_0x3e4614]=_0x1d917c,_0x51f186;}let L=class extends _0x4742b4{constructor(_0x523eb1=O,_0x3e25b8,_0x2d26dd){const _0x3c025b=_0x1519fa;super(),this[_0x3c025b(0x99)]=_0x523eb1,this['_injector']=_0x3e25b8,this[_0x3c025b(0xce)]=_0x2d26dd;let {..._0x3d4536}=_0x221b8a({},O,this['_config']);this[_0x3c025b(0xce)][_0x3c025b(0xed)](_0x3c025b(0xb5),_0x3d4536);}[_0x1519fa(0x8f)](){const _0x5b586b=_0x1519fa;[[j],[M],[D]][_0x5b586b(0xcb)](_0x563dbe=>{this['_injector']['add'](_0x563dbe);});}[_0x1519fa(0xc6)](){const _0x460ac5=_0x1519fa;this[_0x460ac5(0x8b)][_0x460ac5(0xb2)](M),this[_0x460ac5(0x8b)]['get'](D);}};I(L,_0x1519fa(0xa1),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),I(L,'packageName',x),I(L,_0x1519fa(0xee),S),L=E([_0x34a858(_0x211f11,_0x5ca470,_0x4b2402),T(0x1,_0x2a2077(_0x28841a)),T(0x2,_0x45fc64)],L);export{L as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4a419e=_0x3d53;(function(_0x219509,_0x4dcf38){const _0x4d6169=_0x3d53,_0x24fbf7=_0x219509();while(!![]){try{const _0xd2fdd4=-parseInt(_0x4d6169(0x224))/0x1+parseInt(_0x4d6169(0x214))/0x2*(parseInt(_0x4d6169(0x1ec))/0x3)+parseInt(_0x4d6169(0x258))/0x4+parseInt(_0x4d6169(0x24f))/0x5*(parseInt(_0x4d6169(0x245))/0x6)+-parseInt(_0x4d6169(0x212))/0x7+parseInt(_0x4d6169(0x218))/0x8+-parseInt(_0x4d6169(0x206))/0x9*(parseInt(_0x4d6169(0x24a))/0xa);if(_0xd2fdd4===_0x4dcf38)break;else _0x24fbf7['push'](_0x24fbf7['shift']());}catch(_0x13dd1a){_0x24fbf7['push'](_0x24fbf7['shift']());}}}(_0x50c6,0x5a136));import{CollaborationSessionService as _0x1181c9,CommentService as _0x499df7,UniverCollaborationClientPlugin as _0x51b592}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5ca257}from'@univerjs-pro/license';import{CustomRangeType as _0x5d7594,DependentOn as _0x5c140f,Disposable as _0x2fdd4b,IConfigService as _0x25e097,Inject as _0x23c9e6,Injector as _0x2d61de,Plugin as _0x4fffb7,UserManagerService as _0x546989,dateKit as _0x32dd0f,merge as _0x25485f}from'@univerjs/core';function _0x50c6(){const _0x43539e=['2533508VWhjne','_threadCommentModel','string','/list','add','258WDCUie','code','prototype','saveCommentToSnapshot','find','dataSource','_threadCommentDataSourceService','parentId','resolveComment','get','getMemberID','packageName','payload','getUnit','@univerjs-pro/thread-comment-datasource','rangeType','/solved','replies','setConfig','deleteComment','getOwnPropertyDescriptor','values','/universer-api/comment/unit/','Solved','parse','commentUpdate$','336249yhnoDQ','userId','_injector','_init','solved','OpenOrReOpen','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_sessionService','1.0.0-alpha.0','rangeId','_userService','_initDataSource','2105348AGNKcR','users','1010eVGZeN','disposeWithMe','unitId','getComment','310464XPAggW','Reply','_httpService','_config','root','getUser','syncUpdateMutationToColla','ref','Delete','requireSession','error','decorate','111925cRuils','thread-comment-data-source.config','forEach','onStarting','symbol','threadId','size','addUser','replyId','_configService','onReady','listComments','/reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','createTimestamp','updateComment','length','map','reply','getCurrentUser','type','Add','toPrimitive','/add','iterator','post','subscribe','content','slice','object','_initUserSync','user','6exwmbA','userID','customRanges','body','pluginName','80osuppz','default','_commentService','Edit','/universer-api/user/list','1824560xIaDST','function','/delete','format','/edit','_threadCommentDataSource','pipe','defineProperty','stringify'];_0x50c6=function(){return _0x43539e;};return _0x50c6();}import{UniverThreadCommentUIPlugin as _0x59053b}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x2e80be,CommentUpdateEventType as _0x579beb}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x2d8896,ThreadCommentModel as _0x12c394}from'@univerjs/thread-comment';import{bufferTime as _0x494c86}from'rxjs';import{HTTPService as _0x1f1a2e}from'@univerjs/network';var x=_0x4a419e(0x1fa),S=_0x4a419e(0x20e);const C=_0x220a01=>_0x32dd0f(new Date(+_0x220a01))['format']('YYYY/MM/DD\x20HH:mm'),w=async(_0x261488,_0x15d29c)=>{const _0x4dfb28=_0x4a419e;let _0x469e18=_0x261488[_0x4dfb28(0x1f5)](_0x546989),_0x1ac62a=_0x261488[_0x4dfb28(0x1f5)](_0x1f1a2e);_0x15d29c[_0x4dfb28(0x226)](_0x347229=>{const _0x4df7af=_0x4dfb28;_0x469e18[_0x4df7af(0x21d)](_0x347229)&&_0x15d29c['delete'](_0x347229);}),_0x15d29c[_0x4dfb28(0x22a)]&&(await _0x1ac62a[_0x4dfb28(0x1f5)](_0x4dfb28(0x24e),{'params':{'userIDs':[..._0x15d29c]}}))[_0x4dfb28(0x248)][_0x4dfb28(0x213)][_0x4dfb28(0x226)](_0x4ea4a7=>{const _0x558bb9=_0x4dfb28;_0x4ea4a7&&_0x469e18[_0x558bb9(0x22b)](_0x4ea4a7);});};function T(_0x41d3a7,_0x2824b1){return function(_0x27c6d8,_0xb311f8){_0x2824b1(_0x27c6d8,_0xb311f8,_0x41d3a7);};}function _0x3d53(_0x58ee75,_0x2ce120){_0x58ee75=_0x58ee75-0x1ec;const _0x50c606=_0x50c6();let _0x3d5353=_0x50c606[_0x58ee75];return _0x3d5353;}function E(_0x4f8373,_0x4ae892,_0x54a535,_0x23e972){const _0x4d5257=_0x4a419e;var _0x5ae939=arguments['length'],_0x2b0b29=_0x5ae939<0x3?_0x4ae892:_0x23e972===null?_0x23e972=Object[_0x4d5257(0x200)](_0x4ae892,_0x54a535):_0x23e972,_0x265c03;if(typeof Reflect=='object'&&typeof Reflect[_0x4d5257(0x223)]=='function')_0x2b0b29=Reflect[_0x4d5257(0x223)](_0x4f8373,_0x4ae892,_0x54a535,_0x23e972);else{for(var _0x2c15aa=_0x4f8373[_0x4d5257(0x235)]-0x1;_0x2c15aa>=0x0;_0x2c15aa--)(_0x265c03=_0x4f8373[_0x2c15aa])&&(_0x2b0b29=(_0x5ae939<0x3?_0x265c03(_0x2b0b29):_0x5ae939>0x3?_0x265c03(_0x4ae892,_0x54a535,_0x2b0b29):_0x265c03(_0x4ae892,_0x54a535))||_0x2b0b29);}return _0x5ae939>0x3&&_0x2b0b29&&Object[_0x4d5257(0x256)](_0x4ae892,_0x54a535,_0x2b0b29),_0x2b0b29;}let D=class extends _0x2fdd4b{constructor(_0xeac4e0,_0x21da2c,_0x34d2e2,_0x50e050){const _0xd14814=_0x4a419e;super(),this[_0xd14814(0x24c)]=_0xeac4e0,this['_threadCommentModel']=_0x21da2c,this[_0xd14814(0x210)]=_0x34d2e2,this['_injector']=_0x50e050,this[_0xd14814(0x209)](),this[_0xd14814(0x243)]();}['_initUserSync'](){const _0x4cbafa=_0x4a419e;this[_0x4cbafa(0x215)](this[_0x4cbafa(0x259)][_0x4cbafa(0x205)][_0x4cbafa(0x255)](_0x494c86(0x10))[_0x4cbafa(0x23f)](_0x23ba1c=>{const _0x1d96f0=_0x4cbafa;let _0x55f32c=new Set();_0x23ba1c[_0x1d96f0(0x226)](_0x2859bb=>{const _0x107658=_0x1d96f0;switch(_0x2859bb[_0x107658(0x239)]){case _0x107658(0x25c):{let _0x42f6fd=_0x2859bb[_0x107658(0x1f8)]['personId'];_0x55f32c[_0x107658(0x25c)](_0x42f6fd);break;}default:break;}}),w(this[_0x1d96f0(0x208)],_0x55f32c);}));}['_init'](){const _0x145707=_0x4a419e;this['disposeWithMe'](this['_commentService'][_0x145707(0x205)][_0x145707(0x23f)](async _0x55ef38=>{const _0x24524d=_0x145707;var _0x312d5e;let _0x4fc810=(_0x312d5e=this[_0x24524d(0x259)][_0x24524d(0x1f9)](_0x55ef38['unitId'])[_0x24524d(0x1f0)](_0x3cc2ea=>_0x3cc2ea[_0x24524d(0x229)]===_0x55ef38[_0x24524d(0x229)]))==null?void 0x0:_0x312d5e[_0x24524d(0x21c)];if(!_0x4fc810)return;let {unitId:_0x27d3c7,subUnitId:_0x3ff98d}=_0x4fc810;switch(_0x55ef38[_0x24524d(0x244)]&&this[_0x24524d(0x210)]['addUser'](_0x55ef38['user']),_0x55ef38[_0x24524d(0x239)]){case _0x579beb[_0x24524d(0x23a)]:break;case _0x579beb[_0x24524d(0x219)]:var _0x1aa334,_0x522e21;this['_threadCommentModel']['addComment'](_0x27d3c7,_0x3ff98d,{'unitId':_0x27d3c7,'subUnitId':_0x3ff98d,'ref':'','id':_0x55ef38[_0x24524d(0x22c)],'dT':C(+_0x55ef38[_0x24524d(0x233)]),'threadId':_0x55ef38[_0x24524d(0x229)],'personId':(_0x1aa334=(_0x522e21=_0x55ef38['user'])==null?void 0x0:_0x522e21[_0x24524d(0x246)])==null?_0x55ef38[_0x24524d(0x207)]:_0x1aa334,'text':JSON[_0x24524d(0x204)](_0x55ef38[_0x24524d(0x240)]),'parentId':_0x4fc810['id']});break;case _0x579beb[_0x24524d(0x220)]:{let _0x4329a4=this[_0x24524d(0x259)][_0x24524d(0x217)](_0x27d3c7,_0x3ff98d,_0x55ef38[_0x24524d(0x22c)]);_0x4329a4&&_0x4329a4[_0x24524d(0x1f3)]&&this[_0x24524d(0x259)][_0x24524d(0x1ff)](_0x27d3c7,_0x3ff98d,_0x55ef38['replyId']);break;}case _0x579beb[_0x24524d(0x24d)]:this[_0x24524d(0x259)][_0x24524d(0x234)](_0x27d3c7,_0x3ff98d,{'commentId':_0x55ef38['replyId'],'text':JSON[_0x24524d(0x204)](_0x55ef38['content'])});break;case _0x579beb['Solve']:{var _0x2ae818;let _0x4f6045=(_0x2ae818=this['_threadCommentModel'][_0x24524d(0x1f9)](_0x55ef38[_0x24524d(0x216)])[_0x24524d(0x1f0)](_0x13de57=>_0x13de57[_0x24524d(0x229)]===_0x55ef38['threadId']))==null?void 0x0:_0x2ae818[_0x24524d(0x21c)];_0x4f6045&&this[_0x24524d(0x259)][_0x24524d(0x1f4)](_0x27d3c7,_0x3ff98d,_0x4f6045['id'],_0x55ef38['solved']===_0x2e80be[_0x24524d(0x203)]);break;}default:break;}}));}};D=E([T(0x0,_0x23c9e6(_0x499df7)),T(0x1,_0x23c9e6(_0x12c394)),T(0x2,_0x23c9e6(_0x546989)),T(0x3,_0x23c9e6(_0x2d61de))],D);const O={};function k(_0x24522d,_0x4d58f9){const _0x15d0f8=_0x4a419e;let _0x1dda31=_0x24522d[_0x15d0f8(0x1fd)][0x0];return{..._0x4d58f9,'id':_0x1dda31[_0x15d0f8(0x22c)],'resolved':_0x24522d[_0x15d0f8(0x20a)]===0x1,'dT':C(_0x1dda31['createTimestamp']),'personId':_0x1dda31[_0x15d0f8(0x207)],'threadId':_0x1dda31[_0x15d0f8(0x229)]};}function A(_0x4d628a,_0x271c87,_0x2e1b4c){const _0x3bcc94=_0x4a419e;var _0x766f74,_0x3366f4;if(((_0x766f74=_0x4d628a==null||(_0x3366f4=_0x4d628a[_0x3bcc94(0x1fd)])==null?void 0x0:_0x3366f4[_0x3bcc94(0x235)])==null?0x0:_0x766f74)>0x0){let _0x20b91d=(_0x5428fd,_0x1b17a8)=>({'id':_0x5428fd[_0x3bcc94(0x22c)],'threadId':_0x5428fd[_0x3bcc94(0x229)],'dT':C(_0x5428fd[_0x3bcc94(0x233)]),'personId':_0x5428fd['userId'],'resolved':_0x4d628a['solved']===_0x2e80be[_0x3bcc94(0x203)],'unitId':_0x271c87,'subUnitId':_0x2e1b4c,'text':JSON[_0x3bcc94(0x204)](_0x5428fd[_0x3bcc94(0x240)]),'parentId':_0x1b17a8}),_0xa8bcbb=_0x20b91d(_0x4d628a[_0x3bcc94(0x1fd)][0x0]);return{..._0xa8bcbb,'children':_0x4d628a['replies'][_0x3bcc94(0x241)](0x1)[_0x3bcc94(0x236)](_0x4e4c9a=>_0x20b91d(_0x4e4c9a,_0xa8bcbb['id']))};}return null;}let j=class{constructor(_0x437bfa,_0x279f3b,_0x15c9be){const _0x755d4=_0x4a419e;this['_httpService']=_0x437bfa,this['_userService']=_0x279f3b,this[_0x755d4(0x20d)]=_0x15c9be;}async['addComment'](_0x3913f9){const _0x31063c=_0x4a419e;var _0x9143e1,_0x496c19;let {parentId:_0x5a3872,unitId:_0xf71baf,text:_0xe3b270,threadId:_0x51c53c}=_0x3913f9,_0x39c310=(_0x9143e1=(_0x496c19=_0xe3b270[_0x31063c(0x247)])==null?void 0x0:_0x496c19[_0x31063c(0x232)](_0x113f28=>_0x113f28[_0x31063c(0x1fb)]===_0x5d7594['COMMENT'])[_0x31063c(0x236)](_0x3db110=>_0x3db110[_0x31063c(0x20f)]))==null?[]:_0x9143e1,_0x18ed5a=JSON['stringify'](_0xe3b270),_0x5746fb=(await this[_0x31063c(0x20d)][_0x31063c(0x221)](_0xf71baf))[_0x31063c(0x1f6)]();if(_0x5a3872){let _0x3faa37={'memberId':_0x5746fb,'unitId':_0xf71baf,'content':_0x18ed5a,'mention':_0x39c310,'threadId':_0x51c53c},_0x3e1259=(await this[_0x31063c(0x21a)]['post'](_0x31063c(0x202)+_0xf71baf+_0x31063c(0x230),{'body':_0x3faa37}))[_0x31063c(0x248)][_0x31063c(0x237)];return{..._0x3913f9,'id':_0x3e1259[_0x31063c(0x22c)],'dT':_0x32dd0f(+_0x3e1259[_0x31063c(0x233)])[_0x31063c(0x252)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3e1259[_0x31063c(0x207)]};}else{let _0x137fe9={'memberId':_0x5746fb,'unitId':_0xf71baf,'content':_0x18ed5a,'mention':_0x39c310};return k((await this[_0x31063c(0x21a)][_0x31063c(0x23e)](_0x31063c(0x202)+_0xf71baf+_0x31063c(0x23c),{'body':_0x137fe9}))['body']['comment'],_0x3913f9);}}async[_0x4a419e(0x234)](_0x3535d1){const _0x5038bc=_0x4a419e;var _0x515029,_0x57a34d;let {text:_0x2792bd,unitId:_0x3431d5}=_0x3535d1,_0x2e330c=(_0x515029=(_0x57a34d=_0x2792bd[_0x5038bc(0x247)])==null?void 0x0:_0x57a34d[_0x5038bc(0x232)](_0x1f5ff9=>_0x1f5ff9[_0x5038bc(0x1fb)]===_0x5d7594['COMMENT'])[_0x5038bc(0x236)](_0x3eaf96=>_0x3eaf96[_0x5038bc(0x20f)]))==null?[]:_0x515029,_0x21e4f6=JSON[_0x5038bc(0x257)](_0x2792bd),_0x38bebf=_0x3535d1['threadId'],_0x2b0e59=_0x3535d1['id'],_0x428d53={'memberId':(await this['_sessionService'][_0x5038bc(0x221)](_0x3431d5))['getMemberID'](),'unitId':_0x3431d5,'threadId':_0x38bebf,'mention':_0x2e330c,'content':_0x21e4f6,'replyId':_0x2b0e59},_0x369b0e=await this['_httpService'][_0x5038bc(0x23e)]('/universer-api/comment/unit/'+_0x3431d5+_0x5038bc(0x253),{'body':_0x428d53});return!_0x369b0e[_0x5038bc(0x248)][_0x5038bc(0x222)]||_0x369b0e[_0x5038bc(0x248)][_0x5038bc(0x222)][_0x5038bc(0x1ed)]===0x1;}async[_0x4a419e(0x1f4)](_0x14655b){const _0x1da518=_0x4a419e;let {unitId:_0x4fdab2}=_0x14655b,_0x140dcf=_0x14655b[_0x1da518(0x229)],_0x2eefe7={'memberId':this[_0x1da518(0x210)][_0x1da518(0x238)]()[_0x1da518(0x246)],'unitId':_0x4fdab2,'threadId':_0x140dcf,'solved':_0x14655b['resolved']?_0x2e80be[_0x1da518(0x203)]:_0x2e80be[_0x1da518(0x20b)]},_0x301530=await this[_0x1da518(0x21a)][_0x1da518(0x23e)](_0x1da518(0x202)+_0x4fdab2+_0x1da518(0x1fc),{'body':_0x2eefe7});return!_0x301530[_0x1da518(0x248)][_0x1da518(0x222)]||_0x301530[_0x1da518(0x248)][_0x1da518(0x222)][_0x1da518(0x1ed)]===0x1;}async['deleteComment'](_0x56b8b3,_0x3175b0,_0x4702b4,_0x773783){const _0x1139ad=_0x4a419e;let _0x2f10bc={'memberId':(await this[_0x1139ad(0x20d)]['requireSession'](_0x56b8b3))[_0x1139ad(0x1f6)](),'threadId':_0x4702b4,'replyId':_0x773783,'unitId':_0x56b8b3},_0x3ab494=await this['_httpService'][_0x1139ad(0x23e)]('/universer-api/comment/unit/'+_0x56b8b3+_0x1139ad(0x251),{'body':_0x2f10bc});return!_0x3ab494[_0x1139ad(0x248)]['error']||_0x3ab494[_0x1139ad(0x248)][_0x1139ad(0x222)][_0x1139ad(0x1ed)]===0x1;}async[_0x4a419e(0x22f)](_0x51207f,_0x1acab9,_0xf64141){const _0x5c30d7=_0x4a419e;let _0x3fef24={'unitId':_0x51207f,'threadId':_0xf64141},_0x5e4b01=await this[_0x5c30d7(0x21a)]['post'](_0x5c30d7(0x202)+_0x51207f+_0x5c30d7(0x25b),{'body':_0x3fef24}),_0x49b5bc=_0xf64141[_0x5c30d7(0x236)](_0x1c54d9=>A(_0x5e4b01[_0x5c30d7(0x248)]['comments'][_0x1c54d9],_0x51207f,_0x1acab9))[_0x5c30d7(0x232)](Boolean);return Object[_0x5c30d7(0x201)](_0x5e4b01['body'][_0x5c30d7(0x213)])[_0x5c30d7(0x226)](_0x5d12d6=>{const _0x422ad8=_0x5c30d7;this[_0x422ad8(0x210)][_0x422ad8(0x22b)](_0x5d12d6);}),_0x49b5bc;}[_0x4a419e(0x1ef)](_0x461c98){const _0x1e055b=_0x4a419e;return{'id':_0x461c98['id'],'threadId':_0x461c98[_0x1e055b(0x229)],'ref':_0x461c98[_0x1e055b(0x21f)]};}};j=E([T(0x0,_0x23c9e6(_0x1f1a2e)),T(0x1,_0x23c9e6(_0x546989)),T(0x2,_0x23c9e6(_0x1181c9))],j);let M=class extends _0x2fdd4b{constructor(_0x1d8a6a,_0xab17e2){const _0x5f2ede=_0x4a419e;super(),this[_0x5f2ede(0x1f2)]=_0x1d8a6a,this[_0x5f2ede(0x254)]=_0xab17e2,this[_0x5f2ede(0x211)]();}['_initDataSource'](){const _0x40d22e=_0x4a419e;this[_0x40d22e(0x1f2)][_0x40d22e(0x1f1)]=this[_0x40d22e(0x254)],this['_threadCommentDataSourceService'][_0x40d22e(0x21e)]=!0x1;}};M=E([T(0x0,_0x2d8896),T(0x1,_0x23c9e6(j))],M);function N(_0x3a54e9){'@babel/helpers - typeof';const _0x33524b=_0x4a419e;return N=typeof Symbol==_0x33524b(0x250)&&typeof Symbol[_0x33524b(0x23d)]==_0x33524b(0x228)?function(_0x1a9638){return typeof _0x1a9638;}:function(_0x15d9bc){const _0x407575=_0x33524b;return _0x15d9bc&&typeof Symbol==_0x407575(0x250)&&_0x15d9bc['constructor']===Symbol&&_0x15d9bc!==Symbol[_0x407575(0x1ee)]?_0x407575(0x228):typeof _0x15d9bc;},N(_0x3a54e9);}function P(_0x513a6f,_0x3307a1){const _0x1d779f=_0x4a419e;if(N(_0x513a6f)!=_0x1d779f(0x242)||!_0x513a6f)return _0x513a6f;var _0x23729e=_0x513a6f[Symbol[_0x1d779f(0x23b)]];if(_0x23729e!==void 0x0){var _0x858c9e=_0x23729e['call'](_0x513a6f,_0x3307a1||_0x1d779f(0x24b));if(N(_0x858c9e)!=_0x1d779f(0x242))return _0x858c9e;throw TypeError(_0x1d779f(0x20c));}return(_0x3307a1===_0x1d779f(0x25a)?String:Number)(_0x513a6f);}function F(_0x1d3732){const _0x40f009=_0x4a419e;var _0x12d43a=P(_0x1d3732,_0x40f009(0x25a));return N(_0x12d43a)==_0x40f009(0x228)?_0x12d43a:_0x12d43a+'';}function I(_0x16c560,_0x229ef7,_0x5ac4ce){const _0x41a15e=_0x4a419e;return(_0x229ef7=F(_0x229ef7))in _0x16c560?Object[_0x41a15e(0x256)](_0x16c560,_0x229ef7,{'value':_0x5ac4ce,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x16c560[_0x229ef7]=_0x5ac4ce,_0x16c560;}let L=class extends _0x4fffb7{constructor(_0x2158b1=O,_0x3283de,_0x12256b){const _0x35ee21=_0x4a419e;super(),this[_0x35ee21(0x21b)]=_0x2158b1,this['_injector']=_0x3283de,this['_configService']=_0x12256b;let {..._0x5d4371}=_0x25485f({},O,this[_0x35ee21(0x21b)]);this[_0x35ee21(0x22d)][_0x35ee21(0x1fe)](_0x35ee21(0x225),_0x5d4371);}[_0x4a419e(0x227)](){const _0xc802ca=_0x4a419e;[[j],[M],[D]][_0xc802ca(0x226)](_0x4cc3ab=>{this['_injector']['add'](_0x4cc3ab);});}[_0x4a419e(0x22e)](){const _0x644dba=_0x4a419e;this['_injector']['get'](M),this[_0x644dba(0x208)]['get'](D);}};I(L,_0x4a419e(0x249),_0x4a419e(0x231)),I(L,_0x4a419e(0x1f7),x),I(L,'version',S),L=E([_0x5c140f(_0x59053b,_0x51b592,_0x5ca257),T(0x1,_0x23c9e6(_0x2d61de)),T(0x2,_0x25e097)],L);export{L as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1519fa=_0x1838;(function(_0x2e8c19,_0x597352){const _0x2b8067=_0x1838,_0x2b5090=_0x2e8c19();while(!![]){try{const _0x335c75=parseInt(_0x2b8067(0xe1))/0x1+-parseInt(_0x2b8067(0x90))/0x2*(parseInt(_0x2b8067(0xb8))/0x3)+parseInt(_0x2b8067(0x8a))/0x4+-parseInt(_0x2b8067(0xe0))/0x5*(-parseInt(_0x2b8067(0xa8))/0x6)+parseInt(_0x2b8067(0x91))/0x7*(-parseInt(_0x2b8067(0xdb))/0x8)+-parseInt(_0x2b8067(0xeb))/0x9*(parseInt(_0x2b8067(0xe2))/0xa)+parseInt(_0x2b8067(0x95))/0xb*(-parseInt(_0x2b8067(0x8e))/0xc);if(_0x335c75===_0x597352)break;else _0x2b5090['push'](_0x2b5090['shift']());}catch(_0x205595){_0x2b5090['push'](_0x2b5090['shift']());}}}(_0x3041,0x80c68));import{CollaborationSessionService as _0x8cd17a,CommentService as _0x5dcb19,UniverCollaborationClientPlugin as _0x5ca470}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4b2402}from'@univerjs-pro/license';import{CustomRangeType as _0x2b3f20,DependentOn as _0x34a858,Disposable as _0x529dfc,IConfigService as _0x45fc64,Inject as _0x2a2077,Injector as _0x28841a,Plugin as _0x4742b4,UserManagerService as _0x30db26,dateKit as _0x207f3d,merge as _0x221b8a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x211f11}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x113f1e,CommentUpdateEventType as _0x589fe7}from'@univerjs/protocol';function _0x3041(){const _0x7843ea=['/reply','threadId','customRanges','_commentService','error','/list','Solve','reply','comments','getMemberID','18808DmFiWa','listComments','subscribe','decorate','symbol','2470vGAVaI','647796rxpCSc','144610iGbZNr','string','createTimestamp','find','payload','length','code','0.25.0-insiders.20260623-012b5a8','_threadCommentDataSourceService','522keaLtf','call','setConfig','version','_threadCommentDataSource','comment','/edit','deleteComment','post','addComment','getCurrentUser','replyId','resolved','replies','YYYY/MM/DD\x20HH:mm','size','4161260TzEvTr','_injector','parse','unitId','15660TRGvPU','onStarting','178174iKByJr','1463uOWcQA','_initDataSource','updateComment','body','605Jwutuk','filter','map','_init','_config','function','getUser','users','Delete','defineProperty','values','/add','pluginName','slice','rangeId','personId','/universer-api/comment/unit/','_threadCommentModel','dataSource','8340SSHonF','solved','userId','_httpService','Reply','getComment','addUser','resolveComment','add','_userService','get','default','/delete','thread-comment-data-source.config','stringify','_sessionService','15CFJczi','object','format','root','user','rangeType','commentUpdate$','syncUpdateMutationToColla','_initUserSync','disposeWithMe','@univerjs-pro/thread-comment-datasource','content','constructor','prototype','onReady','toPrimitive','Add','Edit','Solved','forEach','requireSession','parentId','_configService','COMMENT','/universer-api/user/list'];_0x3041=function(){return _0x7843ea;};return _0x3041();}import{IThreadCommentDataSourceService as _0x4433a9,ThreadCommentModel as _0x2d391d}from'@univerjs/thread-comment';import{bufferTime as _0x55c1c5}from'rxjs';import{HTTPService as _0x3d2034}from'@univerjs/network';var x=_0x1519fa(0xc2),S=_0x1519fa(0xe9);const C=_0x46e5bc=>_0x207f3d(new Date(+_0x46e5bc))[_0x1519fa(0xba)](_0x1519fa(0x88)),w=async(_0x18e1b4,_0x2e3aad)=>{const _0x17ac45=_0x1519fa;let _0x3d0809=_0x18e1b4['get'](_0x30db26),_0x480e23=_0x18e1b4[_0x17ac45(0xb2)](_0x3d2034);_0x2e3aad['forEach'](_0x102e5a=>{const _0xd43854=_0x17ac45;_0x3d0809[_0xd43854(0x9b)](_0x102e5a)&&_0x2e3aad['delete'](_0x102e5a);}),_0x2e3aad[_0x17ac45(0x89)]&&(await _0x480e23[_0x17ac45(0xb2)](_0x17ac45(0xd0),{'params':{'userIDs':[..._0x2e3aad]}}))[_0x17ac45(0x94)][_0x17ac45(0x9c)][_0x17ac45(0xcb)](_0x354ecd=>{_0x354ecd&&_0x3d0809['addUser'](_0x354ecd);});};function T(_0x4f09bd,_0x559924){return function(_0x2af10f,_0x291dc0){_0x559924(_0x2af10f,_0x291dc0,_0x4f09bd);};}function E(_0x72f3c6,_0x3f3f63,_0x2ab700,_0x48896c){const _0x1bd8ce=_0x1519fa;var _0x5d138c=arguments[_0x1bd8ce(0xe7)],_0x48582e=_0x5d138c<0x3?_0x3f3f63:_0x48896c===null?_0x48896c=Object['getOwnPropertyDescriptor'](_0x3f3f63,_0x2ab700):_0x48896c,_0x4227d5;if(typeof Reflect=='object'&&typeof Reflect[_0x1bd8ce(0xde)]==_0x1bd8ce(0x9a))_0x48582e=Reflect[_0x1bd8ce(0xde)](_0x72f3c6,_0x3f3f63,_0x2ab700,_0x48896c);else{for(var _0x4baa77=_0x72f3c6[_0x1bd8ce(0xe7)]-0x1;_0x4baa77>=0x0;_0x4baa77--)(_0x4227d5=_0x72f3c6[_0x4baa77])&&(_0x48582e=(_0x5d138c<0x3?_0x4227d5(_0x48582e):_0x5d138c>0x3?_0x4227d5(_0x3f3f63,_0x2ab700,_0x48582e):_0x4227d5(_0x3f3f63,_0x2ab700))||_0x48582e);}return _0x5d138c>0x3&&_0x48582e&&Object['defineProperty'](_0x3f3f63,_0x2ab700,_0x48582e),_0x48582e;}let D=class extends _0x529dfc{constructor(_0xf674e,_0x4e0a67,_0x496997,_0x16e701){const _0x3d62e4=_0x1519fa;super(),this['_commentService']=_0xf674e,this['_threadCommentModel']=_0x4e0a67,this[_0x3d62e4(0xb1)]=_0x496997,this['_injector']=_0x16e701,this['_init'](),this[_0x3d62e4(0xc0)]();}[_0x1519fa(0xc0)](){const _0x3e9bbf=_0x1519fa;this[_0x3e9bbf(0xc1)](this[_0x3e9bbf(0xa6)][_0x3e9bbf(0xbe)]['pipe'](_0x55c1c5(0x10))['subscribe'](_0xdd79c=>{const _0x42b414=_0x3e9bbf;let _0x523edc=new Set();_0xdd79c[_0x42b414(0xcb)](_0x3522e7=>{const _0x2ce883=_0x42b414;switch(_0x3522e7['type']){case _0x2ce883(0xb0):{let _0x37af45=_0x3522e7[_0x2ce883(0xe6)][_0x2ce883(0xa4)];_0x523edc[_0x2ce883(0xb0)](_0x37af45);break;}default:break;}}),w(this[_0x42b414(0x8b)],_0x523edc);}));}[_0x1519fa(0x98)](){const _0x23e2ec=_0x1519fa;this[_0x23e2ec(0xc1)](this[_0x23e2ec(0xd4)][_0x23e2ec(0xbe)][_0x23e2ec(0xdd)](async _0x15e635=>{const _0x466eb0=_0x23e2ec;var _0x38cc9d;let _0x3b9ea8=(_0x38cc9d=this[_0x466eb0(0xa6)]['getUnit'](_0x15e635[_0x466eb0(0x8d)])[_0x466eb0(0xe5)](_0x3963aa=>_0x3963aa[_0x466eb0(0xd2)]===_0x15e635[_0x466eb0(0xd2)]))==null?void 0x0:_0x38cc9d['root'];if(!_0x3b9ea8)return;let {unitId:_0xb4be97,subUnitId:_0x59cfd3}=_0x3b9ea8;switch(_0x15e635[_0x466eb0(0xbc)]&&this[_0x466eb0(0xb1)][_0x466eb0(0xae)](_0x15e635['user']),_0x15e635['type']){case _0x589fe7[_0x466eb0(0xc8)]:break;case _0x589fe7[_0x466eb0(0xac)]:var _0x4e296f,_0x5bb82;this['_threadCommentModel'][_0x466eb0(0xf4)](_0xb4be97,_0x59cfd3,{'unitId':_0xb4be97,'subUnitId':_0x59cfd3,'ref':'','id':_0x15e635[_0x466eb0(0xf6)],'dT':C(+_0x15e635['createTimestamp']),'threadId':_0x15e635['threadId'],'personId':(_0x4e296f=(_0x5bb82=_0x15e635[_0x466eb0(0xbc)])==null?void 0x0:_0x5bb82['userID'])==null?_0x15e635['userId']:_0x4e296f,'text':JSON[_0x466eb0(0x8c)](_0x15e635[_0x466eb0(0xc3)]),'parentId':_0x3b9ea8['id']});break;case _0x589fe7[_0x466eb0(0x9d)]:{let _0x469847=this[_0x466eb0(0xa6)][_0x466eb0(0xad)](_0xb4be97,_0x59cfd3,_0x15e635['replyId']);_0x469847&&_0x469847[_0x466eb0(0xcd)]&&this[_0x466eb0(0xa6)][_0x466eb0(0xf2)](_0xb4be97,_0x59cfd3,_0x15e635[_0x466eb0(0xf6)]);break;}case _0x589fe7[_0x466eb0(0xc9)]:this[_0x466eb0(0xa6)][_0x466eb0(0x93)](_0xb4be97,_0x59cfd3,{'commentId':_0x15e635[_0x466eb0(0xf6)],'text':JSON[_0x466eb0(0x8c)](_0x15e635[_0x466eb0(0xc3)])});break;case _0x589fe7[_0x466eb0(0xd7)]:{var _0x49f26e;let _0x1fb546=(_0x49f26e=this['_threadCommentModel']['getUnit'](_0x15e635['unitId'])[_0x466eb0(0xe5)](_0x4b0a68=>_0x4b0a68[_0x466eb0(0xd2)]===_0x15e635['threadId']))==null?void 0x0:_0x49f26e[_0x466eb0(0xbb)];_0x1fb546&&this[_0x466eb0(0xa6)][_0x466eb0(0xaf)](_0xb4be97,_0x59cfd3,_0x1fb546['id'],_0x15e635[_0x466eb0(0xa9)]===_0x113f1e[_0x466eb0(0xca)]);break;}default:break;}}));}};D=E([T(0x0,_0x2a2077(_0x5dcb19)),T(0x1,_0x2a2077(_0x2d391d)),T(0x2,_0x2a2077(_0x30db26)),T(0x3,_0x2a2077(_0x28841a))],D);function _0x1838(_0x2e90af,_0x20f374){_0x2e90af=_0x2e90af-0x88;const _0x30410a=_0x3041();let _0x18383e=_0x30410a[_0x2e90af];return _0x18383e;}const O={};function k(_0x4a641e,_0x3c125f){const _0xc0c84d=_0x1519fa;let _0x48707e=_0x4a641e[_0xc0c84d(0xf8)][0x0];return{..._0x3c125f,'id':_0x48707e['replyId'],'resolved':_0x4a641e[_0xc0c84d(0xa9)]===0x1,'dT':C(_0x48707e[_0xc0c84d(0xe4)]),'personId':_0x48707e[_0xc0c84d(0xaa)],'threadId':_0x48707e['threadId']};}function A(_0x77f81,_0x4db2ba,_0x55c998){const _0x3db60b=_0x1519fa;var _0x21da8c,_0x34f7a0;if(((_0x21da8c=_0x77f81==null||(_0x34f7a0=_0x77f81[_0x3db60b(0xf8)])==null?void 0x0:_0x34f7a0[_0x3db60b(0xe7)])==null?0x0:_0x21da8c)>0x0){let _0x12f93a=(_0x27469a,_0xa050f8)=>({'id':_0x27469a[_0x3db60b(0xf6)],'threadId':_0x27469a['threadId'],'dT':C(_0x27469a['createTimestamp']),'personId':_0x27469a[_0x3db60b(0xaa)],'resolved':_0x77f81[_0x3db60b(0xa9)]===_0x113f1e[_0x3db60b(0xca)],'unitId':_0x4db2ba,'subUnitId':_0x55c998,'text':JSON[_0x3db60b(0x8c)](_0x27469a[_0x3db60b(0xc3)]),'parentId':_0xa050f8}),_0x2d5e2a=_0x12f93a(_0x77f81[_0x3db60b(0xf8)][0x0]);return{..._0x2d5e2a,'children':_0x77f81['replies'][_0x3db60b(0xa2)](0x1)[_0x3db60b(0x97)](_0x3ff9f3=>_0x12f93a(_0x3ff9f3,_0x2d5e2a['id']))};}return null;}let j=class{constructor(_0x594d15,_0x5c238a,_0x47ba16){const _0xc74304=_0x1519fa;this[_0xc74304(0xab)]=_0x594d15,this[_0xc74304(0xb1)]=_0x5c238a,this[_0xc74304(0xb7)]=_0x47ba16;}async[_0x1519fa(0xf4)](_0xd5f8b8){const _0x3bcf6a=_0x1519fa;var _0x214ec9,_0x12976f;let {parentId:_0x38b2f4,unitId:_0x581356,text:_0x586279,threadId:_0x5db894}=_0xd5f8b8,_0x1bbba6=(_0x214ec9=(_0x12976f=_0x586279[_0x3bcf6a(0xd3)])==null?void 0x0:_0x12976f['filter'](_0x57a217=>_0x57a217['rangeType']===_0x2b3f20[_0x3bcf6a(0xcf)])['map'](_0x8bebde=>_0x8bebde[_0x3bcf6a(0xa3)]))==null?[]:_0x214ec9,_0xa95b29=JSON['stringify'](_0x586279),_0x27b32c=(await this[_0x3bcf6a(0xb7)][_0x3bcf6a(0xcc)](_0x581356))[_0x3bcf6a(0xda)]();if(_0x38b2f4){let _0x33c949={'memberId':_0x27b32c,'unitId':_0x581356,'content':_0xa95b29,'mention':_0x1bbba6,'threadId':_0x5db894},_0x1692c0=(await this[_0x3bcf6a(0xab)][_0x3bcf6a(0xf3)](_0x3bcf6a(0xa5)+_0x581356+_0x3bcf6a(0xd1),{'body':_0x33c949}))['body'][_0x3bcf6a(0xd8)];return{..._0xd5f8b8,'id':_0x1692c0['replyId'],'dT':_0x207f3d(+_0x1692c0[_0x3bcf6a(0xe4)])['format'](_0x3bcf6a(0x88)),'personId':_0x1692c0[_0x3bcf6a(0xaa)]};}else{let _0x5837f3={'memberId':_0x27b32c,'unitId':_0x581356,'content':_0xa95b29,'mention':_0x1bbba6};return k((await this[_0x3bcf6a(0xab)][_0x3bcf6a(0xf3)](_0x3bcf6a(0xa5)+_0x581356+_0x3bcf6a(0xa0),{'body':_0x5837f3}))[_0x3bcf6a(0x94)][_0x3bcf6a(0xf0)],_0xd5f8b8);}}async[_0x1519fa(0x93)](_0x434e23){const _0x2fb13d=_0x1519fa;var _0x2a4ae6,_0x3483a2;let {text:_0x817009,unitId:_0x4b8bf2}=_0x434e23,_0x418e7d=(_0x2a4ae6=(_0x3483a2=_0x817009[_0x2fb13d(0xd3)])==null?void 0x0:_0x3483a2[_0x2fb13d(0x96)](_0x1b820d=>_0x1b820d[_0x2fb13d(0xbd)]===_0x2b3f20[_0x2fb13d(0xcf)])[_0x2fb13d(0x97)](_0x2f080a=>_0x2f080a[_0x2fb13d(0xa3)]))==null?[]:_0x2a4ae6,_0x40dac7=JSON[_0x2fb13d(0xb6)](_0x817009),_0x3cf275=_0x434e23[_0x2fb13d(0xd2)],_0x39f524=_0x434e23['id'],_0x3edec9={'memberId':(await this[_0x2fb13d(0xb7)][_0x2fb13d(0xcc)](_0x4b8bf2))[_0x2fb13d(0xda)](),'unitId':_0x4b8bf2,'threadId':_0x3cf275,'mention':_0x418e7d,'content':_0x40dac7,'replyId':_0x39f524},_0x380e5c=await this[_0x2fb13d(0xab)][_0x2fb13d(0xf3)](_0x2fb13d(0xa5)+_0x4b8bf2+_0x2fb13d(0xf1),{'body':_0x3edec9});return!_0x380e5c[_0x2fb13d(0x94)]['error']||_0x380e5c[_0x2fb13d(0x94)][_0x2fb13d(0xd5)]['code']===0x1;}async[_0x1519fa(0xaf)](_0x56f18c){const _0x1a843d=_0x1519fa;let {unitId:_0x4a37e7}=_0x56f18c,_0x244059=_0x56f18c[_0x1a843d(0xd2)],_0x3bd177={'memberId':this[_0x1a843d(0xb1)][_0x1a843d(0xf5)]()['userID'],'unitId':_0x4a37e7,'threadId':_0x244059,'solved':_0x56f18c[_0x1a843d(0xf7)]?_0x113f1e[_0x1a843d(0xca)]:_0x113f1e['OpenOrReOpen']},_0x2ef059=await this[_0x1a843d(0xab)][_0x1a843d(0xf3)](_0x1a843d(0xa5)+_0x4a37e7+'/solved',{'body':_0x3bd177});return!_0x2ef059['body'][_0x1a843d(0xd5)]||_0x2ef059[_0x1a843d(0x94)][_0x1a843d(0xd5)]['code']===0x1;}async[_0x1519fa(0xf2)](_0x53b4c2,_0x2620d1,_0x6067ac,_0x2b566a){const _0x18bd7e=_0x1519fa;let _0x376ea6={'memberId':(await this[_0x18bd7e(0xb7)][_0x18bd7e(0xcc)](_0x53b4c2))[_0x18bd7e(0xda)](),'threadId':_0x6067ac,'replyId':_0x2b566a,'unitId':_0x53b4c2},_0x3cd26d=await this[_0x18bd7e(0xab)][_0x18bd7e(0xf3)](_0x18bd7e(0xa5)+_0x53b4c2+_0x18bd7e(0xb4),{'body':_0x376ea6});return!_0x3cd26d[_0x18bd7e(0x94)]['error']||_0x3cd26d[_0x18bd7e(0x94)][_0x18bd7e(0xd5)][_0x18bd7e(0xe8)]===0x1;}async[_0x1519fa(0xdc)](_0x7d6bbe,_0xb48c17,_0x2baa79){const _0x1f7441=_0x1519fa;let _0x336f84={'unitId':_0x7d6bbe,'threadId':_0x2baa79},_0x2e1078=await this[_0x1f7441(0xab)][_0x1f7441(0xf3)]('/universer-api/comment/unit/'+_0x7d6bbe+_0x1f7441(0xd6),{'body':_0x336f84}),_0x27321a=_0x2baa79['map'](_0x54ff85=>A(_0x2e1078[_0x1f7441(0x94)][_0x1f7441(0xd9)][_0x54ff85],_0x7d6bbe,_0xb48c17))['filter'](Boolean);return Object[_0x1f7441(0x9f)](_0x2e1078[_0x1f7441(0x94)]['users'])['forEach'](_0x2ebf00=>{const _0x5126e5=_0x1f7441;this[_0x5126e5(0xb1)]['addUser'](_0x2ebf00);}),_0x27321a;}['saveCommentToSnapshot'](_0x519eb7){const _0xbd4cac=_0x1519fa;return{'id':_0x519eb7['id'],'threadId':_0x519eb7[_0xbd4cac(0xd2)],'ref':_0x519eb7['ref']};}};j=E([T(0x0,_0x2a2077(_0x3d2034)),T(0x1,_0x2a2077(_0x30db26)),T(0x2,_0x2a2077(_0x8cd17a))],j);let M=class extends _0x529dfc{constructor(_0x920371,_0x56ba4a){const _0x6d76d6=_0x1519fa;super(),this[_0x6d76d6(0xea)]=_0x920371,this[_0x6d76d6(0xef)]=_0x56ba4a,this['_initDataSource']();}[_0x1519fa(0x92)](){const _0xb47a40=_0x1519fa;this[_0xb47a40(0xea)][_0xb47a40(0xa7)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xb47a40(0xbf)]=!0x1;}};M=E([T(0x0,_0x4433a9),T(0x1,_0x2a2077(j))],M);function N(_0x1dd919){'@babel/helpers - typeof';const _0x463aab=_0x1519fa;return N=typeof Symbol==_0x463aab(0x9a)&&typeof Symbol['iterator']==_0x463aab(0xdf)?function(_0x6f70a8){return typeof _0x6f70a8;}:function(_0x5c86ac){const _0x132baf=_0x463aab;return _0x5c86ac&&typeof Symbol=='function'&&_0x5c86ac[_0x132baf(0xc4)]===Symbol&&_0x5c86ac!==Symbol[_0x132baf(0xc5)]?_0x132baf(0xdf):typeof _0x5c86ac;},N(_0x1dd919);}function P(_0x3687f5,_0xfc48bd){const _0x3b1695=_0x1519fa;if(N(_0x3687f5)!=_0x3b1695(0xb9)||!_0x3687f5)return _0x3687f5;var _0x57d29f=_0x3687f5[Symbol[_0x3b1695(0xc7)]];if(_0x57d29f!==void 0x0){var _0x2f75b2=_0x57d29f[_0x3b1695(0xec)](_0x3687f5,_0xfc48bd||_0x3b1695(0xb3));if(N(_0x2f75b2)!='object')return _0x2f75b2;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0xfc48bd===_0x3b1695(0xe3)?String:Number)(_0x3687f5);}function F(_0x14280c){const _0x1112be=_0x1519fa;var _0x1d4204=P(_0x14280c,'string');return N(_0x1d4204)==_0x1112be(0xdf)?_0x1d4204:_0x1d4204+'';}function I(_0x51f186,_0x3e4614,_0x1d917c){const _0x22c384=_0x1519fa;return(_0x3e4614=F(_0x3e4614))in _0x51f186?Object[_0x22c384(0x9e)](_0x51f186,_0x3e4614,{'value':_0x1d917c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x51f186[_0x3e4614]=_0x1d917c,_0x51f186;}let L=class extends _0x4742b4{constructor(_0x523eb1=O,_0x3e25b8,_0x2d26dd){const _0x3c025b=_0x1519fa;super(),this[_0x3c025b(0x99)]=_0x523eb1,this['_injector']=_0x3e25b8,this[_0x3c025b(0xce)]=_0x2d26dd;let {..._0x3d4536}=_0x221b8a({},O,this['_config']);this[_0x3c025b(0xce)][_0x3c025b(0xed)](_0x3c025b(0xb5),_0x3d4536);}[_0x1519fa(0x8f)](){const _0x5b586b=_0x1519fa;[[j],[M],[D]][_0x5b586b(0xcb)](_0x563dbe=>{this['_injector']['add'](_0x563dbe);});}[_0x1519fa(0xc6)](){const _0x460ac5=_0x1519fa;this[_0x460ac5(0x8b)][_0x460ac5(0xb2)](M),this[_0x460ac5(0x8b)]['get'](D);}};I(L,_0x1519fa(0xa1),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),I(L,'packageName',x),I(L,_0x1519fa(0xee),S),L=E([_0x34a858(_0x211f11,_0x5ca470,_0x4b2402),T(0x1,_0x2a2077(_0x28841a)),T(0x2,_0x45fc64)],L);export{L as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4a419e=_0x3d53;(function(_0x219509,_0x4dcf38){const _0x4d6169=_0x3d53,_0x24fbf7=_0x219509();while(!![]){try{const _0xd2fdd4=-parseInt(_0x4d6169(0x224))/0x1+parseInt(_0x4d6169(0x214))/0x2*(parseInt(_0x4d6169(0x1ec))/0x3)+parseInt(_0x4d6169(0x258))/0x4+parseInt(_0x4d6169(0x24f))/0x5*(parseInt(_0x4d6169(0x245))/0x6)+-parseInt(_0x4d6169(0x212))/0x7+parseInt(_0x4d6169(0x218))/0x8+-parseInt(_0x4d6169(0x206))/0x9*(parseInt(_0x4d6169(0x24a))/0xa);if(_0xd2fdd4===_0x4dcf38)break;else _0x24fbf7['push'](_0x24fbf7['shift']());}catch(_0x13dd1a){_0x24fbf7['push'](_0x24fbf7['shift']());}}}(_0x50c6,0x5a136));import{CollaborationSessionService as _0x1181c9,CommentService as _0x499df7,UniverCollaborationClientPlugin as _0x51b592}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5ca257}from'@univerjs-pro/license';import{CustomRangeType as _0x5d7594,DependentOn as _0x5c140f,Disposable as _0x2fdd4b,IConfigService as _0x25e097,Inject as _0x23c9e6,Injector as _0x2d61de,Plugin as _0x4fffb7,UserManagerService as _0x546989,dateKit as _0x32dd0f,merge as _0x25485f}from'@univerjs/core';function _0x50c6(){const _0x43539e=['2533508VWhjne','_threadCommentModel','string','/list','add','258WDCUie','code','prototype','saveCommentToSnapshot','find','dataSource','_threadCommentDataSourceService','parentId','resolveComment','get','getMemberID','packageName','payload','getUnit','@univerjs-pro/thread-comment-datasource','rangeType','/solved','replies','setConfig','deleteComment','getOwnPropertyDescriptor','values','/universer-api/comment/unit/','Solved','parse','commentUpdate$','336249yhnoDQ','userId','_injector','_init','solved','OpenOrReOpen','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_sessionService','1.0.0-alpha.0','rangeId','_userService','_initDataSource','2105348AGNKcR','users','1010eVGZeN','disposeWithMe','unitId','getComment','310464XPAggW','Reply','_httpService','_config','root','getUser','syncUpdateMutationToColla','ref','Delete','requireSession','error','decorate','111925cRuils','thread-comment-data-source.config','forEach','onStarting','symbol','threadId','size','addUser','replyId','_configService','onReady','listComments','/reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','createTimestamp','updateComment','length','map','reply','getCurrentUser','type','Add','toPrimitive','/add','iterator','post','subscribe','content','slice','object','_initUserSync','user','6exwmbA','userID','customRanges','body','pluginName','80osuppz','default','_commentService','Edit','/universer-api/user/list','1824560xIaDST','function','/delete','format','/edit','_threadCommentDataSource','pipe','defineProperty','stringify'];_0x50c6=function(){return _0x43539e;};return _0x50c6();}import{UniverThreadCommentUIPlugin as _0x59053b}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x2e80be,CommentUpdateEventType as _0x579beb}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x2d8896,ThreadCommentModel as _0x12c394}from'@univerjs/thread-comment';import{bufferTime as _0x494c86}from'rxjs';import{HTTPService as _0x1f1a2e}from'@univerjs/network';var x=_0x4a419e(0x1fa),S=_0x4a419e(0x20e);const C=_0x220a01=>_0x32dd0f(new Date(+_0x220a01))['format']('YYYY/MM/DD\x20HH:mm'),w=async(_0x261488,_0x15d29c)=>{const _0x4dfb28=_0x4a419e;let _0x469e18=_0x261488[_0x4dfb28(0x1f5)](_0x546989),_0x1ac62a=_0x261488[_0x4dfb28(0x1f5)](_0x1f1a2e);_0x15d29c[_0x4dfb28(0x226)](_0x347229=>{const _0x4df7af=_0x4dfb28;_0x469e18[_0x4df7af(0x21d)](_0x347229)&&_0x15d29c['delete'](_0x347229);}),_0x15d29c[_0x4dfb28(0x22a)]&&(await _0x1ac62a[_0x4dfb28(0x1f5)](_0x4dfb28(0x24e),{'params':{'userIDs':[..._0x15d29c]}}))[_0x4dfb28(0x248)][_0x4dfb28(0x213)][_0x4dfb28(0x226)](_0x4ea4a7=>{const _0x558bb9=_0x4dfb28;_0x4ea4a7&&_0x469e18[_0x558bb9(0x22b)](_0x4ea4a7);});};function T(_0x41d3a7,_0x2824b1){return function(_0x27c6d8,_0xb311f8){_0x2824b1(_0x27c6d8,_0xb311f8,_0x41d3a7);};}function _0x3d53(_0x58ee75,_0x2ce120){_0x58ee75=_0x58ee75-0x1ec;const _0x50c606=_0x50c6();let _0x3d5353=_0x50c606[_0x58ee75];return _0x3d5353;}function E(_0x4f8373,_0x4ae892,_0x54a535,_0x23e972){const _0x4d5257=_0x4a419e;var _0x5ae939=arguments['length'],_0x2b0b29=_0x5ae939<0x3?_0x4ae892:_0x23e972===null?_0x23e972=Object[_0x4d5257(0x200)](_0x4ae892,_0x54a535):_0x23e972,_0x265c03;if(typeof Reflect=='object'&&typeof Reflect[_0x4d5257(0x223)]=='function')_0x2b0b29=Reflect[_0x4d5257(0x223)](_0x4f8373,_0x4ae892,_0x54a535,_0x23e972);else{for(var _0x2c15aa=_0x4f8373[_0x4d5257(0x235)]-0x1;_0x2c15aa>=0x0;_0x2c15aa--)(_0x265c03=_0x4f8373[_0x2c15aa])&&(_0x2b0b29=(_0x5ae939<0x3?_0x265c03(_0x2b0b29):_0x5ae939>0x3?_0x265c03(_0x4ae892,_0x54a535,_0x2b0b29):_0x265c03(_0x4ae892,_0x54a535))||_0x2b0b29);}return _0x5ae939>0x3&&_0x2b0b29&&Object[_0x4d5257(0x256)](_0x4ae892,_0x54a535,_0x2b0b29),_0x2b0b29;}let D=class extends _0x2fdd4b{constructor(_0xeac4e0,_0x21da2c,_0x34d2e2,_0x50e050){const _0xd14814=_0x4a419e;super(),this[_0xd14814(0x24c)]=_0xeac4e0,this['_threadCommentModel']=_0x21da2c,this[_0xd14814(0x210)]=_0x34d2e2,this['_injector']=_0x50e050,this[_0xd14814(0x209)](),this[_0xd14814(0x243)]();}['_initUserSync'](){const _0x4cbafa=_0x4a419e;this[_0x4cbafa(0x215)](this[_0x4cbafa(0x259)][_0x4cbafa(0x205)][_0x4cbafa(0x255)](_0x494c86(0x10))[_0x4cbafa(0x23f)](_0x23ba1c=>{const _0x1d96f0=_0x4cbafa;let _0x55f32c=new Set();_0x23ba1c[_0x1d96f0(0x226)](_0x2859bb=>{const _0x107658=_0x1d96f0;switch(_0x2859bb[_0x107658(0x239)]){case _0x107658(0x25c):{let _0x42f6fd=_0x2859bb[_0x107658(0x1f8)]['personId'];_0x55f32c[_0x107658(0x25c)](_0x42f6fd);break;}default:break;}}),w(this[_0x1d96f0(0x208)],_0x55f32c);}));}['_init'](){const _0x145707=_0x4a419e;this['disposeWithMe'](this['_commentService'][_0x145707(0x205)][_0x145707(0x23f)](async _0x55ef38=>{const _0x24524d=_0x145707;var _0x312d5e;let _0x4fc810=(_0x312d5e=this[_0x24524d(0x259)][_0x24524d(0x1f9)](_0x55ef38['unitId'])[_0x24524d(0x1f0)](_0x3cc2ea=>_0x3cc2ea[_0x24524d(0x229)]===_0x55ef38[_0x24524d(0x229)]))==null?void 0x0:_0x312d5e[_0x24524d(0x21c)];if(!_0x4fc810)return;let {unitId:_0x27d3c7,subUnitId:_0x3ff98d}=_0x4fc810;switch(_0x55ef38[_0x24524d(0x244)]&&this[_0x24524d(0x210)]['addUser'](_0x55ef38['user']),_0x55ef38[_0x24524d(0x239)]){case _0x579beb[_0x24524d(0x23a)]:break;case _0x579beb[_0x24524d(0x219)]:var _0x1aa334,_0x522e21;this['_threadCommentModel']['addComment'](_0x27d3c7,_0x3ff98d,{'unitId':_0x27d3c7,'subUnitId':_0x3ff98d,'ref':'','id':_0x55ef38[_0x24524d(0x22c)],'dT':C(+_0x55ef38[_0x24524d(0x233)]),'threadId':_0x55ef38[_0x24524d(0x229)],'personId':(_0x1aa334=(_0x522e21=_0x55ef38['user'])==null?void 0x0:_0x522e21[_0x24524d(0x246)])==null?_0x55ef38[_0x24524d(0x207)]:_0x1aa334,'text':JSON[_0x24524d(0x204)](_0x55ef38[_0x24524d(0x240)]),'parentId':_0x4fc810['id']});break;case _0x579beb[_0x24524d(0x220)]:{let _0x4329a4=this[_0x24524d(0x259)][_0x24524d(0x217)](_0x27d3c7,_0x3ff98d,_0x55ef38[_0x24524d(0x22c)]);_0x4329a4&&_0x4329a4[_0x24524d(0x1f3)]&&this[_0x24524d(0x259)][_0x24524d(0x1ff)](_0x27d3c7,_0x3ff98d,_0x55ef38['replyId']);break;}case _0x579beb[_0x24524d(0x24d)]:this[_0x24524d(0x259)][_0x24524d(0x234)](_0x27d3c7,_0x3ff98d,{'commentId':_0x55ef38['replyId'],'text':JSON[_0x24524d(0x204)](_0x55ef38['content'])});break;case _0x579beb['Solve']:{var _0x2ae818;let _0x4f6045=(_0x2ae818=this['_threadCommentModel'][_0x24524d(0x1f9)](_0x55ef38[_0x24524d(0x216)])[_0x24524d(0x1f0)](_0x13de57=>_0x13de57[_0x24524d(0x229)]===_0x55ef38['threadId']))==null?void 0x0:_0x2ae818[_0x24524d(0x21c)];_0x4f6045&&this[_0x24524d(0x259)][_0x24524d(0x1f4)](_0x27d3c7,_0x3ff98d,_0x4f6045['id'],_0x55ef38['solved']===_0x2e80be[_0x24524d(0x203)]);break;}default:break;}}));}};D=E([T(0x0,_0x23c9e6(_0x499df7)),T(0x1,_0x23c9e6(_0x12c394)),T(0x2,_0x23c9e6(_0x546989)),T(0x3,_0x23c9e6(_0x2d61de))],D);const O={};function k(_0x24522d,_0x4d58f9){const _0x15d0f8=_0x4a419e;let _0x1dda31=_0x24522d[_0x15d0f8(0x1fd)][0x0];return{..._0x4d58f9,'id':_0x1dda31[_0x15d0f8(0x22c)],'resolved':_0x24522d[_0x15d0f8(0x20a)]===0x1,'dT':C(_0x1dda31['createTimestamp']),'personId':_0x1dda31[_0x15d0f8(0x207)],'threadId':_0x1dda31[_0x15d0f8(0x229)]};}function A(_0x4d628a,_0x271c87,_0x2e1b4c){const _0x3bcc94=_0x4a419e;var _0x766f74,_0x3366f4;if(((_0x766f74=_0x4d628a==null||(_0x3366f4=_0x4d628a[_0x3bcc94(0x1fd)])==null?void 0x0:_0x3366f4[_0x3bcc94(0x235)])==null?0x0:_0x766f74)>0x0){let _0x20b91d=(_0x5428fd,_0x1b17a8)=>({'id':_0x5428fd[_0x3bcc94(0x22c)],'threadId':_0x5428fd[_0x3bcc94(0x229)],'dT':C(_0x5428fd[_0x3bcc94(0x233)]),'personId':_0x5428fd['userId'],'resolved':_0x4d628a['solved']===_0x2e80be[_0x3bcc94(0x203)],'unitId':_0x271c87,'subUnitId':_0x2e1b4c,'text':JSON[_0x3bcc94(0x204)](_0x5428fd[_0x3bcc94(0x240)]),'parentId':_0x1b17a8}),_0xa8bcbb=_0x20b91d(_0x4d628a[_0x3bcc94(0x1fd)][0x0]);return{..._0xa8bcbb,'children':_0x4d628a['replies'][_0x3bcc94(0x241)](0x1)[_0x3bcc94(0x236)](_0x4e4c9a=>_0x20b91d(_0x4e4c9a,_0xa8bcbb['id']))};}return null;}let j=class{constructor(_0x437bfa,_0x279f3b,_0x15c9be){const _0x755d4=_0x4a419e;this['_httpService']=_0x437bfa,this['_userService']=_0x279f3b,this[_0x755d4(0x20d)]=_0x15c9be;}async['addComment'](_0x3913f9){const _0x31063c=_0x4a419e;var _0x9143e1,_0x496c19;let {parentId:_0x5a3872,unitId:_0xf71baf,text:_0xe3b270,threadId:_0x51c53c}=_0x3913f9,_0x39c310=(_0x9143e1=(_0x496c19=_0xe3b270[_0x31063c(0x247)])==null?void 0x0:_0x496c19[_0x31063c(0x232)](_0x113f28=>_0x113f28[_0x31063c(0x1fb)]===_0x5d7594['COMMENT'])[_0x31063c(0x236)](_0x3db110=>_0x3db110[_0x31063c(0x20f)]))==null?[]:_0x9143e1,_0x18ed5a=JSON['stringify'](_0xe3b270),_0x5746fb=(await this[_0x31063c(0x20d)][_0x31063c(0x221)](_0xf71baf))[_0x31063c(0x1f6)]();if(_0x5a3872){let _0x3faa37={'memberId':_0x5746fb,'unitId':_0xf71baf,'content':_0x18ed5a,'mention':_0x39c310,'threadId':_0x51c53c},_0x3e1259=(await this[_0x31063c(0x21a)]['post'](_0x31063c(0x202)+_0xf71baf+_0x31063c(0x230),{'body':_0x3faa37}))[_0x31063c(0x248)][_0x31063c(0x237)];return{..._0x3913f9,'id':_0x3e1259[_0x31063c(0x22c)],'dT':_0x32dd0f(+_0x3e1259[_0x31063c(0x233)])[_0x31063c(0x252)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3e1259[_0x31063c(0x207)]};}else{let _0x137fe9={'memberId':_0x5746fb,'unitId':_0xf71baf,'content':_0x18ed5a,'mention':_0x39c310};return k((await this[_0x31063c(0x21a)][_0x31063c(0x23e)](_0x31063c(0x202)+_0xf71baf+_0x31063c(0x23c),{'body':_0x137fe9}))['body']['comment'],_0x3913f9);}}async[_0x4a419e(0x234)](_0x3535d1){const _0x5038bc=_0x4a419e;var _0x515029,_0x57a34d;let {text:_0x2792bd,unitId:_0x3431d5}=_0x3535d1,_0x2e330c=(_0x515029=(_0x57a34d=_0x2792bd[_0x5038bc(0x247)])==null?void 0x0:_0x57a34d[_0x5038bc(0x232)](_0x1f5ff9=>_0x1f5ff9[_0x5038bc(0x1fb)]===_0x5d7594['COMMENT'])[_0x5038bc(0x236)](_0x3eaf96=>_0x3eaf96[_0x5038bc(0x20f)]))==null?[]:_0x515029,_0x21e4f6=JSON[_0x5038bc(0x257)](_0x2792bd),_0x38bebf=_0x3535d1['threadId'],_0x2b0e59=_0x3535d1['id'],_0x428d53={'memberId':(await this['_sessionService'][_0x5038bc(0x221)](_0x3431d5))['getMemberID'](),'unitId':_0x3431d5,'threadId':_0x38bebf,'mention':_0x2e330c,'content':_0x21e4f6,'replyId':_0x2b0e59},_0x369b0e=await this['_httpService'][_0x5038bc(0x23e)]('/universer-api/comment/unit/'+_0x3431d5+_0x5038bc(0x253),{'body':_0x428d53});return!_0x369b0e[_0x5038bc(0x248)][_0x5038bc(0x222)]||_0x369b0e[_0x5038bc(0x248)][_0x5038bc(0x222)][_0x5038bc(0x1ed)]===0x1;}async[_0x4a419e(0x1f4)](_0x14655b){const _0x1da518=_0x4a419e;let {unitId:_0x4fdab2}=_0x14655b,_0x140dcf=_0x14655b[_0x1da518(0x229)],_0x2eefe7={'memberId':this[_0x1da518(0x210)][_0x1da518(0x238)]()[_0x1da518(0x246)],'unitId':_0x4fdab2,'threadId':_0x140dcf,'solved':_0x14655b['resolved']?_0x2e80be[_0x1da518(0x203)]:_0x2e80be[_0x1da518(0x20b)]},_0x301530=await this[_0x1da518(0x21a)][_0x1da518(0x23e)](_0x1da518(0x202)+_0x4fdab2+_0x1da518(0x1fc),{'body':_0x2eefe7});return!_0x301530[_0x1da518(0x248)][_0x1da518(0x222)]||_0x301530[_0x1da518(0x248)][_0x1da518(0x222)][_0x1da518(0x1ed)]===0x1;}async['deleteComment'](_0x56b8b3,_0x3175b0,_0x4702b4,_0x773783){const _0x1139ad=_0x4a419e;let _0x2f10bc={'memberId':(await this[_0x1139ad(0x20d)]['requireSession'](_0x56b8b3))[_0x1139ad(0x1f6)](),'threadId':_0x4702b4,'replyId':_0x773783,'unitId':_0x56b8b3},_0x3ab494=await this['_httpService'][_0x1139ad(0x23e)]('/universer-api/comment/unit/'+_0x56b8b3+_0x1139ad(0x251),{'body':_0x2f10bc});return!_0x3ab494[_0x1139ad(0x248)]['error']||_0x3ab494[_0x1139ad(0x248)][_0x1139ad(0x222)][_0x1139ad(0x1ed)]===0x1;}async[_0x4a419e(0x22f)](_0x51207f,_0x1acab9,_0xf64141){const _0x5c30d7=_0x4a419e;let _0x3fef24={'unitId':_0x51207f,'threadId':_0xf64141},_0x5e4b01=await this[_0x5c30d7(0x21a)]['post'](_0x5c30d7(0x202)+_0x51207f+_0x5c30d7(0x25b),{'body':_0x3fef24}),_0x49b5bc=_0xf64141[_0x5c30d7(0x236)](_0x1c54d9=>A(_0x5e4b01[_0x5c30d7(0x248)]['comments'][_0x1c54d9],_0x51207f,_0x1acab9))[_0x5c30d7(0x232)](Boolean);return Object[_0x5c30d7(0x201)](_0x5e4b01['body'][_0x5c30d7(0x213)])[_0x5c30d7(0x226)](_0x5d12d6=>{const _0x422ad8=_0x5c30d7;this[_0x422ad8(0x210)][_0x422ad8(0x22b)](_0x5d12d6);}),_0x49b5bc;}[_0x4a419e(0x1ef)](_0x461c98){const _0x1e055b=_0x4a419e;return{'id':_0x461c98['id'],'threadId':_0x461c98[_0x1e055b(0x229)],'ref':_0x461c98[_0x1e055b(0x21f)]};}};j=E([T(0x0,_0x23c9e6(_0x1f1a2e)),T(0x1,_0x23c9e6(_0x546989)),T(0x2,_0x23c9e6(_0x1181c9))],j);let M=class extends _0x2fdd4b{constructor(_0x1d8a6a,_0xab17e2){const _0x5f2ede=_0x4a419e;super(),this[_0x5f2ede(0x1f2)]=_0x1d8a6a,this[_0x5f2ede(0x254)]=_0xab17e2,this[_0x5f2ede(0x211)]();}['_initDataSource'](){const _0x40d22e=_0x4a419e;this[_0x40d22e(0x1f2)][_0x40d22e(0x1f1)]=this[_0x40d22e(0x254)],this['_threadCommentDataSourceService'][_0x40d22e(0x21e)]=!0x1;}};M=E([T(0x0,_0x2d8896),T(0x1,_0x23c9e6(j))],M);function N(_0x3a54e9){'@babel/helpers - typeof';const _0x33524b=_0x4a419e;return N=typeof Symbol==_0x33524b(0x250)&&typeof Symbol[_0x33524b(0x23d)]==_0x33524b(0x228)?function(_0x1a9638){return typeof _0x1a9638;}:function(_0x15d9bc){const _0x407575=_0x33524b;return _0x15d9bc&&typeof Symbol==_0x407575(0x250)&&_0x15d9bc['constructor']===Symbol&&_0x15d9bc!==Symbol[_0x407575(0x1ee)]?_0x407575(0x228):typeof _0x15d9bc;},N(_0x3a54e9);}function P(_0x513a6f,_0x3307a1){const _0x1d779f=_0x4a419e;if(N(_0x513a6f)!=_0x1d779f(0x242)||!_0x513a6f)return _0x513a6f;var _0x23729e=_0x513a6f[Symbol[_0x1d779f(0x23b)]];if(_0x23729e!==void 0x0){var _0x858c9e=_0x23729e['call'](_0x513a6f,_0x3307a1||_0x1d779f(0x24b));if(N(_0x858c9e)!=_0x1d779f(0x242))return _0x858c9e;throw TypeError(_0x1d779f(0x20c));}return(_0x3307a1===_0x1d779f(0x25a)?String:Number)(_0x513a6f);}function F(_0x1d3732){const _0x40f009=_0x4a419e;var _0x12d43a=P(_0x1d3732,_0x40f009(0x25a));return N(_0x12d43a)==_0x40f009(0x228)?_0x12d43a:_0x12d43a+'';}function I(_0x16c560,_0x229ef7,_0x5ac4ce){const _0x41a15e=_0x4a419e;return(_0x229ef7=F(_0x229ef7))in _0x16c560?Object[_0x41a15e(0x256)](_0x16c560,_0x229ef7,{'value':_0x5ac4ce,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x16c560[_0x229ef7]=_0x5ac4ce,_0x16c560;}let L=class extends _0x4fffb7{constructor(_0x2158b1=O,_0x3283de,_0x12256b){const _0x35ee21=_0x4a419e;super(),this[_0x35ee21(0x21b)]=_0x2158b1,this['_injector']=_0x3283de,this['_configService']=_0x12256b;let {..._0x5d4371}=_0x25485f({},O,this[_0x35ee21(0x21b)]);this[_0x35ee21(0x22d)][_0x35ee21(0x1fe)](_0x35ee21(0x225),_0x5d4371);}[_0x4a419e(0x227)](){const _0xc802ca=_0x4a419e;[[j],[M],[D]][_0xc802ca(0x226)](_0x4cc3ab=>{this['_injector']['add'](_0x4cc3ab);});}[_0x4a419e(0x22e)](){const _0x644dba=_0x4a419e;this['_injector']['get'](M),this[_0x644dba(0x208)]['get'](D);}};I(L,_0x4a419e(0x249),_0x4a419e(0x231)),I(L,_0x4a419e(0x1f7),x),I(L,'version',S),L=E([_0x5c140f(_0x59053b,_0x51b592,_0x5ca257),T(0x1,_0x23c9e6(_0x2d61de)),T(0x2,_0x25e097)],L);export{L as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1ba9(_0x14a003,_0x51f6d2){_0x14a003=_0x14a003-0xce;const _0x1f3ab6=_0x1f3a();let _0x1ba9b5=_0x1f3ab6[_0x14a003];return _0x1ba9b5;}function _0x1f3a(){const _0x56c6b7=['deleteComment','getCurrentUser','onStarting','getMemberID','CommentSolvedStatus','filter','YYYY/MM/DD\x20HH:mm','toPrimitive','CollaborationSessionService','exports','rangeType','iterator','666YvKRDk','threadId','object','dataSource','userId','solved','delete','setConfig','onReady','getComment','_init','CommentService','reply','user','type','post','/universer-api/comment/unit/','disposeWithMe','/solved','decorate','createTimestamp','UserManagerService','ref','users','900010wpFpcN','Plugin','prototype','UniverThreadCommentUi','0.25.0-insiders.20260623-012b5a8','_initUserSync','slice','length','format','content','Reply','get','dateKit','packageName','replies','21NcnBXi','1070772uSBshC','body','saveCommentToSnapshot','Add','UniverThreadCommentUIPlugin','size','_configService','string','_threadCommentDataSourceService','getUnit','@univerjs/thread-comment','@univerjs-pro/collaboration-client','9uazQzX','symbol','ThreadCommentModel','resolved','_sessionService','replyId','defineProperty','_injector','_threadCommentModel','UniverThreadCommentDataSourcePlugin','@univerjs-pro/thread-comment-datasource','48LeQhpk','Injector','function','502ARBqyX','OpenOrReOpen','unitId','version','stringify','addComment','add','Delete','bufferTime','payload','root','comments','@univerjs/thread-comment-ui','code','error','UniverProCollaborationClient','@univerjs/core','Solved','Disposable','UniverProThreadCommentDatasource','UniverProLicense','_initDataSource','parentId','522750mgzZnK','/add','syncUpdateMutationToColla','Inject','values','forEach','45899KMzsOR','COMMENT','amd','merge','33vsEKuu','_commentService','@univerjs/protocol','HTTPService','customRanges','_threadCommentDataSource','constructor','DependentOn','CommentUpdateEventType','@univerjs/network','addUser','_userService','requireSession','personId','subscribe','comment','find','_config','Module','301260apmNYC','112664aQQdrT','IThreadCommentDataSourceService','default','map','/universer-api/user/list','parse','UniverCollaborationClientPlugin','listComments','commentUpdate$','/reply','userID','updateComment','rangeId','_httpService'];_0x1f3a=function(){return _0x56c6b7;};return _0x1f3a();}(function(_0xd6f886,_0x1c893a){const _0x1eb1aa=_0x1ba9,_0x369093=_0xd6f886();while(!![]){try{const _0x3f98bc=parseInt(_0x1eb1aa(0x14c))/0x1*(parseInt(_0x1eb1aa(0xfd))/0x2)+parseInt(_0x1eb1aa(0xe2))/0x3*(-parseInt(_0x1eb1aa(0x132))/0x4)+-parseInt(_0x1eb1aa(0x131))/0x5+parseInt(_0x1eb1aa(0x114))/0x6+parseInt(_0x1eb1aa(0x11a))/0x7*(-parseInt(_0x1eb1aa(0xfa))/0x8)+-parseInt(_0x1eb1aa(0xef))/0x9*(parseInt(_0x1eb1aa(0xd3))/0xa)+-parseInt(_0x1eb1aa(0x11e))/0xb*(-parseInt(_0x1eb1aa(0xe3))/0xc);if(_0x3f98bc===_0x1c893a)break;else _0x369093['push'](_0x369093['shift']());}catch(_0x3328c1){_0x369093['push'](_0x369093['shift']());}}}(_0x1f3a,0x2103b),function(_0x480e57,_0x144732){const _0x5a37d3=_0x1ba9;typeof exports==_0x5a37d3(0x14e)&&typeof module<'u'?_0x144732(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x5a37d3(0xfc)&&define[_0x5a37d3(0x11c)]?define([_0x5a37d3(0x149),_0x5a37d3(0xee),'@univerjs-pro/license',_0x5a37d3(0x10d),_0x5a37d3(0x109),_0x5a37d3(0x120),_0x5a37d3(0xed),'rxjs',_0x5a37d3(0x127)],_0x144732):(_0x480e57=typeof globalThis<'u'?globalThis:_0x480e57||self,_0x144732(_0x480e57[_0x5a37d3(0x110)]={},_0x480e57[_0x5a37d3(0x10c)],_0x480e57[_0x5a37d3(0x111)],_0x480e57['UniverCore'],_0x480e57[_0x5a37d3(0xd6)],_0x480e57['UniverProtocol'],_0x480e57['UniverThreadComment'],_0x480e57['rxjs'],_0x480e57['UniverNetwork']));}(this,function(_0x356e11,_0x4847c6,_0x5c6b6e,_0xeb1a38,_0x51556c,_0x4a6011,_0x1a7f30,_0x3e74f0,_0x171d3f){const _0x541ea2=_0x1ba9;Object[_0x541ea2(0xf5)](_0x356e11,Symbol['toStringTag'],{'value':_0x541ea2(0x130)});var _0x1cc495=_0x541ea2(0xf9),_0x42ed79=_0x541ea2(0xd7);let _0x4f45be=_0x20aa7a=>(0x0,_0xeb1a38['dateKit'])(new Date(+_0x20aa7a))['format'](_0x541ea2(0x146)),_0x546595=async(_0x2334e1,_0x54f2f0)=>{const _0x4f229a=_0x541ea2;let _0x5bde0a=_0x2334e1[_0x4f229a(0xde)](_0xeb1a38[_0x4f229a(0xd0)]),_0x7f6f88=_0x2334e1[_0x4f229a(0xde)](_0x171d3f[_0x4f229a(0x121)]);_0x54f2f0[_0x4f229a(0x119)](_0x134e23=>{const _0x175aad=_0x4f229a;_0x5bde0a['getUser'](_0x134e23)&&_0x54f2f0[_0x175aad(0x152)](_0x134e23);}),_0x54f2f0[_0x4f229a(0xe8)]&&(await _0x7f6f88[_0x4f229a(0xde)](_0x4f229a(0x136),{'params':{'userIDs':[..._0x54f2f0]}}))[_0x4f229a(0xe4)][_0x4f229a(0xd2)][_0x4f229a(0x119)](_0x46e7a2=>{const _0x37742e=_0x4f229a;_0x46e7a2&&_0x5bde0a[_0x37742e(0x128)](_0x46e7a2);});};function _0x7f1059(_0x56c771,_0x38b057){return function(_0x4effd4,_0x20fcc0){_0x38b057(_0x4effd4,_0x20fcc0,_0x56c771);};}function _0x510631(_0x341038,_0x5852ec,_0x13b0d5,_0x2f4a7d){const _0x5a8386=_0x541ea2;var _0x5c588c=arguments[_0x5a8386(0xda)],_0x1a2836=_0x5c588c<0x3?_0x5852ec:_0x2f4a7d===null?_0x2f4a7d=Object['getOwnPropertyDescriptor'](_0x5852ec,_0x13b0d5):_0x2f4a7d,_0x5d9c2d;if(typeof Reflect==_0x5a8386(0x14e)&&typeof Reflect[_0x5a8386(0xce)]==_0x5a8386(0xfc))_0x1a2836=Reflect[_0x5a8386(0xce)](_0x341038,_0x5852ec,_0x13b0d5,_0x2f4a7d);else{for(var _0x186d5b=_0x341038['length']-0x1;_0x186d5b>=0x0;_0x186d5b--)(_0x5d9c2d=_0x341038[_0x186d5b])&&(_0x1a2836=(_0x5c588c<0x3?_0x5d9c2d(_0x1a2836):_0x5c588c>0x3?_0x5d9c2d(_0x5852ec,_0x13b0d5,_0x1a2836):_0x5d9c2d(_0x5852ec,_0x13b0d5))||_0x1a2836);}return _0x5c588c>0x3&&_0x1a2836&&Object[_0x5a8386(0xf5)](_0x5852ec,_0x13b0d5,_0x1a2836),_0x1a2836;}let _0x4720f6=class extends _0xeb1a38[_0x541ea2(0x10f)]{constructor(_0x307e7d,_0x23630a,_0x3a1bea,_0x15bdb5){const _0xdc1d31=_0x541ea2;super(),this[_0xdc1d31(0x11f)]=_0x307e7d,this[_0xdc1d31(0xf7)]=_0x23630a,this['_userService']=_0x3a1bea,this[_0xdc1d31(0xf6)]=_0x15bdb5,this['_init'](),this[_0xdc1d31(0xd8)]();}['_initUserSync'](){const _0x4d5d0c=_0x541ea2;this[_0x4d5d0c(0x15d)](this['_threadCommentModel']['commentUpdate$']['pipe']((0x0,_0x3e74f0[_0x4d5d0c(0x105)])(0x10))[_0x4d5d0c(0x12c)](_0x41a27b=>{const _0x1d8fde=_0x4d5d0c;let _0x3b2943=new Set();_0x41a27b['forEach'](_0x3cd7d5=>{const _0x35d2da=_0x1ba9;switch(_0x3cd7d5[_0x35d2da(0x15a)]){case _0x35d2da(0x103):{let _0xcf1471=_0x3cd7d5[_0x35d2da(0x106)][_0x35d2da(0x12b)];_0x3b2943[_0x35d2da(0x103)](_0xcf1471);break;}default:break;}}),_0x546595(this[_0x1d8fde(0xf6)],_0x3b2943);}));}[_0x541ea2(0x156)](){const _0x5421b6=_0x541ea2;this['disposeWithMe'](this[_0x5421b6(0x11f)][_0x5421b6(0x13a)][_0x5421b6(0x12c)](async _0x5c2cd6=>{const _0x42a522=_0x5421b6;var _0x463638;let _0x4e4f6c=(_0x463638=this[_0x42a522(0xf7)]['getUnit'](_0x5c2cd6['unitId'])[_0x42a522(0x12e)](_0x2dafa2=>_0x2dafa2[_0x42a522(0x14d)]===_0x5c2cd6['threadId']))==null?void 0x0:_0x463638['root'];if(!_0x4e4f6c)return;let {unitId:_0xc4cc9c,subUnitId:_0x509355}=_0x4e4f6c;switch(_0x5c2cd6[_0x42a522(0x159)]&&this['_userService'][_0x42a522(0x128)](_0x5c2cd6[_0x42a522(0x159)]),_0x5c2cd6[_0x42a522(0x15a)]){case _0x4a6011['CommentUpdateEventType'][_0x42a522(0xe6)]:break;case _0x4a6011[_0x42a522(0x126)][_0x42a522(0xdd)]:var _0x4d1039,_0x1c9d36;this[_0x42a522(0xf7)]['addComment'](_0xc4cc9c,_0x509355,{'unitId':_0xc4cc9c,'subUnitId':_0x509355,'ref':'','id':_0x5c2cd6['replyId'],'dT':_0x4f45be(+_0x5c2cd6['createTimestamp']),'threadId':_0x5c2cd6['threadId'],'personId':(_0x4d1039=(_0x1c9d36=_0x5c2cd6[_0x42a522(0x159)])==null?void 0x0:_0x1c9d36[_0x42a522(0x13c)])==null?_0x5c2cd6[_0x42a522(0x150)]:_0x4d1039,'text':JSON[_0x42a522(0x137)](_0x5c2cd6[_0x42a522(0xdc)]),'parentId':_0x4e4f6c['id']});break;case _0x4a6011[_0x42a522(0x126)][_0x42a522(0x104)]:{let _0x3dfeb7=this['_threadCommentModel'][_0x42a522(0x155)](_0xc4cc9c,_0x509355,_0x5c2cd6[_0x42a522(0xf4)]);_0x3dfeb7&&_0x3dfeb7[_0x42a522(0x113)]&&this[_0x42a522(0xf7)]['deleteComment'](_0xc4cc9c,_0x509355,_0x5c2cd6['replyId']);break;}case _0x4a6011[_0x42a522(0x126)]['Edit']:this[_0x42a522(0xf7)][_0x42a522(0x13d)](_0xc4cc9c,_0x509355,{'commentId':_0x5c2cd6[_0x42a522(0xf4)],'text':JSON[_0x42a522(0x137)](_0x5c2cd6['content'])});break;case _0x4a6011[_0x42a522(0x126)]['Solve']:{var _0x2161de;let _0x15b266=(_0x2161de=this[_0x42a522(0xf7)][_0x42a522(0xec)](_0x5c2cd6[_0x42a522(0xff)])['find'](_0x5f0869=>_0x5f0869[_0x42a522(0x14d)]===_0x5c2cd6[_0x42a522(0x14d)]))==null?void 0x0:_0x2161de[_0x42a522(0x107)];_0x15b266&&this[_0x42a522(0xf7)]['resolveComment'](_0xc4cc9c,_0x509355,_0x15b266['id'],_0x5c2cd6[_0x42a522(0x151)]===_0x4a6011[_0x42a522(0x144)][_0x42a522(0x10e)]);break;}default:break;}}));}};_0x4720f6=_0x510631([_0x7f1059(0x0,(0x0,_0xeb1a38[_0x541ea2(0x117)])(_0x4847c6[_0x541ea2(0x157)])),_0x7f1059(0x1,(0x0,_0xeb1a38[_0x541ea2(0x117)])(_0x1a7f30[_0x541ea2(0xf1)])),_0x7f1059(0x2,(0x0,_0xeb1a38['Inject'])(_0xeb1a38[_0x541ea2(0xd0)])),_0x7f1059(0x3,(0x0,_0xeb1a38['Inject'])(_0xeb1a38[_0x541ea2(0xfb)]))],_0x4720f6);let _0xe4204={};function _0x446afa(_0x4f31bf,_0x42c1d1){const _0x17802f=_0x541ea2;let _0xd6b443=_0x4f31bf[_0x17802f(0xe1)][0x0];return{..._0x42c1d1,'id':_0xd6b443[_0x17802f(0xf4)],'resolved':_0x4f31bf[_0x17802f(0x151)]===0x1,'dT':_0x4f45be(_0xd6b443['createTimestamp']),'personId':_0xd6b443[_0x17802f(0x150)],'threadId':_0xd6b443[_0x17802f(0x14d)]};}function _0x4d7364(_0x1f4bbd,_0x315169,_0x1002d4){const _0x478456=_0x541ea2;var _0x4aa426,_0xb30d7e;if(((_0x4aa426=_0x1f4bbd==null||(_0xb30d7e=_0x1f4bbd[_0x478456(0xe1)])==null?void 0x0:_0xb30d7e['length'])==null?0x0:_0x4aa426)>0x0){let _0x156703=(_0x4eaf9d,_0x34cc50)=>({'id':_0x4eaf9d['replyId'],'threadId':_0x4eaf9d[_0x478456(0x14d)],'dT':_0x4f45be(_0x4eaf9d[_0x478456(0xcf)]),'personId':_0x4eaf9d[_0x478456(0x150)],'resolved':_0x1f4bbd[_0x478456(0x151)]===_0x4a6011[_0x478456(0x144)][_0x478456(0x10e)],'unitId':_0x315169,'subUnitId':_0x1002d4,'text':JSON[_0x478456(0x137)](_0x4eaf9d[_0x478456(0xdc)]),'parentId':_0x34cc50}),_0x4f5654=_0x156703(_0x1f4bbd['replies'][0x0]);return{..._0x4f5654,'children':_0x1f4bbd[_0x478456(0xe1)][_0x478456(0xd9)](0x1)[_0x478456(0x135)](_0xae9347=>_0x156703(_0xae9347,_0x4f5654['id']))};}return null;}let _0x1cc3ac=class{constructor(_0x314e75,_0x301eaa,_0x10aac2){const _0x185ad0=_0x541ea2;this['_httpService']=_0x314e75,this[_0x185ad0(0x129)]=_0x301eaa,this[_0x185ad0(0xf3)]=_0x10aac2;}async[_0x541ea2(0x102)](_0x1061da){const _0x531dac=_0x541ea2;var _0xe98abb,_0x7c6174;let {parentId:_0x1b6fa8,unitId:_0x30b8be,text:_0x5879a4,threadId:_0x38cca6}=_0x1061da,_0x127b0c=(_0xe98abb=(_0x7c6174=_0x5879a4[_0x531dac(0x122)])==null?void 0x0:_0x7c6174['filter'](_0x5bd094=>_0x5bd094[_0x531dac(0x14a)]===_0xeb1a38['CustomRangeType'][_0x531dac(0x11b)])['map'](_0x42586c=>_0x42586c[_0x531dac(0x13e)]))==null?[]:_0xe98abb,_0x4d5731=JSON[_0x531dac(0x101)](_0x5879a4),_0x143251=(await this['_sessionService']['requireSession'](_0x30b8be))['getMemberID']();if(_0x1b6fa8){let _0x2d36c3={'memberId':_0x143251,'unitId':_0x30b8be,'content':_0x4d5731,'mention':_0x127b0c,'threadId':_0x38cca6},_0x237388=(await this[_0x531dac(0x13f)][_0x531dac(0x15b)](_0x531dac(0x15c)+_0x30b8be+_0x531dac(0x13b),{'body':_0x2d36c3}))['body'][_0x531dac(0x158)];return{..._0x1061da,'id':_0x237388[_0x531dac(0xf4)],'dT':(0x0,_0xeb1a38[_0x531dac(0xdf)])(+_0x237388[_0x531dac(0xcf)])[_0x531dac(0xdb)](_0x531dac(0x146)),'personId':_0x237388['userId']};}else{let _0x55d247={'memberId':_0x143251,'unitId':_0x30b8be,'content':_0x4d5731,'mention':_0x127b0c};return _0x446afa((await this[_0x531dac(0x13f)][_0x531dac(0x15b)](_0x531dac(0x15c)+_0x30b8be+_0x531dac(0x115),{'body':_0x55d247}))[_0x531dac(0xe4)][_0x531dac(0x12d)],_0x1061da);}}async[_0x541ea2(0x13d)](_0x125d1d){const _0x7338e8=_0x541ea2;var _0x4ce45a,_0x5a684e;let {text:_0x4372f7,unitId:_0x40d3b4}=_0x125d1d,_0x5523db=(_0x4ce45a=(_0x5a684e=_0x4372f7[_0x7338e8(0x122)])==null?void 0x0:_0x5a684e[_0x7338e8(0x145)](_0x2c60a3=>_0x2c60a3['rangeType']===_0xeb1a38['CustomRangeType'][_0x7338e8(0x11b)])[_0x7338e8(0x135)](_0x23afb0=>_0x23afb0[_0x7338e8(0x13e)]))==null?[]:_0x4ce45a,_0x4fef65=JSON[_0x7338e8(0x101)](_0x4372f7),_0x2f0f70=_0x125d1d[_0x7338e8(0x14d)],_0x2e8edf=_0x125d1d['id'],_0x484b4e={'memberId':(await this['_sessionService']['requireSession'](_0x40d3b4))['getMemberID'](),'unitId':_0x40d3b4,'threadId':_0x2f0f70,'mention':_0x5523db,'content':_0x4fef65,'replyId':_0x2e8edf},_0x41f68b=await this[_0x7338e8(0x13f)]['post'](_0x7338e8(0x15c)+_0x40d3b4+'/edit',{'body':_0x484b4e});return!_0x41f68b['body'][_0x7338e8(0x10b)]||_0x41f68b['body'][_0x7338e8(0x10b)][_0x7338e8(0x10a)]===0x1;}async['resolveComment'](_0x4358d8){const _0x568486=_0x541ea2;let {unitId:_0x22a05e}=_0x4358d8,_0x46dacf=_0x4358d8[_0x568486(0x14d)],_0x3b5156={'memberId':this[_0x568486(0x129)][_0x568486(0x141)]()[_0x568486(0x13c)],'unitId':_0x22a05e,'threadId':_0x46dacf,'solved':_0x4358d8[_0x568486(0xf2)]?_0x4a6011[_0x568486(0x144)][_0x568486(0x10e)]:_0x4a6011[_0x568486(0x144)][_0x568486(0xfe)]},_0xcd6d4d=await this[_0x568486(0x13f)][_0x568486(0x15b)](_0x568486(0x15c)+_0x22a05e+_0x568486(0x15e),{'body':_0x3b5156});return!_0xcd6d4d[_0x568486(0xe4)]['error']||_0xcd6d4d[_0x568486(0xe4)][_0x568486(0x10b)][_0x568486(0x10a)]===0x1;}async[_0x541ea2(0x140)](_0x3ab3fe,_0x456b43,_0xb29509,_0x2efd97){const _0x136f28=_0x541ea2;let _0x132552={'memberId':(await this[_0x136f28(0xf3)][_0x136f28(0x12a)](_0x3ab3fe))[_0x136f28(0x143)](),'threadId':_0xb29509,'replyId':_0x2efd97,'unitId':_0x3ab3fe},_0x191964=await this['_httpService'][_0x136f28(0x15b)](_0x136f28(0x15c)+_0x3ab3fe+'/delete',{'body':_0x132552});return!_0x191964[_0x136f28(0xe4)][_0x136f28(0x10b)]||_0x191964['body'][_0x136f28(0x10b)][_0x136f28(0x10a)]===0x1;}async[_0x541ea2(0x139)](_0x2521da,_0x7ada29,_0xc93329){const _0x33ca5b=_0x541ea2;let _0x358143={'unitId':_0x2521da,'threadId':_0xc93329},_0x4b5112=await this['_httpService'][_0x33ca5b(0x15b)](_0x33ca5b(0x15c)+_0x2521da+'/list',{'body':_0x358143}),_0x13b175=_0xc93329[_0x33ca5b(0x135)](_0x167a69=>_0x4d7364(_0x4b5112[_0x33ca5b(0xe4)][_0x33ca5b(0x108)][_0x167a69],_0x2521da,_0x7ada29))[_0x33ca5b(0x145)](Boolean);return Object[_0x33ca5b(0x118)](_0x4b5112[_0x33ca5b(0xe4)][_0x33ca5b(0xd2)])[_0x33ca5b(0x119)](_0x53a8f5=>{const _0x933f8a=_0x33ca5b;this[_0x933f8a(0x129)][_0x933f8a(0x128)](_0x53a8f5);}),_0x13b175;}[_0x541ea2(0xe5)](_0x259198){const _0x2b1b25=_0x541ea2;return{'id':_0x259198['id'],'threadId':_0x259198['threadId'],'ref':_0x259198[_0x2b1b25(0xd1)]};}};_0x1cc3ac=_0x510631([_0x7f1059(0x0,(0x0,_0xeb1a38[_0x541ea2(0x117)])(_0x171d3f[_0x541ea2(0x121)])),_0x7f1059(0x1,(0x0,_0xeb1a38[_0x541ea2(0x117)])(_0xeb1a38[_0x541ea2(0xd0)])),_0x7f1059(0x2,(0x0,_0xeb1a38[_0x541ea2(0x117)])(_0x4847c6[_0x541ea2(0x148)]))],_0x1cc3ac);let _0x18add6=class extends _0xeb1a38[_0x541ea2(0x10f)]{constructor(_0x3d836c,_0x32966e){const _0x1ee2f9=_0x541ea2;super(),this[_0x1ee2f9(0xeb)]=_0x3d836c,this[_0x1ee2f9(0x123)]=_0x32966e,this[_0x1ee2f9(0x112)]();}[_0x541ea2(0x112)](){const _0xce9656=_0x541ea2;this[_0xce9656(0xeb)][_0xce9656(0x14f)]=this[_0xce9656(0x123)],this['_threadCommentDataSourceService'][_0xce9656(0x116)]=!0x1;}};_0x18add6=_0x510631([_0x7f1059(0x0,_0x1a7f30[_0x541ea2(0x133)]),_0x7f1059(0x1,(0x0,_0xeb1a38[_0x541ea2(0x117)])(_0x1cc3ac))],_0x18add6);function _0x2259e1(_0x2139c3){'@babel/helpers - typeof';const _0x4ae234=_0x541ea2;return _0x2259e1=typeof Symbol==_0x4ae234(0xfc)&&typeof Symbol[_0x4ae234(0x14b)]==_0x4ae234(0xf0)?function(_0x383f06){return typeof _0x383f06;}:function(_0x538f6f){const _0x483118=_0x4ae234;return _0x538f6f&&typeof Symbol==_0x483118(0xfc)&&_0x538f6f[_0x483118(0x124)]===Symbol&&_0x538f6f!==Symbol[_0x483118(0xd5)]?_0x483118(0xf0):typeof _0x538f6f;},_0x2259e1(_0x2139c3);}function _0x33c648(_0x202d6e,_0x59fcf3){const _0x4a1b29=_0x541ea2;if(_0x2259e1(_0x202d6e)!=_0x4a1b29(0x14e)||!_0x202d6e)return _0x202d6e;var _0x5a175b=_0x202d6e[Symbol[_0x4a1b29(0x147)]];if(_0x5a175b!==void 0x0){var _0x1444cc=_0x5a175b['call'](_0x202d6e,_0x59fcf3||_0x4a1b29(0x134));if(_0x2259e1(_0x1444cc)!=_0x4a1b29(0x14e))return _0x1444cc;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x59fcf3===_0x4a1b29(0xea)?String:Number)(_0x202d6e);}function _0x2f8133(_0x428d42){const _0x5a90ab=_0x541ea2;var _0x31de00=_0x33c648(_0x428d42,_0x5a90ab(0xea));return _0x2259e1(_0x31de00)==_0x5a90ab(0xf0)?_0x31de00:_0x31de00+'';}function _0x34304b(_0x21f19b,_0x1c180c,_0x433ca2){const _0x47c671=_0x541ea2;return(_0x1c180c=_0x2f8133(_0x1c180c))in _0x21f19b?Object[_0x47c671(0xf5)](_0x21f19b,_0x1c180c,{'value':_0x433ca2,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x21f19b[_0x1c180c]=_0x433ca2,_0x21f19b;}let _0x3164a2=class extends _0xeb1a38[_0x541ea2(0xd4)]{constructor(_0x42b9bd=_0xe4204,_0x348af8,_0x47a371){const _0x26354a=_0x541ea2;super(),this[_0x26354a(0x12f)]=_0x42b9bd,this[_0x26354a(0xf6)]=_0x348af8,this[_0x26354a(0xe9)]=_0x47a371;let {..._0x57ee36}=(0x0,_0xeb1a38[_0x26354a(0x11d)])({},_0xe4204,this[_0x26354a(0x12f)]);this[_0x26354a(0xe9)][_0x26354a(0x153)]('thread-comment-data-source.config',_0x57ee36);}[_0x541ea2(0x142)](){const _0x370568=_0x541ea2;[[_0x1cc3ac],[_0x18add6],[_0x4720f6]][_0x370568(0x119)](_0x5e66fe=>{const _0x70a433=_0x370568;this[_0x70a433(0xf6)]['add'](_0x5e66fe);});}[_0x541ea2(0x154)](){const _0x431813=_0x541ea2;this[_0x431813(0xf6)][_0x431813(0xde)](_0x18add6),this[_0x431813(0xf6)]['get'](_0x4720f6);}};_0x34304b(_0x3164a2,'pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),_0x34304b(_0x3164a2,_0x541ea2(0xe0),_0x1cc495),_0x34304b(_0x3164a2,_0x541ea2(0x100),_0x42ed79),_0x3164a2=_0x510631([(0x0,_0xeb1a38[_0x541ea2(0x125)])(_0x51556c[_0x541ea2(0xe7)],_0x4847c6[_0x541ea2(0x138)],_0x5c6b6e['UniverLicensePlugin']),_0x7f1059(0x1,(0x0,_0xeb1a38[_0x541ea2(0x117)])(_0xeb1a38[_0x541ea2(0xfb)])),_0x7f1059(0x2,_0xeb1a38['IConfigService'])],_0x3164a2),Object['defineProperty'](_0x356e11,_0x541ea2(0xf8),{'enumerable':!0x0,'get':function(){return _0x3164a2;}});}));
1
+ (function(_0x5514d,_0x427e44){const _0x33879e=_0x40eb,_0x12190d=_0x5514d();while(!![]){try{const _0x22e8d2=parseInt(_0x33879e(0x1a7))/0x1*(-parseInt(_0x33879e(0x1f2))/0x2)+parseInt(_0x33879e(0x206))/0x3*(-parseInt(_0x33879e(0x1aa))/0x4)+-parseInt(_0x33879e(0x1df))/0x5+parseInt(_0x33879e(0x1cc))/0x6*(parseInt(_0x33879e(0x199))/0x7)+parseInt(_0x33879e(0x204))/0x8+parseInt(_0x33879e(0x1cd))/0x9+parseInt(_0x33879e(0x213))/0xa*(parseInt(_0x33879e(0x1dc))/0xb);if(_0x22e8d2===_0x427e44)break;else _0x12190d['push'](_0x12190d['shift']());}catch(_0x109730){_0x12190d['push'](_0x12190d['shift']());}}}(_0x275b,0x7a3c5),function(_0x7561e4,_0x1a3ae0){const _0x570019=_0x40eb;typeof exports=='object'&&typeof module<'u'?_0x1a3ae0(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x570019(0x20c)&&define['amd']?define([_0x570019(0x210),_0x570019(0x1b4),_0x570019(0x1ca),_0x570019(0x1a1),'@univerjs/thread-comment-ui',_0x570019(0x203),_0x570019(0x1f1),'rxjs',_0x570019(0x1e5)],_0x1a3ae0):(_0x7561e4=typeof globalThis<'u'?globalThis:_0x7561e4||self,_0x1a3ae0(_0x7561e4[_0x570019(0x200)]={},_0x7561e4[_0x570019(0x18c)],_0x7561e4[_0x570019(0x198)],_0x7561e4[_0x570019(0x1b9)],_0x7561e4['UniverThreadCommentUi'],_0x7561e4['UniverProtocol'],_0x7561e4['UniverThreadComment'],_0x7561e4[_0x570019(0x1c7)],_0x7561e4[_0x570019(0x1d5)]));}(this,function(_0x1a6df6,_0x1e286d,_0x394f11,_0x167b8c,_0x5d4934,_0x170cad,_0x56668b,_0x55e491,_0xc96851){const _0x5bbe4d=_0x40eb;Object[_0x5bbe4d(0x1c8)](_0x1a6df6,Symbol[_0x5bbe4d(0x19c)],{'value':_0x5bbe4d(0x1ea)});var _0x3aadc2='@univerjs-pro/thread-comment-datasource',_0x2a402d=_0x5bbe4d(0x1e8);let _0x5334bd=_0x265a14=>(0x0,_0x167b8c['dateKit'])(new Date(+_0x265a14))['format']('YYYY/MM/DD\x20HH:mm'),_0x62bf63=async(_0x1c96de,_0x31d4d3)=>{const _0x476368=_0x5bbe4d;let _0x23b03f=_0x1c96de[_0x476368(0x1fe)](_0x167b8c['UserManagerService']),_0x2a23c1=_0x1c96de[_0x476368(0x1fe)](_0xc96851[_0x476368(0x19a)]);_0x31d4d3['forEach'](_0x10576f=>{const _0x2df4f0=_0x476368;_0x23b03f[_0x2df4f0(0x20f)](_0x10576f)&&_0x31d4d3[_0x2df4f0(0x1a3)](_0x10576f);}),_0x31d4d3['size']&&(await _0x2a23c1['get'](_0x476368(0x1d6),{'params':{'userIDs':[..._0x31d4d3]}}))[_0x476368(0x1bb)]['users']['forEach'](_0x4b0736=>{const _0x567908=_0x476368;_0x4b0736&&_0x23b03f[_0x567908(0x1c6)](_0x4b0736);});};function _0x2835f5(_0x613333,_0x3c50da){return function(_0x2aa63f,_0x2e8e56){_0x3c50da(_0x2aa63f,_0x2e8e56,_0x613333);};}function _0x1298ca(_0xbd3141,_0x5e8a05,_0x362f74,_0x2db74c){const _0x922e3c=_0x5bbe4d;var _0x5e211c=arguments[_0x922e3c(0x18a)],_0x560a57=_0x5e211c<0x3?_0x5e8a05:_0x2db74c===null?_0x2db74c=Object[_0x922e3c(0x1f4)](_0x5e8a05,_0x362f74):_0x2db74c,_0x3f926a;if(typeof Reflect==_0x922e3c(0x1a6)&&typeof Reflect['decorate']==_0x922e3c(0x20c))_0x560a57=Reflect['decorate'](_0xbd3141,_0x5e8a05,_0x362f74,_0x2db74c);else{for(var _0x4c10ff=_0xbd3141[_0x922e3c(0x18a)]-0x1;_0x4c10ff>=0x0;_0x4c10ff--)(_0x3f926a=_0xbd3141[_0x4c10ff])&&(_0x560a57=(_0x5e211c<0x3?_0x3f926a(_0x560a57):_0x5e211c>0x3?_0x3f926a(_0x5e8a05,_0x362f74,_0x560a57):_0x3f926a(_0x5e8a05,_0x362f74))||_0x560a57);}return _0x5e211c>0x3&&_0x560a57&&Object[_0x922e3c(0x1c8)](_0x5e8a05,_0x362f74,_0x560a57),_0x560a57;}let _0x34c502=class extends _0x167b8c[_0x5bbe4d(0x19b)]{constructor(_0x1d8ad3,_0x4eec32,_0x173840,_0x4e59b0){const _0xa76767=_0x5bbe4d;super(),this['_commentService']=_0x1d8ad3,this['_threadCommentModel']=_0x4eec32,this[_0xa76767(0x197)]=_0x173840,this['_injector']=_0x4e59b0,this[_0xa76767(0x1bc)](),this[_0xa76767(0x1c2)]();}['_initUserSync'](){const _0x891e00=_0x5bbe4d;this[_0x891e00(0x193)](this[_0x891e00(0x1de)][_0x891e00(0x1c1)][_0x891e00(0x19f)]((0x0,_0x55e491[_0x891e00(0x1b0)])(0x10))['subscribe'](_0x3d3008=>{const _0x183943=_0x891e00;let _0x3a9a15=new Set();_0x3d3008[_0x183943(0x1d1)](_0x7cb783=>{const _0x146e2f=_0x183943;switch(_0x7cb783['type']){case'add':{let _0x3746c2=_0x7cb783[_0x146e2f(0x1b6)][_0x146e2f(0x1b5)];_0x3a9a15[_0x146e2f(0x1f6)](_0x3746c2);break;}default:break;}}),_0x62bf63(this[_0x183943(0x211)],_0x3a9a15);}));}[_0x5bbe4d(0x1bc)](){const _0x59548e=_0x5bbe4d;this[_0x59548e(0x193)](this[_0x59548e(0x207)][_0x59548e(0x1c1)][_0x59548e(0x1ad)](async _0x2ab924=>{const _0xe77e22=_0x59548e;var _0x1c2720;let _0x48c60=(_0x1c2720=this['_threadCommentModel'][_0xe77e22(0x20d)](_0x2ab924[_0xe77e22(0x1ab)])[_0xe77e22(0x1f9)](_0x2c300c=>_0x2c300c[_0xe77e22(0x1ba)]===_0x2ab924[_0xe77e22(0x1ba)]))==null?void 0x0:_0x1c2720['root'];if(!_0x48c60)return;let {unitId:_0x1fa0d7,subUnitId:_0x346507}=_0x48c60;switch(_0x2ab924[_0xe77e22(0x1ee)]&&this[_0xe77e22(0x197)][_0xe77e22(0x1c6)](_0x2ab924[_0xe77e22(0x1ee)]),_0x2ab924[_0xe77e22(0x1f5)]){case _0x170cad[_0xe77e22(0x217)]['Add']:break;case _0x170cad[_0xe77e22(0x217)][_0xe77e22(0x1fc)]:var _0x3e58e4,_0x44561d;this['_threadCommentModel']['addComment'](_0x1fa0d7,_0x346507,{'unitId':_0x1fa0d7,'subUnitId':_0x346507,'ref':'','id':_0x2ab924[_0xe77e22(0x1a5)],'dT':_0x5334bd(+_0x2ab924['createTimestamp']),'threadId':_0x2ab924[_0xe77e22(0x1ba)],'personId':(_0x3e58e4=(_0x44561d=_0x2ab924[_0xe77e22(0x1ee)])==null?void 0x0:_0x44561d[_0xe77e22(0x1ed)])==null?_0x2ab924[_0xe77e22(0x1e1)]:_0x3e58e4,'text':JSON[_0xe77e22(0x1c9)](_0x2ab924['content']),'parentId':_0x48c60['id']});break;case _0x170cad[_0xe77e22(0x217)]['Delete']:{let _0x4cbad0=this[_0xe77e22(0x1de)][_0xe77e22(0x1d3)](_0x1fa0d7,_0x346507,_0x2ab924[_0xe77e22(0x1a5)]);_0x4cbad0&&_0x4cbad0[_0xe77e22(0x1d8)]&&this[_0xe77e22(0x1de)][_0xe77e22(0x1bd)](_0x1fa0d7,_0x346507,_0x2ab924[_0xe77e22(0x1a5)]);break;}case _0x170cad['CommentUpdateEventType'][_0xe77e22(0x215)]:this['_threadCommentModel']['updateComment'](_0x1fa0d7,_0x346507,{'commentId':_0x2ab924['replyId'],'text':JSON[_0xe77e22(0x1c9)](_0x2ab924[_0xe77e22(0x202)])});break;case _0x170cad[_0xe77e22(0x217)][_0xe77e22(0x1c3)]:{var _0x5dc9d8;let _0x282912=(_0x5dc9d8=this[_0xe77e22(0x1de)]['getUnit'](_0x2ab924[_0xe77e22(0x1ab)])[_0xe77e22(0x1f9)](_0x26f6b4=>_0x26f6b4[_0xe77e22(0x1ba)]===_0x2ab924['threadId']))==null?void 0x0:_0x5dc9d8[_0xe77e22(0x1fb)];_0x282912&&this[_0xe77e22(0x1de)][_0xe77e22(0x1f3)](_0x1fa0d7,_0x346507,_0x282912['id'],_0x2ab924[_0xe77e22(0x1c5)]===_0x170cad[_0xe77e22(0x1c4)][_0xe77e22(0x1a8)]);break;}default:break;}}));}};_0x34c502=_0x1298ca([_0x2835f5(0x0,(0x0,_0x167b8c['Inject'])(_0x1e286d[_0x5bbe4d(0x194)])),_0x2835f5(0x1,(0x0,_0x167b8c[_0x5bbe4d(0x1af)])(_0x56668b['ThreadCommentModel'])),_0x2835f5(0x2,(0x0,_0x167b8c[_0x5bbe4d(0x1af)])(_0x167b8c['UserManagerService'])),_0x2835f5(0x3,(0x0,_0x167b8c['Inject'])(_0x167b8c[_0x5bbe4d(0x1c0)]))],_0x34c502);let _0x4e67e0={};function _0x42c65a(_0x1cb188,_0x2aac7e){const _0x38b8f6=_0x5bbe4d;let _0x4647e4=_0x1cb188['replies'][0x0];return{..._0x2aac7e,'id':_0x4647e4[_0x38b8f6(0x1a5)],'resolved':_0x1cb188[_0x38b8f6(0x1c5)]===0x1,'dT':_0x5334bd(_0x4647e4[_0x38b8f6(0x1e9)]),'personId':_0x4647e4[_0x38b8f6(0x1e1)],'threadId':_0x4647e4['threadId']};}function _0x430e62(_0x404857,_0x4302a8,_0x387cb8){const _0x7c09b9=_0x5bbe4d;var _0x46f5c6,_0x57075b;if(((_0x46f5c6=_0x404857==null||(_0x57075b=_0x404857[_0x7c09b9(0x1fa)])==null?void 0x0:_0x57075b[_0x7c09b9(0x18a)])==null?0x0:_0x46f5c6)>0x0){let _0x1ea18c=(_0x5305cd,_0x37b445)=>({'id':_0x5305cd[_0x7c09b9(0x1a5)],'threadId':_0x5305cd['threadId'],'dT':_0x5334bd(_0x5305cd['createTimestamp']),'personId':_0x5305cd['userId'],'resolved':_0x404857[_0x7c09b9(0x1c5)]===_0x170cad['CommentSolvedStatus'][_0x7c09b9(0x1a8)],'unitId':_0x4302a8,'subUnitId':_0x387cb8,'text':JSON[_0x7c09b9(0x1c9)](_0x5305cd[_0x7c09b9(0x202)]),'parentId':_0x37b445}),_0x425c54=_0x1ea18c(_0x404857['replies'][0x0]);return{..._0x425c54,'children':_0x404857[_0x7c09b9(0x1fa)][_0x7c09b9(0x216)](0x1)['map'](_0x34b6bf=>_0x1ea18c(_0x34b6bf,_0x425c54['id']))};}return null;}let _0x2202af=class{constructor(_0x2dca7f,_0x4abcfe,_0x5f37ba){const _0x196831=_0x5bbe4d;this['_httpService']=_0x2dca7f,this['_userService']=_0x4abcfe,this[_0x196831(0x20e)]=_0x5f37ba;}async[_0x5bbe4d(0x1ec)](_0x13654d){const _0x54a6af=_0x5bbe4d;var _0x3ff064,_0x4325bf;let {parentId:_0x4e7d17,unitId:_0x1f010a,text:_0x2479fb,threadId:_0x3a7ecf}=_0x13654d,_0x2179d6=(_0x3ff064=(_0x4325bf=_0x2479fb[_0x54a6af(0x1a4)])==null?void 0x0:_0x4325bf[_0x54a6af(0x191)](_0x34ec66=>_0x34ec66[_0x54a6af(0x1e7)]===_0x167b8c[_0x54a6af(0x1a9)][_0x54a6af(0x1e6)])[_0x54a6af(0x18e)](_0x30754d=>_0x30754d[_0x54a6af(0x1b3)]))==null?[]:_0x3ff064,_0x39fc29=JSON[_0x54a6af(0x1d4)](_0x2479fb),_0x45b3a4=(await this[_0x54a6af(0x20e)][_0x54a6af(0x1d2)](_0x1f010a))[_0x54a6af(0x1fd)]();if(_0x4e7d17){let _0x631967={'memberId':_0x45b3a4,'unitId':_0x1f010a,'content':_0x39fc29,'mention':_0x2179d6,'threadId':_0x3a7ecf},_0x43057b=(await this[_0x54a6af(0x1bf)]['post'](_0x54a6af(0x1d7)+_0x1f010a+_0x54a6af(0x1a0),{'body':_0x631967}))[_0x54a6af(0x1bb)][_0x54a6af(0x18b)];return{..._0x13654d,'id':_0x43057b[_0x54a6af(0x1a5)],'dT':(0x0,_0x167b8c['dateKit'])(+_0x43057b['createTimestamp'])[_0x54a6af(0x1b1)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x43057b[_0x54a6af(0x1e1)]};}else{let _0x1e59f4={'memberId':_0x45b3a4,'unitId':_0x1f010a,'content':_0x39fc29,'mention':_0x2179d6};return _0x42c65a((await this['_httpService']['post'](_0x54a6af(0x1d7)+_0x1f010a+_0x54a6af(0x1e4),{'body':_0x1e59f4}))[_0x54a6af(0x1bb)][_0x54a6af(0x1da)],_0x13654d);}}async[_0x5bbe4d(0x20a)](_0x1fe492){const _0x35ba2f=_0x5bbe4d;var _0x4d6617,_0xc0485d;let {text:_0x3df712,unitId:_0x55a6e1}=_0x1fe492,_0x54b400=(_0x4d6617=(_0xc0485d=_0x3df712[_0x35ba2f(0x1a4)])==null?void 0x0:_0xc0485d[_0x35ba2f(0x191)](_0x163a52=>_0x163a52[_0x35ba2f(0x1e7)]===_0x167b8c[_0x35ba2f(0x1a9)][_0x35ba2f(0x1e6)])[_0x35ba2f(0x18e)](_0x5ec655=>_0x5ec655[_0x35ba2f(0x1b3)]))==null?[]:_0x4d6617,_0x8a6db0=JSON[_0x35ba2f(0x1d4)](_0x3df712),_0x57ec25=_0x1fe492['threadId'],_0x2397fc=_0x1fe492['id'],_0x2fe2a4={'memberId':(await this['_sessionService'][_0x35ba2f(0x1d2)](_0x55a6e1))[_0x35ba2f(0x1fd)](),'unitId':_0x55a6e1,'threadId':_0x57ec25,'mention':_0x54b400,'content':_0x8a6db0,'replyId':_0x2397fc},_0x3d99f8=await this[_0x35ba2f(0x1bf)][_0x35ba2f(0x201)](_0x35ba2f(0x1d7)+_0x55a6e1+_0x35ba2f(0x1b2),{'body':_0x2fe2a4});return!_0x3d99f8[_0x35ba2f(0x1bb)][_0x35ba2f(0x18f)]||_0x3d99f8[_0x35ba2f(0x1bb)][_0x35ba2f(0x18f)][_0x35ba2f(0x1e2)]===0x1;}async[_0x5bbe4d(0x1f3)](_0x1f6884){const _0xb84b41=_0x5bbe4d;let {unitId:_0xf8b68d}=_0x1f6884,_0x284ef7=_0x1f6884[_0xb84b41(0x1ba)],_0xd7be3a={'memberId':this[_0xb84b41(0x197)]['getCurrentUser']()[_0xb84b41(0x1ed)],'unitId':_0xf8b68d,'threadId':_0x284ef7,'solved':_0x1f6884[_0xb84b41(0x214)]?_0x170cad[_0xb84b41(0x1c4)][_0xb84b41(0x1a8)]:_0x170cad[_0xb84b41(0x1c4)][_0xb84b41(0x1dd)]},_0x3ce759=await this[_0xb84b41(0x1bf)][_0xb84b41(0x201)](_0xb84b41(0x1d7)+_0xf8b68d+_0xb84b41(0x19e),{'body':_0xd7be3a});return!_0x3ce759[_0xb84b41(0x1bb)][_0xb84b41(0x18f)]||_0x3ce759['body'][_0xb84b41(0x18f)][_0xb84b41(0x1e2)]===0x1;}async[_0x5bbe4d(0x1bd)](_0x58c744,_0x45f51d,_0x518179,_0x1fbdd6){const _0xf6f3f5=_0x5bbe4d;let _0x4bff43={'memberId':(await this[_0xf6f3f5(0x20e)][_0xf6f3f5(0x1d2)](_0x58c744))[_0xf6f3f5(0x1fd)](),'threadId':_0x518179,'replyId':_0x1fbdd6,'unitId':_0x58c744},_0x5a18e5=await this[_0xf6f3f5(0x1bf)][_0xf6f3f5(0x201)](_0xf6f3f5(0x1d7)+_0x58c744+_0xf6f3f5(0x1ac),{'body':_0x4bff43});return!_0x5a18e5[_0xf6f3f5(0x1bb)][_0xf6f3f5(0x18f)]||_0x5a18e5[_0xf6f3f5(0x1bb)][_0xf6f3f5(0x18f)]['code']===0x1;}async[_0x5bbe4d(0x1f0)](_0x23f200,_0x250432,_0xf62163){const _0x450d78=_0x5bbe4d;let _0x425d2d={'unitId':_0x23f200,'threadId':_0xf62163},_0x136e33=await this[_0x450d78(0x1bf)][_0x450d78(0x201)]('/universer-api/comment/unit/'+_0x23f200+_0x450d78(0x1cb),{'body':_0x425d2d}),_0x3710f7=_0xf62163[_0x450d78(0x18e)](_0x56cae9=>_0x430e62(_0x136e33[_0x450d78(0x1bb)][_0x450d78(0x196)][_0x56cae9],_0x23f200,_0x250432))[_0x450d78(0x191)](Boolean);return Object['values'](_0x136e33[_0x450d78(0x1bb)][_0x450d78(0x1f7)])[_0x450d78(0x1d1)](_0x4804af=>{const _0x3bd3d4=_0x450d78;this[_0x3bd3d4(0x197)]['addUser'](_0x4804af);}),_0x3710f7;}[_0x5bbe4d(0x1db)](_0x5985fc){const _0x408294=_0x5bbe4d;return{'id':_0x5985fc['id'],'threadId':_0x5985fc[_0x408294(0x1ba)],'ref':_0x5985fc['ref']};}};_0x2202af=_0x1298ca([_0x2835f5(0x0,(0x0,_0x167b8c[_0x5bbe4d(0x1af)])(_0xc96851[_0x5bbe4d(0x19a)])),_0x2835f5(0x1,(0x0,_0x167b8c[_0x5bbe4d(0x1af)])(_0x167b8c[_0x5bbe4d(0x195)])),_0x2835f5(0x2,(0x0,_0x167b8c['Inject'])(_0x1e286d[_0x5bbe4d(0x1b8)]))],_0x2202af);let _0xd7add=class extends _0x167b8c[_0x5bbe4d(0x19b)]{constructor(_0x34a591,_0x1aff4d){const _0x2592e8=_0x5bbe4d;super(),this[_0x2592e8(0x1ff)]=_0x34a591,this[_0x2592e8(0x192)]=_0x1aff4d,this['_initDataSource']();}['_initDataSource'](){const _0x35c4b3=_0x5bbe4d;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x35c4b3(0x20b)]=!0x1;}};_0xd7add=_0x1298ca([_0x2835f5(0x0,_0x56668b['IThreadCommentDataSourceService']),_0x2835f5(0x1,(0x0,_0x167b8c['Inject'])(_0x2202af))],_0xd7add);function _0xc15ec7(_0x31c15a){'@babel/helpers - typeof';const _0x5d7ab6=_0x5bbe4d;return _0xc15ec7=typeof Symbol=='function'&&typeof Symbol['iterator']==_0x5d7ab6(0x1d0)?function(_0xff6d34){return typeof _0xff6d34;}:function(_0x5c3bab){const _0x7cd973=_0x5d7ab6;return _0x5c3bab&&typeof Symbol==_0x7cd973(0x20c)&&_0x5c3bab[_0x7cd973(0x1eb)]===Symbol&&_0x5c3bab!==Symbol['prototype']?'symbol':typeof _0x5c3bab;},_0xc15ec7(_0x31c15a);}function _0x15731a(_0x15e47e,_0x1659e1){const _0x3ee58e=_0x5bbe4d;if(_0xc15ec7(_0x15e47e)!=_0x3ee58e(0x1a6)||!_0x15e47e)return _0x15e47e;var _0x8be5a0=_0x15e47e[Symbol[_0x3ee58e(0x1f8)]];if(_0x8be5a0!==void 0x0){var _0x5b06b2=_0x8be5a0[_0x3ee58e(0x209)](_0x15e47e,_0x1659e1||_0x3ee58e(0x1ef));if(_0xc15ec7(_0x5b06b2)!=_0x3ee58e(0x1a6))return _0x5b06b2;throw TypeError(_0x3ee58e(0x212));}return(_0x1659e1==='string'?String:Number)(_0x15e47e);}function _0x5beac3(_0xddfa52){const _0x15a886=_0x5bbe4d;var _0x4f2081=_0x15731a(_0xddfa52,_0x15a886(0x1b7));return _0xc15ec7(_0x4f2081)==_0x15a886(0x1d0)?_0x4f2081:_0x4f2081+'';}function _0x8cc9d1(_0x4dd937,_0x2c5a3a,_0x30e981){const _0x5f3be6=_0x5bbe4d;return(_0x2c5a3a=_0x5beac3(_0x2c5a3a))in _0x4dd937?Object[_0x5f3be6(0x1c8)](_0x4dd937,_0x2c5a3a,{'value':_0x30e981,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4dd937[_0x2c5a3a]=_0x30e981,_0x4dd937;}let _0xc2687f=class extends _0x167b8c[_0x5bbe4d(0x1a2)]{constructor(_0x196392=_0x4e67e0,_0x59aa06,_0x26cd84){const _0x36706e=_0x5bbe4d;super(),this[_0x36706e(0x18d)]=_0x196392,this['_injector']=_0x59aa06,this['_configService']=_0x26cd84;let {..._0x2a0831}=(0x0,_0x167b8c['merge'])({},_0x4e67e0,this[_0x36706e(0x18d)]);this['_configService'][_0x36706e(0x190)](_0x36706e(0x19d),_0x2a0831);}['onStarting'](){const _0x3dcc3f=_0x5bbe4d;[[_0x2202af],[_0xd7add],[_0x34c502]][_0x3dcc3f(0x1d1)](_0xff7204=>{const _0x9fe92f=_0x3dcc3f;this[_0x9fe92f(0x211)][_0x9fe92f(0x1f6)](_0xff7204);});}[_0x5bbe4d(0x1e0)](){const _0x65b3aa=_0x5bbe4d;this[_0x65b3aa(0x211)][_0x65b3aa(0x1fe)](_0xd7add),this[_0x65b3aa(0x211)][_0x65b3aa(0x1fe)](_0x34c502);}};_0x8cc9d1(_0xc2687f,'pluginName',_0x5bbe4d(0x1ae)),_0x8cc9d1(_0xc2687f,_0x5bbe4d(0x1e3),_0x3aadc2),_0x8cc9d1(_0xc2687f,_0x5bbe4d(0x1d9),_0x2a402d),_0xc2687f=_0x1298ca([(0x0,_0x167b8c[_0x5bbe4d(0x1be)])(_0x5d4934['UniverThreadCommentUIPlugin'],_0x1e286d[_0x5bbe4d(0x208)],_0x394f11[_0x5bbe4d(0x1cf)]),_0x2835f5(0x1,(0x0,_0x167b8c[_0x5bbe4d(0x1af)])(_0x167b8c[_0x5bbe4d(0x1c0)])),_0x2835f5(0x2,_0x167b8c[_0x5bbe4d(0x205)])],_0xc2687f),Object[_0x5bbe4d(0x1c8)](_0x1a6df6,_0x5bbe4d(0x1ce),{'enumerable':!0x0,'get':function(){return _0xc2687f;}});}));function _0x40eb(_0x4c8a25,_0x878200){_0x4c8a25=_0x4c8a25-0x18a;const _0x275b3b=_0x275b();let _0x40ebaa=_0x275b3b[_0x4c8a25];return _0x40ebaa;}function _0x275b(){const _0x14095c=['saveCommentToSnapshot','241472qpCOAO','OpenOrReOpen','_threadCommentModel','2503010JYjUgW','onReady','userId','code','packageName','/add','@univerjs/network','COMMENT','rangeType','1.0.0-alpha.0','createTimestamp','Module','constructor','addComment','userID','user','default','listComments','@univerjs/thread-comment','2324jCGbTX','resolveComment','getOwnPropertyDescriptor','type','add','users','toPrimitive','find','replies','root','Reply','getMemberID','get','_threadCommentDataSourceService','UniverProThreadCommentDatasource','post','content','@univerjs/protocol','7150576wfczts','IConfigService','640245bYKVIz','_commentService','UniverCollaborationClientPlugin','call','updateComment','syncUpdateMutationToColla','function','getUnit','_sessionService','getUser','exports','_injector','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','260iZTQQx','resolved','Edit','slice','CommentUpdateEventType','length','reply','UniverProCollaborationClient','_config','map','error','setConfig','filter','_threadCommentDataSource','disposeWithMe','CommentService','UserManagerService','comments','_userService','UniverProLicense','349013lNUfTE','HTTPService','Disposable','toStringTag','thread-comment-data-source.config','/solved','pipe','/reply','@univerjs/core','Plugin','delete','customRanges','replyId','object','261XsWZir','Solved','CustomRangeType','8WKPXFA','unitId','/delete','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Inject','bufferTime','format','/edit','rangeId','@univerjs-pro/collaboration-client','personId','payload','string','CollaborationSessionService','UniverCore','threadId','body','_init','deleteComment','DependentOn','_httpService','Injector','commentUpdate$','_initUserSync','Solve','CommentSolvedStatus','solved','addUser','rxjs','defineProperty','parse','@univerjs-pro/license','/list','12IwAnHo','1503891AJwnmF','UniverThreadCommentDataSourcePlugin','UniverLicensePlugin','symbol','forEach','requireSession','getComment','stringify','UniverNetwork','/universer-api/user/list','/universer-api/comment/unit/','parentId','version','comment'];_0x275b=function(){return _0x14095c;};return _0x275b();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.25.0-insiders.20260623-012b5a8",
3
+ "version": "1.0.0-alpha.0",
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,19 +51,19 @@
51
51
  "rxjs": ">=7.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "@univerjs-pro/collaboration-client": "0.25.0-insiders.20260623-012b5a8",
55
- "@univerjs-pro/license": "0.25.0-insiders.20260623-012b5a8",
56
- "@univerjs/core": "0.25.0-insiders.20260623-012b5a8",
57
- "@univerjs/protocol": "0.25.0-insiders.20260623-012b5a8",
58
- "@univerjs/thread-comment": "0.25.0-insiders.20260623-012b5a8",
59
- "@univerjs/thread-comment-ui": "0.25.0-insiders.20260623-012b5a8",
60
- "@univerjs/network": "0.25.0-insiders.20260623-012b5a8"
54
+ "@univerjs-pro/collaboration-client": "1.0.0-alpha.0",
55
+ "@univerjs-pro/license": "1.0.0-alpha.0",
56
+ "@univerjs/core": "1.0.0-alpha.0",
57
+ "@univerjs/protocol": "1.0.0-alpha.0",
58
+ "@univerjs/thread-comment": "1.0.0-alpha.0",
59
+ "@univerjs/thread-comment-ui": "1.0.0-alpha.0",
60
+ "@univerjs/network": "1.0.0-alpha.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "rxjs": "7.8.2",
64
64
  "typescript": "^6.0.3",
65
65
  "vitest": "^4.1.9",
66
- "@univerjs-infra/shared": "0.25.0"
66
+ "@univerjs-infra/shared": "1.0.0-alpha.0"
67
67
  },
68
68
  "scripts": {
69
69
  "test": "vitest run",