@univerjs-pro/thread-comment-datasource 0.2.14 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +13 -13
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x378286=_0x2bea;(function(_0x47ddc0,_0x11acab){const _0x376ce2=_0x2bea,_0xa21241=_0x47ddc0();while(!![]){try{const _0x4c300b=parseInt(_0x376ce2(0x143))/0x1+-parseInt(_0x376ce2(0x122))/0x2*(parseInt(_0x376ce2(0x119))/0x3)+parseInt(_0x376ce2(0x16a))/0x4*(-parseInt(_0x376ce2(0x100))/0x5)+-parseInt(_0x376ce2(0x15d))/0x6*(-parseInt(_0x376ce2(0x130))/0x7)+-parseInt(_0x376ce2(0x140))/0x8*(parseInt(_0x376ce2(0x103))/0x9)+parseInt(_0x376ce2(0x116))/0xa*(-parseInt(_0x376ce2(0xe7))/0xb)+parseInt(_0x376ce2(0x114))/0xc;if(_0x4c300b===_0x11acab)break;else _0xa21241['push'](_0xa21241['shift']());}catch(_0x284b63){_0xa21241['push'](_0xa21241['shift']());}}}(_0x4418,0x3c428));Object[_0x378286(0xe9)](exports,Symbol[_0x378286(0x15f)],{'value':_0x378286(0xe5)});const c=require('@univerjs/core'),g=require('@univerjs/thread-comment'),N=require(_0x378286(0x146)),y=require('@univerjs-pro/collaboration-client'),O=require(_0x378286(0x131)),$=require(_0x378286(0x14c)),E=require(_0x378286(0x166)),q=_0x378286(0x13a);var p=(_0x146de7=>(_0x146de7[_0x146de7[_0x378286(0xe3)]=0x0]=_0x378286(0xe3),_0x146de7[_0x146de7['Solved']=0x1]='Solved',_0x146de7[_0x146de7[_0x378286(0x129)]=-0x1]=_0x378286(0x129),_0x146de7))(p||{}),v=(_0x39244b=>(_0x39244b[_0x39244b['Unknown']=0x0]=_0x378286(0x164),_0x39244b[_0x39244b[_0x378286(0x15a)]=0x1]='Add',_0x39244b[_0x39244b[_0x378286(0xf0)]=0x2]=_0x378286(0xf0),_0x39244b[_0x39244b[_0x378286(0x108)]=0x3]=_0x378286(0x108),_0x39244b[_0x39244b[_0x378286(0x172)]=0x4]=_0x378286(0x172),_0x39244b[_0x39244b[_0x378286(0x111)]=0x5]=_0x378286(0x111),_0x39244b[_0x39244b['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x39244b))(v||{});const P=_0x99c4fb=>$(new Date(+_0x99c4fb))[_0x378286(0x102)](_0x378286(0x127)),x=async(_0x4dc16f,_0x5cc994)=>{const _0x368388=_0x378286,_0x534de4=_0x4dc16f['get'](c[_0x368388(0x16e)]),_0x3f93a3=_0x4dc16f[_0x368388(0x163)](O[_0x368388(0x155)]);_0x5cc994['forEach'](_0x3e9cdf=>{const _0x1e565a=_0x368388;_0x534de4[_0x1e565a(0x14a)](_0x3e9cdf)&&_0x5cc994[_0x1e565a(0x11f)](_0x3e9cdf);}),_0x5cc994['size']&&(await _0x3f93a3['get'](_0x368388(0x148),{'params':{'userIDs':[..._0x5cc994]}}))['body'][_0x368388(0x107)][_0x368388(0x156)](_0x951b7b=>{_0x951b7b&&_0x534de4['addUser'](_0x951b7b);});};var Y=Object[_0x378286(0xe9)],G=Object[_0x378286(0x10d)],H=(_0xb5f0a8,_0x59a4f1,_0x21d67c,_0x1ae5e2)=>{const _0x480fe6=_0x378286;for(var _0x3d362b=_0x1ae5e2>0x1?void 0x0:_0x1ae5e2?G(_0x59a4f1,_0x21d67c):_0x59a4f1,_0x3e720d=_0xb5f0a8[_0x480fe6(0x128)]-0x1,_0x53e672;_0x3e720d>=0x0;_0x3e720d--)(_0x53e672=_0xb5f0a8[_0x3e720d])&&(_0x3d362b=(_0x1ae5e2?_0x53e672(_0x59a4f1,_0x21d67c,_0x3d362b):_0x53e672(_0x3d362b))||_0x3d362b);return _0x1ae5e2&&_0x3d362b&&Y(_0x59a4f1,_0x21d67c,_0x3d362b),_0x3d362b;},I=(_0x221978,_0xfeb3ca)=>(_0x2ac327,_0x5a8bc8)=>_0xfeb3ca(_0x2ac327,_0x5a8bc8,_0x221978);function L(_0x5a3047,_0x13f746){const _0xfd8312=_0x378286,_0x2062ec=_0x5a3047[_0xfd8312(0x14b)][0x0];return{..._0x13f746,'id':_0x2062ec[_0xfd8312(0x171)],'resolved':_0x5a3047['solved']===0x1,'dT':P(_0x2062ec[_0xfd8312(0x13d)]),'personId':_0x2062ec[_0xfd8312(0xec)],'threadId':_0x2062ec['threadId']};}function _0x2bea(_0x175473,_0x2ff164){const _0x4418a0=_0x4418();return _0x2bea=function(_0x2beaf8,_0x1c08f6){_0x2beaf8=_0x2beaf8-0xe0;let _0x140500=_0x4418a0[_0x2beaf8];return _0x140500;},_0x2bea(_0x175473,_0x2ff164);}function A(_0x5af2e3,_0x28f42f,_0x6c8752){const _0xefae03=_0x378286;var _0x1b6e4b,_0x3873d9;if(((_0x3873d9=(_0x1b6e4b=_0x5af2e3==null?void 0x0:_0x5af2e3['replies'])==null?void 0x0:_0x1b6e4b['length'])!=null?_0x3873d9:0x0)>0x0){const _0x9df778=(_0x7ef1f0,_0x455940)=>({'id':_0x7ef1f0[_0xefae03(0x171)],'threadId':_0x7ef1f0[_0xefae03(0x14d)],'dT':P(_0x7ef1f0[_0xefae03(0x13d)]),'personId':_0x7ef1f0[_0xefae03(0xec)],'resolved':_0x5af2e3[_0xefae03(0x154)]===p['Solved'],'unitId':_0x28f42f,'subUnitId':_0x6c8752,'text':JSON[_0xefae03(0xf6)](_0x7ef1f0[_0xefae03(0xf5)]),'parentId':_0x455940}),_0x26c90e=_0x9df778(_0x5af2e3[_0xefae03(0x14b)][0x0]);return{..._0x26c90e,'children':_0x5af2e3['replies'][_0xefae03(0x11b)](0x1)['map'](_0x175817=>_0x9df778(_0x175817,_0x26c90e['id']))};}return null;}let C=class{constructor(_0x5144ac,_0x459cc2,_0x1d8233,_0xba6a75){const _0x35c7a0=_0x378286;this[_0x35c7a0(0x167)]=_0x5144ac,this['_userService']=_0x459cc2,this[_0x35c7a0(0x169)]=_0x1d8233,this[_0x35c7a0(0x16f)]=_0xba6a75;}async[_0x378286(0x12f)](_0x8234b3){const _0x13fe25=_0x378286;var _0x16b09b,_0x1b5069;const {parentId:_0x7cf2be,unitId:_0x32e7db,text:_0x483e84,threadId:_0x48cef7}=_0x8234b3,_0x2a33de=(_0x1b5069=(_0x16b09b=_0x483e84[_0x13fe25(0x10b)])==null?void 0x0:_0x16b09b[_0x13fe25(0xe4)](_0x4f874c=>_0x4f874c[_0x13fe25(0x123)]===c[_0x13fe25(0x11d)][_0x13fe25(0xf2)])['map'](_0x13ca55=>_0x13ca55[_0x13fe25(0x10c)]))!=null?_0x1b5069:[],_0x3c7f88=JSON[_0x13fe25(0x13c)](_0x483e84),_0x302a90=(await this['_sessionService'][_0x13fe25(0xfc)](_0x32e7db))['getMemberID']();if(_0x7cf2be){const _0x542b4d={'memberId':_0x302a90,'unitId':_0x32e7db,'content':_0x3c7f88,'mention':_0x2a33de,'threadId':_0x48cef7},_0x2be394=(await this[_0x13fe25(0x167)][_0x13fe25(0x152)](_0x13fe25(0x137)+_0x32e7db+_0x13fe25(0x112),{'body':_0x542b4d}))[_0x13fe25(0xe0)][_0x13fe25(0x161)];return{..._0x8234b3,'id':_0x2be394[_0x13fe25(0x171)],'dT':$(+_0x2be394[_0x13fe25(0x13d)])[_0x13fe25(0x102)](_0x13fe25(0x127)),'personId':_0x2be394[_0x13fe25(0xec)]};}else{const _0xcca8e5={'memberId':_0x302a90,'unitId':_0x32e7db,'content':_0x3c7f88,'mention':_0x2a33de},_0x2024fa=await this[_0x13fe25(0x167)][_0x13fe25(0x152)]('/universer-api/comment/unit/'+_0x32e7db+_0x13fe25(0x151),{'body':_0xcca8e5});return L(_0x2024fa[_0x13fe25(0xe0)][_0x13fe25(0xf9)],_0x8234b3);}}async['updateComment'](_0x265f49){const _0x39ff13=_0x378286;var _0x4ca9bd,_0xb6e8d7;const {text:_0x5b6f55,unitId:_0x4064e5}=_0x265f49,_0x4d6f89=(_0xb6e8d7=(_0x4ca9bd=_0x5b6f55[_0x39ff13(0x10b)])==null?void 0x0:_0x4ca9bd['filter'](_0x80c15a=>_0x80c15a[_0x39ff13(0x123)]===c[_0x39ff13(0x11d)]['COMMENT'])[_0x39ff13(0xea)](_0xa75cd8=>_0xa75cd8[_0x39ff13(0x10c)]))!=null?_0xb6e8d7:[],_0x2d477a=JSON[_0x39ff13(0x13c)](_0x5b6f55),_0x13be84=_0x265f49['threadId'],_0x5d9cb1=_0x265f49['id'],_0x19dc23={'memberId':(await this[_0x39ff13(0x169)][_0x39ff13(0xfc)](_0x4064e5))[_0x39ff13(0xe8)](),'unitId':_0x4064e5,'threadId':_0x13be84,'mention':_0x4d6f89,'content':_0x2d477a,'replyId':_0x5d9cb1},_0x17e9d8=await this[_0x39ff13(0x167)][_0x39ff13(0x152)](_0x39ff13(0x137)+_0x4064e5+_0x39ff13(0x153),{'body':_0x19dc23});return!_0x17e9d8['body'][_0x39ff13(0x170)]||_0x17e9d8['body'][_0x39ff13(0x170)][_0x39ff13(0x12e)]===0x1;}async[_0x378286(0x13b)](_0x5e0050){const _0x296756=_0x378286,{unitId:_0x2499cd}=_0x5e0050,_0x17039b=_0x5e0050[_0x296756(0x14d)],_0x4f4d94={'memberId':this['_userService'][_0x296756(0x120)]()['userID'],'unitId':_0x2499cd,'threadId':_0x17039b,'solved':_0x5e0050[_0x296756(0xef)]?p[_0x296756(0x101)]:p[_0x296756(0xe3)]},_0x16f352=await this[_0x296756(0x167)][_0x296756(0x152)](_0x296756(0x137)+_0x2499cd+_0x296756(0x158),{'body':_0x4f4d94});return!_0x16f352[_0x296756(0xe0)][_0x296756(0x170)]||_0x16f352[_0x296756(0xe0)]['error'][_0x296756(0x12e)]===0x1;}async[_0x378286(0x150)](_0xaacfa5,_0x2e83ed,_0x3fe96b,_0x44fa93){const _0x353888=_0x378286,_0x2544af={'memberId':(await this[_0x353888(0x169)]['requireSession'](_0xaacfa5))[_0x353888(0xe8)](),'threadId':_0x3fe96b,'replyId':_0x44fa93,'unitId':_0xaacfa5},_0x3b3f56=await this[_0x353888(0x167)][_0x353888(0x152)](_0x353888(0x137)+_0xaacfa5+_0x353888(0x16c),{'body':_0x2544af});return!_0x3b3f56['body']['error']||_0x3b3f56['body'][_0x353888(0x170)]['code']===0x1;}async['listComments'](_0x37a6cc,_0x5c9d56,_0x3a7c5f){const _0x5db9d0=_0x378286,_0x1dcd73={'unitId':_0x37a6cc,'threadId':_0x3a7c5f},_0x2b3a12=await this[_0x5db9d0(0x167)][_0x5db9d0(0x152)](_0x5db9d0(0x137)+_0x37a6cc+_0x5db9d0(0x162),{'body':_0x1dcd73}),_0x32f4d2=_0x3a7c5f[_0x5db9d0(0xea)](_0x19bb9e=>A(_0x2b3a12[_0x5db9d0(0xe0)]['comments'][_0x19bb9e],_0x37a6cc,_0x5c9d56))['filter'](Boolean);return Object['values'](_0x2b3a12['body'][_0x5db9d0(0x107)])[_0x5db9d0(0x156)](_0x32c00b=>{const _0x5c5ee6=_0x5db9d0;this[_0x5c5ee6(0x115)][_0x5c5ee6(0x13f)](_0x32c00b);}),_0x32f4d2;}[_0x378286(0x106)](_0xff9b1a){const _0x1be821=_0x378286;return{'id':_0xff9b1a['id'],'threadId':_0xff9b1a['threadId'],'ref':_0xff9b1a[_0x1be821(0x12a)]};}};C=H([I(0x0,c[_0x378286(0x147)](O[_0x378286(0x155)])),I(0x1,c[_0x378286(0x147)](c[_0x378286(0x16e)])),I(0x2,c[_0x378286(0x147)](y['CollaborationSessionService'])),I(0x3,c['Inject'](c['Injector']))],C);var J=Object['defineProperty'],F=Object[_0x378286(0x10d)],Z=(_0x456d8d,_0x47177c,_0x3b5787,_0x469c4b)=>{for(var _0x1795f3=_0x469c4b>0x1?void 0x0:_0x469c4b?F(_0x47177c,_0x3b5787):_0x47177c,_0x50ad7a=_0x456d8d['length']-0x1,_0x269ffb;_0x50ad7a>=0x0;_0x50ad7a--)(_0x269ffb=_0x456d8d[_0x50ad7a])&&(_0x1795f3=(_0x469c4b?_0x269ffb(_0x47177c,_0x3b5787,_0x1795f3):_0x269ffb(_0x1795f3))||_0x1795f3);return _0x469c4b&&_0x1795f3&&J(_0x47177c,_0x3b5787,_0x1795f3),_0x1795f3;},W=(_0x2f7e51,_0x310b5c)=>(_0x44519,_0x3d13eb)=>_0x310b5c(_0x44519,_0x3d13eb,_0x2f7e51);function _0x4418(){const _0x5dc4ae=['/universer-api/user/list','_initUserSync','getUser','replies','dayjs','threadId','getThread','UniverThreadCommentDataSourcePlugin','deleteComment','/add','post','/edit','solved','HTTPService','forEach','syncUpdateMutationToColla','/solved','ThreadCommentModel','Add','_config','avatar','579732iIkYnh','_threadCommentDataSource','toStringTag','href','reply','/list','get','Unknown','Plugin','rxjs','_httpService','_threadCommentMentionDataSource','_sessionService','68LUnfmC','add','/delete','userID','UserManagerService','_injector','error','replyId','Delete','body','IConfigService','_init','OpenOrReOpen','filter','Module','_initDataSource','715vQcpfb','getMemberID','defineProperty','map','updateComment','userId','UniverCollaborationClientPlugin','user','resolved','Reply','symbol','COMMENT','Injector','DependentOn','content','parse','bufferTime','Disposable','comment','Ready','://','requireSession','UNIVER_UNKNOWN','getMentions','OnLifecycle','82295flzTFN','Solved','format','293805fXtXWh','UniverInstanceType','type','saveCommentToSnapshot','users','Edit','CommentService','disposeWithMe','customRanges','rangeId','getOwnPropertyDescriptor','subject','subscribe','_threadCommentModel','Solve','/reply','unit','4959852GXnLlR','_userService','13970bfGKKo','LifecycleStages','thread-comment-data-source.config','174684COcrNf','setConfig','slice','UniverThreadCommentUIPlugin','CustomRangeType','protocol','delete','getCurrentUser','_commentService','2EQPrQR','rangeType','searchParams','Starting','commentUpdate$','YYYY/MM/DD\x20HH:mm','length','UNRECOGNIZED','ref','https','IThreadCommentDataSourceService','unitId','code','addComment','21BfAIyd','@univerjs/network','UniverThreadCommentPlugin','collaborators','pluginName','IThreadCommentMentionDataService','host','/universer-api/comment/unit/','_threadCommentMentionDataService','http','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolveComment','stringify','createTimestamp','name','addUser','104yNNpBq','_threadCommentDataSourceService','personId','396858CUjCBP','_configService','/universer-api/authz/collaborator','@univerjs/thread-comment-ui','Inject'];_0x4418=function(){return _0x5dc4ae;};return _0x4418();}let D=class{constructor(_0x34313e){const _0x132d04=_0x378286;this[_0x132d04(0x167)]=_0x34313e;}async[_0x378286(0xfe)](_0x171921,_0x31dd58,_0x37814d){const _0x4cee70=_0x378286,_0x4c7605=new URL(window['location'][_0x4cee70(0x160)])[_0x4cee70(0x124)][_0x4cee70(0x163)](_0x4cee70(0x113));if(!_0x4c7605)return[];const _0x18118a=window['location'][_0x4cee70(0x136)],_0x5b2979=window['location'][_0x4cee70(0x11e)]==='https:'?_0x4cee70(0x12b):_0x4cee70(0x139);return(await this[_0x4cee70(0x167)][_0x4cee70(0x163)](_0x5b2979+_0x4cee70(0xfb)+_0x18118a+_0x4cee70(0x145),{'params':{'objectID':_0x4c7605,'unitID':_0x4c7605}}))[_0x4cee70(0xe0)][_0x4cee70(0x133)][_0x4cee70(0xea)](_0x734edb=>{const _0x15767a=_0x4cee70;var _0x272712,_0x3eb780,_0x15117b,_0x25a393,_0x1b57e8,_0x26cea5;return{'id':(_0x3eb780=(_0x272712=_0x734edb[_0x15767a(0x10e)])==null?void 0x0:_0x272712[_0x15767a(0x16d)])!=null?_0x3eb780:'','label':(_0x25a393=(_0x15117b=_0x734edb[_0x15767a(0x10e)])==null?void 0x0:_0x15117b[_0x15767a(0x13e)])!=null?_0x25a393:'','icon':(_0x26cea5=(_0x1b57e8=_0x734edb['subject'])==null?void 0x0:_0x1b57e8[_0x15767a(0x15c)])!=null?_0x26cea5:'','type':_0x15767a(0xee)};});}};D=Z([W(0x0,c['Inject'](O[_0x378286(0x155)]))],D);var z=Object['defineProperty'],B=Object[_0x378286(0x10d)],K=(_0x52901e,_0x3e338e,_0x3f3cfb,_0x192295)=>{const _0x40e2c2=_0x378286;for(var _0x58a8a4=_0x192295>0x1?void 0x0:_0x192295?B(_0x3e338e,_0x3f3cfb):_0x3e338e,_0x591850=_0x52901e[_0x40e2c2(0x128)]-0x1,_0x433f79;_0x591850>=0x0;_0x591850--)(_0x433f79=_0x52901e[_0x591850])&&(_0x58a8a4=(_0x192295?_0x433f79(_0x3e338e,_0x3f3cfb,_0x58a8a4):_0x433f79(_0x58a8a4))||_0x58a8a4);return _0x192295&&_0x58a8a4&&z(_0x3e338e,_0x3f3cfb,_0x58a8a4),_0x58a8a4;},S=(_0x5c500e,_0x35d4df)=>(_0x2c98ee,_0x3719a3)=>_0x35d4df(_0x2c98ee,_0x3719a3,_0x5c500e);let f=class extends c[_0x378286(0xf8)]{constructor(_0x3f52db,_0x33b088,_0x349cf9,_0x50c71c){const _0x236ad6=_0x378286;super(),this['_threadCommentDataSourceService']=_0x3f52db,this[_0x236ad6(0x15e)]=_0x33b088,this[_0x236ad6(0x138)]=_0x349cf9,this[_0x236ad6(0x168)]=_0x50c71c,this[_0x236ad6(0xe6)]();}[_0x378286(0xe6)](){const _0x432b79=_0x378286;this[_0x432b79(0x141)]['dataSource']=this[_0x432b79(0x15e)],this['_threadCommentDataSourceService'][_0x432b79(0x157)]=!0x1,this[_0x432b79(0x138)]['dataSource']=this[_0x432b79(0x168)];}};f=K([c[_0x378286(0xff)](c['LifecycleStages'][_0x378286(0x125)],f),S(0x0,g[_0x378286(0x12c)]),S(0x1,c[_0x378286(0x147)](C)),S(0x2,N[_0x378286(0x135)]),S(0x3,c[_0x378286(0x147)](D))],f);var V=Object[_0x378286(0xe9)],Q=Object[_0x378286(0x10d)],X=(_0x555ff0,_0x31e61a,_0x3f6c01,_0x44e979)=>{const _0x333f8f=_0x378286;for(var _0x58ddcb=_0x44e979>0x1?void 0x0:_0x44e979?Q(_0x31e61a,_0x3f6c01):_0x31e61a,_0x226f74=_0x555ff0[_0x333f8f(0x128)]-0x1,_0x15befd;_0x226f74>=0x0;_0x226f74--)(_0x15befd=_0x555ff0[_0x226f74])&&(_0x58ddcb=(_0x44e979?_0x15befd(_0x31e61a,_0x3f6c01,_0x58ddcb):_0x15befd(_0x58ddcb))||_0x58ddcb);return _0x44e979&&_0x58ddcb&&V(_0x31e61a,_0x3f6c01,_0x58ddcb),_0x58ddcb;},_=(_0x4612bf,_0xca1ff1)=>(_0xe2e6ce,_0x10409b)=>_0xca1ff1(_0xe2e6ce,_0x10409b,_0x4612bf);let b=class extends c[_0x378286(0xf8)]{constructor(_0x59df95,_0x372c99,_0x2dba9b,_0xed38a3){const _0x1ef92e=_0x378286;super(),this['_commentService']=_0x59df95,this[_0x1ef92e(0x110)]=_0x372c99,this[_0x1ef92e(0x115)]=_0x2dba9b,this[_0x1ef92e(0x16f)]=_0xed38a3,this[_0x1ef92e(0xe2)](),this['_initUserSync']();}[_0x378286(0x149)](){const _0x3bfed5=_0x378286;this['disposeWithMe'](this[_0x3bfed5(0x110)]['commentUpdate$']['pipe'](E[_0x3bfed5(0xf7)](0x10))[_0x3bfed5(0x10f)](_0x59a912=>{const _0x12861e=_0x3bfed5,_0x3bfd5c=new Set();_0x59a912[_0x12861e(0x156)](_0x154df3=>{const _0x50160f=_0x12861e;switch(_0x154df3[_0x50160f(0x105)]){case _0x50160f(0x16b):{const _0x44d847=_0x154df3['payload'][_0x50160f(0x142)];_0x3bfd5c[_0x50160f(0x16b)](_0x44d847);break;}}}),x(this[_0x12861e(0x16f)],_0x3bfd5c);}));}[_0x378286(0xe2)](){const _0x335207=_0x378286;this[_0x335207(0x10a)](this[_0x335207(0x121)][_0x335207(0x126)]['subscribe'](async _0x1a2479=>{const _0x21db72=_0x335207;var _0x260bcd,_0x490fe1;const _0x3eb158=this[_0x21db72(0x110)][_0x21db72(0x14e)](_0x1a2479[_0x21db72(0x12d)],_0x1a2479[_0x21db72(0x14d)]);if(!_0x3eb158)return;const {unitId:_0x1aedfb,subUnitId:_0x4e5f2b}=_0x3eb158;switch(_0x1a2479['user']&&this['_userService'][_0x21db72(0x13f)](_0x1a2479[_0x21db72(0xee)]),_0x1a2479[_0x21db72(0x105)]){case v[_0x21db72(0x15a)]:break;case v[_0x21db72(0xf0)]:{this['_threadCommentModel'][_0x21db72(0x12f)](_0x1aedfb,_0x4e5f2b,{'unitId':_0x1aedfb,'subUnitId':_0x4e5f2b,'ref':'','id':_0x1a2479['replyId'],'dT':P(+_0x1a2479[_0x21db72(0x13d)]),'threadId':_0x1a2479[_0x21db72(0x14d)],'personId':(_0x490fe1=(_0x260bcd=_0x1a2479[_0x21db72(0xee)])==null?void 0x0:_0x260bcd[_0x21db72(0x16d)])!=null?_0x490fe1:_0x1a2479[_0x21db72(0xec)],'text':JSON[_0x21db72(0xf6)](_0x1a2479[_0x21db72(0xf5)]),'parentId':_0x3eb158['id']});break;}case v[_0x21db72(0x172)]:{const _0x1abe73=this[_0x21db72(0x110)]['getComment'](_0x1aedfb,_0x4e5f2b,_0x1a2479[_0x21db72(0x171)]);_0x1abe73&&_0x1abe73['parentId']&&this[_0x21db72(0x110)][_0x21db72(0x150)](_0x1aedfb,_0x4e5f2b,_0x1a2479[_0x21db72(0x171)]);break;}case v[_0x21db72(0x108)]:{this[_0x21db72(0x110)][_0x21db72(0xeb)](_0x1aedfb,_0x4e5f2b,{'commentId':_0x1a2479[_0x21db72(0x171)],'text':JSON[_0x21db72(0xf6)](_0x1a2479[_0x21db72(0xf5)])});break;}case v[_0x21db72(0x111)]:{const _0x409a5f=this[_0x21db72(0x110)][_0x21db72(0x14e)](_0x1aedfb,_0x1a2479[_0x21db72(0x14d)]);_0x409a5f&&this[_0x21db72(0x110)][_0x21db72(0x13b)](_0x1aedfb,_0x4e5f2b,_0x409a5f['id'],_0x1a2479[_0x21db72(0x154)]===p[_0x21db72(0x101)]);break;}}}));}};b=X([c[_0x378286(0xff)](c[_0x378286(0x117)][_0x378286(0xfa)],b),_(0x0,c['Inject'](y[_0x378286(0x109)])),_(0x1,c[_0x378286(0x147)](g[_0x378286(0x159)])),_(0x2,c[_0x378286(0x147)](c[_0x378286(0x16e)])),_(0x3,c[_0x378286(0x147)](c[_0x378286(0xf3)]))],b);const k=_0x378286(0x118),ee={};var U=Object[_0x378286(0xe9)],re=Object[_0x378286(0x10d)],te=(_0x57299b,_0x48195d,_0x91856f)=>_0x48195d in _0x57299b?U(_0x57299b,_0x48195d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x91856f}):_0x57299b[_0x48195d]=_0x91856f,se=(_0x481637,_0x126f1e,_0x1546e9,_0x30d186)=>{const _0x474548=_0x378286;for(var _0x1d080e=_0x30d186>0x1?void 0x0:_0x30d186?re(_0x126f1e,_0x1546e9):_0x126f1e,_0x158e69=_0x481637[_0x474548(0x128)]-0x1,_0x4b03bc;_0x158e69>=0x0;_0x158e69--)(_0x4b03bc=_0x481637[_0x158e69])&&(_0x1d080e=(_0x30d186?_0x4b03bc(_0x126f1e,_0x1546e9,_0x1d080e):_0x4b03bc(_0x1d080e))||_0x1d080e);return _0x30d186&&_0x1d080e&&U(_0x126f1e,_0x1546e9,_0x1d080e),_0x1d080e;},T=(_0x922e39,_0x5adc2e)=>(_0x39548f,_0x51d7d3)=>_0x5adc2e(_0x39548f,_0x51d7d3,_0x922e39),R=(_0x4acf37,_0x44d959,_0x4ce14a)=>te(_0x4acf37,typeof _0x44d959!=_0x378286(0xf1)?_0x44d959+'':_0x44d959,_0x4ce14a);exports[_0x378286(0x14f)]=class extends c[_0x378286(0x165)]{constructor(_0x317581=ee,_0x58adff,_0x27c3fd){const _0x2dfc67=_0x378286;super(),this[_0x2dfc67(0x15b)]=_0x317581,this['_injector']=_0x58adff,this[_0x2dfc67(0x144)]=_0x27c3fd;const {..._0x120c32}=this['_config'];this[_0x2dfc67(0x144)][_0x2dfc67(0x11a)](k,_0x120c32);}['onStarting'](){const _0x4d4ee5=_0x378286;[[D],[C],[f],[b]][_0x4d4ee5(0x156)](_0x41bc51=>{const _0x4b915a=_0x4d4ee5;this['_injector'][_0x4b915a(0x16b)](_0x41bc51);});}},R(exports[_0x378286(0x14f)],_0x378286(0x134),q),R(exports['UniverThreadCommentDataSourcePlugin'],_0x378286(0x105),c[_0x378286(0x104)][_0x378286(0xfd)]),exports['UniverThreadCommentDataSourcePlugin']=se([c[_0x378286(0xf4)](g[_0x378286(0x132)],N[_0x378286(0x11c)],y[_0x378286(0xed)]),T(0x1,c[_0x378286(0x147)](c[_0x378286(0xf3)])),T(0x2,c[_0x378286(0xe1)])],exports[_0x378286(0x14f)]);
|
|
1
|
+
'use strict';const _0x536ebc=_0x59a4;(function(_0x350a04,_0x4838c4){const _0x1dbccc=_0x59a4,_0x4cf48f=_0x350a04();while(!![]){try{const _0x502143=parseInt(_0x1dbccc(0x1ed))/0x1*(parseInt(_0x1dbccc(0x20f))/0x2)+parseInt(_0x1dbccc(0x260))/0x3*(parseInt(_0x1dbccc(0x20c))/0x4)+-parseInt(_0x1dbccc(0x246))/0x5+-parseInt(_0x1dbccc(0x235))/0x6*(parseInt(_0x1dbccc(0x251))/0x7)+parseInt(_0x1dbccc(0x26d))/0x8*(-parseInt(_0x1dbccc(0x269))/0x9)+parseInt(_0x1dbccc(0x25b))/0xa+parseInt(_0x1dbccc(0x25c))/0xb*(parseInt(_0x1dbccc(0x21e))/0xc);if(_0x502143===_0x4838c4)break;else _0x4cf48f['push'](_0x4cf48f['shift']());}catch(_0x1f5428){_0x4cf48f['push'](_0x4cf48f['shift']());}}}(_0x5035,0x36516));Object['defineProperty'](exports,Symbol[_0x536ebc(0x23a)],{'value':_0x536ebc(0x259)});const c=require('@univerjs/core'),g=require(_0x536ebc(0x230)),N=require('@univerjs/thread-comment-ui'),y=require('@univerjs-pro/collaboration-client'),O=require(_0x536ebc(0x1fb)),$=require(_0x536ebc(0x20b)),E=require(_0x536ebc(0x22d)),q=_0x536ebc(0x211);var p=(_0x50afc6=>(_0x50afc6[_0x50afc6[_0x536ebc(0x226)]=0x0]='OpenOrReOpen',_0x50afc6[_0x50afc6[_0x536ebc(0x247)]=0x1]=_0x536ebc(0x247),_0x50afc6[_0x50afc6[_0x536ebc(0x25d)]=-0x1]=_0x536ebc(0x25d),_0x50afc6))(p||{}),v=(_0x54be3a=>(_0x54be3a[_0x54be3a[_0x536ebc(0x233)]=0x0]=_0x536ebc(0x233),_0x54be3a[_0x54be3a[_0x536ebc(0x1ff)]=0x1]='Add',_0x54be3a[_0x54be3a['Reply']=0x2]=_0x536ebc(0x20a),_0x54be3a[_0x54be3a[_0x536ebc(0x262)]=0x3]=_0x536ebc(0x262),_0x54be3a[_0x54be3a[_0x536ebc(0x270)]=0x4]=_0x536ebc(0x270),_0x54be3a[_0x54be3a[_0x536ebc(0x200)]=0x5]=_0x536ebc(0x200),_0x54be3a[_0x54be3a[_0x536ebc(0x25d)]=-0x1]=_0x536ebc(0x25d),_0x54be3a))(v||{});const P=_0x25d8e4=>$(new Date(+_0x25d8e4))[_0x536ebc(0x238)](_0x536ebc(0x237)),x=async(_0x5ecd41,_0x4e67f8)=>{const _0x181eab=_0x536ebc,_0x228d36=_0x5ecd41[_0x181eab(0x1f5)](c['UserManagerService']),_0x45f6ac=_0x5ecd41[_0x181eab(0x1f5)](O[_0x181eab(0x23c)]);_0x4e67f8[_0x181eab(0x24b)](_0x276e60=>{const _0x2b2009=_0x181eab;_0x228d36[_0x2b2009(0x218)](_0x276e60)&&_0x4e67f8[_0x2b2009(0x26e)](_0x276e60);}),_0x4e67f8['size']&&(await _0x45f6ac[_0x181eab(0x1f5)](_0x181eab(0x263),{'params':{'userIDs':[..._0x4e67f8]}}))[_0x181eab(0x206)]['users'][_0x181eab(0x24b)](_0x54aa91=>{_0x54aa91&&_0x228d36['addUser'](_0x54aa91);});};var Y=Object['defineProperty'],G=Object[_0x536ebc(0x1e6)],H=(_0x502a3b,_0x59388c,_0x19248b,_0x46e96b)=>{const _0x5894fa=_0x536ebc;for(var _0x2c47f5=_0x46e96b>0x1?void 0x0:_0x46e96b?G(_0x59388c,_0x19248b):_0x59388c,_0x95ff48=_0x502a3b[_0x5894fa(0x216)]-0x1,_0x430ec3;_0x95ff48>=0x0;_0x95ff48--)(_0x430ec3=_0x502a3b[_0x95ff48])&&(_0x2c47f5=(_0x46e96b?_0x430ec3(_0x59388c,_0x19248b,_0x2c47f5):_0x430ec3(_0x2c47f5))||_0x2c47f5);return _0x46e96b&&_0x2c47f5&&Y(_0x59388c,_0x19248b,_0x2c47f5),_0x2c47f5;},I=(_0x306af0,_0x5a2db4)=>(_0x17863d,_0x50ff6c)=>_0x5a2db4(_0x17863d,_0x50ff6c,_0x306af0);function L(_0xee56d4,_0x148655){const _0x13e410=_0x536ebc,_0x5e3efe=_0xee56d4['replies'][0x0];return{..._0x148655,'id':_0x5e3efe['replyId'],'resolved':_0xee56d4[_0x13e410(0x234)]===0x1,'dT':P(_0x5e3efe['createTimestamp']),'personId':_0x5e3efe[_0x13e410(0x244)],'threadId':_0x5e3efe[_0x13e410(0x231)]};}function _0x59a4(_0x828c8f,_0x4bac1f){const _0x5035bd=_0x5035();return _0x59a4=function(_0x59a48a,_0x1769a1){_0x59a48a=_0x59a48a-0x1e5;let _0x22ccc9=_0x5035bd[_0x59a48a];return _0x22ccc9;},_0x59a4(_0x828c8f,_0x4bac1f);}function A(_0x5deea0,_0x52fec1,_0x51356f){const _0x1c9a1a=_0x536ebc;var _0x4e71d6,_0xd545d0;if(((_0xd545d0=(_0x4e71d6=_0x5deea0==null?void 0x0:_0x5deea0[_0x1c9a1a(0x1f7)])==null?void 0x0:_0x4e71d6[_0x1c9a1a(0x216)])!=null?_0xd545d0:0x0)>0x0){const _0x315e13=(_0x3bdb9b,_0x196083)=>({'id':_0x3bdb9b[_0x1c9a1a(0x22b)],'threadId':_0x3bdb9b['threadId'],'dT':P(_0x3bdb9b[_0x1c9a1a(0x239)]),'personId':_0x3bdb9b[_0x1c9a1a(0x244)],'resolved':_0x5deea0[_0x1c9a1a(0x234)]===p['Solved'],'unitId':_0x52fec1,'subUnitId':_0x51356f,'text':JSON['parse'](_0x3bdb9b['content']),'parentId':_0x196083}),_0x1a9cff=_0x315e13(_0x5deea0[_0x1c9a1a(0x1f7)][0x0]);return{..._0x1a9cff,'children':_0x5deea0[_0x1c9a1a(0x1f7)]['slice'](0x1)[_0x1c9a1a(0x214)](_0x154fb6=>_0x315e13(_0x154fb6,_0x1a9cff['id']))};}return null;}let C=class{constructor(_0x2d251a,_0x3e7b00,_0xf3e4fb,_0x4bef29){const _0x48c6fd=_0x536ebc;this[_0x48c6fd(0x21c)]=_0x2d251a,this[_0x48c6fd(0x24e)]=_0x3e7b00,this[_0x48c6fd(0x204)]=_0xf3e4fb,this[_0x48c6fd(0x1e9)]=_0x4bef29;}async[_0x536ebc(0x245)](_0x78ae26){const _0x386fdb=_0x536ebc;var _0x56c71d,_0x3689d7;const {parentId:_0x449725,unitId:_0x47619d,text:_0x155e87,threadId:_0x36eb3d}=_0x78ae26,_0x7d9217=(_0x3689d7=(_0x56c71d=_0x155e87[_0x386fdb(0x25e)])==null?void 0x0:_0x56c71d['filter'](_0x15076c=>_0x15076c[_0x386fdb(0x265)]===c[_0x386fdb(0x217)][_0x386fdb(0x1e8)])[_0x386fdb(0x214)](_0x3efc9d=>_0x3efc9d[_0x386fdb(0x23f)]))!=null?_0x3689d7:[],_0x390c3a=JSON['stringify'](_0x155e87),_0x4c79f6=(await this['_sessionService'][_0x386fdb(0x210)](_0x47619d))[_0x386fdb(0x219)]();if(_0x449725){const _0x31c7f6={'memberId':_0x4c79f6,'unitId':_0x47619d,'content':_0x390c3a,'mention':_0x7d9217,'threadId':_0x36eb3d},_0x20f148=(await this['_httpService'][_0x386fdb(0x266)]('/universer-api/comment/unit/'+_0x47619d+_0x386fdb(0x22e),{'body':_0x31c7f6}))[_0x386fdb(0x206)]['reply'];return{..._0x78ae26,'id':_0x20f148[_0x386fdb(0x22b)],'dT':$(+_0x20f148[_0x386fdb(0x239)])[_0x386fdb(0x238)](_0x386fdb(0x237)),'personId':_0x20f148['userId']};}else{const _0x368a25={'memberId':_0x4c79f6,'unitId':_0x47619d,'content':_0x390c3a,'mention':_0x7d9217},_0x5ec89=await this[_0x386fdb(0x21c)]['post']('/universer-api/comment/unit/'+_0x47619d+_0x386fdb(0x1e5),{'body':_0x368a25});return L(_0x5ec89[_0x386fdb(0x206)]['comment'],_0x78ae26);}}async['updateComment'](_0x16d46e){const _0x4fbbb5=_0x536ebc;var _0xd21ab3,_0xd80823;const {text:_0x5a30df,unitId:_0x13a60f}=_0x16d46e,_0x53f6ac=(_0xd80823=(_0xd21ab3=_0x5a30df[_0x4fbbb5(0x25e)])==null?void 0x0:_0xd21ab3[_0x4fbbb5(0x255)](_0x5d787c=>_0x5d787c[_0x4fbbb5(0x265)]===c['CustomRangeType'][_0x4fbbb5(0x1e8)])[_0x4fbbb5(0x214)](_0x533658=>_0x533658[_0x4fbbb5(0x23f)]))!=null?_0xd80823:[],_0x2e4fc9=JSON['stringify'](_0x5a30df),_0x5bcc7c=_0x16d46e[_0x4fbbb5(0x231)],_0x1c427d=_0x16d46e['id'],_0x3eb5c0={'memberId':(await this[_0x4fbbb5(0x204)]['requireSession'](_0x13a60f))[_0x4fbbb5(0x219)](),'unitId':_0x13a60f,'threadId':_0x5bcc7c,'mention':_0x53f6ac,'content':_0x2e4fc9,'replyId':_0x1c427d},_0x486ec1=await this[_0x4fbbb5(0x21c)][_0x4fbbb5(0x266)](_0x4fbbb5(0x23e)+_0x13a60f+_0x4fbbb5(0x276),{'body':_0x3eb5c0});return!_0x486ec1[_0x4fbbb5(0x206)][_0x4fbbb5(0x215)]||_0x486ec1['body'][_0x4fbbb5(0x215)][_0x4fbbb5(0x232)]===0x1;}async[_0x536ebc(0x273)](_0x37e425){const _0x9fca3b=_0x536ebc,{unitId:_0x1998f1}=_0x37e425,_0xb6323b=_0x37e425['threadId'],_0x41c8b8={'memberId':this['_userService'][_0x9fca3b(0x25a)]()[_0x9fca3b(0x1e7)],'unitId':_0x1998f1,'threadId':_0xb6323b,'solved':_0x37e425[_0x9fca3b(0x1f6)]?p[_0x9fca3b(0x247)]:p[_0x9fca3b(0x226)]},_0x1200bb=await this['_httpService']['post'](_0x9fca3b(0x23e)+_0x1998f1+_0x9fca3b(0x250),{'body':_0x41c8b8});return!_0x1200bb[_0x9fca3b(0x206)][_0x9fca3b(0x215)]||_0x1200bb[_0x9fca3b(0x206)][_0x9fca3b(0x215)][_0x9fca3b(0x232)]===0x1;}async['deleteComment'](_0xc23769,_0x2e0cdf,_0xb47a52,_0x4c247b){const _0x3f0894=_0x536ebc,_0x159287={'memberId':(await this[_0x3f0894(0x204)][_0x3f0894(0x210)](_0xc23769))[_0x3f0894(0x219)](),'threadId':_0xb47a52,'replyId':_0x4c247b,'unitId':_0xc23769},_0x49c952=await this[_0x3f0894(0x21c)][_0x3f0894(0x266)](_0x3f0894(0x23e)+_0xc23769+_0x3f0894(0x24f),{'body':_0x159287});return!_0x49c952['body']['error']||_0x49c952[_0x3f0894(0x206)][_0x3f0894(0x215)][_0x3f0894(0x232)]===0x1;}async[_0x536ebc(0x26c)](_0x348e78,_0x169b3f,_0x4a1834){const _0x39d94e=_0x536ebc,_0x100aad={'unitId':_0x348e78,'threadId':_0x4a1834},_0x24deba=await this[_0x39d94e(0x21c)][_0x39d94e(0x266)](_0x39d94e(0x23e)+_0x348e78+_0x39d94e(0x23b),{'body':_0x100aad}),_0x20a5ed=_0x4a1834['map'](_0x53673f=>A(_0x24deba['body'][_0x39d94e(0x1f1)][_0x53673f],_0x348e78,_0x169b3f))[_0x39d94e(0x255)](Boolean);return Object[_0x39d94e(0x23d)](_0x24deba[_0x39d94e(0x206)][_0x39d94e(0x267)])['forEach'](_0x10d57d=>{const _0x1637d9=_0x39d94e;this['_userService'][_0x1637d9(0x24a)](_0x10d57d);}),_0x20a5ed;}[_0x536ebc(0x264)](_0x17e470){const _0x9b0865=_0x536ebc;return{'id':_0x17e470['id'],'threadId':_0x17e470['threadId'],'ref':_0x17e470[_0x9b0865(0x1fc)]};}};C=H([I(0x0,c[_0x536ebc(0x1f0)](O[_0x536ebc(0x23c)])),I(0x1,c[_0x536ebc(0x1f0)](c['UserManagerService'])),I(0x2,c[_0x536ebc(0x1f0)](y['CollaborationSessionService'])),I(0x3,c[_0x536ebc(0x1f0)](c[_0x536ebc(0x1ef)]))],C);var J=Object[_0x536ebc(0x25f)],F=Object[_0x536ebc(0x1e6)],Z=(_0x359ebf,_0x51c582,_0x14e1fa,_0x4bf2c5)=>{const _0x29e1e9=_0x536ebc;for(var _0x132dcd=_0x4bf2c5>0x1?void 0x0:_0x4bf2c5?F(_0x51c582,_0x14e1fa):_0x51c582,_0x3d1497=_0x359ebf[_0x29e1e9(0x216)]-0x1,_0x210a50;_0x3d1497>=0x0;_0x3d1497--)(_0x210a50=_0x359ebf[_0x3d1497])&&(_0x132dcd=(_0x4bf2c5?_0x210a50(_0x51c582,_0x14e1fa,_0x132dcd):_0x210a50(_0x132dcd))||_0x132dcd);return _0x4bf2c5&&_0x132dcd&&J(_0x51c582,_0x14e1fa,_0x132dcd),_0x132dcd;},W=(_0x3f913f,_0x34b321)=>(_0x41b74a,_0x4848b0)=>_0x34b321(_0x41b74a,_0x4848b0,_0x3f913f);function _0x5035(){const _0x357a86=['syncUpdateMutationToColla','Edit','/universer-api/user/list','saveCommentToSnapshot','rangeType','post','users','UniverThreadCommentUIPlugin','27NiiBVO','UserManagerService','location','listComments','484648ZvPoiu','delete','searchParams','Delete','updateComment','type','resolveComment','avatar','UNIVER_UNKNOWN','/edit','_threadCommentMentionDataService','/add','getOwnPropertyDescriptor','userID','COMMENT','_injector','disposeWithMe','_initDataSource','http','3628fgIjbe','ThreadCommentModel','Injector','Inject','comments','LifecycleStages','setConfig','host','get','resolved','replies','Plugin','thread-comment-data-source.config','commentUpdate$','@univerjs/network','ref','add','OnLifecycle','Add','Solve','deleteComment','DependentOn','_threadCommentDataSourceService','_sessionService','IThreadCommentMentionDataService','body','Disposable','unit','Ready','Reply','dayjs','12uTrebJ','_threadCommentModel','/universer-api/authz/collaborator','4LdItYp','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','onStarting','map','error','length','CustomRangeType','getUser','getMemberID','collaborators','href','_httpService','://','12MgRARj','subject','_initUserSync','dataSource','bufferTime','Starting','protocol','_threadCommentMentionDataSource','OpenOrReOpen','getMentions','UniverThreadCommentDataSourcePlugin','getComment','CommentService','replyId','IThreadCommentDataSourceService','rxjs','/reply','content','@univerjs/thread-comment','threadId','code','Unknown','solved','880926JVrGdT','IConfigService','YYYY/MM/DD\x20HH:mm','format','createTimestamp','toStringTag','/list','HTTPService','values','/universer-api/comment/unit/','rangeId','parse','_config','name','payload','userId','addComment','1087390EAlbuW','Solved','_commentService','_init','addUser','forEach','user','_configService','_userService','/delete','/solved','21jccqvZ','https','unitId','pipe','filter','symbol','_threadCommentDataSource','UniverThreadCommentPlugin','Module','getCurrentUser','1589980xpyRKn','7753273iHvaym','UNRECOGNIZED','customRanges','defineProperty','191073WSNVtR'];_0x5035=function(){return _0x357a86;};return _0x5035();}let D=class{constructor(_0x2ca1d6){this['_httpService']=_0x2ca1d6;}async[_0x536ebc(0x227)](_0x4452be,_0x2e4623,_0x5bcecd){const _0x489ad1=_0x536ebc,_0x30fa45=new URL(window[_0x489ad1(0x26b)][_0x489ad1(0x21b)])[_0x489ad1(0x26f)]['get'](_0x489ad1(0x208));if(!_0x30fa45)return[];const _0x288a06=window['location'][_0x489ad1(0x1f4)],_0x4fc6aa=window[_0x489ad1(0x26b)][_0x489ad1(0x224)]==='https:'?_0x489ad1(0x252):_0x489ad1(0x1ec);return(await this[_0x489ad1(0x21c)][_0x489ad1(0x1f5)](_0x4fc6aa+_0x489ad1(0x21d)+_0x288a06+_0x489ad1(0x20e),{'params':{'objectID':_0x30fa45,'unitID':_0x30fa45}}))[_0x489ad1(0x206)][_0x489ad1(0x21a)][_0x489ad1(0x214)](_0x6d1f28=>{const _0x340dbb=_0x489ad1;var _0x4b5377,_0x1a5788,_0x21af4b,_0x1484fa,_0x59984b,_0xbc1561;return{'id':(_0x1a5788=(_0x4b5377=_0x6d1f28[_0x340dbb(0x21f)])==null?void 0x0:_0x4b5377[_0x340dbb(0x1e7)])!=null?_0x1a5788:'','label':(_0x1484fa=(_0x21af4b=_0x6d1f28[_0x340dbb(0x21f)])==null?void 0x0:_0x21af4b[_0x340dbb(0x242)])!=null?_0x1484fa:'','icon':(_0xbc1561=(_0x59984b=_0x6d1f28['subject'])==null?void 0x0:_0x59984b[_0x340dbb(0x274)])!=null?_0xbc1561:'','type':_0x340dbb(0x24c)};});}};D=Z([W(0x0,c[_0x536ebc(0x1f0)](O[_0x536ebc(0x23c)]))],D);var z=Object[_0x536ebc(0x25f)],B=Object[_0x536ebc(0x1e6)],K=(_0x350aa2,_0x1251f9,_0x464ee4,_0x26f1ae)=>{const _0x49977a=_0x536ebc;for(var _0x5e6123=_0x26f1ae>0x1?void 0x0:_0x26f1ae?B(_0x1251f9,_0x464ee4):_0x1251f9,_0x3aa74e=_0x350aa2[_0x49977a(0x216)]-0x1,_0x5385b1;_0x3aa74e>=0x0;_0x3aa74e--)(_0x5385b1=_0x350aa2[_0x3aa74e])&&(_0x5e6123=(_0x26f1ae?_0x5385b1(_0x1251f9,_0x464ee4,_0x5e6123):_0x5385b1(_0x5e6123))||_0x5e6123);return _0x26f1ae&&_0x5e6123&&z(_0x1251f9,_0x464ee4,_0x5e6123),_0x5e6123;},S=(_0x3efb86,_0x5739ba)=>(_0x296c7f,_0x4a08e8)=>_0x5739ba(_0x296c7f,_0x4a08e8,_0x3efb86);let f=class extends c[_0x536ebc(0x207)]{constructor(_0x51a609,_0x4d01d7,_0x3e12d5,_0x451f0a){const _0x54e86d=_0x536ebc;super(),this[_0x54e86d(0x203)]=_0x51a609,this[_0x54e86d(0x257)]=_0x4d01d7,this[_0x54e86d(0x277)]=_0x3e12d5,this[_0x54e86d(0x225)]=_0x451f0a,this['_initDataSource']();}[_0x536ebc(0x1eb)](){const _0x362a79=_0x536ebc;this[_0x362a79(0x203)][_0x362a79(0x221)]=this[_0x362a79(0x257)],this[_0x362a79(0x203)][_0x362a79(0x261)]=!0x1,this[_0x362a79(0x277)][_0x362a79(0x221)]=this[_0x362a79(0x225)];}};f=K([c[_0x536ebc(0x1fe)](c[_0x536ebc(0x1f2)][_0x536ebc(0x223)],f),S(0x0,g[_0x536ebc(0x22c)]),S(0x1,c[_0x536ebc(0x1f0)](C)),S(0x2,N[_0x536ebc(0x205)]),S(0x3,c['Inject'](D))],f);var V=Object[_0x536ebc(0x25f)],Q=Object[_0x536ebc(0x1e6)],X=(_0x4bce33,_0x2f48af,_0x3711b6,_0x5db39f)=>{const _0x2f0766=_0x536ebc;for(var _0x2ebdd7=_0x5db39f>0x1?void 0x0:_0x5db39f?Q(_0x2f48af,_0x3711b6):_0x2f48af,_0x133b66=_0x4bce33[_0x2f0766(0x216)]-0x1,_0x3edb2e;_0x133b66>=0x0;_0x133b66--)(_0x3edb2e=_0x4bce33[_0x133b66])&&(_0x2ebdd7=(_0x5db39f?_0x3edb2e(_0x2f48af,_0x3711b6,_0x2ebdd7):_0x3edb2e(_0x2ebdd7))||_0x2ebdd7);return _0x5db39f&&_0x2ebdd7&&V(_0x2f48af,_0x3711b6,_0x2ebdd7),_0x2ebdd7;},_=(_0x2eaba9,_0x3dd236)=>(_0x61b382,_0x2f05fb)=>_0x3dd236(_0x61b382,_0x2f05fb,_0x2eaba9);let b=class extends c[_0x536ebc(0x207)]{constructor(_0x5a0aa7,_0x1ab882,_0x15eb73,_0xd1e1e4){const _0x549611=_0x536ebc;super(),this['_commentService']=_0x5a0aa7,this[_0x549611(0x20d)]=_0x1ab882,this[_0x549611(0x24e)]=_0x15eb73,this[_0x549611(0x1e9)]=_0xd1e1e4,this[_0x549611(0x249)](),this[_0x549611(0x220)]();}[_0x536ebc(0x220)](){const _0x13da7f=_0x536ebc;this[_0x13da7f(0x1ea)](this[_0x13da7f(0x20d)][_0x13da7f(0x1fa)][_0x13da7f(0x254)](E[_0x13da7f(0x222)](0x10))['subscribe'](_0x173cc9=>{const _0x33fa40=_0x13da7f,_0x4c0b55=new Set();_0x173cc9[_0x33fa40(0x24b)](_0x42be1f=>{const _0x4b2711=_0x33fa40;switch(_0x42be1f['type']){case _0x4b2711(0x1fd):{const _0x2705f5=_0x42be1f[_0x4b2711(0x243)]['personId'];_0x4c0b55[_0x4b2711(0x1fd)](_0x2705f5);break;}}}),x(this['_injector'],_0x4c0b55);}));}[_0x536ebc(0x249)](){const _0x33e86e=_0x536ebc;this[_0x33e86e(0x1ea)](this[_0x33e86e(0x248)][_0x33e86e(0x1fa)][_0x33e86e(0x212)](async _0x1add53=>{const _0x39fd20=_0x33e86e;var _0x2d15e2,_0x11f9b0;const _0x524163=this[_0x39fd20(0x20d)]['getThread'](_0x1add53[_0x39fd20(0x253)],_0x1add53[_0x39fd20(0x231)]);if(!_0x524163)return;const {unitId:_0x50cf01,subUnitId:_0x3cef35}=_0x524163;switch(_0x1add53[_0x39fd20(0x24c)]&&this[_0x39fd20(0x24e)][_0x39fd20(0x24a)](_0x1add53[_0x39fd20(0x24c)]),_0x1add53[_0x39fd20(0x272)]){case v[_0x39fd20(0x1ff)]:break;case v[_0x39fd20(0x20a)]:{this[_0x39fd20(0x20d)][_0x39fd20(0x245)](_0x50cf01,_0x3cef35,{'unitId':_0x50cf01,'subUnitId':_0x3cef35,'ref':'','id':_0x1add53[_0x39fd20(0x22b)],'dT':P(+_0x1add53[_0x39fd20(0x239)]),'threadId':_0x1add53[_0x39fd20(0x231)],'personId':(_0x11f9b0=(_0x2d15e2=_0x1add53[_0x39fd20(0x24c)])==null?void 0x0:_0x2d15e2[_0x39fd20(0x1e7)])!=null?_0x11f9b0:_0x1add53[_0x39fd20(0x244)],'text':JSON[_0x39fd20(0x240)](_0x1add53[_0x39fd20(0x22f)]),'parentId':_0x524163['id']});break;}case v[_0x39fd20(0x270)]:{const _0x40fec5=this[_0x39fd20(0x20d)][_0x39fd20(0x229)](_0x50cf01,_0x3cef35,_0x1add53[_0x39fd20(0x22b)]);_0x40fec5&&_0x40fec5['parentId']&&this['_threadCommentModel'][_0x39fd20(0x201)](_0x50cf01,_0x3cef35,_0x1add53[_0x39fd20(0x22b)]);break;}case v[_0x39fd20(0x262)]:{this[_0x39fd20(0x20d)][_0x39fd20(0x271)](_0x50cf01,_0x3cef35,{'commentId':_0x1add53['replyId'],'text':JSON[_0x39fd20(0x240)](_0x1add53[_0x39fd20(0x22f)])});break;}case v[_0x39fd20(0x200)]:{const _0x353df7=this['_threadCommentModel']['getThread'](_0x50cf01,_0x1add53[_0x39fd20(0x231)]);_0x353df7&&this[_0x39fd20(0x20d)][_0x39fd20(0x273)](_0x50cf01,_0x3cef35,_0x353df7['id'],_0x1add53[_0x39fd20(0x234)]===p[_0x39fd20(0x247)]);break;}}}));}};b=X([c[_0x536ebc(0x1fe)](c[_0x536ebc(0x1f2)][_0x536ebc(0x209)],b),_(0x0,c['Inject'](y[_0x536ebc(0x22a)])),_(0x1,c[_0x536ebc(0x1f0)](g[_0x536ebc(0x1ee)])),_(0x2,c[_0x536ebc(0x1f0)](c[_0x536ebc(0x26a)])),_(0x3,c[_0x536ebc(0x1f0)](c[_0x536ebc(0x1ef)]))],b);const k=_0x536ebc(0x1f9),ee={};var U=Object[_0x536ebc(0x25f)],re=Object[_0x536ebc(0x1e6)],te=(_0x5e6a34,_0x5dc25a,_0x209448)=>_0x5dc25a in _0x5e6a34?U(_0x5e6a34,_0x5dc25a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x209448}):_0x5e6a34[_0x5dc25a]=_0x209448,se=(_0x564ab8,_0x11c431,_0x1663a9,_0x3d644b)=>{const _0x58bcfc=_0x536ebc;for(var _0x4e00e1=_0x3d644b>0x1?void 0x0:_0x3d644b?re(_0x11c431,_0x1663a9):_0x11c431,_0x55277b=_0x564ab8[_0x58bcfc(0x216)]-0x1,_0x1c5eeb;_0x55277b>=0x0;_0x55277b--)(_0x1c5eeb=_0x564ab8[_0x55277b])&&(_0x4e00e1=(_0x3d644b?_0x1c5eeb(_0x11c431,_0x1663a9,_0x4e00e1):_0x1c5eeb(_0x4e00e1))||_0x4e00e1);return _0x3d644b&&_0x4e00e1&&U(_0x11c431,_0x1663a9,_0x4e00e1),_0x4e00e1;},T=(_0x56227b,_0x51befa)=>(_0x3b65bb,_0x2c6695)=>_0x51befa(_0x3b65bb,_0x2c6695,_0x56227b),R=(_0x9a3f92,_0x3a34a7,_0x23b946)=>te(_0x9a3f92,typeof _0x3a34a7!=_0x536ebc(0x256)?_0x3a34a7+'':_0x3a34a7,_0x23b946);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x536ebc(0x1f8)]{constructor(_0x31f21e=ee,_0xb96424,_0x1186fc){const _0x2151f4=_0x536ebc;super(),this[_0x2151f4(0x241)]=_0x31f21e,this['_injector']=_0xb96424,this[_0x2151f4(0x24d)]=_0x1186fc;const {..._0x5a7e93}=this[_0x2151f4(0x241)];this[_0x2151f4(0x24d)][_0x2151f4(0x1f3)](k,_0x5a7e93);}[_0x536ebc(0x213)](){const _0x60b0b1=_0x536ebc;[[D],[C],[f],[b]][_0x60b0b1(0x24b)](_0x4c80bf=>{const _0xf6b1ce=_0x60b0b1;this['_injector'][_0xf6b1ce(0x1fd)](_0x4c80bf);});}},R(exports[_0x536ebc(0x228)],'pluginName',q),R(exports[_0x536ebc(0x228)],_0x536ebc(0x272),c['UniverInstanceType'][_0x536ebc(0x275)]),exports['UniverThreadCommentDataSourcePlugin']=se([c[_0x536ebc(0x202)](g[_0x536ebc(0x258)],N[_0x536ebc(0x268)],y['UniverCollaborationClientPlugin']),T(0x1,c['Inject'](c[_0x536ebc(0x1ef)])),T(0x2,c[_0x536ebc(0x236)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xb40524=_0x40d5;(function(_0x20acab,_0x35693e){const _0x5dff34=_0x40d5,_0x471b79=_0x20acab();while(!![]){try{const _0xa6f3a9=parseInt(_0x5dff34(0x19b))/0x1*(parseInt(_0x5dff34(0x15a))/0x2)+parseInt(_0x5dff34(0x13e))/0x3*(parseInt(_0x5dff34(0x13d))/0x4)+parseInt(_0x5dff34(0x14e))/0x5+parseInt(_0x5dff34(0x15c))/0x6+parseInt(_0x5dff34(0x147))/0x7+-parseInt(_0x5dff34(0x15e))/0x8+-parseInt(_0x5dff34(0x136))/0x9;if(_0xa6f3a9===_0x35693e)break;else _0x471b79['push'](_0x471b79['shift']());}catch(_0x5351c3){_0x471b79['push'](_0x471b79['shift']());}}}(_0x3e3e,0xa5b6c));import{UserManagerService as _0x570a4f,Inject as _0x4ad08d,Injector as _0xfa0489,CustomRangeType as _0x4b1bd0,OnLifecycle as _0x248609,LifecycleStages as _0x1ac694,Disposable as _0x470db3,UniverInstanceType as _0x1e316d,DependentOn as _0x5a57ce,Plugin as _0x6410d4,IConfigService as _0x5e8d47}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x221c7b,ThreadCommentModel as _0x1ce34a,UniverThreadCommentPlugin as _0x29e33c}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x35bb6c,UniverThreadCommentUIPlugin as _0x261fe5}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x4d50c4,CommentService as _0x34c4ff,UniverCollaborationClientPlugin as _0x44bf59}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x476a74}from'@univerjs/network';import _0x1f05ce from'dayjs';import{bufferTime as _0x135b07}from'rxjs';const X=_0xb40524(0x176);var v=(_0x578c94=>(_0x578c94[_0x578c94[_0xb40524(0x14a)]=0x0]=_0xb40524(0x14a),_0x578c94[_0x578c94[_0xb40524(0x196)]=0x1]=_0xb40524(0x196),_0x578c94[_0x578c94['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x578c94))(v||{}),p=(_0x1093de=>(_0x1093de[_0x1093de['Unknown']=0x0]=_0xb40524(0x16c),_0x1093de[_0x1093de[_0xb40524(0x137)]=0x1]=_0xb40524(0x137),_0x1093de[_0x1093de[_0xb40524(0x187)]=0x2]=_0xb40524(0x187),_0x1093de[_0x1093de[_0xb40524(0x14b)]=0x3]='Edit',_0x1093de[_0x1093de[_0xb40524(0x174)]=0x4]=_0xb40524(0x174),_0x1093de[_0x1093de['Solve']=0x5]=_0xb40524(0x131),_0x1093de[_0x1093de[_0xb40524(0x16b)]=-0x1]=_0xb40524(0x16b),_0x1093de))(p||{});function _0x3e3e(){const _0x4564be=['commentUpdate$','getCurrentUser','code','YYYY/MM/DD\x20HH:mm','Solved','userID','_configService','Ready','resolveComment','1YIwPTp','/edit','payload','ref','slice','searchParams','personId','replies','filter','type','requireSession','location','_httpService','Solve','userId','listComments','_init','user','25429716rPxFvQ','Add','updateComment','onStarting','disposeWithMe','dataSource','comments','92LkPuqp','157134GGsXxD','delete','getUser','createTimestamp','_userService','reply','https','getMemberID','values','5016214oljMVc','length','format','OpenOrReOpen','Edit','resolved','http','6726975ahaZFI','threadId','replyId','getOwnPropertyDescriptor','getMentions','addUser','getThread','unit','get','parse','getComment','post','876268ljhRLN','_injector','1307970QtNcfP','customRanges','3348256DPGrwL','users','host','/delete','saveCommentToSnapshot','_threadCommentDataSource','body','/universer-api/authz/collaborator','name','_sessionService','UNIVER_UNKNOWN','addComment','syncUpdateMutationToColla','UNRECOGNIZED','Unknown','subscribe','avatar','symbol','content','COMMENT','pluginName','forEach','Delete','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','thread-comment-data-source.config','subject','href','/universer-api/comment/unit/','solved','_threadCommentDataSourceService','protocol','map','https:','_initDataSource','setConfig','collaborators','stringify','_threadCommentMentionDataService','_threadCommentModel','Reply','unitId','rangeType','deleteComment','://','/reply','rangeId','/solved','add','error','_initUserSync'];_0x3e3e=function(){return _0x4564be;};return _0x3e3e();}const w=_0x108a9c=>_0x1f05ce(new Date(+_0x108a9c))['format'](_0xb40524(0x195)),k=async(_0x2e4c6c,_0x1e81b7)=>{const _0xd006de=_0xb40524,_0x2d8059=_0x2e4c6c[_0xd006de(0x156)](_0x570a4f),_0x3bacac=_0x2e4c6c[_0xd006de(0x156)](_0x476a74);_0x1e81b7[_0xd006de(0x173)](_0x52a27d=>{const _0x4b1ad2=_0xd006de;_0x2d8059[_0x4b1ad2(0x140)](_0x52a27d)&&_0x1e81b7[_0x4b1ad2(0x13f)](_0x52a27d);}),_0x1e81b7['size']&&(await _0x3bacac[_0xd006de(0x156)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1e81b7]}}))[_0xd006de(0x164)][_0xd006de(0x15f)]['forEach'](_0x3c7d05=>{const _0x42eefa=_0xd006de;_0x3c7d05&&_0x2d8059[_0x42eefa(0x153)](_0x3c7d05);});};var ee=Object[_0xb40524(0x177)],re=Object[_0xb40524(0x151)],te=(_0x42a7c3,_0x7a8058,_0x2dfa47,_0x2d8eeb)=>{const _0x3dcf58=_0xb40524;for(var _0x5bd9a2=_0x2d8eeb>0x1?void 0x0:_0x2d8eeb?re(_0x7a8058,_0x2dfa47):_0x7a8058,_0x204d17=_0x42a7c3[_0x3dcf58(0x148)]-0x1,_0x2d20a4;_0x204d17>=0x0;_0x204d17--)(_0x2d20a4=_0x42a7c3[_0x204d17])&&(_0x5bd9a2=(_0x2d8eeb?_0x2d20a4(_0x7a8058,_0x2dfa47,_0x5bd9a2):_0x2d20a4(_0x5bd9a2))||_0x5bd9a2);return _0x2d8eeb&&_0x5bd9a2&&ee(_0x7a8058,_0x2dfa47,_0x5bd9a2),_0x5bd9a2;},_=(_0x1f3e28,_0x24bfc2)=>(_0x5cbbb3,_0x108804)=>_0x24bfc2(_0x5cbbb3,_0x108804,_0x1f3e28);function se(_0x4060dc,_0x5a6e83){const _0x701dcc=_0xb40524,_0x435d82=_0x4060dc[_0x701dcc(0x1a2)][0x0];return{..._0x5a6e83,'id':_0x435d82[_0x701dcc(0x150)],'resolved':_0x4060dc[_0x701dcc(0x17c)]===0x1,'dT':w(_0x435d82[_0x701dcc(0x141)]),'personId':_0x435d82['userId'],'threadId':_0x435d82[_0x701dcc(0x14f)]};}function oe(_0xfea13e,_0x40378d,_0x544192){const _0x2c68c4=_0xb40524;var _0x3ce666,_0x25670a;if(((_0x25670a=(_0x3ce666=_0xfea13e==null?void 0x0:_0xfea13e[_0x2c68c4(0x1a2)])==null?void 0x0:_0x3ce666[_0x2c68c4(0x148)])!=null?_0x25670a:0x0)>0x0){const _0x4d691f=(_0x3f7cec,_0x3ce04b)=>({'id':_0x3f7cec[_0x2c68c4(0x150)],'threadId':_0x3f7cec[_0x2c68c4(0x14f)],'dT':w(_0x3f7cec[_0x2c68c4(0x141)]),'personId':_0x3f7cec['userId'],'resolved':_0xfea13e[_0x2c68c4(0x17c)]===v[_0x2c68c4(0x196)],'unitId':_0x40378d,'subUnitId':_0x544192,'text':JSON['parse'](_0x3f7cec[_0x2c68c4(0x170)]),'parentId':_0x3ce04b}),_0x33f0d1=_0x4d691f(_0xfea13e[_0x2c68c4(0x1a2)][0x0]);return{..._0x33f0d1,'children':_0xfea13e['replies'][_0x2c68c4(0x19f)](0x1)[_0x2c68c4(0x17f)](_0x27a3fd=>_0x4d691f(_0x27a3fd,_0x33f0d1['id']))};}return null;}let D=class{constructor(_0x3151ef,_0x4d6ee5,_0x5878b4,_0x27b5c4){const _0x417757=_0xb40524;this[_0x417757(0x130)]=_0x3151ef,this[_0x417757(0x142)]=_0x4d6ee5,this['_sessionService']=_0x5878b4,this[_0x417757(0x15b)]=_0x27b5c4;}async[_0xb40524(0x169)](_0x4288e6){const _0x3d3382=_0xb40524;var _0x317d75,_0x342a5e;const {parentId:_0x4ead9e,unitId:_0x363f2b,text:_0x1ddfd8,threadId:_0x155130}=_0x4288e6,_0x2cf573=(_0x342a5e=(_0x317d75=_0x1ddfd8[_0x3d3382(0x15d)])==null?void 0x0:_0x317d75[_0x3d3382(0x1a3)](_0x16cb3b=>_0x16cb3b[_0x3d3382(0x189)]===_0x4b1bd0[_0x3d3382(0x171)])[_0x3d3382(0x17f)](_0x58169f=>_0x58169f[_0x3d3382(0x18d)]))!=null?_0x342a5e:[],_0x17d826=JSON[_0x3d3382(0x184)](_0x1ddfd8),_0x184e82=(await this['_sessionService'][_0x3d3382(0x12e)](_0x363f2b))[_0x3d3382(0x145)]();if(_0x4ead9e){const _0x4943c6={'memberId':_0x184e82,'unitId':_0x363f2b,'content':_0x17d826,'mention':_0x2cf573,'threadId':_0x155130},_0x3d55f7=(await this[_0x3d3382(0x130)]['post'](_0x3d3382(0x17b)+_0x363f2b+_0x3d3382(0x18c),{'body':_0x4943c6}))[_0x3d3382(0x164)][_0x3d3382(0x143)];return{..._0x4288e6,'id':_0x3d55f7[_0x3d3382(0x150)],'dT':_0x1f05ce(+_0x3d55f7[_0x3d3382(0x141)])[_0x3d3382(0x149)](_0x3d3382(0x195)),'personId':_0x3d55f7['userId']};}else{const _0x13d459={'memberId':_0x184e82,'unitId':_0x363f2b,'content':_0x17d826,'mention':_0x2cf573},_0x241c35=await this[_0x3d3382(0x130)][_0x3d3382(0x159)](_0x3d3382(0x17b)+_0x363f2b+'/add',{'body':_0x13d459});return se(_0x241c35[_0x3d3382(0x164)]['comment'],_0x4288e6);}}async['updateComment'](_0x40e48e){const _0x2d429d=_0xb40524;var _0x2fd6a3,_0x165cd3;const {text:_0x2f97bc,unitId:_0x14781d}=_0x40e48e,_0x2cbffe=(_0x165cd3=(_0x2fd6a3=_0x2f97bc[_0x2d429d(0x15d)])==null?void 0x0:_0x2fd6a3[_0x2d429d(0x1a3)](_0x80095b=>_0x80095b[_0x2d429d(0x189)]===_0x4b1bd0[_0x2d429d(0x171)])[_0x2d429d(0x17f)](_0x5af00c=>_0x5af00c[_0x2d429d(0x18d)]))!=null?_0x165cd3:[],_0x24e0eb=JSON['stringify'](_0x2f97bc),_0x8e5b28=_0x40e48e['threadId'],_0x3d24be=_0x40e48e['id'],_0x39b697={'memberId':(await this[_0x2d429d(0x167)][_0x2d429d(0x12e)](_0x14781d))[_0x2d429d(0x145)](),'unitId':_0x14781d,'threadId':_0x8e5b28,'mention':_0x2cbffe,'content':_0x24e0eb,'replyId':_0x3d24be},_0x20a18a=await this[_0x2d429d(0x130)][_0x2d429d(0x159)](_0x2d429d(0x17b)+_0x14781d+_0x2d429d(0x19c),{'body':_0x39b697});return!_0x20a18a[_0x2d429d(0x164)]['error']||_0x20a18a[_0x2d429d(0x164)][_0x2d429d(0x190)][_0x2d429d(0x194)]===0x1;}async[_0xb40524(0x19a)](_0x176c61){const _0x5b9d3f=_0xb40524,{unitId:_0x480bbf}=_0x176c61,_0xc18b7e=_0x176c61[_0x5b9d3f(0x14f)],_0x22cc66={'memberId':this['_userService'][_0x5b9d3f(0x193)]()[_0x5b9d3f(0x197)],'unitId':_0x480bbf,'threadId':_0xc18b7e,'solved':_0x176c61[_0x5b9d3f(0x14c)]?v[_0x5b9d3f(0x196)]:v[_0x5b9d3f(0x14a)]},_0x48d0b9=await this[_0x5b9d3f(0x130)][_0x5b9d3f(0x159)](_0x5b9d3f(0x17b)+_0x480bbf+_0x5b9d3f(0x18e),{'body':_0x22cc66});return!_0x48d0b9['body'][_0x5b9d3f(0x190)]||_0x48d0b9[_0x5b9d3f(0x164)][_0x5b9d3f(0x190)][_0x5b9d3f(0x194)]===0x1;}async[_0xb40524(0x18a)](_0x45cfcf,_0x1023a9,_0x5e3307,_0xad364b){const _0x4ce281=_0xb40524,_0x5a3f43={'memberId':(await this['_sessionService'][_0x4ce281(0x12e)](_0x45cfcf))[_0x4ce281(0x145)](),'threadId':_0x5e3307,'replyId':_0xad364b,'unitId':_0x45cfcf},_0x128317=await this[_0x4ce281(0x130)][_0x4ce281(0x159)](_0x4ce281(0x17b)+_0x45cfcf+_0x4ce281(0x161),{'body':_0x5a3f43});return!_0x128317[_0x4ce281(0x164)][_0x4ce281(0x190)]||_0x128317['body'][_0x4ce281(0x190)][_0x4ce281(0x194)]===0x1;}async[_0xb40524(0x133)](_0x5f4e92,_0x445601,_0x13fe20){const _0x4179a6=_0xb40524,_0x82780f={'unitId':_0x5f4e92,'threadId':_0x13fe20},_0x379b62=await this[_0x4179a6(0x130)][_0x4179a6(0x159)](_0x4179a6(0x17b)+_0x5f4e92+_0x4179a6(0x175),{'body':_0x82780f}),_0x454423=_0x13fe20[_0x4179a6(0x17f)](_0x44d092=>oe(_0x379b62['body'][_0x4179a6(0x13c)][_0x44d092],_0x5f4e92,_0x445601))['filter'](Boolean);return Object[_0x4179a6(0x146)](_0x379b62[_0x4179a6(0x164)][_0x4179a6(0x15f)])['forEach'](_0x447a61=>{const _0x4886da=_0x4179a6;this[_0x4886da(0x142)][_0x4886da(0x153)](_0x447a61);}),_0x454423;}[_0xb40524(0x162)](_0x187884){const _0x2e252d=_0xb40524;return{'id':_0x187884['id'],'threadId':_0x187884[_0x2e252d(0x14f)],'ref':_0x187884[_0x2e252d(0x19e)]};}};D=te([_(0x0,_0x4ad08d(_0x476a74)),_(0x1,_0x4ad08d(_0x570a4f)),_(0x2,_0x4ad08d(_0x4d50c4)),_(0x3,_0x4ad08d(_0xfa0489))],D);var ne=Object[_0xb40524(0x177)],ie=Object[_0xb40524(0x151)],ae=(_0x2ace05,_0x374f7b,_0xd7f2d1,_0x17d411)=>{for(var _0x510716=_0x17d411>0x1?void 0x0:_0x17d411?ie(_0x374f7b,_0xd7f2d1):_0x374f7b,_0x67f425=_0x2ace05['length']-0x1,_0x278520;_0x67f425>=0x0;_0x67f425--)(_0x278520=_0x2ace05[_0x67f425])&&(_0x510716=(_0x17d411?_0x278520(_0x374f7b,_0xd7f2d1,_0x510716):_0x278520(_0x510716))||_0x510716);return _0x17d411&&_0x510716&&ne(_0x374f7b,_0xd7f2d1,_0x510716),_0x510716;},ce=(_0x28bf56,_0x1e9560)=>(_0x161187,_0x5d5b29)=>_0x1e9560(_0x161187,_0x5d5b29,_0x28bf56);let C=class{constructor(_0x14aed9){this['_httpService']=_0x14aed9;}async[_0xb40524(0x152)](_0xde51b1,_0x758394,_0x2bd30b){const _0x1a5888=_0xb40524,_0x20f60a=new URL(window['location'][_0x1a5888(0x17a)])[_0x1a5888(0x1a0)][_0x1a5888(0x156)](_0x1a5888(0x155));if(!_0x20f60a)return[];const _0x34a910=window[_0x1a5888(0x12f)][_0x1a5888(0x160)],_0xdcaa86=window[_0x1a5888(0x12f)][_0x1a5888(0x17e)]===_0x1a5888(0x180)?_0x1a5888(0x144):_0x1a5888(0x14d);return(await this['_httpService'][_0x1a5888(0x156)](_0xdcaa86+_0x1a5888(0x18b)+_0x34a910+_0x1a5888(0x165),{'params':{'objectID':_0x20f60a,'unitID':_0x20f60a}}))[_0x1a5888(0x164)][_0x1a5888(0x183)]['map'](_0x4d3e36=>{const _0x126026=_0x1a5888;var _0x423d25,_0x9cad61,_0x573337,_0x5b333c,_0x56a102,_0x553376;return{'id':(_0x9cad61=(_0x423d25=_0x4d3e36[_0x126026(0x179)])==null?void 0x0:_0x423d25['userID'])!=null?_0x9cad61:'','label':(_0x5b333c=(_0x573337=_0x4d3e36[_0x126026(0x179)])==null?void 0x0:_0x573337[_0x126026(0x166)])!=null?_0x5b333c:'','icon':(_0x553376=(_0x56a102=_0x4d3e36['subject'])==null?void 0x0:_0x56a102[_0x126026(0x16e)])!=null?_0x553376:'','type':_0x126026(0x135)};});}};C=ae([ce(0x0,_0x4ad08d(_0x476a74))],C);var de=Object[_0xb40524(0x177)],me=Object[_0xb40524(0x151)],le=(_0x27517f,_0x37fa7d,_0x564ad4,_0x45f904)=>{const _0x12a6c0=_0xb40524;for(var _0x148054=_0x45f904>0x1?void 0x0:_0x45f904?me(_0x37fa7d,_0x564ad4):_0x37fa7d,_0x3aa6a3=_0x27517f[_0x12a6c0(0x148)]-0x1,_0x30b274;_0x3aa6a3>=0x0;_0x3aa6a3--)(_0x30b274=_0x27517f[_0x3aa6a3])&&(_0x148054=(_0x45f904?_0x30b274(_0x37fa7d,_0x564ad4,_0x148054):_0x30b274(_0x148054))||_0x148054);return _0x45f904&&_0x148054&&de(_0x37fa7d,_0x564ad4,_0x148054),_0x148054;},f=(_0x208ef5,_0x3722f6)=>(_0x5c46ee,_0x5ec14e)=>_0x3722f6(_0x5c46ee,_0x5ec14e,_0x208ef5);let S=class extends _0x470db3{constructor(_0x1fa603,_0x5f3725,_0x482bdb,_0x400eba){const _0x329654=_0xb40524;super(),this['_threadCommentDataSourceService']=_0x1fa603,this[_0x329654(0x163)]=_0x5f3725,this['_threadCommentMentionDataService']=_0x482bdb,this['_threadCommentMentionDataSource']=_0x400eba,this[_0x329654(0x181)]();}[_0xb40524(0x181)](){const _0x112fd8=_0xb40524;this[_0x112fd8(0x17d)][_0x112fd8(0x13b)]=this[_0x112fd8(0x163)],this['_threadCommentDataSourceService'][_0x112fd8(0x16a)]=!0x1,this[_0x112fd8(0x185)][_0x112fd8(0x13b)]=this['_threadCommentMentionDataSource'];}};S=le([_0x248609(_0x1ac694['Starting'],S),f(0x0,_0x221c7b),f(0x1,_0x4ad08d(D)),f(0x2,_0x35bb6c),f(0x3,_0x4ad08d(C))],S);var he=Object[_0xb40524(0x177)],ue=Object['getOwnPropertyDescriptor'],pe=(_0x3c9d63,_0x45cbc5,_0x47add7,_0x1a4157)=>{const _0x1e42f6=_0xb40524;for(var _0x4ed919=_0x1a4157>0x1?void 0x0:_0x1a4157?ue(_0x45cbc5,_0x47add7):_0x45cbc5,_0x4df62e=_0x3c9d63[_0x1e42f6(0x148)]-0x1,_0x4307e1;_0x4df62e>=0x0;_0x4df62e--)(_0x4307e1=_0x3c9d63[_0x4df62e])&&(_0x4ed919=(_0x1a4157?_0x4307e1(_0x45cbc5,_0x47add7,_0x4ed919):_0x4307e1(_0x4ed919))||_0x4ed919);return _0x1a4157&&_0x4ed919&&he(_0x45cbc5,_0x47add7,_0x4ed919),_0x4ed919;},I=(_0x8670cb,_0x1a9d68)=>(_0x2f0e76,_0x9a8e68)=>_0x1a9d68(_0x2f0e76,_0x9a8e68,_0x8670cb);let b=class extends _0x470db3{constructor(_0x5b72c0,_0x36dab4,_0x6b377d,_0x11a61f){const _0x4aebc2=_0xb40524;super(),this['_commentService']=_0x5b72c0,this[_0x4aebc2(0x186)]=_0x36dab4,this[_0x4aebc2(0x142)]=_0x6b377d,this[_0x4aebc2(0x15b)]=_0x11a61f,this[_0x4aebc2(0x134)](),this[_0x4aebc2(0x191)]();}[_0xb40524(0x191)](){const _0x1177a0=_0xb40524;this[_0x1177a0(0x13a)](this['_threadCommentModel'][_0x1177a0(0x192)]['pipe'](_0x135b07(0x10))[_0x1177a0(0x16d)](_0x134704=>{const _0x411d86=_0x1177a0,_0x4ddae4=new Set();_0x134704['forEach'](_0x361d37=>{const _0x3299db=_0x40d5;switch(_0x361d37[_0x3299db(0x1a4)]){case _0x3299db(0x18f):{const _0x1459d0=_0x361d37[_0x3299db(0x19d)][_0x3299db(0x1a1)];_0x4ddae4[_0x3299db(0x18f)](_0x1459d0);break;}}}),k(this[_0x411d86(0x15b)],_0x4ddae4);}));}['_init'](){const _0x70ef09=_0xb40524;this[_0x70ef09(0x13a)](this['_commentService']['commentUpdate$'][_0x70ef09(0x16d)](async _0x41f79d=>{const _0x30f9db=_0x70ef09;var _0x101395,_0x12fdee;const _0x11314b=this[_0x30f9db(0x186)][_0x30f9db(0x154)](_0x41f79d[_0x30f9db(0x188)],_0x41f79d['threadId']);if(!_0x11314b)return;const {unitId:_0x3d982a,subUnitId:_0x1fc574}=_0x11314b;switch(_0x41f79d[_0x30f9db(0x135)]&&this[_0x30f9db(0x142)][_0x30f9db(0x153)](_0x41f79d['user']),_0x41f79d[_0x30f9db(0x1a4)]){case p[_0x30f9db(0x137)]:break;case p[_0x30f9db(0x187)]:{this[_0x30f9db(0x186)][_0x30f9db(0x169)](_0x3d982a,_0x1fc574,{'unitId':_0x3d982a,'subUnitId':_0x1fc574,'ref':'','id':_0x41f79d[_0x30f9db(0x150)],'dT':w(+_0x41f79d[_0x30f9db(0x141)]),'threadId':_0x41f79d[_0x30f9db(0x14f)],'personId':(_0x12fdee=(_0x101395=_0x41f79d[_0x30f9db(0x135)])==null?void 0x0:_0x101395[_0x30f9db(0x197)])!=null?_0x12fdee:_0x41f79d[_0x30f9db(0x132)],'text':JSON[_0x30f9db(0x157)](_0x41f79d[_0x30f9db(0x170)]),'parentId':_0x11314b['id']});break;}case p['Delete']:{const _0x3b2acd=this[_0x30f9db(0x186)][_0x30f9db(0x158)](_0x3d982a,_0x1fc574,_0x41f79d[_0x30f9db(0x150)]);_0x3b2acd&&_0x3b2acd['parentId']&&this[_0x30f9db(0x186)]['deleteComment'](_0x3d982a,_0x1fc574,_0x41f79d[_0x30f9db(0x150)]);break;}case p[_0x30f9db(0x14b)]:{this[_0x30f9db(0x186)][_0x30f9db(0x138)](_0x3d982a,_0x1fc574,{'commentId':_0x41f79d[_0x30f9db(0x150)],'text':JSON[_0x30f9db(0x157)](_0x41f79d[_0x30f9db(0x170)])});break;}case p[_0x30f9db(0x131)]:{const _0x4a6c18=this[_0x30f9db(0x186)]['getThread'](_0x3d982a,_0x41f79d['threadId']);_0x4a6c18&&this[_0x30f9db(0x186)]['resolveComment'](_0x3d982a,_0x1fc574,_0x4a6c18['id'],_0x41f79d['solved']===v['Solved']);break;}}}));}};b=pe([_0x248609(_0x1ac694[_0xb40524(0x199)],b),I(0x0,_0x4ad08d(_0x34c4ff)),I(0x1,_0x4ad08d(_0x1ce34a)),I(0x2,_0x4ad08d(_0x570a4f)),I(0x3,_0x4ad08d(_0xfa0489))],b);const ve=_0xb40524(0x178),_e={};var Y=Object[_0xb40524(0x177)],fe=Object[_0xb40524(0x151)],Ie=(_0x5dd562,_0x3b26ed,_0x3e820a)=>_0x3b26ed in _0x5dd562?Y(_0x5dd562,_0x3b26ed,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e820a}):_0x5dd562[_0x3b26ed]=_0x3e820a,Se=(_0x38272e,_0x33d5c8,_0x550d4a,_0x59256e)=>{for(var _0x4d9e09=_0x59256e>0x1?void 0x0:_0x59256e?fe(_0x33d5c8,_0x550d4a):_0x33d5c8,_0xb2c1be=_0x38272e['length']-0x1,_0x297d0e;_0xb2c1be>=0x0;_0xb2c1be--)(_0x297d0e=_0x38272e[_0xb2c1be])&&(_0x4d9e09=(_0x59256e?_0x297d0e(_0x33d5c8,_0x550d4a,_0x4d9e09):_0x297d0e(_0x4d9e09))||_0x4d9e09);return _0x59256e&&_0x4d9e09&&Y(_0x33d5c8,_0x550d4a,_0x4d9e09),_0x4d9e09;},j=(_0x16db5f,_0x247856)=>(_0x45acfe,_0x50a20f)=>_0x247856(_0x45acfe,_0x50a20f,_0x16db5f),G=(_0xd1dc84,_0x10b1c2,_0x5a89bd)=>Ie(_0xd1dc84,typeof _0x10b1c2!=_0xb40524(0x16f)?_0x10b1c2+'':_0x10b1c2,_0x5a89bd);let O=class extends _0x6410d4{constructor(_0x437fca=_e,_0x5e4258,_0x2ead37){const _0x5a520b=_0xb40524;super(),this['_config']=_0x437fca,this['_injector']=_0x5e4258,this[_0x5a520b(0x198)]=_0x2ead37;const {..._0x3811ac}=this['_config'];this['_configService'][_0x5a520b(0x182)](ve,_0x3811ac);}[_0xb40524(0x139)](){const _0x5b2933=_0xb40524;[[C],[D],[S],[b]][_0x5b2933(0x173)](_0x2fb7f2=>{const _0xacf7e=_0x5b2933;this[_0xacf7e(0x15b)]['add'](_0x2fb7f2);});}};G(O,_0xb40524(0x172),X),G(O,_0xb40524(0x1a4),_0x1e316d[_0xb40524(0x168)]),O=Se([_0x5a57ce(_0x29e33c,_0x261fe5,_0x44bf59),j(0x1,_0x4ad08d(_0xfa0489)),j(0x2,_0x5e8d47)],O);function _0x40d5(_0x5be384,_0x401e5c){const _0x3e3e55=_0x3e3e();return _0x40d5=function(_0x40d5a1,_0xc80484){_0x40d5a1=_0x40d5a1-0x12e;let _0xcf6bac=_0x3e3e55[_0x40d5a1];return _0xcf6bac;},_0x40d5(_0x5be384,_0x401e5c);}export{O as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x31765f=_0x49f7;(function(_0x27b174,_0x351bf8){const _0x47081f=_0x49f7,_0x3d77cc=_0x27b174();while(!![]){try{const _0x15a444=parseInt(_0x47081f(0x1c7))/0x1+-parseInt(_0x47081f(0x198))/0x2+parseInt(_0x47081f(0x1fb))/0x3*(-parseInt(_0x47081f(0x1e7))/0x4)+parseInt(_0x47081f(0x1a6))/0x5+-parseInt(_0x47081f(0x1ba))/0x6+-parseInt(_0x47081f(0x1e0))/0x7*(parseInt(_0x47081f(0x1a2))/0x8)+parseInt(_0x47081f(0x1ab))/0x9*(parseInt(_0x47081f(0x19d))/0xa);if(_0x15a444===_0x351bf8)break;else _0x3d77cc['push'](_0x3d77cc['shift']());}catch(_0x4f2f97){_0x3d77cc['push'](_0x3d77cc['shift']());}}}(_0x4272,0x78e20));import{UserManagerService as _0x528d19,Inject as _0x239a9d,Injector as _0x2bb676,CustomRangeType as _0x3f4ed2,OnLifecycle as _0x5ed997,LifecycleStages as _0x10741d,Disposable as _0x2aabe1,UniverInstanceType as _0x339b2a,DependentOn as _0x126a73,Plugin as _0x51349b,IConfigService as _0x15d434}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x28c019,ThreadCommentModel as _0x299de3,UniverThreadCommentPlugin as _0x52dd79}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0xac6a15,UniverThreadCommentUIPlugin as _0x2efec0}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x94fa52,CommentService as _0x56df0e,UniverCollaborationClientPlugin as _0x41305d}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x2944ec}from'@univerjs/network';import _0x4468e2 from'dayjs';import{bufferTime as _0x357fd5}from'rxjs';const X=_0x31765f(0x1b3);var v=(_0x1c4bdb=>(_0x1c4bdb[_0x1c4bdb[_0x31765f(0x1c9)]=0x0]=_0x31765f(0x1c9),_0x1c4bdb[_0x1c4bdb[_0x31765f(0x19b)]=0x1]='Solved',_0x1c4bdb[_0x1c4bdb[_0x31765f(0x196)]=-0x1]=_0x31765f(0x196),_0x1c4bdb))(v||{}),p=(_0x29c962=>(_0x29c962[_0x29c962['Unknown']=0x0]=_0x31765f(0x1c0),_0x29c962[_0x29c962[_0x31765f(0x1cd)]=0x1]=_0x31765f(0x1cd),_0x29c962[_0x29c962[_0x31765f(0x1da)]=0x2]=_0x31765f(0x1da),_0x29c962[_0x29c962[_0x31765f(0x1a8)]=0x3]='Edit',_0x29c962[_0x29c962['Delete']=0x4]='Delete',_0x29c962[_0x29c962[_0x31765f(0x18c)]=0x5]='Solve',_0x29c962[_0x29c962['UNRECOGNIZED']=-0x1]=_0x31765f(0x196),_0x29c962))(p||{});function _0x49f7(_0x43b3c0,_0x18f6ac){const _0x42720e=_0x4272();return _0x49f7=function(_0x49f759,_0x52d958){_0x49f759=_0x49f759-0x189;let _0x472675=_0x42720e[_0x49f759];return _0x472675;},_0x49f7(_0x43b3c0,_0x18f6ac);}const w=_0x25961a=>_0x4468e2(new Date(+_0x25961a))[_0x31765f(0x1eb)](_0x31765f(0x1f6)),k=async(_0x357a2e,_0x4c97d0)=>{const _0xca85ef=_0x31765f,_0x293576=_0x357a2e[_0xca85ef(0x1aa)](_0x528d19),_0x31203e=_0x357a2e['get'](_0x2944ec);_0x4c97d0['forEach'](_0x5aba22=>{const _0x50fefc=_0xca85ef;_0x293576[_0x50fefc(0x1c4)](_0x5aba22)&&_0x4c97d0[_0x50fefc(0x1bc)](_0x5aba22);}),_0x4c97d0[_0xca85ef(0x1af)]&&(await _0x31203e[_0xca85ef(0x1aa)](_0xca85ef(0x1f2),{'params':{'userIDs':[..._0x4c97d0]}}))[_0xca85ef(0x193)][_0xca85ef(0x19a)][_0xca85ef(0x1de)](_0x4f8a4d=>{const _0x3a60f3=_0xca85ef;_0x4f8a4d&&_0x293576[_0x3a60f3(0x1b8)](_0x4f8a4d);});};var ee=Object[_0x31765f(0x18a)],re=Object['getOwnPropertyDescriptor'],te=(_0x177611,_0x5780c9,_0x27e1af,_0x34fbd7)=>{for(var _0x1f0374=_0x34fbd7>0x1?void 0x0:_0x34fbd7?re(_0x5780c9,_0x27e1af):_0x5780c9,_0x51cae4=_0x177611['length']-0x1,_0x117cce;_0x51cae4>=0x0;_0x51cae4--)(_0x117cce=_0x177611[_0x51cae4])&&(_0x1f0374=(_0x34fbd7?_0x117cce(_0x5780c9,_0x27e1af,_0x1f0374):_0x117cce(_0x1f0374))||_0x1f0374);return _0x34fbd7&&_0x1f0374&&ee(_0x5780c9,_0x27e1af,_0x1f0374),_0x1f0374;},_=(_0x4d161b,_0x554e91)=>(_0x87cdc,_0x412e08)=>_0x554e91(_0x87cdc,_0x412e08,_0x4d161b);function se(_0x4986dd,_0x17afb7){const _0x83943b=_0x31765f,_0x2dea7a=_0x4986dd[_0x83943b(0x1a5)][0x0];return{..._0x17afb7,'id':_0x2dea7a[_0x83943b(0x1b9)],'resolved':_0x4986dd['solved']===0x1,'dT':w(_0x2dea7a['createTimestamp']),'personId':_0x2dea7a[_0x83943b(0x1ca)],'threadId':_0x2dea7a[_0x83943b(0x18f)]};}function oe(_0x13c882,_0x5244e6,_0x1912be){const _0x2e5bb8=_0x31765f;var _0x20aa65,_0x1aa4fc;if(((_0x1aa4fc=(_0x20aa65=_0x13c882==null?void 0x0:_0x13c882['replies'])==null?void 0x0:_0x20aa65[_0x2e5bb8(0x1e9)])!=null?_0x1aa4fc:0x0)>0x0){const _0x1a05d4=(_0x2e2e10,_0x12d4be)=>({'id':_0x2e2e10['replyId'],'threadId':_0x2e2e10[_0x2e5bb8(0x18f)],'dT':w(_0x2e2e10[_0x2e5bb8(0x1b5)]),'personId':_0x2e2e10[_0x2e5bb8(0x1ca)],'resolved':_0x13c882[_0x2e5bb8(0x1b4)]===v[_0x2e5bb8(0x19b)],'unitId':_0x5244e6,'subUnitId':_0x1912be,'text':JSON['parse'](_0x2e2e10[_0x2e5bb8(0x1ac)]),'parentId':_0x12d4be}),_0x882f13=_0x1a05d4(_0x13c882[_0x2e5bb8(0x1a5)][0x0]);return{..._0x882f13,'children':_0x13c882[_0x2e5bb8(0x1a5)][_0x2e5bb8(0x1ae)](0x1)['map'](_0x18f6dd=>_0x1a05d4(_0x18f6dd,_0x882f13['id']))};}return null;}let D=class{constructor(_0x76ef52,_0xe25453,_0x3dcea3,_0x4c89cb){const _0x10f4da=_0x31765f;this[_0x10f4da(0x1a7)]=_0x76ef52,this['_userService']=_0xe25453,this[_0x10f4da(0x1dd)]=_0x3dcea3,this[_0x10f4da(0x194)]=_0x4c89cb;}async[_0x31765f(0x1c6)](_0x51dc9e){const _0x1080ec=_0x31765f;var _0x245c6f,_0xe03186;const {parentId:_0x5a1501,unitId:_0x4b4d1e,text:_0x215906,threadId:_0x43b229}=_0x51dc9e,_0x62ef96=(_0xe03186=(_0x245c6f=_0x215906['customRanges'])==null?void 0x0:_0x245c6f[_0x1080ec(0x1ed)](_0x165785=>_0x165785[_0x1080ec(0x1cc)]===_0x3f4ed2[_0x1080ec(0x1e6)])['map'](_0x546704=>_0x546704[_0x1080ec(0x1a1)]))!=null?_0xe03186:[],_0x14dfdf=JSON[_0x1080ec(0x1c8)](_0x215906),_0x1e2fb5=(await this[_0x1080ec(0x1dd)][_0x1080ec(0x1a9)](_0x4b4d1e))[_0x1080ec(0x1f8)]();if(_0x5a1501){const _0x35f7fc={'memberId':_0x1e2fb5,'unitId':_0x4b4d1e,'content':_0x14dfdf,'mention':_0x62ef96,'threadId':_0x43b229},_0x11ef3f=(await this[_0x1080ec(0x1a7)]['post'](_0x1080ec(0x1d0)+_0x4b4d1e+_0x1080ec(0x1f9),{'body':_0x35f7fc}))[_0x1080ec(0x193)][_0x1080ec(0x1f3)];return{..._0x51dc9e,'id':_0x11ef3f['replyId'],'dT':_0x4468e2(+_0x11ef3f['createTimestamp'])[_0x1080ec(0x1eb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x11ef3f['userId']};}else{const _0x1fbf7d={'memberId':_0x1e2fb5,'unitId':_0x4b4d1e,'content':_0x14dfdf,'mention':_0x62ef96},_0xfbc2b0=await this[_0x1080ec(0x1a7)][_0x1080ec(0x195)](_0x1080ec(0x1d0)+_0x4b4d1e+_0x1080ec(0x1fa),{'body':_0x1fbf7d});return se(_0xfbc2b0[_0x1080ec(0x193)][_0x1080ec(0x19c)],_0x51dc9e);}}async[_0x31765f(0x1c5)](_0x44a7af){const _0x4990c6=_0x31765f;var _0x3fb743,_0x169945;const {text:_0x568730,unitId:_0x4dcb20}=_0x44a7af,_0x2c29fa=(_0x169945=(_0x3fb743=_0x568730['customRanges'])==null?void 0x0:_0x3fb743['filter'](_0x3eb537=>_0x3eb537[_0x4990c6(0x1cc)]===_0x3f4ed2[_0x4990c6(0x1e6)])[_0x4990c6(0x1bf)](_0x1be5f5=>_0x1be5f5[_0x4990c6(0x1a1)]))!=null?_0x169945:[],_0x53df80=JSON[_0x4990c6(0x1c8)](_0x568730),_0x50f60c=_0x44a7af[_0x4990c6(0x18f)],_0x50dead=_0x44a7af['id'],_0x398903={'memberId':(await this['_sessionService']['requireSession'](_0x4dcb20))[_0x4990c6(0x1f8)](),'unitId':_0x4dcb20,'threadId':_0x50f60c,'mention':_0x2c29fa,'content':_0x53df80,'replyId':_0x50dead},_0x17d5b2=await this[_0x4990c6(0x1a7)][_0x4990c6(0x195)](_0x4990c6(0x1d0)+_0x4dcb20+_0x4990c6(0x18b),{'body':_0x398903});return!_0x17d5b2[_0x4990c6(0x193)][_0x4990c6(0x1b7)]||_0x17d5b2[_0x4990c6(0x193)][_0x4990c6(0x1b7)]['code']===0x1;}async[_0x31765f(0x1f0)](_0x238e00){const _0x18b39f=_0x31765f,{unitId:_0x190f79}=_0x238e00,_0x5b317f=_0x238e00[_0x18b39f(0x18f)],_0x4b8448={'memberId':this[_0x18b39f(0x1b2)][_0x18b39f(0x1ea)]()[_0x18b39f(0x1d6)],'unitId':_0x190f79,'threadId':_0x5b317f,'solved':_0x238e00[_0x18b39f(0x1c3)]?v[_0x18b39f(0x19b)]:v[_0x18b39f(0x1c9)]},_0x5c8149=await this[_0x18b39f(0x1a7)]['post']('/universer-api/comment/unit/'+_0x190f79+_0x18b39f(0x1d3),{'body':_0x4b8448});return!_0x5c8149[_0x18b39f(0x193)]['error']||_0x5c8149[_0x18b39f(0x193)][_0x18b39f(0x1b7)][_0x18b39f(0x1d7)]===0x1;}async[_0x31765f(0x1e2)](_0x4099b1,_0x25d029,_0x4e03dd,_0x1fbe03){const _0x90bdfe=_0x31765f,_0x427ee6={'memberId':(await this['_sessionService'][_0x90bdfe(0x1a9)](_0x4099b1))['getMemberID'](),'threadId':_0x4e03dd,'replyId':_0x1fbe03,'unitId':_0x4099b1},_0x549f9c=await this[_0x90bdfe(0x1a7)]['post']('/universer-api/comment/unit/'+_0x4099b1+'/delete',{'body':_0x427ee6});return!_0x549f9c['body'][_0x90bdfe(0x1b7)]||_0x549f9c[_0x90bdfe(0x193)][_0x90bdfe(0x1b7)]['code']===0x1;}async['listComments'](_0x5d4ac1,_0x21b1d1,_0x178acd){const _0x3c76c8=_0x31765f,_0xd0c769={'unitId':_0x5d4ac1,'threadId':_0x178acd},_0x455aa4=await this[_0x3c76c8(0x1a7)]['post'](_0x3c76c8(0x1d0)+_0x5d4ac1+_0x3c76c8(0x1ce),{'body':_0xd0c769}),_0x20eb12=_0x178acd[_0x3c76c8(0x1bf)](_0x4569f3=>oe(_0x455aa4['body']['comments'][_0x4569f3],_0x5d4ac1,_0x21b1d1))['filter'](Boolean);return Object[_0x3c76c8(0x1e1)](_0x455aa4[_0x3c76c8(0x193)][_0x3c76c8(0x19a)])[_0x3c76c8(0x1de)](_0x4d15bf=>{const _0x24758a=_0x3c76c8;this[_0x24758a(0x1b2)][_0x24758a(0x1b8)](_0x4d15bf);}),_0x20eb12;}[_0x31765f(0x19f)](_0x470de4){const _0x5f2734=_0x31765f;return{'id':_0x470de4['id'],'threadId':_0x470de4[_0x5f2734(0x18f)],'ref':_0x470de4[_0x5f2734(0x1e5)]};}};D=te([_(0x0,_0x239a9d(_0x2944ec)),_(0x1,_0x239a9d(_0x528d19)),_(0x2,_0x239a9d(_0x94fa52)),_(0x3,_0x239a9d(_0x2bb676))],D);var ne=Object[_0x31765f(0x18a)],ie=Object['getOwnPropertyDescriptor'],ae=(_0xa84aaa,_0x120271,_0x152121,_0xe8727d)=>{const _0x8147f2=_0x31765f;for(var _0x43aaf1=_0xe8727d>0x1?void 0x0:_0xe8727d?ie(_0x120271,_0x152121):_0x120271,_0xcd7f3d=_0xa84aaa[_0x8147f2(0x1e9)]-0x1,_0x4b4098;_0xcd7f3d>=0x0;_0xcd7f3d--)(_0x4b4098=_0xa84aaa[_0xcd7f3d])&&(_0x43aaf1=(_0xe8727d?_0x4b4098(_0x120271,_0x152121,_0x43aaf1):_0x4b4098(_0x43aaf1))||_0x43aaf1);return _0xe8727d&&_0x43aaf1&&ne(_0x120271,_0x152121,_0x43aaf1),_0x43aaf1;},ce=(_0x169dcc,_0x51921e)=>(_0x3f9085,_0xcb1c19)=>_0x51921e(_0x3f9085,_0xcb1c19,_0x169dcc);let C=class{constructor(_0x3adf80){const _0x1c0b81=_0x31765f;this[_0x1c0b81(0x1a7)]=_0x3adf80;}async[_0x31765f(0x1b0)](_0x77ed5c,_0x138dcc,_0x1547e1){const _0x23d305=_0x31765f,_0x3e7f91=new URL(window[_0x23d305(0x1f1)]['href'])[_0x23d305(0x197)][_0x23d305(0x1aa)]('unit');if(!_0x3e7f91)return[];const _0x1e478b=window['location'][_0x23d305(0x1d4)],_0x1815e3=window['location']['protocol']==='https:'?_0x23d305(0x1a4):_0x23d305(0x1a0);return(await this['_httpService'][_0x23d305(0x1aa)](_0x1815e3+_0x23d305(0x1c1)+_0x1e478b+_0x23d305(0x1be),{'params':{'objectID':_0x3e7f91,'unitID':_0x3e7f91}}))[_0x23d305(0x193)]['collaborators'][_0x23d305(0x1bf)](_0x174129=>{const _0x3625a8=_0x23d305;var _0x26a3ec,_0x148f5d,_0x10ebfb,_0x2f0041,_0x16e2af,_0x5486c4;return{'id':(_0x148f5d=(_0x26a3ec=_0x174129[_0x3625a8(0x1ec)])==null?void 0x0:_0x26a3ec[_0x3625a8(0x1d6)])!=null?_0x148f5d:'','label':(_0x2f0041=(_0x10ebfb=_0x174129[_0x3625a8(0x1ec)])==null?void 0x0:_0x10ebfb[_0x3625a8(0x1ad)])!=null?_0x2f0041:'','icon':(_0x5486c4=(_0x16e2af=_0x174129[_0x3625a8(0x1ec)])==null?void 0x0:_0x16e2af[_0x3625a8(0x1d8)])!=null?_0x5486c4:'','type':_0x3625a8(0x1db)};});}};C=ae([ce(0x0,_0x239a9d(_0x2944ec))],C);var de=Object['defineProperty'],me=Object[_0x31765f(0x1e4)],le=(_0x27a0d2,_0x166e2a,_0x3dd188,_0x56102a)=>{const _0x3956bb=_0x31765f;for(var _0x341dec=_0x56102a>0x1?void 0x0:_0x56102a?me(_0x166e2a,_0x3dd188):_0x166e2a,_0x2da5c8=_0x27a0d2[_0x3956bb(0x1e9)]-0x1,_0x3b0d02;_0x2da5c8>=0x0;_0x2da5c8--)(_0x3b0d02=_0x27a0d2[_0x2da5c8])&&(_0x341dec=(_0x56102a?_0x3b0d02(_0x166e2a,_0x3dd188,_0x341dec):_0x3b0d02(_0x341dec))||_0x341dec);return _0x56102a&&_0x341dec&&de(_0x166e2a,_0x3dd188,_0x341dec),_0x341dec;},f=(_0x4a582c,_0x18c048)=>(_0x588c1f,_0x16c7ed)=>_0x18c048(_0x588c1f,_0x16c7ed,_0x4a582c);let S=class extends _0x2aabe1{constructor(_0x1bacde,_0x3f895e,_0x2332ec,_0x3b6a92){const _0x23037c=_0x31765f;super(),this[_0x23037c(0x190)]=_0x1bacde,this[_0x23037c(0x191)]=_0x3f895e,this[_0x23037c(0x1b6)]=_0x2332ec,this[_0x23037c(0x1d5)]=_0x3b6a92,this[_0x23037c(0x1d2)]();}[_0x31765f(0x1d2)](){const _0x380d0c=_0x31765f;this[_0x380d0c(0x190)][_0x380d0c(0x1c2)]=this[_0x380d0c(0x191)],this[_0x380d0c(0x190)][_0x380d0c(0x192)]=!0x1,this['_threadCommentMentionDataService'][_0x380d0c(0x1c2)]=this['_threadCommentMentionDataSource'];}};S=le([_0x5ed997(_0x10741d[_0x31765f(0x18d)],S),f(0x0,_0x28c019),f(0x1,_0x239a9d(D)),f(0x2,_0xac6a15),f(0x3,_0x239a9d(C))],S);var he=Object[_0x31765f(0x18a)],ue=Object[_0x31765f(0x1e4)],pe=(_0x2fd3b5,_0x3c3af6,_0x16a15f,_0x582dcc)=>{const _0x4f9016=_0x31765f;for(var _0xe74216=_0x582dcc>0x1?void 0x0:_0x582dcc?ue(_0x3c3af6,_0x16a15f):_0x3c3af6,_0x402a3d=_0x2fd3b5[_0x4f9016(0x1e9)]-0x1,_0x205b1a;_0x402a3d>=0x0;_0x402a3d--)(_0x205b1a=_0x2fd3b5[_0x402a3d])&&(_0xe74216=(_0x582dcc?_0x205b1a(_0x3c3af6,_0x16a15f,_0xe74216):_0x205b1a(_0xe74216))||_0xe74216);return _0x582dcc&&_0xe74216&&he(_0x3c3af6,_0x16a15f,_0xe74216),_0xe74216;},I=(_0x539204,_0x2f5f91)=>(_0x3b3a37,_0x51b68a)=>_0x2f5f91(_0x3b3a37,_0x51b68a,_0x539204);let b=class extends _0x2aabe1{constructor(_0x3a3eea,_0x3bacce,_0x3807fd,_0x56910d){const _0x1812d5=_0x31765f;super(),this[_0x1812d5(0x199)]=_0x3a3eea,this[_0x1812d5(0x1f4)]=_0x3bacce,this[_0x1812d5(0x1b2)]=_0x3807fd,this[_0x1812d5(0x194)]=_0x56910d,this[_0x1812d5(0x1ee)](),this[_0x1812d5(0x1ef)]();}['_initUserSync'](){const _0x194d1f=_0x31765f;this[_0x194d1f(0x1e8)](this[_0x194d1f(0x1f4)][_0x194d1f(0x1d9)][_0x194d1f(0x18e)](_0x357fd5(0x10))[_0x194d1f(0x1dc)](_0x1c4d80=>{const _0x533f33=new Set();_0x1c4d80['forEach'](_0x316229=>{const _0x355ab2=_0x49f7;switch(_0x316229['type']){case _0x355ab2(0x1d1):{const _0x10a50a=_0x316229['payload'][_0x355ab2(0x189)];_0x533f33[_0x355ab2(0x1d1)](_0x10a50a);break;}}}),k(this['_injector'],_0x533f33);}));}[_0x31765f(0x1ee)](){const _0x450306=_0x31765f;this[_0x450306(0x1e8)](this[_0x450306(0x199)]['commentUpdate$'][_0x450306(0x1dc)](async _0x5e0f08=>{const _0xd25802=_0x450306;var _0x3a250a,_0x49f5d0;const _0x1ccf95=this[_0xd25802(0x1f4)]['getThread'](_0x5e0f08[_0xd25802(0x1b1)],_0x5e0f08[_0xd25802(0x18f)]);if(!_0x1ccf95)return;const {unitId:_0x17e7bd,subUnitId:_0x202b06}=_0x1ccf95;switch(_0x5e0f08[_0xd25802(0x1db)]&&this[_0xd25802(0x1b2)]['addUser'](_0x5e0f08['user']),_0x5e0f08[_0xd25802(0x1cf)]){case p['Add']:break;case p[_0xd25802(0x1da)]:{this[_0xd25802(0x1f4)]['addComment'](_0x17e7bd,_0x202b06,{'unitId':_0x17e7bd,'subUnitId':_0x202b06,'ref':'','id':_0x5e0f08[_0xd25802(0x1b9)],'dT':w(+_0x5e0f08[_0xd25802(0x1b5)]),'threadId':_0x5e0f08[_0xd25802(0x18f)],'personId':(_0x49f5d0=(_0x3a250a=_0x5e0f08[_0xd25802(0x1db)])==null?void 0x0:_0x3a250a[_0xd25802(0x1d6)])!=null?_0x49f5d0:_0x5e0f08[_0xd25802(0x1ca)],'text':JSON[_0xd25802(0x1f5)](_0x5e0f08[_0xd25802(0x1ac)]),'parentId':_0x1ccf95['id']});break;}case p[_0xd25802(0x1bb)]:{const _0x295d47=this['_threadCommentModel'][_0xd25802(0x19e)](_0x17e7bd,_0x202b06,_0x5e0f08['replyId']);_0x295d47&&_0x295d47[_0xd25802(0x1df)]&&this[_0xd25802(0x1f4)][_0xd25802(0x1e2)](_0x17e7bd,_0x202b06,_0x5e0f08['replyId']);break;}case p[_0xd25802(0x1a8)]:{this[_0xd25802(0x1f4)]['updateComment'](_0x17e7bd,_0x202b06,{'commentId':_0x5e0f08[_0xd25802(0x1b9)],'text':JSON['parse'](_0x5e0f08[_0xd25802(0x1ac)])});break;}case p[_0xd25802(0x18c)]:{const _0x51b2b2=this[_0xd25802(0x1f4)][_0xd25802(0x1a3)](_0x17e7bd,_0x5e0f08[_0xd25802(0x18f)]);_0x51b2b2&&this[_0xd25802(0x1f4)][_0xd25802(0x1f0)](_0x17e7bd,_0x202b06,_0x51b2b2['id'],_0x5e0f08['solved']===v[_0xd25802(0x19b)]);break;}}}));}};b=pe([_0x5ed997(_0x10741d[_0x31765f(0x1e3)],b),I(0x0,_0x239a9d(_0x56df0e)),I(0x1,_0x239a9d(_0x299de3)),I(0x2,_0x239a9d(_0x528d19)),I(0x3,_0x239a9d(_0x2bb676))],b);function _0x4272(){const _0x5b4ace=['/solved','host','_threadCommentMentionDataSource','userID','code','avatar','commentUpdate$','Reply','user','subscribe','_sessionService','forEach','parentId','686qmOutL','values','deleteComment','Ready','getOwnPropertyDescriptor','ref','COMMENT','276sOhkKJ','disposeWithMe','length','getCurrentUser','format','subject','filter','_init','_initUserSync','resolveComment','location','/universer-api/user/list','reply','_threadCommentModel','parse','YYYY/MM/DD\x20HH:mm','_config','getMemberID','/reply','/add','26694KIXHIX','personId','defineProperty','/edit','Solve','Starting','pipe','threadId','_threadCommentDataSourceService','_threadCommentDataSource','syncUpdateMutationToColla','body','_injector','post','UNRECOGNIZED','searchParams','1855198XIUluK','_commentService','users','Solved','comment','280MONmQI','getComment','saveCommentToSnapshot','http','rangeId','78824gQlFqm','getThread','https','replies','331570TxwVOm','_httpService','Edit','requireSession','get','998388BhLRDA','content','name','slice','size','getMentions','unitId','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','createTimestamp','_threadCommentMentionDataService','error','addUser','replyId','5265192andlMg','Delete','delete','_configService','/universer-api/authz/collaborator','map','Unknown','://','dataSource','resolved','getUser','updateComment','addComment','707413nxknAd','stringify','OpenOrReOpen','userId','onStarting','rangeType','Add','/list','type','/universer-api/comment/unit/','add','_initDataSource'];_0x4272=function(){return _0x5b4ace;};return _0x4272();}const ve='thread-comment-data-source.config',_e={};var Y=Object[_0x31765f(0x18a)],fe=Object[_0x31765f(0x1e4)],Ie=(_0x242dca,_0x37a461,_0x492287)=>_0x37a461 in _0x242dca?Y(_0x242dca,_0x37a461,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x492287}):_0x242dca[_0x37a461]=_0x492287,Se=(_0x565948,_0x228ffa,_0x15cee4,_0x14af0c)=>{const _0x547ec1=_0x31765f;for(var _0x3df0a0=_0x14af0c>0x1?void 0x0:_0x14af0c?fe(_0x228ffa,_0x15cee4):_0x228ffa,_0xc7eb5b=_0x565948[_0x547ec1(0x1e9)]-0x1,_0x53c17b;_0xc7eb5b>=0x0;_0xc7eb5b--)(_0x53c17b=_0x565948[_0xc7eb5b])&&(_0x3df0a0=(_0x14af0c?_0x53c17b(_0x228ffa,_0x15cee4,_0x3df0a0):_0x53c17b(_0x3df0a0))||_0x3df0a0);return _0x14af0c&&_0x3df0a0&&Y(_0x228ffa,_0x15cee4,_0x3df0a0),_0x3df0a0;},j=(_0x1de245,_0xe7f0c2)=>(_0x5167fa,_0x3f8856)=>_0xe7f0c2(_0x5167fa,_0x3f8856,_0x1de245),G=(_0x112ae7,_0x3f3a9a,_0x4ed1cc)=>Ie(_0x112ae7,typeof _0x3f3a9a!='symbol'?_0x3f3a9a+'':_0x3f3a9a,_0x4ed1cc);let O=class extends _0x51349b{constructor(_0x1f77c2=_e,_0xaecccf,_0x228b3e){const _0x2cc739=_0x31765f;super(),this[_0x2cc739(0x1f7)]=_0x1f77c2,this[_0x2cc739(0x194)]=_0xaecccf,this['_configService']=_0x228b3e;const {..._0x27b173}=this[_0x2cc739(0x1f7)];this[_0x2cc739(0x1bd)]['setConfig'](ve,_0x27b173);}[_0x31765f(0x1cb)](){const _0x6c530f=_0x31765f;[[C],[D],[S],[b]][_0x6c530f(0x1de)](_0x6dec22=>{const _0x17a663=_0x6c530f;this[_0x17a663(0x194)][_0x17a663(0x1d1)](_0x6dec22);});}};G(O,'pluginName',X),G(O,_0x31765f(0x1cf),_0x339b2a['UNIVER_UNKNOWN']),O=Se([_0x126a73(_0x52dd79,_0x2efec0,_0x41305d),j(0x1,_0x239a9d(_0x2bb676)),j(0x2,_0x15d434)],O);export{O as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4acd7b,_0x50412e){const _0x41daff=_0x305b,_0x55af84=_0x4acd7b();while(!![]){try{const _0x3d6eb9=parseInt(_0x41daff(0x11d))/0x1+-parseInt(_0x41daff(0xc0))/0x2*(parseInt(_0x41daff(0xf8))/0x3)+parseInt(_0x41daff(0x107))/0x4*(-parseInt(_0x41daff(0xdf))/0x5)+parseInt(_0x41daff(0x10a))/0x6+-parseInt(_0x41daff(0xbe))/0x7+-parseInt(_0x41daff(0xe8))/0x8*(parseInt(_0x41daff(0x109))/0x9)+parseInt(_0x41daff(0xd0))/0xa;if(_0x3d6eb9===_0x50412e)break;else _0x55af84['push'](_0x55af84['shift']());}catch(_0x31abb3){_0x55af84['push'](_0x55af84['shift']());}}}(_0x563b,0x2eae4),function(_0x5ea428,_0x14d007){const _0x4597a6=_0x305b;typeof exports==_0x4597a6(0xf6)&&typeof module<'u'?_0x14d007(exports,require(_0x4597a6(0x133)),require(_0x4597a6(0xac)),require(_0x4597a6(0xb9)),require(_0x4597a6(0xec)),require(_0x4597a6(0xdd)),require('dayjs'),require('rxjs')):typeof define==_0x4597a6(0xcc)&&define[_0x4597a6(0x104)]?define([_0x4597a6(0xb3),_0x4597a6(0x133),_0x4597a6(0xac),_0x4597a6(0xb9),_0x4597a6(0xec),'@univerjs/network',_0x4597a6(0x10f),_0x4597a6(0xd5)],_0x14d007):(_0x5ea428=typeof globalThis<'u'?globalThis:_0x5ea428||self,_0x14d007(_0x5ea428[_0x4597a6(0xcf)]={},_0x5ea428['UniverCore'],_0x5ea428['UniverThreadComment'],_0x5ea428['UniverThreadCommentUi'],_0x5ea428[_0x4597a6(0xb7)],_0x5ea428[_0x4597a6(0x112)],_0x5ea428['dayjs'],_0x5ea428[_0x4597a6(0xd5)]));}(this,function(_0x516bfc,_0x9e79b8,_0x5aad9f,_0x5d023b,_0x11de0e,_0x4a978f,_0x44dd6c,_0x7271f8){'use strict';const _0x243cdf=_0x305b;const _0x24a0ce=_0x243cdf(0x11f);var _0xb2798d=(_0x578fee=>(_0x578fee[_0x578fee[_0x243cdf(0xde)]=0x0]=_0x243cdf(0xde),_0x578fee[_0x578fee[_0x243cdf(0xb2)]=0x1]=_0x243cdf(0xb2),_0x578fee[_0x578fee[_0x243cdf(0xae)]=-0x1]='UNRECOGNIZED',_0x578fee))(_0xb2798d||{}),_0x2a6887=(_0xaa338a=>(_0xaa338a[_0xaa338a[_0x243cdf(0xef)]=0x0]='Unknown',_0xaa338a[_0xaa338a[_0x243cdf(0xc8)]=0x1]='Add',_0xaa338a[_0xaa338a['Reply']=0x2]=_0x243cdf(0xff),_0xaa338a[_0xaa338a[_0x243cdf(0xa9)]=0x3]=_0x243cdf(0xa9),_0xaa338a[_0xaa338a['Delete']=0x4]=_0x243cdf(0xce),_0xaa338a[_0xaa338a[_0x243cdf(0x130)]=0x5]=_0x243cdf(0x130),_0xaa338a[_0xaa338a['UNRECOGNIZED']=-0x1]=_0x243cdf(0xae),_0xaa338a))(_0x2a6887||{});const _0x3e0c9c=_0xcba73d=>_0x44dd6c(new Date(+_0xcba73d))[_0x243cdf(0x11c)]('YYYY/MM/DD\x20HH:mm'),_0x38626a=async(_0x2d0877,_0x34f5ec)=>{const _0x713671=_0x243cdf,_0x5d0634=_0x2d0877[_0x713671(0xf4)](_0x9e79b8[_0x713671(0x11e)]),_0x4ae36b=_0x2d0877[_0x713671(0xf4)](_0x4a978f['HTTPService']);_0x34f5ec[_0x713671(0xad)](_0x1f995e=>{const _0x37e01f=_0x713671;_0x5d0634[_0x37e01f(0xf2)](_0x1f995e)&&_0x34f5ec[_0x37e01f(0xca)](_0x1f995e);}),_0x34f5ec['size']&&(await _0x4ae36b[_0x713671(0xf4)](_0x713671(0xe9),{'params':{'userIDs':[..._0x34f5ec]}}))[_0x713671(0xc4)][_0x713671(0x132)][_0x713671(0xad)](_0x341f04=>{const _0x14be4f=_0x713671;_0x341f04&&_0x5d0634[_0x14be4f(0xaa)](_0x341f04);});};var _0x21a1cd=Object[_0x243cdf(0xf1)],_0x2add44=Object[_0x243cdf(0x11b)],_0x514fe4=(_0x797631,_0x17290b,_0x349f89,_0x466098)=>{const _0x19589a=_0x243cdf;for(var _0x3075ec=_0x466098>0x1?void 0x0:_0x466098?_0x2add44(_0x17290b,_0x349f89):_0x17290b,_0x5572b7=_0x797631[_0x19589a(0x131)]-0x1,_0x1dd2a0;_0x5572b7>=0x0;_0x5572b7--)(_0x1dd2a0=_0x797631[_0x5572b7])&&(_0x3075ec=(_0x466098?_0x1dd2a0(_0x17290b,_0x349f89,_0x3075ec):_0x1dd2a0(_0x3075ec))||_0x3075ec);return _0x466098&&_0x3075ec&&_0x21a1cd(_0x17290b,_0x349f89,_0x3075ec),_0x3075ec;},_0x10409c=(_0x1e0ef3,_0x30e1a8)=>(_0x2ce3d9,_0x429741)=>_0x30e1a8(_0x2ce3d9,_0x429741,_0x1e0ef3);function _0x18316b(_0x4bb192,_0x28bac0){const _0x4414cf=_0x243cdf,_0x912d08=_0x4bb192[_0x4414cf(0xc2)][0x0];return{..._0x28bac0,'id':_0x912d08['replyId'],'resolved':_0x4bb192[_0x4414cf(0xda)]===0x1,'dT':_0x3e0c9c(_0x912d08['createTimestamp']),'personId':_0x912d08[_0x4414cf(0x136)],'threadId':_0x912d08[_0x4414cf(0x135)]};}function _0x1f98fb(_0x359b24,_0x321cec,_0x5e2982){const _0x4454aa=_0x243cdf;var _0x1ba648,_0x4a75d4;if(((_0x4a75d4=(_0x1ba648=_0x359b24==null?void 0x0:_0x359b24[_0x4454aa(0xc2)])==null?void 0x0:_0x1ba648['length'])!=null?_0x4a75d4:0x0)>0x0){const _0x4d8b85=(_0x2b1751,_0x2bf83a)=>({'id':_0x2b1751[_0x4454aa(0x13a)],'threadId':_0x2b1751['threadId'],'dT':_0x3e0c9c(_0x2b1751[_0x4454aa(0x138)]),'personId':_0x2b1751[_0x4454aa(0x136)],'resolved':_0x359b24['solved']===_0xb2798d['Solved'],'unitId':_0x321cec,'subUnitId':_0x5e2982,'text':JSON[_0x4454aa(0x13d)](_0x2b1751[_0x4454aa(0xfa)]),'parentId':_0x2bf83a}),_0x54fa30=_0x4d8b85(_0x359b24[_0x4454aa(0xc2)][0x0]);return{..._0x54fa30,'children':_0x359b24[_0x4454aa(0xc2)][_0x4454aa(0xd1)](0x1)[_0x4454aa(0x113)](_0x5d9e9a=>_0x4d8b85(_0x5d9e9a,_0x54fa30['id']))};}return null;}let _0x1102d2=class{constructor(_0x28d17a,_0x2322f5,_0x5b0eb8,_0x1a5f4f){const _0x5d83b3=_0x243cdf;this[_0x5d83b3(0xe4)]=_0x28d17a,this['_userService']=_0x2322f5,this[_0x5d83b3(0xbb)]=_0x5b0eb8,this['_injector']=_0x1a5f4f;}async[_0x243cdf(0xfc)](_0xd379e2){const _0x1f9d08=_0x243cdf;var _0x47738a,_0x56e5d0;const {parentId:_0x49cbc5,unitId:_0x11fd0e,text:_0xf9763,threadId:_0x28a16d}=_0xd379e2,_0x1596c5=(_0x56e5d0=(_0x47738a=_0xf9763[_0x1f9d08(0xbf)])==null?void 0x0:_0x47738a[_0x1f9d08(0xbd)](_0x1a7ae6=>_0x1a7ae6[_0x1f9d08(0x110)]===_0x9e79b8[_0x1f9d08(0x123)][_0x1f9d08(0x10c)])[_0x1f9d08(0x113)](_0x2a7c66=>_0x2a7c66[_0x1f9d08(0x106)]))!=null?_0x56e5d0:[],_0x41ecff=JSON['stringify'](_0xf9763),_0x4b9430=(await this[_0x1f9d08(0xbb)][_0x1f9d08(0x102)](_0x11fd0e))[_0x1f9d08(0xf7)]();if(_0x49cbc5){const _0x3ea833={'memberId':_0x4b9430,'unitId':_0x11fd0e,'content':_0x41ecff,'mention':_0x1596c5,'threadId':_0x28a16d},_0x45792d=(await this['_httpService']['post'](_0x1f9d08(0x10b)+_0x11fd0e+_0x1f9d08(0xab),{'body':_0x3ea833}))[_0x1f9d08(0xc4)][_0x1f9d08(0x12b)];return{..._0xd379e2,'id':_0x45792d[_0x1f9d08(0x13a)],'dT':_0x44dd6c(+_0x45792d[_0x1f9d08(0x138)])[_0x1f9d08(0x11c)](_0x1f9d08(0xd2)),'personId':_0x45792d[_0x1f9d08(0x136)]};}else{const _0xfa4a28={'memberId':_0x4b9430,'unitId':_0x11fd0e,'content':_0x41ecff,'mention':_0x1596c5},_0x5d3ab8=await this['_httpService'][_0x1f9d08(0x114)](_0x1f9d08(0x10b)+_0x11fd0e+_0x1f9d08(0xd8),{'body':_0xfa4a28});return _0x18316b(_0x5d3ab8['body'][_0x1f9d08(0xe7)],_0xd379e2);}}async[_0x243cdf(0x120)](_0x360792){const _0x274801=_0x243cdf;var _0x4c2b2e,_0xd26435;const {text:_0x5bc9ad,unitId:_0x247e1e}=_0x360792,_0x3dfedc=(_0xd26435=(_0x4c2b2e=_0x5bc9ad[_0x274801(0xbf)])==null?void 0x0:_0x4c2b2e['filter'](_0x20e817=>_0x20e817[_0x274801(0x110)]===_0x9e79b8[_0x274801(0x123)][_0x274801(0x10c)])['map'](_0x2001c7=>_0x2001c7['rangeId']))!=null?_0xd26435:[],_0x2afbf6=JSON[_0x274801(0xb1)](_0x5bc9ad),_0x22076f=_0x360792[_0x274801(0x135)],_0xa012e=_0x360792['id'],_0x5079d7={'memberId':(await this[_0x274801(0xbb)][_0x274801(0x102)](_0x247e1e))[_0x274801(0xf7)](),'unitId':_0x247e1e,'threadId':_0x22076f,'mention':_0x3dfedc,'content':_0x2afbf6,'replyId':_0xa012e},_0x2d2d4b=await this[_0x274801(0xe4)][_0x274801(0x114)](_0x274801(0x10b)+_0x247e1e+_0x274801(0xd7),{'body':_0x5079d7});return!_0x2d2d4b['body'][_0x274801(0x101)]||_0x2d2d4b[_0x274801(0xc4)]['error'][_0x274801(0xdb)]===0x1;}async[_0x243cdf(0xcd)](_0x46c3d7){const _0x5ab588=_0x243cdf,{unitId:_0x4990c5}=_0x46c3d7,_0x1c7f2e=_0x46c3d7[_0x5ab588(0x135)],_0x416178={'memberId':this[_0x5ab588(0x134)]['getCurrentUser']()[_0x5ab588(0x10e)],'unitId':_0x4990c5,'threadId':_0x1c7f2e,'solved':_0x46c3d7[_0x5ab588(0x124)]?_0xb2798d[_0x5ab588(0xb2)]:_0xb2798d['OpenOrReOpen']},_0xb30426=await this[_0x5ab588(0xe4)][_0x5ab588(0x114)](_0x5ab588(0x10b)+_0x4990c5+'/solved',{'body':_0x416178});return!_0xb30426[_0x5ab588(0xc4)][_0x5ab588(0x101)]||_0xb30426[_0x5ab588(0xc4)][_0x5ab588(0x101)]['code']===0x1;}async[_0x243cdf(0xe5)](_0x4173be,_0x5515ee,_0x1ee126,_0x3d10e5){const _0x37cd7c=_0x243cdf,_0x3a33e5={'memberId':(await this['_sessionService'][_0x37cd7c(0x102)](_0x4173be))[_0x37cd7c(0xf7)](),'threadId':_0x1ee126,'replyId':_0x3d10e5,'unitId':_0x4173be},_0x2347ab=await this[_0x37cd7c(0xe4)][_0x37cd7c(0x114)](_0x37cd7c(0x10b)+_0x4173be+_0x37cd7c(0x13b),{'body':_0x3a33e5});return!_0x2347ab['body'][_0x37cd7c(0x101)]||_0x2347ab[_0x37cd7c(0xc4)][_0x37cd7c(0x101)]['code']===0x1;}async[_0x243cdf(0xd9)](_0x2b5eb0,_0x2f5d64,_0x20743f){const _0x5217ed=_0x243cdf,_0x2bd965={'unitId':_0x2b5eb0,'threadId':_0x20743f},_0x430687=await this[_0x5217ed(0xe4)][_0x5217ed(0x114)](_0x5217ed(0x10b)+_0x2b5eb0+_0x5217ed(0xb6),{'body':_0x2bd965}),_0x55817e=_0x20743f['map'](_0x476279=>_0x1f98fb(_0x430687['body']['comments'][_0x476279],_0x2b5eb0,_0x2f5d64))[_0x5217ed(0xbd)](Boolean);return Object[_0x5217ed(0x118)](_0x430687[_0x5217ed(0xc4)][_0x5217ed(0x132)])[_0x5217ed(0xad)](_0x40ed38=>{const _0x24914d=_0x5217ed;this['_userService'][_0x24914d(0xaa)](_0x40ed38);}),_0x55817e;}['saveCommentToSnapshot'](_0xd7ba88){const _0x981a2f=_0x243cdf;return{'id':_0xd7ba88['id'],'threadId':_0xd7ba88[_0x981a2f(0x135)],'ref':_0xd7ba88[_0x981a2f(0xc7)]};}};_0x1102d2=_0x514fe4([_0x10409c(0x0,_0x9e79b8[_0x243cdf(0x111)](_0x4a978f['HTTPService'])),_0x10409c(0x1,_0x9e79b8[_0x243cdf(0x111)](_0x9e79b8[_0x243cdf(0x11e)])),_0x10409c(0x2,_0x9e79b8[_0x243cdf(0x111)](_0x11de0e[_0x243cdf(0x119)])),_0x10409c(0x3,_0x9e79b8[_0x243cdf(0x111)](_0x9e79b8[_0x243cdf(0xc1)]))],_0x1102d2);var _0x5a23a7=Object['defineProperty'],_0x71a005=Object['getOwnPropertyDescriptor'],_0x41594e=(_0x558814,_0x525761,_0x41c2a3,_0x3790b1)=>{const _0x48e1b8=_0x243cdf;for(var _0x555c63=_0x3790b1>0x1?void 0x0:_0x3790b1?_0x71a005(_0x525761,_0x41c2a3):_0x525761,_0x337edb=_0x558814[_0x48e1b8(0x131)]-0x1,_0x411189;_0x337edb>=0x0;_0x337edb--)(_0x411189=_0x558814[_0x337edb])&&(_0x555c63=(_0x3790b1?_0x411189(_0x525761,_0x41c2a3,_0x555c63):_0x411189(_0x555c63))||_0x555c63);return _0x3790b1&&_0x555c63&&_0x5a23a7(_0x525761,_0x41c2a3,_0x555c63),_0x555c63;},_0x59f7cd=(_0x2b3478,_0x925269)=>(_0x2e16dc,_0x2e647f)=>_0x925269(_0x2e16dc,_0x2e647f,_0x2b3478);let _0x57e9c8=class{constructor(_0x326fc0){const _0x5a36bb=_0x243cdf;this[_0x5a36bb(0xe4)]=_0x326fc0;}async[_0x243cdf(0xcb)](_0x47c522,_0x511684,_0x569e79){const _0x3efc58=_0x243cdf,_0x208d8e=new URL(window[_0x3efc58(0xd6)]['href'])[_0x3efc58(0x116)][_0x3efc58(0xf4)]('unit');if(!_0x208d8e)return[];const _0x2201b2=window[_0x3efc58(0xd6)][_0x3efc58(0x115)],_0x2822d2=window[_0x3efc58(0xd6)]['protocol']===_0x3efc58(0xc6)?_0x3efc58(0xc5):'http';return(await this[_0x3efc58(0xe4)][_0x3efc58(0xf4)](_0x2822d2+_0x3efc58(0xb8)+_0x2201b2+'/universer-api/authz/collaborator',{'params':{'objectID':_0x208d8e,'unitID':_0x208d8e}}))[_0x3efc58(0xc4)][_0x3efc58(0x100)][_0x3efc58(0x113)](_0x3ea8e5=>{const _0x3a8f0e=_0x3efc58;var _0x3778ed,_0x302d55,_0x4c5da8,_0xda8c0b,_0x4b8662,_0x211c2d;return{'id':(_0x302d55=(_0x3778ed=_0x3ea8e5[_0x3a8f0e(0xf0)])==null?void 0x0:_0x3778ed[_0x3a8f0e(0x10e)])!=null?_0x302d55:'','label':(_0xda8c0b=(_0x4c5da8=_0x3ea8e5['subject'])==null?void 0x0:_0x4c5da8[_0x3a8f0e(0x12c)])!=null?_0xda8c0b:'','icon':(_0x211c2d=(_0x4b8662=_0x3ea8e5[_0x3a8f0e(0xf0)])==null?void 0x0:_0x4b8662[_0x3a8f0e(0xea)])!=null?_0x211c2d:'','type':_0x3a8f0e(0xa8)};});}};_0x57e9c8=_0x41594e([_0x59f7cd(0x0,_0x9e79b8[_0x243cdf(0x111)](_0x4a978f[_0x243cdf(0xaf)]))],_0x57e9c8);var _0x3622a1=Object[_0x243cdf(0xf1)],_0x26d7a1=Object[_0x243cdf(0x11b)],_0x6c3492=(_0x298b8f,_0x40ea03,_0x41a4d7,_0x30e8a9)=>{for(var _0x310493=_0x30e8a9>0x1?void 0x0:_0x30e8a9?_0x26d7a1(_0x40ea03,_0x41a4d7):_0x40ea03,_0x149beb=_0x298b8f['length']-0x1,_0x47c0f8;_0x149beb>=0x0;_0x149beb--)(_0x47c0f8=_0x298b8f[_0x149beb])&&(_0x310493=(_0x30e8a9?_0x47c0f8(_0x40ea03,_0x41a4d7,_0x310493):_0x47c0f8(_0x310493))||_0x310493);return _0x30e8a9&&_0x310493&&_0x3622a1(_0x40ea03,_0x41a4d7,_0x310493),_0x310493;},_0xb63e0e=(_0x55e615,_0x1edea5)=>(_0x25a086,_0x328adb)=>_0x1edea5(_0x25a086,_0x328adb,_0x55e615);let _0x15902a=class extends _0x9e79b8[_0x243cdf(0xe0)]{constructor(_0x5546f6,_0x288c3e,_0x7336ed,_0x4c1a4a){const _0x56fbc7=_0x243cdf;super(),this['_threadCommentDataSourceService']=_0x5546f6,this[_0x56fbc7(0x12f)]=_0x288c3e,this[_0x56fbc7(0xf9)]=_0x7336ed,this['_threadCommentMentionDataSource']=_0x4c1a4a,this['_initDataSource']();}[_0x243cdf(0x12a)](){const _0x26c686=_0x243cdf;this[_0x26c686(0x126)][_0x26c686(0xfb)]=this['_threadCommentDataSource'],this[_0x26c686(0x126)][_0x26c686(0x129)]=!0x1,this[_0x26c686(0xf9)][_0x26c686(0xfb)]=this[_0x26c686(0x122)];}};_0x15902a=_0x6c3492([_0x9e79b8[_0x243cdf(0x12e)](_0x9e79b8[_0x243cdf(0x125)][_0x243cdf(0x103)],_0x15902a),_0xb63e0e(0x0,_0x5aad9f[_0x243cdf(0x127)]),_0xb63e0e(0x1,_0x9e79b8['Inject'](_0x1102d2)),_0xb63e0e(0x2,_0x5d023b['IThreadCommentMentionDataService']),_0xb63e0e(0x3,_0x9e79b8[_0x243cdf(0x111)](_0x57e9c8))],_0x15902a);var _0x55261b=Object[_0x243cdf(0xf1)],_0x5e747d=Object[_0x243cdf(0x11b)],_0x168190=(_0x3e82f4,_0x6ad665,_0x579fb2,_0x158abc)=>{for(var _0x3a1ff6=_0x158abc>0x1?void 0x0:_0x158abc?_0x5e747d(_0x6ad665,_0x579fb2):_0x6ad665,_0x53d963=_0x3e82f4['length']-0x1,_0x255818;_0x53d963>=0x0;_0x53d963--)(_0x255818=_0x3e82f4[_0x53d963])&&(_0x3a1ff6=(_0x158abc?_0x255818(_0x6ad665,_0x579fb2,_0x3a1ff6):_0x255818(_0x3a1ff6))||_0x3a1ff6);return _0x158abc&&_0x3a1ff6&&_0x55261b(_0x6ad665,_0x579fb2,_0x3a1ff6),_0x3a1ff6;},_0x1b8e30=(_0x435073,_0x58c2a6)=>(_0x1f5d60,_0x3b8ec1)=>_0x58c2a6(_0x1f5d60,_0x3b8ec1,_0x435073);let _0x15bb56=class extends _0x9e79b8[_0x243cdf(0xe0)]{constructor(_0x47ec90,_0x4c4b9c,_0x357b3e,_0x4dc291){const _0x2bf710=_0x243cdf;super(),this['_commentService']=_0x47ec90,this['_threadCommentModel']=_0x4c4b9c,this[_0x2bf710(0x134)]=_0x357b3e,this['_injector']=_0x4dc291,this['_init'](),this[_0x2bf710(0x12d)]();}[_0x243cdf(0x12d)](){const _0x1d2006=_0x243cdf;this[_0x1d2006(0xe2)](this[_0x1d2006(0xe6)][_0x1d2006(0xb5)][_0x1d2006(0x10d)](_0x7271f8['bufferTime'](0x10))[_0x1d2006(0xf5)](_0x43f4eb=>{const _0xd94b5c=_0x1d2006,_0x1a3cbb=new Set();_0x43f4eb[_0xd94b5c(0xad)](_0x555b8b=>{const _0x487996=_0xd94b5c;switch(_0x555b8b[_0x487996(0xee)]){case _0x487996(0xbc):{const _0xe0d0a7=_0x555b8b[_0x487996(0xc9)][_0x487996(0xe1)];_0x1a3cbb[_0x487996(0xbc)](_0xe0d0a7);break;}}}),_0x38626a(this[_0xd94b5c(0x121)],_0x1a3cbb);}));}[_0x243cdf(0xf3)](){const _0x4bb1c2=_0x243cdf;this[_0x4bb1c2(0xe2)](this[_0x4bb1c2(0xeb)][_0x4bb1c2(0xb5)][_0x4bb1c2(0xf5)](async _0x56e267=>{const _0x1576cc=_0x4bb1c2;var _0x5bcc46,_0x1e4960;const _0x334cc9=this[_0x1576cc(0xe6)]['getThread'](_0x56e267['unitId'],_0x56e267['threadId']);if(!_0x334cc9)return;const {unitId:_0xd0085d,subUnitId:_0xaf1d9d}=_0x334cc9;switch(_0x56e267['user']&&this[_0x1576cc(0x134)][_0x1576cc(0xaa)](_0x56e267[_0x1576cc(0xa8)]),_0x56e267['type']){case _0x2a6887[_0x1576cc(0xc8)]:break;case _0x2a6887[_0x1576cc(0xff)]:{this[_0x1576cc(0xe6)][_0x1576cc(0xfc)](_0xd0085d,_0xaf1d9d,{'unitId':_0xd0085d,'subUnitId':_0xaf1d9d,'ref':'','id':_0x56e267['replyId'],'dT':_0x3e0c9c(+_0x56e267[_0x1576cc(0x138)]),'threadId':_0x56e267['threadId'],'personId':(_0x1e4960=(_0x5bcc46=_0x56e267[_0x1576cc(0xa8)])==null?void 0x0:_0x5bcc46[_0x1576cc(0x10e)])!=null?_0x1e4960:_0x56e267[_0x1576cc(0x136)],'text':JSON[_0x1576cc(0x13d)](_0x56e267['content']),'parentId':_0x334cc9['id']});break;}case _0x2a6887[_0x1576cc(0xce)]:{const _0x451b21=this[_0x1576cc(0xe6)][_0x1576cc(0xb0)](_0xd0085d,_0xaf1d9d,_0x56e267[_0x1576cc(0x13a)]);_0x451b21&&_0x451b21[_0x1576cc(0xd3)]&&this[_0x1576cc(0xe6)][_0x1576cc(0xe5)](_0xd0085d,_0xaf1d9d,_0x56e267['replyId']);break;}case _0x2a6887[_0x1576cc(0xa9)]:{this[_0x1576cc(0xe6)]['updateComment'](_0xd0085d,_0xaf1d9d,{'commentId':_0x56e267[_0x1576cc(0x13a)],'text':JSON[_0x1576cc(0x13d)](_0x56e267[_0x1576cc(0xfa)])});break;}case _0x2a6887[_0x1576cc(0x130)]:{const _0x20f116=this['_threadCommentModel']['getThread'](_0xd0085d,_0x56e267[_0x1576cc(0x135)]);_0x20f116&&this[_0x1576cc(0xe6)]['resolveComment'](_0xd0085d,_0xaf1d9d,_0x20f116['id'],_0x56e267[_0x1576cc(0xda)]===_0xb2798d[_0x1576cc(0xb2)]);break;}}}));}};_0x15bb56=_0x168190([_0x9e79b8['OnLifecycle'](_0x9e79b8[_0x243cdf(0x125)][_0x243cdf(0x139)],_0x15bb56),_0x1b8e30(0x0,_0x9e79b8[_0x243cdf(0x111)](_0x11de0e['CommentService'])),_0x1b8e30(0x1,_0x9e79b8[_0x243cdf(0x111)](_0x5aad9f[_0x243cdf(0x105)])),_0x1b8e30(0x2,_0x9e79b8[_0x243cdf(0x111)](_0x9e79b8[_0x243cdf(0x11e)])),_0x1b8e30(0x3,_0x9e79b8['Inject'](_0x9e79b8[_0x243cdf(0xc1)]))],_0x15bb56);const _0x15557b=_0x243cdf(0xb4),_0x3b6224={};var _0x1e92ae=Object[_0x243cdf(0xf1)],_0x5266fc=Object[_0x243cdf(0x11b)],_0x3fba4b=(_0x383029,_0x5e4e85,_0x21aa4b)=>_0x5e4e85 in _0x383029?_0x1e92ae(_0x383029,_0x5e4e85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21aa4b}):_0x383029[_0x5e4e85]=_0x21aa4b,_0x4d40e6=(_0x3e3be8,_0x298df9,_0x2d52f6,_0xe72479)=>{const _0x3f926a=_0x243cdf;for(var _0x285843=_0xe72479>0x1?void 0x0:_0xe72479?_0x5266fc(_0x298df9,_0x2d52f6):_0x298df9,_0x25608a=_0x3e3be8[_0x3f926a(0x131)]-0x1,_0x2fb741;_0x25608a>=0x0;_0x25608a--)(_0x2fb741=_0x3e3be8[_0x25608a])&&(_0x285843=(_0xe72479?_0x2fb741(_0x298df9,_0x2d52f6,_0x285843):_0x2fb741(_0x285843))||_0x285843);return _0xe72479&&_0x285843&&_0x1e92ae(_0x298df9,_0x2d52f6,_0x285843),_0x285843;},_0x493b05=(_0x323e99,_0x7ce2a7)=>(_0x177509,_0x5d88d0)=>_0x7ce2a7(_0x177509,_0x5d88d0,_0x323e99),_0x55a5bf=(_0x54d0ef,_0x209b3b,_0x45d5de)=>_0x3fba4b(_0x54d0ef,typeof _0x209b3b!=_0x243cdf(0x13c)?_0x209b3b+'':_0x209b3b,_0x45d5de);_0x516bfc['UniverThreadCommentDataSourcePlugin']=class extends _0x9e79b8[_0x243cdf(0x117)]{constructor(_0x21dd0b=_0x3b6224,_0x3fffd4,_0x401efd){const _0x286d69=_0x243cdf;super(),this[_0x286d69(0xd4)]=_0x21dd0b,this['_injector']=_0x3fffd4,this[_0x286d69(0xfd)]=_0x401efd;const {..._0xa7ebc9}=this[_0x286d69(0xd4)];this[_0x286d69(0xfd)][_0x286d69(0xc3)](_0x15557b,_0xa7ebc9);}[_0x243cdf(0x137)](){const _0x4c016f=_0x243cdf;[[_0x57e9c8],[_0x1102d2],[_0x15902a],[_0x15bb56]][_0x4c016f(0xad)](_0x314b50=>{const _0xb0fd23=_0x4c016f;this[_0xb0fd23(0x121)][_0xb0fd23(0xbc)](_0x314b50);});}},_0x55a5bf(_0x516bfc[_0x243cdf(0xed)],_0x243cdf(0x128),_0x24a0ce),_0x55a5bf(_0x516bfc[_0x243cdf(0xed)],_0x243cdf(0xee),_0x9e79b8[_0x243cdf(0xba)][_0x243cdf(0xe3)]),_0x516bfc['UniverThreadCommentDataSourcePlugin']=_0x4d40e6([_0x9e79b8[_0x243cdf(0x13e)](_0x5aad9f[_0x243cdf(0x108)],_0x5d023b[_0x243cdf(0xdc)],_0x11de0e[_0x243cdf(0x11a)]),_0x493b05(0x1,_0x9e79b8[_0x243cdf(0x111)](_0x9e79b8['Injector'])),_0x493b05(0x2,_0x9e79b8['IConfigService'])],_0x516bfc[_0x243cdf(0xed)]),Object[_0x243cdf(0xf1)](_0x516bfc,Symbol[_0x243cdf(0xfe)],{'value':'Module'});}));function _0x305b(_0x4fc176,_0x445080){const _0x563b1a=_0x563b();return _0x305b=function(_0x305b2e,_0x4d65d6){_0x305b2e=_0x305b2e-0xa8;let _0x90029e=_0x563b1a[_0x305b2e];return _0x90029e;},_0x305b(_0x4fc176,_0x445080);}function _0x563b(){const _0x1a1561=['CollaborationSessionService','UniverCollaborationClientPlugin','getOwnPropertyDescriptor','format','325579jKRGSa','UserManagerService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','_injector','_threadCommentMentionDataSource','CustomRangeType','resolved','LifecycleStages','_threadCommentDataSourceService','IThreadCommentDataSourceService','pluginName','syncUpdateMutationToColla','_initDataSource','reply','name','_initUserSync','OnLifecycle','_threadCommentDataSource','Solve','length','users','@univerjs/core','_userService','threadId','userId','onStarting','createTimestamp','Ready','replyId','/delete','symbol','parse','DependentOn','user','Edit','addUser','/reply','@univerjs/thread-comment','forEach','UNRECOGNIZED','HTTPService','getComment','stringify','Solved','exports','thread-comment-data-source.config','commentUpdate$','/list','UniverCollaborationClient','://','@univerjs/thread-comment-ui','UniverInstanceType','_sessionService','add','filter','824159QBXHCs','customRanges','566akkxts','Injector','replies','setConfig','body','https','https:','ref','Add','payload','delete','getMentions','function','resolveComment','Delete','UniverThreadCommentDatasource','3650160MrFeBP','slice','YYYY/MM/DD\x20HH:mm','parentId','_config','rxjs','location','/edit','/add','listComments','solved','code','UniverThreadCommentUIPlugin','@univerjs/network','OpenOrReOpen','5vOkOeg','Disposable','personId','disposeWithMe','UNIVER_UNKNOWN','_httpService','deleteComment','_threadCommentModel','comment','8ASmSYE','/universer-api/user/list','avatar','_commentService','@univerjs-pro/collaboration-client','UniverThreadCommentDataSourcePlugin','type','Unknown','subject','defineProperty','getUser','_init','get','subscribe','object','getMemberID','3489HXDnFJ','_threadCommentMentionDataService','content','dataSource','addComment','_configService','toStringTag','Reply','collaborators','error','requireSession','Starting','amd','ThreadCommentModel','rangeId','219156dZjeEd','UniverThreadCommentPlugin','1583208FEKyPo','1069056BYaZOw','/universer-api/comment/unit/','COMMENT','pipe','userID','dayjs','rangeType','Inject','UniverNetwork','map','post','host','searchParams','Plugin','values'];_0x563b=function(){return _0x1a1561;};return _0x563b();}
|
|
1
|
+
(function(_0x502dd8,_0x2676d8){const _0x5eea22=_0xb838,_0x51178d=_0x502dd8();while(!![]){try{const _0x4dadd1=-parseInt(_0x5eea22(0x131))/0x1+-parseInt(_0x5eea22(0x14d))/0x2*(parseInt(_0x5eea22(0x161))/0x3)+-parseInt(_0x5eea22(0x12b))/0x4*(-parseInt(_0x5eea22(0x18f))/0x5)+-parseInt(_0x5eea22(0x167))/0x6+-parseInt(_0x5eea22(0x180))/0x7*(parseInt(_0x5eea22(0x162))/0x8)+parseInt(_0x5eea22(0x179))/0x9+parseInt(_0x5eea22(0x156))/0xa*(parseInt(_0x5eea22(0x151))/0xb);if(_0x4dadd1===_0x2676d8)break;else _0x51178d['push'](_0x51178d['shift']());}catch(_0x119c52){_0x51178d['push'](_0x51178d['shift']());}}}(_0x34ea,0x6bf02),function(_0x125a08,_0x3ddc67){const _0x304f4f=_0xb838;typeof exports==_0x304f4f(0x133)&&typeof module<'u'?_0x3ddc67(exports,require('@univerjs/core'),require(_0x304f4f(0x168)),require(_0x304f4f(0x11c)),require(_0x304f4f(0x108)),require(_0x304f4f(0x121)),require('dayjs'),require(_0x304f4f(0x15c))):typeof define==_0x304f4f(0x10d)&&define['amd']?define([_0x304f4f(0x123),_0x304f4f(0x174),_0x304f4f(0x168),_0x304f4f(0x11c),_0x304f4f(0x108),_0x304f4f(0x121),_0x304f4f(0xff),_0x304f4f(0x15c)],_0x3ddc67):(_0x125a08=typeof globalThis<'u'?globalThis:_0x125a08||self,_0x3ddc67(_0x125a08['UniverThreadCommentDatasource']={},_0x125a08['UniverCore'],_0x125a08['UniverThreadComment'],_0x125a08['UniverThreadCommentUi'],_0x125a08[_0x304f4f(0x146)],_0x125a08[_0x304f4f(0x150)],_0x125a08[_0x304f4f(0xff)],_0x125a08[_0x304f4f(0x15c)]));}(this,function(_0x28ff37,_0x2f8dfc,_0x1e41b5,_0x403a44,_0x354310,_0x98bdec,_0x460625,_0x3f660d){'use strict';const _0x17094c=_0xb838;const _0x40cf9a='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x2d95cc=(_0x49ee54=>(_0x49ee54[_0x49ee54[_0x17094c(0x18b)]=0x0]=_0x17094c(0x18b),_0x49ee54[_0x49ee54[_0x17094c(0x17e)]=0x1]=_0x17094c(0x17e),_0x49ee54[_0x49ee54[_0x17094c(0x106)]=-0x1]=_0x17094c(0x106),_0x49ee54))(_0x2d95cc||{}),_0x13fb68=(_0x1b5117=>(_0x1b5117[_0x1b5117[_0x17094c(0x115)]=0x0]=_0x17094c(0x115),_0x1b5117[_0x1b5117[_0x17094c(0x11e)]=0x1]=_0x17094c(0x11e),_0x1b5117[_0x1b5117[_0x17094c(0x125)]=0x2]=_0x17094c(0x125),_0x1b5117[_0x1b5117['Edit']=0x3]=_0x17094c(0x135),_0x1b5117[_0x1b5117[_0x17094c(0x126)]=0x4]=_0x17094c(0x126),_0x1b5117[_0x1b5117['Solve']=0x5]=_0x17094c(0x142),_0x1b5117[_0x1b5117[_0x17094c(0x106)]=-0x1]=_0x17094c(0x106),_0x1b5117))(_0x13fb68||{});const _0x3bbabd=_0x86d533=>_0x460625(new Date(+_0x86d533))['format'](_0x17094c(0x14c)),_0x21f452=async(_0x1a3f6e,_0x1a4f81)=>{const _0xa26d8e=_0x17094c,_0x5e45b8=_0x1a3f6e['get'](_0x2f8dfc[_0xa26d8e(0x14b)]),_0x20dd2f=_0x1a3f6e[_0xa26d8e(0x173)](_0x98bdec[_0xa26d8e(0x155)]);_0x1a4f81[_0xa26d8e(0x185)](_0x13e94f=>{const _0x276df3=_0xa26d8e;_0x5e45b8[_0x276df3(0x186)](_0x13e94f)&&_0x1a4f81[_0x276df3(0x110)](_0x13e94f);}),_0x1a4f81[_0xa26d8e(0x15b)]&&(await _0x20dd2f['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x1a4f81]}}))[_0xa26d8e(0x10b)][_0xa26d8e(0x103)][_0xa26d8e(0x185)](_0x4890a5=>{_0x4890a5&&_0x5e45b8['addUser'](_0x4890a5);});};var _0x39a016=Object[_0x17094c(0x147)],_0x25aa48=Object[_0x17094c(0x17f)],_0x395ce1=(_0x1b2929,_0x206e73,_0x8d4b61,_0x36689f)=>{const _0x4653cd=_0x17094c;for(var _0x404fd3=_0x36689f>0x1?void 0x0:_0x36689f?_0x25aa48(_0x206e73,_0x8d4b61):_0x206e73,_0x3929f8=_0x1b2929[_0x4653cd(0x16e)]-0x1,_0x3488cd;_0x3929f8>=0x0;_0x3929f8--)(_0x3488cd=_0x1b2929[_0x3929f8])&&(_0x404fd3=(_0x36689f?_0x3488cd(_0x206e73,_0x8d4b61,_0x404fd3):_0x3488cd(_0x404fd3))||_0x404fd3);return _0x36689f&&_0x404fd3&&_0x39a016(_0x206e73,_0x8d4b61,_0x404fd3),_0x404fd3;},_0x18a7d9=(_0x55ebd3,_0x323745)=>(_0x2ef8bc,_0x3fe8a5)=>_0x323745(_0x2ef8bc,_0x3fe8a5,_0x55ebd3);function _0x3ce615(_0x1ec25d,_0x4e956c){const _0x350ea0=_0x17094c,_0x10fa95=_0x1ec25d['replies'][0x0];return{..._0x4e956c,'id':_0x10fa95[_0x350ea0(0x177)],'resolved':_0x1ec25d[_0x350ea0(0x17b)]===0x1,'dT':_0x3bbabd(_0x10fa95[_0x350ea0(0x120)]),'personId':_0x10fa95[_0x350ea0(0x13f)],'threadId':_0x10fa95[_0x350ea0(0x15a)]};}function _0x55a5a6(_0x2bc5db,_0x278895,_0x25b000){const _0x3f8a65=_0x17094c;var _0x35173a,_0xcd08f2;if(((_0xcd08f2=(_0x35173a=_0x2bc5db==null?void 0x0:_0x2bc5db[_0x3f8a65(0x15f)])==null?void 0x0:_0x35173a[_0x3f8a65(0x16e)])!=null?_0xcd08f2:0x0)>0x0){const _0x3f8bf9=(_0x21875b,_0x2a06e2)=>({'id':_0x21875b[_0x3f8a65(0x177)],'threadId':_0x21875b[_0x3f8a65(0x15a)],'dT':_0x3bbabd(_0x21875b[_0x3f8a65(0x120)]),'personId':_0x21875b['userId'],'resolved':_0x2bc5db[_0x3f8a65(0x17b)]===_0x2d95cc['Solved'],'unitId':_0x278895,'subUnitId':_0x25b000,'text':JSON[_0x3f8a65(0x16f)](_0x21875b['content']),'parentId':_0x2a06e2}),_0x19d842=_0x3f8bf9(_0x2bc5db[_0x3f8a65(0x15f)][0x0]);return{..._0x19d842,'children':_0x2bc5db[_0x3f8a65(0x15f)][_0x3f8a65(0x171)](0x1)[_0x3f8a65(0x183)](_0x5d0786=>_0x3f8bf9(_0x5d0786,_0x19d842['id']))};}return null;}let _0x4851af=class{constructor(_0x17bfa0,_0xd7f138,_0x3114dc,_0x555ef6){const _0x1540f2=_0x17094c;this['_httpService']=_0x17bfa0,this[_0x1540f2(0x145)]=_0xd7f138,this[_0x1540f2(0x14f)]=_0x3114dc,this[_0x1540f2(0x172)]=_0x555ef6;}async[_0x17094c(0x113)](_0x421f88){const _0x255a3c=_0x17094c;var _0x32fc19,_0x49e733;const {parentId:_0x5830a4,unitId:_0x279795,text:_0x576051,threadId:_0x4e1417}=_0x421f88,_0x416f6b=(_0x49e733=(_0x32fc19=_0x576051[_0x255a3c(0x11a)])==null?void 0x0:_0x32fc19[_0x255a3c(0x102)](_0x5e5999=>_0x5e5999[_0x255a3c(0x11b)]===_0x2f8dfc[_0x255a3c(0x14a)][_0x255a3c(0x153)])[_0x255a3c(0x183)](_0x4006de=>_0x4006de[_0x255a3c(0x178)]))!=null?_0x49e733:[],_0x558b6c=JSON[_0x255a3c(0x16c)](_0x576051),_0x4971db=(await this[_0x255a3c(0x14f)]['requireSession'](_0x279795))[_0x255a3c(0x188)]();if(_0x5830a4){const _0x27379a={'memberId':_0x4971db,'unitId':_0x279795,'content':_0x558b6c,'mention':_0x416f6b,'threadId':_0x4e1417},_0x1b825b=(await this['_httpService']['post'](_0x255a3c(0x159)+_0x279795+_0x255a3c(0x15e),{'body':_0x27379a}))[_0x255a3c(0x10b)][_0x255a3c(0x10a)];return{..._0x421f88,'id':_0x1b825b[_0x255a3c(0x177)],'dT':_0x460625(+_0x1b825b[_0x255a3c(0x120)])[_0x255a3c(0x17c)](_0x255a3c(0x14c)),'personId':_0x1b825b[_0x255a3c(0x13f)]};}else{const _0x5f1823={'memberId':_0x4971db,'unitId':_0x279795,'content':_0x558b6c,'mention':_0x416f6b},_0x121109=await this['_httpService']['post'](_0x255a3c(0x159)+_0x279795+_0x255a3c(0x137),{'body':_0x5f1823});return _0x3ce615(_0x121109[_0x255a3c(0x10b)][_0x255a3c(0x141)],_0x421f88);}}async[_0x17094c(0x100)](_0x9157d6){const _0x295bd0=_0x17094c;var _0x1d760c,_0x473913;const {text:_0x412edc,unitId:_0x1e1b6c}=_0x9157d6,_0x4db60d=(_0x473913=(_0x1d760c=_0x412edc[_0x295bd0(0x11a)])==null?void 0x0:_0x1d760c[_0x295bd0(0x102)](_0x2bfef2=>_0x2bfef2['rangeType']===_0x2f8dfc[_0x295bd0(0x14a)][_0x295bd0(0x153)])[_0x295bd0(0x183)](_0x3c0beb=>_0x3c0beb[_0x295bd0(0x178)]))!=null?_0x473913:[],_0x1723c4=JSON[_0x295bd0(0x16c)](_0x412edc),_0x4bf73d=_0x9157d6[_0x295bd0(0x15a)],_0x2ff47a=_0x9157d6['id'],_0x5a5e22={'memberId':(await this[_0x295bd0(0x14f)]['requireSession'](_0x1e1b6c))[_0x295bd0(0x188)](),'unitId':_0x1e1b6c,'threadId':_0x4bf73d,'mention':_0x4db60d,'content':_0x1723c4,'replyId':_0x2ff47a},_0x28cb67=await this[_0x295bd0(0x176)][_0x295bd0(0x17a)](_0x295bd0(0x159)+_0x1e1b6c+_0x295bd0(0x143),{'body':_0x5a5e22});return!_0x28cb67[_0x295bd0(0x10b)][_0x295bd0(0x10f)]||_0x28cb67[_0x295bd0(0x10b)][_0x295bd0(0x10f)]['code']===0x1;}async['resolveComment'](_0x37067b){const _0x5939be=_0x17094c,{unitId:_0x991f60}=_0x37067b,_0x4ef1d1=_0x37067b[_0x5939be(0x15a)],_0x694cf2={'memberId':this[_0x5939be(0x145)][_0x5939be(0xfb)]()[_0x5939be(0xfc)],'unitId':_0x991f60,'threadId':_0x4ef1d1,'solved':_0x37067b[_0x5939be(0x13b)]?_0x2d95cc[_0x5939be(0x17e)]:_0x2d95cc[_0x5939be(0x18b)]},_0x21dbcc=await this[_0x5939be(0x176)]['post'](_0x5939be(0x159)+_0x991f60+'/solved',{'body':_0x694cf2});return!_0x21dbcc[_0x5939be(0x10b)][_0x5939be(0x10f)]||_0x21dbcc['body']['error'][_0x5939be(0x144)]===0x1;}async[_0x17094c(0x14e)](_0x3f748e,_0x375b65,_0xdb279,_0x41d1a4){const _0x5d6efa=_0x17094c,_0x2525be={'memberId':(await this[_0x5d6efa(0x14f)][_0x5d6efa(0x10c)](_0x3f748e))[_0x5d6efa(0x188)](),'threadId':_0xdb279,'replyId':_0x41d1a4,'unitId':_0x3f748e},_0x28a358=await this['_httpService'][_0x5d6efa(0x17a)](_0x5d6efa(0x159)+_0x3f748e+_0x5d6efa(0x13c),{'body':_0x2525be});return!_0x28a358[_0x5d6efa(0x10b)][_0x5d6efa(0x10f)]||_0x28a358[_0x5d6efa(0x10b)]['error'][_0x5d6efa(0x144)]===0x1;}async[_0x17094c(0x152)](_0x971b75,_0xc3272d,_0x55e76c){const _0x387e14=_0x17094c,_0x5b2acc={'unitId':_0x971b75,'threadId':_0x55e76c},_0x580b27=await this[_0x387e14(0x176)][_0x387e14(0x17a)]('/universer-api/comment/unit/'+_0x971b75+_0x387e14(0xfe),{'body':_0x5b2acc}),_0x5ead10=_0x55e76c[_0x387e14(0x183)](_0x25d59e=>_0x55a5a6(_0x580b27[_0x387e14(0x10b)]['comments'][_0x25d59e],_0x971b75,_0xc3272d))['filter'](Boolean);return Object['values'](_0x580b27['body']['users'])[_0x387e14(0x185)](_0x377e12=>{const _0x223437=_0x387e14;this[_0x223437(0x145)]['addUser'](_0x377e12);}),_0x5ead10;}['saveCommentToSnapshot'](_0xc105b0){const _0x575ae8=_0x17094c;return{'id':_0xc105b0['id'],'threadId':_0xc105b0[_0x575ae8(0x15a)],'ref':_0xc105b0[_0x575ae8(0xfd)]};}};_0x4851af=_0x395ce1([_0x18a7d9(0x0,_0x2f8dfc[_0x17094c(0x116)](_0x98bdec[_0x17094c(0x155)])),_0x18a7d9(0x1,_0x2f8dfc['Inject'](_0x2f8dfc[_0x17094c(0x14b)])),_0x18a7d9(0x2,_0x2f8dfc[_0x17094c(0x116)](_0x354310[_0x17094c(0x12d)])),_0x18a7d9(0x3,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x189)]))],_0x4851af);var _0x98df18=Object[_0x17094c(0x147)],_0xf6a991=Object['getOwnPropertyDescriptor'],_0x4d47d5=(_0x32a395,_0x33b436,_0x5386a6,_0x3837b2)=>{const _0x14f9f8=_0x17094c;for(var _0x5473f7=_0x3837b2>0x1?void 0x0:_0x3837b2?_0xf6a991(_0x33b436,_0x5386a6):_0x33b436,_0x458406=_0x32a395[_0x14f9f8(0x16e)]-0x1,_0x55a69d;_0x458406>=0x0;_0x458406--)(_0x55a69d=_0x32a395[_0x458406])&&(_0x5473f7=(_0x3837b2?_0x55a69d(_0x33b436,_0x5386a6,_0x5473f7):_0x55a69d(_0x5473f7))||_0x5473f7);return _0x3837b2&&_0x5473f7&&_0x98df18(_0x33b436,_0x5386a6,_0x5473f7),_0x5473f7;},_0x4d3475=(_0x33041d,_0x153a31)=>(_0x495c72,_0x3e856f)=>_0x153a31(_0x495c72,_0x3e856f,_0x33041d);let _0x43e2b7=class{constructor(_0x35271b){const _0x381cb7=_0x17094c;this[_0x381cb7(0x176)]=_0x35271b;}async[_0x17094c(0x148)](_0x1e5045,_0x5d07cb,_0x4de3ca){const _0x25d0e4=_0x17094c,_0x589aec=new URL(window['location'][_0x25d0e4(0x10e)])[_0x25d0e4(0x114)]['get'](_0x25d0e4(0x149));if(!_0x589aec)return[];const _0x5d2457=window['location'][_0x25d0e4(0x182)],_0x39a9c4=window['location'][_0x25d0e4(0x160)]===_0x25d0e4(0x101)?_0x25d0e4(0x18a):_0x25d0e4(0x175);return(await this['_httpService'][_0x25d0e4(0x173)](_0x39a9c4+_0x25d0e4(0x140)+_0x5d2457+_0x25d0e4(0x158),{'params':{'objectID':_0x589aec,'unitID':_0x589aec}}))[_0x25d0e4(0x10b)]['collaborators'][_0x25d0e4(0x183)](_0x4aeffb=>{const _0x17b416=_0x25d0e4;var _0xfd8929,_0x320491,_0x2ff8e4,_0x318123,_0x254230,_0x2df42f;return{'id':(_0x320491=(_0xfd8929=_0x4aeffb['subject'])==null?void 0x0:_0xfd8929[_0x17b416(0xfc)])!=null?_0x320491:'','label':(_0x318123=(_0x2ff8e4=_0x4aeffb[_0x17b416(0x129)])==null?void 0x0:_0x2ff8e4[_0x17b416(0x132)])!=null?_0x318123:'','icon':(_0x2df42f=(_0x254230=_0x4aeffb['subject'])==null?void 0x0:_0x254230['avatar'])!=null?_0x2df42f:'','type':_0x17b416(0x11f)};});}};_0x43e2b7=_0x4d47d5([_0x4d3475(0x0,_0x2f8dfc[_0x17094c(0x116)](_0x98bdec['HTTPService']))],_0x43e2b7);var _0x494236=Object[_0x17094c(0x147)],_0x5c6e76=Object[_0x17094c(0x17f)],_0x4c3795=(_0x470cf0,_0xc05c00,_0x41a88b,_0x515f16)=>{const _0x2ce0bc=_0x17094c;for(var _0x470d21=_0x515f16>0x1?void 0x0:_0x515f16?_0x5c6e76(_0xc05c00,_0x41a88b):_0xc05c00,_0x23b51a=_0x470cf0[_0x2ce0bc(0x16e)]-0x1,_0x483708;_0x23b51a>=0x0;_0x23b51a--)(_0x483708=_0x470cf0[_0x23b51a])&&(_0x470d21=(_0x515f16?_0x483708(_0xc05c00,_0x41a88b,_0x470d21):_0x483708(_0x470d21))||_0x470d21);return _0x515f16&&_0x470d21&&_0x494236(_0xc05c00,_0x41a88b,_0x470d21),_0x470d21;},_0x3f38be=(_0x61a94a,_0x568f56)=>(_0x5056b1,_0x418fdf)=>_0x568f56(_0x5056b1,_0x418fdf,_0x61a94a);let _0x2a1206=class extends _0x2f8dfc[_0x17094c(0x18c)]{constructor(_0x327058,_0x4ddf68,_0x52f602,_0x1ec06f){const _0x1af0a2=_0x17094c;super(),this[_0x1af0a2(0x163)]=_0x327058,this[_0x1af0a2(0x111)]=_0x4ddf68,this['_threadCommentMentionDataService']=_0x52f602,this[_0x1af0a2(0x130)]=_0x1ec06f,this[_0x1af0a2(0x127)]();}[_0x17094c(0x127)](){const _0x1abcce=_0x17094c;this[_0x1abcce(0x163)][_0x1abcce(0x105)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1abcce(0x107)]=!0x1,this[_0x1abcce(0x12c)]['dataSource']=this[_0x1abcce(0x130)];}};_0x2a1206=_0x4c3795([_0x2f8dfc[_0x17094c(0x154)](_0x2f8dfc['LifecycleStages'][_0x17094c(0x12e)],_0x2a1206),_0x3f38be(0x0,_0x1e41b5[_0x17094c(0x164)]),_0x3f38be(0x1,_0x2f8dfc[_0x17094c(0x116)](_0x4851af)),_0x3f38be(0x2,_0x403a44[_0x17094c(0x15d)]),_0x3f38be(0x3,_0x2f8dfc[_0x17094c(0x116)](_0x43e2b7))],_0x2a1206);var _0x4a73b9=Object[_0x17094c(0x147)],_0x5c3794=Object[_0x17094c(0x17f)],_0xe972dc=(_0x5785a7,_0x4b76fd,_0xc709bc,_0x39a4f3)=>{const _0x52987b=_0x17094c;for(var _0x2abec6=_0x39a4f3>0x1?void 0x0:_0x39a4f3?_0x5c3794(_0x4b76fd,_0xc709bc):_0x4b76fd,_0x5f1686=_0x5785a7[_0x52987b(0x16e)]-0x1,_0xaa75c1;_0x5f1686>=0x0;_0x5f1686--)(_0xaa75c1=_0x5785a7[_0x5f1686])&&(_0x2abec6=(_0x39a4f3?_0xaa75c1(_0x4b76fd,_0xc709bc,_0x2abec6):_0xaa75c1(_0x2abec6))||_0x2abec6);return _0x39a4f3&&_0x2abec6&&_0x4a73b9(_0x4b76fd,_0xc709bc,_0x2abec6),_0x2abec6;},_0x168bd3=(_0x4a06ba,_0x1d5dd3)=>(_0x361a3b,_0x46a223)=>_0x1d5dd3(_0x361a3b,_0x46a223,_0x4a06ba);let _0x26b888=class extends _0x2f8dfc[_0x17094c(0x18c)]{constructor(_0x18e101,_0x21056a,_0x2f1a28,_0x1599ac){const _0x22398f=_0x17094c;super(),this[_0x22398f(0x184)]=_0x18e101,this['_threadCommentModel']=_0x21056a,this[_0x22398f(0x145)]=_0x2f1a28,this[_0x22398f(0x172)]=_0x1599ac,this[_0x22398f(0x124)](),this['_initUserSync']();}[_0x17094c(0x136)](){const _0x13109e=_0x17094c;this[_0x13109e(0x166)](this[_0x13109e(0x11d)][_0x13109e(0x16b)]['pipe'](_0x3f660d[_0x13109e(0x138)](0x10))[_0x13109e(0x13a)](_0x3b4cab=>{const _0xcedc97=_0x13109e,_0xc53499=new Set();_0x3b4cab['forEach'](_0x1db675=>{const _0x9de3ca=_0xb838;switch(_0x1db675[_0x9de3ca(0x112)]){case _0x9de3ca(0x13e):{const _0xe8d7bc=_0x1db675[_0x9de3ca(0x18d)]['personId'];_0xc53499['add'](_0xe8d7bc);break;}}}),_0x21f452(this[_0xcedc97(0x172)],_0xc53499);}));}['_init'](){const _0x544507=_0x17094c;this[_0x544507(0x166)](this['_commentService'][_0x544507(0x16b)][_0x544507(0x13a)](async _0x1594e5=>{const _0xc47650=_0x544507;var _0x145808,_0x53a1c1;const _0x5725f3=this[_0xc47650(0x11d)][_0xc47650(0x169)](_0x1594e5['unitId'],_0x1594e5['threadId']);if(!_0x5725f3)return;const {unitId:_0x19c4aa,subUnitId:_0x82f081}=_0x5725f3;switch(_0x1594e5[_0xc47650(0x11f)]&&this[_0xc47650(0x145)][_0xc47650(0x122)](_0x1594e5[_0xc47650(0x11f)]),_0x1594e5[_0xc47650(0x112)]){case _0x13fb68[_0xc47650(0x11e)]:break;case _0x13fb68[_0xc47650(0x125)]:{this[_0xc47650(0x11d)][_0xc47650(0x113)](_0x19c4aa,_0x82f081,{'unitId':_0x19c4aa,'subUnitId':_0x82f081,'ref':'','id':_0x1594e5[_0xc47650(0x177)],'dT':_0x3bbabd(+_0x1594e5[_0xc47650(0x120)]),'threadId':_0x1594e5[_0xc47650(0x15a)],'personId':(_0x53a1c1=(_0x145808=_0x1594e5['user'])==null?void 0x0:_0x145808[_0xc47650(0xfc)])!=null?_0x53a1c1:_0x1594e5[_0xc47650(0x13f)],'text':JSON[_0xc47650(0x16f)](_0x1594e5['content']),'parentId':_0x5725f3['id']});break;}case _0x13fb68['Delete']:{const _0x4e533f=this[_0xc47650(0x11d)]['getComment'](_0x19c4aa,_0x82f081,_0x1594e5['replyId']);_0x4e533f&&_0x4e533f[_0xc47650(0x118)]&&this[_0xc47650(0x11d)][_0xc47650(0x14e)](_0x19c4aa,_0x82f081,_0x1594e5[_0xc47650(0x177)]);break;}case _0x13fb68[_0xc47650(0x135)]:{this['_threadCommentModel'][_0xc47650(0x100)](_0x19c4aa,_0x82f081,{'commentId':_0x1594e5[_0xc47650(0x177)],'text':JSON[_0xc47650(0x16f)](_0x1594e5[_0xc47650(0x165)])});break;}case _0x13fb68[_0xc47650(0x142)]:{const _0x30e169=this['_threadCommentModel'][_0xc47650(0x169)](_0x19c4aa,_0x1594e5[_0xc47650(0x15a)]);_0x30e169&&this[_0xc47650(0x11d)]['resolveComment'](_0x19c4aa,_0x82f081,_0x30e169['id'],_0x1594e5['solved']===_0x2d95cc[_0xc47650(0x17e)]);break;}}}));}};_0x26b888=_0xe972dc([_0x2f8dfc[_0x17094c(0x154)](_0x2f8dfc[_0x17094c(0x18e)]['Ready'],_0x26b888),_0x168bd3(0x0,_0x2f8dfc[_0x17094c(0x116)](_0x354310[_0x17094c(0x12f)])),_0x168bd3(0x1,_0x2f8dfc[_0x17094c(0x116)](_0x1e41b5[_0x17094c(0x104)])),_0x168bd3(0x2,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x14b)])),_0x168bd3(0x3,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x189)]))],_0x26b888);const _0x4895a5=_0x17094c(0x181),_0x4729d6={};var _0x419c73=Object[_0x17094c(0x147)],_0x561cca=Object[_0x17094c(0x17f)],_0x3f3fa2=(_0x516804,_0xd93909,_0x15e32e)=>_0xd93909 in _0x516804?_0x419c73(_0x516804,_0xd93909,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15e32e}):_0x516804[_0xd93909]=_0x15e32e,_0x599226=(_0x2038de,_0x371610,_0x517f75,_0x178d56)=>{const _0x1e61a3=_0x17094c;for(var _0x5870f4=_0x178d56>0x1?void 0x0:_0x178d56?_0x561cca(_0x371610,_0x517f75):_0x371610,_0xb0edf0=_0x2038de[_0x1e61a3(0x16e)]-0x1,_0x1d9a02;_0xb0edf0>=0x0;_0xb0edf0--)(_0x1d9a02=_0x2038de[_0xb0edf0])&&(_0x5870f4=(_0x178d56?_0x1d9a02(_0x371610,_0x517f75,_0x5870f4):_0x1d9a02(_0x5870f4))||_0x5870f4);return _0x178d56&&_0x5870f4&&_0x419c73(_0x371610,_0x517f75,_0x5870f4),_0x5870f4;},_0x27a95a=(_0x3877f1,_0x11f81b)=>(_0x183022,_0x4c0a43)=>_0x11f81b(_0x183022,_0x4c0a43,_0x3877f1),_0x219808=(_0x5e7a2c,_0x4d5421,_0x41ada8)=>_0x3f3fa2(_0x5e7a2c,typeof _0x4d5421!=_0x17094c(0x119)?_0x4d5421+'':_0x4d5421,_0x41ada8);_0x28ff37['UniverThreadCommentDataSourcePlugin']=class extends _0x2f8dfc['Plugin']{constructor(_0x3dc7c1=_0x4729d6,_0x28602d,_0x58b021){const _0x5998bd=_0x17094c;super(),this[_0x5998bd(0x157)]=_0x3dc7c1,this[_0x5998bd(0x172)]=_0x28602d,this[_0x5998bd(0x109)]=_0x58b021;const {..._0x34e9e6}=this[_0x5998bd(0x157)];this[_0x5998bd(0x109)][_0x5998bd(0x134)](_0x4895a5,_0x34e9e6);}[_0x17094c(0x13d)](){const _0x6d190c=_0x17094c;[[_0x43e2b7],[_0x4851af],[_0x2a1206],[_0x26b888]][_0x6d190c(0x185)](_0x1f3572=>{const _0xa27f38=_0x6d190c;this[_0xa27f38(0x172)][_0xa27f38(0x13e)](_0x1f3572);});}},_0x219808(_0x28ff37[_0x17094c(0x16d)],_0x17094c(0x12a),_0x40cf9a),_0x219808(_0x28ff37[_0x17094c(0x16d)],_0x17094c(0x112),_0x2f8dfc[_0x17094c(0x187)][_0x17094c(0x16a)]),_0x28ff37[_0x17094c(0x16d)]=_0x599226([_0x2f8dfc[_0x17094c(0x139)](_0x1e41b5[_0x17094c(0x17d)],_0x403a44['UniverThreadCommentUIPlugin'],_0x354310[_0x17094c(0x170)]),_0x27a95a(0x1,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x189)])),_0x27a95a(0x2,_0x2f8dfc[_0x17094c(0x117)])],_0x28ff37['UniverThreadCommentDataSourcePlugin']),Object[_0x17094c(0x147)](_0x28ff37,Symbol['toStringTag'],{'value':_0x17094c(0x128)});}));function _0xb838(_0x4fad82,_0x193ad5){const _0x34eacb=_0x34ea();return _0xb838=function(_0xb83829,_0xf65a9e){_0xb83829=_0xb83829-0xfb;let _0xb25501=_0x34eacb[_0xb83829];return _0xb25501;},_0xb838(_0x4fad82,_0x193ad5);}function _0x34ea(){const _0x8e8250=['Injector','https','OpenOrReOpen','Disposable','payload','LifecycleStages','544445umdrsw','getCurrentUser','userID','ref','/list','dayjs','updateComment','https:','filter','users','ThreadCommentModel','dataSource','UNRECOGNIZED','syncUpdateMutationToColla','@univerjs-pro/collaboration-client','_configService','reply','body','requireSession','function','href','error','delete','_threadCommentDataSource','type','addComment','searchParams','Unknown','Inject','IConfigService','parentId','symbol','customRanges','rangeType','@univerjs/thread-comment-ui','_threadCommentModel','Add','user','createTimestamp','@univerjs/network','addUser','exports','_init','Reply','Delete','_initDataSource','Module','subject','pluginName','24yxPgMl','_threadCommentMentionDataService','CollaborationSessionService','Starting','CommentService','_threadCommentMentionDataSource','452059XmmYYO','name','object','setConfig','Edit','_initUserSync','/add','bufferTime','DependentOn','subscribe','resolved','/delete','onStarting','add','userId','://','comment','Solve','/edit','code','_userService','UniverCollaborationClient','defineProperty','getMentions','unit','CustomRangeType','UserManagerService','YYYY/MM/DD\x20HH:mm','1042134ZWDacG','deleteComment','_sessionService','UniverNetwork','913cddXxQ','listComments','COMMENT','OnLifecycle','HTTPService','85620GTjrkh','_config','/universer-api/authz/collaborator','/universer-api/comment/unit/','threadId','size','rxjs','IThreadCommentMentionDataService','/reply','replies','protocol','3GhCdJn','8904TloJKl','_threadCommentDataSourceService','IThreadCommentDataSourceService','content','disposeWithMe','1473414AvEMBc','@univerjs/thread-comment','getThread','UNIVER_UNKNOWN','commentUpdate$','stringify','UniverThreadCommentDataSourcePlugin','length','parse','UniverCollaborationClientPlugin','slice','_injector','get','@univerjs/core','http','_httpService','replyId','rangeId','5806782HaDqQo','post','solved','format','UniverThreadCommentPlugin','Solved','getOwnPropertyDescriptor','2191RENyoG','thread-comment-data-source.config','host','map','_commentService','forEach','getUser','UniverInstanceType','getMemberID'];_0x34ea=function(){return _0x8e8250;};return _0x34ea();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,26 +45,26 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"dayjs": ">=1.11.0",
|
|
47
47
|
"rxjs": ">=7.0.0",
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.2.
|
|
49
|
-
"@univerjs/core": "0.2.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment-ui": "0.2.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.2.15",
|
|
49
|
+
"@univerjs/core": "0.2.15",
|
|
50
|
+
"@univerjs/network": "0.2.15",
|
|
51
|
+
"@univerjs/thread-comment": "0.2.15",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.2.15"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"dayjs": "^1.11.13",
|
|
56
|
-
"@univerjs-pro/facade": "0.2.
|
|
57
|
-
"@univerjs/core": "0.2.
|
|
58
|
-
"@univerjs/network": "0.2.14",
|
|
56
|
+
"@univerjs-pro/facade": "0.2.15",
|
|
57
|
+
"@univerjs/core": "0.2.15",
|
|
59
58
|
"@univerjs/protocol": "0.1.39-alpha.15",
|
|
60
|
-
"@univerjs/uniscript": "0.2.
|
|
59
|
+
"@univerjs/uniscript": "0.2.15",
|
|
60
|
+
"@univerjs/network": "0.2.15"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"rxjs": "^7.8.1",
|
|
64
64
|
"typescript": "^5.6.2",
|
|
65
|
-
"vite": "^5.4.
|
|
66
|
-
"vitest": "^2.0
|
|
67
|
-
"@univerjs-infra/shared": "0.2.
|
|
65
|
+
"vite": "^5.4.5",
|
|
66
|
+
"vitest": "^2.1.0",
|
|
67
|
+
"@univerjs-infra/shared": "0.2.15"
|
|
68
68
|
},
|
|
69
69
|
"univerSpace": {
|
|
70
70
|
".": {
|