1import { G as l, Kn as u, No as p, Pi as m, Ro as o, Wa as w, fi as R, gt as h, l as L, ni as c, oo as S } from "./chunk-c97c17u8.js"; 2import { o as C, t as n } from "./chunk-pesy0vb6.js"; 3import { B as b, d as v, ut as _ } from "./chunk-fbjoug0d.js"; 4import { t as k } from "./chunk-o4f8w5yc.js"; 5var d, f, g; 6function y() { 7 return (y = k((() => { 8 m(), C(), _(), d = class {}, f = class { 9 constructor(e, s, t) { 10 this.clientConfigService = e, this.type = s, this.destroyRef = t, this.loadedStream = new S(1), this.refreshedStream = new l(), this.clientConfigKey = b(s).key; 11 let r = e.updates.pipe(u((i) => i.has(this.clientConfigKey))); 12 w(r, p(e.checkConfigLoaded(this.clientConfigKey))).pipe(o((i) => !!i), c(1), n(this.destroyRef)).subscribe(() => { 13 this.isLoaded = !0, this.loadedStream.next(); 14 }), r.pipe(o((i) => !!i), o(() => this.isLoaded), n(this.destroyRef)).subscribe(() => { 15 this.refreshedStream.next(); 16 }), this.proxy = new Proxy({}, { get: (i, a) => { 17 switch (a) { 18 case "constructor": 19 case "ngOnDestroy": 20 case "name": return; 21 case "whenReady": return this.whenReady(); 22 case "whenRefreshed": return this.refreshedStream.pipe(n(this.destroyRef)); 23 case "isConfigReady": return this.isLoaded; 24 default: return this.getProperty(a); 25 } 26 } }); 27 } 28 get config() { 29 return this.proxy; 30 } 31 whenReady() { 32 return this.isLazyLoading || (this.isLazyLoading = !0, this.clientConfigService.load("", [this.type]).then(() => { 33 this.isLoaded = !0, this.loadedStream.next(), this.loadedStream.complete(); 34 }).catch((e) => { 35 this.loadedStream.error(e); 36 }).finally(() => { 37 this.isLazyLoading = !1; 38 })), this.loadedStream.pipe(c(1), n(this.destroyRef)); 39 } 40 getProperty(e) { 41 if (this.isLoaded) return this.clientConfigService.get(this.type)[e]; 42 throw new Error(`Lazy client config ${this.clientConfigKey} is not loaded yet, so it's property ${e} cannot be accessed. Subscribe to whenReady() observable to wait until it's loaded.`); 43 } 44 }, g = (() => { 45 let e = class { 46 constructor() { 47 this.configs = /* @__PURE__ */ new Map(), this.clientConfigService = h(v), this.destroyRef = h(L); 48 } 49 get(t) { 50 return this.getConfig(t)?.config; 51 } 52 getConfig(t) { 53 if (!this.configs.has(t)) { 54 let r = new f(this.clientConfigService, t, this.destroyRef); 55 this.configs.set(t, r); 56 } 57 return this.configs.get(t); 58 } 59 }; 60 return e.ɵfac = function(s) { 61 return new (s || e)(); 62 }, e.ɵprov = R({ 63 token: e, 64 factory: e.ɵfac, 65 providedIn: "root" 66 }), e; 67 })(); 68 })))(); 69} 70export { d as n, y as r, g as t }; 71 72//# sourceMappingURL=chunk-ilfhy0in.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.