@univerjs-pro/thread-comment-datasource 0.6.2 → 0.6.3

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 _0x36155a=_0x5362;(function(_0x347c8f,_0x3f1e39){const _0xce9fd=_0x5362,_0x3518e1=_0x347c8f();while(!![]){try{const _0x2d6555=-parseInt(_0xce9fd(0x1b0))/0x1+-parseInt(_0xce9fd(0x1fb))/0x2*(parseInt(_0xce9fd(0x1f9))/0x3)+-parseInt(_0xce9fd(0x20e))/0x4*(parseInt(_0xce9fd(0x20b))/0x5)+parseInt(_0xce9fd(0x1a1))/0x6*(parseInt(_0xce9fd(0x1f3))/0x7)+-parseInt(_0xce9fd(0x191))/0x8*(-parseInt(_0xce9fd(0x1a5))/0x9)+parseInt(_0xce9fd(0x1a2))/0xa*(parseInt(_0xce9fd(0x1c5))/0xb)+parseInt(_0xce9fd(0x1b4))/0xc*(parseInt(_0xce9fd(0x1a6))/0xd);if(_0x2d6555===_0x3f1e39)break;else _0x3518e1['push'](_0x3518e1['shift']());}catch(_0x93f037){_0x3518e1['push'](_0x3518e1['shift']());}}}(_0x374e,0x49522));Object[_0x36155a(0x204)](exports,Symbol[_0x36155a(0x211)],{'value':_0x36155a(0x1fa)});const b=require(_0x36155a(0x210)),T=require(_0x36155a(0x1cb)),c=require(_0x36155a(0x1d6)),j=require('@univerjs/thread-comment-ui'),M=require(_0x36155a(0x1bf)),w=require(_0x36155a(0x1c6)),P=require(_0x36155a(0x1ab)),U=_0x36155a(0x1b8);var I=(_0x379c06=>(_0x379c06[_0x379c06[_0x36155a(0x1ef)]=0x0]=_0x36155a(0x1ef),_0x379c06[_0x379c06[_0x36155a(0x1cc)]=0x1]=_0x36155a(0x1cc),_0x379c06[_0x379c06['UNRECOGNIZED']=-0x1]=_0x36155a(0x18e),_0x379c06))(I||{}),v=(_0x1cc1a7=>(_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1a9)]=0x0]=_0x36155a(0x1a9),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1ca)]=0x1]=_0x36155a(0x1ca),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1e2)]=0x2]=_0x36155a(0x1e2),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x194)]=0x3]=_0x36155a(0x194),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x196)]=0x4]=_0x36155a(0x196),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x19a)]=0x5]=_0x36155a(0x19a),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x18e)]=-0x1]=_0x36155a(0x18e),_0x1cc1a7))(v||{});const f=_0x1402e1=>c['dayjs'](new Date(+_0x1402e1))[_0x36155a(0x199)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2f90d3,_0x47eb6a)=>{const _0x20cae1=_0x36155a,_0x484113=_0x2f90d3[_0x20cae1(0x1d3)](c[_0x20cae1(0x193)]),_0x259369=_0x2f90d3[_0x20cae1(0x1d3)](P['HTTPService']);_0x47eb6a[_0x20cae1(0x1db)](_0x3aa0bc=>{const _0x9bd1b1=_0x20cae1;_0x484113[_0x9bd1b1(0x212)](_0x3aa0bc)&&_0x47eb6a[_0x9bd1b1(0x1e1)](_0x3aa0bc);}),_0x47eb6a[_0x20cae1(0x19f)]&&(await _0x259369[_0x20cae1(0x1d3)](_0x20cae1(0x195),{'params':{'userIDs':[..._0x47eb6a]}}))[_0x20cae1(0x1f4)]['users']['forEach'](_0x40cd0e=>{const _0x13733f=_0x20cae1;_0x40cd0e&&_0x484113[_0x13733f(0x1f2)](_0x40cd0e);});};var $=Object[_0x36155a(0x1ba)],E=(_0x4dd63d,_0x388d68,_0x3f390c,_0x1d00c2)=>{const _0x4d09cb=_0x36155a;for(var _0x1d780c=_0x1d00c2>0x1?void 0x0:_0x1d00c2?$(_0x388d68,_0x3f390c):_0x388d68,_0x57408c=_0x4dd63d[_0x4d09cb(0x216)]-0x1,_0x1b2ece;_0x57408c>=0x0;_0x57408c--)(_0x1b2ece=_0x4dd63d[_0x57408c])&&(_0x1d780c=_0x1b2ece(_0x1d780c)||_0x1d780c);return _0x1d780c;},S=(_0x2c3e1d,_0x30500c)=>(_0x14eb89,_0x117599)=>_0x30500c(_0x14eb89,_0x117599,_0x2c3e1d);let p=class extends c['Disposable']{constructor(_0x3dd9c7,_0x46b594,_0x5e6e95,_0x48bd2f){const _0xc9e584=_0x36155a;super(),this[_0xc9e584(0x208)]=_0x3dd9c7,this[_0xc9e584(0x1e3)]=_0x46b594,this[_0xc9e584(0x1c3)]=_0x5e6e95,this[_0xc9e584(0x1fd)]=_0x48bd2f,this[_0xc9e584(0x217)](),this['_initUserSync']();}[_0x36155a(0x1ae)](){const _0x1fcc9b=_0x36155a;this['disposeWithMe'](this['_threadCommentModel'][_0x1fcc9b(0x19b)][_0x1fcc9b(0x19c)](w[_0x1fcc9b(0x1ff)](0x10))[_0x1fcc9b(0x1a0)](_0x405129=>{const _0x12bb9f=_0x1fcc9b,_0x33464a=new Set();_0x405129[_0x12bb9f(0x1db)](_0x5d2745=>{const _0x561fe4=_0x12bb9f;switch(_0x5d2745[_0x561fe4(0x1f7)]){case _0x561fe4(0x1d1):{const _0x4cc317=_0x5d2745['payload'][_0x561fe4(0x1e6)];_0x33464a[_0x561fe4(0x1d1)](_0x4cc317);break;}}}),R(this['_injector'],_0x33464a);}));}['_init'](){const _0x123b15=_0x36155a;this[_0x123b15(0x1e8)](this[_0x123b15(0x208)]['commentUpdate$']['subscribe'](async _0x3a64e7=>{const _0x4c5b9d=_0x123b15;var _0x6b3c04,_0x116769,_0x99df78,_0x3c8e22;const _0x51ab3c=(_0x6b3c04=this[_0x4c5b9d(0x1e3)]['getUnit'](_0x3a64e7['unitId'])['find'](_0x5b02a7=>_0x5b02a7[_0x4c5b9d(0x1c9)]===_0x3a64e7['threadId']))==null?void 0x0:_0x6b3c04[_0x4c5b9d(0x1d8)];if(!_0x51ab3c)return;const {unitId:_0x86b56c,subUnitId:_0x22696b}=_0x51ab3c;switch(_0x3a64e7[_0x4c5b9d(0x206)]&&this[_0x4c5b9d(0x1c3)][_0x4c5b9d(0x1f2)](_0x3a64e7[_0x4c5b9d(0x206)]),_0x3a64e7['type']){case v[_0x4c5b9d(0x1ca)]:break;case v[_0x4c5b9d(0x1e2)]:{this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1ce)](_0x86b56c,_0x22696b,{'unitId':_0x86b56c,'subUnitId':_0x22696b,'ref':'','id':_0x3a64e7['replyId'],'dT':f(+_0x3a64e7['createTimestamp']),'threadId':_0x3a64e7[_0x4c5b9d(0x1c9)],'personId':(_0x99df78=(_0x116769=_0x3a64e7[_0x4c5b9d(0x206)])==null?void 0x0:_0x116769['userID'])!=null?_0x99df78:_0x3a64e7[_0x4c5b9d(0x1d0)],'text':JSON[_0x4c5b9d(0x1c8)](_0x3a64e7[_0x4c5b9d(0x1f8)]),'parentId':_0x51ab3c['id']});break;}case v[_0x4c5b9d(0x196)]:{const _0x75d090=this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1d2)](_0x86b56c,_0x22696b,_0x3a64e7[_0x4c5b9d(0x198)]);_0x75d090&&_0x75d090[_0x4c5b9d(0x1ac)]&&this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x18d)](_0x86b56c,_0x22696b,_0x3a64e7[_0x4c5b9d(0x198)]);break;}case v['Edit']:{this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1f1)](_0x86b56c,_0x22696b,{'commentId':_0x3a64e7[_0x4c5b9d(0x198)],'text':JSON[_0x4c5b9d(0x1c8)](_0x3a64e7[_0x4c5b9d(0x1f8)])});break;}case v['Solve']:{const _0x189ade=(_0x3c8e22=this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1b3)](_0x3a64e7[_0x4c5b9d(0x201)])[_0x4c5b9d(0x1ea)](_0x1ab160=>_0x1ab160[_0x4c5b9d(0x1c9)]===_0x3a64e7[_0x4c5b9d(0x1c9)]))==null?void 0x0:_0x3c8e22[_0x4c5b9d(0x1d8)];_0x189ade&&this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1cd)](_0x86b56c,_0x22696b,_0x189ade['id'],_0x3a64e7[_0x4c5b9d(0x1c1)]===I[_0x4c5b9d(0x1cc)]);break;}}}));}};p=E([S(0x0,c[_0x36155a(0x197)](b['CommentService'])),S(0x1,c[_0x36155a(0x197)](M[_0x36155a(0x1b7)])),S(0x2,c[_0x36155a(0x197)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x36155a(0x218)]))],p);const q=_0x36155a(0x1e5),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x397994,_0xc93a58,_0x140f70,_0x39a49e)=>{for(var _0x46b8c1=_0x39a49e>0x1?void 0x0:_0x39a49e?A(_0xc93a58,_0x140f70):_0xc93a58,_0x486b26=_0x397994['length']-0x1,_0x26b1a0;_0x486b26>=0x0;_0x486b26--)(_0x26b1a0=_0x397994[_0x486b26])&&(_0x46b8c1=_0x26b1a0(_0x46b8c1)||_0x46b8c1);return _0x46b8c1;},_=(_0x49dde2,_0xb2f56b)=>(_0x3f0d1d,_0x3fbbd0)=>_0xb2f56b(_0x3f0d1d,_0x3fbbd0,_0x49dde2);function Y(_0x13b2e1,_0x2e9c72){const _0x2afc43=_0x36155a,_0xfc6e35=_0x13b2e1[_0x2afc43(0x1d4)][0x0];return{..._0x2e9c72,'id':_0xfc6e35[_0x2afc43(0x198)],'resolved':_0x13b2e1[_0x2afc43(0x1c1)]===0x1,'dT':f(_0xfc6e35[_0x2afc43(0x1be)]),'personId':_0xfc6e35['userId'],'threadId':_0xfc6e35[_0x2afc43(0x1c9)]};}function G(_0x2202c9,_0x18e323,_0x2ad138){const _0x4a1c0f=_0x36155a;var _0x5cee34,_0x36d095;if(((_0x36d095=(_0x5cee34=_0x2202c9==null?void 0x0:_0x2202c9[_0x4a1c0f(0x1d4)])==null?void 0x0:_0x5cee34[_0x4a1c0f(0x216)])!=null?_0x36d095:0x0)>0x0){const _0x45f42f=(_0x97dfde,_0x516cfc)=>({'id':_0x97dfde[_0x4a1c0f(0x198)],'threadId':_0x97dfde['threadId'],'dT':f(_0x97dfde[_0x4a1c0f(0x1be)]),'personId':_0x97dfde['userId'],'resolved':_0x2202c9[_0x4a1c0f(0x1c1)]===I[_0x4a1c0f(0x1cc)],'unitId':_0x18e323,'subUnitId':_0x2ad138,'text':JSON['parse'](_0x97dfde['content']),'parentId':_0x516cfc}),_0x38c074=_0x45f42f(_0x2202c9[_0x4a1c0f(0x1d4)][0x0]);return{..._0x38c074,'children':_0x2202c9[_0x4a1c0f(0x1d4)]['slice'](0x1)[_0x4a1c0f(0x203)](_0x1b9ed1=>_0x45f42f(_0x1b9ed1,_0x38c074['id']))};}return null;}let g=class{constructor(_0x3b1a11,_0xe94ebe,_0x261bb2,_0x402e99){const _0x3e6e7d=_0x36155a;this[_0x3e6e7d(0x1dd)]=_0x3b1a11,this['_userService']=_0xe94ebe,this[_0x3e6e7d(0x1ec)]=_0x261bb2,this[_0x3e6e7d(0x1fd)]=_0x402e99;}async[_0x36155a(0x1ce)](_0x1267d3){const _0xc24f0b=_0x36155a;var _0x3818d2,_0x564b78;const {parentId:_0x430103,unitId:_0xb10179,text:_0xb27a63,threadId:_0x21e17b}=_0x1267d3,_0x2b6590=(_0x564b78=(_0x3818d2=_0xb27a63[_0xc24f0b(0x1bb)])==null?void 0x0:_0x3818d2[_0xc24f0b(0x1bc)](_0x544b5a=>_0x544b5a[_0xc24f0b(0x1a3)]===c[_0xc24f0b(0x20a)]['COMMENT'])[_0xc24f0b(0x203)](_0x3717c2=>_0x3717c2['rangeId']))!=null?_0x564b78:[],_0x50bfae=JSON[_0xc24f0b(0x214)](_0xb27a63),_0x1723a6=(await this[_0xc24f0b(0x1ec)][_0xc24f0b(0x205)](_0xb10179))[_0xc24f0b(0x1d9)]();if(_0x430103){const _0x19a4e3={'memberId':_0x1723a6,'unitId':_0xb10179,'content':_0x50bfae,'mention':_0x2b6590,'threadId':_0x21e17b},_0x5a75d1=(await this[_0xc24f0b(0x1dd)][_0xc24f0b(0x202)](_0xc24f0b(0x1f5)+_0xb10179+_0xc24f0b(0x190),{'body':_0x19a4e3}))['body'][_0xc24f0b(0x1ee)];return{..._0x1267d3,'id':_0x5a75d1[_0xc24f0b(0x198)],'dT':c[_0xc24f0b(0x1c4)](+_0x5a75d1[_0xc24f0b(0x1be)])[_0xc24f0b(0x199)](_0xc24f0b(0x1e0)),'personId':_0x5a75d1['userId']};}else{const _0x28fa3b={'memberId':_0x1723a6,'unitId':_0xb10179,'content':_0x50bfae,'mention':_0x2b6590},_0x34712a=await this[_0xc24f0b(0x1dd)]['post'](_0xc24f0b(0x1f5)+_0xb10179+_0xc24f0b(0x1a7),{'body':_0x28fa3b});return Y(_0x34712a[_0xc24f0b(0x1f4)][_0xc24f0b(0x1ed)],_0x1267d3);}}async[_0x36155a(0x1f1)](_0xf5677a){const _0x25ae6b=_0x36155a;var _0x10cb9a,_0x3b42ec;const {text:_0x80b723,unitId:_0x37c048}=_0xf5677a,_0xf7f777=(_0x3b42ec=(_0x10cb9a=_0x80b723['customRanges'])==null?void 0x0:_0x10cb9a[_0x25ae6b(0x1bc)](_0x5802f9=>_0x5802f9[_0x25ae6b(0x1a3)]===c[_0x25ae6b(0x20a)][_0x25ae6b(0x1e9)])['map'](_0x156094=>_0x156094[_0x25ae6b(0x1cf)]))!=null?_0x3b42ec:[],_0x4ef2cf=JSON[_0x25ae6b(0x214)](_0x80b723),_0x438611=_0xf5677a[_0x25ae6b(0x1c9)],_0x8c5d84=_0xf5677a['id'],_0x3fe365={'memberId':(await this['_sessionService']['requireSession'](_0x37c048))[_0x25ae6b(0x1d9)](),'unitId':_0x37c048,'threadId':_0x438611,'mention':_0xf7f777,'content':_0x4ef2cf,'replyId':_0x8c5d84},_0x3f13ec=await this[_0x25ae6b(0x1dd)][_0x25ae6b(0x202)](_0x25ae6b(0x1f5)+_0x37c048+_0x25ae6b(0x1b1),{'body':_0x3fe365});return!_0x3f13ec[_0x25ae6b(0x1f4)]['error']||_0x3f13ec[_0x25ae6b(0x1f4)][_0x25ae6b(0x1fe)][_0x25ae6b(0x19e)]===0x1;}async[_0x36155a(0x1cd)](_0x43522d){const _0x37890c=_0x36155a,{unitId:_0x730f06}=_0x43522d,_0x505f0d=_0x43522d[_0x37890c(0x1c9)],_0x3d734c={'memberId':this[_0x37890c(0x1c3)][_0x37890c(0x1df)]()[_0x37890c(0x18f)],'unitId':_0x730f06,'threadId':_0x505f0d,'solved':_0x43522d[_0x37890c(0x1c7)]?I['Solved']:I[_0x37890c(0x1ef)]},_0x51c68e=await this['_httpService'][_0x37890c(0x202)](_0x37890c(0x1f5)+_0x730f06+_0x37890c(0x1de),{'body':_0x3d734c});return!_0x51c68e[_0x37890c(0x1f4)][_0x37890c(0x1fe)]||_0x51c68e[_0x37890c(0x1f4)][_0x37890c(0x1fe)][_0x37890c(0x19e)]===0x1;}async[_0x36155a(0x18d)](_0x5d96dc,_0x25f4b1,_0x32cd8a,_0x57ed6a){const _0xb9b723=_0x36155a,_0x3b2133={'memberId':(await this['_sessionService'][_0xb9b723(0x205)](_0x5d96dc))[_0xb9b723(0x1d9)](),'threadId':_0x32cd8a,'replyId':_0x57ed6a,'unitId':_0x5d96dc},_0x57993d=await this[_0xb9b723(0x1dd)]['post'](_0xb9b723(0x1f5)+_0x5d96dc+_0xb9b723(0x1b5),{'body':_0x3b2133});return!_0x57993d[_0xb9b723(0x1f4)][_0xb9b723(0x1fe)]||_0x57993d[_0xb9b723(0x1f4)][_0xb9b723(0x1fe)]['code']===0x1;}async[_0x36155a(0x1fc)](_0x19cb0a,_0x3c9975,_0x5c495e){const _0x4badca=_0x36155a,_0x2da396={'unitId':_0x19cb0a,'threadId':_0x5c495e},_0x10fcbe=await this[_0x4badca(0x1dd)]['post']('/universer-api/comment/unit/'+_0x19cb0a+_0x4badca(0x1c0),{'body':_0x2da396}),_0x41c389=_0x5c495e['map'](_0x5cbf2d=>G(_0x10fcbe['body']['comments'][_0x5cbf2d],_0x19cb0a,_0x3c9975))[_0x4badca(0x1bc)](Boolean);return Object[_0x4badca(0x1b6)](_0x10fcbe[_0x4badca(0x1f4)][_0x4badca(0x1ad)])[_0x4badca(0x1db)](_0x1d92e6=>{const _0x22a6cc=_0x4badca;this[_0x22a6cc(0x1c3)][_0x22a6cc(0x1f2)](_0x1d92e6);}),_0x41c389;}[_0x36155a(0x1a8)](_0x201acd){const _0x40a234=_0x36155a;return{'id':_0x201acd['id'],'threadId':_0x201acd[_0x40a234(0x1c9)],'ref':_0x201acd[_0x40a234(0x1e7)]};}};function _0x5362(_0x436b95,_0x3f2868){const _0x374eb0=_0x374e();return _0x5362=function(_0x5362cc,_0x3d30c1){_0x5362cc=_0x5362cc-0x18d;let _0x4108fb=_0x374eb0[_0x5362cc];return _0x4108fb;},_0x5362(_0x436b95,_0x3f2868);}g=x([_(0x0,c[_0x36155a(0x197)](P[_0x36155a(0x19d)])),_(0x1,c[_0x36155a(0x197)](c[_0x36155a(0x193)])),_(0x2,c['Inject'](b[_0x36155a(0x1aa)])),_(0x3,c[_0x36155a(0x197)](c[_0x36155a(0x218)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xeb10eb,_0x12a2e9,_0x23d3a8,_0x8936b2)=>{const _0x3bf85f=_0x36155a;for(var _0xc21ae6=_0x8936b2>0x1?void 0x0:_0x8936b2?H(_0x12a2e9,_0x23d3a8):_0x12a2e9,_0x240712=_0xeb10eb[_0x3bf85f(0x216)]-0x1,_0x1ad6f8;_0x240712>=0x0;_0x240712--)(_0x1ad6f8=_0xeb10eb[_0x240712])&&(_0xc21ae6=_0x1ad6f8(_0xc21ae6)||_0xc21ae6);return _0xc21ae6;},y=(_0x4c3b62,_0x2d77cc)=>(_0x21316b,_0x3f0832)=>_0x2d77cc(_0x21316b,_0x3f0832,_0x4c3b62);let C=class extends c[_0x36155a(0x1bd)]{constructor(_0x1dde57,_0x365be2){const _0x16ef70=_0x36155a;super(),this[_0x16ef70(0x1c2)]=_0x1dde57,this[_0x16ef70(0x207)]=_0x365be2,this[_0x16ef70(0x1d5)]();}[_0x36155a(0x1d5)](){const _0x327b35=_0x36155a;this[_0x327b35(0x1c2)][_0x327b35(0x192)]=this[_0x327b35(0x207)],this[_0x327b35(0x1c2)][_0x327b35(0x1da)]=!0x1;}};function _0x374e(){const _0x4efb77=['forEach','pluginName','_httpService','/solved','getCurrentUser','YYYY/MM/DD\x20HH:mm','delete','Reply','_threadCommentModel','Plugin','thread-comment-data-source.config','personId','ref','disposeWithMe','COMMENT','find','symbol','_sessionService','comment','reply','OpenOrReOpen','UniverCollaborationClientPlugin','updateComment','addUser','49SNXnvx','body','/universer-api/comment/unit/','UNIVER_UNKNOWN','type','content','101397FGImzt','Module','2swsEtN','listComments','_injector','error','bufferTime','setConfig','unitId','post','map','defineProperty','requireSession','user','_threadCommentDataSource','_commentService','UniverThreadCommentUIPlugin','CustomRangeType','29740itYsBL','UniverInstanceType','_configService','8hIHRqJ','DependentOn','@univerjs-pro/collaboration-client','toStringTag','getUser','merge','stringify','onReady','length','_init','Injector','deleteComment','UNRECOGNIZED','userID','/reply','352392sDYQBa','dataSource','UserManagerService','Edit','/universer-api/user/list','Delete','Inject','replyId','format','Solve','commentUpdate$','pipe','HTTPService','code','size','subscribe','11838CiItpT','262970lTvodi','rangeType','UniverThreadCommentDataSourcePlugin','36DomRgc','3524339CNbVJC','/add','saveCommentToSnapshot','Unknown','CollaborationSessionService','@univerjs/network','parentId','users','_initUserSync','UniverLicensePlugin','193984hgzMXh','/edit','IThreadCommentDataSourceService','getUnit','12WQyekx','/delete','values','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','getOwnPropertyDescriptor','customRanges','filter','Disposable','createTimestamp','@univerjs/thread-comment','/list','solved','_threadCommentDataSourceService','_userService','dayjs','33KOqZCS','rxjs','resolved','parse','threadId','Add','@univerjs-pro/license','Solved','resolveComment','addComment','rangeId','userId','add','getComment','get','replies','_initDataSource','@univerjs/core','_config','root','getMemberID','syncUpdateMutationToColla'];_0x374e=function(){return _0x4efb77;};return _0x374e();}C=J([y(0x0,M[_0x36155a(0x1b2)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x36155a(0x1ba)],Z=(_0x52ba7e,_0x4d94d3,_0x30f673)=>_0x4d94d3 in _0x52ba7e?F(_0x52ba7e,_0x4d94d3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30f673}):_0x52ba7e[_0x4d94d3]=_0x30f673,W=(_0x4fab5a,_0x1abf17,_0x59833f,_0x49e22f)=>{const _0x55ca05=_0x36155a;for(var _0x5b7a76=_0x49e22f>0x1?void 0x0:_0x49e22f?L(_0x1abf17,_0x59833f):_0x1abf17,_0x5a598c=_0x4fab5a[_0x55ca05(0x216)]-0x1,_0xecbeff;_0x5a598c>=0x0;_0x5a598c--)(_0xecbeff=_0x4fab5a[_0x5a598c])&&(_0x5b7a76=_0xecbeff(_0x5b7a76)||_0x5b7a76);return _0x5b7a76;},O=(_0x28f1c7,_0x4a95fb)=>(_0x83ca4f,_0x3b537f)=>_0x4a95fb(_0x83ca4f,_0x3b537f,_0x28f1c7),N=(_0x2b4baa,_0x322063,_0x36a352)=>Z(_0x2b4baa,typeof _0x322063!=_0x36155a(0x1eb)?_0x322063+'':_0x322063,_0x36a352);exports[_0x36155a(0x1a4)]=class extends c[_0x36155a(0x1e4)]{constructor(_0xe0e9eb=D,_0x2a2dc1,_0x2d28f9){const _0x324650=_0x36155a;super(),this['_config']=_0xe0e9eb,this[_0x324650(0x1fd)]=_0x2a2dc1,this[_0x324650(0x20d)]=_0x2d28f9;const {..._0x39593f}=c[_0x324650(0x213)]({},D,this[_0x324650(0x1d7)]);this['_configService'][_0x324650(0x200)](q,_0x39593f);}['onStarting'](){[[g],[C],[p]]['forEach'](_0xb3d572=>{const _0x42799e=_0x5362;this[_0x42799e(0x1fd)][_0x42799e(0x1d1)](_0xb3d572);});}[_0x36155a(0x215)](){const _0xedb4de=_0x36155a;this[_0xedb4de(0x1fd)][_0xedb4de(0x1d3)](C),this[_0xedb4de(0x1fd)][_0xedb4de(0x1d3)](p);}},N(exports[_0x36155a(0x1a4)],_0x36155a(0x1dc),U),N(exports[_0x36155a(0x1a4)],_0x36155a(0x1f7),c[_0x36155a(0x20c)][_0x36155a(0x1f6)]),exports[_0x36155a(0x1a4)]=W([c[_0x36155a(0x20f)](j[_0x36155a(0x209)],b[_0x36155a(0x1f0)],T[_0x36155a(0x1af)]),O(0x1,c[_0x36155a(0x197)](c[_0x36155a(0x218)])),O(0x2,c[_0x36155a(0x1b9)])],exports[_0x36155a(0x1a4)]);
1
+ 'use strict';const _0x5ec575=_0x3387;(function(_0x534494,_0x4706ae){const _0x42eecc=_0x3387,_0x14ab89=_0x534494();while(!![]){try{const _0x2fa8da=-parseInt(_0x42eecc(0x1f9))/0x1*(-parseInt(_0x42eecc(0x1df))/0x2)+parseInt(_0x42eecc(0x22f))/0x3+-parseInt(_0x42eecc(0x1ed))/0x4*(parseInt(_0x42eecc(0x1ff))/0x5)+-parseInt(_0x42eecc(0x1d0))/0x6*(parseInt(_0x42eecc(0x229))/0x7)+-parseInt(_0x42eecc(0x1e1))/0x8*(parseInt(_0x42eecc(0x1ba))/0x9)+parseInt(_0x42eecc(0x204))/0xa+-parseInt(_0x42eecc(0x1e9))/0xb*(parseInt(_0x42eecc(0x1bb))/0xc);if(_0x2fa8da===_0x4706ae)break;else _0x14ab89['push'](_0x14ab89['shift']());}catch(_0x5a6b98){_0x14ab89['push'](_0x14ab89['shift']());}}}(_0x7400,0x6b21b));Object[_0x5ec575(0x1c0)](exports,Symbol['toStringTag'],{'value':_0x5ec575(0x1c5)});const b=require(_0x5ec575(0x1c8)),T=require(_0x5ec575(0x1d2)),c=require(_0x5ec575(0x1d1)),j=require(_0x5ec575(0x1f8)),M=require('@univerjs/thread-comment'),w=require(_0x5ec575(0x1e6)),P=require(_0x5ec575(0x203)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x53ad6c=>(_0x53ad6c[_0x53ad6c[_0x5ec575(0x20f)]=0x0]=_0x5ec575(0x20f),_0x53ad6c[_0x53ad6c['Solved']=0x1]=_0x5ec575(0x22b),_0x53ad6c[_0x53ad6c[_0x5ec575(0x1b5)]=-0x1]=_0x5ec575(0x1b5),_0x53ad6c))(I||{}),v=(_0x47d06a=>(_0x47d06a[_0x47d06a[_0x5ec575(0x1b9)]=0x0]=_0x5ec575(0x1b9),_0x47d06a[_0x47d06a[_0x5ec575(0x22e)]=0x1]=_0x5ec575(0x22e),_0x47d06a[_0x47d06a[_0x5ec575(0x22d)]=0x2]=_0x5ec575(0x22d),_0x47d06a[_0x47d06a[_0x5ec575(0x1cf)]=0x3]=_0x5ec575(0x1cf),_0x47d06a[_0x47d06a[_0x5ec575(0x1bd)]=0x4]=_0x5ec575(0x1bd),_0x47d06a[_0x47d06a[_0x5ec575(0x1b7)]=0x5]=_0x5ec575(0x1b7),_0x47d06a[_0x47d06a[_0x5ec575(0x1b5)]=-0x1]=_0x5ec575(0x1b5),_0x47d06a))(v||{});const f=_0x59bd1a=>c['dayjs'](new Date(+_0x59bd1a))['format'](_0x5ec575(0x1f7)),R=async(_0x2aa50b,_0x1fcb83)=>{const _0x4b6a8f=_0x5ec575,_0x18fe19=_0x2aa50b[_0x4b6a8f(0x1fa)](c[_0x4b6a8f(0x1d7)]),_0x3ade1e=_0x2aa50b[_0x4b6a8f(0x1fa)](P['HTTPService']);_0x1fcb83[_0x4b6a8f(0x206)](_0x2ce65a=>{const _0x2dd4f8=_0x4b6a8f;_0x18fe19[_0x2dd4f8(0x225)](_0x2ce65a)&&_0x1fcb83[_0x2dd4f8(0x1c7)](_0x2ce65a);}),_0x1fcb83[_0x4b6a8f(0x1fc)]&&(await _0x3ade1e[_0x4b6a8f(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1fcb83]}}))['body'][_0x4b6a8f(0x21a)][_0x4b6a8f(0x206)](_0x2f6b63=>{const _0x487ae0=_0x4b6a8f;_0x2f6b63&&_0x18fe19[_0x487ae0(0x1d8)](_0x2f6b63);});};var $=Object[_0x5ec575(0x1eb)],E=(_0x40e06f,_0x534bd1,_0x957df8,_0xee6c9d)=>{const _0x4f6c08=_0x5ec575;for(var _0x7e0533=_0xee6c9d>0x1?void 0x0:_0xee6c9d?$(_0x534bd1,_0x957df8):_0x534bd1,_0x15f8c7=_0x40e06f[_0x4f6c08(0x1bc)]-0x1,_0x19e5e0;_0x15f8c7>=0x0;_0x15f8c7--)(_0x19e5e0=_0x40e06f[_0x15f8c7])&&(_0x7e0533=_0x19e5e0(_0x7e0533)||_0x7e0533);return _0x7e0533;},S=(_0x2b7d66,_0x100853)=>(_0x40e9f5,_0x176f57)=>_0x100853(_0x40e9f5,_0x176f57,_0x2b7d66);let p=class extends c[_0x5ec575(0x1ef)]{constructor(_0x451d19,_0x49cfe6,_0x268a6a,_0x3b63fe){const _0x4753fa=_0x5ec575;super(),this['_commentService']=_0x451d19,this['_threadCommentModel']=_0x49cfe6,this[_0x4753fa(0x1de)]=_0x268a6a,this['_injector']=_0x3b63fe,this[_0x4753fa(0x1ea)](),this[_0x4753fa(0x1cd)]();}[_0x5ec575(0x1cd)](){const _0x421063=_0x5ec575;this[_0x421063(0x1fb)](this[_0x421063(0x1da)]['commentUpdate$']['pipe'](w['bufferTime'](0x10))[_0x421063(0x1be)](_0x2991f0=>{const _0x5bba91=_0x421063,_0x74a01c=new Set();_0x2991f0['forEach'](_0x9cdf13=>{const _0x4a9de9=_0x3387;switch(_0x9cdf13['type']){case _0x4a9de9(0x1b6):{const _0x3a283c=_0x9cdf13[_0x4a9de9(0x21e)]['personId'];_0x74a01c[_0x4a9de9(0x1b6)](_0x3a283c);break;}}}),R(this[_0x5bba91(0x231)],_0x74a01c);}));}[_0x5ec575(0x1ea)](){const _0x27ebdc=_0x5ec575;this[_0x27ebdc(0x1fb)](this[_0x27ebdc(0x213)][_0x27ebdc(0x20d)]['subscribe'](async _0x4ac93f=>{const _0x558904=_0x27ebdc;var _0x4032ee,_0x2b4674,_0x5eac3a,_0x2d53e2;const _0x2b32d1=(_0x4032ee=this[_0x558904(0x1da)][_0x558904(0x1fe)](_0x4ac93f[_0x558904(0x223)])['find'](_0x40fc55=>_0x40fc55[_0x558904(0x20c)]===_0x4ac93f[_0x558904(0x20c)]))==null?void 0x0:_0x4032ee[_0x558904(0x1ec)];if(!_0x2b32d1)return;const {unitId:_0x23fc47,subUnitId:_0x5bc5c2}=_0x2b32d1;switch(_0x4ac93f[_0x558904(0x216)]&&this[_0x558904(0x1de)][_0x558904(0x1d8)](_0x4ac93f[_0x558904(0x216)]),_0x4ac93f[_0x558904(0x1f0)]){case v[_0x558904(0x22e)]:break;case v[_0x558904(0x22d)]:{this[_0x558904(0x1da)][_0x558904(0x217)](_0x23fc47,_0x5bc5c2,{'unitId':_0x23fc47,'subUnitId':_0x5bc5c2,'ref':'','id':_0x4ac93f[_0x558904(0x1f4)],'dT':f(+_0x4ac93f['createTimestamp']),'threadId':_0x4ac93f['threadId'],'personId':(_0x5eac3a=(_0x2b4674=_0x4ac93f[_0x558904(0x216)])==null?void 0x0:_0x2b4674[_0x558904(0x200)])!=null?_0x5eac3a:_0x4ac93f[_0x558904(0x1c4)],'text':JSON[_0x558904(0x201)](_0x4ac93f[_0x558904(0x21f)]),'parentId':_0x2b32d1['id']});break;}case v['Delete']:{const _0x157e8d=this[_0x558904(0x1da)][_0x558904(0x212)](_0x23fc47,_0x5bc5c2,_0x4ac93f[_0x558904(0x1f4)]);_0x157e8d&&_0x157e8d[_0x558904(0x1d4)]&&this[_0x558904(0x1da)][_0x558904(0x1e8)](_0x23fc47,_0x5bc5c2,_0x4ac93f['replyId']);break;}case v[_0x558904(0x1cf)]:{this[_0x558904(0x1da)]['updateComment'](_0x23fc47,_0x5bc5c2,{'commentId':_0x4ac93f[_0x558904(0x1f4)],'text':JSON['parse'](_0x4ac93f['content'])});break;}case v[_0x558904(0x1b7)]:{const _0x1734c0=(_0x2d53e2=this[_0x558904(0x1da)][_0x558904(0x1fe)](_0x4ac93f[_0x558904(0x223)])[_0x558904(0x1c3)](_0x87da49=>_0x87da49[_0x558904(0x20c)]===_0x4ac93f[_0x558904(0x20c)]))==null?void 0x0:_0x2d53e2[_0x558904(0x1ec)];_0x1734c0&&this['_threadCommentModel'][_0x558904(0x1d6)](_0x23fc47,_0x5bc5c2,_0x1734c0['id'],_0x4ac93f[_0x558904(0x1c1)]===I[_0x558904(0x22b)]);break;}}}));}};p=E([S(0x0,c[_0x5ec575(0x207)](b['CommentService'])),S(0x1,c[_0x5ec575(0x207)](M[_0x5ec575(0x1f6)])),S(0x2,c[_0x5ec575(0x207)](c[_0x5ec575(0x1d7)])),S(0x3,c[_0x5ec575(0x207)](c[_0x5ec575(0x1f3)]))],p);const q=_0x5ec575(0x20a),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x44554b,_0x5c618e,_0x323cd2,_0xd71627)=>{const _0x1c34b6=_0x5ec575;for(var _0x46c9fd=_0xd71627>0x1?void 0x0:_0xd71627?A(_0x5c618e,_0x323cd2):_0x5c618e,_0x59368a=_0x44554b[_0x1c34b6(0x1bc)]-0x1,_0x15a338;_0x59368a>=0x0;_0x59368a--)(_0x15a338=_0x44554b[_0x59368a])&&(_0x46c9fd=_0x15a338(_0x46c9fd)||_0x46c9fd);return _0x46c9fd;},_=(_0x580316,_0x1e3cc2)=>(_0x1e4630,_0x3b95cd)=>_0x1e3cc2(_0x1e4630,_0x3b95cd,_0x580316);function Y(_0x4c877b,_0x168ca9){const _0x129688=_0x5ec575,_0x733f99=_0x4c877b[_0x129688(0x215)][0x0];return{..._0x168ca9,'id':_0x733f99[_0x129688(0x1f4)],'resolved':_0x4c877b['solved']===0x1,'dT':f(_0x733f99[_0x129688(0x1f1)]),'personId':_0x733f99[_0x129688(0x1c4)],'threadId':_0x733f99['threadId']};}function _0x3387(_0x201e8e,_0x4e421d){const _0x740066=_0x7400();return _0x3387=function(_0x33878b,_0x1ec359){_0x33878b=_0x33878b-0x1b3;let _0x3cfd00=_0x740066[_0x33878b];return _0x3cfd00;},_0x3387(_0x201e8e,_0x4e421d);}function _0x7400(){const _0x1cbd88=['Add','2448699EsdXIs','code','_injector','getCurrentUser','/universer-api/comment/unit/','UNRECOGNIZED','add','Solve','map','Unknown','9lVBGFm','3075840kSqIzV','length','Delete','subscribe','_threadCommentDataSource','defineProperty','solved','/list','find','userId','Module','slice','delete','@univerjs-pro/collaboration-client','body','UniverThreadCommentDataSourcePlugin','/solved','stringify','_initUserSync','onStarting','Edit','77340ZeGdgq','@univerjs/core','@univerjs-pro/license','onReady','parentId','dayjs','resolveComment','UserManagerService','addUser','pluginName','_threadCommentModel','saveCommentToSnapshot','IThreadCommentDataSourceService','_threadCommentDataSourceService','_userService','378046CYVvkp','post','1348792qcNhEy','_configService','/delete','UNIVER_UNKNOWN','COMMENT','rxjs','/add','deleteComment','22WQSqDi','_init','getOwnPropertyDescriptor','root','4QxGEkj','/edit','Disposable','type','createTimestamp','filter','Injector','replyId','/reply','ThreadCommentModel','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment-ui','4NSpQor','get','disposeWithMe','size','UniverCollaborationClientPlugin','getUnit','3524390DJnaKy','userID','parse','getMemberID','@univerjs/network','3686130KohaWE','HTTPService','forEach','Inject','updateComment','customRanges','thread-comment-data-source.config','_sessionService','threadId','commentUpdate$','_httpService','OpenOrReOpen','dataSource','IConfigService','getComment','_commentService','_initDataSource','replies','user','addComment','listComments','error','users','requireSession','_config','UniverLicensePlugin','payload','content','setConfig','merge','rangeType','unitId','format','getUser','symbol','comments','Plugin','63SnKOue','reply','Solved','CustomRangeType','Reply'];_0x7400=function(){return _0x1cbd88;};return _0x7400();}function G(_0x413428,_0x17ca0e,_0x31c005){const _0x152b45=_0x5ec575;var _0x2dea2e,_0x538b3a;if(((_0x538b3a=(_0x2dea2e=_0x413428==null?void 0x0:_0x413428['replies'])==null?void 0x0:_0x2dea2e[_0x152b45(0x1bc)])!=null?_0x538b3a:0x0)>0x0){const _0x566917=(_0x1c3945,_0x392752)=>({'id':_0x1c3945[_0x152b45(0x1f4)],'threadId':_0x1c3945[_0x152b45(0x20c)],'dT':f(_0x1c3945[_0x152b45(0x1f1)]),'personId':_0x1c3945[_0x152b45(0x1c4)],'resolved':_0x413428[_0x152b45(0x1c1)]===I['Solved'],'unitId':_0x17ca0e,'subUnitId':_0x31c005,'text':JSON['parse'](_0x1c3945['content']),'parentId':_0x392752}),_0xbe1e4=_0x566917(_0x413428[_0x152b45(0x215)][0x0]);return{..._0xbe1e4,'children':_0x413428[_0x152b45(0x215)][_0x152b45(0x1c6)](0x1)[_0x152b45(0x1b8)](_0x4f4c20=>_0x566917(_0x4f4c20,_0xbe1e4['id']))};}return null;}let g=class{constructor(_0x536de8,_0x362963,_0xd34ffe,_0x2638d6){const _0x319f0c=_0x5ec575;this[_0x319f0c(0x20e)]=_0x536de8,this[_0x319f0c(0x1de)]=_0x362963,this[_0x319f0c(0x20b)]=_0xd34ffe,this[_0x319f0c(0x231)]=_0x2638d6;}async[_0x5ec575(0x217)](_0x3ef956){const _0x38952b=_0x5ec575;var _0x437854,_0x595906;const {parentId:_0x43f16a,unitId:_0x55d0b3,text:_0x25809c,threadId:_0x430b9b}=_0x3ef956,_0x555566=(_0x595906=(_0x437854=_0x25809c[_0x38952b(0x209)])==null?void 0x0:_0x437854['filter'](_0x57e67a=>_0x57e67a['rangeType']===c[_0x38952b(0x22c)][_0x38952b(0x1e5)])[_0x38952b(0x1b8)](_0x8b3ced=>_0x8b3ced['rangeId']))!=null?_0x595906:[],_0x17aa88=JSON['stringify'](_0x25809c),_0x1202d9=(await this[_0x38952b(0x20b)][_0x38952b(0x21b)](_0x55d0b3))['getMemberID']();if(_0x43f16a){const _0x2a84d9={'memberId':_0x1202d9,'unitId':_0x55d0b3,'content':_0x17aa88,'mention':_0x555566,'threadId':_0x430b9b},_0x37a2d6=(await this[_0x38952b(0x20e)][_0x38952b(0x1e0)](_0x38952b(0x1b4)+_0x55d0b3+_0x38952b(0x1f5),{'body':_0x2a84d9}))[_0x38952b(0x1c9)][_0x38952b(0x22a)];return{..._0x3ef956,'id':_0x37a2d6[_0x38952b(0x1f4)],'dT':c[_0x38952b(0x1d5)](+_0x37a2d6[_0x38952b(0x1f1)])[_0x38952b(0x224)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x37a2d6[_0x38952b(0x1c4)]};}else{const _0x48bb2b={'memberId':_0x1202d9,'unitId':_0x55d0b3,'content':_0x17aa88,'mention':_0x555566},_0x5e05dc=await this[_0x38952b(0x20e)][_0x38952b(0x1e0)](_0x38952b(0x1b4)+_0x55d0b3+_0x38952b(0x1e7),{'body':_0x48bb2b});return Y(_0x5e05dc[_0x38952b(0x1c9)]['comment'],_0x3ef956);}}async[_0x5ec575(0x208)](_0x32bc0a){const _0x30629c=_0x5ec575;var _0x4a4d95,_0x4f59c5;const {text:_0x88ea38,unitId:_0x5b815a}=_0x32bc0a,_0x5ca495=(_0x4f59c5=(_0x4a4d95=_0x88ea38[_0x30629c(0x209)])==null?void 0x0:_0x4a4d95[_0x30629c(0x1f2)](_0x4e3ecb=>_0x4e3ecb[_0x30629c(0x222)]===c[_0x30629c(0x22c)][_0x30629c(0x1e5)])['map'](_0x252da6=>_0x252da6['rangeId']))!=null?_0x4f59c5:[],_0x81cd25=JSON[_0x30629c(0x1cc)](_0x88ea38),_0x50afa0=_0x32bc0a[_0x30629c(0x20c)],_0x3e43b0=_0x32bc0a['id'],_0xd4c1b8={'memberId':(await this[_0x30629c(0x20b)][_0x30629c(0x21b)](_0x5b815a))[_0x30629c(0x202)](),'unitId':_0x5b815a,'threadId':_0x50afa0,'mention':_0x5ca495,'content':_0x81cd25,'replyId':_0x3e43b0},_0x220789=await this[_0x30629c(0x20e)][_0x30629c(0x1e0)]('/universer-api/comment/unit/'+_0x5b815a+_0x30629c(0x1ee),{'body':_0xd4c1b8});return!_0x220789[_0x30629c(0x1c9)][_0x30629c(0x219)]||_0x220789[_0x30629c(0x1c9)]['error'][_0x30629c(0x230)]===0x1;}async[_0x5ec575(0x1d6)](_0x5005d0){const _0x236e0e=_0x5ec575,{unitId:_0x50ad93}=_0x5005d0,_0xf5bc97=_0x5005d0[_0x236e0e(0x20c)],_0x45837a={'memberId':this['_userService'][_0x236e0e(0x1b3)]()[_0x236e0e(0x200)],'unitId':_0x50ad93,'threadId':_0xf5bc97,'solved':_0x5005d0['resolved']?I[_0x236e0e(0x22b)]:I[_0x236e0e(0x20f)]},_0x49d567=await this[_0x236e0e(0x20e)][_0x236e0e(0x1e0)](_0x236e0e(0x1b4)+_0x50ad93+_0x236e0e(0x1cb),{'body':_0x45837a});return!_0x49d567[_0x236e0e(0x1c9)]['error']||_0x49d567[_0x236e0e(0x1c9)]['error']['code']===0x1;}async['deleteComment'](_0x136421,_0x1c61fc,_0x4a2237,_0x286587){const _0x4edb67=_0x5ec575,_0x207b78={'memberId':(await this[_0x4edb67(0x20b)]['requireSession'](_0x136421))[_0x4edb67(0x202)](),'threadId':_0x4a2237,'replyId':_0x286587,'unitId':_0x136421},_0x478946=await this[_0x4edb67(0x20e)][_0x4edb67(0x1e0)]('/universer-api/comment/unit/'+_0x136421+_0x4edb67(0x1e3),{'body':_0x207b78});return!_0x478946[_0x4edb67(0x1c9)][_0x4edb67(0x219)]||_0x478946['body'][_0x4edb67(0x219)]['code']===0x1;}async[_0x5ec575(0x218)](_0x427dc3,_0x11bf8a,_0x3ef232){const _0x424769=_0x5ec575,_0x185df0={'unitId':_0x427dc3,'threadId':_0x3ef232},_0x55b395=await this[_0x424769(0x20e)]['post'](_0x424769(0x1b4)+_0x427dc3+_0x424769(0x1c2),{'body':_0x185df0}),_0x4d1b52=_0x3ef232[_0x424769(0x1b8)](_0x34d1da=>G(_0x55b395[_0x424769(0x1c9)][_0x424769(0x227)][_0x34d1da],_0x427dc3,_0x11bf8a))[_0x424769(0x1f2)](Boolean);return Object['values'](_0x55b395[_0x424769(0x1c9)][_0x424769(0x21a)])[_0x424769(0x206)](_0x13c8f4=>{this['_userService']['addUser'](_0x13c8f4);}),_0x4d1b52;}[_0x5ec575(0x1db)](_0x3703d5){const _0x4149e7=_0x5ec575;return{'id':_0x3703d5['id'],'threadId':_0x3703d5[_0x4149e7(0x20c)],'ref':_0x3703d5['ref']};}};g=x([_(0x0,c[_0x5ec575(0x207)](P[_0x5ec575(0x205)])),_(0x1,c[_0x5ec575(0x207)](c[_0x5ec575(0x1d7)])),_(0x2,c[_0x5ec575(0x207)](b['CollaborationSessionService'])),_(0x3,c[_0x5ec575(0x207)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x3e0612,_0x42ef71,_0x546db6,_0x7f6443)=>{const _0x245340=_0x5ec575;for(var _0x1bc69c=_0x7f6443>0x1?void 0x0:_0x7f6443?H(_0x42ef71,_0x546db6):_0x42ef71,_0x128966=_0x3e0612[_0x245340(0x1bc)]-0x1,_0x40f8c9;_0x128966>=0x0;_0x128966--)(_0x40f8c9=_0x3e0612[_0x128966])&&(_0x1bc69c=_0x40f8c9(_0x1bc69c)||_0x1bc69c);return _0x1bc69c;},y=(_0x1b5089,_0x4b05d2)=>(_0x50d5f0,_0xce471)=>_0x4b05d2(_0x50d5f0,_0xce471,_0x1b5089);let C=class extends c[_0x5ec575(0x1ef)]{constructor(_0x1ad581,_0x51426a){const _0x3f0801=_0x5ec575;super(),this[_0x3f0801(0x1dd)]=_0x1ad581,this[_0x3f0801(0x1bf)]=_0x51426a,this[_0x3f0801(0x214)]();}[_0x5ec575(0x214)](){const _0x1cafb8=_0x5ec575;this['_threadCommentDataSourceService'][_0x1cafb8(0x210)]=this[_0x1cafb8(0x1bf)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x5ec575(0x1dc)]),y(0x1,c[_0x5ec575(0x207)](g))],C);var F=Object[_0x5ec575(0x1c0)],L=Object[_0x5ec575(0x1eb)],Z=(_0x3565de,_0x3c25b5,_0x15ef16)=>_0x3c25b5 in _0x3565de?F(_0x3565de,_0x3c25b5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15ef16}):_0x3565de[_0x3c25b5]=_0x15ef16,W=(_0x207dd2,_0x805df6,_0x12689f,_0x1c2298)=>{const _0x4304e8=_0x5ec575;for(var _0x5f0319=_0x1c2298>0x1?void 0x0:_0x1c2298?L(_0x805df6,_0x12689f):_0x805df6,_0x483841=_0x207dd2[_0x4304e8(0x1bc)]-0x1,_0xdf502c;_0x483841>=0x0;_0x483841--)(_0xdf502c=_0x207dd2[_0x483841])&&(_0x5f0319=_0xdf502c(_0x5f0319)||_0x5f0319);return _0x5f0319;},O=(_0x38b208,_0xdcab5b)=>(_0xa7b1b0,_0x58bfb8)=>_0xdcab5b(_0xa7b1b0,_0x58bfb8,_0x38b208),N=(_0x2f7bf7,_0x207ff3,_0x13828f)=>Z(_0x2f7bf7,typeof _0x207ff3!=_0x5ec575(0x226)?_0x207ff3+'':_0x207ff3,_0x13828f);exports[_0x5ec575(0x1ca)]=class extends c[_0x5ec575(0x228)]{constructor(_0x7a7fc0=D,_0x3da4bf,_0x17d08e){const _0x11ab15=_0x5ec575;super(),this[_0x11ab15(0x21c)]=_0x7a7fc0,this[_0x11ab15(0x231)]=_0x3da4bf,this[_0x11ab15(0x1e2)]=_0x17d08e;const {..._0x3f2607}=c[_0x11ab15(0x221)]({},D,this[_0x11ab15(0x21c)]);this[_0x11ab15(0x1e2)][_0x11ab15(0x220)](q,_0x3f2607);}[_0x5ec575(0x1ce)](){const _0x497483=_0x5ec575;[[g],[C],[p]][_0x497483(0x206)](_0x3b2382=>{this['_injector']['add'](_0x3b2382);});}[_0x5ec575(0x1d3)](){const _0x48bcea=_0x5ec575;this[_0x48bcea(0x231)][_0x48bcea(0x1fa)](C),this[_0x48bcea(0x231)][_0x48bcea(0x1fa)](p);}},N(exports[_0x5ec575(0x1ca)],_0x5ec575(0x1d9),U),N(exports[_0x5ec575(0x1ca)],_0x5ec575(0x1f0),c['UniverInstanceType'][_0x5ec575(0x1e4)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x5ec575(0x1fd)],T[_0x5ec575(0x21d)]),O(0x1,c[_0x5ec575(0x207)](c[_0x5ec575(0x1f3)])),O(0x2,c[_0x5ec575(0x211)])],exports[_0x5ec575(0x1ca)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3767(){const _0x5233a8=['solved','addUser','getCurrentUser','rangeId','post','4154064AHckNC','thread-comment-data-source.config','Unknown','disposeWithMe','setConfig','root','updateComment','filter','Edit','getUser','_threadCommentDataSource','21847VoEvdh','_sessionService','body','length','onStarting','content','reply','customRanges','/edit','createTimestamp','addComment','_injector','Solve','ref','onReady','1900593PgXnwe','UNIVER_UNKNOWN','_config','user','format','/universer-api/user/list','/add','_httpService','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','YYYY/MM/DD\x20HH:mm','stringify','Delete','symbol','replies','Add','/list','get','slice','dataSource','add','unitId','_commentService','resolveComment','/reply','getComment','personId','2934FYSOcN','syncUpdateMutationToColla','userID','map','115100MLLqVg','_initUserSync','/universer-api/comment/unit/','Solved','OpenOrReOpen','code','commentUpdate$','type','requireSession','rangeType','pluginName','Reply','find','threadId','listComments','8630390Yumofa','getMemberID','getUnit','4675692FsTVDL','comments','parse','getOwnPropertyDescriptor','payload','3271586Xmexbm','parentId','subscribe','_threadCommentDataSourceService','_init','_userService','userId','_initDataSource','delete','deleteComment','1GVUxAp','users','saveCommentToSnapshot','size','_threadCommentModel','replyId','forEach','error'];_0x3767=function(){return _0x5233a8;};return _0x3767();}const _0x471d44=_0x4b1d;function _0x4b1d(_0x4517b0,_0x5e6e6a){const _0x37671b=_0x3767();return _0x4b1d=function(_0x4b1d76,_0x13d919){_0x4b1d76=_0x4b1d76-0x126;let _0xad7dff=_0x37671b[_0x4b1d76];return _0xad7dff;},_0x4b1d(_0x4517b0,_0x5e6e6a);}(function(_0x56376d,_0x57cdbb){const _0x2fe99a=_0x4b1d,_0x2c80b1=_0x56376d();while(!![]){try{const _0x5572ba=-parseInt(_0x2fe99a(0x13f))/0x1*(-parseInt(_0x2fe99a(0x135))/0x2)+-parseInt(_0x2fe99a(0x130))/0x3+-parseInt(_0x2fe99a(0x185))/0x4+parseInt(_0x2fe99a(0x12d))/0x5+parseInt(_0x2fe99a(0x181))/0x6*(-parseInt(_0x2fe99a(0x157))/0x7)+parseInt(_0x2fe99a(0x14c))/0x8+parseInt(_0x2fe99a(0x166))/0x9;if(_0x5572ba===_0x57cdbb)break;else _0x2c80b1['push'](_0x2c80b1['shift']());}catch(_0x8394ac){_0x2c80b1['push'](_0x2c80b1['shift']());}}}(_0x3767,0xeef6e));import{CommentService as _0x33903b,CollaborationSessionService as _0x57fc12,UniverCollaborationClientPlugin as _0x25f22d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4830c9}from'@univerjs-pro/license';import{dayjs as _0x542289,UserManagerService as _0x2f2550,Inject as _0x585a25,Injector as _0x38d7e2,Disposable as _0xd8303e,CustomRangeType as _0x5b5935,UniverInstanceType as _0xa7757e,DependentOn as _0x5eb8d0,IConfigService as _0x44404c,Plugin as _0x522f37,merge as _0x3dd9ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x38085d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53494f,IThreadCommentDataSourceService as _0x28d703}from'@univerjs/thread-comment';import{bufferTime as _0x6080b5}from'rxjs';import{HTTPService as _0x2b4352}from'@univerjs/network';const W=_0x471d44(0x16f);var I=(_0x40630c=>(_0x40630c[_0x40630c[_0x471d44(0x189)]=0x0]=_0x471d44(0x189),_0x40630c[_0x40630c[_0x471d44(0x188)]=0x1]='Solved',_0x40630c[_0x40630c[_0x471d44(0x16e)]=-0x1]=_0x471d44(0x16e),_0x40630c))(I||{}),v=(_0x5f237c=>(_0x5f237c[_0x5f237c[_0x471d44(0x14e)]=0x0]=_0x471d44(0x14e),_0x5f237c[_0x5f237c[_0x471d44(0x175)]=0x1]='Add',_0x5f237c[_0x5f237c[_0x471d44(0x129)]=0x2]='Reply',_0x5f237c[_0x5f237c[_0x471d44(0x154)]=0x3]=_0x471d44(0x154),_0x5f237c[_0x5f237c['Delete']=0x4]=_0x471d44(0x172),_0x5f237c[_0x5f237c[_0x471d44(0x163)]=0x5]=_0x471d44(0x163),_0x5f237c[_0x5f237c['UNRECOGNIZED']=-0x1]=_0x471d44(0x16e),_0x5f237c))(v||{});const D=_0x4a2a4e=>_0x542289(new Date(+_0x4a2a4e))[_0x471d44(0x16a)](_0x471d44(0x170)),B=async(_0x27e73a,_0xb1756a)=>{const _0x53e5bd=_0x471d44,_0x1a24bb=_0x27e73a[_0x53e5bd(0x177)](_0x2f2550),_0x14693e=_0x27e73a[_0x53e5bd(0x177)](_0x2b4352);_0xb1756a['forEach'](_0xaf2485=>{const _0x1f1c0d=_0x53e5bd;_0x1a24bb[_0x1f1c0d(0x155)](_0xaf2485)&&_0xb1756a[_0x1f1c0d(0x13d)](_0xaf2485);}),_0xb1756a[_0x53e5bd(0x142)]&&(await _0x14693e[_0x53e5bd(0x177)](_0x53e5bd(0x16b),{'params':{'userIDs':[..._0xb1756a]}}))['body'][_0x53e5bd(0x140)]['forEach'](_0x5e6c0c=>{const _0x3d5a5e=_0x53e5bd;_0x5e6c0c&&_0x1a24bb[_0x3d5a5e(0x148)](_0x5e6c0c);});};var K=Object[_0x471d44(0x133)],V=(_0x368e01,_0x36656a,_0x487054,_0xb8eacb)=>{for(var _0x50c4a8=_0xb8eacb>0x1?void 0x0:_0xb8eacb?K(_0x36656a,_0x487054):_0x36656a,_0x52f94f=_0x368e01['length']-0x1,_0x43201b;_0x52f94f>=0x0;_0x52f94f--)(_0x43201b=_0x368e01[_0x52f94f])&&(_0x50c4a8=_0x43201b(_0x50c4a8)||_0x50c4a8);return _0x50c4a8;},p=(_0x407725,_0x1c159f)=>(_0x32831a,_0x38b1a3)=>_0x1c159f(_0x32831a,_0x38b1a3,_0x407725);let S=class extends _0xd8303e{constructor(_0x128ea7,_0x2eea8b,_0x29a2ff,_0x2e0f3e){const _0x12d17b=_0x471d44;super(),this['_commentService']=_0x128ea7,this[_0x12d17b(0x143)]=_0x2eea8b,this[_0x12d17b(0x13a)]=_0x29a2ff,this[_0x12d17b(0x162)]=_0x2e0f3e,this[_0x12d17b(0x139)](),this[_0x12d17b(0x186)]();}[_0x471d44(0x186)](){const _0x173794=_0x471d44;this[_0x173794(0x14f)](this[_0x173794(0x143)][_0x173794(0x18b)]['pipe'](_0x6080b5(0x10))[_0x173794(0x137)](_0x120f1f=>{const _0x212c6c=_0x173794,_0x528956=new Set();_0x120f1f[_0x212c6c(0x145)](_0x3573b8=>{const _0x1c0739=_0x212c6c;switch(_0x3573b8[_0x1c0739(0x18c)]){case _0x1c0739(0x17a):{const _0x56f427=_0x3573b8[_0x1c0739(0x134)][_0x1c0739(0x180)];_0x528956['add'](_0x56f427);break;}}}),B(this['_injector'],_0x528956);}));}[_0x471d44(0x139)](){const _0x1d7c68=_0x471d44;this[_0x1d7c68(0x14f)](this[_0x1d7c68(0x17c)][_0x1d7c68(0x18b)][_0x1d7c68(0x137)](async _0x9fe908=>{const _0x39dde8=_0x1d7c68;var _0xf88db7,_0x1b28d6,_0x1640a7,_0x3cfa2d;const _0x4f292b=(_0xf88db7=this[_0x39dde8(0x143)]['getUnit'](_0x9fe908[_0x39dde8(0x17b)])['find'](_0x48dffd=>_0x48dffd[_0x39dde8(0x12b)]===_0x9fe908[_0x39dde8(0x12b)]))==null?void 0x0:_0xf88db7['root'];if(!_0x4f292b)return;const {unitId:_0x4af91a,subUnitId:_0x9092ef}=_0x4f292b;switch(_0x9fe908[_0x39dde8(0x169)]&&this[_0x39dde8(0x13a)]['addUser'](_0x9fe908[_0x39dde8(0x169)]),_0x9fe908[_0x39dde8(0x18c)]){case v['Add']:break;case v['Reply']:{this[_0x39dde8(0x143)]['addComment'](_0x4af91a,_0x9092ef,{'unitId':_0x4af91a,'subUnitId':_0x9092ef,'ref':'','id':_0x9fe908[_0x39dde8(0x144)],'dT':D(+_0x9fe908[_0x39dde8(0x160)]),'threadId':_0x9fe908[_0x39dde8(0x12b)],'personId':(_0x1640a7=(_0x1b28d6=_0x9fe908['user'])==null?void 0x0:_0x1b28d6[_0x39dde8(0x183)])!=null?_0x1640a7:_0x9fe908[_0x39dde8(0x13b)],'text':JSON[_0x39dde8(0x132)](_0x9fe908[_0x39dde8(0x15c)]),'parentId':_0x4f292b['id']});break;}case v[_0x39dde8(0x172)]:{const _0x251db2=this['_threadCommentModel'][_0x39dde8(0x17f)](_0x4af91a,_0x9092ef,_0x9fe908['replyId']);_0x251db2&&_0x251db2[_0x39dde8(0x136)]&&this['_threadCommentModel'][_0x39dde8(0x13e)](_0x4af91a,_0x9092ef,_0x9fe908[_0x39dde8(0x144)]);break;}case v[_0x39dde8(0x154)]:{this['_threadCommentModel'][_0x39dde8(0x152)](_0x4af91a,_0x9092ef,{'commentId':_0x9fe908[_0x39dde8(0x144)],'text':JSON[_0x39dde8(0x132)](_0x9fe908[_0x39dde8(0x15c)])});break;}case v['Solve']:{const _0x213adc=(_0x3cfa2d=this[_0x39dde8(0x143)][_0x39dde8(0x12f)](_0x9fe908[_0x39dde8(0x17b)])[_0x39dde8(0x12a)](_0x17c11f=>_0x17c11f['threadId']===_0x9fe908['threadId']))==null?void 0x0:_0x3cfa2d[_0x39dde8(0x151)];_0x213adc&&this['_threadCommentModel'][_0x39dde8(0x17d)](_0x4af91a,_0x9092ef,_0x213adc['id'],_0x9fe908[_0x39dde8(0x147)]===I[_0x39dde8(0x188)]);break;}}}));}};S=V([p(0x0,_0x585a25(_0x33903b)),p(0x1,_0x585a25(_0x53494f)),p(0x2,_0x585a25(_0x2f2550)),p(0x3,_0x585a25(_0x38d7e2))],S);const z=_0x471d44(0x14d),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x51de9a,_0x239ad9,_0x2cce2e,_0x53e134)=>{const _0x143909=_0x471d44;for(var _0x1e7090=_0x53e134>0x1?void 0x0:_0x53e134?k(_0x239ad9,_0x2cce2e):_0x239ad9,_0xd443e9=_0x51de9a[_0x143909(0x15a)]-0x1,_0x50b3f2;_0xd443e9>=0x0;_0xd443e9--)(_0x50b3f2=_0x51de9a[_0xd443e9])&&(_0x1e7090=_0x50b3f2(_0x1e7090)||_0x1e7090);return _0x1e7090;},_=(_0x26d4d6,_0x48b834)=>(_0x276825,_0xd2df3d)=>_0x48b834(_0x276825,_0xd2df3d,_0x26d4d6);function X(_0x5d354c,_0x12f0c0){const _0x541d2f=_0x471d44,_0x3a906b=_0x5d354c[_0x541d2f(0x174)][0x0];return{..._0x12f0c0,'id':_0x3a906b[_0x541d2f(0x144)],'resolved':_0x5d354c[_0x541d2f(0x147)]===0x1,'dT':D(_0x3a906b[_0x541d2f(0x160)]),'personId':_0x3a906b[_0x541d2f(0x13b)],'threadId':_0x3a906b[_0x541d2f(0x12b)]};}function ee(_0x35b3d2,_0x33f0af,_0x60c4b5){const _0x30ede9=_0x471d44;var _0x239069,_0x532cef;if(((_0x532cef=(_0x239069=_0x35b3d2==null?void 0x0:_0x35b3d2['replies'])==null?void 0x0:_0x239069[_0x30ede9(0x15a)])!=null?_0x532cef:0x0)>0x0){const _0x24bdf0=(_0x187021,_0x4147a4)=>({'id':_0x187021[_0x30ede9(0x144)],'threadId':_0x187021[_0x30ede9(0x12b)],'dT':D(_0x187021[_0x30ede9(0x160)]),'personId':_0x187021['userId'],'resolved':_0x35b3d2['solved']===I['Solved'],'unitId':_0x33f0af,'subUnitId':_0x60c4b5,'text':JSON[_0x30ede9(0x132)](_0x187021[_0x30ede9(0x15c)]),'parentId':_0x4147a4}),_0x15d48a=_0x24bdf0(_0x35b3d2['replies'][0x0]);return{..._0x15d48a,'children':_0x35b3d2[_0x30ede9(0x174)][_0x30ede9(0x178)](0x1)[_0x30ede9(0x184)](_0x56f781=>_0x24bdf0(_0x56f781,_0x15d48a['id']))};}return null;}let f=class{constructor(_0x32bcbd,_0x36feeb,_0x5d84e6,_0x25eb31){const _0x1fe988=_0x471d44;this[_0x1fe988(0x16d)]=_0x32bcbd,this[_0x1fe988(0x13a)]=_0x36feeb,this[_0x1fe988(0x158)]=_0x5d84e6,this['_injector']=_0x25eb31;}async[_0x471d44(0x161)](_0x38196b){const _0x10b164=_0x471d44;var _0xcaf37b,_0x1b9e61;const {parentId:_0x275e51,unitId:_0x196b63,text:_0x14dcc1,threadId:_0x224f2a}=_0x38196b,_0x25cac2=(_0x1b9e61=(_0xcaf37b=_0x14dcc1['customRanges'])==null?void 0x0:_0xcaf37b[_0x10b164(0x153)](_0x291021=>_0x291021[_0x10b164(0x127)]===_0x5b5935['COMMENT'])[_0x10b164(0x184)](_0x2be23d=>_0x2be23d[_0x10b164(0x14a)]))!=null?_0x1b9e61:[],_0x5a7063=JSON[_0x10b164(0x171)](_0x14dcc1),_0x95c005=(await this[_0x10b164(0x158)][_0x10b164(0x126)](_0x196b63))[_0x10b164(0x12e)]();if(_0x275e51){const _0x40552e={'memberId':_0x95c005,'unitId':_0x196b63,'content':_0x5a7063,'mention':_0x25cac2,'threadId':_0x224f2a},_0x43617b=(await this[_0x10b164(0x16d)][_0x10b164(0x14b)](_0x10b164(0x187)+_0x196b63+_0x10b164(0x17e),{'body':_0x40552e}))['body'][_0x10b164(0x15d)];return{..._0x38196b,'id':_0x43617b['replyId'],'dT':_0x542289(+_0x43617b['createTimestamp'])[_0x10b164(0x16a)](_0x10b164(0x170)),'personId':_0x43617b[_0x10b164(0x13b)]};}else{const _0x3487a3={'memberId':_0x95c005,'unitId':_0x196b63,'content':_0x5a7063,'mention':_0x25cac2},_0x536e54=await this[_0x10b164(0x16d)][_0x10b164(0x14b)](_0x10b164(0x187)+_0x196b63+_0x10b164(0x16c),{'body':_0x3487a3});return X(_0x536e54[_0x10b164(0x159)]['comment'],_0x38196b);}}async['updateComment'](_0x2cc9fd){const _0x4c14fd=_0x471d44;var _0x9ddf99,_0x3b0d3a;const {text:_0x2892cc,unitId:_0x3ed4b2}=_0x2cc9fd,_0x112963=(_0x3b0d3a=(_0x9ddf99=_0x2892cc[_0x4c14fd(0x15e)])==null?void 0x0:_0x9ddf99[_0x4c14fd(0x153)](_0x3c85ba=>_0x3c85ba[_0x4c14fd(0x127)]===_0x5b5935['COMMENT'])['map'](_0x1ee985=>_0x1ee985[_0x4c14fd(0x14a)]))!=null?_0x3b0d3a:[],_0x45feac=JSON['stringify'](_0x2892cc),_0x51644f=_0x2cc9fd[_0x4c14fd(0x12b)],_0x4a7d86=_0x2cc9fd['id'],_0x46a03b={'memberId':(await this['_sessionService'][_0x4c14fd(0x126)](_0x3ed4b2))['getMemberID'](),'unitId':_0x3ed4b2,'threadId':_0x51644f,'mention':_0x112963,'content':_0x45feac,'replyId':_0x4a7d86},_0x42aed9=await this[_0x4c14fd(0x16d)][_0x4c14fd(0x14b)]('/universer-api/comment/unit/'+_0x3ed4b2+_0x4c14fd(0x15f),{'body':_0x46a03b});return!_0x42aed9[_0x4c14fd(0x159)][_0x4c14fd(0x146)]||_0x42aed9[_0x4c14fd(0x159)][_0x4c14fd(0x146)][_0x4c14fd(0x18a)]===0x1;}async[_0x471d44(0x17d)](_0x583b9d){const _0x387b43=_0x471d44,{unitId:_0x2c606a}=_0x583b9d,_0x13818a=_0x583b9d[_0x387b43(0x12b)],_0x4a443e={'memberId':this[_0x387b43(0x13a)][_0x387b43(0x149)]()[_0x387b43(0x183)],'unitId':_0x2c606a,'threadId':_0x13818a,'solved':_0x583b9d['resolved']?I[_0x387b43(0x188)]:I[_0x387b43(0x189)]},_0xe4c21a=await this[_0x387b43(0x16d)]['post']('/universer-api/comment/unit/'+_0x2c606a+'/solved',{'body':_0x4a443e});return!_0xe4c21a['body'][_0x387b43(0x146)]||_0xe4c21a[_0x387b43(0x159)][_0x387b43(0x146)]['code']===0x1;}async[_0x471d44(0x13e)](_0x38393e,_0x2eb112,_0x4ace57,_0x2809b9){const _0x2e628f=_0x471d44,_0x1e5a4b={'memberId':(await this['_sessionService'][_0x2e628f(0x126)](_0x38393e))[_0x2e628f(0x12e)](),'threadId':_0x4ace57,'replyId':_0x2809b9,'unitId':_0x38393e},_0x3f3636=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x38393e+'/delete',{'body':_0x1e5a4b});return!_0x3f3636[_0x2e628f(0x159)]['error']||_0x3f3636['body']['error'][_0x2e628f(0x18a)]===0x1;}async[_0x471d44(0x12c)](_0xbc7f52,_0x248a26,_0x3816b7){const _0x579359=_0x471d44,_0x2202a3={'unitId':_0xbc7f52,'threadId':_0x3816b7},_0x3c3116=await this[_0x579359(0x16d)][_0x579359(0x14b)]('/universer-api/comment/unit/'+_0xbc7f52+_0x579359(0x176),{'body':_0x2202a3}),_0x52e62a=_0x3816b7['map'](_0x50ab08=>ee(_0x3c3116['body'][_0x579359(0x131)][_0x50ab08],_0xbc7f52,_0x248a26))[_0x579359(0x153)](Boolean);return Object['values'](_0x3c3116['body']['users'])[_0x579359(0x145)](_0x1dc94d=>{const _0x1f1c78=_0x579359;this[_0x1f1c78(0x13a)][_0x1f1c78(0x148)](_0x1dc94d);}),_0x52e62a;}[_0x471d44(0x141)](_0x882e40){const _0x546fd7=_0x471d44;return{'id':_0x882e40['id'],'threadId':_0x882e40[_0x546fd7(0x12b)],'ref':_0x882e40[_0x546fd7(0x164)]};}};f=Q([_(0x0,_0x585a25(_0x2b4352)),_(0x1,_0x585a25(_0x2f2550)),_(0x2,_0x585a25(_0x57fc12)),_(0x3,_0x585a25(_0x38d7e2))],f);var re=Object[_0x471d44(0x133)],te=(_0x4d8d55,_0x3c08d0,_0x331d20,_0x526fd1)=>{const _0x5c0597=_0x471d44;for(var _0x46aeeb=_0x526fd1>0x1?void 0x0:_0x526fd1?re(_0x3c08d0,_0x331d20):_0x3c08d0,_0x2542d8=_0x4d8d55[_0x5c0597(0x15a)]-0x1,_0x2277fe;_0x2542d8>=0x0;_0x2542d8--)(_0x2277fe=_0x4d8d55[_0x2542d8])&&(_0x46aeeb=_0x2277fe(_0x46aeeb)||_0x46aeeb);return _0x46aeeb;},N=(_0x188d4c,_0x28561a)=>(_0x20fe74,_0x1281eb)=>_0x28561a(_0x20fe74,_0x1281eb,_0x188d4c);let g=class extends _0xd8303e{constructor(_0xa9e4c0,_0x30dbd7){const _0x20e9ff=_0x471d44;super(),this[_0x20e9ff(0x138)]=_0xa9e4c0,this[_0x20e9ff(0x156)]=_0x30dbd7,this[_0x20e9ff(0x13c)]();}['_initDataSource'](){const _0x57519e=_0x471d44;this['_threadCommentDataSourceService'][_0x57519e(0x179)]=this['_threadCommentDataSource'],this[_0x57519e(0x138)][_0x57519e(0x182)]=!0x1;}};g=te([N(0x0,_0x28d703),N(0x1,_0x585a25(f))],g);var se=Object['defineProperty'],oe=Object[_0x471d44(0x133)],ne=(_0x456740,_0xf43f12,_0xf1cd68)=>_0xf43f12 in _0x456740?se(_0x456740,_0xf43f12,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf1cd68}):_0x456740[_0xf43f12]=_0xf1cd68,ie=(_0x9fc310,_0x28407b,_0x227a99,_0x54bf50)=>{for(var _0x2dc6db=_0x54bf50>0x1?void 0x0:_0x54bf50?oe(_0x28407b,_0x227a99):_0x28407b,_0x57d890=_0x9fc310['length']-0x1,_0x377612;_0x57d890>=0x0;_0x57d890--)(_0x377612=_0x9fc310[_0x57d890])&&(_0x2dc6db=_0x377612(_0x2dc6db)||_0x2dc6db);return _0x2dc6db;},w=(_0x303ee3,_0x577386)=>(_0x3ec565,_0x4d3584)=>_0x577386(_0x3ec565,_0x4d3584,_0x303ee3),$=(_0x59955b,_0x1dbea9,_0x282183)=>ne(_0x59955b,typeof _0x1dbea9!=_0x471d44(0x173)?_0x1dbea9+'':_0x1dbea9,_0x282183);let b=class extends _0x522f37{constructor(_0x434a5a=M,_0x257695,_0x5f4bec){const _0x2ca925=_0x471d44;super(),this[_0x2ca925(0x168)]=_0x434a5a,this[_0x2ca925(0x162)]=_0x257695,this['_configService']=_0x5f4bec;const {..._0x360271}=_0x3dd9ff({},M,this[_0x2ca925(0x168)]);this['_configService'][_0x2ca925(0x150)](z,_0x360271);}[_0x471d44(0x15b)](){const _0x5999f6=_0x471d44;[[f],[g],[S]][_0x5999f6(0x145)](_0x581e38=>{const _0x41c65b=_0x5999f6;this[_0x41c65b(0x162)][_0x41c65b(0x17a)](_0x581e38);});}[_0x471d44(0x165)](){const _0x5467ad=_0x471d44;this['_injector'][_0x5467ad(0x177)](g),this[_0x5467ad(0x162)]['get'](S);}};$(b,_0x471d44(0x128),W),$(b,'type',_0xa7757e[_0x471d44(0x167)]),b=ie([_0x5eb8d0(_0x38085d,_0x25f22d,_0x4830c9),w(0x1,_0x585a25(_0x38d7e2)),w(0x2,_0x44404c)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3f4afc=_0x2b04;(function(_0x4f6264,_0x411fbb){const _0x5e5296=_0x2b04,_0x58837c=_0x4f6264();while(!![]){try{const _0x3a62cc=parseInt(_0x5e5296(0x155))/0x1*(-parseInt(_0x5e5296(0x14a))/0x2)+parseInt(_0x5e5296(0x164))/0x3*(-parseInt(_0x5e5296(0x10f))/0x4)+parseInt(_0x5e5296(0x11f))/0x5*(-parseInt(_0x5e5296(0x169))/0x6)+-parseInt(_0x5e5296(0x14c))/0x7+-parseInt(_0x5e5296(0x10a))/0x8*(-parseInt(_0x5e5296(0x120))/0x9)+-parseInt(_0x5e5296(0x166))/0xa*(-parseInt(_0x5e5296(0x128))/0xb)+parseInt(_0x5e5296(0x132))/0xc;if(_0x3a62cc===_0x411fbb)break;else _0x58837c['push'](_0x58837c['shift']());}catch(_0x2e548b){_0x58837c['push'](_0x58837c['shift']());}}}(_0x3af9,0x5489e));import{CommentService as _0x84580b,CollaborationSessionService as _0x1bf408,UniverCollaborationClientPlugin as _0x1e3b86}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2a1bc5}from'@univerjs-pro/license';import{dayjs as _0x4f4ce7,UserManagerService as _0x554e61,Inject as _0x194cc9,Injector as _0x3963d7,Disposable as _0x3fd518,CustomRangeType as _0x1a473c,UniverInstanceType as _0x183756,DependentOn as _0x5c3377,IConfigService as _0x1131bc,Plugin as _0x3f2e1d,merge as _0x5e9b24}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b39b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4f8fec,IThreadCommentDataSourceService as _0x31dd5a}from'@univerjs/thread-comment';import{bufferTime as _0x72024c}from'rxjs';import{HTTPService as _0x5554b4}from'@univerjs/network';const W=_0x3f4afc(0x130);function _0x3af9(){const _0x38bd9d=['/universer-api/comment/unit/','root','commentUpdate$','UNIVER_UNKNOWN','_threadCommentDataSource','_httpService','OpenOrReOpen','getCurrentUser','deleteComment','Solved','disposeWithMe','_configService','addComment','find','_initDataSource','listComments','content','onReady','personId','getUser','_threadCommentModel','Reply','add','5626dyfDJg','COMMENT','2464385DcpgGI','/solved','values','delete','map','_initUserSync','Edit','post','slice','19rOLctN','rangeType','_threadCommentDataSourceService','_sessionService','get','syncUpdateMutationToColla','/edit','saveCommentToSnapshot','Delete','_commentService','Solve','stringify','parse','_userService','resolveComment','3oFVddP','_injector','10xIQJYj','filter','getUnit','2046FFEfba','threadId','pluginName','unitId','_init','replies','41048fiIeRx','onStarting','forEach','addUser','reply','1692892RkaMfl','getMemberID','userId','YYYY/MM/DD\x20HH:mm','resolved','parentId','length','Unknown','_config','size','error','/universer-api/user/list','replyId','getOwnPropertyDescriptor','createTimestamp','body','6585Kybagt','1017ZnkAAE','subscribe','dataSource','type','code','comments','ref','userID','3242613wunRSx','UNRECOGNIZED','user','rangeId','solved','/reply','requireSession','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','8994072MEdlCo'];_0x3af9=function(){return _0x38bd9d;};return _0x3af9();}var I=(_0x45267d=>(_0x45267d[_0x45267d[_0x3f4afc(0x139)]=0x0]=_0x3f4afc(0x139),_0x45267d[_0x45267d[_0x3f4afc(0x13c)]=0x1]='Solved',_0x45267d[_0x45267d[_0x3f4afc(0x129)]=-0x1]=_0x3f4afc(0x129),_0x45267d))(I||{}),v=(_0x2863e8=>(_0x2863e8[_0x2863e8[_0x3f4afc(0x116)]=0x0]='Unknown',_0x2863e8[_0x2863e8[_0x3f4afc(0x12f)]=0x1]='Add',_0x2863e8[_0x2863e8[_0x3f4afc(0x148)]=0x2]=_0x3f4afc(0x148),_0x2863e8[_0x2863e8[_0x3f4afc(0x152)]=0x3]=_0x3f4afc(0x152),_0x2863e8[_0x2863e8['Delete']=0x4]=_0x3f4afc(0x15d),_0x2863e8[_0x2863e8[_0x3f4afc(0x15f)]=0x5]='Solve',_0x2863e8[_0x2863e8[_0x3f4afc(0x129)]=-0x1]=_0x3f4afc(0x129),_0x2863e8))(v||{});const D=_0x4b910a=>_0x4f4ce7(new Date(+_0x4b910a))['format'](_0x3f4afc(0x112)),B=async(_0x121f67,_0x41a19b)=>{const _0x55ff18=_0x3f4afc,_0x313d9b=_0x121f67['get'](_0x554e61),_0x477a19=_0x121f67[_0x55ff18(0x159)](_0x5554b4);_0x41a19b[_0x55ff18(0x10c)](_0x2de2bb=>{const _0x2b7b42=_0x55ff18;_0x313d9b[_0x2b7b42(0x146)](_0x2de2bb)&&_0x41a19b[_0x2b7b42(0x14f)](_0x2de2bb);}),_0x41a19b[_0x55ff18(0x118)]&&(await _0x477a19[_0x55ff18(0x159)](_0x55ff18(0x11a),{'params':{'userIDs':[..._0x41a19b]}}))[_0x55ff18(0x11e)][_0x55ff18(0x131)][_0x55ff18(0x10c)](_0x3bd3d9=>{_0x3bd3d9&&_0x313d9b['addUser'](_0x3bd3d9);});};var K=Object[_0x3f4afc(0x11c)],V=(_0x433eed,_0x278ba2,_0xee277b,_0x57fc2b)=>{const _0x566bf9=_0x3f4afc;for(var _0x3bd754=_0x57fc2b>0x1?void 0x0:_0x57fc2b?K(_0x278ba2,_0xee277b):_0x278ba2,_0x54c20d=_0x433eed[_0x566bf9(0x115)]-0x1,_0x388b7e;_0x54c20d>=0x0;_0x54c20d--)(_0x388b7e=_0x433eed[_0x54c20d])&&(_0x3bd754=_0x388b7e(_0x3bd754)||_0x3bd754);return _0x3bd754;},p=(_0x19716e,_0x2a201f)=>(_0x205992,_0x19f59a)=>_0x2a201f(_0x205992,_0x19f59a,_0x19716e);let S=class extends _0x3fd518{constructor(_0x562c46,_0x5d6969,_0x1fa01a,_0x13cab5){const _0x126c75=_0x3f4afc;super(),this[_0x126c75(0x15e)]=_0x562c46,this[_0x126c75(0x147)]=_0x5d6969,this[_0x126c75(0x162)]=_0x1fa01a,this[_0x126c75(0x165)]=_0x13cab5,this[_0x126c75(0x16d)](),this[_0x126c75(0x151)]();}[_0x3f4afc(0x151)](){const _0x5780f8=_0x3f4afc;this[_0x5780f8(0x13d)](this[_0x5780f8(0x147)][_0x5780f8(0x135)]['pipe'](_0x72024c(0x10))[_0x5780f8(0x121)](_0x142ab9=>{const _0x1eb9cb=_0x5780f8,_0x4efb78=new Set();_0x142ab9[_0x1eb9cb(0x10c)](_0xa31414=>{const _0x188b3f=_0x1eb9cb;switch(_0xa31414[_0x188b3f(0x123)]){case _0x188b3f(0x149):{const _0x374951=_0xa31414['payload'][_0x188b3f(0x145)];_0x4efb78[_0x188b3f(0x149)](_0x374951);break;}}}),B(this[_0x1eb9cb(0x165)],_0x4efb78);}));}[_0x3f4afc(0x16d)](){const _0x33780d=_0x3f4afc;this['disposeWithMe'](this[_0x33780d(0x15e)][_0x33780d(0x135)][_0x33780d(0x121)](async _0x211bbb=>{const _0x36efe0=_0x33780d;var _0x3869e5,_0x306a69,_0x24d03c,_0x328514;const _0x2f2aeb=(_0x3869e5=this[_0x36efe0(0x147)][_0x36efe0(0x168)](_0x211bbb['unitId'])[_0x36efe0(0x140)](_0x113db3=>_0x113db3['threadId']===_0x211bbb[_0x36efe0(0x16a)]))==null?void 0x0:_0x3869e5[_0x36efe0(0x134)];if(!_0x2f2aeb)return;const {unitId:_0x2c5c7e,subUnitId:_0x464c80}=_0x2f2aeb;switch(_0x211bbb[_0x36efe0(0x12a)]&&this[_0x36efe0(0x162)][_0x36efe0(0x10d)](_0x211bbb[_0x36efe0(0x12a)]),_0x211bbb[_0x36efe0(0x123)]){case v['Add']:break;case v[_0x36efe0(0x148)]:{this[_0x36efe0(0x147)][_0x36efe0(0x13f)](_0x2c5c7e,_0x464c80,{'unitId':_0x2c5c7e,'subUnitId':_0x464c80,'ref':'','id':_0x211bbb[_0x36efe0(0x11b)],'dT':D(+_0x211bbb[_0x36efe0(0x11d)]),'threadId':_0x211bbb[_0x36efe0(0x16a)],'personId':(_0x24d03c=(_0x306a69=_0x211bbb[_0x36efe0(0x12a)])==null?void 0x0:_0x306a69[_0x36efe0(0x127)])!=null?_0x24d03c:_0x211bbb[_0x36efe0(0x111)],'text':JSON[_0x36efe0(0x161)](_0x211bbb['content']),'parentId':_0x2f2aeb['id']});break;}case v[_0x36efe0(0x15d)]:{const _0x751070=this['_threadCommentModel']['getComment'](_0x2c5c7e,_0x464c80,_0x211bbb[_0x36efe0(0x11b)]);_0x751070&&_0x751070[_0x36efe0(0x114)]&&this[_0x36efe0(0x147)]['deleteComment'](_0x2c5c7e,_0x464c80,_0x211bbb[_0x36efe0(0x11b)]);break;}case v[_0x36efe0(0x152)]:{this[_0x36efe0(0x147)]['updateComment'](_0x2c5c7e,_0x464c80,{'commentId':_0x211bbb[_0x36efe0(0x11b)],'text':JSON[_0x36efe0(0x161)](_0x211bbb[_0x36efe0(0x143)])});break;}case v['Solve']:{const _0x52b99c=(_0x328514=this[_0x36efe0(0x147)][_0x36efe0(0x168)](_0x211bbb[_0x36efe0(0x16c)])[_0x36efe0(0x140)](_0x18fe3b=>_0x18fe3b[_0x36efe0(0x16a)]===_0x211bbb[_0x36efe0(0x16a)]))==null?void 0x0:_0x328514[_0x36efe0(0x134)];_0x52b99c&&this[_0x36efe0(0x147)][_0x36efe0(0x163)](_0x2c5c7e,_0x464c80,_0x52b99c['id'],_0x211bbb[_0x36efe0(0x12c)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x194cc9(_0x84580b)),p(0x1,_0x194cc9(_0x4f8fec)),p(0x2,_0x194cc9(_0x554e61)),p(0x3,_0x194cc9(_0x3963d7))],S);function _0x2b04(_0x2db369,_0x29528b){const _0x3af9bc=_0x3af9();return _0x2b04=function(_0x2b0459,_0x20ea74){_0x2b0459=_0x2b0459-0x10a;let _0x40b1f9=_0x3af9bc[_0x2b0459];return _0x40b1f9;},_0x2b04(_0x2db369,_0x29528b);}const z='thread-comment-data-source.config',M={};var k=Object[_0x3f4afc(0x11c)],Q=(_0xb926e9,_0x250cac,_0x33a466,_0xdf9c8f)=>{const _0x167dcc=_0x3f4afc;for(var _0x4c49ed=_0xdf9c8f>0x1?void 0x0:_0xdf9c8f?k(_0x250cac,_0x33a466):_0x250cac,_0x57d643=_0xb926e9[_0x167dcc(0x115)]-0x1,_0x5c3bfa;_0x57d643>=0x0;_0x57d643--)(_0x5c3bfa=_0xb926e9[_0x57d643])&&(_0x4c49ed=_0x5c3bfa(_0x4c49ed)||_0x4c49ed);return _0x4c49ed;},_=(_0x3f0552,_0x1e53c1)=>(_0x1b1375,_0x3975f9)=>_0x1e53c1(_0x1b1375,_0x3975f9,_0x3f0552);function X(_0x557cd9,_0x2a2ef0){const _0x2474ef=_0x3f4afc,_0xf3f1a=_0x557cd9[_0x2474ef(0x16e)][0x0];return{..._0x2a2ef0,'id':_0xf3f1a[_0x2474ef(0x11b)],'resolved':_0x557cd9[_0x2474ef(0x12c)]===0x1,'dT':D(_0xf3f1a[_0x2474ef(0x11d)]),'personId':_0xf3f1a[_0x2474ef(0x111)],'threadId':_0xf3f1a[_0x2474ef(0x16a)]};}function ee(_0x461dd0,_0x50c5df,_0x229142){const _0x54db6d=_0x3f4afc;var _0x5220d8,_0x25e555;if(((_0x25e555=(_0x5220d8=_0x461dd0==null?void 0x0:_0x461dd0[_0x54db6d(0x16e)])==null?void 0x0:_0x5220d8['length'])!=null?_0x25e555:0x0)>0x0){const _0x57e980=(_0xf3fd5d,_0x574ab7)=>({'id':_0xf3fd5d['replyId'],'threadId':_0xf3fd5d[_0x54db6d(0x16a)],'dT':D(_0xf3fd5d[_0x54db6d(0x11d)]),'personId':_0xf3fd5d[_0x54db6d(0x111)],'resolved':_0x461dd0['solved']===I['Solved'],'unitId':_0x50c5df,'subUnitId':_0x229142,'text':JSON[_0x54db6d(0x161)](_0xf3fd5d[_0x54db6d(0x143)]),'parentId':_0x574ab7}),_0x2df3f1=_0x57e980(_0x461dd0['replies'][0x0]);return{..._0x2df3f1,'children':_0x461dd0[_0x54db6d(0x16e)][_0x54db6d(0x154)](0x1)[_0x54db6d(0x150)](_0x4391eb=>_0x57e980(_0x4391eb,_0x2df3f1['id']))};}return null;}let f=class{constructor(_0x558c28,_0x1b2da6,_0x141787,_0x5a2a64){const _0x313d84=_0x3f4afc;this['_httpService']=_0x558c28,this[_0x313d84(0x162)]=_0x1b2da6,this[_0x313d84(0x158)]=_0x141787,this[_0x313d84(0x165)]=_0x5a2a64;}async[_0x3f4afc(0x13f)](_0x1e2556){const _0xb15899=_0x3f4afc;var _0x336231,_0x4a67f6;const {parentId:_0x506db6,unitId:_0x2d1a51,text:_0x937a74,threadId:_0x94bbbd}=_0x1e2556,_0x2e8a98=(_0x4a67f6=(_0x336231=_0x937a74['customRanges'])==null?void 0x0:_0x336231['filter'](_0x14ebf9=>_0x14ebf9[_0xb15899(0x156)]===_0x1a473c[_0xb15899(0x14b)])[_0xb15899(0x150)](_0xd33dc1=>_0xd33dc1[_0xb15899(0x12b)]))!=null?_0x4a67f6:[],_0x569aea=JSON[_0xb15899(0x160)](_0x937a74),_0x17a80a=(await this[_0xb15899(0x158)][_0xb15899(0x12e)](_0x2d1a51))[_0xb15899(0x110)]();if(_0x506db6){const _0x3c9087={'memberId':_0x17a80a,'unitId':_0x2d1a51,'content':_0x569aea,'mention':_0x2e8a98,'threadId':_0x94bbbd},_0x3daae6=(await this['_httpService']['post'](_0xb15899(0x133)+_0x2d1a51+_0xb15899(0x12d),{'body':_0x3c9087}))[_0xb15899(0x11e)][_0xb15899(0x10e)];return{..._0x1e2556,'id':_0x3daae6[_0xb15899(0x11b)],'dT':_0x4f4ce7(+_0x3daae6[_0xb15899(0x11d)])['format'](_0xb15899(0x112)),'personId':_0x3daae6[_0xb15899(0x111)]};}else{const _0x1d9f74={'memberId':_0x17a80a,'unitId':_0x2d1a51,'content':_0x569aea,'mention':_0x2e8a98},_0x2cd041=await this[_0xb15899(0x138)][_0xb15899(0x153)](_0xb15899(0x133)+_0x2d1a51+'/add',{'body':_0x1d9f74});return X(_0x2cd041[_0xb15899(0x11e)]['comment'],_0x1e2556);}}async['updateComment'](_0x22bbeb){const _0x461865=_0x3f4afc;var _0x16ee45,_0x5409b3;const {text:_0x18b3aa,unitId:_0x1b1c60}=_0x22bbeb,_0x1327fc=(_0x5409b3=(_0x16ee45=_0x18b3aa['customRanges'])==null?void 0x0:_0x16ee45[_0x461865(0x167)](_0x13dcea=>_0x13dcea[_0x461865(0x156)]===_0x1a473c[_0x461865(0x14b)])[_0x461865(0x150)](_0x4842f7=>_0x4842f7['rangeId']))!=null?_0x5409b3:[],_0x416e0c=JSON['stringify'](_0x18b3aa),_0x4114e1=_0x22bbeb[_0x461865(0x16a)],_0x3ea8ca=_0x22bbeb['id'],_0x537967={'memberId':(await this[_0x461865(0x158)][_0x461865(0x12e)](_0x1b1c60))[_0x461865(0x110)](),'unitId':_0x1b1c60,'threadId':_0x4114e1,'mention':_0x1327fc,'content':_0x416e0c,'replyId':_0x3ea8ca},_0x5f2c5f=await this[_0x461865(0x138)][_0x461865(0x153)](_0x461865(0x133)+_0x1b1c60+_0x461865(0x15b),{'body':_0x537967});return!_0x5f2c5f[_0x461865(0x11e)][_0x461865(0x119)]||_0x5f2c5f[_0x461865(0x11e)][_0x461865(0x119)][_0x461865(0x124)]===0x1;}async[_0x3f4afc(0x163)](_0x19a137){const _0x4c6129=_0x3f4afc,{unitId:_0x2eac6f}=_0x19a137,_0x22faec=_0x19a137['threadId'],_0x19428f={'memberId':this[_0x4c6129(0x162)][_0x4c6129(0x13a)]()[_0x4c6129(0x127)],'unitId':_0x2eac6f,'threadId':_0x22faec,'solved':_0x19a137[_0x4c6129(0x113)]?I[_0x4c6129(0x13c)]:I[_0x4c6129(0x139)]},_0x3d9016=await this[_0x4c6129(0x138)][_0x4c6129(0x153)](_0x4c6129(0x133)+_0x2eac6f+_0x4c6129(0x14d),{'body':_0x19428f});return!_0x3d9016[_0x4c6129(0x11e)][_0x4c6129(0x119)]||_0x3d9016[_0x4c6129(0x11e)][_0x4c6129(0x119)]['code']===0x1;}async[_0x3f4afc(0x13b)](_0x46777e,_0x57e2e1,_0x1b58e3,_0x5c30e5){const _0x16fe79=_0x3f4afc,_0x18a286={'memberId':(await this['_sessionService'][_0x16fe79(0x12e)](_0x46777e))[_0x16fe79(0x110)](),'threadId':_0x1b58e3,'replyId':_0x5c30e5,'unitId':_0x46777e},_0x5c8110=await this[_0x16fe79(0x138)][_0x16fe79(0x153)](_0x16fe79(0x133)+_0x46777e+'/delete',{'body':_0x18a286});return!_0x5c8110['body'][_0x16fe79(0x119)]||_0x5c8110[_0x16fe79(0x11e)][_0x16fe79(0x119)]['code']===0x1;}async[_0x3f4afc(0x142)](_0x3e5076,_0x3a72e9,_0x2d0c0a){const _0x558211=_0x3f4afc,_0xb8f250={'unitId':_0x3e5076,'threadId':_0x2d0c0a},_0x5113b4=await this[_0x558211(0x138)][_0x558211(0x153)](_0x558211(0x133)+_0x3e5076+'/list',{'body':_0xb8f250}),_0x1911c4=_0x2d0c0a[_0x558211(0x150)](_0xe56040=>ee(_0x5113b4[_0x558211(0x11e)][_0x558211(0x125)][_0xe56040],_0x3e5076,_0x3a72e9))[_0x558211(0x167)](Boolean);return Object[_0x558211(0x14e)](_0x5113b4[_0x558211(0x11e)]['users'])[_0x558211(0x10c)](_0x13ed2c=>{const _0x5a2ee6=_0x558211;this[_0x5a2ee6(0x162)]['addUser'](_0x13ed2c);}),_0x1911c4;}[_0x3f4afc(0x15c)](_0x4b9484){const _0x8e9c02=_0x3f4afc;return{'id':_0x4b9484['id'],'threadId':_0x4b9484[_0x8e9c02(0x16a)],'ref':_0x4b9484[_0x8e9c02(0x126)]};}};f=Q([_(0x0,_0x194cc9(_0x5554b4)),_(0x1,_0x194cc9(_0x554e61)),_(0x2,_0x194cc9(_0x1bf408)),_(0x3,_0x194cc9(_0x3963d7))],f);var re=Object[_0x3f4afc(0x11c)],te=(_0x23b5b8,_0x47ce9f,_0x5517ab,_0x18e0f8)=>{for(var _0x4507a5=_0x18e0f8>0x1?void 0x0:_0x18e0f8?re(_0x47ce9f,_0x5517ab):_0x47ce9f,_0x31e1c7=_0x23b5b8['length']-0x1,_0x56f430;_0x31e1c7>=0x0;_0x31e1c7--)(_0x56f430=_0x23b5b8[_0x31e1c7])&&(_0x4507a5=_0x56f430(_0x4507a5)||_0x4507a5);return _0x4507a5;},N=(_0x1a72f6,_0x25bf7d)=>(_0x563b78,_0x468051)=>_0x25bf7d(_0x563b78,_0x468051,_0x1a72f6);let g=class extends _0x3fd518{constructor(_0x436d57,_0x4b9b7d){const _0x57d6d3=_0x3f4afc;super(),this[_0x57d6d3(0x157)]=_0x436d57,this[_0x57d6d3(0x137)]=_0x4b9b7d,this[_0x57d6d3(0x141)]();}['_initDataSource'](){const _0x5ab8bf=_0x3f4afc;this[_0x5ab8bf(0x157)][_0x5ab8bf(0x122)]=this['_threadCommentDataSource'],this[_0x5ab8bf(0x157)][_0x5ab8bf(0x15a)]=!0x1;}};g=te([N(0x0,_0x31dd5a),N(0x1,_0x194cc9(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1ae983,_0x3f59c7,_0x45340f)=>_0x3f59c7 in _0x1ae983?se(_0x1ae983,_0x3f59c7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x45340f}):_0x1ae983[_0x3f59c7]=_0x45340f,ie=(_0x799293,_0x1ba068,_0x278065,_0x37b063)=>{const _0x41c4b2=_0x3f4afc;for(var _0x547c5c=_0x37b063>0x1?void 0x0:_0x37b063?oe(_0x1ba068,_0x278065):_0x1ba068,_0x1c653f=_0x799293[_0x41c4b2(0x115)]-0x1,_0x49d070;_0x1c653f>=0x0;_0x1c653f--)(_0x49d070=_0x799293[_0x1c653f])&&(_0x547c5c=_0x49d070(_0x547c5c)||_0x547c5c);return _0x547c5c;},w=(_0x55dbc7,_0x568707)=>(_0x582e9e,_0x3a3058)=>_0x568707(_0x582e9e,_0x3a3058,_0x55dbc7),$=(_0x955e4b,_0x44cb04,_0x416483)=>ne(_0x955e4b,typeof _0x44cb04!='symbol'?_0x44cb04+'':_0x44cb04,_0x416483);let b=class extends _0x3f2e1d{constructor(_0xb7d3c7=M,_0xf946ae,_0x416222){const _0x4649cd=_0x3f4afc;super(),this['_config']=_0xb7d3c7,this[_0x4649cd(0x165)]=_0xf946ae,this[_0x4649cd(0x13e)]=_0x416222;const {..._0x29dec7}=_0x5e9b24({},M,this[_0x4649cd(0x117)]);this['_configService']['setConfig'](z,_0x29dec7);}[_0x3f4afc(0x10b)](){const _0x385187=_0x3f4afc;[[f],[g],[S]][_0x385187(0x10c)](_0x2916b6=>{const _0x53192a=_0x385187;this[_0x53192a(0x165)]['add'](_0x2916b6);});}[_0x3f4afc(0x144)](){const _0x43a544=_0x3f4afc;this[_0x43a544(0x165)][_0x43a544(0x159)](g),this[_0x43a544(0x165)]['get'](S);}};$(b,_0x3f4afc(0x16b),W),$(b,'type',_0x183756[_0x3f4afc(0x136)]),b=ie([_0x5c3377(_0x5b39b7,_0x1e3b86,_0x2a1bc5),w(0x1,_0x194cc9(_0x3963d7)),w(0x2,_0x1131bc)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x28d8(_0x2e18a7,_0x1c4bd5){const _0xe45183=_0xe451();return _0x28d8=function(_0x28d830,_0x1952ac){_0x28d830=_0x28d830-0x115;let _0x1a0f71=_0xe45183[_0x28d830];return _0x1a0f71;},_0x28d8(_0x2e18a7,_0x1c4bd5);}(function(_0x737da0,_0x2ebf78){const _0x440944=_0x28d8,_0x5deac3=_0x737da0();while(!![]){try{const _0x280ceb=-parseInt(_0x440944(0x130))/0x1+-parseInt(_0x440944(0x17d))/0x2*(parseInt(_0x440944(0x17a))/0x3)+-parseInt(_0x440944(0x173))/0x4*(parseInt(_0x440944(0x135))/0x5)+-parseInt(_0x440944(0x167))/0x6+-parseInt(_0x440944(0x179))/0x7*(parseInt(_0x440944(0x17b))/0x8)+parseInt(_0x440944(0x159))/0x9+parseInt(_0x440944(0x150))/0xa;if(_0x280ceb===_0x2ebf78)break;else _0x5deac3['push'](_0x5deac3['shift']());}catch(_0x246cda){_0x5deac3['push'](_0x5deac3['shift']());}}}(_0xe451,0xd33db),function(_0x56e5c8,_0x3eb2fb){const _0xfe108b=_0x28d8;typeof exports==_0xfe108b(0x160)&&typeof module<'u'?_0x3eb2fb(exports,require('@univerjs-pro/collaboration-client'),require(_0xfe108b(0x15e)),require(_0xfe108b(0x174)),require(_0xfe108b(0x151)),require(_0xfe108b(0x13d)),require(_0xfe108b(0x161)),require(_0xfe108b(0x158))):typeof define==_0xfe108b(0x15b)&&define[_0xfe108b(0x184)]?define([_0xfe108b(0x188),'@univerjs-pro/collaboration-client',_0xfe108b(0x15e),_0xfe108b(0x174),_0xfe108b(0x151),_0xfe108b(0x13d),_0xfe108b(0x161),_0xfe108b(0x158)],_0x3eb2fb):(_0x56e5c8=typeof globalThis<'u'?globalThis:_0x56e5c8||self,_0x3eb2fb(_0x56e5c8[_0xfe108b(0x180)]={},_0x56e5c8['UniverProCollaborationClient'],_0x56e5c8[_0xfe108b(0x183)],_0x56e5c8[_0xfe108b(0x162)],_0x56e5c8['UniverThreadCommentUi'],_0x56e5c8[_0xfe108b(0x178)],_0x56e5c8[_0xfe108b(0x161)],_0x56e5c8[_0xfe108b(0x12a)]));}(this,function(_0x3bc6a7,_0x433cce,_0x1b2383,_0x514b15,_0x561bbe,_0x289cbf,_0x250e03,_0x488e04){'use strict';const _0x39ff1a=_0x28d8;const _0x4e1eaa=_0x39ff1a(0x18d);var _0x299546=(_0x212bf6=>(_0x212bf6[_0x212bf6['OpenOrReOpen']=0x0]=_0x39ff1a(0x125),_0x212bf6[_0x212bf6[_0x39ff1a(0x12e)]=0x1]=_0x39ff1a(0x12e),_0x212bf6[_0x212bf6[_0x39ff1a(0x194)]=-0x1]='UNRECOGNIZED',_0x212bf6))(_0x299546||{}),_0x5fb325=(_0x3fd63b=>(_0x3fd63b[_0x3fd63b[_0x39ff1a(0x168)]=0x0]=_0x39ff1a(0x168),_0x3fd63b[_0x3fd63b['Add']=0x1]=_0x39ff1a(0x153),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x134)]=0x2]=_0x39ff1a(0x134),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x126)]=0x3]=_0x39ff1a(0x126),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x166)]=0x4]=_0x39ff1a(0x166),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x163)]=0x5]=_0x39ff1a(0x163),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x194)]=-0x1]=_0x39ff1a(0x194),_0x3fd63b))(_0x5fb325||{});const _0x261f0d=_0x40603b=>_0x514b15[_0x39ff1a(0x14b)](new Date(+_0x40603b))[_0x39ff1a(0x13b)](_0x39ff1a(0x11a)),_0x2ba4ef=async(_0x16c1a8,_0x30ae07)=>{const _0x2cf05a=_0x39ff1a,_0x37ae9f=_0x16c1a8[_0x2cf05a(0x16b)](_0x514b15[_0x2cf05a(0x147)]),_0x40c3f1=_0x16c1a8[_0x2cf05a(0x16b)](_0x488e04[_0x2cf05a(0x120)]);_0x30ae07['forEach'](_0x48c749=>{_0x37ae9f['getUser'](_0x48c749)&&_0x30ae07['delete'](_0x48c749);}),_0x30ae07[_0x2cf05a(0x136)]&&(await _0x40c3f1[_0x2cf05a(0x16b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x30ae07]}}))[_0x2cf05a(0x142)]['users'][_0x2cf05a(0x15c)](_0x581abf=>{const _0x385168=_0x2cf05a;_0x581abf&&_0x37ae9f[_0x385168(0x143)](_0x581abf);});};var _0x3e7340=Object['getOwnPropertyDescriptor'],_0x43b55f=(_0x3e2d90,_0x42c2cc,_0x5bae41,_0xb22255)=>{const _0x3e524c=_0x39ff1a;for(var _0x3a3b7f=_0xb22255>0x1?void 0x0:_0xb22255?_0x3e7340(_0x42c2cc,_0x5bae41):_0x42c2cc,_0x48690a=_0x3e2d90[_0x3e524c(0x118)]-0x1,_0x5b1768;_0x48690a>=0x0;_0x48690a--)(_0x5b1768=_0x3e2d90[_0x48690a])&&(_0x3a3b7f=_0x5b1768(_0x3a3b7f)||_0x3a3b7f);return _0x3a3b7f;},_0x62c980=(_0x18c22c,_0x43fb89)=>(_0x3ec1fa,_0x1833da)=>_0x43fb89(_0x3ec1fa,_0x1833da,_0x18c22c);let _0x52e0e4=class extends _0x514b15[_0x39ff1a(0x164)]{constructor(_0x5f3ab3,_0x2df38e,_0x52008d,_0xa513c7){const _0x56a037=_0x39ff1a;super(),this[_0x56a037(0x175)]=_0x5f3ab3,this[_0x56a037(0x140)]=_0x2df38e,this['_userService']=_0x52008d,this[_0x56a037(0x181)]=_0xa513c7,this[_0x56a037(0x131)](),this[_0x56a037(0x141)]();}[_0x39ff1a(0x141)](){const _0xcc0314=_0x39ff1a;this['disposeWithMe'](this[_0xcc0314(0x140)]['commentUpdate$'][_0xcc0314(0x145)](_0x250e03[_0xcc0314(0x123)](0x10))[_0xcc0314(0x11e)](_0x4557ea=>{const _0xbe4a9f=_0xcc0314,_0x506999=new Set();_0x4557ea[_0xbe4a9f(0x15c)](_0x277ffe=>{const _0x190a29=_0xbe4a9f;switch(_0x277ffe['type']){case _0x190a29(0x17f):{const _0x3288d9=_0x277ffe['payload'][_0x190a29(0x16f)];_0x506999[_0x190a29(0x17f)](_0x3288d9);break;}}}),_0x2ba4ef(this[_0xbe4a9f(0x181)],_0x506999);}));}[_0x39ff1a(0x131)](){const _0x10fab1=_0x39ff1a;this[_0x10fab1(0x18b)](this[_0x10fab1(0x175)]['commentUpdate$'][_0x10fab1(0x11e)](async _0x1175f9=>{const _0x3c4531=_0x10fab1;var _0x3ab5d3,_0x74ea7a,_0x2fd40b,_0x5d4d14;const _0x51b733=(_0x3ab5d3=this[_0x3c4531(0x140)][_0x3c4531(0x177)](_0x1175f9['unitId'])[_0x3c4531(0x154)](_0x6d54f3=>_0x6d54f3[_0x3c4531(0x137)]===_0x1175f9[_0x3c4531(0x137)]))==null?void 0x0:_0x3ab5d3[_0x3c4531(0x122)];if(!_0x51b733)return;const {unitId:_0x42f872,subUnitId:_0x2a5642}=_0x51b733;switch(_0x1175f9[_0x3c4531(0x18a)]&&this['_userService'][_0x3c4531(0x143)](_0x1175f9[_0x3c4531(0x18a)]),_0x1175f9[_0x3c4531(0x124)]){case _0x5fb325[_0x3c4531(0x153)]:break;case _0x5fb325[_0x3c4531(0x134)]:{this['_threadCommentModel'][_0x3c4531(0x12f)](_0x42f872,_0x2a5642,{'unitId':_0x42f872,'subUnitId':_0x2a5642,'ref':'','id':_0x1175f9[_0x3c4531(0x189)],'dT':_0x261f0d(+_0x1175f9[_0x3c4531(0x14d)]),'threadId':_0x1175f9['threadId'],'personId':(_0x2fd40b=(_0x74ea7a=_0x1175f9[_0x3c4531(0x18a)])==null?void 0x0:_0x74ea7a[_0x3c4531(0x185)])!=null?_0x2fd40b:_0x1175f9[_0x3c4531(0x171)],'text':JSON[_0x3c4531(0x148)](_0x1175f9[_0x3c4531(0x13a)]),'parentId':_0x51b733['id']});break;}case _0x5fb325['Delete']:{const _0x135f5a=this['_threadCommentModel'][_0x3c4531(0x13f)](_0x42f872,_0x2a5642,_0x1175f9[_0x3c4531(0x189)]);_0x135f5a&&_0x135f5a['parentId']&&this[_0x3c4531(0x140)][_0x3c4531(0x182)](_0x42f872,_0x2a5642,_0x1175f9['replyId']);break;}case _0x5fb325['Edit']:{this[_0x3c4531(0x140)][_0x3c4531(0x12d)](_0x42f872,_0x2a5642,{'commentId':_0x1175f9['replyId'],'text':JSON['parse'](_0x1175f9[_0x3c4531(0x13a)])});break;}case _0x5fb325[_0x3c4531(0x163)]:{const _0x5ec84e=(_0x5d4d14=this[_0x3c4531(0x140)]['getUnit'](_0x1175f9[_0x3c4531(0x121)])[_0x3c4531(0x154)](_0xf016b1=>_0xf016b1['threadId']===_0x1175f9[_0x3c4531(0x137)]))==null?void 0x0:_0x5d4d14[_0x3c4531(0x122)];_0x5ec84e&&this['_threadCommentModel']['resolveComment'](_0x42f872,_0x2a5642,_0x5ec84e['id'],_0x1175f9['solved']===_0x299546[_0x3c4531(0x12e)]);break;}}}));}};_0x52e0e4=_0x43b55f([_0x62c980(0x0,_0x514b15['Inject'](_0x433cce[_0x39ff1a(0x156)])),_0x62c980(0x1,_0x514b15['Inject'](_0x289cbf[_0x39ff1a(0x165)])),_0x62c980(0x2,_0x514b15[_0x39ff1a(0x144)](_0x514b15[_0x39ff1a(0x147)])),_0x62c980(0x3,_0x514b15['Inject'](_0x514b15['Injector']))],_0x52e0e4);const _0x32ebf5='thread-comment-data-source.config',_0x4e82a1={};var _0x2ce1e1=Object[_0x39ff1a(0x11f)],_0x32318a=(_0x23b9b2,_0x5d4ced,_0x1e8177,_0x1d7d5b)=>{const _0x1b8973=_0x39ff1a;for(var _0x4fa3c5=_0x1d7d5b>0x1?void 0x0:_0x1d7d5b?_0x2ce1e1(_0x5d4ced,_0x1e8177):_0x5d4ced,_0x2d2cd7=_0x23b9b2[_0x1b8973(0x118)]-0x1,_0x2c78f5;_0x2d2cd7>=0x0;_0x2d2cd7--)(_0x2c78f5=_0x23b9b2[_0x2d2cd7])&&(_0x4fa3c5=_0x2c78f5(_0x4fa3c5)||_0x4fa3c5);return _0x4fa3c5;},_0x1c4644=(_0x3b983c,_0x3b9658)=>(_0x22fd22,_0x356069)=>_0x3b9658(_0x22fd22,_0x356069,_0x3b983c);function _0x1de4da(_0x129b7b,_0x47e127){const _0x112af7=_0x39ff1a,_0x525712=_0x129b7b['replies'][0x0];return{..._0x47e127,'id':_0x525712[_0x112af7(0x189)],'resolved':_0x129b7b[_0x112af7(0x14a)]===0x1,'dT':_0x261f0d(_0x525712[_0x112af7(0x14d)]),'personId':_0x525712[_0x112af7(0x171)],'threadId':_0x525712[_0x112af7(0x137)]};}function _0x909113(_0x539bbd,_0x210351,_0x3f87e1){const _0x3db8f2=_0x39ff1a;var _0x1fa803,_0x5d0fa3;if(((_0x5d0fa3=(_0x1fa803=_0x539bbd==null?void 0x0:_0x539bbd[_0x3db8f2(0x176)])==null?void 0x0:_0x1fa803[_0x3db8f2(0x118)])!=null?_0x5d0fa3:0x0)>0x0){const _0x3ef28d=(_0x2bf431,_0x22d6c4)=>({'id':_0x2bf431[_0x3db8f2(0x189)],'threadId':_0x2bf431[_0x3db8f2(0x137)],'dT':_0x261f0d(_0x2bf431[_0x3db8f2(0x14d)]),'personId':_0x2bf431[_0x3db8f2(0x171)],'resolved':_0x539bbd['solved']===_0x299546[_0x3db8f2(0x12e)],'unitId':_0x210351,'subUnitId':_0x3f87e1,'text':JSON[_0x3db8f2(0x148)](_0x2bf431[_0x3db8f2(0x13a)]),'parentId':_0x22d6c4}),_0x2eb553=_0x3ef28d(_0x539bbd[_0x3db8f2(0x176)][0x0]);return{..._0x2eb553,'children':_0x539bbd[_0x3db8f2(0x176)][_0x3db8f2(0x11b)](0x1)[_0x3db8f2(0x149)](_0x4ddce8=>_0x3ef28d(_0x4ddce8,_0x2eb553['id']))};}return null;}let _0xc24ad0=class{constructor(_0x24026f,_0x5f245d,_0x2ba8d7,_0x17f2ad){const _0x2e0ec3=_0x39ff1a;this[_0x2e0ec3(0x17c)]=_0x24026f,this['_userService']=_0x5f245d,this['_sessionService']=_0x2ba8d7,this[_0x2e0ec3(0x181)]=_0x17f2ad;}async[_0x39ff1a(0x12f)](_0x1f2a98){const _0x38c028=_0x39ff1a;var _0x1720f7,_0x347cb5;const {parentId:_0x4ef067,unitId:_0x166a6d,text:_0x150974,threadId:_0x3e08f6}=_0x1f2a98,_0x500840=(_0x347cb5=(_0x1720f7=_0x150974[_0x38c028(0x18c)])==null?void 0x0:_0x1720f7[_0x38c028(0x127)](_0x8227b6=>_0x8227b6[_0x38c028(0x11d)]===_0x514b15['CustomRangeType'][_0x38c028(0x195)])[_0x38c028(0x149)](_0x145cb4=>_0x145cb4['rangeId']))!=null?_0x347cb5:[],_0x4859ab=JSON[_0x38c028(0x155)](_0x150974),_0x29fdb8=(await this[_0x38c028(0x157)]['requireSession'](_0x166a6d))[_0x38c028(0x16e)]();if(_0x4ef067){const _0x5a1d12={'memberId':_0x29fdb8,'unitId':_0x166a6d,'content':_0x4859ab,'mention':_0x500840,'threadId':_0x3e08f6},_0x51ef3f=(await this['_httpService'][_0x38c028(0x138)](_0x38c028(0x18f)+_0x166a6d+'/reply',{'body':_0x5a1d12}))[_0x38c028(0x142)][_0x38c028(0x15a)];return{..._0x1f2a98,'id':_0x51ef3f['replyId'],'dT':_0x514b15['dayjs'](+_0x51ef3f[_0x38c028(0x14d)])['format'](_0x38c028(0x11a)),'personId':_0x51ef3f['userId']};}else{const _0x36e0ff={'memberId':_0x29fdb8,'unitId':_0x166a6d,'content':_0x4859ab,'mention':_0x500840},_0x73d9a3=await this['_httpService'][_0x38c028(0x138)](_0x38c028(0x18f)+_0x166a6d+'/add',{'body':_0x36e0ff});return _0x1de4da(_0x73d9a3[_0x38c028(0x142)][_0x38c028(0x169)],_0x1f2a98);}}async[_0x39ff1a(0x12d)](_0x5a9fe3){const _0x4e620c=_0x39ff1a;var _0x4795ad,_0x26c8a7;const {text:_0x25c4ab,unitId:_0xe7c26a}=_0x5a9fe3,_0x1ec216=(_0x26c8a7=(_0x4795ad=_0x25c4ab['customRanges'])==null?void 0x0:_0x4795ad[_0x4e620c(0x127)](_0x5ab97d=>_0x5ab97d[_0x4e620c(0x11d)]===_0x514b15['CustomRangeType'][_0x4e620c(0x195)])[_0x4e620c(0x149)](_0x12dcdd=>_0x12dcdd[_0x4e620c(0x17e)]))!=null?_0x26c8a7:[],_0x14b51b=JSON[_0x4e620c(0x155)](_0x25c4ab),_0x12f209=_0x5a9fe3[_0x4e620c(0x137)],_0x5cac7e=_0x5a9fe3['id'],_0x426872={'memberId':(await this['_sessionService']['requireSession'](_0xe7c26a))[_0x4e620c(0x16e)](),'unitId':_0xe7c26a,'threadId':_0x12f209,'mention':_0x1ec216,'content':_0x14b51b,'replyId':_0x5cac7e},_0x50e5ea=await this['_httpService'][_0x4e620c(0x138)](_0x4e620c(0x18f)+_0xe7c26a+_0x4e620c(0x14e),{'body':_0x426872});return!_0x50e5ea[_0x4e620c(0x142)]['error']||_0x50e5ea[_0x4e620c(0x142)][_0x4e620c(0x12c)][_0x4e620c(0x193)]===0x1;}async[_0x39ff1a(0x116)](_0x5d8f3f){const _0x33234b=_0x39ff1a,{unitId:_0x3b60bf}=_0x5d8f3f,_0x2a40c9=_0x5d8f3f['threadId'],_0x4bcc0d={'memberId':this[_0x33234b(0x15f)][_0x33234b(0x146)]()[_0x33234b(0x185)],'unitId':_0x3b60bf,'threadId':_0x2a40c9,'solved':_0x5d8f3f[_0x33234b(0x12b)]?_0x299546[_0x33234b(0x12e)]:_0x299546[_0x33234b(0x125)]},_0x33528e=await this[_0x33234b(0x17c)]['post'](_0x33234b(0x18f)+_0x3b60bf+_0x33234b(0x129),{'body':_0x4bcc0d});return!_0x33528e['body']['error']||_0x33528e[_0x33234b(0x142)][_0x33234b(0x12c)][_0x33234b(0x193)]===0x1;}async[_0x39ff1a(0x182)](_0xca75ce,_0x35d151,_0x15dcd2,_0x2c0d7b){const _0x598356=_0x39ff1a,_0x16ef66={'memberId':(await this[_0x598356(0x157)]['requireSession'](_0xca75ce))['getMemberID'](),'threadId':_0x15dcd2,'replyId':_0x2c0d7b,'unitId':_0xca75ce},_0x2c6aad=await this['_httpService'][_0x598356(0x138)](_0x598356(0x18f)+_0xca75ce+_0x598356(0x133),{'body':_0x16ef66});return!_0x2c6aad[_0x598356(0x142)][_0x598356(0x12c)]||_0x2c6aad[_0x598356(0x142)]['error']['code']===0x1;}async['listComments'](_0x9e41a8,_0x22a1ee,_0x30617f){const _0x572724=_0x39ff1a,_0x127b24={'unitId':_0x9e41a8,'threadId':_0x30617f},_0x15eb15=await this['_httpService'][_0x572724(0x138)](_0x572724(0x18f)+_0x9e41a8+_0x572724(0x190),{'body':_0x127b24}),_0x2943e0=_0x30617f[_0x572724(0x149)](_0xab23a0=>_0x909113(_0x15eb15['body'][_0x572724(0x132)][_0xab23a0],_0x9e41a8,_0x22a1ee))[_0x572724(0x127)](Boolean);return Object['values'](_0x15eb15['body'][_0x572724(0x117)])[_0x572724(0x15c)](_0x459b1f=>{const _0x162f58=_0x572724;this[_0x162f58(0x15f)][_0x162f58(0x143)](_0x459b1f);}),_0x2943e0;}['saveCommentToSnapshot'](_0x2873ec){const _0x10c9eb=_0x39ff1a;return{'id':_0x2873ec['id'],'threadId':_0x2873ec[_0x10c9eb(0x137)],'ref':_0x2873ec[_0x10c9eb(0x16d)]};}};_0xc24ad0=_0x32318a([_0x1c4644(0x0,_0x514b15[_0x39ff1a(0x144)](_0x488e04[_0x39ff1a(0x120)])),_0x1c4644(0x1,_0x514b15[_0x39ff1a(0x144)](_0x514b15['UserManagerService'])),_0x1c4644(0x2,_0x514b15[_0x39ff1a(0x144)](_0x433cce[_0x39ff1a(0x14c)])),_0x1c4644(0x3,_0x514b15[_0x39ff1a(0x144)](_0x514b15[_0x39ff1a(0x16a)]))],_0xc24ad0);var _0x3e8732=Object[_0x39ff1a(0x11f)],_0x295c63=(_0x31f1b2,_0x3dea74,_0x5b028f,_0x5337a6)=>{const _0x29e976=_0x39ff1a;for(var _0x3fb7b6=_0x5337a6>0x1?void 0x0:_0x5337a6?_0x3e8732(_0x3dea74,_0x5b028f):_0x3dea74,_0x3bf6e6=_0x31f1b2[_0x29e976(0x118)]-0x1,_0x493d50;_0x3bf6e6>=0x0;_0x3bf6e6--)(_0x493d50=_0x31f1b2[_0x3bf6e6])&&(_0x3fb7b6=_0x493d50(_0x3fb7b6)||_0x3fb7b6);return _0x3fb7b6;},_0x36e747=(_0x1252c7,_0x1148cb)=>(_0x3888bd,_0xbb72ce)=>_0x1148cb(_0x3888bd,_0xbb72ce,_0x1252c7);let _0xce4b48=class extends _0x514b15[_0x39ff1a(0x164)]{constructor(_0x568040,_0x4d1166){const _0x4a2326=_0x39ff1a;super(),this[_0x4a2326(0x191)]=_0x568040,this['_threadCommentDataSource']=_0x4d1166,this['_initDataSource']();}[_0x39ff1a(0x15d)](){const _0x54159b=_0x39ff1a;this[_0x54159b(0x191)]['dataSource']=this[_0x54159b(0x16c)],this[_0x54159b(0x191)]['syncUpdateMutationToColla']=!0x1;}};_0xce4b48=_0x295c63([_0x36e747(0x0,_0x289cbf[_0x39ff1a(0x13c)]),_0x36e747(0x1,_0x514b15[_0x39ff1a(0x144)](_0xc24ad0))],_0xce4b48);var _0x4c7c2f=Object[_0x39ff1a(0x115)],_0x5d2e2b=Object[_0x39ff1a(0x11f)],_0xe8cb57=(_0x19a10a,_0x228aa3,_0x35eab3)=>_0x228aa3 in _0x19a10a?_0x4c7c2f(_0x19a10a,_0x228aa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x35eab3}):_0x19a10a[_0x228aa3]=_0x35eab3,_0x58fa7b=(_0x1c1a31,_0x28d79a,_0x563487,_0x34197b)=>{const _0x5329ad=_0x39ff1a;for(var _0x46326a=_0x34197b>0x1?void 0x0:_0x34197b?_0x5d2e2b(_0x28d79a,_0x563487):_0x28d79a,_0x484530=_0x1c1a31[_0x5329ad(0x118)]-0x1,_0x207d85;_0x484530>=0x0;_0x484530--)(_0x207d85=_0x1c1a31[_0x484530])&&(_0x46326a=_0x207d85(_0x46326a)||_0x46326a);return _0x46326a;},_0x45423c=(_0x4fd6a5,_0x408011)=>(_0x43ea0c,_0x562c54)=>_0x408011(_0x43ea0c,_0x562c54,_0x4fd6a5),_0x1b9ecd=(_0x27fb26,_0x381767,_0x41265f)=>_0xe8cb57(_0x27fb26,typeof _0x381767!=_0x39ff1a(0x11c)?_0x381767+'':_0x381767,_0x41265f);_0x3bc6a7['UniverThreadCommentDataSourcePlugin']=class extends _0x514b15[_0x39ff1a(0x172)]{constructor(_0x198908=_0x4e82a1,_0x33cb24,_0x578cd2){const _0x12963a=_0x39ff1a;super(),this[_0x12963a(0x119)]=_0x198908,this[_0x12963a(0x181)]=_0x33cb24,this[_0x12963a(0x186)]=_0x578cd2;const {..._0x352027}=_0x514b15['merge']({},_0x4e82a1,this[_0x12963a(0x119)]);this[_0x12963a(0x186)][_0x12963a(0x170)](_0x32ebf5,_0x352027);}[_0x39ff1a(0x128)](){const _0x2e6d0a=_0x39ff1a;[[_0xc24ad0],[_0xce4b48],[_0x52e0e4]][_0x2e6d0a(0x15c)](_0x38e6a9=>{this['_injector']['add'](_0x38e6a9);});}['onReady'](){const _0x29da50=_0x39ff1a;this[_0x29da50(0x181)][_0x29da50(0x16b)](_0xce4b48),this[_0x29da50(0x181)][_0x29da50(0x16b)](_0x52e0e4);}},_0x1b9ecd(_0x3bc6a7['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x4e1eaa),_0x1b9ecd(_0x3bc6a7[_0x39ff1a(0x139)],_0x39ff1a(0x124),_0x514b15['UniverInstanceType'][_0x39ff1a(0x196)]),_0x3bc6a7[_0x39ff1a(0x139)]=_0x58fa7b([_0x514b15['DependentOn'](_0x561bbe[_0x39ff1a(0x13e)],_0x433cce[_0x39ff1a(0x192)],_0x1b2383[_0x39ff1a(0x14f)]),_0x45423c(0x1,_0x514b15[_0x39ff1a(0x144)](_0x514b15['Injector'])),_0x45423c(0x2,_0x514b15[_0x39ff1a(0x18e)])],_0x3bc6a7['UniverThreadCommentDataSourcePlugin']),Object[_0x39ff1a(0x115)](_0x3bc6a7,Symbol[_0x39ff1a(0x187)],{'value':_0x39ff1a(0x152)});}));function _0xe451(){const _0x1bda40=['resolveComment','users','length','_config','YYYY/MM/DD\x20HH:mm','slice','symbol','rangeType','subscribe','getOwnPropertyDescriptor','HTTPService','unitId','root','bufferTime','type','OpenOrReOpen','Edit','filter','onStarting','/solved','UniverNetwork','resolved','error','updateComment','Solved','addComment','1108509bhQbDs','_init','comments','/delete','Reply','155QEVSbh','size','threadId','post','UniverThreadCommentDataSourcePlugin','content','format','IThreadCommentDataSourceService','@univerjs/thread-comment','UniverThreadCommentUIPlugin','getComment','_threadCommentModel','_initUserSync','body','addUser','Inject','pipe','getCurrentUser','UserManagerService','parse','map','solved','dayjs','CollaborationSessionService','createTimestamp','/edit','UniverLicensePlugin','46848700YClbAh','@univerjs/thread-comment-ui','Module','Add','find','stringify','CommentService','_sessionService','@univerjs/network','3832911jGSiKB','reply','function','forEach','_initDataSource','@univerjs-pro/license','_userService','object','rxjs','UniverCore','Solve','Disposable','ThreadCommentModel','Delete','5526948swRozM','Unknown','comment','Injector','get','_threadCommentDataSource','ref','getMemberID','personId','setConfig','userId','Plugin','175196xsjvlw','@univerjs/core','_commentService','replies','getUnit','UniverThreadComment','19369URKQPz','141QTFfyu','952dOunuF','_httpService','22502dOOGLQ','rangeId','add','UniverProThreadCommentDatasource','_injector','deleteComment','UniverProLicense','amd','userID','_configService','toStringTag','exports','replyId','user','disposeWithMe','customRanges','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','/universer-api/comment/unit/','/list','_threadCommentDataSourceService','UniverCollaborationClientPlugin','code','UNRECOGNIZED','COMMENT','UNIVER_UNKNOWN','defineProperty'];_0xe451=function(){return _0x1bda40;};return _0xe451();}
1
+ function _0x5343(){const _0x3b6b50=['format','144CZNrtp','addUser','rangeId','YYYY/MM/DD\x20HH:mm','Plugin','UniverThreadCommentUi','subscribe','listComments','unitId','find','/solved','getUnit','toStringTag','delete','_injector','getMemberID','forEach','payload','HTTPService','getUser','onStarting','disposeWithMe','/delete','Edit','reply','/add','Inject','OpenOrReOpen','@univerjs/thread-comment-ui','comment','UniverThreadCommentDataSourcePlugin','content','UniverProCollaborationClient','amd','_initUserSync','replies','length','_configService','ThreadCommentModel','onReady','/universer-api/user/list','_sessionService','bufferTime','syncUpdateMutationToColla','@univerjs/core','createTimestamp','values','_threadCommentModel','3817bcWXYA','6332778XkWHbE','post','_initDataSource','UNRECOGNIZED','_threadCommentDataSource','3640287nQveBS','replyId','pluginName','updateComment','UserManagerService','162BgoSMm','Module','thread-comment-data-source.config','body','parentId','dataSource','12722iFsCpO','COMMENT','93wdrOAp','personId','add','userID','user','UniverThreadCommentUIPlugin','3358855FtTkYL','UniverLicensePlugin','IConfigService','UniverThreadComment','UniverCollaborationClientPlugin','35148uBYqvV','threadId','getOwnPropertyDescriptor','_userService','addComment','@univerjs-pro/collaboration-client','_httpService','/list','Disposable','30489oysZSG','defineProperty','Delete','CommentService','code','_threadCommentDataSourceService','commentUpdate$','125770zNszgo','stringify','_commentService','UniverProThreadCommentDatasource','@univerjs/thread-comment','symbol','userId','UniverProLicense','resolved','map','error','setConfig','rangeType','Reply','Solve','UniverNetwork','requireSession','_config','get','UniverCore','UniverInstanceType','_init','solved','merge','rxjs','deleteComment','Unknown','root','filter','Injector','Add','/edit','UNIVER_UNKNOWN','8rutlUl','type','parse','@univerjs-pro/license','@univerjs/network','object','Solved','IThreadCommentDataSourceService','users','dayjs','CustomRangeType','/universer-api/comment/unit/'];_0x5343=function(){return _0x3b6b50;};return _0x5343();}function _0x311e(_0x21c42f,_0xc8ff4a){const _0x53434e=_0x5343();return _0x311e=function(_0x311ef5,_0x2d3c97){_0x311ef5=_0x311ef5-0x135;let _0x77e1a2=_0x53434e[_0x311ef5];return _0x77e1a2;},_0x311e(_0x21c42f,_0xc8ff4a);}(function(_0x1fb94c,_0x5280a1){const _0x147c1f=_0x311e,_0x2276b2=_0x1fb94c();while(!![]){try{const _0x529a88=-parseInt(_0x147c1f(0x197))/0x1*(parseInt(_0x147c1f(0x195))/0x2)+parseInt(_0x147c1f(0x1ab))/0x3*(-parseInt(_0x147c1f(0x154))/0x4)+-parseInt(_0x147c1f(0x19d))/0x5+parseInt(_0x147c1f(0x185))/0x6+-parseInt(_0x147c1f(0x18a))/0x7*(-parseInt(_0x147c1f(0x147))/0x8)+-parseInt(_0x147c1f(0x18f))/0x9*(parseInt(_0x147c1f(0x1b2))/0xa)+parseInt(_0x147c1f(0x184))/0xb*(parseInt(_0x147c1f(0x1a2))/0xc);if(_0x529a88===_0x5280a1)break;else _0x2276b2['push'](_0x2276b2['shift']());}catch(_0xbe9eb3){_0x2276b2['push'](_0x2276b2['shift']());}}}(_0x5343,0xb3c0d),function(_0x316fc4,_0x4b06a9){const _0x151848=_0x311e;typeof exports==_0x151848(0x14c)&&typeof module<'u'?_0x4b06a9(exports,require(_0x151848(0x1a7)),require(_0x151848(0x14a)),require(_0x151848(0x180)),require(_0x151848(0x170)),require(_0x151848(0x1b6)),require(_0x151848(0x13e)),require(_0x151848(0x14b))):typeof define=='function'&&define[_0x151848(0x175)]?define(['exports',_0x151848(0x1a7),'@univerjs-pro/license',_0x151848(0x180),_0x151848(0x170),'@univerjs/thread-comment',_0x151848(0x13e),_0x151848(0x14b)],_0x4b06a9):(_0x316fc4=typeof globalThis<'u'?globalThis:_0x316fc4||self,_0x4b06a9(_0x316fc4[_0x151848(0x1b5)]={},_0x316fc4[_0x151848(0x174)],_0x316fc4[_0x151848(0x1b9)],_0x316fc4[_0x151848(0x139)],_0x316fc4[_0x151848(0x159)],_0x316fc4[_0x151848(0x1a0)],_0x316fc4[_0x151848(0x13e)],_0x316fc4[_0x151848(0x135)]));}(this,function(_0x295029,_0x3f1c4b,_0x4bff4b,_0x3843da,_0x444b73,_0xa60461,_0x338626,_0x534678){'use strict';const _0x1adf94=_0x311e;const _0x4c6787='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x1e374e=(_0x578dd6=>(_0x578dd6[_0x578dd6[_0x1adf94(0x16f)]=0x0]='OpenOrReOpen',_0x578dd6[_0x578dd6[_0x1adf94(0x14d)]=0x1]=_0x1adf94(0x14d),_0x578dd6[_0x578dd6[_0x1adf94(0x188)]=-0x1]='UNRECOGNIZED',_0x578dd6))(_0x1e374e||{}),_0x3b76b7=(_0xabb789=>(_0xabb789[_0xabb789[_0x1adf94(0x140)]=0x0]=_0x1adf94(0x140),_0xabb789[_0xabb789[_0x1adf94(0x144)]=0x1]=_0x1adf94(0x144),_0xabb789[_0xabb789[_0x1adf94(0x1bf)]=0x2]=_0x1adf94(0x1bf),_0xabb789[_0xabb789['Edit']=0x3]=_0x1adf94(0x16b),_0xabb789[_0xabb789[_0x1adf94(0x1ad)]=0x4]='Delete',_0xabb789[_0xabb789[_0x1adf94(0x1c0)]=0x5]=_0x1adf94(0x1c0),_0xabb789[_0xabb789['UNRECOGNIZED']=-0x1]=_0x1adf94(0x188),_0xabb789))(_0x3b76b7||{});const _0x56e482=_0x452e64=>_0x3843da['dayjs'](new Date(+_0x452e64))[_0x1adf94(0x153)](_0x1adf94(0x157)),_0x4518fa=async(_0x3d367b,_0x1d4526)=>{const _0x2ad538=_0x1adf94,_0x3213c1=_0x3d367b[_0x2ad538(0x138)](_0x3843da[_0x2ad538(0x18e)]),_0x25d863=_0x3d367b[_0x2ad538(0x138)](_0x534678[_0x2ad538(0x166)]);_0x1d4526[_0x2ad538(0x164)](_0x5524cb=>{const _0x237b95=_0x2ad538;_0x3213c1[_0x237b95(0x167)](_0x5524cb)&&_0x1d4526[_0x237b95(0x161)](_0x5524cb);}),_0x1d4526['size']&&(await _0x25d863[_0x2ad538(0x138)](_0x2ad538(0x17c),{'params':{'userIDs':[..._0x1d4526]}}))[_0x2ad538(0x192)]['users'][_0x2ad538(0x164)](_0x64b96f=>{const _0x1ba3ce=_0x2ad538;_0x64b96f&&_0x3213c1[_0x1ba3ce(0x155)](_0x64b96f);});};var _0x205168=Object[_0x1adf94(0x1a4)],_0x45b173=(_0x823e26,_0x341566,_0x19f602,_0x25db61)=>{const _0x25f666=_0x1adf94;for(var _0xe31b88=_0x25db61>0x1?void 0x0:_0x25db61?_0x205168(_0x341566,_0x19f602):_0x341566,_0x1eed29=_0x823e26[_0x25f666(0x178)]-0x1,_0x1874d4;_0x1eed29>=0x0;_0x1eed29--)(_0x1874d4=_0x823e26[_0x1eed29])&&(_0xe31b88=_0x1874d4(_0xe31b88)||_0xe31b88);return _0xe31b88;},_0x54e706=(_0x5cde80,_0x144d1b)=>(_0x28861b,_0x3ad0e1)=>_0x144d1b(_0x28861b,_0x3ad0e1,_0x5cde80);let _0x4ba89d=class extends _0x3843da['Disposable']{constructor(_0x10d6d8,_0x220393,_0x15df9d,_0x511212){const _0x591a7b=_0x1adf94;super(),this[_0x591a7b(0x1b4)]=_0x10d6d8,this['_threadCommentModel']=_0x220393,this['_userService']=_0x15df9d,this['_injector']=_0x511212,this[_0x591a7b(0x13b)](),this[_0x591a7b(0x176)]();}['_initUserSync'](){const _0x150271=_0x1adf94;this[_0x150271(0x169)](this[_0x150271(0x183)][_0x150271(0x1b1)]['pipe'](_0x338626[_0x150271(0x17e)](0x10))[_0x150271(0x15a)](_0x19e64d=>{const _0x15efb8=_0x150271,_0x50945b=new Set();_0x19e64d[_0x15efb8(0x164)](_0x1f58b2=>{const _0xa9d9fe=_0x15efb8;switch(_0x1f58b2[_0xa9d9fe(0x148)]){case _0xa9d9fe(0x199):{const _0x5e8646=_0x1f58b2[_0xa9d9fe(0x165)][_0xa9d9fe(0x198)];_0x50945b[_0xa9d9fe(0x199)](_0x5e8646);break;}}}),_0x4518fa(this[_0x15efb8(0x162)],_0x50945b);}));}[_0x1adf94(0x13b)](){const _0x5a6b75=_0x1adf94;this[_0x5a6b75(0x169)](this['_commentService'][_0x5a6b75(0x1b1)][_0x5a6b75(0x15a)](async _0x260ec2=>{const _0x3e36ec=_0x5a6b75;var _0x12c571,_0x192ca4,_0x5af7c7,_0x31ed58;const _0x2de0d8=(_0x12c571=this[_0x3e36ec(0x183)][_0x3e36ec(0x15f)](_0x260ec2[_0x3e36ec(0x15c)])[_0x3e36ec(0x15d)](_0x44a46c=>_0x44a46c[_0x3e36ec(0x1a3)]===_0x260ec2[_0x3e36ec(0x1a3)]))==null?void 0x0:_0x12c571[_0x3e36ec(0x141)];if(!_0x2de0d8)return;const {unitId:_0x1b41ee,subUnitId:_0x129e15}=_0x2de0d8;switch(_0x260ec2['user']&&this[_0x3e36ec(0x1a5)][_0x3e36ec(0x155)](_0x260ec2[_0x3e36ec(0x19b)]),_0x260ec2['type']){case _0x3b76b7['Add']:break;case _0x3b76b7[_0x3e36ec(0x1bf)]:{this[_0x3e36ec(0x183)][_0x3e36ec(0x1a6)](_0x1b41ee,_0x129e15,{'unitId':_0x1b41ee,'subUnitId':_0x129e15,'ref':'','id':_0x260ec2[_0x3e36ec(0x18b)],'dT':_0x56e482(+_0x260ec2['createTimestamp']),'threadId':_0x260ec2[_0x3e36ec(0x1a3)],'personId':(_0x5af7c7=(_0x192ca4=_0x260ec2['user'])==null?void 0x0:_0x192ca4[_0x3e36ec(0x19a)])!=null?_0x5af7c7:_0x260ec2['userId'],'text':JSON[_0x3e36ec(0x149)](_0x260ec2[_0x3e36ec(0x173)]),'parentId':_0x2de0d8['id']});break;}case _0x3b76b7[_0x3e36ec(0x1ad)]:{const _0x15ac07=this[_0x3e36ec(0x183)]['getComment'](_0x1b41ee,_0x129e15,_0x260ec2[_0x3e36ec(0x18b)]);_0x15ac07&&_0x15ac07[_0x3e36ec(0x193)]&&this[_0x3e36ec(0x183)][_0x3e36ec(0x13f)](_0x1b41ee,_0x129e15,_0x260ec2[_0x3e36ec(0x18b)]);break;}case _0x3b76b7[_0x3e36ec(0x16b)]:{this[_0x3e36ec(0x183)][_0x3e36ec(0x18d)](_0x1b41ee,_0x129e15,{'commentId':_0x260ec2[_0x3e36ec(0x18b)],'text':JSON[_0x3e36ec(0x149)](_0x260ec2[_0x3e36ec(0x173)])});break;}case _0x3b76b7[_0x3e36ec(0x1c0)]:{const _0xdeb640=(_0x31ed58=this['_threadCommentModel'][_0x3e36ec(0x15f)](_0x260ec2[_0x3e36ec(0x15c)])[_0x3e36ec(0x15d)](_0x5f557f=>_0x5f557f[_0x3e36ec(0x1a3)]===_0x260ec2[_0x3e36ec(0x1a3)]))==null?void 0x0:_0x31ed58['root'];_0xdeb640&&this[_0x3e36ec(0x183)]['resolveComment'](_0x1b41ee,_0x129e15,_0xdeb640['id'],_0x260ec2[_0x3e36ec(0x13c)]===_0x1e374e['Solved']);break;}}}));}};_0x4ba89d=_0x45b173([_0x54e706(0x0,_0x3843da['Inject'](_0x3f1c4b[_0x1adf94(0x1ae)])),_0x54e706(0x1,_0x3843da[_0x1adf94(0x16e)](_0xa60461[_0x1adf94(0x17a)])),_0x54e706(0x2,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x18e)])),_0x54e706(0x3,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x143)]))],_0x4ba89d);const _0x2a5f42=_0x1adf94(0x191),_0x118b30={};var _0xd87e2f=Object[_0x1adf94(0x1a4)],_0x5dfe33=(_0x5bea36,_0x4496a7,_0x1e1490,_0x34fc56)=>{const _0x11147f=_0x1adf94;for(var _0x414297=_0x34fc56>0x1?void 0x0:_0x34fc56?_0xd87e2f(_0x4496a7,_0x1e1490):_0x4496a7,_0x3f7ccb=_0x5bea36[_0x11147f(0x178)]-0x1,_0x5b7834;_0x3f7ccb>=0x0;_0x3f7ccb--)(_0x5b7834=_0x5bea36[_0x3f7ccb])&&(_0x414297=_0x5b7834(_0x414297)||_0x414297);return _0x414297;},_0x59cd97=(_0x542352,_0x18e120)=>(_0x5c2889,_0x484fed)=>_0x18e120(_0x5c2889,_0x484fed,_0x542352);function _0x4a6c48(_0x39826f,_0x19dfdb){const _0x199d9d=_0x1adf94,_0x3eba59=_0x39826f['replies'][0x0];return{..._0x19dfdb,'id':_0x3eba59[_0x199d9d(0x18b)],'resolved':_0x39826f[_0x199d9d(0x13c)]===0x1,'dT':_0x56e482(_0x3eba59[_0x199d9d(0x181)]),'personId':_0x3eba59[_0x199d9d(0x1b8)],'threadId':_0x3eba59[_0x199d9d(0x1a3)]};}function _0x8c25d5(_0xf617bb,_0x20d505,_0x2941a4){const _0xf71888=_0x1adf94;var _0x19b888,_0x26eb09;if(((_0x26eb09=(_0x19b888=_0xf617bb==null?void 0x0:_0xf617bb[_0xf71888(0x177)])==null?void 0x0:_0x19b888[_0xf71888(0x178)])!=null?_0x26eb09:0x0)>0x0){const _0x2e4417=(_0x4d7d62,_0x3a3615)=>({'id':_0x4d7d62[_0xf71888(0x18b)],'threadId':_0x4d7d62[_0xf71888(0x1a3)],'dT':_0x56e482(_0x4d7d62[_0xf71888(0x181)]),'personId':_0x4d7d62['userId'],'resolved':_0xf617bb['solved']===_0x1e374e['Solved'],'unitId':_0x20d505,'subUnitId':_0x2941a4,'text':JSON[_0xf71888(0x149)](_0x4d7d62[_0xf71888(0x173)]),'parentId':_0x3a3615}),_0x29cc96=_0x2e4417(_0xf617bb['replies'][0x0]);return{..._0x29cc96,'children':_0xf617bb[_0xf71888(0x177)]['slice'](0x1)[_0xf71888(0x1bb)](_0x3ca61f=>_0x2e4417(_0x3ca61f,_0x29cc96['id']))};}return null;}let _0x3e5a96=class{constructor(_0x4c57bc,_0x559e27,_0x402042,_0x4400ee){const _0x76402a=_0x1adf94;this['_httpService']=_0x4c57bc,this[_0x76402a(0x1a5)]=_0x559e27,this['_sessionService']=_0x402042,this[_0x76402a(0x162)]=_0x4400ee;}async[_0x1adf94(0x1a6)](_0x30de3a){const _0x275659=_0x1adf94;var _0x13d9fb,_0x2be6bc;const {parentId:_0x14e50a,unitId:_0xc2e0de,text:_0x23554a,threadId:_0x228959}=_0x30de3a,_0x2478ac=(_0x2be6bc=(_0x13d9fb=_0x23554a['customRanges'])==null?void 0x0:_0x13d9fb[_0x275659(0x142)](_0x3ec32c=>_0x3ec32c[_0x275659(0x1be)]===_0x3843da[_0x275659(0x151)][_0x275659(0x196)])[_0x275659(0x1bb)](_0x4c7f1c=>_0x4c7f1c[_0x275659(0x156)]))!=null?_0x2be6bc:[],_0xdf338a=JSON[_0x275659(0x1b3)](_0x23554a),_0x10641d=(await this['_sessionService'][_0x275659(0x136)](_0xc2e0de))[_0x275659(0x163)]();if(_0x14e50a){const _0x43241e={'memberId':_0x10641d,'unitId':_0xc2e0de,'content':_0xdf338a,'mention':_0x2478ac,'threadId':_0x228959},_0x1101a9=(await this[_0x275659(0x1a8)][_0x275659(0x186)](_0x275659(0x152)+_0xc2e0de+'/reply',{'body':_0x43241e}))[_0x275659(0x192)][_0x275659(0x16c)];return{..._0x30de3a,'id':_0x1101a9['replyId'],'dT':_0x3843da[_0x275659(0x150)](+_0x1101a9[_0x275659(0x181)])[_0x275659(0x153)](_0x275659(0x157)),'personId':_0x1101a9['userId']};}else{const _0x538ab8={'memberId':_0x10641d,'unitId':_0xc2e0de,'content':_0xdf338a,'mention':_0x2478ac},_0xc663ff=await this[_0x275659(0x1a8)][_0x275659(0x186)](_0x275659(0x152)+_0xc2e0de+_0x275659(0x16d),{'body':_0x538ab8});return _0x4a6c48(_0xc663ff[_0x275659(0x192)][_0x275659(0x171)],_0x30de3a);}}async['updateComment'](_0xd859d2){const _0x24ba20=_0x1adf94;var _0x58c75f,_0x52c5df;const {text:_0x124b3f,unitId:_0x39dd0e}=_0xd859d2,_0x1ae344=(_0x52c5df=(_0x58c75f=_0x124b3f['customRanges'])==null?void 0x0:_0x58c75f[_0x24ba20(0x142)](_0x5a0d86=>_0x5a0d86[_0x24ba20(0x1be)]===_0x3843da[_0x24ba20(0x151)]['COMMENT'])[_0x24ba20(0x1bb)](_0x371064=>_0x371064[_0x24ba20(0x156)]))!=null?_0x52c5df:[],_0x5cb75b=JSON[_0x24ba20(0x1b3)](_0x124b3f),_0x10e8c7=_0xd859d2[_0x24ba20(0x1a3)],_0x2e95cf=_0xd859d2['id'],_0xe56d93={'memberId':(await this[_0x24ba20(0x17d)][_0x24ba20(0x136)](_0x39dd0e))[_0x24ba20(0x163)](),'unitId':_0x39dd0e,'threadId':_0x10e8c7,'mention':_0x1ae344,'content':_0x5cb75b,'replyId':_0x2e95cf},_0x486069=await this[_0x24ba20(0x1a8)]['post']('/universer-api/comment/unit/'+_0x39dd0e+_0x24ba20(0x145),{'body':_0xe56d93});return!_0x486069[_0x24ba20(0x192)][_0x24ba20(0x1bc)]||_0x486069['body'][_0x24ba20(0x1bc)][_0x24ba20(0x1af)]===0x1;}async['resolveComment'](_0x292338){const _0x5defa4=_0x1adf94,{unitId:_0x145c13}=_0x292338,_0x4f98bb=_0x292338['threadId'],_0x589378={'memberId':this[_0x5defa4(0x1a5)]['getCurrentUser']()['userID'],'unitId':_0x145c13,'threadId':_0x4f98bb,'solved':_0x292338[_0x5defa4(0x1ba)]?_0x1e374e[_0x5defa4(0x14d)]:_0x1e374e['OpenOrReOpen']},_0x7a42bd=await this[_0x5defa4(0x1a8)][_0x5defa4(0x186)](_0x5defa4(0x152)+_0x145c13+_0x5defa4(0x15e),{'body':_0x589378});return!_0x7a42bd[_0x5defa4(0x192)]['error']||_0x7a42bd[_0x5defa4(0x192)]['error'][_0x5defa4(0x1af)]===0x1;}async[_0x1adf94(0x13f)](_0x3e94c8,_0x4d96a1,_0x541538,_0x2d5256){const _0x44c8ee=_0x1adf94,_0xb643fd={'memberId':(await this['_sessionService']['requireSession'](_0x3e94c8))['getMemberID'](),'threadId':_0x541538,'replyId':_0x2d5256,'unitId':_0x3e94c8},_0xf7c776=await this[_0x44c8ee(0x1a8)][_0x44c8ee(0x186)](_0x44c8ee(0x152)+_0x3e94c8+_0x44c8ee(0x16a),{'body':_0xb643fd});return!_0xf7c776[_0x44c8ee(0x192)][_0x44c8ee(0x1bc)]||_0xf7c776[_0x44c8ee(0x192)]['error'][_0x44c8ee(0x1af)]===0x1;}async[_0x1adf94(0x15b)](_0x2af14b,_0x5cdccd,_0x13cec4){const _0x4196e8=_0x1adf94,_0x35c188={'unitId':_0x2af14b,'threadId':_0x13cec4},_0x2fc9ad=await this[_0x4196e8(0x1a8)]['post'](_0x4196e8(0x152)+_0x2af14b+_0x4196e8(0x1a9),{'body':_0x35c188}),_0x4d0113=_0x13cec4[_0x4196e8(0x1bb)](_0x14956c=>_0x8c25d5(_0x2fc9ad[_0x4196e8(0x192)]['comments'][_0x14956c],_0x2af14b,_0x5cdccd))[_0x4196e8(0x142)](Boolean);return Object[_0x4196e8(0x182)](_0x2fc9ad['body'][_0x4196e8(0x14f)])[_0x4196e8(0x164)](_0x5b7214=>{const _0x509f0b=_0x4196e8;this['_userService'][_0x509f0b(0x155)](_0x5b7214);}),_0x4d0113;}['saveCommentToSnapshot'](_0x2d01d1){return{'id':_0x2d01d1['id'],'threadId':_0x2d01d1['threadId'],'ref':_0x2d01d1['ref']};}};_0x3e5a96=_0x5dfe33([_0x59cd97(0x0,_0x3843da[_0x1adf94(0x16e)](_0x534678[_0x1adf94(0x166)])),_0x59cd97(0x1,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x18e)])),_0x59cd97(0x2,_0x3843da[_0x1adf94(0x16e)](_0x3f1c4b['CollaborationSessionService'])),_0x59cd97(0x3,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x143)]))],_0x3e5a96);var _0x59146a=Object['getOwnPropertyDescriptor'],_0xe9b424=(_0x3e115a,_0x1c0cdc,_0x237f32,_0xd5b929)=>{const _0x29e27d=_0x1adf94;for(var _0x4a1da4=_0xd5b929>0x1?void 0x0:_0xd5b929?_0x59146a(_0x1c0cdc,_0x237f32):_0x1c0cdc,_0x2d8f0d=_0x3e115a[_0x29e27d(0x178)]-0x1,_0x29769b;_0x2d8f0d>=0x0;_0x2d8f0d--)(_0x29769b=_0x3e115a[_0x2d8f0d])&&(_0x4a1da4=_0x29769b(_0x4a1da4)||_0x4a1da4);return _0x4a1da4;},_0x1365e4=(_0x183998,_0x32a7c7)=>(_0x4a8e14,_0x2f3c89)=>_0x32a7c7(_0x4a8e14,_0x2f3c89,_0x183998);let _0x42986f=class extends _0x3843da[_0x1adf94(0x1aa)]{constructor(_0x234c05,_0x53a8e9){const _0x39e61b=_0x1adf94;super(),this[_0x39e61b(0x1b0)]=_0x234c05,this[_0x39e61b(0x189)]=_0x53a8e9,this[_0x39e61b(0x187)]();}[_0x1adf94(0x187)](){const _0x8f7212=_0x1adf94;this[_0x8f7212(0x1b0)][_0x8f7212(0x194)]=this[_0x8f7212(0x189)],this['_threadCommentDataSourceService'][_0x8f7212(0x17f)]=!0x1;}};_0x42986f=_0xe9b424([_0x1365e4(0x0,_0xa60461[_0x1adf94(0x14e)]),_0x1365e4(0x1,_0x3843da[_0x1adf94(0x16e)](_0x3e5a96))],_0x42986f);var _0x4fc720=Object[_0x1adf94(0x1ac)],_0x497a62=Object[_0x1adf94(0x1a4)],_0x53bbcf=(_0x1fc384,_0x5a9cf0,_0xb354ad)=>_0x5a9cf0 in _0x1fc384?_0x4fc720(_0x1fc384,_0x5a9cf0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb354ad}):_0x1fc384[_0x5a9cf0]=_0xb354ad,_0x306448=(_0x4f2d38,_0x4709de,_0x126efc,_0x20cff7)=>{for(var _0xce1e4f=_0x20cff7>0x1?void 0x0:_0x20cff7?_0x497a62(_0x4709de,_0x126efc):_0x4709de,_0x18d833=_0x4f2d38['length']-0x1,_0x45b08a;_0x18d833>=0x0;_0x18d833--)(_0x45b08a=_0x4f2d38[_0x18d833])&&(_0xce1e4f=_0x45b08a(_0xce1e4f)||_0xce1e4f);return _0xce1e4f;},_0x3e0c13=(_0x5e5eae,_0x29d3e7)=>(_0xe3da25,_0x1b3e7a)=>_0x29d3e7(_0xe3da25,_0x1b3e7a,_0x5e5eae),_0x389865=(_0x16ae95,_0x3c5560,_0x155544)=>_0x53bbcf(_0x16ae95,typeof _0x3c5560!=_0x1adf94(0x1b7)?_0x3c5560+'':_0x3c5560,_0x155544);_0x295029['UniverThreadCommentDataSourcePlugin']=class extends _0x3843da[_0x1adf94(0x158)]{constructor(_0x1a4366=_0x118b30,_0xc82f5d,_0x45c378){const _0x19555a=_0x1adf94;super(),this[_0x19555a(0x137)]=_0x1a4366,this[_0x19555a(0x162)]=_0xc82f5d,this[_0x19555a(0x179)]=_0x45c378;const {..._0x19e2a3}=_0x3843da[_0x19555a(0x13d)]({},_0x118b30,this[_0x19555a(0x137)]);this[_0x19555a(0x179)][_0x19555a(0x1bd)](_0x2a5f42,_0x19e2a3);}[_0x1adf94(0x168)](){const _0x61cc24=_0x1adf94;[[_0x3e5a96],[_0x42986f],[_0x4ba89d]][_0x61cc24(0x164)](_0x3206c0=>{const _0x85ab2f=_0x61cc24;this[_0x85ab2f(0x162)][_0x85ab2f(0x199)](_0x3206c0);});}[_0x1adf94(0x17b)](){const _0x369803=_0x1adf94;this[_0x369803(0x162)]['get'](_0x42986f),this[_0x369803(0x162)][_0x369803(0x138)](_0x4ba89d);}},_0x389865(_0x295029[_0x1adf94(0x172)],_0x1adf94(0x18c),_0x4c6787),_0x389865(_0x295029[_0x1adf94(0x172)],'type',_0x3843da[_0x1adf94(0x13a)][_0x1adf94(0x146)]),_0x295029['UniverThreadCommentDataSourcePlugin']=_0x306448([_0x3843da['DependentOn'](_0x444b73[_0x1adf94(0x19c)],_0x3f1c4b[_0x1adf94(0x1a1)],_0x4bff4b[_0x1adf94(0x19e)]),_0x3e0c13(0x1,_0x3843da['Inject'](_0x3843da[_0x1adf94(0x143)])),_0x3e0c13(0x2,_0x3843da[_0x1adf94(0x19f)])],_0x295029[_0x1adf94(0x172)]),Object[_0x1adf94(0x1ac)](_0x295029,Symbol[_0x1adf94(0x160)],{'value':_0x1adf94(0x190)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.2",
49
- "@univerjs/protocol": "0.1.44-alpha.3",
50
- "@univerjs-pro/license": "0.6.2",
51
- "@univerjs/core": "0.6.2",
52
- "@univerjs/network": "0.6.2",
53
- "@univerjs/thread-comment-ui": "0.6.2",
54
- "@univerjs/thread-comment": "0.6.2"
48
+ "@univerjs-pro/collaboration-client": "0.6.3",
49
+ "@univerjs-pro/license": "0.6.3",
50
+ "@univerjs/network": "0.6.3",
51
+ "@univerjs/core": "0.6.3",
52
+ "@univerjs/thread-comment-ui": "0.6.3",
53
+ "@univerjs/thread-comment": "0.6.3",
54
+ "@univerjs/protocol": "0.1.44-alpha.3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
- "typescript": "^5.7.3",
58
+ "typescript": "^5.8.2",
59
59
  "vite": "^6.2.0",
60
60
  "vitest": "^3.0.7",
61
- "@univerjs-infra/shared": "0.6.2"
61
+ "@univerjs-infra/shared": "0.6.3"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",