@hybrid-compute/worker 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.22.0](https://github.com/phun-ky/hybrid-compute/compare/@hybrid-compute/worker@0.21.0...@hybrid-compute/worker@0.22.0) (2026-02-12)
4
+
5
+ ### Tasks
6
+
7
+ * 🤖 @hybrid-compute/core@0.22.0 ([c66124e](https://github.com/phun-ky/hybrid-compute/commit/c66124e504a419acd6b4eebbdb62b46ce1cc6644))
8
+ * 🤖 @hybrid-compute/local@0.22.0 ([44ddbae](https://github.com/phun-ky/hybrid-compute/commit/44ddbae654b152699d7376e6d559690e37a762e2))
9
+ * 🤖 @hybrid-compute/remote@0.22.0 ([113298f](https://github.com/phun-ky/hybrid-compute/commit/113298f268d2cab8006c7ddc8c5b3b09ba991cf9))
10
+ * 🤖 bump the major-updates group across 1 directory with 2 updates ([1f73fdb](https://github.com/phun-ky/hybrid-compute/commit/1f73fdb36f258af191f8c3b901dc9ff94d34b7bc))
11
+ * 🤖 bump the major-updates group across 1 directory with 3 updates ([e2defae](https://github.com/phun-ky/hybrid-compute/commit/e2defae02a5c1ffe49a3314eb26b453edb45d965))
12
+ * 🤖 Ensure that we can use trusted publishing ([8c1c34b](https://github.com/phun-ky/hybrid-compute/commit/8c1c34bf2db8fe172c10bf4066d0f4cd75c234e6))
13
+
14
+ ### Refactoring
15
+
16
+ * 💡 Replace glob with glob-bin ([98cc893](https://github.com/phun-ky/hybrid-compute/commit/98cc8932bee41bfdb7eb2b668b039def35867402))
17
+
18
+ ## [0.21.0](///compare/@hybrid-compute/worker@0.20.0...@hybrid-compute/worker@0.21.0) (2025-11-24)
19
+
3
20
  ## [0.20.0](https://github.com/phun-ky/hybrid-compute/compare/@hybrid-compute/worker@0.19.0...@hybrid-compute/worker@0.20.0) (2025-11-10)
4
21
 
5
22
  ### Tasks
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=worker.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.spec.d.ts","sourceRoot":"","sources":["../../src/__tests__/worker.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,110 @@
1
+ import test, { describe } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { createThreadedCompute, ThreadedCompute } from '..';
4
+ describe('ThreadedCompute', () => {
5
+ test('canRun returns true for registered task', () => {
6
+ const OriginalWorker = globalThis.Worker;
7
+ class MockWorker {
8
+ constructor(path, options) {
9
+ this.path = path;
10
+ this.options = options;
11
+ this.onmessage = null;
12
+ }
13
+ postMessage() { }
14
+ }
15
+ // @ts-expect-error allow override
16
+ globalThis.Worker = MockWorker;
17
+ try {
18
+ const threaded = new ThreadedCompute('mock-worker.js', ['foo', 'bar']);
19
+ assert.equal(threaded.canRun('foo'), true);
20
+ assert.equal(threaded.canRun('baz'), false);
21
+ }
22
+ finally {
23
+ globalThis.Worker = OriginalWorker;
24
+ }
25
+ });
26
+ test('runTask resolves with worker result', async () => {
27
+ const OriginalWorker = globalThis.Worker;
28
+ class MockWorker {
29
+ constructor(path, options) {
30
+ this.path = path;
31
+ this.options = options;
32
+ this.onmessage = null;
33
+ this.received = null;
34
+ }
35
+ postMessage(msg) {
36
+ this.received = msg;
37
+ setTimeout(() => {
38
+ this.onmessage?.({
39
+ data: {
40
+ id: msg.id,
41
+ result: `result-${msg.input}`
42
+ }
43
+ });
44
+ }, 10);
45
+ }
46
+ }
47
+ // @ts-expect-error override
48
+ globalThis.Worker = MockWorker;
49
+ try {
50
+ const compute = new ThreadedCompute('mock-worker.js', ['echo']);
51
+ const result = await compute.runTask('echo', 'ping');
52
+ assert.equal(result, 'result-ping');
53
+ }
54
+ finally {
55
+ globalThis.Worker = OriginalWorker;
56
+ }
57
+ });
58
+ test('runTask rejects with worker error', async () => {
59
+ const OriginalWorker = globalThis.Worker;
60
+ class MockWorker {
61
+ constructor(path, options) {
62
+ this.path = path;
63
+ this.options = options;
64
+ this.onmessage = null;
65
+ }
66
+ postMessage(msg) {
67
+ setTimeout(() => {
68
+ this.onmessage?.({
69
+ data: {
70
+ id: msg.id,
71
+ error: 'Something went wrong'
72
+ }
73
+ });
74
+ }, 10);
75
+ }
76
+ }
77
+ // @ts-expect-error override
78
+ globalThis.Worker = MockWorker;
79
+ try {
80
+ const compute = new ThreadedCompute('mock-worker.js', ['fail']);
81
+ await assert.rejects(() => compute.runTask('fail', 42), /Something went wrong/);
82
+ }
83
+ finally {
84
+ globalThis.Worker = OriginalWorker;
85
+ }
86
+ });
87
+ });
88
+ describe('createThreadedCompute', () => {
89
+ test('returns instance of ThreadedCompute', () => {
90
+ const OriginalWorker = globalThis.Worker;
91
+ class MockWorker {
92
+ constructor(path, options) {
93
+ this.path = path;
94
+ this.options = options;
95
+ this.onmessage = null;
96
+ }
97
+ postMessage() { }
98
+ }
99
+ // @ts-expect-error override
100
+ globalThis.Worker = MockWorker;
101
+ try {
102
+ const instance = createThreadedCompute('mock-worker.js', ['foo']);
103
+ assert.ok(instance instanceof ThreadedCompute);
104
+ }
105
+ finally {
106
+ globalThis.Worker = OriginalWorker;
107
+ }
108
+ });
109
+ });
110
+ //# sourceMappingURL=worker.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.spec.js","sourceRoot":"","sources":["../../src/__tests__/worker.spec.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,73 @@
1
+ import { ComputeBackendInterface } from '@hybrid-compute/core';
2
+ export * from './types.js';
3
+ /**
4
+ * `ThreadedCompute` is a compute backend that runs tasks in a dedicated Web Worker.
5
+ *
6
+ * It manages communication with the worker via `postMessage`, assigns unique task
7
+ * request IDs, and resolves results asynchronously. Tasks are registered by name
8
+ * during construction and mapped internally for availability checks.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const threaded = new ThreadedCompute(new URL('./worker.js', import.meta.url), ['add']);
13
+ *
14
+ * const result = await threaded.runTask<number, number>('add', 5);
15
+ * console.log(result); // Output from worker
16
+ * ```
17
+ *
18
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Worker
19
+ */
20
+ export declare class ThreadedCompute implements ComputeBackendInterface {
21
+ private worker;
22
+ private taskMap;
23
+ private callbacks;
24
+ private errors;
25
+ private nextId;
26
+ /**
27
+ * Constructs a new `ThreadedCompute` backend with a specified worker and list of available task names.
28
+ *
29
+ * @param workerPath - Path to the worker script (typically a URL via `import.meta.url`).
30
+ * @param taskNames - A list of task identifiers this worker is capable of executing.
31
+ */
32
+ constructor(workerPath: string, taskNames: string[]);
33
+ /**
34
+ * Checks whether the current worker is registered to handle a given task.
35
+ *
36
+ * @param taskName - The name of the task to check.
37
+ * @returns `true` if the task is supported, otherwise `false`.
38
+ */
39
+ canRun(taskName: string): boolean;
40
+ /**
41
+ * Runs a task inside the Web Worker.
42
+ *
43
+ * The task is assigned a unique ID and sent via `postMessage`. The result or error
44
+ * is resolved asynchronously when the worker responds.
45
+ *
46
+ * @typeParam Input - The input type for the task.
47
+ * @typeParam Output - The output type returned by the task.
48
+ *
49
+ * @param taskName - The name of the task to execute.
50
+ * @param input - The input payload for the task.
51
+ * @returns A Promise resolving to the task output.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const result = await threaded.runTask('square', 9); // 81
56
+ * ```
57
+ */
58
+ runTask<Input, Output>(taskName: string, input: Input): Promise<Output>;
59
+ }
60
+ /**
61
+ * Factory function to create a new `ThreadedCompute` backend.
62
+ *
63
+ * @param workerPath - The module worker file path (e.g. `new URL('./worker.js', import.meta.url)`).
64
+ * @param tasks - A list of supported task names this worker can execute.
65
+ * @returns A new `ThreadedCompute` instance.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const backend = createThreadedCompute(new URL('./worker.js', import.meta.url), ['resizeImage']);
70
+ * ```
71
+ */
72
+ export declare function createThreadedCompute(workerPath: string, tasks: string[]): ThreadedCompute;
73
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAO/D,cAAc,YAAY,CAAC;AAE3B;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,eAAgB,YAAW,uBAAuB;IAC7D,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAqB;IAIpC,OAAO,CAAC,SAAS,CAA2C;IAI5D,OAAO,CAAC,MAAM,CAAyC;IAEvD,OAAO,CAAC,MAAM,CAAK;IAEnB;;;;;OAKG;gBACS,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE;IAenD;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIjC;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;CAYxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,mBAExE"}
package/dist/index.js ADDED
@@ -0,0 +1,99 @@
1
+ export * from './types.js';
2
+ /**
3
+ * `ThreadedCompute` is a compute backend that runs tasks in a dedicated Web Worker.
4
+ *
5
+ * It manages communication with the worker via `postMessage`, assigns unique task
6
+ * request IDs, and resolves results asynchronously. Tasks are registered by name
7
+ * during construction and mapped internally for availability checks.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const threaded = new ThreadedCompute(new URL('./worker.js', import.meta.url), ['add']);
12
+ *
13
+ * const result = await threaded.runTask<number, number>('add', 5);
14
+ * console.log(result); // Output from worker
15
+ * ```
16
+ *
17
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Worker
18
+ */
19
+ export class ThreadedCompute {
20
+ /**
21
+ * Constructs a new `ThreadedCompute` backend with a specified worker and list of available task names.
22
+ *
23
+ * @param workerPath - Path to the worker script (typically a URL via `import.meta.url`).
24
+ * @param taskNames - A list of task identifiers this worker is capable of executing.
25
+ */
26
+ constructor(workerPath, taskNames) {
27
+ this.taskMap = new Set();
28
+ // Map of task response IDs to success callbacks
29
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
+ this.callbacks = new Map();
31
+ // Map of task response IDs to error callbacks
32
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
+ this.errors = new Map();
34
+ this.nextId = 1;
35
+ this.worker = new Worker(workerPath, { type: 'module' });
36
+ this.taskMap = new Set(taskNames);
37
+ this.worker.onmessage = (e) => {
38
+ const { id, result, error } = e.data;
39
+ if (error)
40
+ this.errors.get(id)?.(error);
41
+ else
42
+ this.callbacks.get(id)?.(result);
43
+ this.callbacks.delete(id);
44
+ this.errors.delete(id);
45
+ };
46
+ }
47
+ /**
48
+ * Checks whether the current worker is registered to handle a given task.
49
+ *
50
+ * @param taskName - The name of the task to check.
51
+ * @returns `true` if the task is supported, otherwise `false`.
52
+ */
53
+ canRun(taskName) {
54
+ return this.taskMap.has(taskName);
55
+ }
56
+ /**
57
+ * Runs a task inside the Web Worker.
58
+ *
59
+ * The task is assigned a unique ID and sent via `postMessage`. The result or error
60
+ * is resolved asynchronously when the worker responds.
61
+ *
62
+ * @typeParam Input - The input type for the task.
63
+ * @typeParam Output - The output type returned by the task.
64
+ *
65
+ * @param taskName - The name of the task to execute.
66
+ * @param input - The input payload for the task.
67
+ * @returns A Promise resolving to the task output.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * const result = await threaded.runTask('square', 9); // 81
72
+ * ```
73
+ */
74
+ runTask(taskName, input) {
75
+ return new Promise((resolve, reject) => {
76
+ const id = this.nextId++;
77
+ this.callbacks.set(id, resolve);
78
+ this.errors.set(id, reject);
79
+ const message = { task: taskName, input, id };
80
+ this.worker.postMessage(message);
81
+ });
82
+ }
83
+ }
84
+ /**
85
+ * Factory function to create a new `ThreadedCompute` backend.
86
+ *
87
+ * @param workerPath - The module worker file path (e.g. `new URL('./worker.js', import.meta.url)`).
88
+ * @param tasks - A list of supported task names this worker can execute.
89
+ * @returns A new `ThreadedCompute` instance.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * const backend = createThreadedCompute(new URL('./worker.js', import.meta.url), ['resizeImage']);
94
+ * ```
95
+ */
96
+ export function createThreadedCompute(workerPath, tasks) {
97
+ return new ThreadedCompute(workerPath, tasks);
98
+ }
99
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,cAAc,YAAY,CAAC;AAE3B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,eAAe;IAc1B;;;;;OAKG;IACH,YAAY,UAAkB,EAAE,SAAmB;QAlB3C,YAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QAEpC,gDAAgD;QAChD,8DAA8D;QACtD,cAAS,GAAG,IAAI,GAAG,EAAgC,CAAC;QAE5D,8CAA8C;QAC9C,8DAA8D;QACtD,WAAM,GAAG,IAAI,GAAG,EAA8B,CAAC;QAE/C,WAAM,GAAG,CAAC,CAAC;QASjB,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;QAElC,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAA6C,EAAE,EAAE;YACxE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC;YAErC,IAAI,KAAK;gBAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;;gBACnC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;YAEtC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACzB,CAAC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,QAAgB;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAgB,QAAgB,EAAE,KAAY;QACnD,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC7C,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YAEzB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;YAChC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;YAE5B,MAAM,OAAO,GAA+B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;YAE1E,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAkB,EAAE,KAAe;IACvE,OAAO,IAAI,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * The message format sent from the main thread to a Web Worker when executing a task.
3
+ *
4
+ * This message includes a task name, its input payload, and a unique ID used to match
5
+ * the response from the worker.
6
+ *
7
+ * @property task - The name of the task to be executed in the worker.
8
+ * @property input - The input data for the task. This can be any JSON-serializable value.
9
+ * @property id - A unique identifier for correlating the response message.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const message: WorkerTaskMessageInterface = {
14
+ * task: 'double',
15
+ * input: 21,
16
+ * id: 1
17
+ * };
18
+ * worker.postMessage(message);
19
+ * ```
20
+ */
21
+ export interface WorkerTaskMessageInterface {
22
+ task: string;
23
+ input: any;
24
+ id: number;
25
+ }
26
+ /**
27
+ * The message format sent from a Web Worker back to the main thread upon task completion.
28
+ *
29
+ * This message includes the result of the task execution or an error message if the task failed.
30
+ *
31
+ * @property id - The unique identifier that matches a previously sent task message.
32
+ * @property result - The result of the task execution (if successful).
33
+ * @property error - An optional error message if the task failed.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const response: WorkerResultMessageInterface = {
38
+ * id: 1,
39
+ * result: 42
40
+ * };
41
+ * postMessage(response);
42
+ * ```
43
+ *
44
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers
45
+ */
46
+ export interface WorkerResultMessageInterface {
47
+ id: number;
48
+ result: any;
49
+ error?: string;
50
+ }
51
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,GAAG,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,CAAC;IAEX,MAAM,EAAE,GAAG,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybrid-compute/worker",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "description": "Threaded compute backend for executing tasks in Web Workers.",
5
5
  "keywords": [
6
6
  "web-worker",
@@ -32,10 +32,10 @@
32
32
  "release": "release-it",
33
33
  "test": "tsx --test **/__tests__/**/*.spec.ts",
34
34
  "pretest:ci": "rm -rf coverage && mkdir -p coverage",
35
- "test:ci": "glob -c \"node --import tsx --test --no-warnings --experimental-test-coverage --test-reporter=cobertura --test-reporter-destination=coverage/cobertura-coverage.xml --test-reporter=spec --test-reporter-destination=stdout\" \"**/__tests__/**/*.spec.ts\""
35
+ "test:ci": "glob-bin -c \"node --import tsx --test --no-warnings --experimental-test-coverage --test-reporter=cobertura --test-reporter-destination=coverage/cobertura-coverage.xml --test-reporter=spec --test-reporter-destination=stdout\" \"**/__tests__/**/*.spec.ts\""
36
36
  },
37
37
  "dependencies": {
38
- "@hybrid-compute/core": "0.20.0"
38
+ "@hybrid-compute/core": "0.22.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "eslint": "^9.27.0",
@@ -0,0 +1 @@
1
+ {"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../core/dist/types.d.ts","../core/dist/index.d.ts","./src/types.ts","./src/index.ts","./src/__tests__/worker.spec.ts","../../node_modules/@types/ms/index.d.ts","../../node_modules/@types/debug/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/unist/index.d.ts","../../node_modules/@types/hast/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/mdast/index.d.ts","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/@types/node/buffer.buffer.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../node_modules/@types/node/web-globals/domexception.d.ts","../../node_modules/@types/node/web-globals/events.d.ts","../../node_modules/undici-types/header.d.ts","../../node_modules/undici-types/readable.d.ts","../../node_modules/undici-types/file.d.ts","../../node_modules/undici-types/fetch.d.ts","../../node_modules/undici-types/formdata.d.ts","../../node_modules/undici-types/connector.d.ts","../../node_modules/undici-types/client.d.ts","../../node_modules/undici-types/errors.d.ts","../../node_modules/undici-types/dispatcher.d.ts","../../node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/undici-types/global-origin.d.ts","../../node_modules/undici-types/pool-stats.d.ts","../../node_modules/undici-types/pool.d.ts","../../node_modules/undici-types/handlers.d.ts","../../node_modules/undici-types/balanced-pool.d.ts","../../node_modules/undici-types/agent.d.ts","../../node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/undici-types/mock-agent.d.ts","../../node_modules/undici-types/mock-client.d.ts","../../node_modules/undici-types/mock-pool.d.ts","../../node_modules/undici-types/mock-errors.d.ts","../../node_modules/undici-types/proxy-agent.d.ts","../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/undici-types/retry-handler.d.ts","../../node_modules/undici-types/retry-agent.d.ts","../../node_modules/undici-types/api.d.ts","../../node_modules/undici-types/interceptors.d.ts","../../node_modules/undici-types/util.d.ts","../../node_modules/undici-types/cookies.d.ts","../../node_modules/undici-types/patch.d.ts","../../node_modules/undici-types/websocket.d.ts","../../node_modules/undici-types/eventsource.d.ts","../../node_modules/undici-types/filereader.d.ts","../../node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/undici-types/content-type.d.ts","../../node_modules/undici-types/cache.d.ts","../../node_modules/undici-types/index.d.ts","../../node_modules/@types/node/web-globals/fetch.d.ts","../../node_modules/@types/node/web-globals/navigator.d.ts","../../node_modules/@types/node/web-globals/storage.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/inspector.generated.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/sqlite.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts","../../node_modules/@types/parse-path/index.d.ts","../../node_modules/@types/ungap__structured-clone/index.d.ts"],"fileIdsList":[[52,65,113,130,131],[65,113,130,131],[55,65,113,130,131],[65,110,111,113,130,131],[65,112,113,130,131],[113,130,131],[65,113,118,130,131,148],[65,113,114,119,124,130,131,133,145,156],[65,113,114,115,124,130,131,133],[60,61,62,65,113,130,131],[65,113,116,130,131,157],[65,113,117,118,125,130,131,134],[65,113,118,130,131,145,153],[65,113,119,121,124,130,131,133],[65,112,113,120,130,131],[65,113,121,122,130,131],[65,113,123,124,130,131],[65,112,113,124,130,131],[65,113,124,125,126,130,131,145,156],[65,113,124,125,126,130,131,140,145,148],[65,106,113,121,124,127,130,131,133,145,156],[65,113,124,125,127,128,130,131,133,145,153,156],[65,113,127,129,130,131,145,153,156],[63,64,65,66,67,68,69,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162],[65,113,124,130,131],[65,113,130,131,132,156],[65,113,121,124,130,131,133,145],[65,113,130,131,134],[65,113,130,131,135],[65,112,113,130,131,136],[65,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162],[65,113,130,131,138],[65,113,130,131,139],[65,113,124,130,131,140,141],[65,113,130,131,140,142,157,159],[65,113,125,130,131],[65,113,124,130,131,145,146,148],[65,113,130,131,147,148],[65,113,130,131,145,146],[65,113,130,131,148],[65,113,130,131,149],[65,110,113,130,131,145,150,156],[65,113,124,130,131,151,152],[65,113,130,131,151,152],[65,113,118,130,131,133,145,153],[65,113,130,131,154],[65,113,130,131,133,155],[65,113,127,130,131,139,156],[65,113,118,130,131,157],[65,113,130,131,145,158],[65,113,130,131,132,159],[65,113,130,131,160],[65,106,113,130,131],[65,106,113,124,126,130,131,136,145,148,156,158,159,161],[65,113,130,131,145,162],[65,78,82,113,130,131,156],[65,78,113,130,131,145,156],[65,73,113,130,131],[65,75,78,113,130,131,153,156],[65,113,130,131,133,153],[65,113,130,131,163],[65,73,113,130,131,163],[65,75,78,113,130,131,133,156],[65,70,71,74,77,113,124,130,131,145,156],[65,78,85,113,130,131],[65,70,76,113,130,131],[65,78,99,100,113,130,131],[65,74,78,113,130,131,148,156,163],[65,99,113,130,131,163],[65,72,73,113,130,131,163],[65,78,113,130,131],[65,72,73,74,75,76,77,78,79,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,100,101,102,103,104,105,113,130,131],[65,78,93,113,130,131],[65,78,85,86,113,130,131],[65,76,78,86,87,113,130,131],[65,77,113,130,131],[65,70,73,78,113,130,131],[65,78,82,86,87,113,130,131],[65,82,113,130,131],[65,76,78,81,113,130,131,156],[65,70,75,78,85,113,130,131],[65,113,130,131,145],[65,73,78,99,113,130,131,161,163],[47,65,113,130,131],[50,65,111,113,130,131,150],[48,49,65,113,130,131]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"7e0a39d7e9bd71bc245d45bef20fb3e8f9aeef8fff85144e7e49ffff376d2a65","2bd8e387a34aaa8d553144408e70c8eb2fa3882a82efb788c633b83dc1cb8141",{"version":"d9f7db2deb8a9e8d3468ea599c9f780f5bb03468f6c7e2d0cf32df8821a25066","signature":"29976c88c27feb44346c1cf8fc247e25a32513a612b0091c404711cda77341c7"},{"version":"8cf8527ddc51431f5346038d559d6dc4b57b2c683883d14fcbe4395eabb4609a","signature":"b816ce1229ca92ef27a7445c5057d3687fc4e05e2ec0e3c9b622b9945eb7cf6a"},{"version":"da1a825f7321536da0fcab03ff405d445c3097bb9d9afda546df4c9833160193","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1},{"version":"89121c1bf2990f5219bfd802a3e7fc557de447c62058d6af68d6b6348d64499a","impliedFormat":1},{"version":"79b4369233a12c6fa4a07301ecb7085802c98f3a77cf9ab97eee27e1656f82e6","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","impliedFormat":1},{"version":"d4a22007b481fe2a2e6bfd3a42c00cd62d41edb36d30fc4697df2692e9891fc8","impliedFormat":1},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"f949f7f6c7802a338039cfc2156d1fe285cdd1e092c64437ebe15ae8edc854e0","impliedFormat":1},{"version":"6b4e081d55ac24fc8a4631d5dd77fe249fa25900abd7d046abb87d90e3b45645","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"83e63d6ccf8ec004a3bb6d58b9bb0104f60e002754b1e968024b320730cc5311","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"d2bc7425ef40526650d6db7e072c1ff4a51101c3ac2cc4b666623b19496a6e27","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"f27524f4bef4b6519c604bdb23bf4465bddcccbf3f003abb901acbd0d7404d99","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"6b039f55681caaf111d5eb84d292b9bee9e0131d0db1ad0871eef0964f533c73","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"0dba70b3fb0dcd713fda33c2df64fa6751fff6460e536971cee917260fb17882","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"9f663c2f91127ef7024e8ca4b3b4383ff2770e5f826696005de382282794b127","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1},{"version":"22293bd6fa12747929f8dfca3ec1684a3fe08638aa18023dd286ab337e88a592","impliedFormat":1},{"version":"e72bcd16c134dae5a840b1d5d0e8b87e1d07fbbff01d66e9a7b913da3cd39b8e","impliedFormat":1},{"version":"4c9dd88817e91f98e93c3445102dd3671748c8c523a5b3ba01c5b65af0db07e2","impliedFormat":1}],"root":[[49,51]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":99,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7},"referencedMap":[[53,1],[54,2],[56,3],[57,2],[58,2],[59,3],[52,2],[110,4],[111,4],[112,5],[65,6],[113,7],[114,8],[115,9],[60,2],[63,10],[61,2],[62,2],[116,11],[117,12],[118,13],[119,14],[120,15],[121,16],[122,16],[123,17],[124,18],[125,19],[126,20],[66,2],[64,2],[127,21],[128,22],[129,23],[163,24],[130,25],[131,2],[132,26],[133,27],[134,28],[135,29],[136,30],[137,31],[138,32],[139,33],[140,34],[141,34],[142,35],[143,2],[144,36],[145,37],[147,38],[146,39],[148,40],[149,41],[150,42],[151,43],[152,44],[153,45],[154,46],[155,47],[156,48],[157,49],[158,50],[159,51],[160,52],[67,2],[68,2],[69,2],[107,53],[108,2],[109,2],[161,54],[162,55],[164,2],[165,2],[166,2],[55,2],[45,2],[46,2],[8,2],[10,2],[9,2],[2,2],[11,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[3,2],[19,2],[20,2],[4,2],[21,2],[25,2],[22,2],[23,2],[24,2],[26,2],[27,2],[28,2],[5,2],[29,2],[30,2],[31,2],[32,2],[6,2],[36,2],[33,2],[34,2],[35,2],[37,2],[7,2],[38,2],[43,2],[44,2],[39,2],[40,2],[41,2],[42,2],[1,2],[85,56],[95,57],[84,56],[105,58],[76,59],[75,60],[104,61],[98,62],[103,63],[78,64],[92,65],[77,66],[101,67],[73,68],[72,61],[102,69],[74,70],[79,71],[80,2],[83,71],[70,2],[106,72],[96,73],[87,74],[88,75],[90,76],[86,77],[89,78],[99,61],[81,79],[82,80],[91,81],[71,82],[94,73],[93,71],[97,2],[100,83],[48,84],[47,2],[51,85],[50,86],[49,2]],"latestChangedDtsFile":"./dist/__tests__/worker.spec.d.ts","version":"5.9.3"}