@craftzbay/ui 0.11.3 → 0.11.4
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/dist-lib/_virtual/_rolldown/runtime.js +11 -0
- package/dist-lib/components/ui/Accordion.js +42 -67
- package/dist-lib/components/ui/Accordion.js.map +1 -1
- package/dist-lib/components/ui/Alert.js +71 -77
- package/dist-lib/components/ui/Alert.js.map +1 -1
- package/dist-lib/components/ui/Avatar.js +67 -92
- package/dist-lib/components/ui/Avatar.js.map +1 -1
- package/dist-lib/components/ui/Badge.js +119 -74
- package/dist-lib/components/ui/Badge.js.map +1 -1
- package/dist-lib/components/ui/Breadcrumbs.js +62 -50
- package/dist-lib/components/ui/Breadcrumbs.js.map +1 -1
- package/dist-lib/components/ui/Button.js +129 -131
- package/dist-lib/components/ui/Button.js.map +1 -1
- package/dist-lib/components/ui/Calendar.d.ts +1 -1
- package/dist-lib/components/ui/Calendar.js +99 -136
- package/dist-lib/components/ui/Calendar.js.map +1 -1
- package/dist-lib/components/ui/Card.js +88 -94
- package/dist-lib/components/ui/Card.js.map +1 -1
- package/dist-lib/components/ui/Carousel.js +125 -170
- package/dist-lib/components/ui/Carousel.js.map +1 -1
- package/dist-lib/components/ui/Chart.d.ts +3 -3
- package/dist-lib/components/ui/Chart.js +435 -464
- package/dist-lib/components/ui/Chart.js.map +1 -1
- package/dist-lib/components/ui/Checkbox.js +60 -69
- package/dist-lib/components/ui/Checkbox.js.map +1 -1
- package/dist-lib/components/ui/Combobox.js +179 -192
- package/dist-lib/components/ui/Combobox.js.map +1 -1
- package/dist-lib/components/ui/CommandPalette.d.ts +2 -2
- package/dist-lib/components/ui/CommandPalette.js +106 -167
- package/dist-lib/components/ui/CommandPalette.js.map +1 -1
- package/dist-lib/components/ui/ContextMenu.d.ts +1 -1
- package/dist-lib/components/ui/ContextMenu.js +89 -154
- package/dist-lib/components/ui/ContextMenu.js.map +1 -1
- package/dist-lib/components/ui/DataGrid.d.ts +1 -1
- package/dist-lib/components/ui/DataGrid.js +99 -96
- package/dist-lib/components/ui/DataGrid.js.map +1 -1
- package/dist-lib/components/ui/DatePicker.js +151 -188
- package/dist-lib/components/ui/DatePicker.js.map +1 -1
- package/dist-lib/components/ui/DesignSystemProvider.d.ts +1 -1
- package/dist-lib/components/ui/DesignSystemProvider.js +120 -130
- package/dist-lib/components/ui/DesignSystemProvider.js.map +1 -1
- package/dist-lib/components/ui/Dialog.d.ts +3 -3
- package/dist-lib/components/ui/Dialog.js +108 -156
- package/dist-lib/components/ui/Dialog.js.map +1 -1
- package/dist-lib/components/ui/Drawer.d.ts +3 -3
- package/dist-lib/components/ui/Drawer.js +90 -124
- package/dist-lib/components/ui/Drawer.js.map +1 -1
- package/dist-lib/components/ui/DropdownMenu.d.ts +1 -1
- package/dist-lib/components/ui/DropdownMenu.js +92 -158
- package/dist-lib/components/ui/DropdownMenu.js.map +1 -1
- package/dist-lib/components/ui/EmptyState.js +31 -44
- package/dist-lib/components/ui/EmptyState.js.map +1 -1
- package/dist-lib/components/ui/ErrorState.js +57 -67
- package/dist-lib/components/ui/ErrorState.js.map +1 -1
- package/dist-lib/components/ui/FileUpload.js +113 -107
- package/dist-lib/components/ui/FileUpload.js.map +1 -1
- package/dist-lib/components/ui/Form.d.ts +6 -4
- package/dist-lib/components/ui/Form.js +117 -122
- package/dist-lib/components/ui/Form.js.map +1 -1
- package/dist-lib/components/ui/Icon.d.ts +1 -1
- package/dist-lib/components/ui/Icon.js +30 -29
- package/dist-lib/components/ui/Icon.js.map +1 -1
- package/dist-lib/components/ui/IconButton.js +61 -63
- package/dist-lib/components/ui/IconButton.js.map +1 -1
- package/dist-lib/components/ui/Input.js +133 -156
- package/dist-lib/components/ui/Input.js.map +1 -1
- package/dist-lib/components/ui/Kbd.js +14 -21
- package/dist-lib/components/ui/Kbd.js.map +1 -1
- package/dist-lib/components/ui/MultiSelect.js +176 -208
- package/dist-lib/components/ui/MultiSelect.js.map +1 -1
- package/dist-lib/components/ui/Pagination.js +152 -149
- package/dist-lib/components/ui/Pagination.js.map +1 -1
- package/dist-lib/components/ui/Popover.js +18 -33
- package/dist-lib/components/ui/Popover.js.map +1 -1
- package/dist-lib/components/ui/Progress.js +77 -99
- package/dist-lib/components/ui/Progress.js.map +1 -1
- package/dist-lib/components/ui/RadioGroup.js +51 -80
- package/dist-lib/components/ui/RadioGroup.js.map +1 -1
- package/dist-lib/components/ui/RelativeTime.js +22 -29
- package/dist-lib/components/ui/RelativeTime.js.map +1 -1
- package/dist-lib/components/ui/ScrollArea.js +39 -58
- package/dist-lib/components/ui/ScrollArea.js.map +1 -1
- package/dist-lib/components/ui/Select.js +108 -131
- package/dist-lib/components/ui/Select.js.map +1 -1
- package/dist-lib/components/ui/Separator.js +18 -24
- package/dist-lib/components/ui/Separator.js.map +1 -1
- package/dist-lib/components/ui/Sheet.d.ts +2 -2
- package/dist-lib/components/ui/Sheet.js +77 -129
- package/dist-lib/components/ui/Sheet.js.map +1 -1
- package/dist-lib/components/ui/Sidebar.d.ts +1 -1
- package/dist-lib/components/ui/Sidebar.js +168 -207
- package/dist-lib/components/ui/Sidebar.js.map +1 -1
- package/dist-lib/components/ui/Skeleton.js +17 -27
- package/dist-lib/components/ui/Skeleton.js.map +1 -1
- package/dist-lib/components/ui/Slider.js +45 -62
- package/dist-lib/components/ui/Slider.js.map +1 -1
- package/dist-lib/components/ui/Snackbar.js +75 -55
- package/dist-lib/components/ui/Snackbar.js.map +1 -1
- package/dist-lib/components/ui/Spinner.js +45 -52
- package/dist-lib/components/ui/Spinner.js.map +1 -1
- package/dist-lib/components/ui/Stepper.js +56 -108
- package/dist-lib/components/ui/Stepper.js.map +1 -1
- package/dist-lib/components/ui/Switch.js +46 -79
- package/dist-lib/components/ui/Switch.js.map +1 -1
- package/dist-lib/components/ui/Table.js +108 -169
- package/dist-lib/components/ui/Table.js.map +1 -1
- package/dist-lib/components/ui/Tabs.js +57 -88
- package/dist-lib/components/ui/Tabs.js.map +1 -1
- package/dist-lib/components/ui/TagInput.js +76 -109
- package/dist-lib/components/ui/TagInput.js.map +1 -1
- package/dist-lib/components/ui/Textarea.js +74 -86
- package/dist-lib/components/ui/Textarea.js.map +1 -1
- package/dist-lib/components/ui/Timeline.d.ts +3 -3
- package/dist-lib/components/ui/Timeline.js +61 -49
- package/dist-lib/components/ui/Timeline.js.map +1 -1
- package/dist-lib/components/ui/Toast.d.ts +1 -1
- package/dist-lib/components/ui/Toast.js +136 -150
- package/dist-lib/components/ui/Toast.js.map +1 -1
- package/dist-lib/components/ui/Tooltip.d.ts +2 -2
- package/dist-lib/components/ui/Tooltip.js +35 -56
- package/dist-lib/components/ui/Tooltip.js.map +1 -1
- package/dist-lib/components/ui/TopNav.js +46 -66
- package/dist-lib/components/ui/TopNav.js.map +1 -1
- package/dist-lib/components/ui/Tree.js +134 -168
- package/dist-lib/components/ui/Tree.js.map +1 -1
- package/dist-lib/hooks/use-debounce.js +27 -33
- package/dist-lib/hooks/use-debounce.js.map +1 -1
- package/dist-lib/hooks/use-delayed-loading.js +19 -18
- package/dist-lib/hooks/use-delayed-loading.js.map +1 -1
- package/dist-lib/hooks/use-field-ids.js +14 -16
- package/dist-lib/hooks/use-field-ids.js.map +1 -1
- package/dist-lib/hooks/use-media-query.js +15 -19
- package/dist-lib/hooks/use-media-query.js.map +1 -1
- package/dist-lib/hooks/use-modifier-key.js +20 -15
- package/dist-lib/hooks/use-modifier-key.js.map +1 -1
- package/dist-lib/hooks/use-strings.js +10 -10
- package/dist-lib/hooks/use-strings.js.map +1 -1
- package/dist-lib/hooks/use-toast.js +73 -62
- package/dist-lib/hooks/use-toast.js.map +1 -1
- package/dist-lib/icon.js +2 -6
- package/dist-lib/icons/index.js +166 -163
- package/dist-lib/icons/index.js.map +1 -1
- package/dist-lib/illustrations/index.d.ts +7 -7
- package/dist-lib/illustrations/index.js +255 -106
- package/dist-lib/illustrations/index.js.map +1 -1
- package/dist-lib/index.js +69 -291
- package/dist-lib/lib/cva.js +2 -0
- package/dist-lib/lib/format.js +71 -87
- package/dist-lib/lib/format.js.map +1 -1
- package/dist-lib/lib/return-focus.js +11 -11
- package/dist-lib/lib/return-focus.js.map +1 -1
- package/dist-lib/lib/strings.js +167 -135
- package/dist-lib/lib/strings.js.map +1 -1
- package/dist-lib/lib/strings.mn.js +150 -113
- package/dist-lib/lib/strings.mn.js.map +1 -1
- package/dist-lib/lib/utils.js +9 -9
- package/dist-lib/lib/utils.js.map +1 -1
- package/dist-lib/styles.css +3 -1
- package/package.json +50 -50
- package/dist-lib/__tests__/helpers/color.d.ts +0 -9
- package/dist-lib/__tests__/helpers/theme.d.ts +0 -18
- package/dist-lib/icon.js.map +0 -1
- package/dist-lib/index.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
//#region src/lib/return-focus.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
return e ? (n) => {
|
|
4
|
+
if (t?.(n), n.defaultPrevented) return;
|
|
5
|
+
let r = e.current;
|
|
6
|
+
r && (n.preventDefault(), r.focus());
|
|
7
|
+
} : t;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=return-focus.js.map
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as withReturnFocus };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=return-focus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"return-focus.js","sources":["../../src/lib/return-focus.ts"],"sourcesContent":["import type { RefObject } from 'react';\n\n/** Element that should receive focus when an overlay closes. */\nexport type ReturnFocusRef = RefObject<HTMLElement | null>;\n\n/**\n * Build an `onCloseAutoFocus` handler that moves focus to `returnFocusTo`\n * instead of Radix's default (the element focused when the content mounted —\n * which is `<body>` for controlled overlays opened from a pointer click on a\n * non-focusable or tooltip-wrapped trigger). A consumer handler runs first\n * and wins if it calls `preventDefault()`.\n */\nexport function withReturnFocus(\n returnFocusTo: ReturnFocusRef | undefined,\n handler: ((e: Event) => void) | undefined,\n): ((e: Event) => void) | undefined {\n if (!returnFocusTo) return handler;\n return (e) => {\n handler?.(e);\n if (e.defaultPrevented) return;\n const el = returnFocusTo.current;\n if (!el) return;\n e.preventDefault();\n el.focus();\n };\n}\n"],"
|
|
1
|
+
{"version":3,"file":"return-focus.js","names":[],"sources":["../../src/lib/return-focus.ts"],"sourcesContent":["import type { RefObject } from 'react';\n\n/** Element that should receive focus when an overlay closes. */\nexport type ReturnFocusRef = RefObject<HTMLElement | null>;\n\n/**\n * Build an `onCloseAutoFocus` handler that moves focus to `returnFocusTo`\n * instead of Radix's default (the element focused when the content mounted —\n * which is `<body>` for controlled overlays opened from a pointer click on a\n * non-focusable or tooltip-wrapped trigger). A consumer handler runs first\n * and wins if it calls `preventDefault()`.\n */\nexport function withReturnFocus(\n returnFocusTo: ReturnFocusRef | undefined,\n handler: ((e: Event) => void) | undefined,\n): ((e: Event) => void) | undefined {\n if (!returnFocusTo) return handler;\n return (e) => {\n handler?.(e);\n if (e.defaultPrevented) return;\n const el = returnFocusTo.current;\n if (!el) return;\n e.preventDefault();\n el.focus();\n };\n}\n"],"mappings":";AAYA,SAAgB,EACd,GACA,GACkC;CAElC,OADK,KACG,MAAM;EAEZ,IADA,IAAU,CAAC,GACP,EAAE,kBAAkB;EACxB,IAAM,IAAK,EAAc;EACpB,MACL,EAAE,eAAe,GACjB,EAAG,MAAM;CACX,IAR2B;AAS7B"}
|
package/dist-lib/lib/strings.js
CHANGED
|
@@ -1,141 +1,173 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
2
|
+
//#region src/lib/strings.ts
|
|
3
|
+
var e = {
|
|
4
|
+
alert: { dismiss: "Dismiss" },
|
|
5
|
+
snackbar: { dismiss: "Dismiss" },
|
|
6
|
+
dialog: { close: "Close" },
|
|
7
|
+
sheet: { close: "Close" },
|
|
8
|
+
toast: {
|
|
9
|
+
close: "Close",
|
|
10
|
+
region: "Notifications"
|
|
11
|
+
},
|
|
12
|
+
drawer: { close: "Close" },
|
|
13
|
+
command: { suggestions: "Suggestions" },
|
|
14
|
+
calendar: {
|
|
15
|
+
previous: "Previous month",
|
|
16
|
+
next: "Next month",
|
|
17
|
+
chooseMonth: "Choose the month",
|
|
18
|
+
chooseYear: "Choose the year",
|
|
19
|
+
nav: "Calendar navigation"
|
|
20
|
+
},
|
|
21
|
+
confirmationDialog: {
|
|
22
|
+
confirm: "Confirm",
|
|
23
|
+
cancel: "Cancel"
|
|
24
|
+
},
|
|
25
|
+
commandDialog: { title: "Command palette" },
|
|
26
|
+
carousel: {
|
|
27
|
+
label: "Carousel",
|
|
28
|
+
previous: "Previous",
|
|
29
|
+
next: "Next",
|
|
30
|
+
slide: "{index} of {count}"
|
|
31
|
+
},
|
|
32
|
+
pagination: {
|
|
33
|
+
showing: "Showing {from}–{to} of {total}",
|
|
34
|
+
rowsPerPage: "Rows per page",
|
|
35
|
+
first: "Go to first page",
|
|
36
|
+
last: "Go to last page",
|
|
37
|
+
prev: "Previous page",
|
|
38
|
+
next: "Next page",
|
|
39
|
+
page: "Page {n}",
|
|
40
|
+
perPage: "{n} / page",
|
|
41
|
+
nav: "Pagination"
|
|
42
|
+
},
|
|
43
|
+
breadcrumbs: {
|
|
44
|
+
label: "Breadcrumb",
|
|
45
|
+
collapsed: "Hidden items"
|
|
46
|
+
},
|
|
47
|
+
stepper: {
|
|
48
|
+
label: "Progress",
|
|
49
|
+
complete: "Completed",
|
|
50
|
+
current: "Current",
|
|
51
|
+
upcoming: "Upcoming"
|
|
52
|
+
},
|
|
53
|
+
topNav: { label: "Primary" },
|
|
54
|
+
sidebar: {
|
|
55
|
+
label: "Primary",
|
|
56
|
+
collapse: "Collapse sidebar",
|
|
57
|
+
expand: "Expand sidebar",
|
|
58
|
+
collapseShort: "Collapse"
|
|
59
|
+
},
|
|
60
|
+
select: { placeholder: "Select…" },
|
|
61
|
+
combobox: {
|
|
62
|
+
placeholder: "Select…",
|
|
63
|
+
searchPlaceholder: "Search…",
|
|
64
|
+
empty: "No results.",
|
|
65
|
+
clear: "Clear selection",
|
|
66
|
+
loadError: "Couldn't load options."
|
|
67
|
+
},
|
|
68
|
+
multiSelect: {
|
|
69
|
+
placeholder: "Select…",
|
|
70
|
+
empty: "No results.",
|
|
71
|
+
clearAll: "Clear all",
|
|
72
|
+
remove: "Remove {label}"
|
|
73
|
+
},
|
|
74
|
+
tagInput: {
|
|
75
|
+
placeholder: "Add and press Enter",
|
|
76
|
+
remove: "Remove {tag}"
|
|
77
|
+
},
|
|
78
|
+
dataGrid: {
|
|
79
|
+
filterPlaceholder: "Filter…",
|
|
80
|
+
empty: "No results.",
|
|
81
|
+
emptyCell: "Empty",
|
|
82
|
+
columns: "Columns",
|
|
83
|
+
columnVisibility: "Column visibility",
|
|
84
|
+
filterRows: "Filter rows"
|
|
85
|
+
},
|
|
86
|
+
datePicker: {
|
|
87
|
+
pickDate: "Pick a date",
|
|
88
|
+
pickRange: "Pick a range"
|
|
89
|
+
},
|
|
90
|
+
fileUpload: {
|
|
91
|
+
drop: "Drop files here, or click to browse",
|
|
92
|
+
remove: "Remove {name}",
|
|
93
|
+
bytes: "{n} B",
|
|
94
|
+
kilobytes: "{n} KB",
|
|
95
|
+
megabytes: "{n} MB"
|
|
96
|
+
},
|
|
97
|
+
input: {
|
|
98
|
+
clear: "Clear input",
|
|
99
|
+
showPassword: "Show password",
|
|
100
|
+
hidePassword: "Hide password"
|
|
101
|
+
},
|
|
102
|
+
slider: {
|
|
103
|
+
minimum: "Minimum",
|
|
104
|
+
maximum: "Maximum",
|
|
105
|
+
value: "Value"
|
|
106
|
+
},
|
|
107
|
+
spinner: { loading: "Loading" },
|
|
108
|
+
errorState: {
|
|
109
|
+
notFoundTitle: "Page not found",
|
|
110
|
+
notFoundDescription: "We couldn't find what you were looking for.",
|
|
111
|
+
serverTitle: "Something went wrong",
|
|
112
|
+
serverDescription: "We're looking into it. Please try again in a moment.",
|
|
113
|
+
genericTitle: "Unexpected error",
|
|
114
|
+
genericDescription: "Something interrupted this action.",
|
|
115
|
+
forbiddenTitle: "You don't have access",
|
|
116
|
+
forbiddenDescription: "Ask an admin to grant the permission.",
|
|
117
|
+
tryAgain: "Try again"
|
|
118
|
+
},
|
|
119
|
+
avatar: {
|
|
120
|
+
status: "Status: {status}",
|
|
121
|
+
more: "{n} more"
|
|
122
|
+
},
|
|
123
|
+
tree: { label: "Tree" },
|
|
124
|
+
table: { scrollRegion: "Scrollable table" },
|
|
125
|
+
scrollArea: { region: "Scrollable content" },
|
|
126
|
+
chart: {
|
|
127
|
+
series: "Series {n}",
|
|
128
|
+
noData: "no data",
|
|
129
|
+
loading: "Loading chart…",
|
|
130
|
+
empty: "No data to display.",
|
|
131
|
+
error: "Couldn't load this chart.",
|
|
132
|
+
viewAsTable: "View as table",
|
|
133
|
+
hideTable: "Hide table",
|
|
134
|
+
tableCaption: "Data table for {name}",
|
|
135
|
+
summary: "{name}: {count} points, min {min}, max {max}, last {x}: {y}",
|
|
136
|
+
point: "{x}: {y}",
|
|
137
|
+
seriesNav: "{name}, {count} points. Use arrow keys to move between points."
|
|
138
|
+
},
|
|
139
|
+
relativeTime: {
|
|
140
|
+
justNow: "just now",
|
|
141
|
+
minutesAgo: "{n} min ago",
|
|
142
|
+
hoursAgo: "{n} h ago",
|
|
143
|
+
daysAgo: "{n} d ago",
|
|
144
|
+
inMinutes: "in {n} min",
|
|
145
|
+
inHours: "in {n} h",
|
|
146
|
+
inDays: "in {n} d"
|
|
147
|
+
}
|
|
111
148
|
};
|
|
112
|
-
function
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
149
|
+
function t(e, t) {
|
|
150
|
+
return e.replace(/\{(\w+)\}/g, (e, n) => {
|
|
151
|
+
let r = t[n];
|
|
152
|
+
return r === void 0 ? e : String(r);
|
|
153
|
+
});
|
|
117
154
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
e,
|
|
121
|
-
t
|
|
122
|
-
) : e;
|
|
155
|
+
function n(e, t) {
|
|
156
|
+
return t ? i(e, t) : e;
|
|
123
157
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
158
|
+
function r(e) {
|
|
159
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
126
160
|
}
|
|
127
|
-
function
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
161
|
+
function i(e, t) {
|
|
162
|
+
let n = { ...e };
|
|
163
|
+
for (let [e, a] of Object.entries(t)) {
|
|
164
|
+
if (a === void 0) continue;
|
|
165
|
+
let t = n[e];
|
|
166
|
+
n[e] = r(a) && r(t) ? i(t, a) : a;
|
|
167
|
+
}
|
|
168
|
+
return n;
|
|
135
169
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
};
|
|
141
|
-
//# sourceMappingURL=strings.js.map
|
|
170
|
+
//#endregion
|
|
171
|
+
export { e as defaultStrings, t as formatString, n as mergeStrings };
|
|
172
|
+
|
|
173
|
+
//# sourceMappingURL=strings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.js","sources":["../../src/lib/strings.ts"],"sourcesContent":["'use client';\n\n/**\n * Every user-facing string the library renders on its own (aria-labels,\n * placeholders, empty states, …). Consumers override any subset through\n * `<DesignSystemProvider strings={…}>`; per-component props still win.\n *\n * Placeholders use `{name}` and are expanded with `formatString`.\n */\nexport interface UiStrings {\n alert: { dismiss: string };\n snackbar: { dismiss: string };\n dialog: { close: string };\n sheet: { close: string };\n toast: { close: string; region: string };\n drawer: { close: string };\n command: { suggestions: string };\n calendar: {\n previous: string;\n next: string;\n chooseMonth: string;\n chooseYear: string;\n nav: string;\n };\n confirmationDialog: { confirm: string; cancel: string };\n commandDialog: { title: string };\n carousel: { label: string; previous: string; next: string; slide: string };\n pagination: {\n showing: string;\n rowsPerPage: string;\n first: string;\n last: string;\n prev: string;\n next: string;\n page: string;\n perPage: string;\n nav: string;\n };\n breadcrumbs: { label: string; collapsed: string };\n stepper: { label: string; complete: string; current: string; upcoming: string };\n topNav: { label: string };\n sidebar: { label: string; collapse: string; expand: string; collapseShort: string };\n select: { placeholder: string };\n combobox: {\n placeholder: string;\n searchPlaceholder: string;\n empty: string;\n clear: string;\n loadError: string;\n };\n multiSelect: { placeholder: string; empty: string; clearAll: string; remove: string };\n tagInput: { placeholder: string; remove: string };\n dataGrid: {\n filterPlaceholder: string;\n empty: string;\n /** Screen-reader label for an empty cell rendered as an em dash. */\n emptyCell: string;\n columns: string;\n columnVisibility: string;\n filterRows: string;\n };\n datePicker: { pickDate: string; pickRange: string };\n fileUpload: { drop: string; remove: string; bytes: string; kilobytes: string; megabytes: string };\n input: { clear: string; showPassword: string; hidePassword: string };\n slider: { minimum: string; maximum: string; value: string };\n spinner: { loading: string };\n errorState: {\n notFoundTitle: string;\n notFoundDescription: string;\n serverTitle: string;\n serverDescription: string;\n genericTitle: string;\n genericDescription: string;\n forbiddenTitle: string;\n forbiddenDescription: string;\n tryAgain: string;\n };\n avatar: { status: string; more: string };\n tree: { label: string };\n /** Accessible name of the focusable scroll wrapper around the table. */\n table: { scrollRegion: string };\n /** Accessible name of the focusable scroll viewport. */\n scrollArea: { region: string };\n chart: {\n series: string;\n noData: string;\n loading: string;\n empty: string;\n error: string;\n viewAsTable: string;\n hideTable: string;\n tableCaption: string;\n summary: string;\n point: string;\n seriesNav: string;\n };\n relativeTime: {\n justNow: string;\n minutesAgo: string;\n hoursAgo: string;\n daysAgo: string;\n inMinutes: string;\n inHours: string;\n inDays: string;\n };\n}\n\nexport type DeepPartial<T> = { [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K] };\n\nexport const defaultStrings: UiStrings = {\n alert: { dismiss: 'Dismiss' },\n snackbar: { dismiss: 'Dismiss' },\n dialog: { close: 'Close' },\n sheet: { close: 'Close' },\n toast: { close: 'Close', region: 'Notifications' },\n drawer: { close: 'Close' },\n command: { suggestions: 'Suggestions' },\n calendar: {\n previous: 'Previous month',\n next: 'Next month',\n chooseMonth: 'Choose the month',\n chooseYear: 'Choose the year',\n nav: 'Calendar navigation',\n },\n confirmationDialog: { confirm: 'Confirm', cancel: 'Cancel' },\n commandDialog: { title: 'Command palette' },\n carousel: { label: 'Carousel', previous: 'Previous', next: 'Next', slide: '{index} of {count}' },\n pagination: {\n showing: 'Showing {from}–{to} of {total}',\n rowsPerPage: 'Rows per page',\n first: 'Go to first page',\n last: 'Go to last page',\n prev: 'Previous page',\n next: 'Next page',\n page: 'Page {n}',\n perPage: '{n} / page',\n nav: 'Pagination',\n },\n breadcrumbs: { label: 'Breadcrumb', collapsed: 'Hidden items' },\n stepper: { label: 'Progress', complete: 'Completed', current: 'Current', upcoming: 'Upcoming' },\n topNav: { label: 'Primary' },\n sidebar: {\n label: 'Primary',\n collapse: 'Collapse sidebar',\n expand: 'Expand sidebar',\n collapseShort: 'Collapse',\n },\n select: { placeholder: 'Select…' },\n combobox: {\n placeholder: 'Select…',\n searchPlaceholder: 'Search…',\n empty: 'No results.',\n clear: 'Clear selection',\n loadError: \"Couldn't load options.\",\n },\n multiSelect: {\n placeholder: 'Select…',\n empty: 'No results.',\n clearAll: 'Clear all',\n remove: 'Remove {label}',\n },\n tagInput: { placeholder: 'Add and press Enter', remove: 'Remove {tag}' },\n dataGrid: {\n filterPlaceholder: 'Filter…',\n empty: 'No results.',\n emptyCell: 'Empty',\n columns: 'Columns',\n columnVisibility: 'Column visibility',\n filterRows: 'Filter rows',\n },\n datePicker: { pickDate: 'Pick a date', pickRange: 'Pick a range' },\n fileUpload: {\n drop: 'Drop files here, or click to browse',\n remove: 'Remove {name}',\n bytes: '{n} B',\n kilobytes: '{n} KB',\n megabytes: '{n} MB',\n },\n input: { clear: 'Clear input', showPassword: 'Show password', hidePassword: 'Hide password' },\n slider: { minimum: 'Minimum', maximum: 'Maximum', value: 'Value' },\n spinner: { loading: 'Loading' },\n errorState: {\n notFoundTitle: 'Page not found',\n notFoundDescription: \"We couldn't find what you were looking for.\",\n serverTitle: 'Something went wrong',\n serverDescription: \"We're looking into it. Please try again in a moment.\",\n genericTitle: 'Unexpected error',\n genericDescription: 'Something interrupted this action.',\n forbiddenTitle: \"You don't have access\",\n forbiddenDescription: 'Ask an admin to grant the permission.',\n tryAgain: 'Try again',\n },\n avatar: { status: 'Status: {status}', more: '{n} more' },\n tree: { label: 'Tree' },\n table: { scrollRegion: 'Scrollable table' },\n scrollArea: { region: 'Scrollable content' },\n chart: {\n series: 'Series {n}',\n noData: 'no data',\n loading: 'Loading chart…',\n empty: 'No data to display.',\n error: \"Couldn't load this chart.\",\n viewAsTable: 'View as table',\n hideTable: 'Hide table',\n tableCaption: 'Data table for {name}',\n summary: '{name}: {count} points, min {min}, max {max}, last {x}: {y}',\n point: '{x}: {y}',\n seriesNav: '{name}, {count} points. Use arrow keys to move between points.',\n },\n relativeTime: {\n justNow: 'just now',\n minutesAgo: '{n} min ago',\n hoursAgo: '{n} h ago',\n daysAgo: '{n} d ago',\n inMinutes: 'in {n} min',\n inHours: 'in {n} h',\n inDays: 'in {n} d',\n },\n};\n\n/** Expand `{name}` placeholders. Unknown placeholders are left as-is. */\nexport function formatString(\n template: string,\n vars: Record<string, string | number | undefined>,\n): string {\n return template.replace(/\\{(\\w+)\\}/g, (match, key: string) => {\n const v = vars[key];\n return v === undefined ? match : String(v);\n });\n}\n\n/** Deep-merge a partial override on top of a complete strings object. `undefined` leaves are ignored. */\nexport function mergeStrings(base: UiStrings, override?: DeepPartial<UiStrings>): UiStrings {\n if (!override) return base;\n return deepMerge(\n base as unknown as Record<string, unknown>,\n override as Record<string, unknown>,\n ) as unknown as UiStrings;\n}\n\nfunction isPlainObject(v: unknown): v is Record<string, unknown> {\n return typeof v === 'object' && v !== null && !Array.isArray(v);\n}\n\nfunction deepMerge(\n base: Record<string, unknown>,\n override: Record<string, unknown>,\n): Record<string, unknown> {\n const out: Record<string, unknown> = { ...base };\n for (const [key, value] of Object.entries(override)) {\n if (value === undefined) continue;\n const current = out[key];\n out[key] = isPlainObject(value) && isPlainObject(current) ? deepMerge(current, value) : value;\n }\n return out;\n}\n"],"names":["defaultStrings","formatString","template","vars","match","key","v","mergeStrings","base","override","deepMerge","isPlainObject","out","value","current"],"mappings":";AA6GO,MAAMA,IAA4B;AAAA,EACvC,OAAO,EAAE,SAAS,UAAA;AAAA,EAClB,UAAU,EAAE,SAAS,UAAA;AAAA,EACrB,QAAQ,EAAE,OAAO,QAAA;AAAA,EACjB,OAAO,EAAE,OAAO,QAAA;AAAA,EAChB,OAAO,EAAE,OAAO,SAAS,QAAQ,gBAAA;AAAA,EACjC,QAAQ,EAAE,OAAO,QAAA;AAAA,EACjB,SAAS,EAAE,aAAa,cAAA;AAAA,EACxB,UAAU;AAAA,IACR,UAAU;AAAA,IACV,MAAM;AAAA,IACN,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,KAAK;AAAA,EAAA;AAAA,EAEP,oBAAoB,EAAE,SAAS,WAAW,QAAQ,SAAA;AAAA,EAClD,eAAe,EAAE,OAAO,kBAAA;AAAA,EACxB,UAAU,EAAE,OAAO,YAAY,UAAU,YAAY,MAAM,QAAQ,OAAO,qBAAA;AAAA,EAC1E,YAAY;AAAA,IACV,SAAS;AAAA,IACT,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,EAAA;AAAA,EAEP,aAAa,EAAE,OAAO,cAAc,WAAW,eAAA;AAAA,EAC/C,SAAS,EAAE,OAAO,YAAY,UAAU,aAAa,SAAS,WAAW,UAAU,WAAA;AAAA,EACnF,QAAQ,EAAE,OAA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AQ,qBAAA;AAAA,EACtB,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,WAAW;AAAA,IACX,cAAc;AAAA,IACd,SAAS;AAAA,IACT,OAAO;AAAA,IACP,WAAW;AAAA,EAAA;AAAA,EAEb,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,WAAW;AAAA,IACX,SAAS;AAAA,IACT,QAAQ;AAAA,EAAA;AAEZ;AAGO,SAASC,EACdC,GACAC,GACQ;AACR,SAAOD,EAAS,QAAQ,cAAc,CAACE,GAAOC,MAAgB;AAC5D,UAAMC,IAAIH,EAAKE,CAAG;AAClB,WAAOC,MAAM,SAAYF,IAAQ,OAAOE,CAAC;AAAA,EAC3C,CAAC;AACH;AAGO,SAASC,EAAaC,GAAiBC,GAA8C;AAC1F,SAAKA,IACEC;AAAA,IACLF;AAAA,IACAC;AAAA,EAAA,IAHoBD;AAKxB;AAEA,SAASG,EAAcL,GAA0C;AAC/D,SAAO,OAAOA,KAAM,YAAYA,MAAM,QAAQ,CAAC,MAAM,QAAQA,CAAC;AAChE;AAEA,SAASI,EACPF,GACAC,GACyB;AACzB,QAAMG,IAA+B,EAAE,GAAGJ,EAAA;AAC1C,aAAW,CAACH,GAAKQ,CAAK,KAAK,OAAO,QAAQJ,CAAQ,GAAG;AACnD,QAAII,MAAU,OAAW;AACzB,UAAMC,IAAUF,EAAIP,CAAG;AACvB,IAAAO,EAAIP,CAAG,IAAIM,EAAcE,CAAK,KAAKF,EAAcG,CAAO,IAAIJ,EAAUI,GAASD,CAAK,IAAIA;AAAA,EAC1F;AACA,SAAOD;AACT;"}
|
|
1
|
+
{"version":3,"file":"strings.js","names":[],"sources":["../../src/lib/strings.ts"],"sourcesContent":["'use client';\n\n/**\n * Every user-facing string the library renders on its own (aria-labels,\n * placeholders, empty states, …). Consumers override any subset through\n * `<DesignSystemProvider strings={…}>`; per-component props still win.\n *\n * Placeholders use `{name}` and are expanded with `formatString`.\n */\nexport interface UiStrings {\n alert: { dismiss: string };\n snackbar: { dismiss: string };\n dialog: { close: string };\n sheet: { close: string };\n toast: { close: string; region: string };\n drawer: { close: string };\n command: { suggestions: string };\n calendar: {\n previous: string;\n next: string;\n chooseMonth: string;\n chooseYear: string;\n nav: string;\n };\n confirmationDialog: { confirm: string; cancel: string };\n commandDialog: { title: string };\n carousel: { label: string; previous: string; next: string; slide: string };\n pagination: {\n showing: string;\n rowsPerPage: string;\n first: string;\n last: string;\n prev: string;\n next: string;\n page: string;\n perPage: string;\n nav: string;\n };\n breadcrumbs: { label: string; collapsed: string };\n stepper: { label: string; complete: string; current: string; upcoming: string };\n topNav: { label: string };\n sidebar: { label: string; collapse: string; expand: string; collapseShort: string };\n select: { placeholder: string };\n combobox: {\n placeholder: string;\n searchPlaceholder: string;\n empty: string;\n clear: string;\n loadError: string;\n };\n multiSelect: { placeholder: string; empty: string; clearAll: string; remove: string };\n tagInput: { placeholder: string; remove: string };\n dataGrid: {\n filterPlaceholder: string;\n empty: string;\n /** Screen-reader label for an empty cell rendered as an em dash. */\n emptyCell: string;\n columns: string;\n columnVisibility: string;\n filterRows: string;\n };\n datePicker: { pickDate: string; pickRange: string };\n fileUpload: { drop: string; remove: string; bytes: string; kilobytes: string; megabytes: string };\n input: { clear: string; showPassword: string; hidePassword: string };\n slider: { minimum: string; maximum: string; value: string };\n spinner: { loading: string };\n errorState: {\n notFoundTitle: string;\n notFoundDescription: string;\n serverTitle: string;\n serverDescription: string;\n genericTitle: string;\n genericDescription: string;\n forbiddenTitle: string;\n forbiddenDescription: string;\n tryAgain: string;\n };\n avatar: { status: string; more: string };\n tree: { label: string };\n /** Accessible name of the focusable scroll wrapper around the table. */\n table: { scrollRegion: string };\n /** Accessible name of the focusable scroll viewport. */\n scrollArea: { region: string };\n chart: {\n series: string;\n noData: string;\n loading: string;\n empty: string;\n error: string;\n viewAsTable: string;\n hideTable: string;\n tableCaption: string;\n summary: string;\n point: string;\n seriesNav: string;\n };\n relativeTime: {\n justNow: string;\n minutesAgo: string;\n hoursAgo: string;\n daysAgo: string;\n inMinutes: string;\n inHours: string;\n inDays: string;\n };\n}\n\nexport type DeepPartial<T> = { [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K] };\n\nexport const defaultStrings: UiStrings = {\n alert: { dismiss: 'Dismiss' },\n snackbar: { dismiss: 'Dismiss' },\n dialog: { close: 'Close' },\n sheet: { close: 'Close' },\n toast: { close: 'Close', region: 'Notifications' },\n drawer: { close: 'Close' },\n command: { suggestions: 'Suggestions' },\n calendar: {\n previous: 'Previous month',\n next: 'Next month',\n chooseMonth: 'Choose the month',\n chooseYear: 'Choose the year',\n nav: 'Calendar navigation',\n },\n confirmationDialog: { confirm: 'Confirm', cancel: 'Cancel' },\n commandDialog: { title: 'Command palette' },\n carousel: { label: 'Carousel', previous: 'Previous', next: 'Next', slide: '{index} of {count}' },\n pagination: {\n showing: 'Showing {from}–{to} of {total}',\n rowsPerPage: 'Rows per page',\n first: 'Go to first page',\n last: 'Go to last page',\n prev: 'Previous page',\n next: 'Next page',\n page: 'Page {n}',\n perPage: '{n} / page',\n nav: 'Pagination',\n },\n breadcrumbs: { label: 'Breadcrumb', collapsed: 'Hidden items' },\n stepper: { label: 'Progress', complete: 'Completed', current: 'Current', upcoming: 'Upcoming' },\n topNav: { label: 'Primary' },\n sidebar: {\n label: 'Primary',\n collapse: 'Collapse sidebar',\n expand: 'Expand sidebar',\n collapseShort: 'Collapse',\n },\n select: { placeholder: 'Select…' },\n combobox: {\n placeholder: 'Select…',\n searchPlaceholder: 'Search…',\n empty: 'No results.',\n clear: 'Clear selection',\n loadError: \"Couldn't load options.\",\n },\n multiSelect: {\n placeholder: 'Select…',\n empty: 'No results.',\n clearAll: 'Clear all',\n remove: 'Remove {label}',\n },\n tagInput: { placeholder: 'Add and press Enter', remove: 'Remove {tag}' },\n dataGrid: {\n filterPlaceholder: 'Filter…',\n empty: 'No results.',\n emptyCell: 'Empty',\n columns: 'Columns',\n columnVisibility: 'Column visibility',\n filterRows: 'Filter rows',\n },\n datePicker: { pickDate: 'Pick a date', pickRange: 'Pick a range' },\n fileUpload: {\n drop: 'Drop files here, or click to browse',\n remove: 'Remove {name}',\n bytes: '{n} B',\n kilobytes: '{n} KB',\n megabytes: '{n} MB',\n },\n input: { clear: 'Clear input', showPassword: 'Show password', hidePassword: 'Hide password' },\n slider: { minimum: 'Minimum', maximum: 'Maximum', value: 'Value' },\n spinner: { loading: 'Loading' },\n errorState: {\n notFoundTitle: 'Page not found',\n notFoundDescription: \"We couldn't find what you were looking for.\",\n serverTitle: 'Something went wrong',\n serverDescription: \"We're looking into it. Please try again in a moment.\",\n genericTitle: 'Unexpected error',\n genericDescription: 'Something interrupted this action.',\n forbiddenTitle: \"You don't have access\",\n forbiddenDescription: 'Ask an admin to grant the permission.',\n tryAgain: 'Try again',\n },\n avatar: { status: 'Status: {status}', more: '{n} more' },\n tree: { label: 'Tree' },\n table: { scrollRegion: 'Scrollable table' },\n scrollArea: { region: 'Scrollable content' },\n chart: {\n series: 'Series {n}',\n noData: 'no data',\n loading: 'Loading chart…',\n empty: 'No data to display.',\n error: \"Couldn't load this chart.\",\n viewAsTable: 'View as table',\n hideTable: 'Hide table',\n tableCaption: 'Data table for {name}',\n summary: '{name}: {count} points, min {min}, max {max}, last {x}: {y}',\n point: '{x}: {y}',\n seriesNav: '{name}, {count} points. Use arrow keys to move between points.',\n },\n relativeTime: {\n justNow: 'just now',\n minutesAgo: '{n} min ago',\n hoursAgo: '{n} h ago',\n daysAgo: '{n} d ago',\n inMinutes: 'in {n} min',\n inHours: 'in {n} h',\n inDays: 'in {n} d',\n },\n};\n\n/** Expand `{name}` placeholders. Unknown placeholders are left as-is. */\nexport function formatString(\n template: string,\n vars: Record<string, string | number | undefined>,\n): string {\n return template.replace(/\\{(\\w+)\\}/g, (match, key: string) => {\n const v = vars[key];\n return v === undefined ? match : String(v);\n });\n}\n\n/** Deep-merge a partial override on top of a complete strings object. `undefined` leaves are ignored. */\nexport function mergeStrings(base: UiStrings, override?: DeepPartial<UiStrings>): UiStrings {\n if (!override) return base;\n return deepMerge(\n base as unknown as Record<string, unknown>,\n override as Record<string, unknown>,\n ) as unknown as UiStrings;\n}\n\nfunction isPlainObject(v: unknown): v is Record<string, unknown> {\n return typeof v === 'object' && v !== null && !Array.isArray(v);\n}\n\nfunction deepMerge(\n base: Record<string, unknown>,\n override: Record<string, unknown>,\n): Record<string, unknown> {\n const out: Record<string, unknown> = { ...base };\n for (const [key, value] of Object.entries(override)) {\n if (value === undefined) continue;\n const current = out[key];\n out[key] = isPlainObject(value) && isPlainObject(current) ? deepMerge(current, value) : value;\n }\n return out;\n}\n"],"mappings":";;AA6GA,IAAa,IAA4B;CACvC,OAAO,EAAE,SAAS,UAAU;CAC5B,UAAU,EAAE,SAAS,UAAU;CAC/B,QAAQ,EAAE,OAAO,QAAQ;CACzB,OAAO,EAAE,OAAO,QAAQ;CACxB,OAAO;EAAE,OAAO;EAAS,QAAQ;CAAgB;CACjD,QAAQ,EAAE,OAAO,QAAQ;CACzB,SAAS,EAAE,aAAa,cAAc;CACtC,UAAU;EACR,UAAU;EACV,MAAM;EACN,aAAa;EACb,YAAY;EACZ,KAAK;CACP;CACA,oBAAoB;EAAE,SAAS;EAAW,QAAQ;CAAS;CAC3D,eAAe,EAAE,OAAO,kBAAkB;CAC1C,UAAU;EAAE,OAAO;EAAY,UAAU;EAAY,MAAM;EAAQ,OAAO;CAAqB;CAC/F,YAAY;EACV,SAAS;EACT,aAAa;EACb,OAAO;EACP,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,SAAS;EACT,KAAK;CACP;CACA,aAAa;EAAE,OAAO;EAAc,WAAW;CAAe;CAC9D,SAAS;EAAE,OAAO;EAAY,UAAU;EAAa,SAAS;EAAW,UAAU;CAAW;CAC9F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