@univer-cli/univer-collaboration-runtime-pool 1.0.0-beta.2

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 ADDED
@@ -0,0 +1,75 @@
1
+ # @univer-cli/univer-collaboration-runtime-pool
2
+
3
+ English | [简体中文](./README.zh-CN.md)
4
+
5
+ Create, exclusively lease, cache, and recycle `UniverCollaborationRuntime` instances in separate worker processes by an application-owned opaque key.
6
+
7
+ This lets multiple short tasks reuse expensive runtimes while isolating Univer and native/runtime state in workers. If you need only one runtime in the current process, use `@univer-cli/univer-collaboration-runtime` directly.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pnpm add @univer-cli/univer-collaboration-runtime-pool
13
+ ```
14
+
15
+ Requires Node.js 22.12 or higher. Worker entry must be the built JavaScript ESM file and cannot point to TypeScript source.
16
+
17
+ ## Worker entry
18
+
19
+ The worker creates the backend in the process that hosts the runtime, reads credentials, and constructs Univer:
20
+
21
+ ```ts
22
+ import { defineUniverCollaborationRuntimeWorker } from "@univer-cli/univer-collaboration-runtime-pool";
23
+
24
+ export default defineUniverCollaborationRuntimeWorker({
25
+ async createRuntime(init) {
26
+ return createRuntimeFromApplicationInit(init);
27
+ },
28
+ });
29
+ ```
30
+
31
+ Initialization data must be compatible with structured clone. The worker can read credentials directly from the environment or secure storage, avoiding the need to route remote Snapshots, changesets, and blocks through a daemon or parent process.
32
+
33
+ ## Use pool
34
+
35
+ ```ts
36
+ import { createUniverCollaborationRuntimePool } from "@univer-cli/univer-collaboration-runtime-pool";
37
+
38
+ const pool = createUniverCollaborationRuntimePool({
39
+ entry: new URL("./worker.js", import.meta.url),
40
+ });
41
+
42
+ const lease = await pool.acquire({
43
+ key: "server-a:book-1:sheet",
44
+ init: { unitId: "book-1", unitType: "sheet" },
45
+ });
46
+
47
+ try {
48
+ await lease.pull();
49
+ const result = await lease.execute({ mode: "read", code: "return workbook.getId();" });
50
+ console.log(result.value);
51
+ } catch (error) {
52
+ await lease.invalidate();
53
+ throw error;
54
+ } finally {
55
+ await lease.release();
56
+ }
57
+
58
+ await pool.close();
59
+ ```
60
+
61
+ The lease proxies the collaboration runtime's complete public interface, so callers do not need to design RPC methods.
62
+
63
+ ## Pool behavior
64
+
65
+ Creation for a key is single-flight, and leases for the same key are granted in FIFO order. Idle runtimes can be evicted by TTL and LRU; idle eviction never interrupts an active lease. Invalidation marks a worker/runtime as untrustworthy, so it is destroyed during release. Pool events can feed logs and metrics.
66
+
67
+ The application defines both key and initialization data. The pool knows nothing about Workspace, Worktree, URLs, authentication, or target-to-key algorithms, and does not verify whether two initialization values for the same key are semantically compatible.
68
+
69
+ ## Mutation transport
70
+
71
+ Mutation replacements transferred across workers preserve the collaboration runtime's structured contract. Values unsupported by structured clone fail at the boundary. Business logic should not depend on the internal worker protocol or serialization format.
72
+
73
+ ## Responsibility boundaries
74
+
75
+ The package owns worker lifecycle, runtime proxies, leases, and caching. It does not define daemon methods, Commander commands, backends, or remote data-loading workflows.
@@ -0,0 +1,82 @@
1
+ # @univer-cli/univer-collaboration-runtime-pool
2
+
3
+ [English](./README.md) | 简体中文
4
+
5
+ 在独立 worker process 中按 application-owned opaque key 创建、独占租用、缓存和回收
6
+ `UniverCollaborationRuntime`。
7
+
8
+ 它适合多个短任务复用昂贵 runtime,同时把 Univer 与 native/runtime 状态隔离在 worker 中。若只需要当前进程内的
9
+ 单个 runtime,直接使用 `@univer-cli/univer-collaboration-runtime`。
10
+
11
+ ## 安装
12
+
13
+ ```bash
14
+ pnpm add @univer-cli/univer-collaboration-runtime-pool
15
+ ```
16
+
17
+ 要求 Node.js 22.12 或更高版本。Worker entry 必须是构建后的 JavaScript ESM 文件,不能指向 TypeScript source。
18
+
19
+ ## Worker entry
20
+
21
+ Worker 在 runtime 所在进程创建 backend、读取凭证并构造 Univer:
22
+
23
+ ```ts
24
+ import { defineUniverCollaborationRuntimeWorker } from "@univer-cli/univer-collaboration-runtime-pool";
25
+
26
+ export default defineUniverCollaborationRuntimeWorker({
27
+ async createRuntime(init) {
28
+ return createRuntimeFromApplicationInit(init);
29
+ },
30
+ });
31
+ ```
32
+
33
+ Init 必须是 structured-clone compatible value。凭证也可以由 worker 自己从环境或安全存储读取,避免经过 daemon
34
+ 或 parent process 转发远端 Snapshot、changeset 与 block。
35
+
36
+ ## 使用 pool
37
+
38
+ ```ts
39
+ import { createUniverCollaborationRuntimePool } from "@univer-cli/univer-collaboration-runtime-pool";
40
+
41
+ const pool = createUniverCollaborationRuntimePool({
42
+ entry: new URL("./worker.js", import.meta.url),
43
+ });
44
+
45
+ const lease = await pool.acquire({
46
+ key: "server-a:book-1:sheet",
47
+ init: { unitId: "book-1", unitType: "sheet" },
48
+ });
49
+
50
+ try {
51
+ await lease.pull();
52
+ const result = await lease.execute({ mode: "read", code: "return workbook.getId();" });
53
+ console.log(result.value);
54
+ } catch (error) {
55
+ await lease.invalidate();
56
+ throw error;
57
+ } finally {
58
+ await lease.release();
59
+ }
60
+
61
+ await pool.close();
62
+ ```
63
+
64
+ Lease 代理 collaboration runtime 的完整 public interface;调用方不需要设计 RPC method。
65
+
66
+ ## Pool 行为
67
+
68
+ 同一个 key 使用 single-flight 创建和 FIFO lease;idle runtime 可按 TTL 与 LRU 回收。Active lease 不会被 idle
69
+ eviction 中断。Invalidate 表示 worker/runtime 已不可信,会在 release 时销毁。Pool event 可用于日志和 metrics。
70
+
71
+ Key 与 init 完全由 application 定义。Pool 不知道 Workspace、Worktree、URL、认证或 target-to-key 算法,也不会
72
+ 验证相同 key 的两次 init 是否语义兼容。
73
+
74
+ ## Mutation replacement
75
+
76
+ 跨 worker 传输的 mutation replacement 保留 collaboration runtime 的结构化合同;不支持 structured clone 的值
77
+ 会在边界失败。业务层不应依赖 worker protocol 或序列化内部格式。
78
+
79
+ ## 职责边界
80
+
81
+ Package 拥有 worker lifecycle、runtime proxy、lease 与 cache;不定义 daemon method、Commander command、
82
+ backend 或远程数据加载流程。
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ 'use strict';module['exports']=require('./index.mjs');
@@ -0,0 +1,87 @@
1
+ import { InstancePoolCacheOptions } from "@univer-cli/generic-keyed-instance-pool";
2
+ import { CollaborationCommitResult, CollaborationCommitResult as CollaborationCommitResult$1, CollaborationFetchResult, CollaborationFetchResult as CollaborationFetchResult$1, CollaborationPullResult, CollaborationPullResult as CollaborationPullResult$1, CollaborationReplaceMutationsResult, CollaborationReplaceMutationsResult as CollaborationReplaceMutationsResult$1, CollaborationRuntimeReadExecution, CollaborationRuntimeReadExecution as CollaborationRuntimeReadExecution$1, CollaborationRuntimeReadResult, CollaborationRuntimeReadResult as CollaborationRuntimeReadResult$1, CollaborationRuntimeState, CollaborationRuntimeState as CollaborationRuntimeState$1, CollaborationRuntimeWriteExecution, CollaborationRuntimeWriteExecution as CollaborationRuntimeWriteExecution$1, CollaborationRuntimeWriteResult, CollaborationRuntimeWriteResult as CollaborationRuntimeWriteResult$1, CollaborationUnitData, CollaborationUnitData as CollaborationUnitData$1, UniverCollaborationRuntime } from "@univer-cli/univer-collaboration-runtime";
3
+ import { IMutation } from "@univerjs/protocol";
4
+ //#region src/errors.d.ts
5
+ type UniverCollaborationRuntimePoolErrorCode = "COLLABORATION_POOL_INVALID_INPUT" | "COLLABORATION_POOL_CLOSED" | "COLLABORATION_POOL_CAPACITY_EXCEEDED" | "COLLABORATION_LEASE_CLOSED" | "COLLABORATION_WORKER_OPEN_TIMEOUT" | "COLLABORATION_WORKER_OPERATION_TIMEOUT" | "COLLABORATION_WORKER_CRASHED" | "COLLABORATION_WORKER_PROTOCOL_ERROR" | "COLLABORATION_WORKER_CLOSED";
6
+ interface UniverCollaborationRuntimePoolErrorOptions extends ErrorOptions {
7
+ readonly invalidatesInstance?: boolean;
8
+ }
9
+ declare class UniverCollaborationRuntimePoolError extends Error {
10
+ readonly code: UniverCollaborationRuntimePoolErrorCode;
11
+ readonly invalidatesInstance: boolean;
12
+ constructor(code: UniverCollaborationRuntimePoolErrorCode, message: string, options?: UniverCollaborationRuntimePoolErrorOptions);
13
+ }
14
+ //#endregion
15
+ //#region src/types.d.ts
16
+ interface UniverCollaborationRuntimeAcquireInput<TInit> {
17
+ /** Stable opaque target identity owned by the application. */
18
+ readonly key: string;
19
+ /** Sent to the worker only when it creates or reloads a runtime. */
20
+ readonly init: TInit;
21
+ }
22
+ interface UniverCollaborationRuntimeLease {
23
+ readonly key: string;
24
+ readonly unitId: string;
25
+ readonly unitType: UniverCollaborationRuntime["unitType"];
26
+ getState(): Promise<CollaborationRuntimeState$1>;
27
+ getPendingMutations(): Promise<readonly IMutation[]>;
28
+ execute(input: CollaborationRuntimeReadExecution$1): Promise<CollaborationRuntimeReadResult$1>;
29
+ execute(input: CollaborationRuntimeWriteExecution$1): Promise<CollaborationRuntimeWriteResult$1>;
30
+ replacePendingMutations(mutations: readonly IMutation[]): Promise<CollaborationReplaceMutationsResult$1>;
31
+ fetch(): Promise<CollaborationFetchResult$1>;
32
+ pull(): Promise<CollaborationPullResult$1>;
33
+ commit(): Promise<CollaborationCommitResult$1>;
34
+ exportUnitData(): Promise<CollaborationUnitData$1>;
35
+ /** Releases the current runtime for reuse. */
36
+ release(): Promise<void>;
37
+ /** Permanently removes this runtime and its worker from the pool. */
38
+ invalidate(): Promise<void>;
39
+ }
40
+ interface UniverCollaborationRuntimePool<TInit = unknown> {
41
+ acquire(input: UniverCollaborationRuntimeAcquireInput<TInit>): Promise<UniverCollaborationRuntimeLease>;
42
+ close(): Promise<void>;
43
+ }
44
+ type UniverCollaborationRuntimePoolOperation = "state" | "pending-mutations" | "read" | "write" | "replace-mutations" | "fetch" | "pull" | "commit" | "export";
45
+ type UniverCollaborationRuntimePoolEvent = {
46
+ readonly key: string;
47
+ readonly type: "create-start";
48
+ } | {
49
+ readonly durationMs: number;
50
+ readonly key: string;
51
+ readonly type: "create-complete";
52
+ } | {
53
+ readonly key: string;
54
+ readonly type: "cache-hit";
55
+ } | {
56
+ readonly key: string;
57
+ readonly reason: "invalidate" | "lru" | "ttl";
58
+ readonly type: "evicted";
59
+ } | {
60
+ readonly durationMs: number;
61
+ readonly key: string;
62
+ readonly operation: UniverCollaborationRuntimePoolOperation;
63
+ readonly type: "operation-complete";
64
+ } | {
65
+ readonly errorCode: string;
66
+ readonly key: string;
67
+ readonly type: "instance-failed";
68
+ };
69
+ interface UniverCollaborationRuntimePoolOptions {
70
+ readonly cache?: InstancePoolCacheOptions;
71
+ readonly entry: string | URL;
72
+ readonly env?: NodeJS.ProcessEnv;
73
+ readonly onEvent?: (event: UniverCollaborationRuntimePoolEvent) => void;
74
+ readonly openTimeoutMs?: number;
75
+ readonly operationTimeoutMs?: number;
76
+ }
77
+ interface UniverCollaborationRuntimeWorkerDefinition<TInit = unknown> {
78
+ createRuntime(init: TInit): Promise<UniverCollaborationRuntime> | UniverCollaborationRuntime;
79
+ }
80
+ //#endregion
81
+ //#region src/runtime-pool.d.ts
82
+ declare function createUniverCollaborationRuntimePool<TInit = unknown>(options: UniverCollaborationRuntimePoolOptions): UniverCollaborationRuntimePool<TInit>;
83
+ //#endregion
84
+ //#region src/worker-definition.d.ts
85
+ declare function defineUniverCollaborationRuntimeWorker<TInit>(definition: UniverCollaborationRuntimeWorkerDefinition<TInit>): UniverCollaborationRuntimeWorkerDefinition<TInit>;
86
+ //#endregion
87
+ export { type CollaborationCommitResult, type CollaborationFetchResult, type CollaborationPullResult, type CollaborationReplaceMutationsResult, type CollaborationRuntimeReadExecution, type CollaborationRuntimeReadResult, type CollaborationRuntimeState, type CollaborationRuntimeWriteExecution, type CollaborationRuntimeWriteResult, type CollaborationUnitData, type UniverCollaborationRuntimeAcquireInput, type UniverCollaborationRuntimeLease, type UniverCollaborationRuntimePool, UniverCollaborationRuntimePoolError, type UniverCollaborationRuntimePoolErrorCode, type UniverCollaborationRuntimePoolErrorOptions, type UniverCollaborationRuntimePoolEvent, type UniverCollaborationRuntimePoolOperation, type UniverCollaborationRuntimePoolOptions, type UniverCollaborationRuntimeWorkerDefinition, createUniverCollaborationRuntimePool, defineUniverCollaborationRuntimeWorker };
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ const _0x38413c=_0x1657;(function(_0x21f983,_0x314797){const _0x5ad315=_0x1657,_0x535c60=_0x21f983();while(!![]){try{const _0x5b4e3b=parseInt(_0x5ad315(0x1b6))/0x1+parseInt(_0x5ad315(0x225))/0x2*(-parseInt(_0x5ad315(0x1cb))/0x3)+parseInt(_0x5ad315(0x1cd))/0x4+-parseInt(_0x5ad315(0x227))/0x5+parseInt(_0x5ad315(0x211))/0x6*(-parseInt(_0x5ad315(0x215))/0x7)+-parseInt(_0x5ad315(0x210))/0x8+parseInt(_0x5ad315(0x1e4))/0x9;if(_0x5b4e3b===_0x314797)break;else _0x535c60['push'](_0x535c60['shift']());}catch(_0x4db8d9){_0x535c60['push'](_0x535c60['shift']());}}}(_0x4986,0xc2d72));import{InstancePoolError as _0x2c54fc,createGenericKeyedInstancePool as _0x534d32}from'@univer-cli/generic-keyed-instance-pool';import{CollaborationRuntimeError as _0x33013f}from'@univer-cli/univer-collaboration-runtime';import{fork as _0x5d1cd4}from'node:child_process';import{dirname as _0x160833,extname as _0x3a8f78,join as _0x15b21d}from'node:path';import{fileURLToPath as _0x1bbb87}from'node:url';var c=class extends Error{[_0x38413c(0x1dc)];[_0x38413c(0x202)];constructor(_0x346ea7,_0x2768aa,_0x6f5958={}){const _0x2df228=_0x38413c;super(_0x2768aa,_0x6f5958),this[_0x2df228(0x209)]=_0x2df228(0x21e),this[_0x2df228(0x1dc)]=_0x346ea7,this[_0x2df228(0x202)]=_0x6f5958[_0x2df228(0x202)]??!0x1;}};async function l(_0x22ef9c){const _0x239e41=_0x38413c;let _0x413433=_0x1bbb87(import.meta.url),_0x23f0f9=_0x160833(_0x413433),_0x571d38=_0x15b21d(_0x23f0f9,_0x3a8f78(_0x413433)===_0x239e41(0x1f7)?_0x239e41(0x1ba):_0x239e41(0x1f0)),_0xc8425e=u(_0x5d1cd4(_0x571d38,[],{..._0x22ef9c['env']===void 0x0?{}:{'env':_0x22ef9c['env']},'serialization':_0x239e41(0x220),'stdio':[_0x239e41(0x1df),_0x239e41(0x1df),'ignore',_0x239e41(0x201)]}),_0x22ef9c[_0x239e41(0x20a)]);try{let _0xaf7b91=d(await _0xc8425e[_0x239e41(0x1a4)]({'entry':_0x22ef9c[_0x239e41(0x1d9)],'id':_0xc8425e['nextId'](),'init':_0x22ef9c[_0x239e41(0x207)],'type':_0x239e41(0x22c)},_0x22ef9c['openTimeoutMs'],_0x239e41(0x1ab))),_0x8c547,_0x14d157=async _0x8fa896=>await _0xc8425e['request']({..._0x8fa896,'id':_0xc8425e[_0x239e41(0x1f2)]()},_0x22ef9c['operationTimeoutMs']);return{..._0xaf7b91,async 'close'(){const _0x4f2280=_0x239e41;_0x8c547??=_0xc8425e[_0x4f2280(0x1d7)](),await _0x8c547;},async 'getState'(){const _0x57073d=_0x239e41;return f(await _0x14d157({'type':_0x57073d(0x1b7)}));},async 'getPendingMutations'(){const _0x5228bc=_0x239e41;let _0x3f5305=await _0x14d157({'type':'get-pending-mutations'});if(!C(_0x3f5305))throw _(_0x5228bc(0x1af));return _0x3f5305;},async 'executeReadCode'(_0x57a6c8){const _0x2f9838=_0x239e41;let _0xe3197c=p(await _0x14d157({'code':_0x57a6c8,'type':_0x2f9838(0x1ed)}));if(!(_0x2f9838(0x20e)in _0xe3197c)||!w(_0xe3197c[_0x2f9838(0x20e)]))throw _(_0x2f9838(0x1a8));return _0xe3197c;},async 'executeWriteCode'(_0x5ba130){const _0x97a429=_0x239e41;let _0xdb7a82=p(await _0x14d157({'code':_0x5ba130,'type':_0x97a429(0x1d4)}));if(!w(_0xdb7a82[_0x97a429(0x20e)])||!C(_0xdb7a82[_0x97a429(0x200)]))throw _(_0x97a429(0x223));return _0xdb7a82;},async 'replacePendingMutations'(_0x3e24f6){const _0x285eef=_0x239e41;let _0x557b53=p(await _0x14d157({'mutations':_0x3e24f6,'type':_0x285eef(0x1ee)}));if(!T(_0x557b53[_0x285eef(0x1ad)])||!T(_0x557b53[_0x285eef(0x1c3)]))throw _(_0x285eef(0x1c4));return _0x557b53;},async 'fetch'(){const _0x4b2bbb=_0x239e41;return m(await _0x14d157({'type':_0x4b2bbb(0x1a1)}),[_0x4b2bbb(0x20c),_0x4b2bbb(0x21a)]);},async 'pull'(){const _0x10dba0=_0x239e41;return m(await _0x14d157({'type':_0x10dba0(0x1bd)}),[_0x10dba0(0x1c9),_0x10dba0(0x1c8),_0x10dba0(0x229)]);},async 'commit'(){const _0x57faee=_0x239e41;return m(await _0x14d157({'type':'commit'}),[_0x57faee(0x1eb),_0x57faee(0x1e6),'confirmed','retry',_0x57faee(0x218),_0x57faee(0x229)]);},async 'exportUnitData'(){const _0x491f33=_0x239e41;let _0x59847e=await _0x14d157({'type':'export'});if(!E(_0x59847e))throw _(_0x491f33(0x1fb));return _0x59847e;}};}catch(_0x1987fc){throw await _0xc8425e[_0x239e41(0x1d7)](),_0x1987fc;}}function u(_0xf6533c,_0x5322cc){const _0x32de35=_0x38413c;let _0x94b44e=new Map(),_0x3e397a=0x0,_0x1943ec,_0x597d26=!0x1,_0x4bb8dd,_0x1e9f78,_0x10e383=new Promise(_0xa3ccc=>{_0x1e9f78=_0xa3ccc;});return _0xf6533c['on']('message',_0x2cf22f=>{const _0x30f7ac=_0x1657;if(!v(_0x2cf22f))return;let _0x5b0102=_0x94b44e[_0x30f7ac(0x1c0)](_0x2cf22f['id']);_0x5b0102&&(_0x94b44e['delete'](_0x2cf22f['id']),_0x5b0102[_0x30f7ac(0x224)]&&clearTimeout(_0x5b0102[_0x30f7ac(0x224)]),_0x2cf22f[_0x30f7ac(0x204)]===_0x30f7ac(0x1fe)?_0x5b0102[_0x30f7ac(0x1d6)](h(_0x2cf22f[_0x30f7ac(0x1fe)])):_0x5b0102['resolve'](_0x2cf22f[_0x30f7ac(0x1e7)]));}),_0xf6533c['on'](_0x32de35(0x1fe),_0xef3b79=>_0xed8d9e(g(_0x32de35(0x1c2)+_0x5322cc+'\x20failed:\x20'+_0xef3b79[_0x32de35(0x1be)],_0xef3b79))),_0xf6533c['on'](_0x32de35(0x1f3),(_0x1ccdab,_0x4d4e70)=>{const _0x733b42=_0x32de35;_0x597d26||_0xed8d9e(g(_0x733b42(0x1c2)+_0x5322cc+'\x20exited\x20unexpectedly\x20with\x20'+(_0x4d4e70?'signal\x20'+_0x4d4e70:_0x733b42(0x1e1)+String(_0x1ccdab))));}),_0xf6533c['on'](_0x32de35(0x1d7),()=>_0x1e9f78()),{async 'close'(){if(_0x4bb8dd)return await _0x4bb8dd;_0x4bb8dd=_0x420d8a(),await _0x4bb8dd;},'nextId'(){return++_0x3e397a;},async 'request'(_0x42553c,_0x301de5,_0x332ef5=_0x32de35(0x228)){if(_0x1943ec)throw _0x1943ec;return await new Promise((_0x55845b,_0x349e02)=>{const _0xe3209b=_0x1657;let _0x4ae013={'reject':_0x349e02,'resolve':_0x55845b,'timer':setTimeout(()=>{_0xed8d9e(new c(_0x332ef5,'Collaboration\x20worker\x20'+_0x5322cc+'\x20timed\x20out\x20after\x20'+_0x301de5+'ms',{'invalidatesInstance':!0x0})),_0x51960c();},_0x301de5)};_0x94b44e[_0xe3209b(0x1b8)](_0x42553c['id'],_0x4ae013),_0xf6533c[_0xe3209b(0x1cc)](_0x42553c,_0x423951=>{const _0x288ccf=_0xe3209b;_0x423951&&_0xed8d9e(g(_0x288ccf(0x222)+_0x5322cc,_0x423951));});});}};async function _0x420d8a(){const _0x22ce5e=_0x32de35;if(_0x597d26=!0x0,!_0x1943ec&&_0xf6533c[_0x22ce5e(0x21c)])try{await Promise[_0x22ce5e(0x1b4)]([new Promise((_0x5e3dbb,_0x3446c7)=>{const _0x2eb8ac=_0x22ce5e;let _0x3c7ceb=++_0x3e397a;_0x94b44e[_0x2eb8ac(0x1b8)](_0x3c7ceb,{'reject':_0x3446c7,'resolve':_0x5e3dbb}),_0xf6533c[_0x2eb8ac(0x1cc)]({'id':_0x3c7ceb,'type':_0x2eb8ac(0x1d7)},_0x143ace=>{_0x143ace&&_0x3446c7(_0x143ace);});}),new Promise((_0x391072,_0x1fc5e8)=>{const _0x2f18bf=_0x22ce5e;setTimeout(()=>_0x1fc5e8(Error(_0x2f18bf(0x1ca))),0x1388)[_0x2f18bf(0x1ac)]();})]);}catch{}_0x51960c(),await _0x10e383,_0xed8d9e(new c(_0x22ce5e(0x217),_0x22ce5e(0x1f1)+_0x5322cc+'\x20is\x20closed',{'invalidatesInstance':!0x0}));}function _0xed8d9e(_0x2ff675){const _0x4546ff=_0x32de35;_0x1943ec??=_0x2ff675;for(let _0xa0ed86 of _0x94b44e[_0x4546ff(0x1e2)]())_0xa0ed86[_0x4546ff(0x224)]&&clearTimeout(_0xa0ed86[_0x4546ff(0x224)]),_0xa0ed86[_0x4546ff(0x1d6)](_0x1943ec);_0x94b44e['clear']();}function _0x51960c(){const _0x24b4dd=_0x32de35;_0xf6533c[_0x24b4dd(0x1f4)]===null&&_0xf6533c[_0x24b4dd(0x20d)]===null&&_0xf6533c[_0x24b4dd(0x1a3)](_0x24b4dd(0x1d1));}}function _0x1657(_0x25f24e,_0x1e2ed0){_0x25f24e=_0x25f24e-0x1a1;const _0x49860a=_0x4986();let _0x165791=_0x49860a[_0x25f24e];return _0x165791;}function d(_0x2afb76){const _0x425468=_0x38413c;if(!E(_0x2afb76)||typeof _0x2afb76[_0x425468(0x1f9)]!=_0x425468(0x1ff)||!y(_0x2afb76['unitType']))throw _(_0x425468(0x1c7));return{'unitId':_0x2afb76['unitId'],'unitType':_0x2afb76['unitType']};}function f(_0x541bdd){const _0x5b5581=_0x38413c;if(!E(_0x541bdd)||!b(_0x541bdd['connection'])||!T(_0x541bdd['baseRevision'])||!T(_0x541bdd[_0x5b5581(0x1d2)])||Number(_0x541bdd['knownHeadRevision'])<Number(_0x541bdd[_0x5b5581(0x1fd)])||!T(_0x541bdd[_0x5b5581(0x1c3)])||!T(_0x541bdd[_0x5b5581(0x1a9)])||!x(_0x541bdd['awaitingChangeset'])||!S(_0x541bdd[_0x5b5581(0x229)]))throw _(_0x5b5581(0x1da));return _0x541bdd;}function p(_0x4a81d1){const _0x23431a=_0x38413c;if(!E(_0x4a81d1))throw _(_0x23431a(0x203));return{..._0x4a81d1,'state':f(_0x4a81d1[_0x23431a(0x1ef)])};}function _0x4986(){const _0x35c313=['reconnecting','race','release','391462vhplvR','get-state','set','entry\x20must\x20not\x20be\x20empty','worker-child.ts','online','export','pull','message','COLLABORATION_WORKER_PROTOCOL_ERROR','get','pending-mutations','Worker\x20','pendingMutationCount','Worker\x20returned\x20an\x20invalid\x20mutation\x20replacement\x20result','COLLABORATION_WORKER_CRASHED','openTimeoutMs','Worker\x20returned\x20invalid\x20collaboration\x20runtime\x20metadata','pulled','up-to-date','Worker\x20close\x20timed\x20out','4450614ECMLXx','send','2410136FUFPOF','number','acquire','isFinite','SIGKILL','knownHeadRevision','onEvent','execute-write','assign','reject','close','INSTANCE_POOL_CAPACITY_EXCEEDED','entry','Worker\x20returned\x20invalid\x20collaboration\x20runtime\x20state','Collaboration\x20runtime\x20lease\x20','code','executeWriteCode','includes','ignore','isArray','exit\x20code\x20','values','operation','43842951TsLHkz','length','pull-required','result','COLLABORATION_POOL_CLOSED','reason','now','nothing-to-commit','reqId','execute-read','replace-mutations','state','worker-child.mjs','Collaboration\x20worker\x20','nextId','exit','exitCode','href','status','.ts','exportUnitData','unitId','mutationCount','Worker\x20returned\x20invalid\x20UnitData','stack','baseRevision','error','string','mutations','ipc','invalidatesInstance','Worker\x20returned\x20an\x20invalid\x20operation\x20result','type','Worker\x20returned\x20an\x20invalid\x20operation\x20status','COLLABORATION_POOL_CAPACITY_EXCEEDED','init','sid','name','key','read','unchanged','signalCode','value','operationTimeoutMs','10816096QkpQJt','618IeYsth','cache','COLLABORATION_POOL_INVALID_INPUT','COLLABORATION_','89922aIUFJH','executeReadCode','COLLABORATION_WORKER_CLOSED','unknown','\x20must\x20be\x20a\x20finite\x20positive\x20number','fetched','instance-failed','connected','retryable','UniverCollaborationRuntimePoolError','COLLABORATION_LEASE_CLOSED','advanced','mode','Failed\x20to\x20send\x20a\x20request\x20to\x20worker\x20','Worker\x20returned\x20an\x20invalid\x20write\x20result','timer','2JJfSir','offline','4543405xxyNId','COLLABORATION_WORKER_OPERATION_TIMEOUT','conflict','env','revision','open','getPendingMutations','fetch','closed','kill','request','isSafeInteger','operation-complete','every','Worker\x20returned\x20an\x20invalid\x20read\x20value','bufferedChangesetCount','startsWith','COLLABORATION_WORKER_OPEN_TIMEOUT','unref','previousMutationCount','invalidate','Worker\x20returned\x20invalid\x20pending\x20mutations','transform-failed','commit','unitType'];_0x4986=function(){return _0x35c313;};return _0x4986();}function m(_0x4aa6fb,_0xd5be6d){const _0x446059=_0x38413c;let _0x4effdd=p(_0x4aa6fb);if(typeof _0x4effdd[_0x446059(0x1f6)]!='string'||!_0xd5be6d[_0x446059(0x1de)](_0x4effdd[_0x446059(0x1f6)]))throw _(_0x446059(0x205));return _0x4effdd;}function h(_0x3fe16f){const _0x2c5136=_0x38413c;if(_0x3fe16f['code']?.[_0x2c5136(0x1aa)](_0x2c5136(0x214))&&!_0x3fe16f[_0x2c5136(0x1dc)][_0x2c5136(0x1aa)]('COLLABORATION_WORKER_')){let _0x565555=new _0x33013f(_0x3fe16f[_0x2c5136(0x1dc)],_0x3fe16f[_0x2c5136(0x1be)],{'retryable':_0x3fe16f[_0x2c5136(0x21d)]??!0x1});return _0x3fe16f[_0x2c5136(0x1fc)]!==void 0x0&&(_0x565555[_0x2c5136(0x1fc)]=_0x3fe16f[_0x2c5136(0x1fc)]),_0x3fe16f[_0x2c5136(0x202)]&&Object[_0x2c5136(0x1d5)](_0x565555,{'invalidatesInstance':!0x0}),_0x565555;}let _0xe7b35b=Error(_0x3fe16f[_0x2c5136(0x1be)]);return _0xe7b35b[_0x2c5136(0x209)]=_0x3fe16f[_0x2c5136(0x209)],_0x3fe16f[_0x2c5136(0x1dc)]!==void 0x0&&Object[_0x2c5136(0x1d5)](_0xe7b35b,{'code':_0x3fe16f['code']}),_0x3fe16f['invalidatesInstance']&&Object[_0x2c5136(0x1d5)](_0xe7b35b,{'invalidatesInstance':!0x0}),_0x3fe16f['stack']!==void 0x0&&(_0xe7b35b[_0x2c5136(0x1fc)]=_0x3fe16f[_0x2c5136(0x1fc)]),_0xe7b35b;}function g(_0x565754,_0x1e4ccc){const _0x34c6b8=_0x38413c;return new c(_0x34c6b8(0x1c5),_0x565754,{..._0x1e4ccc===void 0x0?{}:{'cause':_0x1e4ccc},'invalidatesInstance':!0x0});}function _(_0x3c89ff){const _0x480986=_0x38413c;return new c(_0x480986(0x1bf),_0x3c89ff,{'invalidatesInstance':!0x0});}function v(_0x38832a){const _0x751cd1=_0x38413c;return E(_0x38832a)&&Number[_0x751cd1(0x1a5)](_0x38832a['id'])&&(_0x38832a[_0x751cd1(0x204)]===_0x751cd1(0x1e7)||_0x38832a[_0x751cd1(0x204)]===_0x751cd1(0x1fe));}function y(_0x218014){return _0x218014===0x1||_0x218014===0x2||_0x218014===0x3||_0x218014===0x5||_0x218014===0x6;}function b(_0x3ca808){const _0x101475=_0x38413c;return _0x3ca808===_0x101475(0x1bb)||_0x3ca808===_0x101475(0x1b3)||_0x3ca808===_0x101475(0x226)||_0x3ca808===_0x101475(0x1a2);}function x(_0x3510c4){const _0x5c0143=_0x38413c;return _0x3510c4===null||E(_0x3510c4)&&T(_0x3510c4[_0x5c0143(0x1fd)])&&T(_0x3510c4[_0x5c0143(0x22b)])&&T(_0x3510c4[_0x5c0143(0x1fa)])&&(_0x3510c4[_0x5c0143(0x208)]===void 0x0||typeof _0x3510c4['sid']=='string')&&(_0x3510c4[_0x5c0143(0x1ec)]===void 0x0||T(_0x3510c4[_0x5c0143(0x1ec)]));}function S(_0x5197b5){const _0x27addf=_0x38413c;return _0x5197b5===null||E(_0x5197b5)&&(_0x5197b5[_0x27addf(0x1e3)]===_0x27addf(0x1bd)||_0x5197b5[_0x27addf(0x1e3)]===_0x27addf(0x1b1))&&(_0x5197b5[_0x27addf(0x1e9)]===_0x27addf(0x1b0)||_0x5197b5[_0x27addf(0x1e9)]==='changeset-rejected'||_0x5197b5['reason']==='permission-rejected')&&typeof _0x5197b5['message']=='string';}function C(_0x94bf6f){const _0x50ef29=_0x38413c;return Array[_0x50ef29(0x1e0)](_0x94bf6f)&&_0x94bf6f[_0x50ef29(0x1a7)](_0x567112=>E(_0x567112)&&typeof _0x567112['id']==_0x50ef29(0x1ff)&&_0x567112['id'][_0x50ef29(0x1e5)]>0x0&&typeof _0x567112['data']=='string');}function w(_0x1899fc){const _0x33a55e=_0x38413c;return _0x1899fc===null||typeof _0x1899fc=='boolean'||typeof _0x1899fc==_0x33a55e(0x1ff)||typeof _0x1899fc==_0x33a55e(0x1ce)&&Number['isFinite'](_0x1899fc)?!0x0:Array[_0x33a55e(0x1e0)](_0x1899fc)?_0x1899fc[_0x33a55e(0x1a7)](w):E(_0x1899fc)&&Object[_0x33a55e(0x1e2)](_0x1899fc)[_0x33a55e(0x1a7)](w);}function T(_0x45116b){const _0x1cddb8=_0x38413c;return Number[_0x1cddb8(0x1a5)](_0x45116b)&&Number(_0x45116b)>=0x0;}function E(_0x506820){const _0x32c2bc=_0x38413c;return typeof _0x506820=='object'&&!!_0x506820&&!Array[_0x32c2bc(0x1e0)](_0x506820);}var D=0x7530,O=0x7530;function k(_0x257a44){const _0x39b952=_0x38413c;let _0x48dc71=A(_0x257a44[_0x39b952(0x1d9)]),_0x1e164e=_0x257a44['openTimeoutMs']??D,_0x4b2599=_0x257a44['operationTimeoutMs']??O;j(_0x1e164e,_0x39b952(0x1c6)),j(_0x4b2599,_0x39b952(0x20f));let _0x233a45;try{_0x233a45=_0x534d32({'factory':{async 'create'(_0x228313){const _0xa987b1=_0x39b952;return await l({'entry':_0x48dc71,..._0x257a44[_0xa987b1(0x22a)]===void 0x0?{}:{'env':_0x257a44[_0xa987b1(0x22a)]},'init':_0x228313[_0xa987b1(0x207)],'key':_0x228313[_0xa987b1(0x20a)],'openTimeoutMs':_0x1e164e,'operationTimeoutMs':_0x4b2599});},async 'destroy'({instance:_0x34b455}){const _0x53705b=_0x39b952;await _0x34b455[_0x53705b(0x1d7)]();}},..._0x257a44[_0x39b952(0x212)]===void 0x0?{}:{'cache':_0x257a44['cache']},'onEvent':_0x13cf47});}catch(_0x57e397){throw M(_0x57e397);}return{async 'acquire'(_0x4dd775){const _0x7d692f=_0x39b952;let _0x3b8afb;try{_0x3b8afb=await _0x233a45[_0x7d692f(0x1cf)](_0x4dd775);}catch(_0x2fc4e){throw M(_0x2fc4e);}return _0x490685(_0x3b8afb);},async 'close'(){const _0x17abbd=_0x39b952;try{await _0x233a45[_0x17abbd(0x1d7)]();}catch(_0x591d2e){throw M(_0x591d2e);}}};function _0x490685(_0x449c6c){const _0x243f89=_0x39b952;let _0x8d5d86=_0x449c6c['instance'],_0x3bba7f=!0x1,_0x4e43d1,_0x57c303=!0x1;return{'key':_0x449c6c[_0x243f89(0x20a)],'unitId':_0x8d5d86['unitId'],'unitType':_0x8d5d86[_0x243f89(0x1b2)],async 'getState'(){const _0x3fe269=_0x243f89;return await _0x493232(_0x3fe269(0x1ef),async()=>await _0x8d5d86['getState']());},async 'getPendingMutations'(){const _0xe43be6=_0x243f89;return await _0x493232(_0xe43be6(0x1c1),async()=>await _0x8d5d86[_0xe43be6(0x22d)]());},async 'execute'(_0x1df187){const _0x4825d9=_0x243f89;return _0x1df187[_0x4825d9(0x221)]===_0x4825d9(0x20b)?await _0x493232(_0x4825d9(0x20b),async()=>await _0x8d5d86[_0x4825d9(0x216)](_0x1df187[_0x4825d9(0x1dc)])):await _0x493232('write',async()=>await _0x8d5d86[_0x4825d9(0x1dd)](_0x1df187[_0x4825d9(0x1dc)]));},async 'replacePendingMutations'(_0x96e65b){return await _0x493232('replace-mutations',async()=>await _0x8d5d86['replacePendingMutations'](_0x96e65b));},async 'fetch'(){const _0x188fa5=_0x243f89;return await _0x493232(_0x188fa5(0x1a1),async()=>await _0x8d5d86[_0x188fa5(0x1a1)]());},async 'pull'(){const _0x48988a=_0x243f89;return await _0x493232(_0x48988a(0x1bd),async()=>await _0x8d5d86[_0x48988a(0x1bd)]());},async 'commit'(){const _0x547c69=_0x243f89;return await _0x493232(_0x547c69(0x1b1),async()=>await _0x8d5d86[_0x547c69(0x1b1)]());},async 'exportUnitData'(){const _0x3d1bcc=_0x243f89;return await _0x493232(_0x3d1bcc(0x1bc),async()=>await _0x8d5d86[_0x3d1bcc(0x1f8)]());},async 'invalidate'(){_0x3bba7f||(_0x3bba7f=!0x0,await _0x449c6c['invalidate']());},async 'release'(){const _0x521543=_0x243f89;_0x3bba7f||(_0x3bba7f=!0x0,_0x57c303?await _0x449c6c[_0x521543(0x1ae)]():await _0x449c6c[_0x521543(0x1b5)]());}};async function _0x493232(_0xdf7897,_0x21b9e0){const _0xe24dd4=_0x243f89;_0x53ef36();try{return await _0x482576(_0x449c6c[_0xe24dd4(0x20a)],_0xdf7897,_0x21b9e0);}catch(_0x208350){throw _0x131e39(_0x208350),_0x208350;}}function _0x53ef36(){const _0x672125=_0x243f89;if(_0x3bba7f)throw new c(_0x672125(0x21f),_0x672125(0x1db)+_0x449c6c['key']+'\x20is\x20closed');if(_0x4e43d1)throw _0x4e43d1;}function _0x131e39(_0x3a3b62){const _0x11abeb=_0x243f89;(_0x3a3b62 instanceof c&&_0x3a3b62[_0x11abeb(0x202)]||_0x3a3b62 instanceof _0x33013f&&(_0x3a3b62[_0x11abeb(0x1dc)]==='COLLABORATION_PROTOCOL_ERROR'||_0x3a3b62['code']==='COLLABORATION_CLOSED'||_0x3a3b62[_0x11abeb(0x1dc)]==='COLLABORATION_LOAD_FAILED')||typeof _0x3a3b62=='object'&&_0x3a3b62&&_0x11abeb(0x202)in _0x3a3b62&&_0x3a3b62['invalidatesInstance']===!0x0)&&(_0x57c303=!0x0,_0x4e43d1=_0x3a3b62,_0x35ca01({'errorCode':N(_0x3a3b62),'key':_0x449c6c[_0x11abeb(0x20a)],'type':_0x11abeb(0x21b)}));}}async function _0x482576(_0x5c7a30,_0x7dd907,_0x7c135c){const _0xa54ce=_0x39b952;let _0xe82570=Date[_0xa54ce(0x1ea)](),_0x2bd7b9=await _0x7c135c();return _0x35ca01({'durationMs':Date[_0xa54ce(0x1ea)]()-_0xe82570,'key':_0x5c7a30,'operation':_0x7dd907,'type':_0xa54ce(0x1a6)}),_0x2bd7b9;}function _0x13cf47(_0x139e4a){_0x35ca01(_0x139e4a);}function _0x35ca01(_0x6d0e1a){const _0x356b98=_0x39b952;try{_0x257a44[_0x356b98(0x1d3)]?.(_0x6d0e1a);}catch{}}}function A(_0x31b657){const _0xeccdd8=_0x38413c;let _0x123f95=_0x31b657 instanceof URL?_0x31b657['href']:_0x31b657;if(_0x123f95[_0xeccdd8(0x1e5)]===0x0)throw new c(_0xeccdd8(0x213),_0xeccdd8(0x1b9));try{return new URL(_0x123f95)[_0xeccdd8(0x1f5)];}catch{throw new c(_0xeccdd8(0x213),'entry\x20must\x20be\x20an\x20absolute\x20file\x20URL\x20or\x20another\x20importable\x20URL');}}function j(_0x32a428,_0x13a156){const _0x140e28=_0x38413c;if(!Number[_0x140e28(0x1d0)](_0x32a428)||_0x32a428<=0x0)throw new c(_0x140e28(0x213),_0x13a156+_0x140e28(0x219));}function M(_0xb2bacb){const _0x43b78c=_0x38413c;return _0xb2bacb instanceof _0x2c54fc?new c(_0xb2bacb[_0x43b78c(0x1dc)]===_0x43b78c(0x1d8)?_0x43b78c(0x206):_0xb2bacb['code']==='INSTANCE_POOL_CLOSED'?_0x43b78c(0x1e8):_0x43b78c(0x213),_0xb2bacb[_0x43b78c(0x1be)],{'cause':_0xb2bacb}):_0xb2bacb;}function N(_0x45afbf){const _0x323fae=_0x38413c;return typeof _0x45afbf=='object'&&_0x45afbf&&'code'in _0x45afbf&&typeof _0x45afbf['code']==_0x323fae(0x1ff)?_0x45afbf[_0x323fae(0x1dc)]:'UNKNOWN';}function P(_0x1df8af){return _0x1df8af;}export{c as UniverCollaborationRuntimePoolError,k as createUniverCollaborationRuntimePool,P as defineUniverCollaborationRuntimeWorker};
@@ -0,0 +1 @@
1
+ const _0x485521=_0x3b6b;function _0x3b6b(_0x43e6f8,_0x3da3ba){_0x43e6f8=_0x43e6f8-0x124;const _0x511453=_0x5114();let _0x3b6bd8=_0x511453[_0x43e6f8];return _0x3b6bd8;}(function(_0x344bce,_0x9b081f){const _0x3ff87d=_0x3b6b,_0xe399e=_0x344bce();while(!![]){try{const _0x17138b=-parseInt(_0x3ff87d(0x13d))/0x1*(-parseInt(_0x3ff87d(0x151))/0x2)+parseInt(_0x3ff87d(0x14b))/0x3+parseInt(_0x3ff87d(0x127))/0x4+-parseInt(_0x3ff87d(0x13b))/0x5*(parseInt(_0x3ff87d(0x12d))/0x6)+-parseInt(_0x3ff87d(0x124))/0x7*(parseInt(_0x3ff87d(0x12f))/0x8)+parseInt(_0x3ff87d(0x12c))/0x9*(parseInt(_0x3ff87d(0x14c))/0xa)+-parseInt(_0x3ff87d(0x14d))/0xb;if(_0x17138b===_0x9b081f)break;else _0xe399e['push'](_0xe399e['shift']());}catch(_0x2345a1){_0xe399e['push'](_0xe399e['shift']());}}}(_0x5114,0xa4766));var e;process['on'](_0x485521(0x149),_0x3a5151=>{const _0x344ae7=_0x485521;a(_0x3a5151)&&t(_0x3a5151)[_0x344ae7(0x13c)](_0x2ee59e=>s({'id':_0x3a5151['id'],'result':_0x2ee59e,'type':'result'}),_0x1dbc1a=>s({'error':o(_0x1dbc1a,e?.[_0x344ae7(0x14f)]()[_0x344ae7(0x12b)]===_0x344ae7(0x14e)),'id':_0x3a5151['id'],'type':_0x344ae7(0x137)}));});async function t(_0x27e73f){const _0x1e30bc=_0x485521;if(_0x27e73f[_0x1e30bc(0x148)]===_0x1e30bc(0x128)){if(e!==void 0x0)throw Error(_0x1e30bc(0x126));let _0x490bcc=await import(_0x27e73f.entry);if(!i(_0x490bcc['default']))throw Error(_0x1e30bc(0x143));return e=await _0x490bcc['default'][_0x1e30bc(0x134)](_0x27e73f[_0x1e30bc(0x139)]),r(e);}if(_0x27e73f[_0x1e30bc(0x148)]===_0x1e30bc(0x138))return await e?.[_0x1e30bc(0x138)](),e=void 0x0,null;let _0x190bf7=n();return _0x27e73f[_0x1e30bc(0x148)]===_0x1e30bc(0x13e)?_0x190bf7[_0x1e30bc(0x14f)]():_0x27e73f['type']==='get-pending-mutations'?_0x190bf7['getPendingMutations']():_0x27e73f[_0x1e30bc(0x148)]===_0x1e30bc(0x125)?await _0x190bf7[_0x1e30bc(0x142)]({'code':_0x27e73f[_0x1e30bc(0x141)],'mode':_0x1e30bc(0x152)}):_0x27e73f['type']===_0x1e30bc(0x135)?await _0x190bf7[_0x1e30bc(0x142)]({'code':_0x27e73f[_0x1e30bc(0x141)],'mode':'write'}):_0x27e73f[_0x1e30bc(0x148)]===_0x1e30bc(0x144)?await _0x190bf7[_0x1e30bc(0x147)](_0x27e73f[_0x1e30bc(0x146)]):_0x27e73f[_0x1e30bc(0x148)]==='fetch'?await _0x190bf7['fetch']():_0x27e73f[_0x1e30bc(0x148)]==='pull'?await _0x190bf7[_0x1e30bc(0x12a)]():_0x27e73f[_0x1e30bc(0x148)]===_0x1e30bc(0x140)?await _0x190bf7[_0x1e30bc(0x140)]():await _0x190bf7['exportUnitData']();}function n(){const _0xd5fcd7=_0x485521;if(!e)throw Error(_0xd5fcd7(0x136));return e;}function r(_0x235f0e){const _0x548292=_0x485521;return{'unitId':_0x235f0e[_0x548292(0x132)],'unitType':_0x235f0e['unitType']};}function _0x5114(){const _0x5f390d=['message','name','2122227KoEShE','150vYndPZ','3916440fLDAZr','closed','getState','send','2978NHrIic','read','64232yDphkw','execute-read','Collaboration\x20worker\x20is\x20already\x20open','2128156fylXvU','open','connected','pull','connection','248679ZhyRQt','2067078DddAYd','boolean','744jvarba','string','retryable','unitId','isSafeInteger','createRuntime','execute-write','Collaboration\x20worker\x20is\x20not\x20open','error','close','init','stack','15ZvTtRo','then','848mHJQPZ','get-state','Error','commit','code','execute','Collaboration\x20worker\x20entry\x20must\x20default-export\x20a\x20worker\x20definition','replace-mutations','object','mutations','replacePendingMutations','type'];_0x5114=function(){return _0x5f390d;};return _0x5114();}function i(_0xe2d2f4){const _0x449159=_0x485521;return typeof _0xe2d2f4=='object'&&!!_0xe2d2f4&&'createRuntime'in _0xe2d2f4&&typeof _0xe2d2f4[_0x449159(0x134)]=='function';}function a(_0x1143ec){const _0x4522b5=_0x485521;return typeof _0x1143ec==_0x4522b5(0x145)&&!!_0x1143ec&&'id'in _0x1143ec&&Number[_0x4522b5(0x133)](_0x1143ec['id'])&&'type'in _0x1143ec&&typeof _0x1143ec[_0x4522b5(0x148)]==_0x4522b5(0x130);}function o(_0x323b7f,_0x41bcf3){const _0x4de646=_0x485521;if(!(_0x323b7f instanceof Error))return{'invalidatesInstance':_0x41bcf3,'message':String(_0x323b7f),'name':_0x4de646(0x13f)};let _0x36fffe=_0x323b7f;return{...typeof _0x36fffe[_0x4de646(0x141)]==_0x4de646(0x130)?{'code':_0x36fffe[_0x4de646(0x141)]}:{},..._0x41bcf3?{'invalidatesInstance':!0x0}:{},'message':_0x323b7f[_0x4de646(0x149)],'name':_0x323b7f[_0x4de646(0x14a)],...typeof _0x36fffe['retryable']==_0x4de646(0x12e)?{'retryable':_0x36fffe[_0x4de646(0x131)]}:{},..._0x323b7f[_0x4de646(0x13a)]===void 0x0?{}:{'stack':_0x323b7f['stack']}};}function s(_0xc31a6f){const _0x3163a7=_0x485521;process[_0x3163a7(0x129)]&&process[_0x3163a7(0x150)]?.(_0xc31a6f);}
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@univer-cli/univer-collaboration-runtime-pool",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.2",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.cjs"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "README.zh-CN.md"
19
+ ],
20
+ "dependencies": {
21
+ "@univer-cli/generic-keyed-instance-pool": "1.0.0-beta.2",
22
+ "@univer-cli/univer-collaboration-runtime": "1.0.0-beta.2",
23
+ "@univerjs/protocol": "1.0.0-beta.2"
24
+ }
25
+ }