@univerjs-pro/thread-comment-datasource 0.2.12 → 0.2.13

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 _0x554ab8=_0x4252;(function(_0x325eba,_0x21a7e9){const _0xd8f1b6=_0x4252,_0x15abb0=_0x325eba();while(!![]){try{const _0x4948fc=parseInt(_0xd8f1b6(0xb6))/0x1*(parseInt(_0xd8f1b6(0xaf))/0x2)+parseInt(_0xd8f1b6(0xd4))/0x3*(-parseInt(_0xd8f1b6(0xb3))/0x4)+parseInt(_0xd8f1b6(0xd7))/0x5+parseInt(_0xd8f1b6(0xff))/0x6+parseInt(_0xd8f1b6(0x8d))/0x7*(parseInt(_0xd8f1b6(0xaa))/0x8)+parseInt(_0xd8f1b6(0xe2))/0x9*(-parseInt(_0xd8f1b6(0x110))/0xa)+parseInt(_0xd8f1b6(0xfe))/0xb*(parseInt(_0xd8f1b6(0x86))/0xc);if(_0x4948fc===_0x21a7e9)break;else _0x15abb0['push'](_0x15abb0['shift']());}catch(_0x1e0335){_0x15abb0['push'](_0x15abb0['shift']());}}}(_0x3a83,0x81de5));function _0x4252(_0x1f4175,_0x35d423){const _0x3a83d2=_0x3a83();return _0x4252=function(_0x4252fc,_0x332ab1){_0x4252fc=_0x4252fc-0x82;let _0x43c411=_0x3a83d2[_0x4252fc];return _0x43c411;},_0x4252(_0x1f4175,_0x35d423);}Object['defineProperty'](exports,Symbol[_0x554ab8(0x95)],{'value':_0x554ab8(0x102)});const c=require(_0x554ab8(0xa3)),g=require('@univerjs/thread-comment'),N=require(_0x554ab8(0xe1)),y=require('@univerjs-pro/collaboration-client'),O=require(_0x554ab8(0xb9)),$=require(_0x554ab8(0xcd)),E=require(_0x554ab8(0x10e)),q='THREAD_COMMENT_DATA_SOURCE_PLUGIN';var p=(_0x574f7e=>(_0x574f7e[_0x574f7e[_0x554ab8(0x8b)]=0x0]=_0x554ab8(0x8b),_0x574f7e[_0x574f7e[_0x554ab8(0x8e)]=0x1]='Solved',_0x574f7e[_0x574f7e[_0x554ab8(0xbc)]=-0x1]=_0x554ab8(0xbc),_0x574f7e))(p||{}),v=(_0x71c60e=>(_0x71c60e[_0x71c60e[_0x554ab8(0xa0)]=0x0]='Unknown',_0x71c60e[_0x71c60e[_0x554ab8(0x101)]=0x1]=_0x554ab8(0x101),_0x71c60e[_0x71c60e[_0x554ab8(0xf1)]=0x2]='Reply',_0x71c60e[_0x71c60e[_0x554ab8(0x97)]=0x3]=_0x554ab8(0x97),_0x71c60e[_0x71c60e['Delete']=0x4]=_0x554ab8(0xd8),_0x71c60e[_0x71c60e[_0x554ab8(0x104)]=0x5]='Solve',_0x71c60e[_0x71c60e[_0x554ab8(0xbc)]=-0x1]=_0x554ab8(0xbc),_0x71c60e))(v||{});const P=_0x3db542=>$(new Date(+_0x3db542))[_0x554ab8(0x99)](_0x554ab8(0xd6)),x=async(_0x522bca,_0x2f4224)=>{const _0x59aca9=_0x554ab8,_0x590ba6=_0x522bca[_0x59aca9(0xac)](c[_0x59aca9(0xc3)]),_0x2ec2f4=_0x522bca['get'](O[_0x59aca9(0x10f)]);_0x2f4224['forEach'](_0x266a36=>{const _0x17e4a2=_0x59aca9;_0x590ba6[_0x17e4a2(0xae)](_0x266a36)&&_0x2f4224['delete'](_0x266a36);}),_0x2f4224[_0x59aca9(0x10b)]&&(await _0x2ec2f4[_0x59aca9(0xac)](_0x59aca9(0x108),{'params':{'userIDs':[..._0x2f4224]}}))['body'][_0x59aca9(0x106)][_0x59aca9(0x9e)](_0x5032a3=>{const _0x10cbbb=_0x59aca9;_0x5032a3&&_0x590ba6[_0x10cbbb(0xf5)](_0x5032a3);});};var Y=Object[_0x554ab8(0xd9)],G=Object[_0x554ab8(0xc7)],H=(_0x372fe3,_0x425ac1,_0x45964a,_0x23891f)=>{const _0xc78a78=_0x554ab8;for(var _0x1af61b=_0x23891f>0x1?void 0x0:_0x23891f?G(_0x425ac1,_0x45964a):_0x425ac1,_0x506a3a=_0x372fe3[_0xc78a78(0xde)]-0x1,_0x539e63;_0x506a3a>=0x0;_0x506a3a--)(_0x539e63=_0x372fe3[_0x506a3a])&&(_0x1af61b=(_0x23891f?_0x539e63(_0x425ac1,_0x45964a,_0x1af61b):_0x539e63(_0x1af61b))||_0x1af61b);return _0x23891f&&_0x1af61b&&Y(_0x425ac1,_0x45964a,_0x1af61b),_0x1af61b;},I=(_0x25a735,_0x5bea31)=>(_0x27888f,_0x21370d)=>_0x5bea31(_0x27888f,_0x21370d,_0x25a735);function L(_0x8f7121,_0x3ecf05){const _0x5d2d35=_0x554ab8,_0x4412c2=_0x8f7121[_0x5d2d35(0xb2)][0x0];return{..._0x3ecf05,'id':_0x4412c2[_0x5d2d35(0xec)],'resolved':_0x8f7121[_0x5d2d35(0x85)]===0x1,'dT':P(_0x4412c2[_0x5d2d35(0xe4)]),'personId':_0x4412c2[_0x5d2d35(0xa2)],'threadId':_0x4412c2[_0x5d2d35(0xdd)]};}function A(_0x2f3083,_0x15d175,_0x5badce){const _0x37c518=_0x554ab8;var _0x239d3a,_0x5877ea;if(((_0x5877ea=(_0x239d3a=_0x2f3083==null?void 0x0:_0x2f3083[_0x37c518(0xb2)])==null?void 0x0:_0x239d3a[_0x37c518(0xde)])!=null?_0x5877ea:0x0)>0x0){const _0x20804c=(_0x4ee987,_0x3f5cf0)=>({'id':_0x4ee987[_0x37c518(0xec)],'threadId':_0x4ee987[_0x37c518(0xdd)],'dT':P(_0x4ee987[_0x37c518(0xe4)]),'personId':_0x4ee987[_0x37c518(0xa2)],'resolved':_0x2f3083['solved']===p[_0x37c518(0x8e)],'unitId':_0x15d175,'subUnitId':_0x5badce,'text':JSON[_0x37c518(0xd1)](_0x4ee987['content']),'parentId':_0x3f5cf0}),_0x83e9a9=_0x20804c(_0x2f3083[_0x37c518(0xb2)][0x0]);return{..._0x83e9a9,'children':_0x2f3083[_0x37c518(0xb2)][_0x37c518(0xab)](0x1)[_0x37c518(0x90)](_0x17942f=>_0x20804c(_0x17942f,_0x83e9a9['id']))};}return null;}let C=class{constructor(_0x856ee6,_0x37bd05,_0x5297e0,_0x35990d){const _0x291a0a=_0x554ab8;this[_0x291a0a(0xdb)]=_0x856ee6,this[_0x291a0a(0xa7)]=_0x37bd05,this['_sessionService']=_0x5297e0,this[_0x291a0a(0xc5)]=_0x35990d;}async[_0x554ab8(0x107)](_0x27da1f){const _0x13e524=_0x554ab8;var _0x227b06,_0xd561c0;const {parentId:_0x385269,unitId:_0x1ca3f2,text:_0x630829,threadId:_0x26c955}=_0x27da1f,_0x511f64=(_0xd561c0=(_0x227b06=_0x630829[_0x13e524(0xfa)])==null?void 0x0:_0x227b06[_0x13e524(0xc8)](_0x5a2a5c=>_0x5a2a5c[_0x13e524(0xf2)]===c['CustomRangeType'][_0x13e524(0xe9)])[_0x13e524(0x90)](_0x45fb83=>_0x45fb83[_0x13e524(0x9b)]))!=null?_0xd561c0:[],_0x3e9aa8=JSON[_0x13e524(0x96)](_0x630829),_0x364029=(await this['_sessionService']['requireSession'](_0x1ca3f2))[_0x13e524(0x10a)]();if(_0x385269){const _0x5bc2d9={'memberId':_0x364029,'unitId':_0x1ca3f2,'content':_0x3e9aa8,'mention':_0x511f64,'threadId':_0x26c955},_0x5f23db=(await this[_0x13e524(0xdb)][_0x13e524(0x87)](_0x13e524(0xe6)+_0x1ca3f2+_0x13e524(0x89),{'body':_0x5bc2d9}))['body'][_0x13e524(0xc0)];return{..._0x27da1f,'id':_0x5f23db[_0x13e524(0xec)],'dT':$(+_0x5f23db[_0x13e524(0xe4)])[_0x13e524(0x99)](_0x13e524(0xd6)),'personId':_0x5f23db[_0x13e524(0xa2)]};}else{const _0x31f3a2={'memberId':_0x364029,'unitId':_0x1ca3f2,'content':_0x3e9aa8,'mention':_0x511f64},_0xb2438=await this[_0x13e524(0xdb)][_0x13e524(0x87)](_0x13e524(0xe6)+_0x1ca3f2+_0x13e524(0xcb),{'body':_0x31f3a2});return L(_0xb2438['body']['comment'],_0x27da1f);}}async[_0x554ab8(0xb0)](_0x2bc45c){const _0x587b41=_0x554ab8;var _0x1ad05b,_0x275b24;const {text:_0x549799,unitId:_0x51da56}=_0x2bc45c,_0x18142b=(_0x275b24=(_0x1ad05b=_0x549799[_0x587b41(0xfa)])==null?void 0x0:_0x1ad05b[_0x587b41(0xc8)](_0x12d5c5=>_0x12d5c5['rangeType']===c[_0x587b41(0xe8)][_0x587b41(0xe9)])[_0x587b41(0x90)](_0x35ee9e=>_0x35ee9e['rangeId']))!=null?_0x275b24:[],_0x37dbc8=JSON[_0x587b41(0x96)](_0x549799),_0x4554ec=_0x2bc45c[_0x587b41(0xdd)],_0x1c4f17=_0x2bc45c['id'],_0x2e6e57={'memberId':(await this['_sessionService'][_0x587b41(0xca)](_0x51da56))[_0x587b41(0x10a)](),'unitId':_0x51da56,'threadId':_0x4554ec,'mention':_0x18142b,'content':_0x37dbc8,'replyId':_0x1c4f17},_0x267fa4=await this[_0x587b41(0xdb)]['post'](_0x587b41(0xe6)+_0x51da56+_0x587b41(0xce),{'body':_0x2e6e57});return!_0x267fa4[_0x587b41(0xf4)][_0x587b41(0xdc)]||_0x267fa4[_0x587b41(0xf4)][_0x587b41(0xdc)][_0x587b41(0xef)]===0x1;}async[_0x554ab8(0xbb)](_0x321238){const _0x15c654=_0x554ab8,{unitId:_0x5e1df0}=_0x321238,_0x344d8a=_0x321238[_0x15c654(0xdd)],_0x11f762={'memberId':this[_0x15c654(0xa7)][_0x15c654(0xc4)]()[_0x15c654(0xf6)],'unitId':_0x5e1df0,'threadId':_0x344d8a,'solved':_0x321238[_0x15c654(0xf8)]?p[_0x15c654(0x8e)]:p[_0x15c654(0x8b)]},_0x518452=await this['_httpService']['post'](_0x15c654(0xe6)+_0x5e1df0+_0x15c654(0xa5),{'body':_0x11f762});return!_0x518452[_0x15c654(0xf4)][_0x15c654(0xdc)]||_0x518452[_0x15c654(0xf4)][_0x15c654(0xdc)]['code']===0x1;}async[_0x554ab8(0xcc)](_0x4a9244,_0x3fb863,_0x5127cc,_0x3a2bef){const _0x318e2c=_0x554ab8,_0x439932={'memberId':(await this[_0x318e2c(0xa8)][_0x318e2c(0xca)](_0x4a9244))[_0x318e2c(0x10a)](),'threadId':_0x5127cc,'replyId':_0x3a2bef,'unitId':_0x4a9244},_0x1b4deb=await this['_httpService'][_0x318e2c(0x87)](_0x318e2c(0xe6)+_0x4a9244+_0x318e2c(0xb4),{'body':_0x439932});return!_0x1b4deb[_0x318e2c(0xf4)][_0x318e2c(0xdc)]||_0x1b4deb[_0x318e2c(0xf4)][_0x318e2c(0xdc)][_0x318e2c(0xef)]===0x1;}async[_0x554ab8(0xfb)](_0x506b95,_0x4f8710,_0x1480d5){const _0x27b36=_0x554ab8,_0x4bac95={'unitId':_0x506b95,'threadId':_0x1480d5},_0x431236=await this[_0x27b36(0xdb)][_0x27b36(0x87)](_0x27b36(0xe6)+_0x506b95+_0x27b36(0x10d),{'body':_0x4bac95}),_0x144553=_0x1480d5['map'](_0x5582e6=>A(_0x431236[_0x27b36(0xf4)][_0x27b36(0x84)][_0x5582e6],_0x506b95,_0x4f8710))[_0x27b36(0xc8)](Boolean);return Object[_0x27b36(0x109)](_0x431236[_0x27b36(0xf4)][_0x27b36(0x106)])['forEach'](_0x478a75=>{const _0x2f1968=_0x27b36;this[_0x2f1968(0xa7)][_0x2f1968(0xf5)](_0x478a75);}),_0x144553;}[_0x554ab8(0x8f)](_0x273d8d){const _0x22aac5=_0x554ab8;return{'id':_0x273d8d['id'],'threadId':_0x273d8d[_0x22aac5(0xdd)],'ref':_0x273d8d['ref']};}};C=H([I(0x0,c[_0x554ab8(0x105)](O[_0x554ab8(0x10f)])),I(0x1,c[_0x554ab8(0x105)](c[_0x554ab8(0xc3)])),I(0x2,c[_0x554ab8(0x105)](y['CollaborationSessionService'])),I(0x3,c[_0x554ab8(0x105)](c[_0x554ab8(0xbe)]))],C);var J=Object['defineProperty'],F=Object[_0x554ab8(0xc7)],Z=(_0x2173aa,_0x86ca3,_0x2af8ab,_0x40c3e8)=>{const _0x49990a=_0x554ab8;for(var _0x2f9722=_0x40c3e8>0x1?void 0x0:_0x40c3e8?F(_0x86ca3,_0x2af8ab):_0x86ca3,_0x96eae8=_0x2173aa[_0x49990a(0xde)]-0x1,_0x36f788;_0x96eae8>=0x0;_0x96eae8--)(_0x36f788=_0x2173aa[_0x96eae8])&&(_0x2f9722=(_0x40c3e8?_0x36f788(_0x86ca3,_0x2af8ab,_0x2f9722):_0x36f788(_0x2f9722))||_0x2f9722);return _0x40c3e8&&_0x2f9722&&J(_0x86ca3,_0x2af8ab,_0x2f9722),_0x2f9722;},W=(_0x316da8,_0x240a01)=>(_0x4d7511,_0x21debf)=>_0x240a01(_0x4d7511,_0x21debf,_0x316da8);let D=class{constructor(_0x5c8d90){const _0x5c94b9=_0x554ab8;this[_0x5c94b9(0xdb)]=_0x5c8d90;}async[_0x554ab8(0xc9)](_0x2ab793,_0x1f9330,_0x2d69bb){const _0x2e7e5c=_0x554ab8,_0x6f6bbe=new URL(window[_0x2e7e5c(0xfc)][_0x2e7e5c(0xda)])[_0x2e7e5c(0xbf)][_0x2e7e5c(0xac)](_0x2e7e5c(0xe5));if(!_0x6f6bbe)return[];const _0x273fc4=window[_0x2e7e5c(0xfc)][_0x2e7e5c(0x10c)],_0x4fcaab=window[_0x2e7e5c(0xfc)][_0x2e7e5c(0x112)]==='https:'?_0x2e7e5c(0xc2):_0x2e7e5c(0xf7);return(await this[_0x2e7e5c(0xdb)][_0x2e7e5c(0xac)](_0x4fcaab+_0x2e7e5c(0xa9)+_0x273fc4+_0x2e7e5c(0xfd),{'params':{'objectID':_0x6f6bbe,'unitID':_0x6f6bbe}}))[_0x2e7e5c(0xf4)][_0x2e7e5c(0x100)][_0x2e7e5c(0x90)](_0xbc78e9=>{const _0x7de3db=_0x2e7e5c;var _0x394686,_0x22851f,_0x1627ba,_0x216901,_0xc8b96f,_0x384f1d;return{'id':(_0x22851f=(_0x394686=_0xbc78e9['subject'])==null?void 0x0:_0x394686[_0x7de3db(0xf6)])!=null?_0x22851f:'','label':(_0x216901=(_0x1627ba=_0xbc78e9[_0x7de3db(0xa6)])==null?void 0x0:_0x1627ba[_0x7de3db(0x88)])!=null?_0x216901:'','icon':(_0x384f1d=(_0xc8b96f=_0xbc78e9[_0x7de3db(0xa6)])==null?void 0x0:_0xc8b96f[_0x7de3db(0xe0)])!=null?_0x384f1d:'','type':_0x7de3db(0xa1)};});}};D=Z([W(0x0,c[_0x554ab8(0x105)](O[_0x554ab8(0x10f)]))],D);var z=Object['defineProperty'],B=Object[_0x554ab8(0xc7)],K=(_0x3a155e,_0x51e748,_0x11d325,_0x457d6f)=>{const _0x52489a=_0x554ab8;for(var _0x54c06a=_0x457d6f>0x1?void 0x0:_0x457d6f?B(_0x51e748,_0x11d325):_0x51e748,_0x5ccc48=_0x3a155e[_0x52489a(0xde)]-0x1,_0x531392;_0x5ccc48>=0x0;_0x5ccc48--)(_0x531392=_0x3a155e[_0x5ccc48])&&(_0x54c06a=(_0x457d6f?_0x531392(_0x51e748,_0x11d325,_0x54c06a):_0x531392(_0x54c06a))||_0x54c06a);return _0x457d6f&&_0x54c06a&&z(_0x51e748,_0x11d325,_0x54c06a),_0x54c06a;},S=(_0x3316a5,_0xf352d1)=>(_0x393ea9,_0x1a57e2)=>_0xf352d1(_0x393ea9,_0x1a57e2,_0x3316a5);let f=class extends c['Disposable']{constructor(_0x39eb8d,_0x1c91a9,_0xba7d24,_0x2b470d){const _0x203a18=_0x554ab8;super(),this[_0x203a18(0xd0)]=_0x39eb8d,this[_0x203a18(0xdf)]=_0x1c91a9,this[_0x203a18(0xb5)]=_0xba7d24,this[_0x203a18(0xb7)]=_0x2b470d,this[_0x203a18(0x98)]();}[_0x554ab8(0x98)](){const _0xe564ac=_0x554ab8;this[_0xe564ac(0xd0)][_0xe564ac(0x111)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xe564ac(0x113)]=!0x1,this['_threadCommentMentionDataService'][_0xe564ac(0x111)]=this[_0xe564ac(0xb7)];}};f=K([c[_0x554ab8(0x9c)](c['LifecycleStages'][_0x554ab8(0x9d)],f),S(0x0,g[_0x554ab8(0xc1)]),S(0x1,c[_0x554ab8(0x105)](C)),S(0x2,N[_0x554ab8(0x93)]),S(0x3,c['Inject'](D))],f);var V=Object['defineProperty'],Q=Object[_0x554ab8(0xc7)],X=(_0x4f13d5,_0x4ebc90,_0x47f22f,_0x1bbcfd)=>{const _0x302872=_0x554ab8;for(var _0x1b4baf=_0x1bbcfd>0x1?void 0x0:_0x1bbcfd?Q(_0x4ebc90,_0x47f22f):_0x4ebc90,_0x5286f2=_0x4f13d5[_0x302872(0xde)]-0x1,_0x28c8e3;_0x5286f2>=0x0;_0x5286f2--)(_0x28c8e3=_0x4f13d5[_0x5286f2])&&(_0x1b4baf=(_0x1bbcfd?_0x28c8e3(_0x4ebc90,_0x47f22f,_0x1b4baf):_0x28c8e3(_0x1b4baf))||_0x1b4baf);return _0x1bbcfd&&_0x1b4baf&&V(_0x4ebc90,_0x47f22f,_0x1b4baf),_0x1b4baf;},_=(_0x8b1144,_0x1442a4)=>(_0x49d049,_0x46c4e5)=>_0x1442a4(_0x49d049,_0x46c4e5,_0x8b1144);let b=class extends c[_0x554ab8(0x103)]{constructor(_0x1a3564,_0x5719fb,_0x4c8146,_0x4018d5){const _0x18f7fe=_0x554ab8;super(),this[_0x18f7fe(0xe3)]=_0x1a3564,this[_0x18f7fe(0xd3)]=_0x5719fb,this[_0x18f7fe(0xa7)]=_0x4c8146,this['_injector']=_0x4018d5,this[_0x18f7fe(0xcf)](),this[_0x18f7fe(0xed)]();}[_0x554ab8(0xed)](){const _0x15536d=_0x554ab8;this[_0x15536d(0xf0)](this[_0x15536d(0xd3)][_0x15536d(0xa4)]['pipe'](E[_0x15536d(0x9a)](0x10))[_0x15536d(0xea)](_0x333207=>{const _0x1fbb1c=_0x15536d,_0x392b3c=new Set();_0x333207[_0x1fbb1c(0x9e)](_0x9525f1=>{const _0x5c040b=_0x1fbb1c;switch(_0x9525f1[_0x5c040b(0xee)]){case _0x5c040b(0xf3):{const _0x29fb73=_0x9525f1['payload'][_0x5c040b(0xb8)];_0x392b3c[_0x5c040b(0xf3)](_0x29fb73);break;}}}),x(this[_0x1fbb1c(0xc5)],_0x392b3c);}));}[_0x554ab8(0xcf)](){const _0xcdb557=_0x554ab8;this[_0xcdb557(0xf0)](this[_0xcdb557(0xe3)]['commentUpdate$']['subscribe'](async _0xe135ea=>{const _0x423f26=_0xcdb557;var _0x5808fb,_0x443816;const _0x4595a7=this[_0x423f26(0xd3)][_0x423f26(0xd2)](_0xe135ea['unitId'],_0xe135ea[_0x423f26(0xdd)]);if(!_0x4595a7)return;const {unitId:_0x13f44e,subUnitId:_0x5ec348}=_0x4595a7;switch(_0xe135ea[_0x423f26(0xa1)]&&this['_userService']['addUser'](_0xe135ea['user']),_0xe135ea[_0x423f26(0xee)]){case v[_0x423f26(0x101)]:break;case v[_0x423f26(0xf1)]:{this[_0x423f26(0xd3)][_0x423f26(0x107)](_0x13f44e,_0x5ec348,{'unitId':_0x13f44e,'subUnitId':_0x5ec348,'ref':'','id':_0xe135ea[_0x423f26(0xec)],'dT':P(+_0xe135ea['createTimestamp']),'threadId':_0xe135ea['threadId'],'personId':(_0x443816=(_0x5808fb=_0xe135ea[_0x423f26(0xa1)])==null?void 0x0:_0x5808fb[_0x423f26(0xf6)])!=null?_0x443816:_0xe135ea[_0x423f26(0xa2)],'text':JSON['parse'](_0xe135ea[_0x423f26(0xc6)]),'parentId':_0x4595a7['id']});break;}case v[_0x423f26(0xd8)]:{const _0x15b312=this[_0x423f26(0xd3)][_0x423f26(0x82)](_0x13f44e,_0x5ec348,_0xe135ea[_0x423f26(0xec)]);_0x15b312&&_0x15b312[_0x423f26(0xba)]&&this[_0x423f26(0xd3)][_0x423f26(0xcc)](_0x13f44e,_0x5ec348,_0xe135ea[_0x423f26(0xec)]);break;}case v[_0x423f26(0x97)]:{this[_0x423f26(0xd3)][_0x423f26(0xb0)](_0x13f44e,_0x5ec348,{'commentId':_0xe135ea[_0x423f26(0xec)],'text':JSON[_0x423f26(0xd1)](_0xe135ea['content'])});break;}case v['Solve']:{const _0x5c6a7a=this['_threadCommentModel']['getThread'](_0x13f44e,_0xe135ea[_0x423f26(0xdd)]);_0x5c6a7a&&this[_0x423f26(0xd3)][_0x423f26(0xbb)](_0x13f44e,_0x5ec348,_0x5c6a7a['id'],_0xe135ea['solved']===p[_0x423f26(0x8e)]);break;}}}));}};b=X([c['OnLifecycle'](c[_0x554ab8(0xe7)][_0x554ab8(0xad)],b),_(0x0,c[_0x554ab8(0x105)](y['CommentService'])),_(0x1,c['Inject'](g[_0x554ab8(0xbd)])),_(0x2,c[_0x554ab8(0x105)](c['UserManagerService'])),_(0x3,c[_0x554ab8(0x105)](c[_0x554ab8(0xbe)]))],b);const k=_0x554ab8(0xf9),ee={};var U=Object[_0x554ab8(0xd9)],re=Object['getOwnPropertyDescriptor'],te=(_0x583835,_0x5a496c,_0x5af694)=>_0x5a496c in _0x583835?U(_0x583835,_0x5a496c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5af694}):_0x583835[_0x5a496c]=_0x5af694,se=(_0x1a48a9,_0x861c7e,_0x3c4f4f,_0x48bbcf)=>{const _0x295832=_0x554ab8;for(var _0x246baa=_0x48bbcf>0x1?void 0x0:_0x48bbcf?re(_0x861c7e,_0x3c4f4f):_0x861c7e,_0x399b66=_0x1a48a9[_0x295832(0xde)]-0x1,_0x508e87;_0x399b66>=0x0;_0x399b66--)(_0x508e87=_0x1a48a9[_0x399b66])&&(_0x246baa=(_0x48bbcf?_0x508e87(_0x861c7e,_0x3c4f4f,_0x246baa):_0x508e87(_0x246baa))||_0x246baa);return _0x48bbcf&&_0x246baa&&U(_0x861c7e,_0x3c4f4f,_0x246baa),_0x246baa;},T=(_0x2d42fb,_0x4c691e)=>(_0x4f749c,_0x3efd98)=>_0x4c691e(_0x4f749c,_0x3efd98,_0x2d42fb),R=(_0x54bfc4,_0x12cd1d,_0x3e9748)=>te(_0x54bfc4,typeof _0x12cd1d!=_0x554ab8(0xb1)?_0x12cd1d+'':_0x12cd1d,_0x3e9748);function _0x3a83(){const _0x99fc82=['syncUpdateMutationToColla','getComment','UNIVER_UNKNOWN','comments','solved','12yJMlTP','post','name','/reply','UniverInstanceType','OpenOrReOpen','IConfigService','5473153DRacKP','Solved','saveCommentToSnapshot','map','DependentOn','UniverThreadCommentDataSourcePlugin','IThreadCommentMentionDataService','pluginName','toStringTag','stringify','Edit','_initDataSource','format','bufferTime','rangeId','OnLifecycle','Starting','forEach','UniverThreadCommentPlugin','Unknown','user','userId','@univerjs/core','commentUpdate$','/solved','subject','_userService','_sessionService','://','8cGKrvQ','slice','get','Ready','getUser','174516BJXyyJ','updateComment','symbol','replies','3736172gvGDWx','/delete','_threadCommentMentionDataService','3NpnCBL','_threadCommentMentionDataSource','personId','@univerjs/network','parentId','resolveComment','UNRECOGNIZED','ThreadCommentModel','Injector','searchParams','reply','IThreadCommentDataSourceService','https','UserManagerService','getCurrentUser','_injector','content','getOwnPropertyDescriptor','filter','getMentions','requireSession','/add','deleteComment','dayjs','/edit','_init','_threadCommentDataSourceService','parse','getThread','_threadCommentModel','3NtsUwu','onStarting','YYYY/MM/DD\x20HH:mm','3773670qOnlSW','Delete','defineProperty','href','_httpService','error','threadId','length','_threadCommentDataSource','avatar','@univerjs/thread-comment-ui','387oIAQLN','_commentService','createTimestamp','unit','/universer-api/comment/unit/','LifecycleStages','CustomRangeType','COMMENT','subscribe','_configService','replyId','_initUserSync','type','code','disposeWithMe','Reply','rangeType','add','body','addUser','userID','http','resolved','thread-comment-data-source.config','customRanges','listComments','location','/universer-api/authz/collaborator','6130069ubMJHd','141054jwtNeJ','collaborators','Add','Module','Disposable','Solve','Inject','users','addComment','/universer-api/user/list','values','getMemberID','size','host','/list','rxjs','HTTPService','212370ERVyPu','dataSource','protocol'];_0x3a83=function(){return _0x99fc82;};return _0x3a83();}exports[_0x554ab8(0x92)]=class extends c['Plugin']{constructor(_0x1773fb=ee,_0x35d89a,_0x461e64){const _0x56cfc9=_0x554ab8;super(),this['_config']=_0x1773fb,this[_0x56cfc9(0xc5)]=_0x35d89a,this[_0x56cfc9(0xeb)]=_0x461e64;const {..._0x4f669c}=this['_config'];this[_0x56cfc9(0xeb)]['setConfig'](k,_0x4f669c);}[_0x554ab8(0xd5)](){const _0x4aec82=_0x554ab8;[[D],[C],[f],[b]][_0x4aec82(0x9e)](_0x53fdac=>{const _0xa19662=_0x4aec82;this[_0xa19662(0xc5)]['add'](_0x53fdac);});}},R(exports[_0x554ab8(0x92)],_0x554ab8(0x94),q),R(exports[_0x554ab8(0x92)],'type',c[_0x554ab8(0x8a)][_0x554ab8(0x83)]),exports[_0x554ab8(0x92)]=se([c[_0x554ab8(0x91)](g[_0x554ab8(0x9f)],N['UniverThreadCommentUIPlugin'],y['UniverCollaborationClientPlugin']),T(0x1,c[_0x554ab8(0x105)](c[_0x554ab8(0xbe)])),T(0x2,c[_0x554ab8(0x8c)])],exports[_0x554ab8(0x92)]);
1
+ 'use strict';const _0x24cf61=_0x2330;(function(_0x373bb6,_0x2214d3){const _0x51a8f3=_0x2330,_0x258ff2=_0x373bb6();while(!![]){try{const _0x19ea01=-parseInt(_0x51a8f3(0x136))/0x1*(parseInt(_0x51a8f3(0xc6))/0x2)+-parseInt(_0x51a8f3(0xc1))/0x3+parseInt(_0x51a8f3(0x10e))/0x4*(-parseInt(_0x51a8f3(0xcf))/0x5)+-parseInt(_0x51a8f3(0xed))/0x6*(parseInt(_0x51a8f3(0x112))/0x7)+-parseInt(_0x51a8f3(0xdc))/0x8*(parseInt(_0x51a8f3(0xcb))/0x9)+-parseInt(_0x51a8f3(0x12b))/0xa*(parseInt(_0x51a8f3(0xf9))/0xb)+parseInt(_0x51a8f3(0x102))/0xc*(parseInt(_0x51a8f3(0xff))/0xd);if(_0x19ea01===_0x2214d3)break;else _0x258ff2['push'](_0x258ff2['shift']());}catch(_0x5017d3){_0x258ff2['push'](_0x258ff2['shift']());}}}(_0x2e01,0x25aa2));Object['defineProperty'](exports,Symbol[_0x24cf61(0xe6)],{'value':_0x24cf61(0xc9)});const c=require('@univerjs/core'),g=require(_0x24cf61(0x122)),N=require(_0x24cf61(0xc2)),y=require('@univerjs-pro/collaboration-client'),O=require(_0x24cf61(0xec)),$=require(_0x24cf61(0x119)),E=require(_0x24cf61(0xf4)),q=_0x24cf61(0xc5);var p=(_0xf6f2cb=>(_0xf6f2cb[_0xf6f2cb[_0x24cf61(0xbe)]=0x0]=_0x24cf61(0xbe),_0xf6f2cb[_0xf6f2cb[_0x24cf61(0xc0)]=0x1]=_0x24cf61(0xc0),_0xf6f2cb[_0xf6f2cb['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xf6f2cb))(p||{}),v=(_0x15a9c9=>(_0x15a9c9[_0x15a9c9['Unknown']=0x0]=_0x24cf61(0xfa),_0x15a9c9[_0x15a9c9[_0x24cf61(0xf7)]=0x1]=_0x24cf61(0xf7),_0x15a9c9[_0x15a9c9[_0x24cf61(0xeb)]=0x2]=_0x24cf61(0xeb),_0x15a9c9[_0x15a9c9['Edit']=0x3]=_0x24cf61(0xd3),_0x15a9c9[_0x15a9c9[_0x24cf61(0xf3)]=0x4]=_0x24cf61(0xf3),_0x15a9c9[_0x15a9c9[_0x24cf61(0x13c)]=0x5]=_0x24cf61(0x13c),_0x15a9c9[_0x15a9c9[_0x24cf61(0x104)]=-0x1]='UNRECOGNIZED',_0x15a9c9))(v||{});function _0x2330(_0x1ea35a,_0x465c7f){const _0x2e014f=_0x2e01();return _0x2330=function(_0x23306a,_0x330aef){_0x23306a=_0x23306a-0xbb;let _0x394168=_0x2e014f[_0x23306a];return _0x394168;},_0x2330(_0x1ea35a,_0x465c7f);}const P=_0x519275=>$(new Date(+_0x519275))[_0x24cf61(0x13d)](_0x24cf61(0xd4)),x=async(_0x54e68b,_0xf415d6)=>{const _0x23f86b=_0x24cf61,_0x29ff0e=_0x54e68b[_0x23f86b(0x139)](c[_0x23f86b(0x10d)]),_0x58761c=_0x54e68b[_0x23f86b(0x139)](O[_0x23f86b(0x114)]);_0xf415d6['forEach'](_0x437df2=>{_0x29ff0e['getUser'](_0x437df2)&&_0xf415d6['delete'](_0x437df2);}),_0xf415d6['size']&&(await _0x58761c[_0x23f86b(0x139)]('/universer-api/user/list',{'params':{'userIDs':[..._0xf415d6]}}))[_0x23f86b(0xc8)][_0x23f86b(0x105)][_0x23f86b(0x11f)](_0x4af2d3=>{_0x4af2d3&&_0x29ff0e['addUser'](_0x4af2d3);});};var Y=Object[_0x24cf61(0x13f)],G=Object[_0x24cf61(0x12a)],H=(_0x4dfc1e,_0x1557c5,_0x11030e,_0x25107b)=>{const _0x4c6a07=_0x24cf61;for(var _0x187288=_0x25107b>0x1?void 0x0:_0x25107b?G(_0x1557c5,_0x11030e):_0x1557c5,_0x1f2727=_0x4dfc1e[_0x4c6a07(0x124)]-0x1,_0x31a100;_0x1f2727>=0x0;_0x1f2727--)(_0x31a100=_0x4dfc1e[_0x1f2727])&&(_0x187288=(_0x25107b?_0x31a100(_0x1557c5,_0x11030e,_0x187288):_0x31a100(_0x187288))||_0x187288);return _0x25107b&&_0x187288&&Y(_0x1557c5,_0x11030e,_0x187288),_0x187288;},I=(_0x596145,_0x1e883b)=>(_0x164ff5,_0x9d3b45)=>_0x1e883b(_0x164ff5,_0x9d3b45,_0x596145);function L(_0x451234,_0x2c9c05){const _0x1b7a63=_0x24cf61,_0x744397=_0x451234[_0x1b7a63(0xf2)][0x0];return{..._0x2c9c05,'id':_0x744397[_0x1b7a63(0x132)],'resolved':_0x451234['solved']===0x1,'dT':P(_0x744397[_0x1b7a63(0x103)]),'personId':_0x744397[_0x1b7a63(0xd1)],'threadId':_0x744397[_0x1b7a63(0x130)]};}function A(_0x2adafe,_0x2be33f,_0x3d52b0){const _0x58f5c0=_0x24cf61;var _0x1694d5,_0x23c5da;if(((_0x23c5da=(_0x1694d5=_0x2adafe==null?void 0x0:_0x2adafe['replies'])==null?void 0x0:_0x1694d5[_0x58f5c0(0x124)])!=null?_0x23c5da:0x0)>0x0){const _0x4f9240=(_0x4735ce,_0x58eda5)=>({'id':_0x4735ce['replyId'],'threadId':_0x4735ce[_0x58f5c0(0x130)],'dT':P(_0x4735ce[_0x58f5c0(0x103)]),'personId':_0x4735ce[_0x58f5c0(0xd1)],'resolved':_0x2adafe[_0x58f5c0(0xda)]===p[_0x58f5c0(0xc0)],'unitId':_0x2be33f,'subUnitId':_0x3d52b0,'text':JSON[_0x58f5c0(0x10c)](_0x4735ce[_0x58f5c0(0xfe)]),'parentId':_0x58eda5}),_0x26d72e=_0x4f9240(_0x2adafe['replies'][0x0]);return{..._0x26d72e,'children':_0x2adafe[_0x58f5c0(0xf2)]['slice'](0x1)[_0x58f5c0(0xe0)](_0xfab8c=>_0x4f9240(_0xfab8c,_0x26d72e['id']))};}return null;}let C=class{constructor(_0x540051,_0xffad9a,_0x6e74ec,_0x4624a2){const _0x18fc19=_0x24cf61;this['_httpService']=_0x540051,this[_0x18fc19(0x135)]=_0xffad9a,this[_0x18fc19(0xe5)]=_0x6e74ec,this['_injector']=_0x4624a2;}async[_0x24cf61(0xe2)](_0x3a1c68){const _0x46005b=_0x24cf61;var _0x420fef,_0x21d2e2;const {parentId:_0x5db820,unitId:_0x6192b7,text:_0x5e97ab,threadId:_0x44bd5a}=_0x3a1c68,_0x4d62de=(_0x21d2e2=(_0x420fef=_0x5e97ab[_0x46005b(0x10f)])==null?void 0x0:_0x420fef[_0x46005b(0xfc)](_0x14888e=>_0x14888e[_0x46005b(0xc3)]===c['CustomRangeType'][_0x46005b(0x10a)])[_0x46005b(0xe0)](_0x33ed9a=>_0x33ed9a[_0x46005b(0x140)]))!=null?_0x21d2e2:[],_0xe628fe=JSON['stringify'](_0x5e97ab),_0x2117f5=(await this[_0x46005b(0xe5)][_0x46005b(0x142)](_0x6192b7))['getMemberID']();if(_0x5db820){const _0x5dd6b7={'memberId':_0x2117f5,'unitId':_0x6192b7,'content':_0xe628fe,'mention':_0x4d62de,'threadId':_0x44bd5a},_0x5e3674=(await this[_0x46005b(0x107)][_0x46005b(0xd0)](_0x46005b(0xd8)+_0x6192b7+'/reply',{'body':_0x5dd6b7}))[_0x46005b(0xc8)][_0x46005b(0x133)];return{..._0x3a1c68,'id':_0x5e3674[_0x46005b(0x132)],'dT':$(+_0x5e3674[_0x46005b(0x103)])[_0x46005b(0x13d)](_0x46005b(0xd4)),'personId':_0x5e3674[_0x46005b(0xd1)]};}else{const _0x2b2e4f={'memberId':_0x2117f5,'unitId':_0x6192b7,'content':_0xe628fe,'mention':_0x4d62de},_0x59a149=await this[_0x46005b(0x107)][_0x46005b(0xd0)](_0x46005b(0xd8)+_0x6192b7+_0x46005b(0xe4),{'body':_0x2b2e4f});return L(_0x59a149[_0x46005b(0xc8)][_0x46005b(0x123)],_0x3a1c68);}}async[_0x24cf61(0x113)](_0x533a45){const _0x4e9139=_0x24cf61;var _0x25b0e4,_0xd56e68;const {text:_0x1662cb,unitId:_0x58e2d2}=_0x533a45,_0x24127c=(_0xd56e68=(_0x25b0e4=_0x1662cb['customRanges'])==null?void 0x0:_0x25b0e4[_0x4e9139(0xfc)](_0x2f1175=>_0x2f1175[_0x4e9139(0xc3)]===c[_0x4e9139(0x12f)][_0x4e9139(0x10a)])['map'](_0x58c6da=>_0x58c6da[_0x4e9139(0x140)]))!=null?_0xd56e68:[],_0xed0633=JSON['stringify'](_0x1662cb),_0x373fcf=_0x533a45[_0x4e9139(0x130)],_0x3c7852=_0x533a45['id'],_0x2cb91a={'memberId':(await this[_0x4e9139(0xe5)][_0x4e9139(0x142)](_0x58e2d2))[_0x4e9139(0x13a)](),'unitId':_0x58e2d2,'threadId':_0x373fcf,'mention':_0x24127c,'content':_0xed0633,'replyId':_0x3c7852},_0x3a94d0=await this[_0x4e9139(0x107)][_0x4e9139(0xd0)](_0x4e9139(0xd8)+_0x58e2d2+_0x4e9139(0xf0),{'body':_0x2cb91a});return!_0x3a94d0[_0x4e9139(0xc8)][_0x4e9139(0x13e)]||_0x3a94d0[_0x4e9139(0xc8)][_0x4e9139(0x13e)]['code']===0x1;}async[_0x24cf61(0xfd)](_0x4f7b20){const _0x3291d0=_0x24cf61,{unitId:_0x17a43d}=_0x4f7b20,_0x295a26=_0x4f7b20[_0x3291d0(0x130)],_0x53f44e={'memberId':this[_0x3291d0(0x135)][_0x3291d0(0xf6)]()[_0x3291d0(0x125)],'unitId':_0x17a43d,'threadId':_0x295a26,'solved':_0x4f7b20[_0x3291d0(0xd6)]?p[_0x3291d0(0xc0)]:p[_0x3291d0(0xbe)]},_0x132772=await this[_0x3291d0(0x107)]['post'](_0x3291d0(0xd8)+_0x17a43d+_0x3291d0(0x127),{'body':_0x53f44e});return!_0x132772['body']['error']||_0x132772[_0x3291d0(0xc8)]['error'][_0x3291d0(0x108)]===0x1;}async['deleteComment'](_0x29bb99,_0x282cce,_0x480369,_0x27f7c6){const _0x174990=_0x24cf61,_0x585340={'memberId':(await this[_0x174990(0xe5)][_0x174990(0x142)](_0x29bb99))[_0x174990(0x13a)](),'threadId':_0x480369,'replyId':_0x27f7c6,'unitId':_0x29bb99},_0x4882f2=await this[_0x174990(0x107)][_0x174990(0xd0)](_0x174990(0xd8)+_0x29bb99+_0x174990(0xd5),{'body':_0x585340});return!_0x4882f2['body'][_0x174990(0x13e)]||_0x4882f2[_0x174990(0xc8)][_0x174990(0x13e)][_0x174990(0x108)]===0x1;}async[_0x24cf61(0xfb)](_0x2f8595,_0x5f2be4,_0x31c2e7){const _0x236f21=_0x24cf61,_0x33d1d9={'unitId':_0x2f8595,'threadId':_0x31c2e7},_0x3b4482=await this[_0x236f21(0x107)][_0x236f21(0xd0)](_0x236f21(0xd8)+_0x2f8595+_0x236f21(0xbd),{'body':_0x33d1d9}),_0x32de62=_0x31c2e7[_0x236f21(0xe0)](_0x15e9ca=>A(_0x3b4482[_0x236f21(0xc8)]['comments'][_0x15e9ca],_0x2f8595,_0x5f2be4))[_0x236f21(0xfc)](Boolean);return Object[_0x236f21(0x106)](_0x3b4482['body'][_0x236f21(0x105)])[_0x236f21(0x11f)](_0x29ff79=>{const _0x748310=_0x236f21;this[_0x748310(0x135)][_0x748310(0xf8)](_0x29ff79);}),_0x32de62;}[_0x24cf61(0x117)](_0xf84de5){const _0xa6b2ec=_0x24cf61;return{'id':_0xf84de5['id'],'threadId':_0xf84de5[_0xa6b2ec(0x130)],'ref':_0xf84de5[_0xa6b2ec(0x13b)]};}};C=H([I(0x0,c['Inject'](O['HTTPService'])),I(0x1,c['Inject'](c[_0x24cf61(0x10d)])),I(0x2,c[_0x24cf61(0x11e)](y[_0x24cf61(0x137)])),I(0x3,c[_0x24cf61(0x11e)](c['Injector']))],C);var J=Object[_0x24cf61(0x13f)],F=Object[_0x24cf61(0x12a)],Z=(_0x552214,_0x490a3b,_0x2d4401,_0x1e5cc8)=>{for(var _0x56f7f6=_0x1e5cc8>0x1?void 0x0:_0x1e5cc8?F(_0x490a3b,_0x2d4401):_0x490a3b,_0x4117d7=_0x552214['length']-0x1,_0xedee0c;_0x4117d7>=0x0;_0x4117d7--)(_0xedee0c=_0x552214[_0x4117d7])&&(_0x56f7f6=(_0x1e5cc8?_0xedee0c(_0x490a3b,_0x2d4401,_0x56f7f6):_0xedee0c(_0x56f7f6))||_0x56f7f6);return _0x1e5cc8&&_0x56f7f6&&J(_0x490a3b,_0x2d4401,_0x56f7f6),_0x56f7f6;},W=(_0x196aac,_0x1b7d3b)=>(_0x281b38,_0x1fffcc)=>_0x1b7d3b(_0x281b38,_0x1fffcc,_0x196aac);let D=class{constructor(_0x3f7205){const _0x4a82d8=_0x24cf61;this[_0x4a82d8(0x107)]=_0x3f7205;}async[_0x24cf61(0xdd)](_0x4fd94a,_0x31f520,_0x1707be){const _0x5b33dc=_0x24cf61,_0x10a1bb=new URL(window[_0x5b33dc(0xef)][_0x5b33dc(0x12e)])[_0x5b33dc(0x116)][_0x5b33dc(0x139)](_0x5b33dc(0x11c));if(!_0x10a1bb)return[];const _0xd23156=window[_0x5b33dc(0xef)]['host'],_0x5670aa=window['location'][_0x5b33dc(0xe1)]==='https:'?_0x5b33dc(0xd7):'http';return(await this[_0x5b33dc(0x107)][_0x5b33dc(0x139)](_0x5670aa+_0x5b33dc(0xf1)+_0xd23156+'/universer-api/authz/collaborator',{'params':{'objectID':_0x10a1bb,'unitID':_0x10a1bb}}))['body']['collaborators'][_0x5b33dc(0xe0)](_0x2231d3=>{const _0x236af0=_0x5b33dc;var _0x1f8e05,_0x70a783,_0x240b2b,_0x7086b0,_0x3cc1fb,_0xca2d9b;return{'id':(_0x70a783=(_0x1f8e05=_0x2231d3[_0x236af0(0xdf)])==null?void 0x0:_0x1f8e05[_0x236af0(0x125)])!=null?_0x70a783:'','label':(_0x7086b0=(_0x240b2b=_0x2231d3['subject'])==null?void 0x0:_0x240b2b['name'])!=null?_0x7086b0:'','icon':(_0xca2d9b=(_0x3cc1fb=_0x2231d3[_0x236af0(0xdf)])==null?void 0x0:_0x3cc1fb[_0x236af0(0x110)])!=null?_0xca2d9b:'','type':_0x236af0(0x101)};});}};function _0x2e01(){const _0x4f61ed=['updateComment','HTTPService','UniverThreadCommentPlugin','searchParams','saveCommentToSnapshot','Disposable','dayjs','_configService','_threadCommentMentionDataSource','unit','pipe','Inject','forEach','Starting','IThreadCommentMentionDataService','@univerjs/thread-comment','comment','length','userID','_commentService','/solved','personId','dataSource','getOwnPropertyDescriptor','796490gYtGmi','_threadCommentMentionDataService','UniverCollaborationClientPlugin','href','CustomRangeType','threadId','IConfigService','replyId','reply','UniverThreadCommentDataSourcePlugin','_userService','2hGzNWC','CollaborationSessionService','LifecycleStages','get','getMemberID','ref','Solve','format','error','defineProperty','rangeId','type','requireSession','subscribe','UniverInstanceType','/list','OpenOrReOpen','_initDataSource','Solved','497313NoQtEv','@univerjs/thread-comment-ui','rangeType','bufferTime','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','91478SpGokK','OnLifecycle','body','Module','commentUpdate$','837AqYRZK','parentId','_injector','_initUserSync','405095mdZhGU','post','userId','setConfig','Edit','YYYY/MM/DD\x20HH:mm','/delete','resolved','https','/universer-api/comment/unit/','Plugin','solved','ThreadCommentModel','12416MhCerO','getMentions','deleteComment','subject','map','protocol','addComment','getThread','/add','_sessionService','toStringTag','_threadCommentDataSourceService','IThreadCommentDataSourceService','add','onStarting','Reply','@univerjs/network','61206hgoLYd','_threadCommentDataSource','location','/edit','://','replies','Delete','rxjs','_threadCommentModel','getCurrentUser','Add','addUser','22JwYGZS','Unknown','listComments','filter','resolveComment','content','65rMbBXK','_init','user','2375988RqnwhF','createTimestamp','UNRECOGNIZED','users','values','_httpService','code','Injector','COMMENT','_config','parse','UserManagerService','4ijEtXZ','customRanges','avatar','unitId','133hXMGdu'];_0x2e01=function(){return _0x4f61ed;};return _0x2e01();}D=Z([W(0x0,c[_0x24cf61(0x11e)](O[_0x24cf61(0x114)]))],D);var z=Object[_0x24cf61(0x13f)],B=Object[_0x24cf61(0x12a)],K=(_0x4541ac,_0x23debe,_0x3af438,_0x3ef201)=>{const _0x454f9f=_0x24cf61;for(var _0x586c4a=_0x3ef201>0x1?void 0x0:_0x3ef201?B(_0x23debe,_0x3af438):_0x23debe,_0x628980=_0x4541ac[_0x454f9f(0x124)]-0x1,_0x3c280a;_0x628980>=0x0;_0x628980--)(_0x3c280a=_0x4541ac[_0x628980])&&(_0x586c4a=(_0x3ef201?_0x3c280a(_0x23debe,_0x3af438,_0x586c4a):_0x3c280a(_0x586c4a))||_0x586c4a);return _0x3ef201&&_0x586c4a&&z(_0x23debe,_0x3af438,_0x586c4a),_0x586c4a;},S=(_0x4d6dc0,_0x30e84e)=>(_0x9e331b,_0x338c29)=>_0x30e84e(_0x9e331b,_0x338c29,_0x4d6dc0);let f=class extends c[_0x24cf61(0x118)]{constructor(_0x31ab4b,_0x1cddf4,_0x173a45,_0x5f2178){const _0x5f2d95=_0x24cf61;super(),this[_0x5f2d95(0xe7)]=_0x31ab4b,this[_0x5f2d95(0xee)]=_0x1cddf4,this['_threadCommentMentionDataService']=_0x173a45,this[_0x5f2d95(0x11b)]=_0x5f2178,this[_0x5f2d95(0xbf)]();}[_0x24cf61(0xbf)](){const _0x3c485b=_0x24cf61;this['_threadCommentDataSourceService'][_0x3c485b(0x129)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this[_0x3c485b(0x12c)][_0x3c485b(0x129)]=this[_0x3c485b(0x11b)];}};f=K([c[_0x24cf61(0xc7)](c['LifecycleStages'][_0x24cf61(0x120)],f),S(0x0,g[_0x24cf61(0xe8)]),S(0x1,c[_0x24cf61(0x11e)](C)),S(0x2,N[_0x24cf61(0x121)]),S(0x3,c['Inject'](D))],f);var V=Object['defineProperty'],Q=Object['getOwnPropertyDescriptor'],X=(_0xc31d7f,_0x4b2617,_0x3c52b2,_0x17b898)=>{const _0x5b6156=_0x24cf61;for(var _0x58702c=_0x17b898>0x1?void 0x0:_0x17b898?Q(_0x4b2617,_0x3c52b2):_0x4b2617,_0x2f6d82=_0xc31d7f[_0x5b6156(0x124)]-0x1,_0x4d43d2;_0x2f6d82>=0x0;_0x2f6d82--)(_0x4d43d2=_0xc31d7f[_0x2f6d82])&&(_0x58702c=(_0x17b898?_0x4d43d2(_0x4b2617,_0x3c52b2,_0x58702c):_0x4d43d2(_0x58702c))||_0x58702c);return _0x17b898&&_0x58702c&&V(_0x4b2617,_0x3c52b2,_0x58702c),_0x58702c;},_=(_0x4acdf8,_0x202ea9)=>(_0x5421eb,_0x1ab26d)=>_0x202ea9(_0x5421eb,_0x1ab26d,_0x4acdf8);let b=class extends c[_0x24cf61(0x118)]{constructor(_0x46e296,_0x4b26b0,_0x2de952,_0x4f9252){const _0x2a8a42=_0x24cf61;super(),this['_commentService']=_0x46e296,this['_threadCommentModel']=_0x4b26b0,this['_userService']=_0x2de952,this[_0x2a8a42(0xcd)]=_0x4f9252,this['_init'](),this[_0x2a8a42(0xce)]();}['_initUserSync'](){const _0xf15f13=_0x24cf61;this['disposeWithMe'](this[_0xf15f13(0xf5)][_0xf15f13(0xca)][_0xf15f13(0x11d)](E[_0xf15f13(0xc4)](0x10))[_0xf15f13(0xbb)](_0x37be64=>{const _0x1eb9d7=new Set();_0x37be64['forEach'](_0x1f3143=>{const _0x5f3034=_0x2330;switch(_0x1f3143[_0x5f3034(0x141)]){case'add':{const _0x101759=_0x1f3143['payload'][_0x5f3034(0x128)];_0x1eb9d7[_0x5f3034(0xe9)](_0x101759);break;}}}),x(this['_injector'],_0x1eb9d7);}));}[_0x24cf61(0x100)](){const _0x5cda00=_0x24cf61;this['disposeWithMe'](this[_0x5cda00(0x126)][_0x5cda00(0xca)][_0x5cda00(0xbb)](async _0x4665cb=>{const _0x2953b0=_0x5cda00;var _0x124d91,_0x10aa3c;const _0x5a3866=this[_0x2953b0(0xf5)][_0x2953b0(0xe3)](_0x4665cb[_0x2953b0(0x111)],_0x4665cb['threadId']);if(!_0x5a3866)return;const {unitId:_0x123932,subUnitId:_0x5e3526}=_0x5a3866;switch(_0x4665cb[_0x2953b0(0x101)]&&this[_0x2953b0(0x135)][_0x2953b0(0xf8)](_0x4665cb[_0x2953b0(0x101)]),_0x4665cb[_0x2953b0(0x141)]){case v['Add']:break;case v['Reply']:{this[_0x2953b0(0xf5)][_0x2953b0(0xe2)](_0x123932,_0x5e3526,{'unitId':_0x123932,'subUnitId':_0x5e3526,'ref':'','id':_0x4665cb[_0x2953b0(0x132)],'dT':P(+_0x4665cb[_0x2953b0(0x103)]),'threadId':_0x4665cb['threadId'],'personId':(_0x10aa3c=(_0x124d91=_0x4665cb[_0x2953b0(0x101)])==null?void 0x0:_0x124d91[_0x2953b0(0x125)])!=null?_0x10aa3c:_0x4665cb[_0x2953b0(0xd1)],'text':JSON['parse'](_0x4665cb[_0x2953b0(0xfe)]),'parentId':_0x5a3866['id']});break;}case v['Delete']:{const _0x10fa66=this[_0x2953b0(0xf5)]['getComment'](_0x123932,_0x5e3526,_0x4665cb[_0x2953b0(0x132)]);_0x10fa66&&_0x10fa66[_0x2953b0(0xcc)]&&this['_threadCommentModel'][_0x2953b0(0xde)](_0x123932,_0x5e3526,_0x4665cb[_0x2953b0(0x132)]);break;}case v[_0x2953b0(0xd3)]:{this[_0x2953b0(0xf5)][_0x2953b0(0x113)](_0x123932,_0x5e3526,{'commentId':_0x4665cb[_0x2953b0(0x132)],'text':JSON['parse'](_0x4665cb[_0x2953b0(0xfe)])});break;}case v[_0x2953b0(0x13c)]:{const _0x292d9c=this['_threadCommentModel']['getThread'](_0x123932,_0x4665cb[_0x2953b0(0x130)]);_0x292d9c&&this['_threadCommentModel']['resolveComment'](_0x123932,_0x5e3526,_0x292d9c['id'],_0x4665cb[_0x2953b0(0xda)]===p[_0x2953b0(0xc0)]);break;}}}));}};b=X([c[_0x24cf61(0xc7)](c[_0x24cf61(0x138)]['Ready'],b),_(0x0,c[_0x24cf61(0x11e)](y['CommentService'])),_(0x1,c[_0x24cf61(0x11e)](g[_0x24cf61(0xdb)])),_(0x2,c[_0x24cf61(0x11e)](c[_0x24cf61(0x10d)])),_(0x3,c[_0x24cf61(0x11e)](c['Injector']))],b);const k='thread-comment-data-source.config',ee={};var U=Object[_0x24cf61(0x13f)],re=Object[_0x24cf61(0x12a)],te=(_0x18d4bb,_0x57a2cf,_0x125dd7)=>_0x57a2cf in _0x18d4bb?U(_0x18d4bb,_0x57a2cf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x125dd7}):_0x18d4bb[_0x57a2cf]=_0x125dd7,se=(_0x35e948,_0x4a4092,_0x482052,_0x575fc0)=>{const _0x17a77f=_0x24cf61;for(var _0x5f4b32=_0x575fc0>0x1?void 0x0:_0x575fc0?re(_0x4a4092,_0x482052):_0x4a4092,_0x7b3d29=_0x35e948[_0x17a77f(0x124)]-0x1,_0x4921f5;_0x7b3d29>=0x0;_0x7b3d29--)(_0x4921f5=_0x35e948[_0x7b3d29])&&(_0x5f4b32=(_0x575fc0?_0x4921f5(_0x4a4092,_0x482052,_0x5f4b32):_0x4921f5(_0x5f4b32))||_0x5f4b32);return _0x575fc0&&_0x5f4b32&&U(_0x4a4092,_0x482052,_0x5f4b32),_0x5f4b32;},T=(_0x1cf239,_0x472621)=>(_0x1bd994,_0x42faaf)=>_0x472621(_0x1bd994,_0x42faaf,_0x1cf239),R=(_0x4b0607,_0x535aeb,_0x440981)=>te(_0x4b0607,typeof _0x535aeb!='symbol'?_0x535aeb+'':_0x535aeb,_0x440981);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x24cf61(0xd9)]{constructor(_0x2f62ad=ee,_0x2faa90,_0x59e400){const _0x50597b=_0x24cf61;super(),this[_0x50597b(0x10b)]=_0x2f62ad,this['_injector']=_0x2faa90,this[_0x50597b(0x11a)]=_0x59e400;const {..._0x39340d}=this['_config'];this[_0x50597b(0x11a)][_0x50597b(0xd2)](k,_0x39340d);}[_0x24cf61(0xea)](){[[D],[C],[f],[b]]['forEach'](_0x257d9e=>{const _0xaba8e4=_0x2330;this[_0xaba8e4(0xcd)]['add'](_0x257d9e);});}},R(exports[_0x24cf61(0x134)],'pluginName',q),R(exports[_0x24cf61(0x134)],'type',c[_0x24cf61(0xbc)]['UNIVER_UNKNOWN']),exports[_0x24cf61(0x134)]=se([c['DependentOn'](g[_0x24cf61(0x115)],N['UniverThreadCommentUIPlugin'],y[_0x24cf61(0x12d)]),T(0x1,c['Inject'](c[_0x24cf61(0x109)])),T(0x2,c[_0x24cf61(0x131)])],exports[_0x24cf61(0x134)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x57daae=_0x5e66;(function(_0x4f5e39,_0x42dbb6){const _0x93238a=_0x5e66,_0x5db486=_0x4f5e39();while(!![]){try{const _0x41bf0a=-parseInt(_0x93238a(0x152))/0x1*(-parseInt(_0x93238a(0x162))/0x2)+parseInt(_0x93238a(0x188))/0x3*(-parseInt(_0x93238a(0x174))/0x4)+-parseInt(_0x93238a(0x144))/0x5*(-parseInt(_0x93238a(0x13e))/0x6)+parseInt(_0x93238a(0x163))/0x7*(parseInt(_0x93238a(0x120))/0x8)+-parseInt(_0x93238a(0x177))/0x9+parseInt(_0x93238a(0x169))/0xa*(parseInt(_0x93238a(0x12f))/0xb)+parseInt(_0x93238a(0x189))/0xc*(-parseInt(_0x93238a(0x153))/0xd);if(_0x41bf0a===_0x42dbb6)break;else _0x5db486['push'](_0x5db486['shift']());}catch(_0x3f689){_0x5db486['push'](_0x5db486['shift']());}}}(_0x3651,0x840d5));import{UserManagerService as _0x144469,Inject as _0x48b871,Injector as _0x5bb0c9,CustomRangeType as _0x51828c,OnLifecycle as _0x51226a,LifecycleStages as _0x11d02a,Disposable as _0x37edbf,UniverInstanceType as _0x47e4f5,DependentOn as _0x188278,Plugin as _0x4ad81d,IConfigService as _0x13fea4}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x2f460a,ThreadCommentModel as _0xe49716,UniverThreadCommentPlugin as _0x500e98}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x1adcd6,UniverThreadCommentUIPlugin as _0x2867c8}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x273871,CommentService as _0x5726aa,UniverCollaborationClientPlugin as _0x2d92ac}from'@univerjs-pro/collaboration-client';import{HTTPService as _0xda76fa}from'@univerjs/network';import _0x5351a1 from'dayjs';import{bufferTime as _0x3b9b80}from'rxjs';const X=_0x57daae(0x124);var v=(_0x1b6924=>(_0x1b6924[_0x1b6924[_0x57daae(0x16a)]=0x0]='OpenOrReOpen',_0x1b6924[_0x1b6924[_0x57daae(0x155)]=0x1]=_0x57daae(0x155),_0x1b6924[_0x1b6924[_0x57daae(0x12a)]=-0x1]=_0x57daae(0x12a),_0x1b6924))(v||{}),p=(_0x402959=>(_0x402959[_0x402959[_0x57daae(0x14c)]=0x0]=_0x57daae(0x14c),_0x402959[_0x402959[_0x57daae(0x182)]=0x1]=_0x57daae(0x182),_0x402959[_0x402959[_0x57daae(0x15b)]=0x2]=_0x57daae(0x15b),_0x402959[_0x402959[_0x57daae(0x14b)]=0x3]=_0x57daae(0x14b),_0x402959[_0x402959['Delete']=0x4]='Delete',_0x402959[_0x402959[_0x57daae(0x15a)]=0x5]=_0x57daae(0x15a),_0x402959[_0x402959[_0x57daae(0x12a)]=-0x1]=_0x57daae(0x12a),_0x402959))(p||{});const w=_0x34d2a2=>_0x5351a1(new Date(+_0x34d2a2))[_0x57daae(0x175)](_0x57daae(0x136)),k=async(_0xda2644,_0x134207)=>{const _0x4e4fb9=_0x57daae,_0x5aa99c=_0xda2644[_0x4e4fb9(0x157)](_0x144469),_0x3989b2=_0xda2644[_0x4e4fb9(0x157)](_0xda76fa);_0x134207['forEach'](_0x16c553=>{const _0x440a5f=_0x4e4fb9;_0x5aa99c[_0x440a5f(0x151)](_0x16c553)&&_0x134207[_0x440a5f(0x13d)](_0x16c553);}),_0x134207[_0x4e4fb9(0x126)]&&(await _0x3989b2[_0x4e4fb9(0x157)](_0x4e4fb9(0x170),{'params':{'userIDs':[..._0x134207]}}))[_0x4e4fb9(0x14e)][_0x4e4fb9(0x167)][_0x4e4fb9(0x171)](_0x11f894=>{const _0x484193=_0x4e4fb9;_0x11f894&&_0x5aa99c[_0x484193(0x11f)](_0x11f894);});};var ee=Object[_0x57daae(0x18a)],re=Object[_0x57daae(0x148)],te=(_0x3a82ed,_0x1a4336,_0x323126,_0x29f1e4)=>{const _0x49d476=_0x57daae;for(var _0x158d1a=_0x29f1e4>0x1?void 0x0:_0x29f1e4?re(_0x1a4336,_0x323126):_0x1a4336,_0x4b0e19=_0x3a82ed[_0x49d476(0x154)]-0x1,_0x547e1e;_0x4b0e19>=0x0;_0x4b0e19--)(_0x547e1e=_0x3a82ed[_0x4b0e19])&&(_0x158d1a=(_0x29f1e4?_0x547e1e(_0x1a4336,_0x323126,_0x158d1a):_0x547e1e(_0x158d1a))||_0x158d1a);return _0x29f1e4&&_0x158d1a&&ee(_0x1a4336,_0x323126,_0x158d1a),_0x158d1a;},_=(_0x21acda,_0x34e35b)=>(_0x346092,_0x5196ba)=>_0x34e35b(_0x346092,_0x5196ba,_0x21acda);function se(_0x4b2747,_0x131dff){const _0x1dd221=_0x57daae,_0x296b8a=_0x4b2747[_0x1dd221(0x12e)][0x0];return{..._0x131dff,'id':_0x296b8a[_0x1dd221(0x186)],'resolved':_0x4b2747[_0x1dd221(0x172)]===0x1,'dT':w(_0x296b8a['createTimestamp']),'personId':_0x296b8a['userId'],'threadId':_0x296b8a[_0x1dd221(0x164)]};}function oe(_0x5d7cc3,_0x2738c1,_0x4967d9){const _0x329299=_0x57daae;var _0xbad04b,_0x18bd05;if(((_0x18bd05=(_0xbad04b=_0x5d7cc3==null?void 0x0:_0x5d7cc3[_0x329299(0x12e)])==null?void 0x0:_0xbad04b['length'])!=null?_0x18bd05:0x0)>0x0){const _0x3e4942=(_0xf5b4bf,_0x3fcf00)=>({'id':_0xf5b4bf[_0x329299(0x186)],'threadId':_0xf5b4bf[_0x329299(0x164)],'dT':w(_0xf5b4bf['createTimestamp']),'personId':_0xf5b4bf[_0x329299(0x15e)],'resolved':_0x5d7cc3[_0x329299(0x172)]===v[_0x329299(0x155)],'unitId':_0x2738c1,'subUnitId':_0x4967d9,'text':JSON[_0x329299(0x150)](_0xf5b4bf[_0x329299(0x137)]),'parentId':_0x3fcf00}),_0x377a5f=_0x3e4942(_0x5d7cc3[_0x329299(0x12e)][0x0]);return{..._0x377a5f,'children':_0x5d7cc3[_0x329299(0x12e)]['slice'](0x1)['map'](_0xe7bd51=>_0x3e4942(_0xe7bd51,_0x377a5f['id']))};}return null;}let D=class{constructor(_0x5ae976,_0x3daaa6,_0x541823,_0x1112e5){const _0x54cb83=_0x57daae;this[_0x54cb83(0x13f)]=_0x5ae976,this[_0x54cb83(0x12d)]=_0x3daaa6,this[_0x54cb83(0x17a)]=_0x541823,this[_0x54cb83(0x143)]=_0x1112e5;}async[_0x57daae(0x149)](_0x2cf591){const _0x2cc369=_0x57daae;var _0x3224bd,_0x1cddd6;const {parentId:_0x38aed0,unitId:_0x814b66,text:_0x2cc43b,threadId:_0x547260}=_0x2cf591,_0x5b86f8=(_0x1cddd6=(_0x3224bd=_0x2cc43b[_0x2cc369(0x139)])==null?void 0x0:_0x3224bd[_0x2cc369(0x140)](_0x4cebfc=>_0x4cebfc[_0x2cc369(0x16f)]===_0x51828c['COMMENT'])['map'](_0x5cd4b4=>_0x5cd4b4[_0x2cc369(0x17e)]))!=null?_0x1cddd6:[],_0x363783=JSON['stringify'](_0x2cc43b),_0x490087=(await this[_0x2cc369(0x17a)][_0x2cc369(0x127)](_0x814b66))[_0x2cc369(0x11d)]();if(_0x38aed0){const _0x57dd13={'memberId':_0x490087,'unitId':_0x814b66,'content':_0x363783,'mention':_0x5b86f8,'threadId':_0x547260},_0x1e1faf=(await this[_0x2cc369(0x13f)][_0x2cc369(0x12c)](_0x2cc369(0x145)+_0x814b66+_0x2cc369(0x16e),{'body':_0x57dd13}))[_0x2cc369(0x14e)][_0x2cc369(0x18e)];return{..._0x2cf591,'id':_0x1e1faf[_0x2cc369(0x186)],'dT':_0x5351a1(+_0x1e1faf['createTimestamp'])[_0x2cc369(0x175)](_0x2cc369(0x136)),'personId':_0x1e1faf[_0x2cc369(0x15e)]};}else{const _0x260621={'memberId':_0x490087,'unitId':_0x814b66,'content':_0x363783,'mention':_0x5b86f8},_0x2639e8=await this[_0x2cc369(0x13f)]['post'](_0x2cc369(0x145)+_0x814b66+_0x2cc369(0x17c),{'body':_0x260621});return se(_0x2639e8[_0x2cc369(0x14e)][_0x2cc369(0x166)],_0x2cf591);}}async[_0x57daae(0x12b)](_0x230fe8){const _0x58a85d=_0x57daae;var _0x421443,_0x2b79e6;const {text:_0x4c9f07,unitId:_0x3f023b}=_0x230fe8,_0x2a1995=(_0x2b79e6=(_0x421443=_0x4c9f07[_0x58a85d(0x139)])==null?void 0x0:_0x421443['filter'](_0x235206=>_0x235206['rangeType']===_0x51828c[_0x58a85d(0x187)])[_0x58a85d(0x11e)](_0x2d2a87=>_0x2d2a87[_0x58a85d(0x17e)]))!=null?_0x2b79e6:[],_0x41c92d=JSON['stringify'](_0x4c9f07),_0x3ad964=_0x230fe8[_0x58a85d(0x164)],_0x104126=_0x230fe8['id'],_0x188ca0={'memberId':(await this['_sessionService']['requireSession'](_0x3f023b))['getMemberID'](),'unitId':_0x3f023b,'threadId':_0x3ad964,'mention':_0x2a1995,'content':_0x41c92d,'replyId':_0x104126},_0x17ab08=await this[_0x58a85d(0x13f)]['post'](_0x58a85d(0x145)+_0x3f023b+_0x58a85d(0x11c),{'body':_0x188ca0});return!_0x17ab08[_0x58a85d(0x14e)][_0x58a85d(0x181)]||_0x17ab08[_0x58a85d(0x14e)]['error'][_0x58a85d(0x14a)]===0x1;}async['resolveComment'](_0x21922a){const _0x2e9ab2=_0x57daae,{unitId:_0x55e4af}=_0x21922a,_0x2d160b=_0x21922a[_0x2e9ab2(0x164)],_0x4c543a={'memberId':this[_0x2e9ab2(0x12d)][_0x2e9ab2(0x158)]()['userID'],'unitId':_0x55e4af,'threadId':_0x2d160b,'solved':_0x21922a[_0x2e9ab2(0x13a)]?v[_0x2e9ab2(0x155)]:v['OpenOrReOpen']},_0x51d300=await this[_0x2e9ab2(0x13f)]['post']('/universer-api/comment/unit/'+_0x55e4af+'/solved',{'body':_0x4c543a});return!_0x51d300[_0x2e9ab2(0x14e)][_0x2e9ab2(0x181)]||_0x51d300[_0x2e9ab2(0x14e)]['error']['code']===0x1;}async[_0x57daae(0x176)](_0x2cb512,_0x2f3823,_0x477857,_0x379c1c){const _0x253f61=_0x57daae,_0x1f0350={'memberId':(await this['_sessionService']['requireSession'](_0x2cb512))[_0x253f61(0x11d)](),'threadId':_0x477857,'replyId':_0x379c1c,'unitId':_0x2cb512},_0x55f460=await this[_0x253f61(0x13f)]['post']('/universer-api/comment/unit/'+_0x2cb512+_0x253f61(0x180),{'body':_0x1f0350});return!_0x55f460[_0x253f61(0x14e)]['error']||_0x55f460[_0x253f61(0x14e)][_0x253f61(0x181)][_0x253f61(0x14a)]===0x1;}async['listComments'](_0x3386a2,_0x3a0c9c,_0x5130c2){const _0x30bc9d=_0x57daae,_0x5f169d={'unitId':_0x3386a2,'threadId':_0x5130c2},_0x4e1687=await this[_0x30bc9d(0x13f)]['post'](_0x30bc9d(0x145)+_0x3386a2+_0x30bc9d(0x13c),{'body':_0x5f169d}),_0x169ecb=_0x5130c2[_0x30bc9d(0x11e)](_0x38d7d1=>oe(_0x4e1687[_0x30bc9d(0x14e)][_0x30bc9d(0x135)][_0x38d7d1],_0x3386a2,_0x3a0c9c))['filter'](Boolean);return Object[_0x30bc9d(0x17b)](_0x4e1687[_0x30bc9d(0x14e)][_0x30bc9d(0x167)])[_0x30bc9d(0x171)](_0x553b09=>{const _0x5bdd34=_0x30bc9d;this[_0x5bdd34(0x12d)][_0x5bdd34(0x11f)](_0x553b09);}),_0x169ecb;}[_0x57daae(0x123)](_0x37839e){const _0x2cc4ca=_0x57daae;return{'id':_0x37839e['id'],'threadId':_0x37839e[_0x2cc4ca(0x164)],'ref':_0x37839e[_0x2cc4ca(0x168)]};}};D=te([_(0x0,_0x48b871(_0xda76fa)),_(0x1,_0x48b871(_0x144469)),_(0x2,_0x48b871(_0x273871)),_(0x3,_0x48b871(_0x5bb0c9))],D);function _0x5e66(_0x1579a6,_0x3e1ca7){const _0x365181=_0x3651();return _0x5e66=function(_0x5e6673,_0x2e36bc){_0x5e6673=_0x5e6673-0x11b;let _0x49e7fa=_0x365181[_0x5e6673];return _0x49e7fa;},_0x5e66(_0x1579a6,_0x3e1ca7);}var ne=Object[_0x57daae(0x18a)],ie=Object[_0x57daae(0x148)],ae=(_0x4ba5a4,_0x269fac,_0xb8fe56,_0x17841f)=>{const _0x4a3258=_0x57daae;for(var _0x4045ab=_0x17841f>0x1?void 0x0:_0x17841f?ie(_0x269fac,_0xb8fe56):_0x269fac,_0x808105=_0x4ba5a4[_0x4a3258(0x154)]-0x1,_0x50b1b2;_0x808105>=0x0;_0x808105--)(_0x50b1b2=_0x4ba5a4[_0x808105])&&(_0x4045ab=(_0x17841f?_0x50b1b2(_0x269fac,_0xb8fe56,_0x4045ab):_0x50b1b2(_0x4045ab))||_0x4045ab);return _0x17841f&&_0x4045ab&&ne(_0x269fac,_0xb8fe56,_0x4045ab),_0x4045ab;},ce=(_0x32073c,_0x32e8dd)=>(_0x50efcc,_0x230083)=>_0x32e8dd(_0x50efcc,_0x230083,_0x32073c);let C=class{constructor(_0x2acfe8){this['_httpService']=_0x2acfe8;}async[_0x57daae(0x138)](_0x1e4b2e,_0x10e5ba,_0x20c308){const _0x1d2d35=_0x57daae,_0x4abed3=new URL(window[_0x1d2d35(0x14f)][_0x1d2d35(0x161)])['searchParams'][_0x1d2d35(0x157)](_0x1d2d35(0x156));if(!_0x4abed3)return[];const _0x4a2c14=window[_0x1d2d35(0x14f)][_0x1d2d35(0x125)],_0x595079=window['location'][_0x1d2d35(0x18d)]==='https:'?'https':_0x1d2d35(0x165);return(await this['_httpService'][_0x1d2d35(0x157)](_0x595079+'://'+_0x4a2c14+'/universer-api/authz/collaborator',{'params':{'objectID':_0x4abed3,'unitID':_0x4abed3}}))[_0x1d2d35(0x14e)]['collaborators'][_0x1d2d35(0x11e)](_0x412968=>{const _0x2504e1=_0x1d2d35;var _0x4dc623,_0x4eef6f,_0x415884,_0x5a546c,_0x30f157,_0xc89b98;return{'id':(_0x4eef6f=(_0x4dc623=_0x412968[_0x2504e1(0x134)])==null?void 0x0:_0x4dc623[_0x2504e1(0x133)])!=null?_0x4eef6f:'','label':(_0x5a546c=(_0x415884=_0x412968[_0x2504e1(0x134)])==null?void 0x0:_0x415884[_0x2504e1(0x146)])!=null?_0x5a546c:'','icon':(_0xc89b98=(_0x30f157=_0x412968[_0x2504e1(0x134)])==null?void 0x0:_0x30f157[_0x2504e1(0x159)])!=null?_0xc89b98:'','type':_0x2504e1(0x18b)};});}};C=ae([ce(0x0,_0x48b871(_0xda76fa))],C);var de=Object[_0x57daae(0x18a)],me=Object[_0x57daae(0x148)],le=(_0x38b808,_0x3b71fc,_0xdc3f33,_0x239502)=>{for(var _0x3de3ae=_0x239502>0x1?void 0x0:_0x239502?me(_0x3b71fc,_0xdc3f33):_0x3b71fc,_0x55e455=_0x38b808['length']-0x1,_0x1d3f10;_0x55e455>=0x0;_0x55e455--)(_0x1d3f10=_0x38b808[_0x55e455])&&(_0x3de3ae=(_0x239502?_0x1d3f10(_0x3b71fc,_0xdc3f33,_0x3de3ae):_0x1d3f10(_0x3de3ae))||_0x3de3ae);return _0x239502&&_0x3de3ae&&de(_0x3b71fc,_0xdc3f33,_0x3de3ae),_0x3de3ae;},f=(_0x14ba9e,_0x1eae69)=>(_0x2b20fa,_0x1d0d82)=>_0x1eae69(_0x2b20fa,_0x1d0d82,_0x14ba9e);let S=class extends _0x37edbf{constructor(_0x2ee944,_0x49fecb,_0x4e1000,_0x3d53d4){const _0x1d2403=_0x57daae;super(),this[_0x1d2403(0x16c)]=_0x2ee944,this[_0x1d2403(0x15d)]=_0x49fecb,this['_threadCommentMentionDataService']=_0x4e1000,this[_0x1d2403(0x160)]=_0x3d53d4,this[_0x1d2403(0x16b)]();}[_0x57daae(0x16b)](){const _0x4ba05b=_0x57daae;this['_threadCommentDataSourceService'][_0x4ba05b(0x15c)]=this[_0x4ba05b(0x15d)],this['_threadCommentDataSourceService'][_0x4ba05b(0x130)]=!0x1,this[_0x4ba05b(0x17d)][_0x4ba05b(0x15c)]=this['_threadCommentMentionDataSource'];}};S=le([_0x51226a(_0x11d02a['Starting'],S),f(0x0,_0x2f460a),f(0x1,_0x48b871(D)),f(0x2,_0x1adcd6),f(0x3,_0x48b871(C))],S);var he=Object[_0x57daae(0x18a)],ue=Object[_0x57daae(0x148)],pe=(_0xc7551,_0x4ea1e5,_0xa55741,_0x5e2dda)=>{const _0x497a89=_0x57daae;for(var _0x239e17=_0x5e2dda>0x1?void 0x0:_0x5e2dda?ue(_0x4ea1e5,_0xa55741):_0x4ea1e5,_0xe74f65=_0xc7551[_0x497a89(0x154)]-0x1,_0x824189;_0xe74f65>=0x0;_0xe74f65--)(_0x824189=_0xc7551[_0xe74f65])&&(_0x239e17=(_0x5e2dda?_0x824189(_0x4ea1e5,_0xa55741,_0x239e17):_0x824189(_0x239e17))||_0x239e17);return _0x5e2dda&&_0x239e17&&he(_0x4ea1e5,_0xa55741,_0x239e17),_0x239e17;},I=(_0x51e988,_0x5f24ac)=>(_0x60932c,_0x50e884)=>_0x5f24ac(_0x60932c,_0x50e884,_0x51e988);let b=class extends _0x37edbf{constructor(_0x1f61cc,_0x5c7786,_0x223401,_0x4710e8){const _0xca6b9c=_0x57daae;super(),this['_commentService']=_0x1f61cc,this[_0xca6b9c(0x179)]=_0x5c7786,this['_userService']=_0x223401,this[_0xca6b9c(0x143)]=_0x4710e8,this[_0xca6b9c(0x183)](),this[_0xca6b9c(0x15f)]();}[_0x57daae(0x15f)](){const _0x18c1dc=_0x57daae;this[_0x18c1dc(0x128)](this[_0x18c1dc(0x179)][_0x18c1dc(0x122)][_0x18c1dc(0x131)](_0x3b9b80(0x10))[_0x18c1dc(0x178)](_0x45c274=>{const _0x4987ac=_0x18c1dc,_0x77c438=new Set();_0x45c274[_0x4987ac(0x171)](_0x1c6efd=>{const _0x47e2ac=_0x4987ac;switch(_0x1c6efd[_0x47e2ac(0x173)]){case _0x47e2ac(0x185):{const _0x807625=_0x1c6efd['payload'][_0x47e2ac(0x17f)];_0x77c438[_0x47e2ac(0x185)](_0x807625);break;}}}),k(this[_0x4987ac(0x143)],_0x77c438);}));}[_0x57daae(0x183)](){const _0x4d0097=_0x57daae;this['disposeWithMe'](this[_0x4d0097(0x142)][_0x4d0097(0x122)][_0x4d0097(0x178)](async _0x275e17=>{const _0x1f236b=_0x4d0097;var _0x59e0a0,_0x153c05;const _0x78932a=this[_0x1f236b(0x179)][_0x1f236b(0x13b)](_0x275e17[_0x1f236b(0x129)],_0x275e17[_0x1f236b(0x164)]);if(!_0x78932a)return;const {unitId:_0x18f174,subUnitId:_0x5c478b}=_0x78932a;switch(_0x275e17['user']&&this['_userService']['addUser'](_0x275e17[_0x1f236b(0x18b)]),_0x275e17[_0x1f236b(0x173)]){case p[_0x1f236b(0x182)]:break;case p['Reply']:{this[_0x1f236b(0x179)][_0x1f236b(0x149)](_0x18f174,_0x5c478b,{'unitId':_0x18f174,'subUnitId':_0x5c478b,'ref':'','id':_0x275e17[_0x1f236b(0x186)],'dT':w(+_0x275e17[_0x1f236b(0x18c)]),'threadId':_0x275e17[_0x1f236b(0x164)],'personId':(_0x153c05=(_0x59e0a0=_0x275e17[_0x1f236b(0x18b)])==null?void 0x0:_0x59e0a0[_0x1f236b(0x133)])!=null?_0x153c05:_0x275e17[_0x1f236b(0x15e)],'text':JSON[_0x1f236b(0x150)](_0x275e17[_0x1f236b(0x137)]),'parentId':_0x78932a['id']});break;}case p['Delete']:{const _0xea9d35=this[_0x1f236b(0x179)][_0x1f236b(0x11b)](_0x18f174,_0x5c478b,_0x275e17['replyId']);_0xea9d35&&_0xea9d35[_0x1f236b(0x147)]&&this['_threadCommentModel'][_0x1f236b(0x176)](_0x18f174,_0x5c478b,_0x275e17[_0x1f236b(0x186)]);break;}case p['Edit']:{this['_threadCommentModel'][_0x1f236b(0x12b)](_0x18f174,_0x5c478b,{'commentId':_0x275e17[_0x1f236b(0x186)],'text':JSON[_0x1f236b(0x150)](_0x275e17[_0x1f236b(0x137)])});break;}case p[_0x1f236b(0x15a)]:{const _0x51bdd5=this[_0x1f236b(0x179)][_0x1f236b(0x13b)](_0x18f174,_0x275e17[_0x1f236b(0x164)]);_0x51bdd5&&this[_0x1f236b(0x179)][_0x1f236b(0x16d)](_0x18f174,_0x5c478b,_0x51bdd5['id'],_0x275e17['solved']===v['Solved']);break;}}}));}};b=pe([_0x51226a(_0x11d02a[_0x57daae(0x184)],b),I(0x0,_0x48b871(_0x5726aa)),I(0x1,_0x48b871(_0xe49716)),I(0x2,_0x48b871(_0x144469)),I(0x3,_0x48b871(_0x5bb0c9))],b);const ve='thread-comment-data-source.config',_e={};var Y=Object[_0x57daae(0x18a)],fe=Object[_0x57daae(0x148)],Ie=(_0x191cbc,_0x5bb1b7,_0x32a02f)=>_0x5bb1b7 in _0x191cbc?Y(_0x191cbc,_0x5bb1b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x32a02f}):_0x191cbc[_0x5bb1b7]=_0x32a02f,Se=(_0x4fb411,_0x53082c,_0x32a239,_0x107c10)=>{const _0x512030=_0x57daae;for(var _0x238611=_0x107c10>0x1?void 0x0:_0x107c10?fe(_0x53082c,_0x32a239):_0x53082c,_0x3b3dfb=_0x4fb411[_0x512030(0x154)]-0x1,_0x4df032;_0x3b3dfb>=0x0;_0x3b3dfb--)(_0x4df032=_0x4fb411[_0x3b3dfb])&&(_0x238611=(_0x107c10?_0x4df032(_0x53082c,_0x32a239,_0x238611):_0x4df032(_0x238611))||_0x238611);return _0x107c10&&_0x238611&&Y(_0x53082c,_0x32a239,_0x238611),_0x238611;},j=(_0x33540f,_0x75ad13)=>(_0xc61f77,_0x18600c)=>_0x75ad13(_0xc61f77,_0x18600c,_0x33540f),G=(_0x5d27f2,_0x43e539,_0x27be54)=>Ie(_0x5d27f2,typeof _0x43e539!='symbol'?_0x43e539+'':_0x43e539,_0x27be54);let O=class extends _0x4ad81d{constructor(_0x387449=_e,_0x4caed9,_0x39b338){const _0x22f84a=_0x57daae;super(),this[_0x22f84a(0x121)]=_0x387449,this['_injector']=_0x4caed9,this['_configService']=_0x39b338;const {..._0x6f6781}=this['_config'];this[_0x22f84a(0x141)][_0x22f84a(0x14d)](ve,_0x6f6781);}['onStarting'](){const _0x3d9d41=_0x57daae;[[C],[D],[S],[b]][_0x3d9d41(0x171)](_0x1a844b=>{const _0x4ef853=_0x3d9d41;this['_injector'][_0x4ef853(0x185)](_0x1a844b);});}};G(O,'pluginName',X),G(O,'type',_0x47e4f5[_0x57daae(0x132)]),O=Se([_0x188278(_0x500e98,_0x2867c8,_0x2d92ac),j(0x1,_0x48b871(_0x5bb0c9)),j(0x2,_0x13fea4)],O);export{O as UniverThreadCommentDataSourcePlugin};function _0x3651(){const _0xc8bc0b=['userID','subject','comments','YYYY/MM/DD\x20HH:mm','content','getMentions','customRanges','resolved','getThread','/list','delete','6bQWZHF','_httpService','filter','_configService','_commentService','_injector','177545mPKQrM','/universer-api/comment/unit/','name','parentId','getOwnPropertyDescriptor','addComment','code','Edit','Unknown','setConfig','body','location','parse','getUser','21gqAWEC','70265rkrIEO','length','Solved','unit','get','getCurrentUser','avatar','Solve','Reply','dataSource','_threadCommentDataSource','userId','_initUserSync','_threadCommentMentionDataSource','href','88702gscnqA','42KYFjQN','threadId','http','comment','users','ref','3829710padcIf','OpenOrReOpen','_initDataSource','_threadCommentDataSourceService','resolveComment','/reply','rangeType','/universer-api/user/list','forEach','solved','type','948076QySzms','format','deleteComment','4185549Xgwrsa','subscribe','_threadCommentModel','_sessionService','values','/add','_threadCommentMentionDataService','rangeId','personId','/delete','error','Add','_init','Ready','add','replyId','COMMENT','6pOWHNE','1752qWIFki','defineProperty','user','createTimestamp','protocol','reply','getComment','/edit','getMemberID','map','addUser','715056fnhiJL','_config','commentUpdate$','saveCommentToSnapshot','THREAD_COMMENT_DATA_SOURCE_PLUGIN','host','size','requireSession','disposeWithMe','unitId','UNRECOGNIZED','updateComment','post','_userService','replies','22LrDtcK','syncUpdateMutationToColla','pipe','UNIVER_UNKNOWN'];_0x3651=function(){return _0xc8bc0b;};return _0x3651();}
1
+ const _0x52c2db=_0x47bd;(function(_0x2b79b,_0x4e69ff){const _0x3dc6f5=_0x47bd,_0x2608a5=_0x2b79b();while(!![]){try{const _0x26b0f5=-parseInt(_0x3dc6f5(0x1b7))/0x1*(-parseInt(_0x3dc6f5(0x1ad))/0x2)+parseInt(_0x3dc6f5(0x1e8))/0x3+parseInt(_0x3dc6f5(0x1df))/0x4+-parseInt(_0x3dc6f5(0x1fa))/0x5+parseInt(_0x3dc6f5(0x1e7))/0x6*(-parseInt(_0x3dc6f5(0x1ed))/0x7)+-parseInt(_0x3dc6f5(0x1da))/0x8*(parseInt(_0x3dc6f5(0x1a3))/0x9)+parseInt(_0x3dc6f5(0x1b6))/0xa*(-parseInt(_0x3dc6f5(0x1ff))/0xb);if(_0x26b0f5===_0x4e69ff)break;else _0x2608a5['push'](_0x2608a5['shift']());}catch(_0x5772e6){_0x2608a5['push'](_0x2608a5['shift']());}}}(_0xa5c1,0xbcd8c));import{UserManagerService as _0x12f40d,Inject as _0x508cfb,Injector as _0xf07d08,CustomRangeType as _0x4e8be3,OnLifecycle as _0x434295,LifecycleStages as _0x546710,Disposable as _0x38d9cd,UniverInstanceType as _0xa6f5ec,DependentOn as _0x393f2c,Plugin as _0x9eeb51,IConfigService as _0x1f0a03}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x2a8168,ThreadCommentModel as _0xb93b3,UniverThreadCommentPlugin as _0x3e9257}from'@univerjs/thread-comment';function _0x47bd(_0x43d2da,_0x3f447e){const _0xa5c1a6=_0xa5c1();return _0x47bd=function(_0x47bd48,_0x31b11b){_0x47bd48=_0x47bd48-0x19a;let _0x4ff5fe=_0xa5c1a6[_0x47bd48];return _0x4ff5fe;},_0x47bd(_0x43d2da,_0x3f447e);}import{IThreadCommentMentionDataService as _0x50f397,UniverThreadCommentUIPlugin as _0x161cc5}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x39f594,CommentService as _0x5283c4,UniverCollaborationClientPlugin as _0x56cf5c}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x433401}from'@univerjs/network';import _0xd56be6 from'dayjs';import{bufferTime as _0x190db0}from'rxjs';const X=_0x52c2db(0x1e5);var v=(_0x427101=>(_0x427101[_0x427101[_0x52c2db(0x1a4)]=0x0]=_0x52c2db(0x1a4),_0x427101[_0x427101[_0x52c2db(0x1ab)]=0x1]=_0x52c2db(0x1ab),_0x427101[_0x427101[_0x52c2db(0x1fb)]=-0x1]=_0x52c2db(0x1fb),_0x427101))(v||{}),p=(_0x1d5455=>(_0x1d5455[_0x1d5455['Unknown']=0x0]='Unknown',_0x1d5455[_0x1d5455['Add']=0x1]=_0x52c2db(0x1f8),_0x1d5455[_0x1d5455[_0x52c2db(0x1d6)]=0x2]=_0x52c2db(0x1d6),_0x1d5455[_0x1d5455[_0x52c2db(0x1e1)]=0x3]='Edit',_0x1d5455[_0x1d5455[_0x52c2db(0x1d5)]=0x4]='Delete',_0x1d5455[_0x1d5455[_0x52c2db(0x1c5)]=0x5]=_0x52c2db(0x1c5),_0x1d5455[_0x1d5455[_0x52c2db(0x1fb)]=-0x1]=_0x52c2db(0x1fb),_0x1d5455))(p||{});const w=_0x5d0989=>_0xd56be6(new Date(+_0x5d0989))[_0x52c2db(0x1cb)](_0x52c2db(0x204)),k=async(_0xf4e999,_0x42e1ed)=>{const _0x42e696=_0x52c2db,_0x2ea3f0=_0xf4e999[_0x42e696(0x1ce)](_0x12f40d),_0xe2e7c8=_0xf4e999[_0x42e696(0x1ce)](_0x433401);_0x42e1ed[_0x42e696(0x1d1)](_0x3142b9=>{const _0x118eb1=_0x42e696;_0x2ea3f0[_0x118eb1(0x201)](_0x3142b9)&&_0x42e1ed['delete'](_0x3142b9);}),_0x42e1ed[_0x42e696(0x1e6)]&&(await _0xe2e7c8[_0x42e696(0x1ce)]('/universer-api/user/list',{'params':{'userIDs':[..._0x42e1ed]}}))[_0x42e696(0x1ba)]['users'][_0x42e696(0x1d1)](_0x10313a=>{_0x10313a&&_0x2ea3f0['addUser'](_0x10313a);});};var ee=Object[_0x52c2db(0x1dd)],re=Object[_0x52c2db(0x1f3)],te=(_0x33676d,_0x3b9fa8,_0x47531e,_0x3e3ebd)=>{const _0x4bd9f8=_0x52c2db;for(var _0x2c82a4=_0x3e3ebd>0x1?void 0x0:_0x3e3ebd?re(_0x3b9fa8,_0x47531e):_0x3b9fa8,_0x40846b=_0x33676d[_0x4bd9f8(0x1b2)]-0x1,_0x23fd3e;_0x40846b>=0x0;_0x40846b--)(_0x23fd3e=_0x33676d[_0x40846b])&&(_0x2c82a4=(_0x3e3ebd?_0x23fd3e(_0x3b9fa8,_0x47531e,_0x2c82a4):_0x23fd3e(_0x2c82a4))||_0x2c82a4);return _0x3e3ebd&&_0x2c82a4&&ee(_0x3b9fa8,_0x47531e,_0x2c82a4),_0x2c82a4;},_=(_0x382fab,_0x21b545)=>(_0x6bbdb2,_0xa5632b)=>_0x21b545(_0x6bbdb2,_0xa5632b,_0x382fab);function se(_0xc9ce24,_0x1a01a3){const _0x4fac6c=_0x52c2db,_0x3d32c4=_0xc9ce24[_0x4fac6c(0x1c6)][0x0];return{..._0x1a01a3,'id':_0x3d32c4['replyId'],'resolved':_0xc9ce24[_0x4fac6c(0x1f7)]===0x1,'dT':w(_0x3d32c4[_0x4fac6c(0x1a2)]),'personId':_0x3d32c4['userId'],'threadId':_0x3d32c4['threadId']};}function oe(_0x22863a,_0x5e8613,_0x27191d){const _0x2abc2d=_0x52c2db;var _0xb5f7eb,_0x87bb32;if(((_0x87bb32=(_0xb5f7eb=_0x22863a==null?void 0x0:_0x22863a[_0x2abc2d(0x1c6)])==null?void 0x0:_0xb5f7eb[_0x2abc2d(0x1b2)])!=null?_0x87bb32:0x0)>0x0){const _0x596971=(_0x59bba0,_0x18bfb2)=>({'id':_0x59bba0[_0x2abc2d(0x207)],'threadId':_0x59bba0[_0x2abc2d(0x1fd)],'dT':w(_0x59bba0[_0x2abc2d(0x1a2)]),'personId':_0x59bba0[_0x2abc2d(0x1be)],'resolved':_0x22863a[_0x2abc2d(0x1f7)]===v[_0x2abc2d(0x1ab)],'unitId':_0x5e8613,'subUnitId':_0x27191d,'text':JSON[_0x2abc2d(0x1b3)](_0x59bba0[_0x2abc2d(0x19f)]),'parentId':_0x18bfb2}),_0x4efb5c=_0x596971(_0x22863a['replies'][0x0]);return{..._0x4efb5c,'children':_0x22863a[_0x2abc2d(0x1c6)][_0x2abc2d(0x1c7)](0x1)['map'](_0x71b14b=>_0x596971(_0x71b14b,_0x4efb5c['id']))};}return null;}let D=class{constructor(_0x5aa338,_0x5d2058,_0x419332,_0x3ba1d2){const _0x34187d=_0x52c2db;this[_0x34187d(0x1a9)]=_0x5aa338,this[_0x34187d(0x1d7)]=_0x5d2058,this[_0x34187d(0x1eb)]=_0x419332,this[_0x34187d(0x1f9)]=_0x3ba1d2;}async[_0x52c2db(0x19d)](_0x490671){const _0x3f75dd=_0x52c2db;var _0xc45131,_0x237433;const {parentId:_0x38a210,unitId:_0x57da2e,text:_0x36728e,threadId:_0x82a958}=_0x490671,_0x38c469=(_0x237433=(_0xc45131=_0x36728e[_0x3f75dd(0x1ec)])==null?void 0x0:_0xc45131[_0x3f75dd(0x1c1)](_0x425274=>_0x425274[_0x3f75dd(0x205)]===_0x4e8be3['COMMENT'])[_0x3f75dd(0x1d8)](_0x38541e=>_0x38541e[_0x3f75dd(0x1b1)]))!=null?_0x237433:[],_0x64c4ff=JSON[_0x3f75dd(0x1f4)](_0x36728e),_0x120406=(await this[_0x3f75dd(0x1eb)][_0x3f75dd(0x1d2)](_0x57da2e))[_0x3f75dd(0x1e2)]();if(_0x38a210){const _0x43d4c4={'memberId':_0x120406,'unitId':_0x57da2e,'content':_0x64c4ff,'mention':_0x38c469,'threadId':_0x82a958},_0x4092da=(await this['_httpService']['post'](_0x3f75dd(0x1b5)+_0x57da2e+_0x3f75dd(0x1e4),{'body':_0x43d4c4}))[_0x3f75dd(0x1ba)][_0x3f75dd(0x1a8)];return{..._0x490671,'id':_0x4092da['replyId'],'dT':_0xd56be6(+_0x4092da[_0x3f75dd(0x1a2)])[_0x3f75dd(0x1cb)](_0x3f75dd(0x204)),'personId':_0x4092da['userId']};}else{const _0x3b3423={'memberId':_0x120406,'unitId':_0x57da2e,'content':_0x64c4ff,'mention':_0x38c469},_0x53ac2f=await this[_0x3f75dd(0x1a9)]['post']('/universer-api/comment/unit/'+_0x57da2e+'/add',{'body':_0x3b3423});return se(_0x53ac2f[_0x3f75dd(0x1ba)]['comment'],_0x490671);}}async[_0x52c2db(0x1a0)](_0x4389fd){const _0x4a6739=_0x52c2db;var _0x4b0765,_0x567e19;const {text:_0x211975,unitId:_0x352c8c}=_0x4389fd,_0x5ab723=(_0x567e19=(_0x4b0765=_0x211975[_0x4a6739(0x1ec)])==null?void 0x0:_0x4b0765['filter'](_0x2a5a67=>_0x2a5a67[_0x4a6739(0x205)]===_0x4e8be3[_0x4a6739(0x1b4)])[_0x4a6739(0x1d8)](_0x1f1c38=>_0x1f1c38[_0x4a6739(0x1b1)]))!=null?_0x567e19:[],_0xcf0495=JSON['stringify'](_0x211975),_0x58fbe8=_0x4389fd['threadId'],_0x2343a7=_0x4389fd['id'],_0x2d0b95={'memberId':(await this[_0x4a6739(0x1eb)][_0x4a6739(0x1d2)](_0x352c8c))['getMemberID'](),'unitId':_0x352c8c,'threadId':_0x58fbe8,'mention':_0x5ab723,'content':_0xcf0495,'replyId':_0x2343a7},_0x3a25e7=await this[_0x4a6739(0x1a9)][_0x4a6739(0x1e0)](_0x4a6739(0x1b5)+_0x352c8c+_0x4a6739(0x1cf),{'body':_0x2d0b95});return!_0x3a25e7[_0x4a6739(0x1ba)][_0x4a6739(0x19e)]||_0x3a25e7[_0x4a6739(0x1ba)][_0x4a6739(0x19e)][_0x4a6739(0x1bd)]===0x1;}async[_0x52c2db(0x1bb)](_0x53bde3){const _0x4ebdd1=_0x52c2db,{unitId:_0x35d5c0}=_0x53bde3,_0x597d16=_0x53bde3[_0x4ebdd1(0x1fd)],_0x11a36d={'memberId':this[_0x4ebdd1(0x1d7)]['getCurrentUser']()[_0x4ebdd1(0x1f1)],'unitId':_0x35d5c0,'threadId':_0x597d16,'solved':_0x53bde3['resolved']?v[_0x4ebdd1(0x1ab)]:v[_0x4ebdd1(0x1a4)]},_0x381844=await this[_0x4ebdd1(0x1a9)][_0x4ebdd1(0x1e0)]('/universer-api/comment/unit/'+_0x35d5c0+_0x4ebdd1(0x1d4),{'body':_0x11a36d});return!_0x381844[_0x4ebdd1(0x1ba)][_0x4ebdd1(0x19e)]||_0x381844[_0x4ebdd1(0x1ba)][_0x4ebdd1(0x19e)][_0x4ebdd1(0x1bd)]===0x1;}async[_0x52c2db(0x203)](_0x871446,_0xd7ad30,_0x3ac3c0,_0x13b204){const _0x1924cc=_0x52c2db,_0x4c4512={'memberId':(await this['_sessionService'][_0x1924cc(0x1d2)](_0x871446))[_0x1924cc(0x1e2)](),'threadId':_0x3ac3c0,'replyId':_0x13b204,'unitId':_0x871446},_0x31b294=await this[_0x1924cc(0x1a9)][_0x1924cc(0x1e0)](_0x1924cc(0x1b5)+_0x871446+_0x1924cc(0x1c3),{'body':_0x4c4512});return!_0x31b294[_0x1924cc(0x1ba)][_0x1924cc(0x19e)]||_0x31b294['body'][_0x1924cc(0x19e)][_0x1924cc(0x1bd)]===0x1;}async[_0x52c2db(0x1db)](_0x58520e,_0x9a3a58,_0x4f24ae){const _0x18fd8d=_0x52c2db,_0x52d3b8={'unitId':_0x58520e,'threadId':_0x4f24ae},_0xb93de6=await this[_0x18fd8d(0x1a9)][_0x18fd8d(0x1e0)](_0x18fd8d(0x1b5)+_0x58520e+_0x18fd8d(0x1ee),{'body':_0x52d3b8}),_0x9c1b2e=_0x4f24ae[_0x18fd8d(0x1d8)](_0x9f812e=>oe(_0xb93de6[_0x18fd8d(0x1ba)][_0x18fd8d(0x1a6)][_0x9f812e],_0x58520e,_0x9a3a58))[_0x18fd8d(0x1c1)](Boolean);return Object['values'](_0xb93de6[_0x18fd8d(0x1ba)][_0x18fd8d(0x19b)])['forEach'](_0x334896=>{const _0x277ede=_0x18fd8d;this[_0x277ede(0x1d7)][_0x277ede(0x1c2)](_0x334896);}),_0x9c1b2e;}[_0x52c2db(0x1f6)](_0x235cb2){const _0x2eec31=_0x52c2db;return{'id':_0x235cb2['id'],'threadId':_0x235cb2[_0x2eec31(0x1fd)],'ref':_0x235cb2[_0x2eec31(0x1dc)]};}};D=te([_(0x0,_0x508cfb(_0x433401)),_(0x1,_0x508cfb(_0x12f40d)),_(0x2,_0x508cfb(_0x39f594)),_(0x3,_0x508cfb(_0xf07d08))],D);var ne=Object[_0x52c2db(0x1dd)],ie=Object[_0x52c2db(0x1f3)],ae=(_0x1f0afb,_0x4a4903,_0x295e68,_0x26ecfe)=>{const _0x208755=_0x52c2db;for(var _0x818e42=_0x26ecfe>0x1?void 0x0:_0x26ecfe?ie(_0x4a4903,_0x295e68):_0x4a4903,_0x4bb04e=_0x1f0afb[_0x208755(0x1b2)]-0x1,_0x19f9cb;_0x4bb04e>=0x0;_0x4bb04e--)(_0x19f9cb=_0x1f0afb[_0x4bb04e])&&(_0x818e42=(_0x26ecfe?_0x19f9cb(_0x4a4903,_0x295e68,_0x818e42):_0x19f9cb(_0x818e42))||_0x818e42);return _0x26ecfe&&_0x818e42&&ne(_0x4a4903,_0x295e68,_0x818e42),_0x818e42;},ce=(_0x86a27b,_0xd314af)=>(_0x5b6f44,_0x121a37)=>_0xd314af(_0x5b6f44,_0x121a37,_0x86a27b);let C=class{constructor(_0x435f75){const _0x570b14=_0x52c2db;this[_0x570b14(0x1a9)]=_0x435f75;}async['getMentions'](_0x9ae124,_0x2a0b78,_0xf4bef9){const _0x2f6e1b=_0x52c2db,_0x3c3ed1=new URL(window[_0x2f6e1b(0x1d0)]['href'])[_0x2f6e1b(0x1bc)]['get'](_0x2f6e1b(0x1aa));if(!_0x3c3ed1)return[];const _0x33cf13=window[_0x2f6e1b(0x1d0)]['host'],_0x88e602=window['location']['protocol']===_0x2f6e1b(0x208)?_0x2f6e1b(0x202):_0x2f6e1b(0x1d3);return(await this['_httpService'][_0x2f6e1b(0x1ce)](_0x88e602+_0x2f6e1b(0x1ea)+_0x33cf13+_0x2f6e1b(0x1ac),{'params':{'objectID':_0x3c3ed1,'unitID':_0x3c3ed1}}))[_0x2f6e1b(0x1ba)]['collaborators'][_0x2f6e1b(0x1d8)](_0x275af5=>{const _0xb0df81=_0x2f6e1b;var _0x18fae6,_0x1d82a1,_0x2a8e10,_0x1e2e1f,_0x2c7d34,_0x533ac1;return{'id':(_0x1d82a1=(_0x18fae6=_0x275af5[_0xb0df81(0x1fe)])==null?void 0x0:_0x18fae6[_0xb0df81(0x1f1)])!=null?_0x1d82a1:'','label':(_0x1e2e1f=(_0x2a8e10=_0x275af5[_0xb0df81(0x1fe)])==null?void 0x0:_0x2a8e10['name'])!=null?_0x1e2e1f:'','icon':(_0x533ac1=(_0x2c7d34=_0x275af5[_0xb0df81(0x1fe)])==null?void 0x0:_0x2c7d34['avatar'])!=null?_0x533ac1:'','type':_0xb0df81(0x1b9)};});}};C=ae([ce(0x0,_0x508cfb(_0x433401))],C);var de=Object['defineProperty'],me=Object[_0x52c2db(0x1f3)],le=(_0x1f28ed,_0x11e171,_0x4b7357,_0x22fb9b)=>{for(var _0xfc7829=_0x22fb9b>0x1?void 0x0:_0x22fb9b?me(_0x11e171,_0x4b7357):_0x11e171,_0x326d08=_0x1f28ed['length']-0x1,_0x2ca464;_0x326d08>=0x0;_0x326d08--)(_0x2ca464=_0x1f28ed[_0x326d08])&&(_0xfc7829=(_0x22fb9b?_0x2ca464(_0x11e171,_0x4b7357,_0xfc7829):_0x2ca464(_0xfc7829))||_0xfc7829);return _0x22fb9b&&_0xfc7829&&de(_0x11e171,_0x4b7357,_0xfc7829),_0xfc7829;},f=(_0x225103,_0x56e41e)=>(_0x8e52c5,_0xc466cd)=>_0x56e41e(_0x8e52c5,_0xc466cd,_0x225103);let S=class extends _0x38d9cd{constructor(_0x3a0d7f,_0x467f7d,_0x1a02d2,_0x514053){const _0x14d5da=_0x52c2db;super(),this[_0x14d5da(0x1e9)]=_0x3a0d7f,this[_0x14d5da(0x1a5)]=_0x467f7d,this[_0x14d5da(0x1e3)]=_0x1a02d2,this[_0x14d5da(0x1ca)]=_0x514053,this[_0x14d5da(0x206)]();}['_initDataSource'](){const _0x2cea1e=_0x52c2db;this[_0x2cea1e(0x1e9)][_0x2cea1e(0x1af)]=this[_0x2cea1e(0x1a5)],this[_0x2cea1e(0x1e9)][_0x2cea1e(0x200)]=!0x1,this[_0x2cea1e(0x1e3)][_0x2cea1e(0x1af)]=this[_0x2cea1e(0x1ca)];}};S=le([_0x434295(_0x546710[_0x52c2db(0x19a)],S),f(0x0,_0x2a8168),f(0x1,_0x508cfb(D)),f(0x2,_0x50f397),f(0x3,_0x508cfb(C))],S);var he=Object['defineProperty'],ue=Object[_0x52c2db(0x1f3)],pe=(_0x3aaf9d,_0x5af99c,_0x4eabfc,_0x3cbd20)=>{const _0x5ad83c=_0x52c2db;for(var _0x46d9a9=_0x3cbd20>0x1?void 0x0:_0x3cbd20?ue(_0x5af99c,_0x4eabfc):_0x5af99c,_0x20f213=_0x3aaf9d[_0x5ad83c(0x1b2)]-0x1,_0x8d4342;_0x20f213>=0x0;_0x20f213--)(_0x8d4342=_0x3aaf9d[_0x20f213])&&(_0x46d9a9=(_0x3cbd20?_0x8d4342(_0x5af99c,_0x4eabfc,_0x46d9a9):_0x8d4342(_0x46d9a9))||_0x46d9a9);return _0x3cbd20&&_0x46d9a9&&he(_0x5af99c,_0x4eabfc,_0x46d9a9),_0x46d9a9;},I=(_0x42a9d6,_0x353a6c)=>(_0x24f0f6,_0x60a6cc)=>_0x353a6c(_0x24f0f6,_0x60a6cc,_0x42a9d6);let b=class extends _0x38d9cd{constructor(_0x3fcadb,_0x3ea0cd,_0x5611e6,_0x1e285c){const _0x14acfa=_0x52c2db;super(),this[_0x14acfa(0x1ef)]=_0x3fcadb,this[_0x14acfa(0x1c0)]=_0x3ea0cd,this[_0x14acfa(0x1d7)]=_0x5611e6,this[_0x14acfa(0x1f9)]=_0x1e285c,this[_0x14acfa(0x1c8)](),this[_0x14acfa(0x1b8)]();}['_initUserSync'](){const _0xbd2463=_0x52c2db;this[_0xbd2463(0x1b0)](this['_threadCommentModel'][_0xbd2463(0x1cd)][_0xbd2463(0x1c4)](_0x190db0(0x10))['subscribe'](_0x532eb7=>{const _0x19d418=_0xbd2463,_0x334a94=new Set();_0x532eb7[_0x19d418(0x1d1)](_0x3c5f3d=>{const _0x5f4841=_0x19d418;switch(_0x3c5f3d[_0x5f4841(0x1f5)]){case'add':{const _0x3b1087=_0x3c5f3d['payload'][_0x5f4841(0x1ae)];_0x334a94[_0x5f4841(0x1d9)](_0x3b1087);break;}}}),k(this[_0x19d418(0x1f9)],_0x334a94);}));}[_0x52c2db(0x1c8)](){const _0x2e76e0=_0x52c2db;this[_0x2e76e0(0x1b0)](this[_0x2e76e0(0x1ef)]['commentUpdate$'][_0x2e76e0(0x1fc)](async _0x23e7c1=>{const _0x40d9d8=_0x2e76e0;var _0x4e3cb9,_0x270339;const _0x1a4559=this[_0x40d9d8(0x1c0)][_0x40d9d8(0x1f2)](_0x23e7c1['unitId'],_0x23e7c1['threadId']);if(!_0x1a4559)return;const {unitId:_0x562d3a,subUnitId:_0x14a2bc}=_0x1a4559;switch(_0x23e7c1[_0x40d9d8(0x1b9)]&&this[_0x40d9d8(0x1d7)][_0x40d9d8(0x1c2)](_0x23e7c1[_0x40d9d8(0x1b9)]),_0x23e7c1[_0x40d9d8(0x1f5)]){case p['Add']:break;case p[_0x40d9d8(0x1d6)]:{this[_0x40d9d8(0x1c0)][_0x40d9d8(0x19d)](_0x562d3a,_0x14a2bc,{'unitId':_0x562d3a,'subUnitId':_0x14a2bc,'ref':'','id':_0x23e7c1['replyId'],'dT':w(+_0x23e7c1[_0x40d9d8(0x1a2)]),'threadId':_0x23e7c1[_0x40d9d8(0x1fd)],'personId':(_0x270339=(_0x4e3cb9=_0x23e7c1[_0x40d9d8(0x1b9)])==null?void 0x0:_0x4e3cb9[_0x40d9d8(0x1f1)])!=null?_0x270339:_0x23e7c1[_0x40d9d8(0x1be)],'text':JSON[_0x40d9d8(0x1b3)](_0x23e7c1['content']),'parentId':_0x1a4559['id']});break;}case p['Delete']:{const _0x34f9fe=this['_threadCommentModel']['getComment'](_0x562d3a,_0x14a2bc,_0x23e7c1[_0x40d9d8(0x207)]);_0x34f9fe&&_0x34f9fe['parentId']&&this['_threadCommentModel']['deleteComment'](_0x562d3a,_0x14a2bc,_0x23e7c1[_0x40d9d8(0x207)]);break;}case p[_0x40d9d8(0x1e1)]:{this['_threadCommentModel'][_0x40d9d8(0x1a0)](_0x562d3a,_0x14a2bc,{'commentId':_0x23e7c1[_0x40d9d8(0x207)],'text':JSON[_0x40d9d8(0x1b3)](_0x23e7c1[_0x40d9d8(0x19f)])});break;}case p[_0x40d9d8(0x1c5)]:{const _0x3607d7=this[_0x40d9d8(0x1c0)][_0x40d9d8(0x1f2)](_0x562d3a,_0x23e7c1[_0x40d9d8(0x1fd)]);_0x3607d7&&this[_0x40d9d8(0x1c0)][_0x40d9d8(0x1bb)](_0x562d3a,_0x14a2bc,_0x3607d7['id'],_0x23e7c1[_0x40d9d8(0x1f7)]===v[_0x40d9d8(0x1ab)]);break;}}}));}};b=pe([_0x434295(_0x546710[_0x52c2db(0x1bf)],b),I(0x0,_0x508cfb(_0x5283c4)),I(0x1,_0x508cfb(_0xb93b3)),I(0x2,_0x508cfb(_0x12f40d)),I(0x3,_0x508cfb(_0xf07d08))],b);function _0xa5c1(){const _0x944d54=['subscribe','threadId','subject','11JjWmhP','syncUpdateMutationToColla','getUser','https','deleteComment','YYYY/MM/DD\x20HH:mm','rangeType','_initDataSource','replyId','https:','Starting','users','onStarting','addComment','error','content','updateComment','pluginName','createTimestamp','1698066QoFycF','OpenOrReOpen','_threadCommentDataSource','comments','_config','reply','_httpService','unit','Solved','/universer-api/authz/collaborator','4vYsrrw','personId','dataSource','disposeWithMe','rangeId','length','parse','COMMENT','/universer-api/comment/unit/','2752990aNHbef','462359eadkPG','_initUserSync','user','body','resolveComment','searchParams','code','userId','Ready','_threadCommentModel','filter','addUser','/delete','pipe','Solve','replies','slice','_init','UNIVER_UNKNOWN','_threadCommentMentionDataSource','format','symbol','commentUpdate$','get','/edit','location','forEach','requireSession','http','/solved','Delete','Reply','_userService','map','add','16crxPgl','listComments','ref','defineProperty','_configService','3496964tjLsZM','post','Edit','getMemberID','_threadCommentMentionDataService','/reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','11124xxxOuE','2012976JnkHid','_threadCommentDataSourceService','://','_sessionService','customRanges','3871TuhcJf','/list','_commentService','thread-comment-data-source.config','userID','getThread','getOwnPropertyDescriptor','stringify','type','saveCommentToSnapshot','solved','Add','_injector','92630UiKTJL','UNRECOGNIZED'];_0xa5c1=function(){return _0x944d54;};return _0xa5c1();}const ve=_0x52c2db(0x1f0),_e={};var Y=Object[_0x52c2db(0x1dd)],fe=Object[_0x52c2db(0x1f3)],Ie=(_0x4e5e56,_0x5903cb,_0x9fc624)=>_0x5903cb in _0x4e5e56?Y(_0x4e5e56,_0x5903cb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x9fc624}):_0x4e5e56[_0x5903cb]=_0x9fc624,Se=(_0x174cbc,_0x1febf2,_0x3ea23d,_0x438470)=>{const _0x50218f=_0x52c2db;for(var _0x3f630d=_0x438470>0x1?void 0x0:_0x438470?fe(_0x1febf2,_0x3ea23d):_0x1febf2,_0x52b73c=_0x174cbc[_0x50218f(0x1b2)]-0x1,_0x49c479;_0x52b73c>=0x0;_0x52b73c--)(_0x49c479=_0x174cbc[_0x52b73c])&&(_0x3f630d=(_0x438470?_0x49c479(_0x1febf2,_0x3ea23d,_0x3f630d):_0x49c479(_0x3f630d))||_0x3f630d);return _0x438470&&_0x3f630d&&Y(_0x1febf2,_0x3ea23d,_0x3f630d),_0x3f630d;},j=(_0x52d494,_0xe28ac9)=>(_0x52872c,_0x586e96)=>_0xe28ac9(_0x52872c,_0x586e96,_0x52d494),G=(_0x12e6ae,_0x4a33d1,_0x4bbd30)=>Ie(_0x12e6ae,typeof _0x4a33d1!=_0x52c2db(0x1cc)?_0x4a33d1+'':_0x4a33d1,_0x4bbd30);let O=class extends _0x9eeb51{constructor(_0x5769c0=_e,_0x1c03ba,_0x2f34d9){const _0x4762b9=_0x52c2db;super(),this[_0x4762b9(0x1a7)]=_0x5769c0,this[_0x4762b9(0x1f9)]=_0x1c03ba,this[_0x4762b9(0x1de)]=_0x2f34d9;const {..._0x37df49}=this['_config'];this['_configService']['setConfig'](ve,_0x37df49);}[_0x52c2db(0x19c)](){const _0x5df330=_0x52c2db;[[C],[D],[S],[b]][_0x5df330(0x1d1)](_0x3c0a14=>{const _0x561c57=_0x5df330;this[_0x561c57(0x1f9)][_0x561c57(0x1d9)](_0x3c0a14);});}};G(O,_0x52c2db(0x1a1),X),G(O,'type',_0xa6f5ec[_0x52c2db(0x1c9)]),O=Se([_0x393f2c(_0x3e9257,_0x161cc5,_0x56cf5c),j(0x1,_0x508cfb(_0xf07d08)),j(0x2,_0x1f0a03)],O);export{O as UniverThreadCommentDataSourcePlugin};
@@ -1 +1 @@
1
- export declare const PLUGIN_NAME = "THREAD_COMMENT_DATA_SOURCE_PLUGIN";
1
+ export declare const PLUGIN_NAME = "UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN";
@@ -6,6 +6,6 @@ export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
6
6
  private readonly _configService;
7
7
  static pluginName: string;
8
8
  static type: UniverInstanceType;
9
- constructor(_config: IUniverThreadCommentDataSourceConfig, _injector: Injector, _configService: IConfigService);
9
+ constructor(_config: IUniverThreadCommentDataSourceConfig | undefined, _injector: Injector, _configService: IConfigService);
10
10
  onStarting(): void;
11
11
  }
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x18fec8,_0xf4c64e){const _0x1bbc00=_0xe498,_0xdb3ca7=_0x18fec8();while(!![]){try{const _0x10a951=-parseInt(_0x1bbc00(0x1c4))/0x1*(parseInt(_0x1bbc00(0x1c3))/0x2)+-parseInt(_0x1bbc00(0x231))/0x3*(-parseInt(_0x1bbc00(0x1c1))/0x4)+-parseInt(_0x1bbc00(0x1ce))/0x5*(parseInt(_0x1bbc00(0x1c0))/0x6)+-parseInt(_0x1bbc00(0x220))/0x7*(parseInt(_0x1bbc00(0x20a))/0x8)+-parseInt(_0x1bbc00(0x21d))/0x9+-parseInt(_0x1bbc00(0x1e9))/0xa+parseInt(_0x1bbc00(0x19f))/0xb;if(_0x10a951===_0xf4c64e)break;else _0xdb3ca7['push'](_0xdb3ca7['shift']());}catch(_0x476d7a){_0xdb3ca7['push'](_0xdb3ca7['shift']());}}}(_0x49cf,0x9e36f),function(_0x57caa8,_0x52dd98){const _0x5136a7=_0xe498;typeof exports==_0x5136a7(0x1b2)&&typeof module<'u'?_0x52dd98(exports,require(_0x5136a7(0x22c)),require(_0x5136a7(0x221)),require('@univerjs/thread-comment-ui'),require(_0x5136a7(0x228)),require(_0x5136a7(0x1ab)),require(_0x5136a7(0x230)),require(_0x5136a7(0x21e))):typeof define==_0x5136a7(0x1bc)&&define[_0x5136a7(0x1d6)]?define([_0x5136a7(0x22b),_0x5136a7(0x22c),'@univerjs/thread-comment',_0x5136a7(0x1ef),_0x5136a7(0x228),'@univerjs/network',_0x5136a7(0x230),_0x5136a7(0x21e)],_0x52dd98):(_0x57caa8=typeof globalThis<'u'?globalThis:_0x57caa8||self,_0x52dd98(_0x57caa8['UniverThreadCommentDatasource']={},_0x57caa8[_0x5136a7(0x1a5)],_0x57caa8[_0x5136a7(0x22e)],_0x57caa8[_0x5136a7(0x1a8)],_0x57caa8['UniverCollaborationClient'],_0x57caa8[_0x5136a7(0x212)],_0x57caa8[_0x5136a7(0x230)],_0x57caa8[_0x5136a7(0x21e)]));}(this,function(_0x5d32d4,_0x256344,_0x15323b,_0x1cba50,_0x5a3410,_0xcb20d2,_0x277d76,_0x45de69){'use strict';const _0xa0760e=_0xe498;const _0x5d21e7=_0xa0760e(0x1e3);var _0x176c49=(_0x1ede3c=>(_0x1ede3c[_0x1ede3c['OpenOrReOpen']=0x0]=_0xa0760e(0x1bd),_0x1ede3c[_0x1ede3c[_0xa0760e(0x1df)]=0x1]=_0xa0760e(0x1df),_0x1ede3c[_0x1ede3c[_0xa0760e(0x19c)]=-0x1]=_0xa0760e(0x19c),_0x1ede3c))(_0x176c49||{}),_0x2e242a=(_0x5e4557=>(_0x5e4557[_0x5e4557[_0xa0760e(0x205)]=0x0]='Unknown',_0x5e4557[_0x5e4557['Add']=0x1]=_0xa0760e(0x20e),_0x5e4557[_0x5e4557[_0xa0760e(0x214)]=0x2]=_0xa0760e(0x214),_0x5e4557[_0x5e4557['Edit']=0x3]='Edit',_0x5e4557[_0x5e4557[_0xa0760e(0x1b6)]=0x4]=_0xa0760e(0x1b6),_0x5e4557[_0x5e4557['Solve']=0x5]='Solve',_0x5e4557[_0x5e4557['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5e4557))(_0x2e242a||{});const _0x1b8871=_0x25c869=>_0x277d76(new Date(+_0x25c869))[_0xa0760e(0x1f2)](_0xa0760e(0x1ea)),_0x4517f9=async(_0x21ea25,_0x37419b)=>{const _0xb7855=_0xa0760e,_0xddd8ff=_0x21ea25[_0xb7855(0x1b4)](_0x256344[_0xb7855(0x1f7)]),_0x55df9a=_0x21ea25[_0xb7855(0x1b4)](_0xcb20d2[_0xb7855(0x1b1)]);_0x37419b[_0xb7855(0x215)](_0x408285=>{const _0x33208d=_0xb7855;_0xddd8ff[_0x33208d(0x223)](_0x408285)&&_0x37419b['delete'](_0x408285);}),_0x37419b['size']&&(await _0x55df9a[_0xb7855(0x1b4)](_0xb7855(0x20b),{'params':{'userIDs':[..._0x37419b]}}))[_0xb7855(0x200)][_0xb7855(0x227)][_0xb7855(0x215)](_0x534940=>{const _0xf0bc02=_0xb7855;_0x534940&&_0xddd8ff[_0xf0bc02(0x1d0)](_0x534940);});};var _0x2a4f1e=Object[_0xa0760e(0x1a0)],_0x217bc8=Object[_0xa0760e(0x1bf)],_0x6bd9b4=(_0x41f386,_0x3b3716,_0x20b0cd,_0x344e56)=>{const _0x52d5cd=_0xa0760e;for(var _0x3f6dd9=_0x344e56>0x1?void 0x0:_0x344e56?_0x217bc8(_0x3b3716,_0x20b0cd):_0x3b3716,_0x2d77e8=_0x41f386[_0x52d5cd(0x208)]-0x1,_0xb93e81;_0x2d77e8>=0x0;_0x2d77e8--)(_0xb93e81=_0x41f386[_0x2d77e8])&&(_0x3f6dd9=(_0x344e56?_0xb93e81(_0x3b3716,_0x20b0cd,_0x3f6dd9):_0xb93e81(_0x3f6dd9))||_0x3f6dd9);return _0x344e56&&_0x3f6dd9&&_0x2a4f1e(_0x3b3716,_0x20b0cd,_0x3f6dd9),_0x3f6dd9;},_0x58e376=(_0x4c6d5b,_0x448d51)=>(_0x3db175,_0x8bd0f1)=>_0x448d51(_0x3db175,_0x8bd0f1,_0x4c6d5b);function _0x455bbf(_0x568cf6,_0x5f18f0){const _0x97a69f=_0xa0760e,_0x3383e6=_0x568cf6['replies'][0x0];return{..._0x5f18f0,'id':_0x3383e6[_0x97a69f(0x1fd)],'resolved':_0x568cf6[_0x97a69f(0x1a1)]===0x1,'dT':_0x1b8871(_0x3383e6['createTimestamp']),'personId':_0x3383e6[_0x97a69f(0x1f5)],'threadId':_0x3383e6[_0x97a69f(0x1d9)]};}function _0x10db83(_0x48ad93,_0x461576,_0x59196a){const _0x4c26c2=_0xa0760e;var _0x5a6ab5,_0x5b03eb;if(((_0x5b03eb=(_0x5a6ab5=_0x48ad93==null?void 0x0:_0x48ad93[_0x4c26c2(0x20c)])==null?void 0x0:_0x5a6ab5[_0x4c26c2(0x208)])!=null?_0x5b03eb:0x0)>0x0){const _0x1f8721=(_0x56d461,_0x354243)=>({'id':_0x56d461[_0x4c26c2(0x1fd)],'threadId':_0x56d461[_0x4c26c2(0x1d9)],'dT':_0x1b8871(_0x56d461[_0x4c26c2(0x1da)]),'personId':_0x56d461['userId'],'resolved':_0x48ad93['solved']===_0x176c49[_0x4c26c2(0x1df)],'unitId':_0x461576,'subUnitId':_0x59196a,'text':JSON['parse'](_0x56d461[_0x4c26c2(0x1a9)]),'parentId':_0x354243}),_0x270820=_0x1f8721(_0x48ad93[_0x4c26c2(0x20c)][0x0]);return{..._0x270820,'children':_0x48ad93['replies'][_0x4c26c2(0x1f0)](0x1)[_0x4c26c2(0x206)](_0x35c2dd=>_0x1f8721(_0x35c2dd,_0x270820['id']))};}return null;}let _0x74e989=class{constructor(_0x38aacc,_0x351b88,_0x416a9a,_0x2ea562){const _0x2e7e82=_0xa0760e;this['_httpService']=_0x38aacc,this['_userService']=_0x351b88,this['_sessionService']=_0x416a9a,this[_0x2e7e82(0x1c8)]=_0x2ea562;}async['addComment'](_0x51524d){const _0x55beb4=_0xa0760e;var _0x3e0e8d,_0x5acd3d;const {parentId:_0x52addb,unitId:_0x2f831f,text:_0x1a6e24,threadId:_0x35eea9}=_0x51524d,_0x497934=(_0x5acd3d=(_0x3e0e8d=_0x1a6e24[_0x55beb4(0x19d)])==null?void 0x0:_0x3e0e8d[_0x55beb4(0x22f)](_0x23da08=>_0x23da08[_0x55beb4(0x1d1)]===_0x256344[_0x55beb4(0x1a3)][_0x55beb4(0x1ad)])[_0x55beb4(0x206)](_0x50f3fc=>_0x50f3fc[_0x55beb4(0x21b)]))!=null?_0x5acd3d:[],_0x5ef27c=JSON['stringify'](_0x1a6e24),_0x35fe60=(await this['_sessionService'][_0x55beb4(0x1e7)](_0x2f831f))[_0x55beb4(0x224)]();if(_0x52addb){const _0x51622e={'memberId':_0x35fe60,'unitId':_0x2f831f,'content':_0x5ef27c,'mention':_0x497934,'threadId':_0x35eea9},_0x519d70=(await this[_0x55beb4(0x1d8)][_0x55beb4(0x1dd)](_0x55beb4(0x201)+_0x2f831f+_0x55beb4(0x1fc),{'body':_0x51622e}))['body'][_0x55beb4(0x1b0)];return{..._0x51524d,'id':_0x519d70[_0x55beb4(0x1fd)],'dT':_0x277d76(+_0x519d70[_0x55beb4(0x1da)])[_0x55beb4(0x1f2)](_0x55beb4(0x1ea)),'personId':_0x519d70['userId']};}else{const _0xcb020e={'memberId':_0x35fe60,'unitId':_0x2f831f,'content':_0x5ef27c,'mention':_0x497934},_0x1914cc=await this['_httpService'][_0x55beb4(0x1dd)](_0x55beb4(0x201)+_0x2f831f+'/add',{'body':_0xcb020e});return _0x455bbf(_0x1914cc[_0x55beb4(0x200)]['comment'],_0x51524d);}}async['updateComment'](_0x1aa8c5){const _0x5abfc9=_0xa0760e;var _0x35602a,_0x2dc503;const {text:_0x90967,unitId:_0x2f1ea3}=_0x1aa8c5,_0x830c4b=(_0x2dc503=(_0x35602a=_0x90967[_0x5abfc9(0x19d)])==null?void 0x0:_0x35602a['filter'](_0x3517f6=>_0x3517f6[_0x5abfc9(0x1d1)]===_0x256344['CustomRangeType'][_0x5abfc9(0x1ad)])[_0x5abfc9(0x206)](_0x140a24=>_0x140a24[_0x5abfc9(0x21b)]))!=null?_0x2dc503:[],_0x24b4f9=JSON['stringify'](_0x90967),_0x4b7cfa=_0x1aa8c5['threadId'],_0x4c367f=_0x1aa8c5['id'],_0x228996={'memberId':(await this[_0x5abfc9(0x1c2)][_0x5abfc9(0x1e7)](_0x2f1ea3))['getMemberID'](),'unitId':_0x2f1ea3,'threadId':_0x4b7cfa,'mention':_0x830c4b,'content':_0x24b4f9,'replyId':_0x4c367f},_0x5d056e=await this['_httpService'][_0x5abfc9(0x1dd)](_0x5abfc9(0x201)+_0x2f1ea3+_0x5abfc9(0x19a),{'body':_0x228996});return!_0x5d056e[_0x5abfc9(0x200)][_0x5abfc9(0x1c9)]||_0x5d056e[_0x5abfc9(0x200)][_0x5abfc9(0x1c9)][_0x5abfc9(0x210)]===0x1;}async[_0xa0760e(0x1cd)](_0x214701){const _0x5880da=_0xa0760e,{unitId:_0x349582}=_0x214701,_0x5710e3=_0x214701[_0x5880da(0x1d9)],_0x499d9d={'memberId':this['_userService']['getCurrentUser']()[_0x5880da(0x1e1)],'unitId':_0x349582,'threadId':_0x5710e3,'solved':_0x214701[_0x5880da(0x1d2)]?_0x176c49['Solved']:_0x176c49[_0x5880da(0x1bd)]},_0x19467f=await this[_0x5880da(0x1d8)][_0x5880da(0x1dd)]('/universer-api/comment/unit/'+_0x349582+_0x5880da(0x20d),{'body':_0x499d9d});return!_0x19467f[_0x5880da(0x200)][_0x5880da(0x1c9)]||_0x19467f[_0x5880da(0x200)]['error']['code']===0x1;}async[_0xa0760e(0x1c6)](_0x120c91,_0x4dccc3,_0x49e3eb,_0x24a4d6){const _0x33e831=_0xa0760e,_0x255007={'memberId':(await this[_0x33e831(0x1c2)]['requireSession'](_0x120c91))[_0x33e831(0x224)](),'threadId':_0x49e3eb,'replyId':_0x24a4d6,'unitId':_0x120c91},_0xc873b3=await this['_httpService'][_0x33e831(0x1dd)]('/universer-api/comment/unit/'+_0x120c91+_0x33e831(0x21f),{'body':_0x255007});return!_0xc873b3[_0x33e831(0x200)]['error']||_0xc873b3[_0x33e831(0x200)]['error']['code']===0x1;}async[_0xa0760e(0x1be)](_0xd792dd,_0x47f958,_0x2bd239){const _0xea57b3=_0xa0760e,_0x44c53c={'unitId':_0xd792dd,'threadId':_0x2bd239},_0x31c9e1=await this[_0xea57b3(0x1d8)]['post'](_0xea57b3(0x201)+_0xd792dd+_0xea57b3(0x1ae),{'body':_0x44c53c}),_0x19f9a0=_0x2bd239['map'](_0x2f61d5=>_0x10db83(_0x31c9e1[_0xea57b3(0x200)][_0xea57b3(0x1db)][_0x2f61d5],_0xd792dd,_0x47f958))[_0xea57b3(0x22f)](Boolean);return Object['values'](_0x31c9e1[_0xea57b3(0x200)][_0xea57b3(0x227)])['forEach'](_0x5bb9a2=>{const _0x220b16=_0xea57b3;this[_0x220b16(0x1f9)][_0x220b16(0x1d0)](_0x5bb9a2);}),_0x19f9a0;}[_0xa0760e(0x1ba)](_0x175ea7){const _0x5c422c=_0xa0760e;return{'id':_0x175ea7['id'],'threadId':_0x175ea7[_0x5c422c(0x1d9)],'ref':_0x175ea7[_0x5c422c(0x207)]};}};_0x74e989=_0x6bd9b4([_0x58e376(0x0,_0x256344[_0xa0760e(0x1a4)](_0xcb20d2['HTTPService'])),_0x58e376(0x1,_0x256344[_0xa0760e(0x1a4)](_0x256344[_0xa0760e(0x1f7)])),_0x58e376(0x2,_0x256344[_0xa0760e(0x1a4)](_0x5a3410[_0xa0760e(0x1a2)])),_0x58e376(0x3,_0x256344['Inject'](_0x256344[_0xa0760e(0x213)]))],_0x74e989);var _0x3c1606=Object[_0xa0760e(0x1a0)],_0x2ea119=Object[_0xa0760e(0x1bf)],_0x171e30=(_0x43e67b,_0x5ab0d6,_0x55258f,_0x32f498)=>{const _0x3c1433=_0xa0760e;for(var _0x94b192=_0x32f498>0x1?void 0x0:_0x32f498?_0x2ea119(_0x5ab0d6,_0x55258f):_0x5ab0d6,_0x2cabfb=_0x43e67b[_0x3c1433(0x208)]-0x1,_0x8fe507;_0x2cabfb>=0x0;_0x2cabfb--)(_0x8fe507=_0x43e67b[_0x2cabfb])&&(_0x94b192=(_0x32f498?_0x8fe507(_0x5ab0d6,_0x55258f,_0x94b192):_0x8fe507(_0x94b192))||_0x94b192);return _0x32f498&&_0x94b192&&_0x3c1606(_0x5ab0d6,_0x55258f,_0x94b192),_0x94b192;},_0x1ece0=(_0x4aee51,_0x77ab8f)=>(_0x8acf61,_0x12dce8)=>_0x77ab8f(_0x8acf61,_0x12dce8,_0x4aee51);let _0x2afb07=class{constructor(_0x503381){this['_httpService']=_0x503381;}async[_0xa0760e(0x1d3)](_0x143260,_0x476118,_0x2e9a2a){const _0x5cdce7=_0xa0760e,_0x45fa4b=new URL(window['location'][_0x5cdce7(0x226)])[_0x5cdce7(0x1b7)][_0x5cdce7(0x1b4)](_0x5cdce7(0x1dc));if(!_0x45fa4b)return[];const _0x544646=window[_0x5cdce7(0x1c7)]['host'],_0x3440ef=window[_0x5cdce7(0x1c7)]['protocol']===_0x5cdce7(0x1ff)?_0x5cdce7(0x1d7):_0x5cdce7(0x1cf);return(await this[_0x5cdce7(0x1d8)][_0x5cdce7(0x1b4)](_0x3440ef+'://'+_0x544646+_0x5cdce7(0x1cb),{'params':{'objectID':_0x45fa4b,'unitID':_0x45fa4b}}))['body'][_0x5cdce7(0x1de)][_0x5cdce7(0x206)](_0x2893df=>{const _0x200097=_0x5cdce7;var _0x3a6bfc,_0x198061,_0x447f1f,_0x12bcd6,_0x2ab2b0,_0x32cdee;return{'id':(_0x198061=(_0x3a6bfc=_0x2893df[_0x200097(0x21a)])==null?void 0x0:_0x3a6bfc[_0x200097(0x1e1)])!=null?_0x198061:'','label':(_0x12bcd6=(_0x447f1f=_0x2893df[_0x200097(0x21a)])==null?void 0x0:_0x447f1f['name'])!=null?_0x12bcd6:'','icon':(_0x32cdee=(_0x2ab2b0=_0x2893df[_0x200097(0x21a)])==null?void 0x0:_0x2ab2b0[_0x200097(0x1a6)])!=null?_0x32cdee:'','type':_0x200097(0x1f6)};});}};_0x2afb07=_0x171e30([_0x1ece0(0x0,_0x256344['Inject'](_0xcb20d2['HTTPService']))],_0x2afb07);var _0x4215f7=Object[_0xa0760e(0x1a0)],_0x234fc9=Object[_0xa0760e(0x1bf)],_0x50f521=(_0x215e74,_0x1299ea,_0x4c22da,_0x5cefdd)=>{const _0x3464cd=_0xa0760e;for(var _0x58babd=_0x5cefdd>0x1?void 0x0:_0x5cefdd?_0x234fc9(_0x1299ea,_0x4c22da):_0x1299ea,_0x13db21=_0x215e74[_0x3464cd(0x208)]-0x1,_0x3d64d2;_0x13db21>=0x0;_0x13db21--)(_0x3d64d2=_0x215e74[_0x13db21])&&(_0x58babd=(_0x5cefdd?_0x3d64d2(_0x1299ea,_0x4c22da,_0x58babd):_0x3d64d2(_0x58babd))||_0x58babd);return _0x5cefdd&&_0x58babd&&_0x4215f7(_0x1299ea,_0x4c22da,_0x58babd),_0x58babd;},_0x4f6ef2=(_0x56b3e1,_0x2a6d08)=>(_0x4abe62,_0xb8c978)=>_0x2a6d08(_0x4abe62,_0xb8c978,_0x56b3e1);let _0x39dbf4=class extends _0x256344['Disposable']{constructor(_0x39ef2d,_0x3ee405,_0x5edb58,_0xa3fe53){const _0xd01397=_0xa0760e;super(),this[_0xd01397(0x204)]=_0x39ef2d,this[_0xd01397(0x1f4)]=_0x3ee405,this[_0xd01397(0x218)]=_0x5edb58,this[_0xd01397(0x1e0)]=_0xa3fe53,this[_0xd01397(0x203)]();}[_0xa0760e(0x203)](){const _0x3e470d=_0xa0760e;this[_0x3e470d(0x204)][_0x3e470d(0x1aa)]=this['_threadCommentDataSource'],this[_0x3e470d(0x204)][_0x3e470d(0x1f8)]=!0x1,this[_0x3e470d(0x218)][_0x3e470d(0x1aa)]=this[_0x3e470d(0x1e0)];}};_0x39dbf4=_0x50f521([_0x256344[_0xa0760e(0x1d4)](_0x256344[_0xa0760e(0x1fe)][_0xa0760e(0x1e8)],_0x39dbf4),_0x4f6ef2(0x0,_0x15323b[_0xa0760e(0x1e4)]),_0x4f6ef2(0x1,_0x256344[_0xa0760e(0x1a4)](_0x74e989)),_0x4f6ef2(0x2,_0x1cba50[_0xa0760e(0x1e5)]),_0x4f6ef2(0x3,_0x256344['Inject'](_0x2afb07))],_0x39dbf4);var _0x2d7bfa=Object['defineProperty'],_0x3b66bd=Object['getOwnPropertyDescriptor'],_0x4e1aae=(_0x1c1ba8,_0x407236,_0xa60909,_0x28c862)=>{const _0x1de321=_0xa0760e;for(var _0x59b415=_0x28c862>0x1?void 0x0:_0x28c862?_0x3b66bd(_0x407236,_0xa60909):_0x407236,_0x5cf20c=_0x1c1ba8[_0x1de321(0x208)]-0x1,_0x1623b4;_0x5cf20c>=0x0;_0x5cf20c--)(_0x1623b4=_0x1c1ba8[_0x5cf20c])&&(_0x59b415=(_0x28c862?_0x1623b4(_0x407236,_0xa60909,_0x59b415):_0x1623b4(_0x59b415))||_0x59b415);return _0x28c862&&_0x59b415&&_0x2d7bfa(_0x407236,_0xa60909,_0x59b415),_0x59b415;},_0x653e47=(_0x460e66,_0x3ac5c6)=>(_0x4cbee2,_0x32bc7e)=>_0x3ac5c6(_0x4cbee2,_0x32bc7e,_0x460e66);let _0x16bfcd=class extends _0x256344['Disposable']{constructor(_0x5cfa3c,_0x4a2cf3,_0x30b8fc,_0x4f1970){const _0x9dfbcd=_0xa0760e;super(),this[_0x9dfbcd(0x1ee)]=_0x5cfa3c,this[_0x9dfbcd(0x19e)]=_0x4a2cf3,this[_0x9dfbcd(0x1f9)]=_0x30b8fc,this[_0x9dfbcd(0x1c8)]=_0x4f1970,this[_0x9dfbcd(0x211)](),this['_initUserSync']();}[_0xa0760e(0x216)](){const _0x67510a=_0xa0760e;this[_0x67510a(0x22a)](this[_0x67510a(0x19e)][_0x67510a(0x19b)][_0x67510a(0x20f)](_0x45de69[_0x67510a(0x209)](0x10))[_0x67510a(0x1c5)](_0x124eb4=>{const _0x1d07e8=_0x67510a,_0x183073=new Set();_0x124eb4[_0x1d07e8(0x215)](_0x4c4e3d=>{const _0x3fd604=_0x1d07e8;switch(_0x4c4e3d['type']){case _0x3fd604(0x1f3):{const _0x3877d6=_0x4c4e3d[_0x3fd604(0x1b3)][_0x3fd604(0x202)];_0x183073[_0x3fd604(0x1f3)](_0x3877d6);break;}}}),_0x4517f9(this[_0x1d07e8(0x1c8)],_0x183073);}));}['_init'](){const _0x1105f4=_0xa0760e;this[_0x1105f4(0x22a)](this[_0x1105f4(0x1ee)][_0x1105f4(0x19b)][_0x1105f4(0x1c5)](async _0x5b40b1=>{const _0x3debc4=_0x1105f4;var _0x3c442f,_0x2b49d2;const _0xe78af4=this[_0x3debc4(0x19e)][_0x3debc4(0x1ca)](_0x5b40b1[_0x3debc4(0x1e2)],_0x5b40b1[_0x3debc4(0x1d9)]);if(!_0xe78af4)return;const {unitId:_0x5e1292,subUnitId:_0x6898a8}=_0xe78af4;switch(_0x5b40b1['user']&&this['_userService']['addUser'](_0x5b40b1[_0x3debc4(0x1f6)]),_0x5b40b1[_0x3debc4(0x1ec)]){case _0x2e242a['Add']:break;case _0x2e242a[_0x3debc4(0x214)]:{this[_0x3debc4(0x19e)]['addComment'](_0x5e1292,_0x6898a8,{'unitId':_0x5e1292,'subUnitId':_0x6898a8,'ref':'','id':_0x5b40b1[_0x3debc4(0x1fd)],'dT':_0x1b8871(+_0x5b40b1[_0x3debc4(0x1da)]),'threadId':_0x5b40b1[_0x3debc4(0x1d9)],'personId':(_0x2b49d2=(_0x3c442f=_0x5b40b1[_0x3debc4(0x1f6)])==null?void 0x0:_0x3c442f['userID'])!=null?_0x2b49d2:_0x5b40b1[_0x3debc4(0x1f5)],'text':JSON[_0x3debc4(0x1a7)](_0x5b40b1[_0x3debc4(0x1a9)]),'parentId':_0xe78af4['id']});break;}case _0x2e242a[_0x3debc4(0x1b6)]:{const _0x4bdcff=this[_0x3debc4(0x19e)][_0x3debc4(0x1ed)](_0x5e1292,_0x6898a8,_0x5b40b1[_0x3debc4(0x1fd)]);_0x4bdcff&&_0x4bdcff[_0x3debc4(0x1d5)]&&this['_threadCommentModel'][_0x3debc4(0x1c6)](_0x5e1292,_0x6898a8,_0x5b40b1['replyId']);break;}case _0x2e242a[_0x3debc4(0x1fa)]:{this[_0x3debc4(0x19e)][_0x3debc4(0x229)](_0x5e1292,_0x6898a8,{'commentId':_0x5b40b1['replyId'],'text':JSON[_0x3debc4(0x1a7)](_0x5b40b1[_0x3debc4(0x1a9)])});break;}case _0x2e242a[_0x3debc4(0x1bb)]:{const _0x231261=this[_0x3debc4(0x19e)][_0x3debc4(0x1ca)](_0x5e1292,_0x5b40b1[_0x3debc4(0x1d9)]);_0x231261&&this[_0x3debc4(0x19e)][_0x3debc4(0x1cd)](_0x5e1292,_0x6898a8,_0x231261['id'],_0x5b40b1[_0x3debc4(0x1a1)]===_0x176c49['Solved']);break;}}}));}};_0x16bfcd=_0x4e1aae([_0x256344[_0xa0760e(0x1d4)](_0x256344[_0xa0760e(0x1fe)]['Ready'],_0x16bfcd),_0x653e47(0x0,_0x256344['Inject'](_0x5a3410['CommentService'])),_0x653e47(0x1,_0x256344[_0xa0760e(0x1a4)](_0x15323b[_0xa0760e(0x1fb)])),_0x653e47(0x2,_0x256344[_0xa0760e(0x1a4)](_0x256344['UserManagerService'])),_0x653e47(0x3,_0x256344[_0xa0760e(0x1a4)](_0x256344[_0xa0760e(0x213)]))],_0x16bfcd);const _0x33be12=_0xa0760e(0x1b5),_0x24153f={};var _0x55e0b0=Object[_0xa0760e(0x1a0)],_0x17f14b=Object['getOwnPropertyDescriptor'],_0x3808a8=(_0x2f3e2d,_0x461ded,_0x529289)=>_0x461ded in _0x2f3e2d?_0x55e0b0(_0x2f3e2d,_0x461ded,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x529289}):_0x2f3e2d[_0x461ded]=_0x529289,_0x5d0c8c=(_0x4e6d13,_0x3332ed,_0xee94a2,_0xe3fc07)=>{for(var _0x5e66b9=_0xe3fc07>0x1?void 0x0:_0xe3fc07?_0x17f14b(_0x3332ed,_0xee94a2):_0x3332ed,_0x1c0bee=_0x4e6d13['length']-0x1,_0x348ce5;_0x1c0bee>=0x0;_0x1c0bee--)(_0x348ce5=_0x4e6d13[_0x1c0bee])&&(_0x5e66b9=(_0xe3fc07?_0x348ce5(_0x3332ed,_0xee94a2,_0x5e66b9):_0x348ce5(_0x5e66b9))||_0x5e66b9);return _0xe3fc07&&_0x5e66b9&&_0x55e0b0(_0x3332ed,_0xee94a2,_0x5e66b9),_0x5e66b9;},_0x2ca5f7=(_0x288606,_0x3d380a)=>(_0x148893,_0x238e26)=>_0x3d380a(_0x148893,_0x238e26,_0x288606),_0x5f4c54=(_0x26c50a,_0x21baaf,_0x4ee91d)=>_0x3808a8(_0x26c50a,typeof _0x21baaf!=_0xa0760e(0x22d)?_0x21baaf+'':_0x21baaf,_0x4ee91d);_0x5d32d4[_0xa0760e(0x1eb)]=class extends _0x256344[_0xa0760e(0x1b9)]{constructor(_0x11a610=_0x24153f,_0x5d429b,_0x4cea2e){const _0x24c697=_0xa0760e;super(),this[_0x24c697(0x222)]=_0x11a610,this[_0x24c697(0x1c8)]=_0x5d429b,this[_0x24c697(0x217)]=_0x4cea2e;const {..._0xa3a50}=this['_config'];this[_0x24c697(0x217)][_0x24c697(0x225)](_0x33be12,_0xa3a50);}['onStarting'](){const _0x1bc39d=_0xa0760e;[[_0x2afb07],[_0x74e989],[_0x39dbf4],[_0x16bfcd]][_0x1bc39d(0x215)](_0x5b9a6c=>{const _0x28aec0=_0x1bc39d;this[_0x28aec0(0x1c8)][_0x28aec0(0x1f3)](_0x5b9a6c);});}},_0x5f4c54(_0x5d32d4[_0xa0760e(0x1eb)],_0xa0760e(0x1af),_0x5d21e7),_0x5f4c54(_0x5d32d4[_0xa0760e(0x1eb)],_0xa0760e(0x1ec),_0x256344[_0xa0760e(0x1cc)][_0xa0760e(0x1e6)]),_0x5d32d4['UniverThreadCommentDataSourcePlugin']=_0x5d0c8c([_0x256344['DependentOn'](_0x15323b['UniverThreadCommentPlugin'],_0x1cba50[_0xa0760e(0x21c)],_0x5a3410[_0xa0760e(0x219)]),_0x2ca5f7(0x1,_0x256344[_0xa0760e(0x1a4)](_0x256344[_0xa0760e(0x213)])),_0x2ca5f7(0x2,_0x256344[_0xa0760e(0x1f1)])],_0x5d32d4[_0xa0760e(0x1eb)]),Object[_0xa0760e(0x1a0)](_0x5d32d4,Symbol[_0xa0760e(0x1b8)],{'value':_0xa0760e(0x1ac)});}));function _0xe498(_0x4c856f,_0x45de7a){const _0x49cf1f=_0x49cf();return _0xe498=function(_0xe498be,_0x4deb3c){_0xe498be=_0xe498be-0x19a;let _0xf1f6df=_0x49cf1f[_0xe498be];return _0xf1f6df;},_0xe498(_0x4c856f,_0x45de7a);}function _0x49cf(){const _0x2fa7d7=['href','users','@univerjs-pro/collaboration-client','updateComment','disposeWithMe','exports','@univerjs/core','symbol','UniverThreadComment','filter','dayjs','3JZZSIi','/edit','commentUpdate$','UNRECOGNIZED','customRanges','_threadCommentModel','13497044oHPokG','defineProperty','solved','CollaborationSessionService','CustomRangeType','Inject','UniverCore','avatar','parse','UniverThreadCommentUi','content','dataSource','@univerjs/network','Module','COMMENT','/list','pluginName','reply','HTTPService','object','payload','get','thread-comment-data-source.config','Delete','searchParams','toStringTag','Plugin','saveCommentToSnapshot','Solve','function','OpenOrReOpen','listComments','getOwnPropertyDescriptor','558qrqSRe','3118012ftWVtg','_sessionService','33846fpULjO','8bNikFa','subscribe','deleteComment','location','_injector','error','getThread','/universer-api/authz/collaborator','UniverInstanceType','resolveComment','5530EgCCKW','http','addUser','rangeType','resolved','getMentions','OnLifecycle','parentId','amd','https','_httpService','threadId','createTimestamp','comments','unit','post','collaborators','Solved','_threadCommentMentionDataSource','userID','unitId','THREAD_COMMENT_DATA_SOURCE_PLUGIN','IThreadCommentDataSourceService','IThreadCommentMentionDataService','UNIVER_UNKNOWN','requireSession','Starting','368500CeTsTK','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','type','getComment','_commentService','@univerjs/thread-comment-ui','slice','IConfigService','format','add','_threadCommentDataSource','userId','user','UserManagerService','syncUpdateMutationToColla','_userService','Edit','ThreadCommentModel','/reply','replyId','LifecycleStages','https:','body','/universer-api/comment/unit/','personId','_initDataSource','_threadCommentDataSourceService','Unknown','map','ref','length','bufferTime','5688DrDlpE','/universer-api/user/list','replies','/solved','Add','pipe','code','_init','UniverNetwork','Injector','Reply','forEach','_initUserSync','_configService','_threadCommentMentionDataService','UniverCollaborationClientPlugin','subject','rangeId','UniverThreadCommentUIPlugin','7235505owjyGS','rxjs','/delete','2751LYWwXJ','@univerjs/thread-comment','_config','getUser','getMemberID','setConfig'];_0x49cf=function(){return _0x2fa7d7;};return _0x49cf();}
1
+ (function(_0x50ad10,_0x5df032){const _0x11442e=_0x3e43,_0x91b148=_0x50ad10();while(!![]){try{const _0x13eb09=parseInt(_0x11442e(0x223))/0x1+-parseInt(_0x11442e(0x1f1))/0x2+-parseInt(_0x11442e(0x22e))/0x3+parseInt(_0x11442e(0x22a))/0x4*(parseInt(_0x11442e(0x259))/0x5)+-parseInt(_0x11442e(0x230))/0x6+-parseInt(_0x11442e(0x224))/0x7*(parseInt(_0x11442e(0x239))/0x8)+parseInt(_0x11442e(0x236))/0x9;if(_0x13eb09===_0x5df032)break;else _0x91b148['push'](_0x91b148['shift']());}catch(_0x295e3a){_0x91b148['push'](_0x91b148['shift']());}}}(_0x4841,0x46aa2),function(_0x1e2260,_0x35a5ad){const _0xbfa50f=_0x3e43;typeof exports=='object'&&typeof module<'u'?_0x35a5ad(exports,require(_0xbfa50f(0x214)),require(_0xbfa50f(0x275)),require(_0xbfa50f(0x23c)),require(_0xbfa50f(0x271)),require(_0xbfa50f(0x24b)),require(_0xbfa50f(0x212)),require(_0xbfa50f(0x270))):typeof define==_0xbfa50f(0x1fe)&&define[_0xbfa50f(0x27f)]?define(['exports','@univerjs/core','@univerjs/thread-comment',_0xbfa50f(0x23c),_0xbfa50f(0x271),_0xbfa50f(0x24b),'dayjs',_0xbfa50f(0x270)],_0x35a5ad):(_0x1e2260=typeof globalThis<'u'?globalThis:_0x1e2260||self,_0x35a5ad(_0x1e2260[_0xbfa50f(0x242)]={},_0x1e2260[_0xbfa50f(0x251)],_0x1e2260[_0xbfa50f(0x219)],_0x1e2260[_0xbfa50f(0x208)],_0x1e2260[_0xbfa50f(0x260)],_0x1e2260[_0xbfa50f(0x279)],_0x1e2260[_0xbfa50f(0x212)],_0x1e2260[_0xbfa50f(0x270)]));}(this,function(_0x2e12ec,_0x2d4db3,_0x1e3a23,_0xa92f27,_0x4f26eb,_0x235884,_0x5b4d9b,_0x3d8b35){'use strict';const _0x4c9014=_0x3e43;const _0x5e0ba8=_0x4c9014(0x258);var _0x50ab58=(_0x3b10b3=>(_0x3b10b3[_0x3b10b3[_0x4c9014(0x272)]=0x0]=_0x4c9014(0x272),_0x3b10b3[_0x3b10b3['Solved']=0x1]=_0x4c9014(0x209),_0x3b10b3[_0x3b10b3[_0x4c9014(0x277)]=-0x1]=_0x4c9014(0x277),_0x3b10b3))(_0x50ab58||{}),_0xb83c57=(_0x11125c=>(_0x11125c[_0x11125c[_0x4c9014(0x26a)]=0x0]=_0x4c9014(0x26a),_0x11125c[_0x11125c[_0x4c9014(0x26f)]=0x1]=_0x4c9014(0x26f),_0x11125c[_0x11125c[_0x4c9014(0x20d)]=0x2]=_0x4c9014(0x20d),_0x11125c[_0x11125c[_0x4c9014(0x201)]=0x3]='Edit',_0x11125c[_0x11125c['Delete']=0x4]='Delete',_0x11125c[_0x11125c[_0x4c9014(0x274)]=0x5]=_0x4c9014(0x274),_0x11125c[_0x11125c[_0x4c9014(0x277)]=-0x1]='UNRECOGNIZED',_0x11125c))(_0xb83c57||{});const _0xca81b4=_0xf65523=>_0x5b4d9b(new Date(+_0xf65523))[_0x4c9014(0x226)](_0x4c9014(0x1fd)),_0x2974fd=async(_0x3f11e9,_0x5e08ba)=>{const _0x39db1b=_0x4c9014,_0x53cdf7=_0x3f11e9[_0x39db1b(0x255)](_0x2d4db3[_0x39db1b(0x233)]),_0x39a618=_0x3f11e9['get'](_0x235884[_0x39db1b(0x269)]);_0x5e08ba[_0x39db1b(0x25f)](_0x62e3d7=>{_0x53cdf7['getUser'](_0x62e3d7)&&_0x5e08ba['delete'](_0x62e3d7);}),_0x5e08ba['size']&&(await _0x39a618['get'](_0x39db1b(0x252),{'params':{'userIDs':[..._0x5e08ba]}}))['body'][_0x39db1b(0x262)][_0x39db1b(0x25f)](_0xb971b6=>{_0xb971b6&&_0x53cdf7['addUser'](_0xb971b6);});};var _0x192859=Object[_0x4c9014(0x249)],_0x3cba8f=Object[_0x4c9014(0x221)],_0x1c0bb2=(_0x4ac78d,_0x47ec12,_0x210eec,_0x66d8f4)=>{for(var _0x2504e3=_0x66d8f4>0x1?void 0x0:_0x66d8f4?_0x3cba8f(_0x47ec12,_0x210eec):_0x47ec12,_0x29c38d=_0x4ac78d['length']-0x1,_0x4def93;_0x29c38d>=0x0;_0x29c38d--)(_0x4def93=_0x4ac78d[_0x29c38d])&&(_0x2504e3=(_0x66d8f4?_0x4def93(_0x47ec12,_0x210eec,_0x2504e3):_0x4def93(_0x2504e3))||_0x2504e3);return _0x66d8f4&&_0x2504e3&&_0x192859(_0x47ec12,_0x210eec,_0x2504e3),_0x2504e3;},_0x7d39b1=(_0x5c1382,_0xdd329e)=>(_0x4adc3c,_0x414eb8)=>_0xdd329e(_0x4adc3c,_0x414eb8,_0x5c1382);function _0x3895eb(_0x132873,_0x2a9066){const _0x5cdc4a=_0x4c9014,_0x2ecd42=_0x132873['replies'][0x0];return{..._0x2a9066,'id':_0x2ecd42[_0x5cdc4a(0x225)],'resolved':_0x132873[_0x5cdc4a(0x263)]===0x1,'dT':_0xca81b4(_0x2ecd42[_0x5cdc4a(0x25e)]),'personId':_0x2ecd42[_0x5cdc4a(0x20e)],'threadId':_0x2ecd42[_0x5cdc4a(0x22d)]};}function _0x304d8c(_0x24b9d8,_0x24e766,_0xaafa8e){const _0xbf53b5=_0x4c9014;var _0x5dd527,_0x4b9cc9;if(((_0x4b9cc9=(_0x5dd527=_0x24b9d8==null?void 0x0:_0x24b9d8['replies'])==null?void 0x0:_0x5dd527[_0xbf53b5(0x202)])!=null?_0x4b9cc9:0x0)>0x0){const _0xb6f37d=(_0x5053f9,_0x312511)=>({'id':_0x5053f9[_0xbf53b5(0x225)],'threadId':_0x5053f9[_0xbf53b5(0x22d)],'dT':_0xca81b4(_0x5053f9[_0xbf53b5(0x25e)]),'personId':_0x5053f9[_0xbf53b5(0x20e)],'resolved':_0x24b9d8['solved']===_0x50ab58['Solved'],'unitId':_0x24e766,'subUnitId':_0xaafa8e,'text':JSON[_0xbf53b5(0x24e)](_0x5053f9['content']),'parentId':_0x312511}),_0x5b41dc=_0xb6f37d(_0x24b9d8[_0xbf53b5(0x1f5)][0x0]);return{..._0x5b41dc,'children':_0x24b9d8[_0xbf53b5(0x1f5)][_0xbf53b5(0x227)](0x1)['map'](_0x571e87=>_0xb6f37d(_0x571e87,_0x5b41dc['id']))};}return null;}let _0x17f3d5=class{constructor(_0xfc981d,_0x595643,_0xccd42e,_0x26c44c){const _0x47d3f1=_0x4c9014;this[_0x47d3f1(0x241)]=_0xfc981d,this[_0x47d3f1(0x20f)]=_0x595643,this[_0x47d3f1(0x222)]=_0xccd42e,this['_injector']=_0x26c44c;}async['addComment'](_0x5c6f31){const _0xe1103d=_0x4c9014;var _0x4a064e,_0x4c5eab;const {parentId:_0x4cff92,unitId:_0x39a73e,text:_0x5ab61a,threadId:_0x69dc0d}=_0x5c6f31,_0x1c785e=(_0x4c5eab=(_0x4a064e=_0x5ab61a[_0xe1103d(0x21a)])==null?void 0x0:_0x4a064e[_0xe1103d(0x218)](_0x49b928=>_0x49b928['rangeType']===_0x2d4db3[_0xe1103d(0x210)][_0xe1103d(0x26d)])[_0xe1103d(0x23b)](_0xe8ac7c=>_0xe8ac7c[_0xe1103d(0x27b)]))!=null?_0x4c5eab:[],_0x4f2459=JSON[_0xe1103d(0x26e)](_0x5ab61a),_0x2895b6=(await this['_sessionService']['requireSession'](_0x39a73e))[_0xe1103d(0x280)]();if(_0x4cff92){const _0x39c025={'memberId':_0x2895b6,'unitId':_0x39a73e,'content':_0x4f2459,'mention':_0x1c785e,'threadId':_0x69dc0d},_0x3c1f75=(await this['_httpService']['post'](_0xe1103d(0x204)+_0x39a73e+_0xe1103d(0x22c),{'body':_0x39c025}))[_0xe1103d(0x231)]['reply'];return{..._0x5c6f31,'id':_0x3c1f75[_0xe1103d(0x225)],'dT':_0x5b4d9b(+_0x3c1f75[_0xe1103d(0x25e)])['format'](_0xe1103d(0x1fd)),'personId':_0x3c1f75['userId']};}else{const _0x49e2f0={'memberId':_0x2895b6,'unitId':_0x39a73e,'content':_0x4f2459,'mention':_0x1c785e},_0x5dd0bb=await this['_httpService'][_0xe1103d(0x257)](_0xe1103d(0x204)+_0x39a73e+_0xe1103d(0x27a),{'body':_0x49e2f0});return _0x3895eb(_0x5dd0bb['body']['comment'],_0x5c6f31);}}async['updateComment'](_0x3a996e){const _0x1cff68=_0x4c9014;var _0x56c7ca,_0x3df95d;const {text:_0x32c16d,unitId:_0x843140}=_0x3a996e,_0x57d202=(_0x3df95d=(_0x56c7ca=_0x32c16d[_0x1cff68(0x21a)])==null?void 0x0:_0x56c7ca[_0x1cff68(0x218)](_0x38cff5=>_0x38cff5[_0x1cff68(0x248)]===_0x2d4db3['CustomRangeType'][_0x1cff68(0x26d)])[_0x1cff68(0x23b)](_0x2dd110=>_0x2dd110['rangeId']))!=null?_0x3df95d:[],_0x4050d2=JSON[_0x1cff68(0x26e)](_0x32c16d),_0x2ce9e8=_0x3a996e['threadId'],_0x132d31=_0x3a996e['id'],_0x457607={'memberId':(await this['_sessionService'][_0x1cff68(0x217)](_0x843140))['getMemberID'](),'unitId':_0x843140,'threadId':_0x2ce9e8,'mention':_0x57d202,'content':_0x4050d2,'replyId':_0x132d31},_0x23b7e2=await this['_httpService'][_0x1cff68(0x257)](_0x1cff68(0x204)+_0x843140+_0x1cff68(0x203),{'body':_0x457607});return!_0x23b7e2[_0x1cff68(0x231)][_0x1cff68(0x21f)]||_0x23b7e2[_0x1cff68(0x231)][_0x1cff68(0x21f)][_0x1cff68(0x23f)]===0x1;}async[_0x4c9014(0x253)](_0x4ced48){const _0x58b145=_0x4c9014,{unitId:_0xa0b002}=_0x4ced48,_0x516879=_0x4ced48[_0x58b145(0x22d)],_0x334bdd={'memberId':this['_userService'][_0x58b145(0x22f)]()['userID'],'unitId':_0xa0b002,'threadId':_0x516879,'solved':_0x4ced48[_0x58b145(0x1f2)]?_0x50ab58[_0x58b145(0x209)]:_0x50ab58[_0x58b145(0x272)]},_0x20f1de=await this[_0x58b145(0x241)][_0x58b145(0x257)](_0x58b145(0x204)+_0xa0b002+_0x58b145(0x25a),{'body':_0x334bdd});return!_0x20f1de[_0x58b145(0x231)][_0x58b145(0x21f)]||_0x20f1de['body'][_0x58b145(0x21f)][_0x58b145(0x23f)]===0x1;}async[_0x4c9014(0x1fc)](_0x187219,_0x334f83,_0x19ed5c,_0x739fe9){const _0x35c828=_0x4c9014,_0x4645bd={'memberId':(await this[_0x35c828(0x222)]['requireSession'](_0x187219))[_0x35c828(0x280)](),'threadId':_0x19ed5c,'replyId':_0x739fe9,'unitId':_0x187219},_0xefb72e=await this[_0x35c828(0x241)][_0x35c828(0x257)](_0x35c828(0x204)+_0x187219+_0x35c828(0x207),{'body':_0x4645bd});return!_0xefb72e['body'][_0x35c828(0x21f)]||_0xefb72e[_0x35c828(0x231)][_0x35c828(0x21f)][_0x35c828(0x23f)]===0x1;}async[_0x4c9014(0x250)](_0x5cb50c,_0x2f4ab0,_0x553812){const _0x2b4c6a=_0x4c9014,_0x36e23f={'unitId':_0x5cb50c,'threadId':_0x553812},_0x1c6452=await this[_0x2b4c6a(0x241)][_0x2b4c6a(0x257)]('/universer-api/comment/unit/'+_0x5cb50c+'/list',{'body':_0x36e23f}),_0x4529bc=_0x553812['map'](_0xe03887=>_0x304d8c(_0x1c6452['body']['comments'][_0xe03887],_0x5cb50c,_0x2f4ab0))[_0x2b4c6a(0x218)](Boolean);return Object['values'](_0x1c6452[_0x2b4c6a(0x231)][_0x2b4c6a(0x262)])[_0x2b4c6a(0x25f)](_0x471576=>{this['_userService']['addUser'](_0x471576);}),_0x4529bc;}[_0x4c9014(0x1f7)](_0x4f6597){const _0x5e8797=_0x4c9014;return{'id':_0x4f6597['id'],'threadId':_0x4f6597[_0x5e8797(0x22d)],'ref':_0x4f6597['ref']};}};_0x17f3d5=_0x1c0bb2([_0x7d39b1(0x0,_0x2d4db3['Inject'](_0x235884[_0x4c9014(0x269)])),_0x7d39b1(0x1,_0x2d4db3[_0x4c9014(0x278)](_0x2d4db3['UserManagerService'])),_0x7d39b1(0x2,_0x2d4db3[_0x4c9014(0x278)](_0x4f26eb[_0x4c9014(0x213)])),_0x7d39b1(0x3,_0x2d4db3['Inject'](_0x2d4db3['Injector']))],_0x17f3d5);var _0x24649d=Object[_0x4c9014(0x249)],_0x53a32f=Object[_0x4c9014(0x221)],_0x247bbd=(_0xea7176,_0x661cd1,_0x488212,_0xb02f86)=>{for(var _0x3e4dd7=_0xb02f86>0x1?void 0x0:_0xb02f86?_0x53a32f(_0x661cd1,_0x488212):_0x661cd1,_0x400d81=_0xea7176['length']-0x1,_0x252459;_0x400d81>=0x0;_0x400d81--)(_0x252459=_0xea7176[_0x400d81])&&(_0x3e4dd7=(_0xb02f86?_0x252459(_0x661cd1,_0x488212,_0x3e4dd7):_0x252459(_0x3e4dd7))||_0x3e4dd7);return _0xb02f86&&_0x3e4dd7&&_0x24649d(_0x661cd1,_0x488212,_0x3e4dd7),_0x3e4dd7;},_0x13176b=(_0x21ac4a,_0x64fdf4)=>(_0x502154,_0x421f12)=>_0x64fdf4(_0x502154,_0x421f12,_0x21ac4a);let _0x489acc=class{constructor(_0x46e7ac){const _0x249dcb=_0x4c9014;this[_0x249dcb(0x241)]=_0x46e7ac;}async[_0x4c9014(0x21e)](_0x41dcca,_0x3c7ae7,_0x5c8471){const _0x80a1b5=_0x4c9014,_0x56b10d=new URL(window['location']['href'])['searchParams'][_0x80a1b5(0x255)](_0x80a1b5(0x267));if(!_0x56b10d)return[];const _0x4268ea=window[_0x80a1b5(0x235)]['host'],_0x19bffc=window['location']['protocol']==='https:'?_0x80a1b5(0x1fb):_0x80a1b5(0x244);return(await this[_0x80a1b5(0x241)][_0x80a1b5(0x255)](_0x19bffc+_0x80a1b5(0x215)+_0x4268ea+_0x80a1b5(0x24f),{'params':{'objectID':_0x56b10d,'unitID':_0x56b10d}}))[_0x80a1b5(0x231)][_0x80a1b5(0x265)][_0x80a1b5(0x23b)](_0x1dfcbf=>{const _0x49d62b=_0x80a1b5;var _0x436327,_0x32fe0d,_0x72b10c,_0x229694,_0x127782,_0x4847f4;return{'id':(_0x32fe0d=(_0x436327=_0x1dfcbf[_0x49d62b(0x22b)])==null?void 0x0:_0x436327[_0x49d62b(0x1f4)])!=null?_0x32fe0d:'','label':(_0x229694=(_0x72b10c=_0x1dfcbf[_0x49d62b(0x22b)])==null?void 0x0:_0x72b10c[_0x49d62b(0x256)])!=null?_0x229694:'','icon':(_0x4847f4=(_0x127782=_0x1dfcbf[_0x49d62b(0x22b)])==null?void 0x0:_0x127782[_0x49d62b(0x232)])!=null?_0x4847f4:'','type':_0x49d62b(0x273)};});}};_0x489acc=_0x247bbd([_0x13176b(0x0,_0x2d4db3[_0x4c9014(0x278)](_0x235884['HTTPService']))],_0x489acc);var _0x15d2a9=Object[_0x4c9014(0x249)],_0x291e3f=Object[_0x4c9014(0x221)],_0x2bcf90=(_0x4638d3,_0x2411a6,_0x2e39bc,_0x561da1)=>{for(var _0x26f385=_0x561da1>0x1?void 0x0:_0x561da1?_0x291e3f(_0x2411a6,_0x2e39bc):_0x2411a6,_0x4956e7=_0x4638d3['length']-0x1,_0x503ed5;_0x4956e7>=0x0;_0x4956e7--)(_0x503ed5=_0x4638d3[_0x4956e7])&&(_0x26f385=(_0x561da1?_0x503ed5(_0x2411a6,_0x2e39bc,_0x26f385):_0x503ed5(_0x26f385))||_0x26f385);return _0x561da1&&_0x26f385&&_0x15d2a9(_0x2411a6,_0x2e39bc,_0x26f385),_0x26f385;},_0x2176f9=(_0x39dad0,_0x190b79)=>(_0x13ac22,_0x27cde7)=>_0x190b79(_0x13ac22,_0x27cde7,_0x39dad0);let _0x10f5a5=class extends _0x2d4db3[_0x4c9014(0x237)]{constructor(_0x52b09c,_0x3ed397,_0x43a129,_0x2fe269){const _0x2233b0=_0x4c9014;super(),this[_0x2233b0(0x25c)]=_0x52b09c,this['_threadCommentDataSource']=_0x3ed397,this[_0x2233b0(0x211)]=_0x43a129,this['_threadCommentMentionDataSource']=_0x2fe269,this['_initDataSource']();}[_0x4c9014(0x25b)](){const _0x3cd784=_0x4c9014;this['_threadCommentDataSourceService'][_0x3cd784(0x1f9)]=this['_threadCommentDataSource'],this[_0x3cd784(0x25c)][_0x3cd784(0x240)]=!0x1,this['_threadCommentMentionDataService']['dataSource']=this[_0x3cd784(0x228)];}};_0x10f5a5=_0x2bcf90([_0x2d4db3[_0x4c9014(0x25d)](_0x2d4db3[_0x4c9014(0x21d)][_0x4c9014(0x200)],_0x10f5a5),_0x2176f9(0x0,_0x1e3a23[_0x4c9014(0x264)]),_0x2176f9(0x1,_0x2d4db3[_0x4c9014(0x278)](_0x17f3d5)),_0x2176f9(0x2,_0xa92f27[_0x4c9014(0x245)]),_0x2176f9(0x3,_0x2d4db3[_0x4c9014(0x278)](_0x489acc))],_0x10f5a5);var _0x273984=Object[_0x4c9014(0x249)],_0x413ca2=Object[_0x4c9014(0x221)],_0xb5a44=(_0x3edc0b,_0x1b77b0,_0x488edb,_0x495ea9)=>{const _0xa837bc=_0x4c9014;for(var _0x237d56=_0x495ea9>0x1?void 0x0:_0x495ea9?_0x413ca2(_0x1b77b0,_0x488edb):_0x1b77b0,_0x39954e=_0x3edc0b[_0xa837bc(0x202)]-0x1,_0xa1ee1;_0x39954e>=0x0;_0x39954e--)(_0xa1ee1=_0x3edc0b[_0x39954e])&&(_0x237d56=(_0x495ea9?_0xa1ee1(_0x1b77b0,_0x488edb,_0x237d56):_0xa1ee1(_0x237d56))||_0x237d56);return _0x495ea9&&_0x237d56&&_0x273984(_0x1b77b0,_0x488edb,_0x237d56),_0x237d56;},_0x3be18a=(_0x4daf08,_0x3f3513)=>(_0x34878b,_0x3dfda9)=>_0x3f3513(_0x34878b,_0x3dfda9,_0x4daf08);let _0x4fbaf8=class extends _0x2d4db3['Disposable']{constructor(_0x4c09cf,_0x10a54a,_0x5549f3,_0x3ac8e5){const _0x1a26ad=_0x4c9014;super(),this[_0x1a26ad(0x216)]=_0x4c09cf,this[_0x1a26ad(0x24c)]=_0x10a54a,this[_0x1a26ad(0x20f)]=_0x5549f3,this['_injector']=_0x3ac8e5,this[_0x1a26ad(0x1fa)](),this[_0x1a26ad(0x254)]();}['_initUserSync'](){const _0x4d249b=_0x4c9014;this[_0x4d249b(0x27c)](this[_0x4d249b(0x24c)][_0x4d249b(0x1ff)][_0x4d249b(0x26b)](_0x3d8b35[_0x4d249b(0x20b)](0x10))[_0x4d249b(0x234)](_0x531c73=>{const _0x53547a=_0x4d249b,_0x1a48b8=new Set();_0x531c73[_0x53547a(0x25f)](_0x137b5c=>{const _0x3e18b5=_0x53547a;switch(_0x137b5c[_0x3e18b5(0x27d)]){case _0x3e18b5(0x206):{const _0x1ae7ca=_0x137b5c['payload'][_0x3e18b5(0x24d)];_0x1a48b8[_0x3e18b5(0x206)](_0x1ae7ca);break;}}}),_0x2974fd(this[_0x53547a(0x27e)],_0x1a48b8);}));}['_init'](){const _0x2a5e1c=_0x4c9014;this[_0x2a5e1c(0x27c)](this[_0x2a5e1c(0x216)][_0x2a5e1c(0x1ff)][_0x2a5e1c(0x234)](async _0x44710a=>{const _0x736f48=_0x2a5e1c;var _0x234af9,_0x32d2a5;const _0x287abd=this[_0x736f48(0x24c)]['getThread'](_0x44710a['unitId'],_0x44710a[_0x736f48(0x22d)]);if(!_0x287abd)return;const {unitId:_0x27baf3,subUnitId:_0x32f642}=_0x287abd;switch(_0x44710a[_0x736f48(0x273)]&&this[_0x736f48(0x20f)]['addUser'](_0x44710a[_0x736f48(0x273)]),_0x44710a['type']){case _0xb83c57['Add']:break;case _0xb83c57[_0x736f48(0x20d)]:{this[_0x736f48(0x24c)][_0x736f48(0x261)](_0x27baf3,_0x32f642,{'unitId':_0x27baf3,'subUnitId':_0x32f642,'ref':'','id':_0x44710a[_0x736f48(0x225)],'dT':_0xca81b4(+_0x44710a[_0x736f48(0x25e)]),'threadId':_0x44710a[_0x736f48(0x22d)],'personId':(_0x32d2a5=(_0x234af9=_0x44710a['user'])==null?void 0x0:_0x234af9['userID'])!=null?_0x32d2a5:_0x44710a[_0x736f48(0x20e)],'text':JSON['parse'](_0x44710a[_0x736f48(0x205)]),'parentId':_0x287abd['id']});break;}case _0xb83c57[_0x736f48(0x229)]:{const _0x5db6cd=this[_0x736f48(0x24c)][_0x736f48(0x1f6)](_0x27baf3,_0x32f642,_0x44710a[_0x736f48(0x225)]);_0x5db6cd&&_0x5db6cd[_0x736f48(0x20a)]&&this[_0x736f48(0x24c)][_0x736f48(0x1fc)](_0x27baf3,_0x32f642,_0x44710a[_0x736f48(0x225)]);break;}case _0xb83c57[_0x736f48(0x201)]:{this[_0x736f48(0x24c)][_0x736f48(0x20c)](_0x27baf3,_0x32f642,{'commentId':_0x44710a['replyId'],'text':JSON[_0x736f48(0x24e)](_0x44710a[_0x736f48(0x205)])});break;}case _0xb83c57[_0x736f48(0x274)]:{const _0x4ff36d=this[_0x736f48(0x24c)][_0x736f48(0x243)](_0x27baf3,_0x44710a['threadId']);_0x4ff36d&&this[_0x736f48(0x24c)]['resolveComment'](_0x27baf3,_0x32f642,_0x4ff36d['id'],_0x44710a[_0x736f48(0x263)]===_0x50ab58[_0x736f48(0x209)]);break;}}}));}};_0x4fbaf8=_0xb5a44([_0x2d4db3[_0x4c9014(0x25d)](_0x2d4db3[_0x4c9014(0x21d)][_0x4c9014(0x1f8)],_0x4fbaf8),_0x3be18a(0x0,_0x2d4db3[_0x4c9014(0x278)](_0x4f26eb[_0x4c9014(0x21c)])),_0x3be18a(0x1,_0x2d4db3[_0x4c9014(0x278)](_0x1e3a23['ThreadCommentModel'])),_0x3be18a(0x2,_0x2d4db3['Inject'](_0x2d4db3[_0x4c9014(0x233)])),_0x3be18a(0x3,_0x2d4db3[_0x4c9014(0x278)](_0x2d4db3['Injector']))],_0x4fbaf8);const _0x279681=_0x4c9014(0x23d),_0x56b9b8={};var _0xafdab1=Object[_0x4c9014(0x249)],_0x234b1c=Object[_0x4c9014(0x221)],_0x23061e=(_0x5c93bd,_0x3ca02c,_0x4ecd4b)=>_0x3ca02c in _0x5c93bd?_0xafdab1(_0x5c93bd,_0x3ca02c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ecd4b}):_0x5c93bd[_0x3ca02c]=_0x4ecd4b,_0x4e4f2f=(_0x263f10,_0x867f80,_0x4e9c57,_0x24d9bb)=>{const _0xe01c85=_0x4c9014;for(var _0x3a5d2c=_0x24d9bb>0x1?void 0x0:_0x24d9bb?_0x234b1c(_0x867f80,_0x4e9c57):_0x867f80,_0x489ae0=_0x263f10[_0xe01c85(0x202)]-0x1,_0x53a705;_0x489ae0>=0x0;_0x489ae0--)(_0x53a705=_0x263f10[_0x489ae0])&&(_0x3a5d2c=(_0x24d9bb?_0x53a705(_0x867f80,_0x4e9c57,_0x3a5d2c):_0x53a705(_0x3a5d2c))||_0x3a5d2c);return _0x24d9bb&&_0x3a5d2c&&_0xafdab1(_0x867f80,_0x4e9c57,_0x3a5d2c),_0x3a5d2c;},_0x5ec150=(_0x2f7eaa,_0x37d0bb)=>(_0x230b89,_0xeb553)=>_0x37d0bb(_0x230b89,_0xeb553,_0x2f7eaa),_0x1275be=(_0xc2c692,_0x52d231,_0x498133)=>_0x23061e(_0xc2c692,typeof _0x52d231!=_0x4c9014(0x246)?_0x52d231+'':_0x52d231,_0x498133);_0x2e12ec['UniverThreadCommentDataSourcePlugin']=class extends _0x2d4db3['Plugin']{constructor(_0x4bf996=_0x56b9b8,_0x4d879e,_0x2f1def){const _0x43ce68=_0x4c9014;super(),this[_0x43ce68(0x281)]=_0x4bf996,this['_injector']=_0x4d879e,this[_0x43ce68(0x268)]=_0x2f1def;const {..._0x370534}=this[_0x43ce68(0x281)];this[_0x43ce68(0x268)][_0x43ce68(0x238)](_0x279681,_0x370534);}[_0x4c9014(0x23a)](){const _0x4b69a7=_0x4c9014;[[_0x489acc],[_0x17f3d5],[_0x10f5a5],[_0x4fbaf8]][_0x4b69a7(0x25f)](_0x5f3814=>{const _0x3e063d=_0x4b69a7;this['_injector'][_0x3e063d(0x206)](_0x5f3814);});}},_0x1275be(_0x2e12ec[_0x4c9014(0x247)],_0x4c9014(0x21b),_0x5e0ba8),_0x1275be(_0x2e12ec[_0x4c9014(0x247)],'type',_0x2d4db3[_0x4c9014(0x220)][_0x4c9014(0x1f3)]),_0x2e12ec[_0x4c9014(0x247)]=_0x4e4f2f([_0x2d4db3[_0x4c9014(0x23e)](_0x1e3a23['UniverThreadCommentPlugin'],_0xa92f27['UniverThreadCommentUIPlugin'],_0x4f26eb[_0x4c9014(0x24a)]),_0x5ec150(0x1,_0x2d4db3[_0x4c9014(0x278)](_0x2d4db3[_0x4c9014(0x26c)])),_0x5ec150(0x2,_0x2d4db3['IConfigService'])],_0x2e12ec[_0x4c9014(0x247)]),Object[_0x4c9014(0x249)](_0x2e12ec,Symbol[_0x4c9014(0x276)],{'value':_0x4c9014(0x266)});}));function _0x3e43(_0x50533b,_0x33e529){const _0x48411a=_0x4841();return _0x3e43=function(_0x3e439e,_0x566044){_0x3e439e=_0x3e439e-0x1f1;let _0x2b895e=_0x48411a[_0x3e439e];return _0x2b895e;},_0x3e43(_0x50533b,_0x33e529);}function _0x4841(){const _0x1a58f6=['content','add','/delete','UniverThreadCommentUi','Solved','parentId','bufferTime','updateComment','Reply','userId','_userService','CustomRangeType','_threadCommentMentionDataService','dayjs','CollaborationSessionService','@univerjs/core','://','_commentService','requireSession','filter','UniverThreadComment','customRanges','pluginName','CommentService','LifecycleStages','getMentions','error','UniverInstanceType','getOwnPropertyDescriptor','_sessionService','189778WIMjBJ','14623JljRZm','replyId','format','slice','_threadCommentMentionDataSource','Delete','16960vgbNNs','subject','/reply','threadId','1518495rsscpk','getCurrentUser','702264RXfVle','body','avatar','UserManagerService','subscribe','location','9659448ciMxmx','Disposable','setConfig','1592qCgcfM','onStarting','map','@univerjs/thread-comment-ui','thread-comment-data-source.config','DependentOn','code','syncUpdateMutationToColla','_httpService','UniverThreadCommentDatasource','getThread','http','IThreadCommentMentionDataService','symbol','UniverThreadCommentDataSourcePlugin','rangeType','defineProperty','UniverCollaborationClientPlugin','@univerjs/network','_threadCommentModel','personId','parse','/universer-api/authz/collaborator','listComments','UniverCore','/universer-api/user/list','resolveComment','_initUserSync','get','name','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','265mDsbCH','/solved','_initDataSource','_threadCommentDataSourceService','OnLifecycle','createTimestamp','forEach','UniverCollaborationClient','addComment','users','solved','IThreadCommentDataSourceService','collaborators','Module','unit','_configService','HTTPService','Unknown','pipe','Injector','COMMENT','stringify','Add','rxjs','@univerjs-pro/collaboration-client','OpenOrReOpen','user','Solve','@univerjs/thread-comment','toStringTag','UNRECOGNIZED','Inject','UniverNetwork','/add','rangeId','disposeWithMe','type','_injector','amd','getMemberID','_config','318816poKclM','resolved','UNIVER_UNKNOWN','userID','replies','getComment','saveCommentToSnapshot','Ready','dataSource','_init','https','deleteComment','YYYY/MM/DD\x20HH:mm','function','commentUpdate$','Starting','Edit','length','/edit','/universer-api/comment/unit/'];_0x4841=function(){return _0x1a58f6;};return _0x4841();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,26 +45,26 @@
45
45
  "peerDependencies": {
46
46
  "dayjs": ">=1.11.0",
47
47
  "rxjs": ">=7.0.0",
48
- "@univerjs-pro/collaboration-client": "0.2.12",
49
- "@univerjs/core": "0.2.12",
50
- "@univerjs/network": "0.2.12",
51
- "@univerjs/thread-comment": "0.2.12",
52
- "@univerjs/thread-comment-ui": "0.2.12"
48
+ "@univerjs/core": "0.2.13",
49
+ "@univerjs-pro/collaboration-client": "0.2.13",
50
+ "@univerjs/network": "0.2.13",
51
+ "@univerjs/thread-comment-ui": "0.2.13",
52
+ "@univerjs/thread-comment": "0.2.13"
53
53
  },
54
54
  "dependencies": {
55
- "@univerjs/protocol": "0.1.39-alpha.15"
55
+ "dayjs": "^1.11.13",
56
+ "@univerjs-pro/facade": "0.2.13",
57
+ "@univerjs/uniscript": "0.2.13",
58
+ "@univerjs/protocol": "0.1.39-alpha.15",
59
+ "@univerjs/core": "0.2.13",
60
+ "@univerjs/network": "0.2.13"
56
61
  },
57
62
  "devDependencies": {
58
- "dayjs": "^1.11.12",
59
63
  "rxjs": "^7.8.1",
60
- "typescript": "^5.5.4",
61
- "vite": "^5.4.0",
64
+ "typescript": "^5.6.2",
65
+ "vite": "^5.4.3",
62
66
  "vitest": "^2.0.5",
63
- "@univerjs-pro/facade": "0.2.12",
64
- "@univerjs/core": "0.2.12",
65
- "@univerjs/network": "0.2.12",
66
- "@univerjs/uniscript": "0.2.12",
67
- "@univerjs/shared": "0.2.12"
67
+ "@univerjs-infra/shared": "0.2.13"
68
68
  },
69
69
  "univerSpace": {
70
70
  ".": {