ngx-lift 1.10.3 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/fesm2022/ngx-lift.mjs +729 -194
- package/fesm2022/ngx-lift.mjs.map +1 -1
- package/index.d.ts +1638 -3
- package/package.json +6 -6
- package/esm2022/lib/const.mjs +0 -10
- package/esm2022/lib/models/async-state.model.mjs +0 -2
- package/esm2022/lib/models/index.mjs +0 -6
- package/esm2022/lib/models/kubernetes-list.model.mjs +0 -2
- package/esm2022/lib/models/kubernetes-object-condition.model.mjs +0 -2
- package/esm2022/lib/models/kubernetes-object-meta.model.mjs +0 -2
- package/esm2022/lib/models/kubernetes-object.model.mjs +0 -2
- package/esm2022/lib/operators/combine-latest-eager.operator.mjs +0 -48
- package/esm2022/lib/operators/create-async-state.operator.mjs +0 -61
- package/esm2022/lib/operators/distinct-on-change.operator.mjs +0 -80
- package/esm2022/lib/operators/index.mjs +0 -9
- package/esm2022/lib/operators/kubernetes-pagination.operator.mjs +0 -71
- package/esm2022/lib/operators/logger.operator.mjs +0 -21
- package/esm2022/lib/operators/poll.operator.mjs +0 -39
- package/esm2022/lib/operators/start-with-tap.operator.mjs +0 -15
- package/esm2022/lib/operators/switch-map-with-async-state.operator.mjs +0 -33
- package/esm2022/lib/pipes/array-join.pipe.mjs +0 -21
- package/esm2022/lib/pipes/byte-converter.pipe.mjs +0 -150
- package/esm2022/lib/pipes/index.mjs +0 -6
- package/esm2022/lib/pipes/is-https.pipe.mjs +0 -18
- package/esm2022/lib/pipes/mask.pipe.mjs +0 -36
- package/esm2022/lib/pipes/range.pipe.mjs +0 -19
- package/esm2022/lib/signals/combine-from.mjs +0 -90
- package/esm2022/lib/signals/computed-async.mjs +0 -63
- package/esm2022/lib/signals/create-trigger.mjs +0 -11
- package/esm2022/lib/signals/index.mjs +0 -7
- package/esm2022/lib/signals/inject-params.mjs +0 -35
- package/esm2022/lib/signals/inject-query-params.mjs +0 -53
- package/esm2022/lib/signals/merge-from.mjs +0 -71
- package/esm2022/lib/utils/difference-in-days.util.mjs +0 -25
- package/esm2022/lib/utils/form.util.mjs +0 -56
- package/esm2022/lib/utils/idle-detection/idle-detection.config.mjs +0 -7
- package/esm2022/lib/utils/idle-detection/idle-detection.module.mjs +0 -25
- package/esm2022/lib/utils/idle-detection/idle-detection.service.mjs +0 -190
- package/esm2022/lib/utils/idle-detection/index.mjs +0 -4
- package/esm2022/lib/utils/index.mjs +0 -10
- package/esm2022/lib/utils/internal.util.mjs +0 -13
- package/esm2022/lib/utils/is-empty.util.mjs +0 -49
- package/esm2022/lib/utils/is-equal.util.mjs +0 -24
- package/esm2022/lib/utils/is-promise.util.mjs +0 -5
- package/esm2022/lib/utils/omit-by.util.mjs +0 -12
- package/esm2022/lib/utils/pick-by.util.mjs +0 -16
- package/esm2022/lib/utils/range.util.mjs +0 -28
- package/esm2022/lib/utils/url.util.mjs +0 -34
- package/esm2022/lib/validators/date-range.validator.mjs +0 -58
- package/esm2022/lib/validators/index.mjs +0 -5
- package/esm2022/lib/validators/intersection.validator.mjs +0 -34
- package/esm2022/lib/validators/unique.validator.mjs +0 -64
- package/esm2022/lib/validators/url.validator.mjs +0 -14
- package/esm2022/ngx-lift.mjs +0 -5
- package/esm2022/public-api.mjs +0 -10
- package/lib/const.d.ts +0 -5
- package/lib/models/async-state.model.d.ts +0 -22
- package/lib/models/index.d.ts +0 -5
- package/lib/models/kubernetes-list.model.d.ts +0 -10
- package/lib/models/kubernetes-object-condition.model.d.ts +0 -28
- package/lib/models/kubernetes-object-meta.model.d.ts +0 -38
- package/lib/models/kubernetes-object.model.d.ts +0 -8
- package/lib/operators/combine-latest-eager.operator.d.ts +0 -7
- package/lib/operators/create-async-state.operator.d.ts +0 -64
- package/lib/operators/distinct-on-change.operator.d.ts +0 -55
- package/lib/operators/index.d.ts +0 -8
- package/lib/operators/kubernetes-pagination.operator.d.ts +0 -30
- package/lib/operators/logger.operator.d.ts +0 -11
- package/lib/operators/poll.operator.d.ts +0 -39
- package/lib/operators/start-with-tap.operator.d.ts +0 -10
- package/lib/operators/switch-map-with-async-state.operator.d.ts +0 -31
- package/lib/pipes/array-join.pipe.d.ts +0 -7
- package/lib/pipes/byte-converter.pipe.d.ts +0 -40
- package/lib/pipes/index.d.ts +0 -5
- package/lib/pipes/is-https.pipe.d.ts +0 -7
- package/lib/pipes/mask.pipe.d.ts +0 -19
- package/lib/pipes/range.pipe.d.ts +0 -10
- package/lib/signals/combine-from.d.ts +0 -25
- package/lib/signals/computed-async.d.ts +0 -29
- package/lib/signals/create-trigger.d.ts +0 -4
- package/lib/signals/index.d.ts +0 -6
- package/lib/signals/inject-params.d.ts +0 -63
- package/lib/signals/inject-query-params.d.ts +0 -71
- package/lib/signals/merge-from.d.ts +0 -13
- package/lib/utils/difference-in-days.util.d.ts +0 -19
- package/lib/utils/form.util.d.ts +0 -18
- package/lib/utils/idle-detection/idle-detection.config.d.ts +0 -5
- package/lib/utils/idle-detection/idle-detection.module.d.ts +0 -13
- package/lib/utils/idle-detection/idle-detection.service.d.ts +0 -119
- package/lib/utils/idle-detection/index.d.ts +0 -3
- package/lib/utils/index.d.ts +0 -9
- package/lib/utils/internal.util.d.ts +0 -4
- package/lib/utils/is-empty.util.d.ts +0 -10
- package/lib/utils/is-equal.util.d.ts +0 -7
- package/lib/utils/is-promise.util.d.ts +0 -1
- package/lib/utils/omit-by.util.d.ts +0 -7
- package/lib/utils/pick-by.util.d.ts +0 -7
- package/lib/utils/range.util.d.ts +0 -12
- package/lib/utils/url.util.d.ts +0 -24
- package/lib/validators/date-range.validator.d.ts +0 -19
- package/lib/validators/index.d.ts +0 -4
- package/lib/validators/intersection.validator.d.ts +0 -9
- package/lib/validators/unique.validator.d.ts +0 -18
- package/lib/validators/url.validator.d.ts +0 -3
- package/public-api.d.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-lift.mjs","sources":["../../../projects/ngx-lift/src/lib/operators/combine-latest-eager.operator.ts","../../../projects/ngx-lift/src/lib/operators/create-async-state.operator.ts","../../../projects/ngx-lift/src/lib/operators/distinct-on-change.operator.ts","../../../projects/ngx-lift/src/lib/operators/kubernetes-pagination.operator.ts","../../../projects/ngx-lift/src/lib/operators/logger.operator.ts","../../../projects/ngx-lift/src/lib/utils/is-promise.util.ts","../../../projects/ngx-lift/src/lib/operators/poll.operator.ts","../../../projects/ngx-lift/src/lib/operators/start-with-tap.operator.ts","../../../projects/ngx-lift/src/lib/operators/switch-map-with-async-state.operator.ts","../../../projects/ngx-lift/src/lib/pipes/array-join.pipe.ts","../../../projects/ngx-lift/src/lib/pipes/byte-converter.pipe.ts","../../../projects/ngx-lift/src/lib/utils/difference-in-days.util.ts","../../../projects/ngx-lift/src/lib/utils/form.util.ts","../../../projects/ngx-lift/src/lib/utils/idle-detection/idle-detection.config.ts","../../../projects/ngx-lift/src/lib/utils/idle-detection/idle-detection.module.ts","../../../projects/ngx-lift/src/lib/utils/idle-detection/idle-detection.service.ts","../../../projects/ngx-lift/src/lib/utils/internal.util.ts","../../../projects/ngx-lift/src/lib/utils/is-empty.util.ts","../../../projects/ngx-lift/src/lib/utils/is-equal.util.ts","../../../projects/ngx-lift/src/lib/utils/pick-by.util.ts","../../../projects/ngx-lift/src/lib/utils/omit-by.util.ts","../../../projects/ngx-lift/src/lib/utils/range.util.ts","../../../projects/ngx-lift/src/lib/const.ts","../../../projects/ngx-lift/src/lib/utils/url.util.ts","../../../projects/ngx-lift/src/lib/pipes/is-https.pipe.ts","../../../projects/ngx-lift/src/lib/pipes/mask.pipe.ts","../../../projects/ngx-lift/src/lib/pipes/range.pipe.ts","../../../projects/ngx-lift/src/lib/signals/combine-from.ts","../../../projects/ngx-lift/src/lib/signals/computed-async.ts","../../../projects/ngx-lift/src/lib/signals/create-trigger.ts","../../../projects/ngx-lift/src/lib/signals/inject-params.ts","../../../projects/ngx-lift/src/lib/signals/inject-query-params.ts","../../../projects/ngx-lift/src/lib/signals/merge-from.ts","../../../projects/ngx-lift/src/lib/validators/date-range.validator.ts","../../../projects/ngx-lift/src/lib/validators/intersection.validator.ts","../../../projects/ngx-lift/src/lib/validators/unique.validator.ts","../../../projects/ngx-lift/src/lib/validators/url.validator.ts","../../../projects/ngx-lift/src/public-api.ts","../../../projects/ngx-lift/src/ngx-lift.ts"],"sourcesContent":["import {combineLatest, Observable, startWith, Subject} from 'rxjs';\n\nexport function combineLatestEager<T extends Observable<unknown>[]>(\n sources: T,\n startWithNullForAll?: boolean,\n): Observable<{[K in keyof T]: T[K] extends Observable<infer U> ? U | null : never}>;\n\nexport function combineLatestEager<T extends Record<string, Observable<unknown>>>(\n sources: T,\n startWithNullForAll?: boolean,\n): Observable<{[K in keyof T]: T[K] extends Observable<infer U> ? U | null : never}>;\n\n/**\n * Combines multiple observables into a single observable emitting an array or dictionary\n * of the latest values from each source observable.\n * Adds startWith(null) for each Subject in combineLatest when the second parameter startWithNullForAll is false.\n * When startWithNullForAll is true, each observable will startWith null.\n *\n * @template T - The type of the data in the observables.\n *\n * @param {Array<Observable<T>> | Record<string, Observable<T>>} sources -\n * An array of observables or a dictionary of observables to be combined.\n *\n * @param {boolean} [startWithNullForAll=false] -\n * Determines whether to start each observable with a `null` value.\n *\n * @returns {Observable<Array<T | null> | Record<string, T | null>>} -\n * An observable emitting an array or dictionary of the latest values from each source observable.\n *\n * @throws {Error} -\n * Throws an error if the provided argument is not an array of observables or a dictionary of observables.\n */\nexport function combineLatestEager<T>(\n sources: Array<Observable<T>> | Record<string, Observable<T>>,\n startWithNullForAll = false,\n): Observable<Array<T | null> | Record<string, T | null>> {\n function observableMapper<T>(observable: Observable<T>) {\n if (startWithNullForAll) {\n return observable.pipe(startWith(null));\n } else {\n // Check if observable is a Subject, if true, apply startWith(null)\n return observable instanceof Subject ? observable.pipe(startWith(null)) : observable;\n }\n }\n\n if (Array.isArray(sources)) {\n // If sources is an array of observables\n return combineLatest(sources.map(observableMapper));\n } else if (typeof sources === 'object' && sources !== null) {\n // If sources is a dictionary of observables\n const observables: Record<string, Observable<T | null>> = {};\n\n for (const [key, value] of Object.entries(sources)) {\n observables[key] = observableMapper(value);\n }\n\n return combineLatest(observables);\n } else {\n throw new Error(\n `Invalid argument type. Please provide an array of observables or a dictionary of observables. Received: ${typeof sources}`,\n );\n }\n}\n","import {HttpErrorResponse} from '@angular/common/http';\nimport {catchError, map, Observable, of, pipe, startWith, tap, TapObserver, UnaryFunction} from 'rxjs';\n\nimport {AsyncState} from '../models/async-state.model';\n\n/**\n * createAsyncState transforms an Observable of type T into an Observable of AsyncState<T>.\n * AsyncState<T> represents the loading, error, and data states for asynchronous operations.\n *\n * @template T - The type of the data in the observable.\n * @template E - The type of the error that can occur.\n *\n * @param {Partial<Observer<T>> | ((value: T) => void)} [observerOrNextForOrigin] -\n * An optional parameter that can be a partial TapObserver<T> or a function to handle the next value or error in the original Observable.\n *\n * @returns {UnaryFunction<Observable<T>, Observable<AsyncState<T, E>>>} -\n * A function that transforms an observable stream into an asynchronous state.\n *\n * @example\n * Usage 1: Simple request\n * data$ = this.shopService.products$.pipe(\n * createAsyncState({\n * next: res => console.log('Side effect if success: ' + res),\n * error: error => console.error('Side effect if error: ' + error.message)\n * })\n * );\n *\n * Usage 2: Dependent requests\n * data$ = firstCall$.pipe(\n * switchMap(() => this.shopService.products$),\n * createAsyncState()\n * );\n *\n * Another implementation thought when refreshing the data: instead of startWith, `merge of` emit as the trigger\n *\n * subject.pipe(\n * switchMap(() => merge(\n * of({ loading: true, error: null, data: null }),\n * this.service.apiCall().pipe(\n * map(data => ({ loading: false, error: null, data })),\n * tap({\n * next: res => callback?.(res.data),\n * error: err => errorCallback?.(err),\n * }),\n * catchError(error => of({ loading: false, error, data: null })),\n * ),\n * ))\n * )\n *\n * Usage 3: provide initialValue\n *\n * import {createAsyncState} from 'ngx-lift';\n * import {noop} from 'rxjs';\n *\n * private userService = inject(UserService);\n * private location = inject(Location);\n *\n * userState$ = this.userService\n * .getUserById(1)\n * .pipe(createAsyncState<User>(noop, {loading: false, error: null, data: this.location.getState()}));\n */\nexport function createAsyncState<T, E = HttpErrorResponse>(\n observerOrNextForOrigin?: Partial<TapObserver<T>> | ((value: T) => void),\n initialValue: {loading: boolean; error: E | null; data: T | null} = {loading: true, error: null, data: null},\n): UnaryFunction<Observable<T>, Observable<AsyncState<T, E>>> {\n return pipe(\n tap(observerOrNextForOrigin),\n map((data) => ({loading: false, error: null, data})),\n startWith(initialValue),\n catchError((error: E) => of({loading: false, error, data: null})),\n );\n}\n","import {Observable, OperatorFunction, Subscriber, TeardownLogic} from 'rxjs';\n\n/**\n * Creates an operator function for RxJS Observables that filters out consecutive\n * values that are considered equal according to a provided comparator function,\n * and invokes a callback when a distinct value is encountered.\n *\n * @template T - The type of elements emitted by the observable.\n * @param {(previousValue: T, currentValue: T) => void} onChangeCallback\n * A callback function that will be invoked when a distinct value is encountered.\n * It receives the previous distinct value and the current value.\n * @param {(previousValue: T, currentValue: T) => boolean} [comparator]\n * A function that determines if two values are considered equal.\n * Defaults to a function that performs strict equality (===) comparison.\n * @returns {OperatorFunction<T, T>} - The RxJS operator function.\n *\n * @example\n * Example 1:\n * const source$ = new Observable<number>((observer) => {\n * observer.next(1);\n * observer.next(2);\n * observer.next(2);\n * observer.next(3);\n * observer.next(3);\n * observer.next(4);\n * observer.next(5);\n * observer.complete();\n * });\n *\n * const distinctOnChange$ = source$.pipe(\n * distinctOnChange(\n * (prev, curr) => console.log(`Value changed from ${prev} to: ${curr}`),\n * (prev, curr) => prev === curr,\n * ),\n * );\n * distinctOnChange$.subscribe((res) => console.log(res));\n *\n *\n * Example 2:\n * distinctOnChange<RDEValue<OseInstance>[]>(\n * () => {\n * this.store.dispatch(\n * addToast({\n * toast: {\n * type: ToastType.SUCCESS,\n * title: this.l10nService.getMessage('STATUS_CHANGE'),\n * description: this.l10nService.getMessage('STATUS_CHANGE_DESC'),\n * },\n * }),\n * );\n * },\n * (prev, current) =>\n * prev.every((prevInstance, index) => instanceComparator(prevInstance.entity, current[index].entity)),\n * );\n */\nexport function distinctOnChange<T>(\n onChangeCallback: (previousValue: T, currentValue: T) => void,\n comparator: (previousValue: T, currentValue: T) => boolean = (prev, curr) => prev === curr,\n): OperatorFunction<T, T> {\n return (source: Observable<T>) =>\n new Observable<T>((subscriber: Subscriber<T>): TeardownLogic => {\n let hasFirstValue = false;\n let previousValue: T;\n\n const subscription = source.subscribe({\n next: (currentValue: T) => {\n if (hasFirstValue) {\n if (!comparator(previousValue, currentValue)) {\n onChangeCallback(previousValue, currentValue);\n previousValue = currentValue;\n subscriber.next(currentValue);\n }\n } else {\n previousValue = currentValue;\n hasFirstValue = true;\n subscriber.next(currentValue);\n }\n },\n error: (err: unknown) => subscriber.error(err),\n complete: () => subscriber.complete(),\n });\n\n return () => subscription.unsubscribe();\n });\n}\n","/*\n * ******************************************************************\n * Copyright (c) 2024 Broadcom. All Rights Reserved.\n * Broadcom Confidential. The term \"Broadcom\" refers to Broadcom Inc.\n * and/or its subsidiaries.\n * ******************************************************************\n */\n\nimport {HttpClient} from '@angular/common/http';\nimport {EMPTY, expand, Observable, OperatorFunction, reduce} from 'rxjs';\n\nimport {KubernetesList, KubernetesObject} from '../models';\n\n/**\n * Fetches paginated Kubernetes resources by continually making requests\n * until all pages have been retrieved, and aggregates the items from all pages\n * into a single KubernetesList.\n *\n * @template T The type of the items contained within the KubernetesList.\n * @param http The HttpClient instance used to make the HTTP requests.\n * @param endpoint The API endpoint to fetch the resources from.\n * @param initialParams Optional initial parameters to include in the request.\n * Can include query parameters like filters and pagination settings.\n * `limit` and `continue` parameters are parameters for kubernetes\n * @returns An observable that emits a single KubernetesList containing all items from all pages.\n */\nexport function aggregatePaginatedKubernetesResources<T extends KubernetesObject>(\n http: HttpClient,\n endpoint: string,\n initialParams: Record<string, string | number | boolean | (string | number | boolean)[]> = {},\n): OperatorFunction<KubernetesList<T>, KubernetesList<T>> {\n return (source$: Observable<KubernetesList<T>>) => {\n return source$.pipe(\n expand((response) => {\n const {metadata} = response;\n const {continue: continueToken} = metadata;\n if (continueToken) {\n const params = {...initialParams, continue: continueToken};\n return http.get<KubernetesList<T>>(endpoint, {params});\n }\n return EMPTY; // No more pages\n }),\n reduce((acc, current) => {\n const {items: currentPageItems} = current;\n if (currentPageItems) {\n acc.items = acc.items.concat(currentPageItems);\n }\n return acc;\n }),\n );\n };\n}\n\n/**\n * Fetches paginated Kubernetes resources by continually making requests\n * until all pages have been retrieved.\n *\n * @template T The type of the items contained within the KubernetesList.\n * @param http The HttpClient instance used to make the HTTP requests.\n * @param endpoint The API endpoint to fetch the resources from.\n * @param initialParams Optional initial parameters to include in the request.\n * Can include query parameters like filters and pagination settings.\n * `limit` and `continue` parameters are parameters for kubernetes\n * @returns An observable that emits a single KubernetesList containing all items from all pages.\n */\n\nexport function fetchPaginatedKubernetesResources<T extends KubernetesObject>(\n http: HttpClient,\n endpoint: string,\n initialParams: Record<string, string | number | boolean | (string | number | boolean)[]> = {},\n) {\n const initialRequest$ = http.get<KubernetesList<T>>(endpoint, {params: initialParams});\n\n return initialRequest$.pipe(\n expand((response) => {\n const {metadata} = response;\n const {continue: continueToken} = metadata;\n if (continueToken) {\n const params = {...initialParams, continue: continueToken};\n return http.get<KubernetesList<T>>(endpoint, {params});\n }\n return EMPTY; // No more pages\n }),\n reduce((acc, current) => {\n const {items: currentPageItems} = current;\n if (currentPageItems) {\n acc.items = acc.items.concat(currentPageItems);\n }\n return acc;\n }),\n );\n}\n","import {OperatorFunction, pipe, tap} from 'rxjs';\n\n// Define a type for different logger functions\ntype LoggerType = 'count' | 'debug' | 'dir' | 'log' | 'table';\n\n// Define a more permissive type for console functions\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ConsoleFunction = (...args: any[]) => void;\n\n// Map each LoggerType to its corresponding console function\nconst loggerFunctions: Record<LoggerType, ConsoleFunction> = {\n count: console.count.bind(console),\n debug: console.debug.bind(console),\n dir: console.dir.bind(console),\n log: console.log.bind(console),\n table: console.table.bind(console),\n};\n\n/**\n * Logger operator for RxJS observables.\n *\n * @param loggerType The type of logger to be used: 'count', 'debug', 'dir', 'log', 'table'.\n * Defaults to 'log' if not provided or if an unknown type is specified.\n * @returns An RxJS operator function that logs values using the specified console function.\n */\nexport const logger = <T>(loggerType: LoggerType = 'log'): OperatorFunction<T, T> =>\n pipe(\n tap((value: T) => {\n const logFunction = loggerFunctions[loggerType] || console.log.bind(console);\n logFunction(value);\n }),\n );\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isPromise(obj: any): obj is Promise<any> {\n return !!obj && typeof obj.then === 'function';\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {Signal} from '@angular/core';\nimport {toObservable} from '@angular/core/rxjs-interop';\nimport {\n catchError,\n EMPTY,\n exhaustMap,\n from,\n isObservable,\n map,\n merge,\n Observable,\n of,\n share,\n startWith,\n timer,\n} from 'rxjs';\n\nimport {AsyncState} from '../models';\nimport {isPromise} from '../utils/is-promise.util';\n\n/**\n * Polls data at a specified interval and can be triggered manually, and returns an observable that\n * emits the result of the poll as an `AsyncState` object.\n *\n * @template Data - The type of the data emitted by the polling function.\n * @template Input - The type of the input parameter used to build polling parameters.\n * @param options.interval - The interval in milliseconds between each poll.\n * @param options.pollingFn - A function that returns an Observable, Promise, or primitive value.\n * @param options.forceRefresh - An optional Observable or Signal that triggers a manual refresh of the polling function.\n * @param options.paramsBuilder - An optional function that builds parameters for the polling function based on the input. The value emitted by the forceRefresh observable will serve as the parameter.\n * @param options.initialValue - An initial value to return before the first poll.\n * @param options.delay - An optional delay, in milliseconds, to wait before starting the first poll.\n *\n * @returns An observable that emits the result of the poll as an `AsyncState` object.\n */\nexport function poll<Data>(options: {\n interval: number;\n pollingFn: (params: any) => Observable<Data> | Promise<Data> | Data;\n initialValue?: AsyncState<Data>;\n delay?: number;\n}): Observable<AsyncState<Data>>;\n\n// forceRefresh output is the pollingFn params' input\nexport function poll<Data, Input>(options: {\n interval: number;\n pollingFn: (params: Input) => Observable<Data> | Promise<Data> | Data;\n forceRefresh: Observable<Input> | Signal<Input>;\n initialValue?: AsyncState<Data>;\n delay?: number;\n}): Observable<AsyncState<Data>>;\n\n// paramsBuilder exists, forceRefresh output is the paramsBuilder params' input\nexport function poll<Data, Input>(options: {\n interval: number;\n pollingFn: (params: any) => Observable<Data> | Promise<Data> | Data;\n forceRefresh: Observable<Input> | Signal<Input>;\n paramsBuilder: (input: Input) => any;\n initialValue?: AsyncState<Data>;\n delay?: number;\n}): Observable<AsyncState<Data>>;\n\nexport function poll<Data, Input>(options: {\n interval: number;\n pollingFn: (params: any) => Observable<Data> | Promise<Data> | Data;\n forceRefresh?: Observable<Input> | Signal<Input>;\n paramsBuilder?: (input: Input) => any;\n initialValue?: AsyncState<Data>;\n delay?: number;\n}): Observable<AsyncState<Data>> {\n const timerEmitValue = '__timer__emission__';\n const timer$ = timer(options.delay || 0, options.interval).pipe(map((i) => `${timerEmitValue}${i}`));\n\n const trigger$ =\n options.forceRefresh === undefined\n ? EMPTY\n : isObservable(options.forceRefresh)\n ? options.forceRefresh\n : toObservable(options.forceRefresh);\n\n let inputByForceRefresh: Input | undefined = undefined; // if forceRefresh is not provided, input will be undefined\n\n return merge(trigger$, timer$).pipe(\n exhaustMap((input) => {\n // input can be either by forceRefresh or timer\n const isTimerTrigger = typeof input === 'string' && input.includes(timerEmitValue);\n const isManualTrigger = !isTimerTrigger;\n if (isManualTrigger) {\n inputByForceRefresh = input as Input;\n }\n\n // build params by input\n // if paramsBuilder is provided, params will be the value of this function call\n // if paramsBuilder is not provided, params will be the value emitted by the forceRefresh\n const params = options.paramsBuilder ? options.paramsBuilder(inputByForceRefresh as Input) : inputByForceRefresh;\n\n // NOTE: using exhaustMap will NOT emit ${timerEmitValue}0 if forceRefresh is not provided\n // using concatMap will emit ${timerEmitValue}0 if forceRefresh is not provided\n const isFirstRequest = input === `${timerEmitValue}0`; // timer first emission when forceRefresh is not provided\n\n const fnResult = options.pollingFn(params);\n const fnResult$ = isObservable(fnResult) ? fnResult : isPromise(fnResult) ? from(fnResult) : of(fnResult);\n\n let observable$ = fnResult$.pipe(\n map((data) => ({loading: false, error: null, data})),\n catchError((error) => of({loading: false, error, data: null})),\n );\n\n if (isFirstRequest) {\n observable$ = observable$.pipe(\n startWith(options.initialValue ?? ({loading: true, error: null, data: null} as any)),\n );\n }\n if (isManualTrigger) {\n observable$ = observable$.pipe(startWith({loading: true, error: null, data: null}));\n }\n\n return observable$;\n }),\n share(),\n );\n}\n","import {Observable} from 'rxjs';\n\n/**\n * Operator that taps into a callback before the source Observable starts emitting values.\n *\n * This operator is useful for triggering a side effect before the main Observable starts emitting.\n *\n * @param callback A function to be executed before the source Observable emits its first value.\n * @returns An RxJS operator function that taps into the callback and then switchMaps to the source Observable.\n */\nexport function startWithTap<T>(callback: () => void) {\n return (source: Observable<T>) => {\n callback();\n return source;\n };\n}\n","import {HttpErrorResponse} from '@angular/common/http';\nimport {Observable, OperatorFunction, switchMap} from 'rxjs';\n\nimport {AsyncState} from '../models';\nimport {createAsyncState} from './create-async-state.operator';\n\n/**\n * Custom RxJS operator that uses switchMap to handle asynchronous operations and\n * transforms the emitted values into an AsyncState object.\n *\n * @template T - The type of data emitted by the observable returned by the project.\n * @template K - The type of value emitted by the source observable.\n * @template E - The type of error that can be encountered during the asynchronous operation.\n *\n * @param {function(K): Observable<T>} project - A function that takes a value emitted by the source\n * observable and returns an observable representing an asynchronous operation.\n *\n * @returns {OperatorFunction<K, AsyncState<T, E>>} - An RxJS operator that transforms the source observable into\n * an observable of AsyncState objects.\n *\n * @example\n * // Usage of the switchMapWithAsyncState operator\n * const source$ = new BehaviorSubject<number>(1);\n *\n * const asyncOperation = (value: number) => {\n * return of(value * 2).pipe(delay(1000));\n * };\n *\n * const result$ = source$.pipe(switchMapWithAsyncState(asyncOperation));\n * result$.subscribe((state) => {\n * console.log(state); // Outputs AsyncState objects with loading, data, and error properties.\n * });\n */\nexport function switchMapWithAsyncState<T, K, E = HttpErrorResponse>(\n project: (value: K, index: number) => Observable<T>,\n): OperatorFunction<K, AsyncState<T, E>> {\n return (source: Observable<K>) =>\n source.pipe(switchMap((value, index) => project(value, index).pipe(createAsyncState<T, E>())));\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({\n name: 'arrayJoin',\n standalone: true,\n})\nexport class ArrayJoinPipe implements PipeTransform {\n transform(value: unknown, separator: string = ',') {\n if (Array.isArray(value)) {\n return value.join(separator);\n }\n\n // For non-array cases or unexpected types, return the value as is\n return value;\n }\n}\n","import {inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\n\n/**\n * import { LOCALE_ID, NgModule } from '@angular/core';\n * import { BrowserModule } from '@angular/platform-browser';\n * import { AppComponent } from './app.component';\n * import { registerLocaleData } from '@angular/common';\n *\n * import localeEn from '@angular/common/locales/en';\n * import localeFr from '@angular/common/locales/fr';\n *\n * // Register locales\n * registerLocaleData(localeEn);\n * registerLocaleData(localeFr);\n *\n * @NgModule({\n * declarations: [AppComponent],\n * imports: [BrowserModule],\n * providers: [\n * {\n * provide: LOCALE_ID,\n * useFactory: () => {\n * // Use the browser's language or a default language\n * return navigator.language || 'en';\n * },\n * },\n * ],\n * bootstrap: [AppComponent],\n * })\n * export class AppModule {}\n */\n\n@Pipe({\n name: 'byteConverter',\n standalone: true,\n})\nexport class ByteConverterPipe implements PipeTransform {\n private locale = inject<string>(LOCALE_ID);\n // If using navigator.language directly in the pipe, this approach directly uses the browser's language at the moment the ByteConverterPipe is constructed. If the user changes the language while using the application, it won't be automatically reflected. If dynamic language changes are a requirement, using the LOCALE_ID provider as demonstrated in the AppModule is a more Angular-centric approach.\n // private locale: string;\n // constructor() {\n // // Use navigator.language as the default locale\n // this.locale = navigator.language || 'en';\n // }\n\n transform(value: number): string;\n transform(value?: number): string | null;\n transform(value?: number | null): string | null;\n transform(value?: null | number | undefined): string | null {\n if (value === null || value === undefined || isNaN(value)) {\n return null;\n }\n\n const units = ['BYTE', 'KB', 'MB', 'GB', 'TB'];\n let unitIndex = 0;\n\n while (value >= 1024 && unitIndex < units.length - 1) {\n value /= 1024;\n unitIndex++;\n }\n\n const translationObject = translations[this.locale] || translations['en'];\n const key = units[unitIndex];\n\n return this.formatNumber(value) + ' ' + translationObject[key];\n }\n\n private formatNumber(value: number): string {\n return new Intl.NumberFormat(this.locale, {maximumFractionDigits: 2}).format(value);\n }\n}\n\nconst translations: Record<string, Record<string, string>> = {\n en: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'en-US': {\n // You can provide specific variations for en-US if needed\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n de: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n es: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n fr: {\n BYTE: 'o',\n KB: 'Ko',\n MB: 'Mo',\n GB: 'Go',\n TB: 'To',\n },\n it: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n ja: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n ko: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'pt-BR': {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'zh-CN': {\n BYTE: '字节',\n KB: '千字节',\n MB: '兆字节',\n GB: '千兆字节',\n TB: '太字节',\n },\n 'zh-TW': {\n BYTE: '位元組',\n KB: '千位元組',\n MB: '兆位元組',\n GB: '千兆位元組',\n TB: '太位元組',\n },\n ru: {\n BYTE: 'Б',\n KB: 'КБ',\n MB: 'МБ',\n GB: 'ГБ',\n TB: 'ТБ',\n },\n};\n","/**\n * Calculates the difference in whole days between two dates.\n *\n * @param {Date | number | string} dateLeft - The date from which the difference is measured (the reference date).\n * Can be a Date object, a number representing milliseconds since the Unix epoch,\n * or a string in a format parseable by the Date constructor.\n * @param {Date | number | string} dateRight - The date to be compared against the reference date.\n * Can be a Date object, a number representing milliseconds since the Unix epoch,\n * or a string in a format parseable by the Date constructor.\n * @returns {number} The number of whole days between the reference date (dateLeft) and the compared date (dateRight).\n *\n * @example\n * // How many whole days are between '2022-09-08' and '2023-09-18'?\n * const result = differenceInDays('2022-09-08', new Date('2023-09-18'));\n *\n * The result is 0 if the diff is within a full day\n * const result = differenceInDays('2022-09-08T00:00:00', new Date('2023-09-08T14:00:00'));\n */\nexport function differenceInDays(dateLeft: Date | number | string, dateRight: Date | number | string) {\n const _dateLeft = new Date(dateLeft);\n const _dateRight = new Date(dateRight);\n\n const difference = (_dateLeft.getTime() - _dateRight.getTime()) / (1000 * 60 * 60 * 24);\n\n return Math.trunc(difference);\n}\n","import {AbstractControl, AsyncValidatorFn, ValidatorFn, Validators} from '@angular/forms';\nimport {of} from 'rxjs';\n\n/**\n * Provides a conditional validator that applies the specified validator functions only if the condition is met.\n *\n * @param condition A function that determines whether the validators should be applied.\n * @param trueValidatorFn The validator function or an array of validator functions to be applied when the condition is true.\n * @param falseValidatorFn Optional. The validator function or an array of validator functions to be applied when the condition is false.\n * @returns A validator function that can be used with Angular Reactive Forms.\n */\nexport function ifValidator(\n condition: (control: AbstractControl) => boolean,\n trueValidatorFn: ValidatorFn | ValidatorFn[],\n falseValidatorFn?: ValidatorFn | ValidatorFn[],\n): ValidatorFn {\n /**\n * @param control The AbstractControl to validate.\n * @returns Validation errors if the condition is met; otherwise, null.\n */\n return (control: AbstractControl): Validators | null => {\n if (!trueValidatorFn || !condition(control)) {\n return composeValidators(control, falseValidatorFn);\n }\n\n return composeValidators(control, trueValidatorFn);\n };\n}\n\n/**\n * Provides a conditional async validator that applies the specified async validator function only if the condition is met.\n *\n * @param condition A function that determines whether the async validator should be applied.\n * @param validatorFn The async validator function to be applied conditionally.\n * @returns An async validator function that can be used with Angular Reactive Forms.\n */\nexport function ifAsyncValidator(\n condition: (control: AbstractControl) => boolean,\n validatorFn: AsyncValidatorFn,\n): AsyncValidatorFn {\n /**\n * @param control The AbstractControl to validate asynchronously.\n * @returns An observable that emits validation errors if the condition is met; otherwise, emits null.\n */\n return (control: AbstractControl) => {\n if (!validatorFn || !condition(control)) {\n return of(null);\n }\n\n return validatorFn(control);\n };\n}\n\n/**\n * Composes and applies the provided validators to the given AbstractControl.\n *\n * @param control The AbstractControl to validate.\n * @param validatorFn The validator function or an array of validator functions to be applied.\n * @returns Validation errors if the validators are applicable; otherwise, null.\n */\nfunction composeValidators(\n control: AbstractControl,\n validatorFn: ValidatorFn | ValidatorFn[] | undefined,\n): Validators | null {\n if (!validatorFn) {\n return null;\n }\n\n const validatorFns = Array.isArray(validatorFn) ? validatorFn : [validatorFn];\n return Validators.compose(validatorFns)?.(control) || null;\n}\n","import {makeEnvironmentProviders} from '@angular/core';\n\nexport class IdleDetectionConfig {\n idleDurationInSeconds?: number;\n timeoutDurationInSeconds?: number;\n}\n\nexport function provideIdleDetectionConfig(config: IdleDetectionConfig) {\n return makeEnvironmentProviders([{provide: IdleDetectionConfig, useValue: config}]);\n}\n","import {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport {IdleDetectionConfig, provideIdleDetectionConfig} from './idle-detection.config';\n\n/**\n * Idle detection module.\n * @deprecated use provideIdleDetectionConfig(config: IdleDetectionConfig) instead\n */\n@NgModule({\n imports: [],\n})\nexport class IdleDetectionModule {\n static forRoot(config: IdleDetectionConfig): ModuleWithProviders<IdleDetectionModule> {\n return {\n ngModule: IdleDetectionModule,\n providers: [provideIdleDetectionConfig(config)],\n };\n }\n}\n","import {Injectable, Optional} from '@angular/core';\nimport {fromEvent, merge, Subject, Subscription, throttleTime} from 'rxjs';\n\nimport {IdleDetectionConfig} from './idle-detection.config';\n\n/**\n * Service for detecting user idle time and implementing a countdown.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class IdleDetectionService {\n /**\n * The list of interruption events that will end the idle detection.\n */\n private interruptionEvents = [\n 'click',\n 'keydown',\n 'keypress',\n 'mousemove',\n 'mousedown',\n 'scroll',\n 'wheel',\n 'touchmove',\n 'pointermove',\n 'resize',\n ];\n private interruptionSubscription?: Subscription;\n\n /**\n * The default idle duration in seconds (19 minutes).\n */\n private idleDuration = 19 * 60;\n\n /**\n * The default timeout duration in seconds (1 minute).\n */\n private timeoutDuration = 60;\n\n /**\n * Timer for idle detection.\n */\n private idleTimer?: number;\n\n /**\n * Timer for countdown.\n */\n private countdownTimer?: number;\n\n /**\n * Flag to indicate if countdown is in progress.\n */\n private isCountingDown = false;\n\n /**\n * The current countdown value.\n */\n private countdown = this.timeoutDuration;\n\n /**\n * Subject to emit when idle period ends.\n */\n private idleEndSubject = new Subject<void>();\n\n /**\n * Subject to emit the countdown value.\n */\n private countdownSubject = new Subject<number>();\n\n /**\n * Subject to emit when countdown ends.\n */\n private countdownEndSubject = new Subject<void>();\n\n /**\n * Constructs the IdleDetectionService.\n * @param config - Optional configuration for idle and timeout durations.\n */\n constructor(@Optional() config: IdleDetectionConfig) {\n if (config) {\n this.setConfig(config);\n }\n }\n\n /**\n * Starts to watch for user inactivity.\n */\n startWatching() {\n this.setupInterruptionEvents();\n this.startIdleTimer();\n }\n\n /**\n * Resets the idle timer when user activity is detected.\n * @param withCountdownReset - Flag to indicate if countdown should be reset.\n * By default, it only reset the idle-detection timer. If you enter the countdown phase, it won't stop the countdown.\n * Pass true when you want to reset the countdown as well. This is useful when you click \"Keep Me Signed In\" button in cll-idle-detection component\n */\n resetTimer(withCountdownReset = false) {\n this.startIdleTimer();\n\n if (withCountdownReset && this.isCountingDown) {\n this.stopCountdown();\n }\n }\n\n /**\n * Sets up the interruption events that will end the idle detection.\n * Listens to a set of events on the document (e.g. click, keydown, mousemove, etc.).\n * When any of these events is triggered, the idle timer is reset.\n * Uses `throttleTime` operator to only trigger the reset when the events are spaced\n * out by at least 1000ms (1 second).\n * @private\n */\n private setupInterruptionEvents() {\n if (!this.interruptionSubscription) {\n const throttledInterruptionEvents = this.interruptionEvents.map((eventName) =>\n fromEvent(document, eventName).pipe(throttleTime(1000)),\n );\n this.interruptionSubscription = merge(...throttledInterruptionEvents).subscribe(() => this.resetTimer());\n }\n }\n\n /**\n * Starts the idle timer.\n * When the timer expires, it emits an event through onIdleEnd() and starts the countdown.\n */\n private startIdleTimer() {\n clearTimeout(this.idleTimer);\n\n this.idleTimer = window.setTimeout(() => {\n // after idle period, user inactivity detected\n this.idleEndSubject.next();\n this.startCountdown();\n }, this.idleDuration * 1000);\n }\n\n /**\n * Starts the countdown.\n */\n private startCountdown() {\n this.isCountingDown = true;\n this.countdownSubject.next(this.countdown);\n\n this.countdownTimer = window.setInterval(() => {\n this.countdown--;\n this.countdownSubject.next(this.countdown);\n\n if (this.countdown <= 0) {\n this.stopCountdown();\n this.countdownEndSubject.next();\n }\n }, 1000);\n }\n\n /**\n * Stops the countdown.\n */\n private stopCountdown() {\n clearInterval(this.countdownTimer);\n this.isCountingDown = false;\n\n // reset countdown\n this.countdown = this.timeoutDuration;\n }\n\n /**\n * Returns an observable that emits when the user has been idle for a long period.\n * Developers can use this to perform actions like opening a dialog.\n *\n * user has been inactive for a long period (idleDuration), at this moment, idle detection phase ends, onIdleEnd event is emitted, and then enter countdown/timeout phase.\n * During the countdown phase:\n * - if user has any activity, countdown phase immediately ends and restart the idle detection phase.\n * - else, countdownEnd event will be emitted when timeoutDuration is over.\n * @returns {Observable<void>} - Observable for idle end event.\n */\n onIdleEnd() {\n return this.idleEndSubject.asObservable();\n }\n\n /**\n * Returns an observable that emits when the countdown ends.\n * Usually means the user has been inactive for a very long time and should be logged out.\n * @returns {Observable<void>} - Observable for countdown end event.\n */\n onTimeoutEnd() {\n return this.countdownEndSubject.asObservable();\n }\n\n /**\n * Returns an observable that emits the countdown value every second.\n * @returns {Observable<number>} - Observable for countdown value.\n */\n onCountDown() {\n return this.countdownSubject.asObservable();\n }\n\n /**\n * Clears all timers when the component is destroyed.\n */\n clearTimers() {\n clearTimeout(this.idleTimer);\n clearInterval(this.countdownTimer);\n\n this.interruptionSubscription?.unsubscribe();\n this.interruptionSubscription = undefined;\n }\n\n /**\n * Sets the idle and timeout durations based on the provided configuration.\n * @param config - Configuration object with idle and timeout durations.\n */\n setConfig(config: IdleDetectionConfig) {\n if (config.idleDurationInSeconds) {\n this.idleDuration = config.idleDurationInSeconds;\n }\n\n if (config.timeoutDurationInSeconds) {\n this.countdown = this.timeoutDuration = config.timeoutDurationInSeconds;\n }\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nexport function isArrayLike(value: any): value is {length: number} {\n return (\n value != null &&\n typeof value !== 'function' &&\n typeof value.length === 'number' &&\n value.length >= 0 &&\n value.length <= Number.MAX_SAFE_INTEGER\n );\n}\n\nexport function isPrototype(value: any): boolean {\n const Ctor = value?.constructor;\n return Ctor && Ctor.prototype === value;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {isArrayLike, isPrototype} from './internal.util';\n\nexport function isEmpty(value: string): value is '';\n/**\n * Check if a value is null, undefined, empty ArrayLike, Map, Set or empty object.\n * @param value The value to check.\n * @returns Whether the value is null, undefined, empty ArrayLike, Map, Set or empty object.\n */\nexport function isEmpty<T extends object | ArrayLike<any> | Map<any, any> | Set<any>>(\n value: T | null | undefined,\n): value is null | undefined;\n/**\n * Checks if a value is empty.\n *\n * @param {any} value - The value to check for emptiness. It can be of any type.\n * @return {boolean} `true` if the value is empty, `false` otherwise.\n */\nexport function isEmpty(value?: any): boolean {\n if (value === null || value === undefined) {\n // Handles null and undefined\n return true;\n }\n\n // Handle array-like objects (arrays, strings, jQuery-like collections)\n if (\n (Array.isArray(value) || typeof value === 'string' || typeof (value as any).splice === 'function') &&\n isArrayLike(value)\n ) {\n return value.length === 0;\n }\n\n // Handle Maps and Sets\n if (value instanceof Map || value instanceof Set) {\n return value.size === 0;\n }\n\n // Handle objects\n if (typeof value === 'object') {\n // Check for prototype objects and non-enumerable properties\n if (isPrototype(value)) {\n return Object.getOwnPropertyNames(value).length === 0;\n }\n\n // Check for enumerable properties\n for (const key in value) {\n if (Object.prototype.hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n // All other types (numbers, booleans, functions, etc.)\n return true;\n}\n\nexport function isNotEmpty(value: ''): false;\nexport function isNotEmpty(value: string): value is Exclude<string, ''>;\nexport function isNotEmpty<T extends object | ArrayLike<any> | Map<any, any> | Set<any>>(\n value: T | null | undefined,\n): value is T;\n/**\n * Checks if a value is not null, undefined, empty ArrayLike, Map, Set, or empty object.\n *\n * @param {any} value - The value to check.\n * @return {boolean} Whether the value is not null, undefined, empty ArrayLike, Map, Set, or empty object.\n */\nexport function isNotEmpty(value?: any): boolean {\n return !isEmpty(value);\n}\n","/**\n * Check if two values are deeply equal.\n * @param {T} value1 - The first value to compare.\n * @param {T} value2 - The second value to compare.\n * @returns {boolean} - Returns true if the values are deeply equal, otherwise false.\n */\nexport function isEqual<T>(value1: T, value2: T): boolean {\n if (value1 === value2) return true;\n\n if (typeof value1 !== 'object' || typeof value2 !== 'object' || value1 === null || value2 === null) {\n return false;\n }\n\n const keys1 = Object.keys(value1) as Array<keyof T>;\n const keys2 = Object.keys(value2) as Array<keyof T>;\n\n if (keys1.length !== keys2.length) return false;\n\n for (const key of keys1) {\n if (!keys2.includes(key) || !isEqual(value1[key], value2[key])) {\n return false;\n }\n }\n\n return true;\n}\n","/**\n * Create an object composed of object properties that satisfy a given condition.\n * @param {T} source - The object to pick properties from.\n * @param {(value: T[keyof T], key: string) => boolean} predicate - The function invoked per property.\n * @returns {Partial<T>} - Returns the new object.\n */\nexport function pickBy<T>(source: T, predicate: (value: T[keyof T], key: string) => boolean): Partial<T> {\n const result: Partial<T> = {};\n\n for (const key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key) && predicate(source[key], key)) {\n result[key] = source[key];\n }\n }\n\n return result;\n}\n","import {pickBy} from './pick-by.util';\n\n/**\n * Create an object composed of object properties that do not satisfy a given condition.\n * @param {T} source - The object to omit properties from.\n * @param {(value: T[keyof T], key: string) => boolean} predicate - The function invoked per property.\n * @returns {Partial<T>} - Returns the new object.\n */\nexport function omitBy<T>(source: T, predicate: (value: T[keyof T], key: string) => boolean): Partial<T> {\n // Negate the predicate and pass it to pickBy\n return pickBy(source, (value, key) => !predicate(value, key));\n}\n","/**\n * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end.\n * A step of -1 is used if a negative start is specified without an end or step.\n * If end is not specified, it's set to start with start then set to 0.\n *\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nexport function range(start: number, end?: number | undefined, step?: number | undefined, fromRight = false) {\n // if range takes only 1 input, that input is end, start with 0\n if (end === undefined) {\n end = start;\n start = 0;\n }\n\n step = step === undefined ? (start < end ? 1 : -1) : step;\n\n let index = -1;\n let length = Math.max(Math.ceil((end - start) / (step || 1)), 0);\n const result = new Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n","// https://regex101.com/library/mX1xW0\nexport const emailPattern = /^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$/;\n\nexport const urlPattern =\n /^https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/;\nexport const httpsPattern =\n /^https:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/;\n\n// https://regex101.com/library/dT0vT3?orderBy=RELEVANCE&search=ip\nexport const ipRegex =\n /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;\n\n// A fully qualified domain name (FQDN) is a domain name that specifies its exact location in the tree hierarchy of the Domain Name System (DNS)\n// https://www.regextester.com/103452\nexport const fqdnRegex = /(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]\\.)+[a-zA-Z]{2,63}$)/;\n","import {fqdnRegex, httpsPattern, ipRegex, urlPattern} from '../const';\n\n/**\n * Check if hostname is IP\n * @param hostname new URL(your-url).hostname\n * @returns true if hostname is a IP\n */\nexport function isIP(hostname: string) {\n return ipRegex.test(hostname);\n}\n\n/**\n * Check if hostname is FQDN\n * @param hostname new URL(your-url).hostname\n * @returns true if hostname is a FQDN\n */\nexport function isFQDN(hostname: string) {\n return fqdnRegex.test(hostname);\n}\n\n/**\n * Check if url is valid\n * @param url\n * @returns true if valid\n */\nexport function isURL(url: string) {\n return urlPattern.test(url);\n}\n\n/**\n * Check if a url starts with https, the url must be a valid url.\n * @param url\n * @returns true if it's a https valid url\n */\nexport function isHttps(url: string) {\n return httpsPattern.test(url);\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {isHttps} from '../utils';\n\n@Pipe({\n name: 'isHttps',\n standalone: true,\n})\nexport class IsHttpsPipe implements PipeTransform {\n transform(value: string): boolean {\n return isHttps(value);\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nconst unmaskNumber = 6;\nconst maskChar = '*';\n\nexport interface MaskOptions {\n unmaskedPrefixLength?: number;\n unmaskedSuffixLength?: number;\n masked?: boolean;\n}\n\n@Pipe({\n name: 'mask',\n standalone: true,\n})\nexport class MaskPipe implements PipeTransform {\n /**\n * Transforms the input string by masking characters based on the provided options.\n *\n * @param {string} value - The input string to be masked.\n * @param {MaskOptions} [options={}] - Options for customizing the masking behavior.\n * @returns {string} - The masked string.\n */\n transform(value: string, options: MaskOptions = {}): string {\n const {unmaskedPrefixLength = unmaskNumber, unmaskedSuffixLength = unmaskNumber, masked = true} = options;\n\n if (\n value.length <= unmaskedPrefixLength + unmaskedSuffixLength ||\n unmaskedPrefixLength < 0 ||\n unmaskedSuffixLength < 0 ||\n !masked\n ) {\n return value;\n }\n\n return value\n .split('')\n .map((char, i) => (i < unmaskedPrefixLength || i > value.length - unmaskedSuffixLength - 1 ? char : maskChar))\n .join('');\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {range} from '../utils';\n\n@Pipe({\n name: 'range',\n standalone: true,\n})\nexport class RangePipe implements PipeTransform {\n transform(value: [number]): number[];\n transform(value: [number, number]): number[];\n transform(value: [number, number, number]): number[];\n transform(value: [number, number, number, boolean]): number[];\n transform(value: unknown): number[] {\n const input = value as [number, number, number, boolean];\n return range(...input);\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {assertInInjectionContext, computed, Injector, isSignal, Signal, untracked} from '@angular/core';\nimport {toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {\n combineLatest,\n distinctUntilChanged,\n from,\n identity,\n isObservable,\n ObservableInput,\n ObservableInputTuple,\n OperatorFunction,\n startWith,\n} from 'rxjs';\n\ntype ObservableSignalInput<T> = ObservableInput<T> | Signal<T>;\n\ntype ObservableSignalInputTuple<T> = {\n [K in keyof T]: ObservableSignalInput<T[K]> | (() => T[K]);\n};\n\n// pick from ToSignalOptions\nexport type CombineFromOptions<IValue> = {\n readonly injector?: Injector;\n readonly initialValue?: IValue;\n};\n\n// array inputs only\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n): Signal<Output>;\n\n// ---------- 3 args with array inputs -------------\n// combineFrom([signal, obs$], pipeOperator, { initialValue: [1,2] }), Input is [signal, obs$]\n// 1. no initialValue\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<undefined>,\n): Signal<Output | undefined>;\n// 2. initialValue is null, returning type should include null\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<null>,\n): Signal<Output | null>;\n// 3. provide initialValue\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<Output>,\n): Signal<Output>;\n\n// ---------- 2 args wit array inputs -------------\n// 1. no initialValue\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n options?: CombineFromOptions<undefined>,\n): Signal<Output | undefined>;\n// 2. initialValue is null, returning type should include null\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n options?: CombineFromOptions<null>,\n): Signal<Output | null>;\n// 3. provide initialValue\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n options?: CombineFromOptions<Output>,\n): Signal<Output>;\n\n// object input only, e.g. Input is { a: signal, b: obs$ }\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n): Signal<Output>;\n\n// ----------------- 3 args with object input --------------------\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<undefined>,\n): Signal<Output | undefined>;\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<null>,\n): Signal<Output | null>;\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<Output>,\n): Signal<Output>;\n\n// ----------------- 2 args with object input --------------------\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n options?: CombineFromOptions<undefined>,\n): Signal<Output | undefined>;\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n options?: CombineFromOptions<null>,\n): Signal<Output | null>;\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n options?: CombineFromOptions<Output>,\n): Signal<Output>;\n\n/**\n * Combines multiple `Observable` or `Signal` sources into a `Signal` that emits their values. It's like combineLatest.\n *\n * @param {ObservableSignalInputTuple} sources - Array or object of `Observable` or `Signal` values\n * @param {OperatorFunction} [operator] - Operator to apply to the combined values\n * @param {CombineFromOptions} [options] - Options including `initialValue` and `injector`\n * @returns Signal emitting the combined values\n *\n * @example\n * ```ts\n * export class Component {\n * private readonly userService = inject(UserService);\n * page = signal(2);\n *\n * data = combineFrom(\n * [this.page, this.userService.users$],\n * pipe(\n * switchMap(([page, users]) => this.dataService.getData(page, users)),\n * startWith([])\n * )\n * );\n * }\n * ```\n */\nexport function combineFrom<Input = any, Output = Input>(...args: any[]): Signal<Output | null | undefined> {\n assertInInjectionContext(combineFrom);\n\n const {normalizedSources, hasInitValue, operator, options} = normalizeArgs<Input, Output>(args);\n\n const ret = hasInitValue\n ? toSignal(combineLatest(normalizedSources).pipe(operator), {\n initialValue: options!.initialValue!,\n injector: options?.injector,\n })\n : (toSignal(combineLatest(normalizedSources).pipe(operator), {\n injector: options?.injector,\n // requireSync: true,\n }) as Signal<Output | undefined>);\n\n return ret;\n}\n\nfunction normalizeArgs<Input, Output>(\n args: any[],\n): {\n normalizedSources: ObservableInputTuple<Input>;\n operator: OperatorFunction<Input, Output>;\n hasInitValue: boolean;\n options: CombineFromOptions<Output> | undefined;\n} {\n if (!args || args.length < 1 || typeof args[0] !== 'object') {\n throw new TypeError('combineFrom needs sources');\n }\n\n const hasOperator = typeof args[1] === 'function';\n\n if (args.length === 3 && !hasOperator) {\n throw new TypeError('combineFrom needs a pipe operator as the second argument');\n }\n\n // pass sources and options\n if (!hasOperator) {\n // add identity function to args at index 1 as operator function as x=>x\n args.splice(1, 0, identity);\n }\n\n // if no operator passed, identity will be operator\n const [sources, operator, options] = args;\n\n const hasInitValue = options?.initialValue !== undefined;\n\n const normalizedSources = Object.entries(sources).reduce(\n (acc, [keyOrIndex, source]) => {\n if (isSignal(source)) {\n // fix angular NG0950: Input is required but no value is available yet.\n // when input.required is used as combineFrom's input, its value is undefined, untracked(source) will throw error\n let initialValue: any;\n try {\n initialValue = untracked(source);\n } catch (e) {\n // If the input is not set, skip startWith or provide a fallback\n initialValue = undefined;\n }\n // toObservable doesn't immediately emit initialValue of the signal\n acc[keyOrIndex] = toObservable(source, {injector: options?.injector}).pipe(startWith(initialValue));\n } else if (isObservable(source)) {\n acc[keyOrIndex] = source.pipe(distinctUntilChanged());\n } else if (typeof source === 'function') {\n // seldom use: pass function like () => 5\n const computedRes = computed(source as () => unknown);\n acc[keyOrIndex] = toObservable(computedRes, {injector: options?.injector}).pipe(startWith(source()));\n } else {\n // seldom use: pass promise, Map, array, etc that from accepts\n acc[keyOrIndex] = from(source as any).pipe(distinctUntilChanged());\n }\n return acc;\n },\n (Array.isArray(sources) ? [] : {}) as any,\n );\n\n return {normalizedSources, operator, hasInitValue, options};\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {computed, CreateComputedOptions, DestroyRef, effect, inject, Signal, signal, untracked} from '@angular/core';\nimport {concatAll, exhaustAll, isObservable, mergeAll, Observable, Subject, switchAll} from 'rxjs';\n\ntype ComputedAsyncBehavior = 'switch' | 'merge' | 'concat' | 'exhaust';\n\n// { equal, behavior }\ntype BaseOptions<T> = CreateComputedOptions<T> & {behavior?: ComputedAsyncBehavior};\n\ntype OptionsWithInitialValue<T> = {initialValue: T} & BaseOptions<T>;\ntype OptionsWithOptionalInitialValue<T> = {initialValue?: undefined} & BaseOptions<T>;\ntype OptionsWithRequireSync<T> = {requireSync: true} & BaseOptions<T>;\n\n// without options\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | Promise<T> | T | undefined,\n): Signal<T | undefined>;\n\n// with optional initialValue\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | Promise<T> | T | undefined,\n options: OptionsWithOptionalInitialValue<T>,\n): Signal<T | undefined>;\n\n// with initialValue\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | Promise<T> | T | undefined,\n options: OptionsWithInitialValue<T>,\n): Signal<T>;\n\n// for promise, without initialValue but set requireSync as true, throw error\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Promise<T>,\n options: OptionsWithOptionalInitialValue<T> & {requireSync: true},\n): never;\n\n// for observables, without initialValue, without requireSync, return T | undefined\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | T | undefined,\n options: {\n initialValue?: undefined;\n requireSync?: false;\n } & BaseOptions<T>,\n): Signal<T | undefined>;\n\n// for observables, without initialValue, but requireSync is true, return T\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | T,\n options: OptionsWithRequireSync<T> & {initialValue?: undefined | T},\n): Signal<T>;\n\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | Promise<T> | T | undefined,\n options: any = {},\n): Signal<T | undefined> {\n const destroyRef = inject(DestroyRef);\n\n const sourceSubject = new Subject<Promise<T> | Observable<T>>();\n const source$ = flattenObservable(sourceSubject, options.behavior || 'switch');\n\n const sourceValue = signal<T | undefined>(options.initialValue);\n\n const sourceResult = source$.subscribe({\n next: (value) => sourceValue.set(value),\n error: (error) => {\n sourceValue.set(error);\n // Error should be handled by the user\n // throw error;\n },\n });\n\n destroyRef.onDestroy(() => sourceResult.unsubscribe());\n\n if (options.requireSync && options.initialValue === undefined) {\n const initialEmission = computeFn(undefined);\n\n if (isPromise(initialEmission)) {\n throw new Error(`Promises cannot work with requireSync. Set requireSync to false or pass an initialValue.`);\n }\n\n if (isObservable(initialEmission)) {\n sourceSubject.next(initialEmission);\n } else {\n // primitive value T\n sourceValue.set(initialEmission);\n }\n }\n\n if (options.requireSync && sourceValue() === undefined) {\n throw new Error(`The observable doesn't emit synchronously. Set requireSync to false or pass an initialValue.`);\n }\n\n let shouldSkipFirstComputation = options.requireSync === true;\n\n effect(() => {\n const currentValue = untracked(() => sourceValue());\n\n const newSource = computeFn(currentValue);\n\n if (shouldSkipFirstComputation) {\n shouldSkipFirstComputation = false;\n return;\n }\n\n if (isPromise(newSource) || isObservable(newSource)) {\n untracked(() => sourceSubject.next(newSource));\n } else {\n untracked(() => sourceValue.set(newSource));\n }\n });\n\n return computed(() => sourceValue() as T, {equal: options.equal});\n}\n\nfunction flattenObservable<T>(\n source: Subject<Promise<T> | Observable<T>>,\n behavior: ComputedAsyncBehavior,\n): Observable<T> {\n const behaviorMap = {\n switch: switchAll,\n merge: mergeAll,\n concat: concatAll,\n exhaust: exhaustAll,\n };\n\n return source.pipe(behaviorMap[behavior]());\n}\n\nfunction isPromise<T>(value: any): value is Promise<T> {\n return value && typeof value.then === 'function';\n}\n","import {signal} from '@angular/core';\n\nexport function createTrigger() {\n const sourceSignal = signal(0);\n\n return {\n next: () => {\n sourceSignal.update((v) => v + 1);\n },\n value: sourceSignal.asReadonly(),\n };\n}\n","import {assertInInjectionContext, inject, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {ActivatedRoute, type Params} from '@angular/router';\nimport {map} from 'rxjs';\n\ntype ParamsTransformFn<Output> = (params: Params) => Output;\n\n/**\n * The `InputOptions` interface defines options for configuring the behavior of the `injectParams` function.\n *\n * @template Output - The expected type of the read value.\n */\nexport interface ParamsOptions<Output> {\n /**\n * A transformation function to convert the written value to the expected read value.\n *\n * @param v - The value to transform.\n * @returns The transformed value.\n */\n transform?: (v: string) => Output;\n\n /**\n * The initial value to use if the parameter is not present or undefined.\n */\n initialValue?: Output;\n}\n\n/**\n * Injects the params from the current route.\n * If a key is provided, returns the value of that key.\n * If a transform function is provided, returns the result of the function.\n * Otherwise, returns the entire params object.\n *\n * @example\n * const params = injectParams(); // Returns the entire params object\n * const userId = injectParams('id'); // Returns the value of the 'id' param\n * const userId = injectParams(p => p['id'] as string); // Returns the 'id' param using a custom transform function\n * const userId = injectParams('id', { transform: numberAttribute, initialValue: 1 });\n *\n * @param keyOrParamsTransform OPTIONAL The key of the param to return, or a transform function to apply to the params object\n */\nexport function injectParams(): Signal<Params>;\n\nexport function injectParams<Output>(fn: ParamsTransformFn<Output>): Signal<Output>;\n\nexport function injectParams(key: string): Signal<string | null>;\n\n// for boolean or number, if initialValue is provided, transform is a must\nexport function injectParams(\n key: string,\n options: {transform: (v: string) => boolean; initialValue: boolean},\n): Signal<boolean>;\nexport function injectParams(\n key: string,\n options: {transform: (v: string) => number; initialValue: number},\n): Signal<number>;\n// for string, transform is optional\nexport function injectParams(\n key: string,\n options: {transform?: (v: string) => string; initialValue: string},\n): Signal<string>;\n\n// initialValue not provided, must provide transform fn\nexport function injectParams(\n key: string,\n options: {transform: (v: string) => boolean; initialValue?: undefined},\n): Signal<boolean | null>;\nexport function injectParams(\n key: string,\n options: {transform: (v: string) => number; initialValue?: undefined},\n): Signal<number | null>;\nexport function injectParams(\n key: string,\n options: {transform: (v: string) => string; initialValue?: undefined},\n): Signal<string | null>;\n\nexport function injectParams<Output>(\n keyOrParamsTransform?: string | ParamsTransformFn<Output>,\n options: ParamsOptions<Output> = {},\n): Signal<Output | Params | string | boolean | number | null> {\n assertInInjectionContext(injectParams);\n\n const route = inject(ActivatedRoute);\n const initialParams = route.snapshot.params;\n\n const {transform, initialValue} = options;\n\n // injectParams(): Signal<Params>\n if (!keyOrParamsTransform) {\n return toSignal(route.params, {initialValue: initialParams});\n }\n\n // injectParams<Output>(fn: ParamsTransformFn<Output>): Signal<Output>\n if (typeof keyOrParamsTransform === 'function') {\n return toSignal(route.params.pipe(map(keyOrParamsTransform)), {initialValue: keyOrParamsTransform(initialParams)});\n }\n\n // keyOrParamsTransform is string.\n // export function injectParams(key: string): Signal<string | null>;\n // export function injectParams(key: string, options: { transform: (v: string) => boolean; initialValue: boolean }): Signal<boolean>;\n // export function injectParams(key: string, options: { transform: (v: string) => number; initialValue: number }): Signal<number>;\n // export function injectParams(key: string, options: { transform?: (v: string) => string; initialValue: string }): Signal<string>;\n // export function injectParams(key: string, options: { transform: (v: string) => boolean; initialValue?: undefined }): Signal<boolean | null>;\n // export function injectParams(key: string, options: { transform: (v: string) => number; initialValue?: undefined }): Signal<number | null>;\n // export function injectParams(key: string, options: { transform: (v: string) => string; initialValue?: undefined }): Signal<string | null>;\n const getParam = (params: Params) => {\n const param = params?.[keyOrParamsTransform] as string | undefined;\n\n if (!param) {\n return initialValue ?? null;\n }\n\n return transform ? transform(param) : param;\n };\n\n return toSignal(route.params.pipe(map(getParam)), {initialValue: getParam(initialParams)});\n}\n","import {assertInInjectionContext, inject, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {ActivatedRoute, type Params} from '@angular/router';\nimport {map} from 'rxjs';\n\ntype QueryParamsTransformFn<Output> = (params: Params) => Output;\n\n/**\n * The `InputOptions` interface defines options for configuring the behavior of the `injectQueryParams` function.\n *\n * @template Output - The expected type of the read value.\n */\nexport interface QueryParamsOptions<Output> {\n /**\n * A transformation function to convert the written value to the expected read value.\n *\n * @param v - The value to transform.\n * @returns The transformed value.\n */\n transform?: (v: string) => Output;\n\n /**\n * The initial value to use if the query parameter is not present or undefined.\n */\n initialValue?: Output;\n}\n\n/**\n * The `injectQueryParams` function allows you to access and manipulate query parameters from the current route.\n *\n * @returns A `Signal` that emits the entire query parameters object.\n */\nexport function injectQueryParams(): Signal<Params>;\n\n/**\n * The `injectQueryParams` function allows you to access and manipulate query parameters from the current route.\n * It retrieves the value of a query parameter based on a custom transform function applied to the query parameters object.\n *\n * @template Output - The expected type of the read value.\n * @param {QueryParamsTransformFn<Output>} fn - A transform function that takes the query parameters object (`params: Params`) and returns the desired value.\n * @returns {Signal} A `Signal` that emits the transformed value based on the provided custom transform function.\n *\n * @example\n * const searchValue = injectQueryParams((params) => params['search'] as string);\n */\nexport function injectQueryParams<Output>(fn: QueryParamsTransformFn<Output>): Signal<Output>;\n\n/**\n * The `injectQueryParams` function allows you to access and manipulate query parameters from the current route.\n *\n * @param {string} key - The name of the query parameter to retrieve.\n * @returns {Signal} A `Signal` that emits the value of the specified query parameter, or `null` if it's not present.\n */\nexport function injectQueryParams(key: string): Signal<string | null>;\n\n// for boolean or number, if initialValue is provided, transform is a must\nexport function injectQueryParams(\n key: string,\n options: {transform: (v: string) => boolean; initialValue: boolean},\n): Signal<boolean>;\nexport function injectQueryParams(\n key: string,\n options: {transform: (v: string) => number; initialValue: number},\n): Signal<number>;\n// for string, transform is optional\nexport function injectQueryParams(\n key: string,\n options: {transform?: (v: string) => string; initialValue: string},\n): Signal<string>;\n\n// initialValue not provided, must provide transform fn\nexport function injectQueryParams(\n key: string,\n options: {transform: (v: string) => boolean; initialValue?: undefined},\n): Signal<boolean | null>;\nexport function injectQueryParams(\n key: string,\n options: {transform: (v: string) => number; initialValue?: undefined},\n): Signal<number | null>;\nexport function injectQueryParams(\n key: string,\n options: {transform: (v: string) => string; initialValue?: undefined},\n): Signal<string | null>;\n\n/**\n * The `injectQueryParams` function allows you to access and manipulate query parameters from the current route.\n *\n * @template Output - The expected type of the read value.\n * @param {string} keyOrParamsTransform - The name of the query parameter to retrieve, or a transform function to apply to the query parameters object.\n * @param {QueryParamsOptions} options - Optional configuration options for the query parameter.\n * @returns {QueryParamsOptions} A `Signal` that emits the transformed value of the specified query parameter, or the entire query parameters object if no key is provided.\n *\n * @example\n * const search = injectQueryParams('search'); // returns the value of the 'search' query param\n * const search = injectQueryParams(p => p['search'] as string); // same as above but can be used with a custom transform function\n * const idParam = injectQueryParams('id', {transform: numberAttribute}); // returns the value fo the 'id' query params and transforms it into a number\n * const idParam = injectQueryParams(p => numberAttribute(p['id'])); // same as above but can be used with a custom transform function\n * const queryParams = injectQueryParams(); // returns the entire query params object\n */\nexport function injectQueryParams<Output>(\n keyOrParamsTransform?: string | QueryParamsTransformFn<Output>,\n options: QueryParamsOptions<Output> = {},\n): Signal<Output | Params | string | boolean | number | null> {\n assertInInjectionContext(injectQueryParams);\n\n const route = inject(ActivatedRoute);\n const initialQueryParams = route.snapshot.queryParams;\n\n const {transform, initialValue} = options;\n\n // injectQueryParams(): Signal<Params>\n if (!keyOrParamsTransform) {\n return toSignal(route.queryParams, {initialValue: initialQueryParams});\n }\n\n // injectQueryParams<Output>(fn: QueryParamsTransformFn<Output>): Signal<Output>\n if (typeof keyOrParamsTransform === 'function') {\n return toSignal(route.queryParams.pipe(map(keyOrParamsTransform)), {\n initialValue: keyOrParamsTransform(initialQueryParams),\n });\n }\n\n // keyOrParamsTransform is string.\n const getParam = (params: Params) => {\n const param = params?.[keyOrParamsTransform] as string | string[] | undefined;\n\n if (!param) {\n return initialValue ?? null;\n }\n\n if (Array.isArray(param)) {\n if (param.length < 1) {\n return initialValue ?? null;\n }\n return transform ? transform(param[0]) : param[0];\n }\n\n return transform ? transform(param) : param;\n };\n\n return toSignal(route.queryParams.pipe(map(getParam)), {\n initialValue: getParam(initialQueryParams),\n });\n}\n","import {assertInInjectionContext, Injector, isSignal, Signal, untracked} from '@angular/core';\nimport {toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {\n distinctUntilChanged,\n from,\n identity,\n isObservable,\n merge,\n ObservableInput,\n OperatorFunction,\n startWith,\n} from 'rxjs';\n\ntype ObservableSignalInput<T> = ObservableInput<T> | Signal<T>;\n\ntype ObservableSignalInputTuple<T> = {\n [K in keyof T]: ObservableSignalInput<T[K]>;\n};\n\n// pick from ToSignalOptions\nexport type MergeFromOptions<T> = {\n readonly injector?: Injector;\n readonly initialValue?: T | null;\n};\n\nexport function mergeFrom<Input extends readonly unknown[], Output = Input[number]>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n operator?: OperatorFunction<Input[number], Output>,\n options?: MergeFromOptions<Output>,\n): Signal<Output>;\n\nexport function mergeFrom<Input extends readonly unknown[], Output = Input[number]>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n options?: MergeFromOptions<Output>,\n): Signal<Output>;\n\n// No object inputs\n\n/**\n * merge multiple `Observable` or `Signal` sources into a `Signal` that emits the last value. It's like merge.\n *\n * @param {ObservableSignalInputTuple} sources - Array of `Observable` or `Signal` values\n * @param {OperatorFunction} [operator] - Operator to apply to the merge\n * @param {MergeFromOptions} [options] - Options including `initialValue` and `injector`\n * @returns Signal emitting the latest merge result\n *\n * @example\n * ```ts\n * export class Component {\n * e$ = of(1).pipe(delay(1000));\n * f = signal(2);\n *\n * data = mergeFrom(\n * [this.e$, this.f],\n * pipe(\n * switchMap((res) => of(`${res} is coming~`)),\n * startWith(0),\n * ),\n * );\n * }\n * ```\n */\nexport function mergeFrom<Input extends readonly unknown[], Output = Input[number]>(...args: unknown[]) {\n assertInInjectionContext(mergeFrom);\n\n const [sources, operator = identity, options = {}] = parseArgs<Input, Output>(args);\n\n const normalizedSources = sources.map((source) => {\n if (isSignal(source)) {\n return toObservable(source, {injector: options.injector}).pipe(startWith(untracked(source)));\n }\n\n if (!isObservable(source)) {\n source = from(source);\n }\n\n return source.pipe(distinctUntilChanged());\n });\n\n const merged$ = merge(...normalizedSources).pipe(operator as OperatorFunction<Input[number], Output>);\n\n if (options.initialValue !== undefined) {\n return toSignal(merged$, {initialValue: options.initialValue as Output, injector: options.injector});\n }\n return toSignal(merged$, {requireSync: true, injector: options.injector});\n}\n\nfunction parseArgs<Input extends readonly unknown[], Output = Input[number]>(args: unknown[]) {\n if (!args || args.length < 1) {\n throw new TypeError('mergeFrom needs sources');\n }\n\n if (args.length === 1) {\n return [args[0] as readonly [...ObservableSignalInputTuple<Input>], undefined, undefined] as const;\n }\n\n if (args.length === 2) {\n const hasOperator = typeof args[1] === 'function';\n\n if (hasOperator) {\n return [\n args[0] as readonly [...ObservableSignalInputTuple<Input>],\n args[1] as OperatorFunction<Input[number], Output>,\n undefined,\n ] as const;\n }\n\n return [\n args[0] as readonly [...ObservableSignalInputTuple<Input>],\n undefined,\n args[1] as MergeFromOptions<Output>,\n ] as const;\n }\n\n return args as unknown as [\n readonly [...ObservableSignalInputTuple<Input>],\n OperatorFunction<Input[number], Output>,\n MergeFromOptions<Output>,\n ];\n}\n","import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';\n\nimport {differenceInDays} from '../utils/difference-in-days.util';\n\n/**\n * Interface defining the options for the date range validator.\n */\ninterface DateRangeOptions {\n minDate?: Date | string; // Minimum allowed date\n maxDate?: Date | string; // Maximum allowed date\n minInclusive?: boolean; // Whether the comparison for the minimum date can include the exact date\n maxInclusive?: boolean; // Whether the comparison for the maximum date can include the exact date\n compareTime?: boolean; // Whether to compare the time as well. If true, comparisons will include Date time components; if false, time parts will be ignored\n}\n\n/**\n * Validates a date against a specified date range.\n *\n * @param {DateRangeOptions} options - The options for the date range validation.\n * @returns {ValidatorFn} A function that validates a FormControl and returns an error if the date is out of range.\n */\nexport function dateRangeValidator(options: DateRangeOptions): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n // if control doesn't have any value, pass validation. Developer should use Angular required validator.\n if (!control.value) {\n return null;\n }\n\n // Parse the selected date from the control value\n const selectedDate = new Date(control.value);\n\n if (isNaN(selectedDate.getTime())) {\n return {invalidDate: true};\n }\n\n const minDate = options.minDate ? new Date(options.minDate) : null;\n const maxDate = options.maxDate ? new Date(options.maxDate) : null;\n\n if (minDate) {\n let errorCondition = false;\n\n if (options.compareTime) {\n errorCondition = options.minInclusive\n ? selectedDate.getTime() < minDate.getTime()\n : selectedDate.getTime() <= minDate.getTime();\n } else {\n const diff = differenceInDays(selectedDate, minDate);\n errorCondition = options.minInclusive ? diff < 0 : diff <= 0;\n }\n\n if (errorCondition) {\n return {\n minDate: minDate.toISOString(),\n };\n }\n }\n\n if (maxDate) {\n let errorCondition = false;\n\n if (options.compareTime) {\n errorCondition = options.maxInclusive\n ? selectedDate.getTime() > maxDate.getTime()\n : selectedDate.getTime() >= maxDate.getTime();\n } else {\n const diff = differenceInDays(selectedDate, maxDate);\n errorCondition = options.maxInclusive ? diff > 0 : diff >= 0;\n }\n\n if (errorCondition) {\n return {\n maxDate: maxDate.toISOString(),\n };\n }\n }\n\n return null;\n };\n}\n","import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';\n\n/**\n * A custom validator function that checks for intersection between two form controls. The two controls' values must be arrays.\n *\n * @param {string} controlName1 - The name of the first form control.\n * @param {string} controlName2 - The name of the second form control.\n * @returns {ValidatorFn} A function that validates the form group and returns an error if there is an intersection.\n */\nexport function intersectionValidator<T = string>(controlName1: string, controlName2: string): ValidatorFn {\n return (formGroup: AbstractControl): ValidationErrors | null => {\n const control1 = formGroup.get(controlName1);\n const control2 = formGroup.get(controlName2);\n\n if (!control1 || !control2) {\n return null; // If either control is undefined or null\n }\n\n const value1 = control1.value;\n const value2 = control2.value;\n\n // Assuming both values are arrays\n if (!Array.isArray(value1) || !Array.isArray(value2)) {\n return null;\n }\n\n const intersection = value1.filter((value: T) => value2.includes(value));\n\n if (intersection.length > 0) {\n control1.setErrors({intersection: true});\n control2.setErrors({intersection: true});\n return {intersection: true};\n } else {\n control1.setErrors(null);\n control2.setErrors(null);\n return null;\n }\n };\n}\n","import {AbstractControl, FormArray, ValidationErrors, ValidatorFn} from '@angular/forms';\n\n/**\n * Validator for checking uniqueness across multiple fields in a FormArray or FormGroup.\n *\n * This validator can be applied to a FormArray or FormGroup containing the controls to be validated.\n * It ensures that each control's value is unique among all other controls within the array or group.\n */\nexport class UniqueValidator {\n /**\n * Validator function to be attached to a FormArray or FormGroup.\n *\n * This validator checks for uniqueness of each control's value within the array or group.\n *\n * @param keySelector A function to select the key control for comparison (default is the control itself).\n * @typeparam T The type of the control value.\n */\n static unique<T>(\n keySelector: (control: AbstractControl) => AbstractControl<T> = (control: AbstractControl<T>) => control,\n ): ValidatorFn {\n return (formArray: AbstractControl): ValidationErrors | null => {\n if (!(formArray instanceof FormArray)) {\n return null;\n }\n\n const targetControls = formArray.controls.map(keySelector);\n const valueControlMap = new Map<T, AbstractControl<T>>();\n const invalidControls: AbstractControl<T>[] = [];\n\n for (const control of targetControls) {\n const value = control.value;\n\n if (value == null || String(value) === '' || String(value) === 'NaN') {\n continue;\n }\n\n const controlInMap = valueControlMap.get(value);\n\n if (controlInMap) {\n if (!invalidControls.includes(controlInMap)) {\n invalidControls.push(controlInMap);\n }\n\n invalidControls.push(control);\n } else {\n valueControlMap.set(value, control);\n }\n }\n\n const notUniqueError = {notUnique: true};\n\n // set errors manually for target controls\n for (const control of targetControls) {\n const errors = control.errors;\n\n if (invalidControls.includes(control)) {\n // set not unique error for invalid controls\n control.setErrors(errors === null ? notUniqueError : {...errors, ...notUniqueError});\n } else {\n // remove not unique errors for valid controls\n if (errors === null) {\n control.setErrors(null);\n } else {\n delete errors['notUnique'];\n control.setErrors(Object.keys(errors).length > 0 ? errors : null);\n }\n }\n }\n\n return invalidControls.length > 0 ? notUniqueError : null;\n };\n }\n}\n","import {AbstractControl, ValidationErrors} from '@angular/forms';\n\nimport {httpsPattern, urlPattern} from '../const';\n\nexport function urlValidator(control: AbstractControl): ValidationErrors | null {\n if (!urlPattern.test(control.value)) {\n return {invalidUrl: true};\n }\n return null;\n}\n\nexport function httpsValidator(control: AbstractControl): ValidationErrors | null {\n if (!httpsPattern.test(control.value)) {\n return {invalidUrl: true};\n }\n return null;\n}\n","/*\n * Public API Surface of ngx-lift\n */\n\nexport * from './lib/models';\nexport * from './lib/operators';\nexport * from './lib/pipes';\nexport * from './lib/signals';\nexport * from './lib/utils';\nexport * from './lib/validators';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["isPromise","i1.IdleDetectionConfig"],"mappings":";;;;;;;AAYA;;;;;;;;;;;;;;;;;;;AAmBG;SACa,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YAAA,KAAK,MAAM,OAAO,IAAI,cAAc,EAAE;AACpC,gBAAA,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM;AAE7B,gBAAA,IAAI,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;;oBAErC,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,IAAI,GAAG,cAAc,GAAG,EAAC,GAAG,MAAM,EAAE,GAAG,cAAc,EAAC,CAAC;;qBAC/E;;AAEL,oBAAA,IAAI,MAAM,KAAK,IAAI,EAAE;AACnB,wBAAA,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;;yBAClB;AACL,wBAAA,OAAO,MAAM,CAAC,WAAW,CAAC;wBAC1B,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC;;;;AAKvE,YAAA,OAAO,eAAe,CAAC,MAAM,GAAG,CAAC,GAAG,cAAc,GAAG,IAAI;AAC3D,SAAC;;AAEJ;;ACpEK,SAAU,YAAY,CAAC,OAAwB,EAAA;IACnD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACnC,QAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC;;AAE3B,IAAA,OAAO,IAAI;AACb;AAEM,SAAU,cAAc,CAAC,OAAwB,EAAA;IACrD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACrC,QAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC;;AAE3B,IAAA,OAAO,IAAI;AACb;;AChBA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-lift.mjs","sources":["../../../../libs/ngx-lift/src/lib/operators/combine-latest-eager.operator.ts","../../../../libs/ngx-lift/src/lib/operators/create-async-state.operator.ts","../../../../libs/ngx-lift/src/lib/operators/distinct-on-change.operator.ts","../../../../libs/ngx-lift/src/lib/operators/kubernetes-pagination.operator.ts","../../../../libs/ngx-lift/src/lib/operators/logger.operator.ts","../../../../libs/ngx-lift/src/lib/utils/is-promise.util.ts","../../../../libs/ngx-lift/src/lib/operators/poll.operator.ts","../../../../libs/ngx-lift/src/lib/operators/start-with-tap.operator.ts","../../../../libs/ngx-lift/src/lib/operators/switch-map-with-async-state.operator.ts","../../../../libs/ngx-lift/src/lib/pipes/array-join.pipe.ts","../../../../libs/ngx-lift/src/lib/pipes/byte-converter.pipe.ts","../../../../libs/ngx-lift/src/lib/utils/difference-in-days.util.ts","../../../../libs/ngx-lift/src/lib/utils/form.util.ts","../../../../libs/ngx-lift/src/lib/utils/idle-detection/idle-detection.config.ts","../../../../libs/ngx-lift/src/lib/utils/idle-detection/idle-detection.module.ts","../../../../libs/ngx-lift/src/lib/utils/idle-detection/idle-detection.service.ts","../../../../libs/ngx-lift/src/lib/utils/internal.util.ts","../../../../libs/ngx-lift/src/lib/utils/is-empty.util.ts","../../../../libs/ngx-lift/src/lib/utils/is-equal.util.ts","../../../../libs/ngx-lift/src/lib/utils/pick-by.util.ts","../../../../libs/ngx-lift/src/lib/utils/omit-by.util.ts","../../../../libs/ngx-lift/src/lib/utils/range.util.ts","../../../../libs/ngx-lift/src/lib/const.ts","../../../../libs/ngx-lift/src/lib/utils/url.util.ts","../../../../libs/ngx-lift/src/lib/pipes/is-https.pipe.ts","../../../../libs/ngx-lift/src/lib/pipes/mask.pipe.ts","../../../../libs/ngx-lift/src/lib/pipes/range.pipe.ts","../../../../libs/ngx-lift/src/lib/signals/combine-from.ts","../../../../libs/ngx-lift/src/lib/signals/computed-async.ts","../../../../libs/ngx-lift/src/lib/signals/create-trigger.ts","../../../../libs/ngx-lift/src/lib/signals/inject-params.ts","../../../../libs/ngx-lift/src/lib/signals/inject-query-params.ts","../../../../libs/ngx-lift/src/lib/signals/merge-from.ts","../../../../libs/ngx-lift/src/lib/validators/date-range.validator.ts","../../../../libs/ngx-lift/src/lib/validators/intersection.validator.ts","../../../../libs/ngx-lift/src/lib/validators/unique.validator.ts","../../../../libs/ngx-lift/src/lib/validators/url.validator.ts","../../../../libs/ngx-lift/src/index.ts","../../../../libs/ngx-lift/src/ngx-lift.ts"],"sourcesContent":["import {combineLatest, Observable, startWith, Subject} from 'rxjs';\n\nexport function combineLatestEager<T extends Observable<unknown>[]>(\n sources: T,\n startWithNullForAll?: boolean,\n): Observable<{[K in keyof T]: T[K] extends Observable<infer U> ? U | null : never}>;\n\nexport function combineLatestEager<T extends Record<string, Observable<unknown>>>(\n sources: T,\n startWithNullForAll?: boolean,\n): Observable<{[K in keyof T]: T[K] extends Observable<infer U> ? U | null : never}>;\n\n/**\n * Combines multiple observables into a single observable emitting an array or dictionary\n * of the latest values from each source observable.\n *\n * This operator is similar to RxJS `combineLatest`, but with additional behavior:\n * - When `startWithNullForAll` is `false` (default), only `Subject` instances get `startWith(null)`\n * - When `startWithNullForAll` is `true`, all observables get `startWith(null)`\n *\n * This ensures that `combineLatest` emits immediately with initial values, even if some\n * observables haven't emitted yet.\n *\n * @template T - The type of the data in the observables.\n *\n * @param sources - An array of observables or a dictionary (object) of observables to be combined.\n * @param startWithNullForAll - When `true`, all observables will start with `null`.\n * When `false` (default), only `Subject` instances will start with `null`.\n * @returns An observable emitting an array or dictionary of the latest values from each source observable.\n * Values may be `null` initially if `startWithNullForAll` is `true` or for `Subject` instances.\n *\n * @throws {Error} Throws an error if the provided argument is not an array of observables or a dictionary of observables.\n *\n * @example\n * ```typescript\n * // Array of observables\n * const combined$ = combineLatestEager([obs1$, obs2$, obs3$]);\n *\n * // Dictionary of observables\n * const combined$ = combineLatestEager({\n * users: users$,\n * posts: posts$,\n * comments: comments$\n * });\n *\n * // Start all with null\n * const combined$ = combineLatestEager([obs1$, obs2$], true);\n * ```\n */\nexport function combineLatestEager<T>(\n sources: Array<Observable<T>> | Record<string, Observable<T>>,\n startWithNullForAll = false,\n): Observable<Array<T | null> | Record<string, T | null>> {\n function observableMapper<T>(observable: Observable<T>) {\n if (startWithNullForAll) {\n return observable.pipe(startWith(null));\n } else {\n // Check if observable is a Subject, if true, apply startWith(null)\n return observable instanceof Subject ? observable.pipe(startWith(null)) : observable;\n }\n }\n\n if (Array.isArray(sources)) {\n // If sources is an array of observables\n return combineLatest(sources.map(observableMapper));\n } else if (typeof sources === 'object' && sources !== null) {\n // If sources is a dictionary of observables\n const observables: Record<string, Observable<T | null>> = {};\n\n for (const [key, value] of Object.entries(sources)) {\n observables[key] = observableMapper(value);\n }\n\n return combineLatest(observables);\n } else {\n throw new Error(\n `Invalid argument type. Please provide an array of observables or a dictionary of observables. Received: ${typeof sources}`,\n );\n }\n}\n","import {HttpErrorResponse} from '@angular/common/http';\nimport {catchError, map, Observable, of, pipe, startWith, tap, TapObserver, UnaryFunction} from 'rxjs';\n\nimport {AsyncState} from '../models/async-state.model';\n\n/**\n * createAsyncState transforms an Observable of type T into an Observable of AsyncState<T>.\n * AsyncState<T> represents the loading, error, and data states for asynchronous operations.\n *\n * @template T - The type of the data in the observable.\n * @template E - The type of the error that can occur.\n *\n * @param {Partial<Observer<T>> | ((value: T) => void)} [observerOrNextForOrigin] -\n * An optional parameter that can be a partial TapObserver<T> or a function to handle the next value or error in the original Observable.\n *\n * @returns {UnaryFunction<Observable<T>, Observable<AsyncState<T, E>>>} -\n * A function that transforms an observable stream into an asynchronous state.\n *\n * @example\n * Usage 1: Simple request\n * data$ = this.shopService.products$.pipe(\n * createAsyncState({\n * next: res => console.log('Side effect if success: ' + res),\n * error: error => console.error('Side effect if error: ' + error.message)\n * })\n * );\n *\n * Usage 2: Dependent requests\n * data$ = firstCall$.pipe(\n * switchMap(() => this.shopService.products$),\n * createAsyncState()\n * );\n *\n * Another implementation thought when refreshing the data: instead of startWith, `merge of` emit as the trigger\n *\n * subject.pipe(\n * switchMap(() => merge(\n * of({ loading: true, error: null, data: null }),\n * this.service.apiCall().pipe(\n * map(data => ({ loading: false, error: null, data })),\n * tap({\n * next: res => callback?.(res.data),\n * error: err => errorCallback?.(err),\n * }),\n * catchError(error => of({ loading: false, error, data: null })),\n * ),\n * ))\n * )\n *\n * Usage 3: provide initialValue\n *\n * import {createAsyncState} from 'ngx-lift';\n * import {noop} from 'rxjs';\n *\n * private userService = inject(UserService);\n * private location = inject(Location);\n *\n * userState$ = this.userService\n * .getUserById(1)\n * .pipe(createAsyncState<User>(noop, {loading: false, error: null, data: this.location.getState()}));\n */\nexport function createAsyncState<T, E = HttpErrorResponse>(\n observerOrNextForOrigin?: Partial<TapObserver<T>> | ((value: T) => void),\n initialValue: {loading: boolean; error: E | null; data: T | null} = {loading: true, error: null, data: null},\n): UnaryFunction<Observable<T>, Observable<AsyncState<T, E>>> {\n return pipe(\n tap(observerOrNextForOrigin),\n map((data) => ({loading: false, error: null, data})),\n startWith(initialValue),\n catchError((error: E) => of({loading: false, error, data: null})),\n );\n}\n","import {Observable, OperatorFunction, Subscriber, TeardownLogic} from 'rxjs';\n\n/**\n * Creates an operator function for RxJS Observables that filters out consecutive\n * values that are considered equal according to a provided comparator function,\n * and invokes a callback when a distinct value is encountered.\n *\n * @template T - The type of elements emitted by the observable.\n * @param {(previousValue: T, currentValue: T) => void} onChangeCallback\n * A callback function that will be invoked when a distinct value is encountered.\n * It receives the previous distinct value and the current value.\n * @param {(previousValue: T, currentValue: T) => boolean} [comparator]\n * A function that determines if two values are considered equal.\n * Defaults to a function that performs strict equality (===) comparison.\n * @returns {OperatorFunction<T, T>} - The RxJS operator function.\n *\n * @example\n * Example 1:\n * const source$ = new Observable<number>((observer) => {\n * observer.next(1);\n * observer.next(2);\n * observer.next(2);\n * observer.next(3);\n * observer.next(3);\n * observer.next(4);\n * observer.next(5);\n * observer.complete();\n * });\n *\n * const distinctOnChange$ = source$.pipe(\n * distinctOnChange(\n * (prev, curr) => console.log(`Value changed from ${prev} to: ${curr}`),\n * (prev, curr) => prev === curr,\n * ),\n * );\n * distinctOnChange$.subscribe((res) => console.log(res));\n *\n *\n * Example 2:\n * distinctOnChange<RDEValue<OseInstance>[]>(\n * () => {\n * this.store.dispatch(\n * addToast({\n * toast: {\n * type: ToastType.SUCCESS,\n * title: this.l10nService.getMessage('STATUS_CHANGE'),\n * description: this.l10nService.getMessage('STATUS_CHANGE_DESC'),\n * },\n * }),\n * );\n * },\n * (prev, current) =>\n * prev.every((prevInstance, index) => instanceComparator(prevInstance.entity, current[index].entity)),\n * );\n */\nexport function distinctOnChange<T>(\n onChangeCallback: (previousValue: T, currentValue: T) => void,\n comparator: (previousValue: T, currentValue: T) => boolean = (prev, curr) => prev === curr,\n): OperatorFunction<T, T> {\n return (source: Observable<T>) =>\n new Observable<T>((subscriber: Subscriber<T>): TeardownLogic => {\n let hasFirstValue = false;\n let previousValue: T;\n\n const subscription = source.subscribe({\n next: (currentValue: T) => {\n if (hasFirstValue) {\n if (!comparator(previousValue, currentValue)) {\n onChangeCallback(previousValue, currentValue);\n previousValue = currentValue;\n subscriber.next(currentValue);\n }\n } else {\n previousValue = currentValue;\n hasFirstValue = true;\n subscriber.next(currentValue);\n }\n },\n error: (err: unknown) => subscriber.error(err),\n complete: () => subscriber.complete(),\n });\n\n return () => subscription.unsubscribe();\n });\n}\n","/*\n * ******************************************************************\n * Copyright (c) 2024 Broadcom. All Rights Reserved.\n * Broadcom Confidential. The term \"Broadcom\" refers to Broadcom Inc.\n * and/or its subsidiaries.\n * ******************************************************************\n */\n\nimport {HttpClient} from '@angular/common/http';\nimport {EMPTY, expand, Observable, OperatorFunction, reduce} from 'rxjs';\n\nimport {KubernetesList, KubernetesObject} from '../models';\n\n/**\n * Creates an RxJS operator that fetches paginated Kubernetes resources by continually making requests\n * until all pages have been retrieved, and aggregates the items from all pages into a single KubernetesList.\n *\n * This operator uses Kubernetes' pagination mechanism with the `continue` token. It:\n * - Starts with the initial request\n * - Checks for a `continue` token in the response metadata\n * - Makes subsequent requests with the `continue` token until no more pages exist\n * - Aggregates all items from all pages into a single KubernetesList\n *\n * @template T - The type of Kubernetes objects in the list. Must extend `KubernetesObject`.\n * @param http - The HttpClient instance used to make the HTTP requests.\n * @param endpoint - The API endpoint to fetch the resources from.\n * @param initialParams - Optional initial parameters to include in the request.\n * Can include query parameters like filters and pagination settings.\n * Note: `limit` and `continue` are Kubernetes-specific pagination parameters.\n * @returns An RxJS operator function that transforms a source Observable into an Observable\n * that emits a single KubernetesList containing all aggregated items from all pages.\n *\n * @example\n * ```typescript\n * // Use as an operator\n * this.http.get<KubernetesList<Pod>>('/api/v1/pods')\n * .pipe(\n * aggregatePaginatedKubernetesResources(this.http, '/api/v1/pods', { limit: 100 })\n * )\n * .subscribe(list => {\n * console.log(`Total pods: ${list.items.length}`);\n * });\n * ```\n */\nexport function aggregatePaginatedKubernetesResources<T extends KubernetesObject>(\n http: HttpClient,\n endpoint: string,\n initialParams: Record<string, string | number | boolean | (string | number | boolean)[]> = {},\n): OperatorFunction<KubernetesList<T>, KubernetesList<T>> {\n return (source$: Observable<KubernetesList<T>>) => {\n return source$.pipe(\n expand((response) => {\n const {metadata} = response;\n const {continue: continueToken} = metadata;\n if (continueToken) {\n const params = {...initialParams, continue: continueToken};\n return http.get<KubernetesList<T>>(endpoint, {params});\n }\n return EMPTY; // No more pages\n }),\n reduce((acc, current) => {\n const {items: currentPageItems} = current;\n if (currentPageItems) {\n acc.items = acc.items.concat(currentPageItems);\n }\n return acc;\n }),\n );\n };\n}\n\n/**\n * Fetches paginated Kubernetes resources by continually making requests until all pages have been retrieved.\n *\n * This function is a convenience wrapper that combines the initial HTTP request with pagination handling.\n * It automatically handles Kubernetes pagination using the `continue` token mechanism.\n *\n * Unlike `aggregatePaginatedKubernetesResources`, this function makes the initial request itself\n * rather than being used as an operator on an existing Observable.\n *\n * @template T - The type of Kubernetes objects in the list. Must extend `KubernetesObject`.\n * @param http - The HttpClient instance used to make the HTTP requests.\n * @param endpoint - The API endpoint to fetch the resources from.\n * @param initialParams - Optional initial parameters to include in the request.\n * Can include query parameters like filters and pagination settings.\n * Note: `limit` and `continue` are Kubernetes-specific pagination parameters.\n * @returns An Observable that emits a single KubernetesList containing all aggregated items from all pages.\n *\n * @example\n * ```typescript\n * // Fetch all pods across all pages\n * fetchPaginatedKubernetesResources<Pod>(\n * this.http,\n * '/api/v1/pods',\n * { limit: 100 }\n * ).subscribe(list => {\n * console.log(`Total pods: ${list.items.length}`);\n * });\n * ```\n */\n\nexport function fetchPaginatedKubernetesResources<T extends KubernetesObject>(\n http: HttpClient,\n endpoint: string,\n initialParams: Record<string, string | number | boolean | (string | number | boolean)[]> = {},\n) {\n const initialRequest$ = http.get<KubernetesList<T>>(endpoint, {params: initialParams});\n\n return initialRequest$.pipe(\n expand((response) => {\n const {metadata} = response;\n const {continue: continueToken} = metadata;\n if (continueToken) {\n const params = {...initialParams, continue: continueToken};\n return http.get<KubernetesList<T>>(endpoint, {params});\n }\n return EMPTY; // No more pages\n }),\n reduce((acc, current) => {\n const {items: currentPageItems} = current;\n if (currentPageItems) {\n acc.items = acc.items.concat(currentPageItems);\n }\n return acc;\n }),\n );\n}\n","import {OperatorFunction, pipe, tap} from 'rxjs';\n\n// Define a type for different logger functions\ntype LoggerType = 'count' | 'debug' | 'dir' | 'log' | 'table';\n\n// Define a more permissive type for console functions\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ConsoleFunction = (...args: any[]) => void;\n\n// Map each LoggerType to its corresponding console function\nconst loggerFunctions: Record<LoggerType, ConsoleFunction> = {\n count: console.count.bind(console),\n debug: console.debug.bind(console),\n dir: console.dir.bind(console),\n log: console.log.bind(console),\n table: console.table.bind(console),\n};\n\n/**\n * RxJS operator that logs values emitted by an observable using various console methods.\n * Useful for debugging and monitoring observable streams during development.\n *\n * @template T - The type of values emitted by the observable.\n * @param loggerType - The type of logger to be used. Options:\n * - `'log'`: Standard console.log (default)\n * - `'debug'`: Console.debug for debug messages\n * - `'dir'`: Console.dir for object inspection\n * - `'count'`: Console.count for counting emissions\n * - `'table'`: Console.table for tabular data display\n * @returns An RxJS operator function that logs values using the specified console function.\n *\n * @example\n * ```typescript\n * // Log all values\n * source$.pipe(logger()).subscribe();\n *\n * // Use debug logger\n * source$.pipe(logger('debug')).subscribe();\n *\n * // Display objects in table format\n * users$.pipe(logger('table')).subscribe();\n * ```\n */\nexport const logger = <T>(loggerType: LoggerType = 'log'): OperatorFunction<T, T> =>\n pipe(\n tap((value: T) => {\n const logFunction = loggerFunctions[loggerType] || console.log.bind(console);\n logFunction(value);\n }),\n );\n","/**\n * Type guard that checks if a value is a Promise.\n *\n * @param obj - The value to check.\n * @returns `true` if the value is a Promise (has a `then` method), `false` otherwise.\n *\n * @example\n * ```typescript\n * const promise = Promise.resolve(42);\n * isPromise(promise); // true\n *\n * const notPromise = 42;\n * isPromise(notPromise); // false\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isPromise(obj: any): obj is Promise<any> {\n return !!obj && typeof obj.then === 'function';\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {Signal} from '@angular/core';\nimport {toObservable} from '@angular/core/rxjs-interop';\nimport {\n catchError,\n EMPTY,\n exhaustMap,\n from,\n isObservable,\n map,\n merge,\n Observable,\n of,\n share,\n startWith,\n timer,\n} from 'rxjs';\n\nimport {AsyncState} from '../models';\nimport {isPromise} from '../utils/is-promise.util';\n\n/**\n * Polls data at a specified interval and can be triggered manually, returning an observable that\n * emits the result of each poll as an `AsyncState` object.\n *\n * This operator is useful for periodically fetching data from an API or checking for updates.\n * It supports:\n * - Automatic polling at a specified interval\n * - Manual refresh triggers via Observable or Signal\n * - Parameter building for dynamic polling requests\n * - Initial values and delayed start\n *\n * The polling function can return an Observable, Promise, or synchronous value.\n * The operator uses `exhaustMap` internally, which means if a poll is in progress when a new\n * trigger arrives, the new trigger will be ignored until the current poll completes.\n *\n * @template Data - The type of the data emitted by the polling function.\n * @template Input - The type of the input parameter used to build polling parameters (when using `forceRefresh`).\n *\n * @param options - Configuration options for polling:\n * - `interval`: The interval in milliseconds between each automatic poll.\n * - `pollingFn`: A function that returns an Observable, Promise, or primitive value to poll.\n * When `forceRefresh` is provided, this function receives the parameter value.\n * - `forceRefresh`: Optional Observable or Signal that triggers a manual refresh.\n * The emitted value can be used as a parameter for `pollingFn` or transformed via `paramsBuilder`.\n * - `paramsBuilder`: Optional function that transforms the `forceRefresh` value into parameters for `pollingFn`.\n * - `initialValue`: Optional initial `AsyncState` value to emit before the first poll completes.\n * - `delay`: Optional delay in milliseconds to wait before starting the first poll.\n *\n * @returns An observable that emits `AsyncState<Data>` objects representing the polling results.\n * Each emission includes `loading`, `error`, and `data` properties.\n *\n * @example\n * ```typescript\n * // Simple polling\n * const dataState$ = poll({\n * interval: 5000, // Poll every 5 seconds\n * pollingFn: () => this.http.get('/api/data'),\n * initialValue: { loading: true, error: null, data: null }\n * });\n *\n * // Polling with manual refresh\n * const refresh$ = new Subject<void>();\n * const dataState$ = poll({\n * interval: 5000,\n * pollingFn: () => this.http.get('/api/data'),\n * forceRefresh: refresh$\n * });\n *\n * // Polling with parameters\n * const userId$ = new BehaviorSubject(1);\n * const userState$ = poll({\n * interval: 10000,\n * pollingFn: (id: number) => this.http.get(`/api/users/${id}`),\n * forceRefresh: userId$,\n * paramsBuilder: (id) => id\n * });\n * ```\n */\nexport function poll<Data>(options: {\n interval: number;\n pollingFn: (params: any) => Observable<Data> | Promise<Data> | Data;\n initialValue?: AsyncState<Data>;\n delay?: number;\n}): Observable<AsyncState<Data>>;\n\n// forceRefresh output is the pollingFn params' input\nexport function poll<Data, Input>(options: {\n interval: number;\n pollingFn: (params: Input) => Observable<Data> | Promise<Data> | Data;\n forceRefresh: Observable<Input> | Signal<Input>;\n initialValue?: AsyncState<Data>;\n delay?: number;\n}): Observable<AsyncState<Data>>;\n\n// paramsBuilder exists, forceRefresh output is the paramsBuilder params' input\nexport function poll<Data, Input>(options: {\n interval: number;\n pollingFn: (params: any) => Observable<Data> | Promise<Data> | Data;\n forceRefresh: Observable<Input> | Signal<Input>;\n paramsBuilder: (input: Input) => any;\n initialValue?: AsyncState<Data>;\n delay?: number;\n}): Observable<AsyncState<Data>>;\n\nexport function poll<Data, Input>(options: {\n interval: number;\n pollingFn: (params: any) => Observable<Data> | Promise<Data> | Data;\n forceRefresh?: Observable<Input> | Signal<Input>;\n paramsBuilder?: (input: Input) => any;\n initialValue?: AsyncState<Data>;\n delay?: number;\n}): Observable<AsyncState<Data>> {\n const timerEmitValue = '__timer__emission__';\n const timer$ = timer(options.delay || 0, options.interval).pipe(map((i) => `${timerEmitValue}${i}`));\n\n const trigger$ =\n options.forceRefresh === undefined\n ? EMPTY\n : isObservable(options.forceRefresh)\n ? options.forceRefresh\n : toObservable(options.forceRefresh);\n\n let inputByForceRefresh: Input | undefined = undefined; // if forceRefresh is not provided, input will be undefined\n\n return merge(trigger$, timer$).pipe(\n exhaustMap((input) => {\n // input can be either by forceRefresh or timer\n const isTimerTrigger = typeof input === 'string' && input.includes(timerEmitValue);\n const isManualTrigger = !isTimerTrigger;\n if (isManualTrigger) {\n inputByForceRefresh = input as Input;\n }\n\n // build params by input\n // if paramsBuilder is provided, params will be the value of this function call\n // if paramsBuilder is not provided, params will be the value emitted by the forceRefresh\n const params = options.paramsBuilder ? options.paramsBuilder(inputByForceRefresh as Input) : inputByForceRefresh;\n\n // NOTE: using exhaustMap will NOT emit ${timerEmitValue}0 if forceRefresh is not provided\n // using concatMap will emit ${timerEmitValue}0 if forceRefresh is not provided\n const isFirstRequest = input === `${timerEmitValue}0`; // timer first emission when forceRefresh is not provided\n\n const fnResult = options.pollingFn(params);\n const fnResult$ = isObservable(fnResult) ? fnResult : isPromise(fnResult) ? from(fnResult) : of(fnResult);\n\n let observable$ = fnResult$.pipe(\n map((data) => ({loading: false, error: null, data})),\n catchError((error) => of({loading: false, error, data: null})),\n );\n\n if (isFirstRequest) {\n observable$ = observable$.pipe(\n startWith(options.initialValue ?? ({loading: true, error: null, data: null} as any)),\n );\n }\n if (isManualTrigger) {\n observable$ = observable$.pipe(startWith({loading: true, error: null, data: null}));\n }\n\n return observable$;\n }),\n share(),\n );\n}\n","import {Observable} from 'rxjs';\n\n/**\n * RxJS operator that executes a callback function before the source Observable starts emitting values.\n * This operator is useful for triggering side effects (like logging, state updates, or initialization)\n * before the main Observable begins emitting.\n *\n * @template T - The type of values emitted by the observable.\n * @param callback - A function to be executed synchronously before the source Observable emits its first value.\n * @returns An RxJS operator function that executes the callback and then returns the source Observable unchanged.\n *\n * @example\n * ```typescript\n * // Log before starting\n * data$.pipe(\n * startWithTap(() => console.log('Starting data fetch...')),\n * switchMap(() => this.http.get('/api/data'))\n * ).subscribe();\n *\n * // Update loading state\n * data$.pipe(\n * startWithTap(() => this.loading.set(true)),\n * finalize(() => this.loading.set(false))\n * ).subscribe();\n * ```\n */\nexport function startWithTap<T>(callback: () => void) {\n return (source: Observable<T>) => {\n callback();\n return source;\n };\n}\n","import {HttpErrorResponse} from '@angular/common/http';\nimport {Observable, OperatorFunction, switchMap} from 'rxjs';\n\nimport {AsyncState} from '../models';\nimport {createAsyncState} from './create-async-state.operator';\n\n/**\n * Custom RxJS operator that uses switchMap to handle asynchronous operations and\n * transforms the emitted values into an AsyncState object.\n *\n * @template T - The type of data emitted by the observable returned by the project.\n * @template K - The type of value emitted by the source observable.\n * @template E - The type of error that can be encountered during the asynchronous operation.\n *\n * @param {function(K): Observable<T>} project - A function that takes a value emitted by the source\n * observable and returns an observable representing an asynchronous operation.\n *\n * @returns {OperatorFunction<K, AsyncState<T, E>>} - An RxJS operator that transforms the source observable into\n * an observable of AsyncState objects.\n *\n * @example\n * // Usage of the switchMapWithAsyncState operator\n * const source$ = new BehaviorSubject<number>(1);\n *\n * const asyncOperation = (value: number) => {\n * return of(value * 2).pipe(delay(1000));\n * };\n *\n * const result$ = source$.pipe(switchMapWithAsyncState(asyncOperation));\n * result$.subscribe((state) => {\n * console.log(state); // Outputs AsyncState objects with loading, data, and error properties.\n * });\n */\nexport function switchMapWithAsyncState<T, K, E = HttpErrorResponse>(\n project: (value: K, index: number) => Observable<T>,\n): OperatorFunction<K, AsyncState<T, E>> {\n return (source: Observable<K>) =>\n source.pipe(switchMap((value, index) => project(value, index).pipe(createAsyncState<T, E>())));\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Angular pipe that joins array elements into a string using a specified separator.\n *\n * @example\n * ```html\n * <!-- Join array with default comma separator -->\n * <div>{{ ['apple', 'banana', 'cherry'] | arrayJoin }}</div>\n * <!-- Output: \"apple,banana,cherry\" -->\n *\n * <!-- Join array with custom separator -->\n * <div>{{ ['apple', 'banana', 'cherry'] | arrayJoin: ' - ' }}</div>\n * <!-- Output: \"apple - banana - cherry\" -->\n * ```\n */\n@Pipe({\n name: 'arrayJoin',\n})\nexport class ArrayJoinPipe implements PipeTransform {\n /**\n * Transforms an array into a string by joining its elements with a separator.\n *\n * @param value - The array to join. If not an array, returns the value as-is.\n * @param separator - The separator string to use between array elements. Defaults to ','.\n * @returns A string containing the joined array elements, or the original value if not an array\n */\n transform(value: unknown, separator = ','): string | unknown {\n if (Array.isArray(value)) {\n return value.join(separator);\n }\n\n // For non-array cases or unexpected types, return the value as is\n return value;\n }\n}\n","import {inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Angular pipe that converts a number of bytes into a human-readable string format\n * (e.g., \"1.5 MB\", \"2.3 GB\") with locale-aware formatting.\n *\n * Supports multiple locales including English, French, Chinese, Japanese, and more.\n * The pipe uses the application's LOCALE_ID to determine the appropriate unit translations.\n *\n * @example\n * ```html\n * <!-- Convert bytes to human-readable format -->\n * <div>{{ 1024 | byteConverter }}</div>\n * <!-- Output: \"1 KB\" (English) or \"1 Ko\" (French) -->\n *\n * <div>{{ 1048576 | byteConverter }}</div>\n * <!-- Output: \"1 MB\" (English) or \"1 Mo\" (French) -->\n * ```\n *\n * @example\n * To use locale-specific formatting, configure LOCALE_ID in your app:\n * ```typescript\n * import { LOCALE_ID, NgModule } from '@angular/core';\n * import { registerLocaleData } from '@angular/common';\n * import localeEn from '@angular/common/locales/en';\n * import localeFr from '@angular/common/locales/fr';\n *\n * registerLocaleData(localeEn);\n * registerLocaleData(localeFr);\n *\n * @NgModule({\n * providers: [\n * {\n * provide: LOCALE_ID,\n * useFactory: () => navigator.language || 'en',\n * },\n * ],\n * })\n * export class AppModule {}\n * ```\n */\n\n@Pipe({\n name: 'byteConverter',\n})\nexport class ByteConverterPipe implements PipeTransform {\n private locale = inject<string>(LOCALE_ID);\n // If using navigator.language directly in the pipe, this approach directly uses the browser's language at the moment the ByteConverterPipe is constructed. If the user changes the language while using the application, it won't be automatically reflected. If dynamic language changes are a requirement, using the LOCALE_ID provider as demonstrated in the AppModule is a more Angular-centric approach.\n // private locale: string;\n // constructor() {\n // // Use navigator.language as the default locale\n // this.locale = navigator.language || 'en';\n // }\n\n transform(value: number): string;\n transform(value?: number): string | null;\n transform(value?: number | null): string | null;\n transform(value?: null | number | undefined): string | null {\n if (value === null || value === undefined || isNaN(value)) {\n return null;\n }\n\n const units = ['BYTE', 'KB', 'MB', 'GB', 'TB'];\n let unitIndex = 0;\n\n while (value >= 1024 && unitIndex < units.length - 1) {\n value /= 1024;\n unitIndex++;\n }\n\n const translationObject = translations[this.locale] || translations['en'];\n const key = units[unitIndex];\n\n return this.formatNumber(value) + ' ' + translationObject[key];\n }\n\n private formatNumber(value: number): string {\n return new Intl.NumberFormat(this.locale, {\n maximumFractionDigits: 2,\n }).format(value);\n }\n}\n\nconst translations: Record<string, Record<string, string>> = {\n en: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'en-US': {\n // You can provide specific variations for en-US if needed\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n de: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n es: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n fr: {\n BYTE: 'o',\n KB: 'Ko',\n MB: 'Mo',\n GB: 'Go',\n TB: 'To',\n },\n it: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n ja: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n ko: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'pt-BR': {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'zh-CN': {\n BYTE: '字节',\n KB: '千字节',\n MB: '兆字节',\n GB: '千兆字节',\n TB: '太字节',\n },\n 'zh-TW': {\n BYTE: '位元組',\n KB: '千位元組',\n MB: '兆位元組',\n GB: '千兆位元組',\n TB: '太位元組',\n },\n ru: {\n BYTE: 'Б',\n KB: 'КБ',\n MB: 'МБ',\n GB: 'ГБ',\n TB: 'ТБ',\n },\n};\n","/**\n * Calculates the difference in whole days between two dates.\n *\n * @param {Date | number | string} dateLeft - The date from which the difference is measured (the reference date).\n * Can be a Date object, a number representing milliseconds since the Unix epoch,\n * or a string in a format parseable by the Date constructor.\n * @param {Date | number | string} dateRight - The date to be compared against the reference date.\n * Can be a Date object, a number representing milliseconds since the Unix epoch,\n * or a string in a format parseable by the Date constructor.\n * @returns {number} The number of whole days between the reference date (dateLeft) and the compared date (dateRight).\n *\n * @example\n * // How many whole days are between '2022-09-08' and '2023-09-18'?\n * const result = differenceInDays('2022-09-08', new Date('2023-09-18'));\n *\n * The result is 0 if the diff is within a full day\n * const result = differenceInDays('2022-09-08T00:00:00', new Date('2023-09-08T14:00:00'));\n */\nexport function differenceInDays(dateLeft: Date | number | string, dateRight: Date | number | string) {\n const _dateLeft = new Date(dateLeft);\n const _dateRight = new Date(dateRight);\n\n const difference = (_dateLeft.getTime() - _dateRight.getTime()) / (1000 * 60 * 60 * 24);\n\n return Math.trunc(difference);\n}\n","import {AbstractControl, AsyncValidatorFn, ValidatorFn, Validators} from '@angular/forms';\nimport {of} from 'rxjs';\n\n/**\n * Provides a conditional validator that applies the specified validator functions only if the condition is met.\n *\n * @param condition A function that determines whether the validators should be applied.\n * @param trueValidatorFn The validator function or an array of validator functions to be applied when the condition is true.\n * @param falseValidatorFn Optional. The validator function or an array of validator functions to be applied when the condition is false.\n * @returns A validator function that can be used with Angular Reactive Forms.\n */\nexport function ifValidator(\n condition: (control: AbstractControl) => boolean,\n trueValidatorFn: ValidatorFn | ValidatorFn[],\n falseValidatorFn?: ValidatorFn | ValidatorFn[],\n): ValidatorFn {\n /**\n * @param control The AbstractControl to validate.\n * @returns Validation errors if the condition is met; otherwise, null.\n */\n return (control: AbstractControl): Validators | null => {\n if (!trueValidatorFn || !condition(control)) {\n return composeValidators(control, falseValidatorFn);\n }\n\n return composeValidators(control, trueValidatorFn);\n };\n}\n\n/**\n * Provides a conditional async validator that applies the specified async validator function only if the condition is met.\n *\n * @param condition A function that determines whether the async validator should be applied.\n * @param validatorFn The async validator function to be applied conditionally.\n * @returns An async validator function that can be used with Angular Reactive Forms.\n */\nexport function ifAsyncValidator(\n condition: (control: AbstractControl) => boolean,\n validatorFn: AsyncValidatorFn,\n): AsyncValidatorFn {\n /**\n * @param control The AbstractControl to validate asynchronously.\n * @returns An observable that emits validation errors if the condition is met; otherwise, emits null.\n */\n return (control: AbstractControl) => {\n if (!validatorFn || !condition(control)) {\n return of(null);\n }\n\n return validatorFn(control);\n };\n}\n\n/**\n * Composes and applies the provided validators to the given AbstractControl.\n *\n * @param control The AbstractControl to validate.\n * @param validatorFn The validator function or an array of validator functions to be applied.\n * @returns Validation errors if the validators are applicable; otherwise, null.\n */\nfunction composeValidators(\n control: AbstractControl,\n validatorFn: ValidatorFn | ValidatorFn[] | undefined,\n): Validators | null {\n if (!validatorFn) {\n return null;\n }\n\n const validatorFns = Array.isArray(validatorFn) ? validatorFn : [validatorFn];\n return Validators.compose(validatorFns)?.(control) || null;\n}\n","import {makeEnvironmentProviders} from '@angular/core';\n\n/**\n * Configuration options for the idle detection service.\n * Used to customize the idle duration and timeout duration for user inactivity detection.\n */\nexport class IdleDetectionConfig {\n /**\n * The duration in seconds before the user is considered idle.\n * After this duration, the idle detection phase ends and countdown begins.\n * Defaults to 19 minutes (1140 seconds) if not provided.\n */\n idleDurationInSeconds?: number;\n\n /**\n * The duration in seconds for the countdown phase after idle detection.\n * During this phase, the user can still interact to reset the timer.\n * After this duration, the timeout event is emitted.\n * Defaults to 1 minute (60 seconds) if not provided.\n */\n timeoutDurationInSeconds?: number;\n}\n\n/**\n * Provides configuration for the idle detection service.\n * This function should be used in the application's providers array to configure idle detection.\n *\n * @param config - The idle detection configuration object.\n * @returns Environment providers for the idle detection configuration.\n *\n * @example\n * ```typescript\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideIdleDetectionConfig({\n * idleDurationInSeconds: 15 * 60, // 15 minutes\n * timeoutDurationInSeconds: 60 // 1 minute\n * })\n * ]\n * };\n * ```\n */\nexport function provideIdleDetectionConfig(config: IdleDetectionConfig) {\n return makeEnvironmentProviders([{provide: IdleDetectionConfig, useValue: config}]);\n}\n","import {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport {IdleDetectionConfig, provideIdleDetectionConfig} from './idle-detection.config';\n\n/**\n * Idle detection module.\n * @deprecated use provideIdleDetectionConfig(config: IdleDetectionConfig) instead\n */\n@NgModule({})\nexport class IdleDetectionModule {\n static forRoot(config: IdleDetectionConfig): ModuleWithProviders<IdleDetectionModule> {\n return {\n ngModule: IdleDetectionModule,\n providers: [provideIdleDetectionConfig(config)],\n };\n }\n}\n","import {inject, Injectable} from '@angular/core';\nimport {fromEvent, merge, Subject, Subscription, throttleTime} from 'rxjs';\n\nimport {IdleDetectionConfig} from './idle-detection.config';\n\n/**\n * Service for detecting user idle time and implementing a countdown.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class IdleDetectionService {\n /**\n * The list of interruption events that will end the idle detection.\n */\n private interruptionEvents = [\n 'click',\n 'keydown',\n 'keypress',\n 'mousemove',\n 'mousedown',\n 'scroll',\n 'wheel',\n 'touchmove',\n 'pointermove',\n 'resize',\n ];\n private interruptionSubscription?: Subscription;\n\n /**\n * The default idle duration in seconds (19 minutes).\n */\n private idleDuration = 19 * 60;\n\n /**\n * The default timeout duration in seconds (1 minute).\n */\n private timeoutDuration = 60;\n\n /**\n * Timer for idle detection.\n */\n private idleTimer?: number;\n\n /**\n * Timer for countdown.\n */\n private countdownTimer?: number;\n\n /**\n * Flag to indicate if countdown is in progress.\n */\n private isCountingDown = false;\n\n /**\n * The current countdown value.\n */\n private countdown = this.timeoutDuration;\n\n /**\n * Subject to emit when idle period ends.\n */\n private idleEndSubject = new Subject<void>();\n\n /**\n * Subject to emit the countdown value.\n */\n private countdownSubject = new Subject<number>();\n\n /**\n * Subject to emit when countdown ends.\n */\n private countdownEndSubject = new Subject<void>();\n\n /**\n * Constructs the IdleDetectionService.\n * @param config - Optional configuration for idle and timeout durations.\n */\n constructor() {\n const config = inject(IdleDetectionConfig, {optional: true});\n if (config) {\n this.setConfig(config);\n }\n }\n\n /**\n * Starts to watch for user inactivity.\n */\n startWatching() {\n this.setupInterruptionEvents();\n this.startIdleTimer();\n }\n\n /**\n * Resets the idle timer when user activity is detected.\n * @param withCountdownReset - Flag to indicate if countdown should be reset.\n * By default, it only reset the idle-detection timer. If you enter the countdown phase, it won't stop the countdown.\n * Pass true when you want to reset the countdown as well. This is useful when you click \"Keep Me Signed In\" button in cll-idle-detection component\n */\n resetTimer(withCountdownReset = false) {\n this.startIdleTimer();\n\n if (withCountdownReset && this.isCountingDown) {\n this.stopCountdown();\n }\n }\n\n /**\n * Sets up the interruption events that will end the idle detection.\n * Listens to a set of events on the document (e.g. click, keydown, mousemove, etc.).\n * When any of these events is triggered, the idle timer is reset.\n * Uses `throttleTime` operator to only trigger the reset when the events are spaced\n * out by at least 1000ms (1 second).\n * @private\n */\n private setupInterruptionEvents() {\n if (!this.interruptionSubscription) {\n const throttledInterruptionEvents = this.interruptionEvents.map((eventName) =>\n fromEvent(document, eventName).pipe(throttleTime(1000)),\n );\n this.interruptionSubscription = merge(...throttledInterruptionEvents).subscribe(() => this.resetTimer(true));\n }\n }\n\n /**\n * Starts the idle timer.\n * When the timer expires, it emits an event through onIdleEnd() and starts the countdown.\n */\n private startIdleTimer() {\n clearTimeout(this.idleTimer);\n\n this.idleTimer = window.setTimeout(() => {\n // after idle period, user inactivity detected\n this.idleEndSubject.next();\n this.startCountdown();\n }, this.idleDuration * 1000);\n }\n\n /**\n * Starts the countdown.\n */\n private startCountdown() {\n this.isCountingDown = true;\n this.countdownSubject.next(this.countdown);\n\n this.countdownTimer = window.setInterval(() => {\n this.countdown--;\n this.countdownSubject.next(this.countdown);\n\n if (this.countdown <= 0) {\n this.stopCountdown();\n this.countdownEndSubject.next();\n }\n }, 1000);\n }\n\n /**\n * Stops the countdown.\n */\n private stopCountdown() {\n clearInterval(this.countdownTimer);\n this.isCountingDown = false;\n\n // reset countdown\n this.countdown = this.timeoutDuration;\n }\n\n /**\n * Returns an observable that emits when the user has been idle for a long period.\n * Developers can use this to perform actions like opening a dialog.\n *\n * user has been inactive for a long period (idleDuration), at this moment, idle detection phase ends, onIdleEnd event is emitted, and then enter countdown/timeout phase.\n * During the countdown phase:\n * - if user has any activity, countdown phase immediately ends and restart the idle detection phase.\n * - else, countdownEnd event will be emitted when timeoutDuration is over.\n * @returns {Observable<void>} - Observable for idle end event.\n */\n onIdleEnd() {\n return this.idleEndSubject.asObservable();\n }\n\n /**\n * Returns an observable that emits when the countdown ends.\n * Usually means the user has been inactive for a very long time and should be logged out.\n * @returns {Observable<void>} - Observable for countdown end event.\n */\n onTimeoutEnd() {\n return this.countdownEndSubject.asObservable();\n }\n\n /**\n * Returns an observable that emits the countdown value every second.\n * @returns {Observable<number>} - Observable for countdown value.\n */\n onCountDown() {\n return this.countdownSubject.asObservable();\n }\n\n /**\n * Clears all timers when the component is destroyed.\n */\n clearTimers() {\n clearTimeout(this.idleTimer);\n clearInterval(this.countdownTimer);\n\n this.idleTimer = undefined;\n this.countdownTimer = undefined;\n\n this.interruptionSubscription?.unsubscribe();\n this.interruptionSubscription = undefined;\n }\n\n /**\n * Sets the idle and timeout durations based on the provided configuration.\n * @param config - Configuration object with idle and timeout durations.\n */\n setConfig(config: IdleDetectionConfig) {\n if (config.idleDurationInSeconds) {\n this.idleDuration = config.idleDurationInSeconds;\n }\n\n if (config.timeoutDurationInSeconds) {\n this.countdown = this.timeoutDuration = config.timeoutDurationInSeconds;\n }\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Type guard that checks if a value is array-like (has a numeric length property).\n * Array-like objects include arrays, strings, NodeLists, and similar structures.\n *\n * @param value - The value to check.\n * @returns `true` if the value is array-like, `false` otherwise.\n *\n * @example\n * ```typescript\n * isArrayLike([1, 2, 3]); // true\n * isArrayLike('string'); // true\n * isArrayLike({length: 5}); // true\n * isArrayLike(null); // false\n * isArrayLike(() => {}); // false\n * ```\n */\nexport function isArrayLike(value: any): value is {length: number} {\n return (\n value != null &&\n typeof value !== 'function' &&\n typeof value.length === 'number' &&\n value.length >= 0 &&\n value.length <= Number.MAX_SAFE_INTEGER\n );\n}\n\n/**\n * Checks if a value is a prototype object.\n * A prototype object is an object that is the prototype property of a constructor function.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a prototype object, `false` otherwise.\n *\n * @example\n * ```typescript\n * isPrototype(Array.prototype); // true\n * isPrototype(Object.prototype); // true\n * isPrototype({}); // false\n * ```\n */\nexport function isPrototype(value: any): boolean {\n const Ctor = value?.constructor;\n return Ctor && Ctor.prototype === value;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {isArrayLike, isPrototype} from './internal.util';\n\n/**\n * Type guard that checks if a string value is empty.\n *\n * @param value - The string value to check.\n * @returns `true` if the value is an empty string, `false` otherwise.\n *\n * @example\n * ```typescript\n * isEmpty(''); // true\n * isEmpty('text'); // false\n * ```\n */\nexport function isEmpty(value: string): value is '';\n/**\n * Check if a value is null, undefined, empty ArrayLike, Map, Set or empty object.\n * @param value The value to check.\n * @returns Whether the value is null, undefined, empty ArrayLike, Map, Set or empty object.\n */\nexport function isEmpty<T extends object | ArrayLike<any> | Map<any, any> | Set<any>>(\n value: T | null | undefined,\n): value is null | undefined;\n/**\n * Checks if a value is empty.\n *\n * @param {any} value - The value to check for emptiness. It can be of any type.\n * @return {boolean} `true` if the value is empty, `false` otherwise.\n */\nexport function isEmpty(value?: any): boolean {\n if (value === null || value === undefined) {\n // Handles null and undefined\n return true;\n }\n\n // Handle array-like objects (arrays, strings, jQuery-like collections)\n if (\n (Array.isArray(value) || typeof value === 'string' || typeof (value as any).splice === 'function') &&\n isArrayLike(value)\n ) {\n return value.length === 0;\n }\n\n // Handle Maps and Sets\n if (value instanceof Map || value instanceof Set) {\n return value.size === 0;\n }\n\n // Handle objects\n if (typeof value === 'object') {\n // Check for prototype objects and non-enumerable properties\n if (isPrototype(value)) {\n return Object.getOwnPropertyNames(value).length === 0;\n }\n\n // Check for enumerable properties\n for (const key in value) {\n if (Object.prototype.hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n // All other types (numbers, booleans, functions, etc.)\n return true;\n}\n\n/**\n * Type guard that checks if a string value is not empty.\n *\n * @param value - The string value to check.\n * @returns `false` if the value is an empty string, `true` otherwise.\n */\nexport function isNotEmpty(value: ''): false;\n/**\n * Type guard that checks if a string value is not empty.\n *\n * @param value - The string value to check.\n * @returns `true` if the value is a non-empty string, `false` otherwise.\n */\nexport function isNotEmpty(value: string): value is Exclude<string, ''>;\n/**\n * Type guard that checks if a value is not empty (not null, undefined, or empty collection).\n *\n * @param value - The value to check.\n * @returns `true` if the value is not null, undefined, or empty, `false` otherwise.\n */\nexport function isNotEmpty<T extends object | ArrayLike<any> | Map<any, any> | Set<any>>(\n value: T | null | undefined,\n): value is T;\n/**\n * Checks if a value is not null, undefined, empty ArrayLike, Map, Set, or empty object.\n *\n * @param {any} value - The value to check.\n * @return {boolean} Whether the value is not null, undefined, empty ArrayLike, Map, Set, or empty object.\n */\nexport function isNotEmpty(value?: any): boolean {\n return !isEmpty(value);\n}\n","/**\n * Check if two values are deeply equal.\n * @param {T} value1 - The first value to compare.\n * @param {T} value2 - The second value to compare.\n * @returns {boolean} - Returns true if the values are deeply equal, otherwise false.\n */\nexport function isEqual<T>(value1: T, value2: T): boolean {\n if (value1 === value2) return true;\n\n if (typeof value1 !== 'object' || typeof value2 !== 'object' || value1 === null || value2 === null) {\n return false;\n }\n\n const keys1 = Object.keys(value1) as Array<keyof T>;\n const keys2 = Object.keys(value2) as Array<keyof T>;\n\n if (keys1.length !== keys2.length) return false;\n\n for (const key of keys1) {\n if (!keys2.includes(key) || !isEqual(value1[key], value2[key])) {\n return false;\n }\n }\n\n return true;\n}\n","/**\n * Create an object composed of object properties that satisfy a given condition.\n * @param {T} source - The object to pick properties from.\n * @param {(value: T[keyof T], key: string) => boolean} predicate - The function invoked per property.\n * @returns {Partial<T>} - Returns the new object.\n */\nexport function pickBy<T>(source: T, predicate: (value: T[keyof T], key: string) => boolean): Partial<T> {\n const result: Partial<T> = {};\n\n for (const key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key) && predicate(source[key], key)) {\n result[key] = source[key];\n }\n }\n\n return result;\n}\n","import {pickBy} from './pick-by.util';\n\n/**\n * Create an object composed of object properties that do not satisfy a given condition.\n * @param {T} source - The object to omit properties from.\n * @param {(value: T[keyof T], key: string) => boolean} predicate - The function invoked per property.\n * @returns {Partial<T>} - Returns the new object.\n */\nexport function omitBy<T>(source: T, predicate: (value: T[keyof T], key: string) => boolean): Partial<T> {\n // Negate the predicate and pass it to pickBy\n return pickBy(source, (value, key) => !predicate(value, key));\n}\n","/**\n * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end.\n * A step of -1 is used if a negative start is specified without an end or step.\n * If end is not specified, it's set to start with start then set to 0.\n *\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nexport function range(start: number, end?: number | undefined, step?: number | undefined, fromRight = false) {\n // if range takes only 1 input, that input is end, start with 0\n if (end === undefined) {\n end = start;\n start = 0;\n }\n\n step = step === undefined ? (start < end ? 1 : -1) : step;\n\n let index = -1;\n let length = Math.max(Math.ceil((end - start) / (step || 1)), 0);\n const result = new Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n","/**\n * Regular expression pattern for validating email addresses.\n * Supports standard email formats including subdomains and various TLDs.\n *\n * @see {@link https://regex101.com/library/mX1xW0 | Regex Pattern Reference}\n *\n * @example\n * ```typescript\n * emailPattern.test('user@example.com'); // true\n * emailPattern.test('invalid-email'); // false\n * ```\n */\nexport const emailPattern = /^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$/;\n\n/**\n * Regular expression pattern for validating HTTP and HTTPS URLs.\n * Supports URLs with or without www subdomain, various protocols, and query parameters.\n *\n * @example\n * ```typescript\n * urlPattern.test('https://example.com'); // true\n * urlPattern.test('http://www.example.com/path?query=1'); // true\n * urlPattern.test('invalid-url'); // false\n * ```\n */\nexport const urlPattern =\n /^https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/;\n\n/**\n * Regular expression pattern for validating HTTPS URLs only.\n * Similar to `urlPattern` but requires the HTTPS protocol.\n *\n * @example\n * ```typescript\n * httpsPattern.test('https://example.com'); // true\n * httpsPattern.test('http://example.com'); // false\n * ```\n */\nexport const httpsPattern =\n /^https:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/;\n\n/**\n * Regular expression pattern for validating IPv4 addresses.\n * Supports all valid IPv4 address ranges (0.0.0.0 to 255.255.255.255).\n *\n * @see {@link https://regex101.com/library/dT0vT3?orderBy=RELEVANCE&search=ip | Regex Pattern Reference}\n *\n * @example\n * ```typescript\n * ipRegex.test('192.168.1.1'); // true\n * ipRegex.test('256.1.1.1'); // false\n * ipRegex.test('not-an-ip'); // false\n * ```\n */\nexport const ipRegex =\n /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;\n\n/**\n * Regular expression pattern for validating Fully Qualified Domain Names (FQDN).\n * A FQDN is a domain name that specifies its exact location in the tree hierarchy of the Domain Name System (DNS).\n * The pattern validates domain names between 4 and 253 characters with proper formatting.\n *\n * @see {@link https://www.regextester.com/103452 | Regex Pattern Reference}\n *\n * @example\n * ```typescript\n * fqdnRegex.test('example.com'); // true\n * fqdnRegex.test('subdomain.example.com'); // true\n * fqdnRegex.test('invalid..domain'); // false\n * ```\n */\nexport const fqdnRegex = /(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]\\.)+[a-zA-Z]{2,63}$)/;\n","import {fqdnRegex, httpsPattern, ipRegex, urlPattern} from '../const';\n\n/**\n * Checks if a hostname is a valid IP address (IPv4 or IPv6).\n *\n * @param hostname - The hostname to check. Should be extracted from `new URL(url).hostname`\n * @returns `true` if the hostname is a valid IP address, `false` otherwise\n *\n * @example\n * ```typescript\n * const url = new URL('http://192.168.1.1');\n * isIP(url.hostname); // true\n *\n * const url2 = new URL('http://example.com');\n * isIP(url2.hostname); // false\n * ```\n */\nexport function isIP(hostname: string): boolean {\n return ipRegex.test(hostname);\n}\n\n/**\n * Checks if a hostname is a valid Fully Qualified Domain Name (FQDN).\n *\n * @param hostname - The hostname to check. Should be extracted from `new URL(url).hostname`\n * @returns `true` if the hostname is a valid FQDN, `false` otherwise\n *\n * @example\n * ```typescript\n * const url = new URL('http://example.com');\n * isFQDN(url.hostname); // true\n *\n * const url2 = new URL('http://192.168.1.1');\n * isFQDN(url2.hostname); // false\n * ```\n */\nexport function isFQDN(hostname: string): boolean {\n return fqdnRegex.test(hostname);\n}\n\n/**\n * Checks if a string is a valid URL.\n *\n * @param url - The URL string to validate\n * @returns `true` if the string is a valid URL, `false` otherwise\n *\n * @example\n * ```typescript\n * isURL('https://example.com'); // true\n * isURL('not-a-url'); // false\n * ```\n */\nexport function isURL(url: string): boolean {\n return urlPattern.test(url);\n}\n\n/**\n * Checks if a URL string uses the HTTPS protocol.\n * The URL must be a valid URL format.\n *\n * @param url - The URL string to check\n * @returns `true` if the URL is valid and uses HTTPS protocol, `false` otherwise\n *\n * @example\n * ```typescript\n * isHttps('https://example.com'); // true\n * isHttps('http://example.com'); // false\n * ```\n */\nexport function isHttps(url: string): boolean {\n return httpsPattern.test(url);\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {isHttps} from '../utils';\n\n/**\n * Angular pipe that checks if a URL string uses the HTTPS protocol.\n *\n * @example\n * ```html\n * <!-- Check if URL is HTTPS -->\n * <div>{{ 'https://example.com' | isHttps }}</div>\n * <!-- Output: true -->\n *\n * <div>{{ 'http://example.com' | isHttps }}</div>\n * <!-- Output: false -->\n * ```\n */\n@Pipe({\n name: 'isHttps',\n})\nexport class IsHttpsPipe implements PipeTransform {\n /**\n * Transforms a URL string into a boolean indicating whether it uses HTTPS.\n *\n * @param value - The URL string to check\n * @returns `true` if the URL uses HTTPS protocol, `false` otherwise\n */\n transform(value: string): boolean {\n return isHttps(value);\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nconst unmaskNumber = 6;\nconst maskChar = '*';\n\n/**\n * Options for configuring the mask pipe behavior.\n */\nexport interface MaskOptions {\n /**\n * The number of characters to leave unmasked at the beginning of the string.\n * Defaults to 6.\n */\n unmaskedPrefixLength?: number;\n\n /**\n * The number of characters to leave unmasked at the end of the string.\n * Defaults to 6.\n */\n unmaskedSuffixLength?: number;\n\n /**\n * Whether to apply masking. If `false`, the original string is returned unchanged.\n * Defaults to `true`.\n */\n masked?: boolean;\n}\n\n/**\n * Angular pipe that masks sensitive string data by replacing characters with asterisks,\n * while preserving a configurable number of characters at the beginning and end.\n *\n * @example\n * ```html\n * <!-- Mask a credit card number -->\n * <div>{{ '1234567890123456' | mask }}</div>\n * <!-- Output: \"123456******3456\" -->\n *\n * <!-- Custom masking options -->\n * <div>{{ '1234567890123456' | mask: { unmaskedPrefixLength: 4, unmaskedSuffixLength: 4 } }}</div>\n * <!-- Output: \"1234********3456\" -->\n * ```\n */\n@Pipe({\n name: 'mask',\n})\nexport class MaskPipe implements PipeTransform {\n /**\n * Transforms the input string by masking characters based on the provided options.\n *\n * @param value - The input string to be masked\n * @param options - Options for customizing the masking behavior\n * @returns The masked string, or the original string if masking is disabled or the string is too short\n */\n transform(value: string, options: MaskOptions = {}): string {\n const {unmaskedPrefixLength = unmaskNumber, unmaskedSuffixLength = unmaskNumber, masked = true} = options;\n\n if (\n value.length <= unmaskedPrefixLength + unmaskedSuffixLength ||\n unmaskedPrefixLength < 0 ||\n unmaskedSuffixLength < 0 ||\n !masked\n ) {\n return value;\n }\n\n return value\n .split('')\n .map((char, i) => (i < unmaskedPrefixLength || i > value.length - unmaskedSuffixLength - 1 ? char : maskChar))\n .join('');\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {range} from '../utils';\n\n/**\n * Angular pipe that generates an array of numbers within a specified range.\n *\n * @example\n * ```html\n * <!-- Generate array from 0 to 4 -->\n * <div *ngFor=\"let i of [5] | range\">{{ i }}</div>\n *\n * <!-- Generate array from 1 to 5 -->\n * <div *ngFor=\"let i of [1, 5] | range\">{{ i }}</div>\n *\n * <!-- Generate array from 0 to 10 with step 2 -->\n * <div *ngFor=\"let i of [0, 10, 2] | range\">{{ i }}</div>\n * ```\n */\n@Pipe({\n name: 'range',\n})\nexport class RangePipe implements PipeTransform {\n /**\n * Transforms the input value into an array of numbers.\n *\n * @param value - An array containing:\n * - `[number]`: The end value (starts from 0)\n * - `[number, number]`: The start and end values\n * - `[number, number, number]`: The start, end, and step values\n * - `[number, number, number, boolean]`: The start, end, step, and inclusive flag\n * @returns An array of numbers within the specified range\n */\n transform(value: [number]): number[];\n transform(value: [number, number]): number[];\n transform(value: [number, number, number]): number[];\n transform(value: [number, number, number, boolean]): number[];\n transform(value: unknown): number[] {\n const input = value as [number, number, number, boolean];\n return range(...input);\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {assertInInjectionContext, computed, Injector, isSignal, Signal, untracked} from '@angular/core';\nimport {toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {\n combineLatest,\n distinctUntilChanged,\n from,\n identity,\n isObservable,\n ObservableInput,\n ObservableInputTuple,\n OperatorFunction,\n startWith,\n} from 'rxjs';\n\ntype ObservableSignalInput<T> = ObservableInput<T> | Signal<T>;\n\ntype ObservableSignalInputTuple<T> = {\n [K in keyof T]: ObservableSignalInput<T[K]> | (() => T[K]);\n};\n\n// pick from ToSignalOptions\nexport type CombineFromOptions<IValue> = {\n readonly injector?: Injector;\n readonly initialValue?: IValue;\n};\n\n// array inputs only\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n): Signal<Output>;\n\n// ---------- 3 args with array inputs -------------\n// combineFrom([signal, obs$], pipeOperator, { initialValue: [1,2] }), Input is [signal, obs$]\n// 1. no initialValue\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<undefined>,\n): Signal<Output | undefined>;\n// 2. initialValue is null, returning type should include null\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<null>,\n): Signal<Output | null>;\n// 3. provide initialValue\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<Output>,\n): Signal<Output>;\n\n// ---------- 2 args wit array inputs -------------\n// 1. no initialValue\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n options?: CombineFromOptions<undefined>,\n): Signal<Output | undefined>;\n// 2. initialValue is null, returning type should include null\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n options?: CombineFromOptions<null>,\n): Signal<Output | null>;\n// 3. provide initialValue\nexport function combineFrom<Input extends readonly unknown[], Output = Input>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n options?: CombineFromOptions<Output>,\n): Signal<Output>;\n\n// object input only, e.g. Input is { a: signal, b: obs$ }\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n): Signal<Output>;\n\n// ----------------- 3 args with object input --------------------\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<undefined>,\n): Signal<Output | undefined>;\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<null>,\n): Signal<Output | null>;\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n operator?: OperatorFunction<Input, Output>,\n options?: CombineFromOptions<Output>,\n): Signal<Output>;\n\n// ----------------- 2 args with object input --------------------\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n options?: CombineFromOptions<undefined>,\n): Signal<Output | undefined>;\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n options?: CombineFromOptions<null>,\n): Signal<Output | null>;\nexport function combineFrom<Input extends object, Output = Input>(\n sources: ObservableSignalInputTuple<Input>,\n options?: CombineFromOptions<Output>,\n): Signal<Output>;\n\n/**\n * Combines multiple `Observable` or `Signal` sources into a `Signal` that emits their combined values.\n * This function is similar to RxJS `combineLatest`, but works with both Observables and Signals,\n * and returns a Signal instead of an Observable.\n *\n * The function supports:\n * - Array of sources: Returns a Signal of an array\n * - Object of sources: Returns a Signal of an object with the same keys\n * - Optional RxJS operator: Apply transformations to the combined values\n * - Optional initial value: Provide an initial value for the Signal\n *\n * @template Input - The type of the input sources (array or object).\n * @template Output - The type of the output Signal (defaults to Input).\n *\n * @param sources - Array or object of `Observable` or `Signal` values to combine.\n * @param operator - Optional RxJS operator function to transform the combined values.\n * @param options - Optional configuration object:\n * - `initialValue`: Initial value for the Signal (required if sources don't emit synchronously)\n * - `injector`: Angular injector to use for signal conversion\n * @returns A Signal that emits the combined values from all sources.\n *\n * @example\n * ```typescript\n * // Array of sources\n * export class Component {\n * private readonly userService = inject(UserService);\n * page = signal(2);\n *\n * data = combineFrom(\n * [this.page, this.userService.users$],\n * pipe(\n * switchMap(([page, users]) => this.dataService.getData(page, users)),\n * startWith([])\n * )\n * );\n * }\n *\n * // Object of sources\n * const vm = combineFrom({\n * users: users$,\n * filters: filtersSignal,\n * page: pageSignal\n * });\n *\n * // With initial value\n * const data = combineFrom(\n * [source1$, source2$],\n * { initialValue: [null, null] }\n * );\n * ```\n */\nexport function combineFrom<Input = any, Output = Input>(...args: any[]): Signal<Output | null | undefined> {\n assertInInjectionContext(combineFrom);\n\n const {normalizedSources, hasInitValue, operator, options} = normalizeArgs<Input, Output>(args);\n\n const ret =\n hasInitValue && options?.initialValue !== undefined\n ? toSignal(combineLatest(normalizedSources).pipe(operator), {\n initialValue: options.initialValue,\n injector: options?.injector,\n })\n : (toSignal(combineLatest(normalizedSources).pipe(operator), {\n injector: options?.injector,\n // requireSync: true,\n }) as Signal<Output | undefined>);\n\n return ret;\n}\n\nfunction normalizeArgs<Input, Output>(\n args: any[],\n): {\n normalizedSources: ObservableInputTuple<Input>;\n operator: OperatorFunction<Input, Output>;\n hasInitValue: boolean;\n options: CombineFromOptions<Output> | undefined;\n} {\n if (!args || args.length < 1 || typeof args[0] !== 'object') {\n throw new TypeError('combineFrom needs sources');\n }\n\n const hasOperator = typeof args[1] === 'function';\n\n if (args.length === 3 && !hasOperator) {\n throw new TypeError('combineFrom needs a pipe operator as the second argument');\n }\n\n // pass sources and options\n if (!hasOperator) {\n // add identity function to args at index 1 as operator function as x=>x\n args.splice(1, 0, identity);\n }\n\n // if no operator passed, identity will be operator\n const [sources, operator, options] = args;\n\n const hasInitValue = options?.initialValue !== undefined;\n\n const normalizedSources = Object.entries(sources).reduce(\n (acc, [keyOrIndex, source]) => {\n if (isSignal(source)) {\n // fix angular NG0950: Input is required but no value is available yet.\n // when input.required is used as combineFrom's input, its value is undefined, untracked(source) will throw error\n let initialValue: any;\n try {\n initialValue = untracked(source);\n } catch {\n // If the input is not set, skip startWith or provide a fallback\n initialValue = undefined;\n }\n // toObservable doesn't immediately emit initialValue of the signal\n acc[keyOrIndex] = toObservable(source, {\n injector: options?.injector,\n }).pipe(startWith(initialValue));\n } else if (isObservable(source)) {\n acc[keyOrIndex] = source.pipe(distinctUntilChanged());\n } else if (typeof source === 'function') {\n // seldom use: pass function like () => 5\n const computedRes = computed(source as () => unknown);\n acc[keyOrIndex] = toObservable(computedRes, {\n injector: options?.injector,\n }).pipe(startWith(source()));\n } else {\n // seldom use: pass promise, Map, array, etc that from accepts\n acc[keyOrIndex] = from(source as any).pipe(distinctUntilChanged());\n }\n return acc;\n },\n (Array.isArray(sources) ? [] : {}) as any,\n );\n\n return {normalizedSources, operator, hasInitValue, options};\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {computed, CreateComputedOptions, DestroyRef, effect, inject, Signal, signal, untracked} from '@angular/core';\nimport {concatAll, exhaustAll, isObservable, mergeAll, Observable, Subject, switchAll} from 'rxjs';\n\n/**\n * Behavior mode for handling multiple async sources in computedAsync.\n * - `switch`: Cancel previous async operations when a new one starts (default)\n * - `merge`: Process all async operations concurrently\n * - `concat`: Process async operations sequentially\n * - `exhaust`: Ignore new async operations while one is in progress\n */\ntype ComputedAsyncBehavior = 'switch' | 'merge' | 'concat' | 'exhaust';\n\n// { equal, behavior }\ntype BaseOptions<T> = CreateComputedOptions<T> & {behavior?: ComputedAsyncBehavior};\n\ntype OptionsWithInitialValue<T> = {initialValue: T} & BaseOptions<T>;\ntype OptionsWithOptionalInitialValue<T> = {initialValue?: undefined} & BaseOptions<T>;\ntype OptionsWithRequireSync<T> = {requireSync: true} & BaseOptions<T>;\n\n/**\n * Creates a computed signal that can derive its value from asynchronous sources\n * (Observables, Promises) or synchronous values. The signal automatically updates\n * when dependencies change.\n *\n * This function extends Angular's `computed()` to support async operations. It handles:\n * - Observables: Automatically subscribes and unsubscribes\n * - Promises: Converts to Observable and handles resolution\n * - Synchronous values: Returns immediately\n *\n * The function supports different behaviors for handling multiple async operations:\n * - `switch`: Cancel previous operations when a new one starts (default)\n * - `merge`: Process all operations concurrently\n * - `concat`: Process operations sequentially\n * - `exhaust`: Ignore new operations while one is in progress\n *\n * @template T - The type of the computed value.\n * @param computeFn - A function that computes the value. Can return an Observable, Promise, or synchronous value.\n * The function receives the previous value as a parameter (if available).\n * @param options - Optional configuration:\n * - `initialValue`: Initial value for the Signal\n * - `requireSync`: If `true`, requires the first computation to be synchronous (throws error for Promises)\n * - `behavior`: How to handle multiple async operations ('switch' | 'merge' | 'concat' | 'exhaust')\n * - `equal`: Custom equality function for signal comparison\n * @returns A signal that emits the computed value. May be `T | undefined` if no initial value is provided.\n *\n * @example\n * ```typescript\n * // Basic usage with Observable\n * const userId = signal(1);\n * const user = computedAsync(() => this.userService.getUser(userId()));\n *\n * // With initial value\n * const user = computedAsync(\n * () => this.userService.getUser(userId()),\n * { initialValue: null }\n * );\n *\n * // With requireSync (ensures synchronous initial value)\n * const user = computedAsync(\n * () => this.userService.getUserSync(userId()),\n * { requireSync: true }\n * );\n *\n * // With behavior option\n * const data = computedAsync(\n * () => this.dataService.getData(),\n * { behavior: 'merge' }\n * );\n * ```\n */\n// without options\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | Promise<T> | T | undefined,\n): Signal<T | undefined>;\n\n// with optional initialValue\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | Promise<T> | T | undefined,\n options: OptionsWithOptionalInitialValue<T>,\n): Signal<T | undefined>;\n\n// with initialValue\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | Promise<T> | T | undefined,\n options: OptionsWithInitialValue<T>,\n): Signal<T>;\n\n// for promise, without initialValue but set requireSync as true, throw error\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Promise<T>,\n options: OptionsWithOptionalInitialValue<T> & {requireSync: true},\n): never;\n\n// for observables, without initialValue, without requireSync, return T | undefined\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | T | undefined,\n options: {\n initialValue?: undefined;\n requireSync?: false;\n } & BaseOptions<T>,\n): Signal<T | undefined>;\n\n// for observables, without initialValue, but requireSync is true, return T\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | T,\n options: OptionsWithRequireSync<T> & {initialValue?: undefined | T},\n): Signal<T>;\n\nexport function computedAsync<T>(\n computeFn: (previousValue?: T) => Observable<T> | Promise<T> | T | undefined,\n options: any = {},\n): Signal<T | undefined> {\n const destroyRef = inject(DestroyRef);\n\n const sourceSubject = new Subject<Promise<T> | Observable<T>>();\n const source$ = flattenObservable(sourceSubject, options.behavior || 'switch');\n\n const sourceValue = signal<T | undefined>(options.initialValue);\n\n const sourceResult = source$.subscribe({\n next: (value) => sourceValue.set(value),\n error: (error) => {\n sourceValue.set(error);\n // Error should be handled by the user\n // throw error;\n },\n });\n\n destroyRef.onDestroy(() => sourceResult.unsubscribe());\n\n if (options.requireSync && options.initialValue === undefined) {\n const initialEmission = computeFn(undefined);\n\n if (isPromise(initialEmission)) {\n throw new Error(`Promises cannot work with requireSync. Set requireSync to false or pass an initialValue.`);\n }\n\n if (isObservable(initialEmission)) {\n sourceSubject.next(initialEmission);\n } else {\n // primitive value T\n sourceValue.set(initialEmission);\n }\n }\n\n if (options.requireSync && sourceValue() === undefined) {\n throw new Error(`The observable doesn't emit synchronously. Set requireSync to false or pass an initialValue.`);\n }\n\n let shouldSkipFirstComputation = options.requireSync === true;\n\n effect(() => {\n const currentValue = untracked(() => sourceValue());\n\n const newSource = computeFn(currentValue);\n\n if (shouldSkipFirstComputation) {\n shouldSkipFirstComputation = false;\n return;\n }\n\n if (isPromise(newSource) || isObservable(newSource)) {\n untracked(() => sourceSubject.next(newSource));\n } else {\n untracked(() => sourceValue.set(newSource));\n }\n });\n\n return computed(() => sourceValue() as T, {equal: options.equal});\n}\n\nfunction flattenObservable<T>(\n source: Subject<Promise<T> | Observable<T>>,\n behavior: ComputedAsyncBehavior,\n): Observable<T> {\n const behaviorMap = {\n switch: switchAll,\n merge: mergeAll,\n concat: concatAll,\n exhaust: exhaustAll,\n };\n\n return source.pipe(behaviorMap[behavior]());\n}\n\nfunction isPromise<T>(value: any): value is Promise<T> {\n return value && typeof value.then === 'function';\n}\n","import {signal} from '@angular/core';\n\n/**\n * Creates a trigger signal that can be used to manually trigger updates or side effects.\n * The trigger maintains an internal counter that increments each time `next()` is called.\n *\n * @returns An object containing:\n * - `next()`: A function to trigger an update (increments the internal counter)\n * - `value`: A readonly signal that emits the current counter value\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * private refreshTrigger = createTrigger();\n *\n * // Use the trigger to refresh data\n * refreshData() {\n * this.refreshTrigger.next();\n * }\n *\n * // React to trigger changes\n * data$ = toObservable(this.refreshTrigger.value).pipe(\n * switchMap(() => this.dataService.getData())\n * );\n * }\n * ```\n */\nexport function createTrigger() {\n const sourceSignal = signal(0);\n\n return {\n /**\n * Triggers an update by incrementing the internal counter.\n */\n next: () => {\n sourceSignal.update((v) => v + 1);\n },\n /**\n * A readonly signal that emits the current counter value.\n */\n value: sourceSignal.asReadonly(),\n };\n}\n","import {assertInInjectionContext, inject, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {ActivatedRoute, type Params} from '@angular/router';\nimport {map} from 'rxjs';\n\ntype ParamsTransformFn<Output> = (params: Params) => Output;\n\n/**\n * The `InputOptions` interface defines options for configuring the behavior of the `injectParams` function.\n *\n * @template Output - The expected type of the read value.\n */\nexport interface ParamsOptions<Output> {\n /**\n * A transformation function to convert the written value to the expected read value.\n *\n * @param v - The value to transform.\n * @returns The transformed value.\n */\n transform?: (v: string) => Output;\n\n /**\n * The initial value to use if the parameter is not present or undefined.\n */\n initialValue?: Output;\n}\n\n/**\n * Injects the params from the current route.\n * If a key is provided, returns the value of that key.\n * If a transform function is provided, returns the result of the function.\n * Otherwise, returns the entire params object.\n *\n * @example\n * const params = injectParams(); // Returns the entire params object\n * const userId = injectParams('id'); // Returns the value of the 'id' param\n * const userId = injectParams(p => p['id'] as string); // Returns the 'id' param using a custom transform function\n * const userId = injectParams('id', { transform: numberAttribute, initialValue: 1 });\n *\n * @param keyOrParamsTransform OPTIONAL The key of the param to return, or a transform function to apply to the params object\n */\nexport function injectParams(): Signal<Params>;\n\nexport function injectParams<Output>(fn: ParamsTransformFn<Output>): Signal<Output>;\n\nexport function injectParams(key: string): Signal<string | null>;\n\n// for boolean or number, if initialValue is provided, transform is a must\nexport function injectParams(\n key: string,\n options: {transform: (v: string) => boolean; initialValue: boolean},\n): Signal<boolean>;\nexport function injectParams(\n key: string,\n options: {transform: (v: string) => number; initialValue: number},\n): Signal<number>;\n// for string, transform is optional\nexport function injectParams(\n key: string,\n options: {transform?: (v: string) => string; initialValue: string},\n): Signal<string>;\n\n// initialValue not provided, must provide transform fn\nexport function injectParams(\n key: string,\n options: {transform: (v: string) => boolean; initialValue?: undefined},\n): Signal<boolean | null>;\nexport function injectParams(\n key: string,\n options: {transform: (v: string) => number; initialValue?: undefined},\n): Signal<number | null>;\nexport function injectParams(\n key: string,\n options: {transform: (v: string) => string; initialValue?: undefined},\n): Signal<string | null>;\n\nexport function injectParams<Output>(\n keyOrParamsTransform?: string | ParamsTransformFn<Output>,\n options: ParamsOptions<Output> = {},\n): Signal<Output | Params | string | boolean | number | null> {\n assertInInjectionContext(injectParams);\n\n const route = inject(ActivatedRoute);\n const initialParams = route.snapshot.params;\n\n const {transform, initialValue} = options;\n\n // injectParams(): Signal<Params>\n if (!keyOrParamsTransform) {\n return toSignal(route.params, {initialValue: initialParams});\n }\n\n // injectParams<Output>(fn: ParamsTransformFn<Output>): Signal<Output>\n if (typeof keyOrParamsTransform === 'function') {\n return toSignal(route.params.pipe(map(keyOrParamsTransform)), {initialValue: keyOrParamsTransform(initialParams)});\n }\n\n // keyOrParamsTransform is string.\n // export function injectParams(key: string): Signal<string | null>;\n // export function injectParams(key: string, options: { transform: (v: string) => boolean; initialValue: boolean }): Signal<boolean>;\n // export function injectParams(key: string, options: { transform: (v: string) => number; initialValue: number }): Signal<number>;\n // export function injectParams(key: string, options: { transform?: (v: string) => string; initialValue: string }): Signal<string>;\n // export function injectParams(key: string, options: { transform: (v: string) => boolean; initialValue?: undefined }): Signal<boolean | null>;\n // export function injectParams(key: string, options: { transform: (v: string) => number; initialValue?: undefined }): Signal<number | null>;\n // export function injectParams(key: string, options: { transform: (v: string) => string; initialValue?: undefined }): Signal<string | null>;\n const getParam = (params: Params) => {\n const param = params?.[keyOrParamsTransform] as string | undefined;\n\n if (!param) {\n return initialValue ?? null;\n }\n\n return transform ? transform(param) : param;\n };\n\n return toSignal(route.params.pipe(map(getParam)), {initialValue: getParam(initialParams)});\n}\n","import {assertInInjectionContext, inject, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {ActivatedRoute, type Params} from '@angular/router';\nimport {map} from 'rxjs';\n\ntype QueryParamsTransformFn<Output> = (params: Params) => Output;\n\n/**\n * The `InputOptions` interface defines options for configuring the behavior of the `injectQueryParams` function.\n *\n * @template Output - The expected type of the read value.\n */\nexport interface QueryParamsOptions<Output> {\n /**\n * A transformation function to convert the written value to the expected read value.\n *\n * @param v - The value to transform.\n * @returns The transformed value.\n */\n transform?: (v: string) => Output;\n\n /**\n * The initial value to use if the query parameter is not present or undefined.\n */\n initialValue?: Output;\n}\n\n/**\n * The `injectQueryParams` function allows you to access and manipulate query parameters from the current route.\n *\n * @returns A `Signal` that emits the entire query parameters object.\n */\nexport function injectQueryParams(): Signal<Params>;\n\n/**\n * The `injectQueryParams` function allows you to access and manipulate query parameters from the current route.\n * It retrieves the value of a query parameter based on a custom transform function applied to the query parameters object.\n *\n * @template Output - The expected type of the read value.\n * @param {QueryParamsTransformFn<Output>} fn - A transform function that takes the query parameters object (`params: Params`) and returns the desired value.\n * @returns {Signal} A `Signal` that emits the transformed value based on the provided custom transform function.\n *\n * @example\n * const searchValue = injectQueryParams((params) => params['search'] as string);\n */\nexport function injectQueryParams<Output>(fn: QueryParamsTransformFn<Output>): Signal<Output>;\n\n/**\n * The `injectQueryParams` function allows you to access and manipulate query parameters from the current route.\n *\n * @param {string} key - The name of the query parameter to retrieve.\n * @returns {Signal} A `Signal` that emits the value of the specified query parameter, or `null` if it's not present.\n */\nexport function injectQueryParams(key: string): Signal<string | null>;\n\n// for boolean or number, if initialValue is provided, transform is a must\nexport function injectQueryParams(\n key: string,\n options: {transform: (v: string) => boolean; initialValue: boolean},\n): Signal<boolean>;\nexport function injectQueryParams(\n key: string,\n options: {transform: (v: string) => number; initialValue: number},\n): Signal<number>;\n// for string, transform is optional\nexport function injectQueryParams(\n key: string,\n options: {transform?: (v: string) => string; initialValue: string},\n): Signal<string>;\n\n// initialValue not provided, must provide transform fn\nexport function injectQueryParams(\n key: string,\n options: {transform: (v: string) => boolean; initialValue?: undefined},\n): Signal<boolean | null>;\nexport function injectQueryParams(\n key: string,\n options: {transform: (v: string) => number; initialValue?: undefined},\n): Signal<number | null>;\nexport function injectQueryParams(\n key: string,\n options: {transform: (v: string) => string; initialValue?: undefined},\n): Signal<string | null>;\n\n/**\n * The `injectQueryParams` function allows you to access and manipulate query parameters from the current route.\n *\n * @template Output - The expected type of the read value.\n * @param {string} keyOrParamsTransform - The name of the query parameter to retrieve, or a transform function to apply to the query parameters object.\n * @param {QueryParamsOptions} options - Optional configuration options for the query parameter.\n * @returns {QueryParamsOptions} A `Signal` that emits the transformed value of the specified query parameter, or the entire query parameters object if no key is provided.\n *\n * @example\n * const search = injectQueryParams('search'); // returns the value of the 'search' query param\n * const search = injectQueryParams(p => p['search'] as string); // same as above but can be used with a custom transform function\n * const idParam = injectQueryParams('id', {transform: numberAttribute}); // returns the value fo the 'id' query params and transforms it into a number\n * const idParam = injectQueryParams(p => numberAttribute(p['id'])); // same as above but can be used with a custom transform function\n * const queryParams = injectQueryParams(); // returns the entire query params object\n */\nexport function injectQueryParams<Output>(\n keyOrParamsTransform?: string | QueryParamsTransformFn<Output>,\n options: QueryParamsOptions<Output> = {},\n): Signal<Output | Params | string | boolean | number | null> {\n assertInInjectionContext(injectQueryParams);\n\n const route = inject(ActivatedRoute);\n const initialQueryParams = route.snapshot.queryParams;\n\n const {transform, initialValue} = options;\n\n // injectQueryParams(): Signal<Params>\n if (!keyOrParamsTransform) {\n return toSignal(route.queryParams, {initialValue: initialQueryParams});\n }\n\n // injectQueryParams<Output>(fn: QueryParamsTransformFn<Output>): Signal<Output>\n if (typeof keyOrParamsTransform === 'function') {\n return toSignal(route.queryParams.pipe(map(keyOrParamsTransform)), {\n initialValue: keyOrParamsTransform(initialQueryParams),\n });\n }\n\n // keyOrParamsTransform is string.\n const getParam = (params: Params) => {\n const param = params?.[keyOrParamsTransform] as string | string[] | undefined;\n\n if (!param) {\n return initialValue ?? null;\n }\n\n if (Array.isArray(param)) {\n if (param.length < 1) {\n return initialValue ?? null;\n }\n return transform ? transform(param[0]) : param[0];\n }\n\n return transform ? transform(param) : param;\n };\n\n return toSignal(route.queryParams.pipe(map(getParam)), {\n initialValue: getParam(initialQueryParams),\n });\n}\n","import {assertInInjectionContext, Injector, isSignal, Signal, untracked} from '@angular/core';\nimport {toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {\n distinctUntilChanged,\n from,\n identity,\n isObservable,\n merge,\n ObservableInput,\n OperatorFunction,\n startWith,\n} from 'rxjs';\n\ntype ObservableSignalInput<T> = ObservableInput<T> | Signal<T>;\n\ntype ObservableSignalInputTuple<T> = {\n [K in keyof T]: ObservableSignalInput<T[K]>;\n};\n\n// pick from ToSignalOptions\nexport type MergeFromOptions<T> = {\n readonly injector?: Injector;\n readonly initialValue?: T | null;\n};\n\nexport function mergeFrom<Input extends readonly unknown[], Output = Input[number]>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n operator?: OperatorFunction<Input[number], Output>,\n options?: MergeFromOptions<Output>,\n): Signal<Output>;\n\nexport function mergeFrom<Input extends readonly unknown[], Output = Input[number]>(\n sources: readonly [...ObservableSignalInputTuple<Input>],\n options?: MergeFromOptions<Output>,\n): Signal<Output>;\n\n// No object inputs\n\n/**\n * Merges multiple `Observable` or `Signal` sources into a `Signal` that emits values from any source.\n * This function is similar to RxJS `merge`, but works with both Observables and Signals,\n * and returns a Signal instead of an Observable.\n *\n * When any source emits a value, the Signal will emit that value. This is useful for\n * combining multiple event streams or reactive sources.\n *\n * @template Input - The type of values in the input sources array.\n * @template Output - The type of the output Signal (defaults to Input[number]).\n *\n * @param sources - Array of `Observable` or `Signal` values to merge.\n * @param operator - Optional RxJS operator function to transform the merged values.\n * @param options - Optional configuration object:\n * - `initialValue`: Initial value for the Signal\n * - `injector`: Angular injector to use for signal conversion\n * @returns A Signal that emits values from any of the merged sources.\n *\n * @example\n * ```typescript\n * export class Component {\n * e$ = of(1).pipe(delay(1000));\n * f = signal(2);\n *\n * // Merge with operator\n * data = mergeFrom(\n * [this.e$, this.f],\n * pipe(\n * map((res) => `${res} is coming~`),\n * startWith(0),\n * ),\n * );\n *\n * // Simple merge\n * merged = mergeFrom([source1$, source2$, sourceSignal]);\n *\n * // With initial value\n * merged = mergeFrom(\n * [source1$, source2$],\n * { initialValue: null }\n * );\n * }\n * ```\n */\nexport function mergeFrom<Input extends readonly unknown[], Output = Input[number]>(...args: unknown[]) {\n assertInInjectionContext(mergeFrom);\n\n const [sources, operator = identity, options = {}] = parseArgs<Input, Output>(args);\n\n const normalizedSources = sources.map((source) => {\n if (isSignal(source)) {\n return toObservable(source, {injector: options.injector}).pipe(startWith(untracked(source)));\n }\n\n if (!isObservable(source)) {\n source = from(source);\n }\n\n return source.pipe(distinctUntilChanged());\n });\n\n const merged$ = merge(...normalizedSources).pipe(operator as OperatorFunction<Input[number], Output>);\n\n if (options.initialValue !== undefined) {\n return toSignal(merged$, {initialValue: options.initialValue as Output, injector: options.injector});\n }\n return toSignal(merged$, {requireSync: true, injector: options.injector});\n}\n\nfunction parseArgs<Input extends readonly unknown[], Output = Input[number]>(args: unknown[]) {\n if (!args || args.length < 1) {\n throw new TypeError('mergeFrom needs sources');\n }\n\n if (args.length === 1) {\n return [args[0] as readonly [...ObservableSignalInputTuple<Input>], undefined, undefined] as const;\n }\n\n if (args.length === 2) {\n const hasOperator = typeof args[1] === 'function';\n\n if (hasOperator) {\n return [\n args[0] as readonly [...ObservableSignalInputTuple<Input>],\n args[1] as OperatorFunction<Input[number], Output>,\n undefined,\n ] as const;\n }\n\n return [\n args[0] as readonly [...ObservableSignalInputTuple<Input>],\n undefined,\n args[1] as MergeFromOptions<Output>,\n ] as const;\n }\n\n return args as unknown as [\n readonly [...ObservableSignalInputTuple<Input>],\n OperatorFunction<Input[number], Output>,\n MergeFromOptions<Output>,\n ];\n}\n","import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';\n\nimport {differenceInDays} from '../utils/difference-in-days.util';\n\n/**\n * Interface defining the options for the date range validator.\n */\ninterface DateRangeOptions {\n /**\n * The minimum allowed date. The control value must be greater than (or equal to, if `minInclusive` is true) this date.\n * Can be a Date object or a string that can be parsed by the Date constructor.\n */\n minDate?: Date | string;\n\n /**\n * The maximum allowed date. The control value must be less than (or equal to, if `maxInclusive` is true) this date.\n * Can be a Date object or a string that can be parsed by the Date constructor.\n */\n maxDate?: Date | string;\n\n /**\n * Whether the comparison for the minimum date can include the exact date.\n * If `true`, the control value can be equal to `minDate`.\n * If `false` (default), the control value must be strictly greater than `minDate`.\n */\n minInclusive?: boolean;\n\n /**\n * Whether the comparison for the maximum date can include the exact date.\n * If `true`, the control value can be equal to `maxDate`.\n * If `false` (default), the control value must be strictly less than `maxDate`.\n */\n maxInclusive?: boolean;\n\n /**\n * Whether to compare the time components as well.\n * If `true`, comparisons will include Date time components (hours, minutes, seconds, milliseconds).\n * If `false` (default), time parts will be ignored and only the date portion will be compared.\n */\n compareTime?: boolean;\n}\n\n/**\n * Creates a validator function that validates a date against a specified date range.\n *\n * The validator checks if the form control's date value falls within the specified range.\n * It supports:\n * - Minimum and maximum date constraints\n * - Inclusive or exclusive boundary comparisons\n * - Time-aware or date-only comparisons\n *\n * @param options - The options for the date range validation.\n * @returns A validator function that validates a FormControl and returns an error object if the date is out of range,\n * or `null` if the date is valid. Error objects contain:\n * - `minDate`: ISO string of the minimum date (if value is too early)\n * - `maxDate`: ISO string of the maximum date (if value is too late)\n * - `invalidDate`: `true` (if the value cannot be parsed as a date)\n *\n * @example\n * ```typescript\n * // Date range with inclusive boundaries\n * const form = new FormGroup({\n * startDate: new FormControl('', [\n * dateRangeValidator({\n * minDate: new Date('2024-01-01'),\n * maxDate: new Date('2024-12-31'),\n * minInclusive: true,\n * maxInclusive: true\n * })\n * ])\n * });\n *\n * // Date-only comparison (ignores time)\n * const form = new FormGroup({\n * appointment: new FormControl('', [\n * dateRangeValidator({\n * minDate: '2024-01-01',\n * compareTime: false\n * })\n * ])\n * });\n * ```\n */\nexport function dateRangeValidator(options: DateRangeOptions): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n // if control doesn't have any value, pass validation. Developer should use Angular required validator.\n if (!control.value) {\n return null;\n }\n\n // Parse the selected date from the control value\n const selectedDate = new Date(control.value);\n\n if (isNaN(selectedDate.getTime())) {\n return {invalidDate: true};\n }\n\n const minDate = options.minDate ? new Date(options.minDate) : null;\n const maxDate = options.maxDate ? new Date(options.maxDate) : null;\n\n if (minDate) {\n let errorCondition = false;\n\n if (options.compareTime) {\n errorCondition = options.minInclusive\n ? selectedDate.getTime() < minDate.getTime()\n : selectedDate.getTime() <= minDate.getTime();\n } else {\n const diff = differenceInDays(selectedDate, minDate);\n errorCondition = options.minInclusive ? diff < 0 : diff <= 0;\n }\n\n if (errorCondition) {\n return {\n minDate: minDate.toISOString(),\n };\n }\n }\n\n if (maxDate) {\n let errorCondition = false;\n\n if (options.compareTime) {\n errorCondition = options.maxInclusive\n ? selectedDate.getTime() > maxDate.getTime()\n : selectedDate.getTime() >= maxDate.getTime();\n } else {\n const diff = differenceInDays(selectedDate, maxDate);\n errorCondition = options.maxInclusive ? diff > 0 : diff >= 0;\n }\n\n if (errorCondition) {\n return {\n maxDate: maxDate.toISOString(),\n };\n }\n }\n\n return null;\n };\n}\n","import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';\n\n/**\n * Creates a validator function that checks for intersection between two form controls within a FormGroup.\n * Both controls' values must be arrays. The validator sets an error on both controls if they have any common values.\n *\n * This is useful for scenarios where you need to ensure two arrays don't share any elements,\n * such as preventing duplicate selections in multi-select scenarios.\n *\n * @template T - The type of elements in the arrays (defaults to `string`).\n * @param controlName1 - The name of the first form control in the FormGroup.\n * @param controlName2 - The name of the second form control in the FormGroup.\n * @returns A validator function that validates the FormGroup and returns an error object with `intersection: true`\n * if there is an intersection between the two arrays, or `null` if there is no intersection.\n *\n * @example\n * ```typescript\n * const form = new FormGroup({\n * selectedUsers: new FormControl(['user1', 'user2']),\n * excludedUsers: new FormControl(['user3', 'user4']),\n * }, {\n * validators: [intersectionValidator('selectedUsers', 'excludedUsers')]\n * });\n *\n * // If selectedUsers contains 'user1' and excludedUsers also contains 'user1',\n * // both controls will have an error: { intersection: true }\n * ```\n */\nexport function intersectionValidator<T = string>(controlName1: string, controlName2: string): ValidatorFn {\n return (formGroup: AbstractControl): ValidationErrors | null => {\n const control1 = formGroup.get(controlName1);\n const control2 = formGroup.get(controlName2);\n\n if (!control1 || !control2) {\n return null; // If either control is undefined or null\n }\n\n const value1 = control1.value;\n const value2 = control2.value;\n\n // Assuming both values are arrays\n if (!Array.isArray(value1) || !Array.isArray(value2)) {\n return null;\n }\n\n const intersection = value1.filter((value: T) => value2.includes(value));\n\n if (intersection.length > 0) {\n control1.setErrors({intersection: true});\n control2.setErrors({intersection: true});\n return {intersection: true};\n } else {\n control1.setErrors(null);\n control2.setErrors(null);\n return null;\n }\n };\n}\n","import {AbstractControl, FormArray, ValidationErrors, ValidatorFn} from '@angular/forms';\n\n/**\n * Validator for checking uniqueness across multiple fields in a FormArray or FormGroup.\n *\n * This validator can be applied to a FormArray or FormGroup containing the controls to be validated.\n * It ensures that each control's value is unique among all other controls within the array or group.\n *\n * When duplicate values are found, the validator sets a `notUnique` error on all affected controls.\n * The error is automatically removed when the value becomes unique again.\n *\n * @example\n * ```typescript\n * // FormArray with unique values\n * const formArray = new FormArray([\n * new FormControl('value1'),\n * new FormControl('value2'),\n * new FormControl('value1') // This will have notUnique error\n * ], [UniqueValidator.unique()]);\n *\n * // FormArray with custom key selector\n * const formArray = new FormArray([\n * new FormGroup({\n * id: new FormControl(1),\n * name: new FormControl('Item 1')\n * }),\n * new FormGroup({\n * id: new FormControl(2),\n * name: new FormControl('Item 2')\n * })\n * ], [UniqueValidator.unique(control => control.get('id'))]);\n * ```\n */\nexport class UniqueValidator {\n /**\n * Creates a validator function that checks for uniqueness of values across controls in a FormArray or FormGroup.\n *\n * The validator:\n * - Compares values using the provided key selector function\n * - Sets `notUnique` error on controls with duplicate values\n * - Automatically removes errors when values become unique\n * - Ignores null, undefined, empty strings, and 'NaN' values\n *\n * @template T - The type of the control value.\n * @param keySelector - A function to select the key control for comparison.\n * Defaults to the control itself if not provided.\n * This is useful when validating FormGroups where you want to check uniqueness of a specific field.\n * @returns A validator function that can be attached to a FormArray or FormGroup.\n */\n static unique<T>(\n keySelector: (control: AbstractControl) => AbstractControl<T> = (control: AbstractControl<T>) => control,\n ): ValidatorFn {\n return (formArray: AbstractControl): ValidationErrors | null => {\n if (!(formArray instanceof FormArray)) {\n return null;\n }\n\n const targetControls = formArray.controls.map(keySelector);\n const valueControlMap = new Map<T, AbstractControl<T>>();\n const invalidControls: AbstractControl<T>[] = [];\n\n for (const control of targetControls) {\n const value = control.value;\n\n if (value == null || String(value) === '' || String(value) === 'NaN') {\n continue;\n }\n\n const controlInMap = valueControlMap.get(value);\n\n if (controlInMap) {\n if (!invalidControls.includes(controlInMap)) {\n invalidControls.push(controlInMap);\n }\n\n invalidControls.push(control);\n } else {\n valueControlMap.set(value, control);\n }\n }\n\n const notUniqueError = {notUnique: true};\n\n // set errors manually for target controls\n for (const control of targetControls) {\n const errors = control.errors;\n\n if (invalidControls.includes(control)) {\n // set not unique error for invalid controls\n control.setErrors(errors === null ? notUniqueError : {...errors, ...notUniqueError});\n } else {\n // remove not unique errors for valid controls\n if (errors === null) {\n control.setErrors(null);\n } else {\n delete errors['notUnique'];\n control.setErrors(Object.keys(errors).length > 0 ? errors : null);\n }\n }\n }\n\n return invalidControls.length > 0 ? notUniqueError : null;\n };\n }\n}\n","import {AbstractControl, ValidationErrors} from '@angular/forms';\n\nimport {httpsPattern, urlPattern} from '../const';\n\n/**\n * Validator function that checks if a form control value is a valid URL.\n *\n * @param control - The form control to validate\n * @returns `null` if the value is a valid URL, or an error object with `invalidUrl: true` if invalid\n *\n * @example\n * ```typescript\n * const form = new FormGroup({\n * website: new FormControl('', urlValidator)\n * });\n * ```\n */\nexport function urlValidator(control: AbstractControl): ValidationErrors | null {\n if (!control.value || !urlPattern.test(control.value)) {\n return {invalidUrl: true};\n }\n return null;\n}\n\n/**\n * Validator function that checks if a form control value is a valid HTTPS URL.\n *\n * @param control - The form control to validate\n * @returns `null` if the value is a valid HTTPS URL, or an error object with `invalidUrl: true` if invalid\n *\n * @example\n * ```typescript\n * const form = new FormGroup({\n * secureUrl: new FormControl('', httpsValidator)\n * });\n * ```\n */\nexport function httpsValidator(control: AbstractControl): ValidationErrors | null {\n if (!control.value || !httpsPattern.test(control.value)) {\n return {invalidUrl: true};\n }\n return null;\n}\n","/*\n * Public API Surface of ngx-lift\n */\n\nexport * from './lib/models';\nexport * from './lib/operators';\nexport * from './lib/pipes';\nexport * from './lib/signals';\nexport * from './lib/utils';\nexport * from './lib/validators';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["isPromise"],"mappings":";;;;;;;AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCG;SACa,kBAAkB,CAChC,OAA6D,EAC7D,mBAAmB,GAAG,KAAK,EAAA;IAE3B,SAAS,gBAAgB,CAAI,UAAyB,EAAA;QACpD,IAAI,mBAAmB,EAAE;YACvB,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACzC;aAAO;;AAEL,YAAA,OAAO,UAAU,YAAY,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,UAAU;QACtF;IACF;AAEA,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;;QAE1B,OAAO,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACrD;SAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE;;QAE1D,MAAM,WAAW,GAAyC,EAAE;AAE5D,QAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YAClD,WAAW,CAAC,GAAG,CAAC,G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