@pumped-fn/core-next 0.5.39 → 0.5.41

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
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.5.41](https://github.com/pumped-fn/pumped-fn/compare/@pumped-fn/next@0.5.39...@pumped-fn/next@0.5.41) (2025-05-23)
6
+
7
+
8
+ ### Features
9
+
10
+ * added preset to scope, now preset can be used to test ([f501c68](https://github.com/pumped-fn/pumped-fn/commit/f501c68588402624c545649c7da51ecbd502875f))
11
+ * removed reset API ([36c5e77](https://github.com/pumped-fn/pumped-fn/commit/36c5e774073b7a94573cebbe7a82a88f64e7a384))
12
+
13
+ ## [0.5.40](https://github.com/pumped-fn/pumped-fn/compare/@pumped-fn/next@0.5.39...@pumped-fn/next@0.5.40) (2025-05-19)
14
+
15
+
16
+ ### Features
17
+
18
+ * added preset to scope, now preset can be used to test ([f501c68](https://github.com/pumped-fn/pumped-fn/commit/f501c68588402624c545649c7da51ecbd502875f))
19
+
5
20
  ## [0.5.39](https://github.com/pumped-fn/pumped-fn/compare/@pumped-fn/next@0.5.38...@pumped-fn/next@0.5.39) (2025-05-15)
6
21
 
7
22
 
package/README.md CHANGED
@@ -1,14 +1,81 @@
1
1
  # Pumped fn
2
2
 
3
- A function on steroid. A practical library to provide multiple much needed orchestration for any application (frontend or backend)
3
+ Minimal set of library providing functional encapsulation.
4
4
 
5
- # Quick start
5
+ # Usages
6
+ - Assume all of those functions are from `@pumped-fn/core-next`
7
+ - Operator are all directly exported from the package
8
+ - Always try to infer instead of explicit declaration
9
+
10
+ ## Container and resolver
11
+ Fns helps you create multiple containers. Those are lazy by default and will only resolve via a scope
12
+
13
+ A scope is a simple facility created using `createScope`
14
+
15
+ ## Scope
16
+
17
+ - `scope#resolve(executor)` will resolve to a `Promise<value>`
18
+ - `scope#accessor(executor)` will return a Core.Accessor which can help to `get`, `resolve`, `lookup` or `subscribe`
19
+
20
+ ## Executor
21
+ Executor is the container. Executor has certain methods letting you declare its as dependencies in a various way
22
+ - as it is, will return the value, without being interactive
23
+ - reactive, will return the accessor, and resolve the value if it's yet resolved
24
+ - lazy, will return the accessor, without resolving it
25
+ - static, will resolve to the value
26
+
27
+ ## Usage
6
28
 
7
29
  ```typescript
8
- import { createScope, provide, derive } from "@pumped-fn/core-next"
30
+ const counter = provide(() => 0) // Core.Executor<number>
31
+
32
+ // different usage of derive, look at the argument of the callback
33
+ const derivedValue = derive(counter, (counter) => { /* code */ })
34
+ const derivedValue = derive({ counter }, ({ counter }) => { /* code */ })
35
+ const derivedValue = derive([counter], ([counter]) => { /* code */ })
36
+ ```
37
+
38
+ ```typescript
39
+ // container can also be reactive, the factory function will be recalled as those dependencies change
40
+
41
+ const derivedValue = derive(counter.reactive, (counter) => /* this code will be called whenever counter got updated */)
9
42
 
10
- const logLevel = provide(() => "debug")
11
- const logger = derive(logLevel, () => )
43
+ // to update counter
44
+ scope.update(counter, /* new value */)
45
+ ```
46
+
47
+ ```typescript
48
+ // life cycle. The cleanup will be called on [scope dispose], [or resource update], [or resource being released]
49
+ const derivedValue = derive(counter.reactive, (counter, controller) => {
50
+ // create resource ...
51
+ controller.cleanup(() => { /* cleanup code */ })
52
+
53
+ return resource
54
+ })
55
+
56
+ // to release
57
+ scope.release(derivedValue)
58
+
59
+ // or be released as the dependency released
60
+ scope.release(counter)
61
+ ```
62
+
63
+ ## Meta
64
+
65
+ Meta are decorative information to the executor. Meta uses StandardSchema (zod, valibot, arktype etc) to enforce typing. `custom` is included within the library, it doesn't do any validation
66
+
67
+ ```typescript
68
+ // adding debug name
69
+ const debugName = meta('debug', custom<string>())
12
70
 
71
+ const counter = provide(() => 0, debugName('counter'))
13
72
 
73
+ // then meta can be accessed using accessor
74
+ const derivedCounter = derive(counter.static, counter => {
75
+ counter.metas // would give you access to the given meta
76
+ // or
77
+ debugName.find(counter) // should give you 'counter' | undefined
78
+ // or
79
+ debugName.get(counter) // will throw error if no value found
80
+ })
14
81
  ```
package/dist/index.d.ts CHANGED
@@ -1,152 +1,171 @@
1
+ //#region src/types.d.ts
1
2
  declare const executorSymbol: unique symbol;
2
3
  declare const metaSymbol: unique symbol;
3
4
  interface StandardSchemaV1<Input = unknown, Output = Input> {
4
- readonly "~standard": StandardSchemaV1.Props<Input, Output>;
5
+ readonly "~standard": StandardSchemaV1.Props<Input, Output>;
5
6
  }
6
7
  declare namespace StandardSchemaV1 {
7
- interface Props<Input = unknown, Output = Input> {
8
- readonly version: 1;
9
- readonly vendor: string;
10
- readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
11
- readonly types?: Types<Input, Output> | undefined;
12
- }
13
- type Result<Output> = SuccessResult<Output> | FailureResult;
14
- interface SuccessResult<Output> {
15
- readonly value: Output;
16
- readonly issues?: undefined;
17
- }
18
- interface FailureResult {
19
- readonly issues: ReadonlyArray<Issue>;
20
- }
21
- interface Issue {
22
- readonly message: string;
23
- readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
24
- }
25
- interface PathSegment {
26
- readonly key: PropertyKey;
27
- }
28
- interface Types<Input = unknown, Output = Input> {
29
- readonly input: Input;
30
- readonly output: Output;
31
- }
32
- type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
33
- type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
8
+ export interface Props<Input = unknown, Output = Input> {
9
+ readonly version: 1;
10
+ readonly vendor: string;
11
+ readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
12
+ readonly types?: Types<Input, Output> | undefined;
13
+ }
14
+ export type Result<Output> = SuccessResult<Output> | FailureResult;
15
+ export interface SuccessResult<Output> {
16
+ readonly value: Output;
17
+ readonly issues?: undefined;
18
+ }
19
+ export interface FailureResult {
20
+ readonly issues: ReadonlyArray<Issue>;
21
+ }
22
+ export interface Issue {
23
+ readonly message: string;
24
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
25
+ }
26
+ export interface PathSegment {
27
+ readonly key: PropertyKey;
28
+ }
29
+ export interface Types<Input = unknown, Output = Input> {
30
+ readonly input: Input;
31
+ readonly output: Output;
32
+ }
33
+ export type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
34
+ export type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
34
35
  }
35
36
  declare class SchemaError extends Error {
36
- readonly issues: ReadonlyArray<StandardSchemaV1.Issue>;
37
- constructor(issues: ReadonlyArray<StandardSchemaV1.Issue>);
37
+ readonly issues: ReadonlyArray<StandardSchemaV1.Issue>;
38
+ constructor(issues: ReadonlyArray<StandardSchemaV1.Issue>);
38
39
  }
39
40
  declare namespace Meta {
40
- interface MetaContainer {
41
- metas: Meta[] | undefined;
42
- }
43
- interface Meta<V = unknown> {
44
- readonly [metaSymbol]: true;
45
- readonly key: string | symbol;
46
- readonly schema: StandardSchemaV1<V>;
47
- readonly value: V;
48
- }
49
- interface MetaFn<V> {
50
- (value: V): Meta<V>;
51
- readonly key: string | symbol;
52
- partial: <D extends Partial<V>>(d: D) => D;
53
- some: (source: MetaContainer | Meta[] | undefined) => V[];
54
- find: (source: MetaContainer | Meta[] | undefined) => V | undefined;
55
- get: (source: MetaContainer | Meta[] | undefined) => V;
56
- }
41
+ export interface MetaContainer {
42
+ metas: Meta[] | undefined;
43
+ }
44
+ export interface Meta<V = unknown> {
45
+ readonly [metaSymbol]: true;
46
+ readonly key: string | symbol;
47
+ readonly schema: StandardSchemaV1<V>;
48
+ readonly value: V;
49
+ }
50
+ export interface MetaFn<V> {
51
+ (value: V): Meta<V>;
52
+ readonly key: string | symbol;
53
+ partial: <D extends Partial<V>>(d: D) => D;
54
+ some: (source: MetaContainer | Meta[] | undefined) => V[];
55
+ find: (source: MetaContainer | Meta[] | undefined) => V | undefined;
56
+ get: (source: MetaContainer | Meta[] | undefined) => V;
57
+ }
57
58
  }
58
59
  declare namespace Core {
59
- type Output<T> = T | Promise<T>;
60
- type NoDependencyFn<T> = (scope: Controller) => Output<T>;
61
- type DependentFn<T, D> = (dependencies: D, scope: Controller) => Output<T>;
62
- type RecordLike = Record<string, unknown>;
63
- type UExecutor = BaseExecutor<unknown>;
64
- type Cleanup = () => void | Promise<void>;
65
- type Controller = {
66
- cleanup: (cleanup: Cleanup) => void;
67
- release: () => Promise<void>;
68
- scope: Scope;
69
- };
70
- type Kind = "main" | "reactive" | "lazy" | "static";
71
- interface BaseExecutor<T> extends Meta.MetaContainer {
72
- [executorSymbol]: Kind;
73
- factory: NoDependencyFn<T> | DependentFn<T, unknown> | undefined;
74
- dependencies: undefined | UExecutor | Array<UExecutor> | Record<string, UExecutor>;
75
- }
76
- interface Executor<T> extends BaseExecutor<T> {
77
- [executorSymbol]: "main";
78
- factory: NoDependencyFn<T> | DependentFn<T, unknown>;
79
- /** Return an executor controller without resolving Executor */
80
- readonly lazy: Lazy<T>;
81
- /** Return an resolved executor, and mark the user to be reactived for future changes */
82
- readonly reactive: Reactive<T>;
83
- /** Return an resolved executor with its controller */
84
- readonly static: Static<T>;
85
- }
86
- interface Reactive<T> extends BaseExecutor<T> {
87
- [executorSymbol]: "reactive";
88
- factory: undefined;
89
- readonly executor: Executor<T>;
90
- }
91
- interface Lazy<T> extends BaseExecutor<Accessor<T>> {
92
- [executorSymbol]: "lazy";
93
- factory: undefined;
94
- readonly executor: Executor<T>;
95
- }
96
- interface Static<T> extends BaseExecutor<Accessor<T>> {
97
- [executorSymbol]: "static";
98
- factory: undefined;
99
- readonly executor: Executor<T>;
100
- }
101
- interface Accessor<T> extends Meta.MetaContainer {
102
- lookup(): T;
103
- get(): T;
104
- resolve(force?: boolean): Promise<T>;
105
- release(soft?: boolean): Promise<void>;
106
- update(updateFn: T | ((current: T) => T)): Promise<void>;
107
- subscribe(callback: (value: T) => void): Cleanup;
108
- }
109
- type InferOutput<T> = T extends Executor<infer U> | Reactive<infer U> ? Awaited<U> : T extends Lazy<infer U> | Static<infer U> ? Accessor<Awaited<U>> : never;
110
- interface Scope {
111
- accessor<T>(executor: Core.Executor<T>, eager?: boolean): Accessor<T>;
112
- resolve<T>(executor: Core.Executor<T>): Promise<T>;
113
- resolveAccessor<T>(executor: Core.Executor<T>): Promise<Accessor<T>>;
114
- update<T>(executor: Executor<T>, updateFn: T | ((current: T) => T)): Promise<void>;
115
- reset<T>(executor: Executor<T>): void;
116
- release(executor: Executor<any>, soft?: boolean): Promise<void>;
117
- dispose(): Promise<void>;
118
- onUpdate<T>(executor: Executor<T>, callback: (accessor: Accessor<T>) => void): Cleanup;
119
- }
60
+ export type Output<T> = T | Promise<T>;
61
+ export type NoDependencyFn<T> = (scope: Controller) => Output<T>;
62
+ export type DependentFn<T, D> = (dependencies: D, scope: Controller) => Output<T>;
63
+ export type RecordLike = Record<string, unknown>;
64
+ export type UExecutor = BaseExecutor<unknown>;
65
+ export type Cleanup = () => void | Promise<void>;
66
+ export type Controller = {
67
+ cleanup: (cleanup: Cleanup) => void;
68
+ release: () => Promise<void>;
69
+ scope: Scope;
70
+ };
71
+ export type Kind = "main" | "reactive" | "lazy" | "static";
72
+ export interface BaseExecutor<T> extends Meta.MetaContainer {
73
+ [executorSymbol]: Kind;
74
+ factory: NoDependencyFn<T> | DependentFn<T, unknown> | undefined;
75
+ dependencies: undefined | UExecutor | Array<UExecutor> | Record<string, UExecutor>;
76
+ }
77
+ export interface Executor<T> extends BaseExecutor<T> {
78
+ [executorSymbol]: "main";
79
+ factory: NoDependencyFn<T> | DependentFn<T, unknown>;
80
+ /** Return an executor controller without resolving Executor */
81
+ readonly lazy: Lazy<T>;
82
+ /** Return an resolved executor, and mark the user to be reactived for future changes */
83
+ readonly reactive: Reactive<T>;
84
+ /** Return an resolved executor with its controller */
85
+ readonly static: Static<T>;
86
+ }
87
+ export interface Reactive<T> extends BaseExecutor<T> {
88
+ [executorSymbol]: "reactive";
89
+ factory: undefined;
90
+ readonly executor: Executor<T>;
91
+ }
92
+ export interface Lazy<T> extends BaseExecutor<Accessor<T>> {
93
+ [executorSymbol]: "lazy";
94
+ factory: undefined;
95
+ readonly executor: Executor<T>;
96
+ }
97
+ export interface Static<T> extends BaseExecutor<Accessor<T>> {
98
+ [executorSymbol]: "static";
99
+ factory: undefined;
100
+ readonly executor: Executor<T>;
101
+ }
102
+ export type PendingState<T> = {
103
+ kind: "pending";
104
+ promise: Promise<T>;
105
+ };
106
+ export type ResolvedState<T> = {
107
+ kind: "resolved";
108
+ value: T;
109
+ };
110
+ export type RejectedState = {
111
+ kind: "rejected";
112
+ error: unknown;
113
+ };
114
+ export type ResolveState<T> = PendingState<T> | ResolvedState<T> | RejectedState;
115
+ export interface Accessor<T> extends Meta.MetaContainer {
116
+ lookup(): undefined | ResolveState<T>;
117
+ get(): T;
118
+ resolve(force?: boolean): Promise<T>;
119
+ release(soft?: boolean): Promise<void>;
120
+ update(updateFn: T | ((current: T) => T)): Promise<void>;
121
+ subscribe(callback: (value: T) => void): Cleanup;
122
+ }
123
+ export interface Preset<T> {
124
+ [executorSymbol]: "preset";
125
+ executor: Executor<T>;
126
+ value: T;
127
+ }
128
+ export type InferOutput<T> = T extends Executor<infer U> | Reactive<infer U> ? Awaited<U> : T extends Lazy<infer U> | Static<infer U> ? Accessor<Awaited<U>> : never;
129
+ export interface Scope {
130
+ accessor<T>(executor: Core.Executor<T>, eager?: boolean): Accessor<T>;
131
+ resolve<T>(executor: Core.Executor<T>): Promise<T>;
132
+ resolveAccessor<T>(executor: Core.Executor<T>): Promise<Accessor<T>>;
133
+ update<T>(executor: Executor<T>, updateFn: T | ((current: T) => T)): Promise<void>;
134
+ release(executor: Executor<any>, soft?: boolean): Promise<void>;
135
+ dispose(): Promise<void>;
136
+ onUpdate<T>(executor: Executor<T>, callback: (accessor: Accessor<T>) => void): Cleanup;
137
+ }
120
138
  }
121
139
 
140
+ //#endregion
141
+ //#region src/executor.d.ts
122
142
  declare function isLazyExecutor(executor: Core.BaseExecutor<unknown>): executor is Core.Lazy<unknown>;
123
143
  declare function isReactiveExecutor(executor: Core.BaseExecutor<unknown>): executor is Core.Reactive<unknown>;
124
144
  declare function isStaticExecutor(executor: Core.BaseExecutor<unknown>): executor is Core.Static<unknown>;
145
+ declare function isMainExecutor(executor: unknown): executor is Core.Executor<unknown>;
125
146
  declare function isExecutor<T>(input: unknown): input is Core.BaseExecutor<T>;
126
147
  declare function provide<T>(factory: Core.NoDependencyFn<T>, ...metas: Meta.Meta[]): Core.Executor<T>;
127
148
  declare function derive<T, D extends Core.BaseExecutor<unknown>>(dependencies: D, factory: Core.DependentFn<T, Core.InferOutput<D>>, ...metas: Meta.Meta[]): Core.Executor<T>;
128
- declare function derive<T, D extends ReadonlyArray<Core.BaseExecutor<unknown>> | Record<string, Core.BaseExecutor<unknown>>>(dependencies: {
129
- [K in keyof D]: D[K];
130
- }, factory: Core.DependentFn<T, {
131
- [K in keyof D]: Core.InferOutput<D[K]>;
132
- }>, ...metas: Meta.Meta[]): Core.Executor<T>;
149
+ declare function derive<T, D extends ReadonlyArray<Core.BaseExecutor<unknown>> | Record<string, Core.BaseExecutor<unknown>>>(dependencies: { [K in keyof D]: D[K] }, factory: Core.DependentFn<T, { [K in keyof D]: Core.InferOutput<D[K]> }>, ...metas: Meta.Meta[]): Core.Executor<T>;
150
+ declare function preset<T>(e: Core.Executor<T>, v: T): Core.Preset<T>;
133
151
 
152
+ //#endregion
153
+ //#region src/meta.d.ts
134
154
  declare const meta: <V>(key: string | symbol, schema: StandardSchemaV1<V>) => Meta.MetaFn<V>;
135
155
  declare function getValue<V>(meta: Meta.Meta<V>): Awaited<V>;
136
156
  declare function findValues<V = unknown>(executor: Meta.MetaContainer | Meta.Meta[] | undefined, meta: Meta.MetaFn<V>): V[];
137
157
  declare function findValue<V>(executor: Meta.MetaContainer | Meta.Meta[] | undefined, meta: Meta.MetaFn<V>): V | undefined;
138
158
 
139
- interface ScopeInner {
140
- "~findAffectedTargets"(target: Core.Executor<unknown>, updateSet?: Set<Core.Executor<unknown>>): Set<Core.Executor<unknown>>;
141
- "~resolveDependencies"(e: undefined | Core.BaseExecutor<unknown> | Core.BaseExecutor<unknown>[] | Record<string, Core.BaseExecutor<unknown>>, ref: Core.Executor<unknown>): Promise<undefined | unknown | unknown[] | Record<string, unknown>>;
142
- getCache(): Map<Core.Executor<unknown>, Core.Accessor<unknown>>;
143
- getValueCache(): Map<Core.Executor<unknown>, unknown>;
144
- getReactiveness(): Map<Core.Executor<unknown>, Set<Core.Executor<unknown>>>;
145
- }
146
- declare function createScope(): Core.Scope;
159
+ //#endregion
160
+ //#region src/scope.d.ts
161
+ declare function createScope(...presets: Core.Preset<unknown>[]): Core.Scope;
147
162
 
163
+ //#endregion
164
+ //#region src/ssch.d.ts
148
165
  declare function validate<TSchema extends StandardSchemaV1>(schema: TSchema, data: unknown): Awaited<StandardSchemaV1.InferOutput<TSchema>>;
149
166
  declare function validateAsync<TSchema extends StandardSchemaV1>(schema: TSchema, data: unknown): Promise<Awaited<StandardSchemaV1.InferOutput<TSchema>>>;
150
167
  declare function custom<T>(): StandardSchemaV1<T, T>;
151
168
 
152
- export { Core, Meta, SchemaError, type ScopeInner, StandardSchemaV1, createScope, custom, derive, executorSymbol, findValue, findValues, getValue, isExecutor, isLazyExecutor, isReactiveExecutor, isStaticExecutor, meta, metaSymbol, provide, validate, validateAsync };
169
+ //#endregion
170
+ export { Core, Meta, SchemaError, StandardSchemaV1, createScope, custom, derive, executorSymbol, findValue, findValues, getValue, isExecutor, isLazyExecutor, isMainExecutor, isReactiveExecutor, isStaticExecutor, meta, metaSymbol, preset, provide, validate, validateAsync };
171
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":["executorSymbol: unique symbol","metaSymbol: unique symbol","value: unknown","issues: ReadonlyArray<StandardSchemaV1.Issue>","value: V","d: D","source: MetaContainer | Meta[] | undefined","scope: Controller","dependencies: D","cleanup: Cleanup","force?: boolean","soft?: boolean","updateFn: T | ((current: T) => T)","current: T","callback: (value: T) => void","value: T","executor: Core.Executor<T>","eager?: boolean","executor: Executor<T>","executor: Executor<any>","callback: (accessor: Accessor<T>) => void","accessor: Accessor<T>","executor: Core.BaseExecutor<unknown>","executor: unknown","input: unknown","factory: Core.NoDependencyFn<T>","dependencies: D","factory: Core.DependentFn<T, Core.InferOutput<D>>","dependencies: { [K in keyof D]: D[K] }","factory: Core.DependentFn<T, { [K in keyof D]: Core.InferOutput<D[K]> }>","e: Core.Executor<T>","v: T","key: string | symbol","schema: StandardSchemaV1<V>","meta: Meta.Meta<V>","executor: Meta.MetaContainer | Meta.Meta[] | undefined","meta: Meta.MetaFn<V>","schema: TSchema","data: unknown"],"sources":["../src/types.ts","../src/executor.ts","../src/meta.ts","../src/scope.ts","../src/ssch.ts"],"sourcesContent":[],"mappings":";cAAaA;AAAAA,cAGAC,UAHAD,EAAAA,OAAAA,MAAAA;AAGAC,UAEI,gBAFJA,CAEb,QAAiB,OAAA,EAAA,SAA2C,KAA3C,CAAA,CAAA;EAA2C,SACb,WAAA,EAAvB,gBAAA,CAAiB,KAAM,CAAA,KAAA,EAAO,MAAP,CAAA;;AAAvB,kBAGC,gBAAA,CAHgB;EAAA,OAAA,UAAA,KAAA,CAGzC,QAAyB,OAAA,EAAA,SAC0B,KAD1B,CAAA,CAAA;IAC0B,SAKnC,OAAA,EAAA,CAAA;IAAA,SAAP,MAAA,EAAA,MAAA;IAAA,SAAgC,QAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GAAhC,MAAgC,CAAzB,MAAyB,CAAA,GAAf,OAAe,CAAP,MAAO,CAAA,MAAA,CAAA,CAAA;IAAA,SAAP,KAAA,CAAA,EACb,KADa,CACP,KADO,EACA,MADA,CAAA,GAAA,SAAA;EAAA;EAAR,OACC,KAAA,MAAA,CAAA,MAAA,CAAA,GAGI,aAH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