@vc-shell/framework 1.1.83 → 1.1.84-alpha.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/CHANGELOG.md +9 -0
- package/core/plugins/modularity/index.ts +0 -1
- package/core/plugins/modularity/loader.ts +1 -13
- package/dist/core/plugins/modularity/index.d.ts +0 -1
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/loader.d.ts +0 -1
- package/dist/core/plugins/modularity/loader.d.ts.map +1 -1
- package/dist/framework.js +5630 -5693
- package/dist/shared/composables/useMenuExpanded.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
- package/package.json +7 -5
- package/shared/composables/useMenuExpanded.ts +13 -2
- package/ui/components/molecules/vc-select/vc-select.vue +20 -0
- package/core/plugins/modularity/extensions-helper.ts +0 -209
- package/dist/core/plugins/modularity/extensions-helper.d.ts +0 -43
- package/dist/core/plugins/modularity/extensions-helper.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-select.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-select/vc-select.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vc-select.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-select/vc-select.vue"],"names":[],"mappings":"AAk7CA,OAAO,EAQL,SAAS,EACV,MAAM,kBAAkB,CAAC;AAK1B,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;yBACxD,CAAC,EAAE,CAAC,SAAS;IAAE,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GAAG,SAAS,EAC3F,aAAa,WAA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,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;SAClC,KAAK,GAAG;sBACK,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG;;;kBAjFC,CAAC,EAAE;qBAAe,MAAM;gHADX,CAAC;kBACd,CAAC,EAAE;qBAAe,MAAM;gHADX,CAAC;EAy6C9C,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAz7CzE,wBAy7C4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.84-alpha.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
"@fullhuman/postcss-purgecss": "^7.0.2",
|
|
91
91
|
"@laynezh/vite-plugin-lib-assets": "v1.1.0",
|
|
92
92
|
"@types/dompurify": "^3.0.5",
|
|
93
|
-
"@vc-shell/api-client-generator": "^1.1.
|
|
94
|
-
"@vc-shell/config-generator": "^1.1.
|
|
95
|
-
"@vc-shell/ts-config": "^1.1.
|
|
93
|
+
"@vc-shell/api-client-generator": "^1.1.84-alpha.0",
|
|
94
|
+
"@vc-shell/config-generator": "^1.1.84-alpha.0",
|
|
95
|
+
"@vc-shell/ts-config": "^1.1.84-alpha.0",
|
|
96
96
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
97
97
|
"@vue/test-utils": "^2.4.5",
|
|
98
98
|
"cypress-signalr-mock": "^1.5.0",
|
|
@@ -111,5 +111,7 @@
|
|
|
111
111
|
"publishConfig": {
|
|
112
112
|
"access": "public",
|
|
113
113
|
"registry": "https://registry.npmjs.org/"
|
|
114
|
-
}
|
|
114
|
+
},
|
|
115
|
+
"stableVersion": "1.1.83",
|
|
116
|
+
"npmTag": "alpha"
|
|
115
117
|
}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import { useLocalStorage } from "@vueuse/core";
|
|
2
2
|
import { ref } from "vue";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const STORAGE_KEY_PREFIX = "VC_APP_MENU_EXPANDED";
|
|
5
5
|
const HOVER_DELAY = 200;
|
|
6
6
|
|
|
7
7
|
const isHoverExpanded = ref(false);
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Get unique storage key for current application based on URL path
|
|
11
|
+
* This ensures each application has its own menu state
|
|
12
|
+
*/
|
|
13
|
+
function getStorageKey(): string {
|
|
14
|
+
// Extract app name from pathname (e.g., "/vendor-portal/" -> "vendor-portal")
|
|
15
|
+
const pathSegments = window.location.pathname.split("/").filter(Boolean);
|
|
16
|
+
const appName = pathSegments[0] || "default";
|
|
17
|
+
return `${STORAGE_KEY_PREFIX}_${appName}`;
|
|
18
|
+
}
|
|
19
|
+
|
|
9
20
|
export const useMenuExpanded = () => {
|
|
10
|
-
const isExpanded = useLocalStorage(
|
|
21
|
+
const isExpanded = useLocalStorage(getStorageKey(), true);
|
|
11
22
|
|
|
12
23
|
let expandTimeout: ReturnType<typeof setTimeout> | null = null;
|
|
13
24
|
|
|
@@ -633,6 +633,17 @@ onMounted(() => {
|
|
|
633
633
|
{ threshold: 0.1 },
|
|
634
634
|
);
|
|
635
635
|
rootVisibilityObserver.observe(selectRootRef.value);
|
|
636
|
+
|
|
637
|
+
// Fallback for iframe: check visibility after a delay
|
|
638
|
+
setTimeout(() => {
|
|
639
|
+
if (selectRootRef.value && !isSelectVisible.value) {
|
|
640
|
+
const rect = selectRootRef.value.getBoundingClientRect();
|
|
641
|
+
const isVisible = rect.top < window.innerHeight && rect.bottom > 0 && rect.left < window.innerWidth && rect.right > 0;
|
|
642
|
+
if (isVisible) {
|
|
643
|
+
isSelectVisible.value = true;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}, 100);
|
|
636
647
|
}
|
|
637
648
|
});
|
|
638
649
|
|
|
@@ -1020,6 +1031,15 @@ const onDropdownClose = async () => {
|
|
|
1020
1031
|
function toggleDropdown() {
|
|
1021
1032
|
if (props.disabled) return;
|
|
1022
1033
|
|
|
1034
|
+
// Ensure isSelectVisible is true when opening dropdown (fallback for iframe)
|
|
1035
|
+
if (!isOpened.value && !isSelectVisible.value && selectRootRef.value) {
|
|
1036
|
+
const rect = selectRootRef.value.getBoundingClientRect();
|
|
1037
|
+
const isVisible = rect.top < window.innerHeight && rect.bottom > 0 && rect.left < window.innerWidth && rect.right > 0;
|
|
1038
|
+
if (isVisible) {
|
|
1039
|
+
isSelectVisible.value = true;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1023
1043
|
isOpened.value = !isOpened.value;
|
|
1024
1044
|
|
|
1025
1045
|
if (isOpened.value) {
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { App, computed, ComputedRef, InjectionKey } from "vue";
|
|
2
|
-
|
|
3
|
-
declare module "@vue/runtime-core" {
|
|
4
|
-
interface ComponentCustomProperties {
|
|
5
|
-
$extensions: ExtensionRegistry;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface ExtensionPoint {
|
|
10
|
-
id: string;
|
|
11
|
-
component: unknown;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface ComposableFunction {
|
|
15
|
-
id: string;
|
|
16
|
-
fn: (...args: unknown[]) => unknown;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type Extension = Record<string, unknown>;
|
|
20
|
-
|
|
21
|
-
export interface ExtensionRegistry {
|
|
22
|
-
inbound: {
|
|
23
|
-
[namespace: string]: {
|
|
24
|
-
[extensionPoint: string]: Extension;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
outbound: {
|
|
28
|
-
[namespace: string]: {
|
|
29
|
-
[extensionPoint: string]: ExtensionPoint[] | ComposableFunction[] | Extension;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface ExtensionNamespace {
|
|
35
|
-
[point: string]: ExtensionPoint[] | ComposableFunction[] | Extension;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface ExtensionsHelper {
|
|
39
|
-
getInboundExtensions(namespace: string, point?: string): Extension;
|
|
40
|
-
getOutboundExtensions(point: string): (ExtensionPoint | ComposableFunction | Extension)[];
|
|
41
|
-
getModuleExtensions(namespace: string): {
|
|
42
|
-
inbound: Record<string, Extension>;
|
|
43
|
-
outbound: Record<string, ExtensionPoint[] | ComposableFunction[] | Extension>;
|
|
44
|
-
};
|
|
45
|
-
extensions: ComputedRef<ExtensionRegistry>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export const extensionsHelperSymbol = Symbol("extensionsHelper") as InjectionKey<ExtensionsHelper>;
|
|
49
|
-
|
|
50
|
-
export function createExtensionsHelper(app: App): ExtensionsHelper {
|
|
51
|
-
if (!app.config.globalProperties.$extensions) {
|
|
52
|
-
app.config.globalProperties.$extensions = {
|
|
53
|
-
inbound: {},
|
|
54
|
-
outbound: {},
|
|
55
|
-
} as ExtensionRegistry;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const helper: ExtensionsHelper = {
|
|
59
|
-
getInboundExtensions(namespace: string, point?: string) {
|
|
60
|
-
return point
|
|
61
|
-
? app.config.globalProperties.$extensions.inbound[namespace][point]
|
|
62
|
-
: app.config.globalProperties.$extensions.inbound[namespace];
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
getOutboundExtensions(point: string) {
|
|
66
|
-
const result: (ExtensionPoint | ComposableFunction | Extension)[] = [];
|
|
67
|
-
Object.values(app.config.globalProperties.$extensions.outbound).forEach((namespace: unknown) => {
|
|
68
|
-
const typedNamespace = namespace as ExtensionNamespace;
|
|
69
|
-
if (typedNamespace[point]) {
|
|
70
|
-
const extension = typedNamespace[point];
|
|
71
|
-
if (Array.isArray(extension)) {
|
|
72
|
-
result.push(...extension);
|
|
73
|
-
} else if (
|
|
74
|
-
typeof extension === "object" &&
|
|
75
|
-
"id" in extension &&
|
|
76
|
-
"fn" in extension &&
|
|
77
|
-
typeof extension.fn === "function"
|
|
78
|
-
) {
|
|
79
|
-
result.push(extension);
|
|
80
|
-
} else if (typeof extension === "object") {
|
|
81
|
-
result.push(extension as Extension);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
return result;
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
getModuleExtensions(namespace: string) {
|
|
90
|
-
return {
|
|
91
|
-
inbound: app.config.globalProperties.$extensions.inbound[namespace] || {},
|
|
92
|
-
outbound: app.config.globalProperties.$extensions.outbound[namespace] || {},
|
|
93
|
-
};
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
extensions: computed(() => app.config.globalProperties.$extensions),
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
// Provide access to extensions through provide/inject
|
|
100
|
-
app.provide(extensionsHelperSymbol, helper);
|
|
101
|
-
|
|
102
|
-
// Provide direct access to extensions
|
|
103
|
-
app.provide("$extensions", app.config.globalProperties.$extensions);
|
|
104
|
-
|
|
105
|
-
return helper;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export function registerModuleExtensions(app: App, moduleId: string, extensions: ExtensionRegistry) {
|
|
109
|
-
if (!app.config.globalProperties.$extensions) {
|
|
110
|
-
app.config.globalProperties.$extensions = {
|
|
111
|
-
inbound: {},
|
|
112
|
-
outbound: {},
|
|
113
|
-
} as ExtensionRegistry;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const { inbound, outbound } = app.config.globalProperties.$extensions;
|
|
117
|
-
|
|
118
|
-
// Register inbound extensions
|
|
119
|
-
registerInboundExtensions(inbound, moduleId, extensions);
|
|
120
|
-
|
|
121
|
-
// Register outbound extensions
|
|
122
|
-
registerOutboundExtensions(outbound, moduleId, extensions);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function registerInboundExtensions(
|
|
126
|
-
inbound: ExtensionRegistry["inbound"],
|
|
127
|
-
moduleId: string,
|
|
128
|
-
extensions: ExtensionRegistry,
|
|
129
|
-
) {
|
|
130
|
-
if (!inbound[moduleId]) {
|
|
131
|
-
inbound[moduleId] = {};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
Object.entries(extensions.inbound || {}).forEach(([point, extension]) => {
|
|
135
|
-
if (typeof extension !== "object" || Array.isArray(extension)) {
|
|
136
|
-
console.warn(
|
|
137
|
-
`Invalid inbound extension type for point "${point}" in module "${moduleId}". Inbound extensions must be objects.`,
|
|
138
|
-
);
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
inbound[moduleId][point] = {
|
|
143
|
-
...(inbound[moduleId][point] || {}),
|
|
144
|
-
...extension,
|
|
145
|
-
};
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function registerOutboundExtensions(
|
|
150
|
-
outbound: ExtensionRegistry["outbound"],
|
|
151
|
-
moduleId: string,
|
|
152
|
-
extensions: ExtensionRegistry,
|
|
153
|
-
) {
|
|
154
|
-
if (!outbound[moduleId]) {
|
|
155
|
-
outbound[moduleId] = {};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
Object.entries(extensions.outbound || {}).forEach(([point, extension]) => {
|
|
159
|
-
initializeExtensionPoint(outbound[moduleId], point, extension);
|
|
160
|
-
mergeExtension(outbound[moduleId], point, extension);
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function initializeExtensionPoint(
|
|
165
|
-
moduleOutbound: ExtensionRegistry["outbound"][string],
|
|
166
|
-
point: string,
|
|
167
|
-
extension: ExtensionPoint[] | ComposableFunction | Extension,
|
|
168
|
-
) {
|
|
169
|
-
if (!moduleOutbound[point]) {
|
|
170
|
-
if (Array.isArray(extension)) {
|
|
171
|
-
moduleOutbound[point] = [];
|
|
172
|
-
} else if (typeof extension === "object" && "fn" in extension) {
|
|
173
|
-
moduleOutbound[point] = [];
|
|
174
|
-
} else if (typeof extension === "object") {
|
|
175
|
-
moduleOutbound[point] = {};
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function isComposableFunction(value: unknown): value is ComposableFunction {
|
|
181
|
-
return (
|
|
182
|
-
typeof value === "object" &&
|
|
183
|
-
value !== null &&
|
|
184
|
-
"id" in value &&
|
|
185
|
-
"fn" in value &&
|
|
186
|
-
typeof (value as ComposableFunction).fn === "function"
|
|
187
|
-
);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function mergeExtension(
|
|
191
|
-
moduleOutbound: ExtensionRegistry["outbound"][string],
|
|
192
|
-
point: string,
|
|
193
|
-
extension: ExtensionPoint[] | ComposableFunction | Extension,
|
|
194
|
-
) {
|
|
195
|
-
if (Array.isArray(extension) && Array.isArray(moduleOutbound[point])) {
|
|
196
|
-
(moduleOutbound[point] as ExtensionPoint[]).push(...(extension as ExtensionPoint[]));
|
|
197
|
-
} else if (isComposableFunction(extension) && Array.isArray(moduleOutbound[point])) {
|
|
198
|
-
(moduleOutbound[point] as ComposableFunction[]).push(extension);
|
|
199
|
-
} else if (isObjectExtension(extension) && isObjectExtension(moduleOutbound[point])) {
|
|
200
|
-
moduleOutbound[point] = {
|
|
201
|
-
...(moduleOutbound[point] as Extension),
|
|
202
|
-
...extension,
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function isObjectExtension(value: unknown): value is Extension {
|
|
208
|
-
return typeof value === "object" && !Array.isArray(value);
|
|
209
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { App, ComputedRef, InjectionKey } from "vue";
|
|
2
|
-
declare module "@vue/runtime-core" {
|
|
3
|
-
interface ComponentCustomProperties {
|
|
4
|
-
$extensions: ExtensionRegistry;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export interface ExtensionPoint {
|
|
8
|
-
id: string;
|
|
9
|
-
component: unknown;
|
|
10
|
-
}
|
|
11
|
-
export interface ComposableFunction {
|
|
12
|
-
id: string;
|
|
13
|
-
fn: (...args: unknown[]) => unknown;
|
|
14
|
-
}
|
|
15
|
-
export type Extension = Record<string, unknown>;
|
|
16
|
-
export interface ExtensionRegistry {
|
|
17
|
-
inbound: {
|
|
18
|
-
[namespace: string]: {
|
|
19
|
-
[extensionPoint: string]: Extension;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
outbound: {
|
|
23
|
-
[namespace: string]: {
|
|
24
|
-
[extensionPoint: string]: ExtensionPoint[] | ComposableFunction[] | Extension;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export interface ExtensionNamespace {
|
|
29
|
-
[point: string]: ExtensionPoint[] | ComposableFunction[] | Extension;
|
|
30
|
-
}
|
|
31
|
-
export interface ExtensionsHelper {
|
|
32
|
-
getInboundExtensions(namespace: string, point?: string): Extension;
|
|
33
|
-
getOutboundExtensions(point: string): (ExtensionPoint | ComposableFunction | Extension)[];
|
|
34
|
-
getModuleExtensions(namespace: string): {
|
|
35
|
-
inbound: Record<string, Extension>;
|
|
36
|
-
outbound: Record<string, ExtensionPoint[] | ComposableFunction[] | Extension>;
|
|
37
|
-
};
|
|
38
|
-
extensions: ComputedRef<ExtensionRegistry>;
|
|
39
|
-
}
|
|
40
|
-
export declare const extensionsHelperSymbol: InjectionKey<ExtensionsHelper>;
|
|
41
|
-
export declare function createExtensionsHelper(app: App): ExtensionsHelper;
|
|
42
|
-
export declare function registerModuleExtensions(app: App, moduleId: string, extensions: ExtensionRegistry): void;
|
|
43
|
-
//# sourceMappingURL=extensions-helper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extensions-helper.d.ts","sourceRoot":"","sources":["../../../../core/plugins/modularity/extensions-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAY,WAAW,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAE/D,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,yBAAyB;QACjC,WAAW,EAAE,iBAAiB,CAAC;KAChC;CACF;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;CACrC;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;SACrC,CAAC;KACH,CAAC;IACF,QAAQ,EAAE;QACR,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,CAAC,cAAc,EAAE,MAAM,GAAG,cAAc,EAAE,GAAG,kBAAkB,EAAE,GAAG,SAAS,CAAC;SAC/E,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,GAAG,kBAAkB,EAAE,GAAG,SAAS,CAAC;CACtE;AAED,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnE,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,cAAc,GAAG,kBAAkB,GA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