@univerjs-pro/thread-comment-datasource 0.6.9 → 0.6.10-experimental.20250410-f79ffef

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 _0x24ddea=_0x4779;(function(_0x27e2f2,_0x9e0fa3){const _0x320a03=_0x4779,_0x401b8b=_0x27e2f2();while(!![]){try{const _0x2d5556=-parseInt(_0x320a03(0xd0))/0x1+parseInt(_0x320a03(0xca))/0x2*(-parseInt(_0x320a03(0x97))/0x3)+-parseInt(_0x320a03(0xba))/0x4*(parseInt(_0x320a03(0xf1))/0x5)+parseInt(_0x320a03(0x80))/0x6*(-parseInt(_0x320a03(0xa7))/0x7)+-parseInt(_0x320a03(0xb0))/0x8*(parseInt(_0x320a03(0x8e))/0x9)+-parseInt(_0x320a03(0xe2))/0xa*(parseInt(_0x320a03(0x8a))/0xb)+parseInt(_0x320a03(0xef))/0xc;if(_0x2d5556===_0x9e0fa3)break;else _0x401b8b['push'](_0x401b8b['shift']());}catch(_0xbc85b1){_0x401b8b['push'](_0x401b8b['shift']());}}}(_0x225e,0xe31f2));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x24ddea(0x84)});const b=require(_0x24ddea(0xa1)),T=require(_0x24ddea(0xd9)),c=require(_0x24ddea(0x8b)),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require(_0x24ddea(0x77)),P=require('@univerjs/network'),U=_0x24ddea(0xb3);var I=(_0x1b0785=>(_0x1b0785[_0x1b0785[_0x24ddea(0x93)]=0x0]='OpenOrReOpen',_0x1b0785[_0x1b0785['Solved']=0x1]=_0x24ddea(0x89),_0x1b0785[_0x1b0785[_0x24ddea(0xee)]=-0x1]='UNRECOGNIZED',_0x1b0785))(I||{}),v=(_0x27064a=>(_0x27064a[_0x27064a[_0x24ddea(0xec)]=0x0]=_0x24ddea(0xec),_0x27064a[_0x27064a[_0x24ddea(0x98)]=0x1]=_0x24ddea(0x98),_0x27064a[_0x27064a['Reply']=0x2]=_0x24ddea(0xab),_0x27064a[_0x27064a[_0x24ddea(0x7c)]=0x3]='Edit',_0x27064a[_0x27064a['Delete']=0x4]=_0x24ddea(0x7a),_0x27064a[_0x27064a[_0x24ddea(0xad)]=0x5]=_0x24ddea(0xad),_0x27064a[_0x27064a[_0x24ddea(0xee)]=-0x1]=_0x24ddea(0xee),_0x27064a))(v||{});const f=_0x4e1b1f=>c[_0x24ddea(0xbb)](new Date(+_0x4e1b1f))['format'](_0x24ddea(0xc7)),R=async(_0x4c1c1c,_0x5e97ad)=>{const _0x195404=_0x24ddea,_0x2b251b=_0x4c1c1c['get'](c[_0x195404(0xb6)]),_0x2f40bc=_0x4c1c1c['get'](P[_0x195404(0x82)]);_0x5e97ad[_0x195404(0xd5)](_0x4144d1=>{const _0x2af893=_0x195404;_0x2b251b[_0x2af893(0x7b)](_0x4144d1)&&_0x5e97ad[_0x2af893(0xc9)](_0x4144d1);}),_0x5e97ad['size']&&(await _0x2f40bc['get'](_0x195404(0x90),{'params':{'userIDs':[..._0x5e97ad]}}))[_0x195404(0xe3)][_0x195404(0xac)][_0x195404(0xd5)](_0x5ea363=>{_0x5ea363&&_0x2b251b['addUser'](_0x5ea363);});};var $=Object[_0x24ddea(0x79)],E=(_0x493e15,_0x2bad7f,_0x9c5919,_0x289fba)=>{for(var _0x1a5a53=_0x289fba>0x1?void 0x0:_0x289fba?$(_0x2bad7f,_0x9c5919):_0x2bad7f,_0x5e4588=_0x493e15['length']-0x1,_0xd2b976;_0x5e4588>=0x0;_0x5e4588--)(_0xd2b976=_0x493e15[_0x5e4588])&&(_0x1a5a53=_0xd2b976(_0x1a5a53)||_0x1a5a53);return _0x1a5a53;},S=(_0x8547d3,_0x1956eb)=>(_0x509fdc,_0x2f8d6e)=>_0x1956eb(_0x509fdc,_0x2f8d6e,_0x8547d3);let p=class extends c[_0x24ddea(0xdd)]{constructor(_0x18c770,_0x25b8a0,_0x1de6cc,_0x34c784){const _0x2f3fc1=_0x24ddea;super(),this[_0x2f3fc1(0xd1)]=_0x18c770,this[_0x2f3fc1(0x88)]=_0x25b8a0,this[_0x2f3fc1(0x8c)]=_0x1de6cc,this[_0x2f3fc1(0xcf)]=_0x34c784,this[_0x2f3fc1(0xda)](),this[_0x2f3fc1(0xa9)]();}['_initUserSync'](){const _0x29a2f0=_0x24ddea;this['disposeWithMe'](this[_0x29a2f0(0x88)][_0x29a2f0(0x8f)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x59ef59=>{const _0x451e5e=_0x29a2f0,_0x2689fe=new Set();_0x59ef59['forEach'](_0x35fde3=>{const _0x55992b=_0x4779;switch(_0x35fde3[_0x55992b(0x85)]){case _0x55992b(0x7e):{const _0x1b3822=_0x35fde3[_0x55992b(0xf2)]['personId'];_0x2689fe['add'](_0x1b3822);break;}}}),R(this[_0x451e5e(0xcf)],_0x2689fe);}));}[_0x24ddea(0xda)](){const _0x3cb995=_0x24ddea;this[_0x3cb995(0xb1)](this[_0x3cb995(0xd1)][_0x3cb995(0x8f)][_0x3cb995(0xc0)](async _0x1420cc=>{const _0x5ed338=_0x3cb995;var _0x3761e0,_0x287c32,_0x57cec6,_0x208271;const _0x577e88=(_0x3761e0=this[_0x5ed338(0x88)][_0x5ed338(0x9d)](_0x1420cc[_0x5ed338(0xc1)])[_0x5ed338(0xce)](_0x15fd82=>_0x15fd82['threadId']===_0x1420cc[_0x5ed338(0xd8)]))==null?void 0x0:_0x3761e0[_0x5ed338(0xf3)];if(!_0x577e88)return;const {unitId:_0x5e8087,subUnitId:_0x476669}=_0x577e88;switch(_0x1420cc[_0x5ed338(0xcb)]&&this['_userService'][_0x5ed338(0xde)](_0x1420cc[_0x5ed338(0xcb)]),_0x1420cc[_0x5ed338(0x85)]){case v[_0x5ed338(0x98)]:break;case v[_0x5ed338(0xab)]:{this['_threadCommentModel'][_0x5ed338(0xd3)](_0x5e8087,_0x476669,{'unitId':_0x5e8087,'subUnitId':_0x476669,'ref':'','id':_0x1420cc[_0x5ed338(0xa3)],'dT':f(+_0x1420cc[_0x5ed338(0xc8)]),'threadId':_0x1420cc[_0x5ed338(0xd8)],'personId':(_0x57cec6=(_0x287c32=_0x1420cc[_0x5ed338(0xcb)])==null?void 0x0:_0x287c32[_0x5ed338(0x9b)])!=null?_0x57cec6:_0x1420cc['userId'],'text':JSON[_0x5ed338(0x81)](_0x1420cc[_0x5ed338(0x8d)]),'parentId':_0x577e88['id']});break;}case v[_0x5ed338(0x7a)]:{const _0x55854d=this[_0x5ed338(0x88)][_0x5ed338(0xc6)](_0x5e8087,_0x476669,_0x1420cc[_0x5ed338(0xa3)]);_0x55854d&&_0x55854d[_0x5ed338(0xdb)]&&this[_0x5ed338(0x88)]['deleteComment'](_0x5e8087,_0x476669,_0x1420cc['replyId']);break;}case v[_0x5ed338(0x7c)]:{this[_0x5ed338(0x88)]['updateComment'](_0x5e8087,_0x476669,{'commentId':_0x1420cc[_0x5ed338(0xa3)],'text':JSON[_0x5ed338(0x81)](_0x1420cc[_0x5ed338(0x8d)])});break;}case v[_0x5ed338(0xad)]:{const _0x56354b=(_0x208271=this[_0x5ed338(0x88)]['getUnit'](_0x1420cc[_0x5ed338(0xc1)])[_0x5ed338(0xce)](_0x12b6f8=>_0x12b6f8[_0x5ed338(0xd8)]===_0x1420cc[_0x5ed338(0xd8)]))==null?void 0x0:_0x208271[_0x5ed338(0xf3)];_0x56354b&&this['_threadCommentModel']['resolveComment'](_0x5e8087,_0x476669,_0x56354b['id'],_0x1420cc[_0x5ed338(0x74)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x24ddea(0x91)](b[_0x24ddea(0xcd)])),S(0x1,c[_0x24ddea(0x91)](M[_0x24ddea(0xb9)])),S(0x2,c[_0x24ddea(0x91)](c[_0x24ddea(0xb6)])),S(0x3,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3ea938,_0x4217d6,_0x30fcb5,_0x10eab3)=>{for(var _0x989668=_0x10eab3>0x1?void 0x0:_0x10eab3?A(_0x4217d6,_0x30fcb5):_0x4217d6,_0x4a3eaa=_0x3ea938['length']-0x1,_0x1cf881;_0x4a3eaa>=0x0;_0x4a3eaa--)(_0x1cf881=_0x3ea938[_0x4a3eaa])&&(_0x989668=_0x1cf881(_0x989668)||_0x989668);return _0x989668;},_=(_0x5ad083,_0x225241)=>(_0x4f977c,_0x1a67e9)=>_0x225241(_0x4f977c,_0x1a67e9,_0x5ad083);function Y(_0x98ef9f,_0x303756){const _0x25847d=_0x24ddea,_0x34ae3e=_0x98ef9f['replies'][0x0];return{..._0x303756,'id':_0x34ae3e['replyId'],'resolved':_0x98ef9f[_0x25847d(0x74)]===0x1,'dT':f(_0x34ae3e[_0x25847d(0xc8)]),'personId':_0x34ae3e['userId'],'threadId':_0x34ae3e[_0x25847d(0xd8)]};}function G(_0x1b4057,_0x579bfa,_0x2f1151){const _0x1e93e6=_0x24ddea;var _0x56aa91,_0x28a954;if(((_0x28a954=(_0x56aa91=_0x1b4057==null?void 0x0:_0x1b4057[_0x1e93e6(0xb8)])==null?void 0x0:_0x56aa91[_0x1e93e6(0xdf)])!=null?_0x28a954:0x0)>0x0){const _0x488f52=(_0x26524c,_0x44ee8f)=>({'id':_0x26524c['replyId'],'threadId':_0x26524c[_0x1e93e6(0xd8)],'dT':f(_0x26524c['createTimestamp']),'personId':_0x26524c[_0x1e93e6(0xbe)],'resolved':_0x1b4057[_0x1e93e6(0x74)]===I[_0x1e93e6(0x89)],'unitId':_0x579bfa,'subUnitId':_0x2f1151,'text':JSON[_0x1e93e6(0x81)](_0x26524c[_0x1e93e6(0x8d)]),'parentId':_0x44ee8f}),_0x1d5229=_0x488f52(_0x1b4057[_0x1e93e6(0xb8)][0x0]);return{..._0x1d5229,'children':_0x1b4057['replies'][_0x1e93e6(0xc3)](0x1)['map'](_0x4e1a0a=>_0x488f52(_0x4e1a0a,_0x1d5229['id']))};}return null;}function _0x4779(_0x4639dc,_0x2298f9){const _0x225e6f=_0x225e();return _0x4779=function(_0x477965,_0x116306){_0x477965=_0x477965-0x74;let _0x131c3f=_0x225e6f[_0x477965];return _0x131c3f;},_0x4779(_0x4639dc,_0x2298f9);}let g=class{constructor(_0x4d8e5c,_0x27bd20,_0x4ba226,_0xa2fe8f){const _0x2bb43f=_0x24ddea;this['_httpService']=_0x4d8e5c,this[_0x2bb43f(0x8c)]=_0x27bd20,this[_0x2bb43f(0xdc)]=_0x4ba226,this[_0x2bb43f(0xcf)]=_0xa2fe8f;}async[_0x24ddea(0xd3)](_0x48730c){const _0x3fff31=_0x24ddea;var _0x13c916,_0x175e5f;const {parentId:_0x5208fc,unitId:_0x1ee425,text:_0x47fd3a,threadId:_0x31080f}=_0x48730c,_0x15f24a=(_0x175e5f=(_0x13c916=_0x47fd3a[_0x3fff31(0xae)])==null?void 0x0:_0x13c916[_0x3fff31(0x95)](_0x4a983d=>_0x4a983d[_0x3fff31(0xe8)]===c['CustomRangeType'][_0x3fff31(0x7f)])[_0x3fff31(0xd7)](_0x3f1a02=>_0x3f1a02[_0x3fff31(0x78)]))!=null?_0x175e5f:[],_0x10c53c=JSON[_0x3fff31(0xe1)](_0x47fd3a),_0x596620=(await this[_0x3fff31(0xdc)][_0x3fff31(0x75)](_0x1ee425))['getMemberID']();if(_0x5208fc){const _0x29c89f={'memberId':_0x596620,'unitId':_0x1ee425,'content':_0x10c53c,'mention':_0x15f24a,'threadId':_0x31080f},_0x35eddb=(await this[_0x3fff31(0xb4)][_0x3fff31(0xbc)](_0x3fff31(0xd2)+_0x1ee425+'/reply',{'body':_0x29c89f}))['body'][_0x3fff31(0xa6)];return{..._0x48730c,'id':_0x35eddb[_0x3fff31(0xa3)],'dT':c[_0x3fff31(0xbb)](+_0x35eddb['createTimestamp'])[_0x3fff31(0xe5)](_0x3fff31(0xc7)),'personId':_0x35eddb[_0x3fff31(0xbe)]};}else{const _0x2101c2={'memberId':_0x596620,'unitId':_0x1ee425,'content':_0x10c53c,'mention':_0x15f24a},_0x2d0744=await this['_httpService'][_0x3fff31(0xbc)](_0x3fff31(0xd2)+_0x1ee425+_0x3fff31(0xc5),{'body':_0x2101c2});return Y(_0x2d0744[_0x3fff31(0xe3)][_0x3fff31(0x86)],_0x48730c);}}async[_0x24ddea(0xe9)](_0x4bbcef){const _0xf15da9=_0x24ddea;var _0x18ac65,_0x12189b;const {text:_0x17aad2,unitId:_0x2712fc}=_0x4bbcef,_0x5ec04b=(_0x12189b=(_0x18ac65=_0x17aad2[_0xf15da9(0xae)])==null?void 0x0:_0x18ac65[_0xf15da9(0x95)](_0x3d0345=>_0x3d0345[_0xf15da9(0xe8)]===c['CustomRangeType'][_0xf15da9(0x7f)])[_0xf15da9(0xd7)](_0x2d9847=>_0x2d9847[_0xf15da9(0x78)]))!=null?_0x12189b:[],_0x181fc8=JSON['stringify'](_0x17aad2),_0x424324=_0x4bbcef[_0xf15da9(0xd8)],_0x1282ed=_0x4bbcef['id'],_0x1946e3={'memberId':(await this['_sessionService']['requireSession'](_0x2712fc))['getMemberID'](),'unitId':_0x2712fc,'threadId':_0x424324,'mention':_0x5ec04b,'content':_0x181fc8,'replyId':_0x1282ed},_0x113652=await this['_httpService'][_0xf15da9(0xbc)](_0xf15da9(0xd2)+_0x2712fc+_0xf15da9(0xd4),{'body':_0x1946e3});return!_0x113652['body'][_0xf15da9(0xe0)]||_0x113652[_0xf15da9(0xe3)]['error'][_0xf15da9(0xc2)]===0x1;}async[_0x24ddea(0x99)](_0x51b357){const _0x1ed4a2=_0x24ddea,{unitId:_0x3c2878}=_0x51b357,_0xf90e35=_0x51b357['threadId'],_0x4e906f={'memberId':this[_0x1ed4a2(0x8c)]['getCurrentUser']()[_0x1ed4a2(0x9b)],'unitId':_0x3c2878,'threadId':_0xf90e35,'solved':_0x51b357[_0x1ed4a2(0xed)]?I[_0x1ed4a2(0x89)]:I[_0x1ed4a2(0x93)]},_0x3e4bb0=await this[_0x1ed4a2(0xb4)]['post'](_0x1ed4a2(0xd2)+_0x3c2878+'/solved',{'body':_0x4e906f});return!_0x3e4bb0[_0x1ed4a2(0xe3)][_0x1ed4a2(0xe0)]||_0x3e4bb0[_0x1ed4a2(0xe3)]['error'][_0x1ed4a2(0xc2)]===0x1;}async[_0x24ddea(0x9e)](_0x2220fe,_0x23b3fb,_0x3a9319,_0x58ac35){const _0x5a1418=_0x24ddea,_0x1447fd={'memberId':(await this['_sessionService'][_0x5a1418(0x75)](_0x2220fe))[_0x5a1418(0xd6)](),'threadId':_0x3a9319,'replyId':_0x58ac35,'unitId':_0x2220fe},_0x2d0b33=await this[_0x5a1418(0xb4)][_0x5a1418(0xbc)](_0x5a1418(0xd2)+_0x2220fe+_0x5a1418(0xe6),{'body':_0x1447fd});return!_0x2d0b33[_0x5a1418(0xe3)]['error']||_0x2d0b33['body'][_0x5a1418(0xe0)]['code']===0x1;}async[_0x24ddea(0x9a)](_0x280c3b,_0x47136e,_0x5516bd){const _0x598aeb=_0x24ddea,_0x2aae12={'unitId':_0x280c3b,'threadId':_0x5516bd},_0xf3ccb9=await this[_0x598aeb(0xb4)]['post'](_0x598aeb(0xd2)+_0x280c3b+_0x598aeb(0x76),{'body':_0x2aae12}),_0x1f8727=_0x5516bd[_0x598aeb(0xd7)](_0x432cc1=>G(_0xf3ccb9[_0x598aeb(0xe3)][_0x598aeb(0xe7)][_0x432cc1],_0x280c3b,_0x47136e))['filter'](Boolean);return Object[_0x598aeb(0xbf)](_0xf3ccb9[_0x598aeb(0xe3)][_0x598aeb(0xac)])[_0x598aeb(0xd5)](_0xd45459=>{this['_userService']['addUser'](_0xd45459);}),_0x1f8727;}['saveCommentToSnapshot'](_0x20bf5c){const _0x580168=_0x24ddea;return{'id':_0x20bf5c['id'],'threadId':_0x20bf5c[_0x580168(0xd8)],'ref':_0x20bf5c[_0x580168(0xbd)]};}};function _0x225e(){const _0x5d3d15=['add','COMMENT','12xGysNv','parse','HTTPService','CollaborationSessionService','Module','type','comment','UniverThreadCommentDataSourcePlugin','_threadCommentModel','Solved','11uzsjuu','@univerjs/core','_userService','content','9LvdUIk','commentUpdate$','/universer-api/user/list','Inject','UniverInstanceType','OpenOrReOpen','_initDataSource','filter','dataSource','30pWYNGC','Add','resolveComment','listComments','userID','merge','getUnit','deleteComment','UNIVER_UNKNOWN','Injector','@univerjs-pro/collaboration-client','DependentOn','replyId','_configService','UniverLicensePlugin','reply','405629ARPBlJ','_threadCommentDataSourceService','_initUserSync','get','Reply','users','Solve','customRanges','syncUpdateMutationToColla','4926488AKDVqh','disposeWithMe','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','IThreadCommentDataSourceService','UserManagerService','Plugin','replies','ThreadCommentModel','356ggtenQ','dayjs','post','ref','userId','values','subscribe','unitId','code','slice','_threadCommentDataSource','/add','getComment','YYYY/MM/DD\x20HH:mm','createTimestamp','delete','240766ywHTBY','user','_config','CommentService','find','_injector','1570768VPxMtb','_commentService','/universer-api/comment/unit/','addComment','/edit','forEach','getMemberID','map','threadId','@univerjs-pro/license','_init','parentId','_sessionService','Disposable','addUser','length','error','stringify','11542460yVyzcP','body','IConfigService','format','/delete','comments','rangeType','updateComment','onStarting','UniverThreadCommentUIPlugin','Unknown','resolved','UNRECOGNIZED','87309444lJVbnM','onReady','94660MulhwM','payload','root','solved','requireSession','/list','rxjs','rangeId','getOwnPropertyDescriptor','Delete','getUser','Edit','setConfig'];_0x225e=function(){return _0x5d3d15;};return _0x225e();}g=x([_(0x0,c[_0x24ddea(0x91)](P['HTTPService'])),_(0x1,c[_0x24ddea(0x91)](c[_0x24ddea(0xb6)])),_(0x2,c[_0x24ddea(0x91)](b[_0x24ddea(0x83)])),_(0x3,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)]))],g);var H=Object[_0x24ddea(0x79)],J=(_0x1ac2e1,_0x238708,_0x40a37b,_0x18bf20)=>{for(var _0x17f0f1=_0x18bf20>0x1?void 0x0:_0x18bf20?H(_0x238708,_0x40a37b):_0x238708,_0x13185a=_0x1ac2e1['length']-0x1,_0x5a00d5;_0x13185a>=0x0;_0x13185a--)(_0x5a00d5=_0x1ac2e1[_0x13185a])&&(_0x17f0f1=_0x5a00d5(_0x17f0f1)||_0x17f0f1);return _0x17f0f1;},y=(_0x10037a,_0xa89fa)=>(_0x347da0,_0x5560a5)=>_0xa89fa(_0x347da0,_0x5560a5,_0x10037a);let C=class extends c[_0x24ddea(0xdd)]{constructor(_0x5084ee,_0x3e4c74){const _0xf31e9e=_0x24ddea;super(),this[_0xf31e9e(0xa8)]=_0x5084ee,this[_0xf31e9e(0xc4)]=_0x3e4c74,this[_0xf31e9e(0x94)]();}[_0x24ddea(0x94)](){const _0x5b6c04=_0x24ddea;this['_threadCommentDataSourceService'][_0x5b6c04(0x96)]=this[_0x5b6c04(0xc4)],this['_threadCommentDataSourceService'][_0x5b6c04(0xaf)]=!0x1;}};C=J([y(0x0,M[_0x24ddea(0xb5)]),y(0x1,c[_0x24ddea(0x91)](g))],C);var F=Object[_0x24ddea(0xb2)],L=Object[_0x24ddea(0x79)],Z=(_0x5d285d,_0x277e88,_0x53c705)=>_0x277e88 in _0x5d285d?F(_0x5d285d,_0x277e88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x53c705}):_0x5d285d[_0x277e88]=_0x53c705,W=(_0x290b4c,_0x18cc11,_0x229627,_0x78b9bc)=>{const _0x3bf288=_0x24ddea;for(var _0x361519=_0x78b9bc>0x1?void 0x0:_0x78b9bc?L(_0x18cc11,_0x229627):_0x18cc11,_0xa42ca1=_0x290b4c[_0x3bf288(0xdf)]-0x1,_0x4ae1ef;_0xa42ca1>=0x0;_0xa42ca1--)(_0x4ae1ef=_0x290b4c[_0xa42ca1])&&(_0x361519=_0x4ae1ef(_0x361519)||_0x361519);return _0x361519;},O=(_0x5dc3fe,_0x1cdbe8)=>(_0x2f76a7,_0x9477e3)=>_0x1cdbe8(_0x2f76a7,_0x9477e3,_0x5dc3fe),N=(_0x1dd854,_0x416377,_0x32ca8f)=>Z(_0x1dd854,typeof _0x416377!='symbol'?_0x416377+'':_0x416377,_0x32ca8f);exports[_0x24ddea(0x87)]=class extends c[_0x24ddea(0xb7)]{constructor(_0x40667c=D,_0x5d9eae,_0x145f14){const _0x1a42f8=_0x24ddea;super(),this[_0x1a42f8(0xcc)]=_0x40667c,this[_0x1a42f8(0xcf)]=_0x5d9eae,this[_0x1a42f8(0xa4)]=_0x145f14;const {..._0x4da845}=c[_0x1a42f8(0x9c)]({},D,this['_config']);this[_0x1a42f8(0xa4)][_0x1a42f8(0x7d)](q,_0x4da845);}[_0x24ddea(0xea)](){const _0xa67942=_0x24ddea;[[g],[C],[p]][_0xa67942(0xd5)](_0x1fdf7e=>{const _0x32be77=_0xa67942;this['_injector'][_0x32be77(0x7e)](_0x1fdf7e);});}[_0x24ddea(0xf0)](){const _0x21743a=_0x24ddea;this[_0x21743a(0xcf)][_0x21743a(0xaa)](C),this['_injector'][_0x21743a(0xaa)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x24ddea(0x85),c[_0x24ddea(0x92)][_0x24ddea(0x9f)]),exports[_0x24ddea(0x87)]=W([c[_0x24ddea(0xa2)](j[_0x24ddea(0xeb)],b['UniverCollaborationClientPlugin'],T[_0x24ddea(0xa5)]),O(0x1,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)])),O(0x2,c[_0x24ddea(0xe4)])],exports[_0x24ddea(0x87)]);
1
+ 'use strict';const _0x3d0c1a=_0x4bea;(function(_0x3ed824,_0x5a80cf){const _0x519c7b=_0x4bea,_0x11079c=_0x3ed824();while(!![]){try{const _0x568259=-parseInt(_0x519c7b(0x7c))/0x1*(parseInt(_0x519c7b(0xb6))/0x2)+parseInt(_0x519c7b(0x91))/0x3*(-parseInt(_0x519c7b(0x9c))/0x4)+-parseInt(_0x519c7b(0x9f))/0x5+-parseInt(_0x519c7b(0x7b))/0x6*(-parseInt(_0x519c7b(0xa6))/0x7)+-parseInt(_0x519c7b(0xe1))/0x8*(parseInt(_0x519c7b(0xb1))/0x9)+parseInt(_0x519c7b(0xd8))/0xa*(-parseInt(_0x519c7b(0xda))/0xb)+-parseInt(_0x519c7b(0xb7))/0xc*(-parseInt(_0x519c7b(0xd1))/0xd);if(_0x568259===_0x5a80cf)break;else _0x11079c['push'](_0x11079c['shift']());}catch(_0x519a40){_0x11079c['push'](_0x11079c['shift']());}}}(_0x4559,0xa3ec7));Object[_0x3d0c1a(0x90)](exports,Symbol[_0x3d0c1a(0xb8)],{'value':_0x3d0c1a(0x92)});function _0x4bea(_0x39c9d1,_0x334aa4){const _0x4559d9=_0x4559();return _0x4bea=function(_0x4bea1a,_0x15713e){_0x4bea1a=_0x4bea1a-0x69;let _0x1163f6=_0x4559d9[_0x4bea1a];return _0x1163f6;},_0x4bea(_0x39c9d1,_0x334aa4);}const b=require(_0x3d0c1a(0xe9)),T=require(_0x3d0c1a(0x95)),c=require(_0x3d0c1a(0xe0)),j=require('@univerjs/thread-comment-ui'),M=require(_0x3d0c1a(0xc4)),w=require('rxjs'),P=require(_0x3d0c1a(0x81)),U=_0x3d0c1a(0xb9);var I=(_0x169807=>(_0x169807[_0x169807[_0x3d0c1a(0xc1)]=0x0]=_0x3d0c1a(0xc1),_0x169807[_0x169807[_0x3d0c1a(0x76)]=0x1]=_0x3d0c1a(0x76),_0x169807[_0x169807[_0x3d0c1a(0x8f)]=-0x1]='UNRECOGNIZED',_0x169807))(I||{}),v=(_0x2d2e25=>(_0x2d2e25[_0x2d2e25[_0x3d0c1a(0xb3)]=0x0]=_0x3d0c1a(0xb3),_0x2d2e25[_0x2d2e25[_0x3d0c1a(0x97)]=0x1]='Add',_0x2d2e25[_0x2d2e25[_0x3d0c1a(0x8b)]=0x2]='Reply',_0x2d2e25[_0x2d2e25[_0x3d0c1a(0xbe)]=0x3]=_0x3d0c1a(0xbe),_0x2d2e25[_0x2d2e25[_0x3d0c1a(0x85)]=0x4]=_0x3d0c1a(0x85),_0x2d2e25[_0x2d2e25[_0x3d0c1a(0x7f)]=0x5]=_0x3d0c1a(0x7f),_0x2d2e25[_0x2d2e25[_0x3d0c1a(0x8f)]=-0x1]=_0x3d0c1a(0x8f),_0x2d2e25))(v||{});const f=_0x28c379=>c['dayjs'](new Date(+_0x28c379))[_0x3d0c1a(0xc9)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x5119a3,_0x3b991f)=>{const _0x3e669a=_0x3d0c1a,_0x127f5f=_0x5119a3[_0x3e669a(0xbc)](c[_0x3e669a(0x93)]),_0x4c0416=_0x5119a3['get'](P['HTTPService']);_0x3b991f[_0x3e669a(0xb5)](_0x1f496d=>{const _0x5c90a3=_0x3e669a;_0x127f5f[_0x5c90a3(0x89)](_0x1f496d)&&_0x3b991f[_0x5c90a3(0xa4)](_0x1f496d);}),_0x3b991f[_0x3e669a(0x6a)]&&(await _0x4c0416[_0x3e669a(0xbc)](_0x3e669a(0xaf),{'params':{'userIDs':[..._0x3b991f]}}))['body']['users'][_0x3e669a(0xb5)](_0x3f33da=>{const _0x46b3ab=_0x3e669a;_0x3f33da&&_0x127f5f[_0x46b3ab(0xe6)](_0x3f33da);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x96f8aa,_0x29a9ca,_0x46f514,_0x14bcb0)=>{const _0x50df60=_0x3d0c1a;for(var _0x363376=_0x14bcb0>0x1?void 0x0:_0x14bcb0?$(_0x29a9ca,_0x46f514):_0x29a9ca,_0x4fa1f1=_0x96f8aa[_0x50df60(0xca)]-0x1,_0x4cfd9f;_0x4fa1f1>=0x0;_0x4fa1f1--)(_0x4cfd9f=_0x96f8aa[_0x4fa1f1])&&(_0x363376=_0x4cfd9f(_0x363376)||_0x363376);return _0x363376;},S=(_0x3463a1,_0x3d4acc)=>(_0x5baf00,_0x54715c)=>_0x3d4acc(_0x5baf00,_0x54715c,_0x3463a1);let p=class extends c[_0x3d0c1a(0xc6)]{constructor(_0x576b09,_0xbe3a8e,_0x54807,_0x38aba4){const _0x363067=_0x3d0c1a;super(),this['_commentService']=_0x576b09,this[_0x363067(0x71)]=_0xbe3a8e,this['_userService']=_0x54807,this['_injector']=_0x38aba4,this['_init'](),this[_0x363067(0x74)]();}['_initUserSync'](){const _0x18bcbc=_0x3d0c1a;this['disposeWithMe'](this[_0x18bcbc(0x71)][_0x18bcbc(0xd0)][_0x18bcbc(0x84)](w[_0x18bcbc(0x9e)](0x10))[_0x18bcbc(0x98)](_0x3ae7ad=>{const _0x17a4fc=_0x18bcbc,_0x5e9f53=new Set();_0x3ae7ad[_0x17a4fc(0xb5)](_0x405549=>{const _0x4a5643=_0x17a4fc;switch(_0x405549[_0x4a5643(0x7e)]){case _0x4a5643(0xa5):{const _0x10f0b3=_0x405549[_0x4a5643(0xbb)]['personId'];_0x5e9f53[_0x4a5643(0xa5)](_0x10f0b3);break;}}}),R(this[_0x17a4fc(0xa8)],_0x5e9f53);}));}[_0x3d0c1a(0xc2)](){const _0x4751b0=_0x3d0c1a;this[_0x4751b0(0xcb)](this[_0x4751b0(0x77)]['commentUpdate$'][_0x4751b0(0x98)](async _0x522bdb=>{const _0x362b1a=_0x4751b0;var _0x3dcfb1,_0xcb9b28,_0x51042b,_0x984fa3;const _0x5e071f=(_0x3dcfb1=this[_0x362b1a(0x71)][_0x362b1a(0xa7)](_0x522bdb['unitId'])[_0x362b1a(0xad)](_0x488573=>_0x488573[_0x362b1a(0x6c)]===_0x522bdb[_0x362b1a(0x6c)]))==null?void 0x0:_0x3dcfb1[_0x362b1a(0x88)];if(!_0x5e071f)return;const {unitId:_0x49abb1,subUnitId:_0x1deb77}=_0x5e071f;switch(_0x522bdb[_0x362b1a(0x7a)]&&this[_0x362b1a(0xd2)]['addUser'](_0x522bdb[_0x362b1a(0x7a)]),_0x522bdb['type']){case v[_0x362b1a(0x97)]:break;case v[_0x362b1a(0x8b)]:{this[_0x362b1a(0x71)][_0x362b1a(0xb0)](_0x49abb1,_0x1deb77,{'unitId':_0x49abb1,'subUnitId':_0x1deb77,'ref':'','id':_0x522bdb[_0x362b1a(0x6e)],'dT':f(+_0x522bdb['createTimestamp']),'threadId':_0x522bdb['threadId'],'personId':(_0x51042b=(_0xcb9b28=_0x522bdb[_0x362b1a(0x7a)])==null?void 0x0:_0xcb9b28[_0x362b1a(0x70)])!=null?_0x51042b:_0x522bdb['userId'],'text':JSON['parse'](_0x522bdb[_0x362b1a(0x7d)]),'parentId':_0x5e071f['id']});break;}case v[_0x362b1a(0x85)]:{const _0x136462=this[_0x362b1a(0x71)][_0x362b1a(0x9b)](_0x49abb1,_0x1deb77,_0x522bdb[_0x362b1a(0x6e)]);_0x136462&&_0x136462[_0x362b1a(0xce)]&&this[_0x362b1a(0x71)][_0x362b1a(0xd6)](_0x49abb1,_0x1deb77,_0x522bdb[_0x362b1a(0x6e)]);break;}case v['Edit']:{this[_0x362b1a(0x71)]['updateComment'](_0x49abb1,_0x1deb77,{'commentId':_0x522bdb[_0x362b1a(0x6e)],'text':JSON[_0x362b1a(0xae)](_0x522bdb['content'])});break;}case v[_0x362b1a(0x7f)]:{const _0x218ee3=(_0x984fa3=this[_0x362b1a(0x71)][_0x362b1a(0xa7)](_0x522bdb['unitId'])[_0x362b1a(0xad)](_0x1a9619=>_0x1a9619[_0x362b1a(0x6c)]===_0x522bdb[_0x362b1a(0x6c)]))==null?void 0x0:_0x984fa3[_0x362b1a(0x88)];_0x218ee3&&this[_0x362b1a(0x71)]['resolveComment'](_0x49abb1,_0x1deb77,_0x218ee3['id'],_0x522bdb[_0x362b1a(0xc5)]===I[_0x362b1a(0x76)]);break;}}}));}};function _0x4559(){const _0x3b81f5=['/universer-api/user/list','addComment','29466pNtcRa','code','Unknown','CollaborationSessionService','forEach','1849658FjfSJH','33468pZeQlf','toStringTag','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverLicensePlugin','payload','get','_initDataSource','Edit','syncUpdateMutationToColla','users','OpenOrReOpen','_init','IThreadCommentDataSourceService','@univerjs/thread-comment','solved','Disposable','UniverThreadCommentDataSourcePlugin','map','format','length','disposeWithMe','ref','getCurrentUser','parentId','ThreadCommentModel','commentUpdate$','12311kaVlNs','_userService','getMemberID','/list','filter','deleteComment','_config','1250BdTofv','userId','18260TfVEWG','thread-comment-data-source.config','CustomRangeType','/solved','post','Plugin','@univerjs/core','2432WBxhlg','saveCommentToSnapshot','/universer-api/comment/unit/','symbol','dayjs','addUser','_configService','comments','@univerjs-pro/collaboration-client','reply','size','customRanges','threadId','body','replyId','YYYY/MM/DD\x20HH:mm','userID','_threadCommentModel','rangeId','onStarting','_initUserSync','COMMENT','Solved','_commentService','values','dataSource','user','2491326VLEZwd','1nGMHZt','content','type','Solve','/edit','@univerjs/network','_threadCommentDataSource','_sessionService','pipe','Delete','stringify','Inject','root','getUser','_threadCommentDataSourceService','Reply','comment','/reply','resolved','UNRECOGNIZED','defineProperty','170337YwRRIn','Module','UserManagerService','requireSession','@univerjs-pro/license','onReady','Add','subscribe','IConfigService','_httpService','getComment','32GQwpwJ','createTimestamp','bufferTime','1091685gOKLsk','error','pluginName','Injector','replies','delete','add','14ctYpNg','getUnit','_injector','getOwnPropertyDescriptor','listComments','updateComment','UniverCollaborationClientPlugin','find','parse'];_0x4559=function(){return _0x3b81f5;};return _0x4559();}p=E([S(0x0,c[_0x3d0c1a(0x87)](b['CommentService'])),S(0x1,c[_0x3d0c1a(0x87)](M[_0x3d0c1a(0xcf)])),S(0x2,c['Inject'](c[_0x3d0c1a(0x93)])),S(0x3,c['Inject'](c[_0x3d0c1a(0xa2)]))],p);const q=_0x3d0c1a(0xdb),D={};var A=Object[_0x3d0c1a(0xa9)],x=(_0x1fdc98,_0x36ff60,_0x5b7ecd,_0x4d43a8)=>{const _0x1bf6b9=_0x3d0c1a;for(var _0x251a5d=_0x4d43a8>0x1?void 0x0:_0x4d43a8?A(_0x36ff60,_0x5b7ecd):_0x36ff60,_0x1441cc=_0x1fdc98[_0x1bf6b9(0xca)]-0x1,_0x5463b2;_0x1441cc>=0x0;_0x1441cc--)(_0x5463b2=_0x1fdc98[_0x1441cc])&&(_0x251a5d=_0x5463b2(_0x251a5d)||_0x251a5d);return _0x251a5d;},_=(_0x315617,_0x7bc0b0)=>(_0x282bc6,_0x4b481c)=>_0x7bc0b0(_0x282bc6,_0x4b481c,_0x315617);function Y(_0x21d9e0,_0x4ce1b2){const _0x1a42a7=_0x3d0c1a,_0x531502=_0x21d9e0['replies'][0x0];return{..._0x4ce1b2,'id':_0x531502[_0x1a42a7(0x6e)],'resolved':_0x21d9e0[_0x1a42a7(0xc5)]===0x1,'dT':f(_0x531502['createTimestamp']),'personId':_0x531502[_0x1a42a7(0xd9)],'threadId':_0x531502[_0x1a42a7(0x6c)]};}function G(_0x210f98,_0x3ef0ca,_0x4af8fd){const _0x197592=_0x3d0c1a;var _0x182681,_0x3fd021;if(((_0x3fd021=(_0x182681=_0x210f98==null?void 0x0:_0x210f98['replies'])==null?void 0x0:_0x182681[_0x197592(0xca)])!=null?_0x3fd021:0x0)>0x0){const _0x341d04=(_0x5ddadf,_0x5ce97d)=>({'id':_0x5ddadf[_0x197592(0x6e)],'threadId':_0x5ddadf[_0x197592(0x6c)],'dT':f(_0x5ddadf['createTimestamp']),'personId':_0x5ddadf[_0x197592(0xd9)],'resolved':_0x210f98[_0x197592(0xc5)]===I['Solved'],'unitId':_0x3ef0ca,'subUnitId':_0x4af8fd,'text':JSON[_0x197592(0xae)](_0x5ddadf['content']),'parentId':_0x5ce97d}),_0x1b1063=_0x341d04(_0x210f98[_0x197592(0xa3)][0x0]);return{..._0x1b1063,'children':_0x210f98[_0x197592(0xa3)]['slice'](0x1)[_0x197592(0xc8)](_0x5b8be7=>_0x341d04(_0x5b8be7,_0x1b1063['id']))};}return null;}let g=class{constructor(_0x5f4b74,_0x37682c,_0xd32b27,_0x40bdd9){const _0x49ddfa=_0x3d0c1a;this[_0x49ddfa(0x9a)]=_0x5f4b74,this['_userService']=_0x37682c,this[_0x49ddfa(0x83)]=_0xd32b27,this[_0x49ddfa(0xa8)]=_0x40bdd9;}async['addComment'](_0x20ef0d){const _0x55db83=_0x3d0c1a;var _0x66b934,_0xed575e;const {parentId:_0x3cd42a,unitId:_0x45337f,text:_0x1beeac,threadId:_0x3fa2dd}=_0x20ef0d,_0x452b2c=(_0xed575e=(_0x66b934=_0x1beeac[_0x55db83(0x6b)])==null?void 0x0:_0x66b934[_0x55db83(0xd5)](_0xd00864=>_0xd00864['rangeType']===c[_0x55db83(0xdc)][_0x55db83(0x75)])['map'](_0x53fa1a=>_0x53fa1a['rangeId']))!=null?_0xed575e:[],_0x4840ce=JSON['stringify'](_0x1beeac),_0x4dafa7=(await this[_0x55db83(0x83)][_0x55db83(0x94)](_0x45337f))['getMemberID']();if(_0x3cd42a){const _0x155474={'memberId':_0x4dafa7,'unitId':_0x45337f,'content':_0x4840ce,'mention':_0x452b2c,'threadId':_0x3fa2dd},_0x22d473=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x45337f+_0x55db83(0x8d),{'body':_0x155474}))[_0x55db83(0x6d)][_0x55db83(0x69)];return{..._0x20ef0d,'id':_0x22d473[_0x55db83(0x6e)],'dT':c[_0x55db83(0xe5)](+_0x22d473[_0x55db83(0x9d)])['format'](_0x55db83(0x6f)),'personId':_0x22d473['userId']};}else{const _0x270f19={'memberId':_0x4dafa7,'unitId':_0x45337f,'content':_0x4840ce,'mention':_0x452b2c},_0x396a89=await this[_0x55db83(0x9a)]['post']('/universer-api/comment/unit/'+_0x45337f+'/add',{'body':_0x270f19});return Y(_0x396a89[_0x55db83(0x6d)][_0x55db83(0x8c)],_0x20ef0d);}}async[_0x3d0c1a(0xab)](_0x35764f){const _0x1937b5=_0x3d0c1a;var _0x5210af,_0x2dd192;const {text:_0x382fbe,unitId:_0x5d9fbe}=_0x35764f,_0x4b54b1=(_0x2dd192=(_0x5210af=_0x382fbe[_0x1937b5(0x6b)])==null?void 0x0:_0x5210af[_0x1937b5(0xd5)](_0x24689c=>_0x24689c['rangeType']===c[_0x1937b5(0xdc)][_0x1937b5(0x75)])['map'](_0x2bf6b9=>_0x2bf6b9[_0x1937b5(0x72)]))!=null?_0x2dd192:[],_0x3ddb3b=JSON[_0x1937b5(0x86)](_0x382fbe),_0x17636c=_0x35764f[_0x1937b5(0x6c)],_0x9f72ff=_0x35764f['id'],_0x55e4bc={'memberId':(await this['_sessionService']['requireSession'](_0x5d9fbe))['getMemberID'](),'unitId':_0x5d9fbe,'threadId':_0x17636c,'mention':_0x4b54b1,'content':_0x3ddb3b,'replyId':_0x9f72ff},_0x417a4d=await this['_httpService'][_0x1937b5(0xde)](_0x1937b5(0xe3)+_0x5d9fbe+_0x1937b5(0x80),{'body':_0x55e4bc});return!_0x417a4d[_0x1937b5(0x6d)][_0x1937b5(0xa0)]||_0x417a4d[_0x1937b5(0x6d)][_0x1937b5(0xa0)]['code']===0x1;}async['resolveComment'](_0x4593b6){const _0x36c25c=_0x3d0c1a,{unitId:_0x3267b1}=_0x4593b6,_0x5d8e62=_0x4593b6[_0x36c25c(0x6c)],_0xcc4b2c={'memberId':this['_userService'][_0x36c25c(0xcd)]()[_0x36c25c(0x70)],'unitId':_0x3267b1,'threadId':_0x5d8e62,'solved':_0x4593b6[_0x36c25c(0x8e)]?I[_0x36c25c(0x76)]:I[_0x36c25c(0xc1)]},_0x3cff15=await this['_httpService'][_0x36c25c(0xde)](_0x36c25c(0xe3)+_0x3267b1+_0x36c25c(0xdd),{'body':_0xcc4b2c});return!_0x3cff15['body'][_0x36c25c(0xa0)]||_0x3cff15[_0x36c25c(0x6d)]['error']['code']===0x1;}async[_0x3d0c1a(0xd6)](_0x2f6b5e,_0x46498c,_0x35910e,_0x15f7a3){const _0x2b12cb=_0x3d0c1a,_0x200a80={'memberId':(await this[_0x2b12cb(0x83)]['requireSession'](_0x2f6b5e))[_0x2b12cb(0xd3)](),'threadId':_0x35910e,'replyId':_0x15f7a3,'unitId':_0x2f6b5e},_0x180ef2=await this[_0x2b12cb(0x9a)][_0x2b12cb(0xde)](_0x2b12cb(0xe3)+_0x2f6b5e+'/delete',{'body':_0x200a80});return!_0x180ef2[_0x2b12cb(0x6d)]['error']||_0x180ef2[_0x2b12cb(0x6d)]['error'][_0x2b12cb(0xb2)]===0x1;}async[_0x3d0c1a(0xaa)](_0x37f2a3,_0x77374,_0x48b2cb){const _0x2aaa55=_0x3d0c1a,_0x2e7164={'unitId':_0x37f2a3,'threadId':_0x48b2cb},_0x4554af=await this['_httpService'][_0x2aaa55(0xde)](_0x2aaa55(0xe3)+_0x37f2a3+_0x2aaa55(0xd4),{'body':_0x2e7164}),_0x454ec0=_0x48b2cb[_0x2aaa55(0xc8)](_0x4c75b7=>G(_0x4554af[_0x2aaa55(0x6d)][_0x2aaa55(0xe8)][_0x4c75b7],_0x37f2a3,_0x77374))[_0x2aaa55(0xd5)](Boolean);return Object[_0x2aaa55(0x78)](_0x4554af[_0x2aaa55(0x6d)][_0x2aaa55(0xc0)])[_0x2aaa55(0xb5)](_0x14ccf0=>{const _0x536545=_0x2aaa55;this[_0x536545(0xd2)]['addUser'](_0x14ccf0);}),_0x454ec0;}[_0x3d0c1a(0xe2)](_0x3ac89c){const _0x599a4e=_0x3d0c1a;return{'id':_0x3ac89c['id'],'threadId':_0x3ac89c[_0x599a4e(0x6c)],'ref':_0x3ac89c[_0x599a4e(0xcc)]};}};g=x([_(0x0,c[_0x3d0c1a(0x87)](P['HTTPService'])),_(0x1,c[_0x3d0c1a(0x87)](c[_0x3d0c1a(0x93)])),_(0x2,c[_0x3d0c1a(0x87)](b[_0x3d0c1a(0xb4)])),_(0x3,c[_0x3d0c1a(0x87)](c[_0x3d0c1a(0xa2)]))],g);var H=Object[_0x3d0c1a(0xa9)],J=(_0xade469,_0xf1bafe,_0x525bdc,_0x38bd6a)=>{const _0x2b377c=_0x3d0c1a;for(var _0x7a30eb=_0x38bd6a>0x1?void 0x0:_0x38bd6a?H(_0xf1bafe,_0x525bdc):_0xf1bafe,_0x367d5a=_0xade469[_0x2b377c(0xca)]-0x1,_0xfd5870;_0x367d5a>=0x0;_0x367d5a--)(_0xfd5870=_0xade469[_0x367d5a])&&(_0x7a30eb=_0xfd5870(_0x7a30eb)||_0x7a30eb);return _0x7a30eb;},y=(_0x65a432,_0x548697)=>(_0x58a14d,_0x217e54)=>_0x548697(_0x58a14d,_0x217e54,_0x65a432);let C=class extends c[_0x3d0c1a(0xc6)]{constructor(_0x57143e,_0x5e0345){const _0x10cd98=_0x3d0c1a;super(),this[_0x10cd98(0x8a)]=_0x57143e,this[_0x10cd98(0x82)]=_0x5e0345,this[_0x10cd98(0xbd)]();}['_initDataSource'](){const _0x2e6648=_0x3d0c1a;this['_threadCommentDataSourceService'][_0x2e6648(0x79)]=this[_0x2e6648(0x82)],this[_0x2e6648(0x8a)][_0x2e6648(0xbf)]=!0x1;}};C=J([y(0x0,M[_0x3d0c1a(0xc3)]),y(0x1,c[_0x3d0c1a(0x87)](g))],C);var F=Object[_0x3d0c1a(0x90)],L=Object[_0x3d0c1a(0xa9)],Z=(_0x117156,_0x25d973,_0x15ce9f)=>_0x25d973 in _0x117156?F(_0x117156,_0x25d973,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15ce9f}):_0x117156[_0x25d973]=_0x15ce9f,W=(_0xb0d699,_0x57e9a9,_0xdc65bd,_0x57cf0e)=>{const _0x477002=_0x3d0c1a;for(var _0x15e92f=_0x57cf0e>0x1?void 0x0:_0x57cf0e?L(_0x57e9a9,_0xdc65bd):_0x57e9a9,_0x5c0eb0=_0xb0d699[_0x477002(0xca)]-0x1,_0x3db8e8;_0x5c0eb0>=0x0;_0x5c0eb0--)(_0x3db8e8=_0xb0d699[_0x5c0eb0])&&(_0x15e92f=_0x3db8e8(_0x15e92f)||_0x15e92f);return _0x15e92f;},O=(_0x8b8ac2,_0x1e2631)=>(_0x1c2566,_0x502b8b)=>_0x1e2631(_0x1c2566,_0x502b8b,_0x8b8ac2),N=(_0x5547d8,_0x9f0b,_0x184710)=>Z(_0x5547d8,typeof _0x9f0b!=_0x3d0c1a(0xe4)?_0x9f0b+'':_0x9f0b,_0x184710);exports[_0x3d0c1a(0xc7)]=class extends c[_0x3d0c1a(0xdf)]{constructor(_0xc7fa7a=D,_0x17fcae,_0x2b8e89){const _0x3670b1=_0x3d0c1a;super(),this[_0x3670b1(0xd7)]=_0xc7fa7a,this['_injector']=_0x17fcae,this[_0x3670b1(0xe7)]=_0x2b8e89;const {..._0x2c17af}=c['merge']({},D,this[_0x3670b1(0xd7)]);this[_0x3670b1(0xe7)]['setConfig'](q,_0x2c17af);}[_0x3d0c1a(0x73)](){const _0xa82ea9=_0x3d0c1a;[[g],[C],[p]][_0xa82ea9(0xb5)](_0x1cc6c2=>{this['_injector']['add'](_0x1cc6c2);});}[_0x3d0c1a(0x96)](){const _0x195e4c=_0x3d0c1a;this[_0x195e4c(0xa8)][_0x195e4c(0xbc)](C),this[_0x195e4c(0xa8)][_0x195e4c(0xbc)](p);}},N(exports[_0x3d0c1a(0xc7)],_0x3d0c1a(0xa1),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x3d0c1a(0xc7)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x3d0c1a(0xac)],T[_0x3d0c1a(0xba)]),O(0x1,c[_0x3d0c1a(0x87)](c['Injector'])),O(0x2,c[_0x3d0c1a(0x99)])],exports[_0x3d0c1a(0xc7)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5af817=_0x52b1;(function(_0x18099e,_0x4eb9f0){const _0x4d06d5=_0x52b1,_0x2e5aed=_0x18099e();while(!![]){try{const _0x511d4=-parseInt(_0x4d06d5(0x1be))/0x1*(parseInt(_0x4d06d5(0x1e7))/0x2)+-parseInt(_0x4d06d5(0x20f))/0x3+parseInt(_0x4d06d5(0x1c0))/0x4+-parseInt(_0x4d06d5(0x1e6))/0x5+parseInt(_0x4d06d5(0x1cf))/0x6+-parseInt(_0x4d06d5(0x1d2))/0x7*(-parseInt(_0x4d06d5(0x1ce))/0x8)+-parseInt(_0x4d06d5(0x1ed))/0x9;if(_0x511d4===_0x4eb9f0)break;else _0x2e5aed['push'](_0x2e5aed['shift']());}catch(_0x34f9a9){_0x2e5aed['push'](_0x2e5aed['shift']());}}}(_0x4617,0xa3da2));import{CommentService as _0x498a04,CollaborationSessionService as _0x339043,UniverCollaborationClientPlugin as _0x2a0745}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x40a7c8}from'@univerjs-pro/license';import{dayjs as _0x146095,UserManagerService as _0x253cfc,Inject as _0x1024f5,Injector as _0x500c18,Disposable as _0x1a58c4,CustomRangeType as _0x1b28c6,UniverInstanceType as _0x175b10,DependentOn as _0x17566a,IConfigService as _0x51ffa0,Plugin as _0x4977e9,merge as _0x1a1e5e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x513b47}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x532a04,IThreadCommentDataSourceService as _0x31e088}from'@univerjs/thread-comment';import{bufferTime as _0x58b843}from'rxjs';import{HTTPService as _0x375401}from'@univerjs/network';const W=_0x5af817(0x1b2);function _0x4617(){const _0x295def=['_threadCommentDataSourceService','addUser','code','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_sessionService','/delete','2326395nqrXDu','2MYDwgB','deleteComment','Edit','requireSession','rangeId','content','2871621akjyaW','userID','users','Add','resolveComment','onStarting','length','post','rangeType','commentUpdate$','/universer-api/user/list','pluginName','thread-comment-data-source.config','map','saveCommentToSnapshot','pipe','/list','createTimestamp','find','onReady','_config','UNRECOGNIZED','defineProperty','_initDataSource','getUser','unitId','getOwnPropertyDescriptor','forEach','/universer-api/comment/unit/','replyId','error','Reply','format','userId','474558EnrPEW','getCurrentUser','add','symbol','comments','syncUpdateMutationToColla','OpenOrReOpen','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','root','Delete','resolved','disposeWithMe','_injector','user','_commentService','getMemberID','Solve','/reply','1299806ZdSTAs','reply','1368984BsnSMN','threadId','getUnit','filter','Unknown','get','replies','_httpService','_configService','COMMENT','addComment','listComments','slice','body','10174552MwuSby','7796478BGxbrT','_userService','stringify','7mLRzZi','values','parentId','subscribe','setConfig','type','comment','solved','Solved','parse','delete','dataSource','getComment'];_0x4617=function(){return _0x295def;};return _0x4617();}var I=(_0x40a8c3=>(_0x40a8c3[_0x40a8c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x40a8c3[_0x40a8c3[_0x5af817(0x1da)]=0x1]=_0x5af817(0x1da),_0x40a8c3[_0x40a8c3[_0x5af817(0x202)]=-0x1]=_0x5af817(0x202),_0x40a8c3))(I||{}),v=(_0x31ed0c=>(_0x31ed0c[_0x31ed0c['Unknown']=0x0]=_0x5af817(0x1c4),_0x31ed0c[_0x31ed0c[_0x5af817(0x1f0)]=0x1]=_0x5af817(0x1f0),_0x31ed0c[_0x31ed0c[_0x5af817(0x20c)]=0x2]=_0x5af817(0x20c),_0x31ed0c[_0x31ed0c['Edit']=0x3]=_0x5af817(0x1e9),_0x31ed0c[_0x31ed0c[_0x5af817(0x1b5)]=0x4]='Delete',_0x31ed0c[_0x31ed0c['Solve']=0x5]=_0x5af817(0x1bc),_0x31ed0c[_0x31ed0c[_0x5af817(0x202)]=-0x1]='UNRECOGNIZED',_0x31ed0c))(v||{});const D=_0xdda57d=>_0x146095(new Date(+_0xdda57d))[_0x5af817(0x20d)](_0x5af817(0x1e2)),B=async(_0xa1b7d4,_0x1a05fb)=>{const _0x530eae=_0x5af817,_0x4e4670=_0xa1b7d4[_0x530eae(0x1c5)](_0x253cfc),_0x338d95=_0xa1b7d4[_0x530eae(0x1c5)](_0x375401);_0x1a05fb[_0x530eae(0x208)](_0x26c221=>{const _0x431492=_0x530eae;_0x4e4670[_0x431492(0x205)](_0x26c221)&&_0x1a05fb[_0x431492(0x1dc)](_0x26c221);}),_0x1a05fb['size']&&(await _0x338d95[_0x530eae(0x1c5)](_0x530eae(0x1f7),{'params':{'userIDs':[..._0x1a05fb]}}))[_0x530eae(0x1cd)][_0x530eae(0x1ef)][_0x530eae(0x208)](_0x4da052=>{const _0x3dbbc9=_0x530eae;_0x4da052&&_0x4e4670[_0x3dbbc9(0x1e0)](_0x4da052);});};var K=Object[_0x5af817(0x207)],V=(_0x20b6e8,_0x57a2bd,_0x298383,_0x55291f)=>{const _0x1b2834=_0x5af817;for(var _0xdbec4d=_0x55291f>0x1?void 0x0:_0x55291f?K(_0x57a2bd,_0x298383):_0x57a2bd,_0x597d86=_0x20b6e8[_0x1b2834(0x1f3)]-0x1,_0x41f298;_0x597d86>=0x0;_0x597d86--)(_0x41f298=_0x20b6e8[_0x597d86])&&(_0xdbec4d=_0x41f298(_0xdbec4d)||_0xdbec4d);return _0xdbec4d;},p=(_0x5749c8,_0x1bcf80)=>(_0x5d3b03,_0x9ae975)=>_0x1bcf80(_0x5d3b03,_0x9ae975,_0x5749c8);let S=class extends _0x1a58c4{constructor(_0x44d963,_0x2b937d,_0x59e383,_0x18c454){const _0x136d5a=_0x5af817;super(),this[_0x136d5a(0x1ba)]=_0x44d963,this[_0x136d5a(0x1b3)]=_0x2b937d,this[_0x136d5a(0x1d0)]=_0x59e383,this[_0x136d5a(0x1b8)]=_0x18c454,this[_0x136d5a(0x1b1)](),this['_initUserSync']();}['_initUserSync'](){const _0x114fcb=_0x5af817;this[_0x114fcb(0x1b7)](this['_threadCommentModel'][_0x114fcb(0x1f6)][_0x114fcb(0x1fc)](_0x58b843(0x10))[_0x114fcb(0x1d5)](_0x429217=>{const _0x423583=_0x114fcb,_0x31f1de=new Set();_0x429217['forEach'](_0x3898d9=>{const _0x12717f=_0x52b1;switch(_0x3898d9['type']){case _0x12717f(0x211):{const _0xbf14cd=_0x3898d9['payload']['personId'];_0x31f1de[_0x12717f(0x211)](_0xbf14cd);break;}}}),B(this[_0x423583(0x1b8)],_0x31f1de);}));}[_0x5af817(0x1b1)](){const _0x5ce26e=_0x5af817;this[_0x5ce26e(0x1b7)](this[_0x5ce26e(0x1ba)][_0x5ce26e(0x1f6)][_0x5ce26e(0x1d5)](async _0x1224dd=>{const _0x100fe0=_0x5ce26e;var _0x2dcbcc,_0xcf9636,_0x2783ae,_0x4da040;const _0x2ce041=(_0x2dcbcc=this[_0x100fe0(0x1b3)]['getUnit'](_0x1224dd[_0x100fe0(0x206)])[_0x100fe0(0x1ff)](_0x5df0ed=>_0x5df0ed['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x2dcbcc[_0x100fe0(0x1b4)];if(!_0x2ce041)return;const {unitId:_0x44d994,subUnitId:_0x584b37}=_0x2ce041;switch(_0x1224dd[_0x100fe0(0x1b9)]&&this['_userService'][_0x100fe0(0x1e0)](_0x1224dd[_0x100fe0(0x1b9)]),_0x1224dd['type']){case v[_0x100fe0(0x1f0)]:break;case v[_0x100fe0(0x20c)]:{this[_0x100fe0(0x1b3)][_0x100fe0(0x1ca)](_0x44d994,_0x584b37,{'unitId':_0x44d994,'subUnitId':_0x584b37,'ref':'','id':_0x1224dd[_0x100fe0(0x20a)],'dT':D(+_0x1224dd[_0x100fe0(0x1fe)]),'threadId':_0x1224dd[_0x100fe0(0x1c1)],'personId':(_0x2783ae=(_0xcf9636=_0x1224dd[_0x100fe0(0x1b9)])==null?void 0x0:_0xcf9636[_0x100fe0(0x1ee)])!=null?_0x2783ae:_0x1224dd[_0x100fe0(0x20e)],'text':JSON['parse'](_0x1224dd[_0x100fe0(0x1ec)]),'parentId':_0x2ce041['id']});break;}case v[_0x100fe0(0x1b5)]:{const _0x4c3ae0=this[_0x100fe0(0x1b3)][_0x100fe0(0x1de)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);_0x4c3ae0&&_0x4c3ae0[_0x100fe0(0x1d4)]&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1e8)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);break;}case v[_0x100fe0(0x1e9)]:{this[_0x100fe0(0x1b3)]['updateComment'](_0x44d994,_0x584b37,{'commentId':_0x1224dd[_0x100fe0(0x20a)],'text':JSON[_0x100fe0(0x1db)](_0x1224dd['content'])});break;}case v[_0x100fe0(0x1bc)]:{const _0x14f0ba=(_0x4da040=this['_threadCommentModel'][_0x100fe0(0x1c2)](_0x1224dd['unitId'])['find'](_0x294c9a=>_0x294c9a['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x4da040[_0x100fe0(0x1b4)];_0x14f0ba&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1f1)](_0x44d994,_0x584b37,_0x14f0ba['id'],_0x1224dd[_0x100fe0(0x1d9)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x1024f5(_0x498a04)),p(0x1,_0x1024f5(_0x532a04)),p(0x2,_0x1024f5(_0x253cfc)),p(0x3,_0x1024f5(_0x500c18))],S);const z=_0x5af817(0x1f9),M={};var k=Object[_0x5af817(0x207)],Q=(_0x2787e9,_0x2a84de,_0x40082e,_0x3cea38)=>{for(var _0x294357=_0x3cea38>0x1?void 0x0:_0x3cea38?k(_0x2a84de,_0x40082e):_0x2a84de,_0x43f81f=_0x2787e9['length']-0x1,_0x8d983a;_0x43f81f>=0x0;_0x43f81f--)(_0x8d983a=_0x2787e9[_0x43f81f])&&(_0x294357=_0x8d983a(_0x294357)||_0x294357);return _0x294357;},_=(_0x53befe,_0x10ebfb)=>(_0x260bbb,_0x7ddaff)=>_0x10ebfb(_0x260bbb,_0x7ddaff,_0x53befe);function X(_0xf02a6a,_0x19896b){const _0x6eb1a3=_0x5af817,_0x25efa7=_0xf02a6a['replies'][0x0];return{..._0x19896b,'id':_0x25efa7[_0x6eb1a3(0x20a)],'resolved':_0xf02a6a[_0x6eb1a3(0x1d9)]===0x1,'dT':D(_0x25efa7['createTimestamp']),'personId':_0x25efa7[_0x6eb1a3(0x20e)],'threadId':_0x25efa7[_0x6eb1a3(0x1c1)]};}function ee(_0x53718d,_0x47e15a,_0x2ec43d){const _0x1e4213=_0x5af817;var _0x5d485c,_0x9f0f78;if(((_0x9f0f78=(_0x5d485c=_0x53718d==null?void 0x0:_0x53718d['replies'])==null?void 0x0:_0x5d485c[_0x1e4213(0x1f3)])!=null?_0x9f0f78:0x0)>0x0){const _0x231253=(_0x779f3e,_0x41a5aa)=>({'id':_0x779f3e[_0x1e4213(0x20a)],'threadId':_0x779f3e[_0x1e4213(0x1c1)],'dT':D(_0x779f3e[_0x1e4213(0x1fe)]),'personId':_0x779f3e[_0x1e4213(0x20e)],'resolved':_0x53718d[_0x1e4213(0x1d9)]===I[_0x1e4213(0x1da)],'unitId':_0x47e15a,'subUnitId':_0x2ec43d,'text':JSON[_0x1e4213(0x1db)](_0x779f3e[_0x1e4213(0x1ec)]),'parentId':_0x41a5aa}),_0x236f50=_0x231253(_0x53718d[_0x1e4213(0x1c6)][0x0]);return{..._0x236f50,'children':_0x53718d[_0x1e4213(0x1c6)][_0x1e4213(0x1cc)](0x1)[_0x1e4213(0x1fa)](_0x6e3739=>_0x231253(_0x6e3739,_0x236f50['id']))};}return null;}let f=class{constructor(_0x59d1dc,_0x58580d,_0x47d25f,_0x1162ca){const _0x2c1b46=_0x5af817;this['_httpService']=_0x59d1dc,this['_userService']=_0x58580d,this[_0x2c1b46(0x1e4)]=_0x47d25f,this[_0x2c1b46(0x1b8)]=_0x1162ca;}async['addComment'](_0x4b49eb){const _0x17e06f=_0x5af817;var _0x21d4ab,_0x2d710b;const {parentId:_0x385a6e,unitId:_0x2b81ff,text:_0x2f9e47,threadId:_0x3312cf}=_0x4b49eb,_0x317f95=(_0x2d710b=(_0x21d4ab=_0x2f9e47['customRanges'])==null?void 0x0:_0x21d4ab[_0x17e06f(0x1c3)](_0x224cd9=>_0x224cd9[_0x17e06f(0x1f5)]===_0x1b28c6[_0x17e06f(0x1c9)])['map'](_0x22641d=>_0x22641d[_0x17e06f(0x1eb)]))!=null?_0x2d710b:[],_0x1555a1=JSON['stringify'](_0x2f9e47),_0x2ec2d7=(await this[_0x17e06f(0x1e4)][_0x17e06f(0x1ea)](_0x2b81ff))[_0x17e06f(0x1bb)]();if(_0x385a6e){const _0x39bb5e={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95,'threadId':_0x3312cf},_0x323498=(await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)]('/universer-api/comment/unit/'+_0x2b81ff+_0x17e06f(0x1bd),{'body':_0x39bb5e}))[_0x17e06f(0x1cd)][_0x17e06f(0x1bf)];return{..._0x4b49eb,'id':_0x323498['replyId'],'dT':_0x146095(+_0x323498[_0x17e06f(0x1fe)])['format'](_0x17e06f(0x1e2)),'personId':_0x323498[_0x17e06f(0x20e)]};}else{const _0x50c778={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95},_0x2a7732=await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)](_0x17e06f(0x209)+_0x2b81ff+'/add',{'body':_0x50c778});return X(_0x2a7732[_0x17e06f(0x1cd)][_0x17e06f(0x1d8)],_0x4b49eb);}}async['updateComment'](_0x4945ee){const _0x2de3fd=_0x5af817;var _0x48ebc6,_0x1c88ec;const {text:_0x485f86,unitId:_0x5a5ef4}=_0x4945ee,_0x254042=(_0x1c88ec=(_0x48ebc6=_0x485f86['customRanges'])==null?void 0x0:_0x48ebc6[_0x2de3fd(0x1c3)](_0x43c832=>_0x43c832[_0x2de3fd(0x1f5)]===_0x1b28c6['COMMENT'])[_0x2de3fd(0x1fa)](_0x12552d=>_0x12552d[_0x2de3fd(0x1eb)]))!=null?_0x1c88ec:[],_0x19e35f=JSON[_0x2de3fd(0x1d1)](_0x485f86),_0x1151a4=_0x4945ee[_0x2de3fd(0x1c1)],_0x33b77e=_0x4945ee['id'],_0x49cdaf={'memberId':(await this['_sessionService'][_0x2de3fd(0x1ea)](_0x5a5ef4))[_0x2de3fd(0x1bb)](),'unitId':_0x5a5ef4,'threadId':_0x1151a4,'mention':_0x254042,'content':_0x19e35f,'replyId':_0x33b77e},_0x2e1826=await this[_0x2de3fd(0x1c7)][_0x2de3fd(0x1f4)]('/universer-api/comment/unit/'+_0x5a5ef4+'/edit',{'body':_0x49cdaf});return!_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)]||_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)][_0x2de3fd(0x1e1)]===0x1;}async[_0x5af817(0x1f1)](_0x49d58a){const _0x3de162=_0x5af817,{unitId:_0x354fdb}=_0x49d58a,_0x33a349=_0x49d58a[_0x3de162(0x1c1)],_0x4d20b9={'memberId':this[_0x3de162(0x1d0)][_0x3de162(0x210)]()[_0x3de162(0x1ee)],'unitId':_0x354fdb,'threadId':_0x33a349,'solved':_0x49d58a[_0x3de162(0x1b6)]?I[_0x3de162(0x1da)]:I[_0x3de162(0x215)]},_0x35ffa2=await this[_0x3de162(0x1c7)][_0x3de162(0x1f4)]('/universer-api/comment/unit/'+_0x354fdb+'/solved',{'body':_0x4d20b9});return!_0x35ffa2['body'][_0x3de162(0x20b)]||_0x35ffa2['body']['error'][_0x3de162(0x1e1)]===0x1;}async[_0x5af817(0x1e8)](_0x23f4ec,_0x52bdba,_0x44a5eb,_0x3466f5){const _0x6ebf77=_0x5af817,_0x3cf0a8={'memberId':(await this[_0x6ebf77(0x1e4)]['requireSession'](_0x23f4ec))['getMemberID'](),'threadId':_0x44a5eb,'replyId':_0x3466f5,'unitId':_0x23f4ec},_0x3d309f=await this[_0x6ebf77(0x1c7)][_0x6ebf77(0x1f4)](_0x6ebf77(0x209)+_0x23f4ec+_0x6ebf77(0x1e5),{'body':_0x3cf0a8});return!_0x3d309f['body'][_0x6ebf77(0x20b)]||_0x3d309f[_0x6ebf77(0x1cd)]['error'][_0x6ebf77(0x1e1)]===0x1;}async[_0x5af817(0x1cb)](_0x4cd549,_0x2044f3,_0x182bf6){const _0xba06cb=_0x5af817,_0x726cb1={'unitId':_0x4cd549,'threadId':_0x182bf6},_0x2c2fd0=await this[_0xba06cb(0x1c7)][_0xba06cb(0x1f4)](_0xba06cb(0x209)+_0x4cd549+_0xba06cb(0x1fd),{'body':_0x726cb1}),_0x12e1d4=_0x182bf6['map'](_0x4dbb08=>ee(_0x2c2fd0['body'][_0xba06cb(0x213)][_0x4dbb08],_0x4cd549,_0x2044f3))[_0xba06cb(0x1c3)](Boolean);return Object[_0xba06cb(0x1d3)](_0x2c2fd0[_0xba06cb(0x1cd)][_0xba06cb(0x1ef)])['forEach'](_0x4b10db=>{const _0x4e4f29=_0xba06cb;this[_0x4e4f29(0x1d0)][_0x4e4f29(0x1e0)](_0x4b10db);}),_0x12e1d4;}[_0x5af817(0x1fb)](_0x4598dd){return{'id':_0x4598dd['id'],'threadId':_0x4598dd['threadId'],'ref':_0x4598dd['ref']};}};f=Q([_(0x0,_0x1024f5(_0x375401)),_(0x1,_0x1024f5(_0x253cfc)),_(0x2,_0x1024f5(_0x339043)),_(0x3,_0x1024f5(_0x500c18))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x54645e,_0x2f4f82,_0x119bd0,_0x4a8e0a)=>{const _0x753257=_0x5af817;for(var _0x3e084c=_0x4a8e0a>0x1?void 0x0:_0x4a8e0a?re(_0x2f4f82,_0x119bd0):_0x2f4f82,_0x5cb717=_0x54645e[_0x753257(0x1f3)]-0x1,_0x520c50;_0x5cb717>=0x0;_0x5cb717--)(_0x520c50=_0x54645e[_0x5cb717])&&(_0x3e084c=_0x520c50(_0x3e084c)||_0x3e084c);return _0x3e084c;},N=(_0x349013,_0x563dfd)=>(_0x518fd4,_0x2d68db)=>_0x563dfd(_0x518fd4,_0x2d68db,_0x349013);function _0x52b1(_0xa09449,_0x1cd1a7){const _0x461703=_0x4617();return _0x52b1=function(_0x52b153,_0x57cb9f){_0x52b153=_0x52b153-0x1b1;let _0x188f23=_0x461703[_0x52b153];return _0x188f23;},_0x52b1(_0xa09449,_0x1cd1a7);}let g=class extends _0x1a58c4{constructor(_0x101963,_0x458e6c){const _0x155773=_0x5af817;super(),this[_0x155773(0x1df)]=_0x101963,this[_0x155773(0x1e3)]=_0x458e6c,this['_initDataSource']();}[_0x5af817(0x204)](){const _0x25041d=_0x5af817;this['_threadCommentDataSourceService'][_0x25041d(0x1dd)]=this[_0x25041d(0x1e3)],this[_0x25041d(0x1df)][_0x25041d(0x214)]=!0x1;}};g=te([N(0x0,_0x31e088),N(0x1,_0x1024f5(f))],g);var se=Object[_0x5af817(0x203)],oe=Object[_0x5af817(0x207)],ne=(_0x4a1aae,_0x9989d2,_0x451eba)=>_0x9989d2 in _0x4a1aae?se(_0x4a1aae,_0x9989d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x451eba}):_0x4a1aae[_0x9989d2]=_0x451eba,ie=(_0x32358a,_0x5c1f3e,_0x35a4b7,_0x1125f0)=>{const _0x37a8cd=_0x5af817;for(var _0x512706=_0x1125f0>0x1?void 0x0:_0x1125f0?oe(_0x5c1f3e,_0x35a4b7):_0x5c1f3e,_0x567da2=_0x32358a[_0x37a8cd(0x1f3)]-0x1,_0x5be124;_0x567da2>=0x0;_0x567da2--)(_0x5be124=_0x32358a[_0x567da2])&&(_0x512706=_0x5be124(_0x512706)||_0x512706);return _0x512706;},w=(_0x18562c,_0x2c2433)=>(_0x4da58c,_0xcc80e)=>_0x2c2433(_0x4da58c,_0xcc80e,_0x18562c),$=(_0x1e39da,_0x2cf86d,_0x597d82)=>ne(_0x1e39da,typeof _0x2cf86d!=_0x5af817(0x212)?_0x2cf86d+'':_0x2cf86d,_0x597d82);let b=class extends _0x4977e9{constructor(_0xe46c66=M,_0x27c311,_0xed5db9){const _0x157754=_0x5af817;super(),this[_0x157754(0x201)]=_0xe46c66,this[_0x157754(0x1b8)]=_0x27c311,this[_0x157754(0x1c8)]=_0xed5db9;const {..._0x41be85}=_0x1a1e5e({},M,this[_0x157754(0x201)]);this['_configService'][_0x157754(0x1d6)](z,_0x41be85);}[_0x5af817(0x1f2)](){const _0x4636ac=_0x5af817;[[f],[g],[S]][_0x4636ac(0x208)](_0x3a33ad=>{this['_injector']['add'](_0x3a33ad);});}[_0x5af817(0x200)](){const _0xc29a83=_0x5af817;this[_0xc29a83(0x1b8)]['get'](g),this[_0xc29a83(0x1b8)][_0xc29a83(0x1c5)](S);}};$(b,_0x5af817(0x1f8),W),$(b,_0x5af817(0x1d7),_0x175b10['UNIVER_UNKNOWN']),b=ie([_0x17566a(_0x513b47,_0x2a0745,_0x40a7c8),w(0x1,_0x1024f5(_0x500c18)),w(0x2,_0x51ffa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x10e254=_0x5207;(function(_0xf79569,_0x1815e6){const _0x1c7807=_0x5207,_0x154049=_0xf79569();while(!![]){try{const _0x2fedd0=-parseInt(_0x1c7807(0x231))/0x1+parseInt(_0x1c7807(0x21d))/0x2*(-parseInt(_0x1c7807(0x214))/0x3)+parseInt(_0x1c7807(0x234))/0x4*(parseInt(_0x1c7807(0x22b))/0x5)+parseInt(_0x1c7807(0x206))/0x6+parseInt(_0x1c7807(0x1f9))/0x7*(-parseInt(_0x1c7807(0x228))/0x8)+-parseInt(_0x1c7807(0x240))/0x9*(parseInt(_0x1c7807(0x20d))/0xa)+parseInt(_0x1c7807(0x208))/0xb*(parseInt(_0x1c7807(0x218))/0xc);if(_0x2fedd0===_0x1815e6)break;else _0x154049['push'](_0x154049['shift']());}catch(_0x30361f){_0x154049['push'](_0x154049['shift']());}}}(_0x38f8,0x7e7d1));import{CommentService as _0x1c97aa,CollaborationSessionService as _0x2e01b2,UniverCollaborationClientPlugin as _0x1afa9f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5f1af7}from'@univerjs-pro/license';import{dayjs as _0x475bbd,UserManagerService as _0x17e060,Inject as _0x6d6d7f,Injector as _0x5832fe,Disposable as _0x398fe1,CustomRangeType as _0x134f38,UniverInstanceType as _0x4565c4,DependentOn as _0x173423,IConfigService as _0x56350f,Plugin as _0x571f03,merge as _0x270269}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b05fa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5d314a,IThreadCommentDataSourceService as _0x38b225}from'@univerjs/thread-comment';import{bufferTime as _0x1c4cd0}from'rxjs';import{HTTPService as _0x3f6b99}from'@univerjs/network';const W=_0x10e254(0x1dc);var I=(_0x39b649=>(_0x39b649[_0x39b649[_0x10e254(0x235)]=0x0]=_0x10e254(0x235),_0x39b649[_0x39b649[_0x10e254(0x1dd)]=0x1]=_0x10e254(0x1dd),_0x39b649[_0x39b649['UNRECOGNIZED']=-0x1]=_0x10e254(0x23f),_0x39b649))(I||{}),v=(_0x5e2dcd=>(_0x5e2dcd[_0x5e2dcd[_0x10e254(0x207)]=0x0]=_0x10e254(0x207),_0x5e2dcd[_0x5e2dcd[_0x10e254(0x1fe)]=0x1]=_0x10e254(0x1fe),_0x5e2dcd[_0x5e2dcd[_0x10e254(0x217)]=0x2]=_0x10e254(0x217),_0x5e2dcd[_0x5e2dcd['Edit']=0x3]=_0x10e254(0x20b),_0x5e2dcd[_0x5e2dcd[_0x10e254(0x1eb)]=0x4]='Delete',_0x5e2dcd[_0x5e2dcd[_0x10e254(0x237)]=0x5]='Solve',_0x5e2dcd[_0x5e2dcd[_0x10e254(0x23f)]=-0x1]=_0x10e254(0x23f),_0x5e2dcd))(v||{});const D=_0x5a48d1=>_0x475bbd(new Date(+_0x5a48d1))['format'](_0x10e254(0x1ff)),B=async(_0x6aae5b,_0x241094)=>{const _0x314b50=_0x10e254,_0x24921d=_0x6aae5b[_0x314b50(0x21a)](_0x17e060),_0x783dc1=_0x6aae5b[_0x314b50(0x21a)](_0x3f6b99);_0x241094[_0x314b50(0x1fd)](_0x3af666=>{const _0x4aa85a=_0x314b50;_0x24921d[_0x4aa85a(0x1ed)](_0x3af666)&&_0x241094[_0x4aa85a(0x1de)](_0x3af666);}),_0x241094['size']&&(await _0x783dc1[_0x314b50(0x21a)]('/universer-api/user/list',{'params':{'userIDs':[..._0x241094]}}))[_0x314b50(0x1e9)][_0x314b50(0x223)][_0x314b50(0x1fd)](_0xed94bb=>{const _0x4ed79e=_0x314b50;_0xed94bb&&_0x24921d[_0x4ed79e(0x225)](_0xed94bb);});};var K=Object[_0x10e254(0x1e4)],V=(_0x3407a6,_0x4a1595,_0x2dbc10,_0x1cb66d)=>{const _0x1b2ac8=_0x10e254;for(var _0x3cde95=_0x1cb66d>0x1?void 0x0:_0x1cb66d?K(_0x4a1595,_0x2dbc10):_0x4a1595,_0x1339ac=_0x3407a6[_0x1b2ac8(0x205)]-0x1,_0x304df9;_0x1339ac>=0x0;_0x1339ac--)(_0x304df9=_0x3407a6[_0x1339ac])&&(_0x3cde95=_0x304df9(_0x3cde95)||_0x3cde95);return _0x3cde95;},p=(_0x25c9a3,_0x22c8b7)=>(_0x2f8cf9,_0x2283ae)=>_0x22c8b7(_0x2f8cf9,_0x2283ae,_0x25c9a3);let S=class extends _0x398fe1{constructor(_0x534990,_0x46c721,_0x1cc581,_0x2fa418){const _0x1e6839=_0x10e254;super(),this[_0x1e6839(0x229)]=_0x534990,this['_threadCommentModel']=_0x46c721,this['_userService']=_0x1cc581,this[_0x1e6839(0x20f)]=_0x2fa418,this[_0x1e6839(0x22f)](),this[_0x1e6839(0x21e)]();}[_0x10e254(0x21e)](){const _0x2f8fbc=_0x10e254;this[_0x2f8fbc(0x1e7)](this[_0x2f8fbc(0x21b)][_0x2f8fbc(0x20e)][_0x2f8fbc(0x1fa)](_0x1c4cd0(0x10))[_0x2f8fbc(0x1e8)](_0x513880=>{const _0x261fc6=_0x2f8fbc,_0x169595=new Set();_0x513880[_0x261fc6(0x1fd)](_0x5423cb=>{const _0x258597=_0x261fc6;switch(_0x5423cb[_0x258597(0x239)]){case _0x258597(0x222):{const _0x45d6a5=_0x5423cb[_0x258597(0x21c)][_0x258597(0x201)];_0x169595[_0x258597(0x222)](_0x45d6a5);break;}}}),B(this['_injector'],_0x169595);}));}[_0x10e254(0x22f)](){const _0x87412f=_0x10e254;this[_0x87412f(0x1e7)](this[_0x87412f(0x229)][_0x87412f(0x20e)][_0x87412f(0x1e8)](async _0x8080ff=>{const _0x5061f6=_0x87412f;var _0x4c478e,_0x10296e,_0x457ab1,_0x1b4ae4;const _0x342836=(_0x4c478e=this[_0x5061f6(0x21b)][_0x5061f6(0x23a)](_0x8080ff['unitId'])[_0x5061f6(0x232)](_0x50a19f=>_0x50a19f[_0x5061f6(0x21f)]===_0x8080ff[_0x5061f6(0x21f)]))==null?void 0x0:_0x4c478e[_0x5061f6(0x23c)];if(!_0x342836)return;const {unitId:_0x18b738,subUnitId:_0x4b0a84}=_0x342836;switch(_0x8080ff[_0x5061f6(0x1f1)]&&this[_0x5061f6(0x1e0)]['addUser'](_0x8080ff['user']),_0x8080ff['type']){case v['Add']:break;case v[_0x5061f6(0x217)]:{this[_0x5061f6(0x21b)][_0x5061f6(0x220)](_0x18b738,_0x4b0a84,{'unitId':_0x18b738,'subUnitId':_0x4b0a84,'ref':'','id':_0x8080ff[_0x5061f6(0x1df)],'dT':D(+_0x8080ff[_0x5061f6(0x215)]),'threadId':_0x8080ff[_0x5061f6(0x21f)],'personId':(_0x457ab1=(_0x10296e=_0x8080ff[_0x5061f6(0x1f1)])==null?void 0x0:_0x10296e[_0x5061f6(0x1e2)])!=null?_0x457ab1:_0x8080ff['userId'],'text':JSON[_0x5061f6(0x1e5)](_0x8080ff[_0x5061f6(0x1fb)]),'parentId':_0x342836['id']});break;}case v[_0x5061f6(0x1eb)]:{const _0x381e28=this[_0x5061f6(0x21b)][_0x5061f6(0x204)](_0x18b738,_0x4b0a84,_0x8080ff['replyId']);_0x381e28&&_0x381e28[_0x5061f6(0x238)]&&this[_0x5061f6(0x21b)][_0x5061f6(0x236)](_0x18b738,_0x4b0a84,_0x8080ff['replyId']);break;}case v[_0x5061f6(0x20b)]:{this['_threadCommentModel'][_0x5061f6(0x22e)](_0x18b738,_0x4b0a84,{'commentId':_0x8080ff[_0x5061f6(0x1df)],'text':JSON[_0x5061f6(0x1e5)](_0x8080ff[_0x5061f6(0x1fb)])});break;}case v[_0x5061f6(0x237)]:{const _0x1a57cd=(_0x1b4ae4=this[_0x5061f6(0x21b)][_0x5061f6(0x23a)](_0x8080ff[_0x5061f6(0x227)])['find'](_0xb4493e=>_0xb4493e[_0x5061f6(0x21f)]===_0x8080ff[_0x5061f6(0x21f)]))==null?void 0x0:_0x1b4ae4['root'];_0x1a57cd&&this[_0x5061f6(0x21b)]['resolveComment'](_0x18b738,_0x4b0a84,_0x1a57cd['id'],_0x8080ff[_0x5061f6(0x22d)]===I[_0x5061f6(0x1dd)]);break;}}}));}};function _0x38f8(){const _0x47a298=['pipe','content','defineProperty','forEach','Add','YYYY/MM/DD\x20HH:mm','/delete','personId','COMMENT','error','getComment','length','5156640Diumdp','Unknown','4570687jrHdsO','_config','replies','Edit','rangeType','893020qcETST','commentUpdate$','_injector','getCurrentUser','/list','userId','onReady','20604fFeSOA','createTimestamp','_threadCommentDataSource','Reply','24MIMPje','resolved','get','_threadCommentModel','payload','206eLKzng','_initUserSync','threadId','addComment','requireSession','add','users','symbol','addUser','_sessionService','unitId','376fZKSTG','_commentService','thread-comment-data-source.config','4385EpCcfN','ref','solved','updateComment','_init','map','205961mzsTRs','find','rangeId','3252NTsahU','OpenOrReOpen','deleteComment','Solve','parentId','type','getUnit','code','root','_threadCommentDataSourceService','/solved','UNRECOGNIZED','27UvhQbZ','post','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solved','delete','replyId','_userService','setConfig','userID','_httpService','getOwnPropertyDescriptor','parse','pluginName','disposeWithMe','subscribe','body','customRanges','Delete','comment','getUser','reply','comments','stringify','user','/universer-api/comment/unit/','/add','onStarting','getMemberID','_initDataSource','slice','_configService','104867LPOHXK'];_0x38f8=function(){return _0x47a298;};return _0x38f8();}S=V([p(0x0,_0x6d6d7f(_0x1c97aa)),p(0x1,_0x6d6d7f(_0x5d314a)),p(0x2,_0x6d6d7f(_0x17e060)),p(0x3,_0x6d6d7f(_0x5832fe))],S);const z=_0x10e254(0x22a),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5fcc15,_0x45e138,_0x204bec,_0x2c43bf)=>{const _0xb25aca=_0x10e254;for(var _0x434433=_0x2c43bf>0x1?void 0x0:_0x2c43bf?k(_0x45e138,_0x204bec):_0x45e138,_0x5037eb=_0x5fcc15[_0xb25aca(0x205)]-0x1,_0x3a41be;_0x5037eb>=0x0;_0x5037eb--)(_0x3a41be=_0x5fcc15[_0x5037eb])&&(_0x434433=_0x3a41be(_0x434433)||_0x434433);return _0x434433;},_=(_0x56949f,_0x3ab8da)=>(_0x54dcc1,_0x1174c6)=>_0x3ab8da(_0x54dcc1,_0x1174c6,_0x56949f);function _0x5207(_0x3cd395,_0xefde19){const _0x38f800=_0x38f8();return _0x5207=function(_0x52078e,_0x269096){_0x52078e=_0x52078e-0x1da;let _0x1b3a6e=_0x38f800[_0x52078e];return _0x1b3a6e;},_0x5207(_0x3cd395,_0xefde19);}function X(_0x42f45c,_0x5f50d8){const _0x131dfc=_0x10e254,_0x2222ab=_0x42f45c[_0x131dfc(0x20a)][0x0];return{..._0x5f50d8,'id':_0x2222ab[_0x131dfc(0x1df)],'resolved':_0x42f45c['solved']===0x1,'dT':D(_0x2222ab[_0x131dfc(0x215)]),'personId':_0x2222ab[_0x131dfc(0x212)],'threadId':_0x2222ab['threadId']};}function ee(_0x2bdaf9,_0x17699e,_0x533569){const _0x4feb96=_0x10e254;var _0x57fe86,_0x2098f5;if(((_0x2098f5=(_0x57fe86=_0x2bdaf9==null?void 0x0:_0x2bdaf9[_0x4feb96(0x20a)])==null?void 0x0:_0x57fe86[_0x4feb96(0x205)])!=null?_0x2098f5:0x0)>0x0){const _0x2101f6=(_0x2601e8,_0x3d7656)=>({'id':_0x2601e8[_0x4feb96(0x1df)],'threadId':_0x2601e8[_0x4feb96(0x21f)],'dT':D(_0x2601e8[_0x4feb96(0x215)]),'personId':_0x2601e8[_0x4feb96(0x212)],'resolved':_0x2bdaf9[_0x4feb96(0x22d)]===I[_0x4feb96(0x1dd)],'unitId':_0x17699e,'subUnitId':_0x533569,'text':JSON['parse'](_0x2601e8[_0x4feb96(0x1fb)]),'parentId':_0x3d7656}),_0x185f9b=_0x2101f6(_0x2bdaf9['replies'][0x0]);return{..._0x185f9b,'children':_0x2bdaf9[_0x4feb96(0x20a)][_0x4feb96(0x1f7)](0x1)[_0x4feb96(0x230)](_0x9019f4=>_0x2101f6(_0x9019f4,_0x185f9b['id']))};}return null;}let f=class{constructor(_0x34dd0c,_0x39d58e,_0x2ec76b,_0x391450){const _0x5dee1b=_0x10e254;this[_0x5dee1b(0x1e3)]=_0x34dd0c,this['_userService']=_0x39d58e,this[_0x5dee1b(0x226)]=_0x2ec76b,this[_0x5dee1b(0x20f)]=_0x391450;}async['addComment'](_0x4658b5){const _0x3441d9=_0x10e254;var _0x1d5625,_0x6b1e11;const {parentId:_0x5c90c7,unitId:_0x504ab2,text:_0x107425,threadId:_0x3948b1}=_0x4658b5,_0x538e51=(_0x6b1e11=(_0x1d5625=_0x107425[_0x3441d9(0x1ea)])==null?void 0x0:_0x1d5625[_0x3441d9(0x1db)](_0x446c96=>_0x446c96['rangeType']===_0x134f38['COMMENT'])[_0x3441d9(0x230)](_0x31594c=>_0x31594c[_0x3441d9(0x233)]))!=null?_0x6b1e11:[],_0xbc0239=JSON[_0x3441d9(0x1f0)](_0x107425),_0x39e94d=(await this[_0x3441d9(0x226)][_0x3441d9(0x221)](_0x504ab2))[_0x3441d9(0x1f5)]();if(_0x5c90c7){const _0x2ac7f8={'memberId':_0x39e94d,'unitId':_0x504ab2,'content':_0xbc0239,'mention':_0x538e51,'threadId':_0x3948b1},_0x47223c=(await this[_0x3441d9(0x1e3)][_0x3441d9(0x1da)]('/universer-api/comment/unit/'+_0x504ab2+'/reply',{'body':_0x2ac7f8}))[_0x3441d9(0x1e9)][_0x3441d9(0x1ee)];return{..._0x4658b5,'id':_0x47223c[_0x3441d9(0x1df)],'dT':_0x475bbd(+_0x47223c['createTimestamp'])['format'](_0x3441d9(0x1ff)),'personId':_0x47223c['userId']};}else{const _0x8bc6f6={'memberId':_0x39e94d,'unitId':_0x504ab2,'content':_0xbc0239,'mention':_0x538e51},_0x56e546=await this[_0x3441d9(0x1e3)][_0x3441d9(0x1da)](_0x3441d9(0x1f2)+_0x504ab2+_0x3441d9(0x1f3),{'body':_0x8bc6f6});return X(_0x56e546['body'][_0x3441d9(0x1ec)],_0x4658b5);}}async[_0x10e254(0x22e)](_0x52a8e5){const _0x4453a2=_0x10e254;var _0x4b9994,_0x1d07b2;const {text:_0x1d6719,unitId:_0x58c8ca}=_0x52a8e5,_0x4b0dbd=(_0x1d07b2=(_0x4b9994=_0x1d6719[_0x4453a2(0x1ea)])==null?void 0x0:_0x4b9994[_0x4453a2(0x1db)](_0x58f883=>_0x58f883[_0x4453a2(0x20c)]===_0x134f38[_0x4453a2(0x202)])['map'](_0x66ae4a=>_0x66ae4a[_0x4453a2(0x233)]))!=null?_0x1d07b2:[],_0x1f0435=JSON[_0x4453a2(0x1f0)](_0x1d6719),_0x1dd085=_0x52a8e5[_0x4453a2(0x21f)],_0x5b286c=_0x52a8e5['id'],_0x227f77={'memberId':(await this[_0x4453a2(0x226)][_0x4453a2(0x221)](_0x58c8ca))[_0x4453a2(0x1f5)](),'unitId':_0x58c8ca,'threadId':_0x1dd085,'mention':_0x4b0dbd,'content':_0x1f0435,'replyId':_0x5b286c},_0x39bb65=await this[_0x4453a2(0x1e3)][_0x4453a2(0x1da)](_0x4453a2(0x1f2)+_0x58c8ca+'/edit',{'body':_0x227f77});return!_0x39bb65['body']['error']||_0x39bb65['body']['error'][_0x4453a2(0x23b)]===0x1;}async['resolveComment'](_0x277dba){const _0x10be14=_0x10e254,{unitId:_0x3bc346}=_0x277dba,_0x44079e=_0x277dba['threadId'],_0x4bc544={'memberId':this[_0x10be14(0x1e0)][_0x10be14(0x210)]()[_0x10be14(0x1e2)],'unitId':_0x3bc346,'threadId':_0x44079e,'solved':_0x277dba[_0x10be14(0x219)]?I['Solved']:I[_0x10be14(0x235)]},_0x11abe1=await this[_0x10be14(0x1e3)][_0x10be14(0x1da)](_0x10be14(0x1f2)+_0x3bc346+_0x10be14(0x23e),{'body':_0x4bc544});return!_0x11abe1[_0x10be14(0x1e9)]['error']||_0x11abe1[_0x10be14(0x1e9)]['error'][_0x10be14(0x23b)]===0x1;}async['deleteComment'](_0x118bf5,_0x1cfe92,_0x48985f,_0x2aea97){const _0x9bdce0=_0x10e254,_0xa850ed={'memberId':(await this[_0x9bdce0(0x226)][_0x9bdce0(0x221)](_0x118bf5))['getMemberID'](),'threadId':_0x48985f,'replyId':_0x2aea97,'unitId':_0x118bf5},_0x297eef=await this[_0x9bdce0(0x1e3)][_0x9bdce0(0x1da)]('/universer-api/comment/unit/'+_0x118bf5+_0x9bdce0(0x200),{'body':_0xa850ed});return!_0x297eef['body'][_0x9bdce0(0x203)]||_0x297eef[_0x9bdce0(0x1e9)]['error'][_0x9bdce0(0x23b)]===0x1;}async['listComments'](_0x4f2326,_0x1fd3b8,_0x4bdf44){const _0x45f00e=_0x10e254,_0xabcdc1={'unitId':_0x4f2326,'threadId':_0x4bdf44},_0x5b1220=await this[_0x45f00e(0x1e3)][_0x45f00e(0x1da)](_0x45f00e(0x1f2)+_0x4f2326+_0x45f00e(0x211),{'body':_0xabcdc1}),_0x539bdf=_0x4bdf44[_0x45f00e(0x230)](_0x597ae8=>ee(_0x5b1220[_0x45f00e(0x1e9)][_0x45f00e(0x1ef)][_0x597ae8],_0x4f2326,_0x1fd3b8))['filter'](Boolean);return Object['values'](_0x5b1220[_0x45f00e(0x1e9)][_0x45f00e(0x223)])[_0x45f00e(0x1fd)](_0x317743=>{const _0x11013f=_0x45f00e;this[_0x11013f(0x1e0)][_0x11013f(0x225)](_0x317743);}),_0x539bdf;}['saveCommentToSnapshot'](_0x37ce3f){const _0x1d6f90=_0x10e254;return{'id':_0x37ce3f['id'],'threadId':_0x37ce3f['threadId'],'ref':_0x37ce3f[_0x1d6f90(0x22c)]};}};f=Q([_(0x0,_0x6d6d7f(_0x3f6b99)),_(0x1,_0x6d6d7f(_0x17e060)),_(0x2,_0x6d6d7f(_0x2e01b2)),_(0x3,_0x6d6d7f(_0x5832fe))],f);var re=Object[_0x10e254(0x1e4)],te=(_0x351bb0,_0x49c073,_0x3ee29d,_0x1b85ca)=>{const _0x4ce194=_0x10e254;for(var _0x115849=_0x1b85ca>0x1?void 0x0:_0x1b85ca?re(_0x49c073,_0x3ee29d):_0x49c073,_0x3a7364=_0x351bb0[_0x4ce194(0x205)]-0x1,_0x21992e;_0x3a7364>=0x0;_0x3a7364--)(_0x21992e=_0x351bb0[_0x3a7364])&&(_0x115849=_0x21992e(_0x115849)||_0x115849);return _0x115849;},N=(_0x5298f4,_0x294eaf)=>(_0x4f3441,_0x343955)=>_0x294eaf(_0x4f3441,_0x343955,_0x5298f4);let g=class extends _0x398fe1{constructor(_0x44e84a,_0x11f27f){const _0x44ca07=_0x10e254;super(),this[_0x44ca07(0x23d)]=_0x44e84a,this[_0x44ca07(0x216)]=_0x11f27f,this[_0x44ca07(0x1f6)]();}[_0x10e254(0x1f6)](){const _0xb85e65=_0x10e254;this[_0xb85e65(0x23d)]['dataSource']=this[_0xb85e65(0x216)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x38b225),N(0x1,_0x6d6d7f(f))],g);var se=Object[_0x10e254(0x1fc)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x39654c,_0x588826,_0x212a1e)=>_0x588826 in _0x39654c?se(_0x39654c,_0x588826,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x212a1e}):_0x39654c[_0x588826]=_0x212a1e,ie=(_0x3f64b8,_0xbb38d5,_0x21cfed,_0xece1cb)=>{const _0x420d95=_0x10e254;for(var _0x2ae5e5=_0xece1cb>0x1?void 0x0:_0xece1cb?oe(_0xbb38d5,_0x21cfed):_0xbb38d5,_0x31e6ed=_0x3f64b8[_0x420d95(0x205)]-0x1,_0x208571;_0x31e6ed>=0x0;_0x31e6ed--)(_0x208571=_0x3f64b8[_0x31e6ed])&&(_0x2ae5e5=_0x208571(_0x2ae5e5)||_0x2ae5e5);return _0x2ae5e5;},w=(_0x11f2f7,_0x39e8db)=>(_0x92a6b,_0x357654)=>_0x39e8db(_0x92a6b,_0x357654,_0x11f2f7),$=(_0x4875f2,_0x29b281,_0x2d46e1)=>ne(_0x4875f2,typeof _0x29b281!=_0x10e254(0x224)?_0x29b281+'':_0x29b281,_0x2d46e1);let b=class extends _0x571f03{constructor(_0x27b54e=M,_0x5dfb6c,_0x17dec0){const _0x51e9ce=_0x10e254;super(),this[_0x51e9ce(0x209)]=_0x27b54e,this[_0x51e9ce(0x20f)]=_0x5dfb6c,this[_0x51e9ce(0x1f8)]=_0x17dec0;const {..._0x3c6baa}=_0x270269({},M,this[_0x51e9ce(0x209)]);this['_configService'][_0x51e9ce(0x1e1)](z,_0x3c6baa);}[_0x10e254(0x1f4)](){const _0x263b69=_0x10e254;[[f],[g],[S]][_0x263b69(0x1fd)](_0x5be7d7=>{const _0x441ba1=_0x263b69;this[_0x441ba1(0x20f)]['add'](_0x5be7d7);});}[_0x10e254(0x213)](){const _0x3320ef=_0x10e254;this[_0x3320ef(0x20f)]['get'](g),this[_0x3320ef(0x20f)][_0x3320ef(0x21a)](S);}};$(b,_0x10e254(0x1e6),W),$(b,_0x10e254(0x239),_0x4565c4['UNIVER_UNKNOWN']),b=ie([_0x173423(_0x4b05fa,_0x1afa9f,_0x5f1af7),w(0x1,_0x6d6d7f(_0x5832fe)),w(0x2,_0x56350f)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5af817=_0x52b1;(function(_0x18099e,_0x4eb9f0){const _0x4d06d5=_0x52b1,_0x2e5aed=_0x18099e();while(!![]){try{const _0x511d4=-parseInt(_0x4d06d5(0x1be))/0x1*(parseInt(_0x4d06d5(0x1e7))/0x2)+-parseInt(_0x4d06d5(0x20f))/0x3+parseInt(_0x4d06d5(0x1c0))/0x4+-parseInt(_0x4d06d5(0x1e6))/0x5+parseInt(_0x4d06d5(0x1cf))/0x6+-parseInt(_0x4d06d5(0x1d2))/0x7*(-parseInt(_0x4d06d5(0x1ce))/0x8)+-parseInt(_0x4d06d5(0x1ed))/0x9;if(_0x511d4===_0x4eb9f0)break;else _0x2e5aed['push'](_0x2e5aed['shift']());}catch(_0x34f9a9){_0x2e5aed['push'](_0x2e5aed['shift']());}}}(_0x4617,0xa3da2));import{CommentService as _0x498a04,CollaborationSessionService as _0x339043,UniverCollaborationClientPlugin as _0x2a0745}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x40a7c8}from'@univerjs-pro/license';import{dayjs as _0x146095,UserManagerService as _0x253cfc,Inject as _0x1024f5,Injector as _0x500c18,Disposable as _0x1a58c4,CustomRangeType as _0x1b28c6,UniverInstanceType as _0x175b10,DependentOn as _0x17566a,IConfigService as _0x51ffa0,Plugin as _0x4977e9,merge as _0x1a1e5e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x513b47}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x532a04,IThreadCommentDataSourceService as _0x31e088}from'@univerjs/thread-comment';import{bufferTime as _0x58b843}from'rxjs';import{HTTPService as _0x375401}from'@univerjs/network';const W=_0x5af817(0x1b2);function _0x4617(){const _0x295def=['_threadCommentDataSourceService','addUser','code','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_sessionService','/delete','2326395nqrXDu','2MYDwgB','deleteComment','Edit','requireSession','rangeId','content','2871621akjyaW','userID','users','Add','resolveComment','onStarting','length','post','rangeType','commentUpdate$','/universer-api/user/list','pluginName','thread-comment-data-source.config','map','saveCommentToSnapshot','pipe','/list','createTimestamp','find','onReady','_config','UNRECOGNIZED','defineProperty','_initDataSource','getUser','unitId','getOwnPropertyDescriptor','forEach','/universer-api/comment/unit/','replyId','error','Reply','format','userId','474558EnrPEW','getCurrentUser','add','symbol','comments','syncUpdateMutationToColla','OpenOrReOpen','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','root','Delete','resolved','disposeWithMe','_injector','user','_commentService','getMemberID','Solve','/reply','1299806ZdSTAs','reply','1368984BsnSMN','threadId','getUnit','filter','Unknown','get','replies','_httpService','_configService','COMMENT','addComment','listComments','slice','body','10174552MwuSby','7796478BGxbrT','_userService','stringify','7mLRzZi','values','parentId','subscribe','setConfig','type','comment','solved','Solved','parse','delete','dataSource','getComment'];_0x4617=function(){return _0x295def;};return _0x4617();}var I=(_0x40a8c3=>(_0x40a8c3[_0x40a8c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x40a8c3[_0x40a8c3[_0x5af817(0x1da)]=0x1]=_0x5af817(0x1da),_0x40a8c3[_0x40a8c3[_0x5af817(0x202)]=-0x1]=_0x5af817(0x202),_0x40a8c3))(I||{}),v=(_0x31ed0c=>(_0x31ed0c[_0x31ed0c['Unknown']=0x0]=_0x5af817(0x1c4),_0x31ed0c[_0x31ed0c[_0x5af817(0x1f0)]=0x1]=_0x5af817(0x1f0),_0x31ed0c[_0x31ed0c[_0x5af817(0x20c)]=0x2]=_0x5af817(0x20c),_0x31ed0c[_0x31ed0c['Edit']=0x3]=_0x5af817(0x1e9),_0x31ed0c[_0x31ed0c[_0x5af817(0x1b5)]=0x4]='Delete',_0x31ed0c[_0x31ed0c['Solve']=0x5]=_0x5af817(0x1bc),_0x31ed0c[_0x31ed0c[_0x5af817(0x202)]=-0x1]='UNRECOGNIZED',_0x31ed0c))(v||{});const D=_0xdda57d=>_0x146095(new Date(+_0xdda57d))[_0x5af817(0x20d)](_0x5af817(0x1e2)),B=async(_0xa1b7d4,_0x1a05fb)=>{const _0x530eae=_0x5af817,_0x4e4670=_0xa1b7d4[_0x530eae(0x1c5)](_0x253cfc),_0x338d95=_0xa1b7d4[_0x530eae(0x1c5)](_0x375401);_0x1a05fb[_0x530eae(0x208)](_0x26c221=>{const _0x431492=_0x530eae;_0x4e4670[_0x431492(0x205)](_0x26c221)&&_0x1a05fb[_0x431492(0x1dc)](_0x26c221);}),_0x1a05fb['size']&&(await _0x338d95[_0x530eae(0x1c5)](_0x530eae(0x1f7),{'params':{'userIDs':[..._0x1a05fb]}}))[_0x530eae(0x1cd)][_0x530eae(0x1ef)][_0x530eae(0x208)](_0x4da052=>{const _0x3dbbc9=_0x530eae;_0x4da052&&_0x4e4670[_0x3dbbc9(0x1e0)](_0x4da052);});};var K=Object[_0x5af817(0x207)],V=(_0x20b6e8,_0x57a2bd,_0x298383,_0x55291f)=>{const _0x1b2834=_0x5af817;for(var _0xdbec4d=_0x55291f>0x1?void 0x0:_0x55291f?K(_0x57a2bd,_0x298383):_0x57a2bd,_0x597d86=_0x20b6e8[_0x1b2834(0x1f3)]-0x1,_0x41f298;_0x597d86>=0x0;_0x597d86--)(_0x41f298=_0x20b6e8[_0x597d86])&&(_0xdbec4d=_0x41f298(_0xdbec4d)||_0xdbec4d);return _0xdbec4d;},p=(_0x5749c8,_0x1bcf80)=>(_0x5d3b03,_0x9ae975)=>_0x1bcf80(_0x5d3b03,_0x9ae975,_0x5749c8);let S=class extends _0x1a58c4{constructor(_0x44d963,_0x2b937d,_0x59e383,_0x18c454){const _0x136d5a=_0x5af817;super(),this[_0x136d5a(0x1ba)]=_0x44d963,this[_0x136d5a(0x1b3)]=_0x2b937d,this[_0x136d5a(0x1d0)]=_0x59e383,this[_0x136d5a(0x1b8)]=_0x18c454,this[_0x136d5a(0x1b1)](),this['_initUserSync']();}['_initUserSync'](){const _0x114fcb=_0x5af817;this[_0x114fcb(0x1b7)](this['_threadCommentModel'][_0x114fcb(0x1f6)][_0x114fcb(0x1fc)](_0x58b843(0x10))[_0x114fcb(0x1d5)](_0x429217=>{const _0x423583=_0x114fcb,_0x31f1de=new Set();_0x429217['forEach'](_0x3898d9=>{const _0x12717f=_0x52b1;switch(_0x3898d9['type']){case _0x12717f(0x211):{const _0xbf14cd=_0x3898d9['payload']['personId'];_0x31f1de[_0x12717f(0x211)](_0xbf14cd);break;}}}),B(this[_0x423583(0x1b8)],_0x31f1de);}));}[_0x5af817(0x1b1)](){const _0x5ce26e=_0x5af817;this[_0x5ce26e(0x1b7)](this[_0x5ce26e(0x1ba)][_0x5ce26e(0x1f6)][_0x5ce26e(0x1d5)](async _0x1224dd=>{const _0x100fe0=_0x5ce26e;var _0x2dcbcc,_0xcf9636,_0x2783ae,_0x4da040;const _0x2ce041=(_0x2dcbcc=this[_0x100fe0(0x1b3)]['getUnit'](_0x1224dd[_0x100fe0(0x206)])[_0x100fe0(0x1ff)](_0x5df0ed=>_0x5df0ed['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x2dcbcc[_0x100fe0(0x1b4)];if(!_0x2ce041)return;const {unitId:_0x44d994,subUnitId:_0x584b37}=_0x2ce041;switch(_0x1224dd[_0x100fe0(0x1b9)]&&this['_userService'][_0x100fe0(0x1e0)](_0x1224dd[_0x100fe0(0x1b9)]),_0x1224dd['type']){case v[_0x100fe0(0x1f0)]:break;case v[_0x100fe0(0x20c)]:{this[_0x100fe0(0x1b3)][_0x100fe0(0x1ca)](_0x44d994,_0x584b37,{'unitId':_0x44d994,'subUnitId':_0x584b37,'ref':'','id':_0x1224dd[_0x100fe0(0x20a)],'dT':D(+_0x1224dd[_0x100fe0(0x1fe)]),'threadId':_0x1224dd[_0x100fe0(0x1c1)],'personId':(_0x2783ae=(_0xcf9636=_0x1224dd[_0x100fe0(0x1b9)])==null?void 0x0:_0xcf9636[_0x100fe0(0x1ee)])!=null?_0x2783ae:_0x1224dd[_0x100fe0(0x20e)],'text':JSON['parse'](_0x1224dd[_0x100fe0(0x1ec)]),'parentId':_0x2ce041['id']});break;}case v[_0x100fe0(0x1b5)]:{const _0x4c3ae0=this[_0x100fe0(0x1b3)][_0x100fe0(0x1de)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);_0x4c3ae0&&_0x4c3ae0[_0x100fe0(0x1d4)]&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1e8)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);break;}case v[_0x100fe0(0x1e9)]:{this[_0x100fe0(0x1b3)]['updateComment'](_0x44d994,_0x584b37,{'commentId':_0x1224dd[_0x100fe0(0x20a)],'text':JSON[_0x100fe0(0x1db)](_0x1224dd['content'])});break;}case v[_0x100fe0(0x1bc)]:{const _0x14f0ba=(_0x4da040=this['_threadCommentModel'][_0x100fe0(0x1c2)](_0x1224dd['unitId'])['find'](_0x294c9a=>_0x294c9a['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x4da040[_0x100fe0(0x1b4)];_0x14f0ba&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1f1)](_0x44d994,_0x584b37,_0x14f0ba['id'],_0x1224dd[_0x100fe0(0x1d9)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x1024f5(_0x498a04)),p(0x1,_0x1024f5(_0x532a04)),p(0x2,_0x1024f5(_0x253cfc)),p(0x3,_0x1024f5(_0x500c18))],S);const z=_0x5af817(0x1f9),M={};var k=Object[_0x5af817(0x207)],Q=(_0x2787e9,_0x2a84de,_0x40082e,_0x3cea38)=>{for(var _0x294357=_0x3cea38>0x1?void 0x0:_0x3cea38?k(_0x2a84de,_0x40082e):_0x2a84de,_0x43f81f=_0x2787e9['length']-0x1,_0x8d983a;_0x43f81f>=0x0;_0x43f81f--)(_0x8d983a=_0x2787e9[_0x43f81f])&&(_0x294357=_0x8d983a(_0x294357)||_0x294357);return _0x294357;},_=(_0x53befe,_0x10ebfb)=>(_0x260bbb,_0x7ddaff)=>_0x10ebfb(_0x260bbb,_0x7ddaff,_0x53befe);function X(_0xf02a6a,_0x19896b){const _0x6eb1a3=_0x5af817,_0x25efa7=_0xf02a6a['replies'][0x0];return{..._0x19896b,'id':_0x25efa7[_0x6eb1a3(0x20a)],'resolved':_0xf02a6a[_0x6eb1a3(0x1d9)]===0x1,'dT':D(_0x25efa7['createTimestamp']),'personId':_0x25efa7[_0x6eb1a3(0x20e)],'threadId':_0x25efa7[_0x6eb1a3(0x1c1)]};}function ee(_0x53718d,_0x47e15a,_0x2ec43d){const _0x1e4213=_0x5af817;var _0x5d485c,_0x9f0f78;if(((_0x9f0f78=(_0x5d485c=_0x53718d==null?void 0x0:_0x53718d['replies'])==null?void 0x0:_0x5d485c[_0x1e4213(0x1f3)])!=null?_0x9f0f78:0x0)>0x0){const _0x231253=(_0x779f3e,_0x41a5aa)=>({'id':_0x779f3e[_0x1e4213(0x20a)],'threadId':_0x779f3e[_0x1e4213(0x1c1)],'dT':D(_0x779f3e[_0x1e4213(0x1fe)]),'personId':_0x779f3e[_0x1e4213(0x20e)],'resolved':_0x53718d[_0x1e4213(0x1d9)]===I[_0x1e4213(0x1da)],'unitId':_0x47e15a,'subUnitId':_0x2ec43d,'text':JSON[_0x1e4213(0x1db)](_0x779f3e[_0x1e4213(0x1ec)]),'parentId':_0x41a5aa}),_0x236f50=_0x231253(_0x53718d[_0x1e4213(0x1c6)][0x0]);return{..._0x236f50,'children':_0x53718d[_0x1e4213(0x1c6)][_0x1e4213(0x1cc)](0x1)[_0x1e4213(0x1fa)](_0x6e3739=>_0x231253(_0x6e3739,_0x236f50['id']))};}return null;}let f=class{constructor(_0x59d1dc,_0x58580d,_0x47d25f,_0x1162ca){const _0x2c1b46=_0x5af817;this['_httpService']=_0x59d1dc,this['_userService']=_0x58580d,this[_0x2c1b46(0x1e4)]=_0x47d25f,this[_0x2c1b46(0x1b8)]=_0x1162ca;}async['addComment'](_0x4b49eb){const _0x17e06f=_0x5af817;var _0x21d4ab,_0x2d710b;const {parentId:_0x385a6e,unitId:_0x2b81ff,text:_0x2f9e47,threadId:_0x3312cf}=_0x4b49eb,_0x317f95=(_0x2d710b=(_0x21d4ab=_0x2f9e47['customRanges'])==null?void 0x0:_0x21d4ab[_0x17e06f(0x1c3)](_0x224cd9=>_0x224cd9[_0x17e06f(0x1f5)]===_0x1b28c6[_0x17e06f(0x1c9)])['map'](_0x22641d=>_0x22641d[_0x17e06f(0x1eb)]))!=null?_0x2d710b:[],_0x1555a1=JSON['stringify'](_0x2f9e47),_0x2ec2d7=(await this[_0x17e06f(0x1e4)][_0x17e06f(0x1ea)](_0x2b81ff))[_0x17e06f(0x1bb)]();if(_0x385a6e){const _0x39bb5e={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95,'threadId':_0x3312cf},_0x323498=(await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)]('/universer-api/comment/unit/'+_0x2b81ff+_0x17e06f(0x1bd),{'body':_0x39bb5e}))[_0x17e06f(0x1cd)][_0x17e06f(0x1bf)];return{..._0x4b49eb,'id':_0x323498['replyId'],'dT':_0x146095(+_0x323498[_0x17e06f(0x1fe)])['format'](_0x17e06f(0x1e2)),'personId':_0x323498[_0x17e06f(0x20e)]};}else{const _0x50c778={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95},_0x2a7732=await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)](_0x17e06f(0x209)+_0x2b81ff+'/add',{'body':_0x50c778});return X(_0x2a7732[_0x17e06f(0x1cd)][_0x17e06f(0x1d8)],_0x4b49eb);}}async['updateComment'](_0x4945ee){const _0x2de3fd=_0x5af817;var _0x48ebc6,_0x1c88ec;const {text:_0x485f86,unitId:_0x5a5ef4}=_0x4945ee,_0x254042=(_0x1c88ec=(_0x48ebc6=_0x485f86['customRanges'])==null?void 0x0:_0x48ebc6[_0x2de3fd(0x1c3)](_0x43c832=>_0x43c832[_0x2de3fd(0x1f5)]===_0x1b28c6['COMMENT'])[_0x2de3fd(0x1fa)](_0x12552d=>_0x12552d[_0x2de3fd(0x1eb)]))!=null?_0x1c88ec:[],_0x19e35f=JSON[_0x2de3fd(0x1d1)](_0x485f86),_0x1151a4=_0x4945ee[_0x2de3fd(0x1c1)],_0x33b77e=_0x4945ee['id'],_0x49cdaf={'memberId':(await this['_sessionService'][_0x2de3fd(0x1ea)](_0x5a5ef4))[_0x2de3fd(0x1bb)](),'unitId':_0x5a5ef4,'threadId':_0x1151a4,'mention':_0x254042,'content':_0x19e35f,'replyId':_0x33b77e},_0x2e1826=await this[_0x2de3fd(0x1c7)][_0x2de3fd(0x1f4)]('/universer-api/comment/unit/'+_0x5a5ef4+'/edit',{'body':_0x49cdaf});return!_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)]||_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)][_0x2de3fd(0x1e1)]===0x1;}async[_0x5af817(0x1f1)](_0x49d58a){const _0x3de162=_0x5af817,{unitId:_0x354fdb}=_0x49d58a,_0x33a349=_0x49d58a[_0x3de162(0x1c1)],_0x4d20b9={'memberId':this[_0x3de162(0x1d0)][_0x3de162(0x210)]()[_0x3de162(0x1ee)],'unitId':_0x354fdb,'threadId':_0x33a349,'solved':_0x49d58a[_0x3de162(0x1b6)]?I[_0x3de162(0x1da)]:I[_0x3de162(0x215)]},_0x35ffa2=await this[_0x3de162(0x1c7)][_0x3de162(0x1f4)]('/universer-api/comment/unit/'+_0x354fdb+'/solved',{'body':_0x4d20b9});return!_0x35ffa2['body'][_0x3de162(0x20b)]||_0x35ffa2['body']['error'][_0x3de162(0x1e1)]===0x1;}async[_0x5af817(0x1e8)](_0x23f4ec,_0x52bdba,_0x44a5eb,_0x3466f5){const _0x6ebf77=_0x5af817,_0x3cf0a8={'memberId':(await this[_0x6ebf77(0x1e4)]['requireSession'](_0x23f4ec))['getMemberID'](),'threadId':_0x44a5eb,'replyId':_0x3466f5,'unitId':_0x23f4ec},_0x3d309f=await this[_0x6ebf77(0x1c7)][_0x6ebf77(0x1f4)](_0x6ebf77(0x209)+_0x23f4ec+_0x6ebf77(0x1e5),{'body':_0x3cf0a8});return!_0x3d309f['body'][_0x6ebf77(0x20b)]||_0x3d309f[_0x6ebf77(0x1cd)]['error'][_0x6ebf77(0x1e1)]===0x1;}async[_0x5af817(0x1cb)](_0x4cd549,_0x2044f3,_0x182bf6){const _0xba06cb=_0x5af817,_0x726cb1={'unitId':_0x4cd549,'threadId':_0x182bf6},_0x2c2fd0=await this[_0xba06cb(0x1c7)][_0xba06cb(0x1f4)](_0xba06cb(0x209)+_0x4cd549+_0xba06cb(0x1fd),{'body':_0x726cb1}),_0x12e1d4=_0x182bf6['map'](_0x4dbb08=>ee(_0x2c2fd0['body'][_0xba06cb(0x213)][_0x4dbb08],_0x4cd549,_0x2044f3))[_0xba06cb(0x1c3)](Boolean);return Object[_0xba06cb(0x1d3)](_0x2c2fd0[_0xba06cb(0x1cd)][_0xba06cb(0x1ef)])['forEach'](_0x4b10db=>{const _0x4e4f29=_0xba06cb;this[_0x4e4f29(0x1d0)][_0x4e4f29(0x1e0)](_0x4b10db);}),_0x12e1d4;}[_0x5af817(0x1fb)](_0x4598dd){return{'id':_0x4598dd['id'],'threadId':_0x4598dd['threadId'],'ref':_0x4598dd['ref']};}};f=Q([_(0x0,_0x1024f5(_0x375401)),_(0x1,_0x1024f5(_0x253cfc)),_(0x2,_0x1024f5(_0x339043)),_(0x3,_0x1024f5(_0x500c18))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x54645e,_0x2f4f82,_0x119bd0,_0x4a8e0a)=>{const _0x753257=_0x5af817;for(var _0x3e084c=_0x4a8e0a>0x1?void 0x0:_0x4a8e0a?re(_0x2f4f82,_0x119bd0):_0x2f4f82,_0x5cb717=_0x54645e[_0x753257(0x1f3)]-0x1,_0x520c50;_0x5cb717>=0x0;_0x5cb717--)(_0x520c50=_0x54645e[_0x5cb717])&&(_0x3e084c=_0x520c50(_0x3e084c)||_0x3e084c);return _0x3e084c;},N=(_0x349013,_0x563dfd)=>(_0x518fd4,_0x2d68db)=>_0x563dfd(_0x518fd4,_0x2d68db,_0x349013);function _0x52b1(_0xa09449,_0x1cd1a7){const _0x461703=_0x4617();return _0x52b1=function(_0x52b153,_0x57cb9f){_0x52b153=_0x52b153-0x1b1;let _0x188f23=_0x461703[_0x52b153];return _0x188f23;},_0x52b1(_0xa09449,_0x1cd1a7);}let g=class extends _0x1a58c4{constructor(_0x101963,_0x458e6c){const _0x155773=_0x5af817;super(),this[_0x155773(0x1df)]=_0x101963,this[_0x155773(0x1e3)]=_0x458e6c,this['_initDataSource']();}[_0x5af817(0x204)](){const _0x25041d=_0x5af817;this['_threadCommentDataSourceService'][_0x25041d(0x1dd)]=this[_0x25041d(0x1e3)],this[_0x25041d(0x1df)][_0x25041d(0x214)]=!0x1;}};g=te([N(0x0,_0x31e088),N(0x1,_0x1024f5(f))],g);var se=Object[_0x5af817(0x203)],oe=Object[_0x5af817(0x207)],ne=(_0x4a1aae,_0x9989d2,_0x451eba)=>_0x9989d2 in _0x4a1aae?se(_0x4a1aae,_0x9989d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x451eba}):_0x4a1aae[_0x9989d2]=_0x451eba,ie=(_0x32358a,_0x5c1f3e,_0x35a4b7,_0x1125f0)=>{const _0x37a8cd=_0x5af817;for(var _0x512706=_0x1125f0>0x1?void 0x0:_0x1125f0?oe(_0x5c1f3e,_0x35a4b7):_0x5c1f3e,_0x567da2=_0x32358a[_0x37a8cd(0x1f3)]-0x1,_0x5be124;_0x567da2>=0x0;_0x567da2--)(_0x5be124=_0x32358a[_0x567da2])&&(_0x512706=_0x5be124(_0x512706)||_0x512706);return _0x512706;},w=(_0x18562c,_0x2c2433)=>(_0x4da58c,_0xcc80e)=>_0x2c2433(_0x4da58c,_0xcc80e,_0x18562c),$=(_0x1e39da,_0x2cf86d,_0x597d82)=>ne(_0x1e39da,typeof _0x2cf86d!=_0x5af817(0x212)?_0x2cf86d+'':_0x2cf86d,_0x597d82);let b=class extends _0x4977e9{constructor(_0xe46c66=M,_0x27c311,_0xed5db9){const _0x157754=_0x5af817;super(),this[_0x157754(0x201)]=_0xe46c66,this[_0x157754(0x1b8)]=_0x27c311,this[_0x157754(0x1c8)]=_0xed5db9;const {..._0x41be85}=_0x1a1e5e({},M,this[_0x157754(0x201)]);this['_configService'][_0x157754(0x1d6)](z,_0x41be85);}[_0x5af817(0x1f2)](){const _0x4636ac=_0x5af817;[[f],[g],[S]][_0x4636ac(0x208)](_0x3a33ad=>{this['_injector']['add'](_0x3a33ad);});}[_0x5af817(0x200)](){const _0xc29a83=_0x5af817;this[_0xc29a83(0x1b8)]['get'](g),this[_0xc29a83(0x1b8)][_0xc29a83(0x1c5)](S);}};$(b,_0x5af817(0x1f8),W),$(b,_0x5af817(0x1d7),_0x175b10['UNIVER_UNKNOWN']),b=ie([_0x17566a(_0x513b47,_0x2a0745,_0x40a7c8),w(0x1,_0x1024f5(_0x500c18)),w(0x2,_0x51ffa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x10e254=_0x5207;(function(_0xf79569,_0x1815e6){const _0x1c7807=_0x5207,_0x154049=_0xf79569();while(!![]){try{const _0x2fedd0=-parseInt(_0x1c7807(0x231))/0x1+parseInt(_0x1c7807(0x21d))/0x2*(-parseInt(_0x1c7807(0x214))/0x3)+parseInt(_0x1c7807(0x234))/0x4*(parseInt(_0x1c7807(0x22b))/0x5)+parseInt(_0x1c7807(0x206))/0x6+parseInt(_0x1c7807(0x1f9))/0x7*(-parseInt(_0x1c7807(0x228))/0x8)+-parseInt(_0x1c7807(0x240))/0x9*(parseInt(_0x1c7807(0x20d))/0xa)+parseInt(_0x1c7807(0x208))/0xb*(parseInt(_0x1c7807(0x218))/0xc);if(_0x2fedd0===_0x1815e6)break;else _0x154049['push'](_0x154049['shift']());}catch(_0x30361f){_0x154049['push'](_0x154049['shift']());}}}(_0x38f8,0x7e7d1));import{CommentService as _0x1c97aa,CollaborationSessionService as _0x2e01b2,UniverCollaborationClientPlugin as _0x1afa9f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5f1af7}from'@univerjs-pro/license';import{dayjs as _0x475bbd,UserManagerService as _0x17e060,Inject as _0x6d6d7f,Injector as _0x5832fe,Disposable as _0x398fe1,CustomRangeType as _0x134f38,UniverInstanceType as _0x4565c4,DependentOn as _0x173423,IConfigService as _0x56350f,Plugin as _0x571f03,merge as _0x270269}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b05fa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5d314a,IThreadCommentDataSourceService as _0x38b225}from'@univerjs/thread-comment';import{bufferTime as _0x1c4cd0}from'rxjs';import{HTTPService as _0x3f6b99}from'@univerjs/network';const W=_0x10e254(0x1dc);var I=(_0x39b649=>(_0x39b649[_0x39b649[_0x10e254(0x235)]=0x0]=_0x10e254(0x235),_0x39b649[_0x39b649[_0x10e254(0x1dd)]=0x1]=_0x10e254(0x1dd),_0x39b649[_0x39b649['UNRECOGNIZED']=-0x1]=_0x10e254(0x23f),_0x39b649))(I||{}),v=(_0x5e2dcd=>(_0x5e2dcd[_0x5e2dcd[_0x10e254(0x207)]=0x0]=_0x10e254(0x207),_0x5e2dcd[_0x5e2dcd[_0x10e254(0x1fe)]=0x1]=_0x10e254(0x1fe),_0x5e2dcd[_0x5e2dcd[_0x10e254(0x217)]=0x2]=_0x10e254(0x217),_0x5e2dcd[_0x5e2dcd['Edit']=0x3]=_0x10e254(0x20b),_0x5e2dcd[_0x5e2dcd[_0x10e254(0x1eb)]=0x4]='Delete',_0x5e2dcd[_0x5e2dcd[_0x10e254(0x237)]=0x5]='Solve',_0x5e2dcd[_0x5e2dcd[_0x10e254(0x23f)]=-0x1]=_0x10e254(0x23f),_0x5e2dcd))(v||{});const D=_0x5a48d1=>_0x475bbd(new Date(+_0x5a48d1))['format'](_0x10e254(0x1ff)),B=async(_0x6aae5b,_0x241094)=>{const _0x314b50=_0x10e254,_0x24921d=_0x6aae5b[_0x314b50(0x21a)](_0x17e060),_0x783dc1=_0x6aae5b[_0x314b50(0x21a)](_0x3f6b99);_0x241094[_0x314b50(0x1fd)](_0x3af666=>{const _0x4aa85a=_0x314b50;_0x24921d[_0x4aa85a(0x1ed)](_0x3af666)&&_0x241094[_0x4aa85a(0x1de)](_0x3af666);}),_0x241094['size']&&(await _0x783dc1[_0x314b50(0x21a)]('/universer-api/user/list',{'params':{'userIDs':[..._0x241094]}}))[_0x314b50(0x1e9)][_0x314b50(0x223)][_0x314b50(0x1fd)](_0xed94bb=>{const _0x4ed79e=_0x314b50;_0xed94bb&&_0x24921d[_0x4ed79e(0x225)](_0xed94bb);});};var K=Object[_0x10e254(0x1e4)],V=(_0x3407a6,_0x4a1595,_0x2dbc10,_0x1cb66d)=>{const _0x1b2ac8=_0x10e254;for(var _0x3cde95=_0x1cb66d>0x1?void 0x0:_0x1cb66d?K(_0x4a1595,_0x2dbc10):_0x4a1595,_0x1339ac=_0x3407a6[_0x1b2ac8(0x205)]-0x1,_0x304df9;_0x1339ac>=0x0;_0x1339ac--)(_0x304df9=_0x3407a6[_0x1339ac])&&(_0x3cde95=_0x304df9(_0x3cde95)||_0x3cde95);return _0x3cde95;},p=(_0x25c9a3,_0x22c8b7)=>(_0x2f8cf9,_0x2283ae)=>_0x22c8b7(_0x2f8cf9,_0x2283ae,_0x25c9a3);let S=class extends _0x398fe1{constructor(_0x534990,_0x46c721,_0x1cc581,_0x2fa418){const _0x1e6839=_0x10e254;super(),this[_0x1e6839(0x229)]=_0x534990,this['_threadCommentModel']=_0x46c721,this['_userService']=_0x1cc581,this[_0x1e6839(0x20f)]=_0x2fa418,this[_0x1e6839(0x22f)](),this[_0x1e6839(0x21e)]();}[_0x10e254(0x21e)](){const _0x2f8fbc=_0x10e254;this[_0x2f8fbc(0x1e7)](this[_0x2f8fbc(0x21b)][_0x2f8fbc(0x20e)][_0x2f8fbc(0x1fa)](_0x1c4cd0(0x10))[_0x2f8fbc(0x1e8)](_0x513880=>{const _0x261fc6=_0x2f8fbc,_0x169595=new Set();_0x513880[_0x261fc6(0x1fd)](_0x5423cb=>{const _0x258597=_0x261fc6;switch(_0x5423cb[_0x258597(0x239)]){case _0x258597(0x222):{const _0x45d6a5=_0x5423cb[_0x258597(0x21c)][_0x258597(0x201)];_0x169595[_0x258597(0x222)](_0x45d6a5);break;}}}),B(this['_injector'],_0x169595);}));}[_0x10e254(0x22f)](){const _0x87412f=_0x10e254;this[_0x87412f(0x1e7)](this[_0x87412f(0x229)][_0x87412f(0x20e)][_0x87412f(0x1e8)](async _0x8080ff=>{const _0x5061f6=_0x87412f;var _0x4c478e,_0x10296e,_0x457ab1,_0x1b4ae4;const _0x342836=(_0x4c478e=this[_0x5061f6(0x21b)][_0x5061f6(0x23a)](_0x8080ff['unitId'])[_0x5061f6(0x232)](_0x50a19f=>_0x50a19f[_0x5061f6(0x21f)]===_0x8080ff[_0x5061f6(0x21f)]))==null?void 0x0:_0x4c478e[_0x5061f6(0x23c)];if(!_0x342836)return;const {unitId:_0x18b738,subUnitId:_0x4b0a84}=_0x342836;switch(_0x8080ff[_0x5061f6(0x1f1)]&&this[_0x5061f6(0x1e0)]['addUser'](_0x8080ff['user']),_0x8080ff['type']){case v['Add']:break;case v[_0x5061f6(0x217)]:{this[_0x5061f6(0x21b)][_0x5061f6(0x220)](_0x18b738,_0x4b0a84,{'unitId':_0x18b738,'subUnitId':_0x4b0a84,'ref':'','id':_0x8080ff[_0x5061f6(0x1df)],'dT':D(+_0x8080ff[_0x5061f6(0x215)]),'threadId':_0x8080ff[_0x5061f6(0x21f)],'personId':(_0x457ab1=(_0x10296e=_0x8080ff[_0x5061f6(0x1f1)])==null?void 0x0:_0x10296e[_0x5061f6(0x1e2)])!=null?_0x457ab1:_0x8080ff['userId'],'text':JSON[_0x5061f6(0x1e5)](_0x8080ff[_0x5061f6(0x1fb)]),'parentId':_0x342836['id']});break;}case v[_0x5061f6(0x1eb)]:{const _0x381e28=this[_0x5061f6(0x21b)][_0x5061f6(0x204)](_0x18b738,_0x4b0a84,_0x8080ff['replyId']);_0x381e28&&_0x381e28[_0x5061f6(0x238)]&&this[_0x5061f6(0x21b)][_0x5061f6(0x236)](_0x18b738,_0x4b0a84,_0x8080ff['replyId']);break;}case v[_0x5061f6(0x20b)]:{this['_threadCommentModel'][_0x5061f6(0x22e)](_0x18b738,_0x4b0a84,{'commentId':_0x8080ff[_0x5061f6(0x1df)],'text':JSON[_0x5061f6(0x1e5)](_0x8080ff[_0x5061f6(0x1fb)])});break;}case v[_0x5061f6(0x237)]:{const _0x1a57cd=(_0x1b4ae4=this[_0x5061f6(0x21b)][_0x5061f6(0x23a)](_0x8080ff[_0x5061f6(0x227)])['find'](_0xb4493e=>_0xb4493e[_0x5061f6(0x21f)]===_0x8080ff[_0x5061f6(0x21f)]))==null?void 0x0:_0x1b4ae4['root'];_0x1a57cd&&this[_0x5061f6(0x21b)]['resolveComment'](_0x18b738,_0x4b0a84,_0x1a57cd['id'],_0x8080ff[_0x5061f6(0x22d)]===I[_0x5061f6(0x1dd)]);break;}}}));}};function _0x38f8(){const _0x47a298=['pipe','content','defineProperty','forEach','Add','YYYY/MM/DD\x20HH:mm','/delete','personId','COMMENT','error','getComment','length','5156640Diumdp','Unknown','4570687jrHdsO','_config','replies','Edit','rangeType','893020qcETST','commentUpdate$','_injector','getCurrentUser','/list','userId','onReady','20604fFeSOA','createTimestamp','_threadCommentDataSource','Reply','24MIMPje','resolved','get','_threadCommentModel','payload','206eLKzng','_initUserSync','threadId','addComment','requireSession','add','users','symbol','addUser','_sessionService','unitId','376fZKSTG','_commentService','thread-comment-data-source.config','4385EpCcfN','ref','solved','updateComment','_init','map','205961mzsTRs','find','rangeId','3252NTsahU','OpenOrReOpen','deleteComment','Solve','parentId','type','getUnit','code','root','_threadCommentDataSourceService','/solved','UNRECOGNIZED','27UvhQbZ','post','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solved','delete','replyId','_userService','setConfig','userID','_httpService','getOwnPropertyDescriptor','parse','pluginName','disposeWithMe','subscribe','body','customRanges','Delete','comment','getUser','reply','comments','stringify','user','/universer-api/comment/unit/','/add','onStarting','getMemberID','_initDataSource','slice','_configService','104867LPOHXK'];_0x38f8=function(){return _0x47a298;};return _0x38f8();}S=V([p(0x0,_0x6d6d7f(_0x1c97aa)),p(0x1,_0x6d6d7f(_0x5d314a)),p(0x2,_0x6d6d7f(_0x17e060)),p(0x3,_0x6d6d7f(_0x5832fe))],S);const z=_0x10e254(0x22a),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5fcc15,_0x45e138,_0x204bec,_0x2c43bf)=>{const _0xb25aca=_0x10e254;for(var _0x434433=_0x2c43bf>0x1?void 0x0:_0x2c43bf?k(_0x45e138,_0x204bec):_0x45e138,_0x5037eb=_0x5fcc15[_0xb25aca(0x205)]-0x1,_0x3a41be;_0x5037eb>=0x0;_0x5037eb--)(_0x3a41be=_0x5fcc15[_0x5037eb])&&(_0x434433=_0x3a41be(_0x434433)||_0x434433);return _0x434433;},_=(_0x56949f,_0x3ab8da)=>(_0x54dcc1,_0x1174c6)=>_0x3ab8da(_0x54dcc1,_0x1174c6,_0x56949f);function _0x5207(_0x3cd395,_0xefde19){const _0x38f800=_0x38f8();return _0x5207=function(_0x52078e,_0x269096){_0x52078e=_0x52078e-0x1da;let _0x1b3a6e=_0x38f800[_0x52078e];return _0x1b3a6e;},_0x5207(_0x3cd395,_0xefde19);}function X(_0x42f45c,_0x5f50d8){const _0x131dfc=_0x10e254,_0x2222ab=_0x42f45c[_0x131dfc(0x20a)][0x0];return{..._0x5f50d8,'id':_0x2222ab[_0x131dfc(0x1df)],'resolved':_0x42f45c['solved']===0x1,'dT':D(_0x2222ab[_0x131dfc(0x215)]),'personId':_0x2222ab[_0x131dfc(0x212)],'threadId':_0x2222ab['threadId']};}function ee(_0x2bdaf9,_0x17699e,_0x533569){const _0x4feb96=_0x10e254;var _0x57fe86,_0x2098f5;if(((_0x2098f5=(_0x57fe86=_0x2bdaf9==null?void 0x0:_0x2bdaf9[_0x4feb96(0x20a)])==null?void 0x0:_0x57fe86[_0x4feb96(0x205)])!=null?_0x2098f5:0x0)>0x0){const _0x2101f6=(_0x2601e8,_0x3d7656)=>({'id':_0x2601e8[_0x4feb96(0x1df)],'threadId':_0x2601e8[_0x4feb96(0x21f)],'dT':D(_0x2601e8[_0x4feb96(0x215)]),'personId':_0x2601e8[_0x4feb96(0x212)],'resolved':_0x2bdaf9[_0x4feb96(0x22d)]===I[_0x4feb96(0x1dd)],'unitId':_0x17699e,'subUnitId':_0x533569,'text':JSON['parse'](_0x2601e8[_0x4feb96(0x1fb)]),'parentId':_0x3d7656}),_0x185f9b=_0x2101f6(_0x2bdaf9['replies'][0x0]);return{..._0x185f9b,'children':_0x2bdaf9[_0x4feb96(0x20a)][_0x4feb96(0x1f7)](0x1)[_0x4feb96(0x230)](_0x9019f4=>_0x2101f6(_0x9019f4,_0x185f9b['id']))};}return null;}let f=class{constructor(_0x34dd0c,_0x39d58e,_0x2ec76b,_0x391450){const _0x5dee1b=_0x10e254;this[_0x5dee1b(0x1e3)]=_0x34dd0c,this['_userService']=_0x39d58e,this[_0x5dee1b(0x226)]=_0x2ec76b,this[_0x5dee1b(0x20f)]=_0x391450;}async['addComment'](_0x4658b5){const _0x3441d9=_0x10e254;var _0x1d5625,_0x6b1e11;const {parentId:_0x5c90c7,unitId:_0x504ab2,text:_0x107425,threadId:_0x3948b1}=_0x4658b5,_0x538e51=(_0x6b1e11=(_0x1d5625=_0x107425[_0x3441d9(0x1ea)])==null?void 0x0:_0x1d5625[_0x3441d9(0x1db)](_0x446c96=>_0x446c96['rangeType']===_0x134f38['COMMENT'])[_0x3441d9(0x230)](_0x31594c=>_0x31594c[_0x3441d9(0x233)]))!=null?_0x6b1e11:[],_0xbc0239=JSON[_0x3441d9(0x1f0)](_0x107425),_0x39e94d=(await this[_0x3441d9(0x226)][_0x3441d9(0x221)](_0x504ab2))[_0x3441d9(0x1f5)]();if(_0x5c90c7){const _0x2ac7f8={'memberId':_0x39e94d,'unitId':_0x504ab2,'content':_0xbc0239,'mention':_0x538e51,'threadId':_0x3948b1},_0x47223c=(await this[_0x3441d9(0x1e3)][_0x3441d9(0x1da)]('/universer-api/comment/unit/'+_0x504ab2+'/reply',{'body':_0x2ac7f8}))[_0x3441d9(0x1e9)][_0x3441d9(0x1ee)];return{..._0x4658b5,'id':_0x47223c[_0x3441d9(0x1df)],'dT':_0x475bbd(+_0x47223c['createTimestamp'])['format'](_0x3441d9(0x1ff)),'personId':_0x47223c['userId']};}else{const _0x8bc6f6={'memberId':_0x39e94d,'unitId':_0x504ab2,'content':_0xbc0239,'mention':_0x538e51},_0x56e546=await this[_0x3441d9(0x1e3)][_0x3441d9(0x1da)](_0x3441d9(0x1f2)+_0x504ab2+_0x3441d9(0x1f3),{'body':_0x8bc6f6});return X(_0x56e546['body'][_0x3441d9(0x1ec)],_0x4658b5);}}async[_0x10e254(0x22e)](_0x52a8e5){const _0x4453a2=_0x10e254;var _0x4b9994,_0x1d07b2;const {text:_0x1d6719,unitId:_0x58c8ca}=_0x52a8e5,_0x4b0dbd=(_0x1d07b2=(_0x4b9994=_0x1d6719[_0x4453a2(0x1ea)])==null?void 0x0:_0x4b9994[_0x4453a2(0x1db)](_0x58f883=>_0x58f883[_0x4453a2(0x20c)]===_0x134f38[_0x4453a2(0x202)])['map'](_0x66ae4a=>_0x66ae4a[_0x4453a2(0x233)]))!=null?_0x1d07b2:[],_0x1f0435=JSON[_0x4453a2(0x1f0)](_0x1d6719),_0x1dd085=_0x52a8e5[_0x4453a2(0x21f)],_0x5b286c=_0x52a8e5['id'],_0x227f77={'memberId':(await this[_0x4453a2(0x226)][_0x4453a2(0x221)](_0x58c8ca))[_0x4453a2(0x1f5)](),'unitId':_0x58c8ca,'threadId':_0x1dd085,'mention':_0x4b0dbd,'content':_0x1f0435,'replyId':_0x5b286c},_0x39bb65=await this[_0x4453a2(0x1e3)][_0x4453a2(0x1da)](_0x4453a2(0x1f2)+_0x58c8ca+'/edit',{'body':_0x227f77});return!_0x39bb65['body']['error']||_0x39bb65['body']['error'][_0x4453a2(0x23b)]===0x1;}async['resolveComment'](_0x277dba){const _0x10be14=_0x10e254,{unitId:_0x3bc346}=_0x277dba,_0x44079e=_0x277dba['threadId'],_0x4bc544={'memberId':this[_0x10be14(0x1e0)][_0x10be14(0x210)]()[_0x10be14(0x1e2)],'unitId':_0x3bc346,'threadId':_0x44079e,'solved':_0x277dba[_0x10be14(0x219)]?I['Solved']:I[_0x10be14(0x235)]},_0x11abe1=await this[_0x10be14(0x1e3)][_0x10be14(0x1da)](_0x10be14(0x1f2)+_0x3bc346+_0x10be14(0x23e),{'body':_0x4bc544});return!_0x11abe1[_0x10be14(0x1e9)]['error']||_0x11abe1[_0x10be14(0x1e9)]['error'][_0x10be14(0x23b)]===0x1;}async['deleteComment'](_0x118bf5,_0x1cfe92,_0x48985f,_0x2aea97){const _0x9bdce0=_0x10e254,_0xa850ed={'memberId':(await this[_0x9bdce0(0x226)][_0x9bdce0(0x221)](_0x118bf5))['getMemberID'](),'threadId':_0x48985f,'replyId':_0x2aea97,'unitId':_0x118bf5},_0x297eef=await this[_0x9bdce0(0x1e3)][_0x9bdce0(0x1da)]('/universer-api/comment/unit/'+_0x118bf5+_0x9bdce0(0x200),{'body':_0xa850ed});return!_0x297eef['body'][_0x9bdce0(0x203)]||_0x297eef[_0x9bdce0(0x1e9)]['error'][_0x9bdce0(0x23b)]===0x1;}async['listComments'](_0x4f2326,_0x1fd3b8,_0x4bdf44){const _0x45f00e=_0x10e254,_0xabcdc1={'unitId':_0x4f2326,'threadId':_0x4bdf44},_0x5b1220=await this[_0x45f00e(0x1e3)][_0x45f00e(0x1da)](_0x45f00e(0x1f2)+_0x4f2326+_0x45f00e(0x211),{'body':_0xabcdc1}),_0x539bdf=_0x4bdf44[_0x45f00e(0x230)](_0x597ae8=>ee(_0x5b1220[_0x45f00e(0x1e9)][_0x45f00e(0x1ef)][_0x597ae8],_0x4f2326,_0x1fd3b8))['filter'](Boolean);return Object['values'](_0x5b1220[_0x45f00e(0x1e9)][_0x45f00e(0x223)])[_0x45f00e(0x1fd)](_0x317743=>{const _0x11013f=_0x45f00e;this[_0x11013f(0x1e0)][_0x11013f(0x225)](_0x317743);}),_0x539bdf;}['saveCommentToSnapshot'](_0x37ce3f){const _0x1d6f90=_0x10e254;return{'id':_0x37ce3f['id'],'threadId':_0x37ce3f['threadId'],'ref':_0x37ce3f[_0x1d6f90(0x22c)]};}};f=Q([_(0x0,_0x6d6d7f(_0x3f6b99)),_(0x1,_0x6d6d7f(_0x17e060)),_(0x2,_0x6d6d7f(_0x2e01b2)),_(0x3,_0x6d6d7f(_0x5832fe))],f);var re=Object[_0x10e254(0x1e4)],te=(_0x351bb0,_0x49c073,_0x3ee29d,_0x1b85ca)=>{const _0x4ce194=_0x10e254;for(var _0x115849=_0x1b85ca>0x1?void 0x0:_0x1b85ca?re(_0x49c073,_0x3ee29d):_0x49c073,_0x3a7364=_0x351bb0[_0x4ce194(0x205)]-0x1,_0x21992e;_0x3a7364>=0x0;_0x3a7364--)(_0x21992e=_0x351bb0[_0x3a7364])&&(_0x115849=_0x21992e(_0x115849)||_0x115849);return _0x115849;},N=(_0x5298f4,_0x294eaf)=>(_0x4f3441,_0x343955)=>_0x294eaf(_0x4f3441,_0x343955,_0x5298f4);let g=class extends _0x398fe1{constructor(_0x44e84a,_0x11f27f){const _0x44ca07=_0x10e254;super(),this[_0x44ca07(0x23d)]=_0x44e84a,this[_0x44ca07(0x216)]=_0x11f27f,this[_0x44ca07(0x1f6)]();}[_0x10e254(0x1f6)](){const _0xb85e65=_0x10e254;this[_0xb85e65(0x23d)]['dataSource']=this[_0xb85e65(0x216)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x38b225),N(0x1,_0x6d6d7f(f))],g);var se=Object[_0x10e254(0x1fc)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x39654c,_0x588826,_0x212a1e)=>_0x588826 in _0x39654c?se(_0x39654c,_0x588826,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x212a1e}):_0x39654c[_0x588826]=_0x212a1e,ie=(_0x3f64b8,_0xbb38d5,_0x21cfed,_0xece1cb)=>{const _0x420d95=_0x10e254;for(var _0x2ae5e5=_0xece1cb>0x1?void 0x0:_0xece1cb?oe(_0xbb38d5,_0x21cfed):_0xbb38d5,_0x31e6ed=_0x3f64b8[_0x420d95(0x205)]-0x1,_0x208571;_0x31e6ed>=0x0;_0x31e6ed--)(_0x208571=_0x3f64b8[_0x31e6ed])&&(_0x2ae5e5=_0x208571(_0x2ae5e5)||_0x2ae5e5);return _0x2ae5e5;},w=(_0x11f2f7,_0x39e8db)=>(_0x92a6b,_0x357654)=>_0x39e8db(_0x92a6b,_0x357654,_0x11f2f7),$=(_0x4875f2,_0x29b281,_0x2d46e1)=>ne(_0x4875f2,typeof _0x29b281!=_0x10e254(0x224)?_0x29b281+'':_0x29b281,_0x2d46e1);let b=class extends _0x571f03{constructor(_0x27b54e=M,_0x5dfb6c,_0x17dec0){const _0x51e9ce=_0x10e254;super(),this[_0x51e9ce(0x209)]=_0x27b54e,this[_0x51e9ce(0x20f)]=_0x5dfb6c,this[_0x51e9ce(0x1f8)]=_0x17dec0;const {..._0x3c6baa}=_0x270269({},M,this[_0x51e9ce(0x209)]);this['_configService'][_0x51e9ce(0x1e1)](z,_0x3c6baa);}[_0x10e254(0x1f4)](){const _0x263b69=_0x10e254;[[f],[g],[S]][_0x263b69(0x1fd)](_0x5be7d7=>{const _0x441ba1=_0x263b69;this[_0x441ba1(0x20f)]['add'](_0x5be7d7);});}[_0x10e254(0x213)](){const _0x3320ef=_0x10e254;this[_0x3320ef(0x20f)]['get'](g),this[_0x3320ef(0x20f)][_0x3320ef(0x21a)](S);}};$(b,_0x10e254(0x1e6),W),$(b,_0x10e254(0x239),_0x4565c4['UNIVER_UNKNOWN']),b=ie([_0x173423(_0x4b05fa,_0x1afa9f,_0x5f1af7),w(0x1,_0x6d6d7f(_0x5832fe)),w(0x2,_0x56350f)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3487(){const _0x3163c0=['Disposable','disposeWithMe','Inject','COMMENT','UniverInstanceType','userID','UniverProThreadCommentDatasource','3322066cBVOte','pipe','createTimestamp','/list','content','delete','replies','Unknown','parse','@univerjs-pro/collaboration-client','type','get','_injector','function','users','getUser','unitId','_init','addComment','Add','UniverProCollaborationClient','UNRECOGNIZED','@univerjs-pro/license','UniverNetwork','deleteComment','add','UniverProLicense','552lnOzGs','syncUpdateMutationToColla','_threadCommentDataSource','UniverCore','_threadCommentDataSourceService','OpenOrReOpen','63265MeawpW','ThreadCommentModel','@univerjs/network','replyId','CollaborationSessionService','UserManagerService','filter','885768cSrkmF','Solve','solved','bufferTime','UniverThreadCommentDataSourcePlugin','resolveComment','ref','userId','format','Reply','_sessionService','map','rxjs','customRanges','commentUpdate$','35lQEKLq','HTTPService','object','/edit','63NVTcui','DependentOn','1618932NotOwv','CommentService','/solved','1781454GRKHZt','_initUserSync','requireSession','onStarting','/universer-api/user/list','Injector','@univerjs/thread-comment','IThreadCommentDataSourceService','rangeId','Edit','subscribe','_config','UniverThreadCommentUi','setConfig','toStringTag','Plugin','user','_threadCommentModel','threadId','UNIVER_UNKNOWN','_configService','UniverLicensePlugin','Solved','Module','_httpService','error','dayjs','getOwnPropertyDescriptor','/universer-api/comment/unit/','Delete','length','personId','_userService','stringify','CustomRangeType','code','getUnit','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','dataSource','exports','@univerjs/thread-comment-ui','/delete','rangeType','getMemberID','addUser','find','resolved','comment','YYYY/MM/DD\x20HH:mm','payload','_commentService','1121032XrEGoc','comments','updateComment','_initDataSource','post','body','18827260JMkbij','/add','@univerjs/core','IConfigService','saveCommentToSnapshot'];_0x3487=function(){return _0x3163c0;};return _0x3487();}function _0x1c40(_0xb18155,_0x2426f1){const _0x34878=_0x3487();return _0x1c40=function(_0x1c4017,_0x47ba14){_0x1c4017=_0x1c4017-0x1e6;let _0x283407=_0x34878[_0x1c4017];return _0x283407;},_0x1c40(_0xb18155,_0x2426f1);}(function(_0x328de8,_0x4c849d){const _0x5348e9=_0x1c40,_0x4517c6=_0x328de8();while(!![]){try{const _0x1bb978=parseInt(_0x5348e9(0x211))/0x1+-parseInt(_0x5348e9(0x1e9))/0x2+parseInt(_0x5348e9(0x226))/0x3+parseInt(_0x5348e9(0x204))/0x4*(parseInt(_0x5348e9(0x20a))/0x5)+-parseInt(_0x5348e9(0x229))/0x6*(parseInt(_0x5348e9(0x220))/0x7)+parseInt(_0x5348e9(0x25e))/0x8*(-parseInt(_0x5348e9(0x224))/0x9)+parseInt(_0x5348e9(0x264))/0xa;if(_0x1bb978===_0x4c849d)break;else _0x4517c6['push'](_0x4517c6['shift']());}catch(_0x399d1c){_0x4517c6['push'](_0x4517c6['shift']());}}}(_0x3487,0xe281b),function(_0xb5a40b,_0x2dd89a){const _0x25e210=_0x1c40;typeof exports==_0x25e210(0x222)&&typeof module<'u'?_0x2dd89a(exports,require(_0x25e210(0x1f2)),require(_0x25e210(0x1ff)),require('@univerjs/core'),require(_0x25e210(0x253)),require(_0x25e210(0x22f)),require(_0x25e210(0x21d)),require(_0x25e210(0x20c))):typeof define==_0x25e210(0x1f6)&&define['amd']?define([_0x25e210(0x252),_0x25e210(0x1f2),_0x25e210(0x1ff),_0x25e210(0x266),_0x25e210(0x253),'@univerjs/thread-comment',_0x25e210(0x21d),_0x25e210(0x20c)],_0x2dd89a):(_0xb5a40b=typeof globalThis<'u'?globalThis:_0xb5a40b||self,_0x2dd89a(_0xb5a40b[_0x25e210(0x1e8)]={},_0xb5a40b[_0x25e210(0x1fd)],_0xb5a40b[_0x25e210(0x203)],_0xb5a40b[_0x25e210(0x207)],_0xb5a40b[_0x25e210(0x235)],_0xb5a40b['UniverThreadComment'],_0xb5a40b[_0x25e210(0x21d)],_0xb5a40b[_0x25e210(0x200)]));}(this,function(_0x21899b,_0x83ca68,_0x4f112c,_0x4b52b9,_0x573dab,_0x2c735f,_0xe71d3e,_0x1aa170){'use strict';const _0x4f1928=_0x1c40;const _0x2b103d=_0x4f1928(0x24f);var _0x45bf40=(_0x158283=>(_0x158283[_0x158283[_0x4f1928(0x209)]=0x0]='OpenOrReOpen',_0x158283[_0x158283[_0x4f1928(0x23f)]=0x1]=_0x4f1928(0x23f),_0x158283[_0x158283[_0x4f1928(0x1fe)]=-0x1]=_0x4f1928(0x1fe),_0x158283))(_0x45bf40||{}),_0x519e78=(_0x17ba78=>(_0x17ba78[_0x17ba78[_0x4f1928(0x1f0)]=0x0]=_0x4f1928(0x1f0),_0x17ba78[_0x17ba78['Add']=0x1]=_0x4f1928(0x1fc),_0x17ba78[_0x17ba78[_0x4f1928(0x21a)]=0x2]='Reply',_0x17ba78[_0x17ba78[_0x4f1928(0x232)]=0x3]=_0x4f1928(0x232),_0x17ba78[_0x17ba78[_0x4f1928(0x246)]=0x4]='Delete',_0x17ba78[_0x17ba78[_0x4f1928(0x212)]=0x5]='Solve',_0x17ba78[_0x17ba78[_0x4f1928(0x1fe)]=-0x1]='UNRECOGNIZED',_0x17ba78))(_0x519e78||{});const _0x2a7f10=_0x36d0f3=>_0x4b52b9[_0x4f1928(0x243)](new Date(+_0x36d0f3))[_0x4f1928(0x219)]('YYYY/MM/DD\x20HH:mm'),_0x53230c=async(_0x343527,_0xc3c108)=>{const _0x313b0a=_0x4f1928,_0xbfac9f=_0x343527[_0x313b0a(0x1f4)](_0x4b52b9[_0x313b0a(0x20f)]),_0x34c43b=_0x343527['get'](_0x1aa170[_0x313b0a(0x221)]);_0xc3c108[_0x313b0a(0x24e)](_0xd07989=>{const _0x1a71d5=_0x313b0a;_0xbfac9f[_0x1a71d5(0x1f8)](_0xd07989)&&_0xc3c108[_0x1a71d5(0x1ee)](_0xd07989);}),_0xc3c108['size']&&(await _0x34c43b['get'](_0x313b0a(0x22d),{'params':{'userIDs':[..._0xc3c108]}}))[_0x313b0a(0x263)][_0x313b0a(0x1f7)][_0x313b0a(0x24e)](_0x23f885=>{const _0x17b2fa=_0x313b0a;_0x23f885&&_0xbfac9f[_0x17b2fa(0x257)](_0x23f885);});};var _0x5a952a=Object[_0x4f1928(0x244)],_0x1f898b=(_0x53818f,_0x4a0e4b,_0x26006b,_0x58baf7)=>{const _0x53766c=_0x4f1928;for(var _0x447679=_0x58baf7>0x1?void 0x0:_0x58baf7?_0x5a952a(_0x4a0e4b,_0x26006b):_0x4a0e4b,_0x2281de=_0x53818f[_0x53766c(0x247)]-0x1,_0x168812;_0x2281de>=0x0;_0x2281de--)(_0x168812=_0x53818f[_0x2281de])&&(_0x447679=_0x168812(_0x447679)||_0x447679);return _0x447679;},_0x55953f=(_0x1d8d2f,_0x4335a5)=>(_0x4e2867,_0x4c72e3)=>_0x4335a5(_0x4e2867,_0x4c72e3,_0x1d8d2f);let _0x3ba491=class extends _0x4b52b9[_0x4f1928(0x269)]{constructor(_0x561d26,_0x5775ed,_0xa5e5a1,_0x481091){const _0x4593ed=_0x4f1928;super(),this['_commentService']=_0x561d26,this[_0x4593ed(0x23a)]=_0x5775ed,this['_userService']=_0xa5e5a1,this[_0x4593ed(0x1f5)]=_0x481091,this['_init'](),this[_0x4593ed(0x22a)]();}[_0x4f1928(0x22a)](){const _0x5dc787=_0x4f1928;this[_0x5dc787(0x26a)](this[_0x5dc787(0x23a)]['commentUpdate$'][_0x5dc787(0x1ea)](_0xe71d3e[_0x5dc787(0x214)](0x10))[_0x5dc787(0x233)](_0x3af76e=>{const _0x5c46aa=_0x5dc787,_0x32b327=new Set();_0x3af76e['forEach'](_0x275330=>{const _0x774056=_0x1c40;switch(_0x275330['type']){case'add':{const _0xe6e794=_0x275330[_0x774056(0x25c)][_0x774056(0x248)];_0x32b327['add'](_0xe6e794);break;}}}),_0x53230c(this[_0x5c46aa(0x1f5)],_0x32b327);}));}[_0x4f1928(0x1fa)](){const _0x594ccc=_0x4f1928;this[_0x594ccc(0x26a)](this[_0x594ccc(0x25d)][_0x594ccc(0x21f)][_0x594ccc(0x233)](async _0x394bf0=>{const _0x29cd07=_0x594ccc;var _0x202136,_0xc741c9,_0x1611aa,_0x24be9a;const _0x3d5eca=(_0x202136=this[_0x29cd07(0x23a)][_0x29cd07(0x24d)](_0x394bf0[_0x29cd07(0x1f9)])[_0x29cd07(0x258)](_0x1a6163=>_0x1a6163[_0x29cd07(0x23b)]===_0x394bf0[_0x29cd07(0x23b)]))==null?void 0x0:_0x202136['root'];if(!_0x3d5eca)return;const {unitId:_0x461af1,subUnitId:_0xab02a9}=_0x3d5eca;switch(_0x394bf0[_0x29cd07(0x239)]&&this[_0x29cd07(0x249)][_0x29cd07(0x257)](_0x394bf0[_0x29cd07(0x239)]),_0x394bf0['type']){case _0x519e78[_0x29cd07(0x1fc)]:break;case _0x519e78[_0x29cd07(0x21a)]:{this['_threadCommentModel']['addComment'](_0x461af1,_0xab02a9,{'unitId':_0x461af1,'subUnitId':_0xab02a9,'ref':'','id':_0x394bf0[_0x29cd07(0x20d)],'dT':_0x2a7f10(+_0x394bf0[_0x29cd07(0x1eb)]),'threadId':_0x394bf0['threadId'],'personId':(_0x1611aa=(_0xc741c9=_0x394bf0[_0x29cd07(0x239)])==null?void 0x0:_0xc741c9[_0x29cd07(0x1e7)])!=null?_0x1611aa:_0x394bf0[_0x29cd07(0x218)],'text':JSON[_0x29cd07(0x1f1)](_0x394bf0['content']),'parentId':_0x3d5eca['id']});break;}case _0x519e78[_0x29cd07(0x246)]:{const _0x4c1501=this[_0x29cd07(0x23a)]['getComment'](_0x461af1,_0xab02a9,_0x394bf0[_0x29cd07(0x20d)]);_0x4c1501&&_0x4c1501['parentId']&&this[_0x29cd07(0x23a)][_0x29cd07(0x201)](_0x461af1,_0xab02a9,_0x394bf0[_0x29cd07(0x20d)]);break;}case _0x519e78[_0x29cd07(0x232)]:{this[_0x29cd07(0x23a)][_0x29cd07(0x260)](_0x461af1,_0xab02a9,{'commentId':_0x394bf0[_0x29cd07(0x20d)],'text':JSON[_0x29cd07(0x1f1)](_0x394bf0[_0x29cd07(0x1ed)])});break;}case _0x519e78[_0x29cd07(0x212)]:{const _0x1deec4=(_0x24be9a=this['_threadCommentModel']['getUnit'](_0x394bf0[_0x29cd07(0x1f9)])['find'](_0x109925=>_0x109925[_0x29cd07(0x23b)]===_0x394bf0[_0x29cd07(0x23b)]))==null?void 0x0:_0x24be9a['root'];_0x1deec4&&this[_0x29cd07(0x23a)][_0x29cd07(0x216)](_0x461af1,_0xab02a9,_0x1deec4['id'],_0x394bf0[_0x29cd07(0x213)]===_0x45bf40[_0x29cd07(0x23f)]);break;}}}));}};_0x3ba491=_0x1f898b([_0x55953f(0x0,_0x4b52b9[_0x4f1928(0x26b)](_0x83ca68[_0x4f1928(0x227)])),_0x55953f(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x2c735f[_0x4f1928(0x20b)])),_0x55953f(0x2,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x20f)])),_0x55953f(0x3,_0x4b52b9['Inject'](_0x4b52b9[_0x4f1928(0x22e)]))],_0x3ba491);const _0x3a0c95='thread-comment-data-source.config',_0x579913={};var _0x8b7eb5=Object[_0x4f1928(0x244)],_0x4f7e4d=(_0x443d3f,_0x100040,_0x659cc0,_0x38f699)=>{const _0x4bfad7=_0x4f1928;for(var _0x2dba2b=_0x38f699>0x1?void 0x0:_0x38f699?_0x8b7eb5(_0x100040,_0x659cc0):_0x100040,_0x4df26d=_0x443d3f[_0x4bfad7(0x247)]-0x1,_0x2d83eb;_0x4df26d>=0x0;_0x4df26d--)(_0x2d83eb=_0x443d3f[_0x4df26d])&&(_0x2dba2b=_0x2d83eb(_0x2dba2b)||_0x2dba2b);return _0x2dba2b;},_0x364744=(_0x2444d5,_0x366597)=>(_0x1fb914,_0x537a73)=>_0x366597(_0x1fb914,_0x537a73,_0x2444d5);function _0x4af0b4(_0x2fcd28,_0x1b107b){const _0x5709cd=_0x4f1928,_0x3c52c5=_0x2fcd28['replies'][0x0];return{..._0x1b107b,'id':_0x3c52c5[_0x5709cd(0x20d)],'resolved':_0x2fcd28[_0x5709cd(0x213)]===0x1,'dT':_0x2a7f10(_0x3c52c5[_0x5709cd(0x1eb)]),'personId':_0x3c52c5[_0x5709cd(0x218)],'threadId':_0x3c52c5[_0x5709cd(0x23b)]};}function _0x368d2f(_0x374488,_0x4e2c40,_0x41ccde){const _0x1a3881=_0x4f1928;var _0x3586c7,_0x46f883;if(((_0x46f883=(_0x3586c7=_0x374488==null?void 0x0:_0x374488[_0x1a3881(0x1ef)])==null?void 0x0:_0x3586c7['length'])!=null?_0x46f883:0x0)>0x0){const _0x364c1=(_0x5d155c,_0x1b4aa8)=>({'id':_0x5d155c[_0x1a3881(0x20d)],'threadId':_0x5d155c[_0x1a3881(0x23b)],'dT':_0x2a7f10(_0x5d155c[_0x1a3881(0x1eb)]),'personId':_0x5d155c[_0x1a3881(0x218)],'resolved':_0x374488['solved']===_0x45bf40['Solved'],'unitId':_0x4e2c40,'subUnitId':_0x41ccde,'text':JSON[_0x1a3881(0x1f1)](_0x5d155c[_0x1a3881(0x1ed)]),'parentId':_0x1b4aa8}),_0x30a47b=_0x364c1(_0x374488[_0x1a3881(0x1ef)][0x0]);return{..._0x30a47b,'children':_0x374488[_0x1a3881(0x1ef)]['slice'](0x1)[_0x1a3881(0x21c)](_0x4bb9f3=>_0x364c1(_0x4bb9f3,_0x30a47b['id']))};}return null;}let _0x2ffaf1=class{constructor(_0x5838cf,_0x414a58,_0xda22a1,_0x28d5d6){const _0x7add01=_0x4f1928;this[_0x7add01(0x241)]=_0x5838cf,this['_userService']=_0x414a58,this[_0x7add01(0x21b)]=_0xda22a1,this[_0x7add01(0x1f5)]=_0x28d5d6;}async[_0x4f1928(0x1fb)](_0x516b41){const _0x32b555=_0x4f1928;var _0x1a0463,_0x4d4921;const {parentId:_0x1ac395,unitId:_0x181067,text:_0x357cca,threadId:_0x2fa1a8}=_0x516b41,_0x12dea8=(_0x4d4921=(_0x1a0463=_0x357cca[_0x32b555(0x21e)])==null?void 0x0:_0x1a0463[_0x32b555(0x210)](_0x556e3c=>_0x556e3c[_0x32b555(0x255)]===_0x4b52b9['CustomRangeType'][_0x32b555(0x26c)])[_0x32b555(0x21c)](_0x317392=>_0x317392[_0x32b555(0x231)]))!=null?_0x4d4921:[],_0x4fa72c=JSON[_0x32b555(0x24a)](_0x357cca),_0x16d0b0=(await this['_sessionService'][_0x32b555(0x22b)](_0x181067))[_0x32b555(0x256)]();if(_0x1ac395){const _0x4c782f={'memberId':_0x16d0b0,'unitId':_0x181067,'content':_0x4fa72c,'mention':_0x12dea8,'threadId':_0x2fa1a8},_0x15aabb=(await this[_0x32b555(0x241)][_0x32b555(0x262)](_0x32b555(0x245)+_0x181067+'/reply',{'body':_0x4c782f}))[_0x32b555(0x263)]['reply'];return{..._0x516b41,'id':_0x15aabb['replyId'],'dT':_0x4b52b9[_0x32b555(0x243)](+_0x15aabb[_0x32b555(0x1eb)])[_0x32b555(0x219)](_0x32b555(0x25b)),'personId':_0x15aabb['userId']};}else{const _0x4c16b5={'memberId':_0x16d0b0,'unitId':_0x181067,'content':_0x4fa72c,'mention':_0x12dea8},_0x226818=await this[_0x32b555(0x241)]['post']('/universer-api/comment/unit/'+_0x181067+_0x32b555(0x265),{'body':_0x4c16b5});return _0x4af0b4(_0x226818[_0x32b555(0x263)][_0x32b555(0x25a)],_0x516b41);}}async[_0x4f1928(0x260)](_0x4c9ba0){const _0x168b1a=_0x4f1928;var _0x13f2af,_0x679827;const {text:_0x3e96db,unitId:_0x4d5599}=_0x4c9ba0,_0x24fb22=(_0x679827=(_0x13f2af=_0x3e96db['customRanges'])==null?void 0x0:_0x13f2af[_0x168b1a(0x210)](_0x188c9d=>_0x188c9d[_0x168b1a(0x255)]===_0x4b52b9[_0x168b1a(0x24b)][_0x168b1a(0x26c)])[_0x168b1a(0x21c)](_0x1d8eb=>_0x1d8eb[_0x168b1a(0x231)]))!=null?_0x679827:[],_0x3bb01a=JSON[_0x168b1a(0x24a)](_0x3e96db),_0x2891c8=_0x4c9ba0[_0x168b1a(0x23b)],_0x32a917=_0x4c9ba0['id'],_0x1513c3={'memberId':(await this[_0x168b1a(0x21b)][_0x168b1a(0x22b)](_0x4d5599))[_0x168b1a(0x256)](),'unitId':_0x4d5599,'threadId':_0x2891c8,'mention':_0x24fb22,'content':_0x3bb01a,'replyId':_0x32a917},_0x4518b0=await this[_0x168b1a(0x241)][_0x168b1a(0x262)](_0x168b1a(0x245)+_0x4d5599+_0x168b1a(0x223),{'body':_0x1513c3});return!_0x4518b0[_0x168b1a(0x263)][_0x168b1a(0x242)]||_0x4518b0['body']['error'][_0x168b1a(0x24c)]===0x1;}async[_0x4f1928(0x216)](_0x2dfc20){const _0x5ba600=_0x4f1928,{unitId:_0x165a20}=_0x2dfc20,_0x3fa8b5=_0x2dfc20['threadId'],_0x3a0268={'memberId':this[_0x5ba600(0x249)]['getCurrentUser']()['userID'],'unitId':_0x165a20,'threadId':_0x3fa8b5,'solved':_0x2dfc20[_0x5ba600(0x259)]?_0x45bf40[_0x5ba600(0x23f)]:_0x45bf40[_0x5ba600(0x209)]},_0x2d890=await this['_httpService'][_0x5ba600(0x262)](_0x5ba600(0x245)+_0x165a20+_0x5ba600(0x228),{'body':_0x3a0268});return!_0x2d890[_0x5ba600(0x263)]['error']||_0x2d890[_0x5ba600(0x263)][_0x5ba600(0x242)][_0x5ba600(0x24c)]===0x1;}async[_0x4f1928(0x201)](_0x4cb890,_0x4f288b,_0x23a3c4,_0x41bf13){const _0x4a8570=_0x4f1928,_0x1dee95={'memberId':(await this['_sessionService']['requireSession'](_0x4cb890))[_0x4a8570(0x256)](),'threadId':_0x23a3c4,'replyId':_0x41bf13,'unitId':_0x4cb890},_0x535fc2=await this[_0x4a8570(0x241)][_0x4a8570(0x262)](_0x4a8570(0x245)+_0x4cb890+_0x4a8570(0x254),{'body':_0x1dee95});return!_0x535fc2[_0x4a8570(0x263)][_0x4a8570(0x242)]||_0x535fc2[_0x4a8570(0x263)]['error'][_0x4a8570(0x24c)]===0x1;}async['listComments'](_0x2b962a,_0x6ef4ef,_0x3aeca1){const _0x28981d=_0x4f1928,_0x463a16={'unitId':_0x2b962a,'threadId':_0x3aeca1},_0x1baee2=await this[_0x28981d(0x241)][_0x28981d(0x262)]('/universer-api/comment/unit/'+_0x2b962a+_0x28981d(0x1ec),{'body':_0x463a16}),_0x233572=_0x3aeca1[_0x28981d(0x21c)](_0x3bceb5=>_0x368d2f(_0x1baee2['body'][_0x28981d(0x25f)][_0x3bceb5],_0x2b962a,_0x6ef4ef))[_0x28981d(0x210)](Boolean);return Object['values'](_0x1baee2['body'][_0x28981d(0x1f7)])['forEach'](_0x5bfcb6=>{const _0x5a5533=_0x28981d;this[_0x5a5533(0x249)]['addUser'](_0x5bfcb6);}),_0x233572;}[_0x4f1928(0x268)](_0x32fc64){const _0x3b738b=_0x4f1928;return{'id':_0x32fc64['id'],'threadId':_0x32fc64['threadId'],'ref':_0x32fc64[_0x3b738b(0x217)]};}};_0x2ffaf1=_0x4f7e4d([_0x364744(0x0,_0x4b52b9[_0x4f1928(0x26b)](_0x1aa170[_0x4f1928(0x221)])),_0x364744(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x20f)])),_0x364744(0x2,_0x4b52b9['Inject'](_0x83ca68[_0x4f1928(0x20e)])),_0x364744(0x3,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x22e)]))],_0x2ffaf1);var _0x3060a5=Object[_0x4f1928(0x244)],_0x33f9fe=(_0x41e35f,_0x5bf352,_0x383b5b,_0x1ef93d)=>{const _0x42d8bf=_0x4f1928;for(var _0x277e38=_0x1ef93d>0x1?void 0x0:_0x1ef93d?_0x3060a5(_0x5bf352,_0x383b5b):_0x5bf352,_0x520994=_0x41e35f[_0x42d8bf(0x247)]-0x1,_0x5c92fe;_0x520994>=0x0;_0x520994--)(_0x5c92fe=_0x41e35f[_0x520994])&&(_0x277e38=_0x5c92fe(_0x277e38)||_0x277e38);return _0x277e38;},_0x4123e1=(_0x58bf51,_0x332ef6)=>(_0x595241,_0x253983)=>_0x332ef6(_0x595241,_0x253983,_0x58bf51);let _0x2e91ed=class extends _0x4b52b9[_0x4f1928(0x269)]{constructor(_0x39cf27,_0x2f067f){const _0x300524=_0x4f1928;super(),this['_threadCommentDataSourceService']=_0x39cf27,this[_0x300524(0x206)]=_0x2f067f,this[_0x300524(0x261)]();}[_0x4f1928(0x261)](){const _0x193773=_0x4f1928;this[_0x193773(0x208)][_0x193773(0x251)]=this['_threadCommentDataSource'],this[_0x193773(0x208)][_0x193773(0x205)]=!0x1;}};_0x2e91ed=_0x33f9fe([_0x4123e1(0x0,_0x2c735f[_0x4f1928(0x230)]),_0x4123e1(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x2ffaf1))],_0x2e91ed);var _0x2b67d5=Object['defineProperty'],_0x518bd9=Object['getOwnPropertyDescriptor'],_0x516d46=(_0x45829b,_0x52e461,_0x48f3cb)=>_0x52e461 in _0x45829b?_0x2b67d5(_0x45829b,_0x52e461,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48f3cb}):_0x45829b[_0x52e461]=_0x48f3cb,_0x25a3b2=(_0xda98de,_0x52bbdf,_0x2485df,_0x1e2b0e)=>{const _0x23a33c=_0x4f1928;for(var _0x98c622=_0x1e2b0e>0x1?void 0x0:_0x1e2b0e?_0x518bd9(_0x52bbdf,_0x2485df):_0x52bbdf,_0x379ff8=_0xda98de[_0x23a33c(0x247)]-0x1,_0x3f3baa;_0x379ff8>=0x0;_0x379ff8--)(_0x3f3baa=_0xda98de[_0x379ff8])&&(_0x98c622=_0x3f3baa(_0x98c622)||_0x98c622);return _0x98c622;},_0x19f10e=(_0x4a8cc1,_0x5e6f9d)=>(_0x342257,_0x21fe12)=>_0x5e6f9d(_0x342257,_0x21fe12,_0x4a8cc1),_0x2db56a=(_0xb1d47f,_0x2a40ff,_0x468f99)=>_0x516d46(_0xb1d47f,typeof _0x2a40ff!='symbol'?_0x2a40ff+'':_0x2a40ff,_0x468f99);_0x21899b[_0x4f1928(0x215)]=class extends _0x4b52b9[_0x4f1928(0x238)]{constructor(_0xa69be9=_0x579913,_0x109f99,_0x2af70d){const _0x116912=_0x4f1928;super(),this[_0x116912(0x234)]=_0xa69be9,this[_0x116912(0x1f5)]=_0x109f99,this[_0x116912(0x23d)]=_0x2af70d;const {..._0x3ecf7b}=_0x4b52b9['merge']({},_0x579913,this[_0x116912(0x234)]);this['_configService'][_0x116912(0x236)](_0x3a0c95,_0x3ecf7b);}[_0x4f1928(0x22c)](){[[_0x2ffaf1],[_0x2e91ed],[_0x3ba491]]['forEach'](_0x145de4=>{const _0x3341fd=_0x1c40;this[_0x3341fd(0x1f5)][_0x3341fd(0x202)](_0x145de4);});}['onReady'](){const _0x13d1bc=_0x4f1928;this[_0x13d1bc(0x1f5)][_0x13d1bc(0x1f4)](_0x2e91ed),this['_injector'][_0x13d1bc(0x1f4)](_0x3ba491);}},_0x2db56a(_0x21899b['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2b103d),_0x2db56a(_0x21899b[_0x4f1928(0x215)],_0x4f1928(0x1f3),_0x4b52b9[_0x4f1928(0x1e6)][_0x4f1928(0x23c)]),_0x21899b[_0x4f1928(0x215)]=_0x25a3b2([_0x4b52b9[_0x4f1928(0x225)](_0x573dab['UniverThreadCommentUIPlugin'],_0x83ca68['UniverCollaborationClientPlugin'],_0x4f112c[_0x4f1928(0x23e)]),_0x19f10e(0x1,_0x4b52b9['Inject'](_0x4b52b9[_0x4f1928(0x22e)])),_0x19f10e(0x2,_0x4b52b9[_0x4f1928(0x267)])],_0x21899b[_0x4f1928(0x215)]),Object[_0x4f1928(0x250)](_0x21899b,Symbol[_0x4f1928(0x237)],{'value':_0x4f1928(0x240)});}));
1
+ function _0x5485(){const _0x4595c6=['@univerjs/core','rxjs','_sessionService','_userService','thread-comment-data-source.config','Add','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','slice','1757280ItoUOj','solved','/universer-api/comment/unit/','UniverProThreadCommentDatasource','post','getMemberID','@univerjs/thread-comment-ui','addUser','DependentOn','UniverThreadCommentUi','rangeType','Disposable','userID','Unknown','/list','UniverNetwork','UNRECOGNIZED','comment','IThreadCommentDataSourceService','UniverProLicense','242620aIxFrr','1566OgifbH','_init','delete','Reply','UniverThreadCommentDataSourcePlugin','threadId','dataSource','935238GJlPRq','toStringTag','add','14shlWCs','onStarting','YYYY/MM/DD\x20HH:mm','10HFfECh','OpenOrReOpen','_configService','code','replyId','UniverCollaborationClientPlugin','3624VmdaYd','_injector','Edit','length','@univerjs/network','subscribe','UniverThreadComment','ref','deleteComment','map','Plugin','find','customRanges','_initDataSource','Inject','UniverLicensePlugin','body','_threadCommentModel','replies','error','Injector','commentUpdate$','getCurrentUser','userId','4412632lJrzxq','COMMENT','users','root','type','defineProperty','UniverInstanceType','_commentService','disposeWithMe','UserManagerService','exports','_initUserSync','get','bufferTime','symbol','unitId','1197822lybgqY','content','/reply','_config','merge','createTimestamp','dayjs','CustomRangeType','Solved','addComment','CollaborationSessionService','updateComment','pluginName','getUnit','@univerjs/thread-comment','UniverThreadCommentUIPlugin','_threadCommentDataSource','@univerjs-pro/collaboration-client','values','format','parse','Delete','user','CommentService','HTTPService','requireSession','/delete','size','reply','4269807ebEtfe','filter','@univerjs-pro/license','UniverCore','Module','UniverProCollaborationClient','getOwnPropertyDescriptor','resolveComment','IConfigService','rangeId','/universer-api/user/list','forEach'];_0x5485=function(){return _0x4595c6;};return _0x5485();}function _0x2e5a(_0x58d2e8,_0x24cb58){const _0x5485fa=_0x5485();return _0x2e5a=function(_0x2e5a13,_0x46b429){_0x2e5a13=_0x2e5a13-0x142;let _0x4e9131=_0x5485fa[_0x2e5a13];return _0x4e9131;},_0x2e5a(_0x58d2e8,_0x24cb58);}(function(_0x20dc26,_0x14167f){const _0x2484ed=_0x2e5a,_0x335a84=_0x20dc26();while(!![]){try{const _0x3136d3=parseInt(_0x2484ed(0x1b4))/0x1+-parseInt(_0x2484ed(0x1bc))/0x2+parseInt(_0x2484ed(0x1b5))/0x3*(-parseInt(_0x2484ed(0x145))/0x4)+parseInt(_0x2484ed(0x1a0))/0x5+parseInt(_0x2484ed(0x16d))/0x6*(-parseInt(_0x2484ed(0x1bf))/0x7)+parseInt(_0x2484ed(0x15d))/0x8+-parseInt(_0x2484ed(0x18a))/0x9*(-parseInt(_0x2484ed(0x1c2))/0xa);if(_0x3136d3===_0x14167f)break;else _0x335a84['push'](_0x335a84['shift']());}catch(_0x48518e){_0x335a84['push'](_0x335a84['shift']());}}}(_0x5485,0x446bd),function(_0x48e470,_0x3a447c){const _0x4eb411=_0x2e5a;typeof exports=='object'&&typeof module<'u'?_0x3a447c(exports,require(_0x4eb411(0x17e)),require(_0x4eb411(0x18c)),require(_0x4eb411(0x196)),require(_0x4eb411(0x1a6)),require('@univerjs/thread-comment'),require(_0x4eb411(0x197)),require(_0x4eb411(0x149))):typeof define=='function'&&define['amd']?define([_0x4eb411(0x167),_0x4eb411(0x17e),_0x4eb411(0x18c),'@univerjs/core','@univerjs/thread-comment-ui',_0x4eb411(0x17b),'rxjs',_0x4eb411(0x149)],_0x3a447c):(_0x48e470=typeof globalThis<'u'?globalThis:_0x48e470||self,_0x3a447c(_0x48e470[_0x4eb411(0x1a3)]={},_0x48e470[_0x4eb411(0x18f)],_0x48e470[_0x4eb411(0x1b3)],_0x48e470[_0x4eb411(0x18d)],_0x48e470[_0x4eb411(0x1a9)],_0x48e470[_0x4eb411(0x14b)],_0x48e470[_0x4eb411(0x197)],_0x48e470[_0x4eb411(0x1af)]));}(this,function(_0x35a643,_0x2a835d,_0x5db0b9,_0x4e7bbd,_0x2ae55d,_0x525930,_0x25beb2,_0x47aaad){'use strict';const _0x2c40ff=_0x2e5a;const _0x42713b=_0x2c40ff(0x19d);var _0x2d0b25=(_0x285e77=>(_0x285e77[_0x285e77['OpenOrReOpen']=0x0]=_0x2c40ff(0x1c3),_0x285e77[_0x285e77[_0x2c40ff(0x175)]=0x1]=_0x2c40ff(0x175),_0x285e77[_0x285e77[_0x2c40ff(0x1b0)]=-0x1]=_0x2c40ff(0x1b0),_0x285e77))(_0x2d0b25||{}),_0x16d9c5=(_0x1ee13=>(_0x1ee13[_0x1ee13[_0x2c40ff(0x1ad)]=0x0]=_0x2c40ff(0x1ad),_0x1ee13[_0x1ee13[_0x2c40ff(0x19b)]=0x1]=_0x2c40ff(0x19b),_0x1ee13[_0x1ee13[_0x2c40ff(0x1b8)]=0x2]=_0x2c40ff(0x1b8),_0x1ee13[_0x1ee13[_0x2c40ff(0x147)]=0x3]='Edit',_0x1ee13[_0x1ee13['Delete']=0x4]='Delete',_0x1ee13[_0x1ee13['Solve']=0x5]='Solve',_0x1ee13[_0x1ee13[_0x2c40ff(0x1b0)]=-0x1]=_0x2c40ff(0x1b0),_0x1ee13))(_0x16d9c5||{});const _0x1d79cb=_0x4608b7=>_0x4e7bbd[_0x2c40ff(0x173)](new Date(+_0x4608b7))[_0x2c40ff(0x180)](_0x2c40ff(0x1c1)),_0x3f7873=async(_0xc5016e,_0x11d986)=>{const _0x24ac0b=_0x2c40ff,_0x3535a4=_0xc5016e['get'](_0x4e7bbd['UserManagerService']),_0x597a58=_0xc5016e[_0x24ac0b(0x169)](_0x47aaad[_0x24ac0b(0x185)]);_0x11d986[_0x24ac0b(0x195)](_0x19835a=>{const _0x34bca7=_0x24ac0b;_0x3535a4['getUser'](_0x19835a)&&_0x11d986[_0x34bca7(0x1b7)](_0x19835a);}),_0x11d986[_0x24ac0b(0x188)]&&(await _0x597a58[_0x24ac0b(0x169)](_0x24ac0b(0x194),{'params':{'userIDs':[..._0x11d986]}}))[_0x24ac0b(0x155)][_0x24ac0b(0x15f)][_0x24ac0b(0x195)](_0xcea7d4=>{const _0x447b3d=_0x24ac0b;_0xcea7d4&&_0x3535a4[_0x447b3d(0x1a7)](_0xcea7d4);});};var _0x30a12d=Object[_0x2c40ff(0x190)],_0x38724c=(_0xb27ddc,_0x73163d,_0x58fe46,_0x566983)=>{const _0x51d464=_0x2c40ff;for(var _0x5bf06f=_0x566983>0x1?void 0x0:_0x566983?_0x30a12d(_0x73163d,_0x58fe46):_0x73163d,_0x9e8e11=_0xb27ddc[_0x51d464(0x148)]-0x1,_0x169749;_0x9e8e11>=0x0;_0x9e8e11--)(_0x169749=_0xb27ddc[_0x9e8e11])&&(_0x5bf06f=_0x169749(_0x5bf06f)||_0x5bf06f);return _0x5bf06f;},_0x1edf6f=(_0x2d63a6,_0x561b1c)=>(_0x3e2989,_0x1d792e)=>_0x561b1c(_0x3e2989,_0x1d792e,_0x2d63a6);let _0x31fca3=class extends _0x4e7bbd['Disposable']{constructor(_0x37b3c3,_0x34ee76,_0x155012,_0x2e8cf4){const _0x2fd27b=_0x2c40ff;super(),this[_0x2fd27b(0x164)]=_0x37b3c3,this[_0x2fd27b(0x156)]=_0x34ee76,this[_0x2fd27b(0x199)]=_0x155012,this[_0x2fd27b(0x146)]=_0x2e8cf4,this['_init'](),this[_0x2fd27b(0x168)]();}[_0x2c40ff(0x168)](){const _0x23e045=_0x2c40ff;this[_0x23e045(0x165)](this['_threadCommentModel'][_0x23e045(0x15a)]['pipe'](_0x25beb2[_0x23e045(0x16a)](0x10))[_0x23e045(0x14a)](_0x8d31f2=>{const _0x56cfd5=_0x23e045,_0x43766d=new Set();_0x8d31f2[_0x56cfd5(0x195)](_0x17ef86=>{const _0x582e7b=_0x56cfd5;switch(_0x17ef86['type']){case _0x582e7b(0x1be):{const _0x1e150e=_0x17ef86['payload']['personId'];_0x43766d[_0x582e7b(0x1be)](_0x1e150e);break;}}}),_0x3f7873(this[_0x56cfd5(0x146)],_0x43766d);}));}[_0x2c40ff(0x1b6)](){const _0x3395da=_0x2c40ff;this[_0x3395da(0x165)](this[_0x3395da(0x164)][_0x3395da(0x15a)][_0x3395da(0x14a)](async _0x13a53f=>{const _0x9151eb=_0x3395da;var _0x2a8e76,_0x45e15b,_0x14496d,_0x5cc27a;const _0x439343=(_0x2a8e76=this[_0x9151eb(0x156)]['getUnit'](_0x13a53f[_0x9151eb(0x16c)])[_0x9151eb(0x150)](_0x22afad=>_0x22afad[_0x9151eb(0x1ba)]===_0x13a53f[_0x9151eb(0x1ba)]))==null?void 0x0:_0x2a8e76[_0x9151eb(0x160)];if(!_0x439343)return;const {unitId:_0xbbaf9,subUnitId:_0xee3cdd}=_0x439343;switch(_0x13a53f[_0x9151eb(0x183)]&&this['_userService'][_0x9151eb(0x1a7)](_0x13a53f[_0x9151eb(0x183)]),_0x13a53f['type']){case _0x16d9c5[_0x9151eb(0x19b)]:break;case _0x16d9c5[_0x9151eb(0x1b8)]:{this[_0x9151eb(0x156)][_0x9151eb(0x176)](_0xbbaf9,_0xee3cdd,{'unitId':_0xbbaf9,'subUnitId':_0xee3cdd,'ref':'','id':_0x13a53f[_0x9151eb(0x143)],'dT':_0x1d79cb(+_0x13a53f[_0x9151eb(0x172)]),'threadId':_0x13a53f[_0x9151eb(0x1ba)],'personId':(_0x14496d=(_0x45e15b=_0x13a53f['user'])==null?void 0x0:_0x45e15b[_0x9151eb(0x1ac)])!=null?_0x14496d:_0x13a53f['userId'],'text':JSON[_0x9151eb(0x181)](_0x13a53f[_0x9151eb(0x16e)]),'parentId':_0x439343['id']});break;}case _0x16d9c5[_0x9151eb(0x182)]:{const _0x2eb0d2=this[_0x9151eb(0x156)]['getComment'](_0xbbaf9,_0xee3cdd,_0x13a53f[_0x9151eb(0x143)]);_0x2eb0d2&&_0x2eb0d2['parentId']&&this[_0x9151eb(0x156)][_0x9151eb(0x14d)](_0xbbaf9,_0xee3cdd,_0x13a53f[_0x9151eb(0x143)]);break;}case _0x16d9c5['Edit']:{this[_0x9151eb(0x156)][_0x9151eb(0x178)](_0xbbaf9,_0xee3cdd,{'commentId':_0x13a53f[_0x9151eb(0x143)],'text':JSON[_0x9151eb(0x181)](_0x13a53f[_0x9151eb(0x16e)])});break;}case _0x16d9c5['Solve']:{const _0x111ee2=(_0x5cc27a=this[_0x9151eb(0x156)][_0x9151eb(0x17a)](_0x13a53f[_0x9151eb(0x16c)])[_0x9151eb(0x150)](_0x9d9f09=>_0x9d9f09['threadId']===_0x13a53f[_0x9151eb(0x1ba)]))==null?void 0x0:_0x5cc27a[_0x9151eb(0x160)];_0x111ee2&&this['_threadCommentModel'][_0x9151eb(0x191)](_0xbbaf9,_0xee3cdd,_0x111ee2['id'],_0x13a53f[_0x9151eb(0x1a1)]===_0x2d0b25[_0x9151eb(0x175)]);break;}}}));}};_0x31fca3=_0x38724c([_0x1edf6f(0x0,_0x4e7bbd[_0x2c40ff(0x153)](_0x2a835d[_0x2c40ff(0x184)])),_0x1edf6f(0x1,_0x4e7bbd[_0x2c40ff(0x153)](_0x525930['ThreadCommentModel'])),_0x1edf6f(0x2,_0x4e7bbd[_0x2c40ff(0x153)](_0x4e7bbd[_0x2c40ff(0x166)])),_0x1edf6f(0x3,_0x4e7bbd[_0x2c40ff(0x153)](_0x4e7bbd[_0x2c40ff(0x159)]))],_0x31fca3);const _0xf1719f=_0x2c40ff(0x19a),_0xd17df2={};var _0x3144cf=Object['getOwnPropertyDescriptor'],_0x2878e7=(_0x1a4c3a,_0x118cb7,_0x485f72,_0x3602e7)=>{const _0x49d9a4=_0x2c40ff;for(var _0x16419a=_0x3602e7>0x1?void 0x0:_0x3602e7?_0x3144cf(_0x118cb7,_0x485f72):_0x118cb7,_0x5bbd9f=_0x1a4c3a[_0x49d9a4(0x148)]-0x1,_0x317aee;_0x5bbd9f>=0x0;_0x5bbd9f--)(_0x317aee=_0x1a4c3a[_0x5bbd9f])&&(_0x16419a=_0x317aee(_0x16419a)||_0x16419a);return _0x16419a;},_0x4b8028=(_0x5a7cc1,_0xd6333b)=>(_0x3b6847,_0x4b6110)=>_0xd6333b(_0x3b6847,_0x4b6110,_0x5a7cc1);function _0x226981(_0x5d7674,_0x2629d7){const _0x3a15ba=_0x2c40ff,_0x5d5c9a=_0x5d7674[_0x3a15ba(0x157)][0x0];return{..._0x2629d7,'id':_0x5d5c9a[_0x3a15ba(0x143)],'resolved':_0x5d7674[_0x3a15ba(0x1a1)]===0x1,'dT':_0x1d79cb(_0x5d5c9a['createTimestamp']),'personId':_0x5d5c9a[_0x3a15ba(0x15c)],'threadId':_0x5d5c9a[_0x3a15ba(0x1ba)]};}function _0x42760d(_0x5d6f9d,_0x4820b9,_0x2318bd){const _0xa52c9f=_0x2c40ff;var _0x46790d,_0x1a8563;if(((_0x1a8563=(_0x46790d=_0x5d6f9d==null?void 0x0:_0x5d6f9d[_0xa52c9f(0x157)])==null?void 0x0:_0x46790d[_0xa52c9f(0x148)])!=null?_0x1a8563:0x0)>0x0){const _0x55a52d=(_0x39194e,_0x9bdfd4)=>({'id':_0x39194e['replyId'],'threadId':_0x39194e[_0xa52c9f(0x1ba)],'dT':_0x1d79cb(_0x39194e[_0xa52c9f(0x172)]),'personId':_0x39194e[_0xa52c9f(0x15c)],'resolved':_0x5d6f9d[_0xa52c9f(0x1a1)]===_0x2d0b25['Solved'],'unitId':_0x4820b9,'subUnitId':_0x2318bd,'text':JSON['parse'](_0x39194e[_0xa52c9f(0x16e)]),'parentId':_0x9bdfd4}),_0x454b1d=_0x55a52d(_0x5d6f9d[_0xa52c9f(0x157)][0x0]);return{..._0x454b1d,'children':_0x5d6f9d[_0xa52c9f(0x157)][_0xa52c9f(0x19f)](0x1)['map'](_0x4d8640=>_0x55a52d(_0x4d8640,_0x454b1d['id']))};}return null;}let _0x134af2=class{constructor(_0x476642,_0x399627,_0x47547c,_0x1b1232){const _0xbd3dfb=_0x2c40ff;this[_0xbd3dfb(0x19e)]=_0x476642,this['_userService']=_0x399627,this['_sessionService']=_0x47547c,this[_0xbd3dfb(0x146)]=_0x1b1232;}async[_0x2c40ff(0x176)](_0x321fe6){const _0x4753c1=_0x2c40ff;var _0x213470,_0x50f704;const {parentId:_0x5764df,unitId:_0x2e5177,text:_0x3280ff,threadId:_0x45ab41}=_0x321fe6,_0x30b331=(_0x50f704=(_0x213470=_0x3280ff['customRanges'])==null?void 0x0:_0x213470[_0x4753c1(0x18b)](_0x5a92f2=>_0x5a92f2['rangeType']===_0x4e7bbd[_0x4753c1(0x174)][_0x4753c1(0x15e)])[_0x4753c1(0x14e)](_0x19d467=>_0x19d467['rangeId']))!=null?_0x50f704:[],_0x521d49=JSON['stringify'](_0x3280ff),_0x513ffc=(await this[_0x4753c1(0x198)]['requireSession'](_0x2e5177))['getMemberID']();if(_0x5764df){const _0x422bd3={'memberId':_0x513ffc,'unitId':_0x2e5177,'content':_0x521d49,'mention':_0x30b331,'threadId':_0x45ab41},_0x3bffda=(await this[_0x4753c1(0x19e)][_0x4753c1(0x1a4)]('/universer-api/comment/unit/'+_0x2e5177+_0x4753c1(0x16f),{'body':_0x422bd3}))[_0x4753c1(0x155)][_0x4753c1(0x189)];return{..._0x321fe6,'id':_0x3bffda[_0x4753c1(0x143)],'dT':_0x4e7bbd[_0x4753c1(0x173)](+_0x3bffda['createTimestamp'])[_0x4753c1(0x180)](_0x4753c1(0x1c1)),'personId':_0x3bffda[_0x4753c1(0x15c)]};}else{const _0x57c4d8={'memberId':_0x513ffc,'unitId':_0x2e5177,'content':_0x521d49,'mention':_0x30b331},_0x4628a6=await this[_0x4753c1(0x19e)][_0x4753c1(0x1a4)](_0x4753c1(0x1a2)+_0x2e5177+'/add',{'body':_0x57c4d8});return _0x226981(_0x4628a6[_0x4753c1(0x155)][_0x4753c1(0x1b1)],_0x321fe6);}}async['updateComment'](_0x44d69c){const _0x386483=_0x2c40ff;var _0x5c55bc,_0x5ee89f;const {text:_0x382190,unitId:_0x478873}=_0x44d69c,_0x45e5fe=(_0x5ee89f=(_0x5c55bc=_0x382190[_0x386483(0x151)])==null?void 0x0:_0x5c55bc['filter'](_0x44150b=>_0x44150b[_0x386483(0x1aa)]===_0x4e7bbd['CustomRangeType'][_0x386483(0x15e)])[_0x386483(0x14e)](_0x5009d5=>_0x5009d5[_0x386483(0x193)]))!=null?_0x5ee89f:[],_0x2c8b59=JSON['stringify'](_0x382190),_0x386ce3=_0x44d69c['threadId'],_0x5bcdb6=_0x44d69c['id'],_0x535c1b={'memberId':(await this[_0x386483(0x198)][_0x386483(0x186)](_0x478873))[_0x386483(0x1a5)](),'unitId':_0x478873,'threadId':_0x386ce3,'mention':_0x45e5fe,'content':_0x2c8b59,'replyId':_0x5bcdb6},_0x1dbca0=await this['_httpService'][_0x386483(0x1a4)](_0x386483(0x1a2)+_0x478873+'/edit',{'body':_0x535c1b});return!_0x1dbca0['body'][_0x386483(0x158)]||_0x1dbca0['body'][_0x386483(0x158)][_0x386483(0x142)]===0x1;}async[_0x2c40ff(0x191)](_0x4ba145){const _0x502586=_0x2c40ff,{unitId:_0x3a9b88}=_0x4ba145,_0x59e7bb=_0x4ba145[_0x502586(0x1ba)],_0x129250={'memberId':this[_0x502586(0x199)][_0x502586(0x15b)]()[_0x502586(0x1ac)],'unitId':_0x3a9b88,'threadId':_0x59e7bb,'solved':_0x4ba145['resolved']?_0x2d0b25[_0x502586(0x175)]:_0x2d0b25[_0x502586(0x1c3)]},_0x9ad54d=await this['_httpService'][_0x502586(0x1a4)]('/universer-api/comment/unit/'+_0x3a9b88+'/solved',{'body':_0x129250});return!_0x9ad54d[_0x502586(0x155)][_0x502586(0x158)]||_0x9ad54d['body']['error'][_0x502586(0x142)]===0x1;}async[_0x2c40ff(0x14d)](_0x504446,_0x1f5599,_0x49871a,_0x4351b3){const _0x2bc695=_0x2c40ff,_0x46fdb8={'memberId':(await this[_0x2bc695(0x198)]['requireSession'](_0x504446))['getMemberID'](),'threadId':_0x49871a,'replyId':_0x4351b3,'unitId':_0x504446},_0x53ba49=await this[_0x2bc695(0x19e)]['post']('/universer-api/comment/unit/'+_0x504446+_0x2bc695(0x187),{'body':_0x46fdb8});return!_0x53ba49[_0x2bc695(0x155)]['error']||_0x53ba49[_0x2bc695(0x155)][_0x2bc695(0x158)]['code']===0x1;}async['listComments'](_0x1a255a,_0x4a4d3d,_0xefdc26){const _0x2aa0c4=_0x2c40ff,_0x1ff45d={'unitId':_0x1a255a,'threadId':_0xefdc26},_0x507301=await this[_0x2aa0c4(0x19e)][_0x2aa0c4(0x1a4)]('/universer-api/comment/unit/'+_0x1a255a+_0x2aa0c4(0x1ae),{'body':_0x1ff45d}),_0x34e877=_0xefdc26[_0x2aa0c4(0x14e)](_0x20c7e5=>_0x42760d(_0x507301['body']['comments'][_0x20c7e5],_0x1a255a,_0x4a4d3d))['filter'](Boolean);return Object[_0x2aa0c4(0x17f)](_0x507301['body'][_0x2aa0c4(0x15f)])[_0x2aa0c4(0x195)](_0x8846b1=>{const _0x12c432=_0x2aa0c4;this[_0x12c432(0x199)][_0x12c432(0x1a7)](_0x8846b1);}),_0x34e877;}['saveCommentToSnapshot'](_0x3d43c0){const _0x33cf9e=_0x2c40ff;return{'id':_0x3d43c0['id'],'threadId':_0x3d43c0['threadId'],'ref':_0x3d43c0[_0x33cf9e(0x14c)]};}};_0x134af2=_0x2878e7([_0x4b8028(0x0,_0x4e7bbd['Inject'](_0x47aaad[_0x2c40ff(0x185)])),_0x4b8028(0x1,_0x4e7bbd[_0x2c40ff(0x153)](_0x4e7bbd[_0x2c40ff(0x166)])),_0x4b8028(0x2,_0x4e7bbd[_0x2c40ff(0x153)](_0x2a835d[_0x2c40ff(0x177)])),_0x4b8028(0x3,_0x4e7bbd[_0x2c40ff(0x153)](_0x4e7bbd[_0x2c40ff(0x159)]))],_0x134af2);var _0x4a8789=Object[_0x2c40ff(0x190)],_0x1ab829=(_0x3fde54,_0x3a1a96,_0x564929,_0x2a56e1)=>{const _0x1e727f=_0x2c40ff;for(var _0x471a62=_0x2a56e1>0x1?void 0x0:_0x2a56e1?_0x4a8789(_0x3a1a96,_0x564929):_0x3a1a96,_0xc6f5bc=_0x3fde54[_0x1e727f(0x148)]-0x1,_0x5387d3;_0xc6f5bc>=0x0;_0xc6f5bc--)(_0x5387d3=_0x3fde54[_0xc6f5bc])&&(_0x471a62=_0x5387d3(_0x471a62)||_0x471a62);return _0x471a62;},_0x4c2184=(_0x183e0b,_0x772958)=>(_0x5029b5,_0x3bfe64)=>_0x772958(_0x5029b5,_0x3bfe64,_0x183e0b);let _0x20909c=class extends _0x4e7bbd[_0x2c40ff(0x1ab)]{constructor(_0x3154a6,_0x318d99){const _0x47880c=_0x2c40ff;super(),this['_threadCommentDataSourceService']=_0x3154a6,this[_0x47880c(0x17d)]=_0x318d99,this[_0x47880c(0x152)]();}['_initDataSource'](){const _0x4b9665=_0x2c40ff;this[_0x4b9665(0x19c)][_0x4b9665(0x1bb)]=this[_0x4b9665(0x17d)],this[_0x4b9665(0x19c)]['syncUpdateMutationToColla']=!0x1;}};_0x20909c=_0x1ab829([_0x4c2184(0x0,_0x525930[_0x2c40ff(0x1b2)]),_0x4c2184(0x1,_0x4e7bbd[_0x2c40ff(0x153)](_0x134af2))],_0x20909c);var _0x31db4b=Object['defineProperty'],_0x8fc42d=Object[_0x2c40ff(0x190)],_0x1d3871=(_0x52bf33,_0x506fb6,_0x2ae994)=>_0x506fb6 in _0x52bf33?_0x31db4b(_0x52bf33,_0x506fb6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2ae994}):_0x52bf33[_0x506fb6]=_0x2ae994,_0x156c7d=(_0x2f2fe1,_0x3d1337,_0x154ce9,_0x2971af)=>{const _0x1e6ad8=_0x2c40ff;for(var _0x42f317=_0x2971af>0x1?void 0x0:_0x2971af?_0x8fc42d(_0x3d1337,_0x154ce9):_0x3d1337,_0x3344df=_0x2f2fe1[_0x1e6ad8(0x148)]-0x1,_0x5cf27d;_0x3344df>=0x0;_0x3344df--)(_0x5cf27d=_0x2f2fe1[_0x3344df])&&(_0x42f317=_0x5cf27d(_0x42f317)||_0x42f317);return _0x42f317;},_0x303c46=(_0x18d5a2,_0x463f0a)=>(_0x123746,_0x279987)=>_0x463f0a(_0x123746,_0x279987,_0x18d5a2),_0x37ff39=(_0x4db279,_0x36ed02,_0x11ded6)=>_0x1d3871(_0x4db279,typeof _0x36ed02!=_0x2c40ff(0x16b)?_0x36ed02+'':_0x36ed02,_0x11ded6);_0x35a643['UniverThreadCommentDataSourcePlugin']=class extends _0x4e7bbd[_0x2c40ff(0x14f)]{constructor(_0x1b30d0=_0xd17df2,_0x528b6d,_0x341b81){const _0x16778e=_0x2c40ff;super(),this[_0x16778e(0x170)]=_0x1b30d0,this[_0x16778e(0x146)]=_0x528b6d,this[_0x16778e(0x1c4)]=_0x341b81;const {..._0x443106}=_0x4e7bbd[_0x16778e(0x171)]({},_0xd17df2,this[_0x16778e(0x170)]);this[_0x16778e(0x1c4)]['setConfig'](_0xf1719f,_0x443106);}[_0x2c40ff(0x1c0)](){const _0x2cc045=_0x2c40ff;[[_0x134af2],[_0x20909c],[_0x31fca3]][_0x2cc045(0x195)](_0x4635ea=>{const _0x1c1c06=_0x2cc045;this[_0x1c1c06(0x146)][_0x1c1c06(0x1be)](_0x4635ea);});}['onReady'](){const _0x5c0162=_0x2c40ff;this[_0x5c0162(0x146)]['get'](_0x20909c),this[_0x5c0162(0x146)]['get'](_0x31fca3);}},_0x37ff39(_0x35a643[_0x2c40ff(0x1b9)],_0x2c40ff(0x179),_0x42713b),_0x37ff39(_0x35a643[_0x2c40ff(0x1b9)],_0x2c40ff(0x161),_0x4e7bbd[_0x2c40ff(0x163)]['UNIVER_UNKNOWN']),_0x35a643[_0x2c40ff(0x1b9)]=_0x156c7d([_0x4e7bbd[_0x2c40ff(0x1a8)](_0x2ae55d[_0x2c40ff(0x17c)],_0x2a835d[_0x2c40ff(0x144)],_0x5db0b9[_0x2c40ff(0x154)]),_0x303c46(0x1,_0x4e7bbd['Inject'](_0x4e7bbd[_0x2c40ff(0x159)])),_0x303c46(0x2,_0x4e7bbd[_0x2c40ff(0x192)])],_0x35a643[_0x2c40ff(0x1b9)]),Object[_0x2c40ff(0x162)](_0x35a643,Symbol[_0x2c40ff(0x1bd)],{'value':_0x2c40ff(0x18e)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.9",
3
+ "version": "0.6.10-experimental.20250410-f79ffef",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.9",
49
- "@univerjs-pro/license": "0.6.9",
50
- "@univerjs/core": "0.6.9",
51
- "@univerjs/network": "0.6.9",
52
- "@univerjs/thread-comment": "0.6.9",
53
- "@univerjs/protocol": "0.1.45",
54
- "@univerjs/thread-comment-ui": "0.6.9"
48
+ "@univerjs-pro/collaboration-client": "0.6.10-experimental.20250410-f79ffef",
49
+ "@univerjs-pro/license": "0.6.10-experimental.20250410-f79ffef",
50
+ "@univerjs/protocol": "0.1.46-alpha.3",
51
+ "@univerjs/network": "0.6.10-experimental.20250410-f79ffef",
52
+ "@univerjs/thread-comment": "0.6.10-experimental.20250410-f79ffef",
53
+ "@univerjs/thread-comment-ui": "0.6.10-experimental.20250410-f79ffef",
54
+ "@univerjs/core": "0.6.10-experimental.20250410-f79ffef"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
- "typescript": "^5.8.2",
59
- "vite": "^6.2.2",
60
- "vitest": "^3.0.9",
61
- "@univerjs-infra/shared": "0.6.9"
58
+ "typescript": "^5.8.3",
59
+ "vite": "^6.2.6",
60
+ "vitest": "^3.1.1",
61
+ "@univerjs-infra/shared": "0.6.10-alpha.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",