@oxyhq/services 5.12.11 → 5.13.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.
- package/lib/commonjs/core/OxyServices.js +86 -8
- package/lib/commonjs/core/OxyServices.js.map +1 -1
- package/lib/commonjs/i18n/index.js +37 -1
- package/lib/commonjs/i18n/index.js.map +1 -1
- package/lib/commonjs/i18n/locales/ar-SA.json +128 -0
- package/lib/commonjs/i18n/locales/ca-ES.json +128 -0
- package/lib/commonjs/i18n/locales/de-DE.json +128 -0
- package/lib/commonjs/i18n/locales/en-US.json +85 -12
- package/lib/commonjs/i18n/locales/es-ES.json +58 -6
- package/lib/commonjs/i18n/locales/fr-FR.json +128 -0
- package/lib/commonjs/i18n/locales/it-IT.json +128 -0
- package/lib/commonjs/i18n/locales/ja-JP.json +127 -0
- package/lib/commonjs/i18n/locales/ko-KR.json +128 -0
- package/lib/commonjs/i18n/locales/pt-PT.json +128 -0
- package/lib/commonjs/i18n/locales/zh-CN.json +128 -0
- package/lib/commonjs/ui/components/FontLoader.js +22 -42
- package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +5 -8
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js +64 -44
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +14 -35
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +2 -2
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +434 -321
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +56 -5
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +43 -39
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +139 -125
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +2 -4
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +45 -25
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js +88 -53
- package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +79 -58
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +61 -52
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +220 -31
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignInTotpStep.js +77 -50
- package/lib/commonjs/ui/screens/steps/SignInTotpStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +527 -66
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +55 -30
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +64 -46
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +84 -146
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +113 -34
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +16 -20
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +2 -1
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
- package/lib/commonjs/ui/styles/index.js +11 -0
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/commonjs/ui/styles/spacing.js +51 -0
- package/lib/commonjs/ui/styles/spacing.js.map +1 -0
- package/lib/commonjs/utils/validationUtils.js +1 -1
- package/lib/module/core/OxyServices.js +86 -8
- package/lib/module/core/OxyServices.js.map +1 -1
- package/lib/module/i18n/index.js +37 -1
- package/lib/module/i18n/index.js.map +1 -1
- package/lib/module/i18n/locales/ar-SA.json +128 -0
- package/lib/module/i18n/locales/ca-ES.json +128 -0
- package/lib/module/i18n/locales/de-DE.json +128 -0
- package/lib/module/i18n/locales/en-US.json +85 -12
- package/lib/module/i18n/locales/es-ES.json +58 -6
- package/lib/module/i18n/locales/fr-FR.json +128 -0
- package/lib/module/i18n/locales/it-IT.json +128 -0
- package/lib/module/i18n/locales/ja-JP.json +127 -0
- package/lib/module/i18n/locales/ko-KR.json +128 -0
- package/lib/module/i18n/locales/pt-PT.json +128 -0
- package/lib/module/i18n/locales/zh-CN.json +128 -0
- package/lib/module/ui/components/FontLoader.js +23 -43
- package/lib/module/ui/components/FontLoader.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +6 -8
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/StepBasedScreen.js +65 -45
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +14 -35
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +2 -2
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +434 -321
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +56 -5
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +44 -40
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +138 -126
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +2 -4
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverRequestStep.js +45 -25
- package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js +89 -54
- package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js +80 -59
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js +62 -53
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignInPasswordStep.js +221 -32
- package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignInTotpStep.js +78 -51
- package/lib/module/ui/screens/steps/SignInTotpStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignInUsernameStep.js +530 -68
- package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js +55 -30
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js +65 -47
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js +84 -146
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +114 -35
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +16 -20
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +2 -1
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/module/ui/styles/index.js +1 -0
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/styles/spacing.js +48 -0
- package/lib/module/ui/styles/spacing.js.map +1 -0
- package/lib/module/utils/validationUtils.js +1 -1
- package/lib/typescript/core/OxyServices.d.ts +38 -2
- package/lib/typescript/core/OxyServices.d.ts.map +1 -1
- package/lib/typescript/i18n/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/FontLoader.d.ts +3 -3
- package/lib/typescript/ui/components/FontLoader.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts +2 -2
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +1 -0
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +10 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +2 -0
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +7 -3
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/styles/authStyles.d.ts +1 -0
- package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -1
- package/lib/typescript/ui/styles/index.d.ts +1 -0
- package/lib/typescript/ui/styles/index.d.ts.map +1 -1
- package/lib/typescript/ui/styles/spacing.d.ts +43 -0
- package/lib/typescript/ui/styles/spacing.d.ts.map +1 -0
- package/lib/typescript/utils/validationUtils.d.ts +1 -1
- package/package.json +1 -1
- package/src/core/OxyServices.ts +96 -10
- package/src/i18n/index.ts +36 -0
- package/src/i18n/locales/ar-SA.json +128 -0
- package/src/i18n/locales/ca-ES.json +128 -0
- package/src/i18n/locales/de-DE.json +128 -0
- package/src/i18n/locales/en-US.json +85 -12
- package/src/i18n/locales/es-ES.json +58 -6
- package/src/i18n/locales/fr-FR.json +128 -0
- package/src/i18n/locales/it-IT.json +128 -0
- package/src/i18n/locales/ja-JP.json +127 -0
- package/src/i18n/locales/ko-KR.json +128 -0
- package/src/i18n/locales/pt-PT.json +128 -0
- package/src/i18n/locales/zh-CN.json +128 -0
- package/src/ui/components/FontLoader.tsx +17 -37
- package/src/ui/components/OxyProvider.tsx +14 -13
- package/src/ui/components/StepBasedScreen.tsx +66 -43
- package/src/ui/components/internal/GroupedPillButtons.tsx +15 -31
- package/src/ui/components/internal/PinInput.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +404 -285
- package/src/ui/screens/FileManagementScreen.tsx +81 -4
- package/src/ui/screens/SignInScreen.tsx +59 -36
- package/src/ui/screens/WelcomeNewUserScreen.tsx +102 -91
- package/src/ui/screens/internal/SignInUsernameStep.tsx +1 -1
- package/src/ui/screens/steps/RecoverRequestStep.tsx +34 -24
- package/src/ui/screens/steps/RecoverResetPasswordStep.tsx +65 -36
- package/src/ui/screens/steps/RecoverSuccessStep.tsx +71 -47
- package/src/ui/screens/steps/RecoverVerifyStep.tsx +60 -50
- package/src/ui/screens/steps/SignInPasswordStep.tsx +191 -29
- package/src/ui/screens/steps/SignInTotpStep.tsx +68 -34
- package/src/ui/screens/steps/SignInUsernameStep.tsx +586 -57
- package/src/ui/screens/steps/SignUpIdentityStep.tsx +49 -35
- package/src/ui/screens/steps/SignUpSecurityStep.tsx +56 -39
- package/src/ui/screens/steps/SignUpSummaryStep.tsx +99 -89
- package/src/ui/screens/steps/SignUpWelcomeStep.tsx +88 -20
- package/src/ui/stores/authStore.ts +15 -19
- package/src/ui/styles/authStyles.ts +2 -1
- package/src/ui/styles/index.ts +1 -0
- package/src/ui/styles/spacing.ts +46 -0
- package/src/utils/validationUtils.ts +1 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { View, Text } from 'react-native';
|
|
4
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
5
4
|
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
5
|
+
import { Section, GroupedSection } from '../../components';
|
|
6
6
|
import { useI18n } from '../../hooks/useI18n';
|
|
7
|
+
import { stepStyles } from '../../styles/spacing';
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
9
|
const SignUpSummaryStep = ({
|
|
9
10
|
colors,
|
|
10
11
|
styles,
|
|
12
|
+
theme,
|
|
11
13
|
nextStep,
|
|
12
14
|
prevStep,
|
|
13
15
|
allStepData,
|
|
@@ -16,6 +18,7 @@ const SignUpSummaryStep = ({
|
|
|
16
18
|
const {
|
|
17
19
|
t
|
|
18
20
|
} = useI18n();
|
|
21
|
+
const baseStyles = stepStyles;
|
|
19
22
|
// Extract data from previous steps
|
|
20
23
|
const identityData = allStepData[1] || {}; // Step 2 (index 1)
|
|
21
24
|
const securityData = allStepData[2] || {}; // Step 3 (index 2)
|
|
@@ -32,162 +35,97 @@ const SignUpSummaryStep = ({
|
|
|
32
35
|
const hasValidData = username && email && password;
|
|
33
36
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
34
37
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
35
|
-
style:
|
|
38
|
+
style: [baseStyles.container, baseStyles.sectionSpacing, baseStyles.header],
|
|
36
39
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
37
|
-
style: [styles.modernTitle, {
|
|
38
|
-
color: colors.text
|
|
40
|
+
style: [styles.modernTitle, baseStyles.title, {
|
|
41
|
+
color: colors.text,
|
|
42
|
+
marginBottom: 0,
|
|
43
|
+
marginTop: 0
|
|
39
44
|
}],
|
|
40
45
|
children: t('signup.summary.title')
|
|
41
46
|
}), /*#__PURE__*/_jsx(Text, {
|
|
42
|
-
style: [styles.modernSubtitle, {
|
|
43
|
-
color: colors.secondaryText
|
|
47
|
+
style: [styles.modernSubtitle, baseStyles.subtitle, {
|
|
48
|
+
color: colors.secondaryText,
|
|
49
|
+
marginBottom: 0,
|
|
50
|
+
marginTop: 0
|
|
44
51
|
}],
|
|
45
52
|
children: t('signup.summary.subtitle')
|
|
46
53
|
})]
|
|
47
54
|
}), /*#__PURE__*/_jsxs(View, {
|
|
48
|
-
style: [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
77
|
-
style: [styles.footerText, {
|
|
78
|
-
color: colors.secondaryText,
|
|
79
|
-
fontSize: 12,
|
|
80
|
-
marginBottom: 4
|
|
81
|
-
}],
|
|
82
|
-
children: "Username"
|
|
83
|
-
}), /*#__PURE__*/_jsxs(Text, {
|
|
84
|
-
style: [styles.modernInput, {
|
|
85
|
-
color: colors.text,
|
|
86
|
-
fontSize: 16
|
|
87
|
-
}],
|
|
88
|
-
children: ["@", username || 'Not set']
|
|
89
|
-
})]
|
|
90
|
-
})]
|
|
91
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
92
|
-
style: {
|
|
93
|
-
flexDirection: 'row',
|
|
94
|
-
alignItems: 'center'
|
|
95
|
-
},
|
|
96
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
97
|
-
name: "mail-outline",
|
|
98
|
-
size: 20,
|
|
99
|
-
color: colors.secondaryText,
|
|
100
|
-
style: {
|
|
101
|
-
marginRight: 12
|
|
102
|
-
}
|
|
103
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
104
|
-
style: {
|
|
105
|
-
flex: 1
|
|
106
|
-
},
|
|
107
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
108
|
-
style: [styles.footerText, {
|
|
109
|
-
color: colors.secondaryText,
|
|
110
|
-
fontSize: 12,
|
|
111
|
-
marginBottom: 4
|
|
112
|
-
}],
|
|
113
|
-
children: "Email"
|
|
114
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
115
|
-
style: [styles.modernInput, {
|
|
116
|
-
color: colors.text,
|
|
117
|
-
fontSize: 16
|
|
118
|
-
}],
|
|
119
|
-
children: email || 'Not set'
|
|
120
|
-
})]
|
|
121
|
-
})]
|
|
122
|
-
})]
|
|
123
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
124
|
-
style: {
|
|
125
|
-
flexDirection: 'row',
|
|
126
|
-
alignItems: 'center',
|
|
127
|
-
marginTop: 16,
|
|
128
|
-
padding: 12,
|
|
129
|
-
backgroundColor: colors.warning + '10',
|
|
130
|
-
borderRadius: 8,
|
|
131
|
-
borderWidth: 1,
|
|
132
|
-
borderColor: colors.warning + '30'
|
|
133
|
-
},
|
|
134
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
135
|
-
name: "shield-checkmark",
|
|
136
|
-
size: 20,
|
|
137
|
-
color: colors.warning,
|
|
138
|
-
style: {
|
|
139
|
-
marginRight: 8
|
|
140
|
-
}
|
|
141
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
142
|
-
style: [styles.footerText, {
|
|
143
|
-
color: colors.warning,
|
|
144
|
-
fontSize: 14,
|
|
145
|
-
flex: 1
|
|
55
|
+
style: [baseStyles.container, baseStyles.sectionSpacing],
|
|
56
|
+
children: [/*#__PURE__*/_jsx(Section, {
|
|
57
|
+
title: t('signup.summary.sections.account') || t('signup.summary.sectionTitle') || 'Account Information',
|
|
58
|
+
theme: theme,
|
|
59
|
+
isFirst: true,
|
|
60
|
+
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
61
|
+
items: [{
|
|
62
|
+
id: 'username',
|
|
63
|
+
icon: 'person-outline',
|
|
64
|
+
iconColor: colors.primary,
|
|
65
|
+
title: t('signup.summary.fields.username'),
|
|
66
|
+
subtitle: `@${username || t('signup.summary.notSet')}`,
|
|
67
|
+
showChevron: false
|
|
68
|
+
}, {
|
|
69
|
+
id: 'email',
|
|
70
|
+
icon: 'mail-outline',
|
|
71
|
+
iconColor: colors.primary,
|
|
72
|
+
title: t('signup.summary.fields.email'),
|
|
73
|
+
subtitle: email || t('signup.summary.notSet'),
|
|
74
|
+
showChevron: false
|
|
75
|
+
}, {
|
|
76
|
+
id: 'password',
|
|
77
|
+
icon: 'lock-closed-outline',
|
|
78
|
+
iconColor: colors.primary,
|
|
79
|
+
title: t('signup.summary.fields.password') || 'Password',
|
|
80
|
+
subtitle: password ? '••••••••' : t('signup.summary.notSet'),
|
|
81
|
+
showChevron: false
|
|
146
82
|
}],
|
|
147
|
-
|
|
148
|
-
})
|
|
149
|
-
}), /*#__PURE__*/
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
flex: 1
|
|
83
|
+
theme: theme
|
|
84
|
+
})
|
|
85
|
+
}), /*#__PURE__*/_jsx(Section, {
|
|
86
|
+
title: t('signup.summary.sections.next') || 'Next Steps',
|
|
87
|
+
theme: theme,
|
|
88
|
+
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
89
|
+
items: [{
|
|
90
|
+
id: 'security-tip',
|
|
91
|
+
icon: 'shield-checkmark',
|
|
92
|
+
iconColor: colors.warning,
|
|
93
|
+
title: t('signup.summary.next.securityTitle') || 'Keep your account secure',
|
|
94
|
+
subtitle: t('signup.summary.securityTip'),
|
|
95
|
+
showChevron: false,
|
|
96
|
+
multiRow: true,
|
|
97
|
+
dense: true
|
|
98
|
+
}, {
|
|
99
|
+
id: 'legal-reminder',
|
|
100
|
+
icon: 'checkmark-circle',
|
|
101
|
+
iconColor: colors.success,
|
|
102
|
+
title: t('signup.summary.next.legalTitle') || 'You’re all set',
|
|
103
|
+
subtitle: t('signup.summary.legalReminder'),
|
|
104
|
+
showChevron: false,
|
|
105
|
+
multiRow: true,
|
|
106
|
+
dense: true
|
|
172
107
|
}],
|
|
173
|
-
|
|
174
|
-
})
|
|
108
|
+
theme: theme
|
|
109
|
+
})
|
|
175
110
|
})]
|
|
176
|
-
}), /*#__PURE__*/_jsx(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
111
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
112
|
+
style: [baseStyles.container, baseStyles.sectionSpacing, baseStyles.buttonContainer],
|
|
113
|
+
children: /*#__PURE__*/_jsx(GroupedPillButtons, {
|
|
114
|
+
buttons: [{
|
|
115
|
+
text: t('common.actions.back'),
|
|
116
|
+
onPress: prevStep,
|
|
117
|
+
icon: 'arrow-back',
|
|
118
|
+
variant: 'transparent'
|
|
119
|
+
}, {
|
|
120
|
+
text: t('common.actions.createAccount'),
|
|
121
|
+
onPress: nextStep,
|
|
122
|
+
icon: 'checkmark-circle',
|
|
123
|
+
variant: 'primary',
|
|
124
|
+
loading: isLoading,
|
|
125
|
+
disabled: !hasValidData
|
|
126
|
+
}],
|
|
127
|
+
colors: colors
|
|
128
|
+
})
|
|
191
129
|
})]
|
|
192
130
|
});
|
|
193
131
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Text","
|
|
1
|
+
{"version":3,"names":["View","Text","GroupedPillButtons","Section","GroupedSection","useI18n","stepStyles","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SignUpSummaryStep","colors","styles","theme","nextStep","prevStep","allStepData","isLoading","t","baseStyles","identityData","securityData","username","email","password","hasValidData","children","style","container","sectionSpacing","header","modernTitle","title","color","text","marginBottom","marginTop","modernSubtitle","subtitle","secondaryText","isFirst","items","id","icon","iconColor","primary","showChevron","warning","multiRow","dense","success","buttonContainer","buttons","onPress","variant","loading","disabled"],"sourceRoot":"../../../../../src","sources":["ui/screens/steps/SignUpSummaryStep.tsx"],"mappings":";;AAEA,SAASA,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,SAASC,OAAO,EAAEC,cAAc,QAAQ,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,OAAO,EAAE,CACL;UACIlB,IAAI,EAAEhB,CAAC,CAAC,qBAAqB,CAAC;UAC9BmC,OAAO,EAAEtC,QAAQ;UACjB4B,IAAI,EAAE,YAAY;UAClBW,OAAO,EAAE;QACb,CAAC,EACD;UACIpB,IAAI,EAAEhB,CAAC,CAAC,8BAA8B,CAAC;UACvCmC,OAAO,EAAEvC,QAAQ;UACjB6B,IAAI,EAAE,kBAAkB;UACxBW,OAAO,EAAE,SAAS;UAClBC,OAAO,EAAEtC,SAAS;UAClBuC,QAAQ,EAAE,CAAC/B;QACf,CAAC,CACH;QACFd,MAAM,EAAEA;MAAO,CAClB;IAAC,CACA,CAAC;EAAA,CACT,CAAC;AAEX,CAAC;AAED,eAAeD,iBAAiB","ignoreList":[]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { View, Text, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { View, Text, TouchableOpacity, Platform, StyleSheet } from 'react-native';
|
|
4
4
|
import { Ionicons } from '@expo/vector-icons';
|
|
5
5
|
import HighFive from '../../../assets/illustrations/HighFive';
|
|
6
6
|
import { useI18n } from '../../hooks/useI18n';
|
|
7
|
+
import { STEP_INNER_GAP, stepStyles } from '../../styles/spacing';
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
9
|
const SignUpWelcomeStep = ({
|
|
9
10
|
colors,
|
|
@@ -14,53 +15,131 @@ const SignUpWelcomeStep = ({
|
|
|
14
15
|
const {
|
|
15
16
|
t
|
|
16
17
|
} = useI18n();
|
|
18
|
+
const localStyles = stylesheet;
|
|
19
|
+
const baseStyles = stepStyles;
|
|
20
|
+
const webShadowReset = Platform.OS === 'web' ? {
|
|
21
|
+
boxShadow: 'none'
|
|
22
|
+
} : null;
|
|
17
23
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
18
|
-
children: [/*#__PURE__*/
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
25
|
+
style: [baseStyles.container, baseStyles.sectionSpacing, {
|
|
26
|
+
alignItems: 'flex-start',
|
|
27
|
+
position: 'relative'
|
|
28
|
+
}],
|
|
29
|
+
children: [/*#__PURE__*/_jsx(HighFive, {
|
|
30
|
+
width: 100,
|
|
31
|
+
height: 100
|
|
32
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
33
|
+
style: [localStyles.languageButton, {
|
|
34
|
+
backgroundColor: colors.inputBackground
|
|
35
|
+
}],
|
|
36
|
+
onPress: () => navigate('LanguageSelector'),
|
|
37
|
+
activeOpacity: 0.7,
|
|
38
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
39
|
+
name: "globe-outline",
|
|
40
|
+
size: 20,
|
|
41
|
+
color: colors.primary
|
|
42
|
+
})
|
|
43
|
+
})]
|
|
21
44
|
}), /*#__PURE__*/_jsxs(View, {
|
|
22
|
-
style:
|
|
45
|
+
style: [baseStyles.container, baseStyles.sectionSpacing, baseStyles.header],
|
|
23
46
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
24
|
-
style: [styles.modernTitle, {
|
|
25
|
-
color: colors.text
|
|
47
|
+
style: [styles.modernTitle, baseStyles.title, {
|
|
48
|
+
color: colors.text,
|
|
49
|
+
marginBottom: 0,
|
|
50
|
+
marginTop: 0
|
|
26
51
|
}],
|
|
27
52
|
children: t('signup.welcome.title')
|
|
28
53
|
}), /*#__PURE__*/_jsx(Text, {
|
|
29
|
-
style: [styles.modernSubtitle, {
|
|
30
|
-
color: colors.secondaryText
|
|
54
|
+
style: [styles.modernSubtitle, baseStyles.subtitle, {
|
|
55
|
+
color: colors.secondaryText,
|
|
56
|
+
marginBottom: 0,
|
|
57
|
+
marginTop: 0
|
|
31
58
|
}],
|
|
32
59
|
children: t('signup.welcome.subtitle')
|
|
33
60
|
})]
|
|
34
|
-
}), /*#__PURE__*/
|
|
35
|
-
style:
|
|
36
|
-
children:
|
|
37
|
-
style: [
|
|
38
|
-
backgroundColor: colors.
|
|
39
|
-
}],
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
61
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
62
|
+
style: [baseStyles.container, baseStyles.sectionSpacing],
|
|
63
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
64
|
+
style: [localStyles.actionCard, {
|
|
65
|
+
backgroundColor: colors.inputBackground || colors.card || 'rgba(0,0,0,0.04)'
|
|
66
|
+
}, webShadowReset],
|
|
67
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
68
|
+
style: [styles.button, localStyles.primaryButton, {
|
|
69
|
+
backgroundColor: colors.primary
|
|
70
|
+
}, webShadowReset],
|
|
71
|
+
onPress: nextStep,
|
|
72
|
+
testID: "get-started-button",
|
|
73
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
74
|
+
style: [styles.buttonText, localStyles.buttonText, {
|
|
75
|
+
color: colors.background
|
|
76
|
+
}],
|
|
77
|
+
children: t('common.actions.getStarted')
|
|
78
|
+
})
|
|
79
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
80
|
+
style: [styles.footerTextContainer, localStyles.footerLink, {
|
|
81
|
+
marginTop: 0
|
|
49
82
|
}],
|
|
50
|
-
|
|
83
|
+
onPress: () => navigate('SignIn'),
|
|
84
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
85
|
+
style: [styles.footerText, {
|
|
86
|
+
color: colors.secondaryText
|
|
87
|
+
}],
|
|
88
|
+
children: [t('signup.welcome.haveAccount'), /*#__PURE__*/_jsxs(Text, {
|
|
89
|
+
style: {
|
|
90
|
+
color: colors.primary,
|
|
91
|
+
fontWeight: '600'
|
|
92
|
+
},
|
|
93
|
+
children: [" ", t('signup.welcome.signInCta')]
|
|
94
|
+
})]
|
|
95
|
+
})
|
|
51
96
|
})]
|
|
52
|
-
})
|
|
53
|
-
style: [styles.footerTextContainer],
|
|
54
|
-
onPress: () => navigate('SignIn'),
|
|
55
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
56
|
-
style: [styles.footerText, {
|
|
57
|
-
color: colors.secondaryText
|
|
58
|
-
}],
|
|
59
|
-
children: t('signin.title')
|
|
60
|
-
})
|
|
61
|
-
})]
|
|
97
|
+
})
|
|
62
98
|
})]
|
|
63
99
|
});
|
|
64
100
|
};
|
|
65
101
|
export default SignUpWelcomeStep;
|
|
102
|
+
const stylesheet = StyleSheet.create({
|
|
103
|
+
actionCard: {
|
|
104
|
+
width: '100%',
|
|
105
|
+
maxWidth: 420,
|
|
106
|
+
borderRadius: 28,
|
|
107
|
+
paddingHorizontal: 20,
|
|
108
|
+
paddingVertical: 18,
|
|
109
|
+
gap: STEP_INNER_GAP,
|
|
110
|
+
alignItems: 'stretch',
|
|
111
|
+
shadowColor: 'transparent'
|
|
112
|
+
},
|
|
113
|
+
primaryButton: {
|
|
114
|
+
borderRadius: 28,
|
|
115
|
+
width: '100%',
|
|
116
|
+
paddingVertical: 16,
|
|
117
|
+
justifyContent: 'center',
|
|
118
|
+
shadowOpacity: 0,
|
|
119
|
+
shadowRadius: 0,
|
|
120
|
+
shadowOffset: {
|
|
121
|
+
width: 0,
|
|
122
|
+
height: 0
|
|
123
|
+
},
|
|
124
|
+
elevation: 0
|
|
125
|
+
},
|
|
126
|
+
buttonText: {
|
|
127
|
+
fontSize: 16,
|
|
128
|
+
fontWeight: '600',
|
|
129
|
+
textAlign: 'center'
|
|
130
|
+
},
|
|
131
|
+
footerLink: {
|
|
132
|
+
alignSelf: 'center'
|
|
133
|
+
},
|
|
134
|
+
languageButton: {
|
|
135
|
+
position: 'absolute',
|
|
136
|
+
top: 0,
|
|
137
|
+
right: 0,
|
|
138
|
+
width: 40,
|
|
139
|
+
height: 40,
|
|
140
|
+
borderRadius: 20,
|
|
141
|
+
alignItems: 'center',
|
|
142
|
+
justifyContent: 'center'
|
|
143
|
+
}
|
|
144
|
+
});
|
|
66
145
|
//# sourceMappingURL=SignUpWelcomeStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Text","TouchableOpacity","Ionicons","HighFive","useI18n","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SignUpWelcomeStep","colors","styles","navigate","nextStep","t","children","width","height","
|
|
1
|
+
{"version":3,"names":["View","Text","TouchableOpacity","Platform","StyleSheet","Ionicons","HighFive","useI18n","STEP_INNER_GAP","stepStyles","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SignUpWelcomeStep","colors","styles","navigate","nextStep","t","localStyles","stylesheet","baseStyles","webShadowReset","OS","boxShadow","children","style","container","sectionSpacing","alignItems","position","width","height","languageButton","backgroundColor","inputBackground","onPress","activeOpacity","name","size","color","primary","header","modernTitle","title","text","marginBottom","marginTop","modernSubtitle","subtitle","secondaryText","actionCard","card","button","primaryButton","testID","buttonText","background","footerTextContainer","footerLink","footerText","fontWeight","create","maxWidth","borderRadius","paddingHorizontal","paddingVertical","gap","shadowColor","justifyContent","shadowOpacity","shadowRadius","shadowOffset","elevation","fontSize","textAlign","alignSelf","top","right"],"sourceRoot":"../../../../../src","sources":["ui/screens/steps/SignUpWelcomeStep.tsx"],"mappings":";;AAEA,SAASA,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,QAAQ,EAAEC,UAAU,QAAwC,cAAc;AACjH,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,OAAOC,QAAQ,MAAM,wCAAwC;AAC7D,SAASC,OAAO,QAAQ,qBAAqB;AAC7C,SAAmBC,cAAc,EAAEC,UAAU,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAe5E,MAAMC,iBAAmD,GAAGA,CAAC;EACzDC,MAAM;EACNC,MAAM;EACNC,QAAQ;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MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCyC,SAAS,EAAE;EACf,CAAC;EACDjB,UAAU,EAAE;IACRkB,QAAQ,EAAE,EAAE;IACZb,UAAU,EAAE,KAAK;IACjBc,SAAS,EAAE;EACf,CAAC;EACDhB,UAAU,EAAE;IACRiB,SAAS,EAAE;EACf,CAAC;EACD3C,cAAc,EAAE;IACZH,QAAQ,EAAE,UAAU;IACpB+C,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACR/C,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVgC,YAAY,EAAE,EAAE;IAChBnC,UAAU,EAAE,QAAQ;IACpBwC,cAAc,EAAE;EACpB;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -7,10 +7,6 @@ export const useAuthStore = create((set, get) => ({
|
|
|
7
7
|
isLoading: false,
|
|
8
8
|
error: null,
|
|
9
9
|
lastUserFetch: null,
|
|
10
|
-
loginStart: () => set({
|
|
11
|
-
isLoading: true,
|
|
12
|
-
error: null
|
|
13
|
-
}),
|
|
14
10
|
loginSuccess: user => set({
|
|
15
11
|
isLoading: false,
|
|
16
12
|
isAuthenticated: true,
|
|
@@ -38,7 +34,9 @@ export const useAuthStore = create((set, get) => ({
|
|
|
38
34
|
|
|
39
35
|
// Use cached data if available and not forcing refresh
|
|
40
36
|
if (!forceRefresh && state.user && cacheValid) {
|
|
41
|
-
|
|
37
|
+
if (__DEV__) {
|
|
38
|
+
console.log('AuthStore: Using cached user data (age:', cacheAge, 'ms)');
|
|
39
|
+
}
|
|
42
40
|
return;
|
|
43
41
|
}
|
|
44
42
|
set({
|
|
@@ -46,14 +44,7 @@ export const useAuthStore = create((set, get) => ({
|
|
|
46
44
|
error: null
|
|
47
45
|
});
|
|
48
46
|
try {
|
|
49
|
-
console.log('AuthStore: Fetching user data...');
|
|
50
47
|
const user = await oxyServices.getCurrentUser();
|
|
51
|
-
console.log('AuthStore: Received user data:', {
|
|
52
|
-
hasUser: !!user,
|
|
53
|
-
userLinksMetadata: user?.linksMetadata,
|
|
54
|
-
userLinks: user?.links,
|
|
55
|
-
userWebsite: user?.website
|
|
56
|
-
});
|
|
57
48
|
set({
|
|
58
49
|
user,
|
|
59
50
|
isLoading: false,
|
|
@@ -61,9 +52,12 @@ export const useAuthStore = create((set, get) => ({
|
|
|
61
52
|
lastUserFetch: now
|
|
62
53
|
});
|
|
63
54
|
} catch (error) {
|
|
64
|
-
|
|
55
|
+
const errorMessage = error instanceof Error ? error.message : 'Failed to fetch user';
|
|
56
|
+
if (__DEV__) {
|
|
57
|
+
console.error('AuthStore: Error fetching user:', error);
|
|
58
|
+
}
|
|
65
59
|
set({
|
|
66
|
-
error:
|
|
60
|
+
error: errorMessage,
|
|
67
61
|
isLoading: false
|
|
68
62
|
});
|
|
69
63
|
}
|
|
@@ -74,16 +68,18 @@ export const useAuthStore = create((set, get) => ({
|
|
|
74
68
|
error: null
|
|
75
69
|
});
|
|
76
70
|
try {
|
|
77
|
-
console.log('AuthStore: Updating user with:', updates);
|
|
78
71
|
await oxyServices.updateProfile(updates);
|
|
79
|
-
console.log('AuthStore: Profile updated successfully');
|
|
80
72
|
// Immediately fetch the latest user data after update
|
|
81
|
-
await useAuthStore.getState().fetchUser(
|
|
82
|
-
|
|
73
|
+
await useAuthStore.getState().fetchUser({
|
|
74
|
+
getCurrentUser: oxyServices.getCurrentUser
|
|
75
|
+
}, true);
|
|
83
76
|
} catch (error) {
|
|
84
|
-
|
|
77
|
+
const errorMessage = error instanceof Error ? error.message : 'Failed to update user';
|
|
78
|
+
if (__DEV__) {
|
|
79
|
+
console.error('AuthStore: Error updating user:', error);
|
|
80
|
+
}
|
|
85
81
|
set({
|
|
86
|
-
error:
|
|
82
|
+
error: errorMessage,
|
|
87
83
|
isLoading: false
|
|
88
84
|
});
|
|
89
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["create","useAuthStore","set","get","user","isAuthenticated","isLoading","error","lastUserFetch","
|
|
1
|
+
{"version":3,"names":["create","useAuthStore","set","get","user","isAuthenticated","isLoading","error","lastUserFetch","loginSuccess","Date","now","loginFailure","logout","setUser","fetchUser","oxyServices","forceRefresh","state","cacheAge","Number","POSITIVE_INFINITY","cacheValid","__DEV__","console","log","getCurrentUser","errorMessage","Error","message","updateUser","updates","updateProfile","getState"],"sourceRoot":"../../../../src","sources":["ui/stores/authStore.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAiBhC,OAAO,MAAMC,YAAY,GAAGD,MAAM,CAAY,CAACE,GAAwC,EAAEC,GAAoB,MAAM;EACjHC,IAAI,EAAE,IAAI;EACVC,eAAe,EAAE,KAAK;EACtBC,SAAS,EAAE,KAAK;EAChBC,KAAK,EAAE,IAAI;EACXC,aAAa,EAAE,IAAI;EACnBC,YAAY,EAAGL,IAAU,IAAKF,GAAG,CAAC;IAAEI,SAAS,EAAE,KAAK;IAAED,eAAe,EAAE,IAAI;IAAED,IAAI;IAAEI,aAAa,EAAEE,IAAI,CAACC,GAAG,CAAC;EAAE,CAAC,CAAC;EAC/GC,YAAY,EAAGL,KAAa,IAAKL,GAAG,CAAC;IAAEI,SAAS,EAAE,KAAK;IAAEC;EAAM,CAAC,CAAC;EACjEM,MAAM,EAAEA,CAAA,KAAMX,GAAG,CAAC;IAAEE,IAAI,EAAE,IAAI;IAAEC,eAAe,EAAE,KAAK;IAAEG,aAAa,EAAE;EAAK,CAAC,CAAC;EAC9EM,OAAO,EAAGV,IAAU,IAAKF,GAAG,CAAC;IAAEE,IAAI;IAAEI,aAAa,EAAEE,IAAI,CAACC,GAAG,CAAC;EAAE,CAAC,CAAC;EACjEI,SAAS,EAAE,MAAAA,CAAOC,WAAW,EAAEC,YAAY,GAAG,KAAK,KAAK;IACtD,MAAMC,KAAK,GAAGf,GAAG,CAAC,CAAC;IACnB,MAAMQ,GAAG,GAAGD,IAAI,CAACC,GAAG,CAAC,CAAC;IACtB,MAAMQ,QAAQ,GAAGD,KAAK,CA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