@famgia/omnify-types 0.0.9 → 0.0.12

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/index.cjs CHANGED
@@ -20,8 +20,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ DEFAULT_LOCALE_CONFIG: () => DEFAULT_LOCALE_CONFIG,
23
24
  err: () => err,
24
- ok: () => ok
25
+ getAvailableLocales: () => getAvailableLocales,
26
+ isLocaleMap: () => isLocaleMap,
27
+ isLocalizedString: () => isLocalizedString,
28
+ mergeLocalizedStrings: () => mergeLocalizedStrings,
29
+ ok: () => ok,
30
+ resolveLocalizedString: () => resolveLocalizedString,
31
+ toLocaleMap: () => toLocaleMap
25
32
  });
26
33
  module.exports = __toCommonJS(index_exports);
27
34
 
@@ -32,9 +39,90 @@ function ok(value) {
32
39
  function err(error) {
33
40
  return { ok: false, error };
34
41
  }
42
+
43
+ // src/i18n.ts
44
+ var DEFAULT_LOCALE_CONFIG = {
45
+ locales: ["en"],
46
+ defaultLocale: "en"
47
+ };
48
+ function isLocaleMap(value) {
49
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
50
+ return false;
51
+ }
52
+ return Object.values(value).every((v) => typeof v === "string");
53
+ }
54
+ function isLocalizedString(value) {
55
+ return typeof value === "string" || isLocaleMap(value);
56
+ }
57
+ function resolveLocalizedString(value, options = {}) {
58
+ if (value === void 0 || value === null) {
59
+ return void 0;
60
+ }
61
+ if (typeof value === "string") {
62
+ return value;
63
+ }
64
+ const config = options.config ?? DEFAULT_LOCALE_CONFIG;
65
+ const requestedLocale = options.locale ?? config.defaultLocale;
66
+ if (requestedLocale in value) {
67
+ return value[requestedLocale];
68
+ }
69
+ if (config.fallbackLocale && config.fallbackLocale in value) {
70
+ return value[config.fallbackLocale];
71
+ }
72
+ if (config.defaultLocale in value) {
73
+ return value[config.defaultLocale];
74
+ }
75
+ const availableLocales = Object.keys(value);
76
+ const firstLocale = availableLocales[0];
77
+ if (firstLocale !== void 0) {
78
+ return value[firstLocale];
79
+ }
80
+ if (options.strict) {
81
+ throw new Error(
82
+ `Locale '${requestedLocale}' not found in localized string. Available locales: none`
83
+ );
84
+ }
85
+ return void 0;
86
+ }
87
+ function getAvailableLocales(value) {
88
+ if (value === void 0 || value === null) {
89
+ return [];
90
+ }
91
+ if (typeof value === "string") {
92
+ return ["default"];
93
+ }
94
+ return Object.keys(value);
95
+ }
96
+ function toLocaleMap(value, defaultLocale = "en") {
97
+ if (value === void 0 || value === null) {
98
+ return void 0;
99
+ }
100
+ if (typeof value === "string") {
101
+ return { [defaultLocale]: value };
102
+ }
103
+ return value;
104
+ }
105
+ function mergeLocalizedStrings(base, override, defaultLocale = "en") {
106
+ const baseMap = toLocaleMap(base, defaultLocale);
107
+ const overrideMap = toLocaleMap(override, defaultLocale);
108
+ if (!baseMap && !overrideMap) {
109
+ return void 0;
110
+ }
111
+ return {
112
+ ...baseMap,
113
+ ...overrideMap
114
+ };
115
+ }
35
116
  // Annotate the CommonJS export names for ESM import in node:
36
117
  0 && (module.exports = {
118
+ DEFAULT_LOCALE_CONFIG,
37
119
  err,
38
- ok
120
+ getAvailableLocales,
121
+ isLocaleMap,
122
+ isLocalizedString,
123
+ mergeLocalizedStrings,
124
+ ok,
125
+ resolveLocalizedString,
126
+ toLocaleMap
39
127
  });
40
128
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/errors.ts"],"sourcesContent":["/**\n * @famgia/omnify-types\n * Core type definitions for omnify-schema\n *\n * This package provides shared TypeScript interfaces and types\n * used across all omnify packages.\n */\n\n// ============================================================================\n// Schema Types\n// ============================================================================\n\nexport type {\n // Property types\n BuiltInPropertyType,\n PropertyType,\n // Association types\n AssociationRelation,\n ReferentialAction,\n AssociationDefinition,\n // Property definitions\n BasePropertyDefinition,\n StringPropertyDefinition,\n NumericPropertyDefinition,\n EnumPropertyDefinition,\n SelectPropertyDefinition,\n PropertyDefinition,\n // Schema options\n IdType,\n IndexType,\n IndexDefinition,\n SchemaOptions,\n // Schema definitions\n SchemaKind,\n SchemaDefinition,\n LoadedSchema,\n SchemaCollection,\n} from './schema.js';\n\n// ============================================================================\n// Configuration Types\n// ============================================================================\n\nexport type {\n // Database config\n DatabaseDriver,\n DatabaseConfig,\n // Output config\n LaravelOutputConfig,\n TypeScriptOutputConfig,\n OutputConfig,\n // Main config\n OmnifyConfig,\n ResolvedOmnifyConfig,\n} from './config.js';\n\n// ============================================================================\n// Plugin Types\n// ============================================================================\n\nexport type {\n // Type definitions\n SqlColumnDefinition,\n TypeScriptTypeInfo,\n ExpandedFieldDefinition,\n CustomTypeDefinition,\n // Plugin interface\n PluginContext,\n PluginLogger,\n OmnifyPlugin,\n PluginFactory,\n // Generator types\n GeneratorOutputType,\n GeneratorOutput,\n GeneratorContext,\n GeneratorDefinition,\n} from './plugin.js';\n\n// ============================================================================\n// Error Types\n// ============================================================================\n\nexport type {\n ErrorCode,\n ErrorLocation,\n OmnifyErrorInfo,\n Result,\n} from './errors.js';\n\nexport { ok, err } from './errors.js';\n","/**\n * @famgia/omnify-types - Error Types\n *\n * Type definitions for omnify error handling.\n * Errors follow the format: file:line + message + suggestion\n */\n\n// ============================================================================\n// Error Codes\n// ============================================================================\n\n/**\n * Error code categories:\n * - E0xx: Configuration errors\n * - E1xx: Schema parsing errors\n * - E2xx: Schema validation errors\n * - E3xx: Plugin errors\n * - E4xx: Atlas/Database errors\n * - E5xx: Generation errors\n * - E9xx: Internal errors\n */\nexport type ErrorCode =\n // Configuration errors (E0xx)\n | 'E001' // Config file not found\n | 'E002' // Invalid config format\n | 'E003' // Missing required config field\n | 'E004' // Invalid database driver\n | 'E005' // Invalid output path\n // Schema parsing errors (E1xx)\n | 'E101' // Schema file not found\n | 'E102' // Invalid YAML syntax\n | 'E103' // Invalid JSON syntax\n | 'E104' // Empty schema file\n | 'E105' // Schema read error\n // Schema validation errors (E2xx)\n | 'E201' // Invalid property type\n | 'E202' // Missing required field\n | 'E203' // Invalid association target\n | 'E204' // Circular reference detected\n | 'E205' // Duplicate schema name\n | 'E206' // Invalid schema options\n | 'E207' // Invalid enum values\n | 'E208' // Orphaned inverse relation\n // Plugin errors (E3xx)\n | 'E301' // Plugin not found\n | 'E302' // Plugin load error\n | 'E303' // Invalid plugin format\n | 'E304' // Plugin type conflict\n | 'E305' // Plugin setup error\n // Atlas/Database errors (E4xx)\n | 'E401' // Atlas CLI not found\n | 'E402' // Atlas diff failed\n | 'E403' // Database connection error\n | 'E404' // HCL generation error\n | 'E405' // Lock file error\n // Generation errors (E5xx)\n | 'E501' // Migration generation failed\n | 'E502' // TypeScript generation failed\n | 'E503' // Output write error\n | 'E504' // Template error\n // Internal errors (E9xx)\n | 'E901' // Unexpected error\n | 'E902'; // Not implemented\n\n// ============================================================================\n// Error Info\n// ============================================================================\n\n/**\n * Source location where an error occurred.\n */\nexport interface ErrorLocation {\n /** File path where the error occurred */\n readonly file?: string;\n /** Line number (1-based) */\n readonly line?: number;\n /** Column number (1-based) */\n readonly column?: number;\n}\n\n/**\n * Structured error information for omnify errors.\n */\nexport interface OmnifyErrorInfo {\n /** Error code (e.g., 'E201') */\n readonly code: ErrorCode;\n /** Human-readable error message */\n readonly message: string;\n /** Location where the error occurred */\n readonly location?: ErrorLocation;\n /** Suggested fix for the error */\n readonly suggestion?: string;\n /** Additional context or details */\n readonly details?: Record<string, unknown>;\n /** Original error if this wraps another error */\n readonly cause?: Error;\n}\n\n/**\n * Result type for operations that may fail.\n */\nexport type Result<T, E = OmnifyErrorInfo> =\n | { readonly ok: true; readonly value: T }\n | { readonly ok: false; readonly error: E };\n\n/**\n * Helper to create a successful result.\n */\nexport function ok<T>(value: T): Result<T, never> {\n return { ok: true, value };\n}\n\n/**\n * Helper to create an error result.\n */\nexport function err<E>(error: E): Result<never, E> {\n return { ok: false, error };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC4GO,SAAS,GAAM,OAA4B;AAChD,SAAO,EAAE,IAAI,MAAM,MAAM;AAC3B;AAKO,SAAS,IAAO,OAA4B;AACjD,SAAO,EAAE,IAAI,OAAO,MAAM;AAC5B;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/errors.ts","../src/i18n.ts"],"sourcesContent":["/**\n * @famgia/omnify-types\n * Core type definitions for omnify-schema\n *\n * This package provides shared TypeScript interfaces and types\n * used across all omnify packages.\n */\n\n// ============================================================================\n// Schema Types\n// ============================================================================\n\nexport type {\n // Property types\n BuiltInPropertyType,\n PropertyType,\n // Association types\n AssociationRelation,\n ReferentialAction,\n PivotFieldDefinition,\n AssociationDefinition,\n // Property definitions\n BasePropertyDefinition,\n StringPropertyDefinition,\n NumericPropertyDefinition,\n EnumPropertyDefinition,\n EnumRefPropertyDefinition,\n FilePropertyDefinition,\n InlineEnumValue,\n PropertyDefinition,\n // Schema options\n IdType,\n IndexType,\n IndexDefinition,\n SchemaOptions,\n // Schema definitions\n SchemaKind,\n SchemaDefinition,\n LoadedSchema,\n SchemaCollection,\n} from './schema.js';\n\n// ============================================================================\n// Configuration Types\n// ============================================================================\n\nexport type {\n // Database config\n DatabaseDriver,\n DatabaseConfig,\n // Output config\n LaravelOutputConfig,\n TypeScriptOutputConfig,\n OutputConfig,\n // Main config\n OmnifyConfig,\n ResolvedOmnifyConfig,\n} from './config.js';\n\n// ============================================================================\n// Plugin Types\n// ============================================================================\n\nexport type {\n // Type definitions\n SqlColumnDefinition,\n TypeScriptTypeInfo,\n ExpandedFieldDefinition,\n CustomTypeDefinition,\n // Plugin interface\n PluginContext,\n PluginLogger,\n OmnifyPlugin,\n PluginFactory,\n PluginEnumDefinition,\n PluginEnumValue,\n // Generator types\n GeneratorOutputType,\n GeneratorOutput,\n GeneratorContext,\n GeneratorDefinition,\n // Schema change types\n PropertySnapshot,\n IndexSnapshot,\n SchemaChangeType,\n ColumnChange,\n IndexChange,\n SchemaChange,\n // Plugin config schema (WordPress-like)\n PluginConfigFieldType,\n PluginConfigSelectOption,\n PluginConfigField,\n PluginConfigSchema,\n} from './plugin.js';\n\n// ============================================================================\n// Error Types\n// ============================================================================\n\nexport type {\n ErrorCode,\n ErrorLocation,\n OmnifyErrorInfo,\n Result,\n} from './errors.js';\n\nexport { ok, err } from './errors.js';\n\n// ============================================================================\n// Internationalization (i18n) Types\n// ============================================================================\n\nexport type {\n LocaleCode,\n LocaleMap,\n LocalizedString,\n LocaleConfig,\n LocaleResolutionOptions,\n} from './i18n.js';\n\nexport {\n DEFAULT_LOCALE_CONFIG,\n isLocaleMap,\n isLocalizedString,\n resolveLocalizedString,\n getAvailableLocales,\n toLocaleMap,\n mergeLocalizedStrings,\n} from './i18n.js';\n","/**\n * @famgia/omnify-types - Error Types\n *\n * Type definitions for omnify error handling.\n * Errors follow the format: file:line + message + suggestion\n */\n\n// ============================================================================\n// Error Codes\n// ============================================================================\n\n/**\n * Error code categories:\n * - E0xx: Configuration errors\n * - E1xx: Schema parsing errors\n * - E2xx: Schema validation errors\n * - E3xx: Plugin errors\n * - E4xx: Atlas/Database errors\n * - E5xx: Generation errors\n * - E9xx: Internal errors\n */\nexport type ErrorCode =\n // Configuration errors (E0xx)\n | 'E001' // Config file not found\n | 'E002' // Invalid config format\n | 'E003' // Missing required config field\n | 'E004' // Invalid database driver\n | 'E005' // Invalid output path\n // Schema parsing errors (E1xx)\n | 'E101' // Schema file not found\n | 'E102' // Invalid YAML syntax\n | 'E103' // Invalid JSON syntax\n | 'E104' // Empty schema file\n | 'E105' // Schema read error\n // Schema validation errors (E2xx)\n | 'E201' // Invalid property type\n | 'E202' // Missing required field\n | 'E203' // Invalid association target\n | 'E204' // Circular reference detected\n | 'E205' // Duplicate schema name\n | 'E206' // Invalid schema options\n | 'E207' // Invalid enum values\n | 'E208' // Orphaned inverse relation\n // Plugin errors (E3xx)\n | 'E301' // Plugin not found\n | 'E302' // Plugin load error\n | 'E303' // Invalid plugin format\n | 'E304' // Plugin type conflict\n | 'E305' // Plugin setup error\n // Atlas/Database errors (E4xx)\n | 'E401' // Atlas CLI not found\n | 'E402' // Atlas diff failed\n | 'E403' // Database connection error\n | 'E404' // HCL generation error\n | 'E405' // Lock file error\n // Generation errors (E5xx)\n | 'E501' // Migration generation failed\n | 'E502' // TypeScript generation failed\n | 'E503' // Output write error\n | 'E504' // Template error\n // Internal errors (E9xx)\n | 'E901' // Unexpected error\n | 'E902'; // Not implemented\n\n// ============================================================================\n// Error Info\n// ============================================================================\n\n/**\n * Source location where an error occurred.\n */\nexport interface ErrorLocation {\n /** File path where the error occurred */\n readonly file?: string;\n /** Line number (1-based) */\n readonly line?: number;\n /** Column number (1-based) */\n readonly column?: number;\n}\n\n/**\n * Structured error information for omnify errors.\n */\nexport interface OmnifyErrorInfo {\n /** Error code (e.g., 'E201') */\n readonly code: ErrorCode;\n /** Human-readable error message */\n readonly message: string;\n /** Location where the error occurred */\n readonly location?: ErrorLocation;\n /** Suggested fix for the error */\n readonly suggestion?: string;\n /** Additional context or details */\n readonly details?: Record<string, unknown>;\n /** Original error if this wraps another error */\n readonly cause?: Error;\n}\n\n/**\n * Result type for operations that may fail.\n */\nexport type Result<T, E = OmnifyErrorInfo> =\n | { readonly ok: true; readonly value: T }\n | { readonly ok: false; readonly error: E };\n\n/**\n * Helper to create a successful result.\n */\nexport function ok<T>(value: T): Result<T, never> {\n return { ok: true, value };\n}\n\n/**\n * Helper to create an error result.\n */\nexport function err<E>(error: E): Result<never, E> {\n return { ok: false, error };\n}\n","/**\n * @famgia/omnify-types - Internationalization (i18n) Types\n *\n * Types for multi-language support in schema definitions.\n * Supports displayName, description, and other localizable strings.\n */\n\n// ============================================================================\n// Locale Types\n// ============================================================================\n\n/**\n * Supported locale code format (ISO 639-1 language codes).\n * Examples: 'en', 'ja', 'vi', 'zh', 'ko', 'fr', 'de', 'es', 'pt'\n */\nexport type LocaleCode = string;\n\n/**\n * Map of locale codes to localized strings.\n * @example { en: 'User Name', ja: 'ユーザー名', vi: 'Tên người dùng' }\n */\nexport type LocaleMap = Readonly<Record<LocaleCode, string>>;\n\n/**\n * Localized string - can be either a simple string (default locale)\n * or a map of locale codes to localized strings.\n *\n * @example\n * // Simple string (uses default locale)\n * displayName: \"User Name\"\n *\n * // Multi-language object\n * displayName:\n * en: \"User Name\"\n * ja: \"ユーザー名\"\n * vi: \"Tên người dùng\"\n */\nexport type LocalizedString = string | LocaleMap;\n\n// ============================================================================\n// Locale Configuration\n// ============================================================================\n\n/**\n * Locale configuration for omnify projects.\n * Configured in .omnify.yaml or omnify.config.ts\n */\nexport interface LocaleConfig {\n /**\n * List of supported locale codes.\n * @default ['en']\n * @example ['en', 'ja', 'vi']\n */\n readonly locales: readonly LocaleCode[];\n\n /**\n * Default locale code used when:\n * - displayName is a simple string\n * - Requested locale is not found and no fallback matches\n * @default 'en'\n */\n readonly defaultLocale: LocaleCode;\n\n /**\n * Fallback locale code used when requested locale is not found.\n * If not set, falls back to defaultLocale.\n * @example 'en' - If 'ko' not found, try 'en' before defaultLocale\n */\n readonly fallbackLocale?: LocaleCode;\n}\n\n/**\n * Default locale configuration.\n */\nexport const DEFAULT_LOCALE_CONFIG: LocaleConfig = {\n locales: ['en'],\n defaultLocale: 'en',\n};\n\n// ============================================================================\n// Resolution Options\n// ============================================================================\n\n/**\n * Options for resolving localized strings.\n */\nexport interface LocaleResolutionOptions {\n /**\n * Locale to resolve to.\n * If not provided, uses defaultLocale from config.\n */\n readonly locale?: LocaleCode;\n\n /**\n * Locale configuration.\n * If not provided, uses DEFAULT_LOCALE_CONFIG.\n */\n readonly config?: LocaleConfig;\n\n /**\n * Whether to throw an error if locale is not found.\n * If false, returns undefined for missing locales.\n * @default false\n */\n readonly strict?: boolean;\n}\n\n// ============================================================================\n// Utility Type Guards\n// ============================================================================\n\n/**\n * Check if a value is a LocaleMap (object with locale keys).\n */\nexport function isLocaleMap(value: unknown): value is LocaleMap {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n return false;\n }\n // Check that all values are strings\n return Object.values(value).every(v => typeof v === 'string');\n}\n\n/**\n * Check if a value is a LocalizedString.\n */\nexport function isLocalizedString(value: unknown): value is LocalizedString {\n return typeof value === 'string' || isLocaleMap(value);\n}\n\n// ============================================================================\n// Resolution Functions\n// ============================================================================\n\n/**\n * Resolve a localized string to a specific locale.\n *\n * Resolution order:\n * 1. Requested locale (if provided)\n * 2. Fallback locale (if configured)\n * 3. Default locale\n * 4. First available locale (if none of the above match)\n * 5. undefined (if strict=false) or throws error (if strict=true)\n *\n * @param value - The localized string value\n * @param options - Resolution options\n * @returns The resolved string or undefined\n *\n * @example\n * // Simple string\n * resolveLocalizedString('Hello') // => 'Hello'\n *\n * // Multi-language with locale\n * resolveLocalizedString({ en: 'Hello', ja: 'こんにちは' }, { locale: 'ja' })\n * // => 'こんにちは'\n *\n * // Multi-language with fallback\n * resolveLocalizedString({ en: 'Hello', ja: 'こんにちは' }, { locale: 'ko' })\n * // => 'Hello' (falls back to defaultLocale)\n */\nexport function resolveLocalizedString(\n value: LocalizedString | undefined | null,\n options: LocaleResolutionOptions = {}\n): string | undefined {\n if (value === undefined || value === null) {\n return undefined;\n }\n\n // Simple string - return as-is\n if (typeof value === 'string') {\n return value;\n }\n\n const config = options.config ?? DEFAULT_LOCALE_CONFIG;\n const requestedLocale = options.locale ?? config.defaultLocale;\n\n // Try requested locale\n if (requestedLocale in value) {\n return value[requestedLocale];\n }\n\n // Try fallback locale\n if (config.fallbackLocale && config.fallbackLocale in value) {\n return value[config.fallbackLocale];\n }\n\n // Try default locale\n if (config.defaultLocale in value) {\n return value[config.defaultLocale];\n }\n\n // Try first available locale\n const availableLocales = Object.keys(value);\n const firstLocale = availableLocales[0];\n if (firstLocale !== undefined) {\n return value[firstLocale];\n }\n\n // No locale found\n if (options.strict) {\n throw new Error(\n `Locale '${requestedLocale}' not found in localized string. ` +\n `Available locales: none`\n );\n }\n\n return undefined;\n}\n\n/**\n * Get all available locales from a localized string.\n *\n * @param value - The localized string value\n * @returns Array of available locale codes, or ['default'] for simple strings\n */\nexport function getAvailableLocales(\n value: LocalizedString | undefined | null\n): readonly LocaleCode[] {\n if (value === undefined || value === null) {\n return [];\n }\n\n if (typeof value === 'string') {\n return ['default'];\n }\n\n return Object.keys(value);\n}\n\n/**\n * Convert a localized string to a full LocaleMap.\n * Simple strings are converted to { [defaultLocale]: value }.\n *\n * @param value - The localized string value\n * @param defaultLocale - Default locale for simple strings\n * @returns LocaleMap or undefined\n */\nexport function toLocaleMap(\n value: LocalizedString | undefined | null,\n defaultLocale: LocaleCode = 'en'\n): LocaleMap | undefined {\n if (value === undefined || value === null) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n return { [defaultLocale]: value };\n }\n\n return value;\n}\n\n/**\n * Merge two localized strings, with the second taking precedence.\n *\n * @param base - Base localized string\n * @param override - Override localized string\n * @param defaultLocale - Default locale for simple strings\n * @returns Merged LocaleMap\n */\nexport function mergeLocalizedStrings(\n base: LocalizedString | undefined | null,\n override: LocalizedString | undefined | null,\n defaultLocale: LocaleCode = 'en'\n): LocaleMap | undefined {\n const baseMap = toLocaleMap(base, defaultLocale);\n const overrideMap = toLocaleMap(override, defaultLocale);\n\n if (!baseMap && !overrideMap) {\n return undefined;\n }\n\n return {\n ...baseMap,\n ...overrideMap,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC4GO,SAAS,GAAM,OAA4B;AAChD,SAAO,EAAE,IAAI,MAAM,MAAM;AAC3B;AAKO,SAAS,IAAO,OAA4B;AACjD,SAAO,EAAE,IAAI,OAAO,MAAM;AAC5B;;;AC3CO,IAAM,wBAAsC;AAAA,EACjD,SAAS,CAAC,IAAI;AAAA,EACd,eAAe;AACjB;AAqCO,SAAS,YAAY,OAAoC;AAC9D,MAAI,O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