{"version":3,"sources":["../src/lib/A-Operation/A-Operation.context.ts","../src/lib/A-Channel/A-Channel.error.ts","../src/lib/A-Channel/A-Channel.constants.ts","../src/lib/A-Channel/A-ChannelRequest.context.ts","../src/lib/A-Channel/A-Channel.component.ts","../src/lib/A-Command/A-Command.constants.ts","../src/lib/A-Command/A-Command.error.ts","../src/lib/A-StateMachine/A-StateMachine.error.ts","../src/lib/A-StateMachine/A-StateMachine.constants.ts","../src/lib/A-StateMachine/A-StateMachineTransition.context.ts","../src/lib/A-StateMachine/A-StateMachine.component.ts","../src/lib/A-Config/A-Config.constants.ts","../src/lib/A-Config/A-Config.context.ts","../src/lib/A-Logger/A-Logger.constants.ts","../src/lib/A-Logger/A-Logger.component.ts","../src/lib/A-Command/A-Command.entity.ts","../src/lib/A-Polyfill/classes/A-FS-Polyfill.class.ts","../src/lib/A-Polyfill/classes/A-Crypto-Polyfill.class.ts","../src/lib/A-Polyfill/classes/A-Http-Polyfill.class.ts","../src/lib/A-Polyfill/classes/A-Https-Polyfill.class.ts","../src/lib/A-Polyfill/classes/A-Path-Polyfill.class.ts","../src/lib/A-Polyfill/classes/A-Url-Polyfill.class.ts","../src/lib/A-Polyfill/classes/A-Buffer-Polyfill.class.ts","../src/lib/A-Polyfill/classes/A-Process-Polyfill.class.ts","../src/lib/A-Polyfill/A-Polyfill.component.ts","../src/lib/A-Config/A-Config.error.ts","../src/lib/A-Config/components/ConfigReader.component.ts","../src/lib/A-Config/components/FileConfigReader.component.ts","../src/lib/A-Config/components/ENVConfigReader.component.ts","../src/lib/A-Config/A-Config.container.ts","../src/lib/A-Config/A-Config.types.ts","../src/lib/A-Logger/A-Logger.env.ts","../src/lib/A-Manifest/A-Manifest.error.ts","../src/lib/A-Manifest/classes/A-ManifestChecker.class.ts","../src/lib/A-Manifest/A-Manifest.context.ts","../src/lib/A-Memory/A-Memory.constants.ts","../src/lib/A-Memory/A-Memory.context.ts","../src/lib/A-Memory/A-Memory.error.ts","../src/lib/A-Memory/A-Memory.component.ts","../src/lib/A-Schedule/A-Deferred.class.ts","../src/lib/A-Schedule/A-ScheduleObject.class.ts","../src/lib/A-Schedule/A-Schedule.component.ts"],"names":["_A_OperationContext","A_Fragment","operation","params","error","result","__name","A_OperationContext","_A_ChannelError","A_Error","originalError","context","A_TypeGuards","A_ChannelError","A_ChannelFeatures","A_ChannelRequestStatuses","_A_ChannelRequest","existed","A_ChannelRequest","_A_Channel","A_Component","args","requestScope","A_Scope","A_IdentityHelper","channelError","message","A_Context","__decorateClass","A_Feature","A_Channel","A_Command_Status","A_CommandTransitions","A_CommandFeatures","_A_CommandError","A_CommandError","_A_StateMachineError","A_StateMachineError","A_StateMachineFeatures","_A_StateMachineTransition","A_StateMachineTransition","_a","_b","_c","_d","_A_StateMachine","from","to","props","transitionName","A_FormatterHelper","transition","scope","wrappedError","A_StateMachine","A_CONSTANTS__CONFIG_ENV_VARIABLES","A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY","_A_Config","config","A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY","A_CommonHelper","variable","property","value","array","key","targetValue","A_Config","A_LOGGER_DEFAULT_SCOPE_LENGTH","A_LOGGER_DEFAULT_LEVEL","A_LOGGER_COLORS","A_LOGGER_SAFE_RANDOM_COLORS","A_LOGGER_ANSI","A_LOGGER_TIME_FORMAT","A_LOGGER_FORMAT","A_LOGGER_ENV_KEYS","A_Logger","configScopeColor","configLogColor","complementaryColors","str","hash","i","char","scopeName","safeColors","colorIndex","colorPairs","pairIndex","totalLength","totalPadding","leftPadding","rightPadding","messageColor","timeString","scopePadding","isMultiArg","arg","shouldAddNewline","obj","jsonString","seen","formatted","logMethod","param1","time","line","index","now","minutes","seconds","milliseconds","__decorateParam","A_Inject","_e","_f","_g","_h","_i","_j","_k","_A_Command","A_Entity","logger","stateMachine","resolve","reject","onBeforeExecuteFeature","onExecuteFeature","onAfterExecuteFeature","targetError","event","listener","newEntity","serialized","attachedScope","A_Dependency","A_Command","_A_FSPolyfillClass","path","encoding","A_FSPolyfillClass","_A_CryptoPolyfillClass","fsPolyfill","crypto","text","algorithm","filePath","fileStream","data","err","hashBuffer","hashArray","hashBase64","A_CryptoPolyfillClass","_A_HttpPolyfillClass","httpModule","options","callback","url","isHttps","mockResponse","handler","dest","A_HttpPolyfillClass","_A_HttpsPolyfillClass","httpsModule","A_HttpsPolyfillClass","_A_PathPolyfillClass","paths","resolvedPath","ext","base","parts","name","pathObject","A_PathPolyfillClass","_A_UrlPolyfillClass","urlModule","urlString","urlObject","A_UrlPolyfillClass","_A_BufferPolyfillClass","bufferModule","size","fill","buffer","list","length","sum","buf","offset","A_BufferPolyfillClass","_A_ProcessPolyfillClass","code","A_ProcessPolyfillClass","A_Polyfill","A_Concept","_A_ConfigError","A_ConfigError","ConfigReader","polyfill","container","feature","rootDir","variables","startPath","A_Container","_FileConfigReader","fs","FileConfigReader","_ENVConfigReader","allVariables","ENVConfigReader","_A_ConfigLoader","newConfig","A_ScopeError","A_ConfigLoader","A_TYPES__ConfigFeature","A_LoggerEnvVariables","A_LoggerEnvVariablesArray","_A_ManifestError","A_ManifestError","_A_ManifestChecker","manifest","component","method","checkExclusion","target","A_ManifestChecker","_A_Manifest","item","componentRegex","methodRegex","methodConfig","ctor","components","patterns","componentCtor","query","componentName","methodName","targetName","matchingRules","rule","b","aIsGeneral","bIsGeneral","A_Manifest","A_MemoryFeatures","_A_MemoryContext","param","A_MemoryContext","_A_MemoryError","A_MemoryError","_A_Memory","initError","destroyError","getError","setError","dropError","clearError","serializeError","A_Memory","_A_Deferred","reason","A_Deferred","_A_ScheduleObject","ms","action","A_ScheduleObject","_A_Schedule","date","timestamp","A_Schedule"],"mappings":"iVAGO,IAAMA,EAAAA,CAAN,MAAMA,EAAAA,SAKHC,mBAGR,CAEE,WAAA,CACIC,CAAAA,CACAC,CAAAA,CACF,CACE,KAAA,EAAM,CAEN,KAAK,IAAA,CAAK,GAAA,CAAI,MAAA,CAAQD,CAAS,CAAA,CAC/B,IAAA,CAA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_Error, A_Fragment } from \"@adaas/a-concept\";\nimport { A_Operation_Serialized, A_Operation_Storage } from \"./A-Operation.types\";\n\nexport class A_OperationContext<\n    _AllowedOperations extends string = string,\n    _ParamsType extends Record<string, any> = Record<string, any>,\n    _ResultType = any,\n    _StorageType extends A_Operation_Storage<_ResultType, _ParamsType> = A_Operation_Storage<_ResultType, _ParamsType>\n> extends A_Fragment<\n    _StorageType,\n    A_Operation_Serialized<_ResultType, _ParamsType>\n> {\n\n    constructor(\n        operation: _AllowedOperations,\n        params?: _ParamsType\n    ) {\n        super();\n\n        this.meta.set('name', operation);\n        this.meta.set('params', params || {} as _ParamsType);\n    }\n\n    get name(): _AllowedOperations {\n        return (this._meta.get('name') || this._name) as _AllowedOperations;\n    }\n\n    get result(): _ResultType | undefined {\n        return this._meta.get('result');\n    }\n\n    get error(): A_Error | undefined {\n        return this._meta.get('error');\n    }\n\n    get params(): _ParamsType {\n        return this._meta.get('params') || {} as _ParamsType;\n    }\n\n\n    fail(error: A_Error): void {\n        this._meta.set('error', error);\n    }\n\n    succeed(result: _ResultType): void {\n        this._meta.set('result', result);\n    }\n\n\n    toJSON(): A_Operation_Serialized<_ResultType, _ParamsType> {\n        return {\n            name: this.name,\n            params: this.params,\n            result: this.result || {} as _ResultType,\n            error: this.error?.toJSON(),\n        }\n    }\n}","import { A_Error, A_TypeGuards } from \"@adaas/a-concept\";\nimport { A_OperationContext } from \"../A-Operation/A-Operation.context\";\n\n\nexport class A_ChannelError extends A_Error {\n\n    // ==========================================================\n    // ==================== Error Types =========================\n    // ==========================================================\n\n\n    static readonly MethodNotImplemented = 'A-Channel Method Not Implemented';\n\n    // ==========================================================\n    // ==================== Properties ==========================\n    // ==========================================================\n\n    protected _context?: A_OperationContext\n\n\n    /**\n     * Channel Error allows to keep track of errors within a channel if something goes wrong\n     * \n     * \n     * @param originalError \n     * @param context \n     */\n    constructor(\n        originalError: string | A_Error | Error | any,\n        context?: A_OperationContext | string\n    ) {\n        if (A_TypeGuards.isString(context))\n            super(originalError, context);\n        else\n            super(originalError);\n\n        if (context instanceof A_OperationContext)\n            this._context = context\n    }\n\n    /***\n     * Returns Context of the error\n     */\n    get context(): A_OperationContext | undefined {\n        return this._context\n    }\n\n\n}","\n\n// ===============================================================\n// ADAAS A-Channel Constants\n// ===============================================================\nexport enum A_ChannelFeatures {\n    /**\n     * Allows to extend timeout logic and behavior\n     */\n    onTimeout = 'onTimeout',\n    /**\n     * Allows to extend retry logic and behavior\n     */\n    onRetry = 'onRetry',\n    /**\n     * Allows to extend circuit breaker logic and behavior\n     */\n    onCircuitBreakerOpen = 'onCircuitBreakerOpen',\n    /**\n     * Allows to extend cache logic and behavior\n     */\n    onCache = 'onCache',\n    /**\n     * Allows to extend connection logic and behavior\n     */\n    onConnect = 'onConnect',\n    /**\n     * Allows to extend disconnection logic and behavior\n     */\n    onDisconnect = 'onDisconnect',\n    /**\n     * Allows to extend request preparation logic and behavior\n     */\n    onBeforeRequest = 'onBeforeRequest',\n    /**\n     * Allows to extend request sending logic and behavior\n     */\n    onRequest = 'onRequest',\n    /**\n     * Allows to extend request post-processing logic and behavior\n     */\n    onAfterRequest = 'onAfterRequest',\n    /**\n     * Allows to extend error handling logic and behavior\n     * \n     * [!] The same approach uses for ALL errors within the channel\n     */\n    onError = 'onError',\n    /**\n     * Allows to extend send logic and behavior\n     */\n    onSend = 'onSend',\n    /**\n     * Allows to extend consume logic and behavior\n     */\n    onConsume = 'onConsume',\n}\n\n\n// ==============================================================\n// A-Channel Request Constants\n// ===============================================================\nexport enum A_ChannelRequestStatuses {\n    /**\n     * Request is pending\n     */\n    PENDING = 'PENDING',\n    /***\n     * Request was successful\n     */\n    SUCCESS = 'SUCCESS',\n    /**\n     * Request failed\n     */\n    FAILED = 'FAILED',\n}","import { A_OperationContext } from \"../A-Operation/A-Operation.context\";\nimport { A_ChannelRequestStatuses } from \"./A-Channel.constants\";\n\nexport class A_ChannelRequest<\n    _ParamsType extends Record<string, any> = Record<string, any>,\n    _ResultType extends Record<string, any> = Record<string, any>,\n> extends A_OperationContext<\n    'request',\n    _ParamsType,\n    {\n        data?: _ResultType;\n        status?: A_ChannelRequestStatuses;\n    }\n> {\n\n    constructor(\n        params?: _ParamsType,\n    ) {\n        super('request', params);\n    }\n\n\n    get status(): A_ChannelRequestStatuses | undefined {\n        return this.result?.status;\n    }\n\n    get data(): _ResultType | undefined {\n        return this.result?.data;\n    }\n\n\n    succeed(result: _ResultType): void {\n        const existed = this.result;\n\n        super.succeed({\n            ...existed,\n            data: result,\n            status: A_ChannelRequestStatuses.SUCCESS,\n        });\n    }\n\n}    ","import { A_Component, A_Context, A_Error, A_Feature, A_IdentityHelper, A_Inject, A_Scope, A_TYPES__InjectableConstructors, A_TYPES__InjectableTargets } from \"@adaas/a-concept\";\nimport { A_ChannelError } from \"./A-Channel.error\";\nimport { A_ChannelFeatures } from \"./A-Channel.constants\";\nimport { A_OperationContext } from \"../A-Operation/A-Operation.context\";\nimport { A_ChannelRequest } from \"./A-ChannelRequest.context\";\n\n/**\n * A-Channel - A powerful, extensible communication channel component\n * \n * A-Channel provides a structured approach to implementing various communication patterns\n * such as HTTP clients, WebSocket connections, message queues, and other messaging systems.\n * It offers a complete lifecycle management system with extensible hooks for custom behavior.\n * \n * ## Key Features:\n * - 🔄 **Lifecycle Management** - Complete connection and processing lifecycle with hooks\n * - 📡 **Multiple Communication Patterns** - Request/Response and Fire-and-Forget messaging  \n * - 🛡️ **Error Handling** - Comprehensive error capture and management\n * - 🎯 **Type Safety** - Full TypeScript support with generic types\n * - 🔧 **Extensible** - Component-based architecture for custom behavior\n * - ⚡ **Concurrent Processing** - Handle multiple requests simultaneously\n * \n * ## Basic Usage:\n * ```typescript\n * const channel = new A_Channel();\n * A_Context.root.register(channel);\n * \n * // Request/Response pattern\n * const response = await channel.request({ action: 'getData', id: 123 });\n * \n * // Fire-and-forget pattern  \n * await channel.send({ type: 'notification', message: 'Hello World' });\n * ```\n * \n * ## Custom Implementation:\n * ```typescript\n * class HttpChannel extends A_Channel {}\n * \n * class HttpProcessor extends A_Component {\n *     @A_Feature.Extend({ scope: [HttpChannel] })\n *     async [A_ChannelFeatures.onRequest](\n *         @A_Inject(A_ChannelRequest) context: A_ChannelRequest\n *     ) {\n *         const response = await fetch(context.params.url);\n *         (context as any)._result = await response.json();\n *     }\n * }\n * ```\n * \n * @see {@link ./README.md} For complete documentation and examples\n */\nexport class A_Channel extends A_Component {\n\n    /**\n     * Indicates whether the channel is currently processing requests.\n     * This flag is managed automatically during request/send operations.\n     * \n     * @readonly\n     */\n    protected _processing: boolean = false;\n\n    /**\n     * Promise that resolves when the channel initialization is complete.\n     * Ensures that onConnect lifecycle hook has been executed before\n     * any communication operations.\n     * \n     * @private\n     */\n    protected _initialized?: Promise<void>;\n\n    /**\n     * Internal cache storage for channel-specific data.\n     * Can be used by custom implementations for caching responses,\n     * connection pools, or other channel-specific state.\n     * \n     * @protected\n     */\n    protected _cache: Map<string, any> = new Map();\n\n    /**\n     * Creates a new A_Channel instance.\n     * \n     * The channel must be registered with A_Context before use:\n     * ```typescript\n     * const channel = new A_Channel();\n     * A_Context.root.register(channel);\n     * ```\n     */\n    constructor() {\n        super();\n    }\n\n    /**\n     * Indicates whether the channel is currently processing requests.\n     * \n     * @returns {boolean} True if channel is processing, false otherwise\n     */\n    get processing(): boolean {\n        return this._processing;\n    }\n\n    /**\n     * Promise that resolves when the channel is fully initialized.\n     * \n     * Automatically calls the onConnect lifecycle hook if not already called.\n     * This ensures the channel is ready for communication operations.\n     * \n     * @returns {Promise<void>} Promise that resolves when initialization is complete\n     */\n    get initialize(): Promise<void> {\n        if (!this._initialized) {\n            this._initialized = this.connect();\n        }\n        return this._initialized;\n    }\n\n    // ==========================================================\n    // ================ Lifecycle Extension Points =============\n    // ==========================================================\n\n    /**\n     * Connection lifecycle hook - called during channel initialization.\n     * \n     * Override this method in custom components to implement connection logic:\n     * - Initialize network connections\n     * - Load configuration\n     * - Validate environment\n     * - Set up connection pools\n     * \n     * @example\n     * ```typescript\n     * class DatabaseChannel extends A_Channel {}\n     * \n     * class DatabaseConnector extends A_Component {\n     *     @A_Feature.Extend({ scope: [DatabaseChannel] })\n     *     async [A_ChannelFeatures.onConnect]() {\n     *         await this.initializeDatabase();\n     *         console.log('Database channel connected');\n     *     }\n     * }\n     * ```\n     */\n    @A_Feature.Extend({\n        name: A_ChannelFeatures.onConnect\n    })\n    async onConnect(...args: any[]) {\n        // Default implementation - no operation\n        // Override in custom implementations\n    }\n\n    /**\n     * Disconnection lifecycle hook - called during channel cleanup.\n     * \n     * Override this method in custom components to implement cleanup logic:\n     * - Close network connections\n     * - Save state\n     * - Release resources\n     * - Clear caches\n     * \n     * @example\n     * ```typescript\n     * @A_Feature.Extend({ scope: [DatabaseChannel] })\n     * async [A_ChannelFeatures.onDisconnect]() {\n     *     await this.closeConnections();\n     *     console.log('Database channel disconnected');\n     * }\n     * ```\n     */\n    @A_Feature.Extend({\n        name: A_ChannelFeatures.onDisconnect\n    })\n    async onDisconnect(...args: any[]) {\n        // Default implementation - no operation\n        // Override in custom implementations\n    }\n\n    /**\n     * Pre-request processing hook - called before main request processing.\n     * \n     * Use this hook for:\n     * - Request validation\n     * - Authentication\n     * - Rate limiting\n     * - Logging\n     * - Request transformation\n     * \n     * @example\n     * ```typescript\n     * @A_Feature.Extend({ scope: [HttpChannel] })\n     * async [A_ChannelFeatures.onBeforeRequest](\n     *     @A_Inject(A_ChannelRequest) context: A_ChannelRequest\n     * ) {\n     *     // Validate required parameters\n     *     if (!context.params.url) {\n     *         throw new Error('URL is required');\n     *     }\n     * }\n     * ```\n     */\n    @A_Feature.Extend({\n        name: A_ChannelFeatures.onBeforeRequest\n    })\n    async onBeforeRequest(...args: any[]) {\n        // Default implementation - no operation\n        // Override in custom implementations\n    }\n\n    /**\n     * Main request processing hook - core business logic goes here.\n     * \n     * This is where the main communication logic should be implemented:\n     * - Make HTTP requests\n     * - Send messages to queues\n     * - Execute database queries\n     * - Process business logic\n     * \n     * Set the result in the context: `(context as any)._result = yourResult;`\n     * \n     * @example\n     * ```typescript\n     * @A_Feature.Extend({ scope: [HttpChannel] })\n     * async [A_ChannelFeatures.onRequest](\n     *     @A_Inject(A_ChannelRequest) context: A_ChannelRequest\n     * ) {\n     *     const response = await fetch(context.params.url);\n     *     (context as any)._result = await response.json();\n     * }\n     * ```\n     */\n    @A_Feature.Extend({\n        name: A_ChannelFeatures.onRequest\n    })\n    async onRequest(...args: any[]) {\n        // Default implementation - no operation\n        // Override in custom implementations\n    }\n\n    /**\n     * Post-request processing hook - called after successful request processing.\n     * \n     * Use this hook for:\n     * - Response transformation\n     * - Logging\n     * - Analytics\n     * - Caching results\n     * - Cleanup\n     * \n     * @example\n     * ```typescript\n     * @A_Feature.Extend({ scope: [HttpChannel] })\n     * async [A_ChannelFeatures.onAfterRequest](\n     *     @A_Inject(A_ChannelRequest) context: A_ChannelRequest\n     * ) {\n     *     console.log(`Request completed in ${Date.now() - context.startTime}ms`);\n     *     await this.cacheResponse(context.params, context.data);\n     * }\n     * ```\n     */\n    @A_Feature.Extend({\n        name: A_ChannelFeatures.onAfterRequest\n    })\n    async onAfterRequest(...args: any[]) {\n        // Default implementation - no operation\n        // Override in custom implementations\n    }\n\n    /**\n     * Error handling hook - called when any operation fails.\n     * \n     * Use this hook for:\n     * - Error logging\n     * - Error transformation\n     * - Alerting\n     * - Retry logic\n     * - Fallback mechanisms\n     * \n     * @example\n     * ```typescript\n     * @A_Feature.Extend({ scope: [HttpChannel] })\n     * async [A_ChannelFeatures.onError](\n     *     @A_Inject(A_ChannelRequest) context: A_ChannelRequest\n     * ) {\n     *     console.error('Request failed:', context.params, context.failed);\n     *     await this.logError(context);\n     *     await this.sendAlert(context);\n     * }\n     * ```\n     */\n    @A_Feature.Extend({\n        name: A_ChannelFeatures.onError\n    })\n    async onError(...args: any[]) {\n        // Default implementation - no operation\n        // Override in custom implementations\n    }\n\n    /**\n     * Send operation hook - called for fire-and-forget messaging.\n     * \n     * Use this hook for:\n     * - Message broadcasting\n     * - Event publishing\n     * - Notification sending\n     * - Queue operations\n     * \n     * @example\n     * ```typescript\n     * @A_Feature.Extend({ scope: [EventChannel] })\n     * async [A_ChannelFeatures.onSend](\n     *     @A_Inject(A_ChannelRequest) context: A_ChannelRequest\n     * ) {\n     *     const { eventType, payload } = context.params;\n     *     await this.publishEvent(eventType, payload);\n     * }\n     * ```\n     */\n    @A_Feature.Extend({\n        name: A_ChannelFeatures.onSend\n    })\n    async onSend(...args: any[]) {\n        // Default implementation - no operation\n        // Override in custom implementations\n    }\n\n    // ==========================================================\n    // ================= Public API Methods ===================\n    // ==========================================================\n\n    /**\n     * Initializes the channel by calling the onConnect lifecycle hook.\n     * \n     * This method is called automatically when accessing the `initialize` property.\n     * You can also call it manually if needed.\n     * \n     * @returns {Promise<void>} Promise that resolves when connection is established\n     */\n    async connect() {\n        await this.call(A_ChannelFeatures.onConnect);\n    }\n\n    /**\n     * Disconnects the channel by calling the onDisconnect lifecycle hook.\n     * \n     * Use this method to properly cleanup resources when the channel is no longer needed.\n     * \n     * @returns {Promise<void>} Promise that resolves when cleanup is complete\n     */\n    async disconnect() {\n        await this.call(A_ChannelFeatures.onDisconnect);\n    }\n\n    /**\n     * Sends a request and waits for a response (Request/Response pattern).\n     * \n     * This method follows the complete request lifecycle:\n     * 1. Ensures channel is initialized\n     * 2. Creates request scope and context\n     * 3. Calls onBeforeRequest hook\n     * 4. Calls onRequest hook (main processing)\n     * 5. Calls onAfterRequest hook\n     * 6. Returns the response context\n     * \n     * If any step fails, the onError hook is called and the error is captured\n     * in the returned context.\n     * \n     * @template _ParamsType The type of request parameters\n     * @template _ResultType The type of response data\n     * @param params The request parameters\n     * @returns {Promise<A_ChannelRequest<_ParamsType, _ResultType>>} Request context with response\n     * \n     * @example\n     * ```typescript\n     * // Basic usage\n     * const response = await channel.request({ action: 'getData', id: 123 });\n     * \n     * // Typed usage\n     * interface UserRequest { userId: string; }\n     * interface UserResponse { name: string; email: string; }\n     * \n     * const userResponse = await channel.request<UserRequest, UserResponse>({\n     *     userId: 'user-123'\n     * });\n     * \n     * if (!userResponse.failed) {\n     *     console.log('User:', userResponse.data.name);\n     * }\n     * ```\n     */\n    async request<\n        _ParamsType extends Record<string, any> = Record<string, any>,\n        _ResultType extends Record<string, any> = Record<string, any>,\n    >(params: _ParamsType): Promise<A_ChannelRequest<_ParamsType, _ResultType>> {\n        // Ensure channel is initialized before processing\n        await this.initialize;\n\n        // Set processing flag\n        this._processing = true;\n\n        // Create isolated scope for this request\n        const requestScope = new A_Scope({\n            name: `a-channel@scope:request:${A_IdentityHelper.generateTimeId()}`\n        });\n\n        // Create request context\n        const context = new A_ChannelRequest<_ParamsType, _ResultType>(params);\n\n        try {\n            // Set up dependency injection scope\n            requestScope.register(context);\n\n            // Execute request lifecycle\n            await this.call(A_ChannelFeatures.onBeforeRequest, requestScope);\n            await this.call(A_ChannelFeatures.onRequest, requestScope);\n            await this.call(A_ChannelFeatures.onAfterRequest, requestScope);\n\n            this._processing = false;\n\n            return context;\n\n        } catch (error) {\n            this._processing = false;\n\n            // Create channel-specific error\n            const channelError = new A_ChannelError(error);\n            context.fail(channelError);\n            requestScope.register(channelError);\n\n            // Call error handling hook\n            await this.call(A_ChannelFeatures.onError, requestScope);\n\n            requestScope.destroy();\n\n            throw channelError;\n        }\n    }\n\n    /**\n     * Sends a fire-and-forget message (Send pattern).\n     * \n     * This method is used for one-way communication where no response is expected:\n     * - Event broadcasting\n     * - Notification sending\n     * - Message queuing\n     * - Logging operations\n     * \n     * The method follows this lifecycle:\n     * 1. Ensures channel is initialized\n     * 2. Creates send scope and context\n     * 3. Calls onSend hook\n     * 4. Completes without returning data\n     * \n     * If the operation fails, the onError hook is called but no error is thrown\n     * to the caller (fire-and-forget semantics).\n     * \n     * @template _ParamsType The type of message parameters\n     * @param message The message to send\n     * @returns {Promise<void>} Promise that resolves when send is complete\n     * \n     * @example\n     * ```typescript\n     * // Send notification\n     * await channel.send({\n     *     type: 'user.login',\n     *     userId: 'user-123',\n     *     timestamp: new Date().toISOString()\n     * });\n     * \n     * // Send to message queue\n     * await channel.send({\n     *     queue: 'email-queue',\n     *     payload: {\n     *         to: 'user@example.com',\n     *         subject: 'Welcome!',\n     *         body: 'Welcome to our service!'\n     *     }\n     * });\n     * ```\n     */\n    async send<_ParamsType extends Record<string, any> = Record<string, any>>(\n        message: _ParamsType\n    ): Promise<void> {\n        // Ensure channel is initialized before processing\n        await this.initialize;\n\n        // Set processing flag\n        this._processing = true;\n\n        // Create isolated scope for this send operation\n        const requestScope = new A_Scope({\n            name: `a-channel@scope:send:${A_IdentityHelper.generateTimeId()}`\n        });\n\n        // Create request context for the message\n        const context = new A_OperationContext('send', message);\n\n        try {\n            // Set up dependency injection scope\n            requestScope.inherit(A_Context.scope(this));\n            requestScope.register(context);\n\n            // Execute send operation\n            await this.call(A_ChannelFeatures.onSend, requestScope);\n\n            this._processing = false;\n\n        } catch (error) {\n            this._processing = false;\n\n            // Create channel-specific error\n            const channelError = new A_ChannelError(error);\n            requestScope.register(channelError);\n            context.fail(channelError);\n\n            // Call error handling hook\n            await this.call(A_ChannelFeatures.onError, requestScope);\n\n            requestScope.destroy();\n\n            // Note: We don't re-throw the error for fire-and-forget operations\n            // The error is handled by the onError hook\n        }\n    }\n\n    /**\n     * @deprecated This method is deprecated and will be removed in future versions.\n     * Use request() or send() methods instead depending on your communication pattern.\n     * \n     * For request/response pattern: Use request()\n     * For fire-and-forget pattern: Use send()\n     * For consumer patterns: Implement custom consumer logic using request() in a loop\n     */\n    async consume<T extends Record<string, any> = Record<string, any>>(): Promise<A_OperationContext<any, T>> {\n        await this.initialize;\n\n        this._processing = true;\n\n        const requestScope = new A_Scope({ name: `a-channel@scope:consume:${A_IdentityHelper.generateTimeId()}` });\n\n        const context = new A_OperationContext('consume', {} as T);\n\n        try {\n            requestScope.inherit(A_Context.scope(this));\n            requestScope.register(context);\n\n\n            await this.call(A_ChannelFeatures.onConsume, requestScope);\n\n            this._processing = false;\n\n            return context as A_OperationContext<any, T>;\n\n        } catch (error) {\n\n            this._processing = false;\n\n            const channelError = new A_ChannelError(error)\n\n            context.fail(channelError);\n\n            await this.call(A_ChannelFeatures.onError, requestScope);\n\n            return context as A_OperationContext<any, T>;\n        }\n    }\n\n}","/**\n * A-Command Status Enumeration\n * \n * Defines all possible states a command can be in during its lifecycle.\n * Commands progress through these states in a specific order:\n * CREATED → INITIALIZED → COMPILED → EXECUTING → COMPLETED/FAILED\n */\nexport enum A_Command_Status {\n    /**\n     * Initial state when command is instantiated but not yet ready for execution\n     */\n    CREATED = 'CREATED',\n    \n    /**\n     * Command has been initialized with execution scope and dependencies\n     */\n    INITIALIZED = 'INITIALIZED',\n    \n    /**\n     * Command has been compiled and is ready for execution\n     */\n    COMPILED = 'COMPILED',\n    \n    /**\n     * Command is currently being executed\n     */\n    EXECUTING = 'EXECUTING',\n    \n    /**\n     * Command has completed successfully\n     */\n    COMPLETED = 'COMPLETED',\n    \n    /**\n     * Command execution has failed with errors\n     */\n    FAILED = 'FAILED',\n}\n\n\n/**\n * A-Command State Transitions\n * \n * Defines valid state transitions for command lifecycle management.\n * These transitions are used by the StateMachine to enforce proper command flow.\n */\nexport enum A_CommandTransitions {\n    /** Transition from CREATED to INITIALIZED state */\n    CREATED_TO_INITIALIZED = 'created_initialized',\n    \n    /** Transition from INITIALIZED to EXECUTING state */\n    INITIALIZED_TO_EXECUTING = 'initialized_executing',\n    \n    /** Transition from EXECUTING to COMPLETED state (success path) */\n    EXECUTING_TO_COMPLETED = 'executing_completed',\n    \n    /** Transition from EXECUTING to FAILED state (error path) */\n    EXECUTING_TO_FAILED = 'executing_failed',\n}\n\n/**\n * A-Command Lifecycle Features\n * \n * Defines feature extension points that components can implement to customize\n * command behavior at different stages of the lifecycle.\n * \n * Components can use @A_Feature.Extend() decorator with these feature names\n * to inject custom logic into command execution.\n */\nexport enum A_CommandFeatures {\n    /**\n     * Triggered during command initialization phase\n     * Use to set up execution environment, validate parameters, or prepare resources\n     */\n    onInit = 'onInit',\n    \n    /**\n     * Triggered before command execution starts\n     * Use for pre-execution validation, logging, or setup tasks\n     */\n    onBeforeExecute = 'onBeforeExecute',\n    \n    /**\n     * Main command execution logic\n     * Core business logic should be implemented here\n     */\n    onExecute = 'onExecute',\n    \n    /**\n     * Triggered after command execution completes (success or failure)\n     * Use for cleanup, logging, or post-processing tasks\n     */\n    onAfterExecute = 'onAfterExecute',\n    \n    /**\n     * Triggered when command completes successfully\n     * Use for success-specific operations like notifications or result processing\n     */\n    onComplete = 'onComplete',\n    \n    /**\n     * Triggered when command execution fails\n     * Use for error handling, cleanup, or failure notifications\n     */\n    onFail = 'onFail',\n    \n    /**\n     * Triggered when an error occurs during execution\n     * Use for error logging, transformation, or recovery attempts\n     */\n    onError = 'onError',\n}\n\n\n\n\n/**\n * Type alias for command lifecycle event names\n * Represents all available events that can be listened to on a command instance\n */\nexport type A_Command_Event = keyof typeof A_CommandFeatures;\n\n\n\n\n\n","import { A_Error } from \"@adaas/a-concept\";\n\n\nexport class A_CommandError extends A_Error {\n\n\n    static readonly CommandScopeBindingError = 'A-Command Scope Binding Error';\n\n    static readonly ExecutionError = 'A-Command Execution Error';\n\n\n    static readonly ResultProcessingError = 'A-Command Result Processing Error';\n\n\n    /**\n     * Error indicating that the command was interrupted during execution\n     */\n    static readonly CommandInterruptedError = 'A-Command Interrupted Error';\n}","import { A_Error } from \"@adaas/a-concept\";\n\n\nexport class A_StateMachineError extends A_Error {\n\n    static readonly InitializationError = 'A-StateMachine Initialization Error';\n\n    static readonly TransitionError = 'A-StateMachine Transition Error';\n    \n}","export enum A_StateMachineFeatures {\n    /**\n     * Allows to extend error handling logic and behavior\n     */\n    onError = 'onError',\n    /**\n     * Allows to extend initialization logic and behavior\n     */\n    onInitialize = 'onInitialize',\n    /**\n     * Allows to extend transition validation logic and behavior\n     */\n    onBeforeTransition = 'onBeforeTransition',\n    /**\n     * Allows to extend post-transition logic and behavior\n     */\n    onAfterTransition = 'onAfterTransition',\n}","import { A_OperationContext } from \"../A-Operation/A-Operation.context\";\nimport { A_StateMachineTransitionParams, A_StateMachineTransitionStorage } from \"./A-StateMachine.types\";\n\n\n\nexport class A_StateMachineTransition<\n    _ParamsType = any,\n    _ResultType = any\n> extends A_OperationContext<\n    'a-state-machine-transition',\n    A_StateMachineTransitionParams<_ParamsType>,\n    _ResultType,\n    A_StateMachineTransitionStorage<_ResultType, _ParamsType>\n> {\n\n\n    constructor(\n        params: A_StateMachineTransitionParams<_ParamsType>\n    ) {\n        super(\n            'a-state-machine-transition',\n            params\n        );\n\n        this._meta.set('from', params.from);\n        this._meta.set('to', params.to);\n    }\n\n\n\n    get from(): string {\n        return this._meta.get('from')!;\n    }\n\n\n\n    get to(): string {\n        return this._meta.get('to')!;\n    }\n\n}","import { A_Component, A_Context, A_Feature, A_FormatterHelper, A_Scope } from \"@adaas/a-concept\";\nimport { A_StateMachineError } from \"./A-StateMachine.error\";\nimport { A_StateMachineFeatures } from \"./A-StateMachine.constants\";\nimport { A_StateMachineTransition } from \"./A-StateMachineTransition.context\";\n\n/**\n * A_StateMachine is a powerful state machine implementation that allows you to define and manage\n * complex state transitions with validation, hooks, and error handling.\n * \n * @template T - A record type defining the state transitions and their associated data types.\n *               Each key represents a state name, and the value represents the data type for that state.\n * \n * @example\n * ```typescript\n * interface OrderStates {\n *   pending: { orderId: string };\n *   processing: { orderId: string; processedBy: string };\n *   completed: { orderId: string; completedAt: Date };\n *   cancelled: { orderId: string; reason: string };\n * }\n * \n * class OrderStateMachine extends A_StateMachine<OrderStates> {\n *   // Define custom transition logic\n *   async pending_processing(scope: A_Scope) {\n *     const operation = scope.resolve(A_StateMachineTransition)!;\n *     const { orderId } = operation.props;\n *     // Custom validation and business logic\n *   }\n * }\n * ```\n */\nexport class A_StateMachine<\n    T extends Record<string, any> = Record<string, any>\n> extends A_Component {\n\n    /**\n     * Internal promise that tracks the initialization state of the state machine.\n     * Used to ensure the state machine is properly initialized before allowing transitions.\n     */\n    protected _initialized?: Promise<void>;\n\n    /**\n     * Gets a promise that resolves when the state machine is fully initialized and ready for transitions.\n     * This ensures that all initialization hooks have been executed before allowing state transitions.\n     * \n     * @returns Promise<void> that resolves when initialization is complete\n     * \n     * @example\n     * ```typescript\n     * const stateMachine = new MyStateMachine();\n     * await stateMachine.ready; // Wait for initialization\n     * await stateMachine.transition('idle', 'running');\n     * ```\n     */\n    get ready(): Promise<void> {\n        if (!this._initialized) {\n            this._initialized = this.call(A_StateMachineFeatures.onInitialize);\n        }\n\n        return this._initialized;\n    }\n\n\n\n    /**\n     * Initialization hook that runs when the state machine is first created.\n     * This method can be extended to add custom initialization logic.\n     * \n     * @param args - Variable arguments passed during initialization\n     * @returns Promise<void>\n     * \n     * @example\n     * ```typescript\n     * class MyStateMachine extends A_StateMachine {\n     *   @A_Feature.Extend()\n     *   async [A_StateMachineFeatures.onInitialize]() {\n     *     // Custom initialization logic\n     *     console.log('State machine initialized');\n     *   }\n     * }\n     * ```\n     */\n    @A_Feature.Extend()\n    async [A_StateMachineFeatures.onInitialize](...args: any[]): Promise<void> {\n        // Initialization logic can be added here\n    }\n\n    /**\n     * Hook that runs before any state transition occurs.\n     * Use this to add validation, logging, or preparation logic that should run for all transitions.\n     * \n     * @param args - Variable arguments, typically includes the transition scope\n     * @returns Promise<void>\n     * \n     * @example\n     * ```typescript\n     * class MyStateMachine extends A_StateMachine {\n     *   @A_Feature.Extend()\n     *   async [A_StateMachineFeatures.onBeforeTransition](scope: A_Scope) {\n     *     const operation = scope.resolve(A_StateMachineTransition)!;\n     *     console.log(`Transitioning from ${operation.props.from} to ${operation.props.to}`);\n     *   }\n     * }\n     * ```\n     */\n    @A_Feature.Extend()\n    async [A_StateMachineFeatures.onBeforeTransition](...args: any[]): Promise<void> {\n\n    }\n\n    /**\n     * Hook that runs after a successful state transition.\n     * Use this to add cleanup, logging, or post-transition logic that should run for all transitions.\n     * \n     * @param args - Variable arguments, typically includes the transition scope\n     * @returns Promise<void>\n     * \n     * @example\n     * ```typescript\n     * class MyStateMachine extends A_StateMachine {\n     *   @A_Feature.Extend()\n     *   async [A_StateMachineFeatures.onAfterTransition](scope: A_Scope) {\n     *     const operation = scope.resolve(A_StateMachineTransition)!;\n     *     console.log(`Successfully transitioned to ${operation.props.to}`);\n     *   }\n     * }\n     * ```\n     */\n    @A_Feature.Extend()\n    async [A_StateMachineFeatures.onAfterTransition](...args: any[]): Promise<void> {\n\n    }\n\n    /**\n     * Error handling hook that runs when a transition fails.\n     * Use this to add custom error handling, logging, or recovery logic.\n     * \n     * @param args - Variable arguments, typically includes the error scope\n     * @returns Promise<void>\n     * \n     * @example\n     * ```typescript\n     * class MyStateMachine extends A_StateMachine {\n     *   @A_Feature.Extend()\n     *   async [A_StateMachineFeatures.onError](scope: A_Scope) {\n     *     const error = scope.resolve(A_StateMachineError);\n     *     console.error('Transition failed:', error?.message);\n     *   }\n     * }\n     * ```\n     */\n    @A_Feature.Extend()\n    async [A_StateMachineFeatures.onError](...args: any[]): Promise<void> {\n        // Default error handling logic can be added here\n    }\n\n\n\n    /**\n     * Executes a state transition from one state to another.\n     * This is the core method of the state machine that handles the complete transition lifecycle.\n     * \n     * @param from - The state to transition from (must be a key of T)\n     * @param to - The state to transition to (must be a key of T)\n     * @param props - Optional properties to pass to the transition context (should match T[keyof T])\n     * @returns Promise<void> that resolves when the transition is complete\n     * \n     * @throws {A_StateMachineError} When the transition fails for any reason\n     * \n     * @example\n     * ```typescript\n     * interface OrderStates {\n     *   pending: { orderId: string };\n     *   processing: { orderId: string; processedBy: string };\n     * }\n     * \n     * const orderMachine = new A_StateMachine<OrderStates>();\n     * \n     * // Transition with props\n     * await orderMachine.transition('pending', 'processing', {\n     *   orderId: '12345',\n     *   processedBy: 'user-456'\n     * });\n     * ```\n     * \n     * The transition process follows this lifecycle:\n     * 1. Wait for state machine initialization (ready)\n     * 2. Create transition name in camelCase format (e.g., \"pending_processing\")\n     * 3. Create operation context with transition data\n     * 4. Create isolated scope for the transition\n     * 5. Call onBeforeTransition hook\n     * 6. Execute the specific transition method (if defined)\n     * 7. Call onAfterTransition hook\n     * 8. Clean up scope and return result\n     * \n     * If any step fails, the onError hook is called and a wrapped error is thrown.\n     */\n    async transition(\n        /**\n         * The state to transition from\n         */\n        from: keyof T,\n        /**\n         * The state to transition to\n         */\n        to: keyof T,\n        /**\n         * Optional properties to pass to the transition context\n         */\n        props?: T[keyof T]\n    ): Promise<void> {\n\n        await this.ready;\n\n        const transitionName = `${A_FormatterHelper.toCamelCase(String(from))}_${A_FormatterHelper.toCamelCase(String(to))}`;\n\n        const transition = new A_StateMachineTransition({\n            from: String(from),\n            to: String(to),\n            props\n        });\n\n        const scope = new A_Scope({\n            name: `A-StateMachine-Transition-Scope-${transitionName}`,\n            fragments: [transition]\n        });\n\n        try {\n\n            await this.call(A_StateMachineFeatures.onBeforeTransition, scope);\n\n            await this.call(transitionName, scope);\n\n            await this.call(A_StateMachineFeatures.onAfterTransition, scope);\n\n            scope.destroy();\n\n            return transition.result;\n\n        } catch (error) {\n            const wrappedError = new A_StateMachineError({\n                title: A_StateMachineError.TransitionError,\n                description: `An error occurred while transitioning to \"${transitionName}\"`,\n                originalError: error\n            });\n\n            scope.register(wrappedError);\n\n            await this.call(A_StateMachineFeatures.onError, scope);\n\n            scope.destroy();\n\n            throw wrappedError;\n        }\n    }\n}\n\n\n","export const A_CONSTANTS__CONFIG_ENV_VARIABLES = {\n\n} as const\n\n\n//should be an array\nexport type A_TYPES__ConfigENVVariables = (typeof A_CONSTANTS__CONFIG_ENV_VARIABLES)[keyof typeof A_CONSTANTS__CONFIG_ENV_VARIABLES][];\n\n\nexport const A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY = [\n\n] as const;\n\n","import { A_CommonHelper, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_FormatterHelper, A_Fragment, A_TYPES__ConceptENVVariables } from \"@adaas/a-concept\";\nimport { A_TYPES__ConfigContainerConstructor } from \"./A-Config.types\";\nimport { A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY } from \"./A-Config.constants\";\n\n\nexport class A_Config<\n    T extends Array<string | A_TYPES__ConceptENVVariables[number]> = any[]\n> extends A_Fragment<{\n    [key in T[number]]: any\n}> {\n\n    config: A_TYPES__ConfigContainerConstructor<T>;\n\n\n    private VARIABLES: Map<T[number], any> = new Map<T[number], any>();\n\n    CONFIG_PROPERTIES!: T;\n\n    protected DEFAULT_ALLOWED_TO_READ_PROPERTIES = [\n        ...A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY,\n        ...A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY\n    ];\n\n\n    constructor(\n        config: Partial<A_TYPES__ConfigContainerConstructor<T>>\n    ) {\n        super({\n            name: 'A_Config'\n        });\n\n        this.config = A_CommonHelper.deepCloneAndMerge<A_TYPES__ConfigContainerConstructor<T>>(config as any, {\n            strict: false,\n            defaults: {},\n            variables: A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY as any as T\n        } as any);\n\n        this.CONFIG_PROPERTIES = this.config.variables ? this.config.variables : [] as any as T;\n\n        this.config.variables.forEach((variable) => {\n            this.VARIABLES.set(\n                A_FormatterHelper.toUpperSnakeCase(variable),\n                this.config.defaults[variable]\n            );\n        });\n    }\n\n\n    /** \n     * This method is used to get the configuration property by name\n     * \n     * @param property \n     * @returns \n     */\n    get<K extends T[number]>(\n        property: K | typeof this.DEFAULT_ALLOWED_TO_READ_PROPERTIES[number]\n    ): { [key in T[number]]: any; }[K] | undefined {\n        if (this.CONFIG_PROPERTIES.includes(property as any)\n            || this.DEFAULT_ALLOWED_TO_READ_PROPERTIES.includes(property as any)\n            || !(this.config.strict)\n        )\n            return this.VARIABLES.get(A_FormatterHelper.toUpperSnakeCase(property));\n\n        throw new Error('Property not exists or not allowed to read') as never;\n        // return this.concept.Errors.throw(A_SDK_CONSTANTS__ERROR_CODES.CONFIGURATION_PROPERTY_NOT_EXISTS_OR_NOT_ALLOWED_TO_READ) as never;\n\n    }\n\n\n    //  get<_OutType = any>(\n    //         property: T[number] | typeof this.DEFAULT_ALLOWED_TO_READ_PROPERTIES[number] | string\n    //     ): _OutType {\n    //         if (this.CONFIG_PROPERTIES.includes(property as any)\n    //             || this.DEFAULT_ALLOWED_TO_READ_PROPERTIES.includes(property as any)\n    //             || !(this.config.strict)\n    //         )\n    //             return this.VARIABLES.get(A_FormatterHelper.toUpperSnakeCase(property)) as _OutType;\n\n    //         throw new Error('Property not exists or not allowed to read') as never;\n    //         // return this.concept.Errors.throw(A_SDK_CONSTANTS__ERROR_CODES.CONFIGURATION_PROPERTY_NOT_EXISTS_OR_NOT_ALLOWED_TO_READ) as never;\n    //     }\n    /**\n     * \n     * This method is used to set the configuration property by name\n     * OR set multiple properties at once by passing an array of objects\n     * \n     * @param variables \n     */\n    set(\n        variables: Array<{\n            property: T[number] | A_TYPES__ConceptENVVariables[number],\n            value: any\n        }>\n    )\n    set(\n        variables: Partial<Record<T[number] | A_TYPES__ConceptENVVariables[number], any>>\n    )\n    set(\n        property: T[number] | A_TYPES__ConceptENVVariables[number],\n        value: any\n    )\n    set(\n        property: T[number] | A_TYPES__ConceptENVVariables[number] | Array<{\n            property: T[number] | A_TYPES__ConceptENVVariables[number],\n            value: any\n        }> | Partial<Record<T[number] | A_TYPES__ConceptENVVariables[number], any>>,\n        value?: any\n    ) {\n        const array = Array.isArray(property)\n            ? property\n            : typeof property === 'string'\n                ? [{ property, value }]\n                : Object\n                    .keys(property)\n                    .map((key) => ({\n                        property: key,\n                        value: property[key]\n                    }));\n\n        for (const { property, value } of array) {\n\n            let targetValue = value\n                ? value\n                : this.config?.defaults\n                    ? this.config.defaults[property as T[number]]\n                    : undefined;\n\n            this.VARIABLES.set(A_FormatterHelper.toUpperSnakeCase(property), targetValue);\n        }\n    }\n}","/**\n * A-Logger Constants\n * \n * Configuration constants and default values for the A_Logger component\n */\n\n/**\n * Default scope length for consistent message alignment\n */\nexport const A_LOGGER_DEFAULT_SCOPE_LENGTH = 20;\n\n/**\n * Default log level when none is specified\n */\nexport const A_LOGGER_DEFAULT_LEVEL = 'all';\n\n/**\n * Terminal color codes mapping\n */\nexport const A_LOGGER_COLORS = {\n    // System colors (reserved for specific purposes)\n    red: '31',          // Errors, critical issues\n    yellow: '33',       // Warnings, caution messages\n    green: '32',        // Success, completion messages\n    \n    // Safe palette for random selection (grey-blue-violet theme)\n    blue: '34',         // Info, general messages\n    cyan: '36',         // Headers, titles\n    magenta: '35',      // Special highlighting\n    gray: '90',         // Debug, less important info\n    brightBlue: '94',   // Bright blue variant\n    brightCyan: '96',   // Bright cyan variant\n    brightMagenta: '95', // Bright magenta variant\n    darkGray: '30',     // Dark gray\n    lightGray: '37',    // Light gray (white)\n    \n    // Extended blue-violet palette\n    indigo: '38;5;54',      // Deep indigo\n    violet: '38;5;93',      // Violet\n    purple: '38;5;129',     // Purple\n    lavender: '38;5;183',   // Lavender\n    skyBlue: '38;5;117',    // Sky blue\n    steelBlue: '38;5;67',   // Steel blue\n    slateBlue: '38;5;62',   // Slate blue\n    deepBlue: '38;5;18',    // Deep blue\n    lightBlue: '38;5;153',  // Light blue\n    periwinkle: '38;5;111', // Periwinkle\n    cornflower: '38;5;69',  // Cornflower blue\n    powder: '38;5;152',     // Powder blue\n    \n    // Additional grays for variety\n    charcoal: '38;5;236',   // Charcoal\n    silver: '38;5;250',     // Silver\n    smoke: '38;5;244',      // Smoke gray\n    slate: '38;5;240',      // Slate gray\n} as const;\n\n/**\n * Safe colors for random selection - grey-blue-violet palette\n * Excludes system colors (red, yellow, green) to avoid confusion with warnings/errors\n */\nexport const A_LOGGER_SAFE_RANDOM_COLORS = [\n    'blue', 'cyan', 'magenta', 'gray', 'brightBlue', 'brightCyan', 'brightMagenta',\n    'darkGray', 'lightGray', 'indigo', 'violet', 'purple', 'lavender', 'skyBlue',\n    'steelBlue', 'slateBlue', 'deepBlue', 'lightBlue', 'periwinkle', 'cornflower',\n    'powder', 'charcoal', 'silver', 'smoke', 'slate'\n] as const;\n\n/**\n * ANSI escape codes\n */\nexport const A_LOGGER_ANSI = {\n    RESET: '\\x1b[0m',\n    PREFIX: '\\x1b[',\n    SUFFIX: 'm'\n} as const;\n\n/**\n * Timestamp format configuration\n */\nexport const A_LOGGER_TIME_FORMAT = {\n    MINUTES_PAD: 2,\n    SECONDS_PAD: 2,\n    MILLISECONDS_PAD: 3,\n    SEPARATOR: ':'\n} as const;\n\n/**\n * Log message structure constants\n */\nexport const A_LOGGER_FORMAT = {\n    SCOPE_OPEN: '[',\n    SCOPE_CLOSE: ']',\n    TIME_OPEN: '|',\n    TIME_CLOSE: '|',\n    SEPARATOR: '-------------------------------',\n    INDENT_BASE: 3,\n    PIPE: '| '\n} as const;\n\n/**\n * Environment variable keys\n */\nexport const A_LOGGER_ENV_KEYS = {\n    LOG_LEVEL: 'A_LOGGER_LEVEL',\n    DEFAULT_SCOPE_LENGTH: 'A_LOGGER_DEFAULT_SCOPE_LENGTH',\n    DEFAULT_SCOPE_COLOR: 'A_LOGGER_DEFAULT_SCOPE_COLOR',\n    DEFAULT_LOG_COLOR: 'A_LOGGER_DEFAULT_LOG_COLOR'\n} as const;","import { A_Component, A_Error, A_Inject, A_Scope } from \"@adaas/a-concept\";\nimport { A_Config } from \"../A-Config/A-Config.context\";\nimport { A_LoggerEnvVariablesType } from \"./A-Logger.env\";\nimport { A_LoggerLevel } from \"./A-Logger.types\";\nimport {\n    A_LOGGER_DEFAULT_SCOPE_LENGTH,\n    A_LOGGER_COLORS,\n    A_LOGGER_ANSI,\n    A_LOGGER_TIME_FORMAT,\n    A_LOGGER_FORMAT,\n    A_LOGGER_ENV_KEYS,\n    A_LOGGER_SAFE_RANDOM_COLORS\n} from \"./A-Logger.constants\";\n\n/**\n * A_Logger - Advanced Logging Component with Scope-based Output Formatting\n * \n * This component provides comprehensive logging capabilities with:\n * - Color-coded console output for different log levels\n * - Scope-based message formatting with consistent alignment\n * - Support for multiple data types (objects, errors, strings)\n * - Configurable log levels for filtering output\n * - Special handling for A_Error and native Error objects\n * - Timestamp inclusion for better debugging\n * \n * Key Features:\n * - **Scope Integration**: Uses A_Scope for consistent message prefixing\n * - **Color Support**: Terminal color codes for visual distinction\n * - **Object Formatting**: Pretty-prints JSON objects with proper indentation\n * - **Error Handling**: Special formatting for A_Error and Error objects\n * - **Log Level Filtering**: Configurable filtering based on severity\n * - **Multi-line Support**: Proper alignment for multi-line messages\n * \n * @example\n * ```typescript\n * // Basic usage with dependency injection (uses deterministic colors based on scope name)\n * class MyService {\n *   constructor(@A_Inject(A_Logger) private logger: A_Logger) {}\n *   \n *   doSomething() {\n *     this.logger.info('Processing started'); // Uses scope-name-based colors, always shows\n *     this.logger.debug('Debug information'); // Only shows when debug level enabled\n *     this.logger.info('green', 'Custom message color'); // Green message, scope stays default\n *     this.logger.warning('Something might be wrong');\n *     this.logger.error(new Error('Something failed'));\n *   }\n * }\n * \n * // Same scope names will always get the same colors automatically\n * const logger1 = new A_Logger(new A_Scope({name: 'UserService'})); // Gets consistent colors\n * const logger2 = new A_Logger(new A_Scope({name: 'UserService'})); // Gets same colors as logger1\n * \n * // Configuration via environment variables or A_Config (overrides automatic selection)\n * process.env.A_LOGGER_DEFAULT_SCOPE_COLOR = 'magenta';\n * process.env.A_LOGGER_DEFAULT_LOG_COLOR = 'green';\n * \n * // Or through A_Config instance\n * const config = new A_Config({\n *   A_LOGGER_DEFAULT_SCOPE_COLOR: 'red',\n *   A_LOGGER_DEFAULT_LOG_COLOR: 'white'\n * });\n * const logger = new A_Logger(scope, config);\n * ```\n */\nexport class A_Logger extends A_Component {\n\n    // =============================================\n    // Configuration and Constants\n    // =============================================\n\n    /**\n     * Terminal color codes for different log levels and custom styling\n     * These codes work with ANSI escape sequences for colored terminal output\n     */\n    readonly COLORS;\n\n    /**\n     * Standard scope length for consistent formatting\n     * This ensures all log messages align properly regardless of scope name length\n     */\n    private readonly STANDARD_SCOPE_LENGTH;\n\n    /**\n     * Default color for the scope portion of log messages\n     * This color is used for the scope brackets and content, and remains consistent\n     * for this logger instance regardless of message color overrides\n     */\n    private readonly DEFAULT_SCOPE_COLOR: keyof typeof A_LOGGER_COLORS;\n\n    /**\n     * Default color for log message content when no explicit color is provided\n     * This color is used for the message body when logging without specifying a color\n     */\n    private readonly DEFAULT_LOG_COLOR: keyof typeof A_LOGGER_COLORS;\n\n    // =============================================\n    // Constructor and Initialization\n    // =============================================\n\n    /**\n     * Initialize A_Logger with dependency injection\n     * Colors are configured through A_Config or generated randomly if not provided\n     * \n     * @param scope - The current scope context for message prefixing\n     * @param config - Optional configuration for log level filtering and color settings\n     */\n    constructor(\n        @A_Inject(A_Scope) protected scope: A_Scope,\n        @A_Inject(A_Config) protected config?: A_Config<A_LoggerEnvVariablesType>\n    ) {\n        super();\n        this.COLORS = A_LOGGER_COLORS;\n        this.STANDARD_SCOPE_LENGTH = config?.get(A_LOGGER_ENV_KEYS.DEFAULT_SCOPE_LENGTH) || A_LOGGER_DEFAULT_SCOPE_LENGTH;\n        \n        // Get colors from config or generate deterministic colors based on scope name\n        const configScopeColor = config?.get(A_LOGGER_ENV_KEYS.DEFAULT_SCOPE_COLOR) as keyof typeof A_LOGGER_COLORS;\n        const configLogColor = config?.get(A_LOGGER_ENV_KEYS.DEFAULT_LOG_COLOR) as keyof typeof A_LOGGER_COLORS;\n        \n        if (configScopeColor || configLogColor) {\n            // If any color is configured, use config values or fallback to scope-based selection\n            this.DEFAULT_SCOPE_COLOR = configScopeColor || this.generateColorFromScopeName(this.scope.name);\n            this.DEFAULT_LOG_COLOR = configLogColor || this.generateColorFromScopeName(this.scope.name );\n        } else {\n            // If no colors configured, generate complementary pair based on scope name\n            const complementaryColors = this.generateComplementaryColorsFromScope(this.scope.name);\n            this.DEFAULT_SCOPE_COLOR = complementaryColors.scopeColor;\n            this.DEFAULT_LOG_COLOR = complementaryColors.logColor;\n        }\n    }\n\n    // =============================================\n    // Color Generation Utilities\n    // =============================================\n\n    /**\n     * Generate a simple hash from a string\n     * Used to create deterministic color selection based on scope name\n     * \n     * @param str - The string to hash\n     * @returns A numeric hash value\n     */\n    private simpleHash(str: string): number {\n        let hash = 0;\n        for (let i = 0; i < str.length; i++) {\n            const char = str.charCodeAt(i);\n            hash = ((hash << 5) - hash) + char;\n            hash = hash & hash; // Convert to 32-bit integer\n        }\n        return Math.abs(hash);\n    }\n\n    /**\n     * Generate a deterministic color based on scope name\n     * Same scope names will always get the same color, but uses safe color palette\n     * \n     * @param scopeName - The scope name to generate color for\n     * @returns A color key from the safe colors palette\n     */\n    private generateColorFromScopeName(scopeName: string): keyof typeof A_LOGGER_COLORS {\n        const safeColors = A_LOGGER_SAFE_RANDOM_COLORS;\n        const hash = this.simpleHash(scopeName);\n        const colorIndex = hash % safeColors.length;\n        return safeColors[colorIndex];\n    }\n\n    /**\n     * Generate a pair of complementary colors based on scope name\n     * Ensures visual harmony between scope and message colors while being deterministic\n     * \n     * @param scopeName - The scope name to base colors on\n     * @returns Object with scopeColor and logColor that work well together\n     */\n    private generateComplementaryColorsFromScope(scopeName: string): { scopeColor: keyof typeof A_LOGGER_COLORS, logColor: keyof typeof A_LOGGER_COLORS } {\n        // Define color groups that work well together\n        const colorPairs = [\n            { scopeColor: 'indigo' as const, logColor: 'lightBlue' as const },\n            { scopeColor: 'deepBlue' as const, logColor: 'cyan' as const },\n            { scopeColor: 'purple' as const, logColor: 'lavender' as const },\n            { scopeColor: 'steelBlue' as const, logColor: 'skyBlue' as const },\n            { scopeColor: 'slateBlue' as const, logColor: 'periwinkle' as const },\n            { scopeColor: 'charcoal' as const, logColor: 'silver' as const },\n            { scopeColor: 'violet' as const, logColor: 'brightMagenta' as const },\n            { scopeColor: 'darkGray' as const, logColor: 'lightGray' as const },\n            { scopeColor: 'cornflower' as const, logColor: 'powder' as const },\n            { scopeColor: 'slate' as const, logColor: 'smoke' as const },\n        ];\n        \n        const hash = this.simpleHash(scopeName);\n        const pairIndex = hash % colorPairs.length;\n        return colorPairs[pairIndex];\n    }\n\n    // =============================================\n    // Factory Methods\n    // =============================================\n\n\n\n    // =============================================\n    // Scope and Formatting Utilities\n    // =============================================\n\n    /**\n     * Get the formatted scope length for consistent message alignment\n     * Uses a standard length to ensure all messages align properly regardless of scope name\n     * \n     * @returns The scope length to use for padding calculations\n     */\n    get scopeLength(): number {\n        return Math.max(this.scope.name.length, this.STANDARD_SCOPE_LENGTH);\n    }\n\n    /**\n     * Get the formatted scope name with proper padding, centered within the container\n     * Ensures consistent width for all scope names in log output with centered alignment\n     * \n     * @returns Centered and padded scope name for consistent formatting\n     */\n    get formattedScope(): string {\n        const scopeName = this.scope.name;\n        const totalLength = this.STANDARD_SCOPE_LENGTH;\n        \n        // If scope name is longer than standard length, truncate it\n        if (scopeName.length >= totalLength) {\n            return scopeName.substring(0, totalLength);\n        }\n        \n        // Calculate padding for centering\n        const totalPadding = totalLength - scopeName.length;\n        const leftPadding = Math.floor(totalPadding / 2);\n        const rightPadding = totalPadding - leftPadding;\n        \n        return ' '.repeat(leftPadding) + scopeName + ' '.repeat(rightPadding);\n    }\n\n\n    // =============================================\n    // Message Compilation and Formatting\n    // =============================================\n\n    /**\n     * Compile log arguments into formatted console output with colors and proper alignment\n     * \n     * This method handles the core formatting logic for all log messages:\n     * - Applies separate colors for scope and message content\n     * - Formats scope names with consistent padding\n     * - Handles different data types appropriately\n     * - Maintains proper indentation for multi-line content\n     * \n     * @param messageColor - The color key to apply to the message content\n     * @param args - Variable arguments to format and display\n     * @returns Array of formatted strings ready for console output\n     */\n    compile(\n        messageColor: keyof typeof this.COLORS,\n        ...args: any[]\n    ): Array<string> {\n        const timeString = this.getTime();\n        const scopePadding = ' '.repeat(this.scopeLength + 3);\n        const isMultiArg = args.length > 1;\n\n        return [\n            // Header with separate colors for scope and message content\n            `${A_LOGGER_ANSI.PREFIX}${this.COLORS[this.DEFAULT_SCOPE_COLOR]}${A_LOGGER_ANSI.SUFFIX}${A_LOGGER_FORMAT.SCOPE_OPEN}${this.formattedScope}${A_LOGGER_FORMAT.SCOPE_CLOSE}${A_LOGGER_ANSI.RESET} ${A_LOGGER_ANSI.PREFIX}${this.COLORS[messageColor]}${A_LOGGER_ANSI.SUFFIX}${A_LOGGER_FORMAT.TIME_OPEN}${timeString}${A_LOGGER_FORMAT.TIME_CLOSE}`,\n\n            // Top separator for multi-argument messages\n            isMultiArg ? '\\n' + `${scopePadding}${A_LOGGER_FORMAT.TIME_OPEN}${A_LOGGER_FORMAT.SEPARATOR}` : '',\n\n            // Process each argument with appropriate formatting\n            ...args.map((arg, i) => {\n                const shouldAddNewline = i > 0 || isMultiArg;\n\n                switch (true) {\n                    case arg instanceof A_Error:\n                        return this.compile_A_Error(arg);\n\n                    case arg instanceof Error:\n                        return this.compile_Error(arg);\n\n                    case typeof arg === 'object' && arg !== null:\n                        return this.formatObject(arg, shouldAddNewline, scopePadding);\n\n                    default:\n                        return this.formatString(String(arg), shouldAddNewline, scopePadding);\n                }\n            }),\n\n            // Bottom separator and color reset\n            isMultiArg\n                ? '\\n' + `${scopePadding}${A_LOGGER_FORMAT.TIME_OPEN}${A_LOGGER_FORMAT.SEPARATOR}${A_LOGGER_ANSI.RESET}`\n                : A_LOGGER_ANSI.RESET\n        ];\n    }\n\n    /**\n     * Format an object for display with proper JSON indentation\n     * \n     * @param obj - The object to format\n     * @param shouldAddNewline - Whether to add a newline prefix\n     * @param scopePadding - The padding string for consistent alignment\n     * @returns Formatted object string\n     */\n    private formatObject(obj: any, shouldAddNewline: boolean, scopePadding: string): string {\n        let jsonString: string;\n        try {\n            jsonString = JSON.stringify(obj, null, 2);\n        } catch (error) {\n            // Handle circular references\n            const seen = new WeakSet();\n            jsonString = JSON.stringify(obj, (key, value) => {\n                if (typeof value === 'object' && value !== null) {\n                    if (seen.has(value)) {\n                        return '[Circular Reference]';\n                    }\n                    seen.add(value);\n                }\n                return value;\n            }, 2);\n        }\n        const formatted = jsonString.replace(/\\n/g, '\\n' + `${scopePadding}${A_LOGGER_FORMAT.PIPE}`);\n        return shouldAddNewline ? '\\n' + `${scopePadding}${A_LOGGER_FORMAT.PIPE}` + formatted : formatted;\n    }\n\n    /**\n     * Format a string for display with proper indentation\n     * \n     * @param str - The string to format\n     * @param shouldAddNewline - Whether to add a newline prefix\n     * @param scopePadding - The padding string for consistent alignment\n     * @returns Formatted string\n     */\n    private formatString(str: string, shouldAddNewline: boolean, scopePadding: string): string {\n        const prefix = shouldAddNewline ? '\\n' : '';\n        return (prefix + str).replace(/\\n/g, '\\n' + `${scopePadding}${A_LOGGER_FORMAT.PIPE}`);\n    }\n\n    // =============================================\n    // Log Level Management\n    // =============================================\n\n    /**\n     * Determine if a log message should be output based on configured log level\n     * \n     * Log level hierarchy:\n     * - debug: Shows all messages (debug, info, warning, error)\n     * - info: Shows info, warning, and error messages\n     * - warn: Shows warning and error messages only\n     * - error: Shows error messages only\n     * - all: Shows all messages (alias for debug)\n     * \n     * @param logMethod - The type of log method being called\n     * @returns True if the message should be logged, false otherwise\n     */\n    protected shouldLog(logMethod: 'debug' | 'info' | 'warning' | 'error'): boolean {\n        const shouldLog: A_LoggerLevel = this.config?.get(A_LOGGER_ENV_KEYS.LOG_LEVEL) || 'info';\n\n        switch (shouldLog) {\n            case 'debug':\n                return true;\n            case 'info':\n                return logMethod === 'info' || logMethod === 'warning' || logMethod === 'error';\n            case 'warn':\n                return logMethod === 'warning' || logMethod === 'error';\n            case 'error':\n                return logMethod === 'error';\n            case 'all':\n                return true;\n            default:\n                return false;\n        }\n    }\n\n\n    // =============================================\n    // Public Logging Methods\n    // =============================================\n\n    /**\n     * Debug logging method with optional color specification\n     * Only logs when debug level is enabled\n     * \n     * Supports two usage patterns:\n     * 1. debug(message, ...args) - Uses instance's default log color\n     * 2. debug(color, message, ...args) - Uses specified color for message content only\n     * \n     * Note: The scope color always remains the instance's default scope color,\n     * only the message content color changes when explicitly specified.\n     * \n     * @param color - Optional color key or the first message argument\n     * @param args - Additional arguments to log\n     * \n     * @example\n     * ```typescript\n     * logger.debug('Debug information'); // Uses instance default colors\n     * logger.debug('gray', 'Debug message'); // Gray message, scope stays instance color\n     * logger.debug('Processing user:', { id: 1, name: 'John' });\n     * ```\n     */\n    debug(color: keyof typeof this.COLORS, ...args: any[]): void;\n    debug(...args: any[]): void;\n    debug(param1: any, ...args: any[]): void {\n        if (!this.shouldLog('debug')) return;\n\n        // Check if first parameter is a valid color key\n        if (typeof param1 === 'string' && this.COLORS[param1 as keyof typeof this.COLORS]) {\n            console.log(...this.compile(param1 as keyof typeof this.COLORS, ...args));\n        } else {\n            // Use instance's default log color and treat param1 as first message argument\n            console.log(...this.compile(this.DEFAULT_LOG_COLOR, param1, ...args));\n        }\n    }\n\n    /**\n     * Info logging method with optional color specification\n     * Logs without any restrictions (always shows regardless of log level)\n     * \n     * Supports two usage patterns:\n     * 1. info(message, ...args) - Uses instance's default log color\n     * 2. info(color, message, ...args) - Uses specified color for message content only\n     * \n     * Note: The scope color always remains the instance's default scope color,\n     * only the message content color changes when explicitly specified.\n     * \n     * @param color - Optional color key or the first message argument\n     * @param args - Additional arguments to log\n     * \n     * @example\n     * ```typescript\n     * logger.info('Hello World'); // Uses instance default colors\n     * logger.info('green', 'Success message'); // Green message, scope stays instance color\n     * logger.info('Processing user:', { id: 1, name: 'John' });\n     * ```\n     */\n    info(color: keyof typeof this.COLORS, ...args: any[]): void;\n    info(...args: any[]): void;\n    info(param1: any, ...args: any[]): void {\n        if (!this.shouldLog('info')) return;\n\n        // Check if first parameter is a valid color key\n        if (typeof param1 === 'string' && this.COLORS[param1 as keyof typeof this.COLORS]) {\n            console.log(...this.compile(param1 as keyof typeof this.COLORS, ...args));\n        } else {\n            // Use instance's default log color and treat param1 as first message argument\n            console.log(...this.compile(this.DEFAULT_LOG_COLOR, param1, ...args));\n        }\n    }\n\n    /**\n     * Legacy log method (kept for backward compatibility)\n     * @deprecated Use info() method instead\n     * \n     * @param color - Optional color key or the first message argument\n     * @param args - Additional arguments to log\n     */\n    log(color: keyof typeof this.COLORS, ...args: any[]): void;\n    log(...args: any[]): void;\n    log(param1: any, ...args: any[]): void {\n        // Delegate to info method for backward compatibility\n        this.info(param1, ...args);\n    }\n\n    /**\n     * Log warning messages with yellow color coding\n     * \n     * Use for non-critical issues that should be brought to attention\n     * but don't prevent normal operation\n     * \n     * @param args - Arguments to log as warnings\n     * \n     * @example\n     * ```typescript\n     * logger.warning('Deprecated method used');\n     * logger.warning('Rate limit approaching:', { current: 95, limit: 100 });\n     * ```\n     */\n    warning(...args: any[]): void {\n        if (!this.shouldLog('warning')) return;\n        console.log(...this.compile('yellow', ...args));\n    }\n\n    /**\n     * Log error messages with red color coding\n     * \n     * Use for critical issues, exceptions, and failures that need immediate attention\n     * \n     * @param args - Arguments to log as errors\n     * @returns void (for compatibility with console.log)\n     * \n     * @example\n     * ```typescript\n     * logger.error('Database connection failed');\n     * logger.error(new Error('Validation failed'));\n     * logger.error('Critical error:', error, { context: 'user-registration' });\n     * ```\n     */\n    error(...args: any[]): void {\n        if (!this.shouldLog('error')) return;\n        console.log(...this.compile('red', ...args));\n    }\n\n    // =============================================\n    // Specialized Error Formatting\n    // =============================================\n\n    /**\n     * Legacy method for A_Error logging (kept for backward compatibility)\n     * \n     * @deprecated Use error() method instead which handles A_Error automatically\n     * @param error - The A_Error instance to log\n     */\n    protected log_A_Error(error: A_Error): void {\n        const time = this.getTime();\n        const scopePadding = ' '.repeat(this.scopeLength + 3);\n\n        console.log(`\\x1b[31m[${this.formattedScope}] |${time}| ERROR ${error.code}\n${scopePadding}| ${error.message}\n${scopePadding}| ${error.description} \n${scopePadding}|-------------------------------\n${scopePadding}| ${error.stack?.split('\\n').map((line, index) => index === 0 ? line : `${scopePadding}| ${line}`).join('\\n') || 'No stack trace'}\n${scopePadding}|-------------------------------\n\\x1b[0m`\n            + (error.originalError ? `\\x1b[31m${scopePadding}| Wrapped From  ${error.originalError.message}\n${scopePadding}|-------------------------------\n${scopePadding}| ${error.originalError.stack?.split('\\n').map((line, index) => index === 0 ? line : `${scopePadding}| ${line}`).join('\\n') || 'No stack trace'}\n${scopePadding}|-------------------------------\n\\x1b[0m`: '')\n            + (error.link ? `\\x1b[31m${scopePadding}| Read in docs: ${error.link}\n${scopePadding}|-------------------------------\n\\x1b[0m`: ''));\n    }\n\n    /**\n     * Format A_Error instances for inline display within compiled messages\n     * \n     * Provides detailed formatting for A_Error objects including:\n     * - Error code and message\n     * - Description and stack trace\n     * - Original error information (if wrapped)\n     * - Documentation links (if available)\n     * \n     * @param error - The A_Error instance to format\n     * @returns Formatted string ready for display\n     */\n    protected compile_A_Error(error: A_Error): string {\n        const scopePadding = ' '.repeat(this.scopeLength + 3);\n\n        return '\\n' +\n            `${scopePadding}|-------------------------------` +\n            '\\n' +\n            `${scopePadding}|  Error:  | ${error.code}\n${scopePadding}|-------------------------------\n${scopePadding}|${' '.repeat(10)}| ${error.message}\n${scopePadding}|${' '.repeat(10)}| ${error.description} \n${scopePadding}|-------------------------------\n${scopePadding}| ${error.stack?.split('\\n').map((line, index) => index === 0 ? line : `${scopePadding}| ${line}`).join('\\n') || 'No stack trace'}\n${scopePadding}|-------------------------------`\n            +\n            (error.originalError ? `${scopePadding}| Wrapped From  ${error.originalError.message}\n${scopePadding}|-------------------------------\n${scopePadding}| ${error.originalError.stack?.split('\\n').map((line, index) => index === 0 ? line : `${scopePadding}| ${line}`).join('\\n') || 'No stack trace'}\n${scopePadding}|-------------------------------` : '')\n            +\n            (error.link ? `${scopePadding}| Read in docs: ${error.link}\n${scopePadding}|-------------------------------` : '');\n    }\n\n    /**\n     * Format standard Error instances for inline display within compiled messages\n     * \n     * Converts standard JavaScript Error objects into a readable JSON format\n     * with proper indentation and stack trace formatting\n     * \n     * @param error - The Error instance to format\n     * @returns Formatted string ready for display\n     */\n    protected compile_Error(error: Error): string {\n        const scopePadding = ' '.repeat(this.scopeLength + 3);\n\n        return JSON.stringify({\n            name: error.name,\n            message: error.message,\n            stack: error.stack?.split('\\n')\n                .map((line, index) => index === 0 ? line : `${scopePadding}| ${line}`)\n                .join('\\n')\n        }, null, 2)\n            .replace(/\\n/g, '\\n' + `${scopePadding}| `)\n            .replace(/\\\\n/g, '\\n');\n    }\n\n    // =============================================\n    // Utility Methods\n    // =============================================\n\n    /**\n     * Generate timestamp string for log messages\n     * \n     * Format: MM:SS:mmm (minutes:seconds:milliseconds)\n     * This provides sufficient precision for debugging while remaining readable\n     * \n     * @returns Formatted timestamp string\n     * \n     * @example\n     * Returns: \"15:42:137\" for 3:42:15 PM and 137 milliseconds\n     */\n    protected getTime(): string {\n        const now = new Date();\n        const minutes = String(now.getMinutes()).padStart(A_LOGGER_TIME_FORMAT.MINUTES_PAD, '0');\n        const seconds = String(now.getSeconds()).padStart(A_LOGGER_TIME_FORMAT.SECONDS_PAD, '0');\n        const milliseconds = String(now.getMilliseconds()).padStart(A_LOGGER_TIME_FORMAT.MILLISECONDS_PAD, '0');\n        return `${minutes}${A_LOGGER_TIME_FORMAT.SEPARATOR}${seconds}${A_LOGGER_TIME_FORMAT.SEPARATOR}${milliseconds}`;\n    }\n}","import {\n    A_TYPES__Command_Init,\n    A_TYPES__Command_Listener,\n    A_TYPES__Command_Serialized\n} from \"./A-Command.types\";\nimport {\n    A_CommandFeatures,\n    A_Command_Event,\n    A_Command_Status,\n    A_CommandTransitions\n} from \"./A-Command.constants\";\nimport { A_Caller, A_Context, A_Dependency, A_Entity, A_Error, A_Feature, A_Inject, A_Scope } from \"@adaas/a-concept\";\nimport { A_CommandError } from \"./A-Command.error\";\nimport { A_OperationContext } from \"../A-Operation/A-Operation.context\";\nimport { A_StateMachine } from \"../A-StateMachine/A-StateMachine.component\";\nimport { A_StateMachineFeatures } from \"../A-StateMachine/A-StateMachine.constants\";\nimport { A_Logger } from \"../A-Logger/A-Logger.component\";\nimport { A_StateMachineTransition } from \"../A-StateMachine/A-StateMachineTransition.context\";\n\n/**\n * A_Command - Advanced Command Pattern Implementation\n * \n * A comprehensive command pattern implementation that encapsulates business logic\n * as executable commands with full lifecycle management, event handling, and \n * state persistence capabilities.\n * \n * ## Key Features\n * - **Structured Lifecycle**: Automatic progression through init → compile → execute → complete/fail\n * - **Event-Driven**: Subscribe to lifecycle events and emit custom events\n * - **State Persistence**: Full serialization/deserialization for cross-service communication\n * - **Type Safety**: Generic types for parameters, results, and custom events\n * - **Dependency Injection**: Integrated with A-Concept's DI system\n * - **Error Management**: Comprehensive error capture and handling\n * - **Execution Tracking**: Built-in timing and performance metrics\n * \n * ## Lifecycle Phases\n * 1. **CREATED** - Command instantiated but not initialized\n * 2. **INITIALIZED** - Execution scope and dependencies set up\n * 3. **COMPILED** - Ready for execution with all resources prepared\n * 4. **EXECUTING** - Currently running business logic\n * 5. **COMPLETED** - Successfully finished execution\n * 6. **FAILED** - Execution failed with errors captured\n * \n * @template InvokeType - Type definition for command parameters\n * @template ResultType - Type definition for command execution result\n * @template LifecycleEvents - Union type of custom lifecycle event names\n * \n * @example\n * ```typescript\n * // Define parameter and result types\n * interface UserCreateParams {\n *   name: string;\n *   email: string;\n *   role: 'admin' | 'user';\n * }\n * \n * interface UserCreateResult {\n *   userId: string;\n *   success: boolean;\n * }\n * \n * // Create custom command\n * class CreateUserCommand extends A_Command<UserCreateParams, UserCreateResult> {}\n * \n * // Execute command\n * const command = new CreateUserCommand({\n *   name: 'John Doe',\n *   email: 'john@example.com',\n *   role: 'user'\n * });\n * \n * scope.register(command);\n * await command.execute();\n * \n * console.log('Result:', command.result);\n * console.log('Status:', command.status);\n * ```\n */\nexport class A_Command<\n    InvokeType extends A_TYPES__Command_Init = A_TYPES__Command_Init,\n    ResultType extends Record<string, any> = Record<string, any>,\n    LifecycleEvents extends string | A_Command_Event = A_Command_Event,\n> extends A_Entity<InvokeType, A_TYPES__Command_Serialized<InvokeType, ResultType>> {\n\n    // ====================================================================\n    // ================== Static Command Information ======================\n    // ====================================================================\n\n    /**\n     * Static command identifier derived from the class name\n     * Used for command registration and serialization\n     */\n    static get code(): string {\n        return super.entity;\n    }\n\n    // ====================================================================\n    // ================== Instance Properties =============================\n    // ====================================================================\n\n    /** The origin of the command, used to know has it been created from serialization or invoked */\n    protected _origin!: 'invoked' | 'serialized';\n\n    /** Command execution scope for dependency injection and feature resolution */\n    protected _executionScope!: A_Scope;\n\n    /** Result data produced by successful command execution */\n    protected _result?: ResultType;\n\n    /** Set of errors that occurred during command execution */\n    protected _error!: A_Error;\n\n    /** Command initialization parameters */\n    protected _params!: InvokeType;\n\n    /** Current lifecycle status of the command */\n    protected _status!: A_Command_Status\n\n    /** Map of event listeners organized by event name */\n    protected _listeners: Map<\n        LifecycleEvents | A_Command_Event,\n        Set<A_TYPES__Command_Listener<InvokeType, ResultType, LifecycleEvents>>\n    > = new Map();\n\n    /** Timestamp when command execution started */\n    protected _startTime?: Date;\n\n    /** Timestamp when command execution ended */\n    protected _endTime?: Date;\n\n    /** Timestamp when command was created */\n    protected _createdAt!: Date;\n\n\n    // ====================================================================\n    // ================== Public Getter Properties =======================\n    // ====================================================================\n\n    /**\n     * Total execution duration in milliseconds\n     * \n     * - If completed/failed: Returns total time from start to end\n     * - If currently executing: Returns elapsed time since start\n     * - If not started: Returns undefined\n     */\n    get duration(): number | undefined {\n        return this._endTime && this._startTime\n            ? this._endTime.getTime() - this._startTime.getTime()\n            : this._startTime\n                ? new Date().getTime() - this._startTime.getTime()\n                : undefined;\n    }\n\n    /**\n     * Idle time before execution started in milliseconds\n     * \n     * Time between command creation and execution start.\n     * Useful for monitoring command queue performance.\n     */\n    get idleTime(): number | undefined {\n        return this._startTime && this._createdAt\n            ? this._startTime.getTime() - this._createdAt.getTime()\n            : undefined;\n    }\n\n    /**\n     * Command execution scope for dependency injection\n     * \n     * Provides access to components, services, and shared resources\n     * during command execution. Inherits from the scope where the\n     * command was registered.\n     */\n    get scope(): A_Scope {\n        return this._executionScope;\n    }\n\n    /**\n     * Unique command type identifier\n     * \n     * Derived from the class name and used for:\n     * - Command registration and resolution\n     * - Serialization and deserialization\n     * - Logging and debugging\n     * \n     * @example 'create-user-command', 'process-order-command'\n     */\n    get code(): string {\n        return (this.constructor as typeof A_Command).code;\n    }\n    /**\n     * Current lifecycle status of the command\n     * \n     * Indicates the current phase in the command execution lifecycle.\n     * Used to track progress and determine available operations.\n     */\n    get status(): A_Command_Status {\n        return this._status;\n    }\n\n    /**\n     * Timestamp when the command was created\n     * \n     * Marks the initial instantiation time, useful for tracking\n     * command age and queue performance metrics.\n     */\n    get createdAt(): Date {\n        return this._createdAt!;\n    }\n\n    /**\n     * Timestamp when command execution started\n     * \n     * Undefined until execution begins. Used for calculating\n     * execution duration and idle time.\n     */\n    get startedAt(): Date | undefined {\n        return this._startTime;\n    }\n\n    /**\n     * Timestamp when command execution ended\n     * \n     * Set when command reaches COMPLETED or FAILED status.\n     * Used for calculating total execution duration.\n     */\n    get endedAt(): Date | undefined {\n        return this._endTime;\n    }\n\n    /**\n     * Result data produced by command execution\n     * \n     * Contains the output data from successful command execution.\n     * Undefined until command completes successfully.\n     */\n    get result(): ResultType | undefined {\n        return this._result;\n    }\n\n    /**\n     * Array of errors that occurred during execution\n     * \n     * Automatically wraps native errors in A_Error instances\n     * for consistent error handling. Empty array if no errors occurred.\n     */\n    get error(): A_Error | undefined {\n        return this._error;\n    }\n\n    /**\n     * Command initialization parameters\n     * \n     * Contains the input data used to create and configure the command.\n     * These parameters are immutable during command execution.\n                    return new A_Error(err);\n                }\n            });\n    }\n\n    /**\n     * Command initialization parameters\n     * \n     * Contains the input data used to create and configure the command.\n     * These parameters are immutable during command execution.\n     */\n    get params(): InvokeType {\n        return this._params;\n    }\n\n    /**\n     * Indicates if the command has been processed (completed or failed)\n     * \n     * Returns true if the command has completed or failed, false otherwise.\n     */\n    get isProcessed(): boolean {\n        return this._status === A_Command_Status.COMPLETED\n            || this._status === A_Command_Status.FAILED;\n    }\n\n    /**\n     * \n     * A-Command represents an executable command with a specific code and parameters.\n     * It can be executed within a given scope and stores execution results and errors.\n     * \n     * \n     * A-Command should be context independent and execution logic should be based on attached components \n     * \n     * @param code \n     * @param params \n     */\n    constructor(\n        /**\n         * Command invocation parameters\n         */\n        params: InvokeType | A_TYPES__Command_Serialized<InvokeType, ResultType> | string,\n    ) {\n        super(params as any);\n    }\n\n    // --------------------------------------------------------------------------\n    // A-StateMachine Feature Extensions\n    // --------------------------------------------------------------------------\n    @A_Feature.Extend()\n    protected async [A_StateMachineFeatures.onBeforeTransition](\n        @A_Inject(A_StateMachineTransition) transition: A_StateMachineTransition,\n        @A_Inject(A_Logger) logger?: A_Logger,\n        ...args: any[]\n    ) {\n        this.checkScopeInheritance();\n\n        //  and register all allowed status transitions\n        //  switch across allowed transitions, if not allowed throw an error\n        logger?.debug('yellow', `Command ${this.aseid.toString()} transitioning from ${transition.from} to ${transition.to}`);\n    }\n\n    @A_Feature.Extend()\n    protected async [A_CommandTransitions.CREATED_TO_INITIALIZED](\n        @A_Inject(A_StateMachineTransition) transition: A_StateMachineTransition,\n        ...args: any[]\n    ): Promise<void> {\n        if (this._status !== A_Command_Status.CREATED) {\n            return;\n        }\n\n        this._createdAt = new Date();\n        this._status = A_Command_Status.INITIALIZED;\n\n        this.emit(A_CommandFeatures.onInit);\n    }\n\n    @A_Feature.Extend()\n    protected async [A_CommandTransitions.INITIALIZED_TO_EXECUTING](\n        @A_Inject(A_StateMachineTransition) transition: A_StateMachineTransition,\n        ...args: any[]\n    ): Promise<void> {\n        if (this._status !== A_Command_Status.INITIALIZED\n            && this._status !== A_Command_Status.CREATED\n        ) {\n            return;\n        }\n\n        this._startTime = new Date();\n        this._status = A_Command_Status.EXECUTING;\n\n        this.emit(A_CommandFeatures.onExecute);\n    }\n\n    @A_Feature.Extend()\n    /**\n     * Handles command completion after successful execution\n     * \n     * EXECUTION -> COMPLETED transition\n     */\n    protected async [A_CommandTransitions.EXECUTING_TO_COMPLETED](\n        @A_Inject(A_StateMachineTransition) transition: A_StateMachineTransition,\n        ...args: any[]\n    ): Promise<void> {\n        this._endTime = new Date();\n        this._status = A_Command_Status.COMPLETED;\n\n        this.emit(A_CommandFeatures.onComplete);\n    }\n\n    @A_Feature.Extend()\n    /**\n     * Handles command failure during execution\n     * \n     * EXECUTION -> FAILED transition\n     */\n    protected async [A_CommandTransitions.EXECUTING_TO_FAILED](\n        @A_Inject(A_StateMachineTransition) transition: A_StateMachineTransition,\n        @A_Inject(A_Error) error: A_Error,\n        ...args: any[]\n    ): Promise<void> {\n        this._endTime = new Date();\n\n        this._status = A_Command_Status.FAILED;\n\n        this.emit(A_CommandFeatures.onFail);\n    }\n\n\n    // --------------------------------------------------------------------------\n    // A-Command Lifecycle Feature Extensions\n    // --------------------------------------------------------------------------\n    @A_Feature.Extend()\n    /**\n     * Default behavior for Command Initialization uses StateMachine to transition states\n     */\n    protected async [A_CommandFeatures.onInit](\n        @A_Inject(A_StateMachine) stateMachine: A_StateMachine,\n        ...args: any[]\n    ): Promise<void> {\n        await stateMachine.transition(A_Command_Status.CREATED, A_Command_Status.INITIALIZED);\n    }\n\n    @A_Feature.Extend({\n        after: /.*/\n    })\n    protected async [A_CommandFeatures.onBeforeExecute](\n        @A_Dependency.Required()\n        @A_Inject(A_StateMachine) stateMachine: A_StateMachine,\n        ...args: any[]\n    ): Promise<void> {\n        await stateMachine.transition(A_Command_Status.INITIALIZED, A_Command_Status.EXECUTING);\n    }\n\n    @A_Feature.Extend()\n    protected async [A_CommandFeatures.onExecute](\n        ...args: any[]\n    ): Promise<void> {\n    }\n\n    @A_Feature.Extend()\n    /**\n     * By Default on AfterExecute calls the Completion method to mark the command as completed\n     * \n     * [!] This can be overridden to implement custom behavior using A_Feature overrides\n     */\n    protected async [A_CommandFeatures.onAfterExecute](\n        ...args: any[]\n    ): Promise<void> {\n    }\n\n    @A_Feature.Extend({\n        after: /.*/\n    })\n    protected async [A_CommandFeatures.onComplete](\n        @A_Inject(A_StateMachine) stateMachine: A_StateMachine,\n        ...args: any[]\n    ): Promise<void> {\n        await stateMachine.transition(A_Command_Status.EXECUTING, A_Command_Status.COMPLETED);\n    }\n\n    @A_Feature.Extend({\n        after: /.*/\n    })\n    protected async [A_CommandFeatures.onFail](\n        @A_Dependency.Required()\n        @A_Inject(A_StateMachine) stateMachine: A_StateMachine,\n        @A_Inject(A_OperationContext) operation: A_OperationContext,\n        ...args: any[]\n    ): Promise<void> {\n        await stateMachine.transition(A_Command_Status.EXECUTING, A_Command_Status.FAILED);\n    }\n\n    // --------------------------------------------------------------------------\n    // A-Command Lifecycle Methods\n    // --------------------------------------------------------------------------\n    /**\n     * Initializes the command before execution.\n     */\n    async init(): Promise<void> {\n        await this.call(A_CommandFeatures.onInit, this.scope);\n    }\n\n    /**\n     * Executes the command logic.\n     */\n    async execute(): Promise<any> {\n\n        if (this.isProcessed) return;\n\n        try {\n            this.checkScopeInheritance();\n\n            const context = new A_OperationContext('execute-command');\n\n            this.scope.register(context);\n\n            await new Promise<void>(async (resolve, reject) => {\n\n                try {\n\n\n                    const onBeforeExecuteFeature = new A_Feature({\n                        name: A_CommandFeatures.onBeforeExecute,\n                        component: this,\n                        scope: this.scope\n                    })\n\n                    const onExecuteFeature = new A_Feature({\n                        name: A_CommandFeatures.onExecute,\n                        component: this,\n                        scope: this.scope\n                    })\n\n                    const onAfterExecuteFeature = new A_Feature({\n                        name: A_CommandFeatures.onAfterExecute,\n                        component: this,\n                        scope: this.scope\n                    })\n\n\n\n                    this.on(A_CommandFeatures.onComplete, () => {\n\n                        onBeforeExecuteFeature.interrupt();\n                        onExecuteFeature.interrupt();\n                        onAfterExecuteFeature.interrupt();\n\n                        resolve();\n                    });\n\n\n                    await onBeforeExecuteFeature.process(this.scope);\n\n                    await onExecuteFeature.process(this.scope);\n\n                    await onAfterExecuteFeature.process(this.scope);\n\n                    /** only in case it was really invoked we automatically transit it to COMPLETED state */\n                    if (this._origin === 'invoked') {\n                        await this.complete();\n                    }\n\n                    resolve();\n\n                } catch (error) {\n                    reject(error);\n                }\n            });\n\n        } catch (error) {\n            let targetError = error instanceof A_Error\n                ? error\n                : new A_CommandError({\n                    title: A_CommandError.ExecutionError,\n                    description: `An error occurred while executing command \"${this.aseid.toString()}\".`,\n                    originalError: error\n                });\n\n            await this.fail(targetError);\n        }\n    }\n\n    /**\n     * Marks the command as completed\n     */\n    async complete(result?: ResultType) {\n        if (this.isProcessed) return;\n\n        this._status = A_Command_Status.COMPLETED;\n\n        this._result = result;\n\n        await this.call(A_CommandFeatures.onComplete, this.scope);\n\n        this.scope.destroy();\n    }\n\n\n\n    /**\n     * Marks the command as failed\n     */\n    async fail(error?: A_Error) {\n        if (this.isProcessed) return;\n\n        this._status = A_Command_Status.FAILED;\n        if (error) {\n            this._error = error;\n            this.scope.register(error);\n        }\n\n        await this.call(A_CommandFeatures.onFail, this.scope);\n\n        this.scope.destroy();\n    }\n\n\n    // --------------------------------------------------------------------------   \n    // A-Command Event-Emitter methods\n    // --------------------------------------------------------------------------\n\n    /**\n     * Registers an event listener for a specific event\n     * \n     * @param event \n     * @param listener \n     */\n    on(event: LifecycleEvents | A_Command_Event, listener: A_TYPES__Command_Listener<InvokeType, ResultType, LifecycleEvents>) {\n        if (!this._listeners.has(event)) {\n            this._listeners.set(event, new Set());\n        }\n        this._listeners.get(event)!.add(listener);\n    }\n    /**\n     * Removes an event listener for a specific event\n     * \n     * @param event \n     * @param listener \n     */\n    off(event: LifecycleEvents | A_Command_Event, listener: A_TYPES__Command_Listener<InvokeType, ResultType, LifecycleEvents>) {\n        this._listeners.get(event)?.delete(listener);\n    }\n    /**\n     * Emits an event to all registered listeners\n     * \n     * @param event \n     */\n    emit(event: LifecycleEvents | A_Command_Event) {\n        this._listeners.get(event)?.forEach(async listener => {\n            listener(this);\n        });\n    }\n\n\n    // --------------------------------------------------------------------------\n    // A-Entity Base Class Overrides\n    // --------------------------------------------------------------------------\n    // Serialization / Deserialization\n    // -------------------------------------------------------------------------\n\n\n    /**\n     * Allows to create a Command instance from new data\n     * \n     * @param newEntity \n     */\n    fromNew(newEntity: InvokeType): void {\n        super.fromNew(newEntity);\n\n        this._origin = 'invoked';\n\n        this._executionScope = new A_Scope({\n            name: `A-Command-Execution-Scope-${this.aseid.toString()}`,\n            components: [A_StateMachine],\n        });\n\n        this._createdAt = new Date();\n\n        this._params = newEntity;\n\n        this._status = A_Command_Status.CREATED;\n    }\n\n\n\n    /**\n     * Allows to convert serialized data to Command instance\n     * \n     * [!] By default it omits params as they are not stored in the serialized data\n     * \n     * @param serialized \n     */\n    fromJSON(serialized: A_TYPES__Command_Serialized<InvokeType, ResultType>): void {\n        super.fromJSON(serialized);\n\n        this._origin = 'serialized';\n\n        this._executionScope = new A_Scope({\n            name: `A-Command-Execution-Scope-${this.aseid.toString()}`,\n            components: [A_StateMachine],\n        });\n\n        if (serialized.createdAt) this._createdAt = new Date(serialized.createdAt);\n        if (serialized.startedAt) this._startTime = new Date(serialized.startedAt);\n        if (serialized.endedAt) this._endTime = new Date(serialized.endedAt);\n\n        this._params = serialized.params\n        this._status = serialized.status;\n\n        if (serialized.error)\n            this._error = new A_CommandError(serialized.error)\n\n        if (serialized.result)\n            this._result = serialized.result;\n    }\n\n\n    /**\n     * Converts the Command instance to a plain object\n     * \n     * @returns \n     */\n    toJSON(): A_TYPES__Command_Serialized<InvokeType, ResultType> {\n        return {\n            ...super.toJSON(),\n            code: this.code,\n            status: this._status,\n            params: this._params,\n            createdAt: this._createdAt.toISOString(),\n            startedAt: this._startTime ? this._startTime.toISOString() : undefined,\n            endedAt: this._endTime ? this._endTime.toISOString() : undefined,\n            duration: this.duration,\n            idleTime: this.idleTime,\n            result: this.result,\n            error: this.error ? this.error.toJSON() : undefined,\n        }\n    };\n\n\n    //============================================================================================\n    //                                Helpers Methods\n    //============================================================================================\n    /**\n     * Ensures that the command's execution scope inherits from the context scope\n     * \n     * Throws an error if the command is not bound to any context scope\n     */\n    protected checkScopeInheritance(): void {\n        let attachedScope: A_Scope;\n\n        try {\n            attachedScope = A_Context.scope(this);\n        } catch (error) {\n            throw new A_CommandError({\n                title: A_CommandError.CommandScopeBindingError,\n                description: `Command ${this.aseid.toString()} is not bound to any context scope. Ensure the command is properly registered within a context before execution.`,\n                originalError: error\n            });\n        }\n\n        if (!this.scope.isInheritedFrom(A_Context.scope(this))) {\n            this.scope.inherit(A_Context.scope(this));\n        }\n    }\n}\n\n","import { A_Context } from \"@adaas/a-concept\";\nimport { Ifspolyfill } from \"../A-Polyfill.types\";\nimport { A_Logger } from \"../../A-Logger/A-Logger.component\";\n\nexport class A_FSPolyfillClass {\n    private _fs!: Ifspolyfill;\n    private _initialized: boolean = false;\n\n    constructor(\n        protected logger: A_Logger\n    ) {\n\n    }\n\n    get isInitialized(): boolean {\n        return this._initialized;\n    }\n\n\n    async get(): Promise<Ifspolyfill> {\n        if (!this._initialized) {\n            await this.init();\n        }\n        return this._fs;\n    }\n\n    private async init(): Promise<void> {\n        try {\n            if (A_Context.environment=== 'server') {\n                await this.initServer();\n            } else {\n                this.initBrowser();\n            }\n            this._initialized = true;\n        } catch (error) {\n            this.initBrowser();\n            this._initialized = true;\n        }\n    }\n\n    private async initServer(): Promise<void> {\n        this._fs = await import('fs') as Ifspolyfill;\n    }\n\n    private initBrowser(): void {\n        this._fs = {\n            readFileSync: (path: string, encoding: string) => {\n                this.logger.warning('fs.readFileSync not available in browser environment');\n                return '';\n            },\n            existsSync: (path: string) => {\n                this.logger.warning('fs.existsSync not available in browser environment');\n                return false;\n            },\n            createReadStream: (path: string) => {\n                this.logger.warning('fs.createReadStream not available in browser environment');\n                return null;\n            }\n        };\n    }\n}","import { A_Context } from \"@adaas/a-concept\";\nimport { IcryptoInterface, Ifspolyfill } from \"../A-Polyfill.types\";\nimport { A_Logger } from \"../../A-Logger/A-Logger.component\";\n\nexport class A_CryptoPolyfillClass {\n    private _crypto!: IcryptoInterface;\n    private _initialized: boolean = false;\n    private _fsPolyfill?: Ifspolyfill;\n\n    constructor(\n        protected logger: A_Logger\n    ) {\n    }\n\n    get isInitialized(): boolean {\n        return this._initialized;\n    }\n\n    async get(fsPolyfill?: Ifspolyfill): Promise<IcryptoInterface> {\n        if (!this._initialized) {\n            this._fsPolyfill = fsPolyfill;\n            await this.init();\n        }\n        return this._crypto;\n    }\n\n    private async init(): Promise<void> {\n        try {\n            if (A_Context.environment === 'server') {\n                await this.initServer();\n            } else {\n                this.initBrowser();\n            }\n            this._initialized = true;\n        } catch (error) {\n            this.initBrowser();\n            this._initialized = true;\n        }\n    }\n\n    private async initServer(): Promise<void> {\n        const crypto = await import('crypto');\n        this._crypto = {\n            createTextHash: (text: string, algorithm: string = 'sha384') => Promise.resolve(\n                `${algorithm}-${crypto.createHash(algorithm).update(text).digest('base64')}`\n            ),\n            createFileHash: (filePath: string, algorithm: string = 'sha384') => new Promise(async (resolve, reject) => {\n                try {\n                    if (!this._fsPolyfill) {\n                        throw new Error('FS polyfill is required for file hashing');\n                    }\n                    const hash = crypto.createHash(algorithm);\n                    const fileStream = this._fsPolyfill.createReadStream(filePath);\n                    fileStream.on('data', (data: any) => hash.update(data));\n                    fileStream.on('end', () => resolve(`${algorithm}-${hash.digest('base64')}`));\n                    fileStream.on('error', (err: any) => reject(err));\n                } catch (error) {\n                    reject(error);\n                }\n            })\n        };\n    }\n\n    private initBrowser(): void {\n        this._crypto = {\n            createFileHash: () => {\n                this.logger.warning('File hash not available in browser environment');\n                return Promise.resolve('');\n            },\n            createTextHash: (text: string, algorithm: string = 'SHA-384') => new Promise<string>(async (resolve, reject) => {\n                try {\n                    if (!crypto.subtle) {\n                        throw new Error('SubtleCrypto not available');\n                    }\n                    const encoder = new TextEncoder();\n                    const data = encoder.encode(text);\n                    const hashBuffer = await crypto.subtle.digest(algorithm, data);\n                    const hashArray = Array.from(new Uint8Array(hashBuffer));\n                    const hashBase64 = btoa(String.fromCharCode(...hashArray));\n                    resolve(`${algorithm}-${hashBase64}`);\n                } catch (error) {\n                    reject(error);\n                }\n            })\n        };\n    }\n}","import { A_Context } from \"@adaas/a-concept\";\nimport { IhttpInterface } from \"../A-Polyfill.types\";\nimport { A_Logger } from \"../../A-Logger/A-Logger.component\";\n\nexport class A_HttpPolyfillClass {\n    private _http!: IhttpInterface;\n    private _initialized: boolean = false;\n\n    constructor(\n        protected logger: A_Logger\n    ) {\n\n    }\n\n    get isInitialized(): boolean {\n        return this._initialized;\n    }\n\n    async get(): Promise<IhttpInterface> {\n        if (!this._initialized) {\n            await this.init();\n        }\n        return this._http;\n    }\n\n    private async init(): Promise<void> {\n        try {\n            if (A_Context.environment === 'server') {\n                await this.initServer();\n            } else {\n                this.initBrowser();\n            }\n            this._initialized = true;\n        } catch (error) {\n            this.initBrowser();\n            this._initialized = true;\n        }\n    }\n\n    private async initServer(): Promise<void> {\n        const httpModule = await import('http');\n        this._http = {\n            request: httpModule.request,\n            get: httpModule.get,\n            createServer: httpModule.createServer\n        };\n    }\n\n    private initBrowser(): void {\n        this._http = {\n            request: (options: any, callback?: (res: any) => void) => {\n                this.logger.warning('http.request not available in browser/test environment, use fetch instead');\n                return this.createMockRequest(options, callback, false);\n            },\n            get: (url: string | any, callback?: (res: any) => void) => {\n                this.logger.warning('http.get not available in browser/test environment, use fetch instead');\n                return this.createMockRequest(typeof url === 'string' ? { hostname: url } : url, callback, false);\n            },\n            createServer: () => {\n                this.logger.error('http.createServer not available in browser/test environment');\n                return null;\n            }\n        };\n    }\n\n    private createMockRequest(options: any, callback?: (res: any) => void, isHttps: boolean = false) {\n        // Return a mock request that doesn't make real network calls\n        const request = {\n            end: () => {\n                // Mock response for all environments\n                if (callback) {\n                    const mockResponse = {\n                        statusCode: 200,\n                        headers: {},\n                        on: (event: string, handler: Function) => {\n                            if (event === 'data') {\n                                setTimeout(() => handler('mock data'), 0);\n                            } else if (event === 'end') {\n                                setTimeout(() => handler(), 0);\n                            }\n                        },\n                        pipe: (dest: any) => {\n                            if (dest.write) dest.write('mock data');\n                            if (dest.end) dest.end();\n                        }\n                    };\n                    setTimeout(() => callback(mockResponse), 0);\n                }\n            },\n            write: (data: any) => {\n                // Mock write\n            },\n            on: (event: string, handler: Function) => {\n                // Mock event handling\n            }\n        };\n\n        return request;\n    }\n}","import { A_Context } from \"@adaas/a-concept\";\nimport { IhttpsInterface } from \"../A-Polyfill.types\";\nimport { A_Logger } from \"../../A-Logger/A-Logger.component\";\n\nexport class A_HttpsPolyfillClass {\n    private _https!: IhttpsInterface;\n    private _initialized: boolean = false;\n\n    constructor(\n        protected logger: A_Logger\n    ) {\n\n    }\n\n    get isInitialized(): boolean {\n        return this._initialized;\n    }\n\n    async get(): Promise<IhttpsInterface> {\n        if (!this._initialized) {\n            await this.init();\n        }\n        return this._https;\n    }\n\n    private async init(): Promise<void> {\n        try {\n            if (A_Context.environment === 'server') {\n                await this.initServer();\n            } else {\n                this.initBrowser();\n            }\n            this._initialized = true;\n        } catch (error) {\n            this.initBrowser();\n            this._initialized = true;\n        }\n    }\n\n    private async initServer(): Promise<void> {\n        const httpsModule = await import('https');\n        this._https = {\n            request: httpsModule.request,\n            get: httpsModule.get,\n            createServer: httpsModule.createServer\n        };\n    }\n\n    private initBrowser(): void {\n        this._https = {\n            request: (options: any, callback?: (res: any) => void) => {\n                this.logger.warning('https.request not available in browser/test environment, use fetch instead');\n                return this.createMockRequest(options, callback, true);\n            },\n            get: (url: string | any, callback?: (res: any) => void) => {\n                this.logger.warning('https.get not available in browser/test environment, use fetch instead');\n                return this.createMockRequest(typeof url === 'string' ? { hostname: url } : url, callback, true);\n            },\n            createServer: () => {\n                this.logger.error('https.createServer not available in browser/test environment');\n                return null;\n            }\n        };\n    }\n\n    private createMockRequest(options: any, callback?: (res: any) => void, isHttps: boolean = true) {\n        // Return a mock request that doesn't make real network calls\n        const request = {\n            end: () => {\n                // Mock response for all environments\n                if (callback) {\n                    const mockResponse = {\n                        statusCode: 200,\n                        headers: {},\n                        on: (event: string, handler: Function) => {\n                            if (event === 'data') {\n                                setTimeout(() => handler('mock data'), 0);\n                            } else if (event === 'end') {\n                                setTimeout(() => handler(), 0);\n                            }\n                        },\n                        pipe: (dest: any) => {\n                            if (dest.write) dest.write('mock data');\n                            if (dest.end) dest.end();\n                        }\n                    };\n                    setTimeout(() => callback(mockResponse), 0);\n                }\n            },\n            write: (data: any) => {\n                // Mock write\n            },\n            on: (event: string, handler: Function) => {\n                // Mock event handling\n            }\n        };\n\n        return request;\n    }\n}","import { A_Context } from \"@adaas/a-concept\";\nimport { IpathInterface } from \"../A-Polyfill.types\";\nimport { A_Logger } from \"../../A-Logger/A-Logger.component\";\n\nexport class A_PathPolyfillClass {\n    private _path!: IpathInterface;\n    private _initialized: boolean = false;\n\n    constructor(\n        protected logger: A_Logger\n    ) {\n\n    }\n\n    get isInitialized(): boolean {\n        return this._initialized;\n    }\n\n\n    async get(): Promise<IpathInterface> {\n        if (!this._initialized) {\n            await this.init();\n        }\n        return this._path;\n    }\n\n    private async init(): Promise<void> {\n        try {\n            if (A_Context.environment === 'server') {\n                await this.initServer();\n            } else {\n                this.initBrowser();\n            }\n            this._initialized = true;\n        } catch (error) {\n            this.initBrowser();\n            this._initialized = true;\n        }\n    }\n\n    private async initServer(): Promise<void> {\n        this._path = await import('path') as IpathInterface;\n    }\n\n    private initBrowser(): void {\n        this._path = {\n            join: (...paths: string[]) => {\n                return paths.join('/').replace(/\\/+/g, '/');\n            },\n            resolve: (...paths: string[]) => {\n                let resolvedPath = '';\n                for (const path of paths) {\n                    if (path.startsWith('/')) {\n                        resolvedPath = path;\n                    } else {\n                        resolvedPath = this._path.join(resolvedPath, path);\n                    }\n                }\n                return resolvedPath || '/';\n            },\n            dirname: (path: string) => {\n                const parts = path.split('/');\n                return parts.slice(0, -1).join('/') || '/';\n            },\n            basename: (path: string, ext?: string) => {\n                const base = path.split('/').pop() || '';\n                return ext && base.endsWith(ext) ? base.slice(0, -ext.length) : base;\n            },\n            extname: (path: string) => {\n                const parts = path.split('.');\n                return parts.length > 1 ? '.' + parts.pop() : '';\n            },\n            relative: (from: string, to: string) => {\n                // Simplified relative path calculation\n                return to.replace(from, '').replace(/^\\//, '');\n            },\n            normalize: (path: string) => {\n                return path.replace(/\\/+/g, '/').replace(/\\/$/, '') || '/';\n            },\n            isAbsolute: (path: string) => {\n                return path.startsWith('/') || /^[a-zA-Z]:/.test(path);\n            },\n            parse: (path: string) => {\n                const ext = this._path.extname(path);\n                const base = this._path.basename(path);\n                const name = this._path.basename(path, ext);\n                const dir = this._path.dirname(path);\n                return { root: '/', dir, base, ext, name };\n            },\n            format: (pathObject: any) => {\n                return this._path.join(pathObject.dir || '', pathObject.base || '');\n            },\n            sep: '/',\n            delimiter: ':'\n        };\n    }\n}","import { A_Context } from \"@adaas/a-concept\";\nimport { IurlInterface } from \"../A-Polyfill.types\";\nimport { A_Logger } from \"../../A-Logger/A-Logger.component\";\n\nexport class A_UrlPolyfillClass {\n    private _url!: IurlInterface;\n    private _initialized: boolean = false;\n\n    get isInitialized(): boolean {\n        return this._initialized;\n    }\n\n    constructor(\n        protected logger: A_Logger\n    ) {\n\n    }\n\n    async get(): Promise<IurlInterface> {\n        if (!this._initialized) {\n            await this.init();\n        }\n        return this._url;\n    }\n\n    private async init(): Promise<void> {\n        try {\n            if (A_Context.environment === 'server') {\n                await this.initServer();\n            } else {\n                this.initBrowser();\n            }\n            this._initialized = true;\n        } catch (error) {\n            this.initBrowser();\n            this._initialized = true;\n        }\n    }\n\n    private async initServer(): Promise<void> {\n        const urlModule = await import('url');\n        this._url = {\n            parse: urlModule.parse,\n            format: urlModule.format,\n            resolve: urlModule.resolve,\n            URL: (urlModule.URL || globalThis.URL) as any,\n            URLSearchParams: (urlModule.URLSearchParams || globalThis.URLSearchParams) as any\n        };\n    }\n\n    private initBrowser(): void {\n        this._url = {\n            parse: (urlString: string) => {\n                try {\n                    const url = new URL(urlString);\n                    return {\n                        protocol: url.protocol,\n                        hostname: url.hostname,\n                        port: url.port,\n                        pathname: url.pathname,\n                        search: url.search,\n                        hash: url.hash,\n                        host: url.host,\n                        href: url.href\n                    };\n                } catch {\n                    return {};\n                }\n            },\n            format: (urlObject: any) => {\n                try {\n                    return new URL('', urlObject.href || `${urlObject.protocol}//${urlObject.host}${urlObject.pathname}${urlObject.search}${urlObject.hash}`).href;\n                } catch {\n                    return '';\n                }\n            },\n            resolve: (from: string, to: string) => {\n                try {\n                    return new URL(to, from).href;\n                } catch {\n                    return to;\n                }\n            },\n            URL: globalThis.URL,\n            URLSearchParams: globalThis.URLSearchParams\n        };\n    }\n}","import { A_Context } from \"@adaas/a-concept\";\nimport { IbufferInterface } from \"../A-Polyfill.types\";\nimport { A_Logger } from \"../../A-Logger/A-Logger.component\";\n\nexport class A_BufferPolyfillClass {\n    private _buffer!: IbufferInterface;\n    private _initialized: boolean = false;\n\n    constructor(\n        protected logger: A_Logger\n    ) {\n\n    }\n\n    get isInitialized(): boolean {\n        return this._initialized;\n    }\n\n\n    async get(): Promise<IbufferInterface> {\n        if (!this._initialized) {\n            await this.init();\n        }\n        return this._buffer;\n    }\n\n    private async init(): Promise<void> {\n        try {\n            if (A_Context.environment === 'server') {\n                await this.initServer();\n            } else {\n                this.initBrowser();\n            }\n            this._initialized = true;\n        } catch (error) {\n            this.initBrowser();\n            this._initialized = true;\n        }\n    }\n\n    private async initServer(): Promise<void> {\n        const bufferModule = await import('buffer');\n        this._buffer = {\n            from: bufferModule.Buffer.from,\n            alloc: bufferModule.Buffer.alloc,\n            allocUnsafe: bufferModule.Buffer.allocUnsafe,\n            isBuffer: bufferModule.Buffer.isBuffer,\n            concat: bufferModule.Buffer.concat\n        };\n    }\n\n    private initBrowser(): void {\n        this._buffer = {\n            from: (data: any, encoding?: string) => {\n                if (typeof data === 'string') {\n                    return new TextEncoder().encode(data);\n                }\n                return new Uint8Array(data);\n            },\n            alloc: (size: number, fill?: any) => {\n                const buffer = new Uint8Array(size);\n                if (fill !== undefined) {\n                    buffer.fill(fill);\n                }\n                return buffer;\n            },\n            allocUnsafe: (size: number) => {\n                return new Uint8Array(size);\n            },\n            isBuffer: (obj: any) => {\n                return obj instanceof Uint8Array || obj instanceof ArrayBuffer;\n            },\n            concat: (list: any[], totalLength?: number) => {\n                const length = totalLength || list.reduce((sum, buf) => sum + buf.length, 0);\n                const result = new Uint8Array(length);\n                let offset = 0;\n                for (const buf of list) {\n                    result.set(buf, offset);\n                    offset += buf.length;\n                }\n                return result;\n            }\n        };\n    }\n}","import { A_Context } from \"@adaas/a-concept\";\nimport { IprocessInterface } from \"../A-Polyfill.types\";\nimport { A_Logger } from \"../../A-Logger/A-Logger.component\";\n\nexport class A_ProcessPolyfillClass {\n    private _process!: IprocessInterface;\n    private _initialized: boolean = false;\n\n    get isInitialized(): boolean {\n        return this._initialized;\n    }\n\n    constructor(\n        protected logger: A_Logger\n    ) {\n\n    }\n\n    async get(): Promise<IprocessInterface> {\n        if (!this._initialized) {\n            await this.init();\n        }\n        return this._process;\n    }\n\n    private async init(): Promise<void> {\n        try {\n            if (A_Context.environment === 'server') {\n                this.initServer();\n            } else {\n                this.initBrowser();\n            }\n            this._initialized = true;\n        } catch (error) {\n            this.initBrowser();\n            this._initialized = true;\n        }\n    }\n\n    private initServer(): void {\n        this._process = {\n            env: process.env as Record<string, string>,\n            argv: process.argv,\n            platform: process.platform,\n            version: process.version,\n            versions: process.versions as Record<string, string>,\n            cwd: process.cwd,\n            exit: process.exit,\n            nextTick: process.nextTick\n        };\n    }\n\n    private initBrowser(): void {\n        this._process = {\n            env: {\n                NODE_ENV: 'browser',\n                ...((globalThis as any).process?.env || {})\n            },\n            argv: ['browser'],\n            platform: 'browser',\n            version: 'browser',\n            versions: { node: 'browser' },\n            cwd: () => '/',\n            exit: (code?: number) => {\n                this.logger.warning('process.exit not available in browser');\n                throw new Error(`Process exit with code ${code}`);\n            },\n            nextTick: (callback: Function, ...args: any[]) => {\n                setTimeout(() => callback(...args), 0);\n            }\n        };\n    }\n}","import { A_Component, A_Concept, A_Context, A_Inject } from \"@adaas/a-concept\";\nimport { A_Logger } from \"../A-Logger/A-Logger.component\";\nimport { A_FSPolyfillClass } from \"./classes/A-FS-Polyfill.class\";\nimport { A_CryptoPolyfillClass } from \"./classes/A-Crypto-Polyfill.class\";\nimport { A_HttpPolyfillClass } from \"./classes/A-Http-Polyfill.class\";\nimport { A_HttpsPolyfillClass } from \"./classes/A-Https-Polyfill.class\";\nimport { A_PathPolyfillClass } from \"./classes/A-Path-Polyfill.class\";\nimport { A_UrlPolyfillClass } from \"./classes/A-Url-Polyfill.class\";\nimport { A_BufferPolyfillClass } from \"./classes/A-Buffer-Polyfill.class\";\nimport { A_ProcessPolyfillClass } from \"./classes/A-Process-Polyfill.class\";\n\nexport class A_Polyfill extends A_Component {\n\n    protected _fsPolyfill!: A_FSPolyfillClass;\n    protected _cryptoPolyfill!: A_CryptoPolyfillClass;\n    protected _httpPolyfill!: A_HttpPolyfillClass;\n    protected _httpsPolyfill!: A_HttpsPolyfillClass;\n    protected _pathPolyfill!: A_PathPolyfillClass;\n    protected _urlPolyfill!: A_UrlPolyfillClass;\n    protected _bufferPolyfill!: A_BufferPolyfillClass;\n    protected _processPolyfill!: A_ProcessPolyfillClass;\n\n    protected _initializing: Promise<void> | null = null;\n    /**\n     * Indicates whether the channel is connected\n     */\n    protected _initialized?: Promise<void>;\n\n\n    constructor(\n        @A_Inject(A_Logger) protected logger: A_Logger\n    ) {\n        super();\n    }\n\n    /**\n     * Indicates whether the channel is connected\n     */\n    get ready(): Promise<void> {\n        if (!this._initialized) {\n            this._initialized = this._loadInternal();\n        }\n        return this._initialized;\n    }\n\n\n\n    @A_Concept.Load()\n    async load() {\n        await this.ready;\n    }\n\n    @A_Concept.Load()\n    async attachToWindow() {\n        if (A_Context.environment !== 'browser') return;\n\n\n        (globalThis as any).A_Polyfill = this;\n        // attach env variables\n        (globalThis as any).process = { env: { NODE_ENV: 'production' }, cwd: () => \"/\" };\n        (globalThis as any).__dirname = \"/\";\n\n    }\n\n\n    protected async _loadInternal() {\n\n        this._fsPolyfill = new A_FSPolyfillClass(this.logger);\n        this._cryptoPolyfill = new A_CryptoPolyfillClass(this.logger);\n        this._httpPolyfill = new A_HttpPolyfillClass(this.logger);\n        this._httpsPolyfill = new A_HttpsPolyfillClass(this.logger);\n        this._pathPolyfill = new A_PathPolyfillClass(this.logger);\n        this._urlPolyfill = new A_UrlPolyfillClass(this.logger);\n        this._bufferPolyfill = new A_BufferPolyfillClass(this.logger);\n        this._processPolyfill = new A_ProcessPolyfillClass(this.logger);\n\n        // Initialize all polyfills to ensure they're ready\n        await this._fsPolyfill.get();\n        await this._cryptoPolyfill.get(await this._fsPolyfill.get());\n        await this._httpPolyfill.get();\n        await this._httpsPolyfill.get();\n        await this._pathPolyfill.get();\n        await this._urlPolyfill.get();\n        await this._bufferPolyfill.get();\n        await this._processPolyfill.get();\n    }\n\n    /**\n     * Allows to use the 'fs' polyfill methods regardless of the environment\n     * This method loads the 'fs' polyfill and returns its instance\n     * \n     * @returns \n     */\n    async fs() {\n        await this.ready;\n\n        return await this._fsPolyfill.get();\n    }\n\n    /**\n     * Allows to use the 'crypto' polyfill methods regardless of the environment\n     * This method loads the 'crypto' polyfill and returns its instance\n     * \n     * @returns \n     */\n    async crypto() {\n        await this.ready;\n\n        return await this._cryptoPolyfill.get();\n    }\n\n    /**\n     * Allows to use the 'http' polyfill methods regardless of the environment\n     * This method loads the 'http' polyfill and returns its instance\n     * \n     * @returns \n     */\n    async http() {\n        await this.ready;\n\n        return await this._httpPolyfill.get();\n    }\n\n    /**\n     * Allows to use the 'https' polyfill methods regardless of the environment\n     * This method loads the 'https' polyfill and returns its instance\n     * \n     * @returns \n     */\n    async https() {\n        await this.ready;\n\n        return await this._httpsPolyfill.get();\n    }\n\n    /**\n     * Allows to use the 'path' polyfill methods regardless of the environment\n     * This method loads the 'path' polyfill and returns its instance\n     * \n     * @returns \n     */\n    async path() {\n        await this.ready;\n\n        return await this._pathPolyfill.get();\n    }\n\n    /**\n     * Allows to use the 'url' polyfill methods regardless of the environment\n     * This method loads the 'url' polyfill and returns its instance\n     * \n     * @returns \n     */\n    async url() {\n        await this.ready;\n\n        return await this._urlPolyfill.get();\n    }\n\n    /**\n     * Allows to use the 'buffer' polyfill methods regardless of the environment\n     * This method loads the 'buffer' polyfill and returns its instance\n     * \n     * @returns \n     */\n    async buffer() {\n        await this.ready;\n\n        return await this._bufferPolyfill.get();\n    }\n\n    /**\n     * Allows to use the 'process' polyfill methods regardless of the environment\n     * This method loads the 'process' polyfill and returns its instance\n     * \n     * @returns \n     */\n    async process() {\n        await this.ready;\n\n        return await this._processPolyfill.get();\n    }\n}","import { A_Error } from \"@adaas/a-concept\";\n\n\nexport class A_ConfigError extends A_Error {\n\n    static readonly InitializationError = 'A-Config Initialization Error';\n}","import { A_Component, A_Concept, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_Container, A_Feature, A_Inject } from \"@adaas/a-concept\";\nimport { A_Config } from \"../A-Config.context\";\nimport { A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY } from \"../A-Config.constants\";\nimport { A_Polyfill } from \"../../A-Polyfill/A-Polyfill.component\";\n\n/**\n * Config Reader\n */\nexport class ConfigReader extends A_Component {\n\n    constructor(\n        @A_Inject(A_Polyfill) protected polyfill: A_Polyfill,\n    ) {\n        super();\n    }\n\n    @A_Concept.Load()\n    async attachContext(\n        @A_Inject(A_Container) container: A_Container,\n        @A_Inject(A_Feature) feature: A_Feature,\n        @A_Inject(A_Config) config?: A_Config<any>,\n    ) {\n        if (!config) {\n            config= new A_Config({\n                variables: [\n                    ...A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY,\n                    ...A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY\n                ] as const,\n                defaults: {}\n            });\n\n            container.scope.register(config);\n        }\n\n        const rootDir = await this.getProjectRoot();\n\n        config.set('A_CONCEPT_ROOT_FOLDER', rootDir);\n    }\n\n    @A_Concept.Load()\n    async initialize(\n        @A_Inject(A_Config) config: A_Config,\n    ) {\n        const data = await this.read([\n            ...config.CONFIG_PROPERTIES,\n            ...A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY,\n            ...A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY\n        ]);\n\n        config.set(data);\n    }\n\n\n\n    /**\n     * Get the configuration property by Name\n     * @param property \n     */\n    resolve<_ReturnType = any>(property: string): _ReturnType {\n        return property as _ReturnType;\n    }\n\n    /**\n     * This method reads the configuration and sets the values to the context\n     * \n     * @returns \n     */\n    async read<T extends string>(\n        variables: Array<T> = []\n    ): Promise<Record<T, any>> {\n        return {} as Record<T, any>;\n    }\n\n\n    /**\n     * Finds the root directory of the project by locating the folder containing package.json\n     * \n     * @param {string} startPath - The initial directory to start searching from (default is __dirname)\n     * @returns {string|null} - The path to the root directory or null if package.json is not found\n     */\n    protected async getProjectRoot(startPath = __dirname) {\n        return process.cwd();\n    }\n}","import { A_Context, A_FormatterHelper } from \"@adaas/a-concept\";\nimport { ConfigReader } from \"./ConfigReader.component\";\n\nexport class FileConfigReader extends ConfigReader {\n\n    private FileData: Map<string, any> = new Map<string, any>();\n\n    /**\n     * Get the configuration property Name\n     * @param property \n     */\n    getConfigurationProperty_File_Alias(property: string): string {\n        return A_FormatterHelper.toCamelCase(property);\n    }\n\n\n    resolve<_ReturnType = any>(property: string): _ReturnType {\n        return this.FileData.get(this.getConfigurationProperty_File_Alias(property)) as _ReturnType;\n    }\n\n\n    async read<T extends string>(\n        variables?: Array<T>\n    ): Promise<Record<T, any>> {\n\n        const fs = await this.polyfill.fs();\n\n        try {\n            const data = fs.readFileSync(`${A_Context.concept}.conf.json`, 'utf8');\n\n            const config: Record<T, any> = JSON.parse(data);\n\n            this.FileData = new Map(Object.entries(config));\n\n            return config;\n\n        } catch (error) {\n            // this.context.Logger.error(error);\n            return {} as Record<T, any>;\n        }\n    }\n}\n","import { A_Concept, A_Feature, A_FormatterHelper, A_Inject, A_TYPES__ConceptENVVariables } from \"@adaas/a-concept\";\nimport { ConfigReader } from \"./ConfigReader.component\";\nimport { A_Config } from \"../A-Config.context\";\nimport { A_Polyfill } from \"../../A-Polyfill/A-Polyfill.component\";\n\n\nexport class ENVConfigReader extends ConfigReader {\n\n\n    @A_Concept.Load({\n        before: ['ENVConfigReader.initialize']\n    })\n    async readEnvFile(\n        @A_Inject(A_Config) config: A_Config<A_TYPES__ConceptENVVariables>,\n        @A_Inject(A_Polyfill) polyfill: A_Polyfill,\n        @A_Inject(A_Feature) feature: A_Feature,\n\n    ) {\n        const fs = await polyfill.fs();\n\n        if (fs.existsSync('.env'))\n            fs.readFileSync(`${config.get('A_CONCEPT_ROOT_FOLDER')}/.env`, 'utf-8').split('\\n').forEach(line => {\n                const [key, value] = line.split('=');\n                if (key && value) {\n                    process.env[key.trim()] = value.trim();\n                }\n            });\n    }\n\n\n    /**\n     * Get the configuration property Name \n     * @param property \n     */\n    getConfigurationProperty_ENV_Alias(property: string): string {\n        return A_FormatterHelper.toUpperSnakeCase(property);\n    }\n\n\n    resolve<_ReturnType = any>(property: string): _ReturnType {\n        return process.env[this.getConfigurationProperty_ENV_Alias(property)] as _ReturnType;\n    }\n\n\n    async read<T extends string>(variables: Array<T> = []): Promise<Record<T, any>> {\n        const allVariables = [\n            ...variables,\n            ...Object.keys(process.env),\n        ]\n\n        const config: Record<T, any> = {} as Record<T, any>;\n\n        allVariables.forEach(variable => {\n            config[variable] = this.resolve(variable);\n        });\n\n        return config;\n    }\n} ","import { A_Caller, A_Concept, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_Container, A_Context, A_Fragment, A_Inject, A_Scope, A_ScopeError } from \"@adaas/a-concept\";\nimport { ConfigReader } from \"./components/ConfigReader.component\";\nimport { A_Config } from \"./A-Config.context\";\nimport { A_Polyfill } from \"../A-Polyfill/A-Polyfill.component\";\nimport { A_ConfigError } from \"./A-Config.error\";\nimport { FileConfigReader } from \"./components/FileConfigReader.component\";\nimport { ENVConfigReader } from \"./components/ENVConfigReader.component\";\nimport { A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY } from \"./A-Config.constants\";\n\n\nexport class A_ConfigLoader extends A_Container {\n\n    private reader!: ConfigReader\n\n\n    @A_Concept.Load({\n        before: /.*/\n    })\n    async prepare(\n        @A_Inject(A_Polyfill) polyfill: A_Polyfill\n    ) {\n        if (!this.scope.has(A_Config)) {\n            const newConfig = new A_Config({\n                variables: [\n                    ...A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY,\n                    ...A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY\n                ] as const,\n                defaults: {}\n            });\n\n            this.scope.register<A_Fragment>(newConfig);\n        }\n\n\n        const fs = await polyfill.fs();\n\n        try {\n            switch (true) {\n\n                case A_Context.environment === 'server' && !!fs.existsSync(`${A_Context.concept}.conf.json`):\n                    this.reader = this.scope.resolve<ConfigReader>(FileConfigReader)!;\n                    break;\n\n                case A_Context.environment === 'server' && !fs.existsSync(`${A_Context.concept}.conf.json`):\n                    this.reader = this.scope.resolve<ConfigReader>(ENVConfigReader)!;\n                    break;\n\n                case A_Context.environment === 'browser':\n                    this.reader = this.scope.resolve<ConfigReader>(ENVConfigReader)!;\n                    break;\n\n                default:\n                    throw new A_ConfigError(\n                        A_ConfigError.InitializationError,\n                        `Environment ${A_Context.environment} is not supported`\n                    );\n            }\n        } catch (error) {\n            if (error instanceof A_ScopeError) {\n                throw new A_ConfigError({\n                    title: A_ConfigError.InitializationError,\n                    description: `Failed to initialize A_ConfigLoader. Reader not found for environment ${A_Context.environment}`,\n                    originalError: error,\n                })\n            }\n        }\n    }\n}","import { A_TYPES__ConceptENVVariables, A_TYPES__Fragment_Constructor } from \"@adaas/a-concept\";\n\nexport enum A_TYPES__ConfigFeature {\n\n}\n\n\nexport type A_TYPES__ConfigContainerConstructor<T extends  Array<string | A_TYPES__ConceptENVVariables[number]>> = {\n\n    /**\n     * If set to true, the SDK will throw an error if the variable is not defined OR not presented in the defaults\n     */\n    strict: boolean\n\n    /**\n     * Allows to define the names of variable to be loaded\n     */\n    variables: T\n\n    /**\n     * Allows to set the default values for the variables\n     */\n    defaults: {\n        [key in T[number]]?: any\n    }\n} & A_TYPES__Fragment_Constructor;\n","\n\nexport const A_LoggerEnvVariables = {\n    /**\n     * Sets the log level for the logger\n     * \n     * @example 'debug', 'info', 'warn', 'error'\n     */\n    A_LOGGER_LEVEL: 'A_LOGGER_LEVEL',\n\n    /**     \n     * Sets the default scope length for log messages\n     * \n     * @example 'A_LOGGER_DEFAULT_SCOPE_LENGTH'\n     */\n    A_LOGGER_DEFAULT_SCOPE_LENGTH: 'A_LOGGER_DEFAULT_SCOPE_LENGTH',\n\n    /**\n     * Sets the default color for scope display in log messages\n     * \n     * @example 'green', 'blue', 'red', 'yellow', 'gray', 'magenta', 'cyan', 'white', 'pink'\n     */\n    A_LOGGER_DEFAULT_SCOPE_COLOR: 'A_LOGGER_DEFAULT_SCOPE_COLOR',\n\n    /**\n     * Sets the default color for log message content\n     * \n     * @example 'green', 'blue', 'red', 'yellow', 'gray', 'magenta', 'cyan', 'white', 'pink'\n     */\n    A_LOGGER_DEFAULT_LOG_COLOR: 'A_LOGGER_DEFAULT_LOG_COLOR',\n} as const;\n\n\n\nexport const A_LoggerEnvVariablesArray = [\n    A_LoggerEnvVariables.A_LOGGER_LEVEL,\n    A_LoggerEnvVariables.A_LOGGER_DEFAULT_SCOPE_LENGTH,\n    A_LoggerEnvVariables.A_LOGGER_DEFAULT_SCOPE_COLOR,\n    A_LoggerEnvVariables.A_LOGGER_DEFAULT_LOG_COLOR,\n] as const;\n\n\nexport type A_LoggerEnvVariablesType = (typeof A_LoggerEnvVariables)[keyof typeof A_LoggerEnvVariables][];","import { A_Error } from \"@adaas/a-concept\";\n\nexport class A_ManifestError extends A_Error {\n\n    static readonly ManifestInitializationError = 'A-Manifest Initialization Error';\n\n}\n","import { A_TYPES__Component_Constructor } from \"@adaas/a-concept\";\nimport { A_Manifest } from \"../A-Manifest.context\";\nimport { A_UTILS_TYPES__Manifest_AllowedComponents } from \"../A-Manifest.types\";\n\n/**\n * Fluent API for checking manifest permissions\n */\nexport class A_ManifestChecker {\n    constructor(\n        private manifest: A_Manifest,\n        private component: A_TYPES__Component_Constructor,\n        private method: string,\n        private checkExclusion: boolean = false\n    ) {}\n\n    for(target: A_UTILS_TYPES__Manifest_AllowedComponents): boolean {\n        const result = this.manifest.internal_checkAccess({\n            component: this.component,\n            method: this.method,\n            target: target\n        });\n\n        return this.checkExclusion ? !result : result;\n    }\n}","import { A_Component, A_Fragment, A_TypeGuards, A_TYPES__Component_Constructor } from \"@adaas/a-concept\";\nimport { A_UTILS_TYPES__Manifest_Init, A_UTILS_TYPES__Manifest_ComponentLevelConfig, A_UTILS_TYPES__Manifest_AllowedComponents, A_UTILS_TYPES__ManifestRule, A_UTILS_TYPES__ManifestQuery } from \"./A-Manifest.types\";\nimport { A_ManifestError } from \"./A-Manifest.error\";\nimport { A_ManifestChecker } from \"./classes/A-ManifestChecker.class\";\n\n\n\n\n\nexport class A_Manifest extends A_Fragment {\n\n    private rules: A_UTILS_TYPES__ManifestRule[] = [];\n\n    /**\n     * A-Manifest is a configuration set that allows to include or exclude component application for the particular methods.\n     *\n     * For example, if A-Scope provides polymorphic A-Component that applies for All A-Entities in it but you have another component that should be used for only One particular Entity, you can use A-Manifest to specify this behavior.\n     * \n     * \n     * By default if Component is provided in the scope - it applies for all entities in it. However, if you want to exclude some entities or include only some entities for the particular component - you can use A-Manifest to define this behavior.\n     * \n     * @param config - Array of component configurations\n     */\n    constructor(config: A_UTILS_TYPES__Manifest_Init = []) {\n        super({\n            name: 'A-Manifest',\n        });\n\n        this.prepare(config);\n    }\n\n\n    /**\n     * Should convert received configuration into internal Regexp applicable for internal storage\n     */\n    protected prepare(config: A_UTILS_TYPES__Manifest_Init) {\n        if (!A_TypeGuards.isArray(config))\n            throw new A_ManifestError(\n                A_ManifestError.ManifestInitializationError,\n                `A-Manifest configuration should be an array of configurations`\n            );\n\n        for (const item of config) {\n            this.processConfigItem(item);\n        }\n    }\n\n    /**\n     * Process a single configuration item and convert it to internal rules\n     */\n    private processConfigItem(item: A_UTILS_TYPES__Manifest_ComponentLevelConfig) {\n        if (!A_TypeGuards.isComponentConstructor(item.component))\n            throw new A_ManifestError(\n                A_ManifestError.ManifestInitializationError,\n                `A-Manifest configuration item should be a A-Component constructor`\n            );\n\n        const componentRegex = this.constructorToRegex(item.component);\n\n        // Always add component-level rule first (applies to all methods)\n        if (item.apply || item.exclude) {\n            const methodRegex = /.*/; // Match all methods\n\n            this.rules.push({\n                componentRegex,\n                methodRegex,\n                applyRegex: item.apply ? this.allowedComponentsToRegex(item.apply) : undefined,\n                excludeRegex: item.exclude ? this.allowedComponentsToRegex(item.exclude) : undefined,\n            });\n        }\n\n        // Then add method-level configurations (these will override component-level)\n        if (item.methods && item.methods.length > 0) {\n            for (const methodConfig of item.methods) {\n                const methodRegex = this.methodToRegex(methodConfig.method);\n\n                this.rules.push({\n                    componentRegex,\n                    methodRegex,\n                    applyRegex: methodConfig.apply ? this.allowedComponentsToRegex(methodConfig.apply) : undefined,\n                    excludeRegex: methodConfig.exclude ? this.allowedComponentsToRegex(methodConfig.exclude) : undefined,\n                });\n            }\n        }\n    }\n\n\n\n    /**\n     * Convert a constructor to a regex pattern\n     */\n    private constructorToRegex(ctor: A_TYPES__Component_Constructor): RegExp {\n        return new RegExp(`^${this.escapeRegex(ctor.name)}$`);\n    }\n\n    /**\n     * Convert a method name or regex to a regex pattern\n     */\n    private methodToRegex(method: string | RegExp): RegExp {\n        if (method instanceof RegExp) {\n            return method;\n        }\n        return new RegExp(`^${this.escapeRegex(method as string)}$`);\n    }\n\n    /**\n     * Convert allowed components array or regex to a single regex\n     */\n    private allowedComponentsToRegex(components: A_UTILS_TYPES__Manifest_AllowedComponents[] | RegExp): RegExp {\n        if (components instanceof RegExp) {\n            return components;\n        }\n\n        const patterns = components.map(ctor => this.escapeRegex(ctor.name));\n        return new RegExp(`^(${patterns.join('|')})$`);\n    }\n\n    /**\n     * Escape special regex characters in a string\n     */\n    private escapeRegex(str: string): string {\n        return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n    }\n\n    protected configItemToRegexp(item: A_TYPES__Component_Constructor): RegExp {\n        return this.constructorToRegex(item);\n    }\n\n\n    protected ID(component: A_TYPES__Component_Constructor, method: string) {\n        return `${component.name}.${method}`;\n    }\n\n    /**\n     * Check if a component and method combination is allowed for a target\n     */\n    isAllowed<T extends A_Component>(\n        ctor: T | A_TYPES__Component_Constructor<T>,\n        method: string\n    ): A_ManifestChecker {\n        const componentCtor = typeof ctor === 'function' ? ctor : ctor.constructor as A_TYPES__Component_Constructor;\n        return new A_ManifestChecker(this, componentCtor, method);\n    }\n\n    /**\n     * Internal method to check if access is allowed\n     */\n    internal_checkAccess(query: A_UTILS_TYPES__ManifestQuery): boolean {\n        const componentName = query.component.name;\n        const methodName = query.method;\n        const targetName = query.target.name;\n\n        // Find matching rules, sorted by specificity (method-specific rules first)\n        const matchingRules = this.rules\n            .filter(rule =>\n                rule.componentRegex.test(componentName) &&\n                rule.methodRegex.test(methodName)\n            )\n            .sort((a, b) => {\n                // Method-specific rules (not .* pattern) should come before general rules\n                const aIsGeneral = a.methodRegex.source === '.*';\n                const bIsGeneral = b.methodRegex.source === '.*';\n\n                if (aIsGeneral && !bIsGeneral) return 1;  // b comes first\n                if (!aIsGeneral && bIsGeneral) return -1; // a comes first\n                return 0; // same priority\n            });\n\n        // If no rules match, allow by default\n        if (matchingRules.length === 0) {\n            return true;\n        }\n\n        // Process rules in order of specificity (most specific first)\n        for (const rule of matchingRules) {\n            // If this rule has an exclusion that matches, deny access\n            if (rule.excludeRegex && rule.excludeRegex.test(targetName)) {\n                return false;\n            }\n\n            // If this rule has an apply list, check if target is in it\n            if (rule.applyRegex) {\n                return rule.applyRegex.test(targetName);\n            }\n        }\n\n        // If we have rules but no specific apply/exclude, allow by default\n        return true;\n    }\n\n    isExcluded<T extends A_Component>(\n        ctor: T | A_TYPES__Component_Constructor<T>,\n        method: string\n    ): A_ManifestChecker {\n        const componentCtor = typeof ctor === 'function' ? ctor : ctor.constructor as A_TYPES__Component_Constructor;\n        return new A_ManifestChecker(this, componentCtor, method, true);\n    }\n}\n","\n\nexport enum A_MemoryFeatures {\n    /**\n     * Allows to extend initialization logic and behavior\n     */\n    onInit = 'onInit',\n\n    /**\n     * Allows to extend destruction logic and behavior\n     */\n    onDestroy = 'onDestroy',\n\n    /**\n     * Allows to extend expiration logic and behavior\n     */\n    onExpire = 'onExpire',\n\n    /**\n     * Allows to extend error handling logic and behavior\n     */\n    onError = 'onError',\n\n    /**\n     * Allows to extend serialization logic and behavior\n     */\n    onSerialize = 'onSerialize',\n\n    /**\n     * Allows to extend set operation logic and behavior\n     */\n    onSet = 'onSet',\n    /**\n     * Allows to extend get operation logic and behavior\n     */\n    onGet = 'onGet',\n    /**\n     * Allows to extend drop operation logic and behavior\n     */\n    onDrop = 'onDrop',\n    /**\n     * Allows to extend clear operation logic and behavior\n     */\n    onClear = 'onClear',\n    /**\n     * Allows to extend has operation logic and behavior\n     */\n    onHas = 'onHas',\n}","import { A_Error, A_Fragment, A_TYPES__Fragment_Serialized } from \"@adaas/a-concept\";\nimport { error } from \"console\";\n\n\n\n\nexport class A_MemoryContext<\n    _MemoryType extends Record<string, any> = Record<string, any>,\n    _SerializedType extends A_TYPES__Fragment_Serialized = A_TYPES__Fragment_Serialized\n> extends A_Fragment<_MemoryType, _MemoryType & _SerializedType> {\n\n\n    set<K extends keyof _MemoryType>(param: 'error', value: A_Error): void\n    set<K extends keyof _MemoryType>(param: K, value: _MemoryType[K]): void\n    set<K extends keyof _MemoryType>(param: K | 'error', value: _MemoryType[K]): void {\n        super.set(param , value);\n    }\n\n\n    get<K extends keyof A_Error>(param: 'error'): A_Error | undefined\n    get<K extends keyof _MemoryType>(param: K): _MemoryType[K] | undefined\n    get<K extends keyof _MemoryType>(param: K | 'error'): _MemoryType[K] | undefined {\n        return super.get(param);\n    }\n\n}","import { A_Error } from \"@adaas/a-concept\";\n\n\nexport class A_MemoryError extends A_Error {\n\n    static readonly MemoryInitializationError = 'Memory initialization error';\n\n    static readonly MemoryDestructionError = 'Memory destruction error';\n\n    static readonly MemoryGetError = 'Memory GET operation failed';\n\n    static readonly MemorySetError = 'Memory SET operation failed';\n\n    static readonly MemoryDropError = 'Memory DROP operation failed';\n\n    static readonly MemoryClearError = 'Memory CLEAR operation failed';\n\n    static readonly MemoryHasError = 'Memory HAS operation failed';\n\n    static readonly MemorySerializeError = 'Memory toJSON operation failed';\n}\n","import { A_Component, A_Inject, A_Scope, A_Feature, A_Dependency, A_Context } from \"@adaas/a-concept\";\nimport { A_MemoryFeatures } from \"./A-Memory.constants\";\nimport { A_MemoryContext } from \"./A-Memory.context\";\nimport { A_MemoryError } from \"./A-Memory.error\";\nimport { A_OperationContext } from \"../A-Operation/A-Operation.context\";\nimport { A_MemoryOperationContext } from \"./A-Memory.types\";\n\n\nexport class A_Memory<\n    _StorageType extends Record<string, any> = Record<string, any>,\n    _SerializedType extends Record<string, any> = Record<string, any>\n> extends A_Component {\n\n    protected _ready?: Promise<void>\n\n\n    get ready(): Promise<void> {\n        if (!this._ready) {\n            this._ready = this.init();\n        }\n        return this._ready;\n    }\n\n    // ======================================================================\n    // ======================A-Memory Lifecycle Hooks========================\n    // ======================================================================\n\n    @A_Feature.Extend()\n    /**\n     * Handles errors during memory operations\n     */\n    async [A_MemoryFeatures.onError](...args: any[]): Promise<void> {\n        // Handle error\n    }\n\n    @A_Feature.Extend()\n    /**\n     * Handles memory expiration\n     */\n    async [A_MemoryFeatures.onExpire](...args: any[]): Promise<void> {\n        // Clear memory on expire\n    }\n\n    @A_Feature.Extend()\n    /**\n     * Initializes the memory context\n     */\n    async [A_MemoryFeatures.onInit](\n        @A_Inject(A_MemoryContext) context: A_MemoryContext<_StorageType>,\n        ...args: any[]\n    ): Promise<void> {\n        // Initialize memory\n        if (!context) {\n            context = new A_MemoryContext<_StorageType>();\n            A_Context.scope(this).register(context);\n        }\n    }\n\n    @A_Feature.Extend()\n    async [A_MemoryFeatures.onDestroy](\n        @A_Inject(A_MemoryContext) context: A_MemoryContext<_StorageType>,\n        ...args: any[]): Promise<void> {\n        // Cleanup memory\n        context.clear();\n    }\n\n    @A_Feature.Extend()\n    /**\n     * Handles the 'get' operation for retrieving a value from memory\n     */\n    async [A_MemoryFeatures.onGet](\n        @A_Dependency.Required()\n        @A_Inject(A_OperationContext) operation: A_MemoryOperationContext,\n        @A_Inject(A_MemoryContext) context: A_MemoryContext<_StorageType>,\n        ...args: any[]\n    ): Promise<void> {\n        // Handle get operation\n        operation.succeed(context.get(operation.params.key));\n    }\n\n    @A_Feature.Extend()\n    /**\n     * Handles the 'has' operation for checking existence of a key in memory\n     */\n    async [A_MemoryFeatures.onHas](\n        @A_Dependency.Required()\n        @A_Inject(A_OperationContext) operation: A_MemoryOperationContext<boolean>,\n        @A_Inject(A_MemoryContext) context: A_MemoryContext<_StorageType>,\n        ...args: any[]\n    ): Promise<void> {\n        // Handle has operation\n        operation.succeed(context.has(operation.params.key));\n    }\n\n    @A_Feature.Extend()\n    /**\n     * Handles the 'set' operation for saving a value in memory\n     */\n    async [A_MemoryFeatures.onSet](\n        @A_Dependency.Required()\n        @A_Inject(A_OperationContext) operation: A_MemoryOperationContext,\n        @A_Inject(A_MemoryContext) context: A_MemoryContext<_StorageType>,\n        ...args: any[]\n    ): Promise<void> {\n        // Handle set operation\n        context.set(operation.params.key, operation.params.value);\n    }\n\n    @A_Feature.Extend()\n    /**\n     * Handles the 'drop' operation for removing a value from memory\n     */\n    async [A_MemoryFeatures.onDrop](\n        @A_Dependency.Required()\n        @A_Inject(A_OperationContext) operation: A_MemoryOperationContext,\n        @A_Inject(A_MemoryContext) context: A_MemoryContext<_StorageType>,\n        ...args: any[]\n    ): Promise<void> {\n        // Handle drop operation\n        context.drop(operation.params.key);\n    }\n\n    @A_Feature.Extend()\n    /**\n     * Handles the 'clear' operation for clearing all values from memory\n     */\n    async [A_MemoryFeatures.onClear](\n        @A_Dependency.Required()\n        @A_Inject(A_OperationContext) operation: A_MemoryOperationContext,\n        @A_Inject(A_MemoryContext) context: A_MemoryContext<_StorageType>,\n        ...args: any[]\n    ): Promise<void> {\n        // Handle clear operation\n        context.clear();\n    }\n\n\n\n    // ======================================================================\n    // =========================A-Memory Methods=============================\n    // ======================================================================\n\n    /**\n     * Initializes the memory context\n     */\n    async init() {\n        if (this._ready)\n            return this._ready;\n\n        const scope = new A_Scope({ name: 'A-Memory-Init-Scope' })\n            .inherit(A_Context.scope(this));\n\n        try {\n            await this.call(A_MemoryFeatures.onInit, scope);\n\n        } catch (error) {\n            const initError = new A_MemoryError({\n                title: A_MemoryError.MemoryInitializationError,\n                description: 'An error occurred during memory initialization',\n                originalError: error\n            })\n\n            scope.register(initError);\n\n            await this.call(A_MemoryFeatures.onError, scope);\n\n            scope.destroy();\n\n            throw initError;\n        }\n    }\n\n    /**\n     * Destroys the memory context\n     *\n     * This method is responsible for cleaning up any resources\n     * used by the memory context and resetting its state.\n     */\n    async destroy() {\n\n        const scope = new A_Scope({ name: 'A-Memory-Destroy-Scope' })\n            .inherit(A_Context.scope(this));\n\n        try {\n            this._ready = undefined;\n\n            await this.call(A_MemoryFeatures.onDestroy, scope);\n\n        } catch (error) {\n            const destroyError = new A_MemoryError({\n                title: A_MemoryError.MemoryDestructionError,\n                description: 'An error occurred during memory destruction',\n                originalError: error\n            })\n\n            scope.register(destroyError);\n\n\n            await this.call(A_MemoryFeatures.onError, scope);\n\n            scope.destroy();\n\n            throw destroyError;\n        }\n    }\n\n    /**\n      * Retrieves a value from the context memory\n      * \n      * @param key - memory key to retrieve\n      * @returns - value associated with the key or undefined if not found\n      */\n    async get<K extends keyof _StorageType>(\n        /**\n         * Key to retrieve the value for\n         */\n        key: K\n    ): Promise<_StorageType[K] | undefined> {\n\n        const operation = new A_OperationContext('get', { key });\n\n        const scope = new A_Scope({\n            name: 'A-Memory-Get-Operation-Scope',\n            fragments: [operation]\n        });\n\n        try {\n\n            await this.call(A_MemoryFeatures.onGet, scope);\n\n            scope.destroy();\n\n            return operation.result;\n\n        } catch (error) {\n            const getError = new A_MemoryError({\n                title: A_MemoryError.MemoryGetError,\n                description: `An error occurred while getting the value for key \"${String(key)}\"`,\n                originalError: error\n            });\n\n            scope.register(getError);\n\n            await this.call(A_MemoryFeatures.onError, scope);\n\n            scope.destroy();\n\n            throw getError;\n        }\n    }\n\n    /**\n     * Checks if a value exists in the context memory\n     * \n     * @param key - memory key to check\n     * @returns - true if key exists, false otherwise\n     */\n    async has(key: keyof _StorageType): Promise<boolean> {\n        const operation = new A_OperationContext('has', { key });\n\n        const scope = new A_Scope({\n            name: 'A-Memory-Has-Operation-Scope',\n            fragments: [operation]\n        });\n\n        try {\n\n            await this.call(A_MemoryFeatures.onHas, scope);\n\n            scope.destroy();\n\n            return operation.result;\n\n        } catch (error) {\n            const getError = new A_MemoryError({\n                title: A_MemoryError.MemoryHasError,\n                description: `An error occurred while checking existence for key \"${String(key)}\"`,\n                originalError: error\n            });\n\n            scope.register(getError);\n\n            await this.call(A_MemoryFeatures.onError, scope);\n\n            scope.destroy();\n\n            throw getError;\n        }\n    }\n\n    /**\n     * Saves a value in the context memory\n     * \n     * @param key \n     * @param value \n     */\n    async set<K extends keyof _StorageType>(\n        /**\n         * Key to save the value under\n         */\n        key: K,\n        /**\n         * Value to save\n         */\n        value: _StorageType[K]\n    ): Promise<void> {\n        const operation = new A_OperationContext('set', { key, value });\n\n        const scope = new A_Scope({\n            name: 'A-Memory-Set-Operation-Scope',\n            fragments: [operation]\n        });\n\n        try {\n\n            await this.call(A_MemoryFeatures.onSet, scope);\n\n        } catch (error) {\n            const setError = new A_MemoryError({\n                title: A_MemoryError.MemorySetError,\n                description: `An error occurred while setting the value for key \"${String(key)}\"`,\n                originalError: error\n            });\n\n            scope.register(setError);\n\n            await this.call(A_MemoryFeatures.onError, scope);\n\n            scope.destroy();\n\n            throw setError;\n        }\n    }\n\n\n    /**\n     * Removes a value from the context memory by key\n     * \n     * @param key \n     */\n    async drop(key: keyof _StorageType): Promise<void> {\n\n        const operation = new A_OperationContext('drop', { key });\n\n        const scope = new A_Scope({\n            name: 'A-Memory-Drop-Operation-Scope',\n            fragments: [operation]\n        });\n\n        try {\n\n            await this.call(A_MemoryFeatures.onDrop, scope);\n\n        } catch (error) {\n            const dropError = new A_MemoryError({\n                title: A_MemoryError.MemoryDropError,\n                description: `An error occurred while dropping the value for key \"${String(key)}\"`,\n                originalError: error\n            });\n\n            scope.register(dropError);\n\n            await this.call(A_MemoryFeatures.onError, scope);\n\n            scope.destroy();\n\n            throw dropError;\n        }\n    }\n\n    /**\n     * Clears all stored values in the context memory\n     */\n    async clear(): Promise<void> {\n        const operation = new A_OperationContext('clear');\n\n        const scope = new A_Scope({\n            name: 'A-Memory-Clear-Operation-Scope',\n            fragments: [operation]\n        });\n\n        try {\n\n            await this.call(A_MemoryFeatures.onClear, scope);\n\n        } catch (error) {\n            const clearError = new A_MemoryError({\n                title: A_MemoryError.MemoryClearError,\n                description: `An error occurred while clearing the memory`,\n                originalError: error\n            });\n\n            scope.register(clearError);\n\n            await this.call(A_MemoryFeatures.onError, scope);\n\n            scope.destroy();\n\n            throw clearError;\n        }\n    }\n\n\n    /**\n     * Serializes the memory context to a JSON object\n     *  \n     * @returns - serialized memory object \n     */\n    async toJSON(): Promise<_SerializedType> {\n        const operation = new A_OperationContext('serialize');\n\n        const scope = new A_Scope({\n            name: 'A-Memory-Serialize-Operation-Scope',\n            fragments: [operation]\n        });\n\n        try {\n\n            await this.call(A_MemoryFeatures.onSerialize, scope);\n\n            return operation.result as _SerializedType;\n\n        } catch (error) {\n            const serializeError = new A_MemoryError({\n                title: A_MemoryError.MemorySerializeError,\n                description: `An error occurred while serializing the memory`,\n                originalError: error\n            });\n\n            scope.register(serializeError);\n\n            await this.call(A_MemoryFeatures.onError, scope);\n\n            scope.destroy();\n\n            throw serializeError;\n        }\n\n    }\n}","export class A_Deferred<T> {\n    public promise: Promise<T>;\n    private resolveFn!: (value: T | PromiseLike<T>) => void;\n    private rejectFn!: (reason?: any) => void;\n\n    /**\n     * Creates a deferred promise\n     * @returns A promise that can be resolved or rejected later\n     */\n    constructor() {\n        this.promise = new Promise<T>((resolve, reject) => {\n            this.resolveFn = resolve;\n            this.rejectFn = reject;\n        });\n    }\n\n    resolve(value: T | PromiseLike<T>): void {\n        this.resolveFn(value);\n    }\n\n    reject(reason?: any): void {\n        this.rejectFn(reason);\n    }\n}","import { A_Deferred } from \"./A-Deferred.class\";\nimport { A_Error } from \"@adaas/a-concept\";\nimport { A_UTILS_TYPES__ScheduleObjectCallback, A_UTILS_TYPES__ScheduleObjectConfig } from \"./A-Schedule.types\";\n\nexport class A_ScheduleObject<T extends any = any> {\n\n    private timeout!: NodeJS.Timeout;\n    private deferred!: A_Deferred<T>;\n\n    private config: A_UTILS_TYPES__ScheduleObjectConfig = {\n        /**\n         * If the timeout is cleared, should the promise resolve or reject?\n         * BY Default it rejects\n         * \n         * !!!NOTE: If the property is set to true, the promise will resolve with undefined\n         */\n        resolveOnClear: false\n    };\n\n\n    /**\n     * Creates a scheduled object that will execute the action after specified milliseconds\n     * \n     * \n     * @param ms - milliseconds to wait before executing the action\n     * @param action - the action to execute\n     * @param config - configuration options for the schedule object\n     */\n    constructor(\n        /**\n         * Milliseconds to wait before executing the action\n         */\n        ms: number,\n        /**\n         * The action to execute after the specified milliseconds\n         */\n        action: A_UTILS_TYPES__ScheduleObjectCallback<T>,\n        /**\n         * Configuration options for the schedule object\n         */\n        config?: A_UTILS_TYPES__ScheduleObjectConfig\n    ) {\n        if (config)\n            this.config = { ...this.config, ...config };\n\n        this.deferred = new A_Deferred<T>();\n\n        this.timeout = setTimeout(\n            () => action()\n                .then((...args) => this.deferred.resolve(...args))\n                .catch((...args) => this.deferred.reject(...args)),\n            ms\n        );\n    }\n\n    get promise(): Promise<T> {\n        return this.deferred.promise;\n    }\n\n    clear(): void {\n        if (this.timeout) {\n            clearTimeout(this.timeout);\n\n            if (this.config.resolveOnClear)\n                this.deferred.resolve(undefined as T);\n            else\n                this.deferred.reject(new A_Error(\"Timeout Cleared\"));\n        }\n    }\n}\n\n","import { A_Component, A_TypeGuards } from \"@adaas/a-concept\";\nimport { A_ScheduleObject } from \"./A-ScheduleObject.class\";\nimport { A_UTILS_TYPES__ScheduleObjectCallback, A_UTILS_TYPES__ScheduleObjectConfig } from \"./A-Schedule.types\";\n\n\n\nexport class A_Schedule extends A_Component {\n\n    /**\n     * Allows to schedule a callback for particular time in the future\n     * \n     * @param timestamp - Unix timestamp in milliseconds\n     * @param callback - The callback to execute\n     * @returns A promise that resolves to the schedule object\n     */\n    async schedule<T extends any = any>(\n        /**\n         * Unix timestamp in milliseconds\n         */\n        timestamp: number,\n        /**\n         * The callback to execute\n         */\n        callback: A_UTILS_TYPES__ScheduleObjectCallback<T>,\n        /**\n         * Configuration options for the schedule object\n         */\n        config?: A_UTILS_TYPES__ScheduleObjectConfig\n    ): Promise<A_ScheduleObject<T>>\n    async schedule<T extends any = any>(\n        /**\n         * ISO date string representing the date and time to schedule the callback for\n         */\n        date: string,\n        /**\n         * The callback to execute\n         */\n        callback: A_UTILS_TYPES__ScheduleObjectCallback<T>,\n        /**\n        * Configuration options for the schedule object\n        */\n        config?: A_UTILS_TYPES__ScheduleObjectConfig\n    ): Promise<A_ScheduleObject<T>>\n    async schedule<T extends any = any>(\n        date: string | number,\n        callback: A_UTILS_TYPES__ScheduleObjectCallback<T>,\n        config?: A_UTILS_TYPES__ScheduleObjectConfig\n    ): Promise<A_ScheduleObject<T>> {\n\n        const timestamp = A_TypeGuards.isString(date)\n            ? (new Date(date)).getTime()\n            : date;\n\n        return new A_ScheduleObject<T>(\n            timestamp - Date.now(),\n            callback,\n            config\n        );\n    }\n\n\n\n    /**\n     * Allows to execute callback after particular delay in milliseconds\n     * So the callback will be executed after the specified delay\n     * \n     * @param ms \n     */\n    async delay<T extends any = any>(\n        /**\n         * Delay in milliseconds\n         */\n        ms: number,\n        /**\n         * The callback to execute after the delay\n         */\n        callback: A_UTILS_TYPES__ScheduleObjectCallback<T>,\n        /**\n        * Configuration options for the schedule object\n        */\n        config?: A_UTILS_TYPES__ScheduleObjectConfig\n    ): Promise<A_ScheduleObject<T>> {\n        return new A_ScheduleObject<T>(\n            ms,\n            callback,\n            config\n        );\n    }\n}"]}