@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505141607 → 0.7.0-nightly.202505161607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x46c713=_0x28d5;(function(_0x4ba4e3,_0x403e98){const _0x552bcf=_0x28d5,_0x203ada=_0x4ba4e3();while(!![]){try{const _0x493087=-parseInt(_0x552bcf(0x1c9))/0x1*(-parseInt(_0x552bcf(0x1ef))/0x2)+-parseInt(_0x552bcf(0x1a5))/0x3*(parseInt(_0x552bcf(0x1f2))/0x4)+parseInt(_0x552bcf(0x1a8))/0x5*(-parseInt(_0x552bcf(0x18b))/0x6)+-parseInt(_0x552bcf(0x1fe))/0x7+-parseInt(_0x552bcf(0x1df))/0x8+-parseInt(_0x552bcf(0x1ae))/0x9*(-parseInt(_0x552bcf(0x1e3))/0xa)+parseInt(_0x552bcf(0x1b9))/0xb*(parseInt(_0x552bcf(0x1e4))/0xc);if(_0x493087===_0x403e98)break;else _0x203ada['push'](_0x203ada['shift']());}catch(_0x2de66a){_0x203ada['push'](_0x203ada['shift']());}}}(_0x2031,0xc94de));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x46c713(0x1bc)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x46c713(0x202)),j=require(_0x46c713(0x1c5)),M=require(_0x46c713(0x1c4)),w=require('rxjs'),P=require(_0x46c713(0x1dd)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3bfd70=>(_0x3bfd70[_0x3bfd70['OpenOrReOpen']=0x0]=_0x46c713(0x1b2),_0x3bfd70[_0x3bfd70[_0x46c713(0x204)]=0x1]=_0x46c713(0x204),_0x3bfd70[_0x3bfd70['UNRECOGNIZED']=-0x1]=_0x46c713(0x19a),_0x3bfd70))(I||{}),v=(_0x413cb0=>(_0x413cb0[_0x413cb0[_0x46c713(0x1f9)]=0x0]=_0x46c713(0x1f9),_0x413cb0[_0x413cb0[_0x46c713(0x1b6)]=0x1]=_0x46c713(0x1b6),_0x413cb0[_0x413cb0[_0x46c713(0x190)]=0x2]='Reply',_0x413cb0[_0x413cb0['Edit']=0x3]=_0x46c713(0x194),_0x413cb0[_0x413cb0['Delete']=0x4]=_0x46c713(0x1d7),_0x413cb0[_0x413cb0[_0x46c713(0x1de)]=0x5]=_0x46c713(0x1de),_0x413cb0[_0x413cb0[_0x46c713(0x19a)]=-0x1]=_0x46c713(0x19a),_0x413cb0))(v||{});const f=_0x268dd6=>c['dayjs'](new Date(+_0x268dd6))[_0x46c713(0x196)](_0x46c713(0x1e9)),R=async(_0x5ba07b,_0x4ec5fb)=>{const _0x295717=_0x46c713,_0x26e70b=_0x5ba07b['get'](c['UserManagerService']),_0x521f34=_0x5ba07b['get'](P[_0x295717(0x1dc)]);_0x4ec5fb['forEach'](_0x555757=>{const _0x16de65=_0x295717;_0x26e70b[_0x16de65(0x1f4)](_0x555757)&&_0x4ec5fb[_0x16de65(0x1c8)](_0x555757);}),_0x4ec5fb[_0x295717(0x199)]&&(await _0x521f34['get'](_0x295717(0x1d9),{'params':{'userIDs':[..._0x4ec5fb]}}))[_0x295717(0x1e8)]['users'][_0x295717(0x1d1)](_0x28a319=>{const _0x131039=_0x295717;_0x28a319&&_0x26e70b[_0x131039(0x1b4)](_0x28a319);});};var $=Object['getOwnPropertyDescriptor'],E=(_0xa91494,_0x47c401,_0x541901,_0x574439)=>{const _0x2b0245=_0x46c713;for(var _0x2882e4=_0x574439>0x1?void 0x0:_0x574439?$(_0x47c401,_0x541901):_0x47c401,_0x596f2a=_0xa91494[_0x2b0245(0x1b5)]-0x1,_0x214d75;_0x596f2a>=0x0;_0x596f2a--)(_0x214d75=_0xa91494[_0x596f2a])&&(_0x2882e4=_0x214d75(_0x2882e4)||_0x2882e4);return _0x2882e4;},S=(_0x128fa4,_0x4391c8)=>(_0x5604a1,_0x57d907)=>_0x4391c8(_0x5604a1,_0x57d907,_0x128fa4);let p=class extends c[_0x46c713(0x1e6)]{constructor(_0x5353c9,_0x2478e9,_0xdbbcc4,_0x4cbaf8){const _0x2386c5=_0x46c713;super(),this['_commentService']=_0x5353c9,this[_0x2386c5(0x1ea)]=_0x2478e9,this[_0x2386c5(0x191)]=_0xdbbcc4,this['_injector']=_0x4cbaf8,this[_0x2386c5(0x1fc)](),this['_initUserSync']();}[_0x46c713(0x1a1)](){const _0x3b1b96=_0x46c713;this[_0x3b1b96(0x1f7)](this[_0x3b1b96(0x1ea)][_0x3b1b96(0x20b)][_0x3b1b96(0x1d6)](w[_0x3b1b96(0x1c0)](0x10))[_0x3b1b96(0x195)](_0x53dbc9=>{const _0x11124c=_0x3b1b96,_0x4b1ec0=new Set();_0x53dbc9[_0x11124c(0x1d1)](_0x18dbb7=>{const _0x1daf66=_0x11124c;switch(_0x18dbb7['type']){case _0x1daf66(0x201):{const _0xecb1e4=_0x18dbb7[_0x1daf66(0x1a3)]['personId'];_0x4b1ec0[_0x1daf66(0x201)](_0xecb1e4);break;}}}),R(this[_0x11124c(0x1b3)],_0x4b1ec0);}));}['_init'](){const _0x52a874=_0x46c713;this[_0x52a874(0x1f7)](this['_commentService']['commentUpdate$']['subscribe'](async _0x85d5bf=>{const _0x3f7029=_0x52a874;var _0x1b6474,_0x5e9602,_0x55bae7,_0x39ed10;const _0x37ae8c=(_0x1b6474=this[_0x3f7029(0x1ea)]['getUnit'](_0x85d5bf[_0x3f7029(0x1d8)])[_0x3f7029(0x1c3)](_0x332542=>_0x332542[_0x3f7029(0x1a4)]===_0x85d5bf[_0x3f7029(0x1a4)]))==null?void 0x0:_0x1b6474[_0x3f7029(0x1c6)];if(!_0x37ae8c)return;const {unitId:_0x492446,subUnitId:_0x5ae43f}=_0x37ae8c;switch(_0x85d5bf['user']&&this['_userService'][_0x3f7029(0x1b4)](_0x85d5bf[_0x3f7029(0x1be)]),_0x85d5bf[_0x3f7029(0x1f0)]){case v[_0x3f7029(0x1b6)]:break;case v[_0x3f7029(0x190)]:{this['_threadCommentModel'][_0x3f7029(0x209)](_0x492446,_0x5ae43f,{'unitId':_0x492446,'subUnitId':_0x5ae43f,'ref':'','id':_0x85d5bf[_0x3f7029(0x1c2)],'dT':f(+_0x85d5bf['createTimestamp']),'threadId':_0x85d5bf['threadId'],'personId':(_0x55bae7=(_0x5e9602=_0x85d5bf[_0x3f7029(0x1be)])==null?void 0x0:_0x5e9602[_0x3f7029(0x207)])!=null?_0x55bae7:_0x85d5bf[_0x3f7029(0x1b0)],'text':JSON[_0x3f7029(0x20c)](_0x85d5bf[_0x3f7029(0x1a2)]),'parentId':_0x37ae8c['id']});break;}case v['Delete']:{const _0x1e6956=this[_0x3f7029(0x1ea)][_0x3f7029(0x1e0)](_0x492446,_0x5ae43f,_0x85d5bf['replyId']);_0x1e6956&&_0x1e6956[_0x3f7029(0x200)]&&this[_0x3f7029(0x1ea)][_0x3f7029(0x208)](_0x492446,_0x5ae43f,_0x85d5bf['replyId']);break;}case v[_0x3f7029(0x194)]:{this[_0x3f7029(0x1ea)][_0x3f7029(0x18f)](_0x492446,_0x5ae43f,{'commentId':_0x85d5bf['replyId'],'text':JSON[_0x3f7029(0x20c)](_0x85d5bf[_0x3f7029(0x1a2)])});break;}case v['Solve']:{const _0xc3c6b4=(_0x39ed10=this[_0x3f7029(0x1ea)]['getUnit'](_0x85d5bf[_0x3f7029(0x1d8)])['find'](_0x547622=>_0x547622['threadId']===_0x85d5bf[_0x3f7029(0x1a4)]))==null?void 0x0:_0x39ed10[_0x3f7029(0x1c6)];_0xc3c6b4&&this[_0x3f7029(0x1ea)][_0x3f7029(0x1fb)](_0x492446,_0x5ae43f,_0xc3c6b4['id'],_0x85d5bf[_0x3f7029(0x1e7)]===I[_0x3f7029(0x204)]);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x46c713(0x1cb)](M[_0x46c713(0x1e2)])),S(0x2,c['Inject'](c[_0x46c713(0x1ce)])),S(0x3,c[_0x46c713(0x1cb)](c['Injector']))],p);const q=_0x46c713(0x193),D={};var A=Object[_0x46c713(0x1ee)],x=(_0x35d6c6,_0x2c0dbf,_0x463c5f,_0x21e3ff)=>{const _0x1634f2=_0x46c713;for(var _0x4fe36f=_0x21e3ff>0x1?void 0x0:_0x21e3ff?A(_0x2c0dbf,_0x463c5f):_0x2c0dbf,_0x3bc71c=_0x35d6c6[_0x1634f2(0x1b5)]-0x1,_0x39362;_0x3bc71c>=0x0;_0x3bc71c--)(_0x39362=_0x35d6c6[_0x3bc71c])&&(_0x4fe36f=_0x39362(_0x4fe36f)||_0x4fe36f);return _0x4fe36f;},_=(_0x54847d,_0x5299d8)=>(_0x4a71a2,_0x130667)=>_0x5299d8(_0x4a71a2,_0x130667,_0x54847d);function Y(_0x2bdfbc,_0x41213){const _0x5ed997=_0x46c713,_0x5d974d=_0x2bdfbc['replies'][0x0];return{..._0x41213,'id':_0x5d974d[_0x5ed997(0x1c2)],'resolved':_0x2bdfbc['solved']===0x1,'dT':f(_0x5d974d[_0x5ed997(0x1cc)]),'personId':_0x5d974d[_0x5ed997(0x1b0)],'threadId':_0x5d974d[_0x5ed997(0x1a4)]};}function G(_0x19ede5,_0x1257c2,_0x16b1b0){const _0x5825e2=_0x46c713;var _0x4102cb,_0x55379a;if(((_0x55379a=(_0x4102cb=_0x19ede5==null?void 0x0:_0x19ede5[_0x5825e2(0x205)])==null?void 0x0:_0x4102cb[_0x5825e2(0x1b5)])!=null?_0x55379a:0x0)>0x0){const _0x4ac20b=(_0x547e1a,_0x573541)=>({'id':_0x547e1a[_0x5825e2(0x1c2)],'threadId':_0x547e1a[_0x5825e2(0x1a4)],'dT':f(_0x547e1a['createTimestamp']),'personId':_0x547e1a[_0x5825e2(0x1b0)],'resolved':_0x19ede5[_0x5825e2(0x1e7)]===I[_0x5825e2(0x204)],'unitId':_0x1257c2,'subUnitId':_0x16b1b0,'text':JSON[_0x5825e2(0x20c)](_0x547e1a['content']),'parentId':_0x573541}),_0x4163eb=_0x4ac20b(_0x19ede5[_0x5825e2(0x205)][0x0]);return{..._0x4163eb,'children':_0x19ede5['replies']['slice'](0x1)[_0x5825e2(0x19f)](_0x3e3093=>_0x4ac20b(_0x3e3093,_0x4163eb['id']))};}return null;}let g=class{constructor(_0x3de644,_0x397f4c,_0x502bdd,_0x36d59c){const _0x5f45d9=_0x46c713;this[_0x5f45d9(0x1ff)]=_0x3de644,this[_0x5f45d9(0x191)]=_0x397f4c,this[_0x5f45d9(0x1f6)]=_0x502bdd,this['_injector']=_0x36d59c;}async[_0x46c713(0x209)](_0x41833a){const _0x280a0d=_0x46c713;var _0x446ecd,_0x4ccc59;const {parentId:_0x3529c7,unitId:_0x4eb209,text:_0x43c267,threadId:_0x5c06fc}=_0x41833a,_0x16b365=(_0x4ccc59=(_0x446ecd=_0x43c267[_0x280a0d(0x19e)])==null?void 0x0:_0x446ecd[_0x280a0d(0x192)](_0x2ac561=>_0x2ac561[_0x280a0d(0x1b8)]===c['CustomRangeType']['COMMENT'])[_0x280a0d(0x19f)](_0x532259=>_0x532259[_0x280a0d(0x1ba)]))!=null?_0x4ccc59:[],_0x51c747=JSON[_0x280a0d(0x20a)](_0x43c267),_0x1da014=(await this['_sessionService'][_0x280a0d(0x1d2)](_0x4eb209))['getMemberID']();if(_0x3529c7){const _0x4bd421={'memberId':_0x1da014,'unitId':_0x4eb209,'content':_0x51c747,'mention':_0x16b365,'threadId':_0x5c06fc},_0x16694d=(await this[_0x280a0d(0x1ff)][_0x280a0d(0x1a9)](_0x280a0d(0x1f3)+_0x4eb209+_0x280a0d(0x197),{'body':_0x4bd421}))[_0x280a0d(0x1e8)][_0x280a0d(0x1da)];return{..._0x41833a,'id':_0x16694d['replyId'],'dT':c[_0x280a0d(0x1d0)](+_0x16694d[_0x280a0d(0x1cc)])[_0x280a0d(0x196)](_0x280a0d(0x1e9)),'personId':_0x16694d[_0x280a0d(0x1b0)]};}else{const _0x365557={'memberId':_0x1da014,'unitId':_0x4eb209,'content':_0x51c747,'mention':_0x16b365},_0x3687ef=await this[_0x280a0d(0x1ff)]['post'](_0x280a0d(0x1f3)+_0x4eb209+'/add',{'body':_0x365557});return Y(_0x3687ef['body']['comment'],_0x41833a);}}async[_0x46c713(0x18f)](_0x35b73b){const _0x1fc1cc=_0x46c713;var _0x198893,_0xe00cbb;const {text:_0x52376e,unitId:_0x289f66}=_0x35b73b,_0x1c910a=(_0xe00cbb=(_0x198893=_0x52376e[_0x1fc1cc(0x19e)])==null?void 0x0:_0x198893[_0x1fc1cc(0x192)](_0x2059a3=>_0x2059a3[_0x1fc1cc(0x1b8)]===c[_0x1fc1cc(0x1fa)][_0x1fc1cc(0x1d5)])['map'](_0x87d8f1=>_0x87d8f1[_0x1fc1cc(0x1ba)]))!=null?_0xe00cbb:[],_0x133fa9=JSON['stringify'](_0x52376e),_0x3b164e=_0x35b73b[_0x1fc1cc(0x1a4)],_0x289992=_0x35b73b['id'],_0xe40726={'memberId':(await this[_0x1fc1cc(0x1f6)]['requireSession'](_0x289f66))[_0x1fc1cc(0x1cf)](),'unitId':_0x289f66,'threadId':_0x3b164e,'mention':_0x1c910a,'content':_0x133fa9,'replyId':_0x289992},_0x4e16d1=await this[_0x1fc1cc(0x1ff)][_0x1fc1cc(0x1a9)]('/universer-api/comment/unit/'+_0x289f66+_0x1fc1cc(0x1d4),{'body':_0xe40726});return!_0x4e16d1[_0x1fc1cc(0x1e8)][_0x1fc1cc(0x18e)]||_0x4e16d1[_0x1fc1cc(0x1e8)][_0x1fc1cc(0x18e)][_0x1fc1cc(0x1a6)]===0x1;}async[_0x46c713(0x1fb)](_0x49f589){const _0x1c1046=_0x46c713,{unitId:_0x3c3227}=_0x49f589,_0x276061=_0x49f589['threadId'],_0x53cfc5={'memberId':this[_0x1c1046(0x191)][_0x1c1046(0x1db)]()['userID'],'unitId':_0x3c3227,'threadId':_0x276061,'solved':_0x49f589[_0x1c1046(0x1d3)]?I[_0x1c1046(0x204)]:I[_0x1c1046(0x1b2)]},_0x389e21=await this[_0x1c1046(0x1ff)][_0x1c1046(0x1a9)]('/universer-api/comment/unit/'+_0x3c3227+_0x1c1046(0x198),{'body':_0x53cfc5});return!_0x389e21[_0x1c1046(0x1e8)]['error']||_0x389e21[_0x1c1046(0x1e8)][_0x1c1046(0x18e)][_0x1c1046(0x1a6)]===0x1;}async['deleteComment'](_0x401a1e,_0x36b1d2,_0x48e476,_0x28c9c2){const _0x408cf1=_0x46c713,_0x13c109={'memberId':(await this[_0x408cf1(0x1f6)][_0x408cf1(0x1d2)](_0x401a1e))['getMemberID'](),'threadId':_0x48e476,'replyId':_0x28c9c2,'unitId':_0x401a1e},_0x3b9366=await this[_0x408cf1(0x1ff)][_0x408cf1(0x1a9)](_0x408cf1(0x1f3)+_0x401a1e+_0x408cf1(0x1af),{'body':_0x13c109});return!_0x3b9366[_0x408cf1(0x1e8)][_0x408cf1(0x18e)]||_0x3b9366[_0x408cf1(0x1e8)][_0x408cf1(0x18e)][_0x408cf1(0x1a6)]===0x1;}async[_0x46c713(0x1ac)](_0x5dcef6,_0x5be741,_0x2bfc80){const _0x59a10d=_0x46c713,_0x3be433={'unitId':_0x5dcef6,'threadId':_0x2bfc80},_0x25ef0d=await this[_0x59a10d(0x1ff)][_0x59a10d(0x1a9)](_0x59a10d(0x1f3)+_0x5dcef6+_0x59a10d(0x206),{'body':_0x3be433}),_0x235883=_0x2bfc80['map'](_0x407483=>G(_0x25ef0d[_0x59a10d(0x1e8)][_0x59a10d(0x1f1)][_0x407483],_0x5dcef6,_0x5be741))[_0x59a10d(0x192)](Boolean);return Object[_0x59a10d(0x1fd)](_0x25ef0d['body'][_0x59a10d(0x1ed)])[_0x59a10d(0x1d1)](_0xd4f862=>{const _0x4c4bb0=_0x59a10d;this[_0x4c4bb0(0x191)][_0x4c4bb0(0x1b4)](_0xd4f862);}),_0x235883;}[_0x46c713(0x1c7)](_0x49a53b){const _0x32bddc=_0x46c713;return{'id':_0x49a53b['id'],'threadId':_0x49a53b[_0x32bddc(0x1a4)],'ref':_0x49a53b[_0x32bddc(0x1cd)]};}};g=x([_(0x0,c[_0x46c713(0x1cb)](P[_0x46c713(0x1dc)])),_(0x1,c[_0x46c713(0x1cb)](c['UserManagerService'])),_(0x2,c[_0x46c713(0x1cb)](b[_0x46c713(0x1ab)])),_(0x3,c[_0x46c713(0x1cb)](c['Injector']))],g);var H=Object[_0x46c713(0x1ee)],J=(_0x48abcd,_0x48781a,_0x3773dc,_0x2059e9)=>{for(var _0x572ff=_0x2059e9>0x1?void 0x0:_0x2059e9?H(_0x48781a,_0x3773dc):_0x48781a,_0x11a8bf=_0x48abcd['length']-0x1,_0x5ba9a9;_0x11a8bf>=0x0;_0x11a8bf--)(_0x5ba9a9=_0x48abcd[_0x11a8bf])&&(_0x572ff=_0x5ba9a9(_0x572ff)||_0x572ff);return _0x572ff;},y=(_0x3a356c,_0xfe899a)=>(_0x2c9a30,_0x227abb)=>_0xfe899a(_0x2c9a30,_0x227abb,_0x3a356c);let C=class extends c[_0x46c713(0x1e6)]{constructor(_0x5bda51,_0x10bbec){const _0x4dafd6=_0x46c713;super(),this[_0x4dafd6(0x1e1)]=_0x5bda51,this[_0x4dafd6(0x1a0)]=_0x10bbec,this[_0x4dafd6(0x1aa)]();}[_0x46c713(0x1aa)](){const _0x4911e0=_0x46c713;this['_threadCommentDataSourceService'][_0x4911e0(0x1bb)]=this[_0x4911e0(0x1a0)],this[_0x4911e0(0x1e1)][_0x4911e0(0x1e5)]=!0x1;}};C=J([y(0x0,M[_0x46c713(0x18c)]),y(0x1,c[_0x46c713(0x1cb)](g))],C);function _0x28d5(_0x246c48,_0x589879){const _0x20315a=_0x2031();return _0x28d5=function(_0x28d556,_0x44ddb8){_0x28d556=_0x28d556-0x18b;let _0x502a8b=_0x20315a[_0x28d556];return _0x502a8b;},_0x28d5(_0x246c48,_0x589879);}var F=Object[_0x46c713(0x203)],L=Object[_0x46c713(0x1ee)],Z=(_0xd00cf,_0x410264,_0xec52bc)=>_0x410264 in _0xd00cf?F(_0xd00cf,_0x410264,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xec52bc}):_0xd00cf[_0x410264]=_0xec52bc,W=(_0x46a0ee,_0x58487d,_0x2235cb,_0x4ef758)=>{const _0x2020a5=_0x46c713;for(var _0x3a82a7=_0x4ef758>0x1?void 0x0:_0x4ef758?L(_0x58487d,_0x2235cb):_0x58487d,_0x454493=_0x46a0ee[_0x2020a5(0x1b5)]-0x1,_0x4d10a2;_0x454493>=0x0;_0x454493--)(_0x4d10a2=_0x46a0ee[_0x454493])&&(_0x3a82a7=_0x4d10a2(_0x3a82a7)||_0x3a82a7);return _0x3a82a7;},O=(_0x566455,_0xd73372)=>(_0x2ceb27,_0x95dc3c)=>_0xd73372(_0x2ceb27,_0x95dc3c,_0x566455),N=(_0x4321b4,_0x1d34b8,_0x653fd8)=>Z(_0x4321b4,typeof _0x1d34b8!='symbol'?_0x1d34b8+'':_0x1d34b8,_0x653fd8);function _0x2031(){const _0x16751f=['Unknown','CustomRangeType','resolveComment','_init','values','3043012mwbKbF','_httpService','parentId','add','@univerjs/core','defineProperty','Solved','replies','/list','userID','deleteComment','addComment','stringify','commentUpdate$','parse','264798hQKdDc','IThreadCommentDataSourceService','_configService','error','updateComment','Reply','_userService','filter','thread-comment-data-source.config','Edit','subscribe','format','/reply','/solved','size','UNRECOGNIZED','UniverInstanceType','pluginName','onStarting','customRanges','map','_threadCommentDataSource','_initUserSync','content','payload','threadId','9282oXgZnX','code','UNIVER_UNKNOWN','35YqvCSr','post','_initDataSource','CollaborationSessionService','listComments','IConfigService','9uGlNxh','/delete','userId','setConfig','OpenOrReOpen','_injector','addUser','length','Add','UniverLicensePlugin','rangeType','55uwYHcP','rangeId','dataSource','Module','UniverCollaborationClientPlugin','user','get','bufferTime','DependentOn','replyId','find','@univerjs/thread-comment','@univerjs/thread-comment-ui','root','saveCommentToSnapshot','delete','1292212MfXhfP','_config','Inject','createTimestamp','ref','UserManagerService','getMemberID','dayjs','forEach','requireSession','resolved','/edit','COMMENT','pipe','Delete','unitId','/universer-api/user/list','reply','getCurrentUser','HTTPService','@univerjs/network','Solve','6233064OyYvfP','getComment','_threadCommentDataSourceService','ThreadCommentModel','12456760wxvIDD','3025248vQgMrd','syncUpdateMutationToColla','Disposable','solved','body','YYYY/MM/DD\x20HH:mm','_threadCommentModel','UniverThreadCommentDataSourcePlugin','Injector','users','getOwnPropertyDescriptor','2OLKILC','type','comments','1876sjopmL','/universer-api/comment/unit/','getUser','onReady','_sessionService','disposeWithMe','UniverThreadCommentUIPlugin'];_0x2031=function(){return _0x16751f;};return _0x2031();}exports[_0x46c713(0x1eb)]=class extends c['Plugin']{constructor(_0x117487=D,_0x4ccdc3,_0x48d3a6){const _0x1d329e=_0x46c713;super(),this[_0x1d329e(0x1ca)]=_0x117487,this[_0x1d329e(0x1b3)]=_0x4ccdc3,this[_0x1d329e(0x18d)]=_0x48d3a6;const {..._0x45a2d6}=c['merge']({},D,this[_0x1d329e(0x1ca)]);this[_0x1d329e(0x18d)][_0x1d329e(0x1b1)](q,_0x45a2d6);}[_0x46c713(0x19d)](){[[g],[C],[p]]['forEach'](_0x271424=>{const _0x490710=_0x28d5;this[_0x490710(0x1b3)][_0x490710(0x201)](_0x271424);});}[_0x46c713(0x1f5)](){const _0xb4e60e=_0x46c713;this['_injector']['get'](C),this[_0xb4e60e(0x1b3)][_0xb4e60e(0x1bf)](p);}},N(exports[_0x46c713(0x1eb)],_0x46c713(0x19c),U),N(exports[_0x46c713(0x1eb)],_0x46c713(0x1f0),c[_0x46c713(0x19b)][_0x46c713(0x1a7)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x46c713(0x1c1)](j[_0x46c713(0x1f8)],b[_0x46c713(0x1bd)],T[_0x46c713(0x1b7)]),O(0x1,c['Inject'](c[_0x46c713(0x1ec)])),O(0x2,c[_0x46c713(0x1ad)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x233612=_0x22f2;(function(_0x4f3314,_0x25f9a7){const _0x5c1f1d=_0x22f2,_0xf66fde=_0x4f3314();while(!![]){try{const _0x500b0d=parseInt(_0x5c1f1d(0x24d))/0x1+-parseInt(_0x5c1f1d(0x1f7))/0x2*(parseInt(_0x5c1f1d(0x246))/0x3)+parseInt(_0x5c1f1d(0x208))/0x4+parseInt(_0x5c1f1d(0x24f))/0x5*(-parseInt(_0x5c1f1d(0x1f1))/0x6)+parseInt(_0x5c1f1d(0x251))/0x7*(-parseInt(_0x5c1f1d(0x22f))/0x8)+parseInt(_0x5c1f1d(0x20b))/0x9+-parseInt(_0x5c1f1d(0x222))/0xa;if(_0x500b0d===_0x25f9a7)break;else _0xf66fde['push'](_0xf66fde['shift']());}catch(_0x55d7af){_0xf66fde['push'](_0xf66fde['shift']());}}}(_0x5185,0xb4bb7));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x233612(0x1e6)});function _0x22f2(_0xc31f51,_0x538bb0){const _0x5185e1=_0x5185();return _0x22f2=function(_0x22f23c,_0x3bbe7d){_0x22f23c=_0x22f23c-0x1e3;let _0x1ec4a9=_0x5185e1[_0x22f23c];return _0x1ec4a9;},_0x22f2(_0xc31f51,_0x538bb0);}const b=require(_0x233612(0x25d)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x233612(0x1eb)),M=require(_0x233612(0x1ec)),w=require(_0x233612(0x25c)),P=require('@univerjs/network'),U=_0x233612(0x1f5);var I=(_0x2fe11b=>(_0x2fe11b[_0x2fe11b[_0x233612(0x23f)]=0x0]=_0x233612(0x23f),_0x2fe11b[_0x2fe11b['Solved']=0x1]=_0x233612(0x203),_0x2fe11b[_0x2fe11b[_0x233612(0x247)]=-0x1]=_0x233612(0x247),_0x2fe11b))(I||{}),v=(_0xd7380c=>(_0xd7380c[_0xd7380c[_0x233612(0x253)]=0x0]=_0x233612(0x253),_0xd7380c[_0xd7380c['Add']=0x1]=_0x233612(0x22d),_0xd7380c[_0xd7380c['Reply']=0x2]=_0x233612(0x257),_0xd7380c[_0xd7380c[_0x233612(0x241)]=0x3]=_0x233612(0x241),_0xd7380c[_0xd7380c[_0x233612(0x1ee)]=0x4]=_0x233612(0x1ee),_0xd7380c[_0xd7380c[_0x233612(0x225)]=0x5]=_0x233612(0x225),_0xd7380c[_0xd7380c[_0x233612(0x247)]=-0x1]=_0x233612(0x247),_0xd7380c))(v||{});const f=_0x3deb1d=>c[_0x233612(0x243)](new Date(+_0x3deb1d))['format'](_0x233612(0x229)),R=async(_0x2541f9,_0x5e465f)=>{const _0x4ab893=_0x233612,_0x3e44a4=_0x2541f9[_0x4ab893(0x21c)](c[_0x4ab893(0x23c)]),_0x1ff8ba=_0x2541f9[_0x4ab893(0x21c)](P[_0x4ab893(0x242)]);_0x5e465f[_0x4ab893(0x250)](_0x5ebc2f=>{const _0x147c63=_0x4ab893;_0x3e44a4[_0x147c63(0x22a)](_0x5ebc2f)&&_0x5e465f[_0x147c63(0x211)](_0x5ebc2f);}),_0x5e465f[_0x4ab893(0x21b)]&&(await _0x1ff8ba['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x5e465f]}}))[_0x4ab893(0x213)][_0x4ab893(0x21a)][_0x4ab893(0x250)](_0x58d94d=>{const _0x291f03=_0x4ab893;_0x58d94d&&_0x3e44a4[_0x291f03(0x209)](_0x58d94d);});};var $=Object[_0x233612(0x228)],E=(_0x25f2d2,_0x47d4e9,_0x1605d5,_0x407a8a)=>{const _0x154c33=_0x233612;for(var _0x20f72c=_0x407a8a>0x1?void 0x0:_0x407a8a?$(_0x47d4e9,_0x1605d5):_0x47d4e9,_0x56713a=_0x25f2d2[_0x154c33(0x24a)]-0x1,_0x1461c7;_0x56713a>=0x0;_0x56713a--)(_0x1461c7=_0x25f2d2[_0x56713a])&&(_0x20f72c=_0x1461c7(_0x20f72c)||_0x20f72c);return _0x20f72c;},S=(_0x5d7ea1,_0x114359)=>(_0x5e7e5e,_0x182b48)=>_0x114359(_0x5e7e5e,_0x182b48,_0x5d7ea1);function _0x5185(){const _0x1f717b=['createTimestamp','resolved','resolveComment','Module','disposeWithMe','add','UniverThreadCommentUIPlugin','userID','@univerjs/thread-comment-ui','@univerjs/thread-comment','addComment','Delete','filter','replyId','6Yaygmv','pipe','rangeType','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','4maojRu','content','Plugin','parse','comments','slice','/universer-api/comment/unit/','parentId','_threadCommentDataSource','_configService','requireSession','values','Solved','error','stringify','listComments','dataSource','4902980qAWFrr','addUser','unitId','12677616uCCKfO','_initUserSync','map','merge','rangeId','user','delete','Disposable','body','_injector','replies','Inject','getUnit','syncUpdateMutationToColla','payload','users','size','get','getMemberID','defineProperty','solved','pluginName','root','22956970TyqRih','UniverCollaborationClientPlugin','personId','Solve','code','_userService','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','getUser','customRanges','onReady','Add','threadId','16XNwQro','UniverThreadCommentDataSourcePlugin','UniverInstanceType','_threadCommentModel','_httpService','comment','thread-comment-data-source.config','/delete','_config','subscribe','ref','UNIVER_UNKNOWN','commentUpdate$','UserManagerService','format','_sessionService','OpenOrReOpen','symbol','Edit','HTTPService','dayjs','getCurrentUser','userId','94641ybIjdF','UNRECOGNIZED','Injector','IConfigService','length','/edit','deleteComment','994375CEdOkx','_threadCommentDataSourceService','569570DCTjgl','forEach','1455160CuHcDg','/add','Unknown','bufferTime','_init','CustomRangeType','Reply','CollaborationSessionService','post','updateComment','COMMENT','rxjs','@univerjs-pro/collaboration-client'];_0x5185=function(){return _0x1f717b;};return _0x5185();}let p=class extends c[_0x233612(0x212)]{constructor(_0x2a6d85,_0x480a59,_0x39a318,_0x24686d){const _0x585a87=_0x233612;super(),this[_0x585a87(0x1f4)]=_0x2a6d85,this[_0x585a87(0x232)]=_0x480a59,this['_userService']=_0x39a318,this['_injector']=_0x24686d,this[_0x585a87(0x255)](),this[_0x585a87(0x20c)]();}[_0x233612(0x20c)](){const _0x6a6c48=_0x233612;this[_0x6a6c48(0x1e7)](this['_threadCommentModel'][_0x6a6c48(0x23b)][_0x6a6c48(0x1f2)](w[_0x6a6c48(0x254)](0x10))['subscribe'](_0xced36d=>{const _0x310b7d=_0x6a6c48,_0x40f7b2=new Set();_0xced36d[_0x310b7d(0x250)](_0x572fb1=>{const _0xb715b0=_0x310b7d;switch(_0x572fb1[_0xb715b0(0x1f6)]){case _0xb715b0(0x1e8):{const _0x163193=_0x572fb1[_0xb715b0(0x219)][_0xb715b0(0x224)];_0x40f7b2[_0xb715b0(0x1e8)](_0x163193);break;}}}),R(this[_0x310b7d(0x214)],_0x40f7b2);}));}[_0x233612(0x255)](){const _0x5429fd=_0x233612;this['disposeWithMe'](this[_0x5429fd(0x1f4)][_0x5429fd(0x23b)][_0x5429fd(0x238)](async _0x530729=>{const _0x522299=_0x5429fd;var _0x4d802a,_0x7c49f,_0x4b3e12,_0x361c4f;const _0x76dde=(_0x4d802a=this[_0x522299(0x232)][_0x522299(0x217)](_0x530729['unitId'])['find'](_0x410b40=>_0x410b40[_0x522299(0x22e)]===_0x530729[_0x522299(0x22e)]))==null?void 0x0:_0x4d802a['root'];if(!_0x76dde)return;const {unitId:_0x2e997c,subUnitId:_0x3be476}=_0x76dde;switch(_0x530729[_0x522299(0x210)]&&this['_userService']['addUser'](_0x530729['user']),_0x530729[_0x522299(0x1f6)]){case v[_0x522299(0x22d)]:break;case v[_0x522299(0x257)]:{this[_0x522299(0x232)][_0x522299(0x1ed)](_0x2e997c,_0x3be476,{'unitId':_0x2e997c,'subUnitId':_0x3be476,'ref':'','id':_0x530729['replyId'],'dT':f(+_0x530729[_0x522299(0x1e3)]),'threadId':_0x530729[_0x522299(0x22e)],'personId':(_0x4b3e12=(_0x7c49f=_0x530729[_0x522299(0x210)])==null?void 0x0:_0x7c49f['userID'])!=null?_0x4b3e12:_0x530729['userId'],'text':JSON['parse'](_0x530729[_0x522299(0x1f8)]),'parentId':_0x76dde['id']});break;}case v['Delete']:{const _0x2fe960=this[_0x522299(0x232)]['getComment'](_0x2e997c,_0x3be476,_0x530729[_0x522299(0x1f0)]);_0x2fe960&&_0x2fe960[_0x522299(0x1fe)]&&this[_0x522299(0x232)][_0x522299(0x24c)](_0x2e997c,_0x3be476,_0x530729[_0x522299(0x1f0)]);break;}case v[_0x522299(0x241)]:{this[_0x522299(0x232)][_0x522299(0x25a)](_0x2e997c,_0x3be476,{'commentId':_0x530729[_0x522299(0x1f0)],'text':JSON['parse'](_0x530729[_0x522299(0x1f8)])});break;}case v[_0x522299(0x225)]:{const _0x5963ba=(_0x361c4f=this[_0x522299(0x232)]['getUnit'](_0x530729[_0x522299(0x20a)])['find'](_0x4d7e67=>_0x4d7e67['threadId']===_0x530729[_0x522299(0x22e)]))==null?void 0x0:_0x361c4f[_0x522299(0x221)];_0x5963ba&&this[_0x522299(0x232)][_0x522299(0x1e5)](_0x2e997c,_0x3be476,_0x5963ba['id'],_0x530729[_0x522299(0x21f)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x233612(0x216)](M['ThreadCommentModel'])),S(0x2,c[_0x233612(0x216)](c[_0x233612(0x23c)])),S(0x3,c[_0x233612(0x216)](c['Injector']))],p);const q=_0x233612(0x235),D={};var A=Object[_0x233612(0x228)],x=(_0x442f4a,_0x45f50d,_0x834657,_0xd505d3)=>{const _0x8eb6a8=_0x233612;for(var _0x174d37=_0xd505d3>0x1?void 0x0:_0xd505d3?A(_0x45f50d,_0x834657):_0x45f50d,_0x5c3f84=_0x442f4a[_0x8eb6a8(0x24a)]-0x1,_0x2679fa;_0x5c3f84>=0x0;_0x5c3f84--)(_0x2679fa=_0x442f4a[_0x5c3f84])&&(_0x174d37=_0x2679fa(_0x174d37)||_0x174d37);return _0x174d37;},_=(_0x427785,_0x2b9748)=>(_0xac2876,_0x3e0bc3)=>_0x2b9748(_0xac2876,_0x3e0bc3,_0x427785);function Y(_0x2c86eb,_0x5e4056){const _0x37e9b5=_0x233612,_0xfab92=_0x2c86eb[_0x37e9b5(0x215)][0x0];return{..._0x5e4056,'id':_0xfab92[_0x37e9b5(0x1f0)],'resolved':_0x2c86eb[_0x37e9b5(0x21f)]===0x1,'dT':f(_0xfab92[_0x37e9b5(0x1e3)]),'personId':_0xfab92['userId'],'threadId':_0xfab92['threadId']};}function G(_0xd47af3,_0x4e521e,_0x3f7036){const _0xd3963b=_0x233612;var _0x352adf,_0x241dfa;if(((_0x241dfa=(_0x352adf=_0xd47af3==null?void 0x0:_0xd47af3[_0xd3963b(0x215)])==null?void 0x0:_0x352adf[_0xd3963b(0x24a)])!=null?_0x241dfa:0x0)>0x0){const _0x5a5326=(_0x5c062a,_0xc6266f)=>({'id':_0x5c062a[_0xd3963b(0x1f0)],'threadId':_0x5c062a[_0xd3963b(0x22e)],'dT':f(_0x5c062a[_0xd3963b(0x1e3)]),'personId':_0x5c062a[_0xd3963b(0x245)],'resolved':_0xd47af3[_0xd3963b(0x21f)]===I['Solved'],'unitId':_0x4e521e,'subUnitId':_0x3f7036,'text':JSON[_0xd3963b(0x1fa)](_0x5c062a[_0xd3963b(0x1f8)]),'parentId':_0xc6266f}),_0x389851=_0x5a5326(_0xd47af3[_0xd3963b(0x215)][0x0]);return{..._0x389851,'children':_0xd47af3['replies'][_0xd3963b(0x1fc)](0x1)['map'](_0x205dc5=>_0x5a5326(_0x205dc5,_0x389851['id']))};}return null;}let g=class{constructor(_0x870b9c,_0x460ad0,_0x441476,_0x426f1c){const _0xffb88=_0x233612;this[_0xffb88(0x233)]=_0x870b9c,this[_0xffb88(0x227)]=_0x460ad0,this[_0xffb88(0x23e)]=_0x441476,this[_0xffb88(0x214)]=_0x426f1c;}async[_0x233612(0x1ed)](_0x15d7e0){const _0x28f652=_0x233612;var _0x406194,_0x1cc1af;const {parentId:_0x3a2e16,unitId:_0xb7f8a4,text:_0x1dbacc,threadId:_0x443840}=_0x15d7e0,_0x27c346=(_0x1cc1af=(_0x406194=_0x1dbacc['customRanges'])==null?void 0x0:_0x406194[_0x28f652(0x1ef)](_0x5a440b=>_0x5a440b[_0x28f652(0x1f3)]===c[_0x28f652(0x256)][_0x28f652(0x25b)])['map'](_0x21d089=>_0x21d089['rangeId']))!=null?_0x1cc1af:[],_0x1357dc=JSON[_0x28f652(0x205)](_0x1dbacc),_0x4edbe7=(await this[_0x28f652(0x23e)]['requireSession'](_0xb7f8a4))[_0x28f652(0x21d)]();if(_0x3a2e16){const _0x2a919e={'memberId':_0x4edbe7,'unitId':_0xb7f8a4,'content':_0x1357dc,'mention':_0x27c346,'threadId':_0x443840},_0x4f3def=(await this[_0x28f652(0x233)][_0x28f652(0x259)](_0x28f652(0x1fd)+_0xb7f8a4+'/reply',{'body':_0x2a919e}))[_0x28f652(0x213)]['reply'];return{..._0x15d7e0,'id':_0x4f3def[_0x28f652(0x1f0)],'dT':c[_0x28f652(0x243)](+_0x4f3def[_0x28f652(0x1e3)])[_0x28f652(0x23d)](_0x28f652(0x229)),'personId':_0x4f3def[_0x28f652(0x245)]};}else{const _0x55c9a7={'memberId':_0x4edbe7,'unitId':_0xb7f8a4,'content':_0x1357dc,'mention':_0x27c346},_0x1d94c4=await this[_0x28f652(0x233)]['post'](_0x28f652(0x1fd)+_0xb7f8a4+_0x28f652(0x252),{'body':_0x55c9a7});return Y(_0x1d94c4[_0x28f652(0x213)][_0x28f652(0x234)],_0x15d7e0);}}async['updateComment'](_0x32e1ab){const _0x22a2a7=_0x233612;var _0x1cb374,_0x1b5369;const {text:_0x120de6,unitId:_0xc0f58b}=_0x32e1ab,_0x129ea5=(_0x1b5369=(_0x1cb374=_0x120de6[_0x22a2a7(0x22b)])==null?void 0x0:_0x1cb374[_0x22a2a7(0x1ef)](_0x251c09=>_0x251c09[_0x22a2a7(0x1f3)]===c[_0x22a2a7(0x256)][_0x22a2a7(0x25b)])[_0x22a2a7(0x20d)](_0x11d3b6=>_0x11d3b6[_0x22a2a7(0x20f)]))!=null?_0x1b5369:[],_0x4af19d=JSON[_0x22a2a7(0x205)](_0x120de6),_0x50c34a=_0x32e1ab[_0x22a2a7(0x22e)],_0x163008=_0x32e1ab['id'],_0x282f71={'memberId':(await this[_0x22a2a7(0x23e)][_0x22a2a7(0x201)](_0xc0f58b))['getMemberID'](),'unitId':_0xc0f58b,'threadId':_0x50c34a,'mention':_0x129ea5,'content':_0x4af19d,'replyId':_0x163008},_0x1904ae=await this[_0x22a2a7(0x233)][_0x22a2a7(0x259)](_0x22a2a7(0x1fd)+_0xc0f58b+_0x22a2a7(0x24b),{'body':_0x282f71});return!_0x1904ae['body'][_0x22a2a7(0x204)]||_0x1904ae[_0x22a2a7(0x213)][_0x22a2a7(0x204)][_0x22a2a7(0x226)]===0x1;}async['resolveComment'](_0x5d0ef3){const _0x4056a2=_0x233612,{unitId:_0x5b0467}=_0x5d0ef3,_0x5925af=_0x5d0ef3['threadId'],_0x58786b={'memberId':this[_0x4056a2(0x227)][_0x4056a2(0x244)]()[_0x4056a2(0x1ea)],'unitId':_0x5b0467,'threadId':_0x5925af,'solved':_0x5d0ef3[_0x4056a2(0x1e4)]?I[_0x4056a2(0x203)]:I[_0x4056a2(0x23f)]},_0x5f441a=await this[_0x4056a2(0x233)][_0x4056a2(0x259)](_0x4056a2(0x1fd)+_0x5b0467+'/solved',{'body':_0x58786b});return!_0x5f441a[_0x4056a2(0x213)][_0x4056a2(0x204)]||_0x5f441a[_0x4056a2(0x213)]['error'][_0x4056a2(0x226)]===0x1;}async[_0x233612(0x24c)](_0x4fd157,_0x45ad58,_0x5440e2,_0xb248fd){const _0x1682a7=_0x233612,_0xd9cc49={'memberId':(await this['_sessionService']['requireSession'](_0x4fd157))[_0x1682a7(0x21d)](),'threadId':_0x5440e2,'replyId':_0xb248fd,'unitId':_0x4fd157},_0x2280d5=await this[_0x1682a7(0x233)][_0x1682a7(0x259)](_0x1682a7(0x1fd)+_0x4fd157+_0x1682a7(0x236),{'body':_0xd9cc49});return!_0x2280d5[_0x1682a7(0x213)]['error']||_0x2280d5[_0x1682a7(0x213)]['error'][_0x1682a7(0x226)]===0x1;}async[_0x233612(0x206)](_0xf3a628,_0x547bc3,_0x495987){const _0x9178cf=_0x233612,_0x34a3f0={'unitId':_0xf3a628,'threadId':_0x495987},_0x2ecd89=await this[_0x9178cf(0x233)][_0x9178cf(0x259)]('/universer-api/comment/unit/'+_0xf3a628+'/list',{'body':_0x34a3f0}),_0x42ecb7=_0x495987[_0x9178cf(0x20d)](_0x25854d=>G(_0x2ecd89['body'][_0x9178cf(0x1fb)][_0x25854d],_0xf3a628,_0x547bc3))[_0x9178cf(0x1ef)](Boolean);return Object[_0x9178cf(0x202)](_0x2ecd89['body']['users'])[_0x9178cf(0x250)](_0x4c4fbf=>{const _0x26e7ea=_0x9178cf;this[_0x26e7ea(0x227)][_0x26e7ea(0x209)](_0x4c4fbf);}),_0x42ecb7;}['saveCommentToSnapshot'](_0x31344b){const _0x36e729=_0x233612;return{'id':_0x31344b['id'],'threadId':_0x31344b[_0x36e729(0x22e)],'ref':_0x31344b[_0x36e729(0x239)]};}};g=x([_(0x0,c[_0x233612(0x216)](P[_0x233612(0x242)])),_(0x1,c[_0x233612(0x216)](c[_0x233612(0x23c)])),_(0x2,c['Inject'](b[_0x233612(0x258)])),_(0x3,c[_0x233612(0x216)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x698595,_0x3fa914,_0x35544e,_0x21dde3)=>{const _0x1039f7=_0x233612;for(var _0x5eedec=_0x21dde3>0x1?void 0x0:_0x21dde3?H(_0x3fa914,_0x35544e):_0x3fa914,_0x44ebd5=_0x698595[_0x1039f7(0x24a)]-0x1,_0x5ece2c;_0x44ebd5>=0x0;_0x44ebd5--)(_0x5ece2c=_0x698595[_0x44ebd5])&&(_0x5eedec=_0x5ece2c(_0x5eedec)||_0x5eedec);return _0x5eedec;},y=(_0x45b5af,_0x5a0a2a)=>(_0x86ffcf,_0x3aae58)=>_0x5a0a2a(_0x86ffcf,_0x3aae58,_0x45b5af);let C=class extends c[_0x233612(0x212)]{constructor(_0x56e2d2,_0x19bd30){const _0x23981d=_0x233612;super(),this[_0x23981d(0x24e)]=_0x56e2d2,this[_0x23981d(0x1ff)]=_0x19bd30,this['_initDataSource']();}['_initDataSource'](){const _0x21dea6=_0x233612;this[_0x21dea6(0x24e)][_0x21dea6(0x207)]=this[_0x21dea6(0x1ff)],this[_0x21dea6(0x24e)][_0x21dea6(0x218)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x233612(0x216)](g))],C);var F=Object[_0x233612(0x21e)],L=Object[_0x233612(0x228)],Z=(_0x428173,_0x482c80,_0x59cf8f)=>_0x482c80 in _0x428173?F(_0x428173,_0x482c80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59cf8f}):_0x428173[_0x482c80]=_0x59cf8f,W=(_0x371f47,_0x235737,_0x3666c8,_0x174f32)=>{const _0x11e660=_0x233612;for(var _0x2b65e=_0x174f32>0x1?void 0x0:_0x174f32?L(_0x235737,_0x3666c8):_0x235737,_0x4e986a=_0x371f47[_0x11e660(0x24a)]-0x1,_0x57cbd6;_0x4e986a>=0x0;_0x4e986a--)(_0x57cbd6=_0x371f47[_0x4e986a])&&(_0x2b65e=_0x57cbd6(_0x2b65e)||_0x2b65e);return _0x2b65e;},O=(_0x533abe,_0x43bc27)=>(_0x342e3b,_0x2cfe7e)=>_0x43bc27(_0x342e3b,_0x2cfe7e,_0x533abe),N=(_0x43f192,_0x1954a6,_0x2fc08b)=>Z(_0x43f192,typeof _0x1954a6!=_0x233612(0x240)?_0x1954a6+'':_0x1954a6,_0x2fc08b);exports[_0x233612(0x230)]=class extends c[_0x233612(0x1f9)]{constructor(_0x4a0936=D,_0x409c83,_0x4cac2a){const _0x47d230=_0x233612;super(),this[_0x47d230(0x237)]=_0x4a0936,this['_injector']=_0x409c83,this[_0x47d230(0x200)]=_0x4cac2a;const {..._0x3a86ee}=c[_0x47d230(0x20e)]({},D,this['_config']);this[_0x47d230(0x200)]['setConfig'](q,_0x3a86ee);}['onStarting'](){const _0x2fccd7=_0x233612;[[g],[C],[p]][_0x2fccd7(0x250)](_0x3278e1=>{const _0x24af72=_0x2fccd7;this[_0x24af72(0x214)][_0x24af72(0x1e8)](_0x3278e1);});}[_0x233612(0x22c)](){const _0x31ff71=_0x233612;this[_0x31ff71(0x214)][_0x31ff71(0x21c)](C),this[_0x31ff71(0x214)][_0x31ff71(0x21c)](p);}},N(exports[_0x233612(0x230)],_0x233612(0x220),U),N(exports[_0x233612(0x230)],'type',c[_0x233612(0x231)][_0x233612(0x23a)]),exports[_0x233612(0x230)]=W([c['DependentOn'](j[_0x233612(0x1e9)],b[_0x233612(0x223)],T['UniverLicensePlugin']),O(0x1,c[_0x233612(0x216)](c[_0x233612(0x248)])),O(0x2,c[_0x233612(0x249)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3d0222=_0x215d;(function(_0x3140fd,_0x3103e7){const _0xd8b334=_0x215d,_0x27c435=_0x3140fd();while(!![]){try{const _0xb05e11=parseInt(_0xd8b334(0x83))/0x1*(-parseInt(_0xd8b334(0xc8))/0x2)+parseInt(_0xd8b334(0xc3))/0x3*(-parseInt(_0xd8b334(0x9b))/0x4)+parseInt(_0xd8b334(0x90))/0x5*(parseInt(_0xd8b334(0xcb))/0x6)+-parseInt(_0xd8b334(0xb1))/0x7*(-parseInt(_0xd8b334(0xc5))/0x8)+-parseInt(_0xd8b334(0xdd))/0x9*(-parseInt(_0xd8b334(0x95))/0xa)+parseInt(_0xd8b334(0xd5))/0xb*(-parseInt(_0xd8b334(0x89))/0xc)+parseInt(_0xd8b334(0xd6))/0xd;if(_0xb05e11===_0x3103e7)break;else _0x27c435['push'](_0x27c435['shift']());}catch(_0x1c113e){_0x27c435['push'](_0x27c435['shift']());}}}(_0x1ae7,0xbc411));import{CommentService as _0x2eedbc,CollaborationSessionService as _0x331714,UniverCollaborationClientPlugin as _0x1d664a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd9538b}from'@univerjs-pro/license';import{dayjs as _0x3b7c2,UserManagerService as _0x312b2f,Inject as _0xb50de1,Injector as _0xc1b344,Disposable as _0x4314bc,CustomRangeType as _0xfc942,UniverInstanceType as _0x3f182b,DependentOn as _0x19c23a,IConfigService as _0x4283b9,Plugin as _0x33f723,merge as _0x351827}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x554dd4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x20227f,IThreadCommentDataSourceService as _0x43c8d5}from'@univerjs/thread-comment';function _0x215d(_0x3539ee,_0x25e01d){const _0x1ae716=_0x1ae7();return _0x215d=function(_0x215db4,_0x555a45){_0x215db4=_0x215db4-0x80;let _0x3eb85c=_0x1ae716[_0x215db4];return _0x3eb85c;},_0x215d(_0x3539ee,_0x25e01d);}import{bufferTime as _0x45eeee}from'rxjs';import{HTTPService as _0x40ab69}from'@univerjs/network';const W=_0x3d0222(0x9e);var I=(_0x4af38=>(_0x4af38[_0x4af38['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4af38[_0x4af38[_0x3d0222(0xd2)]=0x1]=_0x3d0222(0xd2),_0x4af38[_0x4af38[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x4af38))(I||{}),v=(_0x16435d=>(_0x16435d[_0x16435d[_0x3d0222(0xad)]=0x0]=_0x3d0222(0xad),_0x16435d[_0x16435d[_0x3d0222(0x8f)]=0x1]='Add',_0x16435d[_0x16435d[_0x3d0222(0xb5)]=0x2]=_0x3d0222(0xb5),_0x16435d[_0x16435d['Edit']=0x3]=_0x3d0222(0x92),_0x16435d[_0x16435d[_0x3d0222(0x9a)]=0x4]=_0x3d0222(0x9a),_0x16435d[_0x16435d[_0x3d0222(0xba)]=0x5]=_0x3d0222(0xba),_0x16435d[_0x16435d[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x16435d))(v||{});const D=_0x4f0219=>_0x3b7c2(new Date(+_0x4f0219))['format'](_0x3d0222(0xa3)),B=async(_0x2ef99f,_0x28bcc4)=>{const _0xc91faf=_0x3d0222,_0x1b53fd=_0x2ef99f[_0xc91faf(0xd0)](_0x312b2f),_0x4924d4=_0x2ef99f[_0xc91faf(0xd0)](_0x40ab69);_0x28bcc4[_0xc91faf(0xca)](_0x4e3d27=>{const _0x172a5e=_0xc91faf;_0x1b53fd['getUser'](_0x4e3d27)&&_0x28bcc4[_0x172a5e(0xbf)](_0x4e3d27);}),_0x28bcc4['size']&&(await _0x4924d4['get'](_0xc91faf(0xe8),{'params':{'userIDs':[..._0x28bcc4]}}))[_0xc91faf(0xcd)][_0xc91faf(0x88)]['forEach'](_0x2d7c80=>{const _0xe40bf2=_0xc91faf;_0x2d7c80&&_0x1b53fd[_0xe40bf2(0xa2)](_0x2d7c80);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46a882,_0x6188d,_0x5756cb,_0x16af2c)=>{const _0x38ce41=_0x3d0222;for(var _0x4ea8b3=_0x16af2c>0x1?void 0x0:_0x16af2c?K(_0x6188d,_0x5756cb):_0x6188d,_0x3e4e30=_0x46a882[_0x38ce41(0xe5)]-0x1,_0x4357c5;_0x3e4e30>=0x0;_0x3e4e30--)(_0x4357c5=_0x46a882[_0x3e4e30])&&(_0x4ea8b3=_0x4357c5(_0x4ea8b3)||_0x4ea8b3);return _0x4ea8b3;},p=(_0x296b5b,_0x23b7ba)=>(_0xfe8ff4,_0x5447b8)=>_0x23b7ba(_0xfe8ff4,_0x5447b8,_0x296b5b);let S=class extends _0x4314bc{constructor(_0x1d4d95,_0x45eac5,_0x226d24,_0x1440a0){const _0xba2ced=_0x3d0222;super(),this[_0xba2ced(0xde)]=_0x1d4d95,this[_0xba2ced(0xd9)]=_0x45eac5,this[_0xba2ced(0x82)]=_0x226d24,this[_0xba2ced(0xb9)]=_0x1440a0,this[_0xba2ced(0xac)](),this['_initUserSync']();}[_0x3d0222(0x97)](){const _0x559dbb=_0x3d0222;this[_0x559dbb(0xe3)](this[_0x559dbb(0xd9)]['commentUpdate$'][_0x559dbb(0xdb)](_0x45eeee(0x10))['subscribe'](_0x181efb=>{const _0x2936e1=_0x559dbb,_0x4cee51=new Set();_0x181efb[_0x2936e1(0xca)](_0xda2af6=>{const _0x2b5b13=_0x2936e1;switch(_0xda2af6[_0x2b5b13(0xaa)]){case'add':{const _0x5e38ce=_0xda2af6[_0x2b5b13(0xa4)][_0x2b5b13(0xdc)];_0x4cee51[_0x2b5b13(0xda)](_0x5e38ce);break;}}}),B(this['_injector'],_0x4cee51);}));}[_0x3d0222(0xac)](){const _0x59be15=_0x3d0222;this['disposeWithMe'](this[_0x59be15(0xde)][_0x59be15(0x8e)]['subscribe'](async _0x506e81=>{const _0x22693b=_0x59be15;var _0x3e0df5,_0x25e85e,_0x39480b,_0xd01aa4;const _0x1a6164=(_0x3e0df5=this[_0x22693b(0xd9)]['getUnit'](_0x506e81['unitId'])[_0x22693b(0x96)](_0x3d35fe=>_0x3d35fe[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0x3e0df5[_0x22693b(0x9c)];if(!_0x1a6164)return;const {unitId:_0x82dfa1,subUnitId:_0x5d32a3}=_0x1a6164;switch(_0x506e81[_0x22693b(0xdf)]&&this['_userService'][_0x22693b(0xa2)](_0x506e81[_0x22693b(0xdf)]),_0x506e81[_0x22693b(0xaa)]){case v[_0x22693b(0x8f)]:break;case v[_0x22693b(0xb5)]:{this[_0x22693b(0xd9)][_0x22693b(0x8d)](_0x82dfa1,_0x5d32a3,{'unitId':_0x82dfa1,'subUnitId':_0x5d32a3,'ref':'','id':_0x506e81[_0x22693b(0x8c)],'dT':D(+_0x506e81[_0x22693b(0xbe)]),'threadId':_0x506e81[_0x22693b(0x99)],'personId':(_0x39480b=(_0x25e85e=_0x506e81[_0x22693b(0xdf)])==null?void 0x0:_0x25e85e[_0x22693b(0xa9)])!=null?_0x39480b:_0x506e81[_0x22693b(0x8a)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)]),'parentId':_0x1a6164['id']});break;}case v[_0x22693b(0x9a)]:{const _0x397d8a=this[_0x22693b(0xd9)][_0x22693b(0xc6)](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);_0x397d8a&&_0x397d8a['parentId']&&this['_threadCommentModel']['deleteComment'](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);break;}case v[_0x22693b(0x92)]:{this['_threadCommentModel'][_0x22693b(0xbb)](_0x82dfa1,_0x5d32a3,{'commentId':_0x506e81[_0x22693b(0x8c)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)])});break;}case v[_0x22693b(0xba)]:{const _0x4e576d=(_0xd01aa4=this['_threadCommentModel'][_0x22693b(0xc0)](_0x506e81[_0x22693b(0x9f)])[_0x22693b(0x96)](_0x49dc00=>_0x49dc00[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0xd01aa4[_0x22693b(0x9c)];_0x4e576d&&this[_0x22693b(0xd9)][_0x22693b(0xe6)](_0x82dfa1,_0x5d32a3,_0x4e576d['id'],_0x506e81[_0x22693b(0xe7)]===I[_0x22693b(0xd2)]);break;}}}));}};S=V([p(0x0,_0xb50de1(_0x2eedbc)),p(0x1,_0xb50de1(_0x20227f)),p(0x2,_0xb50de1(_0x312b2f)),p(0x3,_0xb50de1(_0xc1b344))],S);const z=_0x3d0222(0xaf),M={};var k=Object[_0x3d0222(0xcc)],Q=(_0x10058c,_0x1b9c24,_0x43394a,_0x11e3cf)=>{for(var _0x35138e=_0x11e3cf>0x1?void 0x0:_0x11e3cf?k(_0x1b9c24,_0x43394a):_0x1b9c24,_0x331af7=_0x10058c['length']-0x1,_0x3f93f2;_0x331af7>=0x0;_0x331af7--)(_0x3f93f2=_0x10058c[_0x331af7])&&(_0x35138e=_0x3f93f2(_0x35138e)||_0x35138e);return _0x35138e;},_=(_0x2791c3,_0x4c0229)=>(_0x4ac72c,_0x11e90e)=>_0x4c0229(_0x4ac72c,_0x11e90e,_0x2791c3);function X(_0x40c91b,_0x4d83db){const _0x5a4b1c=_0x3d0222,_0x59b46a=_0x40c91b['replies'][0x0];return{..._0x4d83db,'id':_0x59b46a[_0x5a4b1c(0x8c)],'resolved':_0x40c91b[_0x5a4b1c(0xe7)]===0x1,'dT':D(_0x59b46a[_0x5a4b1c(0xbe)]),'personId':_0x59b46a[_0x5a4b1c(0x8a)],'threadId':_0x59b46a[_0x5a4b1c(0x99)]};}function ee(_0x3b4b64,_0x2ac990,_0x729992){const _0x4cbfe7=_0x3d0222;var _0xa41e14,_0x2c182e;if(((_0x2c182e=(_0xa41e14=_0x3b4b64==null?void 0x0:_0x3b4b64[_0x4cbfe7(0xab)])==null?void 0x0:_0xa41e14['length'])!=null?_0x2c182e:0x0)>0x0){const _0x2e01a3=(_0x1b5e80,_0xe75e5d)=>({'id':_0x1b5e80['replyId'],'threadId':_0x1b5e80[_0x4cbfe7(0x99)],'dT':D(_0x1b5e80['createTimestamp']),'personId':_0x1b5e80[_0x4cbfe7(0x8a)],'resolved':_0x3b4b64[_0x4cbfe7(0xe7)]===I[_0x4cbfe7(0xd2)],'unitId':_0x2ac990,'subUnitId':_0x729992,'text':JSON[_0x4cbfe7(0xb4)](_0x1b5e80[_0x4cbfe7(0xa7)]),'parentId':_0xe75e5d}),_0x3e59d7=_0x2e01a3(_0x3b4b64[_0x4cbfe7(0xab)][0x0]);return{..._0x3e59d7,'children':_0x3b4b64['replies'][_0x4cbfe7(0xd3)](0x1)[_0x4cbfe7(0x84)](_0x5abc96=>_0x2e01a3(_0x5abc96,_0x3e59d7['id']))};}return null;}let f=class{constructor(_0x4d307b,_0x334e9f,_0x5d93ce,_0x3efa69){const _0x550a26=_0x3d0222;this[_0x550a26(0x8b)]=_0x4d307b,this[_0x550a26(0x82)]=_0x334e9f,this['_sessionService']=_0x5d93ce,this[_0x550a26(0xb9)]=_0x3efa69;}async[_0x3d0222(0x8d)](_0x64865a){const _0x1ec075=_0x3d0222;var _0x333129,_0x28205e;const {parentId:_0x1886c5,unitId:_0x3e28d7,text:_0x487b95,threadId:_0x1eb36c}=_0x64865a,_0x2172a1=(_0x28205e=(_0x333129=_0x487b95['customRanges'])==null?void 0x0:_0x333129['filter'](_0x2d4a13=>_0x2d4a13[_0x1ec075(0xae)]===_0xfc942[_0x1ec075(0xc7)])[_0x1ec075(0x84)](_0x223472=>_0x223472[_0x1ec075(0xb6)]))!=null?_0x28205e:[],_0x122f88=JSON[_0x1ec075(0xcf)](_0x487b95),_0x4f5e50=(await this[_0x1ec075(0xa0)][_0x1ec075(0x9d)](_0x3e28d7))['getMemberID']();if(_0x1886c5){const _0x534844={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1,'threadId':_0x1eb36c},_0x4d9b53=(await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/reply',{'body':_0x534844}))[_0x1ec075(0xcd)][_0x1ec075(0xb3)];return{..._0x64865a,'id':_0x4d9b53['replyId'],'dT':_0x3b7c2(+_0x4d9b53[_0x1ec075(0xbe)])[_0x1ec075(0xc1)](_0x1ec075(0xa3)),'personId':_0x4d9b53[_0x1ec075(0x8a)]};}else{const _0xd499b5={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1},_0x14b436=await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/add',{'body':_0xd499b5});return X(_0x14b436[_0x1ec075(0xcd)]['comment'],_0x64865a);}}async[_0x3d0222(0xbb)](_0x3720e5){const _0x5cd947=_0x3d0222;var _0x5ba954,_0x12fadd;const {text:_0xda9522,unitId:_0x45e44b}=_0x3720e5,_0xdc3f54=(_0x12fadd=(_0x5ba954=_0xda9522[_0x5cd947(0xc2)])==null?void 0x0:_0x5ba954[_0x5cd947(0xa1)](_0x80135c=>_0x80135c[_0x5cd947(0xae)]===_0xfc942['COMMENT'])[_0x5cd947(0x84)](_0x4b7208=>_0x4b7208[_0x5cd947(0xb6)]))!=null?_0x12fadd:[],_0x107725=JSON['stringify'](_0xda9522),_0x4a8eda=_0x3720e5[_0x5cd947(0x99)],_0x2f3a87=_0x3720e5['id'],_0xc1a49f={'memberId':(await this[_0x5cd947(0xa0)][_0x5cd947(0x9d)](_0x45e44b))[_0x5cd947(0xa6)](),'unitId':_0x45e44b,'threadId':_0x4a8eda,'mention':_0xdc3f54,'content':_0x107725,'replyId':_0x2f3a87},_0x2c39ee=await this[_0x5cd947(0x8b)][_0x5cd947(0xb0)](_0x5cd947(0xe1)+_0x45e44b+_0x5cd947(0x94),{'body':_0xc1a49f});return!_0x2c39ee['body']['error']||_0x2c39ee['body'][_0x5cd947(0xb8)][_0x5cd947(0xa5)]===0x1;}async['resolveComment'](_0x568d2f){const _0x144fd3=_0x3d0222,{unitId:_0x50b417}=_0x568d2f,_0x484fac=_0x568d2f[_0x144fd3(0x99)],_0x3d5fe8={'memberId':this[_0x144fd3(0x82)][_0x144fd3(0x81)]()[_0x144fd3(0xa9)],'unitId':_0x50b417,'threadId':_0x484fac,'solved':_0x568d2f[_0x144fd3(0xe4)]?I[_0x144fd3(0xd2)]:I[_0x144fd3(0x80)]},_0x3755e9=await this[_0x144fd3(0x8b)]['post'](_0x144fd3(0xe1)+_0x50b417+_0x144fd3(0x85),{'body':_0x3d5fe8});return!_0x3755e9[_0x144fd3(0xcd)]['error']||_0x3755e9[_0x144fd3(0xcd)]['error'][_0x144fd3(0xa5)]===0x1;}async[_0x3d0222(0xd1)](_0x4868f4,_0x5b36a4,_0x3d16b6,_0x1a19ad){const _0x3f5155=_0x3d0222,_0x41bea9={'memberId':(await this[_0x3f5155(0xa0)][_0x3f5155(0x9d)](_0x4868f4))['getMemberID'](),'threadId':_0x3d16b6,'replyId':_0x1a19ad,'unitId':_0x4868f4},_0x266303=await this['_httpService'][_0x3f5155(0xb0)](_0x3f5155(0xe1)+_0x4868f4+_0x3f5155(0x93),{'body':_0x41bea9});return!_0x266303[_0x3f5155(0xcd)][_0x3f5155(0xb8)]||_0x266303[_0x3f5155(0xcd)]['error'][_0x3f5155(0xa5)]===0x1;}async[_0x3d0222(0xb7)](_0x1c6340,_0x5b9171,_0xff73d9){const _0x3627ba=_0x3d0222,_0x4462cd={'unitId':_0x1c6340,'threadId':_0xff73d9},_0x2d2a71=await this[_0x3627ba(0x8b)][_0x3627ba(0xb0)]('/universer-api/comment/unit/'+_0x1c6340+_0x3627ba(0xce),{'body':_0x4462cd}),_0x31c03a=_0xff73d9[_0x3627ba(0x84)](_0x301d85=>ee(_0x2d2a71['body'][_0x3627ba(0xc9)][_0x301d85],_0x1c6340,_0x5b9171))[_0x3627ba(0xa1)](Boolean);return Object[_0x3627ba(0xd8)](_0x2d2a71['body'][_0x3627ba(0x88)])[_0x3627ba(0xca)](_0x2fe9aa=>{const _0x449b1a=_0x3627ba;this[_0x449b1a(0x82)][_0x449b1a(0xa2)](_0x2fe9aa);}),_0x31c03a;}[_0x3d0222(0xbd)](_0x3cecfc){const _0x49bf80=_0x3d0222;return{'id':_0x3cecfc['id'],'threadId':_0x3cecfc[_0x49bf80(0x99)],'ref':_0x3cecfc['ref']};}};f=Q([_(0x0,_0xb50de1(_0x40ab69)),_(0x1,_0xb50de1(_0x312b2f)),_(0x2,_0xb50de1(_0x331714)),_(0x3,_0xb50de1(_0xc1b344))],f);var re=Object[_0x3d0222(0xcc)],te=(_0x340c9,_0x4aa2ee,_0x49b161,_0x593a88)=>{const _0x50c0d1=_0x3d0222;for(var _0x420459=_0x593a88>0x1?void 0x0:_0x593a88?re(_0x4aa2ee,_0x49b161):_0x4aa2ee,_0x36a67d=_0x340c9[_0x50c0d1(0xe5)]-0x1,_0x1c4c42;_0x36a67d>=0x0;_0x36a67d--)(_0x1c4c42=_0x340c9[_0x36a67d])&&(_0x420459=_0x1c4c42(_0x420459)||_0x420459);return _0x420459;},N=(_0x32d9c6,_0x4bf623)=>(_0x5c2141,_0x2980b2)=>_0x4bf623(_0x5c2141,_0x2980b2,_0x32d9c6);let g=class extends _0x4314bc{constructor(_0x418de9,_0x32c23f){super(),this['_threadCommentDataSourceService']=_0x418de9,this['_threadCommentDataSource']=_0x32c23f,this['_initDataSource']();}[_0x3d0222(0xe0)](){const _0x2e3614=_0x3d0222;this[_0x2e3614(0xa8)][_0x2e3614(0x87)]=this[_0x2e3614(0xbc)],this[_0x2e3614(0xa8)][_0x2e3614(0x98)]=!0x1;}};function _0x1ae7(){const _0x52b082=['_userService','586dvCcgf','map','/solved','UNRECOGNIZED','dataSource','users','180aqdHGH','userId','_httpService','replyId','addComment','commentUpdate$','Add','395FstyHN','_configService','Edit','/delete','/edit','937000hkGEtP','find','_initUserSync','syncUpdateMutationToColla','threadId','Delete','5212OtbjqO','root','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_sessionService','filter','addUser','YYYY/MM/DD\x20HH:mm','payload','code','getMemberID','content','_threadCommentDataSourceService','userID','type','replies','_init','Unknown','rangeType','thread-comment-data-source.config','post','7yFdsnJ','defineProperty','reply','parse','Reply','rangeId','listComments','error','_injector','Solve','updateComment','_threadCommentDataSource','saveCommentToSnapshot','createTimestamp','delete','getUnit','format','customRanges','1572OeylcM','UNIVER_UNKNOWN','12245936PqSczY','getComment','COMMENT','3590tHWYWd','comments','forEach','48390MLxJFA','getOwnPropertyDescriptor','body','/list','stringify','get','deleteComment','Solved','slice','onReady','4906ZPVrYh','3260972WvBiQu','_config','values','_threadCommentModel','add','pipe','personId','9QSphko','_commentService','user','_initDataSource','/universer-api/comment/unit/','symbol','disposeWithMe','resolved','length','resolveComment','solved','/universer-api/user/list','OpenOrReOpen','getCurrentUser'];_0x1ae7=function(){return _0x52b082;};return _0x1ae7();}g=te([N(0x0,_0x43c8d5),N(0x1,_0xb50de1(f))],g);var se=Object[_0x3d0222(0xb2)],oe=Object[_0x3d0222(0xcc)],ne=(_0x5e632d,_0x4d7829,_0xd5531a)=>_0x4d7829 in _0x5e632d?se(_0x5e632d,_0x4d7829,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd5531a}):_0x5e632d[_0x4d7829]=_0xd5531a,ie=(_0x55f43e,_0x24a442,_0x4c5758,_0x262485)=>{const _0x58e45f=_0x3d0222;for(var _0x2d7c02=_0x262485>0x1?void 0x0:_0x262485?oe(_0x24a442,_0x4c5758):_0x24a442,_0x48c0b4=_0x55f43e[_0x58e45f(0xe5)]-0x1,_0x43c453;_0x48c0b4>=0x0;_0x48c0b4--)(_0x43c453=_0x55f43e[_0x48c0b4])&&(_0x2d7c02=_0x43c453(_0x2d7c02)||_0x2d7c02);return _0x2d7c02;},w=(_0x6073e9,_0x595dcb)=>(_0x5e5eee,_0x528be8)=>_0x595dcb(_0x5e5eee,_0x528be8,_0x6073e9),$=(_0x3c32e1,_0x54998a,_0x3c99c7)=>ne(_0x3c32e1,typeof _0x54998a!=_0x3d0222(0xe2)?_0x54998a+'':_0x54998a,_0x3c99c7);let b=class extends _0x33f723{constructor(_0x78f431=M,_0xc87333,_0x2c062f){const _0x3c091b=_0x3d0222;super(),this[_0x3c091b(0xd7)]=_0x78f431,this[_0x3c091b(0xb9)]=_0xc87333,this['_configService']=_0x2c062f;const {..._0x582984}=_0x351827({},M,this[_0x3c091b(0xd7)]);this[_0x3c091b(0x91)]['setConfig'](z,_0x582984);}['onStarting'](){const _0x5d99fb=_0x3d0222;[[f],[g],[S]][_0x5d99fb(0xca)](_0x256598=>{const _0x3fd4c6=_0x5d99fb;this[_0x3fd4c6(0xb9)][_0x3fd4c6(0xda)](_0x256598);});}[_0x3d0222(0xd4)](){const _0x5aa9b8=_0x3d0222;this[_0x5aa9b8(0xb9)]['get'](g),this['_injector'][_0x5aa9b8(0xd0)](S);}};$(b,'pluginName',W),$(b,_0x3d0222(0xaa),_0x3f182b[_0x3d0222(0xc4)]),b=ie([_0x19c23a(_0x554dd4,_0x1d664a,_0xd9538b),w(0x1,_0xb50de1(_0xc1b344)),w(0x2,_0x4283b9)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2d8ddf=_0x581c;(function(_0x3a474b,_0x336e0c){const _0x9912a3=_0x581c,_0x247516=_0x3a474b();while(!![]){try{const _0x12b175=parseInt(_0x9912a3(0x185))/0x1*(-parseInt(_0x9912a3(0x173))/0x2)+-parseInt(_0x9912a3(0x193))/0x3+parseInt(_0x9912a3(0x1a8))/0x4*(parseInt(_0x9912a3(0x190))/0x5)+parseInt(_0x9912a3(0x1a1))/0x6*(-parseInt(_0x9912a3(0x17f))/0x7)+parseInt(_0x9912a3(0x19d))/0x8+parseInt(_0x9912a3(0x1a3))/0x9*(-parseInt(_0x9912a3(0x1a4))/0xa)+-parseInt(_0x9912a3(0x14e))/0xb*(-parseInt(_0x9912a3(0x198))/0xc);if(_0x12b175===_0x336e0c)break;else _0x247516['push'](_0x247516['shift']());}catch(_0x3ab2f1){_0x247516['push'](_0x247516['shift']());}}}(_0x1b6f,0xb7162));import{CommentService as _0x3b3e81,CollaborationSessionService as _0x300307,UniverCollaborationClientPlugin as _0x4b4a79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x242cb8}from'@univerjs-pro/license';import{dayjs as _0x2a10a6,UserManagerService as _0x3428f3,Inject as _0x56e3c7,Injector as _0x24c6dc,Disposable as _0x27d718,CustomRangeType as _0x3b6fb4,UniverInstanceType as _0x2cbf4f,DependentOn as _0x106b69,IConfigService as _0x56bccc,Plugin as _0x421e16,merge as _0x1ad3c8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52c2ef}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2c28e4,IThreadCommentDataSourceService as _0x4e6c1c}from'@univerjs/thread-comment';import{bufferTime as _0xbabfd}from'rxjs';import{HTTPService as _0x49e4f5}from'@univerjs/network';const W=_0x2d8ddf(0x156);var I=(_0xa1c2c2=>(_0xa1c2c2[_0xa1c2c2['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x181)]=0x1]=_0x2d8ddf(0x181),_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0xa1c2c2))(I||{}),v=(_0x410362=>(_0x410362[_0x410362[_0x2d8ddf(0x187)]=0x0]=_0x2d8ddf(0x187),_0x410362[_0x410362[_0x2d8ddf(0x167)]=0x1]='Add',_0x410362[_0x410362[_0x2d8ddf(0x142)]=0x2]=_0x2d8ddf(0x142),_0x410362[_0x410362[_0x2d8ddf(0x169)]=0x3]='Edit',_0x410362[_0x410362['Delete']=0x4]=_0x2d8ddf(0x150),_0x410362[_0x410362[_0x2d8ddf(0x16c)]=0x5]=_0x2d8ddf(0x16c),_0x410362[_0x410362[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0x410362))(v||{});const D=_0x3e52bc=>_0x2a10a6(new Date(+_0x3e52bc))[_0x2d8ddf(0x188)](_0x2d8ddf(0x15d)),B=async(_0x4eb45c,_0x1ea478)=>{const _0x860404=_0x2d8ddf,_0x4bf51e=_0x4eb45c['get'](_0x3428f3),_0x50143c=_0x4eb45c[_0x860404(0x18b)](_0x49e4f5);_0x1ea478['forEach'](_0x3d2b02=>{const _0x65f855=_0x860404;_0x4bf51e[_0x65f855(0x1a5)](_0x3d2b02)&&_0x1ea478['delete'](_0x3d2b02);}),_0x1ea478[_0x860404(0x184)]&&(await _0x50143c[_0x860404(0x18b)](_0x860404(0x182),{'params':{'userIDs':[..._0x1ea478]}}))[_0x860404(0x15c)][_0x860404(0x145)]['forEach'](_0x48452f=>{_0x48452f&&_0x4bf51e['addUser'](_0x48452f);});};function _0x581c(_0x2022b0,_0x52c476){const _0x1b6f87=_0x1b6f();return _0x581c=function(_0x581cdd,_0x598857){_0x581cdd=_0x581cdd-0x142;let _0xffd5ad=_0x1b6f87[_0x581cdd];return _0xffd5ad;},_0x581c(_0x2022b0,_0x52c476);}var K=Object[_0x2d8ddf(0x19b)],V=(_0x5bc90a,_0x3428d1,_0x42bc52,_0x1f0ac8)=>{const _0x475880=_0x2d8ddf;for(var _0x5a64ee=_0x1f0ac8>0x1?void 0x0:_0x1f0ac8?K(_0x3428d1,_0x42bc52):_0x3428d1,_0x13396d=_0x5bc90a[_0x475880(0x15b)]-0x1,_0x1b1107;_0x13396d>=0x0;_0x13396d--)(_0x1b1107=_0x5bc90a[_0x13396d])&&(_0x5a64ee=_0x1b1107(_0x5a64ee)||_0x5a64ee);return _0x5a64ee;},p=(_0x2e58e4,_0x1bad0c)=>(_0x5250c4,_0x2b5066)=>_0x1bad0c(_0x5250c4,_0x2b5066,_0x2e58e4);let S=class extends _0x27d718{constructor(_0x55bffe,_0x26b70f,_0x3dd8a8,_0xa3f144){const _0x270245=_0x2d8ddf;super(),this['_commentService']=_0x55bffe,this[_0x270245(0x17e)]=_0x26b70f,this[_0x270245(0x153)]=_0x3dd8a8,this[_0x270245(0x16f)]=_0xa3f144,this['_init'](),this['_initUserSync']();}[_0x2d8ddf(0x19e)](){const _0xbe1e65=_0x2d8ddf;this[_0xbe1e65(0x14c)](this[_0xbe1e65(0x17e)][_0xbe1e65(0x159)][_0xbe1e65(0x14f)](_0xbabfd(0x10))['subscribe'](_0x59e2a7=>{const _0x301427=_0xbe1e65,_0x1e327d=new Set();_0x59e2a7[_0x301427(0x17d)](_0x4ce315=>{const _0x4d5d55=_0x301427;switch(_0x4ce315[_0x4d5d55(0x1a6)]){case _0x4d5d55(0x160):{const _0x60d25f=_0x4ce315[_0x4d5d55(0x1a2)][_0x4d5d55(0x196)];_0x1e327d['add'](_0x60d25f);break;}}}),B(this[_0x301427(0x16f)],_0x1e327d);}));}[_0x2d8ddf(0x16e)](){const _0x2a7e4f=_0x2d8ddf;this[_0x2a7e4f(0x14c)](this[_0x2a7e4f(0x195)][_0x2a7e4f(0x159)][_0x2a7e4f(0x17c)](async _0x5e57fb=>{const _0xa6aca1=_0x2a7e4f;var _0x4fd8f5,_0x3265b5,_0x375168,_0x52deef;const _0x457f45=(_0x4fd8f5=this['_threadCommentModel'][_0xa6aca1(0x158)](_0x5e57fb['unitId'])[_0xa6aca1(0x197)](_0x1e4520=>_0x1e4520[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x4fd8f5[_0xa6aca1(0x162)];if(!_0x457f45)return;const {unitId:_0x13ce99,subUnitId:_0xcc5e07}=_0x457f45;switch(_0x5e57fb[_0xa6aca1(0x1a9)]&&this[_0xa6aca1(0x153)][_0xa6aca1(0x176)](_0x5e57fb[_0xa6aca1(0x1a9)]),_0x5e57fb['type']){case v[_0xa6aca1(0x167)]:break;case v['Reply']:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x16a)](_0x13ce99,_0xcc5e07,{'unitId':_0x13ce99,'subUnitId':_0xcc5e07,'ref':'','id':_0x5e57fb['replyId'],'dT':D(+_0x5e57fb[_0xa6aca1(0x17b)]),'threadId':_0x5e57fb[_0xa6aca1(0x163)],'personId':(_0x375168=(_0x3265b5=_0x5e57fb['user'])==null?void 0x0:_0x3265b5[_0xa6aca1(0x14d)])!=null?_0x375168:_0x5e57fb[_0xa6aca1(0x18a)],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)]),'parentId':_0x457f45['id']});break;}case v[_0xa6aca1(0x150)]:{const _0x219d85=this[_0xa6aca1(0x17e)][_0xa6aca1(0x189)](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);_0x219d85&&_0x219d85[_0xa6aca1(0x16d)]&&this[_0xa6aca1(0x17e)]['deleteComment'](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);break;}case v[_0xa6aca1(0x169)]:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x177)](_0x13ce99,_0xcc5e07,{'commentId':_0x5e57fb['replyId'],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)])});break;}case v[_0xa6aca1(0x16c)]:{const _0x17ab63=(_0x52deef=this[_0xa6aca1(0x17e)][_0xa6aca1(0x158)](_0x5e57fb[_0xa6aca1(0x15e)])[_0xa6aca1(0x197)](_0x4c1b4b=>_0x4c1b4b[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x52deef[_0xa6aca1(0x162)];_0x17ab63&&this[_0xa6aca1(0x17e)][_0xa6aca1(0x18f)](_0x13ce99,_0xcc5e07,_0x17ab63['id'],_0x5e57fb[_0xa6aca1(0x166)]===I[_0xa6aca1(0x181)]);break;}}}));}};S=V([p(0x0,_0x56e3c7(_0x3b3e81)),p(0x1,_0x56e3c7(_0x2c28e4)),p(0x2,_0x56e3c7(_0x3428f3)),p(0x3,_0x56e3c7(_0x24c6dc))],S);const z=_0x2d8ddf(0x144),M={};var k=Object[_0x2d8ddf(0x19b)],Q=(_0x3a2e77,_0x4c1b91,_0x57740e,_0x45661b)=>{for(var _0x314a25=_0x45661b>0x1?void 0x0:_0x45661b?k(_0x4c1b91,_0x57740e):_0x4c1b91,_0x2de47=_0x3a2e77['length']-0x1,_0x5f396f;_0x2de47>=0x0;_0x2de47--)(_0x5f396f=_0x3a2e77[_0x2de47])&&(_0x314a25=_0x5f396f(_0x314a25)||_0x314a25);return _0x314a25;},_=(_0x3ade8f,_0x4ad7a5)=>(_0x49490e,_0x7acace)=>_0x4ad7a5(_0x49490e,_0x7acace,_0x3ade8f);function X(_0x1cbaa3,_0xc1b122){const _0x2ee030=_0x2d8ddf,_0x427bac=_0x1cbaa3[_0x2ee030(0x147)][0x0];return{..._0xc1b122,'id':_0x427bac[_0x2ee030(0x19a)],'resolved':_0x1cbaa3[_0x2ee030(0x166)]===0x1,'dT':D(_0x427bac[_0x2ee030(0x17b)]),'personId':_0x427bac[_0x2ee030(0x18a)],'threadId':_0x427bac[_0x2ee030(0x163)]};}function ee(_0xe38bd5,_0x828308,_0x430ea8){const _0x431f05=_0x2d8ddf;var _0x39b4ad,_0xd4bc7e;if(((_0xd4bc7e=(_0x39b4ad=_0xe38bd5==null?void 0x0:_0xe38bd5[_0x431f05(0x147)])==null?void 0x0:_0x39b4ad[_0x431f05(0x15b)])!=null?_0xd4bc7e:0x0)>0x0){const _0x36c6bc=(_0x2e9bba,_0x23e3a6)=>({'id':_0x2e9bba[_0x431f05(0x19a)],'threadId':_0x2e9bba[_0x431f05(0x163)],'dT':D(_0x2e9bba[_0x431f05(0x17b)]),'personId':_0x2e9bba['userId'],'resolved':_0xe38bd5[_0x431f05(0x166)]===I['Solved'],'unitId':_0x828308,'subUnitId':_0x430ea8,'text':JSON['parse'](_0x2e9bba[_0x431f05(0x149)]),'parentId':_0x23e3a6}),_0x10504c=_0x36c6bc(_0xe38bd5[_0x431f05(0x147)][0x0]);return{..._0x10504c,'children':_0xe38bd5['replies'][_0x431f05(0x180)](0x1)[_0x431f05(0x146)](_0x4a69bf=>_0x36c6bc(_0x4a69bf,_0x10504c['id']))};}return null;}let f=class{constructor(_0x5227c1,_0x5c9800,_0x39ca03,_0x57654a){const _0x589feb=_0x2d8ddf;this[_0x589feb(0x1a0)]=_0x5227c1,this[_0x589feb(0x153)]=_0x5c9800,this['_sessionService']=_0x39ca03,this[_0x589feb(0x16f)]=_0x57654a;}async[_0x2d8ddf(0x16a)](_0x5ffde4){const _0x667f8=_0x2d8ddf;var _0x5661f7,_0x44c2d9;const {parentId:_0x5819b4,unitId:_0x1ec086,text:_0x4df2c5,threadId:_0x172f06}=_0x5ffde4,_0x2e361a=(_0x44c2d9=(_0x5661f7=_0x4df2c5['customRanges'])==null?void 0x0:_0x5661f7['filter'](_0x43e19a=>_0x43e19a[_0x667f8(0x154)]===_0x3b6fb4[_0x667f8(0x16b)])[_0x667f8(0x146)](_0x148573=>_0x148573[_0x667f8(0x155)]))!=null?_0x44c2d9:[],_0xa8987a=JSON[_0x667f8(0x170)](_0x4df2c5),_0x51f0ea=(await this['_sessionService'][_0x667f8(0x165)](_0x1ec086))[_0x667f8(0x171)]();if(_0x5819b4){const _0x2f14fb={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a,'threadId':_0x172f06},_0x3b4bcf=(await this[_0x667f8(0x1a0)][_0x667f8(0x172)]('/universer-api/comment/unit/'+_0x1ec086+'/reply',{'body':_0x2f14fb}))[_0x667f8(0x15c)][_0x667f8(0x194)];return{..._0x5ffde4,'id':_0x3b4bcf['replyId'],'dT':_0x2a10a6(+_0x3b4bcf[_0x667f8(0x17b)])[_0x667f8(0x188)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b4bcf['userId']};}else{const _0xadb612={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a},_0x484536=await this[_0x667f8(0x1a0)]['post'](_0x667f8(0x148)+_0x1ec086+_0x667f8(0x17a),{'body':_0xadb612});return X(_0x484536['body'][_0x667f8(0x1a7)],_0x5ffde4);}}async[_0x2d8ddf(0x177)](_0x203b47){const _0x28eae4=_0x2d8ddf;var _0x3a4cc0,_0x1cdfe3;const {text:_0x1bb512,unitId:_0x382116}=_0x203b47,_0x596f8f=(_0x1cdfe3=(_0x3a4cc0=_0x1bb512['customRanges'])==null?void 0x0:_0x3a4cc0[_0x28eae4(0x18c)](_0x296d80=>_0x296d80[_0x28eae4(0x154)]===_0x3b6fb4[_0x28eae4(0x16b)])[_0x28eae4(0x146)](_0xe9b547=>_0xe9b547[_0x28eae4(0x155)]))!=null?_0x1cdfe3:[],_0x18b0cb=JSON[_0x28eae4(0x170)](_0x1bb512),_0x219bf4=_0x203b47['threadId'],_0x39b835=_0x203b47['id'],_0x3e12c9={'memberId':(await this[_0x28eae4(0x151)][_0x28eae4(0x165)](_0x382116))[_0x28eae4(0x171)](),'unitId':_0x382116,'threadId':_0x219bf4,'mention':_0x596f8f,'content':_0x18b0cb,'replyId':_0x39b835},_0x5d73ac=await this[_0x28eae4(0x1a0)]['post'](_0x28eae4(0x148)+_0x382116+_0x28eae4(0x19f),{'body':_0x3e12c9});return!_0x5d73ac[_0x28eae4(0x15c)][_0x28eae4(0x186)]||_0x5d73ac[_0x28eae4(0x15c)]['error'][_0x28eae4(0x168)]===0x1;}async['resolveComment'](_0x22d2e6){const _0x399ed2=_0x2d8ddf,{unitId:_0xdbe0c}=_0x22d2e6,_0x457a11=_0x22d2e6[_0x399ed2(0x163)],_0x271e15={'memberId':this[_0x399ed2(0x153)]['getCurrentUser']()[_0x399ed2(0x14d)],'unitId':_0xdbe0c,'threadId':_0x457a11,'solved':_0x22d2e6[_0x399ed2(0x179)]?I[_0x399ed2(0x181)]:I['OpenOrReOpen']},_0x2825c7=await this[_0x399ed2(0x1a0)][_0x399ed2(0x172)](_0x399ed2(0x148)+_0xdbe0c+'/solved',{'body':_0x271e15});return!_0x2825c7[_0x399ed2(0x15c)][_0x399ed2(0x186)]||_0x2825c7['body'][_0x399ed2(0x186)][_0x399ed2(0x168)]===0x1;}async[_0x2d8ddf(0x192)](_0x183bc3,_0x21c3f4,_0x25d619,_0x4c6253){const _0x1eccae=_0x2d8ddf,_0x16d190={'memberId':(await this[_0x1eccae(0x151)]['requireSession'](_0x183bc3))[_0x1eccae(0x171)](),'threadId':_0x25d619,'replyId':_0x4c6253,'unitId':_0x183bc3},_0x5e2fbd=await this[_0x1eccae(0x1a0)][_0x1eccae(0x172)](_0x1eccae(0x148)+_0x183bc3+_0x1eccae(0x143),{'body':_0x16d190});return!_0x5e2fbd[_0x1eccae(0x15c)][_0x1eccae(0x186)]||_0x5e2fbd['body'][_0x1eccae(0x186)][_0x1eccae(0x168)]===0x1;}async[_0x2d8ddf(0x15f)](_0x43c498,_0x2038dc,_0x27a557){const _0x316469=_0x2d8ddf,_0x23050a={'unitId':_0x43c498,'threadId':_0x27a557},_0x44bfa1=await this[_0x316469(0x1a0)][_0x316469(0x172)](_0x316469(0x148)+_0x43c498+'/list',{'body':_0x23050a}),_0x3dfe29=_0x27a557['map'](_0x57bcf6=>ee(_0x44bfa1[_0x316469(0x15c)][_0x316469(0x14b)][_0x57bcf6],_0x43c498,_0x2038dc))[_0x316469(0x18c)](Boolean);return Object[_0x316469(0x175)](_0x44bfa1[_0x316469(0x15c)]['users'])[_0x316469(0x17d)](_0x189322=>{const _0x1f8aa2=_0x316469;this[_0x1f8aa2(0x153)][_0x1f8aa2(0x176)](_0x189322);}),_0x3dfe29;}[_0x2d8ddf(0x152)](_0x35bd8f){const _0x55023d=_0x2d8ddf;return{'id':_0x35bd8f['id'],'threadId':_0x35bd8f[_0x55023d(0x163)],'ref':_0x35bd8f[_0x55023d(0x14a)]};}};f=Q([_(0x0,_0x56e3c7(_0x49e4f5)),_(0x1,_0x56e3c7(_0x3428f3)),_(0x2,_0x56e3c7(_0x300307)),_(0x3,_0x56e3c7(_0x24c6dc))],f);var re=Object[_0x2d8ddf(0x19b)],te=(_0x5ac03f,_0x5cc703,_0x48b08a,_0x500634)=>{const _0x40d356=_0x2d8ddf;for(var _0x32ad90=_0x500634>0x1?void 0x0:_0x500634?re(_0x5cc703,_0x48b08a):_0x5cc703,_0x132087=_0x5ac03f[_0x40d356(0x15b)]-0x1,_0x2943fd;_0x132087>=0x0;_0x132087--)(_0x2943fd=_0x5ac03f[_0x132087])&&(_0x32ad90=_0x2943fd(_0x32ad90)||_0x32ad90);return _0x32ad90;},N=(_0x409c23,_0x10a28e)=>(_0x433408,_0x49f019)=>_0x10a28e(_0x433408,_0x49f019,_0x409c23);let g=class extends _0x27d718{constructor(_0x1e2399,_0x17138b){const _0x421d42=_0x2d8ddf;super(),this[_0x421d42(0x157)]=_0x1e2399,this[_0x421d42(0x15a)]=_0x17138b,this[_0x421d42(0x161)]();}['_initDataSource'](){const _0x350b93=_0x2d8ddf;this['_threadCommentDataSourceService']['dataSource']=this[_0x350b93(0x15a)],this[_0x350b93(0x157)][_0x350b93(0x178)]=!0x1;}};function _0x1b6f(){const _0x3faff3=['code','Edit','addComment','COMMENT','Solve','parentId','_init','_injector','stringify','getMemberID','post','89768yIYoNF','_configService','values','addUser','updateComment','syncUpdateMutationToColla','resolved','/add','createTimestamp','subscribe','forEach','_threadCommentModel','847IIjioy','slice','Solved','/universer-api/user/list','onStarting','size','18PhkNYT','error','Unknown','format','getComment','userId','get','filter','symbol','pluginName','resolveComment','3452030wQRpti','onReady','deleteComment','2173527NgEyjA','reply','_commentService','personId','find','126156AoASFr','UNRECOGNIZED','replyId','getOwnPropertyDescriptor','UNIVER_UNKNOWN','4115216GvusCd','_initUserSync','/edit','_httpService','71346QxWJrU','payload','16839cEhXHP','6030ezXSal','getUser','type','comment','8dCaZwZ','user','Reply','/delete','thread-comment-data-source.config','users','map','replies','/universer-api/comment/unit/','content','ref','comments','disposeWithMe','userID','3091grvgYr','pipe','Delete','_sessionService','saveCommentToSnapshot','_userService','rangeType','rangeId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','getUnit','commentUpdate$','_threadCommentDataSource','length','body','YYYY/MM/DD\x20HH:mm','unitId','listComments','add','_initDataSource','root','threadId','parse','requireSession','solved','Add'];_0x1b6f=function(){return _0x3faff3;};return _0x1b6f();}g=te([N(0x0,_0x4e6c1c),N(0x1,_0x56e3c7(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0xddf6f9,_0x4b5c63,_0x409517)=>_0x4b5c63 in _0xddf6f9?se(_0xddf6f9,_0x4b5c63,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x409517}):_0xddf6f9[_0x4b5c63]=_0x409517,ie=(_0x25ec58,_0x277884,_0x294e91,_0x33b8b7)=>{const _0x38e927=_0x2d8ddf;for(var _0x986ae2=_0x33b8b7>0x1?void 0x0:_0x33b8b7?oe(_0x277884,_0x294e91):_0x277884,_0x38d22d=_0x25ec58[_0x38e927(0x15b)]-0x1,_0x5ad3b6;_0x38d22d>=0x0;_0x38d22d--)(_0x5ad3b6=_0x25ec58[_0x38d22d])&&(_0x986ae2=_0x5ad3b6(_0x986ae2)||_0x986ae2);return _0x986ae2;},w=(_0x4ca070,_0x353427)=>(_0x453490,_0x23198a)=>_0x353427(_0x453490,_0x23198a,_0x4ca070),$=(_0x30b31c,_0x2020f6,_0x13f556)=>ne(_0x30b31c,typeof _0x2020f6!=_0x2d8ddf(0x18d)?_0x2020f6+'':_0x2020f6,_0x13f556);let b=class extends _0x421e16{constructor(_0x278d6d=M,_0x29c842,_0x13d276){const _0x1e670d=_0x2d8ddf;super(),this['_config']=_0x278d6d,this[_0x1e670d(0x16f)]=_0x29c842,this[_0x1e670d(0x174)]=_0x13d276;const {..._0x4a7f4c}=_0x1ad3c8({},M,this['_config']);this[_0x1e670d(0x174)]['setConfig'](z,_0x4a7f4c);}[_0x2d8ddf(0x183)](){const _0x10ed45=_0x2d8ddf;[[f],[g],[S]][_0x10ed45(0x17d)](_0x40f7ca=>{const _0x2b764e=_0x10ed45;this[_0x2b764e(0x16f)][_0x2b764e(0x160)](_0x40f7ca);});}[_0x2d8ddf(0x191)](){const _0x4b306f=_0x2d8ddf;this['_injector']['get'](g),this[_0x4b306f(0x16f)][_0x4b306f(0x18b)](S);}};$(b,_0x2d8ddf(0x18e),W),$(b,_0x2d8ddf(0x1a6),_0x2cbf4f[_0x2d8ddf(0x19c)]),b=ie([_0x106b69(_0x52c2ef,_0x4b4a79,_0x242cb8),w(0x1,_0x56e3c7(_0x24c6dc)),w(0x2,_0x56bccc)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3d0222=_0x215d;(function(_0x3140fd,_0x3103e7){const _0xd8b334=_0x215d,_0x27c435=_0x3140fd();while(!![]){try{const _0xb05e11=parseInt(_0xd8b334(0x83))/0x1*(-parseInt(_0xd8b334(0xc8))/0x2)+parseInt(_0xd8b334(0xc3))/0x3*(-parseInt(_0xd8b334(0x9b))/0x4)+parseInt(_0xd8b334(0x90))/0x5*(parseInt(_0xd8b334(0xcb))/0x6)+-parseInt(_0xd8b334(0xb1))/0x7*(-parseInt(_0xd8b334(0xc5))/0x8)+-parseInt(_0xd8b334(0xdd))/0x9*(-parseInt(_0xd8b334(0x95))/0xa)+parseInt(_0xd8b334(0xd5))/0xb*(-parseInt(_0xd8b334(0x89))/0xc)+parseInt(_0xd8b334(0xd6))/0xd;if(_0xb05e11===_0x3103e7)break;else _0x27c435['push'](_0x27c435['shift']());}catch(_0x1c113e){_0x27c435['push'](_0x27c435['shift']());}}}(_0x1ae7,0xbc411));import{CommentService as _0x2eedbc,CollaborationSessionService as _0x331714,UniverCollaborationClientPlugin as _0x1d664a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd9538b}from'@univerjs-pro/license';import{dayjs as _0x3b7c2,UserManagerService as _0x312b2f,Inject as _0xb50de1,Injector as _0xc1b344,Disposable as _0x4314bc,CustomRangeType as _0xfc942,UniverInstanceType as _0x3f182b,DependentOn as _0x19c23a,IConfigService as _0x4283b9,Plugin as _0x33f723,merge as _0x351827}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x554dd4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x20227f,IThreadCommentDataSourceService as _0x43c8d5}from'@univerjs/thread-comment';function _0x215d(_0x3539ee,_0x25e01d){const _0x1ae716=_0x1ae7();return _0x215d=function(_0x215db4,_0x555a45){_0x215db4=_0x215db4-0x80;let _0x3eb85c=_0x1ae716[_0x215db4];return _0x3eb85c;},_0x215d(_0x3539ee,_0x25e01d);}import{bufferTime as _0x45eeee}from'rxjs';import{HTTPService as _0x40ab69}from'@univerjs/network';const W=_0x3d0222(0x9e);var I=(_0x4af38=>(_0x4af38[_0x4af38['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4af38[_0x4af38[_0x3d0222(0xd2)]=0x1]=_0x3d0222(0xd2),_0x4af38[_0x4af38[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x4af38))(I||{}),v=(_0x16435d=>(_0x16435d[_0x16435d[_0x3d0222(0xad)]=0x0]=_0x3d0222(0xad),_0x16435d[_0x16435d[_0x3d0222(0x8f)]=0x1]='Add',_0x16435d[_0x16435d[_0x3d0222(0xb5)]=0x2]=_0x3d0222(0xb5),_0x16435d[_0x16435d['Edit']=0x3]=_0x3d0222(0x92),_0x16435d[_0x16435d[_0x3d0222(0x9a)]=0x4]=_0x3d0222(0x9a),_0x16435d[_0x16435d[_0x3d0222(0xba)]=0x5]=_0x3d0222(0xba),_0x16435d[_0x16435d[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x16435d))(v||{});const D=_0x4f0219=>_0x3b7c2(new Date(+_0x4f0219))['format'](_0x3d0222(0xa3)),B=async(_0x2ef99f,_0x28bcc4)=>{const _0xc91faf=_0x3d0222,_0x1b53fd=_0x2ef99f[_0xc91faf(0xd0)](_0x312b2f),_0x4924d4=_0x2ef99f[_0xc91faf(0xd0)](_0x40ab69);_0x28bcc4[_0xc91faf(0xca)](_0x4e3d27=>{const _0x172a5e=_0xc91faf;_0x1b53fd['getUser'](_0x4e3d27)&&_0x28bcc4[_0x172a5e(0xbf)](_0x4e3d27);}),_0x28bcc4['size']&&(await _0x4924d4['get'](_0xc91faf(0xe8),{'params':{'userIDs':[..._0x28bcc4]}}))[_0xc91faf(0xcd)][_0xc91faf(0x88)]['forEach'](_0x2d7c80=>{const _0xe40bf2=_0xc91faf;_0x2d7c80&&_0x1b53fd[_0xe40bf2(0xa2)](_0x2d7c80);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46a882,_0x6188d,_0x5756cb,_0x16af2c)=>{const _0x38ce41=_0x3d0222;for(var _0x4ea8b3=_0x16af2c>0x1?void 0x0:_0x16af2c?K(_0x6188d,_0x5756cb):_0x6188d,_0x3e4e30=_0x46a882[_0x38ce41(0xe5)]-0x1,_0x4357c5;_0x3e4e30>=0x0;_0x3e4e30--)(_0x4357c5=_0x46a882[_0x3e4e30])&&(_0x4ea8b3=_0x4357c5(_0x4ea8b3)||_0x4ea8b3);return _0x4ea8b3;},p=(_0x296b5b,_0x23b7ba)=>(_0xfe8ff4,_0x5447b8)=>_0x23b7ba(_0xfe8ff4,_0x5447b8,_0x296b5b);let S=class extends _0x4314bc{constructor(_0x1d4d95,_0x45eac5,_0x226d24,_0x1440a0){const _0xba2ced=_0x3d0222;super(),this[_0xba2ced(0xde)]=_0x1d4d95,this[_0xba2ced(0xd9)]=_0x45eac5,this[_0xba2ced(0x82)]=_0x226d24,this[_0xba2ced(0xb9)]=_0x1440a0,this[_0xba2ced(0xac)](),this['_initUserSync']();}[_0x3d0222(0x97)](){const _0x559dbb=_0x3d0222;this[_0x559dbb(0xe3)](this[_0x559dbb(0xd9)]['commentUpdate$'][_0x559dbb(0xdb)](_0x45eeee(0x10))['subscribe'](_0x181efb=>{const _0x2936e1=_0x559dbb,_0x4cee51=new Set();_0x181efb[_0x2936e1(0xca)](_0xda2af6=>{const _0x2b5b13=_0x2936e1;switch(_0xda2af6[_0x2b5b13(0xaa)]){case'add':{const _0x5e38ce=_0xda2af6[_0x2b5b13(0xa4)][_0x2b5b13(0xdc)];_0x4cee51[_0x2b5b13(0xda)](_0x5e38ce);break;}}}),B(this['_injector'],_0x4cee51);}));}[_0x3d0222(0xac)](){const _0x59be15=_0x3d0222;this['disposeWithMe'](this[_0x59be15(0xde)][_0x59be15(0x8e)]['subscribe'](async _0x506e81=>{const _0x22693b=_0x59be15;var _0x3e0df5,_0x25e85e,_0x39480b,_0xd01aa4;const _0x1a6164=(_0x3e0df5=this[_0x22693b(0xd9)]['getUnit'](_0x506e81['unitId'])[_0x22693b(0x96)](_0x3d35fe=>_0x3d35fe[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0x3e0df5[_0x22693b(0x9c)];if(!_0x1a6164)return;const {unitId:_0x82dfa1,subUnitId:_0x5d32a3}=_0x1a6164;switch(_0x506e81[_0x22693b(0xdf)]&&this['_userService'][_0x22693b(0xa2)](_0x506e81[_0x22693b(0xdf)]),_0x506e81[_0x22693b(0xaa)]){case v[_0x22693b(0x8f)]:break;case v[_0x22693b(0xb5)]:{this[_0x22693b(0xd9)][_0x22693b(0x8d)](_0x82dfa1,_0x5d32a3,{'unitId':_0x82dfa1,'subUnitId':_0x5d32a3,'ref':'','id':_0x506e81[_0x22693b(0x8c)],'dT':D(+_0x506e81[_0x22693b(0xbe)]),'threadId':_0x506e81[_0x22693b(0x99)],'personId':(_0x39480b=(_0x25e85e=_0x506e81[_0x22693b(0xdf)])==null?void 0x0:_0x25e85e[_0x22693b(0xa9)])!=null?_0x39480b:_0x506e81[_0x22693b(0x8a)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)]),'parentId':_0x1a6164['id']});break;}case v[_0x22693b(0x9a)]:{const _0x397d8a=this[_0x22693b(0xd9)][_0x22693b(0xc6)](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);_0x397d8a&&_0x397d8a['parentId']&&this['_threadCommentModel']['deleteComment'](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);break;}case v[_0x22693b(0x92)]:{this['_threadCommentModel'][_0x22693b(0xbb)](_0x82dfa1,_0x5d32a3,{'commentId':_0x506e81[_0x22693b(0x8c)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)])});break;}case v[_0x22693b(0xba)]:{const _0x4e576d=(_0xd01aa4=this['_threadCommentModel'][_0x22693b(0xc0)](_0x506e81[_0x22693b(0x9f)])[_0x22693b(0x96)](_0x49dc00=>_0x49dc00[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0xd01aa4[_0x22693b(0x9c)];_0x4e576d&&this[_0x22693b(0xd9)][_0x22693b(0xe6)](_0x82dfa1,_0x5d32a3,_0x4e576d['id'],_0x506e81[_0x22693b(0xe7)]===I[_0x22693b(0xd2)]);break;}}}));}};S=V([p(0x0,_0xb50de1(_0x2eedbc)),p(0x1,_0xb50de1(_0x20227f)),p(0x2,_0xb50de1(_0x312b2f)),p(0x3,_0xb50de1(_0xc1b344))],S);const z=_0x3d0222(0xaf),M={};var k=Object[_0x3d0222(0xcc)],Q=(_0x10058c,_0x1b9c24,_0x43394a,_0x11e3cf)=>{for(var _0x35138e=_0x11e3cf>0x1?void 0x0:_0x11e3cf?k(_0x1b9c24,_0x43394a):_0x1b9c24,_0x331af7=_0x10058c['length']-0x1,_0x3f93f2;_0x331af7>=0x0;_0x331af7--)(_0x3f93f2=_0x10058c[_0x331af7])&&(_0x35138e=_0x3f93f2(_0x35138e)||_0x35138e);return _0x35138e;},_=(_0x2791c3,_0x4c0229)=>(_0x4ac72c,_0x11e90e)=>_0x4c0229(_0x4ac72c,_0x11e90e,_0x2791c3);function X(_0x40c91b,_0x4d83db){const _0x5a4b1c=_0x3d0222,_0x59b46a=_0x40c91b['replies'][0x0];return{..._0x4d83db,'id':_0x59b46a[_0x5a4b1c(0x8c)],'resolved':_0x40c91b[_0x5a4b1c(0xe7)]===0x1,'dT':D(_0x59b46a[_0x5a4b1c(0xbe)]),'personId':_0x59b46a[_0x5a4b1c(0x8a)],'threadId':_0x59b46a[_0x5a4b1c(0x99)]};}function ee(_0x3b4b64,_0x2ac990,_0x729992){const _0x4cbfe7=_0x3d0222;var _0xa41e14,_0x2c182e;if(((_0x2c182e=(_0xa41e14=_0x3b4b64==null?void 0x0:_0x3b4b64[_0x4cbfe7(0xab)])==null?void 0x0:_0xa41e14['length'])!=null?_0x2c182e:0x0)>0x0){const _0x2e01a3=(_0x1b5e80,_0xe75e5d)=>({'id':_0x1b5e80['replyId'],'threadId':_0x1b5e80[_0x4cbfe7(0x99)],'dT':D(_0x1b5e80['createTimestamp']),'personId':_0x1b5e80[_0x4cbfe7(0x8a)],'resolved':_0x3b4b64[_0x4cbfe7(0xe7)]===I[_0x4cbfe7(0xd2)],'unitId':_0x2ac990,'subUnitId':_0x729992,'text':JSON[_0x4cbfe7(0xb4)](_0x1b5e80[_0x4cbfe7(0xa7)]),'parentId':_0xe75e5d}),_0x3e59d7=_0x2e01a3(_0x3b4b64[_0x4cbfe7(0xab)][0x0]);return{..._0x3e59d7,'children':_0x3b4b64['replies'][_0x4cbfe7(0xd3)](0x1)[_0x4cbfe7(0x84)](_0x5abc96=>_0x2e01a3(_0x5abc96,_0x3e59d7['id']))};}return null;}let f=class{constructor(_0x4d307b,_0x334e9f,_0x5d93ce,_0x3efa69){const _0x550a26=_0x3d0222;this[_0x550a26(0x8b)]=_0x4d307b,this[_0x550a26(0x82)]=_0x334e9f,this['_sessionService']=_0x5d93ce,this[_0x550a26(0xb9)]=_0x3efa69;}async[_0x3d0222(0x8d)](_0x64865a){const _0x1ec075=_0x3d0222;var _0x333129,_0x28205e;const {parentId:_0x1886c5,unitId:_0x3e28d7,text:_0x487b95,threadId:_0x1eb36c}=_0x64865a,_0x2172a1=(_0x28205e=(_0x333129=_0x487b95['customRanges'])==null?void 0x0:_0x333129['filter'](_0x2d4a13=>_0x2d4a13[_0x1ec075(0xae)]===_0xfc942[_0x1ec075(0xc7)])[_0x1ec075(0x84)](_0x223472=>_0x223472[_0x1ec075(0xb6)]))!=null?_0x28205e:[],_0x122f88=JSON[_0x1ec075(0xcf)](_0x487b95),_0x4f5e50=(await this[_0x1ec075(0xa0)][_0x1ec075(0x9d)](_0x3e28d7))['getMemberID']();if(_0x1886c5){const _0x534844={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1,'threadId':_0x1eb36c},_0x4d9b53=(await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/reply',{'body':_0x534844}))[_0x1ec075(0xcd)][_0x1ec075(0xb3)];return{..._0x64865a,'id':_0x4d9b53['replyId'],'dT':_0x3b7c2(+_0x4d9b53[_0x1ec075(0xbe)])[_0x1ec075(0xc1)](_0x1ec075(0xa3)),'personId':_0x4d9b53[_0x1ec075(0x8a)]};}else{const _0xd499b5={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1},_0x14b436=await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/add',{'body':_0xd499b5});return X(_0x14b436[_0x1ec075(0xcd)]['comment'],_0x64865a);}}async[_0x3d0222(0xbb)](_0x3720e5){const _0x5cd947=_0x3d0222;var _0x5ba954,_0x12fadd;const {text:_0xda9522,unitId:_0x45e44b}=_0x3720e5,_0xdc3f54=(_0x12fadd=(_0x5ba954=_0xda9522[_0x5cd947(0xc2)])==null?void 0x0:_0x5ba954[_0x5cd947(0xa1)](_0x80135c=>_0x80135c[_0x5cd947(0xae)]===_0xfc942['COMMENT'])[_0x5cd947(0x84)](_0x4b7208=>_0x4b7208[_0x5cd947(0xb6)]))!=null?_0x12fadd:[],_0x107725=JSON['stringify'](_0xda9522),_0x4a8eda=_0x3720e5[_0x5cd947(0x99)],_0x2f3a87=_0x3720e5['id'],_0xc1a49f={'memberId':(await this[_0x5cd947(0xa0)][_0x5cd947(0x9d)](_0x45e44b))[_0x5cd947(0xa6)](),'unitId':_0x45e44b,'threadId':_0x4a8eda,'mention':_0xdc3f54,'content':_0x107725,'replyId':_0x2f3a87},_0x2c39ee=await this[_0x5cd947(0x8b)][_0x5cd947(0xb0)](_0x5cd947(0xe1)+_0x45e44b+_0x5cd947(0x94),{'body':_0xc1a49f});return!_0x2c39ee['body']['error']||_0x2c39ee['body'][_0x5cd947(0xb8)][_0x5cd947(0xa5)]===0x1;}async['resolveComment'](_0x568d2f){const _0x144fd3=_0x3d0222,{unitId:_0x50b417}=_0x568d2f,_0x484fac=_0x568d2f[_0x144fd3(0x99)],_0x3d5fe8={'memberId':this[_0x144fd3(0x82)][_0x144fd3(0x81)]()[_0x144fd3(0xa9)],'unitId':_0x50b417,'threadId':_0x484fac,'solved':_0x568d2f[_0x144fd3(0xe4)]?I[_0x144fd3(0xd2)]:I[_0x144fd3(0x80)]},_0x3755e9=await this[_0x144fd3(0x8b)]['post'](_0x144fd3(0xe1)+_0x50b417+_0x144fd3(0x85),{'body':_0x3d5fe8});return!_0x3755e9[_0x144fd3(0xcd)]['error']||_0x3755e9[_0x144fd3(0xcd)]['error'][_0x144fd3(0xa5)]===0x1;}async[_0x3d0222(0xd1)](_0x4868f4,_0x5b36a4,_0x3d16b6,_0x1a19ad){const _0x3f5155=_0x3d0222,_0x41bea9={'memberId':(await this[_0x3f5155(0xa0)][_0x3f5155(0x9d)](_0x4868f4))['getMemberID'](),'threadId':_0x3d16b6,'replyId':_0x1a19ad,'unitId':_0x4868f4},_0x266303=await this['_httpService'][_0x3f5155(0xb0)](_0x3f5155(0xe1)+_0x4868f4+_0x3f5155(0x93),{'body':_0x41bea9});return!_0x266303[_0x3f5155(0xcd)][_0x3f5155(0xb8)]||_0x266303[_0x3f5155(0xcd)]['error'][_0x3f5155(0xa5)]===0x1;}async[_0x3d0222(0xb7)](_0x1c6340,_0x5b9171,_0xff73d9){const _0x3627ba=_0x3d0222,_0x4462cd={'unitId':_0x1c6340,'threadId':_0xff73d9},_0x2d2a71=await this[_0x3627ba(0x8b)][_0x3627ba(0xb0)]('/universer-api/comment/unit/'+_0x1c6340+_0x3627ba(0xce),{'body':_0x4462cd}),_0x31c03a=_0xff73d9[_0x3627ba(0x84)](_0x301d85=>ee(_0x2d2a71['body'][_0x3627ba(0xc9)][_0x301d85],_0x1c6340,_0x5b9171))[_0x3627ba(0xa1)](Boolean);return Object[_0x3627ba(0xd8)](_0x2d2a71['body'][_0x3627ba(0x88)])[_0x3627ba(0xca)](_0x2fe9aa=>{const _0x449b1a=_0x3627ba;this[_0x449b1a(0x82)][_0x449b1a(0xa2)](_0x2fe9aa);}),_0x31c03a;}[_0x3d0222(0xbd)](_0x3cecfc){const _0x49bf80=_0x3d0222;return{'id':_0x3cecfc['id'],'threadId':_0x3cecfc[_0x49bf80(0x99)],'ref':_0x3cecfc['ref']};}};f=Q([_(0x0,_0xb50de1(_0x40ab69)),_(0x1,_0xb50de1(_0x312b2f)),_(0x2,_0xb50de1(_0x331714)),_(0x3,_0xb50de1(_0xc1b344))],f);var re=Object[_0x3d0222(0xcc)],te=(_0x340c9,_0x4aa2ee,_0x49b161,_0x593a88)=>{const _0x50c0d1=_0x3d0222;for(var _0x420459=_0x593a88>0x1?void 0x0:_0x593a88?re(_0x4aa2ee,_0x49b161):_0x4aa2ee,_0x36a67d=_0x340c9[_0x50c0d1(0xe5)]-0x1,_0x1c4c42;_0x36a67d>=0x0;_0x36a67d--)(_0x1c4c42=_0x340c9[_0x36a67d])&&(_0x420459=_0x1c4c42(_0x420459)||_0x420459);return _0x420459;},N=(_0x32d9c6,_0x4bf623)=>(_0x5c2141,_0x2980b2)=>_0x4bf623(_0x5c2141,_0x2980b2,_0x32d9c6);let g=class extends _0x4314bc{constructor(_0x418de9,_0x32c23f){super(),this['_threadCommentDataSourceService']=_0x418de9,this['_threadCommentDataSource']=_0x32c23f,this['_initDataSource']();}[_0x3d0222(0xe0)](){const _0x2e3614=_0x3d0222;this[_0x2e3614(0xa8)][_0x2e3614(0x87)]=this[_0x2e3614(0xbc)],this[_0x2e3614(0xa8)][_0x2e3614(0x98)]=!0x1;}};function _0x1ae7(){const _0x52b082=['_userService','586dvCcgf','map','/solved','UNRECOGNIZED','dataSource','users','180aqdHGH','userId','_httpService','replyId','addComment','commentUpdate$','Add','395FstyHN','_configService','Edit','/delete','/edit','937000hkGEtP','find','_initUserSync','syncUpdateMutationToColla','threadId','Delete','5212OtbjqO','root','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_sessionService','filter','addUser','YYYY/MM/DD\x20HH:mm','payload','code','getMemberID','content','_threadCommentDataSourceService','userID','type','replies','_init','Unknown','rangeType','thread-comment-data-source.config','post','7yFdsnJ','defineProperty','reply','parse','Reply','rangeId','listComments','error','_injector','Solve','updateComment','_threadCommentDataSource','saveCommentToSnapshot','createTimestamp','delete','getUnit','format','customRanges','1572OeylcM','UNIVER_UNKNOWN','12245936PqSczY','getComment','COMMENT','3590tHWYWd','comments','forEach','48390MLxJFA','getOwnPropertyDescriptor','body','/list','stringify','get','deleteComment','Solved','slice','onReady','4906ZPVrYh','3260972WvBiQu','_config','values','_threadCommentModel','add','pipe','personId','9QSphko','_commentService','user','_initDataSource','/universer-api/comment/unit/','symbol','disposeWithMe','resolved','length','resolveComment','solved','/universer-api/user/list','OpenOrReOpen','getCurrentUser'];_0x1ae7=function(){return _0x52b082;};return _0x1ae7();}g=te([N(0x0,_0x43c8d5),N(0x1,_0xb50de1(f))],g);var se=Object[_0x3d0222(0xb2)],oe=Object[_0x3d0222(0xcc)],ne=(_0x5e632d,_0x4d7829,_0xd5531a)=>_0x4d7829 in _0x5e632d?se(_0x5e632d,_0x4d7829,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd5531a}):_0x5e632d[_0x4d7829]=_0xd5531a,ie=(_0x55f43e,_0x24a442,_0x4c5758,_0x262485)=>{const _0x58e45f=_0x3d0222;for(var _0x2d7c02=_0x262485>0x1?void 0x0:_0x262485?oe(_0x24a442,_0x4c5758):_0x24a442,_0x48c0b4=_0x55f43e[_0x58e45f(0xe5)]-0x1,_0x43c453;_0x48c0b4>=0x0;_0x48c0b4--)(_0x43c453=_0x55f43e[_0x48c0b4])&&(_0x2d7c02=_0x43c453(_0x2d7c02)||_0x2d7c02);return _0x2d7c02;},w=(_0x6073e9,_0x595dcb)=>(_0x5e5eee,_0x528be8)=>_0x595dcb(_0x5e5eee,_0x528be8,_0x6073e9),$=(_0x3c32e1,_0x54998a,_0x3c99c7)=>ne(_0x3c32e1,typeof _0x54998a!=_0x3d0222(0xe2)?_0x54998a+'':_0x54998a,_0x3c99c7);let b=class extends _0x33f723{constructor(_0x78f431=M,_0xc87333,_0x2c062f){const _0x3c091b=_0x3d0222;super(),this[_0x3c091b(0xd7)]=_0x78f431,this[_0x3c091b(0xb9)]=_0xc87333,this['_configService']=_0x2c062f;const {..._0x582984}=_0x351827({},M,this[_0x3c091b(0xd7)]);this[_0x3c091b(0x91)]['setConfig'](z,_0x582984);}['onStarting'](){const _0x5d99fb=_0x3d0222;[[f],[g],[S]][_0x5d99fb(0xca)](_0x256598=>{const _0x3fd4c6=_0x5d99fb;this[_0x3fd4c6(0xb9)][_0x3fd4c6(0xda)](_0x256598);});}[_0x3d0222(0xd4)](){const _0x5aa9b8=_0x3d0222;this[_0x5aa9b8(0xb9)]['get'](g),this['_injector'][_0x5aa9b8(0xd0)](S);}};$(b,'pluginName',W),$(b,_0x3d0222(0xaa),_0x3f182b[_0x3d0222(0xc4)]),b=ie([_0x19c23a(_0x554dd4,_0x1d664a,_0xd9538b),w(0x1,_0xb50de1(_0xc1b344)),w(0x2,_0x4283b9)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2d8ddf=_0x581c;(function(_0x3a474b,_0x336e0c){const _0x9912a3=_0x581c,_0x247516=_0x3a474b();while(!![]){try{const _0x12b175=parseInt(_0x9912a3(0x185))/0x1*(-parseInt(_0x9912a3(0x173))/0x2)+-parseInt(_0x9912a3(0x193))/0x3+parseInt(_0x9912a3(0x1a8))/0x4*(parseInt(_0x9912a3(0x190))/0x5)+parseInt(_0x9912a3(0x1a1))/0x6*(-parseInt(_0x9912a3(0x17f))/0x7)+parseInt(_0x9912a3(0x19d))/0x8+parseInt(_0x9912a3(0x1a3))/0x9*(-parseInt(_0x9912a3(0x1a4))/0xa)+-parseInt(_0x9912a3(0x14e))/0xb*(-parseInt(_0x9912a3(0x198))/0xc);if(_0x12b175===_0x336e0c)break;else _0x247516['push'](_0x247516['shift']());}catch(_0x3ab2f1){_0x247516['push'](_0x247516['shift']());}}}(_0x1b6f,0xb7162));import{CommentService as _0x3b3e81,CollaborationSessionService as _0x300307,UniverCollaborationClientPlugin as _0x4b4a79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x242cb8}from'@univerjs-pro/license';import{dayjs as _0x2a10a6,UserManagerService as _0x3428f3,Inject as _0x56e3c7,Injector as _0x24c6dc,Disposable as _0x27d718,CustomRangeType as _0x3b6fb4,UniverInstanceType as _0x2cbf4f,DependentOn as _0x106b69,IConfigService as _0x56bccc,Plugin as _0x421e16,merge as _0x1ad3c8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52c2ef}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2c28e4,IThreadCommentDataSourceService as _0x4e6c1c}from'@univerjs/thread-comment';import{bufferTime as _0xbabfd}from'rxjs';import{HTTPService as _0x49e4f5}from'@univerjs/network';const W=_0x2d8ddf(0x156);var I=(_0xa1c2c2=>(_0xa1c2c2[_0xa1c2c2['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x181)]=0x1]=_0x2d8ddf(0x181),_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0xa1c2c2))(I||{}),v=(_0x410362=>(_0x410362[_0x410362[_0x2d8ddf(0x187)]=0x0]=_0x2d8ddf(0x187),_0x410362[_0x410362[_0x2d8ddf(0x167)]=0x1]='Add',_0x410362[_0x410362[_0x2d8ddf(0x142)]=0x2]=_0x2d8ddf(0x142),_0x410362[_0x410362[_0x2d8ddf(0x169)]=0x3]='Edit',_0x410362[_0x410362['Delete']=0x4]=_0x2d8ddf(0x150),_0x410362[_0x410362[_0x2d8ddf(0x16c)]=0x5]=_0x2d8ddf(0x16c),_0x410362[_0x410362[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0x410362))(v||{});const D=_0x3e52bc=>_0x2a10a6(new Date(+_0x3e52bc))[_0x2d8ddf(0x188)](_0x2d8ddf(0x15d)),B=async(_0x4eb45c,_0x1ea478)=>{const _0x860404=_0x2d8ddf,_0x4bf51e=_0x4eb45c['get'](_0x3428f3),_0x50143c=_0x4eb45c[_0x860404(0x18b)](_0x49e4f5);_0x1ea478['forEach'](_0x3d2b02=>{const _0x65f855=_0x860404;_0x4bf51e[_0x65f855(0x1a5)](_0x3d2b02)&&_0x1ea478['delete'](_0x3d2b02);}),_0x1ea478[_0x860404(0x184)]&&(await _0x50143c[_0x860404(0x18b)](_0x860404(0x182),{'params':{'userIDs':[..._0x1ea478]}}))[_0x860404(0x15c)][_0x860404(0x145)]['forEach'](_0x48452f=>{_0x48452f&&_0x4bf51e['addUser'](_0x48452f);});};function _0x581c(_0x2022b0,_0x52c476){const _0x1b6f87=_0x1b6f();return _0x581c=function(_0x581cdd,_0x598857){_0x581cdd=_0x581cdd-0x142;let _0xffd5ad=_0x1b6f87[_0x581cdd];return _0xffd5ad;},_0x581c(_0x2022b0,_0x52c476);}var K=Object[_0x2d8ddf(0x19b)],V=(_0x5bc90a,_0x3428d1,_0x42bc52,_0x1f0ac8)=>{const _0x475880=_0x2d8ddf;for(var _0x5a64ee=_0x1f0ac8>0x1?void 0x0:_0x1f0ac8?K(_0x3428d1,_0x42bc52):_0x3428d1,_0x13396d=_0x5bc90a[_0x475880(0x15b)]-0x1,_0x1b1107;_0x13396d>=0x0;_0x13396d--)(_0x1b1107=_0x5bc90a[_0x13396d])&&(_0x5a64ee=_0x1b1107(_0x5a64ee)||_0x5a64ee);return _0x5a64ee;},p=(_0x2e58e4,_0x1bad0c)=>(_0x5250c4,_0x2b5066)=>_0x1bad0c(_0x5250c4,_0x2b5066,_0x2e58e4);let S=class extends _0x27d718{constructor(_0x55bffe,_0x26b70f,_0x3dd8a8,_0xa3f144){const _0x270245=_0x2d8ddf;super(),this['_commentService']=_0x55bffe,this[_0x270245(0x17e)]=_0x26b70f,this[_0x270245(0x153)]=_0x3dd8a8,this[_0x270245(0x16f)]=_0xa3f144,this['_init'](),this['_initUserSync']();}[_0x2d8ddf(0x19e)](){const _0xbe1e65=_0x2d8ddf;this[_0xbe1e65(0x14c)](this[_0xbe1e65(0x17e)][_0xbe1e65(0x159)][_0xbe1e65(0x14f)](_0xbabfd(0x10))['subscribe'](_0x59e2a7=>{const _0x301427=_0xbe1e65,_0x1e327d=new Set();_0x59e2a7[_0x301427(0x17d)](_0x4ce315=>{const _0x4d5d55=_0x301427;switch(_0x4ce315[_0x4d5d55(0x1a6)]){case _0x4d5d55(0x160):{const _0x60d25f=_0x4ce315[_0x4d5d55(0x1a2)][_0x4d5d55(0x196)];_0x1e327d['add'](_0x60d25f);break;}}}),B(this[_0x301427(0x16f)],_0x1e327d);}));}[_0x2d8ddf(0x16e)](){const _0x2a7e4f=_0x2d8ddf;this[_0x2a7e4f(0x14c)](this[_0x2a7e4f(0x195)][_0x2a7e4f(0x159)][_0x2a7e4f(0x17c)](async _0x5e57fb=>{const _0xa6aca1=_0x2a7e4f;var _0x4fd8f5,_0x3265b5,_0x375168,_0x52deef;const _0x457f45=(_0x4fd8f5=this['_threadCommentModel'][_0xa6aca1(0x158)](_0x5e57fb['unitId'])[_0xa6aca1(0x197)](_0x1e4520=>_0x1e4520[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x4fd8f5[_0xa6aca1(0x162)];if(!_0x457f45)return;const {unitId:_0x13ce99,subUnitId:_0xcc5e07}=_0x457f45;switch(_0x5e57fb[_0xa6aca1(0x1a9)]&&this[_0xa6aca1(0x153)][_0xa6aca1(0x176)](_0x5e57fb[_0xa6aca1(0x1a9)]),_0x5e57fb['type']){case v[_0xa6aca1(0x167)]:break;case v['Reply']:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x16a)](_0x13ce99,_0xcc5e07,{'unitId':_0x13ce99,'subUnitId':_0xcc5e07,'ref':'','id':_0x5e57fb['replyId'],'dT':D(+_0x5e57fb[_0xa6aca1(0x17b)]),'threadId':_0x5e57fb[_0xa6aca1(0x163)],'personId':(_0x375168=(_0x3265b5=_0x5e57fb['user'])==null?void 0x0:_0x3265b5[_0xa6aca1(0x14d)])!=null?_0x375168:_0x5e57fb[_0xa6aca1(0x18a)],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)]),'parentId':_0x457f45['id']});break;}case v[_0xa6aca1(0x150)]:{const _0x219d85=this[_0xa6aca1(0x17e)][_0xa6aca1(0x189)](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);_0x219d85&&_0x219d85[_0xa6aca1(0x16d)]&&this[_0xa6aca1(0x17e)]['deleteComment'](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);break;}case v[_0xa6aca1(0x169)]:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x177)](_0x13ce99,_0xcc5e07,{'commentId':_0x5e57fb['replyId'],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)])});break;}case v[_0xa6aca1(0x16c)]:{const _0x17ab63=(_0x52deef=this[_0xa6aca1(0x17e)][_0xa6aca1(0x158)](_0x5e57fb[_0xa6aca1(0x15e)])[_0xa6aca1(0x197)](_0x4c1b4b=>_0x4c1b4b[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x52deef[_0xa6aca1(0x162)];_0x17ab63&&this[_0xa6aca1(0x17e)][_0xa6aca1(0x18f)](_0x13ce99,_0xcc5e07,_0x17ab63['id'],_0x5e57fb[_0xa6aca1(0x166)]===I[_0xa6aca1(0x181)]);break;}}}));}};S=V([p(0x0,_0x56e3c7(_0x3b3e81)),p(0x1,_0x56e3c7(_0x2c28e4)),p(0x2,_0x56e3c7(_0x3428f3)),p(0x3,_0x56e3c7(_0x24c6dc))],S);const z=_0x2d8ddf(0x144),M={};var k=Object[_0x2d8ddf(0x19b)],Q=(_0x3a2e77,_0x4c1b91,_0x57740e,_0x45661b)=>{for(var _0x314a25=_0x45661b>0x1?void 0x0:_0x45661b?k(_0x4c1b91,_0x57740e):_0x4c1b91,_0x2de47=_0x3a2e77['length']-0x1,_0x5f396f;_0x2de47>=0x0;_0x2de47--)(_0x5f396f=_0x3a2e77[_0x2de47])&&(_0x314a25=_0x5f396f(_0x314a25)||_0x314a25);return _0x314a25;},_=(_0x3ade8f,_0x4ad7a5)=>(_0x49490e,_0x7acace)=>_0x4ad7a5(_0x49490e,_0x7acace,_0x3ade8f);function X(_0x1cbaa3,_0xc1b122){const _0x2ee030=_0x2d8ddf,_0x427bac=_0x1cbaa3[_0x2ee030(0x147)][0x0];return{..._0xc1b122,'id':_0x427bac[_0x2ee030(0x19a)],'resolved':_0x1cbaa3[_0x2ee030(0x166)]===0x1,'dT':D(_0x427bac[_0x2ee030(0x17b)]),'personId':_0x427bac[_0x2ee030(0x18a)],'threadId':_0x427bac[_0x2ee030(0x163)]};}function ee(_0xe38bd5,_0x828308,_0x430ea8){const _0x431f05=_0x2d8ddf;var _0x39b4ad,_0xd4bc7e;if(((_0xd4bc7e=(_0x39b4ad=_0xe38bd5==null?void 0x0:_0xe38bd5[_0x431f05(0x147)])==null?void 0x0:_0x39b4ad[_0x431f05(0x15b)])!=null?_0xd4bc7e:0x0)>0x0){const _0x36c6bc=(_0x2e9bba,_0x23e3a6)=>({'id':_0x2e9bba[_0x431f05(0x19a)],'threadId':_0x2e9bba[_0x431f05(0x163)],'dT':D(_0x2e9bba[_0x431f05(0x17b)]),'personId':_0x2e9bba['userId'],'resolved':_0xe38bd5[_0x431f05(0x166)]===I['Solved'],'unitId':_0x828308,'subUnitId':_0x430ea8,'text':JSON['parse'](_0x2e9bba[_0x431f05(0x149)]),'parentId':_0x23e3a6}),_0x10504c=_0x36c6bc(_0xe38bd5[_0x431f05(0x147)][0x0]);return{..._0x10504c,'children':_0xe38bd5['replies'][_0x431f05(0x180)](0x1)[_0x431f05(0x146)](_0x4a69bf=>_0x36c6bc(_0x4a69bf,_0x10504c['id']))};}return null;}let f=class{constructor(_0x5227c1,_0x5c9800,_0x39ca03,_0x57654a){const _0x589feb=_0x2d8ddf;this[_0x589feb(0x1a0)]=_0x5227c1,this[_0x589feb(0x153)]=_0x5c9800,this['_sessionService']=_0x39ca03,this[_0x589feb(0x16f)]=_0x57654a;}async[_0x2d8ddf(0x16a)](_0x5ffde4){const _0x667f8=_0x2d8ddf;var _0x5661f7,_0x44c2d9;const {parentId:_0x5819b4,unitId:_0x1ec086,text:_0x4df2c5,threadId:_0x172f06}=_0x5ffde4,_0x2e361a=(_0x44c2d9=(_0x5661f7=_0x4df2c5['customRanges'])==null?void 0x0:_0x5661f7['filter'](_0x43e19a=>_0x43e19a[_0x667f8(0x154)]===_0x3b6fb4[_0x667f8(0x16b)])[_0x667f8(0x146)](_0x148573=>_0x148573[_0x667f8(0x155)]))!=null?_0x44c2d9:[],_0xa8987a=JSON[_0x667f8(0x170)](_0x4df2c5),_0x51f0ea=(await this['_sessionService'][_0x667f8(0x165)](_0x1ec086))[_0x667f8(0x171)]();if(_0x5819b4){const _0x2f14fb={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a,'threadId':_0x172f06},_0x3b4bcf=(await this[_0x667f8(0x1a0)][_0x667f8(0x172)]('/universer-api/comment/unit/'+_0x1ec086+'/reply',{'body':_0x2f14fb}))[_0x667f8(0x15c)][_0x667f8(0x194)];return{..._0x5ffde4,'id':_0x3b4bcf['replyId'],'dT':_0x2a10a6(+_0x3b4bcf[_0x667f8(0x17b)])[_0x667f8(0x188)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b4bcf['userId']};}else{const _0xadb612={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a},_0x484536=await this[_0x667f8(0x1a0)]['post'](_0x667f8(0x148)+_0x1ec086+_0x667f8(0x17a),{'body':_0xadb612});return X(_0x484536['body'][_0x667f8(0x1a7)],_0x5ffde4);}}async[_0x2d8ddf(0x177)](_0x203b47){const _0x28eae4=_0x2d8ddf;var _0x3a4cc0,_0x1cdfe3;const {text:_0x1bb512,unitId:_0x382116}=_0x203b47,_0x596f8f=(_0x1cdfe3=(_0x3a4cc0=_0x1bb512['customRanges'])==null?void 0x0:_0x3a4cc0[_0x28eae4(0x18c)](_0x296d80=>_0x296d80[_0x28eae4(0x154)]===_0x3b6fb4[_0x28eae4(0x16b)])[_0x28eae4(0x146)](_0xe9b547=>_0xe9b547[_0x28eae4(0x155)]))!=null?_0x1cdfe3:[],_0x18b0cb=JSON[_0x28eae4(0x170)](_0x1bb512),_0x219bf4=_0x203b47['threadId'],_0x39b835=_0x203b47['id'],_0x3e12c9={'memberId':(await this[_0x28eae4(0x151)][_0x28eae4(0x165)](_0x382116))[_0x28eae4(0x171)](),'unitId':_0x382116,'threadId':_0x219bf4,'mention':_0x596f8f,'content':_0x18b0cb,'replyId':_0x39b835},_0x5d73ac=await this[_0x28eae4(0x1a0)]['post'](_0x28eae4(0x148)+_0x382116+_0x28eae4(0x19f),{'body':_0x3e12c9});return!_0x5d73ac[_0x28eae4(0x15c)][_0x28eae4(0x186)]||_0x5d73ac[_0x28eae4(0x15c)]['error'][_0x28eae4(0x168)]===0x1;}async['resolveComment'](_0x22d2e6){const _0x399ed2=_0x2d8ddf,{unitId:_0xdbe0c}=_0x22d2e6,_0x457a11=_0x22d2e6[_0x399ed2(0x163)],_0x271e15={'memberId':this[_0x399ed2(0x153)]['getCurrentUser']()[_0x399ed2(0x14d)],'unitId':_0xdbe0c,'threadId':_0x457a11,'solved':_0x22d2e6[_0x399ed2(0x179)]?I[_0x399ed2(0x181)]:I['OpenOrReOpen']},_0x2825c7=await this[_0x399ed2(0x1a0)][_0x399ed2(0x172)](_0x399ed2(0x148)+_0xdbe0c+'/solved',{'body':_0x271e15});return!_0x2825c7[_0x399ed2(0x15c)][_0x399ed2(0x186)]||_0x2825c7['body'][_0x399ed2(0x186)][_0x399ed2(0x168)]===0x1;}async[_0x2d8ddf(0x192)](_0x183bc3,_0x21c3f4,_0x25d619,_0x4c6253){const _0x1eccae=_0x2d8ddf,_0x16d190={'memberId':(await this[_0x1eccae(0x151)]['requireSession'](_0x183bc3))[_0x1eccae(0x171)](),'threadId':_0x25d619,'replyId':_0x4c6253,'unitId':_0x183bc3},_0x5e2fbd=await this[_0x1eccae(0x1a0)][_0x1eccae(0x172)](_0x1eccae(0x148)+_0x183bc3+_0x1eccae(0x143),{'body':_0x16d190});return!_0x5e2fbd[_0x1eccae(0x15c)][_0x1eccae(0x186)]||_0x5e2fbd['body'][_0x1eccae(0x186)][_0x1eccae(0x168)]===0x1;}async[_0x2d8ddf(0x15f)](_0x43c498,_0x2038dc,_0x27a557){const _0x316469=_0x2d8ddf,_0x23050a={'unitId':_0x43c498,'threadId':_0x27a557},_0x44bfa1=await this[_0x316469(0x1a0)][_0x316469(0x172)](_0x316469(0x148)+_0x43c498+'/list',{'body':_0x23050a}),_0x3dfe29=_0x27a557['map'](_0x57bcf6=>ee(_0x44bfa1[_0x316469(0x15c)][_0x316469(0x14b)][_0x57bcf6],_0x43c498,_0x2038dc))[_0x316469(0x18c)](Boolean);return Object[_0x316469(0x175)](_0x44bfa1[_0x316469(0x15c)]['users'])[_0x316469(0x17d)](_0x189322=>{const _0x1f8aa2=_0x316469;this[_0x1f8aa2(0x153)][_0x1f8aa2(0x176)](_0x189322);}),_0x3dfe29;}[_0x2d8ddf(0x152)](_0x35bd8f){const _0x55023d=_0x2d8ddf;return{'id':_0x35bd8f['id'],'threadId':_0x35bd8f[_0x55023d(0x163)],'ref':_0x35bd8f[_0x55023d(0x14a)]};}};f=Q([_(0x0,_0x56e3c7(_0x49e4f5)),_(0x1,_0x56e3c7(_0x3428f3)),_(0x2,_0x56e3c7(_0x300307)),_(0x3,_0x56e3c7(_0x24c6dc))],f);var re=Object[_0x2d8ddf(0x19b)],te=(_0x5ac03f,_0x5cc703,_0x48b08a,_0x500634)=>{const _0x40d356=_0x2d8ddf;for(var _0x32ad90=_0x500634>0x1?void 0x0:_0x500634?re(_0x5cc703,_0x48b08a):_0x5cc703,_0x132087=_0x5ac03f[_0x40d356(0x15b)]-0x1,_0x2943fd;_0x132087>=0x0;_0x132087--)(_0x2943fd=_0x5ac03f[_0x132087])&&(_0x32ad90=_0x2943fd(_0x32ad90)||_0x32ad90);return _0x32ad90;},N=(_0x409c23,_0x10a28e)=>(_0x433408,_0x49f019)=>_0x10a28e(_0x433408,_0x49f019,_0x409c23);let g=class extends _0x27d718{constructor(_0x1e2399,_0x17138b){const _0x421d42=_0x2d8ddf;super(),this[_0x421d42(0x157)]=_0x1e2399,this[_0x421d42(0x15a)]=_0x17138b,this[_0x421d42(0x161)]();}['_initDataSource'](){const _0x350b93=_0x2d8ddf;this['_threadCommentDataSourceService']['dataSource']=this[_0x350b93(0x15a)],this[_0x350b93(0x157)][_0x350b93(0x178)]=!0x1;}};function _0x1b6f(){const _0x3faff3=['code','Edit','addComment','COMMENT','Solve','parentId','_init','_injector','stringify','getMemberID','post','89768yIYoNF','_configService','values','addUser','updateComment','syncUpdateMutationToColla','resolved','/add','createTimestamp','subscribe','forEach','_threadCommentModel','847IIjioy','slice','Solved','/universer-api/user/list','onStarting','size','18PhkNYT','error','Unknown','format','getComment','userId','get','filter','symbol','pluginName','resolveComment','3452030wQRpti','onReady','deleteComment','2173527NgEyjA','reply','_commentService','personId','find','126156AoASFr','UNRECOGNIZED','replyId','getOwnPropertyDescriptor','UNIVER_UNKNOWN','4115216GvusCd','_initUserSync','/edit','_httpService','71346QxWJrU','payload','16839cEhXHP','6030ezXSal','getUser','type','comment','8dCaZwZ','user','Reply','/delete','thread-comment-data-source.config','users','map','replies','/universer-api/comment/unit/','content','ref','comments','disposeWithMe','userID','3091grvgYr','pipe','Delete','_sessionService','saveCommentToSnapshot','_userService','rangeType','rangeId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','getUnit','commentUpdate$','_threadCommentDataSource','length','body','YYYY/MM/DD\x20HH:mm','unitId','listComments','add','_initDataSource','root','threadId','parse','requireSession','solved','Add'];_0x1b6f=function(){return _0x3faff3;};return _0x1b6f();}g=te([N(0x0,_0x4e6c1c),N(0x1,_0x56e3c7(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0xddf6f9,_0x4b5c63,_0x409517)=>_0x4b5c63 in _0xddf6f9?se(_0xddf6f9,_0x4b5c63,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x409517}):_0xddf6f9[_0x4b5c63]=_0x409517,ie=(_0x25ec58,_0x277884,_0x294e91,_0x33b8b7)=>{const _0x38e927=_0x2d8ddf;for(var _0x986ae2=_0x33b8b7>0x1?void 0x0:_0x33b8b7?oe(_0x277884,_0x294e91):_0x277884,_0x38d22d=_0x25ec58[_0x38e927(0x15b)]-0x1,_0x5ad3b6;_0x38d22d>=0x0;_0x38d22d--)(_0x5ad3b6=_0x25ec58[_0x38d22d])&&(_0x986ae2=_0x5ad3b6(_0x986ae2)||_0x986ae2);return _0x986ae2;},w=(_0x4ca070,_0x353427)=>(_0x453490,_0x23198a)=>_0x353427(_0x453490,_0x23198a,_0x4ca070),$=(_0x30b31c,_0x2020f6,_0x13f556)=>ne(_0x30b31c,typeof _0x2020f6!=_0x2d8ddf(0x18d)?_0x2020f6+'':_0x2020f6,_0x13f556);let b=class extends _0x421e16{constructor(_0x278d6d=M,_0x29c842,_0x13d276){const _0x1e670d=_0x2d8ddf;super(),this['_config']=_0x278d6d,this[_0x1e670d(0x16f)]=_0x29c842,this[_0x1e670d(0x174)]=_0x13d276;const {..._0x4a7f4c}=_0x1ad3c8({},M,this['_config']);this[_0x1e670d(0x174)]['setConfig'](z,_0x4a7f4c);}[_0x2d8ddf(0x183)](){const _0x10ed45=_0x2d8ddf;[[f],[g],[S]][_0x10ed45(0x17d)](_0x40f7ca=>{const _0x2b764e=_0x10ed45;this[_0x2b764e(0x16f)][_0x2b764e(0x160)](_0x40f7ca);});}[_0x2d8ddf(0x191)](){const _0x4b306f=_0x2d8ddf;this['_injector']['get'](g),this[_0x4b306f(0x16f)][_0x4b306f(0x18b)](S);}};$(b,_0x2d8ddf(0x18e),W),$(b,_0x2d8ddf(0x1a6),_0x2cbf4f[_0x2d8ddf(0x19c)]),b=ie([_0x106b69(_0x52c2ef,_0x4b4a79,_0x242cb8),w(0x1,_0x56e3c7(_0x24c6dc)),w(0x2,_0x56bccc)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x555a(_0x236c41,_0x12adb6){const _0x2f8cb4=_0x2f8c();return _0x555a=function(_0x555a6c,_0x473654){_0x555a6c=_0x555a6c-0x1d1;let _0x231e7b=_0x2f8cb4[_0x555a6c];return _0x231e7b;},_0x555a(_0x236c41,_0x12adb6);}(function(_0x2d2c7e,_0x36e857){const _0x4da183=_0x555a,_0x1ab652=_0x2d2c7e();while(!![]){try{const _0x59603f=-parseInt(_0x4da183(0x1ec))/0x1*(parseInt(_0x4da183(0x20f))/0x2)+parseInt(_0x4da183(0x22e))/0x3*(-parseInt(_0x4da183(0x237))/0x4)+-parseInt(_0x4da183(0x1ff))/0x5+parseInt(_0x4da183(0x215))/0x6*(-parseInt(_0x4da183(0x223))/0x7)+-parseInt(_0x4da183(0x20e))/0x8+-parseInt(_0x4da183(0x22b))/0x9+parseInt(_0x4da183(0x1f2))/0xa;if(_0x59603f===_0x36e857)break;else _0x1ab652['push'](_0x1ab652['shift']());}catch(_0x1b904a){_0x1ab652['push'](_0x1ab652['shift']());}}}(_0x2f8c,0xc4022),function(_0x5b2ce3,_0x37ae6c){const _0x41a14d=_0x555a;typeof exports=='object'&&typeof module<'u'?_0x37ae6c(exports,require('@univerjs-pro/collaboration-client'),require(_0x41a14d(0x22d)),require('@univerjs/core'),require(_0x41a14d(0x1e1)),require(_0x41a14d(0x1f9)),require(_0x41a14d(0x211)),require(_0x41a14d(0x1ef))):typeof define==_0x41a14d(0x253)&&define[_0x41a14d(0x229)]?define([_0x41a14d(0x24b),_0x41a14d(0x256),_0x41a14d(0x22d),'@univerjs/core','@univerjs/thread-comment-ui',_0x41a14d(0x1f9),_0x41a14d(0x211),_0x41a14d(0x1ef)],_0x37ae6c):(_0x5b2ce3=typeof globalThis<'u'?globalThis:_0x5b2ce3||self,_0x37ae6c(_0x5b2ce3['UniverProThreadCommentDatasource']={},_0x5b2ce3[_0x41a14d(0x1e8)],_0x5b2ce3[_0x41a14d(0x202)],_0x5b2ce3[_0x41a14d(0x217)],_0x5b2ce3['UniverThreadCommentUi'],_0x5b2ce3['UniverThreadComment'],_0x5b2ce3[_0x41a14d(0x211)],_0x5b2ce3[_0x41a14d(0x254)]));}(this,function(_0x3a6cfc,_0x1ce484,_0x33deaf,_0x4332b8,_0x3a429e,_0xe1c387,_0x1ee6ef,_0x226f1a){'use strict';const _0x2e5523=_0x555a;const _0x499ff3=_0x2e5523(0x20c);var _0x5380fc=(_0x10299b=>(_0x10299b[_0x10299b[_0x2e5523(0x21b)]=0x0]='OpenOrReOpen',_0x10299b[_0x10299b[_0x2e5523(0x24d)]=0x1]=_0x2e5523(0x24d),_0x10299b[_0x10299b['UNRECOGNIZED']=-0x1]=_0x2e5523(0x20b),_0x10299b))(_0x5380fc||{}),_0x435fff=(_0x41bde3=>(_0x41bde3[_0x41bde3[_0x2e5523(0x206)]=0x0]=_0x2e5523(0x206),_0x41bde3[_0x41bde3[_0x2e5523(0x24c)]=0x1]=_0x2e5523(0x24c),_0x41bde3[_0x41bde3[_0x2e5523(0x1d2)]=0x2]=_0x2e5523(0x1d2),_0x41bde3[_0x41bde3[_0x2e5523(0x24f)]=0x3]=_0x2e5523(0x24f),_0x41bde3[_0x41bde3['Delete']=0x4]=_0x2e5523(0x21f),_0x41bde3[_0x41bde3[_0x2e5523(0x219)]=0x5]=_0x2e5523(0x219),_0x41bde3[_0x41bde3[_0x2e5523(0x20b)]=-0x1]='UNRECOGNIZED',_0x41bde3))(_0x435fff||{});const _0x3d91c9=_0x3160d5=>_0x4332b8[_0x2e5523(0x1d7)](new Date(+_0x3160d5))[_0x2e5523(0x225)](_0x2e5523(0x1e3)),_0x220f02=async(_0x4f3398,_0x24ff89)=>{const _0x5674f4=_0x2e5523,_0x40348d=_0x4f3398['get'](_0x4332b8[_0x5674f4(0x255)]),_0x17a4b8=_0x4f3398[_0x5674f4(0x1f0)](_0x226f1a[_0x5674f4(0x207)]);_0x24ff89[_0x5674f4(0x1e2)](_0x2222e9=>{const _0x1c5717=_0x5674f4;_0x40348d[_0x1c5717(0x234)](_0x2222e9)&&_0x24ff89[_0x1c5717(0x1fd)](_0x2222e9);}),_0x24ff89[_0x5674f4(0x251)]&&(await _0x17a4b8[_0x5674f4(0x1f0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x24ff89]}}))[_0x5674f4(0x25b)][_0x5674f4(0x1db)][_0x5674f4(0x1e2)](_0x1200ec=>{const _0x432323=_0x5674f4;_0x1200ec&&_0x40348d[_0x432323(0x1fe)](_0x1200ec);});};var _0x22aae9=Object[_0x2e5523(0x1e5)],_0x5e6829=(_0x10f160,_0x3a249a,_0x3e12f4,_0x338111)=>{const _0xa8a278=_0x2e5523;for(var _0x39104f=_0x338111>0x1?void 0x0:_0x338111?_0x22aae9(_0x3a249a,_0x3e12f4):_0x3a249a,_0x467202=_0x10f160[_0xa8a278(0x238)]-0x1,_0x4f7b33;_0x467202>=0x0;_0x467202--)(_0x4f7b33=_0x10f160[_0x467202])&&(_0x39104f=_0x4f7b33(_0x39104f)||_0x39104f);return _0x39104f;},_0x5e804c=(_0x20680a,_0x99370c)=>(_0x4983f7,_0x3018a0)=>_0x99370c(_0x4983f7,_0x3018a0,_0x20680a);let _0x2f0683=class extends _0x4332b8[_0x2e5523(0x201)]{constructor(_0x470d61,_0x3ba4b3,_0x55bca6,_0x5e61d7){const _0x22403a=_0x2e5523;super(),this['_commentService']=_0x470d61,this[_0x22403a(0x228)]=_0x3ba4b3,this[_0x22403a(0x236)]=_0x55bca6,this[_0x22403a(0x1e6)]=_0x5e61d7,this[_0x22403a(0x1dd)](),this['_initUserSync']();}[_0x2e5523(0x1e7)](){const _0x7a7ed=_0x2e5523;this[_0x7a7ed(0x1fc)](this[_0x7a7ed(0x228)][_0x7a7ed(0x1ee)][_0x7a7ed(0x252)](_0x1ee6ef[_0x7a7ed(0x1ed)](0x10))[_0x7a7ed(0x22c)](_0x3e0aa1=>{const _0x55045e=_0x7a7ed,_0x53ec8b=new Set();_0x3e0aa1[_0x55045e(0x1e2)](_0x1dbf7d=>{const _0xdbf195=_0x55045e;switch(_0x1dbf7d[_0xdbf195(0x259)]){case'add':{const _0x3b17e4=_0x1dbf7d['payload'][_0xdbf195(0x226)];_0x53ec8b[_0xdbf195(0x203)](_0x3b17e4);break;}}}),_0x220f02(this[_0x55045e(0x1e6)],_0x53ec8b);}));}[_0x2e5523(0x1dd)](){const _0x4e3b1a=_0x2e5523;this[_0x4e3b1a(0x1fc)](this['_commentService'][_0x4e3b1a(0x1ee)][_0x4e3b1a(0x22c)](async _0x293d84=>{const _0x18a3b2=_0x4e3b1a;var _0x190c72,_0x3f02d2,_0x38d541,_0x543c87;const _0x3d3d71=(_0x190c72=this['_threadCommentModel'][_0x18a3b2(0x213)](_0x293d84['unitId'])[_0x18a3b2(0x247)](_0x29268b=>_0x29268b[_0x18a3b2(0x1f1)]===_0x293d84[_0x18a3b2(0x1f1)]))==null?void 0x0:_0x190c72['root'];if(!_0x3d3d71)return;const {unitId:_0x2afd9f,subUnitId:_0x19d50f}=_0x3d3d71;switch(_0x293d84[_0x18a3b2(0x1f8)]&&this[_0x18a3b2(0x236)][_0x18a3b2(0x1fe)](_0x293d84[_0x18a3b2(0x1f8)]),_0x293d84[_0x18a3b2(0x259)]){case _0x435fff[_0x18a3b2(0x24c)]:break;case _0x435fff[_0x18a3b2(0x1d2)]:{this[_0x18a3b2(0x228)][_0x18a3b2(0x20a)](_0x2afd9f,_0x19d50f,{'unitId':_0x2afd9f,'subUnitId':_0x19d50f,'ref':'','id':_0x293d84['replyId'],'dT':_0x3d91c9(+_0x293d84['createTimestamp']),'threadId':_0x293d84['threadId'],'personId':(_0x38d541=(_0x3f02d2=_0x293d84['user'])==null?void 0x0:_0x3f02d2['userID'])!=null?_0x38d541:_0x293d84['userId'],'text':JSON[_0x18a3b2(0x1d6)](_0x293d84[_0x18a3b2(0x204)]),'parentId':_0x3d3d71['id']});break;}case _0x435fff[_0x18a3b2(0x21f)]:{const _0x4a6ff5=this[_0x18a3b2(0x228)]['getComment'](_0x2afd9f,_0x19d50f,_0x293d84[_0x18a3b2(0x245)]);_0x4a6ff5&&_0x4a6ff5['parentId']&&this['_threadCommentModel'][_0x18a3b2(0x205)](_0x2afd9f,_0x19d50f,_0x293d84['replyId']);break;}case _0x435fff[_0x18a3b2(0x24f)]:{this['_threadCommentModel'][_0x18a3b2(0x235)](_0x2afd9f,_0x19d50f,{'commentId':_0x293d84[_0x18a3b2(0x245)],'text':JSON[_0x18a3b2(0x1d6)](_0x293d84[_0x18a3b2(0x204)])});break;}case _0x435fff[_0x18a3b2(0x219)]:{const _0x3fb25b=(_0x543c87=this[_0x18a3b2(0x228)][_0x18a3b2(0x213)](_0x293d84[_0x18a3b2(0x22f)])[_0x18a3b2(0x247)](_0x62c5c5=>_0x62c5c5[_0x18a3b2(0x1f1)]===_0x293d84['threadId']))==null?void 0x0:_0x543c87['root'];_0x3fb25b&&this[_0x18a3b2(0x228)][_0x18a3b2(0x24e)](_0x2afd9f,_0x19d50f,_0x3fb25b['id'],_0x293d84[_0x18a3b2(0x249)]===_0x5380fc[_0x18a3b2(0x24d)]);break;}}}));}};_0x2f0683=_0x5e6829([_0x5e804c(0x0,_0x4332b8[_0x2e5523(0x1de)](_0x1ce484[_0x2e5523(0x1d4)])),_0x5e804c(0x1,_0x4332b8[_0x2e5523(0x1de)](_0xe1c387['ThreadCommentModel'])),_0x5e804c(0x2,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x255)])),_0x5e804c(0x3,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x21d)]))],_0x2f0683);const _0x2545e5=_0x2e5523(0x1d5),_0x5d602c={};var _0x1fdee5=Object['getOwnPropertyDescriptor'],_0x33a533=(_0x1643db,_0x2b0339,_0x127b81,_0x2f1b19)=>{for(var _0x3a81ee=_0x2f1b19>0x1?void 0x0:_0x2f1b19?_0x1fdee5(_0x2b0339,_0x127b81):_0x2b0339,_0x4d4660=_0x1643db['length']-0x1,_0x2dcc01;_0x4d4660>=0x0;_0x4d4660--)(_0x2dcc01=_0x1643db[_0x4d4660])&&(_0x3a81ee=_0x2dcc01(_0x3a81ee)||_0x3a81ee);return _0x3a81ee;},_0x2193c1=(_0x3c0f55,_0x2535ce)=>(_0x56389e,_0x185228)=>_0x2535ce(_0x56389e,_0x185228,_0x3c0f55);function _0x48e7b8(_0x49cc1e,_0x2afa1d){const _0x1b5ee6=_0x2e5523,_0xf837ef=_0x49cc1e[_0x1b5ee6(0x1fb)][0x0];return{..._0x2afa1d,'id':_0xf837ef[_0x1b5ee6(0x245)],'resolved':_0x49cc1e[_0x1b5ee6(0x249)]===0x1,'dT':_0x3d91c9(_0xf837ef['createTimestamp']),'personId':_0xf837ef[_0x1b5ee6(0x241)],'threadId':_0xf837ef['threadId']};}function _0x3670d7(_0x4d15bf,_0x5210d5,_0x352630){const _0x9fa71d=_0x2e5523;var _0x266d88,_0x1efdff;if(((_0x1efdff=(_0x266d88=_0x4d15bf==null?void 0x0:_0x4d15bf[_0x9fa71d(0x1fb)])==null?void 0x0:_0x266d88[_0x9fa71d(0x238)])!=null?_0x1efdff:0x0)>0x0){const _0x2808e2=(_0x2b3be8,_0x12910a)=>({'id':_0x2b3be8[_0x9fa71d(0x245)],'threadId':_0x2b3be8[_0x9fa71d(0x1f1)],'dT':_0x3d91c9(_0x2b3be8[_0x9fa71d(0x1d1)]),'personId':_0x2b3be8[_0x9fa71d(0x241)],'resolved':_0x4d15bf[_0x9fa71d(0x249)]===_0x5380fc['Solved'],'unitId':_0x5210d5,'subUnitId':_0x352630,'text':JSON['parse'](_0x2b3be8['content']),'parentId':_0x12910a}),_0x3599da=_0x2808e2(_0x4d15bf['replies'][0x0]);return{..._0x3599da,'children':_0x4d15bf[_0x9fa71d(0x1fb)][_0x9fa71d(0x21c)](0x1)[_0x9fa71d(0x25c)](_0x3286af=>_0x2808e2(_0x3286af,_0x3599da['id']))};}return null;}let _0x443274=class{constructor(_0x2f385f,_0x1544bd,_0x113b14,_0xd1babc){const _0x363ec6=_0x2e5523;this['_httpService']=_0x2f385f,this[_0x363ec6(0x236)]=_0x1544bd,this[_0x363ec6(0x250)]=_0x113b14,this[_0x363ec6(0x1e6)]=_0xd1babc;}async[_0x2e5523(0x20a)](_0x45e4d7){const _0x1c1dec=_0x2e5523;var _0x504f46,_0x1902f1;const {parentId:_0x184ae9,unitId:_0x4df60b,text:_0x47ad08,threadId:_0x3fb808}=_0x45e4d7,_0x55947d=(_0x1902f1=(_0x504f46=_0x47ad08[_0x1c1dec(0x23d)])==null?void 0x0:_0x504f46[_0x1c1dec(0x1e4)](_0x3bf1fe=>_0x3bf1fe[_0x1c1dec(0x243)]===_0x4332b8[_0x1c1dec(0x1fa)]['COMMENT'])['map'](_0x1acfe1=>_0x1acfe1[_0x1c1dec(0x216)]))!=null?_0x1902f1:[],_0x59739b=JSON[_0x1c1dec(0x218)](_0x47ad08),_0x3d2284=(await this[_0x1c1dec(0x250)][_0x1c1dec(0x1e9)](_0x4df60b))['getMemberID']();if(_0x184ae9){const _0x60c5cf={'memberId':_0x3d2284,'unitId':_0x4df60b,'content':_0x59739b,'mention':_0x55947d,'threadId':_0x3fb808},_0x8c1caa=(await this['_httpService'][_0x1c1dec(0x212)](_0x1c1dec(0x22a)+_0x4df60b+_0x1c1dec(0x23c),{'body':_0x60c5cf}))[_0x1c1dec(0x25b)][_0x1c1dec(0x23e)];return{..._0x45e4d7,'id':_0x8c1caa[_0x1c1dec(0x245)],'dT':_0x4332b8[_0x1c1dec(0x1d7)](+_0x8c1caa['createTimestamp'])['format'](_0x1c1dec(0x1e3)),'personId':_0x8c1caa[_0x1c1dec(0x241)]};}else{const _0x381ed1={'memberId':_0x3d2284,'unitId':_0x4df60b,'content':_0x59739b,'mention':_0x55947d},_0x3e1307=await this[_0x1c1dec(0x258)][_0x1c1dec(0x212)](_0x1c1dec(0x22a)+_0x4df60b+_0x1c1dec(0x246),{'body':_0x381ed1});return _0x48e7b8(_0x3e1307[_0x1c1dec(0x25b)][_0x1c1dec(0x230)],_0x45e4d7);}}async[_0x2e5523(0x235)](_0x459dca){const _0x11efa5=_0x2e5523;var _0x5a18bf,_0x5961c4;const {text:_0x4be02b,unitId:_0x19437d}=_0x459dca,_0x4c6b68=(_0x5961c4=(_0x5a18bf=_0x4be02b[_0x11efa5(0x23d)])==null?void 0x0:_0x5a18bf[_0x11efa5(0x1e4)](_0x540fce=>_0x540fce['rangeType']===_0x4332b8['CustomRangeType'][_0x11efa5(0x224)])[_0x11efa5(0x25c)](_0x4281b4=>_0x4281b4[_0x11efa5(0x216)]))!=null?_0x5961c4:[],_0x9e5c3a=JSON[_0x11efa5(0x218)](_0x4be02b),_0x1233b8=_0x459dca['threadId'],_0x1cdae9=_0x459dca['id'],_0xde1cd={'memberId':(await this[_0x11efa5(0x250)][_0x11efa5(0x1e9)](_0x19437d))['getMemberID'](),'unitId':_0x19437d,'threadId':_0x1233b8,'mention':_0x4c6b68,'content':_0x9e5c3a,'replyId':_0x1cdae9},_0x30a2b7=await this[_0x11efa5(0x258)]['post']('/universer-api/comment/unit/'+_0x19437d+_0x11efa5(0x1f3),{'body':_0xde1cd});return!_0x30a2b7[_0x11efa5(0x25b)][_0x11efa5(0x239)]||_0x30a2b7[_0x11efa5(0x25b)][_0x11efa5(0x239)][_0x11efa5(0x1d3)]===0x1;}async['resolveComment'](_0x1117aa){const _0x16cf27=_0x2e5523,{unitId:_0x28b102}=_0x1117aa,_0x1d7109=_0x1117aa[_0x16cf27(0x1f1)],_0x85d7c3={'memberId':this[_0x16cf27(0x236)]['getCurrentUser']()[_0x16cf27(0x1f5)],'unitId':_0x28b102,'threadId':_0x1d7109,'solved':_0x1117aa[_0x16cf27(0x20d)]?_0x5380fc['Solved']:_0x5380fc[_0x16cf27(0x21b)]},_0x2ff781=await this[_0x16cf27(0x258)][_0x16cf27(0x212)](_0x16cf27(0x22a)+_0x28b102+_0x16cf27(0x242),{'body':_0x85d7c3});return!_0x2ff781[_0x16cf27(0x25b)][_0x16cf27(0x239)]||_0x2ff781['body'][_0x16cf27(0x239)][_0x16cf27(0x1d3)]===0x1;}async[_0x2e5523(0x205)](_0x51535b,_0x19a57f,_0x3df49b,_0x420a2d){const _0x1460b1=_0x2e5523,_0x2a06fb={'memberId':(await this[_0x1460b1(0x250)]['requireSession'](_0x51535b))[_0x1460b1(0x1e0)](),'threadId':_0x3df49b,'replyId':_0x420a2d,'unitId':_0x51535b},_0x3bda9c=await this[_0x1460b1(0x258)][_0x1460b1(0x212)](_0x1460b1(0x22a)+_0x51535b+_0x1460b1(0x248),{'body':_0x2a06fb});return!_0x3bda9c['body']['error']||_0x3bda9c[_0x1460b1(0x25b)][_0x1460b1(0x239)][_0x1460b1(0x1d3)]===0x1;}async[_0x2e5523(0x23a)](_0x3a38eb,_0x434cb5,_0x3e0132){const _0x3bb418=_0x2e5523,_0x4d7d0e={'unitId':_0x3a38eb,'threadId':_0x3e0132},_0x5176be=await this[_0x3bb418(0x258)][_0x3bb418(0x212)](_0x3bb418(0x22a)+_0x3a38eb+_0x3bb418(0x232),{'body':_0x4d7d0e}),_0x269953=_0x3e0132[_0x3bb418(0x25c)](_0x5144d1=>_0x3670d7(_0x5176be[_0x3bb418(0x25b)][_0x3bb418(0x244)][_0x5144d1],_0x3a38eb,_0x434cb5))[_0x3bb418(0x1e4)](Boolean);return Object[_0x3bb418(0x214)](_0x5176be['body'][_0x3bb418(0x1db)])[_0x3bb418(0x1e2)](_0x5632b0=>{const _0x107b59=_0x3bb418;this[_0x107b59(0x236)][_0x107b59(0x1fe)](_0x5632b0);}),_0x269953;}[_0x2e5523(0x1eb)](_0x2499db){const _0x2e446c=_0x2e5523;return{'id':_0x2499db['id'],'threadId':_0x2499db[_0x2e446c(0x1f1)],'ref':_0x2499db[_0x2e446c(0x1d8)]};}};_0x443274=_0x33a533([_0x2193c1(0x0,_0x4332b8[_0x2e5523(0x1de)](_0x226f1a[_0x2e5523(0x207)])),_0x2193c1(0x1,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8['UserManagerService'])),_0x2193c1(0x2,_0x4332b8[_0x2e5523(0x1de)](_0x1ce484[_0x2e5523(0x210)])),_0x2193c1(0x3,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x21d)]))],_0x443274);var _0x4aa720=Object[_0x2e5523(0x1e5)],_0x582c88=(_0x1033cd,_0x1fed1d,_0x28c1d7,_0x263b65)=>{const _0x4c618c=_0x2e5523;for(var _0x1f9b08=_0x263b65>0x1?void 0x0:_0x263b65?_0x4aa720(_0x1fed1d,_0x28c1d7):_0x1fed1d,_0x55577d=_0x1033cd[_0x4c618c(0x238)]-0x1,_0x4b9999;_0x55577d>=0x0;_0x55577d--)(_0x4b9999=_0x1033cd[_0x55577d])&&(_0x1f9b08=_0x4b9999(_0x1f9b08)||_0x1f9b08);return _0x1f9b08;},_0x2af97d=(_0x3e69d0,_0xd992e)=>(_0x3f1863,_0x370fba)=>_0xd992e(_0x3f1863,_0x370fba,_0x3e69d0);let _0x5ddf11=class extends _0x4332b8[_0x2e5523(0x201)]{constructor(_0x4fead4,_0x3ef163){const _0x51556f=_0x2e5523;super(),this['_threadCommentDataSourceService']=_0x4fead4,this[_0x51556f(0x221)]=_0x3ef163,this[_0x51556f(0x209)]();}[_0x2e5523(0x209)](){const _0x25c4fe=_0x2e5523;this[_0x25c4fe(0x21e)]['dataSource']=this[_0x25c4fe(0x221)],this[_0x25c4fe(0x21e)][_0x25c4fe(0x1f6)]=!0x1;}};_0x5ddf11=_0x582c88([_0x2af97d(0x0,_0xe1c387[_0x2e5523(0x1f4)]),_0x2af97d(0x1,_0x4332b8['Inject'](_0x443274))],_0x5ddf11);var _0x4b310d=Object[_0x2e5523(0x231)],_0x22014a=Object[_0x2e5523(0x1e5)],_0xde7e94=(_0x588c7d,_0x256bd8,_0x1be3e9)=>_0x256bd8 in _0x588c7d?_0x4b310d(_0x588c7d,_0x256bd8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1be3e9}):_0x588c7d[_0x256bd8]=_0x1be3e9,_0x5247a9=(_0x23a542,_0x18468b,_0x202410,_0x11451f)=>{for(var _0x1edb97=_0x11451f>0x1?void 0x0:_0x11451f?_0x22014a(_0x18468b,_0x202410):_0x18468b,_0x40d16c=_0x23a542['length']-0x1,_0xc389b4;_0x40d16c>=0x0;_0x40d16c--)(_0xc389b4=_0x23a542[_0x40d16c])&&(_0x1edb97=_0xc389b4(_0x1edb97)||_0x1edb97);return _0x1edb97;},_0x5af191=(_0x23f431,_0x2e6f1b)=>(_0x4122db,_0xb3cad9)=>_0x2e6f1b(_0x4122db,_0xb3cad9,_0x23f431),_0x26a5af=(_0x38f95c,_0x114aad,_0x3bb971)=>_0xde7e94(_0x38f95c,typeof _0x114aad!=_0x2e5523(0x1d9)?_0x114aad+'':_0x114aad,_0x3bb971);_0x3a6cfc[_0x2e5523(0x25a)]=class extends _0x4332b8[_0x2e5523(0x21a)]{constructor(_0x436e89=_0x5d602c,_0x4a448d,_0x2578c6){const _0x4cf01c=_0x2e5523;super(),this[_0x4cf01c(0x23f)]=_0x436e89,this['_injector']=_0x4a448d,this[_0x4cf01c(0x1df)]=_0x2578c6;const {..._0x53bf39}=_0x4332b8[_0x4cf01c(0x233)]({},_0x5d602c,this[_0x4cf01c(0x23f)]);this[_0x4cf01c(0x1df)][_0x4cf01c(0x24a)](_0x2545e5,_0x53bf39);}[_0x2e5523(0x1f7)](){[[_0x443274],[_0x5ddf11],[_0x2f0683]]['forEach'](_0x1e80fe=>{const _0xa0df8e=_0x555a;this['_injector'][_0xa0df8e(0x203)](_0x1e80fe);});}[_0x2e5523(0x227)](){const _0x2d75c8=_0x2e5523;this[_0x2d75c8(0x1e6)][_0x2d75c8(0x1f0)](_0x5ddf11),this[_0x2d75c8(0x1e6)][_0x2d75c8(0x1f0)](_0x2f0683);}},_0x26a5af(_0x3a6cfc[_0x2e5523(0x25a)],_0x2e5523(0x1da),_0x499ff3),_0x26a5af(_0x3a6cfc['UniverThreadCommentDataSourcePlugin'],'type',_0x4332b8[_0x2e5523(0x208)][_0x2e5523(0x257)]),_0x3a6cfc[_0x2e5523(0x25a)]=_0x5247a9([_0x4332b8[_0x2e5523(0x222)](_0x3a429e[_0x2e5523(0x220)],_0x1ce484[_0x2e5523(0x1dc)],_0x33deaf[_0x2e5523(0x240)]),_0x5af191(0x1,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x21d)])),_0x5af191(0x2,_0x4332b8[_0x2e5523(0x1ea)])],_0x3a6cfc[_0x2e5523(0x25a)]),Object['defineProperty'](_0x3a6cfc,Symbol[_0x2e5523(0x23b)],{'value':_0x2e5523(0x200)});}));function _0x2f8c(){const _0x3abedd=['getUnit','values','6366tAiJLG','rangeId','UniverCore','stringify','Solve','Plugin','OpenOrReOpen','slice','Injector','_threadCommentDataSourceService','Delete','UniverThreadCommentUIPlugin','_threadCommentDataSource','DependentOn','133nGicem','COMMENT','format','personId','onReady','_threadCommentModel','amd','/universer-api/comment/unit/','14216463SIcsZM','subscribe','@univerjs-pro/license','66057FkiolB','unitId','comment','defineProperty','/list','merge','getUser','updateComment','_userService','200veIlvc','length','error','listComments','toStringTag','/reply','customRanges','reply','_config','UniverLicensePlugin','userId','/solved','rangeType','comments','replyId','/add','find','/delete','solved','setConfig','exports','Add','Solved','resolveComment','Edit','_sessionService','size','pipe','function','UniverNetwork','UserManagerService','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','_httpService','type','UniverThreadCommentDataSourcePlugin','body','map','createTimestamp','Reply','code','CommentService','thread-comment-data-source.config','parse','dayjs','ref','symbol','pluginName','users','UniverCollaborationClientPlugin','_init','Inject','_configService','getMemberID','@univerjs/thread-comment-ui','forEach','YYYY/MM/DD\x20HH:mm','filter','getOwnPropertyDescriptor','_injector','_initUserSync','UniverProCollaborationClient','requireSession','IConfigService','saveCommentToSnapshot','1447205OxQjCu','bufferTime','commentUpdate$','@univerjs/network','get','threadId','53619160JuDaTI','/edit','IThreadCommentDataSourceService','userID','syncUpdateMutationToColla','onStarting','user','@univerjs/thread-comment','CustomRangeType','replies','disposeWithMe','delete','addUser','1260905OFsfTI','Module','Disposable','UniverProLicense','add','content','deleteComment','Unknown','HTTPService','UniverInstanceType','_initDataSource','addComment','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','1271712CKSwVF','2JYcbbQ','CollaborationSessionService','rxjs','post'];_0x2f8c=function(){return _0x3abedd;};return _0x2f8c();}
|
|
1
|
+
function _0x4164(_0x2d82ec,_0x4c07b6){const _0x1fe063=_0x1fe0();return _0x4164=function(_0x416457,_0x405841){_0x416457=_0x416457-0x65;let _0x10e41c=_0x1fe063[_0x416457];return _0x10e41c;},_0x4164(_0x2d82ec,_0x4c07b6);}(function(_0x4b2b50,_0x151460){const _0x533c98=_0x4164,_0x40f6fa=_0x4b2b50();while(!![]){try{const _0x349ba4=-parseInt(_0x533c98(0xe6))/0x1*(parseInt(_0x533c98(0xd3))/0x2)+-parseInt(_0x533c98(0xbc))/0x3*(parseInt(_0x533c98(0x98))/0x4)+parseInt(_0x533c98(0x9e))/0x5*(-parseInt(_0x533c98(0xd6))/0x6)+parseInt(_0x533c98(0x68))/0x7+-parseInt(_0x533c98(0xbe))/0x8*(-parseInt(_0x533c98(0xb8))/0x9)+parseInt(_0x533c98(0xc5))/0xa+parseInt(_0x533c98(0x9c))/0xb;if(_0x349ba4===_0x151460)break;else _0x40f6fa['push'](_0x40f6fa['shift']());}catch(_0x36014b){_0x40f6fa['push'](_0x40f6fa['shift']());}}}(_0x1fe0,0x8116f),function(_0x1eed9d,_0x2880dd){const _0x2de457=_0x4164;typeof exports==_0x2de457(0xc8)&&typeof module<'u'?_0x2880dd(exports,require(_0x2de457(0xa0)),require(_0x2de457(0x69)),require(_0x2de457(0x92)),require(_0x2de457(0x6c)),require('@univerjs/thread-comment'),require(_0x2de457(0xf0)),require(_0x2de457(0x83))):typeof define==_0x2de457(0xad)&&define[_0x2de457(0x84)]?define([_0x2de457(0x9d),_0x2de457(0xa0),'@univerjs-pro/license','@univerjs/core',_0x2de457(0x6c),_0x2de457(0x90),'rxjs',_0x2de457(0x83)],_0x2880dd):(_0x1eed9d=typeof globalThis<'u'?globalThis:_0x1eed9d||self,_0x2880dd(_0x1eed9d[_0x2de457(0xcb)]={},_0x1eed9d[_0x2de457(0x9f)],_0x1eed9d[_0x2de457(0xd5)],_0x1eed9d['UniverCore'],_0x1eed9d[_0x2de457(0xa3)],_0x1eed9d[_0x2de457(0xef)],_0x1eed9d['rxjs'],_0x1eed9d[_0x2de457(0x67)]));}(this,function(_0x323bde,_0x4d3d6b,_0x543dec,_0x394557,_0x30fdc7,_0x4ed6f0,_0x3ff968,_0x1d250c){'use strict';const _0x205072=_0x4164;const _0x989351=_0x205072(0x77);var _0x13a704=(_0x4a6617=>(_0x4a6617[_0x4a6617['OpenOrReOpen']=0x0]=_0x205072(0xcd),_0x4a6617[_0x4a6617[_0x205072(0xaa)]=0x1]=_0x205072(0xaa),_0x4a6617[_0x4a6617[_0x205072(0x91)]=-0x1]=_0x205072(0x91),_0x4a6617))(_0x13a704||{}),_0x19e2d3=(_0x5154ea=>(_0x5154ea[_0x5154ea['Unknown']=0x0]=_0x205072(0xcf),_0x5154ea[_0x5154ea['Add']=0x1]=_0x205072(0x73),_0x5154ea[_0x5154ea[_0x205072(0x9b)]=0x2]=_0x205072(0x9b),_0x5154ea[_0x5154ea[_0x205072(0xb5)]=0x3]=_0x205072(0xb5),_0x5154ea[_0x5154ea[_0x205072(0xe8)]=0x4]=_0x205072(0xe8),_0x5154ea[_0x5154ea[_0x205072(0x89)]=0x5]=_0x205072(0x89),_0x5154ea[_0x5154ea[_0x205072(0x91)]=-0x1]=_0x205072(0x91),_0x5154ea))(_0x19e2d3||{});const _0x2cdef5=_0x5be655=>_0x394557[_0x205072(0x6f)](new Date(+_0x5be655))[_0x205072(0xe1)](_0x205072(0xe0)),_0x3f1a1f=async(_0x5683f2,_0x1b533b)=>{const _0x438ed8=_0x205072,_0x32d074=_0x5683f2['get'](_0x394557[_0x438ed8(0xc7)]),_0x386814=_0x5683f2[_0x438ed8(0xcc)](_0x1d250c[_0x438ed8(0x8b)]);_0x1b533b[_0x438ed8(0xdd)](_0x5ee1c6=>{const _0x34827d=_0x438ed8;_0x32d074[_0x34827d(0x7d)](_0x5ee1c6)&&_0x1b533b[_0x34827d(0x74)](_0x5ee1c6);}),_0x1b533b['size']&&(await _0x386814[_0x438ed8(0xcc)](_0x438ed8(0xa9),{'params':{'userIDs':[..._0x1b533b]}}))[_0x438ed8(0x7b)][_0x438ed8(0x94)]['forEach'](_0x183e07=>{const _0x3fed56=_0x438ed8;_0x183e07&&_0x32d074[_0x3fed56(0x97)](_0x183e07);});};var _0x48767a=Object[_0x205072(0x78)],_0x304182=(_0x3b1a36,_0x572933,_0xff954d,_0x3d3939)=>{const _0x2435d5=_0x205072;for(var _0x4f7ae7=_0x3d3939>0x1?void 0x0:_0x3d3939?_0x48767a(_0x572933,_0xff954d):_0x572933,_0x115f83=_0x3b1a36[_0x2435d5(0xa4)]-0x1,_0x358789;_0x115f83>=0x0;_0x115f83--)(_0x358789=_0x3b1a36[_0x115f83])&&(_0x4f7ae7=_0x358789(_0x4f7ae7)||_0x4f7ae7);return _0x4f7ae7;},_0x2b76a3=(_0x4be5db,_0x38b2e1)=>(_0x5b6c7d,_0x363380)=>_0x38b2e1(_0x5b6c7d,_0x363380,_0x4be5db);let _0x11293b=class extends _0x394557['Disposable']{constructor(_0x30794,_0x421884,_0x32ee9b,_0x1b0ebc){const _0x18b0ce=_0x205072;super(),this['_commentService']=_0x30794,this[_0x18b0ce(0xba)]=_0x421884,this[_0x18b0ce(0xa8)]=_0x32ee9b,this['_injector']=_0x1b0ebc,this[_0x18b0ce(0xc6)](),this[_0x18b0ce(0x87)]();}[_0x205072(0x87)](){const _0x3bbf19=_0x205072;this[_0x3bbf19(0xc3)](this[_0x3bbf19(0xba)][_0x3bbf19(0xbb)][_0x3bbf19(0xd2)](_0x3ff968['bufferTime'](0x10))[_0x3bbf19(0x7f)](_0x19d627=>{const _0x1726f5=_0x3bbf19,_0x7e0db0=new Set();_0x19d627[_0x1726f5(0xdd)](_0xf289cc=>{const _0x4b189f=_0x1726f5;switch(_0xf289cc[_0x4b189f(0xd0)]){case'add':{const _0x577978=_0xf289cc[_0x4b189f(0xd7)]['personId'];_0x7e0db0['add'](_0x577978);break;}}}),_0x3f1a1f(this[_0x1726f5(0xeb)],_0x7e0db0);}));}['_init'](){const _0x115a66=_0x205072;this[_0x115a66(0xc3)](this[_0x115a66(0xc4)][_0x115a66(0xbb)]['subscribe'](async _0x561762=>{const _0x50a1d1=_0x115a66;var _0x310d5e,_0x4fd85,_0x4ea511,_0x5ef2d6;const _0x3a7fe2=(_0x310d5e=this[_0x50a1d1(0xba)]['getUnit'](_0x561762[_0x50a1d1(0xbd)])[_0x50a1d1(0x88)](_0x5828b8=>_0x5828b8[_0x50a1d1(0xa1)]===_0x561762[_0x50a1d1(0xa1)]))==null?void 0x0:_0x310d5e[_0x50a1d1(0x8e)];if(!_0x3a7fe2)return;const {unitId:_0x20fa8c,subUnitId:_0x3f12e9}=_0x3a7fe2;switch(_0x561762[_0x50a1d1(0xb2)]&&this[_0x50a1d1(0xa8)][_0x50a1d1(0x97)](_0x561762[_0x50a1d1(0xb2)]),_0x561762[_0x50a1d1(0xd0)]){case _0x19e2d3['Add']:break;case _0x19e2d3['Reply']:{this['_threadCommentModel'][_0x50a1d1(0x85)](_0x20fa8c,_0x3f12e9,{'unitId':_0x20fa8c,'subUnitId':_0x3f12e9,'ref':'','id':_0x561762[_0x50a1d1(0xe3)],'dT':_0x2cdef5(+_0x561762[_0x50a1d1(0x9a)]),'threadId':_0x561762[_0x50a1d1(0xa1)],'personId':(_0x4ea511=(_0x4fd85=_0x561762[_0x50a1d1(0xb2)])==null?void 0x0:_0x4fd85[_0x50a1d1(0xec)])!=null?_0x4ea511:_0x561762[_0x50a1d1(0x72)],'text':JSON[_0x50a1d1(0xb3)](_0x561762[_0x50a1d1(0x6e)]),'parentId':_0x3a7fe2['id']});break;}case _0x19e2d3[_0x50a1d1(0xe8)]:{const _0x148dc3=this[_0x50a1d1(0xba)][_0x50a1d1(0xaf)](_0x20fa8c,_0x3f12e9,_0x561762['replyId']);_0x148dc3&&_0x148dc3[_0x50a1d1(0xee)]&&this['_threadCommentModel'][_0x50a1d1(0x86)](_0x20fa8c,_0x3f12e9,_0x561762[_0x50a1d1(0xe3)]);break;}case _0x19e2d3['Edit']:{this[_0x50a1d1(0xba)][_0x50a1d1(0xc0)](_0x20fa8c,_0x3f12e9,{'commentId':_0x561762[_0x50a1d1(0xe3)],'text':JSON['parse'](_0x561762['content'])});break;}case _0x19e2d3['Solve']:{const _0x28c3e4=(_0x5ef2d6=this['_threadCommentModel'][_0x50a1d1(0xe7)](_0x561762[_0x50a1d1(0xbd)])['find'](_0x249fad=>_0x249fad[_0x50a1d1(0xa1)]===_0x561762[_0x50a1d1(0xa1)]))==null?void 0x0:_0x5ef2d6['root'];_0x28c3e4&&this['_threadCommentModel'][_0x50a1d1(0xb0)](_0x20fa8c,_0x3f12e9,_0x28c3e4['id'],_0x561762[_0x50a1d1(0x65)]===_0x13a704['Solved']);break;}}}));}};_0x11293b=_0x304182([_0x2b76a3(0x0,_0x394557[_0x205072(0xb9)](_0x4d3d6b[_0x205072(0x99)])),_0x2b76a3(0x1,_0x394557[_0x205072(0xb9)](_0x4ed6f0[_0x205072(0x70)])),_0x2b76a3(0x2,_0x394557[_0x205072(0xb9)](_0x394557[_0x205072(0xc7)])),_0x2b76a3(0x3,_0x394557['Inject'](_0x394557[_0x205072(0x7e)]))],_0x11293b);const _0x154246=_0x205072(0x82),_0x312504={};var _0x495b20=Object[_0x205072(0x78)],_0xf59fd7=(_0x51eedf,_0x35bd64,_0x44c174,_0xc14794)=>{const _0x423b82=_0x205072;for(var _0x5a4b6a=_0xc14794>0x1?void 0x0:_0xc14794?_0x495b20(_0x35bd64,_0x44c174):_0x35bd64,_0x1b94b3=_0x51eedf[_0x423b82(0xa4)]-0x1,_0x396d41;_0x1b94b3>=0x0;_0x1b94b3--)(_0x396d41=_0x51eedf[_0x1b94b3])&&(_0x5a4b6a=_0x396d41(_0x5a4b6a)||_0x5a4b6a);return _0x5a4b6a;},_0x556675=(_0x1aad2e,_0x4ec42e)=>(_0x328f84,_0x211531)=>_0x4ec42e(_0x328f84,_0x211531,_0x1aad2e);function _0x4e00d0(_0x18041c,_0x4586ff){const _0x39bc79=_0x205072,_0x3bd5cd=_0x18041c[_0x39bc79(0x8d)][0x0];return{..._0x4586ff,'id':_0x3bd5cd['replyId'],'resolved':_0x18041c[_0x39bc79(0x65)]===0x1,'dT':_0x2cdef5(_0x3bd5cd[_0x39bc79(0x9a)]),'personId':_0x3bd5cd[_0x39bc79(0x72)],'threadId':_0x3bd5cd[_0x39bc79(0xa1)]};}function _0x2c7e5a(_0xff57d6,_0x2a989f,_0x5f3601){const _0x113993=_0x205072;var _0x99938a,_0x31ce4f;if(((_0x31ce4f=(_0x99938a=_0xff57d6==null?void 0x0:_0xff57d6['replies'])==null?void 0x0:_0x99938a[_0x113993(0xa4)])!=null?_0x31ce4f:0x0)>0x0){const _0x197652=(_0x1d017a,_0x19390d)=>({'id':_0x1d017a[_0x113993(0xe3)],'threadId':_0x1d017a[_0x113993(0xa1)],'dT':_0x2cdef5(_0x1d017a['createTimestamp']),'personId':_0x1d017a[_0x113993(0x72)],'resolved':_0xff57d6[_0x113993(0x65)]===_0x13a704[_0x113993(0xaa)],'unitId':_0x2a989f,'subUnitId':_0x5f3601,'text':JSON[_0x113993(0xb3)](_0x1d017a[_0x113993(0x6e)]),'parentId':_0x19390d}),_0x28aecc=_0x197652(_0xff57d6[_0x113993(0x8d)][0x0]);return{..._0x28aecc,'children':_0xff57d6[_0x113993(0x8d)]['slice'](0x1)[_0x113993(0xca)](_0xa2e3ff=>_0x197652(_0xa2e3ff,_0x28aecc['id']))};}return null;}let _0x4a6c43=class{constructor(_0x4b926b,_0x304e37,_0x3adfb8,_0x45255c){const _0x132464=_0x205072;this[_0x132464(0x7c)]=_0x4b926b,this[_0x132464(0xa8)]=_0x304e37,this[_0x132464(0x96)]=_0x3adfb8,this['_injector']=_0x45255c;}async[_0x205072(0x85)](_0x9e62ba){const _0x23f7c5=_0x205072;var _0x296ef8,_0x1e871e;const {parentId:_0x37d09d,unitId:_0x459ab3,text:_0x4674f7,threadId:_0x37bab9}=_0x9e62ba,_0x2ae0ba=(_0x1e871e=(_0x296ef8=_0x4674f7['customRanges'])==null?void 0x0:_0x296ef8[_0x23f7c5(0x6b)](_0x35281d=>_0x35281d['rangeType']===_0x394557['CustomRangeType'][_0x23f7c5(0xe9)])[_0x23f7c5(0xca)](_0xdf2e5d=>_0xdf2e5d[_0x23f7c5(0x7a)]))!=null?_0x1e871e:[],_0x408576=JSON[_0x23f7c5(0xb4)](_0x4674f7),_0x28147e=(await this[_0x23f7c5(0x96)][_0x23f7c5(0xa5)](_0x459ab3))[_0x23f7c5(0xab)]();if(_0x37d09d){const _0x173391={'memberId':_0x28147e,'unitId':_0x459ab3,'content':_0x408576,'mention':_0x2ae0ba,'threadId':_0x37bab9},_0x542194=(await this[_0x23f7c5(0x7c)][_0x23f7c5(0xc2)]('/universer-api/comment/unit/'+_0x459ab3+'/reply',{'body':_0x173391}))[_0x23f7c5(0x7b)][_0x23f7c5(0x79)];return{..._0x9e62ba,'id':_0x542194['replyId'],'dT':_0x394557[_0x23f7c5(0x6f)](+_0x542194['createTimestamp'])['format'](_0x23f7c5(0xe0)),'personId':_0x542194[_0x23f7c5(0x72)]};}else{const _0x3d11b1={'memberId':_0x28147e,'unitId':_0x459ab3,'content':_0x408576,'mention':_0x2ae0ba},_0x36fb2a=await this[_0x23f7c5(0x7c)][_0x23f7c5(0xc2)](_0x23f7c5(0x8c)+_0x459ab3+_0x23f7c5(0xc9),{'body':_0x3d11b1});return _0x4e00d0(_0x36fb2a[_0x23f7c5(0x7b)][_0x23f7c5(0x6d)],_0x9e62ba);}}async[_0x205072(0xc0)](_0x59de14){const _0x43ca18=_0x205072;var _0x3ee104,_0x2e7d3e;const {text:_0x2bcb53,unitId:_0x144924}=_0x59de14,_0x45be27=(_0x2e7d3e=(_0x3ee104=_0x2bcb53[_0x43ca18(0x71)])==null?void 0x0:_0x3ee104[_0x43ca18(0x6b)](_0xbb45ae=>_0xbb45ae[_0x43ca18(0xa2)]===_0x394557[_0x43ca18(0xb6)][_0x43ca18(0xe9)])[_0x43ca18(0xca)](_0x235556=>_0x235556['rangeId']))!=null?_0x2e7d3e:[],_0x3546ce=JSON['stringify'](_0x2bcb53),_0x20acca=_0x59de14[_0x43ca18(0xa1)],_0xaea9d7=_0x59de14['id'],_0x13797a={'memberId':(await this[_0x43ca18(0x96)][_0x43ca18(0xa5)](_0x144924))[_0x43ca18(0xab)](),'unitId':_0x144924,'threadId':_0x20acca,'mention':_0x45be27,'content':_0x3546ce,'replyId':_0xaea9d7},_0x2d9906=await this[_0x43ca18(0x7c)][_0x43ca18(0xc2)](_0x43ca18(0x8c)+_0x144924+_0x43ca18(0xae),{'body':_0x13797a});return!_0x2d9906[_0x43ca18(0x7b)][_0x43ca18(0xd9)]||_0x2d9906[_0x43ca18(0x7b)][_0x43ca18(0xd9)][_0x43ca18(0xb1)]===0x1;}async['resolveComment'](_0xae4502){const _0x6f07e7=_0x205072,{unitId:_0x422860}=_0xae4502,_0x59e02a=_0xae4502[_0x6f07e7(0xa1)],_0x16f72a={'memberId':this[_0x6f07e7(0xa8)][_0x6f07e7(0xdf)]()['userID'],'unitId':_0x422860,'threadId':_0x59e02a,'solved':_0xae4502[_0x6f07e7(0xac)]?_0x13a704[_0x6f07e7(0xaa)]:_0x13a704[_0x6f07e7(0xcd)]},_0x132bb2=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x422860+_0x6f07e7(0xb7),{'body':_0x16f72a});return!_0x132bb2[_0x6f07e7(0x7b)]['error']||_0x132bb2[_0x6f07e7(0x7b)]['error']['code']===0x1;}async['deleteComment'](_0x15b2e0,_0x5d1ec8,_0x23d1da,_0x624d6e){const _0x5d2b74=_0x205072,_0x50dfbf={'memberId':(await this['_sessionService'][_0x5d2b74(0xa5)](_0x15b2e0))[_0x5d2b74(0xab)](),'threadId':_0x23d1da,'replyId':_0x624d6e,'unitId':_0x15b2e0},_0x5418d8=await this[_0x5d2b74(0x7c)][_0x5d2b74(0xc2)](_0x5d2b74(0x8c)+_0x15b2e0+_0x5d2b74(0xc1),{'body':_0x50dfbf});return!_0x5418d8[_0x5d2b74(0x7b)][_0x5d2b74(0xd9)]||_0x5418d8['body'][_0x5d2b74(0xd9)]['code']===0x1;}async['listComments'](_0x28c0fa,_0x4b1cd3,_0x2e8c14){const _0xe5ea49=_0x205072,_0x5331fd={'unitId':_0x28c0fa,'threadId':_0x2e8c14},_0x5be7a3=await this['_httpService']['post'](_0xe5ea49(0x8c)+_0x28c0fa+_0xe5ea49(0xd1),{'body':_0x5331fd}),_0x40a748=_0x2e8c14[_0xe5ea49(0xca)](_0x1388f7=>_0x2c7e5a(_0x5be7a3[_0xe5ea49(0x7b)]['comments'][_0x1388f7],_0x28c0fa,_0x4b1cd3))[_0xe5ea49(0x6b)](Boolean);return Object[_0xe5ea49(0xde)](_0x5be7a3['body'][_0xe5ea49(0x94)])[_0xe5ea49(0xdd)](_0x594bee=>{const _0x17c9be=_0xe5ea49;this[_0x17c9be(0xa8)]['addUser'](_0x594bee);}),_0x40a748;}[_0x205072(0xa6)](_0x59068d){const _0x91502f=_0x205072;return{'id':_0x59068d['id'],'threadId':_0x59068d[_0x91502f(0xa1)],'ref':_0x59068d[_0x91502f(0xea)]};}};_0x4a6c43=_0xf59fd7([_0x556675(0x0,_0x394557[_0x205072(0xb9)](_0x1d250c['HTTPService'])),_0x556675(0x1,_0x394557[_0x205072(0xb9)](_0x394557[_0x205072(0xc7)])),_0x556675(0x2,_0x394557[_0x205072(0xb9)](_0x4d3d6b[_0x205072(0xd8)])),_0x556675(0x3,_0x394557[_0x205072(0xb9)](_0x394557[_0x205072(0x7e)]))],_0x4a6c43);var _0x5c2b3a=Object[_0x205072(0x78)],_0x5ec2b4=(_0x294f73,_0x13c760,_0x549286,_0x5b2b83)=>{const _0x4b5567=_0x205072;for(var _0x141805=_0x5b2b83>0x1?void 0x0:_0x5b2b83?_0x5c2b3a(_0x13c760,_0x549286):_0x13c760,_0x5722d6=_0x294f73[_0x4b5567(0xa4)]-0x1,_0x599558;_0x5722d6>=0x0;_0x5722d6--)(_0x599558=_0x294f73[_0x5722d6])&&(_0x141805=_0x599558(_0x141805)||_0x141805);return _0x141805;},_0x23f8e6=(_0x405ee7,_0x4c535c)=>(_0x104b6e,_0x1a8665)=>_0x4c535c(_0x104b6e,_0x1a8665,_0x405ee7);let _0x325eaa=class extends _0x394557['Disposable']{constructor(_0x5f417e,_0x4ebb90){const _0x198d09=_0x205072;super(),this['_threadCommentDataSourceService']=_0x5f417e,this[_0x198d09(0x80)]=_0x4ebb90,this[_0x198d09(0xdc)]();}['_initDataSource'](){const _0x472cb2=_0x205072;this[_0x472cb2(0x8f)][_0x472cb2(0xe5)]=this[_0x472cb2(0x80)],this['_threadCommentDataSourceService'][_0x472cb2(0x8a)]=!0x1;}};_0x325eaa=_0x5ec2b4([_0x23f8e6(0x0,_0x4ed6f0[_0x205072(0xa7)]),_0x23f8e6(0x1,_0x394557['Inject'](_0x4a6c43))],_0x325eaa);var _0x27c8e8=Object[_0x205072(0xd4)],_0x379c17=Object[_0x205072(0x78)],_0x24a62e=(_0x475855,_0x43ff36,_0x528c19)=>_0x43ff36 in _0x475855?_0x27c8e8(_0x475855,_0x43ff36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x528c19}):_0x475855[_0x43ff36]=_0x528c19,_0x3b5900=(_0x1f36c8,_0x389a89,_0x53e238,_0xa10a3b)=>{const _0x1c7f12=_0x205072;for(var _0x3f4fe0=_0xa10a3b>0x1?void 0x0:_0xa10a3b?_0x379c17(_0x389a89,_0x53e238):_0x389a89,_0x595980=_0x1f36c8[_0x1c7f12(0xa4)]-0x1,_0x5c881c;_0x595980>=0x0;_0x595980--)(_0x5c881c=_0x1f36c8[_0x595980])&&(_0x3f4fe0=_0x5c881c(_0x3f4fe0)||_0x3f4fe0);return _0x3f4fe0;},_0x2b273f=(_0x3ed987,_0x11afda)=>(_0x56d209,_0x531e4b)=>_0x11afda(_0x56d209,_0x531e4b,_0x3ed987),_0x2ad8d4=(_0x323d42,_0x39244b,_0x5b6de0)=>_0x24a62e(_0x323d42,typeof _0x39244b!=_0x205072(0xda)?_0x39244b+'':_0x39244b,_0x5b6de0);_0x323bde[_0x205072(0x76)]=class extends _0x394557['Plugin']{constructor(_0x589f4d=_0x312504,_0x28b0df,_0x41792b){const _0xace6c4=_0x205072;super(),this[_0xace6c4(0xe2)]=_0x589f4d,this[_0xace6c4(0xeb)]=_0x28b0df,this[_0xace6c4(0x66)]=_0x41792b;const {..._0x1f9416}=_0x394557[_0xace6c4(0x93)]({},_0x312504,this['_config']);this[_0xace6c4(0x66)][_0xace6c4(0xbf)](_0x154246,_0x1f9416);}['onStarting'](){const _0xcb9256=_0x205072;[[_0x4a6c43],[_0x325eaa],[_0x11293b]][_0xcb9256(0xdd)](_0x3adde9=>{const _0x41bb4e=_0xcb9256;this[_0x41bb4e(0xeb)][_0x41bb4e(0xed)](_0x3adde9);});}[_0x205072(0xe4)](){const _0x13855d=_0x205072;this[_0x13855d(0xeb)][_0x13855d(0xcc)](_0x325eaa),this[_0x13855d(0xeb)][_0x13855d(0xcc)](_0x11293b);}},_0x2ad8d4(_0x323bde['UniverThreadCommentDataSourcePlugin'],_0x205072(0x95),_0x989351),_0x2ad8d4(_0x323bde[_0x205072(0x76)],'type',_0x394557['UniverInstanceType'][_0x205072(0xf1)]),_0x323bde[_0x205072(0x76)]=_0x3b5900([_0x394557['DependentOn'](_0x30fdc7[_0x205072(0x81)],_0x4d3d6b[_0x205072(0xce)],_0x543dec['UniverLicensePlugin']),_0x2b273f(0x1,_0x394557['Inject'](_0x394557[_0x205072(0x7e)])),_0x2b273f(0x2,_0x394557[_0x205072(0x6a)])],_0x323bde[_0x205072(0x76)]),Object['defineProperty'](_0x323bde,Symbol[_0x205072(0xdb)],{'value':_0x205072(0x75)});}));function _0x1fe0(){const _0x1960c5=['_threadCommentDataSourceService','@univerjs/thread-comment','UNRECOGNIZED','@univerjs/core','merge','users','pluginName','_sessionService','addUser','437956WAvWGM','CommentService','createTimestamp','Reply','4198568odCJcr','exports','804875IqmrgL','UniverProCollaborationClient','@univerjs-pro/collaboration-client','threadId','rangeType','UniverThreadCommentUi','length','requireSession','saveCommentToSnapshot','IThreadCommentDataSourceService','_userService','/universer-api/user/list','Solved','getMemberID','resolved','function','/edit','getComment','resolveComment','code','user','parse','stringify','Edit','CustomRangeType','/solved','2799SRhfsx','Inject','_threadCommentModel','commentUpdate$','21ooaAnV','unitId','13152IObsiE','setConfig','updateComment','/delete','post','disposeWithMe','_commentService','1547860eTAxzn','_init','UserManagerService','object','/add','map','UniverProThreadCommentDatasource','get','OpenOrReOpen','UniverCollaborationClientPlugin','Unknown','type','/list','pipe','4ZYOYWv','defineProperty','UniverProLicense','24WwefMD','payload','CollaborationSessionService','error','symbol','toStringTag','_initDataSource','forEach','values','getCurrentUser','YYYY/MM/DD\x20HH:mm','format','_config','replyId','onReady','dataSource','39864nBnPoy','getUnit','Delete','COMMENT','ref','_injector','userID','add','parentId','UniverThreadComment','rxjs','UNIVER_UNKNOWN','solved','_configService','UniverNetwork','6797308Raabyi','@univerjs-pro/license','IConfigService','filter','@univerjs/thread-comment-ui','comment','content','dayjs','ThreadCommentModel','customRanges','userId','Add','delete','Module','UniverThreadCommentDataSourcePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','reply','rangeId','body','_httpService','getUser','Injector','subscribe','_threadCommentDataSource','UniverThreadCommentUIPlugin','thread-comment-data-source.config','@univerjs/network','amd','addComment','deleteComment','_initUserSync','find','Solve','syncUpdateMutationToColla','HTTPService','/universer-api/comment/unit/','replies','root'];_0x1fe0=function(){return _0x1960c5;};return _0x1fe0();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505161607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.7.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.7.0-nightly.
|
|
50
|
-
"@univerjs/core": "0.7.0-nightly.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505161607",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505161607",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505161607",
|
|
51
51
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
52
|
-
"@univerjs/network": "0.7.0-nightly.
|
|
53
|
-
"@univerjs/thread-comment": "0.7.0-nightly.
|
|
54
|
-
"@univerjs/thread-comment
|
|
52
|
+
"@univerjs/network": "0.7.0-nightly.202505161607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505161607",
|
|
54
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505161607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|