@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202504301607 → 0.7.0-nightly.202505011607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x14cdcb=_0x8c22;(function(_0x45f6b5,_0x2d1f20){const _0xf35e4a=_0x8c22,_0x102d0d=_0x45f6b5();while(!![]){try{const _0x5baac1=-parseInt(_0xf35e4a(0xd7))/0x1+-parseInt(_0xf35e4a(0xf9))/0x2+-parseInt(_0xf35e4a(0xee))/0x3*(parseInt(_0xf35e4a(0xca))/0x4)+-parseInt(_0xf35e4a(0xc2))/0x5*(parseInt(_0xf35e4a(0x111))/0x6)+parseInt(_0xf35e4a(0xac))/0x7*(-parseInt(_0xf35e4a(0xb6))/0x8)+parseInt(_0xf35e4a(0xfa))/0x9+parseInt(_0xf35e4a(0x103))/0xa*(parseInt(_0xf35e4a(0xad))/0xb);if(_0x5baac1===_0x2d1f20)break;else _0x102d0d['push'](_0x102d0d['shift']());}catch(_0x2039c8){_0x102d0d['push'](_0x102d0d['shift']());}}}(_0x510f,0x19e32));Object['defineProperty'](exports,Symbol[_0x14cdcb(0xff)],{'value':'Module'});const b=require(_0x14cdcb(0x117)),T=require('@univerjs-pro/license'),c=require(_0x14cdcb(0xeb)),j=require('@univerjs/thread-comment-ui'),M=require(_0x14cdcb(0xec)),w=require(_0x14cdcb(0xd6)),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x18845a=>(_0x18845a[_0x18845a[_0x14cdcb(0xb4)]=0x0]='OpenOrReOpen',_0x18845a[_0x18845a['Solved']=0x1]=_0x14cdcb(0xf1),_0x18845a[_0x18845a['UNRECOGNIZED']=-0x1]=_0x14cdcb(0x11b),_0x18845a))(I||{}),v=(_0x2f5119=>(_0x2f5119[_0x2f5119[_0x14cdcb(0xba)]=0x0]=_0x14cdcb(0xba),_0x2f5119[_0x2f5119[_0x14cdcb(0xfd)]=0x1]='Add',_0x2f5119[_0x2f5119[_0x14cdcb(0xbe)]=0x2]=_0x14cdcb(0xbe),_0x2f5119[_0x2f5119[_0x14cdcb(0xe9)]=0x3]='Edit',_0x2f5119[_0x2f5119[_0x14cdcb(0xdd)]=0x4]=_0x14cdcb(0xdd),_0x2f5119[_0x2f5119[_0x14cdcb(0xe3)]=0x5]=_0x14cdcb(0xe3),_0x2f5119[_0x2f5119[_0x14cdcb(0x11b)]=-0x1]=_0x14cdcb(0x11b),_0x2f5119))(v||{});const f=_0x5c7893=>c[_0x14cdcb(0xe4)](new Date(+_0x5c7893))[_0x14cdcb(0x10f)](_0x14cdcb(0xc7)),R=async(_0x20b5a4,_0xa4b4e8)=>{const _0x477649=_0x14cdcb,_0x4c32b4=_0x20b5a4['get'](c[_0x477649(0x11e)]),_0x455f51=_0x20b5a4['get'](P[_0x477649(0xe2)]);_0xa4b4e8[_0x477649(0x10d)](_0x1a79c2=>{_0x4c32b4['getUser'](_0x1a79c2)&&_0xa4b4e8['delete'](_0x1a79c2);}),_0xa4b4e8[_0x477649(0xd5)]&&(await _0x455f51[_0x477649(0xd9)](_0x477649(0xc1),{'params':{'userIDs':[..._0xa4b4e8]}}))[_0x477649(0xbf)][_0x477649(0xda)][_0x477649(0x10d)](_0x2f5674=>{const _0xd5507=_0x477649;_0x2f5674&&_0x4c32b4[_0xd5507(0xde)](_0x2f5674);});};var $=Object[_0x14cdcb(0xcf)],E=(_0x535e8b,_0x142be2,_0x8b40ed,_0x96ff8a)=>{for(var _0x30cecc=_0x96ff8a>0x1?void 0x0:_0x96ff8a?$(_0x142be2,_0x8b40ed):_0x142be2,_0x5869aa=_0x535e8b['length']-0x1,_0x38b34f;_0x5869aa>=0x0;_0x5869aa--)(_0x38b34f=_0x535e8b[_0x5869aa])&&(_0x30cecc=_0x38b34f(_0x30cecc)||_0x30cecc);return _0x30cecc;},S=(_0x28035f,_0x302a0e)=>(_0x2a59e6,_0x1f0f18)=>_0x302a0e(_0x2a59e6,_0x1f0f18,_0x28035f);let p=class extends c[_0x14cdcb(0x10e)]{constructor(_0x4a581a,_0x5360bb,_0x592e6a,_0xa73410){const _0x178730=_0x14cdcb;super(),this[_0x178730(0xef)]=_0x4a581a,this[_0x178730(0xc4)]=_0x5360bb,this['_userService']=_0x592e6a,this[_0x178730(0xf8)]=_0xa73410,this['_init'](),this['_initUserSync']();}[_0x14cdcb(0xd8)](){const _0x5d962b=_0x14cdcb;this['disposeWithMe'](this['_threadCommentModel'][_0x5d962b(0x115)][_0x5d962b(0xc5)](w[_0x5d962b(0xd3)](0x10))[_0x5d962b(0xdf)](_0xd651e6=>{const _0x21b267=_0x5d962b,_0x3f527a=new Set();_0xd651e6[_0x21b267(0x10d)](_0x19331f=>{const _0x50df88=_0x21b267;switch(_0x19331f[_0x50df88(0xcb)]){case'add':{const _0x3a5064=_0x19331f[_0x50df88(0x11d)][_0x50df88(0xa9)];_0x3f527a['add'](_0x3a5064);break;}}}),R(this[_0x21b267(0xf8)],_0x3f527a);}));}[_0x14cdcb(0xdc)](){const _0x51d11e=_0x14cdcb;this[_0x51d11e(0x10c)](this[_0x51d11e(0xef)][_0x51d11e(0x115)][_0x51d11e(0xdf)](async _0x45bf84=>{const _0x2a57d9=_0x51d11e;var _0x2b9722,_0x5a5068,_0x91a644,_0xa60206;const _0x5c1114=(_0x2b9722=this[_0x2a57d9(0xc4)]['getUnit'](_0x45bf84[_0x2a57d9(0xc0)])[_0x2a57d9(0x113)](_0x47026c=>_0x47026c[_0x2a57d9(0xf6)]===_0x45bf84[_0x2a57d9(0xf6)]))==null?void 0x0:_0x2b9722[_0x2a57d9(0xc9)];if(!_0x5c1114)return;const {unitId:_0x564e50,subUnitId:_0x123978}=_0x5c1114;switch(_0x45bf84[_0x2a57d9(0xa8)]&&this[_0x2a57d9(0xbb)][_0x2a57d9(0xde)](_0x45bf84[_0x2a57d9(0xa8)]),_0x45bf84[_0x2a57d9(0xcb)]){case v[_0x2a57d9(0xfd)]:break;case v[_0x2a57d9(0xbe)]:{this[_0x2a57d9(0xc4)][_0x2a57d9(0xcd)](_0x564e50,_0x123978,{'unitId':_0x564e50,'subUnitId':_0x123978,'ref':'','id':_0x45bf84[_0x2a57d9(0x116)],'dT':f(+_0x45bf84['createTimestamp']),'threadId':_0x45bf84[_0x2a57d9(0xf6)],'personId':(_0x91a644=(_0x5a5068=_0x45bf84['user'])==null?void 0x0:_0x5a5068[_0x2a57d9(0x107)])!=null?_0x91a644:_0x45bf84[_0x2a57d9(0x10a)],'text':JSON[_0x2a57d9(0xce)](_0x45bf84['content']),'parentId':_0x5c1114['id']});break;}case v[_0x2a57d9(0xdd)]:{const _0x10afce=this[_0x2a57d9(0xc4)]['getComment'](_0x564e50,_0x123978,_0x45bf84[_0x2a57d9(0x116)]);_0x10afce&&_0x10afce[_0x2a57d9(0xdb)]&&this[_0x2a57d9(0xc4)][_0x2a57d9(0x104)](_0x564e50,_0x123978,_0x45bf84['replyId']);break;}case v[_0x2a57d9(0xe9)]:{this[_0x2a57d9(0xc4)][_0x2a57d9(0xb2)](_0x564e50,_0x123978,{'commentId':_0x45bf84['replyId'],'text':JSON[_0x2a57d9(0xce)](_0x45bf84[_0x2a57d9(0x101)])});break;}case v[_0x2a57d9(0xe3)]:{const _0x3b4e11=(_0xa60206=this['_threadCommentModel'][_0x2a57d9(0xcc)](_0x45bf84[_0x2a57d9(0xc0)])[_0x2a57d9(0x113)](_0x3c4901=>_0x3c4901[_0x2a57d9(0xf6)]===_0x45bf84[_0x2a57d9(0xf6)]))==null?void 0x0:_0xa60206[_0x2a57d9(0xc9)];_0x3b4e11&&this[_0x2a57d9(0xc4)]['resolveComment'](_0x564e50,_0x123978,_0x3b4e11['id'],_0x45bf84['solved']===I[_0x2a57d9(0xf1)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x14cdcb(0xfb)])),S(0x1,c[_0x14cdcb(0xb9)](M['ThreadCommentModel'])),S(0x2,c[_0x14cdcb(0xb9)](c[_0x14cdcb(0x11e)])),S(0x3,c[_0x14cdcb(0xb9)](c[_0x14cdcb(0xf0)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x170480,_0x5ca9d9,_0x5eba88,_0x483f95)=>{const _0x3dc223=_0x14cdcb;for(var _0x118ec1=_0x483f95>0x1?void 0x0:_0x483f95?A(_0x5ca9d9,_0x5eba88):_0x5ca9d9,_0x120b93=_0x170480[_0x3dc223(0xb3)]-0x1,_0x4bfa74;_0x120b93>=0x0;_0x120b93--)(_0x4bfa74=_0x170480[_0x120b93])&&(_0x118ec1=_0x4bfa74(_0x118ec1)||_0x118ec1);return _0x118ec1;},_=(_0x427c28,_0x571b63)=>(_0x446ef1,_0x40eb0b)=>_0x571b63(_0x446ef1,_0x40eb0b,_0x427c28);function Y(_0x327e36,_0x52fa1d){const _0x2762a8=_0x14cdcb,_0x5e897d=_0x327e36['replies'][0x0];return{..._0x52fa1d,'id':_0x5e897d['replyId'],'resolved':_0x327e36[_0x2762a8(0x108)]===0x1,'dT':f(_0x5e897d[_0x2762a8(0xe6)]),'personId':_0x5e897d['userId'],'threadId':_0x5e897d[_0x2762a8(0xf6)]};}function _0x8c22(_0x528d0b,_0x12fd14){const _0x510f9b=_0x510f();return _0x8c22=function(_0x8c2229,_0x21de81){_0x8c2229=_0x8c2229-0xa8;let _0x3229a3=_0x510f9b[_0x8c2229];return _0x3229a3;},_0x8c22(_0x528d0b,_0x12fd14);}function G(_0x531460,_0x237a9d,_0xebf677){const _0x595974=_0x14cdcb;var _0x1f46d0,_0x4901d9;if(((_0x4901d9=(_0x1f46d0=_0x531460==null?void 0x0:_0x531460[_0x595974(0xbc)])==null?void 0x0:_0x1f46d0['length'])!=null?_0x4901d9:0x0)>0x0){const _0x6994c7=(_0x38b757,_0x2f1648)=>({'id':_0x38b757['replyId'],'threadId':_0x38b757['threadId'],'dT':f(_0x38b757['createTimestamp']),'personId':_0x38b757[_0x595974(0x10a)],'resolved':_0x531460[_0x595974(0x108)]===I[_0x595974(0xf1)],'unitId':_0x237a9d,'subUnitId':_0xebf677,'text':JSON['parse'](_0x38b757[_0x595974(0x101)]),'parentId':_0x2f1648}),_0xedb6e6=_0x6994c7(_0x531460[_0x595974(0xbc)][0x0]);return{..._0xedb6e6,'children':_0x531460[_0x595974(0xbc)][_0x595974(0xfc)](0x1)[_0x595974(0xd2)](_0x2a4d66=>_0x6994c7(_0x2a4d66,_0xedb6e6['id']))};}return null;}let g=class{constructor(_0x35f71b,_0x2e37a5,_0x52a014,_0x229ea6){const _0x5a59ac=_0x14cdcb;this[_0x5a59ac(0xc8)]=_0x35f71b,this[_0x5a59ac(0xbb)]=_0x2e37a5,this[_0x5a59ac(0x11a)]=_0x52a014,this['_injector']=_0x229ea6;}async[_0x14cdcb(0xcd)](_0x5d56a7){const _0x114e94=_0x14cdcb;var _0xc85c92,_0x2736a6;const {parentId:_0x183fbe,unitId:_0x18c0ed,text:_0x4fdae0,threadId:_0x52db00}=_0x5d56a7,_0x11821c=(_0x2736a6=(_0xc85c92=_0x4fdae0['customRanges'])==null?void 0x0:_0xc85c92[_0x114e94(0xb8)](_0x274b76=>_0x274b76[_0x114e94(0xaf)]===c[_0x114e94(0xfe)]['COMMENT'])['map'](_0x3668df=>_0x3668df[_0x114e94(0xf7)]))!=null?_0x2736a6:[],_0x4df066=JSON['stringify'](_0x4fdae0),_0x364339=(await this[_0x114e94(0x11a)][_0x114e94(0xd1)](_0x18c0ed))['getMemberID']();if(_0x183fbe){const _0x286d87={'memberId':_0x364339,'unitId':_0x18c0ed,'content':_0x4df066,'mention':_0x11821c,'threadId':_0x52db00},_0x2ff866=(await this[_0x114e94(0xc8)]['post'](_0x114e94(0xd4)+_0x18c0ed+'/reply',{'body':_0x286d87}))[_0x114e94(0xbf)][_0x114e94(0xc3)];return{..._0x5d56a7,'id':_0x2ff866[_0x114e94(0x116)],'dT':c[_0x114e94(0xe4)](+_0x2ff866[_0x114e94(0xe6)])['format'](_0x114e94(0xc7)),'personId':_0x2ff866[_0x114e94(0x10a)]};}else{const _0x582efb={'memberId':_0x364339,'unitId':_0x18c0ed,'content':_0x4df066,'mention':_0x11821c},_0x306947=await this[_0x114e94(0xc8)][_0x114e94(0x102)]('/universer-api/comment/unit/'+_0x18c0ed+_0x114e94(0xbd),{'body':_0x582efb});return Y(_0x306947[_0x114e94(0xbf)][_0x114e94(0x11c)],_0x5d56a7);}}async[_0x14cdcb(0xb2)](_0x57a3a2){const _0x6f2adb=_0x14cdcb;var _0x19ca32,_0x3bf60d;const {text:_0x2d4c5f,unitId:_0x474c9e}=_0x57a3a2,_0x5e47ef=(_0x3bf60d=(_0x19ca32=_0x2d4c5f['customRanges'])==null?void 0x0:_0x19ca32[_0x6f2adb(0xb8)](_0x1d1aca=>_0x1d1aca[_0x6f2adb(0xaf)]===c['CustomRangeType'][_0x6f2adb(0xb1)])[_0x6f2adb(0xd2)](_0x1395ad=>_0x1395ad[_0x6f2adb(0xf7)]))!=null?_0x3bf60d:[],_0x199b87=JSON[_0x6f2adb(0x109)](_0x2d4c5f),_0x3bd886=_0x57a3a2['threadId'],_0x4f2ba3=_0x57a3a2['id'],_0x3ad382={'memberId':(await this[_0x6f2adb(0x11a)][_0x6f2adb(0xd1)](_0x474c9e))[_0x6f2adb(0xae)](),'unitId':_0x474c9e,'threadId':_0x3bd886,'mention':_0x5e47ef,'content':_0x199b87,'replyId':_0x4f2ba3},_0x5388f4=await this[_0x6f2adb(0xc8)][_0x6f2adb(0x102)](_0x6f2adb(0xd4)+_0x474c9e+_0x6f2adb(0xaa),{'body':_0x3ad382});return!_0x5388f4[_0x6f2adb(0xbf)][_0x6f2adb(0xb5)]||_0x5388f4[_0x6f2adb(0xbf)][_0x6f2adb(0xb5)]['code']===0x1;}async['resolveComment'](_0x3f7bd1){const _0x4d6824=_0x14cdcb,{unitId:_0x362747}=_0x3f7bd1,_0x2add96=_0x3f7bd1[_0x4d6824(0xf6)],_0x3c15dd={'memberId':this[_0x4d6824(0xbb)]['getCurrentUser']()['userID'],'unitId':_0x362747,'threadId':_0x2add96,'solved':_0x3f7bd1['resolved']?I['Solved']:I['OpenOrReOpen']},_0x32f26b=await this[_0x4d6824(0xc8)][_0x4d6824(0x102)](_0x4d6824(0xd4)+_0x362747+_0x4d6824(0xf4),{'body':_0x3c15dd});return!_0x32f26b['body'][_0x4d6824(0xb5)]||_0x32f26b['body'][_0x4d6824(0xb5)][_0x4d6824(0xd0)]===0x1;}async[_0x14cdcb(0x104)](_0x5f1309,_0x3483bc,_0xf61951,_0x494840){const _0x4affd4=_0x14cdcb,_0x4932b6={'memberId':(await this[_0x4affd4(0x11a)]['requireSession'](_0x5f1309))[_0x4affd4(0xae)](),'threadId':_0xf61951,'replyId':_0x494840,'unitId':_0x5f1309},_0x486e56=await this[_0x4affd4(0xc8)]['post'](_0x4affd4(0xd4)+_0x5f1309+_0x4affd4(0x10b),{'body':_0x4932b6});return!_0x486e56[_0x4affd4(0xbf)][_0x4affd4(0xb5)]||_0x486e56[_0x4affd4(0xbf)][_0x4affd4(0xb5)][_0x4affd4(0xd0)]===0x1;}async[_0x14cdcb(0xe0)](_0x1a3966,_0x2f5a2d,_0x544975){const _0xce6de6=_0x14cdcb,_0x278c93={'unitId':_0x1a3966,'threadId':_0x544975},_0x181e59=await this[_0xce6de6(0xc8)][_0xce6de6(0x102)](_0xce6de6(0xd4)+_0x1a3966+_0xce6de6(0xe8),{'body':_0x278c93}),_0xfcb1fb=_0x544975[_0xce6de6(0xd2)](_0x2a8844=>G(_0x181e59[_0xce6de6(0xbf)]['comments'][_0x2a8844],_0x1a3966,_0x2f5a2d))[_0xce6de6(0xb8)](Boolean);return Object['values'](_0x181e59['body'][_0xce6de6(0xda)])[_0xce6de6(0x10d)](_0x5593dc=>{const _0x69786=_0xce6de6;this['_userService'][_0x69786(0xde)](_0x5593dc);}),_0xfcb1fb;}[_0x14cdcb(0xf5)](_0x3ec0d5){const _0x4ea19e=_0x14cdcb;return{'id':_0x3ec0d5['id'],'threadId':_0x3ec0d5[_0x4ea19e(0xf6)],'ref':_0x3ec0d5[_0x4ea19e(0xb0)]};}};g=x([_(0x0,c['Inject'](P[_0x14cdcb(0xe2)])),_(0x1,c[_0x14cdcb(0xb9)](c[_0x14cdcb(0x11e)])),_(0x2,c[_0x14cdcb(0xb9)](b['CollaborationSessionService'])),_(0x3,c[_0x14cdcb(0xb9)](c['Injector']))],g);var H=Object[_0x14cdcb(0xcf)],J=(_0x4985ad,_0x2c8012,_0x130e42,_0xe5155a)=>{const _0x327fa3=_0x14cdcb;for(var _0x1b7eec=_0xe5155a>0x1?void 0x0:_0xe5155a?H(_0x2c8012,_0x130e42):_0x2c8012,_0x3f05a7=_0x4985ad[_0x327fa3(0xb3)]-0x1,_0x4cdbf1;_0x3f05a7>=0x0;_0x3f05a7--)(_0x4cdbf1=_0x4985ad[_0x3f05a7])&&(_0x1b7eec=_0x4cdbf1(_0x1b7eec)||_0x1b7eec);return _0x1b7eec;},y=(_0x22cd19,_0x49b017)=>(_0x222e1c,_0x3ee817)=>_0x49b017(_0x222e1c,_0x3ee817,_0x22cd19);let C=class extends c[_0x14cdcb(0x10e)]{constructor(_0x58f8a3,_0x53e642){const _0x1d2827=_0x14cdcb;super(),this[_0x1d2827(0xe7)]=_0x58f8a3,this[_0x1d2827(0x114)]=_0x53e642,this[_0x1d2827(0xb7)]();}['_initDataSource'](){const _0x48c603=_0x14cdcb;this[_0x48c603(0xe7)][_0x48c603(0xab)]=this[_0x48c603(0x114)],this[_0x48c603(0xe7)]['syncUpdateMutationToColla']=!0x1;}};function _0x510f(){const _0x369f35=['dayjs','pluginName','createTimestamp','_threadCommentDataSourceService','/list','Edit','onStarting','@univerjs/core','@univerjs/thread-comment','UniverInstanceType','39uBrGNN','_commentService','Injector','Solved','UniverThreadCommentUIPlugin','_config','/solved','saveCommentToSnapshot','threadId','rangeId','_injector','304156xqEkVD','434610voaudC','CommentService','slice','Add','CustomRangeType','toStringTag','UniverLicensePlugin','content','post','250kUkFrL','deleteComment','IThreadCommentDataSourceService','UNIVER_UNKNOWN','userID','solved','stringify','userId','/delete','disposeWithMe','forEach','Disposable','format','DependentOn','114ZkhqKo','merge','find','_threadCommentDataSource','commentUpdate$','replyId','@univerjs-pro/collaboration-client','defineProperty','UniverThreadCommentDataSourcePlugin','_sessionService','UNRECOGNIZED','comment','payload','UserManagerService','user','personId','/edit','dataSource','511ODJfIt','342848uUdQhO','getMemberID','rangeType','ref','COMMENT','updateComment','length','OpenOrReOpen','error','21512kacxuJ','_initDataSource','filter','Inject','Unknown','_userService','replies','/add','Reply','body','unitId','/universer-api/user/list','45770ggkamk','reply','_threadCommentModel','pipe','onReady','YYYY/MM/DD\x20HH:mm','_httpService','root','13296BtoUpb','type','getUnit','addComment','parse','getOwnPropertyDescriptor','code','requireSession','map','bufferTime','/universer-api/comment/unit/','size','rxjs','155943fOMKyH','_initUserSync','get','users','parentId','_init','Delete','addUser','subscribe','listComments','Plugin','HTTPService','Solve'];_0x510f=function(){return _0x369f35;};return _0x510f();}C=J([y(0x0,M[_0x14cdcb(0x105)]),y(0x1,c[_0x14cdcb(0xb9)](g))],C);var F=Object[_0x14cdcb(0x118)],L=Object[_0x14cdcb(0xcf)],Z=(_0x3b0a1f,_0x1e64bc,_0x1a7775)=>_0x1e64bc in _0x3b0a1f?F(_0x3b0a1f,_0x1e64bc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a7775}):_0x3b0a1f[_0x1e64bc]=_0x1a7775,W=(_0x1e3370,_0x2bfac4,_0x5dc9e0,_0x5728d9)=>{const _0x3421a3=_0x14cdcb;for(var _0x13c233=_0x5728d9>0x1?void 0x0:_0x5728d9?L(_0x2bfac4,_0x5dc9e0):_0x2bfac4,_0x258722=_0x1e3370[_0x3421a3(0xb3)]-0x1,_0x580c0c;_0x258722>=0x0;_0x258722--)(_0x580c0c=_0x1e3370[_0x258722])&&(_0x13c233=_0x580c0c(_0x13c233)||_0x13c233);return _0x13c233;},O=(_0x982f74,_0x1fde18)=>(_0x32d1e3,_0x308797)=>_0x1fde18(_0x32d1e3,_0x308797,_0x982f74),N=(_0x52c330,_0x373c20,_0x1cc10c)=>Z(_0x52c330,typeof _0x373c20!='symbol'?_0x373c20+'':_0x373c20,_0x1cc10c);exports[_0x14cdcb(0x119)]=class extends c[_0x14cdcb(0xe1)]{constructor(_0x16a55f=D,_0x249cb0,_0x28bbfc){const _0x568c45=_0x14cdcb;super(),this['_config']=_0x16a55f,this['_injector']=_0x249cb0,this['_configService']=_0x28bbfc;const {..._0x3cdfbb}=c[_0x568c45(0x112)]({},D,this[_0x568c45(0xf3)]);this['_configService']['setConfig'](q,_0x3cdfbb);}[_0x14cdcb(0xea)](){const _0x3af36d=_0x14cdcb;[[g],[C],[p]][_0x3af36d(0x10d)](_0x27f27a=>{const _0x17a634=_0x3af36d;this[_0x17a634(0xf8)]['add'](_0x27f27a);});}[_0x14cdcb(0xc6)](){const _0x45ccec=_0x14cdcb;this[_0x45ccec(0xf8)][_0x45ccec(0xd9)](C),this[_0x45ccec(0xf8)][_0x45ccec(0xd9)](p);}},N(exports[_0x14cdcb(0x119)],_0x14cdcb(0xe5),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x14cdcb(0xed)][_0x14cdcb(0x106)]),exports[_0x14cdcb(0x119)]=W([c[_0x14cdcb(0x110)](j[_0x14cdcb(0xf2)],b['UniverCollaborationClientPlugin'],T[_0x14cdcb(0x100)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x14cdcb(0x119)]);
1
+ 'use strict';const _0x20b4a1=_0x23b7;(function(_0x15e533,_0x47793e){const _0x209335=_0x23b7,_0x296b10=_0x15e533();while(!![]){try{const _0x10b906=-parseInt(_0x209335(0x1f5))/0x1*(parseInt(_0x209335(0x213))/0x2)+-parseInt(_0x209335(0x249))/0x3+parseInt(_0x209335(0x22f))/0x4+-parseInt(_0x209335(0x21a))/0x5+-parseInt(_0x209335(0x1e7))/0x6+parseInt(_0x209335(0x23b))/0x7*(-parseInt(_0x209335(0x204))/0x8)+parseInt(_0x209335(0x1f7))/0x9*(parseInt(_0x209335(0x1e4))/0xa);if(_0x10b906===_0x47793e)break;else _0x296b10['push'](_0x296b10['shift']());}catch(_0x347a5d){_0x296b10['push'](_0x296b10['shift']());}}}(_0x5b0c,0xca1c9));function _0x5b0c(){const _0x15be4e=['_threadCommentDataSourceService','COMMENT','getUnit','length','UniverInstanceType','setConfig','@univerjs/network','UniverCollaborationClientPlugin','dayjs','code','pipe','8YxcEvM','ref','Plugin','replies','slice','_commentService','ThreadCommentModel','user','rangeId','_configService','syncUpdateMutationToColla','UniverLicensePlugin','add','/reply','Reply','94kqNEWp','_httpService','IConfigService','Add','users','getMemberID','getUser','3575135LbjJmW','getOwnPropertyDescriptor','filter','stringify','@univerjs/core','defineProperty','post','@univerjs-pro/collaboration-client','UserManagerService','/solved','addComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','find','resolved','Unknown','Solved','Disposable','Injector','customRanges','OpenOrReOpen','3454224FhacEi','thread-comment-data-source.config','_injector','error','_threadCommentModel','merge','CustomRangeType','UNIVER_UNKNOWN','UNRECOGNIZED','replyId','body','solved','7534282uepJqf','Delete','addUser','content','parentId','Edit','type','/universer-api/comment/unit/','map','resolveComment','@univerjs-pro/license','dataSource','_initDataSource','@univerjs/thread-comment','2023245pSFjyZ','delete','format','UniverThreadCommentUIPlugin','Inject','listComments','commentUpdate$','comment','/edit','get','userId','_sessionService','_threadCommentDataSource','size','rxjs','Solve','CollaborationSessionService','onReady','/delete','_config','UniverThreadCommentDataSourcePlugin','_initUserSync','createTimestamp','userID','80EwSyaV','root','DependentOn','9328824gABzeo','personId','reply','parse','YYYY/MM/DD\x20HH:mm','Module','unitId','HTTPService','disposeWithMe','CommentService','/list','forEach','values','rangeType','5689drqqJQ','subscribe','4783779jqMstj','_userService'];_0x5b0c=function(){return _0x15be4e;};return _0x5b0c();}Object[_0x20b4a1(0x21f)](exports,Symbol['toStringTag'],{'value':_0x20b4a1(0x1ec)});const b=require(_0x20b4a1(0x221)),T=require(_0x20b4a1(0x245)),c=require(_0x20b4a1(0x21e)),j=require('@univerjs/thread-comment-ui'),M=require(_0x20b4a1(0x248)),w=require(_0x20b4a1(0x257)),P=require(_0x20b4a1(0x1ff)),U=_0x20b4a1(0x225);var I=(_0x14fafb=>(_0x14fafb[_0x14fafb[_0x20b4a1(0x22e)]=0x0]='OpenOrReOpen',_0x14fafb[_0x14fafb[_0x20b4a1(0x22a)]=0x1]=_0x20b4a1(0x22a),_0x14fafb[_0x14fafb[_0x20b4a1(0x237)]=-0x1]=_0x20b4a1(0x237),_0x14fafb))(I||{}),v=(_0x7b134b=>(_0x7b134b[_0x7b134b[_0x20b4a1(0x229)]=0x0]=_0x20b4a1(0x229),_0x7b134b[_0x7b134b[_0x20b4a1(0x216)]=0x1]=_0x20b4a1(0x216),_0x7b134b[_0x7b134b[_0x20b4a1(0x212)]=0x2]=_0x20b4a1(0x212),_0x7b134b[_0x7b134b[_0x20b4a1(0x240)]=0x3]=_0x20b4a1(0x240),_0x7b134b[_0x7b134b[_0x20b4a1(0x23c)]=0x4]='Delete',_0x7b134b[_0x7b134b[_0x20b4a1(0x258)]=0x5]='Solve',_0x7b134b[_0x7b134b[_0x20b4a1(0x237)]=-0x1]=_0x20b4a1(0x237),_0x7b134b))(v||{});function _0x23b7(_0x518170,_0xd3029d){const _0x5b0ced=_0x5b0c();return _0x23b7=function(_0x23b7b9,_0x195d92){_0x23b7b9=_0x23b7b9-0x1e4;let _0x41c345=_0x5b0ced[_0x23b7b9];return _0x41c345;},_0x23b7(_0x518170,_0xd3029d);}const f=_0x2bb4d9=>c[_0x20b4a1(0x201)](new Date(+_0x2bb4d9))['format'](_0x20b4a1(0x1eb)),R=async(_0x55c772,_0x154d7b)=>{const _0x10c749=_0x20b4a1,_0x22f057=_0x55c772[_0x10c749(0x252)](c[_0x10c749(0x222)]),_0x425ac3=_0x55c772[_0x10c749(0x252)](P[_0x10c749(0x1ee)]);_0x154d7b['forEach'](_0x43bcca=>{const _0x4e1af6=_0x10c749;_0x22f057[_0x4e1af6(0x219)](_0x43bcca)&&_0x154d7b[_0x4e1af6(0x24a)](_0x43bcca);}),_0x154d7b[_0x10c749(0x256)]&&(await _0x425ac3['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x154d7b]}}))['body']['users'][_0x10c749(0x1f2)](_0xad9375=>{const _0x16bef8=_0x10c749;_0xad9375&&_0x22f057[_0x16bef8(0x23d)](_0xad9375);});};var $=Object[_0x20b4a1(0x21b)],E=(_0x20b754,_0x4d56d8,_0x38cd96,_0x4761db)=>{const _0x1119de=_0x20b4a1;for(var _0x2ce0fb=_0x4761db>0x1?void 0x0:_0x4761db?$(_0x4d56d8,_0x38cd96):_0x4d56d8,_0x1fc82a=_0x20b754[_0x1119de(0x1fc)]-0x1,_0x230258;_0x1fc82a>=0x0;_0x1fc82a--)(_0x230258=_0x20b754[_0x1fc82a])&&(_0x2ce0fb=_0x230258(_0x2ce0fb)||_0x2ce0fb);return _0x2ce0fb;},S=(_0x246bcb,_0x5ae200)=>(_0x50f138,_0x1bf3c0)=>_0x5ae200(_0x50f138,_0x1bf3c0,_0x246bcb);let p=class extends c[_0x20b4a1(0x22b)]{constructor(_0x5c1c72,_0x2d57f8,_0x2d2cee,_0x2b5496){const _0x13ab2e=_0x20b4a1;super(),this[_0x13ab2e(0x209)]=_0x5c1c72,this[_0x13ab2e(0x233)]=_0x2d57f8,this[_0x13ab2e(0x1f8)]=_0x2d2cee,this[_0x13ab2e(0x231)]=_0x2b5496,this['_init'](),this['_initUserSync']();}[_0x20b4a1(0x25e)](){const _0x294a4e=_0x20b4a1;this[_0x294a4e(0x1ef)](this[_0x294a4e(0x233)][_0x294a4e(0x24f)][_0x294a4e(0x203)](w['bufferTime'](0x10))[_0x294a4e(0x1f6)](_0x5bd47e=>{const _0x157612=_0x294a4e,_0x1b91e6=new Set();_0x5bd47e[_0x157612(0x1f2)](_0x3d6a7e=>{const _0x473700=_0x157612;switch(_0x3d6a7e[_0x473700(0x241)]){case'add':{const _0x7f5484=_0x3d6a7e['payload'][_0x473700(0x1e8)];_0x1b91e6[_0x473700(0x210)](_0x7f5484);break;}}}),R(this['_injector'],_0x1b91e6);}));}['_init'](){const _0x1d8bfd=_0x20b4a1;this[_0x1d8bfd(0x1ef)](this[_0x1d8bfd(0x209)][_0x1d8bfd(0x24f)][_0x1d8bfd(0x1f6)](async _0x4f9b6b=>{const _0x5a22ce=_0x1d8bfd;var _0x18001c,_0x4a3b09,_0x5e2f6e,_0x1b2a83;const _0x141795=(_0x18001c=this[_0x5a22ce(0x233)][_0x5a22ce(0x1fb)](_0x4f9b6b[_0x5a22ce(0x1ed)])[_0x5a22ce(0x227)](_0x546aed=>_0x546aed[_0x5a22ce(0x226)]===_0x4f9b6b[_0x5a22ce(0x226)]))==null?void 0x0:_0x18001c[_0x5a22ce(0x1e5)];if(!_0x141795)return;const {unitId:_0x2c39da,subUnitId:_0x271f36}=_0x141795;switch(_0x4f9b6b['user']&&this['_userService']['addUser'](_0x4f9b6b['user']),_0x4f9b6b[_0x5a22ce(0x241)]){case v[_0x5a22ce(0x216)]:break;case v[_0x5a22ce(0x212)]:{this['_threadCommentModel'][_0x5a22ce(0x224)](_0x2c39da,_0x271f36,{'unitId':_0x2c39da,'subUnitId':_0x271f36,'ref':'','id':_0x4f9b6b[_0x5a22ce(0x238)],'dT':f(+_0x4f9b6b[_0x5a22ce(0x25f)]),'threadId':_0x4f9b6b[_0x5a22ce(0x226)],'personId':(_0x5e2f6e=(_0x4a3b09=_0x4f9b6b[_0x5a22ce(0x20b)])==null?void 0x0:_0x4a3b09[_0x5a22ce(0x260)])!=null?_0x5e2f6e:_0x4f9b6b[_0x5a22ce(0x253)],'text':JSON[_0x5a22ce(0x1ea)](_0x4f9b6b[_0x5a22ce(0x23e)]),'parentId':_0x141795['id']});break;}case v[_0x5a22ce(0x23c)]:{const _0x404e6c=this[_0x5a22ce(0x233)]['getComment'](_0x2c39da,_0x271f36,_0x4f9b6b[_0x5a22ce(0x238)]);_0x404e6c&&_0x404e6c[_0x5a22ce(0x23f)]&&this['_threadCommentModel']['deleteComment'](_0x2c39da,_0x271f36,_0x4f9b6b['replyId']);break;}case v[_0x5a22ce(0x240)]:{this[_0x5a22ce(0x233)]['updateComment'](_0x2c39da,_0x271f36,{'commentId':_0x4f9b6b['replyId'],'text':JSON[_0x5a22ce(0x1ea)](_0x4f9b6b[_0x5a22ce(0x23e)])});break;}case v['Solve']:{const _0x43b2f6=(_0x1b2a83=this[_0x5a22ce(0x233)][_0x5a22ce(0x1fb)](_0x4f9b6b[_0x5a22ce(0x1ed)])['find'](_0x26cb49=>_0x26cb49[_0x5a22ce(0x226)]===_0x4f9b6b[_0x5a22ce(0x226)]))==null?void 0x0:_0x1b2a83[_0x5a22ce(0x1e5)];_0x43b2f6&&this[_0x5a22ce(0x233)][_0x5a22ce(0x244)](_0x2c39da,_0x271f36,_0x43b2f6['id'],_0x4f9b6b[_0x5a22ce(0x23a)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x20b4a1(0x1f0)])),S(0x1,c[_0x20b4a1(0x24d)](M[_0x20b4a1(0x20a)])),S(0x2,c[_0x20b4a1(0x24d)](c['UserManagerService'])),S(0x3,c[_0x20b4a1(0x24d)](c[_0x20b4a1(0x22c)]))],p);const q=_0x20b4a1(0x230),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x26b6d7,_0xb1413e,_0x32fbb9,_0x2c9497)=>{const _0x11f164=_0x20b4a1;for(var _0x5112e8=_0x2c9497>0x1?void 0x0:_0x2c9497?A(_0xb1413e,_0x32fbb9):_0xb1413e,_0x115e69=_0x26b6d7[_0x11f164(0x1fc)]-0x1,_0x3c3705;_0x115e69>=0x0;_0x115e69--)(_0x3c3705=_0x26b6d7[_0x115e69])&&(_0x5112e8=_0x3c3705(_0x5112e8)||_0x5112e8);return _0x5112e8;},_=(_0x38be08,_0x22cca9)=>(_0x546cd2,_0x10ec2a)=>_0x22cca9(_0x546cd2,_0x10ec2a,_0x38be08);function Y(_0x5d02f2,_0x6a11ec){const _0x4d68b9=_0x20b4a1,_0x31930e=_0x5d02f2[_0x4d68b9(0x207)][0x0];return{..._0x6a11ec,'id':_0x31930e[_0x4d68b9(0x238)],'resolved':_0x5d02f2[_0x4d68b9(0x23a)]===0x1,'dT':f(_0x31930e['createTimestamp']),'personId':_0x31930e['userId'],'threadId':_0x31930e['threadId']};}function G(_0x42f6db,_0x59e0a4,_0x44d2e0){const _0x4765a0=_0x20b4a1;var _0x50063a,_0x408634;if(((_0x408634=(_0x50063a=_0x42f6db==null?void 0x0:_0x42f6db[_0x4765a0(0x207)])==null?void 0x0:_0x50063a['length'])!=null?_0x408634:0x0)>0x0){const _0x3a0b8a=(_0x42def5,_0x304e5f)=>({'id':_0x42def5[_0x4765a0(0x238)],'threadId':_0x42def5[_0x4765a0(0x226)],'dT':f(_0x42def5[_0x4765a0(0x25f)]),'personId':_0x42def5[_0x4765a0(0x253)],'resolved':_0x42f6db[_0x4765a0(0x23a)]===I[_0x4765a0(0x22a)],'unitId':_0x59e0a4,'subUnitId':_0x44d2e0,'text':JSON[_0x4765a0(0x1ea)](_0x42def5[_0x4765a0(0x23e)]),'parentId':_0x304e5f}),_0x351137=_0x3a0b8a(_0x42f6db[_0x4765a0(0x207)][0x0]);return{..._0x351137,'children':_0x42f6db[_0x4765a0(0x207)][_0x4765a0(0x208)](0x1)[_0x4765a0(0x243)](_0x45c663=>_0x3a0b8a(_0x45c663,_0x351137['id']))};}return null;}let g=class{constructor(_0x56797c,_0x1be332,_0x34b3c9,_0x56c44f){const _0x76562e=_0x20b4a1;this[_0x76562e(0x214)]=_0x56797c,this['_userService']=_0x1be332,this[_0x76562e(0x254)]=_0x34b3c9,this['_injector']=_0x56c44f;}async[_0x20b4a1(0x224)](_0x452939){const _0x2325be=_0x20b4a1;var _0x242bb1,_0x33b82a;const {parentId:_0x5d0f16,unitId:_0x164915,text:_0x202caf,threadId:_0x319324}=_0x452939,_0x3f7158=(_0x33b82a=(_0x242bb1=_0x202caf[_0x2325be(0x22d)])==null?void 0x0:_0x242bb1['filter'](_0x5857dc=>_0x5857dc[_0x2325be(0x1f4)]===c[_0x2325be(0x235)][_0x2325be(0x1fa)])['map'](_0x11baee=>_0x11baee[_0x2325be(0x20c)]))!=null?_0x33b82a:[],_0x529231=JSON[_0x2325be(0x21d)](_0x202caf),_0x409c3f=(await this['_sessionService']['requireSession'](_0x164915))['getMemberID']();if(_0x5d0f16){const _0x5e977b={'memberId':_0x409c3f,'unitId':_0x164915,'content':_0x529231,'mention':_0x3f7158,'threadId':_0x319324},_0x259bd7=(await this[_0x2325be(0x214)]['post']('/universer-api/comment/unit/'+_0x164915+_0x2325be(0x211),{'body':_0x5e977b}))['body'][_0x2325be(0x1e9)];return{..._0x452939,'id':_0x259bd7[_0x2325be(0x238)],'dT':c['dayjs'](+_0x259bd7[_0x2325be(0x25f)])[_0x2325be(0x24b)](_0x2325be(0x1eb)),'personId':_0x259bd7[_0x2325be(0x253)]};}else{const _0x34ff5e={'memberId':_0x409c3f,'unitId':_0x164915,'content':_0x529231,'mention':_0x3f7158},_0x5f15a4=await this[_0x2325be(0x214)][_0x2325be(0x220)](_0x2325be(0x242)+_0x164915+'/add',{'body':_0x34ff5e});return Y(_0x5f15a4[_0x2325be(0x239)][_0x2325be(0x250)],_0x452939);}}async['updateComment'](_0x44a152){const _0xa4641a=_0x20b4a1;var _0x54c784,_0x112378;const {text:_0x5c67a6,unitId:_0xdd823}=_0x44a152,_0x12c215=(_0x112378=(_0x54c784=_0x5c67a6[_0xa4641a(0x22d)])==null?void 0x0:_0x54c784[_0xa4641a(0x21c)](_0x558590=>_0x558590[_0xa4641a(0x1f4)]===c['CustomRangeType'][_0xa4641a(0x1fa)])[_0xa4641a(0x243)](_0x3734a3=>_0x3734a3[_0xa4641a(0x20c)]))!=null?_0x112378:[],_0x2aebfb=JSON[_0xa4641a(0x21d)](_0x5c67a6),_0x3fa9ae=_0x44a152['threadId'],_0x39779f=_0x44a152['id'],_0xda6f2e={'memberId':(await this[_0xa4641a(0x254)]['requireSession'](_0xdd823))['getMemberID'](),'unitId':_0xdd823,'threadId':_0x3fa9ae,'mention':_0x12c215,'content':_0x2aebfb,'replyId':_0x39779f},_0xa79680=await this[_0xa4641a(0x214)]['post'](_0xa4641a(0x242)+_0xdd823+_0xa4641a(0x251),{'body':_0xda6f2e});return!_0xa79680[_0xa4641a(0x239)]['error']||_0xa79680['body'][_0xa4641a(0x232)]['code']===0x1;}async[_0x20b4a1(0x244)](_0x4bbfb1){const _0x5d9387=_0x20b4a1,{unitId:_0x537727}=_0x4bbfb1,_0x59ef86=_0x4bbfb1[_0x5d9387(0x226)],_0x3bad5e={'memberId':this['_userService']['getCurrentUser']()[_0x5d9387(0x260)],'unitId':_0x537727,'threadId':_0x59ef86,'solved':_0x4bbfb1[_0x5d9387(0x228)]?I[_0x5d9387(0x22a)]:I[_0x5d9387(0x22e)]},_0x2c3230=await this[_0x5d9387(0x214)]['post'](_0x5d9387(0x242)+_0x537727+_0x5d9387(0x223),{'body':_0x3bad5e});return!_0x2c3230[_0x5d9387(0x239)][_0x5d9387(0x232)]||_0x2c3230[_0x5d9387(0x239)][_0x5d9387(0x232)]['code']===0x1;}async['deleteComment'](_0x42b669,_0x1e182e,_0x46cfb2,_0x494532){const _0x5477de=_0x20b4a1,_0x1498db={'memberId':(await this[_0x5477de(0x254)]['requireSession'](_0x42b669))[_0x5477de(0x218)](),'threadId':_0x46cfb2,'replyId':_0x494532,'unitId':_0x42b669},_0x128f09=await this['_httpService'][_0x5477de(0x220)](_0x5477de(0x242)+_0x42b669+_0x5477de(0x25b),{'body':_0x1498db});return!_0x128f09[_0x5477de(0x239)]['error']||_0x128f09[_0x5477de(0x239)]['error'][_0x5477de(0x202)]===0x1;}async[_0x20b4a1(0x24e)](_0x7fc24,_0x2028d5,_0x427b1e){const _0x34cdcb=_0x20b4a1,_0x720cb5={'unitId':_0x7fc24,'threadId':_0x427b1e},_0x59a2ba=await this['_httpService'][_0x34cdcb(0x220)](_0x34cdcb(0x242)+_0x7fc24+_0x34cdcb(0x1f1),{'body':_0x720cb5}),_0x38d017=_0x427b1e['map'](_0xa5e1f5=>G(_0x59a2ba[_0x34cdcb(0x239)]['comments'][_0xa5e1f5],_0x7fc24,_0x2028d5))[_0x34cdcb(0x21c)](Boolean);return Object[_0x34cdcb(0x1f3)](_0x59a2ba['body'][_0x34cdcb(0x217)])['forEach'](_0x5d49f8=>{const _0x4081=_0x34cdcb;this[_0x4081(0x1f8)][_0x4081(0x23d)](_0x5d49f8);}),_0x38d017;}['saveCommentToSnapshot'](_0xa8b038){const _0x4b09a2=_0x20b4a1;return{'id':_0xa8b038['id'],'threadId':_0xa8b038[_0x4b09a2(0x226)],'ref':_0xa8b038[_0x4b09a2(0x205)]};}};g=x([_(0x0,c[_0x20b4a1(0x24d)](P['HTTPService'])),_(0x1,c[_0x20b4a1(0x24d)](c[_0x20b4a1(0x222)])),_(0x2,c[_0x20b4a1(0x24d)](b[_0x20b4a1(0x259)])),_(0x3,c['Inject'](c[_0x20b4a1(0x22c)]))],g);var H=Object[_0x20b4a1(0x21b)],J=(_0x53bc69,_0x4f7f5d,_0x355cf8,_0x2a4c56)=>{const _0x527b7d=_0x20b4a1;for(var _0x486837=_0x2a4c56>0x1?void 0x0:_0x2a4c56?H(_0x4f7f5d,_0x355cf8):_0x4f7f5d,_0x538f44=_0x53bc69[_0x527b7d(0x1fc)]-0x1,_0x14cb02;_0x538f44>=0x0;_0x538f44--)(_0x14cb02=_0x53bc69[_0x538f44])&&(_0x486837=_0x14cb02(_0x486837)||_0x486837);return _0x486837;},y=(_0x254bfb,_0xd0decc)=>(_0x9a5aea,_0x33c30c)=>_0xd0decc(_0x9a5aea,_0x33c30c,_0x254bfb);let C=class extends c['Disposable']{constructor(_0xb7d2bd,_0x4100de){const _0x3b9f23=_0x20b4a1;super(),this[_0x3b9f23(0x1f9)]=_0xb7d2bd,this[_0x3b9f23(0x255)]=_0x4100de,this[_0x3b9f23(0x247)]();}['_initDataSource'](){const _0x273f52=_0x20b4a1;this[_0x273f52(0x1f9)][_0x273f52(0x246)]=this['_threadCommentDataSource'],this[_0x273f52(0x1f9)][_0x273f52(0x20e)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x20b4a1(0x24d)](g))],C);var F=Object[_0x20b4a1(0x21f)],L=Object[_0x20b4a1(0x21b)],Z=(_0x2e1631,_0x42aba7,_0x3cb142)=>_0x42aba7 in _0x2e1631?F(_0x2e1631,_0x42aba7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cb142}):_0x2e1631[_0x42aba7]=_0x3cb142,W=(_0x2cab18,_0x285ebe,_0x3e936e,_0x5f5699)=>{const _0x1ae52c=_0x20b4a1;for(var _0x18c056=_0x5f5699>0x1?void 0x0:_0x5f5699?L(_0x285ebe,_0x3e936e):_0x285ebe,_0x13f9f1=_0x2cab18[_0x1ae52c(0x1fc)]-0x1,_0x554844;_0x13f9f1>=0x0;_0x13f9f1--)(_0x554844=_0x2cab18[_0x13f9f1])&&(_0x18c056=_0x554844(_0x18c056)||_0x18c056);return _0x18c056;},O=(_0x19e0cf,_0x1ab70f)=>(_0x1156de,_0x258f85)=>_0x1ab70f(_0x1156de,_0x258f85,_0x19e0cf),N=(_0x22dba4,_0x53d59a,_0x572668)=>Z(_0x22dba4,typeof _0x53d59a!='symbol'?_0x53d59a+'':_0x53d59a,_0x572668);exports[_0x20b4a1(0x25d)]=class extends c[_0x20b4a1(0x206)]{constructor(_0x499671=D,_0x3abef8,_0x56a14e){const _0x5472a3=_0x20b4a1;super(),this[_0x5472a3(0x25c)]=_0x499671,this['_injector']=_0x3abef8,this[_0x5472a3(0x20d)]=_0x56a14e;const {..._0x249045}=c[_0x5472a3(0x234)]({},D,this[_0x5472a3(0x25c)]);this[_0x5472a3(0x20d)][_0x5472a3(0x1fe)](q,_0x249045);}['onStarting'](){const _0x5a2f2c=_0x20b4a1;[[g],[C],[p]][_0x5a2f2c(0x1f2)](_0x14c4f0=>{const _0x56be61=_0x5a2f2c;this[_0x56be61(0x231)][_0x56be61(0x210)](_0x14c4f0);});}[_0x20b4a1(0x25a)](){const _0x24f80a=_0x20b4a1;this[_0x24f80a(0x231)][_0x24f80a(0x252)](C),this[_0x24f80a(0x231)][_0x24f80a(0x252)](p);}},N(exports[_0x20b4a1(0x25d)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x20b4a1(0x241),c[_0x20b4a1(0x1fd)][_0x20b4a1(0x236)]),exports[_0x20b4a1(0x25d)]=W([c[_0x20b4a1(0x1e6)](j[_0x20b4a1(0x24c)],b[_0x20b4a1(0x200)],T[_0x20b4a1(0x20f)]),O(0x1,c[_0x20b4a1(0x24d)](c['Injector'])),O(0x2,c[_0x20b4a1(0x215)])],exports[_0x20b4a1(0x25d)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5e519c=_0x5ceb;(function(_0x123488,_0x434d91){const _0x3fc728=_0x5ceb,_0x5acb2d=_0x123488();while(!![]){try{const _0x2f4881=parseInt(_0x3fc728(0xbc))/0x1*(parseInt(_0x3fc728(0xdf))/0x2)+-parseInt(_0x3fc728(0xae))/0x3+parseInt(_0x3fc728(0x9a))/0x4*(parseInt(_0x3fc728(0xd3))/0x5)+parseInt(_0x3fc728(0xcc))/0x6+-parseInt(_0x3fc728(0xca))/0x7+parseInt(_0x3fc728(0x9e))/0x8*(-parseInt(_0x3fc728(0xd2))/0x9)+-parseInt(_0x3fc728(0xa0))/0xa*(parseInt(_0x3fc728(0xe6))/0xb);if(_0x2f4881===_0x434d91)break;else _0x5acb2d['push'](_0x5acb2d['shift']());}catch(_0x3fc1ce){_0x5acb2d['push'](_0x5acb2d['shift']());}}}(_0x5878,0xbea9b));import{CommentService as _0x12d00b,CollaborationSessionService as _0x494f6f,UniverCollaborationClientPlugin as _0x297c90}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x24c725}from'@univerjs-pro/license';import{dayjs as _0x19b6e7,UserManagerService as _0x3d615e,Inject as _0x1bd6b7,Injector as _0x1dfc40,Disposable as _0x4dbd30,CustomRangeType as _0x517552,UniverInstanceType as _0x5c3a2a,DependentOn as _0x2aafae,IConfigService as _0x4ccfd1,Plugin as _0x41074e,merge as _0x59806d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31b480}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2d9488,IThreadCommentDataSourceService as _0x1e1893}from'@univerjs/thread-comment';import{bufferTime as _0x522b81}from'rxjs';import{HTTPService as _0x52a4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x395eb1=>(_0x395eb1[_0x395eb1[_0x5e519c(0xda)]=0x0]=_0x5e519c(0xda),_0x395eb1[_0x395eb1[_0x5e519c(0xa9)]=0x1]=_0x5e519c(0xa9),_0x395eb1[_0x395eb1['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x395eb1))(I||{}),v=(_0x3d9ea7=>(_0x3d9ea7[_0x3d9ea7['Unknown']=0x0]=_0x5e519c(0xb5),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xd8)]=0x1]=_0x5e519c(0xd8),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xdc)]=0x2]=_0x5e519c(0xdc),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0x91)]=0x3]=_0x5e519c(0x91),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc4)]=0x4]=_0x5e519c(0xc4),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xef)]=0x5]=_0x5e519c(0xef),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc7)]=-0x1]=_0x5e519c(0xc7),_0x3d9ea7))(v||{});const D=_0x268478=>_0x19b6e7(new Date(+_0x268478))[_0x5e519c(0xcb)](_0x5e519c(0xbb)),B=async(_0x262fad,_0x353302)=>{const _0x1b6b6c=_0x5e519c,_0x4f46b8=_0x262fad[_0x1b6b6c(0xee)](_0x3d615e),_0x152324=_0x262fad[_0x1b6b6c(0xee)](_0x52a4a2);_0x353302[_0x1b6b6c(0xdd)](_0x526851=>{const _0x329486=_0x1b6b6c;_0x4f46b8[_0x329486(0xa5)](_0x526851)&&_0x353302[_0x329486(0xd0)](_0x526851);}),_0x353302['size']&&(await _0x152324[_0x1b6b6c(0xee)]('/universer-api/user/list',{'params':{'userIDs':[..._0x353302]}}))[_0x1b6b6c(0xa2)][_0x1b6b6c(0xc3)][_0x1b6b6c(0xdd)](_0x42ce50=>{const _0x59dfa1=_0x1b6b6c;_0x42ce50&&_0x4f46b8[_0x59dfa1(0xd4)](_0x42ce50);});};function _0x5878(){const _0x50530a=['Reply','forEach','_sessionService','2bmXCRB','pluginName','_threadCommentDataSource','_commentService','length','dataSource','userID','11ISIPwp','comments','ref','root','parentId','/add','/reply','replyId','get','Solve','Edit','unitId','customRanges','createTimestamp','user','map','_httpService','deleteComment','type','78004utSuZr','_config','filter','getOwnPropertyDescriptor','156568aIboBl','getUnit','4452870KExamF','solved','body','post','error','getUser','requireSession','values','pipe','Solved','_init','updateComment','userId','disposeWithMe','1960779gVlxGF','_threadCommentDataSourceService','find','_threadCommentModel','resolveComment','_injector','/list','Unknown','addComment','onStarting','payload','/universer-api/comment/unit/','_initUserSync','YYYY/MM/DD\x20HH:mm','1387055JDQbjc','_configService','rangeType','_userService','getMemberID','replies','add','users','Delete','saveCommentToSnapshot','subscribe','UNRECOGNIZED','COMMENT','threadId','2179807aUEToF','format','6001866xgiKbL','/edit','personId','syncUpdateMutationToColla','delete','rangeId','144wYzrYA','30FYEQzq','addUser','commentUpdate$','code','parse','Add','listComments','OpenOrReOpen','_initDataSource'];_0x5878=function(){return _0x50530a;};return _0x5878();}var K=Object[_0x5e519c(0x9d)],V=(_0x1a6862,_0x55ac9c,_0x3d26a5,_0x236beb)=>{const _0x269ff4=_0x5e519c;for(var _0x34b007=_0x236beb>0x1?void 0x0:_0x236beb?K(_0x55ac9c,_0x3d26a5):_0x55ac9c,_0x2adf79=_0x1a6862[_0x269ff4(0xe3)]-0x1,_0x243102;_0x2adf79>=0x0;_0x2adf79--)(_0x243102=_0x1a6862[_0x2adf79])&&(_0x34b007=_0x243102(_0x34b007)||_0x34b007);return _0x34b007;},p=(_0x24b02c,_0x28b848)=>(_0x36079c,_0x3dcd39)=>_0x28b848(_0x36079c,_0x3dcd39,_0x24b02c);let S=class extends _0x4dbd30{constructor(_0x41aebb,_0x4ca893,_0x36868a,_0x54160a){const _0x51dcbf=_0x5e519c;super(),this['_commentService']=_0x41aebb,this[_0x51dcbf(0xb1)]=_0x4ca893,this['_userService']=_0x36868a,this[_0x51dcbf(0xb3)]=_0x54160a,this[_0x51dcbf(0xaa)](),this[_0x51dcbf(0xba)]();}[_0x5e519c(0xba)](){const _0x726858=_0x5e519c;this[_0x726858(0xad)](this['_threadCommentModel']['commentUpdate$'][_0x726858(0xa8)](_0x522b81(0x10))[_0x726858(0xc6)](_0x333991=>{const _0x39515e=_0x726858,_0x2d1b88=new Set();_0x333991[_0x39515e(0xdd)](_0x454762=>{const _0x17df64=_0x39515e;switch(_0x454762[_0x17df64(0x99)]){case _0x17df64(0xc2):{const _0x3ac24f=_0x454762[_0x17df64(0xb8)][_0x17df64(0xce)];_0x2d1b88[_0x17df64(0xc2)](_0x3ac24f);break;}}}),B(this['_injector'],_0x2d1b88);}));}[_0x5e519c(0xaa)](){const _0x23622b=_0x5e519c;this[_0x23622b(0xad)](this[_0x23622b(0xe2)][_0x23622b(0xd5)][_0x23622b(0xc6)](async _0x3a21ba=>{const _0x3a6884=_0x23622b;var _0x2c23de,_0xeb45f8,_0x323a45,_0xd1ce65;const _0x5db5c9=(_0x2c23de=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba['unitId'])['find'](_0x8a7d8=>_0x8a7d8[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0x2c23de['root'];if(!_0x5db5c9)return;const {unitId:_0x5b93ed,subUnitId:_0x594da2}=_0x5db5c9;switch(_0x3a21ba['user']&&this[_0x3a6884(0xbf)][_0x3a6884(0xd4)](_0x3a21ba['user']),_0x3a21ba[_0x3a6884(0x99)]){case v['Add']:break;case v[_0x3a6884(0xdc)]:{this[_0x3a6884(0xb1)]['addComment'](_0x5b93ed,_0x594da2,{'unitId':_0x5b93ed,'subUnitId':_0x594da2,'ref':'','id':_0x3a21ba[_0x3a6884(0xed)],'dT':D(+_0x3a21ba[_0x3a6884(0x94)]),'threadId':_0x3a21ba['threadId'],'personId':(_0x323a45=(_0xeb45f8=_0x3a21ba[_0x3a6884(0x95)])==null?void 0x0:_0xeb45f8[_0x3a6884(0xe5)])!=null?_0x323a45:_0x3a21ba[_0x3a6884(0xac)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content']),'parentId':_0x5db5c9['id']});break;}case v['Delete']:{const _0x33f369=this[_0x3a6884(0xb1)]['getComment'](_0x5b93ed,_0x594da2,_0x3a21ba[_0x3a6884(0xed)]);_0x33f369&&_0x33f369[_0x3a6884(0xea)]&&this['_threadCommentModel']['deleteComment'](_0x5b93ed,_0x594da2,_0x3a21ba['replyId']);break;}case v['Edit']:{this[_0x3a6884(0xb1)]['updateComment'](_0x5b93ed,_0x594da2,{'commentId':_0x3a21ba[_0x3a6884(0xed)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content'])});break;}case v[_0x3a6884(0xef)]:{const _0x28a6ae=(_0xd1ce65=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba[_0x3a6884(0x92)])[_0x3a6884(0xb0)](_0x485aec=>_0x485aec[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0xd1ce65[_0x3a6884(0xe9)];_0x28a6ae&&this[_0x3a6884(0xb1)][_0x3a6884(0xb2)](_0x5b93ed,_0x594da2,_0x28a6ae['id'],_0x3a21ba['solved']===I[_0x3a6884(0xa9)]);break;}}}));}};S=V([p(0x0,_0x1bd6b7(_0x12d00b)),p(0x1,_0x1bd6b7(_0x2d9488)),p(0x2,_0x1bd6b7(_0x3d615e)),p(0x3,_0x1bd6b7(_0x1dfc40))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x126e9c,_0xe5cf5c,_0x420c12,_0x1a178f)=>{const _0x19ae95=_0x5e519c;for(var _0x272145=_0x1a178f>0x1?void 0x0:_0x1a178f?k(_0xe5cf5c,_0x420c12):_0xe5cf5c,_0x5b4cec=_0x126e9c[_0x19ae95(0xe3)]-0x1,_0x137b66;_0x5b4cec>=0x0;_0x5b4cec--)(_0x137b66=_0x126e9c[_0x5b4cec])&&(_0x272145=_0x137b66(_0x272145)||_0x272145);return _0x272145;},_=(_0x26a1f4,_0x281b8d)=>(_0x584d65,_0x22df2d)=>_0x281b8d(_0x584d65,_0x22df2d,_0x26a1f4);function X(_0x480b96,_0x1fe62d){const _0x22c521=_0x5e519c,_0x41c193=_0x480b96[_0x22c521(0xc1)][0x0];return{..._0x1fe62d,'id':_0x41c193['replyId'],'resolved':_0x480b96[_0x22c521(0xa1)]===0x1,'dT':D(_0x41c193[_0x22c521(0x94)]),'personId':_0x41c193['userId'],'threadId':_0x41c193['threadId']};}function ee(_0x788a95,_0x16985f,_0x284a63){const _0x3568bc=_0x5e519c;var _0xa97886,_0x2e28b7;if(((_0x2e28b7=(_0xa97886=_0x788a95==null?void 0x0:_0x788a95[_0x3568bc(0xc1)])==null?void 0x0:_0xa97886[_0x3568bc(0xe3)])!=null?_0x2e28b7:0x0)>0x0){const _0x3a66dd=(_0x4f17ed,_0x2f2aa3)=>({'id':_0x4f17ed['replyId'],'threadId':_0x4f17ed[_0x3568bc(0xc9)],'dT':D(_0x4f17ed[_0x3568bc(0x94)]),'personId':_0x4f17ed['userId'],'resolved':_0x788a95[_0x3568bc(0xa1)]===I[_0x3568bc(0xa9)],'unitId':_0x16985f,'subUnitId':_0x284a63,'text':JSON[_0x3568bc(0xd7)](_0x4f17ed['content']),'parentId':_0x2f2aa3}),_0x4a2743=_0x3a66dd(_0x788a95[_0x3568bc(0xc1)][0x0]);return{..._0x4a2743,'children':_0x788a95['replies']['slice'](0x1)[_0x3568bc(0x96)](_0x4c26c8=>_0x3a66dd(_0x4c26c8,_0x4a2743['id']))};}return null;}let f=class{constructor(_0x4a0a55,_0x46b7ec,_0x1193db,_0x3af4c8){const _0x52c118=_0x5e519c;this[_0x52c118(0x97)]=_0x4a0a55,this['_userService']=_0x46b7ec,this['_sessionService']=_0x1193db,this[_0x52c118(0xb3)]=_0x3af4c8;}async[_0x5e519c(0xb6)](_0xa173bc){const _0x5d729b=_0x5e519c;var _0x2ca814,_0x20a6b1;const {parentId:_0x339b09,unitId:_0x419960,text:_0x5f52be,threadId:_0x82adbd}=_0xa173bc,_0xd4d1e2=(_0x20a6b1=(_0x2ca814=_0x5f52be[_0x5d729b(0x93)])==null?void 0x0:_0x2ca814[_0x5d729b(0x9c)](_0x619ef8=>_0x619ef8[_0x5d729b(0xbe)]===_0x517552[_0x5d729b(0xc8)])['map'](_0x96f5de=>_0x96f5de[_0x5d729b(0xd1)]))!=null?_0x20a6b1:[],_0x4695e9=JSON['stringify'](_0x5f52be),_0x231617=(await this[_0x5d729b(0xde)][_0x5d729b(0xa6)](_0x419960))[_0x5d729b(0xc0)]();if(_0x339b09){const _0x3dcf31={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2,'threadId':_0x82adbd},_0x1c7184=(await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xec),{'body':_0x3dcf31}))[_0x5d729b(0xa2)]['reply'];return{..._0xa173bc,'id':_0x1c7184[_0x5d729b(0xed)],'dT':_0x19b6e7(+_0x1c7184['createTimestamp'])[_0x5d729b(0xcb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1c7184[_0x5d729b(0xac)]};}else{const _0x5895a0={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2},_0x57a9e2=await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xeb),{'body':_0x5895a0});return X(_0x57a9e2['body']['comment'],_0xa173bc);}}async[_0x5e519c(0xab)](_0x5ba388){const _0x146c7b=_0x5e519c;var _0x311480,_0x4049e4;const {text:_0x290947,unitId:_0x11be01}=_0x5ba388,_0x42fc8c=(_0x4049e4=(_0x311480=_0x290947[_0x146c7b(0x93)])==null?void 0x0:_0x311480['filter'](_0x4c81b6=>_0x4c81b6[_0x146c7b(0xbe)]===_0x517552[_0x146c7b(0xc8)])[_0x146c7b(0x96)](_0x491c81=>_0x491c81[_0x146c7b(0xd1)]))!=null?_0x4049e4:[],_0x38ccac=JSON['stringify'](_0x290947),_0x28705f=_0x5ba388[_0x146c7b(0xc9)],_0x7635d8=_0x5ba388['id'],_0x3dc1f1={'memberId':(await this[_0x146c7b(0xde)][_0x146c7b(0xa6)](_0x11be01))[_0x146c7b(0xc0)](),'unitId':_0x11be01,'threadId':_0x28705f,'mention':_0x42fc8c,'content':_0x38ccac,'replyId':_0x7635d8},_0x129bcf=await this[_0x146c7b(0x97)][_0x146c7b(0xa3)]('/universer-api/comment/unit/'+_0x11be01+_0x146c7b(0xcd),{'body':_0x3dc1f1});return!_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)]||_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)][_0x146c7b(0xd6)]===0x1;}async['resolveComment'](_0x55be80){const _0x92af12=_0x5e519c,{unitId:_0x1a91b1}=_0x55be80,_0x4e663e=_0x55be80[_0x92af12(0xc9)],_0x475f70={'memberId':this['_userService']['getCurrentUser']()[_0x92af12(0xe5)],'unitId':_0x1a91b1,'threadId':_0x4e663e,'solved':_0x55be80['resolved']?I[_0x92af12(0xa9)]:I[_0x92af12(0xda)]},_0x180eca=await this[_0x92af12(0x97)][_0x92af12(0xa3)]('/universer-api/comment/unit/'+_0x1a91b1+'/solved',{'body':_0x475f70});return!_0x180eca[_0x92af12(0xa2)]['error']||_0x180eca[_0x92af12(0xa2)][_0x92af12(0xa4)]['code']===0x1;}async[_0x5e519c(0x98)](_0x58645b,_0x4e7965,_0x17e333,_0x4f1b06){const _0x1ec86c=_0x5e519c,_0xa7fbde={'memberId':(await this[_0x1ec86c(0xde)][_0x1ec86c(0xa6)](_0x58645b))[_0x1ec86c(0xc0)](),'threadId':_0x17e333,'replyId':_0x4f1b06,'unitId':_0x58645b},_0x5d410c=await this[_0x1ec86c(0x97)][_0x1ec86c(0xa3)](_0x1ec86c(0xb9)+_0x58645b+'/delete',{'body':_0xa7fbde});return!_0x5d410c['body'][_0x1ec86c(0xa4)]||_0x5d410c[_0x1ec86c(0xa2)][_0x1ec86c(0xa4)][_0x1ec86c(0xd6)]===0x1;}async[_0x5e519c(0xd9)](_0x3feefd,_0x25d00d,_0x3cd881){const _0x55c250=_0x5e519c,_0x42cacf={'unitId':_0x3feefd,'threadId':_0x3cd881},_0x58bd70=await this[_0x55c250(0x97)][_0x55c250(0xa3)](_0x55c250(0xb9)+_0x3feefd+_0x55c250(0xb4),{'body':_0x42cacf}),_0x3159b5=_0x3cd881['map'](_0x3fee24=>ee(_0x58bd70['body'][_0x55c250(0xe7)][_0x3fee24],_0x3feefd,_0x25d00d))['filter'](Boolean);return Object[_0x55c250(0xa7)](_0x58bd70['body']['users'])[_0x55c250(0xdd)](_0x236fed=>{const _0x5bcb36=_0x55c250;this['_userService'][_0x5bcb36(0xd4)](_0x236fed);}),_0x3159b5;}[_0x5e519c(0xc5)](_0x442952){const _0x7578a2=_0x5e519c;return{'id':_0x442952['id'],'threadId':_0x442952[_0x7578a2(0xc9)],'ref':_0x442952[_0x7578a2(0xe8)]};}};f=Q([_(0x0,_0x1bd6b7(_0x52a4a2)),_(0x1,_0x1bd6b7(_0x3d615e)),_(0x2,_0x1bd6b7(_0x494f6f)),_(0x3,_0x1bd6b7(_0x1dfc40))],f);var re=Object[_0x5e519c(0x9d)],te=(_0x17877c,_0xcf2c87,_0x2e7c25,_0x54ff9e)=>{const _0x2d5414=_0x5e519c;for(var _0x4ac2c0=_0x54ff9e>0x1?void 0x0:_0x54ff9e?re(_0xcf2c87,_0x2e7c25):_0xcf2c87,_0x6292eb=_0x17877c[_0x2d5414(0xe3)]-0x1,_0x1f4304;_0x6292eb>=0x0;_0x6292eb--)(_0x1f4304=_0x17877c[_0x6292eb])&&(_0x4ac2c0=_0x1f4304(_0x4ac2c0)||_0x4ac2c0);return _0x4ac2c0;},N=(_0x5dc274,_0x153500)=>(_0x428cc3,_0x199ebd)=>_0x153500(_0x428cc3,_0x199ebd,_0x5dc274);let g=class extends _0x4dbd30{constructor(_0x2ff542,_0x37e7ba){const _0x4d4df0=_0x5e519c;super(),this[_0x4d4df0(0xaf)]=_0x2ff542,this[_0x4d4df0(0xe1)]=_0x37e7ba,this[_0x4d4df0(0xdb)]();}['_initDataSource'](){const _0x393965=_0x5e519c;this[_0x393965(0xaf)][_0x393965(0xe4)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x393965(0xcf)]=!0x1;}};g=te([N(0x0,_0x1e1893),N(0x1,_0x1bd6b7(f))],g);var se=Object['defineProperty'],oe=Object[_0x5e519c(0x9d)],ne=(_0x35ad40,_0x447367,_0x3dff44)=>_0x447367 in _0x35ad40?se(_0x35ad40,_0x447367,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dff44}):_0x35ad40[_0x447367]=_0x3dff44,ie=(_0x5dff54,_0x3381e2,_0x1c99ce,_0x2503ae)=>{const _0x548b72=_0x5e519c;for(var _0x3b1f82=_0x2503ae>0x1?void 0x0:_0x2503ae?oe(_0x3381e2,_0x1c99ce):_0x3381e2,_0x4eb2=_0x5dff54[_0x548b72(0xe3)]-0x1,_0x4723f0;_0x4eb2>=0x0;_0x4eb2--)(_0x4723f0=_0x5dff54[_0x4eb2])&&(_0x3b1f82=_0x4723f0(_0x3b1f82)||_0x3b1f82);return _0x3b1f82;},w=(_0x58e0ee,_0x58a975)=>(_0x1623a2,_0x3e7078)=>_0x58a975(_0x1623a2,_0x3e7078,_0x58e0ee),$=(_0x41cd99,_0x2b58bb,_0x2e1e76)=>ne(_0x41cd99,typeof _0x2b58bb!='symbol'?_0x2b58bb+'':_0x2b58bb,_0x2e1e76);function _0x5ceb(_0x44b9cb,_0x5cec12){const _0x587803=_0x5878();return _0x5ceb=function(_0x5ceb85,_0x45c382){_0x5ceb85=_0x5ceb85-0x91;let _0x1f9fd2=_0x587803[_0x5ceb85];return _0x1f9fd2;},_0x5ceb(_0x44b9cb,_0x5cec12);}let b=class extends _0x41074e{constructor(_0x29bf7a=M,_0x2d535e,_0x27f7e0){const _0x2ea9fb=_0x5e519c;super(),this['_config']=_0x29bf7a,this[_0x2ea9fb(0xb3)]=_0x2d535e,this[_0x2ea9fb(0xbd)]=_0x27f7e0;const {..._0x3af099}=_0x59806d({},M,this[_0x2ea9fb(0x9b)]);this[_0x2ea9fb(0xbd)]['setConfig'](z,_0x3af099);}[_0x5e519c(0xb7)](){const _0x207c21=_0x5e519c;[[f],[g],[S]][_0x207c21(0xdd)](_0x342c0c=>{const _0x2e5340=_0x207c21;this[_0x2e5340(0xb3)]['add'](_0x342c0c);});}['onReady'](){const _0x4cafb7=_0x5e519c;this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](g),this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](S);}};$(b,_0x5e519c(0xe0),W),$(b,_0x5e519c(0x99),_0x5c3a2a['UNIVER_UNKNOWN']),b=ie([_0x2aafae(_0x31b480,_0x297c90,_0x24c725),w(0x1,_0x1bd6b7(_0x1dfc40)),w(0x2,_0x4ccfd1)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4b7626=_0x2c2f;(function(_0x139491,_0x4b98f6){const _0x20b7dc=_0x2c2f,_0x69d8aa=_0x139491();while(!![]){try{const _0x5a7952=parseInt(_0x20b7dc(0x1e2))/0x1*(-parseInt(_0x20b7dc(0x212))/0x2)+-parseInt(_0x20b7dc(0x1ec))/0x3*(-parseInt(_0x20b7dc(0x21a))/0x4)+parseInt(_0x20b7dc(0x224))/0x5+parseInt(_0x20b7dc(0x1d4))/0x6+-parseInt(_0x20b7dc(0x215))/0x7+-parseInt(_0x20b7dc(0x208))/0x8+parseInt(_0x20b7dc(0x1e0))/0x9;if(_0x5a7952===_0x4b98f6)break;else _0x69d8aa['push'](_0x69d8aa['shift']());}catch(_0x11f169){_0x69d8aa['push'](_0x69d8aa['shift']());}}}(_0x16a6,0x734f1));import{CommentService as _0x2529c2,CollaborationSessionService as _0x5c999b,UniverCollaborationClientPlugin as _0x53c880}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3306fe}from'@univerjs-pro/license';import{dayjs as _0xfc58d6,UserManagerService as _0x164e15,Inject as _0x1820ac,Injector as _0x4bcb98,Disposable as _0x2e6166,CustomRangeType as _0x13fedf,UniverInstanceType as _0x3dc0f3,DependentOn as _0xa05568,IConfigService as _0x3e734a,Plugin as _0x53cea8,merge as _0x23c1a1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2fef6f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x545f27,IThreadCommentDataSourceService as _0x1b5895}from'@univerjs/thread-comment';import{bufferTime as _0x189a1d}from'rxjs';import{HTTPService as _0x11101f}from'@univerjs/network';const W=_0x4b7626(0x20c);var I=(_0x1948b6=>(_0x1948b6[_0x1948b6[_0x4b7626(0x1cf)]=0x0]='OpenOrReOpen',_0x1948b6[_0x1948b6[_0x4b7626(0x21b)]=0x1]=_0x4b7626(0x21b),_0x1948b6[_0x1948b6[_0x4b7626(0x1f5)]=-0x1]='UNRECOGNIZED',_0x1948b6))(I||{}),v=(_0x5b8e04=>(_0x5b8e04[_0x5b8e04['Unknown']=0x0]=_0x4b7626(0x200),_0x5b8e04[_0x5b8e04[_0x4b7626(0x20e)]=0x1]=_0x4b7626(0x20e),_0x5b8e04[_0x5b8e04[_0x4b7626(0x1cd)]=0x2]=_0x4b7626(0x1cd),_0x5b8e04[_0x5b8e04[_0x4b7626(0x1da)]=0x3]=_0x4b7626(0x1da),_0x5b8e04[_0x5b8e04[_0x4b7626(0x1e9)]=0x4]=_0x4b7626(0x1e9),_0x5b8e04[_0x5b8e04[_0x4b7626(0x211)]=0x5]='Solve',_0x5b8e04[_0x5b8e04[_0x4b7626(0x1f5)]=-0x1]=_0x4b7626(0x1f5),_0x5b8e04))(v||{});const D=_0x308c6e=>_0xfc58d6(new Date(+_0x308c6e))[_0x4b7626(0x20b)](_0x4b7626(0x214)),B=async(_0x3cb69d,_0x561bb0)=>{const _0x2648fa=_0x4b7626,_0x87d8a3=_0x3cb69d[_0x2648fa(0x1fc)](_0x164e15),_0x4989a0=_0x3cb69d[_0x2648fa(0x1fc)](_0x11101f);_0x561bb0[_0x2648fa(0x20a)](_0x4f7b1d=>{_0x87d8a3['getUser'](_0x4f7b1d)&&_0x561bb0['delete'](_0x4f7b1d);}),_0x561bb0[_0x2648fa(0x1ef)]&&(await _0x4989a0['get'](_0x2648fa(0x1cb),{'params':{'userIDs':[..._0x561bb0]}}))['body'][_0x2648fa(0x210)]['forEach'](_0x2f093e=>{const _0x2496fa=_0x2648fa;_0x2f093e&&_0x87d8a3[_0x2496fa(0x1ee)](_0x2f093e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x30aec4,_0x2f4c31,_0x35259b,_0x38d06f)=>{const _0x56791e=_0x4b7626;for(var _0x1f95b2=_0x38d06f>0x1?void 0x0:_0x38d06f?K(_0x2f4c31,_0x35259b):_0x2f4c31,_0x1d95a1=_0x30aec4[_0x56791e(0x1dc)]-0x1,_0x1d2ddc;_0x1d95a1>=0x0;_0x1d95a1--)(_0x1d2ddc=_0x30aec4[_0x1d95a1])&&(_0x1f95b2=_0x1d2ddc(_0x1f95b2)||_0x1f95b2);return _0x1f95b2;},p=(_0x199e7c,_0xa8b55)=>(_0x592e4b,_0x587a57)=>_0xa8b55(_0x592e4b,_0x587a57,_0x199e7c);let S=class extends _0x2e6166{constructor(_0x1a7631,_0x200bc3,_0xaec88d,_0x173bb9){const _0x5a6914=_0x4b7626;super(),this[_0x5a6914(0x1fe)]=_0x1a7631,this[_0x5a6914(0x1db)]=_0x200bc3,this['_userService']=_0xaec88d,this[_0x5a6914(0x1e5)]=_0x173bb9,this['_init'](),this[_0x5a6914(0x1d1)]();}[_0x4b7626(0x1d1)](){const _0x1aa270=_0x4b7626;this[_0x1aa270(0x213)](this[_0x1aa270(0x1db)]['commentUpdate$'][_0x1aa270(0x218)](_0x189a1d(0x10))[_0x1aa270(0x1d5)](_0x5488d6=>{const _0x328fd2=_0x1aa270,_0x27475a=new Set();_0x5488d6['forEach'](_0x137b29=>{const _0xf1ae05=_0x2c2f;switch(_0x137b29[_0xf1ae05(0x201)]){case _0xf1ae05(0x1de):{const _0x5ca361=_0x137b29[_0xf1ae05(0x223)][_0xf1ae05(0x202)];_0x27475a[_0xf1ae05(0x1de)](_0x5ca361);break;}}}),B(this[_0x328fd2(0x1e5)],_0x27475a);}));}['_init'](){const _0xfc5f33=_0x4b7626;this['disposeWithMe'](this[_0xfc5f33(0x1fe)][_0xfc5f33(0x1e6)][_0xfc5f33(0x1d5)](async _0x249ae3=>{const _0xd1e90b=_0xfc5f33;var _0x359dcc,_0x1868c8,_0x2dfef6,_0x5b48c8;const _0x128083=(_0x359dcc=this[_0xd1e90b(0x1db)]['getUnit'](_0x249ae3[_0xd1e90b(0x1ce)])['find'](_0x1e6680=>_0x1e6680[_0xd1e90b(0x220)]===_0x249ae3[_0xd1e90b(0x220)]))==null?void 0x0:_0x359dcc[_0xd1e90b(0x203)];if(!_0x128083)return;const {unitId:_0x3a3e5b,subUnitId:_0x5038b4}=_0x128083;switch(_0x249ae3[_0xd1e90b(0x1e1)]&&this[_0xd1e90b(0x207)][_0xd1e90b(0x1ee)](_0x249ae3[_0xd1e90b(0x1e1)]),_0x249ae3['type']){case v[_0xd1e90b(0x20e)]:break;case v['Reply']:{this[_0xd1e90b(0x1db)][_0xd1e90b(0x225)](_0x3a3e5b,_0x5038b4,{'unitId':_0x3a3e5b,'subUnitId':_0x5038b4,'ref':'','id':_0x249ae3[_0xd1e90b(0x219)],'dT':D(+_0x249ae3[_0xd1e90b(0x1dd)]),'threadId':_0x249ae3['threadId'],'personId':(_0x2dfef6=(_0x1868c8=_0x249ae3['user'])==null?void 0x0:_0x1868c8[_0xd1e90b(0x1fd)])!=null?_0x2dfef6:_0x249ae3[_0xd1e90b(0x227)],'text':JSON[_0xd1e90b(0x1d7)](_0x249ae3[_0xd1e90b(0x1e3)]),'parentId':_0x128083['id']});break;}case v[_0xd1e90b(0x1e9)]:{const _0x5c2d18=this[_0xd1e90b(0x1db)]['getComment'](_0x3a3e5b,_0x5038b4,_0x249ae3[_0xd1e90b(0x219)]);_0x5c2d18&&_0x5c2d18[_0xd1e90b(0x1f9)]&&this[_0xd1e90b(0x1db)]['deleteComment'](_0x3a3e5b,_0x5038b4,_0x249ae3[_0xd1e90b(0x219)]);break;}case v[_0xd1e90b(0x1da)]:{this[_0xd1e90b(0x1db)]['updateComment'](_0x3a3e5b,_0x5038b4,{'commentId':_0x249ae3[_0xd1e90b(0x219)],'text':JSON[_0xd1e90b(0x1d7)](_0x249ae3[_0xd1e90b(0x1e3)])});break;}case v[_0xd1e90b(0x211)]:{const _0xa0c7a9=(_0x5b48c8=this[_0xd1e90b(0x1db)]['getUnit'](_0x249ae3[_0xd1e90b(0x1ce)])[_0xd1e90b(0x1ff)](_0x53ad63=>_0x53ad63[_0xd1e90b(0x220)]===_0x249ae3[_0xd1e90b(0x220)]))==null?void 0x0:_0x5b48c8[_0xd1e90b(0x203)];_0xa0c7a9&&this[_0xd1e90b(0x1db)][_0xd1e90b(0x1f0)](_0x3a3e5b,_0x5038b4,_0xa0c7a9['id'],_0x249ae3['solved']===I[_0xd1e90b(0x21b)]);break;}}}));}};function _0x16a6(){const _0xae002e=['rangeType','Edit','_threadCommentModel','length','createTimestamp','add','saveCommentToSnapshot','626634IrteRB','user','609580BDEDzc','content','customRanges','_injector','commentUpdate$','body','defineProperty','Delete','/add','dataSource','120345wrFJVH','getMemberID','addUser','size','resolveComment','reply','getOwnPropertyDescriptor','syncUpdateMutationToColla','_configService','UNRECOGNIZED','_threadCommentDataSourceService','getCurrentUser','_threadCommentDataSource','parentId','error','/solved','get','userID','_commentService','find','Unknown','type','personId','root','rangeId','/edit','_config','_userService','6369368nKeBCi','map','forEach','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','listComments','Add','symbol','users','Solve','2sPHxJD','disposeWithMe','YYYY/MM/DD\x20HH:mm','456211NgLeBC','comment','onStarting','pipe','replyId','56bRDyRk','Solved','_httpService','onReady','code','requireSession','threadId','resolved','updateComment','payload','2466475oiHNaA','addComment','_sessionService','userId','/reply','post','solved','filter','replies','/universer-api/user/list','values','Reply','unitId','OpenOrReOpen','_initDataSource','_initUserSync','/universer-api/comment/unit/','stringify','4912188hPPpEn','subscribe','pluginName','parse','COMMENT'];_0x16a6=function(){return _0xae002e;};return _0x16a6();}S=V([p(0x0,_0x1820ac(_0x2529c2)),p(0x1,_0x1820ac(_0x545f27)),p(0x2,_0x1820ac(_0x164e15)),p(0x3,_0x1820ac(_0x4bcb98))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x4b7626(0x1f2)],Q=(_0x2bf61a,_0x10dbdf,_0x20060d,_0x28cf8d)=>{const _0x50b607=_0x4b7626;for(var _0x4b93b1=_0x28cf8d>0x1?void 0x0:_0x28cf8d?k(_0x10dbdf,_0x20060d):_0x10dbdf,_0x49d0b1=_0x2bf61a[_0x50b607(0x1dc)]-0x1,_0x3fd1c4;_0x49d0b1>=0x0;_0x49d0b1--)(_0x3fd1c4=_0x2bf61a[_0x49d0b1])&&(_0x4b93b1=_0x3fd1c4(_0x4b93b1)||_0x4b93b1);return _0x4b93b1;},_=(_0x2fd021,_0x1dbdc0)=>(_0x5b129a,_0x1892e9)=>_0x1dbdc0(_0x5b129a,_0x1892e9,_0x2fd021);function X(_0x52db83,_0x2ce1fd){const _0x15734e=_0x4b7626,_0x3ae9eb=_0x52db83[_0x15734e(0x1ca)][0x0];return{..._0x2ce1fd,'id':_0x3ae9eb[_0x15734e(0x219)],'resolved':_0x52db83[_0x15734e(0x22a)]===0x1,'dT':D(_0x3ae9eb['createTimestamp']),'personId':_0x3ae9eb[_0x15734e(0x227)],'threadId':_0x3ae9eb[_0x15734e(0x220)]};}function ee(_0xa4dfa4,_0x2f4b5c,_0x53b562){const _0x10c849=_0x4b7626;var _0x57be1e,_0x788edc;if(((_0x788edc=(_0x57be1e=_0xa4dfa4==null?void 0x0:_0xa4dfa4[_0x10c849(0x1ca)])==null?void 0x0:_0x57be1e[_0x10c849(0x1dc)])!=null?_0x788edc:0x0)>0x0){const _0x19f506=(_0x251a1a,_0x5d4d83)=>({'id':_0x251a1a[_0x10c849(0x219)],'threadId':_0x251a1a[_0x10c849(0x220)],'dT':D(_0x251a1a['createTimestamp']),'personId':_0x251a1a['userId'],'resolved':_0xa4dfa4[_0x10c849(0x22a)]===I['Solved'],'unitId':_0x2f4b5c,'subUnitId':_0x53b562,'text':JSON[_0x10c849(0x1d7)](_0x251a1a['content']),'parentId':_0x5d4d83}),_0x3e697c=_0x19f506(_0xa4dfa4['replies'][0x0]);return{..._0x3e697c,'children':_0xa4dfa4[_0x10c849(0x1ca)]['slice'](0x1)[_0x10c849(0x209)](_0x3b1447=>_0x19f506(_0x3b1447,_0x3e697c['id']))};}return null;}let f=class{constructor(_0x350a9b,_0x5826ba,_0x5a16e5,_0x5ba7e8){const _0x53d8f7=_0x4b7626;this[_0x53d8f7(0x21c)]=_0x350a9b,this[_0x53d8f7(0x207)]=_0x5826ba,this[_0x53d8f7(0x226)]=_0x5a16e5,this[_0x53d8f7(0x1e5)]=_0x5ba7e8;}async[_0x4b7626(0x225)](_0x37d131){const _0x7bdec8=_0x4b7626;var _0x5d4451,_0x26b6d3;const {parentId:_0x381fe8,unitId:_0x16fa7e,text:_0x5341ea,threadId:_0x49e562}=_0x37d131,_0x4c41eb=(_0x26b6d3=(_0x5d4451=_0x5341ea[_0x7bdec8(0x1e4)])==null?void 0x0:_0x5d4451[_0x7bdec8(0x1c9)](_0x6a3a8d=>_0x6a3a8d[_0x7bdec8(0x1d9)]===_0x13fedf[_0x7bdec8(0x1d8)])[_0x7bdec8(0x209)](_0x56c7f9=>_0x56c7f9[_0x7bdec8(0x204)]))!=null?_0x26b6d3:[],_0x370fec=JSON[_0x7bdec8(0x1d3)](_0x5341ea),_0x143763=(await this[_0x7bdec8(0x226)][_0x7bdec8(0x21f)](_0x16fa7e))[_0x7bdec8(0x1ed)]();if(_0x381fe8){const _0x3a6515={'memberId':_0x143763,'unitId':_0x16fa7e,'content':_0x370fec,'mention':_0x4c41eb,'threadId':_0x49e562},_0x5e6a4e=(await this[_0x7bdec8(0x21c)][_0x7bdec8(0x229)](_0x7bdec8(0x1d2)+_0x16fa7e+_0x7bdec8(0x228),{'body':_0x3a6515}))[_0x7bdec8(0x1e7)][_0x7bdec8(0x1f1)];return{..._0x37d131,'id':_0x5e6a4e[_0x7bdec8(0x219)],'dT':_0xfc58d6(+_0x5e6a4e[_0x7bdec8(0x1dd)])[_0x7bdec8(0x20b)](_0x7bdec8(0x214)),'personId':_0x5e6a4e[_0x7bdec8(0x227)]};}else{const _0x3320d8={'memberId':_0x143763,'unitId':_0x16fa7e,'content':_0x370fec,'mention':_0x4c41eb},_0x369d1d=await this[_0x7bdec8(0x21c)][_0x7bdec8(0x229)](_0x7bdec8(0x1d2)+_0x16fa7e+_0x7bdec8(0x1ea),{'body':_0x3320d8});return X(_0x369d1d[_0x7bdec8(0x1e7)][_0x7bdec8(0x216)],_0x37d131);}}async[_0x4b7626(0x222)](_0xc30a5c){const _0x4bf881=_0x4b7626;var _0x59252e,_0x21dd53;const {text:_0x293230,unitId:_0x55a638}=_0xc30a5c,_0x15f32a=(_0x21dd53=(_0x59252e=_0x293230[_0x4bf881(0x1e4)])==null?void 0x0:_0x59252e[_0x4bf881(0x1c9)](_0x9e0cf0=>_0x9e0cf0[_0x4bf881(0x1d9)]===_0x13fedf[_0x4bf881(0x1d8)])[_0x4bf881(0x209)](_0x141c6d=>_0x141c6d['rangeId']))!=null?_0x21dd53:[],_0x538d99=JSON[_0x4bf881(0x1d3)](_0x293230),_0xb4cca3=_0xc30a5c[_0x4bf881(0x220)],_0x316f54=_0xc30a5c['id'],_0xece44d={'memberId':(await this[_0x4bf881(0x226)][_0x4bf881(0x21f)](_0x55a638))['getMemberID'](),'unitId':_0x55a638,'threadId':_0xb4cca3,'mention':_0x15f32a,'content':_0x538d99,'replyId':_0x316f54},_0x58392e=await this[_0x4bf881(0x21c)][_0x4bf881(0x229)](_0x4bf881(0x1d2)+_0x55a638+_0x4bf881(0x205),{'body':_0xece44d});return!_0x58392e[_0x4bf881(0x1e7)][_0x4bf881(0x1fa)]||_0x58392e['body'][_0x4bf881(0x1fa)][_0x4bf881(0x21e)]===0x1;}async[_0x4b7626(0x1f0)](_0x5a6a65){const _0x37ab32=_0x4b7626,{unitId:_0x13f311}=_0x5a6a65,_0x254c16=_0x5a6a65[_0x37ab32(0x220)],_0x5cc945={'memberId':this['_userService'][_0x37ab32(0x1f7)]()[_0x37ab32(0x1fd)],'unitId':_0x13f311,'threadId':_0x254c16,'solved':_0x5a6a65[_0x37ab32(0x221)]?I[_0x37ab32(0x21b)]:I[_0x37ab32(0x1cf)]},_0x54d624=await this[_0x37ab32(0x21c)][_0x37ab32(0x229)]('/universer-api/comment/unit/'+_0x13f311+_0x37ab32(0x1fb),{'body':_0x5cc945});return!_0x54d624['body']['error']||_0x54d624[_0x37ab32(0x1e7)][_0x37ab32(0x1fa)][_0x37ab32(0x21e)]===0x1;}async['deleteComment'](_0x4091cb,_0x369ecc,_0x5c438b,_0x1ffd6c){const _0x21811f=_0x4b7626,_0x176da9={'memberId':(await this['_sessionService'][_0x21811f(0x21f)](_0x4091cb))[_0x21811f(0x1ed)](),'threadId':_0x5c438b,'replyId':_0x1ffd6c,'unitId':_0x4091cb},_0x435232=await this['_httpService'][_0x21811f(0x229)](_0x21811f(0x1d2)+_0x4091cb+'/delete',{'body':_0x176da9});return!_0x435232[_0x21811f(0x1e7)][_0x21811f(0x1fa)]||_0x435232[_0x21811f(0x1e7)][_0x21811f(0x1fa)][_0x21811f(0x21e)]===0x1;}async[_0x4b7626(0x20d)](_0x3d0248,_0x1981f6,_0x3e57f5){const _0x26c12d=_0x4b7626,_0x579277={'unitId':_0x3d0248,'threadId':_0x3e57f5},_0x529404=await this[_0x26c12d(0x21c)]['post'](_0x26c12d(0x1d2)+_0x3d0248+'/list',{'body':_0x579277}),_0xb12dde=_0x3e57f5[_0x26c12d(0x209)](_0x1ab353=>ee(_0x529404[_0x26c12d(0x1e7)]['comments'][_0x1ab353],_0x3d0248,_0x1981f6))[_0x26c12d(0x1c9)](Boolean);return Object[_0x26c12d(0x1cc)](_0x529404[_0x26c12d(0x1e7)][_0x26c12d(0x210)])['forEach'](_0x2e7b55=>{const _0x508580=_0x26c12d;this[_0x508580(0x207)][_0x508580(0x1ee)](_0x2e7b55);}),_0xb12dde;}[_0x4b7626(0x1df)](_0x54ec3e){const _0x24bfad=_0x4b7626;return{'id':_0x54ec3e['id'],'threadId':_0x54ec3e[_0x24bfad(0x220)],'ref':_0x54ec3e['ref']};}};f=Q([_(0x0,_0x1820ac(_0x11101f)),_(0x1,_0x1820ac(_0x164e15)),_(0x2,_0x1820ac(_0x5c999b)),_(0x3,_0x1820ac(_0x4bcb98))],f);var re=Object[_0x4b7626(0x1f2)],te=(_0x1b6d49,_0x51a546,_0x47bcc9,_0x565eae)=>{const _0x14f48d=_0x4b7626;for(var _0x39973a=_0x565eae>0x1?void 0x0:_0x565eae?re(_0x51a546,_0x47bcc9):_0x51a546,_0x13c70c=_0x1b6d49[_0x14f48d(0x1dc)]-0x1,_0x321e62;_0x13c70c>=0x0;_0x13c70c--)(_0x321e62=_0x1b6d49[_0x13c70c])&&(_0x39973a=_0x321e62(_0x39973a)||_0x39973a);return _0x39973a;},N=(_0x2bfd66,_0x2dea7b)=>(_0x3f97a3,_0x1f76d9)=>_0x2dea7b(_0x3f97a3,_0x1f76d9,_0x2bfd66);let g=class extends _0x2e6166{constructor(_0x39ca7f,_0x4a58d1){const _0x5eeeda=_0x4b7626;super(),this[_0x5eeeda(0x1f6)]=_0x39ca7f,this[_0x5eeeda(0x1f8)]=_0x4a58d1,this[_0x5eeeda(0x1d0)]();}[_0x4b7626(0x1d0)](){const _0x406515=_0x4b7626;this[_0x406515(0x1f6)][_0x406515(0x1eb)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x406515(0x1f3)]=!0x1;}};g=te([N(0x0,_0x1b5895),N(0x1,_0x1820ac(f))],g);var se=Object[_0x4b7626(0x1e8)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x133e14,_0x5d8c00,_0xcdb738)=>_0x5d8c00 in _0x133e14?se(_0x133e14,_0x5d8c00,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xcdb738}):_0x133e14[_0x5d8c00]=_0xcdb738,ie=(_0x428a92,_0x256d5b,_0x58c53c,_0x46b1e7)=>{const _0x1864b9=_0x4b7626;for(var _0x3e5a8e=_0x46b1e7>0x1?void 0x0:_0x46b1e7?oe(_0x256d5b,_0x58c53c):_0x256d5b,_0x231da6=_0x428a92[_0x1864b9(0x1dc)]-0x1,_0x56dcce;_0x231da6>=0x0;_0x231da6--)(_0x56dcce=_0x428a92[_0x231da6])&&(_0x3e5a8e=_0x56dcce(_0x3e5a8e)||_0x3e5a8e);return _0x3e5a8e;},w=(_0x3a9755,_0x1a22e7)=>(_0x1d9a23,_0x443f2c)=>_0x1a22e7(_0x1d9a23,_0x443f2c,_0x3a9755),$=(_0x2b05ab,_0x4751fa,_0x4818f4)=>ne(_0x2b05ab,typeof _0x4751fa!=_0x4b7626(0x20f)?_0x4751fa+'':_0x4751fa,_0x4818f4);function _0x2c2f(_0x41995f,_0x568760){const _0x16a6d9=_0x16a6();return _0x2c2f=function(_0x2c2fee,_0x464aff){_0x2c2fee=_0x2c2fee-0x1c9;let _0x2aab00=_0x16a6d9[_0x2c2fee];return _0x2aab00;},_0x2c2f(_0x41995f,_0x568760);}let b=class extends _0x53cea8{constructor(_0xfeb84c=M,_0x40381e,_0x36610e){const _0xcd7a76=_0x4b7626;super(),this['_config']=_0xfeb84c,this[_0xcd7a76(0x1e5)]=_0x40381e,this[_0xcd7a76(0x1f4)]=_0x36610e;const {..._0x35147f}=_0x23c1a1({},M,this[_0xcd7a76(0x206)]);this[_0xcd7a76(0x1f4)]['setConfig'](z,_0x35147f);}[_0x4b7626(0x217)](){const _0x36f2f6=_0x4b7626;[[f],[g],[S]][_0x36f2f6(0x20a)](_0x4cc6e9=>{const _0x3880f7=_0x36f2f6;this[_0x3880f7(0x1e5)][_0x3880f7(0x1de)](_0x4cc6e9);});}[_0x4b7626(0x21d)](){const _0x2307c9=_0x4b7626;this[_0x2307c9(0x1e5)]['get'](g),this['_injector'][_0x2307c9(0x1fc)](S);}};$(b,_0x4b7626(0x1d6),W),$(b,_0x4b7626(0x201),_0x3dc0f3['UNIVER_UNKNOWN']),b=ie([_0xa05568(_0x2fef6f,_0x53c880,_0x3306fe),w(0x1,_0x1820ac(_0x4bcb98)),w(0x2,_0x3e734a)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5e519c=_0x5ceb;(function(_0x123488,_0x434d91){const _0x3fc728=_0x5ceb,_0x5acb2d=_0x123488();while(!![]){try{const _0x2f4881=parseInt(_0x3fc728(0xbc))/0x1*(parseInt(_0x3fc728(0xdf))/0x2)+-parseInt(_0x3fc728(0xae))/0x3+parseInt(_0x3fc728(0x9a))/0x4*(parseInt(_0x3fc728(0xd3))/0x5)+parseInt(_0x3fc728(0xcc))/0x6+-parseInt(_0x3fc728(0xca))/0x7+parseInt(_0x3fc728(0x9e))/0x8*(-parseInt(_0x3fc728(0xd2))/0x9)+-parseInt(_0x3fc728(0xa0))/0xa*(parseInt(_0x3fc728(0xe6))/0xb);if(_0x2f4881===_0x434d91)break;else _0x5acb2d['push'](_0x5acb2d['shift']());}catch(_0x3fc1ce){_0x5acb2d['push'](_0x5acb2d['shift']());}}}(_0x5878,0xbea9b));import{CommentService as _0x12d00b,CollaborationSessionService as _0x494f6f,UniverCollaborationClientPlugin as _0x297c90}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x24c725}from'@univerjs-pro/license';import{dayjs as _0x19b6e7,UserManagerService as _0x3d615e,Inject as _0x1bd6b7,Injector as _0x1dfc40,Disposable as _0x4dbd30,CustomRangeType as _0x517552,UniverInstanceType as _0x5c3a2a,DependentOn as _0x2aafae,IConfigService as _0x4ccfd1,Plugin as _0x41074e,merge as _0x59806d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31b480}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2d9488,IThreadCommentDataSourceService as _0x1e1893}from'@univerjs/thread-comment';import{bufferTime as _0x522b81}from'rxjs';import{HTTPService as _0x52a4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x395eb1=>(_0x395eb1[_0x395eb1[_0x5e519c(0xda)]=0x0]=_0x5e519c(0xda),_0x395eb1[_0x395eb1[_0x5e519c(0xa9)]=0x1]=_0x5e519c(0xa9),_0x395eb1[_0x395eb1['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x395eb1))(I||{}),v=(_0x3d9ea7=>(_0x3d9ea7[_0x3d9ea7['Unknown']=0x0]=_0x5e519c(0xb5),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xd8)]=0x1]=_0x5e519c(0xd8),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xdc)]=0x2]=_0x5e519c(0xdc),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0x91)]=0x3]=_0x5e519c(0x91),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc4)]=0x4]=_0x5e519c(0xc4),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xef)]=0x5]=_0x5e519c(0xef),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc7)]=-0x1]=_0x5e519c(0xc7),_0x3d9ea7))(v||{});const D=_0x268478=>_0x19b6e7(new Date(+_0x268478))[_0x5e519c(0xcb)](_0x5e519c(0xbb)),B=async(_0x262fad,_0x353302)=>{const _0x1b6b6c=_0x5e519c,_0x4f46b8=_0x262fad[_0x1b6b6c(0xee)](_0x3d615e),_0x152324=_0x262fad[_0x1b6b6c(0xee)](_0x52a4a2);_0x353302[_0x1b6b6c(0xdd)](_0x526851=>{const _0x329486=_0x1b6b6c;_0x4f46b8[_0x329486(0xa5)](_0x526851)&&_0x353302[_0x329486(0xd0)](_0x526851);}),_0x353302['size']&&(await _0x152324[_0x1b6b6c(0xee)]('/universer-api/user/list',{'params':{'userIDs':[..._0x353302]}}))[_0x1b6b6c(0xa2)][_0x1b6b6c(0xc3)][_0x1b6b6c(0xdd)](_0x42ce50=>{const _0x59dfa1=_0x1b6b6c;_0x42ce50&&_0x4f46b8[_0x59dfa1(0xd4)](_0x42ce50);});};function _0x5878(){const _0x50530a=['Reply','forEach','_sessionService','2bmXCRB','pluginName','_threadCommentDataSource','_commentService','length','dataSource','userID','11ISIPwp','comments','ref','root','parentId','/add','/reply','replyId','get','Solve','Edit','unitId','customRanges','createTimestamp','user','map','_httpService','deleteComment','type','78004utSuZr','_config','filter','getOwnPropertyDescriptor','156568aIboBl','getUnit','4452870KExamF','solved','body','post','error','getUser','requireSession','values','pipe','Solved','_init','updateComment','userId','disposeWithMe','1960779gVlxGF','_threadCommentDataSourceService','find','_threadCommentModel','resolveComment','_injector','/list','Unknown','addComment','onStarting','payload','/universer-api/comment/unit/','_initUserSync','YYYY/MM/DD\x20HH:mm','1387055JDQbjc','_configService','rangeType','_userService','getMemberID','replies','add','users','Delete','saveCommentToSnapshot','subscribe','UNRECOGNIZED','COMMENT','threadId','2179807aUEToF','format','6001866xgiKbL','/edit','personId','syncUpdateMutationToColla','delete','rangeId','144wYzrYA','30FYEQzq','addUser','commentUpdate$','code','parse','Add','listComments','OpenOrReOpen','_initDataSource'];_0x5878=function(){return _0x50530a;};return _0x5878();}var K=Object[_0x5e519c(0x9d)],V=(_0x1a6862,_0x55ac9c,_0x3d26a5,_0x236beb)=>{const _0x269ff4=_0x5e519c;for(var _0x34b007=_0x236beb>0x1?void 0x0:_0x236beb?K(_0x55ac9c,_0x3d26a5):_0x55ac9c,_0x2adf79=_0x1a6862[_0x269ff4(0xe3)]-0x1,_0x243102;_0x2adf79>=0x0;_0x2adf79--)(_0x243102=_0x1a6862[_0x2adf79])&&(_0x34b007=_0x243102(_0x34b007)||_0x34b007);return _0x34b007;},p=(_0x24b02c,_0x28b848)=>(_0x36079c,_0x3dcd39)=>_0x28b848(_0x36079c,_0x3dcd39,_0x24b02c);let S=class extends _0x4dbd30{constructor(_0x41aebb,_0x4ca893,_0x36868a,_0x54160a){const _0x51dcbf=_0x5e519c;super(),this['_commentService']=_0x41aebb,this[_0x51dcbf(0xb1)]=_0x4ca893,this['_userService']=_0x36868a,this[_0x51dcbf(0xb3)]=_0x54160a,this[_0x51dcbf(0xaa)](),this[_0x51dcbf(0xba)]();}[_0x5e519c(0xba)](){const _0x726858=_0x5e519c;this[_0x726858(0xad)](this['_threadCommentModel']['commentUpdate$'][_0x726858(0xa8)](_0x522b81(0x10))[_0x726858(0xc6)](_0x333991=>{const _0x39515e=_0x726858,_0x2d1b88=new Set();_0x333991[_0x39515e(0xdd)](_0x454762=>{const _0x17df64=_0x39515e;switch(_0x454762[_0x17df64(0x99)]){case _0x17df64(0xc2):{const _0x3ac24f=_0x454762[_0x17df64(0xb8)][_0x17df64(0xce)];_0x2d1b88[_0x17df64(0xc2)](_0x3ac24f);break;}}}),B(this['_injector'],_0x2d1b88);}));}[_0x5e519c(0xaa)](){const _0x23622b=_0x5e519c;this[_0x23622b(0xad)](this[_0x23622b(0xe2)][_0x23622b(0xd5)][_0x23622b(0xc6)](async _0x3a21ba=>{const _0x3a6884=_0x23622b;var _0x2c23de,_0xeb45f8,_0x323a45,_0xd1ce65;const _0x5db5c9=(_0x2c23de=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba['unitId'])['find'](_0x8a7d8=>_0x8a7d8[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0x2c23de['root'];if(!_0x5db5c9)return;const {unitId:_0x5b93ed,subUnitId:_0x594da2}=_0x5db5c9;switch(_0x3a21ba['user']&&this[_0x3a6884(0xbf)][_0x3a6884(0xd4)](_0x3a21ba['user']),_0x3a21ba[_0x3a6884(0x99)]){case v['Add']:break;case v[_0x3a6884(0xdc)]:{this[_0x3a6884(0xb1)]['addComment'](_0x5b93ed,_0x594da2,{'unitId':_0x5b93ed,'subUnitId':_0x594da2,'ref':'','id':_0x3a21ba[_0x3a6884(0xed)],'dT':D(+_0x3a21ba[_0x3a6884(0x94)]),'threadId':_0x3a21ba['threadId'],'personId':(_0x323a45=(_0xeb45f8=_0x3a21ba[_0x3a6884(0x95)])==null?void 0x0:_0xeb45f8[_0x3a6884(0xe5)])!=null?_0x323a45:_0x3a21ba[_0x3a6884(0xac)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content']),'parentId':_0x5db5c9['id']});break;}case v['Delete']:{const _0x33f369=this[_0x3a6884(0xb1)]['getComment'](_0x5b93ed,_0x594da2,_0x3a21ba[_0x3a6884(0xed)]);_0x33f369&&_0x33f369[_0x3a6884(0xea)]&&this['_threadCommentModel']['deleteComment'](_0x5b93ed,_0x594da2,_0x3a21ba['replyId']);break;}case v['Edit']:{this[_0x3a6884(0xb1)]['updateComment'](_0x5b93ed,_0x594da2,{'commentId':_0x3a21ba[_0x3a6884(0xed)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content'])});break;}case v[_0x3a6884(0xef)]:{const _0x28a6ae=(_0xd1ce65=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba[_0x3a6884(0x92)])[_0x3a6884(0xb0)](_0x485aec=>_0x485aec[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0xd1ce65[_0x3a6884(0xe9)];_0x28a6ae&&this[_0x3a6884(0xb1)][_0x3a6884(0xb2)](_0x5b93ed,_0x594da2,_0x28a6ae['id'],_0x3a21ba['solved']===I[_0x3a6884(0xa9)]);break;}}}));}};S=V([p(0x0,_0x1bd6b7(_0x12d00b)),p(0x1,_0x1bd6b7(_0x2d9488)),p(0x2,_0x1bd6b7(_0x3d615e)),p(0x3,_0x1bd6b7(_0x1dfc40))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x126e9c,_0xe5cf5c,_0x420c12,_0x1a178f)=>{const _0x19ae95=_0x5e519c;for(var _0x272145=_0x1a178f>0x1?void 0x0:_0x1a178f?k(_0xe5cf5c,_0x420c12):_0xe5cf5c,_0x5b4cec=_0x126e9c[_0x19ae95(0xe3)]-0x1,_0x137b66;_0x5b4cec>=0x0;_0x5b4cec--)(_0x137b66=_0x126e9c[_0x5b4cec])&&(_0x272145=_0x137b66(_0x272145)||_0x272145);return _0x272145;},_=(_0x26a1f4,_0x281b8d)=>(_0x584d65,_0x22df2d)=>_0x281b8d(_0x584d65,_0x22df2d,_0x26a1f4);function X(_0x480b96,_0x1fe62d){const _0x22c521=_0x5e519c,_0x41c193=_0x480b96[_0x22c521(0xc1)][0x0];return{..._0x1fe62d,'id':_0x41c193['replyId'],'resolved':_0x480b96[_0x22c521(0xa1)]===0x1,'dT':D(_0x41c193[_0x22c521(0x94)]),'personId':_0x41c193['userId'],'threadId':_0x41c193['threadId']};}function ee(_0x788a95,_0x16985f,_0x284a63){const _0x3568bc=_0x5e519c;var _0xa97886,_0x2e28b7;if(((_0x2e28b7=(_0xa97886=_0x788a95==null?void 0x0:_0x788a95[_0x3568bc(0xc1)])==null?void 0x0:_0xa97886[_0x3568bc(0xe3)])!=null?_0x2e28b7:0x0)>0x0){const _0x3a66dd=(_0x4f17ed,_0x2f2aa3)=>({'id':_0x4f17ed['replyId'],'threadId':_0x4f17ed[_0x3568bc(0xc9)],'dT':D(_0x4f17ed[_0x3568bc(0x94)]),'personId':_0x4f17ed['userId'],'resolved':_0x788a95[_0x3568bc(0xa1)]===I[_0x3568bc(0xa9)],'unitId':_0x16985f,'subUnitId':_0x284a63,'text':JSON[_0x3568bc(0xd7)](_0x4f17ed['content']),'parentId':_0x2f2aa3}),_0x4a2743=_0x3a66dd(_0x788a95[_0x3568bc(0xc1)][0x0]);return{..._0x4a2743,'children':_0x788a95['replies']['slice'](0x1)[_0x3568bc(0x96)](_0x4c26c8=>_0x3a66dd(_0x4c26c8,_0x4a2743['id']))};}return null;}let f=class{constructor(_0x4a0a55,_0x46b7ec,_0x1193db,_0x3af4c8){const _0x52c118=_0x5e519c;this[_0x52c118(0x97)]=_0x4a0a55,this['_userService']=_0x46b7ec,this['_sessionService']=_0x1193db,this[_0x52c118(0xb3)]=_0x3af4c8;}async[_0x5e519c(0xb6)](_0xa173bc){const _0x5d729b=_0x5e519c;var _0x2ca814,_0x20a6b1;const {parentId:_0x339b09,unitId:_0x419960,text:_0x5f52be,threadId:_0x82adbd}=_0xa173bc,_0xd4d1e2=(_0x20a6b1=(_0x2ca814=_0x5f52be[_0x5d729b(0x93)])==null?void 0x0:_0x2ca814[_0x5d729b(0x9c)](_0x619ef8=>_0x619ef8[_0x5d729b(0xbe)]===_0x517552[_0x5d729b(0xc8)])['map'](_0x96f5de=>_0x96f5de[_0x5d729b(0xd1)]))!=null?_0x20a6b1:[],_0x4695e9=JSON['stringify'](_0x5f52be),_0x231617=(await this[_0x5d729b(0xde)][_0x5d729b(0xa6)](_0x419960))[_0x5d729b(0xc0)]();if(_0x339b09){const _0x3dcf31={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2,'threadId':_0x82adbd},_0x1c7184=(await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xec),{'body':_0x3dcf31}))[_0x5d729b(0xa2)]['reply'];return{..._0xa173bc,'id':_0x1c7184[_0x5d729b(0xed)],'dT':_0x19b6e7(+_0x1c7184['createTimestamp'])[_0x5d729b(0xcb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1c7184[_0x5d729b(0xac)]};}else{const _0x5895a0={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2},_0x57a9e2=await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xeb),{'body':_0x5895a0});return X(_0x57a9e2['body']['comment'],_0xa173bc);}}async[_0x5e519c(0xab)](_0x5ba388){const _0x146c7b=_0x5e519c;var _0x311480,_0x4049e4;const {text:_0x290947,unitId:_0x11be01}=_0x5ba388,_0x42fc8c=(_0x4049e4=(_0x311480=_0x290947[_0x146c7b(0x93)])==null?void 0x0:_0x311480['filter'](_0x4c81b6=>_0x4c81b6[_0x146c7b(0xbe)]===_0x517552[_0x146c7b(0xc8)])[_0x146c7b(0x96)](_0x491c81=>_0x491c81[_0x146c7b(0xd1)]))!=null?_0x4049e4:[],_0x38ccac=JSON['stringify'](_0x290947),_0x28705f=_0x5ba388[_0x146c7b(0xc9)],_0x7635d8=_0x5ba388['id'],_0x3dc1f1={'memberId':(await this[_0x146c7b(0xde)][_0x146c7b(0xa6)](_0x11be01))[_0x146c7b(0xc0)](),'unitId':_0x11be01,'threadId':_0x28705f,'mention':_0x42fc8c,'content':_0x38ccac,'replyId':_0x7635d8},_0x129bcf=await this[_0x146c7b(0x97)][_0x146c7b(0xa3)]('/universer-api/comment/unit/'+_0x11be01+_0x146c7b(0xcd),{'body':_0x3dc1f1});return!_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)]||_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)][_0x146c7b(0xd6)]===0x1;}async['resolveComment'](_0x55be80){const _0x92af12=_0x5e519c,{unitId:_0x1a91b1}=_0x55be80,_0x4e663e=_0x55be80[_0x92af12(0xc9)],_0x475f70={'memberId':this['_userService']['getCurrentUser']()[_0x92af12(0xe5)],'unitId':_0x1a91b1,'threadId':_0x4e663e,'solved':_0x55be80['resolved']?I[_0x92af12(0xa9)]:I[_0x92af12(0xda)]},_0x180eca=await this[_0x92af12(0x97)][_0x92af12(0xa3)]('/universer-api/comment/unit/'+_0x1a91b1+'/solved',{'body':_0x475f70});return!_0x180eca[_0x92af12(0xa2)]['error']||_0x180eca[_0x92af12(0xa2)][_0x92af12(0xa4)]['code']===0x1;}async[_0x5e519c(0x98)](_0x58645b,_0x4e7965,_0x17e333,_0x4f1b06){const _0x1ec86c=_0x5e519c,_0xa7fbde={'memberId':(await this[_0x1ec86c(0xde)][_0x1ec86c(0xa6)](_0x58645b))[_0x1ec86c(0xc0)](),'threadId':_0x17e333,'replyId':_0x4f1b06,'unitId':_0x58645b},_0x5d410c=await this[_0x1ec86c(0x97)][_0x1ec86c(0xa3)](_0x1ec86c(0xb9)+_0x58645b+'/delete',{'body':_0xa7fbde});return!_0x5d410c['body'][_0x1ec86c(0xa4)]||_0x5d410c[_0x1ec86c(0xa2)][_0x1ec86c(0xa4)][_0x1ec86c(0xd6)]===0x1;}async[_0x5e519c(0xd9)](_0x3feefd,_0x25d00d,_0x3cd881){const _0x55c250=_0x5e519c,_0x42cacf={'unitId':_0x3feefd,'threadId':_0x3cd881},_0x58bd70=await this[_0x55c250(0x97)][_0x55c250(0xa3)](_0x55c250(0xb9)+_0x3feefd+_0x55c250(0xb4),{'body':_0x42cacf}),_0x3159b5=_0x3cd881['map'](_0x3fee24=>ee(_0x58bd70['body'][_0x55c250(0xe7)][_0x3fee24],_0x3feefd,_0x25d00d))['filter'](Boolean);return Object[_0x55c250(0xa7)](_0x58bd70['body']['users'])[_0x55c250(0xdd)](_0x236fed=>{const _0x5bcb36=_0x55c250;this['_userService'][_0x5bcb36(0xd4)](_0x236fed);}),_0x3159b5;}[_0x5e519c(0xc5)](_0x442952){const _0x7578a2=_0x5e519c;return{'id':_0x442952['id'],'threadId':_0x442952[_0x7578a2(0xc9)],'ref':_0x442952[_0x7578a2(0xe8)]};}};f=Q([_(0x0,_0x1bd6b7(_0x52a4a2)),_(0x1,_0x1bd6b7(_0x3d615e)),_(0x2,_0x1bd6b7(_0x494f6f)),_(0x3,_0x1bd6b7(_0x1dfc40))],f);var re=Object[_0x5e519c(0x9d)],te=(_0x17877c,_0xcf2c87,_0x2e7c25,_0x54ff9e)=>{const _0x2d5414=_0x5e519c;for(var _0x4ac2c0=_0x54ff9e>0x1?void 0x0:_0x54ff9e?re(_0xcf2c87,_0x2e7c25):_0xcf2c87,_0x6292eb=_0x17877c[_0x2d5414(0xe3)]-0x1,_0x1f4304;_0x6292eb>=0x0;_0x6292eb--)(_0x1f4304=_0x17877c[_0x6292eb])&&(_0x4ac2c0=_0x1f4304(_0x4ac2c0)||_0x4ac2c0);return _0x4ac2c0;},N=(_0x5dc274,_0x153500)=>(_0x428cc3,_0x199ebd)=>_0x153500(_0x428cc3,_0x199ebd,_0x5dc274);let g=class extends _0x4dbd30{constructor(_0x2ff542,_0x37e7ba){const _0x4d4df0=_0x5e519c;super(),this[_0x4d4df0(0xaf)]=_0x2ff542,this[_0x4d4df0(0xe1)]=_0x37e7ba,this[_0x4d4df0(0xdb)]();}['_initDataSource'](){const _0x393965=_0x5e519c;this[_0x393965(0xaf)][_0x393965(0xe4)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x393965(0xcf)]=!0x1;}};g=te([N(0x0,_0x1e1893),N(0x1,_0x1bd6b7(f))],g);var se=Object['defineProperty'],oe=Object[_0x5e519c(0x9d)],ne=(_0x35ad40,_0x447367,_0x3dff44)=>_0x447367 in _0x35ad40?se(_0x35ad40,_0x447367,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dff44}):_0x35ad40[_0x447367]=_0x3dff44,ie=(_0x5dff54,_0x3381e2,_0x1c99ce,_0x2503ae)=>{const _0x548b72=_0x5e519c;for(var _0x3b1f82=_0x2503ae>0x1?void 0x0:_0x2503ae?oe(_0x3381e2,_0x1c99ce):_0x3381e2,_0x4eb2=_0x5dff54[_0x548b72(0xe3)]-0x1,_0x4723f0;_0x4eb2>=0x0;_0x4eb2--)(_0x4723f0=_0x5dff54[_0x4eb2])&&(_0x3b1f82=_0x4723f0(_0x3b1f82)||_0x3b1f82);return _0x3b1f82;},w=(_0x58e0ee,_0x58a975)=>(_0x1623a2,_0x3e7078)=>_0x58a975(_0x1623a2,_0x3e7078,_0x58e0ee),$=(_0x41cd99,_0x2b58bb,_0x2e1e76)=>ne(_0x41cd99,typeof _0x2b58bb!='symbol'?_0x2b58bb+'':_0x2b58bb,_0x2e1e76);function _0x5ceb(_0x44b9cb,_0x5cec12){const _0x587803=_0x5878();return _0x5ceb=function(_0x5ceb85,_0x45c382){_0x5ceb85=_0x5ceb85-0x91;let _0x1f9fd2=_0x587803[_0x5ceb85];return _0x1f9fd2;},_0x5ceb(_0x44b9cb,_0x5cec12);}let b=class extends _0x41074e{constructor(_0x29bf7a=M,_0x2d535e,_0x27f7e0){const _0x2ea9fb=_0x5e519c;super(),this['_config']=_0x29bf7a,this[_0x2ea9fb(0xb3)]=_0x2d535e,this[_0x2ea9fb(0xbd)]=_0x27f7e0;const {..._0x3af099}=_0x59806d({},M,this[_0x2ea9fb(0x9b)]);this[_0x2ea9fb(0xbd)]['setConfig'](z,_0x3af099);}[_0x5e519c(0xb7)](){const _0x207c21=_0x5e519c;[[f],[g],[S]][_0x207c21(0xdd)](_0x342c0c=>{const _0x2e5340=_0x207c21;this[_0x2e5340(0xb3)]['add'](_0x342c0c);});}['onReady'](){const _0x4cafb7=_0x5e519c;this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](g),this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](S);}};$(b,_0x5e519c(0xe0),W),$(b,_0x5e519c(0x99),_0x5c3a2a['UNIVER_UNKNOWN']),b=ie([_0x2aafae(_0x31b480,_0x297c90,_0x24c725),w(0x1,_0x1bd6b7(_0x1dfc40)),w(0x2,_0x4ccfd1)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4b7626=_0x2c2f;(function(_0x139491,_0x4b98f6){const _0x20b7dc=_0x2c2f,_0x69d8aa=_0x139491();while(!![]){try{const _0x5a7952=parseInt(_0x20b7dc(0x1e2))/0x1*(-parseInt(_0x20b7dc(0x212))/0x2)+-parseInt(_0x20b7dc(0x1ec))/0x3*(-parseInt(_0x20b7dc(0x21a))/0x4)+parseInt(_0x20b7dc(0x224))/0x5+parseInt(_0x20b7dc(0x1d4))/0x6+-parseInt(_0x20b7dc(0x215))/0x7+-parseInt(_0x20b7dc(0x208))/0x8+parseInt(_0x20b7dc(0x1e0))/0x9;if(_0x5a7952===_0x4b98f6)break;else _0x69d8aa['push'](_0x69d8aa['shift']());}catch(_0x11f169){_0x69d8aa['push'](_0x69d8aa['shift']());}}}(_0x16a6,0x734f1));import{CommentService as _0x2529c2,CollaborationSessionService as _0x5c999b,UniverCollaborationClientPlugin as _0x53c880}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3306fe}from'@univerjs-pro/license';import{dayjs as _0xfc58d6,UserManagerService as _0x164e15,Inject as _0x1820ac,Injector as _0x4bcb98,Disposable as _0x2e6166,CustomRangeType as _0x13fedf,UniverInstanceType as _0x3dc0f3,DependentOn as _0xa05568,IConfigService as _0x3e734a,Plugin as _0x53cea8,merge as _0x23c1a1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2fef6f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x545f27,IThreadCommentDataSourceService as _0x1b5895}from'@univerjs/thread-comment';import{bufferTime as _0x189a1d}from'rxjs';import{HTTPService as _0x11101f}from'@univerjs/network';const W=_0x4b7626(0x20c);var I=(_0x1948b6=>(_0x1948b6[_0x1948b6[_0x4b7626(0x1cf)]=0x0]='OpenOrReOpen',_0x1948b6[_0x1948b6[_0x4b7626(0x21b)]=0x1]=_0x4b7626(0x21b),_0x1948b6[_0x1948b6[_0x4b7626(0x1f5)]=-0x1]='UNRECOGNIZED',_0x1948b6))(I||{}),v=(_0x5b8e04=>(_0x5b8e04[_0x5b8e04['Unknown']=0x0]=_0x4b7626(0x200),_0x5b8e04[_0x5b8e04[_0x4b7626(0x20e)]=0x1]=_0x4b7626(0x20e),_0x5b8e04[_0x5b8e04[_0x4b7626(0x1cd)]=0x2]=_0x4b7626(0x1cd),_0x5b8e04[_0x5b8e04[_0x4b7626(0x1da)]=0x3]=_0x4b7626(0x1da),_0x5b8e04[_0x5b8e04[_0x4b7626(0x1e9)]=0x4]=_0x4b7626(0x1e9),_0x5b8e04[_0x5b8e04[_0x4b7626(0x211)]=0x5]='Solve',_0x5b8e04[_0x5b8e04[_0x4b7626(0x1f5)]=-0x1]=_0x4b7626(0x1f5),_0x5b8e04))(v||{});const D=_0x308c6e=>_0xfc58d6(new Date(+_0x308c6e))[_0x4b7626(0x20b)](_0x4b7626(0x214)),B=async(_0x3cb69d,_0x561bb0)=>{const _0x2648fa=_0x4b7626,_0x87d8a3=_0x3cb69d[_0x2648fa(0x1fc)](_0x164e15),_0x4989a0=_0x3cb69d[_0x2648fa(0x1fc)](_0x11101f);_0x561bb0[_0x2648fa(0x20a)](_0x4f7b1d=>{_0x87d8a3['getUser'](_0x4f7b1d)&&_0x561bb0['delete'](_0x4f7b1d);}),_0x561bb0[_0x2648fa(0x1ef)]&&(await _0x4989a0['get'](_0x2648fa(0x1cb),{'params':{'userIDs':[..._0x561bb0]}}))['body'][_0x2648fa(0x210)]['forEach'](_0x2f093e=>{const _0x2496fa=_0x2648fa;_0x2f093e&&_0x87d8a3[_0x2496fa(0x1ee)](_0x2f093e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x30aec4,_0x2f4c31,_0x35259b,_0x38d06f)=>{const _0x56791e=_0x4b7626;for(var _0x1f95b2=_0x38d06f>0x1?void 0x0:_0x38d06f?K(_0x2f4c31,_0x35259b):_0x2f4c31,_0x1d95a1=_0x30aec4[_0x56791e(0x1dc)]-0x1,_0x1d2ddc;_0x1d95a1>=0x0;_0x1d95a1--)(_0x1d2ddc=_0x30aec4[_0x1d95a1])&&(_0x1f95b2=_0x1d2ddc(_0x1f95b2)||_0x1f95b2);return _0x1f95b2;},p=(_0x199e7c,_0xa8b55)=>(_0x592e4b,_0x587a57)=>_0xa8b55(_0x592e4b,_0x587a57,_0x199e7c);let S=class extends _0x2e6166{constructor(_0x1a7631,_0x200bc3,_0xaec88d,_0x173bb9){const _0x5a6914=_0x4b7626;super(),this[_0x5a6914(0x1fe)]=_0x1a7631,this[_0x5a6914(0x1db)]=_0x200bc3,this['_userService']=_0xaec88d,this[_0x5a6914(0x1e5)]=_0x173bb9,this['_init'](),this[_0x5a6914(0x1d1)]();}[_0x4b7626(0x1d1)](){const _0x1aa270=_0x4b7626;this[_0x1aa270(0x213)](this[_0x1aa270(0x1db)]['commentUpdate$'][_0x1aa270(0x218)](_0x189a1d(0x10))[_0x1aa270(0x1d5)](_0x5488d6=>{const _0x328fd2=_0x1aa270,_0x27475a=new Set();_0x5488d6['forEach'](_0x137b29=>{const _0xf1ae05=_0x2c2f;switch(_0x137b29[_0xf1ae05(0x201)]){case _0xf1ae05(0x1de):{const _0x5ca361=_0x137b29[_0xf1ae05(0x223)][_0xf1ae05(0x202)];_0x27475a[_0xf1ae05(0x1de)](_0x5ca361);break;}}}),B(this[_0x328fd2(0x1e5)],_0x27475a);}));}['_init'](){const _0xfc5f33=_0x4b7626;this['disposeWithMe'](this[_0xfc5f33(0x1fe)][_0xfc5f33(0x1e6)][_0xfc5f33(0x1d5)](async _0x249ae3=>{const _0xd1e90b=_0xfc5f33;var _0x359dcc,_0x1868c8,_0x2dfef6,_0x5b48c8;const _0x128083=(_0x359dcc=this[_0xd1e90b(0x1db)]['getUnit'](_0x249ae3[_0xd1e90b(0x1ce)])['find'](_0x1e6680=>_0x1e6680[_0xd1e90b(0x220)]===_0x249ae3[_0xd1e90b(0x220)]))==null?void 0x0:_0x359dcc[_0xd1e90b(0x203)];if(!_0x128083)return;const {unitId:_0x3a3e5b,subUnitId:_0x5038b4}=_0x128083;switch(_0x249ae3[_0xd1e90b(0x1e1)]&&this[_0xd1e90b(0x207)][_0xd1e90b(0x1ee)](_0x249ae3[_0xd1e90b(0x1e1)]),_0x249ae3['type']){case v[_0xd1e90b(0x20e)]:break;case v['Reply']:{this[_0xd1e90b(0x1db)][_0xd1e90b(0x225)](_0x3a3e5b,_0x5038b4,{'unitId':_0x3a3e5b,'subUnitId':_0x5038b4,'ref':'','id':_0x249ae3[_0xd1e90b(0x219)],'dT':D(+_0x249ae3[_0xd1e90b(0x1dd)]),'threadId':_0x249ae3['threadId'],'personId':(_0x2dfef6=(_0x1868c8=_0x249ae3['user'])==null?void 0x0:_0x1868c8[_0xd1e90b(0x1fd)])!=null?_0x2dfef6:_0x249ae3[_0xd1e90b(0x227)],'text':JSON[_0xd1e90b(0x1d7)](_0x249ae3[_0xd1e90b(0x1e3)]),'parentId':_0x128083['id']});break;}case v[_0xd1e90b(0x1e9)]:{const _0x5c2d18=this[_0xd1e90b(0x1db)]['getComment'](_0x3a3e5b,_0x5038b4,_0x249ae3[_0xd1e90b(0x219)]);_0x5c2d18&&_0x5c2d18[_0xd1e90b(0x1f9)]&&this[_0xd1e90b(0x1db)]['deleteComment'](_0x3a3e5b,_0x5038b4,_0x249ae3[_0xd1e90b(0x219)]);break;}case v[_0xd1e90b(0x1da)]:{this[_0xd1e90b(0x1db)]['updateComment'](_0x3a3e5b,_0x5038b4,{'commentId':_0x249ae3[_0xd1e90b(0x219)],'text':JSON[_0xd1e90b(0x1d7)](_0x249ae3[_0xd1e90b(0x1e3)])});break;}case v[_0xd1e90b(0x211)]:{const _0xa0c7a9=(_0x5b48c8=this[_0xd1e90b(0x1db)]['getUnit'](_0x249ae3[_0xd1e90b(0x1ce)])[_0xd1e90b(0x1ff)](_0x53ad63=>_0x53ad63[_0xd1e90b(0x220)]===_0x249ae3[_0xd1e90b(0x220)]))==null?void 0x0:_0x5b48c8[_0xd1e90b(0x203)];_0xa0c7a9&&this[_0xd1e90b(0x1db)][_0xd1e90b(0x1f0)](_0x3a3e5b,_0x5038b4,_0xa0c7a9['id'],_0x249ae3['solved']===I[_0xd1e90b(0x21b)]);break;}}}));}};function _0x16a6(){const _0xae002e=['rangeType','Edit','_threadCommentModel','length','createTimestamp','add','saveCommentToSnapshot','626634IrteRB','user','609580BDEDzc','content','customRanges','_injector','commentUpdate$','body','defineProperty','Delete','/add','dataSource','120345wrFJVH','getMemberID','addUser','size','resolveComment','reply','getOwnPropertyDescriptor','syncUpdateMutationToColla','_configService','UNRECOGNIZED','_threadCommentDataSourceService','getCurrentUser','_threadCommentDataSource','parentId','error','/solved','get','userID','_commentService','find','Unknown','type','personId','root','rangeId','/edit','_config','_userService','6369368nKeBCi','map','forEach','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','listComments','Add','symbol','users','Solve','2sPHxJD','disposeWithMe','YYYY/MM/DD\x20HH:mm','456211NgLeBC','comment','onStarting','pipe','replyId','56bRDyRk','Solved','_httpService','onReady','code','requireSession','threadId','resolved','updateComment','payload','2466475oiHNaA','addComment','_sessionService','userId','/reply','post','solved','filter','replies','/universer-api/user/list','values','Reply','unitId','OpenOrReOpen','_initDataSource','_initUserSync','/universer-api/comment/unit/','stringify','4912188hPPpEn','subscribe','pluginName','parse','COMMENT'];_0x16a6=function(){return _0xae002e;};return _0x16a6();}S=V([p(0x0,_0x1820ac(_0x2529c2)),p(0x1,_0x1820ac(_0x545f27)),p(0x2,_0x1820ac(_0x164e15)),p(0x3,_0x1820ac(_0x4bcb98))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x4b7626(0x1f2)],Q=(_0x2bf61a,_0x10dbdf,_0x20060d,_0x28cf8d)=>{const _0x50b607=_0x4b7626;for(var _0x4b93b1=_0x28cf8d>0x1?void 0x0:_0x28cf8d?k(_0x10dbdf,_0x20060d):_0x10dbdf,_0x49d0b1=_0x2bf61a[_0x50b607(0x1dc)]-0x1,_0x3fd1c4;_0x49d0b1>=0x0;_0x49d0b1--)(_0x3fd1c4=_0x2bf61a[_0x49d0b1])&&(_0x4b93b1=_0x3fd1c4(_0x4b93b1)||_0x4b93b1);return _0x4b93b1;},_=(_0x2fd021,_0x1dbdc0)=>(_0x5b129a,_0x1892e9)=>_0x1dbdc0(_0x5b129a,_0x1892e9,_0x2fd021);function X(_0x52db83,_0x2ce1fd){const _0x15734e=_0x4b7626,_0x3ae9eb=_0x52db83[_0x15734e(0x1ca)][0x0];return{..._0x2ce1fd,'id':_0x3ae9eb[_0x15734e(0x219)],'resolved':_0x52db83[_0x15734e(0x22a)]===0x1,'dT':D(_0x3ae9eb['createTimestamp']),'personId':_0x3ae9eb[_0x15734e(0x227)],'threadId':_0x3ae9eb[_0x15734e(0x220)]};}function ee(_0xa4dfa4,_0x2f4b5c,_0x53b562){const _0x10c849=_0x4b7626;var _0x57be1e,_0x788edc;if(((_0x788edc=(_0x57be1e=_0xa4dfa4==null?void 0x0:_0xa4dfa4[_0x10c849(0x1ca)])==null?void 0x0:_0x57be1e[_0x10c849(0x1dc)])!=null?_0x788edc:0x0)>0x0){const _0x19f506=(_0x251a1a,_0x5d4d83)=>({'id':_0x251a1a[_0x10c849(0x219)],'threadId':_0x251a1a[_0x10c849(0x220)],'dT':D(_0x251a1a['createTimestamp']),'personId':_0x251a1a['userId'],'resolved':_0xa4dfa4[_0x10c849(0x22a)]===I['Solved'],'unitId':_0x2f4b5c,'subUnitId':_0x53b562,'text':JSON[_0x10c849(0x1d7)](_0x251a1a['content']),'parentId':_0x5d4d83}),_0x3e697c=_0x19f506(_0xa4dfa4['replies'][0x0]);return{..._0x3e697c,'children':_0xa4dfa4[_0x10c849(0x1ca)]['slice'](0x1)[_0x10c849(0x209)](_0x3b1447=>_0x19f506(_0x3b1447,_0x3e697c['id']))};}return null;}let f=class{constructor(_0x350a9b,_0x5826ba,_0x5a16e5,_0x5ba7e8){const _0x53d8f7=_0x4b7626;this[_0x53d8f7(0x21c)]=_0x350a9b,this[_0x53d8f7(0x207)]=_0x5826ba,this[_0x53d8f7(0x226)]=_0x5a16e5,this[_0x53d8f7(0x1e5)]=_0x5ba7e8;}async[_0x4b7626(0x225)](_0x37d131){const _0x7bdec8=_0x4b7626;var _0x5d4451,_0x26b6d3;const {parentId:_0x381fe8,unitId:_0x16fa7e,text:_0x5341ea,threadId:_0x49e562}=_0x37d131,_0x4c41eb=(_0x26b6d3=(_0x5d4451=_0x5341ea[_0x7bdec8(0x1e4)])==null?void 0x0:_0x5d4451[_0x7bdec8(0x1c9)](_0x6a3a8d=>_0x6a3a8d[_0x7bdec8(0x1d9)]===_0x13fedf[_0x7bdec8(0x1d8)])[_0x7bdec8(0x209)](_0x56c7f9=>_0x56c7f9[_0x7bdec8(0x204)]))!=null?_0x26b6d3:[],_0x370fec=JSON[_0x7bdec8(0x1d3)](_0x5341ea),_0x143763=(await this[_0x7bdec8(0x226)][_0x7bdec8(0x21f)](_0x16fa7e))[_0x7bdec8(0x1ed)]();if(_0x381fe8){const _0x3a6515={'memberId':_0x143763,'unitId':_0x16fa7e,'content':_0x370fec,'mention':_0x4c41eb,'threadId':_0x49e562},_0x5e6a4e=(await this[_0x7bdec8(0x21c)][_0x7bdec8(0x229)](_0x7bdec8(0x1d2)+_0x16fa7e+_0x7bdec8(0x228),{'body':_0x3a6515}))[_0x7bdec8(0x1e7)][_0x7bdec8(0x1f1)];return{..._0x37d131,'id':_0x5e6a4e[_0x7bdec8(0x219)],'dT':_0xfc58d6(+_0x5e6a4e[_0x7bdec8(0x1dd)])[_0x7bdec8(0x20b)](_0x7bdec8(0x214)),'personId':_0x5e6a4e[_0x7bdec8(0x227)]};}else{const _0x3320d8={'memberId':_0x143763,'unitId':_0x16fa7e,'content':_0x370fec,'mention':_0x4c41eb},_0x369d1d=await this[_0x7bdec8(0x21c)][_0x7bdec8(0x229)](_0x7bdec8(0x1d2)+_0x16fa7e+_0x7bdec8(0x1ea),{'body':_0x3320d8});return X(_0x369d1d[_0x7bdec8(0x1e7)][_0x7bdec8(0x216)],_0x37d131);}}async[_0x4b7626(0x222)](_0xc30a5c){const _0x4bf881=_0x4b7626;var _0x59252e,_0x21dd53;const {text:_0x293230,unitId:_0x55a638}=_0xc30a5c,_0x15f32a=(_0x21dd53=(_0x59252e=_0x293230[_0x4bf881(0x1e4)])==null?void 0x0:_0x59252e[_0x4bf881(0x1c9)](_0x9e0cf0=>_0x9e0cf0[_0x4bf881(0x1d9)]===_0x13fedf[_0x4bf881(0x1d8)])[_0x4bf881(0x209)](_0x141c6d=>_0x141c6d['rangeId']))!=null?_0x21dd53:[],_0x538d99=JSON[_0x4bf881(0x1d3)](_0x293230),_0xb4cca3=_0xc30a5c[_0x4bf881(0x220)],_0x316f54=_0xc30a5c['id'],_0xece44d={'memberId':(await this[_0x4bf881(0x226)][_0x4bf881(0x21f)](_0x55a638))['getMemberID'](),'unitId':_0x55a638,'threadId':_0xb4cca3,'mention':_0x15f32a,'content':_0x538d99,'replyId':_0x316f54},_0x58392e=await this[_0x4bf881(0x21c)][_0x4bf881(0x229)](_0x4bf881(0x1d2)+_0x55a638+_0x4bf881(0x205),{'body':_0xece44d});return!_0x58392e[_0x4bf881(0x1e7)][_0x4bf881(0x1fa)]||_0x58392e['body'][_0x4bf881(0x1fa)][_0x4bf881(0x21e)]===0x1;}async[_0x4b7626(0x1f0)](_0x5a6a65){const _0x37ab32=_0x4b7626,{unitId:_0x13f311}=_0x5a6a65,_0x254c16=_0x5a6a65[_0x37ab32(0x220)],_0x5cc945={'memberId':this['_userService'][_0x37ab32(0x1f7)]()[_0x37ab32(0x1fd)],'unitId':_0x13f311,'threadId':_0x254c16,'solved':_0x5a6a65[_0x37ab32(0x221)]?I[_0x37ab32(0x21b)]:I[_0x37ab32(0x1cf)]},_0x54d624=await this[_0x37ab32(0x21c)][_0x37ab32(0x229)]('/universer-api/comment/unit/'+_0x13f311+_0x37ab32(0x1fb),{'body':_0x5cc945});return!_0x54d624['body']['error']||_0x54d624[_0x37ab32(0x1e7)][_0x37ab32(0x1fa)][_0x37ab32(0x21e)]===0x1;}async['deleteComment'](_0x4091cb,_0x369ecc,_0x5c438b,_0x1ffd6c){const _0x21811f=_0x4b7626,_0x176da9={'memberId':(await this['_sessionService'][_0x21811f(0x21f)](_0x4091cb))[_0x21811f(0x1ed)](),'threadId':_0x5c438b,'replyId':_0x1ffd6c,'unitId':_0x4091cb},_0x435232=await this['_httpService'][_0x21811f(0x229)](_0x21811f(0x1d2)+_0x4091cb+'/delete',{'body':_0x176da9});return!_0x435232[_0x21811f(0x1e7)][_0x21811f(0x1fa)]||_0x435232[_0x21811f(0x1e7)][_0x21811f(0x1fa)][_0x21811f(0x21e)]===0x1;}async[_0x4b7626(0x20d)](_0x3d0248,_0x1981f6,_0x3e57f5){const _0x26c12d=_0x4b7626,_0x579277={'unitId':_0x3d0248,'threadId':_0x3e57f5},_0x529404=await this[_0x26c12d(0x21c)]['post'](_0x26c12d(0x1d2)+_0x3d0248+'/list',{'body':_0x579277}),_0xb12dde=_0x3e57f5[_0x26c12d(0x209)](_0x1ab353=>ee(_0x529404[_0x26c12d(0x1e7)]['comments'][_0x1ab353],_0x3d0248,_0x1981f6))[_0x26c12d(0x1c9)](Boolean);return Object[_0x26c12d(0x1cc)](_0x529404[_0x26c12d(0x1e7)][_0x26c12d(0x210)])['forEach'](_0x2e7b55=>{const _0x508580=_0x26c12d;this[_0x508580(0x207)][_0x508580(0x1ee)](_0x2e7b55);}),_0xb12dde;}[_0x4b7626(0x1df)](_0x54ec3e){const _0x24bfad=_0x4b7626;return{'id':_0x54ec3e['id'],'threadId':_0x54ec3e[_0x24bfad(0x220)],'ref':_0x54ec3e['ref']};}};f=Q([_(0x0,_0x1820ac(_0x11101f)),_(0x1,_0x1820ac(_0x164e15)),_(0x2,_0x1820ac(_0x5c999b)),_(0x3,_0x1820ac(_0x4bcb98))],f);var re=Object[_0x4b7626(0x1f2)],te=(_0x1b6d49,_0x51a546,_0x47bcc9,_0x565eae)=>{const _0x14f48d=_0x4b7626;for(var _0x39973a=_0x565eae>0x1?void 0x0:_0x565eae?re(_0x51a546,_0x47bcc9):_0x51a546,_0x13c70c=_0x1b6d49[_0x14f48d(0x1dc)]-0x1,_0x321e62;_0x13c70c>=0x0;_0x13c70c--)(_0x321e62=_0x1b6d49[_0x13c70c])&&(_0x39973a=_0x321e62(_0x39973a)||_0x39973a);return _0x39973a;},N=(_0x2bfd66,_0x2dea7b)=>(_0x3f97a3,_0x1f76d9)=>_0x2dea7b(_0x3f97a3,_0x1f76d9,_0x2bfd66);let g=class extends _0x2e6166{constructor(_0x39ca7f,_0x4a58d1){const _0x5eeeda=_0x4b7626;super(),this[_0x5eeeda(0x1f6)]=_0x39ca7f,this[_0x5eeeda(0x1f8)]=_0x4a58d1,this[_0x5eeeda(0x1d0)]();}[_0x4b7626(0x1d0)](){const _0x406515=_0x4b7626;this[_0x406515(0x1f6)][_0x406515(0x1eb)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x406515(0x1f3)]=!0x1;}};g=te([N(0x0,_0x1b5895),N(0x1,_0x1820ac(f))],g);var se=Object[_0x4b7626(0x1e8)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x133e14,_0x5d8c00,_0xcdb738)=>_0x5d8c00 in _0x133e14?se(_0x133e14,_0x5d8c00,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xcdb738}):_0x133e14[_0x5d8c00]=_0xcdb738,ie=(_0x428a92,_0x256d5b,_0x58c53c,_0x46b1e7)=>{const _0x1864b9=_0x4b7626;for(var _0x3e5a8e=_0x46b1e7>0x1?void 0x0:_0x46b1e7?oe(_0x256d5b,_0x58c53c):_0x256d5b,_0x231da6=_0x428a92[_0x1864b9(0x1dc)]-0x1,_0x56dcce;_0x231da6>=0x0;_0x231da6--)(_0x56dcce=_0x428a92[_0x231da6])&&(_0x3e5a8e=_0x56dcce(_0x3e5a8e)||_0x3e5a8e);return _0x3e5a8e;},w=(_0x3a9755,_0x1a22e7)=>(_0x1d9a23,_0x443f2c)=>_0x1a22e7(_0x1d9a23,_0x443f2c,_0x3a9755),$=(_0x2b05ab,_0x4751fa,_0x4818f4)=>ne(_0x2b05ab,typeof _0x4751fa!=_0x4b7626(0x20f)?_0x4751fa+'':_0x4751fa,_0x4818f4);function _0x2c2f(_0x41995f,_0x568760){const _0x16a6d9=_0x16a6();return _0x2c2f=function(_0x2c2fee,_0x464aff){_0x2c2fee=_0x2c2fee-0x1c9;let _0x2aab00=_0x16a6d9[_0x2c2fee];return _0x2aab00;},_0x2c2f(_0x41995f,_0x568760);}let b=class extends _0x53cea8{constructor(_0xfeb84c=M,_0x40381e,_0x36610e){const _0xcd7a76=_0x4b7626;super(),this['_config']=_0xfeb84c,this[_0xcd7a76(0x1e5)]=_0x40381e,this[_0xcd7a76(0x1f4)]=_0x36610e;const {..._0x35147f}=_0x23c1a1({},M,this[_0xcd7a76(0x206)]);this[_0xcd7a76(0x1f4)]['setConfig'](z,_0x35147f);}[_0x4b7626(0x217)](){const _0x36f2f6=_0x4b7626;[[f],[g],[S]][_0x36f2f6(0x20a)](_0x4cc6e9=>{const _0x3880f7=_0x36f2f6;this[_0x3880f7(0x1e5)][_0x3880f7(0x1de)](_0x4cc6e9);});}[_0x4b7626(0x21d)](){const _0x2307c9=_0x4b7626;this[_0x2307c9(0x1e5)]['get'](g),this['_injector'][_0x2307c9(0x1fc)](S);}};$(b,_0x4b7626(0x1d6),W),$(b,_0x4b7626(0x201),_0x3dc0f3['UNIVER_UNKNOWN']),b=ie([_0xa05568(_0x2fef6f,_0x53c880,_0x3306fe),w(0x1,_0x1820ac(_0x4bcb98)),w(0x2,_0x3e734a)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x37da(_0x80db3f,_0xaa4555){const _0x3674f7=_0x3674();return _0x37da=function(_0x37dafd,_0x2eefd2){_0x37dafd=_0x37dafd-0x19f;let _0x1f82f7=_0x3674f7[_0x37dafd];return _0x1f82f7;},_0x37da(_0x80db3f,_0xaa4555);}function _0x3674(){const _0x519256=['IThreadCommentDataSourceService','Solve','stringify','comment','Plugin','map','toStringTag','get','_threadCommentDataSource','Edit','personId','userId','exports','IConfigService','dayjs','UniverCollaborationClientPlugin','Reply','Inject','_initDataSource','resolveComment','post','amd','@univerjs-pro/license','error','updateComment','/delete','130614HnWLla','replyId','_threadCommentDataSourceService','/universer-api/user/list','@univerjs/network','UserManagerService','merge','DependentOn','rxjs','CustomRangeType','_httpService','type','saveCommentToSnapshot','values','_sessionService','COMMENT','Add','forEach','onReady','CommentService','UNIVER_UNKNOWN','getUnit','425120JOPPvH','/add','getMemberID','UniverInstanceType','@univerjs/core','UniverCore','user','length','UNRECOGNIZED','/reply','slice','Injector','UniverThreadComment','find','Solved','format','UniverLicensePlugin','ThreadCommentModel','code','_threadCommentModel','customRanges','313500bTAkhd','1771987WEIFOS','createTimestamp','pipe','OpenOrReOpen','solved','addUser','disposeWithMe','content','UniverThreadCommentUIPlugin','Unknown','@univerjs/thread-comment-ui','@univerjs/thread-comment','_init','addComment','bufferTime','_injector','getOwnPropertyDescriptor','/universer-api/comment/unit/','add','filter','263325wiooLA','userID','parse','UniverThreadCommentDataSourcePlugin','469266ScQHQc','symbol','dataSource','threadId','UniverProLicense','body','listComments','YYYY/MM/DD\x20HH:mm','rangeType','_userService','/list','Disposable','rangeId','_commentService','parentId','UniverNetwork','subscribe','ref','resolved','_config','HTTPService','unitId','3348124odCTkX','users','requireSession','UniverThreadCommentUi','replies','deleteComment','defineProperty','Module','_configService','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs-pro/collaboration-client','/edit','syncUpdateMutationToColla','Delete'];_0x3674=function(){return _0x519256;};return _0x3674();}(function(_0x212ea2,_0x22cf5c){const _0x18bf24=_0x37da,_0x420165=_0x212ea2();while(!![]){try{const _0x3d144b=-parseInt(_0x18bf24(0x1ba))/0x1+-parseInt(_0x18bf24(0x1d3))/0x2+-parseInt(_0x18bf24(0x1cf))/0x3+parseInt(_0x18bf24(0x1e9))/0x4+parseInt(_0x18bf24(0x1a5))/0x5+-parseInt(_0x18bf24(0x212))/0x6+parseInt(_0x18bf24(0x1bb))/0x7;if(_0x3d144b===_0x22cf5c)break;else _0x420165['push'](_0x420165['shift']());}catch(_0x1e6335){_0x420165['push'](_0x420165['shift']());}}}(_0x3674,0x7e58f),function(_0x1f741e,_0x2718c0){const _0x477e35=_0x37da;typeof exports=='object'&&typeof module<'u'?_0x2718c0(exports,require(_0x477e35(0x1f4)),require(_0x477e35(0x20e)),require(_0x477e35(0x1a9)),require(_0x477e35(0x1c5)),require(_0x477e35(0x1c6)),require(_0x477e35(0x21a)),require('@univerjs/network')):typeof define=='function'&&define[_0x477e35(0x20d)]?define([_0x477e35(0x204),_0x477e35(0x1f4),_0x477e35(0x20e),_0x477e35(0x1a9),_0x477e35(0x1c5),_0x477e35(0x1c6),_0x477e35(0x21a),_0x477e35(0x216)],_0x2718c0):(_0x1f741e=typeof globalThis<'u'?globalThis:_0x1f741e||self,_0x2718c0(_0x1f741e['UniverProThreadCommentDatasource']={},_0x1f741e['UniverProCollaborationClient'],_0x1f741e[_0x477e35(0x1d7)],_0x1f741e[_0x477e35(0x1aa)],_0x1f741e[_0x477e35(0x1ec)],_0x1f741e[_0x477e35(0x1b1)],_0x1f741e['rxjs'],_0x1f741e[_0x477e35(0x1e2)]));}(this,function(_0x5b5f3f,_0x2bbcf7,_0x3057e4,_0x1489c4,_0x37cbe5,_0x3008b3,_0x21d5eb,_0x126286){'use strict';const _0x2a2473=_0x37da;const _0x366665=_0x2a2473(0x1f3);var _0x4f9904=(_0x4cf9a5=>(_0x4cf9a5[_0x4cf9a5['OpenOrReOpen']=0x0]=_0x2a2473(0x1be),_0x4cf9a5[_0x4cf9a5['Solved']=0x1]='Solved',_0x4cf9a5[_0x4cf9a5[_0x2a2473(0x1ad)]=-0x1]=_0x2a2473(0x1ad),_0x4cf9a5))(_0x4f9904||{}),_0x6bcd17=(_0x495b56=>(_0x495b56[_0x495b56[_0x2a2473(0x1c4)]=0x0]=_0x2a2473(0x1c4),_0x495b56[_0x495b56['Add']=0x1]=_0x2a2473(0x19f),_0x495b56[_0x495b56[_0x2a2473(0x208)]=0x2]='Reply',_0x495b56[_0x495b56[_0x2a2473(0x201)]=0x3]=_0x2a2473(0x201),_0x495b56[_0x495b56[_0x2a2473(0x1f7)]=0x4]=_0x2a2473(0x1f7),_0x495b56[_0x495b56['Solve']=0x5]='Solve',_0x495b56[_0x495b56['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x495b56))(_0x6bcd17||{});const _0x4eef73=_0x1bd6c1=>_0x1489c4[_0x2a2473(0x206)](new Date(+_0x1bd6c1))['format']('YYYY/MM/DD\x20HH:mm'),_0x1d0b6c=async(_0x28c774,_0x40b12e)=>{const _0x55cc7d=_0x2a2473,_0x1ac15a=_0x28c774['get'](_0x1489c4[_0x55cc7d(0x217)]),_0x31d287=_0x28c774['get'](_0x126286[_0x55cc7d(0x1e7)]);_0x40b12e[_0x55cc7d(0x1a0)](_0x89b6b5=>{_0x1ac15a['getUser'](_0x89b6b5)&&_0x40b12e['delete'](_0x89b6b5);}),_0x40b12e['size']&&(await _0x31d287[_0x55cc7d(0x1ff)](_0x55cc7d(0x215),{'params':{'userIDs':[..._0x40b12e]}}))[_0x55cc7d(0x1d8)][_0x55cc7d(0x1ea)][_0x55cc7d(0x1a0)](_0x4ae922=>{const _0x3f89d8=_0x55cc7d;_0x4ae922&&_0x1ac15a[_0x3f89d8(0x1c0)](_0x4ae922);});};var _0x29ffc9=Object['getOwnPropertyDescriptor'],_0x2e5ae5=(_0x3c3732,_0x59dffd,_0x51211f,_0x20b7f2)=>{const _0x10871b=_0x2a2473;for(var _0x5c8b2c=_0x20b7f2>0x1?void 0x0:_0x20b7f2?_0x29ffc9(_0x59dffd,_0x51211f):_0x59dffd,_0x23e42f=_0x3c3732[_0x10871b(0x1ac)]-0x1,_0x72966a;_0x23e42f>=0x0;_0x23e42f--)(_0x72966a=_0x3c3732[_0x23e42f])&&(_0x5c8b2c=_0x72966a(_0x5c8b2c)||_0x5c8b2c);return _0x5c8b2c;},_0xdc392c=(_0x572491,_0x433cc0)=>(_0x271434,_0x538feb)=>_0x433cc0(_0x271434,_0x538feb,_0x572491);let _0x46f606=class extends _0x1489c4[_0x2a2473(0x1de)]{constructor(_0xeb5b06,_0x55c12c,_0x1a2331,_0x34f60b){const _0xdec1d=_0x2a2473;super(),this[_0xdec1d(0x1e0)]=_0xeb5b06,this[_0xdec1d(0x1b8)]=_0x55c12c,this[_0xdec1d(0x1dc)]=_0x1a2331,this[_0xdec1d(0x1ca)]=_0x34f60b,this[_0xdec1d(0x1c7)](),this['_initUserSync']();}['_initUserSync'](){const _0x748984=_0x2a2473;this[_0x748984(0x1c1)](this['_threadCommentModel']['commentUpdate$'][_0x748984(0x1bd)](_0x21d5eb[_0x748984(0x1c9)](0x10))[_0x748984(0x1e3)](_0xf2605e=>{const _0x53adf7=_0x748984,_0x5caf22=new Set();_0xf2605e[_0x53adf7(0x1a0)](_0x90158e=>{const _0x84979c=_0x53adf7;switch(_0x90158e['type']){case _0x84979c(0x1cd):{const _0x21bebf=_0x90158e[_0x84979c(0x1f2)][_0x84979c(0x202)];_0x5caf22[_0x84979c(0x1cd)](_0x21bebf);break;}}}),_0x1d0b6c(this[_0x53adf7(0x1ca)],_0x5caf22);}));}[_0x2a2473(0x1c7)](){const _0x3c599d=_0x2a2473;this[_0x3c599d(0x1c1)](this[_0x3c599d(0x1e0)]['commentUpdate$'][_0x3c599d(0x1e3)](async _0x2e45c7=>{const _0xa65795=_0x3c599d;var _0xb73c23,_0x203001,_0x5606ad,_0x19f058;const _0x1b6582=(_0xb73c23=this[_0xa65795(0x1b8)][_0xa65795(0x1a4)](_0x2e45c7['unitId'])[_0xa65795(0x1b2)](_0x1d9538=>_0x1d9538['threadId']===_0x2e45c7[_0xa65795(0x1d6)]))==null?void 0x0:_0xb73c23['root'];if(!_0x1b6582)return;const {unitId:_0x506de8,subUnitId:_0x3d2d33}=_0x1b6582;switch(_0x2e45c7[_0xa65795(0x1ab)]&&this[_0xa65795(0x1dc)]['addUser'](_0x2e45c7[_0xa65795(0x1ab)]),_0x2e45c7[_0xa65795(0x21d)]){case _0x6bcd17[_0xa65795(0x19f)]:break;case _0x6bcd17[_0xa65795(0x208)]:{this[_0xa65795(0x1b8)][_0xa65795(0x1c8)](_0x506de8,_0x3d2d33,{'unitId':_0x506de8,'subUnitId':_0x3d2d33,'ref':'','id':_0x2e45c7['replyId'],'dT':_0x4eef73(+_0x2e45c7[_0xa65795(0x1bc)]),'threadId':_0x2e45c7[_0xa65795(0x1d6)],'personId':(_0x5606ad=(_0x203001=_0x2e45c7['user'])==null?void 0x0:_0x203001[_0xa65795(0x1d0)])!=null?_0x5606ad:_0x2e45c7['userId'],'text':JSON[_0xa65795(0x1d1)](_0x2e45c7[_0xa65795(0x1c2)]),'parentId':_0x1b6582['id']});break;}case _0x6bcd17[_0xa65795(0x1f7)]:{const _0x4ec1fb=this['_threadCommentModel']['getComment'](_0x506de8,_0x3d2d33,_0x2e45c7['replyId']);_0x4ec1fb&&_0x4ec1fb[_0xa65795(0x1e1)]&&this[_0xa65795(0x1b8)]['deleteComment'](_0x506de8,_0x3d2d33,_0x2e45c7['replyId']);break;}case _0x6bcd17[_0xa65795(0x201)]:{this[_0xa65795(0x1b8)][_0xa65795(0x210)](_0x506de8,_0x3d2d33,{'commentId':_0x2e45c7['replyId'],'text':JSON['parse'](_0x2e45c7[_0xa65795(0x1c2)])});break;}case _0x6bcd17[_0xa65795(0x1f9)]:{const _0x3f3dad=(_0x19f058=this['_threadCommentModel'][_0xa65795(0x1a4)](_0x2e45c7[_0xa65795(0x1e8)])[_0xa65795(0x1b2)](_0x276535=>_0x276535[_0xa65795(0x1d6)]===_0x2e45c7['threadId']))==null?void 0x0:_0x19f058['root'];_0x3f3dad&&this['_threadCommentModel'][_0xa65795(0x20b)](_0x506de8,_0x3d2d33,_0x3f3dad['id'],_0x2e45c7['solved']===_0x4f9904['Solved']);break;}}}));}};_0x46f606=_0x2e5ae5([_0xdc392c(0x0,_0x1489c4[_0x2a2473(0x209)](_0x2bbcf7[_0x2a2473(0x1a2)])),_0xdc392c(0x1,_0x1489c4['Inject'](_0x3008b3[_0x2a2473(0x1b6)])),_0xdc392c(0x2,_0x1489c4[_0x2a2473(0x209)](_0x1489c4[_0x2a2473(0x217)])),_0xdc392c(0x3,_0x1489c4['Inject'](_0x1489c4[_0x2a2473(0x1b0)]))],_0x46f606);const _0x227be3='thread-comment-data-source.config',_0x247007={};var _0x4038ea=Object[_0x2a2473(0x1cb)],_0xc92523=(_0x3af91f,_0x117a1e,_0x4040fe,_0x4113fe)=>{for(var _0x1705a7=_0x4113fe>0x1?void 0x0:_0x4113fe?_0x4038ea(_0x117a1e,_0x4040fe):_0x117a1e,_0x57dabf=_0x3af91f['length']-0x1,_0x206032;_0x57dabf>=0x0;_0x57dabf--)(_0x206032=_0x3af91f[_0x57dabf])&&(_0x1705a7=_0x206032(_0x1705a7)||_0x1705a7);return _0x1705a7;},_0x4dcd8e=(_0x4fa435,_0x25dfdf)=>(_0x106a75,_0xc26e1c)=>_0x25dfdf(_0x106a75,_0xc26e1c,_0x4fa435);function _0x2c3cd3(_0x2c5714,_0x54b7cf){const _0x29f58b=_0x2a2473,_0x231c44=_0x2c5714['replies'][0x0];return{..._0x54b7cf,'id':_0x231c44['replyId'],'resolved':_0x2c5714[_0x29f58b(0x1bf)]===0x1,'dT':_0x4eef73(_0x231c44['createTimestamp']),'personId':_0x231c44['userId'],'threadId':_0x231c44['threadId']};}function _0x373eb9(_0x3200d0,_0x5ca5bd,_0x4b6724){const _0x4a4bac=_0x2a2473;var _0x4f92d1,_0x2b0906;if(((_0x2b0906=(_0x4f92d1=_0x3200d0==null?void 0x0:_0x3200d0[_0x4a4bac(0x1ed)])==null?void 0x0:_0x4f92d1[_0x4a4bac(0x1ac)])!=null?_0x2b0906:0x0)>0x0){const _0x52c5dd=(_0x3d14f5,_0x1e83d5)=>({'id':_0x3d14f5[_0x4a4bac(0x213)],'threadId':_0x3d14f5[_0x4a4bac(0x1d6)],'dT':_0x4eef73(_0x3d14f5[_0x4a4bac(0x1bc)]),'personId':_0x3d14f5[_0x4a4bac(0x203)],'resolved':_0x3200d0[_0x4a4bac(0x1bf)]===_0x4f9904[_0x4a4bac(0x1b3)],'unitId':_0x5ca5bd,'subUnitId':_0x4b6724,'text':JSON[_0x4a4bac(0x1d1)](_0x3d14f5['content']),'parentId':_0x1e83d5}),_0x481d6b=_0x52c5dd(_0x3200d0[_0x4a4bac(0x1ed)][0x0]);return{..._0x481d6b,'children':_0x3200d0[_0x4a4bac(0x1ed)][_0x4a4bac(0x1af)](0x1)[_0x4a4bac(0x1fd)](_0x51e985=>_0x52c5dd(_0x51e985,_0x481d6b['id']))};}return null;}let _0x102993=class{constructor(_0x4a2f2e,_0x2b1c98,_0x103a15,_0x428056){const _0x419c8d=_0x2a2473;this[_0x419c8d(0x21c)]=_0x4a2f2e,this['_userService']=_0x2b1c98,this[_0x419c8d(0x220)]=_0x103a15,this[_0x419c8d(0x1ca)]=_0x428056;}async[_0x2a2473(0x1c8)](_0x527074){const _0xcf14f0=_0x2a2473;var _0x1d0cab,_0x36152e;const {parentId:_0x3810eb,unitId:_0x4a201f,text:_0x28e235,threadId:_0xb2f580}=_0x527074,_0x345729=(_0x36152e=(_0x1d0cab=_0x28e235['customRanges'])==null?void 0x0:_0x1d0cab[_0xcf14f0(0x1ce)](_0x247767=>_0x247767[_0xcf14f0(0x1db)]===_0x1489c4['CustomRangeType'][_0xcf14f0(0x221)])['map'](_0x2ce5de=>_0x2ce5de[_0xcf14f0(0x1df)]))!=null?_0x36152e:[],_0x31bc91=JSON[_0xcf14f0(0x1fa)](_0x28e235),_0x1028a3=(await this['_sessionService']['requireSession'](_0x4a201f))[_0xcf14f0(0x1a7)]();if(_0x3810eb){const _0x516c67={'memberId':_0x1028a3,'unitId':_0x4a201f,'content':_0x31bc91,'mention':_0x345729,'threadId':_0xb2f580},_0x4bdd24=(await this[_0xcf14f0(0x21c)][_0xcf14f0(0x20c)](_0xcf14f0(0x1cc)+_0x4a201f+_0xcf14f0(0x1ae),{'body':_0x516c67}))[_0xcf14f0(0x1d8)]['reply'];return{..._0x527074,'id':_0x4bdd24['replyId'],'dT':_0x1489c4[_0xcf14f0(0x206)](+_0x4bdd24[_0xcf14f0(0x1bc)])[_0xcf14f0(0x1b4)](_0xcf14f0(0x1da)),'personId':_0x4bdd24[_0xcf14f0(0x203)]};}else{const _0x2b470b={'memberId':_0x1028a3,'unitId':_0x4a201f,'content':_0x31bc91,'mention':_0x345729},_0xdd9003=await this[_0xcf14f0(0x21c)]['post']('/universer-api/comment/unit/'+_0x4a201f+_0xcf14f0(0x1a6),{'body':_0x2b470b});return _0x2c3cd3(_0xdd9003[_0xcf14f0(0x1d8)][_0xcf14f0(0x1fb)],_0x527074);}}async['updateComment'](_0x41b375){const _0x13e07c=_0x2a2473;var _0x5abc78,_0x3a0387;const {text:_0x132de2,unitId:_0x4178fe}=_0x41b375,_0xfade61=(_0x3a0387=(_0x5abc78=_0x132de2[_0x13e07c(0x1b9)])==null?void 0x0:_0x5abc78[_0x13e07c(0x1ce)](_0x5a7b06=>_0x5a7b06[_0x13e07c(0x1db)]===_0x1489c4[_0x13e07c(0x21b)][_0x13e07c(0x221)])[_0x13e07c(0x1fd)](_0x2704be=>_0x2704be['rangeId']))!=null?_0x3a0387:[],_0x3cbc55=JSON[_0x13e07c(0x1fa)](_0x132de2),_0x3daa17=_0x41b375[_0x13e07c(0x1d6)],_0x51804a=_0x41b375['id'],_0x3d5903={'memberId':(await this[_0x13e07c(0x220)]['requireSession'](_0x4178fe))[_0x13e07c(0x1a7)](),'unitId':_0x4178fe,'threadId':_0x3daa17,'mention':_0xfade61,'content':_0x3cbc55,'replyId':_0x51804a},_0x2dbc7b=await this['_httpService'][_0x13e07c(0x20c)](_0x13e07c(0x1cc)+_0x4178fe+_0x13e07c(0x1f5),{'body':_0x3d5903});return!_0x2dbc7b[_0x13e07c(0x1d8)][_0x13e07c(0x20f)]||_0x2dbc7b[_0x13e07c(0x1d8)][_0x13e07c(0x20f)][_0x13e07c(0x1b7)]===0x1;}async[_0x2a2473(0x20b)](_0x28c0e3){const _0x1fa499=_0x2a2473,{unitId:_0x15ebcc}=_0x28c0e3,_0x5a1080=_0x28c0e3[_0x1fa499(0x1d6)],_0x240a99={'memberId':this[_0x1fa499(0x1dc)]['getCurrentUser']()[_0x1fa499(0x1d0)],'unitId':_0x15ebcc,'threadId':_0x5a1080,'solved':_0x28c0e3[_0x1fa499(0x1e5)]?_0x4f9904[_0x1fa499(0x1b3)]:_0x4f9904[_0x1fa499(0x1be)]},_0x38d3c1=await this['_httpService'][_0x1fa499(0x20c)](_0x1fa499(0x1cc)+_0x15ebcc+'/solved',{'body':_0x240a99});return!_0x38d3c1[_0x1fa499(0x1d8)][_0x1fa499(0x20f)]||_0x38d3c1['body'][_0x1fa499(0x20f)][_0x1fa499(0x1b7)]===0x1;}async[_0x2a2473(0x1ee)](_0x4afffe,_0x344a20,_0x15cb89,_0xaffa90){const _0x4ea657=_0x2a2473,_0x2f36a6={'memberId':(await this['_sessionService'][_0x4ea657(0x1eb)](_0x4afffe))[_0x4ea657(0x1a7)](),'threadId':_0x15cb89,'replyId':_0xaffa90,'unitId':_0x4afffe},_0x210aae=await this[_0x4ea657(0x21c)][_0x4ea657(0x20c)](_0x4ea657(0x1cc)+_0x4afffe+_0x4ea657(0x211),{'body':_0x2f36a6});return!_0x210aae[_0x4ea657(0x1d8)][_0x4ea657(0x20f)]||_0x210aae[_0x4ea657(0x1d8)][_0x4ea657(0x20f)]['code']===0x1;}async[_0x2a2473(0x1d9)](_0x33f36e,_0x445368,_0x506e41){const _0x1aded7=_0x2a2473,_0x42d6a8={'unitId':_0x33f36e,'threadId':_0x506e41},_0x524454=await this[_0x1aded7(0x21c)]['post']('/universer-api/comment/unit/'+_0x33f36e+_0x1aded7(0x1dd),{'body':_0x42d6a8}),_0x4f6a58=_0x506e41[_0x1aded7(0x1fd)](_0xb80c49=>_0x373eb9(_0x524454['body']['comments'][_0xb80c49],_0x33f36e,_0x445368))[_0x1aded7(0x1ce)](Boolean);return Object[_0x1aded7(0x21f)](_0x524454[_0x1aded7(0x1d8)][_0x1aded7(0x1ea)])[_0x1aded7(0x1a0)](_0x2457ec=>{this['_userService']['addUser'](_0x2457ec);}),_0x4f6a58;}[_0x2a2473(0x21e)](_0x24f30b){const _0x1733c2=_0x2a2473;return{'id':_0x24f30b['id'],'threadId':_0x24f30b[_0x1733c2(0x1d6)],'ref':_0x24f30b[_0x1733c2(0x1e4)]};}};_0x102993=_0xc92523([_0x4dcd8e(0x0,_0x1489c4['Inject'](_0x126286[_0x2a2473(0x1e7)])),_0x4dcd8e(0x1,_0x1489c4[_0x2a2473(0x209)](_0x1489c4[_0x2a2473(0x217)])),_0x4dcd8e(0x2,_0x1489c4['Inject'](_0x2bbcf7['CollaborationSessionService'])),_0x4dcd8e(0x3,_0x1489c4['Inject'](_0x1489c4['Injector']))],_0x102993);var _0x485ad3=Object[_0x2a2473(0x1cb)],_0x5c1e53=(_0x4db725,_0x52fd18,_0x12cbfb,_0x5e4a43)=>{const _0x193511=_0x2a2473;for(var _0xc73553=_0x5e4a43>0x1?void 0x0:_0x5e4a43?_0x485ad3(_0x52fd18,_0x12cbfb):_0x52fd18,_0xdce475=_0x4db725[_0x193511(0x1ac)]-0x1,_0x4fc099;_0xdce475>=0x0;_0xdce475--)(_0x4fc099=_0x4db725[_0xdce475])&&(_0xc73553=_0x4fc099(_0xc73553)||_0xc73553);return _0xc73553;},_0x3bb396=(_0x5aaab2,_0x1e7584)=>(_0x2e2f00,_0xa46db3)=>_0x1e7584(_0x2e2f00,_0xa46db3,_0x5aaab2);let _0x307c8d=class extends _0x1489c4[_0x2a2473(0x1de)]{constructor(_0x37101d,_0x36eb13){const _0x16d2e4=_0x2a2473;super(),this[_0x16d2e4(0x214)]=_0x37101d,this[_0x16d2e4(0x200)]=_0x36eb13,this[_0x16d2e4(0x20a)]();}['_initDataSource'](){const _0x2e8b5d=_0x2a2473;this[_0x2e8b5d(0x214)][_0x2e8b5d(0x1d5)]=this[_0x2e8b5d(0x200)],this[_0x2e8b5d(0x214)][_0x2e8b5d(0x1f6)]=!0x1;}};_0x307c8d=_0x5c1e53([_0x3bb396(0x0,_0x3008b3[_0x2a2473(0x1f8)]),_0x3bb396(0x1,_0x1489c4[_0x2a2473(0x209)](_0x102993))],_0x307c8d);var _0x573648=Object[_0x2a2473(0x1ef)],_0x169acb=Object[_0x2a2473(0x1cb)],_0x4964d5=(_0x37a19b,_0x2e5ec4,_0x2b27ea)=>_0x2e5ec4 in _0x37a19b?_0x573648(_0x37a19b,_0x2e5ec4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b27ea}):_0x37a19b[_0x2e5ec4]=_0x2b27ea,_0xb99fee=(_0x5d0d00,_0x5d374e,_0x456541,_0x422209)=>{const _0xc94b9c=_0x2a2473;for(var _0x1b7c5d=_0x422209>0x1?void 0x0:_0x422209?_0x169acb(_0x5d374e,_0x456541):_0x5d374e,_0x378c02=_0x5d0d00[_0xc94b9c(0x1ac)]-0x1,_0x4a28bd;_0x378c02>=0x0;_0x378c02--)(_0x4a28bd=_0x5d0d00[_0x378c02])&&(_0x1b7c5d=_0x4a28bd(_0x1b7c5d)||_0x1b7c5d);return _0x1b7c5d;},_0x6043e1=(_0x1bb395,_0x2f2ecb)=>(_0x9dc5c3,_0x91f94)=>_0x2f2ecb(_0x9dc5c3,_0x91f94,_0x1bb395),_0x16fa90=(_0x46bd7f,_0x41271e,_0x265f04)=>_0x4964d5(_0x46bd7f,typeof _0x41271e!=_0x2a2473(0x1d4)?_0x41271e+'':_0x41271e,_0x265f04);_0x5b5f3f[_0x2a2473(0x1d2)]=class extends _0x1489c4[_0x2a2473(0x1fc)]{constructor(_0x30f31f=_0x247007,_0x3d230e,_0x55088f){const _0x2e35b9=_0x2a2473;super(),this['_config']=_0x30f31f,this[_0x2e35b9(0x1ca)]=_0x3d230e,this[_0x2e35b9(0x1f1)]=_0x55088f;const {..._0x44c26f}=_0x1489c4[_0x2e35b9(0x218)]({},_0x247007,this[_0x2e35b9(0x1e6)]);this[_0x2e35b9(0x1f1)]['setConfig'](_0x227be3,_0x44c26f);}['onStarting'](){[[_0x102993],[_0x307c8d],[_0x46f606]]['forEach'](_0xf6e540=>{const _0x38d385=_0x37da;this[_0x38d385(0x1ca)][_0x38d385(0x1cd)](_0xf6e540);});}[_0x2a2473(0x1a1)](){const _0x6c051c=_0x2a2473;this[_0x6c051c(0x1ca)][_0x6c051c(0x1ff)](_0x307c8d),this['_injector'][_0x6c051c(0x1ff)](_0x46f606);}},_0x16fa90(_0x5b5f3f[_0x2a2473(0x1d2)],'pluginName',_0x366665),_0x16fa90(_0x5b5f3f[_0x2a2473(0x1d2)],_0x2a2473(0x21d),_0x1489c4[_0x2a2473(0x1a8)][_0x2a2473(0x1a3)]),_0x5b5f3f['UniverThreadCommentDataSourcePlugin']=_0xb99fee([_0x1489c4[_0x2a2473(0x219)](_0x37cbe5[_0x2a2473(0x1c3)],_0x2bbcf7[_0x2a2473(0x207)],_0x3057e4[_0x2a2473(0x1b5)]),_0x6043e1(0x1,_0x1489c4[_0x2a2473(0x209)](_0x1489c4['Injector'])),_0x6043e1(0x2,_0x1489c4[_0x2a2473(0x205)])],_0x5b5f3f['UniverThreadCommentDataSourcePlugin']),Object[_0x2a2473(0x1ef)](_0x5b5f3f,Symbol[_0x2a2473(0x1fe)],{'value':_0x2a2473(0x1f0)});}));
1
+ function _0x30ce(_0x3e106a,_0x29e464){const _0x3dfda2=_0x3dfd();return _0x30ce=function(_0x30cec2,_0x1cc5ff){_0x30cec2=_0x30cec2-0xac;let _0x12a9f9=_0x3dfda2[_0x30cec2];return _0x12a9f9;},_0x30ce(_0x3e106a,_0x29e464);}function _0x3dfd(){const _0x1d343f=['UniverThreadCommentDataSourcePlugin','COMMENT','935784KcYThn','UserManagerService','parse','resolveComment','get','content','listComments','thread-comment-data-source.config','pipe','forEach','Solved','defineProperty','_config','@univerjs/network','replies','Reply','type','length','stringify','Edit','error','11HUcolq','setConfig','rangeId','createTimestamp','addUser','userId','Injector','_userService','root','getUnit','UniverLicensePlugin','CommentService','_threadCommentModel','/delete','20aQRnVT','12417zsbLPs','onReady','code','user','Add','solved','/universer-api/comment/unit/','OpenOrReOpen','personId','UniverCollaborationClientPlugin','2549128ltXIBc','_configService','/solved','resolved','dayjs','4100470MNcRXg','14932luzAHM','getOwnPropertyDescriptor','UniverThreadCommentUIPlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1715WxGzMm','Inject','UniverProThreadCommentDatasource','Solve','deleteComment','_init','amd','addComment','unitId','commentUpdate$','reply','2561811NNWwtw','@univerjs/thread-comment','syncUpdateMutationToColla','@univerjs/core','dataSource','requireSession','_threadCommentDataSource','disposeWithMe','pluginName','_sessionService','getUser','exports','post','userID','slice','Module','toStringTag','add','/list','customRanges','UniverCore','subscribe','function','CustomRangeType','HTTPService','ref','threadId','symbol','YYYY/MM/DD\x20HH:mm','body','UniverProCollaborationClient','@univerjs/thread-comment-ui','/universer-api/user/list','_injector','_initDataSource','comment','filter','Delete','find','getCurrentUser','IConfigService','rxjs','UniverThreadComment','saveCommentToSnapshot','CollaborationSessionService','updateComment','format','_threadCommentDataSourceService','getMemberID','Disposable','6612JpfwCR','UniverThreadCommentUi','bufferTime','replyId','Unknown','rangeType','map','_initUserSync','@univerjs-pro/license','UNIVER_UNKNOWN','getComment','_httpService','UNRECOGNIZED','_commentService','@univerjs-pro/collaboration-client','object','12ZSbQOx','IThreadCommentDataSourceService','/reply'];_0x3dfd=function(){return _0x1d343f;};return _0x3dfd();}(function(_0x2e7733,_0x1ec33f){const _0x8fd5ba=_0x30ce,_0x419af7=_0x2e7733();while(!![]){try{const _0x17304f=-parseInt(_0x8fd5ba(0x108))/0x1*(-parseInt(_0x8fd5ba(0xb7))/0x2)+parseInt(_0x8fd5ba(0x131))/0x3*(parseInt(_0x8fd5ba(0x130))/0x4)+parseInt(_0x8fd5ba(0xbb))/0x5*(-parseInt(_0x8fd5ba(0xf8))/0x6)+-parseInt(_0x8fd5ba(0xc6))/0x7+parseInt(_0x8fd5ba(0xb1))/0x8+parseInt(_0x8fd5ba(0x10d))/0x9+parseInt(_0x8fd5ba(0xb6))/0xa*(parseInt(_0x8fd5ba(0x122))/0xb);if(_0x17304f===_0x1ec33f)break;else _0x419af7['push'](_0x419af7['shift']());}catch(_0x41c7c7){_0x419af7['push'](_0x419af7['shift']());}}}(_0x3dfd,0x30950),function(_0x11cfd4,_0x491fac){const _0x3ec3cc=_0x30ce;typeof exports==_0x3ec3cc(0x107)&&typeof module<'u'?_0x491fac(exports,require(_0x3ec3cc(0x106)),require(_0x3ec3cc(0x100)),require(_0x3ec3cc(0xc9)),require(_0x3ec3cc(0xe5)),require(_0x3ec3cc(0xc7)),require(_0x3ec3cc(0xef)),require('@univerjs/network')):typeof define==_0x3ec3cc(0xdc)&&define[_0x3ec3cc(0xc1)]?define([_0x3ec3cc(0xd1),_0x3ec3cc(0x106),_0x3ec3cc(0x100),_0x3ec3cc(0xc9),'@univerjs/thread-comment-ui',_0x3ec3cc(0xc7),_0x3ec3cc(0xef),_0x3ec3cc(0x11a)],_0x491fac):(_0x11cfd4=typeof globalThis<'u'?globalThis:_0x11cfd4||self,_0x491fac(_0x11cfd4[_0x3ec3cc(0xbd)]={},_0x11cfd4[_0x3ec3cc(0xe4)],_0x11cfd4['UniverProLicense'],_0x11cfd4[_0x3ec3cc(0xda)],_0x11cfd4[_0x3ec3cc(0xf9)],_0x11cfd4[_0x3ec3cc(0xf0)],_0x11cfd4[_0x3ec3cc(0xef)],_0x11cfd4['UniverNetwork']));}(this,function(_0x312e75,_0x11dc37,_0x1342d1,_0x45f127,_0x7c05d2,_0x2dcb62,_0x131c10,_0x30329a){'use strict';const _0x4c5739=_0x30ce;const _0x494a70=_0x4c5739(0xba);var _0x12dd52=(_0x2362ea=>(_0x2362ea[_0x2362ea[_0x4c5739(0xae)]=0x0]='OpenOrReOpen',_0x2362ea[_0x2362ea[_0x4c5739(0x117)]=0x1]=_0x4c5739(0x117),_0x2362ea[_0x2362ea['UNRECOGNIZED']=-0x1]=_0x4c5739(0x104),_0x2362ea))(_0x12dd52||{}),_0x5dd432=(_0x733d4a=>(_0x733d4a[_0x733d4a[_0x4c5739(0xfc)]=0x0]=_0x4c5739(0xfc),_0x733d4a[_0x733d4a['Add']=0x1]='Add',_0x733d4a[_0x733d4a[_0x4c5739(0x11c)]=0x2]=_0x4c5739(0x11c),_0x733d4a[_0x733d4a['Edit']=0x3]=_0x4c5739(0x120),_0x733d4a[_0x733d4a[_0x4c5739(0xeb)]=0x4]=_0x4c5739(0xeb),_0x733d4a[_0x733d4a[_0x4c5739(0xbe)]=0x5]=_0x4c5739(0xbe),_0x733d4a[_0x733d4a[_0x4c5739(0x104)]=-0x1]=_0x4c5739(0x104),_0x733d4a))(_0x5dd432||{});const _0x3fc404=_0x3d5227=>_0x45f127['dayjs'](new Date(+_0x3d5227))['format'](_0x4c5739(0xe2)),_0x15bd2e=async(_0x2f1f51,_0x49bce4)=>{const _0xc8d819=_0x4c5739,_0x39a174=_0x2f1f51[_0xc8d819(0x111)](_0x45f127[_0xc8d819(0x10e)]),_0xe69507=_0x2f1f51[_0xc8d819(0x111)](_0x30329a[_0xc8d819(0xde)]);_0x49bce4['forEach'](_0x37d201=>{const _0x151d3e=_0xc8d819;_0x39a174[_0x151d3e(0xd0)](_0x37d201)&&_0x49bce4['delete'](_0x37d201);}),_0x49bce4['size']&&(await _0xe69507[_0xc8d819(0x111)](_0xc8d819(0xe6),{'params':{'userIDs':[..._0x49bce4]}}))[_0xc8d819(0xe3)]['users'][_0xc8d819(0x116)](_0x1c98d3=>{const _0xee172c=_0xc8d819;_0x1c98d3&&_0x39a174[_0xee172c(0x126)](_0x1c98d3);});};var _0x33b1fb=Object[_0x4c5739(0xb8)],_0x155e2e=(_0x413aa8,_0x3d23a7,_0x5f38e8,_0x4e9334)=>{const _0x1edb9a=_0x4c5739;for(var _0x49e3ad=_0x4e9334>0x1?void 0x0:_0x4e9334?_0x33b1fb(_0x3d23a7,_0x5f38e8):_0x3d23a7,_0x206e0b=_0x413aa8[_0x1edb9a(0x11e)]-0x1,_0x1cbfff;_0x206e0b>=0x0;_0x206e0b--)(_0x1cbfff=_0x413aa8[_0x206e0b])&&(_0x49e3ad=_0x1cbfff(_0x49e3ad)||_0x49e3ad);return _0x49e3ad;},_0x40ddcd=(_0x2f4d33,_0x59d721)=>(_0x5d43e3,_0x24cf6d)=>_0x59d721(_0x5d43e3,_0x24cf6d,_0x2f4d33);let _0x4028e8=class extends _0x45f127[_0x4c5739(0xf7)]{constructor(_0x361bb3,_0x54da77,_0x5d1e86,_0x418b12){const _0x46610f=_0x4c5739;super(),this[_0x46610f(0x105)]=_0x361bb3,this[_0x46610f(0x12e)]=_0x54da77,this[_0x46610f(0x129)]=_0x5d1e86,this['_injector']=_0x418b12,this[_0x46610f(0xc0)](),this['_initUserSync']();}[_0x4c5739(0xff)](){const _0x3dccbc=_0x4c5739;this[_0x3dccbc(0xcd)](this['_threadCommentModel'][_0x3dccbc(0xc4)][_0x3dccbc(0x115)](_0x131c10[_0x3dccbc(0xfa)](0x10))[_0x3dccbc(0xdb)](_0x3eb2e5=>{const _0x23f660=_0x3dccbc,_0x50af7c=new Set();_0x3eb2e5[_0x23f660(0x116)](_0x1acc0e=>{const _0x12d56b=_0x23f660;switch(_0x1acc0e['type']){case _0x12d56b(0xd7):{const _0x57a5f3=_0x1acc0e['payload'][_0x12d56b(0xaf)];_0x50af7c[_0x12d56b(0xd7)](_0x57a5f3);break;}}}),_0x15bd2e(this[_0x23f660(0xe7)],_0x50af7c);}));}[_0x4c5739(0xc0)](){const _0x160f41=_0x4c5739;this[_0x160f41(0xcd)](this[_0x160f41(0x105)][_0x160f41(0xc4)][_0x160f41(0xdb)](async _0x960ed6=>{const _0x4d0545=_0x160f41;var _0x7475c7,_0x33c86d,_0x4ee620,_0xca84f4;const _0x44d37e=(_0x7475c7=this[_0x4d0545(0x12e)][_0x4d0545(0x12b)](_0x960ed6['unitId'])[_0x4d0545(0xec)](_0x2ffa09=>_0x2ffa09[_0x4d0545(0xe0)]===_0x960ed6[_0x4d0545(0xe0)]))==null?void 0x0:_0x7475c7[_0x4d0545(0x12a)];if(!_0x44d37e)return;const {unitId:_0x1b3643,subUnitId:_0x1e636b}=_0x44d37e;switch(_0x960ed6[_0x4d0545(0x134)]&&this['_userService'][_0x4d0545(0x126)](_0x960ed6[_0x4d0545(0x134)]),_0x960ed6[_0x4d0545(0x11d)]){case _0x5dd432[_0x4d0545(0x135)]:break;case _0x5dd432['Reply']:{this[_0x4d0545(0x12e)][_0x4d0545(0xc2)](_0x1b3643,_0x1e636b,{'unitId':_0x1b3643,'subUnitId':_0x1e636b,'ref':'','id':_0x960ed6[_0x4d0545(0xfb)],'dT':_0x3fc404(+_0x960ed6[_0x4d0545(0x125)]),'threadId':_0x960ed6[_0x4d0545(0xe0)],'personId':(_0x4ee620=(_0x33c86d=_0x960ed6[_0x4d0545(0x134)])==null?void 0x0:_0x33c86d[_0x4d0545(0xd3)])!=null?_0x4ee620:_0x960ed6['userId'],'text':JSON[_0x4d0545(0x10f)](_0x960ed6[_0x4d0545(0x112)]),'parentId':_0x44d37e['id']});break;}case _0x5dd432[_0x4d0545(0xeb)]:{const _0xa67f39=this[_0x4d0545(0x12e)][_0x4d0545(0x102)](_0x1b3643,_0x1e636b,_0x960ed6[_0x4d0545(0xfb)]);_0xa67f39&&_0xa67f39['parentId']&&this[_0x4d0545(0x12e)][_0x4d0545(0xbf)](_0x1b3643,_0x1e636b,_0x960ed6[_0x4d0545(0xfb)]);break;}case _0x5dd432[_0x4d0545(0x120)]:{this[_0x4d0545(0x12e)]['updateComment'](_0x1b3643,_0x1e636b,{'commentId':_0x960ed6[_0x4d0545(0xfb)],'text':JSON[_0x4d0545(0x10f)](_0x960ed6[_0x4d0545(0x112)])});break;}case _0x5dd432['Solve']:{const _0x3f5ca9=(_0xca84f4=this['_threadCommentModel'][_0x4d0545(0x12b)](_0x960ed6[_0x4d0545(0xc3)])[_0x4d0545(0xec)](_0x2e28c7=>_0x2e28c7[_0x4d0545(0xe0)]===_0x960ed6[_0x4d0545(0xe0)]))==null?void 0x0:_0xca84f4[_0x4d0545(0x12a)];_0x3f5ca9&&this[_0x4d0545(0x12e)][_0x4d0545(0x110)](_0x1b3643,_0x1e636b,_0x3f5ca9['id'],_0x960ed6[_0x4d0545(0xac)]===_0x12dd52[_0x4d0545(0x117)]);break;}}}));}};_0x4028e8=_0x155e2e([_0x40ddcd(0x0,_0x45f127['Inject'](_0x11dc37[_0x4c5739(0x12d)])),_0x40ddcd(0x1,_0x45f127[_0x4c5739(0xbc)](_0x2dcb62['ThreadCommentModel'])),_0x40ddcd(0x2,_0x45f127[_0x4c5739(0xbc)](_0x45f127[_0x4c5739(0x10e)])),_0x40ddcd(0x3,_0x45f127[_0x4c5739(0xbc)](_0x45f127[_0x4c5739(0x128)]))],_0x4028e8);const _0x3f135e=_0x4c5739(0x114),_0x1393c1={};var _0x37cf65=Object[_0x4c5739(0xb8)],_0x4b4ba7=(_0x1697c9,_0x3df8bb,_0x4b955c,_0x4a8d18)=>{const _0x193cdb=_0x4c5739;for(var _0x1ced1a=_0x4a8d18>0x1?void 0x0:_0x4a8d18?_0x37cf65(_0x3df8bb,_0x4b955c):_0x3df8bb,_0x29079b=_0x1697c9[_0x193cdb(0x11e)]-0x1,_0x2fadd1;_0x29079b>=0x0;_0x29079b--)(_0x2fadd1=_0x1697c9[_0x29079b])&&(_0x1ced1a=_0x2fadd1(_0x1ced1a)||_0x1ced1a);return _0x1ced1a;},_0x789be=(_0x2e9837,_0x273042)=>(_0x72802,_0x149ac1)=>_0x273042(_0x72802,_0x149ac1,_0x2e9837);function _0x45267c(_0x4bd016,_0x247c3c){const _0x4ff59a=_0x4c5739,_0x475c75=_0x4bd016['replies'][0x0];return{..._0x247c3c,'id':_0x475c75[_0x4ff59a(0xfb)],'resolved':_0x4bd016[_0x4ff59a(0xac)]===0x1,'dT':_0x3fc404(_0x475c75['createTimestamp']),'personId':_0x475c75[_0x4ff59a(0x127)],'threadId':_0x475c75[_0x4ff59a(0xe0)]};}function _0x552f46(_0x482781,_0x2fa8bc,_0x4610ed){const _0x57b6f8=_0x4c5739;var _0x57e0c5,_0x2b9dd7;if(((_0x2b9dd7=(_0x57e0c5=_0x482781==null?void 0x0:_0x482781[_0x57b6f8(0x11b)])==null?void 0x0:_0x57e0c5['length'])!=null?_0x2b9dd7:0x0)>0x0){const _0x4a6ffd=(_0x1e9152,_0x5024de)=>({'id':_0x1e9152[_0x57b6f8(0xfb)],'threadId':_0x1e9152[_0x57b6f8(0xe0)],'dT':_0x3fc404(_0x1e9152[_0x57b6f8(0x125)]),'personId':_0x1e9152['userId'],'resolved':_0x482781[_0x57b6f8(0xac)]===_0x12dd52[_0x57b6f8(0x117)],'unitId':_0x2fa8bc,'subUnitId':_0x4610ed,'text':JSON[_0x57b6f8(0x10f)](_0x1e9152[_0x57b6f8(0x112)]),'parentId':_0x5024de}),_0x17a6e7=_0x4a6ffd(_0x482781[_0x57b6f8(0x11b)][0x0]);return{..._0x17a6e7,'children':_0x482781['replies'][_0x57b6f8(0xd4)](0x1)[_0x57b6f8(0xfe)](_0xb3806=>_0x4a6ffd(_0xb3806,_0x17a6e7['id']))};}return null;}let _0xe2fc66=class{constructor(_0x529503,_0x4496a4,_0x330e2e,_0x15cbf8){const _0x4fe752=_0x4c5739;this['_httpService']=_0x529503,this[_0x4fe752(0x129)]=_0x4496a4,this[_0x4fe752(0xcf)]=_0x330e2e,this[_0x4fe752(0xe7)]=_0x15cbf8;}async[_0x4c5739(0xc2)](_0x583c2e){const _0x24e65f=_0x4c5739;var _0x1b7605,_0x131b7f;const {parentId:_0x26164b,unitId:_0xae963e,text:_0x267041,threadId:_0x558cf4}=_0x583c2e,_0x5b7873=(_0x131b7f=(_0x1b7605=_0x267041['customRanges'])==null?void 0x0:_0x1b7605[_0x24e65f(0xea)](_0x18a115=>_0x18a115[_0x24e65f(0xfd)]===_0x45f127['CustomRangeType']['COMMENT'])[_0x24e65f(0xfe)](_0x362197=>_0x362197[_0x24e65f(0x124)]))!=null?_0x131b7f:[],_0x5a75f5=JSON[_0x24e65f(0x11f)](_0x267041),_0x20357c=(await this[_0x24e65f(0xcf)][_0x24e65f(0xcb)](_0xae963e))[_0x24e65f(0xf6)]();if(_0x26164b){const _0x45d08={'memberId':_0x20357c,'unitId':_0xae963e,'content':_0x5a75f5,'mention':_0x5b7873,'threadId':_0x558cf4},_0x304514=(await this[_0x24e65f(0x103)][_0x24e65f(0xd2)](_0x24e65f(0xad)+_0xae963e+_0x24e65f(0x10a),{'body':_0x45d08}))['body'][_0x24e65f(0xc5)];return{..._0x583c2e,'id':_0x304514[_0x24e65f(0xfb)],'dT':_0x45f127[_0x24e65f(0xb5)](+_0x304514['createTimestamp'])[_0x24e65f(0xf4)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x304514['userId']};}else{const _0x30d1f6={'memberId':_0x20357c,'unitId':_0xae963e,'content':_0x5a75f5,'mention':_0x5b7873},_0x29f09c=await this['_httpService'][_0x24e65f(0xd2)](_0x24e65f(0xad)+_0xae963e+'/add',{'body':_0x30d1f6});return _0x45267c(_0x29f09c[_0x24e65f(0xe3)][_0x24e65f(0xe9)],_0x583c2e);}}async[_0x4c5739(0xf3)](_0x376a8a){const _0x40421d=_0x4c5739;var _0x134a78,_0x19e08c;const {text:_0x342ea4,unitId:_0x54a116}=_0x376a8a,_0x5a045b=(_0x19e08c=(_0x134a78=_0x342ea4[_0x40421d(0xd9)])==null?void 0x0:_0x134a78[_0x40421d(0xea)](_0x3c8b1e=>_0x3c8b1e[_0x40421d(0xfd)]===_0x45f127[_0x40421d(0xdd)][_0x40421d(0x10c)])['map'](_0x3a4e46=>_0x3a4e46[_0x40421d(0x124)]))!=null?_0x19e08c:[],_0x1b0a66=JSON[_0x40421d(0x11f)](_0x342ea4),_0x351e4c=_0x376a8a[_0x40421d(0xe0)],_0x408918=_0x376a8a['id'],_0x24cc24={'memberId':(await this[_0x40421d(0xcf)][_0x40421d(0xcb)](_0x54a116))['getMemberID'](),'unitId':_0x54a116,'threadId':_0x351e4c,'mention':_0x5a045b,'content':_0x1b0a66,'replyId':_0x408918},_0x41178d=await this['_httpService'][_0x40421d(0xd2)](_0x40421d(0xad)+_0x54a116+'/edit',{'body':_0x24cc24});return!_0x41178d[_0x40421d(0xe3)][_0x40421d(0x121)]||_0x41178d[_0x40421d(0xe3)][_0x40421d(0x121)][_0x40421d(0x133)]===0x1;}async[_0x4c5739(0x110)](_0x276341){const _0x1111e6=_0x4c5739,{unitId:_0x444da4}=_0x276341,_0x439778=_0x276341[_0x1111e6(0xe0)],_0x44edd1={'memberId':this[_0x1111e6(0x129)][_0x1111e6(0xed)]()['userID'],'unitId':_0x444da4,'threadId':_0x439778,'solved':_0x276341[_0x1111e6(0xb4)]?_0x12dd52[_0x1111e6(0x117)]:_0x12dd52[_0x1111e6(0xae)]},_0xab59a8=await this[_0x1111e6(0x103)][_0x1111e6(0xd2)]('/universer-api/comment/unit/'+_0x444da4+_0x1111e6(0xb3),{'body':_0x44edd1});return!_0xab59a8['body']['error']||_0xab59a8[_0x1111e6(0xe3)][_0x1111e6(0x121)][_0x1111e6(0x133)]===0x1;}async[_0x4c5739(0xbf)](_0x1cd522,_0x53f73c,_0x29c53f,_0x55dad1){const _0x155654=_0x4c5739,_0x22ded2={'memberId':(await this[_0x155654(0xcf)][_0x155654(0xcb)](_0x1cd522))[_0x155654(0xf6)](),'threadId':_0x29c53f,'replyId':_0x55dad1,'unitId':_0x1cd522},_0x13ebb2=await this[_0x155654(0x103)][_0x155654(0xd2)]('/universer-api/comment/unit/'+_0x1cd522+_0x155654(0x12f),{'body':_0x22ded2});return!_0x13ebb2[_0x155654(0xe3)][_0x155654(0x121)]||_0x13ebb2[_0x155654(0xe3)]['error'][_0x155654(0x133)]===0x1;}async[_0x4c5739(0x113)](_0x196c0d,_0x5c7fd1,_0x1fd6b6){const _0x35b5b3=_0x4c5739,_0x2d3d93={'unitId':_0x196c0d,'threadId':_0x1fd6b6},_0x2fe453=await this[_0x35b5b3(0x103)][_0x35b5b3(0xd2)](_0x35b5b3(0xad)+_0x196c0d+_0x35b5b3(0xd8),{'body':_0x2d3d93}),_0x5b305a=_0x1fd6b6[_0x35b5b3(0xfe)](_0x56264b=>_0x552f46(_0x2fe453[_0x35b5b3(0xe3)]['comments'][_0x56264b],_0x196c0d,_0x5c7fd1))[_0x35b5b3(0xea)](Boolean);return Object['values'](_0x2fe453[_0x35b5b3(0xe3)]['users'])[_0x35b5b3(0x116)](_0x225a61=>{const _0x4b8d53=_0x35b5b3;this['_userService'][_0x4b8d53(0x126)](_0x225a61);}),_0x5b305a;}[_0x4c5739(0xf1)](_0x5d056f){const _0x25417d=_0x4c5739;return{'id':_0x5d056f['id'],'threadId':_0x5d056f[_0x25417d(0xe0)],'ref':_0x5d056f[_0x25417d(0xdf)]};}};_0xe2fc66=_0x4b4ba7([_0x789be(0x0,_0x45f127['Inject'](_0x30329a[_0x4c5739(0xde)])),_0x789be(0x1,_0x45f127[_0x4c5739(0xbc)](_0x45f127['UserManagerService'])),_0x789be(0x2,_0x45f127[_0x4c5739(0xbc)](_0x11dc37[_0x4c5739(0xf2)])),_0x789be(0x3,_0x45f127['Inject'](_0x45f127[_0x4c5739(0x128)]))],_0xe2fc66);var _0x445b4c=Object[_0x4c5739(0xb8)],_0x59ad9c=(_0x556af8,_0x29ee82,_0x1a1c7a,_0x5824a3)=>{const _0x30e5c8=_0x4c5739;for(var _0xbee1a7=_0x5824a3>0x1?void 0x0:_0x5824a3?_0x445b4c(_0x29ee82,_0x1a1c7a):_0x29ee82,_0x1a6ef1=_0x556af8[_0x30e5c8(0x11e)]-0x1,_0x39dd49;_0x1a6ef1>=0x0;_0x1a6ef1--)(_0x39dd49=_0x556af8[_0x1a6ef1])&&(_0xbee1a7=_0x39dd49(_0xbee1a7)||_0xbee1a7);return _0xbee1a7;},_0x35cb0f=(_0x43a774,_0x4443eb)=>(_0x12bb95,_0x3b9b26)=>_0x4443eb(_0x12bb95,_0x3b9b26,_0x43a774);let _0x2b234d=class extends _0x45f127[_0x4c5739(0xf7)]{constructor(_0x5e30b4,_0x5ec988){const _0x2f0953=_0x4c5739;super(),this[_0x2f0953(0xf5)]=_0x5e30b4,this[_0x2f0953(0xcc)]=_0x5ec988,this[_0x2f0953(0xe8)]();}[_0x4c5739(0xe8)](){const _0x5cddd2=_0x4c5739;this[_0x5cddd2(0xf5)][_0x5cddd2(0xca)]=this[_0x5cddd2(0xcc)],this['_threadCommentDataSourceService'][_0x5cddd2(0xc8)]=!0x1;}};_0x2b234d=_0x59ad9c([_0x35cb0f(0x0,_0x2dcb62[_0x4c5739(0x109)]),_0x35cb0f(0x1,_0x45f127[_0x4c5739(0xbc)](_0xe2fc66))],_0x2b234d);var _0x53edd5=Object[_0x4c5739(0x118)],_0x45b783=Object['getOwnPropertyDescriptor'],_0x51e04f=(_0x46a177,_0x29feeb,_0x17164e)=>_0x29feeb in _0x46a177?_0x53edd5(_0x46a177,_0x29feeb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x17164e}):_0x46a177[_0x29feeb]=_0x17164e,_0x368227=(_0x3224c6,_0x524968,_0x281b7a,_0x3a369e)=>{const _0x5f1c58=_0x4c5739;for(var _0x27eefc=_0x3a369e>0x1?void 0x0:_0x3a369e?_0x45b783(_0x524968,_0x281b7a):_0x524968,_0x512784=_0x3224c6[_0x5f1c58(0x11e)]-0x1,_0x91376d;_0x512784>=0x0;_0x512784--)(_0x91376d=_0x3224c6[_0x512784])&&(_0x27eefc=_0x91376d(_0x27eefc)||_0x27eefc);return _0x27eefc;},_0x48573f=(_0x51f93e,_0x1aa611)=>(_0x50cead,_0x4c9bb5)=>_0x1aa611(_0x50cead,_0x4c9bb5,_0x51f93e),_0x289730=(_0x1cd9c8,_0x2bb50d,_0x183cc5)=>_0x51e04f(_0x1cd9c8,typeof _0x2bb50d!=_0x4c5739(0xe1)?_0x2bb50d+'':_0x2bb50d,_0x183cc5);_0x312e75['UniverThreadCommentDataSourcePlugin']=class extends _0x45f127['Plugin']{constructor(_0x5d79aa=_0x1393c1,_0x58c715,_0x2cc18c){const _0x179633=_0x4c5739;super(),this[_0x179633(0x119)]=_0x5d79aa,this[_0x179633(0xe7)]=_0x58c715,this[_0x179633(0xb2)]=_0x2cc18c;const {..._0x275f46}=_0x45f127['merge']({},_0x1393c1,this[_0x179633(0x119)]);this[_0x179633(0xb2)][_0x179633(0x123)](_0x3f135e,_0x275f46);}['onStarting'](){const _0x19f2e8=_0x4c5739;[[_0xe2fc66],[_0x2b234d],[_0x4028e8]][_0x19f2e8(0x116)](_0x5a046c=>{const _0x3026ae=_0x19f2e8;this[_0x3026ae(0xe7)][_0x3026ae(0xd7)](_0x5a046c);});}[_0x4c5739(0x132)](){const _0x91da5=_0x4c5739;this[_0x91da5(0xe7)][_0x91da5(0x111)](_0x2b234d),this[_0x91da5(0xe7)][_0x91da5(0x111)](_0x4028e8);}},_0x289730(_0x312e75[_0x4c5739(0x10b)],_0x4c5739(0xce),_0x494a70),_0x289730(_0x312e75[_0x4c5739(0x10b)],_0x4c5739(0x11d),_0x45f127['UniverInstanceType'][_0x4c5739(0x101)]),_0x312e75[_0x4c5739(0x10b)]=_0x368227([_0x45f127['DependentOn'](_0x7c05d2[_0x4c5739(0xb9)],_0x11dc37[_0x4c5739(0xb0)],_0x1342d1[_0x4c5739(0x12c)]),_0x48573f(0x1,_0x45f127[_0x4c5739(0xbc)](_0x45f127[_0x4c5739(0x128)])),_0x48573f(0x2,_0x45f127[_0x4c5739(0xee)])],_0x312e75[_0x4c5739(0x10b)]),Object[_0x4c5739(0x118)](_0x312e75,Symbol[_0x4c5739(0xd6)],{'value':_0x4c5739(0xd5)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202504301607",
3
+ "version": "0.7.0-nightly.202505011607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,18 +45,18 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202504301607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202504301607",
50
- "@univerjs/network": "0.7.0-nightly.202504301607",
51
- "@univerjs/core": "0.7.0-nightly.202504301607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505011607",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505011607",
50
+ "@univerjs/core": "0.7.0-nightly.202505011607",
52
51
  "@univerjs/protocol": "0.1.46-alpha.3",
53
- "@univerjs/thread-comment": "0.7.0-nightly.202504301607",
54
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202504301607"
52
+ "@univerjs/network": "0.7.0-nightly.202505011607",
53
+ "@univerjs/thread-comment": "0.7.0-nightly.202505011607",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505011607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^6.3.3",
59
+ "vite": "^6.3.4",
60
60
  "vitest": "^3.1.2",
61
61
  "@univerjs-infra/shared": "0.7.0-beta.0"
62
62
  },