giime 0.9.16-snapshot.6 → 1.0.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/es/crx/__tests__/env.test.d.ts +1 -0
- package/es/crx/__tests__/registry.test.d.ts +1 -0
- package/es/crx/__tests__/serialize.test.d.ts +1 -0
- package/es/crx/__tests__/vite-plugin.test.d.ts +1 -0
- package/es/giime/version.d.ts +1 -1
- package/es/giime/version.mjs +1 -1
- package/es/giime/version.mjs.map +1 -1
- package/es/utils/src/http/errorMessage.d.ts +1 -6
- package/es/utils/src/http/errorMessage.mjs +10 -11
- package/es/utils/src/http/errorMessage.mjs.map +1 -1
- package/lib/crx/__tests__/env.test.d.ts +1 -0
- package/lib/crx/__tests__/registry.test.d.ts +1 -0
- package/lib/crx/__tests__/serialize.test.d.ts +1 -0
- package/lib/crx/__tests__/vite-plugin.test.d.ts +1 -0
- package/lib/giime/version.d.ts +1 -1
- package/lib/giime/version.js +1 -1
- package/lib/giime/version.js.map +1 -1
- package/lib/utils/src/http/errorMessage.d.ts +1 -6
- package/lib/utils/src/http/errorMessage.js +10 -11
- package/lib/utils/src/http/errorMessage.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/giime/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.
|
|
1
|
+
export declare const version = "1.0.0";
|
package/es/giime/version.mjs
CHANGED
package/es/giime/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '1.0.0';\n"],"names":[],"mappings":"AAAO,MAAM,OAAA,GAAU;;;;"}
|
|
@@ -25,12 +25,7 @@ export interface HttpErrorLike {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* **纯函数**:把 AxiosError / SerializedAxiosError
|
|
29
|
-
*
|
|
30
|
-
* 三行结构:
|
|
31
|
-
* 1. `${status} ${人话}` 或网络/超时/其他原始 message
|
|
32
|
-
* 2. `[METHOD] /url` —— 方便从一条弹窗直接定位到接口
|
|
33
|
-
* 3. 后端 body 里 message / comment / msg / errMsg 任意一个
|
|
28
|
+
* **纯函数**:把 AxiosError / SerializedAxiosError 格式化成提示文本。
|
|
34
29
|
*
|
|
35
30
|
* 没有 ElMessage 副作用 —— web 用 responseErrorMessage 包一层,
|
|
36
31
|
* CRX 用 notifyHttpError 包一层(走 GmMessage / shadow root)。
|
|
@@ -11,20 +11,18 @@ const errorMessage = (options) => {
|
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
const STATUS_TITLE = {
|
|
14
|
-
400: "400
|
|
15
|
-
403: "403
|
|
16
|
-
404: "404
|
|
17
|
-
413: "413
|
|
18
|
-
500: "500
|
|
19
|
-
502: "502
|
|
20
|
-
504: "504
|
|
14
|
+
400: "400-\u5BA2\u6237\u7AEF\u9519\u8BEF\uFF0C\u8BF7\u6C42\u5931\u8D25",
|
|
15
|
+
403: "403-\u65E0\u6743\u8BBF\u95EE",
|
|
16
|
+
404: "404-\u65E0\u6548\u7684\u8BF7\u6C42",
|
|
17
|
+
413: "413-\u8BF7\u6C42\u5185\u5BB9\u8FC7\u5927",
|
|
18
|
+
500: "500-\u670D\u52A1\u5668\u5185\u90E8\u9519\u8BEFo(\u2565\uFE4F\u2565)o",
|
|
19
|
+
502: "502-\u7F51\u5173\u9519\u8BEF",
|
|
20
|
+
504: "504-\u7F51\u5173\u8D85\u65F6"
|
|
21
21
|
};
|
|
22
22
|
const formatHttpErrorMessage = (error) => {
|
|
23
23
|
const data = error.response?.data;
|
|
24
24
|
const serviceMessage = (data?.message || data?.comment || data?.msg || data?.errMsg) ?? "";
|
|
25
|
-
const method = (error.config?.method ?? "").toUpperCase();
|
|
26
25
|
const url = error.config?.url ?? "";
|
|
27
|
-
const endpoint = method && url ? `[${method}] ${url}` : url || method;
|
|
28
26
|
const status = error.response?.status ?? error.status;
|
|
29
27
|
const msg = error.message ?? "";
|
|
30
28
|
let title;
|
|
@@ -35,9 +33,10 @@ const formatHttpErrorMessage = (error) => {
|
|
|
35
33
|
} else if (msg.includes("Network Error")) {
|
|
36
34
|
title = "\u7F51\u7EDC\u9519\u8BEF";
|
|
37
35
|
} else {
|
|
38
|
-
title = msg || (status ? `${status}
|
|
36
|
+
title = msg || (status ? `${status}-\u8BF7\u6C42\u5931\u8D25` : "\u672A\u77E5\u9519\u8BEF");
|
|
39
37
|
}
|
|
40
|
-
return
|
|
38
|
+
return `${title}\u3002${serviceMessage}
|
|
39
|
+
\u63A5\u53E3\u5730\u5740\uFF1A${url}`;
|
|
41
40
|
};
|
|
42
41
|
const responseErrorMessage = (error, options) => {
|
|
43
42
|
if (error.config?.disableMessage) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessage.mjs","sources":["../../../../../../packages/utils/src/http/errorMessage.ts"],"sourcesContent":["import { ElMessage, type MessageOptions } from 'element-plus';\nimport type { AxiosError } from 'axios';\n\n/**\n * 统一错误弹窗\n */\nexport const errorMessage = (options: MessageOptions) => {\n return ElMessage({\n type: 'error',\n duration: 5 * 1000,\n showClose: true,\n grouping: true,\n ...options,\n message: options?.message || '未知错误',\n });\n};\n\n/**\n * 一个最小公共形状,AxiosError 和 @giime/crx 的 SerializedAxiosError 都满足。\n * 抽出来是为了让 formatHttpErrorMessage 既能给 web 端 axios 拦截器用,\n * 也能给 CRX contentScript 拿到 background 桥接回来的序列化错误用。\n */\nexport interface HttpErrorLike {\n message?: string;\n code?: string;\n /** axios 高版本顶层 status;SerializedAxiosError 也写在这里 */\n status?: number;\n config?: { url?: string; method?: string; disableMessage?: boolean };\n response?: { status?: number; data?: any };\n}\n\
|
|
1
|
+
{"version":3,"file":"errorMessage.mjs","sources":["../../../../../../packages/utils/src/http/errorMessage.ts"],"sourcesContent":["import { ElMessage, type MessageOptions } from 'element-plus';\nimport type { AxiosError } from 'axios';\n\n/**\n * 统一错误弹窗\n */\nexport const errorMessage = (options: MessageOptions) => {\n return ElMessage({\n type: 'error',\n duration: 5 * 1000,\n showClose: true,\n grouping: true,\n ...options,\n message: options?.message || '未知错误',\n });\n};\n\n/**\n * 一个最小公共形状,AxiosError 和 @giime/crx 的 SerializedAxiosError 都满足。\n * 抽出来是为了让 formatHttpErrorMessage 既能给 web 端 axios 拦截器用,\n * 也能给 CRX contentScript 拿到 background 桥接回来的序列化错误用。\n */\nexport interface HttpErrorLike {\n message?: string;\n code?: string;\n /** axios 高版本顶层 status;SerializedAxiosError 也写在这里 */\n status?: number;\n config?: { url?: string; method?: string; disableMessage?: boolean };\n response?: { status?: number; data?: any };\n}\n\nconst STATUS_TITLE: Record<number, string> = {\n 400: '400-客户端错误,请求失败',\n 403: '403-无权访问',\n 404: '404-无效的请求',\n 413: '413-请求内容过大',\n 500: '500-服务器内部错误o(╥﹏╥)o',\n 502: '502-网关错误',\n 504: '504-网关超时',\n};\n\n/**\n * **纯函数**:把 AxiosError / SerializedAxiosError 格式化成提示文本。\n *\n * 没有 ElMessage 副作用 —— web 用 responseErrorMessage 包一层,\n * CRX 用 notifyHttpError 包一层(走 GmMessage / shadow root)。\n */\nexport const formatHttpErrorMessage = (error: HttpErrorLike): string => {\n const data = error.response?.data;\n const serviceMessage = (data?.message || data?.comment || data?.msg || data?.errMsg) ?? '';\n const url = error.config?.url ?? '';\n // status 优先取 response.status,回落到顶层 status(SerializedAxiosError 写在顶层)\n const status = error.response?.status ?? error.status;\n const msg = error.message ?? '';\n\n let title: string;\n\n if (status && STATUS_TITLE[status]) {\n title = STATUS_TITLE[status];\n } else if (msg.includes('timeout')) {\n title = '请求超时';\n } else if (msg.includes('Network Error')) {\n title = '网络错误';\n } else {\n title = msg || (status ? `${status}-请求失败` : '未知错误');\n }\n\n return `${title}。${serviceMessage}\\n接口地址:${url}`;\n};\n\n/**\n * Web 端 axios 拦截器入口。CRX 这边不直接调(teleport 跨不出 shadow DOM),\n * 用 `@giime/crx` 的 `notifyHttpError` —— 两边共享 formatHttpErrorMessage 的格式化逻辑。\n */\nexport const responseErrorMessage = (error: AxiosError<any, any>, options?: MessageOptions) => {\n if (error.config?.disableMessage) {\n return;\n }\n if (error.code === 'ERR_CANCELED') {\n return Promise.reject(error);\n }\n\n const message = formatHttpErrorMessage(error as unknown as HttpErrorLike);\n // timeout / Network Error 历史上给了 10s 时长,保留这个偏好\n const duration = error.message?.includes('timeout') || error.message?.includes('Network Error') ? 10 * 1000 : undefined;\n\n return errorMessage({ ...(duration !== undefined && { duration }), ...options, message });\n};\n"],"names":[],"mappings":";;AAMO,MAAM,YAAA,GAAe,CAAC,OAAA,KAA4B;AACvD,EAAA,OAAO,SAAA,CAAU;AAAA,IACf,IAAA,EAAM,OAAA;AAAA,IACN,UAAU,CAAA,GAAI,GAAA;AAAA,IACd,SAAA,EAAW,IAAA;AAAA,IACX,QAAA,EAAU,IAAA;AAAA,IACV,GAAG,OAAA;AAAA,IACH,OAAA,EAAS,SAAS,OAAA,IAAW;AAAA,GAC9B,CAAA;AACH;AAgBA,MAAM,YAAA,GAAuC;AAAA,EAC3C,GAAA,EAAK,kEAAA;AAAA,EACL,GAAA,EAAK,8BAAA;AAAA,EACL,GAAA,EAAK,oCAAA;AAAA,EACL,GAAA,EAAK,0CAAA;AAAA,EACL,GAAA,EAAK,sEAAA;AAAA,EACL,GAAA,EAAK,8BAAA;AAAA,EACL,GAAA,EAAK;AACP,CAAA;AAQO,MAAM,sBAAA,GAAyB,CAAC,KAAA,KAAiC;AACtE,EAAA,MAAM,IAAA,GAAO,MAAM,QAAA,EAAU,IAAA;AAC7B,EAAA,M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,KAAA,CAAM,OAAA,EAAS,QAAA,CAAS,SAAS,CAAA,IAAK,KAAA,CAAM,OAAA,EAAS,QAAA,CAAS,eAAe,CAAA,GAAI,EAAA,GAAK,GAAA,GAAO,KAAA,CAAA;AAE9G,EAAA,OAAO,YAAA,CAAa,EAAE,GAAI,QAAA,KAAa,KAAA,CAAA,IAAa,EAAE,QAAA,EAAS,EAAI,GAAG,OAAA,EAAS,OAAA,EAAS,CAAA;AAC1F;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/giime/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.
|
|
1
|
+
export declare const version = "1.0.0";
|
package/lib/giime/version.js
CHANGED
package/lib/giime/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '0.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '1.0.0';\n"],"names":[],"mappings":";;AAAO,MAAM,OAAA,GAAU;;;;"}
|
|
@@ -25,12 +25,7 @@ export interface HttpErrorLike {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* **纯函数**:把 AxiosError / SerializedAxiosError
|
|
29
|
-
*
|
|
30
|
-
* 三行结构:
|
|
31
|
-
* 1. `${status} ${人话}` 或网络/超时/其他原始 message
|
|
32
|
-
* 2. `[METHOD] /url` —— 方便从一条弹窗直接定位到接口
|
|
33
|
-
* 3. 后端 body 里 message / comment / msg / errMsg 任意一个
|
|
28
|
+
* **纯函数**:把 AxiosError / SerializedAxiosError 格式化成提示文本。
|
|
34
29
|
*
|
|
35
30
|
* 没有 ElMessage 副作用 —— web 用 responseErrorMessage 包一层,
|
|
36
31
|
* CRX 用 notifyHttpError 包一层(走 GmMessage / shadow root)。
|
|
@@ -13,20 +13,18 @@ const errorMessage = (options) => {
|
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
const STATUS_TITLE = {
|
|
16
|
-
400: "400
|
|
17
|
-
403: "403
|
|
18
|
-
404: "404
|
|
19
|
-
413: "413
|
|
20
|
-
500: "500
|
|
21
|
-
502: "502
|
|
22
|
-
504: "504
|
|
16
|
+
400: "400-\u5BA2\u6237\u7AEF\u9519\u8BEF\uFF0C\u8BF7\u6C42\u5931\u8D25",
|
|
17
|
+
403: "403-\u65E0\u6743\u8BBF\u95EE",
|
|
18
|
+
404: "404-\u65E0\u6548\u7684\u8BF7\u6C42",
|
|
19
|
+
413: "413-\u8BF7\u6C42\u5185\u5BB9\u8FC7\u5927",
|
|
20
|
+
500: "500-\u670D\u52A1\u5668\u5185\u90E8\u9519\u8BEFo(\u2565\uFE4F\u2565)o",
|
|
21
|
+
502: "502-\u7F51\u5173\u9519\u8BEF",
|
|
22
|
+
504: "504-\u7F51\u5173\u8D85\u65F6"
|
|
23
23
|
};
|
|
24
24
|
const formatHttpErrorMessage = (error) => {
|
|
25
25
|
const data = error.response?.data;
|
|
26
26
|
const serviceMessage = (data?.message || data?.comment || data?.msg || data?.errMsg) ?? "";
|
|
27
|
-
const method = (error.config?.method ?? "").toUpperCase();
|
|
28
27
|
const url = error.config?.url ?? "";
|
|
29
|
-
const endpoint = method && url ? `[${method}] ${url}` : url || method;
|
|
30
28
|
const status = error.response?.status ?? error.status;
|
|
31
29
|
const msg = error.message ?? "";
|
|
32
30
|
let title;
|
|
@@ -37,9 +35,10 @@ const formatHttpErrorMessage = (error) => {
|
|
|
37
35
|
} else if (msg.includes("Network Error")) {
|
|
38
36
|
title = "\u7F51\u7EDC\u9519\u8BEF";
|
|
39
37
|
} else {
|
|
40
|
-
title = msg || (status ? `${status}
|
|
38
|
+
title = msg || (status ? `${status}-\u8BF7\u6C42\u5931\u8D25` : "\u672A\u77E5\u9519\u8BEF");
|
|
41
39
|
}
|
|
42
|
-
return
|
|
40
|
+
return `${title}\u3002${serviceMessage}
|
|
41
|
+
\u63A5\u53E3\u5730\u5740\uFF1A${url}`;
|
|
43
42
|
};
|
|
44
43
|
const responseErrorMessage = (error, options) => {
|
|
45
44
|
if (error.config?.disableMessage) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessage.js","sources":["../../../../../../packages/utils/src/http/errorMessage.ts"],"sourcesContent":["import { ElMessage, type MessageOptions } from 'element-plus';\nimport type { AxiosError } from 'axios';\n\n/**\n * 统一错误弹窗\n */\nexport const errorMessage = (options: MessageOptions) => {\n return ElMessage({\n type: 'error',\n duration: 5 * 1000,\n showClose: true,\n grouping: true,\n ...options,\n message: options?.message || '未知错误',\n });\n};\n\n/**\n * 一个最小公共形状,AxiosError 和 @giime/crx 的 SerializedAxiosError 都满足。\n * 抽出来是为了让 formatHttpErrorMessage 既能给 web 端 axios 拦截器用,\n * 也能给 CRX contentScript 拿到 background 桥接回来的序列化错误用。\n */\nexport interface HttpErrorLike {\n message?: string;\n code?: string;\n /** axios 高版本顶层 status;SerializedAxiosError 也写在这里 */\n status?: number;\n config?: { url?: string; method?: string; disableMessage?: boolean };\n response?: { status?: number; data?: any };\n}\n\
|
|
1
|
+
{"version":3,"file":"errorMessage.js","sources":["../../../../../../packages/utils/src/http/errorMessage.ts"],"sourcesContent":["import { ElMessage, type MessageOptions } from 'element-plus';\nimport type { AxiosError } from 'axios';\n\n/**\n * 统一错误弹窗\n */\nexport const errorMessage = (options: MessageOptions) => {\n return ElMessage({\n type: 'error',\n duration: 5 * 1000,\n showClose: true,\n grouping: true,\n ...options,\n message: options?.message || '未知错误',\n });\n};\n\n/**\n * 一个最小公共形状,AxiosError 和 @giime/crx 的 SerializedAxiosError 都满足。\n * 抽出来是为了让 formatHttpErrorMessage 既能给 web 端 axios 拦截器用,\n * 也能给 CRX contentScript 拿到 background 桥接回来的序列化错误用。\n */\nexport interface HttpErrorLike {\n message?: string;\n code?: string;\n /** axios 高版本顶层 status;SerializedAxiosError 也写在这里 */\n status?: number;\n config?: { url?: string; method?: string; disableMessage?: boolean };\n response?: { status?: number; data?: any };\n}\n\nconst STATUS_TITLE: Record<number, string> = {\n 400: '400-客户端错误,请求失败',\n 403: '403-无权访问',\n 404: '404-无效的请求',\n 413: '413-请求内容过大',\n 500: '500-服务器内部错误o(╥﹏╥)o',\n 502: '502-网关错误',\n 504: '504-网关超时',\n};\n\n/**\n * **纯函数**:把 AxiosError / SerializedAxiosError 格式化成提示文本。\n *\n * 没有 ElMessage 副作用 —— web 用 responseErrorMessage 包一层,\n * CRX 用 notifyHttpError 包一层(走 GmMessage / shadow root)。\n */\nexport const formatHttpErrorMessage = (error: HttpErrorLike): string => {\n const data = error.response?.data;\n const serviceMessage = (data?.message || data?.comment || data?.msg || data?.errMsg) ?? '';\n const url = error.config?.url ?? '';\n // status 优先取 response.status,回落到顶层 status(SerializedAxiosError 写在顶层)\n const status = error.response?.status ?? error.status;\n const msg = error.message ?? '';\n\n let title: string;\n\n if (status && STATUS_TITLE[status]) {\n title = STATUS_TITLE[status];\n } else if (msg.includes('timeout')) {\n title = '请求超时';\n } else if (msg.includes('Network Error')) {\n title = '网络错误';\n } else {\n title = msg || (status ? `${status}-请求失败` : '未知错误');\n }\n\n return `${title}。${serviceMessage}\\n接口地址:${url}`;\n};\n\n/**\n * Web 端 axios 拦截器入口。CRX 这边不直接调(teleport 跨不出 shadow DOM),\n * 用 `@giime/crx` 的 `notifyHttpError` —— 两边共享 formatHttpErrorMessage 的格式化逻辑。\n */\nexport const responseErrorMessage = (error: AxiosError<any, any>, options?: MessageOptions) => {\n if (error.config?.disableMessage) {\n return;\n }\n if (error.code === 'ERR_CANCELED') {\n return Promise.reject(error);\n }\n\n const message = formatHttpErrorMessage(error as unknown as HttpErrorLike);\n // timeout / Network Error 历史上给了 10s 时长,保留这个偏好\n const duration = error.message?.includes('timeout') || error.message?.includes('Network Error') ? 10 * 1000 : undefined;\n\n return errorMessage({ ...(duration !== undefined && { duration }), ...options, message });\n};\n"],"names":["ElMessage"],"mappings":";;;;AAMO,MAAM,YAAA,GAAe,CAAC,OAAA,KAA4B;AACvD,EAAA,OAAOA,qBAAA,CAAU;AAAA,IACf,IAAA,EAAM,OAAA;AAAA,IACN,UAAU,CAAA,GAAI,GAAA;AAAA,IACd,SAAA,EAAW,IAAA;AAAA,IACX,QAAA,EAAU,IAAA;AAAA,IACV,GAAG,OAAA;AAAA,IACH,OAAA,EAAS,SAAS,OAAA,IAAW;AAAA,GAC9B,CAAA;AACH;AAgBA,MAAM,YAAA,GAAuC;AAAA,EAC3C,GAAA,EAAK,kEAAA;AAAA,EACL,GAAA,EAAK,8BAAA;AAAA,EACL,GAAA,EAAK,oCAAA;AAAA,EACL,GAAA,EAAK,0CAAA;AAAA,EACL,GAAA,EAAK,sEAAA;AAAA,EACL,GAAA,EAAK,8BAAA;AAAA,EACL,GAAA,EAAK;AACP,CAAA;AAQO,MAAM,sBAAA,GAAyB,CAAC,KAAA,KAAiC;AACtE,EAAA,MAAM,IAAA,GAAO,MAAM,QAAA,EAAU,IAAA;AAC7B,EAAA,MAAM,cAAA,GAAA,CAAkB,MAAM,OAAA,IAAW,IAAA,EAAM,WAAW,IAAA,EAAM,GAAA,IAAO,MAAM,MAAA,KAAW,EAAA;AACxF,EAAA,MAAM,GAAA,GAAM,KAAA,CAAM,MAAA,EAAQ,GAAA,IAAO,EAAA;AAEjC,EAAA,MAAM,MAAA,GAAS,KAAA,CAAM,QAAA,EAAU,MAAA,IAAU,KAAA,CAAM,MAAA;AAC/C,EAAA,MAAM,GAAA,GAAM,MAAM,OAAA,IAAW,EAAA;AAE7B,EAAA,IAAI,KAAA;AAEJ,EAAA,IAAI,MAAA,IAAU,YAAA,CAAa,MAAM,CAAA,EAAG;AAClC,IAAA,KAAA,GAAQ,aAAa,MAAM,CAAA;AAA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