@univerjs-pro/thread-comment-datasource 0.10.7 → 0.10.8-nightly.202509200616
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1f57d8=_0x37ac;(function(_0x51e9e1,_0x625ff3){const _0x1f2fd8=_0x37ac,_0x57cc03=_0x51e9e1();while(!![]){try{const _0x23cd74=-parseInt(_0x1f2fd8(0x178))/0x1*(parseInt(_0x1f2fd8(0x15c))/0x2)+-parseInt(_0x1f2fd8(0x131))/0x3*(-parseInt(_0x1f2fd8(0x12c))/0x4)+-parseInt(_0x1f2fd8(0x15a))/0x5+parseInt(_0x1f2fd8(0x123))/0x6*(-parseInt(_0x1f2fd8(0x13d))/0x7)+-parseInt(_0x1f2fd8(0x14f))/0x8+parseInt(_0x1f2fd8(0x155))/0x9+-parseInt(_0x1f2fd8(0x195))/0xa*(-parseInt(_0x1f2fd8(0x144))/0xb);if(_0x23cd74===_0x625ff3)break;else _0x57cc03['push'](_0x57cc03['shift']());}catch(_0xfae627){_0x57cc03['push'](_0x57cc03['shift']());}}}(_0x1a90,0xead48));Object[_0x1f57d8(0x159)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1f57d8(0x180);var I=(_0x1b170f=>(_0x1b170f[_0x1b170f[_0x1f57d8(0x129)]=0x0]=_0x1f57d8(0x129),_0x1b170f[_0x1b170f[_0x1f57d8(0x13a)]=0x1]='Solved',_0x1b170f[_0x1b170f[_0x1f57d8(0x194)]=-0x1]='UNRECOGNIZED',_0x1b170f))(I||{}),v=(_0x3ea1ae=>(_0x3ea1ae[_0x3ea1ae['Unknown']=0x0]='Unknown',_0x3ea1ae[_0x3ea1ae[_0x1f57d8(0x165)]=0x1]=_0x1f57d8(0x165),_0x3ea1ae[_0x3ea1ae['Reply']=0x2]=_0x1f57d8(0x163),_0x3ea1ae[_0x3ea1ae[_0x1f57d8(0x13c)]=0x3]='Edit',_0x3ea1ae[_0x3ea1ae['Delete']=0x4]='Delete',_0x3ea1ae[_0x3ea1ae[_0x1f57d8(0x14e)]=0x5]=_0x1f57d8(0x14e),_0x3ea1ae[_0x3ea1ae[_0x1f57d8(0x194)]=-0x1]=_0x1f57d8(0x194),_0x3ea1ae))(v||{});const f=_0x14af8e=>c[_0x1f57d8(0x147)](new Date(+_0x14af8e))[_0x1f57d8(0x140)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x9556b1,_0x5cb36e)=>{const _0x371e94=_0x1f57d8,_0x231168=_0x9556b1['get'](c[_0x371e94(0x16b)]),_0x25319f=_0x9556b1[_0x371e94(0x17d)](P[_0x371e94(0x179)]);_0x5cb36e[_0x371e94(0x176)](_0x137f3f=>{const _0x787da2=_0x371e94;_0x231168[_0x787da2(0x149)](_0x137f3f)&&_0x5cb36e[_0x787da2(0x133)](_0x137f3f);}),_0x5cb36e[_0x371e94(0x173)]&&(await _0x25319f[_0x371e94(0x17d)](_0x371e94(0x199),{'params':{'userIDs':[..._0x5cb36e]}}))[_0x371e94(0x135)][_0x371e94(0x187)][_0x371e94(0x176)](_0x2526e5=>{const _0x35e049=_0x371e94;_0x2526e5&&_0x231168[_0x35e049(0x127)](_0x2526e5);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x295fe0,_0x4ea671,_0x5717c5,_0x4cd9ca)=>{const _0xacc57e=_0x1f57d8;for(var _0x1c1adc=_0x4cd9ca>0x1?void 0x0:_0x4cd9ca?$(_0x4ea671,_0x5717c5):_0x4ea671,_0x369eb8=_0x295fe0[_0xacc57e(0x174)]-0x1,_0x4e750c;_0x369eb8>=0x0;_0x369eb8--)(_0x4e750c=_0x295fe0[_0x369eb8])&&(_0x1c1adc=_0x4e750c(_0x1c1adc)||_0x1c1adc);return _0x1c1adc;},S=(_0x445ce9,_0x767de4)=>(_0x74c43b,_0x2148f0)=>_0x767de4(_0x74c43b,_0x2148f0,_0x445ce9);let _=class extends c['Disposable']{constructor(_0x45a4d0,_0x46ac53,_0x561d75,_0x2531d6){const _0x7c5bf1=_0x1f57d8;super(),this['_commentService']=_0x45a4d0,this[_0x7c5bf1(0x164)]=_0x46ac53,this['_userService']=_0x561d75,this[_0x7c5bf1(0x146)]=_0x2531d6,this['_init'](),this['_initUserSync']();}[_0x1f57d8(0x16f)](){const _0x3e2d89=_0x1f57d8;this[_0x3e2d89(0x188)](this['_threadCommentModel'][_0x3e2d89(0x197)][_0x3e2d89(0x189)](j['bufferTime'](0x10))[_0x3e2d89(0x139)](_0x56bb8e=>{const _0x2d20d5=_0x3e2d89,_0x3441a9=new Set();_0x56bb8e[_0x2d20d5(0x176)](_0x223d08=>{const _0x4fb699=_0x2d20d5;switch(_0x223d08[_0x4fb699(0x14c)]){case _0x4fb699(0x13f):{const _0x1044bf=_0x223d08[_0x4fb699(0x152)][_0x4fb699(0x154)];_0x3441a9[_0x4fb699(0x13f)](_0x1044bf);break;}}}),R(this[_0x2d20d5(0x146)],_0x3441a9);}));}[_0x1f57d8(0x132)](){const _0x20b8dc=_0x1f57d8;this[_0x20b8dc(0x188)](this[_0x20b8dc(0x145)][_0x20b8dc(0x197)][_0x20b8dc(0x139)](async _0x3ad866=>{const _0x573208=_0x20b8dc;var _0x715010,_0x1d06a9,_0x159a46,_0x1bf4fc;const _0x5b8bd8=(_0x715010=this[_0x573208(0x164)][_0x573208(0x186)](_0x3ad866[_0x573208(0x185)])[_0x573208(0x168)](_0x63ec1e=>_0x63ec1e[_0x573208(0x12f)]===_0x3ad866[_0x573208(0x12f)]))==null?void 0x0:_0x715010['root'];if(!_0x5b8bd8)return;const {unitId:_0x24af8f,subUnitId:_0x473433}=_0x5b8bd8;switch(_0x3ad866[_0x573208(0x143)]&&this[_0x573208(0x19b)][_0x573208(0x127)](_0x3ad866[_0x573208(0x143)]),_0x3ad866[_0x573208(0x14c)]){case v[_0x573208(0x165)]:break;case v[_0x573208(0x163)]:{this[_0x573208(0x164)]['addComment'](_0x24af8f,_0x473433,{'unitId':_0x24af8f,'subUnitId':_0x473433,'ref':'','id':_0x3ad866[_0x573208(0x125)],'dT':f(+_0x3ad866[_0x573208(0x11f)]),'threadId':_0x3ad866[_0x573208(0x12f)],'personId':(_0x159a46=(_0x1d06a9=_0x3ad866[_0x573208(0x143)])==null?void 0x0:_0x1d06a9['userID'])!=null?_0x159a46:_0x3ad866['userId'],'text':JSON[_0x573208(0x192)](_0x3ad866[_0x573208(0x12d)]),'parentId':_0x5b8bd8['id']});break;}case v[_0x573208(0x171)]:{const _0x513679=this[_0x573208(0x164)][_0x573208(0x12b)](_0x24af8f,_0x473433,_0x3ad866[_0x573208(0x125)]);_0x513679&&_0x513679[_0x573208(0x137)]&&this['_threadCommentModel'][_0x573208(0x177)](_0x24af8f,_0x473433,_0x3ad866[_0x573208(0x125)]);break;}case v[_0x573208(0x13c)]:{this['_threadCommentModel'][_0x573208(0x138)](_0x24af8f,_0x473433,{'commentId':_0x3ad866[_0x573208(0x125)],'text':JSON[_0x573208(0x192)](_0x3ad866[_0x573208(0x12d)])});break;}case v['Solve']:{const _0x4fcc58=(_0x1bf4fc=this['_threadCommentModel']['getUnit'](_0x3ad866[_0x573208(0x185)])[_0x573208(0x168)](_0x584f33=>_0x584f33['threadId']===_0x3ad866[_0x573208(0x12f)]))==null?void 0x0:_0x1bf4fc[_0x573208(0x17e)];_0x4fcc58&&this[_0x573208(0x164)][_0x573208(0x169)](_0x24af8f,_0x473433,_0x4fcc58['id'],_0x3ad866[_0x573208(0x16c)]===I[_0x573208(0x13a)]);break;}}}));}};_=E([S(0x0,c[_0x1f57d8(0x166)](b[_0x1f57d8(0x142)])),S(0x1,c[_0x1f57d8(0x166)](M[_0x1f57d8(0x172)])),S(0x2,c[_0x1f57d8(0x166)](c['UserManagerService'])),S(0x3,c[_0x1f57d8(0x166)](c[_0x1f57d8(0x12e)]))],_);const q=_0x1f57d8(0x170),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x4b2358,_0x4b6cf5,_0x1d9969,_0xd2d1a1)=>{const _0x3d2545=_0x1f57d8;for(var _0x14594f=_0xd2d1a1>0x1?void 0x0:_0xd2d1a1?A(_0x4b6cf5,_0x1d9969):_0x4b6cf5,_0x321812=_0x4b2358[_0x3d2545(0x174)]-0x1,_0x208808;_0x321812>=0x0;_0x321812--)(_0x208808=_0x4b2358[_0x321812])&&(_0x14594f=_0x208808(_0x14594f)||_0x14594f);return _0x14594f;},C=(_0x3c924a,_0x4ae58c)=>(_0x3e7863,_0xbd781b)=>_0x4ae58c(_0x3e7863,_0xbd781b,_0x3c924a);function Y(_0x97de69,_0xdbbb64){const _0x49e50e=_0x1f57d8,_0x33ab8f=_0x97de69[_0x49e50e(0x156)][0x0];return{..._0xdbbb64,'id':_0x33ab8f[_0x49e50e(0x125)],'resolved':_0x97de69[_0x49e50e(0x16c)]===0x1,'dT':f(_0x33ab8f[_0x49e50e(0x11f)]),'personId':_0x33ab8f[_0x49e50e(0x14d)],'threadId':_0x33ab8f[_0x49e50e(0x12f)]};}function G(_0x353b9f,_0xef2552,_0x104e34){const _0x2cc014=_0x1f57d8;var _0x1bdbce,_0x39b710;if(((_0x39b710=(_0x1bdbce=_0x353b9f==null?void 0x0:_0x353b9f[_0x2cc014(0x156)])==null?void 0x0:_0x1bdbce['length'])!=null?_0x39b710:0x0)>0x0){const _0x92df7d=(_0x1ff1e1,_0x3a2334)=>({'id':_0x1ff1e1[_0x2cc014(0x125)],'threadId':_0x1ff1e1['threadId'],'dT':f(_0x1ff1e1[_0x2cc014(0x11f)]),'personId':_0x1ff1e1[_0x2cc014(0x14d)],'resolved':_0x353b9f[_0x2cc014(0x16c)]===I['Solved'],'unitId':_0xef2552,'subUnitId':_0x104e34,'text':JSON[_0x2cc014(0x192)](_0x1ff1e1['content']),'parentId':_0x3a2334}),_0x6eee5=_0x92df7d(_0x353b9f[_0x2cc014(0x156)][0x0]);return{..._0x6eee5,'children':_0x353b9f[_0x2cc014(0x156)][_0x2cc014(0x193)](0x1)[_0x2cc014(0x15f)](_0x2f83be=>_0x92df7d(_0x2f83be,_0x6eee5['id']))};}return null;}let p=class{constructor(_0x51ccce,_0x46c917,_0x56f284){const _0xdd9ccf=_0x1f57d8;this[_0xdd9ccf(0x120)]=_0x51ccce,this[_0xdd9ccf(0x19b)]=_0x46c917,this[_0xdd9ccf(0x18c)]=_0x56f284;}async[_0x1f57d8(0x15e)](_0x1a579b){const _0x5c682d=_0x1f57d8;var _0x4543f2,_0x230746;const {parentId:_0xfd3a46,unitId:_0x56b0ed,text:_0xcd00b2,threadId:_0x22ed9b}=_0x1a579b,_0xd7e857=(_0x230746=(_0x4543f2=_0xcd00b2[_0x5c682d(0x18d)])==null?void 0x0:_0x4543f2[_0x5c682d(0x14b)](_0x8768ca=>_0x8768ca[_0x5c682d(0x190)]===c[_0x5c682d(0x161)][_0x5c682d(0x16a)])[_0x5c682d(0x15f)](_0x4de89b=>_0x4de89b[_0x5c682d(0x17b)]))!=null?_0x230746:[],_0xc40636=JSON[_0x5c682d(0x17c)](_0xcd00b2),_0x6bfb99=(await this['_sessionService'][_0x5c682d(0x18e)](_0x56b0ed))[_0x5c682d(0x19a)]();if(_0xfd3a46){const _0x215f64={'memberId':_0x6bfb99,'unitId':_0x56b0ed,'content':_0xc40636,'mention':_0xd7e857,'threadId':_0x22ed9b},_0x59e215=(await this[_0x5c682d(0x120)]['post'](_0x5c682d(0x196)+_0x56b0ed+_0x5c682d(0x134),{'body':_0x215f64}))[_0x5c682d(0x135)][_0x5c682d(0x198)];return{..._0x1a579b,'id':_0x59e215['replyId'],'dT':c[_0x5c682d(0x147)](+_0x59e215[_0x5c682d(0x11f)])[_0x5c682d(0x140)](_0x5c682d(0x191)),'personId':_0x59e215[_0x5c682d(0x14d)]};}else{const _0x416f0c={'memberId':_0x6bfb99,'unitId':_0x56b0ed,'content':_0xc40636,'mention':_0xd7e857},_0x13d4ee=await this[_0x5c682d(0x120)][_0x5c682d(0x121)](_0x5c682d(0x196)+_0x56b0ed+_0x5c682d(0x15b),{'body':_0x416f0c});return Y(_0x13d4ee['body'][_0x5c682d(0x18a)],_0x1a579b);}}async['updateComment'](_0x5238af){const _0x239e2a=_0x1f57d8;var _0x3ee131,_0x403a4b;const {text:_0x4f3b35,unitId:_0x6a1db7}=_0x5238af,_0x430787=(_0x403a4b=(_0x3ee131=_0x4f3b35[_0x239e2a(0x18d)])==null?void 0x0:_0x3ee131[_0x239e2a(0x14b)](_0x1c74a3=>_0x1c74a3[_0x239e2a(0x190)]===c['CustomRangeType'][_0x239e2a(0x16a)])['map'](_0x3c2c0e=>_0x3c2c0e[_0x239e2a(0x17b)]))!=null?_0x403a4b:[],_0x43dc4d=JSON[_0x239e2a(0x17c)](_0x4f3b35),_0x5b038=_0x5238af[_0x239e2a(0x12f)],_0x82c17c=_0x5238af['id'],_0x51e1e6={'memberId':(await this[_0x239e2a(0x18c)][_0x239e2a(0x18e)](_0x6a1db7))[_0x239e2a(0x19a)](),'unitId':_0x6a1db7,'threadId':_0x5b038,'mention':_0x430787,'content':_0x43dc4d,'replyId':_0x82c17c},_0x3a6ae9=await this[_0x239e2a(0x120)][_0x239e2a(0x121)](_0x239e2a(0x196)+_0x6a1db7+'/edit',{'body':_0x51e1e6});return!_0x3a6ae9[_0x239e2a(0x135)][_0x239e2a(0x158)]||_0x3a6ae9[_0x239e2a(0x135)][_0x239e2a(0x158)][_0x239e2a(0x122)]===0x1;}async[_0x1f57d8(0x169)](_0x193447){const _0xf6e818=_0x1f57d8,{unitId:_0x3fefaa}=_0x193447,_0xb37bd=_0x193447[_0xf6e818(0x12f)],_0x3bf27f={'memberId':this[_0xf6e818(0x19b)][_0xf6e818(0x167)]()['userID'],'unitId':_0x3fefaa,'threadId':_0xb37bd,'solved':_0x193447[_0xf6e818(0x128)]?I[_0xf6e818(0x13a)]:I[_0xf6e818(0x129)]},_0x35cef6=await this[_0xf6e818(0x120)][_0xf6e818(0x121)](_0xf6e818(0x196)+_0x3fefaa+_0xf6e818(0x14a),{'body':_0x3bf27f});return!_0x35cef6[_0xf6e818(0x135)][_0xf6e818(0x158)]||_0x35cef6[_0xf6e818(0x135)]['error'][_0xf6e818(0x122)]===0x1;}async[_0x1f57d8(0x177)](_0x376eb7,_0x329b78,_0x1ec04e,_0x111d64){const _0x2cb594=_0x1f57d8,_0x106150={'memberId':(await this[_0x2cb594(0x18c)][_0x2cb594(0x18e)](_0x376eb7))['getMemberID'](),'threadId':_0x1ec04e,'replyId':_0x111d64,'unitId':_0x376eb7},_0x3c259c=await this[_0x2cb594(0x120)]['post'](_0x2cb594(0x196)+_0x376eb7+_0x2cb594(0x153),{'body':_0x106150});return!_0x3c259c[_0x2cb594(0x135)][_0x2cb594(0x158)]||_0x3c259c[_0x2cb594(0x135)]['error'][_0x2cb594(0x122)]===0x1;}async[_0x1f57d8(0x12a)](_0x577b31,_0x35bfbe,_0x2c6419){const _0xb62e0=_0x1f57d8,_0x427cc2={'unitId':_0x577b31,'threadId':_0x2c6419},_0x323dd3=await this[_0xb62e0(0x120)]['post'](_0xb62e0(0x196)+_0x577b31+_0xb62e0(0x157),{'body':_0x427cc2}),_0x5a8a38=_0x2c6419['map'](_0x119547=>G(_0x323dd3[_0xb62e0(0x135)][_0xb62e0(0x162)][_0x119547],_0x577b31,_0x35bfbe))[_0xb62e0(0x14b)](Boolean);return Object[_0xb62e0(0x150)](_0x323dd3[_0xb62e0(0x135)][_0xb62e0(0x187)])['forEach'](_0x4a94f7=>{const _0x357b6d=_0xb62e0;this[_0x357b6d(0x19b)][_0x357b6d(0x127)](_0x4a94f7);}),_0x5a8a38;}[_0x1f57d8(0x148)](_0x44e3ff){const _0x3bde24=_0x1f57d8;return{'id':_0x44e3ff['id'],'threadId':_0x44e3ff[_0x3bde24(0x12f)],'ref':_0x44e3ff['ref']};}};p=x([C(0x0,c[_0x1f57d8(0x166)](P[_0x1f57d8(0x179)])),C(0x1,c['Inject'](c[_0x1f57d8(0x16b)])),C(0x2,c[_0x1f57d8(0x166)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x2bd746,_0x12bc68,_0x3c0397,_0x3dfa51)=>{const _0x42512d=_0x1f57d8;for(var _0x37d2b5=_0x3dfa51>0x1?void 0x0:_0x3dfa51?H(_0x12bc68,_0x3c0397):_0x12bc68,_0x12916d=_0x2bd746[_0x42512d(0x174)]-0x1,_0x1b83bf;_0x12916d>=0x0;_0x12916d--)(_0x1b83bf=_0x2bd746[_0x12916d])&&(_0x37d2b5=_0x1b83bf(_0x37d2b5)||_0x37d2b5);return _0x37d2b5;},y=(_0x3251d2,_0x2d55a7)=>(_0x5476f0,_0x6c83fc)=>_0x2d55a7(_0x5476f0,_0x6c83fc,_0x3251d2);function _0x37ac(_0x190713,_0x54e104){const _0x1a90ab=_0x1a90();return _0x37ac=function(_0x37acd8,_0xf4a6e1){_0x37acd8=_0x37acd8-0x11f;let _0x326d48=_0x1a90ab[_0x37acd8];return _0x326d48;},_0x37ac(_0x190713,_0x54e104);}let g=class extends c['Disposable']{constructor(_0x42b50e,_0x4ad74f){const _0x46ec8e=_0x1f57d8;super(),this[_0x46ec8e(0x183)]=_0x42b50e,this[_0x46ec8e(0x124)]=_0x4ad74f,this[_0x46ec8e(0x13b)]();}[_0x1f57d8(0x13b)](){const _0x46862f=_0x1f57d8;this[_0x46862f(0x183)][_0x46862f(0x130)]=this[_0x46862f(0x124)],this[_0x46862f(0x183)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x1f57d8(0x175)]),y(0x1,c[_0x1f57d8(0x166)](p))],g);var F=Object['defineProperty'],L=Object[_0x1f57d8(0x184)],Z=(_0x123bac,_0x44adb8,_0x2b2d71)=>_0x44adb8 in _0x123bac?F(_0x123bac,_0x44adb8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b2d71}):_0x123bac[_0x44adb8]=_0x2b2d71,W=(_0x119489,_0x3eca4c,_0x95812a,_0x191fb9)=>{for(var _0xe64f43=_0x191fb9>0x1?void 0x0:_0x191fb9?L(_0x3eca4c,_0x95812a):_0x3eca4c,_0x1ab5e4=_0x119489['length']-0x1,_0x1aff97;_0x1ab5e4>=0x0;_0x1ab5e4--)(_0x1aff97=_0x119489[_0x1ab5e4])&&(_0xe64f43=_0x1aff97(_0xe64f43)||_0xe64f43);return _0xe64f43;},O=(_0x28a30b,_0x5be397)=>(_0x365360,_0x34a8a8)=>_0x5be397(_0x365360,_0x34a8a8,_0x28a30b),N=(_0x5a6e35,_0x562d91,_0x242aea)=>Z(_0x5a6e35,typeof _0x562d91!=_0x1f57d8(0x16d)?_0x562d91+'':_0x562d91,_0x242aea);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1f57d8(0x15d)]{constructor(_0x1646e3=D,_0x56bf77,_0x4c93bb){const _0x138268=_0x1f57d8;super(),this[_0x138268(0x16e)]=_0x1646e3,this['_injector']=_0x56bf77,this['_configService']=_0x4c93bb;const {..._0x103212}=c[_0x138268(0x18b)]({},D,this[_0x138268(0x16e)]);this[_0x138268(0x136)][_0x138268(0x18f)](q,_0x103212);}[_0x1f57d8(0x182)](){[[p],[g],[_]]['forEach'](_0x31a198=>{const _0x5c81ad=_0x37ac;this[_0x5c81ad(0x146)][_0x5c81ad(0x13f)](_0x31a198);});}[_0x1f57d8(0x17a)](){const _0x42b353=_0x1f57d8;this[_0x42b353(0x146)][_0x42b353(0x17d)](g),this[_0x42b353(0x146)][_0x42b353(0x17d)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1f57d8(0x17f),U),N(exports[_0x1f57d8(0x126)],_0x1f57d8(0x14c),c[_0x1f57d8(0x151)]['UNIVER_UNKNOWN']),exports[_0x1f57d8(0x126)]=W([c['DependentOn'](w[_0x1f57d8(0x181)],b[_0x1f57d8(0x13e)],T[_0x1f57d8(0x141)]),O(0x1,c[_0x1f57d8(0x166)](c[_0x1f57d8(0x12e)])),O(0x2,c[_0x1f57d8(0x160)])],exports[_0x1f57d8(0x126)]);function _0x1a90(){const _0x2a99b7=['solved','symbol','_config','_initUserSync','thread-comment-data-source.config','Delete','ThreadCommentModel','size','length','IThreadCommentDataSourceService','forEach','deleteComment','4mjdWsS','HTTPService','onReady','rangeId','stringify','get','root','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentUIPlugin','onStarting','_threadCommentDataSourceService','getOwnPropertyDescriptor','unitId','getUnit','users','disposeWithMe','pipe','comment','merge','_sessionService','customRanges','requireSession','setConfig','rangeType','YYYY/MM/DD\x20HH:mm','parse','slice','UNRECOGNIZED','37939820Zldywl','/universer-api/comment/unit/','commentUpdate$','reply','/universer-api/user/list','getMemberID','_userService','createTimestamp','_httpService','post','code','1476846rMVIhg','_threadCommentDataSource','replyId','UniverThreadCommentDataSourcePlugin','addUser','resolved','OpenOrReOpen','listComments','getComment','276zQWmTN','content','Injector','threadId','dataSource','19521EWKMTE','_init','delete','/reply','body','_configService','parentId','updateComment','subscribe','Solved','_initDataSource','Edit','7nLtyhG','UniverCollaborationClientPlugin','add','format','UniverLicensePlugin','CommentService','user','11YBcshL','_commentService','_injector','dayjs','saveCommentToSnapshot','getUser','/solved','filter','type','userId','Solve','12749904aHgxhO','values','UniverInstanceType','payload','/delete','personId','16836858aMIKcl','replies','/list','error','defineProperty','8775180quWdQU','/add','778474OifczP','Plugin','addComment','map','IConfigService','CustomRangeType','comments','Reply','_threadCommentModel','Add','Inject','getCurrentUser','find','resolveComment','COMMENT','UserManagerService'];_0x1a90=function(){return _0x2a99b7;};return _0x1a90();}
|
|
1
|
+
'use strict';const _0x34955c=_0x59b8;(function(_0x439ad5,_0x2e32fc){const _0x5b2852=_0x59b8,_0x47ecc2=_0x439ad5();while(!![]){try{const _0x2fdd4a=parseInt(_0x5b2852(0xb7))/0x1+parseInt(_0x5b2852(0x99))/0x2*(parseInt(_0x5b2852(0xb9))/0x3)+parseInt(_0x5b2852(0xe1))/0x4+parseInt(_0x5b2852(0xda))/0x5+-parseInt(_0x5b2852(0x103))/0x6*(-parseInt(_0x5b2852(0xd2))/0x7)+-parseInt(_0x5b2852(0xd0))/0x8*(-parseInt(_0x5b2852(0xcf))/0x9)+-parseInt(_0x5b2852(0xcd))/0xa*(parseInt(_0x5b2852(0xc8))/0xb);if(_0x2fdd4a===_0x2e32fc)break;else _0x47ecc2['push'](_0x47ecc2['shift']());}catch(_0x2564e6){_0x47ecc2['push'](_0x47ecc2['shift']());}}}(_0x4a8a,0x57fa1));Object['defineProperty'](exports,Symbol[_0x34955c(0x10c)],{'value':_0x34955c(0xa9)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x35558d=>(_0x35558d[_0x35558d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x35558d[_0x35558d[_0x34955c(0xd5)]=0x1]='Solved',_0x35558d[_0x35558d[_0x34955c(0xce)]=-0x1]='UNRECOGNIZED',_0x35558d))(I||{}),v=(_0x36e5d4=>(_0x36e5d4[_0x36e5d4['Unknown']=0x0]=_0x34955c(0x9d),_0x36e5d4[_0x36e5d4[_0x34955c(0xbb)]=0x1]=_0x34955c(0xbb),_0x36e5d4[_0x36e5d4[_0x34955c(0xe8)]=0x2]=_0x34955c(0xe8),_0x36e5d4[_0x36e5d4['Edit']=0x3]=_0x34955c(0xfd),_0x36e5d4[_0x36e5d4[_0x34955c(0xf4)]=0x4]='Delete',_0x36e5d4[_0x36e5d4[_0x34955c(0xc4)]=0x5]=_0x34955c(0xc4),_0x36e5d4[_0x36e5d4[_0x34955c(0xce)]=-0x1]=_0x34955c(0xce),_0x36e5d4))(v||{});function _0x4a8a(){const _0x3d4d64=['Unknown','/add','values','CommentService','UniverLicensePlugin','rangeType','bufferTime','/reply','syncUpdateMutationToColla','getOwnPropertyDescriptor','personId','Inject','Module','pipe','deleteComment','add','_init','user','CollaborationSessionService','ref','getMemberID','replyId','resolveComment','CustomRangeType','UniverCollaborationClientPlugin','map','434698zfAykw','UniverThreadCommentUIPlugin','34377uJsfjM','UniverThreadCommentDataSourcePlugin','Add','body','customRanges','get','resolved','format','Plugin','delete','parentId','Solve','disposeWithMe','unitId','users','17430083tVjSwq','_userService','DependentOn','setConfig','error','10QcXhvT','UNRECOGNIZED','5931018YqZiOu','8ZLGWZK','_injector','6461wlAuRt','commentUpdate$','thread-comment-data-source.config','Solved','code','payload','getUnit','_initDataSource','1962125DnvkhC','_threadCommentDataSourceService','slice','dayjs','/delete','root','UNIVER_UNKNOWN','988752yUJJbA','content','OpenOrReOpen','length','createTimestamp','userId','_commentService','Reply','UserManagerService','onStarting','addUser','_httpService','filter','dataSource','/universer-api/comment/unit/','/edit','replies','_config','_configService','Delete','_sessionService','COMMENT','/universer-api/user/list','Injector','IThreadCommentDataSourceService','updateComment','rangeId','defineProperty','Edit','requireSession','post','comments','userID','_threadCommentModel','1152Gkzdjh','comment','listComments','YYYY/MM/DD\x20HH:mm','parse','Disposable','forEach','threadId','type','toStringTag','getComment','pluginName','solved','stringify','_threadCommentDataSource','6NMhEOt','HTTPService','reply','find'];_0x4a8a=function(){return _0x3d4d64;};return _0x4a8a();}const f=_0x2d483b=>c[_0x34955c(0xdd)](new Date(+_0x2d483b))[_0x34955c(0xc0)](_0x34955c(0x106)),R=async(_0x44f549,_0x5eaf13)=>{const _0x211005=_0x34955c,_0x160f17=_0x44f549[_0x211005(0xbe)](c[_0x211005(0xe9)]),_0x16668c=_0x44f549[_0x211005(0xbe)](P[_0x211005(0x9a)]);_0x5eaf13['forEach'](_0x9d2040=>{const _0x1bb689=_0x211005;_0x160f17['getUser'](_0x9d2040)&&_0x5eaf13[_0x1bb689(0xc2)](_0x9d2040);}),_0x5eaf13['size']&&(await _0x16668c[_0x211005(0xbe)](_0x211005(0xf7),{'params':{'userIDs':[..._0x5eaf13]}}))[_0x211005(0xbc)][_0x211005(0xc7)]['forEach'](_0xdce4f4=>{const _0x22c61b=_0x211005;_0xdce4f4&&_0x160f17[_0x22c61b(0xeb)](_0xdce4f4);});};var $=Object[_0x34955c(0xa6)],E=(_0x3697eb,_0x13d7c5,_0x3c4df2,_0x48caa8)=>{const _0x2e6e8e=_0x34955c;for(var _0x92a2c=_0x48caa8>0x1?void 0x0:_0x48caa8?$(_0x13d7c5,_0x3c4df2):_0x13d7c5,_0x18d92f=_0x3697eb[_0x2e6e8e(0xe4)]-0x1,_0x1d0207;_0x18d92f>=0x0;_0x18d92f--)(_0x1d0207=_0x3697eb[_0x18d92f])&&(_0x92a2c=_0x1d0207(_0x92a2c)||_0x92a2c);return _0x92a2c;},S=(_0x46c42,_0x28cdfe)=>(_0x38ff73,_0xb0c7bb)=>_0x28cdfe(_0x38ff73,_0xb0c7bb,_0x46c42);let _=class extends c[_0x34955c(0x108)]{constructor(_0x45fdc7,_0x4ae8dc,_0x1b5daa,_0x3d7811){const _0x1d7420=_0x34955c;super(),this[_0x1d7420(0xe7)]=_0x45fdc7,this[_0x1d7420(0x102)]=_0x4ae8dc,this[_0x1d7420(0xc9)]=_0x1b5daa,this[_0x1d7420(0xd1)]=_0x3d7811,this[_0x1d7420(0xad)](),this['_initUserSync']();}['_initUserSync'](){const _0x5778ad=_0x34955c;this[_0x5778ad(0xc5)](this[_0x5778ad(0x102)][_0x5778ad(0xd3)][_0x5778ad(0xaa)](j[_0x5778ad(0xa3)](0x10))['subscribe'](_0x507187=>{const _0x125c72=_0x5778ad,_0x2bfa4d=new Set();_0x507187[_0x125c72(0x109)](_0x21a6b1=>{const _0x3cd0c8=_0x125c72;switch(_0x21a6b1['type']){case _0x3cd0c8(0xac):{const _0x4aea26=_0x21a6b1[_0x3cd0c8(0xd7)][_0x3cd0c8(0xa7)];_0x2bfa4d[_0x3cd0c8(0xac)](_0x4aea26);break;}}}),R(this[_0x125c72(0xd1)],_0x2bfa4d);}));}['_init'](){const _0x2e38b0=_0x34955c;this['disposeWithMe'](this['_commentService'][_0x2e38b0(0xd3)]['subscribe'](async _0x122217=>{const _0x349898=_0x2e38b0;var _0x4739df,_0x42dbe4,_0xa6bbd3,_0x3f32ae;const _0x343bf7=(_0x4739df=this[_0x349898(0x102)][_0x349898(0xd8)](_0x122217[_0x349898(0xc6)])[_0x349898(0x9c)](_0x4388c2=>_0x4388c2['threadId']===_0x122217[_0x349898(0x10a)]))==null?void 0x0:_0x4739df[_0x349898(0xdf)];if(!_0x343bf7)return;const {unitId:_0x4c59c0,subUnitId:_0x250b4d}=_0x343bf7;switch(_0x122217[_0x349898(0xae)]&&this['_userService'][_0x349898(0xeb)](_0x122217[_0x349898(0xae)]),_0x122217[_0x349898(0x10b)]){case v[_0x349898(0xbb)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x4c59c0,_0x250b4d,{'unitId':_0x4c59c0,'subUnitId':_0x250b4d,'ref':'','id':_0x122217[_0x349898(0xb2)],'dT':f(+_0x122217[_0x349898(0xe5)]),'threadId':_0x122217[_0x349898(0x10a)],'personId':(_0xa6bbd3=(_0x42dbe4=_0x122217[_0x349898(0xae)])==null?void 0x0:_0x42dbe4[_0x349898(0x101)])!=null?_0xa6bbd3:_0x122217[_0x349898(0xe6)],'text':JSON['parse'](_0x122217['content']),'parentId':_0x343bf7['id']});break;}case v[_0x349898(0xf4)]:{const _0x1e2d48=this[_0x349898(0x102)][_0x349898(0x10d)](_0x4c59c0,_0x250b4d,_0x122217['replyId']);_0x1e2d48&&_0x1e2d48[_0x349898(0xc3)]&&this['_threadCommentModel']['deleteComment'](_0x4c59c0,_0x250b4d,_0x122217[_0x349898(0xb2)]);break;}case v[_0x349898(0xfd)]:{this[_0x349898(0x102)][_0x349898(0xfa)](_0x4c59c0,_0x250b4d,{'commentId':_0x122217[_0x349898(0xb2)],'text':JSON['parse'](_0x122217[_0x349898(0xe2)])});break;}case v[_0x349898(0xc4)]:{const _0xb2e67e=(_0x3f32ae=this[_0x349898(0x102)]['getUnit'](_0x122217['unitId'])[_0x349898(0x9c)](_0x2ad74c=>_0x2ad74c[_0x349898(0x10a)]===_0x122217['threadId']))==null?void 0x0:_0x3f32ae['root'];_0xb2e67e&&this[_0x349898(0x102)][_0x349898(0xb3)](_0x4c59c0,_0x250b4d,_0xb2e67e['id'],_0x122217[_0x349898(0x10f)]===I[_0x349898(0xd5)]);break;}}}));}};_=E([S(0x0,c[_0x34955c(0xa8)](b[_0x34955c(0xa0)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x34955c(0xa8)](c[_0x34955c(0xe9)])),S(0x3,c[_0x34955c(0xa8)](c[_0x34955c(0xf8)]))],_);const q=_0x34955c(0xd4),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x4e65aa,_0x2d4a4f,_0x4ed690,_0x457eba)=>{const _0x1a5187=_0x34955c;for(var _0x4d576c=_0x457eba>0x1?void 0x0:_0x457eba?A(_0x2d4a4f,_0x4ed690):_0x2d4a4f,_0x2fafe8=_0x4e65aa[_0x1a5187(0xe4)]-0x1,_0x10644a;_0x2fafe8>=0x0;_0x2fafe8--)(_0x10644a=_0x4e65aa[_0x2fafe8])&&(_0x4d576c=_0x10644a(_0x4d576c)||_0x4d576c);return _0x4d576c;},C=(_0x1e5473,_0x20bede)=>(_0x498c4e,_0x2accd9)=>_0x20bede(_0x498c4e,_0x2accd9,_0x1e5473);function Y(_0x30905c,_0x3ece0a){const _0x1ab475=_0x34955c,_0x599cb4=_0x30905c['replies'][0x0];return{..._0x3ece0a,'id':_0x599cb4[_0x1ab475(0xb2)],'resolved':_0x30905c['solved']===0x1,'dT':f(_0x599cb4[_0x1ab475(0xe5)]),'personId':_0x599cb4[_0x1ab475(0xe6)],'threadId':_0x599cb4[_0x1ab475(0x10a)]};}function G(_0x233fc5,_0x123d09,_0x20e959){const _0x58df46=_0x34955c;var _0x6136fd,_0x5f5507;if(((_0x5f5507=(_0x6136fd=_0x233fc5==null?void 0x0:_0x233fc5['replies'])==null?void 0x0:_0x6136fd[_0x58df46(0xe4)])!=null?_0x5f5507:0x0)>0x0){const _0x231536=(_0x42f253,_0x58ebfc)=>({'id':_0x42f253['replyId'],'threadId':_0x42f253[_0x58df46(0x10a)],'dT':f(_0x42f253['createTimestamp']),'personId':_0x42f253[_0x58df46(0xe6)],'resolved':_0x233fc5[_0x58df46(0x10f)]===I[_0x58df46(0xd5)],'unitId':_0x123d09,'subUnitId':_0x20e959,'text':JSON[_0x58df46(0x107)](_0x42f253[_0x58df46(0xe2)]),'parentId':_0x58ebfc}),_0x54c080=_0x231536(_0x233fc5[_0x58df46(0xf1)][0x0]);return{..._0x54c080,'children':_0x233fc5[_0x58df46(0xf1)][_0x58df46(0xdc)](0x1)[_0x58df46(0xb6)](_0x1631e1=>_0x231536(_0x1631e1,_0x54c080['id']))};}return null;}let p=class{constructor(_0x19f52b,_0x174884,_0x4d8e89){const _0x2a6820=_0x34955c;this[_0x2a6820(0xec)]=_0x19f52b,this['_userService']=_0x174884,this[_0x2a6820(0xf5)]=_0x4d8e89;}async['addComment'](_0x3bcac6){const _0x36fa67=_0x34955c;var _0x37a8b8,_0x4e48aa;const {parentId:_0x11b28c,unitId:_0x456710,text:_0x29ae6a,threadId:_0xc49340}=_0x3bcac6,_0x2d597e=(_0x4e48aa=(_0x37a8b8=_0x29ae6a[_0x36fa67(0xbd)])==null?void 0x0:_0x37a8b8[_0x36fa67(0xed)](_0x47ebb1=>_0x47ebb1[_0x36fa67(0xa2)]===c[_0x36fa67(0xb4)][_0x36fa67(0xf6)])[_0x36fa67(0xb6)](_0x209b52=>_0x209b52[_0x36fa67(0xfb)]))!=null?_0x4e48aa:[],_0x327125=JSON[_0x36fa67(0x110)](_0x29ae6a),_0x2cedb3=(await this['_sessionService'][_0x36fa67(0xfe)](_0x456710))[_0x36fa67(0xb1)]();if(_0x11b28c){const _0x49fc04={'memberId':_0x2cedb3,'unitId':_0x456710,'content':_0x327125,'mention':_0x2d597e,'threadId':_0xc49340},_0x468717=(await this[_0x36fa67(0xec)][_0x36fa67(0xff)](_0x36fa67(0xef)+_0x456710+_0x36fa67(0xa4),{'body':_0x49fc04}))[_0x36fa67(0xbc)][_0x36fa67(0x9b)];return{..._0x3bcac6,'id':_0x468717[_0x36fa67(0xb2)],'dT':c[_0x36fa67(0xdd)](+_0x468717['createTimestamp'])[_0x36fa67(0xc0)](_0x36fa67(0x106)),'personId':_0x468717['userId']};}else{const _0x3d3c84={'memberId':_0x2cedb3,'unitId':_0x456710,'content':_0x327125,'mention':_0x2d597e},_0x37c864=await this[_0x36fa67(0xec)]['post'](_0x36fa67(0xef)+_0x456710+_0x36fa67(0x9e),{'body':_0x3d3c84});return Y(_0x37c864[_0x36fa67(0xbc)][_0x36fa67(0x104)],_0x3bcac6);}}async[_0x34955c(0xfa)](_0x444b2c){const _0x4ccd0c=_0x34955c;var _0x44e63a,_0xe14e3e;const {text:_0x3d330c,unitId:_0x3b7204}=_0x444b2c,_0x4c424a=(_0xe14e3e=(_0x44e63a=_0x3d330c['customRanges'])==null?void 0x0:_0x44e63a[_0x4ccd0c(0xed)](_0x3c387f=>_0x3c387f[_0x4ccd0c(0xa2)]===c['CustomRangeType']['COMMENT'])[_0x4ccd0c(0xb6)](_0x1e419c=>_0x1e419c[_0x4ccd0c(0xfb)]))!=null?_0xe14e3e:[],_0x529028=JSON[_0x4ccd0c(0x110)](_0x3d330c),_0x2343b3=_0x444b2c['threadId'],_0x14f672=_0x444b2c['id'],_0x34b514={'memberId':(await this[_0x4ccd0c(0xf5)]['requireSession'](_0x3b7204))['getMemberID'](),'unitId':_0x3b7204,'threadId':_0x2343b3,'mention':_0x4c424a,'content':_0x529028,'replyId':_0x14f672},_0xeefd80=await this[_0x4ccd0c(0xec)][_0x4ccd0c(0xff)]('/universer-api/comment/unit/'+_0x3b7204+_0x4ccd0c(0xf0),{'body':_0x34b514});return!_0xeefd80['body'][_0x4ccd0c(0xcc)]||_0xeefd80[_0x4ccd0c(0xbc)][_0x4ccd0c(0xcc)][_0x4ccd0c(0xd6)]===0x1;}async['resolveComment'](_0x3c1b20){const _0x5ef8d8=_0x34955c,{unitId:_0x39b889}=_0x3c1b20,_0x3ad79b=_0x3c1b20['threadId'],_0x3cb8e9={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x39b889,'threadId':_0x3ad79b,'solved':_0x3c1b20[_0x5ef8d8(0xbf)]?I[_0x5ef8d8(0xd5)]:I[_0x5ef8d8(0xe3)]},_0x5d6c72=await this['_httpService'][_0x5ef8d8(0xff)](_0x5ef8d8(0xef)+_0x39b889+'/solved',{'body':_0x3cb8e9});return!_0x5d6c72['body'][_0x5ef8d8(0xcc)]||_0x5d6c72[_0x5ef8d8(0xbc)][_0x5ef8d8(0xcc)]['code']===0x1;}async[_0x34955c(0xab)](_0xea968c,_0xacac14,_0x5bac48,_0x632bce){const _0x30987c=_0x34955c,_0x5a6dd4={'memberId':(await this['_sessionService'][_0x30987c(0xfe)](_0xea968c))['getMemberID'](),'threadId':_0x5bac48,'replyId':_0x632bce,'unitId':_0xea968c},_0x3bfa13=await this[_0x30987c(0xec)][_0x30987c(0xff)](_0x30987c(0xef)+_0xea968c+_0x30987c(0xde),{'body':_0x5a6dd4});return!_0x3bfa13[_0x30987c(0xbc)][_0x30987c(0xcc)]||_0x3bfa13[_0x30987c(0xbc)][_0x30987c(0xcc)][_0x30987c(0xd6)]===0x1;}async[_0x34955c(0x105)](_0x12a35b,_0x4e3f2c,_0x104850){const _0x26d406=_0x34955c,_0x4af286={'unitId':_0x12a35b,'threadId':_0x104850},_0x484d6b=await this['_httpService'][_0x26d406(0xff)](_0x26d406(0xef)+_0x12a35b+'/list',{'body':_0x4af286}),_0x2ecc4c=_0x104850[_0x26d406(0xb6)](_0x41cbbd=>G(_0x484d6b[_0x26d406(0xbc)][_0x26d406(0x100)][_0x41cbbd],_0x12a35b,_0x4e3f2c))[_0x26d406(0xed)](Boolean);return Object[_0x26d406(0x9f)](_0x484d6b[_0x26d406(0xbc)][_0x26d406(0xc7)])[_0x26d406(0x109)](_0x159134=>{const _0x139c79=_0x26d406;this[_0x139c79(0xc9)][_0x139c79(0xeb)](_0x159134);}),_0x2ecc4c;}['saveCommentToSnapshot'](_0x299db2){const _0x5d1b1d=_0x34955c;return{'id':_0x299db2['id'],'threadId':_0x299db2[_0x5d1b1d(0x10a)],'ref':_0x299db2[_0x5d1b1d(0xb0)]};}};p=x([C(0x0,c[_0x34955c(0xa8)](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x34955c(0xa8)](b[_0x34955c(0xaf)]))],p);var H=Object[_0x34955c(0xa6)],J=(_0x3771b9,_0xf2e13e,_0x1844ca,_0x36c7c6)=>{const _0x1ef16c=_0x34955c;for(var _0x3771a0=_0x36c7c6>0x1?void 0x0:_0x36c7c6?H(_0xf2e13e,_0x1844ca):_0xf2e13e,_0x529443=_0x3771b9[_0x1ef16c(0xe4)]-0x1,_0x1f81ca;_0x529443>=0x0;_0x529443--)(_0x1f81ca=_0x3771b9[_0x529443])&&(_0x3771a0=_0x1f81ca(_0x3771a0)||_0x3771a0);return _0x3771a0;},y=(_0x5fbd76,_0x12bc9c)=>(_0x3e0c28,_0xbe02bc)=>_0x12bc9c(_0x3e0c28,_0xbe02bc,_0x5fbd76);let g=class extends c[_0x34955c(0x108)]{constructor(_0x484f28,_0x393e99){const _0x278b39=_0x34955c;super(),this[_0x278b39(0xdb)]=_0x484f28,this[_0x278b39(0x111)]=_0x393e99,this[_0x278b39(0xd9)]();}[_0x34955c(0xd9)](){const _0x28fa5b=_0x34955c;this['_threadCommentDataSourceService'][_0x28fa5b(0xee)]=this[_0x28fa5b(0x111)],this[_0x28fa5b(0xdb)][_0x28fa5b(0xa5)]=!0x1;}};g=J([y(0x0,M[_0x34955c(0xf9)]),y(0x1,c[_0x34955c(0xa8)](p))],g);function _0x59b8(_0x14d67d,_0x443846){const _0x4a8adc=_0x4a8a();return _0x59b8=function(_0x59b89a,_0x38f162){_0x59b89a=_0x59b89a-0x99;let _0x3950c3=_0x4a8adc[_0x59b89a];return _0x3950c3;},_0x59b8(_0x14d67d,_0x443846);}var F=Object[_0x34955c(0xfc)],L=Object[_0x34955c(0xa6)],Z=(_0x5e2480,_0x5d35e2,_0x400703)=>_0x5d35e2 in _0x5e2480?F(_0x5e2480,_0x5d35e2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x400703}):_0x5e2480[_0x5d35e2]=_0x400703,W=(_0x2c713b,_0x17643e,_0x357325,_0x11c724)=>{const _0x3f57f5=_0x34955c;for(var _0x17cd15=_0x11c724>0x1?void 0x0:_0x11c724?L(_0x17643e,_0x357325):_0x17643e,_0x14a68f=_0x2c713b[_0x3f57f5(0xe4)]-0x1,_0x28e038;_0x14a68f>=0x0;_0x14a68f--)(_0x28e038=_0x2c713b[_0x14a68f])&&(_0x17cd15=_0x28e038(_0x17cd15)||_0x17cd15);return _0x17cd15;},O=(_0x3acd0f,_0x7d9f44)=>(_0x52e922,_0x34332a)=>_0x7d9f44(_0x52e922,_0x34332a,_0x3acd0f),N=(_0x3e9b4c,_0x1d0bbb,_0x29bc16)=>Z(_0x3e9b4c,typeof _0x1d0bbb!='symbol'?_0x1d0bbb+'':_0x1d0bbb,_0x29bc16);exports[_0x34955c(0xba)]=class extends c[_0x34955c(0xc1)]{constructor(_0x545a86=D,_0x5ca42f,_0x48e880){const _0x41b017=_0x34955c;super(),this[_0x41b017(0xf2)]=_0x545a86,this['_injector']=_0x5ca42f,this['_configService']=_0x48e880;const {..._0x185e97}=c['merge']({},D,this[_0x41b017(0xf2)]);this[_0x41b017(0xf3)][_0x41b017(0xcb)](q,_0x185e97);}[_0x34955c(0xea)](){const _0x54917d=_0x34955c;[[p],[g],[_]][_0x54917d(0x109)](_0x3184b8=>{const _0x398803=_0x54917d;this['_injector'][_0x398803(0xac)](_0x3184b8);});}['onReady'](){const _0x31981e=_0x34955c;this[_0x31981e(0xd1)][_0x31981e(0xbe)](g),this[_0x31981e(0xd1)][_0x31981e(0xbe)](_);}},N(exports[_0x34955c(0xba)],_0x34955c(0x10e),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x34955c(0x10b),c['UniverInstanceType'][_0x34955c(0xe0)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x34955c(0xca)](w[_0x34955c(0xb8)],b[_0x34955c(0xb5)],T[_0x34955c(0xa1)]),O(0x1,c[_0x34955c(0xa8)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x13b1c4=_0x4c5b;(function(_0x15453e,_0x57a117){const _0x154245=_0x4c5b,_0x40c01=_0x15453e();while(!![]){try{const _0x2e98c7=-parseInt(_0x154245(0x1fc))/0x1+parseInt(_0x154245(0x1f5))/0x2+parseInt(_0x154245(0x200))/0x3+-parseInt(_0x154245(0x23f))/0x4+-parseInt(_0x154245(0x239))/0x5*(parseInt(_0x154245(0x23c))/0x6)+parseInt(_0x154245(0x247))/0x7+parseInt(_0x154245(0x22c))/0x8*(parseInt(_0x154245(0x244))/0x9);if(_0x2e98c7===_0x57a117)break;else _0x40c01['push'](_0x40c01['shift']());}catch(_0xb34cea){_0x40c01['push'](_0x40c01['shift']());}}}(_0x403c,0x37d18));import{CommentService as _0x177d98,CollaborationSessionService as _0x4e7bc5,UniverCollaborationClientPlugin as _0x27831f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12c2ab}from'@univerjs-pro/license';import{dayjs as _0x37ac27,UserManagerService as _0x2ebe7d,Inject as _0x19f878,Injector as _0x435899,Disposable as _0x45ea9c,CustomRangeType as _0x49edb8,UniverInstanceType as _0x2e5014,DependentOn as _0x40f5fa,IConfigService as _0x504d68,Plugin as _0x2e99e6,merge as _0x2eef28}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5f0524}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37169b,IThreadCommentDataSourceService as _0x5e2138}from'@univerjs/thread-comment';import{bufferTime as _0x19fa0c}from'rxjs';import{HTTPService as _0x5861be}from'@univerjs/network';const W=_0x13b1c4(0x248);var I=(_0xdc1add=>(_0xdc1add[_0xdc1add[_0x13b1c4(0x21b)]=0x0]='OpenOrReOpen',_0xdc1add[_0xdc1add[_0x13b1c4(0x249)]=0x1]=_0x13b1c4(0x249),_0xdc1add[_0xdc1add[_0x13b1c4(0x22b)]=-0x1]=_0x13b1c4(0x22b),_0xdc1add))(I||{}),v=(_0x3dd569=>(_0x3dd569[_0x3dd569['Unknown']=0x0]='Unknown',_0x3dd569[_0x3dd569['Add']=0x1]='Add',_0x3dd569[_0x3dd569[_0x13b1c4(0x207)]=0x2]=_0x13b1c4(0x207),_0x3dd569[_0x3dd569[_0x13b1c4(0x209)]=0x3]=_0x13b1c4(0x209),_0x3dd569[_0x3dd569[_0x13b1c4(0x1e8)]=0x4]=_0x13b1c4(0x1e8),_0x3dd569[_0x3dd569[_0x13b1c4(0x228)]=0x5]='Solve',_0x3dd569[_0x3dd569[_0x13b1c4(0x22b)]=-0x1]=_0x13b1c4(0x22b),_0x3dd569))(v||{});const y=_0x568ffe=>_0x37ac27(new Date(+_0x568ffe))[_0x13b1c4(0x219)](_0x13b1c4(0x232)),B=async(_0x50dc4c,_0x2b39b1)=>{const _0x5eeff8=_0x13b1c4,_0x2101a8=_0x50dc4c[_0x5eeff8(0x1ed)](_0x2ebe7d),_0x210653=_0x50dc4c[_0x5eeff8(0x1ed)](_0x5861be);_0x2b39b1['forEach'](_0x3348e9=>{const _0x4688c3=_0x5eeff8;_0x2101a8['getUser'](_0x3348e9)&&_0x2b39b1[_0x4688c3(0x213)](_0x3348e9);}),_0x2b39b1[_0x5eeff8(0x237)]&&(await _0x210653[_0x5eeff8(0x1ed)](_0x5eeff8(0x23e),{'params':{'userIDs':[..._0x2b39b1]}}))[_0x5eeff8(0x215)]['users'][_0x5eeff8(0x22d)](_0x55c31b=>{const _0x44dc44=_0x5eeff8;_0x55c31b&&_0x2101a8[_0x44dc44(0x240)](_0x55c31b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x469912,_0xd312d6,_0xea50d8,_0x70365b)=>{const _0x22dc10=_0x13b1c4;for(var _0x55cb1a=_0x70365b>0x1?void 0x0:_0x70365b?K(_0xd312d6,_0xea50d8):_0xd312d6,_0x585b5f=_0x469912[_0x22dc10(0x24b)]-0x1,_0x4828a0;_0x585b5f>=0x0;_0x585b5f--)(_0x4828a0=_0x469912[_0x585b5f])&&(_0x55cb1a=_0x4828a0(_0x55cb1a)||_0x55cb1a);return _0x55cb1a;},p=(_0x89cc4,_0x397ac0)=>(_0x18d495,_0x38afa7)=>_0x397ac0(_0x18d495,_0x38afa7,_0x89cc4);let _=class extends _0x45ea9c{constructor(_0x1b1332,_0x4fef3b,_0x38cac8,_0xa745b8){const _0x17df19=_0x13b1c4;super(),this['_commentService']=_0x1b1332,this[_0x17df19(0x225)]=_0x4fef3b,this[_0x17df19(0x21e)]=_0x38cac8,this[_0x17df19(0x236)]=_0xa745b8,this[_0x17df19(0x24a)](),this[_0x17df19(0x218)]();}[_0x13b1c4(0x218)](){const _0x2ce7f6=_0x13b1c4;this[_0x2ce7f6(0x1f6)](this[_0x2ce7f6(0x225)][_0x2ce7f6(0x210)][_0x2ce7f6(0x246)](_0x19fa0c(0x10))['subscribe'](_0x5828d4=>{const _0x2eeabb=_0x2ce7f6,_0x18e36d=new Set();_0x5828d4[_0x2eeabb(0x22d)](_0x3f52c9=>{const _0x119e95=_0x2eeabb;switch(_0x3f52c9[_0x119e95(0x202)]){case'add':{const _0x3aa493=_0x3f52c9[_0x119e95(0x230)][_0x119e95(0x1f2)];_0x18e36d[_0x119e95(0x1f7)](_0x3aa493);break;}}}),B(this['_injector'],_0x18e36d);}));}[_0x13b1c4(0x24a)](){const _0x600f23=_0x13b1c4;this['disposeWithMe'](this[_0x600f23(0x21a)][_0x600f23(0x210)][_0x600f23(0x1ea)](async _0x76e737=>{const _0x4bd855=_0x600f23;var _0x1fd58a,_0x195495,_0x4474e5,_0x1232fb;const _0x33ff64=(_0x1fd58a=this['_threadCommentModel'][_0x4bd855(0x217)](_0x76e737[_0x4bd855(0x227)])['find'](_0x37af69=>_0x37af69['threadId']===_0x76e737[_0x4bd855(0x20b)]))==null?void 0x0:_0x1fd58a[_0x4bd855(0x23a)];if(!_0x33ff64)return;const {unitId:_0x3829ff,subUnitId:_0x310ab3}=_0x33ff64;switch(_0x76e737[_0x4bd855(0x21c)]&&this[_0x4bd855(0x21e)][_0x4bd855(0x240)](_0x76e737[_0x4bd855(0x21c)]),_0x76e737[_0x4bd855(0x202)]){case v[_0x4bd855(0x241)]:break;case v['Reply']:{this['_threadCommentModel'][_0x4bd855(0x216)](_0x3829ff,_0x310ab3,{'unitId':_0x3829ff,'subUnitId':_0x310ab3,'ref':'','id':_0x76e737[_0x4bd855(0x1fd)],'dT':y(+_0x76e737['createTimestamp']),'threadId':_0x76e737[_0x4bd855(0x20b)],'personId':(_0x4474e5=(_0x195495=_0x76e737[_0x4bd855(0x21c)])==null?void 0x0:_0x195495[_0x4bd855(0x1fb)])!=null?_0x4474e5:_0x76e737[_0x4bd855(0x206)],'text':JSON[_0x4bd855(0x243)](_0x76e737[_0x4bd855(0x214)]),'parentId':_0x33ff64['id']});break;}case v[_0x4bd855(0x1e8)]:{const _0x5d4ba2=this[_0x4bd855(0x225)][_0x4bd855(0x205)](_0x3829ff,_0x310ab3,_0x76e737[_0x4bd855(0x1fd)]);_0x5d4ba2&&_0x5d4ba2[_0x4bd855(0x203)]&&this[_0x4bd855(0x225)][_0x4bd855(0x23b)](_0x3829ff,_0x310ab3,_0x76e737[_0x4bd855(0x1fd)]);break;}case v[_0x4bd855(0x209)]:{this[_0x4bd855(0x225)][_0x4bd855(0x1fe)](_0x3829ff,_0x310ab3,{'commentId':_0x76e737['replyId'],'text':JSON[_0x4bd855(0x243)](_0x76e737['content'])});break;}case v[_0x4bd855(0x228)]:{const _0xe5c05c=(_0x1232fb=this[_0x4bd855(0x225)][_0x4bd855(0x217)](_0x76e737[_0x4bd855(0x227)])[_0x4bd855(0x20d)](_0x137d2d=>_0x137d2d[_0x4bd855(0x20b)]===_0x76e737[_0x4bd855(0x20b)]))==null?void 0x0:_0x1232fb[_0x4bd855(0x23a)];_0xe5c05c&&this[_0x4bd855(0x225)][_0x4bd855(0x221)](_0x3829ff,_0x310ab3,_0xe5c05c['id'],_0x76e737['solved']===I[_0x4bd855(0x249)]);break;}}}));}};_=V([p(0x0,_0x19f878(_0x177d98)),p(0x1,_0x19f878(_0x37169b)),p(0x2,_0x19f878(_0x2ebe7d)),p(0x3,_0x19f878(_0x435899))],_);const z='thread-comment-data-source.config',O={};function _0x403c(){const _0x1d5972=['/edit','commentUpdate$','stringify','_sessionService','delete','content','body','addComment','getUnit','_initUserSync','format','_commentService','OpenOrReOpen','user','/universer-api/comment/unit/','_userService','reply','pluginName','resolveComment','createTimestamp','post','customRanges','_threadCommentModel','syncUpdateMutationToColla','unitId','Solve','replies','_config','UNRECOGNIZED','8FvdJXi','forEach','rangeId','onStarting','payload','defineProperty','YYYY/MM/DD\x20HH:mm','users','dataSource','rangeType','_injector','size','filter','10ijwAmK','root','deleteComment','1361382oJnfbX','listComments','/universer-api/user/list','729156ObyltE','addUser','Add','resolved','parse','3508497OTBhbX','getCurrentUser','pipe','2048032cQvmlA','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solved','_init','length','requireSession','values','symbol','Delete','code','subscribe','slice','solved','get','_httpService','_threadCommentDataSourceService','_configService','error','personId','setConfig','COMMENT','156880yrZLAS','disposeWithMe','add','/list','/reply','_threadCommentDataSource','userID','12383VNwedx','replyId','updateComment','comments','348747uPNOQG','getMemberID','type','parentId','getOwnPropertyDescriptor','getComment','userId','Reply','map','Edit','UNIVER_UNKNOWN','threadId','saveCommentToSnapshot','find','ref'];_0x403c=function(){return _0x1d5972;};return _0x403c();}var k=Object[_0x13b1c4(0x204)],Q=(_0xb6743c,_0x2e5749,_0x3dbc3f,_0x757bfc)=>{const _0x2bf9c9=_0x13b1c4;for(var _0x594616=_0x757bfc>0x1?void 0x0:_0x757bfc?k(_0x2e5749,_0x3dbc3f):_0x2e5749,_0x4671f4=_0xb6743c[_0x2bf9c9(0x24b)]-0x1,_0x15883c;_0x4671f4>=0x0;_0x4671f4--)(_0x15883c=_0xb6743c[_0x4671f4])&&(_0x594616=_0x15883c(_0x594616)||_0x594616);return _0x594616;},b=(_0x23b5b8,_0x9cca03)=>(_0xcd61bf,_0x44127c)=>_0x9cca03(_0xcd61bf,_0x44127c,_0x23b5b8);function X(_0x166e21,_0x4422a4){const _0xe6247b=_0x13b1c4,_0x497e2c=_0x166e21[_0xe6247b(0x229)][0x0];return{..._0x4422a4,'id':_0x497e2c[_0xe6247b(0x1fd)],'resolved':_0x166e21[_0xe6247b(0x1ec)]===0x1,'dT':y(_0x497e2c['createTimestamp']),'personId':_0x497e2c[_0xe6247b(0x206)],'threadId':_0x497e2c[_0xe6247b(0x20b)]};}function _0x4c5b(_0x58606b,_0x1ee148){const _0x403c75=_0x403c();return _0x4c5b=function(_0x4c5b27,_0x4f7cda){_0x4c5b27=_0x4c5b27-0x1e7;let _0x224976=_0x403c75[_0x4c5b27];return _0x224976;},_0x4c5b(_0x58606b,_0x1ee148);}function ee(_0x47683f,_0x90a40,_0x39dbb9){const _0x223de4=_0x13b1c4;var _0x410bb2,_0x1e6833;if(((_0x1e6833=(_0x410bb2=_0x47683f==null?void 0x0:_0x47683f[_0x223de4(0x229)])==null?void 0x0:_0x410bb2[_0x223de4(0x24b)])!=null?_0x1e6833:0x0)>0x0){const _0x4f86cf=(_0x20e80,_0xc04892)=>({'id':_0x20e80['replyId'],'threadId':_0x20e80[_0x223de4(0x20b)],'dT':y(_0x20e80[_0x223de4(0x222)]),'personId':_0x20e80[_0x223de4(0x206)],'resolved':_0x47683f['solved']===I[_0x223de4(0x249)],'unitId':_0x90a40,'subUnitId':_0x39dbb9,'text':JSON['parse'](_0x20e80[_0x223de4(0x214)]),'parentId':_0xc04892}),_0x39c278=_0x4f86cf(_0x47683f[_0x223de4(0x229)][0x0]);return{..._0x39c278,'children':_0x47683f[_0x223de4(0x229)][_0x223de4(0x1eb)](0x1)[_0x223de4(0x208)](_0x5c0e3c=>_0x4f86cf(_0x5c0e3c,_0x39c278['id']))};}return null;}let S=class{constructor(_0x50e8f3,_0x28a0e1,_0x550722){const _0xedb117=_0x13b1c4;this['_httpService']=_0x50e8f3,this['_userService']=_0x28a0e1,this[_0xedb117(0x212)]=_0x550722;}async[_0x13b1c4(0x216)](_0x1d48ef){const _0x31ddbf=_0x13b1c4;var _0x3cb18f,_0x4e2a87;const {parentId:_0x45fc13,unitId:_0x3bb7e1,text:_0x34092e,threadId:_0x545f8c}=_0x1d48ef,_0x413eed=(_0x4e2a87=(_0x3cb18f=_0x34092e[_0x31ddbf(0x224)])==null?void 0x0:_0x3cb18f['filter'](_0x3f22e8=>_0x3f22e8[_0x31ddbf(0x235)]===_0x49edb8[_0x31ddbf(0x1f4)])[_0x31ddbf(0x208)](_0x1a1f7b=>_0x1a1f7b[_0x31ddbf(0x22e)]))!=null?_0x4e2a87:[],_0xf08fd9=JSON[_0x31ddbf(0x211)](_0x34092e),_0x20a325=(await this[_0x31ddbf(0x212)]['requireSession'](_0x3bb7e1))[_0x31ddbf(0x201)]();if(_0x45fc13){const _0x5a24b9={'memberId':_0x20a325,'unitId':_0x3bb7e1,'content':_0xf08fd9,'mention':_0x413eed,'threadId':_0x545f8c},_0x46f0dc=(await this[_0x31ddbf(0x1ee)][_0x31ddbf(0x223)]('/universer-api/comment/unit/'+_0x3bb7e1+_0x31ddbf(0x1f9),{'body':_0x5a24b9}))[_0x31ddbf(0x215)][_0x31ddbf(0x21f)];return{..._0x1d48ef,'id':_0x46f0dc[_0x31ddbf(0x1fd)],'dT':_0x37ac27(+_0x46f0dc[_0x31ddbf(0x222)])['format'](_0x31ddbf(0x232)),'personId':_0x46f0dc[_0x31ddbf(0x206)]};}else{const _0x57d2a2={'memberId':_0x20a325,'unitId':_0x3bb7e1,'content':_0xf08fd9,'mention':_0x413eed},_0x53ee36=await this[_0x31ddbf(0x1ee)][_0x31ddbf(0x223)](_0x31ddbf(0x21d)+_0x3bb7e1+'/add',{'body':_0x57d2a2});return X(_0x53ee36[_0x31ddbf(0x215)]['comment'],_0x1d48ef);}}async[_0x13b1c4(0x1fe)](_0x264bc2){const _0x5c92c1=_0x13b1c4;var _0xee675c,_0x2f04f9;const {text:_0x322c30,unitId:_0x3734ab}=_0x264bc2,_0xfbf8a=(_0x2f04f9=(_0xee675c=_0x322c30[_0x5c92c1(0x224)])==null?void 0x0:_0xee675c[_0x5c92c1(0x238)](_0x414204=>_0x414204['rangeType']===_0x49edb8[_0x5c92c1(0x1f4)])['map'](_0x4e7b83=>_0x4e7b83[_0x5c92c1(0x22e)]))!=null?_0x2f04f9:[],_0xb41788=JSON['stringify'](_0x322c30),_0x50cacd=_0x264bc2['threadId'],_0x5ec791=_0x264bc2['id'],_0x53f9b2={'memberId':(await this[_0x5c92c1(0x212)][_0x5c92c1(0x24c)](_0x3734ab))['getMemberID'](),'unitId':_0x3734ab,'threadId':_0x50cacd,'mention':_0xfbf8a,'content':_0xb41788,'replyId':_0x5ec791},_0xa41e60=await this[_0x5c92c1(0x1ee)][_0x5c92c1(0x223)](_0x5c92c1(0x21d)+_0x3734ab+_0x5c92c1(0x20f),{'body':_0x53f9b2});return!_0xa41e60[_0x5c92c1(0x215)][_0x5c92c1(0x1f1)]||_0xa41e60[_0x5c92c1(0x215)][_0x5c92c1(0x1f1)]['code']===0x1;}async[_0x13b1c4(0x221)](_0x2f3459){const _0x5983ca=_0x13b1c4,{unitId:_0xbd2aa8}=_0x2f3459,_0x3a607c=_0x2f3459[_0x5983ca(0x20b)],_0xed1799={'memberId':this[_0x5983ca(0x21e)][_0x5983ca(0x245)]()[_0x5983ca(0x1fb)],'unitId':_0xbd2aa8,'threadId':_0x3a607c,'solved':_0x2f3459[_0x5983ca(0x242)]?I['Solved']:I[_0x5983ca(0x21b)]},_0x206980=await this[_0x5983ca(0x1ee)]['post'](_0x5983ca(0x21d)+_0xbd2aa8+'/solved',{'body':_0xed1799});return!_0x206980[_0x5983ca(0x215)][_0x5983ca(0x1f1)]||_0x206980['body'][_0x5983ca(0x1f1)][_0x5983ca(0x1e9)]===0x1;}async[_0x13b1c4(0x23b)](_0xc14e24,_0x23c765,_0x1eef3c,_0x4fb2bd){const _0x55e599=_0x13b1c4,_0x1bdb7f={'memberId':(await this['_sessionService'][_0x55e599(0x24c)](_0xc14e24))['getMemberID'](),'threadId':_0x1eef3c,'replyId':_0x4fb2bd,'unitId':_0xc14e24},_0x3de552=await this[_0x55e599(0x1ee)][_0x55e599(0x223)](_0x55e599(0x21d)+_0xc14e24+'/delete',{'body':_0x1bdb7f});return!_0x3de552[_0x55e599(0x215)][_0x55e599(0x1f1)]||_0x3de552[_0x55e599(0x215)][_0x55e599(0x1f1)]['code']===0x1;}async[_0x13b1c4(0x23d)](_0x5330dd,_0x2aed56,_0x545bb6){const _0x4240f3=_0x13b1c4,_0x1d4dd4={'unitId':_0x5330dd,'threadId':_0x545bb6},_0x1fb096=await this[_0x4240f3(0x1ee)][_0x4240f3(0x223)]('/universer-api/comment/unit/'+_0x5330dd+_0x4240f3(0x1f8),{'body':_0x1d4dd4}),_0x20be0f=_0x545bb6[_0x4240f3(0x208)](_0x128524=>ee(_0x1fb096[_0x4240f3(0x215)][_0x4240f3(0x1ff)][_0x128524],_0x5330dd,_0x2aed56))['filter'](Boolean);return Object[_0x4240f3(0x24d)](_0x1fb096['body'][_0x4240f3(0x233)])[_0x4240f3(0x22d)](_0x397694=>{const _0xf55748=_0x4240f3;this[_0xf55748(0x21e)][_0xf55748(0x240)](_0x397694);}),_0x20be0f;}[_0x13b1c4(0x20c)](_0x2dd98f){const _0x4ea0df=_0x13b1c4;return{'id':_0x2dd98f['id'],'threadId':_0x2dd98f[_0x4ea0df(0x20b)],'ref':_0x2dd98f[_0x4ea0df(0x20e)]};}};S=Q([b(0x0,_0x19f878(_0x5861be)),b(0x1,_0x19f878(_0x2ebe7d)),b(0x2,_0x19f878(_0x4e7bc5))],S);var re=Object[_0x13b1c4(0x204)],te=(_0x58feff,_0x516a18,_0x58f959,_0x452d92)=>{for(var _0x190556=_0x452d92>0x1?void 0x0:_0x452d92?re(_0x516a18,_0x58f959):_0x516a18,_0x1ea9d6=_0x58feff['length']-0x1,_0x3b0889;_0x1ea9d6>=0x0;_0x1ea9d6--)(_0x3b0889=_0x58feff[_0x1ea9d6])&&(_0x190556=_0x3b0889(_0x190556)||_0x190556);return _0x190556;},M=(_0x181f41,_0x4771f7)=>(_0x4d4fb3,_0x10919d)=>_0x4771f7(_0x4d4fb3,_0x10919d,_0x181f41);let f=class extends _0x45ea9c{constructor(_0x10a0d0,_0x223986){const _0x5f1a19=_0x13b1c4;super(),this[_0x5f1a19(0x1ef)]=_0x10a0d0,this[_0x5f1a19(0x1fa)]=_0x223986,this['_initDataSource']();}['_initDataSource'](){const _0x4662f9=_0x13b1c4;this[_0x4662f9(0x1ef)][_0x4662f9(0x234)]=this[_0x4662f9(0x1fa)],this[_0x4662f9(0x1ef)][_0x4662f9(0x226)]=!0x1;}};f=te([M(0x0,_0x5e2138),M(0x1,_0x19f878(S))],f);var se=Object[_0x13b1c4(0x231)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x42913c,_0x2e1baa,_0x464825)=>_0x2e1baa in _0x42913c?se(_0x42913c,_0x2e1baa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x464825}):_0x42913c[_0x2e1baa]=_0x464825,ie=(_0x222405,_0x2e5d64,_0x45de97,_0x59d810)=>{for(var _0x4796df=_0x59d810>0x1?void 0x0:_0x59d810?oe(_0x2e5d64,_0x45de97):_0x2e5d64,_0x5988e2=_0x222405['length']-0x1,_0x3b217a;_0x5988e2>=0x0;_0x5988e2--)(_0x3b217a=_0x222405[_0x5988e2])&&(_0x4796df=_0x3b217a(_0x4796df)||_0x4796df);return _0x4796df;},N=(_0x38700a,_0x50ae3a)=>(_0x3767f1,_0x17c094)=>_0x50ae3a(_0x3767f1,_0x17c094,_0x38700a),$=(_0x15dd35,_0x5ca3f4,_0x1ed25e)=>ne(_0x15dd35,typeof _0x5ca3f4!=_0x13b1c4(0x1e7)?_0x5ca3f4+'':_0x5ca3f4,_0x1ed25e);let g=class extends _0x2e99e6{constructor(_0x5d356c=O,_0x7d6838,_0x22203f){const _0x7cce41=_0x13b1c4;super(),this[_0x7cce41(0x22a)]=_0x5d356c,this[_0x7cce41(0x236)]=_0x7d6838,this[_0x7cce41(0x1f0)]=_0x22203f;const {..._0x5db49f}=_0x2eef28({},O,this['_config']);this[_0x7cce41(0x1f0)][_0x7cce41(0x1f3)](z,_0x5db49f);}[_0x13b1c4(0x22f)](){const _0x42c54a=_0x13b1c4;[[S],[f],[_]][_0x42c54a(0x22d)](_0x533908=>{const _0x3dae20=_0x42c54a;this[_0x3dae20(0x236)]['add'](_0x533908);});}['onReady'](){const _0x485d9a=_0x13b1c4;this['_injector'][_0x485d9a(0x1ed)](f),this[_0x485d9a(0x236)]['get'](_);}};$(g,_0x13b1c4(0x220),W),$(g,_0x13b1c4(0x202),_0x2e5014[_0x13b1c4(0x20a)]),g=ie([_0x40f5fa(_0x5f0524,_0x27831f,_0x12c2ab),N(0x1,_0x19f878(_0x435899)),N(0x2,_0x504d68)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x426fd8=_0x35e5;(function(_0x5da0cc,_0x1df22f){const _0x5a3916=_0x35e5,_0x2ac6b0=_0x5da0cc();while(!![]){try{const _0xfe74f0=parseInt(_0x5a3916(0x139))/0x1*(parseInt(_0x5a3916(0x116))/0x2)+-parseInt(_0x5a3916(0x179))/0x3*(-parseInt(_0x5a3916(0x16d))/0x4)+parseInt(_0x5a3916(0x17d))/0x5+-parseInt(_0x5a3916(0x158))/0x6+parseInt(_0x5a3916(0x14b))/0x7*(-parseInt(_0x5a3916(0x16b))/0x8)+parseInt(_0x5a3916(0x174))/0x9*(parseInt(_0x5a3916(0x154))/0xa)+parseInt(_0x5a3916(0x166))/0xb*(-parseInt(_0x5a3916(0x129))/0xc);if(_0xfe74f0===_0x1df22f)break;else _0x2ac6b0['push'](_0x2ac6b0['shift']());}catch(_0xb37a07){_0x2ac6b0['push'](_0x2ac6b0['shift']());}}}(_0x1048,0xdb308));import{CommentService as _0x3a15b6,CollaborationSessionService as _0x44c5cb,UniverCollaborationClientPlugin as _0x39432b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3618e3}from'@univerjs-pro/license';import{dayjs as _0xc6ba85,UserManagerService as _0x44cabc,Inject as _0x4ee146,Injector as _0x52b0e2,Disposable as _0x1cb851,CustomRangeType as _0x23dce0,UniverInstanceType as _0x29b4b7,DependentOn as _0x537f52,IConfigService as _0x4f31e8,Plugin as _0x42e39d,merge as _0x2d8dad}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42ba3c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xb8419e,IThreadCommentDataSourceService as _0x4fbd0e}from'@univerjs/thread-comment';import{bufferTime as _0x4e28a0}from'rxjs';import{HTTPService as _0x28ab9a}from'@univerjs/network';function _0x35e5(_0x48b50c,_0x6d8e72){const _0x1048ad=_0x1048();return _0x35e5=function(_0x35e517,_0x454aa4){_0x35e517=_0x35e517-0x116;let _0x109e93=_0x1048ad[_0x35e517];return _0x109e93;},_0x35e5(_0x48b50c,_0x6d8e72);}const W=_0x426fd8(0x125);var I=(_0x536bf7=>(_0x536bf7[_0x536bf7[_0x426fd8(0x153)]=0x0]=_0x426fd8(0x153),_0x536bf7[_0x536bf7[_0x426fd8(0x171)]=0x1]=_0x426fd8(0x171),_0x536bf7[_0x536bf7[_0x426fd8(0x168)]=-0x1]=_0x426fd8(0x168),_0x536bf7))(I||{}),v=(_0x4efc0e=>(_0x4efc0e[_0x4efc0e[_0x426fd8(0x160)]=0x0]=_0x426fd8(0x160),_0x4efc0e[_0x4efc0e[_0x426fd8(0x123)]=0x1]=_0x426fd8(0x123),_0x4efc0e[_0x4efc0e[_0x426fd8(0x164)]=0x2]='Reply',_0x4efc0e[_0x4efc0e[_0x426fd8(0x162)]=0x3]=_0x426fd8(0x162),_0x4efc0e[_0x4efc0e[_0x426fd8(0x17b)]=0x4]=_0x426fd8(0x17b),_0x4efc0e[_0x4efc0e[_0x426fd8(0x122)]=0x5]=_0x426fd8(0x122),_0x4efc0e[_0x4efc0e['UNRECOGNIZED']=-0x1]=_0x426fd8(0x168),_0x4efc0e))(v||{});const y=_0x1c4649=>_0xc6ba85(new Date(+_0x1c4649))[_0x426fd8(0x15c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3b0632,_0x5593e6)=>{const _0x2a22f4=_0x426fd8,_0x355534=_0x3b0632[_0x2a22f4(0x140)](_0x44cabc),_0x1f3894=_0x3b0632['get'](_0x28ab9a);_0x5593e6[_0x2a22f4(0x15a)](_0x2916f3=>{const _0x378335=_0x2a22f4;_0x355534[_0x378335(0x15e)](_0x2916f3)&&_0x5593e6[_0x378335(0x134)](_0x2916f3);}),_0x5593e6['size']&&(await _0x1f3894[_0x2a22f4(0x140)](_0x2a22f4(0x17c),{'params':{'userIDs':[..._0x5593e6]}}))[_0x2a22f4(0x12f)][_0x2a22f4(0x16a)]['forEach'](_0xd97f25=>{_0xd97f25&&_0x355534['addUser'](_0xd97f25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xe13614,_0xe94754,_0x5599bb,_0x109411)=>{for(var _0x4ad2e3=_0x109411>0x1?void 0x0:_0x109411?K(_0xe94754,_0x5599bb):_0xe94754,_0x439136=_0xe13614['length']-0x1,_0x36f027;_0x439136>=0x0;_0x439136--)(_0x36f027=_0xe13614[_0x439136])&&(_0x4ad2e3=_0x36f027(_0x4ad2e3)||_0x4ad2e3);return _0x4ad2e3;},p=(_0x3f9d2e,_0x554f36)=>(_0x1928b7,_0x186b62)=>_0x554f36(_0x1928b7,_0x186b62,_0x3f9d2e);let _=class extends _0x1cb851{constructor(_0xa2a973,_0x19b392,_0x45daf1,_0x7753c7){const _0x5db985=_0x426fd8;super(),this[_0x5db985(0x152)]=_0xa2a973,this[_0x5db985(0x16c)]=_0x19b392,this[_0x5db985(0x15f)]=_0x45daf1,this[_0x5db985(0x150)]=_0x7753c7,this[_0x5db985(0x149)](),this[_0x5db985(0x12b)]();}['_initUserSync'](){const _0x5d4068=_0x426fd8;this[_0x5d4068(0x151)](this[_0x5d4068(0x16c)][_0x5d4068(0x12e)][_0x5d4068(0x161)](_0x4e28a0(0x10))[_0x5d4068(0x127)](_0x44eeb5=>{const _0x561c0e=_0x5d4068,_0x2b6737=new Set();_0x44eeb5[_0x561c0e(0x15a)](_0xa04051=>{const _0x5d0426=_0x561c0e;switch(_0xa04051[_0x5d0426(0x159)]){case'add':{const _0x1afdf0=_0xa04051[_0x5d0426(0x155)]['personId'];_0x2b6737[_0x5d0426(0x15b)](_0x1afdf0);break;}}}),B(this['_injector'],_0x2b6737);}));}[_0x426fd8(0x149)](){const _0x2fa025=_0x426fd8;this[_0x2fa025(0x151)](this['_commentService']['commentUpdate$'][_0x2fa025(0x127)](async _0xa7df47=>{const _0x1210b6=_0x2fa025;var _0xfcfd8,_0x3f2b15,_0x5e3f48,_0x2174d2;const _0x3d74fe=(_0xfcfd8=this[_0x1210b6(0x16c)][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])['find'](_0x42a028=>_0x42a028[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0xfcfd8[_0x1210b6(0x133)];if(!_0x3d74fe)return;const {unitId:_0x4b6ce1,subUnitId:_0x572fdd}=_0x3d74fe;switch(_0xa7df47[_0x1210b6(0x136)]&&this['_userService']['addUser'](_0xa7df47[_0x1210b6(0x136)]),_0xa7df47[_0x1210b6(0x159)]){case v[_0x1210b6(0x123)]:break;case v['Reply']:{this[_0x1210b6(0x16c)][_0x1210b6(0x11b)](_0x4b6ce1,_0x572fdd,{'unitId':_0x4b6ce1,'subUnitId':_0x572fdd,'ref':'','id':_0xa7df47['replyId'],'dT':y(+_0xa7df47[_0x1210b6(0x14f)]),'threadId':_0xa7df47[_0x1210b6(0x173)],'personId':(_0x5e3f48=(_0x3f2b15=_0xa7df47[_0x1210b6(0x136)])==null?void 0x0:_0x3f2b15[_0x1210b6(0x14c)])!=null?_0x5e3f48:_0xa7df47['userId'],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content']),'parentId':_0x3d74fe['id']});break;}case v[_0x1210b6(0x17b)]:{const _0x432efd=this[_0x1210b6(0x16c)][_0x1210b6(0x128)](_0x4b6ce1,_0x572fdd,_0xa7df47['replyId']);_0x432efd&&_0x432efd[_0x1210b6(0x11e)]&&this['_threadCommentModel']['deleteComment'](_0x4b6ce1,_0x572fdd,_0xa7df47[_0x1210b6(0x148)]);break;}case v[_0x1210b6(0x162)]:{this[_0x1210b6(0x16c)][_0x1210b6(0x117)](_0x4b6ce1,_0x572fdd,{'commentId':_0xa7df47[_0x1210b6(0x148)],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content'])});break;}case v[_0x1210b6(0x122)]:{const _0x1bf870=(_0x2174d2=this['_threadCommentModel'][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])[_0x1210b6(0x118)](_0x318d13=>_0x318d13[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0x2174d2['root'];_0x1bf870&&this[_0x1210b6(0x16c)]['resolveComment'](_0x4b6ce1,_0x572fdd,_0x1bf870['id'],_0xa7df47['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4ee146(_0x3a15b6)),p(0x1,_0x4ee146(_0xb8419e)),p(0x2,_0x4ee146(_0x44cabc)),p(0x3,_0x4ee146(_0x52b0e2))],_);function _0x1048(){const _0x2f6de5=['_threadCommentModel','4TZGKIp','error','/solved','symbol','Solved','UNIVER_UNKNOWN','threadId','9uqpsag','COMMENT','slice','getOwnPropertyDescriptor','/edit','2092509afUKxH','solved','Delete','/universer-api/user/list','4804470WyjOex','requireSession','6sCWnfQ','updateComment','find','getCurrentUser','filter','addComment','addUser','length','parentId','rangeId','_httpService','thread-comment-data-source.config','Solve','Add','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','subscribe','getComment','5126496mVinYO','_config','_initUserSync','resolved','/add','commentUpdate$','body','parse','stringify','userId','root','delete','_sessionService','user','dataSource','ref','388667MJeums','setConfig','unitId','/universer-api/comment/unit/','_threadCommentDataSource','_initDataSource','code','get','YYYY/MM/DD\x20HH:mm','reply','deleteComment','defineProperty','getMemberID','map','onStarting','replyId','_init','rangeType','9427411QohKAT','userID','getUnit','post','createTimestamp','_injector','disposeWithMe','_commentService','OpenOrReOpen','1080110FjlzJi','payload','comment','replies','1563768diwUks','type','forEach','add','format','values','getUser','_userService','Unknown','pipe','Edit','_configService','Reply','_threadCommentDataSourceService','11rLNvVm','/delete','UNRECOGNIZED','/reply','users','8nrdXnY'];_0x1048=function(){return _0x2f6de5;};return _0x1048();}const z=_0x426fd8(0x121),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x4f5c1e,_0x3b8dfc,_0x404569,_0x34deb2)=>{const _0x291939=_0x426fd8;for(var _0x2855e8=_0x34deb2>0x1?void 0x0:_0x34deb2?k(_0x3b8dfc,_0x404569):_0x3b8dfc,_0x293ba3=_0x4f5c1e[_0x291939(0x11d)]-0x1,_0x1b68f3;_0x293ba3>=0x0;_0x293ba3--)(_0x1b68f3=_0x4f5c1e[_0x293ba3])&&(_0x2855e8=_0x1b68f3(_0x2855e8)||_0x2855e8);return _0x2855e8;},b=(_0x2d815e,_0x8cbb2)=>(_0x21a46c,_0x421439)=>_0x8cbb2(_0x21a46c,_0x421439,_0x2d815e);function X(_0x132ece,_0xa54595){const _0x1aa235=_0x426fd8,_0x1dca2c=_0x132ece[_0x1aa235(0x157)][0x0];return{..._0xa54595,'id':_0x1dca2c['replyId'],'resolved':_0x132ece[_0x1aa235(0x17a)]===0x1,'dT':y(_0x1dca2c[_0x1aa235(0x14f)]),'personId':_0x1dca2c[_0x1aa235(0x132)],'threadId':_0x1dca2c[_0x1aa235(0x173)]};}function ee(_0x46f5cd,_0x12f5d2,_0x2c5f2e){const _0xeedfeb=_0x426fd8;var _0x5a1c95,_0x4d1b5e;if(((_0x4d1b5e=(_0x5a1c95=_0x46f5cd==null?void 0x0:_0x46f5cd[_0xeedfeb(0x157)])==null?void 0x0:_0x5a1c95[_0xeedfeb(0x11d)])!=null?_0x4d1b5e:0x0)>0x0){const _0x465a71=(_0x1b385a,_0x33799c)=>({'id':_0x1b385a['replyId'],'threadId':_0x1b385a[_0xeedfeb(0x173)],'dT':y(_0x1b385a[_0xeedfeb(0x14f)]),'personId':_0x1b385a[_0xeedfeb(0x132)],'resolved':_0x46f5cd[_0xeedfeb(0x17a)]===I[_0xeedfeb(0x171)],'unitId':_0x12f5d2,'subUnitId':_0x2c5f2e,'text':JSON[_0xeedfeb(0x130)](_0x1b385a['content']),'parentId':_0x33799c}),_0x19e897=_0x465a71(_0x46f5cd[_0xeedfeb(0x157)][0x0]);return{..._0x19e897,'children':_0x46f5cd[_0xeedfeb(0x157)][_0xeedfeb(0x176)](0x1)[_0xeedfeb(0x146)](_0xe877b9=>_0x465a71(_0xe877b9,_0x19e897['id']))};}return null;}let S=class{constructor(_0x582d0c,_0x3ec22f,_0x38ac2){const _0x55bca0=_0x426fd8;this['_httpService']=_0x582d0c,this[_0x55bca0(0x15f)]=_0x3ec22f,this[_0x55bca0(0x135)]=_0x38ac2;}async['addComment'](_0x16f9fd){const _0x281596=_0x426fd8;var _0x17661d,_0x48e716;const {parentId:_0x13a13d,unitId:_0xd2379a,text:_0x28fbbf,threadId:_0x2eecf1}=_0x16f9fd,_0x103558=(_0x48e716=(_0x17661d=_0x28fbbf['customRanges'])==null?void 0x0:_0x17661d[_0x281596(0x11a)](_0x16bbf1=>_0x16bbf1[_0x281596(0x14a)]===_0x23dce0['COMMENT'])[_0x281596(0x146)](_0x5ad427=>_0x5ad427[_0x281596(0x11f)]))!=null?_0x48e716:[],_0x39d9cd=JSON[_0x281596(0x131)](_0x28fbbf),_0x5a320c=(await this[_0x281596(0x135)][_0x281596(0x17e)](_0xd2379a))[_0x281596(0x145)]();if(_0x13a13d){const _0x52122c={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558,'threadId':_0x2eecf1},_0x4dab53=(await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x169),{'body':_0x52122c}))[_0x281596(0x12f)][_0x281596(0x142)];return{..._0x16f9fd,'id':_0x4dab53[_0x281596(0x148)],'dT':_0xc6ba85(+_0x4dab53[_0x281596(0x14f)])[_0x281596(0x15c)](_0x281596(0x141)),'personId':_0x4dab53['userId']};}else{const _0x50cb7f={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558},_0x26c423=await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x12d),{'body':_0x50cb7f});return X(_0x26c423[_0x281596(0x12f)][_0x281596(0x156)],_0x16f9fd);}}async[_0x426fd8(0x117)](_0x289351){const _0x54a752=_0x426fd8;var _0x488b00,_0x4d462f;const {text:_0x2066ac,unitId:_0x3ec9cd}=_0x289351,_0x5ae0c3=(_0x4d462f=(_0x488b00=_0x2066ac['customRanges'])==null?void 0x0:_0x488b00[_0x54a752(0x11a)](_0x1243bb=>_0x1243bb[_0x54a752(0x14a)]===_0x23dce0[_0x54a752(0x175)])['map'](_0x315824=>_0x315824['rangeId']))!=null?_0x4d462f:[],_0x5068be=JSON[_0x54a752(0x131)](_0x2066ac),_0x3b1c54=_0x289351[_0x54a752(0x173)],_0x29bd71=_0x289351['id'],_0x4270a4={'memberId':(await this[_0x54a752(0x135)][_0x54a752(0x17e)](_0x3ec9cd))[_0x54a752(0x145)](),'unitId':_0x3ec9cd,'threadId':_0x3b1c54,'mention':_0x5ae0c3,'content':_0x5068be,'replyId':_0x29bd71},_0x407fe5=await this[_0x54a752(0x120)][_0x54a752(0x14e)](_0x54a752(0x13c)+_0x3ec9cd+_0x54a752(0x178),{'body':_0x4270a4});return!_0x407fe5[_0x54a752(0x12f)]['error']||_0x407fe5[_0x54a752(0x12f)][_0x54a752(0x16e)][_0x54a752(0x13f)]===0x1;}async['resolveComment'](_0x3b3c5d){const _0x1591d1=_0x426fd8,{unitId:_0x5dff18}=_0x3b3c5d,_0x54d35d=_0x3b3c5d['threadId'],_0xddd362={'memberId':this[_0x1591d1(0x15f)][_0x1591d1(0x119)]()[_0x1591d1(0x14c)],'unitId':_0x5dff18,'threadId':_0x54d35d,'solved':_0x3b3c5d[_0x1591d1(0x12c)]?I[_0x1591d1(0x171)]:I[_0x1591d1(0x153)]},_0x19b2bd=await this[_0x1591d1(0x120)][_0x1591d1(0x14e)]('/universer-api/comment/unit/'+_0x5dff18+_0x1591d1(0x16f),{'body':_0xddd362});return!_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)]||_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)][_0x1591d1(0x13f)]===0x1;}async[_0x426fd8(0x143)](_0x489852,_0x4def35,_0x11d4f9,_0x5bf2d7){const _0x35fc3d=_0x426fd8,_0x562f53={'memberId':(await this[_0x35fc3d(0x135)][_0x35fc3d(0x17e)](_0x489852))[_0x35fc3d(0x145)](),'threadId':_0x11d4f9,'replyId':_0x5bf2d7,'unitId':_0x489852},_0x320754=await this[_0x35fc3d(0x120)][_0x35fc3d(0x14e)](_0x35fc3d(0x13c)+_0x489852+_0x35fc3d(0x167),{'body':_0x562f53});return!_0x320754[_0x35fc3d(0x12f)]['error']||_0x320754[_0x35fc3d(0x12f)][_0x35fc3d(0x16e)]['code']===0x1;}async['listComments'](_0x2891af,_0x316a19,_0x219d18){const _0x149cc7=_0x426fd8,_0x2b59a5={'unitId':_0x2891af,'threadId':_0x219d18},_0x153a08=await this['_httpService'][_0x149cc7(0x14e)](_0x149cc7(0x13c)+_0x2891af+'/list',{'body':_0x2b59a5}),_0x478b45=_0x219d18[_0x149cc7(0x146)](_0x2035a3=>ee(_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x126)][_0x2035a3],_0x2891af,_0x316a19))['filter'](Boolean);return Object[_0x149cc7(0x15d)](_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x16a)])[_0x149cc7(0x15a)](_0x264ecd=>{const _0x1a0132=_0x149cc7;this[_0x1a0132(0x15f)][_0x1a0132(0x11c)](_0x264ecd);}),_0x478b45;}[_0x426fd8(0x124)](_0x18d8a2){const _0x433338=_0x426fd8;return{'id':_0x18d8a2['id'],'threadId':_0x18d8a2['threadId'],'ref':_0x18d8a2[_0x433338(0x138)]};}};S=Q([b(0x0,_0x4ee146(_0x28ab9a)),b(0x1,_0x4ee146(_0x44cabc)),b(0x2,_0x4ee146(_0x44c5cb))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x26f758,_0x106bb3,_0x45ea78,_0x2a3bfd)=>{const _0x118a55=_0x426fd8;for(var _0xf2e6cb=_0x2a3bfd>0x1?void 0x0:_0x2a3bfd?re(_0x106bb3,_0x45ea78):_0x106bb3,_0x3534cc=_0x26f758[_0x118a55(0x11d)]-0x1,_0x433e19;_0x3534cc>=0x0;_0x3534cc--)(_0x433e19=_0x26f758[_0x3534cc])&&(_0xf2e6cb=_0x433e19(_0xf2e6cb)||_0xf2e6cb);return _0xf2e6cb;},M=(_0x4e72bb,_0x1d0aa4)=>(_0x92c24d,_0x54b819)=>_0x1d0aa4(_0x92c24d,_0x54b819,_0x4e72bb);let f=class extends _0x1cb851{constructor(_0x534207,_0x3a2173){const _0x2de5a7=_0x426fd8;super(),this['_threadCommentDataSourceService']=_0x534207,this[_0x2de5a7(0x13d)]=_0x3a2173,this[_0x2de5a7(0x13e)]();}[_0x426fd8(0x13e)](){const _0x39a406=_0x426fd8;this[_0x39a406(0x165)][_0x39a406(0x137)]=this['_threadCommentDataSource'],this[_0x39a406(0x165)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4fbd0e),M(0x1,_0x4ee146(S))],f);var se=Object[_0x426fd8(0x144)],oe=Object[_0x426fd8(0x177)],ne=(_0x284618,_0xebc38f,_0x4ee5f9)=>_0xebc38f in _0x284618?se(_0x284618,_0xebc38f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5f9}):_0x284618[_0xebc38f]=_0x4ee5f9,ie=(_0x56b21e,_0x208850,_0x3fb898,_0x16d072)=>{for(var _0x2abac9=_0x16d072>0x1?void 0x0:_0x16d072?oe(_0x208850,_0x3fb898):_0x208850,_0x12b79f=_0x56b21e['length']-0x1,_0x51fb89;_0x12b79f>=0x0;_0x12b79f--)(_0x51fb89=_0x56b21e[_0x12b79f])&&(_0x2abac9=_0x51fb89(_0x2abac9)||_0x2abac9);return _0x2abac9;},N=(_0x23b47c,_0x4c5e7f)=>(_0x58ab05,_0x4c0313)=>_0x4c5e7f(_0x58ab05,_0x4c0313,_0x23b47c),$=(_0x4fdf5c,_0x18f4f6,_0x50dd21)=>ne(_0x4fdf5c,typeof _0x18f4f6!=_0x426fd8(0x170)?_0x18f4f6+'':_0x18f4f6,_0x50dd21);let g=class extends _0x42e39d{constructor(_0x4ce1c4=O,_0x55e41,_0x2666fe){const _0x5194c5=_0x426fd8;super(),this[_0x5194c5(0x12a)]=_0x4ce1c4,this['_injector']=_0x55e41,this[_0x5194c5(0x163)]=_0x2666fe;const {..._0x103b86}=_0x2d8dad({},O,this[_0x5194c5(0x12a)]);this[_0x5194c5(0x163)][_0x5194c5(0x13a)](z,_0x103b86);}[_0x426fd8(0x147)](){const _0x55db13=_0x426fd8;[[S],[f],[_]][_0x55db13(0x15a)](_0x21b936=>{const _0x18d1f0=_0x55db13;this[_0x18d1f0(0x150)][_0x18d1f0(0x15b)](_0x21b936);});}['onReady'](){const _0x588f58=_0x426fd8;this[_0x588f58(0x150)][_0x588f58(0x140)](f),this[_0x588f58(0x150)][_0x588f58(0x140)](_);}};$(g,'pluginName',W),$(g,_0x426fd8(0x159),_0x29b4b7[_0x426fd8(0x172)]),g=ie([_0x537f52(_0x42ba3c,_0x39432b,_0x3618e3),N(0x1,_0x4ee146(_0x52b0e2)),N(0x2,_0x4f31e8)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x13b1c4=_0x4c5b;(function(_0x15453e,_0x57a117){const _0x154245=_0x4c5b,_0x40c01=_0x15453e();while(!![]){try{const _0x2e98c7=-parseInt(_0x154245(0x1fc))/0x1+parseInt(_0x154245(0x1f5))/0x2+parseInt(_0x154245(0x200))/0x3+-parseInt(_0x154245(0x23f))/0x4+-parseInt(_0x154245(0x239))/0x5*(parseInt(_0x154245(0x23c))/0x6)+parseInt(_0x154245(0x247))/0x7+parseInt(_0x154245(0x22c))/0x8*(parseInt(_0x154245(0x244))/0x9);if(_0x2e98c7===_0x57a117)break;else _0x40c01['push'](_0x40c01['shift']());}catch(_0xb34cea){_0x40c01['push'](_0x40c01['shift']());}}}(_0x403c,0x37d18));import{CommentService as _0x177d98,CollaborationSessionService as _0x4e7bc5,UniverCollaborationClientPlugin as _0x27831f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12c2ab}from'@univerjs-pro/license';import{dayjs as _0x37ac27,UserManagerService as _0x2ebe7d,Inject as _0x19f878,Injector as _0x435899,Disposable as _0x45ea9c,CustomRangeType as _0x49edb8,UniverInstanceType as _0x2e5014,DependentOn as _0x40f5fa,IConfigService as _0x504d68,Plugin as _0x2e99e6,merge as _0x2eef28}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5f0524}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37169b,IThreadCommentDataSourceService as _0x5e2138}from'@univerjs/thread-comment';import{bufferTime as _0x19fa0c}from'rxjs';import{HTTPService as _0x5861be}from'@univerjs/network';const W=_0x13b1c4(0x248);var I=(_0xdc1add=>(_0xdc1add[_0xdc1add[_0x13b1c4(0x21b)]=0x0]='OpenOrReOpen',_0xdc1add[_0xdc1add[_0x13b1c4(0x249)]=0x1]=_0x13b1c4(0x249),_0xdc1add[_0xdc1add[_0x13b1c4(0x22b)]=-0x1]=_0x13b1c4(0x22b),_0xdc1add))(I||{}),v=(_0x3dd569=>(_0x3dd569[_0x3dd569['Unknown']=0x0]='Unknown',_0x3dd569[_0x3dd569['Add']=0x1]='Add',_0x3dd569[_0x3dd569[_0x13b1c4(0x207)]=0x2]=_0x13b1c4(0x207),_0x3dd569[_0x3dd569[_0x13b1c4(0x209)]=0x3]=_0x13b1c4(0x209),_0x3dd569[_0x3dd569[_0x13b1c4(0x1e8)]=0x4]=_0x13b1c4(0x1e8),_0x3dd569[_0x3dd569[_0x13b1c4(0x228)]=0x5]='Solve',_0x3dd569[_0x3dd569[_0x13b1c4(0x22b)]=-0x1]=_0x13b1c4(0x22b),_0x3dd569))(v||{});const y=_0x568ffe=>_0x37ac27(new Date(+_0x568ffe))[_0x13b1c4(0x219)](_0x13b1c4(0x232)),B=async(_0x50dc4c,_0x2b39b1)=>{const _0x5eeff8=_0x13b1c4,_0x2101a8=_0x50dc4c[_0x5eeff8(0x1ed)](_0x2ebe7d),_0x210653=_0x50dc4c[_0x5eeff8(0x1ed)](_0x5861be);_0x2b39b1['forEach'](_0x3348e9=>{const _0x4688c3=_0x5eeff8;_0x2101a8['getUser'](_0x3348e9)&&_0x2b39b1[_0x4688c3(0x213)](_0x3348e9);}),_0x2b39b1[_0x5eeff8(0x237)]&&(await _0x210653[_0x5eeff8(0x1ed)](_0x5eeff8(0x23e),{'params':{'userIDs':[..._0x2b39b1]}}))[_0x5eeff8(0x215)]['users'][_0x5eeff8(0x22d)](_0x55c31b=>{const _0x44dc44=_0x5eeff8;_0x55c31b&&_0x2101a8[_0x44dc44(0x240)](_0x55c31b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x469912,_0xd312d6,_0xea50d8,_0x70365b)=>{const _0x22dc10=_0x13b1c4;for(var _0x55cb1a=_0x70365b>0x1?void 0x0:_0x70365b?K(_0xd312d6,_0xea50d8):_0xd312d6,_0x585b5f=_0x469912[_0x22dc10(0x24b)]-0x1,_0x4828a0;_0x585b5f>=0x0;_0x585b5f--)(_0x4828a0=_0x469912[_0x585b5f])&&(_0x55cb1a=_0x4828a0(_0x55cb1a)||_0x55cb1a);return _0x55cb1a;},p=(_0x89cc4,_0x397ac0)=>(_0x18d495,_0x38afa7)=>_0x397ac0(_0x18d495,_0x38afa7,_0x89cc4);let _=class extends _0x45ea9c{constructor(_0x1b1332,_0x4fef3b,_0x38cac8,_0xa745b8){const _0x17df19=_0x13b1c4;super(),this['_commentService']=_0x1b1332,this[_0x17df19(0x225)]=_0x4fef3b,this[_0x17df19(0x21e)]=_0x38cac8,this[_0x17df19(0x236)]=_0xa745b8,this[_0x17df19(0x24a)](),this[_0x17df19(0x218)]();}[_0x13b1c4(0x218)](){const _0x2ce7f6=_0x13b1c4;this[_0x2ce7f6(0x1f6)](this[_0x2ce7f6(0x225)][_0x2ce7f6(0x210)][_0x2ce7f6(0x246)](_0x19fa0c(0x10))['subscribe'](_0x5828d4=>{const _0x2eeabb=_0x2ce7f6,_0x18e36d=new Set();_0x5828d4[_0x2eeabb(0x22d)](_0x3f52c9=>{const _0x119e95=_0x2eeabb;switch(_0x3f52c9[_0x119e95(0x202)]){case'add':{const _0x3aa493=_0x3f52c9[_0x119e95(0x230)][_0x119e95(0x1f2)];_0x18e36d[_0x119e95(0x1f7)](_0x3aa493);break;}}}),B(this['_injector'],_0x18e36d);}));}[_0x13b1c4(0x24a)](){const _0x600f23=_0x13b1c4;this['disposeWithMe'](this[_0x600f23(0x21a)][_0x600f23(0x210)][_0x600f23(0x1ea)](async _0x76e737=>{const _0x4bd855=_0x600f23;var _0x1fd58a,_0x195495,_0x4474e5,_0x1232fb;const _0x33ff64=(_0x1fd58a=this['_threadCommentModel'][_0x4bd855(0x217)](_0x76e737[_0x4bd855(0x227)])['find'](_0x37af69=>_0x37af69['threadId']===_0x76e737[_0x4bd855(0x20b)]))==null?void 0x0:_0x1fd58a[_0x4bd855(0x23a)];if(!_0x33ff64)return;const {unitId:_0x3829ff,subUnitId:_0x310ab3}=_0x33ff64;switch(_0x76e737[_0x4bd855(0x21c)]&&this[_0x4bd855(0x21e)][_0x4bd855(0x240)](_0x76e737[_0x4bd855(0x21c)]),_0x76e737[_0x4bd855(0x202)]){case v[_0x4bd855(0x241)]:break;case v['Reply']:{this['_threadCommentModel'][_0x4bd855(0x216)](_0x3829ff,_0x310ab3,{'unitId':_0x3829ff,'subUnitId':_0x310ab3,'ref':'','id':_0x76e737[_0x4bd855(0x1fd)],'dT':y(+_0x76e737['createTimestamp']),'threadId':_0x76e737[_0x4bd855(0x20b)],'personId':(_0x4474e5=(_0x195495=_0x76e737[_0x4bd855(0x21c)])==null?void 0x0:_0x195495[_0x4bd855(0x1fb)])!=null?_0x4474e5:_0x76e737[_0x4bd855(0x206)],'text':JSON[_0x4bd855(0x243)](_0x76e737[_0x4bd855(0x214)]),'parentId':_0x33ff64['id']});break;}case v[_0x4bd855(0x1e8)]:{const _0x5d4ba2=this[_0x4bd855(0x225)][_0x4bd855(0x205)](_0x3829ff,_0x310ab3,_0x76e737[_0x4bd855(0x1fd)]);_0x5d4ba2&&_0x5d4ba2[_0x4bd855(0x203)]&&this[_0x4bd855(0x225)][_0x4bd855(0x23b)](_0x3829ff,_0x310ab3,_0x76e737[_0x4bd855(0x1fd)]);break;}case v[_0x4bd855(0x209)]:{this[_0x4bd855(0x225)][_0x4bd855(0x1fe)](_0x3829ff,_0x310ab3,{'commentId':_0x76e737['replyId'],'text':JSON[_0x4bd855(0x243)](_0x76e737['content'])});break;}case v[_0x4bd855(0x228)]:{const _0xe5c05c=(_0x1232fb=this[_0x4bd855(0x225)][_0x4bd855(0x217)](_0x76e737[_0x4bd855(0x227)])[_0x4bd855(0x20d)](_0x137d2d=>_0x137d2d[_0x4bd855(0x20b)]===_0x76e737[_0x4bd855(0x20b)]))==null?void 0x0:_0x1232fb[_0x4bd855(0x23a)];_0xe5c05c&&this[_0x4bd855(0x225)][_0x4bd855(0x221)](_0x3829ff,_0x310ab3,_0xe5c05c['id'],_0x76e737['solved']===I[_0x4bd855(0x249)]);break;}}}));}};_=V([p(0x0,_0x19f878(_0x177d98)),p(0x1,_0x19f878(_0x37169b)),p(0x2,_0x19f878(_0x2ebe7d)),p(0x3,_0x19f878(_0x435899))],_);const z='thread-comment-data-source.config',O={};function _0x403c(){const _0x1d5972=['/edit','commentUpdate$','stringify','_sessionService','delete','content','body','addComment','getUnit','_initUserSync','format','_commentService','OpenOrReOpen','user','/universer-api/comment/unit/','_userService','reply','pluginName','resolveComment','createTimestamp','post','customRanges','_threadCommentModel','syncUpdateMutationToColla','unitId','Solve','replies','_config','UNRECOGNIZED','8FvdJXi','forEach','rangeId','onStarting','payload','defineProperty','YYYY/MM/DD\x20HH:mm','users','dataSource','rangeType','_injector','size','filter','10ijwAmK','root','deleteComment','1361382oJnfbX','listComments','/universer-api/user/list','729156ObyltE','addUser','Add','resolved','parse','3508497OTBhbX','getCurrentUser','pipe','2048032cQvmlA','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solved','_init','length','requireSession','values','symbol','Delete','code','subscribe','slice','solved','get','_httpService','_threadCommentDataSourceService','_configService','error','personId','setConfig','COMMENT','156880yrZLAS','disposeWithMe','add','/list','/reply','_threadCommentDataSource','userID','12383VNwedx','replyId','updateComment','comments','348747uPNOQG','getMemberID','type','parentId','getOwnPropertyDescriptor','getComment','userId','Reply','map','Edit','UNIVER_UNKNOWN','threadId','saveCommentToSnapshot','find','ref'];_0x403c=function(){return _0x1d5972;};return _0x403c();}var k=Object[_0x13b1c4(0x204)],Q=(_0xb6743c,_0x2e5749,_0x3dbc3f,_0x757bfc)=>{const _0x2bf9c9=_0x13b1c4;for(var _0x594616=_0x757bfc>0x1?void 0x0:_0x757bfc?k(_0x2e5749,_0x3dbc3f):_0x2e5749,_0x4671f4=_0xb6743c[_0x2bf9c9(0x24b)]-0x1,_0x15883c;_0x4671f4>=0x0;_0x4671f4--)(_0x15883c=_0xb6743c[_0x4671f4])&&(_0x594616=_0x15883c(_0x594616)||_0x594616);return _0x594616;},b=(_0x23b5b8,_0x9cca03)=>(_0xcd61bf,_0x44127c)=>_0x9cca03(_0xcd61bf,_0x44127c,_0x23b5b8);function X(_0x166e21,_0x4422a4){const _0xe6247b=_0x13b1c4,_0x497e2c=_0x166e21[_0xe6247b(0x229)][0x0];return{..._0x4422a4,'id':_0x497e2c[_0xe6247b(0x1fd)],'resolved':_0x166e21[_0xe6247b(0x1ec)]===0x1,'dT':y(_0x497e2c['createTimestamp']),'personId':_0x497e2c[_0xe6247b(0x206)],'threadId':_0x497e2c[_0xe6247b(0x20b)]};}function _0x4c5b(_0x58606b,_0x1ee148){const _0x403c75=_0x403c();return _0x4c5b=function(_0x4c5b27,_0x4f7cda){_0x4c5b27=_0x4c5b27-0x1e7;let _0x224976=_0x403c75[_0x4c5b27];return _0x224976;},_0x4c5b(_0x58606b,_0x1ee148);}function ee(_0x47683f,_0x90a40,_0x39dbb9){const _0x223de4=_0x13b1c4;var _0x410bb2,_0x1e6833;if(((_0x1e6833=(_0x410bb2=_0x47683f==null?void 0x0:_0x47683f[_0x223de4(0x229)])==null?void 0x0:_0x410bb2[_0x223de4(0x24b)])!=null?_0x1e6833:0x0)>0x0){const _0x4f86cf=(_0x20e80,_0xc04892)=>({'id':_0x20e80['replyId'],'threadId':_0x20e80[_0x223de4(0x20b)],'dT':y(_0x20e80[_0x223de4(0x222)]),'personId':_0x20e80[_0x223de4(0x206)],'resolved':_0x47683f['solved']===I[_0x223de4(0x249)],'unitId':_0x90a40,'subUnitId':_0x39dbb9,'text':JSON['parse'](_0x20e80[_0x223de4(0x214)]),'parentId':_0xc04892}),_0x39c278=_0x4f86cf(_0x47683f[_0x223de4(0x229)][0x0]);return{..._0x39c278,'children':_0x47683f[_0x223de4(0x229)][_0x223de4(0x1eb)](0x1)[_0x223de4(0x208)](_0x5c0e3c=>_0x4f86cf(_0x5c0e3c,_0x39c278['id']))};}return null;}let S=class{constructor(_0x50e8f3,_0x28a0e1,_0x550722){const _0xedb117=_0x13b1c4;this['_httpService']=_0x50e8f3,this['_userService']=_0x28a0e1,this[_0xedb117(0x212)]=_0x550722;}async[_0x13b1c4(0x216)](_0x1d48ef){const _0x31ddbf=_0x13b1c4;var _0x3cb18f,_0x4e2a87;const {parentId:_0x45fc13,unitId:_0x3bb7e1,text:_0x34092e,threadId:_0x545f8c}=_0x1d48ef,_0x413eed=(_0x4e2a87=(_0x3cb18f=_0x34092e[_0x31ddbf(0x224)])==null?void 0x0:_0x3cb18f['filter'](_0x3f22e8=>_0x3f22e8[_0x31ddbf(0x235)]===_0x49edb8[_0x31ddbf(0x1f4)])[_0x31ddbf(0x208)](_0x1a1f7b=>_0x1a1f7b[_0x31ddbf(0x22e)]))!=null?_0x4e2a87:[],_0xf08fd9=JSON[_0x31ddbf(0x211)](_0x34092e),_0x20a325=(await this[_0x31ddbf(0x212)]['requireSession'](_0x3bb7e1))[_0x31ddbf(0x201)]();if(_0x45fc13){const _0x5a24b9={'memberId':_0x20a325,'unitId':_0x3bb7e1,'content':_0xf08fd9,'mention':_0x413eed,'threadId':_0x545f8c},_0x46f0dc=(await this[_0x31ddbf(0x1ee)][_0x31ddbf(0x223)]('/universer-api/comment/unit/'+_0x3bb7e1+_0x31ddbf(0x1f9),{'body':_0x5a24b9}))[_0x31ddbf(0x215)][_0x31ddbf(0x21f)];return{..._0x1d48ef,'id':_0x46f0dc[_0x31ddbf(0x1fd)],'dT':_0x37ac27(+_0x46f0dc[_0x31ddbf(0x222)])['format'](_0x31ddbf(0x232)),'personId':_0x46f0dc[_0x31ddbf(0x206)]};}else{const _0x57d2a2={'memberId':_0x20a325,'unitId':_0x3bb7e1,'content':_0xf08fd9,'mention':_0x413eed},_0x53ee36=await this[_0x31ddbf(0x1ee)][_0x31ddbf(0x223)](_0x31ddbf(0x21d)+_0x3bb7e1+'/add',{'body':_0x57d2a2});return X(_0x53ee36[_0x31ddbf(0x215)]['comment'],_0x1d48ef);}}async[_0x13b1c4(0x1fe)](_0x264bc2){const _0x5c92c1=_0x13b1c4;var _0xee675c,_0x2f04f9;const {text:_0x322c30,unitId:_0x3734ab}=_0x264bc2,_0xfbf8a=(_0x2f04f9=(_0xee675c=_0x322c30[_0x5c92c1(0x224)])==null?void 0x0:_0xee675c[_0x5c92c1(0x238)](_0x414204=>_0x414204['rangeType']===_0x49edb8[_0x5c92c1(0x1f4)])['map'](_0x4e7b83=>_0x4e7b83[_0x5c92c1(0x22e)]))!=null?_0x2f04f9:[],_0xb41788=JSON['stringify'](_0x322c30),_0x50cacd=_0x264bc2['threadId'],_0x5ec791=_0x264bc2['id'],_0x53f9b2={'memberId':(await this[_0x5c92c1(0x212)][_0x5c92c1(0x24c)](_0x3734ab))['getMemberID'](),'unitId':_0x3734ab,'threadId':_0x50cacd,'mention':_0xfbf8a,'content':_0xb41788,'replyId':_0x5ec791},_0xa41e60=await this[_0x5c92c1(0x1ee)][_0x5c92c1(0x223)](_0x5c92c1(0x21d)+_0x3734ab+_0x5c92c1(0x20f),{'body':_0x53f9b2});return!_0xa41e60[_0x5c92c1(0x215)][_0x5c92c1(0x1f1)]||_0xa41e60[_0x5c92c1(0x215)][_0x5c92c1(0x1f1)]['code']===0x1;}async[_0x13b1c4(0x221)](_0x2f3459){const _0x5983ca=_0x13b1c4,{unitId:_0xbd2aa8}=_0x2f3459,_0x3a607c=_0x2f3459[_0x5983ca(0x20b)],_0xed1799={'memberId':this[_0x5983ca(0x21e)][_0x5983ca(0x245)]()[_0x5983ca(0x1fb)],'unitId':_0xbd2aa8,'threadId':_0x3a607c,'solved':_0x2f3459[_0x5983ca(0x242)]?I['Solved']:I[_0x5983ca(0x21b)]},_0x206980=await this[_0x5983ca(0x1ee)]['post'](_0x5983ca(0x21d)+_0xbd2aa8+'/solved',{'body':_0xed1799});return!_0x206980[_0x5983ca(0x215)][_0x5983ca(0x1f1)]||_0x206980['body'][_0x5983ca(0x1f1)][_0x5983ca(0x1e9)]===0x1;}async[_0x13b1c4(0x23b)](_0xc14e24,_0x23c765,_0x1eef3c,_0x4fb2bd){const _0x55e599=_0x13b1c4,_0x1bdb7f={'memberId':(await this['_sessionService'][_0x55e599(0x24c)](_0xc14e24))['getMemberID'](),'threadId':_0x1eef3c,'replyId':_0x4fb2bd,'unitId':_0xc14e24},_0x3de552=await this[_0x55e599(0x1ee)][_0x55e599(0x223)](_0x55e599(0x21d)+_0xc14e24+'/delete',{'body':_0x1bdb7f});return!_0x3de552[_0x55e599(0x215)][_0x55e599(0x1f1)]||_0x3de552[_0x55e599(0x215)][_0x55e599(0x1f1)]['code']===0x1;}async[_0x13b1c4(0x23d)](_0x5330dd,_0x2aed56,_0x545bb6){const _0x4240f3=_0x13b1c4,_0x1d4dd4={'unitId':_0x5330dd,'threadId':_0x545bb6},_0x1fb096=await this[_0x4240f3(0x1ee)][_0x4240f3(0x223)]('/universer-api/comment/unit/'+_0x5330dd+_0x4240f3(0x1f8),{'body':_0x1d4dd4}),_0x20be0f=_0x545bb6[_0x4240f3(0x208)](_0x128524=>ee(_0x1fb096[_0x4240f3(0x215)][_0x4240f3(0x1ff)][_0x128524],_0x5330dd,_0x2aed56))['filter'](Boolean);return Object[_0x4240f3(0x24d)](_0x1fb096['body'][_0x4240f3(0x233)])[_0x4240f3(0x22d)](_0x397694=>{const _0xf55748=_0x4240f3;this[_0xf55748(0x21e)][_0xf55748(0x240)](_0x397694);}),_0x20be0f;}[_0x13b1c4(0x20c)](_0x2dd98f){const _0x4ea0df=_0x13b1c4;return{'id':_0x2dd98f['id'],'threadId':_0x2dd98f[_0x4ea0df(0x20b)],'ref':_0x2dd98f[_0x4ea0df(0x20e)]};}};S=Q([b(0x0,_0x19f878(_0x5861be)),b(0x1,_0x19f878(_0x2ebe7d)),b(0x2,_0x19f878(_0x4e7bc5))],S);var re=Object[_0x13b1c4(0x204)],te=(_0x58feff,_0x516a18,_0x58f959,_0x452d92)=>{for(var _0x190556=_0x452d92>0x1?void 0x0:_0x452d92?re(_0x516a18,_0x58f959):_0x516a18,_0x1ea9d6=_0x58feff['length']-0x1,_0x3b0889;_0x1ea9d6>=0x0;_0x1ea9d6--)(_0x3b0889=_0x58feff[_0x1ea9d6])&&(_0x190556=_0x3b0889(_0x190556)||_0x190556);return _0x190556;},M=(_0x181f41,_0x4771f7)=>(_0x4d4fb3,_0x10919d)=>_0x4771f7(_0x4d4fb3,_0x10919d,_0x181f41);let f=class extends _0x45ea9c{constructor(_0x10a0d0,_0x223986){const _0x5f1a19=_0x13b1c4;super(),this[_0x5f1a19(0x1ef)]=_0x10a0d0,this[_0x5f1a19(0x1fa)]=_0x223986,this['_initDataSource']();}['_initDataSource'](){const _0x4662f9=_0x13b1c4;this[_0x4662f9(0x1ef)][_0x4662f9(0x234)]=this[_0x4662f9(0x1fa)],this[_0x4662f9(0x1ef)][_0x4662f9(0x226)]=!0x1;}};f=te([M(0x0,_0x5e2138),M(0x1,_0x19f878(S))],f);var se=Object[_0x13b1c4(0x231)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x42913c,_0x2e1baa,_0x464825)=>_0x2e1baa in _0x42913c?se(_0x42913c,_0x2e1baa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x464825}):_0x42913c[_0x2e1baa]=_0x464825,ie=(_0x222405,_0x2e5d64,_0x45de97,_0x59d810)=>{for(var _0x4796df=_0x59d810>0x1?void 0x0:_0x59d810?oe(_0x2e5d64,_0x45de97):_0x2e5d64,_0x5988e2=_0x222405['length']-0x1,_0x3b217a;_0x5988e2>=0x0;_0x5988e2--)(_0x3b217a=_0x222405[_0x5988e2])&&(_0x4796df=_0x3b217a(_0x4796df)||_0x4796df);return _0x4796df;},N=(_0x38700a,_0x50ae3a)=>(_0x3767f1,_0x17c094)=>_0x50ae3a(_0x3767f1,_0x17c094,_0x38700a),$=(_0x15dd35,_0x5ca3f4,_0x1ed25e)=>ne(_0x15dd35,typeof _0x5ca3f4!=_0x13b1c4(0x1e7)?_0x5ca3f4+'':_0x5ca3f4,_0x1ed25e);let g=class extends _0x2e99e6{constructor(_0x5d356c=O,_0x7d6838,_0x22203f){const _0x7cce41=_0x13b1c4;super(),this[_0x7cce41(0x22a)]=_0x5d356c,this[_0x7cce41(0x236)]=_0x7d6838,this[_0x7cce41(0x1f0)]=_0x22203f;const {..._0x5db49f}=_0x2eef28({},O,this['_config']);this[_0x7cce41(0x1f0)][_0x7cce41(0x1f3)](z,_0x5db49f);}[_0x13b1c4(0x22f)](){const _0x42c54a=_0x13b1c4;[[S],[f],[_]][_0x42c54a(0x22d)](_0x533908=>{const _0x3dae20=_0x42c54a;this[_0x3dae20(0x236)]['add'](_0x533908);});}['onReady'](){const _0x485d9a=_0x13b1c4;this['_injector'][_0x485d9a(0x1ed)](f),this[_0x485d9a(0x236)]['get'](_);}};$(g,_0x13b1c4(0x220),W),$(g,_0x13b1c4(0x202),_0x2e5014[_0x13b1c4(0x20a)]),g=ie([_0x40f5fa(_0x5f0524,_0x27831f,_0x12c2ab),N(0x1,_0x19f878(_0x435899)),N(0x2,_0x504d68)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x426fd8=_0x35e5;(function(_0x5da0cc,_0x1df22f){const _0x5a3916=_0x35e5,_0x2ac6b0=_0x5da0cc();while(!![]){try{const _0xfe74f0=parseInt(_0x5a3916(0x139))/0x1*(parseInt(_0x5a3916(0x116))/0x2)+-parseInt(_0x5a3916(0x179))/0x3*(-parseInt(_0x5a3916(0x16d))/0x4)+parseInt(_0x5a3916(0x17d))/0x5+-parseInt(_0x5a3916(0x158))/0x6+parseInt(_0x5a3916(0x14b))/0x7*(-parseInt(_0x5a3916(0x16b))/0x8)+parseInt(_0x5a3916(0x174))/0x9*(parseInt(_0x5a3916(0x154))/0xa)+parseInt(_0x5a3916(0x166))/0xb*(-parseInt(_0x5a3916(0x129))/0xc);if(_0xfe74f0===_0x1df22f)break;else _0x2ac6b0['push'](_0x2ac6b0['shift']());}catch(_0xb37a07){_0x2ac6b0['push'](_0x2ac6b0['shift']());}}}(_0x1048,0xdb308));import{CommentService as _0x3a15b6,CollaborationSessionService as _0x44c5cb,UniverCollaborationClientPlugin as _0x39432b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3618e3}from'@univerjs-pro/license';import{dayjs as _0xc6ba85,UserManagerService as _0x44cabc,Inject as _0x4ee146,Injector as _0x52b0e2,Disposable as _0x1cb851,CustomRangeType as _0x23dce0,UniverInstanceType as _0x29b4b7,DependentOn as _0x537f52,IConfigService as _0x4f31e8,Plugin as _0x42e39d,merge as _0x2d8dad}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42ba3c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xb8419e,IThreadCommentDataSourceService as _0x4fbd0e}from'@univerjs/thread-comment';import{bufferTime as _0x4e28a0}from'rxjs';import{HTTPService as _0x28ab9a}from'@univerjs/network';function _0x35e5(_0x48b50c,_0x6d8e72){const _0x1048ad=_0x1048();return _0x35e5=function(_0x35e517,_0x454aa4){_0x35e517=_0x35e517-0x116;let _0x109e93=_0x1048ad[_0x35e517];return _0x109e93;},_0x35e5(_0x48b50c,_0x6d8e72);}const W=_0x426fd8(0x125);var I=(_0x536bf7=>(_0x536bf7[_0x536bf7[_0x426fd8(0x153)]=0x0]=_0x426fd8(0x153),_0x536bf7[_0x536bf7[_0x426fd8(0x171)]=0x1]=_0x426fd8(0x171),_0x536bf7[_0x536bf7[_0x426fd8(0x168)]=-0x1]=_0x426fd8(0x168),_0x536bf7))(I||{}),v=(_0x4efc0e=>(_0x4efc0e[_0x4efc0e[_0x426fd8(0x160)]=0x0]=_0x426fd8(0x160),_0x4efc0e[_0x4efc0e[_0x426fd8(0x123)]=0x1]=_0x426fd8(0x123),_0x4efc0e[_0x4efc0e[_0x426fd8(0x164)]=0x2]='Reply',_0x4efc0e[_0x4efc0e[_0x426fd8(0x162)]=0x3]=_0x426fd8(0x162),_0x4efc0e[_0x4efc0e[_0x426fd8(0x17b)]=0x4]=_0x426fd8(0x17b),_0x4efc0e[_0x4efc0e[_0x426fd8(0x122)]=0x5]=_0x426fd8(0x122),_0x4efc0e[_0x4efc0e['UNRECOGNIZED']=-0x1]=_0x426fd8(0x168),_0x4efc0e))(v||{});const y=_0x1c4649=>_0xc6ba85(new Date(+_0x1c4649))[_0x426fd8(0x15c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3b0632,_0x5593e6)=>{const _0x2a22f4=_0x426fd8,_0x355534=_0x3b0632[_0x2a22f4(0x140)](_0x44cabc),_0x1f3894=_0x3b0632['get'](_0x28ab9a);_0x5593e6[_0x2a22f4(0x15a)](_0x2916f3=>{const _0x378335=_0x2a22f4;_0x355534[_0x378335(0x15e)](_0x2916f3)&&_0x5593e6[_0x378335(0x134)](_0x2916f3);}),_0x5593e6['size']&&(await _0x1f3894[_0x2a22f4(0x140)](_0x2a22f4(0x17c),{'params':{'userIDs':[..._0x5593e6]}}))[_0x2a22f4(0x12f)][_0x2a22f4(0x16a)]['forEach'](_0xd97f25=>{_0xd97f25&&_0x355534['addUser'](_0xd97f25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xe13614,_0xe94754,_0x5599bb,_0x109411)=>{for(var _0x4ad2e3=_0x109411>0x1?void 0x0:_0x109411?K(_0xe94754,_0x5599bb):_0xe94754,_0x439136=_0xe13614['length']-0x1,_0x36f027;_0x439136>=0x0;_0x439136--)(_0x36f027=_0xe13614[_0x439136])&&(_0x4ad2e3=_0x36f027(_0x4ad2e3)||_0x4ad2e3);return _0x4ad2e3;},p=(_0x3f9d2e,_0x554f36)=>(_0x1928b7,_0x186b62)=>_0x554f36(_0x1928b7,_0x186b62,_0x3f9d2e);let _=class extends _0x1cb851{constructor(_0xa2a973,_0x19b392,_0x45daf1,_0x7753c7){const _0x5db985=_0x426fd8;super(),this[_0x5db985(0x152)]=_0xa2a973,this[_0x5db985(0x16c)]=_0x19b392,this[_0x5db985(0x15f)]=_0x45daf1,this[_0x5db985(0x150)]=_0x7753c7,this[_0x5db985(0x149)](),this[_0x5db985(0x12b)]();}['_initUserSync'](){const _0x5d4068=_0x426fd8;this[_0x5d4068(0x151)](this[_0x5d4068(0x16c)][_0x5d4068(0x12e)][_0x5d4068(0x161)](_0x4e28a0(0x10))[_0x5d4068(0x127)](_0x44eeb5=>{const _0x561c0e=_0x5d4068,_0x2b6737=new Set();_0x44eeb5[_0x561c0e(0x15a)](_0xa04051=>{const _0x5d0426=_0x561c0e;switch(_0xa04051[_0x5d0426(0x159)]){case'add':{const _0x1afdf0=_0xa04051[_0x5d0426(0x155)]['personId'];_0x2b6737[_0x5d0426(0x15b)](_0x1afdf0);break;}}}),B(this['_injector'],_0x2b6737);}));}[_0x426fd8(0x149)](){const _0x2fa025=_0x426fd8;this[_0x2fa025(0x151)](this['_commentService']['commentUpdate$'][_0x2fa025(0x127)](async _0xa7df47=>{const _0x1210b6=_0x2fa025;var _0xfcfd8,_0x3f2b15,_0x5e3f48,_0x2174d2;const _0x3d74fe=(_0xfcfd8=this[_0x1210b6(0x16c)][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])['find'](_0x42a028=>_0x42a028[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0xfcfd8[_0x1210b6(0x133)];if(!_0x3d74fe)return;const {unitId:_0x4b6ce1,subUnitId:_0x572fdd}=_0x3d74fe;switch(_0xa7df47[_0x1210b6(0x136)]&&this['_userService']['addUser'](_0xa7df47[_0x1210b6(0x136)]),_0xa7df47[_0x1210b6(0x159)]){case v[_0x1210b6(0x123)]:break;case v['Reply']:{this[_0x1210b6(0x16c)][_0x1210b6(0x11b)](_0x4b6ce1,_0x572fdd,{'unitId':_0x4b6ce1,'subUnitId':_0x572fdd,'ref':'','id':_0xa7df47['replyId'],'dT':y(+_0xa7df47[_0x1210b6(0x14f)]),'threadId':_0xa7df47[_0x1210b6(0x173)],'personId':(_0x5e3f48=(_0x3f2b15=_0xa7df47[_0x1210b6(0x136)])==null?void 0x0:_0x3f2b15[_0x1210b6(0x14c)])!=null?_0x5e3f48:_0xa7df47['userId'],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content']),'parentId':_0x3d74fe['id']});break;}case v[_0x1210b6(0x17b)]:{const _0x432efd=this[_0x1210b6(0x16c)][_0x1210b6(0x128)](_0x4b6ce1,_0x572fdd,_0xa7df47['replyId']);_0x432efd&&_0x432efd[_0x1210b6(0x11e)]&&this['_threadCommentModel']['deleteComment'](_0x4b6ce1,_0x572fdd,_0xa7df47[_0x1210b6(0x148)]);break;}case v[_0x1210b6(0x162)]:{this[_0x1210b6(0x16c)][_0x1210b6(0x117)](_0x4b6ce1,_0x572fdd,{'commentId':_0xa7df47[_0x1210b6(0x148)],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content'])});break;}case v[_0x1210b6(0x122)]:{const _0x1bf870=(_0x2174d2=this['_threadCommentModel'][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])[_0x1210b6(0x118)](_0x318d13=>_0x318d13[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0x2174d2['root'];_0x1bf870&&this[_0x1210b6(0x16c)]['resolveComment'](_0x4b6ce1,_0x572fdd,_0x1bf870['id'],_0xa7df47['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4ee146(_0x3a15b6)),p(0x1,_0x4ee146(_0xb8419e)),p(0x2,_0x4ee146(_0x44cabc)),p(0x3,_0x4ee146(_0x52b0e2))],_);function _0x1048(){const _0x2f6de5=['_threadCommentModel','4TZGKIp','error','/solved','symbol','Solved','UNIVER_UNKNOWN','threadId','9uqpsag','COMMENT','slice','getOwnPropertyDescriptor','/edit','2092509afUKxH','solved','Delete','/universer-api/user/list','4804470WyjOex','requireSession','6sCWnfQ','updateComment','find','getCurrentUser','filter','addComment','addUser','length','parentId','rangeId','_httpService','thread-comment-data-source.config','Solve','Add','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','subscribe','getComment','5126496mVinYO','_config','_initUserSync','resolved','/add','commentUpdate$','body','parse','stringify','userId','root','delete','_sessionService','user','dataSource','ref','388667MJeums','setConfig','unitId','/universer-api/comment/unit/','_threadCommentDataSource','_initDataSource','code','get','YYYY/MM/DD\x20HH:mm','reply','deleteComment','defineProperty','getMemberID','map','onStarting','replyId','_init','rangeType','9427411QohKAT','userID','getUnit','post','createTimestamp','_injector','disposeWithMe','_commentService','OpenOrReOpen','1080110FjlzJi','payload','comment','replies','1563768diwUks','type','forEach','add','format','values','getUser','_userService','Unknown','pipe','Edit','_configService','Reply','_threadCommentDataSourceService','11rLNvVm','/delete','UNRECOGNIZED','/reply','users','8nrdXnY'];_0x1048=function(){return _0x2f6de5;};return _0x1048();}const z=_0x426fd8(0x121),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x4f5c1e,_0x3b8dfc,_0x404569,_0x34deb2)=>{const _0x291939=_0x426fd8;for(var _0x2855e8=_0x34deb2>0x1?void 0x0:_0x34deb2?k(_0x3b8dfc,_0x404569):_0x3b8dfc,_0x293ba3=_0x4f5c1e[_0x291939(0x11d)]-0x1,_0x1b68f3;_0x293ba3>=0x0;_0x293ba3--)(_0x1b68f3=_0x4f5c1e[_0x293ba3])&&(_0x2855e8=_0x1b68f3(_0x2855e8)||_0x2855e8);return _0x2855e8;},b=(_0x2d815e,_0x8cbb2)=>(_0x21a46c,_0x421439)=>_0x8cbb2(_0x21a46c,_0x421439,_0x2d815e);function X(_0x132ece,_0xa54595){const _0x1aa235=_0x426fd8,_0x1dca2c=_0x132ece[_0x1aa235(0x157)][0x0];return{..._0xa54595,'id':_0x1dca2c['replyId'],'resolved':_0x132ece[_0x1aa235(0x17a)]===0x1,'dT':y(_0x1dca2c[_0x1aa235(0x14f)]),'personId':_0x1dca2c[_0x1aa235(0x132)],'threadId':_0x1dca2c[_0x1aa235(0x173)]};}function ee(_0x46f5cd,_0x12f5d2,_0x2c5f2e){const _0xeedfeb=_0x426fd8;var _0x5a1c95,_0x4d1b5e;if(((_0x4d1b5e=(_0x5a1c95=_0x46f5cd==null?void 0x0:_0x46f5cd[_0xeedfeb(0x157)])==null?void 0x0:_0x5a1c95[_0xeedfeb(0x11d)])!=null?_0x4d1b5e:0x0)>0x0){const _0x465a71=(_0x1b385a,_0x33799c)=>({'id':_0x1b385a['replyId'],'threadId':_0x1b385a[_0xeedfeb(0x173)],'dT':y(_0x1b385a[_0xeedfeb(0x14f)]),'personId':_0x1b385a[_0xeedfeb(0x132)],'resolved':_0x46f5cd[_0xeedfeb(0x17a)]===I[_0xeedfeb(0x171)],'unitId':_0x12f5d2,'subUnitId':_0x2c5f2e,'text':JSON[_0xeedfeb(0x130)](_0x1b385a['content']),'parentId':_0x33799c}),_0x19e897=_0x465a71(_0x46f5cd[_0xeedfeb(0x157)][0x0]);return{..._0x19e897,'children':_0x46f5cd[_0xeedfeb(0x157)][_0xeedfeb(0x176)](0x1)[_0xeedfeb(0x146)](_0xe877b9=>_0x465a71(_0xe877b9,_0x19e897['id']))};}return null;}let S=class{constructor(_0x582d0c,_0x3ec22f,_0x38ac2){const _0x55bca0=_0x426fd8;this['_httpService']=_0x582d0c,this[_0x55bca0(0x15f)]=_0x3ec22f,this[_0x55bca0(0x135)]=_0x38ac2;}async['addComment'](_0x16f9fd){const _0x281596=_0x426fd8;var _0x17661d,_0x48e716;const {parentId:_0x13a13d,unitId:_0xd2379a,text:_0x28fbbf,threadId:_0x2eecf1}=_0x16f9fd,_0x103558=(_0x48e716=(_0x17661d=_0x28fbbf['customRanges'])==null?void 0x0:_0x17661d[_0x281596(0x11a)](_0x16bbf1=>_0x16bbf1[_0x281596(0x14a)]===_0x23dce0['COMMENT'])[_0x281596(0x146)](_0x5ad427=>_0x5ad427[_0x281596(0x11f)]))!=null?_0x48e716:[],_0x39d9cd=JSON[_0x281596(0x131)](_0x28fbbf),_0x5a320c=(await this[_0x281596(0x135)][_0x281596(0x17e)](_0xd2379a))[_0x281596(0x145)]();if(_0x13a13d){const _0x52122c={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558,'threadId':_0x2eecf1},_0x4dab53=(await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x169),{'body':_0x52122c}))[_0x281596(0x12f)][_0x281596(0x142)];return{..._0x16f9fd,'id':_0x4dab53[_0x281596(0x148)],'dT':_0xc6ba85(+_0x4dab53[_0x281596(0x14f)])[_0x281596(0x15c)](_0x281596(0x141)),'personId':_0x4dab53['userId']};}else{const _0x50cb7f={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558},_0x26c423=await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x12d),{'body':_0x50cb7f});return X(_0x26c423[_0x281596(0x12f)][_0x281596(0x156)],_0x16f9fd);}}async[_0x426fd8(0x117)](_0x289351){const _0x54a752=_0x426fd8;var _0x488b00,_0x4d462f;const {text:_0x2066ac,unitId:_0x3ec9cd}=_0x289351,_0x5ae0c3=(_0x4d462f=(_0x488b00=_0x2066ac['customRanges'])==null?void 0x0:_0x488b00[_0x54a752(0x11a)](_0x1243bb=>_0x1243bb[_0x54a752(0x14a)]===_0x23dce0[_0x54a752(0x175)])['map'](_0x315824=>_0x315824['rangeId']))!=null?_0x4d462f:[],_0x5068be=JSON[_0x54a752(0x131)](_0x2066ac),_0x3b1c54=_0x289351[_0x54a752(0x173)],_0x29bd71=_0x289351['id'],_0x4270a4={'memberId':(await this[_0x54a752(0x135)][_0x54a752(0x17e)](_0x3ec9cd))[_0x54a752(0x145)](),'unitId':_0x3ec9cd,'threadId':_0x3b1c54,'mention':_0x5ae0c3,'content':_0x5068be,'replyId':_0x29bd71},_0x407fe5=await this[_0x54a752(0x120)][_0x54a752(0x14e)](_0x54a752(0x13c)+_0x3ec9cd+_0x54a752(0x178),{'body':_0x4270a4});return!_0x407fe5[_0x54a752(0x12f)]['error']||_0x407fe5[_0x54a752(0x12f)][_0x54a752(0x16e)][_0x54a752(0x13f)]===0x1;}async['resolveComment'](_0x3b3c5d){const _0x1591d1=_0x426fd8,{unitId:_0x5dff18}=_0x3b3c5d,_0x54d35d=_0x3b3c5d['threadId'],_0xddd362={'memberId':this[_0x1591d1(0x15f)][_0x1591d1(0x119)]()[_0x1591d1(0x14c)],'unitId':_0x5dff18,'threadId':_0x54d35d,'solved':_0x3b3c5d[_0x1591d1(0x12c)]?I[_0x1591d1(0x171)]:I[_0x1591d1(0x153)]},_0x19b2bd=await this[_0x1591d1(0x120)][_0x1591d1(0x14e)]('/universer-api/comment/unit/'+_0x5dff18+_0x1591d1(0x16f),{'body':_0xddd362});return!_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)]||_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)][_0x1591d1(0x13f)]===0x1;}async[_0x426fd8(0x143)](_0x489852,_0x4def35,_0x11d4f9,_0x5bf2d7){const _0x35fc3d=_0x426fd8,_0x562f53={'memberId':(await this[_0x35fc3d(0x135)][_0x35fc3d(0x17e)](_0x489852))[_0x35fc3d(0x145)](),'threadId':_0x11d4f9,'replyId':_0x5bf2d7,'unitId':_0x489852},_0x320754=await this[_0x35fc3d(0x120)][_0x35fc3d(0x14e)](_0x35fc3d(0x13c)+_0x489852+_0x35fc3d(0x167),{'body':_0x562f53});return!_0x320754[_0x35fc3d(0x12f)]['error']||_0x320754[_0x35fc3d(0x12f)][_0x35fc3d(0x16e)]['code']===0x1;}async['listComments'](_0x2891af,_0x316a19,_0x219d18){const _0x149cc7=_0x426fd8,_0x2b59a5={'unitId':_0x2891af,'threadId':_0x219d18},_0x153a08=await this['_httpService'][_0x149cc7(0x14e)](_0x149cc7(0x13c)+_0x2891af+'/list',{'body':_0x2b59a5}),_0x478b45=_0x219d18[_0x149cc7(0x146)](_0x2035a3=>ee(_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x126)][_0x2035a3],_0x2891af,_0x316a19))['filter'](Boolean);return Object[_0x149cc7(0x15d)](_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x16a)])[_0x149cc7(0x15a)](_0x264ecd=>{const _0x1a0132=_0x149cc7;this[_0x1a0132(0x15f)][_0x1a0132(0x11c)](_0x264ecd);}),_0x478b45;}[_0x426fd8(0x124)](_0x18d8a2){const _0x433338=_0x426fd8;return{'id':_0x18d8a2['id'],'threadId':_0x18d8a2['threadId'],'ref':_0x18d8a2[_0x433338(0x138)]};}};S=Q([b(0x0,_0x4ee146(_0x28ab9a)),b(0x1,_0x4ee146(_0x44cabc)),b(0x2,_0x4ee146(_0x44c5cb))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x26f758,_0x106bb3,_0x45ea78,_0x2a3bfd)=>{const _0x118a55=_0x426fd8;for(var _0xf2e6cb=_0x2a3bfd>0x1?void 0x0:_0x2a3bfd?re(_0x106bb3,_0x45ea78):_0x106bb3,_0x3534cc=_0x26f758[_0x118a55(0x11d)]-0x1,_0x433e19;_0x3534cc>=0x0;_0x3534cc--)(_0x433e19=_0x26f758[_0x3534cc])&&(_0xf2e6cb=_0x433e19(_0xf2e6cb)||_0xf2e6cb);return _0xf2e6cb;},M=(_0x4e72bb,_0x1d0aa4)=>(_0x92c24d,_0x54b819)=>_0x1d0aa4(_0x92c24d,_0x54b819,_0x4e72bb);let f=class extends _0x1cb851{constructor(_0x534207,_0x3a2173){const _0x2de5a7=_0x426fd8;super(),this['_threadCommentDataSourceService']=_0x534207,this[_0x2de5a7(0x13d)]=_0x3a2173,this[_0x2de5a7(0x13e)]();}[_0x426fd8(0x13e)](){const _0x39a406=_0x426fd8;this[_0x39a406(0x165)][_0x39a406(0x137)]=this['_threadCommentDataSource'],this[_0x39a406(0x165)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4fbd0e),M(0x1,_0x4ee146(S))],f);var se=Object[_0x426fd8(0x144)],oe=Object[_0x426fd8(0x177)],ne=(_0x284618,_0xebc38f,_0x4ee5f9)=>_0xebc38f in _0x284618?se(_0x284618,_0xebc38f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5f9}):_0x284618[_0xebc38f]=_0x4ee5f9,ie=(_0x56b21e,_0x208850,_0x3fb898,_0x16d072)=>{for(var _0x2abac9=_0x16d072>0x1?void 0x0:_0x16d072?oe(_0x208850,_0x3fb898):_0x208850,_0x12b79f=_0x56b21e['length']-0x1,_0x51fb89;_0x12b79f>=0x0;_0x12b79f--)(_0x51fb89=_0x56b21e[_0x12b79f])&&(_0x2abac9=_0x51fb89(_0x2abac9)||_0x2abac9);return _0x2abac9;},N=(_0x23b47c,_0x4c5e7f)=>(_0x58ab05,_0x4c0313)=>_0x4c5e7f(_0x58ab05,_0x4c0313,_0x23b47c),$=(_0x4fdf5c,_0x18f4f6,_0x50dd21)=>ne(_0x4fdf5c,typeof _0x18f4f6!=_0x426fd8(0x170)?_0x18f4f6+'':_0x18f4f6,_0x50dd21);let g=class extends _0x42e39d{constructor(_0x4ce1c4=O,_0x55e41,_0x2666fe){const _0x5194c5=_0x426fd8;super(),this[_0x5194c5(0x12a)]=_0x4ce1c4,this['_injector']=_0x55e41,this[_0x5194c5(0x163)]=_0x2666fe;const {..._0x103b86}=_0x2d8dad({},O,this[_0x5194c5(0x12a)]);this[_0x5194c5(0x163)][_0x5194c5(0x13a)](z,_0x103b86);}[_0x426fd8(0x147)](){const _0x55db13=_0x426fd8;[[S],[f],[_]][_0x55db13(0x15a)](_0x21b936=>{const _0x18d1f0=_0x55db13;this[_0x18d1f0(0x150)][_0x18d1f0(0x15b)](_0x21b936);});}['onReady'](){const _0x588f58=_0x426fd8;this[_0x588f58(0x150)][_0x588f58(0x140)](f),this[_0x588f58(0x150)][_0x588f58(0x140)](_);}};$(g,'pluginName',W),$(g,_0x426fd8(0x159),_0x29b4b7[_0x426fd8(0x172)]),g=ie([_0x537f52(_0x42ba3c,_0x39432b,_0x3618e3),N(0x1,_0x4ee146(_0x52b0e2)),N(0x2,_0x4f31e8)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x52f8d2,_0x5991d8){const _0x45c27f=_0x2735,_0x4c8dec=_0x52f8d2();while(!![]){try{const _0x3a94fe=-parseInt(_0x45c27f(0x113))/0x1*(parseInt(_0x45c27f(0x162))/0x2)+parseInt(_0x45c27f(0x13f))/0x3+-parseInt(_0x45c27f(0x163))/0x4*(parseInt(_0x45c27f(0x104))/0x5)+-parseInt(_0x45c27f(0x110))/0x6+parseInt(_0x45c27f(0x120))/0x7*(parseInt(_0x45c27f(0x139))/0x8)+parseInt(_0x45c27f(0x102))/0x9*(parseInt(_0x45c27f(0x10c))/0xa)+-parseInt(_0x45c27f(0x180))/0xb*(-parseInt(_0x45c27f(0x146))/0xc);if(_0x3a94fe===_0x5991d8)break;else _0x4c8dec['push'](_0x4c8dec['shift']());}catch(_0x49af04){_0x4c8dec['push'](_0x4c8dec['shift']());}}}(_0x427f,0x75f29),function(_0x3ef105,_0x3d68ef){const _0x771f8=_0x2735;typeof exports==_0x771f8(0x111)&&typeof module<'u'?_0x3d68ef(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x771f8(0x177)&&define[_0x771f8(0x156)]?define([_0x771f8(0x129),_0x771f8(0x166),_0x771f8(0x170),_0x771f8(0x153),'@univerjs/thread-comment-ui',_0x771f8(0x101),_0x771f8(0x11f),_0x771f8(0x10e)],_0x3d68ef):(_0x3ef105=typeof globalThis<'u'?globalThis:_0x3ef105||self,_0x3d68ef(_0x3ef105[_0x771f8(0x141)]={},_0x3ef105[_0x771f8(0x184)],_0x3ef105[_0x771f8(0x116)],_0x3ef105[_0x771f8(0x148)],_0x3ef105[_0x771f8(0x157)],_0x3ef105['UniverThreadComment'],_0x3ef105[_0x771f8(0x11f)],_0x3ef105['UniverNetwork']));}(this,function(_0xd351bf,_0x53e126,_0x18ed6d,_0x589bd6,_0x43420c,_0x2c5fc6,_0x17b32,_0x379566){'use strict';const _0x7e58e1=_0x2735;const _0x394a1d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x53e546=(_0x493cb3=>(_0x493cb3[_0x493cb3['OpenOrReOpen']=0x0]=_0x7e58e1(0x158),_0x493cb3[_0x493cb3[_0x7e58e1(0x118)]=0x1]=_0x7e58e1(0x118),_0x493cb3[_0x493cb3[_0x7e58e1(0xff)]=-0x1]=_0x7e58e1(0xff),_0x493cb3))(_0x53e546||{}),_0x382a5c=(_0x21e2bf=>(_0x21e2bf[_0x21e2bf[_0x7e58e1(0x149)]=0x0]=_0x7e58e1(0x149),_0x21e2bf[_0x21e2bf['Add']=0x1]=_0x7e58e1(0x179),_0x21e2bf[_0x21e2bf[_0x7e58e1(0x105)]=0x2]=_0x7e58e1(0x105),_0x21e2bf[_0x21e2bf['Edit']=0x3]=_0x7e58e1(0x14f),_0x21e2bf[_0x21e2bf[_0x7e58e1(0x140)]=0x4]=_0x7e58e1(0x140),_0x21e2bf[_0x21e2bf['Solve']=0x5]='Solve',_0x21e2bf[_0x21e2bf[_0x7e58e1(0xff)]=-0x1]=_0x7e58e1(0xff),_0x21e2bf))(_0x382a5c||{});const _0x2ff336=_0x126ed4=>_0x589bd6[_0x7e58e1(0x16a)](new Date(+_0x126ed4))['format'](_0x7e58e1(0x127)),_0x14262c=async(_0x4af739,_0x4a6e93)=>{const _0x416a2c=_0x7e58e1,_0x1a88fe=_0x4af739[_0x416a2c(0x16b)](_0x589bd6[_0x416a2c(0x17d)]),_0x5d5982=_0x4af739[_0x416a2c(0x16b)](_0x379566[_0x416a2c(0x147)]);_0x4a6e93[_0x416a2c(0x17a)](_0x16b8a0=>{const _0x1dc7d1=_0x416a2c;_0x1a88fe[_0x1dc7d1(0x178)](_0x16b8a0)&&_0x4a6e93['delete'](_0x16b8a0);}),_0x4a6e93[_0x416a2c(0x150)]&&(await _0x5d5982[_0x416a2c(0x16b)](_0x416a2c(0x109),{'params':{'userIDs':[..._0x4a6e93]}}))[_0x416a2c(0x174)][_0x416a2c(0x16e)][_0x416a2c(0x17a)](_0x257404=>{_0x257404&&_0x1a88fe['addUser'](_0x257404);});};var _0x180d40=Object[_0x7e58e1(0x121)],_0x135996=(_0x566ace,_0x467e58,_0x1c765a,_0x2696d3)=>{const _0x823d15=_0x7e58e1;for(var _0xa74f74=_0x2696d3>0x1?void 0x0:_0x2696d3?_0x180d40(_0x467e58,_0x1c765a):_0x467e58,_0x3d71c4=_0x566ace[_0x823d15(0x132)]-0x1,_0x2d5911;_0x3d71c4>=0x0;_0x3d71c4--)(_0x2d5911=_0x566ace[_0x3d71c4])&&(_0xa74f74=_0x2d5911(_0xa74f74)||_0xa74f74);return _0xa74f74;},_0x293a61=(_0x5768d2,_0x515345)=>(_0x363ead,_0x19b59a)=>_0x515345(_0x363ead,_0x19b59a,_0x5768d2);let _0x29d642=class extends _0x589bd6['Disposable']{constructor(_0x5bd120,_0x259c4c,_0x4a4a0e,_0x206c96){const _0xce1ad1=_0x7e58e1;super(),this['_commentService']=_0x5bd120,this[_0xce1ad1(0x152)]=_0x259c4c,this['_userService']=_0x4a4a0e,this['_injector']=_0x206c96,this[_0xce1ad1(0x13d)](),this['_initUserSync']();}[_0x7e58e1(0x126)](){const _0x1a9cfc=_0x7e58e1;this[_0x1a9cfc(0x14e)](this[_0x1a9cfc(0x152)]['commentUpdate$']['pipe'](_0x17b32['bufferTime'](0x10))[_0x1a9cfc(0x183)](_0x366954=>{const _0xbb9ade=_0x1a9cfc,_0x159e19=new Set();_0x366954['forEach'](_0x240ef2=>{const _0x5ece21=_0x2735;switch(_0x240ef2['type']){case _0x5ece21(0x145):{const _0x38dca2=_0x240ef2['payload'][_0x5ece21(0x151)];_0x159e19[_0x5ece21(0x145)](_0x38dca2);break;}}}),_0x14262c(this[_0xbb9ade(0x172)],_0x159e19);}));}[_0x7e58e1(0x13d)](){const _0x419de0=_0x7e58e1;this[_0x419de0(0x14e)](this[_0x419de0(0x169)][_0x419de0(0x15e)][_0x419de0(0x183)](async _0x4b652a=>{const _0xf5feb3=_0x419de0;var _0x4de6de,_0x113e95,_0x3b21b5,_0x967878;const _0x175e9b=(_0x4de6de=this[_0xf5feb3(0x152)][_0xf5feb3(0x131)](_0x4b652a[_0xf5feb3(0x10f)])['find'](_0x19683a=>_0x19683a[_0xf5feb3(0x130)]===_0x4b652a['threadId']))==null?void 0x0:_0x4de6de[_0xf5feb3(0x15c)];if(!_0x175e9b)return;const {unitId:_0x53e8a1,subUnitId:_0x5d0652}=_0x175e9b;switch(_0x4b652a['user']&&this[_0xf5feb3(0x186)][_0xf5feb3(0x15b)](_0x4b652a[_0xf5feb3(0x17e)]),_0x4b652a[_0xf5feb3(0x16c)]){case _0x382a5c[_0xf5feb3(0x179)]:break;case _0x382a5c['Reply']:{this['_threadCommentModel']['addComment'](_0x53e8a1,_0x5d0652,{'unitId':_0x53e8a1,'subUnitId':_0x5d0652,'ref':'','id':_0x4b652a[_0xf5feb3(0x10a)],'dT':_0x2ff336(+_0x4b652a[_0xf5feb3(0x160)]),'threadId':_0x4b652a[_0xf5feb3(0x130)],'personId':(_0x3b21b5=(_0x113e95=_0x4b652a[_0xf5feb3(0x17e)])==null?void 0x0:_0x113e95[_0xf5feb3(0x115)])!=null?_0x3b21b5:_0x4b652a[_0xf5feb3(0x11a)],'text':JSON['parse'](_0x4b652a['content']),'parentId':_0x175e9b['id']});break;}case _0x382a5c[_0xf5feb3(0x140)]:{const _0x494dc4=this[_0xf5feb3(0x152)][_0xf5feb3(0x12e)](_0x53e8a1,_0x5d0652,_0x4b652a[_0xf5feb3(0x10a)]);_0x494dc4&&_0x494dc4['parentId']&&this['_threadCommentModel']['deleteComment'](_0x53e8a1,_0x5d0652,_0x4b652a[_0xf5feb3(0x10a)]);break;}case _0x382a5c[_0xf5feb3(0x14f)]:{this[_0xf5feb3(0x152)][_0xf5feb3(0x17c)](_0x53e8a1,_0x5d0652,{'commentId':_0x4b652a[_0xf5feb3(0x10a)],'text':JSON[_0xf5feb3(0x117)](_0x4b652a[_0xf5feb3(0x12a)])});break;}case _0x382a5c['Solve']:{const _0x2f7095=(_0x967878=this[_0xf5feb3(0x152)][_0xf5feb3(0x131)](_0x4b652a[_0xf5feb3(0x10f)])[_0xf5feb3(0x167)](_0x18dfca=>_0x18dfca[_0xf5feb3(0x130)]===_0x4b652a[_0xf5feb3(0x130)]))==null?void 0x0:_0x967878['root'];_0x2f7095&&this[_0xf5feb3(0x152)][_0xf5feb3(0x10b)](_0x53e8a1,_0x5d0652,_0x2f7095['id'],_0x4b652a[_0xf5feb3(0x173)]===_0x53e546[_0xf5feb3(0x118)]);break;}}}));}};_0x29d642=_0x135996([_0x293a61(0x0,_0x589bd6['Inject'](_0x53e126[_0x7e58e1(0x171)])),_0x293a61(0x1,_0x589bd6[_0x7e58e1(0x11d)](_0x2c5fc6[_0x7e58e1(0x12d)])),_0x293a61(0x2,_0x589bd6[_0x7e58e1(0x11d)](_0x589bd6[_0x7e58e1(0x17d)])),_0x293a61(0x3,_0x589bd6[_0x7e58e1(0x11d)](_0x589bd6[_0x7e58e1(0x12b)]))],_0x29d642);const _0x1f8fc5=_0x7e58e1(0x108),_0x331cae={};var _0x47e9a5=Object[_0x7e58e1(0x121)],_0x4903e9=(_0x313a88,_0x4daccc,_0xbcd521,_0x216184)=>{const _0x4ec406=_0x7e58e1;for(var _0x59a948=_0x216184>0x1?void 0x0:_0x216184?_0x47e9a5(_0x4daccc,_0xbcd521):_0x4daccc,_0xa1a922=_0x313a88[_0x4ec406(0x132)]-0x1,_0x47e9fa;_0xa1a922>=0x0;_0xa1a922--)(_0x47e9fa=_0x313a88[_0xa1a922])&&(_0x59a948=_0x47e9fa(_0x59a948)||_0x59a948);return _0x59a948;},_0x42e408=(_0x38035d,_0x5de587)=>(_0x51cd49,_0x359245)=>_0x5de587(_0x51cd49,_0x359245,_0x38035d);function _0x4dbb8a(_0x5b3fb0,_0x5c32c5){const _0x4f5467=_0x7e58e1,_0x53559a=_0x5b3fb0['replies'][0x0];return{..._0x5c32c5,'id':_0x53559a[_0x4f5467(0x10a)],'resolved':_0x5b3fb0['solved']===0x1,'dT':_0x2ff336(_0x53559a['createTimestamp']),'personId':_0x53559a['userId'],'threadId':_0x53559a[_0x4f5467(0x130)]};}function _0x5601c6(_0x455437,_0x4177c9,_0x2b5c52){const _0x1b7f4f=_0x7e58e1;var _0x32f27a,_0x371cec;if(((_0x371cec=(_0x32f27a=_0x455437==null?void 0x0:_0x455437[_0x1b7f4f(0x11b)])==null?void 0x0:_0x32f27a['length'])!=null?_0x371cec:0x0)>0x0){const _0x2bf541=(_0x454f38,_0xea230d)=>({'id':_0x454f38['replyId'],'threadId':_0x454f38[_0x1b7f4f(0x130)],'dT':_0x2ff336(_0x454f38[_0x1b7f4f(0x160)]),'personId':_0x454f38[_0x1b7f4f(0x11a)],'resolved':_0x455437[_0x1b7f4f(0x173)]===_0x53e546[_0x1b7f4f(0x118)],'unitId':_0x4177c9,'subUnitId':_0x2b5c52,'text':JSON[_0x1b7f4f(0x117)](_0x454f38[_0x1b7f4f(0x12a)]),'parentId':_0xea230d}),_0x4eb158=_0x2bf541(_0x455437[_0x1b7f4f(0x11b)][0x0]);return{..._0x4eb158,'children':_0x455437[_0x1b7f4f(0x11b)][_0x1b7f4f(0x142)](0x1)[_0x1b7f4f(0x17b)](_0x397866=>_0x2bf541(_0x397866,_0x4eb158['id']))};}return null;}let _0x188784=class{constructor(_0x2032bc,_0x17b0f2,_0x1aef2e){const _0x41b1a4=_0x7e58e1;this[_0x41b1a4(0x181)]=_0x2032bc,this[_0x41b1a4(0x186)]=_0x17b0f2,this[_0x41b1a4(0xfe)]=_0x1aef2e;}async[_0x7e58e1(0x124)](_0x7051bb){const _0xa8248a=_0x7e58e1;var _0x348adf,_0x2354f3;const {parentId:_0x1bde3f,unitId:_0x24b696,text:_0x36ada8,threadId:_0x2183c0}=_0x7051bb,_0x4ef654=(_0x2354f3=(_0x348adf=_0x36ada8[_0xa8248a(0x14b)])==null?void 0x0:_0x348adf[_0xa8248a(0x135)](_0x137f8e=>_0x137f8e[_0xa8248a(0x12c)]===_0x589bd6[_0xa8248a(0x168)]['COMMENT'])[_0xa8248a(0x17b)](_0x21fe4a=>_0x21fe4a[_0xa8248a(0x13b)]))!=null?_0x2354f3:[],_0x46418f=JSON[_0xa8248a(0x15a)](_0x36ada8),_0x47eb3b=(await this[_0xa8248a(0xfe)][_0xa8248a(0x14a)](_0x24b696))[_0xa8248a(0x107)]();if(_0x1bde3f){const _0x386c45={'memberId':_0x47eb3b,'unitId':_0x24b696,'content':_0x46418f,'mention':_0x4ef654,'threadId':_0x2183c0},_0xe2e09=(await this['_httpService'][_0xa8248a(0x11c)](_0xa8248a(0x136)+_0x24b696+_0xa8248a(0x134),{'body':_0x386c45}))['body']['reply'];return{..._0x7051bb,'id':_0xe2e09['replyId'],'dT':_0x589bd6[_0xa8248a(0x16a)](+_0xe2e09[_0xa8248a(0x160)])[_0xa8248a(0x123)](_0xa8248a(0x127)),'personId':_0xe2e09[_0xa8248a(0x11a)]};}else{const _0x375c09={'memberId':_0x47eb3b,'unitId':_0x24b696,'content':_0x46418f,'mention':_0x4ef654},_0x36df04=await this[_0xa8248a(0x181)][_0xa8248a(0x11c)](_0xa8248a(0x136)+_0x24b696+_0xa8248a(0x13c),{'body':_0x375c09});return _0x4dbb8a(_0x36df04[_0xa8248a(0x174)][_0xa8248a(0x155)],_0x7051bb);}}async[_0x7e58e1(0x17c)](_0x2c5a3b){const _0x552bf9=_0x7e58e1;var _0x50c14b,_0x896621;const {text:_0xd197f,unitId:_0x563c98}=_0x2c5a3b,_0x49e9f9=(_0x896621=(_0x50c14b=_0xd197f[_0x552bf9(0x14b)])==null?void 0x0:_0x50c14b['filter'](_0xefc732=>_0xefc732[_0x552bf9(0x12c)]===_0x589bd6[_0x552bf9(0x168)][_0x552bf9(0x175)])[_0x552bf9(0x17b)](_0x33a825=>_0x33a825[_0x552bf9(0x13b)]))!=null?_0x896621:[],_0x6b1b12=JSON[_0x552bf9(0x15a)](_0xd197f),_0x44b0a9=_0x2c5a3b[_0x552bf9(0x130)],_0x502a3b=_0x2c5a3b['id'],_0x3501db={'memberId':(await this[_0x552bf9(0xfe)][_0x552bf9(0x14a)](_0x563c98))[_0x552bf9(0x107)](),'unitId':_0x563c98,'threadId':_0x44b0a9,'mention':_0x49e9f9,'content':_0x6b1b12,'replyId':_0x502a3b},_0x3efd1f=await this[_0x552bf9(0x181)][_0x552bf9(0x11c)]('/universer-api/comment/unit/'+_0x563c98+_0x552bf9(0x13e),{'body':_0x3501db});return!_0x3efd1f[_0x552bf9(0x174)]['error']||_0x3efd1f['body'][_0x552bf9(0x165)][_0x552bf9(0x144)]===0x1;}async[_0x7e58e1(0x10b)](_0x32e883){const _0x1ad233=_0x7e58e1,{unitId:_0x37385e}=_0x32e883,_0x3996d6=_0x32e883[_0x1ad233(0x130)],_0x156a9f={'memberId':this[_0x1ad233(0x186)][_0x1ad233(0x14d)]()[_0x1ad233(0x115)],'unitId':_0x37385e,'threadId':_0x3996d6,'solved':_0x32e883[_0x1ad233(0x137)]?_0x53e546[_0x1ad233(0x118)]:_0x53e546[_0x1ad233(0x158)]},_0x4e7f99=await this[_0x1ad233(0x181)][_0x1ad233(0x11c)](_0x1ad233(0x136)+_0x37385e+'/solved',{'body':_0x156a9f});return!_0x4e7f99['body'][_0x1ad233(0x165)]||_0x4e7f99['body'][_0x1ad233(0x165)][_0x1ad233(0x144)]===0x1;}async[_0x7e58e1(0x176)](_0x3305fb,_0x522b28,_0x300712,_0x556344){const _0xd496f5=_0x7e58e1,_0x154656={'memberId':(await this[_0xd496f5(0xfe)]['requireSession'](_0x3305fb))['getMemberID'](),'threadId':_0x300712,'replyId':_0x556344,'unitId':_0x3305fb},_0x47df43=await this[_0xd496f5(0x181)][_0xd496f5(0x11c)](_0xd496f5(0x136)+_0x3305fb+_0xd496f5(0x103),{'body':_0x154656});return!_0x47df43[_0xd496f5(0x174)][_0xd496f5(0x165)]||_0x47df43[_0xd496f5(0x174)][_0xd496f5(0x165)]['code']===0x1;}async[_0x7e58e1(0x12f)](_0x3ea542,_0x5273e6,_0x40158b){const _0x3f1477=_0x7e58e1,_0x45e732={'unitId':_0x3ea542,'threadId':_0x40158b},_0x529e9a=await this[_0x3f1477(0x181)]['post'](_0x3f1477(0x136)+_0x3ea542+_0x3f1477(0x14c),{'body':_0x45e732}),_0x44013e=_0x40158b[_0x3f1477(0x17b)](_0xb6b949=>_0x5601c6(_0x529e9a[_0x3f1477(0x174)][_0x3f1477(0x100)][_0xb6b949],_0x3ea542,_0x5273e6))[_0x3f1477(0x135)](Boolean);return Object[_0x3f1477(0x15f)](_0x529e9a[_0x3f1477(0x174)]['users'])[_0x3f1477(0x17a)](_0x239657=>{const _0x276828=_0x3f1477;this[_0x276828(0x186)][_0x276828(0x15b)](_0x239657);}),_0x44013e;}['saveCommentToSnapshot'](_0x59a6bd){const _0x420ced=_0x7e58e1;return{'id':_0x59a6bd['id'],'threadId':_0x59a6bd[_0x420ced(0x130)],'ref':_0x59a6bd['ref']};}};_0x188784=_0x4903e9([_0x42e408(0x0,_0x589bd6[_0x7e58e1(0x11d)](_0x379566[_0x7e58e1(0x147)])),_0x42e408(0x1,_0x589bd6['Inject'](_0x589bd6[_0x7e58e1(0x17d)])),_0x42e408(0x2,_0x589bd6[_0x7e58e1(0x11d)](_0x53e126[_0x7e58e1(0x161)]))],_0x188784);var _0x20869e=Object[_0x7e58e1(0x121)],_0x24b415=(_0x213bf5,_0x3817d8,_0x30ec8c,_0x358a31)=>{const _0x5801c5=_0x7e58e1;for(var _0xe7e6e8=_0x358a31>0x1?void 0x0:_0x358a31?_0x20869e(_0x3817d8,_0x30ec8c):_0x3817d8,_0x1e9d58=_0x213bf5[_0x5801c5(0x132)]-0x1,_0x2d6563;_0x1e9d58>=0x0;_0x1e9d58--)(_0x2d6563=_0x213bf5[_0x1e9d58])&&(_0xe7e6e8=_0x2d6563(_0xe7e6e8)||_0xe7e6e8);return _0xe7e6e8;},_0x3c665e=(_0x1d7f85,_0x4a90c1)=>(_0x2c70dc,_0x51194d)=>_0x4a90c1(_0x2c70dc,_0x51194d,_0x1d7f85);let _0xcfe479=class extends _0x589bd6[_0x7e58e1(0x112)]{constructor(_0x20e389,_0x3e81b8){const _0xb3f5f7=_0x7e58e1;super(),this[_0xb3f5f7(0x185)]=_0x20e389,this[_0xb3f5f7(0x114)]=_0x3e81b8,this[_0xb3f5f7(0x128)]();}['_initDataSource'](){const _0x3c6004=_0x7e58e1;this['_threadCommentDataSourceService'][_0x3c6004(0x143)]=this[_0x3c6004(0x114)],this['_threadCommentDataSourceService'][_0x3c6004(0x122)]=!0x1;}};_0xcfe479=_0x24b415([_0x3c665e(0x0,_0x2c5fc6[_0x7e58e1(0x154)]),_0x3c665e(0x1,_0x589bd6[_0x7e58e1(0x11d)](_0x188784))],_0xcfe479);var _0x5c7ae0=Object[_0x7e58e1(0x182)],_0x352183=Object[_0x7e58e1(0x121)],_0x553c18=(_0x573279,_0x46dc0b,_0x6b39e4)=>_0x46dc0b in _0x573279?_0x5c7ae0(_0x573279,_0x46dc0b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6b39e4}):_0x573279[_0x46dc0b]=_0x6b39e4,_0x5de92e=(_0x2dde9a,_0x364271,_0x4dd2a3,_0x327238)=>{const _0x4a2295=_0x7e58e1;for(var _0x114844=_0x327238>0x1?void 0x0:_0x327238?_0x352183(_0x364271,_0x4dd2a3):_0x364271,_0x14f92d=_0x2dde9a[_0x4a2295(0x132)]-0x1,_0x34ff11;_0x14f92d>=0x0;_0x14f92d--)(_0x34ff11=_0x2dde9a[_0x14f92d])&&(_0x114844=_0x34ff11(_0x114844)||_0x114844);return _0x114844;},_0x35e8f9=(_0x13e6a4,_0x53774a)=>(_0x1cdd7d,_0x180cdf)=>_0x53774a(_0x1cdd7d,_0x180cdf,_0x13e6a4),_0x4fb9b6=(_0xbfda54,_0x52c294,_0x40b4dd)=>_0x553c18(_0xbfda54,typeof _0x52c294!=_0x7e58e1(0x16d)?_0x52c294+'':_0x52c294,_0x40b4dd);_0xd351bf[_0x7e58e1(0x119)]=class extends _0x589bd6['Plugin']{constructor(_0x3cb8c8=_0x331cae,_0x5867d2,_0x6f08f1){const _0x32fa23=_0x7e58e1;super(),this[_0x32fa23(0x11e)]=_0x3cb8c8,this[_0x32fa23(0x172)]=_0x5867d2,this['_configService']=_0x6f08f1;const {..._0x146c75}=_0x589bd6[_0x32fa23(0x16f)]({},_0x331cae,this['_config']);this['_configService'][_0x32fa23(0x10d)](_0x1f8fc5,_0x146c75);}[_0x7e58e1(0x138)](){const _0x34080a=_0x7e58e1;[[_0x188784],[_0xcfe479],[_0x29d642]][_0x34080a(0x17a)](_0x5a147b=>{const _0x5c91fb=_0x34080a;this[_0x5c91fb(0x172)][_0x5c91fb(0x145)](_0x5a147b);});}[_0x7e58e1(0x164)](){const _0x211d37=_0x7e58e1;this[_0x211d37(0x172)]['get'](_0xcfe479),this[_0x211d37(0x172)][_0x211d37(0x16b)](_0x29d642);}},_0x4fb9b6(_0xd351bf[_0x7e58e1(0x119)],'pluginName',_0x394a1d),_0x4fb9b6(_0xd351bf[_0x7e58e1(0x119)],_0x7e58e1(0x16c),_0x589bd6['UniverInstanceType'][_0x7e58e1(0x15d)]),_0xd351bf[_0x7e58e1(0x119)]=_0x5de92e([_0x589bd6[_0x7e58e1(0x159)](_0x43420c[_0x7e58e1(0x13a)],_0x53e126[_0x7e58e1(0x125)],_0x18ed6d['UniverLicensePlugin']),_0x35e8f9(0x1,_0x589bd6[_0x7e58e1(0x11d)](_0x589bd6[_0x7e58e1(0x12b)])),_0x35e8f9(0x2,_0x589bd6[_0x7e58e1(0x106)])],_0xd351bf['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0xd351bf,Symbol[_0x7e58e1(0x133)],{'value':_0x7e58e1(0x17f)});}));function _0x2735(_0x53fa91,_0x37585a){const _0x427fd6=_0x427f();return _0x2735=function(_0x273592,_0x1d7e3c){_0x273592=_0x273592-0xfe;let _0x5a1cfb=_0x427fd6[_0x273592];return _0x5a1cfb;},_0x2735(_0x53fa91,_0x37585a);}function _0x427f(){const _0x59ba4b=['function','getUser','Add','forEach','map','updateComment','UserManagerService','user','Module','520718FzDlOp','_httpService','defineProperty','subscribe','UniverProCollaborationClient','_threadCommentDataSourceService','_userService','_sessionService','UNRECOGNIZED','comments','@univerjs/thread-comment','9wPklLJ','/delete','285uldwCr','Reply','IConfigService','getMemberID','thread-comment-data-source.config','/universer-api/user/list','replyId','resolveComment','3086730MxUVbS','setConfig','@univerjs/network','unitId','2275614AjydPE','object','Disposable','4YeJmnR','_threadCommentDataSource','userID','UniverProLicense','parse','Solved','UniverThreadCommentDataSourcePlugin','userId','replies','post','Inject','_config','rxjs','70umCGkx','getOwnPropertyDescriptor','syncUpdateMutationToColla','format','addComment','UniverCollaborationClientPlugin','_initUserSync','YYYY/MM/DD\x20HH:mm','_initDataSource','exports','content','Injector','rangeType','ThreadCommentModel','getComment','listComments','threadId','getUnit','length','toStringTag','/reply','filter','/universer-api/comment/unit/','resolved','onStarting','27344JhTlDx','UniverThreadCommentUIPlugin','rangeId','/add','_init','/edit','1555320TlIPDP','Delete','UniverProThreadCommentDatasource','slice','dataSource','code','add','180sSmjUI','HTTPService','UniverCore','Unknown','requireSession','customRanges','/list','getCurrentUser','disposeWithMe','Edit','size','personId','_threadCommentModel','@univerjs/core','IThreadCommentDataSourceService','comment','amd','UniverThreadCommentUi','OpenOrReOpen','DependentOn','stringify','addUser','root','UNIVER_UNKNOWN','commentUpdate$','values','createTimestamp','CollaborationSessionService','2202XGdIqR','49444ItWhnu','onReady','error','@univerjs-pro/collaboration-client','find','CustomRangeType','_commentService','dayjs','get','type','symbol','users','merge','@univerjs-pro/license','CommentService','_injector','solved','body','COMMENT','deleteComment'];_0x427f=function(){return _0x59ba4b;};return _0x427f();}
|
|
1
|
+
function _0x32fd(_0x3a0e1b,_0x551dae){const _0x492405=_0x4924();return _0x32fd=function(_0x32fd03,_0x5df114){_0x32fd03=_0x32fd03-0x14e;let _0x525d4d=_0x492405[_0x32fd03];return _0x525d4d;},_0x32fd(_0x3a0e1b,_0x551dae);}function _0x4924(){const _0xd22d5f=['reply','UniverProCollaborationClient','dayjs','size','comments','DependentOn','/reply','users','length','bufferTime','addUser','exports','amd','onStarting','find','body','function','root','customRanges','_config','_injector','6wHUsqB','threadId','_threadCommentDataSourceService','/list','_threadCommentModel','rangeType','CustomRangeType','_threadCommentDataSource','deleteComment','Plugin','createTimestamp','CollaborationSessionService','disposeWithMe','updateComment','_initUserSync','UniverThreadComment','UserManagerService','@univerjs-pro/collaboration-client','6183470kWsHYh','userID','userId','user','replies','IThreadCommentDataSourceService','parentId','Reply','5161482zhMKHK','Solve','@univerjs/core','2847990xtgIyW','308bZnmBF','HTTPService','/universer-api/comment/unit/','getUser','UniverThreadCommentUIPlugin','_userService','Disposable','forEach','_configService','resolveComment','object','UNIVER_UNKNOWN','solved','filter','type','UNRECOGNIZED','Solved','format','listComments','symbol','personId','content','_commentService','1403908MJXkbh','Unknown','add','code','UniverCore','Add','UniverNetwork','getOwnPropertyDescriptor','slice','Delete','getCurrentUser','COMMENT','getComment','IConfigService','ThreadCommentModel','_init','resolved','1342954YwIytH','payload','UniverInstanceType','defineProperty','ref','saveCommentToSnapshot','map','32104vGcIFS','@univerjs/network','OpenOrReOpen','setConfig','comment','pluginName','subscribe','requireSession','UniverThreadCommentUi','getUnit','getMemberID','UniverProLicense','_sessionService','delete','Edit','parse','get','Module','values','@univerjs/thread-comment','replyId','/add','post','3103732zgZMiD','error','addComment','syncUpdateMutationToColla','UniverCollaborationClientPlugin','stringify','toStringTag','CommentService','_httpService','Inject','UniverThreadCommentDataSourcePlugin','30eZCgZM','Injector'];_0x4924=function(){return _0xd22d5f;};return _0x4924();}(function(_0x1eb2a4,_0x30563a){const _0x56acb9=_0x32fd,_0xfd386c=_0x1eb2a4();while(!![]){try{const _0x3cb0fb=parseInt(_0x56acb9(0x1d2))/0x1+-parseInt(_0x56acb9(0x1c1))/0x2+-parseInt(_0x56acb9(0x1a9))/0x3+parseInt(_0x56acb9(0x16a))/0x4+-parseInt(_0x56acb9(0x19e))/0x5*(parseInt(_0x56acb9(0x18c))/0x6)+-parseInt(_0x56acb9(0x1aa))/0x7*(parseInt(_0x56acb9(0x153))/0x8)+-parseInt(_0x56acb9(0x1a6))/0x9*(-parseInt(_0x56acb9(0x175))/0xa);if(_0x3cb0fb===_0x30563a)break;else _0xfd386c['push'](_0xfd386c['shift']());}catch(_0x5a4264){_0xfd386c['push'](_0xfd386c['shift']());}}}(_0x4924,0xbd2af),function(_0x2bf26f,_0x10b764){const _0x3ddfbf=_0x32fd;typeof exports==_0x3ddfbf(0x1b4)&&typeof module<'u'?_0x10b764(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x3ddfbf(0x187)&&define[_0x3ddfbf(0x183)]?define([_0x3ddfbf(0x182),_0x3ddfbf(0x19d),'@univerjs-pro/license',_0x3ddfbf(0x1a8),'@univerjs/thread-comment-ui',_0x3ddfbf(0x166),'rxjs',_0x3ddfbf(0x154)],_0x10b764):(_0x2bf26f=typeof globalThis<'u'?globalThis:_0x2bf26f||self,_0x10b764(_0x2bf26f['UniverProThreadCommentDatasource']={},_0x2bf26f[_0x3ddfbf(0x178)],_0x2bf26f[_0x3ddfbf(0x15e)],_0x2bf26f[_0x3ddfbf(0x1c5)],_0x2bf26f[_0x3ddfbf(0x15b)],_0x2bf26f[_0x3ddfbf(0x19b)],_0x2bf26f['rxjs'],_0x2bf26f[_0x3ddfbf(0x1c7)]));}(this,function(_0x4b43e9,_0x49f4cf,_0xf779f0,_0x116b5f,_0x4c6c64,_0x2b9794,_0x1c3e47,_0x15534f){'use strict';const _0x298fbc=_0x32fd;const _0x14bda9='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x1457a2=(_0x3c308f=>(_0x3c308f[_0x3c308f[_0x298fbc(0x155)]=0x0]=_0x298fbc(0x155),_0x3c308f[_0x3c308f[_0x298fbc(0x1ba)]=0x1]=_0x298fbc(0x1ba),_0x3c308f[_0x3c308f[_0x298fbc(0x1b9)]=-0x1]=_0x298fbc(0x1b9),_0x3c308f))(_0x1457a2||{}),_0x2b90da=(_0x4766d2=>(_0x4766d2[_0x4766d2['Unknown']=0x0]=_0x298fbc(0x1c2),_0x4766d2[_0x4766d2['Add']=0x1]=_0x298fbc(0x1c6),_0x4766d2[_0x4766d2[_0x298fbc(0x1a5)]=0x2]='Reply',_0x4766d2[_0x4766d2['Edit']=0x3]=_0x298fbc(0x161),_0x4766d2[_0x4766d2[_0x298fbc(0x1ca)]=0x4]=_0x298fbc(0x1ca),_0x4766d2[_0x4766d2[_0x298fbc(0x1a7)]=0x5]=_0x298fbc(0x1a7),_0x4766d2[_0x4766d2[_0x298fbc(0x1b9)]=-0x1]=_0x298fbc(0x1b9),_0x4766d2))(_0x2b90da||{});const _0x2c170d=_0x2b7a0a=>_0x116b5f['dayjs'](new Date(+_0x2b7a0a))[_0x298fbc(0x1bb)]('YYYY/MM/DD\x20HH:mm'),_0x198735=async(_0x4c62ba,_0x20d778)=>{const _0xf85d7=_0x298fbc,_0x1bf086=_0x4c62ba[_0xf85d7(0x163)](_0x116b5f[_0xf85d7(0x19c)]),_0x183f9a=_0x4c62ba['get'](_0x15534f[_0xf85d7(0x1ab)]);_0x20d778[_0xf85d7(0x1b1)](_0x55b005=>{const _0x364ae1=_0xf85d7;_0x1bf086[_0x364ae1(0x1ad)](_0x55b005)&&_0x20d778[_0x364ae1(0x160)](_0x55b005);}),_0x20d778[_0xf85d7(0x17a)]&&(await _0x183f9a[_0xf85d7(0x163)]('/universer-api/user/list',{'params':{'userIDs':[..._0x20d778]}}))[_0xf85d7(0x186)]['users'][_0xf85d7(0x1b1)](_0x2ad244=>{const _0x466930=_0xf85d7;_0x2ad244&&_0x1bf086[_0x466930(0x181)](_0x2ad244);});};var _0x438afc=Object[_0x298fbc(0x1c8)],_0x181941=(_0x4892e8,_0xa39b1d,_0x202387,_0x5a39ad)=>{for(var _0x1c67f8=_0x5a39ad>0x1?void 0x0:_0x5a39ad?_0x438afc(_0xa39b1d,_0x202387):_0xa39b1d,_0x16368d=_0x4892e8['length']-0x1,_0x29a5de;_0x16368d>=0x0;_0x16368d--)(_0x29a5de=_0x4892e8[_0x16368d])&&(_0x1c67f8=_0x29a5de(_0x1c67f8)||_0x1c67f8);return _0x1c67f8;},_0x32658a=(_0xaa7374,_0x3ea634)=>(_0x10ebd0,_0x44ace6)=>_0x3ea634(_0x10ebd0,_0x44ace6,_0xaa7374);let _0x5888c0=class extends _0x116b5f['Disposable']{constructor(_0x4a30cf,_0x3e09af,_0x3712e4,_0x13768b){const _0x3b64ba=_0x298fbc;super(),this[_0x3b64ba(0x1c0)]=_0x4a30cf,this['_threadCommentModel']=_0x3e09af,this['_userService']=_0x3712e4,this[_0x3b64ba(0x18b)]=_0x13768b,this['_init'](),this['_initUserSync']();}[_0x298fbc(0x19a)](){const _0x1cb7b8=_0x298fbc;this[_0x1cb7b8(0x198)](this[_0x1cb7b8(0x190)]['commentUpdate$']['pipe'](_0x1c3e47[_0x1cb7b8(0x180)](0x10))[_0x1cb7b8(0x159)](_0x22dc69=>{const _0x17c822=_0x1cb7b8,_0x30000f=new Set();_0x22dc69[_0x17c822(0x1b1)](_0xd069ad=>{const _0x266c4c=_0x17c822;switch(_0xd069ad[_0x266c4c(0x1b8)]){case _0x266c4c(0x1c3):{const _0x21e29b=_0xd069ad[_0x266c4c(0x1d3)][_0x266c4c(0x1be)];_0x30000f[_0x266c4c(0x1c3)](_0x21e29b);break;}}}),_0x198735(this['_injector'],_0x30000f);}));}[_0x298fbc(0x1d0)](){const _0x35b2fa=_0x298fbc;this[_0x35b2fa(0x198)](this['_commentService']['commentUpdate$'][_0x35b2fa(0x159)](async _0xfa32df=>{const _0x56dbf0=_0x35b2fa;var _0x213812,_0x14fd34,_0x49b337,_0x28c733;const _0x1d0ff7=(_0x213812=this[_0x56dbf0(0x190)][_0x56dbf0(0x15c)](_0xfa32df['unitId'])[_0x56dbf0(0x185)](_0x379437=>_0x379437['threadId']===_0xfa32df[_0x56dbf0(0x18d)]))==null?void 0x0:_0x213812['root'];if(!_0x1d0ff7)return;const {unitId:_0x515e4d,subUnitId:_0x7e023}=_0x1d0ff7;switch(_0xfa32df['user']&&this[_0x56dbf0(0x1af)][_0x56dbf0(0x181)](_0xfa32df[_0x56dbf0(0x1a1)]),_0xfa32df[_0x56dbf0(0x1b8)]){case _0x2b90da['Add']:break;case _0x2b90da['Reply']:{this[_0x56dbf0(0x190)][_0x56dbf0(0x16c)](_0x515e4d,_0x7e023,{'unitId':_0x515e4d,'subUnitId':_0x7e023,'ref':'','id':_0xfa32df[_0x56dbf0(0x167)],'dT':_0x2c170d(+_0xfa32df['createTimestamp']),'threadId':_0xfa32df[_0x56dbf0(0x18d)],'personId':(_0x49b337=(_0x14fd34=_0xfa32df[_0x56dbf0(0x1a1)])==null?void 0x0:_0x14fd34[_0x56dbf0(0x19f)])!=null?_0x49b337:_0xfa32df[_0x56dbf0(0x1a0)],'text':JSON[_0x56dbf0(0x162)](_0xfa32df[_0x56dbf0(0x1bf)]),'parentId':_0x1d0ff7['id']});break;}case _0x2b90da[_0x56dbf0(0x1ca)]:{const _0x49c3cd=this[_0x56dbf0(0x190)][_0x56dbf0(0x1cd)](_0x515e4d,_0x7e023,_0xfa32df['replyId']);_0x49c3cd&&_0x49c3cd[_0x56dbf0(0x1a4)]&&this[_0x56dbf0(0x190)][_0x56dbf0(0x194)](_0x515e4d,_0x7e023,_0xfa32df[_0x56dbf0(0x167)]);break;}case _0x2b90da[_0x56dbf0(0x161)]:{this[_0x56dbf0(0x190)][_0x56dbf0(0x199)](_0x515e4d,_0x7e023,{'commentId':_0xfa32df[_0x56dbf0(0x167)],'text':JSON[_0x56dbf0(0x162)](_0xfa32df['content'])});break;}case _0x2b90da[_0x56dbf0(0x1a7)]:{const _0x23efd7=(_0x28c733=this[_0x56dbf0(0x190)][_0x56dbf0(0x15c)](_0xfa32df['unitId'])[_0x56dbf0(0x185)](_0x45ec4d=>_0x45ec4d['threadId']===_0xfa32df['threadId']))==null?void 0x0:_0x28c733[_0x56dbf0(0x188)];_0x23efd7&&this[_0x56dbf0(0x190)][_0x56dbf0(0x1b3)](_0x515e4d,_0x7e023,_0x23efd7['id'],_0xfa32df['solved']===_0x1457a2[_0x56dbf0(0x1ba)]);break;}}}));}};_0x5888c0=_0x181941([_0x32658a(0x0,_0x116b5f['Inject'](_0x49f4cf[_0x298fbc(0x171)])),_0x32658a(0x1,_0x116b5f[_0x298fbc(0x173)](_0x2b9794[_0x298fbc(0x1cf)])),_0x32658a(0x2,_0x116b5f[_0x298fbc(0x173)](_0x116b5f[_0x298fbc(0x19c)])),_0x32658a(0x3,_0x116b5f['Inject'](_0x116b5f[_0x298fbc(0x176)]))],_0x5888c0);const _0x17f5c6='thread-comment-data-source.config',_0x484967={};var _0x204748=Object[_0x298fbc(0x1c8)],_0x55e1c2=(_0x1260f9,_0x384aa6,_0x43de15,_0x333a73)=>{const _0x2328ef=_0x298fbc;for(var _0x1bba46=_0x333a73>0x1?void 0x0:_0x333a73?_0x204748(_0x384aa6,_0x43de15):_0x384aa6,_0x2917b3=_0x1260f9[_0x2328ef(0x17f)]-0x1,_0x581e12;_0x2917b3>=0x0;_0x2917b3--)(_0x581e12=_0x1260f9[_0x2917b3])&&(_0x1bba46=_0x581e12(_0x1bba46)||_0x1bba46);return _0x1bba46;},_0x218554=(_0x2e3a60,_0x15adae)=>(_0x4935d0,_0x1cde26)=>_0x15adae(_0x4935d0,_0x1cde26,_0x2e3a60);function _0x4b5c06(_0x4326cd,_0x5ddf59){const _0x3cddcf=_0x298fbc,_0x1c7f1c=_0x4326cd['replies'][0x0];return{..._0x5ddf59,'id':_0x1c7f1c['replyId'],'resolved':_0x4326cd[_0x3cddcf(0x1b6)]===0x1,'dT':_0x2c170d(_0x1c7f1c[_0x3cddcf(0x196)]),'personId':_0x1c7f1c[_0x3cddcf(0x1a0)],'threadId':_0x1c7f1c[_0x3cddcf(0x18d)]};}function _0x44908a(_0x87d235,_0x415377,_0xad4274){const _0x2b5af6=_0x298fbc;var _0x2b30a2,_0x4930c6;if(((_0x4930c6=(_0x2b30a2=_0x87d235==null?void 0x0:_0x87d235[_0x2b5af6(0x1a2)])==null?void 0x0:_0x2b30a2[_0x2b5af6(0x17f)])!=null?_0x4930c6:0x0)>0x0){const _0x5557d4=(_0xe7d64b,_0x10203d)=>({'id':_0xe7d64b[_0x2b5af6(0x167)],'threadId':_0xe7d64b[_0x2b5af6(0x18d)],'dT':_0x2c170d(_0xe7d64b[_0x2b5af6(0x196)]),'personId':_0xe7d64b[_0x2b5af6(0x1a0)],'resolved':_0x87d235[_0x2b5af6(0x1b6)]===_0x1457a2[_0x2b5af6(0x1ba)],'unitId':_0x415377,'subUnitId':_0xad4274,'text':JSON[_0x2b5af6(0x162)](_0xe7d64b['content']),'parentId':_0x10203d}),_0x732659=_0x5557d4(_0x87d235[_0x2b5af6(0x1a2)][0x0]);return{..._0x732659,'children':_0x87d235['replies'][_0x2b5af6(0x1c9)](0x1)[_0x2b5af6(0x152)](_0x1fe430=>_0x5557d4(_0x1fe430,_0x732659['id']))};}return null;}let _0x82a4b9=class{constructor(_0x40cdb1,_0x3221f1,_0x18a20c){const _0x24b8f4=_0x298fbc;this[_0x24b8f4(0x172)]=_0x40cdb1,this[_0x24b8f4(0x1af)]=_0x3221f1,this[_0x24b8f4(0x15f)]=_0x18a20c;}async[_0x298fbc(0x16c)](_0x28684e){const _0x12d67b=_0x298fbc;var _0x4c2428,_0x23eb99;const {parentId:_0x4df686,unitId:_0x14a34f,text:_0x4bd1be,threadId:_0xadb604}=_0x28684e,_0x33d900=(_0x23eb99=(_0x4c2428=_0x4bd1be[_0x12d67b(0x189)])==null?void 0x0:_0x4c2428[_0x12d67b(0x1b7)](_0x58363a=>_0x58363a[_0x12d67b(0x191)]===_0x116b5f[_0x12d67b(0x192)][_0x12d67b(0x1cc)])[_0x12d67b(0x152)](_0x1f0ca8=>_0x1f0ca8['rangeId']))!=null?_0x23eb99:[],_0x3102da=JSON[_0x12d67b(0x16f)](_0x4bd1be),_0x66893f=(await this[_0x12d67b(0x15f)][_0x12d67b(0x15a)](_0x14a34f))[_0x12d67b(0x15d)]();if(_0x4df686){const _0x2379e1={'memberId':_0x66893f,'unitId':_0x14a34f,'content':_0x3102da,'mention':_0x33d900,'threadId':_0xadb604},_0x6f2800=(await this[_0x12d67b(0x172)]['post'](_0x12d67b(0x1ac)+_0x14a34f+_0x12d67b(0x17d),{'body':_0x2379e1}))['body'][_0x12d67b(0x177)];return{..._0x28684e,'id':_0x6f2800['replyId'],'dT':_0x116b5f[_0x12d67b(0x179)](+_0x6f2800[_0x12d67b(0x196)])[_0x12d67b(0x1bb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x6f2800[_0x12d67b(0x1a0)]};}else{const _0xfc511a={'memberId':_0x66893f,'unitId':_0x14a34f,'content':_0x3102da,'mention':_0x33d900},_0x34c213=await this[_0x12d67b(0x172)][_0x12d67b(0x169)](_0x12d67b(0x1ac)+_0x14a34f+_0x12d67b(0x168),{'body':_0xfc511a});return _0x4b5c06(_0x34c213[_0x12d67b(0x186)][_0x12d67b(0x157)],_0x28684e);}}async[_0x298fbc(0x199)](_0x39cfc){const _0x551b66=_0x298fbc;var _0x5c475f,_0x16220f;const {text:_0xa94c1e,unitId:_0x2e5e3d}=_0x39cfc,_0xd5a1bd=(_0x16220f=(_0x5c475f=_0xa94c1e['customRanges'])==null?void 0x0:_0x5c475f[_0x551b66(0x1b7)](_0x2b2520=>_0x2b2520[_0x551b66(0x191)]===_0x116b5f[_0x551b66(0x192)]['COMMENT'])[_0x551b66(0x152)](_0x242114=>_0x242114['rangeId']))!=null?_0x16220f:[],_0xbe071=JSON['stringify'](_0xa94c1e),_0x5afa32=_0x39cfc[_0x551b66(0x18d)],_0xe09474=_0x39cfc['id'],_0x4a723c={'memberId':(await this[_0x551b66(0x15f)][_0x551b66(0x15a)](_0x2e5e3d))[_0x551b66(0x15d)](),'unitId':_0x2e5e3d,'threadId':_0x5afa32,'mention':_0xd5a1bd,'content':_0xbe071,'replyId':_0xe09474},_0x2d78fc=await this[_0x551b66(0x172)]['post'](_0x551b66(0x1ac)+_0x2e5e3d+'/edit',{'body':_0x4a723c});return!_0x2d78fc[_0x551b66(0x186)][_0x551b66(0x16b)]||_0x2d78fc[_0x551b66(0x186)][_0x551b66(0x16b)]['code']===0x1;}async[_0x298fbc(0x1b3)](_0x348d14){const _0x1eb991=_0x298fbc,{unitId:_0x58d679}=_0x348d14,_0x170f70=_0x348d14[_0x1eb991(0x18d)],_0x4d50c2={'memberId':this['_userService'][_0x1eb991(0x1cb)]()['userID'],'unitId':_0x58d679,'threadId':_0x170f70,'solved':_0x348d14[_0x1eb991(0x1d1)]?_0x1457a2['Solved']:_0x1457a2['OpenOrReOpen']},_0x163cf9=await this[_0x1eb991(0x172)][_0x1eb991(0x169)]('/universer-api/comment/unit/'+_0x58d679+'/solved',{'body':_0x4d50c2});return!_0x163cf9['body'][_0x1eb991(0x16b)]||_0x163cf9[_0x1eb991(0x186)][_0x1eb991(0x16b)][_0x1eb991(0x1c4)]===0x1;}async[_0x298fbc(0x194)](_0x2dc164,_0x363ade,_0x108595,_0x53248c){const _0x3b9fc1=_0x298fbc,_0x2be49f={'memberId':(await this[_0x3b9fc1(0x15f)][_0x3b9fc1(0x15a)](_0x2dc164))[_0x3b9fc1(0x15d)](),'threadId':_0x108595,'replyId':_0x53248c,'unitId':_0x2dc164},_0x3fdf81=await this[_0x3b9fc1(0x172)]['post']('/universer-api/comment/unit/'+_0x2dc164+'/delete',{'body':_0x2be49f});return!_0x3fdf81[_0x3b9fc1(0x186)][_0x3b9fc1(0x16b)]||_0x3fdf81['body'][_0x3b9fc1(0x16b)][_0x3b9fc1(0x1c4)]===0x1;}async[_0x298fbc(0x1bc)](_0x7f1e5,_0x3cf124,_0x425fbd){const _0x5a0e8b=_0x298fbc,_0x15273b={'unitId':_0x7f1e5,'threadId':_0x425fbd},_0x365a20=await this[_0x5a0e8b(0x172)]['post'](_0x5a0e8b(0x1ac)+_0x7f1e5+_0x5a0e8b(0x18f),{'body':_0x15273b}),_0x1edb65=_0x425fbd[_0x5a0e8b(0x152)](_0x902afc=>_0x44908a(_0x365a20[_0x5a0e8b(0x186)][_0x5a0e8b(0x17b)][_0x902afc],_0x7f1e5,_0x3cf124))['filter'](Boolean);return Object[_0x5a0e8b(0x165)](_0x365a20[_0x5a0e8b(0x186)][_0x5a0e8b(0x17e)])['forEach'](_0x247ecc=>{const _0x49eb38=_0x5a0e8b;this[_0x49eb38(0x1af)]['addUser'](_0x247ecc);}),_0x1edb65;}[_0x298fbc(0x151)](_0x45c88d){const _0x3ee717=_0x298fbc;return{'id':_0x45c88d['id'],'threadId':_0x45c88d['threadId'],'ref':_0x45c88d[_0x3ee717(0x150)]};}};_0x82a4b9=_0x55e1c2([_0x218554(0x0,_0x116b5f[_0x298fbc(0x173)](_0x15534f[_0x298fbc(0x1ab)])),_0x218554(0x1,_0x116b5f['Inject'](_0x116b5f[_0x298fbc(0x19c)])),_0x218554(0x2,_0x116b5f['Inject'](_0x49f4cf[_0x298fbc(0x197)]))],_0x82a4b9);var _0x2df7cd=Object[_0x298fbc(0x1c8)],_0x4cdeac=(_0x5621b7,_0x47412d,_0x5d480b,_0x3ae5a8)=>{const _0x544e36=_0x298fbc;for(var _0x4c4558=_0x3ae5a8>0x1?void 0x0:_0x3ae5a8?_0x2df7cd(_0x47412d,_0x5d480b):_0x47412d,_0x212c5b=_0x5621b7[_0x544e36(0x17f)]-0x1,_0x4ee8ce;_0x212c5b>=0x0;_0x212c5b--)(_0x4ee8ce=_0x5621b7[_0x212c5b])&&(_0x4c4558=_0x4ee8ce(_0x4c4558)||_0x4c4558);return _0x4c4558;},_0x337f08=(_0x2b2e50,_0x20020e)=>(_0x3ad10e,_0x4a74b8)=>_0x20020e(_0x3ad10e,_0x4a74b8,_0x2b2e50);let _0x2f4d47=class extends _0x116b5f[_0x298fbc(0x1b0)]{constructor(_0x250f33,_0x460c8d){const _0x55a2c2=_0x298fbc;super(),this[_0x55a2c2(0x18e)]=_0x250f33,this['_threadCommentDataSource']=_0x460c8d,this['_initDataSource']();}['_initDataSource'](){const _0x28ddec=_0x298fbc;this[_0x28ddec(0x18e)]['dataSource']=this[_0x28ddec(0x193)],this['_threadCommentDataSourceService'][_0x28ddec(0x16d)]=!0x1;}};_0x2f4d47=_0x4cdeac([_0x337f08(0x0,_0x2b9794[_0x298fbc(0x1a3)]),_0x337f08(0x1,_0x116b5f[_0x298fbc(0x173)](_0x82a4b9))],_0x2f4d47);var _0x1b088e=Object['defineProperty'],_0x4c8492=Object[_0x298fbc(0x1c8)],_0x2186e6=(_0x357593,_0x571eb0,_0xf03f59)=>_0x571eb0 in _0x357593?_0x1b088e(_0x357593,_0x571eb0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf03f59}):_0x357593[_0x571eb0]=_0xf03f59,_0x133dba=(_0x438795,_0x2adf80,_0x54d091,_0x3c79a7)=>{const _0x4d4642=_0x298fbc;for(var _0xb82c8c=_0x3c79a7>0x1?void 0x0:_0x3c79a7?_0x4c8492(_0x2adf80,_0x54d091):_0x2adf80,_0x4debcb=_0x438795[_0x4d4642(0x17f)]-0x1,_0x1b2b89;_0x4debcb>=0x0;_0x4debcb--)(_0x1b2b89=_0x438795[_0x4debcb])&&(_0xb82c8c=_0x1b2b89(_0xb82c8c)||_0xb82c8c);return _0xb82c8c;},_0x458f2b=(_0x3ab1b5,_0x179cf9)=>(_0x10f0a0,_0xb1141b)=>_0x179cf9(_0x10f0a0,_0xb1141b,_0x3ab1b5),_0x58a21b=(_0x4b612c,_0x4e2392,_0x51261c)=>_0x2186e6(_0x4b612c,typeof _0x4e2392!=_0x298fbc(0x1bd)?_0x4e2392+'':_0x4e2392,_0x51261c);_0x4b43e9[_0x298fbc(0x174)]=class extends _0x116b5f[_0x298fbc(0x195)]{constructor(_0xfbfe9e=_0x484967,_0x38ea94,_0x43fd4f){const _0x4e2b57=_0x298fbc;super(),this[_0x4e2b57(0x18a)]=_0xfbfe9e,this[_0x4e2b57(0x18b)]=_0x38ea94,this[_0x4e2b57(0x1b2)]=_0x43fd4f;const {..._0x6720d3}=_0x116b5f['merge']({},_0x484967,this['_config']);this['_configService'][_0x4e2b57(0x156)](_0x17f5c6,_0x6720d3);}[_0x298fbc(0x184)](){const _0x3f8c71=_0x298fbc;[[_0x82a4b9],[_0x2f4d47],[_0x5888c0]][_0x3f8c71(0x1b1)](_0x413251=>{const _0x5676ce=_0x3f8c71;this[_0x5676ce(0x18b)]['add'](_0x413251);});}['onReady'](){const _0x58261b=_0x298fbc;this[_0x58261b(0x18b)][_0x58261b(0x163)](_0x2f4d47),this[_0x58261b(0x18b)][_0x58261b(0x163)](_0x5888c0);}},_0x58a21b(_0x4b43e9[_0x298fbc(0x174)],_0x298fbc(0x158),_0x14bda9),_0x58a21b(_0x4b43e9[_0x298fbc(0x174)],_0x298fbc(0x1b8),_0x116b5f[_0x298fbc(0x14e)][_0x298fbc(0x1b5)]),_0x4b43e9[_0x298fbc(0x174)]=_0x133dba([_0x116b5f[_0x298fbc(0x17c)](_0x4c6c64[_0x298fbc(0x1ae)],_0x49f4cf[_0x298fbc(0x16e)],_0xf779f0['UniverLicensePlugin']),_0x458f2b(0x1,_0x116b5f[_0x298fbc(0x173)](_0x116b5f[_0x298fbc(0x176)])),_0x458f2b(0x2,_0x116b5f[_0x298fbc(0x1ce)])],_0x4b43e9[_0x298fbc(0x174)]),Object[_0x298fbc(0x14f)](_0x4b43e9,Symbol[_0x298fbc(0x170)],{'value':_0x298fbc(0x164)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8-nightly.202509200616",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.8-nightly.202509200616",
|
|
49
|
+
"@univerjs/core": "0.10.8-nightly.202509200616",
|
|
50
|
+
"@univerjs-pro/license": "0.10.8-nightly.202509200616",
|
|
51
|
+
"@univerjs/network": "0.10.8-nightly.202509200616",
|
|
52
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.10.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.10.
|
|
53
|
+
"@univerjs/thread-comment": "0.10.8-nightly.202509200616",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.8-nightly.202509200616"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.2",
|
|
59
59
|
"vite": "^7.1.3",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.8"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|