@univerjs-pro/collaboration-client-node 1.0.0-alpha.1 → 1.0.0-alpha.3

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/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # @univerjs-pro/collaboration-client-node
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@univerjs-pro/collaboration-client-node?style=flat-square)](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
4
+ [![license](https://img.shields.io/npm/l/@univerjs-pro/collaboration-client-node?style=flat-square)](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
4
5
  [![downloads](https://img.shields.io/npm/dm/@univerjs-pro/collaboration-client-node?style=flat-square)](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
5
6
 
6
- `@univerjs-pro/collaboration-client-node` provides node.js collaboration client plugin for Univer Pro.
7
+ `@univerjs-pro/collaboration-client-node` is part of Univer Pro. Node.js collaboration client plugin for Univer Pro.
7
8
 
8
9
  ## Package Overview
9
10
 
@@ -29,8 +30,11 @@ import { UniverCollaborationClientNodePlugin } from '@univerjs-pro/collaboration
29
30
  univer.registerPlugin(UniverCollaborationClientNodePlugin);
30
31
  ```
31
32
 
33
+ ## Integration Notes
34
+
35
+ - Keep this package on the same version as the other `@univerjs/*` and `@univerjs-pro/*` packages in your application.
36
+
32
37
  ## Resources
33
38
 
34
39
  - [Documentation](https://docs.univer.ai/guides/pro)
35
40
  - [NPM package](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
36
-
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x500098=_0x128e;(function(_0x12b4d4,_0x3ee7f2){const _0x1bfc49=_0x128e,_0x5cc45f=_0x12b4d4();while(!![]){try{const _0x1def23=-parseInt(_0x1bfc49(0x13a))/0x1*(parseInt(_0x1bfc49(0x145))/0x2)+-parseInt(_0x1bfc49(0x137))/0x3*(parseInt(_0x1bfc49(0x164))/0x4)+-parseInt(_0x1bfc49(0x13b))/0x5+-parseInt(_0x1bfc49(0x148))/0x6*(parseInt(_0x1bfc49(0x151))/0x7)+parseInt(_0x1bfc49(0x163))/0x8+-parseInt(_0x1bfc49(0x15d))/0x9*(parseInt(_0x1bfc49(0x14b))/0xa)+parseInt(_0x1bfc49(0x173))/0xb;if(_0x1def23===_0x3ee7f2)break;else _0x5cc45f['push'](_0x5cc45f['shift']());}catch(_0x29e2e9){_0x5cc45f['push'](_0x5cc45f['shift']());}}}(_0x28e0,0xa110c),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x500098(0x157)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs/core'),n=require('@univerjs/network'),r=require('rxjs'),i=require('ws'),a=require('@univerjs-pro/collaboration');const o='collaboration-client-node.config',s={};var c=_0x500098(0x169),l=_0x500098(0x149);function u(_0x4af5cc,_0xcbea84){return function(_0x56216c,_0x3d2e2d){_0xcbea84(_0x56216c,_0x3d2e2d,_0x4af5cc);};}function d(_0x760e2,_0x19aae1,_0x45d979,_0x3e792b){const _0x7f9b4e=_0x500098;var _0x3906b8=arguments[_0x7f9b4e(0x150)],_0x2f1ead=_0x3906b8<0x3?_0x19aae1:_0x3e792b===null?_0x3e792b=Object['getOwnPropertyDescriptor'](_0x19aae1,_0x45d979):_0x3e792b,_0x4816df;if(typeof Reflect==_0x7f9b4e(0x154)&&typeof Reflect[_0x7f9b4e(0x166)]==_0x7f9b4e(0x14a))_0x2f1ead=Reflect[_0x7f9b4e(0x166)](_0x760e2,_0x19aae1,_0x45d979,_0x3e792b);else{for(var _0x1a8ab8=_0x760e2[_0x7f9b4e(0x150)]-0x1;_0x1a8ab8>=0x0;_0x1a8ab8--)(_0x4816df=_0x760e2[_0x1a8ab8])&&(_0x2f1ead=(_0x3906b8<0x3?_0x4816df(_0x2f1ead):_0x3906b8>0x3?_0x4816df(_0x19aae1,_0x45d979,_0x2f1ead):_0x4816df(_0x19aae1,_0x45d979))||_0x2f1ead);}return _0x3906b8>0x3&&_0x2f1ead&&Object[_0x7f9b4e(0x143)](_0x19aae1,_0x45d979,_0x2f1ead),_0x2f1ead;}let f=class extends t[_0x500098(0x15b)]{constructor(_0x1bf418){const _0xf5e4fa=_0x500098;super(),this[_0xf5e4fa(0x16f)]=_0x1bf418;}[_0x500098(0x14e)](_0x5a2672){const _0x13cd5e=_0x500098;var _0x15adeb;let _0x1b1529=((_0x15adeb=this[_0x13cd5e(0x16f)][_0x13cd5e(0x13d)](e[_0x13cd5e(0x158)]))==null?void 0x0:_0x15adeb[_0x13cd5e(0x159)])||{};try{let _0x3d4ae8=new i['WebSocket'](_0x5a2672,{'headers':{..._0x1b1529}}),_0x424116=new t['DisposableCollection']();return{'URL':_0x5a2672,'close':(_0x479144,_0x4d866f)=>{const _0x306c8a=_0x13cd5e;_0x3d4ae8[_0x306c8a(0x177)](_0x479144,_0x4d866f),_0x424116[_0x306c8a(0x171)]();},'send':_0x223b5e=>{const _0x54b5cc=_0x13cd5e;_0x3d4ae8[_0x54b5cc(0x160)](_0x223b5e);},'open$':new r['Observable'](_0x260751=>{const _0x2b6399=_0x13cd5e;let _0x3da87f=_0x358876=>_0x260751['next'](_0x358876);_0x3d4ae8[_0x2b6399(0x138)](_0x2b6399(0x136),_0x3da87f),_0x424116[_0x2b6399(0x135)]((0x0,t[_0x2b6399(0x162)])(()=>_0x3d4ae8[_0x2b6399(0x174)](_0x2b6399(0x136),_0x3da87f)));})[_0x13cd5e(0x16e)]((0x0,r[_0x13cd5e(0x15e)])()),'close$':new r[(_0x13cd5e(0x140))](_0x329412=>{const _0x53cb21=_0x13cd5e;let _0x385248=_0x156624=>_0x329412[_0x53cb21(0x165)](_0x156624);_0x3d4ae8[_0x53cb21(0x138)]('close',_0x385248),_0x424116[_0x53cb21(0x135)]((0x0,t[_0x53cb21(0x162)])(()=>_0x3d4ae8[_0x53cb21(0x174)]('close',_0x385248)));})[_0x13cd5e(0x16e)]((0x0,r['share'])()),'error$':new r['Observable'](_0x3a22d9=>{const _0x327178=_0x13cd5e;let _0x5988b1=_0xc77a2a=>_0x3a22d9['next'](_0xc77a2a);_0x3d4ae8[_0x327178(0x138)](_0x327178(0x16a),_0x5988b1),_0x424116[_0x327178(0x135)]((0x0,t[_0x327178(0x162)])(()=>_0x3d4ae8[_0x327178(0x174)](_0x327178(0x16a),_0x5988b1)));})[_0x13cd5e(0x16e)]((0x0,r[_0x13cd5e(0x15e)])()),'message$':new r[(_0x13cd5e(0x140))](_0x3216c3=>{const _0x3f35d0=_0x13cd5e;let _0x32c50d=_0x282430=>_0x3216c3[_0x3f35d0(0x165)](_0x282430);_0x3d4ae8[_0x3f35d0(0x138)](_0x3f35d0(0x16d),_0x32c50d),_0x424116[_0x3f35d0(0x135)]((0x0,t[_0x3f35d0(0x162)])(()=>_0x3d4ae8['removeEventListener']('message',_0x32c50d)));})[_0x13cd5e(0x16e)]((0x0,r[_0x13cd5e(0x15e)])())};}catch(_0x355c22){return console[_0x13cd5e(0x16a)](_0x355c22),null;}}};f=d([u(0x0,t['IConfigService'])],f);function p(_0x32e77d){'@babel/helpers - typeof';const _0x2d6118=_0x500098;return p=typeof Symbol==_0x2d6118(0x14a)&&typeof Symbol[_0x2d6118(0x14d)]==_0x2d6118(0x15a)?function(_0x1fe5cc){return typeof _0x1fe5cc;}:function(_0x89b8b7){const _0x2f43f9=_0x2d6118;return _0x89b8b7&&typeof Symbol=='function'&&_0x89b8b7[_0x2f43f9(0x15c)]===Symbol&&_0x89b8b7!==Symbol[_0x2f43f9(0x16c)]?_0x2f43f9(0x15a):typeof _0x89b8b7;},p(_0x32e77d);}function m(_0x14e86a,_0x2892b0){const _0xfa7d43=_0x500098;if(p(_0x14e86a)!=_0xfa7d43(0x154)||!_0x14e86a)return _0x14e86a;var _0x5661e3=_0x14e86a[Symbol['toPrimitive']];if(_0x5661e3!==void 0x0){var _0x5b69c3=_0x5661e3['call'](_0x14e86a,_0x2892b0||'default');if(p(_0x5b69c3)!=_0xfa7d43(0x154))return _0x5b69c3;throw TypeError(_0xfa7d43(0x142));}return(_0x2892b0===_0xfa7d43(0x13c)?String:Number)(_0x14e86a);}function h(_0x1f1b63){const _0x5701fc=_0x500098;var _0x1701b9=m(_0x1f1b63,_0x5701fc(0x13c));return p(_0x1701b9)==_0x5701fc(0x15a)?_0x1701b9:_0x1701b9+'';}function _0x28e0(){const _0x874bfe=['12835670vzencN','packageName','iterator','createSocket','_injector','length','7IMfLmv','ISnapshotServerService','registerDependencies','object','Injector','setConfig','Module','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','customHeaders','symbol','Disposable','constructor','9AxmsYA','share','headers','send','set','toDisposable','1368960eqrkzE','870388izaqUs','next','decorate','UniverCollaborationClientNodePlugin','onStarting','@univerjs-pro/collaboration-client-node','error','Inject','prototype','message','pipe','_configService','DependentOn','dispose','_httpService','43560814ZIFwcJ','removeEventListener','IConfigService','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','close','CollaborationSocketService','add','open','3rUnNrf','addEventListener','COLLABORATION_CLIENT_NODE_CONFIG_KEY','1703AhRccl','2694120eionhq','string','getConfig','_registerDependencies','pluginName','Observable','NodeCollaborationSocketService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','defineProperty','_doCreateSocket','922NcJkwg','ILogService','UniverCollaborationClientPlugin','3878394QpPOCu','1.0.0-alpha.1','function'];_0x28e0=function(){return _0x874bfe;};return _0x28e0();}function g(_0x3ff0dc,_0x33fd4a,_0x1a46e2){return(_0x33fd4a=h(_0x33fd4a))in _0x3ff0dc?Object['defineProperty'](_0x3ff0dc,_0x33fd4a,{'value':_0x1a46e2,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3ff0dc[_0x33fd4a]=_0x1a46e2,_0x3ff0dc;}let _=class extends t['Plugin']{constructor(_0x442984=s,_0xb7b7ea,_0x16957a){const _0x247081=_0x500098;super(),this[_0x247081(0x16f)]=_0xb7b7ea,this[_0x247081(0x14f)]=_0x16957a,this[_0x247081(0x16f)][_0x247081(0x156)](o,_0x442984);}[_0x500098(0x168)](){const _0x34c062=_0x500098;this[_0x34c062(0x13e)]();}[_0x500098(0x13e)](){const _0x167408=_0x500098;(0x0,t[_0x167408(0x153)])(this['_injector'],[[n['ISocketService'],{'useClass':f}]]);}};g(_,_0x500098(0x13f),_0x500098(0x176)),g(_,_0x500098(0x14c),c),g(_,'version',l),_=d([(0x0,t[_0x500098(0x170)])(e[_0x500098(0x147)]),u(0x1,t[_0x500098(0x175)]),u(0x2,(0x0,t[_0x500098(0x16b)])(t['Injector']))],_);let v=class extends e[_0x500098(0x134)]{constructor(_0x3217f4,_0x358abe,_0x45b254,_0x21bf28,_0x4d6bbe){const _0xa0693f=_0x500098;super(_0x3217f4,_0x358abe,_0x45b254,_0x21bf28,_0x4d6bbe);let _0x5d0175=this[_0xa0693f(0x16f)]['getConfig'](e['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']);this[_0xa0693f(0x172)]['registerHTTPInterceptor']({'interceptor':(_0x1ef938,_0x56dbb8)=>{const _0xd25a7f=_0xa0693f;let _0x3053ae=_0x1ef938[_0xd25a7f(0x15f)];if(_0x5d0175!=null&&_0x5d0175[_0xd25a7f(0x159)]){for(let _0x163be4 in _0x5d0175[_0xd25a7f(0x159)])_0x3053ae[_0xd25a7f(0x161)](_0x163be4,_0x5d0175[_0xd25a7f(0x159)][_0x163be4]);}return _0x56dbb8(_0x1ef938);}});}async[_0x500098(0x14e)](_0x460eb0){const _0x5149c6=_0x500098;return this[_0x5149c6(0x144)](_0x460eb0);}};function _0x128e(_0x4b5edd,_0x4027e8){_0x4b5edd=_0x4b5edd-0x134;const _0x28e05c=_0x28e0();let _0x128e35=_0x28e05c[_0x4b5edd];return _0x128e35;}v=d([u(0x0,(0x0,t['Inject'])(t[_0x500098(0x155)])),u(0x1,(0x0,t['Inject'])(n['HTTPService'])),u(0x2,t[_0x500098(0x175)]),u(0x3,t[_0x500098(0x146)]),u(0x4,a[_0x500098(0x152)])],v),exports[_0x500098(0x139)]=o,Object['defineProperty'](exports,_0x500098(0x141),{'enumerable':!0x0,'get':function(){return v;}}),Object['defineProperty'](exports,_0x500098(0x167),{'enumerable':!0x0,'get':function(){return _;}});
1
+ const _0x4653db=_0x1f7b;(function(_0x2c3c96,_0x435c1c){const _0x355a55=_0x1f7b,_0x421c03=_0x2c3c96();while(!![]){try{const _0x3609cb=-parseInt(_0x355a55(0xcf))/0x1+parseInt(_0x355a55(0xec))/0x2*(-parseInt(_0x355a55(0xf4))/0x3)+parseInt(_0x355a55(0xdc))/0x4*(parseInt(_0x355a55(0xe9))/0x5)+-parseInt(_0x355a55(0xf6))/0x6+parseInt(_0x355a55(0xd6))/0x7*(-parseInt(_0x355a55(0xef))/0x8)+-parseInt(_0x355a55(0xe1))/0x9*(parseInt(_0x355a55(0xde))/0xa)+parseInt(_0x355a55(0xd3))/0xb;if(_0x3609cb===_0x435c1c)break;else _0x421c03['push'](_0x421c03['shift']());}catch(_0x318738){_0x421c03['push'](_0x421c03['shift']());}}}(_0x36be,0x991d1),Object[_0x4653db(0x108)](exports,Symbol['toStringTag'],{'value':'Module'}));function _0x1f7b(_0x419e41,_0x151850){_0x419e41=_0x419e41-0xcf;const _0x36bef1=_0x36be();let _0x1f7b16=_0x36bef1[_0x419e41];return _0x1f7b16;}let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs/core'),n=require('@univerjs/network'),r=require('rxjs'),i=require('ws'),a=require('@univerjs-pro/collaboration');var o=_0x4653db(0x109),s=_0x4653db(0x103);const c={};function l(_0x187a78,_0x3da5a9){return function(_0x2f95ca,_0x694d4c){_0x3da5a9(_0x2f95ca,_0x694d4c,_0x187a78);};}function u(_0x397adc,_0x347ef1,_0x6a4925,_0x576bac){const _0x45f34c=_0x4653db;var _0x214e70=arguments['length'],_0x7f0ff7=_0x214e70<0x3?_0x347ef1:_0x576bac===null?_0x576bac=Object[_0x45f34c(0xe2)](_0x347ef1,_0x6a4925):_0x576bac,_0x567002;if(typeof Reflect=='object'&&typeof Reflect['decorate']==_0x45f34c(0x111))_0x7f0ff7=Reflect[_0x45f34c(0xfa)](_0x397adc,_0x347ef1,_0x6a4925,_0x576bac);else{for(var _0x105152=_0x397adc[_0x45f34c(0xd1)]-0x1;_0x105152>=0x0;_0x105152--)(_0x567002=_0x397adc[_0x105152])&&(_0x7f0ff7=(_0x214e70<0x3?_0x567002(_0x7f0ff7):_0x214e70>0x3?_0x567002(_0x347ef1,_0x6a4925,_0x7f0ff7):_0x567002(_0x347ef1,_0x6a4925))||_0x7f0ff7);}return _0x214e70>0x3&&_0x7f0ff7&&Object['defineProperty'](_0x347ef1,_0x6a4925,_0x7f0ff7),_0x7f0ff7;}let d=class extends t['Disposable']{constructor(_0x18826b){const _0x4d4425=_0x4653db;super(),this[_0x4d4425(0xd8)]=_0x18826b;}['createSocket'](_0x3c0758){const _0x5dbbe1=_0x4653db;var _0x38619e;let _0x2b4622=((_0x38619e=this[_0x5dbbe1(0xd8)][_0x5dbbe1(0xe8)](e[_0x5dbbe1(0xe6)]))==null?void 0x0:_0x38619e[_0x5dbbe1(0xee)])||{};try{let _0x5a9f50=new i[(_0x5dbbe1(0x10a))](_0x3c0758,{'headers':{..._0x2b4622}}),_0x1f43b1=new t[(_0x5dbbe1(0xfd))]();return{'URL':_0x3c0758,'close':(_0x2d649d,_0x2ddae8)=>{const _0x59a6e0=_0x5dbbe1;_0x5a9f50[_0x59a6e0(0xd2)](_0x2d649d,_0x2ddae8),_0x1f43b1['dispose']();},'send':_0x1e9c61=>{const _0x5cf16e=_0x5dbbe1;_0x5a9f50[_0x5cf16e(0x110)](_0x1e9c61);},'open$':new r[(_0x5dbbe1(0xdf))](_0xff261c=>{const _0x5bf1fa=_0x5dbbe1;let _0xbb38ca=_0x1a940f=>_0xff261c['next'](_0x1a940f);_0x5a9f50[_0x5bf1fa(0xe0)](_0x5bf1fa(0xed),_0xbb38ca),_0x1f43b1[_0x5bf1fa(0x10d)]((0x0,t['toDisposable'])(()=>_0x5a9f50[_0x5bf1fa(0xf2)]('open',_0xbb38ca)));})[_0x5dbbe1(0x107)]((0x0,r[_0x5dbbe1(0xe5)])()),'close$':new r[(_0x5dbbe1(0xdf))](_0x810bfe=>{const _0x3bba12=_0x5dbbe1;let _0x516232=_0x24b67d=>_0x810bfe[_0x3bba12(0x10b)](_0x24b67d);_0x5a9f50[_0x3bba12(0xe0)]('close',_0x516232),_0x1f43b1[_0x3bba12(0x10d)]((0x0,t['toDisposable'])(()=>_0x5a9f50[_0x3bba12(0xf2)](_0x3bba12(0xd2),_0x516232)));})[_0x5dbbe1(0x107)]((0x0,r[_0x5dbbe1(0xe5)])()),'error$':new r['Observable'](_0x16a2bf=>{const _0x22922e=_0x5dbbe1;let _0x3e0cbe=_0x41c49d=>_0x16a2bf[_0x22922e(0x10b)](_0x41c49d);_0x5a9f50[_0x22922e(0xe0)]('error',_0x3e0cbe),_0x1f43b1['add']((0x0,t[_0x22922e(0xf5)])(()=>_0x5a9f50['removeEventListener'](_0x22922e(0xdb),_0x3e0cbe)));})['pipe']((0x0,r[_0x5dbbe1(0xe5)])()),'message$':new r['Observable'](_0x416a85=>{const _0x328b8d=_0x5dbbe1;let _0x26e536=_0x2c46cf=>_0x416a85[_0x328b8d(0x10b)](_0x2c46cf);_0x5a9f50[_0x328b8d(0xe0)](_0x328b8d(0xd5),_0x26e536),_0x1f43b1[_0x328b8d(0x10d)]((0x0,t[_0x328b8d(0xf5)])(()=>_0x5a9f50[_0x328b8d(0xf2)]('message',_0x26e536)));})[_0x5dbbe1(0x107)]((0x0,r[_0x5dbbe1(0xe5)])())};}catch(_0x41cb06){return console[_0x5dbbe1(0xdb)](_0x41cb06),null;}}};d=u([l(0x0,t[_0x4653db(0x10e)])],d);function f(_0x385940){'@babel/helpers - typeof';const _0x349e96=_0x4653db;return f=typeof Symbol==_0x349e96(0x111)&&typeof Symbol[_0x349e96(0xf0)]==_0x349e96(0x102)?function(_0x2c0222){return typeof _0x2c0222;}:function(_0x4e2d1f){const _0x1ec8f6=_0x349e96;return _0x4e2d1f&&typeof Symbol==_0x1ec8f6(0x111)&&_0x4e2d1f[_0x1ec8f6(0x101)]===Symbol&&_0x4e2d1f!==Symbol['prototype']?_0x1ec8f6(0x102):typeof _0x4e2d1f;},f(_0x385940);}function _0x36be(){const _0x4250d0=['UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','registerDependencies','error','573364mJMCFE','string','2690OkNxlN','Observable','addEventListener','21636EXAuRk','getOwnPropertyDescriptor','headers','ILogService','share','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','registerHTTPInterceptor','getConfig','40REQjbr','_doCreateSocket','Plugin','8RNOgFo','open','customHeaders','809248BQYiiP','iterator','onStarting','removeEventListener','ISocketService','154158tqvibm','toDisposable','4488264zIsnGf','DependentOn','setConfig','default','decorate','_registerDependencies','_injector','DisposableCollection','HTTPService','UniverCollaborationClientPlugin','set','constructor','symbol','1.0.0-alpha.3','UniverCollaborationClientNodePlugin','CollaborationSocketService','_config','pipe','defineProperty','@univerjs-pro/collaboration-client-node','WebSocket','next','call','add','IConfigService','toPrimitive','send','function','454263ophVsr','createSocket','length','close','22448052gCGKVg','NodeCollaborationSocketService','message','35QVbTXi','Inject','_configService'];_0x36be=function(){return _0x4250d0;};return _0x36be();}function p(_0x1c7b6c,_0x129bbe){const _0x4b469a=_0x4653db;if(f(_0x1c7b6c)!='object'||!_0x1c7b6c)return _0x1c7b6c;var _0x5f3d39=_0x1c7b6c[Symbol[_0x4b469a(0x10f)]];if(_0x5f3d39!==void 0x0){var _0x20def6=_0x5f3d39[_0x4b469a(0x10c)](_0x1c7b6c,_0x129bbe||_0x4b469a(0xf9));if(f(_0x20def6)!='object')return _0x20def6;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x129bbe===_0x4b469a(0xdd)?String:Number)(_0x1c7b6c);}function m(_0x21ba46){const _0x55ca8f=_0x4653db;var _0x4b86e0=p(_0x21ba46,_0x55ca8f(0xdd));return f(_0x4b86e0)==_0x55ca8f(0x102)?_0x4b86e0:_0x4b86e0+'';}function h(_0x340009,_0x16b1c3,_0x54daf5){const _0x566780=_0x4653db;return(_0x16b1c3=m(_0x16b1c3))in _0x340009?Object[_0x566780(0x108)](_0x340009,_0x16b1c3,{'value':_0x54daf5,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x340009[_0x16b1c3]=_0x54daf5,_0x340009;}let g=class extends t[_0x4653db(0xeb)]{constructor(_0x22c255=c,_0x38b53e,_0x163fde){const _0x335194=_0x4653db;super(),this[_0x335194(0x106)]=_0x22c255,this[_0x335194(0xd8)]=_0x38b53e,this[_0x335194(0xfc)]=_0x163fde;let {..._0x5f59f1}=(0x0,t['merge'])({},c,this[_0x335194(0x106)]);this[_0x335194(0xd8)][_0x335194(0xf8)]('collaboration-client-node.config',_0x5f59f1);}[_0x4653db(0xf1)](){const _0x1de88e=_0x4653db;this[_0x1de88e(0xfb)]();}[_0x4653db(0xfb)](){const _0xbb4fef=_0x4653db;(0x0,t[_0xbb4fef(0xda)])(this[_0xbb4fef(0xfc)],[[n[_0xbb4fef(0xf3)],{'useClass':d}]]);}};h(g,'pluginName',_0x4653db(0xd9)),h(g,'packageName',o),h(g,'version',s),g=u([(0x0,t[_0x4653db(0xf7)])(e[_0x4653db(0xff)]),l(0x1,t[_0x4653db(0x10e)]),l(0x2,(0x0,t[_0x4653db(0xd7)])(t['Injector']))],g);let _=class extends e[_0x4653db(0x105)]{constructor(_0x41358e,_0x2b5d41,_0x5f2ff5,_0x4051c6,_0x48cd0a){const _0x223497=_0x4653db;super(_0x41358e,_0x2b5d41,_0x5f2ff5,_0x4051c6,_0x48cd0a);let _0x33c59a=this[_0x223497(0xd8)][_0x223497(0xe8)](e[_0x223497(0xe6)]);this['_httpService'][_0x223497(0xe7)]({'interceptor':(_0x174f7b,_0x2d76c8)=>{const _0x279b5f=_0x223497;let _0x4b35f1=_0x174f7b[_0x279b5f(0xe3)];if(_0x33c59a!=null&&_0x33c59a[_0x279b5f(0xee)]){for(let _0x1457da in _0x33c59a[_0x279b5f(0xee)])_0x4b35f1[_0x279b5f(0x100)](_0x1457da,_0x33c59a[_0x279b5f(0xee)][_0x1457da]);}return _0x2d76c8(_0x174f7b);}});}async[_0x4653db(0xd0)](_0x49c7a4){const _0x48b3a8=_0x4653db;return this[_0x48b3a8(0xea)](_0x49c7a4);}};_=u([l(0x0,(0x0,t[_0x4653db(0xd7)])(t['Injector'])),l(0x1,(0x0,t[_0x4653db(0xd7)])(n[_0x4653db(0xfe)])),l(0x2,t[_0x4653db(0x10e)]),l(0x3,t[_0x4653db(0xe4)]),l(0x4,a['ISnapshotServerService'])],_),Object[_0x4653db(0x108)](exports,_0x4653db(0xd4),{'enumerable':!0x0,'get':function(){return _;}}),Object['defineProperty'](exports,_0x4653db(0x104),{'enumerable':!0x0,'get':function(){return g;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0xac92aa=_0x371d;(function(_0x24f3e4,_0x2015d1){const _0x14d61a=_0x371d,_0x6835e5=_0x24f3e4();while(!![]){try{const _0x5562af=parseInt(_0x14d61a(0x186))/0x1*(-parseInt(_0x14d61a(0x17e))/0x2)+parseInt(_0x14d61a(0x1a6))/0x3*(parseInt(_0x14d61a(0x19d))/0x4)+parseInt(_0x14d61a(0x192))/0x5+parseInt(_0x14d61a(0x188))/0x6*(parseInt(_0x14d61a(0x182))/0x7)+parseInt(_0x14d61a(0x187))/0x8*(parseInt(_0x14d61a(0x178))/0x9)+-parseInt(_0x14d61a(0x194))/0xa+-parseInt(_0x14d61a(0x1a4))/0xb;if(_0x5562af===_0x2015d1)break;else _0x6835e5['push'](_0x6835e5['shift']());}catch(_0x76a757){_0x6835e5['push'](_0x6835e5['shift']());}}}(_0x2854,0x5e1ec));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x94756f,CollaborationSocketService as _0x2b1e9a,UniverCollaborationClientPlugin as _0xa1d3ad}from'@univerjs-pro/collaboration-client';import{DependentOn as _0xf9a28d,Disposable as _0x4407e6,DisposableCollection as _0x41cb13,IConfigService as _0x396948,ILogService as _0x657ce6,Inject as _0x1f5758,Injector as _0x51b714,Plugin as _0x416e72,registerDependencies as _0x539fc9,toDisposable as _0xd65bd7}from'@univerjs/core';import{HTTPService as _0x44134a,ISocketService as _0x56f629}from'@univerjs/network';import{Observable as _0x164acf,share as _0x397967}from'rxjs';import{WebSocket as _0x33c7b0}from'ws';import{ISnapshotServerService as _0x31ed16}from'@univerjs-pro/collaboration';function _0x371d(_0xbb6ef9,_0x3f48f7){_0xbb6ef9=_0xbb6ef9-0x178;const _0x285496=_0x2854();let _0x371d02=_0x285496[_0xbb6ef9];return _0x371d02;}const y=_0xac92aa(0x18e),b={};var x=_0xac92aa(0x189),S='1.0.0-alpha.1';function C(_0x4033c3,_0x406b8c){return function(_0x505a5f,_0x1029d8){_0x406b8c(_0x505a5f,_0x1029d8,_0x4033c3);};}function w(_0x4ff3b5,_0x1763f1,_0x4782b2,_0x48e062){const _0x755b62=_0xac92aa;var _0x4bbdba=arguments[_0x755b62(0x183)],_0x4fff36=_0x4bbdba<0x3?_0x1763f1:_0x48e062===null?_0x48e062=Object[_0x755b62(0x17b)](_0x1763f1,_0x4782b2):_0x48e062,_0x58a209;if(typeof Reflect==_0x755b62(0x199)&&typeof Reflect[_0x755b62(0x195)]==_0x755b62(0x18c))_0x4fff36=Reflect['decorate'](_0x4ff3b5,_0x1763f1,_0x4782b2,_0x48e062);else{for(var _0xf7b930=_0x4ff3b5[_0x755b62(0x183)]-0x1;_0xf7b930>=0x0;_0xf7b930--)(_0x58a209=_0x4ff3b5[_0xf7b930])&&(_0x4fff36=(_0x4bbdba<0x3?_0x58a209(_0x4fff36):_0x4bbdba>0x3?_0x58a209(_0x1763f1,_0x4782b2,_0x4fff36):_0x58a209(_0x1763f1,_0x4782b2))||_0x4fff36);}return _0x4bbdba>0x3&&_0x4fff36&&Object[_0x755b62(0x198)](_0x1763f1,_0x4782b2,_0x4fff36),_0x4fff36;}let T=class extends _0x4407e6{constructor(_0x493ac2){super(),this['_configService']=_0x493ac2;}['createSocket'](_0x5ba4bf){const _0x569aac=_0xac92aa;var _0x3175a6;let _0x260957=((_0x3175a6=this['_configService'][_0x569aac(0x17a)](_0x94756f))==null?void 0x0:_0x3175a6[_0x569aac(0x185)])||{};try{let _0x3b6c07=new _0x33c7b0(_0x5ba4bf,{'headers':{..._0x260957}}),_0x18bdee=new _0x41cb13();return{'URL':_0x5ba4bf,'close':(_0x5c25b3,_0x3c828c)=>{const _0x46756c=_0x569aac;_0x3b6c07[_0x46756c(0x190)](_0x5c25b3,_0x3c828c),_0x18bdee[_0x46756c(0x196)]();},'send':_0x2797ba=>{_0x3b6c07['send'](_0x2797ba);},'open$':new _0x164acf(_0x2e55fb=>{const _0x4794eb=_0x569aac;let _0x8d6553=_0x11de0a=>_0x2e55fb['next'](_0x11de0a);_0x3b6c07[_0x4794eb(0x191)](_0x4794eb(0x1aa),_0x8d6553),_0x18bdee['add'](_0xd65bd7(()=>_0x3b6c07[_0x4794eb(0x18b)](_0x4794eb(0x1aa),_0x8d6553)));})[_0x569aac(0x1a8)](_0x397967()),'close$':new _0x164acf(_0x41dcff=>{const _0x490daa=_0x569aac;let _0x48e8d5=_0x4304f2=>_0x41dcff['next'](_0x4304f2);_0x3b6c07[_0x490daa(0x191)](_0x490daa(0x190),_0x48e8d5),_0x18bdee['add'](_0xd65bd7(()=>_0x3b6c07[_0x490daa(0x18b)](_0x490daa(0x190),_0x48e8d5)));})[_0x569aac(0x1a8)](_0x397967()),'error$':new _0x164acf(_0x173311=>{const _0x2f7a07=_0x569aac;let _0xb979fd=_0xfaac5c=>_0x173311[_0x2f7a07(0x1a3)](_0xfaac5c);_0x3b6c07['addEventListener'](_0x2f7a07(0x19f),_0xb979fd),_0x18bdee[_0x2f7a07(0x197)](_0xd65bd7(()=>_0x3b6c07['removeEventListener'](_0x2f7a07(0x19f),_0xb979fd)));})['pipe'](_0x397967()),'message$':new _0x164acf(_0x3577b8=>{const _0x3b873d=_0x569aac;let _0x2e2e2f=_0x2ed7c8=>_0x3577b8['next'](_0x2ed7c8);_0x3b6c07[_0x3b873d(0x191)]('message',_0x2e2e2f),_0x18bdee['add'](_0xd65bd7(()=>_0x3b6c07[_0x3b873d(0x18b)](_0x3b873d(0x17c),_0x2e2e2f)));})['pipe'](_0x397967())};}catch(_0x3d1720){return console[_0x569aac(0x19f)](_0x3d1720),null;}}};T=w([C(0x0,_0x396948)],T);function E(_0x4eba55){'@babel/helpers - typeof';const _0x525b3a=_0xac92aa;return E=typeof Symbol==_0x525b3a(0x18c)&&typeof Symbol[_0x525b3a(0x1a0)]==_0x525b3a(0x1a2)?function(_0x70120b){return typeof _0x70120b;}:function(_0x4b2e0b){const _0x5e66ff=_0x525b3a;return _0x4b2e0b&&typeof Symbol==_0x5e66ff(0x18c)&&_0x4b2e0b[_0x5e66ff(0x18a)]===Symbol&&_0x4b2e0b!==Symbol['prototype']?'symbol':typeof _0x4b2e0b;},E(_0x4eba55);}function D(_0x5b4b4f,_0x4084d6){const _0x3a02c7=_0xac92aa;if(E(_0x5b4b4f)!='object'||!_0x5b4b4f)return _0x5b4b4f;var _0x1792c8=_0x5b4b4f[Symbol[_0x3a02c7(0x19b)]];if(_0x1792c8!==void 0x0){var _0x5c901d=_0x1792c8[_0x3a02c7(0x180)](_0x5b4b4f,_0x4084d6||_0x3a02c7(0x1a9));if(E(_0x5c901d)!=_0x3a02c7(0x199))return _0x5c901d;throw TypeError(_0x3a02c7(0x179));}return(_0x4084d6===_0x3a02c7(0x19e)?String:Number)(_0x5b4b4f);}function O(_0x1b02ae){const _0x24f695=_0xac92aa;var _0x1e3012=D(_0x1b02ae,_0x24f695(0x19e));return E(_0x1e3012)=='symbol'?_0x1e3012:_0x1e3012+'';}function k(_0x205354,_0x466449,_0x4b5a8c){const _0xbae024=_0xac92aa;return(_0x466449=O(_0x466449))in _0x205354?Object[_0xbae024(0x198)](_0x205354,_0x466449,{'value':_0x4b5a8c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x205354[_0x466449]=_0x4b5a8c,_0x205354;}let A=class extends _0x416e72{constructor(_0x1da9f6=b,_0x4fdd5f,_0x520db6){const _0x2a9f65=_0xac92aa;super(),this['_configService']=_0x4fdd5f,this[_0x2a9f65(0x18d)]=_0x520db6,this[_0x2a9f65(0x181)][_0x2a9f65(0x1a7)](y,_0x1da9f6);}[_0xac92aa(0x19a)](){const _0x517ea8=_0xac92aa;this[_0x517ea8(0x1a1)]();}[_0xac92aa(0x1a1)](){const _0x11657a=_0xac92aa;_0x539fc9(this[_0x11657a(0x18d)],[[_0x56f629,{'useClass':T}]]);}};k(A,_0xac92aa(0x18f),_0xac92aa(0x1a5)),k(A,'packageName',x),k(A,_0xac92aa(0x193),S),A=w([_0xf9a28d(_0xa1d3ad),C(0x1,_0x396948),C(0x2,_0x1f5758(_0x51b714))],A);let j=class extends _0x2b1e9a{constructor(_0x6787f4,_0x1129ba,_0x322a69,_0x3cfee2,_0x428867){const _0x32b6c7=_0xac92aa;super(_0x6787f4,_0x1129ba,_0x322a69,_0x3cfee2,_0x428867);let _0x16b5a5=this[_0x32b6c7(0x181)][_0x32b6c7(0x17a)](_0x94756f);this[_0x32b6c7(0x184)][_0x32b6c7(0x17f)]({'interceptor':(_0x1c0f1c,_0x23ca59)=>{const _0x2ed286=_0x32b6c7;let _0x465ce6=_0x1c0f1c[_0x2ed286(0x19c)];if(_0x16b5a5!=null&&_0x16b5a5[_0x2ed286(0x185)]){for(let _0x56b75c in _0x16b5a5[_0x2ed286(0x185)])_0x465ce6[_0x2ed286(0x17d)](_0x56b75c,_0x16b5a5[_0x2ed286(0x185)][_0x56b75c]);}return _0x23ca59(_0x1c0f1c);}});}async['createSocket'](_0x53cbd7){return this['_doCreateSocket'](_0x53cbd7);}};function _0x2854(){const _0x48ba41=['toPrimitive','headers','104vetNgo','string','error','iterator','_registerDependencies','symbol','next','8802717OFNfGM','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','59526zTxgwH','setConfig','pipe','default','open','2745621QXgVKz','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getConfig','getOwnPropertyDescriptor','message','set','2tXeIMO','registerHTTPInterceptor','call','_configService','14GitPhr','length','_httpService','customHeaders','192553YozEGf','8IdBLpw','2245794SNErPt','@univerjs-pro/collaboration-client-node','constructor','removeEventListener','function','_injector','collaboration-client-node.config','pluginName','close','addEventListener','2725580oHoUHr','version','7363590ktgcCz','decorate','dispose','add','defineProperty','object','onStarting'];_0x2854=function(){return _0x48ba41;};return _0x2854();}j=w([C(0x0,_0x1f5758(_0x51b714)),C(0x1,_0x1f5758(_0x44134a)),C(0x2,_0x396948),C(0x3,_0x657ce6),C(0x4,_0x31ed16)],j);export{y as COLLABORATION_CLIENT_NODE_CONFIG_KEY,j as NodeCollaborationSocketService,A as UniverCollaborationClientNodePlugin};
1
+ const _0x1e2818=_0x5307;(function(_0x3fea99,_0x2be911){const _0x2c5689=_0x5307,_0x32b22a=_0x3fea99();while(!![]){try{const _0x1303f0=-parseInt(_0x2c5689(0xc7))/0x1+-parseInt(_0x2c5689(0xca))/0x2+-parseInt(_0x2c5689(0xe2))/0x3*(parseInt(_0x2c5689(0xdf))/0x4)+-parseInt(_0x2c5689(0xd6))/0x5+-parseInt(_0x2c5689(0xe4))/0x6+-parseInt(_0x2c5689(0xde))/0x7*(-parseInt(_0x2c5689(0xc2))/0x8)+parseInt(_0x2c5689(0xcd))/0x9;if(_0x1303f0===_0x2be911)break;else _0x32b22a['push'](_0x32b22a['shift']());}catch(_0x3b0b25){_0x32b22a['push'](_0x32b22a['shift']());}}}(_0x5128,0xda314));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x4e5daa,CollaborationSocketService as _0x25f30a,UniverCollaborationClientPlugin as _0xdb8f3f}from'@univerjs-pro/collaboration-client';import{DependentOn as _0x5648fd,Disposable as _0x2975d2,DisposableCollection as _0x368e18,IConfigService as _0x13630e,ILogService as _0x1c40b7,Inject as _0x448794,Injector as _0xc9fc84,Plugin as _0x3d60aa,merge as _0x4fb716,registerDependencies as _0x574e2a,toDisposable as _0x368404}from'@univerjs/core';import{HTTPService as _0x131df7,ISocketService as _0x4ecbc0}from'@univerjs/network';import{Observable as _0x4986fb,share as _0x1d5cdf}from'rxjs';import{WebSocket as _0x7dd87d}from'ws';import{ISnapshotServerService as _0x43822f}from'@univerjs-pro/collaboration';function _0x5307(_0x135256,_0x3dac26){_0x135256=_0x135256-0xbf;const _0x512837=_0x5128();let _0x530704=_0x512837[_0x135256];return _0x530704;}var b=_0x1e2818(0xe3),x=_0x1e2818(0xd4);function _0x5128(){const _0x310dbb=['add','8XhzLxJ','version','default','dispose','constructor','445764yfKkdZ','string','toPrimitive','2888694vNtAqA','getConfig','iterator','38367027lmKrzR','symbol','getOwnPropertyDescriptor','customHeaders','function','pluginName','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','1.0.0-alpha.3','_config','6463815ZeKxXl','_injector','_registerDependencies','close','object','pipe','length','headers','9399411dwJjFU','1036ELHEXF','createSocket','decorate','10419eTamaZ','@univerjs-pro/collaboration-client-node','3778074KvWRjk','defineProperty','removeEventListener','_configService','_httpService','_doCreateSocket','error','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','set','next','addEventListener','open','setConfig'];_0x5128=function(){return _0x310dbb;};return _0x5128();}const S={};function C(_0x262061,_0x3af044){return function(_0x542416,_0x3643ac){_0x3af044(_0x542416,_0x3643ac,_0x262061);};}function w(_0x331a70,_0x24c79a,_0x16bbad,_0x4c12a6){const _0x90c57=_0x1e2818;var _0x5630a8=arguments[_0x90c57(0xdc)],_0x27a181=_0x5630a8<0x3?_0x24c79a:_0x4c12a6===null?_0x4c12a6=Object[_0x90c57(0xcf)](_0x24c79a,_0x16bbad):_0x4c12a6,_0x559eb0;if(typeof Reflect==_0x90c57(0xda)&&typeof Reflect[_0x90c57(0xe1)]==_0x90c57(0xd1))_0x27a181=Reflect[_0x90c57(0xe1)](_0x331a70,_0x24c79a,_0x16bbad,_0x4c12a6);else{for(var _0x29facb=_0x331a70[_0x90c57(0xdc)]-0x1;_0x29facb>=0x0;_0x29facb--)(_0x559eb0=_0x331a70[_0x29facb])&&(_0x27a181=(_0x5630a8<0x3?_0x559eb0(_0x27a181):_0x5630a8>0x3?_0x559eb0(_0x24c79a,_0x16bbad,_0x27a181):_0x559eb0(_0x24c79a,_0x16bbad))||_0x27a181);}return _0x5630a8>0x3&&_0x27a181&&Object[_0x90c57(0xe5)](_0x24c79a,_0x16bbad,_0x27a181),_0x27a181;}let T=class extends _0x2975d2{constructor(_0x5d64f4){const _0x475eae=_0x1e2818;super(),this[_0x475eae(0xe7)]=_0x5d64f4;}[_0x1e2818(0xe0)](_0x1cfcef){const _0x5f0706=_0x1e2818;var _0x5051ec;let _0x37779f=((_0x5051ec=this[_0x5f0706(0xe7)][_0x5f0706(0xcb)](_0x4e5daa))==null?void 0x0:_0x5051ec[_0x5f0706(0xd0)])||{};try{let _0x4009c2=new _0x7dd87d(_0x1cfcef,{'headers':{..._0x37779f}}),_0x3d49d8=new _0x368e18();return{'URL':_0x1cfcef,'close':(_0x2e7dd5,_0x24a7f8)=>{const _0x44cbd6=_0x5f0706;_0x4009c2[_0x44cbd6(0xd9)](_0x2e7dd5,_0x24a7f8),_0x3d49d8[_0x44cbd6(0xc5)]();},'send':_0x42502d=>{_0x4009c2['send'](_0x42502d);},'open$':new _0x4986fb(_0x4109b5=>{const _0x32b81a=_0x5f0706;let _0x16b3d1=_0x804b28=>_0x4109b5[_0x32b81a(0xed)](_0x804b28);_0x4009c2[_0x32b81a(0xee)](_0x32b81a(0xbf),_0x16b3d1),_0x3d49d8['add'](_0x368404(()=>_0x4009c2[_0x32b81a(0xe6)](_0x32b81a(0xbf),_0x16b3d1)));})['pipe'](_0x1d5cdf()),'close$':new _0x4986fb(_0x18df28=>{const _0x139cdc=_0x5f0706;let _0x1f7380=_0x15fb10=>_0x18df28[_0x139cdc(0xed)](_0x15fb10);_0x4009c2[_0x139cdc(0xee)](_0x139cdc(0xd9),_0x1f7380),_0x3d49d8['add'](_0x368404(()=>_0x4009c2['removeEventListener'](_0x139cdc(0xd9),_0x1f7380)));})[_0x5f0706(0xdb)](_0x1d5cdf()),'error$':new _0x4986fb(_0x4ff911=>{const _0x3b7988=_0x5f0706;let _0x232bd1=_0x152b65=>_0x4ff911['next'](_0x152b65);_0x4009c2[_0x3b7988(0xee)](_0x3b7988(0xea),_0x232bd1),_0x3d49d8[_0x3b7988(0xc1)](_0x368404(()=>_0x4009c2[_0x3b7988(0xe6)](_0x3b7988(0xea),_0x232bd1)));})[_0x5f0706(0xdb)](_0x1d5cdf()),'message$':new _0x4986fb(_0x175e2f=>{const _0x1ac44a=_0x5f0706;let _0x3e15df=_0xa055bc=>_0x175e2f[_0x1ac44a(0xed)](_0xa055bc);_0x4009c2[_0x1ac44a(0xee)]('message',_0x3e15df),_0x3d49d8[_0x1ac44a(0xc1)](_0x368404(()=>_0x4009c2[_0x1ac44a(0xe6)]('message',_0x3e15df)));})[_0x5f0706(0xdb)](_0x1d5cdf())};}catch(_0x3bee39){return console[_0x5f0706(0xea)](_0x3bee39),null;}}};T=w([C(0x0,_0x13630e)],T);function E(_0x421e66){'@babel/helpers - typeof';const _0x511a8e=_0x1e2818;return E=typeof Symbol==_0x511a8e(0xd1)&&typeof Symbol[_0x511a8e(0xcc)]=='symbol'?function(_0x1ac12e){return typeof _0x1ac12e;}:function(_0x54795b){const _0x312976=_0x511a8e;return _0x54795b&&typeof Symbol==_0x312976(0xd1)&&_0x54795b[_0x312976(0xc6)]===Symbol&&_0x54795b!==Symbol['prototype']?_0x312976(0xce):typeof _0x54795b;},E(_0x421e66);}function D(_0xe23f5f,_0x408d5d){const _0x7a583a=_0x1e2818;if(E(_0xe23f5f)!=_0x7a583a(0xda)||!_0xe23f5f)return _0xe23f5f;var _0x50cf83=_0xe23f5f[Symbol[_0x7a583a(0xc9)]];if(_0x50cf83!==void 0x0){var _0x49e76d=_0x50cf83['call'](_0xe23f5f,_0x408d5d||_0x7a583a(0xc4));if(E(_0x49e76d)!=_0x7a583a(0xda))return _0x49e76d;throw TypeError(_0x7a583a(0xeb));}return(_0x408d5d==='string'?String:Number)(_0xe23f5f);}function O(_0x1142a3){const _0x2b6eae=_0x1e2818;var _0x270b82=D(_0x1142a3,_0x2b6eae(0xc8));return E(_0x270b82)==_0x2b6eae(0xce)?_0x270b82:_0x270b82+'';}function k(_0xdad26d,_0x2c7a53,_0x55f920){return(_0x2c7a53=O(_0x2c7a53))in _0xdad26d?Object['defineProperty'](_0xdad26d,_0x2c7a53,{'value':_0x55f920,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xdad26d[_0x2c7a53]=_0x55f920,_0xdad26d;}let A=class extends _0x3d60aa{constructor(_0x1ba31d=S,_0x54eff2,_0x2de5d2){const _0x1fd4b4=_0x1e2818;super(),this['_config']=_0x1ba31d,this[_0x1fd4b4(0xe7)]=_0x54eff2,this[_0x1fd4b4(0xd7)]=_0x2de5d2;let {..._0x42b856}=_0x4fb716({},S,this[_0x1fd4b4(0xd5)]);this[_0x1fd4b4(0xe7)][_0x1fd4b4(0xc0)]('collaboration-client-node.config',_0x42b856);}['onStarting'](){const _0x1d541d=_0x1e2818;this[_0x1d541d(0xd8)]();}[_0x1e2818(0xd8)](){const _0x493752=_0x1e2818;_0x574e2a(this[_0x493752(0xd7)],[[_0x4ecbc0,{'useClass':T}]]);}};k(A,_0x1e2818(0xd2),_0x1e2818(0xd3)),k(A,'packageName',b),k(A,_0x1e2818(0xc3),x),A=w([_0x5648fd(_0xdb8f3f),C(0x1,_0x13630e),C(0x2,_0x448794(_0xc9fc84))],A);let j=class extends _0x25f30a{constructor(_0x5cc5c2,_0x2fe64f,_0x5589b9,_0x281cd0,_0x18f88c){const _0x2fb5bc=_0x1e2818;super(_0x5cc5c2,_0x2fe64f,_0x5589b9,_0x281cd0,_0x18f88c);let _0x13ed15=this[_0x2fb5bc(0xe7)]['getConfig'](_0x4e5daa);this[_0x2fb5bc(0xe8)]['registerHTTPInterceptor']({'interceptor':(_0x524d3b,_0x7b85d5)=>{const _0x13df7f=_0x2fb5bc;let _0x5e48fe=_0x524d3b[_0x13df7f(0xdd)];if(_0x13ed15!=null&&_0x13ed15['customHeaders']){for(let _0xd47d7 in _0x13ed15['customHeaders'])_0x5e48fe[_0x13df7f(0xec)](_0xd47d7,_0x13ed15[_0x13df7f(0xd0)][_0xd47d7]);}return _0x7b85d5(_0x524d3b);}});}async[_0x1e2818(0xe0)](_0x186847){const _0x551e7f=_0x1e2818;return this[_0x551e7f(0xe9)](_0x186847);}};j=w([C(0x0,_0x448794(_0xc9fc84)),C(0x1,_0x448794(_0x131df7)),C(0x2,_0x13630e),C(0x3,_0x1c40b7),C(0x4,_0x43822f)],j);export{j as NodeCollaborationSocketService,A as UniverCollaborationClientNodePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0xac92aa=_0x371d;(function(_0x24f3e4,_0x2015d1){const _0x14d61a=_0x371d,_0x6835e5=_0x24f3e4();while(!![]){try{const _0x5562af=parseInt(_0x14d61a(0x186))/0x1*(-parseInt(_0x14d61a(0x17e))/0x2)+parseInt(_0x14d61a(0x1a6))/0x3*(parseInt(_0x14d61a(0x19d))/0x4)+parseInt(_0x14d61a(0x192))/0x5+parseInt(_0x14d61a(0x188))/0x6*(parseInt(_0x14d61a(0x182))/0x7)+parseInt(_0x14d61a(0x187))/0x8*(parseInt(_0x14d61a(0x178))/0x9)+-parseInt(_0x14d61a(0x194))/0xa+-parseInt(_0x14d61a(0x1a4))/0xb;if(_0x5562af===_0x2015d1)break;else _0x6835e5['push'](_0x6835e5['shift']());}catch(_0x76a757){_0x6835e5['push'](_0x6835e5['shift']());}}}(_0x2854,0x5e1ec));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x94756f,CollaborationSocketService as _0x2b1e9a,UniverCollaborationClientPlugin as _0xa1d3ad}from'@univerjs-pro/collaboration-client';import{DependentOn as _0xf9a28d,Disposable as _0x4407e6,DisposableCollection as _0x41cb13,IConfigService as _0x396948,ILogService as _0x657ce6,Inject as _0x1f5758,Injector as _0x51b714,Plugin as _0x416e72,registerDependencies as _0x539fc9,toDisposable as _0xd65bd7}from'@univerjs/core';import{HTTPService as _0x44134a,ISocketService as _0x56f629}from'@univerjs/network';import{Observable as _0x164acf,share as _0x397967}from'rxjs';import{WebSocket as _0x33c7b0}from'ws';import{ISnapshotServerService as _0x31ed16}from'@univerjs-pro/collaboration';function _0x371d(_0xbb6ef9,_0x3f48f7){_0xbb6ef9=_0xbb6ef9-0x178;const _0x285496=_0x2854();let _0x371d02=_0x285496[_0xbb6ef9];return _0x371d02;}const y=_0xac92aa(0x18e),b={};var x=_0xac92aa(0x189),S='1.0.0-alpha.1';function C(_0x4033c3,_0x406b8c){return function(_0x505a5f,_0x1029d8){_0x406b8c(_0x505a5f,_0x1029d8,_0x4033c3);};}function w(_0x4ff3b5,_0x1763f1,_0x4782b2,_0x48e062){const _0x755b62=_0xac92aa;var _0x4bbdba=arguments[_0x755b62(0x183)],_0x4fff36=_0x4bbdba<0x3?_0x1763f1:_0x48e062===null?_0x48e062=Object[_0x755b62(0x17b)](_0x1763f1,_0x4782b2):_0x48e062,_0x58a209;if(typeof Reflect==_0x755b62(0x199)&&typeof Reflect[_0x755b62(0x195)]==_0x755b62(0x18c))_0x4fff36=Reflect['decorate'](_0x4ff3b5,_0x1763f1,_0x4782b2,_0x48e062);else{for(var _0xf7b930=_0x4ff3b5[_0x755b62(0x183)]-0x1;_0xf7b930>=0x0;_0xf7b930--)(_0x58a209=_0x4ff3b5[_0xf7b930])&&(_0x4fff36=(_0x4bbdba<0x3?_0x58a209(_0x4fff36):_0x4bbdba>0x3?_0x58a209(_0x1763f1,_0x4782b2,_0x4fff36):_0x58a209(_0x1763f1,_0x4782b2))||_0x4fff36);}return _0x4bbdba>0x3&&_0x4fff36&&Object[_0x755b62(0x198)](_0x1763f1,_0x4782b2,_0x4fff36),_0x4fff36;}let T=class extends _0x4407e6{constructor(_0x493ac2){super(),this['_configService']=_0x493ac2;}['createSocket'](_0x5ba4bf){const _0x569aac=_0xac92aa;var _0x3175a6;let _0x260957=((_0x3175a6=this['_configService'][_0x569aac(0x17a)](_0x94756f))==null?void 0x0:_0x3175a6[_0x569aac(0x185)])||{};try{let _0x3b6c07=new _0x33c7b0(_0x5ba4bf,{'headers':{..._0x260957}}),_0x18bdee=new _0x41cb13();return{'URL':_0x5ba4bf,'close':(_0x5c25b3,_0x3c828c)=>{const _0x46756c=_0x569aac;_0x3b6c07[_0x46756c(0x190)](_0x5c25b3,_0x3c828c),_0x18bdee[_0x46756c(0x196)]();},'send':_0x2797ba=>{_0x3b6c07['send'](_0x2797ba);},'open$':new _0x164acf(_0x2e55fb=>{const _0x4794eb=_0x569aac;let _0x8d6553=_0x11de0a=>_0x2e55fb['next'](_0x11de0a);_0x3b6c07[_0x4794eb(0x191)](_0x4794eb(0x1aa),_0x8d6553),_0x18bdee['add'](_0xd65bd7(()=>_0x3b6c07[_0x4794eb(0x18b)](_0x4794eb(0x1aa),_0x8d6553)));})[_0x569aac(0x1a8)](_0x397967()),'close$':new _0x164acf(_0x41dcff=>{const _0x490daa=_0x569aac;let _0x48e8d5=_0x4304f2=>_0x41dcff['next'](_0x4304f2);_0x3b6c07[_0x490daa(0x191)](_0x490daa(0x190),_0x48e8d5),_0x18bdee['add'](_0xd65bd7(()=>_0x3b6c07[_0x490daa(0x18b)](_0x490daa(0x190),_0x48e8d5)));})[_0x569aac(0x1a8)](_0x397967()),'error$':new _0x164acf(_0x173311=>{const _0x2f7a07=_0x569aac;let _0xb979fd=_0xfaac5c=>_0x173311[_0x2f7a07(0x1a3)](_0xfaac5c);_0x3b6c07['addEventListener'](_0x2f7a07(0x19f),_0xb979fd),_0x18bdee[_0x2f7a07(0x197)](_0xd65bd7(()=>_0x3b6c07['removeEventListener'](_0x2f7a07(0x19f),_0xb979fd)));})['pipe'](_0x397967()),'message$':new _0x164acf(_0x3577b8=>{const _0x3b873d=_0x569aac;let _0x2e2e2f=_0x2ed7c8=>_0x3577b8['next'](_0x2ed7c8);_0x3b6c07[_0x3b873d(0x191)]('message',_0x2e2e2f),_0x18bdee['add'](_0xd65bd7(()=>_0x3b6c07[_0x3b873d(0x18b)](_0x3b873d(0x17c),_0x2e2e2f)));})['pipe'](_0x397967())};}catch(_0x3d1720){return console[_0x569aac(0x19f)](_0x3d1720),null;}}};T=w([C(0x0,_0x396948)],T);function E(_0x4eba55){'@babel/helpers - typeof';const _0x525b3a=_0xac92aa;return E=typeof Symbol==_0x525b3a(0x18c)&&typeof Symbol[_0x525b3a(0x1a0)]==_0x525b3a(0x1a2)?function(_0x70120b){return typeof _0x70120b;}:function(_0x4b2e0b){const _0x5e66ff=_0x525b3a;return _0x4b2e0b&&typeof Symbol==_0x5e66ff(0x18c)&&_0x4b2e0b[_0x5e66ff(0x18a)]===Symbol&&_0x4b2e0b!==Symbol['prototype']?'symbol':typeof _0x4b2e0b;},E(_0x4eba55);}function D(_0x5b4b4f,_0x4084d6){const _0x3a02c7=_0xac92aa;if(E(_0x5b4b4f)!='object'||!_0x5b4b4f)return _0x5b4b4f;var _0x1792c8=_0x5b4b4f[Symbol[_0x3a02c7(0x19b)]];if(_0x1792c8!==void 0x0){var _0x5c901d=_0x1792c8[_0x3a02c7(0x180)](_0x5b4b4f,_0x4084d6||_0x3a02c7(0x1a9));if(E(_0x5c901d)!=_0x3a02c7(0x199))return _0x5c901d;throw TypeError(_0x3a02c7(0x179));}return(_0x4084d6===_0x3a02c7(0x19e)?String:Number)(_0x5b4b4f);}function O(_0x1b02ae){const _0x24f695=_0xac92aa;var _0x1e3012=D(_0x1b02ae,_0x24f695(0x19e));return E(_0x1e3012)=='symbol'?_0x1e3012:_0x1e3012+'';}function k(_0x205354,_0x466449,_0x4b5a8c){const _0xbae024=_0xac92aa;return(_0x466449=O(_0x466449))in _0x205354?Object[_0xbae024(0x198)](_0x205354,_0x466449,{'value':_0x4b5a8c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x205354[_0x466449]=_0x4b5a8c,_0x205354;}let A=class extends _0x416e72{constructor(_0x1da9f6=b,_0x4fdd5f,_0x520db6){const _0x2a9f65=_0xac92aa;super(),this['_configService']=_0x4fdd5f,this[_0x2a9f65(0x18d)]=_0x520db6,this[_0x2a9f65(0x181)][_0x2a9f65(0x1a7)](y,_0x1da9f6);}[_0xac92aa(0x19a)](){const _0x517ea8=_0xac92aa;this[_0x517ea8(0x1a1)]();}[_0xac92aa(0x1a1)](){const _0x11657a=_0xac92aa;_0x539fc9(this[_0x11657a(0x18d)],[[_0x56f629,{'useClass':T}]]);}};k(A,_0xac92aa(0x18f),_0xac92aa(0x1a5)),k(A,'packageName',x),k(A,_0xac92aa(0x193),S),A=w([_0xf9a28d(_0xa1d3ad),C(0x1,_0x396948),C(0x2,_0x1f5758(_0x51b714))],A);let j=class extends _0x2b1e9a{constructor(_0x6787f4,_0x1129ba,_0x322a69,_0x3cfee2,_0x428867){const _0x32b6c7=_0xac92aa;super(_0x6787f4,_0x1129ba,_0x322a69,_0x3cfee2,_0x428867);let _0x16b5a5=this[_0x32b6c7(0x181)][_0x32b6c7(0x17a)](_0x94756f);this[_0x32b6c7(0x184)][_0x32b6c7(0x17f)]({'interceptor':(_0x1c0f1c,_0x23ca59)=>{const _0x2ed286=_0x32b6c7;let _0x465ce6=_0x1c0f1c[_0x2ed286(0x19c)];if(_0x16b5a5!=null&&_0x16b5a5[_0x2ed286(0x185)]){for(let _0x56b75c in _0x16b5a5[_0x2ed286(0x185)])_0x465ce6[_0x2ed286(0x17d)](_0x56b75c,_0x16b5a5[_0x2ed286(0x185)][_0x56b75c]);}return _0x23ca59(_0x1c0f1c);}});}async['createSocket'](_0x53cbd7){return this['_doCreateSocket'](_0x53cbd7);}};function _0x2854(){const _0x48ba41=['toPrimitive','headers','104vetNgo','string','error','iterator','_registerDependencies','symbol','next','8802717OFNfGM','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','59526zTxgwH','setConfig','pipe','default','open','2745621QXgVKz','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getConfig','getOwnPropertyDescriptor','message','set','2tXeIMO','registerHTTPInterceptor','call','_configService','14GitPhr','length','_httpService','customHeaders','192553YozEGf','8IdBLpw','2245794SNErPt','@univerjs-pro/collaboration-client-node','constructor','removeEventListener','function','_injector','collaboration-client-node.config','pluginName','close','addEventListener','2725580oHoUHr','version','7363590ktgcCz','decorate','dispose','add','defineProperty','object','onStarting'];_0x2854=function(){return _0x48ba41;};return _0x2854();}j=w([C(0x0,_0x1f5758(_0x51b714)),C(0x1,_0x1f5758(_0x44134a)),C(0x2,_0x396948),C(0x3,_0x657ce6),C(0x4,_0x31ed16)],j);export{y as COLLABORATION_CLIENT_NODE_CONFIG_KEY,j as NodeCollaborationSocketService,A as UniverCollaborationClientNodePlugin};
1
+ const _0x1e2818=_0x5307;(function(_0x3fea99,_0x2be911){const _0x2c5689=_0x5307,_0x32b22a=_0x3fea99();while(!![]){try{const _0x1303f0=-parseInt(_0x2c5689(0xc7))/0x1+-parseInt(_0x2c5689(0xca))/0x2+-parseInt(_0x2c5689(0xe2))/0x3*(parseInt(_0x2c5689(0xdf))/0x4)+-parseInt(_0x2c5689(0xd6))/0x5+-parseInt(_0x2c5689(0xe4))/0x6+-parseInt(_0x2c5689(0xde))/0x7*(-parseInt(_0x2c5689(0xc2))/0x8)+parseInt(_0x2c5689(0xcd))/0x9;if(_0x1303f0===_0x2be911)break;else _0x32b22a['push'](_0x32b22a['shift']());}catch(_0x3b0b25){_0x32b22a['push'](_0x32b22a['shift']());}}}(_0x5128,0xda314));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x4e5daa,CollaborationSocketService as _0x25f30a,UniverCollaborationClientPlugin as _0xdb8f3f}from'@univerjs-pro/collaboration-client';import{DependentOn as _0x5648fd,Disposable as _0x2975d2,DisposableCollection as _0x368e18,IConfigService as _0x13630e,ILogService as _0x1c40b7,Inject as _0x448794,Injector as _0xc9fc84,Plugin as _0x3d60aa,merge as _0x4fb716,registerDependencies as _0x574e2a,toDisposable as _0x368404}from'@univerjs/core';import{HTTPService as _0x131df7,ISocketService as _0x4ecbc0}from'@univerjs/network';import{Observable as _0x4986fb,share as _0x1d5cdf}from'rxjs';import{WebSocket as _0x7dd87d}from'ws';import{ISnapshotServerService as _0x43822f}from'@univerjs-pro/collaboration';function _0x5307(_0x135256,_0x3dac26){_0x135256=_0x135256-0xbf;const _0x512837=_0x5128();let _0x530704=_0x512837[_0x135256];return _0x530704;}var b=_0x1e2818(0xe3),x=_0x1e2818(0xd4);function _0x5128(){const _0x310dbb=['add','8XhzLxJ','version','default','dispose','constructor','445764yfKkdZ','string','toPrimitive','2888694vNtAqA','getConfig','iterator','38367027lmKrzR','symbol','getOwnPropertyDescriptor','customHeaders','function','pluginName','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','1.0.0-alpha.3','_config','6463815ZeKxXl','_injector','_registerDependencies','close','object','pipe','length','headers','9399411dwJjFU','1036ELHEXF','createSocket','decorate','10419eTamaZ','@univerjs-pro/collaboration-client-node','3778074KvWRjk','defineProperty','removeEventListener','_configService','_httpService','_doCreateSocket','error','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','set','next','addEventListener','open','setConfig'];_0x5128=function(){return _0x310dbb;};return _0x5128();}const S={};function C(_0x262061,_0x3af044){return function(_0x542416,_0x3643ac){_0x3af044(_0x542416,_0x3643ac,_0x262061);};}function w(_0x331a70,_0x24c79a,_0x16bbad,_0x4c12a6){const _0x90c57=_0x1e2818;var _0x5630a8=arguments[_0x90c57(0xdc)],_0x27a181=_0x5630a8<0x3?_0x24c79a:_0x4c12a6===null?_0x4c12a6=Object[_0x90c57(0xcf)](_0x24c79a,_0x16bbad):_0x4c12a6,_0x559eb0;if(typeof Reflect==_0x90c57(0xda)&&typeof Reflect[_0x90c57(0xe1)]==_0x90c57(0xd1))_0x27a181=Reflect[_0x90c57(0xe1)](_0x331a70,_0x24c79a,_0x16bbad,_0x4c12a6);else{for(var _0x29facb=_0x331a70[_0x90c57(0xdc)]-0x1;_0x29facb>=0x0;_0x29facb--)(_0x559eb0=_0x331a70[_0x29facb])&&(_0x27a181=(_0x5630a8<0x3?_0x559eb0(_0x27a181):_0x5630a8>0x3?_0x559eb0(_0x24c79a,_0x16bbad,_0x27a181):_0x559eb0(_0x24c79a,_0x16bbad))||_0x27a181);}return _0x5630a8>0x3&&_0x27a181&&Object[_0x90c57(0xe5)](_0x24c79a,_0x16bbad,_0x27a181),_0x27a181;}let T=class extends _0x2975d2{constructor(_0x5d64f4){const _0x475eae=_0x1e2818;super(),this[_0x475eae(0xe7)]=_0x5d64f4;}[_0x1e2818(0xe0)](_0x1cfcef){const _0x5f0706=_0x1e2818;var _0x5051ec;let _0x37779f=((_0x5051ec=this[_0x5f0706(0xe7)][_0x5f0706(0xcb)](_0x4e5daa))==null?void 0x0:_0x5051ec[_0x5f0706(0xd0)])||{};try{let _0x4009c2=new _0x7dd87d(_0x1cfcef,{'headers':{..._0x37779f}}),_0x3d49d8=new _0x368e18();return{'URL':_0x1cfcef,'close':(_0x2e7dd5,_0x24a7f8)=>{const _0x44cbd6=_0x5f0706;_0x4009c2[_0x44cbd6(0xd9)](_0x2e7dd5,_0x24a7f8),_0x3d49d8[_0x44cbd6(0xc5)]();},'send':_0x42502d=>{_0x4009c2['send'](_0x42502d);},'open$':new _0x4986fb(_0x4109b5=>{const _0x32b81a=_0x5f0706;let _0x16b3d1=_0x804b28=>_0x4109b5[_0x32b81a(0xed)](_0x804b28);_0x4009c2[_0x32b81a(0xee)](_0x32b81a(0xbf),_0x16b3d1),_0x3d49d8['add'](_0x368404(()=>_0x4009c2[_0x32b81a(0xe6)](_0x32b81a(0xbf),_0x16b3d1)));})['pipe'](_0x1d5cdf()),'close$':new _0x4986fb(_0x18df28=>{const _0x139cdc=_0x5f0706;let _0x1f7380=_0x15fb10=>_0x18df28[_0x139cdc(0xed)](_0x15fb10);_0x4009c2[_0x139cdc(0xee)](_0x139cdc(0xd9),_0x1f7380),_0x3d49d8['add'](_0x368404(()=>_0x4009c2['removeEventListener'](_0x139cdc(0xd9),_0x1f7380)));})[_0x5f0706(0xdb)](_0x1d5cdf()),'error$':new _0x4986fb(_0x4ff911=>{const _0x3b7988=_0x5f0706;let _0x232bd1=_0x152b65=>_0x4ff911['next'](_0x152b65);_0x4009c2[_0x3b7988(0xee)](_0x3b7988(0xea),_0x232bd1),_0x3d49d8[_0x3b7988(0xc1)](_0x368404(()=>_0x4009c2[_0x3b7988(0xe6)](_0x3b7988(0xea),_0x232bd1)));})[_0x5f0706(0xdb)](_0x1d5cdf()),'message$':new _0x4986fb(_0x175e2f=>{const _0x1ac44a=_0x5f0706;let _0x3e15df=_0xa055bc=>_0x175e2f[_0x1ac44a(0xed)](_0xa055bc);_0x4009c2[_0x1ac44a(0xee)]('message',_0x3e15df),_0x3d49d8[_0x1ac44a(0xc1)](_0x368404(()=>_0x4009c2[_0x1ac44a(0xe6)]('message',_0x3e15df)));})[_0x5f0706(0xdb)](_0x1d5cdf())};}catch(_0x3bee39){return console[_0x5f0706(0xea)](_0x3bee39),null;}}};T=w([C(0x0,_0x13630e)],T);function E(_0x421e66){'@babel/helpers - typeof';const _0x511a8e=_0x1e2818;return E=typeof Symbol==_0x511a8e(0xd1)&&typeof Symbol[_0x511a8e(0xcc)]=='symbol'?function(_0x1ac12e){return typeof _0x1ac12e;}:function(_0x54795b){const _0x312976=_0x511a8e;return _0x54795b&&typeof Symbol==_0x312976(0xd1)&&_0x54795b[_0x312976(0xc6)]===Symbol&&_0x54795b!==Symbol['prototype']?_0x312976(0xce):typeof _0x54795b;},E(_0x421e66);}function D(_0xe23f5f,_0x408d5d){const _0x7a583a=_0x1e2818;if(E(_0xe23f5f)!=_0x7a583a(0xda)||!_0xe23f5f)return _0xe23f5f;var _0x50cf83=_0xe23f5f[Symbol[_0x7a583a(0xc9)]];if(_0x50cf83!==void 0x0){var _0x49e76d=_0x50cf83['call'](_0xe23f5f,_0x408d5d||_0x7a583a(0xc4));if(E(_0x49e76d)!=_0x7a583a(0xda))return _0x49e76d;throw TypeError(_0x7a583a(0xeb));}return(_0x408d5d==='string'?String:Number)(_0xe23f5f);}function O(_0x1142a3){const _0x2b6eae=_0x1e2818;var _0x270b82=D(_0x1142a3,_0x2b6eae(0xc8));return E(_0x270b82)==_0x2b6eae(0xce)?_0x270b82:_0x270b82+'';}function k(_0xdad26d,_0x2c7a53,_0x55f920){return(_0x2c7a53=O(_0x2c7a53))in _0xdad26d?Object['defineProperty'](_0xdad26d,_0x2c7a53,{'value':_0x55f920,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xdad26d[_0x2c7a53]=_0x55f920,_0xdad26d;}let A=class extends _0x3d60aa{constructor(_0x1ba31d=S,_0x54eff2,_0x2de5d2){const _0x1fd4b4=_0x1e2818;super(),this['_config']=_0x1ba31d,this[_0x1fd4b4(0xe7)]=_0x54eff2,this[_0x1fd4b4(0xd7)]=_0x2de5d2;let {..._0x42b856}=_0x4fb716({},S,this[_0x1fd4b4(0xd5)]);this[_0x1fd4b4(0xe7)][_0x1fd4b4(0xc0)]('collaboration-client-node.config',_0x42b856);}['onStarting'](){const _0x1d541d=_0x1e2818;this[_0x1d541d(0xd8)]();}[_0x1e2818(0xd8)](){const _0x493752=_0x1e2818;_0x574e2a(this[_0x493752(0xd7)],[[_0x4ecbc0,{'useClass':T}]]);}};k(A,_0x1e2818(0xd2),_0x1e2818(0xd3)),k(A,'packageName',b),k(A,_0x1e2818(0xc3),x),A=w([_0x5648fd(_0xdb8f3f),C(0x1,_0x13630e),C(0x2,_0x448794(_0xc9fc84))],A);let j=class extends _0x25f30a{constructor(_0x5cc5c2,_0x2fe64f,_0x5589b9,_0x281cd0,_0x18f88c){const _0x2fb5bc=_0x1e2818;super(_0x5cc5c2,_0x2fe64f,_0x5589b9,_0x281cd0,_0x18f88c);let _0x13ed15=this[_0x2fb5bc(0xe7)]['getConfig'](_0x4e5daa);this[_0x2fb5bc(0xe8)]['registerHTTPInterceptor']({'interceptor':(_0x524d3b,_0x7b85d5)=>{const _0x13df7f=_0x2fb5bc;let _0x5e48fe=_0x524d3b[_0x13df7f(0xdd)];if(_0x13ed15!=null&&_0x13ed15['customHeaders']){for(let _0xd47d7 in _0x13ed15['customHeaders'])_0x5e48fe[_0x13df7f(0xec)](_0xd47d7,_0x13ed15[_0x13df7f(0xd0)][_0xd47d7]);}return _0x7b85d5(_0x524d3b);}});}async[_0x1e2818(0xe0)](_0x186847){const _0x551e7f=_0x1e2818;return this[_0x551e7f(0xe9)](_0x186847);}};j=w([C(0x0,_0x448794(_0xc9fc84)),C(0x1,_0x448794(_0x131df7)),C(0x2,_0x13630e),C(0x3,_0x1c40b7),C(0x4,_0x43822f)],j);export{j as NodeCollaborationSocketService,A as UniverCollaborationClientNodePlugin};
@@ -1,4 +1,2 @@
1
- export { COLLABORATION_CLIENT_NODE_CONFIG_KEY } from './config/config';
2
- export type { IUniverCollaborationClientNodeConfig } from './config/config';
3
1
  export { UniverCollaborationClientNodePlugin } from './plugin';
4
2
  export { NodeCollaborationSocketService } from './services/collaboration-socket.service';
@@ -1,12 +1,13 @@
1
1
  import type { IUniverCollaborationClientNodeConfig } from './config/config';
2
2
  import { IConfigService, Injector, Plugin } from '@univerjs/core';
3
3
  export declare class UniverCollaborationClientNodePlugin extends Plugin {
4
+ private readonly _config;
4
5
  private readonly _configService;
5
6
  protected _injector: Injector;
6
7
  static pluginName: string;
7
8
  static packageName: string;
8
9
  static version: string;
9
- constructor(config: IUniverCollaborationClientNodeConfig | undefined, _configService: IConfigService, _injector: Injector);
10
+ constructor(_config: Partial<IUniverCollaborationClientNodeConfig> | undefined, _configService: IConfigService, _injector: Injector);
10
11
  onStarting(): void;
11
12
  private _registerDependencies;
12
13
  }
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x15e7(_0x3cc28c,_0x1c5168){_0x3cc28c=_0x3cc28c-0x13d;const _0x41ae8b=_0x41ae();let _0x15e7df=_0x41ae8b[_0x3cc28c];return _0x15e7df;}function _0x41ae(){const _0x43303e=['registerDependencies','send','toDisposable','close','call','pluginName','toStringTag','ISocketService','_configService','WebSocket','iterator','collaboration-client-node.config','UniverProCollaborationClientNode','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','@univerjs/network','Plugin','COLLABORATION_CLIENT_NODE_CONFIG_KEY','headers','10377240yNPCzn','onStarting','set','decorate','35UpbuJi','constructor','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','string','UniverProCollaboration','_doCreateSocket','version','685812kEEcZE','default','HTTPService','DependentOn','_httpService','27970ikJDiq','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','customHeaders','1.0.0-alpha.1','amd','prototype','add','959896qLQcDe','object','ILogService','message','setConfig','@univerjs-pro/collaboration-client','getConfig','_injector','removeEventListener','@univerjs/core','IConfigService','next','pipe','exports','@univerjs-pro/collaboration-client-node','symbol','defineProperty','DisposableCollection','getOwnPropertyDescriptor','8049304ctipGc','open','share','Observable','function','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','Inject','ISnapshotServerService','290vmXFOg','registerHTTPInterceptor','rxjs','length','_registerDependencies','error','464394ziFWmq','1400463hJobqA','addEventListener','Injector','createSocket','UniverCollaborationClientPlugin','225isgCnF','packageName','@univerjs-pro/collaboration'];_0x41ae=function(){return _0x43303e;};return _0x41ae();}(function(_0x6a458,_0x4caa13){const _0x4a81d1=_0x15e7,_0x33765b=_0x6a458();while(!![]){try{const _0x361e1a=-parseInt(_0x4a81d1(0x164))/0x1+-parseInt(_0x4a81d1(0x15d))/0x2*(parseInt(_0x4a81d1(0x18b))/0x3)+parseInt(_0x4a81d1(0x158))/0x4*(parseInt(_0x4a81d1(0x151))/0x5)+-parseInt(_0x4a81d1(0x14d))/0x6+-parseInt(_0x4a81d1(0x185))/0x7+-parseInt(_0x4a81d1(0x177))/0x8+-parseInt(_0x4a81d1(0x186))/0x9*(-parseInt(_0x4a81d1(0x17f))/0xa);if(_0x361e1a===_0x4caa13)break;else _0x33765b['push'](_0x33765b['shift']());}catch(_0xc2d586){_0x33765b['push'](_0x33765b['shift']());}}}(_0x41ae,0xdc346),function(_0x2e5aea,_0x106c15){const _0x399803=_0x15e7;typeof exports=='object'&&typeof module<'u'?_0x106c15(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core'),require('@univerjs/network'),require('rxjs'),require('@univerjs-pro/collaboration')):typeof define==_0x399803(0x17b)&&define[_0x399803(0x161)]?define([_0x399803(0x171),_0x399803(0x169),_0x399803(0x16d),_0x399803(0x149),_0x399803(0x181),_0x399803(0x18d)],_0x106c15):(_0x2e5aea=typeof globalThis<'u'?globalThis:_0x2e5aea||self,_0x106c15(_0x2e5aea[_0x399803(0x147)]={},_0x2e5aea['UniverProCollaborationClient'],_0x2e5aea['UniverCore'],_0x2e5aea['UniverNetwork'],_0x2e5aea[_0x399803(0x181)],_0x2e5aea[_0x399803(0x155)]));}(this,function(_0x3a2596,_0x551afe,_0x25ab72,_0x41dcff,_0x5e5747,_0x16a79e){const _0x490e04=_0x15e7;Object[_0x490e04(0x174)](_0x3a2596,Symbol[_0x490e04(0x141)],{'value':'Module'});var _0x17a4ac=(_0x35b320,_0xaccb39)=>()=>(_0xaccb39||(_0x35b320((_0xaccb39={'exports':{}})[_0x490e04(0x171)],_0xaccb39),_0x35b320=null),_0xaccb39[_0x490e04(0x171)]);let _0x15958f=_0x490e04(0x146),_0xbb9016={};var _0x946850=_0x490e04(0x172),_0x1c1c2a=_0x490e04(0x160),_0x44e35d=_0x17a4ac((_0x54d45c,_0x168991)=>{const _0x6b3a08=_0x490e04;_0x168991[_0x6b3a08(0x171)]=function(){const _0x2b007b=_0x6b3a08;throw Error(_0x2b007b(0x153));};})();function _0x30738e(_0x2c00be,_0x36e986){return function(_0x2e2537,_0x145102){_0x36e986(_0x2e2537,_0x145102,_0x2c00be);};}function _0x1b6218(_0x320c56,_0xc25ebc,_0x453c11,_0x559469){const _0x33732a=_0x490e04;var _0x19cdb0=arguments[_0x33732a(0x182)],_0x4aced6=_0x19cdb0<0x3?_0xc25ebc:_0x559469===null?_0x559469=Object[_0x33732a(0x176)](_0xc25ebc,_0x453c11):_0x559469,_0x283261;if(typeof Reflect==_0x33732a(0x165)&&typeof Reflect[_0x33732a(0x150)]=='function')_0x4aced6=Reflect['decorate'](_0x320c56,_0xc25ebc,_0x453c11,_0x559469);else{for(var _0x5d32ad=_0x320c56[_0x33732a(0x182)]-0x1;_0x5d32ad>=0x0;_0x5d32ad--)(_0x283261=_0x320c56[_0x5d32ad])&&(_0x4aced6=(_0x19cdb0<0x3?_0x283261(_0x4aced6):_0x19cdb0>0x3?_0x283261(_0xc25ebc,_0x453c11,_0x4aced6):_0x283261(_0xc25ebc,_0x453c11))||_0x4aced6);}return _0x19cdb0>0x3&&_0x4aced6&&Object[_0x33732a(0x174)](_0xc25ebc,_0x453c11,_0x4aced6),_0x4aced6;}let _0x3833d0=class extends _0x25ab72['Disposable']{constructor(_0x131d8a){const _0x1e79c3=_0x490e04;super(),this[_0x1e79c3(0x143)]=_0x131d8a;}[_0x490e04(0x189)](_0x22e93b){const _0x1d514e=_0x490e04;var _0x127112;let _0x10418d=((_0x127112=this[_0x1d514e(0x143)][_0x1d514e(0x16a)](_0x551afe[_0x1d514e(0x17c)]))==null?void 0x0:_0x127112[_0x1d514e(0x15f)])||{};try{let _0x58ddd2=new _0x44e35d[(_0x1d514e(0x144))](_0x22e93b,{'headers':{..._0x10418d}}),_0x18a3de=new _0x25ab72[(_0x1d514e(0x175))]();return{'URL':_0x22e93b,'close':(_0x9c5418,_0x1f7624)=>{_0x58ddd2['close'](_0x9c5418,_0x1f7624),_0x18a3de['dispose']();},'send':_0x1f2259=>{const _0x1495c9=_0x1d514e;_0x58ddd2[_0x1495c9(0x18f)](_0x1f2259);},'open$':new _0x5e5747[(_0x1d514e(0x17a))](_0x57d7a2=>{const _0x4ff483=_0x1d514e;let _0x386200=_0x28232f=>_0x57d7a2[_0x4ff483(0x16f)](_0x28232f);_0x58ddd2[_0x4ff483(0x187)](_0x4ff483(0x178),_0x386200),_0x18a3de[_0x4ff483(0x163)]((0x0,_0x25ab72[_0x4ff483(0x13d)])(()=>_0x58ddd2[_0x4ff483(0x16c)]('open',_0x386200)));})[_0x1d514e(0x170)]((0x0,_0x5e5747[_0x1d514e(0x179)])()),'close$':new _0x5e5747['Observable'](_0x5be5c5=>{const _0x33dd52=_0x1d514e;let _0x5f1775=_0x22f081=>_0x5be5c5[_0x33dd52(0x16f)](_0x22f081);_0x58ddd2[_0x33dd52(0x187)](_0x33dd52(0x13e),_0x5f1775),_0x18a3de[_0x33dd52(0x163)]((0x0,_0x25ab72[_0x33dd52(0x13d)])(()=>_0x58ddd2[_0x33dd52(0x16c)](_0x33dd52(0x13e),_0x5f1775)));})['pipe']((0x0,_0x5e5747['share'])()),'error$':new _0x5e5747[(_0x1d514e(0x17a))](_0x1db46c=>{const _0xca2018=_0x1d514e;let _0x55d15e=_0x5673fa=>_0x1db46c['next'](_0x5673fa);_0x58ddd2[_0xca2018(0x187)]('error',_0x55d15e),_0x18a3de[_0xca2018(0x163)]((0x0,_0x25ab72[_0xca2018(0x13d)])(()=>_0x58ddd2[_0xca2018(0x16c)](_0xca2018(0x184),_0x55d15e)));})['pipe']((0x0,_0x5e5747['share'])()),'message$':new _0x5e5747[(_0x1d514e(0x17a))](_0x1752bc=>{const _0x47a9dd=_0x1d514e;let _0x146c34=_0x1a3256=>_0x1752bc[_0x47a9dd(0x16f)](_0x1a3256);_0x58ddd2[_0x47a9dd(0x187)](_0x47a9dd(0x167),_0x146c34),_0x18a3de[_0x47a9dd(0x163)]((0x0,_0x25ab72[_0x47a9dd(0x13d)])(()=>_0x58ddd2['removeEventListener'](_0x47a9dd(0x167),_0x146c34)));})[_0x1d514e(0x170)]((0x0,_0x5e5747['share'])())};}catch(_0x16405d){return console['error'](_0x16405d),null;}}};_0x3833d0=_0x1b6218([_0x30738e(0x0,_0x25ab72[_0x490e04(0x16e)])],_0x3833d0);function _0x251c91(_0x1652b2){'@babel/helpers - typeof';const _0x150583=_0x490e04;return _0x251c91=typeof Symbol==_0x150583(0x17b)&&typeof Symbol[_0x150583(0x145)]==_0x150583(0x173)?function(_0x32f735){return typeof _0x32f735;}:function(_0x573279){const _0x2a5cc9=_0x150583;return _0x573279&&typeof Symbol==_0x2a5cc9(0x17b)&&_0x573279[_0x2a5cc9(0x152)]===Symbol&&_0x573279!==Symbol[_0x2a5cc9(0x162)]?'symbol':typeof _0x573279;},_0x251c91(_0x1652b2);}function _0x5d42ea(_0xfaa4cf,_0x3b1df8){const _0xfa313f=_0x490e04;if(_0x251c91(_0xfaa4cf)!='object'||!_0xfaa4cf)return _0xfaa4cf;var _0x123660=_0xfaa4cf[Symbol['toPrimitive']];if(_0x123660!==void 0x0){var _0x5c1d2b=_0x123660[_0xfa313f(0x13f)](_0xfaa4cf,_0x3b1df8||_0xfa313f(0x159));if(_0x251c91(_0x5c1d2b)!=_0xfa313f(0x165))return _0x5c1d2b;throw TypeError(_0xfa313f(0x148));}return(_0x3b1df8===_0xfa313f(0x154)?String:Number)(_0xfaa4cf);}function _0x5a1bff(_0xf75370){const _0x134cae=_0x490e04;var _0x13d796=_0x5d42ea(_0xf75370,_0x134cae(0x154));return _0x251c91(_0x13d796)==_0x134cae(0x173)?_0x13d796:_0x13d796+'';}function _0x4cc3f2(_0x3661fd,_0x57837e,_0x14f83e){const _0x7985dc=_0x490e04;return(_0x57837e=_0x5a1bff(_0x57837e))in _0x3661fd?Object[_0x7985dc(0x174)](_0x3661fd,_0x57837e,{'value':_0x14f83e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3661fd[_0x57837e]=_0x14f83e,_0x3661fd;}let _0x3dd56b=class extends _0x25ab72[_0x490e04(0x14a)]{constructor(_0x97c411=_0xbb9016,_0x4624c5,_0x2b62aa){const _0x101372=_0x490e04;super(),this[_0x101372(0x143)]=_0x4624c5,this[_0x101372(0x16b)]=_0x2b62aa,this[_0x101372(0x143)][_0x101372(0x168)](_0x15958f,_0x97c411);}[_0x490e04(0x14e)](){const _0x17d502=_0x490e04;this[_0x17d502(0x183)]();}[_0x490e04(0x183)](){const _0x43aa54=_0x490e04;(0x0,_0x25ab72[_0x43aa54(0x18e)])(this[_0x43aa54(0x16b)],[[_0x41dcff[_0x43aa54(0x142)],{'useClass':_0x3833d0}]]);}};_0x4cc3f2(_0x3dd56b,_0x490e04(0x140),_0x490e04(0x15e)),_0x4cc3f2(_0x3dd56b,_0x490e04(0x18c),_0x946850),_0x4cc3f2(_0x3dd56b,_0x490e04(0x157),_0x1c1c2a),_0x3dd56b=_0x1b6218([(0x0,_0x25ab72[_0x490e04(0x15b)])(_0x551afe[_0x490e04(0x18a)]),_0x30738e(0x1,_0x25ab72['IConfigService']),_0x30738e(0x2,(0x0,_0x25ab72[_0x490e04(0x17d)])(_0x25ab72[_0x490e04(0x188)]))],_0x3dd56b);let _0x421366=class extends _0x551afe['CollaborationSocketService']{constructor(_0x31da9c,_0x3ed3fe,_0x30dab3,_0x590927,_0x58ffa0){const _0x37dc7e=_0x490e04;super(_0x31da9c,_0x3ed3fe,_0x30dab3,_0x590927,_0x58ffa0);let _0x1c4f27=this['_configService']['getConfig'](_0x551afe['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']);this[_0x37dc7e(0x15c)][_0x37dc7e(0x180)]({'interceptor':(_0x24dc71,_0x137025)=>{const _0x4fc501=_0x37dc7e;let _0x1610be=_0x24dc71[_0x4fc501(0x14c)];if(_0x1c4f27!=null&&_0x1c4f27[_0x4fc501(0x15f)]){for(let _0x2486a3 in _0x1c4f27[_0x4fc501(0x15f)])_0x1610be[_0x4fc501(0x14f)](_0x2486a3,_0x1c4f27[_0x4fc501(0x15f)][_0x2486a3]);}return _0x137025(_0x24dc71);}});}async[_0x490e04(0x189)](_0x5d9657){const _0xa83f7d=_0x490e04;return this[_0xa83f7d(0x156)](_0x5d9657);}};_0x421366=_0x1b6218([_0x30738e(0x0,(0x0,_0x25ab72['Inject'])(_0x25ab72[_0x490e04(0x188)])),_0x30738e(0x1,(0x0,_0x25ab72['Inject'])(_0x41dcff[_0x490e04(0x15a)])),_0x30738e(0x2,_0x25ab72[_0x490e04(0x16e)]),_0x30738e(0x3,_0x25ab72[_0x490e04(0x166)]),_0x30738e(0x4,_0x16a79e[_0x490e04(0x17e)])],_0x421366),_0x3a2596[_0x490e04(0x14b)]=_0x15958f,Object[_0x490e04(0x174)](_0x3a2596,'NodeCollaborationSocketService',{'enumerable':!0x0,'get':function(){return _0x421366;}}),Object[_0x490e04(0x174)](_0x3a2596,'UniverCollaborationClientNodePlugin',{'enumerable':!0x0,'get':function(){return _0x3dd56b;}});}));
1
+ function _0x30da(_0x381b8c,_0x3f119e){_0x381b8c=_0x381b8c-0x102;const _0x5e728f=_0x5e72();let _0x30dae4=_0x5e728f[_0x381b8c];return _0x30dae4;}function _0x5e72(){const _0x3b2985=['@univerjs-pro/collaboration-client-node','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','Module','_configService','add','Injector','packageName','pipe','defineProperty','Inject','merge','IConfigService','close','object','toStringTag','Disposable','10879263WeRWzX','addEventListener','UniverProCollaborationClientNode','Observable','38976oSSbfK','_httpService','NodeCollaborationSocketService','removeEventListener','customHeaders','683988FTVFvR','iterator','UniverProCollaborationClient','682524hQLCAg','ILogService','UniverProCollaboration','Plugin','_config','message','function','27230PVXBSy','HTTPService','error','DependentOn','_injector','toPrimitive','ISocketService','dispose','open','ISnapshotServerService','createSocket','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','@univerjs/core','setConfig','UniverCollaborationClientNodePlugin','1.0.0-alpha.3','toDisposable','UniverCore','decorate','1714884VoXhJF','send','UniverCollaborationClientPlugin','symbol','share','onStarting','next','rxjs','set','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','_registerDependencies','@univerjs-pro/collaboration-client','amd','collaboration-client-node.config','exports','call','DisposableCollection','_doCreateSocket','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','42GFwBRi','string','version','pluginName','10bjgHpg','1645408NAlKcE','WebSocket','registerDependencies'];_0x5e72=function(){return _0x3b2985;};return _0x5e72();}(function(_0x3e2319,_0x19b4f9){const _0x38e23f=_0x30da,_0x1a087a=_0x3e2319();while(!![]){try{const _0x3dd247=parseInt(_0x38e23f(0x10e))/0x1*(-parseInt(_0x38e23f(0x134))/0x2)+parseInt(_0x38e23f(0x107))/0x3+parseInt(_0x38e23f(0x104))/0x4*(-parseInt(_0x38e23f(0x138))/0x5)+-parseInt(_0x38e23f(0x121))/0x6+-parseInt(_0x38e23f(0x150))/0x7+parseInt(_0x38e23f(0x139))/0x8+parseInt(_0x38e23f(0x14c))/0x9;if(_0x3dd247===_0x19b4f9)break;else _0x1a087a['push'](_0x1a087a['shift']());}catch(_0x4d42b1){_0x1a087a['push'](_0x1a087a['shift']());}}}(_0x5e72,0x6aa31),function(_0x51a6dd,_0x23aa44){const _0x318f78=_0x30da;typeof exports==_0x318f78(0x149)&&typeof module<'u'?_0x23aa44(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core'),require('@univerjs/network'),require('rxjs'),require('@univerjs-pro/collaboration')):typeof define==_0x318f78(0x10d)&&define[_0x318f78(0x12d)]?define([_0x318f78(0x12f),_0x318f78(0x12c),_0x318f78(0x11a),'@univerjs/network',_0x318f78(0x128),'@univerjs-pro/collaboration'],_0x23aa44):(_0x51a6dd=typeof globalThis<'u'?globalThis:_0x51a6dd||self,_0x23aa44(_0x51a6dd[_0x318f78(0x14e)]={},_0x51a6dd[_0x318f78(0x106)],_0x51a6dd[_0x318f78(0x11f)],_0x51a6dd['UniverNetwork'],_0x51a6dd[_0x318f78(0x128)],_0x51a6dd[_0x318f78(0x109)]));}(this,function(_0x103f82,_0x573235,_0x3f6770,_0x1bed1b,_0x333749,_0x3e44f6){const _0x3f14a2=_0x30da;Object[_0x3f14a2(0x144)](_0x103f82,Symbol[_0x3f14a2(0x14a)],{'value':_0x3f14a2(0x13e)});var _0x389908=(_0x433d57,_0x474f17)=>()=>(_0x474f17||(_0x433d57((_0x474f17={'exports':{}})['exports'],_0x474f17),_0x433d57=null),_0x474f17[_0x3f14a2(0x12f)]),_0x373c48=_0x3f14a2(0x13c),_0x5b02d3=_0x3f14a2(0x11d);let _0xb2d2db={};var _0x552225=_0x389908((_0x15b615,_0x3f746c)=>{const _0x2e86ff=_0x3f14a2;_0x3f746c[_0x2e86ff(0x12f)]=function(){const _0x58ab91=_0x2e86ff;throw Error(_0x58ab91(0x133));};})();function _0x1e396a(_0x14b3e5,_0x474304){return function(_0xaaec35,_0xd520b0){_0x474304(_0xaaec35,_0xd520b0,_0x14b3e5);};}function _0x5541e7(_0x217ed1,_0x571ca2,_0x5eb319,_0x5c1114){const _0x829fea=_0x3f14a2;var _0x97bbdf=arguments['length'],_0x5775c2=_0x97bbdf<0x3?_0x571ca2:_0x5c1114===null?_0x5c1114=Object['getOwnPropertyDescriptor'](_0x571ca2,_0x5eb319):_0x5c1114,_0xd9857c;if(typeof Reflect==_0x829fea(0x149)&&typeof Reflect[_0x829fea(0x120)]==_0x829fea(0x10d))_0x5775c2=Reflect[_0x829fea(0x120)](_0x217ed1,_0x571ca2,_0x5eb319,_0x5c1114);else{for(var _0x327994=_0x217ed1['length']-0x1;_0x327994>=0x0;_0x327994--)(_0xd9857c=_0x217ed1[_0x327994])&&(_0x5775c2=(_0x97bbdf<0x3?_0xd9857c(_0x5775c2):_0x97bbdf>0x3?_0xd9857c(_0x571ca2,_0x5eb319,_0x5775c2):_0xd9857c(_0x571ca2,_0x5eb319))||_0x5775c2);}return _0x97bbdf>0x3&&_0x5775c2&&Object[_0x829fea(0x144)](_0x571ca2,_0x5eb319,_0x5775c2),_0x5775c2;}let _0x1443ee=class extends _0x3f6770[_0x3f14a2(0x14b)]{constructor(_0x2e627f){const _0x305151=_0x3f14a2;super(),this[_0x305151(0x13f)]=_0x2e627f;}[_0x3f14a2(0x118)](_0x1215ee){const _0x37bcb0=_0x3f14a2;var _0x26b994;let _0x18e2bb=((_0x26b994=this['_configService']['getConfig'](_0x573235[_0x37bcb0(0x12a)]))==null?void 0x0:_0x26b994[_0x37bcb0(0x103)])||{};try{let _0x4d0700=new _0x552225[(_0x37bcb0(0x13a))](_0x1215ee,{'headers':{..._0x18e2bb}}),_0x2aebab=new _0x3f6770[(_0x37bcb0(0x131))]();return{'URL':_0x1215ee,'close':(_0x5f17d7,_0x4f9333)=>{const _0x2be10f=_0x37bcb0;_0x4d0700[_0x2be10f(0x148)](_0x5f17d7,_0x4f9333),_0x2aebab[_0x2be10f(0x115)]();},'send':_0xb576ec=>{const _0x21ed59=_0x37bcb0;_0x4d0700[_0x21ed59(0x122)](_0xb576ec);},'open$':new _0x333749[(_0x37bcb0(0x14f))](_0x4414ff=>{const _0x669c8d=_0x37bcb0;let _0x39b07b=_0x497a6c=>_0x4414ff['next'](_0x497a6c);_0x4d0700[_0x669c8d(0x14d)]('open',_0x39b07b),_0x2aebab[_0x669c8d(0x140)]((0x0,_0x3f6770[_0x669c8d(0x11e)])(()=>_0x4d0700[_0x669c8d(0x102)](_0x669c8d(0x116),_0x39b07b)));})['pipe']((0x0,_0x333749[_0x37bcb0(0x125)])()),'close$':new _0x333749[(_0x37bcb0(0x14f))](_0x5853e1=>{const _0x374ac1=_0x37bcb0;let _0x5d2220=_0x20506a=>_0x5853e1[_0x374ac1(0x127)](_0x20506a);_0x4d0700['addEventListener'](_0x374ac1(0x148),_0x5d2220),_0x2aebab[_0x374ac1(0x140)]((0x0,_0x3f6770[_0x374ac1(0x11e)])(()=>_0x4d0700['removeEventListener'](_0x374ac1(0x148),_0x5d2220)));})['pipe']((0x0,_0x333749[_0x37bcb0(0x125)])()),'error$':new _0x333749['Observable'](_0x58a71b=>{const _0x4a649c=_0x37bcb0;let _0x552c9c=_0x21c6e4=>_0x58a71b[_0x4a649c(0x127)](_0x21c6e4);_0x4d0700['addEventListener'](_0x4a649c(0x110),_0x552c9c),_0x2aebab[_0x4a649c(0x140)]((0x0,_0x3f6770[_0x4a649c(0x11e)])(()=>_0x4d0700[_0x4a649c(0x102)](_0x4a649c(0x110),_0x552c9c)));})['pipe']((0x0,_0x333749[_0x37bcb0(0x125)])()),'message$':new _0x333749[(_0x37bcb0(0x14f))](_0x75f0fc=>{const _0x47f57b=_0x37bcb0;let _0x467165=_0x33c43c=>_0x75f0fc[_0x47f57b(0x127)](_0x33c43c);_0x4d0700[_0x47f57b(0x14d)](_0x47f57b(0x10c),_0x467165),_0x2aebab[_0x47f57b(0x140)]((0x0,_0x3f6770[_0x47f57b(0x11e)])(()=>_0x4d0700['removeEventListener']('message',_0x467165)));})[_0x37bcb0(0x143)]((0x0,_0x333749['share'])())};}catch(_0x56b2d5){return console[_0x37bcb0(0x110)](_0x56b2d5),null;}}};_0x1443ee=_0x5541e7([_0x1e396a(0x0,_0x3f6770['IConfigService'])],_0x1443ee);function _0x315342(_0x236915){'@babel/helpers - typeof';const _0x4b9f01=_0x3f14a2;return _0x315342=typeof Symbol==_0x4b9f01(0x10d)&&typeof Symbol[_0x4b9f01(0x105)]==_0x4b9f01(0x124)?function(_0xc92e93){return typeof _0xc92e93;}:function(_0xe61a03){const _0x4c143b=_0x4b9f01;return _0xe61a03&&typeof Symbol==_0x4c143b(0x10d)&&_0xe61a03['constructor']===Symbol&&_0xe61a03!==Symbol['prototype']?_0x4c143b(0x124):typeof _0xe61a03;},_0x315342(_0x236915);}function _0x3ce6ca(_0x52a75c,_0x4f12b3){const _0x16a494=_0x3f14a2;if(_0x315342(_0x52a75c)!=_0x16a494(0x149)||!_0x52a75c)return _0x52a75c;var _0xf3fe50=_0x52a75c[Symbol[_0x16a494(0x113)]];if(_0xf3fe50!==void 0x0){var _0x26f7c0=_0xf3fe50[_0x16a494(0x130)](_0x52a75c,_0x4f12b3||'default');if(_0x315342(_0x26f7c0)!=_0x16a494(0x149))return _0x26f7c0;throw TypeError(_0x16a494(0x119));}return(_0x4f12b3===_0x16a494(0x135)?String:Number)(_0x52a75c);}function _0x45f199(_0x81fc26){const _0x1b4fb6=_0x3f14a2;var _0x11227a=_0x3ce6ca(_0x81fc26,_0x1b4fb6(0x135));return _0x315342(_0x11227a)==_0x1b4fb6(0x124)?_0x11227a:_0x11227a+'';}function _0x4da15f(_0x16a973,_0x4dd9c8,_0x492f47){const _0x4906a9=_0x3f14a2;return(_0x4dd9c8=_0x45f199(_0x4dd9c8))in _0x16a973?Object[_0x4906a9(0x144)](_0x16a973,_0x4dd9c8,{'value':_0x492f47,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x16a973[_0x4dd9c8]=_0x492f47,_0x16a973;}let _0x267be0=class extends _0x3f6770[_0x3f14a2(0x10a)]{constructor(_0xd86b97=_0xb2d2db,_0x4edc33,_0x8b845c){const _0x46cc1e=_0x3f14a2;super(),this[_0x46cc1e(0x10b)]=_0xd86b97,this[_0x46cc1e(0x13f)]=_0x4edc33,this[_0x46cc1e(0x112)]=_0x8b845c;let {..._0x1c82de}=(0x0,_0x3f6770[_0x46cc1e(0x146)])({},_0xb2d2db,this[_0x46cc1e(0x10b)]);this[_0x46cc1e(0x13f)][_0x46cc1e(0x11b)](_0x46cc1e(0x12e),_0x1c82de);}[_0x3f14a2(0x126)](){const _0x1cb44b=_0x3f14a2;this[_0x1cb44b(0x12b)]();}[_0x3f14a2(0x12b)](){const _0x39996a=_0x3f14a2;(0x0,_0x3f6770[_0x39996a(0x13b)])(this[_0x39996a(0x112)],[[_0x1bed1b[_0x39996a(0x114)],{'useClass':_0x1443ee}]]);}};_0x4da15f(_0x267be0,_0x3f14a2(0x137),_0x3f14a2(0x13d)),_0x4da15f(_0x267be0,_0x3f14a2(0x142),_0x373c48),_0x4da15f(_0x267be0,_0x3f14a2(0x136),_0x5b02d3),_0x267be0=_0x5541e7([(0x0,_0x3f6770[_0x3f14a2(0x111)])(_0x573235[_0x3f14a2(0x123)]),_0x1e396a(0x1,_0x3f6770['IConfigService']),_0x1e396a(0x2,(0x0,_0x3f6770['Inject'])(_0x3f6770[_0x3f14a2(0x141)]))],_0x267be0);let _0x23a443=class extends _0x573235['CollaborationSocketService']{constructor(_0x26ab22,_0x58d87d,_0xc7a26d,_0x56b361,_0x33ae03){const _0x16d0b9=_0x3f14a2;super(_0x26ab22,_0x58d87d,_0xc7a26d,_0x56b361,_0x33ae03);let _0x1dd36a=this[_0x16d0b9(0x13f)]['getConfig'](_0x573235[_0x16d0b9(0x12a)]);this[_0x16d0b9(0x151)]['registerHTTPInterceptor']({'interceptor':(_0x59dfec,_0x590aed)=>{const _0x571f32=_0x16d0b9;let _0x2a6702=_0x59dfec['headers'];if(_0x1dd36a!=null&&_0x1dd36a[_0x571f32(0x103)]){for(let _0x28f176 in _0x1dd36a[_0x571f32(0x103)])_0x2a6702[_0x571f32(0x129)](_0x28f176,_0x1dd36a[_0x571f32(0x103)][_0x28f176]);}return _0x590aed(_0x59dfec);}});}async[_0x3f14a2(0x118)](_0x2fc7d5){const _0x2c3311=_0x3f14a2;return this[_0x2c3311(0x132)](_0x2fc7d5);}};_0x23a443=_0x5541e7([_0x1e396a(0x0,(0x0,_0x3f6770[_0x3f14a2(0x145)])(_0x3f6770['Injector'])),_0x1e396a(0x1,(0x0,_0x3f6770['Inject'])(_0x1bed1b[_0x3f14a2(0x10f)])),_0x1e396a(0x2,_0x3f6770[_0x3f14a2(0x147)]),_0x1e396a(0x3,_0x3f6770[_0x3f14a2(0x108)]),_0x1e396a(0x4,_0x3e44f6[_0x3f14a2(0x117)])],_0x23a443),Object['defineProperty'](_0x103f82,_0x3f14a2(0x152),{'enumerable':!0x0,'get':function(){return _0x23a443;}}),Object['defineProperty'](_0x103f82,_0x3f14a2(0x11c),{'enumerable':!0x0,'get':function(){return _0x267be0;}});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/collaboration-client-node",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.3",
4
4
  "private": false,
5
5
  "description": "Node.js collaboration client plugin for Univer Pro.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -51,18 +51,18 @@
51
51
  "rxjs": ">=7.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "ws": "8.20.1",
55
- "@univerjs-pro/collaboration": "1.0.0-alpha.1",
56
- "@univerjs-pro/collaboration-client": "1.0.0-alpha.1",
57
- "@univerjs/core": "1.0.0-alpha.1",
58
- "@univerjs/network": "1.0.0-alpha.1"
54
+ "ws": "8.21.0",
55
+ "@univerjs-pro/collaboration": "1.0.0-alpha.3",
56
+ "@univerjs/core": "1.0.0-alpha.3",
57
+ "@univerjs/network": "1.0.0-alpha.3",
58
+ "@univerjs-pro/collaboration-client": "1.0.0-alpha.3"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/ws": "8.18.1",
62
62
  "rxjs": "7.8.2",
63
63
  "typescript": "^6.0.3",
64
- "vitest": "^4.1.9",
65
- "@univerjs-infra/shared": "1.0.0-alpha.1"
64
+ "vitest": "^4.1.10",
65
+ "@univerjs-infra/shared": "1.0.0-alpha.3"
66
66
  },
67
67
  "scripts": {
68
68
  "test": "vitest run",