@univerjs-pro/thread-comment-datasource 0.12.4-insiders.20251213-692494c → 0.13.0

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 _0x39cd9e=_0x38c6;(function(_0x52ef9f,_0x13bb64){const _0x3e7288=_0x38c6,_0x17cb15=_0x52ef9f();while(!![]){try{const _0x4afee9=-parseInt(_0x3e7288(0x1cf))/0x1*(-parseInt(_0x3e7288(0x1f9))/0x2)+parseInt(_0x3e7288(0x1ba))/0x3*(parseInt(_0x3e7288(0x1d9))/0x4)+parseInt(_0x3e7288(0x1c0))/0x5*(parseInt(_0x3e7288(0x1b6))/0x6)+parseInt(_0x3e7288(0x206))/0x7+parseInt(_0x3e7288(0x1a9))/0x8+-parseInt(_0x3e7288(0x1be))/0x9*(parseInt(_0x3e7288(0x1d4))/0xa)+-parseInt(_0x3e7288(0x205))/0xb;if(_0x4afee9===_0x13bb64)break;else _0x17cb15['push'](_0x17cb15['shift']());}catch(_0x3477e2){_0x17cb15['push'](_0x17cb15['shift']());}}}(_0x15fe,0xb258b));Object[_0x39cd9e(0x1fb)](exports,Symbol[_0x39cd9e(0x1af)],{'value':_0x39cd9e(0x20a)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x39cd9e(0x1f8);var I=(_0x59d66b=>(_0x59d66b[_0x59d66b[_0x39cd9e(0x1bd)]=0x0]=_0x39cd9e(0x1bd),_0x59d66b[_0x59d66b['Solved']=0x1]=_0x39cd9e(0x1b9),_0x59d66b[_0x59d66b['UNRECOGNIZED']=-0x1]=_0x39cd9e(0x20c),_0x59d66b))(I||{}),v=(_0x29ce6f=>(_0x29ce6f[_0x29ce6f['Unknown']=0x0]=_0x39cd9e(0x1ac),_0x29ce6f[_0x29ce6f[_0x39cd9e(0x1b1)]=0x1]=_0x39cd9e(0x1b1),_0x29ce6f[_0x29ce6f['Reply']=0x2]='Reply',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x213)]=0x3]='Edit',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x1ee)]=0x4]=_0x39cd9e(0x1ee),_0x29ce6f[_0x29ce6f['Solve']=0x5]='Solve',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x20c)]=-0x1]=_0x39cd9e(0x20c),_0x29ce6f))(v||{});const f=_0x335a82=>c[_0x39cd9e(0x1ce)](new Date(+_0x335a82))[_0x39cd9e(0x1f0)](_0x39cd9e(0x1c4)),R=async(_0x2ad364,_0x59fd93)=>{const _0x5446c1=_0x39cd9e,_0x519026=_0x2ad364[_0x5446c1(0x21f)](c[_0x5446c1(0x1ca)]),_0xfa0908=_0x2ad364[_0x5446c1(0x21f)](P['HTTPService']);_0x59fd93[_0x5446c1(0x21b)](_0x249f31=>{const _0x5a3723=_0x5446c1;_0x519026[_0x5a3723(0x1c8)](_0x249f31)&&_0x59fd93['delete'](_0x249f31);}),_0x59fd93[_0x5446c1(0x1bb)]&&(await _0xfa0908[_0x5446c1(0x21f)](_0x5446c1(0x1f1),{'params':{'userIDs':[..._0x59fd93]}}))[_0x5446c1(0x1a7)][_0x5446c1(0x208)][_0x5446c1(0x21b)](_0x14c117=>{const _0x46ef22=_0x5446c1;_0x14c117&&_0x519026[_0x46ef22(0x1c7)](_0x14c117);});};var $=Object[_0x39cd9e(0x20e)],E=(_0x55efa9,_0x4a4c41,_0x3c96a7,_0x140e3c)=>{const _0x52b430=_0x39cd9e;for(var _0x18d823=_0x140e3c>0x1?void 0x0:_0x140e3c?$(_0x4a4c41,_0x3c96a7):_0x4a4c41,_0x369789=_0x55efa9[_0x52b430(0x20b)]-0x1,_0x3ea411;_0x369789>=0x0;_0x369789--)(_0x3ea411=_0x55efa9[_0x369789])&&(_0x18d823=_0x3ea411(_0x18d823)||_0x18d823);return _0x18d823;},S=(_0x59ec5f,_0x13d378)=>(_0x6c8f45,_0x156d51)=>_0x13d378(_0x6c8f45,_0x156d51,_0x59ec5f);function _0x15fe(){const _0x55fc3d=['Reply','rangeId','Solved','249bpBMwi','size','UniverInstanceType','OpenOrReOpen','9mpCPEZ','threadId','2012295AaQOXl','_httpService','setConfig','comment','YYYY/MM/DD\x20HH:mm','type','personId','addUser','getUser','rangeType','UserManagerService','payload','replyId','userID','dayjs','430937zpSXBk','_commentService','map','addComment','unitId','11820310oPKDHC','getUnit','CustomRangeType','parse','dataSource','46388JCUfMB','content','onReady','_injector','UniverThreadCommentDataSourcePlugin','/reply','reply','_initDataSource','HTTPService','stringify','solved','_config','_sessionService','/add','customRanges','disposeWithMe','COMMENT','commentUpdate$','slice','_threadCommentModel','UniverCollaborationClientPlugin','Delete','find','format','/universer-api/user/list','/delete','error','deleteComment','resolved','resolveComment','Disposable','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2zHyYMB','/universer-api/comment/unit/','defineProperty','add','CommentService','pipe','comments','replies','userId','IConfigService','post','Inject','24135452tCqUtX','7303142zEebVN','bufferTime','users','ThreadCommentModel','Module','length','UNRECOGNIZED','IThreadCommentDataSourceService','getOwnPropertyDescriptor','DependentOn','syncUpdateMutationToColla','ref','_userService','Edit','getCurrentUser','requireSession','_init','root','/list','/edit','UniverLicensePlugin','forEach','getMemberID','code','pluginName','get','createTimestamp','Injector','updateComment','_threadCommentDataSource','user','body','onStarting','10139336DlFlpy','subscribe','_threadCommentDataSourceService','Unknown','filter','merge','toStringTag','CollaborationSessionService','Add','Solve','Plugin','_configService','getComment','6xjHuOO'];_0x15fe=function(){return _0x55fc3d;};return _0x15fe();}function _0x38c6(_0xf01d7b,_0x214f47){_0xf01d7b=_0xf01d7b-0x1a4;const _0x15fe84=_0x15fe();let _0x38c69f=_0x15fe84[_0xf01d7b];return _0x38c69f;}let _=class extends c[_0x39cd9e(0x1f7)]{constructor(_0x2da5db,_0x21a9ed,_0x56f7c6,_0x11f535){const _0x571320=_0x39cd9e;super(),this[_0x571320(0x1d0)]=_0x2da5db,this['_threadCommentModel']=_0x21a9ed,this[_0x571320(0x212)]=_0x56f7c6,this['_injector']=_0x11f535,this[_0x571320(0x216)](),this['_initUserSync']();}['_initUserSync'](){const _0x5c112e=_0x39cd9e;this[_0x5c112e(0x1e8)](this[_0x5c112e(0x1ec)][_0x5c112e(0x1ea)][_0x5c112e(0x1fe)](j[_0x5c112e(0x207)](0x10))[_0x5c112e(0x1aa)](_0x5df37b=>{const _0x2bd787=_0x5c112e,_0x3e94ca=new Set();_0x5df37b[_0x2bd787(0x21b)](_0x17d075=>{const _0x1a7ddb=_0x2bd787;switch(_0x17d075[_0x1a7ddb(0x1c5)]){case _0x1a7ddb(0x1fc):{const _0x23e0e1=_0x17d075[_0x1a7ddb(0x1cb)][_0x1a7ddb(0x1c6)];_0x3e94ca[_0x1a7ddb(0x1fc)](_0x23e0e1);break;}}}),R(this[_0x2bd787(0x1dc)],_0x3e94ca);}));}[_0x39cd9e(0x216)](){const _0x5a95ab=_0x39cd9e;this[_0x5a95ab(0x1e8)](this[_0x5a95ab(0x1d0)][_0x5a95ab(0x1ea)][_0x5a95ab(0x1aa)](async _0xac9c68=>{const _0x2cce43=_0x5a95ab;var _0x397191,_0xc2c8f0,_0x5e34e6,_0x482301;const _0x381474=(_0x397191=this['_threadCommentModel'][_0x2cce43(0x1d5)](_0xac9c68[_0x2cce43(0x1d3)])['find'](_0x5ae257=>_0x5ae257[_0x2cce43(0x1bf)]===_0xac9c68['threadId']))==null?void 0x0:_0x397191['root'];if(!_0x381474)return;const {unitId:_0x49a13d,subUnitId:_0x516f78}=_0x381474;switch(_0xac9c68['user']&&this[_0x2cce43(0x212)][_0x2cce43(0x1c7)](_0xac9c68[_0x2cce43(0x1a6)]),_0xac9c68[_0x2cce43(0x1c5)]){case v['Add']:break;case v[_0x2cce43(0x1b7)]:{this[_0x2cce43(0x1ec)]['addComment'](_0x49a13d,_0x516f78,{'unitId':_0x49a13d,'subUnitId':_0x516f78,'ref':'','id':_0xac9c68[_0x2cce43(0x1cc)],'dT':f(+_0xac9c68[_0x2cce43(0x220)]),'threadId':_0xac9c68[_0x2cce43(0x1bf)],'personId':(_0x5e34e6=(_0xc2c8f0=_0xac9c68['user'])==null?void 0x0:_0xc2c8f0['userID'])!=null?_0x5e34e6:_0xac9c68[_0x2cce43(0x201)],'text':JSON[_0x2cce43(0x1d7)](_0xac9c68[_0x2cce43(0x1da)]),'parentId':_0x381474['id']});break;}case v[_0x2cce43(0x1ee)]:{const _0x10bc16=this[_0x2cce43(0x1ec)][_0x2cce43(0x1b5)](_0x49a13d,_0x516f78,_0xac9c68[_0x2cce43(0x1cc)]);_0x10bc16&&_0x10bc16['parentId']&&this[_0x2cce43(0x1ec)][_0x2cce43(0x1f4)](_0x49a13d,_0x516f78,_0xac9c68[_0x2cce43(0x1cc)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x2cce43(0x1a4)](_0x49a13d,_0x516f78,{'commentId':_0xac9c68[_0x2cce43(0x1cc)],'text':JSON[_0x2cce43(0x1d7)](_0xac9c68[_0x2cce43(0x1da)])});break;}case v[_0x2cce43(0x1b2)]:{const _0x3ed754=(_0x482301=this['_threadCommentModel']['getUnit'](_0xac9c68[_0x2cce43(0x1d3)])[_0x2cce43(0x1ef)](_0x4f38e5=>_0x4f38e5[_0x2cce43(0x1bf)]===_0xac9c68['threadId']))==null?void 0x0:_0x482301[_0x2cce43(0x217)];_0x3ed754&&this['_threadCommentModel'][_0x2cce43(0x1f6)](_0x49a13d,_0x516f78,_0x3ed754['id'],_0xac9c68[_0x2cce43(0x1e3)]===I[_0x2cce43(0x1b9)]);break;}}}));}};_=E([S(0x0,c[_0x39cd9e(0x204)](b[_0x39cd9e(0x1fd)])),S(0x1,c[_0x39cd9e(0x204)](M[_0x39cd9e(0x209)])),S(0x2,c[_0x39cd9e(0x204)](c[_0x39cd9e(0x1ca)])),S(0x3,c['Inject'](c[_0x39cd9e(0x221)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x39cd9e(0x20e)],x=(_0x375ea7,_0x8ffa94,_0xc4ccfc,_0x1df547)=>{for(var _0x3fd3ac=_0x1df547>0x1?void 0x0:_0x1df547?A(_0x8ffa94,_0xc4ccfc):_0x8ffa94,_0x15b061=_0x375ea7['length']-0x1,_0x3f151d;_0x15b061>=0x0;_0x15b061--)(_0x3f151d=_0x375ea7[_0x15b061])&&(_0x3fd3ac=_0x3f151d(_0x3fd3ac)||_0x3fd3ac);return _0x3fd3ac;},C=(_0x29e769,_0x33046a)=>(_0x4aa702,_0x1d5cd5)=>_0x33046a(_0x4aa702,_0x1d5cd5,_0x29e769);function Y(_0x127912,_0x235d92){const _0x2f9503=_0x39cd9e,_0x254c3c=_0x127912[_0x2f9503(0x200)][0x0];return{..._0x235d92,'id':_0x254c3c['replyId'],'resolved':_0x127912['solved']===0x1,'dT':f(_0x254c3c['createTimestamp']),'personId':_0x254c3c[_0x2f9503(0x201)],'threadId':_0x254c3c[_0x2f9503(0x1bf)]};}function G(_0x50de8f,_0x4c0c8c,_0x58e622){const _0x282034=_0x39cd9e;var _0x254d2e,_0x3cb45b;if(((_0x3cb45b=(_0x254d2e=_0x50de8f==null?void 0x0:_0x50de8f['replies'])==null?void 0x0:_0x254d2e[_0x282034(0x20b)])!=null?_0x3cb45b:0x0)>0x0){const _0x42299d=(_0x9741de,_0x4c6aa0)=>({'id':_0x9741de[_0x282034(0x1cc)],'threadId':_0x9741de[_0x282034(0x1bf)],'dT':f(_0x9741de[_0x282034(0x220)]),'personId':_0x9741de[_0x282034(0x201)],'resolved':_0x50de8f[_0x282034(0x1e3)]===I[_0x282034(0x1b9)],'unitId':_0x4c0c8c,'subUnitId':_0x58e622,'text':JSON[_0x282034(0x1d7)](_0x9741de['content']),'parentId':_0x4c6aa0}),_0x3f9946=_0x42299d(_0x50de8f[_0x282034(0x200)][0x0]);return{..._0x3f9946,'children':_0x50de8f['replies'][_0x282034(0x1eb)](0x1)[_0x282034(0x1d1)](_0x37bd25=>_0x42299d(_0x37bd25,_0x3f9946['id']))};}return null;}let p=class{constructor(_0x32b253,_0x105f27,_0xb282d3){const _0x4fb193=_0x39cd9e;this['_httpService']=_0x32b253,this[_0x4fb193(0x212)]=_0x105f27,this[_0x4fb193(0x1e5)]=_0xb282d3;}async[_0x39cd9e(0x1d2)](_0x27e7c3){const _0x214823=_0x39cd9e;var _0x266017,_0x213b88;const {parentId:_0x4b4bcb,unitId:_0x20c0ea,text:_0x23dfb8,threadId:_0x53ce3d}=_0x27e7c3,_0x5e65b0=(_0x213b88=(_0x266017=_0x23dfb8[_0x214823(0x1e7)])==null?void 0x0:_0x266017[_0x214823(0x1ad)](_0x54803e=>_0x54803e['rangeType']===c[_0x214823(0x1d6)][_0x214823(0x1e9)])[_0x214823(0x1d1)](_0x16195c=>_0x16195c[_0x214823(0x1b8)]))!=null?_0x213b88:[],_0x4249d1=JSON[_0x214823(0x1e2)](_0x23dfb8),_0x295c8c=(await this[_0x214823(0x1e5)]['requireSession'](_0x20c0ea))['getMemberID']();if(_0x4b4bcb){const _0x3cc9dd={'memberId':_0x295c8c,'unitId':_0x20c0ea,'content':_0x4249d1,'mention':_0x5e65b0,'threadId':_0x53ce3d},_0x45d314=(await this[_0x214823(0x1c1)][_0x214823(0x203)](_0x214823(0x1fa)+_0x20c0ea+_0x214823(0x1de),{'body':_0x3cc9dd}))[_0x214823(0x1a7)][_0x214823(0x1df)];return{..._0x27e7c3,'id':_0x45d314['replyId'],'dT':c['dayjs'](+_0x45d314[_0x214823(0x220)])[_0x214823(0x1f0)](_0x214823(0x1c4)),'personId':_0x45d314[_0x214823(0x201)]};}else{const _0x5cc501={'memberId':_0x295c8c,'unitId':_0x20c0ea,'content':_0x4249d1,'mention':_0x5e65b0},_0x41a5bd=await this[_0x214823(0x1c1)][_0x214823(0x203)](_0x214823(0x1fa)+_0x20c0ea+_0x214823(0x1e6),{'body':_0x5cc501});return Y(_0x41a5bd[_0x214823(0x1a7)][_0x214823(0x1c3)],_0x27e7c3);}}async[_0x39cd9e(0x1a4)](_0x5894b3){const _0xb64223=_0x39cd9e;var _0x2fa005,_0x1f0e42;const {text:_0x2faa29,unitId:_0x31585a}=_0x5894b3,_0x28ece3=(_0x1f0e42=(_0x2fa005=_0x2faa29[_0xb64223(0x1e7)])==null?void 0x0:_0x2fa005[_0xb64223(0x1ad)](_0x66e9d3=>_0x66e9d3[_0xb64223(0x1c9)]===c[_0xb64223(0x1d6)][_0xb64223(0x1e9)])[_0xb64223(0x1d1)](_0x205240=>_0x205240[_0xb64223(0x1b8)]))!=null?_0x1f0e42:[],_0x5dd23a=JSON[_0xb64223(0x1e2)](_0x2faa29),_0x22ef47=_0x5894b3[_0xb64223(0x1bf)],_0x5c8c7f=_0x5894b3['id'],_0x2fb54b={'memberId':(await this[_0xb64223(0x1e5)][_0xb64223(0x215)](_0x31585a))['getMemberID'](),'unitId':_0x31585a,'threadId':_0x22ef47,'mention':_0x28ece3,'content':_0x5dd23a,'replyId':_0x5c8c7f},_0x46105c=await this[_0xb64223(0x1c1)][_0xb64223(0x203)](_0xb64223(0x1fa)+_0x31585a+_0xb64223(0x219),{'body':_0x2fb54b});return!_0x46105c[_0xb64223(0x1a7)]['error']||_0x46105c[_0xb64223(0x1a7)]['error'][_0xb64223(0x21d)]===0x1;}async[_0x39cd9e(0x1f6)](_0x543e6f){const _0x315d61=_0x39cd9e,{unitId:_0x5c4233}=_0x543e6f,_0x44d0b4=_0x543e6f[_0x315d61(0x1bf)],_0x3aad58={'memberId':this[_0x315d61(0x212)][_0x315d61(0x214)]()[_0x315d61(0x1cd)],'unitId':_0x5c4233,'threadId':_0x44d0b4,'solved':_0x543e6f[_0x315d61(0x1f5)]?I[_0x315d61(0x1b9)]:I[_0x315d61(0x1bd)]},_0xe01942=await this[_0x315d61(0x1c1)][_0x315d61(0x203)](_0x315d61(0x1fa)+_0x5c4233+'/solved',{'body':_0x3aad58});return!_0xe01942[_0x315d61(0x1a7)][_0x315d61(0x1f3)]||_0xe01942['body']['error'][_0x315d61(0x21d)]===0x1;}async[_0x39cd9e(0x1f4)](_0x5706db,_0x3fff49,_0x1e0ab0,_0x416d69){const _0x20d756=_0x39cd9e,_0x3f07e1={'memberId':(await this[_0x20d756(0x1e5)][_0x20d756(0x215)](_0x5706db))[_0x20d756(0x21c)](),'threadId':_0x1e0ab0,'replyId':_0x416d69,'unitId':_0x5706db},_0x1e850b=await this['_httpService'][_0x20d756(0x203)]('/universer-api/comment/unit/'+_0x5706db+_0x20d756(0x1f2),{'body':_0x3f07e1});return!_0x1e850b[_0x20d756(0x1a7)]['error']||_0x1e850b[_0x20d756(0x1a7)][_0x20d756(0x1f3)][_0x20d756(0x21d)]===0x1;}async['listComments'](_0x1e23ac,_0x1df984,_0x68596e){const _0x5f1175=_0x39cd9e,_0x3d62ff={'unitId':_0x1e23ac,'threadId':_0x68596e},_0xf1439a=await this[_0x5f1175(0x1c1)][_0x5f1175(0x203)]('/universer-api/comment/unit/'+_0x1e23ac+_0x5f1175(0x218),{'body':_0x3d62ff}),_0x525acb=_0x68596e[_0x5f1175(0x1d1)](_0x2de6da=>G(_0xf1439a[_0x5f1175(0x1a7)][_0x5f1175(0x1ff)][_0x2de6da],_0x1e23ac,_0x1df984))[_0x5f1175(0x1ad)](Boolean);return Object['values'](_0xf1439a['body'][_0x5f1175(0x208)])[_0x5f1175(0x21b)](_0x44cc48=>{const _0x172627=_0x5f1175;this[_0x172627(0x212)][_0x172627(0x1c7)](_0x44cc48);}),_0x525acb;}['saveCommentToSnapshot'](_0x1b0559){const _0xfe797e=_0x39cd9e;return{'id':_0x1b0559['id'],'threadId':_0x1b0559['threadId'],'ref':_0x1b0559[_0xfe797e(0x211)]};}};p=x([C(0x0,c[_0x39cd9e(0x204)](P[_0x39cd9e(0x1e1)])),C(0x1,c[_0x39cd9e(0x204)](c[_0x39cd9e(0x1ca)])),C(0x2,c[_0x39cd9e(0x204)](b[_0x39cd9e(0x1b0)]))],p);var H=Object[_0x39cd9e(0x20e)],J=(_0x193889,_0x2279e4,_0x1ab2f3,_0x51fe45)=>{const _0x254668=_0x39cd9e;for(var _0x4c7c9f=_0x51fe45>0x1?void 0x0:_0x51fe45?H(_0x2279e4,_0x1ab2f3):_0x2279e4,_0x12d0df=_0x193889[_0x254668(0x20b)]-0x1,_0x212f0d;_0x12d0df>=0x0;_0x12d0df--)(_0x212f0d=_0x193889[_0x12d0df])&&(_0x4c7c9f=_0x212f0d(_0x4c7c9f)||_0x4c7c9f);return _0x4c7c9f;},y=(_0x4b7578,_0x563989)=>(_0x3c2530,_0x2a8fa)=>_0x563989(_0x3c2530,_0x2a8fa,_0x4b7578);let g=class extends c[_0x39cd9e(0x1f7)]{constructor(_0x45dd60,_0x90bb8f){const _0xff20d7=_0x39cd9e;super(),this['_threadCommentDataSourceService']=_0x45dd60,this[_0xff20d7(0x1a5)]=_0x90bb8f,this['_initDataSource']();}[_0x39cd9e(0x1e0)](){const _0x28ec03=_0x39cd9e;this['_threadCommentDataSourceService'][_0x28ec03(0x1d8)]=this[_0x28ec03(0x1a5)],this[_0x28ec03(0x1ab)][_0x28ec03(0x210)]=!0x1;}};g=J([y(0x0,M[_0x39cd9e(0x20d)]),y(0x1,c[_0x39cd9e(0x204)](p))],g);var F=Object['defineProperty'],L=Object[_0x39cd9e(0x20e)],Z=(_0x392561,_0x405ef9,_0x3ebddf)=>_0x405ef9 in _0x392561?F(_0x392561,_0x405ef9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3ebddf}):_0x392561[_0x405ef9]=_0x3ebddf,W=(_0x34959f,_0x26d0c0,_0x26c090,_0x935f06)=>{const _0x2f4759=_0x39cd9e;for(var _0x25cbb5=_0x935f06>0x1?void 0x0:_0x935f06?L(_0x26d0c0,_0x26c090):_0x26d0c0,_0x295489=_0x34959f[_0x2f4759(0x20b)]-0x1,_0x1d6f1a;_0x295489>=0x0;_0x295489--)(_0x1d6f1a=_0x34959f[_0x295489])&&(_0x25cbb5=_0x1d6f1a(_0x25cbb5)||_0x25cbb5);return _0x25cbb5;},O=(_0x8d4afb,_0x26c5a7)=>(_0x478488,_0x25ac6a)=>_0x26c5a7(_0x478488,_0x25ac6a,_0x8d4afb),N=(_0x5f34f9,_0x1de444,_0x52e4d8)=>Z(_0x5f34f9,typeof _0x1de444!='symbol'?_0x1de444+'':_0x1de444,_0x52e4d8);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x39cd9e(0x1b3)]{constructor(_0x4016de=D,_0x1a246a,_0x1029b6){const _0x130b86=_0x39cd9e;super(),this[_0x130b86(0x1e4)]=_0x4016de,this['_injector']=_0x1a246a,this['_configService']=_0x1029b6;const {..._0x2495d8}=c[_0x130b86(0x1ae)]({},D,this[_0x130b86(0x1e4)]);this[_0x130b86(0x1b4)][_0x130b86(0x1c2)](q,_0x2495d8);}[_0x39cd9e(0x1a8)](){const _0x50a008=_0x39cd9e;[[p],[g],[_]][_0x50a008(0x21b)](_0x1083e8=>{const _0x522b5c=_0x50a008;this[_0x522b5c(0x1dc)][_0x522b5c(0x1fc)](_0x1083e8);});}[_0x39cd9e(0x1db)](){const _0x2eb2a9=_0x39cd9e;this[_0x2eb2a9(0x1dc)][_0x2eb2a9(0x21f)](g),this[_0x2eb2a9(0x1dc)][_0x2eb2a9(0x21f)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x39cd9e(0x21e),U),N(exports[_0x39cd9e(0x1dd)],'type',c[_0x39cd9e(0x1bc)]['UNIVER_UNKNOWN']),exports[_0x39cd9e(0x1dd)]=W([c[_0x39cd9e(0x20f)](w['UniverThreadCommentUIPlugin'],b[_0x39cd9e(0x1ed)],T[_0x39cd9e(0x21a)]),O(0x1,c['Inject'](c[_0x39cd9e(0x221)])),O(0x2,c[_0x39cd9e(0x202)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x7bec1e=_0x272e;(function(_0x21dc3e,_0x5acea1){const _0x3a6ae=_0x272e,_0x176ee1=_0x21dc3e();while(!![]){try{const _0x22bdd6=-parseInt(_0x3a6ae(0xb2))/0x1*(parseInt(_0x3a6ae(0xec))/0x2)+parseInt(_0x3a6ae(0xaa))/0x3+parseInt(_0x3a6ae(0xc8))/0x4+-parseInt(_0x3a6ae(0xe8))/0x5*(parseInt(_0x3a6ae(0xbe))/0x6)+-parseInt(_0x3a6ae(0xdd))/0x7+parseInt(_0x3a6ae(0xf3))/0x8+parseInt(_0x3a6ae(0xfd))/0x9*(parseInt(_0x3a6ae(0xd7))/0xa);if(_0x22bdd6===_0x5acea1)break;else _0x176ee1['push'](_0x176ee1['shift']());}catch(_0x43f514){_0x176ee1['push'](_0x176ee1['shift']());}}}(_0x6aee,0x47b47));function _0x6aee(){const _0x18a716=['root','customRanges','_configService','102594ChmHos','body','getMemberID','HTTPService','/edit','_initDataSource','Unknown','length','onStarting','format','79992mEHWUA','commentUpdate$','Injector','subscribe','YYYY/MM/DD\x20HH:mm','createTimestamp','_injector','_userService','content','stringify','filter','deleteComment','_initUserSync','addComment','CustomRangeType','620HMWqOf','Solved','Reply','map','UserManagerService','personId','1489509xfeAHH','_init','dataSource','COMMENT','find','getCurrentUser','UniverLicensePlugin','Add','thread-comment-data-source.config','rangeId','IConfigService','20uHeaez','_threadCommentDataSource','replies','OpenOrReOpen','14542NxphhR','comment','resolveComment','UNRECOGNIZED','add','parse','_httpService','1426088DLGGWC','ThreadCommentModel','_threadCommentDataSourceService','getUser','CommentService','code','replyId','solved','userID','threadId','85518HyATbU','Edit','Inject','onReady','CollaborationSessionService','saveCommentToSnapshot','unitId','/add','_threadCommentModel','/universer-api/comment/unit/','setConfig','_config','/delete','size','updateComment','dayjs','defineProperty','UniverCollaborationClientPlugin','forEach','listComments','merge','bufferTime','Module','Solve','type','get','_commentService','_sessionService','values','error','Disposable','slice','disposeWithMe','453159BrmFbe','symbol','Delete','addUser','users','rangeType','user','syncUpdateMutationToColla','50drWlpm','post','IThreadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','getOwnPropertyDescriptor','requireSession','DependentOn','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x6aee=function(){return _0x18a716;};return _0x6aee();}Object[_0x7bec1e(0x99)](exports,Symbol['toStringTag'],{'value':_0x7bec1e(0x9f)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x7bec1e(0xba);var I=(_0x52ad51=>(_0x52ad51[_0x52ad51[_0x7bec1e(0xeb)]=0x0]=_0x7bec1e(0xeb),_0x52ad51[_0x52ad51[_0x7bec1e(0xd8)]=0x1]=_0x7bec1e(0xd8),_0x52ad51[_0x52ad51['UNRECOGNIZED']=-0x1]=_0x7bec1e(0xef),_0x52ad51))(I||{}),v=(_0x2a5428=>(_0x2a5428[_0x2a5428[_0x7bec1e(0xc4)]=0x0]=_0x7bec1e(0xc4),_0x2a5428[_0x2a5428[_0x7bec1e(0xe4)]=0x1]=_0x7bec1e(0xe4),_0x2a5428[_0x2a5428[_0x7bec1e(0xd9)]=0x2]='Reply',_0x2a5428[_0x2a5428[_0x7bec1e(0xfe)]=0x3]=_0x7bec1e(0xfe),_0x2a5428[_0x2a5428[_0x7bec1e(0xac)]=0x4]=_0x7bec1e(0xac),_0x2a5428[_0x2a5428[_0x7bec1e(0xa0)]=0x5]='Solve',_0x2a5428[_0x2a5428[_0x7bec1e(0xef)]=-0x1]=_0x7bec1e(0xef),_0x2a5428))(v||{});const f=_0xfa1796=>c[_0x7bec1e(0x98)](new Date(+_0xfa1796))['format'](_0x7bec1e(0xcc)),R=async(_0x4e0526,_0x342d5a)=>{const _0x427f24=_0x7bec1e,_0x1079c0=_0x4e0526[_0x427f24(0xa2)](c['UserManagerService']),_0x438a90=_0x4e0526[_0x427f24(0xa2)](P['HTTPService']);_0x342d5a['forEach'](_0x44c515=>{const _0x4be342=_0x427f24;_0x1079c0[_0x4be342(0xf6)](_0x44c515)&&_0x342d5a['delete'](_0x44c515);}),_0x342d5a[_0x427f24(0x96)]&&(await _0x438a90[_0x427f24(0xa2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x342d5a]}}))[_0x427f24(0xbf)]['users'][_0x427f24(0x9b)](_0x267e3f=>{_0x267e3f&&_0x1079c0['addUser'](_0x267e3f);});};var $=Object[_0x7bec1e(0xb6)],E=(_0x2aa9ba,_0x2ad740,_0x726af1,_0x346b0b)=>{for(var _0x4bff96=_0x346b0b>0x1?void 0x0:_0x346b0b?$(_0x2ad740,_0x726af1):_0x2ad740,_0x416884=_0x2aa9ba['length']-0x1,_0x59ddb8;_0x416884>=0x0;_0x416884--)(_0x59ddb8=_0x2aa9ba[_0x416884])&&(_0x4bff96=_0x59ddb8(_0x4bff96)||_0x4bff96);return _0x4bff96;},S=(_0x3750fb,_0x5859e8)=>(_0x4b77d9,_0x7971af)=>_0x5859e8(_0x4b77d9,_0x7971af,_0x3750fb);let _=class extends c[_0x7bec1e(0xa7)]{constructor(_0x39ef2a,_0x291013,_0x504e28,_0x2f26b2){const _0x21536f=_0x7bec1e;super(),this[_0x21536f(0xa3)]=_0x39ef2a,this[_0x21536f(0x91)]=_0x291013,this[_0x21536f(0xcf)]=_0x504e28,this[_0x21536f(0xce)]=_0x2f26b2,this[_0x21536f(0xde)](),this[_0x21536f(0xd4)]();}[_0x7bec1e(0xd4)](){const _0x15194f=_0x7bec1e;this[_0x15194f(0xa9)](this[_0x15194f(0x91)][_0x15194f(0xc9)]['pipe'](j[_0x15194f(0x9e)](0x10))[_0x15194f(0xcb)](_0x2e12fd=>{const _0x43e5f9=_0x15194f,_0x1b4d0f=new Set();_0x2e12fd[_0x43e5f9(0x9b)](_0x17847f=>{const _0x33ac7c=_0x43e5f9;switch(_0x17847f['type']){case _0x33ac7c(0xf0):{const _0x2495bc=_0x17847f['payload'][_0x33ac7c(0xdc)];_0x1b4d0f[_0x33ac7c(0xf0)](_0x2495bc);break;}}}),R(this[_0x43e5f9(0xce)],_0x1b4d0f);}));}[_0x7bec1e(0xde)](){const _0x27d8e4=_0x7bec1e;this[_0x27d8e4(0xa9)](this['_commentService'][_0x27d8e4(0xc9)]['subscribe'](async _0x355483=>{const _0x5e3dda=_0x27d8e4;var _0x5ee4a4,_0x3ed14a,_0x37a4f8,_0x14c153;const _0x4bc227=(_0x5ee4a4=this['_threadCommentModel']['getUnit'](_0x355483[_0x5e3dda(0x8f)])['find'](_0x1a3458=>_0x1a3458[_0x5e3dda(0xfc)]===_0x355483[_0x5e3dda(0xfc)]))==null?void 0x0:_0x5ee4a4[_0x5e3dda(0xbb)];if(!_0x4bc227)return;const {unitId:_0x943426,subUnitId:_0x3ade67}=_0x4bc227;switch(_0x355483[_0x5e3dda(0xb0)]&&this['_userService']['addUser'](_0x355483[_0x5e3dda(0xb0)]),_0x355483[_0x5e3dda(0xa1)]){case v['Add']:break;case v[_0x5e3dda(0xd9)]:{this[_0x5e3dda(0x91)][_0x5e3dda(0xd5)](_0x943426,_0x3ade67,{'unitId':_0x943426,'subUnitId':_0x3ade67,'ref':'','id':_0x355483[_0x5e3dda(0xf9)],'dT':f(+_0x355483[_0x5e3dda(0xcd)]),'threadId':_0x355483[_0x5e3dda(0xfc)],'personId':(_0x37a4f8=(_0x3ed14a=_0x355483[_0x5e3dda(0xb0)])==null?void 0x0:_0x3ed14a[_0x5e3dda(0xfb)])!=null?_0x37a4f8:_0x355483[_0x5e3dda(0xb9)],'text':JSON[_0x5e3dda(0xf1)](_0x355483[_0x5e3dda(0xd0)]),'parentId':_0x4bc227['id']});break;}case v['Delete']:{const _0xba6cfc=this[_0x5e3dda(0x91)]['getComment'](_0x943426,_0x3ade67,_0x355483[_0x5e3dda(0xf9)]);_0xba6cfc&&_0xba6cfc['parentId']&&this[_0x5e3dda(0x91)]['deleteComment'](_0x943426,_0x3ade67,_0x355483[_0x5e3dda(0xf9)]);break;}case v[_0x5e3dda(0xfe)]:{this[_0x5e3dda(0x91)][_0x5e3dda(0x97)](_0x943426,_0x3ade67,{'commentId':_0x355483['replyId'],'text':JSON[_0x5e3dda(0xf1)](_0x355483[_0x5e3dda(0xd0)])});break;}case v['Solve']:{const _0x61ffee=(_0x14c153=this[_0x5e3dda(0x91)]['getUnit'](_0x355483[_0x5e3dda(0x8f)])[_0x5e3dda(0xe1)](_0x2a42e4=>_0x2a42e4[_0x5e3dda(0xfc)]===_0x355483[_0x5e3dda(0xfc)]))==null?void 0x0:_0x14c153[_0x5e3dda(0xbb)];_0x61ffee&&this[_0x5e3dda(0x91)][_0x5e3dda(0xee)](_0x943426,_0x3ade67,_0x61ffee['id'],_0x355483[_0x5e3dda(0xfa)]===I[_0x5e3dda(0xd8)]);break;}}}));}};function _0x272e(_0x18f2fa,_0x139de9){_0x18f2fa=_0x18f2fa-0x8b;const _0x6aee2d=_0x6aee();let _0x272e46=_0x6aee2d[_0x18f2fa];return _0x272e46;}_=E([S(0x0,c[_0x7bec1e(0x8b)](b[_0x7bec1e(0xf7)])),S(0x1,c[_0x7bec1e(0x8b)](M[_0x7bec1e(0xf4)])),S(0x2,c['Inject'](c[_0x7bec1e(0xdb)])),S(0x3,c[_0x7bec1e(0x8b)](c[_0x7bec1e(0xca)]))],_);const q=_0x7bec1e(0xe5),D={};var A=Object[_0x7bec1e(0xb6)],x=(_0x5835fe,_0x3a49a0,_0x384267,_0x2319df)=>{const _0x3d85d5=_0x7bec1e;for(var _0x46b917=_0x2319df>0x1?void 0x0:_0x2319df?A(_0x3a49a0,_0x384267):_0x3a49a0,_0x4b57ec=_0x5835fe[_0x3d85d5(0xc5)]-0x1,_0x3762b3;_0x4b57ec>=0x0;_0x4b57ec--)(_0x3762b3=_0x5835fe[_0x4b57ec])&&(_0x46b917=_0x3762b3(_0x46b917)||_0x46b917);return _0x46b917;},C=(_0x4f72ec,_0x37dd6d)=>(_0x5b5483,_0x478530)=>_0x37dd6d(_0x5b5483,_0x478530,_0x4f72ec);function Y(_0x3bea5c,_0x3aee60){const _0x389dfb=_0x7bec1e,_0x283e48=_0x3bea5c['replies'][0x0];return{..._0x3aee60,'id':_0x283e48[_0x389dfb(0xf9)],'resolved':_0x3bea5c[_0x389dfb(0xfa)]===0x1,'dT':f(_0x283e48[_0x389dfb(0xcd)]),'personId':_0x283e48[_0x389dfb(0xb9)],'threadId':_0x283e48[_0x389dfb(0xfc)]};}function G(_0x30b80f,_0x23001f,_0x323984){const _0x46baee=_0x7bec1e;var _0x28abbc,_0x57eb17;if(((_0x57eb17=(_0x28abbc=_0x30b80f==null?void 0x0:_0x30b80f[_0x46baee(0xea)])==null?void 0x0:_0x28abbc[_0x46baee(0xc5)])!=null?_0x57eb17:0x0)>0x0){const _0x418916=(_0xfcc8e0,_0x213060)=>({'id':_0xfcc8e0['replyId'],'threadId':_0xfcc8e0[_0x46baee(0xfc)],'dT':f(_0xfcc8e0[_0x46baee(0xcd)]),'personId':_0xfcc8e0['userId'],'resolved':_0x30b80f['solved']===I[_0x46baee(0xd8)],'unitId':_0x23001f,'subUnitId':_0x323984,'text':JSON[_0x46baee(0xf1)](_0xfcc8e0[_0x46baee(0xd0)]),'parentId':_0x213060}),_0x1cea45=_0x418916(_0x30b80f[_0x46baee(0xea)][0x0]);return{..._0x1cea45,'children':_0x30b80f[_0x46baee(0xea)][_0x46baee(0xa8)](0x1)[_0x46baee(0xda)](_0x42bee7=>_0x418916(_0x42bee7,_0x1cea45['id']))};}return null;}let p=class{constructor(_0x49c647,_0x441e71,_0x1c37a9){const _0x2e3d61=_0x7bec1e;this[_0x2e3d61(0xf2)]=_0x49c647,this[_0x2e3d61(0xcf)]=_0x441e71,this[_0x2e3d61(0xa4)]=_0x1c37a9;}async[_0x7bec1e(0xd5)](_0xe447ec){const _0x288c6e=_0x7bec1e;var _0x411176,_0x1155b1;const {parentId:_0x237eb1,unitId:_0x223aa5,text:_0x16a255,threadId:_0x10431b}=_0xe447ec,_0x93b022=(_0x1155b1=(_0x411176=_0x16a255[_0x288c6e(0xbc)])==null?void 0x0:_0x411176[_0x288c6e(0xd2)](_0x85c108=>_0x85c108[_0x288c6e(0xaf)]===c[_0x288c6e(0xd6)]['COMMENT'])['map'](_0x2eadde=>_0x2eadde[_0x288c6e(0xe6)]))!=null?_0x1155b1:[],_0x3818e3=JSON[_0x288c6e(0xd1)](_0x16a255),_0x22700b=(await this[_0x288c6e(0xa4)][_0x288c6e(0xb7)](_0x223aa5))[_0x288c6e(0xc0)]();if(_0x237eb1){const _0x2c7d81={'memberId':_0x22700b,'unitId':_0x223aa5,'content':_0x3818e3,'mention':_0x93b022,'threadId':_0x10431b},_0xffeda4=(await this['_httpService'][_0x288c6e(0xb3)](_0x288c6e(0x92)+_0x223aa5+'/reply',{'body':_0x2c7d81}))['body']['reply'];return{..._0xe447ec,'id':_0xffeda4[_0x288c6e(0xf9)],'dT':c[_0x288c6e(0x98)](+_0xffeda4[_0x288c6e(0xcd)])[_0x288c6e(0xc7)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xffeda4[_0x288c6e(0xb9)]};}else{const _0x1bd12e={'memberId':_0x22700b,'unitId':_0x223aa5,'content':_0x3818e3,'mention':_0x93b022},_0x3c1abf=await this[_0x288c6e(0xf2)]['post']('/universer-api/comment/unit/'+_0x223aa5+_0x288c6e(0x90),{'body':_0x1bd12e});return Y(_0x3c1abf[_0x288c6e(0xbf)][_0x288c6e(0xed)],_0xe447ec);}}async['updateComment'](_0x4e97d3){const _0x1330de=_0x7bec1e;var _0x14f9dd,_0x159173;const {text:_0x182d01,unitId:_0x2d52fe}=_0x4e97d3,_0x3a612d=(_0x159173=(_0x14f9dd=_0x182d01[_0x1330de(0xbc)])==null?void 0x0:_0x14f9dd[_0x1330de(0xd2)](_0x4ba4ae=>_0x4ba4ae['rangeType']===c[_0x1330de(0xd6)][_0x1330de(0xe0)])[_0x1330de(0xda)](_0x570421=>_0x570421[_0x1330de(0xe6)]))!=null?_0x159173:[],_0x402bd6=JSON[_0x1330de(0xd1)](_0x182d01),_0x5ef40e=_0x4e97d3['threadId'],_0x2f2516=_0x4e97d3['id'],_0x547892={'memberId':(await this['_sessionService'][_0x1330de(0xb7)](_0x2d52fe))[_0x1330de(0xc0)](),'unitId':_0x2d52fe,'threadId':_0x5ef40e,'mention':_0x3a612d,'content':_0x402bd6,'replyId':_0x2f2516},_0x434d2b=await this[_0x1330de(0xf2)]['post'](_0x1330de(0x92)+_0x2d52fe+_0x1330de(0xc2),{'body':_0x547892});return!_0x434d2b[_0x1330de(0xbf)]['error']||_0x434d2b[_0x1330de(0xbf)]['error'][_0x1330de(0xf8)]===0x1;}async[_0x7bec1e(0xee)](_0x48dc08){const _0x4348ef=_0x7bec1e,{unitId:_0x14805f}=_0x48dc08,_0x4a7185=_0x48dc08[_0x4348ef(0xfc)],_0x16599a={'memberId':this['_userService'][_0x4348ef(0xe2)]()[_0x4348ef(0xfb)],'unitId':_0x14805f,'threadId':_0x4a7185,'solved':_0x48dc08['resolved']?I[_0x4348ef(0xd8)]:I['OpenOrReOpen']},_0x3633da=await this['_httpService'][_0x4348ef(0xb3)]('/universer-api/comment/unit/'+_0x14805f+'/solved',{'body':_0x16599a});return!_0x3633da[_0x4348ef(0xbf)][_0x4348ef(0xa6)]||_0x3633da[_0x4348ef(0xbf)][_0x4348ef(0xa6)][_0x4348ef(0xf8)]===0x1;}async[_0x7bec1e(0xd3)](_0x27b333,_0x3b225b,_0x18e068,_0x3eb13){const _0x3cd213=_0x7bec1e,_0x492e4e={'memberId':(await this['_sessionService']['requireSession'](_0x27b333))['getMemberID'](),'threadId':_0x18e068,'replyId':_0x3eb13,'unitId':_0x27b333},_0x20cdcc=await this[_0x3cd213(0xf2)][_0x3cd213(0xb3)](_0x3cd213(0x92)+_0x27b333+_0x3cd213(0x95),{'body':_0x492e4e});return!_0x20cdcc[_0x3cd213(0xbf)]['error']||_0x20cdcc[_0x3cd213(0xbf)][_0x3cd213(0xa6)][_0x3cd213(0xf8)]===0x1;}async[_0x7bec1e(0x9c)](_0x480e49,_0x29a746,_0x44c7bf){const _0x46de06=_0x7bec1e,_0x2429c9={'unitId':_0x480e49,'threadId':_0x44c7bf},_0x3c4f20=await this[_0x46de06(0xf2)][_0x46de06(0xb3)](_0x46de06(0x92)+_0x480e49+'/list',{'body':_0x2429c9}),_0x48ca3a=_0x44c7bf['map'](_0x15ee71=>G(_0x3c4f20[_0x46de06(0xbf)]['comments'][_0x15ee71],_0x480e49,_0x29a746))[_0x46de06(0xd2)](Boolean);return Object[_0x46de06(0xa5)](_0x3c4f20[_0x46de06(0xbf)][_0x46de06(0xae)])['forEach'](_0x5a8967=>{const _0x215ade=_0x46de06;this[_0x215ade(0xcf)][_0x215ade(0xad)](_0x5a8967);}),_0x48ca3a;}[_0x7bec1e(0x8e)](_0x32e4a0){const _0x23acb8=_0x7bec1e;return{'id':_0x32e4a0['id'],'threadId':_0x32e4a0[_0x23acb8(0xfc)],'ref':_0x32e4a0['ref']};}};p=x([C(0x0,c[_0x7bec1e(0x8b)](P[_0x7bec1e(0xc1)])),C(0x1,c[_0x7bec1e(0x8b)](c[_0x7bec1e(0xdb)])),C(0x2,c[_0x7bec1e(0x8b)](b[_0x7bec1e(0x8d)]))],p);var H=Object[_0x7bec1e(0xb6)],J=(_0x57971a,_0x1c3ce2,_0x2e41b2,_0x1420b2)=>{for(var _0x8ad958=_0x1420b2>0x1?void 0x0:_0x1420b2?H(_0x1c3ce2,_0x2e41b2):_0x1c3ce2,_0x314aef=_0x57971a['length']-0x1,_0xe16af1;_0x314aef>=0x0;_0x314aef--)(_0xe16af1=_0x57971a[_0x314aef])&&(_0x8ad958=_0xe16af1(_0x8ad958)||_0x8ad958);return _0x8ad958;},y=(_0x5530af,_0x486635)=>(_0x115daa,_0x54a1a0)=>_0x486635(_0x115daa,_0x54a1a0,_0x5530af);let g=class extends c['Disposable']{constructor(_0x2185c4,_0xbfbf80){const _0x5d7a92=_0x7bec1e;super(),this[_0x5d7a92(0xf5)]=_0x2185c4,this[_0x5d7a92(0xe9)]=_0xbfbf80,this[_0x5d7a92(0xc3)]();}[_0x7bec1e(0xc3)](){const _0x3d1c79=_0x7bec1e;this[_0x3d1c79(0xf5)][_0x3d1c79(0xdf)]=this[_0x3d1c79(0xe9)],this[_0x3d1c79(0xf5)][_0x3d1c79(0xb1)]=!0x1;}};g=J([y(0x0,M[_0x7bec1e(0xb4)]),y(0x1,c[_0x7bec1e(0x8b)](p))],g);var F=Object[_0x7bec1e(0x99)],L=Object['getOwnPropertyDescriptor'],Z=(_0x3f18c8,_0x1e5d23,_0x486380)=>_0x1e5d23 in _0x3f18c8?F(_0x3f18c8,_0x1e5d23,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x486380}):_0x3f18c8[_0x1e5d23]=_0x486380,W=(_0x3636f3,_0x59a530,_0x25f26e,_0x36c2ef)=>{const _0xae6da8=_0x7bec1e;for(var _0x5db238=_0x36c2ef>0x1?void 0x0:_0x36c2ef?L(_0x59a530,_0x25f26e):_0x59a530,_0x5b9dc7=_0x3636f3[_0xae6da8(0xc5)]-0x1,_0x4fe4de;_0x5b9dc7>=0x0;_0x5b9dc7--)(_0x4fe4de=_0x3636f3[_0x5b9dc7])&&(_0x5db238=_0x4fe4de(_0x5db238)||_0x5db238);return _0x5db238;},O=(_0x1f4736,_0x51a816)=>(_0x30aeaf,_0x28fb5b)=>_0x51a816(_0x30aeaf,_0x28fb5b,_0x1f4736),N=(_0x2f45e5,_0x389855,_0x43d209)=>Z(_0x2f45e5,typeof _0x389855!=_0x7bec1e(0xab)?_0x389855+'':_0x389855,_0x43d209);exports[_0x7bec1e(0xb5)]=class extends c['Plugin']{constructor(_0x52b592=D,_0x2f730d,_0x3dc872){const _0x3d1802=_0x7bec1e;super(),this[_0x3d1802(0x94)]=_0x52b592,this[_0x3d1802(0xce)]=_0x2f730d,this[_0x3d1802(0xbd)]=_0x3dc872;const {..._0x3e2e42}=c[_0x3d1802(0x9d)]({},D,this[_0x3d1802(0x94)]);this[_0x3d1802(0xbd)][_0x3d1802(0x93)](q,_0x3e2e42);}[_0x7bec1e(0xc6)](){const _0x4db63f=_0x7bec1e;[[p],[g],[_]][_0x4db63f(0x9b)](_0x1df4aa=>{const _0x29b8f3=_0x4db63f;this[_0x29b8f3(0xce)][_0x29b8f3(0xf0)](_0x1df4aa);});}[_0x7bec1e(0x8c)](){const _0x1e636d=_0x7bec1e;this[_0x1e636d(0xce)][_0x1e636d(0xa2)](g),this[_0x1e636d(0xce)][_0x1e636d(0xa2)](_);}},N(exports[_0x7bec1e(0xb5)],'pluginName',U),N(exports[_0x7bec1e(0xb5)],'type',c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x7bec1e(0xb8)](w['UniverThreadCommentUIPlugin'],b[_0x7bec1e(0x9a)],T[_0x7bec1e(0xe3)]),O(0x1,c[_0x7bec1e(0x8b)](c[_0x7bec1e(0xca)])),O(0x2,c[_0x7bec1e(0xe7)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1b503f=_0x53d2;(function(_0x5ecad4,_0x1ce279){const _0x4e49bf=_0x53d2,_0x29d002=_0x5ecad4();while(!![]){try{const _0x37fd48=-parseInt(_0x4e49bf(0x23b))/0x1+parseInt(_0x4e49bf(0x21b))/0x2+parseInt(_0x4e49bf(0x1ee))/0x3+parseInt(_0x4e49bf(0x226))/0x4*(-parseInt(_0x4e49bf(0x206))/0x5)+-parseInt(_0x4e49bf(0x223))/0x6+parseInt(_0x4e49bf(0x22d))/0x7*(-parseInt(_0x4e49bf(0x1eb))/0x8)+-parseInt(_0x4e49bf(0x1f0))/0x9*(-parseInt(_0x4e49bf(0x228))/0xa);if(_0x37fd48===_0x1ce279)break;else _0x29d002['push'](_0x29d002['shift']());}catch(_0x36ac3f){_0x29d002['push'](_0x29d002['shift']());}}}(_0x5491,0x3fd84));import{CommentService as _0x177479,CollaborationSessionService as _0x5d29c3,UniverCollaborationClientPlugin as _0x4ac8a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x54b9da}from'@univerjs-pro/license';import{dayjs as _0x5b328b,UserManagerService as _0x27b619,Inject as _0xe56929,Injector as _0x323c4c,Disposable as _0x496c11,CustomRangeType as _0x1a50f9,UniverInstanceType as _0x4ce168,DependentOn as _0x422474,IConfigService as _0x3cb82c,Plugin as _0x55d139,merge as _0xd65155}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x181ffd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34daab,IThreadCommentDataSourceService as _0x51dd11}from'@univerjs/thread-comment';import{bufferTime as _0x487d8e}from'rxjs';function _0x5491(){const _0x3cc461=['solved','35NuGFLm','getComment','map','slice','_httpService','/add','userID','_userService','Unknown','_config','Add','_configService','values','stringify','516782dtHjKf','userId','Solve','_injector','dataSource','body','error','delete','rangeType','replyId','resolved','length','_commentService','_threadCommentModel','/edit','185608fqMmaa','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','119997Jlgsit','size','12303CqawDH','deleteComment','commentUpdate$','requireSession','disposeWithMe','UNRECOGNIZED','resolveComment','onReady','updateComment','type','get','Solved','_threadCommentDataSourceService','symbol','root','find','_initUserSync','OpenOrReOpen','getOwnPropertyDescriptor','syncUpdateMutationToColla','ref','/reply','2311115sPwUbB','_init','rangeId','comments','add','code','_initDataSource','forEach','threadId','content','thread-comment-data-source.config','getUser','setConfig','user','replies','comment','Edit','parentId','Reply','Delete','createTimestamp','919058sOfUAk','addComment','format','onStarting','post','addUser','reply','getMemberID','2182446wvnrOQ','_threadCommentDataSource','/universer-api/comment/unit/','4OqzOCN','_sessionService','8930viHjRA','customRanges','/solved','parse'];_0x5491=function(){return _0x3cc461;};return _0x5491();}import{HTTPService as _0x4b3a69}from'@univerjs/network';const W=_0x1b503f(0x1ed);var I=(_0xf2fff0=>(_0xf2fff0[_0xf2fff0[_0x1b503f(0x201)]=0x0]=_0x1b503f(0x201),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1fb)]=0x1]=_0x1b503f(0x1fb),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0xf2fff0))(I||{}),v=(_0x37b9a2=>(_0x37b9a2[_0x37b9a2[_0x1b503f(0x235)]=0x0]=_0x1b503f(0x235),_0x37b9a2[_0x37b9a2[_0x1b503f(0x237)]=0x1]=_0x1b503f(0x237),_0x37b9a2[_0x37b9a2[_0x1b503f(0x218)]=0x2]=_0x1b503f(0x218),_0x37b9a2[_0x37b9a2[_0x1b503f(0x216)]=0x3]=_0x1b503f(0x216),_0x37b9a2[_0x37b9a2[_0x1b503f(0x219)]=0x4]='Delete',_0x37b9a2[_0x37b9a2[_0x1b503f(0x23d)]=0x5]='Solve',_0x37b9a2[_0x37b9a2[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0x37b9a2))(v||{});const y=_0x1c2e89=>_0x5b328b(new Date(+_0x1c2e89))[_0x1b503f(0x21d)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xc81d1c,_0x561816)=>{const _0x3a5f86=_0x1b503f,_0x2a6bcb=_0xc81d1c['get'](_0x27b619),_0x36d59e=_0xc81d1c['get'](_0x4b3a69);_0x561816[_0x3a5f86(0x20d)](_0xb2e873=>{const _0x3a3acb=_0x3a5f86;_0x2a6bcb[_0x3a3acb(0x211)](_0xb2e873)&&_0x561816[_0x3a3acb(0x1e3)](_0xb2e873);}),_0x561816[_0x3a5f86(0x1ef)]&&(await _0x36d59e[_0x3a5f86(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x561816]}}))['body'][_0x3a5f86(0x1ec)][_0x3a5f86(0x20d)](_0x43e85f=>{const _0x415732=_0x3a5f86;_0x43e85f&&_0x2a6bcb[_0x415732(0x220)](_0x43e85f);});};var K=Object[_0x1b503f(0x202)],V=(_0x387c97,_0x5c32d4,_0x428338,_0x5f41b7)=>{for(var _0xf0b265=_0x5f41b7>0x1?void 0x0:_0x5f41b7?K(_0x5c32d4,_0x428338):_0x5c32d4,_0x1395d6=_0x387c97['length']-0x1,_0x1bb40a;_0x1395d6>=0x0;_0x1395d6--)(_0x1bb40a=_0x387c97[_0x1395d6])&&(_0xf0b265=_0x1bb40a(_0xf0b265)||_0xf0b265);return _0xf0b265;},p=(_0x2fc504,_0x5c1669)=>(_0x2e4e18,_0x5f1862)=>_0x5c1669(_0x2e4e18,_0x5f1862,_0x2fc504);let _=class extends _0x496c11{constructor(_0x14c945,_0x1836d1,_0x3ec5a8,_0x27aa08){const _0x4f27a5=_0x1b503f;super(),this[_0x4f27a5(0x1e8)]=_0x14c945,this[_0x4f27a5(0x1e9)]=_0x1836d1,this['_userService']=_0x3ec5a8,this[_0x4f27a5(0x23e)]=_0x27aa08,this[_0x4f27a5(0x207)](),this[_0x4f27a5(0x200)]();}['_initUserSync'](){const _0x4cb21d=_0x1b503f;this[_0x4cb21d(0x1f4)](this[_0x4cb21d(0x1e9)][_0x4cb21d(0x1f2)]['pipe'](_0x487d8e(0x10))['subscribe'](_0x33590f=>{const _0x3e36e9=_0x4cb21d,_0x5b166c=new Set();_0x33590f[_0x3e36e9(0x20d)](_0x37ba4c=>{const _0x1133f2=_0x3e36e9;switch(_0x37ba4c[_0x1133f2(0x1f9)]){case _0x1133f2(0x20a):{const _0x330e8d=_0x37ba4c['payload']['personId'];_0x5b166c[_0x1133f2(0x20a)](_0x330e8d);break;}}}),B(this['_injector'],_0x5b166c);}));}[_0x1b503f(0x207)](){const _0x20b5b2=_0x1b503f;this['disposeWithMe'](this[_0x20b5b2(0x1e8)][_0x20b5b2(0x1f2)]['subscribe'](async _0x16eda5=>{const _0x56ef1b=_0x20b5b2;var _0x458bf3,_0xd96ddd,_0x4f9b16,_0x3ed873;const _0xb15ac0=(_0x458bf3=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x2752bb=>_0x2752bb['threadId']===_0x16eda5['threadId']))==null?void 0x0:_0x458bf3['root'];if(!_0xb15ac0)return;const {unitId:_0x23a6ff,subUnitId:_0x153a0a}=_0xb15ac0;switch(_0x16eda5[_0x56ef1b(0x213)]&&this[_0x56ef1b(0x234)][_0x56ef1b(0x220)](_0x16eda5[_0x56ef1b(0x213)]),_0x16eda5[_0x56ef1b(0x1f9)]){case v[_0x56ef1b(0x237)]:break;case v[_0x56ef1b(0x218)]:{this['_threadCommentModel'][_0x56ef1b(0x21c)](_0x23a6ff,_0x153a0a,{'unitId':_0x23a6ff,'subUnitId':_0x153a0a,'ref':'','id':_0x16eda5[_0x56ef1b(0x1e5)],'dT':y(+_0x16eda5[_0x56ef1b(0x21a)]),'threadId':_0x16eda5[_0x56ef1b(0x20e)],'personId':(_0x4f9b16=(_0xd96ddd=_0x16eda5['user'])==null?void 0x0:_0xd96ddd[_0x56ef1b(0x233)])!=null?_0x4f9b16:_0x16eda5[_0x56ef1b(0x23c)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)]),'parentId':_0xb15ac0['id']});break;}case v[_0x56ef1b(0x219)]:{const _0x5eb921=this[_0x56ef1b(0x1e9)][_0x56ef1b(0x22e)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);_0x5eb921&&_0x5eb921[_0x56ef1b(0x217)]&&this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f1)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);break;}case v[_0x56ef1b(0x216)]:{this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f8)](_0x23a6ff,_0x153a0a,{'commentId':_0x16eda5[_0x56ef1b(0x1e5)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)])});break;}case v[_0x56ef1b(0x23d)]:{const _0x3a9c54=(_0x3ed873=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x55c33d=>_0x55c33d[_0x56ef1b(0x20e)]===_0x16eda5[_0x56ef1b(0x20e)]))==null?void 0x0:_0x3ed873[_0x56ef1b(0x1fe)];_0x3a9c54&&this['_threadCommentModel'][_0x56ef1b(0x1f6)](_0x23a6ff,_0x153a0a,_0x3a9c54['id'],_0x16eda5['solved']===I[_0x56ef1b(0x1fb)]);break;}}}));}};_=V([p(0x0,_0xe56929(_0x177479)),p(0x1,_0xe56929(_0x34daab)),p(0x2,_0xe56929(_0x27b619)),p(0x3,_0xe56929(_0x323c4c))],_);const z=_0x1b503f(0x210),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f24c0,_0xf3bd,_0x28f0f0,_0x2e75bb)=>{const _0xb8a12a=_0x1b503f;for(var _0x48e1eb=_0x2e75bb>0x1?void 0x0:_0x2e75bb?k(_0xf3bd,_0x28f0f0):_0xf3bd,_0x515e7d=_0x1f24c0[_0xb8a12a(0x1e7)]-0x1,_0x3ddbfb;_0x515e7d>=0x0;_0x515e7d--)(_0x3ddbfb=_0x1f24c0[_0x515e7d])&&(_0x48e1eb=_0x3ddbfb(_0x48e1eb)||_0x48e1eb);return _0x48e1eb;},b=(_0x342fff,_0x44dcd2)=>(_0xd804f3,_0x3c2e2b)=>_0x44dcd2(_0xd804f3,_0x3c2e2b,_0x342fff);function X(_0x480133,_0x29c503){const _0x525730=_0x1b503f,_0x5464c1=_0x480133[_0x525730(0x214)][0x0];return{..._0x29c503,'id':_0x5464c1['replyId'],'resolved':_0x480133[_0x525730(0x22c)]===0x1,'dT':y(_0x5464c1['createTimestamp']),'personId':_0x5464c1[_0x525730(0x23c)],'threadId':_0x5464c1[_0x525730(0x20e)]};}function ee(_0x409c40,_0x206ede,_0x172d6b){const _0x3ddf74=_0x1b503f;var _0x53b8bd,_0x5f5593;if(((_0x5f5593=(_0x53b8bd=_0x409c40==null?void 0x0:_0x409c40[_0x3ddf74(0x214)])==null?void 0x0:_0x53b8bd['length'])!=null?_0x5f5593:0x0)>0x0){const _0x18da36=(_0x12305d,_0x343833)=>({'id':_0x12305d['replyId'],'threadId':_0x12305d[_0x3ddf74(0x20e)],'dT':y(_0x12305d[_0x3ddf74(0x21a)]),'personId':_0x12305d[_0x3ddf74(0x23c)],'resolved':_0x409c40[_0x3ddf74(0x22c)]===I[_0x3ddf74(0x1fb)],'unitId':_0x206ede,'subUnitId':_0x172d6b,'text':JSON[_0x3ddf74(0x22b)](_0x12305d['content']),'parentId':_0x343833}),_0x16582e=_0x18da36(_0x409c40[_0x3ddf74(0x214)][0x0]);return{..._0x16582e,'children':_0x409c40['replies'][_0x3ddf74(0x230)](0x1)[_0x3ddf74(0x22f)](_0x498e08=>_0x18da36(_0x498e08,_0x16582e['id']))};}return null;}function _0x53d2(_0x2f8f1d,_0x3438e8){_0x2f8f1d=_0x2f8f1d-0x1e0;const _0x5491da=_0x5491();let _0x53d231=_0x5491da[_0x2f8f1d];return _0x53d231;}let S=class{constructor(_0x208ca2,_0xb7c40e,_0x2b4bcd){const _0x31a10c=_0x1b503f;this[_0x31a10c(0x231)]=_0x208ca2,this['_userService']=_0xb7c40e,this['_sessionService']=_0x2b4bcd;}async[_0x1b503f(0x21c)](_0x3a8e1e){const _0x387822=_0x1b503f;var _0x9a661d,_0x13e52b;const {parentId:_0x27a3df,unitId:_0x142237,text:_0xc8886c,threadId:_0x269136}=_0x3a8e1e,_0xd3b4d=(_0x13e52b=(_0x9a661d=_0xc8886c[_0x387822(0x229)])==null?void 0x0:_0x9a661d['filter'](_0x2f7eb3=>_0x2f7eb3[_0x387822(0x1e4)]===_0x1a50f9['COMMENT'])[_0x387822(0x22f)](_0x1c1b48=>_0x1c1b48[_0x387822(0x208)]))!=null?_0x13e52b:[],_0x49d2d5=JSON[_0x387822(0x23a)](_0xc8886c),_0x300ebf=(await this[_0x387822(0x227)][_0x387822(0x1f3)](_0x142237))[_0x387822(0x222)]();if(_0x27a3df){const _0x3167b1={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d,'threadId':_0x269136},_0x1b0851=(await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x205),{'body':_0x3167b1}))[_0x387822(0x1e1)][_0x387822(0x221)];return{..._0x3a8e1e,'id':_0x1b0851['replyId'],'dT':_0x5b328b(+_0x1b0851[_0x387822(0x21a)])[_0x387822(0x21d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b0851[_0x387822(0x23c)]};}else{const _0x35be21={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d},_0x15fbab=await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x232),{'body':_0x35be21});return X(_0x15fbab['body'][_0x387822(0x215)],_0x3a8e1e);}}async['updateComment'](_0x260b35){const _0x5bf4f1=_0x1b503f;var _0x48ba6d,_0x2c4f10;const {text:_0x3e7bb0,unitId:_0x247ca6}=_0x260b35,_0xa1342a=(_0x2c4f10=(_0x48ba6d=_0x3e7bb0[_0x5bf4f1(0x229)])==null?void 0x0:_0x48ba6d['filter'](_0x308644=>_0x308644['rangeType']===_0x1a50f9['COMMENT'])[_0x5bf4f1(0x22f)](_0x20dca1=>_0x20dca1[_0x5bf4f1(0x208)]))!=null?_0x2c4f10:[],_0x45370b=JSON[_0x5bf4f1(0x23a)](_0x3e7bb0),_0x4be793=_0x260b35[_0x5bf4f1(0x20e)],_0x2a397e=_0x260b35['id'],_0x146dfa={'memberId':(await this[_0x5bf4f1(0x227)][_0x5bf4f1(0x1f3)](_0x247ca6))[_0x5bf4f1(0x222)](),'unitId':_0x247ca6,'threadId':_0x4be793,'mention':_0xa1342a,'content':_0x45370b,'replyId':_0x2a397e},_0xc37f2c=await this['_httpService'][_0x5bf4f1(0x21f)](_0x5bf4f1(0x225)+_0x247ca6+_0x5bf4f1(0x1ea),{'body':_0x146dfa});return!_0xc37f2c[_0x5bf4f1(0x1e1)]['error']||_0xc37f2c[_0x5bf4f1(0x1e1)][_0x5bf4f1(0x1e2)][_0x5bf4f1(0x20b)]===0x1;}async[_0x1b503f(0x1f6)](_0x32dd47){const _0x2e6f93=_0x1b503f,{unitId:_0xe790bb}=_0x32dd47,_0x28583f=_0x32dd47['threadId'],_0x4a030b={'memberId':this[_0x2e6f93(0x234)]['getCurrentUser']()[_0x2e6f93(0x233)],'unitId':_0xe790bb,'threadId':_0x28583f,'solved':_0x32dd47[_0x2e6f93(0x1e6)]?I['Solved']:I[_0x2e6f93(0x201)]},_0x16ef5a=await this[_0x2e6f93(0x231)][_0x2e6f93(0x21f)](_0x2e6f93(0x225)+_0xe790bb+_0x2e6f93(0x22a),{'body':_0x4a030b});return!_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)]||_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)][_0x2e6f93(0x20b)]===0x1;}async[_0x1b503f(0x1f1)](_0x162970,_0x2917ac,_0x44e83f,_0x49a38c){const _0x18cacb=_0x1b503f,_0x277b2c={'memberId':(await this[_0x18cacb(0x227)]['requireSession'](_0x162970))[_0x18cacb(0x222)](),'threadId':_0x44e83f,'replyId':_0x49a38c,'unitId':_0x162970},_0x54a4a7=await this[_0x18cacb(0x231)][_0x18cacb(0x21f)](_0x18cacb(0x225)+_0x162970+'/delete',{'body':_0x277b2c});return!_0x54a4a7[_0x18cacb(0x1e1)][_0x18cacb(0x1e2)]||_0x54a4a7['body'][_0x18cacb(0x1e2)][_0x18cacb(0x20b)]===0x1;}async['listComments'](_0xc26da1,_0x353bf2,_0x1474c8){const _0x368d91=_0x1b503f,_0x508603={'unitId':_0xc26da1,'threadId':_0x1474c8},_0x2160e7=await this['_httpService'][_0x368d91(0x21f)](_0x368d91(0x225)+_0xc26da1+'/list',{'body':_0x508603}),_0x171654=_0x1474c8[_0x368d91(0x22f)](_0x5d3b17=>ee(_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x209)][_0x5d3b17],_0xc26da1,_0x353bf2))['filter'](Boolean);return Object[_0x368d91(0x239)](_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x1ec)])['forEach'](_0x26e897=>{const _0x55d431=_0x368d91;this['_userService'][_0x55d431(0x220)](_0x26e897);}),_0x171654;}['saveCommentToSnapshot'](_0x31fc68){const _0x323f5d=_0x1b503f;return{'id':_0x31fc68['id'],'threadId':_0x31fc68[_0x323f5d(0x20e)],'ref':_0x31fc68[_0x323f5d(0x204)]};}};S=Q([b(0x0,_0xe56929(_0x4b3a69)),b(0x1,_0xe56929(_0x27b619)),b(0x2,_0xe56929(_0x5d29c3))],S);var re=Object[_0x1b503f(0x202)],te=(_0x31308c,_0x519ab1,_0x1537c5,_0x488aae)=>{const _0x23851c=_0x1b503f;for(var _0x9a3f9e=_0x488aae>0x1?void 0x0:_0x488aae?re(_0x519ab1,_0x1537c5):_0x519ab1,_0x5022eb=_0x31308c[_0x23851c(0x1e7)]-0x1,_0x51df2c;_0x5022eb>=0x0;_0x5022eb--)(_0x51df2c=_0x31308c[_0x5022eb])&&(_0x9a3f9e=_0x51df2c(_0x9a3f9e)||_0x9a3f9e);return _0x9a3f9e;},M=(_0x47f1ee,_0x349640)=>(_0x4c5a6a,_0x287107)=>_0x349640(_0x4c5a6a,_0x287107,_0x47f1ee);let f=class extends _0x496c11{constructor(_0x1641f1,_0x3b57a5){const _0x57bb5d=_0x1b503f;super(),this[_0x57bb5d(0x1fc)]=_0x1641f1,this[_0x57bb5d(0x224)]=_0x3b57a5,this[_0x57bb5d(0x20c)]();}[_0x1b503f(0x20c)](){const _0x3ad9e5=_0x1b503f;this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x1e0)]=this[_0x3ad9e5(0x224)],this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x203)]=!0x1;}};f=te([M(0x0,_0x51dd11),M(0x1,_0xe56929(S))],f);var se=Object['defineProperty'],oe=Object[_0x1b503f(0x202)],ne=(_0x1d8a02,_0x18bf9c,_0x4def72)=>_0x18bf9c in _0x1d8a02?se(_0x1d8a02,_0x18bf9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4def72}):_0x1d8a02[_0x18bf9c]=_0x4def72,ie=(_0x5a19ac,_0x2db807,_0x5a85c7,_0x3253ec)=>{const _0x570c8=_0x1b503f;for(var _0x470026=_0x3253ec>0x1?void 0x0:_0x3253ec?oe(_0x2db807,_0x5a85c7):_0x2db807,_0x367189=_0x5a19ac[_0x570c8(0x1e7)]-0x1,_0x4e6bb1;_0x367189>=0x0;_0x367189--)(_0x4e6bb1=_0x5a19ac[_0x367189])&&(_0x470026=_0x4e6bb1(_0x470026)||_0x470026);return _0x470026;},N=(_0x5e90f2,_0x9bac7)=>(_0x5c2926,_0x28cdbd)=>_0x9bac7(_0x5c2926,_0x28cdbd,_0x5e90f2),$=(_0x3800b3,_0x502271,_0x56d1c4)=>ne(_0x3800b3,typeof _0x502271!=_0x1b503f(0x1fd)?_0x502271+'':_0x502271,_0x56d1c4);let g=class extends _0x55d139{constructor(_0x7eeebc=O,_0xf478b9,_0x2abb97){const _0x11c674=_0x1b503f;super(),this[_0x11c674(0x236)]=_0x7eeebc,this[_0x11c674(0x23e)]=_0xf478b9,this[_0x11c674(0x238)]=_0x2abb97;const {..._0x2a40dc}=_0xd65155({},O,this[_0x11c674(0x236)]);this[_0x11c674(0x238)][_0x11c674(0x212)](z,_0x2a40dc);}[_0x1b503f(0x21e)](){[[S],[f],[_]]['forEach'](_0x38d0ce=>{const _0x38b66d=_0x53d2;this[_0x38b66d(0x23e)][_0x38b66d(0x20a)](_0x38d0ce);});}[_0x1b503f(0x1f7)](){const _0x53289e=_0x1b503f;this[_0x53289e(0x23e)][_0x53289e(0x1fa)](f),this[_0x53289e(0x23e)][_0x53289e(0x1fa)](_);}};$(g,'pluginName',W),$(g,_0x1b503f(0x1f9),_0x4ce168['UNIVER_UNKNOWN']),g=ie([_0x422474(_0x181ffd,_0x4ac8a8,_0x54b9da),N(0x1,_0xe56929(_0x323c4c)),N(0x2,_0x3cb82c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x346c01=_0x20bd;(function(_0x5dc717,_0x5c4d83){const _0x5da85f=_0x20bd,_0x420ef4=_0x5dc717();while(!![]){try{const _0x3bfba5=-parseInt(_0x5da85f(0x8f))/0x1*(-parseInt(_0x5da85f(0xc9))/0x2)+-parseInt(_0x5da85f(0xa2))/0x3*(parseInt(_0x5da85f(0xbe))/0x4)+parseInt(_0x5da85f(0xb0))/0x5+parseInt(_0x5da85f(0xc1))/0x6*(parseInt(_0x5da85f(0x9f))/0x7)+parseInt(_0x5da85f(0x78))/0x8+parseInt(_0x5da85f(0x72))/0x9+-parseInt(_0x5da85f(0xaf))/0xa;if(_0x3bfba5===_0x5c4d83)break;else _0x420ef4['push'](_0x420ef4['shift']());}catch(_0x18f05c){_0x420ef4['push'](_0x420ef4['shift']());}}}(_0x2baf,0x7fe3f));import{CommentService as _0x2e07b6,CollaborationSessionService as _0x1a17a2,UniverCollaborationClientPlugin as _0xf6d2e9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42d43b}from'@univerjs-pro/license';function _0x2baf(){const _0x1a7801=['1718074lvTLBQ','body','userID','onReady','content','reply','delete','_initUserSync','type','replyId','updateComment','post','5532759enDFKt','ref','setConfig','_userService','users','_threadCommentModel','3322904nXkQHW','deleteComment','getCurrentUser','get','Solve','commentUpdate$','getComment','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','Unknown','/universer-api/user/list','createTimestamp','_init','stringify','_sessionService','_injector','root','unitId','saveCommentToSnapshot','customRanges','_initDataSource','subscribe','UNRECOGNIZED','1bUqMje','userId','/reply','getMemberID','/add','OpenOrReOpen','parse','pluginName','comment','Add','threadId','_threadCommentDataSourceService','_commentService','rangeType','add','error','16639VxrFQy','UNIVER_UNKNOWN','user','3yWUwUj','filter','values','find','/edit','payload','getUnit','requireSession','comments','length','Reply','Edit','disposeWithMe','11291220fAIXPl','1268465xcFOJD','rangeId','replies','_configService','forEach','_threadCommentDataSource','code','Delete','map','addUser','resolveComment','/universer-api/comment/unit/','slice','defineProperty','2092644lsBGaE','thread-comment-data-source.config','solved','84AcMiEJ','pipe','Solved','/solved','_httpService','COMMENT','format','onStarting'];_0x2baf=function(){return _0x1a7801;};return _0x2baf();}import{dayjs as _0x40a0bb,UserManagerService as _0x98ac35,Inject as _0x11b788,Injector as _0x48aa04,Disposable as _0x3e2a71,CustomRangeType as _0x3950fb,UniverInstanceType as _0x39fdf4,DependentOn as _0x2c6c28,IConfigService as _0x39fab1,Plugin as _0x2f68f0,merge as _0x4f8531}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x289211}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2d80a6,IThreadCommentDataSourceService as _0x172d22}from'@univerjs/thread-comment';import{bufferTime as _0x8b8400}from'rxjs';import{HTTPService as _0x4aa355}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x374a11=>(_0x374a11[_0x374a11[_0x346c01(0x94)]=0x0]=_0x346c01(0x94),_0x374a11[_0x374a11[_0x346c01(0xc3)]=0x1]=_0x346c01(0xc3),_0x374a11[_0x374a11[_0x346c01(0x8e)]=-0x1]=_0x346c01(0x8e),_0x374a11))(I||{}),v=(_0xb47590=>(_0xb47590[_0xb47590[_0x346c01(0x81)]=0x0]=_0x346c01(0x81),_0xb47590[_0xb47590['Add']=0x1]=_0x346c01(0x98),_0xb47590[_0xb47590[_0x346c01(0xac)]=0x2]='Reply',_0xb47590[_0xb47590['Edit']=0x3]=_0x346c01(0xad),_0xb47590[_0xb47590[_0x346c01(0xb7)]=0x4]=_0x346c01(0xb7),_0xb47590[_0xb47590[_0x346c01(0x7c)]=0x5]=_0x346c01(0x7c),_0xb47590[_0xb47590[_0x346c01(0x8e)]=-0x1]=_0x346c01(0x8e),_0xb47590))(v||{});const y=_0x337506=>_0x40a0bb(new Date(+_0x337506))[_0x346c01(0xc7)](_0x346c01(0x7f)),B=async(_0x18e88d,_0x2e2497)=>{const _0x2c68a9=_0x346c01,_0x5309f8=_0x18e88d[_0x2c68a9(0x7b)](_0x98ac35),_0x37d775=_0x18e88d[_0x2c68a9(0x7b)](_0x4aa355);_0x2e2497[_0x2c68a9(0xb4)](_0x3ac00e=>{const _0x456b97=_0x2c68a9;_0x5309f8['getUser'](_0x3ac00e)&&_0x2e2497[_0x456b97(0xcf)](_0x3ac00e);}),_0x2e2497['size']&&(await _0x37d775[_0x2c68a9(0x7b)](_0x2c68a9(0x82),{'params':{'userIDs':[..._0x2e2497]}}))[_0x2c68a9(0xca)]['users'][_0x2c68a9(0xb4)](_0x4295ae=>{const _0x329d85=_0x2c68a9;_0x4295ae&&_0x5309f8[_0x329d85(0xb9)](_0x4295ae);});};var K=Object[_0x346c01(0x80)],V=(_0x2f5395,_0x30d6b4,_0x1b22d5,_0x2fd57f)=>{for(var _0x4e9a43=_0x2fd57f>0x1?void 0x0:_0x2fd57f?K(_0x30d6b4,_0x1b22d5):_0x30d6b4,_0x782629=_0x2f5395['length']-0x1,_0x58477d;_0x782629>=0x0;_0x782629--)(_0x58477d=_0x2f5395[_0x782629])&&(_0x4e9a43=_0x58477d(_0x4e9a43)||_0x4e9a43);return _0x4e9a43;},p=(_0x194e23,_0x187248)=>(_0x3f2326,_0x4a0ed9)=>_0x187248(_0x3f2326,_0x4a0ed9,_0x194e23);let _=class extends _0x3e2a71{constructor(_0x5f57ed,_0x320383,_0x47bd0b,_0x26330c){const _0x383d88=_0x346c01;super(),this[_0x383d88(0x9b)]=_0x5f57ed,this['_threadCommentModel']=_0x320383,this['_userService']=_0x47bd0b,this[_0x383d88(0x87)]=_0x26330c,this['_init'](),this[_0x383d88(0xd0)]();}[_0x346c01(0xd0)](){const _0x266681=_0x346c01;this[_0x266681(0xae)](this[_0x266681(0x77)][_0x266681(0x7d)][_0x266681(0xc2)](_0x8b8400(0x10))[_0x266681(0x8d)](_0x3414a7=>{const _0x3c12bd=_0x266681,_0x4eeb2b=new Set();_0x3414a7[_0x3c12bd(0xb4)](_0x5e2a35=>{const _0x5bc542=_0x3c12bd;switch(_0x5e2a35[_0x5bc542(0xd1)]){case _0x5bc542(0x9d):{const _0xd52e42=_0x5e2a35[_0x5bc542(0xa7)]['personId'];_0x4eeb2b[_0x5bc542(0x9d)](_0xd52e42);break;}}}),B(this[_0x3c12bd(0x87)],_0x4eeb2b);}));}[_0x346c01(0x84)](){const _0x252611=_0x346c01;this[_0x252611(0xae)](this[_0x252611(0x9b)][_0x252611(0x7d)][_0x252611(0x8d)](async _0x490f74=>{const _0x4d9ea8=_0x252611;var _0x1e3c51,_0x31b780,_0x25a9b9,_0x24d614;const _0x235870=(_0x1e3c51=this['_threadCommentModel']['getUnit'](_0x490f74['unitId'])[_0x4d9ea8(0xa5)](_0x2430b3=>_0x2430b3['threadId']===_0x490f74[_0x4d9ea8(0x99)]))==null?void 0x0:_0x1e3c51['root'];if(!_0x235870)return;const {unitId:_0x384050,subUnitId:_0x52e0b0}=_0x235870;switch(_0x490f74[_0x4d9ea8(0xa1)]&&this[_0x4d9ea8(0x75)][_0x4d9ea8(0xb9)](_0x490f74[_0x4d9ea8(0xa1)]),_0x490f74['type']){case v[_0x4d9ea8(0x98)]:break;case v[_0x4d9ea8(0xac)]:{this[_0x4d9ea8(0x77)]['addComment'](_0x384050,_0x52e0b0,{'unitId':_0x384050,'subUnitId':_0x52e0b0,'ref':'','id':_0x490f74['replyId'],'dT':y(+_0x490f74[_0x4d9ea8(0x83)]),'threadId':_0x490f74['threadId'],'personId':(_0x25a9b9=(_0x31b780=_0x490f74['user'])==null?void 0x0:_0x31b780[_0x4d9ea8(0xcb)])!=null?_0x25a9b9:_0x490f74[_0x4d9ea8(0x90)],'text':JSON[_0x4d9ea8(0x95)](_0x490f74['content']),'parentId':_0x235870['id']});break;}case v['Delete']:{const _0x70f05a=this[_0x4d9ea8(0x77)][_0x4d9ea8(0x7e)](_0x384050,_0x52e0b0,_0x490f74[_0x4d9ea8(0xd2)]);_0x70f05a&&_0x70f05a['parentId']&&this['_threadCommentModel'][_0x4d9ea8(0x79)](_0x384050,_0x52e0b0,_0x490f74[_0x4d9ea8(0xd2)]);break;}case v['Edit']:{this[_0x4d9ea8(0x77)][_0x4d9ea8(0xd3)](_0x384050,_0x52e0b0,{'commentId':_0x490f74[_0x4d9ea8(0xd2)],'text':JSON['parse'](_0x490f74[_0x4d9ea8(0xcd)])});break;}case v['Solve']:{const _0x303013=(_0x24d614=this['_threadCommentModel'][_0x4d9ea8(0xa8)](_0x490f74[_0x4d9ea8(0x89)])[_0x4d9ea8(0xa5)](_0x49c758=>_0x49c758[_0x4d9ea8(0x99)]===_0x490f74['threadId']))==null?void 0x0:_0x24d614[_0x4d9ea8(0x88)];_0x303013&&this[_0x4d9ea8(0x77)]['resolveComment'](_0x384050,_0x52e0b0,_0x303013['id'],_0x490f74[_0x4d9ea8(0xc0)]===I[_0x4d9ea8(0xc3)]);break;}}}));}};function _0x20bd(_0x5a3802,_0x4edb0b){_0x5a3802=_0x5a3802-0x71;const _0x2baff6=_0x2baf();let _0x20bd65=_0x2baff6[_0x5a3802];return _0x20bd65;}_=V([p(0x0,_0x11b788(_0x2e07b6)),p(0x1,_0x11b788(_0x2d80a6)),p(0x2,_0x11b788(_0x98ac35)),p(0x3,_0x11b788(_0x48aa04))],_);const z=_0x346c01(0xbf),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5bbbac,_0x7febd7,_0x3ef3b2,_0x59447a)=>{const _0x4939da=_0x346c01;for(var _0x6d3d95=_0x59447a>0x1?void 0x0:_0x59447a?k(_0x7febd7,_0x3ef3b2):_0x7febd7,_0x3f9e19=_0x5bbbac[_0x4939da(0xab)]-0x1,_0x2fe5d0;_0x3f9e19>=0x0;_0x3f9e19--)(_0x2fe5d0=_0x5bbbac[_0x3f9e19])&&(_0x6d3d95=_0x2fe5d0(_0x6d3d95)||_0x6d3d95);return _0x6d3d95;},b=(_0x4d9e10,_0x3a2c3f)=>(_0x240b1c,_0x4d0792)=>_0x3a2c3f(_0x240b1c,_0x4d0792,_0x4d9e10);function X(_0x47ea2c,_0x48bbc9){const _0x2ff5d4=_0x346c01,_0x435354=_0x47ea2c[_0x2ff5d4(0xb2)][0x0];return{..._0x48bbc9,'id':_0x435354['replyId'],'resolved':_0x47ea2c[_0x2ff5d4(0xc0)]===0x1,'dT':y(_0x435354['createTimestamp']),'personId':_0x435354[_0x2ff5d4(0x90)],'threadId':_0x435354[_0x2ff5d4(0x99)]};}function ee(_0x2c2e50,_0x550a55,_0x551cdd){const _0x1d7290=_0x346c01;var _0x268b87,_0x25c576;if(((_0x25c576=(_0x268b87=_0x2c2e50==null?void 0x0:_0x2c2e50['replies'])==null?void 0x0:_0x268b87[_0x1d7290(0xab)])!=null?_0x25c576:0x0)>0x0){const _0x470e1b=(_0x5b6c62,_0x47b96f)=>({'id':_0x5b6c62[_0x1d7290(0xd2)],'threadId':_0x5b6c62[_0x1d7290(0x99)],'dT':y(_0x5b6c62['createTimestamp']),'personId':_0x5b6c62[_0x1d7290(0x90)],'resolved':_0x2c2e50[_0x1d7290(0xc0)]===I[_0x1d7290(0xc3)],'unitId':_0x550a55,'subUnitId':_0x551cdd,'text':JSON[_0x1d7290(0x95)](_0x5b6c62['content']),'parentId':_0x47b96f}),_0x23e531=_0x470e1b(_0x2c2e50[_0x1d7290(0xb2)][0x0]);return{..._0x23e531,'children':_0x2c2e50[_0x1d7290(0xb2)][_0x1d7290(0xbc)](0x1)[_0x1d7290(0xb8)](_0x1ecfd=>_0x470e1b(_0x1ecfd,_0x23e531['id']))};}return null;}let S=class{constructor(_0x361dd6,_0x5e1ce7,_0x3e0a67){const _0x1d4f69=_0x346c01;this[_0x1d4f69(0xc5)]=_0x361dd6,this[_0x1d4f69(0x75)]=_0x5e1ce7,this['_sessionService']=_0x3e0a67;}async['addComment'](_0x5328fd){const _0x36201f=_0x346c01;var _0xe1e5b8,_0xe288b;const {parentId:_0x4ebf2d,unitId:_0x25f1bc,text:_0x34563f,threadId:_0x1e4a86}=_0x5328fd,_0x18f2af=(_0xe288b=(_0xe1e5b8=_0x34563f[_0x36201f(0x8b)])==null?void 0x0:_0xe1e5b8[_0x36201f(0xa3)](_0x44046c=>_0x44046c[_0x36201f(0x9c)]===_0x3950fb['COMMENT'])[_0x36201f(0xb8)](_0x1105b8=>_0x1105b8[_0x36201f(0xb1)]))!=null?_0xe288b:[],_0x257409=JSON[_0x36201f(0x85)](_0x34563f),_0x50be42=(await this[_0x36201f(0x86)][_0x36201f(0xa9)](_0x25f1bc))[_0x36201f(0x92)]();if(_0x4ebf2d){const _0x66eb79={'memberId':_0x50be42,'unitId':_0x25f1bc,'content':_0x257409,'mention':_0x18f2af,'threadId':_0x1e4a86},_0x2aeeec=(await this[_0x36201f(0xc5)][_0x36201f(0x71)](_0x36201f(0xbb)+_0x25f1bc+_0x36201f(0x91),{'body':_0x66eb79}))[_0x36201f(0xca)][_0x36201f(0xce)];return{..._0x5328fd,'id':_0x2aeeec['replyId'],'dT':_0x40a0bb(+_0x2aeeec[_0x36201f(0x83)])[_0x36201f(0xc7)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2aeeec[_0x36201f(0x90)]};}else{const _0x416d0a={'memberId':_0x50be42,'unitId':_0x25f1bc,'content':_0x257409,'mention':_0x18f2af},_0x543479=await this[_0x36201f(0xc5)][_0x36201f(0x71)](_0x36201f(0xbb)+_0x25f1bc+_0x36201f(0x93),{'body':_0x416d0a});return X(_0x543479[_0x36201f(0xca)][_0x36201f(0x97)],_0x5328fd);}}async[_0x346c01(0xd3)](_0x33fa54){const _0x1c6eb3=_0x346c01;var _0x2e712d,_0x368d98;const {text:_0xe54e6b,unitId:_0x16354b}=_0x33fa54,_0x5edfa1=(_0x368d98=(_0x2e712d=_0xe54e6b[_0x1c6eb3(0x8b)])==null?void 0x0:_0x2e712d[_0x1c6eb3(0xa3)](_0x595b7e=>_0x595b7e['rangeType']===_0x3950fb[_0x1c6eb3(0xc6)])['map'](_0x5a7c7a=>_0x5a7c7a[_0x1c6eb3(0xb1)]))!=null?_0x368d98:[],_0x530eff=JSON[_0x1c6eb3(0x85)](_0xe54e6b),_0x4558be=_0x33fa54['threadId'],_0x23ebb9=_0x33fa54['id'],_0x1236bd={'memberId':(await this[_0x1c6eb3(0x86)]['requireSession'](_0x16354b))['getMemberID'](),'unitId':_0x16354b,'threadId':_0x4558be,'mention':_0x5edfa1,'content':_0x530eff,'replyId':_0x23ebb9},_0x586242=await this[_0x1c6eb3(0xc5)][_0x1c6eb3(0x71)](_0x1c6eb3(0xbb)+_0x16354b+_0x1c6eb3(0xa6),{'body':_0x1236bd});return!_0x586242[_0x1c6eb3(0xca)][_0x1c6eb3(0x9e)]||_0x586242[_0x1c6eb3(0xca)]['error'][_0x1c6eb3(0xb6)]===0x1;}async[_0x346c01(0xba)](_0x42d17a){const _0x21fa54=_0x346c01,{unitId:_0x40f4ef}=_0x42d17a,_0x17cd03=_0x42d17a[_0x21fa54(0x99)],_0x5d00c5={'memberId':this[_0x21fa54(0x75)][_0x21fa54(0x7a)]()[_0x21fa54(0xcb)],'unitId':_0x40f4ef,'threadId':_0x17cd03,'solved':_0x42d17a['resolved']?I['Solved']:I[_0x21fa54(0x94)]},_0x526a65=await this[_0x21fa54(0xc5)][_0x21fa54(0x71)](_0x21fa54(0xbb)+_0x40f4ef+_0x21fa54(0xc4),{'body':_0x5d00c5});return!_0x526a65[_0x21fa54(0xca)][_0x21fa54(0x9e)]||_0x526a65[_0x21fa54(0xca)][_0x21fa54(0x9e)][_0x21fa54(0xb6)]===0x1;}async['deleteComment'](_0x155fcd,_0x36d3c4,_0xfe86bc,_0x541000){const _0x364317=_0x346c01,_0x997a13={'memberId':(await this['_sessionService'][_0x364317(0xa9)](_0x155fcd))['getMemberID'](),'threadId':_0xfe86bc,'replyId':_0x541000,'unitId':_0x155fcd},_0x133ba9=await this['_httpService'][_0x364317(0x71)](_0x364317(0xbb)+_0x155fcd+'/delete',{'body':_0x997a13});return!_0x133ba9[_0x364317(0xca)][_0x364317(0x9e)]||_0x133ba9[_0x364317(0xca)]['error'][_0x364317(0xb6)]===0x1;}async['listComments'](_0x30e676,_0x53256c,_0x5eed7a){const _0x4ea13f=_0x346c01,_0x1c3059={'unitId':_0x30e676,'threadId':_0x5eed7a},_0x28d9ee=await this[_0x4ea13f(0xc5)][_0x4ea13f(0x71)](_0x4ea13f(0xbb)+_0x30e676+'/list',{'body':_0x1c3059}),_0x38196a=_0x5eed7a[_0x4ea13f(0xb8)](_0x1ec921=>ee(_0x28d9ee[_0x4ea13f(0xca)][_0x4ea13f(0xaa)][_0x1ec921],_0x30e676,_0x53256c))['filter'](Boolean);return Object[_0x4ea13f(0xa4)](_0x28d9ee['body'][_0x4ea13f(0x76)])[_0x4ea13f(0xb4)](_0x24bea4=>{const _0x4c8678=_0x4ea13f;this[_0x4c8678(0x75)][_0x4c8678(0xb9)](_0x24bea4);}),_0x38196a;}[_0x346c01(0x8a)](_0x4a6d54){const _0xad4055=_0x346c01;return{'id':_0x4a6d54['id'],'threadId':_0x4a6d54[_0xad4055(0x99)],'ref':_0x4a6d54[_0xad4055(0x73)]};}};S=Q([b(0x0,_0x11b788(_0x4aa355)),b(0x1,_0x11b788(_0x98ac35)),b(0x2,_0x11b788(_0x1a17a2))],S);var re=Object[_0x346c01(0x80)],te=(_0x52d795,_0x32ea0d,_0x31b957,_0x254cb3)=>{const _0x1295dc=_0x346c01;for(var _0x5eac4a=_0x254cb3>0x1?void 0x0:_0x254cb3?re(_0x32ea0d,_0x31b957):_0x32ea0d,_0x224a0f=_0x52d795[_0x1295dc(0xab)]-0x1,_0x3d983d;_0x224a0f>=0x0;_0x224a0f--)(_0x3d983d=_0x52d795[_0x224a0f])&&(_0x5eac4a=_0x3d983d(_0x5eac4a)||_0x5eac4a);return _0x5eac4a;},M=(_0x77704a,_0x51b57f)=>(_0x4f3cbb,_0xb3440c)=>_0x51b57f(_0x4f3cbb,_0xb3440c,_0x77704a);let f=class extends _0x3e2a71{constructor(_0x1f0973,_0x2b8468){const _0x2fb279=_0x346c01;super(),this[_0x2fb279(0x9a)]=_0x1f0973,this[_0x2fb279(0xb5)]=_0x2b8468,this['_initDataSource']();}[_0x346c01(0x8c)](){const _0x57fbac=_0x346c01;this[_0x57fbac(0x9a)]['dataSource']=this[_0x57fbac(0xb5)],this[_0x57fbac(0x9a)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x172d22),M(0x1,_0x11b788(S))],f);var se=Object[_0x346c01(0xbd)],oe=Object[_0x346c01(0x80)],ne=(_0x39e76f,_0x1d61dc,_0x454d31)=>_0x1d61dc in _0x39e76f?se(_0x39e76f,_0x1d61dc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x454d31}):_0x39e76f[_0x1d61dc]=_0x454d31,ie=(_0x12744d,_0x25a524,_0x311cb6,_0x5b0b45)=>{const _0x28507f=_0x346c01;for(var _0x3534f3=_0x5b0b45>0x1?void 0x0:_0x5b0b45?oe(_0x25a524,_0x311cb6):_0x25a524,_0x1d0e64=_0x12744d[_0x28507f(0xab)]-0x1,_0x2f034e;_0x1d0e64>=0x0;_0x1d0e64--)(_0x2f034e=_0x12744d[_0x1d0e64])&&(_0x3534f3=_0x2f034e(_0x3534f3)||_0x3534f3);return _0x3534f3;},N=(_0xc6180a,_0x48d421)=>(_0x2c4418,_0x35689c)=>_0x48d421(_0x2c4418,_0x35689c,_0xc6180a),$=(_0x4162fb,_0x1231c3,_0x402efb)=>ne(_0x4162fb,typeof _0x1231c3!='symbol'?_0x1231c3+'':_0x1231c3,_0x402efb);let g=class extends _0x2f68f0{constructor(_0x1fc071=O,_0x17f145,_0x1fc28a){const _0x4be81e=_0x346c01;super(),this['_config']=_0x1fc071,this[_0x4be81e(0x87)]=_0x17f145,this[_0x4be81e(0xb3)]=_0x1fc28a;const {..._0x419664}=_0x4f8531({},O,this['_config']);this['_configService'][_0x4be81e(0x74)](z,_0x419664);}[_0x346c01(0xc8)](){[[S],[f],[_]]['forEach'](_0x3626b1=>{const _0x2bff57=_0x20bd;this['_injector'][_0x2bff57(0x9d)](_0x3626b1);});}[_0x346c01(0xcc)](){const _0x2d0632=_0x346c01;this[_0x2d0632(0x87)][_0x2d0632(0x7b)](f),this[_0x2d0632(0x87)][_0x2d0632(0x7b)](_);}};$(g,_0x346c01(0x96),W),$(g,_0x346c01(0xd1),_0x39fdf4[_0x346c01(0xa0)]),g=ie([_0x2c6c28(_0x289211,_0xf6d2e9,_0x42d43b),N(0x1,_0x11b788(_0x48aa04)),N(0x2,_0x39fab1)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1b503f=_0x53d2;(function(_0x5ecad4,_0x1ce279){const _0x4e49bf=_0x53d2,_0x29d002=_0x5ecad4();while(!![]){try{const _0x37fd48=-parseInt(_0x4e49bf(0x23b))/0x1+parseInt(_0x4e49bf(0x21b))/0x2+parseInt(_0x4e49bf(0x1ee))/0x3+parseInt(_0x4e49bf(0x226))/0x4*(-parseInt(_0x4e49bf(0x206))/0x5)+-parseInt(_0x4e49bf(0x223))/0x6+parseInt(_0x4e49bf(0x22d))/0x7*(-parseInt(_0x4e49bf(0x1eb))/0x8)+-parseInt(_0x4e49bf(0x1f0))/0x9*(-parseInt(_0x4e49bf(0x228))/0xa);if(_0x37fd48===_0x1ce279)break;else _0x29d002['push'](_0x29d002['shift']());}catch(_0x36ac3f){_0x29d002['push'](_0x29d002['shift']());}}}(_0x5491,0x3fd84));import{CommentService as _0x177479,CollaborationSessionService as _0x5d29c3,UniverCollaborationClientPlugin as _0x4ac8a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x54b9da}from'@univerjs-pro/license';import{dayjs as _0x5b328b,UserManagerService as _0x27b619,Inject as _0xe56929,Injector as _0x323c4c,Disposable as _0x496c11,CustomRangeType as _0x1a50f9,UniverInstanceType as _0x4ce168,DependentOn as _0x422474,IConfigService as _0x3cb82c,Plugin as _0x55d139,merge as _0xd65155}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x181ffd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34daab,IThreadCommentDataSourceService as _0x51dd11}from'@univerjs/thread-comment';import{bufferTime as _0x487d8e}from'rxjs';function _0x5491(){const _0x3cc461=['solved','35NuGFLm','getComment','map','slice','_httpService','/add','userID','_userService','Unknown','_config','Add','_configService','values','stringify','516782dtHjKf','userId','Solve','_injector','dataSource','body','error','delete','rangeType','replyId','resolved','length','_commentService','_threadCommentModel','/edit','185608fqMmaa','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','119997Jlgsit','size','12303CqawDH','deleteComment','commentUpdate$','requireSession','disposeWithMe','UNRECOGNIZED','resolveComment','onReady','updateComment','type','get','Solved','_threadCommentDataSourceService','symbol','root','find','_initUserSync','OpenOrReOpen','getOwnPropertyDescriptor','syncUpdateMutationToColla','ref','/reply','2311115sPwUbB','_init','rangeId','comments','add','code','_initDataSource','forEach','threadId','content','thread-comment-data-source.config','getUser','setConfig','user','replies','comment','Edit','parentId','Reply','Delete','createTimestamp','919058sOfUAk','addComment','format','onStarting','post','addUser','reply','getMemberID','2182446wvnrOQ','_threadCommentDataSource','/universer-api/comment/unit/','4OqzOCN','_sessionService','8930viHjRA','customRanges','/solved','parse'];_0x5491=function(){return _0x3cc461;};return _0x5491();}import{HTTPService as _0x4b3a69}from'@univerjs/network';const W=_0x1b503f(0x1ed);var I=(_0xf2fff0=>(_0xf2fff0[_0xf2fff0[_0x1b503f(0x201)]=0x0]=_0x1b503f(0x201),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1fb)]=0x1]=_0x1b503f(0x1fb),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0xf2fff0))(I||{}),v=(_0x37b9a2=>(_0x37b9a2[_0x37b9a2[_0x1b503f(0x235)]=0x0]=_0x1b503f(0x235),_0x37b9a2[_0x37b9a2[_0x1b503f(0x237)]=0x1]=_0x1b503f(0x237),_0x37b9a2[_0x37b9a2[_0x1b503f(0x218)]=0x2]=_0x1b503f(0x218),_0x37b9a2[_0x37b9a2[_0x1b503f(0x216)]=0x3]=_0x1b503f(0x216),_0x37b9a2[_0x37b9a2[_0x1b503f(0x219)]=0x4]='Delete',_0x37b9a2[_0x37b9a2[_0x1b503f(0x23d)]=0x5]='Solve',_0x37b9a2[_0x37b9a2[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0x37b9a2))(v||{});const y=_0x1c2e89=>_0x5b328b(new Date(+_0x1c2e89))[_0x1b503f(0x21d)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xc81d1c,_0x561816)=>{const _0x3a5f86=_0x1b503f,_0x2a6bcb=_0xc81d1c['get'](_0x27b619),_0x36d59e=_0xc81d1c['get'](_0x4b3a69);_0x561816[_0x3a5f86(0x20d)](_0xb2e873=>{const _0x3a3acb=_0x3a5f86;_0x2a6bcb[_0x3a3acb(0x211)](_0xb2e873)&&_0x561816[_0x3a3acb(0x1e3)](_0xb2e873);}),_0x561816[_0x3a5f86(0x1ef)]&&(await _0x36d59e[_0x3a5f86(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x561816]}}))['body'][_0x3a5f86(0x1ec)][_0x3a5f86(0x20d)](_0x43e85f=>{const _0x415732=_0x3a5f86;_0x43e85f&&_0x2a6bcb[_0x415732(0x220)](_0x43e85f);});};var K=Object[_0x1b503f(0x202)],V=(_0x387c97,_0x5c32d4,_0x428338,_0x5f41b7)=>{for(var _0xf0b265=_0x5f41b7>0x1?void 0x0:_0x5f41b7?K(_0x5c32d4,_0x428338):_0x5c32d4,_0x1395d6=_0x387c97['length']-0x1,_0x1bb40a;_0x1395d6>=0x0;_0x1395d6--)(_0x1bb40a=_0x387c97[_0x1395d6])&&(_0xf0b265=_0x1bb40a(_0xf0b265)||_0xf0b265);return _0xf0b265;},p=(_0x2fc504,_0x5c1669)=>(_0x2e4e18,_0x5f1862)=>_0x5c1669(_0x2e4e18,_0x5f1862,_0x2fc504);let _=class extends _0x496c11{constructor(_0x14c945,_0x1836d1,_0x3ec5a8,_0x27aa08){const _0x4f27a5=_0x1b503f;super(),this[_0x4f27a5(0x1e8)]=_0x14c945,this[_0x4f27a5(0x1e9)]=_0x1836d1,this['_userService']=_0x3ec5a8,this[_0x4f27a5(0x23e)]=_0x27aa08,this[_0x4f27a5(0x207)](),this[_0x4f27a5(0x200)]();}['_initUserSync'](){const _0x4cb21d=_0x1b503f;this[_0x4cb21d(0x1f4)](this[_0x4cb21d(0x1e9)][_0x4cb21d(0x1f2)]['pipe'](_0x487d8e(0x10))['subscribe'](_0x33590f=>{const _0x3e36e9=_0x4cb21d,_0x5b166c=new Set();_0x33590f[_0x3e36e9(0x20d)](_0x37ba4c=>{const _0x1133f2=_0x3e36e9;switch(_0x37ba4c[_0x1133f2(0x1f9)]){case _0x1133f2(0x20a):{const _0x330e8d=_0x37ba4c['payload']['personId'];_0x5b166c[_0x1133f2(0x20a)](_0x330e8d);break;}}}),B(this['_injector'],_0x5b166c);}));}[_0x1b503f(0x207)](){const _0x20b5b2=_0x1b503f;this['disposeWithMe'](this[_0x20b5b2(0x1e8)][_0x20b5b2(0x1f2)]['subscribe'](async _0x16eda5=>{const _0x56ef1b=_0x20b5b2;var _0x458bf3,_0xd96ddd,_0x4f9b16,_0x3ed873;const _0xb15ac0=(_0x458bf3=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x2752bb=>_0x2752bb['threadId']===_0x16eda5['threadId']))==null?void 0x0:_0x458bf3['root'];if(!_0xb15ac0)return;const {unitId:_0x23a6ff,subUnitId:_0x153a0a}=_0xb15ac0;switch(_0x16eda5[_0x56ef1b(0x213)]&&this[_0x56ef1b(0x234)][_0x56ef1b(0x220)](_0x16eda5[_0x56ef1b(0x213)]),_0x16eda5[_0x56ef1b(0x1f9)]){case v[_0x56ef1b(0x237)]:break;case v[_0x56ef1b(0x218)]:{this['_threadCommentModel'][_0x56ef1b(0x21c)](_0x23a6ff,_0x153a0a,{'unitId':_0x23a6ff,'subUnitId':_0x153a0a,'ref':'','id':_0x16eda5[_0x56ef1b(0x1e5)],'dT':y(+_0x16eda5[_0x56ef1b(0x21a)]),'threadId':_0x16eda5[_0x56ef1b(0x20e)],'personId':(_0x4f9b16=(_0xd96ddd=_0x16eda5['user'])==null?void 0x0:_0xd96ddd[_0x56ef1b(0x233)])!=null?_0x4f9b16:_0x16eda5[_0x56ef1b(0x23c)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)]),'parentId':_0xb15ac0['id']});break;}case v[_0x56ef1b(0x219)]:{const _0x5eb921=this[_0x56ef1b(0x1e9)][_0x56ef1b(0x22e)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);_0x5eb921&&_0x5eb921[_0x56ef1b(0x217)]&&this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f1)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);break;}case v[_0x56ef1b(0x216)]:{this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f8)](_0x23a6ff,_0x153a0a,{'commentId':_0x16eda5[_0x56ef1b(0x1e5)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)])});break;}case v[_0x56ef1b(0x23d)]:{const _0x3a9c54=(_0x3ed873=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x55c33d=>_0x55c33d[_0x56ef1b(0x20e)]===_0x16eda5[_0x56ef1b(0x20e)]))==null?void 0x0:_0x3ed873[_0x56ef1b(0x1fe)];_0x3a9c54&&this['_threadCommentModel'][_0x56ef1b(0x1f6)](_0x23a6ff,_0x153a0a,_0x3a9c54['id'],_0x16eda5['solved']===I[_0x56ef1b(0x1fb)]);break;}}}));}};_=V([p(0x0,_0xe56929(_0x177479)),p(0x1,_0xe56929(_0x34daab)),p(0x2,_0xe56929(_0x27b619)),p(0x3,_0xe56929(_0x323c4c))],_);const z=_0x1b503f(0x210),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f24c0,_0xf3bd,_0x28f0f0,_0x2e75bb)=>{const _0xb8a12a=_0x1b503f;for(var _0x48e1eb=_0x2e75bb>0x1?void 0x0:_0x2e75bb?k(_0xf3bd,_0x28f0f0):_0xf3bd,_0x515e7d=_0x1f24c0[_0xb8a12a(0x1e7)]-0x1,_0x3ddbfb;_0x515e7d>=0x0;_0x515e7d--)(_0x3ddbfb=_0x1f24c0[_0x515e7d])&&(_0x48e1eb=_0x3ddbfb(_0x48e1eb)||_0x48e1eb);return _0x48e1eb;},b=(_0x342fff,_0x44dcd2)=>(_0xd804f3,_0x3c2e2b)=>_0x44dcd2(_0xd804f3,_0x3c2e2b,_0x342fff);function X(_0x480133,_0x29c503){const _0x525730=_0x1b503f,_0x5464c1=_0x480133[_0x525730(0x214)][0x0];return{..._0x29c503,'id':_0x5464c1['replyId'],'resolved':_0x480133[_0x525730(0x22c)]===0x1,'dT':y(_0x5464c1['createTimestamp']),'personId':_0x5464c1[_0x525730(0x23c)],'threadId':_0x5464c1[_0x525730(0x20e)]};}function ee(_0x409c40,_0x206ede,_0x172d6b){const _0x3ddf74=_0x1b503f;var _0x53b8bd,_0x5f5593;if(((_0x5f5593=(_0x53b8bd=_0x409c40==null?void 0x0:_0x409c40[_0x3ddf74(0x214)])==null?void 0x0:_0x53b8bd['length'])!=null?_0x5f5593:0x0)>0x0){const _0x18da36=(_0x12305d,_0x343833)=>({'id':_0x12305d['replyId'],'threadId':_0x12305d[_0x3ddf74(0x20e)],'dT':y(_0x12305d[_0x3ddf74(0x21a)]),'personId':_0x12305d[_0x3ddf74(0x23c)],'resolved':_0x409c40[_0x3ddf74(0x22c)]===I[_0x3ddf74(0x1fb)],'unitId':_0x206ede,'subUnitId':_0x172d6b,'text':JSON[_0x3ddf74(0x22b)](_0x12305d['content']),'parentId':_0x343833}),_0x16582e=_0x18da36(_0x409c40[_0x3ddf74(0x214)][0x0]);return{..._0x16582e,'children':_0x409c40['replies'][_0x3ddf74(0x230)](0x1)[_0x3ddf74(0x22f)](_0x498e08=>_0x18da36(_0x498e08,_0x16582e['id']))};}return null;}function _0x53d2(_0x2f8f1d,_0x3438e8){_0x2f8f1d=_0x2f8f1d-0x1e0;const _0x5491da=_0x5491();let _0x53d231=_0x5491da[_0x2f8f1d];return _0x53d231;}let S=class{constructor(_0x208ca2,_0xb7c40e,_0x2b4bcd){const _0x31a10c=_0x1b503f;this[_0x31a10c(0x231)]=_0x208ca2,this['_userService']=_0xb7c40e,this['_sessionService']=_0x2b4bcd;}async[_0x1b503f(0x21c)](_0x3a8e1e){const _0x387822=_0x1b503f;var _0x9a661d,_0x13e52b;const {parentId:_0x27a3df,unitId:_0x142237,text:_0xc8886c,threadId:_0x269136}=_0x3a8e1e,_0xd3b4d=(_0x13e52b=(_0x9a661d=_0xc8886c[_0x387822(0x229)])==null?void 0x0:_0x9a661d['filter'](_0x2f7eb3=>_0x2f7eb3[_0x387822(0x1e4)]===_0x1a50f9['COMMENT'])[_0x387822(0x22f)](_0x1c1b48=>_0x1c1b48[_0x387822(0x208)]))!=null?_0x13e52b:[],_0x49d2d5=JSON[_0x387822(0x23a)](_0xc8886c),_0x300ebf=(await this[_0x387822(0x227)][_0x387822(0x1f3)](_0x142237))[_0x387822(0x222)]();if(_0x27a3df){const _0x3167b1={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d,'threadId':_0x269136},_0x1b0851=(await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x205),{'body':_0x3167b1}))[_0x387822(0x1e1)][_0x387822(0x221)];return{..._0x3a8e1e,'id':_0x1b0851['replyId'],'dT':_0x5b328b(+_0x1b0851[_0x387822(0x21a)])[_0x387822(0x21d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b0851[_0x387822(0x23c)]};}else{const _0x35be21={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d},_0x15fbab=await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x232),{'body':_0x35be21});return X(_0x15fbab['body'][_0x387822(0x215)],_0x3a8e1e);}}async['updateComment'](_0x260b35){const _0x5bf4f1=_0x1b503f;var _0x48ba6d,_0x2c4f10;const {text:_0x3e7bb0,unitId:_0x247ca6}=_0x260b35,_0xa1342a=(_0x2c4f10=(_0x48ba6d=_0x3e7bb0[_0x5bf4f1(0x229)])==null?void 0x0:_0x48ba6d['filter'](_0x308644=>_0x308644['rangeType']===_0x1a50f9['COMMENT'])[_0x5bf4f1(0x22f)](_0x20dca1=>_0x20dca1[_0x5bf4f1(0x208)]))!=null?_0x2c4f10:[],_0x45370b=JSON[_0x5bf4f1(0x23a)](_0x3e7bb0),_0x4be793=_0x260b35[_0x5bf4f1(0x20e)],_0x2a397e=_0x260b35['id'],_0x146dfa={'memberId':(await this[_0x5bf4f1(0x227)][_0x5bf4f1(0x1f3)](_0x247ca6))[_0x5bf4f1(0x222)](),'unitId':_0x247ca6,'threadId':_0x4be793,'mention':_0xa1342a,'content':_0x45370b,'replyId':_0x2a397e},_0xc37f2c=await this['_httpService'][_0x5bf4f1(0x21f)](_0x5bf4f1(0x225)+_0x247ca6+_0x5bf4f1(0x1ea),{'body':_0x146dfa});return!_0xc37f2c[_0x5bf4f1(0x1e1)]['error']||_0xc37f2c[_0x5bf4f1(0x1e1)][_0x5bf4f1(0x1e2)][_0x5bf4f1(0x20b)]===0x1;}async[_0x1b503f(0x1f6)](_0x32dd47){const _0x2e6f93=_0x1b503f,{unitId:_0xe790bb}=_0x32dd47,_0x28583f=_0x32dd47['threadId'],_0x4a030b={'memberId':this[_0x2e6f93(0x234)]['getCurrentUser']()[_0x2e6f93(0x233)],'unitId':_0xe790bb,'threadId':_0x28583f,'solved':_0x32dd47[_0x2e6f93(0x1e6)]?I['Solved']:I[_0x2e6f93(0x201)]},_0x16ef5a=await this[_0x2e6f93(0x231)][_0x2e6f93(0x21f)](_0x2e6f93(0x225)+_0xe790bb+_0x2e6f93(0x22a),{'body':_0x4a030b});return!_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)]||_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)][_0x2e6f93(0x20b)]===0x1;}async[_0x1b503f(0x1f1)](_0x162970,_0x2917ac,_0x44e83f,_0x49a38c){const _0x18cacb=_0x1b503f,_0x277b2c={'memberId':(await this[_0x18cacb(0x227)]['requireSession'](_0x162970))[_0x18cacb(0x222)](),'threadId':_0x44e83f,'replyId':_0x49a38c,'unitId':_0x162970},_0x54a4a7=await this[_0x18cacb(0x231)][_0x18cacb(0x21f)](_0x18cacb(0x225)+_0x162970+'/delete',{'body':_0x277b2c});return!_0x54a4a7[_0x18cacb(0x1e1)][_0x18cacb(0x1e2)]||_0x54a4a7['body'][_0x18cacb(0x1e2)][_0x18cacb(0x20b)]===0x1;}async['listComments'](_0xc26da1,_0x353bf2,_0x1474c8){const _0x368d91=_0x1b503f,_0x508603={'unitId':_0xc26da1,'threadId':_0x1474c8},_0x2160e7=await this['_httpService'][_0x368d91(0x21f)](_0x368d91(0x225)+_0xc26da1+'/list',{'body':_0x508603}),_0x171654=_0x1474c8[_0x368d91(0x22f)](_0x5d3b17=>ee(_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x209)][_0x5d3b17],_0xc26da1,_0x353bf2))['filter'](Boolean);return Object[_0x368d91(0x239)](_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x1ec)])['forEach'](_0x26e897=>{const _0x55d431=_0x368d91;this['_userService'][_0x55d431(0x220)](_0x26e897);}),_0x171654;}['saveCommentToSnapshot'](_0x31fc68){const _0x323f5d=_0x1b503f;return{'id':_0x31fc68['id'],'threadId':_0x31fc68[_0x323f5d(0x20e)],'ref':_0x31fc68[_0x323f5d(0x204)]};}};S=Q([b(0x0,_0xe56929(_0x4b3a69)),b(0x1,_0xe56929(_0x27b619)),b(0x2,_0xe56929(_0x5d29c3))],S);var re=Object[_0x1b503f(0x202)],te=(_0x31308c,_0x519ab1,_0x1537c5,_0x488aae)=>{const _0x23851c=_0x1b503f;for(var _0x9a3f9e=_0x488aae>0x1?void 0x0:_0x488aae?re(_0x519ab1,_0x1537c5):_0x519ab1,_0x5022eb=_0x31308c[_0x23851c(0x1e7)]-0x1,_0x51df2c;_0x5022eb>=0x0;_0x5022eb--)(_0x51df2c=_0x31308c[_0x5022eb])&&(_0x9a3f9e=_0x51df2c(_0x9a3f9e)||_0x9a3f9e);return _0x9a3f9e;},M=(_0x47f1ee,_0x349640)=>(_0x4c5a6a,_0x287107)=>_0x349640(_0x4c5a6a,_0x287107,_0x47f1ee);let f=class extends _0x496c11{constructor(_0x1641f1,_0x3b57a5){const _0x57bb5d=_0x1b503f;super(),this[_0x57bb5d(0x1fc)]=_0x1641f1,this[_0x57bb5d(0x224)]=_0x3b57a5,this[_0x57bb5d(0x20c)]();}[_0x1b503f(0x20c)](){const _0x3ad9e5=_0x1b503f;this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x1e0)]=this[_0x3ad9e5(0x224)],this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x203)]=!0x1;}};f=te([M(0x0,_0x51dd11),M(0x1,_0xe56929(S))],f);var se=Object['defineProperty'],oe=Object[_0x1b503f(0x202)],ne=(_0x1d8a02,_0x18bf9c,_0x4def72)=>_0x18bf9c in _0x1d8a02?se(_0x1d8a02,_0x18bf9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4def72}):_0x1d8a02[_0x18bf9c]=_0x4def72,ie=(_0x5a19ac,_0x2db807,_0x5a85c7,_0x3253ec)=>{const _0x570c8=_0x1b503f;for(var _0x470026=_0x3253ec>0x1?void 0x0:_0x3253ec?oe(_0x2db807,_0x5a85c7):_0x2db807,_0x367189=_0x5a19ac[_0x570c8(0x1e7)]-0x1,_0x4e6bb1;_0x367189>=0x0;_0x367189--)(_0x4e6bb1=_0x5a19ac[_0x367189])&&(_0x470026=_0x4e6bb1(_0x470026)||_0x470026);return _0x470026;},N=(_0x5e90f2,_0x9bac7)=>(_0x5c2926,_0x28cdbd)=>_0x9bac7(_0x5c2926,_0x28cdbd,_0x5e90f2),$=(_0x3800b3,_0x502271,_0x56d1c4)=>ne(_0x3800b3,typeof _0x502271!=_0x1b503f(0x1fd)?_0x502271+'':_0x502271,_0x56d1c4);let g=class extends _0x55d139{constructor(_0x7eeebc=O,_0xf478b9,_0x2abb97){const _0x11c674=_0x1b503f;super(),this[_0x11c674(0x236)]=_0x7eeebc,this[_0x11c674(0x23e)]=_0xf478b9,this[_0x11c674(0x238)]=_0x2abb97;const {..._0x2a40dc}=_0xd65155({},O,this[_0x11c674(0x236)]);this[_0x11c674(0x238)][_0x11c674(0x212)](z,_0x2a40dc);}[_0x1b503f(0x21e)](){[[S],[f],[_]]['forEach'](_0x38d0ce=>{const _0x38b66d=_0x53d2;this[_0x38b66d(0x23e)][_0x38b66d(0x20a)](_0x38d0ce);});}[_0x1b503f(0x1f7)](){const _0x53289e=_0x1b503f;this[_0x53289e(0x23e)][_0x53289e(0x1fa)](f),this[_0x53289e(0x23e)][_0x53289e(0x1fa)](_);}};$(g,'pluginName',W),$(g,_0x1b503f(0x1f9),_0x4ce168['UNIVER_UNKNOWN']),g=ie([_0x422474(_0x181ffd,_0x4ac8a8,_0x54b9da),N(0x1,_0xe56929(_0x323c4c)),N(0x2,_0x3cb82c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x346c01=_0x20bd;(function(_0x5dc717,_0x5c4d83){const _0x5da85f=_0x20bd,_0x420ef4=_0x5dc717();while(!![]){try{const _0x3bfba5=-parseInt(_0x5da85f(0x8f))/0x1*(-parseInt(_0x5da85f(0xc9))/0x2)+-parseInt(_0x5da85f(0xa2))/0x3*(parseInt(_0x5da85f(0xbe))/0x4)+parseInt(_0x5da85f(0xb0))/0x5+parseInt(_0x5da85f(0xc1))/0x6*(parseInt(_0x5da85f(0x9f))/0x7)+parseInt(_0x5da85f(0x78))/0x8+parseInt(_0x5da85f(0x72))/0x9+-parseInt(_0x5da85f(0xaf))/0xa;if(_0x3bfba5===_0x5c4d83)break;else _0x420ef4['push'](_0x420ef4['shift']());}catch(_0x18f05c){_0x420ef4['push'](_0x420ef4['shift']());}}}(_0x2baf,0x7fe3f));import{CommentService as _0x2e07b6,CollaborationSessionService as _0x1a17a2,UniverCollaborationClientPlugin as _0xf6d2e9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42d43b}from'@univerjs-pro/license';function _0x2baf(){const _0x1a7801=['1718074lvTLBQ','body','userID','onReady','content','reply','delete','_initUserSync','type','replyId','updateComment','post','5532759enDFKt','ref','setConfig','_userService','users','_threadCommentModel','3322904nXkQHW','deleteComment','getCurrentUser','get','Solve','commentUpdate$','getComment','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','Unknown','/universer-api/user/list','createTimestamp','_init','stringify','_sessionService','_injector','root','unitId','saveCommentToSnapshot','customRanges','_initDataSource','subscribe','UNRECOGNIZED','1bUqMje','userId','/reply','getMemberID','/add','OpenOrReOpen','parse','pluginName','comment','Add','threadId','_threadCommentDataSourceService','_commentService','rangeType','add','error','16639VxrFQy','UNIVER_UNKNOWN','user','3yWUwUj','filter','values','find','/edit','payload','getUnit','requireSession','comments','length','Reply','Edit','disposeWithMe','11291220fAIXPl','1268465xcFOJD','rangeId','replies','_configService','forEach','_threadCommentDataSource','code','Delete','map','addUser','resolveComment','/universer-api/comment/unit/','slice','defineProperty','2092644lsBGaE','thread-comment-data-source.config','solved','84AcMiEJ','pipe','Solved','/solved','_httpService','COMMENT','format','onStarting'];_0x2baf=function(){return _0x1a7801;};return _0x2baf();}import{dayjs as _0x40a0bb,UserManagerService as _0x98ac35,Inject as _0x11b788,Injector as _0x48aa04,Disposable as _0x3e2a71,CustomRangeType as _0x3950fb,UniverInstanceType as _0x39fdf4,DependentOn as _0x2c6c28,IConfigService as _0x39fab1,Plugin as _0x2f68f0,merge as _0x4f8531}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x289211}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2d80a6,IThreadCommentDataSourceService as _0x172d22}from'@univerjs/thread-comment';import{bufferTime as _0x8b8400}from'rxjs';import{HTTPService as _0x4aa355}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x374a11=>(_0x374a11[_0x374a11[_0x346c01(0x94)]=0x0]=_0x346c01(0x94),_0x374a11[_0x374a11[_0x346c01(0xc3)]=0x1]=_0x346c01(0xc3),_0x374a11[_0x374a11[_0x346c01(0x8e)]=-0x1]=_0x346c01(0x8e),_0x374a11))(I||{}),v=(_0xb47590=>(_0xb47590[_0xb47590[_0x346c01(0x81)]=0x0]=_0x346c01(0x81),_0xb47590[_0xb47590['Add']=0x1]=_0x346c01(0x98),_0xb47590[_0xb47590[_0x346c01(0xac)]=0x2]='Reply',_0xb47590[_0xb47590['Edit']=0x3]=_0x346c01(0xad),_0xb47590[_0xb47590[_0x346c01(0xb7)]=0x4]=_0x346c01(0xb7),_0xb47590[_0xb47590[_0x346c01(0x7c)]=0x5]=_0x346c01(0x7c),_0xb47590[_0xb47590[_0x346c01(0x8e)]=-0x1]=_0x346c01(0x8e),_0xb47590))(v||{});const y=_0x337506=>_0x40a0bb(new Date(+_0x337506))[_0x346c01(0xc7)](_0x346c01(0x7f)),B=async(_0x18e88d,_0x2e2497)=>{const _0x2c68a9=_0x346c01,_0x5309f8=_0x18e88d[_0x2c68a9(0x7b)](_0x98ac35),_0x37d775=_0x18e88d[_0x2c68a9(0x7b)](_0x4aa355);_0x2e2497[_0x2c68a9(0xb4)](_0x3ac00e=>{const _0x456b97=_0x2c68a9;_0x5309f8['getUser'](_0x3ac00e)&&_0x2e2497[_0x456b97(0xcf)](_0x3ac00e);}),_0x2e2497['size']&&(await _0x37d775[_0x2c68a9(0x7b)](_0x2c68a9(0x82),{'params':{'userIDs':[..._0x2e2497]}}))[_0x2c68a9(0xca)]['users'][_0x2c68a9(0xb4)](_0x4295ae=>{const _0x329d85=_0x2c68a9;_0x4295ae&&_0x5309f8[_0x329d85(0xb9)](_0x4295ae);});};var K=Object[_0x346c01(0x80)],V=(_0x2f5395,_0x30d6b4,_0x1b22d5,_0x2fd57f)=>{for(var _0x4e9a43=_0x2fd57f>0x1?void 0x0:_0x2fd57f?K(_0x30d6b4,_0x1b22d5):_0x30d6b4,_0x782629=_0x2f5395['length']-0x1,_0x58477d;_0x782629>=0x0;_0x782629--)(_0x58477d=_0x2f5395[_0x782629])&&(_0x4e9a43=_0x58477d(_0x4e9a43)||_0x4e9a43);return _0x4e9a43;},p=(_0x194e23,_0x187248)=>(_0x3f2326,_0x4a0ed9)=>_0x187248(_0x3f2326,_0x4a0ed9,_0x194e23);let _=class extends _0x3e2a71{constructor(_0x5f57ed,_0x320383,_0x47bd0b,_0x26330c){const _0x383d88=_0x346c01;super(),this[_0x383d88(0x9b)]=_0x5f57ed,this['_threadCommentModel']=_0x320383,this['_userService']=_0x47bd0b,this[_0x383d88(0x87)]=_0x26330c,this['_init'](),this[_0x383d88(0xd0)]();}[_0x346c01(0xd0)](){const _0x266681=_0x346c01;this[_0x266681(0xae)](this[_0x266681(0x77)][_0x266681(0x7d)][_0x266681(0xc2)](_0x8b8400(0x10))[_0x266681(0x8d)](_0x3414a7=>{const _0x3c12bd=_0x266681,_0x4eeb2b=new Set();_0x3414a7[_0x3c12bd(0xb4)](_0x5e2a35=>{const _0x5bc542=_0x3c12bd;switch(_0x5e2a35[_0x5bc542(0xd1)]){case _0x5bc542(0x9d):{const _0xd52e42=_0x5e2a35[_0x5bc542(0xa7)]['personId'];_0x4eeb2b[_0x5bc542(0x9d)](_0xd52e42);break;}}}),B(this[_0x3c12bd(0x87)],_0x4eeb2b);}));}[_0x346c01(0x84)](){const _0x252611=_0x346c01;this[_0x252611(0xae)](this[_0x252611(0x9b)][_0x252611(0x7d)][_0x252611(0x8d)](async _0x490f74=>{const _0x4d9ea8=_0x252611;var _0x1e3c51,_0x31b780,_0x25a9b9,_0x24d614;const _0x235870=(_0x1e3c51=this['_threadCommentModel']['getUnit'](_0x490f74['unitId'])[_0x4d9ea8(0xa5)](_0x2430b3=>_0x2430b3['threadId']===_0x490f74[_0x4d9ea8(0x99)]))==null?void 0x0:_0x1e3c51['root'];if(!_0x235870)return;const {unitId:_0x384050,subUnitId:_0x52e0b0}=_0x235870;switch(_0x490f74[_0x4d9ea8(0xa1)]&&this[_0x4d9ea8(0x75)][_0x4d9ea8(0xb9)](_0x490f74[_0x4d9ea8(0xa1)]),_0x490f74['type']){case v[_0x4d9ea8(0x98)]:break;case v[_0x4d9ea8(0xac)]:{this[_0x4d9ea8(0x77)]['addComment'](_0x384050,_0x52e0b0,{'unitId':_0x384050,'subUnitId':_0x52e0b0,'ref':'','id':_0x490f74['replyId'],'dT':y(+_0x490f74[_0x4d9ea8(0x83)]),'threadId':_0x490f74['threadId'],'personId':(_0x25a9b9=(_0x31b780=_0x490f74['user'])==null?void 0x0:_0x31b780[_0x4d9ea8(0xcb)])!=null?_0x25a9b9:_0x490f74[_0x4d9ea8(0x90)],'text':JSON[_0x4d9ea8(0x95)](_0x490f74['content']),'parentId':_0x235870['id']});break;}case v['Delete']:{const _0x70f05a=this[_0x4d9ea8(0x77)][_0x4d9ea8(0x7e)](_0x384050,_0x52e0b0,_0x490f74[_0x4d9ea8(0xd2)]);_0x70f05a&&_0x70f05a['parentId']&&this['_threadCommentModel'][_0x4d9ea8(0x79)](_0x384050,_0x52e0b0,_0x490f74[_0x4d9ea8(0xd2)]);break;}case v['Edit']:{this[_0x4d9ea8(0x77)][_0x4d9ea8(0xd3)](_0x384050,_0x52e0b0,{'commentId':_0x490f74[_0x4d9ea8(0xd2)],'text':JSON['parse'](_0x490f74[_0x4d9ea8(0xcd)])});break;}case v['Solve']:{const _0x303013=(_0x24d614=this['_threadCommentModel'][_0x4d9ea8(0xa8)](_0x490f74[_0x4d9ea8(0x89)])[_0x4d9ea8(0xa5)](_0x49c758=>_0x49c758[_0x4d9ea8(0x99)]===_0x490f74['threadId']))==null?void 0x0:_0x24d614[_0x4d9ea8(0x88)];_0x303013&&this[_0x4d9ea8(0x77)]['resolveComment'](_0x384050,_0x52e0b0,_0x303013['id'],_0x490f74[_0x4d9ea8(0xc0)]===I[_0x4d9ea8(0xc3)]);break;}}}));}};function _0x20bd(_0x5a3802,_0x4edb0b){_0x5a3802=_0x5a3802-0x71;const _0x2baff6=_0x2baf();let _0x20bd65=_0x2baff6[_0x5a3802];return _0x20bd65;}_=V([p(0x0,_0x11b788(_0x2e07b6)),p(0x1,_0x11b788(_0x2d80a6)),p(0x2,_0x11b788(_0x98ac35)),p(0x3,_0x11b788(_0x48aa04))],_);const z=_0x346c01(0xbf),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5bbbac,_0x7febd7,_0x3ef3b2,_0x59447a)=>{const _0x4939da=_0x346c01;for(var _0x6d3d95=_0x59447a>0x1?void 0x0:_0x59447a?k(_0x7febd7,_0x3ef3b2):_0x7febd7,_0x3f9e19=_0x5bbbac[_0x4939da(0xab)]-0x1,_0x2fe5d0;_0x3f9e19>=0x0;_0x3f9e19--)(_0x2fe5d0=_0x5bbbac[_0x3f9e19])&&(_0x6d3d95=_0x2fe5d0(_0x6d3d95)||_0x6d3d95);return _0x6d3d95;},b=(_0x4d9e10,_0x3a2c3f)=>(_0x240b1c,_0x4d0792)=>_0x3a2c3f(_0x240b1c,_0x4d0792,_0x4d9e10);function X(_0x47ea2c,_0x48bbc9){const _0x2ff5d4=_0x346c01,_0x435354=_0x47ea2c[_0x2ff5d4(0xb2)][0x0];return{..._0x48bbc9,'id':_0x435354['replyId'],'resolved':_0x47ea2c[_0x2ff5d4(0xc0)]===0x1,'dT':y(_0x435354['createTimestamp']),'personId':_0x435354[_0x2ff5d4(0x90)],'threadId':_0x435354[_0x2ff5d4(0x99)]};}function ee(_0x2c2e50,_0x550a55,_0x551cdd){const _0x1d7290=_0x346c01;var _0x268b87,_0x25c576;if(((_0x25c576=(_0x268b87=_0x2c2e50==null?void 0x0:_0x2c2e50['replies'])==null?void 0x0:_0x268b87[_0x1d7290(0xab)])!=null?_0x25c576:0x0)>0x0){const _0x470e1b=(_0x5b6c62,_0x47b96f)=>({'id':_0x5b6c62[_0x1d7290(0xd2)],'threadId':_0x5b6c62[_0x1d7290(0x99)],'dT':y(_0x5b6c62['createTimestamp']),'personId':_0x5b6c62[_0x1d7290(0x90)],'resolved':_0x2c2e50[_0x1d7290(0xc0)]===I[_0x1d7290(0xc3)],'unitId':_0x550a55,'subUnitId':_0x551cdd,'text':JSON[_0x1d7290(0x95)](_0x5b6c62['content']),'parentId':_0x47b96f}),_0x23e531=_0x470e1b(_0x2c2e50[_0x1d7290(0xb2)][0x0]);return{..._0x23e531,'children':_0x2c2e50[_0x1d7290(0xb2)][_0x1d7290(0xbc)](0x1)[_0x1d7290(0xb8)](_0x1ecfd=>_0x470e1b(_0x1ecfd,_0x23e531['id']))};}return null;}let S=class{constructor(_0x361dd6,_0x5e1ce7,_0x3e0a67){const _0x1d4f69=_0x346c01;this[_0x1d4f69(0xc5)]=_0x361dd6,this[_0x1d4f69(0x75)]=_0x5e1ce7,this['_sessionService']=_0x3e0a67;}async['addComment'](_0x5328fd){const _0x36201f=_0x346c01;var _0xe1e5b8,_0xe288b;const {parentId:_0x4ebf2d,unitId:_0x25f1bc,text:_0x34563f,threadId:_0x1e4a86}=_0x5328fd,_0x18f2af=(_0xe288b=(_0xe1e5b8=_0x34563f[_0x36201f(0x8b)])==null?void 0x0:_0xe1e5b8[_0x36201f(0xa3)](_0x44046c=>_0x44046c[_0x36201f(0x9c)]===_0x3950fb['COMMENT'])[_0x36201f(0xb8)](_0x1105b8=>_0x1105b8[_0x36201f(0xb1)]))!=null?_0xe288b:[],_0x257409=JSON[_0x36201f(0x85)](_0x34563f),_0x50be42=(await this[_0x36201f(0x86)][_0x36201f(0xa9)](_0x25f1bc))[_0x36201f(0x92)]();if(_0x4ebf2d){const _0x66eb79={'memberId':_0x50be42,'unitId':_0x25f1bc,'content':_0x257409,'mention':_0x18f2af,'threadId':_0x1e4a86},_0x2aeeec=(await this[_0x36201f(0xc5)][_0x36201f(0x71)](_0x36201f(0xbb)+_0x25f1bc+_0x36201f(0x91),{'body':_0x66eb79}))[_0x36201f(0xca)][_0x36201f(0xce)];return{..._0x5328fd,'id':_0x2aeeec['replyId'],'dT':_0x40a0bb(+_0x2aeeec[_0x36201f(0x83)])[_0x36201f(0xc7)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2aeeec[_0x36201f(0x90)]};}else{const _0x416d0a={'memberId':_0x50be42,'unitId':_0x25f1bc,'content':_0x257409,'mention':_0x18f2af},_0x543479=await this[_0x36201f(0xc5)][_0x36201f(0x71)](_0x36201f(0xbb)+_0x25f1bc+_0x36201f(0x93),{'body':_0x416d0a});return X(_0x543479[_0x36201f(0xca)][_0x36201f(0x97)],_0x5328fd);}}async[_0x346c01(0xd3)](_0x33fa54){const _0x1c6eb3=_0x346c01;var _0x2e712d,_0x368d98;const {text:_0xe54e6b,unitId:_0x16354b}=_0x33fa54,_0x5edfa1=(_0x368d98=(_0x2e712d=_0xe54e6b[_0x1c6eb3(0x8b)])==null?void 0x0:_0x2e712d[_0x1c6eb3(0xa3)](_0x595b7e=>_0x595b7e['rangeType']===_0x3950fb[_0x1c6eb3(0xc6)])['map'](_0x5a7c7a=>_0x5a7c7a[_0x1c6eb3(0xb1)]))!=null?_0x368d98:[],_0x530eff=JSON[_0x1c6eb3(0x85)](_0xe54e6b),_0x4558be=_0x33fa54['threadId'],_0x23ebb9=_0x33fa54['id'],_0x1236bd={'memberId':(await this[_0x1c6eb3(0x86)]['requireSession'](_0x16354b))['getMemberID'](),'unitId':_0x16354b,'threadId':_0x4558be,'mention':_0x5edfa1,'content':_0x530eff,'replyId':_0x23ebb9},_0x586242=await this[_0x1c6eb3(0xc5)][_0x1c6eb3(0x71)](_0x1c6eb3(0xbb)+_0x16354b+_0x1c6eb3(0xa6),{'body':_0x1236bd});return!_0x586242[_0x1c6eb3(0xca)][_0x1c6eb3(0x9e)]||_0x586242[_0x1c6eb3(0xca)]['error'][_0x1c6eb3(0xb6)]===0x1;}async[_0x346c01(0xba)](_0x42d17a){const _0x21fa54=_0x346c01,{unitId:_0x40f4ef}=_0x42d17a,_0x17cd03=_0x42d17a[_0x21fa54(0x99)],_0x5d00c5={'memberId':this[_0x21fa54(0x75)][_0x21fa54(0x7a)]()[_0x21fa54(0xcb)],'unitId':_0x40f4ef,'threadId':_0x17cd03,'solved':_0x42d17a['resolved']?I['Solved']:I[_0x21fa54(0x94)]},_0x526a65=await this[_0x21fa54(0xc5)][_0x21fa54(0x71)](_0x21fa54(0xbb)+_0x40f4ef+_0x21fa54(0xc4),{'body':_0x5d00c5});return!_0x526a65[_0x21fa54(0xca)][_0x21fa54(0x9e)]||_0x526a65[_0x21fa54(0xca)][_0x21fa54(0x9e)][_0x21fa54(0xb6)]===0x1;}async['deleteComment'](_0x155fcd,_0x36d3c4,_0xfe86bc,_0x541000){const _0x364317=_0x346c01,_0x997a13={'memberId':(await this['_sessionService'][_0x364317(0xa9)](_0x155fcd))['getMemberID'](),'threadId':_0xfe86bc,'replyId':_0x541000,'unitId':_0x155fcd},_0x133ba9=await this['_httpService'][_0x364317(0x71)](_0x364317(0xbb)+_0x155fcd+'/delete',{'body':_0x997a13});return!_0x133ba9[_0x364317(0xca)][_0x364317(0x9e)]||_0x133ba9[_0x364317(0xca)]['error'][_0x364317(0xb6)]===0x1;}async['listComments'](_0x30e676,_0x53256c,_0x5eed7a){const _0x4ea13f=_0x346c01,_0x1c3059={'unitId':_0x30e676,'threadId':_0x5eed7a},_0x28d9ee=await this[_0x4ea13f(0xc5)][_0x4ea13f(0x71)](_0x4ea13f(0xbb)+_0x30e676+'/list',{'body':_0x1c3059}),_0x38196a=_0x5eed7a[_0x4ea13f(0xb8)](_0x1ec921=>ee(_0x28d9ee[_0x4ea13f(0xca)][_0x4ea13f(0xaa)][_0x1ec921],_0x30e676,_0x53256c))['filter'](Boolean);return Object[_0x4ea13f(0xa4)](_0x28d9ee['body'][_0x4ea13f(0x76)])[_0x4ea13f(0xb4)](_0x24bea4=>{const _0x4c8678=_0x4ea13f;this[_0x4c8678(0x75)][_0x4c8678(0xb9)](_0x24bea4);}),_0x38196a;}[_0x346c01(0x8a)](_0x4a6d54){const _0xad4055=_0x346c01;return{'id':_0x4a6d54['id'],'threadId':_0x4a6d54[_0xad4055(0x99)],'ref':_0x4a6d54[_0xad4055(0x73)]};}};S=Q([b(0x0,_0x11b788(_0x4aa355)),b(0x1,_0x11b788(_0x98ac35)),b(0x2,_0x11b788(_0x1a17a2))],S);var re=Object[_0x346c01(0x80)],te=(_0x52d795,_0x32ea0d,_0x31b957,_0x254cb3)=>{const _0x1295dc=_0x346c01;for(var _0x5eac4a=_0x254cb3>0x1?void 0x0:_0x254cb3?re(_0x32ea0d,_0x31b957):_0x32ea0d,_0x224a0f=_0x52d795[_0x1295dc(0xab)]-0x1,_0x3d983d;_0x224a0f>=0x0;_0x224a0f--)(_0x3d983d=_0x52d795[_0x224a0f])&&(_0x5eac4a=_0x3d983d(_0x5eac4a)||_0x5eac4a);return _0x5eac4a;},M=(_0x77704a,_0x51b57f)=>(_0x4f3cbb,_0xb3440c)=>_0x51b57f(_0x4f3cbb,_0xb3440c,_0x77704a);let f=class extends _0x3e2a71{constructor(_0x1f0973,_0x2b8468){const _0x2fb279=_0x346c01;super(),this[_0x2fb279(0x9a)]=_0x1f0973,this[_0x2fb279(0xb5)]=_0x2b8468,this['_initDataSource']();}[_0x346c01(0x8c)](){const _0x57fbac=_0x346c01;this[_0x57fbac(0x9a)]['dataSource']=this[_0x57fbac(0xb5)],this[_0x57fbac(0x9a)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x172d22),M(0x1,_0x11b788(S))],f);var se=Object[_0x346c01(0xbd)],oe=Object[_0x346c01(0x80)],ne=(_0x39e76f,_0x1d61dc,_0x454d31)=>_0x1d61dc in _0x39e76f?se(_0x39e76f,_0x1d61dc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x454d31}):_0x39e76f[_0x1d61dc]=_0x454d31,ie=(_0x12744d,_0x25a524,_0x311cb6,_0x5b0b45)=>{const _0x28507f=_0x346c01;for(var _0x3534f3=_0x5b0b45>0x1?void 0x0:_0x5b0b45?oe(_0x25a524,_0x311cb6):_0x25a524,_0x1d0e64=_0x12744d[_0x28507f(0xab)]-0x1,_0x2f034e;_0x1d0e64>=0x0;_0x1d0e64--)(_0x2f034e=_0x12744d[_0x1d0e64])&&(_0x3534f3=_0x2f034e(_0x3534f3)||_0x3534f3);return _0x3534f3;},N=(_0xc6180a,_0x48d421)=>(_0x2c4418,_0x35689c)=>_0x48d421(_0x2c4418,_0x35689c,_0xc6180a),$=(_0x4162fb,_0x1231c3,_0x402efb)=>ne(_0x4162fb,typeof _0x1231c3!='symbol'?_0x1231c3+'':_0x1231c3,_0x402efb);let g=class extends _0x2f68f0{constructor(_0x1fc071=O,_0x17f145,_0x1fc28a){const _0x4be81e=_0x346c01;super(),this['_config']=_0x1fc071,this[_0x4be81e(0x87)]=_0x17f145,this[_0x4be81e(0xb3)]=_0x1fc28a;const {..._0x419664}=_0x4f8531({},O,this['_config']);this['_configService'][_0x4be81e(0x74)](z,_0x419664);}[_0x346c01(0xc8)](){[[S],[f],[_]]['forEach'](_0x3626b1=>{const _0x2bff57=_0x20bd;this['_injector'][_0x2bff57(0x9d)](_0x3626b1);});}[_0x346c01(0xcc)](){const _0x2d0632=_0x346c01;this[_0x2d0632(0x87)][_0x2d0632(0x7b)](f),this[_0x2d0632(0x87)][_0x2d0632(0x7b)](_);}};$(g,_0x346c01(0x96),W),$(g,_0x346c01(0xd1),_0x39fdf4[_0x346c01(0xa0)]),g=ie([_0x2c6c28(_0x289211,_0xf6d2e9,_0x42d43b),N(0x1,_0x11b788(_0x48aa04)),N(0x2,_0x39fab1)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x34d6(){const _0x1a1aaa=['rangeId','format','104855noEPLY','parentId','resolveComment','_threadCommentDataSource','getComment','replyId','getMemberID','UniverCollaborationClientPlugin','root','UniverThreadCommentUi','reply','UniverProThreadCommentDatasource','thread-comment-data-source.config','userID','stringify','body','CollaborationSessionService','find','@univerjs/network','_threadCommentModel','Solved','toStringTag','/delete','getOwnPropertyDescriptor','IConfigService','users','userId','_injector','Disposable','365853dyCtWG','onReady','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','error','HTTPService','commentUpdate$','96088UDjIVE','@univerjs-pro/collaboration-client','_userService','ThreadCommentModel','dayjs','rxjs','syncUpdateMutationToColla','153bSQpoB','UniverThreadCommentUIPlugin','UniverLicensePlugin','UniverProLicense','71320ZjrQVA','amd','subscribe','delete','@univerjs/core','_initUserSync','@univerjs/thread-comment-ui','content','3404688MRzOdT','COMMENT','user','function','CustomRangeType','rangeType','_threadCommentDataSourceService','addUser','disposeWithMe','Unknown','5bwmlnl','Add','unitId','getCurrentUser','customRanges','Reply','updateComment','_initDataSource','exports','type','personId','Inject','length','deleteComment','get','getUser','pluginName','UniverThreadComment','OpenOrReOpen','map','DependentOn','_commentService','onStarting','_init','ref','UniverInstanceType','add','size','_configService','UNRECOGNIZED','object','addComment','UserManagerService','dataSource','/list','pipe','1190812zcPYBh','getUnit','saveCommentToSnapshot','forEach','createTimestamp','UniverNetwork','2595420aTxPtt','Delete','UniverCore','YYYY/MM/DD\x20HH:mm','parse','10JhHBTt','symbol','/universer-api/comment/unit/','post','replies','filter','/universer-api/user/list','defineProperty','_config','_httpService','solved','/add','_sessionService','@univerjs-pro/license','2354NyFUrL','Injector','Solve','code','/reply','@univerjs/thread-comment','threadId','Edit','setConfig'];_0x34d6=function(){return _0x1a1aaa;};return _0x34d6();}function _0x43bd(_0x3fc643,_0x5192b9){_0x3fc643=_0x3fc643-0xb5;const _0x34d6f7=_0x34d6();let _0x43bdbb=_0x34d6f7[_0x3fc643];return _0x43bdbb;}(function(_0x1a4e67,_0x501141){const _0x7f0ca1=_0x43bd,_0x5286bd=_0x1a4e67();while(!![]){try{const _0x155c4c=parseInt(_0x7f0ca1(0xf0))/0x1+parseInt(_0x7f0ca1(0xd7))/0x2*(parseInt(_0x7f0ca1(0x10d))/0x3)+parseInt(_0x7f0ca1(0xd2))/0x4+-parseInt(_0x7f0ca1(0x132))/0x5*(-parseInt(_0x7f0ca1(0x128))/0x6)+parseInt(_0x7f0ca1(0xcc))/0x7+parseInt(_0x7f0ca1(0x115))/0x8*(-parseInt(_0x7f0ca1(0x11c))/0x9)+-parseInt(_0x7f0ca1(0x120))/0xa*(parseInt(_0x7f0ca1(0xe5))/0xb);if(_0x155c4c===_0x501141)break;else _0x5286bd['push'](_0x5286bd['shift']());}catch(_0x361105){_0x5286bd['push'](_0x5286bd['shift']());}}}(_0x34d6,0x5a7a2),function(_0x21ab4c,_0x9b5cfb){const _0x185dc1=_0x43bd;typeof exports==_0x185dc1(0xc6)&&typeof module<'u'?_0x9b5cfb(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x185dc1(0x12b)&&define[_0x185dc1(0x121)]?define([_0x185dc1(0x13a),_0x185dc1(0x116),_0x185dc1(0xe4),_0x185dc1(0x124),_0x185dc1(0x126),_0x185dc1(0xea),_0x185dc1(0x11a),_0x185dc1(0x102)],_0x9b5cfb):(_0x21ab4c=typeof globalThis<'u'?globalThis:_0x21ab4c||self,_0x9b5cfb(_0x21ab4c[_0x185dc1(0xfb)]={},_0x21ab4c['UniverProCollaborationClient'],_0x21ab4c[_0x185dc1(0x11f)],_0x21ab4c[_0x185dc1(0xd4)],_0x21ab4c[_0x185dc1(0xf9)],_0x21ab4c[_0x185dc1(0xb9)],_0x21ab4c[_0x185dc1(0x11a)],_0x21ab4c[_0x185dc1(0xd1)]));}(this,function(_0x1cca1d,_0x4804be,_0x2bd3ee,_0x5c8b03,_0xb3c150,_0x332e6a,_0x2f63cc,_0x3ebd5e){'use strict';const _0x39b98c=_0x43bd;const _0x4b3b10=_0x39b98c(0x110);var _0x586a83=(_0x590c4b=>(_0x590c4b[_0x590c4b[_0x39b98c(0xba)]=0x0]=_0x39b98c(0xba),_0x590c4b[_0x590c4b[_0x39b98c(0x104)]=0x1]=_0x39b98c(0x104),_0x590c4b[_0x590c4b[_0x39b98c(0xc5)]=-0x1]=_0x39b98c(0xc5),_0x590c4b))(_0x586a83||{}),_0x1cb75e=(_0x5a29e1=>(_0x5a29e1[_0x5a29e1[_0x39b98c(0x131)]=0x0]='Unknown',_0x5a29e1[_0x5a29e1[_0x39b98c(0x133)]=0x1]='Add',_0x5a29e1[_0x5a29e1['Reply']=0x2]=_0x39b98c(0x137),_0x5a29e1[_0x5a29e1['Edit']=0x3]=_0x39b98c(0xec),_0x5a29e1[_0x5a29e1[_0x39b98c(0xd3)]=0x4]='Delete',_0x5a29e1[_0x5a29e1['Solve']=0x5]='Solve',_0x5a29e1[_0x5a29e1[_0x39b98c(0xc5)]=-0x1]='UNRECOGNIZED',_0x5a29e1))(_0x1cb75e||{});const _0x16c55a=_0x472564=>_0x5c8b03[_0x39b98c(0x119)](new Date(+_0x472564))[_0x39b98c(0xef)](_0x39b98c(0xd5)),_0x38a654=async(_0x13c5f2,_0x1ce11e)=>{const _0x5589b0=_0x39b98c,_0x4c626a=_0x13c5f2[_0x5589b0(0xb6)](_0x5c8b03[_0x5589b0(0xc8)]),_0x17b905=_0x13c5f2[_0x5589b0(0xb6)](_0x3ebd5e[_0x5589b0(0x113)]);_0x1ce11e[_0x5589b0(0xcf)](_0x2b7685=>{const _0x2a3947=_0x5589b0;_0x4c626a[_0x2a3947(0xb7)](_0x2b7685)&&_0x1ce11e[_0x2a3947(0x123)](_0x2b7685);}),_0x1ce11e[_0x5589b0(0xc3)]&&(await _0x17b905['get'](_0x5589b0(0xdd),{'params':{'userIDs':[..._0x1ce11e]}}))[_0x5589b0(0xff)][_0x5589b0(0x109)][_0x5589b0(0xcf)](_0x513687=>{const _0x42fcba=_0x5589b0;_0x513687&&_0x4c626a[_0x42fcba(0x12f)](_0x513687);});};var _0x4b12cb=Object['getOwnPropertyDescriptor'],_0x52e908=(_0x950eeb,_0x3dee68,_0x58f39a,_0x2e5b1c)=>{const _0x4cbccf=_0x39b98c;for(var _0x49bb23=_0x2e5b1c>0x1?void 0x0:_0x2e5b1c?_0x4b12cb(_0x3dee68,_0x58f39a):_0x3dee68,_0x30bd03=_0x950eeb[_0x4cbccf(0x13e)]-0x1,_0x129fa2;_0x30bd03>=0x0;_0x30bd03--)(_0x129fa2=_0x950eeb[_0x30bd03])&&(_0x49bb23=_0x129fa2(_0x49bb23)||_0x49bb23);return _0x49bb23;},_0x37510e=(_0xf7881e,_0x5d8825)=>(_0x3bc284,_0x1e6aca)=>_0x5d8825(_0x3bc284,_0x1e6aca,_0xf7881e);let _0x1c1924=class extends _0x5c8b03[_0x39b98c(0x10c)]{constructor(_0x4f8eed,_0xdf87bd,_0x3b2635,_0x2af54e){const _0x4ac3d0=_0x39b98c;super(),this['_commentService']=_0x4f8eed,this[_0x4ac3d0(0x103)]=_0xdf87bd,this['_userService']=_0x3b2635,this[_0x4ac3d0(0x10b)]=_0x2af54e,this[_0x4ac3d0(0xbf)](),this[_0x4ac3d0(0x125)]();}[_0x39b98c(0x125)](){const _0x571ad4=_0x39b98c;this[_0x571ad4(0x130)](this[_0x571ad4(0x103)][_0x571ad4(0x114)][_0x571ad4(0xcb)](_0x2f63cc['bufferTime'](0x10))[_0x571ad4(0x122)](_0x352044=>{const _0x16e39c=_0x571ad4,_0x428df9=new Set();_0x352044[_0x16e39c(0xcf)](_0x32abc9=>{const _0x904dac=_0x16e39c;switch(_0x32abc9[_0x904dac(0x13b)]){case'add':{const _0x128376=_0x32abc9['payload'][_0x904dac(0x13c)];_0x428df9[_0x904dac(0xc2)](_0x128376);break;}}}),_0x38a654(this[_0x16e39c(0x10b)],_0x428df9);}));}['_init'](){const _0x314883=_0x39b98c;this[_0x314883(0x130)](this[_0x314883(0xbd)][_0x314883(0x114)][_0x314883(0x122)](async _0x2f9015=>{const _0x49e2af=_0x314883;var _0x2101ea,_0xe50909,_0x338463,_0x11930b;const _0x39da5f=(_0x2101ea=this[_0x49e2af(0x103)][_0x49e2af(0xcd)](_0x2f9015[_0x49e2af(0x134)])[_0x49e2af(0x101)](_0x18bc57=>_0x18bc57[_0x49e2af(0xeb)]===_0x2f9015['threadId']))==null?void 0x0:_0x2101ea[_0x49e2af(0xf8)];if(!_0x39da5f)return;const {unitId:_0x2cdb83,subUnitId:_0x502351}=_0x39da5f;switch(_0x2f9015[_0x49e2af(0x12a)]&&this[_0x49e2af(0x117)]['addUser'](_0x2f9015[_0x49e2af(0x12a)]),_0x2f9015['type']){case _0x1cb75e[_0x49e2af(0x133)]:break;case _0x1cb75e['Reply']:{this['_threadCommentModel']['addComment'](_0x2cdb83,_0x502351,{'unitId':_0x2cdb83,'subUnitId':_0x502351,'ref':'','id':_0x2f9015[_0x49e2af(0xf5)],'dT':_0x16c55a(+_0x2f9015[_0x49e2af(0xd0)]),'threadId':_0x2f9015['threadId'],'personId':(_0x338463=(_0xe50909=_0x2f9015[_0x49e2af(0x12a)])==null?void 0x0:_0xe50909[_0x49e2af(0xfd)])!=null?_0x338463:_0x2f9015[_0x49e2af(0x10a)],'text':JSON[_0x49e2af(0xd6)](_0x2f9015[_0x49e2af(0x127)]),'parentId':_0x39da5f['id']});break;}case _0x1cb75e[_0x49e2af(0xd3)]:{const _0x539cd6=this[_0x49e2af(0x103)][_0x49e2af(0xf4)](_0x2cdb83,_0x502351,_0x2f9015[_0x49e2af(0xf5)]);_0x539cd6&&_0x539cd6[_0x49e2af(0xf1)]&&this[_0x49e2af(0x103)][_0x49e2af(0xb5)](_0x2cdb83,_0x502351,_0x2f9015[_0x49e2af(0xf5)]);break;}case _0x1cb75e['Edit']:{this[_0x49e2af(0x103)][_0x49e2af(0x138)](_0x2cdb83,_0x502351,{'commentId':_0x2f9015['replyId'],'text':JSON[_0x49e2af(0xd6)](_0x2f9015[_0x49e2af(0x127)])});break;}case _0x1cb75e[_0x49e2af(0xe7)]:{const _0x119090=(_0x11930b=this[_0x49e2af(0x103)]['getUnit'](_0x2f9015[_0x49e2af(0x134)])[_0x49e2af(0x101)](_0x4d8be0=>_0x4d8be0[_0x49e2af(0xeb)]===_0x2f9015[_0x49e2af(0xeb)]))==null?void 0x0:_0x11930b[_0x49e2af(0xf8)];_0x119090&&this[_0x49e2af(0x103)][_0x49e2af(0xf2)](_0x2cdb83,_0x502351,_0x119090['id'],_0x2f9015['solved']===_0x586a83['Solved']);break;}}}));}};_0x1c1924=_0x52e908([_0x37510e(0x0,_0x5c8b03[_0x39b98c(0x13d)](_0x4804be['CommentService'])),_0x37510e(0x1,_0x5c8b03['Inject'](_0x332e6a[_0x39b98c(0x118)])),_0x37510e(0x2,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03['UserManagerService'])),_0x37510e(0x3,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03[_0x39b98c(0xe6)]))],_0x1c1924);const _0x59b6ad=_0x39b98c(0xfc),_0xde8992={};var _0x20bc11=Object['getOwnPropertyDescriptor'],_0x3f4890=(_0x22a039,_0x459692,_0x2e0617,_0x3c6feb)=>{const _0x51c63a=_0x39b98c;for(var _0x6f956b=_0x3c6feb>0x1?void 0x0:_0x3c6feb?_0x20bc11(_0x459692,_0x2e0617):_0x459692,_0x488ad8=_0x22a039[_0x51c63a(0x13e)]-0x1,_0x38cd44;_0x488ad8>=0x0;_0x488ad8--)(_0x38cd44=_0x22a039[_0x488ad8])&&(_0x6f956b=_0x38cd44(_0x6f956b)||_0x6f956b);return _0x6f956b;},_0x1ae8bc=(_0x3e93d8,_0x50e3c7)=>(_0x465d16,_0x4a4d2c)=>_0x50e3c7(_0x465d16,_0x4a4d2c,_0x3e93d8);function _0x43c20a(_0x430fcf,_0x5d64e6){const _0x213364=_0x39b98c,_0x11a6a9=_0x430fcf[_0x213364(0xdb)][0x0];return{..._0x5d64e6,'id':_0x11a6a9['replyId'],'resolved':_0x430fcf[_0x213364(0xe1)]===0x1,'dT':_0x16c55a(_0x11a6a9[_0x213364(0xd0)]),'personId':_0x11a6a9[_0x213364(0x10a)],'threadId':_0x11a6a9['threadId']};}function _0x1043ed(_0x12f6bb,_0x3a2181,_0x10280c){const _0x1eee2d=_0x39b98c;var _0x1e83e8,_0x3b12ff;if(((_0x3b12ff=(_0x1e83e8=_0x12f6bb==null?void 0x0:_0x12f6bb[_0x1eee2d(0xdb)])==null?void 0x0:_0x1e83e8[_0x1eee2d(0x13e)])!=null?_0x3b12ff:0x0)>0x0){const _0x3e735=(_0x5392ab,_0x1b4a34)=>({'id':_0x5392ab[_0x1eee2d(0xf5)],'threadId':_0x5392ab[_0x1eee2d(0xeb)],'dT':_0x16c55a(_0x5392ab[_0x1eee2d(0xd0)]),'personId':_0x5392ab[_0x1eee2d(0x10a)],'resolved':_0x12f6bb[_0x1eee2d(0xe1)]===_0x586a83[_0x1eee2d(0x104)],'unitId':_0x3a2181,'subUnitId':_0x10280c,'text':JSON[_0x1eee2d(0xd6)](_0x5392ab['content']),'parentId':_0x1b4a34}),_0x3ea749=_0x3e735(_0x12f6bb['replies'][0x0]);return{..._0x3ea749,'children':_0x12f6bb['replies']['slice'](0x1)['map'](_0x344124=>_0x3e735(_0x344124,_0x3ea749['id']))};}return null;}let _0x4468b7=class{constructor(_0x4a2626,_0x2296de,_0x501509){const _0x4f015c=_0x39b98c;this[_0x4f015c(0xe0)]=_0x4a2626,this[_0x4f015c(0x117)]=_0x2296de,this['_sessionService']=_0x501509;}async[_0x39b98c(0xc7)](_0x1afbfc){const _0x3ac9db=_0x39b98c;var _0x37b489,_0x45abc9;const {parentId:_0x3d8861,unitId:_0x6db85c,text:_0x33297d,threadId:_0xdb32a3}=_0x1afbfc,_0x266fe1=(_0x45abc9=(_0x37b489=_0x33297d[_0x3ac9db(0x136)])==null?void 0x0:_0x37b489[_0x3ac9db(0xdc)](_0x56bcf9=>_0x56bcf9[_0x3ac9db(0x12d)]===_0x5c8b03[_0x3ac9db(0x12c)][_0x3ac9db(0x129)])[_0x3ac9db(0xbb)](_0x3d069a=>_0x3d069a[_0x3ac9db(0xee)]))!=null?_0x45abc9:[],_0x48b580=JSON['stringify'](_0x33297d),_0x17ad04=(await this['_sessionService'][_0x3ac9db(0x10f)](_0x6db85c))[_0x3ac9db(0xf6)]();if(_0x3d8861){const _0x3e0433={'memberId':_0x17ad04,'unitId':_0x6db85c,'content':_0x48b580,'mention':_0x266fe1,'threadId':_0xdb32a3},_0x334342=(await this['_httpService'][_0x3ac9db(0xda)]('/universer-api/comment/unit/'+_0x6db85c+_0x3ac9db(0xe9),{'body':_0x3e0433}))['body'][_0x3ac9db(0xfa)];return{..._0x1afbfc,'id':_0x334342[_0x3ac9db(0xf5)],'dT':_0x5c8b03['dayjs'](+_0x334342[_0x3ac9db(0xd0)])[_0x3ac9db(0xef)](_0x3ac9db(0xd5)),'personId':_0x334342[_0x3ac9db(0x10a)]};}else{const _0x1dba6c={'memberId':_0x17ad04,'unitId':_0x6db85c,'content':_0x48b580,'mention':_0x266fe1},_0x2c405b=await this[_0x3ac9db(0xe0)][_0x3ac9db(0xda)](_0x3ac9db(0xd9)+_0x6db85c+_0x3ac9db(0xe2),{'body':_0x1dba6c});return _0x43c20a(_0x2c405b[_0x3ac9db(0xff)]['comment'],_0x1afbfc);}}async[_0x39b98c(0x138)](_0x1ac5d1){const _0x4428ae=_0x39b98c;var _0x432f6b,_0x4230cb;const {text:_0x40cf19,unitId:_0x251e96}=_0x1ac5d1,_0x4275b2=(_0x4230cb=(_0x432f6b=_0x40cf19[_0x4428ae(0x136)])==null?void 0x0:_0x432f6b[_0x4428ae(0xdc)](_0x212642=>_0x212642[_0x4428ae(0x12d)]===_0x5c8b03[_0x4428ae(0x12c)][_0x4428ae(0x129)])[_0x4428ae(0xbb)](_0x2c24d3=>_0x2c24d3['rangeId']))!=null?_0x4230cb:[],_0x448792=JSON[_0x4428ae(0xfe)](_0x40cf19),_0x200d1a=_0x1ac5d1[_0x4428ae(0xeb)],_0x8befe6=_0x1ac5d1['id'],_0x2fc13b={'memberId':(await this[_0x4428ae(0xe3)][_0x4428ae(0x10f)](_0x251e96))['getMemberID'](),'unitId':_0x251e96,'threadId':_0x200d1a,'mention':_0x4275b2,'content':_0x448792,'replyId':_0x8befe6},_0x55cdbc=await this[_0x4428ae(0xe0)][_0x4428ae(0xda)](_0x4428ae(0xd9)+_0x251e96+'/edit',{'body':_0x2fc13b});return!_0x55cdbc[_0x4428ae(0xff)][_0x4428ae(0x112)]||_0x55cdbc[_0x4428ae(0xff)]['error'][_0x4428ae(0xe8)]===0x1;}async[_0x39b98c(0xf2)](_0x7ebaa1){const _0x1b4af5=_0x39b98c,{unitId:_0x2ac13f}=_0x7ebaa1,_0x281b7a=_0x7ebaa1[_0x1b4af5(0xeb)],_0x2a1a8d={'memberId':this[_0x1b4af5(0x117)][_0x1b4af5(0x135)]()['userID'],'unitId':_0x2ac13f,'threadId':_0x281b7a,'solved':_0x7ebaa1[_0x1b4af5(0x111)]?_0x586a83[_0x1b4af5(0x104)]:_0x586a83['OpenOrReOpen']},_0x107227=await this['_httpService'][_0x1b4af5(0xda)](_0x1b4af5(0xd9)+_0x2ac13f+'/solved',{'body':_0x2a1a8d});return!_0x107227[_0x1b4af5(0xff)][_0x1b4af5(0x112)]||_0x107227[_0x1b4af5(0xff)]['error'][_0x1b4af5(0xe8)]===0x1;}async[_0x39b98c(0xb5)](_0x375298,_0x3674d3,_0x1ff20a,_0x2a12a1){const _0x1d0697=_0x39b98c,_0x4e168d={'memberId':(await this[_0x1d0697(0xe3)][_0x1d0697(0x10f)](_0x375298))[_0x1d0697(0xf6)](),'threadId':_0x1ff20a,'replyId':_0x2a12a1,'unitId':_0x375298},_0x315086=await this[_0x1d0697(0xe0)]['post'](_0x1d0697(0xd9)+_0x375298+_0x1d0697(0x106),{'body':_0x4e168d});return!_0x315086[_0x1d0697(0xff)][_0x1d0697(0x112)]||_0x315086[_0x1d0697(0xff)][_0x1d0697(0x112)][_0x1d0697(0xe8)]===0x1;}async['listComments'](_0x29f7f1,_0xbae825,_0x223202){const _0x3fa659=_0x39b98c,_0x3f2529={'unitId':_0x29f7f1,'threadId':_0x223202},_0x403d36=await this['_httpService'][_0x3fa659(0xda)](_0x3fa659(0xd9)+_0x29f7f1+_0x3fa659(0xca),{'body':_0x3f2529}),_0x45be39=_0x223202[_0x3fa659(0xbb)](_0x46fddf=>_0x1043ed(_0x403d36['body']['comments'][_0x46fddf],_0x29f7f1,_0xbae825))[_0x3fa659(0xdc)](Boolean);return Object['values'](_0x403d36[_0x3fa659(0xff)][_0x3fa659(0x109)])['forEach'](_0x455e1c=>{const _0x54ef89=_0x3fa659;this['_userService'][_0x54ef89(0x12f)](_0x455e1c);}),_0x45be39;}[_0x39b98c(0xce)](_0x49754c){const _0x5aec63=_0x39b98c;return{'id':_0x49754c['id'],'threadId':_0x49754c[_0x5aec63(0xeb)],'ref':_0x49754c[_0x5aec63(0xc0)]};}};_0x4468b7=_0x3f4890([_0x1ae8bc(0x0,_0x5c8b03[_0x39b98c(0x13d)](_0x3ebd5e[_0x39b98c(0x113)])),_0x1ae8bc(0x1,_0x5c8b03['Inject'](_0x5c8b03[_0x39b98c(0xc8)])),_0x1ae8bc(0x2,_0x5c8b03[_0x39b98c(0x13d)](_0x4804be[_0x39b98c(0x100)]))],_0x4468b7);var _0x12367d=Object[_0x39b98c(0x107)],_0x3316fb=(_0x38ea25,_0x5827bb,_0x534bcd,_0x593865)=>{const _0x1314b5=_0x39b98c;for(var _0x3b8d0f=_0x593865>0x1?void 0x0:_0x593865?_0x12367d(_0x5827bb,_0x534bcd):_0x5827bb,_0x6ae820=_0x38ea25[_0x1314b5(0x13e)]-0x1,_0x2be5a4;_0x6ae820>=0x0;_0x6ae820--)(_0x2be5a4=_0x38ea25[_0x6ae820])&&(_0x3b8d0f=_0x2be5a4(_0x3b8d0f)||_0x3b8d0f);return _0x3b8d0f;},_0x7b172a=(_0x20fc52,_0x4178a9)=>(_0x42aa35,_0x5681cb)=>_0x4178a9(_0x42aa35,_0x5681cb,_0x20fc52);let _0x172f4f=class extends _0x5c8b03['Disposable']{constructor(_0x28ea53,_0x20a192){const _0x3a47e0=_0x39b98c;super(),this[_0x3a47e0(0x12e)]=_0x28ea53,this[_0x3a47e0(0xf3)]=_0x20a192,this[_0x3a47e0(0x139)]();}[_0x39b98c(0x139)](){const _0x5e8dd7=_0x39b98c;this['_threadCommentDataSourceService'][_0x5e8dd7(0xc9)]=this[_0x5e8dd7(0xf3)],this['_threadCommentDataSourceService'][_0x5e8dd7(0x11b)]=!0x1;}};_0x172f4f=_0x3316fb([_0x7b172a(0x0,_0x332e6a['IThreadCommentDataSourceService']),_0x7b172a(0x1,_0x5c8b03[_0x39b98c(0x13d)](_0x4468b7))],_0x172f4f);var _0x148c1f=Object[_0x39b98c(0xde)],_0x4a004a=Object[_0x39b98c(0x107)],_0x309698=(_0x1971d8,_0x2f4949,_0x3e0fca)=>_0x2f4949 in _0x1971d8?_0x148c1f(_0x1971d8,_0x2f4949,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e0fca}):_0x1971d8[_0x2f4949]=_0x3e0fca,_0x215408=(_0x7a883a,_0x26c37d,_0x4c5d8d,_0x49aaa5)=>{const _0x3d254e=_0x39b98c;for(var _0x46570b=_0x49aaa5>0x1?void 0x0:_0x49aaa5?_0x4a004a(_0x26c37d,_0x4c5d8d):_0x26c37d,_0x5d8317=_0x7a883a[_0x3d254e(0x13e)]-0x1,_0x32b7ec;_0x5d8317>=0x0;_0x5d8317--)(_0x32b7ec=_0x7a883a[_0x5d8317])&&(_0x46570b=_0x32b7ec(_0x46570b)||_0x46570b);return _0x46570b;},_0x1ea36f=(_0x37c14e,_0x2462ef)=>(_0x582504,_0x285073)=>_0x2462ef(_0x582504,_0x285073,_0x37c14e),_0x1d99dc=(_0x49a314,_0x20431e,_0x47e2d7)=>_0x309698(_0x49a314,typeof _0x20431e!=_0x39b98c(0xd8)?_0x20431e+'':_0x20431e,_0x47e2d7);_0x1cca1d['UniverThreadCommentDataSourcePlugin']=class extends _0x5c8b03['Plugin']{constructor(_0x148b01=_0xde8992,_0x467c5e,_0xf4ff8d){const _0x31a4a5=_0x39b98c;super(),this[_0x31a4a5(0xdf)]=_0x148b01,this[_0x31a4a5(0x10b)]=_0x467c5e,this[_0x31a4a5(0xc4)]=_0xf4ff8d;const {..._0x4d1928}=_0x5c8b03['merge']({},_0xde8992,this[_0x31a4a5(0xdf)]);this[_0x31a4a5(0xc4)][_0x31a4a5(0xed)](_0x59b6ad,_0x4d1928);}[_0x39b98c(0xbe)](){const _0x59a4bb=_0x39b98c;[[_0x4468b7],[_0x172f4f],[_0x1c1924]][_0x59a4bb(0xcf)](_0x25f6e8=>{const _0x47c4eb=_0x59a4bb;this[_0x47c4eb(0x10b)][_0x47c4eb(0xc2)](_0x25f6e8);});}[_0x39b98c(0x10e)](){const _0x31a8ac=_0x39b98c;this['_injector'][_0x31a8ac(0xb6)](_0x172f4f),this[_0x31a8ac(0x10b)]['get'](_0x1c1924);}},_0x1d99dc(_0x1cca1d['UniverThreadCommentDataSourcePlugin'],_0x39b98c(0xb8),_0x4b3b10),_0x1d99dc(_0x1cca1d['UniverThreadCommentDataSourcePlugin'],_0x39b98c(0x13b),_0x5c8b03[_0x39b98c(0xc1)]['UNIVER_UNKNOWN']),_0x1cca1d['UniverThreadCommentDataSourcePlugin']=_0x215408([_0x5c8b03[_0x39b98c(0xbc)](_0xb3c150[_0x39b98c(0x11d)],_0x4804be[_0x39b98c(0xf7)],_0x2bd3ee[_0x39b98c(0x11e)]),_0x1ea36f(0x1,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03['Injector'])),_0x1ea36f(0x2,_0x5c8b03[_0x39b98c(0x108)])],_0x1cca1d['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x1cca1d,Symbol[_0x39b98c(0x105)],{'value':'Module'});}));
1
+ function _0x18b0(_0x1ec00d,_0x3b5982){_0x1ec00d=_0x1ec00d-0x185;const _0x3622e8=_0x3622();let _0x18b049=_0x3622e8[_0x1ec00d];return _0x18b049;}function _0x3622(){const _0x3c3b84=['29613fEgKHx','onStarting','personId','threadId','Unknown','Disposable','getOwnPropertyDescriptor','disposeWithMe','@univerjs/thread-comment','UserManagerService','getUnit','UniverProCollaborationClient','DependentOn','parse','rangeType','commentUpdate$','forEach','amd','_sessionService','UniverLicensePlugin','addUser','type','UniverNetwork','12PGfQKe','customRanges','UniverThreadCommentUIPlugin','rxjs','Inject','userId','831572DWBWNC','thread-comment-data-source.config','ThreadCommentModel','/delete','defineProperty','CollaborationSessionService','Add','Delete','createTimestamp','@univerjs/core','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','replyId','@univerjs/network','filter','rangeId','comment','pipe','setConfig','_config','Injector','deleteComment','dayjs','_initDataSource','getCurrentUser','code','replies','payload','UniverCore','requireSession','/universer-api/user/list','solved','UniverThreadCommentDataSourcePlugin','get','updateComment','listComments','map','dataSource','delete','UniverProLicense','parentId','onReady','OpenOrReOpen','_userService','_httpService','UniverCollaborationClientPlugin','length','500255bBQFkB','UniverProThreadCommentDatasource','4185990qpDAAJ','userID','UniverThreadComment','addComment','Solve','content','YYYY/MM/DD\x20HH:mm','exports','HTTPService','120960WyKeVI','resolved','/solved','resolveComment','Module','/edit','CustomRangeType','/list','399468ArMHUu','comments','Plugin','_initUserSync','UNIVER_UNKNOWN','6QHUDgb','_threadCommentDataSourceService','UniverThreadCommentUi','/universer-api/comment/unit/','size','object','IThreadCommentDataSourceService','_injector','subscribe','getMemberID','users','user','toStringTag','Edit','ref','CommentService','stringify','getUser','_threadCommentDataSource','bufferTime','find','post','slice','saveCommentToSnapshot','add','9hnwlhD','/add','@univerjs/thread-comment-ui','_init','body','error','UNRECOGNIZED','Solved','@univerjs-pro/collaboration-client','Reply','merge','230315FCnqoe','symbol','root','UniverInstanceType','format'];_0x3622=function(){return _0x3c3b84;};return _0x3622();}(function(_0x5f5b8f,_0x15cb68){const _0x4e7a7f=_0x18b0,_0x31e5db=_0x5f5b8f();while(!![]){try{const _0x38bb55=-parseInt(_0x4e7a7f(0x1fb))/0x1+parseInt(_0x4e7a7f(0x1d2))/0x2+-parseInt(_0x4e7a7f(0x200))/0x3*(parseInt(_0x4e7a7f(0x18a))/0x4)+parseInt(_0x4e7a7f(0x1bf))/0x5*(-parseInt(_0x4e7a7f(0x1d7))/0x6)+-parseInt(_0x4e7a7f(0x190))/0x7+-parseInt(_0x4e7a7f(0x1ca))/0x8+-parseInt(_0x4e7a7f(0x1f0))/0x9*(-parseInt(_0x4e7a7f(0x1c1))/0xa);if(_0x38bb55===_0x15cb68)break;else _0x31e5db['push'](_0x31e5db['shift']());}catch(_0x2dce46){_0x31e5db['push'](_0x31e5db['shift']());}}}(_0x3622,0x1e616),function(_0x4a2aa7,_0x2aa239){const _0x1c4f84=_0x18b0;typeof exports==_0x1c4f84(0x1dc)&&typeof module<'u'?_0x2aa239(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x1c4f84(0x211)]?define([_0x1c4f84(0x1c8),_0x1c4f84(0x1f8),'@univerjs-pro/license',_0x1c4f84(0x199),_0x1c4f84(0x1f2),_0x1c4f84(0x208),_0x1c4f84(0x18d),_0x1c4f84(0x19d)],_0x2aa239):(_0x4a2aa7=typeof globalThis<'u'?globalThis:_0x4a2aa7||self,_0x2aa239(_0x4a2aa7[_0x1c4f84(0x1c0)]={},_0x4a2aa7[_0x1c4f84(0x20b)],_0x4a2aa7[_0x1c4f84(0x1b7)],_0x4a2aa7[_0x1c4f84(0x1ac)],_0x4a2aa7[_0x1c4f84(0x1d9)],_0x4a2aa7[_0x1c4f84(0x1c3)],_0x4a2aa7[_0x1c4f84(0x18d)],_0x4a2aa7[_0x1c4f84(0x189)]));}(this,function(_0xb2817b,_0xaf304a,_0x4c4188,_0x5782bb,_0x40ae93,_0x4a4df5,_0x411842,_0xb23ab1){'use strict';const _0x4017a5=_0x18b0;const _0x26fd59=_0x4017a5(0x19a);var _0x35d217=(_0x574a77=>(_0x574a77[_0x574a77[_0x4017a5(0x1ba)]=0x0]=_0x4017a5(0x1ba),_0x574a77[_0x574a77[_0x4017a5(0x1f7)]=0x1]='Solved',_0x574a77[_0x574a77[_0x4017a5(0x1f6)]=-0x1]=_0x4017a5(0x1f6),_0x574a77))(_0x35d217||{}),_0x4e7287=(_0x2e1ec9=>(_0x2e1ec9[_0x2e1ec9[_0x4017a5(0x204)]=0x0]=_0x4017a5(0x204),_0x2e1ec9[_0x2e1ec9[_0x4017a5(0x196)]=0x1]='Add',_0x2e1ec9[_0x2e1ec9[_0x4017a5(0x1f9)]=0x2]=_0x4017a5(0x1f9),_0x2e1ec9[_0x2e1ec9[_0x4017a5(0x1e4)]=0x3]='Edit',_0x2e1ec9[_0x2e1ec9[_0x4017a5(0x197)]=0x4]='Delete',_0x2e1ec9[_0x2e1ec9['Solve']=0x5]=_0x4017a5(0x1c5),_0x2e1ec9[_0x2e1ec9['UNRECOGNIZED']=-0x1]=_0x4017a5(0x1f6),_0x2e1ec9))(_0x4e7287||{});const _0xb252d2=_0x384d21=>_0x5782bb[_0x4017a5(0x1a6)](new Date(+_0x384d21))['format']('YYYY/MM/DD\x20HH:mm'),_0x427da7=async(_0x24a72f,_0x3ef125)=>{const _0x321261=_0x4017a5,_0x5decae=_0x24a72f[_0x321261(0x1b1)](_0x5782bb['UserManagerService']),_0x2e20bf=_0x24a72f[_0x321261(0x1b1)](_0xb23ab1['HTTPService']);_0x3ef125[_0x321261(0x210)](_0x1764af=>{const _0x4aa549=_0x321261;_0x5decae[_0x4aa549(0x1e8)](_0x1764af)&&_0x3ef125[_0x4aa549(0x1b6)](_0x1764af);}),_0x3ef125[_0x321261(0x1db)]&&(await _0x2e20bf[_0x321261(0x1b1)](_0x321261(0x1ae),{'params':{'userIDs':[..._0x3ef125]}}))[_0x321261(0x1f4)][_0x321261(0x1e1)][_0x321261(0x210)](_0x501385=>{const _0x24df85=_0x321261;_0x501385&&_0x5decae[_0x24df85(0x187)](_0x501385);});};var _0x565ea6=Object[_0x4017a5(0x206)],_0x933df3=(_0x357fe0,_0x25d264,_0x49ad4d,_0x50805e)=>{for(var _0x1a6d51=_0x50805e>0x1?void 0x0:_0x50805e?_0x565ea6(_0x25d264,_0x49ad4d):_0x25d264,_0x1dd498=_0x357fe0['length']-0x1,_0x213334;_0x1dd498>=0x0;_0x1dd498--)(_0x213334=_0x357fe0[_0x1dd498])&&(_0x1a6d51=_0x213334(_0x1a6d51)||_0x1a6d51);return _0x1a6d51;},_0x22e093=(_0x124f19,_0x51fe04)=>(_0x239aa2,_0x23a631)=>_0x51fe04(_0x239aa2,_0x23a631,_0x124f19);let _0x3b27b7=class extends _0x5782bb[_0x4017a5(0x205)]{constructor(_0x5d0d1b,_0x3f5a62,_0x189eaa,_0x28a113){const _0x365845=_0x4017a5;super(),this['_commentService']=_0x5d0d1b,this[_0x365845(0x19b)]=_0x3f5a62,this[_0x365845(0x1bb)]=_0x189eaa,this['_injector']=_0x28a113,this[_0x365845(0x1f3)](),this[_0x365845(0x1d5)]();}['_initUserSync'](){const _0x300c65=_0x4017a5;this[_0x300c65(0x207)](this[_0x300c65(0x19b)][_0x300c65(0x20f)][_0x300c65(0x1a1)](_0x411842[_0x300c65(0x1ea)](0x10))[_0x300c65(0x1df)](_0x501d51=>{const _0xf9c3b1=_0x300c65,_0x4b12f8=new Set();_0x501d51[_0xf9c3b1(0x210)](_0xc2adb9=>{const _0x7f60de=_0xf9c3b1;switch(_0xc2adb9[_0x7f60de(0x188)]){case _0x7f60de(0x1ef):{const _0x30421e=_0xc2adb9[_0x7f60de(0x1ab)][_0x7f60de(0x202)];_0x4b12f8[_0x7f60de(0x1ef)](_0x30421e);break;}}}),_0x427da7(this[_0xf9c3b1(0x1de)],_0x4b12f8);}));}[_0x4017a5(0x1f3)](){const _0x596bc6=_0x4017a5;this[_0x596bc6(0x207)](this['_commentService'][_0x596bc6(0x20f)][_0x596bc6(0x1df)](async _0xb44414=>{const _0x145c60=_0x596bc6;var _0x27754e,_0x1d2158,_0x2a51d4,_0x24df04;const _0x458a97=(_0x27754e=this['_threadCommentModel'][_0x145c60(0x20a)](_0xb44414['unitId'])[_0x145c60(0x1eb)](_0x18de5b=>_0x18de5b[_0x145c60(0x203)]===_0xb44414[_0x145c60(0x203)]))==null?void 0x0:_0x27754e[_0x145c60(0x1fd)];if(!_0x458a97)return;const {unitId:_0x50fb31,subUnitId:_0xc5c080}=_0x458a97;switch(_0xb44414[_0x145c60(0x1e2)]&&this['_userService'][_0x145c60(0x187)](_0xb44414[_0x145c60(0x1e2)]),_0xb44414[_0x145c60(0x188)]){case _0x4e7287['Add']:break;case _0x4e7287['Reply']:{this[_0x145c60(0x19b)][_0x145c60(0x1c4)](_0x50fb31,_0xc5c080,{'unitId':_0x50fb31,'subUnitId':_0xc5c080,'ref':'','id':_0xb44414[_0x145c60(0x19c)],'dT':_0xb252d2(+_0xb44414[_0x145c60(0x198)]),'threadId':_0xb44414[_0x145c60(0x203)],'personId':(_0x2a51d4=(_0x1d2158=_0xb44414[_0x145c60(0x1e2)])==null?void 0x0:_0x1d2158[_0x145c60(0x1c2)])!=null?_0x2a51d4:_0xb44414[_0x145c60(0x18f)],'text':JSON['parse'](_0xb44414['content']),'parentId':_0x458a97['id']});break;}case _0x4e7287[_0x145c60(0x197)]:{const _0x42cf49=this['_threadCommentModel']['getComment'](_0x50fb31,_0xc5c080,_0xb44414[_0x145c60(0x19c)]);_0x42cf49&&_0x42cf49[_0x145c60(0x1b8)]&&this[_0x145c60(0x19b)][_0x145c60(0x1a5)](_0x50fb31,_0xc5c080,_0xb44414[_0x145c60(0x19c)]);break;}case _0x4e7287[_0x145c60(0x1e4)]:{this['_threadCommentModel'][_0x145c60(0x1b2)](_0x50fb31,_0xc5c080,{'commentId':_0xb44414[_0x145c60(0x19c)],'text':JSON['parse'](_0xb44414[_0x145c60(0x1c6)])});break;}case _0x4e7287[_0x145c60(0x1c5)]:{const _0x4bde90=(_0x24df04=this[_0x145c60(0x19b)][_0x145c60(0x20a)](_0xb44414['unitId'])[_0x145c60(0x1eb)](_0x3db378=>_0x3db378[_0x145c60(0x203)]===_0xb44414[_0x145c60(0x203)]))==null?void 0x0:_0x24df04[_0x145c60(0x1fd)];_0x4bde90&&this[_0x145c60(0x19b)][_0x145c60(0x1cd)](_0x50fb31,_0xc5c080,_0x4bde90['id'],_0xb44414[_0x145c60(0x1af)]===_0x35d217[_0x145c60(0x1f7)]);break;}}}));}};_0x3b27b7=_0x933df3([_0x22e093(0x0,_0x5782bb['Inject'](_0xaf304a[_0x4017a5(0x1e6)])),_0x22e093(0x1,_0x5782bb[_0x4017a5(0x18e)](_0x4a4df5[_0x4017a5(0x192)])),_0x22e093(0x2,_0x5782bb['Inject'](_0x5782bb['UserManagerService'])),_0x22e093(0x3,_0x5782bb[_0x4017a5(0x18e)](_0x5782bb[_0x4017a5(0x1a4)]))],_0x3b27b7);const _0x2102fc=_0x4017a5(0x191),_0x52b3a3={};var _0x44d9ef=Object[_0x4017a5(0x206)],_0x263079=(_0x258dda,_0x49c627,_0x460536,_0x4fcfbc)=>{const _0x4d8c30=_0x4017a5;for(var _0x380414=_0x4fcfbc>0x1?void 0x0:_0x4fcfbc?_0x44d9ef(_0x49c627,_0x460536):_0x49c627,_0xd4eb07=_0x258dda[_0x4d8c30(0x1be)]-0x1,_0x51773b;_0xd4eb07>=0x0;_0xd4eb07--)(_0x51773b=_0x258dda[_0xd4eb07])&&(_0x380414=_0x51773b(_0x380414)||_0x380414);return _0x380414;},_0x522ed8=(_0x1ca3b1,_0xb234d1)=>(_0x1aeef9,_0x292541)=>_0xb234d1(_0x1aeef9,_0x292541,_0x1ca3b1);function _0x329ac0(_0x3060a4,_0x5576f4){const _0x395cc7=_0x4017a5,_0x520a9d=_0x3060a4[_0x395cc7(0x1aa)][0x0];return{..._0x5576f4,'id':_0x520a9d[_0x395cc7(0x19c)],'resolved':_0x3060a4[_0x395cc7(0x1af)]===0x1,'dT':_0xb252d2(_0x520a9d[_0x395cc7(0x198)]),'personId':_0x520a9d[_0x395cc7(0x18f)],'threadId':_0x520a9d['threadId']};}function _0x1108cd(_0x552f9e,_0x445d35,_0x347f85){const _0x543702=_0x4017a5;var _0x490535,_0x4e3e5d;if(((_0x4e3e5d=(_0x490535=_0x552f9e==null?void 0x0:_0x552f9e[_0x543702(0x1aa)])==null?void 0x0:_0x490535['length'])!=null?_0x4e3e5d:0x0)>0x0){const _0x515919=(_0x447227,_0x4af93c)=>({'id':_0x447227[_0x543702(0x19c)],'threadId':_0x447227[_0x543702(0x203)],'dT':_0xb252d2(_0x447227[_0x543702(0x198)]),'personId':_0x447227[_0x543702(0x18f)],'resolved':_0x552f9e[_0x543702(0x1af)]===_0x35d217[_0x543702(0x1f7)],'unitId':_0x445d35,'subUnitId':_0x347f85,'text':JSON[_0x543702(0x20d)](_0x447227['content']),'parentId':_0x4af93c}),_0xb4fa02=_0x515919(_0x552f9e[_0x543702(0x1aa)][0x0]);return{..._0xb4fa02,'children':_0x552f9e[_0x543702(0x1aa)][_0x543702(0x1ed)](0x1)['map'](_0x4c1ab5=>_0x515919(_0x4c1ab5,_0xb4fa02['id']))};}return null;}let _0x46ea66=class{constructor(_0x3ceaea,_0x541ec0,_0x59aff1){const _0x242a19=_0x4017a5;this[_0x242a19(0x1bc)]=_0x3ceaea,this['_userService']=_0x541ec0,this[_0x242a19(0x185)]=_0x59aff1;}async['addComment'](_0x4cb6be){const _0x49803b=_0x4017a5;var _0x1407f0,_0x1f95c1;const {parentId:_0x19065d,unitId:_0x55e396,text:_0x37d09a,threadId:_0x20779f}=_0x4cb6be,_0x4caadd=(_0x1f95c1=(_0x1407f0=_0x37d09a[_0x49803b(0x18b)])==null?void 0x0:_0x1407f0['filter'](_0x188b2d=>_0x188b2d[_0x49803b(0x20e)]===_0x5782bb[_0x49803b(0x1d0)]['COMMENT'])[_0x49803b(0x1b4)](_0x56a740=>_0x56a740[_0x49803b(0x19f)]))!=null?_0x1f95c1:[],_0x39d418=JSON[_0x49803b(0x1e7)](_0x37d09a),_0xed6bbb=(await this[_0x49803b(0x185)][_0x49803b(0x1ad)](_0x55e396))['getMemberID']();if(_0x19065d){const _0x1e192a={'memberId':_0xed6bbb,'unitId':_0x55e396,'content':_0x39d418,'mention':_0x4caadd,'threadId':_0x20779f},_0x262721=(await this[_0x49803b(0x1bc)][_0x49803b(0x1ec)](_0x49803b(0x1da)+_0x55e396+'/reply',{'body':_0x1e192a}))[_0x49803b(0x1f4)]['reply'];return{..._0x4cb6be,'id':_0x262721[_0x49803b(0x19c)],'dT':_0x5782bb[_0x49803b(0x1a6)](+_0x262721['createTimestamp'])[_0x49803b(0x1ff)](_0x49803b(0x1c7)),'personId':_0x262721[_0x49803b(0x18f)]};}else{const _0x3e50be={'memberId':_0xed6bbb,'unitId':_0x55e396,'content':_0x39d418,'mention':_0x4caadd},_0x57d599=await this[_0x49803b(0x1bc)][_0x49803b(0x1ec)](_0x49803b(0x1da)+_0x55e396+_0x49803b(0x1f1),{'body':_0x3e50be});return _0x329ac0(_0x57d599[_0x49803b(0x1f4)][_0x49803b(0x1a0)],_0x4cb6be);}}async['updateComment'](_0x141952){const _0x360348=_0x4017a5;var _0x44883e,_0xaacbd3;const {text:_0x1fb287,unitId:_0x8119b8}=_0x141952,_0x1f5c43=(_0xaacbd3=(_0x44883e=_0x1fb287[_0x360348(0x18b)])==null?void 0x0:_0x44883e[_0x360348(0x19e)](_0x52d976=>_0x52d976['rangeType']===_0x5782bb['CustomRangeType']['COMMENT'])[_0x360348(0x1b4)](_0x3c93c7=>_0x3c93c7['rangeId']))!=null?_0xaacbd3:[],_0x43664d=JSON[_0x360348(0x1e7)](_0x1fb287),_0x3f3e83=_0x141952[_0x360348(0x203)],_0x4e3cd7=_0x141952['id'],_0x5b3b76={'memberId':(await this[_0x360348(0x185)][_0x360348(0x1ad)](_0x8119b8))[_0x360348(0x1e0)](),'unitId':_0x8119b8,'threadId':_0x3f3e83,'mention':_0x1f5c43,'content':_0x43664d,'replyId':_0x4e3cd7},_0x7ceeab=await this[_0x360348(0x1bc)]['post'](_0x360348(0x1da)+_0x8119b8+_0x360348(0x1cf),{'body':_0x5b3b76});return!_0x7ceeab[_0x360348(0x1f4)][_0x360348(0x1f5)]||_0x7ceeab[_0x360348(0x1f4)]['error'][_0x360348(0x1a9)]===0x1;}async['resolveComment'](_0x442e6c){const _0x100c74=_0x4017a5,{unitId:_0x180406}=_0x442e6c,_0x346b0d=_0x442e6c[_0x100c74(0x203)],_0x2e83ed={'memberId':this[_0x100c74(0x1bb)][_0x100c74(0x1a8)]()[_0x100c74(0x1c2)],'unitId':_0x180406,'threadId':_0x346b0d,'solved':_0x442e6c[_0x100c74(0x1cb)]?_0x35d217[_0x100c74(0x1f7)]:_0x35d217['OpenOrReOpen']},_0x3d60a9=await this[_0x100c74(0x1bc)][_0x100c74(0x1ec)](_0x100c74(0x1da)+_0x180406+_0x100c74(0x1cc),{'body':_0x2e83ed});return!_0x3d60a9[_0x100c74(0x1f4)][_0x100c74(0x1f5)]||_0x3d60a9[_0x100c74(0x1f4)][_0x100c74(0x1f5)]['code']===0x1;}async['deleteComment'](_0x16b542,_0x65fd1e,_0x53199f,_0x3091c0){const _0x36ed42=_0x4017a5,_0x1fa18f={'memberId':(await this[_0x36ed42(0x185)][_0x36ed42(0x1ad)](_0x16b542))[_0x36ed42(0x1e0)](),'threadId':_0x53199f,'replyId':_0x3091c0,'unitId':_0x16b542},_0xe55428=await this[_0x36ed42(0x1bc)][_0x36ed42(0x1ec)]('/universer-api/comment/unit/'+_0x16b542+_0x36ed42(0x193),{'body':_0x1fa18f});return!_0xe55428['body'][_0x36ed42(0x1f5)]||_0xe55428[_0x36ed42(0x1f4)][_0x36ed42(0x1f5)]['code']===0x1;}async[_0x4017a5(0x1b3)](_0x48a293,_0xd925c7,_0x251810){const _0x1bb8e0=_0x4017a5,_0x13a262={'unitId':_0x48a293,'threadId':_0x251810},_0x29d719=await this[_0x1bb8e0(0x1bc)][_0x1bb8e0(0x1ec)](_0x1bb8e0(0x1da)+_0x48a293+_0x1bb8e0(0x1d1),{'body':_0x13a262}),_0x53810c=_0x251810[_0x1bb8e0(0x1b4)](_0x3c4114=>_0x1108cd(_0x29d719[_0x1bb8e0(0x1f4)][_0x1bb8e0(0x1d3)][_0x3c4114],_0x48a293,_0xd925c7))['filter'](Boolean);return Object['values'](_0x29d719['body'][_0x1bb8e0(0x1e1)])[_0x1bb8e0(0x210)](_0x540032=>{const _0x1a5468=_0x1bb8e0;this['_userService'][_0x1a5468(0x187)](_0x540032);}),_0x53810c;}[_0x4017a5(0x1ee)](_0x2c2dd7){const _0x5c1f5b=_0x4017a5;return{'id':_0x2c2dd7['id'],'threadId':_0x2c2dd7['threadId'],'ref':_0x2c2dd7[_0x5c1f5b(0x1e5)]};}};_0x46ea66=_0x263079([_0x522ed8(0x0,_0x5782bb[_0x4017a5(0x18e)](_0xb23ab1[_0x4017a5(0x1c9)])),_0x522ed8(0x1,_0x5782bb[_0x4017a5(0x18e)](_0x5782bb[_0x4017a5(0x209)])),_0x522ed8(0x2,_0x5782bb['Inject'](_0xaf304a[_0x4017a5(0x195)]))],_0x46ea66);var _0x31695f=Object[_0x4017a5(0x206)],_0x44bea1=(_0x1ad962,_0x11d1e6,_0x205401,_0x4ba5f0)=>{for(var _0x2dd686=_0x4ba5f0>0x1?void 0x0:_0x4ba5f0?_0x31695f(_0x11d1e6,_0x205401):_0x11d1e6,_0x1887e7=_0x1ad962['length']-0x1,_0x3cdf11;_0x1887e7>=0x0;_0x1887e7--)(_0x3cdf11=_0x1ad962[_0x1887e7])&&(_0x2dd686=_0x3cdf11(_0x2dd686)||_0x2dd686);return _0x2dd686;},_0x3f9d81=(_0x12cc11,_0x3dc467)=>(_0x56d6cc,_0x392a37)=>_0x3dc467(_0x56d6cc,_0x392a37,_0x12cc11);let _0x242293=class extends _0x5782bb[_0x4017a5(0x205)]{constructor(_0x31a7eb,_0x25a3bf){const _0x51c6ae=_0x4017a5;super(),this[_0x51c6ae(0x1d8)]=_0x31a7eb,this[_0x51c6ae(0x1e9)]=_0x25a3bf,this[_0x51c6ae(0x1a7)]();}[_0x4017a5(0x1a7)](){const _0xf4dd0f=_0x4017a5;this[_0xf4dd0f(0x1d8)][_0xf4dd0f(0x1b5)]=this[_0xf4dd0f(0x1e9)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x242293=_0x44bea1([_0x3f9d81(0x0,_0x4a4df5[_0x4017a5(0x1dd)]),_0x3f9d81(0x1,_0x5782bb[_0x4017a5(0x18e)](_0x46ea66))],_0x242293);var _0x301ded=Object[_0x4017a5(0x194)],_0x18118a=Object[_0x4017a5(0x206)],_0x3efadd=(_0x238042,_0x237492,_0x29a87b)=>_0x237492 in _0x238042?_0x301ded(_0x238042,_0x237492,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29a87b}):_0x238042[_0x237492]=_0x29a87b,_0x95330e=(_0xfa2a46,_0x4d9aae,_0x1e59b2,_0x14ddeb)=>{const _0x34bdd5=_0x4017a5;for(var _0x238b15=_0x14ddeb>0x1?void 0x0:_0x14ddeb?_0x18118a(_0x4d9aae,_0x1e59b2):_0x4d9aae,_0x586886=_0xfa2a46[_0x34bdd5(0x1be)]-0x1,_0x238d10;_0x586886>=0x0;_0x586886--)(_0x238d10=_0xfa2a46[_0x586886])&&(_0x238b15=_0x238d10(_0x238b15)||_0x238b15);return _0x238b15;},_0x149a4d=(_0x4f9cac,_0x1e5b41)=>(_0x416a17,_0x14dbde)=>_0x1e5b41(_0x416a17,_0x14dbde,_0x4f9cac),_0x5605c7=(_0x5f5d84,_0x88fe98,_0x413525)=>_0x3efadd(_0x5f5d84,typeof _0x88fe98!=_0x4017a5(0x1fc)?_0x88fe98+'':_0x88fe98,_0x413525);_0xb2817b['UniverThreadCommentDataSourcePlugin']=class extends _0x5782bb[_0x4017a5(0x1d4)]{constructor(_0x1e6ddb=_0x52b3a3,_0x25bde3,_0x413e82){const _0x7d4b46=_0x4017a5;super(),this[_0x7d4b46(0x1a3)]=_0x1e6ddb,this['_injector']=_0x25bde3,this['_configService']=_0x413e82;const {..._0xf267a6}=_0x5782bb[_0x7d4b46(0x1fa)]({},_0x52b3a3,this[_0x7d4b46(0x1a3)]);this['_configService'][_0x7d4b46(0x1a2)](_0x2102fc,_0xf267a6);}[_0x4017a5(0x201)](){const _0x244b34=_0x4017a5;[[_0x46ea66],[_0x242293],[_0x3b27b7]][_0x244b34(0x210)](_0x27394d=>{const _0x5d384b=_0x244b34;this[_0x5d384b(0x1de)][_0x5d384b(0x1ef)](_0x27394d);});}[_0x4017a5(0x1b9)](){const _0x2ea985=_0x4017a5;this[_0x2ea985(0x1de)]['get'](_0x242293),this[_0x2ea985(0x1de)][_0x2ea985(0x1b1)](_0x3b27b7);}},_0x5605c7(_0xb2817b[_0x4017a5(0x1b0)],'pluginName',_0x26fd59),_0x5605c7(_0xb2817b[_0x4017a5(0x1b0)],_0x4017a5(0x188),_0x5782bb[_0x4017a5(0x1fe)][_0x4017a5(0x1d6)]),_0xb2817b[_0x4017a5(0x1b0)]=_0x95330e([_0x5782bb[_0x4017a5(0x20c)](_0x40ae93[_0x4017a5(0x18c)],_0xaf304a[_0x4017a5(0x1bd)],_0x4c4188[_0x4017a5(0x186)]),_0x149a4d(0x1,_0x5782bb['Inject'](_0x5782bb[_0x4017a5(0x1a4)])),_0x149a4d(0x2,_0x5782bb['IConfigService'])],_0xb2817b[_0x4017a5(0x1b0)]),Object['defineProperty'](_0xb2817b,Symbol[_0x4017a5(0x1e3)],{'value':_0x4017a5(0x1ce)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.4-insiders.20251213-692494c",
3
+ "version": "0.13.0",
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/core": "0.12.4-insiders.20251213-692494c",
48
+ "@univerjs-pro/collaboration-client": "0.13.0",
49
+ "@univerjs-pro/license": "0.13.0",
50
+ "@univerjs/core": "0.13.0",
51
+ "@univerjs/thread-comment": "0.13.0",
49
52
  "@univerjs/protocol": "0.1.47",
50
- "@univerjs-pro/license": "0.12.4-insiders.20251213-692494c",
51
- "@univerjs/thread-comment-ui": "0.12.4-insiders.20251213-692494c",
52
- "@univerjs/thread-comment": "0.12.4-insiders.20251213-692494c",
53
- "@univerjs/network": "0.12.4-insiders.20251213-692494c",
54
- "@univerjs-pro/collaboration-client": "0.12.4-insiders.20251213-692494c"
53
+ "@univerjs/thread-comment-ui": "0.13.0",
54
+ "@univerjs/network": "0.13.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.2.7",
60
60
  "vitest": "^4.0.15",
61
- "@univerjs-infra/shared": "0.12.4"
61
+ "@univerjs-infra/shared": "0.13.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",