@univerjs-pro/thread-comment-datasource 0.10.12-nightly.202510221114 → 0.10.12-nightly.202510251119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x1decc9=_0x4465;(function(_0x1c8927,_0x12226a){const _0x476008=_0x4465,_0x381ab7=_0x1c8927();while(!![]){try{const _0x24bac1=-parseInt(_0x476008(0x1bd))/0x1*(parseInt(_0x476008(0x165))/0x2)+parseInt(_0x476008(0x1a0))/0x3+parseInt(_0x476008(0x1ad))/0x4+parseInt(_0x476008(0x174))/0x5*(parseInt(_0x476008(0x1b4))/0x6)+-parseInt(_0x476008(0x18b))/0x7*(parseInt(_0x476008(0x1ce))/0x8)+-parseInt(_0x476008(0x18f))/0x9+parseInt(_0x476008(0x1a9))/0xa;if(_0x24bac1===_0x12226a)break;else _0x381ab7['push'](_0x381ab7['shift']());}catch(_0x5331a2){_0x381ab7['push'](_0x381ab7['shift']());}}}(_0x316b,0x7a51c));Object[_0x1decc9(0x16e)](exports,Symbol[_0x1decc9(0x1ca)],{'value':_0x1decc9(0x1ab)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1decc9(0x1bf);var I=(_0x17efd0=>(_0x17efd0[_0x17efd0[_0x1decc9(0x189)]=0x0]=_0x1decc9(0x189),_0x17efd0[_0x17efd0[_0x1decc9(0x1b5)]=0x1]=_0x1decc9(0x1b5),_0x17efd0[_0x17efd0[_0x1decc9(0x17e)]=-0x1]=_0x1decc9(0x17e),_0x17efd0))(I||{}),v=(_0x591815=>(_0x591815[_0x591815[_0x1decc9(0x18a)]=0x0]=_0x1decc9(0x18a),_0x591815[_0x591815['Add']=0x1]=_0x1decc9(0x1a7),_0x591815[_0x591815['Reply']=0x2]=_0x1decc9(0x173),_0x591815[_0x591815[_0x1decc9(0x1af)]=0x3]=_0x1decc9(0x1af),_0x591815[_0x591815[_0x1decc9(0x1d1)]=0x4]=_0x1decc9(0x1d1),_0x591815[_0x591815['Solve']=0x5]=_0x1decc9(0x19d),_0x591815[_0x591815[_0x1decc9(0x17e)]=-0x1]=_0x1decc9(0x17e),_0x591815))(v||{});const f=_0x35160d=>c[_0x1decc9(0x184)](new Date(+_0x35160d))[_0x1decc9(0x187)](_0x1decc9(0x1b2)),R=async(_0x2a61c8,_0x462c76)=>{const _0x466644=_0x1decc9,_0x112b49=_0x2a61c8[_0x466644(0x1b9)](c['UserManagerService']),_0x2dbdb2=_0x2a61c8[_0x466644(0x1b9)](P[_0x466644(0x1a3)]);_0x462c76[_0x466644(0x175)](_0x949069=>{const _0x5e480e=_0x466644;_0x112b49[_0x5e480e(0x1cb)](_0x949069)&&_0x462c76[_0x5e480e(0x15f)](_0x949069);}),_0x462c76['size']&&(await _0x2dbdb2[_0x466644(0x1b9)](_0x466644(0x188),{'params':{'userIDs':[..._0x462c76]}}))['body'][_0x466644(0x196)]['forEach'](_0x15ade7=>{const _0x538c9a=_0x466644;_0x15ade7&&_0x112b49[_0x538c9a(0x1c9)](_0x15ade7);});};var $=Object[_0x1decc9(0x1a5)],E=(_0x8ddf49,_0x1471b8,_0x56636a,_0x4e07a8)=>{for(var _0x287152=_0x4e07a8>0x1?void 0x0:_0x4e07a8?$(_0x1471b8,_0x56636a):_0x1471b8,_0x343704=_0x8ddf49['length']-0x1,_0x13b356;_0x343704>=0x0;_0x343704--)(_0x13b356=_0x8ddf49[_0x343704])&&(_0x287152=_0x13b356(_0x287152)||_0x287152);return _0x287152;},S=(_0xe3f195,_0x5402d9)=>(_0x120955,_0x572e9f)=>_0x5402d9(_0x120955,_0x572e9f,_0xe3f195);let _=class extends c[_0x1decc9(0x1c3)]{constructor(_0x1dfc85,_0xe92dfa,_0x40752b,_0x5ae8d2){const _0x48e68d=_0x1decc9;super(),this[_0x48e68d(0x1c6)]=_0x1dfc85,this[_0x48e68d(0x1c1)]=_0xe92dfa,this[_0x48e68d(0x193)]=_0x40752b,this[_0x48e68d(0x178)]=_0x5ae8d2,this[_0x48e68d(0x1b1)](),this['_initUserSync']();}[_0x1decc9(0x15e)](){const _0x356d7e=_0x1decc9;this['disposeWithMe'](this[_0x356d7e(0x1c1)][_0x356d7e(0x1c2)][_0x356d7e(0x16b)](j[_0x356d7e(0x19c)](0x10))[_0x356d7e(0x199)](_0x271c14=>{const _0x57419e=_0x356d7e,_0x13a863=new Set();_0x271c14[_0x57419e(0x175)](_0x2cd80a=>{const _0x35d3b6=_0x57419e;switch(_0x2cd80a[_0x35d3b6(0x1cf)]){case _0x35d3b6(0x1a2):{const _0x24faed=_0x2cd80a[_0x35d3b6(0x195)][_0x35d3b6(0x194)];_0x13a863['add'](_0x24faed);break;}}}),R(this[_0x57419e(0x178)],_0x13a863);}));}[_0x1decc9(0x1b1)](){const _0x5541b6=_0x1decc9;this['disposeWithMe'](this[_0x5541b6(0x1c6)][_0x5541b6(0x1c2)][_0x5541b6(0x199)](async _0x3980ed=>{const _0x4814a6=_0x5541b6;var _0x495b67,_0x1b5c96,_0xfb206c,_0x3917fa;const _0x1078a8=(_0x495b67=this[_0x4814a6(0x1c1)]['getUnit'](_0x3980ed[_0x4814a6(0x16f)])[_0x4814a6(0x171)](_0x3507b3=>_0x3507b3[_0x4814a6(0x1b0)]===_0x3980ed[_0x4814a6(0x1b0)]))==null?void 0x0:_0x495b67[_0x4814a6(0x16d)];if(!_0x1078a8)return;const {unitId:_0x6dad42,subUnitId:_0x1f801e}=_0x1078a8;switch(_0x3980ed[_0x4814a6(0x1a6)]&&this[_0x4814a6(0x193)][_0x4814a6(0x1c9)](_0x3980ed[_0x4814a6(0x1a6)]),_0x3980ed[_0x4814a6(0x1cf)]){case v[_0x4814a6(0x1a7)]:break;case v[_0x4814a6(0x173)]:{this['_threadCommentModel'][_0x4814a6(0x17d)](_0x6dad42,_0x1f801e,{'unitId':_0x6dad42,'subUnitId':_0x1f801e,'ref':'','id':_0x3980ed[_0x4814a6(0x1c4)],'dT':f(+_0x3980ed['createTimestamp']),'threadId':_0x3980ed[_0x4814a6(0x1b0)],'personId':(_0xfb206c=(_0x1b5c96=_0x3980ed[_0x4814a6(0x1a6)])==null?void 0x0:_0x1b5c96[_0x4814a6(0x164)])!=null?_0xfb206c:_0x3980ed['userId'],'text':JSON['parse'](_0x3980ed[_0x4814a6(0x1cc)]),'parentId':_0x1078a8['id']});break;}case v[_0x4814a6(0x1d1)]:{const _0x5899af=this['_threadCommentModel'][_0x4814a6(0x17c)](_0x6dad42,_0x1f801e,_0x3980ed[_0x4814a6(0x1c4)]);_0x5899af&&_0x5899af['parentId']&&this[_0x4814a6(0x1c1)][_0x4814a6(0x170)](_0x6dad42,_0x1f801e,_0x3980ed[_0x4814a6(0x1c4)]);break;}case v['Edit']:{this[_0x4814a6(0x1c1)][_0x4814a6(0x163)](_0x6dad42,_0x1f801e,{'commentId':_0x3980ed[_0x4814a6(0x1c4)],'text':JSON[_0x4814a6(0x17b)](_0x3980ed['content'])});break;}case v['Solve']:{const _0x23a30b=(_0x3917fa=this[_0x4814a6(0x1c1)][_0x4814a6(0x1c8)](_0x3980ed[_0x4814a6(0x16f)])[_0x4814a6(0x171)](_0x25e557=>_0x25e557[_0x4814a6(0x1b0)]===_0x3980ed[_0x4814a6(0x1b0)]))==null?void 0x0:_0x3917fa[_0x4814a6(0x16d)];_0x23a30b&&this[_0x4814a6(0x1c1)][_0x4814a6(0x161)](_0x6dad42,_0x1f801e,_0x23a30b['id'],_0x3980ed[_0x4814a6(0x186)]===I[_0x4814a6(0x1b5)]);break;}}}));}};_=E([S(0x0,c[_0x1decc9(0x18d)](b[_0x1decc9(0x168)])),S(0x1,c[_0x1decc9(0x18d)](M[_0x1decc9(0x1d4)])),S(0x2,c[_0x1decc9(0x18d)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x1decc9(0x15a)]))],_);const q=_0x1decc9(0x19f),D={};function _0x316b(){const _0x24848c=['12360460ZrgiOu','_httpService','Module','values','2225612mGNYbB','Plugin','Edit','threadId','_init','YYYY/MM/DD\x20HH:mm','post','6IHdedR','Solved','saveCommentToSnapshot','UniverInstanceType','dataSource','get','reply','getMemberID','UniverLicensePlugin','227EQJNsP','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','_threadCommentModel','commentUpdate$','Disposable','replyId','CollaborationSessionService','_commentService','_threadCommentDataSourceService','getUnit','addUser','toStringTag','getUser','content','_sessionService','8GRSHlq','type','requireSession','Delete','comment','DependentOn','ThreadCommentModel','Injector','_config','customRanges','_initDataSource','_initUserSync','delete','body','resolveComment','map','updateComment','userID','4366RlMiEk','UniverThreadCommentDataSourcePlugin','pluginName','CommentService','listComments','code','pipe','onStarting','root','defineProperty','unitId','deleteComment','find','filter','Reply','1663345kvHXGq','forEach','error','/reply','_injector','onReady','/edit','parse','getComment','addComment','UNRECOGNIZED','syncUpdateMutationToColla','rangeType','rangeId','/delete','merge','dayjs','stringify','solved','format','/universer-api/user/list','OpenOrReOpen','Unknown','5906943olbJLw','slice','Inject','COMMENT','8668242xqUtCq','UNIVER_UNKNOWN','createTimestamp','CustomRangeType','_userService','personId','payload','users','/universer-api/comment/unit/','userId','subscribe','_configService','getCurrentUser','bufferTime','Solve','IConfigService','thread-comment-data-source.config','2035290mnxXuS','replies','add','HTTPService','UniverCollaborationClientPlugin','getOwnPropertyDescriptor','user','Add','/list'];_0x316b=function(){return _0x24848c;};return _0x316b();}var A=Object[_0x1decc9(0x1a5)],x=(_0x247ba1,_0x1b0436,_0x5321ab,_0x48ba14)=>{const _0x3eebcc=_0x1decc9;for(var _0x325f33=_0x48ba14>0x1?void 0x0:_0x48ba14?A(_0x1b0436,_0x5321ab):_0x1b0436,_0x3a3a74=_0x247ba1[_0x3eebcc(0x1c0)]-0x1,_0x57bf38;_0x3a3a74>=0x0;_0x3a3a74--)(_0x57bf38=_0x247ba1[_0x3a3a74])&&(_0x325f33=_0x57bf38(_0x325f33)||_0x325f33);return _0x325f33;},C=(_0x2291ba,_0xbc0e7)=>(_0x264a6f,_0x2584e6)=>_0xbc0e7(_0x264a6f,_0x2584e6,_0x2291ba);function Y(_0x4d6178,_0x42eed3){const _0x5e870d=_0x1decc9,_0x587053=_0x4d6178[_0x5e870d(0x1a1)][0x0];return{..._0x42eed3,'id':_0x587053[_0x5e870d(0x1c4)],'resolved':_0x4d6178[_0x5e870d(0x186)]===0x1,'dT':f(_0x587053[_0x5e870d(0x191)]),'personId':_0x587053[_0x5e870d(0x198)],'threadId':_0x587053[_0x5e870d(0x1b0)]};}function G(_0x576417,_0xd8f498,_0x367030){const _0x39efc0=_0x1decc9;var _0x3d055b,_0x5f4c20;if(((_0x5f4c20=(_0x3d055b=_0x576417==null?void 0x0:_0x576417[_0x39efc0(0x1a1)])==null?void 0x0:_0x3d055b[_0x39efc0(0x1c0)])!=null?_0x5f4c20:0x0)>0x0){const _0x570c49=(_0x3c3a33,_0x5a0020)=>({'id':_0x3c3a33[_0x39efc0(0x1c4)],'threadId':_0x3c3a33[_0x39efc0(0x1b0)],'dT':f(_0x3c3a33[_0x39efc0(0x191)]),'personId':_0x3c3a33[_0x39efc0(0x198)],'resolved':_0x576417[_0x39efc0(0x186)]===I[_0x39efc0(0x1b5)],'unitId':_0xd8f498,'subUnitId':_0x367030,'text':JSON[_0x39efc0(0x17b)](_0x3c3a33[_0x39efc0(0x1cc)]),'parentId':_0x5a0020}),_0x37c71c=_0x570c49(_0x576417['replies'][0x0]);return{..._0x37c71c,'children':_0x576417[_0x39efc0(0x1a1)][_0x39efc0(0x18c)](0x1)[_0x39efc0(0x162)](_0x578ca3=>_0x570c49(_0x578ca3,_0x37c71c['id']))};}return null;}let p=class{constructor(_0x1911cb,_0x345b9a,_0x2a173b){const _0x486096=_0x1decc9;this['_httpService']=_0x1911cb,this[_0x486096(0x193)]=_0x345b9a,this[_0x486096(0x1cd)]=_0x2a173b;}async[_0x1decc9(0x17d)](_0x40f00f){const _0x3030c1=_0x1decc9;var _0x613f3,_0x22a790;const {parentId:_0x43f3c6,unitId:_0x4ddef4,text:_0x4f7598,threadId:_0x23b6c7}=_0x40f00f,_0x15a1a2=(_0x22a790=(_0x613f3=_0x4f7598[_0x3030c1(0x15c)])==null?void 0x0:_0x613f3[_0x3030c1(0x172)](_0x4e5d9a=>_0x4e5d9a['rangeType']===c['CustomRangeType']['COMMENT'])[_0x3030c1(0x162)](_0x118447=>_0x118447[_0x3030c1(0x181)]))!=null?_0x22a790:[],_0x3e3828=JSON[_0x3030c1(0x185)](_0x4f7598),_0xd8f07b=(await this[_0x3030c1(0x1cd)][_0x3030c1(0x1d0)](_0x4ddef4))['getMemberID']();if(_0x43f3c6){const _0x1990a8={'memberId':_0xd8f07b,'unitId':_0x4ddef4,'content':_0x3e3828,'mention':_0x15a1a2,'threadId':_0x23b6c7},_0x3ef836=(await this['_httpService']['post'](_0x3030c1(0x197)+_0x4ddef4+_0x3030c1(0x177),{'body':_0x1990a8}))[_0x3030c1(0x160)][_0x3030c1(0x1ba)];return{..._0x40f00f,'id':_0x3ef836[_0x3030c1(0x1c4)],'dT':c[_0x3030c1(0x184)](+_0x3ef836[_0x3030c1(0x191)])[_0x3030c1(0x187)](_0x3030c1(0x1b2)),'personId':_0x3ef836[_0x3030c1(0x198)]};}else{const _0x1054f5={'memberId':_0xd8f07b,'unitId':_0x4ddef4,'content':_0x3e3828,'mention':_0x15a1a2},_0x13a0a9=await this[_0x3030c1(0x1aa)]['post']('/universer-api/comment/unit/'+_0x4ddef4+'/add',{'body':_0x1054f5});return Y(_0x13a0a9['body'][_0x3030c1(0x1d2)],_0x40f00f);}}async[_0x1decc9(0x163)](_0x1644e5){const _0x1ad13e=_0x1decc9;var _0x545e31,_0xda0e14;const {text:_0x290cb6,unitId:_0xed0da9}=_0x1644e5,_0x4cafaf=(_0xda0e14=(_0x545e31=_0x290cb6[_0x1ad13e(0x15c)])==null?void 0x0:_0x545e31[_0x1ad13e(0x172)](_0x11498b=>_0x11498b[_0x1ad13e(0x180)]===c[_0x1ad13e(0x192)][_0x1ad13e(0x18e)])[_0x1ad13e(0x162)](_0x143c82=>_0x143c82[_0x1ad13e(0x181)]))!=null?_0xda0e14:[],_0x1aa1cd=JSON[_0x1ad13e(0x185)](_0x290cb6),_0x6fb97e=_0x1644e5[_0x1ad13e(0x1b0)],_0x3c72c5=_0x1644e5['id'],_0x2ff56b={'memberId':(await this[_0x1ad13e(0x1cd)]['requireSession'](_0xed0da9))[_0x1ad13e(0x1bb)](),'unitId':_0xed0da9,'threadId':_0x6fb97e,'mention':_0x4cafaf,'content':_0x1aa1cd,'replyId':_0x3c72c5},_0x195a1e=await this['_httpService'][_0x1ad13e(0x1b3)]('/universer-api/comment/unit/'+_0xed0da9+_0x1ad13e(0x17a),{'body':_0x2ff56b});return!_0x195a1e[_0x1ad13e(0x160)][_0x1ad13e(0x176)]||_0x195a1e[_0x1ad13e(0x160)][_0x1ad13e(0x176)][_0x1ad13e(0x16a)]===0x1;}async[_0x1decc9(0x161)](_0x581d10){const _0x190b29=_0x1decc9,{unitId:_0x18c5e4}=_0x581d10,_0x95faa4=_0x581d10['threadId'],_0x33ea9f={'memberId':this['_userService'][_0x190b29(0x19b)]()[_0x190b29(0x164)],'unitId':_0x18c5e4,'threadId':_0x95faa4,'solved':_0x581d10['resolved']?I[_0x190b29(0x1b5)]:I[_0x190b29(0x189)]},_0x50ac0f=await this[_0x190b29(0x1aa)]['post'](_0x190b29(0x197)+_0x18c5e4+'/solved',{'body':_0x33ea9f});return!_0x50ac0f[_0x190b29(0x160)]['error']||_0x50ac0f[_0x190b29(0x160)][_0x190b29(0x176)][_0x190b29(0x16a)]===0x1;}async['deleteComment'](_0x189228,_0x4c1684,_0x53d84e,_0x5a4adf){const _0x4a3128=_0x1decc9,_0x4db3d9={'memberId':(await this['_sessionService'][_0x4a3128(0x1d0)](_0x189228))[_0x4a3128(0x1bb)](),'threadId':_0x53d84e,'replyId':_0x5a4adf,'unitId':_0x189228},_0x207588=await this[_0x4a3128(0x1aa)][_0x4a3128(0x1b3)](_0x4a3128(0x197)+_0x189228+_0x4a3128(0x182),{'body':_0x4db3d9});return!_0x207588[_0x4a3128(0x160)]['error']||_0x207588['body'][_0x4a3128(0x176)][_0x4a3128(0x16a)]===0x1;}async[_0x1decc9(0x169)](_0x392246,_0x20bad9,_0x4261dd){const _0x3dc19d=_0x1decc9,_0x46c8f6={'unitId':_0x392246,'threadId':_0x4261dd},_0x37fb6a=await this[_0x3dc19d(0x1aa)][_0x3dc19d(0x1b3)](_0x3dc19d(0x197)+_0x392246+_0x3dc19d(0x1a8),{'body':_0x46c8f6}),_0x1eb37e=_0x4261dd['map'](_0x43d4d3=>G(_0x37fb6a[_0x3dc19d(0x160)]['comments'][_0x43d4d3],_0x392246,_0x20bad9))[_0x3dc19d(0x172)](Boolean);return Object[_0x3dc19d(0x1ac)](_0x37fb6a[_0x3dc19d(0x160)][_0x3dc19d(0x196)])[_0x3dc19d(0x175)](_0x72c12c=>{const _0x312e0d=_0x3dc19d;this[_0x312e0d(0x193)][_0x312e0d(0x1c9)](_0x72c12c);}),_0x1eb37e;}[_0x1decc9(0x1b6)](_0xf73a52){return{'id':_0xf73a52['id'],'threadId':_0xf73a52['threadId'],'ref':_0xf73a52['ref']};}};p=x([C(0x0,c[_0x1decc9(0x18d)](P[_0x1decc9(0x1a3)])),C(0x1,c[_0x1decc9(0x18d)](c['UserManagerService'])),C(0x2,c[_0x1decc9(0x18d)](b[_0x1decc9(0x1c5)]))],p);var H=Object[_0x1decc9(0x1a5)],J=(_0x2f793a,_0x174c75,_0x432031,_0x30ed3c)=>{const _0x35cf91=_0x1decc9;for(var _0x20b262=_0x30ed3c>0x1?void 0x0:_0x30ed3c?H(_0x174c75,_0x432031):_0x174c75,_0x1be4f4=_0x2f793a[_0x35cf91(0x1c0)]-0x1,_0x3d42d3;_0x1be4f4>=0x0;_0x1be4f4--)(_0x3d42d3=_0x2f793a[_0x1be4f4])&&(_0x20b262=_0x3d42d3(_0x20b262)||_0x20b262);return _0x20b262;},y=(_0x393315,_0x1d09a3)=>(_0x49642d,_0x5121d0)=>_0x1d09a3(_0x49642d,_0x5121d0,_0x393315);let g=class extends c[_0x1decc9(0x1c3)]{constructor(_0x3e7e1f,_0x40beff){const _0x3f0ea9=_0x1decc9;super(),this['_threadCommentDataSourceService']=_0x3e7e1f,this[_0x3f0ea9(0x1be)]=_0x40beff,this['_initDataSource']();}[_0x1decc9(0x15d)](){const _0x19c253=_0x1decc9;this[_0x19c253(0x1c7)][_0x19c253(0x1b8)]=this['_threadCommentDataSource'],this[_0x19c253(0x1c7)][_0x19c253(0x17f)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x1decc9(0x16e)],L=Object[_0x1decc9(0x1a5)],Z=(_0x2fd275,_0x188937,_0x308a36)=>_0x188937 in _0x2fd275?F(_0x2fd275,_0x188937,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x308a36}):_0x2fd275[_0x188937]=_0x308a36,W=(_0x2f9529,_0x3f62d6,_0x54595e,_0x297784)=>{const _0x405c57=_0x1decc9;for(var _0x224c63=_0x297784>0x1?void 0x0:_0x297784?L(_0x3f62d6,_0x54595e):_0x3f62d6,_0x3d1376=_0x2f9529[_0x405c57(0x1c0)]-0x1,_0x5ed265;_0x3d1376>=0x0;_0x3d1376--)(_0x5ed265=_0x2f9529[_0x3d1376])&&(_0x224c63=_0x5ed265(_0x224c63)||_0x224c63);return _0x224c63;},O=(_0x4fc87c,_0x4cb66f)=>(_0x51e7bb,_0x1b94d5)=>_0x4cb66f(_0x51e7bb,_0x1b94d5,_0x4fc87c),N=(_0x591cc4,_0x23ea1e,_0x678568)=>Z(_0x591cc4,typeof _0x23ea1e!='symbol'?_0x23ea1e+'':_0x23ea1e,_0x678568);function _0x4465(_0x1320a0,_0x428e22){const _0x316b48=_0x316b();return _0x4465=function(_0x4465de,_0x25a734){_0x4465de=_0x4465de-0x15a;let _0x51235e=_0x316b48[_0x4465de];return _0x51235e;},_0x4465(_0x1320a0,_0x428e22);}exports[_0x1decc9(0x166)]=class extends c[_0x1decc9(0x1ae)]{constructor(_0x167d55=D,_0x31c17d,_0x3c8414){const _0x409d65=_0x1decc9;super(),this[_0x409d65(0x15b)]=_0x167d55,this['_injector']=_0x31c17d,this[_0x409d65(0x19a)]=_0x3c8414;const {..._0x4c1ac0}=c[_0x409d65(0x183)]({},D,this['_config']);this[_0x409d65(0x19a)]['setConfig'](q,_0x4c1ac0);}[_0x1decc9(0x16c)](){const _0x598739=_0x1decc9;[[p],[g],[_]][_0x598739(0x175)](_0x270159=>{const _0x30fa0b=_0x598739;this[_0x30fa0b(0x178)][_0x30fa0b(0x1a2)](_0x270159);});}[_0x1decc9(0x179)](){const _0x2c42c8=_0x1decc9;this[_0x2c42c8(0x178)][_0x2c42c8(0x1b9)](g),this[_0x2c42c8(0x178)][_0x2c42c8(0x1b9)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1decc9(0x167),U),N(exports[_0x1decc9(0x166)],'type',c[_0x1decc9(0x1b7)][_0x1decc9(0x190)]),exports[_0x1decc9(0x166)]=W([c[_0x1decc9(0x1d3)](w['UniverThreadCommentUIPlugin'],b[_0x1decc9(0x1a4)],T[_0x1decc9(0x1bc)]),O(0x1,c[_0x1decc9(0x18d)](c[_0x1decc9(0x15a)])),O(0x2,c[_0x1decc9(0x19e)])],exports[_0x1decc9(0x166)]);
1
+ 'use strict';const _0x4a9a54=_0x13fa;(function(_0x2ef9e8,_0x4c4b0d){const _0x3ff78d=_0x13fa,_0x227fb1=_0x2ef9e8();while(!![]){try{const _0x1885a2=parseInt(_0x3ff78d(0x1d1))/0x1+-parseInt(_0x3ff78d(0x1f7))/0x2*(-parseInt(_0x3ff78d(0x208))/0x3)+parseInt(_0x3ff78d(0x202))/0x4*(parseInt(_0x3ff78d(0x1e4))/0x5)+-parseInt(_0x3ff78d(0x219))/0x6+parseInt(_0x3ff78d(0x209))/0x7+parseInt(_0x3ff78d(0x1e9))/0x8+-parseInt(_0x3ff78d(0x22e))/0x9;if(_0x1885a2===_0x4c4b0d)break;else _0x227fb1['push'](_0x227fb1['shift']());}catch(_0x273ef0){_0x227fb1['push'](_0x227fb1['shift']());}}}(_0x50ee,0x59a59));function _0x13fa(_0x1979b7,_0x1bfe10){const _0x50eef6=_0x50ee();return _0x13fa=function(_0x13faa9,_0x45481f){_0x13faa9=_0x13faa9-0x1c3;let _0x29d4e9=_0x50eef6[_0x13faa9];return _0x29d4e9;},_0x13fa(_0x1979b7,_0x1bfe10);}Object[_0x4a9a54(0x230)](exports,Symbol[_0x4a9a54(0x221)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4a9a54(0x21e);var I=(_0x209ae6=>(_0x209ae6[_0x209ae6[_0x4a9a54(0x229)]=0x0]=_0x4a9a54(0x229),_0x209ae6[_0x209ae6[_0x4a9a54(0x222)]=0x1]=_0x4a9a54(0x222),_0x209ae6[_0x209ae6['UNRECOGNIZED']=-0x1]=_0x4a9a54(0x1f5),_0x209ae6))(I||{}),v=(_0x3643db=>(_0x3643db[_0x3643db[_0x4a9a54(0x1fa)]=0x0]=_0x4a9a54(0x1fa),_0x3643db[_0x3643db[_0x4a9a54(0x1f0)]=0x1]=_0x4a9a54(0x1f0),_0x3643db[_0x3643db['Reply']=0x2]=_0x4a9a54(0x238),_0x3643db[_0x3643db[_0x4a9a54(0x203)]=0x3]='Edit',_0x3643db[_0x3643db[_0x4a9a54(0x213)]=0x4]=_0x4a9a54(0x213),_0x3643db[_0x3643db[_0x4a9a54(0x1d5)]=0x5]=_0x4a9a54(0x1d5),_0x3643db[_0x3643db[_0x4a9a54(0x1f5)]=-0x1]='UNRECOGNIZED',_0x3643db))(v||{});const f=_0x5cb21b=>c[_0x4a9a54(0x1c8)](new Date(+_0x5cb21b))[_0x4a9a54(0x20a)](_0x4a9a54(0x223)),R=async(_0x45e7d3,_0x3c4498)=>{const _0x55fbd0=_0x4a9a54,_0x2686c5=_0x45e7d3['get'](c['UserManagerService']),_0x322d3c=_0x45e7d3[_0x55fbd0(0x218)](P[_0x55fbd0(0x1ed)]);_0x3c4498[_0x55fbd0(0x22c)](_0x1cef8a=>{const _0x3725b3=_0x55fbd0;_0x2686c5['getUser'](_0x1cef8a)&&_0x3c4498[_0x3725b3(0x215)](_0x1cef8a);}),_0x3c4498['size']&&(await _0x322d3c[_0x55fbd0(0x218)](_0x55fbd0(0x234),{'params':{'userIDs':[..._0x3c4498]}}))[_0x55fbd0(0x1da)]['users']['forEach'](_0xae2b1f=>{const _0x2c57ca=_0x55fbd0;_0xae2b1f&&_0x2686c5[_0x2c57ca(0x20e)](_0xae2b1f);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x512964,_0x39768f,_0x4dda2b,_0x2ad907)=>{for(var _0x5e44a8=_0x2ad907>0x1?void 0x0:_0x2ad907?$(_0x39768f,_0x4dda2b):_0x39768f,_0x220350=_0x512964['length']-0x1,_0x232a00;_0x220350>=0x0;_0x220350--)(_0x232a00=_0x512964[_0x220350])&&(_0x5e44a8=_0x232a00(_0x5e44a8)||_0x5e44a8);return _0x5e44a8;},S=(_0x1340de,_0x50b041)=>(_0x5a1cfa,_0x1391dc)=>_0x50b041(_0x5a1cfa,_0x1391dc,_0x1340de);let _=class extends c[_0x4a9a54(0x210)]{constructor(_0x399823,_0x2fe3e8,_0x241e4b,_0x2ca313){const _0x57f83e=_0x4a9a54;super(),this[_0x57f83e(0x1cf)]=_0x399823,this[_0x57f83e(0x1ee)]=_0x2fe3e8,this['_userService']=_0x241e4b,this[_0x57f83e(0x20f)]=_0x2ca313,this[_0x57f83e(0x1e0)](),this[_0x57f83e(0x1f1)]();}[_0x4a9a54(0x1f1)](){const _0x39e832=_0x4a9a54;this['disposeWithMe'](this[_0x39e832(0x1ee)][_0x39e832(0x1cb)][_0x39e832(0x1ce)](j[_0x39e832(0x1fd)](0x10))['subscribe'](_0xa1486=>{const _0xceccee=_0x39e832,_0x1a39d0=new Set();_0xa1486[_0xceccee(0x22c)](_0x51444d=>{const _0x30eef4=_0xceccee;switch(_0x51444d[_0x30eef4(0x22a)]){case _0x30eef4(0x20d):{const _0x390660=_0x51444d[_0x30eef4(0x231)]['personId'];_0x1a39d0['add'](_0x390660);break;}}}),R(this['_injector'],_0x1a39d0);}));}[_0x4a9a54(0x1e0)](){const _0x2077be=_0x4a9a54;this['disposeWithMe'](this['_commentService'][_0x2077be(0x1cb)][_0x2077be(0x22b)](async _0x51c4ea=>{const _0x2b76a2=_0x2077be;var _0x36d745,_0x52a7e4,_0x56dc98,_0x7e148e;const _0x3db83e=(_0x36d745=this['_threadCommentModel']['getUnit'](_0x51c4ea[_0x2b76a2(0x227)])['find'](_0x3a495f=>_0x3a495f['threadId']===_0x51c4ea[_0x2b76a2(0x21d)]))==null?void 0x0:_0x36d745[_0x2b76a2(0x1ea)];if(!_0x3db83e)return;const {unitId:_0xbfb9c8,subUnitId:_0x15acc3}=_0x3db83e;switch(_0x51c4ea[_0x2b76a2(0x1f4)]&&this['_userService']['addUser'](_0x51c4ea['user']),_0x51c4ea[_0x2b76a2(0x22a)]){case v[_0x2b76a2(0x1f0)]:break;case v[_0x2b76a2(0x238)]:{this['_threadCommentModel'][_0x2b76a2(0x1ec)](_0xbfb9c8,_0x15acc3,{'unitId':_0xbfb9c8,'subUnitId':_0x15acc3,'ref':'','id':_0x51c4ea[_0x2b76a2(0x217)],'dT':f(+_0x51c4ea['createTimestamp']),'threadId':_0x51c4ea[_0x2b76a2(0x21d)],'personId':(_0x56dc98=(_0x52a7e4=_0x51c4ea[_0x2b76a2(0x1f4)])==null?void 0x0:_0x52a7e4[_0x2b76a2(0x1d3)])!=null?_0x56dc98:_0x51c4ea[_0x2b76a2(0x1e3)],'text':JSON[_0x2b76a2(0x1de)](_0x51c4ea[_0x2b76a2(0x1df)]),'parentId':_0x3db83e['id']});break;}case v['Delete']:{const _0x3cf96e=this['_threadCommentModel'][_0x2b76a2(0x1d6)](_0xbfb9c8,_0x15acc3,_0x51c4ea[_0x2b76a2(0x217)]);_0x3cf96e&&_0x3cf96e['parentId']&&this[_0x2b76a2(0x1ee)][_0x2b76a2(0x205)](_0xbfb9c8,_0x15acc3,_0x51c4ea[_0x2b76a2(0x217)]);break;}case v[_0x2b76a2(0x203)]:{this['_threadCommentModel'][_0x2b76a2(0x224)](_0xbfb9c8,_0x15acc3,{'commentId':_0x51c4ea['replyId'],'text':JSON[_0x2b76a2(0x1de)](_0x51c4ea[_0x2b76a2(0x1df)])});break;}case v[_0x2b76a2(0x1d5)]:{const _0x5872c7=(_0x7e148e=this[_0x2b76a2(0x1ee)][_0x2b76a2(0x220)](_0x51c4ea[_0x2b76a2(0x227)])[_0x2b76a2(0x1cc)](_0x469073=>_0x469073[_0x2b76a2(0x21d)]===_0x51c4ea['threadId']))==null?void 0x0:_0x7e148e['root'];_0x5872c7&&this[_0x2b76a2(0x1ee)][_0x2b76a2(0x1c5)](_0xbfb9c8,_0x15acc3,_0x5872c7['id'],_0x51c4ea[_0x2b76a2(0x1fe)]===I[_0x2b76a2(0x222)]);break;}}}));}};_=E([S(0x0,c[_0x4a9a54(0x1e5)](b[_0x4a9a54(0x21a)])),S(0x1,c[_0x4a9a54(0x1e5)](M[_0x4a9a54(0x1db)])),S(0x2,c[_0x4a9a54(0x1e5)](c['UserManagerService'])),S(0x3,c[_0x4a9a54(0x1e5)](c['Injector']))],_);const q=_0x4a9a54(0x1c4),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x458437,_0x2d5ab9,_0x1b77bb,_0x285f72)=>{const _0x53b19f=_0x4a9a54;for(var _0x4d04db=_0x285f72>0x1?void 0x0:_0x285f72?A(_0x2d5ab9,_0x1b77bb):_0x2d5ab9,_0x2c4c56=_0x458437[_0x53b19f(0x1d0)]-0x1,_0x147d9d;_0x2c4c56>=0x0;_0x2c4c56--)(_0x147d9d=_0x458437[_0x2c4c56])&&(_0x4d04db=_0x147d9d(_0x4d04db)||_0x4d04db);return _0x4d04db;},C=(_0x243a2a,_0xc5e37f)=>(_0x40c329,_0x536dac)=>_0xc5e37f(_0x40c329,_0x536dac,_0x243a2a);function _0x50ee(){const _0x387671=['_httpService','13407831TDcWXD','_initDataSource','defineProperty','payload','_userService','UniverCollaborationClientPlugin','/universer-api/user/list','onStarting','UniverLicensePlugin','reply','Reply','getOwnPropertyDescriptor','thread-comment-data-source.config','resolveComment','createTimestamp','rangeType','dayjs','_threadCommentDataSourceService','UNIVER_UNKNOWN','commentUpdate$','find','post','pipe','_commentService','length','337508xwwCSq','CollaborationSessionService','userID','slice','Solve','getComment','Plugin','CustomRangeType','_threadCommentDataSource','body','ThreadCommentModel','UniverThreadCommentDataSourcePlugin','getMemberID','parse','content','_init','getCurrentUser','/universer-api/comment/unit/','userId','994030AflakW','Inject','symbol','_config','customRanges','3935592ZVYPzJ','root','merge','addComment','HTTPService','_threadCommentModel','/list','Add','_initUserSync','error','/delete','user','UNRECOGNIZED','code','414424KDLtug','stringify','UniverInstanceType','Unknown','UserManagerService','/reply','bufferTime','solved','Injector','DependentOn','users','12lSdKcU','Edit','COMMENT','deleteComment','map','rangeId','9KtMCnP','1610994efteAS','format','setConfig','_sessionService','add','addUser','_injector','Disposable','/add','filter','Delete','requireSession','delete','/solved','replyId','get','2524206wrbiUt','CommentService','_configService','replies','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IThreadCommentDataSourceService','getUnit','toStringTag','Solved','YYYY/MM/DD\x20HH:mm','updateComment','onReady','/edit','unitId','IConfigService','OpenOrReOpen','type','subscribe','forEach'];_0x50ee=function(){return _0x387671;};return _0x50ee();}function Y(_0x119537,_0x2633ad){const _0x540028=_0x4a9a54,_0x540492=_0x119537['replies'][0x0];return{..._0x2633ad,'id':_0x540492[_0x540028(0x217)],'resolved':_0x119537[_0x540028(0x1fe)]===0x1,'dT':f(_0x540492[_0x540028(0x1c6)]),'personId':_0x540492[_0x540028(0x1e3)],'threadId':_0x540492[_0x540028(0x21d)]};}function G(_0x10dbfd,_0x2474ef,_0xb63dbc){const _0x3146c2=_0x4a9a54;var _0x2107f0,_0xf2f680;if(((_0xf2f680=(_0x2107f0=_0x10dbfd==null?void 0x0:_0x10dbfd[_0x3146c2(0x21c)])==null?void 0x0:_0x2107f0['length'])!=null?_0xf2f680:0x0)>0x0){const _0xfed38=(_0x52d105,_0x5c5a4b)=>({'id':_0x52d105[_0x3146c2(0x217)],'threadId':_0x52d105[_0x3146c2(0x21d)],'dT':f(_0x52d105[_0x3146c2(0x1c6)]),'personId':_0x52d105[_0x3146c2(0x1e3)],'resolved':_0x10dbfd['solved']===I['Solved'],'unitId':_0x2474ef,'subUnitId':_0xb63dbc,'text':JSON[_0x3146c2(0x1de)](_0x52d105[_0x3146c2(0x1df)]),'parentId':_0x5c5a4b}),_0x43c64e=_0xfed38(_0x10dbfd['replies'][0x0]);return{..._0x43c64e,'children':_0x10dbfd[_0x3146c2(0x21c)][_0x3146c2(0x1d4)](0x1)[_0x3146c2(0x206)](_0x2dd548=>_0xfed38(_0x2dd548,_0x43c64e['id']))};}return null;}let p=class{constructor(_0x41b40e,_0x5ca185,_0x5d9f7d){const _0x2fb18a=_0x4a9a54;this['_httpService']=_0x41b40e,this[_0x2fb18a(0x232)]=_0x5ca185,this[_0x2fb18a(0x20c)]=_0x5d9f7d;}async['addComment'](_0x39d018){const _0x55c04a=_0x4a9a54;var _0xe38d7c,_0x2ac8fb;const {parentId:_0x2f18e1,unitId:_0x3a26d8,text:_0x5807a4,threadId:_0x83ea35}=_0x39d018,_0x30312e=(_0x2ac8fb=(_0xe38d7c=_0x5807a4[_0x55c04a(0x1e8)])==null?void 0x0:_0xe38d7c[_0x55c04a(0x212)](_0x55b3a4=>_0x55b3a4[_0x55c04a(0x1c7)]===c[_0x55c04a(0x1d8)]['COMMENT'])[_0x55c04a(0x206)](_0x10c8d4=>_0x10c8d4[_0x55c04a(0x207)]))!=null?_0x2ac8fb:[],_0x49ae4a=JSON['stringify'](_0x5807a4),_0x5b958c=(await this[_0x55c04a(0x20c)][_0x55c04a(0x214)](_0x3a26d8))[_0x55c04a(0x1dd)]();if(_0x2f18e1){const _0x6b099={'memberId':_0x5b958c,'unitId':_0x3a26d8,'content':_0x49ae4a,'mention':_0x30312e,'threadId':_0x83ea35},_0x57b828=(await this[_0x55c04a(0x22d)][_0x55c04a(0x1cd)](_0x55c04a(0x1e2)+_0x3a26d8+_0x55c04a(0x1fc),{'body':_0x6b099}))[_0x55c04a(0x1da)][_0x55c04a(0x237)];return{..._0x39d018,'id':_0x57b828[_0x55c04a(0x217)],'dT':c['dayjs'](+_0x57b828[_0x55c04a(0x1c6)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x57b828[_0x55c04a(0x1e3)]};}else{const _0x4e7abd={'memberId':_0x5b958c,'unitId':_0x3a26d8,'content':_0x49ae4a,'mention':_0x30312e},_0x4bcb32=await this['_httpService'][_0x55c04a(0x1cd)](_0x55c04a(0x1e2)+_0x3a26d8+_0x55c04a(0x211),{'body':_0x4e7abd});return Y(_0x4bcb32[_0x55c04a(0x1da)]['comment'],_0x39d018);}}async[_0x4a9a54(0x224)](_0x42a80a){const _0x3701f5=_0x4a9a54;var _0x379e35,_0x4491ff;const {text:_0xb8d727,unitId:_0x151d6e}=_0x42a80a,_0x210bb7=(_0x4491ff=(_0x379e35=_0xb8d727['customRanges'])==null?void 0x0:_0x379e35['filter'](_0x557661=>_0x557661[_0x3701f5(0x1c7)]===c[_0x3701f5(0x1d8)][_0x3701f5(0x204)])[_0x3701f5(0x206)](_0x168d25=>_0x168d25['rangeId']))!=null?_0x4491ff:[],_0x10f9a9=JSON[_0x3701f5(0x1f8)](_0xb8d727),_0x1ed447=_0x42a80a[_0x3701f5(0x21d)],_0x15b7f7=_0x42a80a['id'],_0x3a246c={'memberId':(await this[_0x3701f5(0x20c)]['requireSession'](_0x151d6e))[_0x3701f5(0x1dd)](),'unitId':_0x151d6e,'threadId':_0x1ed447,'mention':_0x210bb7,'content':_0x10f9a9,'replyId':_0x15b7f7},_0x21e4eb=await this['_httpService'][_0x3701f5(0x1cd)](_0x3701f5(0x1e2)+_0x151d6e+_0x3701f5(0x226),{'body':_0x3a246c});return!_0x21e4eb[_0x3701f5(0x1da)][_0x3701f5(0x1f2)]||_0x21e4eb[_0x3701f5(0x1da)][_0x3701f5(0x1f2)][_0x3701f5(0x1f6)]===0x1;}async[_0x4a9a54(0x1c5)](_0x5f3b3a){const _0x1ab9d3=_0x4a9a54,{unitId:_0x140cde}=_0x5f3b3a,_0x102b03=_0x5f3b3a[_0x1ab9d3(0x21d)],_0x2f72a0={'memberId':this[_0x1ab9d3(0x232)][_0x1ab9d3(0x1e1)]()[_0x1ab9d3(0x1d3)],'unitId':_0x140cde,'threadId':_0x102b03,'solved':_0x5f3b3a['resolved']?I[_0x1ab9d3(0x222)]:I[_0x1ab9d3(0x229)]},_0xb56488=await this[_0x1ab9d3(0x22d)][_0x1ab9d3(0x1cd)]('/universer-api/comment/unit/'+_0x140cde+_0x1ab9d3(0x216),{'body':_0x2f72a0});return!_0xb56488[_0x1ab9d3(0x1da)][_0x1ab9d3(0x1f2)]||_0xb56488[_0x1ab9d3(0x1da)][_0x1ab9d3(0x1f2)][_0x1ab9d3(0x1f6)]===0x1;}async[_0x4a9a54(0x205)](_0x149169,_0xc21a67,_0x549cad,_0xb546ec){const _0x237744=_0x4a9a54,_0x3238d3={'memberId':(await this[_0x237744(0x20c)][_0x237744(0x214)](_0x149169))[_0x237744(0x1dd)](),'threadId':_0x549cad,'replyId':_0xb546ec,'unitId':_0x149169},_0x34f99a=await this['_httpService'][_0x237744(0x1cd)](_0x237744(0x1e2)+_0x149169+_0x237744(0x1f3),{'body':_0x3238d3});return!_0x34f99a[_0x237744(0x1da)][_0x237744(0x1f2)]||_0x34f99a['body'][_0x237744(0x1f2)][_0x237744(0x1f6)]===0x1;}async['listComments'](_0xd6f766,_0x21ebf3,_0x36f9eb){const _0x12614b=_0x4a9a54,_0xfb54e9={'unitId':_0xd6f766,'threadId':_0x36f9eb},_0x2dbfe5=await this[_0x12614b(0x22d)][_0x12614b(0x1cd)](_0x12614b(0x1e2)+_0xd6f766+_0x12614b(0x1ef),{'body':_0xfb54e9}),_0x3509a1=_0x36f9eb['map'](_0x33d159=>G(_0x2dbfe5['body']['comments'][_0x33d159],_0xd6f766,_0x21ebf3))['filter'](Boolean);return Object['values'](_0x2dbfe5[_0x12614b(0x1da)][_0x12614b(0x201)])[_0x12614b(0x22c)](_0x1cce45=>{const _0x46e296=_0x12614b;this['_userService'][_0x46e296(0x20e)](_0x1cce45);}),_0x3509a1;}['saveCommentToSnapshot'](_0xdbd7f5){const _0x485de3=_0x4a9a54;return{'id':_0xdbd7f5['id'],'threadId':_0xdbd7f5[_0x485de3(0x21d)],'ref':_0xdbd7f5['ref']};}};p=x([C(0x0,c[_0x4a9a54(0x1e5)](P[_0x4a9a54(0x1ed)])),C(0x1,c[_0x4a9a54(0x1e5)](c[_0x4a9a54(0x1fb)])),C(0x2,c[_0x4a9a54(0x1e5)](b[_0x4a9a54(0x1d2)]))],p);var H=Object[_0x4a9a54(0x1c3)],J=(_0x4f6475,_0x53ac70,_0x3517cc,_0x59f18b)=>{const _0x1efdfd=_0x4a9a54;for(var _0x21c7d8=_0x59f18b>0x1?void 0x0:_0x59f18b?H(_0x53ac70,_0x3517cc):_0x53ac70,_0x53f276=_0x4f6475[_0x1efdfd(0x1d0)]-0x1,_0x742c0a;_0x53f276>=0x0;_0x53f276--)(_0x742c0a=_0x4f6475[_0x53f276])&&(_0x21c7d8=_0x742c0a(_0x21c7d8)||_0x21c7d8);return _0x21c7d8;},y=(_0x5e242c,_0x1172e2)=>(_0xc10c1a,_0x532831)=>_0x1172e2(_0xc10c1a,_0x532831,_0x5e242c);let g=class extends c['Disposable']{constructor(_0x615531,_0x202c40){const _0x13c480=_0x4a9a54;super(),this[_0x13c480(0x1c9)]=_0x615531,this[_0x13c480(0x1d9)]=_0x202c40,this[_0x13c480(0x22f)]();}['_initDataSource'](){const _0x57ee4c=_0x4a9a54;this[_0x57ee4c(0x1c9)]['dataSource']=this['_threadCommentDataSource'],this[_0x57ee4c(0x1c9)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4a9a54(0x21f)]),y(0x1,c[_0x4a9a54(0x1e5)](p))],g);var F=Object[_0x4a9a54(0x230)],L=Object[_0x4a9a54(0x1c3)],Z=(_0x4378f1,_0x1ccd4f,_0x4733f6)=>_0x1ccd4f in _0x4378f1?F(_0x4378f1,_0x1ccd4f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4733f6}):_0x4378f1[_0x1ccd4f]=_0x4733f6,W=(_0x4a5808,_0x9ebb17,_0x29865c,_0x4c2b38)=>{const _0x259b31=_0x4a9a54;for(var _0x54b789=_0x4c2b38>0x1?void 0x0:_0x4c2b38?L(_0x9ebb17,_0x29865c):_0x9ebb17,_0x52bdc7=_0x4a5808[_0x259b31(0x1d0)]-0x1,_0x2329ce;_0x52bdc7>=0x0;_0x52bdc7--)(_0x2329ce=_0x4a5808[_0x52bdc7])&&(_0x54b789=_0x2329ce(_0x54b789)||_0x54b789);return _0x54b789;},O=(_0x501e49,_0x4910f7)=>(_0x4fdb9b,_0x52ab56)=>_0x4910f7(_0x4fdb9b,_0x52ab56,_0x501e49),N=(_0xbf693b,_0x297a25,_0x3a8107)=>Z(_0xbf693b,typeof _0x297a25!=_0x4a9a54(0x1e6)?_0x297a25+'':_0x297a25,_0x3a8107);exports[_0x4a9a54(0x1dc)]=class extends c[_0x4a9a54(0x1d7)]{constructor(_0x8084e6=D,_0x1a04dd,_0x18f468){const _0x4290b3=_0x4a9a54;super(),this[_0x4290b3(0x1e7)]=_0x8084e6,this['_injector']=_0x1a04dd,this[_0x4290b3(0x21b)]=_0x18f468;const {..._0x2ab8e0}=c[_0x4290b3(0x1eb)]({},D,this[_0x4290b3(0x1e7)]);this[_0x4290b3(0x21b)][_0x4290b3(0x20b)](q,_0x2ab8e0);}[_0x4a9a54(0x235)](){const _0x43aee7=_0x4a9a54;[[p],[g],[_]][_0x43aee7(0x22c)](_0x54839c=>{const _0x16a994=_0x43aee7;this['_injector'][_0x16a994(0x20d)](_0x54839c);});}[_0x4a9a54(0x225)](){const _0x1b761f=_0x4a9a54;this[_0x1b761f(0x20f)][_0x1b761f(0x218)](g),this[_0x1b761f(0x20f)][_0x1b761f(0x218)](_);}},N(exports[_0x4a9a54(0x1dc)],'pluginName',U),N(exports[_0x4a9a54(0x1dc)],_0x4a9a54(0x22a),c[_0x4a9a54(0x1f9)][_0x4a9a54(0x1ca)]),exports[_0x4a9a54(0x1dc)]=W([c[_0x4a9a54(0x200)](w['UniverThreadCommentUIPlugin'],b[_0x4a9a54(0x233)],T[_0x4a9a54(0x236)]),O(0x1,c[_0x4a9a54(0x1e5)](c[_0x4a9a54(0x1ff)])),O(0x2,c[_0x4a9a54(0x228)])],exports[_0x4a9a54(0x1dc)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2df57e=_0x5e0c;(function(_0x216986,_0x317750){const _0x86c761=_0x5e0c,_0x5b3d7a=_0x216986();while(!![]){try{const _0x408e46=parseInt(_0x86c761(0x12f))/0x1*(parseInt(_0x86c761(0x13d))/0x2)+parseInt(_0x86c761(0x11b))/0x3*(parseInt(_0x86c761(0x110))/0x4)+parseInt(_0x86c761(0xf9))/0x5*(parseInt(_0x86c761(0x143))/0x6)+parseInt(_0x86c761(0x10e))/0x7+parseInt(_0x86c761(0x125))/0x8*(parseInt(_0x86c761(0x12d))/0x9)+parseInt(_0x86c761(0x121))/0xa+-parseInt(_0x86c761(0x116))/0xb;if(_0x408e46===_0x317750)break;else _0x5b3d7a['push'](_0x5b3d7a['shift']());}catch(_0x3c1b88){_0x5b3d7a['push'](_0x5b3d7a['shift']());}}}(_0x129b,0x21b1f));import{CommentService as _0x2ca153,CollaborationSessionService as _0x50d4fb,UniverCollaborationClientPlugin as _0x9f917b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d1065}from'@univerjs-pro/license';import{dayjs as _0x479e24,UserManagerService as _0x3391ff,Inject as _0x18776e,Injector as _0x450dbc,Disposable as _0x6ff48f,CustomRangeType as _0x525ecc,UniverInstanceType as _0xefb13,DependentOn as _0x53ac22,IConfigService as _0x5d7bed,Plugin as _0x415431,merge as _0x3ae601}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5c9762}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x22a644,IThreadCommentDataSourceService as _0x191df3}from'@univerjs/thread-comment';import{bufferTime as _0x6ecdfc}from'rxjs';import{HTTPService as _0x2c40b3}from'@univerjs/network';const W=_0x2df57e(0x129);var I=(_0x418b2a=>(_0x418b2a[_0x418b2a[_0x2df57e(0x103)]=0x0]=_0x2df57e(0x103),_0x418b2a[_0x418b2a['Solved']=0x1]=_0x2df57e(0x10f),_0x418b2a[_0x418b2a[_0x2df57e(0xf3)]=-0x1]=_0x2df57e(0xf3),_0x418b2a))(I||{}),v=(_0x36a6d2=>(_0x36a6d2[_0x36a6d2[_0x2df57e(0x144)]=0x0]='Unknown',_0x36a6d2[_0x36a6d2[_0x2df57e(0x10d)]=0x1]='Add',_0x36a6d2[_0x36a6d2['Reply']=0x2]='Reply',_0x36a6d2[_0x36a6d2['Edit']=0x3]=_0x2df57e(0x14c),_0x36a6d2[_0x36a6d2[_0x2df57e(0x149)]=0x4]=_0x2df57e(0x149),_0x36a6d2[_0x36a6d2[_0x2df57e(0xef)]=0x5]='Solve',_0x36a6d2[_0x36a6d2[_0x2df57e(0xf3)]=-0x1]=_0x2df57e(0xf3),_0x36a6d2))(v||{});const y=_0x35b876=>_0x479e24(new Date(+_0x35b876))[_0x2df57e(0x134)](_0x2df57e(0x14f)),B=async(_0x239a71,_0x514647)=>{const _0x22100c=_0x2df57e,_0x531666=_0x239a71[_0x22100c(0x133)](_0x3391ff),_0x3ed7fc=_0x239a71[_0x22100c(0x133)](_0x2c40b3);_0x514647[_0x22100c(0xfa)](_0x3357f4=>{const _0x9479f4=_0x22100c;_0x531666[_0x9479f4(0x104)](_0x3357f4)&&_0x514647[_0x9479f4(0x119)](_0x3357f4);}),_0x514647['size']&&(await _0x3ed7fc[_0x22100c(0x133)](_0x22100c(0x14e),{'params':{'userIDs':[..._0x514647]}}))[_0x22100c(0x113)][_0x22100c(0xec)][_0x22100c(0xfa)](_0x14efae=>{_0x14efae&&_0x531666['addUser'](_0x14efae);});};var K=Object[_0x2df57e(0x13b)],V=(_0xa17a6a,_0x4a3b78,_0x262d70,_0x2c7f2e)=>{const _0xdb9475=_0x2df57e;for(var _0x48d145=_0x2c7f2e>0x1?void 0x0:_0x2c7f2e?K(_0x4a3b78,_0x262d70):_0x4a3b78,_0x4ce027=_0xa17a6a[_0xdb9475(0x101)]-0x1,_0x365d8b;_0x4ce027>=0x0;_0x4ce027--)(_0x365d8b=_0xa17a6a[_0x4ce027])&&(_0x48d145=_0x365d8b(_0x48d145)||_0x48d145);return _0x48d145;},p=(_0x4b20ca,_0x3ad02f)=>(_0x28e79d,_0x57c547)=>_0x3ad02f(_0x28e79d,_0x57c547,_0x4b20ca);let _=class extends _0x6ff48f{constructor(_0x416dd4,_0x5af778,_0x529fca,_0x9bfbf3){const _0x1ff28c=_0x2df57e;super(),this[_0x1ff28c(0x138)]=_0x416dd4,this[_0x1ff28c(0x12b)]=_0x5af778,this['_userService']=_0x529fca,this[_0x1ff28c(0x122)]=_0x9bfbf3,this[_0x1ff28c(0x124)](),this[_0x1ff28c(0x137)]();}[_0x2df57e(0x137)](){const _0x3109e2=_0x2df57e;this[_0x3109e2(0x127)](this[_0x3109e2(0x12b)][_0x3109e2(0x13e)][_0x3109e2(0x106)](_0x6ecdfc(0x10))[_0x3109e2(0x114)](_0x241810=>{const _0x20f028=_0x3109e2,_0x3f12b7=new Set();_0x241810[_0x20f028(0xfa)](_0x386e83=>{const _0x2bf348=_0x20f028;switch(_0x386e83[_0x2bf348(0x109)]){case _0x2bf348(0x111):{const _0xe27159=_0x386e83[_0x2bf348(0xf1)]['personId'];_0x3f12b7[_0x2bf348(0x111)](_0xe27159);break;}}}),B(this[_0x20f028(0x122)],_0x3f12b7);}));}[_0x2df57e(0x124)](){const _0x18276f=_0x2df57e;this[_0x18276f(0x127)](this[_0x18276f(0x138)][_0x18276f(0x13e)]['subscribe'](async _0x1e8776=>{const _0x2fea5e=_0x18276f;var _0x326346,_0x363885,_0x3ca518,_0x4e6fcc;const _0x321a28=(_0x326346=this[_0x2fea5e(0x12b)]['getUnit'](_0x1e8776[_0x2fea5e(0x112)])[_0x2fea5e(0x140)](_0x15dc61=>_0x15dc61['threadId']===_0x1e8776[_0x2fea5e(0x10c)]))==null?void 0x0:_0x326346[_0x2fea5e(0x14b)];if(!_0x321a28)return;const {unitId:_0x330dc6,subUnitId:_0x3d7524}=_0x321a28;switch(_0x1e8776[_0x2fea5e(0xed)]&&this[_0x2fea5e(0x14a)][_0x2fea5e(0xf8)](_0x1e8776[_0x2fea5e(0xed)]),_0x1e8776[_0x2fea5e(0x109)]){case v[_0x2fea5e(0x10d)]:break;case v[_0x2fea5e(0x10b)]:{this['_threadCommentModel']['addComment'](_0x330dc6,_0x3d7524,{'unitId':_0x330dc6,'subUnitId':_0x3d7524,'ref':'','id':_0x1e8776[_0x2fea5e(0x105)],'dT':y(+_0x1e8776[_0x2fea5e(0x108)]),'threadId':_0x1e8776[_0x2fea5e(0x10c)],'personId':(_0x3ca518=(_0x363885=_0x1e8776[_0x2fea5e(0xed)])==null?void 0x0:_0x363885['userID'])!=null?_0x3ca518:_0x1e8776['userId'],'text':JSON[_0x2fea5e(0xfd)](_0x1e8776[_0x2fea5e(0xf6)]),'parentId':_0x321a28['id']});break;}case v[_0x2fea5e(0x149)]:{const _0x5d5d68=this[_0x2fea5e(0x12b)][_0x2fea5e(0xfc)](_0x330dc6,_0x3d7524,_0x1e8776['replyId']);_0x5d5d68&&_0x5d5d68['parentId']&&this[_0x2fea5e(0x12b)]['deleteComment'](_0x330dc6,_0x3d7524,_0x1e8776['replyId']);break;}case v[_0x2fea5e(0x14c)]:{this[_0x2fea5e(0x12b)][_0x2fea5e(0x131)](_0x330dc6,_0x3d7524,{'commentId':_0x1e8776[_0x2fea5e(0x105)],'text':JSON['parse'](_0x1e8776[_0x2fea5e(0xf6)])});break;}case v[_0x2fea5e(0xef)]:{const _0x338167=(_0x4e6fcc=this['_threadCommentModel'][_0x2fea5e(0x148)](_0x1e8776[_0x2fea5e(0x112)])[_0x2fea5e(0x140)](_0x409772=>_0x409772[_0x2fea5e(0x10c)]===_0x1e8776['threadId']))==null?void 0x0:_0x4e6fcc['root'];_0x338167&&this['_threadCommentModel'][_0x2fea5e(0x11c)](_0x330dc6,_0x3d7524,_0x338167['id'],_0x1e8776[_0x2fea5e(0x128)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x18776e(_0x2ca153)),p(0x1,_0x18776e(_0x22a644)),p(0x2,_0x18776e(_0x3391ff)),p(0x3,_0x18776e(_0x450dbc))],_);const z=_0x2df57e(0x132),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3312b8,_0x7d809d,_0x17117c,_0x10dc37)=>{const _0x56015e=_0x2df57e;for(var _0x7cdee8=_0x10dc37>0x1?void 0x0:_0x10dc37?k(_0x7d809d,_0x17117c):_0x7d809d,_0x4c2d24=_0x3312b8[_0x56015e(0x101)]-0x1,_0x497906;_0x4c2d24>=0x0;_0x4c2d24--)(_0x497906=_0x3312b8[_0x4c2d24])&&(_0x7cdee8=_0x497906(_0x7cdee8)||_0x7cdee8);return _0x7cdee8;},b=(_0x571f7b,_0x138c81)=>(_0x1705ba,_0x42e228)=>_0x138c81(_0x1705ba,_0x42e228,_0x571f7b);function X(_0xf82f4,_0x318d20){const _0x10fa94=_0x2df57e,_0x598b8a=_0xf82f4['replies'][0x0];return{..._0x318d20,'id':_0x598b8a[_0x10fa94(0x105)],'resolved':_0xf82f4[_0x10fa94(0x128)]===0x1,'dT':y(_0x598b8a['createTimestamp']),'personId':_0x598b8a['userId'],'threadId':_0x598b8a[_0x10fa94(0x10c)]};}function ee(_0xd923e2,_0x91e9de,_0x7e4771){const _0x42041b=_0x2df57e;var _0x42a4c9,_0x2ce87e;if(((_0x2ce87e=(_0x42a4c9=_0xd923e2==null?void 0x0:_0xd923e2[_0x42041b(0x135)])==null?void 0x0:_0x42a4c9[_0x42041b(0x101)])!=null?_0x2ce87e:0x0)>0x0){const _0x4aec0e=(_0x54b5e5,_0xc74423)=>({'id':_0x54b5e5[_0x42041b(0x105)],'threadId':_0x54b5e5[_0x42041b(0x10c)],'dT':y(_0x54b5e5[_0x42041b(0x108)]),'personId':_0x54b5e5['userId'],'resolved':_0xd923e2[_0x42041b(0x128)]===I[_0x42041b(0x10f)],'unitId':_0x91e9de,'subUnitId':_0x7e4771,'text':JSON[_0x42041b(0xfd)](_0x54b5e5[_0x42041b(0xf6)]),'parentId':_0xc74423}),_0x469822=_0x4aec0e(_0xd923e2[_0x42041b(0x135)][0x0]);return{..._0x469822,'children':_0xd923e2[_0x42041b(0x135)][_0x42041b(0x146)](0x1)[_0x42041b(0x136)](_0x573178=>_0x4aec0e(_0x573178,_0x469822['id']))};}return null;}let S=class{constructor(_0x3e9ca2,_0x8f12c2,_0x5e8038){const _0x2eedae=_0x2df57e;this[_0x2eedae(0x11a)]=_0x3e9ca2,this['_userService']=_0x8f12c2,this[_0x2eedae(0xfe)]=_0x5e8038;}async[_0x2df57e(0xea)](_0x2adf0e){const _0x528850=_0x2df57e;var _0xc2258d,_0x1c42b8;const {parentId:_0x4edafa,unitId:_0x1c99ce,text:_0x1caca3,threadId:_0x463993}=_0x2adf0e,_0x2e89f1=(_0x1c42b8=(_0xc2258d=_0x1caca3['customRanges'])==null?void 0x0:_0xc2258d[_0x528850(0x147)](_0x394559=>_0x394559[_0x528850(0x13c)]===_0x525ecc[_0x528850(0x11f)])['map'](_0x3e5b56=>_0x3e5b56['rangeId']))!=null?_0x1c42b8:[],_0x2a45f0=JSON[_0x528850(0xff)](_0x1caca3),_0x1419e9=(await this[_0x528850(0xfe)][_0x528850(0x141)](_0x1c99ce))[_0x528850(0x118)]();if(_0x4edafa){const _0x55e3d3={'memberId':_0x1419e9,'unitId':_0x1c99ce,'content':_0x2a45f0,'mention':_0x2e89f1,'threadId':_0x463993},_0x5ac32a=(await this[_0x528850(0x11a)][_0x528850(0xf0)]('/universer-api/comment/unit/'+_0x1c99ce+_0x528850(0x100),{'body':_0x55e3d3}))[_0x528850(0x113)][_0x528850(0x107)];return{..._0x2adf0e,'id':_0x5ac32a['replyId'],'dT':_0x479e24(+_0x5ac32a[_0x528850(0x108)])[_0x528850(0x134)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5ac32a[_0x528850(0x117)]};}else{const _0x2f82a6={'memberId':_0x1419e9,'unitId':_0x1c99ce,'content':_0x2a45f0,'mention':_0x2e89f1},_0x3b23cd=await this[_0x528850(0x11a)]['post'](_0x528850(0x145)+_0x1c99ce+'/add',{'body':_0x2f82a6});return X(_0x3b23cd[_0x528850(0x113)][_0x528850(0xf2)],_0x2adf0e);}}async[_0x2df57e(0x131)](_0x2bf7c5){const _0x25ea8a=_0x2df57e;var _0x3d531f,_0x28dd3b;const {text:_0x296ac4,unitId:_0x157793}=_0x2bf7c5,_0x2761da=(_0x28dd3b=(_0x3d531f=_0x296ac4['customRanges'])==null?void 0x0:_0x3d531f[_0x25ea8a(0x147)](_0x258917=>_0x258917[_0x25ea8a(0x13c)]===_0x525ecc[_0x25ea8a(0x11f)])['map'](_0x42686e=>_0x42686e[_0x25ea8a(0x12c)]))!=null?_0x28dd3b:[],_0x17b74d=JSON['stringify'](_0x296ac4),_0x98e84b=_0x2bf7c5['threadId'],_0x31e3ca=_0x2bf7c5['id'],_0x11431c={'memberId':(await this[_0x25ea8a(0xfe)]['requireSession'](_0x157793))[_0x25ea8a(0x118)](),'unitId':_0x157793,'threadId':_0x98e84b,'mention':_0x2761da,'content':_0x17b74d,'replyId':_0x31e3ca},_0x3ab397=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x157793+_0x25ea8a(0xf4),{'body':_0x11431c});return!_0x3ab397[_0x25ea8a(0x113)][_0x25ea8a(0x126)]||_0x3ab397[_0x25ea8a(0x113)][_0x25ea8a(0x126)][_0x25ea8a(0xeb)]===0x1;}async[_0x2df57e(0x11c)](_0x2f643b){const _0x4f02f0=_0x2df57e,{unitId:_0x3c088c}=_0x2f643b,_0xa5d433=_0x2f643b['threadId'],_0x37827d={'memberId':this[_0x4f02f0(0x14a)][_0x4f02f0(0x12e)]()[_0x4f02f0(0x142)],'unitId':_0x3c088c,'threadId':_0xa5d433,'solved':_0x2f643b['resolved']?I[_0x4f02f0(0x10f)]:I[_0x4f02f0(0x103)]},_0x3f2522=await this[_0x4f02f0(0x11a)][_0x4f02f0(0xf0)](_0x4f02f0(0x145)+_0x3c088c+_0x4f02f0(0x123),{'body':_0x37827d});return!_0x3f2522[_0x4f02f0(0x113)][_0x4f02f0(0x126)]||_0x3f2522['body']['error']['code']===0x1;}async['deleteComment'](_0x2e0780,_0x40977c,_0xc24a2f,_0x41a57d){const _0x4687ac=_0x2df57e,_0x4d29ba={'memberId':(await this['_sessionService'][_0x4687ac(0x141)](_0x2e0780))[_0x4687ac(0x118)](),'threadId':_0xc24a2f,'replyId':_0x41a57d,'unitId':_0x2e0780},_0x50b595=await this[_0x4687ac(0x11a)]['post']('/universer-api/comment/unit/'+_0x2e0780+'/delete',{'body':_0x4d29ba});return!_0x50b595['body']['error']||_0x50b595['body'][_0x4687ac(0x126)][_0x4687ac(0xeb)]===0x1;}async[_0x2df57e(0x14d)](_0x4aeba1,_0x70ceef,_0x1df212){const _0x598c5f=_0x2df57e,_0x4e8bcd={'unitId':_0x4aeba1,'threadId':_0x1df212},_0x55c85f=await this[_0x598c5f(0x11a)][_0x598c5f(0xf0)](_0x598c5f(0x145)+_0x4aeba1+_0x598c5f(0xee),{'body':_0x4e8bcd}),_0x3dc01a=_0x1df212['map'](_0x2e1293=>ee(_0x55c85f[_0x598c5f(0x113)]['comments'][_0x2e1293],_0x4aeba1,_0x70ceef))[_0x598c5f(0x147)](Boolean);return Object[_0x598c5f(0x11e)](_0x55c85f['body'][_0x598c5f(0xec)])[_0x598c5f(0xfa)](_0xe314ce=>{const _0x101fef=_0x598c5f;this['_userService'][_0x101fef(0xf8)](_0xe314ce);}),_0x3dc01a;}[_0x2df57e(0x11d)](_0x80f058){const _0x5b5e58=_0x2df57e;return{'id':_0x80f058['id'],'threadId':_0x80f058['threadId'],'ref':_0x80f058[_0x5b5e58(0x13f)]};}};function _0x5e0c(_0x307c4f,_0x28c5ba){const _0x129bca=_0x129b();return _0x5e0c=function(_0x5e0c30,_0x5b9d08){_0x5e0c30=_0x5e0c30-0xea;let _0x4be09c=_0x129bca[_0x5e0c30];return _0x4be09c;},_0x5e0c(_0x307c4f,_0x28c5ba);}function _0x129b(){const _0xab210=['createTimestamp','type','onReady','Reply','threadId','Add','247590aPxYRW','Solved','8vbkFrA','add','unitId','body','subscribe','pluginName','6954662qkUMeV','userId','getMemberID','delete','_httpService','103143alqrEm','resolveComment','saveCommentToSnapshot','values','COMMENT','defineProperty','2347090uzkSWZ','_injector','/solved','_init','828152SashBe','error','disposeWithMe','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','_threadCommentModel','rangeId','9HagVIL','getCurrentUser','7367IfrDig','symbol','updateComment','thread-comment-data-source.config','get','format','replies','map','_initUserSync','_commentService','_threadCommentDataSource','setConfig','getOwnPropertyDescriptor','rangeType','40VIDFAS','commentUpdate$','ref','find','requireSession','userID','1083342rDCome','Unknown','/universer-api/comment/unit/','slice','filter','getUnit','Delete','_userService','root','Edit','listComments','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','addComment','code','users','user','/list','Solve','post','payload','comment','UNRECOGNIZED','/edit','_config','content','dataSource','addUser','5nAbWYt','forEach','_threadCommentDataSourceService','getComment','parse','_sessionService','stringify','/reply','length','_configService','OpenOrReOpen','getUser','replyId','pipe','reply'];_0x129b=function(){return _0xab210;};return _0x129b();}S=Q([b(0x0,_0x18776e(_0x2c40b3)),b(0x1,_0x18776e(_0x3391ff)),b(0x2,_0x18776e(_0x50d4fb))],S);var re=Object[_0x2df57e(0x13b)],te=(_0x2d998a,_0x24fe1b,_0x4b3547,_0x394193)=>{const _0x4f79ac=_0x2df57e;for(var _0x89ac49=_0x394193>0x1?void 0x0:_0x394193?re(_0x24fe1b,_0x4b3547):_0x24fe1b,_0x53ea72=_0x2d998a[_0x4f79ac(0x101)]-0x1,_0x59a9b8;_0x53ea72>=0x0;_0x53ea72--)(_0x59a9b8=_0x2d998a[_0x53ea72])&&(_0x89ac49=_0x59a9b8(_0x89ac49)||_0x89ac49);return _0x89ac49;},M=(_0x369163,_0x56662d)=>(_0x57945b,_0x2bd66f)=>_0x56662d(_0x57945b,_0x2bd66f,_0x369163);let f=class extends _0x6ff48f{constructor(_0x4687ff,_0x4adb7a){const _0x45742d=_0x2df57e;super(),this['_threadCommentDataSourceService']=_0x4687ff,this['_threadCommentDataSource']=_0x4adb7a,this[_0x45742d(0x12a)]();}['_initDataSource'](){const _0x25f890=_0x2df57e;this[_0x25f890(0xfb)][_0x25f890(0xf7)]=this[_0x25f890(0x139)],this[_0x25f890(0xfb)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x191df3),M(0x1,_0x18776e(S))],f);var se=Object[_0x2df57e(0x120)],oe=Object[_0x2df57e(0x13b)],ne=(_0x1a97ab,_0x5f5985,_0xacf64d)=>_0x5f5985 in _0x1a97ab?se(_0x1a97ab,_0x5f5985,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xacf64d}):_0x1a97ab[_0x5f5985]=_0xacf64d,ie=(_0x4592e9,_0x3b0195,_0x4f694d,_0x30ce71)=>{for(var _0x365549=_0x30ce71>0x1?void 0x0:_0x30ce71?oe(_0x3b0195,_0x4f694d):_0x3b0195,_0x1969c7=_0x4592e9['length']-0x1,_0x5b383e;_0x1969c7>=0x0;_0x1969c7--)(_0x5b383e=_0x4592e9[_0x1969c7])&&(_0x365549=_0x5b383e(_0x365549)||_0x365549);return _0x365549;},N=(_0x400ffa,_0x338df2)=>(_0x82f31b,_0xea5e61)=>_0x338df2(_0x82f31b,_0xea5e61,_0x400ffa),$=(_0x5a58d5,_0xe854c7,_0x7f5156)=>ne(_0x5a58d5,typeof _0xe854c7!=_0x2df57e(0x130)?_0xe854c7+'':_0xe854c7,_0x7f5156);let g=class extends _0x415431{constructor(_0x321f4e=O,_0xd93a0c,_0x510113){const _0x42e0d0=_0x2df57e;super(),this[_0x42e0d0(0xf5)]=_0x321f4e,this['_injector']=_0xd93a0c,this[_0x42e0d0(0x102)]=_0x510113;const {..._0x5ef4c9}=_0x3ae601({},O,this['_config']);this[_0x42e0d0(0x102)][_0x42e0d0(0x13a)](z,_0x5ef4c9);}['onStarting'](){const _0x1abc1f=_0x2df57e;[[S],[f],[_]][_0x1abc1f(0xfa)](_0x37d170=>{const _0x58c7f9=_0x1abc1f;this[_0x58c7f9(0x122)][_0x58c7f9(0x111)](_0x37d170);});}[_0x2df57e(0x10a)](){const _0x2ff896=_0x2df57e;this[_0x2ff896(0x122)][_0x2ff896(0x133)](f),this[_0x2ff896(0x122)][_0x2ff896(0x133)](_);}};$(g,_0x2df57e(0x115),W),$(g,_0x2df57e(0x109),_0xefb13['UNIVER_UNKNOWN']),g=ie([_0x53ac22(_0x5c9762,_0x9f917b,_0x5d1065),N(0x1,_0x18776e(_0x450dbc)),N(0x2,_0x5d7bed)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x25faa0=_0x30b4;(function(_0xa99cc1,_0x52040a){const _0x17ca33=_0x30b4,_0x4a215d=_0xa99cc1();while(!![]){try{const _0x59f580=parseInt(_0x17ca33(0x1e7))/0x1+-parseInt(_0x17ca33(0x202))/0x2*(parseInt(_0x17ca33(0x22f))/0x3)+parseInt(_0x17ca33(0x21c))/0x4*(parseInt(_0x17ca33(0x232))/0x5)+-parseInt(_0x17ca33(0x223))/0x6*(parseInt(_0x17ca33(0x248))/0x7)+parseInt(_0x17ca33(0x1ec))/0x8*(-parseInt(_0x17ca33(0x23e))/0x9)+-parseInt(_0x17ca33(0x20b))/0xa+parseInt(_0x17ca33(0x249))/0xb;if(_0x59f580===_0x52040a)break;else _0x4a215d['push'](_0x4a215d['shift']());}catch(_0x176779){_0x4a215d['push'](_0x4a215d['shift']());}}}(_0x34aa,0x9e461));import{CommentService as _0xa2ebfd,CollaborationSessionService as _0x6ebfb5,UniverCollaborationClientPlugin as _0x4d0826}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x6f90f6}from'@univerjs-pro/license';import{dayjs as _0x5f5b37,UserManagerService as _0x3f7db5,Inject as _0xc9741e,Injector as _0x54bd73,Disposable as _0x25aa90,CustomRangeType as _0x2b4870,UniverInstanceType as _0x4e65bc,DependentOn as _0x125195,IConfigService as _0x4521b1,Plugin as _0x542bcc,merge as _0x7d8ac9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2d4016}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5a9473,IThreadCommentDataSourceService as _0x18a375}from'@univerjs/thread-comment';import{bufferTime as _0x5e308e}from'rxjs';function _0x30b4(_0x43136d,_0x4460d4){const _0x34aaeb=_0x34aa();return _0x30b4=function(_0x30b47b,_0x4ee0b0){_0x30b47b=_0x30b47b-0x1de;let _0x18f0ad=_0x34aaeb[_0x30b47b];return _0x18f0ad;},_0x30b4(_0x43136d,_0x4460d4);}import{HTTPService as _0x3bbb43}from'@univerjs/network';const W=_0x25faa0(0x235);var I=(_0x3b8563=>(_0x3b8563[_0x3b8563[_0x25faa0(0x1fd)]=0x0]='OpenOrReOpen',_0x3b8563[_0x3b8563['Solved']=0x1]='Solved',_0x3b8563[_0x3b8563[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x3b8563))(I||{}),v=(_0x42e44f=>(_0x42e44f[_0x42e44f[_0x25faa0(0x227)]=0x0]=_0x25faa0(0x227),_0x42e44f[_0x42e44f['Add']=0x1]='Add',_0x42e44f[_0x42e44f[_0x25faa0(0x215)]=0x2]=_0x25faa0(0x215),_0x42e44f[_0x42e44f[_0x25faa0(0x216)]=0x3]=_0x25faa0(0x216),_0x42e44f[_0x42e44f['Delete']=0x4]=_0x25faa0(0x236),_0x42e44f[_0x42e44f[_0x25faa0(0x22e)]=0x5]=_0x25faa0(0x22e),_0x42e44f[_0x42e44f[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x42e44f))(v||{});const y=_0x58a32e=>_0x5f5b37(new Date(+_0x58a32e))[_0x25faa0(0x1e0)](_0x25faa0(0x1ed)),B=async(_0x17e8ed,_0x4b6bc6)=>{const _0x4faf91=_0x25faa0,_0x25123a=_0x17e8ed[_0x4faf91(0x1f8)](_0x3f7db5),_0xe17c12=_0x17e8ed[_0x4faf91(0x1f8)](_0x3bbb43);_0x4b6bc6['forEach'](_0x33f45b=>{const _0x42367f=_0x4faf91;_0x25123a[_0x42367f(0x22c)](_0x33f45b)&&_0x4b6bc6[_0x42367f(0x1e5)](_0x33f45b);}),_0x4b6bc6['size']&&(await _0xe17c12['get'](_0x4faf91(0x237),{'params':{'userIDs':[..._0x4b6bc6]}}))['body'][_0x4faf91(0x1e6)][_0x4faf91(0x1e8)](_0xe32af3=>{_0xe32af3&&_0x25123a['addUser'](_0xe32af3);});};var K=Object[_0x25faa0(0x238)],V=(_0xe86f59,_0x4c6ffc,_0x2c840c,_0x1cf7d3)=>{const _0x321d21=_0x25faa0;for(var _0x294a54=_0x1cf7d3>0x1?void 0x0:_0x1cf7d3?K(_0x4c6ffc,_0x2c840c):_0x4c6ffc,_0x5ba2a1=_0xe86f59[_0x321d21(0x203)]-0x1,_0x5511db;_0x5ba2a1>=0x0;_0x5ba2a1--)(_0x5511db=_0xe86f59[_0x5ba2a1])&&(_0x294a54=_0x5511db(_0x294a54)||_0x294a54);return _0x294a54;},p=(_0x3e5f7e,_0x199364)=>(_0x3a7908,_0x2fbc3b)=>_0x199364(_0x3a7908,_0x2fbc3b,_0x3e5f7e);let _=class extends _0x25aa90{constructor(_0x3a14b5,_0x366f0a,_0x2ecc78,_0x5a5439){const _0x3d6cd7=_0x25faa0;super(),this[_0x3d6cd7(0x243)]=_0x3a14b5,this[_0x3d6cd7(0x20e)]=_0x366f0a,this['_userService']=_0x2ecc78,this[_0x3d6cd7(0x22a)]=_0x5a5439,this[_0x3d6cd7(0x1f6)](),this[_0x3d6cd7(0x1f3)]();}[_0x25faa0(0x1f3)](){const _0x4968e3=_0x25faa0;this[_0x4968e3(0x1fb)](this['_threadCommentModel'][_0x4968e3(0x1f2)][_0x4968e3(0x229)](_0x5e308e(0x10))['subscribe'](_0x2ec4b6=>{const _0x564076=_0x4968e3,_0x4bdbca=new Set();_0x2ec4b6[_0x564076(0x1e8)](_0x28b5ac=>{const _0x1320b0=_0x564076;switch(_0x28b5ac[_0x1320b0(0x22b)]){case _0x1320b0(0x23d):{const _0x3f7d51=_0x28b5ac[_0x1320b0(0x219)][_0x1320b0(0x23c)];_0x4bdbca[_0x1320b0(0x23d)](_0x3f7d51);break;}}}),B(this[_0x564076(0x22a)],_0x4bdbca);}));}[_0x25faa0(0x1f6)](){const _0x3be1d6=_0x25faa0;this['disposeWithMe'](this[_0x3be1d6(0x243)][_0x3be1d6(0x1f2)][_0x3be1d6(0x209)](async _0x33ac03=>{const _0x4ed2bc=_0x3be1d6;var _0x4706d3,_0x40a8e1,_0x51b853,_0x28f354;const _0x5ae392=(_0x4706d3=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0x13c896=>_0x13c896[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x4706d3[_0x4ed2bc(0x23b)];if(!_0x5ae392)return;const {unitId:_0x54b011,subUnitId:_0x20a96c}=_0x5ae392;switch(_0x33ac03[_0x4ed2bc(0x212)]&&this[_0x4ed2bc(0x225)]['addUser'](_0x33ac03['user']),_0x33ac03[_0x4ed2bc(0x22b)]){case v[_0x4ed2bc(0x246)]:break;case v[_0x4ed2bc(0x215)]:{this['_threadCommentModel']['addComment'](_0x54b011,_0x20a96c,{'unitId':_0x54b011,'subUnitId':_0x20a96c,'ref':'','id':_0x33ac03[_0x4ed2bc(0x21d)],'dT':y(+_0x33ac03['createTimestamp']),'threadId':_0x33ac03[_0x4ed2bc(0x245)],'personId':(_0x51b853=(_0x40a8e1=_0x33ac03[_0x4ed2bc(0x212)])==null?void 0x0:_0x40a8e1[_0x4ed2bc(0x1f0)])!=null?_0x51b853:_0x33ac03[_0x4ed2bc(0x1de)],'text':JSON['parse'](_0x33ac03['content']),'parentId':_0x5ae392['id']});break;}case v[_0x4ed2bc(0x236)]:{const _0x4f5fdb=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x234)](_0x54b011,_0x20a96c,_0x33ac03['replyId']);_0x4f5fdb&&_0x4f5fdb[_0x4ed2bc(0x1fa)]&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x21e)](_0x54b011,_0x20a96c,_0x33ac03[_0x4ed2bc(0x21d)]);break;}case v['Edit']:{this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x210)](_0x54b011,_0x20a96c,{'commentId':_0x33ac03[_0x4ed2bc(0x21d)],'text':JSON[_0x4ed2bc(0x201)](_0x33ac03[_0x4ed2bc(0x230)])});break;}case v['Solve']:{const _0x40bb85=(_0x28f354=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0xf82527=>_0xf82527[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x28f354[_0x4ed2bc(0x23b)];_0x40bb85&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x213)](_0x54b011,_0x20a96c,_0x40bb85['id'],_0x33ac03['solved']===I[_0x4ed2bc(0x1f4)]);break;}}}));}};_=V([p(0x0,_0xc9741e(_0xa2ebfd)),p(0x1,_0xc9741e(_0x5a9473)),p(0x2,_0xc9741e(_0x3f7db5)),p(0x3,_0xc9741e(_0x54bd73))],_);const z=_0x25faa0(0x221),O={};var k=Object[_0x25faa0(0x238)],Q=(_0x50458b,_0x2cfa27,_0x165052,_0x2cb40f)=>{const _0x561009=_0x25faa0;for(var _0x1ebc4e=_0x2cb40f>0x1?void 0x0:_0x2cb40f?k(_0x2cfa27,_0x165052):_0x2cfa27,_0x1459c9=_0x50458b[_0x561009(0x203)]-0x1,_0x5e1865;_0x1459c9>=0x0;_0x1459c9--)(_0x5e1865=_0x50458b[_0x1459c9])&&(_0x1ebc4e=_0x5e1865(_0x1ebc4e)||_0x1ebc4e);return _0x1ebc4e;},b=(_0x8caf4f,_0x5dcebf)=>(_0x42d5bd,_0x135186)=>_0x5dcebf(_0x42d5bd,_0x135186,_0x8caf4f);function X(_0x1abb62,_0x242971){const _0x4cd15f=_0x25faa0,_0x159188=_0x1abb62[_0x4cd15f(0x208)][0x0];return{..._0x242971,'id':_0x159188[_0x4cd15f(0x21d)],'resolved':_0x1abb62[_0x4cd15f(0x1f7)]===0x1,'dT':y(_0x159188[_0x4cd15f(0x1f5)]),'personId':_0x159188[_0x4cd15f(0x1de)],'threadId':_0x159188[_0x4cd15f(0x245)]};}function ee(_0x9ab101,_0x20675e,_0x219a65){const _0xb1361e=_0x25faa0;var _0xda8d60,_0x1308cf;if(((_0x1308cf=(_0xda8d60=_0x9ab101==null?void 0x0:_0x9ab101[_0xb1361e(0x208)])==null?void 0x0:_0xda8d60['length'])!=null?_0x1308cf:0x0)>0x0){const _0x3d84ab=(_0x5e253c,_0x260acc)=>({'id':_0x5e253c[_0xb1361e(0x21d)],'threadId':_0x5e253c[_0xb1361e(0x245)],'dT':y(_0x5e253c['createTimestamp']),'personId':_0x5e253c['userId'],'resolved':_0x9ab101[_0xb1361e(0x1f7)]===I[_0xb1361e(0x1f4)],'unitId':_0x20675e,'subUnitId':_0x219a65,'text':JSON[_0xb1361e(0x201)](_0x5e253c[_0xb1361e(0x230)]),'parentId':_0x260acc}),_0x516cad=_0x3d84ab(_0x9ab101[_0xb1361e(0x208)][0x0]);return{..._0x516cad,'children':_0x9ab101[_0xb1361e(0x208)][_0xb1361e(0x1fe)](0x1)[_0xb1361e(0x204)](_0x19c60b=>_0x3d84ab(_0x19c60b,_0x516cad['id']))};}return null;}let S=class{constructor(_0x5163d6,_0x1c96ab,_0x54eac6){const _0x1a4021=_0x25faa0;this[_0x1a4021(0x220)]=_0x5163d6,this[_0x1a4021(0x225)]=_0x1c96ab,this['_sessionService']=_0x54eac6;}async[_0x25faa0(0x1df)](_0xb52cc5){const _0x5cbebd=_0x25faa0;var _0x2b7bf9,_0x3a4fa9;const {parentId:_0x2a52a4,unitId:_0x2a5aa8,text:_0x37759b,threadId:_0x3a0471}=_0xb52cc5,_0x2a485a=(_0x3a4fa9=(_0x2b7bf9=_0x37759b[_0x5cbebd(0x23f)])==null?void 0x0:_0x2b7bf9[_0x5cbebd(0x233)](_0x22af43=>_0x22af43[_0x5cbebd(0x1fc)]===_0x2b4870[_0x5cbebd(0x226)])[_0x5cbebd(0x204)](_0x67caea=>_0x67caea[_0x5cbebd(0x207)]))!=null?_0x3a4fa9:[],_0x462f99=JSON[_0x5cbebd(0x23a)](_0x37759b),_0x14b7c0=(await this[_0x5cbebd(0x200)][_0x5cbebd(0x1ea)](_0x2a5aa8))['getMemberID']();if(_0x2a52a4){const _0x5141e0={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a,'threadId':_0x3a0471},_0x3231c2=(await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+_0x5cbebd(0x1ee),{'body':_0x5141e0}))[_0x5cbebd(0x247)][_0x5cbebd(0x217)];return{..._0xb52cc5,'id':_0x3231c2[_0x5cbebd(0x21d)],'dT':_0x5f5b37(+_0x3231c2['createTimestamp'])[_0x5cbebd(0x1e0)](_0x5cbebd(0x1ed)),'personId':_0x3231c2['userId']};}else{const _0x1d36f4={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a},_0x1b2cd8=await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+'/add',{'body':_0x1d36f4});return X(_0x1b2cd8[_0x5cbebd(0x247)][_0x5cbebd(0x242)],_0xb52cc5);}}async[_0x25faa0(0x210)](_0x25c88c){const _0x2e7441=_0x25faa0;var _0x154a7a,_0x5d039e;const {text:_0x35c186,unitId:_0x2a417d}=_0x25c88c,_0x68aa8=(_0x5d039e=(_0x154a7a=_0x35c186[_0x2e7441(0x23f)])==null?void 0x0:_0x154a7a['filter'](_0x19a6bc=>_0x19a6bc[_0x2e7441(0x1fc)]===_0x2b4870[_0x2e7441(0x226)])['map'](_0x562c31=>_0x562c31[_0x2e7441(0x207)]))!=null?_0x5d039e:[],_0x566172=JSON[_0x2e7441(0x23a)](_0x35c186),_0x3651dd=_0x25c88c[_0x2e7441(0x245)],_0x2e4d32=_0x25c88c['id'],_0x3cf0f3={'memberId':(await this[_0x2e7441(0x200)]['requireSession'](_0x2a417d))[_0x2e7441(0x22d)](),'unitId':_0x2a417d,'threadId':_0x3651dd,'mention':_0x68aa8,'content':_0x566172,'replyId':_0x2e4d32},_0x25d94a=await this[_0x2e7441(0x220)][_0x2e7441(0x1f9)](_0x2e7441(0x20a)+_0x2a417d+_0x2e7441(0x1e1),{'body':_0x3cf0f3});return!_0x25d94a[_0x2e7441(0x247)]['error']||_0x25d94a['body'][_0x2e7441(0x1e2)][_0x2e7441(0x214)]===0x1;}async[_0x25faa0(0x213)](_0x2e00fb){const _0x4d500b=_0x25faa0,{unitId:_0xd4084a}=_0x2e00fb,_0x139da7=_0x2e00fb[_0x4d500b(0x245)],_0xf4632={'memberId':this[_0x4d500b(0x225)][_0x4d500b(0x1ef)]()[_0x4d500b(0x1f0)],'unitId':_0xd4084a,'threadId':_0x139da7,'solved':_0x2e00fb[_0x4d500b(0x224)]?I[_0x4d500b(0x1f4)]:I[_0x4d500b(0x1fd)]},_0x4bed30=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xd4084a+_0x4d500b(0x21a),{'body':_0xf4632});return!_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]||_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]['code']===0x1;}async[_0x25faa0(0x21e)](_0x4657da,_0x5219b2,_0x3709a2,_0x91b25b){const _0x502ce2=_0x25faa0,_0x134b6d={'memberId':(await this[_0x502ce2(0x200)][_0x502ce2(0x1ea)](_0x4657da))[_0x502ce2(0x22d)](),'threadId':_0x3709a2,'replyId':_0x91b25b,'unitId':_0x4657da},_0x1404d8=await this[_0x502ce2(0x220)][_0x502ce2(0x1f9)](_0x502ce2(0x20a)+_0x4657da+_0x502ce2(0x239),{'body':_0x134b6d});return!_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]||_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]['code']===0x1;}async[_0x25faa0(0x206)](_0x24b97c,_0x2dc250,_0x242496){const _0x38b732=_0x25faa0,_0x41e338={'unitId':_0x24b97c,'threadId':_0x242496},_0x352d02=await this[_0x38b732(0x220)]['post'](_0x38b732(0x20a)+_0x24b97c+_0x38b732(0x211),{'body':_0x41e338}),_0x242e84=_0x242496[_0x38b732(0x204)](_0x564114=>ee(_0x352d02[_0x38b732(0x247)][_0x38b732(0x20f)][_0x564114],_0x24b97c,_0x2dc250))[_0x38b732(0x233)](Boolean);return Object[_0x38b732(0x222)](_0x352d02[_0x38b732(0x247)][_0x38b732(0x1e6)])[_0x38b732(0x1e8)](_0x1013da=>{const _0x136fe6=_0x38b732;this[_0x136fe6(0x225)]['addUser'](_0x1013da);}),_0x242e84;}[_0x25faa0(0x218)](_0x241013){const _0x474e19=_0x25faa0;return{'id':_0x241013['id'],'threadId':_0x241013['threadId'],'ref':_0x241013[_0x474e19(0x1f1)]};}};S=Q([b(0x0,_0xc9741e(_0x3bbb43)),b(0x1,_0xc9741e(_0x3f7db5)),b(0x2,_0xc9741e(_0x6ebfb5))],S);var re=Object[_0x25faa0(0x238)],te=(_0x35be7e,_0x5219d3,_0x59eb15,_0x552ca1)=>{const _0x14fbef=_0x25faa0;for(var _0x5a7101=_0x552ca1>0x1?void 0x0:_0x552ca1?re(_0x5219d3,_0x59eb15):_0x5219d3,_0x486000=_0x35be7e[_0x14fbef(0x203)]-0x1,_0x344a87;_0x486000>=0x0;_0x486000--)(_0x344a87=_0x35be7e[_0x486000])&&(_0x5a7101=_0x344a87(_0x5a7101)||_0x5a7101);return _0x5a7101;},M=(_0x49bb4f,_0x6e02e1)=>(_0x5e1e70,_0x5c86c0)=>_0x6e02e1(_0x5e1e70,_0x5c86c0,_0x49bb4f);let f=class extends _0x25aa90{constructor(_0x54fbfa,_0x5e24da){const _0x119e83=_0x25faa0;super(),this[_0x119e83(0x228)]=_0x54fbfa,this['_threadCommentDataSource']=_0x5e24da,this[_0x119e83(0x21f)]();}[_0x25faa0(0x21f)](){const _0x38512b=_0x25faa0;this[_0x38512b(0x228)][_0x38512b(0x240)]=this['_threadCommentDataSource'],this[_0x38512b(0x228)][_0x38512b(0x20c)]=!0x1;}};f=te([M(0x0,_0x18a375),M(0x1,_0xc9741e(S))],f);var se=Object[_0x25faa0(0x1eb)],oe=Object[_0x25faa0(0x238)],ne=(_0x2f075d,_0x407807,_0x5bdfad)=>_0x407807 in _0x2f075d?se(_0x2f075d,_0x407807,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bdfad}):_0x2f075d[_0x407807]=_0x5bdfad,ie=(_0x5425e8,_0x43c3fc,_0x473feb,_0x289190)=>{for(var _0x21f9a4=_0x289190>0x1?void 0x0:_0x289190?oe(_0x43c3fc,_0x473feb):_0x43c3fc,_0x5caa96=_0x5425e8['length']-0x1,_0x2f59b6;_0x5caa96>=0x0;_0x5caa96--)(_0x2f59b6=_0x5425e8[_0x5caa96])&&(_0x21f9a4=_0x2f59b6(_0x21f9a4)||_0x21f9a4);return _0x21f9a4;},N=(_0x288a79,_0xea4ffc)=>(_0x1e91e2,_0x3d09ec)=>_0xea4ffc(_0x1e91e2,_0x3d09ec,_0x288a79),$=(_0x57b778,_0x3c5bce,_0x418876)=>ne(_0x57b778,typeof _0x3c5bce!=_0x25faa0(0x21b)?_0x3c5bce+'':_0x3c5bce,_0x418876);let g=class extends _0x542bcc{constructor(_0x7c60fc=O,_0x1077ab,_0x34158d){const _0x414784=_0x25faa0;super(),this['_config']=_0x7c60fc,this[_0x414784(0x22a)]=_0x1077ab,this[_0x414784(0x1e3)]=_0x34158d;const {..._0x5d39e9}=_0x7d8ac9({},O,this[_0x414784(0x244)]);this[_0x414784(0x1e3)][_0x414784(0x24a)](z,_0x5d39e9);}[_0x25faa0(0x205)](){[[S],[f],[_]]['forEach'](_0x4e1af1=>{this['_injector']['add'](_0x4e1af1);});}['onReady'](){const _0x4b9be4=_0x25faa0;this[_0x4b9be4(0x22a)]['get'](f),this[_0x4b9be4(0x22a)][_0x4b9be4(0x1f8)](_);}};$(g,_0x25faa0(0x1e9),W),$(g,'type',_0x4e65bc[_0x25faa0(0x1ff)]),g=ie([_0x125195(_0x2d4016,_0x4d0826,_0x6f90f6),N(0x1,_0xc9741e(_0x54bd73)),N(0x2,_0x4521b1)],g);function _0x34aa(){const _0x106170=['/universer-api/comment/unit/','10330120zRyNlM','syncUpdateMutationToColla','find','_threadCommentModel','comments','updateComment','/list','user','resolveComment','code','Reply','Edit','reply','saveCommentToSnapshot','payload','/solved','symbol','36FfdlLu','replyId','deleteComment','_initDataSource','_httpService','thread-comment-data-source.config','values','848622irycZg','resolved','_userService','COMMENT','Unknown','_threadCommentDataSourceService','pipe','_injector','type','getUser','getMemberID','Solve','241950cRwsKf','content','getUnit','234380oiXcum','filter','getComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','/universer-api/user/list','getOwnPropertyDescriptor','/delete','stringify','root','personId','add','10771263tWvpGA','customRanges','dataSource','UNRECOGNIZED','comment','_commentService','_config','threadId','Add','body','7vUjGug','27992800iMJhhj','setConfig','userId','addComment','format','/edit','error','_configService','unitId','delete','users','778711NYDhET','forEach','pluginName','requireSession','defineProperty','8ZTkmMd','YYYY/MM/DD\x20HH:mm','/reply','getCurrentUser','userID','ref','commentUpdate$','_initUserSync','Solved','createTimestamp','_init','solved','get','post','parentId','disposeWithMe','rangeType','OpenOrReOpen','slice','UNIVER_UNKNOWN','_sessionService','parse','18dcFmTs','length','map','onStarting','listComments','rangeId','replies','subscribe'];_0x34aa=function(){return _0x106170;};return _0x34aa();}export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2df57e=_0x5e0c;(function(_0x216986,_0x317750){const _0x86c761=_0x5e0c,_0x5b3d7a=_0x216986();while(!![]){try{const _0x408e46=parseInt(_0x86c761(0x12f))/0x1*(parseInt(_0x86c761(0x13d))/0x2)+parseInt(_0x86c761(0x11b))/0x3*(parseInt(_0x86c761(0x110))/0x4)+parseInt(_0x86c761(0xf9))/0x5*(parseInt(_0x86c761(0x143))/0x6)+parseInt(_0x86c761(0x10e))/0x7+parseInt(_0x86c761(0x125))/0x8*(parseInt(_0x86c761(0x12d))/0x9)+parseInt(_0x86c761(0x121))/0xa+-parseInt(_0x86c761(0x116))/0xb;if(_0x408e46===_0x317750)break;else _0x5b3d7a['push'](_0x5b3d7a['shift']());}catch(_0x3c1b88){_0x5b3d7a['push'](_0x5b3d7a['shift']());}}}(_0x129b,0x21b1f));import{CommentService as _0x2ca153,CollaborationSessionService as _0x50d4fb,UniverCollaborationClientPlugin as _0x9f917b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d1065}from'@univerjs-pro/license';import{dayjs as _0x479e24,UserManagerService as _0x3391ff,Inject as _0x18776e,Injector as _0x450dbc,Disposable as _0x6ff48f,CustomRangeType as _0x525ecc,UniverInstanceType as _0xefb13,DependentOn as _0x53ac22,IConfigService as _0x5d7bed,Plugin as _0x415431,merge as _0x3ae601}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5c9762}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x22a644,IThreadCommentDataSourceService as _0x191df3}from'@univerjs/thread-comment';import{bufferTime as _0x6ecdfc}from'rxjs';import{HTTPService as _0x2c40b3}from'@univerjs/network';const W=_0x2df57e(0x129);var I=(_0x418b2a=>(_0x418b2a[_0x418b2a[_0x2df57e(0x103)]=0x0]=_0x2df57e(0x103),_0x418b2a[_0x418b2a['Solved']=0x1]=_0x2df57e(0x10f),_0x418b2a[_0x418b2a[_0x2df57e(0xf3)]=-0x1]=_0x2df57e(0xf3),_0x418b2a))(I||{}),v=(_0x36a6d2=>(_0x36a6d2[_0x36a6d2[_0x2df57e(0x144)]=0x0]='Unknown',_0x36a6d2[_0x36a6d2[_0x2df57e(0x10d)]=0x1]='Add',_0x36a6d2[_0x36a6d2['Reply']=0x2]='Reply',_0x36a6d2[_0x36a6d2['Edit']=0x3]=_0x2df57e(0x14c),_0x36a6d2[_0x36a6d2[_0x2df57e(0x149)]=0x4]=_0x2df57e(0x149),_0x36a6d2[_0x36a6d2[_0x2df57e(0xef)]=0x5]='Solve',_0x36a6d2[_0x36a6d2[_0x2df57e(0xf3)]=-0x1]=_0x2df57e(0xf3),_0x36a6d2))(v||{});const y=_0x35b876=>_0x479e24(new Date(+_0x35b876))[_0x2df57e(0x134)](_0x2df57e(0x14f)),B=async(_0x239a71,_0x514647)=>{const _0x22100c=_0x2df57e,_0x531666=_0x239a71[_0x22100c(0x133)](_0x3391ff),_0x3ed7fc=_0x239a71[_0x22100c(0x133)](_0x2c40b3);_0x514647[_0x22100c(0xfa)](_0x3357f4=>{const _0x9479f4=_0x22100c;_0x531666[_0x9479f4(0x104)](_0x3357f4)&&_0x514647[_0x9479f4(0x119)](_0x3357f4);}),_0x514647['size']&&(await _0x3ed7fc[_0x22100c(0x133)](_0x22100c(0x14e),{'params':{'userIDs':[..._0x514647]}}))[_0x22100c(0x113)][_0x22100c(0xec)][_0x22100c(0xfa)](_0x14efae=>{_0x14efae&&_0x531666['addUser'](_0x14efae);});};var K=Object[_0x2df57e(0x13b)],V=(_0xa17a6a,_0x4a3b78,_0x262d70,_0x2c7f2e)=>{const _0xdb9475=_0x2df57e;for(var _0x48d145=_0x2c7f2e>0x1?void 0x0:_0x2c7f2e?K(_0x4a3b78,_0x262d70):_0x4a3b78,_0x4ce027=_0xa17a6a[_0xdb9475(0x101)]-0x1,_0x365d8b;_0x4ce027>=0x0;_0x4ce027--)(_0x365d8b=_0xa17a6a[_0x4ce027])&&(_0x48d145=_0x365d8b(_0x48d145)||_0x48d145);return _0x48d145;},p=(_0x4b20ca,_0x3ad02f)=>(_0x28e79d,_0x57c547)=>_0x3ad02f(_0x28e79d,_0x57c547,_0x4b20ca);let _=class extends _0x6ff48f{constructor(_0x416dd4,_0x5af778,_0x529fca,_0x9bfbf3){const _0x1ff28c=_0x2df57e;super(),this[_0x1ff28c(0x138)]=_0x416dd4,this[_0x1ff28c(0x12b)]=_0x5af778,this['_userService']=_0x529fca,this[_0x1ff28c(0x122)]=_0x9bfbf3,this[_0x1ff28c(0x124)](),this[_0x1ff28c(0x137)]();}[_0x2df57e(0x137)](){const _0x3109e2=_0x2df57e;this[_0x3109e2(0x127)](this[_0x3109e2(0x12b)][_0x3109e2(0x13e)][_0x3109e2(0x106)](_0x6ecdfc(0x10))[_0x3109e2(0x114)](_0x241810=>{const _0x20f028=_0x3109e2,_0x3f12b7=new Set();_0x241810[_0x20f028(0xfa)](_0x386e83=>{const _0x2bf348=_0x20f028;switch(_0x386e83[_0x2bf348(0x109)]){case _0x2bf348(0x111):{const _0xe27159=_0x386e83[_0x2bf348(0xf1)]['personId'];_0x3f12b7[_0x2bf348(0x111)](_0xe27159);break;}}}),B(this[_0x20f028(0x122)],_0x3f12b7);}));}[_0x2df57e(0x124)](){const _0x18276f=_0x2df57e;this[_0x18276f(0x127)](this[_0x18276f(0x138)][_0x18276f(0x13e)]['subscribe'](async _0x1e8776=>{const _0x2fea5e=_0x18276f;var _0x326346,_0x363885,_0x3ca518,_0x4e6fcc;const _0x321a28=(_0x326346=this[_0x2fea5e(0x12b)]['getUnit'](_0x1e8776[_0x2fea5e(0x112)])[_0x2fea5e(0x140)](_0x15dc61=>_0x15dc61['threadId']===_0x1e8776[_0x2fea5e(0x10c)]))==null?void 0x0:_0x326346[_0x2fea5e(0x14b)];if(!_0x321a28)return;const {unitId:_0x330dc6,subUnitId:_0x3d7524}=_0x321a28;switch(_0x1e8776[_0x2fea5e(0xed)]&&this[_0x2fea5e(0x14a)][_0x2fea5e(0xf8)](_0x1e8776[_0x2fea5e(0xed)]),_0x1e8776[_0x2fea5e(0x109)]){case v[_0x2fea5e(0x10d)]:break;case v[_0x2fea5e(0x10b)]:{this['_threadCommentModel']['addComment'](_0x330dc6,_0x3d7524,{'unitId':_0x330dc6,'subUnitId':_0x3d7524,'ref':'','id':_0x1e8776[_0x2fea5e(0x105)],'dT':y(+_0x1e8776[_0x2fea5e(0x108)]),'threadId':_0x1e8776[_0x2fea5e(0x10c)],'personId':(_0x3ca518=(_0x363885=_0x1e8776[_0x2fea5e(0xed)])==null?void 0x0:_0x363885['userID'])!=null?_0x3ca518:_0x1e8776['userId'],'text':JSON[_0x2fea5e(0xfd)](_0x1e8776[_0x2fea5e(0xf6)]),'parentId':_0x321a28['id']});break;}case v[_0x2fea5e(0x149)]:{const _0x5d5d68=this[_0x2fea5e(0x12b)][_0x2fea5e(0xfc)](_0x330dc6,_0x3d7524,_0x1e8776['replyId']);_0x5d5d68&&_0x5d5d68['parentId']&&this[_0x2fea5e(0x12b)]['deleteComment'](_0x330dc6,_0x3d7524,_0x1e8776['replyId']);break;}case v[_0x2fea5e(0x14c)]:{this[_0x2fea5e(0x12b)][_0x2fea5e(0x131)](_0x330dc6,_0x3d7524,{'commentId':_0x1e8776[_0x2fea5e(0x105)],'text':JSON['parse'](_0x1e8776[_0x2fea5e(0xf6)])});break;}case v[_0x2fea5e(0xef)]:{const _0x338167=(_0x4e6fcc=this['_threadCommentModel'][_0x2fea5e(0x148)](_0x1e8776[_0x2fea5e(0x112)])[_0x2fea5e(0x140)](_0x409772=>_0x409772[_0x2fea5e(0x10c)]===_0x1e8776['threadId']))==null?void 0x0:_0x4e6fcc['root'];_0x338167&&this['_threadCommentModel'][_0x2fea5e(0x11c)](_0x330dc6,_0x3d7524,_0x338167['id'],_0x1e8776[_0x2fea5e(0x128)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x18776e(_0x2ca153)),p(0x1,_0x18776e(_0x22a644)),p(0x2,_0x18776e(_0x3391ff)),p(0x3,_0x18776e(_0x450dbc))],_);const z=_0x2df57e(0x132),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3312b8,_0x7d809d,_0x17117c,_0x10dc37)=>{const _0x56015e=_0x2df57e;for(var _0x7cdee8=_0x10dc37>0x1?void 0x0:_0x10dc37?k(_0x7d809d,_0x17117c):_0x7d809d,_0x4c2d24=_0x3312b8[_0x56015e(0x101)]-0x1,_0x497906;_0x4c2d24>=0x0;_0x4c2d24--)(_0x497906=_0x3312b8[_0x4c2d24])&&(_0x7cdee8=_0x497906(_0x7cdee8)||_0x7cdee8);return _0x7cdee8;},b=(_0x571f7b,_0x138c81)=>(_0x1705ba,_0x42e228)=>_0x138c81(_0x1705ba,_0x42e228,_0x571f7b);function X(_0xf82f4,_0x318d20){const _0x10fa94=_0x2df57e,_0x598b8a=_0xf82f4['replies'][0x0];return{..._0x318d20,'id':_0x598b8a[_0x10fa94(0x105)],'resolved':_0xf82f4[_0x10fa94(0x128)]===0x1,'dT':y(_0x598b8a['createTimestamp']),'personId':_0x598b8a['userId'],'threadId':_0x598b8a[_0x10fa94(0x10c)]};}function ee(_0xd923e2,_0x91e9de,_0x7e4771){const _0x42041b=_0x2df57e;var _0x42a4c9,_0x2ce87e;if(((_0x2ce87e=(_0x42a4c9=_0xd923e2==null?void 0x0:_0xd923e2[_0x42041b(0x135)])==null?void 0x0:_0x42a4c9[_0x42041b(0x101)])!=null?_0x2ce87e:0x0)>0x0){const _0x4aec0e=(_0x54b5e5,_0xc74423)=>({'id':_0x54b5e5[_0x42041b(0x105)],'threadId':_0x54b5e5[_0x42041b(0x10c)],'dT':y(_0x54b5e5[_0x42041b(0x108)]),'personId':_0x54b5e5['userId'],'resolved':_0xd923e2[_0x42041b(0x128)]===I[_0x42041b(0x10f)],'unitId':_0x91e9de,'subUnitId':_0x7e4771,'text':JSON[_0x42041b(0xfd)](_0x54b5e5[_0x42041b(0xf6)]),'parentId':_0xc74423}),_0x469822=_0x4aec0e(_0xd923e2[_0x42041b(0x135)][0x0]);return{..._0x469822,'children':_0xd923e2[_0x42041b(0x135)][_0x42041b(0x146)](0x1)[_0x42041b(0x136)](_0x573178=>_0x4aec0e(_0x573178,_0x469822['id']))};}return null;}let S=class{constructor(_0x3e9ca2,_0x8f12c2,_0x5e8038){const _0x2eedae=_0x2df57e;this[_0x2eedae(0x11a)]=_0x3e9ca2,this['_userService']=_0x8f12c2,this[_0x2eedae(0xfe)]=_0x5e8038;}async[_0x2df57e(0xea)](_0x2adf0e){const _0x528850=_0x2df57e;var _0xc2258d,_0x1c42b8;const {parentId:_0x4edafa,unitId:_0x1c99ce,text:_0x1caca3,threadId:_0x463993}=_0x2adf0e,_0x2e89f1=(_0x1c42b8=(_0xc2258d=_0x1caca3['customRanges'])==null?void 0x0:_0xc2258d[_0x528850(0x147)](_0x394559=>_0x394559[_0x528850(0x13c)]===_0x525ecc[_0x528850(0x11f)])['map'](_0x3e5b56=>_0x3e5b56['rangeId']))!=null?_0x1c42b8:[],_0x2a45f0=JSON[_0x528850(0xff)](_0x1caca3),_0x1419e9=(await this[_0x528850(0xfe)][_0x528850(0x141)](_0x1c99ce))[_0x528850(0x118)]();if(_0x4edafa){const _0x55e3d3={'memberId':_0x1419e9,'unitId':_0x1c99ce,'content':_0x2a45f0,'mention':_0x2e89f1,'threadId':_0x463993},_0x5ac32a=(await this[_0x528850(0x11a)][_0x528850(0xf0)]('/universer-api/comment/unit/'+_0x1c99ce+_0x528850(0x100),{'body':_0x55e3d3}))[_0x528850(0x113)][_0x528850(0x107)];return{..._0x2adf0e,'id':_0x5ac32a['replyId'],'dT':_0x479e24(+_0x5ac32a[_0x528850(0x108)])[_0x528850(0x134)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5ac32a[_0x528850(0x117)]};}else{const _0x2f82a6={'memberId':_0x1419e9,'unitId':_0x1c99ce,'content':_0x2a45f0,'mention':_0x2e89f1},_0x3b23cd=await this[_0x528850(0x11a)]['post'](_0x528850(0x145)+_0x1c99ce+'/add',{'body':_0x2f82a6});return X(_0x3b23cd[_0x528850(0x113)][_0x528850(0xf2)],_0x2adf0e);}}async[_0x2df57e(0x131)](_0x2bf7c5){const _0x25ea8a=_0x2df57e;var _0x3d531f,_0x28dd3b;const {text:_0x296ac4,unitId:_0x157793}=_0x2bf7c5,_0x2761da=(_0x28dd3b=(_0x3d531f=_0x296ac4['customRanges'])==null?void 0x0:_0x3d531f[_0x25ea8a(0x147)](_0x258917=>_0x258917[_0x25ea8a(0x13c)]===_0x525ecc[_0x25ea8a(0x11f)])['map'](_0x42686e=>_0x42686e[_0x25ea8a(0x12c)]))!=null?_0x28dd3b:[],_0x17b74d=JSON['stringify'](_0x296ac4),_0x98e84b=_0x2bf7c5['threadId'],_0x31e3ca=_0x2bf7c5['id'],_0x11431c={'memberId':(await this[_0x25ea8a(0xfe)]['requireSession'](_0x157793))[_0x25ea8a(0x118)](),'unitId':_0x157793,'threadId':_0x98e84b,'mention':_0x2761da,'content':_0x17b74d,'replyId':_0x31e3ca},_0x3ab397=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x157793+_0x25ea8a(0xf4),{'body':_0x11431c});return!_0x3ab397[_0x25ea8a(0x113)][_0x25ea8a(0x126)]||_0x3ab397[_0x25ea8a(0x113)][_0x25ea8a(0x126)][_0x25ea8a(0xeb)]===0x1;}async[_0x2df57e(0x11c)](_0x2f643b){const _0x4f02f0=_0x2df57e,{unitId:_0x3c088c}=_0x2f643b,_0xa5d433=_0x2f643b['threadId'],_0x37827d={'memberId':this[_0x4f02f0(0x14a)][_0x4f02f0(0x12e)]()[_0x4f02f0(0x142)],'unitId':_0x3c088c,'threadId':_0xa5d433,'solved':_0x2f643b['resolved']?I[_0x4f02f0(0x10f)]:I[_0x4f02f0(0x103)]},_0x3f2522=await this[_0x4f02f0(0x11a)][_0x4f02f0(0xf0)](_0x4f02f0(0x145)+_0x3c088c+_0x4f02f0(0x123),{'body':_0x37827d});return!_0x3f2522[_0x4f02f0(0x113)][_0x4f02f0(0x126)]||_0x3f2522['body']['error']['code']===0x1;}async['deleteComment'](_0x2e0780,_0x40977c,_0xc24a2f,_0x41a57d){const _0x4687ac=_0x2df57e,_0x4d29ba={'memberId':(await this['_sessionService'][_0x4687ac(0x141)](_0x2e0780))[_0x4687ac(0x118)](),'threadId':_0xc24a2f,'replyId':_0x41a57d,'unitId':_0x2e0780},_0x50b595=await this[_0x4687ac(0x11a)]['post']('/universer-api/comment/unit/'+_0x2e0780+'/delete',{'body':_0x4d29ba});return!_0x50b595['body']['error']||_0x50b595['body'][_0x4687ac(0x126)][_0x4687ac(0xeb)]===0x1;}async[_0x2df57e(0x14d)](_0x4aeba1,_0x70ceef,_0x1df212){const _0x598c5f=_0x2df57e,_0x4e8bcd={'unitId':_0x4aeba1,'threadId':_0x1df212},_0x55c85f=await this[_0x598c5f(0x11a)][_0x598c5f(0xf0)](_0x598c5f(0x145)+_0x4aeba1+_0x598c5f(0xee),{'body':_0x4e8bcd}),_0x3dc01a=_0x1df212['map'](_0x2e1293=>ee(_0x55c85f[_0x598c5f(0x113)]['comments'][_0x2e1293],_0x4aeba1,_0x70ceef))[_0x598c5f(0x147)](Boolean);return Object[_0x598c5f(0x11e)](_0x55c85f['body'][_0x598c5f(0xec)])[_0x598c5f(0xfa)](_0xe314ce=>{const _0x101fef=_0x598c5f;this['_userService'][_0x101fef(0xf8)](_0xe314ce);}),_0x3dc01a;}[_0x2df57e(0x11d)](_0x80f058){const _0x5b5e58=_0x2df57e;return{'id':_0x80f058['id'],'threadId':_0x80f058['threadId'],'ref':_0x80f058[_0x5b5e58(0x13f)]};}};function _0x5e0c(_0x307c4f,_0x28c5ba){const _0x129bca=_0x129b();return _0x5e0c=function(_0x5e0c30,_0x5b9d08){_0x5e0c30=_0x5e0c30-0xea;let _0x4be09c=_0x129bca[_0x5e0c30];return _0x4be09c;},_0x5e0c(_0x307c4f,_0x28c5ba);}function _0x129b(){const _0xab210=['createTimestamp','type','onReady','Reply','threadId','Add','247590aPxYRW','Solved','8vbkFrA','add','unitId','body','subscribe','pluginName','6954662qkUMeV','userId','getMemberID','delete','_httpService','103143alqrEm','resolveComment','saveCommentToSnapshot','values','COMMENT','defineProperty','2347090uzkSWZ','_injector','/solved','_init','828152SashBe','error','disposeWithMe','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','_threadCommentModel','rangeId','9HagVIL','getCurrentUser','7367IfrDig','symbol','updateComment','thread-comment-data-source.config','get','format','replies','map','_initUserSync','_commentService','_threadCommentDataSource','setConfig','getOwnPropertyDescriptor','rangeType','40VIDFAS','commentUpdate$','ref','find','requireSession','userID','1083342rDCome','Unknown','/universer-api/comment/unit/','slice','filter','getUnit','Delete','_userService','root','Edit','listComments','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','addComment','code','users','user','/list','Solve','post','payload','comment','UNRECOGNIZED','/edit','_config','content','dataSource','addUser','5nAbWYt','forEach','_threadCommentDataSourceService','getComment','parse','_sessionService','stringify','/reply','length','_configService','OpenOrReOpen','getUser','replyId','pipe','reply'];_0x129b=function(){return _0xab210;};return _0x129b();}S=Q([b(0x0,_0x18776e(_0x2c40b3)),b(0x1,_0x18776e(_0x3391ff)),b(0x2,_0x18776e(_0x50d4fb))],S);var re=Object[_0x2df57e(0x13b)],te=(_0x2d998a,_0x24fe1b,_0x4b3547,_0x394193)=>{const _0x4f79ac=_0x2df57e;for(var _0x89ac49=_0x394193>0x1?void 0x0:_0x394193?re(_0x24fe1b,_0x4b3547):_0x24fe1b,_0x53ea72=_0x2d998a[_0x4f79ac(0x101)]-0x1,_0x59a9b8;_0x53ea72>=0x0;_0x53ea72--)(_0x59a9b8=_0x2d998a[_0x53ea72])&&(_0x89ac49=_0x59a9b8(_0x89ac49)||_0x89ac49);return _0x89ac49;},M=(_0x369163,_0x56662d)=>(_0x57945b,_0x2bd66f)=>_0x56662d(_0x57945b,_0x2bd66f,_0x369163);let f=class extends _0x6ff48f{constructor(_0x4687ff,_0x4adb7a){const _0x45742d=_0x2df57e;super(),this['_threadCommentDataSourceService']=_0x4687ff,this['_threadCommentDataSource']=_0x4adb7a,this[_0x45742d(0x12a)]();}['_initDataSource'](){const _0x25f890=_0x2df57e;this[_0x25f890(0xfb)][_0x25f890(0xf7)]=this[_0x25f890(0x139)],this[_0x25f890(0xfb)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x191df3),M(0x1,_0x18776e(S))],f);var se=Object[_0x2df57e(0x120)],oe=Object[_0x2df57e(0x13b)],ne=(_0x1a97ab,_0x5f5985,_0xacf64d)=>_0x5f5985 in _0x1a97ab?se(_0x1a97ab,_0x5f5985,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xacf64d}):_0x1a97ab[_0x5f5985]=_0xacf64d,ie=(_0x4592e9,_0x3b0195,_0x4f694d,_0x30ce71)=>{for(var _0x365549=_0x30ce71>0x1?void 0x0:_0x30ce71?oe(_0x3b0195,_0x4f694d):_0x3b0195,_0x1969c7=_0x4592e9['length']-0x1,_0x5b383e;_0x1969c7>=0x0;_0x1969c7--)(_0x5b383e=_0x4592e9[_0x1969c7])&&(_0x365549=_0x5b383e(_0x365549)||_0x365549);return _0x365549;},N=(_0x400ffa,_0x338df2)=>(_0x82f31b,_0xea5e61)=>_0x338df2(_0x82f31b,_0xea5e61,_0x400ffa),$=(_0x5a58d5,_0xe854c7,_0x7f5156)=>ne(_0x5a58d5,typeof _0xe854c7!=_0x2df57e(0x130)?_0xe854c7+'':_0xe854c7,_0x7f5156);let g=class extends _0x415431{constructor(_0x321f4e=O,_0xd93a0c,_0x510113){const _0x42e0d0=_0x2df57e;super(),this[_0x42e0d0(0xf5)]=_0x321f4e,this['_injector']=_0xd93a0c,this[_0x42e0d0(0x102)]=_0x510113;const {..._0x5ef4c9}=_0x3ae601({},O,this['_config']);this[_0x42e0d0(0x102)][_0x42e0d0(0x13a)](z,_0x5ef4c9);}['onStarting'](){const _0x1abc1f=_0x2df57e;[[S],[f],[_]][_0x1abc1f(0xfa)](_0x37d170=>{const _0x58c7f9=_0x1abc1f;this[_0x58c7f9(0x122)][_0x58c7f9(0x111)](_0x37d170);});}[_0x2df57e(0x10a)](){const _0x2ff896=_0x2df57e;this[_0x2ff896(0x122)][_0x2ff896(0x133)](f),this[_0x2ff896(0x122)][_0x2ff896(0x133)](_);}};$(g,_0x2df57e(0x115),W),$(g,_0x2df57e(0x109),_0xefb13['UNIVER_UNKNOWN']),g=ie([_0x53ac22(_0x5c9762,_0x9f917b,_0x5d1065),N(0x1,_0x18776e(_0x450dbc)),N(0x2,_0x5d7bed)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x25faa0=_0x30b4;(function(_0xa99cc1,_0x52040a){const _0x17ca33=_0x30b4,_0x4a215d=_0xa99cc1();while(!![]){try{const _0x59f580=parseInt(_0x17ca33(0x1e7))/0x1+-parseInt(_0x17ca33(0x202))/0x2*(parseInt(_0x17ca33(0x22f))/0x3)+parseInt(_0x17ca33(0x21c))/0x4*(parseInt(_0x17ca33(0x232))/0x5)+-parseInt(_0x17ca33(0x223))/0x6*(parseInt(_0x17ca33(0x248))/0x7)+parseInt(_0x17ca33(0x1ec))/0x8*(-parseInt(_0x17ca33(0x23e))/0x9)+-parseInt(_0x17ca33(0x20b))/0xa+parseInt(_0x17ca33(0x249))/0xb;if(_0x59f580===_0x52040a)break;else _0x4a215d['push'](_0x4a215d['shift']());}catch(_0x176779){_0x4a215d['push'](_0x4a215d['shift']());}}}(_0x34aa,0x9e461));import{CommentService as _0xa2ebfd,CollaborationSessionService as _0x6ebfb5,UniverCollaborationClientPlugin as _0x4d0826}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x6f90f6}from'@univerjs-pro/license';import{dayjs as _0x5f5b37,UserManagerService as _0x3f7db5,Inject as _0xc9741e,Injector as _0x54bd73,Disposable as _0x25aa90,CustomRangeType as _0x2b4870,UniverInstanceType as _0x4e65bc,DependentOn as _0x125195,IConfigService as _0x4521b1,Plugin as _0x542bcc,merge as _0x7d8ac9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2d4016}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5a9473,IThreadCommentDataSourceService as _0x18a375}from'@univerjs/thread-comment';import{bufferTime as _0x5e308e}from'rxjs';function _0x30b4(_0x43136d,_0x4460d4){const _0x34aaeb=_0x34aa();return _0x30b4=function(_0x30b47b,_0x4ee0b0){_0x30b47b=_0x30b47b-0x1de;let _0x18f0ad=_0x34aaeb[_0x30b47b];return _0x18f0ad;},_0x30b4(_0x43136d,_0x4460d4);}import{HTTPService as _0x3bbb43}from'@univerjs/network';const W=_0x25faa0(0x235);var I=(_0x3b8563=>(_0x3b8563[_0x3b8563[_0x25faa0(0x1fd)]=0x0]='OpenOrReOpen',_0x3b8563[_0x3b8563['Solved']=0x1]='Solved',_0x3b8563[_0x3b8563[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x3b8563))(I||{}),v=(_0x42e44f=>(_0x42e44f[_0x42e44f[_0x25faa0(0x227)]=0x0]=_0x25faa0(0x227),_0x42e44f[_0x42e44f['Add']=0x1]='Add',_0x42e44f[_0x42e44f[_0x25faa0(0x215)]=0x2]=_0x25faa0(0x215),_0x42e44f[_0x42e44f[_0x25faa0(0x216)]=0x3]=_0x25faa0(0x216),_0x42e44f[_0x42e44f['Delete']=0x4]=_0x25faa0(0x236),_0x42e44f[_0x42e44f[_0x25faa0(0x22e)]=0x5]=_0x25faa0(0x22e),_0x42e44f[_0x42e44f[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x42e44f))(v||{});const y=_0x58a32e=>_0x5f5b37(new Date(+_0x58a32e))[_0x25faa0(0x1e0)](_0x25faa0(0x1ed)),B=async(_0x17e8ed,_0x4b6bc6)=>{const _0x4faf91=_0x25faa0,_0x25123a=_0x17e8ed[_0x4faf91(0x1f8)](_0x3f7db5),_0xe17c12=_0x17e8ed[_0x4faf91(0x1f8)](_0x3bbb43);_0x4b6bc6['forEach'](_0x33f45b=>{const _0x42367f=_0x4faf91;_0x25123a[_0x42367f(0x22c)](_0x33f45b)&&_0x4b6bc6[_0x42367f(0x1e5)](_0x33f45b);}),_0x4b6bc6['size']&&(await _0xe17c12['get'](_0x4faf91(0x237),{'params':{'userIDs':[..._0x4b6bc6]}}))['body'][_0x4faf91(0x1e6)][_0x4faf91(0x1e8)](_0xe32af3=>{_0xe32af3&&_0x25123a['addUser'](_0xe32af3);});};var K=Object[_0x25faa0(0x238)],V=(_0xe86f59,_0x4c6ffc,_0x2c840c,_0x1cf7d3)=>{const _0x321d21=_0x25faa0;for(var _0x294a54=_0x1cf7d3>0x1?void 0x0:_0x1cf7d3?K(_0x4c6ffc,_0x2c840c):_0x4c6ffc,_0x5ba2a1=_0xe86f59[_0x321d21(0x203)]-0x1,_0x5511db;_0x5ba2a1>=0x0;_0x5ba2a1--)(_0x5511db=_0xe86f59[_0x5ba2a1])&&(_0x294a54=_0x5511db(_0x294a54)||_0x294a54);return _0x294a54;},p=(_0x3e5f7e,_0x199364)=>(_0x3a7908,_0x2fbc3b)=>_0x199364(_0x3a7908,_0x2fbc3b,_0x3e5f7e);let _=class extends _0x25aa90{constructor(_0x3a14b5,_0x366f0a,_0x2ecc78,_0x5a5439){const _0x3d6cd7=_0x25faa0;super(),this[_0x3d6cd7(0x243)]=_0x3a14b5,this[_0x3d6cd7(0x20e)]=_0x366f0a,this['_userService']=_0x2ecc78,this[_0x3d6cd7(0x22a)]=_0x5a5439,this[_0x3d6cd7(0x1f6)](),this[_0x3d6cd7(0x1f3)]();}[_0x25faa0(0x1f3)](){const _0x4968e3=_0x25faa0;this[_0x4968e3(0x1fb)](this['_threadCommentModel'][_0x4968e3(0x1f2)][_0x4968e3(0x229)](_0x5e308e(0x10))['subscribe'](_0x2ec4b6=>{const _0x564076=_0x4968e3,_0x4bdbca=new Set();_0x2ec4b6[_0x564076(0x1e8)](_0x28b5ac=>{const _0x1320b0=_0x564076;switch(_0x28b5ac[_0x1320b0(0x22b)]){case _0x1320b0(0x23d):{const _0x3f7d51=_0x28b5ac[_0x1320b0(0x219)][_0x1320b0(0x23c)];_0x4bdbca[_0x1320b0(0x23d)](_0x3f7d51);break;}}}),B(this[_0x564076(0x22a)],_0x4bdbca);}));}[_0x25faa0(0x1f6)](){const _0x3be1d6=_0x25faa0;this['disposeWithMe'](this[_0x3be1d6(0x243)][_0x3be1d6(0x1f2)][_0x3be1d6(0x209)](async _0x33ac03=>{const _0x4ed2bc=_0x3be1d6;var _0x4706d3,_0x40a8e1,_0x51b853,_0x28f354;const _0x5ae392=(_0x4706d3=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0x13c896=>_0x13c896[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x4706d3[_0x4ed2bc(0x23b)];if(!_0x5ae392)return;const {unitId:_0x54b011,subUnitId:_0x20a96c}=_0x5ae392;switch(_0x33ac03[_0x4ed2bc(0x212)]&&this[_0x4ed2bc(0x225)]['addUser'](_0x33ac03['user']),_0x33ac03[_0x4ed2bc(0x22b)]){case v[_0x4ed2bc(0x246)]:break;case v[_0x4ed2bc(0x215)]:{this['_threadCommentModel']['addComment'](_0x54b011,_0x20a96c,{'unitId':_0x54b011,'subUnitId':_0x20a96c,'ref':'','id':_0x33ac03[_0x4ed2bc(0x21d)],'dT':y(+_0x33ac03['createTimestamp']),'threadId':_0x33ac03[_0x4ed2bc(0x245)],'personId':(_0x51b853=(_0x40a8e1=_0x33ac03[_0x4ed2bc(0x212)])==null?void 0x0:_0x40a8e1[_0x4ed2bc(0x1f0)])!=null?_0x51b853:_0x33ac03[_0x4ed2bc(0x1de)],'text':JSON['parse'](_0x33ac03['content']),'parentId':_0x5ae392['id']});break;}case v[_0x4ed2bc(0x236)]:{const _0x4f5fdb=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x234)](_0x54b011,_0x20a96c,_0x33ac03['replyId']);_0x4f5fdb&&_0x4f5fdb[_0x4ed2bc(0x1fa)]&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x21e)](_0x54b011,_0x20a96c,_0x33ac03[_0x4ed2bc(0x21d)]);break;}case v['Edit']:{this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x210)](_0x54b011,_0x20a96c,{'commentId':_0x33ac03[_0x4ed2bc(0x21d)],'text':JSON[_0x4ed2bc(0x201)](_0x33ac03[_0x4ed2bc(0x230)])});break;}case v['Solve']:{const _0x40bb85=(_0x28f354=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0xf82527=>_0xf82527[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x28f354[_0x4ed2bc(0x23b)];_0x40bb85&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x213)](_0x54b011,_0x20a96c,_0x40bb85['id'],_0x33ac03['solved']===I[_0x4ed2bc(0x1f4)]);break;}}}));}};_=V([p(0x0,_0xc9741e(_0xa2ebfd)),p(0x1,_0xc9741e(_0x5a9473)),p(0x2,_0xc9741e(_0x3f7db5)),p(0x3,_0xc9741e(_0x54bd73))],_);const z=_0x25faa0(0x221),O={};var k=Object[_0x25faa0(0x238)],Q=(_0x50458b,_0x2cfa27,_0x165052,_0x2cb40f)=>{const _0x561009=_0x25faa0;for(var _0x1ebc4e=_0x2cb40f>0x1?void 0x0:_0x2cb40f?k(_0x2cfa27,_0x165052):_0x2cfa27,_0x1459c9=_0x50458b[_0x561009(0x203)]-0x1,_0x5e1865;_0x1459c9>=0x0;_0x1459c9--)(_0x5e1865=_0x50458b[_0x1459c9])&&(_0x1ebc4e=_0x5e1865(_0x1ebc4e)||_0x1ebc4e);return _0x1ebc4e;},b=(_0x8caf4f,_0x5dcebf)=>(_0x42d5bd,_0x135186)=>_0x5dcebf(_0x42d5bd,_0x135186,_0x8caf4f);function X(_0x1abb62,_0x242971){const _0x4cd15f=_0x25faa0,_0x159188=_0x1abb62[_0x4cd15f(0x208)][0x0];return{..._0x242971,'id':_0x159188[_0x4cd15f(0x21d)],'resolved':_0x1abb62[_0x4cd15f(0x1f7)]===0x1,'dT':y(_0x159188[_0x4cd15f(0x1f5)]),'personId':_0x159188[_0x4cd15f(0x1de)],'threadId':_0x159188[_0x4cd15f(0x245)]};}function ee(_0x9ab101,_0x20675e,_0x219a65){const _0xb1361e=_0x25faa0;var _0xda8d60,_0x1308cf;if(((_0x1308cf=(_0xda8d60=_0x9ab101==null?void 0x0:_0x9ab101[_0xb1361e(0x208)])==null?void 0x0:_0xda8d60['length'])!=null?_0x1308cf:0x0)>0x0){const _0x3d84ab=(_0x5e253c,_0x260acc)=>({'id':_0x5e253c[_0xb1361e(0x21d)],'threadId':_0x5e253c[_0xb1361e(0x245)],'dT':y(_0x5e253c['createTimestamp']),'personId':_0x5e253c['userId'],'resolved':_0x9ab101[_0xb1361e(0x1f7)]===I[_0xb1361e(0x1f4)],'unitId':_0x20675e,'subUnitId':_0x219a65,'text':JSON[_0xb1361e(0x201)](_0x5e253c[_0xb1361e(0x230)]),'parentId':_0x260acc}),_0x516cad=_0x3d84ab(_0x9ab101[_0xb1361e(0x208)][0x0]);return{..._0x516cad,'children':_0x9ab101[_0xb1361e(0x208)][_0xb1361e(0x1fe)](0x1)[_0xb1361e(0x204)](_0x19c60b=>_0x3d84ab(_0x19c60b,_0x516cad['id']))};}return null;}let S=class{constructor(_0x5163d6,_0x1c96ab,_0x54eac6){const _0x1a4021=_0x25faa0;this[_0x1a4021(0x220)]=_0x5163d6,this[_0x1a4021(0x225)]=_0x1c96ab,this['_sessionService']=_0x54eac6;}async[_0x25faa0(0x1df)](_0xb52cc5){const _0x5cbebd=_0x25faa0;var _0x2b7bf9,_0x3a4fa9;const {parentId:_0x2a52a4,unitId:_0x2a5aa8,text:_0x37759b,threadId:_0x3a0471}=_0xb52cc5,_0x2a485a=(_0x3a4fa9=(_0x2b7bf9=_0x37759b[_0x5cbebd(0x23f)])==null?void 0x0:_0x2b7bf9[_0x5cbebd(0x233)](_0x22af43=>_0x22af43[_0x5cbebd(0x1fc)]===_0x2b4870[_0x5cbebd(0x226)])[_0x5cbebd(0x204)](_0x67caea=>_0x67caea[_0x5cbebd(0x207)]))!=null?_0x3a4fa9:[],_0x462f99=JSON[_0x5cbebd(0x23a)](_0x37759b),_0x14b7c0=(await this[_0x5cbebd(0x200)][_0x5cbebd(0x1ea)](_0x2a5aa8))['getMemberID']();if(_0x2a52a4){const _0x5141e0={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a,'threadId':_0x3a0471},_0x3231c2=(await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+_0x5cbebd(0x1ee),{'body':_0x5141e0}))[_0x5cbebd(0x247)][_0x5cbebd(0x217)];return{..._0xb52cc5,'id':_0x3231c2[_0x5cbebd(0x21d)],'dT':_0x5f5b37(+_0x3231c2['createTimestamp'])[_0x5cbebd(0x1e0)](_0x5cbebd(0x1ed)),'personId':_0x3231c2['userId']};}else{const _0x1d36f4={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a},_0x1b2cd8=await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+'/add',{'body':_0x1d36f4});return X(_0x1b2cd8[_0x5cbebd(0x247)][_0x5cbebd(0x242)],_0xb52cc5);}}async[_0x25faa0(0x210)](_0x25c88c){const _0x2e7441=_0x25faa0;var _0x154a7a,_0x5d039e;const {text:_0x35c186,unitId:_0x2a417d}=_0x25c88c,_0x68aa8=(_0x5d039e=(_0x154a7a=_0x35c186[_0x2e7441(0x23f)])==null?void 0x0:_0x154a7a['filter'](_0x19a6bc=>_0x19a6bc[_0x2e7441(0x1fc)]===_0x2b4870[_0x2e7441(0x226)])['map'](_0x562c31=>_0x562c31[_0x2e7441(0x207)]))!=null?_0x5d039e:[],_0x566172=JSON[_0x2e7441(0x23a)](_0x35c186),_0x3651dd=_0x25c88c[_0x2e7441(0x245)],_0x2e4d32=_0x25c88c['id'],_0x3cf0f3={'memberId':(await this[_0x2e7441(0x200)]['requireSession'](_0x2a417d))[_0x2e7441(0x22d)](),'unitId':_0x2a417d,'threadId':_0x3651dd,'mention':_0x68aa8,'content':_0x566172,'replyId':_0x2e4d32},_0x25d94a=await this[_0x2e7441(0x220)][_0x2e7441(0x1f9)](_0x2e7441(0x20a)+_0x2a417d+_0x2e7441(0x1e1),{'body':_0x3cf0f3});return!_0x25d94a[_0x2e7441(0x247)]['error']||_0x25d94a['body'][_0x2e7441(0x1e2)][_0x2e7441(0x214)]===0x1;}async[_0x25faa0(0x213)](_0x2e00fb){const _0x4d500b=_0x25faa0,{unitId:_0xd4084a}=_0x2e00fb,_0x139da7=_0x2e00fb[_0x4d500b(0x245)],_0xf4632={'memberId':this[_0x4d500b(0x225)][_0x4d500b(0x1ef)]()[_0x4d500b(0x1f0)],'unitId':_0xd4084a,'threadId':_0x139da7,'solved':_0x2e00fb[_0x4d500b(0x224)]?I[_0x4d500b(0x1f4)]:I[_0x4d500b(0x1fd)]},_0x4bed30=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xd4084a+_0x4d500b(0x21a),{'body':_0xf4632});return!_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]||_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]['code']===0x1;}async[_0x25faa0(0x21e)](_0x4657da,_0x5219b2,_0x3709a2,_0x91b25b){const _0x502ce2=_0x25faa0,_0x134b6d={'memberId':(await this[_0x502ce2(0x200)][_0x502ce2(0x1ea)](_0x4657da))[_0x502ce2(0x22d)](),'threadId':_0x3709a2,'replyId':_0x91b25b,'unitId':_0x4657da},_0x1404d8=await this[_0x502ce2(0x220)][_0x502ce2(0x1f9)](_0x502ce2(0x20a)+_0x4657da+_0x502ce2(0x239),{'body':_0x134b6d});return!_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]||_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]['code']===0x1;}async[_0x25faa0(0x206)](_0x24b97c,_0x2dc250,_0x242496){const _0x38b732=_0x25faa0,_0x41e338={'unitId':_0x24b97c,'threadId':_0x242496},_0x352d02=await this[_0x38b732(0x220)]['post'](_0x38b732(0x20a)+_0x24b97c+_0x38b732(0x211),{'body':_0x41e338}),_0x242e84=_0x242496[_0x38b732(0x204)](_0x564114=>ee(_0x352d02[_0x38b732(0x247)][_0x38b732(0x20f)][_0x564114],_0x24b97c,_0x2dc250))[_0x38b732(0x233)](Boolean);return Object[_0x38b732(0x222)](_0x352d02[_0x38b732(0x247)][_0x38b732(0x1e6)])[_0x38b732(0x1e8)](_0x1013da=>{const _0x136fe6=_0x38b732;this[_0x136fe6(0x225)]['addUser'](_0x1013da);}),_0x242e84;}[_0x25faa0(0x218)](_0x241013){const _0x474e19=_0x25faa0;return{'id':_0x241013['id'],'threadId':_0x241013['threadId'],'ref':_0x241013[_0x474e19(0x1f1)]};}};S=Q([b(0x0,_0xc9741e(_0x3bbb43)),b(0x1,_0xc9741e(_0x3f7db5)),b(0x2,_0xc9741e(_0x6ebfb5))],S);var re=Object[_0x25faa0(0x238)],te=(_0x35be7e,_0x5219d3,_0x59eb15,_0x552ca1)=>{const _0x14fbef=_0x25faa0;for(var _0x5a7101=_0x552ca1>0x1?void 0x0:_0x552ca1?re(_0x5219d3,_0x59eb15):_0x5219d3,_0x486000=_0x35be7e[_0x14fbef(0x203)]-0x1,_0x344a87;_0x486000>=0x0;_0x486000--)(_0x344a87=_0x35be7e[_0x486000])&&(_0x5a7101=_0x344a87(_0x5a7101)||_0x5a7101);return _0x5a7101;},M=(_0x49bb4f,_0x6e02e1)=>(_0x5e1e70,_0x5c86c0)=>_0x6e02e1(_0x5e1e70,_0x5c86c0,_0x49bb4f);let f=class extends _0x25aa90{constructor(_0x54fbfa,_0x5e24da){const _0x119e83=_0x25faa0;super(),this[_0x119e83(0x228)]=_0x54fbfa,this['_threadCommentDataSource']=_0x5e24da,this[_0x119e83(0x21f)]();}[_0x25faa0(0x21f)](){const _0x38512b=_0x25faa0;this[_0x38512b(0x228)][_0x38512b(0x240)]=this['_threadCommentDataSource'],this[_0x38512b(0x228)][_0x38512b(0x20c)]=!0x1;}};f=te([M(0x0,_0x18a375),M(0x1,_0xc9741e(S))],f);var se=Object[_0x25faa0(0x1eb)],oe=Object[_0x25faa0(0x238)],ne=(_0x2f075d,_0x407807,_0x5bdfad)=>_0x407807 in _0x2f075d?se(_0x2f075d,_0x407807,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bdfad}):_0x2f075d[_0x407807]=_0x5bdfad,ie=(_0x5425e8,_0x43c3fc,_0x473feb,_0x289190)=>{for(var _0x21f9a4=_0x289190>0x1?void 0x0:_0x289190?oe(_0x43c3fc,_0x473feb):_0x43c3fc,_0x5caa96=_0x5425e8['length']-0x1,_0x2f59b6;_0x5caa96>=0x0;_0x5caa96--)(_0x2f59b6=_0x5425e8[_0x5caa96])&&(_0x21f9a4=_0x2f59b6(_0x21f9a4)||_0x21f9a4);return _0x21f9a4;},N=(_0x288a79,_0xea4ffc)=>(_0x1e91e2,_0x3d09ec)=>_0xea4ffc(_0x1e91e2,_0x3d09ec,_0x288a79),$=(_0x57b778,_0x3c5bce,_0x418876)=>ne(_0x57b778,typeof _0x3c5bce!=_0x25faa0(0x21b)?_0x3c5bce+'':_0x3c5bce,_0x418876);let g=class extends _0x542bcc{constructor(_0x7c60fc=O,_0x1077ab,_0x34158d){const _0x414784=_0x25faa0;super(),this['_config']=_0x7c60fc,this[_0x414784(0x22a)]=_0x1077ab,this[_0x414784(0x1e3)]=_0x34158d;const {..._0x5d39e9}=_0x7d8ac9({},O,this[_0x414784(0x244)]);this[_0x414784(0x1e3)][_0x414784(0x24a)](z,_0x5d39e9);}[_0x25faa0(0x205)](){[[S],[f],[_]]['forEach'](_0x4e1af1=>{this['_injector']['add'](_0x4e1af1);});}['onReady'](){const _0x4b9be4=_0x25faa0;this[_0x4b9be4(0x22a)]['get'](f),this[_0x4b9be4(0x22a)][_0x4b9be4(0x1f8)](_);}};$(g,_0x25faa0(0x1e9),W),$(g,'type',_0x4e65bc[_0x25faa0(0x1ff)]),g=ie([_0x125195(_0x2d4016,_0x4d0826,_0x6f90f6),N(0x1,_0xc9741e(_0x54bd73)),N(0x2,_0x4521b1)],g);function _0x34aa(){const _0x106170=['/universer-api/comment/unit/','10330120zRyNlM','syncUpdateMutationToColla','find','_threadCommentModel','comments','updateComment','/list','user','resolveComment','code','Reply','Edit','reply','saveCommentToSnapshot','payload','/solved','symbol','36FfdlLu','replyId','deleteComment','_initDataSource','_httpService','thread-comment-data-source.config','values','848622irycZg','resolved','_userService','COMMENT','Unknown','_threadCommentDataSourceService','pipe','_injector','type','getUser','getMemberID','Solve','241950cRwsKf','content','getUnit','234380oiXcum','filter','getComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','/universer-api/user/list','getOwnPropertyDescriptor','/delete','stringify','root','personId','add','10771263tWvpGA','customRanges','dataSource','UNRECOGNIZED','comment','_commentService','_config','threadId','Add','body','7vUjGug','27992800iMJhhj','setConfig','userId','addComment','format','/edit','error','_configService','unitId','delete','users','778711NYDhET','forEach','pluginName','requireSession','defineProperty','8ZTkmMd','YYYY/MM/DD\x20HH:mm','/reply','getCurrentUser','userID','ref','commentUpdate$','_initUserSync','Solved','createTimestamp','_init','solved','get','post','parentId','disposeWithMe','rangeType','OpenOrReOpen','slice','UNIVER_UNKNOWN','_sessionService','parse','18dcFmTs','length','map','onStarting','listComments','rangeId','replies','subscribe'];_0x34aa=function(){return _0x106170;};return _0x34aa();}export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x169658,_0x5a6e5e){const _0x3054e5=_0x1f1a,_0x3c56a8=_0x169658();while(!![]){try{const _0x57c3d5=-parseInt(_0x3054e5(0x259))/0x1*(-parseInt(_0x3054e5(0x24f))/0x2)+-parseInt(_0x3054e5(0x1f0))/0x3+parseInt(_0x3054e5(0x1e9))/0x4+parseInt(_0x3054e5(0x233))/0x5*(parseInt(_0x3054e5(0x24c))/0x6)+parseInt(_0x3054e5(0x229))/0x7+parseInt(_0x3054e5(0x22c))/0x8*(parseInt(_0x3054e5(0x21c))/0x9)+-parseInt(_0x3054e5(0x1e8))/0xa*(parseInt(_0x3054e5(0x1fc))/0xb);if(_0x57c3d5===_0x5a6e5e)break;else _0x3c56a8['push'](_0x3c56a8['shift']());}catch(_0x3ca8c8){_0x3c56a8['push'](_0x3c56a8['shift']());}}}(_0x488a,0xd00a2),function(_0x15c9a2,_0x5dd36e){const _0x97bfa9=_0x1f1a;typeof exports==_0x97bfa9(0x256)&&typeof module<'u'?_0x5dd36e(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x97bfa9(0x1f6)]?define([_0x97bfa9(0x261),_0x97bfa9(0x23d),'@univerjs-pro/license',_0x97bfa9(0x204),_0x97bfa9(0x214),_0x97bfa9(0x216),_0x97bfa9(0x1f2),_0x97bfa9(0x23b)],_0x5dd36e):(_0x15c9a2=typeof globalThis<'u'?globalThis:_0x15c9a2||self,_0x5dd36e(_0x15c9a2['UniverProThreadCommentDatasource']={},_0x15c9a2[_0x97bfa9(0x212)],_0x15c9a2[_0x97bfa9(0x221)],_0x15c9a2['UniverCore'],_0x15c9a2['UniverThreadCommentUi'],_0x15c9a2[_0x97bfa9(0x220)],_0x15c9a2[_0x97bfa9(0x1f2)],_0x15c9a2[_0x97bfa9(0x249)]));}(this,function(_0x27316b,_0x4e7d77,_0x175f22,_0x113a6f,_0x51cb85,_0x139ece,_0xe51048,_0x2ffd6d){'use strict';const _0x307496=_0x1f1a;const _0x14d825='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x159c99=(_0x10891c=>(_0x10891c[_0x10891c['OpenOrReOpen']=0x0]=_0x307496(0x25b),_0x10891c[_0x10891c[_0x307496(0x23f)]=0x1]=_0x307496(0x23f),_0x10891c[_0x10891c[_0x307496(0x1f8)]=-0x1]=_0x307496(0x1f8),_0x10891c))(_0x159c99||{}),_0x4791ef=(_0xfe2e45=>(_0xfe2e45[_0xfe2e45[_0x307496(0x25c)]=0x0]=_0x307496(0x25c),_0xfe2e45[_0xfe2e45[_0x307496(0x21a)]=0x1]=_0x307496(0x21a),_0xfe2e45[_0xfe2e45[_0x307496(0x206)]=0x2]=_0x307496(0x206),_0xfe2e45[_0xfe2e45[_0x307496(0x255)]=0x3]='Edit',_0xfe2e45[_0xfe2e45[_0x307496(0x213)]=0x4]=_0x307496(0x213),_0xfe2e45[_0xfe2e45['Solve']=0x5]='Solve',_0xfe2e45[_0xfe2e45[_0x307496(0x1f8)]=-0x1]='UNRECOGNIZED',_0xfe2e45))(_0x4791ef||{});const _0x29c37c=_0xca725a=>_0x113a6f['dayjs'](new Date(+_0xca725a))[_0x307496(0x22b)](_0x307496(0x203)),_0x4ef2ad=async(_0x314404,_0x291e29)=>{const _0x57562a=_0x307496,_0x4e5248=_0x314404[_0x57562a(0x218)](_0x113a6f[_0x57562a(0x263)]),_0x45306b=_0x314404[_0x57562a(0x218)](_0x2ffd6d[_0x57562a(0x228)]);_0x291e29[_0x57562a(0x264)](_0x5962bc=>{const _0x453352=_0x57562a;_0x4e5248[_0x453352(0x234)](_0x5962bc)&&_0x291e29['delete'](_0x5962bc);}),_0x291e29[_0x57562a(0x22d)]&&(await _0x45306b[_0x57562a(0x218)](_0x57562a(0x22a),{'params':{'userIDs':[..._0x291e29]}}))[_0x57562a(0x239)][_0x57562a(0x247)]['forEach'](_0x56e0ba=>{const _0x36e1a7=_0x57562a;_0x56e0ba&&_0x4e5248[_0x36e1a7(0x230)](_0x56e0ba);});};var _0x6b946f=Object[_0x307496(0x20d)],_0x51857a=(_0x5b199f,_0x386d19,_0x47b03f,_0xb65802)=>{const _0x1f1e1d=_0x307496;for(var _0x2a1ce5=_0xb65802>0x1?void 0x0:_0xb65802?_0x6b946f(_0x386d19,_0x47b03f):_0x386d19,_0x5ad410=_0x5b199f[_0x1f1e1d(0x267)]-0x1,_0x1761ec;_0x5ad410>=0x0;_0x5ad410--)(_0x1761ec=_0x5b199f[_0x5ad410])&&(_0x2a1ce5=_0x1761ec(_0x2a1ce5)||_0x2a1ce5);return _0x2a1ce5;},_0x59f3ab=(_0x16933b,_0x3cce4b)=>(_0x297cd8,_0x3f1f7e)=>_0x3cce4b(_0x297cd8,_0x3f1f7e,_0x16933b);let _0x2a4ebc=class extends _0x113a6f[_0x307496(0x1e1)]{constructor(_0x3aee05,_0x1a37e6,_0x39fc88,_0x4ebbee){const _0x18faab=_0x307496;super(),this['_commentService']=_0x3aee05,this[_0x18faab(0x235)]=_0x1a37e6,this[_0x18faab(0x269)]=_0x39fc88,this[_0x18faab(0x265)]=_0x4ebbee,this[_0x18faab(0x201)](),this['_initUserSync']();}['_initUserSync'](){const _0x3ec118=_0x307496;this['disposeWithMe'](this[_0x3ec118(0x235)][_0x3ec118(0x209)][_0x3ec118(0x1fb)](_0xe51048[_0x3ec118(0x20b)](0x10))[_0x3ec118(0x223)](_0x446936=>{const _0x11bbd8=_0x3ec118,_0x5380ae=new Set();_0x446936[_0x11bbd8(0x264)](_0x3d9746=>{const _0x339f16=_0x11bbd8;switch(_0x3d9746[_0x339f16(0x242)]){case'add':{const _0x40622a=_0x3d9746[_0x339f16(0x20f)]['personId'];_0x5380ae[_0x339f16(0x248)](_0x40622a);break;}}}),_0x4ef2ad(this[_0x11bbd8(0x265)],_0x5380ae);}));}[_0x307496(0x201)](){const _0x1821ec=_0x307496;this[_0x1821ec(0x20c)](this[_0x1821ec(0x227)][_0x1821ec(0x209)]['subscribe'](async _0x285c7a=>{const _0x2dce93=_0x1821ec;var _0x5c17a1,_0x994e53,_0x344c6d,_0x1b3efb;const _0x475623=(_0x5c17a1=this[_0x2dce93(0x235)][_0x2dce93(0x1ec)](_0x285c7a[_0x2dce93(0x1e4)])['find'](_0x58a905=>_0x58a905[_0x2dce93(0x1e5)]===_0x285c7a['threadId']))==null?void 0x0:_0x5c17a1['root'];if(!_0x475623)return;const {unitId:_0x568726,subUnitId:_0x1611ff}=_0x475623;switch(_0x285c7a[_0x2dce93(0x23e)]&&this['_userService'][_0x2dce93(0x230)](_0x285c7a['user']),_0x285c7a[_0x2dce93(0x242)]){case _0x4791ef[_0x2dce93(0x21a)]:break;case _0x4791ef[_0x2dce93(0x206)]:{this['_threadCommentModel'][_0x2dce93(0x1f4)](_0x568726,_0x1611ff,{'unitId':_0x568726,'subUnitId':_0x1611ff,'ref':'','id':_0x285c7a[_0x2dce93(0x1ef)],'dT':_0x29c37c(+_0x285c7a[_0x2dce93(0x25f)]),'threadId':_0x285c7a[_0x2dce93(0x1e5)],'personId':(_0x344c6d=(_0x994e53=_0x285c7a[_0x2dce93(0x23e)])==null?void 0x0:_0x994e53['userID'])!=null?_0x344c6d:_0x285c7a[_0x2dce93(0x1fe)],'text':JSON['parse'](_0x285c7a[_0x2dce93(0x1e3)]),'parentId':_0x475623['id']});break;}case _0x4791ef[_0x2dce93(0x213)]:{const _0x2cb91e=this['_threadCommentModel'][_0x2dce93(0x207)](_0x568726,_0x1611ff,_0x285c7a[_0x2dce93(0x1ef)]);_0x2cb91e&&_0x2cb91e[_0x2dce93(0x268)]&&this[_0x2dce93(0x235)][_0x2dce93(0x1ff)](_0x568726,_0x1611ff,_0x285c7a['replyId']);break;}case _0x4791ef[_0x2dce93(0x255)]:{this[_0x2dce93(0x235)][_0x2dce93(0x252)](_0x568726,_0x1611ff,{'commentId':_0x285c7a['replyId'],'text':JSON['parse'](_0x285c7a['content'])});break;}case _0x4791ef[_0x2dce93(0x1e7)]:{const _0x4121f3=(_0x1b3efb=this[_0x2dce93(0x235)]['getUnit'](_0x285c7a[_0x2dce93(0x1e4)])[_0x2dce93(0x24b)](_0x477cc6=>_0x477cc6[_0x2dce93(0x1e5)]===_0x285c7a[_0x2dce93(0x1e5)]))==null?void 0x0:_0x1b3efb[_0x2dce93(0x25e)];_0x4121f3&&this[_0x2dce93(0x235)][_0x2dce93(0x20e)](_0x568726,_0x1611ff,_0x4121f3['id'],_0x285c7a['solved']===_0x159c99[_0x2dce93(0x23f)]);break;}}}));}};_0x2a4ebc=_0x51857a([_0x59f3ab(0x0,_0x113a6f['Inject'](_0x4e7d77[_0x307496(0x1eb)])),_0x59f3ab(0x1,_0x113a6f[_0x307496(0x1f1)](_0x139ece[_0x307496(0x260)])),_0x59f3ab(0x2,_0x113a6f[_0x307496(0x1f1)](_0x113a6f[_0x307496(0x263)])),_0x59f3ab(0x3,_0x113a6f[_0x307496(0x1f1)](_0x113a6f[_0x307496(0x1fd)]))],_0x2a4ebc);const _0x19bbdf=_0x307496(0x202),_0x1447e3={};var _0x540eb3=Object[_0x307496(0x20d)],_0x5062b4=(_0x17c13e,_0x8a5971,_0xdc11e9,_0x10a775)=>{const _0x199a79=_0x307496;for(var _0x67f005=_0x10a775>0x1?void 0x0:_0x10a775?_0x540eb3(_0x8a5971,_0xdc11e9):_0x8a5971,_0x3a2ab8=_0x17c13e[_0x199a79(0x267)]-0x1,_0x22f9cf;_0x3a2ab8>=0x0;_0x3a2ab8--)(_0x22f9cf=_0x17c13e[_0x3a2ab8])&&(_0x67f005=_0x22f9cf(_0x67f005)||_0x67f005);return _0x67f005;},_0x37acc2=(_0x22d4ed,_0x46a6d8)=>(_0x57ebfb,_0x428a97)=>_0x46a6d8(_0x57ebfb,_0x428a97,_0x22d4ed);function _0x5d41f3(_0x54f4dd,_0x1db35a){const _0x47d418=_0x307496,_0x17137d=_0x54f4dd['replies'][0x0];return{..._0x1db35a,'id':_0x17137d[_0x47d418(0x1ef)],'resolved':_0x54f4dd['solved']===0x1,'dT':_0x29c37c(_0x17137d[_0x47d418(0x25f)]),'personId':_0x17137d[_0x47d418(0x1fe)],'threadId':_0x17137d[_0x47d418(0x1e5)]};}function _0x504917(_0x33c942,_0x3d69fa,_0x5920c5){const _0x1c69e2=_0x307496;var _0x11dc21,_0x819643;if(((_0x819643=(_0x11dc21=_0x33c942==null?void 0x0:_0x33c942[_0x1c69e2(0x232)])==null?void 0x0:_0x11dc21[_0x1c69e2(0x267)])!=null?_0x819643:0x0)>0x0){const _0x3cc719=(_0x21615e,_0x3147e2)=>({'id':_0x21615e[_0x1c69e2(0x1ef)],'threadId':_0x21615e['threadId'],'dT':_0x29c37c(_0x21615e[_0x1c69e2(0x25f)]),'personId':_0x21615e[_0x1c69e2(0x1fe)],'resolved':_0x33c942['solved']===_0x159c99[_0x1c69e2(0x23f)],'unitId':_0x3d69fa,'subUnitId':_0x5920c5,'text':JSON['parse'](_0x21615e['content']),'parentId':_0x3147e2}),_0x66a807=_0x3cc719(_0x33c942[_0x1c69e2(0x232)][0x0]);return{..._0x66a807,'children':_0x33c942[_0x1c69e2(0x232)][_0x1c69e2(0x22f)](0x1)[_0x1c69e2(0x250)](_0x17ff36=>_0x3cc719(_0x17ff36,_0x66a807['id']))};}return null;}let _0x4bfdb5=class{constructor(_0x3b5cf6,_0x5729cb,_0x2c53e9){const _0x3e0e21=_0x307496;this[_0x3e0e21(0x266)]=_0x3b5cf6,this[_0x3e0e21(0x269)]=_0x5729cb,this['_sessionService']=_0x2c53e9;}async[_0x307496(0x1f4)](_0x58ad0e){const _0x510bab=_0x307496;var _0x42bb1b,_0x9288cf;const {parentId:_0x229301,unitId:_0x58cb94,text:_0x19a052,threadId:_0x526229}=_0x58ad0e,_0x473e0a=(_0x9288cf=(_0x42bb1b=_0x19a052['customRanges'])==null?void 0x0:_0x42bb1b[_0x510bab(0x208)](_0x5f45d1=>_0x5f45d1[_0x510bab(0x237)]===_0x113a6f['CustomRangeType'][_0x510bab(0x222)])[_0x510bab(0x250)](_0x51a839=>_0x51a839['rangeId']))!=null?_0x9288cf:[],_0x1cc11d=JSON['stringify'](_0x19a052),_0x1c0086=(await this[_0x510bab(0x24e)][_0x510bab(0x1ee)](_0x58cb94))['getMemberID']();if(_0x229301){const _0x46fe43={'memberId':_0x1c0086,'unitId':_0x58cb94,'content':_0x1cc11d,'mention':_0x473e0a,'threadId':_0x526229},_0x58a5c2=(await this['_httpService'][_0x510bab(0x244)](_0x510bab(0x251)+_0x58cb94+_0x510bab(0x226),{'body':_0x46fe43}))[_0x510bab(0x239)][_0x510bab(0x236)];return{..._0x58ad0e,'id':_0x58a5c2[_0x510bab(0x1ef)],'dT':_0x113a6f['dayjs'](+_0x58a5c2['createTimestamp'])[_0x510bab(0x22b)](_0x510bab(0x203)),'personId':_0x58a5c2['userId']};}else{const _0xbf3d6={'memberId':_0x1c0086,'unitId':_0x58cb94,'content':_0x1cc11d,'mention':_0x473e0a},_0x393e0f=await this[_0x510bab(0x266)][_0x510bab(0x244)](_0x510bab(0x251)+_0x58cb94+'/add',{'body':_0xbf3d6});return _0x5d41f3(_0x393e0f['body'][_0x510bab(0x238)],_0x58ad0e);}}async[_0x307496(0x252)](_0x5778c9){const _0x527515=_0x307496;var _0x5c5fcd,_0x496950;const {text:_0x141d99,unitId:_0x2a0c2e}=_0x5778c9,_0x144221=(_0x496950=(_0x5c5fcd=_0x141d99[_0x527515(0x211)])==null?void 0x0:_0x5c5fcd[_0x527515(0x208)](_0x212aa1=>_0x212aa1[_0x527515(0x237)]===_0x113a6f[_0x527515(0x25a)][_0x527515(0x222)])[_0x527515(0x250)](_0x487fbe=>_0x487fbe[_0x527515(0x21f)]))!=null?_0x496950:[],_0x46254b=JSON[_0x527515(0x257)](_0x141d99),_0x12fe3e=_0x5778c9[_0x527515(0x1e5)],_0x5794b7=_0x5778c9['id'],_0x5068d6={'memberId':(await this['_sessionService'][_0x527515(0x1ee)](_0x2a0c2e))[_0x527515(0x262)](),'unitId':_0x2a0c2e,'threadId':_0x12fe3e,'mention':_0x144221,'content':_0x46254b,'replyId':_0x5794b7},_0x30904f=await this[_0x527515(0x266)]['post'](_0x527515(0x251)+_0x2a0c2e+_0x527515(0x24a),{'body':_0x5068d6});return!_0x30904f[_0x527515(0x239)][_0x527515(0x20a)]||_0x30904f[_0x527515(0x239)]['error']['code']===0x1;}async[_0x307496(0x20e)](_0x2aea6a){const _0x4169e6=_0x307496,{unitId:_0x213b67}=_0x2aea6a,_0x47cc1a=_0x2aea6a[_0x4169e6(0x1e5)],_0x216d01={'memberId':this[_0x4169e6(0x269)][_0x4169e6(0x224)]()[_0x4169e6(0x254)],'unitId':_0x213b67,'threadId':_0x47cc1a,'solved':_0x2aea6a['resolved']?_0x159c99[_0x4169e6(0x23f)]:_0x159c99[_0x4169e6(0x25b)]},_0x295107=await this[_0x4169e6(0x266)][_0x4169e6(0x244)](_0x4169e6(0x251)+_0x213b67+'/solved',{'body':_0x216d01});return!_0x295107[_0x4169e6(0x239)][_0x4169e6(0x20a)]||_0x295107[_0x4169e6(0x239)][_0x4169e6(0x20a)][_0x4169e6(0x253)]===0x1;}async[_0x307496(0x1ff)](_0x9eebcc,_0x3bea1c,_0x38ece3,_0x470a73){const _0xb99519=_0x307496,_0x3c7dde={'memberId':(await this['_sessionService'][_0xb99519(0x1ee)](_0x9eebcc))[_0xb99519(0x262)](),'threadId':_0x38ece3,'replyId':_0x470a73,'unitId':_0x9eebcc},_0x44dc1b=await this[_0xb99519(0x266)][_0xb99519(0x244)](_0xb99519(0x251)+_0x9eebcc+'/delete',{'body':_0x3c7dde});return!_0x44dc1b[_0xb99519(0x239)][_0xb99519(0x20a)]||_0x44dc1b[_0xb99519(0x239)][_0xb99519(0x20a)][_0xb99519(0x253)]===0x1;}async[_0x307496(0x1e2)](_0x25a7fe,_0x3821a7,_0x3456fe){const _0x2b7597=_0x307496,_0x1ce170={'unitId':_0x25a7fe,'threadId':_0x3456fe},_0x3d129a=await this[_0x2b7597(0x266)][_0x2b7597(0x244)](_0x2b7597(0x251)+_0x25a7fe+_0x2b7597(0x21d),{'body':_0x1ce170}),_0x588e9b=_0x3456fe[_0x2b7597(0x250)](_0x25e25d=>_0x504917(_0x3d129a[_0x2b7597(0x239)][_0x2b7597(0x23c)][_0x25e25d],_0x25a7fe,_0x3821a7))[_0x2b7597(0x208)](Boolean);return Object[_0x2b7597(0x1e6)](_0x3d129a[_0x2b7597(0x239)]['users'])[_0x2b7597(0x264)](_0x50b602=>{const _0x30ea38=_0x2b7597;this[_0x30ea38(0x269)][_0x30ea38(0x230)](_0x50b602);}),_0x588e9b;}[_0x307496(0x1f3)](_0x154028){const _0x28733c=_0x307496;return{'id':_0x154028['id'],'threadId':_0x154028['threadId'],'ref':_0x154028[_0x28733c(0x22e)]};}};_0x4bfdb5=_0x5062b4([_0x37acc2(0x0,_0x113a6f[_0x307496(0x1f1)](_0x2ffd6d[_0x307496(0x228)])),_0x37acc2(0x1,_0x113a6f[_0x307496(0x1f1)](_0x113a6f[_0x307496(0x263)])),_0x37acc2(0x2,_0x113a6f[_0x307496(0x1f1)](_0x4e7d77[_0x307496(0x23a)]))],_0x4bfdb5);var _0x44354=Object['getOwnPropertyDescriptor'],_0x46263a=(_0x366c3a,_0x2cdc36,_0x61b73b,_0x3e6e63)=>{for(var _0x2967d9=_0x3e6e63>0x1?void 0x0:_0x3e6e63?_0x44354(_0x2cdc36,_0x61b73b):_0x2cdc36,_0x5e869c=_0x366c3a['length']-0x1,_0x339a6e;_0x5e869c>=0x0;_0x5e869c--)(_0x339a6e=_0x366c3a[_0x5e869c])&&(_0x2967d9=_0x339a6e(_0x2967d9)||_0x2967d9);return _0x2967d9;},_0x311762=(_0x491e6a,_0x471e70)=>(_0x4089c8,_0x5116fe)=>_0x471e70(_0x4089c8,_0x5116fe,_0x491e6a);let _0x553bdc=class extends _0x113a6f['Disposable']{constructor(_0x39c040,_0x55fa3b){const _0x39552f=_0x307496;super(),this[_0x39552f(0x1f5)]=_0x39c040,this['_threadCommentDataSource']=_0x55fa3b,this[_0x39552f(0x215)]();}['_initDataSource'](){const _0x24be53=_0x307496;this['_threadCommentDataSourceService'][_0x24be53(0x258)]=this[_0x24be53(0x231)],this[_0x24be53(0x1f5)][_0x24be53(0x1f7)]=!0x1;}};_0x553bdc=_0x46263a([_0x311762(0x0,_0x139ece[_0x307496(0x21e)]),_0x311762(0x1,_0x113a6f[_0x307496(0x1f1)](_0x4bfdb5))],_0x553bdc);var _0x59d82e=Object[_0x307496(0x241)],_0x33d7e1=Object[_0x307496(0x20d)],_0x412707=(_0x3bddda,_0x59d4da,_0x11899d)=>_0x59d4da in _0x3bddda?_0x59d82e(_0x3bddda,_0x59d4da,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11899d}):_0x3bddda[_0x59d4da]=_0x11899d,_0x5b7b27=(_0x2454ad,_0x2a533d,_0x3da234,_0x3f884d)=>{const _0x391eed=_0x307496;for(var _0x18763c=_0x3f884d>0x1?void 0x0:_0x3f884d?_0x33d7e1(_0x2a533d,_0x3da234):_0x2a533d,_0x460f04=_0x2454ad[_0x391eed(0x267)]-0x1,_0x25cc94;_0x460f04>=0x0;_0x460f04--)(_0x25cc94=_0x2454ad[_0x460f04])&&(_0x18763c=_0x25cc94(_0x18763c)||_0x18763c);return _0x18763c;},_0x3d1dad=(_0x2d229a,_0x9fa390)=>(_0x2a2d2f,_0x4a4bf7)=>_0x9fa390(_0x2a2d2f,_0x4a4bf7,_0x2d229a),_0xfa3e0c=(_0x216647,_0x46260f,_0x346546)=>_0x412707(_0x216647,typeof _0x46260f!=_0x307496(0x205)?_0x46260f+'':_0x46260f,_0x346546);_0x27316b[_0x307496(0x200)]=class extends _0x113a6f[_0x307496(0x245)]{constructor(_0x67bfec=_0x1447e3,_0x28f708,_0x5d582c){const _0x3dcc2a=_0x307496;super(),this[_0x3dcc2a(0x1f9)]=_0x67bfec,this[_0x3dcc2a(0x265)]=_0x28f708,this[_0x3dcc2a(0x240)]=_0x5d582c;const {..._0x454494}=_0x113a6f['merge']({},_0x1447e3,this[_0x3dcc2a(0x1f9)]);this['_configService'][_0x3dcc2a(0x210)](_0x19bbdf,_0x454494);}[_0x307496(0x1ea)](){[[_0x4bfdb5],[_0x553bdc],[_0x2a4ebc]]['forEach'](_0x34b1e0=>{const _0x5290fd=_0x1f1a;this['_injector'][_0x5290fd(0x248)](_0x34b1e0);});}[_0x307496(0x1ed)](){const _0x2451eb=_0x307496;this[_0x2451eb(0x265)][_0x2451eb(0x218)](_0x553bdc),this['_injector']['get'](_0x2a4ebc);}},_0xfa3e0c(_0x27316b[_0x307496(0x200)],'pluginName',_0x14d825),_0xfa3e0c(_0x27316b[_0x307496(0x200)],_0x307496(0x242),_0x113a6f[_0x307496(0x21b)][_0x307496(0x219)]),_0x27316b[_0x307496(0x200)]=_0x5b7b27([_0x113a6f[_0x307496(0x246)](_0x51cb85[_0x307496(0x217)],_0x4e7d77[_0x307496(0x225)],_0x175f22[_0x307496(0x24d)]),_0x3d1dad(0x1,_0x113a6f[_0x307496(0x1f1)](_0x113a6f[_0x307496(0x1fd)])),_0x3d1dad(0x2,_0x113a6f[_0x307496(0x1fa)])],_0x27316b[_0x307496(0x200)]),Object[_0x307496(0x241)](_0x27316b,Symbol[_0x307496(0x243)],{'value':_0x307496(0x25d)});}));function _0x1f1a(_0x1edd91,_0xad203a){const _0x488a6d=_0x488a();return _0x1f1a=function(_0x1f1a96,_0x18100b){_0x1f1a96=_0x1f1a96-0x1e1;let _0x3cced0=_0x488a6d[_0x1f1a96];return _0x3cced0;},_0x1f1a(_0x1edd91,_0xad203a);}function _0x488a(){const _0x2d7657=['_threadCommentDataSourceService','amd','syncUpdateMutationToColla','UNRECOGNIZED','_config','IConfigService','pipe','29822067RkJnbm','Injector','userId','deleteComment','UniverThreadCommentDataSourcePlugin','_init','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','@univerjs/core','symbol','Reply','getComment','filter','commentUpdate$','error','bufferTime','disposeWithMe','getOwnPropertyDescriptor','resolveComment','payload','setConfig','customRanges','UniverProCollaborationClient','Delete','@univerjs/thread-comment-ui','_initDataSource','@univerjs/thread-comment','UniverThreadCommentUIPlugin','get','UNIVER_UNKNOWN','Add','UniverInstanceType','35694Ibfggx','/list','IThreadCommentDataSourceService','rangeId','UniverThreadComment','UniverProLicense','COMMENT','subscribe','getCurrentUser','UniverCollaborationClientPlugin','/reply','_commentService','HTTPService','11119549qVGuxI','/universer-api/user/list','format','1192mEGWCk','size','ref','slice','addUser','_threadCommentDataSource','replies','10835byRaad','getUser','_threadCommentModel','reply','rangeType','comment','body','CollaborationSessionService','@univerjs/network','comments','@univerjs-pro/collaboration-client','user','Solved','_configService','defineProperty','type','toStringTag','post','Plugin','DependentOn','users','add','UniverNetwork','/edit','find','3918VpLZdl','UniverLicensePlugin','_sessionService','68VhstHi','map','/universer-api/comment/unit/','updateComment','code','userID','Edit','object','stringify','dataSource','10727EGNQQe','CustomRangeType','OpenOrReOpen','Unknown','Module','root','createTimestamp','ThreadCommentModel','exports','getMemberID','UserManagerService','forEach','_injector','_httpService','length','parentId','_userService','Disposable','listComments','content','unitId','threadId','values','Solve','10NytUrm','4935056dfuBDI','onStarting','CommentService','getUnit','onReady','requireSession','replyId','4889241AMRWmW','Inject','rxjs','saveCommentToSnapshot','addComment'];_0x488a=function(){return _0x2d7657;};return _0x488a();}
1
+ function _0x96eb(_0x49654c,_0x43fa56){const _0x4bda23=_0x4bda();return _0x96eb=function(_0x96ebb8,_0xb274af){_0x96ebb8=_0x96ebb8-0xc4;let _0x32fbaa=_0x4bda23[_0x96ebb8];return _0x32fbaa;},_0x96eb(_0x49654c,_0x43fa56);}(function(_0x329836,_0x469880){const _0x39aa07=_0x96eb,_0x5b32ad=_0x329836();while(!![]){try{const _0x10e229=parseInt(_0x39aa07(0x147))/0x1*(-parseInt(_0x39aa07(0xde))/0x2)+parseInt(_0x39aa07(0x10d))/0x3*(-parseInt(_0x39aa07(0xfc))/0x4)+parseInt(_0x39aa07(0x149))/0x5*(parseInt(_0x39aa07(0x13d))/0x6)+parseInt(_0x39aa07(0x112))/0x7*(-parseInt(_0x39aa07(0xe4))/0x8)+parseInt(_0x39aa07(0x116))/0x9*(-parseInt(_0x39aa07(0x12e))/0xa)+parseInt(_0x39aa07(0x13c))/0xb*(parseInt(_0x39aa07(0xfd))/0xc)+parseInt(_0x39aa07(0x114))/0xd;if(_0x10e229===_0x469880)break;else _0x5b32ad['push'](_0x5b32ad['shift']());}catch(_0x455e17){_0x5b32ad['push'](_0x5b32ad['shift']());}}}(_0x4bda,0x80c0f),function(_0x183ca1,_0x5605ba){const _0x240a1e=_0x96eb;typeof exports==_0x240a1e(0xd3)&&typeof module<'u'?_0x5605ba(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x240a1e(0x109)]?define([_0x240a1e(0x148),_0x240a1e(0xcb),_0x240a1e(0x12a),'@univerjs/core',_0x240a1e(0x10b),_0x240a1e(0xe7),'rxjs',_0x240a1e(0xd4)],_0x5605ba):(_0x183ca1=typeof globalThis<'u'?globalThis:_0x183ca1||self,_0x5605ba(_0x183ca1[_0x240a1e(0x11a)]={},_0x183ca1[_0x240a1e(0xe1)],_0x183ca1[_0x240a1e(0x131)],_0x183ca1[_0x240a1e(0xf8)],_0x183ca1[_0x240a1e(0x10f)],_0x183ca1[_0x240a1e(0x12b)],_0x183ca1[_0x240a1e(0xe3)],_0x183ca1['UniverNetwork']));}(this,function(_0x43a127,_0x22aec6,_0x5392ce,_0x339162,_0xd7cca9,_0x4f90b6,_0x5b0053,_0x24ec67){'use strict';const _0x517094=_0x96eb;const _0x310541=_0x517094(0xd6);var _0x33b650=(_0x5eefde=>(_0x5eefde[_0x5eefde[_0x517094(0x106)]=0x0]=_0x517094(0x106),_0x5eefde[_0x5eefde['Solved']=0x1]=_0x517094(0xfa),_0x5eefde[_0x5eefde[_0x517094(0x123)]=-0x1]=_0x517094(0x123),_0x5eefde))(_0x33b650||{}),_0x1d3786=(_0x206741=>(_0x206741[_0x206741[_0x517094(0xf5)]=0x0]=_0x517094(0xf5),_0x206741[_0x206741[_0x517094(0xe2)]=0x1]='Add',_0x206741[_0x206741[_0x517094(0x108)]=0x2]=_0x517094(0x108),_0x206741[_0x206741[_0x517094(0x10c)]=0x3]='Edit',_0x206741[_0x206741[_0x517094(0x140)]=0x4]=_0x517094(0x140),_0x206741[_0x206741[_0x517094(0x137)]=0x5]=_0x517094(0x137),_0x206741[_0x206741[_0x517094(0x123)]=-0x1]=_0x517094(0x123),_0x206741))(_0x1d3786||{});const _0xb22aaa=_0x1ee189=>_0x339162[_0x517094(0xdd)](new Date(+_0x1ee189))[_0x517094(0xdb)](_0x517094(0x12f)),_0x305acc=async(_0x33d787,_0x3903d3)=>{const _0x2522cc=_0x517094,_0x53704a=_0x33d787[_0x2522cc(0x132)](_0x339162[_0x2522cc(0x113)]),_0x54e8ca=_0x33d787[_0x2522cc(0x132)](_0x24ec67[_0x2522cc(0xe8)]);_0x3903d3[_0x2522cc(0xd8)](_0x38e3f2=>{const _0x3a8c96=_0x2522cc;_0x53704a[_0x3a8c96(0x102)](_0x38e3f2)&&_0x3903d3[_0x3a8c96(0x115)](_0x38e3f2);}),_0x3903d3[_0x2522cc(0xf7)]&&(await _0x54e8ca['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3903d3]}}))[_0x2522cc(0x144)][_0x2522cc(0x13a)][_0x2522cc(0xd8)](_0x4da101=>{const _0x2463a6=_0x2522cc;_0x4da101&&_0x53704a[_0x2463a6(0xf4)](_0x4da101);});};var _0x5f4cd3=Object[_0x517094(0xda)],_0x34ba7e=(_0x144819,_0x388a83,_0x2e758e,_0x1cee1e)=>{for(var _0x24bd5f=_0x1cee1e>0x1?void 0x0:_0x1cee1e?_0x5f4cd3(_0x388a83,_0x2e758e):_0x388a83,_0xd86d55=_0x144819['length']-0x1,_0x1d1cab;_0xd86d55>=0x0;_0xd86d55--)(_0x1d1cab=_0x144819[_0xd86d55])&&(_0x24bd5f=_0x1d1cab(_0x24bd5f)||_0x24bd5f);return _0x24bd5f;},_0x44b08a=(_0x386fca,_0x9015fd)=>(_0x270943,_0x3dd393)=>_0x9015fd(_0x270943,_0x3dd393,_0x386fca);let _0x1078ee=class extends _0x339162[_0x517094(0xf6)]{constructor(_0x16f25f,_0x44d592,_0x47eb77,_0x184e2c){const _0xdf17b9=_0x517094;super(),this[_0xdf17b9(0x145)]=_0x16f25f,this[_0xdf17b9(0x11e)]=_0x44d592,this['_userService']=_0x47eb77,this[_0xdf17b9(0xce)]=_0x184e2c,this[_0xdf17b9(0x110)](),this[_0xdf17b9(0x136)]();}['_initUserSync'](){const _0x456f7e=_0x517094;this['disposeWithMe'](this[_0x456f7e(0x11e)][_0x456f7e(0x107)][_0x456f7e(0x135)](_0x5b0053['bufferTime'](0x10))['subscribe'](_0x1185a2=>{const _0x57ec5c=_0x456f7e,_0x9af9b1=new Set();_0x1185a2[_0x57ec5c(0xd8)](_0x4684fd=>{const _0x2f93b7=_0x57ec5c;switch(_0x4684fd[_0x2f93b7(0x143)]){case _0x2f93b7(0x141):{const _0x1b17b8=_0x4684fd['payload'][_0x2f93b7(0xf2)];_0x9af9b1[_0x2f93b7(0x141)](_0x1b17b8);break;}}}),_0x305acc(this[_0x57ec5c(0xce)],_0x9af9b1);}));}[_0x517094(0x110)](){const _0x869240=_0x517094;this[_0x869240(0xcc)](this[_0x869240(0x145)][_0x869240(0x107)][_0x869240(0xf0)](async _0x53c024=>{const _0x311dcf=_0x869240;var _0x39861d,_0x1ebb01,_0x1a2185,_0x358fba;const _0x1f9a91=(_0x39861d=this['_threadCommentModel'][_0x311dcf(0xd0)](_0x53c024['unitId'])[_0x311dcf(0x129)](_0x40907d=>_0x40907d[_0x311dcf(0xe6)]===_0x53c024['threadId']))==null?void 0x0:_0x39861d[_0x311dcf(0xdf)];if(!_0x1f9a91)return;const {unitId:_0x330fc6,subUnitId:_0x106ecc}=_0x1f9a91;switch(_0x53c024[_0x311dcf(0xe5)]&&this[_0x311dcf(0x11f)]['addUser'](_0x53c024['user']),_0x53c024[_0x311dcf(0x143)]){case _0x1d3786[_0x311dcf(0xe2)]:break;case _0x1d3786[_0x311dcf(0x108)]:{this[_0x311dcf(0x11e)][_0x311dcf(0x111)](_0x330fc6,_0x106ecc,{'unitId':_0x330fc6,'subUnitId':_0x106ecc,'ref':'','id':_0x53c024[_0x311dcf(0xff)],'dT':_0xb22aaa(+_0x53c024[_0x311dcf(0xf1)]),'threadId':_0x53c024[_0x311dcf(0xe6)],'personId':(_0x1a2185=(_0x1ebb01=_0x53c024[_0x311dcf(0xe5)])==null?void 0x0:_0x1ebb01[_0x311dcf(0xc6)])!=null?_0x1a2185:_0x53c024[_0x311dcf(0x105)],'text':JSON['parse'](_0x53c024[_0x311dcf(0x127)]),'parentId':_0x1f9a91['id']});break;}case _0x1d3786[_0x311dcf(0x140)]:{const _0xbbce7d=this['_threadCommentModel'][_0x311dcf(0xca)](_0x330fc6,_0x106ecc,_0x53c024['replyId']);_0xbbce7d&&_0xbbce7d[_0x311dcf(0x120)]&&this[_0x311dcf(0x11e)][_0x311dcf(0x10e)](_0x330fc6,_0x106ecc,_0x53c024[_0x311dcf(0xff)]);break;}case _0x1d3786[_0x311dcf(0x10c)]:{this[_0x311dcf(0x11e)][_0x311dcf(0x14b)](_0x330fc6,_0x106ecc,{'commentId':_0x53c024['replyId'],'text':JSON[_0x311dcf(0x13e)](_0x53c024[_0x311dcf(0x127)])});break;}case _0x1d3786[_0x311dcf(0x137)]:{const _0x416ad9=(_0x358fba=this[_0x311dcf(0x11e)][_0x311dcf(0xd0)](_0x53c024[_0x311dcf(0x130)])['find'](_0x16eca5=>_0x16eca5[_0x311dcf(0xe6)]===_0x53c024['threadId']))==null?void 0x0:_0x358fba[_0x311dcf(0xdf)];_0x416ad9&&this['_threadCommentModel']['resolveComment'](_0x330fc6,_0x106ecc,_0x416ad9['id'],_0x53c024[_0x311dcf(0x124)]===_0x33b650[_0x311dcf(0xfa)]);break;}}}));}};_0x1078ee=_0x34ba7e([_0x44b08a(0x0,_0x339162['Inject'](_0x22aec6[_0x517094(0x118)])),_0x44b08a(0x1,_0x339162[_0x517094(0x122)](_0x4f90b6[_0x517094(0xc9)])),_0x44b08a(0x2,_0x339162['Inject'](_0x339162[_0x517094(0x113)])),_0x44b08a(0x3,_0x339162[_0x517094(0x122)](_0x339162[_0x517094(0x121)]))],_0x1078ee);const _0x449652=_0x517094(0x13b),_0xa6a9d5={};var _0x186994=Object[_0x517094(0xda)],_0x2c9fcc=(_0x3a0cd7,_0x2c4c34,_0x5d426f,_0x2b5891)=>{const _0x36edfa=_0x517094;for(var _0x4bae73=_0x2b5891>0x1?void 0x0:_0x2b5891?_0x186994(_0x2c4c34,_0x5d426f):_0x2c4c34,_0x56cb47=_0x3a0cd7[_0x36edfa(0x11b)]-0x1,_0x3cc40b;_0x56cb47>=0x0;_0x56cb47--)(_0x3cc40b=_0x3a0cd7[_0x56cb47])&&(_0x4bae73=_0x3cc40b(_0x4bae73)||_0x4bae73);return _0x4bae73;},_0x2a0068=(_0x36293a,_0x872fd3)=>(_0xc81ca2,_0x58559d)=>_0x872fd3(_0xc81ca2,_0x58559d,_0x36293a);function _0xabd89c(_0x369e81,_0x3c7c31){const _0x2bebd7=_0x517094,_0x2fbc8f=_0x369e81['replies'][0x0];return{..._0x3c7c31,'id':_0x2fbc8f[_0x2bebd7(0xff)],'resolved':_0x369e81['solved']===0x1,'dT':_0xb22aaa(_0x2fbc8f[_0x2bebd7(0xf1)]),'personId':_0x2fbc8f[_0x2bebd7(0x105)],'threadId':_0x2fbc8f[_0x2bebd7(0xe6)]};}function _0x4956a3(_0x444a04,_0x47895b,_0x559210){const _0x356a92=_0x517094;var _0x12b408,_0x5636dd;if(((_0x5636dd=(_0x12b408=_0x444a04==null?void 0x0:_0x444a04[_0x356a92(0x11c)])==null?void 0x0:_0x12b408['length'])!=null?_0x5636dd:0x0)>0x0){const _0x113f82=(_0x157ebe,_0x526280)=>({'id':_0x157ebe[_0x356a92(0xff)],'threadId':_0x157ebe[_0x356a92(0xe6)],'dT':_0xb22aaa(_0x157ebe['createTimestamp']),'personId':_0x157ebe[_0x356a92(0x105)],'resolved':_0x444a04[_0x356a92(0x124)]===_0x33b650[_0x356a92(0xfa)],'unitId':_0x47895b,'subUnitId':_0x559210,'text':JSON[_0x356a92(0x13e)](_0x157ebe[_0x356a92(0x127)]),'parentId':_0x526280}),_0x43c6af=_0x113f82(_0x444a04[_0x356a92(0x11c)][0x0]);return{..._0x43c6af,'children':_0x444a04[_0x356a92(0x11c)]['slice'](0x1)[_0x356a92(0xed)](_0x27bc5d=>_0x113f82(_0x27bc5d,_0x43c6af['id']))};}return null;}let _0x8da111=class{constructor(_0x11c497,_0x30b3ab,_0x749187){const _0x47fbdb=_0x517094;this[_0x47fbdb(0xee)]=_0x11c497,this[_0x47fbdb(0x11f)]=_0x30b3ab,this[_0x47fbdb(0xeb)]=_0x749187;}async[_0x517094(0x111)](_0x118937){const _0x1eeeb2=_0x517094;var _0x47524a,_0x4efc4c;const {parentId:_0x100520,unitId:_0x27d536,text:_0x1b1223,threadId:_0x5b18d5}=_0x118937,_0x2b2c25=(_0x4efc4c=(_0x47524a=_0x1b1223[_0x1eeeb2(0xd9)])==null?void 0x0:_0x47524a[_0x1eeeb2(0xfe)](_0x4cd704=>_0x4cd704[_0x1eeeb2(0xcf)]===_0x339162[_0x1eeeb2(0x103)][_0x1eeeb2(0x13f)])['map'](_0x380bde=>_0x380bde[_0x1eeeb2(0xe0)]))!=null?_0x4efc4c:[],_0x1a3548=JSON[_0x1eeeb2(0x12d)](_0x1b1223),_0x48c984=(await this[_0x1eeeb2(0xeb)][_0x1eeeb2(0x126)](_0x27d536))['getMemberID']();if(_0x100520){const _0x42786f={'memberId':_0x48c984,'unitId':_0x27d536,'content':_0x1a3548,'mention':_0x2b2c25,'threadId':_0x5b18d5},_0x362430=(await this['_httpService'][_0x1eeeb2(0xec)](_0x1eeeb2(0x134)+_0x27d536+'/reply',{'body':_0x42786f}))[_0x1eeeb2(0x144)][_0x1eeeb2(0xc8)];return{..._0x118937,'id':_0x362430[_0x1eeeb2(0xff)],'dT':_0x339162[_0x1eeeb2(0xdd)](+_0x362430['createTimestamp'])[_0x1eeeb2(0xdb)](_0x1eeeb2(0x12f)),'personId':_0x362430[_0x1eeeb2(0x105)]};}else{const _0x25f1b3={'memberId':_0x48c984,'unitId':_0x27d536,'content':_0x1a3548,'mention':_0x2b2c25},_0xfa56d3=await this[_0x1eeeb2(0xee)]['post'](_0x1eeeb2(0x134)+_0x27d536+_0x1eeeb2(0xea),{'body':_0x25f1b3});return _0xabd89c(_0xfa56d3[_0x1eeeb2(0x144)]['comment'],_0x118937);}}async[_0x517094(0x14b)](_0x20fc19){const _0x391b20=_0x517094;var _0x254f18,_0x4e238b;const {text:_0x2a8562,unitId:_0x1e2135}=_0x20fc19,_0x496aa5=(_0x4e238b=(_0x254f18=_0x2a8562[_0x391b20(0xd9)])==null?void 0x0:_0x254f18[_0x391b20(0xfe)](_0x19227a=>_0x19227a[_0x391b20(0xcf)]===_0x339162[_0x391b20(0x103)][_0x391b20(0x13f)])['map'](_0x328c88=>_0x328c88['rangeId']))!=null?_0x4e238b:[],_0x49945e=JSON[_0x391b20(0x12d)](_0x2a8562),_0x409af6=_0x20fc19[_0x391b20(0xe6)],_0x5dc326=_0x20fc19['id'],_0x51165b={'memberId':(await this[_0x391b20(0xeb)][_0x391b20(0x126)](_0x1e2135))[_0x391b20(0x117)](),'unitId':_0x1e2135,'threadId':_0x409af6,'mention':_0x496aa5,'content':_0x49945e,'replyId':_0x5dc326},_0x36edbb=await this[_0x391b20(0xee)]['post'](_0x391b20(0x134)+_0x1e2135+_0x391b20(0xd7),{'body':_0x51165b});return!_0x36edbb[_0x391b20(0x144)]['error']||_0x36edbb[_0x391b20(0x144)][_0x391b20(0xfb)][_0x391b20(0xdc)]===0x1;}async['resolveComment'](_0x3d9054){const _0x54ab83=_0x517094,{unitId:_0x470a18}=_0x3d9054,_0x273209=_0x3d9054[_0x54ab83(0xe6)],_0x2505d8={'memberId':this[_0x54ab83(0x11f)][_0x54ab83(0x104)]()['userID'],'unitId':_0x470a18,'threadId':_0x273209,'solved':_0x3d9054['resolved']?_0x33b650['Solved']:_0x33b650[_0x54ab83(0x106)]},_0x1ddbfb=await this[_0x54ab83(0xee)][_0x54ab83(0xec)](_0x54ab83(0x134)+_0x470a18+_0x54ab83(0xc4),{'body':_0x2505d8});return!_0x1ddbfb[_0x54ab83(0x144)]['error']||_0x1ddbfb[_0x54ab83(0x144)][_0x54ab83(0xfb)][_0x54ab83(0xdc)]===0x1;}async[_0x517094(0x10e)](_0x5c8d84,_0x620a9,_0x3d713a,_0x1125e0){const _0x3b8daf=_0x517094,_0xf63864={'memberId':(await this[_0x3b8daf(0xeb)][_0x3b8daf(0x126)](_0x5c8d84))[_0x3b8daf(0x117)](),'threadId':_0x3d713a,'replyId':_0x1125e0,'unitId':_0x5c8d84},_0x1bb998=await this[_0x3b8daf(0xee)]['post'](_0x3b8daf(0x134)+_0x5c8d84+_0x3b8daf(0x12c),{'body':_0xf63864});return!_0x1bb998[_0x3b8daf(0x144)][_0x3b8daf(0xfb)]||_0x1bb998[_0x3b8daf(0x144)][_0x3b8daf(0xfb)][_0x3b8daf(0xdc)]===0x1;}async[_0x517094(0x11d)](_0x5e4e6f,_0x418398,_0x2fdef4){const _0x264b77=_0x517094,_0x18b7a6={'unitId':_0x5e4e6f,'threadId':_0x2fdef4},_0x2a81dc=await this[_0x264b77(0xee)][_0x264b77(0xec)]('/universer-api/comment/unit/'+_0x5e4e6f+'/list',{'body':_0x18b7a6}),_0x2b3694=_0x2fdef4[_0x264b77(0xed)](_0xdc3439=>_0x4956a3(_0x2a81dc['body'][_0x264b77(0x133)][_0xdc3439],_0x5e4e6f,_0x418398))[_0x264b77(0xfe)](Boolean);return Object['values'](_0x2a81dc[_0x264b77(0x144)][_0x264b77(0x13a)])[_0x264b77(0xd8)](_0x43aeb1=>{const _0xa45aef=_0x264b77;this[_0xa45aef(0x11f)][_0xa45aef(0xf4)](_0x43aeb1);}),_0x2b3694;}[_0x517094(0x10a)](_0xdcd73d){const _0x228a61=_0x517094;return{'id':_0xdcd73d['id'],'threadId':_0xdcd73d[_0x228a61(0xe6)],'ref':_0xdcd73d[_0x228a61(0xef)]};}};_0x8da111=_0x2c9fcc([_0x2a0068(0x0,_0x339162['Inject'](_0x24ec67[_0x517094(0xe8)])),_0x2a0068(0x1,_0x339162[_0x517094(0x122)](_0x339162[_0x517094(0x113)])),_0x2a0068(0x2,_0x339162[_0x517094(0x122)](_0x22aec6[_0x517094(0x138)]))],_0x8da111);var _0x369d25=Object[_0x517094(0xda)],_0x28b8f2=(_0x2d1738,_0x56f711,_0x1fa7e8,_0x3a9c98)=>{const _0x6f51ea=_0x517094;for(var _0x127ffd=_0x3a9c98>0x1?void 0x0:_0x3a9c98?_0x369d25(_0x56f711,_0x1fa7e8):_0x56f711,_0x453438=_0x2d1738[_0x6f51ea(0x11b)]-0x1,_0x3a64de;_0x453438>=0x0;_0x453438--)(_0x3a64de=_0x2d1738[_0x453438])&&(_0x127ffd=_0x3a64de(_0x127ffd)||_0x127ffd);return _0x127ffd;},_0x5a26af=(_0x127f65,_0x45f51e)=>(_0x373f85,_0x3bed1f)=>_0x45f51e(_0x373f85,_0x3bed1f,_0x127f65);let _0x211922=class extends _0x339162[_0x517094(0xf6)]{constructor(_0x28b507,_0x133971){const _0x367a28=_0x517094;super(),this[_0x367a28(0x139)]=_0x28b507,this['_threadCommentDataSource']=_0x133971,this[_0x367a28(0xc5)]();}[_0x517094(0xc5)](){const _0x484cd9=_0x517094;this[_0x484cd9(0x139)]['dataSource']=this[_0x484cd9(0x101)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x211922=_0x28b8f2([_0x5a26af(0x0,_0x4f90b6['IThreadCommentDataSourceService']),_0x5a26af(0x1,_0x339162[_0x517094(0x122)](_0x8da111))],_0x211922);var _0x1bef80=Object['defineProperty'],_0x5b30ec=Object['getOwnPropertyDescriptor'],_0x2622ef=(_0x5b5cb2,_0x3376b7,_0x4ac799)=>_0x3376b7 in _0x5b5cb2?_0x1bef80(_0x5b5cb2,_0x3376b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ac799}):_0x5b5cb2[_0x3376b7]=_0x4ac799,_0x3af381=(_0x513f47,_0xb2b7dd,_0x4fca76,_0x25cb32)=>{const _0x5dcae9=_0x517094;for(var _0x15f4c8=_0x25cb32>0x1?void 0x0:_0x25cb32?_0x5b30ec(_0xb2b7dd,_0x4fca76):_0xb2b7dd,_0xc1ff84=_0x513f47[_0x5dcae9(0x11b)]-0x1,_0x1c9dfb;_0xc1ff84>=0x0;_0xc1ff84--)(_0x1c9dfb=_0x513f47[_0xc1ff84])&&(_0x15f4c8=_0x1c9dfb(_0x15f4c8)||_0x15f4c8);return _0x15f4c8;},_0x4a5cf2=(_0x3c0c7f,_0xb7ef32)=>(_0x4ad10e,_0x2373d0)=>_0xb7ef32(_0x4ad10e,_0x2373d0,_0x3c0c7f),_0x35a6b1=(_0x1a1397,_0x10f8d8,_0x411162)=>_0x2622ef(_0x1a1397,typeof _0x10f8d8!=_0x517094(0xd5)?_0x10f8d8+'':_0x10f8d8,_0x411162);_0x43a127[_0x517094(0xcd)]=class extends _0x339162[_0x517094(0x100)]{constructor(_0x379a80=_0xa6a9d5,_0x4446a7,_0x58dcc6){const _0x11a133=_0x517094;super(),this[_0x11a133(0x14a)]=_0x379a80,this[_0x11a133(0xce)]=_0x4446a7,this['_configService']=_0x58dcc6;const {..._0x44c93b}=_0x339162[_0x11a133(0xe9)]({},_0xa6a9d5,this[_0x11a133(0x14a)]);this[_0x11a133(0xd1)][_0x11a133(0xc7)](_0x449652,_0x44c93b);}[_0x517094(0xf9)](){const _0x576607=_0x517094;[[_0x8da111],[_0x211922],[_0x1078ee]][_0x576607(0xd8)](_0x15e631=>{const _0xb48e79=_0x576607;this['_injector'][_0xb48e79(0x141)](_0x15e631);});}[_0x517094(0xd2)](){const _0x2eaf53=_0x517094;this[_0x2eaf53(0xce)][_0x2eaf53(0x132)](_0x211922),this[_0x2eaf53(0xce)][_0x2eaf53(0x132)](_0x1078ee);}},_0x35a6b1(_0x43a127[_0x517094(0xcd)],'pluginName',_0x310541),_0x35a6b1(_0x43a127[_0x517094(0xcd)],'type',_0x339162['UniverInstanceType'][_0x517094(0x119)]),_0x43a127['UniverThreadCommentDataSourcePlugin']=_0x3af381([_0x339162['DependentOn'](_0xd7cca9['UniverThreadCommentUIPlugin'],_0x22aec6[_0x517094(0xf3)],_0x5392ce['UniverLicensePlugin']),_0x4a5cf2(0x1,_0x339162[_0x517094(0x122)](_0x339162['Injector'])),_0x4a5cf2(0x2,_0x339162[_0x517094(0x146)])],_0x43a127[_0x517094(0xcd)]),Object[_0x517094(0x128)](_0x43a127,Symbol[_0x517094(0x125)],{'value':_0x517094(0x142)});}));function _0x4bda(){const _0x104909=['ThreadCommentModel','getComment','@univerjs-pro/collaboration-client','disposeWithMe','UniverThreadCommentDataSourcePlugin','_injector','rangeType','getUnit','_configService','onReady','object','@univerjs/network','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','forEach','customRanges','getOwnPropertyDescriptor','format','code','dayjs','1132790YnlePn','root','rangeId','UniverProCollaborationClient','Add','rxjs','292704jSOmWf','user','threadId','@univerjs/thread-comment','HTTPService','merge','/add','_sessionService','post','map','_httpService','ref','subscribe','createTimestamp','personId','UniverCollaborationClientPlugin','addUser','Unknown','Disposable','size','UniverCore','onStarting','Solved','error','60836wVCOne','9444aGLsks','filter','replyId','Plugin','_threadCommentDataSource','getUser','CustomRangeType','getCurrentUser','userId','OpenOrReOpen','commentUpdate$','Reply','amd','saveCommentToSnapshot','@univerjs/thread-comment-ui','Edit','99qcqKAU','deleteComment','UniverThreadCommentUi','_init','addComment','91ouzdnD','UserManagerService','16528304aqKzBD','delete','468bVMMTA','getMemberID','CommentService','UNIVER_UNKNOWN','UniverProThreadCommentDatasource','length','replies','listComments','_threadCommentModel','_userService','parentId','Injector','Inject','UNRECOGNIZED','solved','toStringTag','requireSession','content','defineProperty','find','@univerjs-pro/license','UniverThreadComment','/delete','stringify','49520zkBQgw','YYYY/MM/DD\x20HH:mm','unitId','UniverProLicense','get','comments','/universer-api/comment/unit/','pipe','_initUserSync','Solve','CollaborationSessionService','_threadCommentDataSourceService','users','thread-comment-data-source.config','2189dfbriu','6ilfpPg','parse','COMMENT','Delete','add','Module','type','body','_commentService','IConfigService','1GlVjzT','exports','4503970gRJlIR','_config','updateComment','/solved','_initDataSource','userID','setConfig','reply'];_0x4bda=function(){return _0x104909;};return _0x4bda();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.12-nightly.202510221114",
3
+ "version": "0.10.12-nightly.202510251119",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.12-nightly.202510221114",
49
- "@univerjs-pro/license": "0.10.12-nightly.202510221114",
50
- "@univerjs/core": "0.10.12-nightly.202510221114",
51
- "@univerjs/thread-comment": "0.10.12-nightly.202510221114",
52
- "@univerjs/network": "0.10.12-nightly.202510221114",
48
+ "@univerjs-pro/collaboration-client": "0.10.12-nightly.202510251119",
49
+ "@univerjs-pro/license": "0.10.12-nightly.202510251119",
50
+ "@univerjs/core": "0.10.12-nightly.202510251119",
53
51
  "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.10.12-nightly.202510221114"
52
+ "@univerjs/thread-comment": "0.10.12-nightly.202510251119",
53
+ "@univerjs/thread-comment-ui": "0.10.12-nightly.202510251119",
54
+ "@univerjs/network": "0.10.12-nightly.202510251119"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",