@univerjs-pro/thread-comment-datasource 0.10.7-nightly.202509130703 → 0.10.8
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x55a94b=_0x54de;(function(_0x779c3,_0x1c84f8){const _0x25f57e=_0x54de,_0x1a98d8=_0x779c3();while(!![]){try{const _0x4c6160=parseInt(_0x25f57e(0x1dd))/0x1+-parseInt(_0x25f57e(0x189))/0x2*(parseInt(_0x25f57e(0x1a2))/0x3)+parseInt(_0x25f57e(0x1b6))/0x4+-parseInt(_0x25f57e(0x1cc))/0x5+parseInt(_0x25f57e(0x1f9))/0x6+-parseInt(_0x25f57e(0x19b))/0x7*(parseInt(_0x25f57e(0x195))/0x8)+-parseInt(_0x25f57e(0x191))/0x9*(-parseInt(_0x25f57e(0x1e0))/0xa);if(_0x4c6160===_0x1c84f8)break;else _0x1a98d8['push'](_0x1a98d8['shift']());}catch(_0x504a52){_0x1a98d8['push'](_0x1a98d8['shift']());}}}(_0x33cc,0x1f3b3));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x55a94b(0x1d6);var I=(_0x195761=>(_0x195761[_0x195761[_0x55a94b(0x1a1)]=0x0]='OpenOrReOpen',_0x195761[_0x195761[_0x55a94b(0x183)]=0x1]=_0x55a94b(0x183),_0x195761[_0x195761['UNRECOGNIZED']=-0x1]=_0x55a94b(0x1ee),_0x195761))(I||{}),v=(_0x92eb4e=>(_0x92eb4e[_0x92eb4e[_0x55a94b(0x1e1)]=0x0]=_0x55a94b(0x1e1),_0x92eb4e[_0x92eb4e[_0x55a94b(0x18e)]=0x1]=_0x55a94b(0x18e),_0x92eb4e[_0x92eb4e['Reply']=0x2]=_0x55a94b(0x1e2),_0x92eb4e[_0x92eb4e[_0x55a94b(0x1ed)]=0x3]=_0x55a94b(0x1ed),_0x92eb4e[_0x92eb4e[_0x55a94b(0x182)]=0x4]=_0x55a94b(0x182),_0x92eb4e[_0x92eb4e[_0x55a94b(0x197)]=0x5]='Solve',_0x92eb4e[_0x92eb4e['UNRECOGNIZED']=-0x1]=_0x55a94b(0x1ee),_0x92eb4e))(v||{});const f=_0x172109=>c['dayjs'](new Date(+_0x172109))[_0x55a94b(0x1a3)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3dea13,_0x5db893)=>{const _0x4caaa9=_0x55a94b,_0x571e70=_0x3dea13[_0x4caaa9(0x1cd)](c[_0x4caaa9(0x1ec)]),_0x4c2895=_0x3dea13[_0x4caaa9(0x1cd)](P[_0x4caaa9(0x1e4)]);_0x5db893['forEach'](_0x53fd9e=>{const _0xa02853=_0x4caaa9;_0x571e70[_0xa02853(0x18f)](_0x53fd9e)&&_0x5db893[_0xa02853(0x1ef)](_0x53fd9e);}),_0x5db893['size']&&(await _0x4c2895[_0x4caaa9(0x1cd)](_0x4caaa9(0x1f3),{'params':{'userIDs':[..._0x5db893]}}))[_0x4caaa9(0x1e8)][_0x4caaa9(0x1a6)][_0x4caaa9(0x18d)](_0x3bebb8=>{const _0x511db8=_0x4caaa9;_0x3bebb8&&_0x571e70[_0x511db8(0x1ab)](_0x3bebb8);});};var $=Object[_0x55a94b(0x1ac)],E=(_0x27683a,_0x21fce1,_0xaa306b,_0x1989bb)=>{for(var _0x423dfc=_0x1989bb>0x1?void 0x0:_0x1989bb?$(_0x21fce1,_0xaa306b):_0x21fce1,_0x2398c0=_0x27683a['length']-0x1,_0x8e87e3;_0x2398c0>=0x0;_0x2398c0--)(_0x8e87e3=_0x27683a[_0x2398c0])&&(_0x423dfc=_0x8e87e3(_0x423dfc)||_0x423dfc);return _0x423dfc;},S=(_0x778437,_0x5d4a7c)=>(_0xbe4541,_0x388d4c)=>_0x5d4a7c(_0xbe4541,_0x388d4c,_0x778437);let _=class extends c[_0x55a94b(0x1c0)]{constructor(_0x46dba6,_0xb7d97b,_0x144857,_0x40a0f4){const _0x525427=_0x55a94b;super(),this['_commentService']=_0x46dba6,this['_threadCommentModel']=_0xb7d97b,this[_0x525427(0x1d2)]=_0x144857,this['_injector']=_0x40a0f4,this['_init'](),this['_initUserSync']();}[_0x55a94b(0x1b1)](){const _0x4389bc=_0x55a94b;this[_0x4389bc(0x1e3)](this['_threadCommentModel']['commentUpdate$']['pipe'](j[_0x4389bc(0x1a8)](0x10))[_0x4389bc(0x1d7)](_0x2c1f15=>{const _0x2bde30=_0x4389bc,_0x5efa28=new Set();_0x2c1f15[_0x2bde30(0x18d)](_0x3432a6=>{const _0x41bc3b=_0x2bde30;switch(_0x3432a6['type']){case _0x41bc3b(0x1f6):{const _0x4e3c46=_0x3432a6['payload'][_0x41bc3b(0x1da)];_0x5efa28['add'](_0x4e3c46);break;}}}),R(this[_0x2bde30(0x1df)],_0x5efa28);}));}[_0x55a94b(0x186)](){const _0x1d54b3=_0x55a94b;this[_0x1d54b3(0x1e3)](this[_0x1d54b3(0x1aa)][_0x1d54b3(0x1d3)][_0x1d54b3(0x1d7)](async _0xe1e18d=>{const _0x5b2e51=_0x1d54b3;var _0x1a4b4e,_0x57a2be,_0x5983c9,_0x4f01a0;const _0x1b22bf=(_0x1a4b4e=this[_0x5b2e51(0x1b0)][_0x5b2e51(0x1c8)](_0xe1e18d[_0x5b2e51(0x1d5)])[_0x5b2e51(0x193)](_0x1eee10=>_0x1eee10['threadId']===_0xe1e18d[_0x5b2e51(0x1c2)]))==null?void 0x0:_0x1a4b4e[_0x5b2e51(0x1de)];if(!_0x1b22bf)return;const {unitId:_0x58e188,subUnitId:_0x48a8d8}=_0x1b22bf;switch(_0xe1e18d['user']&&this['_userService'][_0x5b2e51(0x1ab)](_0xe1e18d[_0x5b2e51(0x1fa)]),_0xe1e18d[_0x5b2e51(0x1c5)]){case v[_0x5b2e51(0x18e)]:break;case v['Reply']:{this[_0x5b2e51(0x1b0)]['addComment'](_0x58e188,_0x48a8d8,{'unitId':_0x58e188,'subUnitId':_0x48a8d8,'ref':'','id':_0xe1e18d['replyId'],'dT':f(+_0xe1e18d['createTimestamp']),'threadId':_0xe1e18d[_0x5b2e51(0x1c2)],'personId':(_0x5983c9=(_0x57a2be=_0xe1e18d[_0x5b2e51(0x1fa)])==null?void 0x0:_0x57a2be[_0x5b2e51(0x1d9)])!=null?_0x5983c9:_0xe1e18d[_0x5b2e51(0x196)],'text':JSON['parse'](_0xe1e18d['content']),'parentId':_0x1b22bf['id']});break;}case v[_0x5b2e51(0x182)]:{const _0x508dda=this['_threadCommentModel'][_0x5b2e51(0x1ba)](_0x58e188,_0x48a8d8,_0xe1e18d[_0x5b2e51(0x1db)]);_0x508dda&&_0x508dda[_0x5b2e51(0x192)]&&this[_0x5b2e51(0x1b0)][_0x5b2e51(0x1f4)](_0x58e188,_0x48a8d8,_0xe1e18d[_0x5b2e51(0x1db)]);break;}case v[_0x5b2e51(0x1ed)]:{this[_0x5b2e51(0x1b0)]['updateComment'](_0x58e188,_0x48a8d8,{'commentId':_0xe1e18d[_0x5b2e51(0x1db)],'text':JSON[_0x5b2e51(0x1c4)](_0xe1e18d['content'])});break;}case v['Solve']:{const _0x247778=(_0x4f01a0=this[_0x5b2e51(0x1b0)][_0x5b2e51(0x1c8)](_0xe1e18d['unitId'])[_0x5b2e51(0x193)](_0xd46e4f=>_0xd46e4f[_0x5b2e51(0x1c2)]===_0xe1e18d[_0x5b2e51(0x1c2)]))==null?void 0x0:_0x4f01a0[_0x5b2e51(0x1de)];_0x247778&&this['_threadCommentModel'][_0x5b2e51(0x1e9)](_0x58e188,_0x48a8d8,_0x247778['id'],_0xe1e18d[_0x5b2e51(0x1ae)]===I[_0x5b2e51(0x183)]);break;}}}));}};_=E([S(0x0,c[_0x55a94b(0x1a0)](b['CommentService'])),S(0x1,c[_0x55a94b(0x1a0)](M['ThreadCommentModel'])),S(0x2,c[_0x55a94b(0x1a0)](c[_0x55a94b(0x1ec)])),S(0x3,c[_0x55a94b(0x1a0)](c[_0x55a94b(0x18b)]))],_);const q=_0x55a94b(0x194),D={};var A=Object[_0x55a94b(0x1ac)],x=(_0x3b6462,_0x3bb5bb,_0x265340,_0x191b26)=>{const _0x19120d=_0x55a94b;for(var _0x37ca69=_0x191b26>0x1?void 0x0:_0x191b26?A(_0x3bb5bb,_0x265340):_0x3bb5bb,_0x1478d3=_0x3b6462[_0x19120d(0x198)]-0x1,_0x18fcca;_0x1478d3>=0x0;_0x1478d3--)(_0x18fcca=_0x3b6462[_0x1478d3])&&(_0x37ca69=_0x18fcca(_0x37ca69)||_0x37ca69);return _0x37ca69;},C=(_0x1fb7e0,_0x114bef)=>(_0x1f3895,_0x15045f)=>_0x114bef(_0x1f3895,_0x15045f,_0x1fb7e0);function Y(_0x4ac46e,_0x27e53b){const _0x756e07=_0x55a94b,_0x2506be=_0x4ac46e[_0x756e07(0x1cb)][0x0];return{..._0x27e53b,'id':_0x2506be['replyId'],'resolved':_0x4ac46e['solved']===0x1,'dT':f(_0x2506be[_0x756e07(0x1dc)]),'personId':_0x2506be[_0x756e07(0x196)],'threadId':_0x2506be[_0x756e07(0x1c2)]};}function G(_0x1c7126,_0x4066d9,_0x3b3e7d){const _0x2b7afc=_0x55a94b;var _0x50b09a,_0x420e01;if(((_0x420e01=(_0x50b09a=_0x1c7126==null?void 0x0:_0x1c7126[_0x2b7afc(0x1cb)])==null?void 0x0:_0x50b09a[_0x2b7afc(0x198)])!=null?_0x420e01:0x0)>0x0){const _0x2afa18=(_0x2f349c,_0x5cc918)=>({'id':_0x2f349c['replyId'],'threadId':_0x2f349c[_0x2b7afc(0x1c2)],'dT':f(_0x2f349c[_0x2b7afc(0x1dc)]),'personId':_0x2f349c[_0x2b7afc(0x196)],'resolved':_0x1c7126['solved']===I[_0x2b7afc(0x183)],'unitId':_0x4066d9,'subUnitId':_0x3b3e7d,'text':JSON[_0x2b7afc(0x1c4)](_0x2f349c[_0x2b7afc(0x1b7)]),'parentId':_0x5cc918}),_0x37c0f1=_0x2afa18(_0x1c7126[_0x2b7afc(0x1cb)][0x0]);return{..._0x37c0f1,'children':_0x1c7126[_0x2b7afc(0x1cb)][_0x2b7afc(0x184)](0x1)[_0x2b7afc(0x19e)](_0x1a90bf=>_0x2afa18(_0x1a90bf,_0x37c0f1['id']))};}return null;}let p=class{constructor(_0x2ee2b6,_0x384f2c,_0x5d4e50){const _0x54ac7c=_0x55a94b;this['_httpService']=_0x2ee2b6,this[_0x54ac7c(0x1d2)]=_0x384f2c,this[_0x54ac7c(0x188)]=_0x5d4e50;}async['addComment'](_0x12af66){const _0x3b2bd3=_0x55a94b;var _0x34ab0d,_0x134c4d;const {parentId:_0x59755c,unitId:_0x2dd079,text:_0x4ec01f,threadId:_0xfe74ae}=_0x12af66,_0x528d78=(_0x134c4d=(_0x34ab0d=_0x4ec01f[_0x3b2bd3(0x1b4)])==null?void 0x0:_0x34ab0d[_0x3b2bd3(0x1c1)](_0x6ed3d2=>_0x6ed3d2[_0x3b2bd3(0x1be)]===c[_0x3b2bd3(0x1b9)][_0x3b2bd3(0x1e7)])[_0x3b2bd3(0x19e)](_0x1aeb20=>_0x1aeb20[_0x3b2bd3(0x1b3)]))!=null?_0x134c4d:[],_0x2285e8=JSON['stringify'](_0x4ec01f),_0x43ab54=(await this[_0x3b2bd3(0x188)]['requireSession'](_0x2dd079))[_0x3b2bd3(0x185)]();if(_0x59755c){const _0x608ff2={'memberId':_0x43ab54,'unitId':_0x2dd079,'content':_0x2285e8,'mention':_0x528d78,'threadId':_0xfe74ae},_0xf47c52=(await this[_0x3b2bd3(0x1ca)][_0x3b2bd3(0x1af)](_0x3b2bd3(0x1bb)+_0x2dd079+_0x3b2bd3(0x1a9),{'body':_0x608ff2}))[_0x3b2bd3(0x1e8)]['reply'];return{..._0x12af66,'id':_0xf47c52[_0x3b2bd3(0x1db)],'dT':c[_0x3b2bd3(0x1e6)](+_0xf47c52[_0x3b2bd3(0x1dc)])['format'](_0x3b2bd3(0x1f2)),'personId':_0xf47c52[_0x3b2bd3(0x196)]};}else{const _0x2ac460={'memberId':_0x43ab54,'unitId':_0x2dd079,'content':_0x2285e8,'mention':_0x528d78},_0x8dcc20=await this['_httpService'][_0x3b2bd3(0x1af)](_0x3b2bd3(0x1bb)+_0x2dd079+_0x3b2bd3(0x1bd),{'body':_0x2ac460});return Y(_0x8dcc20[_0x3b2bd3(0x1e8)][_0x3b2bd3(0x199)],_0x12af66);}}async[_0x55a94b(0x1a4)](_0x5a70f5){const _0x2dd672=_0x55a94b;var _0x331cfa,_0x44d2bb;const {text:_0x3fbb9a,unitId:_0x256ee0}=_0x5a70f5,_0x13e4c9=(_0x44d2bb=(_0x331cfa=_0x3fbb9a[_0x2dd672(0x1b4)])==null?void 0x0:_0x331cfa[_0x2dd672(0x1c1)](_0x298853=>_0x298853['rangeType']===c[_0x2dd672(0x1b9)][_0x2dd672(0x1e7)])[_0x2dd672(0x19e)](_0x334274=>_0x334274[_0x2dd672(0x1b3)]))!=null?_0x44d2bb:[],_0x59bf10=JSON[_0x2dd672(0x18a)](_0x3fbb9a),_0x368633=_0x5a70f5['threadId'],_0x13f3fd=_0x5a70f5['id'],_0x5d1686={'memberId':(await this[_0x2dd672(0x188)][_0x2dd672(0x1f0)](_0x256ee0))[_0x2dd672(0x185)](),'unitId':_0x256ee0,'threadId':_0x368633,'mention':_0x13e4c9,'content':_0x59bf10,'replyId':_0x13f3fd},_0x59e74a=await this[_0x2dd672(0x1ca)][_0x2dd672(0x1af)]('/universer-api/comment/unit/'+_0x256ee0+_0x2dd672(0x1c6),{'body':_0x5d1686});return!_0x59e74a[_0x2dd672(0x1e8)][_0x2dd672(0x1b2)]||_0x59e74a[_0x2dd672(0x1e8)][_0x2dd672(0x1b2)][_0x2dd672(0x1ce)]===0x1;}async[_0x55a94b(0x1e9)](_0x5c143e){const _0x4062cc=_0x55a94b,{unitId:_0xc41f1e}=_0x5c143e,_0x64a631=_0x5c143e['threadId'],_0x18d71c={'memberId':this['_userService'][_0x4062cc(0x19a)]()[_0x4062cc(0x1d9)],'unitId':_0xc41f1e,'threadId':_0x64a631,'solved':_0x5c143e['resolved']?I[_0x4062cc(0x183)]:I[_0x4062cc(0x1a1)]},_0x161489=await this[_0x4062cc(0x1ca)][_0x4062cc(0x1af)](_0x4062cc(0x1bb)+_0xc41f1e+'/solved',{'body':_0x18d71c});return!_0x161489[_0x4062cc(0x1e8)][_0x4062cc(0x1b2)]||_0x161489['body'][_0x4062cc(0x1b2)][_0x4062cc(0x1ce)]===0x1;}async['deleteComment'](_0x279b13,_0x3823b0,_0x3d985b,_0x2c3d3e){const _0x5054a1=_0x55a94b,_0xcec117={'memberId':(await this[_0x5054a1(0x188)][_0x5054a1(0x1f0)](_0x279b13))[_0x5054a1(0x185)](),'threadId':_0x3d985b,'replyId':_0x2c3d3e,'unitId':_0x279b13},_0x4ca8a2=await this[_0x5054a1(0x1ca)][_0x5054a1(0x1af)](_0x5054a1(0x1bb)+_0x279b13+_0x5054a1(0x1eb),{'body':_0xcec117});return!_0x4ca8a2[_0x5054a1(0x1e8)][_0x5054a1(0x1b2)]||_0x4ca8a2['body'][_0x5054a1(0x1b2)][_0x5054a1(0x1ce)]===0x1;}async[_0x55a94b(0x1d8)](_0x2799b0,_0x19e132,_0x1506da){const _0x34fa87=_0x55a94b,_0x1fbb66={'unitId':_0x2799b0,'threadId':_0x1506da},_0x330c72=await this['_httpService'][_0x34fa87(0x1af)](_0x34fa87(0x1bb)+_0x2799b0+_0x34fa87(0x1f1),{'body':_0x1fbb66}),_0x4bfc1a=_0x1506da['map'](_0x248990=>G(_0x330c72[_0x34fa87(0x1e8)][_0x34fa87(0x1f5)][_0x248990],_0x2799b0,_0x19e132))['filter'](Boolean);return Object[_0x34fa87(0x1ad)](_0x330c72[_0x34fa87(0x1e8)][_0x34fa87(0x1a6)])['forEach'](_0x21f3ed=>{this['_userService']['addUser'](_0x21f3ed);}),_0x4bfc1a;}[_0x55a94b(0x1bf)](_0x3503fd){const _0x444d33=_0x55a94b;return{'id':_0x3503fd['id'],'threadId':_0x3503fd[_0x444d33(0x1c2)],'ref':_0x3503fd[_0x444d33(0x187)]};}};p=x([C(0x0,c[_0x55a94b(0x1a0)](P[_0x55a94b(0x1e4)])),C(0x1,c[_0x55a94b(0x1a0)](c[_0x55a94b(0x1ec)])),C(0x2,c[_0x55a94b(0x1a0)](b['CollaborationSessionService']))],p);var H=Object[_0x55a94b(0x1ac)],J=(_0x36fa31,_0x483ec5,_0x4682ee,_0x2a3fb5)=>{const _0x2f6be7=_0x55a94b;for(var _0x28d2ac=_0x2a3fb5>0x1?void 0x0:_0x2a3fb5?H(_0x483ec5,_0x4682ee):_0x483ec5,_0x229314=_0x36fa31[_0x2f6be7(0x198)]-0x1,_0x193cce;_0x229314>=0x0;_0x229314--)(_0x193cce=_0x36fa31[_0x229314])&&(_0x28d2ac=_0x193cce(_0x28d2ac)||_0x28d2ac);return _0x28d2ac;},y=(_0x2e0374,_0x58a984)=>(_0x3c9689,_0x1cce14)=>_0x58a984(_0x3c9689,_0x1cce14,_0x2e0374);function _0x54de(_0x123aa1,_0x3a3b7b){const _0x33cc0a=_0x33cc();return _0x54de=function(_0x54decf,_0x30a3c8){_0x54decf=_0x54decf-0x182;let _0x157de3=_0x33cc0a[_0x54decf];return _0x157de3;},_0x54de(_0x123aa1,_0x3a3b7b);}let g=class extends c[_0x55a94b(0x1c0)]{constructor(_0x406129,_0x3e732e){const _0x354fc2=_0x55a94b;super(),this[_0x354fc2(0x1d0)]=_0x406129,this[_0x354fc2(0x190)]=_0x3e732e,this[_0x354fc2(0x1a7)]();}[_0x55a94b(0x1a7)](){const _0x413919=_0x55a94b;this[_0x413919(0x1d0)]['dataSource']=this[_0x413919(0x190)],this[_0x413919(0x1d0)][_0x413919(0x18c)]=!0x1;}};g=J([y(0x0,M[_0x55a94b(0x1c7)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x55a94b(0x19d)],L=Object['getOwnPropertyDescriptor'],Z=(_0x9de6fa,_0x33202b,_0x5af61a)=>_0x33202b in _0x9de6fa?F(_0x9de6fa,_0x33202b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5af61a}):_0x9de6fa[_0x33202b]=_0x5af61a,W=(_0x2afe23,_0x53d7fd,_0x4b2b3c,_0x27676f)=>{for(var _0x371a0d=_0x27676f>0x1?void 0x0:_0x27676f?L(_0x53d7fd,_0x4b2b3c):_0x53d7fd,_0x513f2b=_0x2afe23['length']-0x1,_0x491649;_0x513f2b>=0x0;_0x513f2b--)(_0x491649=_0x2afe23[_0x513f2b])&&(_0x371a0d=_0x491649(_0x371a0d)||_0x371a0d);return _0x371a0d;},O=(_0x594187,_0x299c78)=>(_0x54171e,_0x1ef037)=>_0x299c78(_0x54171e,_0x1ef037,_0x594187),N=(_0x21a138,_0x49a20c,_0xc06c57)=>Z(_0x21a138,typeof _0x49a20c!='symbol'?_0x49a20c+'':_0x49a20c,_0xc06c57);exports[_0x55a94b(0x1bc)]=class extends c[_0x55a94b(0x1a5)]{constructor(_0x4ade27=D,_0xa32a14,_0x32e9f5){const _0x14b714=_0x55a94b;super(),this[_0x14b714(0x19f)]=_0x4ade27,this[_0x14b714(0x1df)]=_0xa32a14,this[_0x14b714(0x1b5)]=_0x32e9f5;const {..._0x4b4c02}=c[_0x14b714(0x1c9)]({},D,this['_config']);this[_0x14b714(0x1b5)][_0x14b714(0x1ea)](q,_0x4b4c02);}[_0x55a94b(0x19c)](){const _0x32cc2e=_0x55a94b;[[p],[g],[_]][_0x32cc2e(0x18d)](_0x5d1701=>{const _0x40b091=_0x32cc2e;this[_0x40b091(0x1df)][_0x40b091(0x1f6)](_0x5d1701);});}[_0x55a94b(0x1c3)](){const _0xb08d87=_0x55a94b;this[_0xb08d87(0x1df)][_0xb08d87(0x1cd)](g),this[_0xb08d87(0x1df)]['get'](_);}},N(exports[_0x55a94b(0x1bc)],_0x55a94b(0x1d1),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x55a94b(0x1c5),c[_0x55a94b(0x1e5)][_0x55a94b(0x1d4)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x55a94b(0x1cf)],b[_0x55a94b(0x1b8)],T[_0x55a94b(0x1f8)]),O(0x1,c[_0x55a94b(0x1a0)](c[_0x55a94b(0x18b)])),O(0x2,c[_0x55a94b(0x1f7)])],exports[_0x55a94b(0x1bc)]);function _0x33cc(){const _0x3f71f2=['delete','requireSession','/list','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','deleteComment','comments','add','IConfigService','UniverLicensePlugin','348204gxnyUA','user','Delete','Solved','slice','getMemberID','_init','ref','_sessionService','118dEzGeO','stringify','Injector','syncUpdateMutationToColla','forEach','Add','getUser','_threadCommentDataSource','9lYSKZa','parentId','find','thread-comment-data-source.config','7512ylTqum','userId','Solve','length','comment','getCurrentUser','1295XHsBop','onStarting','defineProperty','map','_config','Inject','OpenOrReOpen','8784xjiuCf','format','updateComment','Plugin','users','_initDataSource','bufferTime','/reply','_commentService','addUser','getOwnPropertyDescriptor','values','solved','post','_threadCommentModel','_initUserSync','error','rangeId','customRanges','_configService','957768oVaIRX','content','UniverCollaborationClientPlugin','CustomRangeType','getComment','/universer-api/comment/unit/','UniverThreadCommentDataSourcePlugin','/add','rangeType','saveCommentToSnapshot','Disposable','filter','threadId','onReady','parse','type','/edit','IThreadCommentDataSourceService','getUnit','merge','_httpService','replies','1169805qbVhau','get','code','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','pluginName','_userService','commentUpdate$','UNIVER_UNKNOWN','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','listComments','userID','personId','replyId','createTimestamp','117657JuXBLd','root','_injector','2932180uXbeMn','Unknown','Reply','disposeWithMe','HTTPService','UniverInstanceType','dayjs','COMMENT','body','resolveComment','setConfig','/delete','UserManagerService','Edit','UNRECOGNIZED'];_0x33cc=function(){return _0x3f71f2;};return _0x33cc();}
|
|
1
|
+
'use strict';const _0x2b3afc=_0x51d5;(function(_0x406304,_0x181000){const _0x3fe63f=_0x51d5,_0x3e7977=_0x406304();while(!![]){try{const _0x28c5be=-parseInt(_0x3fe63f(0x10c))/0x1*(-parseInt(_0x3fe63f(0x136))/0x2)+-parseInt(_0x3fe63f(0x17d))/0x3*(-parseInt(_0x3fe63f(0x178))/0x4)+parseInt(_0x3fe63f(0x124))/0x5+-parseInt(_0x3fe63f(0x176))/0x6*(parseInt(_0x3fe63f(0x120))/0x7)+parseInt(_0x3fe63f(0x157))/0x8*(-parseInt(_0x3fe63f(0x169))/0x9)+parseInt(_0x3fe63f(0x171))/0xa*(-parseInt(_0x3fe63f(0x146))/0xb)+-parseInt(_0x3fe63f(0x12b))/0xc*(parseInt(_0x3fe63f(0x139))/0xd);if(_0x28c5be===_0x181000)break;else _0x3e7977['push'](_0x3e7977['shift']());}catch(_0x2c9623){_0x3e7977['push'](_0x3e7977['shift']());}}}(_0xd38d,0x4962d));Object['defineProperty'](exports,Symbol[_0x2b3afc(0x15b)],{'value':_0x2b3afc(0x17c)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x29ead0=>(_0x29ead0[_0x29ead0[_0x2b3afc(0x140)]=0x0]=_0x2b3afc(0x140),_0x29ead0[_0x29ead0[_0x2b3afc(0x163)]=0x1]=_0x2b3afc(0x163),_0x29ead0[_0x29ead0[_0x2b3afc(0x153)]=-0x1]=_0x2b3afc(0x153),_0x29ead0))(I||{}),v=(_0x308d1e=>(_0x308d1e[_0x308d1e[_0x2b3afc(0x12a)]=0x0]=_0x2b3afc(0x12a),_0x308d1e[_0x308d1e[_0x2b3afc(0x15e)]=0x1]=_0x2b3afc(0x15e),_0x308d1e[_0x308d1e[_0x2b3afc(0x165)]=0x2]=_0x2b3afc(0x165),_0x308d1e[_0x308d1e[_0x2b3afc(0x148)]=0x3]=_0x2b3afc(0x148),_0x308d1e[_0x308d1e[_0x2b3afc(0x152)]=0x4]=_0x2b3afc(0x152),_0x308d1e[_0x308d1e[_0x2b3afc(0x155)]=0x5]='Solve',_0x308d1e[_0x308d1e['UNRECOGNIZED']=-0x1]=_0x2b3afc(0x153),_0x308d1e))(v||{});const f=_0x58ca32=>c[_0x2b3afc(0x111)](new Date(+_0x58ca32))[_0x2b3afc(0x11b)](_0x2b3afc(0x159)),R=async(_0x595c18,_0x19a619)=>{const _0x153b69=_0x2b3afc,_0x277d45=_0x595c18['get'](c[_0x153b69(0x185)]),_0x51ab89=_0x595c18['get'](P[_0x153b69(0x184)]);_0x19a619['forEach'](_0x8a9f7b=>{const _0x786a09=_0x153b69;_0x277d45[_0x786a09(0x183)](_0x8a9f7b)&&_0x19a619[_0x786a09(0x15d)](_0x8a9f7b);}),_0x19a619[_0x153b69(0x179)]&&(await _0x51ab89['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x19a619]}}))['body'][_0x153b69(0x164)][_0x153b69(0x16b)](_0x2d9ed5=>{const _0x4c233b=_0x153b69;_0x2d9ed5&&_0x277d45[_0x4c233b(0x173)](_0x2d9ed5);});};var $=Object[_0x2b3afc(0x132)],E=(_0x2038f6,_0x50156f,_0x2cc41b,_0x9e8634)=>{const _0x402761=_0x2b3afc;for(var _0x4231df=_0x9e8634>0x1?void 0x0:_0x9e8634?$(_0x50156f,_0x2cc41b):_0x50156f,_0x4a6f6b=_0x2038f6[_0x402761(0x11a)]-0x1,_0x7ba7f2;_0x4a6f6b>=0x0;_0x4a6f6b--)(_0x7ba7f2=_0x2038f6[_0x4a6f6b])&&(_0x4231df=_0x7ba7f2(_0x4231df)||_0x4231df);return _0x4231df;},S=(_0x571f50,_0x6407c6)=>(_0x1e978d,_0x25be10)=>_0x6407c6(_0x1e978d,_0x25be10,_0x571f50);let _=class extends c[_0x2b3afc(0x11d)]{constructor(_0x34cbd8,_0x19d173,_0x3ea358,_0x14d41e){const _0x4d21dd=_0x2b3afc;super(),this['_commentService']=_0x34cbd8,this[_0x4d21dd(0x16f)]=_0x19d173,this[_0x4d21dd(0x16a)]=_0x3ea358,this[_0x4d21dd(0x109)]=_0x14d41e,this[_0x4d21dd(0x182)](),this[_0x4d21dd(0x156)]();}['_initUserSync'](){const _0x34de44=_0x2b3afc;this[_0x34de44(0x110)](this[_0x34de44(0x16f)]['commentUpdate$'][_0x34de44(0x12f)](j[_0x34de44(0x17b)](0x10))[_0x34de44(0x167)](_0x3b6237=>{const _0x7781dc=_0x34de44,_0x4757d0=new Set();_0x3b6237[_0x7781dc(0x16b)](_0x3d7e25=>{const _0x11fd94=_0x7781dc;switch(_0x3d7e25[_0x11fd94(0x145)]){case _0x11fd94(0x115):{const _0x434dab=_0x3d7e25[_0x11fd94(0x175)][_0x11fd94(0x162)];_0x4757d0['add'](_0x434dab);break;}}}),R(this['_injector'],_0x4757d0);}));}[_0x2b3afc(0x182)](){const _0x4cc229=_0x2b3afc;this[_0x4cc229(0x110)](this[_0x4cc229(0x128)]['commentUpdate$'][_0x4cc229(0x167)](async _0x11922a=>{const _0x22cd73=_0x4cc229;var _0x39d90d,_0x5137d4,_0x76b5dd,_0x2f6351;const _0x120812=(_0x39d90d=this[_0x22cd73(0x16f)][_0x22cd73(0x154)](_0x11922a[_0x22cd73(0x13d)])['find'](_0x167769=>_0x167769['threadId']===_0x11922a[_0x22cd73(0x11f)]))==null?void 0x0:_0x39d90d[_0x22cd73(0x150)];if(!_0x120812)return;const {unitId:_0x547c12,subUnitId:_0x4e620b}=_0x120812;switch(_0x11922a['user']&&this['_userService'][_0x22cd73(0x173)](_0x11922a[_0x22cd73(0x10d)]),_0x11922a['type']){case v[_0x22cd73(0x15e)]:break;case v[_0x22cd73(0x165)]:{this[_0x22cd73(0x16f)]['addComment'](_0x547c12,_0x4e620b,{'unitId':_0x547c12,'subUnitId':_0x4e620b,'ref':'','id':_0x11922a[_0x22cd73(0x143)],'dT':f(+_0x11922a[_0x22cd73(0x158)]),'threadId':_0x11922a[_0x22cd73(0x11f)],'personId':(_0x76b5dd=(_0x5137d4=_0x11922a[_0x22cd73(0x10d)])==null?void 0x0:_0x5137d4['userID'])!=null?_0x76b5dd:_0x11922a[_0x22cd73(0x117)],'text':JSON[_0x22cd73(0x10e)](_0x11922a['content']),'parentId':_0x120812['id']});break;}case v[_0x22cd73(0x152)]:{const _0x18d244=this[_0x22cd73(0x16f)][_0x22cd73(0x181)](_0x547c12,_0x4e620b,_0x11922a[_0x22cd73(0x143)]);_0x18d244&&_0x18d244[_0x22cd73(0x11e)]&&this[_0x22cd73(0x16f)][_0x22cd73(0x14f)](_0x547c12,_0x4e620b,_0x11922a[_0x22cd73(0x143)]);break;}case v[_0x22cd73(0x148)]:{this[_0x22cd73(0x16f)]['updateComment'](_0x547c12,_0x4e620b,{'commentId':_0x11922a['replyId'],'text':JSON[_0x22cd73(0x10e)](_0x11922a[_0x22cd73(0x127)])});break;}case v[_0x22cd73(0x155)]:{const _0x5ff8e5=(_0x2f6351=this[_0x22cd73(0x16f)][_0x22cd73(0x154)](_0x11922a[_0x22cd73(0x13d)])[_0x22cd73(0x129)](_0x14f07b=>_0x14f07b[_0x22cd73(0x11f)]===_0x11922a[_0x22cd73(0x11f)]))==null?void 0x0:_0x2f6351[_0x22cd73(0x150)];_0x5ff8e5&&this[_0x22cd73(0x16f)][_0x22cd73(0x172)](_0x547c12,_0x4e620b,_0x5ff8e5['id'],_0x11922a[_0x22cd73(0x13c)]===I[_0x22cd73(0x163)]);break;}}}));}};function _0xd38d(){const _0x49ad11=['dayjs','symbol','defineProperty','saveCommentToSnapshot','add','_configService','userId','merge','ref','length','format','/list','Disposable','parentId','threadId','55755uNnalm','/reply','UniverThreadCommentDataSourcePlugin','CommentService','2137070tksUNH','filter','_config','content','_commentService','find','Unknown','137868rNvtYg','onReady','rangeType','code','pipe','addComment','getCurrentUser','getOwnPropertyDescriptor','/add','slice','post','22rHfsEq','_sessionService','getMemberID','65ztXmJK','listComments','setConfig','solved','unitId','/edit','/solved','OpenOrReOpen','_httpService','UniverThreadCommentUIPlugin','replyId','CollaborationSessionService','type','4103HyppdX','COMMENT','Edit','CustomRangeType','error','UniverLicensePlugin','_threadCommentDataSourceService','IThreadCommentDataSourceService','Injector','deleteComment','root','DependentOn','Delete','UNRECOGNIZED','getUnit','Solve','_initUserSync','197048nVqJah','createTimestamp','YYYY/MM/DD\x20HH:mm','Inject','toStringTag','UniverInstanceType','delete','Add','thread-comment-data-source.config','map','body','personId','Solved','users','Reply','IConfigService','subscribe','syncUpdateMutationToColla','9QpbmgR','_userService','forEach','stringify','UniverCollaborationClientPlugin','ThreadCommentModel','_threadCommentModel','_threadCommentDataSource','7050CnvsNy','resolveComment','addUser','userID','payload','318jtraIF','get','216RZjTnO','size','dataSource','bufferTime','Module','22089bdBoBf','requireSession','/universer-api/comment/unit/','updateComment','getComment','_init','getUser','HTTPService','UserManagerService','_injector','rangeId','values','22069udYdIP','user','parse','replies','disposeWithMe'];_0xd38d=function(){return _0x49ad11;};return _0xd38d();}_=E([S(0x0,c[_0x2b3afc(0x15a)](b[_0x2b3afc(0x123)])),S(0x1,c[_0x2b3afc(0x15a)](M[_0x2b3afc(0x16e)])),S(0x2,c[_0x2b3afc(0x15a)](c[_0x2b3afc(0x185)])),S(0x3,c[_0x2b3afc(0x15a)](c[_0x2b3afc(0x14e)]))],_);const q=_0x2b3afc(0x15f),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x80f4aa,_0xbcf8b1,_0x5a34f9,_0x4d4542)=>{const _0x94be23=_0x2b3afc;for(var _0x3c1e16=_0x4d4542>0x1?void 0x0:_0x4d4542?A(_0xbcf8b1,_0x5a34f9):_0xbcf8b1,_0x1fe2a2=_0x80f4aa[_0x94be23(0x11a)]-0x1,_0x5dff04;_0x1fe2a2>=0x0;_0x1fe2a2--)(_0x5dff04=_0x80f4aa[_0x1fe2a2])&&(_0x3c1e16=_0x5dff04(_0x3c1e16)||_0x3c1e16);return _0x3c1e16;},C=(_0xae57eb,_0x7c815d)=>(_0x1385cd,_0x4436d3)=>_0x7c815d(_0x1385cd,_0x4436d3,_0xae57eb);function Y(_0x522fd0,_0xbe88ef){const _0x3a261c=_0x2b3afc,_0x5c454b=_0x522fd0['replies'][0x0];return{..._0xbe88ef,'id':_0x5c454b['replyId'],'resolved':_0x522fd0['solved']===0x1,'dT':f(_0x5c454b[_0x3a261c(0x158)]),'personId':_0x5c454b[_0x3a261c(0x117)],'threadId':_0x5c454b[_0x3a261c(0x11f)]};}function G(_0x6c1853,_0x2bd794,_0x228f74){const _0xb9a07f=_0x2b3afc;var _0x4fb2fc,_0x36eba8;if(((_0x36eba8=(_0x4fb2fc=_0x6c1853==null?void 0x0:_0x6c1853['replies'])==null?void 0x0:_0x4fb2fc['length'])!=null?_0x36eba8:0x0)>0x0){const _0x26a55b=(_0x451bf3,_0x4ff5c0)=>({'id':_0x451bf3['replyId'],'threadId':_0x451bf3['threadId'],'dT':f(_0x451bf3[_0xb9a07f(0x158)]),'personId':_0x451bf3[_0xb9a07f(0x117)],'resolved':_0x6c1853[_0xb9a07f(0x13c)]===I[_0xb9a07f(0x163)],'unitId':_0x2bd794,'subUnitId':_0x228f74,'text':JSON[_0xb9a07f(0x10e)](_0x451bf3['content']),'parentId':_0x4ff5c0}),_0x4fc98d=_0x26a55b(_0x6c1853[_0xb9a07f(0x10f)][0x0]);return{..._0x4fc98d,'children':_0x6c1853[_0xb9a07f(0x10f)][_0xb9a07f(0x134)](0x1)[_0xb9a07f(0x160)](_0x5cf85e=>_0x26a55b(_0x5cf85e,_0x4fc98d['id']))};}return null;}let p=class{constructor(_0x5ed872,_0x3ce503,_0x466103){const _0x3aebba=_0x2b3afc;this[_0x3aebba(0x141)]=_0x5ed872,this[_0x3aebba(0x16a)]=_0x3ce503,this[_0x3aebba(0x137)]=_0x466103;}async[_0x2b3afc(0x130)](_0xe2a596){const _0x1c6882=_0x2b3afc;var _0x169c97,_0x5d16b5;const {parentId:_0x365063,unitId:_0x4d9191,text:_0x5c43de,threadId:_0x47a4f9}=_0xe2a596,_0x5c45e0=(_0x5d16b5=(_0x169c97=_0x5c43de['customRanges'])==null?void 0x0:_0x169c97[_0x1c6882(0x125)](_0x45ee65=>_0x45ee65[_0x1c6882(0x12d)]===c[_0x1c6882(0x149)]['COMMENT'])[_0x1c6882(0x160)](_0x9dd71a=>_0x9dd71a[_0x1c6882(0x10a)]))!=null?_0x5d16b5:[],_0x570d45=JSON[_0x1c6882(0x16c)](_0x5c43de),_0x2b4573=(await this['_sessionService'][_0x1c6882(0x17e)](_0x4d9191))['getMemberID']();if(_0x365063){const _0x61cdf4={'memberId':_0x2b4573,'unitId':_0x4d9191,'content':_0x570d45,'mention':_0x5c45e0,'threadId':_0x47a4f9},_0x1baaa5=(await this[_0x1c6882(0x141)][_0x1c6882(0x135)](_0x1c6882(0x17f)+_0x4d9191+_0x1c6882(0x121),{'body':_0x61cdf4}))[_0x1c6882(0x161)]['reply'];return{..._0xe2a596,'id':_0x1baaa5['replyId'],'dT':c[_0x1c6882(0x111)](+_0x1baaa5['createTimestamp'])['format'](_0x1c6882(0x159)),'personId':_0x1baaa5[_0x1c6882(0x117)]};}else{const _0x5273c8={'memberId':_0x2b4573,'unitId':_0x4d9191,'content':_0x570d45,'mention':_0x5c45e0},_0xc82aa2=await this[_0x1c6882(0x141)][_0x1c6882(0x135)](_0x1c6882(0x17f)+_0x4d9191+_0x1c6882(0x133),{'body':_0x5273c8});return Y(_0xc82aa2[_0x1c6882(0x161)]['comment'],_0xe2a596);}}async[_0x2b3afc(0x180)](_0x27a28a){const _0x44cdff=_0x2b3afc;var _0x467ed5,_0x5d130f;const {text:_0x3c8696,unitId:_0x480ea3}=_0x27a28a,_0x1a2661=(_0x5d130f=(_0x467ed5=_0x3c8696['customRanges'])==null?void 0x0:_0x467ed5[_0x44cdff(0x125)](_0x24076c=>_0x24076c[_0x44cdff(0x12d)]===c[_0x44cdff(0x149)][_0x44cdff(0x147)])[_0x44cdff(0x160)](_0x1bb616=>_0x1bb616[_0x44cdff(0x10a)]))!=null?_0x5d130f:[],_0x75651a=JSON[_0x44cdff(0x16c)](_0x3c8696),_0x546ae4=_0x27a28a[_0x44cdff(0x11f)],_0x546e0e=_0x27a28a['id'],_0x56320c={'memberId':(await this[_0x44cdff(0x137)][_0x44cdff(0x17e)](_0x480ea3))[_0x44cdff(0x138)](),'unitId':_0x480ea3,'threadId':_0x546ae4,'mention':_0x1a2661,'content':_0x75651a,'replyId':_0x546e0e},_0x2e560d=await this['_httpService'][_0x44cdff(0x135)](_0x44cdff(0x17f)+_0x480ea3+_0x44cdff(0x13e),{'body':_0x56320c});return!_0x2e560d[_0x44cdff(0x161)][_0x44cdff(0x14a)]||_0x2e560d[_0x44cdff(0x161)][_0x44cdff(0x14a)]['code']===0x1;}async[_0x2b3afc(0x172)](_0x204056){const _0x52b98c=_0x2b3afc,{unitId:_0x39c00e}=_0x204056,_0x3c019f=_0x204056['threadId'],_0x28fef8={'memberId':this[_0x52b98c(0x16a)][_0x52b98c(0x131)]()[_0x52b98c(0x174)],'unitId':_0x39c00e,'threadId':_0x3c019f,'solved':_0x204056['resolved']?I['Solved']:I[_0x52b98c(0x140)]},_0x5db3e6=await this[_0x52b98c(0x141)][_0x52b98c(0x135)](_0x52b98c(0x17f)+_0x39c00e+_0x52b98c(0x13f),{'body':_0x28fef8});return!_0x5db3e6['body'][_0x52b98c(0x14a)]||_0x5db3e6[_0x52b98c(0x161)][_0x52b98c(0x14a)][_0x52b98c(0x12e)]===0x1;}async[_0x2b3afc(0x14f)](_0x2c1312,_0x446488,_0x562674,_0x254cee){const _0x1cbab7=_0x2b3afc,_0x361d3e={'memberId':(await this[_0x1cbab7(0x137)]['requireSession'](_0x2c1312))[_0x1cbab7(0x138)](),'threadId':_0x562674,'replyId':_0x254cee,'unitId':_0x2c1312},_0x35a1c3=await this[_0x1cbab7(0x141)][_0x1cbab7(0x135)](_0x1cbab7(0x17f)+_0x2c1312+'/delete',{'body':_0x361d3e});return!_0x35a1c3[_0x1cbab7(0x161)][_0x1cbab7(0x14a)]||_0x35a1c3[_0x1cbab7(0x161)][_0x1cbab7(0x14a)][_0x1cbab7(0x12e)]===0x1;}async[_0x2b3afc(0x13a)](_0x554f59,_0x92a933,_0x90b935){const _0x11b03e=_0x2b3afc,_0x11eb1f={'unitId':_0x554f59,'threadId':_0x90b935},_0x1ac851=await this[_0x11b03e(0x141)][_0x11b03e(0x135)](_0x11b03e(0x17f)+_0x554f59+_0x11b03e(0x11c),{'body':_0x11eb1f}),_0xe7c1dd=_0x90b935['map'](_0x5a0e84=>G(_0x1ac851[_0x11b03e(0x161)]['comments'][_0x5a0e84],_0x554f59,_0x92a933))[_0x11b03e(0x125)](Boolean);return Object[_0x11b03e(0x10b)](_0x1ac851['body'][_0x11b03e(0x164)])['forEach'](_0x53a30e=>{const _0x381b81=_0x11b03e;this[_0x381b81(0x16a)][_0x381b81(0x173)](_0x53a30e);}),_0xe7c1dd;}[_0x2b3afc(0x114)](_0x1c516b){const _0x132129=_0x2b3afc;return{'id':_0x1c516b['id'],'threadId':_0x1c516b[_0x132129(0x11f)],'ref':_0x1c516b[_0x132129(0x119)]};}};p=x([C(0x0,c['Inject'](P[_0x2b3afc(0x184)])),C(0x1,c[_0x2b3afc(0x15a)](c[_0x2b3afc(0x185)])),C(0x2,c[_0x2b3afc(0x15a)](b[_0x2b3afc(0x144)]))],p);function _0x51d5(_0x5cd02e,_0x3e2e27){const _0xd38db=_0xd38d();return _0x51d5=function(_0x51d5f5,_0x2bb8f6){_0x51d5f5=_0x51d5f5-0x109;let _0x3ba142=_0xd38db[_0x51d5f5];return _0x3ba142;},_0x51d5(_0x5cd02e,_0x3e2e27);}var H=Object[_0x2b3afc(0x132)],J=(_0x4c5da2,_0x7ece06,_0x580370,_0x29c831)=>{const _0x78ddb9=_0x2b3afc;for(var _0x16aa39=_0x29c831>0x1?void 0x0:_0x29c831?H(_0x7ece06,_0x580370):_0x7ece06,_0x185c0=_0x4c5da2[_0x78ddb9(0x11a)]-0x1,_0xe5a521;_0x185c0>=0x0;_0x185c0--)(_0xe5a521=_0x4c5da2[_0x185c0])&&(_0x16aa39=_0xe5a521(_0x16aa39)||_0x16aa39);return _0x16aa39;},y=(_0x442768,_0x3cfc31)=>(_0x102238,_0x2373c4)=>_0x3cfc31(_0x102238,_0x2373c4,_0x442768);let g=class extends c[_0x2b3afc(0x11d)]{constructor(_0x4c8a36,_0x5280c0){const _0xb3d473=_0x2b3afc;super(),this[_0xb3d473(0x14c)]=_0x4c8a36,this['_threadCommentDataSource']=_0x5280c0,this['_initDataSource']();}['_initDataSource'](){const _0xb2dd4e=_0x2b3afc;this[_0xb2dd4e(0x14c)][_0xb2dd4e(0x17a)]=this[_0xb2dd4e(0x170)],this[_0xb2dd4e(0x14c)][_0xb2dd4e(0x168)]=!0x1;}};g=J([y(0x0,M[_0x2b3afc(0x14d)]),y(0x1,c[_0x2b3afc(0x15a)](p))],g);var F=Object[_0x2b3afc(0x113)],L=Object[_0x2b3afc(0x132)],Z=(_0x22ba2e,_0x56d3d3,_0x20dcd5)=>_0x56d3d3 in _0x22ba2e?F(_0x22ba2e,_0x56d3d3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20dcd5}):_0x22ba2e[_0x56d3d3]=_0x20dcd5,W=(_0x3024d7,_0x5510e1,_0x565a31,_0x273a07)=>{const _0x43fd44=_0x2b3afc;for(var _0x56d85c=_0x273a07>0x1?void 0x0:_0x273a07?L(_0x5510e1,_0x565a31):_0x5510e1,_0x309ffa=_0x3024d7[_0x43fd44(0x11a)]-0x1,_0x92affe;_0x309ffa>=0x0;_0x309ffa--)(_0x92affe=_0x3024d7[_0x309ffa])&&(_0x56d85c=_0x92affe(_0x56d85c)||_0x56d85c);return _0x56d85c;},O=(_0x2d62c5,_0x173e83)=>(_0x4b911d,_0x46ee08)=>_0x173e83(_0x4b911d,_0x46ee08,_0x2d62c5),N=(_0x64f26c,_0x375282,_0x568a4b)=>Z(_0x64f26c,typeof _0x375282!=_0x2b3afc(0x112)?_0x375282+'':_0x375282,_0x568a4b);exports[_0x2b3afc(0x122)]=class extends c['Plugin']{constructor(_0x1bc4af=D,_0x33ccb5,_0x2b90ef){const _0x2a8783=_0x2b3afc;super(),this[_0x2a8783(0x126)]=_0x1bc4af,this[_0x2a8783(0x109)]=_0x33ccb5,this[_0x2a8783(0x116)]=_0x2b90ef;const {..._0x5983ae}=c[_0x2a8783(0x118)]({},D,this[_0x2a8783(0x126)]);this[_0x2a8783(0x116)][_0x2a8783(0x13b)](q,_0x5983ae);}['onStarting'](){const _0x3985f7=_0x2b3afc;[[p],[g],[_]][_0x3985f7(0x16b)](_0x51e0e4=>{const _0x2cd2f0=_0x3985f7;this[_0x2cd2f0(0x109)][_0x2cd2f0(0x115)](_0x51e0e4);});}[_0x2b3afc(0x12c)](){const _0x2d91e6=_0x2b3afc;this[_0x2d91e6(0x109)][_0x2d91e6(0x177)](g),this[_0x2d91e6(0x109)][_0x2d91e6(0x177)](_);}},N(exports[_0x2b3afc(0x122)],'pluginName',U),N(exports[_0x2b3afc(0x122)],'type',c[_0x2b3afc(0x15c)]['UNIVER_UNKNOWN']),exports[_0x2b3afc(0x122)]=W([c[_0x2b3afc(0x151)](w[_0x2b3afc(0x142)],b[_0x2b3afc(0x16d)],T[_0x2b3afc(0x14b)]),O(0x1,c[_0x2b3afc(0x15a)](c[_0x2b3afc(0x14e)])),O(0x2,c[_0x2b3afc(0x166)])],exports[_0x2b3afc(0x122)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4b08f6=_0x381c;(function(_0x1a1802,_0x58703d){const _0x1f5d02=_0x381c,_0x11f7ef=_0x1a1802();while(!![]){try{const _0x25d3d1=parseInt(_0x1f5d02(0x22d))/0x1+parseInt(_0x1f5d02(0x242))/0x2+parseInt(_0x1f5d02(0x214))/0x3+parseInt(_0x1f5d02(0x237))/0x4+-parseInt(_0x1f5d02(0x236))/0x5+-parseInt(_0x1f5d02(0x1fb))/0x6+parseInt(_0x1f5d02(0x1f7))/0x7*(parseInt(_0x1f5d02(0x238))/0x8);if(_0x25d3d1===_0x58703d)break;else _0x11f7ef['push'](_0x11f7ef['shift']());}catch(_0xca3c9b){_0x11f7ef['push'](_0x11f7ef['shift']());}}}(_0x4e29,0xf19aa));import{CommentService as _0x3fd2fc,CollaborationSessionService as _0x12bcca,UniverCollaborationClientPlugin as _0x3ab8c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3e3ea1}from'@univerjs-pro/license';import{dayjs as _0x1f5eeb,UserManagerService as _0x229c9b,Inject as _0x33eaaf,Injector as _0x2b41cd,Disposable as _0x22017b,CustomRangeType as _0x2a62af,UniverInstanceType as _0x52cebc,DependentOn as _0x4925bc,IConfigService as _0x4a913c,Plugin as _0x45a9df,merge as _0x59e53c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x341ce2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4adb5b,IThreadCommentDataSourceService as _0x44c2d7}from'@univerjs/thread-comment';import{bufferTime as _0x250720}from'rxjs';import{HTTPService as _0x3fadc1}from'@univerjs/network';const W=_0x4b08f6(0x205);var I=(_0x2c0f1b=>(_0x2c0f1b[_0x2c0f1b[_0x4b08f6(0x1fc)]=0x0]=_0x4b08f6(0x1fc),_0x2c0f1b[_0x2c0f1b['Solved']=0x1]=_0x4b08f6(0x241),_0x2c0f1b[_0x2c0f1b[_0x4b08f6(0x213)]=-0x1]=_0x4b08f6(0x213),_0x2c0f1b))(I||{}),v=(_0x15443b=>(_0x15443b[_0x15443b[_0x4b08f6(0x223)]=0x0]=_0x4b08f6(0x223),_0x15443b[_0x15443b[_0x4b08f6(0x246)]=0x1]=_0x4b08f6(0x246),_0x15443b[_0x15443b[_0x4b08f6(0x1f3)]=0x2]=_0x4b08f6(0x1f3),_0x15443b[_0x15443b[_0x4b08f6(0x201)]=0x3]=_0x4b08f6(0x201),_0x15443b[_0x15443b[_0x4b08f6(0x1ff)]=0x4]=_0x4b08f6(0x1ff),_0x15443b[_0x15443b[_0x4b08f6(0x232)]=0x5]='Solve',_0x15443b[_0x15443b['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x15443b))(v||{});const y=_0x47d6cb=>_0x1f5eeb(new Date(+_0x47d6cb))[_0x4b08f6(0x208)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x344108,_0x2bcc6a)=>{const _0x4a8820=_0x4b08f6,_0x27ce93=_0x344108['get'](_0x229c9b),_0x2213dc=_0x344108['get'](_0x3fadc1);_0x2bcc6a[_0x4a8820(0x24c)](_0x38f3a6=>{const _0x514a27=_0x4a8820;_0x27ce93['getUser'](_0x38f3a6)&&_0x2bcc6a[_0x514a27(0x202)](_0x38f3a6);}),_0x2bcc6a[_0x4a8820(0x233)]&&(await _0x2213dc['get'](_0x4a8820(0x253),{'params':{'userIDs':[..._0x2bcc6a]}}))['body'][_0x4a8820(0x247)][_0x4a8820(0x24c)](_0x2cdec8=>{const _0x5e3604=_0x4a8820;_0x2cdec8&&_0x27ce93[_0x5e3604(0x21f)](_0x2cdec8);});};var K=Object[_0x4b08f6(0x20b)],V=(_0x5b99c2,_0x33ee89,_0x2f33c1,_0x239cf2)=>{const _0x230da9=_0x4b08f6;for(var _0x47df6e=_0x239cf2>0x1?void 0x0:_0x239cf2?K(_0x33ee89,_0x2f33c1):_0x33ee89,_0x131464=_0x5b99c2[_0x230da9(0x203)]-0x1,_0x268999;_0x131464>=0x0;_0x131464--)(_0x268999=_0x5b99c2[_0x131464])&&(_0x47df6e=_0x268999(_0x47df6e)||_0x47df6e);return _0x47df6e;},p=(_0x16a3fa,_0x3dec0f)=>(_0x328608,_0x27e4e3)=>_0x3dec0f(_0x328608,_0x27e4e3,_0x16a3fa);let _=class extends _0x22017b{constructor(_0x3c2990,_0x71bcfc,_0xdab49d,_0x2661da){const _0x1dc93b=_0x4b08f6;super(),this[_0x1dc93b(0x20f)]=_0x3c2990,this['_threadCommentModel']=_0x71bcfc,this[_0x1dc93b(0x24a)]=_0xdab49d,this[_0x1dc93b(0x20e)]=_0x2661da,this[_0x1dc93b(0x20a)](),this[_0x1dc93b(0x230)]();}[_0x4b08f6(0x230)](){const _0x12537b=_0x4b08f6;this[_0x12537b(0x224)](this['_threadCommentModel'][_0x12537b(0x227)]['pipe'](_0x250720(0x10))[_0x12537b(0x221)](_0x146eac=>{const _0x522a8b=_0x12537b,_0x1e65a9=new Set();_0x146eac[_0x522a8b(0x24c)](_0x39566c=>{const _0x56c8e5=_0x522a8b;switch(_0x39566c[_0x56c8e5(0x239)]){case _0x56c8e5(0x252):{const _0x4585e5=_0x39566c[_0x56c8e5(0x21b)][_0x56c8e5(0x1f8)];_0x1e65a9[_0x56c8e5(0x252)](_0x4585e5);break;}}}),B(this[_0x522a8b(0x20e)],_0x1e65a9);}));}[_0x4b08f6(0x20a)](){const _0x4f48c1=_0x4b08f6;this[_0x4f48c1(0x224)](this[_0x4f48c1(0x20f)][_0x4f48c1(0x227)][_0x4f48c1(0x221)](async _0x5677ef=>{const _0xf18cf2=_0x4f48c1;var _0x57000e,_0x51cc66,_0x3797cf,_0x2050e5;const _0x311cf8=(_0x57000e=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x21a)](_0x5677ef[_0xf18cf2(0x234)])['find'](_0x2b9494=>_0x2b9494[_0xf18cf2(0x21c)]===_0x5677ef[_0xf18cf2(0x21c)]))==null?void 0x0:_0x57000e[_0xf18cf2(0x211)];if(!_0x311cf8)return;const {unitId:_0x2d553b,subUnitId:_0x2023ae}=_0x311cf8;switch(_0x5677ef[_0xf18cf2(0x20c)]&&this[_0xf18cf2(0x24a)][_0xf18cf2(0x21f)](_0x5677ef[_0xf18cf2(0x20c)]),_0x5677ef[_0xf18cf2(0x239)]){case v[_0xf18cf2(0x246)]:break;case v['Reply']:{this[_0xf18cf2(0x1fe)]['addComment'](_0x2d553b,_0x2023ae,{'unitId':_0x2d553b,'subUnitId':_0x2023ae,'ref':'','id':_0x5677ef['replyId'],'dT':y(+_0x5677ef['createTimestamp']),'threadId':_0x5677ef[_0xf18cf2(0x21c)],'personId':(_0x3797cf=(_0x51cc66=_0x5677ef['user'])==null?void 0x0:_0x51cc66[_0xf18cf2(0x1f4)])!=null?_0x3797cf:_0x5677ef[_0xf18cf2(0x231)],'text':JSON[_0xf18cf2(0x24d)](_0x5677ef['content']),'parentId':_0x311cf8['id']});break;}case v[_0xf18cf2(0x1ff)]:{const _0x28db1c=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x244)](_0x2d553b,_0x2023ae,_0x5677ef[_0xf18cf2(0x218)]);_0x28db1c&&_0x28db1c[_0xf18cf2(0x212)]&&this[_0xf18cf2(0x1fe)][_0xf18cf2(0x22a)](_0x2d553b,_0x2023ae,_0x5677ef[_0xf18cf2(0x218)]);break;}case v[_0xf18cf2(0x201)]:{this['_threadCommentModel'][_0xf18cf2(0x1f5)](_0x2d553b,_0x2023ae,{'commentId':_0x5677ef[_0xf18cf2(0x218)],'text':JSON[_0xf18cf2(0x24d)](_0x5677ef[_0xf18cf2(0x219)])});break;}case v['Solve']:{const _0x9944f7=(_0x2050e5=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x21a)](_0x5677ef[_0xf18cf2(0x234)])[_0xf18cf2(0x1f9)](_0x5a5df7=>_0x5a5df7[_0xf18cf2(0x21c)]===_0x5677ef[_0xf18cf2(0x21c)]))==null?void 0x0:_0x2050e5['root'];_0x9944f7&&this['_threadCommentModel']['resolveComment'](_0x2d553b,_0x2023ae,_0x9944f7['id'],_0x5677ef[_0xf18cf2(0x215)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x33eaaf(_0x3fd2fc)),p(0x1,_0x33eaaf(_0x4adb5b)),p(0x2,_0x33eaaf(_0x229c9b)),p(0x3,_0x33eaaf(_0x2b41cd))],_);const z=_0x4b08f6(0x23a),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f9cba,_0x30b390,_0x58775e,_0x285341)=>{for(var _0x41e215=_0x285341>0x1?void 0x0:_0x285341?k(_0x30b390,_0x58775e):_0x30b390,_0x381f2f=_0x1f9cba['length']-0x1,_0x536bdf;_0x381f2f>=0x0;_0x381f2f--)(_0x536bdf=_0x1f9cba[_0x381f2f])&&(_0x41e215=_0x536bdf(_0x41e215)||_0x41e215);return _0x41e215;},b=(_0x32b930,_0x12e711)=>(_0x3900b9,_0x3f0049)=>_0x12e711(_0x3900b9,_0x3f0049,_0x32b930);function X(_0x5a0567,_0x12ddc2){const _0x10ebba=_0x4b08f6,_0x149a22=_0x5a0567[_0x10ebba(0x245)][0x0];return{..._0x12ddc2,'id':_0x149a22[_0x10ebba(0x218)],'resolved':_0x5a0567[_0x10ebba(0x215)]===0x1,'dT':y(_0x149a22[_0x10ebba(0x249)]),'personId':_0x149a22['userId'],'threadId':_0x149a22[_0x10ebba(0x21c)]};}function ee(_0x156f85,_0x3b256e,_0x291eb3){const _0x19807a=_0x4b08f6;var _0x8fc2a1,_0x1e806b;if(((_0x1e806b=(_0x8fc2a1=_0x156f85==null?void 0x0:_0x156f85[_0x19807a(0x245)])==null?void 0x0:_0x8fc2a1[_0x19807a(0x203)])!=null?_0x1e806b:0x0)>0x0){const _0x265580=(_0x11c671,_0x4f4b6c)=>({'id':_0x11c671[_0x19807a(0x218)],'threadId':_0x11c671[_0x19807a(0x21c)],'dT':y(_0x11c671[_0x19807a(0x249)]),'personId':_0x11c671[_0x19807a(0x231)],'resolved':_0x156f85[_0x19807a(0x215)]===I[_0x19807a(0x241)],'unitId':_0x3b256e,'subUnitId':_0x291eb3,'text':JSON[_0x19807a(0x24d)](_0x11c671[_0x19807a(0x219)]),'parentId':_0x4f4b6c}),_0xb4faa2=_0x265580(_0x156f85[_0x19807a(0x245)][0x0]);return{..._0xb4faa2,'children':_0x156f85[_0x19807a(0x245)]['slice'](0x1)[_0x19807a(0x216)](_0xe41fd3=>_0x265580(_0xe41fd3,_0xb4faa2['id']))};}return null;}let S=class{constructor(_0x25f47e,_0x1d012d,_0xcfdefb){const _0x5ac7cc=_0x4b08f6;this['_httpService']=_0x25f47e,this['_userService']=_0x1d012d,this[_0x5ac7cc(0x24e)]=_0xcfdefb;}async[_0x4b08f6(0x220)](_0x2282b6){const _0x5e4268=_0x4b08f6;var _0x8d0f8b,_0x4a960d;const {parentId:_0x5454c7,unitId:_0x271553,text:_0xd65e98,threadId:_0x217a21}=_0x2282b6,_0x50e771=(_0x4a960d=(_0x8d0f8b=_0xd65e98['customRanges'])==null?void 0x0:_0x8d0f8b['filter'](_0x54baf5=>_0x54baf5[_0x5e4268(0x248)]===_0x2a62af['COMMENT'])['map'](_0x1ee8c6=>_0x1ee8c6[_0x5e4268(0x1fa)]))!=null?_0x4a960d:[],_0x440ec1=JSON[_0x5e4268(0x23e)](_0xd65e98),_0x346b0a=(await this[_0x5e4268(0x24e)][_0x5e4268(0x251)](_0x271553))[_0x5e4268(0x225)]();if(_0x5454c7){const _0x19ad5f={'memberId':_0x346b0a,'unitId':_0x271553,'content':_0x440ec1,'mention':_0x50e771,'threadId':_0x217a21},_0x24ddd1=(await this['_httpService'][_0x5e4268(0x240)]('/universer-api/comment/unit/'+_0x271553+_0x5e4268(0x254),{'body':_0x19ad5f}))[_0x5e4268(0x23d)][_0x5e4268(0x23f)];return{..._0x2282b6,'id':_0x24ddd1[_0x5e4268(0x218)],'dT':_0x1f5eeb(+_0x24ddd1[_0x5e4268(0x249)])[_0x5e4268(0x208)](_0x5e4268(0x22b)),'personId':_0x24ddd1[_0x5e4268(0x231)]};}else{const _0x2bfe10={'memberId':_0x346b0a,'unitId':_0x271553,'content':_0x440ec1,'mention':_0x50e771},_0x4340f8=await this[_0x5e4268(0x235)]['post'](_0x5e4268(0x250)+_0x271553+_0x5e4268(0x24b),{'body':_0x2bfe10});return X(_0x4340f8['body']['comment'],_0x2282b6);}}async[_0x4b08f6(0x1f5)](_0x36a96b){const _0x392471=_0x4b08f6;var _0x262350,_0xbe9b08;const {text:_0x3ff051,unitId:_0x49170a}=_0x36a96b,_0x2fabaa=(_0xbe9b08=(_0x262350=_0x3ff051['customRanges'])==null?void 0x0:_0x262350[_0x392471(0x21d)](_0x57cda1=>_0x57cda1[_0x392471(0x248)]===_0x2a62af[_0x392471(0x22c)])[_0x392471(0x216)](_0x5ee5b4=>_0x5ee5b4[_0x392471(0x1fa)]))!=null?_0xbe9b08:[],_0x9f318c=JSON[_0x392471(0x23e)](_0x3ff051),_0xeecf9=_0x36a96b[_0x392471(0x21c)],_0x3e066e=_0x36a96b['id'],_0x189b9c={'memberId':(await this[_0x392471(0x24e)][_0x392471(0x251)](_0x49170a))[_0x392471(0x225)](),'unitId':_0x49170a,'threadId':_0xeecf9,'mention':_0x2fabaa,'content':_0x9f318c,'replyId':_0x3e066e},_0x2f8021=await this[_0x392471(0x235)]['post'](_0x392471(0x250)+_0x49170a+_0x392471(0x222),{'body':_0x189b9c});return!_0x2f8021[_0x392471(0x23d)][_0x392471(0x228)]||_0x2f8021[_0x392471(0x23d)][_0x392471(0x228)][_0x392471(0x217)]===0x1;}async[_0x4b08f6(0x22e)](_0x53ab06){const _0x2ef211=_0x4b08f6,{unitId:_0x2cfb62}=_0x53ab06,_0x2655c6=_0x53ab06[_0x2ef211(0x21c)],_0xd363e8={'memberId':this[_0x2ef211(0x24a)][_0x2ef211(0x21e)]()[_0x2ef211(0x1f4)],'unitId':_0x2cfb62,'threadId':_0x2655c6,'solved':_0x53ab06['resolved']?I['Solved']:I[_0x2ef211(0x1fc)]},_0x4c8d88=await this[_0x2ef211(0x235)][_0x2ef211(0x240)](_0x2ef211(0x250)+_0x2cfb62+_0x2ef211(0x243),{'body':_0xd363e8});return!_0x4c8d88[_0x2ef211(0x23d)][_0x2ef211(0x228)]||_0x4c8d88[_0x2ef211(0x23d)]['error'][_0x2ef211(0x217)]===0x1;}async[_0x4b08f6(0x22a)](_0x1c516a,_0xc04e78,_0xa14884,_0x1e63fd){const _0x157122=_0x4b08f6,_0x545857={'memberId':(await this['_sessionService'][_0x157122(0x251)](_0x1c516a))[_0x157122(0x225)](),'threadId':_0xa14884,'replyId':_0x1e63fd,'unitId':_0x1c516a},_0x43ea47=await this['_httpService'][_0x157122(0x240)](_0x157122(0x250)+_0x1c516a+_0x157122(0x226),{'body':_0x545857});return!_0x43ea47['body'][_0x157122(0x228)]||_0x43ea47[_0x157122(0x23d)][_0x157122(0x228)]['code']===0x1;}async['listComments'](_0x434bc,_0x302d82,_0x172f4f){const _0x8af3f7=_0x4b08f6,_0x4adfdd={'unitId':_0x434bc,'threadId':_0x172f4f},_0x145006=await this['_httpService'][_0x8af3f7(0x240)](_0x8af3f7(0x250)+_0x434bc+_0x8af3f7(0x24f),{'body':_0x4adfdd}),_0x567911=_0x172f4f['map'](_0x1e2373=>ee(_0x145006[_0x8af3f7(0x23d)][_0x8af3f7(0x1fd)][_0x1e2373],_0x434bc,_0x302d82))[_0x8af3f7(0x21d)](Boolean);return Object[_0x8af3f7(0x209)](_0x145006[_0x8af3f7(0x23d)][_0x8af3f7(0x247)])[_0x8af3f7(0x24c)](_0x5763e9=>{const _0x124be9=_0x8af3f7;this[_0x124be9(0x24a)][_0x124be9(0x21f)](_0x5763e9);}),_0x567911;}['saveCommentToSnapshot'](_0x4a24c7){return{'id':_0x4a24c7['id'],'threadId':_0x4a24c7['threadId'],'ref':_0x4a24c7['ref']};}};function _0x381c(_0x3f7cc3,_0x2c96f6){const _0x4e29cf=_0x4e29();return _0x381c=function(_0x381c4e,_0x462b14){_0x381c4e=_0x381c4e-0x1f3;let _0x38e225=_0x4e29cf[_0x381c4e];return _0x38e225;},_0x381c(_0x3f7cc3,_0x2c96f6);}S=Q([b(0x0,_0x33eaaf(_0x3fadc1)),b(0x1,_0x33eaaf(_0x229c9b)),b(0x2,_0x33eaaf(_0x12bcca))],S);var re=Object[_0x4b08f6(0x20b)],te=(_0x252623,_0x1bf283,_0x5b35f7,_0x4c1d65)=>{const _0x8d8ea4=_0x4b08f6;for(var _0x630a01=_0x4c1d65>0x1?void 0x0:_0x4c1d65?re(_0x1bf283,_0x5b35f7):_0x1bf283,_0x3a0ed7=_0x252623[_0x8d8ea4(0x203)]-0x1,_0x1bfa19;_0x3a0ed7>=0x0;_0x3a0ed7--)(_0x1bfa19=_0x252623[_0x3a0ed7])&&(_0x630a01=_0x1bfa19(_0x630a01)||_0x630a01);return _0x630a01;},M=(_0x21c651,_0x45bb1a)=>(_0x3a54fa,_0x1e2364)=>_0x45bb1a(_0x3a54fa,_0x1e2364,_0x21c651);function _0x4e29(){const _0x585bac=['1094967usSBuy','resolveComment','dataSource','_initUserSync','userId','Solve','size','unitId','_httpService','8614295JIhLsD','588932pDloOn','160VRHUoP','type','thread-comment-data-source.config','onReady','onStarting','body','stringify','reply','post','Solved','665360hafJzi','/solved','getComment','replies','Add','users','rangeType','createTimestamp','_userService','/add','forEach','parse','_sessionService','/list','/universer-api/comment/unit/','requireSession','add','/universer-api/user/list','/reply','syncUpdateMutationToColla','Reply','userID','updateComment','_threadCommentDataSource','202748MLtGBD','personId','find','rangeId','916902qWQYUw','OpenOrReOpen','comments','_threadCommentModel','Delete','_configService','Edit','delete','length','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','pluginName','format','values','_init','getOwnPropertyDescriptor','user','_initDataSource','_injector','_commentService','_threadCommentDataSourceService','root','parentId','UNRECOGNIZED','2133378hRNyIo','solved','map','code','replyId','content','getUnit','payload','threadId','filter','getCurrentUser','addUser','addComment','subscribe','/edit','Unknown','disposeWithMe','getMemberID','/delete','commentUpdate$','error','_config','deleteComment','YYYY/MM/DD\x20HH:mm','COMMENT'];_0x4e29=function(){return _0x585bac;};return _0x4e29();}let f=class extends _0x22017b{constructor(_0x1fbce7,_0x4aef7f){const _0x5f1cb9=_0x4b08f6;super(),this[_0x5f1cb9(0x210)]=_0x1fbce7,this['_threadCommentDataSource']=_0x4aef7f,this[_0x5f1cb9(0x20d)]();}[_0x4b08f6(0x20d)](){const _0x39bd99=_0x4b08f6;this[_0x39bd99(0x210)][_0x39bd99(0x22f)]=this[_0x39bd99(0x1f6)],this[_0x39bd99(0x210)][_0x39bd99(0x255)]=!0x1;}};f=te([M(0x0,_0x44c2d7),M(0x1,_0x33eaaf(S))],f);var se=Object[_0x4b08f6(0x206)],oe=Object[_0x4b08f6(0x20b)],ne=(_0x5ddfcd,_0x2cba70,_0x3450f2)=>_0x2cba70 in _0x5ddfcd?se(_0x5ddfcd,_0x2cba70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3450f2}):_0x5ddfcd[_0x2cba70]=_0x3450f2,ie=(_0x240900,_0x3a6d81,_0x175be9,_0x1bbd9d)=>{const _0x2a7aab=_0x4b08f6;for(var _0x41f05f=_0x1bbd9d>0x1?void 0x0:_0x1bbd9d?oe(_0x3a6d81,_0x175be9):_0x3a6d81,_0x37d7ea=_0x240900[_0x2a7aab(0x203)]-0x1,_0x460391;_0x37d7ea>=0x0;_0x37d7ea--)(_0x460391=_0x240900[_0x37d7ea])&&(_0x41f05f=_0x460391(_0x41f05f)||_0x41f05f);return _0x41f05f;},N=(_0x43b8be,_0x4cd569)=>(_0x3ca44b,_0x15e210)=>_0x4cd569(_0x3ca44b,_0x15e210,_0x43b8be),$=(_0x31d1cc,_0x54acf3,_0x8c279f)=>ne(_0x31d1cc,typeof _0x54acf3!='symbol'?_0x54acf3+'':_0x54acf3,_0x8c279f);let g=class extends _0x45a9df{constructor(_0x2b5b1a=O,_0x5703f0,_0xc3bc18){const _0x3d3b28=_0x4b08f6;super(),this['_config']=_0x2b5b1a,this['_injector']=_0x5703f0,this[_0x3d3b28(0x200)]=_0xc3bc18;const {..._0x67b588}=_0x59e53c({},O,this[_0x3d3b28(0x229)]);this['_configService'][_0x3d3b28(0x204)](z,_0x67b588);}[_0x4b08f6(0x23c)](){const _0x58203a=_0x4b08f6;[[S],[f],[_]][_0x58203a(0x24c)](_0x1f486d=>{const _0x58d8d3=_0x58203a;this[_0x58d8d3(0x20e)][_0x58d8d3(0x252)](_0x1f486d);});}[_0x4b08f6(0x23b)](){const _0x235f92=_0x4b08f6;this[_0x235f92(0x20e)]['get'](f),this[_0x235f92(0x20e)]['get'](_);}};$(g,_0x4b08f6(0x207),W),$(g,_0x4b08f6(0x239),_0x52cebc['UNIVER_UNKNOWN']),g=ie([_0x4925bc(_0x341ce2,_0x3ab8c5,_0x3e3ea1),N(0x1,_0x33eaaf(_0x2b41cd)),N(0x2,_0x4a913c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x3f64(_0x3b64fa,_0x56d3c4){const _0x6450a6=_0x6450();return _0x3f64=function(_0x3f6401,_0x29c2fc){_0x3f6401=_0x3f6401-0x6e;let _0x24bdbb=_0x6450a6[_0x3f6401];return _0x24bdbb;},_0x3f64(_0x3b64fa,_0x56d3c4);}const _0x1da137=_0x3f64;(function(_0x2f9ee6,_0x3c6deb){const _0xda3c7a=_0x3f64,_0x4448b3=_0x2f9ee6();while(!![]){try{const _0x2966e1=-parseInt(_0xda3c7a(0x9e))/0x1+parseInt(_0xda3c7a(0x6e))/0x2*(-parseInt(_0xda3c7a(0xaa))/0x3)+parseInt(_0xda3c7a(0x7c))/0x4*(-parseInt(_0xda3c7a(0xbb))/0x5)+parseInt(_0xda3c7a(0xbf))/0x6*(-parseInt(_0xda3c7a(0xbc))/0x7)+-parseInt(_0xda3c7a(0x96))/0x8*(parseInt(_0xda3c7a(0xac))/0x9)+-parseInt(_0xda3c7a(0xb8))/0xa+parseInt(_0xda3c7a(0x86))/0xb;if(_0x2966e1===_0x3c6deb)break;else _0x4448b3['push'](_0x4448b3['shift']());}catch(_0x1db320){_0x4448b3['push'](_0x4448b3['shift']());}}}(_0x6450,0x349ca));import{CommentService as _0x2831eb,CollaborationSessionService as _0x3049f7,UniverCollaborationClientPlugin as _0x333c4c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x29719d}from'@univerjs-pro/license';function _0x6450(){const _0x20c233=['commentUpdate$','format','/universer-api/comment/unit/','parse','11337LnJjGP','Edit','4041VYIDLK','parentId','error','/list','addComment','_userService','getMemberID','reply','Solved','dataSource','requireSession','stringify','2773250YBAdAh','createTimestamp','Delete','10240gaUCsW','1308573bzGPuA','resolved','Reply','12DtFjhF','_init','type','COMMENT','customRanges','length','thread-comment-data-source.config','/delete','add','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','symbol','onReady','Solve','userId','content','_injector','subscribe','getUnit','body','_commentService','82RjsEsd','resolveComment','_configService','filter','getCurrentUser','user','disposeWithMe','_sessionService','Add','_threadCommentModel','OpenOrReOpen','map','size','UNIVER_UNKNOWN','168mIISvj','getOwnPropertyDescriptor','slice','/edit','users','solved','get','saveCommentToSnapshot','replies','UNRECOGNIZED','16974100ITrjDx','delete','_config','/reply','updateComment','values','_threadCommentDataSource','post','getComment','replyId','threadId','addUser','_initUserSync','setConfig','_httpService','_initDataSource','7040vjvaqc','code','pluginName','YYYY/MM/DD\x20HH:mm','pipe','find','personId','listComments','40324VrKpWB','/solved','comment','unitId','_threadCommentDataSourceService','forEach','deleteComment','rangeId'];_0x6450=function(){return _0x20c233;};return _0x6450();}import{dayjs as _0x3d401c,UserManagerService as _0x4b1fbd,Inject as _0x32b3e4,Injector as _0x4855ea,Disposable as _0x414048,CustomRangeType as _0x4202d3,UniverInstanceType as _0xeb4be8,DependentOn as _0xbb1ffb,IConfigService as _0x42c379,Plugin as _0x52d8e0,merge as _0x3742e4}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1332b2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x379ffd,IThreadCommentDataSourceService as _0x5834d3}from'@univerjs/thread-comment';import{bufferTime as _0x162adc}from'rxjs';import{HTTPService as _0x50d39a}from'@univerjs/network';const W=_0x1da137(0xc9);var I=(_0x2559f7=>(_0x2559f7[_0x2559f7['OpenOrReOpen']=0x0]=_0x1da137(0x78),_0x2559f7[_0x2559f7[_0x1da137(0xb4)]=0x1]=_0x1da137(0xb4),_0x2559f7[_0x2559f7['UNRECOGNIZED']=-0x1]=_0x1da137(0x85),_0x2559f7))(I||{}),v=(_0x434376=>(_0x434376[_0x434376[_0x1da137(0xc8)]=0x0]=_0x1da137(0xc8),_0x434376[_0x434376[_0x1da137(0x76)]=0x1]='Add',_0x434376[_0x434376[_0x1da137(0xbe)]=0x2]=_0x1da137(0xbe),_0x434376[_0x434376[_0x1da137(0xab)]=0x3]=_0x1da137(0xab),_0x434376[_0x434376[_0x1da137(0xba)]=0x4]=_0x1da137(0xba),_0x434376[_0x434376['Solve']=0x5]=_0x1da137(0xcc),_0x434376[_0x434376[_0x1da137(0x85)]=-0x1]=_0x1da137(0x85),_0x434376))(v||{});const y=_0xf65b59=>_0x3d401c(new Date(+_0xf65b59))[_0x1da137(0xa7)](_0x1da137(0x99)),B=async(_0x1ca152,_0x939d99)=>{const _0x3b6b5c=_0x1da137,_0x39205e=_0x1ca152[_0x3b6b5c(0x82)](_0x4b1fbd),_0x2126cf=_0x1ca152[_0x3b6b5c(0x82)](_0x50d39a);_0x939d99[_0x3b6b5c(0xa3)](_0x14ec9f=>{const _0x2bf392=_0x3b6b5c;_0x39205e['getUser'](_0x14ec9f)&&_0x939d99[_0x2bf392(0x87)](_0x14ec9f);}),_0x939d99[_0x3b6b5c(0x7a)]&&(await _0x2126cf[_0x3b6b5c(0x82)]('/universer-api/user/list',{'params':{'userIDs':[..._0x939d99]}}))[_0x3b6b5c(0xd2)][_0x3b6b5c(0x80)]['forEach'](_0x19f63d=>{const _0x1336d3=_0x3b6b5c;_0x19f63d&&_0x39205e[_0x1336d3(0x91)](_0x19f63d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2a670c,_0x11948b,_0x55bd28,_0x450891)=>{const _0x15e56d=_0x1da137;for(var _0x312abe=_0x450891>0x1?void 0x0:_0x450891?K(_0x11948b,_0x55bd28):_0x11948b,_0x52fece=_0x2a670c[_0x15e56d(0xc4)]-0x1,_0xd1ef14;_0x52fece>=0x0;_0x52fece--)(_0xd1ef14=_0x2a670c[_0x52fece])&&(_0x312abe=_0xd1ef14(_0x312abe)||_0x312abe);return _0x312abe;},p=(_0xb36cb6,_0x3451c2)=>(_0x3ca70f,_0x5df360)=>_0x3451c2(_0x3ca70f,_0x5df360,_0xb36cb6);let _=class extends _0x414048{constructor(_0x44c7be,_0x2000a8,_0x54edb1,_0x1f4292){const _0x5a72d9=_0x1da137;super(),this[_0x5a72d9(0xd3)]=_0x44c7be,this['_threadCommentModel']=_0x2000a8,this[_0x5a72d9(0xb1)]=_0x54edb1,this[_0x5a72d9(0xcf)]=_0x1f4292,this[_0x5a72d9(0xc0)](),this[_0x5a72d9(0x92)]();}[_0x1da137(0x92)](){const _0xa672a7=_0x1da137;this[_0xa672a7(0x74)](this['_threadCommentModel'][_0xa672a7(0xa6)][_0xa672a7(0x9a)](_0x162adc(0x10))[_0xa672a7(0xd0)](_0x4606be=>{const _0x5c80cf=new Set();_0x4606be['forEach'](_0x444730=>{const _0x3040ea=_0x3f64;switch(_0x444730[_0x3040ea(0xc1)]){case'add':{const _0x1190ba=_0x444730['payload'][_0x3040ea(0x9c)];_0x5c80cf[_0x3040ea(0xc7)](_0x1190ba);break;}}}),B(this['_injector'],_0x5c80cf);}));}[_0x1da137(0xc0)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x2c7ae5=>{const _0x581010=_0x3f64;var _0x2f7daf,_0x43819a,_0x5511c9,_0x41a2f5;const _0x4e2c51=(_0x2f7daf=this[_0x581010(0x77)][_0x581010(0xd1)](_0x2c7ae5[_0x581010(0xa1)])[_0x581010(0x9b)](_0x567f86=>_0x567f86['threadId']===_0x2c7ae5[_0x581010(0x90)]))==null?void 0x0:_0x2f7daf['root'];if(!_0x4e2c51)return;const {unitId:_0x3c87a1,subUnitId:_0x36ad09}=_0x4e2c51;switch(_0x2c7ae5[_0x581010(0x73)]&&this[_0x581010(0xb1)][_0x581010(0x91)](_0x2c7ae5['user']),_0x2c7ae5[_0x581010(0xc1)]){case v[_0x581010(0x76)]:break;case v[_0x581010(0xbe)]:{this[_0x581010(0x77)][_0x581010(0xb0)](_0x3c87a1,_0x36ad09,{'unitId':_0x3c87a1,'subUnitId':_0x36ad09,'ref':'','id':_0x2c7ae5['replyId'],'dT':y(+_0x2c7ae5[_0x581010(0xb9)]),'threadId':_0x2c7ae5[_0x581010(0x90)],'personId':(_0x5511c9=(_0x43819a=_0x2c7ae5[_0x581010(0x73)])==null?void 0x0:_0x43819a['userID'])!=null?_0x5511c9:_0x2c7ae5[_0x581010(0xcd)],'text':JSON[_0x581010(0xa9)](_0x2c7ae5[_0x581010(0xce)]),'parentId':_0x4e2c51['id']});break;}case v[_0x581010(0xba)]:{const _0x1c11ac=this[_0x581010(0x77)][_0x581010(0x8e)](_0x3c87a1,_0x36ad09,_0x2c7ae5[_0x581010(0x8f)]);_0x1c11ac&&_0x1c11ac[_0x581010(0xad)]&&this[_0x581010(0x77)][_0x581010(0xa4)](_0x3c87a1,_0x36ad09,_0x2c7ae5['replyId']);break;}case v[_0x581010(0xab)]:{this[_0x581010(0x77)][_0x581010(0x8a)](_0x3c87a1,_0x36ad09,{'commentId':_0x2c7ae5['replyId'],'text':JSON[_0x581010(0xa9)](_0x2c7ae5['content'])});break;}case v[_0x581010(0xcc)]:{const _0x5965d0=(_0x41a2f5=this[_0x581010(0x77)]['getUnit'](_0x2c7ae5['unitId'])['find'](_0x310b72=>_0x310b72[_0x581010(0x90)]===_0x2c7ae5[_0x581010(0x90)]))==null?void 0x0:_0x41a2f5['root'];_0x5965d0&&this[_0x581010(0x77)]['resolveComment'](_0x3c87a1,_0x36ad09,_0x5965d0['id'],_0x2c7ae5[_0x581010(0x81)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x32b3e4(_0x2831eb)),p(0x1,_0x32b3e4(_0x379ffd)),p(0x2,_0x32b3e4(_0x4b1fbd)),p(0x3,_0x32b3e4(_0x4855ea))],_);const z=_0x1da137(0xc5),O={};var k=Object[_0x1da137(0x7d)],Q=(_0x17282d,_0x42cc3e,_0x2bc69f,_0x4a078e)=>{for(var _0x316f5f=_0x4a078e>0x1?void 0x0:_0x4a078e?k(_0x42cc3e,_0x2bc69f):_0x42cc3e,_0x396512=_0x17282d['length']-0x1,_0x2874d8;_0x396512>=0x0;_0x396512--)(_0x2874d8=_0x17282d[_0x396512])&&(_0x316f5f=_0x2874d8(_0x316f5f)||_0x316f5f);return _0x316f5f;},b=(_0x40b419,_0x17239d)=>(_0x569a88,_0x1aeffd)=>_0x17239d(_0x569a88,_0x1aeffd,_0x40b419);function X(_0x35031d,_0x247b57){const _0x5e9500=_0x1da137,_0x2559a7=_0x35031d[_0x5e9500(0x84)][0x0];return{..._0x247b57,'id':_0x2559a7[_0x5e9500(0x8f)],'resolved':_0x35031d['solved']===0x1,'dT':y(_0x2559a7[_0x5e9500(0xb9)]),'personId':_0x2559a7[_0x5e9500(0xcd)],'threadId':_0x2559a7['threadId']};}function ee(_0x3249e1,_0x29842c,_0x4ac7c4){const _0x503035=_0x1da137;var _0x5a5e38,_0x4071b;if(((_0x4071b=(_0x5a5e38=_0x3249e1==null?void 0x0:_0x3249e1[_0x503035(0x84)])==null?void 0x0:_0x5a5e38[_0x503035(0xc4)])!=null?_0x4071b:0x0)>0x0){const _0x282b77=(_0x23e0a1,_0x1fdd17)=>({'id':_0x23e0a1['replyId'],'threadId':_0x23e0a1[_0x503035(0x90)],'dT':y(_0x23e0a1[_0x503035(0xb9)]),'personId':_0x23e0a1[_0x503035(0xcd)],'resolved':_0x3249e1['solved']===I[_0x503035(0xb4)],'unitId':_0x29842c,'subUnitId':_0x4ac7c4,'text':JSON[_0x503035(0xa9)](_0x23e0a1[_0x503035(0xce)]),'parentId':_0x1fdd17}),_0x35c5a7=_0x282b77(_0x3249e1[_0x503035(0x84)][0x0]);return{..._0x35c5a7,'children':_0x3249e1[_0x503035(0x84)][_0x503035(0x7e)](0x1)['map'](_0x2c997b=>_0x282b77(_0x2c997b,_0x35c5a7['id']))};}return null;}let S=class{constructor(_0x34892f,_0x3b97b8,_0x56ede4){const _0x3c22c0=_0x1da137;this[_0x3c22c0(0x94)]=_0x34892f,this['_userService']=_0x3b97b8,this[_0x3c22c0(0x75)]=_0x56ede4;}async[_0x1da137(0xb0)](_0x3b4e2f){const _0x2a613d=_0x1da137;var _0x1141d8,_0x25aac4;const {parentId:_0x10f512,unitId:_0x45bd0a,text:_0xa716b7,threadId:_0x2037ec}=_0x3b4e2f,_0x1dd5dc=(_0x25aac4=(_0x1141d8=_0xa716b7[_0x2a613d(0xc3)])==null?void 0x0:_0x1141d8[_0x2a613d(0x71)](_0x10813c=>_0x10813c['rangeType']===_0x4202d3['COMMENT'])[_0x2a613d(0x79)](_0x40ff9f=>_0x40ff9f[_0x2a613d(0xa5)]))!=null?_0x25aac4:[],_0x319708=JSON[_0x2a613d(0xb7)](_0xa716b7),_0x3db2b1=(await this[_0x2a613d(0x75)][_0x2a613d(0xb6)](_0x45bd0a))['getMemberID']();if(_0x10f512){const _0x4d0309={'memberId':_0x3db2b1,'unitId':_0x45bd0a,'content':_0x319708,'mention':_0x1dd5dc,'threadId':_0x2037ec},_0x237235=(await this['_httpService']['post'](_0x2a613d(0xa8)+_0x45bd0a+_0x2a613d(0x89),{'body':_0x4d0309}))[_0x2a613d(0xd2)][_0x2a613d(0xb3)];return{..._0x3b4e2f,'id':_0x237235['replyId'],'dT':_0x3d401c(+_0x237235['createTimestamp'])[_0x2a613d(0xa7)](_0x2a613d(0x99)),'personId':_0x237235[_0x2a613d(0xcd)]};}else{const _0x213365={'memberId':_0x3db2b1,'unitId':_0x45bd0a,'content':_0x319708,'mention':_0x1dd5dc},_0x219ba4=await this[_0x2a613d(0x94)]['post'](_0x2a613d(0xa8)+_0x45bd0a+'/add',{'body':_0x213365});return X(_0x219ba4[_0x2a613d(0xd2)][_0x2a613d(0xa0)],_0x3b4e2f);}}async[_0x1da137(0x8a)](_0x59ec8c){const _0x577b35=_0x1da137;var _0x299e6a,_0xc71e6f;const {text:_0x5c1c92,unitId:_0x4fa446}=_0x59ec8c,_0xcd7d21=(_0xc71e6f=(_0x299e6a=_0x5c1c92[_0x577b35(0xc3)])==null?void 0x0:_0x299e6a[_0x577b35(0x71)](_0x4c0787=>_0x4c0787['rangeType']===_0x4202d3[_0x577b35(0xc2)])[_0x577b35(0x79)](_0x453757=>_0x453757[_0x577b35(0xa5)]))!=null?_0xc71e6f:[],_0x35e2c5=JSON[_0x577b35(0xb7)](_0x5c1c92),_0x2904c3=_0x59ec8c['threadId'],_0x290099=_0x59ec8c['id'],_0x2f8ae5={'memberId':(await this[_0x577b35(0x75)][_0x577b35(0xb6)](_0x4fa446))['getMemberID'](),'unitId':_0x4fa446,'threadId':_0x2904c3,'mention':_0xcd7d21,'content':_0x35e2c5,'replyId':_0x290099},_0x5dbbfe=await this[_0x577b35(0x94)][_0x577b35(0x8d)](_0x577b35(0xa8)+_0x4fa446+_0x577b35(0x7f),{'body':_0x2f8ae5});return!_0x5dbbfe[_0x577b35(0xd2)][_0x577b35(0xae)]||_0x5dbbfe[_0x577b35(0xd2)][_0x577b35(0xae)]['code']===0x1;}async[_0x1da137(0x6f)](_0x2f2a93){const _0x3b7439=_0x1da137,{unitId:_0x56f92f}=_0x2f2a93,_0xc81729=_0x2f2a93[_0x3b7439(0x90)],_0x3528e3={'memberId':this[_0x3b7439(0xb1)][_0x3b7439(0x72)]()['userID'],'unitId':_0x56f92f,'threadId':_0xc81729,'solved':_0x2f2a93[_0x3b7439(0xbd)]?I[_0x3b7439(0xb4)]:I[_0x3b7439(0x78)]},_0x35e471=await this[_0x3b7439(0x94)][_0x3b7439(0x8d)]('/universer-api/comment/unit/'+_0x56f92f+_0x3b7439(0x9f),{'body':_0x3528e3});return!_0x35e471[_0x3b7439(0xd2)]['error']||_0x35e471[_0x3b7439(0xd2)][_0x3b7439(0xae)]['code']===0x1;}async[_0x1da137(0xa4)](_0x1eaab9,_0x29d1a7,_0x2815ac,_0xb1636f){const _0x37bd26=_0x1da137,_0x56a30a={'memberId':(await this[_0x37bd26(0x75)][_0x37bd26(0xb6)](_0x1eaab9))[_0x37bd26(0xb2)](),'threadId':_0x2815ac,'replyId':_0xb1636f,'unitId':_0x1eaab9},_0x2bb709=await this[_0x37bd26(0x94)][_0x37bd26(0x8d)](_0x37bd26(0xa8)+_0x1eaab9+_0x37bd26(0xc6),{'body':_0x56a30a});return!_0x2bb709[_0x37bd26(0xd2)]['error']||_0x2bb709['body'][_0x37bd26(0xae)][_0x37bd26(0x97)]===0x1;}async[_0x1da137(0x9d)](_0xddbcb9,_0x30ef1b,_0x2be069){const _0x521047=_0x1da137,_0x1c3ded={'unitId':_0xddbcb9,'threadId':_0x2be069},_0x15b868=await this[_0x521047(0x94)][_0x521047(0x8d)](_0x521047(0xa8)+_0xddbcb9+_0x521047(0xaf),{'body':_0x1c3ded}),_0x265843=_0x2be069[_0x521047(0x79)](_0x4c566a=>ee(_0x15b868[_0x521047(0xd2)]['comments'][_0x4c566a],_0xddbcb9,_0x30ef1b))[_0x521047(0x71)](Boolean);return Object[_0x521047(0x8b)](_0x15b868[_0x521047(0xd2)][_0x521047(0x80)])[_0x521047(0xa3)](_0x3c0a0d=>{const _0x1588c9=_0x521047;this[_0x1588c9(0xb1)][_0x1588c9(0x91)](_0x3c0a0d);}),_0x265843;}[_0x1da137(0x83)](_0x15d39e){return{'id':_0x15d39e['id'],'threadId':_0x15d39e['threadId'],'ref':_0x15d39e['ref']};}};S=Q([b(0x0,_0x32b3e4(_0x50d39a)),b(0x1,_0x32b3e4(_0x4b1fbd)),b(0x2,_0x32b3e4(_0x3049f7))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2ad87b,_0x38f0f8,_0x476a31,_0x11fc79)=>{const _0x228e64=_0x1da137;for(var _0x144f92=_0x11fc79>0x1?void 0x0:_0x11fc79?re(_0x38f0f8,_0x476a31):_0x38f0f8,_0x52efff=_0x2ad87b[_0x228e64(0xc4)]-0x1,_0x264b74;_0x52efff>=0x0;_0x52efff--)(_0x264b74=_0x2ad87b[_0x52efff])&&(_0x144f92=_0x264b74(_0x144f92)||_0x144f92);return _0x144f92;},M=(_0x11c12f,_0x4328c3)=>(_0x2d642a,_0x6c9997)=>_0x4328c3(_0x2d642a,_0x6c9997,_0x11c12f);let f=class extends _0x414048{constructor(_0x43573a,_0x3549b2){const _0xf68e3a=_0x1da137;super(),this[_0xf68e3a(0xa2)]=_0x43573a,this[_0xf68e3a(0x8c)]=_0x3549b2,this[_0xf68e3a(0x95)]();}[_0x1da137(0x95)](){const _0x123c0e=_0x1da137;this['_threadCommentDataSourceService'][_0x123c0e(0xb5)]=this[_0x123c0e(0x8c)],this[_0x123c0e(0xa2)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x5834d3),M(0x1,_0x32b3e4(S))],f);var se=Object['defineProperty'],oe=Object[_0x1da137(0x7d)],ne=(_0x72e111,_0x5d9925,_0x1b6e61)=>_0x5d9925 in _0x72e111?se(_0x72e111,_0x5d9925,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1b6e61}):_0x72e111[_0x5d9925]=_0x1b6e61,ie=(_0x567398,_0x3ab671,_0x2e0399,_0x52fb9d)=>{for(var _0x4ac6de=_0x52fb9d>0x1?void 0x0:_0x52fb9d?oe(_0x3ab671,_0x2e0399):_0x3ab671,_0x1d4d34=_0x567398['length']-0x1,_0x24f7bf;_0x1d4d34>=0x0;_0x1d4d34--)(_0x24f7bf=_0x567398[_0x1d4d34])&&(_0x4ac6de=_0x24f7bf(_0x4ac6de)||_0x4ac6de);return _0x4ac6de;},N=(_0xaec6b,_0xa3ffa7)=>(_0x4c3c11,_0x487471)=>_0xa3ffa7(_0x4c3c11,_0x487471,_0xaec6b),$=(_0x4be9b3,_0x4217d7,_0x3c99a5)=>ne(_0x4be9b3,typeof _0x4217d7!=_0x1da137(0xca)?_0x4217d7+'':_0x4217d7,_0x3c99a5);let g=class extends _0x52d8e0{constructor(_0x8e2e30=O,_0x8515ed,_0x56ae5e){const _0x1f4d9a=_0x1da137;super(),this[_0x1f4d9a(0x88)]=_0x8e2e30,this[_0x1f4d9a(0xcf)]=_0x8515ed,this[_0x1f4d9a(0x70)]=_0x56ae5e;const {..._0x2e82ea}=_0x3742e4({},O,this[_0x1f4d9a(0x88)]);this[_0x1f4d9a(0x70)][_0x1f4d9a(0x93)](z,_0x2e82ea);}['onStarting'](){const _0x298e23=_0x1da137;[[S],[f],[_]][_0x298e23(0xa3)](_0x290910=>{const _0x4988eb=_0x298e23;this['_injector'][_0x4988eb(0xc7)](_0x290910);});}[_0x1da137(0xcb)](){const _0x571325=_0x1da137;this[_0x571325(0xcf)][_0x571325(0x82)](f),this['_injector']['get'](_);}};$(g,_0x1da137(0x98),W),$(g,'type',_0xeb4be8[_0x1da137(0x7b)]),g=ie([_0xbb1ffb(_0x1332b2,_0x333c4c,_0x29719d),N(0x1,_0x32b3e4(_0x4855ea)),N(0x2,_0x42c379)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4b08f6=_0x381c;(function(_0x1a1802,_0x58703d){const _0x1f5d02=_0x381c,_0x11f7ef=_0x1a1802();while(!![]){try{const _0x25d3d1=parseInt(_0x1f5d02(0x22d))/0x1+parseInt(_0x1f5d02(0x242))/0x2+parseInt(_0x1f5d02(0x214))/0x3+parseInt(_0x1f5d02(0x237))/0x4+-parseInt(_0x1f5d02(0x236))/0x5+-parseInt(_0x1f5d02(0x1fb))/0x6+parseInt(_0x1f5d02(0x1f7))/0x7*(parseInt(_0x1f5d02(0x238))/0x8);if(_0x25d3d1===_0x58703d)break;else _0x11f7ef['push'](_0x11f7ef['shift']());}catch(_0xca3c9b){_0x11f7ef['push'](_0x11f7ef['shift']());}}}(_0x4e29,0xf19aa));import{CommentService as _0x3fd2fc,CollaborationSessionService as _0x12bcca,UniverCollaborationClientPlugin as _0x3ab8c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3e3ea1}from'@univerjs-pro/license';import{dayjs as _0x1f5eeb,UserManagerService as _0x229c9b,Inject as _0x33eaaf,Injector as _0x2b41cd,Disposable as _0x22017b,CustomRangeType as _0x2a62af,UniverInstanceType as _0x52cebc,DependentOn as _0x4925bc,IConfigService as _0x4a913c,Plugin as _0x45a9df,merge as _0x59e53c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x341ce2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4adb5b,IThreadCommentDataSourceService as _0x44c2d7}from'@univerjs/thread-comment';import{bufferTime as _0x250720}from'rxjs';import{HTTPService as _0x3fadc1}from'@univerjs/network';const W=_0x4b08f6(0x205);var I=(_0x2c0f1b=>(_0x2c0f1b[_0x2c0f1b[_0x4b08f6(0x1fc)]=0x0]=_0x4b08f6(0x1fc),_0x2c0f1b[_0x2c0f1b['Solved']=0x1]=_0x4b08f6(0x241),_0x2c0f1b[_0x2c0f1b[_0x4b08f6(0x213)]=-0x1]=_0x4b08f6(0x213),_0x2c0f1b))(I||{}),v=(_0x15443b=>(_0x15443b[_0x15443b[_0x4b08f6(0x223)]=0x0]=_0x4b08f6(0x223),_0x15443b[_0x15443b[_0x4b08f6(0x246)]=0x1]=_0x4b08f6(0x246),_0x15443b[_0x15443b[_0x4b08f6(0x1f3)]=0x2]=_0x4b08f6(0x1f3),_0x15443b[_0x15443b[_0x4b08f6(0x201)]=0x3]=_0x4b08f6(0x201),_0x15443b[_0x15443b[_0x4b08f6(0x1ff)]=0x4]=_0x4b08f6(0x1ff),_0x15443b[_0x15443b[_0x4b08f6(0x232)]=0x5]='Solve',_0x15443b[_0x15443b['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x15443b))(v||{});const y=_0x47d6cb=>_0x1f5eeb(new Date(+_0x47d6cb))[_0x4b08f6(0x208)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x344108,_0x2bcc6a)=>{const _0x4a8820=_0x4b08f6,_0x27ce93=_0x344108['get'](_0x229c9b),_0x2213dc=_0x344108['get'](_0x3fadc1);_0x2bcc6a[_0x4a8820(0x24c)](_0x38f3a6=>{const _0x514a27=_0x4a8820;_0x27ce93['getUser'](_0x38f3a6)&&_0x2bcc6a[_0x514a27(0x202)](_0x38f3a6);}),_0x2bcc6a[_0x4a8820(0x233)]&&(await _0x2213dc['get'](_0x4a8820(0x253),{'params':{'userIDs':[..._0x2bcc6a]}}))['body'][_0x4a8820(0x247)][_0x4a8820(0x24c)](_0x2cdec8=>{const _0x5e3604=_0x4a8820;_0x2cdec8&&_0x27ce93[_0x5e3604(0x21f)](_0x2cdec8);});};var K=Object[_0x4b08f6(0x20b)],V=(_0x5b99c2,_0x33ee89,_0x2f33c1,_0x239cf2)=>{const _0x230da9=_0x4b08f6;for(var _0x47df6e=_0x239cf2>0x1?void 0x0:_0x239cf2?K(_0x33ee89,_0x2f33c1):_0x33ee89,_0x131464=_0x5b99c2[_0x230da9(0x203)]-0x1,_0x268999;_0x131464>=0x0;_0x131464--)(_0x268999=_0x5b99c2[_0x131464])&&(_0x47df6e=_0x268999(_0x47df6e)||_0x47df6e);return _0x47df6e;},p=(_0x16a3fa,_0x3dec0f)=>(_0x328608,_0x27e4e3)=>_0x3dec0f(_0x328608,_0x27e4e3,_0x16a3fa);let _=class extends _0x22017b{constructor(_0x3c2990,_0x71bcfc,_0xdab49d,_0x2661da){const _0x1dc93b=_0x4b08f6;super(),this[_0x1dc93b(0x20f)]=_0x3c2990,this['_threadCommentModel']=_0x71bcfc,this[_0x1dc93b(0x24a)]=_0xdab49d,this[_0x1dc93b(0x20e)]=_0x2661da,this[_0x1dc93b(0x20a)](),this[_0x1dc93b(0x230)]();}[_0x4b08f6(0x230)](){const _0x12537b=_0x4b08f6;this[_0x12537b(0x224)](this['_threadCommentModel'][_0x12537b(0x227)]['pipe'](_0x250720(0x10))[_0x12537b(0x221)](_0x146eac=>{const _0x522a8b=_0x12537b,_0x1e65a9=new Set();_0x146eac[_0x522a8b(0x24c)](_0x39566c=>{const _0x56c8e5=_0x522a8b;switch(_0x39566c[_0x56c8e5(0x239)]){case _0x56c8e5(0x252):{const _0x4585e5=_0x39566c[_0x56c8e5(0x21b)][_0x56c8e5(0x1f8)];_0x1e65a9[_0x56c8e5(0x252)](_0x4585e5);break;}}}),B(this[_0x522a8b(0x20e)],_0x1e65a9);}));}[_0x4b08f6(0x20a)](){const _0x4f48c1=_0x4b08f6;this[_0x4f48c1(0x224)](this[_0x4f48c1(0x20f)][_0x4f48c1(0x227)][_0x4f48c1(0x221)](async _0x5677ef=>{const _0xf18cf2=_0x4f48c1;var _0x57000e,_0x51cc66,_0x3797cf,_0x2050e5;const _0x311cf8=(_0x57000e=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x21a)](_0x5677ef[_0xf18cf2(0x234)])['find'](_0x2b9494=>_0x2b9494[_0xf18cf2(0x21c)]===_0x5677ef[_0xf18cf2(0x21c)]))==null?void 0x0:_0x57000e[_0xf18cf2(0x211)];if(!_0x311cf8)return;const {unitId:_0x2d553b,subUnitId:_0x2023ae}=_0x311cf8;switch(_0x5677ef[_0xf18cf2(0x20c)]&&this[_0xf18cf2(0x24a)][_0xf18cf2(0x21f)](_0x5677ef[_0xf18cf2(0x20c)]),_0x5677ef[_0xf18cf2(0x239)]){case v[_0xf18cf2(0x246)]:break;case v['Reply']:{this[_0xf18cf2(0x1fe)]['addComment'](_0x2d553b,_0x2023ae,{'unitId':_0x2d553b,'subUnitId':_0x2023ae,'ref':'','id':_0x5677ef['replyId'],'dT':y(+_0x5677ef['createTimestamp']),'threadId':_0x5677ef[_0xf18cf2(0x21c)],'personId':(_0x3797cf=(_0x51cc66=_0x5677ef['user'])==null?void 0x0:_0x51cc66[_0xf18cf2(0x1f4)])!=null?_0x3797cf:_0x5677ef[_0xf18cf2(0x231)],'text':JSON[_0xf18cf2(0x24d)](_0x5677ef['content']),'parentId':_0x311cf8['id']});break;}case v[_0xf18cf2(0x1ff)]:{const _0x28db1c=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x244)](_0x2d553b,_0x2023ae,_0x5677ef[_0xf18cf2(0x218)]);_0x28db1c&&_0x28db1c[_0xf18cf2(0x212)]&&this[_0xf18cf2(0x1fe)][_0xf18cf2(0x22a)](_0x2d553b,_0x2023ae,_0x5677ef[_0xf18cf2(0x218)]);break;}case v[_0xf18cf2(0x201)]:{this['_threadCommentModel'][_0xf18cf2(0x1f5)](_0x2d553b,_0x2023ae,{'commentId':_0x5677ef[_0xf18cf2(0x218)],'text':JSON[_0xf18cf2(0x24d)](_0x5677ef[_0xf18cf2(0x219)])});break;}case v['Solve']:{const _0x9944f7=(_0x2050e5=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x21a)](_0x5677ef[_0xf18cf2(0x234)])[_0xf18cf2(0x1f9)](_0x5a5df7=>_0x5a5df7[_0xf18cf2(0x21c)]===_0x5677ef[_0xf18cf2(0x21c)]))==null?void 0x0:_0x2050e5['root'];_0x9944f7&&this['_threadCommentModel']['resolveComment'](_0x2d553b,_0x2023ae,_0x9944f7['id'],_0x5677ef[_0xf18cf2(0x215)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x33eaaf(_0x3fd2fc)),p(0x1,_0x33eaaf(_0x4adb5b)),p(0x2,_0x33eaaf(_0x229c9b)),p(0x3,_0x33eaaf(_0x2b41cd))],_);const z=_0x4b08f6(0x23a),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f9cba,_0x30b390,_0x58775e,_0x285341)=>{for(var _0x41e215=_0x285341>0x1?void 0x0:_0x285341?k(_0x30b390,_0x58775e):_0x30b390,_0x381f2f=_0x1f9cba['length']-0x1,_0x536bdf;_0x381f2f>=0x0;_0x381f2f--)(_0x536bdf=_0x1f9cba[_0x381f2f])&&(_0x41e215=_0x536bdf(_0x41e215)||_0x41e215);return _0x41e215;},b=(_0x32b930,_0x12e711)=>(_0x3900b9,_0x3f0049)=>_0x12e711(_0x3900b9,_0x3f0049,_0x32b930);function X(_0x5a0567,_0x12ddc2){const _0x10ebba=_0x4b08f6,_0x149a22=_0x5a0567[_0x10ebba(0x245)][0x0];return{..._0x12ddc2,'id':_0x149a22[_0x10ebba(0x218)],'resolved':_0x5a0567[_0x10ebba(0x215)]===0x1,'dT':y(_0x149a22[_0x10ebba(0x249)]),'personId':_0x149a22['userId'],'threadId':_0x149a22[_0x10ebba(0x21c)]};}function ee(_0x156f85,_0x3b256e,_0x291eb3){const _0x19807a=_0x4b08f6;var _0x8fc2a1,_0x1e806b;if(((_0x1e806b=(_0x8fc2a1=_0x156f85==null?void 0x0:_0x156f85[_0x19807a(0x245)])==null?void 0x0:_0x8fc2a1[_0x19807a(0x203)])!=null?_0x1e806b:0x0)>0x0){const _0x265580=(_0x11c671,_0x4f4b6c)=>({'id':_0x11c671[_0x19807a(0x218)],'threadId':_0x11c671[_0x19807a(0x21c)],'dT':y(_0x11c671[_0x19807a(0x249)]),'personId':_0x11c671[_0x19807a(0x231)],'resolved':_0x156f85[_0x19807a(0x215)]===I[_0x19807a(0x241)],'unitId':_0x3b256e,'subUnitId':_0x291eb3,'text':JSON[_0x19807a(0x24d)](_0x11c671[_0x19807a(0x219)]),'parentId':_0x4f4b6c}),_0xb4faa2=_0x265580(_0x156f85[_0x19807a(0x245)][0x0]);return{..._0xb4faa2,'children':_0x156f85[_0x19807a(0x245)]['slice'](0x1)[_0x19807a(0x216)](_0xe41fd3=>_0x265580(_0xe41fd3,_0xb4faa2['id']))};}return null;}let S=class{constructor(_0x25f47e,_0x1d012d,_0xcfdefb){const _0x5ac7cc=_0x4b08f6;this['_httpService']=_0x25f47e,this['_userService']=_0x1d012d,this[_0x5ac7cc(0x24e)]=_0xcfdefb;}async[_0x4b08f6(0x220)](_0x2282b6){const _0x5e4268=_0x4b08f6;var _0x8d0f8b,_0x4a960d;const {parentId:_0x5454c7,unitId:_0x271553,text:_0xd65e98,threadId:_0x217a21}=_0x2282b6,_0x50e771=(_0x4a960d=(_0x8d0f8b=_0xd65e98['customRanges'])==null?void 0x0:_0x8d0f8b['filter'](_0x54baf5=>_0x54baf5[_0x5e4268(0x248)]===_0x2a62af['COMMENT'])['map'](_0x1ee8c6=>_0x1ee8c6[_0x5e4268(0x1fa)]))!=null?_0x4a960d:[],_0x440ec1=JSON[_0x5e4268(0x23e)](_0xd65e98),_0x346b0a=(await this[_0x5e4268(0x24e)][_0x5e4268(0x251)](_0x271553))[_0x5e4268(0x225)]();if(_0x5454c7){const _0x19ad5f={'memberId':_0x346b0a,'unitId':_0x271553,'content':_0x440ec1,'mention':_0x50e771,'threadId':_0x217a21},_0x24ddd1=(await this['_httpService'][_0x5e4268(0x240)]('/universer-api/comment/unit/'+_0x271553+_0x5e4268(0x254),{'body':_0x19ad5f}))[_0x5e4268(0x23d)][_0x5e4268(0x23f)];return{..._0x2282b6,'id':_0x24ddd1[_0x5e4268(0x218)],'dT':_0x1f5eeb(+_0x24ddd1[_0x5e4268(0x249)])[_0x5e4268(0x208)](_0x5e4268(0x22b)),'personId':_0x24ddd1[_0x5e4268(0x231)]};}else{const _0x2bfe10={'memberId':_0x346b0a,'unitId':_0x271553,'content':_0x440ec1,'mention':_0x50e771},_0x4340f8=await this[_0x5e4268(0x235)]['post'](_0x5e4268(0x250)+_0x271553+_0x5e4268(0x24b),{'body':_0x2bfe10});return X(_0x4340f8['body']['comment'],_0x2282b6);}}async[_0x4b08f6(0x1f5)](_0x36a96b){const _0x392471=_0x4b08f6;var _0x262350,_0xbe9b08;const {text:_0x3ff051,unitId:_0x49170a}=_0x36a96b,_0x2fabaa=(_0xbe9b08=(_0x262350=_0x3ff051['customRanges'])==null?void 0x0:_0x262350[_0x392471(0x21d)](_0x57cda1=>_0x57cda1[_0x392471(0x248)]===_0x2a62af[_0x392471(0x22c)])[_0x392471(0x216)](_0x5ee5b4=>_0x5ee5b4[_0x392471(0x1fa)]))!=null?_0xbe9b08:[],_0x9f318c=JSON[_0x392471(0x23e)](_0x3ff051),_0xeecf9=_0x36a96b[_0x392471(0x21c)],_0x3e066e=_0x36a96b['id'],_0x189b9c={'memberId':(await this[_0x392471(0x24e)][_0x392471(0x251)](_0x49170a))[_0x392471(0x225)](),'unitId':_0x49170a,'threadId':_0xeecf9,'mention':_0x2fabaa,'content':_0x9f318c,'replyId':_0x3e066e},_0x2f8021=await this[_0x392471(0x235)]['post'](_0x392471(0x250)+_0x49170a+_0x392471(0x222),{'body':_0x189b9c});return!_0x2f8021[_0x392471(0x23d)][_0x392471(0x228)]||_0x2f8021[_0x392471(0x23d)][_0x392471(0x228)][_0x392471(0x217)]===0x1;}async[_0x4b08f6(0x22e)](_0x53ab06){const _0x2ef211=_0x4b08f6,{unitId:_0x2cfb62}=_0x53ab06,_0x2655c6=_0x53ab06[_0x2ef211(0x21c)],_0xd363e8={'memberId':this[_0x2ef211(0x24a)][_0x2ef211(0x21e)]()[_0x2ef211(0x1f4)],'unitId':_0x2cfb62,'threadId':_0x2655c6,'solved':_0x53ab06['resolved']?I['Solved']:I[_0x2ef211(0x1fc)]},_0x4c8d88=await this[_0x2ef211(0x235)][_0x2ef211(0x240)](_0x2ef211(0x250)+_0x2cfb62+_0x2ef211(0x243),{'body':_0xd363e8});return!_0x4c8d88[_0x2ef211(0x23d)][_0x2ef211(0x228)]||_0x4c8d88[_0x2ef211(0x23d)]['error'][_0x2ef211(0x217)]===0x1;}async[_0x4b08f6(0x22a)](_0x1c516a,_0xc04e78,_0xa14884,_0x1e63fd){const _0x157122=_0x4b08f6,_0x545857={'memberId':(await this['_sessionService'][_0x157122(0x251)](_0x1c516a))[_0x157122(0x225)](),'threadId':_0xa14884,'replyId':_0x1e63fd,'unitId':_0x1c516a},_0x43ea47=await this['_httpService'][_0x157122(0x240)](_0x157122(0x250)+_0x1c516a+_0x157122(0x226),{'body':_0x545857});return!_0x43ea47['body'][_0x157122(0x228)]||_0x43ea47[_0x157122(0x23d)][_0x157122(0x228)]['code']===0x1;}async['listComments'](_0x434bc,_0x302d82,_0x172f4f){const _0x8af3f7=_0x4b08f6,_0x4adfdd={'unitId':_0x434bc,'threadId':_0x172f4f},_0x145006=await this['_httpService'][_0x8af3f7(0x240)](_0x8af3f7(0x250)+_0x434bc+_0x8af3f7(0x24f),{'body':_0x4adfdd}),_0x567911=_0x172f4f['map'](_0x1e2373=>ee(_0x145006[_0x8af3f7(0x23d)][_0x8af3f7(0x1fd)][_0x1e2373],_0x434bc,_0x302d82))[_0x8af3f7(0x21d)](Boolean);return Object[_0x8af3f7(0x209)](_0x145006[_0x8af3f7(0x23d)][_0x8af3f7(0x247)])[_0x8af3f7(0x24c)](_0x5763e9=>{const _0x124be9=_0x8af3f7;this[_0x124be9(0x24a)][_0x124be9(0x21f)](_0x5763e9);}),_0x567911;}['saveCommentToSnapshot'](_0x4a24c7){return{'id':_0x4a24c7['id'],'threadId':_0x4a24c7['threadId'],'ref':_0x4a24c7['ref']};}};function _0x381c(_0x3f7cc3,_0x2c96f6){const _0x4e29cf=_0x4e29();return _0x381c=function(_0x381c4e,_0x462b14){_0x381c4e=_0x381c4e-0x1f3;let _0x38e225=_0x4e29cf[_0x381c4e];return _0x38e225;},_0x381c(_0x3f7cc3,_0x2c96f6);}S=Q([b(0x0,_0x33eaaf(_0x3fadc1)),b(0x1,_0x33eaaf(_0x229c9b)),b(0x2,_0x33eaaf(_0x12bcca))],S);var re=Object[_0x4b08f6(0x20b)],te=(_0x252623,_0x1bf283,_0x5b35f7,_0x4c1d65)=>{const _0x8d8ea4=_0x4b08f6;for(var _0x630a01=_0x4c1d65>0x1?void 0x0:_0x4c1d65?re(_0x1bf283,_0x5b35f7):_0x1bf283,_0x3a0ed7=_0x252623[_0x8d8ea4(0x203)]-0x1,_0x1bfa19;_0x3a0ed7>=0x0;_0x3a0ed7--)(_0x1bfa19=_0x252623[_0x3a0ed7])&&(_0x630a01=_0x1bfa19(_0x630a01)||_0x630a01);return _0x630a01;},M=(_0x21c651,_0x45bb1a)=>(_0x3a54fa,_0x1e2364)=>_0x45bb1a(_0x3a54fa,_0x1e2364,_0x21c651);function _0x4e29(){const _0x585bac=['1094967usSBuy','resolveComment','dataSource','_initUserSync','userId','Solve','size','unitId','_httpService','8614295JIhLsD','588932pDloOn','160VRHUoP','type','thread-comment-data-source.config','onReady','onStarting','body','stringify','reply','post','Solved','665360hafJzi','/solved','getComment','replies','Add','users','rangeType','createTimestamp','_userService','/add','forEach','parse','_sessionService','/list','/universer-api/comment/unit/','requireSession','add','/universer-api/user/list','/reply','syncUpdateMutationToColla','Reply','userID','updateComment','_threadCommentDataSource','202748MLtGBD','personId','find','rangeId','916902qWQYUw','OpenOrReOpen','comments','_threadCommentModel','Delete','_configService','Edit','delete','length','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','pluginName','format','values','_init','getOwnPropertyDescriptor','user','_initDataSource','_injector','_commentService','_threadCommentDataSourceService','root','parentId','UNRECOGNIZED','2133378hRNyIo','solved','map','code','replyId','content','getUnit','payload','threadId','filter','getCurrentUser','addUser','addComment','subscribe','/edit','Unknown','disposeWithMe','getMemberID','/delete','commentUpdate$','error','_config','deleteComment','YYYY/MM/DD\x20HH:mm','COMMENT'];_0x4e29=function(){return _0x585bac;};return _0x4e29();}let f=class extends _0x22017b{constructor(_0x1fbce7,_0x4aef7f){const _0x5f1cb9=_0x4b08f6;super(),this[_0x5f1cb9(0x210)]=_0x1fbce7,this['_threadCommentDataSource']=_0x4aef7f,this[_0x5f1cb9(0x20d)]();}[_0x4b08f6(0x20d)](){const _0x39bd99=_0x4b08f6;this[_0x39bd99(0x210)][_0x39bd99(0x22f)]=this[_0x39bd99(0x1f6)],this[_0x39bd99(0x210)][_0x39bd99(0x255)]=!0x1;}};f=te([M(0x0,_0x44c2d7),M(0x1,_0x33eaaf(S))],f);var se=Object[_0x4b08f6(0x206)],oe=Object[_0x4b08f6(0x20b)],ne=(_0x5ddfcd,_0x2cba70,_0x3450f2)=>_0x2cba70 in _0x5ddfcd?se(_0x5ddfcd,_0x2cba70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3450f2}):_0x5ddfcd[_0x2cba70]=_0x3450f2,ie=(_0x240900,_0x3a6d81,_0x175be9,_0x1bbd9d)=>{const _0x2a7aab=_0x4b08f6;for(var _0x41f05f=_0x1bbd9d>0x1?void 0x0:_0x1bbd9d?oe(_0x3a6d81,_0x175be9):_0x3a6d81,_0x37d7ea=_0x240900[_0x2a7aab(0x203)]-0x1,_0x460391;_0x37d7ea>=0x0;_0x37d7ea--)(_0x460391=_0x240900[_0x37d7ea])&&(_0x41f05f=_0x460391(_0x41f05f)||_0x41f05f);return _0x41f05f;},N=(_0x43b8be,_0x4cd569)=>(_0x3ca44b,_0x15e210)=>_0x4cd569(_0x3ca44b,_0x15e210,_0x43b8be),$=(_0x31d1cc,_0x54acf3,_0x8c279f)=>ne(_0x31d1cc,typeof _0x54acf3!='symbol'?_0x54acf3+'':_0x54acf3,_0x8c279f);let g=class extends _0x45a9df{constructor(_0x2b5b1a=O,_0x5703f0,_0xc3bc18){const _0x3d3b28=_0x4b08f6;super(),this['_config']=_0x2b5b1a,this['_injector']=_0x5703f0,this[_0x3d3b28(0x200)]=_0xc3bc18;const {..._0x67b588}=_0x59e53c({},O,this[_0x3d3b28(0x229)]);this['_configService'][_0x3d3b28(0x204)](z,_0x67b588);}[_0x4b08f6(0x23c)](){const _0x58203a=_0x4b08f6;[[S],[f],[_]][_0x58203a(0x24c)](_0x1f486d=>{const _0x58d8d3=_0x58203a;this[_0x58d8d3(0x20e)][_0x58d8d3(0x252)](_0x1f486d);});}[_0x4b08f6(0x23b)](){const _0x235f92=_0x4b08f6;this[_0x235f92(0x20e)]['get'](f),this[_0x235f92(0x20e)]['get'](_);}};$(g,_0x4b08f6(0x207),W),$(g,_0x4b08f6(0x239),_0x52cebc['UNIVER_UNKNOWN']),g=ie([_0x4925bc(_0x341ce2,_0x3ab8c5,_0x3e3ea1),N(0x1,_0x33eaaf(_0x2b41cd)),N(0x2,_0x4a913c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x3f64(_0x3b64fa,_0x56d3c4){const _0x6450a6=_0x6450();return _0x3f64=function(_0x3f6401,_0x29c2fc){_0x3f6401=_0x3f6401-0x6e;let _0x24bdbb=_0x6450a6[_0x3f6401];return _0x24bdbb;},_0x3f64(_0x3b64fa,_0x56d3c4);}const _0x1da137=_0x3f64;(function(_0x2f9ee6,_0x3c6deb){const _0xda3c7a=_0x3f64,_0x4448b3=_0x2f9ee6();while(!![]){try{const _0x2966e1=-parseInt(_0xda3c7a(0x9e))/0x1+parseInt(_0xda3c7a(0x6e))/0x2*(-parseInt(_0xda3c7a(0xaa))/0x3)+parseInt(_0xda3c7a(0x7c))/0x4*(-parseInt(_0xda3c7a(0xbb))/0x5)+parseInt(_0xda3c7a(0xbf))/0x6*(-parseInt(_0xda3c7a(0xbc))/0x7)+-parseInt(_0xda3c7a(0x96))/0x8*(parseInt(_0xda3c7a(0xac))/0x9)+-parseInt(_0xda3c7a(0xb8))/0xa+parseInt(_0xda3c7a(0x86))/0xb;if(_0x2966e1===_0x3c6deb)break;else _0x4448b3['push'](_0x4448b3['shift']());}catch(_0x1db320){_0x4448b3['push'](_0x4448b3['shift']());}}}(_0x6450,0x349ca));import{CommentService as _0x2831eb,CollaborationSessionService as _0x3049f7,UniverCollaborationClientPlugin as _0x333c4c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x29719d}from'@univerjs-pro/license';function _0x6450(){const _0x20c233=['commentUpdate$','format','/universer-api/comment/unit/','parse','11337LnJjGP','Edit','4041VYIDLK','parentId','error','/list','addComment','_userService','getMemberID','reply','Solved','dataSource','requireSession','stringify','2773250YBAdAh','createTimestamp','Delete','10240gaUCsW','1308573bzGPuA','resolved','Reply','12DtFjhF','_init','type','COMMENT','customRanges','length','thread-comment-data-source.config','/delete','add','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','symbol','onReady','Solve','userId','content','_injector','subscribe','getUnit','body','_commentService','82RjsEsd','resolveComment','_configService','filter','getCurrentUser','user','disposeWithMe','_sessionService','Add','_threadCommentModel','OpenOrReOpen','map','size','UNIVER_UNKNOWN','168mIISvj','getOwnPropertyDescriptor','slice','/edit','users','solved','get','saveCommentToSnapshot','replies','UNRECOGNIZED','16974100ITrjDx','delete','_config','/reply','updateComment','values','_threadCommentDataSource','post','getComment','replyId','threadId','addUser','_initUserSync','setConfig','_httpService','_initDataSource','7040vjvaqc','code','pluginName','YYYY/MM/DD\x20HH:mm','pipe','find','personId','listComments','40324VrKpWB','/solved','comment','unitId','_threadCommentDataSourceService','forEach','deleteComment','rangeId'];_0x6450=function(){return _0x20c233;};return _0x6450();}import{dayjs as _0x3d401c,UserManagerService as _0x4b1fbd,Inject as _0x32b3e4,Injector as _0x4855ea,Disposable as _0x414048,CustomRangeType as _0x4202d3,UniverInstanceType as _0xeb4be8,DependentOn as _0xbb1ffb,IConfigService as _0x42c379,Plugin as _0x52d8e0,merge as _0x3742e4}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1332b2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x379ffd,IThreadCommentDataSourceService as _0x5834d3}from'@univerjs/thread-comment';import{bufferTime as _0x162adc}from'rxjs';import{HTTPService as _0x50d39a}from'@univerjs/network';const W=_0x1da137(0xc9);var I=(_0x2559f7=>(_0x2559f7[_0x2559f7['OpenOrReOpen']=0x0]=_0x1da137(0x78),_0x2559f7[_0x2559f7[_0x1da137(0xb4)]=0x1]=_0x1da137(0xb4),_0x2559f7[_0x2559f7['UNRECOGNIZED']=-0x1]=_0x1da137(0x85),_0x2559f7))(I||{}),v=(_0x434376=>(_0x434376[_0x434376[_0x1da137(0xc8)]=0x0]=_0x1da137(0xc8),_0x434376[_0x434376[_0x1da137(0x76)]=0x1]='Add',_0x434376[_0x434376[_0x1da137(0xbe)]=0x2]=_0x1da137(0xbe),_0x434376[_0x434376[_0x1da137(0xab)]=0x3]=_0x1da137(0xab),_0x434376[_0x434376[_0x1da137(0xba)]=0x4]=_0x1da137(0xba),_0x434376[_0x434376['Solve']=0x5]=_0x1da137(0xcc),_0x434376[_0x434376[_0x1da137(0x85)]=-0x1]=_0x1da137(0x85),_0x434376))(v||{});const y=_0xf65b59=>_0x3d401c(new Date(+_0xf65b59))[_0x1da137(0xa7)](_0x1da137(0x99)),B=async(_0x1ca152,_0x939d99)=>{const _0x3b6b5c=_0x1da137,_0x39205e=_0x1ca152[_0x3b6b5c(0x82)](_0x4b1fbd),_0x2126cf=_0x1ca152[_0x3b6b5c(0x82)](_0x50d39a);_0x939d99[_0x3b6b5c(0xa3)](_0x14ec9f=>{const _0x2bf392=_0x3b6b5c;_0x39205e['getUser'](_0x14ec9f)&&_0x939d99[_0x2bf392(0x87)](_0x14ec9f);}),_0x939d99[_0x3b6b5c(0x7a)]&&(await _0x2126cf[_0x3b6b5c(0x82)]('/universer-api/user/list',{'params':{'userIDs':[..._0x939d99]}}))[_0x3b6b5c(0xd2)][_0x3b6b5c(0x80)]['forEach'](_0x19f63d=>{const _0x1336d3=_0x3b6b5c;_0x19f63d&&_0x39205e[_0x1336d3(0x91)](_0x19f63d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2a670c,_0x11948b,_0x55bd28,_0x450891)=>{const _0x15e56d=_0x1da137;for(var _0x312abe=_0x450891>0x1?void 0x0:_0x450891?K(_0x11948b,_0x55bd28):_0x11948b,_0x52fece=_0x2a670c[_0x15e56d(0xc4)]-0x1,_0xd1ef14;_0x52fece>=0x0;_0x52fece--)(_0xd1ef14=_0x2a670c[_0x52fece])&&(_0x312abe=_0xd1ef14(_0x312abe)||_0x312abe);return _0x312abe;},p=(_0xb36cb6,_0x3451c2)=>(_0x3ca70f,_0x5df360)=>_0x3451c2(_0x3ca70f,_0x5df360,_0xb36cb6);let _=class extends _0x414048{constructor(_0x44c7be,_0x2000a8,_0x54edb1,_0x1f4292){const _0x5a72d9=_0x1da137;super(),this[_0x5a72d9(0xd3)]=_0x44c7be,this['_threadCommentModel']=_0x2000a8,this[_0x5a72d9(0xb1)]=_0x54edb1,this[_0x5a72d9(0xcf)]=_0x1f4292,this[_0x5a72d9(0xc0)](),this[_0x5a72d9(0x92)]();}[_0x1da137(0x92)](){const _0xa672a7=_0x1da137;this[_0xa672a7(0x74)](this['_threadCommentModel'][_0xa672a7(0xa6)][_0xa672a7(0x9a)](_0x162adc(0x10))[_0xa672a7(0xd0)](_0x4606be=>{const _0x5c80cf=new Set();_0x4606be['forEach'](_0x444730=>{const _0x3040ea=_0x3f64;switch(_0x444730[_0x3040ea(0xc1)]){case'add':{const _0x1190ba=_0x444730['payload'][_0x3040ea(0x9c)];_0x5c80cf[_0x3040ea(0xc7)](_0x1190ba);break;}}}),B(this['_injector'],_0x5c80cf);}));}[_0x1da137(0xc0)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x2c7ae5=>{const _0x581010=_0x3f64;var _0x2f7daf,_0x43819a,_0x5511c9,_0x41a2f5;const _0x4e2c51=(_0x2f7daf=this[_0x581010(0x77)][_0x581010(0xd1)](_0x2c7ae5[_0x581010(0xa1)])[_0x581010(0x9b)](_0x567f86=>_0x567f86['threadId']===_0x2c7ae5[_0x581010(0x90)]))==null?void 0x0:_0x2f7daf['root'];if(!_0x4e2c51)return;const {unitId:_0x3c87a1,subUnitId:_0x36ad09}=_0x4e2c51;switch(_0x2c7ae5[_0x581010(0x73)]&&this[_0x581010(0xb1)][_0x581010(0x91)](_0x2c7ae5['user']),_0x2c7ae5[_0x581010(0xc1)]){case v[_0x581010(0x76)]:break;case v[_0x581010(0xbe)]:{this[_0x581010(0x77)][_0x581010(0xb0)](_0x3c87a1,_0x36ad09,{'unitId':_0x3c87a1,'subUnitId':_0x36ad09,'ref':'','id':_0x2c7ae5['replyId'],'dT':y(+_0x2c7ae5[_0x581010(0xb9)]),'threadId':_0x2c7ae5[_0x581010(0x90)],'personId':(_0x5511c9=(_0x43819a=_0x2c7ae5[_0x581010(0x73)])==null?void 0x0:_0x43819a['userID'])!=null?_0x5511c9:_0x2c7ae5[_0x581010(0xcd)],'text':JSON[_0x581010(0xa9)](_0x2c7ae5[_0x581010(0xce)]),'parentId':_0x4e2c51['id']});break;}case v[_0x581010(0xba)]:{const _0x1c11ac=this[_0x581010(0x77)][_0x581010(0x8e)](_0x3c87a1,_0x36ad09,_0x2c7ae5[_0x581010(0x8f)]);_0x1c11ac&&_0x1c11ac[_0x581010(0xad)]&&this[_0x581010(0x77)][_0x581010(0xa4)](_0x3c87a1,_0x36ad09,_0x2c7ae5['replyId']);break;}case v[_0x581010(0xab)]:{this[_0x581010(0x77)][_0x581010(0x8a)](_0x3c87a1,_0x36ad09,{'commentId':_0x2c7ae5['replyId'],'text':JSON[_0x581010(0xa9)](_0x2c7ae5['content'])});break;}case v[_0x581010(0xcc)]:{const _0x5965d0=(_0x41a2f5=this[_0x581010(0x77)]['getUnit'](_0x2c7ae5['unitId'])['find'](_0x310b72=>_0x310b72[_0x581010(0x90)]===_0x2c7ae5[_0x581010(0x90)]))==null?void 0x0:_0x41a2f5['root'];_0x5965d0&&this[_0x581010(0x77)]['resolveComment'](_0x3c87a1,_0x36ad09,_0x5965d0['id'],_0x2c7ae5[_0x581010(0x81)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x32b3e4(_0x2831eb)),p(0x1,_0x32b3e4(_0x379ffd)),p(0x2,_0x32b3e4(_0x4b1fbd)),p(0x3,_0x32b3e4(_0x4855ea))],_);const z=_0x1da137(0xc5),O={};var k=Object[_0x1da137(0x7d)],Q=(_0x17282d,_0x42cc3e,_0x2bc69f,_0x4a078e)=>{for(var _0x316f5f=_0x4a078e>0x1?void 0x0:_0x4a078e?k(_0x42cc3e,_0x2bc69f):_0x42cc3e,_0x396512=_0x17282d['length']-0x1,_0x2874d8;_0x396512>=0x0;_0x396512--)(_0x2874d8=_0x17282d[_0x396512])&&(_0x316f5f=_0x2874d8(_0x316f5f)||_0x316f5f);return _0x316f5f;},b=(_0x40b419,_0x17239d)=>(_0x569a88,_0x1aeffd)=>_0x17239d(_0x569a88,_0x1aeffd,_0x40b419);function X(_0x35031d,_0x247b57){const _0x5e9500=_0x1da137,_0x2559a7=_0x35031d[_0x5e9500(0x84)][0x0];return{..._0x247b57,'id':_0x2559a7[_0x5e9500(0x8f)],'resolved':_0x35031d['solved']===0x1,'dT':y(_0x2559a7[_0x5e9500(0xb9)]),'personId':_0x2559a7[_0x5e9500(0xcd)],'threadId':_0x2559a7['threadId']};}function ee(_0x3249e1,_0x29842c,_0x4ac7c4){const _0x503035=_0x1da137;var _0x5a5e38,_0x4071b;if(((_0x4071b=(_0x5a5e38=_0x3249e1==null?void 0x0:_0x3249e1[_0x503035(0x84)])==null?void 0x0:_0x5a5e38[_0x503035(0xc4)])!=null?_0x4071b:0x0)>0x0){const _0x282b77=(_0x23e0a1,_0x1fdd17)=>({'id':_0x23e0a1['replyId'],'threadId':_0x23e0a1[_0x503035(0x90)],'dT':y(_0x23e0a1[_0x503035(0xb9)]),'personId':_0x23e0a1[_0x503035(0xcd)],'resolved':_0x3249e1['solved']===I[_0x503035(0xb4)],'unitId':_0x29842c,'subUnitId':_0x4ac7c4,'text':JSON[_0x503035(0xa9)](_0x23e0a1[_0x503035(0xce)]),'parentId':_0x1fdd17}),_0x35c5a7=_0x282b77(_0x3249e1[_0x503035(0x84)][0x0]);return{..._0x35c5a7,'children':_0x3249e1[_0x503035(0x84)][_0x503035(0x7e)](0x1)['map'](_0x2c997b=>_0x282b77(_0x2c997b,_0x35c5a7['id']))};}return null;}let S=class{constructor(_0x34892f,_0x3b97b8,_0x56ede4){const _0x3c22c0=_0x1da137;this[_0x3c22c0(0x94)]=_0x34892f,this['_userService']=_0x3b97b8,this[_0x3c22c0(0x75)]=_0x56ede4;}async[_0x1da137(0xb0)](_0x3b4e2f){const _0x2a613d=_0x1da137;var _0x1141d8,_0x25aac4;const {parentId:_0x10f512,unitId:_0x45bd0a,text:_0xa716b7,threadId:_0x2037ec}=_0x3b4e2f,_0x1dd5dc=(_0x25aac4=(_0x1141d8=_0xa716b7[_0x2a613d(0xc3)])==null?void 0x0:_0x1141d8[_0x2a613d(0x71)](_0x10813c=>_0x10813c['rangeType']===_0x4202d3['COMMENT'])[_0x2a613d(0x79)](_0x40ff9f=>_0x40ff9f[_0x2a613d(0xa5)]))!=null?_0x25aac4:[],_0x319708=JSON[_0x2a613d(0xb7)](_0xa716b7),_0x3db2b1=(await this[_0x2a613d(0x75)][_0x2a613d(0xb6)](_0x45bd0a))['getMemberID']();if(_0x10f512){const _0x4d0309={'memberId':_0x3db2b1,'unitId':_0x45bd0a,'content':_0x319708,'mention':_0x1dd5dc,'threadId':_0x2037ec},_0x237235=(await this['_httpService']['post'](_0x2a613d(0xa8)+_0x45bd0a+_0x2a613d(0x89),{'body':_0x4d0309}))[_0x2a613d(0xd2)][_0x2a613d(0xb3)];return{..._0x3b4e2f,'id':_0x237235['replyId'],'dT':_0x3d401c(+_0x237235['createTimestamp'])[_0x2a613d(0xa7)](_0x2a613d(0x99)),'personId':_0x237235[_0x2a613d(0xcd)]};}else{const _0x213365={'memberId':_0x3db2b1,'unitId':_0x45bd0a,'content':_0x319708,'mention':_0x1dd5dc},_0x219ba4=await this[_0x2a613d(0x94)]['post'](_0x2a613d(0xa8)+_0x45bd0a+'/add',{'body':_0x213365});return X(_0x219ba4[_0x2a613d(0xd2)][_0x2a613d(0xa0)],_0x3b4e2f);}}async[_0x1da137(0x8a)](_0x59ec8c){const _0x577b35=_0x1da137;var _0x299e6a,_0xc71e6f;const {text:_0x5c1c92,unitId:_0x4fa446}=_0x59ec8c,_0xcd7d21=(_0xc71e6f=(_0x299e6a=_0x5c1c92[_0x577b35(0xc3)])==null?void 0x0:_0x299e6a[_0x577b35(0x71)](_0x4c0787=>_0x4c0787['rangeType']===_0x4202d3[_0x577b35(0xc2)])[_0x577b35(0x79)](_0x453757=>_0x453757[_0x577b35(0xa5)]))!=null?_0xc71e6f:[],_0x35e2c5=JSON[_0x577b35(0xb7)](_0x5c1c92),_0x2904c3=_0x59ec8c['threadId'],_0x290099=_0x59ec8c['id'],_0x2f8ae5={'memberId':(await this[_0x577b35(0x75)][_0x577b35(0xb6)](_0x4fa446))['getMemberID'](),'unitId':_0x4fa446,'threadId':_0x2904c3,'mention':_0xcd7d21,'content':_0x35e2c5,'replyId':_0x290099},_0x5dbbfe=await this[_0x577b35(0x94)][_0x577b35(0x8d)](_0x577b35(0xa8)+_0x4fa446+_0x577b35(0x7f),{'body':_0x2f8ae5});return!_0x5dbbfe[_0x577b35(0xd2)][_0x577b35(0xae)]||_0x5dbbfe[_0x577b35(0xd2)][_0x577b35(0xae)]['code']===0x1;}async[_0x1da137(0x6f)](_0x2f2a93){const _0x3b7439=_0x1da137,{unitId:_0x56f92f}=_0x2f2a93,_0xc81729=_0x2f2a93[_0x3b7439(0x90)],_0x3528e3={'memberId':this[_0x3b7439(0xb1)][_0x3b7439(0x72)]()['userID'],'unitId':_0x56f92f,'threadId':_0xc81729,'solved':_0x2f2a93[_0x3b7439(0xbd)]?I[_0x3b7439(0xb4)]:I[_0x3b7439(0x78)]},_0x35e471=await this[_0x3b7439(0x94)][_0x3b7439(0x8d)]('/universer-api/comment/unit/'+_0x56f92f+_0x3b7439(0x9f),{'body':_0x3528e3});return!_0x35e471[_0x3b7439(0xd2)]['error']||_0x35e471[_0x3b7439(0xd2)][_0x3b7439(0xae)]['code']===0x1;}async[_0x1da137(0xa4)](_0x1eaab9,_0x29d1a7,_0x2815ac,_0xb1636f){const _0x37bd26=_0x1da137,_0x56a30a={'memberId':(await this[_0x37bd26(0x75)][_0x37bd26(0xb6)](_0x1eaab9))[_0x37bd26(0xb2)](),'threadId':_0x2815ac,'replyId':_0xb1636f,'unitId':_0x1eaab9},_0x2bb709=await this[_0x37bd26(0x94)][_0x37bd26(0x8d)](_0x37bd26(0xa8)+_0x1eaab9+_0x37bd26(0xc6),{'body':_0x56a30a});return!_0x2bb709[_0x37bd26(0xd2)]['error']||_0x2bb709['body'][_0x37bd26(0xae)][_0x37bd26(0x97)]===0x1;}async[_0x1da137(0x9d)](_0xddbcb9,_0x30ef1b,_0x2be069){const _0x521047=_0x1da137,_0x1c3ded={'unitId':_0xddbcb9,'threadId':_0x2be069},_0x15b868=await this[_0x521047(0x94)][_0x521047(0x8d)](_0x521047(0xa8)+_0xddbcb9+_0x521047(0xaf),{'body':_0x1c3ded}),_0x265843=_0x2be069[_0x521047(0x79)](_0x4c566a=>ee(_0x15b868[_0x521047(0xd2)]['comments'][_0x4c566a],_0xddbcb9,_0x30ef1b))[_0x521047(0x71)](Boolean);return Object[_0x521047(0x8b)](_0x15b868[_0x521047(0xd2)][_0x521047(0x80)])[_0x521047(0xa3)](_0x3c0a0d=>{const _0x1588c9=_0x521047;this[_0x1588c9(0xb1)][_0x1588c9(0x91)](_0x3c0a0d);}),_0x265843;}[_0x1da137(0x83)](_0x15d39e){return{'id':_0x15d39e['id'],'threadId':_0x15d39e['threadId'],'ref':_0x15d39e['ref']};}};S=Q([b(0x0,_0x32b3e4(_0x50d39a)),b(0x1,_0x32b3e4(_0x4b1fbd)),b(0x2,_0x32b3e4(_0x3049f7))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2ad87b,_0x38f0f8,_0x476a31,_0x11fc79)=>{const _0x228e64=_0x1da137;for(var _0x144f92=_0x11fc79>0x1?void 0x0:_0x11fc79?re(_0x38f0f8,_0x476a31):_0x38f0f8,_0x52efff=_0x2ad87b[_0x228e64(0xc4)]-0x1,_0x264b74;_0x52efff>=0x0;_0x52efff--)(_0x264b74=_0x2ad87b[_0x52efff])&&(_0x144f92=_0x264b74(_0x144f92)||_0x144f92);return _0x144f92;},M=(_0x11c12f,_0x4328c3)=>(_0x2d642a,_0x6c9997)=>_0x4328c3(_0x2d642a,_0x6c9997,_0x11c12f);let f=class extends _0x414048{constructor(_0x43573a,_0x3549b2){const _0xf68e3a=_0x1da137;super(),this[_0xf68e3a(0xa2)]=_0x43573a,this[_0xf68e3a(0x8c)]=_0x3549b2,this[_0xf68e3a(0x95)]();}[_0x1da137(0x95)](){const _0x123c0e=_0x1da137;this['_threadCommentDataSourceService'][_0x123c0e(0xb5)]=this[_0x123c0e(0x8c)],this[_0x123c0e(0xa2)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x5834d3),M(0x1,_0x32b3e4(S))],f);var se=Object['defineProperty'],oe=Object[_0x1da137(0x7d)],ne=(_0x72e111,_0x5d9925,_0x1b6e61)=>_0x5d9925 in _0x72e111?se(_0x72e111,_0x5d9925,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1b6e61}):_0x72e111[_0x5d9925]=_0x1b6e61,ie=(_0x567398,_0x3ab671,_0x2e0399,_0x52fb9d)=>{for(var _0x4ac6de=_0x52fb9d>0x1?void 0x0:_0x52fb9d?oe(_0x3ab671,_0x2e0399):_0x3ab671,_0x1d4d34=_0x567398['length']-0x1,_0x24f7bf;_0x1d4d34>=0x0;_0x1d4d34--)(_0x24f7bf=_0x567398[_0x1d4d34])&&(_0x4ac6de=_0x24f7bf(_0x4ac6de)||_0x4ac6de);return _0x4ac6de;},N=(_0xaec6b,_0xa3ffa7)=>(_0x4c3c11,_0x487471)=>_0xa3ffa7(_0x4c3c11,_0x487471,_0xaec6b),$=(_0x4be9b3,_0x4217d7,_0x3c99a5)=>ne(_0x4be9b3,typeof _0x4217d7!=_0x1da137(0xca)?_0x4217d7+'':_0x4217d7,_0x3c99a5);let g=class extends _0x52d8e0{constructor(_0x8e2e30=O,_0x8515ed,_0x56ae5e){const _0x1f4d9a=_0x1da137;super(),this[_0x1f4d9a(0x88)]=_0x8e2e30,this[_0x1f4d9a(0xcf)]=_0x8515ed,this[_0x1f4d9a(0x70)]=_0x56ae5e;const {..._0x2e82ea}=_0x3742e4({},O,this[_0x1f4d9a(0x88)]);this[_0x1f4d9a(0x70)][_0x1f4d9a(0x93)](z,_0x2e82ea);}['onStarting'](){const _0x298e23=_0x1da137;[[S],[f],[_]][_0x298e23(0xa3)](_0x290910=>{const _0x4988eb=_0x298e23;this['_injector'][_0x4988eb(0xc7)](_0x290910);});}[_0x1da137(0xcb)](){const _0x571325=_0x1da137;this[_0x571325(0xcf)][_0x571325(0x82)](f),this['_injector']['get'](_);}};$(g,_0x1da137(0x98),W),$(g,'type',_0xeb4be8[_0x1da137(0x7b)]),g=ie([_0xbb1ffb(_0x1332b2,_0x333c4c,_0x29719d),N(0x1,_0x32b3e4(_0x4855ea)),N(0x2,_0x42c379)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xf14b(_0x4f1e45,_0x1e8300){const _0xc4d386=_0xc4d3();return _0xf14b=function(_0xf14b67,_0x253dda){_0xf14b67=_0xf14b67-0x12c;let _0x4534f7=_0xc4d386[_0xf14b67];return _0x4534f7;},_0xf14b(_0x4f1e45,_0x1e8300);}(function(_0x28dbe3,_0x5a87e8){const _0x1ebd6f=_0xf14b,_0x17c83a=_0x28dbe3();while(!![]){try{const _0x2bbd51=-parseInt(_0x1ebd6f(0x154))/0x1*(-parseInt(_0x1ebd6f(0x153))/0x2)+parseInt(_0x1ebd6f(0x18e))/0x3*(parseInt(_0x1ebd6f(0x16d))/0x4)+parseInt(_0x1ebd6f(0x189))/0x5+parseInt(_0x1ebd6f(0x14d))/0x6+parseInt(_0x1ebd6f(0x1aa))/0x7+parseInt(_0x1ebd6f(0x19b))/0x8*(parseInt(_0x1ebd6f(0x161))/0x9)+-parseInt(_0x1ebd6f(0x180))/0xa;if(_0x2bbd51===_0x5a87e8)break;else _0x17c83a['push'](_0x17c83a['shift']());}catch(_0x191704){_0x17c83a['push'](_0x17c83a['shift']());}}}(_0xc4d3,0xb99ac),function(_0x14e5ea,_0x47f183){const _0x448cb4=_0xf14b;typeof exports==_0x448cb4(0x19c)&&typeof module<'u'?_0x47f183(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x448cb4(0x17c)&&define['amd']?define(['exports',_0x448cb4(0x199),_0x448cb4(0x169),_0x448cb4(0x16b),_0x448cb4(0x17b),_0x448cb4(0x16e),'rxjs',_0x448cb4(0x160)],_0x47f183):(_0x14e5ea=typeof globalThis<'u'?globalThis:_0x14e5ea||self,_0x47f183(_0x14e5ea['UniverProThreadCommentDatasource']={},_0x14e5ea[_0x448cb4(0x172)],_0x14e5ea[_0x448cb4(0x141)],_0x14e5ea['UniverCore'],_0x14e5ea[_0x448cb4(0x175)],_0x14e5ea[_0x448cb4(0x14e)],_0x14e5ea['rxjs'],_0x14e5ea[_0x448cb4(0x1ab)]));}(this,function(_0x2c1112,_0xac7b5f,_0x589023,_0x5dbbbf,_0x428aaa,_0x366a66,_0x3848c4,_0x27ea21){'use strict';const _0x419903=_0xf14b;const _0x20280e=_0x419903(0x131);var _0x5dddc3=(_0xc8dfe3=>(_0xc8dfe3[_0xc8dfe3[_0x419903(0x162)]=0x0]=_0x419903(0x162),_0xc8dfe3[_0xc8dfe3[_0x419903(0x19f)]=0x1]=_0x419903(0x19f),_0xc8dfe3[_0xc8dfe3[_0x419903(0x185)]=-0x1]='UNRECOGNIZED',_0xc8dfe3))(_0x5dddc3||{}),_0x597688=(_0x654986=>(_0x654986[_0x654986['Unknown']=0x0]=_0x419903(0x19e),_0x654986[_0x654986[_0x419903(0x12c)]=0x1]=_0x419903(0x12c),_0x654986[_0x654986[_0x419903(0x1ac)]=0x2]=_0x419903(0x1ac),_0x654986[_0x654986['Edit']=0x3]=_0x419903(0x186),_0x654986[_0x654986[_0x419903(0x170)]=0x4]=_0x419903(0x170),_0x654986[_0x654986[_0x419903(0x192)]=0x5]='Solve',_0x654986[_0x654986['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x654986))(_0x597688||{});const _0x3af8fb=_0x1152fe=>_0x5dbbbf[_0x419903(0x12f)](new Date(+_0x1152fe))['format']('YYYY/MM/DD\x20HH:mm'),_0x290075=async(_0x5f206d,_0x2315bc)=>{const _0x457bad=_0x419903,_0x988a24=_0x5f206d[_0x457bad(0x14a)](_0x5dbbbf[_0x457bad(0x158)]),_0x5baf6d=_0x5f206d[_0x457bad(0x14a)](_0x27ea21[_0x457bad(0x14c)]);_0x2315bc['forEach'](_0x17daaa=>{const _0x2ea8da=_0x457bad;_0x988a24[_0x2ea8da(0x181)](_0x17daaa)&&_0x2315bc['delete'](_0x17daaa);}),_0x2315bc[_0x457bad(0x138)]&&(await _0x5baf6d['get'](_0x457bad(0x166),{'params':{'userIDs':[..._0x2315bc]}}))[_0x457bad(0x184)][_0x457bad(0x1a6)][_0x457bad(0x159)](_0x453644=>{const _0x184685=_0x457bad;_0x453644&&_0x988a24[_0x184685(0x171)](_0x453644);});};var _0x2e61de=Object['getOwnPropertyDescriptor'],_0x57a7cb=(_0x36ba10,_0x5ddae8,_0x1d79a4,_0x459e2d)=>{const _0x4f8a6a=_0x419903;for(var _0x134559=_0x459e2d>0x1?void 0x0:_0x459e2d?_0x2e61de(_0x5ddae8,_0x1d79a4):_0x5ddae8,_0x147bcd=_0x36ba10[_0x4f8a6a(0x13f)]-0x1,_0x2060cb;_0x147bcd>=0x0;_0x147bcd--)(_0x2060cb=_0x36ba10[_0x147bcd])&&(_0x134559=_0x2060cb(_0x134559)||_0x134559);return _0x134559;},_0x32dacb=(_0x345c74,_0x2e8b6d)=>(_0x5493ff,_0xd3e953)=>_0x2e8b6d(_0x5493ff,_0xd3e953,_0x345c74);let _0x126863=class extends _0x5dbbbf[_0x419903(0x1a2)]{constructor(_0x2520b2,_0x3f4a51,_0x4374ed,_0x37377e){const _0x4b1c53=_0x419903;super(),this['_commentService']=_0x2520b2,this[_0x4b1c53(0x14f)]=_0x3f4a51,this[_0x4b1c53(0x1a0)]=_0x4374ed,this['_injector']=_0x37377e,this[_0x4b1c53(0x15e)](),this['_initUserSync']();}[_0x419903(0x16c)](){const _0x5f3578=_0x419903;this[_0x5f3578(0x17a)](this[_0x5f3578(0x14f)][_0x5f3578(0x17f)][_0x5f3578(0x1b0)](_0x3848c4[_0x5f3578(0x13c)](0x10))[_0x5f3578(0x182)](_0x56d42f=>{const _0x361bc1=_0x5f3578,_0x576981=new Set();_0x56d42f['forEach'](_0x52bd5e=>{const _0x5a7c2b=_0xf14b;switch(_0x52bd5e['type']){case _0x5a7c2b(0x134):{const _0x34c35c=_0x52bd5e[_0x5a7c2b(0x17d)][_0x5a7c2b(0x163)];_0x576981[_0x5a7c2b(0x134)](_0x34c35c);break;}}}),_0x290075(this[_0x361bc1(0x155)],_0x576981);}));}[_0x419903(0x15e)](){const _0x2fc639=_0x419903;this[_0x2fc639(0x17a)](this[_0x2fc639(0x1a8)][_0x2fc639(0x17f)][_0x2fc639(0x182)](async _0xfe384=>{const _0x252dd8=_0x2fc639;var _0x14411d,_0xa92e3d,_0x19d1c2,_0x3e09f7;const _0x39e229=(_0x14411d=this['_threadCommentModel'][_0x252dd8(0x12d)](_0xfe384[_0x252dd8(0x147)])['find'](_0x19c60d=>_0x19c60d[_0x252dd8(0x142)]===_0xfe384['threadId']))==null?void 0x0:_0x14411d[_0x252dd8(0x164)];if(!_0x39e229)return;const {unitId:_0x4d40a2,subUnitId:_0x539bfa}=_0x39e229;switch(_0xfe384[_0x252dd8(0x191)]&&this[_0x252dd8(0x1a0)]['addUser'](_0xfe384[_0x252dd8(0x191)]),_0xfe384['type']){case _0x597688[_0x252dd8(0x12c)]:break;case _0x597688[_0x252dd8(0x1ac)]:{this['_threadCommentModel'][_0x252dd8(0x16a)](_0x4d40a2,_0x539bfa,{'unitId':_0x4d40a2,'subUnitId':_0x539bfa,'ref':'','id':_0xfe384['replyId'],'dT':_0x3af8fb(+_0xfe384['createTimestamp']),'threadId':_0xfe384[_0x252dd8(0x142)],'personId':(_0x19d1c2=(_0xa92e3d=_0xfe384[_0x252dd8(0x191)])==null?void 0x0:_0xa92e3d['userID'])!=null?_0x19d1c2:_0xfe384['userId'],'text':JSON[_0x252dd8(0x188)](_0xfe384[_0x252dd8(0x18a)]),'parentId':_0x39e229['id']});break;}case _0x597688[_0x252dd8(0x170)]:{const _0x3e8fbc=this[_0x252dd8(0x14f)]['getComment'](_0x4d40a2,_0x539bfa,_0xfe384[_0x252dd8(0x18d)]);_0x3e8fbc&&_0x3e8fbc[_0x252dd8(0x195)]&&this['_threadCommentModel'][_0x252dd8(0x156)](_0x4d40a2,_0x539bfa,_0xfe384[_0x252dd8(0x18d)]);break;}case _0x597688[_0x252dd8(0x186)]:{this[_0x252dd8(0x14f)]['updateComment'](_0x4d40a2,_0x539bfa,{'commentId':_0xfe384[_0x252dd8(0x18d)],'text':JSON['parse'](_0xfe384[_0x252dd8(0x18a)])});break;}case _0x597688[_0x252dd8(0x192)]:{const _0x2d467b=(_0x3e09f7=this[_0x252dd8(0x14f)][_0x252dd8(0x12d)](_0xfe384[_0x252dd8(0x147)])[_0x252dd8(0x18f)](_0x47e272=>_0x47e272[_0x252dd8(0x142)]===_0xfe384[_0x252dd8(0x142)]))==null?void 0x0:_0x3e09f7[_0x252dd8(0x164)];_0x2d467b&&this[_0x252dd8(0x14f)][_0x252dd8(0x18b)](_0x4d40a2,_0x539bfa,_0x2d467b['id'],_0xfe384['solved']===_0x5dddc3['Solved']);break;}}}));}};_0x126863=_0x57a7cb([_0x32dacb(0x0,_0x5dbbbf[_0x419903(0x167)](_0xac7b5f[_0x419903(0x146)])),_0x32dacb(0x1,_0x5dbbbf[_0x419903(0x167)](_0x366a66[_0x419903(0x15d)])),_0x32dacb(0x2,_0x5dbbbf[_0x419903(0x167)](_0x5dbbbf[_0x419903(0x158)])),_0x32dacb(0x3,_0x5dbbbf['Inject'](_0x5dbbbf[_0x419903(0x178)]))],_0x126863);const _0x16777d='thread-comment-data-source.config',_0x3d8e93={};var _0x52111f=Object['getOwnPropertyDescriptor'],_0x4f1674=(_0x183882,_0x20f2a0,_0xd9f299,_0x52bbb7)=>{const _0x124c0e=_0x419903;for(var _0x55ad12=_0x52bbb7>0x1?void 0x0:_0x52bbb7?_0x52111f(_0x20f2a0,_0xd9f299):_0x20f2a0,_0x406f9d=_0x183882[_0x124c0e(0x13f)]-0x1,_0x274f9f;_0x406f9d>=0x0;_0x406f9d--)(_0x274f9f=_0x183882[_0x406f9d])&&(_0x55ad12=_0x274f9f(_0x55ad12)||_0x55ad12);return _0x55ad12;},_0x460a70=(_0x187cc9,_0x5f0cb5)=>(_0x25e299,_0x558497)=>_0x5f0cb5(_0x25e299,_0x558497,_0x187cc9);function _0x517cb8(_0x2fcfc7,_0x412d7a){const _0x48b1bd=_0x419903,_0x248e51=_0x2fcfc7[_0x48b1bd(0x1a7)][0x0];return{..._0x412d7a,'id':_0x248e51['replyId'],'resolved':_0x2fcfc7[_0x48b1bd(0x149)]===0x1,'dT':_0x3af8fb(_0x248e51['createTimestamp']),'personId':_0x248e51['userId'],'threadId':_0x248e51[_0x48b1bd(0x142)]};}function _0x253dcc(_0x297d91,_0xbf0018,_0x12d4ae){const _0x2eac06=_0x419903;var _0xb1e3a1,_0x236b43;if(((_0x236b43=(_0xb1e3a1=_0x297d91==null?void 0x0:_0x297d91[_0x2eac06(0x1a7)])==null?void 0x0:_0xb1e3a1[_0x2eac06(0x13f)])!=null?_0x236b43:0x0)>0x0){const _0x238f7e=(_0x2605f3,_0x30ec00)=>({'id':_0x2605f3['replyId'],'threadId':_0x2605f3['threadId'],'dT':_0x3af8fb(_0x2605f3[_0x2eac06(0x1b1)]),'personId':_0x2605f3[_0x2eac06(0x13b)],'resolved':_0x297d91[_0x2eac06(0x149)]===_0x5dddc3[_0x2eac06(0x19f)],'unitId':_0xbf0018,'subUnitId':_0x12d4ae,'text':JSON['parse'](_0x2605f3[_0x2eac06(0x18a)]),'parentId':_0x30ec00}),_0x1cc23b=_0x238f7e(_0x297d91[_0x2eac06(0x1a7)][0x0]);return{..._0x1cc23b,'children':_0x297d91[_0x2eac06(0x1a7)][_0x2eac06(0x137)](0x1)['map'](_0x477ec8=>_0x238f7e(_0x477ec8,_0x1cc23b['id']))};}return null;}let _0x34da40=class{constructor(_0x34d94a,_0x4464fb,_0x163508){const _0x54519b=_0x419903;this[_0x54519b(0x130)]=_0x34d94a,this[_0x54519b(0x1a0)]=_0x4464fb,this[_0x54519b(0x150)]=_0x163508;}async['addComment'](_0x1ec698){const _0x5c6970=_0x419903;var _0x4f2340,_0x3bf274;const {parentId:_0x33aac3,unitId:_0x31db15,text:_0x2c119b,threadId:_0x39ab69}=_0x1ec698,_0xd7629b=(_0x3bf274=(_0x4f2340=_0x2c119b['customRanges'])==null?void 0x0:_0x4f2340[_0x5c6970(0x1a5)](_0x4eed3a=>_0x4eed3a[_0x5c6970(0x177)]===_0x5dbbbf[_0x5c6970(0x17e)][_0x5c6970(0x13a)])[_0x5c6970(0x179)](_0x444465=>_0x444465['rangeId']))!=null?_0x3bf274:[],_0x4666d1=JSON[_0x5c6970(0x14b)](_0x2c119b),_0x3d5bc3=(await this[_0x5c6970(0x150)]['requireSession'](_0x31db15))[_0x5c6970(0x13d)]();if(_0x33aac3){const _0xa8097b={'memberId':_0x3d5bc3,'unitId':_0x31db15,'content':_0x4666d1,'mention':_0xd7629b,'threadId':_0x39ab69},_0x60130=(await this[_0x5c6970(0x130)][_0x5c6970(0x1af)](_0x5c6970(0x12e)+_0x31db15+'/reply',{'body':_0xa8097b}))[_0x5c6970(0x184)][_0x5c6970(0x1a3)];return{..._0x1ec698,'id':_0x60130['replyId'],'dT':_0x5dbbbf[_0x5c6970(0x12f)](+_0x60130[_0x5c6970(0x1b1)])[_0x5c6970(0x19d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x60130[_0x5c6970(0x13b)]};}else{const _0x361231={'memberId':_0x3d5bc3,'unitId':_0x31db15,'content':_0x4666d1,'mention':_0xd7629b},_0x14747f=await this[_0x5c6970(0x130)][_0x5c6970(0x1af)](_0x5c6970(0x12e)+_0x31db15+'/add',{'body':_0x361231});return _0x517cb8(_0x14747f[_0x5c6970(0x184)][_0x5c6970(0x183)],_0x1ec698);}}async[_0x419903(0x1ad)](_0x5b80ce){const _0x2c5cc4=_0x419903;var _0x16d236,_0x1aab81;const {text:_0x4e60ac,unitId:_0x5b84f6}=_0x5b80ce,_0x2b106a=(_0x1aab81=(_0x16d236=_0x4e60ac[_0x2c5cc4(0x16f)])==null?void 0x0:_0x16d236['filter'](_0x13cd86=>_0x13cd86[_0x2c5cc4(0x177)]===_0x5dbbbf[_0x2c5cc4(0x17e)][_0x2c5cc4(0x13a)])[_0x2c5cc4(0x179)](_0x12d039=>_0x12d039[_0x2c5cc4(0x132)]))!=null?_0x1aab81:[],_0x182527=JSON[_0x2c5cc4(0x14b)](_0x4e60ac),_0x20d9cf=_0x5b80ce[_0x2c5cc4(0x142)],_0x5bd445=_0x5b80ce['id'],_0x300dc3={'memberId':(await this[_0x2c5cc4(0x150)][_0x2c5cc4(0x197)](_0x5b84f6))['getMemberID'](),'unitId':_0x5b84f6,'threadId':_0x20d9cf,'mention':_0x2b106a,'content':_0x182527,'replyId':_0x5bd445},_0x19ca0a=await this[_0x2c5cc4(0x130)][_0x2c5cc4(0x1af)](_0x2c5cc4(0x12e)+_0x5b84f6+_0x2c5cc4(0x194),{'body':_0x300dc3});return!_0x19ca0a[_0x2c5cc4(0x184)]['error']||_0x19ca0a[_0x2c5cc4(0x184)][_0x2c5cc4(0x198)][_0x2c5cc4(0x176)]===0x1;}async[_0x419903(0x18b)](_0x3e684e){const _0x3cabf3=_0x419903,{unitId:_0x2624b0}=_0x3e684e,_0x37bdf7=_0x3e684e['threadId'],_0x59a763={'memberId':this[_0x3cabf3(0x1a0)][_0x3cabf3(0x190)]()['userID'],'unitId':_0x2624b0,'threadId':_0x37bdf7,'solved':_0x3e684e[_0x3cabf3(0x19a)]?_0x5dddc3['Solved']:_0x5dddc3[_0x3cabf3(0x162)]},_0xb96a2b=await this[_0x3cabf3(0x130)]['post'](_0x3cabf3(0x12e)+_0x2624b0+_0x3cabf3(0x173),{'body':_0x59a763});return!_0xb96a2b[_0x3cabf3(0x184)]['error']||_0xb96a2b[_0x3cabf3(0x184)]['error'][_0x3cabf3(0x176)]===0x1;}async[_0x419903(0x156)](_0x461f80,_0x59fe39,_0x54d346,_0x14e657){const _0x146c27=_0x419903,_0x510011={'memberId':(await this['_sessionService'][_0x146c27(0x197)](_0x461f80))[_0x146c27(0x13d)](),'threadId':_0x54d346,'replyId':_0x14e657,'unitId':_0x461f80},_0x23474b=await this[_0x146c27(0x130)]['post'](_0x146c27(0x12e)+_0x461f80+_0x146c27(0x143),{'body':_0x510011});return!_0x23474b[_0x146c27(0x184)][_0x146c27(0x198)]||_0x23474b['body'][_0x146c27(0x198)][_0x146c27(0x176)]===0x1;}async[_0x419903(0x174)](_0x41a495,_0x352719,_0x340a60){const _0x31a861=_0x419903,_0x26b54e={'unitId':_0x41a495,'threadId':_0x340a60},_0x2d47eb=await this[_0x31a861(0x130)][_0x31a861(0x1af)](_0x31a861(0x12e)+_0x41a495+_0x31a861(0x18c),{'body':_0x26b54e}),_0x50d154=_0x340a60[_0x31a861(0x179)](_0x57b055=>_0x253dcc(_0x2d47eb['body'][_0x31a861(0x15c)][_0x57b055],_0x41a495,_0x352719))[_0x31a861(0x1a5)](Boolean);return Object[_0x31a861(0x15b)](_0x2d47eb[_0x31a861(0x184)][_0x31a861(0x1a6)])[_0x31a861(0x159)](_0x541b5a=>{const _0x7a9a16=_0x31a861;this['_userService'][_0x7a9a16(0x171)](_0x541b5a);}),_0x50d154;}[_0x419903(0x1a1)](_0x177560){const _0x57948c=_0x419903;return{'id':_0x177560['id'],'threadId':_0x177560[_0x57948c(0x142)],'ref':_0x177560[_0x57948c(0x1a9)]};}};_0x34da40=_0x4f1674([_0x460a70(0x0,_0x5dbbbf[_0x419903(0x167)](_0x27ea21[_0x419903(0x14c)])),_0x460a70(0x1,_0x5dbbbf[_0x419903(0x167)](_0x5dbbbf['UserManagerService'])),_0x460a70(0x2,_0x5dbbbf[_0x419903(0x167)](_0xac7b5f[_0x419903(0x165)]))],_0x34da40);var _0x31b1aa=Object['getOwnPropertyDescriptor'],_0x25394d=(_0x23341e,_0xec003,_0x20d953,_0x54bbb4)=>{const _0x1a8ca1=_0x419903;for(var _0xdf674f=_0x54bbb4>0x1?void 0x0:_0x54bbb4?_0x31b1aa(_0xec003,_0x20d953):_0xec003,_0x5c9726=_0x23341e[_0x1a8ca1(0x13f)]-0x1,_0x357eea;_0x5c9726>=0x0;_0x5c9726--)(_0x357eea=_0x23341e[_0x5c9726])&&(_0xdf674f=_0x357eea(_0xdf674f)||_0xdf674f);return _0xdf674f;},_0x50f2c2=(_0x2a9457,_0x6b2531)=>(_0x256aca,_0x3b5de2)=>_0x6b2531(_0x256aca,_0x3b5de2,_0x2a9457);let _0x3720ab=class extends _0x5dbbbf['Disposable']{constructor(_0x3b1224,_0x15925f){const _0x4c9948=_0x419903;super(),this[_0x4c9948(0x148)]=_0x3b1224,this[_0x4c9948(0x139)]=_0x15925f,this[_0x4c9948(0x136)]();}[_0x419903(0x136)](){const _0x90007f=_0x419903;this[_0x90007f(0x148)]['dataSource']=this['_threadCommentDataSource'],this[_0x90007f(0x148)][_0x90007f(0x151)]=!0x1;}};_0x3720ab=_0x25394d([_0x50f2c2(0x0,_0x366a66[_0x419903(0x152)]),_0x50f2c2(0x1,_0x5dbbbf[_0x419903(0x167)](_0x34da40))],_0x3720ab);var _0x98bad2=Object[_0x419903(0x193)],_0x205afd=Object['getOwnPropertyDescriptor'],_0x137086=(_0x5bb1a3,_0x273b31,_0x3dc07a)=>_0x273b31 in _0x5bb1a3?_0x98bad2(_0x5bb1a3,_0x273b31,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dc07a}):_0x5bb1a3[_0x273b31]=_0x3dc07a,_0xf2d9c=(_0x381d16,_0x33f65a,_0x438c0e,_0x2499cb)=>{for(var _0xcf962d=_0x2499cb>0x1?void 0x0:_0x2499cb?_0x205afd(_0x33f65a,_0x438c0e):_0x33f65a,_0x579125=_0x381d16['length']-0x1,_0x5e40b1;_0x579125>=0x0;_0x579125--)(_0x5e40b1=_0x381d16[_0x579125])&&(_0xcf962d=_0x5e40b1(_0xcf962d)||_0xcf962d);return _0xcf962d;},_0x88052d=(_0x209c9c,_0xb9adc0)=>(_0xc06741,_0x3533f4)=>_0xb9adc0(_0xc06741,_0x3533f4,_0x209c9c),_0x377474=(_0x758f20,_0xf940a9,_0x59207b)=>_0x137086(_0x758f20,typeof _0xf940a9!=_0x419903(0x187)?_0xf940a9+'':_0xf940a9,_0x59207b);_0x2c1112[_0x419903(0x1ae)]=class extends _0x5dbbbf[_0x419903(0x140)]{constructor(_0x19e6c5=_0x3d8e93,_0xe9a6bc,_0x131055){const _0x5ed188=_0x419903;super(),this[_0x5ed188(0x1a4)]=_0x19e6c5,this[_0x5ed188(0x155)]=_0xe9a6bc,this['_configService']=_0x131055;const {..._0x23bcdf}=_0x5dbbbf['merge']({},_0x3d8e93,this[_0x5ed188(0x1a4)]);this[_0x5ed188(0x135)][_0x5ed188(0x145)](_0x16777d,_0x23bcdf);}['onStarting'](){const _0x475049=_0x419903;[[_0x34da40],[_0x3720ab],[_0x126863]][_0x475049(0x159)](_0x23e318=>{const _0x320703=_0x475049;this[_0x320703(0x155)][_0x320703(0x134)](_0x23e318);});}['onReady'](){const _0x3d64f4=_0x419903;this[_0x3d64f4(0x155)][_0x3d64f4(0x14a)](_0x3720ab),this['_injector'][_0x3d64f4(0x14a)](_0x126863);}},_0x377474(_0x2c1112[_0x419903(0x1ae)],_0x419903(0x15a),_0x20280e),_0x377474(_0x2c1112[_0x419903(0x1ae)],_0x419903(0x157),_0x5dbbbf['UniverInstanceType'][_0x419903(0x15f)]),_0x2c1112[_0x419903(0x1ae)]=_0xf2d9c([_0x5dbbbf['DependentOn'](_0x428aaa[_0x419903(0x196)],_0xac7b5f[_0x419903(0x144)],_0x589023[_0x419903(0x133)]),_0x88052d(0x1,_0x5dbbbf[_0x419903(0x167)](_0x5dbbbf[_0x419903(0x178)])),_0x88052d(0x2,_0x5dbbbf[_0x419903(0x13e)])],_0x2c1112[_0x419903(0x1ae)]),Object[_0x419903(0x193)](_0x2c1112,Symbol['toStringTag'],{'value':_0x419903(0x168)});}));function _0xc4d3(){const _0x12d957=['IThreadCommentDataSourceService','967462aqGKCn','1DQbtWs','_injector','deleteComment','type','UserManagerService','forEach','pluginName','values','comments','ThreadCommentModel','_init','UNIVER_UNKNOWN','@univerjs/network','590859SSKIpT','OpenOrReOpen','personId','root','CollaborationSessionService','/universer-api/user/list','Inject','Module','@univerjs-pro/license','addComment','@univerjs/core','_initUserSync','8PByDry','@univerjs/thread-comment','customRanges','Delete','addUser','UniverProCollaborationClient','/solved','listComments','UniverThreadCommentUi','code','rangeType','Injector','map','disposeWithMe','@univerjs/thread-comment-ui','function','payload','CustomRangeType','commentUpdate$','25438480bAsbWL','getUser','subscribe','comment','body','UNRECOGNIZED','Edit','symbol','parse','5810125pAjVuy','content','resolveComment','/list','replyId','1078071iwOYyR','find','getCurrentUser','user','Solve','defineProperty','/edit','parentId','UniverThreadCommentUIPlugin','requireSession','error','@univerjs-pro/collaboration-client','resolved','8TkYINy','object','format','Unknown','Solved','_userService','saveCommentToSnapshot','Disposable','reply','_config','filter','users','replies','_commentService','ref','600320EtIhrG','UniverNetwork','Reply','updateComment','UniverThreadCommentDataSourcePlugin','post','pipe','createTimestamp','Add','getUnit','/universer-api/comment/unit/','dayjs','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeId','UniverLicensePlugin','add','_configService','_initDataSource','slice','size','_threadCommentDataSource','COMMENT','userId','bufferTime','getMemberID','IConfigService','length','Plugin','UniverProLicense','threadId','/delete','UniverCollaborationClientPlugin','setConfig','CommentService','unitId','_threadCommentDataSourceService','solved','get','stringify','HTTPService','4729218tPbMVO','UniverThreadComment','_threadCommentModel','_sessionService','syncUpdateMutationToColla'];_0xc4d3=function(){return _0x12d957;};return _0xc4d3();}
|
|
1
|
+
function _0x53ee(){const _0x2b48b8=['delete','parse','Unknown','Solved','users','@univerjs/network','saveCommentToSnapshot','thread-comment-data-source.config','object','threadId','_initDataSource','UniverNetwork','Inject','filter','unitId','format','customRanges','map','9606311pdbnyZ','@univerjs/thread-comment','dayjs','CollaborationSessionService','1059tmcPlt','getUser','UniverCore','UserManagerService','replyId','user','length','defineProperty','createTimestamp','/solved','onStarting','get','comment','_httpService','type','ref','rxjs','Solve','UniverCollaborationClientPlugin','merge','_commentService','function','content','Edit','deleteComment','UniverThreadCommentUi','YYYY/MM/DD\x20HH:mm','resolveComment','getCurrentUser','solved','IThreadCommentDataSourceService','/edit','pipe','updateComment','post','dataSource','UNRECOGNIZED','HTTPService','bufferTime','4zOXgzf','Add','@univerjs-pro/collaboration-client','IConfigService','getMemberID','_config','2628110sNjWrr','Disposable','Module','disposeWithMe','getUnit','personId','OpenOrReOpen','_injector','/universer-api/user/list','addComment','1223880yemqEp','symbol','requireSession','onReady','COMMENT','userID','resolved','getComment','UniverProLicense','Injector','exports','code','/reply','rangeId','Delete','UniverThreadComment','UniverProCollaborationClient','1886549itTxNH','UNIVER_UNKNOWN','_threadCommentModel','_sessionService','3224862cchbmo','5633307EJdEzr','find','3398iQKmMk','Reply','listComments','slice','56jQfhfl','userId','addUser','size','10wjWjXR','/universer-api/comment/unit/','syncUpdateMutationToColla','ThreadCommentModel','toStringTag','_threadCommentDataSourceService','_init','@univerjs/core','DependentOn','stringify','UniverInstanceType','UniverThreadCommentDataSourcePlugin','payload','subscribe','replies','error','/delete','_userService','forEach','_threadCommentDataSource','comments','_configService','getOwnPropertyDescriptor','root','CommentService','CustomRangeType','amd','add','body','UniverProThreadCommentDatasource','_initUserSync'];_0x53ee=function(){return _0x2b48b8;};return _0x53ee();}function _0x1e8b(_0x4ce4af,_0x5571ce){const _0x53eec8=_0x53ee();return _0x1e8b=function(_0x1e8b96,_0xa3afbf){_0x1e8b96=_0x1e8b96-0xaa;let _0x5892d7=_0x53eec8[_0x1e8b96];return _0x5892d7;},_0x1e8b(_0x4ce4af,_0x5571ce);}(function(_0x377159,_0x179354){const _0x10378a=_0x1e8b,_0x19b45a=_0x377159();while(!![]){try{const _0x3c4727=parseInt(_0x10378a(0x112))/0x1*(-parseInt(_0x10378a(0xd5))/0x2)+-parseInt(_0x10378a(0xbd))/0x3+parseInt(_0x10378a(0xad))/0x4*(parseInt(_0x10378a(0xb3))/0x5)+parseInt(_0x10378a(0xd2))/0x6+parseInt(_0x10378a(0xce))/0x7*(parseInt(_0x10378a(0xd9))/0x8)+parseInt(_0x10378a(0xd3))/0x9*(-parseInt(_0x10378a(0xdd))/0xa)+parseInt(_0x10378a(0x10e))/0xb;if(_0x3c4727===_0x179354)break;else _0x19b45a['push'](_0x19b45a['shift']());}catch(_0x477fe3){_0x19b45a['push'](_0x19b45a['shift']());}}}(_0x53ee,0xf1a81),function(_0x27d211,_0x2cd794){const _0x18e2fa=_0x1e8b;typeof exports==_0x18e2fa(0x104)&&typeof module<'u'?_0x2cd794(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x18e2fa(0x127)&&define[_0x18e2fa(0xf7)]?define([_0x18e2fa(0xc7),_0x18e2fa(0xaf),'@univerjs-pro/license',_0x18e2fa(0xe4),'@univerjs/thread-comment-ui',_0x18e2fa(0x10f),_0x18e2fa(0x122),_0x18e2fa(0x101)],_0x2cd794):(_0x27d211=typeof globalThis<'u'?globalThis:_0x27d211||self,_0x2cd794(_0x27d211[_0x18e2fa(0xfa)]={},_0x27d211[_0x18e2fa(0xcd)],_0x27d211[_0x18e2fa(0xc5)],_0x27d211[_0x18e2fa(0x114)],_0x27d211[_0x18e2fa(0x12b)],_0x27d211[_0x18e2fa(0xcc)],_0x27d211[_0x18e2fa(0x122)],_0x27d211[_0x18e2fa(0x107)]));}(this,function(_0x44b885,_0x35eaa,_0x49ea49,_0x112274,_0x4ec42b,_0x1271a9,_0x4b5fa3,_0x6030d1){'use strict';const _0x4eed6d=_0x1e8b;const _0x31cbdc='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x51456a=(_0x2a460f=>(_0x2a460f[_0x2a460f[_0x4eed6d(0xb9)]=0x0]=_0x4eed6d(0xb9),_0x2a460f[_0x2a460f['Solved']=0x1]=_0x4eed6d(0xff),_0x2a460f[_0x2a460f[_0x4eed6d(0xaa)]=-0x1]=_0x4eed6d(0xaa),_0x2a460f))(_0x51456a||{}),_0x23064d=(_0x56698a=>(_0x56698a[_0x56698a['Unknown']=0x0]=_0x4eed6d(0xfe),_0x56698a[_0x56698a[_0x4eed6d(0xae)]=0x1]='Add',_0x56698a[_0x56698a[_0x4eed6d(0xd6)]=0x2]=_0x4eed6d(0xd6),_0x56698a[_0x56698a[_0x4eed6d(0x129)]=0x3]=_0x4eed6d(0x129),_0x56698a[_0x56698a['Delete']=0x4]=_0x4eed6d(0xcb),_0x56698a[_0x56698a[_0x4eed6d(0x123)]=0x5]=_0x4eed6d(0x123),_0x56698a[_0x56698a[_0x4eed6d(0xaa)]=-0x1]=_0x4eed6d(0xaa),_0x56698a))(_0x23064d||{});const _0x1cd0d6=_0x11492f=>_0x112274[_0x4eed6d(0x110)](new Date(+_0x11492f))[_0x4eed6d(0x10b)]('YYYY/MM/DD\x20HH:mm'),_0x44a922=async(_0x91840c,_0x4e0c62)=>{const _0x2008ee=_0x4eed6d,_0x5c6021=_0x91840c[_0x2008ee(0x11d)](_0x112274[_0x2008ee(0x115)]),_0x1fb6d1=_0x91840c[_0x2008ee(0x11d)](_0x6030d1[_0x2008ee(0xab)]);_0x4e0c62[_0x2008ee(0xef)](_0x5959d4=>{const _0x59698e=_0x2008ee;_0x5c6021[_0x59698e(0x113)](_0x5959d4)&&_0x4e0c62[_0x59698e(0xfc)](_0x5959d4);}),_0x4e0c62[_0x2008ee(0xdc)]&&(await _0x1fb6d1[_0x2008ee(0x11d)](_0x2008ee(0xbb),{'params':{'userIDs':[..._0x4e0c62]}}))[_0x2008ee(0xf9)][_0x2008ee(0x100)][_0x2008ee(0xef)](_0x55523b=>{const _0x3ea297=_0x2008ee;_0x55523b&&_0x5c6021[_0x3ea297(0xdb)](_0x55523b);});};var _0x2d7271=Object[_0x4eed6d(0xf3)],_0x58b5ae=(_0x49f2dd,_0x2e35a5,_0x3b883d,_0x209493)=>{const _0xa0dee1=_0x4eed6d;for(var _0x5d1243=_0x209493>0x1?void 0x0:_0x209493?_0x2d7271(_0x2e35a5,_0x3b883d):_0x2e35a5,_0x3d0aa5=_0x49f2dd[_0xa0dee1(0x118)]-0x1,_0x19458b;_0x3d0aa5>=0x0;_0x3d0aa5--)(_0x19458b=_0x49f2dd[_0x3d0aa5])&&(_0x5d1243=_0x19458b(_0x5d1243)||_0x5d1243);return _0x5d1243;},_0xdfb299=(_0x4ce8ae,_0xe64f5)=>(_0x2a8eb5,_0x4ff44e)=>_0xe64f5(_0x2a8eb5,_0x4ff44e,_0x4ce8ae);let _0x4f92c3=class extends _0x112274[_0x4eed6d(0xb4)]{constructor(_0x4aa52a,_0x57c5a3,_0x6a334e,_0x2231dc){const _0x177b77=_0x4eed6d;super(),this[_0x177b77(0x126)]=_0x4aa52a,this[_0x177b77(0xd0)]=_0x57c5a3,this[_0x177b77(0xee)]=_0x6a334e,this[_0x177b77(0xba)]=_0x2231dc,this[_0x177b77(0xe3)](),this[_0x177b77(0xfb)]();}[_0x4eed6d(0xfb)](){const _0x320a68=_0x4eed6d;this['disposeWithMe'](this[_0x320a68(0xd0)]['commentUpdate$'][_0x320a68(0x132)](_0x4b5fa3[_0x320a68(0xac)](0x10))[_0x320a68(0xea)](_0xae29a5=>{const _0x448229=_0x320a68,_0x594920=new Set();_0xae29a5[_0x448229(0xef)](_0x47cfc4=>{const _0x5d8cb3=_0x448229;switch(_0x47cfc4['type']){case'add':{const _0x15df9f=_0x47cfc4[_0x5d8cb3(0xe9)][_0x5d8cb3(0xb8)];_0x594920[_0x5d8cb3(0xf8)](_0x15df9f);break;}}}),_0x44a922(this['_injector'],_0x594920);}));}['_init'](){const _0x5a4a69=_0x4eed6d;this[_0x5a4a69(0xb6)](this[_0x5a4a69(0x126)]['commentUpdate$'][_0x5a4a69(0xea)](async _0x43387f=>{const _0x213817=_0x5a4a69;var _0x536bb1,_0x55a88f,_0x1eb303,_0x627c17;const _0x417c88=(_0x536bb1=this[_0x213817(0xd0)][_0x213817(0xb7)](_0x43387f[_0x213817(0x10a)])[_0x213817(0xd4)](_0x269663=>_0x269663[_0x213817(0x105)]===_0x43387f['threadId']))==null?void 0x0:_0x536bb1[_0x213817(0xf4)];if(!_0x417c88)return;const {unitId:_0x2e1f72,subUnitId:_0x15ac3b}=_0x417c88;switch(_0x43387f[_0x213817(0x117)]&&this[_0x213817(0xee)]['addUser'](_0x43387f['user']),_0x43387f[_0x213817(0x120)]){case _0x23064d[_0x213817(0xae)]:break;case _0x23064d['Reply']:{this[_0x213817(0xd0)][_0x213817(0xbc)](_0x2e1f72,_0x15ac3b,{'unitId':_0x2e1f72,'subUnitId':_0x15ac3b,'ref':'','id':_0x43387f['replyId'],'dT':_0x1cd0d6(+_0x43387f[_0x213817(0x11a)]),'threadId':_0x43387f[_0x213817(0x105)],'personId':(_0x1eb303=(_0x55a88f=_0x43387f['user'])==null?void 0x0:_0x55a88f[_0x213817(0xc2)])!=null?_0x1eb303:_0x43387f[_0x213817(0xda)],'text':JSON[_0x213817(0xfd)](_0x43387f['content']),'parentId':_0x417c88['id']});break;}case _0x23064d[_0x213817(0xcb)]:{const _0x239bf5=this['_threadCommentModel'][_0x213817(0xc4)](_0x2e1f72,_0x15ac3b,_0x43387f[_0x213817(0x116)]);_0x239bf5&&_0x239bf5['parentId']&&this[_0x213817(0xd0)][_0x213817(0x12a)](_0x2e1f72,_0x15ac3b,_0x43387f[_0x213817(0x116)]);break;}case _0x23064d[_0x213817(0x129)]:{this['_threadCommentModel'][_0x213817(0x133)](_0x2e1f72,_0x15ac3b,{'commentId':_0x43387f[_0x213817(0x116)],'text':JSON[_0x213817(0xfd)](_0x43387f['content'])});break;}case _0x23064d[_0x213817(0x123)]:{const _0x5ef583=(_0x627c17=this[_0x213817(0xd0)]['getUnit'](_0x43387f['unitId'])[_0x213817(0xd4)](_0x3913bf=>_0x3913bf['threadId']===_0x43387f[_0x213817(0x105)]))==null?void 0x0:_0x627c17[_0x213817(0xf4)];_0x5ef583&&this[_0x213817(0xd0)][_0x213817(0x12d)](_0x2e1f72,_0x15ac3b,_0x5ef583['id'],_0x43387f['solved']===_0x51456a[_0x213817(0xff)]);break;}}}));}};_0x4f92c3=_0x58b5ae([_0xdfb299(0x0,_0x112274[_0x4eed6d(0x108)](_0x35eaa[_0x4eed6d(0xf5)])),_0xdfb299(0x1,_0x112274['Inject'](_0x1271a9[_0x4eed6d(0xe0)])),_0xdfb299(0x2,_0x112274[_0x4eed6d(0x108)](_0x112274[_0x4eed6d(0x115)])),_0xdfb299(0x3,_0x112274['Inject'](_0x112274['Injector']))],_0x4f92c3);const _0x53cbb8=_0x4eed6d(0x103),_0x5b8cdc={};var _0x188281=Object[_0x4eed6d(0xf3)],_0x1ae060=(_0x538efd,_0x14b6cd,_0x1e7c6d,_0x155bd1)=>{const _0xc176fe=_0x4eed6d;for(var _0x52bfe=_0x155bd1>0x1?void 0x0:_0x155bd1?_0x188281(_0x14b6cd,_0x1e7c6d):_0x14b6cd,_0x52acb6=_0x538efd[_0xc176fe(0x118)]-0x1,_0x3aa8dd;_0x52acb6>=0x0;_0x52acb6--)(_0x3aa8dd=_0x538efd[_0x52acb6])&&(_0x52bfe=_0x3aa8dd(_0x52bfe)||_0x52bfe);return _0x52bfe;},_0x463ddd=(_0x419fa6,_0xf805e6)=>(_0x321c29,_0x28a860)=>_0xf805e6(_0x321c29,_0x28a860,_0x419fa6);function _0x288e2a(_0x45329c,_0x186c8c){const _0x43d056=_0x4eed6d,_0x4e97ce=_0x45329c['replies'][0x0];return{..._0x186c8c,'id':_0x4e97ce[_0x43d056(0x116)],'resolved':_0x45329c[_0x43d056(0x12f)]===0x1,'dT':_0x1cd0d6(_0x4e97ce[_0x43d056(0x11a)]),'personId':_0x4e97ce['userId'],'threadId':_0x4e97ce[_0x43d056(0x105)]};}function _0x502dd1(_0x29a8b6,_0x58277c,_0x54edef){const _0x47f7a9=_0x4eed6d;var _0x1554fc,_0x2b81c3;if(((_0x2b81c3=(_0x1554fc=_0x29a8b6==null?void 0x0:_0x29a8b6[_0x47f7a9(0xeb)])==null?void 0x0:_0x1554fc['length'])!=null?_0x2b81c3:0x0)>0x0){const _0x37c63f=(_0x231ae0,_0x5ed4ab)=>({'id':_0x231ae0['replyId'],'threadId':_0x231ae0[_0x47f7a9(0x105)],'dT':_0x1cd0d6(_0x231ae0['createTimestamp']),'personId':_0x231ae0[_0x47f7a9(0xda)],'resolved':_0x29a8b6[_0x47f7a9(0x12f)]===_0x51456a[_0x47f7a9(0xff)],'unitId':_0x58277c,'subUnitId':_0x54edef,'text':JSON[_0x47f7a9(0xfd)](_0x231ae0[_0x47f7a9(0x128)]),'parentId':_0x5ed4ab}),_0x4bd8cb=_0x37c63f(_0x29a8b6['replies'][0x0]);return{..._0x4bd8cb,'children':_0x29a8b6[_0x47f7a9(0xeb)][_0x47f7a9(0xd8)](0x1)[_0x47f7a9(0x10d)](_0x86eb79=>_0x37c63f(_0x86eb79,_0x4bd8cb['id']))};}return null;}let _0x2a7fb3=class{constructor(_0x27abd5,_0x19033c,_0x499c00){const _0x488e9=_0x4eed6d;this['_httpService']=_0x27abd5,this[_0x488e9(0xee)]=_0x19033c,this[_0x488e9(0xd1)]=_0x499c00;}async[_0x4eed6d(0xbc)](_0x1bc96a){const _0x5d5c39=_0x4eed6d;var _0x5b8c53,_0x5455c3;const {parentId:_0x9eb31d,unitId:_0x2cee3f,text:_0x7068e9,threadId:_0x47db74}=_0x1bc96a,_0x393ee7=(_0x5455c3=(_0x5b8c53=_0x7068e9[_0x5d5c39(0x10c)])==null?void 0x0:_0x5b8c53[_0x5d5c39(0x109)](_0x42eebf=>_0x42eebf['rangeType']===_0x112274['CustomRangeType'][_0x5d5c39(0xc1)])[_0x5d5c39(0x10d)](_0x3fe444=>_0x3fe444['rangeId']))!=null?_0x5455c3:[],_0x5dc8e6=JSON[_0x5d5c39(0xe6)](_0x7068e9),_0x1403fa=(await this[_0x5d5c39(0xd1)]['requireSession'](_0x2cee3f))['getMemberID']();if(_0x9eb31d){const _0x20d917={'memberId':_0x1403fa,'unitId':_0x2cee3f,'content':_0x5dc8e6,'mention':_0x393ee7,'threadId':_0x47db74},_0x504a52=(await this[_0x5d5c39(0x11f)]['post'](_0x5d5c39(0xde)+_0x2cee3f+_0x5d5c39(0xc9),{'body':_0x20d917}))['body']['reply'];return{..._0x1bc96a,'id':_0x504a52[_0x5d5c39(0x116)],'dT':_0x112274[_0x5d5c39(0x110)](+_0x504a52[_0x5d5c39(0x11a)])[_0x5d5c39(0x10b)](_0x5d5c39(0x12c)),'personId':_0x504a52[_0x5d5c39(0xda)]};}else{const _0xdca91e={'memberId':_0x1403fa,'unitId':_0x2cee3f,'content':_0x5dc8e6,'mention':_0x393ee7},_0xf57f32=await this[_0x5d5c39(0x11f)][_0x5d5c39(0x134)](_0x5d5c39(0xde)+_0x2cee3f+'/add',{'body':_0xdca91e});return _0x288e2a(_0xf57f32[_0x5d5c39(0xf9)][_0x5d5c39(0x11e)],_0x1bc96a);}}async[_0x4eed6d(0x133)](_0x42a366){const _0x5e2a3f=_0x4eed6d;var _0x4e94e1,_0x5d273d;const {text:_0x31db7b,unitId:_0x4285a1}=_0x42a366,_0x54eea2=(_0x5d273d=(_0x4e94e1=_0x31db7b[_0x5e2a3f(0x10c)])==null?void 0x0:_0x4e94e1[_0x5e2a3f(0x109)](_0xa63900=>_0xa63900['rangeType']===_0x112274[_0x5e2a3f(0xf6)][_0x5e2a3f(0xc1)])[_0x5e2a3f(0x10d)](_0x2e3a33=>_0x2e3a33[_0x5e2a3f(0xca)]))!=null?_0x5d273d:[],_0x270e5f=JSON[_0x5e2a3f(0xe6)](_0x31db7b),_0x2866be=_0x42a366['threadId'],_0x4e3b08=_0x42a366['id'],_0x48bcb0={'memberId':(await this[_0x5e2a3f(0xd1)][_0x5e2a3f(0xbf)](_0x4285a1))[_0x5e2a3f(0xb1)](),'unitId':_0x4285a1,'threadId':_0x2866be,'mention':_0x54eea2,'content':_0x270e5f,'replyId':_0x4e3b08},_0x517c2d=await this[_0x5e2a3f(0x11f)]['post'](_0x5e2a3f(0xde)+_0x4285a1+_0x5e2a3f(0x131),{'body':_0x48bcb0});return!_0x517c2d[_0x5e2a3f(0xf9)]['error']||_0x517c2d[_0x5e2a3f(0xf9)][_0x5e2a3f(0xec)][_0x5e2a3f(0xc8)]===0x1;}async[_0x4eed6d(0x12d)](_0x32e6d5){const _0xf74800=_0x4eed6d,{unitId:_0x29c117}=_0x32e6d5,_0x311694=_0x32e6d5[_0xf74800(0x105)],_0x5e5b62={'memberId':this[_0xf74800(0xee)][_0xf74800(0x12e)]()[_0xf74800(0xc2)],'unitId':_0x29c117,'threadId':_0x311694,'solved':_0x32e6d5[_0xf74800(0xc3)]?_0x51456a[_0xf74800(0xff)]:_0x51456a[_0xf74800(0xb9)]},_0x1312a1=await this[_0xf74800(0x11f)][_0xf74800(0x134)](_0xf74800(0xde)+_0x29c117+_0xf74800(0x11b),{'body':_0x5e5b62});return!_0x1312a1[_0xf74800(0xf9)]['error']||_0x1312a1['body'][_0xf74800(0xec)][_0xf74800(0xc8)]===0x1;}async['deleteComment'](_0x2b52e4,_0x1d3507,_0x5ec6fc,_0x1dfefd){const _0xca04dd=_0x4eed6d,_0x451fa1={'memberId':(await this[_0xca04dd(0xd1)][_0xca04dd(0xbf)](_0x2b52e4))[_0xca04dd(0xb1)](),'threadId':_0x5ec6fc,'replyId':_0x1dfefd,'unitId':_0x2b52e4},_0x317941=await this[_0xca04dd(0x11f)][_0xca04dd(0x134)]('/universer-api/comment/unit/'+_0x2b52e4+_0xca04dd(0xed),{'body':_0x451fa1});return!_0x317941[_0xca04dd(0xf9)][_0xca04dd(0xec)]||_0x317941['body']['error'][_0xca04dd(0xc8)]===0x1;}async[_0x4eed6d(0xd7)](_0x22c327,_0x4f2c29,_0x11a0e9){const _0x58176a=_0x4eed6d,_0x388f0f={'unitId':_0x22c327,'threadId':_0x11a0e9},_0x9ea90=await this[_0x58176a(0x11f)][_0x58176a(0x134)](_0x58176a(0xde)+_0x22c327+'/list',{'body':_0x388f0f}),_0x1c3cca=_0x11a0e9[_0x58176a(0x10d)](_0x6a1ae5=>_0x502dd1(_0x9ea90[_0x58176a(0xf9)][_0x58176a(0xf1)][_0x6a1ae5],_0x22c327,_0x4f2c29))[_0x58176a(0x109)](Boolean);return Object['values'](_0x9ea90[_0x58176a(0xf9)][_0x58176a(0x100)])[_0x58176a(0xef)](_0xb66d40=>{const _0x191749=_0x58176a;this[_0x191749(0xee)][_0x191749(0xdb)](_0xb66d40);}),_0x1c3cca;}[_0x4eed6d(0x102)](_0x5dffc9){const _0x448be3=_0x4eed6d;return{'id':_0x5dffc9['id'],'threadId':_0x5dffc9[_0x448be3(0x105)],'ref':_0x5dffc9[_0x448be3(0x121)]};}};_0x2a7fb3=_0x1ae060([_0x463ddd(0x0,_0x112274['Inject'](_0x6030d1['HTTPService'])),_0x463ddd(0x1,_0x112274[_0x4eed6d(0x108)](_0x112274['UserManagerService'])),_0x463ddd(0x2,_0x112274[_0x4eed6d(0x108)](_0x35eaa[_0x4eed6d(0x111)]))],_0x2a7fb3);var _0x1b4b45=Object['getOwnPropertyDescriptor'],_0x25e309=(_0x21b2f8,_0x173c06,_0x29a4a4,_0x24f440)=>{const _0x742afc=_0x4eed6d;for(var _0x52fb4f=_0x24f440>0x1?void 0x0:_0x24f440?_0x1b4b45(_0x173c06,_0x29a4a4):_0x173c06,_0x3c19cf=_0x21b2f8[_0x742afc(0x118)]-0x1,_0x3cfb9f;_0x3c19cf>=0x0;_0x3c19cf--)(_0x3cfb9f=_0x21b2f8[_0x3c19cf])&&(_0x52fb4f=_0x3cfb9f(_0x52fb4f)||_0x52fb4f);return _0x52fb4f;},_0x29824a=(_0x512639,_0x54e6f6)=>(_0xa8f91a,_0x1d9203)=>_0x54e6f6(_0xa8f91a,_0x1d9203,_0x512639);let _0x26138=class extends _0x112274[_0x4eed6d(0xb4)]{constructor(_0x40a735,_0x387bd5){const _0x3e2c8c=_0x4eed6d;super(),this[_0x3e2c8c(0xe2)]=_0x40a735,this[_0x3e2c8c(0xf0)]=_0x387bd5,this['_initDataSource']();}[_0x4eed6d(0x106)](){const _0x5585d0=_0x4eed6d;this[_0x5585d0(0xe2)][_0x5585d0(0x135)]=this[_0x5585d0(0xf0)],this[_0x5585d0(0xe2)][_0x5585d0(0xdf)]=!0x1;}};_0x26138=_0x25e309([_0x29824a(0x0,_0x1271a9[_0x4eed6d(0x130)]),_0x29824a(0x1,_0x112274[_0x4eed6d(0x108)](_0x2a7fb3))],_0x26138);var _0x2427a6=Object[_0x4eed6d(0x119)],_0x3a2a55=Object[_0x4eed6d(0xf3)],_0x424992=(_0x34560e,_0x35a287,_0x1f7d91)=>_0x35a287 in _0x34560e?_0x2427a6(_0x34560e,_0x35a287,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f7d91}):_0x34560e[_0x35a287]=_0x1f7d91,_0x24997a=(_0x9386e7,_0x547efa,_0x140c95,_0x1aa54c)=>{const _0x2744ad=_0x4eed6d;for(var _0x54e347=_0x1aa54c>0x1?void 0x0:_0x1aa54c?_0x3a2a55(_0x547efa,_0x140c95):_0x547efa,_0x4d68a3=_0x9386e7[_0x2744ad(0x118)]-0x1,_0x3ab92a;_0x4d68a3>=0x0;_0x4d68a3--)(_0x3ab92a=_0x9386e7[_0x4d68a3])&&(_0x54e347=_0x3ab92a(_0x54e347)||_0x54e347);return _0x54e347;},_0x27f9e7=(_0xa5cd40,_0x214cfb)=>(_0x34242b,_0x12aa68)=>_0x214cfb(_0x34242b,_0x12aa68,_0xa5cd40),_0x491a23=(_0x4abac1,_0x531c8a,_0xe8b7c6)=>_0x424992(_0x4abac1,typeof _0x531c8a!=_0x4eed6d(0xbe)?_0x531c8a+'':_0x531c8a,_0xe8b7c6);_0x44b885['UniverThreadCommentDataSourcePlugin']=class extends _0x112274['Plugin']{constructor(_0x2f58c2=_0x5b8cdc,_0x233ba5,_0x2fea68){const _0x590929=_0x4eed6d;super(),this[_0x590929(0xb2)]=_0x2f58c2,this['_injector']=_0x233ba5,this[_0x590929(0xf2)]=_0x2fea68;const {..._0x313781}=_0x112274[_0x590929(0x125)]({},_0x5b8cdc,this[_0x590929(0xb2)]);this[_0x590929(0xf2)]['setConfig'](_0x53cbb8,_0x313781);}[_0x4eed6d(0x11c)](){const _0x2574af=_0x4eed6d;[[_0x2a7fb3],[_0x26138],[_0x4f92c3]][_0x2574af(0xef)](_0x397f0c=>{const _0x4d5c26=_0x2574af;this[_0x4d5c26(0xba)][_0x4d5c26(0xf8)](_0x397f0c);});}[_0x4eed6d(0xc0)](){const _0x348b7d=_0x4eed6d;this[_0x348b7d(0xba)]['get'](_0x26138),this[_0x348b7d(0xba)][_0x348b7d(0x11d)](_0x4f92c3);}},_0x491a23(_0x44b885[_0x4eed6d(0xe8)],'pluginName',_0x31cbdc),_0x491a23(_0x44b885[_0x4eed6d(0xe8)],_0x4eed6d(0x120),_0x112274[_0x4eed6d(0xe7)][_0x4eed6d(0xcf)]),_0x44b885[_0x4eed6d(0xe8)]=_0x24997a([_0x112274[_0x4eed6d(0xe5)](_0x4ec42b['UniverThreadCommentUIPlugin'],_0x35eaa[_0x4eed6d(0x124)],_0x49ea49['UniverLicensePlugin']),_0x27f9e7(0x1,_0x112274[_0x4eed6d(0x108)](_0x112274[_0x4eed6d(0xc6)])),_0x27f9e7(0x2,_0x112274[_0x4eed6d(0xb0)])],_0x44b885['UniverThreadCommentDataSourcePlugin']),Object[_0x4eed6d(0x119)](_0x44b885,Symbol[_0x4eed6d(0xe1)],{'value':_0x4eed6d(0xb5)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs-pro/
|
|
48
|
+
"@univerjs-pro/license": "0.10.8",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.10.8",
|
|
50
|
+
"@univerjs/core": "0.10.8",
|
|
50
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
51
|
-
"@univerjs/network": "0.10.
|
|
52
|
-
"@univerjs/thread-comment
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/thread-comment": "0.10.7-nightly.202509130703"
|
|
52
|
+
"@univerjs/network": "0.10.8",
|
|
53
|
+
"@univerjs/thread-comment": "0.10.8",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.8"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.2",
|
|
59
59
|
"vite": "^7.1.3",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.8"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|