@univerjs-pro/thread-comment-datasource 0.3.0 → 0.4.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x397613=_0x53f6;(function(_0x5dd1f5,_0x2775d7){const _0x298ac7=_0x53f6,_0x413fee=_0x5dd1f5();while(!![]){try{const _0x3c8de8=-parseInt(_0x298ac7(0x22e))/0x1+parseInt(_0x298ac7(0x21e))/0x2+-parseInt(_0x298ac7(0x240))/0x3+parseInt(_0x298ac7(0x23b))/0x4*(parseInt(_0x298ac7(0x26f))/0x5)+-parseInt(_0x298ac7(0x27b))/0x6+-parseInt(_0x298ac7(0x256))/0x7+-parseInt(_0x298ac7(0x220))/0x8*(-parseInt(_0x298ac7(0x25f))/0x9);if(_0x3c8de8===_0x2775d7)break;else _0x413fee['push'](_0x413fee['shift']());}catch(_0x44bbad){_0x413fee['push'](_0x413fee['shift']());}}}(_0x2672,0xd4a63));function _0x53f6(_0x2107b7,_0x6fcdca){const _0x2672a1=_0x2672();return _0x53f6=function(_0x53f6ec,_0x3b28fd){_0x53f6ec=_0x53f6ec-0x1f3;let _0x381999=_0x2672a1[_0x53f6ec];return _0x381999;},_0x53f6(_0x2107b7,_0x6fcdca);}Object[_0x397613(0x24f)](exports,Symbol['toStringTag'],{'value':_0x397613(0x21d)});const c=require(_0x397613(0x204)),g=require('@univerjs/thread-comment'),N=require(_0x397613(0x232)),y=require('@univerjs-pro/collaboration-client'),E=require(_0x397613(0x20e)),q=require(_0x397613(0x1f9)),O=require(_0x397613(0x1f8)),$=require(_0x397613(0x227)),x='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var p=(_0x5a5849=>(_0x5a5849[_0x5a5849[_0x397613(0x1f7)]=0x0]=_0x397613(0x1f7),_0x5a5849[_0x5a5849['Solved']=0x1]=_0x397613(0x261),_0x5a5849[_0x5a5849[_0x397613(0x263)]=-0x1]=_0x397613(0x263),_0x5a5849))(p||{}),v=(_0x579b51=>(_0x579b51[_0x579b51['Unknown']=0x0]='Unknown',_0x579b51[_0x579b51[_0x397613(0x1fc)]=0x1]=_0x397613(0x1fc),_0x579b51[_0x579b51['Reply']=0x2]=_0x397613(0x237),_0x579b51[_0x579b51[_0x397613(0x223)]=0x3]=_0x397613(0x223),_0x579b51[_0x579b51[_0x397613(0x1f5)]=0x4]=_0x397613(0x1f5),_0x579b51[_0x579b51[_0x397613(0x25e)]=0x5]='Solve',_0x579b51[_0x579b51[_0x397613(0x263)]=-0x1]=_0x397613(0x263),_0x579b51))(v||{});const P=_0x37e197=>$(new Date(+_0x37e197))['format']('YYYY/MM/DD\x20HH:mm'),L=async(_0x256019,_0x473700)=>{const _0x261e8b=_0x397613,_0x49c623=_0x256019['get'](c['UserManagerService']),_0x357efe=_0x256019['get'](O['HTTPService']);_0x473700[_0x261e8b(0x254)](_0x2ccf47=>{const _0x66f0c8=_0x261e8b;_0x49c623[_0x66f0c8(0x275)](_0x2ccf47)&&_0x473700['delete'](_0x2ccf47);}),_0x473700[_0x261e8b(0x221)]&&(await _0x357efe[_0x261e8b(0x217)]('/universer-api/user/list',{'params':{'userIDs':[..._0x473700]}}))[_0x261e8b(0x23d)][_0x261e8b(0x222)][_0x261e8b(0x254)](_0xbcc89b=>{const _0x2fb8b0=_0x261e8b;_0xbcc89b&&_0x49c623[_0x2fb8b0(0x255)](_0xbcc89b);});};var Y=Object[_0x397613(0x24f)],G=Object['getOwnPropertyDescriptor'],H=(_0x317a74,_0x234c35,_0x2e526a,_0x20c0a3)=>{const _0x1e9476=_0x397613;for(var _0x2c5d77=_0x20c0a3>0x1?void 0x0:_0x20c0a3?G(_0x234c35,_0x2e526a):_0x234c35,_0x36bc11=_0x317a74[_0x1e9476(0x269)]-0x1,_0x179d11;_0x36bc11>=0x0;_0x36bc11--)(_0x179d11=_0x317a74[_0x36bc11])&&(_0x2c5d77=(_0x20c0a3?_0x179d11(_0x234c35,_0x2e526a,_0x2c5d77):_0x179d11(_0x2c5d77))||_0x2c5d77);return _0x20c0a3&&_0x2c5d77&&Y(_0x234c35,_0x2e526a,_0x2c5d77),_0x2c5d77;},I=(_0x18931c,_0x597cfb)=>(_0x41c3b6,_0x49a8e0)=>_0x597cfb(_0x41c3b6,_0x49a8e0,_0x18931c);let f=class extends c['Disposable']{constructor(_0x34c299,_0x2992ec,_0x4b8c9b,_0x5e0491){const _0x1e1e25=_0x397613;super(),this['_commentService']=_0x34c299,this[_0x1e1e25(0x20a)]=_0x2992ec,this[_0x1e1e25(0x270)]=_0x4b8c9b,this[_0x1e1e25(0x1f4)]=_0x5e0491,this[_0x1e1e25(0x1f3)](),this[_0x1e1e25(0x248)]();}[_0x397613(0x248)](){const _0x2dfa5f=_0x397613;this[_0x2dfa5f(0x23c)](this[_0x2dfa5f(0x20a)][_0x2dfa5f(0x24b)][_0x2dfa5f(0x213)](q['bufferTime'](0x10))[_0x2dfa5f(0x208)](_0x23b3a2=>{const _0x140c3c=_0x2dfa5f,_0x15a617=new Set();_0x23b3a2[_0x140c3c(0x254)](_0x6214d9=>{const _0x3e91d9=_0x140c3c;switch(_0x6214d9[_0x3e91d9(0x20d)]){case _0x3e91d9(0x23f):{const _0x1bdd33=_0x6214d9[_0x3e91d9(0x24c)]['personId'];_0x15a617[_0x3e91d9(0x23f)](_0x1bdd33);break;}}}),L(this[_0x140c3c(0x1f4)],_0x15a617);}));}[_0x397613(0x1f3)](){const _0x68fedc=_0x397613;this['disposeWithMe'](this[_0x68fedc(0x238)]['commentUpdate$'][_0x68fedc(0x208)](async _0x347467=>{const _0x5e7020=_0x68fedc;var _0x1c09c7,_0x290ed4;const _0x1921cb=this[_0x5e7020(0x20a)][_0x5e7020(0x211)](_0x347467[_0x5e7020(0x257)],_0x347467['threadId']);if(!_0x1921cb)return;const {unitId:_0x529c26,subUnitId:_0x567fa9}=_0x1921cb;switch(_0x347467[_0x5e7020(0x262)]&&this[_0x5e7020(0x270)][_0x5e7020(0x255)](_0x347467['user']),_0x347467[_0x5e7020(0x20d)]){case v['Add']:break;case v[_0x5e7020(0x237)]:{this[_0x5e7020(0x20a)]['addComment'](_0x529c26,_0x567fa9,{'unitId':_0x529c26,'subUnitId':_0x567fa9,'ref':'','id':_0x347467['replyId'],'dT':P(+_0x347467['createTimestamp']),'threadId':_0x347467['threadId'],'personId':(_0x290ed4=(_0x1c09c7=_0x347467[_0x5e7020(0x262)])==null?void 0x0:_0x1c09c7[_0x5e7020(0x234)])!=null?_0x290ed4:_0x347467[_0x5e7020(0x22c)],'text':JSON['parse'](_0x347467[_0x5e7020(0x20f)]),'parentId':_0x1921cb['id']});break;}case v[_0x5e7020(0x1f5)]:{const _0x12044c=this[_0x5e7020(0x20a)]['getComment'](_0x529c26,_0x567fa9,_0x347467['replyId']);_0x12044c&&_0x12044c[_0x5e7020(0x244)]&&this['_threadCommentModel']['deleteComment'](_0x529c26,_0x567fa9,_0x347467[_0x5e7020(0x219)]);break;}case v[_0x5e7020(0x223)]:{this[_0x5e7020(0x20a)][_0x5e7020(0x253)](_0x529c26,_0x567fa9,{'commentId':_0x347467[_0x5e7020(0x219)],'text':JSON[_0x5e7020(0x27a)](_0x347467['content'])});break;}case v[_0x5e7020(0x25e)]:{const _0x278c3c=this[_0x5e7020(0x20a)][_0x5e7020(0x211)](_0x529c26,_0x347467[_0x5e7020(0x278)]);_0x278c3c&&this['_threadCommentModel']['resolveComment'](_0x529c26,_0x567fa9,_0x278c3c['id'],_0x347467[_0x5e7020(0x266)]===p[_0x5e7020(0x261)]);break;}}}));}};f=H([c['OnLifecycle'](c[_0x397613(0x203)][_0x397613(0x26e)],f),I(0x0,c[_0x397613(0x272)](y[_0x397613(0x201)])),I(0x1,c[_0x397613(0x272)](g[_0x397613(0x207)])),I(0x2,c['Inject'](c[_0x397613(0x26b)])),I(0x3,c[_0x397613(0x272)](c[_0x397613(0x228)]))],f);const A=_0x397613(0x260),J={};var F=Object[_0x397613(0x24f)],Z=Object['getOwnPropertyDescriptor'],W=(_0x380bec,_0x2f5d8f,_0x53a756,_0x24e667)=>{for(var _0x1f1fa3=_0x24e667>0x1?void 0x0:_0x24e667?Z(_0x2f5d8f,_0x53a756):_0x2f5d8f,_0x163db4=_0x380bec['length']-0x1,_0x4e9f30;_0x163db4>=0x0;_0x163db4--)(_0x4e9f30=_0x380bec[_0x163db4])&&(_0x1f1fa3=(_0x24e667?_0x4e9f30(_0x2f5d8f,_0x53a756,_0x1f1fa3):_0x4e9f30(_0x1f1fa3))||_0x1f1fa3);return _0x24e667&&_0x1f1fa3&&F(_0x2f5d8f,_0x53a756,_0x1f1fa3),_0x1f1fa3;},S=(_0x5a1295,_0xb9fa20)=>(_0x103330,_0x43f877)=>_0xb9fa20(_0x103330,_0x43f877,_0x5a1295);function z(_0x1707d7,_0x12b11b){const _0x31df72=_0x397613,_0x3bed78=_0x1707d7[_0x31df72(0x1fa)][0x0];return{..._0x12b11b,'id':_0x3bed78[_0x31df72(0x219)],'resolved':_0x1707d7[_0x31df72(0x266)]===0x1,'dT':P(_0x3bed78['createTimestamp']),'personId':_0x3bed78[_0x31df72(0x22c)],'threadId':_0x3bed78['threadId']};}function B(_0x4fb057,_0x2b6c5a,_0x33390e){const _0x426f9b=_0x397613;var _0x19a9a8,_0x3ef363;if(((_0x3ef363=(_0x19a9a8=_0x4fb057==null?void 0x0:_0x4fb057[_0x426f9b(0x1fa)])==null?void 0x0:_0x19a9a8[_0x426f9b(0x269)])!=null?_0x3ef363:0x0)>0x0){const _0x5b268a=(_0x2c2910,_0x38938b)=>({'id':_0x2c2910[_0x426f9b(0x219)],'threadId':_0x2c2910[_0x426f9b(0x278)],'dT':P(_0x2c2910['createTimestamp']),'personId':_0x2c2910[_0x426f9b(0x22c)],'resolved':_0x4fb057[_0x426f9b(0x266)]===p['Solved'],'unitId':_0x2b6c5a,'subUnitId':_0x33390e,'text':JSON[_0x426f9b(0x27a)](_0x2c2910[_0x426f9b(0x20f)]),'parentId':_0x38938b}),_0x517e63=_0x5b268a(_0x4fb057[_0x426f9b(0x1fa)][0x0]);return{..._0x517e63,'children':_0x4fb057[_0x426f9b(0x1fa)]['slice'](0x1)[_0x426f9b(0x26a)](_0x5dbafc=>_0x5b268a(_0x5dbafc,_0x517e63['id']))};}return null;}let C=class{constructor(_0x5ba301,_0x345202,_0x95da7e,_0x207a18){const _0x1d71eb=_0x397613;this[_0x1d71eb(0x276)]=_0x5ba301,this['_userService']=_0x345202,this[_0x1d71eb(0x243)]=_0x95da7e,this['_injector']=_0x207a18;}async[_0x397613(0x265)](_0x263606){const _0x18eb82=_0x397613;var _0x422f20,_0x557f46;const {parentId:_0x2be20f,unitId:_0x2b2e18,text:_0x5ad89b,threadId:_0x1b9126}=_0x263606,_0x599157=(_0x557f46=(_0x422f20=_0x5ad89b[_0x18eb82(0x21a)])==null?void 0x0:_0x422f20[_0x18eb82(0x21b)](_0x3bfd32=>_0x3bfd32[_0x18eb82(0x22d)]===c['CustomRangeType']['COMMENT'])[_0x18eb82(0x26a)](_0x21eebb=>_0x21eebb[_0x18eb82(0x274)]))!=null?_0x557f46:[],_0x384306=JSON[_0x18eb82(0x21c)](_0x5ad89b),_0x4828b7=(await this['_sessionService']['requireSession'](_0x2b2e18))[_0x18eb82(0x259)]();if(_0x2be20f){const _0x4c4073={'memberId':_0x4828b7,'unitId':_0x2b2e18,'content':_0x384306,'mention':_0x599157,'threadId':_0x1b9126},_0x7046cc=(await this[_0x18eb82(0x276)][_0x18eb82(0x264)]('/universer-api/comment/unit/'+_0x2b2e18+'/reply',{'body':_0x4c4073}))['body'][_0x18eb82(0x242)];return{..._0x263606,'id':_0x7046cc[_0x18eb82(0x219)],'dT':$(+_0x7046cc[_0x18eb82(0x205)])[_0x18eb82(0x218)](_0x18eb82(0x1fd)),'personId':_0x7046cc[_0x18eb82(0x22c)]};}else{const _0x1bc3e8={'memberId':_0x4828b7,'unitId':_0x2b2e18,'content':_0x384306,'mention':_0x599157},_0x4c3a58=await this[_0x18eb82(0x276)][_0x18eb82(0x264)](_0x18eb82(0x231)+_0x2b2e18+'/add',{'body':_0x1bc3e8});return z(_0x4c3a58[_0x18eb82(0x23d)][_0x18eb82(0x241)],_0x263606);}}async[_0x397613(0x253)](_0x7a7b9f){const _0x55f5f7=_0x397613;var _0xc79982,_0x12a4bb;const {text:_0x38d9ab,unitId:_0x21b0a5}=_0x7a7b9f,_0x489414=(_0x12a4bb=(_0xc79982=_0x38d9ab[_0x55f5f7(0x21a)])==null?void 0x0:_0xc79982[_0x55f5f7(0x21b)](_0x518615=>_0x518615[_0x55f5f7(0x22d)]===c[_0x55f5f7(0x250)][_0x55f5f7(0x25c)])[_0x55f5f7(0x26a)](_0x621373=>_0x621373[_0x55f5f7(0x274)]))!=null?_0x12a4bb:[],_0x6908cd=JSON[_0x55f5f7(0x21c)](_0x38d9ab),_0x14a259=_0x7a7b9f[_0x55f5f7(0x278)],_0x5a4e38=_0x7a7b9f['id'],_0x5e63f4={'memberId':(await this[_0x55f5f7(0x243)]['requireSession'](_0x21b0a5))[_0x55f5f7(0x259)](),'unitId':_0x21b0a5,'threadId':_0x14a259,'mention':_0x489414,'content':_0x6908cd,'replyId':_0x5a4e38},_0x40e5e1=await this['_httpService'][_0x55f5f7(0x264)](_0x55f5f7(0x231)+_0x21b0a5+_0x55f5f7(0x225),{'body':_0x5e63f4});return!_0x40e5e1[_0x55f5f7(0x23d)][_0x55f5f7(0x26d)]||_0x40e5e1[_0x55f5f7(0x23d)][_0x55f5f7(0x26d)][_0x55f5f7(0x21f)]===0x1;}async[_0x397613(0x23a)](_0xdfc5f){const _0x5a91fd=_0x397613,{unitId:_0x202d48}=_0xdfc5f,_0x528192=_0xdfc5f['threadId'],_0x3d006b={'memberId':this[_0x5a91fd(0x270)][_0x5a91fd(0x224)]()[_0x5a91fd(0x234)],'unitId':_0x202d48,'threadId':_0x528192,'solved':_0xdfc5f['resolved']?p[_0x5a91fd(0x261)]:p[_0x5a91fd(0x1f7)]},_0x33a516=await this['_httpService'][_0x5a91fd(0x264)](_0x5a91fd(0x231)+_0x202d48+_0x5a91fd(0x206),{'body':_0x3d006b});return!_0x33a516['body'][_0x5a91fd(0x26d)]||_0x33a516['body'][_0x5a91fd(0x26d)][_0x5a91fd(0x21f)]===0x1;}async[_0x397613(0x210)](_0x18e8b9,_0x3f849d,_0x2e3244,_0x33a02e){const _0x520e2b=_0x397613,_0x340a45={'memberId':(await this[_0x520e2b(0x243)]['requireSession'](_0x18e8b9))['getMemberID'](),'threadId':_0x2e3244,'replyId':_0x33a02e,'unitId':_0x18e8b9},_0x44c123=await this[_0x520e2b(0x276)][_0x520e2b(0x264)](_0x520e2b(0x231)+_0x18e8b9+_0x520e2b(0x273),{'body':_0x340a45});return!_0x44c123[_0x520e2b(0x23d)][_0x520e2b(0x26d)]||_0x44c123['body']['error']['code']===0x1;}async[_0x397613(0x235)](_0x56af0b,_0x5278ec,_0x61cd4a){const _0x5312c0=_0x397613,_0x27f3a1={'unitId':_0x56af0b,'threadId':_0x61cd4a},_0x48f09a=await this[_0x5312c0(0x276)][_0x5312c0(0x264)](_0x5312c0(0x231)+_0x56af0b+_0x5312c0(0x25d),{'body':_0x27f3a1}),_0x983875=_0x61cd4a[_0x5312c0(0x26a)](_0x5f9908=>B(_0x48f09a[_0x5312c0(0x23d)]['comments'][_0x5f9908],_0x56af0b,_0x5278ec))['filter'](Boolean);return Object[_0x5312c0(0x1f6)](_0x48f09a[_0x5312c0(0x23d)]['users'])[_0x5312c0(0x254)](_0x1c8e93=>{const _0x8dc68d=_0x5312c0;this[_0x8dc68d(0x270)][_0x8dc68d(0x255)](_0x1c8e93);}),_0x983875;}[_0x397613(0x279)](_0x5ac4d5){const _0x17c260=_0x397613;return{'id':_0x5ac4d5['id'],'threadId':_0x5ac4d5[_0x17c260(0x278)],'ref':_0x5ac4d5[_0x17c260(0x1fe)]};}};C=W([S(0x0,c[_0x397613(0x272)](O[_0x397613(0x26c)])),S(0x1,c[_0x397613(0x272)](c[_0x397613(0x26b)])),S(0x2,c[_0x397613(0x272)](y[_0x397613(0x249)])),S(0x3,c[_0x397613(0x272)](c['Injector']))],C);var K=Object[_0x397613(0x24f)],V=Object[_0x397613(0x22f)],Q=(_0x1550a8,_0xb5d353,_0x43da94,_0x5142d9)=>{const _0x5bd9e7=_0x397613;for(var _0x2ae54d=_0x5142d9>0x1?void 0x0:_0x5142d9?V(_0xb5d353,_0x43da94):_0xb5d353,_0x4bc3d7=_0x1550a8[_0x5bd9e7(0x269)]-0x1,_0xfeee39;_0x4bc3d7>=0x0;_0x4bc3d7--)(_0xfeee39=_0x1550a8[_0x4bc3d7])&&(_0x2ae54d=(_0x5142d9?_0xfeee39(_0xb5d353,_0x43da94,_0x2ae54d):_0xfeee39(_0x2ae54d))||_0x2ae54d);return _0x5142d9&&_0x2ae54d&&K(_0xb5d353,_0x43da94,_0x2ae54d),_0x2ae54d;},X=(_0xfdd662,_0x30dfff)=>(_0x970ac1,_0x722ef5)=>_0x30dfff(_0x970ac1,_0x722ef5,_0xfdd662);let D=class{constructor(_0x46e134){const _0x175ae5=_0x397613;this[_0x175ae5(0x276)]=_0x46e134;}async[_0x397613(0x20b)](_0x12629e,_0x24c6d2,_0x70e254){const _0x57c815=_0x397613,_0x5bb838=new URL(window[_0x57c815(0x246)][_0x57c815(0x247)])['searchParams'][_0x57c815(0x217)]('unit');if(!_0x5bb838)return[];const _0xa820d=window['location'][_0x57c815(0x212)],_0x5c8943=window['location']['protocol']==='https:'?_0x57c815(0x22b):'http';return(await this[_0x57c815(0x276)][_0x57c815(0x217)](_0x5c8943+'://'+_0xa820d+_0x57c815(0x22a),{'params':{'objectID':_0x5bb838,'unitID':_0x5bb838}}))[_0x57c815(0x23d)][_0x57c815(0x236)][_0x57c815(0x26a)](_0x5f282e=>{const _0x1470a4=_0x57c815;var _0x266dea,_0x1b83d3,_0x1c795b,_0x4ee5de,_0x274b17,_0x1a7e13;return{'id':(_0x1b83d3=(_0x266dea=_0x5f282e[_0x1470a4(0x277)])==null?void 0x0:_0x266dea[_0x1470a4(0x234)])!=null?_0x1b83d3:'','label':(_0x4ee5de=(_0x1c795b=_0x5f282e['subject'])==null?void 0x0:_0x1c795b[_0x1470a4(0x251)])!=null?_0x4ee5de:'','icon':(_0x1a7e13=(_0x274b17=_0x5f282e['subject'])==null?void 0x0:_0x274b17[_0x1470a4(0x200)])!=null?_0x1a7e13:'','type':_0x1470a4(0x262)};});}};D=Q([X(0x0,c[_0x397613(0x272)](O[_0x397613(0x26c)]))],D);var k=Object['defineProperty'],ee=Object[_0x397613(0x22f)],re=(_0x555469,_0xf1113,_0x494d68,_0x4f78be)=>{for(var _0x1f225a=_0x4f78be>0x1?void 0x0:_0x4f78be?ee(_0xf1113,_0x494d68):_0xf1113,_0xc271dd=_0x555469['length']-0x1,_0x5dee7b;_0xc271dd>=0x0;_0xc271dd--)(_0x5dee7b=_0x555469[_0xc271dd])&&(_0x1f225a=(_0x4f78be?_0x5dee7b(_0xf1113,_0x494d68,_0x1f225a):_0x5dee7b(_0x1f225a))||_0x1f225a);return _0x4f78be&&_0x1f225a&&k(_0xf1113,_0x494d68,_0x1f225a),_0x1f225a;},_=(_0x2b3e42,_0x593c06)=>(_0x59b573,_0x11ecf3)=>_0x593c06(_0x59b573,_0x11ecf3,_0x2b3e42);let b=class extends c[_0x397613(0x1fb)]{constructor(_0x505235,_0x1ba73d,_0x50ce16,_0x132694){const _0x3f33b1=_0x397613;super(),this['_threadCommentDataSourceService']=_0x505235,this[_0x3f33b1(0x23e)]=_0x1ba73d,this['_threadCommentMentionDataService']=_0x50ce16,this[_0x3f33b1(0x1ff)]=_0x132694,this['_initDataSource']();}['_initDataSource'](){const _0x516eb8=_0x397613;this['_threadCommentDataSourceService'][_0x516eb8(0x267)]=this[_0x516eb8(0x23e)],this[_0x516eb8(0x24e)][_0x516eb8(0x271)]=!0x1,this[_0x516eb8(0x25b)]['dataSource']=this[_0x516eb8(0x1ff)];}};b=re([c[_0x397613(0x239)](c[_0x397613(0x203)][_0x397613(0x202)],b),_(0x0,g['IThreadCommentDataSourceService']),_(0x1,c[_0x397613(0x272)](C)),_(0x2,N[_0x397613(0x230)]),_(0x3,c[_0x397613(0x272)](D))],b);var U=Object[_0x397613(0x24f)],te=Object[_0x397613(0x22f)],se=(_0xa7f46b,_0x5651c1,_0x31ed2f)=>_0x5651c1 in _0xa7f46b?U(_0xa7f46b,_0x5651c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31ed2f}):_0xa7f46b[_0x5651c1]=_0x31ed2f,ne=(_0x52eb68,_0x5b8d53,_0x3db7c9,_0x588f5b)=>{const _0x3755a3=_0x397613;for(var _0xbce723=_0x588f5b>0x1?void 0x0:_0x588f5b?te(_0x5b8d53,_0x3db7c9):_0x5b8d53,_0x27ae55=_0x52eb68[_0x3755a3(0x269)]-0x1,_0x8d72b3;_0x27ae55>=0x0;_0x27ae55--)(_0x8d72b3=_0x52eb68[_0x27ae55])&&(_0xbce723=(_0x588f5b?_0x8d72b3(_0x5b8d53,_0x3db7c9,_0xbce723):_0x8d72b3(_0xbce723))||_0xbce723);return _0x588f5b&&_0xbce723&&U(_0x5b8d53,_0x3db7c9,_0xbce723),_0xbce723;},T=(_0x3f2931,_0x32df60)=>(_0x45b0dd,_0x153b02)=>_0x32df60(_0x45b0dd,_0x153b02,_0x3f2931),R=(_0x149606,_0x46f935,_0x128b47)=>se(_0x149606,typeof _0x46f935!=_0x397613(0x20c)?_0x46f935+'':_0x46f935,_0x128b47);exports[_0x397613(0x245)]=class extends c[_0x397613(0x215)]{constructor(_0x1caeb4=J,_0xd850dc,_0x3c8048){const _0x1e0f9d=_0x397613;super(),this[_0x1e0f9d(0x233)]=_0x1caeb4,this[_0x1e0f9d(0x1f4)]=_0xd850dc,this[_0x1e0f9d(0x268)]=_0x3c8048;const {..._0x356c60}=this[_0x1e0f9d(0x233)];this['_configService'][_0x1e0f9d(0x216)](A,_0x356c60);}[_0x397613(0x24a)](){[[D],[C],[b],[f]]['forEach'](_0x3490f9=>{const _0x5bb042=_0x53f6;this[_0x5bb042(0x1f4)]['add'](_0x3490f9);});}},R(exports[_0x397613(0x245)],_0x397613(0x226),x),R(exports[_0x397613(0x245)],'type',c[_0x397613(0x229)]['UNIVER_UNKNOWN']),exports[_0x397613(0x245)]=ne([c[_0x397613(0x209)](g[_0x397613(0x24d)],N[_0x397613(0x214)],y[_0x397613(0x258)],E[_0x397613(0x25a)]),T(0x1,c['Inject'](c[_0x397613(0x228)])),T(0x2,c[_0x397613(0x252)])],exports[_0x397613(0x245)]);function _0x2672(){const _0x1e56a1=['_sessionService','parentId','UniverThreadCommentDataSourcePlugin','location','href','_initUserSync','CollaborationSessionService','onStarting','commentUpdate$','payload','UniverThreadCommentPlugin','_threadCommentDataSourceService','defineProperty','CustomRangeType','name','IConfigService','updateComment','forEach','addUser','6003298kDHMCt','unitId','UniverCollaborationClientPlugin','getMemberID','UniverLicensePlugin','_threadCommentMentionDataService','COMMENT','/list','Solve','22000491luAwbF','thread-comment-data-source.config','Solved','user','UNRECOGNIZED','post','addComment','solved','dataSource','_configService','length','map','UserManagerService','HTTPService','error','Ready','5UqiIAO','_userService','syncUpdateMutationToColla','Inject','/delete','rangeId','getUser','_httpService','subject','threadId','saveCommentToSnapshot','parse','69138umiqvU','_init','_injector','Delete','values','OpenOrReOpen','@univerjs/network','rxjs','replies','Disposable','Add','YYYY/MM/DD\x20HH:mm','ref','_threadCommentMentionDataSource','avatar','CommentService','Starting','LifecycleStages','@univerjs/core','createTimestamp','/solved','ThreadCommentModel','subscribe','DependentOn','_threadCommentModel','getMentions','symbol','type','@univerjs-pro/license','content','deleteComment','getThread','host','pipe','UniverThreadCommentUIPlugin','Plugin','setConfig','get','format','replyId','customRanges','filter','stringify','Module','186290lFaZUF','code','8YWMqlh','size','users','Edit','getCurrentUser','/edit','pluginName','dayjs','Injector','UniverInstanceType','/universer-api/authz/collaborator','https','userId','rangeType','751120mndhoD','getOwnPropertyDescriptor','IThreadCommentMentionDataService','/universer-api/comment/unit/','@univerjs/thread-comment-ui','_config','userID','listComments','collaborators','Reply','_commentService','OnLifecycle','resolveComment','5693012SNtEeN','disposeWithMe','body','_threadCommentDataSource','add','4408887CLPMHE','comment','reply'];_0x2672=function(){return _0x1e56a1;};return _0x2672();}
1
+ 'use strict';const _0x1d346f=_0x358c;function _0x358c(_0x50d094,_0x27217f){const _0x2ad7a7=_0x2ad7();return _0x358c=function(_0x358c2b,_0x20098a){_0x358c2b=_0x358c2b-0xb3;let _0x171e19=_0x2ad7a7[_0x358c2b];return _0x171e19;},_0x358c(_0x50d094,_0x27217f);}(function(_0x400f8d,_0x117019){const _0x37617e=_0x358c,_0x5766be=_0x400f8d();while(!![]){try{const _0x453779=-parseInt(_0x37617e(0xce))/0x1*(-parseInt(_0x37617e(0xc0))/0x2)+parseInt(_0x37617e(0x10c))/0x3+parseInt(_0x37617e(0xc4))/0x4+parseInt(_0x37617e(0xf6))/0x5*(parseInt(_0x37617e(0xc8))/0x6)+-parseInt(_0x37617e(0x11a))/0x7+parseInt(_0x37617e(0xbf))/0x8+-parseInt(_0x37617e(0xc3))/0x9*(parseInt(_0x37617e(0xbb))/0xa);if(_0x453779===_0x117019)break;else _0x5766be['push'](_0x5766be['shift']());}catch(_0x2a2b24){_0x5766be['push'](_0x5766be['shift']());}}}(_0x2ad7,0xda3c0));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});const c=require(_0x1d346f(0xc1)),g=require(_0x1d346f(0xde)),N=require('@univerjs/thread-comment-ui'),O=require(_0x1d346f(0xd5)),E=require(_0x1d346f(0xf4)),q=require(_0x1d346f(0xb5)),P=require(_0x1d346f(0x121)),$=require(_0x1d346f(0xe7)),x=_0x1d346f(0xf8);var p=(_0x22da39=>(_0x22da39[_0x22da39[_0x1d346f(0xf0)]=0x0]='OpenOrReOpen',_0x22da39[_0x22da39[_0x1d346f(0x10d)]=0x1]=_0x1d346f(0x10d),_0x22da39[_0x22da39[_0x1d346f(0x123)]=-0x1]='UNRECOGNIZED',_0x22da39))(p||{}),v=(_0x5ab9db=>(_0x5ab9db[_0x5ab9db[_0x1d346f(0x132)]=0x0]=_0x1d346f(0x132),_0x5ab9db[_0x5ab9db['Add']=0x1]=_0x1d346f(0xc7),_0x5ab9db[_0x5ab9db[_0x1d346f(0x110)]=0x2]=_0x1d346f(0x110),_0x5ab9db[_0x5ab9db[_0x1d346f(0xb4)]=0x3]='Edit',_0x5ab9db[_0x5ab9db[_0x1d346f(0x106)]=0x4]=_0x1d346f(0x106),_0x5ab9db[_0x5ab9db[_0x1d346f(0xe0)]=0x5]='Solve',_0x5ab9db[_0x5ab9db[_0x1d346f(0x123)]=-0x1]=_0x1d346f(0x123),_0x5ab9db))(v||{});const y=_0x4537ed=>$(new Date(+_0x4537ed))['format'](_0x1d346f(0xd8)),Y=async(_0x1a251b,_0x16a475)=>{const _0x11ab01=_0x1d346f,_0xff5e48=_0x1a251b['get'](c[_0x11ab01(0xdb)]),_0x2e9b02=_0x1a251b['get'](P[_0x11ab01(0x134)]);_0x16a475['forEach'](_0xbf62f4=>{const _0x346d21=_0x11ab01;_0xff5e48[_0x346d21(0x11d)](_0xbf62f4)&&_0x16a475[_0x346d21(0x11e)](_0xbf62f4);}),_0x16a475[_0x11ab01(0x12b)]&&(await _0x2e9b02[_0x11ab01(0xfd)](_0x11ab01(0x139),{'params':{'userIDs':[..._0x16a475]}}))[_0x11ab01(0x116)][_0x11ab01(0xc9)][_0x11ab01(0xe5)](_0x5e25b8=>{const _0x4d0cdc=_0x11ab01;_0x5e25b8&&_0xff5e48[_0x4d0cdc(0xd1)](_0x5e25b8);});};var G=Object['defineProperty'],H=Object[_0x1d346f(0x120)],A=(_0x348563,_0x623c0f,_0x800391,_0x2f8a5a)=>{for(var _0x1c75c1=_0x2f8a5a>0x1?void 0x0:_0x2f8a5a?H(_0x623c0f,_0x800391):_0x623c0f,_0x217b22=_0x348563['length']-0x1,_0x1084c6;_0x217b22>=0x0;_0x217b22--)(_0x1084c6=_0x348563[_0x217b22])&&(_0x1c75c1=(_0x2f8a5a?_0x1084c6(_0x623c0f,_0x800391,_0x1c75c1):_0x1084c6(_0x1c75c1))||_0x1c75c1);return _0x2f8a5a&&_0x1c75c1&&G(_0x623c0f,_0x800391,_0x1c75c1),_0x1c75c1;},I=(_0x152db0,_0x2b0276)=>(_0xe3f985,_0xb5ee1b)=>_0x2b0276(_0xe3f985,_0xb5ee1b,_0x152db0);let f=class extends c[_0x1d346f(0x10e)]{constructor(_0x5e4fa6,_0x247ca7,_0x7b5e4d,_0x2a2d98){const _0x110e51=_0x1d346f;super(),this[_0x110e51(0xf3)]=_0x5e4fa6,this[_0x110e51(0xfe)]=_0x247ca7,this['_userService']=_0x7b5e4d,this['_injector']=_0x2a2d98,this[_0x110e51(0x12a)](),this[_0x110e51(0x105)]();}[_0x1d346f(0x105)](){const _0x37befe=_0x1d346f;this[_0x37befe(0xcc)](this[_0x37befe(0xfe)][_0x37befe(0xd0)][_0x37befe(0x130)](q['bufferTime'](0x10))[_0x37befe(0x129)](_0x1500bf=>{const _0x1cd110=_0x37befe,_0x23d4f4=new Set();_0x1500bf[_0x1cd110(0xe5)](_0x2d4ab5=>{const _0x39df41=_0x1cd110;switch(_0x2d4ab5[_0x39df41(0x133)]){case _0x39df41(0x12e):{const _0x62debd=_0x2d4ab5[_0x39df41(0xee)][_0x39df41(0x10b)];_0x23d4f4[_0x39df41(0x12e)](_0x62debd);break;}}}),Y(this[_0x1cd110(0xd7)],_0x23d4f4);}));}[_0x1d346f(0x12a)](){const _0x1a0cf1=_0x1d346f;this[_0x1a0cf1(0xcc)](this[_0x1a0cf1(0xf3)]['commentUpdate$'][_0x1a0cf1(0x129)](async _0x2c9f72=>{const _0x4b8ac8=_0x1a0cf1;var _0x13e4c6,_0x12db04;const _0x25b715=this['_threadCommentModel'][_0x4b8ac8(0x108)](_0x2c9f72[_0x4b8ac8(0xcf)],_0x2c9f72[_0x4b8ac8(0xc5)]);if(!_0x25b715)return;const {unitId:_0xc25fd2,subUnitId:_0xc70b0f}=_0x25b715;switch(_0x2c9f72[_0x4b8ac8(0xe4)]&&this[_0x4b8ac8(0xbe)][_0x4b8ac8(0xd1)](_0x2c9f72[_0x4b8ac8(0xe4)]),_0x2c9f72[_0x4b8ac8(0x133)]){case v[_0x4b8ac8(0xc7)]:break;case v['Reply']:{this[_0x4b8ac8(0xfe)][_0x4b8ac8(0xd6)](_0xc25fd2,_0xc70b0f,{'unitId':_0xc25fd2,'subUnitId':_0xc70b0f,'ref':'','id':_0x2c9f72[_0x4b8ac8(0x135)],'dT':y(+_0x2c9f72['createTimestamp']),'threadId':_0x2c9f72[_0x4b8ac8(0xc5)],'personId':(_0x12db04=(_0x13e4c6=_0x2c9f72[_0x4b8ac8(0xe4)])==null?void 0x0:_0x13e4c6['userID'])!=null?_0x12db04:_0x2c9f72[_0x4b8ac8(0xeb)],'text':JSON[_0x4b8ac8(0xf1)](_0x2c9f72[_0x4b8ac8(0xb3)]),'parentId':_0x25b715['id']});break;}case v[_0x4b8ac8(0x106)]:{const _0x60c327=this[_0x4b8ac8(0xfe)]['getComment'](_0xc25fd2,_0xc70b0f,_0x2c9f72[_0x4b8ac8(0x135)]);_0x60c327&&_0x60c327[_0x4b8ac8(0x126)]&&this[_0x4b8ac8(0xfe)][_0x4b8ac8(0xe9)](_0xc25fd2,_0xc70b0f,_0x2c9f72[_0x4b8ac8(0x135)]);break;}case v[_0x4b8ac8(0xb4)]:{this[_0x4b8ac8(0xfe)][_0x4b8ac8(0xed)](_0xc25fd2,_0xc70b0f,{'commentId':_0x2c9f72[_0x4b8ac8(0x135)],'text':JSON[_0x4b8ac8(0xf1)](_0x2c9f72[_0x4b8ac8(0xb3)])});break;}case v[_0x4b8ac8(0xe0)]:{const _0x4b5d80=this[_0x4b8ac8(0xfe)][_0x4b8ac8(0x108)](_0xc25fd2,_0x2c9f72[_0x4b8ac8(0xc5)]);_0x4b5d80&&this[_0x4b8ac8(0xfe)][_0x4b8ac8(0xea)](_0xc25fd2,_0xc70b0f,_0x4b5d80['id'],_0x2c9f72['solved']===p[_0x4b8ac8(0x10d)]);break;}}}));}};f=A([I(0x0,c[_0x1d346f(0x104)](O[_0x1d346f(0xdf)])),I(0x1,c['Inject'](g[_0x1d346f(0x136)])),I(0x2,c[_0x1d346f(0x104)](c[_0x1d346f(0xdb)])),I(0x3,c[_0x1d346f(0x104)](c[_0x1d346f(0xbd)]))],f);const J='thread-comment-data-source.config',L={};var F=Object[_0x1d346f(0x109)],Z=Object[_0x1d346f(0x120)],W=(_0x1dc61b,_0x1ce64b,_0x233d1b,_0x2bf4b1)=>{const _0x4ce9a3=_0x1d346f;for(var _0x32a24f=_0x2bf4b1>0x1?void 0x0:_0x2bf4b1?Z(_0x1ce64b,_0x233d1b):_0x1ce64b,_0x8ff9e7=_0x1dc61b[_0x4ce9a3(0x138)]-0x1,_0x41c9d9;_0x8ff9e7>=0x0;_0x8ff9e7--)(_0x41c9d9=_0x1dc61b[_0x8ff9e7])&&(_0x32a24f=(_0x2bf4b1?_0x41c9d9(_0x1ce64b,_0x233d1b,_0x32a24f):_0x41c9d9(_0x32a24f))||_0x32a24f);return _0x2bf4b1&&_0x32a24f&&F(_0x1ce64b,_0x233d1b,_0x32a24f),_0x32a24f;},_=(_0x6a6e5,_0x412ab1)=>(_0x4811fa,_0x46151c)=>_0x412ab1(_0x4811fa,_0x46151c,_0x6a6e5);function z(_0x1eb211,_0x3cdb26){const _0x2c36cc=_0x1d346f,_0x2ef4c5=_0x1eb211[_0x2c36cc(0xe8)][0x0];return{..._0x3cdb26,'id':_0x2ef4c5[_0x2c36cc(0x135)],'resolved':_0x1eb211[_0x2c36cc(0xba)]===0x1,'dT':y(_0x2ef4c5[_0x2c36cc(0x127)]),'personId':_0x2ef4c5[_0x2c36cc(0xeb)],'threadId':_0x2ef4c5['threadId']};}function B(_0x2cbc0f,_0x422bbd,_0x569515){const _0x322a62=_0x1d346f;var _0x161a10,_0x2a2a44;if(((_0x2a2a44=(_0x161a10=_0x2cbc0f==null?void 0x0:_0x2cbc0f[_0x322a62(0xe8)])==null?void 0x0:_0x161a10['length'])!=null?_0x2a2a44:0x0)>0x0){const _0x30e366=(_0x33bbb6,_0xfa05c5)=>({'id':_0x33bbb6['replyId'],'threadId':_0x33bbb6[_0x322a62(0xc5)],'dT':y(_0x33bbb6[_0x322a62(0x127)]),'personId':_0x33bbb6['userId'],'resolved':_0x2cbc0f['solved']===p[_0x322a62(0x10d)],'unitId':_0x422bbd,'subUnitId':_0x569515,'text':JSON[_0x322a62(0xf1)](_0x33bbb6[_0x322a62(0xb3)]),'parentId':_0xfa05c5}),_0x16ad3c=_0x30e366(_0x2cbc0f[_0x322a62(0xe8)][0x0]);return{..._0x16ad3c,'children':_0x2cbc0f[_0x322a62(0xe8)][_0x322a62(0x118)](0x1)[_0x322a62(0xcb)](_0x3bb089=>_0x30e366(_0x3bb089,_0x16ad3c['id']))};}return null;}let b=class{constructor(_0x587574,_0x643ca5,_0x3c0c06,_0x1bb7ac){const _0x449e5a=_0x1d346f;this[_0x449e5a(0xb9)]=_0x587574,this[_0x449e5a(0xbe)]=_0x643ca5,this[_0x449e5a(0x137)]=_0x3c0c06,this[_0x449e5a(0xd7)]=_0x1bb7ac;}async[_0x1d346f(0xd6)](_0x267602){const _0x28d391=_0x1d346f;var _0x449d3c,_0x379151;const {parentId:_0x26bde8,unitId:_0x482073,text:_0xb47c3b,threadId:_0x142b47}=_0x267602,_0x186487=(_0x379151=(_0x449d3c=_0xb47c3b[_0x28d391(0xf9)])==null?void 0x0:_0x449d3c[_0x28d391(0x107)](_0x4d0983=>_0x4d0983[_0x28d391(0xff)]===c[_0x28d391(0x124)][_0x28d391(0xb8)])['map'](_0x487341=>_0x487341[_0x28d391(0x112)]))!=null?_0x379151:[],_0x18a34b=JSON[_0x28d391(0xdd)](_0xb47c3b),_0x4e91b7=(await this['_sessionService'][_0x28d391(0x11c)](_0x482073))['getMemberID']();if(_0x26bde8){const _0x3fa1a4={'memberId':_0x4e91b7,'unitId':_0x482073,'content':_0x18a34b,'mention':_0x186487,'threadId':_0x142b47},_0x1d02cf=(await this[_0x28d391(0xb9)]['post'](_0x28d391(0xc6)+_0x482073+'/reply',{'body':_0x3fa1a4}))[_0x28d391(0x116)][_0x28d391(0xca)];return{..._0x267602,'id':_0x1d02cf[_0x28d391(0x135)],'dT':$(+_0x1d02cf[_0x28d391(0x127)])[_0x28d391(0x125)](_0x28d391(0xd8)),'personId':_0x1d02cf[_0x28d391(0xeb)]};}else{const _0x485f44={'memberId':_0x4e91b7,'unitId':_0x482073,'content':_0x18a34b,'mention':_0x186487},_0x6ae529=await this[_0x28d391(0xb9)][_0x28d391(0x103)]('/universer-api/comment/unit/'+_0x482073+_0x28d391(0xb7),{'body':_0x485f44});return z(_0x6ae529[_0x28d391(0x116)][_0x28d391(0xfb)],_0x267602);}}async['updateComment'](_0x1f0104){const _0x7cca5d=_0x1d346f;var _0x208abe,_0x962c74;const {text:_0x1d4acb,unitId:_0x1393d9}=_0x1f0104,_0x389a35=(_0x962c74=(_0x208abe=_0x1d4acb[_0x7cca5d(0xf9)])==null?void 0x0:_0x208abe[_0x7cca5d(0x107)](_0x2c15f7=>_0x2c15f7[_0x7cca5d(0xff)]===c[_0x7cca5d(0x124)][_0x7cca5d(0xb8)])[_0x7cca5d(0xcb)](_0x18a0be=>_0x18a0be[_0x7cca5d(0x112)]))!=null?_0x962c74:[],_0x55e726=JSON[_0x7cca5d(0xdd)](_0x1d4acb),_0x3808bd=_0x1f0104['threadId'],_0x1180ae=_0x1f0104['id'],_0x165c3c={'memberId':(await this['_sessionService'][_0x7cca5d(0x11c)](_0x1393d9))[_0x7cca5d(0xd9)](),'unitId':_0x1393d9,'threadId':_0x3808bd,'mention':_0x389a35,'content':_0x55e726,'replyId':_0x1180ae},_0x475343=await this[_0x7cca5d(0xb9)][_0x7cca5d(0x103)](_0x7cca5d(0xc6)+_0x1393d9+'/edit',{'body':_0x165c3c});return!_0x475343[_0x7cca5d(0x116)]['error']||_0x475343['body']['error'][_0x7cca5d(0x11f)]===0x1;}async[_0x1d346f(0xea)](_0x1d54a6){const _0x136e71=_0x1d346f,{unitId:_0x1b40a2}=_0x1d54a6,_0x55be45=_0x1d54a6[_0x136e71(0xc5)],_0x211bd9={'memberId':this[_0x136e71(0xbe)][_0x136e71(0xe3)]()[_0x136e71(0x12d)],'unitId':_0x1b40a2,'threadId':_0x55be45,'solved':_0x1d54a6['resolved']?p['Solved']:p[_0x136e71(0xf0)]},_0x333da4=await this[_0x136e71(0xb9)][_0x136e71(0x103)](_0x136e71(0xc6)+_0x1b40a2+'/solved',{'body':_0x211bd9});return!_0x333da4[_0x136e71(0x116)][_0x136e71(0x11b)]||_0x333da4['body'][_0x136e71(0x11b)][_0x136e71(0x11f)]===0x1;}async[_0x1d346f(0xe9)](_0x5659c3,_0x4b0160,_0x48804e,_0x57b3a0){const _0x49209c=_0x1d346f,_0x805bdb={'memberId':(await this['_sessionService'][_0x49209c(0x11c)](_0x5659c3))[_0x49209c(0xd9)](),'threadId':_0x48804e,'replyId':_0x57b3a0,'unitId':_0x5659c3},_0x10007a=await this[_0x49209c(0xb9)][_0x49209c(0x103)](_0x49209c(0xc6)+_0x5659c3+_0x49209c(0x128),{'body':_0x805bdb});return!_0x10007a[_0x49209c(0x116)][_0x49209c(0x11b)]||_0x10007a['body'][_0x49209c(0x11b)]['code']===0x1;}async[_0x1d346f(0x100)](_0x5df327,_0x50ba19,_0x42f094){const _0xa17bbe=_0x1d346f,_0x414c99={'unitId':_0x5df327,'threadId':_0x42f094},_0x2e198d=await this[_0xa17bbe(0xb9)][_0xa17bbe(0x103)](_0xa17bbe(0xc6)+_0x5df327+_0xa17bbe(0xf7),{'body':_0x414c99}),_0x598878=_0x42f094[_0xa17bbe(0xcb)](_0x17b062=>B(_0x2e198d[_0xa17bbe(0x116)]['comments'][_0x17b062],_0x5df327,_0x50ba19))['filter'](Boolean);return Object[_0xa17bbe(0x101)](_0x2e198d[_0xa17bbe(0x116)][_0xa17bbe(0xc9)])[_0xa17bbe(0xe5)](_0x4d3e15=>{const _0x41450d=_0xa17bbe;this['_userService'][_0x41450d(0xd1)](_0x4d3e15);}),_0x598878;}[_0x1d346f(0xf5)](_0x3ec9b2){const _0x4f5ab5=_0x1d346f;return{'id':_0x3ec9b2['id'],'threadId':_0x3ec9b2[_0x4f5ab5(0xc5)],'ref':_0x3ec9b2[_0x4f5ab5(0xfa)]};}};b=W([_(0x0,c['Inject'](P[_0x1d346f(0x134)])),_(0x1,c[_0x1d346f(0x104)](c[_0x1d346f(0xdb)])),_(0x2,c[_0x1d346f(0x104)](O[_0x1d346f(0x10f)])),_(0x3,c[_0x1d346f(0x104)](c[_0x1d346f(0xbd)]))],b);var K=Object[_0x1d346f(0x109)],V=Object[_0x1d346f(0x120)],Q=(_0x55ad69,_0x455cae,_0x45dc15,_0xda0e38)=>{const _0x43cec2=_0x1d346f;for(var _0x4bd8f2=_0xda0e38>0x1?void 0x0:_0xda0e38?V(_0x455cae,_0x45dc15):_0x455cae,_0x54b6fb=_0x55ad69[_0x43cec2(0x138)]-0x1,_0x12ec17;_0x54b6fb>=0x0;_0x54b6fb--)(_0x12ec17=_0x55ad69[_0x54b6fb])&&(_0x4bd8f2=(_0xda0e38?_0x12ec17(_0x455cae,_0x45dc15,_0x4bd8f2):_0x12ec17(_0x4bd8f2))||_0x4bd8f2);return _0xda0e38&&_0x4bd8f2&&K(_0x455cae,_0x45dc15,_0x4bd8f2),_0x4bd8f2;},X=(_0x1de8c9,_0x51c5f9)=>(_0x4ec73c,_0x34c9b1)=>_0x51c5f9(_0x4ec73c,_0x34c9b1,_0x1de8c9);function _0x2ad7(){const _0x102c82=['://','pipe','symbol','Unknown','type','HTTPService','replyId','ThreadCommentModel','_sessionService','length','/universer-api/user/list','UniverThreadCommentPlugin','content','Edit','rxjs','pluginName','/add','COMMENT','_httpService','solved','1178420akqZwd','setConfig','Injector','_userService','3995168ahFIZe','64DPHHZO','@univerjs/core','_threadCommentMentionDataSource','18WgIIhC','6943900boACwh','threadId','/universer-api/comment/unit/','Add','78ZndyuK','users','reply','map','disposeWithMe','syncUpdateMutationToColla','362jmMkKu','unitId','commentUpdate$','addUser','/universer-api/authz/collaborator','_threadCommentDataSource','subject','@univerjs-pro/collaboration-client','addComment','_injector','YYYY/MM/DD\x20HH:mm','getMemberID','UniverThreadCommentDataSourcePlugin','UserManagerService','onStarting','stringify','@univerjs/thread-comment','CommentService','Solve','searchParams','UniverInstanceType','getCurrentUser','user','forEach','Plugin','dayjs','replies','deleteComment','resolveComment','userId','IThreadCommentDataSourceService','updateComment','payload','UniverCollaborationClientPlugin','OpenOrReOpen','parse','href','_commentService','@univerjs-pro/license','saveCommentToSnapshot','71655CeVjci','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','ref','comment','name','get','_threadCommentModel','rangeType','listComments','values','getMentions','post','Inject','_initUserSync','Delete','filter','getThread','defineProperty','collaborators','personId','1356543qHydBo','Solved','Disposable','CollaborationSessionService','Reply','https','rangeId','_configService','location','dataSource','body','_threadCommentDataSourceService','slice','_config','12291069FzLDJZ','error','requireSession','getUser','delete','code','getOwnPropertyDescriptor','@univerjs/network','IConfigService','UNRECOGNIZED','CustomRangeType','format','parentId','createTimestamp','/delete','subscribe','_init','size','DependentOn','userID','add'];_0x2ad7=function(){return _0x102c82;};return _0x2ad7();}let C=class{constructor(_0x16d602){this['_httpService']=_0x16d602;}async[_0x1d346f(0x102)](_0x3d4596,_0x1e29da,_0x52230f){const _0x432c41=_0x1d346f,_0x1bf0fa=new URL(window[_0x432c41(0x114)][_0x432c41(0xf2)])[_0x432c41(0xe1)][_0x432c41(0xfd)]('unit');if(!_0x1bf0fa)return[];const _0xf8f1c6=window['location']['host'],_0x58a66d=window[_0x432c41(0x114)]['protocol']==='https:'?_0x432c41(0x111):'http';return(await this[_0x432c41(0xb9)]['get'](_0x58a66d+_0x432c41(0x12f)+_0xf8f1c6+_0x432c41(0xd2),{'params':{'objectID':_0x1bf0fa,'unitID':_0x1bf0fa}}))[_0x432c41(0x116)][_0x432c41(0x10a)][_0x432c41(0xcb)](_0x4b57fb=>{const _0x4319f9=_0x432c41;var _0xbecc3d,_0x34370e,_0x415100,_0x2f8839,_0x104fd3,_0x2896b2;return{'id':(_0x34370e=(_0xbecc3d=_0x4b57fb[_0x4319f9(0xd4)])==null?void 0x0:_0xbecc3d[_0x4319f9(0x12d)])!=null?_0x34370e:'','label':(_0x2f8839=(_0x415100=_0x4b57fb[_0x4319f9(0xd4)])==null?void 0x0:_0x415100[_0x4319f9(0xfc)])!=null?_0x2f8839:'','icon':(_0x2896b2=(_0x104fd3=_0x4b57fb['subject'])==null?void 0x0:_0x104fd3['avatar'])!=null?_0x2896b2:'','type':_0x4319f9(0xe4)};});}};C=Q([X(0x0,c['Inject'](P['HTTPService']))],C);var k=Object[_0x1d346f(0x109)],ee=Object[_0x1d346f(0x120)],re=(_0x1924c6,_0x4ecd6b,_0x1059f4,_0x151e39)=>{const _0x635036=_0x1d346f;for(var _0x550581=_0x151e39>0x1?void 0x0:_0x151e39?ee(_0x4ecd6b,_0x1059f4):_0x4ecd6b,_0x13bdd1=_0x1924c6[_0x635036(0x138)]-0x1,_0x49d3c8;_0x13bdd1>=0x0;_0x13bdd1--)(_0x49d3c8=_0x1924c6[_0x13bdd1])&&(_0x550581=(_0x151e39?_0x49d3c8(_0x4ecd6b,_0x1059f4,_0x550581):_0x49d3c8(_0x550581))||_0x550581);return _0x151e39&&_0x550581&&k(_0x4ecd6b,_0x1059f4,_0x550581),_0x550581;},S=(_0x35cebb,_0x3da0dd)=>(_0x151a13,_0x166c1f)=>_0x3da0dd(_0x151a13,_0x166c1f,_0x35cebb);let D=class extends c[_0x1d346f(0x10e)]{constructor(_0x2bd4c7,_0x38dd64,_0x3bc5a8,_0x3b0efb){const _0xaf3c78=_0x1d346f;super(),this[_0xaf3c78(0x117)]=_0x2bd4c7,this[_0xaf3c78(0xd3)]=_0x38dd64,this['_threadCommentMentionDataService']=_0x3bc5a8,this[_0xaf3c78(0xc2)]=_0x3b0efb,this['_initDataSource']();}['_initDataSource'](){const _0x5b70fa=_0x1d346f;this[_0x5b70fa(0x117)][_0x5b70fa(0x115)]=this[_0x5b70fa(0xd3)],this[_0x5b70fa(0x117)][_0x5b70fa(0xcd)]=!0x1,this['_threadCommentMentionDataService'][_0x5b70fa(0x115)]=this[_0x5b70fa(0xc2)];}};D=re([S(0x0,g[_0x1d346f(0xec)]),S(0x1,c[_0x1d346f(0x104)](b)),S(0x2,N['IThreadCommentMentionDataService']),S(0x3,c[_0x1d346f(0x104)](C))],D);var U=Object[_0x1d346f(0x109)],te=Object[_0x1d346f(0x120)],se=(_0x3bd155,_0x4f4d28,_0x1905fd)=>_0x4f4d28 in _0x3bd155?U(_0x3bd155,_0x4f4d28,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1905fd}):_0x3bd155[_0x4f4d28]=_0x1905fd,ne=(_0x13b1ba,_0xf8802,_0x5e5558,_0x511e89)=>{const _0x312733=_0x1d346f;for(var _0x175dca=_0x511e89>0x1?void 0x0:_0x511e89?te(_0xf8802,_0x5e5558):_0xf8802,_0x37af62=_0x13b1ba[_0x312733(0x138)]-0x1,_0x37036b;_0x37af62>=0x0;_0x37af62--)(_0x37036b=_0x13b1ba[_0x37af62])&&(_0x175dca=(_0x511e89?_0x37036b(_0xf8802,_0x5e5558,_0x175dca):_0x37036b(_0x175dca))||_0x175dca);return _0x511e89&&_0x175dca&&U(_0xf8802,_0x5e5558,_0x175dca),_0x175dca;},T=(_0x3884b5,_0x3f3caf)=>(_0x1763fd,_0x41d8eb)=>_0x3f3caf(_0x1763fd,_0x41d8eb,_0x3884b5),R=(_0x52e188,_0x205f4,_0x50380a)=>se(_0x52e188,typeof _0x205f4!=_0x1d346f(0x131)?_0x205f4+'':_0x205f4,_0x50380a);exports[_0x1d346f(0xda)]=class extends c[_0x1d346f(0xe6)]{constructor(_0x26384c=L,_0x70d006,_0x4024a3){const _0x58dbb4=_0x1d346f;super(),this[_0x58dbb4(0x119)]=_0x26384c,this[_0x58dbb4(0xd7)]=_0x70d006,this['_configService']=_0x4024a3;const {..._0x26597e}=this[_0x58dbb4(0x119)];this[_0x58dbb4(0x113)][_0x58dbb4(0xbc)](J,_0x26597e);}[_0x1d346f(0xdc)](){const _0x1feb27=_0x1d346f;[[C],[b],[D],[f]]['forEach'](_0x54ea0d=>{const _0x47a2ed=_0x358c;this[_0x47a2ed(0xd7)][_0x47a2ed(0x12e)](_0x54ea0d);}),this[_0x1feb27(0xd7)]['get'](D);}['onReady'](){const _0x307ee1=_0x1d346f;this[_0x307ee1(0xd7)][_0x307ee1(0xfd)](f);}},R(exports['UniverThreadCommentDataSourcePlugin'],_0x1d346f(0xb6),x),R(exports[_0x1d346f(0xda)],_0x1d346f(0x133),c[_0x1d346f(0xe2)]['UNIVER_UNKNOWN']),exports[_0x1d346f(0xda)]=ne([c[_0x1d346f(0x12c)](g[_0x1d346f(0x13a)],N['UniverThreadCommentUIPlugin'],O[_0x1d346f(0xef)],E['UniverLicensePlugin']),T(0x1,c[_0x1d346f(0x104)](c[_0x1d346f(0xbd)])),T(0x2,c[_0x1d346f(0x122)])],exports[_0x1d346f(0xda)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x115891=_0x4c96;(function(_0x224171,_0x555672){const _0x14a75c=_0x4c96,_0xbc15a5=_0x224171();while(!![]){try{const _0x99c011=-parseInt(_0x14a75c(0x118))/0x1+-parseInt(_0x14a75c(0xe7))/0x2*(-parseInt(_0x14a75c(0x108))/0x3)+-parseInt(_0x14a75c(0xe5))/0x4*(parseInt(_0x14a75c(0xfa))/0x5)+parseInt(_0x14a75c(0xe2))/0x6*(-parseInt(_0x14a75c(0x126))/0x7)+parseInt(_0x14a75c(0xbe))/0x8+-parseInt(_0x14a75c(0x121))/0x9+parseInt(_0x14a75c(0x11a))/0xa;if(_0x99c011===_0x555672)break;else _0xbc15a5['push'](_0xbc15a5['shift']());}catch(_0x1fe608){_0xbc15a5['push'](_0xbc15a5['shift']());}}}(_0x3030,0x560e9));import{UserManagerService as _0x54cab1,OnLifecycle as _0x4c9dbd,LifecycleStages as _0x1b459a,Inject as _0x26bdae,Injector as _0x45798e,Disposable as _0x53128e,CustomRangeType as _0x4b1e8b,UniverInstanceType as _0x3f884b,DependentOn as _0xd28b02,Plugin as _0x4d6100,IConfigService as _0x53485d}from'@univerjs/core';import{ThreadCommentModel as _0xdeb278,IThreadCommentDataSourceService as _0x2fbc37,UniverThreadCommentPlugin as _0x309205}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x3efcfb,UniverThreadCommentUIPlugin as _0x418bf4}from'@univerjs/thread-comment-ui';import{CommentService as _0x56b225,CollaborationSessionService as _0x1663c9,UniverCollaborationClientPlugin as _0x4d8267}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x443187}from'@univerjs-pro/license';import{bufferTime as _0x4f32f7}from'rxjs';import{HTTPService as _0x146a8a}from'@univerjs/network';import _0x5b8672 from'dayjs';const k=_0x115891(0x111);var v=(_0xccda49=>(_0xccda49[_0xccda49[_0x115891(0xe4)]=0x0]='OpenOrReOpen',_0xccda49[_0xccda49[_0x115891(0x10c)]=0x1]='Solved',_0xccda49[_0xccda49[_0x115891(0xe9)]=-0x1]=_0x115891(0xe9),_0xccda49))(v||{}),p=(_0x3dabe0=>(_0x3dabe0[_0x3dabe0['Unknown']=0x0]='Unknown',_0x3dabe0[_0x3dabe0[_0x115891(0x125)]=0x1]='Add',_0x3dabe0[_0x3dabe0['Reply']=0x2]=_0x115891(0xdf),_0x3dabe0[_0x3dabe0[_0x115891(0x12b)]=0x3]=_0x115891(0x12b),_0x3dabe0[_0x3dabe0[_0x115891(0xfe)]=0x4]=_0x115891(0xfe),_0x3dabe0[_0x3dabe0[_0x115891(0x117)]=0x5]=_0x115891(0x117),_0x3dabe0[_0x3dabe0[_0x115891(0xe9)]=-0x1]='UNRECOGNIZED',_0x3dabe0))(p||{});const w=_0x2840bb=>_0x5b8672(new Date(+_0x2840bb))[_0x115891(0x102)]('YYYY/MM/DD\x20HH:mm'),ee=async(_0x1b7f90,_0x50676d)=>{const _0x495ca6=_0x115891,_0xe10f81=_0x1b7f90[_0x495ca6(0xcd)](_0x54cab1),_0x5a4e7d=_0x1b7f90[_0x495ca6(0xcd)](_0x146a8a);_0x50676d[_0x495ca6(0xe8)](_0x1af1e8=>{const _0x1c4264=_0x495ca6;_0xe10f81[_0x1c4264(0x11b)](_0x1af1e8)&&_0x50676d[_0x1c4264(0xe1)](_0x1af1e8);}),_0x50676d[_0x495ca6(0x133)]&&(await _0x5a4e7d['get'](_0x495ca6(0x124),{'params':{'userIDs':[..._0x50676d]}}))[_0x495ca6(0x122)]['users']['forEach'](_0x4e616f=>{const _0x3fdb98=_0x495ca6;_0x4e616f&&_0xe10f81[_0x3fdb98(0xfc)](_0x4e616f);});};var re=Object[_0x115891(0x10d)],te=Object[_0x115891(0x123)],se=(_0x3c4bef,_0xda8218,_0x46467e,_0x34cf74)=>{const _0x35f112=_0x115891;for(var _0x4a07c6=_0x34cf74>0x1?void 0x0:_0x34cf74?te(_0xda8218,_0x46467e):_0xda8218,_0x575952=_0x3c4bef[_0x35f112(0xff)]-0x1,_0x5caa1f;_0x575952>=0x0;_0x575952--)(_0x5caa1f=_0x3c4bef[_0x575952])&&(_0x4a07c6=(_0x34cf74?_0x5caa1f(_0xda8218,_0x46467e,_0x4a07c6):_0x5caa1f(_0x4a07c6))||_0x4a07c6);return _0x34cf74&&_0x4a07c6&&re(_0xda8218,_0x46467e,_0x4a07c6),_0x4a07c6;},_=(_0x117999,_0x2b723d)=>(_0x3f97ba,_0x80e4aa)=>_0x2b723d(_0x3f97ba,_0x80e4aa,_0x117999);let S=class extends _0x53128e{constructor(_0x44651a,_0x101bf5,_0x3d50ce,_0x47cca0){const _0x5f4002=_0x115891;super(),this['_commentService']=_0x44651a,this[_0x5f4002(0xed)]=_0x101bf5,this['_userService']=_0x3d50ce,this[_0x5f4002(0x11e)]=_0x47cca0,this[_0x5f4002(0x119)](),this[_0x5f4002(0xf0)]();}[_0x115891(0xf0)](){const _0x195d04=_0x115891;this['disposeWithMe'](this['_threadCommentModel'][_0x195d04(0xbf)][_0x195d04(0x129)](_0x4f32f7(0x10))[_0x195d04(0xd4)](_0x5aeeea=>{const _0x1c23ee=_0x195d04,_0x19c349=new Set();_0x5aeeea[_0x1c23ee(0xe8)](_0x4b79e9=>{const _0x29088e=_0x1c23ee;switch(_0x4b79e9[_0x29088e(0x12f)]){case _0x29088e(0xd6):{const _0x57f9c2=_0x4b79e9[_0x29088e(0xee)][_0x29088e(0xd7)];_0x19c349[_0x29088e(0xd6)](_0x57f9c2);break;}}}),ee(this[_0x1c23ee(0x11e)],_0x19c349);}));}[_0x115891(0x119)](){const _0x3a7faf=_0x115891;this['disposeWithMe'](this['_commentService'][_0x3a7faf(0xbf)]['subscribe'](async _0x45c158=>{const _0x35d841=_0x3a7faf;var _0x2a2108,_0xd88d49;const _0x2c4b55=this[_0x35d841(0xed)]['getThread'](_0x45c158[_0x35d841(0x10e)],_0x45c158[_0x35d841(0xd5)]);if(!_0x2c4b55)return;const {unitId:_0x15acee,subUnitId:_0x30a100}=_0x2c4b55;switch(_0x45c158['user']&&this[_0x35d841(0xeb)]['addUser'](_0x45c158[_0x35d841(0xe3)]),_0x45c158[_0x35d841(0x12f)]){case p['Add']:break;case p['Reply']:{this[_0x35d841(0xed)]['addComment'](_0x15acee,_0x30a100,{'unitId':_0x15acee,'subUnitId':_0x30a100,'ref':'','id':_0x45c158['replyId'],'dT':w(+_0x45c158[_0x35d841(0x12c)]),'threadId':_0x45c158['threadId'],'personId':(_0xd88d49=(_0x2a2108=_0x45c158[_0x35d841(0xe3)])==null?void 0x0:_0x2a2108[_0x35d841(0xcf)])!=null?_0xd88d49:_0x45c158[_0x35d841(0xd1)],'text':JSON['parse'](_0x45c158[_0x35d841(0x10b)]),'parentId':_0x2c4b55['id']});break;}case p['Delete']:{const _0x2440e2=this[_0x35d841(0xed)][_0x35d841(0xc9)](_0x15acee,_0x30a100,_0x45c158[_0x35d841(0x12e)]);_0x2440e2&&_0x2440e2[_0x35d841(0xf6)]&&this[_0x35d841(0xed)]['deleteComment'](_0x15acee,_0x30a100,_0x45c158[_0x35d841(0x12e)]);break;}case p[_0x35d841(0x12b)]:{this[_0x35d841(0xed)][_0x35d841(0x10f)](_0x15acee,_0x30a100,{'commentId':_0x45c158[_0x35d841(0x12e)],'text':JSON[_0x35d841(0xf3)](_0x45c158[_0x35d841(0x10b)])});break;}case p[_0x35d841(0x117)]:{const _0x30dd79=this['_threadCommentModel'][_0x35d841(0xc4)](_0x15acee,_0x45c158['threadId']);_0x30dd79&&this[_0x35d841(0xed)][_0x35d841(0xca)](_0x15acee,_0x30a100,_0x30dd79['id'],_0x45c158[_0x35d841(0x116)]===v[_0x35d841(0x10c)]);break;}}}));}};S=se([_0x4c9dbd(_0x1b459a[_0x115891(0xf4)],S),_(0x0,_0x26bdae(_0x56b225)),_(0x1,_0x26bdae(_0xdeb278)),_(0x2,_0x26bdae(_0x54cab1)),_(0x3,_0x26bdae(_0x45798e))],S);const oe=_0x115891(0xd2),ne={};function _0x4c96(_0x276f2d,_0x1bea69){const _0x30308f=_0x3030();return _0x4c96=function(_0x4c9628,_0x545538){_0x4c9628=_0x4c9628-0xbe;let _0x4395a2=_0x30308f[_0x4c9628];return _0x4395a2;},_0x4c96(_0x276f2d,_0x1bea69);}var ie=Object['defineProperty'],ae=Object[_0x115891(0x123)],ce=(_0x4a7782,_0x2942d2,_0x30305e,_0x133a12)=>{for(var _0x8eedbc=_0x133a12>0x1?void 0x0:_0x133a12?ae(_0x2942d2,_0x30305e):_0x2942d2,_0x40e8a7=_0x4a7782['length']-0x1,_0x12620f;_0x40e8a7>=0x0;_0x40e8a7--)(_0x12620f=_0x4a7782[_0x40e8a7])&&(_0x8eedbc=(_0x133a12?_0x12620f(_0x2942d2,_0x30305e,_0x8eedbc):_0x12620f(_0x8eedbc))||_0x8eedbc);return _0x133a12&&_0x8eedbc&&ie(_0x2942d2,_0x30305e,_0x8eedbc),_0x8eedbc;},f=(_0x3ea8e0,_0x43357e)=>(_0x5a3bf8,_0x2224d6)=>_0x43357e(_0x5a3bf8,_0x2224d6,_0x3ea8e0);function de(_0x40ed5,_0x302999){const _0x3df159=_0x115891,_0x52577d=_0x40ed5[_0x3df159(0xdc)][0x0];return{..._0x302999,'id':_0x52577d[_0x3df159(0x12e)],'resolved':_0x40ed5[_0x3df159(0x116)]===0x1,'dT':w(_0x52577d[_0x3df159(0x12c)]),'personId':_0x52577d[_0x3df159(0xd1)],'threadId':_0x52577d['threadId']};}function me(_0x3708d9,_0x50d7b9,_0xefe6ac){const _0x362ee3=_0x115891;var _0x4ac7f1,_0x2ca545;if(((_0x2ca545=(_0x4ac7f1=_0x3708d9==null?void 0x0:_0x3708d9[_0x362ee3(0xdc)])==null?void 0x0:_0x4ac7f1[_0x362ee3(0xff)])!=null?_0x2ca545:0x0)>0x0){const _0x40c0a3=(_0xc9b92,_0x34c21b)=>({'id':_0xc9b92['replyId'],'threadId':_0xc9b92[_0x362ee3(0xd5)],'dT':w(_0xc9b92[_0x362ee3(0x12c)]),'personId':_0xc9b92[_0x362ee3(0xd1)],'resolved':_0x3708d9['solved']===v['Solved'],'unitId':_0x50d7b9,'subUnitId':_0xefe6ac,'text':JSON['parse'](_0xc9b92[_0x362ee3(0x10b)]),'parentId':_0x34c21b}),_0x597b92=_0x40c0a3(_0x3708d9['replies'][0x0]);return{..._0x597b92,'children':_0x3708d9['replies'][_0x362ee3(0xd8)](0x1)['map'](_0x2b63ad=>_0x40c0a3(_0x2b63ad,_0x597b92['id']))};}return null;}let D=class{constructor(_0x16b30a,_0x4d9822,_0x1c6cb9,_0x551f3b){const _0x58eeac=_0x115891;this['_httpService']=_0x16b30a,this[_0x58eeac(0xeb)]=_0x4d9822,this['_sessionService']=_0x1c6cb9,this[_0x58eeac(0x11e)]=_0x551f3b;}async[_0x115891(0x103)](_0x2e6734){const _0x1d4085=_0x115891;var _0x11c168,_0x408c80;const {parentId:_0x45a6bb,unitId:_0x466d10,text:_0x49e9b0,threadId:_0x1a9dd0}=_0x2e6734,_0x555da5=(_0x408c80=(_0x11c168=_0x49e9b0[_0x1d4085(0xc2)])==null?void 0x0:_0x11c168[_0x1d4085(0xc8)](_0x66fff4=>_0x66fff4[_0x1d4085(0x132)]===_0x4b1e8b[_0x1d4085(0xf2)])[_0x1d4085(0x120)](_0x491f57=>_0x491f57[_0x1d4085(0x131)]))!=null?_0x408c80:[],_0x3c872d=JSON[_0x1d4085(0xc1)](_0x49e9b0),_0xe28e7c=(await this['_sessionService'][_0x1d4085(0xef)](_0x466d10))[_0x1d4085(0x10a)]();if(_0x45a6bb){const _0x3ab3a8={'memberId':_0xe28e7c,'unitId':_0x466d10,'content':_0x3c872d,'mention':_0x555da5,'threadId':_0x1a9dd0},_0x41eb6d=(await this[_0x1d4085(0x113)][_0x1d4085(0xfb)](_0x1d4085(0x11d)+_0x466d10+_0x1d4085(0x104),{'body':_0x3ab3a8}))[_0x1d4085(0x122)][_0x1d4085(0x100)];return{..._0x2e6734,'id':_0x41eb6d[_0x1d4085(0x12e)],'dT':_0x5b8672(+_0x41eb6d[_0x1d4085(0x12c)])[_0x1d4085(0x102)](_0x1d4085(0x130)),'personId':_0x41eb6d[_0x1d4085(0xd1)]};}else{const _0x3d4947={'memberId':_0xe28e7c,'unitId':_0x466d10,'content':_0x3c872d,'mention':_0x555da5},_0x4ce12e=await this[_0x1d4085(0x113)]['post'](_0x1d4085(0x11d)+_0x466d10+'/add',{'body':_0x3d4947});return de(_0x4ce12e[_0x1d4085(0x122)][_0x1d4085(0x101)],_0x2e6734);}}async['updateComment'](_0x24a7d4){const _0xc78c51=_0x115891;var _0x47ee35,_0x364c88;const {text:_0x3e050d,unitId:_0x3a5afd}=_0x24a7d4,_0x123aa3=(_0x364c88=(_0x47ee35=_0x3e050d['customRanges'])==null?void 0x0:_0x47ee35['filter'](_0x2ff4aa=>_0x2ff4aa[_0xc78c51(0x132)]===_0x4b1e8b[_0xc78c51(0xf2)])[_0xc78c51(0x120)](_0x777eb7=>_0x777eb7[_0xc78c51(0x131)]))!=null?_0x364c88:[],_0x15ba17=JSON[_0xc78c51(0xc1)](_0x3e050d),_0x4e57a3=_0x24a7d4[_0xc78c51(0xd5)],_0x11d6fc=_0x24a7d4['id'],_0x1be1e1={'memberId':(await this[_0xc78c51(0x106)][_0xc78c51(0xef)](_0x3a5afd))['getMemberID'](),'unitId':_0x3a5afd,'threadId':_0x4e57a3,'mention':_0x123aa3,'content':_0x15ba17,'replyId':_0x11d6fc},_0x4618b5=await this[_0xc78c51(0x113)]['post'](_0xc78c51(0x11d)+_0x3a5afd+_0xc78c51(0xcb),{'body':_0x1be1e1});return!_0x4618b5[_0xc78c51(0x122)][_0xc78c51(0xf7)]||_0x4618b5[_0xc78c51(0x122)][_0xc78c51(0xf7)]['code']===0x1;}async[_0x115891(0xca)](_0x2dd98d){const _0x2b25ea=_0x115891,{unitId:_0x21762c}=_0x2dd98d,_0x48f09a=_0x2dd98d[_0x2b25ea(0xd5)],_0x385825={'memberId':this[_0x2b25ea(0xeb)][_0x2b25ea(0xce)]()[_0x2b25ea(0xcf)],'unitId':_0x21762c,'threadId':_0x48f09a,'solved':_0x2dd98d[_0x2b25ea(0x109)]?v['Solved']:v['OpenOrReOpen']},_0x785155=await this[_0x2b25ea(0x113)]['post']('/universer-api/comment/unit/'+_0x21762c+'/solved',{'body':_0x385825});return!_0x785155[_0x2b25ea(0x122)][_0x2b25ea(0xf7)]||_0x785155[_0x2b25ea(0x122)][_0x2b25ea(0xf7)]['code']===0x1;}async['deleteComment'](_0x242c84,_0x338613,_0x3692ef,_0x48db47){const _0x226ccd=_0x115891,_0x490c3c={'memberId':(await this[_0x226ccd(0x106)][_0x226ccd(0xef)](_0x242c84))[_0x226ccd(0x10a)](),'threadId':_0x3692ef,'replyId':_0x48db47,'unitId':_0x242c84},_0x4bce81=await this['_httpService'][_0x226ccd(0xfb)]('/universer-api/comment/unit/'+_0x242c84+_0x226ccd(0xc0),{'body':_0x490c3c});return!_0x4bce81[_0x226ccd(0x122)][_0x226ccd(0xf7)]||_0x4bce81[_0x226ccd(0x122)]['error'][_0x226ccd(0x11c)]===0x1;}async['listComments'](_0x53bd45,_0x23a353,_0x39f30a){const _0x1f63dc=_0x115891,_0x2ba436={'unitId':_0x53bd45,'threadId':_0x39f30a},_0x284967=await this['_httpService'][_0x1f63dc(0xfb)](_0x1f63dc(0x11d)+_0x53bd45+'/list',{'body':_0x2ba436}),_0x2ad5ae=_0x39f30a[_0x1f63dc(0x120)](_0x12ee82=>me(_0x284967['body'][_0x1f63dc(0x105)][_0x12ee82],_0x53bd45,_0x23a353))[_0x1f63dc(0xc8)](Boolean);return Object[_0x1f63dc(0xda)](_0x284967[_0x1f63dc(0x122)][_0x1f63dc(0x115)])['forEach'](_0x2fd3c5=>{const _0x3f70ab=_0x1f63dc;this[_0x3f70ab(0xeb)][_0x3f70ab(0xfc)](_0x2fd3c5);}),_0x2ad5ae;}[_0x115891(0xc6)](_0x70509d){const _0x24afb0=_0x115891;return{'id':_0x70509d['id'],'threadId':_0x70509d[_0x24afb0(0xd5)],'ref':_0x70509d[_0x24afb0(0xc5)]};}};function _0x3030(){const _0x22569e=['10918990VEzNfx','getUser','code','/universer-api/comment/unit/','_injector','Starting','map','3367323SxRIbb','body','getOwnPropertyDescriptor','/universer-api/user/list','Add','7mDoFJW','href','symbol','pipe','subject','Edit','createTimestamp','_config','replyId','type','YYYY/MM/DD\x20HH:mm','rangeId','rangeType','size','491544EpFKMp','commentUpdate$','/delete','stringify','customRanges','collaborators','getThread','ref','saveCommentToSnapshot','_initDataSource','filter','getComment','resolveComment','/edit','://','get','getCurrentUser','userID','onStarting','userId','thread-comment-data-source.config','UNIVER_UNKNOWN','subscribe','threadId','add','personId','slice','_configService','values','getMentions','replies','name','setConfig','Reply','location','delete','857202roYjEg','user','OpenOrReOpen','345264LgRSTY','avatar','178028HSbBfp','forEach','UNRECOGNIZED','syncUpdateMutationToColla','_userService','dataSource','_threadCommentModel','payload','requireSession','_initUserSync','host','COMMENT','parse','Ready','_threadCommentDataSourceService','parentId','error','unit','pluginName','40zhTOOs','post','addUser','_threadCommentMentionDataSource','Delete','length','reply','comment','format','addComment','/reply','comments','_sessionService','https:','21gNUBCx','resolved','getMemberID','content','Solved','defineProperty','unitId','updateComment','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentMentionDataService','_httpService','searchParams','users','solved','Solve','216409zBJXyY','_init'];_0x3030=function(){return _0x22569e;};return _0x3030();}D=ce([f(0x0,_0x26bdae(_0x146a8a)),f(0x1,_0x26bdae(_0x54cab1)),f(0x2,_0x26bdae(_0x1663c9)),f(0x3,_0x26bdae(_0x45798e))],D);var le=Object[_0x115891(0x10d)],he=Object[_0x115891(0x123)],ue=(_0xa82195,_0x49b89d,_0x58d308,_0x565b31)=>{for(var _0x2366d8=_0x565b31>0x1?void 0x0:_0x565b31?he(_0x49b89d,_0x58d308):_0x49b89d,_0x51cef4=_0xa82195['length']-0x1,_0x4f5ba7;_0x51cef4>=0x0;_0x51cef4--)(_0x4f5ba7=_0xa82195[_0x51cef4])&&(_0x2366d8=(_0x565b31?_0x4f5ba7(_0x49b89d,_0x58d308,_0x2366d8):_0x4f5ba7(_0x2366d8))||_0x2366d8);return _0x565b31&&_0x2366d8&&le(_0x49b89d,_0x58d308,_0x2366d8),_0x2366d8;},pe=(_0x245cd4,_0x46ed10)=>(_0x521f23,_0x3beb85)=>_0x46ed10(_0x521f23,_0x3beb85,_0x245cd4);let C=class{constructor(_0x5644ba){this['_httpService']=_0x5644ba;}async[_0x115891(0xdb)](_0x4a42da,_0x3bb263,_0x55ad40){const _0x149bff=_0x115891,_0x480c14=new URL(window[_0x149bff(0xe0)][_0x149bff(0x127)])[_0x149bff(0x114)][_0x149bff(0xcd)](_0x149bff(0xf8));if(!_0x480c14)return[];const _0xe82cd3=window[_0x149bff(0xe0)][_0x149bff(0xf1)],_0x3f142a=window['location']['protocol']===_0x149bff(0x107)?'https':'http';return(await this[_0x149bff(0x113)][_0x149bff(0xcd)](_0x3f142a+_0x149bff(0xcc)+_0xe82cd3+'/universer-api/authz/collaborator',{'params':{'objectID':_0x480c14,'unitID':_0x480c14}}))[_0x149bff(0x122)][_0x149bff(0xc3)]['map'](_0x502b76=>{const _0x340339=_0x149bff;var _0x3a952a,_0x580081,_0x3a9743,_0x2451c9,_0xf0f4d5,_0x5ecdad;return{'id':(_0x580081=(_0x3a952a=_0x502b76[_0x340339(0x12a)])==null?void 0x0:_0x3a952a[_0x340339(0xcf)])!=null?_0x580081:'','label':(_0x2451c9=(_0x3a9743=_0x502b76[_0x340339(0x12a)])==null?void 0x0:_0x3a9743[_0x340339(0xdd)])!=null?_0x2451c9:'','icon':(_0x5ecdad=(_0xf0f4d5=_0x502b76[_0x340339(0x12a)])==null?void 0x0:_0xf0f4d5[_0x340339(0xe6)])!=null?_0x5ecdad:'','type':_0x340339(0xe3)};});}};C=ue([pe(0x0,_0x26bdae(_0x146a8a))],C);var ve=Object[_0x115891(0x10d)],_e=Object['getOwnPropertyDescriptor'],fe=(_0x3efcf6,_0x50e823,_0x283501,_0x5a0f01)=>{const _0x3e2f85=_0x115891;for(var _0x2f795c=_0x5a0f01>0x1?void 0x0:_0x5a0f01?_e(_0x50e823,_0x283501):_0x50e823,_0x1037e2=_0x3efcf6[_0x3e2f85(0xff)]-0x1,_0x1feb76;_0x1037e2>=0x0;_0x1037e2--)(_0x1feb76=_0x3efcf6[_0x1037e2])&&(_0x2f795c=(_0x5a0f01?_0x1feb76(_0x50e823,_0x283501,_0x2f795c):_0x1feb76(_0x2f795c))||_0x2f795c);return _0x5a0f01&&_0x2f795c&&ve(_0x50e823,_0x283501,_0x2f795c),_0x2f795c;},I=(_0x477d29,_0x5f37e2)=>(_0x52ae51,_0x4570d1)=>_0x5f37e2(_0x52ae51,_0x4570d1,_0x477d29);let b=class extends _0x53128e{constructor(_0x59b6a0,_0x34f3cb,_0x58c599,_0x13fd3a){const _0x1e1865=_0x115891;super(),this[_0x1e1865(0xf5)]=_0x59b6a0,this['_threadCommentDataSource']=_0x34f3cb,this[_0x1e1865(0x112)]=_0x58c599,this[_0x1e1865(0xfd)]=_0x13fd3a,this[_0x1e1865(0xc7)]();}['_initDataSource'](){const _0x3c5054=_0x115891;this[_0x3c5054(0xf5)][_0x3c5054(0xec)]=this[_0x3c5054(0x110)],this[_0x3c5054(0xf5)][_0x3c5054(0xea)]=!0x1,this[_0x3c5054(0x112)][_0x3c5054(0xec)]=this[_0x3c5054(0xfd)];}};b=fe([_0x4c9dbd(_0x1b459a[_0x115891(0x11f)],b),I(0x0,_0x2fbc37),I(0x1,_0x26bdae(D)),I(0x2,_0x3efcfb),I(0x3,_0x26bdae(C))],b);var Y=Object[_0x115891(0x10d)],Ie=Object[_0x115891(0x123)],Se=(_0x51bb74,_0x49fef3,_0x4424f4)=>_0x49fef3 in _0x51bb74?Y(_0x51bb74,_0x49fef3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4424f4}):_0x51bb74[_0x49fef3]=_0x4424f4,be=(_0xeea9d8,_0x5cbf61,_0x379381,_0x39eb30)=>{for(var _0x548750=_0x39eb30>0x1?void 0x0:_0x39eb30?Ie(_0x5cbf61,_0x379381):_0x5cbf61,_0x2df04b=_0xeea9d8['length']-0x1,_0x25915e;_0x2df04b>=0x0;_0x2df04b--)(_0x25915e=_0xeea9d8[_0x2df04b])&&(_0x548750=(_0x39eb30?_0x25915e(_0x5cbf61,_0x379381,_0x548750):_0x25915e(_0x548750))||_0x548750);return _0x39eb30&&_0x548750&&Y(_0x5cbf61,_0x379381,_0x548750),_0x548750;},j=(_0x58cd31,_0x1e6cbd)=>(_0x286ae8,_0x1ebfd6)=>_0x1e6cbd(_0x286ae8,_0x1ebfd6,_0x58cd31),G=(_0x45a191,_0x5d413f,_0x45371f)=>Se(_0x45a191,typeof _0x5d413f!=_0x115891(0x128)?_0x5d413f+'':_0x5d413f,_0x45371f);let g=class extends _0x4d6100{constructor(_0x32277c=ne,_0x11e0c8,_0x5ee5c9){const _0x21f4b=_0x115891;super(),this['_config']=_0x32277c,this[_0x21f4b(0x11e)]=_0x11e0c8,this[_0x21f4b(0xd9)]=_0x5ee5c9;const {..._0x5be29f}=this[_0x21f4b(0x12d)];this['_configService'][_0x21f4b(0xde)](oe,_0x5be29f);}[_0x115891(0xd0)](){const _0x25ecc6=_0x115891;[[C],[D],[b],[S]][_0x25ecc6(0xe8)](_0xc08572=>{const _0x4f2621=_0x25ecc6;this[_0x4f2621(0x11e)][_0x4f2621(0xd6)](_0xc08572);});}};G(g,_0x115891(0xf9),k),G(g,'type',_0x3f884b[_0x115891(0xd3)]),g=be([_0xd28b02(_0x309205,_0x418bf4,_0x4d8267,_0x443187),j(0x1,_0x26bdae(_0x45798e)),j(0x2,_0x53485d)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3c7d0d=_0x4033;(function(_0x4c43db,_0x27c19c){const _0x172918=_0x4033,_0x5afd26=_0x4c43db();while(!![]){try{const _0x54a732=-parseInt(_0x172918(0xda))/0x1*(parseInt(_0x172918(0x78))/0x2)+-parseInt(_0x172918(0xa0))/0x3*(parseInt(_0x172918(0xd9))/0x4)+parseInt(_0x172918(0xc1))/0x5*(-parseInt(_0x172918(0xd0))/0x6)+-parseInt(_0x172918(0xc8))/0x7+parseInt(_0x172918(0xb3))/0x8+parseInt(_0x172918(0xd3))/0x9+parseInt(_0x172918(0x79))/0xa*(parseInt(_0x172918(0x9f))/0xb);if(_0x54a732===_0x27c19c)break;else _0x5afd26['push'](_0x5afd26['shift']());}catch(_0xb23840){_0x5afd26['push'](_0x5afd26['shift']());}}}(_0x535e,0x8d31a));import{UserManagerService as _0x1cf5e4,Inject as _0x14cf19,Injector as _0x24d813,Disposable as _0xec90e7,CustomRangeType as _0x47f2c,UniverInstanceType as _0x20aae0,DependentOn as _0x1454d8,Plugin as _0x3cb1f5,IConfigService as _0x169b36}from'@univerjs/core';import{ThreadCommentModel as _0x38ff1d,IThreadCommentDataSourceService as _0x284139,UniverThreadCommentPlugin as _0x26ed53}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x305e5f,UniverThreadCommentUIPlugin as _0x42822a}from'@univerjs/thread-comment-ui';import{CommentService as _0x1ca978,CollaborationSessionService as _0x395e50,UniverCollaborationClientPlugin as _0x1da917}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e5300}from'@univerjs-pro/license';function _0x535e(){const _0x55f215=['addUser','Delete','onReady','user','symbol','Solve','COMMENT','format','8029056OgkoWZ','stringify','Edit','getThread','addComment','requireSession','_threadCommentModel','threadId','_initDataSource','rangeType','replyId','thread-comment-data-source.config','replies','resolveComment','16495gmTpSC','userId','_sessionService','/add','://','rangeId','forEach','6235908BLUgvR','YYYY/MM/DD\x20HH:mm','/reply','_httpService','unit','name','parse','syncUpdateMutationToColla','1470zwgRMV','Reply','add','1298214iKCsDd','content','personId','get','body','/universer-api/comment/unit/','48wiqyLd','20nzBfSD','getOwnPropertyDescriptor','slice','code','host','getMemberID','setConfig','/list','href','comment','map','size','resolved','http','customRanges','commentUpdate$','_userService','Add','delete','unitId','_config','51586tJzBon','21925630ppPeCI','reply','location','getComment','_threadCommentMentionDataService','_init','payload','deleteComment','solved','dataSource','getMentions','https:','parentId','subject','type','_initUserSync','_configService','post','onStarting','createTimestamp','length','disposeWithMe','error','pluginName','_injector','users','/universer-api/authz/collaborator','_threadCommentMentionDataSource','values','saveCommentToSnapshot','_threadCommentDataSourceService','updateComment','UNIVER_UNKNOWN','listComments','defineProperty','Solved','userID','UNRECOGNIZED','11PuhvwO','136788VattnK','protocol','/universer-api/user/list','/edit','filter','Unknown','searchParams','/delete','_commentService','OpenOrReOpen','ref'];_0x535e=function(){return _0x55f215;};return _0x535e();}import{bufferTime as _0x1e84af}from'rxjs';import{HTTPService as _0x4450ff}from'@univerjs/network';import _0x163441 from'dayjs';const Q='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var v=(_0x4507c9=>(_0x4507c9[_0x4507c9[_0x3c7d0d(0xa9)]=0x0]='OpenOrReOpen',_0x4507c9[_0x4507c9[_0x3c7d0d(0x9c)]=0x1]=_0x3c7d0d(0x9c),_0x4507c9[_0x4507c9['UNRECOGNIZED']=-0x1]=_0x3c7d0d(0x9e),_0x4507c9))(v||{}),p=(_0xea9812=>(_0xea9812[_0xea9812[_0x3c7d0d(0xa5)]=0x0]=_0x3c7d0d(0xa5),_0xea9812[_0xea9812[_0x3c7d0d(0xeb)]=0x1]=_0x3c7d0d(0xeb),_0xea9812[_0xea9812[_0x3c7d0d(0xd1)]=0x2]=_0x3c7d0d(0xd1),_0xea9812[_0xea9812[_0x3c7d0d(0xb5)]=0x3]=_0x3c7d0d(0xb5),_0xea9812[_0xea9812[_0x3c7d0d(0xac)]=0x4]=_0x3c7d0d(0xac),_0xea9812[_0xea9812['Solve']=0x5]=_0x3c7d0d(0xb0),_0xea9812[_0xea9812['UNRECOGNIZED']=-0x1]=_0x3c7d0d(0x9e),_0xea9812))(p||{});const w=_0x1fd124=>_0x163441(new Date(+_0x1fd124))[_0x3c7d0d(0xb2)](_0x3c7d0d(0xc9)),X=async(_0x3b9345,_0x44c7c5)=>{const _0x1af994=_0x3c7d0d,_0x262671=_0x3b9345[_0x1af994(0xd6)](_0x1cf5e4),_0x41f3ad=_0x3b9345[_0x1af994(0xd6)](_0x4450ff);_0x44c7c5[_0x1af994(0xc7)](_0x529199=>{const _0x2b1a7c=_0x1af994;_0x262671['getUser'](_0x529199)&&_0x44c7c5[_0x2b1a7c(0xec)](_0x529199);}),_0x44c7c5[_0x1af994(0xe5)]&&(await _0x41f3ad[_0x1af994(0xd6)](_0x1af994(0xa2),{'params':{'userIDs':[..._0x44c7c5]}}))[_0x1af994(0xd7)][_0x1af994(0x92)][_0x1af994(0xc7)](_0x3ae067=>{const _0x40f4ca=_0x1af994;_0x3ae067&&_0x262671[_0x40f4ca(0xab)](_0x3ae067);});};var k=Object[_0x3c7d0d(0x9b)],ee=Object[_0x3c7d0d(0xdb)],re=(_0x50f283,_0x4056b7,_0x1e501d,_0x2e15e9)=>{const _0x374f72=_0x3c7d0d;for(var _0x1e851c=_0x2e15e9>0x1?void 0x0:_0x2e15e9?ee(_0x4056b7,_0x1e501d):_0x4056b7,_0x2fbc2e=_0x50f283[_0x374f72(0x8d)]-0x1,_0x2138e5;_0x2fbc2e>=0x0;_0x2fbc2e--)(_0x2138e5=_0x50f283[_0x2fbc2e])&&(_0x1e851c=(_0x2e15e9?_0x2138e5(_0x4056b7,_0x1e501d,_0x1e851c):_0x2138e5(_0x1e851c))||_0x1e851c);return _0x2e15e9&&_0x1e851c&&k(_0x4056b7,_0x1e501d,_0x1e851c),_0x1e851c;},_=(_0x33816a,_0x14636c)=>(_0x396ebd,_0x5cc9f3)=>_0x14636c(_0x396ebd,_0x5cc9f3,_0x33816a);let S=class extends _0xec90e7{constructor(_0x43bbcb,_0x121ffe,_0x21fa48,_0x26f65d){const _0x590fd8=_0x3c7d0d;super(),this[_0x590fd8(0xa8)]=_0x43bbcb,this[_0x590fd8(0xb9)]=_0x121ffe,this[_0x590fd8(0xea)]=_0x21fa48,this[_0x590fd8(0x91)]=_0x26f65d,this['_init'](),this['_initUserSync']();}[_0x3c7d0d(0x88)](){const _0x981630=_0x3c7d0d;this[_0x981630(0x8e)](this[_0x981630(0xb9)][_0x981630(0xe9)]['pipe'](_0x1e84af(0x10))['subscribe'](_0x521a1e=>{const _0x21bf1c=_0x981630,_0x2575dd=new Set();_0x521a1e['forEach'](_0x498bc0=>{const _0x4c652e=_0x4033;switch(_0x498bc0[_0x4c652e(0x87)]){case _0x4c652e(0xd2):{const _0x3e3df3=_0x498bc0[_0x4c652e(0x7f)][_0x4c652e(0xd5)];_0x2575dd[_0x4c652e(0xd2)](_0x3e3df3);break;}}}),X(this[_0x21bf1c(0x91)],_0x2575dd);}));}[_0x3c7d0d(0x7e)](){const _0x457d32=_0x3c7d0d;this['disposeWithMe'](this[_0x457d32(0xa8)][_0x457d32(0xe9)]['subscribe'](async _0x2e1f82=>{const _0x302d22=_0x457d32;var _0x343225,_0x11ad17;const _0x1d1db1=this[_0x302d22(0xb9)]['getThread'](_0x2e1f82[_0x302d22(0xed)],_0x2e1f82[_0x302d22(0xba)]);if(!_0x1d1db1)return;const {unitId:_0x3ed4f6,subUnitId:_0x1a60ed}=_0x1d1db1;switch(_0x2e1f82[_0x302d22(0xae)]&&this[_0x302d22(0xea)][_0x302d22(0xab)](_0x2e1f82[_0x302d22(0xae)]),_0x2e1f82[_0x302d22(0x87)]){case p[_0x302d22(0xeb)]:break;case p['Reply']:{this[_0x302d22(0xb9)][_0x302d22(0xb7)](_0x3ed4f6,_0x1a60ed,{'unitId':_0x3ed4f6,'subUnitId':_0x1a60ed,'ref':'','id':_0x2e1f82[_0x302d22(0xbd)],'dT':w(+_0x2e1f82['createTimestamp']),'threadId':_0x2e1f82[_0x302d22(0xba)],'personId':(_0x11ad17=(_0x343225=_0x2e1f82[_0x302d22(0xae)])==null?void 0x0:_0x343225[_0x302d22(0x9d)])!=null?_0x11ad17:_0x2e1f82['userId'],'text':JSON['parse'](_0x2e1f82[_0x302d22(0xd4)]),'parentId':_0x1d1db1['id']});break;}case p[_0x302d22(0xac)]:{const _0x5f473c=this[_0x302d22(0xb9)][_0x302d22(0x7c)](_0x3ed4f6,_0x1a60ed,_0x2e1f82['replyId']);_0x5f473c&&_0x5f473c[_0x302d22(0x85)]&&this['_threadCommentModel'][_0x302d22(0x80)](_0x3ed4f6,_0x1a60ed,_0x2e1f82[_0x302d22(0xbd)]);break;}case p[_0x302d22(0xb5)]:{this[_0x302d22(0xb9)][_0x302d22(0x98)](_0x3ed4f6,_0x1a60ed,{'commentId':_0x2e1f82[_0x302d22(0xbd)],'text':JSON[_0x302d22(0xce)](_0x2e1f82['content'])});break;}case p['Solve']:{const _0x56c54e=this[_0x302d22(0xb9)][_0x302d22(0xb6)](_0x3ed4f6,_0x2e1f82[_0x302d22(0xba)]);_0x56c54e&&this[_0x302d22(0xb9)][_0x302d22(0xc0)](_0x3ed4f6,_0x1a60ed,_0x56c54e['id'],_0x2e1f82[_0x302d22(0x81)]===v[_0x302d22(0x9c)]);break;}}}));}};S=re([_(0x0,_0x14cf19(_0x1ca978)),_(0x1,_0x14cf19(_0x38ff1d)),_(0x2,_0x14cf19(_0x1cf5e4)),_(0x3,_0x14cf19(_0x24d813))],S);function _0x4033(_0x2d2d0f,_0x5851d6){const _0x535e51=_0x535e();return _0x4033=function(_0x403310,_0x5b5416){_0x403310=_0x403310-0x77;let _0x6759f0=_0x535e51[_0x403310];return _0x6759f0;},_0x4033(_0x2d2d0f,_0x5851d6);}const te=_0x3c7d0d(0xbe),se={};var oe=Object['defineProperty'],ne=Object[_0x3c7d0d(0xdb)],ie=(_0x2d88f8,_0x56ed48,_0x3f389a,_0x1188c7)=>{for(var _0x58105e=_0x1188c7>0x1?void 0x0:_0x1188c7?ne(_0x56ed48,_0x3f389a):_0x56ed48,_0x4dffaa=_0x2d88f8['length']-0x1,_0x593595;_0x4dffaa>=0x0;_0x4dffaa--)(_0x593595=_0x2d88f8[_0x4dffaa])&&(_0x58105e=(_0x1188c7?_0x593595(_0x56ed48,_0x3f389a,_0x58105e):_0x593595(_0x58105e))||_0x58105e);return _0x1188c7&&_0x58105e&&oe(_0x56ed48,_0x3f389a,_0x58105e),_0x58105e;},I=(_0x284b09,_0x1624c9)=>(_0x41229e,_0x2327da)=>_0x1624c9(_0x41229e,_0x2327da,_0x284b09);function ae(_0x49c0da,_0x5f521e){const _0x30e486=_0x3c7d0d,_0x4e81fb=_0x49c0da['replies'][0x0];return{..._0x5f521e,'id':_0x4e81fb[_0x30e486(0xbd)],'resolved':_0x49c0da[_0x30e486(0x81)]===0x1,'dT':w(_0x4e81fb[_0x30e486(0x8c)]),'personId':_0x4e81fb['userId'],'threadId':_0x4e81fb[_0x30e486(0xba)]};}function ce(_0x1a69d9,_0x51439f,_0x85dc4c){const _0x3f2bf0=_0x3c7d0d;var _0x251c0b,_0x168fb0;if(((_0x168fb0=(_0x251c0b=_0x1a69d9==null?void 0x0:_0x1a69d9[_0x3f2bf0(0xbf)])==null?void 0x0:_0x251c0b[_0x3f2bf0(0x8d)])!=null?_0x168fb0:0x0)>0x0){const _0x1d66d0=(_0x3d7e23,_0x1aafbe)=>({'id':_0x3d7e23[_0x3f2bf0(0xbd)],'threadId':_0x3d7e23[_0x3f2bf0(0xba)],'dT':w(_0x3d7e23[_0x3f2bf0(0x8c)]),'personId':_0x3d7e23[_0x3f2bf0(0xc2)],'resolved':_0x1a69d9[_0x3f2bf0(0x81)]===v[_0x3f2bf0(0x9c)],'unitId':_0x51439f,'subUnitId':_0x85dc4c,'text':JSON[_0x3f2bf0(0xce)](_0x3d7e23[_0x3f2bf0(0xd4)]),'parentId':_0x1aafbe}),_0x1d4192=_0x1d66d0(_0x1a69d9[_0x3f2bf0(0xbf)][0x0]);return{..._0x1d4192,'children':_0x1a69d9[_0x3f2bf0(0xbf)][_0x3f2bf0(0xdc)](0x1)[_0x3f2bf0(0xe4)](_0x2791af=>_0x1d66d0(_0x2791af,_0x1d4192['id']))};}return null;}let b=class{constructor(_0xc8e280,_0x5759ed,_0x453c8,_0x28fd1c){const _0x1fb3db=_0x3c7d0d;this[_0x1fb3db(0xcb)]=_0xc8e280,this['_userService']=_0x5759ed,this['_sessionService']=_0x453c8,this[_0x1fb3db(0x91)]=_0x28fd1c;}async['addComment'](_0x33d608){const _0x92e2a=_0x3c7d0d;var _0x134da5,_0x4a8c31;const {parentId:_0x35c963,unitId:_0x5a288d,text:_0x38e37f,threadId:_0x5bced9}=_0x33d608,_0x4ac581=(_0x4a8c31=(_0x134da5=_0x38e37f['customRanges'])==null?void 0x0:_0x134da5[_0x92e2a(0xa4)](_0x1f3c53=>_0x1f3c53['rangeType']===_0x47f2c['COMMENT'])['map'](_0x1567cc=>_0x1567cc[_0x92e2a(0xc6)]))!=null?_0x4a8c31:[],_0x2548e1=JSON[_0x92e2a(0xb4)](_0x38e37f),_0x484db9=(await this[_0x92e2a(0xc3)][_0x92e2a(0xb8)](_0x5a288d))[_0x92e2a(0xdf)]();if(_0x35c963){const _0x2ca366={'memberId':_0x484db9,'unitId':_0x5a288d,'content':_0x2548e1,'mention':_0x4ac581,'threadId':_0x5bced9},_0x568336=(await this[_0x92e2a(0xcb)][_0x92e2a(0x8a)]('/universer-api/comment/unit/'+_0x5a288d+_0x92e2a(0xca),{'body':_0x2ca366}))[_0x92e2a(0xd7)][_0x92e2a(0x7a)];return{..._0x33d608,'id':_0x568336[_0x92e2a(0xbd)],'dT':_0x163441(+_0x568336['createTimestamp'])[_0x92e2a(0xb2)](_0x92e2a(0xc9)),'personId':_0x568336['userId']};}else{const _0x2b1fdd={'memberId':_0x484db9,'unitId':_0x5a288d,'content':_0x2548e1,'mention':_0x4ac581},_0x6ebdf9=await this[_0x92e2a(0xcb)][_0x92e2a(0x8a)](_0x92e2a(0xd8)+_0x5a288d+_0x92e2a(0xc4),{'body':_0x2b1fdd});return ae(_0x6ebdf9[_0x92e2a(0xd7)][_0x92e2a(0xe3)],_0x33d608);}}async[_0x3c7d0d(0x98)](_0x588dd0){const _0x311728=_0x3c7d0d;var _0x36077f,_0x58fa7f;const {text:_0x543d70,unitId:_0x449b56}=_0x588dd0,_0x246d91=(_0x58fa7f=(_0x36077f=_0x543d70[_0x311728(0xe8)])==null?void 0x0:_0x36077f[_0x311728(0xa4)](_0x33ad56=>_0x33ad56[_0x311728(0xbc)]===_0x47f2c[_0x311728(0xb1)])[_0x311728(0xe4)](_0x29dfa6=>_0x29dfa6[_0x311728(0xc6)]))!=null?_0x58fa7f:[],_0x5dbe84=JSON[_0x311728(0xb4)](_0x543d70),_0x442333=_0x588dd0[_0x311728(0xba)],_0x276ff1=_0x588dd0['id'],_0x2a8256={'memberId':(await this[_0x311728(0xc3)][_0x311728(0xb8)](_0x449b56))['getMemberID'](),'unitId':_0x449b56,'threadId':_0x442333,'mention':_0x246d91,'content':_0x5dbe84,'replyId':_0x276ff1},_0x2bb556=await this['_httpService']['post'](_0x311728(0xd8)+_0x449b56+_0x311728(0xa3),{'body':_0x2a8256});return!_0x2bb556[_0x311728(0xd7)][_0x311728(0x8f)]||_0x2bb556[_0x311728(0xd7)][_0x311728(0x8f)][_0x311728(0xdd)]===0x1;}async[_0x3c7d0d(0xc0)](_0x352013){const _0x4d310e=_0x3c7d0d,{unitId:_0x36768b}=_0x352013,_0x3baf7d=_0x352013[_0x4d310e(0xba)],_0x56a0ed={'memberId':this[_0x4d310e(0xea)]['getCurrentUser']()[_0x4d310e(0x9d)],'unitId':_0x36768b,'threadId':_0x3baf7d,'solved':_0x352013[_0x4d310e(0xe6)]?v[_0x4d310e(0x9c)]:v['OpenOrReOpen']},_0x919ddd=await this[_0x4d310e(0xcb)]['post'](_0x4d310e(0xd8)+_0x36768b+'/solved',{'body':_0x56a0ed});return!_0x919ddd[_0x4d310e(0xd7)][_0x4d310e(0x8f)]||_0x919ddd[_0x4d310e(0xd7)][_0x4d310e(0x8f)][_0x4d310e(0xdd)]===0x1;}async[_0x3c7d0d(0x80)](_0xa3d568,_0x595fdf,_0x7f44b4,_0x443ef5){const _0x1e8369=_0x3c7d0d,_0x41f098={'memberId':(await this[_0x1e8369(0xc3)]['requireSession'](_0xa3d568))['getMemberID'](),'threadId':_0x7f44b4,'replyId':_0x443ef5,'unitId':_0xa3d568},_0x4fc2f4=await this[_0x1e8369(0xcb)][_0x1e8369(0x8a)](_0x1e8369(0xd8)+_0xa3d568+_0x1e8369(0xa7),{'body':_0x41f098});return!_0x4fc2f4[_0x1e8369(0xd7)][_0x1e8369(0x8f)]||_0x4fc2f4[_0x1e8369(0xd7)]['error'][_0x1e8369(0xdd)]===0x1;}async[_0x3c7d0d(0x9a)](_0x50f703,_0x3dd040,_0x6ce7e){const _0x7f9742=_0x3c7d0d,_0x50e5ce={'unitId':_0x50f703,'threadId':_0x6ce7e},_0x10e58e=await this[_0x7f9742(0xcb)][_0x7f9742(0x8a)](_0x7f9742(0xd8)+_0x50f703+_0x7f9742(0xe1),{'body':_0x50e5ce}),_0x408b83=_0x6ce7e[_0x7f9742(0xe4)](_0x13782b=>ce(_0x10e58e[_0x7f9742(0xd7)]['comments'][_0x13782b],_0x50f703,_0x3dd040))['filter'](Boolean);return Object[_0x7f9742(0x95)](_0x10e58e['body'][_0x7f9742(0x92)])[_0x7f9742(0xc7)](_0x37ecc6=>{const _0x205cb9=_0x7f9742;this[_0x205cb9(0xea)][_0x205cb9(0xab)](_0x37ecc6);}),_0x408b83;}[_0x3c7d0d(0x96)](_0x2eb25e){const _0x2f698d=_0x3c7d0d;return{'id':_0x2eb25e['id'],'threadId':_0x2eb25e[_0x2f698d(0xba)],'ref':_0x2eb25e[_0x2f698d(0xaa)]};}};b=ie([I(0x0,_0x14cf19(_0x4450ff)),I(0x1,_0x14cf19(_0x1cf5e4)),I(0x2,_0x14cf19(_0x395e50)),I(0x3,_0x14cf19(_0x24d813))],b);var de=Object['defineProperty'],me=Object[_0x3c7d0d(0xdb)],le=(_0x23569c,_0x578c29,_0x4e34a5,_0x3fd6d5)=>{const _0x426cf6=_0x3c7d0d;for(var _0x3f2e7c=_0x3fd6d5>0x1?void 0x0:_0x3fd6d5?me(_0x578c29,_0x4e34a5):_0x578c29,_0x19a767=_0x23569c[_0x426cf6(0x8d)]-0x1,_0x2803ce;_0x19a767>=0x0;_0x19a767--)(_0x2803ce=_0x23569c[_0x19a767])&&(_0x3f2e7c=(_0x3fd6d5?_0x2803ce(_0x578c29,_0x4e34a5,_0x3f2e7c):_0x2803ce(_0x3f2e7c))||_0x3f2e7c);return _0x3fd6d5&&_0x3f2e7c&&de(_0x578c29,_0x4e34a5,_0x3f2e7c),_0x3f2e7c;},he=(_0x154e27,_0x45fe18)=>(_0x271b6f,_0x384c0b)=>_0x45fe18(_0x271b6f,_0x384c0b,_0x154e27);let D=class{constructor(_0x395d48){this['_httpService']=_0x395d48;}async[_0x3c7d0d(0x83)](_0x5e6ffc,_0x5c69c4,_0x5de8b3){const _0x53bc3b=_0x3c7d0d,_0x430500=new URL(window[_0x53bc3b(0x7b)][_0x53bc3b(0xe2)])[_0x53bc3b(0xa6)][_0x53bc3b(0xd6)](_0x53bc3b(0xcc));if(!_0x430500)return[];const _0x3291ed=window[_0x53bc3b(0x7b)][_0x53bc3b(0xde)],_0x35cefc=window['location'][_0x53bc3b(0xa1)]===_0x53bc3b(0x84)?'https':_0x53bc3b(0xe7);return(await this[_0x53bc3b(0xcb)][_0x53bc3b(0xd6)](_0x35cefc+_0x53bc3b(0xc5)+_0x3291ed+_0x53bc3b(0x93),{'params':{'objectID':_0x430500,'unitID':_0x430500}}))[_0x53bc3b(0xd7)]['collaborators']['map'](_0x2bcdf9=>{const _0x5eb306=_0x53bc3b;var _0x47fe67,_0x28b112,_0x49ce4d,_0x3670f8,_0x35181e,_0x2bd3bd;return{'id':(_0x28b112=(_0x47fe67=_0x2bcdf9[_0x5eb306(0x86)])==null?void 0x0:_0x47fe67[_0x5eb306(0x9d)])!=null?_0x28b112:'','label':(_0x3670f8=(_0x49ce4d=_0x2bcdf9[_0x5eb306(0x86)])==null?void 0x0:_0x49ce4d[_0x5eb306(0xcd)])!=null?_0x3670f8:'','icon':(_0x2bd3bd=(_0x35181e=_0x2bcdf9[_0x5eb306(0x86)])==null?void 0x0:_0x35181e['avatar'])!=null?_0x2bd3bd:'','type':'user'};});}};D=le([he(0x0,_0x14cf19(_0x4450ff))],D);var ue=Object[_0x3c7d0d(0x9b)],pe=Object[_0x3c7d0d(0xdb)],ve=(_0x415f16,_0x2da5fe,_0x38d747,_0x2f2b8c)=>{for(var _0x274200=_0x2f2b8c>0x1?void 0x0:_0x2f2b8c?pe(_0x2da5fe,_0x38d747):_0x2da5fe,_0x2a3345=_0x415f16['length']-0x1,_0x4efc3b;_0x2a3345>=0x0;_0x2a3345--)(_0x4efc3b=_0x415f16[_0x2a3345])&&(_0x274200=(_0x2f2b8c?_0x4efc3b(_0x2da5fe,_0x38d747,_0x274200):_0x4efc3b(_0x274200))||_0x274200);return _0x2f2b8c&&_0x274200&&ue(_0x2da5fe,_0x38d747,_0x274200),_0x274200;},f=(_0x185692,_0x34035b)=>(_0x51ede4,_0xf795bb)=>_0x34035b(_0x51ede4,_0xf795bb,_0x185692);let C=class extends _0xec90e7{constructor(_0x1b961c,_0x3f2926,_0x3d0a9f,_0x3549df){const _0x36432c=_0x3c7d0d;super(),this['_threadCommentDataSourceService']=_0x1b961c,this['_threadCommentDataSource']=_0x3f2926,this[_0x36432c(0x7d)]=_0x3d0a9f,this[_0x36432c(0x94)]=_0x3549df,this[_0x36432c(0xbb)]();}['_initDataSource'](){const _0x1b4608=_0x3c7d0d;this[_0x1b4608(0x97)]['dataSource']=this['_threadCommentDataSource'],this[_0x1b4608(0x97)][_0x1b4608(0xcf)]=!0x1,this['_threadCommentMentionDataService'][_0x1b4608(0x82)]=this[_0x1b4608(0x94)];}};C=ve([f(0x0,_0x284139),f(0x1,_0x14cf19(b)),f(0x2,_0x305e5f),f(0x3,_0x14cf19(D))],C);var E=Object[_0x3c7d0d(0x9b)],_e=Object[_0x3c7d0d(0xdb)],Ie=(_0x4b38a6,_0x319871,_0x76990c)=>_0x319871 in _0x4b38a6?E(_0x4b38a6,_0x319871,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x76990c}):_0x4b38a6[_0x319871]=_0x76990c,fe=(_0xec73b1,_0x59f518,_0x3c11db,_0x58ecfd)=>{const _0x1af15a=_0x3c7d0d;for(var _0x2b574f=_0x58ecfd>0x1?void 0x0:_0x58ecfd?_e(_0x59f518,_0x3c11db):_0x59f518,_0x128593=_0xec73b1[_0x1af15a(0x8d)]-0x1,_0x7ea948;_0x128593>=0x0;_0x128593--)(_0x7ea948=_0xec73b1[_0x128593])&&(_0x2b574f=(_0x58ecfd?_0x7ea948(_0x59f518,_0x3c11db,_0x2b574f):_0x7ea948(_0x2b574f))||_0x2b574f);return _0x58ecfd&&_0x2b574f&&E(_0x59f518,_0x3c11db,_0x2b574f),_0x2b574f;},T=(_0x5e06c3,_0x326eb1)=>(_0x520dab,_0x8ce339)=>_0x326eb1(_0x520dab,_0x8ce339,_0x5e06c3),x=(_0x323c0c,_0x167c18,_0x4ab8b1)=>Ie(_0x323c0c,typeof _0x167c18!=_0x3c7d0d(0xaf)?_0x167c18+'':_0x167c18,_0x4ab8b1);let g=class extends _0x3cb1f5{constructor(_0x481490=se,_0x5d6aa8,_0x32521c){const _0x7d4bc9=_0x3c7d0d;super(),this['_config']=_0x481490,this[_0x7d4bc9(0x91)]=_0x5d6aa8,this[_0x7d4bc9(0x89)]=_0x32521c;const {..._0x5816c8}=this[_0x7d4bc9(0x77)];this[_0x7d4bc9(0x89)][_0x7d4bc9(0xe0)](te,_0x5816c8);}[_0x3c7d0d(0x8b)](){const _0x2168c4=_0x3c7d0d;[[D],[b],[C],[S]][_0x2168c4(0xc7)](_0x1c066e=>{const _0x4158b8=_0x2168c4;this['_injector'][_0x4158b8(0xd2)](_0x1c066e);}),this[_0x2168c4(0x91)]['get'](C);}[_0x3c7d0d(0xad)](){this['_injector']['get'](S);}};x(g,_0x3c7d0d(0x90),Q),x(g,_0x3c7d0d(0x87),_0x20aae0[_0x3c7d0d(0x99)]),g=fe([_0x1454d8(_0x26ed53,_0x42822a,_0x1da917,_0x1e5300),T(0x1,_0x14cf19(_0x24d813)),T(0x2,_0x169b36)],g);export{g as UniverThreadCommentDataSourcePlugin};
@@ -1,6 +1,6 @@
1
1
  import { Disposable, Injector, UserManagerService } from '@univerjs/core';
2
- import { CommentService } from '@univerjs-pro/collaboration-client';
3
2
  import { ThreadCommentModel } from '@univerjs/thread-comment';
3
+ import { CommentService } from '@univerjs-pro/collaboration-client';
4
4
  export declare class ThreadCommentCollaUpdateController extends Disposable {
5
5
  private readonly _commentService;
6
6
  private readonly _threadCommentModel;
@@ -8,4 +8,5 @@ export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
8
8
  static type: UniverInstanceType;
9
9
  constructor(_config: IUniverThreadCommentDataSourceConfig | undefined, _injector: Injector, _configService: IConfigService);
10
10
  onStarting(): void;
11
+ onReady(): void;
11
12
  }
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1bb5f8,_0x19a20){const _0x14c87e=_0x446f,_0x620467=_0x1bb5f8();while(!![]){try{const _0x416bee=parseInt(_0x14c87e(0x204))/0x1*(-parseInt(_0x14c87e(0x1fe))/0x2)+parseInt(_0x14c87e(0x205))/0x3*(-parseInt(_0x14c87e(0x1fc))/0x4)+-parseInt(_0x14c87e(0x262))/0x5*(parseInt(_0x14c87e(0x1f2))/0x6)+parseInt(_0x14c87e(0x277))/0x7*(parseInt(_0x14c87e(0x20e))/0x8)+parseInt(_0x14c87e(0x1e4))/0x9+parseInt(_0x14c87e(0x1fa))/0xa*(-parseInt(_0x14c87e(0x235))/0xb)+parseInt(_0x14c87e(0x25d))/0xc*(parseInt(_0x14c87e(0x274))/0xd);if(_0x416bee===_0x19a20)break;else _0x620467['push'](_0x620467['shift']());}catch(_0x24a2b1){_0x620467['push'](_0x620467['shift']());}}}(_0x5f4c,0xd392a),function(_0x3087df,_0x2f3fdb){const _0x3472b4=_0x446f;typeof exports==_0x3472b4(0x200)&&typeof module<'u'?_0x2f3fdb(exports,require('@univerjs/core'),require(_0x3472b4(0x276)),require(_0x3472b4(0x21c)),require(_0x3472b4(0x1e0)),require(_0x3472b4(0x228)),require(_0x3472b4(0x1fd)),require(_0x3472b4(0x24a)),require(_0x3472b4(0x208))):typeof define==_0x3472b4(0x227)&&define[_0x3472b4(0x272)]?define([_0x3472b4(0x24f),_0x3472b4(0x1da),'@univerjs/thread-comment',_0x3472b4(0x21c),'@univerjs-pro/collaboration-client',_0x3472b4(0x228),'rxjs',_0x3472b4(0x24a),_0x3472b4(0x208)],_0x2f3fdb):(_0x3087df=typeof globalThis<'u'?globalThis:_0x3087df||self,_0x2f3fdb(_0x3087df[_0x3472b4(0x266)]={},_0x3087df[_0x3472b4(0x214)],_0x3087df['UniverThreadComment'],_0x3087df['UniverThreadCommentUi'],_0x3087df[_0x3472b4(0x25f)],_0x3087df[_0x3472b4(0x23d)],_0x3087df[_0x3472b4(0x1fd)],_0x3087df[_0x3472b4(0x26d)],_0x3087df[_0x3472b4(0x208)]));}(this,function(_0x23913f,_0x1f1c49,_0x38c0aa,_0x51f704,_0x4bcc22,_0x51dae8,_0x183ed6,_0x14cb20,_0x213cd8){'use strict';const _0x4e97d0=_0x446f;const _0x590b02=_0x4e97d0(0x256);var _0x1ebf77=(_0x1351b0=>(_0x1351b0[_0x1351b0['OpenOrReOpen']=0x0]=_0x4e97d0(0x203),_0x1351b0[_0x1351b0[_0x4e97d0(0x21d)]=0x1]='Solved',_0x1351b0[_0x1351b0[_0x4e97d0(0x1f8)]=-0x1]=_0x4e97d0(0x1f8),_0x1351b0))(_0x1ebf77||{}),_0x3ceb4d=(_0x2c0295=>(_0x2c0295[_0x2c0295[_0x4e97d0(0x273)]=0x0]=_0x4e97d0(0x273),_0x2c0295[_0x2c0295[_0x4e97d0(0x253)]=0x1]=_0x4e97d0(0x253),_0x2c0295[_0x2c0295['Reply']=0x2]=_0x4e97d0(0x1f1),_0x2c0295[_0x2c0295[_0x4e97d0(0x210)]=0x3]='Edit',_0x2c0295[_0x2c0295[_0x4e97d0(0x207)]=0x4]=_0x4e97d0(0x207),_0x2c0295[_0x2c0295['Solve']=0x5]=_0x4e97d0(0x22e),_0x2c0295[_0x2c0295[_0x4e97d0(0x1f8)]=-0x1]='UNRECOGNIZED',_0x2c0295))(_0x3ceb4d||{});const _0x18751e=_0x42516b=>_0x213cd8(new Date(+_0x42516b))[_0x4e97d0(0x209)](_0x4e97d0(0x26b)),_0xe9c00c=async(_0x425aa2,_0x29faa4)=>{const _0x342bb7=_0x4e97d0,_0xe3825e=_0x425aa2[_0x342bb7(0x222)](_0x1f1c49['UserManagerService']),_0x190826=_0x425aa2[_0x342bb7(0x222)](_0x14cb20['HTTPService']);_0x29faa4['forEach'](_0x1240c9=>{const _0x1ffcb0=_0x342bb7;_0xe3825e[_0x1ffcb0(0x1e6)](_0x1240c9)&&_0x29faa4[_0x1ffcb0(0x23a)](_0x1240c9);}),_0x29faa4[_0x342bb7(0x247)]&&(await _0x190826[_0x342bb7(0x222)]('/universer-api/user/list',{'params':{'userIDs':[..._0x29faa4]}}))[_0x342bb7(0x24b)]['users']['forEach'](_0x3d27da=>{const _0x39a912=_0x342bb7;_0x3d27da&&_0xe3825e[_0x39a912(0x20b)](_0x3d27da);});};var _0x2694bb=Object[_0x4e97d0(0x219)],_0x1ca3c9=Object['getOwnPropertyDescriptor'],_0x4aa036=(_0x3de60b,_0x37de7b,_0x7d4252,_0x327950)=>{const _0x2c237f=_0x4e97d0;for(var _0x371938=_0x327950>0x1?void 0x0:_0x327950?_0x1ca3c9(_0x37de7b,_0x7d4252):_0x37de7b,_0x1a33c7=_0x3de60b[_0x2c237f(0x22a)]-0x1,_0x47e0fc;_0x1a33c7>=0x0;_0x1a33c7--)(_0x47e0fc=_0x3de60b[_0x1a33c7])&&(_0x371938=(_0x327950?_0x47e0fc(_0x37de7b,_0x7d4252,_0x371938):_0x47e0fc(_0x371938))||_0x371938);return _0x327950&&_0x371938&&_0x2694bb(_0x37de7b,_0x7d4252,_0x371938),_0x371938;},_0x5cfea8=(_0x53b4db,_0x4a4d55)=>(_0x136f4c,_0x4854a2)=>_0x4a4d55(_0x136f4c,_0x4854a2,_0x53b4db);let _0x1691cb=class extends _0x1f1c49[_0x4e97d0(0x220)]{constructor(_0x5d86aa,_0x29cc08,_0x30090c,_0x4c867d){const _0x18f2c5=_0x4e97d0;super(),this[_0x18f2c5(0x212)]=_0x5d86aa,this[_0x18f2c5(0x271)]=_0x29cc08,this[_0x18f2c5(0x20f)]=_0x30090c,this[_0x18f2c5(0x248)]=_0x4c867d,this[_0x18f2c5(0x23e)](),this[_0x18f2c5(0x1de)]();}[_0x4e97d0(0x1de)](){const _0x2a8d20=_0x4e97d0;this[_0x2a8d20(0x234)](this['_threadCommentModel']['commentUpdate$'][_0x2a8d20(0x249)](_0x183ed6[_0x2a8d20(0x1dd)](0x10))[_0x2a8d20(0x237)](_0x464d71=>{const _0x48bf6e=_0x2a8d20,_0x430248=new Set();_0x464d71[_0x48bf6e(0x22c)](_0xd0262c=>{const _0x5b6292=_0x48bf6e;switch(_0xd0262c[_0x5b6292(0x1ee)]){case _0x5b6292(0x26e):{const _0x32b7dc=_0xd0262c[_0x5b6292(0x1f5)][_0x5b6292(0x246)];_0x430248[_0x5b6292(0x26e)](_0x32b7dc);break;}}}),_0xe9c00c(this[_0x48bf6e(0x248)],_0x430248);}));}[_0x4e97d0(0x23e)](){const _0x532ab9=_0x4e97d0;this[_0x532ab9(0x234)](this[_0x532ab9(0x212)][_0x532ab9(0x20a)][_0x532ab9(0x237)](async _0x467b66=>{const _0xec9fb1=_0x532ab9;var _0x5540da,_0x3aadde;const _0x5b5815=this[_0xec9fb1(0x271)][_0xec9fb1(0x258)](_0x467b66[_0xec9fb1(0x1df)],_0x467b66[_0xec9fb1(0x1f6)]);if(!_0x5b5815)return;const {unitId:_0x940b98,subUnitId:_0x4a1291}=_0x5b5815;switch(_0x467b66[_0xec9fb1(0x215)]&&this[_0xec9fb1(0x20f)][_0xec9fb1(0x20b)](_0x467b66[_0xec9fb1(0x215)]),_0x467b66['type']){case _0x3ceb4d[_0xec9fb1(0x253)]:break;case _0x3ceb4d['Reply']:{this[_0xec9fb1(0x271)][_0xec9fb1(0x1e9)](_0x940b98,_0x4a1291,{'unitId':_0x940b98,'subUnitId':_0x4a1291,'ref':'','id':_0x467b66[_0xec9fb1(0x1e8)],'dT':_0x18751e(+_0x467b66['createTimestamp']),'threadId':_0x467b66['threadId'],'personId':(_0x3aadde=(_0x5540da=_0x467b66[_0xec9fb1(0x215)])==null?void 0x0:_0x5540da[_0xec9fb1(0x25c)])!=null?_0x3aadde:_0x467b66[_0xec9fb1(0x1d9)],'text':JSON[_0xec9fb1(0x26c)](_0x467b66[_0xec9fb1(0x267)]),'parentId':_0x5b5815['id']});break;}case _0x3ceb4d['Delete']:{const _0x3707ad=this[_0xec9fb1(0x271)][_0xec9fb1(0x21b)](_0x940b98,_0x4a1291,_0x467b66[_0xec9fb1(0x1e8)]);_0x3707ad&&_0x3707ad[_0xec9fb1(0x224)]&&this[_0xec9fb1(0x271)][_0xec9fb1(0x22b)](_0x940b98,_0x4a1291,_0x467b66['replyId']);break;}case _0x3ceb4d['Edit']:{this['_threadCommentModel'][_0xec9fb1(0x268)](_0x940b98,_0x4a1291,{'commentId':_0x467b66[_0xec9fb1(0x1e8)],'text':JSON['parse'](_0x467b66['content'])});break;}case _0x3ceb4d[_0xec9fb1(0x22e)]:{const _0x2a0ad0=this['_threadCommentModel'][_0xec9fb1(0x258)](_0x940b98,_0x467b66[_0xec9fb1(0x1f6)]);_0x2a0ad0&&this[_0xec9fb1(0x271)]['resolveComment'](_0x940b98,_0x4a1291,_0x2a0ad0['id'],_0x467b66['solved']===_0x1ebf77[_0xec9fb1(0x21d)]);break;}}}));}};_0x1691cb=_0x4aa036([_0x1f1c49[_0x4e97d0(0x1e1)](_0x1f1c49[_0x4e97d0(0x241)]['Ready'],_0x1691cb),_0x5cfea8(0x0,_0x1f1c49['Inject'](_0x4bcc22[_0x4e97d0(0x269)])),_0x5cfea8(0x1,_0x1f1c49[_0x4e97d0(0x261)](_0x38c0aa[_0x4e97d0(0x263)])),_0x5cfea8(0x2,_0x1f1c49[_0x4e97d0(0x261)](_0x1f1c49[_0x4e97d0(0x223)])),_0x5cfea8(0x3,_0x1f1c49[_0x4e97d0(0x261)](_0x1f1c49['Injector']))],_0x1691cb);const _0x22f6e5='thread-comment-data-source.config',_0x1d4229={};var _0x4d1395=Object[_0x4e97d0(0x219)],_0x7a410f=Object[_0x4e97d0(0x250)],_0x3d2c47=(_0x4a2872,_0x42cb89,_0x55f5e4,_0x55ab44)=>{const _0x4252f4=_0x4e97d0;for(var _0xe16fd1=_0x55ab44>0x1?void 0x0:_0x55ab44?_0x7a410f(_0x42cb89,_0x55f5e4):_0x42cb89,_0x99ddd3=_0x4a2872[_0x4252f4(0x22a)]-0x1,_0x406acb;_0x99ddd3>=0x0;_0x99ddd3--)(_0x406acb=_0x4a2872[_0x99ddd3])&&(_0xe16fd1=(_0x55ab44?_0x406acb(_0x42cb89,_0x55f5e4,_0xe16fd1):_0x406acb(_0xe16fd1))||_0xe16fd1);return _0x55ab44&&_0xe16fd1&&_0x4d1395(_0x42cb89,_0x55f5e4,_0xe16fd1),_0xe16fd1;},_0x31bb73=(_0x3faa4f,_0x40ce56)=>(_0x1ed3d4,_0x2a9ba1)=>_0x40ce56(_0x1ed3d4,_0x2a9ba1,_0x3faa4f);function _0x18a81d(_0x5b896f,_0x1126ad){const _0x11e3e4=_0x4e97d0,_0x5a22e1=_0x5b896f[_0x11e3e4(0x221)][0x0];return{..._0x1126ad,'id':_0x5a22e1[_0x11e3e4(0x1e8)],'resolved':_0x5b896f['solved']===0x1,'dT':_0x18751e(_0x5a22e1[_0x11e3e4(0x1ec)]),'personId':_0x5a22e1[_0x11e3e4(0x1d9)],'threadId':_0x5a22e1['threadId']};}function _0x1e5725(_0x36ecf2,_0x240e58,_0x35956a){const _0x560d09=_0x4e97d0;var _0x50cf2f,_0x11dbdc;if(((_0x11dbdc=(_0x50cf2f=_0x36ecf2==null?void 0x0:_0x36ecf2['replies'])==null?void 0x0:_0x50cf2f['length'])!=null?_0x11dbdc:0x0)>0x0){const _0x62c5f2=(_0x54b14f,_0x5c30ad)=>({'id':_0x54b14f[_0x560d09(0x1e8)],'threadId':_0x54b14f['threadId'],'dT':_0x18751e(_0x54b14f[_0x560d09(0x1ec)]),'personId':_0x54b14f[_0x560d09(0x1d9)],'resolved':_0x36ecf2[_0x560d09(0x242)]===_0x1ebf77['Solved'],'unitId':_0x240e58,'subUnitId':_0x35956a,'text':JSON[_0x560d09(0x26c)](_0x54b14f[_0x560d09(0x267)]),'parentId':_0x5c30ad}),_0x2e8e55=_0x62c5f2(_0x36ecf2['replies'][0x0]);return{..._0x2e8e55,'children':_0x36ecf2[_0x560d09(0x221)][_0x560d09(0x216)](0x1)[_0x560d09(0x244)](_0x2a2cd7=>_0x62c5f2(_0x2a2cd7,_0x2e8e55['id']))};}return null;}let _0x24bf4f=class{constructor(_0x648608,_0x578174,_0x222842,_0x55a730){const _0x2b4043=_0x4e97d0;this[_0x2b4043(0x251)]=_0x648608,this[_0x2b4043(0x20f)]=_0x578174,this[_0x2b4043(0x23c)]=_0x222842,this[_0x2b4043(0x248)]=_0x55a730;}async['addComment'](_0x16da66){const _0x3011d0=_0x4e97d0;var _0x3d2148,_0x13e4ea;const {parentId:_0x719b21,unitId:_0x4d8e51,text:_0x56a023,threadId:_0x32e28e}=_0x16da66,_0x5561e1=(_0x13e4ea=(_0x3d2148=_0x56a023[_0x3011d0(0x278)])==null?void 0x0:_0x3d2148[_0x3011d0(0x1e2)](_0xa1a6d6=>_0xa1a6d6[_0x3011d0(0x254)]===_0x1f1c49[_0x3011d0(0x233)][_0x3011d0(0x236)])[_0x3011d0(0x244)](_0x5f1098=>_0x5f1098[_0x3011d0(0x22f)]))!=null?_0x13e4ea:[],_0xc5e82f=JSON[_0x3011d0(0x1e3)](_0x56a023),_0x3d8051=(await this['_sessionService'][_0x3011d0(0x240)](_0x4d8e51))[_0x3011d0(0x20c)]();if(_0x719b21){const _0x17a07e={'memberId':_0x3d8051,'unitId':_0x4d8e51,'content':_0xc5e82f,'mention':_0x5561e1,'threadId':_0x32e28e},_0x9659a6=(await this[_0x3011d0(0x251)]['post'](_0x3011d0(0x257)+_0x4d8e51+_0x3011d0(0x24c),{'body':_0x17a07e}))[_0x3011d0(0x24b)]['reply'];return{..._0x16da66,'id':_0x9659a6[_0x3011d0(0x1e8)],'dT':_0x213cd8(+_0x9659a6[_0x3011d0(0x1ec)])[_0x3011d0(0x209)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x9659a6[_0x3011d0(0x1d9)]};}else{const _0x43a965={'memberId':_0x3d8051,'unitId':_0x4d8e51,'content':_0xc5e82f,'mention':_0x5561e1},_0x5daf92=await this[_0x3011d0(0x251)]['post']('/universer-api/comment/unit/'+_0x4d8e51+_0x3011d0(0x243),{'body':_0x43a965});return _0x18a81d(_0x5daf92[_0x3011d0(0x24b)]['comment'],_0x16da66);}}async[_0x4e97d0(0x268)](_0x171819){const _0x306950=_0x4e97d0;var _0x4ce25d,_0xbb8bc9;const {text:_0x14f5c4,unitId:_0x4500c6}=_0x171819,_0x67673c=(_0xbb8bc9=(_0x4ce25d=_0x14f5c4['customRanges'])==null?void 0x0:_0x4ce25d[_0x306950(0x1e2)](_0xb792af=>_0xb792af[_0x306950(0x254)]===_0x1f1c49['CustomRangeType']['COMMENT'])[_0x306950(0x244)](_0x424551=>_0x424551[_0x306950(0x22f)]))!=null?_0xbb8bc9:[],_0x505f0f=JSON[_0x306950(0x1e3)](_0x14f5c4),_0x51707c=_0x171819[_0x306950(0x1f6)],_0x18ac7a=_0x171819['id'],_0x480eda={'memberId':(await this[_0x306950(0x23c)]['requireSession'](_0x4500c6))['getMemberID'](),'unitId':_0x4500c6,'threadId':_0x51707c,'mention':_0x67673c,'content':_0x505f0f,'replyId':_0x18ac7a},_0x26e64c=await this['_httpService'][_0x306950(0x25b)](_0x306950(0x257)+_0x4500c6+_0x306950(0x211),{'body':_0x480eda});return!_0x26e64c[_0x306950(0x24b)]['error']||_0x26e64c[_0x306950(0x24b)][_0x306950(0x1f9)]['code']===0x1;}async[_0x4e97d0(0x230)](_0x206777){const _0x144afb=_0x4e97d0,{unitId:_0x579a84}=_0x206777,_0x17309b=_0x206777[_0x144afb(0x1f6)],_0xb746da={'memberId':this['_userService'][_0x144afb(0x1f7)]()[_0x144afb(0x25c)],'unitId':_0x579a84,'threadId':_0x17309b,'solved':_0x206777[_0x144afb(0x21e)]?_0x1ebf77[_0x144afb(0x21d)]:_0x1ebf77[_0x144afb(0x203)]},_0x839555=await this['_httpService'][_0x144afb(0x25b)](_0x144afb(0x257)+_0x579a84+_0x144afb(0x229),{'body':_0xb746da});return!_0x839555[_0x144afb(0x24b)][_0x144afb(0x1f9)]||_0x839555[_0x144afb(0x24b)][_0x144afb(0x1f9)]['code']===0x1;}async[_0x4e97d0(0x22b)](_0x5bf37a,_0x3ab0a3,_0x33b0b1,_0x12f824){const _0x1f40f0=_0x4e97d0,_0x40a123={'memberId':(await this['_sessionService'][_0x1f40f0(0x240)](_0x5bf37a))['getMemberID'](),'threadId':_0x33b0b1,'replyId':_0x12f824,'unitId':_0x5bf37a},_0x18af05=await this[_0x1f40f0(0x251)][_0x1f40f0(0x25b)](_0x1f40f0(0x257)+_0x5bf37a+_0x1f40f0(0x1ed),{'body':_0x40a123});return!_0x18af05[_0x1f40f0(0x24b)][_0x1f40f0(0x1f9)]||_0x18af05[_0x1f40f0(0x24b)][_0x1f40f0(0x1f9)][_0x1f40f0(0x26f)]===0x1;}async[_0x4e97d0(0x279)](_0x547ec1,_0x106b93,_0x56c9c5){const _0x579c08=_0x4e97d0,_0x2a5f3e={'unitId':_0x547ec1,'threadId':_0x56c9c5},_0x3a2282=await this[_0x579c08(0x251)][_0x579c08(0x25b)](_0x579c08(0x257)+_0x547ec1+_0x579c08(0x213),{'body':_0x2a5f3e}),_0x5b4f60=_0x56c9c5['map'](_0x9bf338=>_0x1e5725(_0x3a2282['body'][_0x579c08(0x202)][_0x9bf338],_0x547ec1,_0x106b93))['filter'](Boolean);return Object[_0x579c08(0x275)](_0x3a2282[_0x579c08(0x24b)][_0x579c08(0x201)])[_0x579c08(0x22c)](_0x44099c=>{this['_userService']['addUser'](_0x44099c);}),_0x5b4f60;}['saveCommentToSnapshot'](_0x3df21f){const _0x28302e=_0x4e97d0;return{'id':_0x3df21f['id'],'threadId':_0x3df21f[_0x28302e(0x1f6)],'ref':_0x3df21f['ref']};}};_0x24bf4f=_0x3d2c47([_0x31bb73(0x0,_0x1f1c49[_0x4e97d0(0x261)](_0x14cb20[_0x4e97d0(0x1f0)])),_0x31bb73(0x1,_0x1f1c49['Inject'](_0x1f1c49[_0x4e97d0(0x223)])),_0x31bb73(0x2,_0x1f1c49['Inject'](_0x4bcc22[_0x4e97d0(0x1ff)])),_0x31bb73(0x3,_0x1f1c49[_0x4e97d0(0x261)](_0x1f1c49[_0x4e97d0(0x1eb)]))],_0x24bf4f);var _0x8f5fc6=Object[_0x4e97d0(0x219)],_0x2b2d5f=Object['getOwnPropertyDescriptor'],_0x3dcfba=(_0x114a46,_0xb9c167,_0x245798,_0x3f9f66)=>{const _0x159876=_0x4e97d0;for(var _0x1b16af=_0x3f9f66>0x1?void 0x0:_0x3f9f66?_0x2b2d5f(_0xb9c167,_0x245798):_0xb9c167,_0x5baebf=_0x114a46[_0x159876(0x22a)]-0x1,_0x57e5ca;_0x5baebf>=0x0;_0x5baebf--)(_0x57e5ca=_0x114a46[_0x5baebf])&&(_0x1b16af=(_0x3f9f66?_0x57e5ca(_0xb9c167,_0x245798,_0x1b16af):_0x57e5ca(_0x1b16af))||_0x1b16af);return _0x3f9f66&&_0x1b16af&&_0x8f5fc6(_0xb9c167,_0x245798,_0x1b16af),_0x1b16af;},_0x33bcc7=(_0x19ab18,_0x47084a)=>(_0x46cb19,_0x21e59f)=>_0x47084a(_0x46cb19,_0x21e59f,_0x19ab18);let _0x27d008=class{constructor(_0x3e372b){const _0xdcfa04=_0x4e97d0;this[_0xdcfa04(0x251)]=_0x3e372b;}async['getMentions'](_0x273841,_0x41d98d,_0x11b5e7){const _0x37d862=_0x4e97d0,_0x3d1b5b=new URL(window['location'][_0x37d862(0x232)])[_0x37d862(0x25a)][_0x37d862(0x222)]('unit');if(!_0x3d1b5b)return[];const _0x5c4b20=window[_0x37d862(0x27a)][_0x37d862(0x264)],_0x12ce2e=window[_0x37d862(0x27a)][_0x37d862(0x1e5)]===_0x37d862(0x1dc)?_0x37d862(0x1e7):_0x37d862(0x225);return(await this['_httpService'][_0x37d862(0x222)](_0x12ce2e+_0x37d862(0x206)+_0x5c4b20+_0x37d862(0x238),{'params':{'objectID':_0x3d1b5b,'unitID':_0x3d1b5b}}))[_0x37d862(0x24b)][_0x37d862(0x231)][_0x37d862(0x244)](_0x16ff8d=>{const _0x33ec33=_0x37d862;var _0x122072,_0x57b75e,_0x3d9e4a,_0x5a94e9,_0x44b883,_0x5665cc;return{'id':(_0x57b75e=(_0x122072=_0x16ff8d['subject'])==null?void 0x0:_0x122072[_0x33ec33(0x25c)])!=null?_0x57b75e:'','label':(_0x5a94e9=(_0x3d9e4a=_0x16ff8d['subject'])==null?void 0x0:_0x3d9e4a['name'])!=null?_0x5a94e9:'','icon':(_0x5665cc=(_0x44b883=_0x16ff8d[_0x33ec33(0x1ef)])==null?void 0x0:_0x44b883[_0x33ec33(0x22d)])!=null?_0x5665cc:'','type':_0x33ec33(0x215)};});}};_0x27d008=_0x3dcfba([_0x33bcc7(0x0,_0x1f1c49['Inject'](_0x14cb20[_0x4e97d0(0x1f0)]))],_0x27d008);var _0x38680f=Object['defineProperty'],_0x4a7250=Object[_0x4e97d0(0x250)],_0x1d953e=(_0x5953d8,_0x2dc424,_0x4755e0,_0x134c76)=>{for(var _0x49240c=_0x134c76>0x1?void 0x0:_0x134c76?_0x4a7250(_0x2dc424,_0x4755e0):_0x2dc424,_0x3970b6=_0x5953d8['length']-0x1,_0x3bb735;_0x3970b6>=0x0;_0x3970b6--)(_0x3bb735=_0x5953d8[_0x3970b6])&&(_0x49240c=(_0x134c76?_0x3bb735(_0x2dc424,_0x4755e0,_0x49240c):_0x3bb735(_0x49240c))||_0x49240c);return _0x134c76&&_0x49240c&&_0x38680f(_0x2dc424,_0x4755e0,_0x49240c),_0x49240c;},_0x1e2440=(_0x3f551e,_0x56fe4c)=>(_0x156248,_0x295347)=>_0x56fe4c(_0x156248,_0x295347,_0x3f551e);let _0x14cdea=class extends _0x1f1c49[_0x4e97d0(0x220)]{constructor(_0x5eb89d,_0x568ff9,_0x2cdbd0,_0xee655f){const _0x3baac0=_0x4e97d0;super(),this[_0x3baac0(0x1f4)]=_0x5eb89d,this[_0x3baac0(0x25e)]=_0x568ff9,this[_0x3baac0(0x245)]=_0x2cdbd0,this[_0x3baac0(0x23f)]=_0xee655f,this['_initDataSource']();}[_0x4e97d0(0x21f)](){const _0xed23a9=_0x4e97d0;this[_0xed23a9(0x1f4)][_0xed23a9(0x252)]=this['_threadCommentDataSource'],this[_0xed23a9(0x1f4)][_0xed23a9(0x23b)]=!0x1,this[_0xed23a9(0x245)][_0xed23a9(0x252)]=this['_threadCommentMentionDataSource'];}};_0x14cdea=_0x1d953e([_0x1f1c49[_0x4e97d0(0x1e1)](_0x1f1c49['LifecycleStages'][_0x4e97d0(0x260)],_0x14cdea),_0x1e2440(0x0,_0x38c0aa[_0x4e97d0(0x270)]),_0x1e2440(0x1,_0x1f1c49[_0x4e97d0(0x261)](_0x24bf4f)),_0x1e2440(0x2,_0x51f704['IThreadCommentMentionDataService']),_0x1e2440(0x3,_0x1f1c49['Inject'](_0x27d008))],_0x14cdea);var _0x3ddee6=Object[_0x4e97d0(0x219)],_0x412c77=Object['getOwnPropertyDescriptor'],_0x18f7a2=(_0x424927,_0x449e47,_0x21e6b2)=>_0x449e47 in _0x424927?_0x3ddee6(_0x424927,_0x449e47,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21e6b2}):_0x424927[_0x449e47]=_0x21e6b2,_0x148b99=(_0x472ca8,_0x1ab944,_0x2e0b40,_0x274c04)=>{const _0x5b6db0=_0x4e97d0;for(var _0x250cab=_0x274c04>0x1?void 0x0:_0x274c04?_0x412c77(_0x1ab944,_0x2e0b40):_0x1ab944,_0x215316=_0x472ca8[_0x5b6db0(0x22a)]-0x1,_0x2c787a;_0x215316>=0x0;_0x215316--)(_0x2c787a=_0x472ca8[_0x215316])&&(_0x250cab=(_0x274c04?_0x2c787a(_0x1ab944,_0x2e0b40,_0x250cab):_0x2c787a(_0x250cab))||_0x250cab);return _0x274c04&&_0x250cab&&_0x3ddee6(_0x1ab944,_0x2e0b40,_0x250cab),_0x250cab;},_0x51403a=(_0x5bc3ea,_0x232b4f)=>(_0x4ca791,_0x441c1d)=>_0x232b4f(_0x4ca791,_0x441c1d,_0x5bc3ea),_0x4ae8c9=(_0x5105d3,_0x4510eb,_0x5d8846)=>_0x18f7a2(_0x5105d3,typeof _0x4510eb!=_0x4e97d0(0x1f3)?_0x4510eb+'':_0x4510eb,_0x5d8846);_0x23913f['UniverThreadCommentDataSourcePlugin']=class extends _0x1f1c49['Plugin']{constructor(_0x16662c=_0x1d4229,_0xc0c7fc,_0x1bbb34){const _0x506877=_0x4e97d0;super(),this[_0x506877(0x218)]=_0x16662c,this[_0x506877(0x248)]=_0xc0c7fc,this[_0x506877(0x24e)]=_0x1bbb34;const {..._0x1fd53f}=this['_config'];this[_0x506877(0x24e)][_0x506877(0x26a)](_0x22f6e5,_0x1fd53f);}[_0x4e97d0(0x21a)](){const _0x2cb71e=_0x4e97d0;[[_0x27d008],[_0x24bf4f],[_0x14cdea],[_0x1691cb]][_0x2cb71e(0x22c)](_0x5b167f=>{const _0x5b93ed=_0x2cb71e;this[_0x5b93ed(0x248)][_0x5b93ed(0x26e)](_0x5b167f);});}},_0x4ae8c9(_0x23913f['UniverThreadCommentDataSourcePlugin'],_0x4e97d0(0x217),_0x590b02),_0x4ae8c9(_0x23913f[_0x4e97d0(0x239)],_0x4e97d0(0x1ee),_0x1f1c49[_0x4e97d0(0x1ea)][_0x4e97d0(0x259)]),_0x23913f[_0x4e97d0(0x239)]=_0x148b99([_0x1f1c49['DependentOn'](_0x38c0aa[_0x4e97d0(0x20d)],_0x51f704[_0x4e97d0(0x24d)],_0x4bcc22[_0x4e97d0(0x226)],_0x51dae8[_0x4e97d0(0x265)]),_0x51403a(0x1,_0x1f1c49[_0x4e97d0(0x261)](_0x1f1c49[_0x4e97d0(0x1eb)])),_0x51403a(0x2,_0x1f1c49[_0x4e97d0(0x1fb)])],_0x23913f[_0x4e97d0(0x239)]),Object['defineProperty'](_0x23913f,Symbol[_0x4e97d0(0x1db)],{'value':_0x4e97d0(0x255)});}));function _0x446f(_0x91c0ef,_0x2b355b){const _0x5f4c21=_0x5f4c();return _0x446f=function(_0x446f8d,_0x2b8f1e){_0x446f8d=_0x446f8d-0x1d9;let _0x544cc5=_0x5f4c21[_0x446f8d];return _0x544cc5;},_0x446f(_0x91c0ef,_0x2b355b);}function _0x5f4c(){const _0x1bbaa5=['updateComment','CommentService','setConfig','YYYY/MM/DD\x20HH:mm','parse','UniverNetwork','add','code','IThreadCommentDataSourceService','_threadCommentModel','amd','Unknown','53879527RHiiDw','values','@univerjs/thread-comment','34244qngbrK','customRanges','listComments','location','userId','@univerjs/core','toStringTag','https:','bufferTime','_initUserSync','unitId','@univerjs-pro/collaboration-client','OnLifecycle','filter','stringify','2871954FOFvNc','protocol','getUser','https','replyId','addComment','UniverInstanceType','Injector','createTimestamp','/delete','type','subject','HTTPService','Reply','327804nkdqoR','symbol','_threadCommentDataSourceService','payload','threadId','getCurrentUser','UNRECOGNIZED','error','200350aqRloa','IConfigService','1136nKnbAn','rxjs','2sFyCfo','CollaborationSessionService','object','users','comments','OpenOrReOpen','1010749lLIjIM','11589rSVthw','://','Delete','dayjs','format','commentUpdate$','addUser','getMemberID','UniverThreadCommentPlugin','1216jniSBH','_userService','Edit','/edit','_commentService','/list','UniverCore','user','slice','pluginName','_config','defineProperty','onStarting','getComment','@univerjs/thread-comment-ui','Solved','resolved','_initDataSource','Disposable','replies','get','UserManagerService','parentId','http','UniverCollaborationClientPlugin','function','@univerjs-pro/license','/solved','length','deleteComment','forEach','avatar','Solve','rangeId','resolveComment','collaborators','href','CustomRangeType','disposeWithMe','506PmnxFB','COMMENT','subscribe','/universer-api/authz/collaborator','UniverThreadCommentDataSourcePlugin','delete','syncUpdateMutationToColla','_sessionService','UniverLicense','_init','_threadCommentMentionDataSource','requireSession','LifecycleStages','solved','/add','map','_threadCommentMentionDataService','personId','size','_injector','pipe','@univerjs/network','body','/reply','UniverThreadCommentUIPlugin','_configService','exports','getOwnPropertyDescriptor','_httpService','dataSource','Add','rangeType','Module','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/comment/unit/','getThread','UNIVER_UNKNOWN','searchParams','post','userID','12WUIuye','_threadCommentDataSource','UniverCollaborationClient','Starting','Inject','120IZBZiD','ThreadCommentModel','host','UniverLicensePlugin','UniverThreadCommentDatasource','content'];_0x5f4c=function(){return _0x1bbaa5;};return _0x5f4c();}
1
+ (function(_0x433d0b,_0x463c92){const _0x447fbe=_0x4a9b,_0x10b0a0=_0x433d0b();while(!![]){try{const _0x66042c=parseInt(_0x447fbe(0xfd))/0x1+-parseInt(_0x447fbe(0xe7))/0x2*(-parseInt(_0x447fbe(0xe5))/0x3)+parseInt(_0x447fbe(0x129))/0x4+parseInt(_0x447fbe(0xdf))/0x5+-parseInt(_0x447fbe(0x127))/0x6+parseInt(_0x447fbe(0x11d))/0x7*(parseInt(_0x447fbe(0xc1))/0x8)+parseInt(_0x447fbe(0xab))/0x9*(-parseInt(_0x447fbe(0x126))/0xa);if(_0x66042c===_0x463c92)break;else _0x10b0a0['push'](_0x10b0a0['shift']());}catch(_0x3bd3cd){_0x10b0a0['push'](_0x10b0a0['shift']());}}}(_0x340f,0x1bcad),function(_0x315a20,_0x539fa5){const _0x2392a2=_0x4a9b;typeof exports==_0x2392a2(0xdd)&&typeof module<'u'?_0x539fa5(exports,require(_0x2392a2(0xb5)),require(_0x2392a2(0x104)),require('@univerjs/thread-comment-ui'),require(_0x2392a2(0xd6)),require('@univerjs-pro/license'),require(_0x2392a2(0xb0)),require(_0x2392a2(0x12a)),require('dayjs')):typeof define==_0x2392a2(0x134)&&define['amd']?define(['exports',_0x2392a2(0xb5),'@univerjs/thread-comment','@univerjs/thread-comment-ui',_0x2392a2(0xd6),_0x2392a2(0x118),_0x2392a2(0xb0),'@univerjs/network',_0x2392a2(0x11c)],_0x539fa5):(_0x315a20=typeof globalThis<'u'?globalThis:_0x315a20||self,_0x539fa5(_0x315a20[_0x2392a2(0xbb)]={},_0x315a20['UniverCore'],_0x315a20['UniverThreadComment'],_0x315a20[_0x2392a2(0xfc)],_0x315a20[_0x2392a2(0xf2)],_0x315a20[_0x2392a2(0x11e)],_0x315a20[_0x2392a2(0xb0)],_0x315a20['UniverNetwork'],_0x315a20[_0x2392a2(0x11c)]));}(this,function(_0x4d006a,_0x27b004,_0x2adc5c,_0x35a6ea,_0x24a599,_0x49a6ca,_0x4dac87,_0x1127b3,_0x347198){'use strict';const _0x4381ea=_0x4a9b;const _0xe795ad=_0x4381ea(0x113);var _0x4f76c3=(_0x5b8822=>(_0x5b8822[_0x5b8822[_0x4381ea(0x106)]=0x0]=_0x4381ea(0x106),_0x5b8822[_0x5b8822[_0x4381ea(0xfa)]=0x1]=_0x4381ea(0xfa),_0x5b8822[_0x5b8822[_0x4381ea(0xb8)]=-0x1]=_0x4381ea(0xb8),_0x5b8822))(_0x4f76c3||{}),_0x70e94f=(_0x342429=>(_0x342429[_0x342429[_0x4381ea(0x139)]=0x0]=_0x4381ea(0x139),_0x342429[_0x342429['Add']=0x1]=_0x4381ea(0xf4),_0x342429[_0x342429[_0x4381ea(0x108)]=0x2]=_0x4381ea(0x108),_0x342429[_0x342429[_0x4381ea(0x100)]=0x3]=_0x4381ea(0x100),_0x342429[_0x342429['Delete']=0x4]=_0x4381ea(0x101),_0x342429[_0x342429[_0x4381ea(0xe9)]=0x5]=_0x4381ea(0xe9),_0x342429[_0x342429[_0x4381ea(0xb8)]=-0x1]=_0x4381ea(0xb8),_0x342429))(_0x70e94f||{});const _0x31581e=_0x3e037e=>_0x347198(new Date(+_0x3e037e))[_0x4381ea(0x130)](_0x4381ea(0x13f)),_0x1c2526=async(_0x267747,_0x1cd2b5)=>{const _0x4929c5=_0x4381ea,_0x1ca073=_0x267747[_0x4929c5(0xb3)](_0x27b004[_0x4929c5(0xd2)]),_0x5ad20e=_0x267747[_0x4929c5(0xb3)](_0x1127b3[_0x4929c5(0xed)]);_0x1cd2b5[_0x4929c5(0xb1)](_0x155de0=>{const _0xb8a62a=_0x4929c5;_0x1ca073[_0xb8a62a(0xf8)](_0x155de0)&&_0x1cd2b5[_0xb8a62a(0x10f)](_0x155de0);}),_0x1cd2b5[_0x4929c5(0x125)]&&(await _0x5ad20e[_0x4929c5(0xb3)](_0x4929c5(0xf1),{'params':{'userIDs':[..._0x1cd2b5]}}))[_0x4929c5(0xb9)][_0x4929c5(0x13a)][_0x4929c5(0xb1)](_0x3c9435=>{const _0x2ea5d5=_0x4929c5;_0x3c9435&&_0x1ca073[_0x2ea5d5(0xad)](_0x3c9435);});};var _0x5897e7=Object['defineProperty'],_0x2bbcf7=Object[_0x4381ea(0x105)],_0x5101e0=(_0x5bc001,_0x1fdf84,_0x118720,_0x127838)=>{const _0x1408a8=_0x4381ea;for(var _0x17cefc=_0x127838>0x1?void 0x0:_0x127838?_0x2bbcf7(_0x1fdf84,_0x118720):_0x1fdf84,_0x3ab97f=_0x5bc001[_0x1408a8(0xc6)]-0x1,_0x24d54b;_0x3ab97f>=0x0;_0x3ab97f--)(_0x24d54b=_0x5bc001[_0x3ab97f])&&(_0x17cefc=(_0x127838?_0x24d54b(_0x1fdf84,_0x118720,_0x17cefc):_0x24d54b(_0x17cefc))||_0x17cefc);return _0x127838&&_0x17cefc&&_0x5897e7(_0x1fdf84,_0x118720,_0x17cefc),_0x17cefc;},_0x81c46f=(_0x51d5ff,_0x2f3041)=>(_0x3ee960,_0x1c84cf)=>_0x2f3041(_0x3ee960,_0x1c84cf,_0x51d5ff);let _0x59a249=class extends _0x27b004[_0x4381ea(0x102)]{constructor(_0x3ba3cd,_0x1ad865,_0x565b73,_0x1cfd96){const _0x34dfd6=_0x4381ea;super(),this[_0x34dfd6(0xbe)]=_0x3ba3cd,this[_0x34dfd6(0xf3)]=_0x1ad865,this[_0x34dfd6(0xc9)]=_0x565b73,this[_0x34dfd6(0xe3)]=_0x1cfd96,this[_0x34dfd6(0x133)](),this[_0x34dfd6(0xaf)]();}[_0x4381ea(0xaf)](){const _0x5f3a90=_0x4381ea;this[_0x5f3a90(0xc3)](this[_0x5f3a90(0xf3)]['commentUpdate$']['pipe'](_0x4dac87[_0x5f3a90(0x12e)](0x10))[_0x5f3a90(0xae)](_0x43211f=>{const _0x169b2f=_0x5f3a90,_0x4bfeb0=new Set();_0x43211f[_0x169b2f(0xb1)](_0x5a6153=>{const _0x4abe8a=_0x169b2f;switch(_0x5a6153[_0x4abe8a(0x10c)]){case _0x4abe8a(0x123):{const _0x4e5efd=_0x5a6153[_0x4abe8a(0xb4)][_0x4abe8a(0xc5)];_0x4bfeb0[_0x4abe8a(0x123)](_0x4e5efd);break;}}}),_0x1c2526(this['_injector'],_0x4bfeb0);}));}['_init'](){const _0x543e96=_0x4381ea;this[_0x543e96(0xc3)](this[_0x543e96(0xbe)][_0x543e96(0x11f)][_0x543e96(0xae)](async _0x221f0f=>{const _0x3d4419=_0x543e96;var _0x51a630,_0x88a708;const _0x3e7627=this[_0x3d4419(0xf3)]['getThread'](_0x221f0f['unitId'],_0x221f0f[_0x3d4419(0xb2)]);if(!_0x3e7627)return;const {unitId:_0x39e6f1,subUnitId:_0x52ba24}=_0x3e7627;switch(_0x221f0f[_0x3d4419(0x11b)]&&this['_userService'][_0x3d4419(0xad)](_0x221f0f[_0x3d4419(0x11b)]),_0x221f0f[_0x3d4419(0x10c)]){case _0x70e94f[_0x3d4419(0xf4)]:break;case _0x70e94f[_0x3d4419(0x108)]:{this[_0x3d4419(0xf3)][_0x3d4419(0xcf)](_0x39e6f1,_0x52ba24,{'unitId':_0x39e6f1,'subUnitId':_0x52ba24,'ref':'','id':_0x221f0f['replyId'],'dT':_0x31581e(+_0x221f0f[_0x3d4419(0x128)]),'threadId':_0x221f0f[_0x3d4419(0xb2)],'personId':(_0x88a708=(_0x51a630=_0x221f0f[_0x3d4419(0x11b)])==null?void 0x0:_0x51a630['userID'])!=null?_0x88a708:_0x221f0f[_0x3d4419(0xf9)],'text':JSON[_0x3d4419(0xd0)](_0x221f0f[_0x3d4419(0xb6)]),'parentId':_0x3e7627['id']});break;}case _0x70e94f['Delete']:{const _0x47fae8=this[_0x3d4419(0xf3)]['getComment'](_0x39e6f1,_0x52ba24,_0x221f0f['replyId']);_0x47fae8&&_0x47fae8[_0x3d4419(0x115)]&&this[_0x3d4419(0xf3)]['deleteComment'](_0x39e6f1,_0x52ba24,_0x221f0f[_0x3d4419(0xd8)]);break;}case _0x70e94f['Edit']:{this[_0x3d4419(0xf3)][_0x3d4419(0x117)](_0x39e6f1,_0x52ba24,{'commentId':_0x221f0f[_0x3d4419(0xd8)],'text':JSON['parse'](_0x221f0f[_0x3d4419(0xb6)])});break;}case _0x70e94f[_0x3d4419(0xe9)]:{const _0x110c05=this[_0x3d4419(0xf3)][_0x3d4419(0xc0)](_0x39e6f1,_0x221f0f['threadId']);_0x110c05&&this['_threadCommentModel']['resolveComment'](_0x39e6f1,_0x52ba24,_0x110c05['id'],_0x221f0f[_0x3d4419(0xd1)]===_0x4f76c3[_0x3d4419(0xfa)]);break;}}}));}};_0x59a249=_0x5101e0([_0x81c46f(0x0,_0x27b004[_0x4381ea(0xbd)](_0x24a599[_0x4381ea(0xba)])),_0x81c46f(0x1,_0x27b004[_0x4381ea(0xbd)](_0x2adc5c[_0x4381ea(0xdb)])),_0x81c46f(0x2,_0x27b004[_0x4381ea(0xbd)](_0x27b004['UserManagerService'])),_0x81c46f(0x3,_0x27b004[_0x4381ea(0xbd)](_0x27b004[_0x4381ea(0xfe)]))],_0x59a249);const _0x242e2a=_0x4381ea(0x13e),_0x24efaf={};var _0x4c47ea=Object[_0x4381ea(0xff)],_0x10e044=Object['getOwnPropertyDescriptor'],_0x2f474d=(_0x169605,_0x22550e,_0x913c54,_0x323a83)=>{for(var _0x61c24b=_0x323a83>0x1?void 0x0:_0x323a83?_0x10e044(_0x22550e,_0x913c54):_0x22550e,_0x2fd4bb=_0x169605['length']-0x1,_0x164de6;_0x2fd4bb>=0x0;_0x2fd4bb--)(_0x164de6=_0x169605[_0x2fd4bb])&&(_0x61c24b=(_0x323a83?_0x164de6(_0x22550e,_0x913c54,_0x61c24b):_0x164de6(_0x61c24b))||_0x61c24b);return _0x323a83&&_0x61c24b&&_0x4c47ea(_0x22550e,_0x913c54,_0x61c24b),_0x61c24b;},_0x92d0d6=(_0x50dc4a,_0x542464)=>(_0xcb86ca,_0x494781)=>_0x542464(_0xcb86ca,_0x494781,_0x50dc4a);function _0x11f0b7(_0x3f5f1d,_0x2ce5ad){const _0x45c212=_0x4381ea,_0x105d11=_0x3f5f1d[_0x45c212(0x122)][0x0];return{..._0x2ce5ad,'id':_0x105d11[_0x45c212(0xd8)],'resolved':_0x3f5f1d[_0x45c212(0xd1)]===0x1,'dT':_0x31581e(_0x105d11['createTimestamp']),'personId':_0x105d11['userId'],'threadId':_0x105d11[_0x45c212(0xb2)]};}function _0x359430(_0x56c0f9,_0x147c0d,_0x4c5a02){const _0x147954=_0x4381ea;var _0x1359aa,_0x24ae03;if(((_0x24ae03=(_0x1359aa=_0x56c0f9==null?void 0x0:_0x56c0f9[_0x147954(0x122)])==null?void 0x0:_0x1359aa[_0x147954(0xc6)])!=null?_0x24ae03:0x0)>0x0){const _0x2789da=(_0x5266dd,_0x1bbbf5)=>({'id':_0x5266dd[_0x147954(0xd8)],'threadId':_0x5266dd[_0x147954(0xb2)],'dT':_0x31581e(_0x5266dd[_0x147954(0x128)]),'personId':_0x5266dd[_0x147954(0xf9)],'resolved':_0x56c0f9[_0x147954(0xd1)]===_0x4f76c3[_0x147954(0xfa)],'unitId':_0x147c0d,'subUnitId':_0x4c5a02,'text':JSON[_0x147954(0xd0)](_0x5266dd['content']),'parentId':_0x1bbbf5}),_0x25aa26=_0x2789da(_0x56c0f9[_0x147954(0x122)][0x0]);return{..._0x25aa26,'children':_0x56c0f9[_0x147954(0x122)][_0x147954(0x13c)](0x1)[_0x147954(0xc4)](_0x12b874=>_0x2789da(_0x12b874,_0x25aa26['id']))};}return null;}let _0x491fd7=class{constructor(_0x2b4b98,_0x123d13,_0xe065dc,_0x167c51){const _0x5265cc=_0x4381ea;this[_0x5265cc(0xd7)]=_0x2b4b98,this[_0x5265cc(0xc9)]=_0x123d13,this[_0x5265cc(0x12d)]=_0xe065dc,this[_0x5265cc(0xe3)]=_0x167c51;}async[_0x4381ea(0xcf)](_0x39eadf){const _0x9ade6d=_0x4381ea;var _0x37739e,_0x2e2126;const {parentId:_0x409a1a,unitId:_0x2f9a2b,text:_0x4c9eca,threadId:_0x954688}=_0x39eadf,_0x304615=(_0x2e2126=(_0x37739e=_0x4c9eca[_0x9ade6d(0xfb)])==null?void 0x0:_0x37739e[_0x9ade6d(0xb7)](_0x332366=>_0x332366[_0x9ade6d(0xcc)]===_0x27b004[_0x9ade6d(0x137)][_0x9ade6d(0x131)])[_0x9ade6d(0xc4)](_0xc04d06=>_0xc04d06[_0x9ade6d(0x12b)]))!=null?_0x2e2126:[],_0x90e21e=JSON['stringify'](_0x4c9eca),_0x298f35=(await this[_0x9ade6d(0x12d)][_0x9ade6d(0xe2)](_0x2f9a2b))[_0x9ade6d(0xf5)]();if(_0x409a1a){const _0x5934b2={'memberId':_0x298f35,'unitId':_0x2f9a2b,'content':_0x90e21e,'mention':_0x304615,'threadId':_0x954688},_0x420eaa=(await this[_0x9ade6d(0xd7)][_0x9ade6d(0xe6)]('/universer-api/comment/unit/'+_0x2f9a2b+_0x9ade6d(0xc7),{'body':_0x5934b2}))[_0x9ade6d(0xb9)]['reply'];return{..._0x39eadf,'id':_0x420eaa[_0x9ade6d(0xd8)],'dT':_0x347198(+_0x420eaa[_0x9ade6d(0x128)])['format'](_0x9ade6d(0x13f)),'personId':_0x420eaa[_0x9ade6d(0xf9)]};}else{const _0x3e5aa6={'memberId':_0x298f35,'unitId':_0x2f9a2b,'content':_0x90e21e,'mention':_0x304615},_0x2ee204=await this[_0x9ade6d(0xd7)][_0x9ade6d(0xe6)](_0x9ade6d(0xf7)+_0x2f9a2b+_0x9ade6d(0x121),{'body':_0x3e5aa6});return _0x11f0b7(_0x2ee204[_0x9ade6d(0xb9)][_0x9ade6d(0xde)],_0x39eadf);}}async[_0x4381ea(0x117)](_0x566599){const _0x436406=_0x4381ea;var _0x8176fa,_0x2727bf;const {text:_0x5d16d7,unitId:_0x3d4bba}=_0x566599,_0x1c4e87=(_0x2727bf=(_0x8176fa=_0x5d16d7[_0x436406(0xfb)])==null?void 0x0:_0x8176fa[_0x436406(0xb7)](_0x3c890b=>_0x3c890b['rangeType']===_0x27b004[_0x436406(0x137)][_0x436406(0x131)])['map'](_0x306295=>_0x306295['rangeId']))!=null?_0x2727bf:[],_0x1d0c40=JSON['stringify'](_0x5d16d7),_0x271347=_0x566599[_0x436406(0xb2)],_0x5087ea=_0x566599['id'],_0x3e5e75={'memberId':(await this['_sessionService'][_0x436406(0xe2)](_0x3d4bba))['getMemberID'](),'unitId':_0x3d4bba,'threadId':_0x271347,'mention':_0x1c4e87,'content':_0x1d0c40,'replyId':_0x5087ea},_0x975836=await this[_0x436406(0xd7)][_0x436406(0xe6)]('/universer-api/comment/unit/'+_0x3d4bba+_0x436406(0x114),{'body':_0x3e5e75});return!_0x975836[_0x436406(0xb9)]['error']||_0x975836[_0x436406(0xb9)][_0x436406(0xcd)][_0x436406(0x124)]===0x1;}async['resolveComment'](_0x1c8f3a){const _0x3dd964=_0x4381ea,{unitId:_0x189bda}=_0x1c8f3a,_0x3ba36d=_0x1c8f3a['threadId'],_0xbe731b={'memberId':this['_userService'][_0x3dd964(0x138)]()['userID'],'unitId':_0x189bda,'threadId':_0x3ba36d,'solved':_0x1c8f3a[_0x3dd964(0xe8)]?_0x4f76c3['Solved']:_0x4f76c3[_0x3dd964(0x106)]},_0x109539=await this['_httpService'][_0x3dd964(0xe6)](_0x3dd964(0xf7)+_0x189bda+'/solved',{'body':_0xbe731b});return!_0x109539[_0x3dd964(0xb9)][_0x3dd964(0xcd)]||_0x109539[_0x3dd964(0xb9)][_0x3dd964(0xcd)][_0x3dd964(0x124)]===0x1;}async[_0x4381ea(0xce)](_0x281375,_0x561383,_0xe3bae8,_0x48ed85){const _0x539fd6=_0x4381ea,_0x41c85b={'memberId':(await this[_0x539fd6(0x12d)][_0x539fd6(0xe2)](_0x281375))[_0x539fd6(0xf5)](),'threadId':_0xe3bae8,'replyId':_0x48ed85,'unitId':_0x281375},_0xc1e50a=await this[_0x539fd6(0xd7)][_0x539fd6(0xe6)](_0x539fd6(0xf7)+_0x281375+_0x539fd6(0x12f),{'body':_0x41c85b});return!_0xc1e50a[_0x539fd6(0xb9)][_0x539fd6(0xcd)]||_0xc1e50a[_0x539fd6(0xb9)][_0x539fd6(0xcd)][_0x539fd6(0x124)]===0x1;}async[_0x4381ea(0x132)](_0x2615a6,_0x58f42b,_0x2e3c6f){const _0xd51716=_0x4381ea,_0x4bcafe={'unitId':_0x2615a6,'threadId':_0x2e3c6f},_0x5cc8aa=await this[_0xd51716(0xd7)][_0xd51716(0xe6)]('/universer-api/comment/unit/'+_0x2615a6+_0xd51716(0xe1),{'body':_0x4bcafe}),_0x288247=_0x2e3c6f[_0xd51716(0xc4)](_0x4edb51=>_0x359430(_0x5cc8aa[_0xd51716(0xb9)][_0xd51716(0xcb)][_0x4edb51],_0x2615a6,_0x58f42b))[_0xd51716(0xb7)](Boolean);return Object[_0xd51716(0xd9)](_0x5cc8aa['body'][_0xd51716(0x13a)])['forEach'](_0xdc53e6=>{const _0x5119d2=_0xd51716;this[_0x5119d2(0xc9)][_0x5119d2(0xad)](_0xdc53e6);}),_0x288247;}[_0x4381ea(0x103)](_0x12919c){const _0x3b91e4=_0x4381ea;return{'id':_0x12919c['id'],'threadId':_0x12919c['threadId'],'ref':_0x12919c[_0x3b91e4(0xda)]};}};_0x491fd7=_0x2f474d([_0x92d0d6(0x0,_0x27b004['Inject'](_0x1127b3[_0x4381ea(0xed)])),_0x92d0d6(0x1,_0x27b004['Inject'](_0x27b004[_0x4381ea(0xd2)])),_0x92d0d6(0x2,_0x27b004[_0x4381ea(0xbd)](_0x24a599['CollaborationSessionService'])),_0x92d0d6(0x3,_0x27b004[_0x4381ea(0xbd)](_0x27b004['Injector']))],_0x491fd7);var _0x238b10=Object[_0x4381ea(0xff)],_0x3a8756=Object[_0x4381ea(0x105)],_0xd9ee09=(_0x15e3e1,_0x380c7b,_0x1c7f00,_0x19b7f6)=>{const _0x2ee752=_0x4381ea;for(var _0x4981a8=_0x19b7f6>0x1?void 0x0:_0x19b7f6?_0x3a8756(_0x380c7b,_0x1c7f00):_0x380c7b,_0x1d33bb=_0x15e3e1[_0x2ee752(0xc6)]-0x1,_0x42e69b;_0x1d33bb>=0x0;_0x1d33bb--)(_0x42e69b=_0x15e3e1[_0x1d33bb])&&(_0x4981a8=(_0x19b7f6?_0x42e69b(_0x380c7b,_0x1c7f00,_0x4981a8):_0x42e69b(_0x4981a8))||_0x4981a8);return _0x19b7f6&&_0x4981a8&&_0x238b10(_0x380c7b,_0x1c7f00,_0x4981a8),_0x4981a8;},_0x115cae=(_0x48fa67,_0x327d1e)=>(_0x14d25f,_0x3786a6)=>_0x327d1e(_0x14d25f,_0x3786a6,_0x48fa67);let _0x25b878=class{constructor(_0xb2816a){this['_httpService']=_0xb2816a;}async[_0x4381ea(0x13d)](_0x19292d,_0x5cd080,_0x46f2f4){const _0x20f090=_0x4381ea,_0xeed74e=new URL(window[_0x20f090(0x11a)][_0x20f090(0x107)])['searchParams'][_0x20f090(0xb3)]('unit');if(!_0xeed74e)return[];const _0x1b4991=window[_0x20f090(0x11a)][_0x20f090(0xbc)],_0x14150e=window[_0x20f090(0x11a)][_0x20f090(0x136)]==='https:'?_0x20f090(0x112):_0x20f090(0x120);return(await this[_0x20f090(0xd7)][_0x20f090(0xb3)](_0x14150e+_0x20f090(0x10b)+_0x1b4991+_0x20f090(0xf0),{'params':{'objectID':_0xeed74e,'unitID':_0xeed74e}}))['body'][_0x20f090(0xca)][_0x20f090(0xc4)](_0x4d4b33=>{const _0x4652a4=_0x20f090;var _0x49128d,_0x2d08e3,_0x5a58fb,_0x561bdc,_0xd845a7,_0x67f39;return{'id':(_0x2d08e3=(_0x49128d=_0x4d4b33['subject'])==null?void 0x0:_0x49128d[_0x4652a4(0xf6)])!=null?_0x2d08e3:'','label':(_0x561bdc=(_0x5a58fb=_0x4d4b33['subject'])==null?void 0x0:_0x5a58fb['name'])!=null?_0x561bdc:'','icon':(_0x67f39=(_0xd845a7=_0x4d4b33[_0x4652a4(0xd3)])==null?void 0x0:_0xd845a7['avatar'])!=null?_0x67f39:'','type':'user'};});}};_0x25b878=_0xd9ee09([_0x115cae(0x0,_0x27b004[_0x4381ea(0xbd)](_0x1127b3[_0x4381ea(0xed)]))],_0x25b878);var _0x298d3a=Object['defineProperty'],_0x561e11=Object[_0x4381ea(0x105)],_0x1ee0ad=(_0x2878ab,_0x4f7ecd,_0x2c294f,_0x22da17)=>{for(var _0x25af8b=_0x22da17>0x1?void 0x0:_0x22da17?_0x561e11(_0x4f7ecd,_0x2c294f):_0x4f7ecd,_0x3f3076=_0x2878ab['length']-0x1,_0x1f9ecc;_0x3f3076>=0x0;_0x3f3076--)(_0x1f9ecc=_0x2878ab[_0x3f3076])&&(_0x25af8b=(_0x22da17?_0x1f9ecc(_0x4f7ecd,_0x2c294f,_0x25af8b):_0x1f9ecc(_0x25af8b))||_0x25af8b);return _0x22da17&&_0x25af8b&&_0x298d3a(_0x4f7ecd,_0x2c294f,_0x25af8b),_0x25af8b;},_0x3d39a5=(_0x3e6c4e,_0x5a65b8)=>(_0x54f298,_0x4e949c)=>_0x5a65b8(_0x54f298,_0x4e949c,_0x3e6c4e);let _0x233a12=class extends _0x27b004['Disposable']{constructor(_0x37d2a1,_0x52aea8,_0x4e641c,_0x2eb796){const _0xb0730d=_0x4381ea;super(),this[_0xb0730d(0x110)]=_0x37d2a1,this[_0xb0730d(0x116)]=_0x52aea8,this['_threadCommentMentionDataService']=_0x4e641c,this[_0xb0730d(0x119)]=_0x2eb796,this[_0xb0730d(0xef)]();}['_initDataSource'](){const _0x459e3a=_0x4381ea;this[_0x459e3a(0x110)][_0x459e3a(0xac)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x459e3a(0x109)]=!0x1,this[_0x459e3a(0x12c)]['dataSource']=this[_0x459e3a(0x119)];}};_0x233a12=_0x1ee0ad([_0x3d39a5(0x0,_0x2adc5c[_0x4381ea(0x135)]),_0x3d39a5(0x1,_0x27b004[_0x4381ea(0xbd)](_0x491fd7)),_0x3d39a5(0x2,_0x35a6ea[_0x4381ea(0xc2)]),_0x3d39a5(0x3,_0x27b004[_0x4381ea(0xbd)](_0x25b878))],_0x233a12);var _0x8ef2b=Object['defineProperty'],_0x4dea50=Object[_0x4381ea(0x105)],_0xb19c21=(_0x4016b2,_0x554af8,_0x58109f)=>_0x554af8 in _0x4016b2?_0x8ef2b(_0x4016b2,_0x554af8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x58109f}):_0x4016b2[_0x554af8]=_0x58109f,_0x49fbec=(_0x187c25,_0x214e56,_0x203ce4,_0x216db7)=>{for(var _0x16bec4=_0x216db7>0x1?void 0x0:_0x216db7?_0x4dea50(_0x214e56,_0x203ce4):_0x214e56,_0x453296=_0x187c25['length']-0x1,_0x6f0c7f;_0x453296>=0x0;_0x453296--)(_0x6f0c7f=_0x187c25[_0x453296])&&(_0x16bec4=(_0x216db7?_0x6f0c7f(_0x214e56,_0x203ce4,_0x16bec4):_0x6f0c7f(_0x16bec4))||_0x16bec4);return _0x216db7&&_0x16bec4&&_0x8ef2b(_0x214e56,_0x203ce4,_0x16bec4),_0x16bec4;},_0x236b47=(_0x1c5ddc,_0x8fb32f)=>(_0xd12b1a,_0x3c3907)=>_0x8fb32f(_0xd12b1a,_0x3c3907,_0x1c5ddc),_0x212290=(_0x495dba,_0x257cb1,_0x2615d8)=>_0xb19c21(_0x495dba,typeof _0x257cb1!=_0x4381ea(0x13b)?_0x257cb1+'':_0x257cb1,_0x2615d8);_0x4d006a[_0x4381ea(0xee)]=class extends _0x27b004[_0x4381ea(0xc8)]{constructor(_0x12a5c0=_0x24efaf,_0x42ba7a,_0x55c14c){const _0x25b76a=_0x4381ea;super(),this[_0x25b76a(0xec)]=_0x12a5c0,this[_0x25b76a(0xe3)]=_0x42ba7a,this[_0x25b76a(0xd4)]=_0x55c14c;const {..._0x417c97}=this[_0x25b76a(0xec)];this['_configService']['setConfig'](_0x242e2a,_0x417c97);}[_0x4381ea(0x111)](){const _0x47f4cc=_0x4381ea;[[_0x25b878],[_0x491fd7],[_0x233a12],[_0x59a249]][_0x47f4cc(0xb1)](_0x387259=>{const _0x5af48c=_0x47f4cc;this[_0x5af48c(0xe3)][_0x5af48c(0x123)](_0x387259);}),this[_0x47f4cc(0xe3)][_0x47f4cc(0xb3)](_0x233a12);}['onReady'](){const _0x5cccad=_0x4381ea;this[_0x5cccad(0xe3)][_0x5cccad(0xb3)](_0x59a249);}},_0x212290(_0x4d006a[_0x4381ea(0xee)],_0x4381ea(0xbf),_0xe795ad),_0x212290(_0x4d006a['UniverThreadCommentDataSourcePlugin'],_0x4381ea(0x10c),_0x27b004[_0x4381ea(0x10a)]['UNIVER_UNKNOWN']),_0x4d006a['UniverThreadCommentDataSourcePlugin']=_0x49fbec([_0x27b004[_0x4381ea(0xeb)](_0x2adc5c[_0x4381ea(0xd5)],_0x35a6ea[_0x4381ea(0x10e)],_0x24a599[_0x4381ea(0xdc)],_0x49a6ca[_0x4381ea(0x10d)]),_0x236b47(0x1,_0x27b004[_0x4381ea(0xbd)](_0x27b004[_0x4381ea(0xfe)])),_0x236b47(0x2,_0x27b004[_0x4381ea(0xea)])],_0x4d006a['UniverThreadCommentDataSourcePlugin']),Object[_0x4381ea(0xff)](_0x4d006a,Symbol[_0x4381ea(0xe4)],{'value':_0x4381ea(0xe0)});}));function _0x4a9b(_0xb0167e,_0x238273){const _0x340fe0=_0x340f();return _0x4a9b=function(_0x4a9b7b,_0x1f4b5b){_0x4a9b7b=_0x4a9b7b-0xab;let _0x22ef63=_0x340fe0[_0x4a9b7b];return _0x22ef63;},_0x4a9b(_0xb0167e,_0x238273);}function _0x340f(){const _0x226318=['thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','18IddlIL','dataSource','addUser','subscribe','_initUserSync','rxjs','forEach','threadId','get','payload','@univerjs/core','content','filter','UNRECOGNIZED','body','CommentService','UniverThreadCommentDatasource','host','Inject','_commentService','pluginName','getThread','367112jtfmek','IThreadCommentMentionDataService','disposeWithMe','map','personId','length','/reply','Plugin','_userService','collaborators','comments','rangeType','error','deleteComment','addComment','parse','solved','UserManagerService','subject','_configService','UniverThreadCommentPlugin','@univerjs-pro/collaboration-client','_httpService','replyId','values','ref','ThreadCommentModel','UniverCollaborationClientPlugin','object','comment','293700upmOXI','Module','/list','requireSession','_injector','toStringTag','11439OnbQfA','post','68WAyctP','resolved','Solve','IConfigService','DependentOn','_config','HTTPService','UniverThreadCommentDataSourcePlugin','_initDataSource','/universer-api/authz/collaborator','/universer-api/user/list','UniverCollaborationClient','_threadCommentModel','Add','getMemberID','userID','/universer-api/comment/unit/','getUser','userId','Solved','customRanges','UniverThreadCommentUi','165924XXjZWu','Injector','defineProperty','Edit','Delete','Disposable','saveCommentToSnapshot','@univerjs/thread-comment','getOwnPropertyDescriptor','OpenOrReOpen','href','Reply','syncUpdateMutationToColla','UniverInstanceType','://','type','UniverLicensePlugin','UniverThreadCommentUIPlugin','delete','_threadCommentDataSourceService','onStarting','https','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','parentId','_threadCommentDataSource','updateComment','@univerjs-pro/license','_threadCommentMentionDataSource','location','user','dayjs','7eosyxU','UniverLicense','commentUpdate$','http','/add','replies','add','code','size','971910UBvxav','1272390RSihgl','createTimestamp','480356eWgkom','@univerjs/network','rangeId','_threadCommentMentionDataService','_sessionService','bufferTime','/delete','format','COMMENT','listComments','_init','function','IThreadCommentDataSourceService','protocol','CustomRangeType','getCurrentUser','Unknown','users','symbol','slice','getMentions'];_0x340f=function(){return _0x226318;};return _0x340f();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.3.0",
3
+ "version": "0.4.0-alpha.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,31 +45,31 @@
45
45
  "peerDependencies": {
46
46
  "dayjs": ">=1.11.0",
47
47
  "rxjs": ">=7.0.0",
48
- "@univerjs-pro/collaboration-client": "0.3.0",
49
- "@univerjs-pro/license": "0.3.0",
50
- "@univerjs/core": "0.3.0",
51
- "@univerjs/network": "0.3.0",
52
- "@univerjs/thread-comment": "0.3.0",
53
- "@univerjs/thread-comment-ui": "0.3.0"
48
+ "@univerjs-pro/collaboration-client": "0.4.0-alpha.0",
49
+ "@univerjs-pro/license": "0.4.0-alpha.0",
50
+ "@univerjs/network": "0.4.0-alpha.0",
51
+ "@univerjs/core": "0.4.0-alpha.0",
52
+ "@univerjs/thread-comment-ui": "0.4.0-alpha.0",
53
+ "@univerjs/thread-comment": "0.4.0-alpha.0"
54
54
  },
55
55
  "dependencies": {
56
56
  "dayjs": "^1.11.13",
57
- "@univerjs-pro/collaboration-client": "0.3.0",
58
- "@univerjs-pro/facade": "0.3.0",
59
- "@univerjs/network": "0.3.0",
60
- "@univerjs-pro/license": "0.3.0",
61
- "@univerjs/core": "0.3.0",
62
- "@univerjs/thread-comment-ui": "0.3.0",
63
- "@univerjs/protocol": "0.1.39-alpha.22",
64
- "@univerjs/uniscript": "0.3.0",
65
- "@univerjs/thread-comment": "0.3.0"
57
+ "@univerjs-pro/collaboration-client": "0.4.0-alpha.0",
58
+ "@univerjs-pro/license": "0.4.0-alpha.0",
59
+ "@univerjs-pro/facade": "0.4.0-alpha.0",
60
+ "@univerjs/core": "0.4.0-alpha.0",
61
+ "@univerjs/thread-comment": "0.4.0-alpha.0",
62
+ "@univerjs/protocol": "0.1.39-alpha.24",
63
+ "@univerjs/network": "0.4.0-alpha.0",
64
+ "@univerjs/uniscript": "0.4.0-alpha.0",
65
+ "@univerjs/thread-comment-ui": "0.4.0-alpha.0"
66
66
  },
67
67
  "devDependencies": {
68
68
  "rxjs": "^7.8.1",
69
- "typescript": "^5.6.2",
69
+ "typescript": "5.6.3",
70
70
  "vite": "^5.4.8",
71
- "vitest": "^2.1.1",
72
- "@univerjs-infra/shared": "0.3.0"
71
+ "vitest": "^2.1.2",
72
+ "@univerjs-infra/shared": "0.4.0-alpha.0"
73
73
  },
74
74
  "univerSpace": {
75
75
  ".": {
@@ -89,7 +89,6 @@
89
89
  "test:watch": "vitest",
90
90
  "coverage": "vitest run --coverage",
91
91
  "lint:types": "tsc --noEmit",
92
- "build": "tsc && vite build",
93
- "sync:pro:cnpm": "cnpm sync"
92
+ "build": "tsc && vite build"
94
93
  }
95
94
  }