@univerjs-pro/collaboration-client-node 0.21.1 → 0.22.0-insiders.20260513-0b53885

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,16 +1,36 @@
1
- # @univerjs/collaboration-client-node
1
+ # @univerjs-pro/collaboration-client-node
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@univerjs/collaboration-client-node)](https://npmjs.org/packages/@univerjs/collaboration-client-node)
4
- [![license](https://img.shields.io/npm/l/@univerjs/collaboration-client-node)](https://img.shields.io/npm/l/@univerjs/collaboration-client-node)
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
+ [![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
5
 
6
- ## Introduction
6
+ `@univerjs-pro/collaboration-client-node` provides node.js collaboration client plugin for Univer Pro.
7
7
 
8
- > TODO: Introduction
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
- ### Installation
26
+ ```ts
27
+ import { UniverCollaborationClientNodePlugin } from '@univerjs-pro/collaboration-client-node';
13
28
 
14
- ```shell
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 _0x5560a8=_0x44c4;(function(_0x192128,_0x17bd6c){const _0x35ba19=_0x44c4,_0x1a1eeb=_0x192128();while(!![]){try{const _0x3feb28=parseInt(_0x35ba19(0x1ec))/0x1+-parseInt(_0x35ba19(0x1ed))/0x2+parseInt(_0x35ba19(0x1cf))/0x3*(parseInt(_0x35ba19(0x1e6))/0x4)+parseInt(_0x35ba19(0x1b5))/0x5+-parseInt(_0x35ba19(0x1db))/0x6*(parseInt(_0x35ba19(0x1aa))/0x7)+-parseInt(_0x35ba19(0x1bc))/0x8+parseInt(_0x35ba19(0x1d9))/0x9*(parseInt(_0x35ba19(0x1e8))/0xa);if(_0x3feb28===_0x17bd6c)break;else _0x1a1eeb['push'](_0x1a1eeb['shift']());}catch(_0x2d78da){_0x1a1eeb['push'](_0x1a1eeb['shift']());}}}(_0x3521,0x7d217),Object['defineProperty'](exports,Symbol[_0x5560a8(0x1c5)],{'value':_0x5560a8(0x1ca)}));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='collaboration-client-node.config',configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x5560a8(0x1c1),version='0.22.0-insiders.20260513-0b53885';function __decorateParam(_0x56e60d,_0xc1c412){return function(_0x276a24,_0x22c97a){_0xc1c412(_0x276a24,_0x22c97a,_0x56e60d);};}function __decorate(_0x984bb5,_0x19988b,_0x58cb4c,_0x72287b){const _0x5aff68=_0x5560a8;var _0x323a11=arguments[_0x5aff68(0x1b4)],_0x6a99b4=_0x323a11<0x3?_0x19988b:_0x72287b===null?_0x72287b=Object[_0x5aff68(0x1df)](_0x19988b,_0x58cb4c):_0x72287b,_0x1c64a3;if(typeof Reflect===_0x5aff68(0x1b8)&&typeof Reflect['decorate']===_0x5aff68(0x1ce))_0x6a99b4=Reflect[_0x5aff68(0x1d0)](_0x984bb5,_0x19988b,_0x58cb4c,_0x72287b);else{for(var _0xb1e54b=_0x984bb5[_0x5aff68(0x1b4)]-0x1;_0xb1e54b>=0x0;_0xb1e54b--)if(_0x1c64a3=_0x984bb5[_0xb1e54b])_0x6a99b4=(_0x323a11<0x3?_0x1c64a3(_0x6a99b4):_0x323a11>0x3?_0x1c64a3(_0x19988b,_0x58cb4c,_0x6a99b4):_0x1c64a3(_0x19988b,_0x58cb4c))||_0x6a99b4;}return _0x323a11>0x3&&_0x6a99b4&&Object['defineProperty'](_0x19988b,_0x58cb4c,_0x6a99b4),_0x6a99b4;}let NodeWebSocketService=class NodeWebSocketService extends _univerjs_core[_0x5560a8(0x1e0)]{constructor(_0xa915){super(),this['_configService']=_0xa915;}['createSocket'](_0x432b73){const _0x44fd35=_0x5560a8;var _0xab55eb;const _0x112752=((_0xab55eb=this['_configService'][_0x44fd35(0x1ad)](_univerjs_pro_collaboration_client[_0x44fd35(0x1e7)]))===null||_0xab55eb===void 0x0?void 0x0:_0xab55eb[_0x44fd35(0x1e3)])||{};try{const _0x2d42b6=new ws[(_0x44fd35(0x1a7))](_0x432b73,{'headers':{..._0x112752}}),_0x2048d7=new _univerjs_core[(_0x44fd35(0x1bf))]();return{'URL':_0x432b73,'close':(_0xb4cccd,_0x37e62d)=>{const _0x5db67e=_0x44fd35;_0x2d42b6[_0x5db67e(0x1c3)](_0xb4cccd,_0x37e62d),_0x2048d7[_0x5db67e(0x1c2)]();},'send':_0x51841e=>{const _0x35f80f=_0x44fd35;_0x2d42b6[_0x35f80f(0x1dc)](_0x51841e);},'open$':new rxjs[(_0x44fd35(0x1b9))](_0x3d6e79=>{const _0x21aa5a=_0x44fd35,_0x7e0298=_0x288367=>_0x3d6e79[_0x21aa5a(0x1e4)](_0x288367);_0x2d42b6[_0x21aa5a(0x1ab)](_0x21aa5a(0x1cc),_0x7e0298),_0x2048d7[_0x21aa5a(0x1d4)]((0x0,_univerjs_core[_0x21aa5a(0x1d5)])(()=>_0x2d42b6[_0x21aa5a(0x1ae)]('open',_0x7e0298)));})['pipe']((0x0,rxjs[_0x44fd35(0x1c4)])()),'close$':new rxjs[(_0x44fd35(0x1b9))](_0x162e00=>{const _0x28f7ae=_0x44fd35,_0x2ae973=_0x9f8eb8=>_0x162e00[_0x28f7ae(0x1e4)](_0x9f8eb8);_0x2d42b6[_0x28f7ae(0x1ab)](_0x28f7ae(0x1c3),_0x2ae973),_0x2048d7['add']((0x0,_univerjs_core[_0x28f7ae(0x1d5)])(()=>_0x2d42b6[_0x28f7ae(0x1ae)](_0x28f7ae(0x1c3),_0x2ae973)));})[_0x44fd35(0x1d1)]((0x0,rxjs[_0x44fd35(0x1c4)])()),'error$':new rxjs[(_0x44fd35(0x1b9))](_0x397ec2=>{const _0x4e66d5=_0x44fd35,_0x9af93a=_0x197b14=>_0x397ec2['next'](_0x197b14);_0x2d42b6[_0x4e66d5(0x1ab)](_0x4e66d5(0x1ac),_0x9af93a),_0x2048d7[_0x4e66d5(0x1d4)]((0x0,_univerjs_core['toDisposable'])(()=>_0x2d42b6[_0x4e66d5(0x1ae)](_0x4e66d5(0x1ac),_0x9af93a)));})[_0x44fd35(0x1d1)]((0x0,rxjs[_0x44fd35(0x1c4)])()),'message$':new rxjs['Observable'](_0x960d56=>{const _0x3494f6=_0x44fd35,_0x308c3a=_0x55fb2d=>_0x960d56['next'](_0x55fb2d);_0x2d42b6[_0x3494f6(0x1ab)](_0x3494f6(0x1c8),_0x308c3a),_0x2048d7[_0x3494f6(0x1d4)]((0x0,_univerjs_core['toDisposable'])(()=>_0x2d42b6[_0x3494f6(0x1ae)](_0x3494f6(0x1c8),_0x308c3a)));})[_0x44fd35(0x1d1)]((0x0,rxjs[_0x44fd35(0x1c4)])())};}catch(_0x289bff){return console['error'](_0x289bff),null;}}};function _0x44c4(_0x46ad2f,_0x20658c){_0x46ad2f=_0x46ad2f-0x1a5;const _0x35219e=_0x3521();let _0x44c41e=_0x35219e[_0x46ad2f];return _0x44c41e;}NodeWebSocketService=__decorate([__decorateParam(0x0,_univerjs_core[_0x5560a8(0x1bd)])],NodeWebSocketService);function _typeof(_0x35ac79){'@babel/helpers - typeof';const _0x59f12b=_0x5560a8;return _typeof=_0x59f12b(0x1ce)==typeof Symbol&&_0x59f12b(0x1d2)==typeof Symbol['iterator']?function(_0x53b366){return typeof _0x53b366;}:function(_0x38b66c){const _0x5c9597=_0x59f12b;return _0x38b66c&&'function'==typeof Symbol&&_0x38b66c[_0x5c9597(0x1cb)]===Symbol&&_0x38b66c!==Symbol[_0x5c9597(0x1d3)]?_0x5c9597(0x1d2):typeof _0x38b66c;},_typeof(_0x35ac79);}function toPrimitive(_0x332032,_0x58f1e3){const _0x514d0b=_0x5560a8;if(_0x514d0b(0x1b8)!=_typeof(_0x332032)||!_0x332032)return _0x332032;var _0x5ad9e0=_0x332032[Symbol[_0x514d0b(0x1a9)]];if(void 0x0!==_0x5ad9e0){var _0xa65e99=_0x5ad9e0[_0x514d0b(0x1dd)](_0x332032,_0x58f1e3||_0x514d0b(0x1d7));if(_0x514d0b(0x1b8)!=_typeof(_0xa65e99))return _0xa65e99;throw new TypeError(_0x514d0b(0x1ba));}return(_0x514d0b(0x1b2)===_0x58f1e3?String:Number)(_0x332032);}function toPropertyKey(_0x1a07e8){const _0x2939db=_0x5560a8;var _0x57aeb4=toPrimitive(_0x1a07e8,_0x2939db(0x1b2));return _0x2939db(0x1d2)==_typeof(_0x57aeb4)?_0x57aeb4:_0x57aeb4+'';}function _defineProperty(_0xf7c75b,_0xa42e2,_0x18116c){return(_0xa42e2=toPropertyKey(_0xa42e2))in _0xf7c75b?Object['defineProperty'](_0xf7c75b,_0xa42e2,{'value':_0x18116c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xf7c75b[_0xa42e2]=_0x18116c,_0xf7c75b;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends _univerjs_core[_0x5560a8(0x1b6)]{constructor(_0x20639c=defaultPluginConfig,_0x4d34a8,_0xcd7cd2){const _0x3069f6=_0x5560a8;super(),this['_configService']=_0x4d34a8,this[_0x3069f6(0x1e5)]=_0xcd7cd2,this[_0x3069f6(0x1e9)][_0x3069f6(0x1b3)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x20639c);}[_0x5560a8(0x1de)](){const _0x16b537=_0x5560a8;this[_0x16b537(0x1d8)]();}[_0x5560a8(0x1d8)](){const _0x23d17f=_0x5560a8;(0x0,_univerjs_core[_0x23d17f(0x1e2)])(this[_0x23d17f(0x1e5)],[[_univerjs_network[_0x23d17f(0x1a5)],{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,'pluginName',_0x5560a8(0x1c9)),_defineProperty(UniverCollaborationClientNodePlugin,_0x5560a8(0x1b0),name),_defineProperty(UniverCollaborationClientNodePlugin,'version',version),UniverCollaborationClientNodePlugin=__decorate([(0x0,_univerjs_core[_0x5560a8(0x1a8)])(_univerjs_pro_collaboration_client[_0x5560a8(0x1c6)]),__decorateParam(0x1,_univerjs_core[_0x5560a8(0x1bd)]),__decorateParam(0x2,(0x0,_univerjs_core[_0x5560a8(0x1cd)])(_univerjs_core[_0x5560a8(0x1ea)]))],UniverCollaborationClientNodePlugin);function _0x3521(){const _0x54538d=['length','1236720LaPZnu','Plugin','HTTPService','object','Observable','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_doCreateSocket','732976wLKfsj','IConfigService','headers','DisposableCollection','CollaborationSocketService','@univerjs-pro/collaboration-client-node','dispose','close','share','toStringTag','UniverCollaborationClientPlugin','set','message','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','Module','constructor','open','Inject','function','9CqrBEh','decorate','pipe','symbol','prototype','add','toDisposable','_httpService','default','_registerDependencies','711DyUVsC','COLLABORATION_CLIENT_NODE_CONFIG_KEY','1758zPhfyc','send','call','onStarting','getOwnPropertyDescriptor','Disposable','ISnapshotServerService','registerDependencies','customHeaders','next','_injector','262804ZPeQUI','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','128680EVJcDY','_configService','Injector','NodeCollaborationSocketService','87816KtUSYD','1335586qjQqIS','ISocketService','ILogService','WebSocket','DependentOn','toPrimitive','6615MgcXpR','addEventListener','error','getConfig','removeEventListener','createSocket','packageName','UniverCollaborationClientNodePlugin','string','setConfig'];_0x3521=function(){return _0x54538d;};return _0x3521();}let NodeCollaborationSocketService=class NodeCollaborationSocketService extends _univerjs_pro_collaboration_client[_0x5560a8(0x1c0)]{constructor(_0x37b510,_0x1dd5a7,_0x53783c,_0x2de478,_0x1960e4){const _0x14e6cf=_0x5560a8;super(_0x37b510,_0x1dd5a7,_0x53783c,_0x2de478,_0x1960e4);const _0xcbe7bc=this[_0x14e6cf(0x1e9)]['getConfig'](_univerjs_pro_collaboration_client[_0x14e6cf(0x1e7)]);this[_0x14e6cf(0x1d6)]['registerHTTPInterceptor']({'interceptor':(_0x4a4940,_0x152f6b)=>{const _0x49001e=_0x14e6cf,_0xb57f84=_0x4a4940[_0x49001e(0x1be)];if(_0xcbe7bc===null||_0xcbe7bc===void 0x0?void 0x0:_0xcbe7bc[_0x49001e(0x1e3)]){for(const _0x50891c in _0xcbe7bc[_0x49001e(0x1e3)])_0xb57f84[_0x49001e(0x1c7)](_0x50891c,_0xcbe7bc[_0x49001e(0x1e3)][_0x50891c]);}return _0x152f6b(_0x4a4940);}});}async[_0x5560a8(0x1af)](_0x53551b){const _0x5bc551=_0x5560a8;return this[_0x5bc551(0x1bb)](_0x53551b);}};NodeCollaborationSocketService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x5560a8(0x1ea)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x5560a8(0x1cd)])(_univerjs_network[_0x5560a8(0x1b7)])),__decorateParam(0x2,_univerjs_core['IConfigService']),__decorateParam(0x3,_univerjs_core[_0x5560a8(0x1a6)]),__decorateParam(0x4,_univerjs_pro_collaboration[_0x5560a8(0x1e1)])],NodeCollaborationSocketService),exports[_0x5560a8(0x1da)]=COLLABORATION_CLIENT_NODE_CONFIG_KEY,Object['defineProperty'](exports,_0x5560a8(0x1eb),{'enumerable':!![],'get':function(){return NodeCollaborationSocketService;}}),Object['defineProperty'](exports,_0x5560a8(0x1b1),{'enumerable':!![],'get':function(){return UniverCollaborationClientNodePlugin;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2ef05f=_0x3c15;(function(_0x1a6c8f,_0x7d5baa){const _0x58d63b=_0x3c15,_0x4f5ac6=_0x1a6c8f();while(!![]){try{const _0x3bd602=parseInt(_0x58d63b(0x91))/0x1+-parseInt(_0x58d63b(0xb2))/0x2+-parseInt(_0x58d63b(0xad))/0x3+parseInt(_0x58d63b(0x9f))/0x4+-parseInt(_0x58d63b(0x8f))/0x5*(-parseInt(_0x58d63b(0x98))/0x6)+parseInt(_0x58d63b(0x8e))/0x7*(parseInt(_0x58d63b(0xb1))/0x8)+parseInt(_0x58d63b(0xb0))/0x9*(-parseInt(_0x58d63b(0x8a))/0xa);if(_0x3bd602===_0x7d5baa)break;else _0x4f5ac6['push'](_0x4f5ac6['shift']());}catch(_0x5ca2b2){_0x4f5ac6['push'](_0x4f5ac6['shift']());}}}(_0x11a9,0xb29b0));function _0x3c15(_0x2ac3d9,_0x58a041){_0x2ac3d9=_0x2ac3d9-0x88;const _0x11a9bf=_0x11a9();let _0x3c15a0=_0x11a9bf[_0x2ac3d9];return _0x3c15a0;}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';import{HTTPService,ISocketService}from'@univerjs/network';import{Observable,share}from'rxjs';import{WebSocket}from'ws';import{ISnapshotServerService}from'@univerjs-pro/collaboration';const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x2ef05f(0xb8),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x2ef05f(0xb9),version=_0x2ef05f(0x88);function __decorateParam(_0x3cedae,_0x4cf1fe){return function(_0x1619e3,_0x1af0ff){_0x4cf1fe(_0x1619e3,_0x1af0ff,_0x3cedae);};}function __decorate(_0x23c579,_0x20710d,_0x50ab79,_0x47bf24){const _0x14abb1=_0x2ef05f;var _0x66313e=arguments['length'],_0x1ea79d=_0x66313e<0x3?_0x20710d:_0x47bf24===null?_0x47bf24=Object[_0x14abb1(0x89)](_0x20710d,_0x50ab79):_0x47bf24,_0x23c984;if(typeof Reflect===_0x14abb1(0xac)&&typeof Reflect[_0x14abb1(0xb6)]===_0x14abb1(0xa5))_0x1ea79d=Reflect[_0x14abb1(0xb6)](_0x23c579,_0x20710d,_0x50ab79,_0x47bf24);else{for(var _0x116bd6=_0x23c579[_0x14abb1(0x8b)]-0x1;_0x116bd6>=0x0;_0x116bd6--)if(_0x23c984=_0x23c579[_0x116bd6])_0x1ea79d=(_0x66313e<0x3?_0x23c984(_0x1ea79d):_0x66313e>0x3?_0x23c984(_0x20710d,_0x50ab79,_0x1ea79d):_0x23c984(_0x20710d,_0x50ab79))||_0x1ea79d;}return _0x66313e>0x3&&_0x1ea79d&&Object[_0x14abb1(0xb5)](_0x20710d,_0x50ab79,_0x1ea79d),_0x1ea79d;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x1c2c1d){const _0x1618e5=_0x2ef05f;super(),this[_0x1618e5(0x9b)]=_0x1c2c1d;}[_0x2ef05f(0xa9)](_0x4ec572){const _0x117f0f=_0x2ef05f;var _0x44380e;const _0x4a0914=((_0x44380e=this['_configService'][_0x117f0f(0x8d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x44380e===void 0x0?void 0x0:_0x44380e[_0x117f0f(0x92)])||{};try{const _0xfffb92=new WebSocket(_0x4ec572,{'headers':{..._0x4a0914}}),_0x1df3f8=new DisposableCollection();return{'URL':_0x4ec572,'close':(_0x8382da,_0x34a552)=>{const _0x31da5c=_0x117f0f;_0xfffb92[_0x31da5c(0x93)](_0x8382da,_0x34a552),_0x1df3f8[_0x31da5c(0x97)]();},'send':_0x61709e=>{const _0x4b8f55=_0x117f0f;_0xfffb92[_0x4b8f55(0xb3)](_0x61709e);},'open$':new Observable(_0x190204=>{const _0xeb312b=_0x117f0f,_0x53c5d3=_0x1da09b=>_0x190204[_0xeb312b(0xaa)](_0x1da09b);_0xfffb92[_0xeb312b(0x99)]('open',_0x53c5d3),_0x1df3f8[_0xeb312b(0xa8)](toDisposable(()=>_0xfffb92[_0xeb312b(0xa6)](_0xeb312b(0xa2),_0x53c5d3)));})[_0x117f0f(0x90)](share()),'close$':new Observable(_0x56cbf6=>{const _0x40ab45=_0x117f0f,_0x4abcb0=_0x5aa3b2=>_0x56cbf6[_0x40ab45(0xaa)](_0x5aa3b2);_0xfffb92['addEventListener'](_0x40ab45(0x93),_0x4abcb0),_0x1df3f8[_0x40ab45(0xa8)](toDisposable(()=>_0xfffb92[_0x40ab45(0xa6)](_0x40ab45(0x93),_0x4abcb0)));})['pipe'](share()),'error$':new Observable(_0x48e07c=>{const _0x34b722=_0x117f0f,_0x3b4030=_0x4f9b4e=>_0x48e07c[_0x34b722(0xaa)](_0x4f9b4e);_0xfffb92[_0x34b722(0x99)]('error',_0x3b4030),_0x1df3f8['add'](toDisposable(()=>_0xfffb92[_0x34b722(0xa6)](_0x34b722(0xa0),_0x3b4030)));})['pipe'](share()),'message$':new Observable(_0x54a060=>{const _0x2a0b09=_0x117f0f,_0x957564=_0x90cf1e=>_0x54a060['next'](_0x90cf1e);_0xfffb92['addEventListener']('message',_0x957564),_0x1df3f8['add'](toDisposable(()=>_0xfffb92[_0x2a0b09(0xa6)](_0x2a0b09(0x96),_0x957564)));})[_0x117f0f(0x90)](share())};}catch(_0x2490fd){return console[_0x117f0f(0xa0)](_0x2490fd),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _typeof(_0x4dfceb){'@babel/helpers - typeof';const _0x385baa=_0x2ef05f;return _typeof=_0x385baa(0xa5)==typeof Symbol&&_0x385baa(0x9d)==typeof Symbol[_0x385baa(0xb4)]?function(_0x50db84){return typeof _0x50db84;}:function(_0x88a684){const _0x520cf2=_0x385baa;return _0x88a684&&_0x520cf2(0xa5)==typeof Symbol&&_0x88a684[_0x520cf2(0x9c)]===Symbol&&_0x88a684!==Symbol[_0x520cf2(0xa1)]?_0x520cf2(0x9d):typeof _0x88a684;},_typeof(_0x4dfceb);}function _0x11a9(){const _0x3da42c=['close','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_httpService','message','dispose','3714uBjlxI','addEventListener','string','_configService','constructor','symbol','toPrimitive','3606812ZpdIkz','error','prototype','open','setConfig','_registerDependencies','function','removeEventListener','pluginName','add','createSocket','next','onStarting','object','514053VRXHOg','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','default','85311TsnGzR','29392QwkvBT','899656MnQzaI','send','iterator','defineProperty','decorate','packageName','collaboration-client-node.config','@univerjs-pro/collaboration-client-node','_injector','0.21.1','getOwnPropertyDescriptor','870EVUssz','length','registerHTTPInterceptor','getConfig','1778wyNIGt','180zTFrRz','pipe','320237nQKavi','customHeaders'];_0x11a9=function(){return _0x3da42c;};return _0x11a9();}function toPrimitive(_0x135352,_0x978aca){const _0x15f5b4=_0x2ef05f;if('object'!=_typeof(_0x135352)||!_0x135352)return _0x135352;var _0x31ddd1=_0x135352[Symbol[_0x15f5b4(0x9e)]];if(void 0x0!==_0x31ddd1){var _0x15d8b9=_0x31ddd1['call'](_0x135352,_0x978aca||_0x15f5b4(0xaf));if(_0x15f5b4(0xac)!=_typeof(_0x15d8b9))return _0x15d8b9;throw new TypeError(_0x15f5b4(0xae));}return(_0x15f5b4(0x9a)===_0x978aca?String:Number)(_0x135352);}function toPropertyKey(_0x5f48b0){const _0x10de9e=_0x2ef05f;var _0x174bba=toPrimitive(_0x5f48b0,'string');return _0x10de9e(0x9d)==_typeof(_0x174bba)?_0x174bba:_0x174bba+'';}function _defineProperty(_0x35bf16,_0x5beac9,_0x49e365){return(_0x5beac9=toPropertyKey(_0x5beac9))in _0x35bf16?Object['defineProperty'](_0x35bf16,_0x5beac9,{'value':_0x49e365,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x35bf16[_0x5beac9]=_0x49e365,_0x35bf16;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0xcfa692=defaultPluginConfig,_0x3dc1f1,_0x249e25){const _0x326fce=_0x2ef05f;super(),this[_0x326fce(0x9b)]=_0x3dc1f1,this['_injector']=_0x249e25,this[_0x326fce(0x9b)][_0x326fce(0xa3)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0xcfa692);}[_0x2ef05f(0xab)](){const _0x5092cb=_0x2ef05f;this[_0x5092cb(0xa4)]();}['_registerDependencies'](){const _0x429b16=_0x2ef05f;registerDependencies(this[_0x429b16(0xba)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x2ef05f(0xa7),_0x2ef05f(0x94)),_defineProperty(UniverCollaborationClientNodePlugin,_0x2ef05f(0xb7),name),_defineProperty(UniverCollaborationClientNodePlugin,'version',version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0x500b8e,_0x1e9378,_0x2399d0,_0x513f7f,_0x1ffe37){const _0x51e796=_0x2ef05f;super(_0x500b8e,_0x1e9378,_0x2399d0,_0x513f7f,_0x1ffe37);const _0x437cb2=this['_configService'][_0x51e796(0x8d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this[_0x51e796(0x95)][_0x51e796(0x8c)]({'interceptor':(_0x30a1cb,_0x785d55)=>{const _0xbe0627=_0x51e796,_0x4a96a6=_0x30a1cb['headers'];if(_0x437cb2===null||_0x437cb2===void 0x0?void 0x0:_0x437cb2['customHeaders']){for(const _0x37eb08 in _0x437cb2['customHeaders'])_0x4a96a6['set'](_0x37eb08,_0x437cb2[_0xbe0627(0x92)][_0x37eb08]);}return _0x785d55(_0x30a1cb);}});}async[_0x2ef05f(0xa9)](_0x156dd4){return this['_doCreateSocket'](_0x156dd4);}};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};
1
+ function _0x1fcf(){const _0x279d0f=['version','4sZsqqW','3176928PAWdqD','onStarting','pipe','2689530oQBMDo','string','default','80241GBSLcH','removeEventListener','headers','16BePJSu','next','getConfig','@univerjs-pro/collaboration-client-node','symbol','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_doCreateSocket','dispose','length','message','defineProperty','add','_configService','_injector','collaboration-client-node.config','68648OddIhv','error','pluginName','packageName','2365490VgnMci','6089556OQrWcd','2fqQcIL','getOwnPropertyDescriptor','close','0.22.0-insiders.20260513-0b53885','601811GKcCdZ','object','constructor','decorate','set','function','customHeaders','10WPcxoO','call','_registerDependencies','open','addEventListener','iterator','toPrimitive','createSocket'];_0x1fcf=function(){return _0x279d0f;};return _0x1fcf();}const _0x2e278b=_0x48cd;(function(_0x6e33b3,_0x54c888){const _0x23686b=_0x48cd,_0x37a5a9=_0x6e33b3();while(!![]){try{const _0x2e0c64=-parseInt(_0x23686b(0x184))/0x1*(parseInt(_0x23686b(0x17e))/0x2)+-parseInt(_0x23686b(0x16c))/0x3*(parseInt(_0x23686b(0x165))/0x4)+-parseInt(_0x23686b(0x182))/0x5+parseInt(_0x23686b(0x169))/0x6+parseInt(_0x23686b(0x188))/0x7*(parseInt(_0x23686b(0x16f))/0x8)+-parseInt(_0x23686b(0x166))/0x9*(parseInt(_0x23686b(0x18f))/0xa)+parseInt(_0x23686b(0x183))/0xb;if(_0x2e0c64===_0x54c888)break;else _0x37a5a9['push'](_0x37a5a9['shift']());}catch(_0x29c34f){_0x37a5a9['push'](_0x37a5a9['shift']());}}}(_0x1fcf,0x3d998));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';import{HTTPService,ISocketService}from'@univerjs/network';function _0x48cd(_0x26f9cc,_0x133e5c){_0x26f9cc=_0x26f9cc-0x164;const _0x1fcf3a=_0x1fcf();let _0x48cd97=_0x1fcf3a[_0x26f9cc];return _0x48cd97;}import{Observable,share}from'rxjs';import{WebSocket}from'ws';import{ISnapshotServerService}from'@univerjs-pro/collaboration';const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x2e278b(0x17d),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x2e278b(0x172),version=_0x2e278b(0x187);function __decorateParam(_0x3d1f07,_0x421f4b){return function(_0x414314,_0x4a0ad7){_0x421f4b(_0x414314,_0x4a0ad7,_0x3d1f07);};}function __decorate(_0x693746,_0x13ac37,_0x52529f,_0x205667){const _0x338e40=_0x2e278b;var _0x398b7d=arguments['length'],_0x2887b1=_0x398b7d<0x3?_0x13ac37:_0x205667===null?_0x205667=Object[_0x338e40(0x185)](_0x13ac37,_0x52529f):_0x205667,_0x58f14a;if(typeof Reflect==='object'&&typeof Reflect[_0x338e40(0x18b)]===_0x338e40(0x18d))_0x2887b1=Reflect[_0x338e40(0x18b)](_0x693746,_0x13ac37,_0x52529f,_0x205667);else{for(var _0x152674=_0x693746[_0x338e40(0x177)]-0x1;_0x152674>=0x0;_0x152674--)if(_0x58f14a=_0x693746[_0x152674])_0x2887b1=(_0x398b7d<0x3?_0x58f14a(_0x2887b1):_0x398b7d>0x3?_0x58f14a(_0x13ac37,_0x52529f,_0x2887b1):_0x58f14a(_0x13ac37,_0x52529f))||_0x2887b1;}return _0x398b7d>0x3&&_0x2887b1&&Object[_0x338e40(0x179)](_0x13ac37,_0x52529f,_0x2887b1),_0x2887b1;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x58b9af){super(),this['_configService']=_0x58b9af;}[_0x2e278b(0x196)](_0x289eaa){const _0x52b558=_0x2e278b;var _0x2000e9;const _0xda3b61=((_0x2000e9=this[_0x52b558(0x17b)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x2000e9===void 0x0?void 0x0:_0x2000e9[_0x52b558(0x18e)])||{};try{const _0x1eb889=new WebSocket(_0x289eaa,{'headers':{..._0xda3b61}}),_0x469417=new DisposableCollection();return{'URL':_0x289eaa,'close':(_0x5cd3b8,_0x170711)=>{const _0x58f6ee=_0x52b558;_0x1eb889[_0x58f6ee(0x186)](_0x5cd3b8,_0x170711),_0x469417[_0x58f6ee(0x176)]();},'send':_0x300243=>{_0x1eb889['send'](_0x300243);},'open$':new Observable(_0x251ae5=>{const _0x36ad3e=_0x52b558,_0x3e1c24=_0x48f8d6=>_0x251ae5[_0x36ad3e(0x170)](_0x48f8d6);_0x1eb889['addEventListener']('open',_0x3e1c24),_0x469417['add'](toDisposable(()=>_0x1eb889[_0x36ad3e(0x16d)](_0x36ad3e(0x192),_0x3e1c24)));})[_0x52b558(0x168)](share()),'close$':new Observable(_0x5a0499=>{const _0x22bca1=_0x52b558,_0x163cc8=_0xca8bc8=>_0x5a0499['next'](_0xca8bc8);_0x1eb889[_0x22bca1(0x193)](_0x22bca1(0x186),_0x163cc8),_0x469417['add'](toDisposable(()=>_0x1eb889[_0x22bca1(0x16d)](_0x22bca1(0x186),_0x163cc8)));})[_0x52b558(0x168)](share()),'error$':new Observable(_0x135065=>{const _0x1053b1=_0x52b558,_0x53869e=_0x209ca9=>_0x135065[_0x1053b1(0x170)](_0x209ca9);_0x1eb889[_0x1053b1(0x193)](_0x1053b1(0x17f),_0x53869e),_0x469417[_0x1053b1(0x17a)](toDisposable(()=>_0x1eb889[_0x1053b1(0x16d)](_0x1053b1(0x17f),_0x53869e)));})[_0x52b558(0x168)](share()),'message$':new Observable(_0x562631=>{const _0x6c580f=_0x52b558,_0x46f4e4=_0x586fd4=>_0x562631['next'](_0x586fd4);_0x1eb889['addEventListener'](_0x6c580f(0x178),_0x46f4e4),_0x469417[_0x6c580f(0x17a)](toDisposable(()=>_0x1eb889[_0x6c580f(0x16d)]('message',_0x46f4e4)));})['pipe'](share())};}catch(_0x4592f0){return console['error'](_0x4592f0),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _typeof(_0x2c46ab){'@babel/helpers - typeof';const _0x318099=_0x2e278b;return _typeof=_0x318099(0x18d)==typeof Symbol&&'symbol'==typeof Symbol[_0x318099(0x194)]?function(_0x74a497){return typeof _0x74a497;}:function(_0x1e5c8e){const _0x40e279=_0x318099;return _0x1e5c8e&&'function'==typeof Symbol&&_0x1e5c8e[_0x40e279(0x18a)]===Symbol&&_0x1e5c8e!==Symbol['prototype']?_0x40e279(0x173):typeof _0x1e5c8e;},_typeof(_0x2c46ab);}function toPrimitive(_0x2bb4b9,_0x534d64){const _0x254591=_0x2e278b;if(_0x254591(0x189)!=_typeof(_0x2bb4b9)||!_0x2bb4b9)return _0x2bb4b9;var _0x583546=_0x2bb4b9[Symbol[_0x254591(0x195)]];if(void 0x0!==_0x583546){var _0x5da45f=_0x583546[_0x254591(0x190)](_0x2bb4b9,_0x534d64||_0x254591(0x16b));if('object'!=_typeof(_0x5da45f))return _0x5da45f;throw new TypeError(_0x254591(0x174));}return(_0x254591(0x16a)===_0x534d64?String:Number)(_0x2bb4b9);}function toPropertyKey(_0x11654e){const _0x491417=_0x2e278b;var _0x2986ef=toPrimitive(_0x11654e,_0x491417(0x16a));return'symbol'==_typeof(_0x2986ef)?_0x2986ef:_0x2986ef+'';}function _defineProperty(_0x34aa22,_0x4f6349,_0x3ad26d){const _0x13f5c9=_0x2e278b;return(_0x4f6349=toPropertyKey(_0x4f6349))in _0x34aa22?Object[_0x13f5c9(0x179)](_0x34aa22,_0x4f6349,{'value':_0x3ad26d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x34aa22[_0x4f6349]=_0x3ad26d,_0x34aa22;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0x25dc4a=defaultPluginConfig,_0x53c0bb,_0x249f73){const _0x25f5c9=_0x2e278b;super(),this[_0x25f5c9(0x17b)]=_0x53c0bb,this[_0x25f5c9(0x17c)]=_0x249f73,this[_0x25f5c9(0x17b)]['setConfig'](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x25dc4a);}[_0x2e278b(0x167)](){const _0x58ceb4=_0x2e278b;this[_0x58ceb4(0x191)]();}[_0x2e278b(0x191)](){const _0x40b52e=_0x2e278b;registerDependencies(this[_0x40b52e(0x17c)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x2e278b(0x180),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_defineProperty(UniverCollaborationClientNodePlugin,_0x2e278b(0x181),name),_defineProperty(UniverCollaborationClientNodePlugin,_0x2e278b(0x164),version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0x108470,_0x35b3f2,_0x38f81b,_0x4405cb,_0x3dc963){const _0x399359=_0x2e278b;super(_0x108470,_0x35b3f2,_0x38f81b,_0x4405cb,_0x3dc963);const _0x4bea36=this[_0x399359(0x17b)][_0x399359(0x171)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this['_httpService']['registerHTTPInterceptor']({'interceptor':(_0xcbf2ac,_0x5ee7b6)=>{const _0x7db9b5=_0x399359,_0x2372d3=_0xcbf2ac[_0x7db9b5(0x16e)];if(_0x4bea36===null||_0x4bea36===void 0x0?void 0x0:_0x4bea36[_0x7db9b5(0x18e)]){for(const _0x5df4aa in _0x4bea36['customHeaders'])_0x2372d3[_0x7db9b5(0x18c)](_0x5df4aa,_0x4bea36['customHeaders'][_0x5df4aa]);}return _0x5ee7b6(_0xcbf2ac);}});}async[_0x2e278b(0x196)](_0x114b41){const _0x44f7de=_0x2e278b;return this[_0x44f7de(0x175)](_0x114b41);}};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 _0x2ef05f=_0x3c15;(function(_0x1a6c8f,_0x7d5baa){const _0x58d63b=_0x3c15,_0x4f5ac6=_0x1a6c8f();while(!![]){try{const _0x3bd602=parseInt(_0x58d63b(0x91))/0x1+-parseInt(_0x58d63b(0xb2))/0x2+-parseInt(_0x58d63b(0xad))/0x3+parseInt(_0x58d63b(0x9f))/0x4+-parseInt(_0x58d63b(0x8f))/0x5*(-parseInt(_0x58d63b(0x98))/0x6)+parseInt(_0x58d63b(0x8e))/0x7*(parseInt(_0x58d63b(0xb1))/0x8)+parseInt(_0x58d63b(0xb0))/0x9*(-parseInt(_0x58d63b(0x8a))/0xa);if(_0x3bd602===_0x7d5baa)break;else _0x4f5ac6['push'](_0x4f5ac6['shift']());}catch(_0x5ca2b2){_0x4f5ac6['push'](_0x4f5ac6['shift']());}}}(_0x11a9,0xb29b0));function _0x3c15(_0x2ac3d9,_0x58a041){_0x2ac3d9=_0x2ac3d9-0x88;const _0x11a9bf=_0x11a9();let _0x3c15a0=_0x11a9bf[_0x2ac3d9];return _0x3c15a0;}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';import{HTTPService,ISocketService}from'@univerjs/network';import{Observable,share}from'rxjs';import{WebSocket}from'ws';import{ISnapshotServerService}from'@univerjs-pro/collaboration';const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x2ef05f(0xb8),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x2ef05f(0xb9),version=_0x2ef05f(0x88);function __decorateParam(_0x3cedae,_0x4cf1fe){return function(_0x1619e3,_0x1af0ff){_0x4cf1fe(_0x1619e3,_0x1af0ff,_0x3cedae);};}function __decorate(_0x23c579,_0x20710d,_0x50ab79,_0x47bf24){const _0x14abb1=_0x2ef05f;var _0x66313e=arguments['length'],_0x1ea79d=_0x66313e<0x3?_0x20710d:_0x47bf24===null?_0x47bf24=Object[_0x14abb1(0x89)](_0x20710d,_0x50ab79):_0x47bf24,_0x23c984;if(typeof Reflect===_0x14abb1(0xac)&&typeof Reflect[_0x14abb1(0xb6)]===_0x14abb1(0xa5))_0x1ea79d=Reflect[_0x14abb1(0xb6)](_0x23c579,_0x20710d,_0x50ab79,_0x47bf24);else{for(var _0x116bd6=_0x23c579[_0x14abb1(0x8b)]-0x1;_0x116bd6>=0x0;_0x116bd6--)if(_0x23c984=_0x23c579[_0x116bd6])_0x1ea79d=(_0x66313e<0x3?_0x23c984(_0x1ea79d):_0x66313e>0x3?_0x23c984(_0x20710d,_0x50ab79,_0x1ea79d):_0x23c984(_0x20710d,_0x50ab79))||_0x1ea79d;}return _0x66313e>0x3&&_0x1ea79d&&Object[_0x14abb1(0xb5)](_0x20710d,_0x50ab79,_0x1ea79d),_0x1ea79d;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x1c2c1d){const _0x1618e5=_0x2ef05f;super(),this[_0x1618e5(0x9b)]=_0x1c2c1d;}[_0x2ef05f(0xa9)](_0x4ec572){const _0x117f0f=_0x2ef05f;var _0x44380e;const _0x4a0914=((_0x44380e=this['_configService'][_0x117f0f(0x8d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x44380e===void 0x0?void 0x0:_0x44380e[_0x117f0f(0x92)])||{};try{const _0xfffb92=new WebSocket(_0x4ec572,{'headers':{..._0x4a0914}}),_0x1df3f8=new DisposableCollection();return{'URL':_0x4ec572,'close':(_0x8382da,_0x34a552)=>{const _0x31da5c=_0x117f0f;_0xfffb92[_0x31da5c(0x93)](_0x8382da,_0x34a552),_0x1df3f8[_0x31da5c(0x97)]();},'send':_0x61709e=>{const _0x4b8f55=_0x117f0f;_0xfffb92[_0x4b8f55(0xb3)](_0x61709e);},'open$':new Observable(_0x190204=>{const _0xeb312b=_0x117f0f,_0x53c5d3=_0x1da09b=>_0x190204[_0xeb312b(0xaa)](_0x1da09b);_0xfffb92[_0xeb312b(0x99)]('open',_0x53c5d3),_0x1df3f8[_0xeb312b(0xa8)](toDisposable(()=>_0xfffb92[_0xeb312b(0xa6)](_0xeb312b(0xa2),_0x53c5d3)));})[_0x117f0f(0x90)](share()),'close$':new Observable(_0x56cbf6=>{const _0x40ab45=_0x117f0f,_0x4abcb0=_0x5aa3b2=>_0x56cbf6[_0x40ab45(0xaa)](_0x5aa3b2);_0xfffb92['addEventListener'](_0x40ab45(0x93),_0x4abcb0),_0x1df3f8[_0x40ab45(0xa8)](toDisposable(()=>_0xfffb92[_0x40ab45(0xa6)](_0x40ab45(0x93),_0x4abcb0)));})['pipe'](share()),'error$':new Observable(_0x48e07c=>{const _0x34b722=_0x117f0f,_0x3b4030=_0x4f9b4e=>_0x48e07c[_0x34b722(0xaa)](_0x4f9b4e);_0xfffb92[_0x34b722(0x99)]('error',_0x3b4030),_0x1df3f8['add'](toDisposable(()=>_0xfffb92[_0x34b722(0xa6)](_0x34b722(0xa0),_0x3b4030)));})['pipe'](share()),'message$':new Observable(_0x54a060=>{const _0x2a0b09=_0x117f0f,_0x957564=_0x90cf1e=>_0x54a060['next'](_0x90cf1e);_0xfffb92['addEventListener']('message',_0x957564),_0x1df3f8['add'](toDisposable(()=>_0xfffb92[_0x2a0b09(0xa6)](_0x2a0b09(0x96),_0x957564)));})[_0x117f0f(0x90)](share())};}catch(_0x2490fd){return console[_0x117f0f(0xa0)](_0x2490fd),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _typeof(_0x4dfceb){'@babel/helpers - typeof';const _0x385baa=_0x2ef05f;return _typeof=_0x385baa(0xa5)==typeof Symbol&&_0x385baa(0x9d)==typeof Symbol[_0x385baa(0xb4)]?function(_0x50db84){return typeof _0x50db84;}:function(_0x88a684){const _0x520cf2=_0x385baa;return _0x88a684&&_0x520cf2(0xa5)==typeof Symbol&&_0x88a684[_0x520cf2(0x9c)]===Symbol&&_0x88a684!==Symbol[_0x520cf2(0xa1)]?_0x520cf2(0x9d):typeof _0x88a684;},_typeof(_0x4dfceb);}function _0x11a9(){const _0x3da42c=['close','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_httpService','message','dispose','3714uBjlxI','addEventListener','string','_configService','constructor','symbol','toPrimitive','3606812ZpdIkz','error','prototype','open','setConfig','_registerDependencies','function','removeEventListener','pluginName','add','createSocket','next','onStarting','object','514053VRXHOg','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','default','85311TsnGzR','29392QwkvBT','899656MnQzaI','send','iterator','defineProperty','decorate','packageName','collaboration-client-node.config','@univerjs-pro/collaboration-client-node','_injector','0.21.1','getOwnPropertyDescriptor','870EVUssz','length','registerHTTPInterceptor','getConfig','1778wyNIGt','180zTFrRz','pipe','320237nQKavi','customHeaders'];_0x11a9=function(){return _0x3da42c;};return _0x11a9();}function toPrimitive(_0x135352,_0x978aca){const _0x15f5b4=_0x2ef05f;if('object'!=_typeof(_0x135352)||!_0x135352)return _0x135352;var _0x31ddd1=_0x135352[Symbol[_0x15f5b4(0x9e)]];if(void 0x0!==_0x31ddd1){var _0x15d8b9=_0x31ddd1['call'](_0x135352,_0x978aca||_0x15f5b4(0xaf));if(_0x15f5b4(0xac)!=_typeof(_0x15d8b9))return _0x15d8b9;throw new TypeError(_0x15f5b4(0xae));}return(_0x15f5b4(0x9a)===_0x978aca?String:Number)(_0x135352);}function toPropertyKey(_0x5f48b0){const _0x10de9e=_0x2ef05f;var _0x174bba=toPrimitive(_0x5f48b0,'string');return _0x10de9e(0x9d)==_typeof(_0x174bba)?_0x174bba:_0x174bba+'';}function _defineProperty(_0x35bf16,_0x5beac9,_0x49e365){return(_0x5beac9=toPropertyKey(_0x5beac9))in _0x35bf16?Object['defineProperty'](_0x35bf16,_0x5beac9,{'value':_0x49e365,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x35bf16[_0x5beac9]=_0x49e365,_0x35bf16;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0xcfa692=defaultPluginConfig,_0x3dc1f1,_0x249e25){const _0x326fce=_0x2ef05f;super(),this[_0x326fce(0x9b)]=_0x3dc1f1,this['_injector']=_0x249e25,this[_0x326fce(0x9b)][_0x326fce(0xa3)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0xcfa692);}[_0x2ef05f(0xab)](){const _0x5092cb=_0x2ef05f;this[_0x5092cb(0xa4)]();}['_registerDependencies'](){const _0x429b16=_0x2ef05f;registerDependencies(this[_0x429b16(0xba)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x2ef05f(0xa7),_0x2ef05f(0x94)),_defineProperty(UniverCollaborationClientNodePlugin,_0x2ef05f(0xb7),name),_defineProperty(UniverCollaborationClientNodePlugin,'version',version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0x500b8e,_0x1e9378,_0x2399d0,_0x513f7f,_0x1ffe37){const _0x51e796=_0x2ef05f;super(_0x500b8e,_0x1e9378,_0x2399d0,_0x513f7f,_0x1ffe37);const _0x437cb2=this['_configService'][_0x51e796(0x8d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this[_0x51e796(0x95)][_0x51e796(0x8c)]({'interceptor':(_0x30a1cb,_0x785d55)=>{const _0xbe0627=_0x51e796,_0x4a96a6=_0x30a1cb['headers'];if(_0x437cb2===null||_0x437cb2===void 0x0?void 0x0:_0x437cb2['customHeaders']){for(const _0x37eb08 in _0x437cb2['customHeaders'])_0x4a96a6['set'](_0x37eb08,_0x437cb2[_0xbe0627(0x92)][_0x37eb08]);}return _0x785d55(_0x30a1cb);}});}async[_0x2ef05f(0xa9)](_0x156dd4){return this['_doCreateSocket'](_0x156dd4);}};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};
1
+ function _0x1fcf(){const _0x279d0f=['version','4sZsqqW','3176928PAWdqD','onStarting','pipe','2689530oQBMDo','string','default','80241GBSLcH','removeEventListener','headers','16BePJSu','next','getConfig','@univerjs-pro/collaboration-client-node','symbol','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_doCreateSocket','dispose','length','message','defineProperty','add','_configService','_injector','collaboration-client-node.config','68648OddIhv','error','pluginName','packageName','2365490VgnMci','6089556OQrWcd','2fqQcIL','getOwnPropertyDescriptor','close','0.22.0-insiders.20260513-0b53885','601811GKcCdZ','object','constructor','decorate','set','function','customHeaders','10WPcxoO','call','_registerDependencies','open','addEventListener','iterator','toPrimitive','createSocket'];_0x1fcf=function(){return _0x279d0f;};return _0x1fcf();}const _0x2e278b=_0x48cd;(function(_0x6e33b3,_0x54c888){const _0x23686b=_0x48cd,_0x37a5a9=_0x6e33b3();while(!![]){try{const _0x2e0c64=-parseInt(_0x23686b(0x184))/0x1*(parseInt(_0x23686b(0x17e))/0x2)+-parseInt(_0x23686b(0x16c))/0x3*(parseInt(_0x23686b(0x165))/0x4)+-parseInt(_0x23686b(0x182))/0x5+parseInt(_0x23686b(0x169))/0x6+parseInt(_0x23686b(0x188))/0x7*(parseInt(_0x23686b(0x16f))/0x8)+-parseInt(_0x23686b(0x166))/0x9*(parseInt(_0x23686b(0x18f))/0xa)+parseInt(_0x23686b(0x183))/0xb;if(_0x2e0c64===_0x54c888)break;else _0x37a5a9['push'](_0x37a5a9['shift']());}catch(_0x29c34f){_0x37a5a9['push'](_0x37a5a9['shift']());}}}(_0x1fcf,0x3d998));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';import{HTTPService,ISocketService}from'@univerjs/network';function _0x48cd(_0x26f9cc,_0x133e5c){_0x26f9cc=_0x26f9cc-0x164;const _0x1fcf3a=_0x1fcf();let _0x48cd97=_0x1fcf3a[_0x26f9cc];return _0x48cd97;}import{Observable,share}from'rxjs';import{WebSocket}from'ws';import{ISnapshotServerService}from'@univerjs-pro/collaboration';const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x2e278b(0x17d),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x2e278b(0x172),version=_0x2e278b(0x187);function __decorateParam(_0x3d1f07,_0x421f4b){return function(_0x414314,_0x4a0ad7){_0x421f4b(_0x414314,_0x4a0ad7,_0x3d1f07);};}function __decorate(_0x693746,_0x13ac37,_0x52529f,_0x205667){const _0x338e40=_0x2e278b;var _0x398b7d=arguments['length'],_0x2887b1=_0x398b7d<0x3?_0x13ac37:_0x205667===null?_0x205667=Object[_0x338e40(0x185)](_0x13ac37,_0x52529f):_0x205667,_0x58f14a;if(typeof Reflect==='object'&&typeof Reflect[_0x338e40(0x18b)]===_0x338e40(0x18d))_0x2887b1=Reflect[_0x338e40(0x18b)](_0x693746,_0x13ac37,_0x52529f,_0x205667);else{for(var _0x152674=_0x693746[_0x338e40(0x177)]-0x1;_0x152674>=0x0;_0x152674--)if(_0x58f14a=_0x693746[_0x152674])_0x2887b1=(_0x398b7d<0x3?_0x58f14a(_0x2887b1):_0x398b7d>0x3?_0x58f14a(_0x13ac37,_0x52529f,_0x2887b1):_0x58f14a(_0x13ac37,_0x52529f))||_0x2887b1;}return _0x398b7d>0x3&&_0x2887b1&&Object[_0x338e40(0x179)](_0x13ac37,_0x52529f,_0x2887b1),_0x2887b1;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x58b9af){super(),this['_configService']=_0x58b9af;}[_0x2e278b(0x196)](_0x289eaa){const _0x52b558=_0x2e278b;var _0x2000e9;const _0xda3b61=((_0x2000e9=this[_0x52b558(0x17b)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x2000e9===void 0x0?void 0x0:_0x2000e9[_0x52b558(0x18e)])||{};try{const _0x1eb889=new WebSocket(_0x289eaa,{'headers':{..._0xda3b61}}),_0x469417=new DisposableCollection();return{'URL':_0x289eaa,'close':(_0x5cd3b8,_0x170711)=>{const _0x58f6ee=_0x52b558;_0x1eb889[_0x58f6ee(0x186)](_0x5cd3b8,_0x170711),_0x469417[_0x58f6ee(0x176)]();},'send':_0x300243=>{_0x1eb889['send'](_0x300243);},'open$':new Observable(_0x251ae5=>{const _0x36ad3e=_0x52b558,_0x3e1c24=_0x48f8d6=>_0x251ae5[_0x36ad3e(0x170)](_0x48f8d6);_0x1eb889['addEventListener']('open',_0x3e1c24),_0x469417['add'](toDisposable(()=>_0x1eb889[_0x36ad3e(0x16d)](_0x36ad3e(0x192),_0x3e1c24)));})[_0x52b558(0x168)](share()),'close$':new Observable(_0x5a0499=>{const _0x22bca1=_0x52b558,_0x163cc8=_0xca8bc8=>_0x5a0499['next'](_0xca8bc8);_0x1eb889[_0x22bca1(0x193)](_0x22bca1(0x186),_0x163cc8),_0x469417['add'](toDisposable(()=>_0x1eb889[_0x22bca1(0x16d)](_0x22bca1(0x186),_0x163cc8)));})[_0x52b558(0x168)](share()),'error$':new Observable(_0x135065=>{const _0x1053b1=_0x52b558,_0x53869e=_0x209ca9=>_0x135065[_0x1053b1(0x170)](_0x209ca9);_0x1eb889[_0x1053b1(0x193)](_0x1053b1(0x17f),_0x53869e),_0x469417[_0x1053b1(0x17a)](toDisposable(()=>_0x1eb889[_0x1053b1(0x16d)](_0x1053b1(0x17f),_0x53869e)));})[_0x52b558(0x168)](share()),'message$':new Observable(_0x562631=>{const _0x6c580f=_0x52b558,_0x46f4e4=_0x586fd4=>_0x562631['next'](_0x586fd4);_0x1eb889['addEventListener'](_0x6c580f(0x178),_0x46f4e4),_0x469417[_0x6c580f(0x17a)](toDisposable(()=>_0x1eb889[_0x6c580f(0x16d)]('message',_0x46f4e4)));})['pipe'](share())};}catch(_0x4592f0){return console['error'](_0x4592f0),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _typeof(_0x2c46ab){'@babel/helpers - typeof';const _0x318099=_0x2e278b;return _typeof=_0x318099(0x18d)==typeof Symbol&&'symbol'==typeof Symbol[_0x318099(0x194)]?function(_0x74a497){return typeof _0x74a497;}:function(_0x1e5c8e){const _0x40e279=_0x318099;return _0x1e5c8e&&'function'==typeof Symbol&&_0x1e5c8e[_0x40e279(0x18a)]===Symbol&&_0x1e5c8e!==Symbol['prototype']?_0x40e279(0x173):typeof _0x1e5c8e;},_typeof(_0x2c46ab);}function toPrimitive(_0x2bb4b9,_0x534d64){const _0x254591=_0x2e278b;if(_0x254591(0x189)!=_typeof(_0x2bb4b9)||!_0x2bb4b9)return _0x2bb4b9;var _0x583546=_0x2bb4b9[Symbol[_0x254591(0x195)]];if(void 0x0!==_0x583546){var _0x5da45f=_0x583546[_0x254591(0x190)](_0x2bb4b9,_0x534d64||_0x254591(0x16b));if('object'!=_typeof(_0x5da45f))return _0x5da45f;throw new TypeError(_0x254591(0x174));}return(_0x254591(0x16a)===_0x534d64?String:Number)(_0x2bb4b9);}function toPropertyKey(_0x11654e){const _0x491417=_0x2e278b;var _0x2986ef=toPrimitive(_0x11654e,_0x491417(0x16a));return'symbol'==_typeof(_0x2986ef)?_0x2986ef:_0x2986ef+'';}function _defineProperty(_0x34aa22,_0x4f6349,_0x3ad26d){const _0x13f5c9=_0x2e278b;return(_0x4f6349=toPropertyKey(_0x4f6349))in _0x34aa22?Object[_0x13f5c9(0x179)](_0x34aa22,_0x4f6349,{'value':_0x3ad26d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x34aa22[_0x4f6349]=_0x3ad26d,_0x34aa22;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0x25dc4a=defaultPluginConfig,_0x53c0bb,_0x249f73){const _0x25f5c9=_0x2e278b;super(),this[_0x25f5c9(0x17b)]=_0x53c0bb,this[_0x25f5c9(0x17c)]=_0x249f73,this[_0x25f5c9(0x17b)]['setConfig'](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x25dc4a);}[_0x2e278b(0x167)](){const _0x58ceb4=_0x2e278b;this[_0x58ceb4(0x191)]();}[_0x2e278b(0x191)](){const _0x40b52e=_0x2e278b;registerDependencies(this[_0x40b52e(0x17c)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x2e278b(0x180),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_defineProperty(UniverCollaborationClientNodePlugin,_0x2e278b(0x181),name),_defineProperty(UniverCollaborationClientNodePlugin,_0x2e278b(0x164),version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0x108470,_0x35b3f2,_0x38f81b,_0x4405cb,_0x3dc963){const _0x399359=_0x2e278b;super(_0x108470,_0x35b3f2,_0x38f81b,_0x4405cb,_0x3dc963);const _0x4bea36=this[_0x399359(0x17b)][_0x399359(0x171)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this['_httpService']['registerHTTPInterceptor']({'interceptor':(_0xcbf2ac,_0x5ee7b6)=>{const _0x7db9b5=_0x399359,_0x2372d3=_0xcbf2ac[_0x7db9b5(0x16e)];if(_0x4bea36===null||_0x4bea36===void 0x0?void 0x0:_0x4bea36[_0x7db9b5(0x18e)]){for(const _0x5df4aa in _0x4bea36['customHeaders'])_0x2372d3[_0x7db9b5(0x18c)](_0x5df4aa,_0x4bea36['customHeaders'][_0x5df4aa]);}return _0x5ee7b6(_0xcbf2ac);}});}async[_0x2e278b(0x196)](_0x114b41){const _0x44f7de=_0x2e278b;return this[_0x44f7de(0x175)](_0x114b41);}};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 _0xc35f(_0xc7c1b2,_0x18c52d){_0xc7c1b2=_0xc7c1b2-0xb8;const _0x444b15=_0x444b();let _0xc35f74=_0x444b15[_0xc7c1b2];return _0xc35f74;}function _0x444b(){const _0x368a18=['onStarting','128912AfPuUg','@univerjs/network','default','_registerDependencies','function','dispose','UniverProCollaboration','UniverProCollaborationClientNode','amd','prototype','_configService','UniverCollaborationClientPlugin','removeEventListener','Plugin','rxjs','Injector','length','share','createSocket','226312WwqJGB','UniverCollaborationClientNodePlugin','symbol','send','toStringTag','COLLABORATION_CLIENT_NODE_CONFIG_KEY','NodeCollaborationSocketService','ISnapshotServerService','getOwnPropertyDescriptor','DependentOn','@univerjs/core','pipe','IConfigService','44424vxcAvM','32790JBUfkR','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','error','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','headers','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','iterator','decorate','@univerjs-pro/collaboration-client-node','UniverCore','_doCreateSocket','Disposable','575520pGSgbL','1339jDtOAh','open','next','object','set','CollaborationSocketService','4otgzyI','_httpService','message','@univerjs-pro/collaboration-client','customHeaders','addEventListener','exports','_injector','1318280GzoXlE','registerHTTPInterceptor','close','Inject','toDisposable','string','ILogService','36NwTqaU','call','pluginName','defineProperty','ISocketService','11CsdCLB','getConfig','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','toPrimitive','Observable','6TDyVWW','21aUvaPP','3454jeGyid','version','add','collaboration-client-node.config','DisposableCollection'];_0x444b=function(){return _0x368a18;};return _0x444b();}(function(_0x2c464f,_0x5b9788){const _0x5e48c4=_0xc35f,_0x500ffa=_0x2c464f();while(!![]){try{const _0xc73877=-parseInt(_0x5e48c4(0xdf))/0x1+parseInt(_0x5e48c4(0x106))/0x2*(parseInt(_0x5e48c4(0xde))/0x3)+parseInt(_0x5e48c4(0xc4))/0x4*(parseInt(_0x5e48c4(0xbd))/0x5)+parseInt(_0x5e48c4(0xdd))/0x6*(parseInt(_0x5e48c4(0xe5))/0x7)+-parseInt(_0x5e48c4(0xf8))/0x8*(-parseInt(_0x5e48c4(0xd3))/0x9)+parseInt(_0x5e48c4(0xcc))/0xa*(parseInt(_0x5e48c4(0xd8))/0xb)+-parseInt(_0x5e48c4(0x105))/0xc*(parseInt(_0x5e48c4(0xbe))/0xd);if(_0xc73877===_0x5b9788)break;else _0x500ffa['push'](_0x500ffa['shift']());}catch(_0x17c5e9){_0x500ffa['push'](_0x500ffa['shift']());}}}(_0x444b,0x1a7dd),function(_0x191ee8,_0x5101da){const _0x359268=_0xc35f;typeof exports==_0x359268(0xc1)&&typeof module<'u'?_0x5101da(exports,require(`@univerjs-pro/collaboration-client`),require(`@univerjs/core`),require(`@univerjs/network`),require(`rxjs`),require(`@univerjs-pro/collaboration`)):typeof define==_0x359268(0xe9)&&define[_0x359268(0xed)]?define([_0x359268(0xca),_0x359268(0xc7),_0x359268(0x102),_0x359268(0xe6),_0x359268(0xf3),'@univerjs-pro/collaboration'],_0x5101da):(_0x191ee8=typeof globalThis<'u'?globalThis:_0x191ee8||self,_0x5101da(_0x191ee8[_0x359268(0xec)]={},_0x191ee8['UniverProCollaborationClient'],_0x191ee8[_0x359268(0xba)],_0x191ee8['UniverNetwork'],_0x191ee8['rxjs'],_0x191ee8[_0x359268(0xeb)]));}(this,function(_0x3a01ed,_0x31b5a9,_0x194af0,_0xc17bc8,_0x57aad9,_0x1df54f){const _0x5f548d=_0xc35f;Object[_0x5f548d(0xd6)](_0x3a01ed,Symbol[_0x5f548d(0xfc)],{'value':'Module'});var _0x43dec8=(_0x1c3036,_0xa6fd7b)=>()=>(_0xa6fd7b||(_0x1c3036((_0xa6fd7b={'exports':{}})[_0x5f548d(0xca)],_0xa6fd7b),_0x1c3036=null),_0xa6fd7b[_0x5f548d(0xca)]);let _0x14493d=_0x5f548d(0xe2);Symbol(_0x14493d);let _0x25a43a={};var _0x4439f0=_0x5f548d(0xb9),_0x30a8a4='0.22.0-insiders.20260513-0b53885',_0x2ff7e3=_0x43dec8((_0x279488,_0x12c0a9)=>{const _0x49f226=_0x5f548d;_0x12c0a9[_0x49f226(0xca)]=function(){const _0x3f8c9d=_0x49f226;throw Error(_0x3f8c9d(0x107));};})();function _0x36b9dd(_0x495bc4,_0x2622a3){return function(_0x2193f9,_0x25a6e5){_0x2622a3(_0x2193f9,_0x25a6e5,_0x495bc4);};}function _0x3a8455(_0x52ec5b,_0x1f3fc7,_0x28dedd,_0x54a266){const _0x2047f3=_0x5f548d;var _0x178e8c=arguments[_0x2047f3(0xf5)],_0x4f20e4=_0x178e8c<0x3?_0x1f3fc7:_0x54a266===null?_0x54a266=Object[_0x2047f3(0x100)](_0x1f3fc7,_0x28dedd):_0x54a266,_0xf93b37;if(typeof Reflect==_0x2047f3(0xc1)&&typeof Reflect[_0x2047f3(0xb8)]==_0x2047f3(0xe9))_0x4f20e4=Reflect['decorate'](_0x52ec5b,_0x1f3fc7,_0x28dedd,_0x54a266);else{for(var _0x5c7233=_0x52ec5b[_0x2047f3(0xf5)]-0x1;_0x5c7233>=0x0;_0x5c7233--)(_0xf93b37=_0x52ec5b[_0x5c7233])&&(_0x4f20e4=(_0x178e8c<0x3?_0xf93b37(_0x4f20e4):_0x178e8c>0x3?_0xf93b37(_0x1f3fc7,_0x28dedd,_0x4f20e4):_0xf93b37(_0x1f3fc7,_0x28dedd))||_0x4f20e4);}return _0x178e8c>0x3&&_0x4f20e4&&Object[_0x2047f3(0xd6)](_0x1f3fc7,_0x28dedd,_0x4f20e4),_0x4f20e4;}let _0x2a695f=class extends _0x194af0[_0x5f548d(0xbc)]{constructor(_0x8d5f19){const _0x2195d7=_0x5f548d;super(),this[_0x2195d7(0xef)]=_0x8d5f19;}[_0x5f548d(0xf7)](_0x509749){const _0x1b80fb=_0x5f548d;var _0x48cede;let _0x3fd703=((_0x48cede=this['_configService'][_0x1b80fb(0xd9)](_0x31b5a9[_0x1b80fb(0x10b)]))==null?void 0x0:_0x48cede['customHeaders'])||{};try{let _0x244b97=new _0x2ff7e3['WebSocket'](_0x509749,{'headers':{..._0x3fd703}}),_0x437823=new _0x194af0[(_0x1b80fb(0xe3))]();return{'URL':_0x509749,'close':(_0x30a440,_0x43c5d2)=>{const _0x295410=_0x1b80fb;_0x244b97['close'](_0x30a440,_0x43c5d2),_0x437823[_0x295410(0xea)]();},'send':_0x25bae4=>{const _0x43c7f6=_0x1b80fb;_0x244b97[_0x43c7f6(0xfb)](_0x25bae4);},'open$':new _0x57aad9[(_0x1b80fb(0xdc))](_0x7f9c55=>{const _0x19a76c=_0x1b80fb;let _0x3b4bdc=_0x4392db=>_0x7f9c55['next'](_0x4392db);_0x244b97['addEventListener'](_0x19a76c(0xbf),_0x3b4bdc),_0x437823[_0x19a76c(0xe1)]((0x0,_0x194af0['toDisposable'])(()=>_0x244b97['removeEventListener']('open',_0x3b4bdc)));})[_0x1b80fb(0x103)]((0x0,_0x57aad9[_0x1b80fb(0xf6)])()),'close$':new _0x57aad9[(_0x1b80fb(0xdc))](_0x44894c=>{const _0x4bfe47=_0x1b80fb;let _0x5e8524=_0x542e94=>_0x44894c['next'](_0x542e94);_0x244b97['addEventListener']('close',_0x5e8524),_0x437823['add']((0x0,_0x194af0[_0x4bfe47(0xd0)])(()=>_0x244b97[_0x4bfe47(0xf1)](_0x4bfe47(0xce),_0x5e8524)));})[_0x1b80fb(0x103)]((0x0,_0x57aad9['share'])()),'error$':new _0x57aad9[(_0x1b80fb(0xdc))](_0xfbcb19=>{const _0xe12f5e=_0x1b80fb;let _0x2bb6d2=_0x34f1a4=>_0xfbcb19[_0xe12f5e(0xc0)](_0x34f1a4);_0x244b97[_0xe12f5e(0xc9)]('error',_0x2bb6d2),_0x437823[_0xe12f5e(0xe1)]((0x0,_0x194af0[_0xe12f5e(0xd0)])(()=>_0x244b97['removeEventListener'](_0xe12f5e(0x108),_0x2bb6d2)));})['pipe']((0x0,_0x57aad9['share'])()),'message$':new _0x57aad9[(_0x1b80fb(0xdc))](_0x1d350c=>{const _0x5ba9b4=_0x1b80fb;let _0x53bd88=_0x333561=>_0x1d350c[_0x5ba9b4(0xc0)](_0x333561);_0x244b97[_0x5ba9b4(0xc9)](_0x5ba9b4(0xc6),_0x53bd88),_0x437823[_0x5ba9b4(0xe1)]((0x0,_0x194af0['toDisposable'])(()=>_0x244b97['removeEventListener']('message',_0x53bd88)));})[_0x1b80fb(0x103)]((0x0,_0x57aad9[_0x1b80fb(0xf6)])())};}catch(_0x546646){return console[_0x1b80fb(0x108)](_0x546646),null;}}};_0x2a695f=_0x3a8455([_0x36b9dd(0x0,_0x194af0[_0x5f548d(0x104)])],_0x2a695f);function _0x4becbb(_0x4c94db){'@babel/helpers - typeof';const _0x4be252=_0x5f548d;return _0x4becbb=typeof Symbol==_0x4be252(0xe9)&&typeof Symbol[_0x4be252(0x10c)]==_0x4be252(0xfa)?function(_0x1275cc){return typeof _0x1275cc;}:function(_0x15cd9d){const _0x368af2=_0x4be252;return _0x15cd9d&&typeof Symbol==_0x368af2(0xe9)&&_0x15cd9d['constructor']===Symbol&&_0x15cd9d!==Symbol[_0x368af2(0xee)]?_0x368af2(0xfa):typeof _0x15cd9d;},_0x4becbb(_0x4c94db);}function _0x4e9012(_0x267b0e,_0x16b576){const _0x456e37=_0x5f548d;if(_0x4becbb(_0x267b0e)!='object'||!_0x267b0e)return _0x267b0e;var _0x23af49=_0x267b0e[Symbol[_0x456e37(0xdb)]];if(_0x23af49!==void 0x0){var _0x4b5487=_0x23af49[_0x456e37(0xd4)](_0x267b0e,_0x16b576||_0x456e37(0xe7));if(_0x4becbb(_0x4b5487)!=_0x456e37(0xc1))return _0x4b5487;throw TypeError(_0x456e37(0x109));}return(_0x16b576===_0x456e37(0xd1)?String:Number)(_0x267b0e);}function _0x55ccb0(_0x4773ea){const _0x2ff8ba=_0x5f548d;var _0x1e2e7b=_0x4e9012(_0x4773ea,_0x2ff8ba(0xd1));return _0x4becbb(_0x1e2e7b)==_0x2ff8ba(0xfa)?_0x1e2e7b:_0x1e2e7b+'';}function _0x389059(_0x501cb2,_0x4d95ed,_0x11c2fe){return(_0x4d95ed=_0x55ccb0(_0x4d95ed))in _0x501cb2?Object['defineProperty'](_0x501cb2,_0x4d95ed,{'value':_0x11c2fe,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x501cb2[_0x4d95ed]=_0x11c2fe,_0x501cb2;}let _0x212f29=class extends _0x194af0[_0x5f548d(0xf2)]{constructor(_0xc2789d=_0x25a43a,_0x1c129c,_0xde4506){const _0x5a42d8=_0x5f548d;super(),this['_configService']=_0x1c129c,this[_0x5a42d8(0xcb)]=_0xde4506,this[_0x5a42d8(0xef)]['setConfig'](_0x14493d,_0xc2789d);}[_0x5f548d(0xe4)](){const _0x532b52=_0x5f548d;this[_0x532b52(0xe8)]();}['_registerDependencies'](){const _0x57a872=_0x5f548d;(0x0,_0x194af0['registerDependencies'])(this[_0x57a872(0xcb)],[[_0xc17bc8[_0x57a872(0xd7)],{'useClass':_0x2a695f}]]);}};_0x389059(_0x212f29,_0x5f548d(0xd5),_0x5f548d(0xda)),_0x389059(_0x212f29,'packageName',_0x4439f0),_0x389059(_0x212f29,_0x5f548d(0xe0),_0x30a8a4),_0x212f29=_0x3a8455([(0x0,_0x194af0[_0x5f548d(0x101)])(_0x31b5a9[_0x5f548d(0xf0)]),_0x36b9dd(0x1,_0x194af0[_0x5f548d(0x104)]),_0x36b9dd(0x2,(0x0,_0x194af0[_0x5f548d(0xcf)])(_0x194af0[_0x5f548d(0xf4)]))],_0x212f29);let _0x480def=class extends _0x31b5a9[_0x5f548d(0xc3)]{constructor(_0x254de9,_0x68cc6c,_0x1b728f,_0x58dfca,_0xa70cd4){const _0x498399=_0x5f548d;super(_0x254de9,_0x68cc6c,_0x1b728f,_0x58dfca,_0xa70cd4);let _0x157631=this[_0x498399(0xef)][_0x498399(0xd9)](_0x31b5a9[_0x498399(0x10b)]);this[_0x498399(0xc5)][_0x498399(0xcd)]({'interceptor':(_0x3cacb6,_0x1f7579)=>{const _0x474b20=_0x498399;let _0x41311c=_0x3cacb6[_0x474b20(0x10a)];if(_0x157631!=null&&_0x157631[_0x474b20(0xc8)]){for(let _0x209120 in _0x157631[_0x474b20(0xc8)])_0x41311c[_0x474b20(0xc2)](_0x209120,_0x157631[_0x474b20(0xc8)][_0x209120]);}return _0x1f7579(_0x3cacb6);}});}async['createSocket'](_0x47e0dc){const _0x186222=_0x5f548d;return this[_0x186222(0xbb)](_0x47e0dc);}};_0x480def=_0x3a8455([_0x36b9dd(0x0,(0x0,_0x194af0[_0x5f548d(0xcf)])(_0x194af0[_0x5f548d(0xf4)])),_0x36b9dd(0x1,(0x0,_0x194af0[_0x5f548d(0xcf)])(_0xc17bc8['HTTPService'])),_0x36b9dd(0x2,_0x194af0['IConfigService']),_0x36b9dd(0x3,_0x194af0[_0x5f548d(0xd2)]),_0x36b9dd(0x4,_0x1df54f[_0x5f548d(0xff)])],_0x480def),_0x3a01ed[_0x5f548d(0xfd)]=_0x14493d,Object[_0x5f548d(0xd6)](_0x3a01ed,_0x5f548d(0xfe),{'enumerable':!0x0,'get':function(){return _0x480def;}}),Object['defineProperty'](_0x3a01ed,_0x5f548d(0xf9),{'enumerable':!0x0,'get':function(){return _0x212f29;}});}));
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@univerjs-pro/collaboration-client-node",
3
- "version": "0.21.1",
3
+ "version": "0.22.0-insiders.20260513-0b53885",
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.21.1",
50
- "@univerjs/core": "0.21.1",
51
- "@univerjs-pro/collaboration-client": "0.21.1",
52
- "@univerjs/network": "0.21.1"
55
+ "@univerjs-pro/collaboration": "0.22.0-insiders.20260513-0b53885",
56
+ "@univerjs-pro/collaboration-client": "0.22.0-insiders.20260513-0b53885",
57
+ "@univerjs/core": "0.22.0-insiders.20260513-0b53885",
58
+ "@univerjs/network": "0.22.0-insiders.20260513-0b53885"
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.21.1"
65
+ "@univerjs-infra/shared": "0.22.0"
60
66
  },
61
67
  "scripts": {
62
68
  "test": "vitest run",