@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505061607 → 0.7.0-nightly.202505071607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function _0x4252(_0x3e8f12,_0x5bd4f9){const _0x1a0787=_0x1a07();return _0x4252=function(_0x42522e,_0x5d7013){_0x42522e=_0x42522e-0x160;let _0x593c16=_0x1a0787[_0x42522e];return _0x593c16;},_0x4252(_0x3e8f12,_0x5bd4f9);}const _0x5c5821=_0x4252;(function(_0x1e054b,_0x5b8930){const _0x3f8a25=_0x4252,_0x3f1b56=_0x1e054b();while(!![]){try{const _0x2a855d=-parseInt(_0x3f8a25(0x1d4))/0x1*(parseInt(_0x3f8a25(0x1d5))/0x2)+-parseInt(_0x3f8a25(0x18a))/0x3+-parseInt(_0x3f8a25(0x1b6))/0x4*(-parseInt(_0x3f8a25(0x186))/0x5)+parseInt(_0x3f8a25(0x18b))/0x6+parseInt(_0x3f8a25(0x1df))/0x7+parseInt(_0x3f8a25(0x166))/0x8*(-parseInt(_0x3f8a25(0x1e3))/0x9)+parseInt(_0x3f8a25(0x1e0))/0xa;if(_0x2a855d===_0x5b8930)break;else _0x3f1b56['push'](_0x3f1b56['shift']());}catch(_0x515f80){_0x3f1b56['push'](_0x3f1b56['shift']());}}}(_0x1a07,0x8ec54));Object[_0x5c5821(0x1b4)](exports,Symbol[_0x5c5821(0x1ae)],{'value':_0x5c5821(0x185)});const b=require(_0x5c5821(0x1ac)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x5c5821(0x19b)),M=require(_0x5c5821(0x188)),w=require(_0x5c5821(0x1bd)),P=require(_0x5c5821(0x18e)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3542c3=>(_0x3542c3[_0x3542c3[_0x5c5821(0x183)]=0x0]='OpenOrReOpen',_0x3542c3[_0x3542c3['Solved']=0x1]='Solved',_0x3542c3[_0x3542c3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3542c3))(I||{}),v=(_0x5ca57a=>(_0x5ca57a[_0x5ca57a[_0x5c5821(0x181)]=0x0]=_0x5c5821(0x181),_0x5ca57a[_0x5ca57a[_0x5c5821(0x1b7)]=0x1]=_0x5c5821(0x1b7),_0x5ca57a[_0x5ca57a['Reply']=0x2]='Reply',_0x5ca57a[_0x5ca57a['Edit']=0x3]=_0x5c5821(0x1af),_0x5ca57a[_0x5ca57a['Delete']=0x4]=_0x5c5821(0x1a8),_0x5ca57a[_0x5ca57a[_0x5c5821(0x1b3)]=0x5]='Solve',_0x5ca57a[_0x5ca57a[_0x5c5821(0x184)]=-0x1]=_0x5c5821(0x184),_0x5ca57a))(v||{});const f=_0x55f01d=>c[_0x5c5821(0x1a4)](new Date(+_0x55f01d))[_0x5c5821(0x1c4)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x209c1c,_0x4ac234)=>{const _0x17e926=_0x5c5821,_0x56543f=_0x209c1c[_0x17e926(0x169)](c[_0x17e926(0x171)]),_0x1ee905=_0x209c1c[_0x17e926(0x169)](P[_0x17e926(0x19d)]);_0x4ac234[_0x17e926(0x17b)](_0x279db4=>{const _0x27094b=_0x17e926;_0x56543f[_0x27094b(0x191)](_0x279db4)&&_0x4ac234[_0x27094b(0x1db)](_0x279db4);}),_0x4ac234[_0x17e926(0x1d8)]&&(await _0x1ee905[_0x17e926(0x169)](_0x17e926(0x1b0),{'params':{'userIDs':[..._0x4ac234]}}))[_0x17e926(0x179)]['users'][_0x17e926(0x17b)](_0x2a2f0f=>{const _0x8aaf58=_0x17e926;_0x2a2f0f&&_0x56543f[_0x8aaf58(0x1ab)](_0x2a2f0f);});};var $=Object[_0x5c5821(0x196)],E=(_0xf8b4c7,_0x24755e,_0x3f7014,_0x1cf293)=>{const _0x5b228e=_0x5c5821;for(var _0x4891eb=_0x1cf293>0x1?void 0x0:_0x1cf293?$(_0x24755e,_0x3f7014):_0x24755e,_0x550159=_0xf8b4c7[_0x5b228e(0x1be)]-0x1,_0x522d88;_0x550159>=0x0;_0x550159--)(_0x522d88=_0xf8b4c7[_0x550159])&&(_0x4891eb=_0x522d88(_0x4891eb)||_0x4891eb);return _0x4891eb;},S=(_0x576619,_0x16b570)=>(_0x18c145,_0x161b38)=>_0x16b570(_0x18c145,_0x161b38,_0x576619);let p=class extends c[_0x5c5821(0x190)]{constructor(_0x277eed,_0x1254b3,_0x1cc20a,_0x4f315e){const _0x363dfb=_0x5c5821;super(),this[_0x363dfb(0x161)]=_0x277eed,this['_threadCommentModel']=_0x1254b3,this[_0x363dfb(0x176)]=_0x1cc20a,this[_0x363dfb(0x182)]=_0x4f315e,this[_0x363dfb(0x163)](),this['_initUserSync']();}[_0x5c5821(0x1bf)](){const _0xc136ae=_0x5c5821;this['disposeWithMe'](this['_threadCommentModel'][_0xc136ae(0x195)][_0xc136ae(0x1cb)](w[_0xc136ae(0x178)](0x10))[_0xc136ae(0x1b2)](_0x39346d=>{const _0x2e547f=_0xc136ae,_0x570875=new Set();_0x39346d[_0x2e547f(0x17b)](_0x571c64=>{const _0x2e95df=_0x2e547f;switch(_0x571c64[_0x2e95df(0x1ca)]){case _0x2e95df(0x189):{const _0x51328d=_0x571c64[_0x2e95df(0x1b9)][_0x2e95df(0x1cf)];_0x570875[_0x2e95df(0x189)](_0x51328d);break;}}}),R(this[_0x2e547f(0x182)],_0x570875);}));}[_0x5c5821(0x163)](){const _0x2a802a=_0x5c5821;this[_0x2a802a(0x1c2)](this[_0x2a802a(0x161)]['commentUpdate$'][_0x2a802a(0x1b2)](async _0x219574=>{const _0x554d50=_0x2a802a;var _0x4b6165,_0x1b891e,_0x760f90,_0x52e7e5;const _0x436a85=(_0x4b6165=this[_0x554d50(0x1ad)][_0x554d50(0x193)](_0x219574[_0x554d50(0x17d)])['find'](_0x7d40d6=>_0x7d40d6[_0x554d50(0x180)]===_0x219574['threadId']))==null?void 0x0:_0x4b6165[_0x554d50(0x1a6)];if(!_0x436a85)return;const {unitId:_0x4916b1,subUnitId:_0x4d4cbe}=_0x436a85;switch(_0x219574[_0x554d50(0x164)]&&this[_0x554d50(0x176)][_0x554d50(0x1ab)](_0x219574[_0x554d50(0x164)]),_0x219574[_0x554d50(0x1ca)]){case v[_0x554d50(0x1b7)]:break;case v[_0x554d50(0x1aa)]:{this[_0x554d50(0x1ad)][_0x554d50(0x1b5)](_0x4916b1,_0x4d4cbe,{'unitId':_0x4916b1,'subUnitId':_0x4d4cbe,'ref':'','id':_0x219574[_0x554d50(0x18f)],'dT':f(+_0x219574[_0x554d50(0x1d3)]),'threadId':_0x219574[_0x554d50(0x180)],'personId':(_0x760f90=(_0x1b891e=_0x219574[_0x554d50(0x164)])==null?void 0x0:_0x1b891e[_0x554d50(0x1c0)])!=null?_0x760f90:_0x219574[_0x554d50(0x197)],'text':JSON[_0x554d50(0x1dd)](_0x219574[_0x554d50(0x16d)]),'parentId':_0x436a85['id']});break;}case v[_0x554d50(0x1a8)]:{const _0x494ff2=this[_0x554d50(0x1ad)][_0x554d50(0x16a)](_0x4916b1,_0x4d4cbe,_0x219574[_0x554d50(0x18f)]);_0x494ff2&&_0x494ff2['parentId']&&this[_0x554d50(0x1ad)][_0x554d50(0x194)](_0x4916b1,_0x4d4cbe,_0x219574[_0x554d50(0x18f)]);break;}case v[_0x554d50(0x1af)]:{this[_0x554d50(0x1ad)]['updateComment'](_0x4916b1,_0x4d4cbe,{'commentId':_0x219574[_0x554d50(0x18f)],'text':JSON[_0x554d50(0x1dd)](_0x219574['content'])});break;}case v['Solve']:{const _0x358d91=(_0x52e7e5=this[_0x554d50(0x1ad)]['getUnit'](_0x219574[_0x554d50(0x17d)])[_0x554d50(0x16e)](_0x3a696a=>_0x3a696a[_0x554d50(0x180)]===_0x219574[_0x554d50(0x180)]))==null?void 0x0:_0x52e7e5['root'];_0x358d91&&this[_0x554d50(0x1ad)][_0x554d50(0x160)](_0x4916b1,_0x4d4cbe,_0x358d91['id'],_0x219574[_0x554d50(0x17c)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x5c5821(0x162)])),S(0x1,c[_0x5c5821(0x17a)](M[_0x5c5821(0x1a0)])),S(0x2,c[_0x5c5821(0x17a)](c[_0x5c5821(0x171)])),S(0x3,c[_0x5c5821(0x17a)](c[_0x5c5821(0x1bb)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x1ed0a2,_0x260da3,_0x148111,_0x352da5)=>{const _0x51d31a=_0x5c5821;for(var _0x271aad=_0x352da5>0x1?void 0x0:_0x352da5?A(_0x260da3,_0x148111):_0x260da3,_0x19515e=_0x1ed0a2[_0x51d31a(0x1be)]-0x1,_0x1cfcf5;_0x19515e>=0x0;_0x19515e--)(_0x1cfcf5=_0x1ed0a2[_0x19515e])&&(_0x271aad=_0x1cfcf5(_0x271aad)||_0x271aad);return _0x271aad;},_=(_0x5c77b2,_0x30fe29)=>(_0x7f8418,_0x2093af)=>_0x30fe29(_0x7f8418,_0x2093af,_0x5c77b2);function Y(_0x415c04,_0xdef6a3){const _0x27f31b=_0x5c5821,_0x3639eb=_0x415c04['replies'][0x0];return{..._0xdef6a3,'id':_0x3639eb[_0x27f31b(0x18f)],'resolved':_0x415c04[_0x27f31b(0x17c)]===0x1,'dT':f(_0x3639eb[_0x27f31b(0x1d3)]),'personId':_0x3639eb[_0x27f31b(0x197)],'threadId':_0x3639eb[_0x27f31b(0x180)]};}function G(_0xa616fb,_0x44bd8d,_0x5c606b){const _0x5e4518=_0x5c5821;var _0x88e8a0,_0x157797;if(((_0x157797=(_0x88e8a0=_0xa616fb==null?void 0x0:_0xa616fb[_0x5e4518(0x1e1)])==null?void 0x0:_0x88e8a0['length'])!=null?_0x157797:0x0)>0x0){const _0x488fa8=(_0x362634,_0x3de9bf)=>({'id':_0x362634[_0x5e4518(0x18f)],'threadId':_0x362634[_0x5e4518(0x180)],'dT':f(_0x362634['createTimestamp']),'personId':_0x362634[_0x5e4518(0x197)],'resolved':_0xa616fb[_0x5e4518(0x17c)]===I['Solved'],'unitId':_0x44bd8d,'subUnitId':_0x5c606b,'text':JSON[_0x5e4518(0x1dd)](_0x362634[_0x5e4518(0x16d)]),'parentId':_0x3de9bf}),_0x4c8359=_0x488fa8(_0xa616fb[_0x5e4518(0x1e1)][0x0]);return{..._0x4c8359,'children':_0xa616fb['replies']['slice'](0x1)[_0x5e4518(0x1cc)](_0x70bf16=>_0x488fa8(_0x70bf16,_0x4c8359['id']))};}return null;}let g=class{constructor(_0x9033a9,_0x3607f9,_0x185642,_0x5ef25c){const _0x3b0f8e=_0x5c5821;this[_0x3b0f8e(0x1c5)]=_0x9033a9,this[_0x3b0f8e(0x176)]=_0x3607f9,this[_0x3b0f8e(0x1d9)]=_0x185642,this[_0x3b0f8e(0x182)]=_0x5ef25c;}async[_0x5c5821(0x1b5)](_0x4a35c3){const _0x7e947e=_0x5c5821;var _0x40b905,_0x512cec;const {parentId:_0x1c52f0,unitId:_0x3f2184,text:_0x413bb9,threadId:_0x1be4a8}=_0x4a35c3,_0x3a78c0=(_0x512cec=(_0x40b905=_0x413bb9[_0x7e947e(0x1a7)])==null?void 0x0:_0x40b905[_0x7e947e(0x1c8)](_0x43d2c2=>_0x43d2c2[_0x7e947e(0x198)]===c['CustomRangeType'][_0x7e947e(0x1d2)])[_0x7e947e(0x1cc)](_0x517edb=>_0x517edb[_0x7e947e(0x167)]))!=null?_0x512cec:[],_0x2de600=JSON[_0x7e947e(0x1b8)](_0x413bb9),_0x2c2a2d=(await this[_0x7e947e(0x1d9)][_0x7e947e(0x177)](_0x3f2184))['getMemberID']();if(_0x1c52f0){const _0xdbac6d={'memberId':_0x2c2a2d,'unitId':_0x3f2184,'content':_0x2de600,'mention':_0x3a78c0,'threadId':_0x1be4a8},_0x2abf92=(await this[_0x7e947e(0x1c5)][_0x7e947e(0x1d7)](_0x7e947e(0x17f)+_0x3f2184+_0x7e947e(0x1b1),{'body':_0xdbac6d}))[_0x7e947e(0x179)][_0x7e947e(0x168)];return{..._0x4a35c3,'id':_0x2abf92[_0x7e947e(0x18f)],'dT':c[_0x7e947e(0x1a4)](+_0x2abf92['createTimestamp'])[_0x7e947e(0x1c4)](_0x7e947e(0x1c3)),'personId':_0x2abf92[_0x7e947e(0x197)]};}else{const _0x81f9ea={'memberId':_0x2c2a2d,'unitId':_0x3f2184,'content':_0x2de600,'mention':_0x3a78c0},_0x2546aa=await this['_httpService'][_0x7e947e(0x1d7)]('/universer-api/comment/unit/'+_0x3f2184+'/add',{'body':_0x81f9ea});return Y(_0x2546aa[_0x7e947e(0x179)][_0x7e947e(0x18c)],_0x4a35c3);}}async[_0x5c5821(0x199)](_0x2fcfd0){const _0x3651cb=_0x5c5821;var _0x1b6fe6,_0x246d59;const {text:_0x547009,unitId:_0x5d3ecb}=_0x2fcfd0,_0x38eded=(_0x246d59=(_0x1b6fe6=_0x547009[_0x3651cb(0x1a7)])==null?void 0x0:_0x1b6fe6[_0x3651cb(0x1c8)](_0x1f23d8=>_0x1f23d8[_0x3651cb(0x198)]===c[_0x3651cb(0x1d1)][_0x3651cb(0x1d2)])[_0x3651cb(0x1cc)](_0x2df4d4=>_0x2df4d4['rangeId']))!=null?_0x246d59:[],_0x1d571c=JSON[_0x3651cb(0x1b8)](_0x547009),_0x595004=_0x2fcfd0[_0x3651cb(0x180)],_0x4488e6=_0x2fcfd0['id'],_0x4836fa={'memberId':(await this[_0x3651cb(0x1d9)][_0x3651cb(0x177)](_0x5d3ecb))[_0x3651cb(0x1e2)](),'unitId':_0x5d3ecb,'threadId':_0x595004,'mention':_0x38eded,'content':_0x1d571c,'replyId':_0x4488e6},_0x135940=await this[_0x3651cb(0x1c5)]['post'](_0x3651cb(0x17f)+_0x5d3ecb+_0x3651cb(0x1de),{'body':_0x4836fa});return!_0x135940['body'][_0x3651cb(0x174)]||_0x135940[_0x3651cb(0x179)][_0x3651cb(0x174)][_0x3651cb(0x16c)]===0x1;}async[_0x5c5821(0x160)](_0x168d69){const _0x1d0348=_0x5c5821,{unitId:_0x58f598}=_0x168d69,_0x454849=_0x168d69[_0x1d0348(0x180)],_0x16b810={'memberId':this['_userService'][_0x1d0348(0x1c1)]()[_0x1d0348(0x1c0)],'unitId':_0x58f598,'threadId':_0x454849,'solved':_0x168d69[_0x1d0348(0x170)]?I[_0x1d0348(0x1a3)]:I[_0x1d0348(0x183)]},_0x3d7baf=await this[_0x1d0348(0x1c5)]['post'](_0x1d0348(0x17f)+_0x58f598+_0x1d0348(0x187),{'body':_0x16b810});return!_0x3d7baf[_0x1d0348(0x179)]['error']||_0x3d7baf['body'][_0x1d0348(0x174)][_0x1d0348(0x16c)]===0x1;}async[_0x5c5821(0x194)](_0x121988,_0x18b5bb,_0x20a890,_0x3f1a69){const _0x1e7827=_0x5c5821,_0x4e5505={'memberId':(await this[_0x1e7827(0x1d9)][_0x1e7827(0x177)](_0x121988))[_0x1e7827(0x1e2)](),'threadId':_0x20a890,'replyId':_0x3f1a69,'unitId':_0x121988},_0x32586d=await this[_0x1e7827(0x1c5)][_0x1e7827(0x1d7)](_0x1e7827(0x17f)+_0x121988+_0x1e7827(0x1d6),{'body':_0x4e5505});return!_0x32586d[_0x1e7827(0x179)]['error']||_0x32586d[_0x1e7827(0x179)]['error']['code']===0x1;}async[_0x5c5821(0x16f)](_0xd4f3d1,_0x2ca29c,_0x18e7b0){const _0x17a04c=_0x5c5821,_0x23ec22={'unitId':_0xd4f3d1,'threadId':_0x18e7b0},_0x14e1f6=await this[_0x17a04c(0x1c5)][_0x17a04c(0x1d7)](_0x17a04c(0x17f)+_0xd4f3d1+_0x17a04c(0x1c9),{'body':_0x23ec22}),_0x3966bb=_0x18e7b0['map'](_0x28fcfd=>G(_0x14e1f6[_0x17a04c(0x179)][_0x17a04c(0x172)][_0x28fcfd],_0xd4f3d1,_0x2ca29c))[_0x17a04c(0x1c8)](Boolean);return Object[_0x17a04c(0x175)](_0x14e1f6[_0x17a04c(0x179)][_0x17a04c(0x17e)])['forEach'](_0x40758c=>{const _0x5471a8=_0x17a04c;this[_0x5471a8(0x176)][_0x5471a8(0x1ab)](_0x40758c);}),_0x3966bb;}[_0x5c5821(0x1ba)](_0x3c619a){const _0x18452f=_0x5c5821;return{'id':_0x3c619a['id'],'threadId':_0x3c619a['threadId'],'ref':_0x3c619a[_0x18452f(0x19a)]};}};g=x([_(0x0,c[_0x5c5821(0x17a)](P[_0x5c5821(0x19d)])),_(0x1,c[_0x5c5821(0x17a)](c[_0x5c5821(0x171)])),_(0x2,c[_0x5c5821(0x17a)](b[_0x5c5821(0x1a1)])),_(0x3,c[_0x5c5821(0x17a)](c[_0x5c5821(0x1bb)]))],g);var H=Object[_0x5c5821(0x196)],J=(_0x5d4fee,_0x4b997a,_0x1206b5,_0x1e95ff)=>{const _0x247aed=_0x5c5821;for(var _0x1bab69=_0x1e95ff>0x1?void 0x0:_0x1e95ff?H(_0x4b997a,_0x1206b5):_0x4b997a,_0xfa1fae=_0x5d4fee[_0x247aed(0x1be)]-0x1,_0x5a1b31;_0xfa1fae>=0x0;_0xfa1fae--)(_0x5a1b31=_0x5d4fee[_0xfa1fae])&&(_0x1bab69=_0x5a1b31(_0x1bab69)||_0x1bab69);return _0x1bab69;},y=(_0x28a718,_0x53c374)=>(_0x3b901f,_0x19e2e5)=>_0x53c374(_0x3b901f,_0x19e2e5,_0x28a718);let C=class extends c[_0x5c5821(0x190)]{constructor(_0x2ef3bb,_0x44a57d){const _0x4a0839=_0x5c5821;super(),this[_0x4a0839(0x1c7)]=_0x2ef3bb,this[_0x4a0839(0x18d)]=_0x44a57d,this[_0x4a0839(0x165)]();}[_0x5c5821(0x165)](){const _0x245729=_0x5c5821;this[_0x245729(0x1c7)][_0x245729(0x1e5)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x5c5821(0x1e4)]),y(0x1,c[_0x5c5821(0x17a)](g))],C);function _0x1a07(){const _0x4b465a=['/solved','@univerjs/thread-comment','add','3040248KfFEVX','6607314mJgdAr','comment','_threadCommentDataSource','@univerjs/network','replyId','Disposable','getUser','UniverInstanceType','getUnit','deleteComment','commentUpdate$','getOwnPropertyDescriptor','userId','rangeType','updateComment','ref','@univerjs/thread-comment-ui','UniverThreadCommentUIPlugin','HTTPService','onStarting','pluginName','ThreadCommentModel','CollaborationSessionService','UniverLicensePlugin','Solved','dayjs','symbol','root','customRanges','Delete','UNIVER_UNKNOWN','Reply','addUser','@univerjs-pro/collaboration-client','_threadCommentModel','toStringTag','Edit','/universer-api/user/list','/reply','subscribe','Solve','defineProperty','addComment','44972wftiap','Add','stringify','payload','saveCommentToSnapshot','Injector','UniverCollaborationClientPlugin','rxjs','length','_initUserSync','userID','getCurrentUser','disposeWithMe','YYYY/MM/DD\x20HH:mm','format','_httpService','onReady','_threadCommentDataSourceService','filter','/list','type','pipe','map','Plugin','_configService','personId','UniverThreadCommentDataSourcePlugin','CustomRangeType','COMMENT','createTimestamp','326503gSGcBk','6rXrrax','/delete','post','size','_sessionService','_config','delete','merge','parse','/edit','3649653Ujkcdb','9500060BqJaZJ','replies','getMemberID','18dTTciM','IThreadCommentDataSourceService','dataSource','resolveComment','_commentService','CommentService','_init','user','_initDataSource','2003304EcDtYD','rangeId','reply','get','getComment','setConfig','code','content','find','listComments','resolved','UserManagerService','comments','IConfigService','error','values','_userService','requireSession','bufferTime','body','Inject','forEach','solved','unitId','users','/universer-api/comment/unit/','threadId','Unknown','_injector','OpenOrReOpen','UNRECOGNIZED','Module','225recBAu'];_0x1a07=function(){return _0x4b465a;};return _0x1a07();}var F=Object['defineProperty'],L=Object[_0x5c5821(0x196)],Z=(_0x192b33,_0x3b0912,_0x514dc4)=>_0x3b0912 in _0x192b33?F(_0x192b33,_0x3b0912,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x514dc4}):_0x192b33[_0x3b0912]=_0x514dc4,W=(_0x496ada,_0x1760f3,_0x5c83ed,_0x62b9fb)=>{for(var _0x797f70=_0x62b9fb>0x1?void 0x0:_0x62b9fb?L(_0x1760f3,_0x5c83ed):_0x1760f3,_0xde5710=_0x496ada['length']-0x1,_0x1fe7dc;_0xde5710>=0x0;_0xde5710--)(_0x1fe7dc=_0x496ada[_0xde5710])&&(_0x797f70=_0x1fe7dc(_0x797f70)||_0x797f70);return _0x797f70;},O=(_0x2ce591,_0x208861)=>(_0x5c0bce,_0x3c17bf)=>_0x208861(_0x5c0bce,_0x3c17bf,_0x2ce591),N=(_0xb2c2e9,_0x1757a0,_0x49307a)=>Z(_0xb2c2e9,typeof _0x1757a0!=_0x5c5821(0x1a5)?_0x1757a0+'':_0x1757a0,_0x49307a);exports[_0x5c5821(0x1d0)]=class extends c[_0x5c5821(0x1cd)]{constructor(_0x214ed2=D,_0x551061,_0x334165){const _0x4054e4=_0x5c5821;super(),this[_0x4054e4(0x1da)]=_0x214ed2,this[_0x4054e4(0x182)]=_0x551061,this[_0x4054e4(0x1ce)]=_0x334165;const {..._0x28ba54}=c[_0x4054e4(0x1dc)]({},D,this['_config']);this[_0x4054e4(0x1ce)][_0x4054e4(0x16b)](q,_0x28ba54);}[_0x5c5821(0x19e)](){[[g],[C],[p]]['forEach'](_0x220ca5=>{const _0x548c8f=_0x4252;this[_0x548c8f(0x182)][_0x548c8f(0x189)](_0x220ca5);});}[_0x5c5821(0x1c6)](){const _0x108138=_0x5c5821;this['_injector'][_0x108138(0x169)](C),this[_0x108138(0x182)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x5c5821(0x19f),U),N(exports[_0x5c5821(0x1d0)],_0x5c5821(0x1ca),c[_0x5c5821(0x192)][_0x5c5821(0x1a9)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x5c5821(0x19c)],b[_0x5c5821(0x1bc)],T[_0x5c5821(0x1a2)]),O(0x1,c[_0x5c5821(0x17a)](c[_0x5c5821(0x1bb)])),O(0x2,c[_0x5c5821(0x173)])],exports[_0x5c5821(0x1d0)]);
1
+ 'use strict';const _0x367232=_0x4df4;(function(_0xd779eb,_0x252f9d){const _0x3f7aa4=_0x4df4,_0x12478=_0xd779eb();while(!![]){try{const _0x3b00bd=-parseInt(_0x3f7aa4(0x1e1))/0x1+parseInt(_0x3f7aa4(0x1b4))/0x2*(-parseInt(_0x3f7aa4(0x1b8))/0x3)+-parseInt(_0x3f7aa4(0x1ab))/0x4*(parseInt(_0x3f7aa4(0x1e5))/0x5)+parseInt(_0x3f7aa4(0x1aa))/0x6*(parseInt(_0x3f7aa4(0x1b5))/0x7)+parseInt(_0x3f7aa4(0x17c))/0x8+parseInt(_0x3f7aa4(0x196))/0x9+parseInt(_0x3f7aa4(0x19a))/0xa*(-parseInt(_0x3f7aa4(0x1dd))/0xb);if(_0x3b00bd===_0x252f9d)break;else _0x12478['push'](_0x12478['shift']());}catch(_0x525dd7){_0x12478['push'](_0x12478['shift']());}}}(_0x450c,0x720d3));Object[_0x367232(0x191)](exports,Symbol[_0x367232(0x16e)],{'value':_0x367232(0x1c8)});const b=require(_0x367232(0x176)),T=require(_0x367232(0x182)),c=require('@univerjs/core'),j=require(_0x367232(0x1c1)),M=require(_0x367232(0x17f)),w=require(_0x367232(0x192)),P=require('@univerjs/network'),U=_0x367232(0x16b);var I=(_0x10cf79=>(_0x10cf79[_0x10cf79[_0x367232(0x1a8)]=0x0]=_0x367232(0x1a8),_0x10cf79[_0x10cf79[_0x367232(0x1c9)]=0x1]='Solved',_0x10cf79[_0x10cf79[_0x367232(0x184)]=-0x1]=_0x367232(0x184),_0x10cf79))(I||{}),v=(_0x5e795c=>(_0x5e795c[_0x5e795c[_0x367232(0x1cd)]=0x0]=_0x367232(0x1cd),_0x5e795c[_0x5e795c[_0x367232(0x16c)]=0x1]='Add',_0x5e795c[_0x5e795c[_0x367232(0x1ad)]=0x2]='Reply',_0x5e795c[_0x5e795c[_0x367232(0x1cb)]=0x3]=_0x367232(0x1cb),_0x5e795c[_0x5e795c['Delete']=0x4]=_0x367232(0x1e0),_0x5e795c[_0x5e795c['Solve']=0x5]=_0x367232(0x1a9),_0x5e795c[_0x5e795c['UNRECOGNIZED']=-0x1]=_0x367232(0x184),_0x5e795c))(v||{});const f=_0xf78c50=>c['dayjs'](new Date(+_0xf78c50))[_0x367232(0x1bd)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2f9629,_0x433fcb)=>{const _0x552865=_0x367232,_0x5dee73=_0x2f9629['get'](c[_0x552865(0x1bc)]),_0x4c792d=_0x2f9629['get'](P['HTTPService']);_0x433fcb[_0x552865(0x1cf)](_0xfb84a5=>{const _0x3cf832=_0x552865;_0x5dee73[_0x3cf832(0x183)](_0xfb84a5)&&_0x433fcb['delete'](_0xfb84a5);}),_0x433fcb['size']&&(await _0x4c792d[_0x552865(0x1bf)](_0x552865(0x1b7),{'params':{'userIDs':[..._0x433fcb]}}))[_0x552865(0x1a0)]['users']['forEach'](_0x155f38=>{const _0x26639b=_0x552865;_0x155f38&&_0x5dee73[_0x26639b(0x1db)](_0x155f38);});};var $=Object[_0x367232(0x1d9)],E=(_0x32bbd9,_0x2a9b0a,_0x87baaf,_0x38eef9)=>{const _0x396d57=_0x367232;for(var _0x278eb5=_0x38eef9>0x1?void 0x0:_0x38eef9?$(_0x2a9b0a,_0x87baaf):_0x2a9b0a,_0x93c396=_0x32bbd9[_0x396d57(0x19f)]-0x1,_0x5f334b;_0x93c396>=0x0;_0x93c396--)(_0x5f334b=_0x32bbd9[_0x93c396])&&(_0x278eb5=_0x5f334b(_0x278eb5)||_0x278eb5);return _0x278eb5;},S=(_0x548bd8,_0x3a51a3)=>(_0x5a542c,_0x3356e0)=>_0x3a51a3(_0x5a542c,_0x3356e0,_0x548bd8);let p=class extends c[_0x367232(0x1ae)]{constructor(_0x33aff1,_0x4c0329,_0x5be9d7,_0x486542){const _0x88a054=_0x367232;super(),this['_commentService']=_0x33aff1,this[_0x88a054(0x175)]=_0x4c0329,this['_userService']=_0x5be9d7,this[_0x88a054(0x17d)]=_0x486542,this[_0x88a054(0x1dc)](),this[_0x88a054(0x1d5)]();}[_0x367232(0x1d5)](){const _0x4e0641=_0x367232;this[_0x4e0641(0x1e4)](this['_threadCommentModel'][_0x4e0641(0x1bb)][_0x4e0641(0x1a7)](w['bufferTime'](0x10))[_0x4e0641(0x1d0)](_0x397734=>{const _0x38657b=_0x4e0641,_0x33eaf7=new Set();_0x397734[_0x38657b(0x1cf)](_0x245203=>{const _0x4c39e3=_0x38657b;switch(_0x245203[_0x4c39e3(0x195)]){case _0x4c39e3(0x1da):{const _0x156d7c=_0x245203[_0x4c39e3(0x190)]['personId'];_0x33eaf7['add'](_0x156d7c);break;}}}),R(this[_0x38657b(0x17d)],_0x33eaf7);}));}[_0x367232(0x1dc)](){const _0x3cdf32=_0x367232;this[_0x3cdf32(0x1e4)](this['_commentService'][_0x3cdf32(0x1bb)][_0x3cdf32(0x1d0)](async _0x50c80a=>{const _0x4d7d2f=_0x3cdf32;var _0x5b725a,_0x5e65a5,_0x2f8222,_0x4e75e3;const _0x3d8d71=(_0x5b725a=this[_0x4d7d2f(0x175)]['getUnit'](_0x50c80a['unitId'])[_0x4d7d2f(0x199)](_0x40ccd1=>_0x40ccd1[_0x4d7d2f(0x1ce)]===_0x50c80a[_0x4d7d2f(0x1ce)]))==null?void 0x0:_0x5b725a[_0x4d7d2f(0x169)];if(!_0x3d8d71)return;const {unitId:_0x31c8c7,subUnitId:_0x4beba0}=_0x3d8d71;switch(_0x50c80a[_0x4d7d2f(0x1c5)]&&this[_0x4d7d2f(0x186)]['addUser'](_0x50c80a['user']),_0x50c80a[_0x4d7d2f(0x195)]){case v[_0x4d7d2f(0x16c)]:break;case v[_0x4d7d2f(0x1ad)]:{this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1a3)](_0x31c8c7,_0x4beba0,{'unitId':_0x31c8c7,'subUnitId':_0x4beba0,'ref':'','id':_0x50c80a[_0x4d7d2f(0x170)],'dT':f(+_0x50c80a[_0x4d7d2f(0x1e6)]),'threadId':_0x50c80a[_0x4d7d2f(0x1ce)],'personId':(_0x2f8222=(_0x5e65a5=_0x50c80a['user'])==null?void 0x0:_0x5e65a5[_0x4d7d2f(0x19d)])!=null?_0x2f8222:_0x50c80a[_0x4d7d2f(0x1cc)],'text':JSON[_0x4d7d2f(0x1ac)](_0x50c80a[_0x4d7d2f(0x1c7)]),'parentId':_0x3d8d71['id']});break;}case v[_0x4d7d2f(0x1e0)]:{const _0x19a54b=this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1d3)](_0x31c8c7,_0x4beba0,_0x50c80a['replyId']);_0x19a54b&&_0x19a54b['parentId']&&this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1b6)](_0x31c8c7,_0x4beba0,_0x50c80a['replyId']);break;}case v[_0x4d7d2f(0x1cb)]:{this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1a2)](_0x31c8c7,_0x4beba0,{'commentId':_0x50c80a[_0x4d7d2f(0x170)],'text':JSON[_0x4d7d2f(0x1ac)](_0x50c80a[_0x4d7d2f(0x1c7)])});break;}case v['Solve']:{const _0x49df2c=(_0x4e75e3=this['_threadCommentModel'][_0x4d7d2f(0x1de)](_0x50c80a['unitId'])[_0x4d7d2f(0x199)](_0x37ec67=>_0x37ec67[_0x4d7d2f(0x1ce)]===_0x50c80a[_0x4d7d2f(0x1ce)]))==null?void 0x0:_0x4e75e3[_0x4d7d2f(0x169)];_0x49df2c&&this[_0x4d7d2f(0x175)][_0x4d7d2f(0x17a)](_0x31c8c7,_0x4beba0,_0x49df2c['id'],_0x50c80a['solved']===I[_0x4d7d2f(0x1c9)]);break;}}}));}};p=E([S(0x0,c[_0x367232(0x173)](b[_0x367232(0x16a)])),S(0x1,c[_0x367232(0x173)](M[_0x367232(0x172)])),S(0x2,c['Inject'](c[_0x367232(0x1bc)])),S(0x3,c['Inject'](c[_0x367232(0x188)]))],p);const q=_0x367232(0x1d8),D={};var A=Object[_0x367232(0x1d9)],x=(_0x46ab0a,_0x4f14c6,_0x33d409,_0x34d104)=>{const _0x4fba65=_0x367232;for(var _0x4fe326=_0x34d104>0x1?void 0x0:_0x34d104?A(_0x4f14c6,_0x33d409):_0x4f14c6,_0x182a6a=_0x46ab0a[_0x4fba65(0x19f)]-0x1,_0x1f8842;_0x182a6a>=0x0;_0x182a6a--)(_0x1f8842=_0x46ab0a[_0x182a6a])&&(_0x4fe326=_0x1f8842(_0x4fe326)||_0x4fe326);return _0x4fe326;},_=(_0x1811fd,_0x10379d)=>(_0x4688b7,_0x35aaef)=>_0x10379d(_0x4688b7,_0x35aaef,_0x1811fd);function Y(_0x18f434,_0x80f676){const _0x4f8b15=_0x367232,_0x49ab0e=_0x18f434[_0x4f8b15(0x1ba)][0x0];return{..._0x80f676,'id':_0x49ab0e[_0x4f8b15(0x170)],'resolved':_0x18f434[_0x4f8b15(0x1ca)]===0x1,'dT':f(_0x49ab0e[_0x4f8b15(0x1e6)]),'personId':_0x49ab0e[_0x4f8b15(0x1cc)],'threadId':_0x49ab0e[_0x4f8b15(0x1ce)]};}function G(_0x2c4374,_0x51abb5,_0xcd3e69){const _0x26b9e7=_0x367232;var _0x11fbc1,_0x4088d1;if(((_0x4088d1=(_0x11fbc1=_0x2c4374==null?void 0x0:_0x2c4374['replies'])==null?void 0x0:_0x11fbc1['length'])!=null?_0x4088d1:0x0)>0x0){const _0x5a8b7b=(_0x3bf35a,_0x22dd5a)=>({'id':_0x3bf35a[_0x26b9e7(0x170)],'threadId':_0x3bf35a[_0x26b9e7(0x1ce)],'dT':f(_0x3bf35a[_0x26b9e7(0x1e6)]),'personId':_0x3bf35a[_0x26b9e7(0x1cc)],'resolved':_0x2c4374['solved']===I[_0x26b9e7(0x1c9)],'unitId':_0x51abb5,'subUnitId':_0xcd3e69,'text':JSON[_0x26b9e7(0x1ac)](_0x3bf35a[_0x26b9e7(0x1c7)]),'parentId':_0x22dd5a}),_0x52b059=_0x5a8b7b(_0x2c4374['replies'][0x0]);return{..._0x52b059,'children':_0x2c4374['replies'][_0x26b9e7(0x198)](0x1)[_0x26b9e7(0x18b)](_0x2eac46=>_0x5a8b7b(_0x2eac46,_0x52b059['id']))};}return null;}let g=class{constructor(_0x34e766,_0x2f96ee,_0x553378,_0x155a29){const _0x241f72=_0x367232;this[_0x241f72(0x1b2)]=_0x34e766,this[_0x241f72(0x186)]=_0x2f96ee,this[_0x241f72(0x1df)]=_0x553378,this['_injector']=_0x155a29;}async[_0x367232(0x1a3)](_0x5564a2){const _0x1a9e03=_0x367232;var _0x1250a5,_0x7bffd4;const {parentId:_0x2daf3d,unitId:_0x1a3909,text:_0x359fcd,threadId:_0x5a5333}=_0x5564a2,_0x2f8a1a=(_0x7bffd4=(_0x1250a5=_0x359fcd[_0x1a9e03(0x1a1)])==null?void 0x0:_0x1250a5[_0x1a9e03(0x1d6)](_0xaa2cc0=>_0xaa2cc0['rangeType']===c[_0x1a9e03(0x19b)][_0x1a9e03(0x1d4)])['map'](_0x3e5099=>_0x3e5099['rangeId']))!=null?_0x7bffd4:[],_0x1c99fa=JSON[_0x1a9e03(0x16d)](_0x359fcd),_0x15a88f=(await this[_0x1a9e03(0x1df)]['requireSession'](_0x1a3909))['getMemberID']();if(_0x2daf3d){const _0x2b9a9e={'memberId':_0x15a88f,'unitId':_0x1a3909,'content':_0x1c99fa,'mention':_0x2f8a1a,'threadId':_0x5a5333},_0x4eaeb3=(await this[_0x1a9e03(0x1b2)][_0x1a9e03(0x179)](_0x1a9e03(0x1e2)+_0x1a3909+_0x1a9e03(0x1c3),{'body':_0x2b9a9e}))[_0x1a9e03(0x1a0)][_0x1a9e03(0x17b)];return{..._0x5564a2,'id':_0x4eaeb3[_0x1a9e03(0x170)],'dT':c[_0x1a9e03(0x1d7)](+_0x4eaeb3['createTimestamp'])[_0x1a9e03(0x1bd)](_0x1a9e03(0x1b1)),'personId':_0x4eaeb3['userId']};}else{const _0x2398c0={'memberId':_0x15a88f,'unitId':_0x1a3909,'content':_0x1c99fa,'mention':_0x2f8a1a},_0x4fe46=await this[_0x1a9e03(0x1b2)][_0x1a9e03(0x179)]('/universer-api/comment/unit/'+_0x1a3909+_0x1a9e03(0x18a),{'body':_0x2398c0});return Y(_0x4fe46[_0x1a9e03(0x1a0)]['comment'],_0x5564a2);}}async[_0x367232(0x1a2)](_0x50b88c){const _0xdaf4bf=_0x367232;var _0x295940,_0x301745;const {text:_0x579139,unitId:_0x2dbaff}=_0x50b88c,_0x3ec79c=(_0x301745=(_0x295940=_0x579139[_0xdaf4bf(0x1a1)])==null?void 0x0:_0x295940[_0xdaf4bf(0x1d6)](_0x59e453=>_0x59e453[_0xdaf4bf(0x19e)]===c[_0xdaf4bf(0x19b)][_0xdaf4bf(0x1d4)])['map'](_0x450c1e=>_0x450c1e['rangeId']))!=null?_0x301745:[],_0x171587=JSON[_0xdaf4bf(0x16d)](_0x579139),_0x2e0ebd=_0x50b88c['threadId'],_0x2139c7=_0x50b88c['id'],_0x294a0d={'memberId':(await this[_0xdaf4bf(0x1df)][_0xdaf4bf(0x178)](_0x2dbaff))[_0xdaf4bf(0x1c6)](),'unitId':_0x2dbaff,'threadId':_0x2e0ebd,'mention':_0x3ec79c,'content':_0x171587,'replyId':_0x2139c7},_0x37ce02=await this['_httpService'][_0xdaf4bf(0x179)](_0xdaf4bf(0x1e2)+_0x2dbaff+_0xdaf4bf(0x197),{'body':_0x294a0d});return!_0x37ce02['body'][_0xdaf4bf(0x193)]||_0x37ce02[_0xdaf4bf(0x1a0)][_0xdaf4bf(0x193)]['code']===0x1;}async[_0x367232(0x17a)](_0x7d1ca8){const _0x29e058=_0x367232,{unitId:_0x23c431}=_0x7d1ca8,_0x307c5e=_0x7d1ca8[_0x29e058(0x1ce)],_0x19eaa3={'memberId':this[_0x29e058(0x186)]['getCurrentUser']()[_0x29e058(0x19d)],'unitId':_0x23c431,'threadId':_0x307c5e,'solved':_0x7d1ca8[_0x29e058(0x185)]?I['Solved']:I[_0x29e058(0x1a8)]},_0x41a8b5=await this[_0x29e058(0x1b2)]['post']('/universer-api/comment/unit/'+_0x23c431+'/solved',{'body':_0x19eaa3});return!_0x41a8b5[_0x29e058(0x1a0)][_0x29e058(0x193)]||_0x41a8b5['body'][_0x29e058(0x193)][_0x29e058(0x18f)]===0x1;}async['deleteComment'](_0x287ca4,_0x27b070,_0x2b611e,_0x44f3a9){const _0x331e72=_0x367232,_0x14fbda={'memberId':(await this[_0x331e72(0x1df)][_0x331e72(0x178)](_0x287ca4))[_0x331e72(0x1c6)](),'threadId':_0x2b611e,'replyId':_0x44f3a9,'unitId':_0x287ca4},_0x219f61=await this[_0x331e72(0x1b2)][_0x331e72(0x179)](_0x331e72(0x1e2)+_0x287ca4+_0x331e72(0x1e3),{'body':_0x14fbda});return!_0x219f61[_0x331e72(0x1a0)]['error']||_0x219f61[_0x331e72(0x1a0)][_0x331e72(0x193)][_0x331e72(0x18f)]===0x1;}async['listComments'](_0x150692,_0x30bd69,_0x53c191){const _0x1e46d4=_0x367232,_0x12cdff={'unitId':_0x150692,'threadId':_0x53c191},_0x4a3321=await this[_0x1e46d4(0x1b2)][_0x1e46d4(0x179)]('/universer-api/comment/unit/'+_0x150692+_0x1e46d4(0x171),{'body':_0x12cdff}),_0x16a2f4=_0x53c191[_0x1e46d4(0x18b)](_0x51ab6d=>G(_0x4a3321['body'][_0x1e46d4(0x174)][_0x51ab6d],_0x150692,_0x30bd69))['filter'](Boolean);return Object[_0x1e46d4(0x1a5)](_0x4a3321[_0x1e46d4(0x1a0)][_0x1e46d4(0x1af)])[_0x1e46d4(0x1cf)](_0x5d6e58=>{const _0x3bd19b=_0x1e46d4;this[_0x3bd19b(0x186)][_0x3bd19b(0x1db)](_0x5d6e58);}),_0x16a2f4;}[_0x367232(0x18c)](_0x4f9dbe){const _0x5b2736=_0x367232;return{'id':_0x4f9dbe['id'],'threadId':_0x4f9dbe['threadId'],'ref':_0x4f9dbe[_0x5b2736(0x1be)]};}};g=x([_(0x0,c[_0x367232(0x173)](P[_0x367232(0x187)])),_(0x1,c[_0x367232(0x173)](c[_0x367232(0x1bc)])),_(0x2,c[_0x367232(0x173)](b[_0x367232(0x1b0)])),_(0x3,c[_0x367232(0x173)](c[_0x367232(0x188)]))],g);var H=Object[_0x367232(0x1d9)],J=(_0x2fc280,_0x261b27,_0x54d2f4,_0x53fcff)=>{const _0x1b746b=_0x367232;for(var _0x280d01=_0x53fcff>0x1?void 0x0:_0x53fcff?H(_0x261b27,_0x54d2f4):_0x261b27,_0x5d46bb=_0x2fc280[_0x1b746b(0x19f)]-0x1,_0x1dc319;_0x5d46bb>=0x0;_0x5d46bb--)(_0x1dc319=_0x2fc280[_0x5d46bb])&&(_0x280d01=_0x1dc319(_0x280d01)||_0x280d01);return _0x280d01;},y=(_0x1d96ae,_0x3a825b)=>(_0x46d80e,_0x27cc00)=>_0x3a825b(_0x46d80e,_0x27cc00,_0x1d96ae);let C=class extends c[_0x367232(0x1ae)]{constructor(_0x5a9de0,_0x3385bd){const _0x55c606=_0x367232;super(),this[_0x55c606(0x189)]=_0x5a9de0,this[_0x55c606(0x19c)]=_0x3385bd,this[_0x55c606(0x177)]();}[_0x367232(0x177)](){const _0x1bde51=_0x367232;this[_0x1bde51(0x189)]['dataSource']=this['_threadCommentDataSource'],this[_0x1bde51(0x189)][_0x1bde51(0x1d2)]=!0x1;}};C=J([y(0x0,M[_0x367232(0x1c4)]),y(0x1,c[_0x367232(0x173)](g))],C);function _0x4df4(_0x3b5c,_0x151c53){const _0x450c85=_0x450c();return _0x4df4=function(_0x4df499,_0x24f296){_0x4df499=_0x4df499-0x169;let _0x45c2d9=_0x450c85[_0x4df499];return _0x45c2d9;},_0x4df4(_0x3b5c,_0x151c53);}var F=Object[_0x367232(0x191)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1e259b,_0xeb17b6,_0x228973)=>_0xeb17b6 in _0x1e259b?F(_0x1e259b,_0xeb17b6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x228973}):_0x1e259b[_0xeb17b6]=_0x228973,W=(_0x5935a5,_0x5059f3,_0x5a8cd1,_0x4d5912)=>{const _0x1d3291=_0x367232;for(var _0x2720c5=_0x4d5912>0x1?void 0x0:_0x4d5912?L(_0x5059f3,_0x5a8cd1):_0x5059f3,_0x270789=_0x5935a5[_0x1d3291(0x19f)]-0x1,_0x23e82d;_0x270789>=0x0;_0x270789--)(_0x23e82d=_0x5935a5[_0x270789])&&(_0x2720c5=_0x23e82d(_0x2720c5)||_0x2720c5);return _0x2720c5;},O=(_0x2d0980,_0x1d1bf5)=>(_0x2e1606,_0x4c8a9d)=>_0x1d1bf5(_0x2e1606,_0x4c8a9d,_0x2d0980),N=(_0x4c539a,_0x438c06,_0x38f44a)=>Z(_0x4c539a,typeof _0x438c06!=_0x367232(0x180)?_0x438c06+'':_0x438c06,_0x38f44a);function _0x450c(){const _0x46f1d2=['@univerjs-pro/collaboration-client','_initDataSource','requireSession','post','resolveComment','reply','5937424SxOccx','_injector','_config','@univerjs/thread-comment','symbol','UniverCollaborationClientPlugin','@univerjs-pro/license','getUser','UNRECOGNIZED','resolved','_userService','HTTPService','Injector','_threadCommentDataSourceService','/add','map','saveCommentToSnapshot','pluginName','UniverThreadCommentUIPlugin','code','payload','defineProperty','rxjs','error','merge','type','3933198ezbhkc','/edit','slice','find','116890diYOvf','CustomRangeType','_threadCommentDataSource','userID','rangeType','length','body','customRanges','updateComment','addComment','setConfig','values','UniverLicensePlugin','pipe','OpenOrReOpen','Solve','12InTdQn','569684WXiHiy','parse','Reply','Disposable','users','CollaborationSessionService','YYYY/MM/DD\x20HH:mm','_httpService','UniverThreadCommentDataSourcePlugin','2uyETmo','2239531KDaknz','deleteComment','/universer-api/user/list','527997ERGHRt','UniverInstanceType','replies','commentUpdate$','UserManagerService','format','ref','get','IConfigService','@univerjs/thread-comment-ui','_configService','/reply','IThreadCommentDataSourceService','user','getMemberID','content','Module','Solved','solved','Edit','userId','Unknown','threadId','forEach','subscribe','Plugin','syncUpdateMutationToColla','getComment','COMMENT','_initUserSync','filter','dayjs','thread-comment-data-source.config','getOwnPropertyDescriptor','add','addUser','_init','275MbHFay','getUnit','_sessionService','Delete','741266feTEPI','/universer-api/comment/unit/','/delete','disposeWithMe','5jaSmib','createTimestamp','root','CommentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','stringify','toStringTag','UNIVER_UNKNOWN','replyId','/list','ThreadCommentModel','Inject','comments','_threadCommentModel'];_0x450c=function(){return _0x46f1d2;};return _0x450c();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x367232(0x1d1)]{constructor(_0x3b7606=D,_0x1152ca,_0x3c736e){const _0x5c9dff=_0x367232;super(),this[_0x5c9dff(0x17e)]=_0x3b7606,this[_0x5c9dff(0x17d)]=_0x1152ca,this[_0x5c9dff(0x1c2)]=_0x3c736e;const {..._0x2a21aa}=c[_0x5c9dff(0x194)]({},D,this[_0x5c9dff(0x17e)]);this['_configService'][_0x5c9dff(0x1a4)](q,_0x2a21aa);}['onStarting'](){const _0x57b935=_0x367232;[[g],[C],[p]][_0x57b935(0x1cf)](_0x43b0d8=>{const _0x497ab3=_0x57b935;this[_0x497ab3(0x17d)][_0x497ab3(0x1da)](_0x43b0d8);});}['onReady'](){const _0x28ec21=_0x367232;this['_injector'][_0x28ec21(0x1bf)](C),this[_0x28ec21(0x17d)]['get'](p);}},N(exports[_0x367232(0x1b3)],_0x367232(0x18d),U),N(exports[_0x367232(0x1b3)],_0x367232(0x195),c[_0x367232(0x1b9)][_0x367232(0x16f)]),exports[_0x367232(0x1b3)]=W([c['DependentOn'](j[_0x367232(0x18e)],b[_0x367232(0x181)],T[_0x367232(0x1a6)]),O(0x1,c[_0x367232(0x173)](c[_0x367232(0x188)])),O(0x2,c[_0x367232(0x1c0)])],exports[_0x367232(0x1b3)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4845ea=_0x6940;(function(_0x5f0ece,_0x1e40ae){const _0x4543ff=_0x6940,_0x5bee79=_0x5f0ece();while(!![]){try{const _0x351067=-parseInt(_0x4543ff(0xd3))/0x1+-parseInt(_0x4543ff(0xd1))/0x2+-parseInt(_0x4543ff(0xad))/0x3+parseInt(_0x4543ff(0xc1))/0x4*(-parseInt(_0x4543ff(0x82))/0x5)+parseInt(_0x4543ff(0x8c))/0x6+parseInt(_0x4543ff(0xc3))/0x7+parseInt(_0x4543ff(0x98))/0x8;if(_0x351067===_0x1e40ae)break;else _0x5bee79['push'](_0x5bee79['shift']());}catch(_0x59cde1){_0x5bee79['push'](_0x5bee79['shift']());}}}(_0x76c9,0x39135));import{CommentService as _0x5f1bda,CollaborationSessionService as _0x1a3d82,UniverCollaborationClientPlugin as _0x6a2fba}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x45810e}from'@univerjs-pro/license';function _0x6940(_0x267a78,_0x1a1310){const _0x76c91d=_0x76c9();return _0x6940=function(_0x694028,_0x4b6dca){_0x694028=_0x694028-0x80;let _0x50c51c=_0x76c91d[_0x694028];return _0x50c51c;},_0x6940(_0x267a78,_0x1a1310);}import{dayjs as _0x4d3e30,UserManagerService as _0x56ea55,Inject as _0x4173d0,Injector as _0x5905e3,Disposable as _0x17feda,CustomRangeType as _0x5f5740,UniverInstanceType as _0x161e92,DependentOn as _0x1ce5fd,IConfigService as _0x22d314,Plugin as _0x42140b,merge as _0x50b81b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d3295}from'@univerjs/thread-comment-ui';function _0x76c9(){const _0x2f52d4=['_init','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','disposeWithMe','addUser','1148208dEOcEb','values','getUser','body','root','post','UNIVER_UNKNOWN','_initDataSource','_initUserSync','getCurrentUser','/edit','onStarting','8204536mYPrEN','stringify','OpenOrReOpen','/reply','replyId','createTimestamp','Edit','/add','delete','/universer-api/user/list','_config','solved','format','subscribe','ref','payload','UNRECOGNIZED','size','commentUpdate$','parentId','COMMENT','1199736nVskTc','_sessionService','length','_injector','Solved','parse','threadId','customRanges','add','symbol','userId','type','pipe','/list','_httpService','deleteComment','Delete','replies','_threadCommentDataSourceService','personId','148844VxrTan','content','1914857EWEtXv','user','addComment','saveCommentToSnapshot','Reply','getOwnPropertyDescriptor','forEach','updateComment','_threadCommentDataSource','Solve','Unknown','code','users','rangeId','897812FPUagR','/universer-api/comment/unit/','110199VoKgsT','getMemberID','setConfig','thread-comment-data-source.config','reply','find','syncUpdateMutationToColla','_userService','comment','getComment','/solved','userID','get','getUnit','error','Add','slice','resolved','comments','map','onReady','YYYY/MM/DD\x20HH:mm','40GlGJvf','_configService','unitId','_threadCommentModel'];_0x76c9=function(){return _0x2f52d4;};return _0x76c9();}import{ThreadCommentModel as _0x13d21d,IThreadCommentDataSourceService as _0xf1e621}from'@univerjs/thread-comment';import{bufferTime as _0x597e0a}from'rxjs';import{HTTPService as _0x4088a0}from'@univerjs/network';const W=_0x4845ea(0x88);var I=(_0xea19a1=>(_0xea19a1[_0xea19a1[_0x4845ea(0x9a)]=0x0]=_0x4845ea(0x9a),_0xea19a1[_0xea19a1['Solved']=0x1]=_0x4845ea(0xb1),_0xea19a1[_0xea19a1[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0xea19a1))(I||{}),v=(_0x13843a=>(_0x13843a[_0x13843a[_0x4845ea(0xcd)]=0x0]=_0x4845ea(0xcd),_0x13843a[_0x13843a['Add']=0x1]=_0x4845ea(0xe2),_0x13843a[_0x13843a[_0x4845ea(0xc7)]=0x2]='Reply',_0x13843a[_0x13843a[_0x4845ea(0x9e)]=0x3]='Edit',_0x13843a[_0x13843a[_0x4845ea(0xbd)]=0x4]=_0x4845ea(0xbd),_0x13843a[_0x13843a[_0x4845ea(0xcc)]=0x5]='Solve',_0x13843a[_0x13843a[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0x13843a))(v||{});const D=_0x1af597=>_0x4d3e30(new Date(+_0x1af597))[_0x4845ea(0xa4)](_0x4845ea(0x81)),B=async(_0xc7505c,_0x18be95)=>{const _0x14897e=_0x4845ea,_0x547536=_0xc7505c['get'](_0x56ea55),_0x2fedb8=_0xc7505c[_0x14897e(0xdf)](_0x4088a0);_0x18be95[_0x14897e(0xc9)](_0x5844b9=>{const _0x5096f9=_0x14897e;_0x547536[_0x5096f9(0x8e)](_0x5844b9)&&_0x18be95[_0x5096f9(0xa0)](_0x5844b9);}),_0x18be95[_0x14897e(0xa9)]&&(await _0x2fedb8[_0x14897e(0xdf)](_0x14897e(0xa1),{'params':{'userIDs':[..._0x18be95]}}))['body'][_0x14897e(0xcf)][_0x14897e(0xc9)](_0xb5ffc6=>{const _0x40dd74=_0x14897e;_0xb5ffc6&&_0x547536[_0x40dd74(0x8b)](_0xb5ffc6);});};var K=Object[_0x4845ea(0xc8)],V=(_0xff959,_0x4b0699,_0x222fb4,_0x5e2ed4)=>{const _0x33c36d=_0x4845ea;for(var _0x379c57=_0x5e2ed4>0x1?void 0x0:_0x5e2ed4?K(_0x4b0699,_0x222fb4):_0x4b0699,_0x4237f6=_0xff959[_0x33c36d(0xaf)]-0x1,_0x1fc8c6;_0x4237f6>=0x0;_0x4237f6--)(_0x1fc8c6=_0xff959[_0x4237f6])&&(_0x379c57=_0x1fc8c6(_0x379c57)||_0x379c57);return _0x379c57;},p=(_0x4335aa,_0x18f2be)=>(_0x4bdf72,_0x4c3c11)=>_0x18f2be(_0x4bdf72,_0x4c3c11,_0x4335aa);let S=class extends _0x17feda{constructor(_0x46b013,_0x304864,_0x160435,_0x81eb89){const _0x320c1a=_0x4845ea;super(),this['_commentService']=_0x46b013,this['_threadCommentModel']=_0x304864,this[_0x320c1a(0xda)]=_0x160435,this['_injector']=_0x81eb89,this[_0x320c1a(0x86)](),this[_0x320c1a(0x94)]();}[_0x4845ea(0x94)](){const _0x26d3ec=_0x4845ea;this[_0x26d3ec(0x8a)](this['_threadCommentModel'][_0x26d3ec(0xaa)][_0x26d3ec(0xb9)](_0x597e0a(0x10))[_0x26d3ec(0xa5)](_0x245f5f=>{const _0x515f45=_0x26d3ec,_0x22cec2=new Set();_0x245f5f[_0x515f45(0xc9)](_0x535ba8=>{const _0x2313b8=_0x515f45;switch(_0x535ba8[_0x2313b8(0xb8)]){case _0x2313b8(0xb5):{const _0x48aac9=_0x535ba8[_0x2313b8(0xa7)][_0x2313b8(0xc0)];_0x22cec2['add'](_0x48aac9);break;}}}),B(this[_0x515f45(0xb0)],_0x22cec2);}));}['_init'](){const _0x1ab718=_0x4845ea;this[_0x1ab718(0x8a)](this['_commentService'][_0x1ab718(0xaa)]['subscribe'](async _0x2a1da5=>{const _0x3963d3=_0x1ab718;var _0x45f1cd,_0x15acca,_0x50723b,_0x1ec352;const _0x2bb2d7=(_0x45f1cd=this['_threadCommentModel']['getUnit'](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0xf82b0b=>_0xf82b0b[_0x3963d3(0xb3)]===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x45f1cd[_0x3963d3(0x90)];if(!_0x2bb2d7)return;const {unitId:_0x237b14,subUnitId:_0x9853c4}=_0x2bb2d7;switch(_0x2a1da5[_0x3963d3(0xc4)]&&this[_0x3963d3(0xda)][_0x3963d3(0x8b)](_0x2a1da5[_0x3963d3(0xc4)]),_0x2a1da5[_0x3963d3(0xb8)]){case v['Add']:break;case v['Reply']:{this[_0x3963d3(0x85)]['addComment'](_0x237b14,_0x9853c4,{'unitId':_0x237b14,'subUnitId':_0x9853c4,'ref':'','id':_0x2a1da5[_0x3963d3(0x9c)],'dT':D(+_0x2a1da5[_0x3963d3(0x9d)]),'threadId':_0x2a1da5[_0x3963d3(0xb3)],'personId':(_0x50723b=(_0x15acca=_0x2a1da5[_0x3963d3(0xc4)])==null?void 0x0:_0x15acca[_0x3963d3(0xde)])!=null?_0x50723b:_0x2a1da5[_0x3963d3(0xb7)],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)]),'parentId':_0x2bb2d7['id']});break;}case v[_0x3963d3(0xbd)]:{const _0x13f4ec=this[_0x3963d3(0x85)][_0x3963d3(0xdc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);_0x13f4ec&&_0x13f4ec[_0x3963d3(0xab)]&&this['_threadCommentModel'][_0x3963d3(0xbc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);break;}case v[_0x3963d3(0x9e)]:{this[_0x3963d3(0x85)][_0x3963d3(0xca)](_0x237b14,_0x9853c4,{'commentId':_0x2a1da5['replyId'],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)])});break;}case v[_0x3963d3(0xcc)]:{const _0x476ca2=(_0x1ec352=this['_threadCommentModel'][_0x3963d3(0xe0)](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0x230a8e=>_0x230a8e['threadId']===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x1ec352[_0x3963d3(0x90)];_0x476ca2&&this['_threadCommentModel']['resolveComment'](_0x237b14,_0x9853c4,_0x476ca2['id'],_0x2a1da5['solved']===I[_0x3963d3(0xb1)]);break;}}}));}};S=V([p(0x0,_0x4173d0(_0x5f1bda)),p(0x1,_0x4173d0(_0x13d21d)),p(0x2,_0x4173d0(_0x56ea55)),p(0x3,_0x4173d0(_0x5905e3))],S);const z=_0x4845ea(0xd6),M={};var k=Object[_0x4845ea(0xc8)],Q=(_0x1f560e,_0xc19d7c,_0x952527,_0x13224c)=>{const _0x5e8920=_0x4845ea;for(var _0x6a3795=_0x13224c>0x1?void 0x0:_0x13224c?k(_0xc19d7c,_0x952527):_0xc19d7c,_0x59293f=_0x1f560e[_0x5e8920(0xaf)]-0x1,_0x5f22ad;_0x59293f>=0x0;_0x59293f--)(_0x5f22ad=_0x1f560e[_0x59293f])&&(_0x6a3795=_0x5f22ad(_0x6a3795)||_0x6a3795);return _0x6a3795;},_=(_0x316bc3,_0x335540)=>(_0x53a774,_0x3359dc)=>_0x335540(_0x53a774,_0x3359dc,_0x316bc3);function X(_0x572a31,_0x374096){const _0x2cfaea=_0x4845ea,_0x1098f5=_0x572a31[_0x2cfaea(0xbe)][0x0];return{..._0x374096,'id':_0x1098f5[_0x2cfaea(0x9c)],'resolved':_0x572a31[_0x2cfaea(0xa3)]===0x1,'dT':D(_0x1098f5[_0x2cfaea(0x9d)]),'personId':_0x1098f5[_0x2cfaea(0xb7)],'threadId':_0x1098f5[_0x2cfaea(0xb3)]};}function ee(_0x4eb297,_0x25e238,_0x2d6065){const _0x53b67d=_0x4845ea;var _0x2cca9d,_0x309ae8;if(((_0x309ae8=(_0x2cca9d=_0x4eb297==null?void 0x0:_0x4eb297[_0x53b67d(0xbe)])==null?void 0x0:_0x2cca9d['length'])!=null?_0x309ae8:0x0)>0x0){const _0x1bdca4=(_0x4fa42e,_0x1c9b18)=>({'id':_0x4fa42e[_0x53b67d(0x9c)],'threadId':_0x4fa42e['threadId'],'dT':D(_0x4fa42e[_0x53b67d(0x9d)]),'personId':_0x4fa42e['userId'],'resolved':_0x4eb297[_0x53b67d(0xa3)]===I[_0x53b67d(0xb1)],'unitId':_0x25e238,'subUnitId':_0x2d6065,'text':JSON[_0x53b67d(0xb2)](_0x4fa42e['content']),'parentId':_0x1c9b18}),_0x255065=_0x1bdca4(_0x4eb297[_0x53b67d(0xbe)][0x0]);return{..._0x255065,'children':_0x4eb297[_0x53b67d(0xbe)][_0x53b67d(0xe3)](0x1)['map'](_0x1a5f49=>_0x1bdca4(_0x1a5f49,_0x255065['id']))};}return null;}let f=class{constructor(_0x42702a,_0x67dfd1,_0x492144,_0x24686c){const _0x382e90=_0x4845ea;this[_0x382e90(0xbb)]=_0x42702a,this[_0x382e90(0xda)]=_0x67dfd1,this[_0x382e90(0xae)]=_0x492144,this['_injector']=_0x24686c;}async[_0x4845ea(0xc5)](_0x18c2fb){const _0x276b96=_0x4845ea;var _0x50c8a2,_0x2901b8;const {parentId:_0x567987,unitId:_0x19fccc,text:_0x2d4351,threadId:_0x941d03}=_0x18c2fb,_0x22f711=(_0x2901b8=(_0x50c8a2=_0x2d4351['customRanges'])==null?void 0x0:_0x50c8a2['filter'](_0x282ecc=>_0x282ecc['rangeType']===_0x5f5740['COMMENT'])['map'](_0x258529=>_0x258529[_0x276b96(0xd0)]))!=null?_0x2901b8:[],_0x5a25eb=JSON[_0x276b96(0x99)](_0x2d4351),_0x214e44=(await this[_0x276b96(0xae)]['requireSession'](_0x19fccc))[_0x276b96(0xd4)]();if(_0x567987){const _0x3ab599={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711,'threadId':_0x941d03},_0x4bddaa=(await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9b),{'body':_0x3ab599}))[_0x276b96(0x8f)][_0x276b96(0xd7)];return{..._0x18c2fb,'id':_0x4bddaa[_0x276b96(0x9c)],'dT':_0x4d3e30(+_0x4bddaa[_0x276b96(0x9d)])['format'](_0x276b96(0x81)),'personId':_0x4bddaa['userId']};}else{const _0x1a9e39={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711},_0xb493a9=await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9f),{'body':_0x1a9e39});return X(_0xb493a9['body'][_0x276b96(0xdb)],_0x18c2fb);}}async[_0x4845ea(0xca)](_0x952a77){const _0x16ce0e=_0x4845ea;var _0x169034,_0x28bfff;const {text:_0x2750b1,unitId:_0x3b2ff2}=_0x952a77,_0x13eae3=(_0x28bfff=(_0x169034=_0x2750b1[_0x16ce0e(0xb4)])==null?void 0x0:_0x169034['filter'](_0x1fa310=>_0x1fa310['rangeType']===_0x5f5740[_0x16ce0e(0xac)])[_0x16ce0e(0xe6)](_0x5a003d=>_0x5a003d['rangeId']))!=null?_0x28bfff:[],_0x2a0676=JSON[_0x16ce0e(0x99)](_0x2750b1),_0x54dd8b=_0x952a77[_0x16ce0e(0xb3)],_0x2d57d7=_0x952a77['id'],_0x202b9e={'memberId':(await this['_sessionService']['requireSession'](_0x3b2ff2))['getMemberID'](),'unitId':_0x3b2ff2,'threadId':_0x54dd8b,'mention':_0x13eae3,'content':_0x2a0676,'replyId':_0x2d57d7},_0xd9ec75=await this['_httpService'][_0x16ce0e(0x91)](_0x16ce0e(0xd2)+_0x3b2ff2+_0x16ce0e(0x96),{'body':_0x202b9e});return!_0xd9ec75[_0x16ce0e(0x8f)]['error']||_0xd9ec75[_0x16ce0e(0x8f)][_0x16ce0e(0xe1)][_0x16ce0e(0xce)]===0x1;}async['resolveComment'](_0x4ce925){const _0x5dab6d=_0x4845ea,{unitId:_0x5b2407}=_0x4ce925,_0x4c8d16=_0x4ce925[_0x5dab6d(0xb3)],_0x3b6cd1={'memberId':this[_0x5dab6d(0xda)][_0x5dab6d(0x95)]()[_0x5dab6d(0xde)],'unitId':_0x5b2407,'threadId':_0x4c8d16,'solved':_0x4ce925[_0x5dab6d(0xe4)]?I['Solved']:I[_0x5dab6d(0x9a)]},_0x2f4050=await this[_0x5dab6d(0xbb)][_0x5dab6d(0x91)](_0x5dab6d(0xd2)+_0x5b2407+_0x5dab6d(0xdd),{'body':_0x3b6cd1});return!_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)]||_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)][_0x5dab6d(0xce)]===0x1;}async['deleteComment'](_0x51acda,_0x1491ee,_0x856ccb,_0x293a42){const _0x11c9b2=_0x4845ea,_0x5bbd7d={'memberId':(await this[_0x11c9b2(0xae)][_0x11c9b2(0x87)](_0x51acda))[_0x11c9b2(0xd4)](),'threadId':_0x856ccb,'replyId':_0x293a42,'unitId':_0x51acda},_0x479635=await this[_0x11c9b2(0xbb)][_0x11c9b2(0x91)](_0x11c9b2(0xd2)+_0x51acda+'/delete',{'body':_0x5bbd7d});return!_0x479635[_0x11c9b2(0x8f)]['error']||_0x479635[_0x11c9b2(0x8f)][_0x11c9b2(0xe1)]['code']===0x1;}async['listComments'](_0x449999,_0x35654d,_0x1af0a8){const _0x4c30e7=_0x4845ea,_0xfda1fc={'unitId':_0x449999,'threadId':_0x1af0a8},_0x515648=await this[_0x4c30e7(0xbb)]['post']('/universer-api/comment/unit/'+_0x449999+_0x4c30e7(0xba),{'body':_0xfda1fc}),_0x60286=_0x1af0a8[_0x4c30e7(0xe6)](_0x19c797=>ee(_0x515648[_0x4c30e7(0x8f)][_0x4c30e7(0xe5)][_0x19c797],_0x449999,_0x35654d))['filter'](Boolean);return Object[_0x4c30e7(0x8d)](_0x515648['body'][_0x4c30e7(0xcf)])[_0x4c30e7(0xc9)](_0x1de0a8=>{const _0x2e4eec=_0x4c30e7;this['_userService'][_0x2e4eec(0x8b)](_0x1de0a8);}),_0x60286;}[_0x4845ea(0xc6)](_0x27ab0e){const _0x52d172=_0x4845ea;return{'id':_0x27ab0e['id'],'threadId':_0x27ab0e[_0x52d172(0xb3)],'ref':_0x27ab0e[_0x52d172(0xa6)]};}};f=Q([_(0x0,_0x4173d0(_0x4088a0)),_(0x1,_0x4173d0(_0x56ea55)),_(0x2,_0x4173d0(_0x1a3d82)),_(0x3,_0x4173d0(_0x5905e3))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x69e504,_0xa85112,_0x6c1d91,_0x30e476)=>{const _0x5ade0a=_0x4845ea;for(var _0x4a8c97=_0x30e476>0x1?void 0x0:_0x30e476?re(_0xa85112,_0x6c1d91):_0xa85112,_0x39e210=_0x69e504[_0x5ade0a(0xaf)]-0x1,_0x1815e0;_0x39e210>=0x0;_0x39e210--)(_0x1815e0=_0x69e504[_0x39e210])&&(_0x4a8c97=_0x1815e0(_0x4a8c97)||_0x4a8c97);return _0x4a8c97;},N=(_0x3c42d7,_0x2dd4f0)=>(_0x4abb01,_0x5bea90)=>_0x2dd4f0(_0x4abb01,_0x5bea90,_0x3c42d7);let g=class extends _0x17feda{constructor(_0x4f07ff,_0x3ec5b8){const _0x5929fe=_0x4845ea;super(),this['_threadCommentDataSourceService']=_0x4f07ff,this['_threadCommentDataSource']=_0x3ec5b8,this[_0x5929fe(0x93)]();}[_0x4845ea(0x93)](){const _0x836c37=_0x4845ea;this[_0x836c37(0xbf)][_0x836c37(0x89)]=this[_0x836c37(0xcb)],this[_0x836c37(0xbf)][_0x836c37(0xd9)]=!0x1;}};g=te([N(0x0,_0xf1e621),N(0x1,_0x4173d0(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3353ff,_0x190b64,_0x8b1c37)=>_0x190b64 in _0x3353ff?se(_0x3353ff,_0x190b64,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8b1c37}):_0x3353ff[_0x190b64]=_0x8b1c37,ie=(_0x55178a,_0x494d8c,_0x15357b,_0x12cbd8)=>{for(var _0x59ef3a=_0x12cbd8>0x1?void 0x0:_0x12cbd8?oe(_0x494d8c,_0x15357b):_0x494d8c,_0x573c15=_0x55178a['length']-0x1,_0x1f76e3;_0x573c15>=0x0;_0x573c15--)(_0x1f76e3=_0x55178a[_0x573c15])&&(_0x59ef3a=_0x1f76e3(_0x59ef3a)||_0x59ef3a);return _0x59ef3a;},w=(_0x508dc8,_0x46b04e)=>(_0x1046ee,_0x210144)=>_0x46b04e(_0x1046ee,_0x210144,_0x508dc8),$=(_0x27b07f,_0xabc664,_0x17b6d5)=>ne(_0x27b07f,typeof _0xabc664!=_0x4845ea(0xb6)?_0xabc664+'':_0xabc664,_0x17b6d5);let b=class extends _0x42140b{constructor(_0x1e74ad=M,_0x43d0de,_0x48e9ea){const _0x2b90b3=_0x4845ea;super(),this['_config']=_0x1e74ad,this[_0x2b90b3(0xb0)]=_0x43d0de,this[_0x2b90b3(0x83)]=_0x48e9ea;const {..._0x1fbd50}=_0x50b81b({},M,this[_0x2b90b3(0xa2)]);this['_configService'][_0x2b90b3(0xd5)](z,_0x1fbd50);}[_0x4845ea(0x97)](){[[f],[g],[S]]['forEach'](_0x24e0dd=>{const _0x4d71f6=_0x6940;this[_0x4d71f6(0xb0)][_0x4d71f6(0xb5)](_0x24e0dd);});}[_0x4845ea(0x80)](){const _0x1363af=_0x4845ea;this[_0x1363af(0xb0)]['get'](g),this['_injector'][_0x1363af(0xdf)](S);}};$(b,'pluginName',W),$(b,_0x4845ea(0xb8),_0x161e92[_0x4845ea(0x92)]),b=ie([_0x1ce5fd(_0x1d3295,_0x6a2fba,_0x45810e),w(0x1,_0x4173d0(_0x5905e3)),w(0x2,_0x22d314)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x14e8f6=_0x31ff;(function(_0x2481d2,_0x5e0d93){const _0x474d7a=_0x31ff,_0x45e3ad=_0x2481d2();while(!![]){try{const _0x759750=-parseInt(_0x474d7a(0xcc))/0x1*(-parseInt(_0x474d7a(0x118))/0x2)+parseInt(_0x474d7a(0xe9))/0x3*(parseInt(_0x474d7a(0x115))/0x4)+-parseInt(_0x474d7a(0x111))/0x5*(-parseInt(_0x474d7a(0x107))/0x6)+parseInt(_0x474d7a(0xd4))/0x7+parseInt(_0x474d7a(0xf2))/0x8+-parseInt(_0x474d7a(0x123))/0x9+parseInt(_0x474d7a(0xc5))/0xa*(-parseInt(_0x474d7a(0xf4))/0xb);if(_0x759750===_0x5e0d93)break;else _0x45e3ad['push'](_0x45e3ad['shift']());}catch(_0x3b2381){_0x45e3ad['push'](_0x45e3ad['shift']());}}}(_0x2411,0x2c294));import{CommentService as _0x6346bf,CollaborationSessionService as _0x6db0c8,UniverCollaborationClientPlugin as _0x281d67}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fa253}from'@univerjs-pro/license';import{dayjs as _0x47e258,UserManagerService as _0x44233a,Inject as _0x59bc1b,Injector as _0x5ee519,Disposable as _0x4a90c9,CustomRangeType as _0x3d1118,UniverInstanceType as _0x454a2c,DependentOn as _0x4be0bf,IConfigService as _0x38206b,Plugin as _0x41398f,merge as _0xdfd847}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xce439}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23d8a0,IThreadCommentDataSourceService as _0x1f38fa}from'@univerjs/thread-comment';function _0x31ff(_0x2aeb82,_0xbec4c){const _0x2411a4=_0x2411();return _0x31ff=function(_0x31ffb0,_0x2e9983){_0x31ffb0=_0x31ffb0-0xbe;let _0x595ea8=_0x2411a4[_0x31ffb0];return _0x595ea8;},_0x31ff(_0x2aeb82,_0xbec4c);}import{bufferTime as _0x390860}from'rxjs';import{HTTPService as _0x5ae147}from'@univerjs/network';const W=_0x14e8f6(0xee);var I=(_0x541df3=>(_0x541df3[_0x541df3['OpenOrReOpen']=0x0]=_0x14e8f6(0xe3),_0x541df3[_0x541df3[_0x14e8f6(0x104)]=0x1]=_0x14e8f6(0x104),_0x541df3[_0x541df3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x541df3))(I||{}),v=(_0x189f28=>(_0x189f28[_0x189f28[_0x14e8f6(0xf3)]=0x0]=_0x14e8f6(0xf3),_0x189f28[_0x189f28['Add']=0x1]=_0x14e8f6(0xcf),_0x189f28[_0x189f28[_0x14e8f6(0x101)]=0x2]=_0x14e8f6(0x101),_0x189f28[_0x189f28['Edit']=0x3]=_0x14e8f6(0xc1),_0x189f28[_0x189f28[_0x14e8f6(0xfd)]=0x4]=_0x14e8f6(0xfd),_0x189f28[_0x189f28[_0x14e8f6(0xbf)]=0x5]=_0x14e8f6(0xbf),_0x189f28[_0x189f28[_0x14e8f6(0xdd)]=-0x1]=_0x14e8f6(0xdd),_0x189f28))(v||{});const D=_0x5ce6cd=>_0x47e258(new Date(+_0x5ce6cd))[_0x14e8f6(0x109)](_0x14e8f6(0x119)),B=async(_0x1f5dc3,_0x59284a)=>{const _0x3f6c43=_0x14e8f6,_0x19e75=_0x1f5dc3[_0x3f6c43(0xd7)](_0x44233a),_0x4804f3=_0x1f5dc3[_0x3f6c43(0xd7)](_0x5ae147);_0x59284a[_0x3f6c43(0xc4)](_0x5d03ee=>{const _0x417b0c=_0x3f6c43;_0x19e75['getUser'](_0x5d03ee)&&_0x59284a[_0x417b0c(0xd2)](_0x5d03ee);}),_0x59284a[_0x3f6c43(0xd8)]&&(await _0x4804f3[_0x3f6c43(0xd7)](_0x3f6c43(0x116),{'params':{'userIDs':[..._0x59284a]}}))['body'][_0x3f6c43(0xe8)][_0x3f6c43(0xc4)](_0x1c410a=>{const _0x55bced=_0x3f6c43;_0x1c410a&&_0x19e75[_0x55bced(0xff)](_0x1c410a);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x27fa48,_0x26bbfa,_0x68ac5e,_0x726e5a)=>{const _0x3e9f77=_0x14e8f6;for(var _0x233cf1=_0x726e5a>0x1?void 0x0:_0x726e5a?K(_0x26bbfa,_0x68ac5e):_0x26bbfa,_0x1bc118=_0x27fa48[_0x3e9f77(0xd6)]-0x1,_0xd74061;_0x1bc118>=0x0;_0x1bc118--)(_0xd74061=_0x27fa48[_0x1bc118])&&(_0x233cf1=_0xd74061(_0x233cf1)||_0x233cf1);return _0x233cf1;},p=(_0x439f04,_0x4a7d14)=>(_0x5509cd,_0xfd9dc8)=>_0x4a7d14(_0x5509cd,_0xfd9dc8,_0x439f04);let S=class extends _0x4a90c9{constructor(_0x42cbd0,_0x24ed3d,_0x5ce4e4,_0x2e3f9f){const _0x1dd1ff=_0x14e8f6;super(),this[_0x1dd1ff(0xc9)]=_0x42cbd0,this['_threadCommentModel']=_0x24ed3d,this['_userService']=_0x5ce4e4,this[_0x1dd1ff(0xef)]=_0x2e3f9f,this[_0x1dd1ff(0xf5)](),this[_0x1dd1ff(0x11d)]();}['_initUserSync'](){const _0xa92790=_0x14e8f6;this['disposeWithMe'](this[_0xa92790(0x126)][_0xa92790(0xf8)][_0xa92790(0xf1)](_0x390860(0x10))[_0xa92790(0xe1)](_0x50acd0=>{const _0xd46a63=_0xa92790,_0x341e26=new Set();_0x50acd0[_0xd46a63(0xc4)](_0x217e8d=>{const _0x40f8ae=_0xd46a63;switch(_0x217e8d[_0x40f8ae(0xca)]){case _0x40f8ae(0xc2):{const _0x41827d=_0x217e8d[_0x40f8ae(0xdc)][_0x40f8ae(0xeb)];_0x341e26[_0x40f8ae(0xc2)](_0x41827d);break;}}}),B(this[_0xd46a63(0xef)],_0x341e26);}));}[_0x14e8f6(0xf5)](){const _0x38fe3f=_0x14e8f6;this[_0x38fe3f(0x103)](this[_0x38fe3f(0xc9)][_0x38fe3f(0xf8)][_0x38fe3f(0xe1)](async _0x4fd38f=>{const _0x2afcbc=_0x38fe3f;var _0x4fa83d,_0x26eeb6,_0x2aa72e,_0x354d6d;const _0x601859=(_0x4fa83d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])['find'](_0x446e5d=>_0x446e5d[_0x2afcbc(0x10e)]===_0x4fd38f[_0x2afcbc(0x10e)]))==null?void 0x0:_0x4fa83d[_0x2afcbc(0xd9)];if(!_0x601859)return;const {unitId:_0x221cd1,subUnitId:_0xee5ada}=_0x601859;switch(_0x4fd38f[_0x2afcbc(0x113)]&&this[_0x2afcbc(0x122)]['addUser'](_0x4fd38f['user']),_0x4fd38f[_0x2afcbc(0xca)]){case v['Add']:break;case v[_0x2afcbc(0x101)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0x128)](_0x221cd1,_0xee5ada,{'unitId':_0x221cd1,'subUnitId':_0xee5ada,'ref':'','id':_0x4fd38f[_0x2afcbc(0xd3)],'dT':D(+_0x4fd38f['createTimestamp']),'threadId':_0x4fd38f[_0x2afcbc(0x10e)],'personId':(_0x2aa72e=(_0x26eeb6=_0x4fd38f[_0x2afcbc(0x113)])==null?void 0x0:_0x26eeb6['userID'])!=null?_0x2aa72e:_0x4fd38f[_0x2afcbc(0xcd)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f[_0x2afcbc(0xfb)]),'parentId':_0x601859['id']});break;}case v['Delete']:{const _0x318e51=this['_threadCommentModel']['getComment'](_0x221cd1,_0xee5ada,_0x4fd38f['replyId']);_0x318e51&&_0x318e51[_0x2afcbc(0x10c)]&&this[_0x2afcbc(0x126)][_0x2afcbc(0xe2)](_0x221cd1,_0xee5ada,_0x4fd38f[_0x2afcbc(0xd3)]);break;}case v[_0x2afcbc(0xc1)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0xbe)](_0x221cd1,_0xee5ada,{'commentId':_0x4fd38f[_0x2afcbc(0xd3)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f['content'])});break;}case v[_0x2afcbc(0xbf)]:{const _0x458ba9=(_0x354d6d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])[_0x2afcbc(0xd1)](_0x2d0026=>_0x2d0026['threadId']===_0x4fd38f['threadId']))==null?void 0x0:_0x354d6d[_0x2afcbc(0xd9)];_0x458ba9&&this[_0x2afcbc(0x126)][_0x2afcbc(0xc8)](_0x221cd1,_0xee5ada,_0x458ba9['id'],_0x4fd38f[_0x2afcbc(0xcb)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59bc1b(_0x6346bf)),p(0x1,_0x59bc1b(_0x23d8a0)),p(0x2,_0x59bc1b(_0x44233a)),p(0x3,_0x59bc1b(_0x5ee519))],S);const z=_0x14e8f6(0xe0),M={};var k=Object[_0x14e8f6(0x10b)],Q=(_0x20ed71,_0x572fad,_0x49abcf,_0x3f6fbc)=>{for(var _0x13b9c8=_0x3f6fbc>0x1?void 0x0:_0x3f6fbc?k(_0x572fad,_0x49abcf):_0x572fad,_0x31dcc7=_0x20ed71['length']-0x1,_0x1bb3d6;_0x31dcc7>=0x0;_0x31dcc7--)(_0x1bb3d6=_0x20ed71[_0x31dcc7])&&(_0x13b9c8=_0x1bb3d6(_0x13b9c8)||_0x13b9c8);return _0x13b9c8;},_=(_0x3aced9,_0x2dc6c8)=>(_0x408e82,_0x1093c6)=>_0x2dc6c8(_0x408e82,_0x1093c6,_0x3aced9);function X(_0xe2cbb8,_0x14addc){const _0x427158=_0x14e8f6,_0x1c3b6b=_0xe2cbb8[_0x427158(0xf7)][0x0];return{..._0x14addc,'id':_0x1c3b6b[_0x427158(0xd3)],'resolved':_0xe2cbb8[_0x427158(0xcb)]===0x1,'dT':D(_0x1c3b6b[_0x427158(0x102)]),'personId':_0x1c3b6b[_0x427158(0xcd)],'threadId':_0x1c3b6b[_0x427158(0x10e)]};}function ee(_0x305687,_0x5ea6ba,_0x29aff7){const _0x9554fe=_0x14e8f6;var _0x110feb,_0x22a35e;if(((_0x22a35e=(_0x110feb=_0x305687==null?void 0x0:_0x305687['replies'])==null?void 0x0:_0x110feb[_0x9554fe(0xd6)])!=null?_0x22a35e:0x0)>0x0){const _0xc2ce31=(_0x4cb2dd,_0x3995bb)=>({'id':_0x4cb2dd['replyId'],'threadId':_0x4cb2dd[_0x9554fe(0x10e)],'dT':D(_0x4cb2dd[_0x9554fe(0x102)]),'personId':_0x4cb2dd[_0x9554fe(0xcd)],'resolved':_0x305687['solved']===I[_0x9554fe(0x104)],'unitId':_0x5ea6ba,'subUnitId':_0x29aff7,'text':JSON[_0x9554fe(0xed)](_0x4cb2dd['content']),'parentId':_0x3995bb}),_0x464e0b=_0xc2ce31(_0x305687[_0x9554fe(0xf7)][0x0]);return{..._0x464e0b,'children':_0x305687[_0x9554fe(0xf7)][_0x9554fe(0x110)](0x1)[_0x9554fe(0x105)](_0xf966cc=>_0xc2ce31(_0xf966cc,_0x464e0b['id']))};}return null;}let f=class{constructor(_0x20fce9,_0x11385d,_0x46f32b,_0x4854b4){const _0x3bc21f=_0x14e8f6;this[_0x3bc21f(0xc0)]=_0x20fce9,this[_0x3bc21f(0x122)]=_0x11385d,this[_0x3bc21f(0x124)]=_0x46f32b,this[_0x3bc21f(0xef)]=_0x4854b4;}async[_0x14e8f6(0x128)](_0x1851e4){const _0x1e6f03=_0x14e8f6;var _0x3ef62f,_0xb6fb58;const {parentId:_0x328a95,unitId:_0x468f6c,text:_0x25e55f,threadId:_0x558da0}=_0x1851e4,_0x309e67=(_0xb6fb58=(_0x3ef62f=_0x25e55f[_0x1e6f03(0x11b)])==null?void 0x0:_0x3ef62f[_0x1e6f03(0xc7)](_0x245dac=>_0x245dac[_0x1e6f03(0x114)]===_0x3d1118[_0x1e6f03(0x129)])[_0x1e6f03(0x105)](_0x457ca8=>_0x457ca8[_0x1e6f03(0xf6)]))!=null?_0xb6fb58:[],_0x326c60=JSON[_0x1e6f03(0xe6)](_0x25e55f),_0x512e66=(await this['_sessionService'][_0x1e6f03(0xde)](_0x468f6c))[_0x1e6f03(0xfe)]();if(_0x328a95){const _0x475578={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67,'threadId':_0x558da0},_0x4172a6=(await this[_0x1e6f03(0xc0)][_0x1e6f03(0xd5)]('/universer-api/comment/unit/'+_0x468f6c+_0x1e6f03(0x121),{'body':_0x475578}))[_0x1e6f03(0xdf)][_0x1e6f03(0xf0)];return{..._0x1851e4,'id':_0x4172a6['replyId'],'dT':_0x47e258(+_0x4172a6['createTimestamp'])[_0x1e6f03(0x109)](_0x1e6f03(0x119)),'personId':_0x4172a6[_0x1e6f03(0xcd)]};}else{const _0x3b7587={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67},_0x2d686b=await this['_httpService']['post'](_0x1e6f03(0xfa)+_0x468f6c+_0x1e6f03(0xda),{'body':_0x3b7587});return X(_0x2d686b[_0x1e6f03(0xdf)][_0x1e6f03(0x11c)],_0x1851e4);}}async['updateComment'](_0x4d0efc){const _0x3779b0=_0x14e8f6;var _0x4e2acc,_0xe849d6;const {text:_0x32c058,unitId:_0x184b7a}=_0x4d0efc,_0x166c3f=(_0xe849d6=(_0x4e2acc=_0x32c058['customRanges'])==null?void 0x0:_0x4e2acc[_0x3779b0(0xc7)](_0x6a6db2=>_0x6a6db2[_0x3779b0(0x114)]===_0x3d1118[_0x3779b0(0x129)])[_0x3779b0(0x105)](_0x5db9f5=>_0x5db9f5[_0x3779b0(0xf6)]))!=null?_0xe849d6:[],_0x50c451=JSON['stringify'](_0x32c058),_0x4e9ee4=_0x4d0efc[_0x3779b0(0x10e)],_0xada142=_0x4d0efc['id'],_0x423454={'memberId':(await this[_0x3779b0(0x124)]['requireSession'](_0x184b7a))[_0x3779b0(0xfe)](),'unitId':_0x184b7a,'threadId':_0x4e9ee4,'mention':_0x166c3f,'content':_0x50c451,'replyId':_0xada142},_0x4c3a38=await this[_0x3779b0(0xc0)][_0x3779b0(0xd5)](_0x3779b0(0xfa)+_0x184b7a+_0x3779b0(0xea),{'body':_0x423454});return!_0x4c3a38['body'][_0x3779b0(0xfc)]||_0x4c3a38['body'][_0x3779b0(0xfc)]['code']===0x1;}async[_0x14e8f6(0xc8)](_0x2a0fda){const _0x2a1630=_0x14e8f6,{unitId:_0x338ee6}=_0x2a0fda,_0x59efe2=_0x2a0fda['threadId'],_0x1c0d87={'memberId':this['_userService'][_0x2a1630(0x10d)]()[_0x2a1630(0x11e)],'unitId':_0x338ee6,'threadId':_0x59efe2,'solved':_0x2a0fda[_0x2a1630(0xe7)]?I['Solved']:I[_0x2a1630(0xe3)]},_0x160403=await this['_httpService'][_0x2a1630(0xd5)](_0x2a1630(0xfa)+_0x338ee6+_0x2a1630(0xce),{'body':_0x1c0d87});return!_0x160403['body']['error']||_0x160403['body'][_0x2a1630(0xfc)][_0x2a1630(0xf9)]===0x1;}async[_0x14e8f6(0xe2)](_0x4bbe02,_0x1f000e,_0x43eaa0,_0x41aa8c){const _0x2547b1=_0x14e8f6,_0xf17f68={'memberId':(await this[_0x2547b1(0x124)][_0x2547b1(0xde)](_0x4bbe02))['getMemberID'](),'threadId':_0x43eaa0,'replyId':_0x41aa8c,'unitId':_0x4bbe02},_0xa47529=await this[_0x2547b1(0xc0)][_0x2547b1(0xd5)](_0x2547b1(0xfa)+_0x4bbe02+'/delete',{'body':_0xf17f68});return!_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)]||_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)][_0x2547b1(0xf9)]===0x1;}async[_0x14e8f6(0x10f)](_0x1ad2ba,_0x1f4692,_0x15ea54){const _0x15e753=_0x14e8f6,_0x7829de={'unitId':_0x1ad2ba,'threadId':_0x15ea54},_0x36450b=await this['_httpService'][_0x15e753(0xd5)](_0x15e753(0xfa)+_0x1ad2ba+_0x15e753(0x106),{'body':_0x7829de}),_0x5e05a3=_0x15ea54[_0x15e753(0x105)](_0x5ab93c=>ee(_0x36450b[_0x15e753(0xdf)][_0x15e753(0x125)][_0x5ab93c],_0x1ad2ba,_0x1f4692))[_0x15e753(0xc7)](Boolean);return Object[_0x15e753(0xd0)](_0x36450b[_0x15e753(0xdf)][_0x15e753(0xe8)])[_0x15e753(0xc4)](_0x15d45e=>{const _0x54c674=_0x15e753;this[_0x54c674(0x122)][_0x54c674(0xff)](_0x15d45e);}),_0x5e05a3;}['saveCommentToSnapshot'](_0x4ed038){const _0x144f34=_0x14e8f6;return{'id':_0x4ed038['id'],'threadId':_0x4ed038[_0x144f34(0x10e)],'ref':_0x4ed038[_0x144f34(0x100)]};}};f=Q([_(0x0,_0x59bc1b(_0x5ae147)),_(0x1,_0x59bc1b(_0x44233a)),_(0x2,_0x59bc1b(_0x6db0c8)),_(0x3,_0x59bc1b(_0x5ee519))],f);var re=Object[_0x14e8f6(0x10b)],te=(_0x35451d,_0x25aa9b,_0x4eb219,_0x40a5b3)=>{const _0x2cefac=_0x14e8f6;for(var _0x2042e4=_0x40a5b3>0x1?void 0x0:_0x40a5b3?re(_0x25aa9b,_0x4eb219):_0x25aa9b,_0x5d4b81=_0x35451d[_0x2cefac(0xd6)]-0x1,_0x5efc5a;_0x5d4b81>=0x0;_0x5d4b81--)(_0x5efc5a=_0x35451d[_0x5d4b81])&&(_0x2042e4=_0x5efc5a(_0x2042e4)||_0x2042e4);return _0x2042e4;},N=(_0x53ef74,_0x2f595b)=>(_0x1d4661,_0x590e98)=>_0x2f595b(_0x1d4661,_0x590e98,_0x53ef74);let g=class extends _0x4a90c9{constructor(_0x1197db,_0x3b81d4){const _0x9ce958=_0x14e8f6;super(),this[_0x9ce958(0x11a)]=_0x1197db,this[_0x9ce958(0x127)]=_0x3b81d4,this[_0x9ce958(0x12a)]();}[_0x14e8f6(0x12a)](){const _0x179475=_0x14e8f6;this[_0x179475(0x11a)][_0x179475(0x10a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x179475(0xc3)]=!0x1;}};function _0x2411(){const _0x1a0e82=['dataSource','getOwnPropertyDescriptor','parentId','getCurrentUser','threadId','listComments','slice','955NRmKPp','_config','user','rangeType','156YECbnn','/universer-api/user/list','unitId','2hXAWdx','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','customRanges','comment','_initUserSync','userID','onStarting','UNIVER_UNKNOWN','/reply','_userService','2743866aybfYS','_sessionService','comments','_threadCommentModel','_threadCommentDataSource','addComment','COMMENT','_initDataSource','updateComment','Solve','_httpService','Edit','add','syncUpdateMutationToColla','forEach','22960BkdIzD','onReady','filter','resolveComment','_commentService','type','solved','12218aLEqco','userId','/solved','Add','values','find','delete','replyId','478170JPEEaa','post','length','get','size','root','/add','getUnit','payload','UNRECOGNIZED','requireSession','body','thread-comment-data-source.config','subscribe','deleteComment','OpenOrReOpen','defineProperty','setConfig','stringify','resolved','users','12387XioJrk','/edit','personId','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','reply','pipe','2627376ltFMWH','Unknown','2079eJtcOz','_init','rangeId','replies','commentUpdate$','code','/universer-api/comment/unit/','content','error','Delete','getMemberID','addUser','ref','Reply','createTimestamp','disposeWithMe','Solved','map','/list','10986hLOMHH','_configService','format'];_0x2411=function(){return _0x1a0e82;};return _0x2411();}g=te([N(0x0,_0x1f38fa),N(0x1,_0x59bc1b(f))],g);var se=Object[_0x14e8f6(0xe4)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x43cb38,_0x1f3646,_0x42ea57)=>_0x1f3646 in _0x43cb38?se(_0x43cb38,_0x1f3646,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42ea57}):_0x43cb38[_0x1f3646]=_0x42ea57,ie=(_0x375564,_0x1c0104,_0x51397b,_0x108c4f)=>{for(var _0x4d036e=_0x108c4f>0x1?void 0x0:_0x108c4f?oe(_0x1c0104,_0x51397b):_0x1c0104,_0x4a1f92=_0x375564['length']-0x1,_0x14238c;_0x4a1f92>=0x0;_0x4a1f92--)(_0x14238c=_0x375564[_0x4a1f92])&&(_0x4d036e=_0x14238c(_0x4d036e)||_0x4d036e);return _0x4d036e;},w=(_0x179abf,_0x153d70)=>(_0x16f650,_0x46cccf)=>_0x153d70(_0x16f650,_0x46cccf,_0x179abf),$=(_0x3ecd5,_0x2350f5,_0x4ace5b)=>ne(_0x3ecd5,typeof _0x2350f5!=_0x14e8f6(0xec)?_0x2350f5+'':_0x2350f5,_0x4ace5b);let b=class extends _0x41398f{constructor(_0x342318=M,_0x1801b8,_0x150ec8){const _0xc3e8ac=_0x14e8f6;super(),this[_0xc3e8ac(0x112)]=_0x342318,this['_injector']=_0x1801b8,this['_configService']=_0x150ec8;const {..._0x14cfbf}=_0xdfd847({},M,this['_config']);this[_0xc3e8ac(0x108)][_0xc3e8ac(0xe5)](z,_0x14cfbf);}[_0x14e8f6(0x11f)](){const _0x5cb8e6=_0x14e8f6;[[f],[g],[S]][_0x5cb8e6(0xc4)](_0x5459d8=>{const _0x297049=_0x5cb8e6;this[_0x297049(0xef)][_0x297049(0xc2)](_0x5459d8);});}[_0x14e8f6(0xc6)](){const _0xf28336=_0x14e8f6;this[_0xf28336(0xef)][_0xf28336(0xd7)](g),this['_injector'][_0xf28336(0xd7)](S);}};$(b,'pluginName',W),$(b,_0x14e8f6(0xca),_0x454a2c[_0x14e8f6(0x120)]),b=ie([_0x4be0bf(_0xce439,_0x281d67,_0x2fa253),w(0x1,_0x59bc1b(_0x5ee519)),w(0x2,_0x38206b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4845ea=_0x6940;(function(_0x5f0ece,_0x1e40ae){const _0x4543ff=_0x6940,_0x5bee79=_0x5f0ece();while(!![]){try{const _0x351067=-parseInt(_0x4543ff(0xd3))/0x1+-parseInt(_0x4543ff(0xd1))/0x2+-parseInt(_0x4543ff(0xad))/0x3+parseInt(_0x4543ff(0xc1))/0x4*(-parseInt(_0x4543ff(0x82))/0x5)+parseInt(_0x4543ff(0x8c))/0x6+parseInt(_0x4543ff(0xc3))/0x7+parseInt(_0x4543ff(0x98))/0x8;if(_0x351067===_0x1e40ae)break;else _0x5bee79['push'](_0x5bee79['shift']());}catch(_0x59cde1){_0x5bee79['push'](_0x5bee79['shift']());}}}(_0x76c9,0x39135));import{CommentService as _0x5f1bda,CollaborationSessionService as _0x1a3d82,UniverCollaborationClientPlugin as _0x6a2fba}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x45810e}from'@univerjs-pro/license';function _0x6940(_0x267a78,_0x1a1310){const _0x76c91d=_0x76c9();return _0x6940=function(_0x694028,_0x4b6dca){_0x694028=_0x694028-0x80;let _0x50c51c=_0x76c91d[_0x694028];return _0x50c51c;},_0x6940(_0x267a78,_0x1a1310);}import{dayjs as _0x4d3e30,UserManagerService as _0x56ea55,Inject as _0x4173d0,Injector as _0x5905e3,Disposable as _0x17feda,CustomRangeType as _0x5f5740,UniverInstanceType as _0x161e92,DependentOn as _0x1ce5fd,IConfigService as _0x22d314,Plugin as _0x42140b,merge as _0x50b81b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d3295}from'@univerjs/thread-comment-ui';function _0x76c9(){const _0x2f52d4=['_init','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','disposeWithMe','addUser','1148208dEOcEb','values','getUser','body','root','post','UNIVER_UNKNOWN','_initDataSource','_initUserSync','getCurrentUser','/edit','onStarting','8204536mYPrEN','stringify','OpenOrReOpen','/reply','replyId','createTimestamp','Edit','/add','delete','/universer-api/user/list','_config','solved','format','subscribe','ref','payload','UNRECOGNIZED','size','commentUpdate$','parentId','COMMENT','1199736nVskTc','_sessionService','length','_injector','Solved','parse','threadId','customRanges','add','symbol','userId','type','pipe','/list','_httpService','deleteComment','Delete','replies','_threadCommentDataSourceService','personId','148844VxrTan','content','1914857EWEtXv','user','addComment','saveCommentToSnapshot','Reply','getOwnPropertyDescriptor','forEach','updateComment','_threadCommentDataSource','Solve','Unknown','code','users','rangeId','897812FPUagR','/universer-api/comment/unit/','110199VoKgsT','getMemberID','setConfig','thread-comment-data-source.config','reply','find','syncUpdateMutationToColla','_userService','comment','getComment','/solved','userID','get','getUnit','error','Add','slice','resolved','comments','map','onReady','YYYY/MM/DD\x20HH:mm','40GlGJvf','_configService','unitId','_threadCommentModel'];_0x76c9=function(){return _0x2f52d4;};return _0x76c9();}import{ThreadCommentModel as _0x13d21d,IThreadCommentDataSourceService as _0xf1e621}from'@univerjs/thread-comment';import{bufferTime as _0x597e0a}from'rxjs';import{HTTPService as _0x4088a0}from'@univerjs/network';const W=_0x4845ea(0x88);var I=(_0xea19a1=>(_0xea19a1[_0xea19a1[_0x4845ea(0x9a)]=0x0]=_0x4845ea(0x9a),_0xea19a1[_0xea19a1['Solved']=0x1]=_0x4845ea(0xb1),_0xea19a1[_0xea19a1[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0xea19a1))(I||{}),v=(_0x13843a=>(_0x13843a[_0x13843a[_0x4845ea(0xcd)]=0x0]=_0x4845ea(0xcd),_0x13843a[_0x13843a['Add']=0x1]=_0x4845ea(0xe2),_0x13843a[_0x13843a[_0x4845ea(0xc7)]=0x2]='Reply',_0x13843a[_0x13843a[_0x4845ea(0x9e)]=0x3]='Edit',_0x13843a[_0x13843a[_0x4845ea(0xbd)]=0x4]=_0x4845ea(0xbd),_0x13843a[_0x13843a[_0x4845ea(0xcc)]=0x5]='Solve',_0x13843a[_0x13843a[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0x13843a))(v||{});const D=_0x1af597=>_0x4d3e30(new Date(+_0x1af597))[_0x4845ea(0xa4)](_0x4845ea(0x81)),B=async(_0xc7505c,_0x18be95)=>{const _0x14897e=_0x4845ea,_0x547536=_0xc7505c['get'](_0x56ea55),_0x2fedb8=_0xc7505c[_0x14897e(0xdf)](_0x4088a0);_0x18be95[_0x14897e(0xc9)](_0x5844b9=>{const _0x5096f9=_0x14897e;_0x547536[_0x5096f9(0x8e)](_0x5844b9)&&_0x18be95[_0x5096f9(0xa0)](_0x5844b9);}),_0x18be95[_0x14897e(0xa9)]&&(await _0x2fedb8[_0x14897e(0xdf)](_0x14897e(0xa1),{'params':{'userIDs':[..._0x18be95]}}))['body'][_0x14897e(0xcf)][_0x14897e(0xc9)](_0xb5ffc6=>{const _0x40dd74=_0x14897e;_0xb5ffc6&&_0x547536[_0x40dd74(0x8b)](_0xb5ffc6);});};var K=Object[_0x4845ea(0xc8)],V=(_0xff959,_0x4b0699,_0x222fb4,_0x5e2ed4)=>{const _0x33c36d=_0x4845ea;for(var _0x379c57=_0x5e2ed4>0x1?void 0x0:_0x5e2ed4?K(_0x4b0699,_0x222fb4):_0x4b0699,_0x4237f6=_0xff959[_0x33c36d(0xaf)]-0x1,_0x1fc8c6;_0x4237f6>=0x0;_0x4237f6--)(_0x1fc8c6=_0xff959[_0x4237f6])&&(_0x379c57=_0x1fc8c6(_0x379c57)||_0x379c57);return _0x379c57;},p=(_0x4335aa,_0x18f2be)=>(_0x4bdf72,_0x4c3c11)=>_0x18f2be(_0x4bdf72,_0x4c3c11,_0x4335aa);let S=class extends _0x17feda{constructor(_0x46b013,_0x304864,_0x160435,_0x81eb89){const _0x320c1a=_0x4845ea;super(),this['_commentService']=_0x46b013,this['_threadCommentModel']=_0x304864,this[_0x320c1a(0xda)]=_0x160435,this['_injector']=_0x81eb89,this[_0x320c1a(0x86)](),this[_0x320c1a(0x94)]();}[_0x4845ea(0x94)](){const _0x26d3ec=_0x4845ea;this[_0x26d3ec(0x8a)](this['_threadCommentModel'][_0x26d3ec(0xaa)][_0x26d3ec(0xb9)](_0x597e0a(0x10))[_0x26d3ec(0xa5)](_0x245f5f=>{const _0x515f45=_0x26d3ec,_0x22cec2=new Set();_0x245f5f[_0x515f45(0xc9)](_0x535ba8=>{const _0x2313b8=_0x515f45;switch(_0x535ba8[_0x2313b8(0xb8)]){case _0x2313b8(0xb5):{const _0x48aac9=_0x535ba8[_0x2313b8(0xa7)][_0x2313b8(0xc0)];_0x22cec2['add'](_0x48aac9);break;}}}),B(this[_0x515f45(0xb0)],_0x22cec2);}));}['_init'](){const _0x1ab718=_0x4845ea;this[_0x1ab718(0x8a)](this['_commentService'][_0x1ab718(0xaa)]['subscribe'](async _0x2a1da5=>{const _0x3963d3=_0x1ab718;var _0x45f1cd,_0x15acca,_0x50723b,_0x1ec352;const _0x2bb2d7=(_0x45f1cd=this['_threadCommentModel']['getUnit'](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0xf82b0b=>_0xf82b0b[_0x3963d3(0xb3)]===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x45f1cd[_0x3963d3(0x90)];if(!_0x2bb2d7)return;const {unitId:_0x237b14,subUnitId:_0x9853c4}=_0x2bb2d7;switch(_0x2a1da5[_0x3963d3(0xc4)]&&this[_0x3963d3(0xda)][_0x3963d3(0x8b)](_0x2a1da5[_0x3963d3(0xc4)]),_0x2a1da5[_0x3963d3(0xb8)]){case v['Add']:break;case v['Reply']:{this[_0x3963d3(0x85)]['addComment'](_0x237b14,_0x9853c4,{'unitId':_0x237b14,'subUnitId':_0x9853c4,'ref':'','id':_0x2a1da5[_0x3963d3(0x9c)],'dT':D(+_0x2a1da5[_0x3963d3(0x9d)]),'threadId':_0x2a1da5[_0x3963d3(0xb3)],'personId':(_0x50723b=(_0x15acca=_0x2a1da5[_0x3963d3(0xc4)])==null?void 0x0:_0x15acca[_0x3963d3(0xde)])!=null?_0x50723b:_0x2a1da5[_0x3963d3(0xb7)],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)]),'parentId':_0x2bb2d7['id']});break;}case v[_0x3963d3(0xbd)]:{const _0x13f4ec=this[_0x3963d3(0x85)][_0x3963d3(0xdc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);_0x13f4ec&&_0x13f4ec[_0x3963d3(0xab)]&&this['_threadCommentModel'][_0x3963d3(0xbc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);break;}case v[_0x3963d3(0x9e)]:{this[_0x3963d3(0x85)][_0x3963d3(0xca)](_0x237b14,_0x9853c4,{'commentId':_0x2a1da5['replyId'],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)])});break;}case v[_0x3963d3(0xcc)]:{const _0x476ca2=(_0x1ec352=this['_threadCommentModel'][_0x3963d3(0xe0)](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0x230a8e=>_0x230a8e['threadId']===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x1ec352[_0x3963d3(0x90)];_0x476ca2&&this['_threadCommentModel']['resolveComment'](_0x237b14,_0x9853c4,_0x476ca2['id'],_0x2a1da5['solved']===I[_0x3963d3(0xb1)]);break;}}}));}};S=V([p(0x0,_0x4173d0(_0x5f1bda)),p(0x1,_0x4173d0(_0x13d21d)),p(0x2,_0x4173d0(_0x56ea55)),p(0x3,_0x4173d0(_0x5905e3))],S);const z=_0x4845ea(0xd6),M={};var k=Object[_0x4845ea(0xc8)],Q=(_0x1f560e,_0xc19d7c,_0x952527,_0x13224c)=>{const _0x5e8920=_0x4845ea;for(var _0x6a3795=_0x13224c>0x1?void 0x0:_0x13224c?k(_0xc19d7c,_0x952527):_0xc19d7c,_0x59293f=_0x1f560e[_0x5e8920(0xaf)]-0x1,_0x5f22ad;_0x59293f>=0x0;_0x59293f--)(_0x5f22ad=_0x1f560e[_0x59293f])&&(_0x6a3795=_0x5f22ad(_0x6a3795)||_0x6a3795);return _0x6a3795;},_=(_0x316bc3,_0x335540)=>(_0x53a774,_0x3359dc)=>_0x335540(_0x53a774,_0x3359dc,_0x316bc3);function X(_0x572a31,_0x374096){const _0x2cfaea=_0x4845ea,_0x1098f5=_0x572a31[_0x2cfaea(0xbe)][0x0];return{..._0x374096,'id':_0x1098f5[_0x2cfaea(0x9c)],'resolved':_0x572a31[_0x2cfaea(0xa3)]===0x1,'dT':D(_0x1098f5[_0x2cfaea(0x9d)]),'personId':_0x1098f5[_0x2cfaea(0xb7)],'threadId':_0x1098f5[_0x2cfaea(0xb3)]};}function ee(_0x4eb297,_0x25e238,_0x2d6065){const _0x53b67d=_0x4845ea;var _0x2cca9d,_0x309ae8;if(((_0x309ae8=(_0x2cca9d=_0x4eb297==null?void 0x0:_0x4eb297[_0x53b67d(0xbe)])==null?void 0x0:_0x2cca9d['length'])!=null?_0x309ae8:0x0)>0x0){const _0x1bdca4=(_0x4fa42e,_0x1c9b18)=>({'id':_0x4fa42e[_0x53b67d(0x9c)],'threadId':_0x4fa42e['threadId'],'dT':D(_0x4fa42e[_0x53b67d(0x9d)]),'personId':_0x4fa42e['userId'],'resolved':_0x4eb297[_0x53b67d(0xa3)]===I[_0x53b67d(0xb1)],'unitId':_0x25e238,'subUnitId':_0x2d6065,'text':JSON[_0x53b67d(0xb2)](_0x4fa42e['content']),'parentId':_0x1c9b18}),_0x255065=_0x1bdca4(_0x4eb297[_0x53b67d(0xbe)][0x0]);return{..._0x255065,'children':_0x4eb297[_0x53b67d(0xbe)][_0x53b67d(0xe3)](0x1)['map'](_0x1a5f49=>_0x1bdca4(_0x1a5f49,_0x255065['id']))};}return null;}let f=class{constructor(_0x42702a,_0x67dfd1,_0x492144,_0x24686c){const _0x382e90=_0x4845ea;this[_0x382e90(0xbb)]=_0x42702a,this[_0x382e90(0xda)]=_0x67dfd1,this[_0x382e90(0xae)]=_0x492144,this['_injector']=_0x24686c;}async[_0x4845ea(0xc5)](_0x18c2fb){const _0x276b96=_0x4845ea;var _0x50c8a2,_0x2901b8;const {parentId:_0x567987,unitId:_0x19fccc,text:_0x2d4351,threadId:_0x941d03}=_0x18c2fb,_0x22f711=(_0x2901b8=(_0x50c8a2=_0x2d4351['customRanges'])==null?void 0x0:_0x50c8a2['filter'](_0x282ecc=>_0x282ecc['rangeType']===_0x5f5740['COMMENT'])['map'](_0x258529=>_0x258529[_0x276b96(0xd0)]))!=null?_0x2901b8:[],_0x5a25eb=JSON[_0x276b96(0x99)](_0x2d4351),_0x214e44=(await this[_0x276b96(0xae)]['requireSession'](_0x19fccc))[_0x276b96(0xd4)]();if(_0x567987){const _0x3ab599={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711,'threadId':_0x941d03},_0x4bddaa=(await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9b),{'body':_0x3ab599}))[_0x276b96(0x8f)][_0x276b96(0xd7)];return{..._0x18c2fb,'id':_0x4bddaa[_0x276b96(0x9c)],'dT':_0x4d3e30(+_0x4bddaa[_0x276b96(0x9d)])['format'](_0x276b96(0x81)),'personId':_0x4bddaa['userId']};}else{const _0x1a9e39={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711},_0xb493a9=await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9f),{'body':_0x1a9e39});return X(_0xb493a9['body'][_0x276b96(0xdb)],_0x18c2fb);}}async[_0x4845ea(0xca)](_0x952a77){const _0x16ce0e=_0x4845ea;var _0x169034,_0x28bfff;const {text:_0x2750b1,unitId:_0x3b2ff2}=_0x952a77,_0x13eae3=(_0x28bfff=(_0x169034=_0x2750b1[_0x16ce0e(0xb4)])==null?void 0x0:_0x169034['filter'](_0x1fa310=>_0x1fa310['rangeType']===_0x5f5740[_0x16ce0e(0xac)])[_0x16ce0e(0xe6)](_0x5a003d=>_0x5a003d['rangeId']))!=null?_0x28bfff:[],_0x2a0676=JSON[_0x16ce0e(0x99)](_0x2750b1),_0x54dd8b=_0x952a77[_0x16ce0e(0xb3)],_0x2d57d7=_0x952a77['id'],_0x202b9e={'memberId':(await this['_sessionService']['requireSession'](_0x3b2ff2))['getMemberID'](),'unitId':_0x3b2ff2,'threadId':_0x54dd8b,'mention':_0x13eae3,'content':_0x2a0676,'replyId':_0x2d57d7},_0xd9ec75=await this['_httpService'][_0x16ce0e(0x91)](_0x16ce0e(0xd2)+_0x3b2ff2+_0x16ce0e(0x96),{'body':_0x202b9e});return!_0xd9ec75[_0x16ce0e(0x8f)]['error']||_0xd9ec75[_0x16ce0e(0x8f)][_0x16ce0e(0xe1)][_0x16ce0e(0xce)]===0x1;}async['resolveComment'](_0x4ce925){const _0x5dab6d=_0x4845ea,{unitId:_0x5b2407}=_0x4ce925,_0x4c8d16=_0x4ce925[_0x5dab6d(0xb3)],_0x3b6cd1={'memberId':this[_0x5dab6d(0xda)][_0x5dab6d(0x95)]()[_0x5dab6d(0xde)],'unitId':_0x5b2407,'threadId':_0x4c8d16,'solved':_0x4ce925[_0x5dab6d(0xe4)]?I['Solved']:I[_0x5dab6d(0x9a)]},_0x2f4050=await this[_0x5dab6d(0xbb)][_0x5dab6d(0x91)](_0x5dab6d(0xd2)+_0x5b2407+_0x5dab6d(0xdd),{'body':_0x3b6cd1});return!_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)]||_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)][_0x5dab6d(0xce)]===0x1;}async['deleteComment'](_0x51acda,_0x1491ee,_0x856ccb,_0x293a42){const _0x11c9b2=_0x4845ea,_0x5bbd7d={'memberId':(await this[_0x11c9b2(0xae)][_0x11c9b2(0x87)](_0x51acda))[_0x11c9b2(0xd4)](),'threadId':_0x856ccb,'replyId':_0x293a42,'unitId':_0x51acda},_0x479635=await this[_0x11c9b2(0xbb)][_0x11c9b2(0x91)](_0x11c9b2(0xd2)+_0x51acda+'/delete',{'body':_0x5bbd7d});return!_0x479635[_0x11c9b2(0x8f)]['error']||_0x479635[_0x11c9b2(0x8f)][_0x11c9b2(0xe1)]['code']===0x1;}async['listComments'](_0x449999,_0x35654d,_0x1af0a8){const _0x4c30e7=_0x4845ea,_0xfda1fc={'unitId':_0x449999,'threadId':_0x1af0a8},_0x515648=await this[_0x4c30e7(0xbb)]['post']('/universer-api/comment/unit/'+_0x449999+_0x4c30e7(0xba),{'body':_0xfda1fc}),_0x60286=_0x1af0a8[_0x4c30e7(0xe6)](_0x19c797=>ee(_0x515648[_0x4c30e7(0x8f)][_0x4c30e7(0xe5)][_0x19c797],_0x449999,_0x35654d))['filter'](Boolean);return Object[_0x4c30e7(0x8d)](_0x515648['body'][_0x4c30e7(0xcf)])[_0x4c30e7(0xc9)](_0x1de0a8=>{const _0x2e4eec=_0x4c30e7;this['_userService'][_0x2e4eec(0x8b)](_0x1de0a8);}),_0x60286;}[_0x4845ea(0xc6)](_0x27ab0e){const _0x52d172=_0x4845ea;return{'id':_0x27ab0e['id'],'threadId':_0x27ab0e[_0x52d172(0xb3)],'ref':_0x27ab0e[_0x52d172(0xa6)]};}};f=Q([_(0x0,_0x4173d0(_0x4088a0)),_(0x1,_0x4173d0(_0x56ea55)),_(0x2,_0x4173d0(_0x1a3d82)),_(0x3,_0x4173d0(_0x5905e3))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x69e504,_0xa85112,_0x6c1d91,_0x30e476)=>{const _0x5ade0a=_0x4845ea;for(var _0x4a8c97=_0x30e476>0x1?void 0x0:_0x30e476?re(_0xa85112,_0x6c1d91):_0xa85112,_0x39e210=_0x69e504[_0x5ade0a(0xaf)]-0x1,_0x1815e0;_0x39e210>=0x0;_0x39e210--)(_0x1815e0=_0x69e504[_0x39e210])&&(_0x4a8c97=_0x1815e0(_0x4a8c97)||_0x4a8c97);return _0x4a8c97;},N=(_0x3c42d7,_0x2dd4f0)=>(_0x4abb01,_0x5bea90)=>_0x2dd4f0(_0x4abb01,_0x5bea90,_0x3c42d7);let g=class extends _0x17feda{constructor(_0x4f07ff,_0x3ec5b8){const _0x5929fe=_0x4845ea;super(),this['_threadCommentDataSourceService']=_0x4f07ff,this['_threadCommentDataSource']=_0x3ec5b8,this[_0x5929fe(0x93)]();}[_0x4845ea(0x93)](){const _0x836c37=_0x4845ea;this[_0x836c37(0xbf)][_0x836c37(0x89)]=this[_0x836c37(0xcb)],this[_0x836c37(0xbf)][_0x836c37(0xd9)]=!0x1;}};g=te([N(0x0,_0xf1e621),N(0x1,_0x4173d0(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3353ff,_0x190b64,_0x8b1c37)=>_0x190b64 in _0x3353ff?se(_0x3353ff,_0x190b64,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8b1c37}):_0x3353ff[_0x190b64]=_0x8b1c37,ie=(_0x55178a,_0x494d8c,_0x15357b,_0x12cbd8)=>{for(var _0x59ef3a=_0x12cbd8>0x1?void 0x0:_0x12cbd8?oe(_0x494d8c,_0x15357b):_0x494d8c,_0x573c15=_0x55178a['length']-0x1,_0x1f76e3;_0x573c15>=0x0;_0x573c15--)(_0x1f76e3=_0x55178a[_0x573c15])&&(_0x59ef3a=_0x1f76e3(_0x59ef3a)||_0x59ef3a);return _0x59ef3a;},w=(_0x508dc8,_0x46b04e)=>(_0x1046ee,_0x210144)=>_0x46b04e(_0x1046ee,_0x210144,_0x508dc8),$=(_0x27b07f,_0xabc664,_0x17b6d5)=>ne(_0x27b07f,typeof _0xabc664!=_0x4845ea(0xb6)?_0xabc664+'':_0xabc664,_0x17b6d5);let b=class extends _0x42140b{constructor(_0x1e74ad=M,_0x43d0de,_0x48e9ea){const _0x2b90b3=_0x4845ea;super(),this['_config']=_0x1e74ad,this[_0x2b90b3(0xb0)]=_0x43d0de,this[_0x2b90b3(0x83)]=_0x48e9ea;const {..._0x1fbd50}=_0x50b81b({},M,this[_0x2b90b3(0xa2)]);this['_configService'][_0x2b90b3(0xd5)](z,_0x1fbd50);}[_0x4845ea(0x97)](){[[f],[g],[S]]['forEach'](_0x24e0dd=>{const _0x4d71f6=_0x6940;this[_0x4d71f6(0xb0)][_0x4d71f6(0xb5)](_0x24e0dd);});}[_0x4845ea(0x80)](){const _0x1363af=_0x4845ea;this[_0x1363af(0xb0)]['get'](g),this['_injector'][_0x1363af(0xdf)](S);}};$(b,'pluginName',W),$(b,_0x4845ea(0xb8),_0x161e92[_0x4845ea(0x92)]),b=ie([_0x1ce5fd(_0x1d3295,_0x6a2fba,_0x45810e),w(0x1,_0x4173d0(_0x5905e3)),w(0x2,_0x22d314)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x14e8f6=_0x31ff;(function(_0x2481d2,_0x5e0d93){const _0x474d7a=_0x31ff,_0x45e3ad=_0x2481d2();while(!![]){try{const _0x759750=-parseInt(_0x474d7a(0xcc))/0x1*(-parseInt(_0x474d7a(0x118))/0x2)+parseInt(_0x474d7a(0xe9))/0x3*(parseInt(_0x474d7a(0x115))/0x4)+-parseInt(_0x474d7a(0x111))/0x5*(-parseInt(_0x474d7a(0x107))/0x6)+parseInt(_0x474d7a(0xd4))/0x7+parseInt(_0x474d7a(0xf2))/0x8+-parseInt(_0x474d7a(0x123))/0x9+parseInt(_0x474d7a(0xc5))/0xa*(-parseInt(_0x474d7a(0xf4))/0xb);if(_0x759750===_0x5e0d93)break;else _0x45e3ad['push'](_0x45e3ad['shift']());}catch(_0x3b2381){_0x45e3ad['push'](_0x45e3ad['shift']());}}}(_0x2411,0x2c294));import{CommentService as _0x6346bf,CollaborationSessionService as _0x6db0c8,UniverCollaborationClientPlugin as _0x281d67}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fa253}from'@univerjs-pro/license';import{dayjs as _0x47e258,UserManagerService as _0x44233a,Inject as _0x59bc1b,Injector as _0x5ee519,Disposable as _0x4a90c9,CustomRangeType as _0x3d1118,UniverInstanceType as _0x454a2c,DependentOn as _0x4be0bf,IConfigService as _0x38206b,Plugin as _0x41398f,merge as _0xdfd847}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xce439}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23d8a0,IThreadCommentDataSourceService as _0x1f38fa}from'@univerjs/thread-comment';function _0x31ff(_0x2aeb82,_0xbec4c){const _0x2411a4=_0x2411();return _0x31ff=function(_0x31ffb0,_0x2e9983){_0x31ffb0=_0x31ffb0-0xbe;let _0x595ea8=_0x2411a4[_0x31ffb0];return _0x595ea8;},_0x31ff(_0x2aeb82,_0xbec4c);}import{bufferTime as _0x390860}from'rxjs';import{HTTPService as _0x5ae147}from'@univerjs/network';const W=_0x14e8f6(0xee);var I=(_0x541df3=>(_0x541df3[_0x541df3['OpenOrReOpen']=0x0]=_0x14e8f6(0xe3),_0x541df3[_0x541df3[_0x14e8f6(0x104)]=0x1]=_0x14e8f6(0x104),_0x541df3[_0x541df3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x541df3))(I||{}),v=(_0x189f28=>(_0x189f28[_0x189f28[_0x14e8f6(0xf3)]=0x0]=_0x14e8f6(0xf3),_0x189f28[_0x189f28['Add']=0x1]=_0x14e8f6(0xcf),_0x189f28[_0x189f28[_0x14e8f6(0x101)]=0x2]=_0x14e8f6(0x101),_0x189f28[_0x189f28['Edit']=0x3]=_0x14e8f6(0xc1),_0x189f28[_0x189f28[_0x14e8f6(0xfd)]=0x4]=_0x14e8f6(0xfd),_0x189f28[_0x189f28[_0x14e8f6(0xbf)]=0x5]=_0x14e8f6(0xbf),_0x189f28[_0x189f28[_0x14e8f6(0xdd)]=-0x1]=_0x14e8f6(0xdd),_0x189f28))(v||{});const D=_0x5ce6cd=>_0x47e258(new Date(+_0x5ce6cd))[_0x14e8f6(0x109)](_0x14e8f6(0x119)),B=async(_0x1f5dc3,_0x59284a)=>{const _0x3f6c43=_0x14e8f6,_0x19e75=_0x1f5dc3[_0x3f6c43(0xd7)](_0x44233a),_0x4804f3=_0x1f5dc3[_0x3f6c43(0xd7)](_0x5ae147);_0x59284a[_0x3f6c43(0xc4)](_0x5d03ee=>{const _0x417b0c=_0x3f6c43;_0x19e75['getUser'](_0x5d03ee)&&_0x59284a[_0x417b0c(0xd2)](_0x5d03ee);}),_0x59284a[_0x3f6c43(0xd8)]&&(await _0x4804f3[_0x3f6c43(0xd7)](_0x3f6c43(0x116),{'params':{'userIDs':[..._0x59284a]}}))['body'][_0x3f6c43(0xe8)][_0x3f6c43(0xc4)](_0x1c410a=>{const _0x55bced=_0x3f6c43;_0x1c410a&&_0x19e75[_0x55bced(0xff)](_0x1c410a);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x27fa48,_0x26bbfa,_0x68ac5e,_0x726e5a)=>{const _0x3e9f77=_0x14e8f6;for(var _0x233cf1=_0x726e5a>0x1?void 0x0:_0x726e5a?K(_0x26bbfa,_0x68ac5e):_0x26bbfa,_0x1bc118=_0x27fa48[_0x3e9f77(0xd6)]-0x1,_0xd74061;_0x1bc118>=0x0;_0x1bc118--)(_0xd74061=_0x27fa48[_0x1bc118])&&(_0x233cf1=_0xd74061(_0x233cf1)||_0x233cf1);return _0x233cf1;},p=(_0x439f04,_0x4a7d14)=>(_0x5509cd,_0xfd9dc8)=>_0x4a7d14(_0x5509cd,_0xfd9dc8,_0x439f04);let S=class extends _0x4a90c9{constructor(_0x42cbd0,_0x24ed3d,_0x5ce4e4,_0x2e3f9f){const _0x1dd1ff=_0x14e8f6;super(),this[_0x1dd1ff(0xc9)]=_0x42cbd0,this['_threadCommentModel']=_0x24ed3d,this['_userService']=_0x5ce4e4,this[_0x1dd1ff(0xef)]=_0x2e3f9f,this[_0x1dd1ff(0xf5)](),this[_0x1dd1ff(0x11d)]();}['_initUserSync'](){const _0xa92790=_0x14e8f6;this['disposeWithMe'](this[_0xa92790(0x126)][_0xa92790(0xf8)][_0xa92790(0xf1)](_0x390860(0x10))[_0xa92790(0xe1)](_0x50acd0=>{const _0xd46a63=_0xa92790,_0x341e26=new Set();_0x50acd0[_0xd46a63(0xc4)](_0x217e8d=>{const _0x40f8ae=_0xd46a63;switch(_0x217e8d[_0x40f8ae(0xca)]){case _0x40f8ae(0xc2):{const _0x41827d=_0x217e8d[_0x40f8ae(0xdc)][_0x40f8ae(0xeb)];_0x341e26[_0x40f8ae(0xc2)](_0x41827d);break;}}}),B(this[_0xd46a63(0xef)],_0x341e26);}));}[_0x14e8f6(0xf5)](){const _0x38fe3f=_0x14e8f6;this[_0x38fe3f(0x103)](this[_0x38fe3f(0xc9)][_0x38fe3f(0xf8)][_0x38fe3f(0xe1)](async _0x4fd38f=>{const _0x2afcbc=_0x38fe3f;var _0x4fa83d,_0x26eeb6,_0x2aa72e,_0x354d6d;const _0x601859=(_0x4fa83d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])['find'](_0x446e5d=>_0x446e5d[_0x2afcbc(0x10e)]===_0x4fd38f[_0x2afcbc(0x10e)]))==null?void 0x0:_0x4fa83d[_0x2afcbc(0xd9)];if(!_0x601859)return;const {unitId:_0x221cd1,subUnitId:_0xee5ada}=_0x601859;switch(_0x4fd38f[_0x2afcbc(0x113)]&&this[_0x2afcbc(0x122)]['addUser'](_0x4fd38f['user']),_0x4fd38f[_0x2afcbc(0xca)]){case v['Add']:break;case v[_0x2afcbc(0x101)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0x128)](_0x221cd1,_0xee5ada,{'unitId':_0x221cd1,'subUnitId':_0xee5ada,'ref':'','id':_0x4fd38f[_0x2afcbc(0xd3)],'dT':D(+_0x4fd38f['createTimestamp']),'threadId':_0x4fd38f[_0x2afcbc(0x10e)],'personId':(_0x2aa72e=(_0x26eeb6=_0x4fd38f[_0x2afcbc(0x113)])==null?void 0x0:_0x26eeb6['userID'])!=null?_0x2aa72e:_0x4fd38f[_0x2afcbc(0xcd)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f[_0x2afcbc(0xfb)]),'parentId':_0x601859['id']});break;}case v['Delete']:{const _0x318e51=this['_threadCommentModel']['getComment'](_0x221cd1,_0xee5ada,_0x4fd38f['replyId']);_0x318e51&&_0x318e51[_0x2afcbc(0x10c)]&&this[_0x2afcbc(0x126)][_0x2afcbc(0xe2)](_0x221cd1,_0xee5ada,_0x4fd38f[_0x2afcbc(0xd3)]);break;}case v[_0x2afcbc(0xc1)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0xbe)](_0x221cd1,_0xee5ada,{'commentId':_0x4fd38f[_0x2afcbc(0xd3)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f['content'])});break;}case v[_0x2afcbc(0xbf)]:{const _0x458ba9=(_0x354d6d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])[_0x2afcbc(0xd1)](_0x2d0026=>_0x2d0026['threadId']===_0x4fd38f['threadId']))==null?void 0x0:_0x354d6d[_0x2afcbc(0xd9)];_0x458ba9&&this[_0x2afcbc(0x126)][_0x2afcbc(0xc8)](_0x221cd1,_0xee5ada,_0x458ba9['id'],_0x4fd38f[_0x2afcbc(0xcb)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59bc1b(_0x6346bf)),p(0x1,_0x59bc1b(_0x23d8a0)),p(0x2,_0x59bc1b(_0x44233a)),p(0x3,_0x59bc1b(_0x5ee519))],S);const z=_0x14e8f6(0xe0),M={};var k=Object[_0x14e8f6(0x10b)],Q=(_0x20ed71,_0x572fad,_0x49abcf,_0x3f6fbc)=>{for(var _0x13b9c8=_0x3f6fbc>0x1?void 0x0:_0x3f6fbc?k(_0x572fad,_0x49abcf):_0x572fad,_0x31dcc7=_0x20ed71['length']-0x1,_0x1bb3d6;_0x31dcc7>=0x0;_0x31dcc7--)(_0x1bb3d6=_0x20ed71[_0x31dcc7])&&(_0x13b9c8=_0x1bb3d6(_0x13b9c8)||_0x13b9c8);return _0x13b9c8;},_=(_0x3aced9,_0x2dc6c8)=>(_0x408e82,_0x1093c6)=>_0x2dc6c8(_0x408e82,_0x1093c6,_0x3aced9);function X(_0xe2cbb8,_0x14addc){const _0x427158=_0x14e8f6,_0x1c3b6b=_0xe2cbb8[_0x427158(0xf7)][0x0];return{..._0x14addc,'id':_0x1c3b6b[_0x427158(0xd3)],'resolved':_0xe2cbb8[_0x427158(0xcb)]===0x1,'dT':D(_0x1c3b6b[_0x427158(0x102)]),'personId':_0x1c3b6b[_0x427158(0xcd)],'threadId':_0x1c3b6b[_0x427158(0x10e)]};}function ee(_0x305687,_0x5ea6ba,_0x29aff7){const _0x9554fe=_0x14e8f6;var _0x110feb,_0x22a35e;if(((_0x22a35e=(_0x110feb=_0x305687==null?void 0x0:_0x305687['replies'])==null?void 0x0:_0x110feb[_0x9554fe(0xd6)])!=null?_0x22a35e:0x0)>0x0){const _0xc2ce31=(_0x4cb2dd,_0x3995bb)=>({'id':_0x4cb2dd['replyId'],'threadId':_0x4cb2dd[_0x9554fe(0x10e)],'dT':D(_0x4cb2dd[_0x9554fe(0x102)]),'personId':_0x4cb2dd[_0x9554fe(0xcd)],'resolved':_0x305687['solved']===I[_0x9554fe(0x104)],'unitId':_0x5ea6ba,'subUnitId':_0x29aff7,'text':JSON[_0x9554fe(0xed)](_0x4cb2dd['content']),'parentId':_0x3995bb}),_0x464e0b=_0xc2ce31(_0x305687[_0x9554fe(0xf7)][0x0]);return{..._0x464e0b,'children':_0x305687[_0x9554fe(0xf7)][_0x9554fe(0x110)](0x1)[_0x9554fe(0x105)](_0xf966cc=>_0xc2ce31(_0xf966cc,_0x464e0b['id']))};}return null;}let f=class{constructor(_0x20fce9,_0x11385d,_0x46f32b,_0x4854b4){const _0x3bc21f=_0x14e8f6;this[_0x3bc21f(0xc0)]=_0x20fce9,this[_0x3bc21f(0x122)]=_0x11385d,this[_0x3bc21f(0x124)]=_0x46f32b,this[_0x3bc21f(0xef)]=_0x4854b4;}async[_0x14e8f6(0x128)](_0x1851e4){const _0x1e6f03=_0x14e8f6;var _0x3ef62f,_0xb6fb58;const {parentId:_0x328a95,unitId:_0x468f6c,text:_0x25e55f,threadId:_0x558da0}=_0x1851e4,_0x309e67=(_0xb6fb58=(_0x3ef62f=_0x25e55f[_0x1e6f03(0x11b)])==null?void 0x0:_0x3ef62f[_0x1e6f03(0xc7)](_0x245dac=>_0x245dac[_0x1e6f03(0x114)]===_0x3d1118[_0x1e6f03(0x129)])[_0x1e6f03(0x105)](_0x457ca8=>_0x457ca8[_0x1e6f03(0xf6)]))!=null?_0xb6fb58:[],_0x326c60=JSON[_0x1e6f03(0xe6)](_0x25e55f),_0x512e66=(await this['_sessionService'][_0x1e6f03(0xde)](_0x468f6c))[_0x1e6f03(0xfe)]();if(_0x328a95){const _0x475578={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67,'threadId':_0x558da0},_0x4172a6=(await this[_0x1e6f03(0xc0)][_0x1e6f03(0xd5)]('/universer-api/comment/unit/'+_0x468f6c+_0x1e6f03(0x121),{'body':_0x475578}))[_0x1e6f03(0xdf)][_0x1e6f03(0xf0)];return{..._0x1851e4,'id':_0x4172a6['replyId'],'dT':_0x47e258(+_0x4172a6['createTimestamp'])[_0x1e6f03(0x109)](_0x1e6f03(0x119)),'personId':_0x4172a6[_0x1e6f03(0xcd)]};}else{const _0x3b7587={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67},_0x2d686b=await this['_httpService']['post'](_0x1e6f03(0xfa)+_0x468f6c+_0x1e6f03(0xda),{'body':_0x3b7587});return X(_0x2d686b[_0x1e6f03(0xdf)][_0x1e6f03(0x11c)],_0x1851e4);}}async['updateComment'](_0x4d0efc){const _0x3779b0=_0x14e8f6;var _0x4e2acc,_0xe849d6;const {text:_0x32c058,unitId:_0x184b7a}=_0x4d0efc,_0x166c3f=(_0xe849d6=(_0x4e2acc=_0x32c058['customRanges'])==null?void 0x0:_0x4e2acc[_0x3779b0(0xc7)](_0x6a6db2=>_0x6a6db2[_0x3779b0(0x114)]===_0x3d1118[_0x3779b0(0x129)])[_0x3779b0(0x105)](_0x5db9f5=>_0x5db9f5[_0x3779b0(0xf6)]))!=null?_0xe849d6:[],_0x50c451=JSON['stringify'](_0x32c058),_0x4e9ee4=_0x4d0efc[_0x3779b0(0x10e)],_0xada142=_0x4d0efc['id'],_0x423454={'memberId':(await this[_0x3779b0(0x124)]['requireSession'](_0x184b7a))[_0x3779b0(0xfe)](),'unitId':_0x184b7a,'threadId':_0x4e9ee4,'mention':_0x166c3f,'content':_0x50c451,'replyId':_0xada142},_0x4c3a38=await this[_0x3779b0(0xc0)][_0x3779b0(0xd5)](_0x3779b0(0xfa)+_0x184b7a+_0x3779b0(0xea),{'body':_0x423454});return!_0x4c3a38['body'][_0x3779b0(0xfc)]||_0x4c3a38['body'][_0x3779b0(0xfc)]['code']===0x1;}async[_0x14e8f6(0xc8)](_0x2a0fda){const _0x2a1630=_0x14e8f6,{unitId:_0x338ee6}=_0x2a0fda,_0x59efe2=_0x2a0fda['threadId'],_0x1c0d87={'memberId':this['_userService'][_0x2a1630(0x10d)]()[_0x2a1630(0x11e)],'unitId':_0x338ee6,'threadId':_0x59efe2,'solved':_0x2a0fda[_0x2a1630(0xe7)]?I['Solved']:I[_0x2a1630(0xe3)]},_0x160403=await this['_httpService'][_0x2a1630(0xd5)](_0x2a1630(0xfa)+_0x338ee6+_0x2a1630(0xce),{'body':_0x1c0d87});return!_0x160403['body']['error']||_0x160403['body'][_0x2a1630(0xfc)][_0x2a1630(0xf9)]===0x1;}async[_0x14e8f6(0xe2)](_0x4bbe02,_0x1f000e,_0x43eaa0,_0x41aa8c){const _0x2547b1=_0x14e8f6,_0xf17f68={'memberId':(await this[_0x2547b1(0x124)][_0x2547b1(0xde)](_0x4bbe02))['getMemberID'](),'threadId':_0x43eaa0,'replyId':_0x41aa8c,'unitId':_0x4bbe02},_0xa47529=await this[_0x2547b1(0xc0)][_0x2547b1(0xd5)](_0x2547b1(0xfa)+_0x4bbe02+'/delete',{'body':_0xf17f68});return!_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)]||_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)][_0x2547b1(0xf9)]===0x1;}async[_0x14e8f6(0x10f)](_0x1ad2ba,_0x1f4692,_0x15ea54){const _0x15e753=_0x14e8f6,_0x7829de={'unitId':_0x1ad2ba,'threadId':_0x15ea54},_0x36450b=await this['_httpService'][_0x15e753(0xd5)](_0x15e753(0xfa)+_0x1ad2ba+_0x15e753(0x106),{'body':_0x7829de}),_0x5e05a3=_0x15ea54[_0x15e753(0x105)](_0x5ab93c=>ee(_0x36450b[_0x15e753(0xdf)][_0x15e753(0x125)][_0x5ab93c],_0x1ad2ba,_0x1f4692))[_0x15e753(0xc7)](Boolean);return Object[_0x15e753(0xd0)](_0x36450b[_0x15e753(0xdf)][_0x15e753(0xe8)])[_0x15e753(0xc4)](_0x15d45e=>{const _0x54c674=_0x15e753;this[_0x54c674(0x122)][_0x54c674(0xff)](_0x15d45e);}),_0x5e05a3;}['saveCommentToSnapshot'](_0x4ed038){const _0x144f34=_0x14e8f6;return{'id':_0x4ed038['id'],'threadId':_0x4ed038[_0x144f34(0x10e)],'ref':_0x4ed038[_0x144f34(0x100)]};}};f=Q([_(0x0,_0x59bc1b(_0x5ae147)),_(0x1,_0x59bc1b(_0x44233a)),_(0x2,_0x59bc1b(_0x6db0c8)),_(0x3,_0x59bc1b(_0x5ee519))],f);var re=Object[_0x14e8f6(0x10b)],te=(_0x35451d,_0x25aa9b,_0x4eb219,_0x40a5b3)=>{const _0x2cefac=_0x14e8f6;for(var _0x2042e4=_0x40a5b3>0x1?void 0x0:_0x40a5b3?re(_0x25aa9b,_0x4eb219):_0x25aa9b,_0x5d4b81=_0x35451d[_0x2cefac(0xd6)]-0x1,_0x5efc5a;_0x5d4b81>=0x0;_0x5d4b81--)(_0x5efc5a=_0x35451d[_0x5d4b81])&&(_0x2042e4=_0x5efc5a(_0x2042e4)||_0x2042e4);return _0x2042e4;},N=(_0x53ef74,_0x2f595b)=>(_0x1d4661,_0x590e98)=>_0x2f595b(_0x1d4661,_0x590e98,_0x53ef74);let g=class extends _0x4a90c9{constructor(_0x1197db,_0x3b81d4){const _0x9ce958=_0x14e8f6;super(),this[_0x9ce958(0x11a)]=_0x1197db,this[_0x9ce958(0x127)]=_0x3b81d4,this[_0x9ce958(0x12a)]();}[_0x14e8f6(0x12a)](){const _0x179475=_0x14e8f6;this[_0x179475(0x11a)][_0x179475(0x10a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x179475(0xc3)]=!0x1;}};function _0x2411(){const _0x1a0e82=['dataSource','getOwnPropertyDescriptor','parentId','getCurrentUser','threadId','listComments','slice','955NRmKPp','_config','user','rangeType','156YECbnn','/universer-api/user/list','unitId','2hXAWdx','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','customRanges','comment','_initUserSync','userID','onStarting','UNIVER_UNKNOWN','/reply','_userService','2743866aybfYS','_sessionService','comments','_threadCommentModel','_threadCommentDataSource','addComment','COMMENT','_initDataSource','updateComment','Solve','_httpService','Edit','add','syncUpdateMutationToColla','forEach','22960BkdIzD','onReady','filter','resolveComment','_commentService','type','solved','12218aLEqco','userId','/solved','Add','values','find','delete','replyId','478170JPEEaa','post','length','get','size','root','/add','getUnit','payload','UNRECOGNIZED','requireSession','body','thread-comment-data-source.config','subscribe','deleteComment','OpenOrReOpen','defineProperty','setConfig','stringify','resolved','users','12387XioJrk','/edit','personId','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','reply','pipe','2627376ltFMWH','Unknown','2079eJtcOz','_init','rangeId','replies','commentUpdate$','code','/universer-api/comment/unit/','content','error','Delete','getMemberID','addUser','ref','Reply','createTimestamp','disposeWithMe','Solved','map','/list','10986hLOMHH','_configService','format'];_0x2411=function(){return _0x1a0e82;};return _0x2411();}g=te([N(0x0,_0x1f38fa),N(0x1,_0x59bc1b(f))],g);var se=Object[_0x14e8f6(0xe4)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x43cb38,_0x1f3646,_0x42ea57)=>_0x1f3646 in _0x43cb38?se(_0x43cb38,_0x1f3646,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42ea57}):_0x43cb38[_0x1f3646]=_0x42ea57,ie=(_0x375564,_0x1c0104,_0x51397b,_0x108c4f)=>{for(var _0x4d036e=_0x108c4f>0x1?void 0x0:_0x108c4f?oe(_0x1c0104,_0x51397b):_0x1c0104,_0x4a1f92=_0x375564['length']-0x1,_0x14238c;_0x4a1f92>=0x0;_0x4a1f92--)(_0x14238c=_0x375564[_0x4a1f92])&&(_0x4d036e=_0x14238c(_0x4d036e)||_0x4d036e);return _0x4d036e;},w=(_0x179abf,_0x153d70)=>(_0x16f650,_0x46cccf)=>_0x153d70(_0x16f650,_0x46cccf,_0x179abf),$=(_0x3ecd5,_0x2350f5,_0x4ace5b)=>ne(_0x3ecd5,typeof _0x2350f5!=_0x14e8f6(0xec)?_0x2350f5+'':_0x2350f5,_0x4ace5b);let b=class extends _0x41398f{constructor(_0x342318=M,_0x1801b8,_0x150ec8){const _0xc3e8ac=_0x14e8f6;super(),this[_0xc3e8ac(0x112)]=_0x342318,this['_injector']=_0x1801b8,this['_configService']=_0x150ec8;const {..._0x14cfbf}=_0xdfd847({},M,this['_config']);this[_0xc3e8ac(0x108)][_0xc3e8ac(0xe5)](z,_0x14cfbf);}[_0x14e8f6(0x11f)](){const _0x5cb8e6=_0x14e8f6;[[f],[g],[S]][_0x5cb8e6(0xc4)](_0x5459d8=>{const _0x297049=_0x5cb8e6;this[_0x297049(0xef)][_0x297049(0xc2)](_0x5459d8);});}[_0x14e8f6(0xc6)](){const _0xf28336=_0x14e8f6;this[_0xf28336(0xef)][_0xf28336(0xd7)](g),this['_injector'][_0xf28336(0xd7)](S);}};$(b,'pluginName',W),$(b,_0x14e8f6(0xca),_0x454a2c[_0x14e8f6(0x120)]),b=ie([_0x4be0bf(_0xce439,_0x281d67,_0x2fa253),w(0x1,_0x59bc1b(_0x5ee519)),w(0x2,_0x38206b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2cbb(){const _0x5b5fec=['/list','668730IszTps','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','user','addUser','code','/universer-api/comment/unit/','UniverThreadComment','body','_initUserSync','personId','defineProperty','error','dataSource','content','UniverInstanceType','@univerjs/network','add','threadId','_userService','createTimestamp','CommentService','_injector','Disposable','commentUpdate$','get','OpenOrReOpen','pluginName','Edit','_config','solved','rangeType','UniverThreadCommentUi','HTTPService','UniverLicensePlugin','_sessionService','getOwnPropertyDescriptor','listComments','map','Delete','users','size','COMMENT','_threadCommentDataSource','261Pligqj','Solve','UNIVER_UNKNOWN','_threadCommentDataSourceService','requireSession','UniverProThreadCommentDatasource','subscribe','UniverCollaborationClientPlugin','stringify','merge','Module','rangeId','Add','@univerjs-pro/license','getUser','UniverThreadCommentDataSourcePlugin','disposeWithMe','4023344UDczeV','pipe','length','function','1071846zZJzdC','Unknown','unitId','_httpService','_initDataSource','resolved','@univerjs/thread-comment-ui','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replyId','@univerjs/thread-comment','parentId','UniverCore','10PzImfl','root','filter','slice','userId','replies','ThreadCommentModel','UniverProCollaborationClient','updateComment','post','_threadCommentModel','Injector','thread-comment-data-source.config','object','@univerjs/core','comments','bufferTime','20256bYMhUV','format','deleteComment','/add','delete','_commentService','exports','toStringTag','comment','reply','resolveComment','addComment','Reply','@univerjs-pro/collaboration-client','Inject','IThreadCommentDataSourceService','/universer-api/user/list','_init','/reply','forEach','UniverNetwork','type','onReady','getMemberID','3326176HyWDQC','498486GYcgnO','dayjs','184695njdXYP','onStarting','rxjs','values','Solved','/edit','CustomRangeType','UserManagerService','parse','DependentOn','customRanges','getUnit','getCurrentUser'];_0x2cbb=function(){return _0x5b5fec;};return _0x2cbb();}function _0x94d4(_0x59dfd9,_0x179fff){const _0x2cbb83=_0x2cbb();return _0x94d4=function(_0x94d43c,_0x164eee){_0x94d43c=_0x94d43c-0x171;let _0x4c2c49=_0x2cbb83[_0x94d43c];return _0x4c2c49;},_0x94d4(_0x59dfd9,_0x179fff);}(function(_0x45a3b7,_0x4b7819){const _0x14f741=_0x94d4,_0x537b63=_0x45a3b7();while(!![]){try{const _0x3c32c3=-parseInt(_0x14f741(0x17c))/0x1+parseInt(_0x14f741(0x17a))/0x2+parseInt(_0x14f741(0x1b6))/0x3*(-parseInt(_0x14f741(0x1e8))/0x4)+parseInt(_0x14f741(0x1d7))/0x5*(-parseInt(_0x14f741(0x18a))/0x6)+parseInt(_0x14f741(0x179))/0x7+parseInt(_0x14f741(0x1c7))/0x8+-parseInt(_0x14f741(0x1cb))/0x9;if(_0x3c32c3===_0x4b7819)break;else _0x537b63['push'](_0x537b63['shift']());}catch(_0x194337){_0x537b63['push'](_0x537b63['shift']());}}}(_0x2cbb,0x3f7de),function(_0x3fe759,_0x214b95){const _0x13b56b=_0x94d4;typeof exports==_0x13b56b(0x1e4)&&typeof module<'u'?_0x214b95(exports,require('@univerjs-pro/collaboration-client'),require(_0x13b56b(0x1c3)),require(_0x13b56b(0x1e5)),require(_0x13b56b(0x1d1)),require('@univerjs/thread-comment'),require(_0x13b56b(0x17e)),require('@univerjs/network')):typeof define==_0x13b56b(0x1ca)&&define['amd']?define([_0x13b56b(0x1ee),_0x13b56b(0x1f5),_0x13b56b(0x1c3),_0x13b56b(0x1e5),_0x13b56b(0x1d1),_0x13b56b(0x1d4),_0x13b56b(0x17e),_0x13b56b(0x19a)],_0x214b95):(_0x3fe759=typeof globalThis<'u'?globalThis:_0x3fe759||self,_0x214b95(_0x3fe759[_0x13b56b(0x1bb)]={},_0x3fe759[_0x13b56b(0x1de)],_0x3fe759['UniverProLicense'],_0x3fe759[_0x13b56b(0x1d6)],_0x3fe759[_0x13b56b(0x1aa)],_0x3fe759[_0x13b56b(0x191)],_0x3fe759[_0x13b56b(0x17e)],_0x3fe759[_0x13b56b(0x175)]));}(this,function(_0x2db18a,_0x2cec26,_0x3420cd,_0x1507f4,_0x153d8a,_0xdfdb70,_0x3426de,_0x436b9f){'use strict';const _0x40ab6b=_0x94d4;const _0x4630c9=_0x40ab6b(0x1d2);var _0x346e18=(_0x55b143=>(_0x55b143[_0x55b143[_0x40ab6b(0x1a4)]=0x0]=_0x40ab6b(0x1a4),_0x55b143[_0x55b143[_0x40ab6b(0x180)]=0x1]=_0x40ab6b(0x180),_0x55b143[_0x55b143[_0x40ab6b(0x18c)]=-0x1]='UNRECOGNIZED',_0x55b143))(_0x346e18||{}),_0xb8f1a7=(_0x554590=>(_0x554590[_0x554590['Unknown']=0x0]=_0x40ab6b(0x1cc),_0x554590[_0x554590['Add']=0x1]=_0x40ab6b(0x1c2),_0x554590[_0x554590[_0x40ab6b(0x1f4)]=0x2]='Reply',_0x554590[_0x554590[_0x40ab6b(0x1a6)]=0x3]=_0x40ab6b(0x1a6),_0x554590[_0x554590[_0x40ab6b(0x1b1)]=0x4]=_0x40ab6b(0x1b1),_0x554590[_0x554590['Solve']=0x5]=_0x40ab6b(0x1b7),_0x554590[_0x554590[_0x40ab6b(0x18c)]=-0x1]=_0x40ab6b(0x18c),_0x554590))(_0xb8f1a7||{});const _0x5e3a40=_0x1d68ec=>_0x1507f4[_0x40ab6b(0x17b)](new Date(+_0x1d68ec))[_0x40ab6b(0x1e9)]('YYYY/MM/DD\x20HH:mm'),_0x68d72a=async(_0xc7d0a0,_0x319964)=>{const _0x36e44c=_0x40ab6b,_0x4b04fe=_0xc7d0a0[_0x36e44c(0x1a3)](_0x1507f4[_0x36e44c(0x183)]),_0x2e31d9=_0xc7d0a0[_0x36e44c(0x1a3)](_0x436b9f[_0x36e44c(0x1ab)]);_0x319964[_0x36e44c(0x174)](_0x307b9f=>{const _0x30ee57=_0x36e44c;_0x4b04fe[_0x30ee57(0x1c4)](_0x307b9f)&&_0x319964[_0x30ee57(0x1ec)](_0x307b9f);}),_0x319964[_0x36e44c(0x1b3)]&&(await _0x2e31d9[_0x36e44c(0x1a3)](_0x36e44c(0x171),{'params':{'userIDs':[..._0x319964]}}))[_0x36e44c(0x192)]['users'][_0x36e44c(0x174)](_0x5e2a7f=>{_0x5e2a7f&&_0x4b04fe['addUser'](_0x5e2a7f);});};var _0x5bc92b=Object[_0x40ab6b(0x1ae)],_0x455b6e=(_0x3d9429,_0x35d479,_0x467f78,_0x29a8f9)=>{const _0x5a7b01=_0x40ab6b;for(var _0x2d176d=_0x29a8f9>0x1?void 0x0:_0x29a8f9?_0x5bc92b(_0x35d479,_0x467f78):_0x35d479,_0x4395be=_0x3d9429[_0x5a7b01(0x1c9)]-0x1,_0x34df2f;_0x4395be>=0x0;_0x4395be--)(_0x34df2f=_0x3d9429[_0x4395be])&&(_0x2d176d=_0x34df2f(_0x2d176d)||_0x2d176d);return _0x2d176d;},_0x1bbf24=(_0x3d8749,_0x17bba0)=>(_0x24e318,_0x388599)=>_0x17bba0(_0x24e318,_0x388599,_0x3d8749);let _0x458505=class extends _0x1507f4[_0x40ab6b(0x1a1)]{constructor(_0x28b61b,_0x397f98,_0x509371,_0xd7cfad){const _0x4b7b71=_0x40ab6b;super(),this['_commentService']=_0x28b61b,this[_0x4b7b71(0x1e1)]=_0x397f98,this[_0x4b7b71(0x19d)]=_0x509371,this[_0x4b7b71(0x1a0)]=_0xd7cfad,this[_0x4b7b71(0x172)](),this['_initUserSync']();}[_0x40ab6b(0x193)](){const _0x341f53=_0x40ab6b;this[_0x341f53(0x1c6)](this['_threadCommentModel'][_0x341f53(0x1a2)][_0x341f53(0x1c8)](_0x3426de[_0x341f53(0x1e7)](0x10))[_0x341f53(0x1bc)](_0x18bc22=>{const _0x55e7ca=_0x341f53,_0x3de4ab=new Set();_0x18bc22[_0x55e7ca(0x174)](_0xd8ffaa=>{const _0x30ef4e=_0x55e7ca;switch(_0xd8ffaa[_0x30ef4e(0x176)]){case _0x30ef4e(0x19b):{const _0x1e1410=_0xd8ffaa['payload'][_0x30ef4e(0x194)];_0x3de4ab[_0x30ef4e(0x19b)](_0x1e1410);break;}}}),_0x68d72a(this['_injector'],_0x3de4ab);}));}[_0x40ab6b(0x172)](){const _0x346a4d=_0x40ab6b;this[_0x346a4d(0x1c6)](this[_0x346a4d(0x1ed)][_0x346a4d(0x1a2)][_0x346a4d(0x1bc)](async _0x266d1b=>{const _0xda54d6=_0x346a4d;var _0x23a62b,_0x5145b8,_0x41106a,_0x1a2d8a;const _0x37a72d=(_0x23a62b=this[_0xda54d6(0x1e1)][_0xda54d6(0x187)](_0x266d1b[_0xda54d6(0x1cd)])['find'](_0x4a7a76=>_0x4a7a76[_0xda54d6(0x19c)]===_0x266d1b[_0xda54d6(0x19c)]))==null?void 0x0:_0x23a62b[_0xda54d6(0x1d8)];if(!_0x37a72d)return;const {unitId:_0x5f3bd6,subUnitId:_0x5b771b}=_0x37a72d;switch(_0x266d1b['user']&&this[_0xda54d6(0x19d)][_0xda54d6(0x18e)](_0x266d1b[_0xda54d6(0x18d)]),_0x266d1b[_0xda54d6(0x176)]){case _0xb8f1a7[_0xda54d6(0x1c2)]:break;case _0xb8f1a7['Reply']:{this[_0xda54d6(0x1e1)][_0xda54d6(0x1f3)](_0x5f3bd6,_0x5b771b,{'unitId':_0x5f3bd6,'subUnitId':_0x5b771b,'ref':'','id':_0x266d1b[_0xda54d6(0x1d3)],'dT':_0x5e3a40(+_0x266d1b[_0xda54d6(0x19e)]),'threadId':_0x266d1b[_0xda54d6(0x19c)],'personId':(_0x41106a=(_0x5145b8=_0x266d1b[_0xda54d6(0x18d)])==null?void 0x0:_0x5145b8['userID'])!=null?_0x41106a:_0x266d1b[_0xda54d6(0x1db)],'text':JSON[_0xda54d6(0x184)](_0x266d1b['content']),'parentId':_0x37a72d['id']});break;}case _0xb8f1a7[_0xda54d6(0x1b1)]:{const _0x41e550=this[_0xda54d6(0x1e1)]['getComment'](_0x5f3bd6,_0x5b771b,_0x266d1b['replyId']);_0x41e550&&_0x41e550[_0xda54d6(0x1d5)]&&this[_0xda54d6(0x1e1)][_0xda54d6(0x1ea)](_0x5f3bd6,_0x5b771b,_0x266d1b[_0xda54d6(0x1d3)]);break;}case _0xb8f1a7[_0xda54d6(0x1a6)]:{this[_0xda54d6(0x1e1)][_0xda54d6(0x1df)](_0x5f3bd6,_0x5b771b,{'commentId':_0x266d1b[_0xda54d6(0x1d3)],'text':JSON[_0xda54d6(0x184)](_0x266d1b[_0xda54d6(0x198)])});break;}case _0xb8f1a7[_0xda54d6(0x1b7)]:{const _0x2431b1=(_0x1a2d8a=this[_0xda54d6(0x1e1)]['getUnit'](_0x266d1b[_0xda54d6(0x1cd)])['find'](_0x46c22b=>_0x46c22b[_0xda54d6(0x19c)]===_0x266d1b[_0xda54d6(0x19c)]))==null?void 0x0:_0x1a2d8a['root'];_0x2431b1&&this[_0xda54d6(0x1e1)][_0xda54d6(0x1f2)](_0x5f3bd6,_0x5b771b,_0x2431b1['id'],_0x266d1b[_0xda54d6(0x1a8)]===_0x346e18[_0xda54d6(0x180)]);break;}}}));}};_0x458505=_0x455b6e([_0x1bbf24(0x0,_0x1507f4[_0x40ab6b(0x1f6)](_0x2cec26[_0x40ab6b(0x19f)])),_0x1bbf24(0x1,_0x1507f4[_0x40ab6b(0x1f6)](_0xdfdb70[_0x40ab6b(0x1dd)])),_0x1bbf24(0x2,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x183)])),_0x1bbf24(0x3,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x1e2)]))],_0x458505);const _0x5ded37=_0x40ab6b(0x1e3),_0x3be81e={};var _0x4d3a17=Object[_0x40ab6b(0x1ae)],_0x13cffd=(_0x56172e,_0x59fbef,_0x4e36a9,_0x12b609)=>{const _0x5a8613=_0x40ab6b;for(var _0x5c8c2c=_0x12b609>0x1?void 0x0:_0x12b609?_0x4d3a17(_0x59fbef,_0x4e36a9):_0x59fbef,_0x10fd9f=_0x56172e[_0x5a8613(0x1c9)]-0x1,_0xcc6a45;_0x10fd9f>=0x0;_0x10fd9f--)(_0xcc6a45=_0x56172e[_0x10fd9f])&&(_0x5c8c2c=_0xcc6a45(_0x5c8c2c)||_0x5c8c2c);return _0x5c8c2c;},_0x4389af=(_0x450878,_0x59fd2)=>(_0x317d8d,_0x2d0cc4)=>_0x59fd2(_0x317d8d,_0x2d0cc4,_0x450878);function _0x2e90c4(_0x2a0bd6,_0x4f82cd){const _0x3c93d9=_0x40ab6b,_0x23bdcd=_0x2a0bd6[_0x3c93d9(0x1dc)][0x0];return{..._0x4f82cd,'id':_0x23bdcd[_0x3c93d9(0x1d3)],'resolved':_0x2a0bd6[_0x3c93d9(0x1a8)]===0x1,'dT':_0x5e3a40(_0x23bdcd[_0x3c93d9(0x19e)]),'personId':_0x23bdcd[_0x3c93d9(0x1db)],'threadId':_0x23bdcd['threadId']};}function _0x659624(_0x4e7f51,_0xce56d2,_0x16a954){const _0x351eb4=_0x40ab6b;var _0x5243ac,_0x4cbecc;if(((_0x4cbecc=(_0x5243ac=_0x4e7f51==null?void 0x0:_0x4e7f51[_0x351eb4(0x1dc)])==null?void 0x0:_0x5243ac[_0x351eb4(0x1c9)])!=null?_0x4cbecc:0x0)>0x0){const _0x46511=(_0xac9170,_0x97f345)=>({'id':_0xac9170[_0x351eb4(0x1d3)],'threadId':_0xac9170[_0x351eb4(0x19c)],'dT':_0x5e3a40(_0xac9170[_0x351eb4(0x19e)]),'personId':_0xac9170[_0x351eb4(0x1db)],'resolved':_0x4e7f51['solved']===_0x346e18[_0x351eb4(0x180)],'unitId':_0xce56d2,'subUnitId':_0x16a954,'text':JSON[_0x351eb4(0x184)](_0xac9170['content']),'parentId':_0x97f345}),_0x1736c2=_0x46511(_0x4e7f51['replies'][0x0]);return{..._0x1736c2,'children':_0x4e7f51[_0x351eb4(0x1dc)][_0x351eb4(0x1da)](0x1)['map'](_0x3a4f34=>_0x46511(_0x3a4f34,_0x1736c2['id']))};}return null;}let _0x10675f=class{constructor(_0xf6355e,_0x96a53c,_0x55d714,_0x108cee){const _0x1595ac=_0x40ab6b;this['_httpService']=_0xf6355e,this[_0x1595ac(0x19d)]=_0x96a53c,this['_sessionService']=_0x55d714,this[_0x1595ac(0x1a0)]=_0x108cee;}async[_0x40ab6b(0x1f3)](_0x5b700b){const _0x373a4c=_0x40ab6b;var _0x54cf1e,_0x1cfa12;const {parentId:_0x103544,unitId:_0x4e7957,text:_0x4015ea,threadId:_0x17dd77}=_0x5b700b,_0x517250=(_0x1cfa12=(_0x54cf1e=_0x4015ea[_0x373a4c(0x186)])==null?void 0x0:_0x54cf1e['filter'](_0x56ac94=>_0x56ac94[_0x373a4c(0x1a9)]===_0x1507f4['CustomRangeType'][_0x373a4c(0x1b4)])[_0x373a4c(0x1b0)](_0x72e3c3=>_0x72e3c3[_0x373a4c(0x1c1)]))!=null?_0x1cfa12:[],_0x5ce7d5=JSON[_0x373a4c(0x1be)](_0x4015ea),_0x2eed59=(await this['_sessionService'][_0x373a4c(0x1ba)](_0x4e7957))['getMemberID']();if(_0x103544){const _0x222363={'memberId':_0x2eed59,'unitId':_0x4e7957,'content':_0x5ce7d5,'mention':_0x517250,'threadId':_0x17dd77},_0x37ae08=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4e7957+_0x373a4c(0x173),{'body':_0x222363}))[_0x373a4c(0x192)][_0x373a4c(0x1f1)];return{..._0x5b700b,'id':_0x37ae08[_0x373a4c(0x1d3)],'dT':_0x1507f4[_0x373a4c(0x17b)](+_0x37ae08[_0x373a4c(0x19e)])['format'](_0x373a4c(0x18b)),'personId':_0x37ae08['userId']};}else{const _0x119f1e={'memberId':_0x2eed59,'unitId':_0x4e7957,'content':_0x5ce7d5,'mention':_0x517250},_0x2a7a1c=await this['_httpService'][_0x373a4c(0x1e0)](_0x373a4c(0x190)+_0x4e7957+_0x373a4c(0x1eb),{'body':_0x119f1e});return _0x2e90c4(_0x2a7a1c['body'][_0x373a4c(0x1f0)],_0x5b700b);}}async[_0x40ab6b(0x1df)](_0x516729){const _0x10223a=_0x40ab6b;var _0x1d384c,_0x597041;const {text:_0x5b16ac,unitId:_0x3f302f}=_0x516729,_0x450291=(_0x597041=(_0x1d384c=_0x5b16ac[_0x10223a(0x186)])==null?void 0x0:_0x1d384c[_0x10223a(0x1d9)](_0x394cf2=>_0x394cf2[_0x10223a(0x1a9)]===_0x1507f4[_0x10223a(0x182)]['COMMENT'])[_0x10223a(0x1b0)](_0x7fcbdc=>_0x7fcbdc[_0x10223a(0x1c1)]))!=null?_0x597041:[],_0x589634=JSON[_0x10223a(0x1be)](_0x5b16ac),_0xcc4edb=_0x516729[_0x10223a(0x19c)],_0x4a2cad=_0x516729['id'],_0x5215e5={'memberId':(await this[_0x10223a(0x1ad)]['requireSession'](_0x3f302f))[_0x10223a(0x178)](),'unitId':_0x3f302f,'threadId':_0xcc4edb,'mention':_0x450291,'content':_0x589634,'replyId':_0x4a2cad},_0xb6c87=await this[_0x10223a(0x1ce)]['post'](_0x10223a(0x190)+_0x3f302f+_0x10223a(0x181),{'body':_0x5215e5});return!_0xb6c87[_0x10223a(0x192)]['error']||_0xb6c87['body'][_0x10223a(0x196)]['code']===0x1;}async[_0x40ab6b(0x1f2)](_0xf4438a){const _0x53683f=_0x40ab6b,{unitId:_0x50bc19}=_0xf4438a,_0x368f9a=_0xf4438a['threadId'],_0x9134e={'memberId':this[_0x53683f(0x19d)][_0x53683f(0x188)]()['userID'],'unitId':_0x50bc19,'threadId':_0x368f9a,'solved':_0xf4438a[_0x53683f(0x1d0)]?_0x346e18[_0x53683f(0x180)]:_0x346e18[_0x53683f(0x1a4)]},_0x492275=await this['_httpService'][_0x53683f(0x1e0)]('/universer-api/comment/unit/'+_0x50bc19+'/solved',{'body':_0x9134e});return!_0x492275[_0x53683f(0x192)]['error']||_0x492275['body']['error']['code']===0x1;}async['deleteComment'](_0x2efa5d,_0x4c6072,_0x127731,_0x481216){const _0x507cf3=_0x40ab6b,_0x1271df={'memberId':(await this[_0x507cf3(0x1ad)][_0x507cf3(0x1ba)](_0x2efa5d))[_0x507cf3(0x178)](),'threadId':_0x127731,'replyId':_0x481216,'unitId':_0x2efa5d},_0x5b3852=await this[_0x507cf3(0x1ce)][_0x507cf3(0x1e0)](_0x507cf3(0x190)+_0x2efa5d+'/delete',{'body':_0x1271df});return!_0x5b3852['body'][_0x507cf3(0x196)]||_0x5b3852['body'][_0x507cf3(0x196)][_0x507cf3(0x18f)]===0x1;}async[_0x40ab6b(0x1af)](_0x1e2a09,_0x33cf39,_0x4b2508){const _0x2c16a6=_0x40ab6b,_0x79ba3={'unitId':_0x1e2a09,'threadId':_0x4b2508},_0x3f1c16=await this[_0x2c16a6(0x1ce)][_0x2c16a6(0x1e0)]('/universer-api/comment/unit/'+_0x1e2a09+_0x2c16a6(0x189),{'body':_0x79ba3}),_0x31f5bf=_0x4b2508[_0x2c16a6(0x1b0)](_0x1ce670=>_0x659624(_0x3f1c16[_0x2c16a6(0x192)][_0x2c16a6(0x1e6)][_0x1ce670],_0x1e2a09,_0x33cf39))[_0x2c16a6(0x1d9)](Boolean);return Object[_0x2c16a6(0x17f)](_0x3f1c16['body'][_0x2c16a6(0x1b2)])[_0x2c16a6(0x174)](_0x284cad=>{const _0x3f72d2=_0x2c16a6;this[_0x3f72d2(0x19d)]['addUser'](_0x284cad);}),_0x31f5bf;}['saveCommentToSnapshot'](_0x1255f8){const _0x3a14be=_0x40ab6b;return{'id':_0x1255f8['id'],'threadId':_0x1255f8[_0x3a14be(0x19c)],'ref':_0x1255f8['ref']};}};_0x10675f=_0x13cffd([_0x4389af(0x0,_0x1507f4[_0x40ab6b(0x1f6)](_0x436b9f[_0x40ab6b(0x1ab)])),_0x4389af(0x1,_0x1507f4['Inject'](_0x1507f4[_0x40ab6b(0x183)])),_0x4389af(0x2,_0x1507f4[_0x40ab6b(0x1f6)](_0x2cec26['CollaborationSessionService'])),_0x4389af(0x3,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x1e2)]))],_0x10675f);var _0x6cd102=Object[_0x40ab6b(0x1ae)],_0x3d8222=(_0x11db3c,_0x4b6d25,_0x5b4948,_0x140f29)=>{const _0x83122=_0x40ab6b;for(var _0x1085f5=_0x140f29>0x1?void 0x0:_0x140f29?_0x6cd102(_0x4b6d25,_0x5b4948):_0x4b6d25,_0x2718a3=_0x11db3c[_0x83122(0x1c9)]-0x1,_0x4be286;_0x2718a3>=0x0;_0x2718a3--)(_0x4be286=_0x11db3c[_0x2718a3])&&(_0x1085f5=_0x4be286(_0x1085f5)||_0x1085f5);return _0x1085f5;},_0x45aa7c=(_0x1649c2,_0x331c46)=>(_0x28dfcd,_0x57d414)=>_0x331c46(_0x28dfcd,_0x57d414,_0x1649c2);let _0x1e00bb=class extends _0x1507f4['Disposable']{constructor(_0x3416ab,_0x121cf8){const _0x118a40=_0x40ab6b;super(),this[_0x118a40(0x1b9)]=_0x3416ab,this['_threadCommentDataSource']=_0x121cf8,this[_0x118a40(0x1cf)]();}['_initDataSource'](){const _0x18e3bf=_0x40ab6b;this[_0x18e3bf(0x1b9)][_0x18e3bf(0x197)]=this[_0x18e3bf(0x1b5)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x1e00bb=_0x3d8222([_0x45aa7c(0x0,_0xdfdb70[_0x40ab6b(0x1f7)]),_0x45aa7c(0x1,_0x1507f4[_0x40ab6b(0x1f6)](_0x10675f))],_0x1e00bb);var _0x55cdf7=Object[_0x40ab6b(0x195)],_0x1f2649=Object[_0x40ab6b(0x1ae)],_0x1e93f7=(_0xb02da0,_0x2491aa,_0x29d1d4)=>_0x2491aa in _0xb02da0?_0x55cdf7(_0xb02da0,_0x2491aa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29d1d4}):_0xb02da0[_0x2491aa]=_0x29d1d4,_0x3ec012=(_0x248e6a,_0x5368fe,_0xf95de7,_0x7ff1ac)=>{for(var _0x378265=_0x7ff1ac>0x1?void 0x0:_0x7ff1ac?_0x1f2649(_0x5368fe,_0xf95de7):_0x5368fe,_0x2ff997=_0x248e6a['length']-0x1,_0x1718c7;_0x2ff997>=0x0;_0x2ff997--)(_0x1718c7=_0x248e6a[_0x2ff997])&&(_0x378265=_0x1718c7(_0x378265)||_0x378265);return _0x378265;},_0x398e3c=(_0x448e07,_0x1222ad)=>(_0x61fbb,_0x1f66f2)=>_0x1222ad(_0x61fbb,_0x1f66f2,_0x448e07),_0x5bf771=(_0x446ea9,_0x4d1c52,_0x446750)=>_0x1e93f7(_0x446ea9,typeof _0x4d1c52!='symbol'?_0x4d1c52+'':_0x4d1c52,_0x446750);_0x2db18a[_0x40ab6b(0x1c5)]=class extends _0x1507f4['Plugin']{constructor(_0x1528c8=_0x3be81e,_0x1f8977,_0x5a88df){const _0x37b19a=_0x40ab6b;super(),this[_0x37b19a(0x1a7)]=_0x1528c8,this[_0x37b19a(0x1a0)]=_0x1f8977,this['_configService']=_0x5a88df;const {..._0x58daba}=_0x1507f4[_0x37b19a(0x1bf)]({},_0x3be81e,this[_0x37b19a(0x1a7)]);this['_configService']['setConfig'](_0x5ded37,_0x58daba);}[_0x40ab6b(0x17d)](){[[_0x10675f],[_0x1e00bb],[_0x458505]]['forEach'](_0x304535=>{const _0x9a1841=_0x94d4;this['_injector'][_0x9a1841(0x19b)](_0x304535);});}[_0x40ab6b(0x177)](){const _0x515d1c=_0x40ab6b;this[_0x515d1c(0x1a0)][_0x515d1c(0x1a3)](_0x1e00bb),this[_0x515d1c(0x1a0)][_0x515d1c(0x1a3)](_0x458505);}},_0x5bf771(_0x2db18a[_0x40ab6b(0x1c5)],_0x40ab6b(0x1a5),_0x4630c9),_0x5bf771(_0x2db18a[_0x40ab6b(0x1c5)],_0x40ab6b(0x176),_0x1507f4[_0x40ab6b(0x199)][_0x40ab6b(0x1b8)]),_0x2db18a[_0x40ab6b(0x1c5)]=_0x3ec012([_0x1507f4[_0x40ab6b(0x185)](_0x153d8a['UniverThreadCommentUIPlugin'],_0x2cec26[_0x40ab6b(0x1bd)],_0x3420cd[_0x40ab6b(0x1ac)]),_0x398e3c(0x1,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x1e2)])),_0x398e3c(0x2,_0x1507f4['IConfigService'])],_0x2db18a['UniverThreadCommentDataSourcePlugin']),Object[_0x40ab6b(0x195)](_0x2db18a,Symbol[_0x40ab6b(0x1ef)],{'value':_0x40ab6b(0x1c0)});}));
1
+ function _0x246c(_0x3defc2,_0x4afd9e){const _0x38da22=_0x38da();return _0x246c=function(_0x246c25,_0xccc5d3){_0x246c25=_0x246c25-0xe2;let _0x3c5cab=_0x38da22[_0x246c25];return _0x3c5cab;},_0x246c(_0x3defc2,_0x4afd9e);}function _0x38da(){const _0x1990a0=['UniverProCollaborationClient','UNIVER_UNKNOWN','/edit','Unknown','11FZpYVU','values','deleteComment','getComment','getUser','IThreadCommentDataSourceService','UniverInstanceType','bufferTime','49703GfHtRf','solved','5608cfhnji','27704724yNZnRc','@univerjs-pro/collaboration-client','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','8ziojMR','onReady','_threadCommentDataSource','DependentOn','getCurrentUser','dataSource','code','UniverThreadCommentUi','addUser','UniverProLicense','reply','_initUserSync','Plugin','_httpService','_threadCommentDataSourceService','resolveComment','object','pipe','disposeWithMe','/universer-api/user/list','ref','386406YyFrqM','OpenOrReOpen','ThreadCommentModel','forEach','personId','_sessionService','Delete','rxjs','/list','defineProperty','saveCommentToSnapshot','getMemberID','@univerjs/network','createTimestamp','delete','parse','syncUpdateMutationToColla','/solved','/universer-api/comment/unit/','content','UniverThreadCommentUIPlugin','map','UniverThreadCommentDataSourcePlugin','userId','symbol','_userService','threadId','COMMENT','Inject','filter','/add','CommentService','format','commentUpdate$','_threadCommentModel','UNRECOGNIZED','_configService','comment','Solved','merge','Module','amd','UniverThreadComment','resolved','6134330mgmwua','getUnit','payload','673830kOocEy','Add','HTTPService','@univerjs/thread-comment','slice','root','find','customRanges','YYYY/MM/DD\x20HH:mm','addComment','Disposable','listComments','Reply','UniverCore','length','userID','get','type','77VBSyME','body','stringify','CustomRangeType','_init','replyId','unitId','rangeType','Edit','user','/reply','comments','_injector','2612538HvFvIB','post','6cDLHqN','_commentService','exports','UserManagerService','UniverNetwork','Injector','rangeId','subscribe','dayjs','9783FetaTW','Solve','error','updateComment','@univerjs-pro/license','add','@univerjs/thread-comment-ui','requireSession','size','getOwnPropertyDescriptor','users'];_0x38da=function(){return _0x1990a0;};return _0x38da();}(function(_0x5bd4f0,_0x213df5){const _0x40218a=_0x246c,_0x4101b2=_0x5bd4f0();while(!![]){try{const _0x20b4c2=parseInt(_0x40218a(0x141))/0x1*(-parseInt(_0x40218a(0x121))/0x2)+-parseInt(_0x40218a(0x11f))/0x3+-parseInt(_0x40218a(0x148))/0x4*(parseInt(_0x40218a(0x100))/0x5)+parseInt(_0x40218a(0x15d))/0x6*(-parseInt(_0x40218a(0x112))/0x7)+-parseInt(_0x40218a(0x143))/0x8*(-parseInt(_0x40218a(0x12a))/0x9)+-parseInt(_0x40218a(0xfd))/0xa+parseInt(_0x40218a(0x139))/0xb*(parseInt(_0x40218a(0x144))/0xc);if(_0x20b4c2===_0x213df5)break;else _0x4101b2['push'](_0x4101b2['shift']());}catch(_0x510dae){_0x4101b2['push'](_0x4101b2['shift']());}}}(_0x38da,0x70277),function(_0x6043f9,_0x45fb63){const _0x48ec58=_0x246c;typeof exports==_0x48ec58(0x158)&&typeof module<'u'?_0x45fb63(exports,require('@univerjs-pro/collaboration-client'),require(_0x48ec58(0x12e)),require('@univerjs/core'),require(_0x48ec58(0x130)),require('@univerjs/thread-comment'),require(_0x48ec58(0x164)),require(_0x48ec58(0x169))):typeof define=='function'&&define[_0x48ec58(0xfa)]?define([_0x48ec58(0x123),_0x48ec58(0x145),_0x48ec58(0x12e),'@univerjs/core',_0x48ec58(0x130),_0x48ec58(0x103),_0x48ec58(0x164),_0x48ec58(0x169)],_0x45fb63):(_0x6043f9=typeof globalThis<'u'?globalThis:_0x6043f9||self,_0x45fb63(_0x6043f9['UniverProThreadCommentDatasource']={},_0x6043f9[_0x48ec58(0x135)],_0x6043f9[_0x48ec58(0x151)],_0x6043f9[_0x48ec58(0x10d)],_0x6043f9[_0x48ec58(0x14f)],_0x6043f9[_0x48ec58(0xfb)],_0x6043f9[_0x48ec58(0x164)],_0x6043f9[_0x48ec58(0x125)]));}(this,function(_0x583ef1,_0x2e266b,_0x11f360,_0x208443,_0x2f4e2e,_0x195a9a,_0x306e6b,_0x2e4d72){'use strict';const _0x1da00a=_0x246c;const _0x36ea8d=_0x1da00a(0x147);var _0x4ea4ca=(_0x172f68=>(_0x172f68[_0x172f68['OpenOrReOpen']=0x0]=_0x1da00a(0x15e),_0x172f68[_0x172f68[_0x1da00a(0xf7)]=0x1]=_0x1da00a(0xf7),_0x172f68[_0x172f68[_0x1da00a(0xf4)]=-0x1]=_0x1da00a(0xf4),_0x172f68))(_0x4ea4ca||{}),_0x45d2dd=(_0x317a96=>(_0x317a96[_0x317a96[_0x1da00a(0x138)]=0x0]='Unknown',_0x317a96[_0x317a96['Add']=0x1]=_0x1da00a(0x101),_0x317a96[_0x317a96[_0x1da00a(0x10c)]=0x2]=_0x1da00a(0x10c),_0x317a96[_0x317a96[_0x1da00a(0x11a)]=0x3]=_0x1da00a(0x11a),_0x317a96[_0x317a96[_0x1da00a(0x163)]=0x4]='Delete',_0x317a96[_0x317a96[_0x1da00a(0x12b)]=0x5]=_0x1da00a(0x12b),_0x317a96[_0x317a96[_0x1da00a(0xf4)]=-0x1]=_0x1da00a(0xf4),_0x317a96))(_0x45d2dd||{});const _0x5392f0=_0x215fc1=>_0x208443[_0x1da00a(0x129)](new Date(+_0x215fc1))[_0x1da00a(0xf1)]('YYYY/MM/DD\x20HH:mm'),_0x3e9aa4=async(_0x28c4fc,_0x1bbb77)=>{const _0x58977e=_0x1da00a,_0x3a3732=_0x28c4fc[_0x58977e(0x110)](_0x208443[_0x58977e(0x124)]),_0x34b877=_0x28c4fc[_0x58977e(0x110)](_0x2e4d72[_0x58977e(0x102)]);_0x1bbb77[_0x58977e(0x160)](_0x45a695=>{const _0x5c5b70=_0x58977e;_0x3a3732[_0x5c5b70(0x13d)](_0x45a695)&&_0x1bbb77[_0x5c5b70(0x16b)](_0x45a695);}),_0x1bbb77[_0x58977e(0x132)]&&(await _0x34b877[_0x58977e(0x110)](_0x58977e(0x15b),{'params':{'userIDs':[..._0x1bbb77]}}))['body'][_0x58977e(0x134)][_0x58977e(0x160)](_0x51a145=>{_0x51a145&&_0x3a3732['addUser'](_0x51a145);});};var _0x7b1aae=Object[_0x1da00a(0x133)],_0xab3793=(_0xb3df,_0x4ff128,_0x57275c,_0x16708c)=>{const _0x53db84=_0x1da00a;for(var _0x544424=_0x16708c>0x1?void 0x0:_0x16708c?_0x7b1aae(_0x4ff128,_0x57275c):_0x4ff128,_0x43ca07=_0xb3df[_0x53db84(0x10e)]-0x1,_0x3ad77b;_0x43ca07>=0x0;_0x43ca07--)(_0x3ad77b=_0xb3df[_0x43ca07])&&(_0x544424=_0x3ad77b(_0x544424)||_0x544424);return _0x544424;},_0x34a507=(_0x4941cb,_0x1cf498)=>(_0x4c13fe,_0x2240ac)=>_0x1cf498(_0x4c13fe,_0x2240ac,_0x4941cb);let _0x2dbee5=class extends _0x208443[_0x1da00a(0x10a)]{constructor(_0x40ba21,_0x143e54,_0x271992,_0x12fed0){const _0x270729=_0x1da00a;super(),this['_commentService']=_0x40ba21,this['_threadCommentModel']=_0x143e54,this[_0x270729(0xea)]=_0x271992,this['_injector']=_0x12fed0,this[_0x270729(0x116)](),this[_0x270729(0x153)]();}[_0x1da00a(0x153)](){const _0x46d136=_0x1da00a;this[_0x46d136(0x15a)](this[_0x46d136(0xf3)][_0x46d136(0xf2)][_0x46d136(0x159)](_0x306e6b[_0x46d136(0x140)](0x10))[_0x46d136(0x128)](_0x1eafca=>{const _0x427f8b=_0x46d136,_0x7e6443=new Set();_0x1eafca[_0x427f8b(0x160)](_0x269ca2=>{const _0x1c7430=_0x427f8b;switch(_0x269ca2[_0x1c7430(0x111)]){case'add':{const _0x538ee4=_0x269ca2[_0x1c7430(0xff)][_0x1c7430(0x161)];_0x7e6443[_0x1c7430(0x12f)](_0x538ee4);break;}}}),_0x3e9aa4(this[_0x427f8b(0x11e)],_0x7e6443);}));}[_0x1da00a(0x116)](){const _0x5f8f62=_0x1da00a;this[_0x5f8f62(0x15a)](this[_0x5f8f62(0x122)][_0x5f8f62(0xf2)][_0x5f8f62(0x128)](async _0x80c35c=>{const _0x1135fd=_0x5f8f62;var _0x56bcba,_0x4b1355,_0x22c527,_0x1f86b5;const _0x5ccd78=(_0x56bcba=this[_0x1135fd(0xf3)]['getUnit'](_0x80c35c[_0x1135fd(0x118)])[_0x1135fd(0x106)](_0x45ddc8=>_0x45ddc8[_0x1135fd(0xeb)]===_0x80c35c[_0x1135fd(0xeb)]))==null?void 0x0:_0x56bcba[_0x1135fd(0x105)];if(!_0x5ccd78)return;const {unitId:_0x4f29ad,subUnitId:_0x31702f}=_0x5ccd78;switch(_0x80c35c[_0x1135fd(0x11b)]&&this['_userService'][_0x1135fd(0x150)](_0x80c35c['user']),_0x80c35c[_0x1135fd(0x111)]){case _0x45d2dd[_0x1135fd(0x101)]:break;case _0x45d2dd[_0x1135fd(0x10c)]:{this[_0x1135fd(0xf3)][_0x1135fd(0x109)](_0x4f29ad,_0x31702f,{'unitId':_0x4f29ad,'subUnitId':_0x31702f,'ref':'','id':_0x80c35c[_0x1135fd(0x117)],'dT':_0x5392f0(+_0x80c35c['createTimestamp']),'threadId':_0x80c35c[_0x1135fd(0xeb)],'personId':(_0x22c527=(_0x4b1355=_0x80c35c[_0x1135fd(0x11b)])==null?void 0x0:_0x4b1355['userID'])!=null?_0x22c527:_0x80c35c['userId'],'text':JSON[_0x1135fd(0x16c)](_0x80c35c['content']),'parentId':_0x5ccd78['id']});break;}case _0x45d2dd[_0x1135fd(0x163)]:{const _0xdddbee=this[_0x1135fd(0xf3)][_0x1135fd(0x13c)](_0x4f29ad,_0x31702f,_0x80c35c['replyId']);_0xdddbee&&_0xdddbee['parentId']&&this[_0x1135fd(0xf3)][_0x1135fd(0x13b)](_0x4f29ad,_0x31702f,_0x80c35c[_0x1135fd(0x117)]);break;}case _0x45d2dd[_0x1135fd(0x11a)]:{this[_0x1135fd(0xf3)][_0x1135fd(0x12d)](_0x4f29ad,_0x31702f,{'commentId':_0x80c35c['replyId'],'text':JSON[_0x1135fd(0x16c)](_0x80c35c[_0x1135fd(0xe4)])});break;}case _0x45d2dd[_0x1135fd(0x12b)]:{const _0xd231d1=(_0x1f86b5=this['_threadCommentModel'][_0x1135fd(0xfe)](_0x80c35c['unitId'])[_0x1135fd(0x106)](_0x31e5cc=>_0x31e5cc['threadId']===_0x80c35c[_0x1135fd(0xeb)]))==null?void 0x0:_0x1f86b5[_0x1135fd(0x105)];_0xd231d1&&this['_threadCommentModel']['resolveComment'](_0x4f29ad,_0x31702f,_0xd231d1['id'],_0x80c35c[_0x1135fd(0x142)]===_0x4ea4ca['Solved']);break;}}}));}};_0x2dbee5=_0xab3793([_0x34a507(0x0,_0x208443[_0x1da00a(0xed)](_0x2e266b[_0x1da00a(0xf0)])),_0x34a507(0x1,_0x208443[_0x1da00a(0xed)](_0x195a9a[_0x1da00a(0x15f)])),_0x34a507(0x2,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x124)])),_0x34a507(0x3,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x126)]))],_0x2dbee5);const _0x2fe050='thread-comment-data-source.config',_0xa39fc1={};var _0x564dd1=Object[_0x1da00a(0x133)],_0xa5ac09=(_0x424059,_0x145cb7,_0x51973e,_0xc75961)=>{const _0x39df44=_0x1da00a;for(var _0x77f3c5=_0xc75961>0x1?void 0x0:_0xc75961?_0x564dd1(_0x145cb7,_0x51973e):_0x145cb7,_0x51e797=_0x424059[_0x39df44(0x10e)]-0x1,_0x21a28a;_0x51e797>=0x0;_0x51e797--)(_0x21a28a=_0x424059[_0x51e797])&&(_0x77f3c5=_0x21a28a(_0x77f3c5)||_0x77f3c5);return _0x77f3c5;},_0x362cd7=(_0x4ae2d6,_0x11168e)=>(_0x14c35d,_0xf53835)=>_0x11168e(_0x14c35d,_0xf53835,_0x4ae2d6);function _0xb291bc(_0x16aaf8,_0x4a5225){const _0x58ec10=_0x1da00a,_0x21132e=_0x16aaf8[_0x58ec10(0x146)][0x0];return{..._0x4a5225,'id':_0x21132e['replyId'],'resolved':_0x16aaf8[_0x58ec10(0x142)]===0x1,'dT':_0x5392f0(_0x21132e['createTimestamp']),'personId':_0x21132e[_0x58ec10(0xe8)],'threadId':_0x21132e[_0x58ec10(0xeb)]};}function _0x1d691f(_0x312501,_0x5806c2,_0x3f509e){const _0x2e97c3=_0x1da00a;var _0x4c7328,_0x369dca;if(((_0x369dca=(_0x4c7328=_0x312501==null?void 0x0:_0x312501[_0x2e97c3(0x146)])==null?void 0x0:_0x4c7328[_0x2e97c3(0x10e)])!=null?_0x369dca:0x0)>0x0){const _0x4d9a4a=(_0x2c03fb,_0x19efba)=>({'id':_0x2c03fb['replyId'],'threadId':_0x2c03fb[_0x2e97c3(0xeb)],'dT':_0x5392f0(_0x2c03fb[_0x2e97c3(0x16a)]),'personId':_0x2c03fb[_0x2e97c3(0xe8)],'resolved':_0x312501[_0x2e97c3(0x142)]===_0x4ea4ca[_0x2e97c3(0xf7)],'unitId':_0x5806c2,'subUnitId':_0x3f509e,'text':JSON['parse'](_0x2c03fb[_0x2e97c3(0xe4)]),'parentId':_0x19efba}),_0x413e9a=_0x4d9a4a(_0x312501[_0x2e97c3(0x146)][0x0]);return{..._0x413e9a,'children':_0x312501['replies'][_0x2e97c3(0x104)](0x1)['map'](_0x4f3ca5=>_0x4d9a4a(_0x4f3ca5,_0x413e9a['id']))};}return null;}let _0x22d406=class{constructor(_0x5576d3,_0x493dce,_0x31aa73,_0x5958be){const _0x5cb26d=_0x1da00a;this[_0x5cb26d(0x155)]=_0x5576d3,this['_userService']=_0x493dce,this[_0x5cb26d(0x162)]=_0x31aa73,this[_0x5cb26d(0x11e)]=_0x5958be;}async[_0x1da00a(0x109)](_0x21ec71){const _0x51ef98=_0x1da00a;var _0x5a113d,_0x4eb7b0;const {parentId:_0x4261ea,unitId:_0x28d799,text:_0x21e33c,threadId:_0x3a43ca}=_0x21ec71,_0x5a3c12=(_0x4eb7b0=(_0x5a113d=_0x21e33c[_0x51ef98(0x107)])==null?void 0x0:_0x5a113d['filter'](_0x325311=>_0x325311[_0x51ef98(0x119)]===_0x208443[_0x51ef98(0x115)][_0x51ef98(0xec)])[_0x51ef98(0xe6)](_0x34cce4=>_0x34cce4[_0x51ef98(0x127)]))!=null?_0x4eb7b0:[],_0x51c40d=JSON[_0x51ef98(0x114)](_0x21e33c),_0x115c92=(await this[_0x51ef98(0x162)][_0x51ef98(0x131)](_0x28d799))[_0x51ef98(0x168)]();if(_0x4261ea){const _0x4f771b={'memberId':_0x115c92,'unitId':_0x28d799,'content':_0x51c40d,'mention':_0x5a3c12,'threadId':_0x3a43ca},_0x140f11=(await this[_0x51ef98(0x155)][_0x51ef98(0x120)]('/universer-api/comment/unit/'+_0x28d799+_0x51ef98(0x11c),{'body':_0x4f771b}))[_0x51ef98(0x113)][_0x51ef98(0x152)];return{..._0x21ec71,'id':_0x140f11[_0x51ef98(0x117)],'dT':_0x208443['dayjs'](+_0x140f11[_0x51ef98(0x16a)])[_0x51ef98(0xf1)](_0x51ef98(0x108)),'personId':_0x140f11[_0x51ef98(0xe8)]};}else{const _0x4f7e8f={'memberId':_0x115c92,'unitId':_0x28d799,'content':_0x51c40d,'mention':_0x5a3c12},_0x40f1a5=await this[_0x51ef98(0x155)]['post'](_0x51ef98(0xe3)+_0x28d799+_0x51ef98(0xef),{'body':_0x4f7e8f});return _0xb291bc(_0x40f1a5[_0x51ef98(0x113)][_0x51ef98(0xf6)],_0x21ec71);}}async[_0x1da00a(0x12d)](_0x2fa0c2){const _0x6dd98f=_0x1da00a;var _0x2dc2da,_0x12f5b7;const {text:_0x378a7c,unitId:_0x3e2a42}=_0x2fa0c2,_0x443f83=(_0x12f5b7=(_0x2dc2da=_0x378a7c['customRanges'])==null?void 0x0:_0x2dc2da[_0x6dd98f(0xee)](_0x1dfb52=>_0x1dfb52[_0x6dd98f(0x119)]===_0x208443[_0x6dd98f(0x115)]['COMMENT'])['map'](_0x32d030=>_0x32d030[_0x6dd98f(0x127)]))!=null?_0x12f5b7:[],_0x35700c=JSON['stringify'](_0x378a7c),_0x3a3816=_0x2fa0c2[_0x6dd98f(0xeb)],_0x2c2667=_0x2fa0c2['id'],_0x492bac={'memberId':(await this[_0x6dd98f(0x162)][_0x6dd98f(0x131)](_0x3e2a42))['getMemberID'](),'unitId':_0x3e2a42,'threadId':_0x3a3816,'mention':_0x443f83,'content':_0x35700c,'replyId':_0x2c2667},_0x50b7e8=await this[_0x6dd98f(0x155)][_0x6dd98f(0x120)]('/universer-api/comment/unit/'+_0x3e2a42+_0x6dd98f(0x137),{'body':_0x492bac});return!_0x50b7e8[_0x6dd98f(0x113)]['error']||_0x50b7e8[_0x6dd98f(0x113)][_0x6dd98f(0x12c)][_0x6dd98f(0x14e)]===0x1;}async[_0x1da00a(0x157)](_0x348637){const _0x3269ad=_0x1da00a,{unitId:_0x31a797}=_0x348637,_0x4f83b6=_0x348637['threadId'],_0x6e9c8c={'memberId':this[_0x3269ad(0xea)][_0x3269ad(0x14c)]()[_0x3269ad(0x10f)],'unitId':_0x31a797,'threadId':_0x4f83b6,'solved':_0x348637[_0x3269ad(0xfc)]?_0x4ea4ca[_0x3269ad(0xf7)]:_0x4ea4ca[_0x3269ad(0x15e)]},_0x1555ca=await this[_0x3269ad(0x155)][_0x3269ad(0x120)](_0x3269ad(0xe3)+_0x31a797+_0x3269ad(0xe2),{'body':_0x6e9c8c});return!_0x1555ca[_0x3269ad(0x113)][_0x3269ad(0x12c)]||_0x1555ca[_0x3269ad(0x113)][_0x3269ad(0x12c)]['code']===0x1;}async[_0x1da00a(0x13b)](_0x3ab693,_0x2bde7d,_0xd77aaa,_0x1869d8){const _0x10eb2c=_0x1da00a,_0x35b09f={'memberId':(await this['_sessionService'][_0x10eb2c(0x131)](_0x3ab693))['getMemberID'](),'threadId':_0xd77aaa,'replyId':_0x1869d8,'unitId':_0x3ab693},_0x26bc1a=await this[_0x10eb2c(0x155)]['post'](_0x10eb2c(0xe3)+_0x3ab693+'/delete',{'body':_0x35b09f});return!_0x26bc1a[_0x10eb2c(0x113)][_0x10eb2c(0x12c)]||_0x26bc1a[_0x10eb2c(0x113)]['error'][_0x10eb2c(0x14e)]===0x1;}async[_0x1da00a(0x10b)](_0x3120dc,_0x120058,_0x273baa){const _0x4d9013=_0x1da00a,_0x442927={'unitId':_0x3120dc,'threadId':_0x273baa},_0x5450f5=await this['_httpService'][_0x4d9013(0x120)](_0x4d9013(0xe3)+_0x3120dc+_0x4d9013(0x165),{'body':_0x442927}),_0xd7807f=_0x273baa[_0x4d9013(0xe6)](_0x42c744=>_0x1d691f(_0x5450f5[_0x4d9013(0x113)][_0x4d9013(0x11d)][_0x42c744],_0x3120dc,_0x120058))[_0x4d9013(0xee)](Boolean);return Object[_0x4d9013(0x13a)](_0x5450f5[_0x4d9013(0x113)][_0x4d9013(0x134)])[_0x4d9013(0x160)](_0x3bdb8d=>{const _0x2d84a6=_0x4d9013;this[_0x2d84a6(0xea)][_0x2d84a6(0x150)](_0x3bdb8d);}),_0xd7807f;}[_0x1da00a(0x167)](_0x2a607f){const _0x1580dc=_0x1da00a;return{'id':_0x2a607f['id'],'threadId':_0x2a607f[_0x1580dc(0xeb)],'ref':_0x2a607f[_0x1580dc(0x15c)]};}};_0x22d406=_0xa5ac09([_0x362cd7(0x0,_0x208443[_0x1da00a(0xed)](_0x2e4d72[_0x1da00a(0x102)])),_0x362cd7(0x1,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x124)])),_0x362cd7(0x2,_0x208443[_0x1da00a(0xed)](_0x2e266b['CollaborationSessionService'])),_0x362cd7(0x3,_0x208443['Inject'](_0x208443[_0x1da00a(0x126)]))],_0x22d406);var _0x3ec6d4=Object[_0x1da00a(0x133)],_0x418553=(_0x4a6bb3,_0x4e2cb1,_0x274f7b,_0x3684dc)=>{const _0x325e1d=_0x1da00a;for(var _0x897ae1=_0x3684dc>0x1?void 0x0:_0x3684dc?_0x3ec6d4(_0x4e2cb1,_0x274f7b):_0x4e2cb1,_0x1a9ebf=_0x4a6bb3[_0x325e1d(0x10e)]-0x1,_0x5d6253;_0x1a9ebf>=0x0;_0x1a9ebf--)(_0x5d6253=_0x4a6bb3[_0x1a9ebf])&&(_0x897ae1=_0x5d6253(_0x897ae1)||_0x897ae1);return _0x897ae1;},_0x138734=(_0x70f20d,_0x26b7a1)=>(_0x3b9d88,_0x55ad25)=>_0x26b7a1(_0x3b9d88,_0x55ad25,_0x70f20d);let _0x118433=class extends _0x208443['Disposable']{constructor(_0x2db7bf,_0x120be2){const _0x4467df=_0x1da00a;super(),this[_0x4467df(0x156)]=_0x2db7bf,this[_0x4467df(0x14a)]=_0x120be2,this['_initDataSource']();}['_initDataSource'](){const _0x410087=_0x1da00a;this['_threadCommentDataSourceService'][_0x410087(0x14d)]=this[_0x410087(0x14a)],this['_threadCommentDataSourceService'][_0x410087(0x16d)]=!0x1;}};_0x118433=_0x418553([_0x138734(0x0,_0x195a9a[_0x1da00a(0x13e)]),_0x138734(0x1,_0x208443[_0x1da00a(0xed)](_0x22d406))],_0x118433);var _0x5636cd=Object['defineProperty'],_0xdf0f0a=Object[_0x1da00a(0x133)],_0x4115d4=(_0x635056,_0xba623e,_0x30867c)=>_0xba623e in _0x635056?_0x5636cd(_0x635056,_0xba623e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30867c}):_0x635056[_0xba623e]=_0x30867c,_0xb94089=(_0x28d185,_0x5e9c0b,_0x254f84,_0xabef6d)=>{const _0x253085=_0x1da00a;for(var _0x4998ad=_0xabef6d>0x1?void 0x0:_0xabef6d?_0xdf0f0a(_0x5e9c0b,_0x254f84):_0x5e9c0b,_0x354ace=_0x28d185[_0x253085(0x10e)]-0x1,_0x1a1759;_0x354ace>=0x0;_0x354ace--)(_0x1a1759=_0x28d185[_0x354ace])&&(_0x4998ad=_0x1a1759(_0x4998ad)||_0x4998ad);return _0x4998ad;},_0x1b2bde=(_0x18f252,_0xb3c80a)=>(_0x306e25,_0x2456ea)=>_0xb3c80a(_0x306e25,_0x2456ea,_0x18f252),_0x5cb5bb=(_0x8a50b8,_0x3746a1,_0x3eb035)=>_0x4115d4(_0x8a50b8,typeof _0x3746a1!=_0x1da00a(0xe9)?_0x3746a1+'':_0x3746a1,_0x3eb035);_0x583ef1['UniverThreadCommentDataSourcePlugin']=class extends _0x208443[_0x1da00a(0x154)]{constructor(_0x1d4c5d=_0xa39fc1,_0x1fd188,_0x57a4ab){const _0x5c9617=_0x1da00a;super(),this['_config']=_0x1d4c5d,this[_0x5c9617(0x11e)]=_0x1fd188,this[_0x5c9617(0xf5)]=_0x57a4ab;const {..._0x2ceaa8}=_0x208443[_0x5c9617(0xf8)]({},_0xa39fc1,this['_config']);this['_configService']['setConfig'](_0x2fe050,_0x2ceaa8);}['onStarting'](){const _0x2aec90=_0x1da00a;[[_0x22d406],[_0x118433],[_0x2dbee5]][_0x2aec90(0x160)](_0x50ff7e=>{const _0x2faaa1=_0x2aec90;this[_0x2faaa1(0x11e)][_0x2faaa1(0x12f)](_0x50ff7e);});}[_0x1da00a(0x149)](){const _0x13ebbc=_0x1da00a;this[_0x13ebbc(0x11e)]['get'](_0x118433),this['_injector']['get'](_0x2dbee5);}},_0x5cb5bb(_0x583ef1[_0x1da00a(0xe7)],'pluginName',_0x36ea8d),_0x5cb5bb(_0x583ef1[_0x1da00a(0xe7)],_0x1da00a(0x111),_0x208443[_0x1da00a(0x13f)][_0x1da00a(0x136)]),_0x583ef1['UniverThreadCommentDataSourcePlugin']=_0xb94089([_0x208443[_0x1da00a(0x14b)](_0x2f4e2e[_0x1da00a(0xe5)],_0x2e266b['UniverCollaborationClientPlugin'],_0x11f360['UniverLicensePlugin']),_0x1b2bde(0x1,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x126)])),_0x1b2bde(0x2,_0x208443['IConfigService'])],_0x583ef1[_0x1da00a(0xe7)]),Object[_0x1da00a(0x166)](_0x583ef1,Symbol['toStringTag'],{'value':_0x1da00a(0xf9)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505061607",
3
+ "version": "0.7.0-nightly.202505071607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505061607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505061607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505071607",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505071607",
50
+ "@univerjs/core": "0.7.0-nightly.202505071607",
51
+ "@univerjs/network": "0.7.0-nightly.202505071607",
50
52
  "@univerjs/protocol": "0.1.46-alpha.3",
51
- "@univerjs/network": "0.7.0-nightly.202505061607",
52
- "@univerjs/thread-comment": "0.7.0-nightly.202505061607",
53
- "@univerjs/core": "0.7.0-nightly.202505061607",
54
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505061607"
53
+ "@univerjs/thread-comment": "0.7.0-nightly.202505071607",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505071607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",