@onairos/react-native 1.0.0 → 1.0.1

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.
Files changed (32) hide show
  1. package/lib/commonjs/components/OnairosButton.js +6 -415
  2. package/lib/commonjs/components/OnairosButton.js.map +1 -1
  3. package/lib/commonjs/components/Overlay.js +0 -549
  4. package/lib/commonjs/components/PinInput.js +160 -0
  5. package/lib/commonjs/components/PinInput.js.map +1 -0
  6. package/lib/commonjs/components/PlatformList.js +137 -0
  7. package/lib/commonjs/components/PlatformList.js.map +1 -0
  8. package/lib/commonjs/components/TrainingModal.js +130 -0
  9. package/lib/commonjs/components/TrainingModal.js.map +1 -0
  10. package/lib/commonjs/index.js +12 -276
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/module/components/OnairosButton.js +121 -514
  13. package/lib/module/components/OnairosButton.js.map +1 -1
  14. package/lib/module/components/Overlay.js +0 -565
  15. package/lib/module/components/PinInput.js +151 -0
  16. package/lib/module/components/PinInput.js.map +1 -0
  17. package/lib/module/components/PlatformList.js +129 -0
  18. package/lib/module/components/PlatformList.js.map +1 -0
  19. package/lib/module/components/TrainingModal.js +122 -0
  20. package/lib/module/components/TrainingModal.js.map +1 -0
  21. package/package.json +5 -4
  22. package/src/components/OnairosButton.tsx +5 -5
  23. package/src/components/PinInput.tsx +189 -0
  24. package/src/components/PlatformList.tsx +145 -0
  25. package/src/components/TrainingModal.tsx +132 -0
  26. package/lib/commonjs/components/Notification.js +0 -106
  27. package/lib/commonjs/components/Notification.js.map +0 -1
  28. package/lib/module/components/Notification.js +0 -99
  29. package/lib/module/components/Notification.js.map +0 -1
  30. package/src/components/Notification.js +0 -101
  31. package/src/components/OnairosButton.js +0 -604
  32. package/src/components/Overlay.js +0 -854
@@ -12,6 +12,9 @@ var _DataRequestModal = require("./DataRequestModal");
12
12
  var _useCredentials = require("../hooks/useCredentials");
13
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
14
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
+ // import { validateCredentials } from '../utils/auth';
16
+ // import { COLORS } from '../constants';
17
+
15
18
  const OnairosButton = ({
16
19
  AppName,
17
20
  requestData,
@@ -92,9 +95,9 @@ const OnairosButton = ({
92
95
  return () => {
93
96
  // Cleanup deep linking
94
97
  // Note: Remove event listener based on RN version
95
- if (_reactNative.Platform.OS === 'android') {
96
- _reactNative.Linking.removeEventListener('url', handleDeepLink);
97
- }
98
+ // if (Platform.OS === 'android') {
99
+ // Linking.removeEventListener('url', handleDeepLink);
100
+ // }
98
101
  };
99
102
  }, []);
100
103
  const buttonStyles = [styles.button, buttonType === 'pill' ? styles.pillButton : styles.circleButton, {
@@ -160,416 +163,4 @@ const styles = _reactNative.StyleSheet.create({
160
163
  fontWeight: '600'
161
164
  }
162
165
  });
163
- //# sourceMappingURL=OnairosButton.js.map if (autoFetch && onComplete) {
164
- onComplete(data);
165
- } else {
166
- // In React Native, we'll handle this differently
167
- // For now, just call onComplete with the data
168
- if (onComplete) {
169
- onComplete(data);
170
- }
171
- }
172
- } catch (error) {
173
- console.error(error);
174
- if (onComplete) {
175
- onComplete(null, error);
176
- }
177
- }
178
- };
179
-
180
- // Send data request
181
- const sendDataRequest = async () => {
182
- if (granted <= 0) return;
183
- try {
184
- // Retrieve approved requests
185
- const approvedRequests = Object.values(selectedRequests).filter(req => req.isSelected).map(req => ({
186
- type: req.type,
187
- reward: req.reward
188
- }));
189
- if (encryptedPin == null && othentUser && !othentConnected) {
190
- const appInfo = {
191
- name: 'Onairos',
192
- version: '1.0.0',
193
- env: 'production'
194
- };
195
- const othent = new _kmsReactNative.Othent({
196
- appInfo,
197
- throwErrors: false
198
- });
199
- const userDetails = await othent.connect();
200
- const hashedSub = (0, _reactNativeCryptoJs.sha256)(userDetails.sub).toString();
201
- setHashedOthentSub(hashedSub);
202
-
203
- // Wait for the pin to be retrieved
204
- const userOnairosDetails = await (0, _auth.getPin)(hashedSub);
205
- const pin = userOnairosDetails.result;
206
- setEncryptedPin(pin);
207
- setOthentConnected(true);
208
-
209
- // Make API call with newly retrieved data
210
- await makeApiCall(approvedRequests, pin, hashedSub);
211
- } else {
212
- // Make API call with existing state
213
- if (encryptedPin && hashedOthentSub) {
214
- await makeApiCall(approvedRequests, encryptedPin, hashedOthentSub);
215
- } else {
216
- console.error('Missing required authentication data');
217
- }
218
- }
219
- } catch (error) {
220
- console.error('Error in sendDataRequest:', error);
221
- } finally {
222
- setShowOverlay(false);
223
- }
224
- };
225
-
226
- // Validate request data
227
- const validateRequestData = () => {
228
- const validKeys = ['Small', 'Medium', 'Large'];
229
- const requiredProperties = ['type', 'descriptions', 'reward'];
230
- if (typeof webpageName !== 'string') {
231
- throw new Error(`Property webpageName must be a String`);
232
- }
233
- for (const key of validKeys) {
234
- if (!(key in requestData)) {
235
- throw new Error(`Missing key '${key}' in requestData.`);
236
- }
237
- for (const prop of requiredProperties) {
238
- if (!(prop in requestData[key])) {
239
- throw new Error(`Missing property '${prop}' in requestData.${key}.`);
240
- }
241
- if (prop !== 'reward' && typeof requestData[key][prop] !== 'string') {
242
- throw new Error(`Property '${prop}' in requestData.${key} must be a string.`);
243
- }
244
- if (prop !== 'reward' && requestData[key][prop].trim() === '') {
245
- throw new Error(`Property '${prop}' in requestData.${key} cannot be empty.`);
246
- }
247
- }
248
- }
249
- };
250
-
251
- // Validate domain
252
- const validateDomain = async () => {
253
- try {
254
- const response = await _axios.default.post(`${API_URL}/valid/validate-domain`);
255
- return response.data;
256
- } catch (error) {
257
- console.error(error);
258
- return {
259
- status: false
260
- };
261
- }
262
- };
263
-
264
- // Connect to Onairos
265
- const ConnectOnairos = async () => {
266
- try {
267
- const appInfo = {
268
- name: "Onairos",
269
- version: "1.0.0",
270
- env: "production"
271
- };
272
- const othent = new _kmsReactNative.Othent({
273
- appInfo,
274
- throwErrors: false
275
- });
276
-
277
- // Get User Othent Secure Details
278
- const userDetails = await othent.connect();
279
- const hashedOthentSub = (0, _reactNativeCryptoJs.sha256)(userDetails.sub).toString();
280
- const encryptedPinResponse = await (0, _auth.getPin)(hashedOthentSub);
281
-
282
- // Check if user account exists
283
- if (encryptedPinResponse.result === "No user account") {
284
- // No user account found, trigger universal onboarding
285
- console.log("No user account found, triggering universal onboarding");
286
-
287
- // In React Native, we'll handle this differently
288
- // For now, just show the overlay for onboarding
289
- NoAccount.current = true;
290
- setShowOverlay(true);
291
- return;
292
- }
293
-
294
- // Convert to buffer and decrypt
295
- const bufferPIN = Buffer.from(encryptedPinResponse.result, 'base64');
296
- const userPin = await othent.decrypt(bufferPIN);
297
-
298
- // RSA Encrypt the PIN
299
- const encryptedData = await (0, _crypto.rsaEncrypt)(OnairosPublicKey, userPin);
300
-
301
- // In React Native, we'll handle this differently
302
- // For now, just show the overlay with the data
303
- setEncryptedPin(encryptedData);
304
- setHashedOthentSub(hashedOthentSub);
305
- setShowOverlay(true);
306
- } catch (e) {
307
- console.error("Error Connecting to Onairos: ", e);
308
- }
309
- };
310
-
311
- // Fetch account info
312
- const fetchAccountInfo = async (identifier, isEmail = false) => {
313
- try {
314
- setIsLoading(true);
315
- const jsonData = isEmail ? {
316
- Info: {
317
- identifier: identifier
318
- }
319
- } : {
320
- Info: {
321
- userName: identifier
322
- }
323
- };
324
- const endpoint = isEmail ? '/getAccountInfo/email' : '/getAccountInfo';
325
- const token = await _asyncStorage.default.getItem('onairosToken');
326
- const response = await _axios.default.post(`${API_URL}${endpoint}`, jsonData, {
327
- headers: {
328
- 'Content-Type': 'application/json',
329
- 'Authorization': `Bearer ${token}`
330
- }
331
- });
332
- const data = response.data;
333
- if (data.AccountInfo === "No Account Found") {
334
- NoAccount.current = true;
335
- setAccountInfo(null);
336
- return null;
337
- }
338
- setAccountInfo(data.AccountInfo);
339
- if (data.AccountInfo.models) {
340
- setActiveModels(data.AccountInfo.models);
341
- } else {
342
- NoModel.current = true;
343
- }
344
- if (data.AccountInfo.avatar) {
345
- setAvatar(true);
346
- }
347
- if (data.AccountInfo.UserTraits) {
348
- setTraits(true);
349
- }
350
- if (data.AccountInfo.othent) {
351
- setOthentUser(true);
352
- }
353
- return data.AccountInfo;
354
- } catch (error) {
355
- console.error('Error fetching account info:', error);
356
- throw error;
357
- } finally {
358
- setIsLoading(false);
359
- }
360
- };
361
-
362
- // Check existing token
363
- const checkExistingToken = async () => {
364
- try {
365
- const onairosToken = await _asyncStorage.default.getItem('onairosToken');
366
- const legacyToken = await _asyncStorage.default.getItem('token');
367
- const token = onairosToken || legacyToken;
368
- if (token) {
369
- const response = await _axios.default.get(`${API_URL}/verifyToken`, {
370
- headers: {
371
- 'Authorization': `Bearer ${token}`
372
- }
373
- });
374
- if (response.status === 200) {
375
- const data = response.data;
376
- if (data.valid) {
377
- setAuthToken(token);
378
- setIsAuthenticated(true);
379
- const username = await _asyncStorage.default.getItem('username');
380
- await fetchAccountInfo(username);
381
- } else {
382
- await _asyncStorage.default.removeItem('onairosToken');
383
- await _asyncStorage.default.removeItem('token');
384
- }
385
- }
386
- }
387
- } catch (error) {
388
- console.error('Token verification failed:', error);
389
- } finally {
390
- setLoading(false);
391
- }
392
- };
393
-
394
- // Check for existing token on mount
395
- (0, _react.useEffect)(() => {
396
- checkExistingToken();
397
- }, []);
398
-
399
- // Handle close overlay
400
- const handleCloseOverlay = () => {
401
- setGranted(0);
402
- setShowOverlay(false);
403
- };
404
-
405
- // Check for existing token and fetch account info on mount
406
- (0, _react.useEffect)(() => {
407
- const checkStoredAuth = async () => {
408
- const token = await _asyncStorage.default.getItem('onairosToken');
409
- const username = await _asyncStorage.default.getItem('username');
410
- const othentToken = await _asyncStorage.default.getItem('othentToken');
411
- if (token) {
412
- try {
413
- // Verify token is still valid
414
- const response = await _axios.default.post(`${API_URL}/verifyToken`, {}, {
415
- headers: {
416
- 'Content-Type': 'application/json',
417
- 'Authorization': `Bearer ${token}`
418
- }
419
- });
420
- if (response.status === 200) {
421
- setIsAuthenticated(true);
422
- if (username) {
423
- await fetchAccountInfo(username, false);
424
- } else if (othentToken) {
425
- // Handle Othent stored session
426
- const userDetails = JSON.parse(othentToken);
427
- await fetchAccountInfo(userDetails.email, true);
428
- }
429
- } else {
430
- // Clear invalid tokens
431
- await _asyncStorage.default.removeItem('onairosToken');
432
- await _asyncStorage.default.removeItem('username');
433
- await _asyncStorage.default.removeItem('othentToken');
434
- }
435
- } catch (error) {
436
- console.error('Token verification failed:', error);
437
- }
438
- }
439
- };
440
- checkStoredAuth();
441
- }, []);
442
-
443
- // Handle login success
444
- const handleLoginSuccess = async (identifier, isEmail = false) => {
445
- try {
446
- const accountData = await fetchAccountInfo(identifier, isEmail);
447
- // Update authentication first
448
- setIsAuthenticated(true);
449
- // Then update account info
450
- setShowOverlay(true);
451
- return accountData;
452
- } catch (error) {
453
- console.error('Login process failed:', error);
454
- throw error;
455
- }
456
- };
457
-
458
- // Get text based on login type
459
- const getText = () => {
460
- switch (loginType) {
461
- case 'signUp':
462
- return 'Sign Up with Onairos';
463
- case 'signOut':
464
- return 'Sign Out of Onairos';
465
- default:
466
- return 'Sign In with Onairos';
467
- }
468
- };
469
-
470
- // Button press handler
471
- const handleButtonPress = () => {
472
- handleAPIRequestForMobile();
473
- };
474
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
475
- style: styles.container
476
- }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
477
- style: [styles.button, buttonType === 'pill' ? styles.pillButton : styles.circleButton, login ? styles.loginButton : styles.transparentButton, {
478
- flexDirection: textLayout === 'below' ? 'column' : 'row'
479
- }],
480
- onPress: handleButtonPress
481
- }, (visualType === 'full' || visualType === 'icon') && /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
482
- source: {
483
- uri: login ? "https://onairos.sirv.com/Images/OnairosWhite.png" : "https://onairos.sirv.com/Images/OnairosBlack.png"
484
- },
485
- style: [styles.logo, buttonType === 'pill' ? styles.pillLogo : styles.circleLogo, visualType === 'full' ? styles.fullLogo : styles.iconOnlyLogo]
486
- }), (visualType === 'full' || visualType === 'textOnly') && /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
487
- style: [styles.buttonText, {
488
- color: login ? 'black' : textColor === 'black' ? 'black' : 'white'
489
- }, textLayout === 'right' ? styles.textRight : textLayout === 'left' ? styles.textLeft : styles.textBelow]
490
- }, getText())), showOverlay && !isLoading && /*#__PURE__*/_react.default.createElement(_Overlay.default, {
491
- setOthentConnected: setOthentConnected,
492
- dataRequester: webpageName,
493
- NoAccount: NoAccount,
494
- NoModel: NoModel,
495
- accountInfo: accountInfo,
496
- activeModels: activeModels,
497
- avatar: avatar,
498
- traits: traits,
499
- requestData: requestData,
500
- handleConnectionSelection: handleConnectionSelection,
501
- changeGranted: changeGranted,
502
- granted: granted,
503
- allowSubmit: granted > 0,
504
- rejectDataRequest: rejectDataRequest,
505
- sendDataRequest: sendDataRequest,
506
- isAuthenticated: isAuthenticated,
507
- onLoginSuccess: handleLoginSuccess,
508
- onClose: handleCloseOverlay,
509
- setOthentUser: setOthentUser,
510
- setHashedOthentSub: setHashedOthentSub,
511
- setEncryptedPin: setEncryptedPin
512
- }));
513
- };
514
- const styles = _reactNative.StyleSheet.create({
515
- container: {
516
- alignItems: 'center',
517
- justifyContent: 'center'
518
- },
519
- button: {
520
- alignItems: 'center',
521
- justifyContent: 'center',
522
- borderRadius: 8
523
- },
524
- pillButton: {
525
- paddingHorizontal: 16,
526
- paddingVertical: 8,
527
- borderRadius: 20
528
- },
529
- circleButton: {
530
- width: 48,
531
- height: 48,
532
- borderRadius: 24
533
- },
534
- loginButton: {
535
- backgroundColor: '#ffffff',
536
- borderWidth: 1,
537
- borderColor: '#dddddd'
538
- },
539
- transparentButton: {
540
- backgroundColor: 'transparent',
541
- borderWidth: 1,
542
- borderColor: 'transparent'
543
- },
544
- logo: {
545
- resizeMode: 'contain'
546
- },
547
- pillLogo: {
548
- width: 24,
549
- height: 24
550
- },
551
- circleLogo: {
552
- width: 32,
553
- height: 32
554
- },
555
- fullLogo: {
556
- marginRight: 12
557
- },
558
- iconOnlyLogo: {
559
- marginRight: 0
560
- },
561
- buttonText: {
562
- fontWeight: 'bold'
563
- },
564
- textRight: {
565
- marginLeft: 8
566
- },
567
- textLeft: {
568
- marginRight: 8
569
- },
570
- textBelow: {
571
- marginTop: 4
572
- }
573
- });
574
- var _default = exports.default = OnairosButton;
575
166
  //# sourceMappingURL=OnairosButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_MaterialIcons","_interopRequireDefault","_UniversalOnboarding","_DataRequestModal","_useCredentials","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","OnairosButton","AppName","requestData","returnLink","embedd","color","icon","onResolved","login","buttonType","debug","test","showOnboarding","setShowOnboarding","useState","showDataRequest","setShowDataRequest","hasCredentials","getCredentials","validateCredentials","useCredentials","loading","setLoading","handlePress","useCallback","hasExisting","credentials","validationResult","username","isValid","error","console","handleDataRequestAccept","accessToken","useEffect","handleDeepLink","url","includes","params","URL","searchParams","nonce","callback","Linking","addEventListener","Platform","OS","removeEventListener","buttonStyles","styles","button","pillButton","circleButton","backgroundColor","createElement","Fragment","TouchableOpacity","style","onPress","disabled","name","size","Text","buttonText","UniversalOnboarding","visible","onClose","onComplete","DataRequestModal","onAccept","exports","StyleSheet","create","alignItems","justifyContent","elevation","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","borderRadius","flexDirection","paddingHorizontal","paddingV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U,EAAE5D,UAAW;IACvBH,MAAM,EAAEA,MAAO;IACfM,KAAK,EAAEA,KAAM;IACbC,IAAI,EAAEA;EAAK,CACZ,CAAC,eAEFvC,MAAA,CAAAW,OAAA,CAAAuE,aAAA,CAAC3E,iBAAA,CAAAyF,gBAAgB;IACfH,OAAO,EAAElD,eAAgB;IACzBmD,OAAO,EAAEA,CAAA,KAAMlD,kBAAkB,CAAC,KAAK,CAAE;IACzCqD,QAAQ,EAAErC,uBAAwB;IAClC9B,WAAW,EAAEA,WAAY;IACzBD,OAAO,EAAEA;EAAQ,CAClB,CACD,CAAC;AAEP,CAAC;AAACqE,OAAA,CAAAtE,aAAA,GAAAA,aAAA;AAEF,MAAMiD,MAAM,GAAGsB,uBAAU,CAACC,MAAM,CAAC;EAC/BtB,MAAM,EAAE;IACNuB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;EAChB,CAAC;EACD7B,YAAY,EAAE;IACZ0B,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVG,YAAY,EAAE;EAChB,CAAC;EACD/B,UAAU,EAAE;IACVgC,aAAa,EAAE,KAAK;IACpBC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBH,YAAY,EAAE;EAChB,CAAC;EACDnB,UAAU,EAAE;IACV1D,KAAK,EAAE,OAAO;IACdiF,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_MaterialIcons","_interopRequireDefault","_UniversalOnboarding","_DataRequestModal","_useCredentials","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","OnairosButton","AppName","requestData","returnLink","embedd","color","icon","onResolved","login","buttonType","debug","test","showOnboarding","setShowOnboarding","useState","showDataRequest","setShowDataRequest","hasCredentials","getCredentials","validateCredentials","useCredentials","loading","setLoading","handlePress","useCallback","hasExisting","credentials","validationResult","username","isValid","error","console","handleDataRequestAccept","accessToken","useEffect","handleDeepLink","url","includes","params","URL","searchParams","nonce","callback","Linking","addEventListener","buttonStyles","styles","button","pillButton","circleButton","backgroundColor","createElement","Fragment","TouchableOpacity","style","onPress","disabled","name","size","Text","buttonText","UniversalOnboarding","visible","onClose","onComplete","DataRequestModal","onAccept","exports","StyleSheet","create","alignItems","justifyContent","elevation","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","borderRadius","flexDirection","paddingHorizontal","paddingVertical","marginLeft","fontSize","fontWeight"],"sourceRoot":"..\\..\\..\\src","sources":["components/OnairosButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAAyD,SAAAG,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAQ,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC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