@mark1russell7/stack-needs 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mark Russell
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,99 @@
1
- # Temporary Holding Version
1
+ # @mark1russell7/stack-needs
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The need rates of draws as reference data. Each rate has its source and its license. The first table is the food energy that each person needs each day.
4
+
5
+ It is an add-on of [`@mark1russell7/system-stack`](../system-stack/README.md). It makes a fragment of an endurance layer, and [`@mark1russell7/stack-endurance`](../stack-endurance/README.md) calculates with it. The data names no person and no place. The persons of a household are input data.
6
+
7
+ Each function is a plain function with no clock, no network and no file.
8
+
9
+ ## The records
10
+
11
+ | Record | What it tells |
12
+ | --- | --- |
13
+ | `HashedSource` | A source of `@mark1russell7/guidebook` (an id, a title, a URL, a license and the date of the check), with the SHA-256 hash of the file. |
14
+ | `CalorieTable` | A table of estimated calorie needs from one source, with the place of the tables in the source. |
15
+ | `CalorieRow` | A sex, a range of ages in months, and the need of each activity level, or one need for all levels. |
16
+ | `Person` | A group of persons: a sex, an age in whole months, a count and, as an option, an activity level. |
17
+ | `HouseholdFragment` | A fragment of an endurance layer: the resources, the stores, one draw and one direct use. It has the form of `EnduranceLayer`. |
18
+
19
+ ## The rules of the data
20
+
21
+ 1. Each value comes from a table of a cited source. A value with no source is not data.
22
+ 2. An age with no row in the table gives a line with no read for that person, not an error. The total of `calorieNeed` is then a lower limit, and `read` is false.
23
+ 3. The activity level is an explicit input. The package has no default level.
24
+ 4. The package has no cooking converter. No cited source gives the water and the fuel to cook 1 kg of dry food.
25
+
26
+ `checkCalorieTable` is the gate of a table. It gives the findings of `checkSources` of `@mark1russell7/guidebook` for the source. It also refuses a hash that is not 64 lowercase hexadecimal digits. For the rows, it refuses two rows of one sex with ages in common, and a need that is not above 0 in `kcal/d`. The rows of each sex also cover each month with no gap, from the first row to an open last row (`needs-gap`).
27
+
28
+ The field `sha256` is not in the source of guidebook yet. It moves there later.
29
+
30
+ ## A first look
31
+
32
+ ```ts
33
+ import { SUPPLY_CATALOG } from "@mark1russell7/market/supplies";
34
+ import { enduranceOf } from "@mark1russell7/stack-endurance";
35
+ import { calorieNeed, DGA_CALORIES, householdFragment, type Person } from "@mark1russell7/stack-needs";
36
+
37
+ // Made-up persons: two adults of 33 years.
38
+ const persons: Person[] = [
39
+ { sex: "male", ageMonths: 396, count: 1 },
40
+ { sex: "female", ageMonths: 396, count: 1 },
41
+ ];
42
+ console.log(calorieNeed(DGA_CALORIES, persons, "sedentary", 1).need); // { value: 4200, unit: "kcal" }
43
+
44
+ const food = householdFragment({
45
+ persons,
46
+ activity: "sedentary",
47
+ catalog: SUPPLY_CATALOG,
48
+ units: { "food.rice-white-1kg": 4, "food.peanut-butter-1kg": 2 },
49
+ supply: "food.retail",
50
+ level: "critical",
51
+ levels: ["critical"],
52
+ });
53
+ const cut = { case: "food-cut", title: "No food shops", cuts: [{ part: "food.retail", title: "No food shops", source: "example" }] };
54
+ if (food.layer === undefined) throw new Error(food.why);
55
+ console.log(enduranceOf(food.layer, cut, { at: "2026-11-22" }).needs["food.energy"]?.days); // about 2.85: the peanut butter alone
56
+ ```
57
+
58
+ ## The join of a household and a buy list
59
+
60
+ `householdFragment` turns the persons and a buy list into a fragment of an endurance layer. The buy list is the count of units of each product of the catalog of supplies of `@mark1russell7/market`.
61
+
62
+ - The fragment has one draw `food.energy`. Its rate is the need of the persons for one day, in `kcal`. Its users are the persons.
63
+ - Each gift of the buy list (`giftsOf`) is one store. Examples are `food.no-cook` in `kcal`, the dry foods in `kg` and `water.stored` in `L`.
64
+ - A gift with no read has no store. It is in `noReads`, and `storesRead` is false. The draw does not change.
65
+ - The direct use of `food.no-cook` gives 1 kcal of the need for each kcal.
66
+ - The result also has the food energy of each product (`buyListEnergy`). A caller gets the energy of the dry food for its converters from it.
67
+
68
+ The result has two reads. `needRead` tells if the draw has a read, and `storesRead` tells if each gift of the buy list has a read.
69
+
70
+ ### A person with no row
71
+
72
+ The table has no row below 12 months. By default, a person with no row gives no layer. The result has `layer: undefined`, the persons with no row and the reason. A low rate gives too many days, and the draw has no field for a no read. A draw of 0 kcal also gives no layer: a household with no person, or each count 0.
73
+
74
+ The option `noRow: "leave-out"` leaves those persons out of the draw. The users are then the persons with a row, and `leftOut` lists the other persons. The draw then has no need of those persons. For an infant, that need is breast milk or formula, not the buy list. The days are then an upper limit for the whole household.
75
+
76
+ ### The resources of the buy list and the join
77
+
78
+ The fragment has no converter. Thus, with this fragment alone, only `food.no-cook` feeds the draw. This is the worst case: no water and no fuel.
79
+
80
+ A caller adds the converters for the dry food in a different fragment, with the water and the fuel of each run. Then `joinEndurance` joins the fragments. The dry food then adds days only while the water and the fuel last.
81
+
82
+ This fragment declares the resource codes of the buy list, for example `water.stored` in `L`. A different fragment, for example the fragment of a water tank, can declare the same resource. `joinEndurance` of `@mark1russell7/stack-endurance` joins two equal records into one. A different unit is a fault of the join.
83
+
84
+ ## The sources
85
+
86
+ The calorie table comes from Appendix 2 of the Dietary Guidelines for Americans, 2020-2025, 9th Edition (USDA and HHS). Table A2-1 gives the ages of 12 through 23 months, on page 139. Table A2-2 gives the ages of 2 and more, on pages 140 and 141. The table has 68 rows: 34 for each sex.
87
+
88
+ The guidelines are a work of the United States federal government, in the public domain (the license `us-public-domain` of guidebook). The record of the source has the SHA-256 hash of the PDF of the check of 2026-11-22.
89
+
90
+ - A calorie of the source is a food calorie, thus 1 kcal.
91
+ - Table A2-1 gives one need for each age and sex of a toddler. The level does not change it.
92
+ - Each row of a toddler covers the months up to the next row. The table has no row below 12 months.
93
+ - The source gives each need for a reference height and weight. A person can need more or less.
94
+
95
+ ## The entries
96
+
97
+ | Entry | What it has |
98
+ | --- | --- |
99
+ | `@mark1russell7/stack-needs` | The records, the calorie table, the gate, `calorieNeed` and `householdFragment`. |
@@ -0,0 +1,277 @@
1
+ import { Quantity } from "@mark1russell7/quantity";
2
+ import { Finding, FindingCode, GateOptions, Source } from "@mark1russell7/guidebook";
3
+ import { BuyListEnergy, SupplyCatalog } from "@mark1russell7/market/supplies";
4
+ /**
5
+ * A source of a table: a source of `@mark1russell7/guidebook`, with the SHA-256 hash of the file of the read.
6
+ * The hash has 64 lowercase hexadecimal digits. A page with no fixed file has no hash.
7
+ */
8
+ export type HashedSource = Source & {
9
+ readonly sha256?: string;
10
+ };
11
+ /** The activity levels of the table, as the source names them: sedentary, moderately active and active. */
12
+ export declare const ACTIVITY_LEVELS: readonly ["sedentary", "moderately-active", "active"];
13
+ /** An activity level of the table. */
14
+ export type ActivityLevel = (typeof ACTIVITY_LEVELS)[number];
15
+ /** The sexes of the table. */
16
+ export declare const CALORIE_SEXES: readonly ["female", "male"];
17
+ /** A sex of the table. */
18
+ export type CalorieSex = (typeof CALORIE_SEXES)[number];
19
+ /**
20
+ * The estimated calorie need of one person of a row for each day. A row gives a need for each activity level, or one need for all levels.
21
+ * The table of the toddlers gives one need for each age and sex only. Each need has a unit of energy for each day, for example `{ "value": 2000, "unit": "kcal/d" }`.
22
+ */
23
+ export type CalorieNeed = {
24
+ readonly levels: Readonly<Record<ActivityLevel, Quantity>>;
25
+ readonly each?: never;
26
+ } | {
27
+ readonly each: Quantity;
28
+ readonly levels?: never;
29
+ };
30
+ /** A row of a table of calorie needs: a sex, a range of ages in months, and the need. */
31
+ export interface CalorieRow {
32
+ readonly sex: CalorieSex;
33
+ /** The age as the source names it, for example `19-20` (years) or `21 through 23 months`. */
34
+ readonly age: string;
35
+ /** The first age of the row, in whole months. */
36
+ readonly from: number;
37
+ /** The last age of the row, in whole months. Without it, the row applies to each larger age. */
38
+ readonly to?: number | undefined;
39
+ readonly need: CalorieNeed;
40
+ }
41
+ /** A table of estimated calorie needs from one source. */
42
+ export interface CalorieTable {
43
+ /** The id, for example `dga.2020-2025:calorie-needs`. */
44
+ readonly id: string;
45
+ readonly title: string;
46
+ readonly source: HashedSource;
47
+ /** The place of the tables in the source: the tables and their pages. */
48
+ readonly locator: string;
49
+ /** The rows of the table. The age ranges of the rows of one sex do not overlap. */
50
+ readonly rows: readonly CalorieRow[];
51
+ }
52
+ /** A group of persons of the same sex and age, and their count. */
53
+ export interface Person {
54
+ readonly sex: CalorieSex;
55
+ /** The age, in whole months, for example 420 for 35 years. */
56
+ readonly ageMonths: number;
57
+ readonly count: number;
58
+ /** The activity level of the persons. Without it, the level of the call applies. */
59
+ readonly level?: ActivityLevel | undefined;
60
+ }
61
+ /** The need of one person record for the days, or no read when the table has no row for the age. */
62
+ export type CalorieNeedLine = {
63
+ readonly person: Person;
64
+ readonly read: true;
65
+ readonly level: ActivityLevel;
66
+ readonly row: string;
67
+ readonly need: Quantity;
68
+ } | {
69
+ readonly person: Person;
70
+ readonly read: false;
71
+ readonly why: string;
72
+ };
73
+ /** The energy need of the persons of a household for a count of days. */
74
+ export interface CalorieNeedTotal {
75
+ /** The need of each person record, in the order of the input. */
76
+ readonly lines: readonly CalorieNeedLine[];
77
+ /** True when each line has a read. When it is false, `need` is a lower limit. */
78
+ readonly read: boolean;
79
+ /** The sum of the needs of the lines with a read, in `kcal`. */
80
+ readonly need: Quantity;
81
+ /** The count of the persons of all the records, also of the records with no read. */
82
+ readonly persons: number;
83
+ }
84
+ /** This function tells if a value is an activity level of the table. */
85
+ export declare function isActivityLevel(level: unknown): level is ActivityLevel;
86
+ /**
87
+ * This function gives the row of a table for a sex and an age in months, or `undefined` when the table has no row.
88
+ *
89
+ * @param table - The table of calorie needs
90
+ * @param sex - The sex
91
+ * @param ageMonths - The age, in whole months
92
+ */
93
+ export declare function calorieRow(table: CalorieTable, sex: CalorieSex, ageMonths: number): CalorieRow | undefined;
94
+ /**
95
+ * This function gives the energy need of the persons of a household for a count of days, in `kcal`.
96
+ * It adds the need of each person at the activity level of that person. The table finds the row of each person from the age.
97
+ *
98
+ * - An age with no row in the table gives a line with no read, for example 6 months. Then the total is a lower limit.
99
+ * - The table of the toddlers gives one need for each age and sex. Thus the level does not change the need of a toddler.
100
+ *
101
+ * The activity level is an explicit input. This package has no default level. The planner selects it, also for the worst case of a long power cut.
102
+ * In that case, work can make the level higher, for example the carry of water. The function is pure.
103
+ *
104
+ * @param table - The table of calorie needs
105
+ * @param persons - The person records of the household: a sex, an age in months, a count and, as an option, a level
106
+ * @param level - The activity level of each record with no level of its own
107
+ * @param days - The count of days, a finite number of 0 or more
108
+ * @throws RangeError when a count of persons or an age is not a whole number of 0 or more, or when the household has no person
109
+ * @throws RangeError when a level is not a level of the table, or when a sex is not a sex of the table
110
+ * @throws RangeError when the count of days is not a finite number of 0 or more
111
+ */
112
+ export declare function calorieNeed(table: CalorieTable, persons: readonly Person[], level: ActivityLevel, days: number): CalorieNeedTotal;
113
+ /** The source of the calorie table: the PDF of the Dietary Guidelines for Americans, 2020-2025, 9th Edition. It is a work of the United States federal government. */
114
+ export declare const DGA_SOURCE: HashedSource;
115
+ /** The table of estimated calorie needs of the Dietary Guidelines for Americans, 2020-2025: 68 rows, 34 for each sex. */
116
+ export declare const DGA_CALORIES: CalorieTable;
117
+ /** The tables of estimated calorie needs, one record for each source. */
118
+ export declare const CALORIE_TABLES: readonly CalorieTable[];
119
+ /**
120
+ * These are the codes of the gate of the rows and the hash. Each code is an error. The gate of the sources of `@mark1russell7/guidebook` gives its own codes.
121
+ *
122
+ * - `needs-hash`: the hash of the source is not 64 lowercase hexadecimal digits.
123
+ * - `needs-row`: a row has no age or a wrong sex. Or its range of months is not a range of whole numbers of 0 or more.
124
+ * - `needs-overlap`: two rows of one sex have ages in common.
125
+ * - `needs-gap`: the rows of one sex do not cover each month with no gap, from the first row to an open last row.
126
+ * - `needs-value`: a need is not a finite number above 0 in a unit of energy for each day.
127
+ */
128
+ export declare const NEEDS_CODES: readonly ["needs-hash", "needs-row", "needs-overlap", "needs-gap", "needs-value"];
129
+ /** A code of the gate of a table of calorie needs. */
130
+ export type NeedsCode = (typeof NEEDS_CODES)[number];
131
+ /** A finding of the gate of a table of calorie needs: a finding of the gate of the sources, or a finding of a row. */
132
+ export type NeedsFinding = Finding<NeedsCode | FindingCode, "source" | "unit" | "row">;
133
+ /**
134
+ * This function gives each finding of a table of calorie needs. A list with no error tells that the gate passes.
135
+ *
136
+ * - The findings of the source come from `checkSources` of `@mark1russell7/guidebook`, with the options of the call.
137
+ * - The form of the hash and the rows have the codes of `NEEDS_CODES`.
138
+ *
139
+ * The findings are in the order of the table. The function is pure.
140
+ *
141
+ * @param table - The table of calorie needs
142
+ * @param options - The options of the gate of the sources, for example the date of the gate
143
+ */
144
+ export declare function checkCalorieTable(table: CalorieTable, options?: GateOptions): NeedsFinding[];
145
+ /** This function tells if a list of findings has an error. */
146
+ export declare function hasNeedsError(findings: readonly NeedsFinding[]): boolean;
147
+ /** The code of the need of the food draw: food energy, in `kcal` for each day. */
148
+ export declare const FOOD_NEED = "food.energy";
149
+ /** The resource of the food to eat with no water and no fuel, in `kcal`. It has a direct use for the food draw. */
150
+ export declare const NO_COOK = "food.no-cook";
151
+ /** A resource of a store, with its unit. */
152
+ export interface FragmentResource {
153
+ readonly code: string;
154
+ readonly unit: string;
155
+ }
156
+ /** A store of the buy list: an amount of one resource, in its unit. */
157
+ export interface FragmentStore {
158
+ readonly id: string;
159
+ readonly resource: string;
160
+ readonly amount: number;
161
+ }
162
+ /** The food draw: the food energy of the persons of the draw for each day. */
163
+ export interface FragmentDraw {
164
+ readonly need: string;
165
+ readonly level: string;
166
+ /** The food energy of the persons of the draw for each day, in `kcal`. It is above 0. */
167
+ readonly perDay: number;
168
+ /** The count of the persons of the draw. */
169
+ readonly users: number;
170
+ readonly supply: string;
171
+ }
172
+ /** The direct use of a resource for a need: 1 unit of the resource gives `amount` of the need. */
173
+ export interface FragmentDirectUse {
174
+ readonly resource: string;
175
+ readonly need: string;
176
+ readonly amount: number;
177
+ }
178
+ /** A fragment of an endurance layer, with the form of `EnduranceLayer` of `@mark1russell7/stack-endurance`. It has no converter. */
179
+ export interface HouseholdFragment {
180
+ /** The format of an endurance layer, `endurance/1`. */
181
+ readonly schema: "endurance/1";
182
+ readonly levels: readonly string[];
183
+ readonly resources: readonly FragmentResource[];
184
+ readonly stores: readonly FragmentStore[];
185
+ readonly draws: readonly FragmentDraw[];
186
+ readonly direct: readonly FragmentDirectUse[];
187
+ }
188
+ /** The action for the persons with no row in the table. The only action is `leave-out`. */
189
+ export type NoRowAction = "leave-out";
190
+ /** The inputs of the household fragment. */
191
+ export interface HouseholdFragmentInput {
192
+ /** The person records of the household. */
193
+ readonly persons: readonly Person[];
194
+ /** The activity level of each person record with no level of its own. It has no default. */
195
+ readonly activity: ActivityLevel;
196
+ /** The catalog of supplies of `@mark1russell7/market`. */
197
+ readonly catalog: SupplyCatalog;
198
+ /** The count of units of each product of the buy list, by the `id` of the product. */
199
+ readonly units: Readonly<Record<string, number>>;
200
+ /** The `id` of the part of the stack that supplies the food when no case stops it, for example `food.retail`. */
201
+ readonly supply: string;
202
+ /** The level of the food draw. It is one of the levels of the joined layer. */
203
+ readonly level: string;
204
+ /** The levels of the fragment. The default is no levels: a different fragment of the stack gives them. */
205
+ readonly levels?: readonly string[] | undefined;
206
+ /** The table of calorie needs. The default is `DGA_CALORIES`. */
207
+ readonly table?: CalorieTable | undefined;
208
+ /** The start of the `id` of each store. The default is `buy`. */
209
+ readonly prefix?: string | undefined;
210
+ /**
211
+ * The action for the persons with no row in the table. Without it, a person with no row gives no layer.
212
+ * With `leave-out`, the draw has no need of those persons, and the result lists them.
213
+ */
214
+ readonly noRow?: NoRowAction | undefined;
215
+ }
216
+ /** A gift of the buy list with no read. The fragment has no store for it. A no read is not 0. */
217
+ export interface GiftNoRead {
218
+ readonly product: string;
219
+ readonly resource: string;
220
+ readonly why: string;
221
+ }
222
+ /** The parts of the result that do not change with the draw. */
223
+ export interface HouseholdStoresResult {
224
+ /** The food energy of each product of the buy list. A caller gets the energy of the dry food for its converters from it. */
225
+ readonly energy: BuyListEnergy;
226
+ /** The gifts of the buy list with no read. */
227
+ readonly noReads: readonly GiftNoRead[];
228
+ /** True when each gift of the buy list has a read. When it is false, the stores are a lower limit. */
229
+ readonly storesRead: boolean;
230
+ }
231
+ /** The household fragment with its draw. The draw is exact for its users. */
232
+ export interface HouseholdFragmentRead extends HouseholdStoresResult {
233
+ readonly layer: HouseholdFragment;
234
+ /**
235
+ * The food energy of the household for one day, with a line for each person record. Its `read` covers the whole
236
+ * household. It is false when a person is left out, or when a record with count 0 has no row. The flag of the draw
237
+ * is `needRead`.
238
+ */
239
+ readonly need: CalorieNeedTotal;
240
+ /** This field is true: the draw has a read for each of its users. */
241
+ readonly needRead: true;
242
+ /** The persons with no row that the option `leave-out` left out of the draw. With no option, the list is empty. */
243
+ readonly leftOut: readonly Person[];
244
+ }
245
+ /** No household fragment: the draw has no read. A low rate gives too many days, so the function gives no layer. */
246
+ export interface HouseholdFragmentNoRead extends HouseholdStoresResult {
247
+ readonly layer: undefined;
248
+ /** The food energy of the household for one day. It is `undefined` when the household has no person. */
249
+ readonly need: CalorieNeedTotal | undefined;
250
+ readonly needRead: false;
251
+ /** The persons with no row in the table. */
252
+ readonly noRow: readonly Person[];
253
+ /** The reason for no layer. */
254
+ readonly why: string;
255
+ }
256
+ /** The household fragment, or a no read of the draw. Both have the reads of the buy list. */
257
+ export type HouseholdFragmentResult = HouseholdFragmentRead | HouseholdFragmentNoRead;
258
+ /**
259
+ * This function joins a household and a buy list into a fragment of an endurance layer.
260
+ *
261
+ * - The fragment has one draw of food energy. Its rate is the need of the persons for one day, and its users are the persons.
262
+ * - Each gift of the buy list with a read is one store, with the `id` `<prefix>:<product>:<resource>`. A gift with no read has no store.
263
+ * - The resources are the resources of the stores and `food.no-cook`, with the units of the catalog.
264
+ * - The direct use of `food.no-cook` gives 1 kcal of the need for each kcal.
265
+ * - The fragment has no converter. A caller adds converters for the dry food, with the water and the fuel of each run.
266
+ *
267
+ * A person with no row in the table gives no layer, because a low rate gives too many days.
268
+ * The option `noRow: "leave-out"` leaves those persons out of the draw. A draw of 0 kcal gives no layer.
269
+ * The function is pure.
270
+ *
271
+ * @param input - The persons, the activity level, the catalog and the buy list, the supply part and the level of the draw
272
+ * @returns The fragment or a no read of the draw, with the energy of the list and the gifts with no read
273
+ * @throws RangeError for the errors of `calorieNeed`, `giftsOf` and `buyListEnergy`, except a household with no person
274
+ * @throws RangeError when the catalog has no resource `food.no-cook` in `kcal`
275
+ */
276
+ export declare function householdFragment(input: HouseholdFragmentInput): HouseholdFragmentResult;
277
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/source.ts","../src/calorie.ts","../src/data.ts","../src/check.ts","../src/household.ts"],"mappings":";;;;;;;YASY,eAAe;WAAoB;;;qBCDlC;;YAGD,wBAAwB;;qBAGvB;;YAGD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