pure-react-ui 1.4.7 → 1.5.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/README.md CHANGED
@@ -83,6 +83,160 @@ import { Modal } from 'pure-react-ui';
83
83
  - `closeOnEscape`: boolean (default: true)
84
84
  - `showCloseButton`: boolean (default: true)
85
85
 
86
+ ### Icon
87
+
88
+ A comprehensive icon component library with 100+ SVG icons.
89
+
90
+ ```tsx
91
+ import { Icon } from 'pure-react-ui';
92
+
93
+ <Icon name="Home" size={24} color="#007bff" />
94
+ <Icon name="Search" size={32} onClick={handleClick} />
95
+ ```
96
+
97
+ **Props:**
98
+ - `name`: IconName (required) - Name of the icon to display
99
+ - `size`: number | string (default: 24) - Size of the icon
100
+ - `color`: string (default: 'currentColor') - Color of the icon
101
+ - `className`: string (optional) - Additional CSS classes
102
+ - `onClick`: () => void (optional) - Click handler (makes icon clickable)
103
+
104
+ **Available Icons:**
105
+
106
+ **Arrows & Navigation:**
107
+ ArrowLeft, ArrowRight, ArrowUp, ArrowDown, ArrowUpRight, ArrowDownRight, ChevronLeft, ChevronRight, ChevronUp, ChevronDown, DoubleChevronLeft, DoubleChevronRight, Home, Menu, Close, Search, Filter
108
+
109
+ **Actions:**
110
+ Plus, Minus, Check, X, Edit, Trash, Save, Download, Upload, Copy, Share
111
+
112
+ **Media:**
113
+ Play, Pause, Stop, VolumeUp, VolumeDown, VolumeOff, Image, Video, Camera
114
+
115
+ **Communication:**
116
+ Mail, Message, Phone, Bell, Notification
117
+
118
+ **Files:**
119
+ File, Folder, FolderOpen, FileText, FilePdf
120
+
121
+ **User:**
122
+ User, Users, UserPlus, UserMinus, Settings, Logout
123
+
124
+ **Status:**
125
+ CheckCircle, XCircle, AlertCircle, Info, Warning, Star, Heart, Bookmark
126
+
127
+ **Social:**
128
+ Facebook, Twitter, Instagram, Linkedin, Github, Youtube
129
+
130
+ **Technology:**
131
+ Wifi, Bluetooth, Battery, Zap, Lock, Unlock, Shield
132
+
133
+ **Shopping:**
134
+ ShoppingCart, ShoppingBag, CreditCard, Gift
135
+
136
+ **Time:**
137
+ Clock, Calendar, Timer
138
+
139
+ **Location:**
140
+ MapPin, Globe, Navigation
141
+
142
+ **Weather:**
143
+ Sun, Moon, Cloud
144
+
145
+ **Utility:**
146
+ Eye, EyeOff, Refresh, MoreVertical, MoreHorizontal, Grid, List
147
+
148
+ You can also import individual icons directly:
149
+ ```tsx
150
+ import { Home, Search, User } from 'pure-react-ui';
151
+
152
+ <Home size={24} color="#007bff" />
153
+ ```
154
+
155
+ ### Space
156
+
157
+ A layout component for adding consistent spacing between elements.
158
+
159
+ ```tsx
160
+ import { Space } from 'pure-react-ui';
161
+
162
+ <Space size="medium" direction="horizontal">
163
+ <Button>Button 1</Button>
164
+ <Button>Button 2</Button>
165
+ <Button>Button 3</Button>
166
+ </Space>
167
+
168
+ <Space size={20} direction="vertical" align="start">
169
+ <Card>Card 1</Card>
170
+ <Card>Card 2</Card>
171
+ </Space>
172
+ ```
173
+
174
+ **Props:**
175
+ - `size`: 'small' | 'medium' | 'large' | number (default: 'medium') - Spacing size between items
176
+ - `direction`: 'horizontal' | 'vertical' (default: 'horizontal') - Direction of spacing
177
+ - `align`: 'start' | 'end' | 'center' | 'baseline' | 'stretch' (default: 'center') - Alignment of items
178
+ - `wrap`: boolean (default: false) - Whether items should wrap to next line
179
+ - `className`: string (optional) - Additional CSS classes
180
+
181
+ ### Flex
182
+
183
+ A flexible container component based on CSS Flexbox.
184
+
185
+ ```tsx
186
+ import { Flex } from 'pure-react-ui';
187
+
188
+ <Flex direction="row" justify="between" align="center" gap="medium">
189
+ <Button>Left</Button>
190
+ <Button>Center</Button>
191
+ <Button>Right</Button>
192
+ </Flex>
193
+
194
+ <Flex direction="column" justify="start" align="stretch" gap={16}>
195
+ <Card>Card 1</Card>
196
+ <Card>Card 2</Card>
197
+ </Flex>
198
+ ```
199
+
200
+ **Props:**
201
+ - `direction`: 'row' | 'column' | 'row-reverse' | 'column-reverse' (default: 'row') - Flex direction
202
+ - `justify`: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' (default: 'start') - Justify content
203
+ - `align`: 'start' | 'end' | 'center' | 'baseline' | 'stretch' (default: 'start') - Align items
204
+ - `wrap`: boolean | 'wrap' | 'nowrap' | 'wrap-reverse' (default: false) - Flex wrap behavior
205
+ - `gap`: 'none' | 'small' | 'medium' | 'large' | number (default: 'none') - Gap between items
206
+ - `className`: string (optional) - Additional CSS classes
207
+ - `style`: React.CSSProperties (optional) - Additional inline styles
208
+
209
+ ### Text
210
+
211
+ A typography component for consistent text styling with various options.
212
+
213
+ ```tsx
214
+ import { Text } from 'pure-react-ui';
215
+
216
+ <Text as="h1" size="2xl" weight="bold" color="primary">
217
+ Heading Text
218
+ </Text>
219
+
220
+ <Text size="lg" color="muted" align="center">
221
+ Centered paragraph text
222
+ </Text>
223
+
224
+ <Text as="span" size="sm" decoration="underline" transform="uppercase">
225
+ Styled Text
226
+ </Text>
227
+ ```
228
+
229
+ **Props:**
230
+ - `as`: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'small' | 'strong' | 'em' | 'code' | 'pre' (default: 'p') - HTML element to render
231
+ - `size`: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' (default: 'md') - Font size
232
+ - `weight`: 'light' | 'normal' | 'medium' | 'semibold' | 'bold' (default: 'normal') - Font weight
233
+ - `color`: 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'muted' (default: 'default') - Text color
234
+ - `align`: 'left' | 'center' | 'right' | 'justify' (default: 'left') - Text alignment
235
+ - `transform`: 'none' | 'uppercase' | 'lowercase' | 'capitalize' (default: 'none') - Text transform
236
+ - `decoration`: 'none' | 'underline' | 'line-through' | 'overline' (default: 'none') - Text decoration
237
+ - `truncate`: boolean (default: false) - Truncate text with ellipsis
238
+ - `className`: string (optional) - Additional CSS classes
239
+
86
240
  ## Styling
87
241
 
88
242
  All components include their own CSS files and use CSS classes with the `pure-` prefix. The CSS files are automatically imported with each component. You can also style them by targeting these classes:
@@ -90,11 +244,35 @@ All components include their own CSS files and use CSS classes with the `pure-`
90
244
  - **Button**: `pure-button`, `pure-button--primary`, `pure-button--secondary`, etc.
91
245
  - **Card**: `pure-card`, `pure-card--hoverable`, `pure-card--shadow-medium`, etc.
92
246
  - **Modal**: `pure-modal`, `pure-modal__overlay`, `pure-modal__header`, etc.
247
+ - **Icon**: `pure-icon`, `pure-icon--clickable`, `pure-icon--small`, etc.
248
+ - **Space**: `pure-space`, `pure-space--horizontal`, `pure-space--vertical`, etc.
249
+ - **Flex**: `pure-flex`, `pure-flex--row`, `pure-flex--column`, etc.
250
+ - **Text**: `pure-text`, `pure-text--lg`, `pure-text--bold`, etc.
93
251
 
94
252
  Each component has its own CSS file located in:
95
253
  - `lib/components/Button/Button.css`
96
254
  - `lib/components/Card/Card.css`
97
255
  - `lib/components/Modal/Modal.css`
256
+ - `lib/components/Icon/Icon.css`
257
+ - `lib/components/Space/Space.css`
258
+ - `lib/components/Flex/Flex.css`
259
+ - `lib/components/Text/Text.css`
260
+
261
+ ## Examples
262
+
263
+ A complete example application is available in the `example` directory. To run it:
264
+
265
+ ```bash
266
+ # From the root directory, build the package first
267
+ npm run build
268
+
269
+ # Then navigate to example directory
270
+ cd example
271
+ npm install
272
+ npm run dev
273
+ ```
274
+
275
+ Or check out `EXAMPLES.md` for code examples and usage patterns.
98
276
 
99
277
  ## License
100
278
 
@@ -0,0 +1,106 @@
1
+ /* Pure Flex Component Styles */
2
+ .pure-flex {
3
+ display: flex;
4
+ flex-wrap: nowrap;
5
+ }
6
+
7
+ /* Direction Variants */
8
+ .pure-flex--row {
9
+ flex-direction: row;
10
+ }
11
+
12
+ .pure-flex--column {
13
+ flex-direction: column;
14
+ }
15
+
16
+ .pure-flex--row-reverse {
17
+ flex-direction: row-reverse;
18
+ }
19
+
20
+ .pure-flex--column-reverse {
21
+ flex-direction: column-reverse;
22
+ }
23
+
24
+ /* Justify Content */
25
+ .pure-flex--justify-start {
26
+ justify-content: flex-start;
27
+ }
28
+
29
+ .pure-flex--justify-end {
30
+ justify-content: flex-end;
31
+ }
32
+
33
+ .pure-flex--justify-center {
34
+ justify-content: center;
35
+ }
36
+
37
+ .pure-flex--justify-between {
38
+ justify-content: space-between;
39
+ }
40
+
41
+ .pure-flex--justify-around {
42
+ justify-content: space-around;
43
+ }
44
+
45
+ .pure-flex--justify-evenly {
46
+ justify-content: space-evenly;
47
+ }
48
+
49
+ /* Align Items */
50
+ .pure-flex--align-start {
51
+ align-items: flex-start;
52
+ }
53
+
54
+ .pure-flex--align-end {
55
+ align-items: flex-end;
56
+ }
57
+
58
+ .pure-flex--align-center {
59
+ align-items: center;
60
+ }
61
+
62
+ .pure-flex--align-baseline {
63
+ align-items: baseline;
64
+ }
65
+
66
+ .pure-flex--align-stretch {
67
+ align-items: stretch;
68
+ }
69
+
70
+ /* Wrap */
71
+ .pure-flex--wrap {
72
+ flex-wrap: wrap;
73
+ }
74
+
75
+ .pure-flex--nowrap {
76
+ flex-wrap: nowrap;
77
+ }
78
+
79
+ .pure-flex--wrap-reverse {
80
+ flex-wrap: wrap-reverse;
81
+ }
82
+
83
+ /* Gap */
84
+ .pure-flex--gap-none {
85
+ gap: 0;
86
+ }
87
+
88
+ .pure-flex--gap-small {
89
+ gap: 0.5rem;
90
+ }
91
+
92
+ .pure-flex--gap-medium {
93
+ gap: 1rem;
94
+ }
95
+
96
+ .pure-flex--gap-large {
97
+ gap: 1.5rem;
98
+ }
99
+
100
+ /* Responsive */
101
+ @media (max-width: 768px) {
102
+ .pure-flex--wrap {
103
+ flex-wrap: wrap;
104
+ }
105
+ }
106
+
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import './Flex.css';
3
+ export interface FlexProps {
4
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
5
+ justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
6
+ align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
7
+ wrap?: boolean | 'wrap' | 'nowrap' | 'wrap-reverse';
8
+ gap?: 'none' | 'small' | 'medium' | 'large' | number;
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ children: React.ReactNode;
12
+ }
13
+ export declare const Flex: React.FC<FlexProps>;
14
+ //# sourceMappingURL=Flex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../src/components/Flex/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,CAAC;AAEpB,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,aAAa,GAAG,gBAAgB,CAAC;IAChE,OAAO,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACvE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC5D,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,cAAc,CAAC;IACpD,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAwDpC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import './Flex.css';
3
+ export const Flex = ({ direction = 'row', justify = 'start', align = 'start', wrap = false, gap = 'none', className = '', style = {}, children }) => {
4
+ const baseClass = 'pure-flex';
5
+ const directionClass = `pure-flex--${direction}`;
6
+ const justifyClass = `pure-flex--justify-${justify}`;
7
+ const alignClass = `pure-flex--align-${align}`;
8
+ let wrapClass = '';
9
+ if (wrap === true) {
10
+ wrapClass = 'pure-flex--wrap';
11
+ }
12
+ else if (wrap === 'wrap') {
13
+ wrapClass = 'pure-flex--wrap';
14
+ }
15
+ else if (wrap === 'wrap-reverse') {
16
+ wrapClass = 'pure-flex--wrap-reverse';
17
+ }
18
+ else {
19
+ wrapClass = 'pure-flex--nowrap';
20
+ }
21
+ const combinedClassName = [
22
+ baseClass,
23
+ directionClass,
24
+ justifyClass,
25
+ alignClass,
26
+ wrapClass,
27
+ className
28
+ ].filter(Boolean).join(' ');
29
+ const gapValue = typeof gap === 'number' ? gap : undefined;
30
+ const gapClass = typeof gap === 'string' && gap !== 'none' ? `pure-flex--gap-${gap}` : '';
31
+ const combinedStyle = {
32
+ ...style,
33
+ };
34
+ if (gapValue !== undefined) {
35
+ combinedStyle.gap = `${gapValue}px`;
36
+ }
37
+ const finalClassName = [combinedClassName, gapClass].filter(Boolean).join(' ');
38
+ return (React.createElement("div", { className: finalClassName, style: combinedStyle }, children));
39
+ };
40
+ //# sourceMappingURL=Flex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flex.js","sourceRoot":"","sources":["../../../src/components/Flex/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,CAAC;AAapB,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,SAAS,GAAG,KAAK,EACjB,OAAO,GAAG,OAAO,EACjB,KAAK,GAAG,OAAO,EACf,IAAI,GAAG,KAAK,EACZ,GAAG,GAAG,MAAM,EACZ,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,EAAE,EACV,QAAQ,EACT,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,WAAW,CAAC;IAC9B,MAAM,cAAc,GAAG,cAAc,SAAS,EAAE,CAAC;IACjD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,CACL,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,88 @@
1
+ /* Pure Icon Component Styles */
2
+ .pure-icon {
3
+ display: inline-block;
4
+ vertical-align: middle;
5
+ flex-shrink: 0;
6
+ user-select: none;
7
+ }
8
+
9
+ .pure-icon--clickable {
10
+ cursor: pointer;
11
+ transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
12
+ }
13
+
14
+ .pure-icon--clickable:hover {
15
+ opacity: 0.8;
16
+ transform: scale(1.1);
17
+ }
18
+
19
+ .pure-icon--clickable:active {
20
+ transform: scale(0.95);
21
+ }
22
+
23
+ .pure-icon__wrapper {
24
+ display: inline-flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ cursor: pointer;
28
+ transition: opacity 0.2s ease-in-out;
29
+ }
30
+
31
+ .pure-icon__wrapper:hover {
32
+ opacity: 0.8;
33
+ }
34
+
35
+ .pure-icon__wrapper:focus {
36
+ outline: none;
37
+ border-radius: 0.25rem;
38
+ box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
39
+ }
40
+
41
+ .pure-icon__wrapper:focus:not(:focus-visible) {
42
+ box-shadow: none;
43
+ }
44
+
45
+ /* Size variants */
46
+ .pure-icon--small {
47
+ width: 16px;
48
+ height: 16px;
49
+ }
50
+
51
+ .pure-icon--medium {
52
+ width: 24px;
53
+ height: 24px;
54
+ }
55
+
56
+ .pure-icon--large {
57
+ width: 32px;
58
+ height: 32px;
59
+ }
60
+
61
+ /* Animation for loading/spinning icons */
62
+ .pure-icon--spin {
63
+ animation: pure-icon-spin 1s linear infinite;
64
+ }
65
+
66
+ @keyframes pure-icon-spin {
67
+ from {
68
+ transform: rotate(0deg);
69
+ }
70
+ to {
71
+ transform: rotate(360deg);
72
+ }
73
+ }
74
+
75
+ /* Pulse animation */
76
+ .pure-icon--pulse {
77
+ animation: pure-icon-pulse 2s ease-in-out infinite;
78
+ }
79
+
80
+ @keyframes pure-icon-pulse {
81
+ 0%, 100% {
82
+ opacity: 1;
83
+ }
84
+ 50% {
85
+ opacity: 0.5;
86
+ }
87
+ }
88
+
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { IconName, IconProps as BaseIconProps } from './icons';
3
+ import './Icon.css';
4
+ export interface IconProps extends BaseIconProps {
5
+ name: IconName;
6
+ size?: number | string;
7
+ color?: string;
8
+ className?: string;
9
+ onClick?: () => void;
10
+ }
11
+ export declare const Icon: React.FC<IconProps>;
12
+ export * from './icons';
13
+ //# sourceMappingURL=Icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAW,QAAQ,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,YAAY,CAAC;AAEpB,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAgDpC,CAAC;AAGF,cAAc,SAAS,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { iconMap } from './icons';
3
+ import './Icon.css';
4
+ export const Icon = ({ name, size = 24, color = 'currentColor', className = '', onClick, ...props }) => {
5
+ const IconComponent = iconMap[name];
6
+ if (!IconComponent) {
7
+ console.warn(`Icon "${name}" not found`);
8
+ return null;
9
+ }
10
+ const baseClass = 'pure-icon';
11
+ const clickableClass = onClick ? 'pure-icon--clickable' : '';
12
+ const combinedClassName = [baseClass, clickableClass, className].filter(Boolean).join(' ');
13
+ const iconElement = (React.createElement(IconComponent, { size: size, color: color, className: combinedClassName, ...props }));
14
+ if (onClick) {
15
+ return (React.createElement("span", { className: "pure-icon__wrapper", onClick: onClick, role: "button", tabIndex: 0, onKeyDown: (e) => {
16
+ if (e.key === 'Enter' || e.key === ' ') {
17
+ e.preventDefault();
18
+ onClick();
19
+ }
20
+ } }, iconElement));
21
+ }
22
+ return iconElement;
23
+ };
24
+ // Export individual icons for direct use
25
+ export * from './icons';
26
+ //# sourceMappingURL=Icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAwC,MAAM,SAAS,CAAC;AACxE,OAAO,YAAY,CAAC;AAUpB,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,KAAK,GAAG,cAAc,EACtB,SAAS,GAAG,EAAE,EACd,OAAO,EACP,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpC,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,aAAa,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,SAAS,GAAG,WAAW,CAAC;IAC9B,MAAM,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7D,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE3F,MAAM,WAAW,GAAG,CAClB,oBAAC,aAAa,IACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,iBA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