@pie-element/match-list 5.0.2-esm.0 → 5.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/CHANGELOG.md +8 -0
- package/controller/CHANGELOG.md +8 -0
- package/controller/package.json +3 -3
- package/package.json +7 -19
- package/esm/controller.js +0 -223
- package/esm/controller.js.map +0 -1
- package/esm/element.js +0 -2757
- package/esm/element.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/match-list@4.0.0...@pie-element/match-list@5.1.0) (2025-10-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/match-list
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [5.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/match-list@3.3.0...@pie-element/match-list@5.0.0) (2025-10-02)
|
|
7
15
|
|
|
8
16
|
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/match-list-controller@4.0.0...@pie-element/match-list-controller@4.1.0) (2025-10-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/match-list-controller
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [4.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/match-list-controller@3.3.0...@pie-element/match-list-controller@4.0.1) (2025-10-02)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-element/match-list-controller
|
package/controller/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/match-list-controller",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "4.0
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"test": "./node_modules/.bin/jest"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@pie-lib/controller-utils": "^0.
|
|
13
|
-
"@pie-lib/feedback": "^0.
|
|
12
|
+
"@pie-lib/controller-utils": "^0.18.0",
|
|
13
|
+
"@pie-lib/feedback": "^0.20.0",
|
|
14
14
|
"debug": "^3.1.0",
|
|
15
15
|
"lodash": "^4.17.15"
|
|
16
16
|
},
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "5.
|
|
7
|
+
"version": "5.1.0",
|
|
8
8
|
"description": "",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"@material-ui/core": "^3.9.2",
|
|
15
15
|
"@material-ui/icons": "^3.0.2",
|
|
16
16
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
17
|
-
"@pie-lib/correct-answer-toggle": "^2.
|
|
18
|
-
"@pie-lib/drag": "^2.
|
|
19
|
-
"@pie-lib/math-rendering": "^3.
|
|
20
|
-
"@pie-lib/render-ui": "^4.
|
|
17
|
+
"@pie-lib/correct-answer-toggle": "^2.21.0",
|
|
18
|
+
"@pie-lib/drag": "^2.18.0",
|
|
19
|
+
"@pie-lib/math-rendering": "^3.18.0",
|
|
20
|
+
"@pie-lib/render-ui": "^4.31.0",
|
|
21
21
|
"classnames": "^2.2.5",
|
|
22
22
|
"debug": "^4.1.1",
|
|
23
23
|
"lodash": "^4.17.10",
|
|
@@ -28,19 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"author": "",
|
|
30
30
|
"license": "ISC",
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "e6dde692b33cb1d42c6b2958fff7520dc40ca82c",
|
|
32
32
|
"main": "lib/index.js",
|
|
33
|
-
"module": "src/index.js"
|
|
34
|
-
"exports": {
|
|
35
|
-
".": {
|
|
36
|
-
"import": "./esm/element.js",
|
|
37
|
-
"require": "./lib/index.js",
|
|
38
|
-
"default": "./esm/element.js"
|
|
39
|
-
},
|
|
40
|
-
"./controller": {
|
|
41
|
-
"import": "./esm/controller.js",
|
|
42
|
-
"require": "./controller/lib/index.js",
|
|
43
|
-
"default": "./esm/controller.js"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
33
|
+
"module": "src/index.js"
|
|
46
34
|
}
|
package/esm/controller.js
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import isEmpty from 'lodash/isEmpty';
|
|
2
|
-
import { getFeedbackForCorrectness } from '@pie-lib/feedback';
|
|
3
|
-
import { lockChoices, getShuffledChoices, partialScoring } from '@pie-lib/controller-utils';
|
|
4
|
-
import debug from 'debug';
|
|
5
|
-
|
|
6
|
-
function _extends() {
|
|
7
|
-
_extends = Object.assign || function (target) {
|
|
8
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
9
|
-
var source = arguments[i];
|
|
10
|
-
|
|
11
|
-
for (var key in source) {
|
|
12
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
13
|
-
target[key] = source[key];
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return _extends.apply(this, arguments);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var defaults = {
|
|
25
|
-
config: {
|
|
26
|
-
answers: [],
|
|
27
|
-
prompt: '',
|
|
28
|
-
prompts: [],
|
|
29
|
-
shuffled: false
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const log = debug('@pie-element:match-list:controller');
|
|
34
|
-
|
|
35
|
-
const getResponseCorrectness = (model, answers, env) => {
|
|
36
|
-
const isPartialScoring = partialScoring.enabled(model, env);
|
|
37
|
-
const prompts = model.prompts;
|
|
38
|
-
|
|
39
|
-
if (!answers || Object.keys(answers).length === 0) {
|
|
40
|
-
return 'unanswered';
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const totalCorrectAnswers = getTotalCorrect(model);
|
|
44
|
-
const correctAnswers = getCorrectSelected(prompts, answers);
|
|
45
|
-
|
|
46
|
-
if (totalCorrectAnswers === correctAnswers) {
|
|
47
|
-
return 'correct';
|
|
48
|
-
} else if (correctAnswers === 0) {
|
|
49
|
-
return 'incorrect';
|
|
50
|
-
} else if (isPartialScoring) {
|
|
51
|
-
return 'partial';
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return 'incorrect';
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const getCorrectness = (question, env, answers) => {
|
|
58
|
-
if (env.mode === 'evaluate') {
|
|
59
|
-
return getResponseCorrectness(question, answers, env);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const getCorrectSelected = (prompts = [], answers) => {
|
|
64
|
-
let correctAnswers = 0;
|
|
65
|
-
prompts.forEach(p => {
|
|
66
|
-
if (p.relatedAnswer === answers[p.id]) {
|
|
67
|
-
correctAnswers += 1;
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
return correctAnswers;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const getTotalCorrect = question => {
|
|
74
|
-
return question && question.prompts ? question.prompts.length : 0;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const getPartialScore = (question, answers) => {
|
|
78
|
-
const count = getCorrectSelected(question && question.prompts, answers);
|
|
79
|
-
const totalCorrect = getTotalCorrect(question);
|
|
80
|
-
return parseFloat((count / totalCorrect).toFixed(2));
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const getOutComeScore = (question, env, answers) => {
|
|
84
|
-
const correctness = getCorrectness(question, env, answers);
|
|
85
|
-
return correctness === 'correct' ? 1 : correctness === 'partial' && true ? getPartialScore(question, answers) : 0;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const outcome = (question, session, env) => {
|
|
89
|
-
return new Promise(resolve => {
|
|
90
|
-
if (env.mode !== 'evaluate') {
|
|
91
|
-
resolve({
|
|
92
|
-
score: undefined,
|
|
93
|
-
completed: undefined
|
|
94
|
-
});
|
|
95
|
-
} else {
|
|
96
|
-
if (!session || isEmpty(session)) {
|
|
97
|
-
resolve({
|
|
98
|
-
score: 0,
|
|
99
|
-
empty: true
|
|
100
|
-
});
|
|
101
|
-
} else {
|
|
102
|
-
const out = {
|
|
103
|
-
score: getOutComeScore(question, env, session.value)
|
|
104
|
-
};
|
|
105
|
-
resolve(out);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
function createDefaultModel(model = {}) {
|
|
111
|
-
return new Promise(resolve => {
|
|
112
|
-
resolve(_extends({}, defaults, model));
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
const normalize = model => _extends({}, defaults, model);
|
|
116
|
-
/**
|
|
117
|
-
*
|
|
118
|
-
* @param {*} question
|
|
119
|
-
* @param {*} session
|
|
120
|
-
* @param {*} env
|
|
121
|
-
* @param {*} updateSession - optional - a function that will set the properties passed into it on the session.
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
|
-
function model(question, session, env, updateSession) {
|
|
125
|
-
return new Promise(async resolve => {
|
|
126
|
-
question = normalize(question);
|
|
127
|
-
const correctness = getCorrectness(question, env, session && session.value);
|
|
128
|
-
const correctResponse = {};
|
|
129
|
-
const score = `${getOutComeScore(question, env, session && session.value) * 100}%`;
|
|
130
|
-
const correctInfo = {
|
|
131
|
-
score,
|
|
132
|
-
correctness
|
|
133
|
-
};
|
|
134
|
-
const shuffledValues = {};
|
|
135
|
-
let prompts = question.prompts;
|
|
136
|
-
let answers = question.answers;
|
|
137
|
-
|
|
138
|
-
const us = part => (id, element, update) => {
|
|
139
|
-
return new Promise(resolve => {
|
|
140
|
-
shuffledValues[part] = update.shuffledValues;
|
|
141
|
-
resolve();
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
const lockChoiceOrder = lockChoices(question, session, env);
|
|
146
|
-
|
|
147
|
-
if (!lockChoiceOrder) {
|
|
148
|
-
prompts = await getShuffledChoices(prompts, {
|
|
149
|
-
shuffledValues: (session && session.shuffledValues || {}).prompts
|
|
150
|
-
}, us('prompts'), 'id');
|
|
151
|
-
answers = await getShuffledChoices(answers, {
|
|
152
|
-
shuffledValues: (session && session.shuffledValues || {}).answers
|
|
153
|
-
}, us('answers'), 'id');
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
if (!isEmpty(shuffledValues)) {
|
|
157
|
-
if (updateSession && typeof updateSession === 'function') {
|
|
158
|
-
updateSession(session.id, session.element, {
|
|
159
|
-
shuffledValues
|
|
160
|
-
}).catch(e => {
|
|
161
|
-
// eslint-disable-next-line no-console
|
|
162
|
-
console.error('update session failed', e);
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
if (question && prompts) {
|
|
168
|
-
prompts.forEach(prompt => {
|
|
169
|
-
correctResponse[prompt.id] = prompt.relatedAnswer;
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const fb = env.mode === 'evaluate' ? getFeedbackForCorrectness(correctInfo.correctness, question.feedback) : Promise.resolve(undefined);
|
|
174
|
-
fb.then(feedback => {
|
|
175
|
-
const base = {
|
|
176
|
-
config: _extends({}, question, {
|
|
177
|
-
prompts,
|
|
178
|
-
answers
|
|
179
|
-
}),
|
|
180
|
-
correctness: correctInfo,
|
|
181
|
-
feedback,
|
|
182
|
-
mode: env.mode
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {
|
|
186
|
-
base.rationale = question.rationale;
|
|
187
|
-
} else {
|
|
188
|
-
base.rationale = null;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
const out = Object.assign(base, {
|
|
192
|
-
correctResponse
|
|
193
|
-
});
|
|
194
|
-
log('out: ', out);
|
|
195
|
-
resolve(out);
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
const createCorrectResponseSession = (question, env) => {
|
|
200
|
-
return new Promise(resolve => {
|
|
201
|
-
if (env.mode !== 'evaluate' && env.role === 'instructor') {
|
|
202
|
-
const {
|
|
203
|
-
prompts,
|
|
204
|
-
answers
|
|
205
|
-
} = question;
|
|
206
|
-
const value = {};
|
|
207
|
-
prompts.forEach(p => {
|
|
208
|
-
if (answers.filter(a => a.id === p.relatedAnswer).length) {
|
|
209
|
-
value[p.id] = p.relatedAnswer;
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
resolve({
|
|
213
|
-
value,
|
|
214
|
-
id: '1'
|
|
215
|
-
});
|
|
216
|
-
} else {
|
|
217
|
-
resolve(null);
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
export { createCorrectResponseSession, createDefaultModel, model, normalize, outcome };
|
|
223
|
-
//# sourceMappingURL=controller.js.map
|
package/esm/controller.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controller.js","sources":["../controller/src/defaults.js","../controller/src/index.js"],"sourcesContent":["export default {\n config: {\n answers: [],\n prompt: '',\n prompts: [],\n shuffled: false,\n },\n};\n","import isEmpty from 'lodash/isEmpty';\nimport { getFeedbackForCorrectness } from '@pie-lib/feedback';\nimport { lockChoices, getShuffledChoices, partialScoring } from '@pie-lib/controller-utils';\nimport debug from 'debug';\n\nconst log = debug('@pie-element:match-list:controller');\n\nimport defaults from './defaults';\n\nconst getResponseCorrectness = (model, answers, env) => {\n const isPartialScoring = partialScoring.enabled(model, env);\n const prompts = model.prompts;\n\n if (!answers || Object.keys(answers).length === 0) {\n return 'unanswered';\n }\n\n const totalCorrectAnswers = getTotalCorrect(model);\n const correctAnswers = getCorrectSelected(prompts, answers);\n\n if (totalCorrectAnswers === correctAnswers) {\n return 'correct';\n } else if (correctAnswers === 0) {\n return 'incorrect';\n } else if (isPartialScoring) {\n return 'partial';\n }\n\n return 'incorrect';\n};\n\nconst getCorrectness = (question, env, answers) => {\n if (env.mode === 'evaluate') {\n return getResponseCorrectness(question, answers, env);\n }\n};\n\nconst getCorrectSelected = (prompts = [], answers) => {\n let correctAnswers = 0;\n\n prompts.forEach((p) => {\n if (p.relatedAnswer === answers[p.id]) {\n correctAnswers += 1;\n }\n });\n\n return correctAnswers;\n};\n\nconst getTotalCorrect = (question) => {\n return question && question.prompts ? question.prompts.length : 0;\n};\n\nconst getPartialScore = (question, answers) => {\n const count = getCorrectSelected(question && question.prompts, answers);\n const totalCorrect = getTotalCorrect(question);\n\n return parseFloat((count / totalCorrect).toFixed(2));\n};\n\nconst getOutComeScore = (question, env, answers) => {\n const correctness = getCorrectness(question, env, answers);\n\n return correctness === 'correct' ? 1 : correctness === 'partial' && true ? getPartialScore(question, answers) : 0;\n};\n\nexport const outcome = (question, session, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate') {\n resolve({ score: undefined, completed: undefined });\n } else {\n if (!session || isEmpty(session)) {\n resolve({ score: 0, empty: true });\n } else {\n const out = {\n score: getOutComeScore(question, env, session.value),\n };\n\n resolve(out);\n }\n }\n });\n};\n\nexport function createDefaultModel(model = {}) {\n return new Promise((resolve) => {\n resolve({\n ...defaults,\n ...model,\n });\n });\n}\n\nexport const normalize = (model) => ({ ...defaults, ...model });\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport function model(question, session, env, updateSession) {\n return new Promise(async (resolve) => {\n question = normalize(question);\n const correctness = getCorrectness(question, env, session && session.value);\n const correctResponse = {};\n const score = `${getOutComeScore(question, env, session && session.value) * 100}%`;\n const correctInfo = {\n score,\n correctness,\n };\n\n const shuffledValues = {};\n let prompts = question.prompts;\n let answers = question.answers;\n\n const us = (part) => (id, element, update) => {\n return new Promise((resolve) => {\n shuffledValues[part] = update.shuffledValues;\n resolve();\n });\n };\n\n const lockChoiceOrder = lockChoices(question, session, env);\n\n if (!lockChoiceOrder) {\n prompts = await getShuffledChoices(\n prompts,\n { shuffledValues: ((session && session.shuffledValues) || {}).prompts },\n us('prompts'),\n 'id',\n );\n answers = await getShuffledChoices(\n answers,\n { shuffledValues: ((session && session.shuffledValues) || {}).answers },\n us('answers'),\n 'id',\n );\n }\n\n if (!isEmpty(shuffledValues)) {\n if (updateSession && typeof updateSession === 'function') {\n updateSession(session.id, session.element, {\n shuffledValues,\n }).catch((e) => {\n // eslint-disable-next-line no-console\n console.error('update session failed', e);\n });\n }\n }\n\n if (question && prompts) {\n prompts.forEach((prompt) => {\n correctResponse[prompt.id] = prompt.relatedAnswer;\n });\n }\n\n const fb =\n env.mode === 'evaluate'\n ? getFeedbackForCorrectness(correctInfo.correctness, question.feedback)\n : Promise.resolve(undefined);\n\n fb.then((feedback) => {\n const base = {\n config: {\n ...question,\n prompts,\n answers,\n },\n correctness: correctInfo,\n feedback,\n mode: env.mode,\n };\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n base.rationale = question.rationale;\n } else {\n base.rationale = null;\n }\n\n const out = Object.assign(base, {\n correctResponse,\n });\n\n log('out: ', out);\n resolve(out);\n });\n });\n}\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { prompts, answers } = question;\n const value = {};\n\n prompts.forEach((p) => {\n if (answers.filter((a) => a.id === p.relatedAnswer).length) {\n value[p.id] = p.relatedAnswer;\n }\n });\n\n resolve({\n value,\n id: '1',\n });\n } else {\n resolve(null);\n }\n });\n};\n"],"names":["config","answers","prompt","prompts","shuffled","log","debug","getResponseCorrectness","model","env","isPartialScoring","partialScoring","enabled","Object","keys","length","totalCorrectAnswers","getTotalCorrect","correctAnswers","getCorrectSelected","getCorrectness","question","mode","forEach","p","relatedAnswer","id","getPartialScore","count","totalCorrect","parseFloat","toFixed","getOutComeScore","correctness","outcome","session","Promise","resolve","score","undefined","completed","isEmpty","empty","out","value","createDefaultModel","defaults","normalize","updateSession","correctResponse","correctInfo","shuffledValues","us","part","element","update","lockChoiceOrder","lockChoices","getShuffledChoices","catch","e","console","error","fb","getFeedbackForCorrectness","feedback","then","base","role","rationale","assign","createCorrectResponseSession","filter","a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,eAAe;AACbA,EAAAA,MAAM,EAAE;AACNC,IAAAA,OAAO,EAAE,EADH;AAENC,IAAAA,MAAM,EAAE,EAFF;AAGNC,IAAAA,OAAO,EAAE,EAHH;AAINC,IAAAA,QAAQ,EAAE,KAAA;AAJJ,GAAA;AADK,CAAf;;ACKA,MAAMC,GAAG,GAAGC,KAAK,CAAC,oCAAD,CAAjB,CAAA;;AAIA,MAAMC,sBAAsB,GAAG,CAACC,KAAD,EAAQP,OAAR,EAAiBQ,GAAjB,KAAyB;AACtD,EAAMC,MAAAA,gBAAgB,GAAGC,cAAc,CAACC,OAAf,CAAuBJ,KAAvB,EAA8BC,GAA9B,CAAzB,CAAA;AACA,EAAA,MAAMN,OAAO,GAAGK,KAAK,CAACL,OAAtB,CAAA;;AAEA,EAAA,IAAI,CAACF,OAAD,IAAYY,MAAM,CAACC,IAAP,CAAYb,OAAZ,CAAqBc,CAAAA,MAArB,KAAgC,CAAhD,EAAmD;AACjD,IAAA,O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