@univerjs-pro/collaboration-client-node 0.21.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -8
- 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 +15 -9
package/README.md
CHANGED
|
@@ -1,16 +1,36 @@
|
|
|
1
|
-
# @univerjs/collaboration-client-node
|
|
1
|
+
# @univerjs-pro/collaboration-client-node
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.
|
|
4
|
-
[](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
`@univerjs-pro/collaboration-client-node` provides node.js collaboration client plugin for Univer Pro.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Package Overview
|
|
9
|
+
|
|
10
|
+
| Package | UMD global | CSS | Locales | Facade entry |
|
|
11
|
+
| --- | --- | :---: | :---: | :---: |
|
|
12
|
+
| `@univerjs-pro/collaboration-client-node` | `UniverProCollaborationClientNode` | No | No | No |
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
pnpm add @univerjs-pro/collaboration-client-node
|
|
18
|
+
# or
|
|
19
|
+
npm install @univerjs-pro/collaboration-client-node
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
|
|
9
23
|
|
|
10
24
|
## Usage
|
|
11
25
|
|
|
12
|
-
|
|
26
|
+
```ts
|
|
27
|
+
import { UniverCollaborationClientNodePlugin } from '@univerjs-pro/collaboration-client-node';
|
|
13
28
|
|
|
14
|
-
|
|
15
|
-
npm i @univerjs/collaboration-client-node
|
|
29
|
+
univer.registerPlugin(UniverCollaborationClientNodePlugin);
|
|
16
30
|
```
|
|
31
|
+
|
|
32
|
+
## Resources
|
|
33
|
+
|
|
34
|
+
- [Documentation](https://docs.univer.ai/guides/pro)
|
|
35
|
+
- [NPM package](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
|
|
36
|
+
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xbacc9c=_0x2944;(function(_0x28092f,_0x4ff11a){const _0x1005b7=_0x2944,_0x37d692=_0x28092f();while(!![]){try{const _0x3683a6=parseInt(_0x1005b7(0x84))/0x1*(-parseInt(_0x1005b7(0xa8))/0x2)+parseInt(_0x1005b7(0xa4))/0x3+parseInt(_0x1005b7(0xb4))/0x4*(-parseInt(_0x1005b7(0x7e))/0x5)+-parseInt(_0x1005b7(0xb1))/0x6+parseInt(_0x1005b7(0xac))/0x7*(parseInt(_0x1005b7(0x89))/0x8)+parseInt(_0x1005b7(0xb8))/0x9+parseInt(_0x1005b7(0x8c))/0xa;if(_0x3683a6===_0x4ff11a)break;else _0x37d692['push'](_0x37d692['shift']());}catch(_0x584736){_0x37d692['push'](_0x37d692['shift']());}}}(_0x133a,0xbef4d),Object[_0xbacc9c(0x81)](exports,Symbol[_0xbacc9c(0x7b)],{'value':_0xbacc9c(0xa2)}));let _univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_core=require('@univerjs/core'),_univerjs_network=require('@univerjs/network'),rxjs=require('rxjs'),ws=require('ws'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration');const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0xbacc9c(0x90),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0xbacc9c(0xb3),version=_0xbacc9c(0x8e);function __decorateParam(_0x26aeeb,_0x4d5e4f){return function(_0x28e5a7,_0x271a5b){_0x4d5e4f(_0x28e5a7,_0x271a5b,_0x26aeeb);};}function _0x2944(_0x1d15b7,_0x1feffa){_0x1d15b7=_0x1d15b7-0x7a;const _0x133adc=_0x133a();let _0x29440e=_0x133adc[_0x1d15b7];return _0x29440e;}function __decorate(_0x32d15d,_0x2a4c61,_0x253907,_0x325a3b){const _0x2ac987=_0xbacc9c;var _0x21bee8=arguments[_0x2ac987(0x96)],_0x443371=_0x21bee8<0x3?_0x2a4c61:_0x325a3b===null?_0x325a3b=Object[_0x2ac987(0x87)](_0x2a4c61,_0x253907):_0x325a3b,_0x5e05a8;if(typeof Reflect==='object'&&typeof Reflect[_0x2ac987(0x91)]===_0x2ac987(0xbf))_0x443371=Reflect[_0x2ac987(0x91)](_0x32d15d,_0x2a4c61,_0x253907,_0x325a3b);else{for(var _0x4d1049=_0x32d15d['length']-0x1;_0x4d1049>=0x0;_0x4d1049--)if(_0x5e05a8=_0x32d15d[_0x4d1049])_0x443371=(_0x21bee8<0x3?_0x5e05a8(_0x443371):_0x21bee8>0x3?_0x5e05a8(_0x2a4c61,_0x253907,_0x443371):_0x5e05a8(_0x2a4c61,_0x253907))||_0x443371;}return _0x21bee8>0x3&&_0x443371&&Object[_0x2ac987(0x81)](_0x2a4c61,_0x253907,_0x443371),_0x443371;}let NodeWebSocketService=class NodeWebSocketService extends _univerjs_core[_0xbacc9c(0xc3)]{constructor(_0x1c617d){const _0x1ef332=_0xbacc9c;super(),this[_0x1ef332(0x8b)]=_0x1c617d;}[_0xbacc9c(0xab)](_0xab7147){const _0x50c9d7=_0xbacc9c;var _0xb77d8b;const _0x1e7e9e=((_0xb77d8b=this[_0x50c9d7(0x8b)]['getConfig'](_univerjs_pro_collaboration_client[_0x50c9d7(0xbd)]))===null||_0xb77d8b===void 0x0?void 0x0:_0xb77d8b[_0x50c9d7(0xb6)])||{};try{const _0x5978de=new ws[(_0x50c9d7(0xbc))](_0xab7147,{'headers':{..._0x1e7e9e}}),_0x19b272=new _univerjs_core[(_0x50c9d7(0x9a))]();return{'URL':_0xab7147,'close':(_0x51c38e,_0x42a951)=>{const _0x5cf40e=_0x50c9d7;_0x5978de[_0x5cf40e(0xb9)](_0x51c38e,_0x42a951),_0x19b272[_0x5cf40e(0x85)]();},'send':_0x33091a=>{const _0x4b060e=_0x50c9d7;_0x5978de[_0x4b060e(0x8f)](_0x33091a);},'open$':new rxjs[(_0x50c9d7(0x9f))](_0x296e3f=>{const _0x27502d=_0x50c9d7,_0x446f96=_0x5b60e0=>_0x296e3f[_0x27502d(0xae)](_0x5b60e0);_0x5978de[_0x27502d(0x7f)](_0x27502d(0x7a),_0x446f96),_0x19b272['add']((0x0,_univerjs_core[_0x27502d(0x7d)])(()=>_0x5978de['removeEventListener']('open',_0x446f96)));})[_0x50c9d7(0x8d)]((0x0,rxjs[_0x50c9d7(0xbb)])()),'close$':new rxjs[(_0x50c9d7(0x9f))](_0x22c406=>{const _0x5efac4=_0x50c9d7,_0x350260=_0x3a16d5=>_0x22c406[_0x5efac4(0xae)](_0x3a16d5);_0x5978de[_0x5efac4(0x7f)]('close',_0x350260),_0x19b272[_0x5efac4(0xa5)]((0x0,_univerjs_core['toDisposable'])(()=>_0x5978de['removeEventListener'](_0x5efac4(0xb9),_0x350260)));})[_0x50c9d7(0x8d)]((0x0,rxjs['share'])()),'error$':new rxjs[(_0x50c9d7(0x9f))](_0xcc3713=>{const _0x4463a2=_0x50c9d7,_0x424d56=_0x3e2916=>_0xcc3713[_0x4463a2(0xae)](_0x3e2916);_0x5978de[_0x4463a2(0x7f)](_0x4463a2(0xb0),_0x424d56),_0x19b272[_0x4463a2(0xa5)]((0x0,_univerjs_core[_0x4463a2(0x7d)])(()=>_0x5978de['removeEventListener'](_0x4463a2(0xb0),_0x424d56)));})[_0x50c9d7(0x8d)]((0x0,rxjs[_0x50c9d7(0xbb)])()),'message$':new rxjs[(_0x50c9d7(0x9f))](_0xb51679=>{const _0x4f7a22=_0x50c9d7,_0x15070a=_0x2c1304=>_0xb51679[_0x4f7a22(0xae)](_0x2c1304);_0x5978de['addEventListener'](_0x4f7a22(0x7c),_0x15070a),_0x19b272['add']((0x0,_univerjs_core[_0x4f7a22(0x7d)])(()=>_0x5978de[_0x4f7a22(0xa3)]('message',_0x15070a)));})['pipe']((0x0,rxjs[_0x50c9d7(0xbb)])())};}catch(_0x10be02){return console['error'](_0x10be02),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,_univerjs_core['IConfigService'])],NodeWebSocketService);function _typeof(_0x4573a1){'@babel/helpers - typeof';const _0x469be0=_0xbacc9c;return _typeof='function'==typeof Symbol&&_0x469be0(0x9d)==typeof Symbol[_0x469be0(0x88)]?function(_0x44986d){return typeof _0x44986d;}:function(_0x2b26d8){const _0x1236d0=_0x469be0;return _0x2b26d8&&'function'==typeof Symbol&&_0x2b26d8[_0x1236d0(0xa0)]===Symbol&&_0x2b26d8!==Symbol[_0x1236d0(0x99)]?_0x1236d0(0x9d):typeof _0x2b26d8;},_typeof(_0x4573a1);}function toPrimitive(_0x4440eb,_0x555771){const _0x36abde=_0xbacc9c;if(_0x36abde(0xa9)!=_typeof(_0x4440eb)||!_0x4440eb)return _0x4440eb;var _0x2ea076=_0x4440eb[Symbol['toPrimitive']];if(void 0x0!==_0x2ea076){var _0x3c0c38=_0x2ea076[_0x36abde(0xa1)](_0x4440eb,_0x555771||_0x36abde(0x83));if(_0x36abde(0xa9)!=_typeof(_0x3c0c38))return _0x3c0c38;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x36abde(0xaf)===_0x555771?String:Number)(_0x4440eb);}function toPropertyKey(_0x1922d9){const _0x5637d9=_0xbacc9c;var _0x34d2bd=toPrimitive(_0x1922d9,_0x5637d9(0xaf));return _0x5637d9(0x9d)==_typeof(_0x34d2bd)?_0x34d2bd:_0x34d2bd+'';}function _defineProperty(_0x1f34c0,_0x4095d9,_0x7f9068){const _0x4e27d0=_0xbacc9c;return(_0x4095d9=toPropertyKey(_0x4095d9))in _0x1f34c0?Object[_0x4e27d0(0x81)](_0x1f34c0,_0x4095d9,{'value':_0x7f9068,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1f34c0[_0x4095d9]=_0x7f9068,_0x1f34c0;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends _univerjs_core[_0xbacc9c(0xb5)]{constructor(_0x2026f8=defaultPluginConfig,_0x4f761e,_0x1ff548){const _0x1e224a=_0xbacc9c;super(),this['_configService']=_0x4f761e,this[_0x1e224a(0x92)]=_0x1ff548,this['_configService'][_0x1e224a(0x9b)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x2026f8);}[_0xbacc9c(0x82)](){this['_registerDependencies']();}[_0xbacc9c(0x98)](){(0x0,_univerjs_core['registerDependencies'])(this['_injector'],[[_univerjs_network['ISocketService'],{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0xbacc9c(0xc2),_0xbacc9c(0x8a)),_defineProperty(UniverCollaborationClientNodePlugin,_0xbacc9c(0xb2),name),_defineProperty(UniverCollaborationClientNodePlugin,_0xbacc9c(0x80),version),UniverCollaborationClientNodePlugin=__decorate([(0x0,_univerjs_core[_0xbacc9c(0xc4)])(_univerjs_pro_collaboration_client[_0xbacc9c(0x93)]),__decorateParam(0x1,_univerjs_core[_0xbacc9c(0x97)]),__decorateParam(0x2,(0x0,_univerjs_core[_0xbacc9c(0xa6)])(_univerjs_core[_0xbacc9c(0x95)]))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends _univerjs_pro_collaboration_client[_0xbacc9c(0x86)]{constructor(_0x871437,_0x402506,_0xcda330,_0x41129f,_0x57d007){const _0x4de9f6=_0xbacc9c;super(_0x871437,_0x402506,_0xcda330,_0x41129f,_0x57d007);const _0x5e1cf9=this[_0x4de9f6(0x8b)][_0x4de9f6(0xbe)](_univerjs_pro_collaboration_client[_0x4de9f6(0xbd)]);this[_0x4de9f6(0xa7)]['registerHTTPInterceptor']({'interceptor':(_0x3dbb72,_0x25dde8)=>{const _0xeac0f5=_0x4de9f6,_0x2adfa6=_0x3dbb72[_0xeac0f5(0xad)];if(_0x5e1cf9===null||_0x5e1cf9===void 0x0?void 0x0:_0x5e1cf9[_0xeac0f5(0xb6)]){for(const _0x4f7e90 in _0x5e1cf9[_0xeac0f5(0xb6)])_0x2adfa6[_0xeac0f5(0xaa)](_0x4f7e90,_0x5e1cf9[_0xeac0f5(0xb6)][_0x4f7e90]);}return _0x25dde8(_0x3dbb72);}});}async[_0xbacc9c(0xab)](_0x2a1e3a){const _0x2442ff=_0xbacc9c;return this[_0x2442ff(0xba)](_0x2a1e3a);}};function _0x133a(){const _0x58b922=['1644249BuXHlP','add','Inject','_httpService','2188LjpvfU','object','set','createSocket','14mCUUPC','headers','next','string','error','8721066pEdVCA','packageName','@univerjs-pro/collaboration-client-node','4928964qsAOuA','Plugin','customHeaders','HTTPService','172170neHWKh','close','_doCreateSocket','share','WebSocket','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','getConfig','function','NodeCollaborationSocketService','ILogService','pluginName','Disposable','DependentOn','open','toStringTag','message','toDisposable','5ZpZDIS','addEventListener','version','defineProperty','onStarting','default','1424rcZOVc','dispose','CollaborationSocketService','getOwnPropertyDescriptor','iterator','5698312ZDwXoE','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_configService','30339740MZhUfX','pipe','0.21.1','send','collaboration-client-node.config','decorate','_injector','UniverCollaborationClientPlugin','ISnapshotServerService','Injector','length','IConfigService','_registerDependencies','prototype','DisposableCollection','setConfig','COLLABORATION_CLIENT_NODE_CONFIG_KEY','symbol','UniverCollaborationClientNodePlugin','Observable','constructor','call','Module','removeEventListener'];_0x133a=function(){return _0x58b922;};return _0x133a();}NodeCollaborationSocketService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0xbacc9c(0xa6)])(_univerjs_core[_0xbacc9c(0x95)])),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_network[_0xbacc9c(0xb7)])),__decorateParam(0x2,_univerjs_core[_0xbacc9c(0x97)]),__decorateParam(0x3,_univerjs_core[_0xbacc9c(0xc1)]),__decorateParam(0x4,_univerjs_pro_collaboration[_0xbacc9c(0x94)])],NodeCollaborationSocketService),exports[_0xbacc9c(0x9c)]=COLLABORATION_CLIENT_NODE_CONFIG_KEY,Object['defineProperty'](exports,_0xbacc9c(0xc0),{'enumerable':!![],'get':function(){return NodeCollaborationSocketService;}}),Object['defineProperty'](exports,_0xbacc9c(0x9e),{'enumerable':!![],'get':function(){return UniverCollaborationClientNodePlugin;}});
|
|
1
|
+
const _0x8b7d45=_0x5e90;(function(_0x4686e4,_0x4d4f29){const _0xd5f504=_0x5e90,_0x5f4a9d=_0x4686e4();while(!![]){try{const _0x45bd64=parseInt(_0xd5f504(0x103))/0x1+-parseInt(_0xd5f504(0xf2))/0x2+-parseInt(_0xd5f504(0xd8))/0x3*(parseInt(_0xd5f504(0xec))/0x4)+parseInt(_0xd5f504(0xd3))/0x5*(parseInt(_0xd5f504(0xe9))/0x6)+-parseInt(_0xd5f504(0xf8))/0x7*(parseInt(_0xd5f504(0xe8))/0x8)+parseInt(_0xd5f504(0x10b))/0x9*(parseInt(_0xd5f504(0xc4))/0xa)+parseInt(_0xd5f504(0xf4))/0xb*(parseInt(_0xd5f504(0xe6))/0xc);if(_0x45bd64===_0x4d4f29)break;else _0x5f4a9d['push'](_0x5f4a9d['shift']());}catch(_0x5b1a11){_0x5f4a9d['push'](_0x5f4a9d['shift']());}}}(_0x2fcd,0xc3e4e),Object[_0x8b7d45(0xcd)](exports,Symbol[_0x8b7d45(0x108)],{'value':'Module'}));let _univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_core=require('@univerjs/core'),_univerjs_network=require('@univerjs/network'),rxjs=require('rxjs'),ws=require('ws'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration');function _0x5e90(_0x46cb51,_0x1f1492){_0x46cb51=_0x46cb51-0xc3;const _0x2fcd91=_0x2fcd();let _0x5e9038=_0x2fcd91[_0x46cb51];return _0x5e9038;}const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x8b7d45(0xfd),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x8b7d45(0xe1),version=_0x8b7d45(0xde);function __decorateParam(_0x216b1d,_0x347ba1){return function(_0x202323,_0x53a820){_0x347ba1(_0x202323,_0x53a820,_0x216b1d);};}function __decorate(_0x3678d8,_0x4a3f95,_0x2fdc66,_0x3cefe8){const _0x55a079=_0x8b7d45;var _0x6df3d9=arguments[_0x55a079(0xf9)],_0x13538b=_0x6df3d9<0x3?_0x4a3f95:_0x3cefe8===null?_0x3cefe8=Object[_0x55a079(0xee)](_0x4a3f95,_0x2fdc66):_0x3cefe8,_0x31812e;if(typeof Reflect===_0x55a079(0xf3)&&typeof Reflect['decorate']===_0x55a079(0xf6))_0x13538b=Reflect[_0x55a079(0x102)](_0x3678d8,_0x4a3f95,_0x2fdc66,_0x3cefe8);else{for(var _0x1a3f19=_0x3678d8[_0x55a079(0xf9)]-0x1;_0x1a3f19>=0x0;_0x1a3f19--)if(_0x31812e=_0x3678d8[_0x1a3f19])_0x13538b=(_0x6df3d9<0x3?_0x31812e(_0x13538b):_0x6df3d9>0x3?_0x31812e(_0x4a3f95,_0x2fdc66,_0x13538b):_0x31812e(_0x4a3f95,_0x2fdc66))||_0x13538b;}return _0x6df3d9>0x3&&_0x13538b&&Object[_0x55a079(0xcd)](_0x4a3f95,_0x2fdc66,_0x13538b),_0x13538b;}let NodeWebSocketService=class NodeWebSocketService extends _univerjs_core[_0x8b7d45(0xdc)]{constructor(_0x28e20f){const _0x172be3=_0x8b7d45;super(),this[_0x172be3(0xef)]=_0x28e20f;}[_0x8b7d45(0xcb)](_0x4f5ee6){const _0x1ff986=_0x8b7d45;var _0x258cec;const _0x1ade03=((_0x258cec=this[_0x1ff986(0xef)][_0x1ff986(0xdb)](_univerjs_pro_collaboration_client[_0x1ff986(0xdd)]))===null||_0x258cec===void 0x0?void 0x0:_0x258cec['customHeaders'])||{};try{const _0x598701=new ws[(_0x1ff986(0xea))](_0x4f5ee6,{'headers':{..._0x1ade03}}),_0x51f3b9=new _univerjs_core[(_0x1ff986(0xc3))]();return{'URL':_0x4f5ee6,'close':(_0x5c7732,_0x3aa86d)=>{const _0x2cb812=_0x1ff986;_0x598701['close'](_0x5c7732,_0x3aa86d),_0x51f3b9[_0x2cb812(0xe5)]();},'send':_0x4fcc89=>{_0x598701['send'](_0x4fcc89);},'open$':new rxjs[(_0x1ff986(0xe3))](_0x49a0fa=>{const _0x997564=_0x1ff986,_0x44e0fe=_0x4ff058=>_0x49a0fa[_0x997564(0xd2)](_0x4ff058);_0x598701[_0x997564(0xd4)](_0x997564(0xeb),_0x44e0fe),_0x51f3b9['add']((0x0,_univerjs_core[_0x997564(0xe2)])(()=>_0x598701[_0x997564(0x109)](_0x997564(0xeb),_0x44e0fe)));})[_0x1ff986(0xd5)]((0x0,rxjs[_0x1ff986(0xd9)])()),'close$':new rxjs[(_0x1ff986(0xe3))](_0x16bf69=>{const _0x2b2a0d=_0x1ff986,_0x1e12c5=_0x362c39=>_0x16bf69[_0x2b2a0d(0xd2)](_0x362c39);_0x598701['addEventListener'](_0x2b2a0d(0xe4),_0x1e12c5),_0x51f3b9[_0x2b2a0d(0xd7)]((0x0,_univerjs_core[_0x2b2a0d(0xe2)])(()=>_0x598701[_0x2b2a0d(0x109)]('close',_0x1e12c5)));})[_0x1ff986(0xd5)]((0x0,rxjs['share'])()),'error$':new rxjs[(_0x1ff986(0xe3))](_0x84501c=>{const _0x51c4bb=_0x1ff986,_0x37dd7c=_0x2b93a8=>_0x84501c[_0x51c4bb(0xd2)](_0x2b93a8);_0x598701[_0x51c4bb(0xd4)](_0x51c4bb(0xf1),_0x37dd7c),_0x51f3b9[_0x51c4bb(0xd7)]((0x0,_univerjs_core[_0x51c4bb(0xe2)])(()=>_0x598701[_0x51c4bb(0x109)](_0x51c4bb(0xf1),_0x37dd7c)));})[_0x1ff986(0xd5)]((0x0,rxjs['share'])()),'message$':new rxjs['Observable'](_0x4e61d9=>{const _0x5a9f8e=_0x1ff986,_0x5040e2=_0x469495=>_0x4e61d9[_0x5a9f8e(0xd2)](_0x469495);_0x598701[_0x5a9f8e(0xd4)](_0x5a9f8e(0xdf),_0x5040e2),_0x51f3b9[_0x5a9f8e(0xd7)]((0x0,_univerjs_core[_0x5a9f8e(0xe2)])(()=>_0x598701[_0x5a9f8e(0x109)](_0x5a9f8e(0xdf),_0x5040e2)));})[_0x1ff986(0xd5)]((0x0,rxjs[_0x1ff986(0xd9)])())};}catch(_0x1a88f8){return console[_0x1ff986(0xf1)](_0x1a88f8),null;}}};function _0x2fcd(){const _0x636091=['Disposable','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','0.22.0','message','packageName','@univerjs-pro/collaboration-client-node','toDisposable','Observable','close','dispose','67056fJRRCU','COLLABORATION_CLIENT_NODE_CONFIG_KEY','4489688aBkgnk','8706GHoyuD','WebSocket','open','52TShYAK','call','getOwnPropertyDescriptor','_configService','ILogService','error','1796698qVIgPe','object','3091fuPGUG','customHeaders','function','string','7rUXutO','length','pluginName','Injector','registerDependencies','collaboration-client-node.config','UniverCollaborationClientPlugin','_registerDependencies','DependentOn','CollaborationSocketService','decorate','687952tsphEv','prototype','ISnapshotServerService','HTTPService','iterator','toStringTag','removeEventListener','version','1062UbLKEU','DisposableCollection','44740VmufHe','onStarting','registerHTTPInterceptor','IConfigService','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_injector','Inject','createSocket','set','defineProperty','toPrimitive','_doCreateSocket','Plugin','NodeCollaborationSocketService','next','2155knyrJB','addEventListener','pipe','symbol','add','265281LZYBnv','share','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getConfig'];_0x2fcd=function(){return _0x636091;};return _0x2fcd();}NodeWebSocketService=__decorate([__decorateParam(0x0,_univerjs_core[_0x8b7d45(0xc7)])],NodeWebSocketService);function _typeof(_0x5c27ba){'@babel/helpers - typeof';const _0xa7d56b=_0x8b7d45;return _typeof=_0xa7d56b(0xf6)==typeof Symbol&&'symbol'==typeof Symbol[_0xa7d56b(0x107)]?function(_0x5b1f86){return typeof _0x5b1f86;}:function(_0xfb6c1e){const _0x27030a=_0xa7d56b;return _0xfb6c1e&&'function'==typeof Symbol&&_0xfb6c1e['constructor']===Symbol&&_0xfb6c1e!==Symbol[_0x27030a(0x104)]?_0x27030a(0xd6):typeof _0xfb6c1e;},_typeof(_0x5c27ba);}function toPrimitive(_0x4f3a05,_0x13fa84){const _0x283d6d=_0x8b7d45;if('object'!=_typeof(_0x4f3a05)||!_0x4f3a05)return _0x4f3a05;var _0x4513f1=_0x4f3a05[Symbol[_0x283d6d(0xce)]];if(void 0x0!==_0x4513f1){var _0xe00f05=_0x4513f1[_0x283d6d(0xed)](_0x4f3a05,_0x13fa84||'default');if(_0x283d6d(0xf3)!=_typeof(_0xe00f05))return _0xe00f05;throw new TypeError(_0x283d6d(0xda));}return(_0x283d6d(0xf7)===_0x13fa84?String:Number)(_0x4f3a05);}function toPropertyKey(_0x2e6b1c){const _0x2b0989=_0x8b7d45;var _0x2c43bc=toPrimitive(_0x2e6b1c,_0x2b0989(0xf7));return _0x2b0989(0xd6)==_typeof(_0x2c43bc)?_0x2c43bc:_0x2c43bc+'';}function _defineProperty(_0x5d1855,_0x52a188,_0x1e2db2){const _0x435c1e=_0x8b7d45;return(_0x52a188=toPropertyKey(_0x52a188))in _0x5d1855?Object[_0x435c1e(0xcd)](_0x5d1855,_0x52a188,{'value':_0x1e2db2,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5d1855[_0x52a188]=_0x1e2db2,_0x5d1855;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends _univerjs_core[_0x8b7d45(0xd0)]{constructor(_0x5683d5=defaultPluginConfig,_0x339b31,_0x3b656a){const _0x4a3db4=_0x8b7d45;super(),this[_0x4a3db4(0xef)]=_0x339b31,this[_0x4a3db4(0xc9)]=_0x3b656a,this[_0x4a3db4(0xef)]['setConfig'](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x5683d5);}[_0x8b7d45(0xc5)](){this['_registerDependencies']();}[_0x8b7d45(0xff)](){const _0x8d69c9=_0x8b7d45;(0x0,_univerjs_core[_0x8d69c9(0xfc)])(this[_0x8d69c9(0xc9)],[[_univerjs_network['ISocketService'],{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x8b7d45(0xfa),_0x8b7d45(0xc8)),_defineProperty(UniverCollaborationClientNodePlugin,_0x8b7d45(0xe0),name),_defineProperty(UniverCollaborationClientNodePlugin,_0x8b7d45(0x10a),version),UniverCollaborationClientNodePlugin=__decorate([(0x0,_univerjs_core[_0x8b7d45(0x100)])(_univerjs_pro_collaboration_client[_0x8b7d45(0xfe)]),__decorateParam(0x1,_univerjs_core[_0x8b7d45(0xc7)]),__decorateParam(0x2,(0x0,_univerjs_core[_0x8b7d45(0xca)])(_univerjs_core[_0x8b7d45(0xfb)]))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends _univerjs_pro_collaboration_client[_0x8b7d45(0x101)]{constructor(_0x10a67f,_0x482f3f,_0x3d3063,_0x56e91d,_0x39c3da){const _0xfddb6=_0x8b7d45;super(_0x10a67f,_0x482f3f,_0x3d3063,_0x56e91d,_0x39c3da);const _0x5db0a6=this['_configService'][_0xfddb6(0xdb)](_univerjs_pro_collaboration_client[_0xfddb6(0xdd)]);this['_httpService'][_0xfddb6(0xc6)]({'interceptor':(_0xac0514,_0x240a69)=>{const _0xbe9ca0=_0xfddb6,_0x1db53c=_0xac0514['headers'];if(_0x5db0a6===null||_0x5db0a6===void 0x0?void 0x0:_0x5db0a6[_0xbe9ca0(0xf5)]){for(const _0x56cd49 in _0x5db0a6[_0xbe9ca0(0xf5)])_0x1db53c[_0xbe9ca0(0xcc)](_0x56cd49,_0x5db0a6['customHeaders'][_0x56cd49]);}return _0x240a69(_0xac0514);}});}async[_0x8b7d45(0xcb)](_0x6677ec){const _0x2f947d=_0x8b7d45;return this[_0x2f947d(0xcf)](_0x6677ec);}};NodeCollaborationSocketService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x8b7d45(0xfb)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x8b7d45(0xca)])(_univerjs_network[_0x8b7d45(0x106)])),__decorateParam(0x2,_univerjs_core[_0x8b7d45(0xc7)]),__decorateParam(0x3,_univerjs_core[_0x8b7d45(0xf0)]),__decorateParam(0x4,_univerjs_pro_collaboration[_0x8b7d45(0x105)])],NodeCollaborationSocketService),exports[_0x8b7d45(0xe7)]=COLLABORATION_CLIENT_NODE_CONFIG_KEY,Object['defineProperty'](exports,_0x8b7d45(0xd1),{'enumerable':!![],'get':function(){return NodeCollaborationSocketService;}}),Object['defineProperty'](exports,'UniverCollaborationClientNodePlugin',{'enumerable':!![],'get':function(){return UniverCollaborationClientNodePlugin;}});
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5a8710=_0x1597;(function(_0x49a4ed,_0x5de77a){const _0x597a3c=_0x1597,_0x3c423b=_0x49a4ed();while(!![]){try{const _0xd6a874=-parseInt(_0x597a3c(0x186))/0x1+-parseInt(_0x597a3c(0x183))/0x2*(-parseInt(_0x597a3c(0x192))/0x3)+parseInt(_0x597a3c(0x175))/0x4*(-parseInt(_0x597a3c(0x17a))/0x5)+parseInt(_0x597a3c(0x1a0))/0x6*(-parseInt(_0x597a3c(0x19e))/0x7)+parseInt(_0x597a3c(0x184))/0x8+parseInt(_0x597a3c(0x19a))/0x9*(-parseInt(_0x597a3c(0x18f))/0xa)+parseInt(_0x597a3c(0x181))/0xb;if(_0xd6a874===_0x5de77a)break;else _0x3c423b['push'](_0x3c423b['shift']());}catch(_0x3a6209){_0x3c423b['push'](_0x3c423b['shift']());}}}(_0x3156,0x49810));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,CollaborationSocketService,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{DependentOn,Disposable,DisposableCollection,IConfigService,ILogService,Inject,Injector,Plugin,registerDependencies,toDisposable}from'@univerjs/core';function _0x1597(_0x21da0d,_0x1efbd6){_0x21da0d=_0x21da0d-0x16f;const _0x3156db=_0x3156();let _0x1597b3=_0x3156db[_0x21da0d];return _0x1597b3;}import{HTTPService,ISocketService}from'@univerjs/network';import{Observable,share}from'rxjs';import{WebSocket}from'ws';import{ISnapshotServerService}from'@univerjs-pro/collaboration';function _0x3156(){const _0x3dfe8e=['symbol','toPrimitive','onStarting','string','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','736310PMxjsQ','add','_injector','3nXShLQ','open','object','error','0.22.0','send','close','constructor','72fWnQui','decorate','packageName','function','322133XbcFdM','@univerjs-pro/collaboration-client-node','66vYLjix','defineProperty','headers','message','_configService','_registerDependencies','getConfig','4WXBnie','collaboration-client-node.config','prototype','version','length','2811565qrsKKo','_httpService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','pipe','removeEventListener','call','dispose','16473908jRaqLS','next','846246vguSre','306864WRGUxn','pluginName','467VEKBYF','customHeaders','addEventListener','createSocket'];_0x3156=function(){return _0x3dfe8e;};return _0x3156();}const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x5a8710(0x176),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x5a8710(0x19f),version=_0x5a8710(0x196);function __decorateParam(_0x49f17c,_0x15f0a5){return function(_0x38f6ff,_0x1101e3){_0x15f0a5(_0x38f6ff,_0x1101e3,_0x49f17c);};}function __decorate(_0x4b7c93,_0x3677b9,_0x4b648a,_0x15640c){const _0x3e1781=_0x5a8710;var _0x32c20e=arguments[_0x3e1781(0x179)],_0x3be586=_0x32c20e<0x3?_0x3677b9:_0x15640c===null?_0x15640c=Object['getOwnPropertyDescriptor'](_0x3677b9,_0x4b648a):_0x15640c,_0x5ceeff;if(typeof Reflect===_0x3e1781(0x194)&&typeof Reflect[_0x3e1781(0x19b)]===_0x3e1781(0x19d))_0x3be586=Reflect[_0x3e1781(0x19b)](_0x4b7c93,_0x3677b9,_0x4b648a,_0x15640c);else{for(var _0x5cc229=_0x4b7c93[_0x3e1781(0x179)]-0x1;_0x5cc229>=0x0;_0x5cc229--)if(_0x5ceeff=_0x4b7c93[_0x5cc229])_0x3be586=(_0x32c20e<0x3?_0x5ceeff(_0x3be586):_0x32c20e>0x3?_0x5ceeff(_0x3677b9,_0x4b648a,_0x3be586):_0x5ceeff(_0x3677b9,_0x4b648a))||_0x3be586;}return _0x32c20e>0x3&&_0x3be586&&Object[_0x3e1781(0x16f)](_0x3677b9,_0x4b648a,_0x3be586),_0x3be586;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x19d1a3){const _0xaf018e=_0x5a8710;super(),this[_0xaf018e(0x172)]=_0x19d1a3;}[_0x5a8710(0x189)](_0x5672af){const _0x382d0f=_0x5a8710;var _0x513a2e;const _0x152e2e=((_0x513a2e=this['_configService'][_0x382d0f(0x174)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x513a2e===void 0x0?void 0x0:_0x513a2e[_0x382d0f(0x187)])||{};try{const _0x5a099f=new WebSocket(_0x5672af,{'headers':{..._0x152e2e}}),_0x4a5a8d=new DisposableCollection();return{'URL':_0x5672af,'close':(_0x4cdcd2,_0x3f4806)=>{const _0x36c26a=_0x382d0f;_0x5a099f[_0x36c26a(0x198)](_0x4cdcd2,_0x3f4806),_0x4a5a8d[_0x36c26a(0x180)]();},'send':_0xeb9a40=>{const _0x164283=_0x382d0f;_0x5a099f[_0x164283(0x197)](_0xeb9a40);},'open$':new Observable(_0xd8e5de=>{const _0x10f96d=_0x382d0f,_0x3a1a4a=_0x451081=>_0xd8e5de[_0x10f96d(0x182)](_0x451081);_0x5a099f[_0x10f96d(0x188)](_0x10f96d(0x193),_0x3a1a4a),_0x4a5a8d[_0x10f96d(0x190)](toDisposable(()=>_0x5a099f[_0x10f96d(0x17e)](_0x10f96d(0x193),_0x3a1a4a)));})['pipe'](share()),'close$':new Observable(_0x3b94c4=>{const _0x54fb6b=_0x382d0f,_0xb40cee=_0x194243=>_0x3b94c4[_0x54fb6b(0x182)](_0x194243);_0x5a099f['addEventListener'](_0x54fb6b(0x198),_0xb40cee),_0x4a5a8d['add'](toDisposable(()=>_0x5a099f['removeEventListener'](_0x54fb6b(0x198),_0xb40cee)));})[_0x382d0f(0x17d)](share()),'error$':new Observable(_0x515541=>{const _0x137ecb=_0x382d0f,_0x1e28b5=_0x5c13a6=>_0x515541[_0x137ecb(0x182)](_0x5c13a6);_0x5a099f[_0x137ecb(0x188)](_0x137ecb(0x195),_0x1e28b5),_0x4a5a8d['add'](toDisposable(()=>_0x5a099f[_0x137ecb(0x17e)](_0x137ecb(0x195),_0x1e28b5)));})[_0x382d0f(0x17d)](share()),'message$':new Observable(_0xfc4b92=>{const _0x143ee5=_0x382d0f,_0x4c3e57=_0x47bcdb=>_0xfc4b92[_0x143ee5(0x182)](_0x47bcdb);_0x5a099f[_0x143ee5(0x188)]('message',_0x4c3e57),_0x4a5a8d[_0x143ee5(0x190)](toDisposable(()=>_0x5a099f[_0x143ee5(0x17e)](_0x143ee5(0x171),_0x4c3e57)));})[_0x382d0f(0x17d)](share())};}catch(_0x5f4150){return console['error'](_0x5f4150),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _typeof(_0x67b5ad){'@babel/helpers - typeof';const _0x3e5819=_0x5a8710;return _typeof=_0x3e5819(0x19d)==typeof Symbol&&_0x3e5819(0x18a)==typeof Symbol['iterator']?function(_0x448f4a){return typeof _0x448f4a;}:function(_0x1ea872){const _0xc72174=_0x3e5819;return _0x1ea872&&_0xc72174(0x19d)==typeof Symbol&&_0x1ea872[_0xc72174(0x199)]===Symbol&&_0x1ea872!==Symbol[_0xc72174(0x177)]?_0xc72174(0x18a):typeof _0x1ea872;},_typeof(_0x67b5ad);}function toPrimitive(_0x21080b,_0xe37beb){const _0x126617=_0x5a8710;if('object'!=_typeof(_0x21080b)||!_0x21080b)return _0x21080b;var _0x50193b=_0x21080b[Symbol[_0x126617(0x18b)]];if(void 0x0!==_0x50193b){var _0x501dea=_0x50193b[_0x126617(0x17f)](_0x21080b,_0xe37beb||'default');if(_0x126617(0x194)!=_typeof(_0x501dea))return _0x501dea;throw new TypeError(_0x126617(0x17c));}return(_0x126617(0x18d)===_0xe37beb?String:Number)(_0x21080b);}function toPropertyKey(_0x124386){const _0x3dad8d=_0x5a8710;var _0x3da37b=toPrimitive(_0x124386,_0x3dad8d(0x18d));return _0x3dad8d(0x18a)==_typeof(_0x3da37b)?_0x3da37b:_0x3da37b+'';}function _defineProperty(_0x63b83d,_0x29dfca,_0x35bdc8){return(_0x29dfca=toPropertyKey(_0x29dfca))in _0x63b83d?Object['defineProperty'](_0x63b83d,_0x29dfca,{'value':_0x35bdc8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x63b83d[_0x29dfca]=_0x35bdc8,_0x63b83d;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0x47b9a3=defaultPluginConfig,_0x52eb4f,_0x1b8b95){const _0x498a79=_0x5a8710;super(),this[_0x498a79(0x172)]=_0x52eb4f,this[_0x498a79(0x191)]=_0x1b8b95,this[_0x498a79(0x172)]['setConfig'](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x47b9a3);}[_0x5a8710(0x18c)](){const _0x3c7f80=_0x5a8710;this[_0x3c7f80(0x173)]();}[_0x5a8710(0x173)](){const _0x249d6b=_0x5a8710;registerDependencies(this[_0x249d6b(0x191)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x5a8710(0x185),_0x5a8710(0x18e)),_defineProperty(UniverCollaborationClientNodePlugin,_0x5a8710(0x19c),name),_defineProperty(UniverCollaborationClientNodePlugin,_0x5a8710(0x178),version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0xfb6e9f,_0x11d991,_0x56fb4f,_0x2404c7,_0x5e27c4){const _0x2d212f=_0x5a8710;super(_0xfb6e9f,_0x11d991,_0x56fb4f,_0x2404c7,_0x5e27c4);const _0x56000a=this[_0x2d212f(0x172)][_0x2d212f(0x174)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this[_0x2d212f(0x17b)]['registerHTTPInterceptor']({'interceptor':(_0xd0351c,_0x1b97b8)=>{const _0x30049a=_0x2d212f,_0x34c239=_0xd0351c[_0x30049a(0x170)];if(_0x56000a===null||_0x56000a===void 0x0?void 0x0:_0x56000a[_0x30049a(0x187)]){for(const _0x552503 in _0x56000a[_0x30049a(0x187)])_0x34c239['set'](_0x552503,_0x56000a['customHeaders'][_0x552503]);}return _0x1b97b8(_0xd0351c);}});}async['createSocket'](_0x1480a6){return this['_doCreateSocket'](_0x1480a6);}};NodeCollaborationSocketService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ILogService),__decorateParam(0x4,ISnapshotServerService)],NodeCollaborationSocketService);export{COLLABORATION_CLIENT_NODE_CONFIG_KEY,NodeCollaborationSocketService,UniverCollaborationClientNodePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5a8710=_0x1597;(function(_0x49a4ed,_0x5de77a){const _0x597a3c=_0x1597,_0x3c423b=_0x49a4ed();while(!![]){try{const _0xd6a874=-parseInt(_0x597a3c(0x186))/0x1+-parseInt(_0x597a3c(0x183))/0x2*(-parseInt(_0x597a3c(0x192))/0x3)+parseInt(_0x597a3c(0x175))/0x4*(-parseInt(_0x597a3c(0x17a))/0x5)+parseInt(_0x597a3c(0x1a0))/0x6*(-parseInt(_0x597a3c(0x19e))/0x7)+parseInt(_0x597a3c(0x184))/0x8+parseInt(_0x597a3c(0x19a))/0x9*(-parseInt(_0x597a3c(0x18f))/0xa)+parseInt(_0x597a3c(0x181))/0xb;if(_0xd6a874===_0x5de77a)break;else _0x3c423b['push'](_0x3c423b['shift']());}catch(_0x3a6209){_0x3c423b['push'](_0x3c423b['shift']());}}}(_0x3156,0x49810));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,CollaborationSocketService,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{DependentOn,Disposable,DisposableCollection,IConfigService,ILogService,Inject,Injector,Plugin,registerDependencies,toDisposable}from'@univerjs/core';function _0x1597(_0x21da0d,_0x1efbd6){_0x21da0d=_0x21da0d-0x16f;const _0x3156db=_0x3156();let _0x1597b3=_0x3156db[_0x21da0d];return _0x1597b3;}import{HTTPService,ISocketService}from'@univerjs/network';import{Observable,share}from'rxjs';import{WebSocket}from'ws';import{ISnapshotServerService}from'@univerjs-pro/collaboration';function _0x3156(){const _0x3dfe8e=['symbol','toPrimitive','onStarting','string','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','736310PMxjsQ','add','_injector','3nXShLQ','open','object','error','0.22.0','send','close','constructor','72fWnQui','decorate','packageName','function','322133XbcFdM','@univerjs-pro/collaboration-client-node','66vYLjix','defineProperty','headers','message','_configService','_registerDependencies','getConfig','4WXBnie','collaboration-client-node.config','prototype','version','length','2811565qrsKKo','_httpService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','pipe','removeEventListener','call','dispose','16473908jRaqLS','next','846246vguSre','306864WRGUxn','pluginName','467VEKBYF','customHeaders','addEventListener','createSocket'];_0x3156=function(){return _0x3dfe8e;};return _0x3156();}const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x5a8710(0x176),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x5a8710(0x19f),version=_0x5a8710(0x196);function __decorateParam(_0x49f17c,_0x15f0a5){return function(_0x38f6ff,_0x1101e3){_0x15f0a5(_0x38f6ff,_0x1101e3,_0x49f17c);};}function __decorate(_0x4b7c93,_0x3677b9,_0x4b648a,_0x15640c){const _0x3e1781=_0x5a8710;var _0x32c20e=arguments[_0x3e1781(0x179)],_0x3be586=_0x32c20e<0x3?_0x3677b9:_0x15640c===null?_0x15640c=Object['getOwnPropertyDescriptor'](_0x3677b9,_0x4b648a):_0x15640c,_0x5ceeff;if(typeof Reflect===_0x3e1781(0x194)&&typeof Reflect[_0x3e1781(0x19b)]===_0x3e1781(0x19d))_0x3be586=Reflect[_0x3e1781(0x19b)](_0x4b7c93,_0x3677b9,_0x4b648a,_0x15640c);else{for(var _0x5cc229=_0x4b7c93[_0x3e1781(0x179)]-0x1;_0x5cc229>=0x0;_0x5cc229--)if(_0x5ceeff=_0x4b7c93[_0x5cc229])_0x3be586=(_0x32c20e<0x3?_0x5ceeff(_0x3be586):_0x32c20e>0x3?_0x5ceeff(_0x3677b9,_0x4b648a,_0x3be586):_0x5ceeff(_0x3677b9,_0x4b648a))||_0x3be586;}return _0x32c20e>0x3&&_0x3be586&&Object[_0x3e1781(0x16f)](_0x3677b9,_0x4b648a,_0x3be586),_0x3be586;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x19d1a3){const _0xaf018e=_0x5a8710;super(),this[_0xaf018e(0x172)]=_0x19d1a3;}[_0x5a8710(0x189)](_0x5672af){const _0x382d0f=_0x5a8710;var _0x513a2e;const _0x152e2e=((_0x513a2e=this['_configService'][_0x382d0f(0x174)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x513a2e===void 0x0?void 0x0:_0x513a2e[_0x382d0f(0x187)])||{};try{const _0x5a099f=new WebSocket(_0x5672af,{'headers':{..._0x152e2e}}),_0x4a5a8d=new DisposableCollection();return{'URL':_0x5672af,'close':(_0x4cdcd2,_0x3f4806)=>{const _0x36c26a=_0x382d0f;_0x5a099f[_0x36c26a(0x198)](_0x4cdcd2,_0x3f4806),_0x4a5a8d[_0x36c26a(0x180)]();},'send':_0xeb9a40=>{const _0x164283=_0x382d0f;_0x5a099f[_0x164283(0x197)](_0xeb9a40);},'open$':new Observable(_0xd8e5de=>{const _0x10f96d=_0x382d0f,_0x3a1a4a=_0x451081=>_0xd8e5de[_0x10f96d(0x182)](_0x451081);_0x5a099f[_0x10f96d(0x188)](_0x10f96d(0x193),_0x3a1a4a),_0x4a5a8d[_0x10f96d(0x190)](toDisposable(()=>_0x5a099f[_0x10f96d(0x17e)](_0x10f96d(0x193),_0x3a1a4a)));})['pipe'](share()),'close$':new Observable(_0x3b94c4=>{const _0x54fb6b=_0x382d0f,_0xb40cee=_0x194243=>_0x3b94c4[_0x54fb6b(0x182)](_0x194243);_0x5a099f['addEventListener'](_0x54fb6b(0x198),_0xb40cee),_0x4a5a8d['add'](toDisposable(()=>_0x5a099f['removeEventListener'](_0x54fb6b(0x198),_0xb40cee)));})[_0x382d0f(0x17d)](share()),'error$':new Observable(_0x515541=>{const _0x137ecb=_0x382d0f,_0x1e28b5=_0x5c13a6=>_0x515541[_0x137ecb(0x182)](_0x5c13a6);_0x5a099f[_0x137ecb(0x188)](_0x137ecb(0x195),_0x1e28b5),_0x4a5a8d['add'](toDisposable(()=>_0x5a099f[_0x137ecb(0x17e)](_0x137ecb(0x195),_0x1e28b5)));})[_0x382d0f(0x17d)](share()),'message$':new Observable(_0xfc4b92=>{const _0x143ee5=_0x382d0f,_0x4c3e57=_0x47bcdb=>_0xfc4b92[_0x143ee5(0x182)](_0x47bcdb);_0x5a099f[_0x143ee5(0x188)]('message',_0x4c3e57),_0x4a5a8d[_0x143ee5(0x190)](toDisposable(()=>_0x5a099f[_0x143ee5(0x17e)](_0x143ee5(0x171),_0x4c3e57)));})[_0x382d0f(0x17d)](share())};}catch(_0x5f4150){return console['error'](_0x5f4150),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _typeof(_0x67b5ad){'@babel/helpers - typeof';const _0x3e5819=_0x5a8710;return _typeof=_0x3e5819(0x19d)==typeof Symbol&&_0x3e5819(0x18a)==typeof Symbol['iterator']?function(_0x448f4a){return typeof _0x448f4a;}:function(_0x1ea872){const _0xc72174=_0x3e5819;return _0x1ea872&&_0xc72174(0x19d)==typeof Symbol&&_0x1ea872[_0xc72174(0x199)]===Symbol&&_0x1ea872!==Symbol[_0xc72174(0x177)]?_0xc72174(0x18a):typeof _0x1ea872;},_typeof(_0x67b5ad);}function toPrimitive(_0x21080b,_0xe37beb){const _0x126617=_0x5a8710;if('object'!=_typeof(_0x21080b)||!_0x21080b)return _0x21080b;var _0x50193b=_0x21080b[Symbol[_0x126617(0x18b)]];if(void 0x0!==_0x50193b){var _0x501dea=_0x50193b[_0x126617(0x17f)](_0x21080b,_0xe37beb||'default');if(_0x126617(0x194)!=_typeof(_0x501dea))return _0x501dea;throw new TypeError(_0x126617(0x17c));}return(_0x126617(0x18d)===_0xe37beb?String:Number)(_0x21080b);}function toPropertyKey(_0x124386){const _0x3dad8d=_0x5a8710;var _0x3da37b=toPrimitive(_0x124386,_0x3dad8d(0x18d));return _0x3dad8d(0x18a)==_typeof(_0x3da37b)?_0x3da37b:_0x3da37b+'';}function _defineProperty(_0x63b83d,_0x29dfca,_0x35bdc8){return(_0x29dfca=toPropertyKey(_0x29dfca))in _0x63b83d?Object['defineProperty'](_0x63b83d,_0x29dfca,{'value':_0x35bdc8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x63b83d[_0x29dfca]=_0x35bdc8,_0x63b83d;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0x47b9a3=defaultPluginConfig,_0x52eb4f,_0x1b8b95){const _0x498a79=_0x5a8710;super(),this[_0x498a79(0x172)]=_0x52eb4f,this[_0x498a79(0x191)]=_0x1b8b95,this[_0x498a79(0x172)]['setConfig'](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x47b9a3);}[_0x5a8710(0x18c)](){const _0x3c7f80=_0x5a8710;this[_0x3c7f80(0x173)]();}[_0x5a8710(0x173)](){const _0x249d6b=_0x5a8710;registerDependencies(this[_0x249d6b(0x191)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x5a8710(0x185),_0x5a8710(0x18e)),_defineProperty(UniverCollaborationClientNodePlugin,_0x5a8710(0x19c),name),_defineProperty(UniverCollaborationClientNodePlugin,_0x5a8710(0x178),version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0xfb6e9f,_0x11d991,_0x56fb4f,_0x2404c7,_0x5e27c4){const _0x2d212f=_0x5a8710;super(_0xfb6e9f,_0x11d991,_0x56fb4f,_0x2404c7,_0x5e27c4);const _0x56000a=this[_0x2d212f(0x172)][_0x2d212f(0x174)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this[_0x2d212f(0x17b)]['registerHTTPInterceptor']({'interceptor':(_0xd0351c,_0x1b97b8)=>{const _0x30049a=_0x2d212f,_0x34c239=_0xd0351c[_0x30049a(0x170)];if(_0x56000a===null||_0x56000a===void 0x0?void 0x0:_0x56000a[_0x30049a(0x187)]){for(const _0x552503 in _0x56000a[_0x30049a(0x187)])_0x34c239['set'](_0x552503,_0x56000a['customHeaders'][_0x552503]);}return _0x1b97b8(_0xd0351c);}});}async['createSocket'](_0x1480a6){return this['_doCreateSocket'](_0x1480a6);}};NodeCollaborationSocketService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ILogService),__decorateParam(0x4,ISnapshotServerService)],NodeCollaborationSocketService);export{COLLABORATION_CLIENT_NODE_CONFIG_KEY,NodeCollaborationSocketService,UniverCollaborationClientNodePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x440d5d,_0x1d523e){const _0x3929f3=_0x1c12,_0x4e2f9e=_0x440d5d();while(!![]){try{const _0x120067=parseInt(_0x3929f3(0x214))/0x1+-parseInt(_0x3929f3(0x210))/0x2+parseInt(_0x3929f3(0x21b))/0x3*(parseInt(_0x3929f3(0x1fc))/0x4)+-parseInt(_0x3929f3(0x20b))/0x5*(-parseInt(_0x3929f3(0x21e))/0x6)+-parseInt(_0x3929f3(0x201))/0x7*(-parseInt(_0x3929f3(0x23b))/0x8)+-parseInt(_0x3929f3(0x1ff))/0x9*(parseInt(_0x3929f3(0x23a))/0xa)+parseInt(_0x3929f3(0x217))/0xb*(parseInt(_0x3929f3(0x21d))/0xc);if(_0x120067===_0x1d523e)break;else _0x4e2f9e['push'](_0x4e2f9e['shift']());}catch(_0x86863d){_0x4e2f9e['push'](_0x4e2f9e['shift']());}}}(_0x35de,0x92352),function(_0x4d4e81,_0x35feba){const _0x33540f=_0x1c12;typeof exports=='object'&&typeof module<'u'?_0x35feba(exports,require(`@univerjs-pro/collaboration-client`),require(`@univerjs/core`),require(`@univerjs/network`),require(`rxjs`),require(`@univerjs-pro/collaboration`)):typeof define=='function'&&define[_0x33540f(0x1f4)]?define([_0x33540f(0x235),'@univerjs-pro/collaboration-client','@univerjs/core',_0x33540f(0x20a),'rxjs',_0x33540f(0x208)],_0x35feba):(_0x4d4e81=typeof globalThis<'u'?globalThis:_0x4d4e81||self,_0x35feba(_0x4d4e81[_0x33540f(0x1fb)]={},_0x4d4e81['UniverProCollaborationClient'],_0x4d4e81[_0x33540f(0x200)],_0x4d4e81[_0x33540f(0x207)],_0x4d4e81[_0x33540f(0x225)],_0x4d4e81['UniverProCollaboration']));}(this,function(_0x5001c6,_0x3b919e,_0x1975b9,_0x3afbd0,_0x2e6d63,_0x375af6){const _0x4cf1f9=_0x1c12;Object[_0x4cf1f9(0x224)](_0x5001c6,Symbol['toStringTag'],{'value':_0x4cf1f9(0x23d)});var _0x5d0f93=(_0x546a99,_0x1a0564)=>()=>(_0x1a0564||_0x546a99((_0x1a0564={'exports':{}})[_0x4cf1f9(0x235)],_0x1a0564),_0x1a0564[_0x4cf1f9(0x235)]);let _0xa8bf80='collaboration-client-node.config';Symbol(_0xa8bf80);let _0xcadcc2={};var _0x50b20b=_0x4cf1f9(0x215),_0x40facc=_0x4cf1f9(0x227),_0x206abd=_0x5d0f93((_0x3bf612,_0x1ea551)=>{const _0x27e266=_0x4cf1f9;_0x1ea551[_0x27e266(0x235)]=function(){const _0x480975=_0x27e266;throw Error(_0x480975(0x233));};})();function _0x3094f3(_0x1e5e1e,_0x30ddcd){return function(_0x31c4f7,_0x3d1aa7){_0x30ddcd(_0x31c4f7,_0x3d1aa7,_0x1e5e1e);};}function _0xa110b5(_0x20d047,_0x5c6ae6,_0x10305d,_0x18102e){const _0x569978=_0x4cf1f9;var _0x13bae5=arguments[_0x569978(0x1f3)],_0x191a2b=_0x13bae5<0x3?_0x5c6ae6:_0x18102e===null?_0x18102e=Object[_0x569978(0x1fa)](_0x5c6ae6,_0x10305d):_0x18102e,_0x2ecbc1;if(typeof Reflect==_0x569978(0x241)&&typeof Reflect[_0x569978(0x1f6)]==_0x569978(0x221))_0x191a2b=Reflect[_0x569978(0x1f6)](_0x20d047,_0x5c6ae6,_0x10305d,_0x18102e);else{for(var _0x4445dc=_0x20d047['length']-0x1;_0x4445dc>=0x0;_0x4445dc--)(_0x2ecbc1=_0x20d047[_0x4445dc])&&(_0x191a2b=(_0x13bae5<0x3?_0x2ecbc1(_0x191a2b):_0x13bae5>0x3?_0x2ecbc1(_0x5c6ae6,_0x10305d,_0x191a2b):_0x2ecbc1(_0x5c6ae6,_0x10305d))||_0x191a2b);}return _0x13bae5>0x3&&_0x191a2b&&Object[_0x569978(0x224)](_0x5c6ae6,_0x10305d,_0x191a2b),_0x191a2b;}let _0x32043b=class extends _0x1975b9[_0x4cf1f9(0x21a)]{constructor(_0x25c2b6){super(),this['_configService']=_0x25c2b6;}['createSocket'](_0x2233ae){const _0x1ca0c3=_0x4cf1f9;var _0x5c5ef3;let _0x1ea10f=((_0x5c5ef3=this[_0x1ca0c3(0x23e)]['getConfig'](_0x3b919e[_0x1ca0c3(0x1f5)]))==null?void 0x0:_0x5c5ef3[_0x1ca0c3(0x205)])||{};try{let _0x37828c=new _0x206abd[(_0x1ca0c3(0x239))](_0x2233ae,{'headers':{..._0x1ea10f}}),_0x5cc97a=new _0x1975b9[(_0x1ca0c3(0x231))]();return{'URL':_0x2233ae,'close':(_0xb72bcb,_0x2e8b52)=>{const _0x209de3=_0x1ca0c3;_0x37828c[_0x209de3(0x230)](_0xb72bcb,_0x2e8b52),_0x5cc97a['dispose']();},'send':_0x21651c=>{const _0x1546c5=_0x1ca0c3;_0x37828c[_0x1546c5(0x22f)](_0x21651c);},'open$':new _0x2e6d63[(_0x1ca0c3(0x21f))](_0x4b41d9=>{const _0x312a90=_0x1ca0c3;let _0x26f2fa=_0x46cd4a=>_0x4b41d9['next'](_0x46cd4a);_0x37828c['addEventListener'](_0x312a90(0x228),_0x26f2fa),_0x5cc97a['add']((0x0,_0x1975b9[_0x312a90(0x21c)])(()=>_0x37828c[_0x312a90(0x23c)](_0x312a90(0x228),_0x26f2fa)));})[_0x1ca0c3(0x20e)]((0x0,_0x2e6d63[_0x1ca0c3(0x238)])()),'close$':new _0x2e6d63[(_0x1ca0c3(0x21f))](_0x12a4c1=>{const _0x3a6e4b=_0x1ca0c3;let _0x10b5a0=_0xa49f48=>_0x12a4c1[_0x3a6e4b(0x22a)](_0xa49f48);_0x37828c[_0x3a6e4b(0x1fe)](_0x3a6e4b(0x230),_0x10b5a0),_0x5cc97a[_0x3a6e4b(0x234)]((0x0,_0x1975b9[_0x3a6e4b(0x21c)])(()=>_0x37828c[_0x3a6e4b(0x23c)](_0x3a6e4b(0x230),_0x10b5a0)));})[_0x1ca0c3(0x20e)]((0x0,_0x2e6d63['share'])()),'error$':new _0x2e6d63[(_0x1ca0c3(0x21f))](_0x263e17=>{const _0x10fe8a=_0x1ca0c3;let _0x42d2b5=_0xd05164=>_0x263e17[_0x10fe8a(0x22a)](_0xd05164);_0x37828c[_0x10fe8a(0x1fe)]('error',_0x42d2b5),_0x5cc97a['add']((0x0,_0x1975b9[_0x10fe8a(0x21c)])(()=>_0x37828c[_0x10fe8a(0x23c)](_0x10fe8a(0x222),_0x42d2b5)));})['pipe']((0x0,_0x2e6d63['share'])()),'message$':new _0x2e6d63[(_0x1ca0c3(0x21f))](_0x4bba5f=>{const _0x2b8f71=_0x1ca0c3;let _0x82575c=_0x5b9318=>_0x4bba5f['next'](_0x5b9318);_0x37828c['addEventListener'](_0x2b8f71(0x22d),_0x82575c),_0x5cc97a[_0x2b8f71(0x234)]((0x0,_0x1975b9[_0x2b8f71(0x21c)])(()=>_0x37828c['removeEventListener'](_0x2b8f71(0x22d),_0x82575c)));})['pipe']((0x0,_0x2e6d63[_0x1ca0c3(0x238)])())};}catch(_0x43a50f){return console[_0x1ca0c3(0x222)](_0x43a50f),null;}}};_0x32043b=_0xa110b5([_0x3094f3(0x0,_0x1975b9['IConfigService'])],_0x32043b);function _0xbc9cc1(_0x102b66){'@babel/helpers - typeof';const _0x13bea7=_0x4cf1f9;return _0xbc9cc1=typeof Symbol==_0x13bea7(0x221)&&typeof Symbol[_0x13bea7(0x20d)]==_0x13bea7(0x237)?function(_0x5b4b89){return typeof _0x5b4b89;}:function(_0x44cbc8){const _0x279137=_0x13bea7;return _0x44cbc8&&typeof Symbol==_0x279137(0x221)&&_0x44cbc8[_0x279137(0x219)]===Symbol&&_0x44cbc8!==Symbol[_0x279137(0x202)]?'symbol':typeof _0x44cbc8;},_0xbc9cc1(_0x102b66);}function _0xe0dac4(_0x20f3a5,_0x2a791d){const _0xa51290=_0x4cf1f9;if(_0xbc9cc1(_0x20f3a5)!='object'||!_0x20f3a5)return _0x20f3a5;var _0x584ad7=_0x20f3a5[Symbol[_0xa51290(0x223)]];if(_0x584ad7!==void 0x0){var _0x455131=_0x584ad7[_0xa51290(0x232)](_0x20f3a5,_0x2a791d||'default');if(_0xbc9cc1(_0x455131)!=_0xa51290(0x241))return _0x455131;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2a791d==='string'?String:Number)(_0x20f3a5);}function _0x1fc0a6(_0x2c0edf){const _0xda71d1=_0x4cf1f9;var _0x445c61=_0xe0dac4(_0x2c0edf,_0xda71d1(0x211));return _0xbc9cc1(_0x445c61)==_0xda71d1(0x237)?_0x445c61:_0x445c61+'';}function _0x2cfa03(_0xfc1343,_0x425b61,_0x375e2e){const _0x42e933=_0x4cf1f9;return(_0x425b61=_0x1fc0a6(_0x425b61))in _0xfc1343?Object[_0x42e933(0x224)](_0xfc1343,_0x425b61,{'value':_0x375e2e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xfc1343[_0x425b61]=_0x375e2e,_0xfc1343;}let _0x41f03b=class extends _0x1975b9[_0x4cf1f9(0x203)]{constructor(_0x19a3bc=_0xcadcc2,_0x1b5de4,_0x3042e9){const _0x3d33a3=_0x4cf1f9;super(),this['_configService']=_0x1b5de4,this[_0x3d33a3(0x1f2)]=_0x3042e9,this['_configService'][_0x3d33a3(0x22e)](_0xa8bf80,_0x19a3bc);}[_0x4cf1f9(0x204)](){const _0x1d2544=_0x4cf1f9;this[_0x1d2544(0x229)]();}[_0x4cf1f9(0x229)](){const _0x513e85=_0x4cf1f9;(0x0,_0x1975b9[_0x513e85(0x1fd)])(this[_0x513e85(0x1f2)],[[_0x3afbd0[_0x513e85(0x240)],{'useClass':_0x32043b}]]);}};_0x2cfa03(_0x41f03b,_0x4cf1f9(0x20c),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_0x2cfa03(_0x41f03b,'packageName',_0x50b20b),_0x2cfa03(_0x41f03b,_0x4cf1f9(0x1f8),_0x40facc),_0x41f03b=_0xa110b5([(0x0,_0x1975b9[_0x4cf1f9(0x1f7)])(_0x3b919e[_0x4cf1f9(0x23f)]),_0x3094f3(0x1,_0x1975b9[_0x4cf1f9(0x20f)]),_0x3094f3(0x2,(0x0,_0x1975b9['Inject'])(_0x1975b9[_0x4cf1f9(0x226)]))],_0x41f03b);let _0x51cfbe=class extends _0x3b919e[_0x4cf1f9(0x1f9)]{constructor(_0x13a94a,_0x31b0bb,_0x5a9885,_0x231f2e,_0x39635d){const _0x722343=_0x4cf1f9;super(_0x13a94a,_0x31b0bb,_0x5a9885,_0x231f2e,_0x39635d);let _0x2270be=this[_0x722343(0x23e)]['getConfig'](_0x3b919e['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']);this[_0x722343(0x209)][_0x722343(0x212)]({'interceptor':(_0x5c0b19,_0x2f084d)=>{const _0x5880bf=_0x722343;let _0x595b97=_0x5c0b19[_0x5880bf(0x216)];if(_0x2270be!=null&&_0x2270be[_0x5880bf(0x205)]){for(let _0x579a24 in _0x2270be[_0x5880bf(0x205)])_0x595b97[_0x5880bf(0x213)](_0x579a24,_0x2270be['customHeaders'][_0x579a24]);}return _0x2f084d(_0x5c0b19);}});}async[_0x4cf1f9(0x236)](_0x22f9d6){return this['_doCreateSocket'](_0x22f9d6);}};_0x51cfbe=_0xa110b5([_0x3094f3(0x0,(0x0,_0x1975b9[_0x4cf1f9(0x22c)])(_0x1975b9[_0x4cf1f9(0x226)])),_0x3094f3(0x1,(0x0,_0x1975b9['Inject'])(_0x3afbd0['HTTPService'])),_0x3094f3(0x2,_0x1975b9['IConfigService']),_0x3094f3(0x3,_0x1975b9[_0x4cf1f9(0x220)]),_0x3094f3(0x4,_0x375af6['ISnapshotServerService'])],_0x51cfbe),_0x5001c6[_0x4cf1f9(0x218)]=_0xa8bf80,Object['defineProperty'](_0x5001c6,_0x4cf1f9(0x22b),{'enumerable':!0x0,'get':function(){return _0x51cfbe;}}),Object[_0x4cf1f9(0x224)](_0x5001c6,_0x4cf1f9(0x206),{'enumerable':!0x0,'get':function(){return _0x41f03b;}});}));function _0x1c12(_0x20a7f5,_0x546718){_0x20a7f5=_0x20a7f5-0x1f2;const _0x35dea1=_0x35de();let _0x1c12ae=_0x35dea1[_0x20a7f5];return _0x1c12ae;}function _0x35de(){const _0x2f631f=['315vCMKtr','UniverCore','2639sScPMt','prototype','Plugin','onStarting','customHeaders','UniverCollaborationClientNodePlugin','UniverNetwork','@univerjs-pro/collaboration','_httpService','@univerjs/network','327095sKHiHu','pluginName','iterator','pipe','IConfigService','2100914VwRdXN','string','registerHTTPInterceptor','set','834308diUyFa','@univerjs-pro/collaboration-client-node','headers','539HemhVu','COLLABORATION_CLIENT_NODE_CONFIG_KEY','constructor','Disposable','6tqrbHC','toDisposable','60972YXxHjb','18utLSdQ','Observable','ILogService','function','error','toPrimitive','defineProperty','rxjs','Injector','0.21.1','open','_registerDependencies','next','NodeCollaborationSocketService','Inject','message','setConfig','send','close','DisposableCollection','call','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','add','exports','createSocket','symbol','share','WebSocket','231460knRZoo','11784IABqbn','removeEventListener','Module','_configService','UniverCollaborationClientPlugin','ISocketService','object','_injector','length','amd','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','decorate','DependentOn','version','CollaborationSocketService','getOwnPropertyDescriptor','UniverProCollaborationClientNode','1249156DSTXBS','registerDependencies','addEventListener'];_0x35de=function(){return _0x2f631f;};return _0x35de();}
|
|
1
|
+
function _0xc71a(){const _0x9f3e98=['toPrimitive','Disposable','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','UniverProCollaboration','ISocketService','rxjs','constructor','@univerjs-pro/collaboration','@univerjs-pro/collaboration-client','addEventListener','close','collaboration-client-node.config','function','142688zkcsAt','UniverProCollaborationClient','ILogService','set','decorate','504iCYKZJ','registerDependencies','@univerjs/network','6Ojzukh','add','iterator','COLLABORATION_CLIENT_NODE_CONFIG_KEY','Plugin','share','defineProperty','pipe','exports','getConfig','message','WebSocket','object','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','17495bNfAsi','Injector','HTTPService','_httpService','CollaborationSocketService','pluginName','_configService','toDisposable','_injector','UniverCollaborationClientPlugin','removeEventListener','DependentOn','getOwnPropertyDescriptor','dispose','open','createSocket','1283673xMPWEb','string','_doCreateSocket','default','version','10699770ycCHNS','error','call','UniverProCollaborationClientNode','next','IConfigService','UniverCore','headers','1845KDGwWs','length','symbol','0.22.0','send','NodeCollaborationSocketService','customHeaders','DisposableCollection','_registerDependencies','15728JBXnOT','Observable','prototype','packageName','toStringTag','Inject','1133153ezMXNU','541162KyaDpq','onStarting','@univerjs-pro/collaboration-client-node'];_0xc71a=function(){return _0x9f3e98;};return _0xc71a();}function _0x1d05(_0x107a8a,_0x254433){_0x107a8a=_0x107a8a-0x1b9;const _0xc71a3d=_0xc71a();let _0x1d051d=_0xc71a3d[_0x107a8a];return _0x1d051d;}(function(_0x4f514f,_0x3ac54d){const _0x33487c=_0x1d05,_0x122681=_0x4f514f();while(!![]){try{const _0x5171f2=parseInt(_0x33487c(0x1e9))/0x1+-parseInt(_0x33487c(0x1d9))/0x2+parseInt(_0x33487c(0x1bc))/0x3+-parseInt(_0x33487c(0x1ee))/0x4*(-parseInt(_0x33487c(0x1ff))/0x5)+-parseInt(_0x33487c(0x1f1))/0x6*(-parseInt(_0x33487c(0x1d8))/0x7)+-parseInt(_0x33487c(0x1d2))/0x8*(-parseInt(_0x33487c(0x1c9))/0x9)+-parseInt(_0x33487c(0x1c1))/0xa;if(_0x5171f2===_0x3ac54d)break;else _0x122681['push'](_0x122681['shift']());}catch(_0x1c2581){_0x122681['push'](_0x122681['shift']());}}}(_0xc71a,0x3991c),function(_0x4a3ed1,_0x1fbb4d){const _0x50734b=_0x1d05;typeof exports==_0x50734b(0x1fd)&&typeof module<'u'?_0x1fbb4d(exports,require(`@univerjs-pro/collaboration-client`),require(`@univerjs/core`),require(`@univerjs/network`),require(`rxjs`),require(`@univerjs-pro/collaboration`)):typeof define==_0x50734b(0x1e8)&&define['amd']?define(['exports',_0x50734b(0x1e4),'@univerjs/core',_0x50734b(0x1f0),'rxjs',_0x50734b(0x1e3)],_0x1fbb4d):(_0x4a3ed1=typeof globalThis<'u'?globalThis:_0x4a3ed1||self,_0x1fbb4d(_0x4a3ed1[_0x50734b(0x1c4)]={},_0x4a3ed1[_0x50734b(0x1ea)],_0x4a3ed1[_0x50734b(0x1c7)],_0x4a3ed1['UniverNetwork'],_0x4a3ed1[_0x50734b(0x1e1)],_0x4a3ed1[_0x50734b(0x1df)]));}(this,function(_0x2a5b29,_0x2eb05a,_0x42bedd,_0x448c4d,_0x5b8349,_0x2d4475){const _0x150a23=_0x1d05;Object[_0x150a23(0x1f7)](_0x2a5b29,Symbol[_0x150a23(0x1d6)],{'value':'Module'});var _0x2cf107=(_0x40b8ba,_0x1a52bb)=>()=>(_0x1a52bb||(_0x40b8ba((_0x1a52bb={'exports':{}})[_0x150a23(0x1f9)],_0x1a52bb),_0x40b8ba=null),_0x1a52bb[_0x150a23(0x1f9)]);let _0xe8a30d=_0x150a23(0x1e7);Symbol(_0xe8a30d);let _0x4f5ba5={};var _0x3d430a=_0x150a23(0x1db),_0x4f07ea=_0x150a23(0x1cc),_0x1fe297=_0x2cf107((_0x4939fb,_0x4f70c2)=>{const _0x409d3f=_0x150a23;_0x4f70c2[_0x409d3f(0x1f9)]=function(){throw Error('ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object');};})();function _0x274e90(_0x546db4,_0xf641d7){return function(_0x297049,_0x2624e5){_0xf641d7(_0x297049,_0x2624e5,_0x546db4);};}function _0x42c225(_0x8122ce,_0x34767b,_0x1e5d9f,_0x451d28){const _0x168f63=_0x150a23;var _0x5b55d1=arguments[_0x168f63(0x1ca)],_0x104b0c=_0x5b55d1<0x3?_0x34767b:_0x451d28===null?_0x451d28=Object[_0x168f63(0x20b)](_0x34767b,_0x1e5d9f):_0x451d28,_0x5c816f;if(typeof Reflect==_0x168f63(0x1fd)&&typeof Reflect['decorate']==_0x168f63(0x1e8))_0x104b0c=Reflect[_0x168f63(0x1ed)](_0x8122ce,_0x34767b,_0x1e5d9f,_0x451d28);else{for(var _0x42ca15=_0x8122ce[_0x168f63(0x1ca)]-0x1;_0x42ca15>=0x0;_0x42ca15--)(_0x5c816f=_0x8122ce[_0x42ca15])&&(_0x104b0c=(_0x5b55d1<0x3?_0x5c816f(_0x104b0c):_0x5b55d1>0x3?_0x5c816f(_0x34767b,_0x1e5d9f,_0x104b0c):_0x5c816f(_0x34767b,_0x1e5d9f))||_0x104b0c);}return _0x5b55d1>0x3&&_0x104b0c&&Object['defineProperty'](_0x34767b,_0x1e5d9f,_0x104b0c),_0x104b0c;}let _0x22874b=class extends _0x42bedd[_0x150a23(0x1dd)]{constructor(_0x3a0b55){const _0x16198b=_0x150a23;super(),this[_0x16198b(0x205)]=_0x3a0b55;}[_0x150a23(0x1bb)](_0x5c2058){const _0x14d8ab=_0x150a23;var _0x33849f;let _0x526801=((_0x33849f=this[_0x14d8ab(0x205)][_0x14d8ab(0x1fa)](_0x2eb05a[_0x14d8ab(0x1de)]))==null?void 0x0:_0x33849f[_0x14d8ab(0x1cf)])||{};try{let _0x37911e=new _0x1fe297[(_0x14d8ab(0x1fc))](_0x5c2058,{'headers':{..._0x526801}}),_0x56831f=new _0x42bedd[(_0x14d8ab(0x1d0))]();return{'URL':_0x5c2058,'close':(_0x732551,_0x371363)=>{const _0x1985f7=_0x14d8ab;_0x37911e[_0x1985f7(0x1e6)](_0x732551,_0x371363),_0x56831f[_0x1985f7(0x1b9)]();},'send':_0x565cf4=>{const _0x2767e4=_0x14d8ab;_0x37911e[_0x2767e4(0x1cd)](_0x565cf4);},'open$':new _0x5b8349[(_0x14d8ab(0x1d3))](_0x5abe09=>{const _0x246c10=_0x14d8ab;let _0xf2612d=_0x4ab86a=>_0x5abe09[_0x246c10(0x1c5)](_0x4ab86a);_0x37911e[_0x246c10(0x1e5)](_0x246c10(0x1ba),_0xf2612d),_0x56831f['add']((0x0,_0x42bedd[_0x246c10(0x206)])(()=>_0x37911e[_0x246c10(0x209)](_0x246c10(0x1ba),_0xf2612d)));})['pipe']((0x0,_0x5b8349[_0x14d8ab(0x1f6)])()),'close$':new _0x5b8349['Observable'](_0x594d23=>{const _0x16ef77=_0x14d8ab;let _0x262beb=_0x2be8d3=>_0x594d23[_0x16ef77(0x1c5)](_0x2be8d3);_0x37911e['addEventListener'](_0x16ef77(0x1e6),_0x262beb),_0x56831f['add']((0x0,_0x42bedd['toDisposable'])(()=>_0x37911e[_0x16ef77(0x209)](_0x16ef77(0x1e6),_0x262beb)));})[_0x14d8ab(0x1f8)]((0x0,_0x5b8349[_0x14d8ab(0x1f6)])()),'error$':new _0x5b8349[(_0x14d8ab(0x1d3))](_0xbaa418=>{const _0x4b6bc8=_0x14d8ab;let _0x228300=_0x34389d=>_0xbaa418['next'](_0x34389d);_0x37911e['addEventListener'](_0x4b6bc8(0x1c2),_0x228300),_0x56831f[_0x4b6bc8(0x1f2)]((0x0,_0x42bedd[_0x4b6bc8(0x206)])(()=>_0x37911e[_0x4b6bc8(0x209)](_0x4b6bc8(0x1c2),_0x228300)));})['pipe']((0x0,_0x5b8349['share'])()),'message$':new _0x5b8349[(_0x14d8ab(0x1d3))](_0xa6e77c=>{const _0x5d1b65=_0x14d8ab;let _0x3c57a=_0x1a1bf1=>_0xa6e77c['next'](_0x1a1bf1);_0x37911e[_0x5d1b65(0x1e5)](_0x5d1b65(0x1fb),_0x3c57a),_0x56831f[_0x5d1b65(0x1f2)]((0x0,_0x42bedd[_0x5d1b65(0x206)])(()=>_0x37911e[_0x5d1b65(0x209)](_0x5d1b65(0x1fb),_0x3c57a)));})[_0x14d8ab(0x1f8)]((0x0,_0x5b8349['share'])())};}catch(_0x40669d){return console[_0x14d8ab(0x1c2)](_0x40669d),null;}}};_0x22874b=_0x42c225([_0x274e90(0x0,_0x42bedd[_0x150a23(0x1c6)])],_0x22874b);function _0x50b263(_0x20e370){'@babel/helpers - typeof';const _0x5b8458=_0x150a23;return _0x50b263=typeof Symbol=='function'&&typeof Symbol[_0x5b8458(0x1f3)]==_0x5b8458(0x1cb)?function(_0x2653fa){return typeof _0x2653fa;}:function(_0x3b227c){const _0x50064a=_0x5b8458;return _0x3b227c&&typeof Symbol==_0x50064a(0x1e8)&&_0x3b227c[_0x50064a(0x1e2)]===Symbol&&_0x3b227c!==Symbol[_0x50064a(0x1d4)]?'symbol':typeof _0x3b227c;},_0x50b263(_0x20e370);}function _0x5e6d60(_0x1c4c9d,_0x3d7c6d){const _0x566757=_0x150a23;if(_0x50b263(_0x1c4c9d)!=_0x566757(0x1fd)||!_0x1c4c9d)return _0x1c4c9d;var _0x25a101=_0x1c4c9d[Symbol[_0x566757(0x1dc)]];if(_0x25a101!==void 0x0){var _0x1be12e=_0x25a101[_0x566757(0x1c3)](_0x1c4c9d,_0x3d7c6d||_0x566757(0x1bf));if(_0x50b263(_0x1be12e)!=_0x566757(0x1fd))return _0x1be12e;throw TypeError(_0x566757(0x1fe));}return(_0x3d7c6d===_0x566757(0x1bd)?String:Number)(_0x1c4c9d);}function _0x43a547(_0x11e4b2){const _0x3984fc=_0x150a23;var _0x9486d6=_0x5e6d60(_0x11e4b2,_0x3984fc(0x1bd));return _0x50b263(_0x9486d6)==_0x3984fc(0x1cb)?_0x9486d6:_0x9486d6+'';}function _0x244488(_0x3c7a7b,_0x20b18b,_0x436aa3){const _0x52a992=_0x150a23;return(_0x20b18b=_0x43a547(_0x20b18b))in _0x3c7a7b?Object[_0x52a992(0x1f7)](_0x3c7a7b,_0x20b18b,{'value':_0x436aa3,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3c7a7b[_0x20b18b]=_0x436aa3,_0x3c7a7b;}let _0x3101d4=class extends _0x42bedd[_0x150a23(0x1f5)]{constructor(_0x3c61ff=_0x4f5ba5,_0x4743c8,_0x41d90e){const _0x184224=_0x150a23;super(),this[_0x184224(0x205)]=_0x4743c8,this[_0x184224(0x207)]=_0x41d90e,this[_0x184224(0x205)]['setConfig'](_0xe8a30d,_0x3c61ff);}[_0x150a23(0x1da)](){const _0xa0b676=_0x150a23;this[_0xa0b676(0x1d1)]();}[_0x150a23(0x1d1)](){const _0x3d4218=_0x150a23;(0x0,_0x42bedd[_0x3d4218(0x1ef)])(this[_0x3d4218(0x207)],[[_0x448c4d[_0x3d4218(0x1e0)],{'useClass':_0x22874b}]]);}};_0x244488(_0x3101d4,_0x150a23(0x204),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_0x244488(_0x3101d4,_0x150a23(0x1d5),_0x3d430a),_0x244488(_0x3101d4,_0x150a23(0x1c0),_0x4f07ea),_0x3101d4=_0x42c225([(0x0,_0x42bedd[_0x150a23(0x20a)])(_0x2eb05a[_0x150a23(0x208)]),_0x274e90(0x1,_0x42bedd[_0x150a23(0x1c6)]),_0x274e90(0x2,(0x0,_0x42bedd[_0x150a23(0x1d7)])(_0x42bedd[_0x150a23(0x200)]))],_0x3101d4);let _0x58e246=class extends _0x2eb05a[_0x150a23(0x203)]{constructor(_0x5a4d77,_0x1a2457,_0x2449f7,_0x1e69e8,_0x33eed7){const _0x2cb67c=_0x150a23;super(_0x5a4d77,_0x1a2457,_0x2449f7,_0x1e69e8,_0x33eed7);let _0x52e8ca=this[_0x2cb67c(0x205)][_0x2cb67c(0x1fa)](_0x2eb05a[_0x2cb67c(0x1de)]);this[_0x2cb67c(0x202)]['registerHTTPInterceptor']({'interceptor':(_0x41febd,_0x6d50b3)=>{const _0x44c7de=_0x2cb67c;let _0xc0d222=_0x41febd[_0x44c7de(0x1c8)];if(_0x52e8ca!=null&&_0x52e8ca[_0x44c7de(0x1cf)]){for(let _0x5ad6df in _0x52e8ca[_0x44c7de(0x1cf)])_0xc0d222[_0x44c7de(0x1ec)](_0x5ad6df,_0x52e8ca[_0x44c7de(0x1cf)][_0x5ad6df]);}return _0x6d50b3(_0x41febd);}});}async[_0x150a23(0x1bb)](_0x391bab){const _0x192fe7=_0x150a23;return this[_0x192fe7(0x1be)](_0x391bab);}};_0x58e246=_0x42c225([_0x274e90(0x0,(0x0,_0x42bedd[_0x150a23(0x1d7)])(_0x42bedd[_0x150a23(0x200)])),_0x274e90(0x1,(0x0,_0x42bedd[_0x150a23(0x1d7)])(_0x448c4d[_0x150a23(0x201)])),_0x274e90(0x2,_0x42bedd[_0x150a23(0x1c6)]),_0x274e90(0x3,_0x42bedd[_0x150a23(0x1eb)]),_0x274e90(0x4,_0x2d4475['ISnapshotServerService'])],_0x58e246),_0x2a5b29[_0x150a23(0x1f4)]=_0xe8a30d,Object[_0x150a23(0x1f7)](_0x2a5b29,_0x150a23(0x1ce),{'enumerable':!0x0,'get':function(){return _0x58e246;}}),Object['defineProperty'](_0x2a5b29,'UniverCollaborationClientNodePlugin',{'enumerable':!0x0,'get':function(){return _0x3101d4;}});}));
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/collaboration-client-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "",
|
|
6
|
-
"author": "DreamNum <developer@univer.ai>",
|
|
5
|
+
"description": "Node.js collaboration client plugin for Univer Pro.",
|
|
6
|
+
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
7
7
|
"funding": {
|
|
8
8
|
"type": "opencollective",
|
|
9
9
|
"url": "https://opencollective.com/univer"
|
|
@@ -16,7 +16,13 @@
|
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/dream-num/univer/issues"
|
|
18
18
|
},
|
|
19
|
-
"keywords": [
|
|
19
|
+
"keywords": [
|
|
20
|
+
"univer",
|
|
21
|
+
"univer-pro",
|
|
22
|
+
"collaboration",
|
|
23
|
+
"nodejs",
|
|
24
|
+
"client"
|
|
25
|
+
],
|
|
20
26
|
"exports": {
|
|
21
27
|
".": {
|
|
22
28
|
"import": "./lib/es/index.js",
|
|
@@ -46,17 +52,17 @@
|
|
|
46
52
|
},
|
|
47
53
|
"dependencies": {
|
|
48
54
|
"ws": "8.20.0",
|
|
49
|
-
"@univerjs-pro/collaboration": "0.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs
|
|
52
|
-
"@univerjs/network": "0.
|
|
55
|
+
"@univerjs-pro/collaboration-client": "0.22.0",
|
|
56
|
+
"@univerjs-pro/collaboration": "0.22.0",
|
|
57
|
+
"@univerjs/core": "0.22.0",
|
|
58
|
+
"@univerjs/network": "0.22.0"
|
|
53
59
|
},
|
|
54
60
|
"devDependencies": {
|
|
55
61
|
"@types/ws": "8.18.1",
|
|
56
62
|
"rxjs": "7.8.2",
|
|
57
63
|
"typescript": "^6.0.3",
|
|
58
64
|
"vitest": "^4.1.4",
|
|
59
|
-
"@univerjs-infra/shared": "0.
|
|
65
|
+
"@univerjs-infra/shared": "0.22.0"
|
|
60
66
|
},
|
|
61
67
|
"scripts": {
|
|
62
68
|
"test": "vitest run",
|