{"version":3,"file":"kephas-ngx-core.mjs","sources":["../../../../projects/kephas/ngx-core/src/lib/angularTarget.ts","../../../../projects/kephas/ngx-core/src/lib/components/widgetBase.ts","../../../../projects/kephas/ngx-core/src/lib/components/valueEditorBase.ts","../../../../projects/kephas/ngx-core/src/lib/queries/commandQuery.ts","../../../../projects/kephas/ngx-core/src/lib/queries/messageQuery.ts","../../../../projects/kephas/ngx-core/src/lib/services/http/browserXhrFactory.ts","../../../../projects/kephas/ngx-core/src/lib/services/http/httpInterceptingHandler.ts","../../../../projects/kephas/ngx-core/src/lib/services/appSettings.ts","../../../../projects/kephas/ngx-core/src/lib/services/httpCommandProcessorClient.ts","../../../../projects/kephas/ngx-core/src/lib/services/httpMessageProcessorClient.ts","../../../../projects/kephas/ngx-core/src/lib/services/configuration.ts","../../../../projects/kephas/ngx-core/src/lib/rootProvidersRegistry.ts","../../../../projects/kephas/ngx-core/src/lib/kephas.module.ts","../../../../projects/kephas/ngx-core/src/public-api.ts","../../../../projects/kephas/ngx-core/src/kephas-ngx-core.ts"],"sourcesContent":["export const NgTarget: string = 'ng';\r\n","import {\r\n    ElementRef, ViewContainerRef, ChangeDetectorRef,\r\n    Input, SimpleChanges,\r\n    OnInit, OnChanges, AfterViewInit,\r\n    Type, Provider, forwardRef, QueryList, ViewChildren, OnDestroy, Component\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { Logger } from '@kephas/core';\r\nimport { NotificationService } from '@kephas/ui';\r\n\r\n/**\r\n * Provides base functionality for a widget.\r\n *\r\n * @export\r\n * @class WidgetBase\r\n */\r\n@Component({\r\n  template: ''\r\n})\r\nexport abstract class WidgetBase implements OnInit, AfterViewInit, OnChanges, OnDestroy {\r\n    /**\r\n     * Gets the logger.\r\n     *\r\n     * @protected\r\n     * @type {Logger}\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected readonly logger: Logger;\r\n\r\n    /**\r\n     * Gets the notification service.\r\n     *\r\n     * @protected\r\n     * @type {NotificationService}\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected readonly notification: NotificationService;\r\n\r\n    /**\r\n     * Gets the change detector service.\r\n     *\r\n     * @protected\r\n     * @type {ChangeDetectorRef}\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected readonly changeDetector: ChangeDetectorRef;\r\n\r\n    private _isVisible = true;\r\n    private _readonly = false;\r\n    private _childWidgets?: QueryList<WidgetBase>;\r\n\r\n    /**\r\n     * Creates an instance of WidgetBase.\r\n     * @param {ElementRef} elementRef The element reference.\r\n     * @param {ViewContainerRef} viewContainerRef The view container reference.\r\n     * @memberof WidgetBase\r\n     */\r\n    constructor(\r\n        public readonly elementRef: ElementRef,\r\n        public readonly viewContainerRef: ViewContainerRef,\r\n    ) {\r\n        const injector = viewContainerRef.injector;\r\n        this.logger = injector.get(Logger);\r\n        this.notification = injector.get(NotificationService);\r\n        this.changeDetector = injector.get(ChangeDetectorRef);\r\n    }\r\n\r\n    /**\r\n     * Gets or sets the child editors query.\r\n     *\r\n     * @readonly\r\n     * @type {QueryList<EditorBase<any>>}\r\n     * @memberof EditorBase\r\n     */\r\n    @ViewChildren(WidgetBase)\r\n    get childWidgets(): QueryList<WidgetBase> {\r\n        return this._childWidgets!;\r\n    }\r\n    set childWidgets(value: QueryList<WidgetBase>) {\r\n        if (this._childWidgets === value) {\r\n            return;\r\n        }\r\n\r\n        const oldValue = this._childWidgets;\r\n        this._childWidgets = value;\r\n        this.onChildWidgetsChanged(oldValue, value);\r\n    }\r\n\r\n    /**\r\n     * Gets or sets a value indicating whether the widget is visible.\r\n     *\r\n     * @readonly\r\n     * @type {boolean}\r\n     * @memberof WidgetBase\r\n     */\r\n    @Input()\r\n    get isVisible(): boolean {\r\n        return this._isVisible;\r\n    }\r\n    set isVisible(value: boolean) {\r\n        if (this._isVisible === value) {\r\n            return;\r\n        }\r\n\r\n        this._isVisible = value;\r\n    }\r\n\r\n    /**\r\n     * Gets or sets a value indicating whether the editor allows edits or not.\r\n     *\r\n     * @readonly\r\n     * @type {boolean}\r\n     * @memberof EditorBase\r\n     */\r\n    @Input()\r\n    get readonly(): boolean {\r\n        return this._readonly;\r\n    }\r\n    set readonly(value: boolean) {\r\n        if (this._readonly === value) {\r\n            return;\r\n        }\r\n\r\n        const oldValue = this._readonly;\r\n        this._readonly = value;\r\n        this.onReadOnlyChanged(oldValue, value);\r\n    }\r\n\r\n    /**\r\n     * A callback method that is invoked immediately after the\r\n     * default change detector has checked the directive's\r\n     * data-bound properties for the first time,\r\n     * and before any of the view or content children have been checked.\r\n     * It is invoked only once when the directive is instantiated.\r\n     *\r\n     * @memberof WidgetBase\r\n     */\r\n    ngOnInit(): void {\r\n    }\r\n\r\n    /**\r\n     * A callback method that is invoked immediately after\r\n     * Angular has completed initialization of a component's view.\r\n     * It is invoked only once when the view is instantiated.\r\n     *\r\n     * @memberof WidgetBase\r\n     */\r\n    ngAfterViewInit(): void {\r\n    }\r\n\r\n    /**\r\n     * A callback method that is invoked immediately after the\r\n     * default change detector has checked data-bound properties\r\n     * if at least one has changed, and before the view and content\r\n     * children are checked.\r\n     *\r\n     * @param changes The changed properties.\r\n     * @memberof WidgetBase\r\n     */\r\n    ngOnChanges(changes: SimpleChanges): void {\r\n    }\r\n\r\n    /**\r\n     * A callback method that performs custom clean-up, invoked immediately\r\n     * after a directive, pipe, or service instance is destroyed.\r\n     */\r\n    ngOnDestroy(): void {\r\n    }\r\n\r\n    /**\r\n     * When overridden in a derived class, this method is called when the read only state changes.\r\n     *\r\n     * @protected\r\n     * @param {boolean} oldValue The old value.\r\n     * @param {boolean} newValue The new value.\r\n     *\r\n     * @memberof WidgetBase\r\n     */\r\n    protected onReadOnlyChanged(oldValue: boolean, newValue: boolean): void {\r\n    }\r\n\r\n    /**\r\n     * When overridden in a derived class, this method is called when the child widgets query changed.\r\n     *\r\n     * @protected\r\n     * @param {QueryList<EditorBase<any>>} oldValue The old query.\r\n     * @param {QueryList<EditorBase<any>>} newValue The new query.\r\n     *\r\n     * @memberof EditorBase\r\n     */\r\n    protected onChildWidgetsChanged(oldValue?: QueryList<WidgetBase>, newValue?: QueryList<WidgetBase>): void {\r\n    }\r\n}\r\n\r\n/**\r\n * This function provides the component as a WidgetBase,\r\n * to be able to import it over this base class instead of over its own class.\r\n *\r\n * For example, use it as @ViewChild(WidgetBase) or @ViewChildren(WidgetBase).\r\n *\r\n * @export\r\n * @param {Type<any>} componentType The component type.\r\n * @returns {Provider} The provider.\r\n */\r\nexport function provideWidget(componentType: Type<any>): Provider {\r\n    return {\r\n        provide: WidgetBase,\r\n        useExisting: forwardRef(() => componentType)\r\n    };\r\n}\r\n\r\n/**\r\n * This function provides the component as a NG_VALUE_ACCESSOR.\r\n * Thus, it is possible to bind it like this:\r\n * <my-component [(ngModel)]=\"boundProperty\"></my-component>\r\n *\r\n * @export\r\n * @param {Type<any>} componentType The component type.\r\n * @returns {Provider} The provider.\r\n */\r\nexport function provideValueAccessor(componentType: Type<any>): Provider {\r\n    return {\r\n        provide: NG_VALUE_ACCESSOR,\r\n        useExisting: forwardRef(() => componentType),\r\n        multi: true\r\n    };\r\n}\r\n","import {\r\n    Input, ElementRef, ViewContainerRef, Component\r\n} from '@angular/core';\r\nimport { ControlValueAccessor } from '@angular/forms';\r\nimport { WidgetBase } from './widgetBase';\r\n\r\n/**\r\n * Provides a base implementation for value editors.\r\n *\r\n * @export\r\n * @abstract\r\n * @class ValueEditorBase\r\n * @implements {OnInit}\r\n * @implements {AfterViewInit}\r\n * @implements {ControlValueAccessor}\r\n * @template TValue The value type.\r\n */\r\n@Component({\r\n  template: ''\r\n})\r\nexport abstract class ValueEditorBase<TValue>\r\n    extends WidgetBase\r\n    implements ControlValueAccessor {\r\n\r\n    /**\r\n     * Gets or sets the value description.\r\n     *\r\n     * @type {string}\r\n     * @memberof ValueEditorBase\r\n     */\r\n    public description?: string;\r\n\r\n    /**\r\n     * Gets or sets the value prompt.\r\n     *\r\n     * @type {string}\r\n     * @memberof ValueEditorBase\r\n     */\r\n    public prompt?: string;\r\n\r\n    /**\r\n     * Gets or sets a value indicating whether the value is changed from the change event.\r\n     *\r\n     * @protected\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected valueChangeFromEvent = false;\r\n\r\n    /**\r\n     * Gets or sets a value indicating whether the value is changed from the value property.\r\n     *\r\n     * @protected\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected valueChangeFromValue = false;\r\n\r\n    private _valueBeforeChange?: TValue;\r\n\r\n    /**\r\n     * Creates an instance of ValueEditorBase.\r\n     *\r\n     * @param {ElementRef} elementRef The element reference.\r\n     * @param {ViewContainerRef} viewContainerRef The view container reference.\r\n     * @memberof ValueEditorBase\r\n     */\r\n    constructor(\r\n        elementRef: ElementRef,\r\n        viewContainerRef: ViewContainerRef,\r\n    ) {\r\n        super(elementRef, viewContainerRef);\r\n    }\r\n\r\n    /**\r\n     * Gets or sets the value to edit.\r\n     *\r\n     * @type {TValue}\r\n     * @memberOf ValueEditorBase\r\n     */\r\n    @Input()\r\n    get value(): TValue {\r\n        return this.getEditorValue();\r\n    }\r\n    set value(value: TValue) {\r\n        if (this._valueBeforeChange === value) {\r\n            return;\r\n        }\r\n\r\n        this.updateEditor(value);\r\n    }\r\n\r\n    /**\r\n     * Updates the underlying editor with the provided value.\r\n     *\r\n     * @protected\r\n     * @param {TValue} value\r\n     * @returns {boolean}\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected updateEditor(value: TValue): boolean {\r\n        if (this.valueChangeFromValue) {\r\n            return false;\r\n        }\r\n\r\n        const prevValueChangeFromValue = this.valueChangeFromValue;\r\n        this.valueChangeFromValue = true;\r\n\r\n        try {\r\n            const oldValue = this._valueBeforeChange;\r\n            this.onValueChanging(oldValue, value);\r\n            this._valueBeforeChange = value;\r\n\r\n            if (!this.valueChangeFromEvent) {\r\n                this.setEditorValue(value);\r\n                value = this.getEditorValue();\r\n            }\r\n\r\n            this.onValueChanged(oldValue, value);\r\n        } catch (error) {\r\n            this.logger.error(error as Error, 'Error while updating the editor.');\r\n            throw error;\r\n        } finally {\r\n            this.valueChangeFromValue = prevValueChangeFromValue;\r\n        }\r\n\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * Overridable method invoked when the value is about to be changed.\r\n     *\r\n     * @protected\r\n     * @param {(TValue | undefined)} oldValue The old value.\r\n     * @param {(TValue | undefined)} newValue The new value.\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected onValueChanging(oldValue: TValue | undefined, newValue: TValue | undefined): void {\r\n    }\r\n\r\n    /**\r\n     * Overridable method invoked after the value was changed.\r\n     *\r\n     * @protected\r\n     * @param {(TValue | undefined)} oldValue The old value.\r\n     * @param {(TValue | undefined)} newValue The new value.\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected onValueChanged(oldValue: TValue | undefined, newValue: TValue | undefined): void {\r\n        this._onChange(newValue);\r\n    }\r\n\r\n    /**\r\n     * Callback invoked from the change event of the underlying editor.\r\n     *\r\n     * @protected\r\n     * @param {*} e\r\n     * @returns\r\n     * @memberof PropertyEditorComponent\r\n     */\r\n    protected onEditorChange(e: any) {\r\n        if (this.valueChangeFromValue) {\r\n            return;\r\n        }\r\n\r\n        const prevValueChangeFromEvent = this.valueChangeFromEvent;\r\n        this.valueChangeFromEvent = true;\r\n        try {\r\n            const newValue = this.getEditorValueOnChange(e);\r\n            this.value = newValue;\r\n        } catch (error) {\r\n            this.notification.notifyError(error);\r\n        } finally {\r\n            this.valueChangeFromEvent = prevValueChangeFromEvent;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Sets the value of the underlying editor.\r\n     *\r\n     * @protected\r\n     * @param {TValue} value The value to be set.\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected abstract setEditorValue(value: TValue): void;\r\n\r\n    /**\r\n     * Gets the underlying editor's value.\r\n     *\r\n     * @protected\r\n     * @returns {TValue} The widget value.\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected abstract getEditorValue(): TValue;\r\n\r\n    /**\r\n     * Gets the underlying editor's value upon change.\r\n     *\r\n     * @protected\r\n     * @param {*} e The change event arguments.\r\n     * @returns {TValue} The widget value.\r\n     * @memberof ValueEditorBase\r\n     */\r\n    protected getEditorValueOnChange(e: any): TValue {\r\n        return this.getEditorValue();\r\n    }\r\n\r\n\r\n    /**\r\n     * Write a new value to the element.\r\n     *\r\n     * @param {*} obj The new value.\r\n     *\r\n     * @memberOf PropertyEditorComponent\r\n     */\r\n    writeValue(obj: any): void {\r\n        this.value = obj;\r\n    }\r\n\r\n    /**\r\n     * Set the function to be called when the control receives a change event.\r\n     *\r\n     * @param {*} fn The callback function.\r\n     *\r\n     * @memberOf PropertyEditorComponent\r\n     */\r\n    registerOnChange(fn: any): void {\r\n        this._onChange = fn;\r\n    }\r\n\r\n    /**\r\n     * Set the function to be called when the control receives a touch event.\r\n     *\r\n     * @param {*} fn The callback function.\r\n     *\r\n     * @memberOf PropertyEditorComponent\r\n     */\r\n    registerOnTouched(fn: any): void {\r\n        this._onTouched = fn;\r\n    }\r\n\r\n    /**\r\n     * This function is called when the control status changes to or from \"DISABLED\".\r\n     * Depending on the value, it will enable or disable the appropriate DOM element.\r\n     *\r\n     * @param {boolean} isDisabled True if the state is disabled.\r\n     *\r\n     * @memberOf PropertyEditorComponent\r\n     */\r\n    setDisabledState(isDisabled: boolean): void {\r\n    }\r\n\r\n    private _onChange = (_: any) => {\r\n        // The implementation will get overwritten by Angular in RegisterOnChange.\r\n    };\r\n\r\n    private _onTouched = () => {\r\n        // The implementation will get overwritten by Angular in RegisterOnTouched.\r\n    };\r\n}\r\n","import { Observable, BehaviorSubject, of, Subscription } from 'rxjs';\r\nimport { catchError, finalize, map, tap } from 'rxjs/operators';\r\nimport { CommandProcessorClient } from '@kephas/commands';\r\nimport { Expando } from '@kephas/core';\r\n\r\nexport interface CommandState<TArgs> extends Expando {\r\n  command?: string;\r\n  args?: TArgs;\r\n}\r\n\r\n/**\r\n * Observable based on a command query.\r\n *\r\n * @export\r\n * @abstract\r\n * @class CommandQuery\r\n * @extends {BehaviorSubject<TValue>}\r\n * @template TArgs\r\n * @template TResponseMessage\r\n * @template TValue\r\n */\r\nexport abstract class CommandQuery<TArgs, TResponseMessage, TValue> extends BehaviorSubject<TValue> {\r\n  #loading = false;\r\n  #lastError: any;\r\n\r\n  public args?: TArgs;\r\n\r\n  /**\r\n   * Creates an instance of CommandQuery.\r\n   * @param {CommandProcessorClient} processor\r\n   * @param {string} command\r\n   * @param {(r: TResponseMessage, state?: CommandState<TArgs>) => TValue} [resultMap]\r\n   * @param {(args?: TArgs, state?: CommandState<TArgs>) => TArgs} [argsMap]\r\n   * @param {TValue} [emptyResult={} as TValue]\r\n   * @memberof CommandQuery\r\n   */\r\n  constructor(\r\n    protected readonly processor: CommandProcessorClient,\r\n    protected command: string,\r\n    protected resultMap?: (r: TResponseMessage, state?: CommandState<TArgs>) => TValue,\r\n    protected argsMap?: (args?: TArgs, state?: CommandState<TArgs>) => TArgs,\r\n    protected emptyResult: TValue = {} as TValue) {\r\n    super(null!);\r\n    this.args ??= {} as TArgs;\r\n  }\r\n\r\n  /**\r\n   * Gets a value indicating whether the query is executing.\r\n   *\r\n   * @readonly\r\n   * @type {boolean}\r\n   * @memberof CommandQuery\r\n   */\r\n  get loading(): boolean {\r\n    return this.#loading;\r\n  }\r\n\r\n  /**\r\n   * Gets the last error executing this query.\r\n   *\r\n   * @readonly\r\n   * @type {*}\r\n   * @memberof CommandQuery\r\n   */\r\n  get lastError(): any {\r\n    return this.#lastError;\r\n  }\r\n\r\n  /**\r\n   * Executes the command asynchronously.\r\n   *\r\n   * @param {CommandState<TArgs>} [state]\r\n   * @memberof CommandQuery\r\n   */\r\n  public execute(state?: CommandState<TArgs>): void {\r\n    // no need to unsubscribe, as this is an auto-complete observable.\r\n    this.fetch(state?.command ?? this.command, state?.args ?? this.args!, state)\r\n      .subscribe(x => super.next(x));\r\n  }\r\n\r\n  protected fetch(command: string, args?: TArgs, state?: CommandState<TArgs>): Observable<TValue> {\r\n    this.#loading = true;\r\n\r\n    args = this.mapArgs(args, state);\r\n\r\n    return this.processor\r\n      .process(command, args!)\r\n      .pipe(\r\n        map(response => {\r\n          this.#lastError = undefined;\r\n          return this.mapResponse(response as unknown as TResponseMessage, state);\r\n        }),\r\n        finalize(() => this.#loading = false),\r\n        catchError(err => {\r\n          this.#lastError = err;\r\n          return of(this.emptyResult);\r\n        })\r\n      );\r\n  }\r\n\r\n  protected mapResponse(response: TResponseMessage, state?: CommandState<TArgs>): TValue {\r\n    return this.resultMap ? this.resultMap(response, state) : response as unknown as TValue;\r\n  }\r\n\r\n  protected mapArgs(args?: TArgs, state?: CommandState<TArgs>): TArgs | undefined {\r\n    return this.argsMap ? this.argsMap(args, state) : args;\r\n  }\r\n}\r\n","import { Observable, BehaviorSubject, of, Subscription } from 'rxjs';\r\nimport { catchError, finalize, map, tap } from 'rxjs/operators';\r\nimport { MessageProcessorClient, ResponseMessage } from '@kephas/messaging';\r\nimport { Expando, Type } from '@kephas/core';\r\n\r\nexport interface MessageState<TMessage> extends Expando {\r\n  message?: TMessage;\r\n}\r\n\r\n/**\r\n * Observable based on a message query.\r\n *\r\n * @export\r\n * @abstract\r\n * @class MessageQuery\r\n * @extends {BehaviorSubject<TValue>}\r\n * @template TMessage\r\n * @template TResponseMessage\r\n * @template TValue\r\n */\r\nexport abstract class MessageQuery<TMessage, TResponseMessage extends ResponseMessage, TValue> extends BehaviorSubject<TValue> {\r\n  #loading = false;\r\n  #lastError: any;\r\n\r\n  /**\r\n   * Creates an instance of MessageQuery.\r\n   * @param {MessageProcessorClient} processor\r\n   * @param {(r: TResponseMessage, state?: MessageState<TMessage>) => TValue} [resultMap]\r\n   * @param {(m: TMessage, state?: MessageState<TMessage>) => TMessage} [messageMap]\r\n   * @param {TValue} [emptyResult={} as TValue]\r\n   * @memberof MessageQuery\r\n   */\r\n  constructor(\r\n    protected readonly processor: MessageProcessorClient,\r\n    protected resultMap?: (r: TResponseMessage, state?: MessageState<TMessage>) => TValue,\r\n    protected messageMap?: (m: TMessage, state?: MessageState<TMessage>) => TMessage,\r\n    protected emptyResult: TValue = {} as TValue) {\r\n    super(null!);\r\n  }\r\n\r\n  /**\r\n   * Gets a value indicating whether the query is executing.\r\n   *\r\n   * @readonly\r\n   * @type {boolean}\r\n   * @memberof CommandQuery\r\n   */\r\n  get loading(): boolean {\r\n    return this.#loading;\r\n  }\r\n\r\n  /**\r\n   * Gets the last error executing this query.\r\n   *\r\n   * @readonly\r\n   * @type {*}\r\n   * @memberof CommandQuery\r\n   */\r\n  get lastError(): any {\r\n    return this.#lastError;\r\n  }\r\n\r\n  public execute(state?: MessageState<TMessage>): void {\r\n    // no need to unsubscribe, as this is an auto-complete observable.\r\n    this.fetch(state?.message, state)\r\n      .subscribe(x => super.next(x));\r\n  }\r\n\r\n  protected fetch(message: any, state?: MessageState<TMessage>): Observable<TValue> {\r\n    this.#loading = true;\r\n\r\n    message = this.mapMessage(message, state);\r\n\r\n    return this.processor\r\n      .process(message)\r\n      .pipe(\r\n        map(response => {\r\n          this.#lastError = undefined;\r\n          return this.mapResponse(response as unknown as TResponseMessage, state);\r\n        }),\r\n        finalize(() => this.#loading = false),\r\n        catchError(err => {\r\n          this.#lastError = err;\r\n          return of(this.emptyResult);\r\n        })\r\n      );\r\n  }\r\n\r\n  protected mapResponse(response: TResponseMessage, state?: MessageState<TMessage>): TValue {\r\n    return this.resultMap ? this.resultMap(response, state) : response as unknown as TValue;\r\n  }\r\n\r\n  protected mapMessage(message: TMessage, state?: MessageState<TMessage>): TMessage {\r\n    return this.messageMap ? this.messageMap(message, state) : message;\r\n  }\r\n}\r\n","import { XhrFactory } from \"@angular/common\";\r\n\r\n/**\r\n * Browser implementation for an `XhrFactory`.\r\n *\r\n * @export\r\n * @class BrowserXhrFactory\r\n * @implements {XhrFactory}\r\n */\r\n export class BrowserXhrFactory implements XhrFactory {\r\n  build(): XMLHttpRequest {\r\n      return new XMLHttpRequest();\r\n  }\r\n}\r\n","import { HttpHandler, HttpBackend, HttpRequest, HttpEvent, HTTP_INTERCEPTORS, HttpInterceptor } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { Injector, Injectable } from '@angular/core';\r\n\r\n/**\r\n* `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.\r\n*\r\n*/\r\nexport class HttpInterceptorForwarder implements HttpHandler {\r\n  constructor(private next: HttpHandler, private interceptor: HttpInterceptor) {\r\n  }\r\n\r\n  handle(req: HttpRequest<any>): Observable<HttpEvent<any>> {\r\n      return this.interceptor.intercept(req, this.next);\r\n  }\r\n}\r\n\r\n/**\r\n* An injectable `HttpHandler` that applies multiple interceptors\r\n* to a request before passing it to the given `HttpBackend`.\r\n*\r\n* The interceptors are loaded lazily from the injector, to allow\r\n* interceptors to themselves inject classes depending indirectly\r\n* on `HttpInterceptingHandler` itself.\r\n* @see `HttpInterceptor`\r\n*/\r\n\r\n@Injectable()\r\nexport class HttpInterceptingHandler implements HttpHandler {\r\n  private chain: HttpHandler | null = null;\r\n\r\n  /**\r\n   * Creates an instance of HttpInterceptingHandler.\r\n   * @param {HttpBackend} backend\r\n   * @param {Injector} injector\r\n   * @memberof HttpInterceptingHandler\r\n   */\r\n  constructor(private backend: HttpBackend, private injector: Injector) {\r\n  }\r\n\r\n  handle(req: HttpRequest<any>): Observable<HttpEvent<any>> {\r\n    if (this.chain === null) {\r\n      const interceptors = this.injector.get(HTTP_INTERCEPTORS, []);\r\n      this.chain = interceptors.reduceRight(\r\n        (next, interceptor) => new HttpInterceptorForwarder(next, interceptor), this.backend);\r\n    }\r\n    return this.chain.handle(req);\r\n  }\r\n}\r\n","import {\r\n    SingletonAppServiceContract, AppService, Priority, Expando\r\n} from '@kephas/core';\r\n\r\n/**\r\n * Gets the application settings.\r\n *\r\n * @export\r\n * @class AppSettings\r\n */\r\n@AppService({ overridePriority: Priority.Low })\r\n@SingletonAppServiceContract()\r\nexport class AppSettings implements Expando {\r\n\r\n    /**\r\n     * Gets the base URL of the application.\r\n     *\r\n     * @readonly\r\n     * @type {string}\r\n     * @memberof AppSettings\r\n     */\r\n    get baseUrl(): string {\r\n        const baseQuery = document.getElementsByTagName('base');\r\n        const baseElement = baseQuery && baseQuery[0];\r\n        return (baseElement && baseElement.href) || document.baseURI || '/';\r\n    }\r\n\r\n    /**\r\n     * Gets the base API URL of the application.\r\n     *\r\n     * @readonly\r\n     * @type {string}\r\n     * @memberof AppSettings\r\n     */\r\n    get baseApiUrl(): string {\r\n        return `${this.baseUrl}api/`;\r\n    }\r\n}\r\n","import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport {\r\n  LogLevel, AppService,\r\n  Priority, Logger, Expando\r\n} from '@kephas/core';\r\nimport {\r\n  CommandProcessorClient, CommandClientContext, CommandResponse, CommandError\r\n} from '@kephas/commands';\r\nimport { NotificationService } from '@kephas/ui';\r\nimport { Observable, ObservableInput } from 'rxjs';\r\nimport { retry, map, catchError } from 'rxjs/operators';\r\nimport { AppSettings } from './appSettings';\r\n\r\n/**\r\n * Provides proxied command execution over HTTP.\r\n *\r\n * @export\r\n * @class HttpCommandProcessorClient\r\n */\r\n@AppService({ overridePriority: Priority.Low })\r\nexport class HttpCommandProcessorClient extends CommandProcessorClient {\r\n\r\n  /**\r\n   * Gets or sets the base route for the command execution.\r\n   *\r\n   * @protected\r\n   * @type {string}\r\n   * @memberof CommandProcessor\r\n   */\r\n  protected baseRoute = 'api/cmd/';\r\n\r\n  /**\r\n   * Initializes a new instance of the CommandProcessor class.\r\n   * @param {NotificationService} notification The notification service.\r\n   * @param {HttpClient} http The HTTP client.\r\n   * @param {AppSettings} appSettings The application settings.\r\n   */\r\n  constructor(\r\n    protected appSettings: AppSettings,\r\n    protected http: HttpClient,\r\n    protected notification: NotificationService,\r\n    protected logger: Logger) {\r\n    super();\r\n  }\r\n\r\n  /**\r\n   * Processes the command asynchronously.\r\n   * @tparam T The command response type.\r\n   * @param {string} command The command.\r\n   * @param {{}} [args] Optional. The arguments.\r\n   * @param {CommandClientContext} [options] Optional. Options controlling the command processing.\r\n   * @returns {Observable{T}} An observable over the result.\r\n   */\r\n  public process<T extends CommandResponse>(command: string, args?: {}, options?: CommandClientContext): Observable<T> {\r\n    const url = this.getHttpGetUrl(command, args, options);\r\n    let obs = this.http.get<T>(url, this.getHttpGetOptions(command, args, options));\r\n    if (options && options.retries) {\r\n      obs = obs.pipe(\r\n        retry(options.retries),\r\n        map(response => this._processResponse(response, options)),\r\n        catchError(error => this._processError<T>(error, options)));\r\n    }\r\n    else {\r\n      obs = obs.pipe(\r\n        map(response => this._processResponse(response, options)),\r\n        catchError(error => this._processError<T>(error, options)));\r\n    }\r\n\r\n    return obs;\r\n  }\r\n\r\n  /**\r\n   * Gets the HTTP GET URL.\r\n   *\r\n   * @protected\r\n   * @param {string} command The command.\r\n   * @param {{}} [args] Optional. The arguments.\r\n   * @param {CommandClientContext} [options] Optional. Options controlling the command processing.\r\n   * @returns {string} The HTTP GET URL.\r\n   * @memberof CommandProcessor\r\n   */\r\n  protected getHttpGetUrl(command: string, args?: {}, options?: CommandClientContext): string {\r\n    let baseUrl = this.appSettings.baseUrl;\r\n    if (!baseUrl.endsWith('/')) {\r\n      baseUrl = baseUrl + '/';\r\n    }\r\n\r\n    return `${baseUrl}${this.baseRoute}${command}`;\r\n  }\r\n\r\n  /**\r\n   * Gets the command GET parameters.\r\n   *\r\n   * @protected\r\n   * @param {{}} [args]\r\n   * @param {CommandClientContext} [options]\r\n   * @return {*}  {HttpParams}\r\n   * @memberof HttpCommandProcessorClient\r\n   */\r\n  protected getHttpGetParams(args?: {}, options?: CommandClientContext): HttpParams | {\r\n    [param: string]: string | string[];\r\n  } {\r\n    let params: Expando = {};\r\n    if (args) {\r\n      Object.keys(args)\r\n        .forEach(key => params[key] = this._getParamValue((args as Expando)[key]));\r\n    }\r\n\r\n    return params;\r\n  }\r\n\r\n  /**\r\n   * Gets the HTTP GET options. By default it does not return any options.\r\n   *\r\n   * @protected\r\n   * @param {string} command The command.\r\n   * @param {{}} [args] Optional. The arguments.\r\n   * @param {CommandClientContext} [options] Optional. Options controlling the command processing.\r\n   * @returns {({\r\n   *             headers?: HttpHeaders | {\r\n   *                 [header: string]: string | string[];\r\n   *             };\r\n   *             observe?: 'body';\r\n   *             params?: HttpParams | {\r\n   *                 [param: string]: string | string[];\r\n   *             };\r\n   *             reportProgress?: boolean;\r\n   *             responseType?: 'json';\r\n   *             withCredentials?: boolean;\r\n   *         } | undefined)} The options or undefined.\r\n   * @memberof CommandProcessor\r\n   */\r\n  protected getHttpGetOptions(command: string, args?: {}, options?: CommandClientContext): {\r\n    headers?: HttpHeaders | {\r\n      [header: string]: string | string[];\r\n    };\r\n    observe?: 'body';\r\n    params?: HttpParams | {\r\n      [param: string]: string | string[];\r\n    };\r\n    reportProgress?: boolean;\r\n    responseType?: 'json';\r\n    withCredentials?: boolean;\r\n  } | undefined {\r\n    return {\r\n      params: this.getHttpGetParams(args, options),\r\n    };\r\n  }\r\n\r\n  private _processResponse<T extends CommandResponse>(response: T, options?: CommandClientContext): T {\r\n    if (typeof response.severity === 'string') {\r\n      response.severity = (LogLevel as Expando)[response.severity as string];\r\n    }\r\n\r\n    if (response.severity <= LogLevel.Error) {\r\n      throw new CommandError(response.message!, response);\r\n    }\r\n\r\n    if (response.severity === LogLevel.Warning) {\r\n      this.logger.log(response.severity, null, response.message!);\r\n      if (!(options && (options.notifyWarnings === undefined || options.notifyWarnings))) {\r\n        this.notification.notifyWarning(response);\r\n      }\r\n    }\r\n\r\n    if (response.severity <= LogLevel.Error) {\r\n      throw new Error(response.message);\r\n    }\r\n    return response;\r\n  }\r\n\r\n  private _processError<T extends CommandResponse>(error: any, options?: CommandClientContext): ObservableInput<T> {\r\n    this.logger.error(error);\r\n    if (!(options && (options.notifyErrors === undefined || options.notifyErrors))) {\r\n      this.notification.notifyError(error);\r\n    }\r\n\r\n    throw error;\r\n  }\r\n\r\n  private _getParamValue(rawValue: any): string | string[] {\r\n    if (typeof rawValue === 'string') {\r\n      return rawValue;\r\n    }\r\n\r\n    if (Array.isArray(rawValue)) {\r\n      return rawValue.map(e => `${e}`);\r\n    }\r\n\r\n    return `${rawValue}`;\r\n  }\r\n}\r\n","import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport { LogLevel, AppService, Priority, Logger, Expando } from '@kephas/core';\r\nimport { NotificationService } from '@kephas/ui';\r\nimport {\r\n    ResponseMessage, ErrorInfo, MessageProcessorClient,\r\n    MessagingClientContext, MessagingError\r\n} from '@kephas/messaging';\r\nimport { Observable, ObservableInput } from 'rxjs';\r\nimport { retry, map, catchError } from 'rxjs/operators';\r\nimport { AppSettings } from './appSettings';\r\n\r\n\r\ninterface RawResponseMessage<T extends ResponseMessage> {\r\n    /**\r\n     * The exception information.\r\n     *\r\n     * @type {ErrorInfo}\r\n     * @memberof RawResponseMessage\r\n     */\r\n    exception: ErrorInfo;\r\n\r\n    /**\r\n     * The response message.\r\n     *\r\n     * @type {T}\r\n     * @memberof RawResponseMessage\r\n     */\r\n    message: T;\r\n}\r\n\r\n/**\r\n * Provides proxied message processing over HTTP.\r\n *\r\n * @export\r\n * @class MessageProcessor\r\n */\r\n@AppService({ overridePriority: Priority.Low })\r\nexport class HttpMessageProcessorClient extends MessageProcessorClient {\r\n\r\n    /**\r\n     * Gets or sets the base route for the command execution.\r\n     *\r\n     * @protected\r\n     * @type {string}\r\n     * @memberof MessageProcessor\r\n     */\r\n    protected baseRoute: string = 'api/msg/';\r\n\r\n    /**\r\n     * Initializes a new instance of the HttpMessageProcessor class.\r\n     * @param {NotificationService} notification The notification service.\r\n     * @param {HttpClient} http The HTTP client.\r\n     * @param {AppSettings} appSettings The application settings.\r\n     */\r\n    constructor(\r\n        protected appSettings: AppSettings,\r\n        protected http: HttpClient,\r\n        protected notification: NotificationService,\r\n        protected logger: Logger) {\r\n        super();\r\n    }\r\n\r\n    /**\r\n     * Processes the message asynchronously.\r\n     * @tparam T The message response type.\r\n     * @param {{}} message The message.\r\n     * @param {MessagingClientContext} [options] Optional. Options controlling the message processing.\r\n     * @returns {Observable{T}} An observable over the result.\r\n     */\r\n    public process<T extends ResponseMessage>(message: {}, options?: MessagingClientContext): Observable<T> {\r\n        const url = this.getHttpPostUrl(message, options);\r\n        const obs = this.http.post<RawResponseMessage<T>>(url, message, this.getHttpPostOptions(message, options));\r\n        const responseObj = (options && options.retries)\r\n            ? obs.pipe(\r\n                retry(options.retries),\r\n                map(response => this._processResponse<T>(response, options)),\r\n                catchError(error => this._processError<T>(error, options)))\r\n            : obs.pipe(\r\n                map(response => this._processResponse<T>(response, options)),\r\n                catchError(error => this._processError<T>(error, options)));\r\n\r\n        return responseObj;\r\n    }\r\n\r\n    /**\r\n     * Gets the HTTP GET URL.\r\n     *\r\n     * @protected\r\n     * @param {{}} message The message.\r\n     * @param {MessagingClientContext} [options] Optional. Options controlling the command processing.\r\n     * @returns {string} The HTTP GET URL.\r\n     * @memberof MessageProcessor\r\n     */\r\n    protected getHttpPostUrl(message: {}, options?: MessagingClientContext): string {\r\n        let baseUrl = this.appSettings.baseUrl;\r\n        if (!baseUrl.endsWith('/')) {\r\n            baseUrl = baseUrl + '/';\r\n        }\r\n\r\n        const url = `${baseUrl}${this.baseRoute}`;\r\n        return url;\r\n    }\r\n\r\n    /**\r\n     * Gets the HTTP GET options. By default it does not return any options.\r\n     *\r\n     * @protected\r\n     * @param {string} command The command.\r\n     * @param {{}} [args] Optional. The arguments.\r\n     * @param {MessagingClientContext} [options] Optional. Options controlling the command processing.\r\n     * @returns {({\r\n     *             headers?: HttpHeaders | {\r\n     *                 [header: string]: string | string[];\r\n     *             };\r\n     *             observe?: 'body';\r\n     *             params?: HttpParams | {\r\n     *                 [param: string]: string | string[];\r\n     *             };\r\n     *             reportProgress?: boolean;\r\n     *             responseType?: 'json';\r\n     *             withCredentials?: boolean;\r\n     *         } | undefined)} The options or undefined.\r\n     * @memberof MessageProcessor\r\n     */\r\n    protected getHttpPostOptions(message: {}, options?: MessagingClientContext): {\r\n        headers?: HttpHeaders | {\r\n            [header: string]: string | string[];\r\n        };\r\n        observe?: 'body';\r\n        params?: HttpParams | {\r\n            [param: string]: string | string[];\r\n        };\r\n        reportProgress?: boolean;\r\n        responseType?: 'json';\r\n        withCredentials?: boolean;\r\n    } | undefined {\r\n        return undefined;\r\n    }\r\n\r\n    private _processResponse<T extends ResponseMessage>(rawResponse: RawResponseMessage<T>, options?: MessagingClientContext): T {\r\n        if (rawResponse.exception) {\r\n            const errorInfo = rawResponse.exception;\r\n            if (typeof errorInfo.severity === 'string') {\r\n                errorInfo.severity = (LogLevel as Expando)[errorInfo.severity as string];\r\n            }\r\n\r\n            throw new MessagingError(errorInfo.message!, errorInfo);\r\n        }\r\n\r\n        const response = rawResponse.message;\r\n        if (typeof response.severity === 'string') {\r\n            response.severity = (LogLevel as Expando)[response.severity as string];\r\n        }\r\n\r\n        if (!response.severity) {\r\n            response.severity = LogLevel.Info;\r\n        }\r\n\r\n        if (response.severity <= LogLevel.Error) {\r\n            throw new MessagingError(response.message!, response);\r\n        }\r\n\r\n        if (response.severity === LogLevel.Warning) {\r\n            this.logger.log(response.severity, null, response.message!);\r\n            if (!(options && (options.notifyWarnings === undefined || options.notifyWarnings))) {\r\n                this.notification.notifyWarning(response);\r\n            }\r\n        }\r\n\r\n        if (response.severity <= LogLevel.Error) {\r\n            throw new MessagingError(response.message!, response);\r\n        }\r\n        return response;\r\n    }\r\n\r\n    private _processError<T extends ResponseMessage>(error: any, options?: MessagingClientContext): ObservableInput<T> {\r\n        this.logger.error(error);\r\n        if (!(options && (options.notifyErrors === undefined || options.notifyErrors))) {\r\n            this.notification.notifyError(error);\r\n        }\r\n\r\n        throw error;\r\n    }\r\n}\r\n","import { Type } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport {\r\n    SingletonAppServiceContract, AppService, Priority,\r\n    AsyncInitializable,\r\n    Expando\r\n} from '@kephas/core';\r\n\r\n// https://stackoverflow.com/questions/50222998/error-encountered-in-metadata-generated-for-exported-symbol-when-constructing-an\r\n\r\n// @dynamic\r\n/**\r\n * The configuration service.\r\n *\r\n * @export\r\n * @class Configuration\r\n * @implements {AsyncInitializable}\r\n */\r\n@AppService({ overridePriority: Priority.Low })\r\n@SingletonAppServiceContract()\r\nexport class Configuration implements AsyncInitializable {\r\n\r\n    private static readonly configurationFileUrl = '/app/configuration.json';\r\n\r\n    private static configurationFile: {};\r\n\r\n    /**\r\n     * Ensures that the configuration file is initialized.\r\n     *\r\n     * @param {{ http: HttpClient, configurationFileUrl?: string }} context The context containing initialization data.\r\n     * @returns {Promise<void>}\r\n     * @memberof Configuration\r\n     */\r\n    public async initializeAsync(context: { http: HttpClient, configurationFileUrl?: string }): Promise<void> {\r\n        if (Configuration.configurationFile) {\r\n            return;\r\n        }\r\n\r\n        const response = await context.http.get(context.configurationFileUrl ? context.configurationFileUrl : Configuration.configurationFileUrl).toPromise();\r\n        Configuration.configurationFile = response || {};\r\n    }\r\n\r\n    /**\r\n     * Gets the configuration settings for the indicated section name.\r\n     *\r\n     * @template T The settings type.\r\n     * @param {string} sectionName The section name.\r\n     * @returns {T} The settings.\r\n     * @memberof Configuration\r\n     */\r\n    public getSettings<T>(settingsType: Type<T>): T {\r\n\r\n        if (!Configuration.configurationFile) {\r\n            throw new Error('The configuration manager must be initialized prior to requesting settings from it.');\r\n        }\r\n\r\n        let sectionName = settingsType.name;\r\n        const ending = 'Settings';\r\n        if (sectionName.endsWith(ending)) {\r\n            sectionName = sectionName.substring(0, sectionName.length - ending.length);\r\n        }\r\n\r\n        sectionName = sectionName[0].toLowerCase() + sectionName.substring(1);\r\n\r\n        return (Configuration.configurationFile as Expando)[sectionName];\r\n    }\r\n}\r\n","import { XhrFactory } from '@angular/common';\r\nimport { HttpClient, HttpHandler, HttpXhrBackend, HttpBackend } from '@angular/common/http';\r\nimport { Injectable, Injector, StaticClassProvider } from '@angular/core';\r\nimport { AppServiceInfo, AppServiceInfoRegistry, AppServiceMetadata, Expando, Type } from '@kephas/core';\r\nimport { NgTarget } from './angularTarget';\r\nimport { BrowserXhrFactory } from \"./services/http/browserXhrFactory\";\r\nimport { HttpInterceptingHandler } from './services/http/httpInterceptingHandler';\r\n\r\n/**\r\n* Registry for root services.\r\n*\r\n* @export\r\n* @class RootProvidersRegistry\r\n*/\r\n\r\nexport class RootProvidersRegistry {\r\n  static #providers: StaticClassProvider[] = [\r\n    { provide: HttpClient, useClass: HttpClient, deps: [HttpHandler] },\r\n    { provide: HttpHandler, useClass: HttpInterceptingHandler, deps: [HttpBackend, Injector] },\r\n    { provide: HttpBackend, useClass: HttpXhrBackend, deps: [XhrFactory] },\r\n    { provide: HttpXhrBackend, useClass: HttpXhrBackend, deps: [XhrFactory] },\r\n    { provide: XhrFactory, useClass: BrowserXhrFactory, deps: [] },\r\n  ];\r\n\r\n  /**\r\n   * Gets the providers for the HTTP client.\r\n   *\r\n   * @returns {((StaticClassProvider | ExistingProvider)[])}\r\n   * @memberof HttpClientAppServiceInfoRegistry\r\n   */\r\n  public static getRootProviders(serviceRegistry: AppServiceInfoRegistry): (StaticClassProvider)[] {\r\n    const providers: (StaticClassProvider)[] = [];\r\n    for (const c of serviceRegistry.serviceContracts) {\r\n      const serviceContract: AppServiceInfo = c;\r\n      if ((c as Expando).target === NgTarget) {\r\n        Injectable()(serviceContract.contractType);\r\n        for (const m of serviceContract.services) {\r\n          const serviceMetadata: AppServiceMetadata<any> = m;\r\n          Injectable()(serviceMetadata.serviceType!);\r\n          providers.push({\r\n            provide: serviceContract.contractToken || serviceContract.contractType,\r\n            useClass: serviceMetadata.serviceType!,\r\n            multi: serviceContract.allowMultiple,\r\n            deps: RootProvidersRegistry.getDependencies(serviceMetadata.serviceType!),\r\n          });\r\n        }\r\n      }\r\n    }\r\n\r\n    providers.push(...RootProvidersRegistry.#providers);\r\n\r\n    return providers;\r\n  }\r\n\r\n  /**\r\n   * Loads asynchronously the modules to make sure that the\r\n   * overridden services area also loaded into the service registry.\r\n   * First of all, loads the Kephas modules, afterwards\r\n   * loads the application modules invoking the provided delegate.\r\n   */\r\n  public static async loadModules(loadAppModules?: () => Promise<void>): Promise<void> {\r\n    await import('@kephas/core');\r\n    await import('@kephas/reflection');\r\n    await import('@kephas/commands');\r\n    await import('@kephas/messaging');\r\n    await import('@kephas/ui');\r\n\r\n    await import('@angular/common/http');\r\n\r\n    if (loadAppModules) {\r\n      await loadAppModules();\r\n    }\r\n  }\r\n\r\n  private static getDependencies(serviceType: Type<any>): any[] {\r\n    let deps = Reflect.getMetadata('design:paramtypes', serviceType);\r\n    if (!deps && serviceType.ctorParameters) {\r\n      deps = serviceType.ctorParameters();\r\n    }\r\n\r\n    return deps || [];\r\n  }\r\n}\r\n","import { Injectable, NgModule, Injector } from \"@angular/core\";\r\nimport { CommandProcessorClient } from \"@kephas/commands\";\r\nimport { AbstractType, EventHub, HashingService, Injector as KephasInjector, Logger, Type } from \"@kephas/core\";\r\nimport { MessageProcessorClient } from \"@kephas/messaging\";\r\nimport { TypeInfoRegistry } from \"@kephas/reflection\";\r\nimport { NotificationService } from \"@kephas/ui\";\r\nimport { AppSettings } from \"./services/appSettings\";\r\nimport { Configuration } from \"./services/configuration\";\r\nimport { HttpInterceptingHandler } from \"./services/http/httpInterceptingHandler\";\r\n\r\nexport function resolveAppService<T>(type: AbstractType | Type<T>) {\r\n  Injectable()(type);\r\n  return (injector: Injector) => KephasInjector.instance.resolve(type, t => injector.get(t));\r\n}\r\n\r\n@NgModule({\r\n  providers: [\r\n    // core\r\n    {\r\n      provide: KephasInjector,\r\n      useFactory: resolveAppService(KephasInjector),\r\n      deps: [Injector]\r\n    },\r\n    {\r\n      provide: Logger,\r\n      useFactory: resolveAppService(Logger),\r\n      deps: [Injector]\r\n    },\r\n    {\r\n      provide: HashingService,\r\n      useFactory: resolveAppService(HashingService),\r\n      deps: [Injector]\r\n    },\r\n    {\r\n      provide: EventHub,\r\n      useFactory: resolveAppService(EventHub),\r\n      deps: [Injector]\r\n    },\r\n\r\n    // commands\r\n    {\r\n      provide: CommandProcessorClient,\r\n      useFactory: resolveAppService(CommandProcessorClient),\r\n      deps: [Injector]\r\n    },\r\n\r\n    // messaging\r\n    {\r\n      provide: MessageProcessorClient,\r\n      useFactory: resolveAppService(MessageProcessorClient),\r\n      deps: [Injector]\r\n    },\r\n\r\n    // reflection\r\n    {\r\n      provide: TypeInfoRegistry,\r\n      useFactory: resolveAppService(TypeInfoRegistry),\r\n      deps: [Injector]\r\n    },\r\n\r\n    // ui\r\n    {\r\n      provide: NotificationService,\r\n      useFactory: resolveAppService(NotificationService),\r\n      deps: [Injector]\r\n    },\r\n\r\n    // ngx-core\r\n    {\r\n      provide: AppSettings,\r\n      useFactory: resolveAppService(AppSettings),\r\n      deps: [Injector]\r\n    },\r\n    {\r\n      provide: Configuration,\r\n      useFactory: resolveAppService(Configuration),\r\n      deps: [Injector]\r\n    },\r\n    HttpInterceptingHandler,\r\n  ]\r\n})\r\nexport class KephasModule {\r\n}\r\n","/*\r\n * Public API Surface of @kephas/angular\r\n */\r\n\r\nexport * from './lib/angularTarget';\r\n\r\nexport * from './lib/components/widgetBase';\r\nexport * from './lib/components/valueEditorBase';\r\n\r\nexport * from './lib/queries/commandQuery';\r\nexport * from './lib/queries/messageQuery';\r\n\r\nexport * from './lib/services/http/browserXhrFactory';\r\nexport * from './lib/services/http/httpInterceptingHandler';\r\n\r\nexport * from './lib/services/appSettings';\r\nexport * from './lib/services/httpCommandProcessorClient';\r\nexport * from './lib/services/httpMessageProcessorClient';\r\nexport * from './lib/services/configuration';\r\n\r\nexport * from './lib/rootProvidersRegistry';\r\n\r\nexport * from './lib/kephas.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["KephasInjector"],"mappings":";;;;;;;;;;;;;;;MAAa,QAAQ,GAAW;;ACUhC;;;;;;MASsB,UAAU;;;;;;;IAsC5B,YACoB,UAAsB,EACtB,gBAAkC;QADlC,eAAU,GAAV,UAAU,CAAY;QACtB,qBAAgB,GAAhB,gBAAgB,CAAkB;QAZ9C,eAAU,GAAG,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