@strapi/core 0.0.0-experimental.c2b08ee20b017fc174cccf35c56c39438b0237b0 → 0.0.0-experimental.c35a4b9abd571c6562b64b2aa4381dbf2a030f24

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.

Potentially problematic release.


This version of @strapi/core might be problematic. Click here for more details.

Files changed (76) hide show
  1. package/dist/core-api/routes/index.d.ts +22 -4
  2. package/dist/core-api/routes/index.d.ts.map +1 -1
  3. package/dist/core-api/routes/index.js +8 -150
  4. package/dist/core-api/routes/index.js.map +1 -1
  5. package/dist/core-api/routes/index.mjs +8 -131
  6. package/dist/core-api/routes/index.mjs.map +1 -1
  7. package/dist/domain/module/index.d.ts.map +1 -1
  8. package/dist/domain/module/index.js +0 -3
  9. package/dist/domain/module/index.js.map +1 -1
  10. package/dist/domain/module/index.mjs +0 -3
  11. package/dist/domain/module/index.mjs.map +1 -1
  12. package/dist/factories.d.ts +1 -3
  13. package/dist/factories.d.ts.map +1 -1
  14. package/dist/factories.js +2 -10
  15. package/dist/factories.js.map +1 -1
  16. package/dist/factories.mjs +3 -10
  17. package/dist/factories.mjs.map +1 -1
  18. package/dist/package.json.js +12 -13
  19. package/dist/package.json.js.map +1 -1
  20. package/dist/package.json.mjs +12 -13
  21. package/dist/package.json.mjs.map +1 -1
  22. package/dist/services/server/register-routes.js +2 -22
  23. package/dist/services/server/register-routes.js.map +1 -1
  24. package/dist/services/server/register-routes.mjs +2 -22
  25. package/dist/services/server/register-routes.mjs.map +1 -1
  26. package/dist/services/server/routing.d.ts +0 -10
  27. package/dist/services/server/routing.d.ts.map +1 -1
  28. package/dist/services/server/routing.js +1 -7
  29. package/dist/services/server/routing.js.map +1 -1
  30. package/dist/services/server/routing.mjs +1 -7
  31. package/dist/services/server/routing.mjs.map +1 -1
  32. package/package.json +12 -13
  33. package/dist/core-api/routes/validation/attributes.d.ts +0 -244
  34. package/dist/core-api/routes/validation/attributes.d.ts.map +0 -1
  35. package/dist/core-api/routes/validation/attributes.js +0 -560
  36. package/dist/core-api/routes/validation/attributes.js.map +0 -1
  37. package/dist/core-api/routes/validation/attributes.mjs +0 -521
  38. package/dist/core-api/routes/validation/attributes.mjs.map +0 -1
  39. package/dist/core-api/routes/validation/common.d.ts +0 -105
  40. package/dist/core-api/routes/validation/common.d.ts.map +0 -1
  41. package/dist/core-api/routes/validation/common.js +0 -116
  42. package/dist/core-api/routes/validation/common.js.map +0 -1
  43. package/dist/core-api/routes/validation/common.mjs +0 -95
  44. package/dist/core-api/routes/validation/common.mjs.map +0 -1
  45. package/dist/core-api/routes/validation/component.d.ts +0 -34
  46. package/dist/core-api/routes/validation/component.d.ts.map +0 -1
  47. package/dist/core-api/routes/validation/component.js +0 -45
  48. package/dist/core-api/routes/validation/component.js.map +0 -1
  49. package/dist/core-api/routes/validation/component.mjs +0 -43
  50. package/dist/core-api/routes/validation/component.mjs.map +0 -1
  51. package/dist/core-api/routes/validation/constants.d.ts +0 -8
  52. package/dist/core-api/routes/validation/constants.d.ts.map +0 -1
  53. package/dist/core-api/routes/validation/constants.js +0 -18
  54. package/dist/core-api/routes/validation/constants.js.map +0 -1
  55. package/dist/core-api/routes/validation/constants.mjs +0 -16
  56. package/dist/core-api/routes/validation/constants.mjs.map +0 -1
  57. package/dist/core-api/routes/validation/content-type.d.ts +0 -128
  58. package/dist/core-api/routes/validation/content-type.d.ts.map +0 -1
  59. package/dist/core-api/routes/validation/content-type.js +0 -201
  60. package/dist/core-api/routes/validation/content-type.js.map +0 -1
  61. package/dist/core-api/routes/validation/content-type.mjs +0 -180
  62. package/dist/core-api/routes/validation/content-type.mjs.map +0 -1
  63. package/dist/core-api/routes/validation/index.d.ts +0 -5
  64. package/dist/core-api/routes/validation/index.d.ts.map +0 -1
  65. package/dist/core-api/routes/validation/mappers.d.ts +0 -105
  66. package/dist/core-api/routes/validation/mappers.d.ts.map +0 -1
  67. package/dist/core-api/routes/validation/mappers.js +0 -238
  68. package/dist/core-api/routes/validation/mappers.js.map +0 -1
  69. package/dist/core-api/routes/validation/mappers.mjs +0 -214
  70. package/dist/core-api/routes/validation/mappers.mjs.map +0 -1
  71. package/dist/core-api/routes/validation/utils.d.ts +0 -47
  72. package/dist/core-api/routes/validation/utils.d.ts.map +0 -1
  73. package/dist/core-api/routes/validation/utils.js +0 -112
  74. package/dist/core-api/routes/validation/utils.js.map +0 -1
  75. package/dist/core-api/routes/validation/utils.mjs +0 -90
  76. package/dist/core-api/routes/validation/utils.mjs.map +0 -1
@@ -1,112 +0,0 @@
1
- 'use strict';
2
-
3
- var strapiUtils = require('@strapi/utils');
4
- var z = require('zod/v4');
5
-
6
- function _interopNamespaceDefault(e) {
7
- var n = Object.create(null);
8
- if (e) {
9
- Object.keys(e).forEach(function (k) {
10
- if (k !== 'default') {
11
- var d = Object.getOwnPropertyDescriptor(e, k);
12
- Object.defineProperty(n, k, d.get ? d : {
13
- enumerable: true,
14
- get: function () { return e[k]; }
15
- });
16
- }
17
- });
18
- }
19
- n.default = e;
20
- return Object.freeze(n);
21
- }
22
-
23
- var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
24
-
25
- /**
26
- * Safely adds or updates a schema in Zod's global registry.
27
- *
28
- * If a schema with the given `id` already exists, it will be removed before adding the new one.
29
- *
30
- * This is useful for hot-reloading or preventing issues with cyclical dependencies.
31
- *
32
- * @param id - The unique identifier for the schema in the global registry.
33
- * @param schema - The Zod schema to register.
34
- * @example
35
- * ```typescript
36
- * safeGlobalRegistrySet("mySchema", z.object({ name: z.string() }));
37
- * ```
38
- */ const safeGlobalRegistrySet = (id, schema)=>{
39
- try {
40
- const { _idmap: idMap } = z__namespace.globalRegistry;
41
- const transformedId = strapiUtils.transformUidToValidOpenApiName(id);
42
- if (idMap.has(transformedId)) {
43
- // Remove existing schema to prevent conflicts
44
- strapi.log.debug(`Removing existing schema ${transformedId} from registry`);
45
- idMap.delete(transformedId);
46
- }
47
- // Register the new schema with the transformed ID
48
- strapi.log.debug(`Registering schema ${transformedId} in global registry`);
49
- z__namespace.globalRegistry.add(schema, {
50
- id: transformedId
51
- });
52
- } catch (error) {
53
- strapi.log.error(`Schema registration failed: Failed to register schema ${id} in global registry`);
54
- throw error;
55
- }
56
- };
57
- /**
58
- * Safely creates and registers a Zod schema in the global registry, particularly useful for handling cyclical data structures.
59
- *
60
- * If a schema with the given `id` already exists in the global registry, it returns the existing schema.
61
- *
62
- * Otherwise, it registers a temporary `z.any()` schema, calls the provided `callback` to create the actual schema,
63
- * and then replaces the temporary schema with the actual one in the registry.
64
- *
65
- * This prevents infinite loops in cases of cyclical dependencies.
66
- *
67
- * @param id - The unique identifier for the schema in the global registry.
68
- * @param callback - A function that returns the Zod schema to be created and registered.
69
- * @returns The created or retrieved Zod schema.
70
- * @example
71
- * ```typescript
72
- * const CategorySchema = safeSchemaCreation("Category", () =>
73
- * z.object({
74
- * name: z.string(),
75
- * products: z.array(safeSchemaCreation("Product", () =>
76
- * z.object({
77
- * name: z.string(),
78
- * category: z.lazy(() => CategorySchema) // Cyclical reference
79
- * })
80
- * ))
81
- * })
82
- * );
83
- * ```
84
- */ const safeSchemaCreation = (id, callback)=>{
85
- try {
86
- const { _idmap: idMap } = z__namespace.globalRegistry;
87
- const transformedId = strapiUtils.transformUidToValidOpenApiName(id);
88
- // Return existing schema if already registered
89
- const mapItem = idMap.get(transformedId);
90
- if (mapItem) {
91
- strapi.log.debug(`Schema ${transformedId} found in registry, returning existing schema`);
92
- return mapItem;
93
- }
94
- strapi.log.warn(`Schema ${transformedId} not found in global registry, creating an any placeholder`);
95
- // Temporary any placeholder before replacing with the actual schema type
96
- // Used to prevent infinite loops in cyclical data structures
97
- safeGlobalRegistrySet(id, z__namespace.any());
98
- // Generate the actual schema using the callback
99
- const schema = callback();
100
- // Replace the placeholder with the real schema
101
- safeGlobalRegistrySet(id, schema);
102
- strapi.log.debug(`Schema ${transformedId} successfully created and registered`);
103
- return schema;
104
- } catch (error) {
105
- strapi.log.error(`Schema creation failed: Failed to create schema ${id}`);
106
- throw error;
107
- }
108
- };
109
-
110
- exports.safeGlobalRegistrySet = safeGlobalRegistrySet;
111
- exports.safeSchemaCreation = safeSchemaCreation;
112
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../src/core-api/routes/validation/utils.ts"],"sourcesContent":["import { transformUidToValidOpenApiName } from '@strapi/utils';\nimport type { Internal } from '@strapi/types';\nimport * as z from 'zod/v4';\n\n/**\n * Safely adds or updates a schema in Zod's global registry.\n *\n * If a schema with the given `id` already exists, it will be removed before adding the new one.\n *\n * This is useful for hot-reloading or preventing issues with cyclical dependencies.\n *\n * @param id - The unique identifier for the schema in the global registry.\n * @param schema - The Zod schema to register.\n * @example\n * ```typescript\n * safeGlobalRegistrySet(\"mySchema\", z.object({ name: z.string() }));\n * ```\n */\nexport const safeGlobalRegistrySet = (id: Internal.UID.Schema, schema: z.ZodType) => {\n try {\n const { _idmap: idMap } = z.globalRegistry;\n\n const transformedId = transformUidToValidOpenApiName(id);\n\n if (idMap.has(transformedId)) {\n // Remove existing schema to prevent conflicts\n strapi.log.debug(`Removing existing schema ${transformedId} from registry`);\n idMap.delete(transformedId);\n }\n\n // Register the new schema with the transformed ID\n strapi.log.debug(`Registering schema ${transformedId} in global registry`);\n z.globalRegistry.add(schema, { id: transformedId });\n } catch (error) {\n strapi.log.error(\n `Schema registration failed: Failed to register schema ${id} in global registry`\n );\n\n throw error;\n }\n};\n\n/**\n * Safely creates and registers a Zod schema in the global registry, particularly useful for handling cyclical data structures.\n *\n * If a schema with the given `id` already exists in the global registry, it returns the existing schema.\n *\n * Otherwise, it registers a temporary `z.any()` schema, calls the provided `callback` to create the actual schema,\n * and then replaces the temporary schema with the actual one in the registry.\n *\n * This prevents infinite loops in cases of cyclical dependencies.\n *\n * @param id - The unique identifier for the schema in the global registry.\n * @param callback - A function that returns the Zod schema to be created and registered.\n * @returns The created or retrieved Zod schema.\n * @example\n * ```typescript\n * const CategorySchema = safeSchemaCreation(\"Category\", () =>\n * z.object({\n * name: z.string(),\n * products: z.array(safeSchemaCreation(\"Product\", () =>\n * z.object({\n * name: z.string(),\n * category: z.lazy(() => CategorySchema) // Cyclical reference\n * })\n * ))\n * })\n * );\n * ```\n */\nexport const safeSchemaCreation = (id: Internal.UID.Schema, callback: () => z.ZodType) => {\n try {\n const { _idmap: idMap } = z.globalRegistry;\n\n const transformedId = transformUidToValidOpenApiName(id);\n\n // Return existing schema if already registered\n const mapItem = idMap.get(transformedId);\n if (mapItem) {\n strapi.log.debug(`Schema ${transformedId} found in registry, returning existing schema`);\n return mapItem;\n }\n\n strapi.log.warn(\n `Schema ${transformedId} not found in global registry, creating an any placeholder`\n );\n\n // Temporary any placeholder before replacing with the actual schema type\n // Used to prevent infinite loops in cyclical data structures\n safeGlobalRegistrySet(id, z.any());\n\n // Generate the actual schema using the callback\n const schema = callback();\n\n // Replace the placeholder with the real schema\n safeGlobalRegistrySet(id, schema);\n\n strapi.log.debug(`Schema ${transformedId} successfully created and registered`);\n\n return schema;\n } catch (error) {\n strapi.log.error(`Schema creation failed: Failed to create schema ${id}`);\n\n throw error;\n }\n};\n"],"names":["safeGlobalRegistrySet","id","schema","_idmap","idMap","z","globalRegistry","transformedId","transformUidToValidOpenApiName","has","strapi","log","debug","delete","add","error","safeSchemaCreation","callback","mapItem","get","warn","any"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;;;;;;;;;;AAaC,IACM,MAAMA,qBAAwB,GAAA,CAACC,EAAyBC,EAAAA,MAAAA,GAAAA;IAC7D,IAAI;AACF,QAAA,MAAM,EAAEC,MAAQC,EAAAA,KAAK,EAAE,GAAGC,aAAEC,cAAc;AAE1C,QAAA,MAAMC,gBAAgBC,0CAA+BP,CAAAA,EAAAA,CAAAA;QAErD,IAAIG,KAAAA,CAAMK,GAAG,CAACF,aAAgB,CAAA,EAAA;;YAE5BG,MAAOC,CAAAA,GAAG,CAACC,KAAK,CAAC,CAAC,yBAAyB,E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AE1BQ,MAAOC,CAAAA,GAAG,CAACC,KAAK,CAAC,CAAC,OAAO,EAAEL,aAAc,CAAA,oCAAoC,CAAC,CAAA;QAE9E,OAAOL,MAAAA;AACT,KAAA,CAAE,OAAOa,KAAO,EAAA;QACdL,MAAOC,CAAAA,GAAG,CAACI,KAAK,CAAC,CAAC,gDAAgD,EAAEd,GAAG,CAAC,CAAA;QAExE,MAAMc,KAAAA;AACR;AACF;;;;;"}
@@ -1,90 +0,0 @@
1
- import { transformUidToValidOpenApiName } from '@strapi/utils';
2
- import * as z from 'zod/v4';
3
-
4
- /**
5
- * Safely adds or updates a schema in Zod's global registry.
6
- *
7
- * If a schema with the given `id` already exists, it will be removed before adding the new one.
8
- *
9
- * This is useful for hot-reloading or preventing issues with cyclical dependencies.
10
- *
11
- * @param id - The unique identifier for the schema in the global registry.
12
- * @param schema - The Zod schema to register.
13
- * @example
14
- * ```typescript
15
- * safeGlobalRegistrySet("mySchema", z.object({ name: z.string() }));
16
- * ```
17
- */ const safeGlobalRegistrySet = (id, schema)=>{
18
- try {
19
- const { _idmap: idMap } = z.globalRegistry;
20
- const transformedId = transformUidToValidOpenApiName(id);
21
- if (idMap.has(transformedId)) {
22
- // Remove existing schema to prevent conflicts
23
- strapi.log.debug(`Removing existing schema ${transformedId} from registry`);
24
- idMap.delete(transformedId);
25
- }
26
- // Register the new schema with the transformed ID
27
- strapi.log.debug(`Registering schema ${transformedId} in global registry`);
28
- z.globalRegistry.add(schema, {
29
- id: transformedId
30
- });
31
- } catch (error) {
32
- strapi.log.error(`Schema registration failed: Failed to register schema ${id} in global registry`);
33
- throw error;
34
- }
35
- };
36
- /**
37
- * Safely creates and registers a Zod schema in the global registry, particularly useful for handling cyclical data structures.
38
- *
39
- * If a schema with the given `id` already exists in the global registry, it returns the existing schema.
40
- *
41
- * Otherwise, it registers a temporary `z.any()` schema, calls the provided `callback` to create the actual schema,
42
- * and then replaces the temporary schema with the actual one in the registry.
43
- *
44
- * This prevents infinite loops in cases of cyclical dependencies.
45
- *
46
- * @param id - The unique identifier for the schema in the global registry.
47
- * @param callback - A function that returns the Zod schema to be created and registered.
48
- * @returns The created or retrieved Zod schema.
49
- * @example
50
- * ```typescript
51
- * const CategorySchema = safeSchemaCreation("Category", () =>
52
- * z.object({
53
- * name: z.string(),
54
- * products: z.array(safeSchemaCreation("Product", () =>
55
- * z.object({
56
- * name: z.string(),
57
- * category: z.lazy(() => CategorySchema) // Cyclical reference
58
- * })
59
- * ))
60
- * })
61
- * );
62
- * ```
63
- */ const safeSchemaCreation = (id, callback)=>{
64
- try {
65
- const { _idmap: idMap } = z.globalRegistry;
66
- const transformedId = transformUidToValidOpenApiName(id);
67
- // Return existing schema if already registered
68
- const mapItem = idMap.get(transformedId);
69
- if (mapItem) {
70
- strapi.log.debug(`Schema ${transformedId} found in registry, returning existing schema`);
71
- return mapItem;
72
- }
73
- strapi.log.warn(`Schema ${transformedId} not found in global registry, creating an any placeholder`);
74
- // Temporary any placeholder before replacing with the actual schema type
75
- // Used to prevent infinite loops in cyclical data structures
76
- safeGlobalRegistrySet(id, z.any());
77
- // Generate the actual schema using the callback
78
- const schema = callback();
79
- // Replace the placeholder with the real schema
80
- safeGlobalRegistrySet(id, schema);
81
- strapi.log.debug(`Schema ${transformedId} successfully created and registered`);
82
- return schema;
83
- } catch (error) {
84
- strapi.log.error(`Schema creation failed: Failed to create schema ${id}`);
85
- throw error;
86
- }
87
- };
88
-
89
- export { safeGlobalRegistrySet, safeSchemaCreation };
90
- //# sourceMappingURL=utils.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.mjs","sources":["../../../../src/core-api/routes/validation/utils.ts"],"sourcesContent":["import { transformUidToValidOpenApiName } from '@strapi/utils';\nimport type { Internal } from '@strapi/types';\nimport * as z from 'zod/v4';\n\n/**\n * Safely adds or updates a schema in Zod's global registry.\n *\n * If a schema with the given `id` already exists, it will be removed before adding the new one.\n *\n * This is useful for hot-reloading or preventing issues with cyclical dependencies.\n *\n * @param id - The unique identifier for the schema in the global registry.\n * @param schema - The Zod schema to register.\n * @example\n * ```typescript\n * safeGlobalRegistrySet(\"mySchema\", z.object({ name: z.string() }));\n * ```\n */\nexport const safeGlobalRegistrySet = (id: Internal.UID.Schema, schema: z.ZodType) => {\n try {\n const { _idmap: idMap } = z.globalRegistry;\n\n const transformedId = transformUidToValidOpenApiName(id);\n\n if (idMap.has(transformedId)) {\n // Remove existing schema to prevent conflicts\n strapi.log.debug(`Removing existing schema ${transformedId} from registry`);\n idMap.delete(transformedId);\n }\n\n // Register the new schema with the transformed ID\n strapi.log.debug(`Registering schema ${transformedId} in global registry`);\n z.globalRegistry.add(schema, { id: transformedId });\n } catch (error) {\n strapi.log.error(\n `Schema registration failed: Failed to register schema ${id} in global registry`\n );\n\n throw error;\n }\n};\n\n/**\n * Safely creates and registers a Zod schema in the global registry, particularly useful for handling cyclical data structures.\n *\n * If a schema with the given `id` already exists in the global registry, it returns the existing schema.\n *\n * Otherwise, it registers a temporary `z.any()` schema, calls the provided `callback` to create the actual schema,\n * and then replaces the temporary schema with the actual one in the registry.\n *\n * This prevents infinite loops in cases of cyclical dependencies.\n *\n * @param id - The unique identifier for the schema in the global registry.\n * @param callback - A function that returns the Zod schema to be created and registered.\n * @returns The created or retrieved Zod schema.\n * @example\n * ```typescript\n * const CategorySchema = safeSchemaCreation(\"Category\", () =>\n * z.object({\n * name: z.string(),\n * products: z.array(safeSchemaCreation(\"Product\", () =>\n * z.object({\n * name: z.string(),\n * category: z.lazy(() => CategorySchema) // Cyclical reference\n * })\n * ))\n * })\n * );\n * ```\n */\nexport const safeSchemaCreation = (id: Internal.UID.Schema, callback: () => z.ZodType) => {\n try {\n const { _idmap: idMap } = z.globalRegistry;\n\n const transformedId = transformUidToValidOpenApiName(id);\n\n // Return existing schema if already registered\n const mapItem = idMap.get(transformedId);\n if (mapItem) {\n strapi.log.debug(`Schema ${transformedId} found in registry, returning existing schema`);\n return mapItem;\n }\n\n strapi.log.warn(\n `Schema ${transformedId} not found in global registry, creating an any placeholder`\n );\n\n // Temporary any placeholder before replacing with the actual schema type\n // Used to prevent infinite loops in cyclical data structures\n safeGlobalRegistrySet(id, z.any());\n\n // Generate the actual schema using the callback\n const schema = callback();\n\n // Replace the placeholder with the real schema\n safeGlobalRegistrySet(id, schema);\n\n strapi.log.debug(`Schema ${transformedId} successfully created and registered`);\n\n return schema;\n } catch (error) {\n strapi.log.error(`Schema creation failed: Failed to create schema ${id}`);\n\n throw error;\n }\n};\n"],"names":["safeGlobalRegistrySet","id","schema","_idmap","idMap","z","globalRegistry","transformedId","transformUidToValidOpenApiName","has","strapi","log","debug","delete","add","error","safeSchemaCreation","callback","mapItem","get","warn","any"],"mappings":";;;AAIA;;;;;;;;;;;;;AAaC,IACM,MAAMA,qBAAwB,GAAA,CAACC,EAAyBC,EAAAA,MAAAA,GAAAA;IAC7D,IAAI;AACF,QAAA,MAAM,EAAEC,MAAQC,EAAAA,KAAK,EAAE,GAAGC,EAAEC,cAAc;AAE1C,QAAA,MAAMC,gBAAgBC,8BAA+BP,CAAAA,EAAAA,CAAAA;QAErD,IAAIG,KAAAA,CAAMK,GAAG,CAACF,aAAgB,CAAA,EAAA;;YAE5BG,MAAOC,CAAAA,GAAG,CAACC,KAAK,CAAC,CAAC,yBAAyB,EAAEL,aAAc,CAAA,cAAc,CAAC,CAAA;AAC1EH,YAAAA,KAAAA,CAAMS,MAAM,CAACN,aAAAA,CAAAA;AACf;;QAGAG,MAAOC,CAAAA,GAAG,CAACC,KAAK,CAAC,CAAC,mBAAmB,EAAEL,aAAc,CAAA,mBAAmB,CAAC,CAAA;AACzEF,QAAAA,CAAAA,CAAEC,cAAc,CAACQ,GAAG,CAACZ,MAAQ,EAAA;YAAED,EAAIM,EAAAA;AAAc,SAAA,CAAA;AACnD,KAAA,CAAE,OAAOQ,KAAO,EAAA;QACdL,MAAOC,CAAAA,GAAG,CAACI,KAAK,CACd,CAAC,sDAAsD,EAAEd,EAAG,CAAA,mBAAmB,CAAC,C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