mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.6 KiB
60 lines
1.6 KiB
import * as i0 from '@angular/core';
|
|
import { inject, Injector, EnvironmentInjector, ApplicationRef, createComponent, Injectable } from '@angular/core';
|
|
|
|
const appsWithLoaders = new WeakMap();
|
|
class _CdkPrivateStyleLoader {
|
|
_appRef;
|
|
_injector = inject(Injector);
|
|
_environmentInjector = inject(EnvironmentInjector);
|
|
load(loader) {
|
|
const appRef = this._appRef = this._appRef || this._injector.get(ApplicationRef);
|
|
let data = appsWithLoaders.get(appRef);
|
|
if (!data) {
|
|
data = {
|
|
loaders: new Set(),
|
|
refs: []
|
|
};
|
|
appsWithLoaders.set(appRef, data);
|
|
appRef.onDestroy(() => {
|
|
appsWithLoaders.get(appRef)?.refs.forEach(ref => ref.destroy());
|
|
appsWithLoaders.delete(appRef);
|
|
});
|
|
}
|
|
if (!data.loaders.has(loader)) {
|
|
data.loaders.add(loader);
|
|
data.refs.push(createComponent(loader, {
|
|
environmentInjector: this._environmentInjector
|
|
}));
|
|
}
|
|
}
|
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
minVersion: "12.0.0",
|
|
version: "21.0.3",
|
|
ngImport: i0,
|
|
type: _CdkPrivateStyleLoader,
|
|
deps: [],
|
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
});
|
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
minVersion: "12.0.0",
|
|
version: "21.0.3",
|
|
ngImport: i0,
|
|
type: _CdkPrivateStyleLoader,
|
|
providedIn: 'root'
|
|
});
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({
|
|
minVersion: "12.0.0",
|
|
version: "21.0.3",
|
|
ngImport: i0,
|
|
type: _CdkPrivateStyleLoader,
|
|
decorators: [{
|
|
type: Injectable,
|
|
args: [{
|
|
providedIn: 'root'
|
|
}]
|
|
}]
|
|
});
|
|
|
|
export { _CdkPrivateStyleLoader };
|
|
//# sourceMappingURL=_style-loader-chunk.mjs.map
|
|
|