@univerjs-pro/thread-comment-datasource 0.12.3-nightly.202512060617 → 0.12.4-experimental.20251208-c4b8a44

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 _0x87ed89=_0x12e0;(function(_0x5146ad,_0x485bf2){const _0x8afe4f=_0x12e0,_0x369242=_0x5146ad();while(!![]){try{const _0x5d369a=-parseInt(_0x8afe4f(0x160))/0x1+-parseInt(_0x8afe4f(0x1a5))/0x2+-parseInt(_0x8afe4f(0x14c))/0x3+parseInt(_0x8afe4f(0x148))/0x4+parseInt(_0x8afe4f(0x1a2))/0x5+parseInt(_0x8afe4f(0x1a4))/0x6+-parseInt(_0x8afe4f(0x158))/0x7*(-parseInt(_0x8afe4f(0x190))/0x8);if(_0x5d369a===_0x485bf2)break;else _0x369242['push'](_0x369242['shift']());}catch(_0x33f9a9){_0x369242['push'](_0x369242['shift']());}}}(_0x5e3c,0xaf28f));Object['defineProperty'](exports,Symbol[_0x87ed89(0x17b)],{'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='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5462e6=>(_0x5462e6[_0x5462e6[_0x87ed89(0x179)]=0x0]=_0x87ed89(0x179),_0x5462e6[_0x5462e6['Solved']=0x1]=_0x87ed89(0x16a),_0x5462e6[_0x5462e6[_0x87ed89(0x196)]=-0x1]='UNRECOGNIZED',_0x5462e6))(I||{}),v=(_0x19cf12=>(_0x19cf12[_0x19cf12['Unknown']=0x0]=_0x87ed89(0x16c),_0x19cf12[_0x19cf12['Add']=0x1]=_0x87ed89(0x140),_0x19cf12[_0x19cf12[_0x87ed89(0x180)]=0x2]=_0x87ed89(0x180),_0x19cf12[_0x19cf12[_0x87ed89(0x14d)]=0x3]=_0x87ed89(0x14d),_0x19cf12[_0x19cf12['Delete']=0x4]='Delete',_0x19cf12[_0x19cf12['Solve']=0x5]=_0x87ed89(0x174),_0x19cf12[_0x19cf12[_0x87ed89(0x196)]=-0x1]=_0x87ed89(0x196),_0x19cf12))(v||{});function _0x5e3c(){const _0x22cd9b=['forEach','4490105HxTDwJ','_injector','1021050ERHYAT','1948834ObyiIA','/reply','getMemberID','subscribe','filter','length','replyId','CustomRangeType','UserManagerService','/delete','getOwnPropertyDescriptor','addComment','UniverCollaborationClientPlugin','setConfig','UniverLicensePlugin','code','Add','listComments','getComment','merge','size','syncUpdateMutationToColla','pluginName','COMMENT','1220216BfITCo','body','/universer-api/comment/unit/','symbol','1777344bKgnZJ','Edit','CollaborationSessionService','/universer-api/user/list','threadId','rangeId','resolveComment','_sessionService','find','DependentOn','get','_config','7WrEuBV','format','defineProperty','comments','type','content','reply','root','464041BNaQnK','user','CommentService','Delete','onStarting','saveCommentToSnapshot','userID','createTimestamp','requireSession','Injector','Solved','error','Unknown','_userService','replies','add','customRanges','_threadCommentDataSource','userId','onReady','Solve','YYYY/MM/DD\x20HH:mm','solved','getCurrentUser','parentId','OpenOrReOpen','comment','toStringTag','parse','_threadCommentModel','unitId','commentUpdate$','Reply','UNIVER_UNKNOWN','_httpService','values','personId','thread-comment-data-source.config','disposeWithMe','UniverThreadCommentDataSourcePlugin','UniverInstanceType','Inject','bufferTime','addUser','_initUserSync','_threadCommentDataSourceService','users','deleteComment','11000888gbTVMc','updateComment','/edit','map','Plugin','_commentService','UNRECOGNIZED','Disposable','payload','post','resolved','HTTPService','_initDataSource','/list','getUnit','IConfigService','dataSource'];_0x5e3c=function(){return _0x22cd9b;};return _0x5e3c();}const f=_0xc494ea=>c['dayjs'](new Date(+_0xc494ea))[_0x87ed89(0x159)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x1ccc74,_0x1785e6)=>{const _0x3c595f=_0x87ed89,_0x576fce=_0x1ccc74['get'](c[_0x3c595f(0x1ad)]),_0x521937=_0x1ccc74['get'](P[_0x3c595f(0x19b)]);_0x1785e6['forEach'](_0x388851=>{_0x576fce['getUser'](_0x388851)&&_0x1785e6['delete'](_0x388851);}),_0x1785e6[_0x3c595f(0x144)]&&(await _0x521937[_0x3c595f(0x156)](_0x3c595f(0x14f),{'params':{'userIDs':[..._0x1785e6]}}))['body'][_0x3c595f(0x18e)][_0x3c595f(0x1a1)](_0x1dbfd6=>{_0x1dbfd6&&_0x576fce['addUser'](_0x1dbfd6);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x508c17,_0x36f688,_0x32c81e,_0x33b183)=>{const _0xb99944=_0x87ed89;for(var _0x21a3c5=_0x33b183>0x1?void 0x0:_0x33b183?$(_0x36f688,_0x32c81e):_0x36f688,_0x6672cc=_0x508c17[_0xb99944(0x1aa)]-0x1,_0x53f99b;_0x6672cc>=0x0;_0x6672cc--)(_0x53f99b=_0x508c17[_0x6672cc])&&(_0x21a3c5=_0x53f99b(_0x21a3c5)||_0x21a3c5);return _0x21a3c5;},S=(_0x57a339,_0x5e46e3)=>(_0x2941d1,_0x11d203)=>_0x5e46e3(_0x2941d1,_0x11d203,_0x57a339);let _=class extends c[_0x87ed89(0x197)]{constructor(_0x5b56ce,_0x2011a5,_0x22d58c,_0x351bb8){const _0x528edf=_0x87ed89;super(),this[_0x528edf(0x195)]=_0x5b56ce,this[_0x528edf(0x17d)]=_0x2011a5,this[_0x528edf(0x16d)]=_0x22d58c,this[_0x528edf(0x1a3)]=_0x351bb8,this['_init'](),this[_0x528edf(0x18c)]();}[_0x87ed89(0x18c)](){const _0x55a4a6=_0x87ed89;this[_0x55a4a6(0x186)](this['_threadCommentModel'][_0x55a4a6(0x17f)]['pipe'](j[_0x55a4a6(0x18a)](0x10))[_0x55a4a6(0x1a8)](_0x4a07e1=>{const _0x43e7eb=_0x55a4a6,_0x2e7f43=new Set();_0x4a07e1[_0x43e7eb(0x1a1)](_0xdddab1=>{const _0x437545=_0x43e7eb;switch(_0xdddab1[_0x437545(0x15c)]){case _0x437545(0x16f):{const _0x29bf26=_0xdddab1[_0x437545(0x198)][_0x437545(0x184)];_0x2e7f43[_0x437545(0x16f)](_0x29bf26);break;}}}),R(this[_0x43e7eb(0x1a3)],_0x2e7f43);}));}['_init'](){const _0x195f58=_0x87ed89;this['disposeWithMe'](this[_0x195f58(0x195)]['commentUpdate$'][_0x195f58(0x1a8)](async _0x3bf2d9=>{const _0x9a4500=_0x195f58;var _0x2ae1c0,_0x7d23e2,_0x319643,_0x1abf7f;const _0x5c87d4=(_0x2ae1c0=this['_threadCommentModel'][_0x9a4500(0x19e)](_0x3bf2d9[_0x9a4500(0x17e)])['find'](_0x146b16=>_0x146b16[_0x9a4500(0x150)]===_0x3bf2d9[_0x9a4500(0x150)]))==null?void 0x0:_0x2ae1c0[_0x9a4500(0x15f)];if(!_0x5c87d4)return;const {unitId:_0x54891d,subUnitId:_0x50124c}=_0x5c87d4;switch(_0x3bf2d9[_0x9a4500(0x161)]&&this['_userService'][_0x9a4500(0x18b)](_0x3bf2d9[_0x9a4500(0x161)]),_0x3bf2d9[_0x9a4500(0x15c)]){case v[_0x9a4500(0x140)]:break;case v[_0x9a4500(0x180)]:{this['_threadCommentModel'][_0x9a4500(0x1b0)](_0x54891d,_0x50124c,{'unitId':_0x54891d,'subUnitId':_0x50124c,'ref':'','id':_0x3bf2d9[_0x9a4500(0x1ab)],'dT':f(+_0x3bf2d9[_0x9a4500(0x167)]),'threadId':_0x3bf2d9[_0x9a4500(0x150)],'personId':(_0x319643=(_0x7d23e2=_0x3bf2d9[_0x9a4500(0x161)])==null?void 0x0:_0x7d23e2['userID'])!=null?_0x319643:_0x3bf2d9[_0x9a4500(0x172)],'text':JSON[_0x9a4500(0x17c)](_0x3bf2d9['content']),'parentId':_0x5c87d4['id']});break;}case v[_0x9a4500(0x163)]:{const _0xe65053=this[_0x9a4500(0x17d)][_0x9a4500(0x142)](_0x54891d,_0x50124c,_0x3bf2d9[_0x9a4500(0x1ab)]);_0xe65053&&_0xe65053[_0x9a4500(0x178)]&&this['_threadCommentModel'][_0x9a4500(0x18f)](_0x54891d,_0x50124c,_0x3bf2d9[_0x9a4500(0x1ab)]);break;}case v[_0x9a4500(0x14d)]:{this[_0x9a4500(0x17d)]['updateComment'](_0x54891d,_0x50124c,{'commentId':_0x3bf2d9[_0x9a4500(0x1ab)],'text':JSON['parse'](_0x3bf2d9['content'])});break;}case v['Solve']:{const _0xdbe0d2=(_0x1abf7f=this[_0x9a4500(0x17d)][_0x9a4500(0x19e)](_0x3bf2d9['unitId'])[_0x9a4500(0x154)](_0x22d3ef=>_0x22d3ef[_0x9a4500(0x150)]===_0x3bf2d9[_0x9a4500(0x150)]))==null?void 0x0:_0x1abf7f['root'];_0xdbe0d2&&this[_0x9a4500(0x17d)][_0x9a4500(0x152)](_0x54891d,_0x50124c,_0xdbe0d2['id'],_0x3bf2d9[_0x9a4500(0x176)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x87ed89(0x189)](b[_0x87ed89(0x162)])),S(0x1,c[_0x87ed89(0x189)](M['ThreadCommentModel'])),S(0x2,c[_0x87ed89(0x189)](c[_0x87ed89(0x1ad)])),S(0x3,c[_0x87ed89(0x189)](c['Injector']))],_);const q=_0x87ed89(0x185),D={};var A=Object[_0x87ed89(0x1af)],x=(_0x13e485,_0xacd447,_0x385d36,_0x38666e)=>{const _0x1111af=_0x87ed89;for(var _0x4fa04e=_0x38666e>0x1?void 0x0:_0x38666e?A(_0xacd447,_0x385d36):_0xacd447,_0xe55656=_0x13e485[_0x1111af(0x1aa)]-0x1,_0x464188;_0xe55656>=0x0;_0xe55656--)(_0x464188=_0x13e485[_0xe55656])&&(_0x4fa04e=_0x464188(_0x4fa04e)||_0x4fa04e);return _0x4fa04e;},C=(_0x1535a9,_0x4f10f6)=>(_0x5e735e,_0x5dc315)=>_0x4f10f6(_0x5e735e,_0x5dc315,_0x1535a9);function Y(_0x4d266a,_0x1ad374){const _0x316edc=_0x87ed89,_0x495e4d=_0x4d266a[_0x316edc(0x16e)][0x0];return{..._0x1ad374,'id':_0x495e4d[_0x316edc(0x1ab)],'resolved':_0x4d266a[_0x316edc(0x176)]===0x1,'dT':f(_0x495e4d[_0x316edc(0x167)]),'personId':_0x495e4d['userId'],'threadId':_0x495e4d[_0x316edc(0x150)]};}function G(_0x2f1ba4,_0x22bb46,_0x52e858){const _0x5a2352=_0x87ed89;var _0x3ad5f3,_0x3a89bf;if(((_0x3a89bf=(_0x3ad5f3=_0x2f1ba4==null?void 0x0:_0x2f1ba4[_0x5a2352(0x16e)])==null?void 0x0:_0x3ad5f3[_0x5a2352(0x1aa)])!=null?_0x3a89bf:0x0)>0x0){const _0x582295=(_0x24bcd2,_0x1e107c)=>({'id':_0x24bcd2[_0x5a2352(0x1ab)],'threadId':_0x24bcd2[_0x5a2352(0x150)],'dT':f(_0x24bcd2[_0x5a2352(0x167)]),'personId':_0x24bcd2[_0x5a2352(0x172)],'resolved':_0x2f1ba4[_0x5a2352(0x176)]===I[_0x5a2352(0x16a)],'unitId':_0x22bb46,'subUnitId':_0x52e858,'text':JSON[_0x5a2352(0x17c)](_0x24bcd2[_0x5a2352(0x15d)]),'parentId':_0x1e107c}),_0x4aafe4=_0x582295(_0x2f1ba4[_0x5a2352(0x16e)][0x0]);return{..._0x4aafe4,'children':_0x2f1ba4[_0x5a2352(0x16e)]['slice'](0x1)['map'](_0x31eacf=>_0x582295(_0x31eacf,_0x4aafe4['id']))};}return null;}let p=class{constructor(_0x28d26c,_0x30365f,_0x203e53){const _0xb574ed=_0x87ed89;this[_0xb574ed(0x182)]=_0x28d26c,this[_0xb574ed(0x16d)]=_0x30365f,this[_0xb574ed(0x153)]=_0x203e53;}async['addComment'](_0x4f6ed7){const _0x135f6e=_0x87ed89;var _0x2bb1c8,_0x32d5b4;const {parentId:_0x461887,unitId:_0x2dfc2f,text:_0x52f71d,threadId:_0x21137b}=_0x4f6ed7,_0x1a2be3=(_0x32d5b4=(_0x2bb1c8=_0x52f71d[_0x135f6e(0x170)])==null?void 0x0:_0x2bb1c8[_0x135f6e(0x1a9)](_0x20b8ca=>_0x20b8ca['rangeType']===c[_0x135f6e(0x1ac)][_0x135f6e(0x147)])[_0x135f6e(0x193)](_0x3e9f63=>_0x3e9f63[_0x135f6e(0x151)]))!=null?_0x32d5b4:[],_0x354750=JSON['stringify'](_0x52f71d),_0x521f4c=(await this[_0x135f6e(0x153)][_0x135f6e(0x168)](_0x2dfc2f))['getMemberID']();if(_0x461887){const _0x3f0790={'memberId':_0x521f4c,'unitId':_0x2dfc2f,'content':_0x354750,'mention':_0x1a2be3,'threadId':_0x21137b},_0x4a8b49=(await this[_0x135f6e(0x182)][_0x135f6e(0x199)]('/universer-api/comment/unit/'+_0x2dfc2f+_0x135f6e(0x1a6),{'body':_0x3f0790}))['body'][_0x135f6e(0x15e)];return{..._0x4f6ed7,'id':_0x4a8b49[_0x135f6e(0x1ab)],'dT':c['dayjs'](+_0x4a8b49['createTimestamp'])[_0x135f6e(0x159)](_0x135f6e(0x175)),'personId':_0x4a8b49[_0x135f6e(0x172)]};}else{const _0x4c0ce3={'memberId':_0x521f4c,'unitId':_0x2dfc2f,'content':_0x354750,'mention':_0x1a2be3},_0x512bb8=await this[_0x135f6e(0x182)][_0x135f6e(0x199)]('/universer-api/comment/unit/'+_0x2dfc2f+'/add',{'body':_0x4c0ce3});return Y(_0x512bb8[_0x135f6e(0x149)][_0x135f6e(0x17a)],_0x4f6ed7);}}async[_0x87ed89(0x191)](_0x1468b6){const _0x3e7f7c=_0x87ed89;var _0x64377e,_0x29b5a7;const {text:_0x58d66a,unitId:_0x17be4f}=_0x1468b6,_0x475a84=(_0x29b5a7=(_0x64377e=_0x58d66a[_0x3e7f7c(0x170)])==null?void 0x0:_0x64377e[_0x3e7f7c(0x1a9)](_0x312509=>_0x312509['rangeType']===c[_0x3e7f7c(0x1ac)][_0x3e7f7c(0x147)])[_0x3e7f7c(0x193)](_0x162aa7=>_0x162aa7['rangeId']))!=null?_0x29b5a7:[],_0x272ee3=JSON['stringify'](_0x58d66a),_0x43edf3=_0x1468b6[_0x3e7f7c(0x150)],_0x1e6e8f=_0x1468b6['id'],_0x3dec68={'memberId':(await this[_0x3e7f7c(0x153)][_0x3e7f7c(0x168)](_0x17be4f))[_0x3e7f7c(0x1a7)](),'unitId':_0x17be4f,'threadId':_0x43edf3,'mention':_0x475a84,'content':_0x272ee3,'replyId':_0x1e6e8f},_0x3b030d=await this[_0x3e7f7c(0x182)][_0x3e7f7c(0x199)](_0x3e7f7c(0x14a)+_0x17be4f+_0x3e7f7c(0x192),{'body':_0x3dec68});return!_0x3b030d['body'][_0x3e7f7c(0x16b)]||_0x3b030d['body'][_0x3e7f7c(0x16b)][_0x3e7f7c(0x1b4)]===0x1;}async[_0x87ed89(0x152)](_0x49e64b){const _0x2627ce=_0x87ed89,{unitId:_0x189193}=_0x49e64b,_0x44e08b=_0x49e64b[_0x2627ce(0x150)],_0x3a4578={'memberId':this[_0x2627ce(0x16d)][_0x2627ce(0x177)]()[_0x2627ce(0x166)],'unitId':_0x189193,'threadId':_0x44e08b,'solved':_0x49e64b[_0x2627ce(0x19a)]?I[_0x2627ce(0x16a)]:I[_0x2627ce(0x179)]},_0x4dc672=await this['_httpService']['post'](_0x2627ce(0x14a)+_0x189193+'/solved',{'body':_0x3a4578});return!_0x4dc672[_0x2627ce(0x149)][_0x2627ce(0x16b)]||_0x4dc672[_0x2627ce(0x149)][_0x2627ce(0x16b)]['code']===0x1;}async['deleteComment'](_0x40f6bd,_0x136a9f,_0xd87ed3,_0x2f1993){const _0x366a4c=_0x87ed89,_0x1422b3={'memberId':(await this[_0x366a4c(0x153)][_0x366a4c(0x168)](_0x40f6bd))[_0x366a4c(0x1a7)](),'threadId':_0xd87ed3,'replyId':_0x2f1993,'unitId':_0x40f6bd},_0x1c2da8=await this[_0x366a4c(0x182)][_0x366a4c(0x199)](_0x366a4c(0x14a)+_0x40f6bd+_0x366a4c(0x1ae),{'body':_0x1422b3});return!_0x1c2da8['body'][_0x366a4c(0x16b)]||_0x1c2da8[_0x366a4c(0x149)][_0x366a4c(0x16b)][_0x366a4c(0x1b4)]===0x1;}async[_0x87ed89(0x141)](_0x21c8e6,_0x5c6335,_0x4388bc){const _0xbb399a=_0x87ed89,_0x2a5b3a={'unitId':_0x21c8e6,'threadId':_0x4388bc},_0x382d4e=await this[_0xbb399a(0x182)][_0xbb399a(0x199)](_0xbb399a(0x14a)+_0x21c8e6+_0xbb399a(0x19d),{'body':_0x2a5b3a}),_0xcb070e=_0x4388bc[_0xbb399a(0x193)](_0x50778b=>G(_0x382d4e[_0xbb399a(0x149)][_0xbb399a(0x15b)][_0x50778b],_0x21c8e6,_0x5c6335))[_0xbb399a(0x1a9)](Boolean);return Object[_0xbb399a(0x183)](_0x382d4e[_0xbb399a(0x149)][_0xbb399a(0x18e)])[_0xbb399a(0x1a1)](_0x3dbf01=>{const _0x2c195e=_0xbb399a;this[_0x2c195e(0x16d)][_0x2c195e(0x18b)](_0x3dbf01);}),_0xcb070e;}[_0x87ed89(0x165)](_0x10b71f){const _0xcc8206=_0x87ed89;return{'id':_0x10b71f['id'],'threadId':_0x10b71f[_0xcc8206(0x150)],'ref':_0x10b71f['ref']};}};p=x([C(0x0,c[_0x87ed89(0x189)](P[_0x87ed89(0x19b)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x87ed89(0x189)](b[_0x87ed89(0x14e)]))],p);function _0x12e0(_0x585e9b,_0x954bc3){_0x585e9b=_0x585e9b-0x140;const _0x5e3c04=_0x5e3c();let _0x12e093=_0x5e3c04[_0x585e9b];return _0x12e093;}var H=Object[_0x87ed89(0x1af)],J=(_0x747ef8,_0x2bfdb5,_0x364bc3,_0x58ff41)=>{const _0x151d15=_0x87ed89;for(var _0x393326=_0x58ff41>0x1?void 0x0:_0x58ff41?H(_0x2bfdb5,_0x364bc3):_0x2bfdb5,_0x48c5e6=_0x747ef8[_0x151d15(0x1aa)]-0x1,_0x9d4c38;_0x48c5e6>=0x0;_0x48c5e6--)(_0x9d4c38=_0x747ef8[_0x48c5e6])&&(_0x393326=_0x9d4c38(_0x393326)||_0x393326);return _0x393326;},y=(_0x57a6ef,_0x32bbec)=>(_0x4730b2,_0x3cf4bf)=>_0x32bbec(_0x4730b2,_0x3cf4bf,_0x57a6ef);let g=class extends c['Disposable']{constructor(_0x2b20f8,_0x17bb6a){const _0x4873fc=_0x87ed89;super(),this['_threadCommentDataSourceService']=_0x2b20f8,this['_threadCommentDataSource']=_0x17bb6a,this[_0x4873fc(0x19c)]();}[_0x87ed89(0x19c)](){const _0x59f883=_0x87ed89;this['_threadCommentDataSourceService'][_0x59f883(0x1a0)]=this[_0x59f883(0x171)],this[_0x59f883(0x18d)][_0x59f883(0x145)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x87ed89(0x15a)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5e605d,_0x493e4b,_0x3198f4)=>_0x493e4b in _0x5e605d?F(_0x5e605d,_0x493e4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3198f4}):_0x5e605d[_0x493e4b]=_0x3198f4,W=(_0x5bea60,_0x276d91,_0x23f387,_0x2ea9f7)=>{const _0x4df204=_0x87ed89;for(var _0x3e5d85=_0x2ea9f7>0x1?void 0x0:_0x2ea9f7?L(_0x276d91,_0x23f387):_0x276d91,_0x3a4702=_0x5bea60[_0x4df204(0x1aa)]-0x1,_0x228fb1;_0x3a4702>=0x0;_0x3a4702--)(_0x228fb1=_0x5bea60[_0x3a4702])&&(_0x3e5d85=_0x228fb1(_0x3e5d85)||_0x3e5d85);return _0x3e5d85;},O=(_0x7d1007,_0x4f1180)=>(_0x16f081,_0x2d33ec)=>_0x4f1180(_0x16f081,_0x2d33ec,_0x7d1007),N=(_0x22cd20,_0x383f19,_0x468b4f)=>Z(_0x22cd20,typeof _0x383f19!=_0x87ed89(0x14b)?_0x383f19+'':_0x383f19,_0x468b4f);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x87ed89(0x194)]{constructor(_0x4ce2d9=D,_0x2ba4f6,_0x56d87b){const _0x5d5c5a=_0x87ed89;super(),this[_0x5d5c5a(0x157)]=_0x4ce2d9,this[_0x5d5c5a(0x1a3)]=_0x2ba4f6,this['_configService']=_0x56d87b;const {..._0x1f70bc}=c[_0x5d5c5a(0x143)]({},D,this[_0x5d5c5a(0x157)]);this['_configService'][_0x5d5c5a(0x1b2)](q,_0x1f70bc);}[_0x87ed89(0x164)](){const _0x37a797=_0x87ed89;[[p],[g],[_]][_0x37a797(0x1a1)](_0x331c03=>{const _0x54d372=_0x37a797;this[_0x54d372(0x1a3)][_0x54d372(0x16f)](_0x331c03);});}[_0x87ed89(0x173)](){const _0x50b283=_0x87ed89;this['_injector'][_0x50b283(0x156)](g),this[_0x50b283(0x1a3)][_0x50b283(0x156)](_);}},N(exports[_0x87ed89(0x187)],_0x87ed89(0x146),U),N(exports[_0x87ed89(0x187)],_0x87ed89(0x15c),c[_0x87ed89(0x188)][_0x87ed89(0x181)]),exports[_0x87ed89(0x187)]=W([c[_0x87ed89(0x155)](w['UniverThreadCommentUIPlugin'],b[_0x87ed89(0x1b1)],T[_0x87ed89(0x1b3)]),O(0x1,c[_0x87ed89(0x189)](c[_0x87ed89(0x169)])),O(0x2,c[_0x87ed89(0x19f)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x278ed8=_0x1016;(function(_0x3ecf74,_0x181f01){const _0x146c8e=_0x1016,_0x4425ea=_0x3ecf74();while(!![]){try{const _0x111309=-parseInt(_0x146c8e(0x157))/0x1*(parseInt(_0x146c8e(0x1a8))/0x2)+-parseInt(_0x146c8e(0x180))/0x3+-parseInt(_0x146c8e(0x152))/0x4+parseInt(_0x146c8e(0x1a0))/0x5*(parseInt(_0x146c8e(0x146))/0x6)+-parseInt(_0x146c8e(0x173))/0x7+parseInt(_0x146c8e(0x17c))/0x8*(-parseInt(_0x146c8e(0x140))/0x9)+parseInt(_0x146c8e(0x14d))/0xa;if(_0x111309===_0x181f01)break;else _0x4425ea['push'](_0x4425ea['shift']());}catch(_0x420a2b){_0x4425ea['push'](_0x4425ea['shift']());}}}(_0x44de,0x4409c));Object[_0x278ed8(0x12e)](exports,Symbol[_0x278ed8(0x135)],{'value':_0x278ed8(0x186)});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=_0x278ed8(0x16e);var I=(_0x2df397=>(_0x2df397[_0x2df397[_0x278ed8(0x137)]=0x0]=_0x278ed8(0x137),_0x2df397[_0x2df397['Solved']=0x1]=_0x278ed8(0x159),_0x2df397[_0x2df397[_0x278ed8(0x181)]=-0x1]='UNRECOGNIZED',_0x2df397))(I||{}),v=(_0x2d6fd2=>(_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x142)]=0x0]=_0x278ed8(0x142),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x13f)]=0x1]=_0x278ed8(0x13f),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x199)]=0x2]=_0x278ed8(0x199),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x19c)]=0x3]=_0x278ed8(0x19c),_0x2d6fd2[_0x2d6fd2['Delete']=0x4]=_0x278ed8(0x138),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x15a)]=0x5]=_0x278ed8(0x15a),_0x2d6fd2[_0x2d6fd2['UNRECOGNIZED']=-0x1]=_0x278ed8(0x181),_0x2d6fd2))(v||{});function _0x44de(){const _0x288a59=['ref','_init','bufferTime','rangeId','deleteComment','unitId','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','_initDataSource','comments','threadId','2306367wvmLUB','/reply','replyId','getCurrentUser','getComment','pipe','requireSession','merge','stringify','2992UYhuXW','rangeType','CollaborationSessionService','/solved','1636281QiuDPH','UNRECOGNIZED','payload','saveCommentToSnapshot','customRanges','parse','Module','resolveComment','_configService','add','onReady','root','UniverCollaborationClientPlugin','_commentService','_injector','_config','type','UserManagerService','UniverThreadCommentUIPlugin','content','/edit','map','listComments','format','_threadCommentDataSourceService','Reply','Disposable','onStarting','Edit','dataSource','forEach','getOwnPropertyDescriptor','1135SDGuWF','addUser','commentUpdate$','_sessionService','/add','Injector','body','CommentService','910zVzhGa','/delete','Inject','get','reply','code','defineProperty','HTTPService','Plugin','getUnit','disposeWithMe','UniverThreadCommentDataSourcePlugin','dayjs','toStringTag','/universer-api/user/list','OpenOrReOpen','Delete','getMemberID','createTimestamp','COMMENT','delete','YYYY/MM/DD\x20HH:mm','_threadCommentModel','Add','1881wkxCDG','IConfigService','Unknown','IThreadCommentDataSourceService','thread-comment-data-source.config','CustomRangeType','3570aImVTZ','UniverLicensePlugin','_threadCommentDataSource','subscribe','find','solved','length','13970100bhkfgN','addComment','size','updateComment','_httpService','78328WGIdUt','parentId','comment','replies','personId','617DyVxtr','ThreadCommentModel','Solved','Solve','user','error','syncUpdateMutationToColla','_initUserSync','userId','post','_userService','filter','userID','users','UniverInstanceType','/universer-api/comment/unit/'];_0x44de=function(){return _0x288a59;};return _0x44de();}const f=_0x3c1cc6=>c['dayjs'](new Date(+_0x3c1cc6))['format'](_0x278ed8(0x13d)),R=async(_0x5f35a6,_0xb2d4f8)=>{const _0x46c47b=_0x278ed8,_0x9f9f67=_0x5f35a6[_0x46c47b(0x12b)](c['UserManagerService']),_0x36db87=_0x5f35a6[_0x46c47b(0x12b)](P['HTTPService']);_0xb2d4f8[_0x46c47b(0x19e)](_0x48b1f0=>{const _0x3db998=_0x46c47b;_0x9f9f67[_0x3db998(0x16d)](_0x48b1f0)&&_0xb2d4f8[_0x3db998(0x13c)](_0x48b1f0);}),_0xb2d4f8[_0x46c47b(0x14f)]&&(await _0x36db87['get'](_0x46c47b(0x136),{'params':{'userIDs':[..._0xb2d4f8]}}))[_0x46c47b(0x1a6)][_0x46c47b(0x164)][_0x46c47b(0x19e)](_0x30e80=>{const _0x2d98f7=_0x46c47b;_0x30e80&&_0x9f9f67[_0x2d98f7(0x1a1)](_0x30e80);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x3bcdea,_0x55c76a,_0x48910d,_0x234ce8)=>{const _0x1e8f44=_0x278ed8;for(var _0x25d13b=_0x234ce8>0x1?void 0x0:_0x234ce8?$(_0x55c76a,_0x48910d):_0x55c76a,_0x39d736=_0x3bcdea[_0x1e8f44(0x14c)]-0x1,_0xb756fd;_0x39d736>=0x0;_0x39d736--)(_0xb756fd=_0x3bcdea[_0x39d736])&&(_0x25d13b=_0xb756fd(_0x25d13b)||_0x25d13b);return _0x25d13b;},S=(_0xa64a9b,_0x25162f)=>(_0xbf014b,_0x4bfc3d)=>_0x25162f(_0xbf014b,_0x4bfc3d,_0xa64a9b);let _=class extends c[_0x278ed8(0x19a)]{constructor(_0x2ee0ed,_0x2eb936,_0x5a4199,_0x5a100b){const _0x58e029=_0x278ed8;super(),this[_0x58e029(0x18d)]=_0x2ee0ed,this[_0x58e029(0x13e)]=_0x2eb936,this[_0x58e029(0x161)]=_0x5a4199,this['_injector']=_0x5a100b,this[_0x58e029(0x168)](),this[_0x58e029(0x15e)]();}[_0x278ed8(0x15e)](){const _0x61fc44=_0x278ed8;this[_0x61fc44(0x132)](this[_0x61fc44(0x13e)][_0x61fc44(0x1a2)][_0x61fc44(0x178)](j[_0x61fc44(0x169)](0x10))[_0x61fc44(0x149)](_0x48cd76=>{const _0x11cd64=_0x61fc44,_0x19e633=new Set();_0x48cd76[_0x11cd64(0x19e)](_0x4f779f=>{const _0xf5768b=_0x11cd64;switch(_0x4f779f[_0xf5768b(0x190)]){case _0xf5768b(0x189):{const _0x2db6e1=_0x4f779f[_0xf5768b(0x182)][_0xf5768b(0x156)];_0x19e633[_0xf5768b(0x189)](_0x2db6e1);break;}}}),R(this[_0x11cd64(0x18e)],_0x19e633);}));}[_0x278ed8(0x168)](){const _0xb571e0=_0x278ed8;this[_0xb571e0(0x132)](this[_0xb571e0(0x18d)][_0xb571e0(0x1a2)][_0xb571e0(0x149)](async _0x53d7a7=>{const _0x95cea0=_0xb571e0;var _0x3b376f,_0x296cb8,_0x21c2d3,_0x31a0fd;const _0x28432c=(_0x3b376f=this[_0x95cea0(0x13e)]['getUnit'](_0x53d7a7[_0x95cea0(0x16c)])[_0x95cea0(0x14a)](_0x9e19af=>_0x9e19af['threadId']===_0x53d7a7['threadId']))==null?void 0x0:_0x3b376f[_0x95cea0(0x18b)];if(!_0x28432c)return;const {unitId:_0x365248,subUnitId:_0x9f4d75}=_0x28432c;switch(_0x53d7a7[_0x95cea0(0x15b)]&&this[_0x95cea0(0x161)][_0x95cea0(0x1a1)](_0x53d7a7[_0x95cea0(0x15b)]),_0x53d7a7['type']){case v[_0x95cea0(0x13f)]:break;case v['Reply']:{this['_threadCommentModel'][_0x95cea0(0x14e)](_0x365248,_0x9f4d75,{'unitId':_0x365248,'subUnitId':_0x9f4d75,'ref':'','id':_0x53d7a7[_0x95cea0(0x175)],'dT':f(+_0x53d7a7[_0x95cea0(0x13a)]),'threadId':_0x53d7a7[_0x95cea0(0x172)],'personId':(_0x21c2d3=(_0x296cb8=_0x53d7a7[_0x95cea0(0x15b)])==null?void 0x0:_0x296cb8['userID'])!=null?_0x21c2d3:_0x53d7a7[_0x95cea0(0x15f)],'text':JSON[_0x95cea0(0x185)](_0x53d7a7['content']),'parentId':_0x28432c['id']});break;}case v[_0x95cea0(0x138)]:{const _0x1fd558=this[_0x95cea0(0x13e)][_0x95cea0(0x177)](_0x365248,_0x9f4d75,_0x53d7a7[_0x95cea0(0x175)]);_0x1fd558&&_0x1fd558[_0x95cea0(0x153)]&&this[_0x95cea0(0x13e)]['deleteComment'](_0x365248,_0x9f4d75,_0x53d7a7[_0x95cea0(0x175)]);break;}case v[_0x95cea0(0x19c)]:{this[_0x95cea0(0x13e)][_0x95cea0(0x150)](_0x365248,_0x9f4d75,{'commentId':_0x53d7a7[_0x95cea0(0x175)],'text':JSON['parse'](_0x53d7a7[_0x95cea0(0x193)])});break;}case v[_0x95cea0(0x15a)]:{const _0x526efa=(_0x31a0fd=this[_0x95cea0(0x13e)][_0x95cea0(0x131)](_0x53d7a7['unitId'])[_0x95cea0(0x14a)](_0x42761b=>_0x42761b[_0x95cea0(0x172)]===_0x53d7a7[_0x95cea0(0x172)]))==null?void 0x0:_0x31a0fd[_0x95cea0(0x18b)];_0x526efa&&this['_threadCommentModel'][_0x95cea0(0x187)](_0x365248,_0x9f4d75,_0x526efa['id'],_0x53d7a7[_0x95cea0(0x14b)]===I[_0x95cea0(0x159)]);break;}}}));}};_=E([S(0x0,c[_0x278ed8(0x12a)](b[_0x278ed8(0x1a7)])),S(0x1,c[_0x278ed8(0x12a)](M[_0x278ed8(0x158)])),S(0x2,c[_0x278ed8(0x12a)](c[_0x278ed8(0x191)])),S(0x3,c['Inject'](c[_0x278ed8(0x1a5)]))],_);const q=_0x278ed8(0x144),D={};var A=Object[_0x278ed8(0x19f)],x=(_0x4f24ee,_0x56132b,_0x4bbd9b,_0x4e5507)=>{const _0x1d62e7=_0x278ed8;for(var _0x43fcf1=_0x4e5507>0x1?void 0x0:_0x4e5507?A(_0x56132b,_0x4bbd9b):_0x56132b,_0x1c951d=_0x4f24ee[_0x1d62e7(0x14c)]-0x1,_0x1c8be1;_0x1c951d>=0x0;_0x1c951d--)(_0x1c8be1=_0x4f24ee[_0x1c951d])&&(_0x43fcf1=_0x1c8be1(_0x43fcf1)||_0x43fcf1);return _0x43fcf1;},C=(_0x4d01fe,_0x283bab)=>(_0xc99d1b,_0x109ead)=>_0x283bab(_0xc99d1b,_0x109ead,_0x4d01fe);function _0x1016(_0x37c7e1,_0x32ae33){_0x37c7e1=_0x37c7e1-0x129;const _0x44deec=_0x44de();let _0x1016b3=_0x44deec[_0x37c7e1];return _0x1016b3;}function Y(_0x4a1670,_0x48b24f){const _0x4b3585=_0x278ed8,_0x2406cf=_0x4a1670[_0x4b3585(0x155)][0x0];return{..._0x48b24f,'id':_0x2406cf[_0x4b3585(0x175)],'resolved':_0x4a1670[_0x4b3585(0x14b)]===0x1,'dT':f(_0x2406cf[_0x4b3585(0x13a)]),'personId':_0x2406cf[_0x4b3585(0x15f)],'threadId':_0x2406cf[_0x4b3585(0x172)]};}function G(_0x383867,_0x237c68,_0x5abeb0){const _0x10d534=_0x278ed8;var _0x1fa980,_0x3c4f3c;if(((_0x3c4f3c=(_0x1fa980=_0x383867==null?void 0x0:_0x383867[_0x10d534(0x155)])==null?void 0x0:_0x1fa980[_0x10d534(0x14c)])!=null?_0x3c4f3c:0x0)>0x0){const _0x1fbaea=(_0xfded55,_0x529e67)=>({'id':_0xfded55[_0x10d534(0x175)],'threadId':_0xfded55[_0x10d534(0x172)],'dT':f(_0xfded55[_0x10d534(0x13a)]),'personId':_0xfded55[_0x10d534(0x15f)],'resolved':_0x383867['solved']===I[_0x10d534(0x159)],'unitId':_0x237c68,'subUnitId':_0x5abeb0,'text':JSON['parse'](_0xfded55[_0x10d534(0x193)]),'parentId':_0x529e67}),_0x37b578=_0x1fbaea(_0x383867[_0x10d534(0x155)][0x0]);return{..._0x37b578,'children':_0x383867['replies']['slice'](0x1)[_0x10d534(0x195)](_0x28d095=>_0x1fbaea(_0x28d095,_0x37b578['id']))};}return null;}let p=class{constructor(_0x41112c,_0x587d9f,_0x21f024){const _0x366108=_0x278ed8;this[_0x366108(0x151)]=_0x41112c,this[_0x366108(0x161)]=_0x587d9f,this[_0x366108(0x1a3)]=_0x21f024;}async[_0x278ed8(0x14e)](_0x36d285){const _0xa756f=_0x278ed8;var _0x2716e1,_0x2c556f;const {parentId:_0xc2631a,unitId:_0xa81247,text:_0x19a670,threadId:_0x90613a}=_0x36d285,_0x54e9c0=(_0x2c556f=(_0x2716e1=_0x19a670[_0xa756f(0x184)])==null?void 0x0:_0x2716e1[_0xa756f(0x162)](_0x195b25=>_0x195b25[_0xa756f(0x17d)]===c['CustomRangeType']['COMMENT'])[_0xa756f(0x195)](_0x3cd1e0=>_0x3cd1e0['rangeId']))!=null?_0x2c556f:[],_0x172d5d=JSON[_0xa756f(0x17b)](_0x19a670),_0x444e11=(await this[_0xa756f(0x1a3)][_0xa756f(0x179)](_0xa81247))[_0xa756f(0x139)]();if(_0xc2631a){const _0x147b47={'memberId':_0x444e11,'unitId':_0xa81247,'content':_0x172d5d,'mention':_0x54e9c0,'threadId':_0x90613a},_0x447659=(await this['_httpService'][_0xa756f(0x160)](_0xa756f(0x166)+_0xa81247+_0xa756f(0x174),{'body':_0x147b47}))[_0xa756f(0x1a6)][_0xa756f(0x12c)];return{..._0x36d285,'id':_0x447659[_0xa756f(0x175)],'dT':c[_0xa756f(0x134)](+_0x447659[_0xa756f(0x13a)])[_0xa756f(0x197)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x447659[_0xa756f(0x15f)]};}else{const _0x433ab1={'memberId':_0x444e11,'unitId':_0xa81247,'content':_0x172d5d,'mention':_0x54e9c0},_0x79b4ac=await this[_0xa756f(0x151)][_0xa756f(0x160)](_0xa756f(0x166)+_0xa81247+_0xa756f(0x1a4),{'body':_0x433ab1});return Y(_0x79b4ac['body'][_0xa756f(0x154)],_0x36d285);}}async['updateComment'](_0x301cae){const _0x51e63e=_0x278ed8;var _0x38e322,_0x26431b;const {text:_0x2805d1,unitId:_0x364e56}=_0x301cae,_0x3589f3=(_0x26431b=(_0x38e322=_0x2805d1[_0x51e63e(0x184)])==null?void 0x0:_0x38e322['filter'](_0x3649a1=>_0x3649a1['rangeType']===c[_0x51e63e(0x145)][_0x51e63e(0x13b)])['map'](_0xef4451=>_0xef4451[_0x51e63e(0x16a)]))!=null?_0x26431b:[],_0x147c92=JSON['stringify'](_0x2805d1),_0x177b29=_0x301cae[_0x51e63e(0x172)],_0x2555cf=_0x301cae['id'],_0x2fab02={'memberId':(await this[_0x51e63e(0x1a3)][_0x51e63e(0x179)](_0x364e56))[_0x51e63e(0x139)](),'unitId':_0x364e56,'threadId':_0x177b29,'mention':_0x3589f3,'content':_0x147c92,'replyId':_0x2555cf},_0x529935=await this[_0x51e63e(0x151)][_0x51e63e(0x160)](_0x51e63e(0x166)+_0x364e56+_0x51e63e(0x194),{'body':_0x2fab02});return!_0x529935[_0x51e63e(0x1a6)]['error']||_0x529935[_0x51e63e(0x1a6)][_0x51e63e(0x15c)][_0x51e63e(0x12d)]===0x1;}async[_0x278ed8(0x187)](_0x2de858){const _0xd74a94=_0x278ed8,{unitId:_0x540cbe}=_0x2de858,_0x193cbc=_0x2de858[_0xd74a94(0x172)],_0x313cdc={'memberId':this[_0xd74a94(0x161)][_0xd74a94(0x176)]()[_0xd74a94(0x163)],'unitId':_0x540cbe,'threadId':_0x193cbc,'solved':_0x2de858[_0xd74a94(0x16f)]?I[_0xd74a94(0x159)]:I[_0xd74a94(0x137)]},_0x40813d=await this[_0xd74a94(0x151)][_0xd74a94(0x160)](_0xd74a94(0x166)+_0x540cbe+_0xd74a94(0x17f),{'body':_0x313cdc});return!_0x40813d[_0xd74a94(0x1a6)][_0xd74a94(0x15c)]||_0x40813d['body'][_0xd74a94(0x15c)][_0xd74a94(0x12d)]===0x1;}async[_0x278ed8(0x16b)](_0x201f36,_0x190a9d,_0x5a5f84,_0x5eab5d){const _0x1384dd=_0x278ed8,_0x5edaac={'memberId':(await this[_0x1384dd(0x1a3)][_0x1384dd(0x179)](_0x201f36))['getMemberID'](),'threadId':_0x5a5f84,'replyId':_0x5eab5d,'unitId':_0x201f36},_0xdb314a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x201f36+_0x1384dd(0x129),{'body':_0x5edaac});return!_0xdb314a[_0x1384dd(0x1a6)][_0x1384dd(0x15c)]||_0xdb314a[_0x1384dd(0x1a6)][_0x1384dd(0x15c)][_0x1384dd(0x12d)]===0x1;}async[_0x278ed8(0x196)](_0x3e0d98,_0x190583,_0x2581c5){const _0x177e34=_0x278ed8,_0x26db13={'unitId':_0x3e0d98,'threadId':_0x2581c5},_0x15e01b=await this['_httpService'][_0x177e34(0x160)]('/universer-api/comment/unit/'+_0x3e0d98+'/list',{'body':_0x26db13}),_0x3b0408=_0x2581c5['map'](_0x3a7bea=>G(_0x15e01b['body'][_0x177e34(0x171)][_0x3a7bea],_0x3e0d98,_0x190583))[_0x177e34(0x162)](Boolean);return Object['values'](_0x15e01b[_0x177e34(0x1a6)][_0x177e34(0x164)])['forEach'](_0x6f6b61=>{const _0x4aaa8a=_0x177e34;this[_0x4aaa8a(0x161)][_0x4aaa8a(0x1a1)](_0x6f6b61);}),_0x3b0408;}[_0x278ed8(0x183)](_0x5e1bf3){const _0x15009a=_0x278ed8;return{'id':_0x5e1bf3['id'],'threadId':_0x5e1bf3[_0x15009a(0x172)],'ref':_0x5e1bf3[_0x15009a(0x167)]};}};p=x([C(0x0,c[_0x278ed8(0x12a)](P[_0x278ed8(0x12f)])),C(0x1,c[_0x278ed8(0x12a)](c[_0x278ed8(0x191)])),C(0x2,c[_0x278ed8(0x12a)](b[_0x278ed8(0x17e)]))],p);var H=Object[_0x278ed8(0x19f)],J=(_0x60f551,_0x2cd7a6,_0x3a95db,_0x37e670)=>{for(var _0x3bdb3b=_0x37e670>0x1?void 0x0:_0x37e670?H(_0x2cd7a6,_0x3a95db):_0x2cd7a6,_0x2a37bc=_0x60f551['length']-0x1,_0xd08401;_0x2a37bc>=0x0;_0x2a37bc--)(_0xd08401=_0x60f551[_0x2a37bc])&&(_0x3bdb3b=_0xd08401(_0x3bdb3b)||_0x3bdb3b);return _0x3bdb3b;},y=(_0x4c04be,_0x81ad90)=>(_0xeb7726,_0x4f7d9a)=>_0x81ad90(_0xeb7726,_0x4f7d9a,_0x4c04be);let g=class extends c[_0x278ed8(0x19a)]{constructor(_0x2d0812,_0x326b0d){const _0x548b7f=_0x278ed8;super(),this['_threadCommentDataSourceService']=_0x2d0812,this[_0x548b7f(0x148)]=_0x326b0d,this['_initDataSource']();}[_0x278ed8(0x170)](){const _0x4eb6a8=_0x278ed8;this[_0x4eb6a8(0x198)][_0x4eb6a8(0x19d)]=this[_0x4eb6a8(0x148)],this['_threadCommentDataSourceService'][_0x4eb6a8(0x15d)]=!0x1;}};g=J([y(0x0,M[_0x278ed8(0x143)]),y(0x1,c[_0x278ed8(0x12a)](p))],g);var F=Object['defineProperty'],L=Object[_0x278ed8(0x19f)],Z=(_0x154bba,_0x59702a,_0x490302)=>_0x59702a in _0x154bba?F(_0x154bba,_0x59702a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x490302}):_0x154bba[_0x59702a]=_0x490302,W=(_0x2890ac,_0x3dfa1c,_0x2bb7e3,_0x552c70)=>{const _0xb024a5=_0x278ed8;for(var _0x110d38=_0x552c70>0x1?void 0x0:_0x552c70?L(_0x3dfa1c,_0x2bb7e3):_0x3dfa1c,_0x2ba49e=_0x2890ac[_0xb024a5(0x14c)]-0x1,_0x20d7ff;_0x2ba49e>=0x0;_0x2ba49e--)(_0x20d7ff=_0x2890ac[_0x2ba49e])&&(_0x110d38=_0x20d7ff(_0x110d38)||_0x110d38);return _0x110d38;},O=(_0x5576e3,_0x4f8218)=>(_0x3ce1e9,_0x5332ad)=>_0x4f8218(_0x3ce1e9,_0x5332ad,_0x5576e3),N=(_0x4dbdb1,_0x7131a9,_0xfb32f6)=>Z(_0x4dbdb1,typeof _0x7131a9!='symbol'?_0x7131a9+'':_0x7131a9,_0xfb32f6);exports[_0x278ed8(0x133)]=class extends c[_0x278ed8(0x130)]{constructor(_0x476844=D,_0x406440,_0x1716a9){const _0x38ee53=_0x278ed8;super(),this[_0x38ee53(0x18f)]=_0x476844,this[_0x38ee53(0x18e)]=_0x406440,this[_0x38ee53(0x188)]=_0x1716a9;const {..._0x219258}=c[_0x38ee53(0x17a)]({},D,this[_0x38ee53(0x18f)]);this[_0x38ee53(0x188)]['setConfig'](q,_0x219258);}[_0x278ed8(0x19b)](){const _0x7fae47=_0x278ed8;[[p],[g],[_]][_0x7fae47(0x19e)](_0x52dea5=>{const _0x34e816=_0x7fae47;this[_0x34e816(0x18e)]['add'](_0x52dea5);});}[_0x278ed8(0x18a)](){const _0x125511=_0x278ed8;this[_0x125511(0x18e)][_0x125511(0x12b)](g),this[_0x125511(0x18e)][_0x125511(0x12b)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x278ed8(0x133)],_0x278ed8(0x190),c[_0x278ed8(0x165)]['UNIVER_UNKNOWN']),exports[_0x278ed8(0x133)]=W([c['DependentOn'](w[_0x278ed8(0x192)],b[_0x278ed8(0x18c)],T[_0x278ed8(0x147)]),O(0x1,c['Inject'](c[_0x278ed8(0x1a5)])),O(0x2,c[_0x278ed8(0x141)])],exports[_0x278ed8(0x133)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x54c2e1=_0x543b;(function(_0x4f7e3f,_0x41986b){const _0x4a5cb4=_0x543b,_0x14b638=_0x4f7e3f();while(!![]){try{const _0x3107e=-parseInt(_0x4a5cb4(0x133))/0x1+parseInt(_0x4a5cb4(0x171))/0x2+-parseInt(_0x4a5cb4(0x140))/0x3*(-parseInt(_0x4a5cb4(0x17c))/0x4)+parseInt(_0x4a5cb4(0x139))/0x5*(parseInt(_0x4a5cb4(0x135))/0x6)+-parseInt(_0x4a5cb4(0x143))/0x7+parseInt(_0x4a5cb4(0x188))/0x8+-parseInt(_0x4a5cb4(0x16b))/0x9;if(_0x3107e===_0x41986b)break;else _0x14b638['push'](_0x14b638['shift']());}catch(_0x1bb1b7){_0x14b638['push'](_0x14b638['shift']());}}}(_0x5f3f,0x9eed9));import{CommentService as _0x106d32,CollaborationSessionService as _0x435820,UniverCollaborationClientPlugin as _0x4a471d}from'@univerjs-pro/collaboration-client';function _0x543b(_0xa9b0a1,_0x3a45b9){_0xa9b0a1=_0xa9b0a1-0x12d;const _0x5f3f4a=_0x5f3f();let _0x543b8a=_0x5f3f4a[_0xa9b0a1];return _0x543b8a;}import{UniverLicensePlugin as _0x319e70}from'@univerjs-pro/license';import{dayjs as _0x1cb702,UserManagerService as _0x79f5f8,Inject as _0x32a39f,Injector as _0x1b2498,Disposable as _0xf64d55,CustomRangeType as _0x28fd3d,UniverInstanceType as _0x154615,DependentOn as _0x5887db,IConfigService as _0x4268de,Plugin as _0x4e8090,merge as _0x325500}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x28dbe4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x118a66,IThreadCommentDataSourceService as _0x1c9b0a}from'@univerjs/thread-comment';import{bufferTime as _0xf247e6}from'rxjs';import{HTTPService as _0x43ff1a}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x43eb1d=>(_0x43eb1d[_0x43eb1d[_0x54c2e1(0x14a)]=0x0]=_0x54c2e1(0x14a),_0x43eb1d[_0x43eb1d[_0x54c2e1(0x152)]=0x1]='Solved',_0x43eb1d[_0x43eb1d[_0x54c2e1(0x146)]=-0x1]=_0x54c2e1(0x146),_0x43eb1d))(I||{}),v=(_0x373a64=>(_0x373a64[_0x373a64['Unknown']=0x0]=_0x54c2e1(0x17e),_0x373a64[_0x373a64[_0x54c2e1(0x14e)]=0x1]=_0x54c2e1(0x14e),_0x373a64[_0x373a64['Reply']=0x2]=_0x54c2e1(0x186),_0x373a64[_0x373a64[_0x54c2e1(0x160)]=0x3]=_0x54c2e1(0x160),_0x373a64[_0x373a64['Delete']=0x4]='Delete',_0x373a64[_0x373a64[_0x54c2e1(0x176)]=0x5]=_0x54c2e1(0x176),_0x373a64[_0x373a64[_0x54c2e1(0x146)]=-0x1]='UNRECOGNIZED',_0x373a64))(v||{});const y=_0x9f4a0f=>_0x1cb702(new Date(+_0x9f4a0f))[_0x54c2e1(0x169)](_0x54c2e1(0x159)),B=async(_0x4a4bc9,_0x4033ed)=>{const _0x48e02e=_0x54c2e1,_0x17f072=_0x4a4bc9[_0x48e02e(0x149)](_0x79f5f8),_0x16a6ed=_0x4a4bc9[_0x48e02e(0x149)](_0x43ff1a);_0x4033ed['forEach'](_0x5a1976=>{const _0x265223=_0x48e02e;_0x17f072[_0x265223(0x13b)](_0x5a1976)&&_0x4033ed[_0x265223(0x165)](_0x5a1976);}),_0x4033ed['size']&&(await _0x16a6ed[_0x48e02e(0x149)](_0x48e02e(0x142),{'params':{'userIDs':[..._0x4033ed]}}))[_0x48e02e(0x162)][_0x48e02e(0x172)][_0x48e02e(0x189)](_0x5afa4b=>{const _0x195717=_0x48e02e;_0x5afa4b&&_0x17f072[_0x195717(0x148)](_0x5afa4b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x32df73,_0x30acd3,_0x5d1962,_0x4d1171)=>{const _0x4cd9c9=_0x54c2e1;for(var _0x445063=_0x4d1171>0x1?void 0x0:_0x4d1171?K(_0x30acd3,_0x5d1962):_0x30acd3,_0x219b71=_0x32df73[_0x4cd9c9(0x13c)]-0x1,_0x16ab1c;_0x219b71>=0x0;_0x219b71--)(_0x16ab1c=_0x32df73[_0x219b71])&&(_0x445063=_0x16ab1c(_0x445063)||_0x445063);return _0x445063;},p=(_0x20b592,_0x58d8ed)=>(_0x1222b,_0x116bbe)=>_0x58d8ed(_0x1222b,_0x116bbe,_0x20b592);let _=class extends _0xf64d55{constructor(_0x571abc,_0x192abc,_0x3088a,_0x41ecab){const _0x3bc288=_0x54c2e1;super(),this['_commentService']=_0x571abc,this[_0x3bc288(0x173)]=_0x192abc,this['_userService']=_0x3088a,this['_injector']=_0x41ecab,this[_0x3bc288(0x191)](),this[_0x3bc288(0x16e)]();}[_0x54c2e1(0x16e)](){const _0x483bf8=_0x54c2e1;this['disposeWithMe'](this[_0x483bf8(0x173)][_0x483bf8(0x180)][_0x483bf8(0x190)](_0xf247e6(0x10))[_0x483bf8(0x187)](_0x343b00=>{const _0x144c63=_0x483bf8,_0x10cc92=new Set();_0x343b00[_0x144c63(0x189)](_0x43a2a5=>{const _0x1f0600=_0x144c63;switch(_0x43a2a5[_0x1f0600(0x16d)]){case _0x1f0600(0x16f):{const _0x409d37=_0x43a2a5[_0x1f0600(0x167)][_0x1f0600(0x144)];_0x10cc92[_0x1f0600(0x16f)](_0x409d37);break;}}}),B(this[_0x144c63(0x18d)],_0x10cc92);}));}[_0x54c2e1(0x191)](){const _0x3de2f7=_0x54c2e1;this['disposeWithMe'](this[_0x3de2f7(0x13e)]['commentUpdate$']['subscribe'](async _0x606312=>{const _0x26ee60=_0x3de2f7;var _0x33f970,_0x45269f,_0x493d63,_0x2a5bd8;const _0x4b80c7=(_0x33f970=this[_0x26ee60(0x173)][_0x26ee60(0x131)](_0x606312['unitId'])[_0x26ee60(0x161)](_0x3a3461=>_0x3a3461['threadId']===_0x606312[_0x26ee60(0x16c)]))==null?void 0x0:_0x33f970[_0x26ee60(0x147)];if(!_0x4b80c7)return;const {unitId:_0x35297f,subUnitId:_0x5f5691}=_0x4b80c7;switch(_0x606312[_0x26ee60(0x166)]&&this[_0x26ee60(0x155)]['addUser'](_0x606312[_0x26ee60(0x166)]),_0x606312[_0x26ee60(0x16d)]){case v['Add']:break;case v[_0x26ee60(0x186)]:{this[_0x26ee60(0x173)][_0x26ee60(0x158)](_0x35297f,_0x5f5691,{'unitId':_0x35297f,'subUnitId':_0x5f5691,'ref':'','id':_0x606312[_0x26ee60(0x17b)],'dT':y(+_0x606312[_0x26ee60(0x137)]),'threadId':_0x606312['threadId'],'personId':(_0x493d63=(_0x45269f=_0x606312[_0x26ee60(0x166)])==null?void 0x0:_0x45269f[_0x26ee60(0x18f)])!=null?_0x493d63:_0x606312[_0x26ee60(0x14c)],'text':JSON[_0x26ee60(0x150)](_0x606312[_0x26ee60(0x18b)]),'parentId':_0x4b80c7['id']});break;}case v[_0x26ee60(0x15c)]:{const _0x2733c3=this[_0x26ee60(0x173)][_0x26ee60(0x14d)](_0x35297f,_0x5f5691,_0x606312[_0x26ee60(0x17b)]);_0x2733c3&&_0x2733c3[_0x26ee60(0x15b)]&&this[_0x26ee60(0x173)][_0x26ee60(0x13a)](_0x35297f,_0x5f5691,_0x606312[_0x26ee60(0x17b)]);break;}case v[_0x26ee60(0x160)]:{this['_threadCommentModel'][_0x26ee60(0x168)](_0x35297f,_0x5f5691,{'commentId':_0x606312[_0x26ee60(0x17b)],'text':JSON[_0x26ee60(0x150)](_0x606312['content'])});break;}case v['Solve']:{const _0x5b7097=(_0x2a5bd8=this[_0x26ee60(0x173)][_0x26ee60(0x131)](_0x606312['unitId'])['find'](_0x2dfd44=>_0x2dfd44[_0x26ee60(0x16c)]===_0x606312[_0x26ee60(0x16c)]))==null?void 0x0:_0x2a5bd8[_0x26ee60(0x147)];_0x5b7097&&this[_0x26ee60(0x173)][_0x26ee60(0x18e)](_0x35297f,_0x5f5691,_0x5b7097['id'],_0x606312[_0x26ee60(0x138)]===I[_0x26ee60(0x152)]);break;}}}));}};_=V([p(0x0,_0x32a39f(_0x106d32)),p(0x1,_0x32a39f(_0x118a66)),p(0x2,_0x32a39f(_0x79f5f8)),p(0x3,_0x32a39f(_0x1b2498))],_);const z=_0x54c2e1(0x157),O={};var k=Object[_0x54c2e1(0x174)],Q=(_0x43d48b,_0xc420c8,_0x4dad32,_0x5011f1)=>{const _0x50ef9f=_0x54c2e1;for(var _0x72e235=_0x5011f1>0x1?void 0x0:_0x5011f1?k(_0xc420c8,_0x4dad32):_0xc420c8,_0x5ad328=_0x43d48b[_0x50ef9f(0x13c)]-0x1,_0x8720c2;_0x5ad328>=0x0;_0x5ad328--)(_0x8720c2=_0x43d48b[_0x5ad328])&&(_0x72e235=_0x8720c2(_0x72e235)||_0x72e235);return _0x72e235;},b=(_0x5e3800,_0x5ddac4)=>(_0xbcbe03,_0x502fa1)=>_0x5ddac4(_0xbcbe03,_0x502fa1,_0x5e3800);function X(_0x4e7b62,_0x4a094d){const _0x2924e7=_0x54c2e1,_0x48582e=_0x4e7b62['replies'][0x0];return{..._0x4a094d,'id':_0x48582e[_0x2924e7(0x17b)],'resolved':_0x4e7b62[_0x2924e7(0x138)]===0x1,'dT':y(_0x48582e[_0x2924e7(0x137)]),'personId':_0x48582e[_0x2924e7(0x14c)],'threadId':_0x48582e[_0x2924e7(0x16c)]};}function ee(_0x55adc0,_0x4eb1bf,_0x5b80a9){const _0x376837=_0x54c2e1;var _0x4187ba,_0xc64485;if(((_0xc64485=(_0x4187ba=_0x55adc0==null?void 0x0:_0x55adc0[_0x376837(0x153)])==null?void 0x0:_0x4187ba[_0x376837(0x13c)])!=null?_0xc64485:0x0)>0x0){const _0x4b60ee=(_0x2a6697,_0x33390c)=>({'id':_0x2a6697[_0x376837(0x17b)],'threadId':_0x2a6697[_0x376837(0x16c)],'dT':y(_0x2a6697[_0x376837(0x137)]),'personId':_0x2a6697[_0x376837(0x14c)],'resolved':_0x55adc0['solved']===I[_0x376837(0x152)],'unitId':_0x4eb1bf,'subUnitId':_0x5b80a9,'text':JSON[_0x376837(0x150)](_0x2a6697[_0x376837(0x18b)]),'parentId':_0x33390c}),_0x524a73=_0x4b60ee(_0x55adc0[_0x376837(0x153)][0x0]);return{..._0x524a73,'children':_0x55adc0[_0x376837(0x153)][_0x376837(0x15d)](0x1)[_0x376837(0x15a)](_0x1dd419=>_0x4b60ee(_0x1dd419,_0x524a73['id']))};}return null;}let S=class{constructor(_0x200a0f,_0x30ea00,_0x47f79a){const _0x3d6211=_0x54c2e1;this[_0x3d6211(0x15e)]=_0x200a0f,this['_userService']=_0x30ea00,this[_0x3d6211(0x15f)]=_0x47f79a;}async[_0x54c2e1(0x158)](_0x1fc770){const _0x4a8365=_0x54c2e1;var _0x23c956,_0x386c2e;const {parentId:_0x31d610,unitId:_0x556f7f,text:_0x1c9bcd,threadId:_0x3b3ee6}=_0x1fc770,_0x3fd56f=(_0x386c2e=(_0x23c956=_0x1c9bcd['customRanges'])==null?void 0x0:_0x23c956[_0x4a8365(0x12f)](_0x379377=>_0x379377['rangeType']===_0x28fd3d[_0x4a8365(0x178)])[_0x4a8365(0x15a)](_0x51a4ee=>_0x51a4ee['rangeId']))!=null?_0x386c2e:[],_0xc5a41e=JSON[_0x4a8365(0x177)](_0x1c9bcd),_0x445d8a=(await this[_0x4a8365(0x15f)][_0x4a8365(0x185)](_0x556f7f))[_0x4a8365(0x14f)]();if(_0x31d610){const _0x462e49={'memberId':_0x445d8a,'unitId':_0x556f7f,'content':_0xc5a41e,'mention':_0x3fd56f,'threadId':_0x3b3ee6},_0x24b1d5=(await this[_0x4a8365(0x15e)][_0x4a8365(0x181)](_0x4a8365(0x182)+_0x556f7f+'/reply',{'body':_0x462e49}))[_0x4a8365(0x162)][_0x4a8365(0x16a)];return{..._0x1fc770,'id':_0x24b1d5[_0x4a8365(0x17b)],'dT':_0x1cb702(+_0x24b1d5[_0x4a8365(0x137)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x24b1d5['userId']};}else{const _0x10f4b4={'memberId':_0x445d8a,'unitId':_0x556f7f,'content':_0xc5a41e,'mention':_0x3fd56f},_0x569ad2=await this[_0x4a8365(0x15e)][_0x4a8365(0x181)](_0x4a8365(0x182)+_0x556f7f+_0x4a8365(0x184),{'body':_0x10f4b4});return X(_0x569ad2[_0x4a8365(0x162)]['comment'],_0x1fc770);}}async[_0x54c2e1(0x168)](_0x5d4df6){const _0x4ff5e0=_0x54c2e1;var _0x592c9a,_0x362221;const {text:_0x430a6b,unitId:_0x52a5d3}=_0x5d4df6,_0x262dc3=(_0x362221=(_0x592c9a=_0x430a6b[_0x4ff5e0(0x179)])==null?void 0x0:_0x592c9a[_0x4ff5e0(0x12f)](_0xb434e2=>_0xb434e2['rangeType']===_0x28fd3d['COMMENT'])[_0x4ff5e0(0x15a)](_0x20aa50=>_0x20aa50[_0x4ff5e0(0x18a)]))!=null?_0x362221:[],_0x4fe966=JSON['stringify'](_0x430a6b),_0x52fba6=_0x5d4df6[_0x4ff5e0(0x16c)],_0x15c9a7=_0x5d4df6['id'],_0x516b1a={'memberId':(await this[_0x4ff5e0(0x15f)]['requireSession'](_0x52a5d3))['getMemberID'](),'unitId':_0x52a5d3,'threadId':_0x52fba6,'mention':_0x262dc3,'content':_0x4fe966,'replyId':_0x15c9a7},_0x1014d1=await this['_httpService'][_0x4ff5e0(0x181)]('/universer-api/comment/unit/'+_0x52a5d3+'/edit',{'body':_0x516b1a});return!_0x1014d1[_0x4ff5e0(0x162)][_0x4ff5e0(0x13f)]||_0x1014d1[_0x4ff5e0(0x162)]['error'][_0x4ff5e0(0x136)]===0x1;}async[_0x54c2e1(0x18e)](_0x1a9b6b){const _0x223897=_0x54c2e1,{unitId:_0x5af528}=_0x1a9b6b,_0x2db10b=_0x1a9b6b[_0x223897(0x16c)],_0x1dde0f={'memberId':this['_userService'][_0x223897(0x14b)]()[_0x223897(0x18f)],'unitId':_0x5af528,'threadId':_0x2db10b,'solved':_0x1a9b6b[_0x223897(0x12e)]?I['Solved']:I['OpenOrReOpen']},_0x1d162a=await this[_0x223897(0x15e)]['post'](_0x223897(0x182)+_0x5af528+_0x223897(0x17f),{'body':_0x1dde0f});return!_0x1d162a['body'][_0x223897(0x13f)]||_0x1d162a[_0x223897(0x162)][_0x223897(0x13f)]['code']===0x1;}async[_0x54c2e1(0x13a)](_0x5c727e,_0xaa241c,_0x17226d,_0x267ea3){const _0xc4af9c=_0x54c2e1,_0x5ea419={'memberId':(await this['_sessionService']['requireSession'](_0x5c727e))[_0xc4af9c(0x14f)](),'threadId':_0x17226d,'replyId':_0x267ea3,'unitId':_0x5c727e},_0x2733df=await this[_0xc4af9c(0x15e)]['post']('/universer-api/comment/unit/'+_0x5c727e+'/delete',{'body':_0x5ea419});return!_0x2733df[_0xc4af9c(0x162)]['error']||_0x2733df[_0xc4af9c(0x162)][_0xc4af9c(0x13f)][_0xc4af9c(0x136)]===0x1;}async[_0x54c2e1(0x130)](_0x4f6787,_0x261bfe,_0x5b5ac4){const _0x1058b4=_0x54c2e1,_0x513205={'unitId':_0x4f6787,'threadId':_0x5b5ac4},_0x4a3bda=await this[_0x1058b4(0x15e)][_0x1058b4(0x181)](_0x1058b4(0x182)+_0x4f6787+_0x1058b4(0x145),{'body':_0x513205}),_0x2b526d=_0x5b5ac4[_0x1058b4(0x15a)](_0x1e6b85=>ee(_0x4a3bda[_0x1058b4(0x162)][_0x1058b4(0x17d)][_0x1e6b85],_0x4f6787,_0x261bfe))[_0x1058b4(0x12f)](Boolean);return Object[_0x1058b4(0x151)](_0x4a3bda[_0x1058b4(0x162)]['users'])['forEach'](_0x19cdf8=>{const _0x230c53=_0x1058b4;this[_0x230c53(0x155)][_0x230c53(0x148)](_0x19cdf8);}),_0x2b526d;}[_0x54c2e1(0x175)](_0x4b0853){const _0x4310d7=_0x54c2e1;return{'id':_0x4b0853['id'],'threadId':_0x4b0853[_0x4310d7(0x16c)],'ref':_0x4b0853['ref']};}};S=Q([b(0x0,_0x32a39f(_0x43ff1a)),b(0x1,_0x32a39f(_0x79f5f8)),b(0x2,_0x32a39f(_0x435820))],S);function _0x5f3f(){const _0x3669da=['126651FZmPLJ','personId','/list','UNRECOGNIZED','root','addUser','get','OpenOrReOpen','getCurrentUser','userId','getComment','Add','getMemberID','parse','values','Solved','replies','_initDataSource','_userService','defineProperty','thread-comment-data-source.config','addComment','YYYY/MM/DD\x20HH:mm','map','parentId','Delete','slice','_httpService','_sessionService','Edit','find','body','syncUpdateMutationToColla','_configService','delete','user','payload','updateComment','format','reply','20536749rCqQzi','threadId','type','_initUserSync','add','symbol','1908808lushHT','users','_threadCommentModel','getOwnPropertyDescriptor','saveCommentToSnapshot','Solve','stringify','COMMENT','customRanges','dataSource','replyId','1239824HAwzPw','comments','Unknown','/solved','commentUpdate$','post','/universer-api/comment/unit/','_threadCommentDataSourceService','/add','requireSession','Reply','subscribe','9725344nwpAzY','forEach','rangeId','content','UNIVER_UNKNOWN','_injector','resolveComment','userID','pipe','_init','_config','resolved','filter','listComments','getUnit','onStarting','417927MXGqUm','_threadCommentDataSource','1524GVAVrp','code','createTimestamp','solved','11395XJwvUc','deleteComment','getUser','length','onReady','_commentService','error','6rComBe','pluginName','/universer-api/user/list'];_0x5f3f=function(){return _0x3669da;};return _0x5f3f();}var re=Object[_0x54c2e1(0x174)],te=(_0x2143b8,_0x17a8c3,_0x49fa0c,_0x404dca)=>{const _0x1e250d=_0x54c2e1;for(var _0xc2cf87=_0x404dca>0x1?void 0x0:_0x404dca?re(_0x17a8c3,_0x49fa0c):_0x17a8c3,_0x4339b4=_0x2143b8[_0x1e250d(0x13c)]-0x1,_0x2ce91a;_0x4339b4>=0x0;_0x4339b4--)(_0x2ce91a=_0x2143b8[_0x4339b4])&&(_0xc2cf87=_0x2ce91a(_0xc2cf87)||_0xc2cf87);return _0xc2cf87;},M=(_0x236c6e,_0x158eb)=>(_0x363c69,_0x19f75c)=>_0x158eb(_0x363c69,_0x19f75c,_0x236c6e);let f=class extends _0xf64d55{constructor(_0x52de6a,_0x120318){const _0x5c7e2f=_0x54c2e1;super(),this[_0x5c7e2f(0x183)]=_0x52de6a,this[_0x5c7e2f(0x134)]=_0x120318,this['_initDataSource']();}[_0x54c2e1(0x154)](){const _0x59cd7d=_0x54c2e1;this[_0x59cd7d(0x183)][_0x59cd7d(0x17a)]=this[_0x59cd7d(0x134)],this['_threadCommentDataSourceService'][_0x59cd7d(0x163)]=!0x1;}};f=te([M(0x0,_0x1c9b0a),M(0x1,_0x32a39f(S))],f);var se=Object[_0x54c2e1(0x156)],oe=Object[_0x54c2e1(0x174)],ne=(_0x2778fe,_0x3f4943,_0x4d7c4a)=>_0x3f4943 in _0x2778fe?se(_0x2778fe,_0x3f4943,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d7c4a}):_0x2778fe[_0x3f4943]=_0x4d7c4a,ie=(_0x3dcb61,_0x144d11,_0x1c3113,_0x409f9f)=>{const _0x323a86=_0x54c2e1;for(var _0x304bea=_0x409f9f>0x1?void 0x0:_0x409f9f?oe(_0x144d11,_0x1c3113):_0x144d11,_0x239e61=_0x3dcb61[_0x323a86(0x13c)]-0x1,_0xd9be4e;_0x239e61>=0x0;_0x239e61--)(_0xd9be4e=_0x3dcb61[_0x239e61])&&(_0x304bea=_0xd9be4e(_0x304bea)||_0x304bea);return _0x304bea;},N=(_0x236b74,_0x632758)=>(_0x43ab0a,_0x87b9ab)=>_0x632758(_0x43ab0a,_0x87b9ab,_0x236b74),$=(_0x3c5142,_0x294a72,_0x19bdd7)=>ne(_0x3c5142,typeof _0x294a72!=_0x54c2e1(0x170)?_0x294a72+'':_0x294a72,_0x19bdd7);let g=class extends _0x4e8090{constructor(_0x39feff=O,_0x4ec327,_0x55d1c7){const _0x49f6ad=_0x54c2e1;super(),this[_0x49f6ad(0x12d)]=_0x39feff,this[_0x49f6ad(0x18d)]=_0x4ec327,this[_0x49f6ad(0x164)]=_0x55d1c7;const {..._0x13503b}=_0x325500({},O,this[_0x49f6ad(0x12d)]);this['_configService']['setConfig'](z,_0x13503b);}[_0x54c2e1(0x132)](){const _0x5293db=_0x54c2e1;[[S],[f],[_]][_0x5293db(0x189)](_0x31b31a=>{const _0x1a0b5b=_0x5293db;this[_0x1a0b5b(0x18d)]['add'](_0x31b31a);});}[_0x54c2e1(0x13d)](){const _0x57395c=_0x54c2e1;this[_0x57395c(0x18d)][_0x57395c(0x149)](f),this[_0x57395c(0x18d)][_0x57395c(0x149)](_);}};$(g,_0x54c2e1(0x141),W),$(g,_0x54c2e1(0x16d),_0x154615[_0x54c2e1(0x18c)]),g=ie([_0x5887db(_0x28dbe4,_0x4a471d,_0x319e70),N(0x1,_0x32a39f(_0x1b2498)),N(0x2,_0x4268de)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1bdfca=_0x5533;(function(_0xfb79f,_0x33210c){const _0x1204d4=_0x5533,_0x25c9e5=_0xfb79f();while(!![]){try{const _0x4f2acc=parseInt(_0x1204d4(0x1ed))/0x1*(parseInt(_0x1204d4(0x23c))/0x2)+parseInt(_0x1204d4(0x1f8))/0x3+parseInt(_0x1204d4(0x1fe))/0x4*(-parseInt(_0x1204d4(0x212))/0x5)+parseInt(_0x1204d4(0x1eb))/0x6*(parseInt(_0x1204d4(0x1e9))/0x7)+-parseInt(_0x1204d4(0x215))/0x8+-parseInt(_0x1204d4(0x1fd))/0x9+parseInt(_0x1204d4(0x1fc))/0xa;if(_0x4f2acc===_0x33210c)break;else _0x25c9e5['push'](_0x25c9e5['shift']());}catch(_0x4c0f23){_0x25c9e5['push'](_0x25c9e5['shift']());}}}(_0x51a9,0x31991));import{CommentService as _0x494070,CollaborationSessionService as _0x186ef6,UniverCollaborationClientPlugin as _0x82913d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1b76e0}from'@univerjs-pro/license';import{dayjs as _0x118231,UserManagerService as _0x2ebc4d,Inject as _0x58577d,Injector as _0x418b1b,Disposable as _0x50a167,CustomRangeType as _0x28d5b5,UniverInstanceType as _0x12b441,DependentOn as _0x1e955f,IConfigService as _0x30ca1b,Plugin as _0x10008e,merge as _0xccd7ac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23fc9b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x303d6b,IThreadCommentDataSourceService as _0x4babee}from'@univerjs/thread-comment';import{bufferTime as _0x2e4209}from'rxjs';import{HTTPService as _0x1f697f}from'@univerjs/network';function _0x51a9(){const _0x202810=['COMMENT','addComment','/solved','704105PAvUQt','/add','resolved','1157384CkixYI','rangeType','getMemberID','setConfig','replyId','_commentService','disposeWithMe','Delete','size','addUser','/list','/reply','_initUserSync','pluginName','length','threadId','payload','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','deleteComment','Solve','_httpService','defineProperty','resolveComment','get','_init','Unknown','dataSource','requireSession','replies','solved','reply','updateComment','Add','find','_userService','symbol','body','182lwBayO','commentUpdate$','createTimestamp','_threadCommentDataSource','forEach','Edit','comment','customRanges','getComment','Reply','rangeId','userId','post','_threadCommentDataSourceService','personId','userID','onStarting','7042yjqATK','pipe','792zpVaCo','stringify','1979cZwbkj','_threadCommentModel','users','getOwnPropertyDescriptor','user','Solved','UNRECOGNIZED','root','comments','error','/edit','436962nOtTxX','_sessionService','ref','onReady','666110VluHHY','328491HEnHPx','4TdobPT','code','/universer-api/comment/unit/','map','getUnit','_configService','UNIVER_UNKNOWN','filter','listComments','unitId','type','format','parse','_config','OpenOrReOpen','delete','subscribe'];_0x51a9=function(){return _0x202810;};return _0x51a9();}const W=_0x1bdfca(0x227);var I=(_0x4f2f5f=>(_0x4f2f5f[_0x4f2f5f['OpenOrReOpen']=0x0]=_0x1bdfca(0x20c),_0x4f2f5f[_0x4f2f5f['Solved']=0x1]=_0x1bdfca(0x1f2),_0x4f2f5f[_0x4f2f5f[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x4f2f5f))(I||{}),v=(_0x52c843=>(_0x52c843[_0x52c843[_0x1bdfca(0x230)]=0x0]=_0x1bdfca(0x230),_0x52c843[_0x52c843[_0x1bdfca(0x237)]=0x1]=_0x1bdfca(0x237),_0x52c843[_0x52c843['Reply']=0x2]='Reply',_0x52c843[_0x52c843['Edit']=0x3]=_0x1bdfca(0x241),_0x52c843[_0x52c843[_0x1bdfca(0x21c)]=0x4]=_0x1bdfca(0x21c),_0x52c843[_0x52c843[_0x1bdfca(0x22a)]=0x5]='Solve',_0x52c843[_0x52c843[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x52c843))(v||{});const y=_0x55878a=>_0x118231(new Date(+_0x55878a))[_0x1bdfca(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x480652,_0x5d149f)=>{const _0x2fc9a2=_0x1bdfca,_0x3a3a9a=_0x480652[_0x2fc9a2(0x22e)](_0x2ebc4d),_0x422c7a=_0x480652[_0x2fc9a2(0x22e)](_0x1f697f);_0x5d149f[_0x2fc9a2(0x240)](_0x5d678a=>{const _0x544cce=_0x2fc9a2;_0x3a3a9a['getUser'](_0x5d678a)&&_0x5d149f[_0x544cce(0x20d)](_0x5d678a);}),_0x5d149f[_0x2fc9a2(0x21d)]&&(await _0x422c7a[_0x2fc9a2(0x22e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5d149f]}}))['body']['users'][_0x2fc9a2(0x240)](_0x1153b9=>{_0x1153b9&&_0x3a3a9a['addUser'](_0x1153b9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46f9ee,_0x3b2c16,_0x284fa3,_0x46b68f)=>{const _0xe280e7=_0x1bdfca;for(var _0x506c00=_0x46b68f>0x1?void 0x0:_0x46b68f?K(_0x3b2c16,_0x284fa3):_0x3b2c16,_0x161513=_0x46f9ee[_0xe280e7(0x223)]-0x1,_0x1b6630;_0x161513>=0x0;_0x161513--)(_0x1b6630=_0x46f9ee[_0x161513])&&(_0x506c00=_0x1b6630(_0x506c00)||_0x506c00);return _0x506c00;},p=(_0x14278c,_0x4403c4)=>(_0x2859df,_0x39e467)=>_0x4403c4(_0x2859df,_0x39e467,_0x14278c);let _=class extends _0x50a167{constructor(_0x51b89c,_0x1f169c,_0x5f3951,_0xffe9c6){const _0x8f5bf9=_0x1bdfca;super(),this[_0x8f5bf9(0x21a)]=_0x51b89c,this['_threadCommentModel']=_0x1f169c,this[_0x8f5bf9(0x239)]=_0x5f3951,this[_0x8f5bf9(0x228)]=_0xffe9c6,this[_0x8f5bf9(0x22f)](),this[_0x8f5bf9(0x221)]();}[_0x1bdfca(0x221)](){const _0x158fa4=_0x1bdfca;this[_0x158fa4(0x21b)](this['_threadCommentModel'][_0x158fa4(0x23d)][_0x158fa4(0x1ea)](_0x2e4209(0x10))[_0x158fa4(0x20e)](_0xc6c4bb=>{const _0x2cf343=new Set();_0xc6c4bb['forEach'](_0x473dea=>{const _0x483fb6=_0x5533;switch(_0x473dea[_0x483fb6(0x208)]){case'add':{const _0xc44d10=_0x473dea[_0x483fb6(0x225)][_0x483fb6(0x24a)];_0x2cf343['add'](_0xc44d10);break;}}}),B(this['_injector'],_0x2cf343);}));}[_0x1bdfca(0x22f)](){const _0x7bf000=_0x1bdfca;this[_0x7bf000(0x21b)](this[_0x7bf000(0x21a)][_0x7bf000(0x23d)][_0x7bf000(0x20e)](async _0x49ac9e=>{const _0x9491aa=_0x7bf000;var _0x49f8e3,_0x4ed501,_0xcc6137,_0x3fc950;const _0x28f568=(_0x49f8e3=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x5b532f=>_0x5b532f[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x49f8e3[_0x9491aa(0x1f4)];if(!_0x28f568)return;const {unitId:_0x1ed3e5,subUnitId:_0x4d723e}=_0x28f568;switch(_0x49ac9e['user']&&this['_userService'][_0x9491aa(0x21e)](_0x49ac9e[_0x9491aa(0x1f1)]),_0x49ac9e[_0x9491aa(0x208)]){case v['Add']:break;case v[_0x9491aa(0x245)]:{this[_0x9491aa(0x1ee)][_0x9491aa(0x210)](_0x1ed3e5,_0x4d723e,{'unitId':_0x1ed3e5,'subUnitId':_0x4d723e,'ref':'','id':_0x49ac9e[_0x9491aa(0x219)],'dT':y(+_0x49ac9e[_0x9491aa(0x23e)]),'threadId':_0x49ac9e['threadId'],'personId':(_0xcc6137=(_0x4ed501=_0x49ac9e[_0x9491aa(0x1f1)])==null?void 0x0:_0x4ed501['userID'])!=null?_0xcc6137:_0x49ac9e[_0x9491aa(0x247)],'text':JSON[_0x9491aa(0x20a)](_0x49ac9e[_0x9491aa(0x226)]),'parentId':_0x28f568['id']});break;}case v[_0x9491aa(0x21c)]:{const _0x407009=this[_0x9491aa(0x1ee)][_0x9491aa(0x244)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);_0x407009&&_0x407009['parentId']&&this['_threadCommentModel'][_0x9491aa(0x229)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);break;}case v['Edit']:{this[_0x9491aa(0x1ee)]['updateComment'](_0x1ed3e5,_0x4d723e,{'commentId':_0x49ac9e[_0x9491aa(0x219)],'text':JSON['parse'](_0x49ac9e[_0x9491aa(0x226)])});break;}case v[_0x9491aa(0x22a)]:{const _0x42e457=(_0x3fc950=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x58225e=>_0x58225e[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x3fc950['root'];_0x42e457&&this['_threadCommentModel'][_0x9491aa(0x22d)](_0x1ed3e5,_0x4d723e,_0x42e457['id'],_0x49ac9e['solved']===I[_0x9491aa(0x1f2)]);break;}}}));}};_=V([p(0x0,_0x58577d(_0x494070)),p(0x1,_0x58577d(_0x303d6b)),p(0x2,_0x58577d(_0x2ebc4d)),p(0x3,_0x58577d(_0x418b1b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x1bdfca(0x1f0)],Q=(_0x409e4a,_0x4c9b9e,_0x5c2103,_0x97cd34)=>{const _0x47b94b=_0x1bdfca;for(var _0x8ee573=_0x97cd34>0x1?void 0x0:_0x97cd34?k(_0x4c9b9e,_0x5c2103):_0x4c9b9e,_0x5bfe73=_0x409e4a[_0x47b94b(0x223)]-0x1,_0x19e3ce;_0x5bfe73>=0x0;_0x5bfe73--)(_0x19e3ce=_0x409e4a[_0x5bfe73])&&(_0x8ee573=_0x19e3ce(_0x8ee573)||_0x8ee573);return _0x8ee573;},b=(_0x2fca9f,_0x283211)=>(_0xba5294,_0x245891)=>_0x283211(_0xba5294,_0x245891,_0x2fca9f);function X(_0x1095fd,_0x4ab505){const _0x4500c9=_0x1bdfca,_0x24582c=_0x1095fd[_0x4500c9(0x233)][0x0];return{..._0x4ab505,'id':_0x24582c[_0x4500c9(0x219)],'resolved':_0x1095fd[_0x4500c9(0x234)]===0x1,'dT':y(_0x24582c[_0x4500c9(0x23e)]),'personId':_0x24582c[_0x4500c9(0x247)],'threadId':_0x24582c[_0x4500c9(0x224)]};}function _0x5533(_0x4a58e5,_0x3cb8b5){_0x4a58e5=_0x4a58e5-0x1e8;const _0x51a9e6=_0x51a9();let _0x5533ca=_0x51a9e6[_0x4a58e5];return _0x5533ca;}function ee(_0x36163f,_0x50ee22,_0x3a19d6){const _0x442797=_0x1bdfca;var _0x4fddae,_0xd0e08c;if(((_0xd0e08c=(_0x4fddae=_0x36163f==null?void 0x0:_0x36163f[_0x442797(0x233)])==null?void 0x0:_0x4fddae[_0x442797(0x223)])!=null?_0xd0e08c:0x0)>0x0){const _0x448bad=(_0x6411f2,_0x57cfe7)=>({'id':_0x6411f2['replyId'],'threadId':_0x6411f2['threadId'],'dT':y(_0x6411f2['createTimestamp']),'personId':_0x6411f2[_0x442797(0x247)],'resolved':_0x36163f[_0x442797(0x234)]===I[_0x442797(0x1f2)],'unitId':_0x50ee22,'subUnitId':_0x3a19d6,'text':JSON[_0x442797(0x20a)](_0x6411f2[_0x442797(0x226)]),'parentId':_0x57cfe7}),_0x3fd306=_0x448bad(_0x36163f[_0x442797(0x233)][0x0]);return{..._0x3fd306,'children':_0x36163f['replies']['slice'](0x1)[_0x442797(0x201)](_0x42ba3d=>_0x448bad(_0x42ba3d,_0x3fd306['id']))};}return null;}let S=class{constructor(_0x5d841f,_0x1a3dae,_0x1f07da){const _0x3e5caf=_0x1bdfca;this['_httpService']=_0x5d841f,this[_0x3e5caf(0x239)]=_0x1a3dae,this[_0x3e5caf(0x1f9)]=_0x1f07da;}async[_0x1bdfca(0x210)](_0x463269){const _0x202c68=_0x1bdfca;var _0x42cd19,_0x1729b8;const {parentId:_0x123226,unitId:_0x85051f,text:_0x5da09d,threadId:_0x26a88a}=_0x463269,_0x551e15=(_0x1729b8=(_0x42cd19=_0x5da09d[_0x202c68(0x243)])==null?void 0x0:_0x42cd19[_0x202c68(0x205)](_0x17b1c8=>_0x17b1c8[_0x202c68(0x216)]===_0x28d5b5[_0x202c68(0x20f)])[_0x202c68(0x201)](_0x28203b=>_0x28203b['rangeId']))!=null?_0x1729b8:[],_0x524a5b=JSON['stringify'](_0x5da09d),_0xe5e07f=(await this[_0x202c68(0x1f9)][_0x202c68(0x232)](_0x85051f))[_0x202c68(0x217)]();if(_0x123226){const _0x3e817b={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15,'threadId':_0x26a88a},_0x51ac0b=(await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x220),{'body':_0x3e817b}))[_0x202c68(0x23b)][_0x202c68(0x235)];return{..._0x463269,'id':_0x51ac0b[_0x202c68(0x219)],'dT':_0x118231(+_0x51ac0b[_0x202c68(0x23e)])[_0x202c68(0x209)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x51ac0b['userId']};}else{const _0x25d323={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15},_0x3b2385=await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x213),{'body':_0x25d323});return X(_0x3b2385[_0x202c68(0x23b)][_0x202c68(0x242)],_0x463269);}}async[_0x1bdfca(0x236)](_0x4b6f50){const _0x260d75=_0x1bdfca;var _0x7df826,_0x2beab6;const {text:_0x306ec8,unitId:_0x4c0d43}=_0x4b6f50,_0x329961=(_0x2beab6=(_0x7df826=_0x306ec8[_0x260d75(0x243)])==null?void 0x0:_0x7df826['filter'](_0xef5cae=>_0xef5cae[_0x260d75(0x216)]===_0x28d5b5[_0x260d75(0x20f)])['map'](_0x45152f=>_0x45152f[_0x260d75(0x246)]))!=null?_0x2beab6:[],_0x351942=JSON[_0x260d75(0x1ec)](_0x306ec8),_0x28f864=_0x4b6f50[_0x260d75(0x224)],_0x132bdd=_0x4b6f50['id'],_0x115f99={'memberId':(await this['_sessionService'][_0x260d75(0x232)](_0x4c0d43))[_0x260d75(0x217)](),'unitId':_0x4c0d43,'threadId':_0x28f864,'mention':_0x329961,'content':_0x351942,'replyId':_0x132bdd},_0x340398=await this[_0x260d75(0x22b)][_0x260d75(0x248)](_0x260d75(0x200)+_0x4c0d43+_0x260d75(0x1f7),{'body':_0x115f99});return!_0x340398['body']['error']||_0x340398[_0x260d75(0x23b)][_0x260d75(0x1f6)][_0x260d75(0x1ff)]===0x1;}async['resolveComment'](_0x25576f){const _0x1512e7=_0x1bdfca,{unitId:_0x312032}=_0x25576f,_0x275c9c=_0x25576f[_0x1512e7(0x224)],_0x94f4bb={'memberId':this[_0x1512e7(0x239)]['getCurrentUser']()[_0x1512e7(0x24b)],'unitId':_0x312032,'threadId':_0x275c9c,'solved':_0x25576f[_0x1512e7(0x214)]?I['Solved']:I[_0x1512e7(0x20c)]},_0x2c25e3=await this[_0x1512e7(0x22b)][_0x1512e7(0x248)](_0x1512e7(0x200)+_0x312032+_0x1512e7(0x211),{'body':_0x94f4bb});return!_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)]||_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)][_0x1512e7(0x1ff)]===0x1;}async[_0x1bdfca(0x229)](_0x59fa22,_0x434a33,_0x1bac73,_0x23c309){const _0x50abe8=_0x1bdfca,_0x79e59b={'memberId':(await this[_0x50abe8(0x1f9)][_0x50abe8(0x232)](_0x59fa22))[_0x50abe8(0x217)](),'threadId':_0x1bac73,'replyId':_0x23c309,'unitId':_0x59fa22},_0x56ecca=await this[_0x50abe8(0x22b)][_0x50abe8(0x248)](_0x50abe8(0x200)+_0x59fa22+'/delete',{'body':_0x79e59b});return!_0x56ecca[_0x50abe8(0x23b)]['error']||_0x56ecca[_0x50abe8(0x23b)][_0x50abe8(0x1f6)][_0x50abe8(0x1ff)]===0x1;}async[_0x1bdfca(0x206)](_0x17d402,_0x45630b,_0x3adc83){const _0x579531=_0x1bdfca,_0x4c4611={'unitId':_0x17d402,'threadId':_0x3adc83},_0x534a10=await this[_0x579531(0x22b)][_0x579531(0x248)]('/universer-api/comment/unit/'+_0x17d402+_0x579531(0x21f),{'body':_0x4c4611}),_0x3182f6=_0x3adc83[_0x579531(0x201)](_0xe5d033=>ee(_0x534a10['body'][_0x579531(0x1f5)][_0xe5d033],_0x17d402,_0x45630b))[_0x579531(0x205)](Boolean);return Object['values'](_0x534a10[_0x579531(0x23b)][_0x579531(0x1ef)])['forEach'](_0x2a4fa7=>{const _0x3367db=_0x579531;this['_userService'][_0x3367db(0x21e)](_0x2a4fa7);}),_0x3182f6;}['saveCommentToSnapshot'](_0x55ccf7){const _0x1a6028=_0x1bdfca;return{'id':_0x55ccf7['id'],'threadId':_0x55ccf7[_0x1a6028(0x224)],'ref':_0x55ccf7[_0x1a6028(0x1fa)]};}};S=Q([b(0x0,_0x58577d(_0x1f697f)),b(0x1,_0x58577d(_0x2ebc4d)),b(0x2,_0x58577d(_0x186ef6))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x38ca22,_0x45d8e2,_0x50a57a,_0x416bda)=>{const _0x925489=_0x1bdfca;for(var _0xf86d79=_0x416bda>0x1?void 0x0:_0x416bda?re(_0x45d8e2,_0x50a57a):_0x45d8e2,_0x3dc5ca=_0x38ca22[_0x925489(0x223)]-0x1,_0x13cefe;_0x3dc5ca>=0x0;_0x3dc5ca--)(_0x13cefe=_0x38ca22[_0x3dc5ca])&&(_0xf86d79=_0x13cefe(_0xf86d79)||_0xf86d79);return _0xf86d79;},M=(_0x4050a9,_0x4945f5)=>(_0x47a348,_0x4b5022)=>_0x4945f5(_0x47a348,_0x4b5022,_0x4050a9);let f=class extends _0x50a167{constructor(_0x571375,_0x166e60){const _0x4d30a3=_0x1bdfca;super(),this[_0x4d30a3(0x249)]=_0x571375,this[_0x4d30a3(0x23f)]=_0x166e60,this['_initDataSource']();}['_initDataSource'](){const _0x46dca6=_0x1bdfca;this[_0x46dca6(0x249)][_0x46dca6(0x231)]=this['_threadCommentDataSource'],this[_0x46dca6(0x249)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4babee),M(0x1,_0x58577d(S))],f);var se=Object[_0x1bdfca(0x22c)],oe=Object[_0x1bdfca(0x1f0)],ne=(_0x470bdd,_0x5f25e9,_0x523605)=>_0x5f25e9 in _0x470bdd?se(_0x470bdd,_0x5f25e9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x523605}):_0x470bdd[_0x5f25e9]=_0x523605,ie=(_0x306133,_0xd18e40,_0x35b6d1,_0x5bf0ba)=>{const _0x4a7b1c=_0x1bdfca;for(var _0x33a395=_0x5bf0ba>0x1?void 0x0:_0x5bf0ba?oe(_0xd18e40,_0x35b6d1):_0xd18e40,_0x17d2dc=_0x306133[_0x4a7b1c(0x223)]-0x1,_0x3fd7fa;_0x17d2dc>=0x0;_0x17d2dc--)(_0x3fd7fa=_0x306133[_0x17d2dc])&&(_0x33a395=_0x3fd7fa(_0x33a395)||_0x33a395);return _0x33a395;},N=(_0x19f5c4,_0x6fe8d5)=>(_0x26bdb4,_0x54669f)=>_0x6fe8d5(_0x26bdb4,_0x54669f,_0x19f5c4),$=(_0x4ccd71,_0x1bfa1f,_0x16bd86)=>ne(_0x4ccd71,typeof _0x1bfa1f!=_0x1bdfca(0x23a)?_0x1bfa1f+'':_0x1bfa1f,_0x16bd86);let g=class extends _0x10008e{constructor(_0x37fa83=O,_0x265c42,_0x50f65e){const _0x579b6a=_0x1bdfca;super(),this[_0x579b6a(0x20b)]=_0x37fa83,this['_injector']=_0x265c42,this[_0x579b6a(0x203)]=_0x50f65e;const {..._0x47930d}=_0xccd7ac({},O,this[_0x579b6a(0x20b)]);this[_0x579b6a(0x203)][_0x579b6a(0x218)](z,_0x47930d);}[_0x1bdfca(0x1e8)](){const _0x1dcd0a=_0x1bdfca;[[S],[f],[_]][_0x1dcd0a(0x240)](_0x14fcc3=>{const _0x55e342=_0x1dcd0a;this[_0x55e342(0x228)]['add'](_0x14fcc3);});}[_0x1bdfca(0x1fb)](){const _0x581d00=_0x1bdfca;this[_0x581d00(0x228)][_0x581d00(0x22e)](f),this[_0x581d00(0x228)][_0x581d00(0x22e)](_);}};$(g,_0x1bdfca(0x222),W),$(g,'type',_0x12b441[_0x1bdfca(0x204)]),g=ie([_0x1e955f(_0x23fc9b,_0x82913d,_0x1b76e0),N(0x1,_0x58577d(_0x418b1b)),N(0x2,_0x30ca1b)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x54c2e1=_0x543b;(function(_0x4f7e3f,_0x41986b){const _0x4a5cb4=_0x543b,_0x14b638=_0x4f7e3f();while(!![]){try{const _0x3107e=-parseInt(_0x4a5cb4(0x133))/0x1+parseInt(_0x4a5cb4(0x171))/0x2+-parseInt(_0x4a5cb4(0x140))/0x3*(-parseInt(_0x4a5cb4(0x17c))/0x4)+parseInt(_0x4a5cb4(0x139))/0x5*(parseInt(_0x4a5cb4(0x135))/0x6)+-parseInt(_0x4a5cb4(0x143))/0x7+parseInt(_0x4a5cb4(0x188))/0x8+-parseInt(_0x4a5cb4(0x16b))/0x9;if(_0x3107e===_0x41986b)break;else _0x14b638['push'](_0x14b638['shift']());}catch(_0x1bb1b7){_0x14b638['push'](_0x14b638['shift']());}}}(_0x5f3f,0x9eed9));import{CommentService as _0x106d32,CollaborationSessionService as _0x435820,UniverCollaborationClientPlugin as _0x4a471d}from'@univerjs-pro/collaboration-client';function _0x543b(_0xa9b0a1,_0x3a45b9){_0xa9b0a1=_0xa9b0a1-0x12d;const _0x5f3f4a=_0x5f3f();let _0x543b8a=_0x5f3f4a[_0xa9b0a1];return _0x543b8a;}import{UniverLicensePlugin as _0x319e70}from'@univerjs-pro/license';import{dayjs as _0x1cb702,UserManagerService as _0x79f5f8,Inject as _0x32a39f,Injector as _0x1b2498,Disposable as _0xf64d55,CustomRangeType as _0x28fd3d,UniverInstanceType as _0x154615,DependentOn as _0x5887db,IConfigService as _0x4268de,Plugin as _0x4e8090,merge as _0x325500}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x28dbe4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x118a66,IThreadCommentDataSourceService as _0x1c9b0a}from'@univerjs/thread-comment';import{bufferTime as _0xf247e6}from'rxjs';import{HTTPService as _0x43ff1a}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x43eb1d=>(_0x43eb1d[_0x43eb1d[_0x54c2e1(0x14a)]=0x0]=_0x54c2e1(0x14a),_0x43eb1d[_0x43eb1d[_0x54c2e1(0x152)]=0x1]='Solved',_0x43eb1d[_0x43eb1d[_0x54c2e1(0x146)]=-0x1]=_0x54c2e1(0x146),_0x43eb1d))(I||{}),v=(_0x373a64=>(_0x373a64[_0x373a64['Unknown']=0x0]=_0x54c2e1(0x17e),_0x373a64[_0x373a64[_0x54c2e1(0x14e)]=0x1]=_0x54c2e1(0x14e),_0x373a64[_0x373a64['Reply']=0x2]=_0x54c2e1(0x186),_0x373a64[_0x373a64[_0x54c2e1(0x160)]=0x3]=_0x54c2e1(0x160),_0x373a64[_0x373a64['Delete']=0x4]='Delete',_0x373a64[_0x373a64[_0x54c2e1(0x176)]=0x5]=_0x54c2e1(0x176),_0x373a64[_0x373a64[_0x54c2e1(0x146)]=-0x1]='UNRECOGNIZED',_0x373a64))(v||{});const y=_0x9f4a0f=>_0x1cb702(new Date(+_0x9f4a0f))[_0x54c2e1(0x169)](_0x54c2e1(0x159)),B=async(_0x4a4bc9,_0x4033ed)=>{const _0x48e02e=_0x54c2e1,_0x17f072=_0x4a4bc9[_0x48e02e(0x149)](_0x79f5f8),_0x16a6ed=_0x4a4bc9[_0x48e02e(0x149)](_0x43ff1a);_0x4033ed['forEach'](_0x5a1976=>{const _0x265223=_0x48e02e;_0x17f072[_0x265223(0x13b)](_0x5a1976)&&_0x4033ed[_0x265223(0x165)](_0x5a1976);}),_0x4033ed['size']&&(await _0x16a6ed[_0x48e02e(0x149)](_0x48e02e(0x142),{'params':{'userIDs':[..._0x4033ed]}}))[_0x48e02e(0x162)][_0x48e02e(0x172)][_0x48e02e(0x189)](_0x5afa4b=>{const _0x195717=_0x48e02e;_0x5afa4b&&_0x17f072[_0x195717(0x148)](_0x5afa4b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x32df73,_0x30acd3,_0x5d1962,_0x4d1171)=>{const _0x4cd9c9=_0x54c2e1;for(var _0x445063=_0x4d1171>0x1?void 0x0:_0x4d1171?K(_0x30acd3,_0x5d1962):_0x30acd3,_0x219b71=_0x32df73[_0x4cd9c9(0x13c)]-0x1,_0x16ab1c;_0x219b71>=0x0;_0x219b71--)(_0x16ab1c=_0x32df73[_0x219b71])&&(_0x445063=_0x16ab1c(_0x445063)||_0x445063);return _0x445063;},p=(_0x20b592,_0x58d8ed)=>(_0x1222b,_0x116bbe)=>_0x58d8ed(_0x1222b,_0x116bbe,_0x20b592);let _=class extends _0xf64d55{constructor(_0x571abc,_0x192abc,_0x3088a,_0x41ecab){const _0x3bc288=_0x54c2e1;super(),this['_commentService']=_0x571abc,this[_0x3bc288(0x173)]=_0x192abc,this['_userService']=_0x3088a,this['_injector']=_0x41ecab,this[_0x3bc288(0x191)](),this[_0x3bc288(0x16e)]();}[_0x54c2e1(0x16e)](){const _0x483bf8=_0x54c2e1;this['disposeWithMe'](this[_0x483bf8(0x173)][_0x483bf8(0x180)][_0x483bf8(0x190)](_0xf247e6(0x10))[_0x483bf8(0x187)](_0x343b00=>{const _0x144c63=_0x483bf8,_0x10cc92=new Set();_0x343b00[_0x144c63(0x189)](_0x43a2a5=>{const _0x1f0600=_0x144c63;switch(_0x43a2a5[_0x1f0600(0x16d)]){case _0x1f0600(0x16f):{const _0x409d37=_0x43a2a5[_0x1f0600(0x167)][_0x1f0600(0x144)];_0x10cc92[_0x1f0600(0x16f)](_0x409d37);break;}}}),B(this[_0x144c63(0x18d)],_0x10cc92);}));}[_0x54c2e1(0x191)](){const _0x3de2f7=_0x54c2e1;this['disposeWithMe'](this[_0x3de2f7(0x13e)]['commentUpdate$']['subscribe'](async _0x606312=>{const _0x26ee60=_0x3de2f7;var _0x33f970,_0x45269f,_0x493d63,_0x2a5bd8;const _0x4b80c7=(_0x33f970=this[_0x26ee60(0x173)][_0x26ee60(0x131)](_0x606312['unitId'])[_0x26ee60(0x161)](_0x3a3461=>_0x3a3461['threadId']===_0x606312[_0x26ee60(0x16c)]))==null?void 0x0:_0x33f970[_0x26ee60(0x147)];if(!_0x4b80c7)return;const {unitId:_0x35297f,subUnitId:_0x5f5691}=_0x4b80c7;switch(_0x606312[_0x26ee60(0x166)]&&this[_0x26ee60(0x155)]['addUser'](_0x606312[_0x26ee60(0x166)]),_0x606312[_0x26ee60(0x16d)]){case v['Add']:break;case v[_0x26ee60(0x186)]:{this[_0x26ee60(0x173)][_0x26ee60(0x158)](_0x35297f,_0x5f5691,{'unitId':_0x35297f,'subUnitId':_0x5f5691,'ref':'','id':_0x606312[_0x26ee60(0x17b)],'dT':y(+_0x606312[_0x26ee60(0x137)]),'threadId':_0x606312['threadId'],'personId':(_0x493d63=(_0x45269f=_0x606312[_0x26ee60(0x166)])==null?void 0x0:_0x45269f[_0x26ee60(0x18f)])!=null?_0x493d63:_0x606312[_0x26ee60(0x14c)],'text':JSON[_0x26ee60(0x150)](_0x606312[_0x26ee60(0x18b)]),'parentId':_0x4b80c7['id']});break;}case v[_0x26ee60(0x15c)]:{const _0x2733c3=this[_0x26ee60(0x173)][_0x26ee60(0x14d)](_0x35297f,_0x5f5691,_0x606312[_0x26ee60(0x17b)]);_0x2733c3&&_0x2733c3[_0x26ee60(0x15b)]&&this[_0x26ee60(0x173)][_0x26ee60(0x13a)](_0x35297f,_0x5f5691,_0x606312[_0x26ee60(0x17b)]);break;}case v[_0x26ee60(0x160)]:{this['_threadCommentModel'][_0x26ee60(0x168)](_0x35297f,_0x5f5691,{'commentId':_0x606312[_0x26ee60(0x17b)],'text':JSON[_0x26ee60(0x150)](_0x606312['content'])});break;}case v['Solve']:{const _0x5b7097=(_0x2a5bd8=this[_0x26ee60(0x173)][_0x26ee60(0x131)](_0x606312['unitId'])['find'](_0x2dfd44=>_0x2dfd44[_0x26ee60(0x16c)]===_0x606312[_0x26ee60(0x16c)]))==null?void 0x0:_0x2a5bd8[_0x26ee60(0x147)];_0x5b7097&&this[_0x26ee60(0x173)][_0x26ee60(0x18e)](_0x35297f,_0x5f5691,_0x5b7097['id'],_0x606312[_0x26ee60(0x138)]===I[_0x26ee60(0x152)]);break;}}}));}};_=V([p(0x0,_0x32a39f(_0x106d32)),p(0x1,_0x32a39f(_0x118a66)),p(0x2,_0x32a39f(_0x79f5f8)),p(0x3,_0x32a39f(_0x1b2498))],_);const z=_0x54c2e1(0x157),O={};var k=Object[_0x54c2e1(0x174)],Q=(_0x43d48b,_0xc420c8,_0x4dad32,_0x5011f1)=>{const _0x50ef9f=_0x54c2e1;for(var _0x72e235=_0x5011f1>0x1?void 0x0:_0x5011f1?k(_0xc420c8,_0x4dad32):_0xc420c8,_0x5ad328=_0x43d48b[_0x50ef9f(0x13c)]-0x1,_0x8720c2;_0x5ad328>=0x0;_0x5ad328--)(_0x8720c2=_0x43d48b[_0x5ad328])&&(_0x72e235=_0x8720c2(_0x72e235)||_0x72e235);return _0x72e235;},b=(_0x5e3800,_0x5ddac4)=>(_0xbcbe03,_0x502fa1)=>_0x5ddac4(_0xbcbe03,_0x502fa1,_0x5e3800);function X(_0x4e7b62,_0x4a094d){const _0x2924e7=_0x54c2e1,_0x48582e=_0x4e7b62['replies'][0x0];return{..._0x4a094d,'id':_0x48582e[_0x2924e7(0x17b)],'resolved':_0x4e7b62[_0x2924e7(0x138)]===0x1,'dT':y(_0x48582e[_0x2924e7(0x137)]),'personId':_0x48582e[_0x2924e7(0x14c)],'threadId':_0x48582e[_0x2924e7(0x16c)]};}function ee(_0x55adc0,_0x4eb1bf,_0x5b80a9){const _0x376837=_0x54c2e1;var _0x4187ba,_0xc64485;if(((_0xc64485=(_0x4187ba=_0x55adc0==null?void 0x0:_0x55adc0[_0x376837(0x153)])==null?void 0x0:_0x4187ba[_0x376837(0x13c)])!=null?_0xc64485:0x0)>0x0){const _0x4b60ee=(_0x2a6697,_0x33390c)=>({'id':_0x2a6697[_0x376837(0x17b)],'threadId':_0x2a6697[_0x376837(0x16c)],'dT':y(_0x2a6697[_0x376837(0x137)]),'personId':_0x2a6697[_0x376837(0x14c)],'resolved':_0x55adc0['solved']===I[_0x376837(0x152)],'unitId':_0x4eb1bf,'subUnitId':_0x5b80a9,'text':JSON[_0x376837(0x150)](_0x2a6697[_0x376837(0x18b)]),'parentId':_0x33390c}),_0x524a73=_0x4b60ee(_0x55adc0[_0x376837(0x153)][0x0]);return{..._0x524a73,'children':_0x55adc0[_0x376837(0x153)][_0x376837(0x15d)](0x1)[_0x376837(0x15a)](_0x1dd419=>_0x4b60ee(_0x1dd419,_0x524a73['id']))};}return null;}let S=class{constructor(_0x200a0f,_0x30ea00,_0x47f79a){const _0x3d6211=_0x54c2e1;this[_0x3d6211(0x15e)]=_0x200a0f,this['_userService']=_0x30ea00,this[_0x3d6211(0x15f)]=_0x47f79a;}async[_0x54c2e1(0x158)](_0x1fc770){const _0x4a8365=_0x54c2e1;var _0x23c956,_0x386c2e;const {parentId:_0x31d610,unitId:_0x556f7f,text:_0x1c9bcd,threadId:_0x3b3ee6}=_0x1fc770,_0x3fd56f=(_0x386c2e=(_0x23c956=_0x1c9bcd['customRanges'])==null?void 0x0:_0x23c956[_0x4a8365(0x12f)](_0x379377=>_0x379377['rangeType']===_0x28fd3d[_0x4a8365(0x178)])[_0x4a8365(0x15a)](_0x51a4ee=>_0x51a4ee['rangeId']))!=null?_0x386c2e:[],_0xc5a41e=JSON[_0x4a8365(0x177)](_0x1c9bcd),_0x445d8a=(await this[_0x4a8365(0x15f)][_0x4a8365(0x185)](_0x556f7f))[_0x4a8365(0x14f)]();if(_0x31d610){const _0x462e49={'memberId':_0x445d8a,'unitId':_0x556f7f,'content':_0xc5a41e,'mention':_0x3fd56f,'threadId':_0x3b3ee6},_0x24b1d5=(await this[_0x4a8365(0x15e)][_0x4a8365(0x181)](_0x4a8365(0x182)+_0x556f7f+'/reply',{'body':_0x462e49}))[_0x4a8365(0x162)][_0x4a8365(0x16a)];return{..._0x1fc770,'id':_0x24b1d5[_0x4a8365(0x17b)],'dT':_0x1cb702(+_0x24b1d5[_0x4a8365(0x137)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x24b1d5['userId']};}else{const _0x10f4b4={'memberId':_0x445d8a,'unitId':_0x556f7f,'content':_0xc5a41e,'mention':_0x3fd56f},_0x569ad2=await this[_0x4a8365(0x15e)][_0x4a8365(0x181)](_0x4a8365(0x182)+_0x556f7f+_0x4a8365(0x184),{'body':_0x10f4b4});return X(_0x569ad2[_0x4a8365(0x162)]['comment'],_0x1fc770);}}async[_0x54c2e1(0x168)](_0x5d4df6){const _0x4ff5e0=_0x54c2e1;var _0x592c9a,_0x362221;const {text:_0x430a6b,unitId:_0x52a5d3}=_0x5d4df6,_0x262dc3=(_0x362221=(_0x592c9a=_0x430a6b[_0x4ff5e0(0x179)])==null?void 0x0:_0x592c9a[_0x4ff5e0(0x12f)](_0xb434e2=>_0xb434e2['rangeType']===_0x28fd3d['COMMENT'])[_0x4ff5e0(0x15a)](_0x20aa50=>_0x20aa50[_0x4ff5e0(0x18a)]))!=null?_0x362221:[],_0x4fe966=JSON['stringify'](_0x430a6b),_0x52fba6=_0x5d4df6[_0x4ff5e0(0x16c)],_0x15c9a7=_0x5d4df6['id'],_0x516b1a={'memberId':(await this[_0x4ff5e0(0x15f)]['requireSession'](_0x52a5d3))['getMemberID'](),'unitId':_0x52a5d3,'threadId':_0x52fba6,'mention':_0x262dc3,'content':_0x4fe966,'replyId':_0x15c9a7},_0x1014d1=await this['_httpService'][_0x4ff5e0(0x181)]('/universer-api/comment/unit/'+_0x52a5d3+'/edit',{'body':_0x516b1a});return!_0x1014d1[_0x4ff5e0(0x162)][_0x4ff5e0(0x13f)]||_0x1014d1[_0x4ff5e0(0x162)]['error'][_0x4ff5e0(0x136)]===0x1;}async[_0x54c2e1(0x18e)](_0x1a9b6b){const _0x223897=_0x54c2e1,{unitId:_0x5af528}=_0x1a9b6b,_0x2db10b=_0x1a9b6b[_0x223897(0x16c)],_0x1dde0f={'memberId':this['_userService'][_0x223897(0x14b)]()[_0x223897(0x18f)],'unitId':_0x5af528,'threadId':_0x2db10b,'solved':_0x1a9b6b[_0x223897(0x12e)]?I['Solved']:I['OpenOrReOpen']},_0x1d162a=await this[_0x223897(0x15e)]['post'](_0x223897(0x182)+_0x5af528+_0x223897(0x17f),{'body':_0x1dde0f});return!_0x1d162a['body'][_0x223897(0x13f)]||_0x1d162a[_0x223897(0x162)][_0x223897(0x13f)]['code']===0x1;}async[_0x54c2e1(0x13a)](_0x5c727e,_0xaa241c,_0x17226d,_0x267ea3){const _0xc4af9c=_0x54c2e1,_0x5ea419={'memberId':(await this['_sessionService']['requireSession'](_0x5c727e))[_0xc4af9c(0x14f)](),'threadId':_0x17226d,'replyId':_0x267ea3,'unitId':_0x5c727e},_0x2733df=await this[_0xc4af9c(0x15e)]['post']('/universer-api/comment/unit/'+_0x5c727e+'/delete',{'body':_0x5ea419});return!_0x2733df[_0xc4af9c(0x162)]['error']||_0x2733df[_0xc4af9c(0x162)][_0xc4af9c(0x13f)][_0xc4af9c(0x136)]===0x1;}async[_0x54c2e1(0x130)](_0x4f6787,_0x261bfe,_0x5b5ac4){const _0x1058b4=_0x54c2e1,_0x513205={'unitId':_0x4f6787,'threadId':_0x5b5ac4},_0x4a3bda=await this[_0x1058b4(0x15e)][_0x1058b4(0x181)](_0x1058b4(0x182)+_0x4f6787+_0x1058b4(0x145),{'body':_0x513205}),_0x2b526d=_0x5b5ac4[_0x1058b4(0x15a)](_0x1e6b85=>ee(_0x4a3bda[_0x1058b4(0x162)][_0x1058b4(0x17d)][_0x1e6b85],_0x4f6787,_0x261bfe))[_0x1058b4(0x12f)](Boolean);return Object[_0x1058b4(0x151)](_0x4a3bda[_0x1058b4(0x162)]['users'])['forEach'](_0x19cdf8=>{const _0x230c53=_0x1058b4;this[_0x230c53(0x155)][_0x230c53(0x148)](_0x19cdf8);}),_0x2b526d;}[_0x54c2e1(0x175)](_0x4b0853){const _0x4310d7=_0x54c2e1;return{'id':_0x4b0853['id'],'threadId':_0x4b0853[_0x4310d7(0x16c)],'ref':_0x4b0853['ref']};}};S=Q([b(0x0,_0x32a39f(_0x43ff1a)),b(0x1,_0x32a39f(_0x79f5f8)),b(0x2,_0x32a39f(_0x435820))],S);function _0x5f3f(){const _0x3669da=['126651FZmPLJ','personId','/list','UNRECOGNIZED','root','addUser','get','OpenOrReOpen','getCurrentUser','userId','getComment','Add','getMemberID','parse','values','Solved','replies','_initDataSource','_userService','defineProperty','thread-comment-data-source.config','addComment','YYYY/MM/DD\x20HH:mm','map','parentId','Delete','slice','_httpService','_sessionService','Edit','find','body','syncUpdateMutationToColla','_configService','delete','user','payload','updateComment','format','reply','20536749rCqQzi','threadId','type','_initUserSync','add','symbol','1908808lushHT','users','_threadCommentModel','getOwnPropertyDescriptor','saveCommentToSnapshot','Solve','stringify','COMMENT','customRanges','dataSource','replyId','1239824HAwzPw','comments','Unknown','/solved','commentUpdate$','post','/universer-api/comment/unit/','_threadCommentDataSourceService','/add','requireSession','Reply','subscribe','9725344nwpAzY','forEach','rangeId','content','UNIVER_UNKNOWN','_injector','resolveComment','userID','pipe','_init','_config','resolved','filter','listComments','getUnit','onStarting','417927MXGqUm','_threadCommentDataSource','1524GVAVrp','code','createTimestamp','solved','11395XJwvUc','deleteComment','getUser','length','onReady','_commentService','error','6rComBe','pluginName','/universer-api/user/list'];_0x5f3f=function(){return _0x3669da;};return _0x5f3f();}var re=Object[_0x54c2e1(0x174)],te=(_0x2143b8,_0x17a8c3,_0x49fa0c,_0x404dca)=>{const _0x1e250d=_0x54c2e1;for(var _0xc2cf87=_0x404dca>0x1?void 0x0:_0x404dca?re(_0x17a8c3,_0x49fa0c):_0x17a8c3,_0x4339b4=_0x2143b8[_0x1e250d(0x13c)]-0x1,_0x2ce91a;_0x4339b4>=0x0;_0x4339b4--)(_0x2ce91a=_0x2143b8[_0x4339b4])&&(_0xc2cf87=_0x2ce91a(_0xc2cf87)||_0xc2cf87);return _0xc2cf87;},M=(_0x236c6e,_0x158eb)=>(_0x363c69,_0x19f75c)=>_0x158eb(_0x363c69,_0x19f75c,_0x236c6e);let f=class extends _0xf64d55{constructor(_0x52de6a,_0x120318){const _0x5c7e2f=_0x54c2e1;super(),this[_0x5c7e2f(0x183)]=_0x52de6a,this[_0x5c7e2f(0x134)]=_0x120318,this['_initDataSource']();}[_0x54c2e1(0x154)](){const _0x59cd7d=_0x54c2e1;this[_0x59cd7d(0x183)][_0x59cd7d(0x17a)]=this[_0x59cd7d(0x134)],this['_threadCommentDataSourceService'][_0x59cd7d(0x163)]=!0x1;}};f=te([M(0x0,_0x1c9b0a),M(0x1,_0x32a39f(S))],f);var se=Object[_0x54c2e1(0x156)],oe=Object[_0x54c2e1(0x174)],ne=(_0x2778fe,_0x3f4943,_0x4d7c4a)=>_0x3f4943 in _0x2778fe?se(_0x2778fe,_0x3f4943,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d7c4a}):_0x2778fe[_0x3f4943]=_0x4d7c4a,ie=(_0x3dcb61,_0x144d11,_0x1c3113,_0x409f9f)=>{const _0x323a86=_0x54c2e1;for(var _0x304bea=_0x409f9f>0x1?void 0x0:_0x409f9f?oe(_0x144d11,_0x1c3113):_0x144d11,_0x239e61=_0x3dcb61[_0x323a86(0x13c)]-0x1,_0xd9be4e;_0x239e61>=0x0;_0x239e61--)(_0xd9be4e=_0x3dcb61[_0x239e61])&&(_0x304bea=_0xd9be4e(_0x304bea)||_0x304bea);return _0x304bea;},N=(_0x236b74,_0x632758)=>(_0x43ab0a,_0x87b9ab)=>_0x632758(_0x43ab0a,_0x87b9ab,_0x236b74),$=(_0x3c5142,_0x294a72,_0x19bdd7)=>ne(_0x3c5142,typeof _0x294a72!=_0x54c2e1(0x170)?_0x294a72+'':_0x294a72,_0x19bdd7);let g=class extends _0x4e8090{constructor(_0x39feff=O,_0x4ec327,_0x55d1c7){const _0x49f6ad=_0x54c2e1;super(),this[_0x49f6ad(0x12d)]=_0x39feff,this[_0x49f6ad(0x18d)]=_0x4ec327,this[_0x49f6ad(0x164)]=_0x55d1c7;const {..._0x13503b}=_0x325500({},O,this[_0x49f6ad(0x12d)]);this['_configService']['setConfig'](z,_0x13503b);}[_0x54c2e1(0x132)](){const _0x5293db=_0x54c2e1;[[S],[f],[_]][_0x5293db(0x189)](_0x31b31a=>{const _0x1a0b5b=_0x5293db;this[_0x1a0b5b(0x18d)]['add'](_0x31b31a);});}[_0x54c2e1(0x13d)](){const _0x57395c=_0x54c2e1;this[_0x57395c(0x18d)][_0x57395c(0x149)](f),this[_0x57395c(0x18d)][_0x57395c(0x149)](_);}};$(g,_0x54c2e1(0x141),W),$(g,_0x54c2e1(0x16d),_0x154615[_0x54c2e1(0x18c)]),g=ie([_0x5887db(_0x28dbe4,_0x4a471d,_0x319e70),N(0x1,_0x32a39f(_0x1b2498)),N(0x2,_0x4268de)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1bdfca=_0x5533;(function(_0xfb79f,_0x33210c){const _0x1204d4=_0x5533,_0x25c9e5=_0xfb79f();while(!![]){try{const _0x4f2acc=parseInt(_0x1204d4(0x1ed))/0x1*(parseInt(_0x1204d4(0x23c))/0x2)+parseInt(_0x1204d4(0x1f8))/0x3+parseInt(_0x1204d4(0x1fe))/0x4*(-parseInt(_0x1204d4(0x212))/0x5)+parseInt(_0x1204d4(0x1eb))/0x6*(parseInt(_0x1204d4(0x1e9))/0x7)+-parseInt(_0x1204d4(0x215))/0x8+-parseInt(_0x1204d4(0x1fd))/0x9+parseInt(_0x1204d4(0x1fc))/0xa;if(_0x4f2acc===_0x33210c)break;else _0x25c9e5['push'](_0x25c9e5['shift']());}catch(_0x4c0f23){_0x25c9e5['push'](_0x25c9e5['shift']());}}}(_0x51a9,0x31991));import{CommentService as _0x494070,CollaborationSessionService as _0x186ef6,UniverCollaborationClientPlugin as _0x82913d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1b76e0}from'@univerjs-pro/license';import{dayjs as _0x118231,UserManagerService as _0x2ebc4d,Inject as _0x58577d,Injector as _0x418b1b,Disposable as _0x50a167,CustomRangeType as _0x28d5b5,UniverInstanceType as _0x12b441,DependentOn as _0x1e955f,IConfigService as _0x30ca1b,Plugin as _0x10008e,merge as _0xccd7ac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23fc9b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x303d6b,IThreadCommentDataSourceService as _0x4babee}from'@univerjs/thread-comment';import{bufferTime as _0x2e4209}from'rxjs';import{HTTPService as _0x1f697f}from'@univerjs/network';function _0x51a9(){const _0x202810=['COMMENT','addComment','/solved','704105PAvUQt','/add','resolved','1157384CkixYI','rangeType','getMemberID','setConfig','replyId','_commentService','disposeWithMe','Delete','size','addUser','/list','/reply','_initUserSync','pluginName','length','threadId','payload','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','deleteComment','Solve','_httpService','defineProperty','resolveComment','get','_init','Unknown','dataSource','requireSession','replies','solved','reply','updateComment','Add','find','_userService','symbol','body','182lwBayO','commentUpdate$','createTimestamp','_threadCommentDataSource','forEach','Edit','comment','customRanges','getComment','Reply','rangeId','userId','post','_threadCommentDataSourceService','personId','userID','onStarting','7042yjqATK','pipe','792zpVaCo','stringify','1979cZwbkj','_threadCommentModel','users','getOwnPropertyDescriptor','user','Solved','UNRECOGNIZED','root','comments','error','/edit','436962nOtTxX','_sessionService','ref','onReady','666110VluHHY','328491HEnHPx','4TdobPT','code','/universer-api/comment/unit/','map','getUnit','_configService','UNIVER_UNKNOWN','filter','listComments','unitId','type','format','parse','_config','OpenOrReOpen','delete','subscribe'];_0x51a9=function(){return _0x202810;};return _0x51a9();}const W=_0x1bdfca(0x227);var I=(_0x4f2f5f=>(_0x4f2f5f[_0x4f2f5f['OpenOrReOpen']=0x0]=_0x1bdfca(0x20c),_0x4f2f5f[_0x4f2f5f['Solved']=0x1]=_0x1bdfca(0x1f2),_0x4f2f5f[_0x4f2f5f[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x4f2f5f))(I||{}),v=(_0x52c843=>(_0x52c843[_0x52c843[_0x1bdfca(0x230)]=0x0]=_0x1bdfca(0x230),_0x52c843[_0x52c843[_0x1bdfca(0x237)]=0x1]=_0x1bdfca(0x237),_0x52c843[_0x52c843['Reply']=0x2]='Reply',_0x52c843[_0x52c843['Edit']=0x3]=_0x1bdfca(0x241),_0x52c843[_0x52c843[_0x1bdfca(0x21c)]=0x4]=_0x1bdfca(0x21c),_0x52c843[_0x52c843[_0x1bdfca(0x22a)]=0x5]='Solve',_0x52c843[_0x52c843[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x52c843))(v||{});const y=_0x55878a=>_0x118231(new Date(+_0x55878a))[_0x1bdfca(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x480652,_0x5d149f)=>{const _0x2fc9a2=_0x1bdfca,_0x3a3a9a=_0x480652[_0x2fc9a2(0x22e)](_0x2ebc4d),_0x422c7a=_0x480652[_0x2fc9a2(0x22e)](_0x1f697f);_0x5d149f[_0x2fc9a2(0x240)](_0x5d678a=>{const _0x544cce=_0x2fc9a2;_0x3a3a9a['getUser'](_0x5d678a)&&_0x5d149f[_0x544cce(0x20d)](_0x5d678a);}),_0x5d149f[_0x2fc9a2(0x21d)]&&(await _0x422c7a[_0x2fc9a2(0x22e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5d149f]}}))['body']['users'][_0x2fc9a2(0x240)](_0x1153b9=>{_0x1153b9&&_0x3a3a9a['addUser'](_0x1153b9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46f9ee,_0x3b2c16,_0x284fa3,_0x46b68f)=>{const _0xe280e7=_0x1bdfca;for(var _0x506c00=_0x46b68f>0x1?void 0x0:_0x46b68f?K(_0x3b2c16,_0x284fa3):_0x3b2c16,_0x161513=_0x46f9ee[_0xe280e7(0x223)]-0x1,_0x1b6630;_0x161513>=0x0;_0x161513--)(_0x1b6630=_0x46f9ee[_0x161513])&&(_0x506c00=_0x1b6630(_0x506c00)||_0x506c00);return _0x506c00;},p=(_0x14278c,_0x4403c4)=>(_0x2859df,_0x39e467)=>_0x4403c4(_0x2859df,_0x39e467,_0x14278c);let _=class extends _0x50a167{constructor(_0x51b89c,_0x1f169c,_0x5f3951,_0xffe9c6){const _0x8f5bf9=_0x1bdfca;super(),this[_0x8f5bf9(0x21a)]=_0x51b89c,this['_threadCommentModel']=_0x1f169c,this[_0x8f5bf9(0x239)]=_0x5f3951,this[_0x8f5bf9(0x228)]=_0xffe9c6,this[_0x8f5bf9(0x22f)](),this[_0x8f5bf9(0x221)]();}[_0x1bdfca(0x221)](){const _0x158fa4=_0x1bdfca;this[_0x158fa4(0x21b)](this['_threadCommentModel'][_0x158fa4(0x23d)][_0x158fa4(0x1ea)](_0x2e4209(0x10))[_0x158fa4(0x20e)](_0xc6c4bb=>{const _0x2cf343=new Set();_0xc6c4bb['forEach'](_0x473dea=>{const _0x483fb6=_0x5533;switch(_0x473dea[_0x483fb6(0x208)]){case'add':{const _0xc44d10=_0x473dea[_0x483fb6(0x225)][_0x483fb6(0x24a)];_0x2cf343['add'](_0xc44d10);break;}}}),B(this['_injector'],_0x2cf343);}));}[_0x1bdfca(0x22f)](){const _0x7bf000=_0x1bdfca;this[_0x7bf000(0x21b)](this[_0x7bf000(0x21a)][_0x7bf000(0x23d)][_0x7bf000(0x20e)](async _0x49ac9e=>{const _0x9491aa=_0x7bf000;var _0x49f8e3,_0x4ed501,_0xcc6137,_0x3fc950;const _0x28f568=(_0x49f8e3=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x5b532f=>_0x5b532f[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x49f8e3[_0x9491aa(0x1f4)];if(!_0x28f568)return;const {unitId:_0x1ed3e5,subUnitId:_0x4d723e}=_0x28f568;switch(_0x49ac9e['user']&&this['_userService'][_0x9491aa(0x21e)](_0x49ac9e[_0x9491aa(0x1f1)]),_0x49ac9e[_0x9491aa(0x208)]){case v['Add']:break;case v[_0x9491aa(0x245)]:{this[_0x9491aa(0x1ee)][_0x9491aa(0x210)](_0x1ed3e5,_0x4d723e,{'unitId':_0x1ed3e5,'subUnitId':_0x4d723e,'ref':'','id':_0x49ac9e[_0x9491aa(0x219)],'dT':y(+_0x49ac9e[_0x9491aa(0x23e)]),'threadId':_0x49ac9e['threadId'],'personId':(_0xcc6137=(_0x4ed501=_0x49ac9e[_0x9491aa(0x1f1)])==null?void 0x0:_0x4ed501['userID'])!=null?_0xcc6137:_0x49ac9e[_0x9491aa(0x247)],'text':JSON[_0x9491aa(0x20a)](_0x49ac9e[_0x9491aa(0x226)]),'parentId':_0x28f568['id']});break;}case v[_0x9491aa(0x21c)]:{const _0x407009=this[_0x9491aa(0x1ee)][_0x9491aa(0x244)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);_0x407009&&_0x407009['parentId']&&this['_threadCommentModel'][_0x9491aa(0x229)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);break;}case v['Edit']:{this[_0x9491aa(0x1ee)]['updateComment'](_0x1ed3e5,_0x4d723e,{'commentId':_0x49ac9e[_0x9491aa(0x219)],'text':JSON['parse'](_0x49ac9e[_0x9491aa(0x226)])});break;}case v[_0x9491aa(0x22a)]:{const _0x42e457=(_0x3fc950=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x58225e=>_0x58225e[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x3fc950['root'];_0x42e457&&this['_threadCommentModel'][_0x9491aa(0x22d)](_0x1ed3e5,_0x4d723e,_0x42e457['id'],_0x49ac9e['solved']===I[_0x9491aa(0x1f2)]);break;}}}));}};_=V([p(0x0,_0x58577d(_0x494070)),p(0x1,_0x58577d(_0x303d6b)),p(0x2,_0x58577d(_0x2ebc4d)),p(0x3,_0x58577d(_0x418b1b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x1bdfca(0x1f0)],Q=(_0x409e4a,_0x4c9b9e,_0x5c2103,_0x97cd34)=>{const _0x47b94b=_0x1bdfca;for(var _0x8ee573=_0x97cd34>0x1?void 0x0:_0x97cd34?k(_0x4c9b9e,_0x5c2103):_0x4c9b9e,_0x5bfe73=_0x409e4a[_0x47b94b(0x223)]-0x1,_0x19e3ce;_0x5bfe73>=0x0;_0x5bfe73--)(_0x19e3ce=_0x409e4a[_0x5bfe73])&&(_0x8ee573=_0x19e3ce(_0x8ee573)||_0x8ee573);return _0x8ee573;},b=(_0x2fca9f,_0x283211)=>(_0xba5294,_0x245891)=>_0x283211(_0xba5294,_0x245891,_0x2fca9f);function X(_0x1095fd,_0x4ab505){const _0x4500c9=_0x1bdfca,_0x24582c=_0x1095fd[_0x4500c9(0x233)][0x0];return{..._0x4ab505,'id':_0x24582c[_0x4500c9(0x219)],'resolved':_0x1095fd[_0x4500c9(0x234)]===0x1,'dT':y(_0x24582c[_0x4500c9(0x23e)]),'personId':_0x24582c[_0x4500c9(0x247)],'threadId':_0x24582c[_0x4500c9(0x224)]};}function _0x5533(_0x4a58e5,_0x3cb8b5){_0x4a58e5=_0x4a58e5-0x1e8;const _0x51a9e6=_0x51a9();let _0x5533ca=_0x51a9e6[_0x4a58e5];return _0x5533ca;}function ee(_0x36163f,_0x50ee22,_0x3a19d6){const _0x442797=_0x1bdfca;var _0x4fddae,_0xd0e08c;if(((_0xd0e08c=(_0x4fddae=_0x36163f==null?void 0x0:_0x36163f[_0x442797(0x233)])==null?void 0x0:_0x4fddae[_0x442797(0x223)])!=null?_0xd0e08c:0x0)>0x0){const _0x448bad=(_0x6411f2,_0x57cfe7)=>({'id':_0x6411f2['replyId'],'threadId':_0x6411f2['threadId'],'dT':y(_0x6411f2['createTimestamp']),'personId':_0x6411f2[_0x442797(0x247)],'resolved':_0x36163f[_0x442797(0x234)]===I[_0x442797(0x1f2)],'unitId':_0x50ee22,'subUnitId':_0x3a19d6,'text':JSON[_0x442797(0x20a)](_0x6411f2[_0x442797(0x226)]),'parentId':_0x57cfe7}),_0x3fd306=_0x448bad(_0x36163f[_0x442797(0x233)][0x0]);return{..._0x3fd306,'children':_0x36163f['replies']['slice'](0x1)[_0x442797(0x201)](_0x42ba3d=>_0x448bad(_0x42ba3d,_0x3fd306['id']))};}return null;}let S=class{constructor(_0x5d841f,_0x1a3dae,_0x1f07da){const _0x3e5caf=_0x1bdfca;this['_httpService']=_0x5d841f,this[_0x3e5caf(0x239)]=_0x1a3dae,this[_0x3e5caf(0x1f9)]=_0x1f07da;}async[_0x1bdfca(0x210)](_0x463269){const _0x202c68=_0x1bdfca;var _0x42cd19,_0x1729b8;const {parentId:_0x123226,unitId:_0x85051f,text:_0x5da09d,threadId:_0x26a88a}=_0x463269,_0x551e15=(_0x1729b8=(_0x42cd19=_0x5da09d[_0x202c68(0x243)])==null?void 0x0:_0x42cd19[_0x202c68(0x205)](_0x17b1c8=>_0x17b1c8[_0x202c68(0x216)]===_0x28d5b5[_0x202c68(0x20f)])[_0x202c68(0x201)](_0x28203b=>_0x28203b['rangeId']))!=null?_0x1729b8:[],_0x524a5b=JSON['stringify'](_0x5da09d),_0xe5e07f=(await this[_0x202c68(0x1f9)][_0x202c68(0x232)](_0x85051f))[_0x202c68(0x217)]();if(_0x123226){const _0x3e817b={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15,'threadId':_0x26a88a},_0x51ac0b=(await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x220),{'body':_0x3e817b}))[_0x202c68(0x23b)][_0x202c68(0x235)];return{..._0x463269,'id':_0x51ac0b[_0x202c68(0x219)],'dT':_0x118231(+_0x51ac0b[_0x202c68(0x23e)])[_0x202c68(0x209)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x51ac0b['userId']};}else{const _0x25d323={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15},_0x3b2385=await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x213),{'body':_0x25d323});return X(_0x3b2385[_0x202c68(0x23b)][_0x202c68(0x242)],_0x463269);}}async[_0x1bdfca(0x236)](_0x4b6f50){const _0x260d75=_0x1bdfca;var _0x7df826,_0x2beab6;const {text:_0x306ec8,unitId:_0x4c0d43}=_0x4b6f50,_0x329961=(_0x2beab6=(_0x7df826=_0x306ec8[_0x260d75(0x243)])==null?void 0x0:_0x7df826['filter'](_0xef5cae=>_0xef5cae[_0x260d75(0x216)]===_0x28d5b5[_0x260d75(0x20f)])['map'](_0x45152f=>_0x45152f[_0x260d75(0x246)]))!=null?_0x2beab6:[],_0x351942=JSON[_0x260d75(0x1ec)](_0x306ec8),_0x28f864=_0x4b6f50[_0x260d75(0x224)],_0x132bdd=_0x4b6f50['id'],_0x115f99={'memberId':(await this['_sessionService'][_0x260d75(0x232)](_0x4c0d43))[_0x260d75(0x217)](),'unitId':_0x4c0d43,'threadId':_0x28f864,'mention':_0x329961,'content':_0x351942,'replyId':_0x132bdd},_0x340398=await this[_0x260d75(0x22b)][_0x260d75(0x248)](_0x260d75(0x200)+_0x4c0d43+_0x260d75(0x1f7),{'body':_0x115f99});return!_0x340398['body']['error']||_0x340398[_0x260d75(0x23b)][_0x260d75(0x1f6)][_0x260d75(0x1ff)]===0x1;}async['resolveComment'](_0x25576f){const _0x1512e7=_0x1bdfca,{unitId:_0x312032}=_0x25576f,_0x275c9c=_0x25576f[_0x1512e7(0x224)],_0x94f4bb={'memberId':this[_0x1512e7(0x239)]['getCurrentUser']()[_0x1512e7(0x24b)],'unitId':_0x312032,'threadId':_0x275c9c,'solved':_0x25576f[_0x1512e7(0x214)]?I['Solved']:I[_0x1512e7(0x20c)]},_0x2c25e3=await this[_0x1512e7(0x22b)][_0x1512e7(0x248)](_0x1512e7(0x200)+_0x312032+_0x1512e7(0x211),{'body':_0x94f4bb});return!_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)]||_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)][_0x1512e7(0x1ff)]===0x1;}async[_0x1bdfca(0x229)](_0x59fa22,_0x434a33,_0x1bac73,_0x23c309){const _0x50abe8=_0x1bdfca,_0x79e59b={'memberId':(await this[_0x50abe8(0x1f9)][_0x50abe8(0x232)](_0x59fa22))[_0x50abe8(0x217)](),'threadId':_0x1bac73,'replyId':_0x23c309,'unitId':_0x59fa22},_0x56ecca=await this[_0x50abe8(0x22b)][_0x50abe8(0x248)](_0x50abe8(0x200)+_0x59fa22+'/delete',{'body':_0x79e59b});return!_0x56ecca[_0x50abe8(0x23b)]['error']||_0x56ecca[_0x50abe8(0x23b)][_0x50abe8(0x1f6)][_0x50abe8(0x1ff)]===0x1;}async[_0x1bdfca(0x206)](_0x17d402,_0x45630b,_0x3adc83){const _0x579531=_0x1bdfca,_0x4c4611={'unitId':_0x17d402,'threadId':_0x3adc83},_0x534a10=await this[_0x579531(0x22b)][_0x579531(0x248)]('/universer-api/comment/unit/'+_0x17d402+_0x579531(0x21f),{'body':_0x4c4611}),_0x3182f6=_0x3adc83[_0x579531(0x201)](_0xe5d033=>ee(_0x534a10['body'][_0x579531(0x1f5)][_0xe5d033],_0x17d402,_0x45630b))[_0x579531(0x205)](Boolean);return Object['values'](_0x534a10[_0x579531(0x23b)][_0x579531(0x1ef)])['forEach'](_0x2a4fa7=>{const _0x3367db=_0x579531;this['_userService'][_0x3367db(0x21e)](_0x2a4fa7);}),_0x3182f6;}['saveCommentToSnapshot'](_0x55ccf7){const _0x1a6028=_0x1bdfca;return{'id':_0x55ccf7['id'],'threadId':_0x55ccf7[_0x1a6028(0x224)],'ref':_0x55ccf7[_0x1a6028(0x1fa)]};}};S=Q([b(0x0,_0x58577d(_0x1f697f)),b(0x1,_0x58577d(_0x2ebc4d)),b(0x2,_0x58577d(_0x186ef6))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x38ca22,_0x45d8e2,_0x50a57a,_0x416bda)=>{const _0x925489=_0x1bdfca;for(var _0xf86d79=_0x416bda>0x1?void 0x0:_0x416bda?re(_0x45d8e2,_0x50a57a):_0x45d8e2,_0x3dc5ca=_0x38ca22[_0x925489(0x223)]-0x1,_0x13cefe;_0x3dc5ca>=0x0;_0x3dc5ca--)(_0x13cefe=_0x38ca22[_0x3dc5ca])&&(_0xf86d79=_0x13cefe(_0xf86d79)||_0xf86d79);return _0xf86d79;},M=(_0x4050a9,_0x4945f5)=>(_0x47a348,_0x4b5022)=>_0x4945f5(_0x47a348,_0x4b5022,_0x4050a9);let f=class extends _0x50a167{constructor(_0x571375,_0x166e60){const _0x4d30a3=_0x1bdfca;super(),this[_0x4d30a3(0x249)]=_0x571375,this[_0x4d30a3(0x23f)]=_0x166e60,this['_initDataSource']();}['_initDataSource'](){const _0x46dca6=_0x1bdfca;this[_0x46dca6(0x249)][_0x46dca6(0x231)]=this['_threadCommentDataSource'],this[_0x46dca6(0x249)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4babee),M(0x1,_0x58577d(S))],f);var se=Object[_0x1bdfca(0x22c)],oe=Object[_0x1bdfca(0x1f0)],ne=(_0x470bdd,_0x5f25e9,_0x523605)=>_0x5f25e9 in _0x470bdd?se(_0x470bdd,_0x5f25e9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x523605}):_0x470bdd[_0x5f25e9]=_0x523605,ie=(_0x306133,_0xd18e40,_0x35b6d1,_0x5bf0ba)=>{const _0x4a7b1c=_0x1bdfca;for(var _0x33a395=_0x5bf0ba>0x1?void 0x0:_0x5bf0ba?oe(_0xd18e40,_0x35b6d1):_0xd18e40,_0x17d2dc=_0x306133[_0x4a7b1c(0x223)]-0x1,_0x3fd7fa;_0x17d2dc>=0x0;_0x17d2dc--)(_0x3fd7fa=_0x306133[_0x17d2dc])&&(_0x33a395=_0x3fd7fa(_0x33a395)||_0x33a395);return _0x33a395;},N=(_0x19f5c4,_0x6fe8d5)=>(_0x26bdb4,_0x54669f)=>_0x6fe8d5(_0x26bdb4,_0x54669f,_0x19f5c4),$=(_0x4ccd71,_0x1bfa1f,_0x16bd86)=>ne(_0x4ccd71,typeof _0x1bfa1f!=_0x1bdfca(0x23a)?_0x1bfa1f+'':_0x1bfa1f,_0x16bd86);let g=class extends _0x10008e{constructor(_0x37fa83=O,_0x265c42,_0x50f65e){const _0x579b6a=_0x1bdfca;super(),this[_0x579b6a(0x20b)]=_0x37fa83,this['_injector']=_0x265c42,this[_0x579b6a(0x203)]=_0x50f65e;const {..._0x47930d}=_0xccd7ac({},O,this[_0x579b6a(0x20b)]);this[_0x579b6a(0x203)][_0x579b6a(0x218)](z,_0x47930d);}[_0x1bdfca(0x1e8)](){const _0x1dcd0a=_0x1bdfca;[[S],[f],[_]][_0x1dcd0a(0x240)](_0x14fcc3=>{const _0x55e342=_0x1dcd0a;this[_0x55e342(0x228)]['add'](_0x14fcc3);});}[_0x1bdfca(0x1fb)](){const _0x581d00=_0x1bdfca;this[_0x581d00(0x228)][_0x581d00(0x22e)](f),this[_0x581d00(0x228)][_0x581d00(0x22e)](_);}};$(g,_0x1bdfca(0x222),W),$(g,'type',_0x12b441[_0x1bdfca(0x204)]),g=ie([_0x1e955f(_0x23fc9b,_0x82913d,_0x1b76e0),N(0x1,_0x58577d(_0x418b1b)),N(0x2,_0x30ca1b)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xf6e4(){const _0x31eca7=['Injector','_configService','object','UNRECOGNIZED','personId','_threadCommentDataSource','_threadCommentModel','threadId','/edit','HTTPService','/universer-api/user/list','DependentOn','/add','root','length','getCurrentUser','createTimestamp','getComment','replyId','users','rangeId','getUser','parentId','function','addComment','rxjs','6114423GDLmvt','8tBItrI','@univerjs/thread-comment','user','unitId','@univerjs-pro/collaboration-client','comment','delete','1762392bNrTZO','2FIbJDC','type','symbol','10KoDUTr','_sessionService','/reply','/universer-api/comment/unit/','merge','content','resolved','@univerjs/core','Inject','@univerjs-pro/license','userId','_userService','format','reply','error','slice','thread-comment-data-source.config','subscribe','UserManagerService','pluginName','deleteComment','stringify','comments','get','UNIVER_UNKNOWN','UniverProCollaborationClient','addUser','Disposable','bufferTime','filter','exports','11470910OMgVXW','rangeType','updateComment','IConfigService','Add','_config','body','_httpService','_commentService','Solved','Unknown','map','_threadCommentDataSourceService','getMemberID','CommentService','getOwnPropertyDescriptor','values','requireSession','Edit','UniverProThreadCommentDatasource','ThreadCommentModel','334950hoQkGL','pipe','forEach','5HMQZhA','216103YrJjYN','UniverThreadCommentDataSourcePlugin','Solve','listComments','toStringTag','replies','IThreadCommentDataSourceService','Reply','getUnit','UniverThreadComment','syncUpdateMutationToColla','commentUpdate$','_initUserSync','payload','/list','UniverThreadCommentUi','amd','defineProperty','dayjs','size','/solved','Delete','ref','UniverInstanceType','CustomRangeType','userID','code','disposeWithMe','CollaborationSessionService','@univerjs/thread-comment-ui','Module','_injector','post','1759444kTiuZg','add','resolveComment','parse','_initDataSource','1184508PEFsNw','UniverCore','_init','@univerjs/network','COMMENT','OpenOrReOpen','YYYY/MM/DD\x20HH:mm'];_0xf6e4=function(){return _0x31eca7;};return _0xf6e4();}function _0x21df(_0x2511cf,_0x5a120b){_0x2511cf=_0x2511cf-0xc2;const _0xf6e40b=_0xf6e4();let _0x21dfdc=_0xf6e40b[_0x2511cf];return _0x21dfdc;}(function(_0x37abd7,_0x10124e){const _0x2c4783=_0x21df,_0x26ac98=_0x37abd7();while(!![]){try{const _0xd81764=parseInt(_0x2c4783(0x111))/0x1*(parseInt(_0x2c4783(0xd6))/0x2)+-parseInt(_0x2c4783(0x10d))/0x3+parseInt(_0x2c4783(0x132))/0x4*(parseInt(_0x2c4783(0x110))/0x5)+-parseInt(_0x2c4783(0xd5))/0x6+parseInt(_0x2c4783(0xcd))/0x7*(-parseInt(_0x2c4783(0xce))/0x8)+parseInt(_0x2c4783(0x137))/0x9+parseInt(_0x2c4783(0xd9))/0xa*(parseInt(_0x2c4783(0xf8))/0xb);if(_0xd81764===_0x10124e)break;else _0x26ac98['push'](_0x26ac98['shift']());}catch(_0x574396){_0x26ac98['push'](_0x26ac98['shift']());}}}(_0xf6e4,0x86a5b),function(_0x253fcf,_0x52315c){const _0x1dfd0a=_0x21df;typeof exports==_0x1dfd0a(0x140)&&typeof module<'u'?_0x52315c(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==_0x1dfd0a(0xca)&&define[_0x1dfd0a(0x121)]?define([_0x1dfd0a(0xf7),_0x1dfd0a(0xd2),_0x1dfd0a(0xe2),_0x1dfd0a(0xe0),_0x1dfd0a(0x12e),_0x1dfd0a(0xcf),'rxjs',_0x1dfd0a(0x13a)],_0x52315c):(_0x253fcf=typeof globalThis<'u'?globalThis:_0x253fcf||self,_0x52315c(_0x253fcf[_0x1dfd0a(0x10b)]={},_0x253fcf[_0x1dfd0a(0xf2)],_0x253fcf['UniverProLicense'],_0x253fcf[_0x1dfd0a(0x138)],_0x253fcf[_0x1dfd0a(0x120)],_0x253fcf[_0x1dfd0a(0x11a)],_0x253fcf[_0x1dfd0a(0xcc)],_0x253fcf['UniverNetwork']));}(this,function(_0x52c4e7,_0x5cf2a9,_0xbd2b65,_0x18b87d,_0x51119c,_0x13871c,_0x31d1ea,_0x2f40fe){'use strict';const _0x45bbc8=_0x21df;const _0x1b9a38='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x42e3c7=(_0x5409cc=>(_0x5409cc[_0x5409cc[_0x45bbc8(0x13c)]=0x0]='OpenOrReOpen',_0x5409cc[_0x5409cc['Solved']=0x1]=_0x45bbc8(0x101),_0x5409cc[_0x5409cc[_0x45bbc8(0x141)]=-0x1]='UNRECOGNIZED',_0x5409cc))(_0x42e3c7||{}),_0x1f64f7=(_0x2efb35=>(_0x2efb35[_0x2efb35[_0x45bbc8(0x102)]=0x0]=_0x45bbc8(0x102),_0x2efb35[_0x2efb35[_0x45bbc8(0xfc)]=0x1]=_0x45bbc8(0xfc),_0x2efb35[_0x2efb35[_0x45bbc8(0x118)]=0x2]=_0x45bbc8(0x118),_0x2efb35[_0x2efb35[_0x45bbc8(0x10a)]=0x3]=_0x45bbc8(0x10a),_0x2efb35[_0x2efb35[_0x45bbc8(0x126)]=0x4]='Delete',_0x2efb35[_0x2efb35[_0x45bbc8(0x113)]=0x5]=_0x45bbc8(0x113),_0x2efb35[_0x2efb35['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2efb35))(_0x1f64f7||{});const _0x4f3cd0=_0x25169a=>_0x18b87d[_0x45bbc8(0x123)](new Date(+_0x25169a))['format'](_0x45bbc8(0x13d)),_0x4b737e=async(_0x4650cc,_0x1b8d3d)=>{const _0x30feb1=_0x45bbc8,_0x3235a3=_0x4650cc['get'](_0x18b87d[_0x30feb1(0xeb)]),_0x3f7c57=_0x4650cc[_0x30feb1(0xf0)](_0x2f40fe[_0x30feb1(0x147)]);_0x1b8d3d[_0x30feb1(0x10f)](_0x57b8b5=>{const _0x4bda38=_0x30feb1;_0x3235a3[_0x4bda38(0xc8)](_0x57b8b5)&&_0x1b8d3d[_0x4bda38(0xd4)](_0x57b8b5);}),_0x1b8d3d[_0x30feb1(0x124)]&&(await _0x3f7c57['get'](_0x30feb1(0x148),{'params':{'userIDs':[..._0x1b8d3d]}}))[_0x30feb1(0xfe)][_0x30feb1(0xc6)]['forEach'](_0x207f79=>{const _0x44ac1f=_0x30feb1;_0x207f79&&_0x3235a3[_0x44ac1f(0xf3)](_0x207f79);});};var _0x1c5975=Object[_0x45bbc8(0x107)],_0x1bc2f2=(_0x7ed919,_0x350d74,_0x9c8ed,_0x343dbf)=>{for(var _0x5be0dd=_0x343dbf>0x1?void 0x0:_0x343dbf?_0x1c5975(_0x350d74,_0x9c8ed):_0x350d74,_0x53275a=_0x7ed919['length']-0x1,_0x23f89d;_0x53275a>=0x0;_0x53275a--)(_0x23f89d=_0x7ed919[_0x53275a])&&(_0x5be0dd=_0x23f89d(_0x5be0dd)||_0x5be0dd);return _0x5be0dd;},_0x1ff1b2=(_0x5c2de6,_0x5fc9ad)=>(_0x3d0575,_0x2377e5)=>_0x5fc9ad(_0x3d0575,_0x2377e5,_0x5c2de6);let _0x5dbeb7=class extends _0x18b87d[_0x45bbc8(0xf4)]{constructor(_0x110a47,_0x18b1d2,_0x1aada4,_0x4a6cac){const _0x3299b9=_0x45bbc8;super(),this['_commentService']=_0x110a47,this[_0x3299b9(0x144)]=_0x18b1d2,this[_0x3299b9(0xe4)]=_0x1aada4,this[_0x3299b9(0x130)]=_0x4a6cac,this['_init'](),this['_initUserSync']();}[_0x45bbc8(0x11d)](){const _0x4f57f4=_0x45bbc8;this[_0x4f57f4(0x12c)](this['_threadCommentModel']['commentUpdate$'][_0x4f57f4(0x10e)](_0x31d1ea[_0x4f57f4(0xf5)](0x10))[_0x4f57f4(0xea)](_0x4fe55d=>{const _0x11384f=_0x4f57f4,_0x1e0c78=new Set();_0x4fe55d['forEach'](_0x4348e4=>{const _0x4142f0=_0x21df;switch(_0x4348e4[_0x4142f0(0xd7)]){case _0x4142f0(0x133):{const _0xe9054d=_0x4348e4[_0x4142f0(0x11e)][_0x4142f0(0x142)];_0x1e0c78[_0x4142f0(0x133)](_0xe9054d);break;}}}),_0x4b737e(this[_0x11384f(0x130)],_0x1e0c78);}));}[_0x45bbc8(0x139)](){const _0x4a8d1e=_0x45bbc8;this[_0x4a8d1e(0x12c)](this[_0x4a8d1e(0x100)][_0x4a8d1e(0x11c)][_0x4a8d1e(0xea)](async _0x4d33cc=>{const _0x31b219=_0x4a8d1e;var _0x32080d,_0x1953a0,_0x1827b1,_0x4ec5bb;const _0x83d62f=(_0x32080d=this[_0x31b219(0x144)]['getUnit'](_0x4d33cc[_0x31b219(0xd1)])['find'](_0x467e61=>_0x467e61[_0x31b219(0x145)]===_0x4d33cc[_0x31b219(0x145)]))==null?void 0x0:_0x32080d[_0x31b219(0x14b)];if(!_0x83d62f)return;const {unitId:_0x33d509,subUnitId:_0x18220c}=_0x83d62f;switch(_0x4d33cc[_0x31b219(0xd0)]&&this[_0x31b219(0xe4)]['addUser'](_0x4d33cc[_0x31b219(0xd0)]),_0x4d33cc[_0x31b219(0xd7)]){case _0x1f64f7[_0x31b219(0xfc)]:break;case _0x1f64f7[_0x31b219(0x118)]:{this[_0x31b219(0x144)][_0x31b219(0xcb)](_0x33d509,_0x18220c,{'unitId':_0x33d509,'subUnitId':_0x18220c,'ref':'','id':_0x4d33cc[_0x31b219(0xc5)],'dT':_0x4f3cd0(+_0x4d33cc[_0x31b219(0xc3)]),'threadId':_0x4d33cc['threadId'],'personId':(_0x1827b1=(_0x1953a0=_0x4d33cc[_0x31b219(0xd0)])==null?void 0x0:_0x1953a0['userID'])!=null?_0x1827b1:_0x4d33cc[_0x31b219(0xe3)],'text':JSON[_0x31b219(0x135)](_0x4d33cc[_0x31b219(0xde)]),'parentId':_0x83d62f['id']});break;}case _0x1f64f7[_0x31b219(0x126)]:{const _0x3d1e74=this[_0x31b219(0x144)][_0x31b219(0xc4)](_0x33d509,_0x18220c,_0x4d33cc['replyId']);_0x3d1e74&&_0x3d1e74[_0x31b219(0xc9)]&&this[_0x31b219(0x144)][_0x31b219(0xed)](_0x33d509,_0x18220c,_0x4d33cc[_0x31b219(0xc5)]);break;}case _0x1f64f7[_0x31b219(0x10a)]:{this[_0x31b219(0x144)][_0x31b219(0xfa)](_0x33d509,_0x18220c,{'commentId':_0x4d33cc[_0x31b219(0xc5)],'text':JSON[_0x31b219(0x135)](_0x4d33cc['content'])});break;}case _0x1f64f7[_0x31b219(0x113)]:{const _0x3d4a6e=(_0x4ec5bb=this['_threadCommentModel'][_0x31b219(0x119)](_0x4d33cc[_0x31b219(0xd1)])['find'](_0x1815b8=>_0x1815b8[_0x31b219(0x145)]===_0x4d33cc['threadId']))==null?void 0x0:_0x4ec5bb[_0x31b219(0x14b)];_0x3d4a6e&&this[_0x31b219(0x144)][_0x31b219(0x134)](_0x33d509,_0x18220c,_0x3d4a6e['id'],_0x4d33cc['solved']===_0x42e3c7[_0x31b219(0x101)]);break;}}}));}};_0x5dbeb7=_0x1bc2f2([_0x1ff1b2(0x0,_0x18b87d[_0x45bbc8(0xe1)](_0x5cf2a9[_0x45bbc8(0x106)])),_0x1ff1b2(0x1,_0x18b87d['Inject'](_0x13871c[_0x45bbc8(0x10c)])),_0x1ff1b2(0x2,_0x18b87d['Inject'](_0x18b87d[_0x45bbc8(0xeb)])),_0x1ff1b2(0x3,_0x18b87d[_0x45bbc8(0xe1)](_0x18b87d[_0x45bbc8(0x13e)]))],_0x5dbeb7);const _0x9ebc1d=_0x45bbc8(0xe9),_0x368bd8={};var _0x55eb4d=Object[_0x45bbc8(0x107)],_0x12eedb=(_0x3f07c2,_0x296c08,_0x35c3fd,_0xa09078)=>{const _0x23f17a=_0x45bbc8;for(var _0x56de85=_0xa09078>0x1?void 0x0:_0xa09078?_0x55eb4d(_0x296c08,_0x35c3fd):_0x296c08,_0x403b8a=_0x3f07c2[_0x23f17a(0x14c)]-0x1,_0x21f764;_0x403b8a>=0x0;_0x403b8a--)(_0x21f764=_0x3f07c2[_0x403b8a])&&(_0x56de85=_0x21f764(_0x56de85)||_0x56de85);return _0x56de85;},_0x556478=(_0x1c6503,_0x53fc0d)=>(_0x45b29e,_0x1a800f)=>_0x53fc0d(_0x45b29e,_0x1a800f,_0x1c6503);function _0x4f249c(_0x1842cd,_0x172cf7){const _0x4d6798=_0x45bbc8,_0x45aff0=_0x1842cd[_0x4d6798(0x116)][0x0];return{..._0x172cf7,'id':_0x45aff0[_0x4d6798(0xc5)],'resolved':_0x1842cd['solved']===0x1,'dT':_0x4f3cd0(_0x45aff0[_0x4d6798(0xc3)]),'personId':_0x45aff0[_0x4d6798(0xe3)],'threadId':_0x45aff0[_0x4d6798(0x145)]};}function _0x3ee999(_0x31f65b,_0x805666,_0x2b3f92){const _0xdaf11=_0x45bbc8;var _0x39ea10,_0x75fde9;if(((_0x75fde9=(_0x39ea10=_0x31f65b==null?void 0x0:_0x31f65b['replies'])==null?void 0x0:_0x39ea10[_0xdaf11(0x14c)])!=null?_0x75fde9:0x0)>0x0){const _0x791945=(_0x58a41a,_0x4ea4e1)=>({'id':_0x58a41a['replyId'],'threadId':_0x58a41a['threadId'],'dT':_0x4f3cd0(_0x58a41a[_0xdaf11(0xc3)]),'personId':_0x58a41a[_0xdaf11(0xe3)],'resolved':_0x31f65b['solved']===_0x42e3c7['Solved'],'unitId':_0x805666,'subUnitId':_0x2b3f92,'text':JSON[_0xdaf11(0x135)](_0x58a41a[_0xdaf11(0xde)]),'parentId':_0x4ea4e1}),_0x49a3af=_0x791945(_0x31f65b[_0xdaf11(0x116)][0x0]);return{..._0x49a3af,'children':_0x31f65b['replies'][_0xdaf11(0xe8)](0x1)['map'](_0x23b002=>_0x791945(_0x23b002,_0x49a3af['id']))};}return null;}let _0x42cf52=class{constructor(_0x3360ac,_0x18d6ca,_0x3d4c3b){const _0x35d85e=_0x45bbc8;this['_httpService']=_0x3360ac,this[_0x35d85e(0xe4)]=_0x18d6ca,this[_0x35d85e(0xda)]=_0x3d4c3b;}async[_0x45bbc8(0xcb)](_0x587a00){const _0xf20e8c=_0x45bbc8;var _0xc4c35c,_0x1e0196;const {parentId:_0x195bdd,unitId:_0xea5605,text:_0x7b98bc,threadId:_0x1f2bad}=_0x587a00,_0x1797ac=(_0x1e0196=(_0xc4c35c=_0x7b98bc['customRanges'])==null?void 0x0:_0xc4c35c['filter'](_0x187eec=>_0x187eec[_0xf20e8c(0xf9)]===_0x18b87d[_0xf20e8c(0x129)][_0xf20e8c(0x13b)])[_0xf20e8c(0x103)](_0xe88e8c=>_0xe88e8c[_0xf20e8c(0xc7)]))!=null?_0x1e0196:[],_0x289490=JSON[_0xf20e8c(0xee)](_0x7b98bc),_0x1891ad=(await this['_sessionService'][_0xf20e8c(0x109)](_0xea5605))[_0xf20e8c(0x105)]();if(_0x195bdd){const _0x1a9817={'memberId':_0x1891ad,'unitId':_0xea5605,'content':_0x289490,'mention':_0x1797ac,'threadId':_0x1f2bad},_0x47e3de=(await this[_0xf20e8c(0xff)][_0xf20e8c(0x131)](_0xf20e8c(0xdc)+_0xea5605+_0xf20e8c(0xdb),{'body':_0x1a9817}))[_0xf20e8c(0xfe)][_0xf20e8c(0xe6)];return{..._0x587a00,'id':_0x47e3de[_0xf20e8c(0xc5)],'dT':_0x18b87d[_0xf20e8c(0x123)](+_0x47e3de['createTimestamp'])[_0xf20e8c(0xe5)](_0xf20e8c(0x13d)),'personId':_0x47e3de[_0xf20e8c(0xe3)]};}else{const _0x12e6bd={'memberId':_0x1891ad,'unitId':_0xea5605,'content':_0x289490,'mention':_0x1797ac},_0x5e6b88=await this[_0xf20e8c(0xff)][_0xf20e8c(0x131)](_0xf20e8c(0xdc)+_0xea5605+_0xf20e8c(0x14a),{'body':_0x12e6bd});return _0x4f249c(_0x5e6b88[_0xf20e8c(0xfe)][_0xf20e8c(0xd3)],_0x587a00);}}async[_0x45bbc8(0xfa)](_0x1cc1d5){const _0x2326fd=_0x45bbc8;var _0x5f04de,_0x549395;const {text:_0x4feab4,unitId:_0x1ac905}=_0x1cc1d5,_0xcdd3f0=(_0x549395=(_0x5f04de=_0x4feab4['customRanges'])==null?void 0x0:_0x5f04de[_0x2326fd(0xf6)](_0x60c76f=>_0x60c76f[_0x2326fd(0xf9)]===_0x18b87d[_0x2326fd(0x129)][_0x2326fd(0x13b)])[_0x2326fd(0x103)](_0x52b42e=>_0x52b42e[_0x2326fd(0xc7)]))!=null?_0x549395:[],_0x44ecdd=JSON[_0x2326fd(0xee)](_0x4feab4),_0x545b7c=_0x1cc1d5[_0x2326fd(0x145)],_0x3688fa=_0x1cc1d5['id'],_0x1b8825={'memberId':(await this[_0x2326fd(0xda)][_0x2326fd(0x109)](_0x1ac905))[_0x2326fd(0x105)](),'unitId':_0x1ac905,'threadId':_0x545b7c,'mention':_0xcdd3f0,'content':_0x44ecdd,'replyId':_0x3688fa},_0x50cf6b=await this[_0x2326fd(0xff)][_0x2326fd(0x131)](_0x2326fd(0xdc)+_0x1ac905+_0x2326fd(0x146),{'body':_0x1b8825});return!_0x50cf6b[_0x2326fd(0xfe)]['error']||_0x50cf6b[_0x2326fd(0xfe)][_0x2326fd(0xe7)][_0x2326fd(0x12b)]===0x1;}async[_0x45bbc8(0x134)](_0x15070a){const _0x5ae661=_0x45bbc8,{unitId:_0x5c3e73}=_0x15070a,_0xc50f73=_0x15070a[_0x5ae661(0x145)],_0x44e24f={'memberId':this[_0x5ae661(0xe4)][_0x5ae661(0xc2)]()[_0x5ae661(0x12a)],'unitId':_0x5c3e73,'threadId':_0xc50f73,'solved':_0x15070a[_0x5ae661(0xdf)]?_0x42e3c7[_0x5ae661(0x101)]:_0x42e3c7['OpenOrReOpen']},_0x5d373a=await this[_0x5ae661(0xff)][_0x5ae661(0x131)]('/universer-api/comment/unit/'+_0x5c3e73+_0x5ae661(0x125),{'body':_0x44e24f});return!_0x5d373a['body'][_0x5ae661(0xe7)]||_0x5d373a[_0x5ae661(0xfe)][_0x5ae661(0xe7)][_0x5ae661(0x12b)]===0x1;}async['deleteComment'](_0x4d893c,_0x33d209,_0x5ceea2,_0x19ff59){const _0x4864f8=_0x45bbc8,_0x27116d={'memberId':(await this[_0x4864f8(0xda)][_0x4864f8(0x109)](_0x4d893c))[_0x4864f8(0x105)](),'threadId':_0x5ceea2,'replyId':_0x19ff59,'unitId':_0x4d893c},_0x39c487=await this[_0x4864f8(0xff)]['post']('/universer-api/comment/unit/'+_0x4d893c+'/delete',{'body':_0x27116d});return!_0x39c487[_0x4864f8(0xfe)][_0x4864f8(0xe7)]||_0x39c487['body'][_0x4864f8(0xe7)][_0x4864f8(0x12b)]===0x1;}async[_0x45bbc8(0x114)](_0x33dca7,_0x16ed7a,_0x44fc99){const _0x3da7ca=_0x45bbc8,_0x39e5f0={'unitId':_0x33dca7,'threadId':_0x44fc99},_0x5bc64a=await this[_0x3da7ca(0xff)][_0x3da7ca(0x131)](_0x3da7ca(0xdc)+_0x33dca7+_0x3da7ca(0x11f),{'body':_0x39e5f0}),_0x153aee=_0x44fc99[_0x3da7ca(0x103)](_0x1c07f9=>_0x3ee999(_0x5bc64a['body'][_0x3da7ca(0xef)][_0x1c07f9],_0x33dca7,_0x16ed7a))[_0x3da7ca(0xf6)](Boolean);return Object[_0x3da7ca(0x108)](_0x5bc64a[_0x3da7ca(0xfe)][_0x3da7ca(0xc6)])[_0x3da7ca(0x10f)](_0x1b402b=>{const _0x51dfc6=_0x3da7ca;this[_0x51dfc6(0xe4)][_0x51dfc6(0xf3)](_0x1b402b);}),_0x153aee;}['saveCommentToSnapshot'](_0x47c041){const _0xb90822=_0x45bbc8;return{'id':_0x47c041['id'],'threadId':_0x47c041[_0xb90822(0x145)],'ref':_0x47c041[_0xb90822(0x127)]};}};_0x42cf52=_0x12eedb([_0x556478(0x0,_0x18b87d[_0x45bbc8(0xe1)](_0x2f40fe[_0x45bbc8(0x147)])),_0x556478(0x1,_0x18b87d['Inject'](_0x18b87d['UserManagerService'])),_0x556478(0x2,_0x18b87d[_0x45bbc8(0xe1)](_0x5cf2a9[_0x45bbc8(0x12d)]))],_0x42cf52);var _0x382a1c=Object[_0x45bbc8(0x107)],_0x18b226=(_0x3dd4e5,_0x36094f,_0x3326b2,_0x238276)=>{for(var _0x5c1e61=_0x238276>0x1?void 0x0:_0x238276?_0x382a1c(_0x36094f,_0x3326b2):_0x36094f,_0x14ccb0=_0x3dd4e5['length']-0x1,_0x4819f8;_0x14ccb0>=0x0;_0x14ccb0--)(_0x4819f8=_0x3dd4e5[_0x14ccb0])&&(_0x5c1e61=_0x4819f8(_0x5c1e61)||_0x5c1e61);return _0x5c1e61;},_0x2b73a0=(_0x1a9c0b,_0x5c0bba)=>(_0x30c478,_0xfd2015)=>_0x5c0bba(_0x30c478,_0xfd2015,_0x1a9c0b);let _0x2c66bf=class extends _0x18b87d['Disposable']{constructor(_0x4cddc2,_0x367319){const _0x12a461=_0x45bbc8;super(),this[_0x12a461(0x104)]=_0x4cddc2,this[_0x12a461(0x143)]=_0x367319,this[_0x12a461(0x136)]();}['_initDataSource'](){const _0x3837af=_0x45bbc8;this['_threadCommentDataSourceService']['dataSource']=this[_0x3837af(0x143)],this[_0x3837af(0x104)][_0x3837af(0x11b)]=!0x1;}};_0x2c66bf=_0x18b226([_0x2b73a0(0x0,_0x13871c[_0x45bbc8(0x117)]),_0x2b73a0(0x1,_0x18b87d['Inject'](_0x42cf52))],_0x2c66bf);var _0x4534e8=Object[_0x45bbc8(0x122)],_0x393a9a=Object[_0x45bbc8(0x107)],_0x2ef53a=(_0xc86431,_0x422fa3,_0x522e22)=>_0x422fa3 in _0xc86431?_0x4534e8(_0xc86431,_0x422fa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x522e22}):_0xc86431[_0x422fa3]=_0x522e22,_0x36e344=(_0x7a8ce7,_0x2f810e,_0x3ebb1a,_0x404da7)=>{const _0x4e86df=_0x45bbc8;for(var _0x2467fb=_0x404da7>0x1?void 0x0:_0x404da7?_0x393a9a(_0x2f810e,_0x3ebb1a):_0x2f810e,_0x522589=_0x7a8ce7[_0x4e86df(0x14c)]-0x1,_0x285e62;_0x522589>=0x0;_0x522589--)(_0x285e62=_0x7a8ce7[_0x522589])&&(_0x2467fb=_0x285e62(_0x2467fb)||_0x2467fb);return _0x2467fb;},_0x48a535=(_0xeaa2e9,_0x311e8b)=>(_0x2cae75,_0x578435)=>_0x311e8b(_0x2cae75,_0x578435,_0xeaa2e9),_0x3e226e=(_0x9b223c,_0x316786,_0x627a7d)=>_0x2ef53a(_0x9b223c,typeof _0x316786!=_0x45bbc8(0xd8)?_0x316786+'':_0x316786,_0x627a7d);_0x52c4e7[_0x45bbc8(0x112)]=class extends _0x18b87d['Plugin']{constructor(_0x5ca7b3=_0x368bd8,_0x3c48ae,_0x365063){const _0x11d3e2=_0x45bbc8;super(),this[_0x11d3e2(0xfd)]=_0x5ca7b3,this[_0x11d3e2(0x130)]=_0x3c48ae,this[_0x11d3e2(0x13f)]=_0x365063;const {..._0x2ac359}=_0x18b87d[_0x11d3e2(0xdd)]({},_0x368bd8,this[_0x11d3e2(0xfd)]);this[_0x11d3e2(0x13f)]['setConfig'](_0x9ebc1d,_0x2ac359);}['onStarting'](){const _0x4dd376=_0x45bbc8;[[_0x42cf52],[_0x2c66bf],[_0x5dbeb7]][_0x4dd376(0x10f)](_0x447df5=>{const _0x5b1af8=_0x4dd376;this[_0x5b1af8(0x130)][_0x5b1af8(0x133)](_0x447df5);});}['onReady'](){const _0x4de1e0=_0x45bbc8;this['_injector'][_0x4de1e0(0xf0)](_0x2c66bf),this[_0x4de1e0(0x130)][_0x4de1e0(0xf0)](_0x5dbeb7);}},_0x3e226e(_0x52c4e7[_0x45bbc8(0x112)],_0x45bbc8(0xec),_0x1b9a38),_0x3e226e(_0x52c4e7['UniverThreadCommentDataSourcePlugin'],_0x45bbc8(0xd7),_0x18b87d[_0x45bbc8(0x128)][_0x45bbc8(0xf1)]),_0x52c4e7[_0x45bbc8(0x112)]=_0x36e344([_0x18b87d[_0x45bbc8(0x149)](_0x51119c['UniverThreadCommentUIPlugin'],_0x5cf2a9['UniverCollaborationClientPlugin'],_0xbd2b65['UniverLicensePlugin']),_0x48a535(0x1,_0x18b87d[_0x45bbc8(0xe1)](_0x18b87d[_0x45bbc8(0x13e)])),_0x48a535(0x2,_0x18b87d[_0x45bbc8(0xfb)])],_0x52c4e7[_0x45bbc8(0x112)]),Object['defineProperty'](_0x52c4e7,Symbol[_0x45bbc8(0x115)],{'value':_0x45bbc8(0x12f)});}));
1
+ function _0x22f4(){const _0x1d3983=['defineProperty','Module','dayjs','add','users','get','exports','1499643XxXRdt','Unknown','UniverThreadComment','forEach','addComment','/add','code','DependentOn','ThreadCommentModel','onReady','user','UniverInstanceType','syncUpdateMutationToColla','UniverCollaborationClientPlugin','_initUserSync','thread-comment-data-source.config','values','Disposable','1197588qDimJf','getComment','2058748deatBd','Injector','UniverThreadCommentUi','10hZQWMv','12490BzCUyP','userID','_threadCommentDataSourceService','@univerjs/network','find','@univerjs/thread-comment','subscribe','pipe','_userService','getOwnPropertyDescriptor','_httpService','payload','slice','_config','size','onStarting','Edit','_configService','addUser','Inject','/solved','/universer-api/comment/unit/','4597180klnwOa','Solved','rxjs','CustomRangeType','1ThehKj','requireSession','Plugin','_threadCommentModel','error','saveCommentToSnapshot','type','threadId','/reply','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','/edit','Reply','getCurrentUser','format','parentId','Solve','merge','UniverProCollaborationClient','stringify','IThreadCommentDataSourceService','post','parse','YYYY/MM/DD\x20HH:mm','Add','dataSource','map','rangeType','unitId','/delete','8iixrzV','root','UniverThreadCommentDataSourcePlugin','4170330zPNEqT','ref','pluginName','Delete','body','updateComment','userId','resolveComment','OpenOrReOpen','_init','rangeId','function','amd','delete','customRanges','filter','_threadCommentDataSource','personId','createTimestamp','content','replies','comments','UNRECOGNIZED','disposeWithMe','44759bjYBvT','_injector','HTTPService','getMemberID','replyId','_sessionService','length','UniverProLicense','commentUpdate$','UserManagerService','solved','3025454ctsmZS'];_0x22f4=function(){return _0x1d3983;};return _0x22f4();}function _0x2946(_0x573ffd,_0xca1819){_0x573ffd=_0x573ffd-0x9e;const _0x22f4cc=_0x22f4();let _0x29467e=_0x22f4cc[_0x573ffd];return _0x29467e;}(function(_0x245cb3,_0xf6e2a){const _0x3166ff=_0x2946,_0x3e5d5a=_0x245cb3();while(!![]){try{const _0x2d1075=parseInt(_0x3166ff(0xb8))/0x1*(-parseInt(_0x3166ff(0xfd))/0x2)+-parseInt(_0x3166ff(0x117))/0x3+-parseInt(_0x3166ff(0x119))/0x4+-parseInt(_0x3166ff(0x11c))/0x5*(parseInt(_0x3166ff(0xda))/0x6)+-parseInt(_0x3166ff(0xb4))/0x7+parseInt(_0x3166ff(0xd7))/0x8*(parseInt(_0x3166ff(0x105))/0x9)+parseInt(_0x3166ff(0x9e))/0xa*(parseInt(_0x3166ff(0xf2))/0xb);if(_0x2d1075===_0xf6e2a)break;else _0x3e5d5a['push'](_0x3e5d5a['shift']());}catch(_0x5730be){_0x3e5d5a['push'](_0x3e5d5a['shift']());}}}(_0x22f4,0xbd4b4),function(_0x10f796,_0x162c10){const _0x5af409=_0x2946;typeof exports=='object'&&typeof module<'u'?_0x162c10(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==_0x5af409(0xe5)&&define[_0x5af409(0xe6)]?define([_0x5af409(0x104),'@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0x5af409(0xa3),_0x5af409(0xb6),_0x5af409(0xa1)],_0x162c10):(_0x10f796=typeof globalThis<'u'?globalThis:_0x10f796||self,_0x162c10(_0x10f796['UniverProThreadCommentDatasource']={},_0x10f796[_0x5af409(0xcb)],_0x10f796[_0x5af409(0xf9)],_0x10f796['UniverCore'],_0x10f796[_0x5af409(0x11b)],_0x10f796[_0x5af409(0x107)],_0x10f796['rxjs'],_0x10f796['UniverNetwork']));}(this,function(_0x3d19a0,_0x323c91,_0x43588,_0x851170,_0x1daef5,_0x3b6309,_0x45bce8,_0x2629c9){'use strict';const _0x395cb0=_0x2946;const _0x44019f=_0x395cb0(0xc2);var _0x37e9b8=(_0x5e59a4=>(_0x5e59a4[_0x5e59a4['OpenOrReOpen']=0x0]=_0x395cb0(0xe2),_0x5e59a4[_0x5e59a4[_0x395cb0(0xb5)]=0x1]='Solved',_0x5e59a4[_0x5e59a4['UNRECOGNIZED']=-0x1]=_0x395cb0(0xf0),_0x5e59a4))(_0x37e9b8||{}),_0x20c545=(_0x3702dd=>(_0x3702dd[_0x3702dd['Unknown']=0x0]=_0x395cb0(0x106),_0x3702dd[_0x3702dd[_0x395cb0(0xd1)]=0x1]=_0x395cb0(0xd1),_0x3702dd[_0x3702dd[_0x395cb0(0xc5)]=0x2]=_0x395cb0(0xc5),_0x3702dd[_0x3702dd[_0x395cb0(0xae)]=0x3]='Edit',_0x3702dd[_0x3702dd[_0x395cb0(0xdd)]=0x4]=_0x395cb0(0xdd),_0x3702dd[_0x3702dd[_0x395cb0(0xc9)]=0x5]='Solve',_0x3702dd[_0x3702dd['UNRECOGNIZED']=-0x1]=_0x395cb0(0xf0),_0x3702dd))(_0x20c545||{});const _0x5e0d8f=_0x59be48=>_0x851170[_0x395cb0(0x100)](new Date(+_0x59be48))[_0x395cb0(0xc7)]('YYYY/MM/DD\x20HH:mm'),_0x2507bd=async(_0x251ee6,_0x3850bb)=>{const _0x3663c9=_0x395cb0,_0x8edbfb=_0x251ee6[_0x3663c9(0x103)](_0x851170['UserManagerService']),_0x50bb98=_0x251ee6[_0x3663c9(0x103)](_0x2629c9[_0x3663c9(0xf4)]);_0x3850bb[_0x3663c9(0x108)](_0x3c24ed=>{const _0x39cd4e=_0x3663c9;_0x8edbfb['getUser'](_0x3c24ed)&&_0x3850bb[_0x39cd4e(0xe7)](_0x3c24ed);}),_0x3850bb[_0x3663c9(0xac)]&&(await _0x50bb98['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3850bb]}}))['body'][_0x3663c9(0x102)][_0x3663c9(0x108)](_0x17efa6=>{const _0x453abd=_0x3663c9;_0x17efa6&&_0x8edbfb[_0x453abd(0xb0)](_0x17efa6);});};var _0x3b6d8e=Object[_0x395cb0(0xa7)],_0x569419=(_0x4892dc,_0x4068fb,_0x5a0a72,_0x40b98f)=>{const _0x57da7=_0x395cb0;for(var _0xad0646=_0x40b98f>0x1?void 0x0:_0x40b98f?_0x3b6d8e(_0x4068fb,_0x5a0a72):_0x4068fb,_0x4f7c24=_0x4892dc[_0x57da7(0xf8)]-0x1,_0xb94e18;_0x4f7c24>=0x0;_0x4f7c24--)(_0xb94e18=_0x4892dc[_0x4f7c24])&&(_0xad0646=_0xb94e18(_0xad0646)||_0xad0646);return _0xad0646;},_0x162d5d=(_0x567990,_0x353969)=>(_0x26a060,_0x5960f2)=>_0x353969(_0x26a060,_0x5960f2,_0x567990);let _0x3ecf5b=class extends _0x851170[_0x395cb0(0x116)]{constructor(_0x538608,_0xe543a,_0x53ceac,_0x19ee11){const _0x28de32=_0x395cb0;super(),this[_0x28de32(0xc1)]=_0x538608,this[_0x28de32(0xbb)]=_0xe543a,this[_0x28de32(0xa6)]=_0x53ceac,this['_injector']=_0x19ee11,this[_0x28de32(0xe3)](),this['_initUserSync']();}[_0x395cb0(0x113)](){const _0x1b8b5b=_0x395cb0;this[_0x1b8b5b(0xf1)](this['_threadCommentModel'][_0x1b8b5b(0xfa)][_0x1b8b5b(0xa5)](_0x45bce8['bufferTime'](0x10))[_0x1b8b5b(0xa4)](_0x246169=>{const _0x4ebcd0=_0x1b8b5b,_0x3448e8=new Set();_0x246169[_0x4ebcd0(0x108)](_0x3aa051=>{const _0x50f263=_0x4ebcd0;switch(_0x3aa051[_0x50f263(0xbe)]){case _0x50f263(0x101):{const _0x41b677=_0x3aa051[_0x50f263(0xa9)][_0x50f263(0xeb)];_0x3448e8[_0x50f263(0x101)](_0x41b677);break;}}}),_0x2507bd(this[_0x4ebcd0(0xf3)],_0x3448e8);}));}['_init'](){const _0x5d5b7a=_0x395cb0;this[_0x5d5b7a(0xf1)](this['_commentService'][_0x5d5b7a(0xfa)][_0x5d5b7a(0xa4)](async _0x105362=>{const _0x46d03f=_0x5d5b7a;var _0x2df702,_0x2802f3,_0x43f747,_0x17b230;const _0x27cffa=(_0x2df702=this['_threadCommentModel'][_0x46d03f(0xc3)](_0x105362[_0x46d03f(0xd5)])[_0x46d03f(0xa2)](_0x31a109=>_0x31a109[_0x46d03f(0xbf)]===_0x105362[_0x46d03f(0xbf)]))==null?void 0x0:_0x2df702[_0x46d03f(0xd8)];if(!_0x27cffa)return;const {unitId:_0x5c979d,subUnitId:_0x5c72ab}=_0x27cffa;switch(_0x105362[_0x46d03f(0x10f)]&&this[_0x46d03f(0xa6)][_0x46d03f(0xb0)](_0x105362[_0x46d03f(0x10f)]),_0x105362[_0x46d03f(0xbe)]){case _0x20c545[_0x46d03f(0xd1)]:break;case _0x20c545[_0x46d03f(0xc5)]:{this[_0x46d03f(0xbb)]['addComment'](_0x5c979d,_0x5c72ab,{'unitId':_0x5c979d,'subUnitId':_0x5c72ab,'ref':'','id':_0x105362[_0x46d03f(0xf6)],'dT':_0x5e0d8f(+_0x105362['createTimestamp']),'threadId':_0x105362[_0x46d03f(0xbf)],'personId':(_0x43f747=(_0x2802f3=_0x105362[_0x46d03f(0x10f)])==null?void 0x0:_0x2802f3[_0x46d03f(0x9f)])!=null?_0x43f747:_0x105362[_0x46d03f(0xe0)],'text':JSON['parse'](_0x105362['content']),'parentId':_0x27cffa['id']});break;}case _0x20c545[_0x46d03f(0xdd)]:{const _0x21bf0=this['_threadCommentModel'][_0x46d03f(0x118)](_0x5c979d,_0x5c72ab,_0x105362['replyId']);_0x21bf0&&_0x21bf0[_0x46d03f(0xc8)]&&this[_0x46d03f(0xbb)]['deleteComment'](_0x5c979d,_0x5c72ab,_0x105362['replyId']);break;}case _0x20c545[_0x46d03f(0xae)]:{this[_0x46d03f(0xbb)][_0x46d03f(0xdf)](_0x5c979d,_0x5c72ab,{'commentId':_0x105362[_0x46d03f(0xf6)],'text':JSON['parse'](_0x105362['content'])});break;}case _0x20c545[_0x46d03f(0xc9)]:{const _0x11522d=(_0x17b230=this[_0x46d03f(0xbb)]['getUnit'](_0x105362[_0x46d03f(0xd5)])['find'](_0x353f72=>_0x353f72[_0x46d03f(0xbf)]===_0x105362[_0x46d03f(0xbf)]))==null?void 0x0:_0x17b230[_0x46d03f(0xd8)];_0x11522d&&this['_threadCommentModel'][_0x46d03f(0xe1)](_0x5c979d,_0x5c72ab,_0x11522d['id'],_0x105362[_0x46d03f(0xfc)]===_0x37e9b8[_0x46d03f(0xb5)]);break;}}}));}};_0x3ecf5b=_0x569419([_0x162d5d(0x0,_0x851170[_0x395cb0(0xb1)](_0x323c91['CommentService'])),_0x162d5d(0x1,_0x851170['Inject'](_0x3b6309[_0x395cb0(0x10d)])),_0x162d5d(0x2,_0x851170[_0x395cb0(0xb1)](_0x851170[_0x395cb0(0xfb)])),_0x162d5d(0x3,_0x851170[_0x395cb0(0xb1)](_0x851170['Injector']))],_0x3ecf5b);const _0x318184=_0x395cb0(0x114),_0x5e5749={};var _0x306f61=Object['getOwnPropertyDescriptor'],_0x4eddf0=(_0x2723fb,_0x571ab0,_0x414b6d,_0x5dbdf9)=>{for(var _0x40acaf=_0x5dbdf9>0x1?void 0x0:_0x5dbdf9?_0x306f61(_0x571ab0,_0x414b6d):_0x571ab0,_0x5c7ad4=_0x2723fb['length']-0x1,_0x21bf3a;_0x5c7ad4>=0x0;_0x5c7ad4--)(_0x21bf3a=_0x2723fb[_0x5c7ad4])&&(_0x40acaf=_0x21bf3a(_0x40acaf)||_0x40acaf);return _0x40acaf;},_0x4513ae=(_0x3f862a,_0x2e5959)=>(_0x4322fb,_0x7a6573)=>_0x2e5959(_0x4322fb,_0x7a6573,_0x3f862a);function _0x2d615d(_0xe399ac,_0xe5ad38){const _0x8c7345=_0x395cb0,_0x2c516b=_0xe399ac[_0x8c7345(0xee)][0x0];return{..._0xe5ad38,'id':_0x2c516b['replyId'],'resolved':_0xe399ac[_0x8c7345(0xfc)]===0x1,'dT':_0x5e0d8f(_0x2c516b[_0x8c7345(0xec)]),'personId':_0x2c516b[_0x8c7345(0xe0)],'threadId':_0x2c516b['threadId']};}function _0x244604(_0x477cd7,_0x4ac8b1,_0x521b23){const _0x6a33ff=_0x395cb0;var _0x1d8ed5,_0x55c706;if(((_0x55c706=(_0x1d8ed5=_0x477cd7==null?void 0x0:_0x477cd7[_0x6a33ff(0xee)])==null?void 0x0:_0x1d8ed5[_0x6a33ff(0xf8)])!=null?_0x55c706:0x0)>0x0){const _0x1bd37e=(_0x1d9af5,_0xf34887)=>({'id':_0x1d9af5[_0x6a33ff(0xf6)],'threadId':_0x1d9af5[_0x6a33ff(0xbf)],'dT':_0x5e0d8f(_0x1d9af5[_0x6a33ff(0xec)]),'personId':_0x1d9af5['userId'],'resolved':_0x477cd7['solved']===_0x37e9b8['Solved'],'unitId':_0x4ac8b1,'subUnitId':_0x521b23,'text':JSON[_0x6a33ff(0xcf)](_0x1d9af5[_0x6a33ff(0xed)]),'parentId':_0xf34887}),_0x47119d=_0x1bd37e(_0x477cd7[_0x6a33ff(0xee)][0x0]);return{..._0x47119d,'children':_0x477cd7[_0x6a33ff(0xee)][_0x6a33ff(0xaa)](0x1)['map'](_0x4f0233=>_0x1bd37e(_0x4f0233,_0x47119d['id']))};}return null;}let _0x479b54=class{constructor(_0x42f12c,_0x28479f,_0x4d6327){const _0x17db6b=_0x395cb0;this[_0x17db6b(0xa8)]=_0x42f12c,this[_0x17db6b(0xa6)]=_0x28479f,this[_0x17db6b(0xf7)]=_0x4d6327;}async[_0x395cb0(0x109)](_0x1ab694){const _0x33dc6b=_0x395cb0;var _0x1b889e,_0x39ece9;const {parentId:_0x4ca085,unitId:_0x1f7cd4,text:_0x4b299e,threadId:_0x58cb93}=_0x1ab694,_0x2d28de=(_0x39ece9=(_0x1b889e=_0x4b299e[_0x33dc6b(0xe8)])==null?void 0x0:_0x1b889e['filter'](_0x1d24f0=>_0x1d24f0[_0x33dc6b(0xd4)]===_0x851170[_0x33dc6b(0xb7)]['COMMENT'])[_0x33dc6b(0xd3)](_0xd2c274=>_0xd2c274[_0x33dc6b(0xe4)]))!=null?_0x39ece9:[],_0x50b604=JSON[_0x33dc6b(0xcc)](_0x4b299e),_0x5363d4=(await this[_0x33dc6b(0xf7)]['requireSession'](_0x1f7cd4))[_0x33dc6b(0xf5)]();if(_0x4ca085){const _0x352985={'memberId':_0x5363d4,'unitId':_0x1f7cd4,'content':_0x50b604,'mention':_0x2d28de,'threadId':_0x58cb93},_0x1a0148=(await this[_0x33dc6b(0xa8)][_0x33dc6b(0xce)]('/universer-api/comment/unit/'+_0x1f7cd4+_0x33dc6b(0xc0),{'body':_0x352985}))[_0x33dc6b(0xde)]['reply'];return{..._0x1ab694,'id':_0x1a0148[_0x33dc6b(0xf6)],'dT':_0x851170[_0x33dc6b(0x100)](+_0x1a0148[_0x33dc6b(0xec)])['format'](_0x33dc6b(0xd0)),'personId':_0x1a0148[_0x33dc6b(0xe0)]};}else{const _0x16e62c={'memberId':_0x5363d4,'unitId':_0x1f7cd4,'content':_0x50b604,'mention':_0x2d28de},_0x280bad=await this[_0x33dc6b(0xa8)][_0x33dc6b(0xce)](_0x33dc6b(0xb3)+_0x1f7cd4+_0x33dc6b(0x10a),{'body':_0x16e62c});return _0x2d615d(_0x280bad[_0x33dc6b(0xde)]['comment'],_0x1ab694);}}async[_0x395cb0(0xdf)](_0x5e38f2){const _0x1bab11=_0x395cb0;var _0x922ebf,_0x714df9;const {text:_0x5a48a1,unitId:_0x3f77a0}=_0x5e38f2,_0x3f2e2a=(_0x714df9=(_0x922ebf=_0x5a48a1[_0x1bab11(0xe8)])==null?void 0x0:_0x922ebf[_0x1bab11(0xe9)](_0x13e217=>_0x13e217['rangeType']===_0x851170[_0x1bab11(0xb7)]['COMMENT'])[_0x1bab11(0xd3)](_0x1adaf7=>_0x1adaf7['rangeId']))!=null?_0x714df9:[],_0x48835d=JSON[_0x1bab11(0xcc)](_0x5a48a1),_0x20bf8c=_0x5e38f2[_0x1bab11(0xbf)],_0x542d45=_0x5e38f2['id'],_0x3a663e={'memberId':(await this[_0x1bab11(0xf7)][_0x1bab11(0xb9)](_0x3f77a0))[_0x1bab11(0xf5)](),'unitId':_0x3f77a0,'threadId':_0x20bf8c,'mention':_0x3f2e2a,'content':_0x48835d,'replyId':_0x542d45},_0xdc4747=await this[_0x1bab11(0xa8)][_0x1bab11(0xce)]('/universer-api/comment/unit/'+_0x3f77a0+_0x1bab11(0xc4),{'body':_0x3a663e});return!_0xdc4747[_0x1bab11(0xde)][_0x1bab11(0xbc)]||_0xdc4747[_0x1bab11(0xde)][_0x1bab11(0xbc)]['code']===0x1;}async[_0x395cb0(0xe1)](_0x5d2f21){const _0x208513=_0x395cb0,{unitId:_0x4b698f}=_0x5d2f21,_0x4b83f6=_0x5d2f21[_0x208513(0xbf)],_0x1dfced={'memberId':this[_0x208513(0xa6)][_0x208513(0xc6)]()[_0x208513(0x9f)],'unitId':_0x4b698f,'threadId':_0x4b83f6,'solved':_0x5d2f21['resolved']?_0x37e9b8['Solved']:_0x37e9b8[_0x208513(0xe2)]},_0x217fea=await this[_0x208513(0xa8)][_0x208513(0xce)](_0x208513(0xb3)+_0x4b698f+_0x208513(0xb2),{'body':_0x1dfced});return!_0x217fea[_0x208513(0xde)][_0x208513(0xbc)]||_0x217fea['body'][_0x208513(0xbc)][_0x208513(0x10b)]===0x1;}async['deleteComment'](_0x4c18fd,_0x2490e7,_0x1ab53f,_0x2212bc){const _0x55751a=_0x395cb0,_0x232e0e={'memberId':(await this['_sessionService'][_0x55751a(0xb9)](_0x4c18fd))[_0x55751a(0xf5)](),'threadId':_0x1ab53f,'replyId':_0x2212bc,'unitId':_0x4c18fd},_0x2ece6f=await this[_0x55751a(0xa8)][_0x55751a(0xce)](_0x55751a(0xb3)+_0x4c18fd+_0x55751a(0xd6),{'body':_0x232e0e});return!_0x2ece6f['body']['error']||_0x2ece6f['body']['error'][_0x55751a(0x10b)]===0x1;}async['listComments'](_0x42b5f8,_0x45b4ff,_0x17dc24){const _0x55bf5f=_0x395cb0,_0x4b3867={'unitId':_0x42b5f8,'threadId':_0x17dc24},_0x351a8b=await this[_0x55bf5f(0xa8)][_0x55bf5f(0xce)](_0x55bf5f(0xb3)+_0x42b5f8+'/list',{'body':_0x4b3867}),_0x449fd3=_0x17dc24['map'](_0x265bd0=>_0x244604(_0x351a8b[_0x55bf5f(0xde)][_0x55bf5f(0xef)][_0x265bd0],_0x42b5f8,_0x45b4ff))[_0x55bf5f(0xe9)](Boolean);return Object[_0x55bf5f(0x115)](_0x351a8b[_0x55bf5f(0xde)][_0x55bf5f(0x102)])[_0x55bf5f(0x108)](_0x59c5d1=>{const _0xda1a92=_0x55bf5f;this[_0xda1a92(0xa6)][_0xda1a92(0xb0)](_0x59c5d1);}),_0x449fd3;}[_0x395cb0(0xbd)](_0x9ba281){const _0x4adb78=_0x395cb0;return{'id':_0x9ba281['id'],'threadId':_0x9ba281[_0x4adb78(0xbf)],'ref':_0x9ba281[_0x4adb78(0xdb)]};}};_0x479b54=_0x4eddf0([_0x4513ae(0x0,_0x851170[_0x395cb0(0xb1)](_0x2629c9[_0x395cb0(0xf4)])),_0x4513ae(0x1,_0x851170['Inject'](_0x851170[_0x395cb0(0xfb)])),_0x4513ae(0x2,_0x851170[_0x395cb0(0xb1)](_0x323c91['CollaborationSessionService']))],_0x479b54);var _0x508a90=Object[_0x395cb0(0xa7)],_0x570dd8=(_0x1a410d,_0x1aba50,_0xd7d79f,_0x4eddc4)=>{for(var _0xfe983c=_0x4eddc4>0x1?void 0x0:_0x4eddc4?_0x508a90(_0x1aba50,_0xd7d79f):_0x1aba50,_0x51ba26=_0x1a410d['length']-0x1,_0x54e498;_0x51ba26>=0x0;_0x51ba26--)(_0x54e498=_0x1a410d[_0x51ba26])&&(_0xfe983c=_0x54e498(_0xfe983c)||_0xfe983c);return _0xfe983c;},_0x99d86c=(_0x35f1e3,_0x2e01a2)=>(_0x911f46,_0x1a1577)=>_0x2e01a2(_0x911f46,_0x1a1577,_0x35f1e3);let _0xf85777=class extends _0x851170[_0x395cb0(0x116)]{constructor(_0x47f8cd,_0x552627){const _0x12d275=_0x395cb0;super(),this[_0x12d275(0xa0)]=_0x47f8cd,this[_0x12d275(0xea)]=_0x552627,this['_initDataSource']();}['_initDataSource'](){const _0xc7a85d=_0x395cb0;this[_0xc7a85d(0xa0)][_0xc7a85d(0xd2)]=this['_threadCommentDataSource'],this[_0xc7a85d(0xa0)][_0xc7a85d(0x111)]=!0x1;}};_0xf85777=_0x570dd8([_0x99d86c(0x0,_0x3b6309[_0x395cb0(0xcd)]),_0x99d86c(0x1,_0x851170['Inject'](_0x479b54))],_0xf85777);var _0x1dc6cc=Object[_0x395cb0(0xfe)],_0x39bea6=Object['getOwnPropertyDescriptor'],_0x2bc154=(_0x361b33,_0x2647b3,_0x8ed16f)=>_0x2647b3 in _0x361b33?_0x1dc6cc(_0x361b33,_0x2647b3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8ed16f}):_0x361b33[_0x2647b3]=_0x8ed16f,_0x43c345=(_0xf9856b,_0x55a25b,_0x2315ac,_0x2c4df2)=>{const _0x8e9cd0=_0x395cb0;for(var _0x1f10c0=_0x2c4df2>0x1?void 0x0:_0x2c4df2?_0x39bea6(_0x55a25b,_0x2315ac):_0x55a25b,_0xcd379c=_0xf9856b[_0x8e9cd0(0xf8)]-0x1,_0xf6bcbf;_0xcd379c>=0x0;_0xcd379c--)(_0xf6bcbf=_0xf9856b[_0xcd379c])&&(_0x1f10c0=_0xf6bcbf(_0x1f10c0)||_0x1f10c0);return _0x1f10c0;},_0x28296a=(_0x6ad3a4,_0x12cd0b)=>(_0x4a72e2,_0x3181ee)=>_0x12cd0b(_0x4a72e2,_0x3181ee,_0x6ad3a4),_0x757c88=(_0x1747f7,_0x3a4811,_0x1c60ec)=>_0x2bc154(_0x1747f7,typeof _0x3a4811!='symbol'?_0x3a4811+'':_0x3a4811,_0x1c60ec);_0x3d19a0[_0x395cb0(0xd9)]=class extends _0x851170[_0x395cb0(0xba)]{constructor(_0x5472ad=_0x5e5749,_0x1c5f61,_0x18696d){const _0x505bb6=_0x395cb0;super(),this[_0x505bb6(0xab)]=_0x5472ad,this[_0x505bb6(0xf3)]=_0x1c5f61,this[_0x505bb6(0xaf)]=_0x18696d;const {..._0x1a65b3}=_0x851170[_0x505bb6(0xca)]({},_0x5e5749,this['_config']);this[_0x505bb6(0xaf)]['setConfig'](_0x318184,_0x1a65b3);}[_0x395cb0(0xad)](){const _0x2bf940=_0x395cb0;[[_0x479b54],[_0xf85777],[_0x3ecf5b]][_0x2bf940(0x108)](_0x517e94=>{const _0x2e15e4=_0x2bf940;this['_injector'][_0x2e15e4(0x101)](_0x517e94);});}[_0x395cb0(0x10e)](){const _0x102c59=_0x395cb0;this[_0x102c59(0xf3)]['get'](_0xf85777),this[_0x102c59(0xf3)][_0x102c59(0x103)](_0x3ecf5b);}},_0x757c88(_0x3d19a0['UniverThreadCommentDataSourcePlugin'],_0x395cb0(0xdc),_0x44019f),_0x757c88(_0x3d19a0[_0x395cb0(0xd9)],'type',_0x851170[_0x395cb0(0x110)]['UNIVER_UNKNOWN']),_0x3d19a0['UniverThreadCommentDataSourcePlugin']=_0x43c345([_0x851170[_0x395cb0(0x10c)](_0x1daef5['UniverThreadCommentUIPlugin'],_0x323c91[_0x395cb0(0x112)],_0x43588['UniverLicensePlugin']),_0x28296a(0x1,_0x851170[_0x395cb0(0xb1)](_0x851170[_0x395cb0(0x11a)])),_0x28296a(0x2,_0x851170['IConfigService'])],_0x3d19a0['UniverThreadCommentDataSourcePlugin']),Object[_0x395cb0(0xfe)](_0x3d19a0,Symbol['toStringTag'],{'value':_0x395cb0(0xff)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.3-nightly.202512060617",
3
+ "version": "0.12.4-experimental.20251208-c4b8a44",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.12.3-nightly.202512060617",
49
- "@univerjs-pro/license": "0.12.3-nightly.202512060617",
50
- "@univerjs/core": "0.12.3-nightly.202512060617",
51
- "@univerjs/network": "0.12.3-nightly.202512060617",
48
+ "@univerjs-pro/collaboration-client": "0.12.4-experimental.20251208-c4b8a44",
49
+ "@univerjs-pro/license": "0.12.4-experimental.20251208-c4b8a44",
50
+ "@univerjs/core": "0.12.4-experimental.20251208-c4b8a44",
51
+ "@univerjs/network": "0.12.4-experimental.20251208-c4b8a44",
52
52
  "@univerjs/protocol": "0.1.47",
53
- "@univerjs/thread-comment-ui": "0.12.3-nightly.202512060617",
54
- "@univerjs/thread-comment": "0.12.3-nightly.202512060617"
53
+ "@univerjs/thread-comment": "0.12.4-experimental.20251208-c4b8a44",
54
+ "@univerjs/thread-comment-ui": "0.12.4-experimental.20251208-c4b8a44"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.2.6",
60
60
  "vitest": "^4.0.15",
61
- "@univerjs-infra/shared": "0.12.3"
61
+ "@univerjs-infra/shared": "0.12.4"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",