samlesa 2.12.3
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/.editorconfig +19 -0
- package/.github/FUNDING.yml +1 -0
- package/.idea/compiler.xml +6 -0
- package/.idea/deployment.xml +14 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/jsLibraryMappings.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/samlify.iml +12 -0
- package/.idea/vcs.xml +6 -0
- package/.pre-commit.sh +15 -0
- package/.snyk +8 -0
- package/.travis.yml +29 -0
- package/LICENSE +22 -0
- package/Makefile +25 -0
- package/README.md +84 -0
- package/build/.idea/workspace.xml +58 -0
- package/build/index.js +65 -0
- package/build/index.js.map +1 -0
- package/build/src/api.js +24 -0
- package/build/src/api.js.map +1 -0
- package/build/src/binding-post.js +369 -0
- package/build/src/binding-post.js.map +1 -0
- package/build/src/binding-redirect.js +333 -0
- package/build/src/binding-redirect.js.map +1 -0
- package/build/src/binding-simplesign.js +233 -0
- package/build/src/binding-simplesign.js.map +1 -0
- package/build/src/entity-idp.js +131 -0
- package/build/src/entity-idp.js.map +1 -0
- package/build/src/entity-sp.js +97 -0
- package/build/src/entity-sp.js.map +1 -0
- package/build/src/entity.js +236 -0
- package/build/src/entity.js.map +1 -0
- package/build/src/extractor.js +370 -0
- package/build/src/extractor.js.map +1 -0
- package/build/src/flow.js +320 -0
- package/build/src/flow.js.map +1 -0
- package/build/src/libsaml.js +642 -0
- package/build/src/libsaml.js.map +1 -0
- package/build/src/metadata-idp.js +128 -0
- package/build/src/metadata-idp.js.map +1 -0
- package/build/src/metadata-sp.js +232 -0
- package/build/src/metadata-sp.js.map +1 -0
- package/build/src/metadata.js +177 -0
- package/build/src/metadata.js.map +1 -0
- package/build/src/types.js +12 -0
- package/build/src/types.js.map +1 -0
- package/build/src/urn.js +213 -0
- package/build/src/urn.js.map +1 -0
- package/build/src/utility.js +249 -0
- package/build/src/utility.js.map +1 -0
- package/build/src/validator.js +27 -0
- package/build/src/validator.js.map +1 -0
- package/index.d.ts +10 -0
- package/index.js +19 -0
- package/index.js.map +1 -0
- package/index.ts +28 -0
- package/package.json +74 -0
- package/qodana.yaml +29 -0
- package/src/.idea/modules.xml +8 -0
- package/src/.idea/src.iml +12 -0
- package/src/.idea/vcs.xml +6 -0
- package/src/api.ts +36 -0
- package/src/binding-post.ts +338 -0
- package/src/binding-redirect.ts +331 -0
- package/src/binding-simplesign.ts +231 -0
- package/src/entity-idp.ts +145 -0
- package/src/entity-sp.ts +114 -0
- package/src/entity.ts +243 -0
- package/src/extractor.ts +392 -0
- package/src/flow.ts +467 -0
- package/src/libsaml.ts +786 -0
- package/src/metadata-idp.ts +146 -0
- package/src/metadata-sp.ts +268 -0
- package/src/metadata.ts +166 -0
- package/src/types.ts +153 -0
- package/src/urn.ts +211 -0
- package/src/utility.ts +248 -0
- package/src/validator.ts +44 -0
- package/tsconfig.json +38 -0
- package/tslint.json +35 -0
- package/types/index.d.ts +10 -0
- package/types/src/api.d.ts +13 -0
- package/types/src/binding-post.d.ts +46 -0
- package/types/src/binding-redirect.d.ts +52 -0
- package/types/src/binding-simplesign.d.ts +39 -0
- package/types/src/entity-idp.d.ts +42 -0
- package/types/src/entity-sp.d.ts +36 -0
- package/types/src/entity.d.ts +99 -0
- package/types/src/extractor.d.ts +25 -0
- package/types/src/flow.d.ts +6 -0
- package/types/src/libsaml.d.ts +210 -0
- package/types/src/metadata-idp.d.ts +24 -0
- package/types/src/metadata-sp.d.ts +36 -0
- package/types/src/metadata.d.ts +57 -0
- package/types/src/types.d.ts +127 -0
- package/types/src/urn.d.ts +194 -0
- package/types/src/utility.d.ts +134 -0
- package/types/src/validator.d.ts +3 -0
- package/types.d.ts +2 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.logoutResponseFields = exports.logoutRequestFields = exports.loginResponseFields = exports.logoutResponseStatusFields = exports.loginResponseStatusFields = exports.loginRequestFields = void 0;
|
|
7
|
+
exports.extract = extract;
|
|
8
|
+
const xpath_1 = require("xpath");
|
|
9
|
+
const utility_js_1 = require("./utility.js");
|
|
10
|
+
const api_js_1 = require("./api.js");
|
|
11
|
+
const camelcase_1 = __importDefault(require("camelcase"));
|
|
12
|
+
function buildAbsoluteXPath(paths) {
|
|
13
|
+
return paths.reduce((currentPath, name) => {
|
|
14
|
+
let appendedPath = currentPath;
|
|
15
|
+
const isWildcard = name.startsWith('~');
|
|
16
|
+
if (isWildcard) {
|
|
17
|
+
const pathName = name.replace('~', '');
|
|
18
|
+
appendedPath = currentPath + `/*[contains(local-name(), '${pathName}')]`;
|
|
19
|
+
}
|
|
20
|
+
if (!isWildcard) {
|
|
21
|
+
appendedPath = currentPath + `/*[local-name(.)='${name}']`;
|
|
22
|
+
}
|
|
23
|
+
return appendedPath;
|
|
24
|
+
}, '');
|
|
25
|
+
}
|
|
26
|
+
function buildAttributeXPath(attributes) {
|
|
27
|
+
if (attributes.length === 0) {
|
|
28
|
+
return '/text()';
|
|
29
|
+
}
|
|
30
|
+
if (attributes.length === 1) {
|
|
31
|
+
return `/@${attributes[0]}`;
|
|
32
|
+
}
|
|
33
|
+
const filters = attributes.map(attribute => `name()='${attribute}'`).join(' or ');
|
|
34
|
+
return `/@*[${filters}]`;
|
|
35
|
+
}
|
|
36
|
+
exports.loginRequestFields = [
|
|
37
|
+
{
|
|
38
|
+
key: 'request',
|
|
39
|
+
localPath: ['AuthnRequest'],
|
|
40
|
+
attributes: ['ID', 'IssueInstant', 'Destination', 'AssertionConsumerServiceURL']
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
key: 'issuer',
|
|
44
|
+
localPath: ['AuthnRequest', 'Issuer'],
|
|
45
|
+
attributes: []
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: 'nameIDPolicy',
|
|
49
|
+
localPath: ['AuthnRequest', 'NameIDPolicy'],
|
|
50
|
+
attributes: ['Format', 'AllowCreate']
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: 'authnContextClassRef',
|
|
54
|
+
localPath: ['AuthnRequest', 'AuthnContextClassRef'],
|
|
55
|
+
attributes: []
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: 'signature',
|
|
59
|
+
localPath: ['AuthnRequest', 'Signature'],
|
|
60
|
+
attributes: [],
|
|
61
|
+
context: true
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
// support two-tiers status code
|
|
65
|
+
exports.loginResponseStatusFields = [
|
|
66
|
+
{
|
|
67
|
+
key: 'top',
|
|
68
|
+
localPath: ['Response', 'Status', 'StatusCode'],
|
|
69
|
+
attributes: ['Value'],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
key: 'second',
|
|
73
|
+
localPath: ['Response', 'Status', 'StatusCode', 'StatusCode'],
|
|
74
|
+
attributes: ['Value'],
|
|
75
|
+
}
|
|
76
|
+
];
|
|
77
|
+
// support two-tiers status code
|
|
78
|
+
exports.logoutResponseStatusFields = [
|
|
79
|
+
{
|
|
80
|
+
key: 'top',
|
|
81
|
+
localPath: ['LogoutResponse', 'Status', 'StatusCode'],
|
|
82
|
+
attributes: ['Value']
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: 'second',
|
|
86
|
+
localPath: ['LogoutResponse', 'Status', 'StatusCode', 'StatusCode'],
|
|
87
|
+
attributes: ['Value'],
|
|
88
|
+
}
|
|
89
|
+
];
|
|
90
|
+
const loginResponseFields = assertion => [
|
|
91
|
+
{
|
|
92
|
+
key: 'conditions',
|
|
93
|
+
localPath: ['Assertion', 'Conditions'],
|
|
94
|
+
attributes: ['NotBefore', 'NotOnOrAfter'],
|
|
95
|
+
shortcut: assertion
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
key: 'response',
|
|
99
|
+
localPath: ['Response'],
|
|
100
|
+
attributes: ['ID', 'IssueInstant', 'Destination', 'InResponseTo'],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
key: 'audience',
|
|
104
|
+
localPath: ['Assertion', 'Conditions', 'AudienceRestriction', 'Audience'],
|
|
105
|
+
attributes: [],
|
|
106
|
+
shortcut: assertion
|
|
107
|
+
},
|
|
108
|
+
// {
|
|
109
|
+
// key: 'issuer',
|
|
110
|
+
// localPath: ['Response', 'Issuer'],
|
|
111
|
+
// attributes: []
|
|
112
|
+
// },
|
|
113
|
+
{
|
|
114
|
+
key: 'issuer',
|
|
115
|
+
localPath: ['Assertion', 'Issuer'],
|
|
116
|
+
attributes: [],
|
|
117
|
+
shortcut: assertion
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: 'nameID',
|
|
121
|
+
localPath: ['Assertion', 'Subject', 'NameID'],
|
|
122
|
+
attributes: [],
|
|
123
|
+
shortcut: assertion
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
key: 'sessionIndex',
|
|
127
|
+
localPath: ['Assertion', 'AuthnStatement'],
|
|
128
|
+
attributes: ['AuthnInstant', 'SessionNotOnOrAfter', 'SessionIndex'],
|
|
129
|
+
shortcut: assertion
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: 'attributes',
|
|
133
|
+
localPath: ['Assertion', 'AttributeStatement', 'Attribute'],
|
|
134
|
+
index: ['Name'],
|
|
135
|
+
attributePath: ['AttributeValue'],
|
|
136
|
+
attributes: [],
|
|
137
|
+
shortcut: assertion
|
|
138
|
+
}
|
|
139
|
+
];
|
|
140
|
+
exports.loginResponseFields = loginResponseFields;
|
|
141
|
+
exports.logoutRequestFields = [
|
|
142
|
+
{
|
|
143
|
+
key: 'request',
|
|
144
|
+
localPath: ['LogoutRequest'],
|
|
145
|
+
attributes: ['ID', 'IssueInstant', 'Destination']
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
key: 'issuer',
|
|
149
|
+
localPath: ['LogoutRequest', 'Issuer'],
|
|
150
|
+
attributes: []
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
key: 'nameID',
|
|
154
|
+
localPath: ['LogoutRequest', 'NameID'],
|
|
155
|
+
attributes: []
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
key: 'sessionIndex',
|
|
159
|
+
localPath: ['LogoutRequest', 'SessionIndex'],
|
|
160
|
+
attributes: []
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
key: 'signature',
|
|
164
|
+
localPath: ['LogoutRequest', 'Signature'],
|
|
165
|
+
attributes: [],
|
|
166
|
+
context: true
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
exports.logoutResponseFields = [
|
|
170
|
+
{
|
|
171
|
+
key: 'response',
|
|
172
|
+
localPath: ['LogoutResponse'],
|
|
173
|
+
attributes: ['ID', 'Destination', 'InResponseTo']
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
key: 'issuer',
|
|
177
|
+
localPath: ['LogoutResponse', 'Issuer'],
|
|
178
|
+
attributes: []
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
key: 'signature',
|
|
182
|
+
localPath: ['LogoutResponse', 'Signature'],
|
|
183
|
+
attributes: [],
|
|
184
|
+
context: true
|
|
185
|
+
}
|
|
186
|
+
];
|
|
187
|
+
function extract(context, fields) {
|
|
188
|
+
const { dom } = (0, api_js_1.getContext)();
|
|
189
|
+
const rootDoc = dom.parseFromString(context);
|
|
190
|
+
return fields.reduce((result, field) => {
|
|
191
|
+
// get essential fields
|
|
192
|
+
const key = field.key;
|
|
193
|
+
const localPath = field.localPath;
|
|
194
|
+
const attributes = field.attributes;
|
|
195
|
+
const isEntire = field.context;
|
|
196
|
+
const shortcut = field.shortcut;
|
|
197
|
+
// get optional fields
|
|
198
|
+
const index = field.index;
|
|
199
|
+
const attributePath = field.attributePath;
|
|
200
|
+
// set allowing overriding if there is a shortcut injected
|
|
201
|
+
let targetDoc = rootDoc;
|
|
202
|
+
// if shortcut is used, then replace the doc
|
|
203
|
+
// it's a design for overriding the doc used during runtime
|
|
204
|
+
if (shortcut) {
|
|
205
|
+
targetDoc = dom.parseFromString(shortcut);
|
|
206
|
+
}
|
|
207
|
+
// special case: multiple path
|
|
208
|
+
/*
|
|
209
|
+
{
|
|
210
|
+
key: 'issuer',
|
|
211
|
+
localPath: [
|
|
212
|
+
['Response', 'Issuer'],
|
|
213
|
+
['Response', 'Assertion', 'Issuer']
|
|
214
|
+
],
|
|
215
|
+
attributes: []
|
|
216
|
+
}
|
|
217
|
+
*/
|
|
218
|
+
if (localPath.every(path => Array.isArray(path))) {
|
|
219
|
+
const multiXPaths = localPath
|
|
220
|
+
.map(path => {
|
|
221
|
+
// not support attribute yet, so ignore it
|
|
222
|
+
return `${buildAbsoluteXPath(path)}/text()`;
|
|
223
|
+
})
|
|
224
|
+
.join(' | ');
|
|
225
|
+
return {
|
|
226
|
+
...result,
|
|
227
|
+
[key]: (0, utility_js_1.uniq)((0, xpath_1.select)(multiXPaths, targetDoc).map((n) => n.nodeValue).filter(utility_js_1.notEmpty))
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
// eo special case: multiple path
|
|
231
|
+
const baseXPath = buildAbsoluteXPath(localPath);
|
|
232
|
+
const attributeXPath = buildAttributeXPath(attributes);
|
|
233
|
+
// special case: get attributes where some are in child, some are in parent
|
|
234
|
+
/*
|
|
235
|
+
{
|
|
236
|
+
key: 'attributes',
|
|
237
|
+
localPath: ['Response', 'Assertion', 'AttributeStatement', 'Attribute'],
|
|
238
|
+
index: ['Name'],
|
|
239
|
+
attributePath: ['AttributeValue'],
|
|
240
|
+
attributes: []
|
|
241
|
+
}
|
|
242
|
+
*/
|
|
243
|
+
if (index && attributePath) {
|
|
244
|
+
// find the index in localpath
|
|
245
|
+
const indexPath = buildAttributeXPath(index);
|
|
246
|
+
const fullLocalXPath = `${baseXPath}${indexPath}`;
|
|
247
|
+
const parentNodes = (0, xpath_1.select)(baseXPath, targetDoc);
|
|
248
|
+
// [uid, mail, edupersonaffiliation], ready for aggregate
|
|
249
|
+
const parentAttributes = (0, xpath_1.select)(fullLocalXPath, targetDoc).map((n) => n.value);
|
|
250
|
+
// [attribute, attributevalue]
|
|
251
|
+
const childXPath = buildAbsoluteXPath([(0, utility_js_1.last)(localPath)].concat(attributePath));
|
|
252
|
+
const childAttributeXPath = buildAttributeXPath(attributes);
|
|
253
|
+
const fullChildXPath = `${childXPath}${childAttributeXPath}`;
|
|
254
|
+
// [ 'test', 'test@example.com', [ 'users', 'examplerole1' ] ]
|
|
255
|
+
const childAttributes = parentNodes.map(node => {
|
|
256
|
+
const nodeDoc = dom.parseFromString(node.toString());
|
|
257
|
+
if (attributes.length === 0) {
|
|
258
|
+
const childValues = (0, xpath_1.select)(fullChildXPath, nodeDoc).map((n) => n.nodeValue);
|
|
259
|
+
if (childValues.length === 1) {
|
|
260
|
+
return childValues[0];
|
|
261
|
+
}
|
|
262
|
+
return childValues;
|
|
263
|
+
}
|
|
264
|
+
if (attributes.length > 0) {
|
|
265
|
+
const childValues = (0, xpath_1.select)(fullChildXPath, nodeDoc).map((n) => n.value);
|
|
266
|
+
if (childValues.length === 1) {
|
|
267
|
+
return childValues[0];
|
|
268
|
+
}
|
|
269
|
+
return childValues;
|
|
270
|
+
}
|
|
271
|
+
return null;
|
|
272
|
+
});
|
|
273
|
+
// aggregation
|
|
274
|
+
const obj = (0, utility_js_1.zipObject)(parentAttributes, childAttributes, false);
|
|
275
|
+
return {
|
|
276
|
+
...result,
|
|
277
|
+
[key]: obj
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
// case: fetch entire content, only allow one existence
|
|
281
|
+
/*
|
|
282
|
+
{
|
|
283
|
+
key: 'signature',
|
|
284
|
+
localPath: ['AuthnRequest', 'Signature'],
|
|
285
|
+
attributes: [],
|
|
286
|
+
context: true
|
|
287
|
+
}
|
|
288
|
+
*/
|
|
289
|
+
if (isEntire) {
|
|
290
|
+
const node = (0, xpath_1.select)(baseXPath, targetDoc);
|
|
291
|
+
let value = null;
|
|
292
|
+
if (node.length === 1) {
|
|
293
|
+
value = node[0].toString();
|
|
294
|
+
}
|
|
295
|
+
if (node.length > 1) {
|
|
296
|
+
value = node.map(n => n.toString());
|
|
297
|
+
}
|
|
298
|
+
return {
|
|
299
|
+
...result,
|
|
300
|
+
[key]: value
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
// case: multiple attribute
|
|
304
|
+
/*
|
|
305
|
+
{
|
|
306
|
+
key: 'nameIDPolicy',
|
|
307
|
+
localPath: ['AuthnRequest', 'NameIDPolicy'],
|
|
308
|
+
attributes: ['Format', 'AllowCreate']
|
|
309
|
+
}
|
|
310
|
+
*/
|
|
311
|
+
if (attributes.length > 1) {
|
|
312
|
+
const baseNode = (0, xpath_1.select)(baseXPath, targetDoc).map(n => n.toString());
|
|
313
|
+
const childXPath = `${buildAbsoluteXPath([(0, utility_js_1.last)(localPath)])}${attributeXPath}`;
|
|
314
|
+
const attributeValues = baseNode.map((node) => {
|
|
315
|
+
const nodeDoc = dom.parseFromString(node);
|
|
316
|
+
const values = (0, xpath_1.select)(childXPath, nodeDoc).reduce((r, n) => {
|
|
317
|
+
r[(0, camelcase_1.default)(n.name, { locale: 'en-us' })] = n.value;
|
|
318
|
+
return r;
|
|
319
|
+
}, {});
|
|
320
|
+
return values;
|
|
321
|
+
});
|
|
322
|
+
return {
|
|
323
|
+
...result,
|
|
324
|
+
[key]: attributeValues.length === 1 ? attributeValues[0] : attributeValues
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
// case: single attribute
|
|
328
|
+
/*
|
|
329
|
+
{
|
|
330
|
+
key: 'statusCode',
|
|
331
|
+
localPath: ['Response', 'Status', 'StatusCode'],
|
|
332
|
+
attributes: ['Value'],
|
|
333
|
+
}
|
|
334
|
+
*/
|
|
335
|
+
if (attributes.length === 1) {
|
|
336
|
+
const fullPath = `${baseXPath}${attributeXPath}`;
|
|
337
|
+
const attributeValues = (0, xpath_1.select)(fullPath, targetDoc).map((n) => n.value);
|
|
338
|
+
return {
|
|
339
|
+
...result,
|
|
340
|
+
[key]: attributeValues[0]
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
// case: zero attribute
|
|
344
|
+
/*
|
|
345
|
+
{
|
|
346
|
+
key: 'issuer',
|
|
347
|
+
localPath: ['AuthnRequest', 'Issuer'],
|
|
348
|
+
attributes: []
|
|
349
|
+
}
|
|
350
|
+
*/
|
|
351
|
+
if (attributes.length === 0) {
|
|
352
|
+
let attributeValue = null;
|
|
353
|
+
const node = (0, xpath_1.select)(baseXPath, targetDoc);
|
|
354
|
+
if (node.length === 1) {
|
|
355
|
+
const fullPath = `string(${baseXPath}${attributeXPath})`;
|
|
356
|
+
attributeValue = (0, xpath_1.select)(fullPath, targetDoc);
|
|
357
|
+
}
|
|
358
|
+
if (node.length > 1) {
|
|
359
|
+
attributeValue = node.filter((n) => n.firstChild)
|
|
360
|
+
.map((n) => n.firstChild.nodeValue);
|
|
361
|
+
}
|
|
362
|
+
return {
|
|
363
|
+
...result,
|
|
364
|
+
[key]: attributeValue
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
return result;
|
|
368
|
+
}, {});
|
|
369
|
+
}
|
|
370
|
+
//# sourceMappingURL=extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractor.js","sourceRoot":"","sources":["../../src/extractor.ts"],"names":[],"mappings":";;;;;;AAsMA,0BAiMC;AAvYD,iCAA8C;AAC9C,6CAA+D;AAC/D,qCAAsC;AACtC,0DAAkC;AAalC,SAAS,kBAAkB,CAAC,KAAK;IAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,EAAE;QACxC,IAAI,YAAY,GAAG,WAAW,CAAC;QAC/B,MAAM,UAAU,GAAG,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