vultus-core 0.5.0 → 0.5.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 +52 -13
- package/dist/field.d.ts +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/kinds.d.ts +11 -7
- package/dist/kinds.d.ts.map +1 -1
- package/dist/kinds.js +35 -20
- package/dist/kinds.js.map +1 -1
- package/dist/numeric.d.ts +7 -0
- package/dist/numeric.d.ts.map +1 -1
- package/dist/numeric.js +12 -0
- package/dist/numeric.js.map +1 -1
- package/dist/parseApiError.d.ts +6 -0
- package/dist/parseApiError.d.ts.map +1 -1
- package/dist/parseApiError.js +7 -1
- package/dist/parseApiError.js.map +1 -1
- package/dist/tree.d.ts +21 -9
- package/dist/tree.d.ts.map +1 -1
- package/dist/tree.js +64 -21
- package/dist/tree.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/{useTreeField.d.ts → useManyOfTreeField.d.ts} +10 -9
- package/dist/useManyOfTreeField.d.ts.map +1 -0
- package/dist/{useTreeField.js → useManyOfTreeField.js} +9 -8
- package/dist/useManyOfTreeField.js.map +1 -0
- package/dist/useNumericField.d.ts.map +1 -1
- package/dist/useNumericField.js +2 -5
- package/dist/useNumericField.js.map +1 -1
- package/dist/useRangeField.d.ts.map +1 -1
- package/dist/useRangeField.js +2 -5
- package/dist/useRangeField.js.map +1 -1
- package/package.json +3 -2
- package/src/field.ts +1 -1
- package/src/index.ts +8 -4
- package/src/kinds.ts +35 -24
- package/src/numeric.ts +12 -0
- package/src/parseApiError.ts +7 -1
- package/src/tree.ts +71 -20
- package/src/types.ts +2 -2
- package/src/{useTreeField.ts → useManyOfTreeField.ts} +14 -13
- package/src/useNumericField.ts +2 -5
- package/src/useRangeField.ts +2 -5
- package/dist/useTreeField.d.ts.map +0 -1
- package/dist/useTreeField.js.map +0 -1
package/src/parseApiError.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type { ParsedApiError } from './types.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* What a thrown error says, for an action's or a field commit's error message: an API error's
|
|
5
|
+
* status, reason and message (ts-rest's reject shape, `{ status, body: { message, reason } }`);
|
|
6
|
+
* without a body message, a thrown `Error`'s own message (`new Error('Printer offline')`, a
|
|
7
|
+
* failed fetch's TypeError), unless empty. `status` is 0 when the error carries none.
|
|
8
|
+
*/
|
|
3
9
|
export function parseApiError(err: unknown): ParsedApiError {
|
|
4
10
|
if (typeof err !== 'object' || err === null) return { status: 0 };
|
|
5
11
|
const e = err as { status?: number; body?: { message?: string; reason?: string } };
|
|
6
12
|
return {
|
|
7
13
|
status: e.status ?? 0,
|
|
8
14
|
reason: e.body?.reason,
|
|
9
|
-
message: e.body?.message,
|
|
15
|
+
message: e.body?.message ?? ((err instanceof Error && err.message) || undefined),
|
|
10
16
|
};
|
|
11
17
|
}
|
package/src/tree.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OneOfChoice, OneOfChoiceControls } from './choices.js';
|
|
2
|
+
import { getVerdict } from './decision.js';
|
|
2
3
|
import { normalizeText } from './normalizeText.js';
|
|
3
4
|
|
|
4
5
|
/** A node of a tree field (Praeceptor's categories): a choice with children. */
|
|
@@ -16,12 +17,20 @@ export interface TreeNodeControls<T extends string = string> extends OneOfChoice
|
|
|
16
17
|
/**
|
|
17
18
|
* What a tree field's value lists, as antd TreeSelect's `showCheckedStrategy` and
|
|
18
19
|
* `checkStrictly` do. In the three cascading selections a node stands for its subtree, and
|
|
19
|
-
* a node all of whose children are covered is covered too
|
|
20
|
-
* covered nodes the
|
|
20
|
+
* a node all of whose children are covered is covered too — disabled nodes aside, as antd
|
|
21
|
+
* conducts its checks (see `cascade`); they differ only in which of the covered nodes the
|
|
22
|
+
* value names:
|
|
21
23
|
* - `'topmost'` (`SHOW_PARENT`, the default): the covered nodes whose parent is not covered;
|
|
22
24
|
* - `'all'` (`SHOW_ALL`): every covered node;
|
|
23
25
|
* - `'leaves'` (`SHOW_CHILD`): the covered leaves.
|
|
24
26
|
*
|
|
27
|
+
* Where a disabled node breaks the cascade, the value also names what the others would not
|
|
28
|
+
* cover: `'topmost'` a covered disabled node under a covered parent, and a covered node under
|
|
29
|
+
* a covered disabled parent (as antd TreeSelect's SHOW_PARENT does); `'leaves'` a covered node
|
|
30
|
+
* with children that is disabled or has no enabled child (stricter than antd's SHOW_CHILD,
|
|
31
|
+
* which drops a checked disabled parent whose enabled children are all checked, and a parent
|
|
32
|
+
* whose only children are disabled and checked — so the value would no longer cover them).
|
|
33
|
+
*
|
|
25
34
|
* `'independent'` (`checkStrictly`, moxb's `strictSelect`): each node is chosen on its own.
|
|
26
35
|
*/
|
|
27
36
|
export type TreeSelection = 'topmost' | 'all' | 'leaves' | 'independent';
|
|
@@ -58,14 +67,33 @@ function unknownValues<T extends string>(order: TreeNode<T>[], value: T[]): T[]
|
|
|
58
67
|
return [...new Set(value.filter((v) => !known.has(v)))];
|
|
59
68
|
}
|
|
60
69
|
|
|
61
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Whether a node can be checked: its `enabled` / `disabled` resolved as resolveChoice does (a
|
|
72
|
+
* Decision takes no context, so this needs none). Works on a definition's nodes (TreeNode,
|
|
73
|
+
* Decisions) and on the widgets' node controls (TreeNodeControls, `enabled: boolean`) alike.
|
|
74
|
+
*/
|
|
75
|
+
function nodeEnabled(node: Pick<TreeNode, 'enabled' | 'disabled'>): boolean {
|
|
76
|
+
if (node.enabled !== undefined) return getVerdict(node.enabled, true);
|
|
77
|
+
return !getVerdict(node.disabled, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The nodes a value covers in the cascading selections, by antd's check conduction (rc-tree's
|
|
82
|
+
* conductCheck), so the hook and the widgets agree: the value's nodes; the enabled children of
|
|
83
|
+
* a covered enabled node, and so on down (a disabled node is never covered through a checked
|
|
84
|
+
* ancestor, nor is its subtree through it); and an enabled node all of whose enabled children
|
|
85
|
+
* are covered, if it has any (a parent whose children are all disabled, or a disabled parent,
|
|
86
|
+
* is never covered through its children). A disabled node in the value covers itself only.
|
|
87
|
+
*/
|
|
62
88
|
function cascade<T extends string>(nodes: TreeNode<T>[], value: T[]): Set<T> {
|
|
63
89
|
const listed = new Set(value);
|
|
64
90
|
const covered = new Set<T>();
|
|
65
91
|
const walk = (node: TreeNode<T>, inherited: boolean): boolean => {
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
92
|
+
const enabled = nodeEnabled(node);
|
|
93
|
+
const self = listed.has(node.value) || (inherited && enabled);
|
|
94
|
+
const children = (node.children ?? []).map((child) => ({ enabled: nodeEnabled(child), covered: walk(child, self && enabled) }));
|
|
95
|
+
const counted = children.filter((child) => child.enabled);
|
|
96
|
+
const isCovered = self || (enabled && counted.length > 0 && counted.every((child) => child.covered));
|
|
69
97
|
if (isCovered) covered.add(node.value);
|
|
70
98
|
return isCovered;
|
|
71
99
|
};
|
|
@@ -73,14 +101,29 @@ function cascade<T extends string>(nodes: TreeNode<T>[], value: T[]): Set<T> {
|
|
|
73
101
|
return covered;
|
|
74
102
|
}
|
|
75
103
|
|
|
76
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* The covered nodes the value names under `selection` (see TreeSelection), in pre-order, by
|
|
106
|
+
* rc-tree-select's formatStrategyValues (for `'leaves'`, a stricter form of it), so that the
|
|
107
|
+
* named nodes cover exactly what `covered` does (`cascade` of them gives it back) also where
|
|
108
|
+
* disabled nodes break the cascade:
|
|
109
|
+
* - `'topmost'`: a covered node unless its parent is covered and neither of the two is
|
|
110
|
+
* disabled (only then does the parent cover it);
|
|
111
|
+
* - `'leaves'`: the covered leaves, and a covered node with children that is disabled, has
|
|
112
|
+
* no enabled child, or has an enabled child not covered (its children would not cover it);
|
|
113
|
+
* - `'all'`: every covered node.
|
|
114
|
+
*/
|
|
77
115
|
function namedNodes<T extends string>(order: TreeNode<T>[], parent: Map<T, T>, covered: Set<T>, selection: TreeSelection): T[] {
|
|
116
|
+
const enabled = new Map(order.map((node) => [node.value, nodeEnabled(node)]));
|
|
78
117
|
const named = order.filter((node) => {
|
|
79
118
|
if (!covered.has(node.value)) return false;
|
|
80
|
-
if (selection === 'leaves') return !hasChildren(node);
|
|
81
119
|
if (selection === 'topmost') {
|
|
82
120
|
const up = parent.get(node.value);
|
|
83
|
-
return up === undefined || !covered.has(up);
|
|
121
|
+
return up === undefined || !covered.has(up) || !enabled.get(node.value) || !enabled.get(up);
|
|
122
|
+
}
|
|
123
|
+
if (selection === 'leaves') {
|
|
124
|
+
if (!hasChildren(node) || !enabled.get(node.value)) return true;
|
|
125
|
+
const counted = node.children!.filter((child) => enabled.get(child.value));
|
|
126
|
+
return counted.length === 0 || !counted.every((child) => covered.has(child.value));
|
|
84
127
|
}
|
|
85
128
|
return true;
|
|
86
129
|
});
|
|
@@ -105,19 +148,23 @@ export function normalizeTreeValue<T extends string>(nodes: TreeNode<T>[], value
|
|
|
105
148
|
/**
|
|
106
149
|
* Every node a tree field's value stands for, in pre-order (what an item filed under some
|
|
107
150
|
* node matches against): in the cascading selections the covered nodes (the value's nodes,
|
|
108
|
-
* their descendants, and every node all of whose children are
|
|
109
|
-
* `'independent'` the value's nodes themselves. Values that
|
|
110
|
-
* normalizeTreeValue.
|
|
151
|
+
* their enabled descendants, and every enabled node all of whose enabled children are
|
|
152
|
+
* covered; see `cascade`); with `'independent'` the value's nodes themselves. Values that
|
|
153
|
+
* name no node follow, as in normalizeTreeValue. A node disabled when the value was stored
|
|
154
|
+
* and enabled now is covered from then on (with `'topmost'`, a stored parent covers it).
|
|
111
155
|
*/
|
|
112
156
|
export function coveredNodes<T extends string>(nodes: TreeNode<T>[], value: T[], selection: TreeSelection = 'topmost'): T[] {
|
|
113
157
|
return normalizeTreeValue(nodes, value, selection === 'independent' ? 'independent' : 'all');
|
|
114
158
|
}
|
|
115
159
|
|
|
116
160
|
/**
|
|
117
|
-
* The value after flipping `node`, normalized
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
161
|
+
* The value after flipping `node`, normalized, as antd's Tree flips a checkbox. In the
|
|
162
|
+
* cascading selections a covered node is removed with the descendants it covers through
|
|
163
|
+
* enabled nodes and with its enabled ancestors up to the first disabled one (they no longer
|
|
164
|
+
* have all their enabled children); an uncovered one is added, covering its subtree as
|
|
165
|
+
* `cascade` says. With `'independent'` the node alone is added or removed. A `node` that is
|
|
166
|
+
* not one of the nodes changes nothing. Whether `node` itself may be flipped is the caller's
|
|
167
|
+
* to decide (useManyOfTreeField refuses a disabled one).
|
|
121
168
|
*/
|
|
122
169
|
export function toggleTreeValue<T extends string>(nodes: TreeNode<T>[], value: T[], node: T, selection: TreeSelection): T[] {
|
|
123
170
|
const { order, parent } = indexTree(nodes);
|
|
@@ -127,12 +174,16 @@ export function toggleTreeValue<T extends string>(nodes: TreeNode<T>[], value: T
|
|
|
127
174
|
return normalizeTreeValue(nodes, value.includes(node) ? value.filter((v) => v !== node) : [...value, node], selection);
|
|
128
175
|
}
|
|
129
176
|
const covered = cascade(nodes, value);
|
|
130
|
-
const subtree = indexTree([target]).order.map((n) => n.value);
|
|
131
177
|
if (covered.has(node)) {
|
|
132
|
-
|
|
133
|
-
|
|
178
|
+
const uncover = (n: TreeNode<T>) => {
|
|
179
|
+
covered.delete(n.value);
|
|
180
|
+
for (const child of n.children ?? []) if (nodeEnabled(child)) uncover(child);
|
|
181
|
+
};
|
|
182
|
+
uncover(target);
|
|
183
|
+
const byValue = new Map(order.map((n) => [n.value, n]));
|
|
184
|
+
for (let up = parent.get(node); up !== undefined && nodeEnabled(byValue.get(up)!); up = parent.get(up)) covered.delete(up);
|
|
134
185
|
} else {
|
|
135
|
-
|
|
186
|
+
covered.add(node);
|
|
136
187
|
}
|
|
137
188
|
return normalizeTreeValue(nodes, [...covered, ...unknownValues(order, value)], selection);
|
|
138
189
|
}
|
package/src/types.ts
CHANGED
|
@@ -73,8 +73,8 @@ export interface ActionOptions<TArgs = void, TResult = void, RouteId extends str
|
|
|
73
73
|
onSuccess?: (result: TResult) => void;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
/** Compiles only when `A` is assignable to `B`. */
|
|
77
|
-
type Fits<A extends B, B> = A;
|
|
76
|
+
/** Compiles only when `A` is assignable to `B`. Not part of the package's public API: kept here as the one definition, imported directly by the files that use it (kinds.ts), and left out of index.ts's re-export of this module. */
|
|
77
|
+
export type Fits<A extends B, B> = A;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* A compile-time check: an action calls its options' functions with nothing, so one that takes
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from './tree.js';
|
|
9
9
|
import type { ErrorRoutesRegistry, ValueOrFn } from './types.js';
|
|
10
10
|
|
|
11
|
-
export type
|
|
11
|
+
export type ManyOfTreeOwnOptions<T extends string = string, Ctx = any> = {
|
|
12
12
|
/** The roots, each with its children; static or derived (a function, of the field context if it declares a parameter). */
|
|
13
13
|
nodes: ValueOrFn<TreeNode<T>[], Ctx>;
|
|
14
14
|
/** What the value lists; default `'topmost'` (see TreeSelection). */
|
|
@@ -17,10 +17,10 @@ export type TreeOwnOptions<T extends string = string, Ctx = any> = {
|
|
|
17
17
|
expand?: TreeExpand;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export type
|
|
21
|
-
FieldOptions<T[], T[], RouteId, Ctx> &
|
|
20
|
+
export type ManyOfTreeFieldOptions<T extends string = string, RouteId extends string = string, Ctx = any> =
|
|
21
|
+
FieldOptions<T[], T[], RouteId, Ctx> & ManyOfTreeOwnOptions<T, Ctx>;
|
|
22
22
|
|
|
23
|
-
export interface
|
|
23
|
+
export interface ManyOfTreeFieldControls<T extends string = string> extends FieldControls<T[], T[]> {
|
|
24
24
|
/** The roots as the widgets get them, each with its children. */
|
|
25
25
|
nodes: TreeNodeControls<T>[];
|
|
26
26
|
selection: TreeSelection;
|
|
@@ -32,8 +32,8 @@ export interface TreeFieldControls<T extends string = string> extends FieldContr
|
|
|
32
32
|
toggle(value: T): void;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
/** The implicit initial value for a tree field: `initialValue` resolved, else the empty list. */
|
|
36
|
-
export function
|
|
35
|
+
/** The implicit initial value for a many-of tree field: `initialValue` resolved, else the empty list. */
|
|
36
|
+
export function manyOfTreeInitialValue<T extends string>(
|
|
37
37
|
opts: { initialValue?: ValueOrFn<T[]> },
|
|
38
38
|
ctx: FieldCtx,
|
|
39
39
|
id: string,
|
|
@@ -47,24 +47,25 @@ function sameList<T>(a: T[], b: T[]): boolean {
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* A field whose value is a set of tree nodes (Praeceptor's category filter), with antd
|
|
50
|
-
* TreeSelect's semantics: in the cascading selections a checked node stands for its subtree
|
|
51
|
-
*
|
|
50
|
+
* TreeSelect's semantics: in the cascading selections a checked node stands for its subtree
|
|
51
|
+
* (its enabled part: disabled nodes follow antd's check conduction, so the widgets show what
|
|
52
|
+
* the value covers), and `selection` says which nodes the value lists (see TreeSelection). The value is shown
|
|
52
53
|
* and requested normalized (normalizeTreeValue): in tree pre-order, values that name no
|
|
53
54
|
* node (a stored value naming a removed node) kept at the end. `setValue` does not police
|
|
54
55
|
* disabled nodes (the widgets disable them); `toggle` refuses a disabled or unknown node with
|
|
55
56
|
* a warning, as useManyOfField does.
|
|
56
57
|
*/
|
|
57
|
-
export function
|
|
58
|
-
opts:
|
|
58
|
+
export function useManyOfTreeField<T extends string = string, RouteId extends string = string, Ctx = any>(
|
|
59
|
+
opts: ManyOfTreeFieldOptions<T, RouteId, Ctx>,
|
|
59
60
|
registry?: ErrorRoutesRegistry<RouteId>,
|
|
60
|
-
):
|
|
61
|
+
): ManyOfTreeFieldControls<T> {
|
|
61
62
|
const ctx = useFieldContext();
|
|
62
63
|
const nodes = resolveIn<TreeNode<T>[]>(opts.nodes, [], ctx, `Field '${opts.id}': option 'nodes'`);
|
|
63
64
|
const selection = opts.selection ?? 'topmost';
|
|
64
65
|
|
|
65
66
|
const inside = !opts.onChange && !opts.commit;
|
|
66
|
-
const initialValue = () =>
|
|
67
|
-
const field = useFieldCore<T[], T[], RouteId, Ctx>('
|
|
67
|
+
const initialValue = () => manyOfTreeInitialValue<T>(opts, ctx, opts.id);
|
|
68
|
+
const field = useFieldCore<T[], T[], RouteId, Ctx>('manyOfTree', inside ? { ...opts, initialValue } : opts, registry);
|
|
68
69
|
|
|
69
70
|
// The same list object while it is already normalized, so the value is stable across renders.
|
|
70
71
|
const normalized = normalizeTreeValue(nodes, field.value, selection);
|
package/src/useNumericField.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFieldCore, type FieldControls, type FieldOptions } from './field.js';
|
|
2
2
|
import { useFieldContext, type FieldCtx } from './FieldContext.js';
|
|
3
3
|
import { resolveIn } from './resolve.js';
|
|
4
|
-
import { clamp, resolveNumeric, type NumericBounds, type ResolvedNumeric } from './numeric.js';
|
|
4
|
+
import { clamp, fit as fitNumber, resolveNumeric, type NumericBounds, type ResolvedNumeric } from './numeric.js';
|
|
5
5
|
import type { ErrorRoutesRegistry } from './types.js';
|
|
6
6
|
|
|
7
7
|
export type NumericOwnOptions<Ctx = any> = NumericBounds<Ctx>;
|
|
@@ -45,10 +45,7 @@ export function useNumericField<RouteId extends string = string, Ctx = any>(
|
|
|
45
45
|
const field = useFieldCore<number, number, RouteId, Ctx>('numeric', inside ? { ...opts, initialValue } : opts, registry);
|
|
46
46
|
|
|
47
47
|
/** A number clamped into the bounds, then rounded when `integer`. */
|
|
48
|
-
const fit = (n: number) =>
|
|
49
|
-
const clamped = clamp(n, resolved.min, resolved.max);
|
|
50
|
-
return resolved.integer ? Math.round(clamped) : clamped;
|
|
51
|
-
};
|
|
48
|
+
const fit = (n: number) => fitNumber(n, resolved.min, resolved.max, resolved.integer);
|
|
52
49
|
const value = fit(field.value);
|
|
53
50
|
|
|
54
51
|
const setValue = (next: number) => {
|
package/src/useRangeField.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFieldCore, type FieldControls, type FieldOptions } from './field.js';
|
|
2
2
|
import { useFieldContext, type FieldCtx } from './FieldContext.js';
|
|
3
3
|
import { resolveIn } from './resolve.js';
|
|
4
|
-
import {
|
|
4
|
+
import { fit as fitNumber, resolveNumeric, type NumericBounds, type ResolvedNumeric } from './numeric.js';
|
|
5
5
|
import type { ErrorRoutesRegistry, ValueOrFn } from './types.js';
|
|
6
6
|
|
|
7
7
|
/** A `[from, to]` pair, `from <= to`. Not named `Range`, which would shadow the DOM's global type. */
|
|
@@ -59,10 +59,7 @@ export function useRangeField<RouteId extends string = string, Ctx = any>(
|
|
|
59
59
|
const field = useFieldCore<NumberRange, NumberRange, RouteId, Ctx>('range', inside ? { ...opts, initialValue } : opts, registry);
|
|
60
60
|
|
|
61
61
|
/** An end clamped into the bounds, then rounded when `integer`. */
|
|
62
|
-
const fit = (n: number) =>
|
|
63
|
-
const clamped = clamp(n, min, max);
|
|
64
|
-
return resolved.integer ? Math.round(clamped) : clamped;
|
|
65
|
-
};
|
|
62
|
+
const fit = (n: number) => fitNumber(n, min, max, resolved.integer);
|
|
66
63
|
const value = order([fit(field.value[0]), fit(field.value[1])]);
|
|
67
64
|
|
|
68
65
|
const setValue = (next: NumberRange) => {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTreeField.d.ts","sourceRoot":"","sources":["../src/useTreeField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAEjF,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAEL,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,E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