{"version":3,"file":"kif-lib-services.mjs","sources":["../../../projects/kif-lib/services/network-status.enum.ts","../../../projects/kif-lib/services/standardize-error.ts","../../../projects/kif-lib/services/graphql.component.ts","../../../projects/kif-lib/services/interfaces/auth-config.interface.ts","../../../projects/kif-lib/services/auth/auth.service.ts","../../../projects/kif-lib/services/auth/session-expired.service.ts","../../../projects/kif-lib/services/auth/public-request.token.ts","../../../projects/kif-lib/services/auth/refresh-session.ts","../../../projects/kif-lib/services/auth/auth-interceptor.ts","../../../projects/kif-lib/services/auth/auth-error-link.ts","../../../projects/kif-lib/services/graphql-uri.ts","../../../projects/kif-lib/services/client-config/client-config.store.ts","../../../projects/kif-lib/services/graphql.module.ts","../../../projects/kif-lib/services/enum/error-type-code-enumeration.enum.ts","../../../projects/kif-lib/services/enum/error-kind-code-enumeration.enum.ts","../../../projects/kif-lib/services/client-config/client-config.model.ts","../../../projects/kif-lib/services/client-config/client-config.parser.ts","../../../projects/kif-lib/services/client-config/client-config.query.ts","../../../projects/kif-lib/services/client-config/client-config.service.ts","../../../projects/kif-lib/services/client-config/google-maps-loader.service.ts","../../../projects/kif-lib/services/client-config/amplify-config.mapper.ts","../../../projects/kif-lib/services/client-config/client-config-error-assets.ts","../../../projects/kif-lib/services/client-config/client-config-error-screen.styles.ts","../../../projects/kif-lib/services/client-config/client-config-error-screen.ts","../../../projects/kif-lib/services/public-api.ts","../../../projects/kif-lib/services/kif-lib-services.ts"],"sourcesContent":["export enum NetworkStatus {\n    /**\n     * The query has never been run before and the query is now currently running. A query will still\n     * have this network status even if a partial data result was returned from the cache, but a\n     * query was dispatched anyway.\n     */\n    loading = 1,\n    /**\n     * If `setVariables` was called and a query was fired because of that then the network status\n     * will be `setVariables` until the result of that query comes back.\n     */\n    setVariables = 2,\n    /**\n     * Indicates that `fetchMore` was called on this query and that the query created is currently in\n     * flight.\n     */\n    fetchMore = 3,\n    /**\n     * Similar to the `setVariables` network status. It means that `refetch` was called on a query\n     * and the refetch request is currently in flight.\n     */\n    refetch = 4,\n    /**\n     * Indicates that a polling query is currently in flight. So for example if you are polling a\n     * query every 10 seconds then the network status will switch to `poll` every 10 seconds whenever\n     * a poll request has been sent but not resolved.\n     */\n    poll = 6,\n    /**\n     * No request is in flight for this query, and no errors happened. Everything is OK.\n     */\n    ready = 7,\n    /**\n     * No request is in flight for this query, but one or more errors were detected.\n     */\n    error = 8\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { CombinedGraphQLErrors, ServerError, ServerParseError } from '@apollo/client/errors';\nimport type { GraphQLFormattedError } from 'graphql';\nimport { NetworkStatus } from './network-status.enum';\nimport { ApolloQlErrorDetail, ApolloQueryResult } from './models';\n\n/**\n * Convierte el error que emite Apollo 4 en el `ApolloQueryResult` con `error`\n * que reciben los MFEs (`newVersion = true`).\n *\n * Apollo 4 ya no emite el `ApolloError` de v3 (`graphQLErrors`/`networkError`):\n * - errores GraphQL (HTTP 200 con `errors[]`) → `CombinedGraphQLErrors`;\n * - HTTP 4xx/5xx → el `HttpErrorResponse` de Angular tal cual (lo reenvía el\n *   HttpLink de apollo-angular), con los errores del servidor en `error.errors`;\n * - `ServerError`/`ServerParseError` si se usara el HttpLink propio de Apollo.\n */\nexport function standardizeError<T>(err: unknown): ApolloQueryResult<T> {\n    return {\n        data: undefined,\n        loading: false,\n        networkStatus: NetworkStatus.error,\n        error: toErrorDetail(err),\n    };\n}\n\nfunction toErrorDetail(err: unknown): ApolloQlErrorDetail {\n    // 1. Errores GraphQL del servidor\n    if (CombinedGraphQLErrors.is(err) && err.errors.length > 0) {\n        return fromGraphQLError(err.errors[0]);\n    }\n\n    // 2. HTTP 4xx/5xx: el body puede traer `{ errors: [...] }`\n    if (err instanceof HttpErrorResponse) {\n        const serverErrors = err.error?.errors;\n        if (Array.isArray(serverErrors) && serverErrors.length > 0) {\n            return fromGraphQLError(serverErrors[0]);\n        }\n        return networkError(err.message);\n    }\n\n    // 3. HttpLink de Apollo: el body viene como texto\n    if (ServerError.is(err) || ServerParseError.is(err)) {\n        const serverErrors = parseErrors(err.bodyText);\n        if (serverErrors.length > 0) {\n            return fromGraphQLError(serverErrors[0]);\n        }\n        return networkError(err.message);\n    }\n\n    // 4. Cualquier otro error con mensaje propio (protocolo, cliente, link)\n    const message = (err as { message?: unknown } | null)?.message;\n    if (typeof message === 'string' && message) {\n        return { errorMessage: message };\n    }\n\n    // 5. Fallback\n    return { errorMessage: 'Error desconocido.' };\n}\n\nfunction fromGraphQLError(error: GraphQLFormattedError): ApolloQlErrorDetail {\n    return {\n        errorMessage: error.message,\n        code: error.extensions?.['code'] as string | undefined,\n        locations: error.locations as ApolloQlErrorDetail['locations'],\n        stacktrace: error.extensions?.['stacktrace'] as string[] | undefined,\n    };\n}\n\nfunction networkError(message: string | undefined): ApolloQlErrorDetail {\n    return {\n        errorMessage: message || 'Error de red.',\n        stacktrace: message ? [message] : undefined,\n    };\n}\n\nfunction parseErrors(bodyText: string | undefined): GraphQLFormattedError[] {\n    try {\n        const errors = JSON.parse(bodyText ?? '')?.errors;\n        return Array.isArray(errors) ? errors : [];\n    } catch {\n        return [];\n    }\n}\n","import {  Injectable } from \"@angular/core\";\nimport { Apollo, gql } from \"apollo-angular\";\nimport type { DefaultContext } from \"@apollo/client/core\";\nimport { catchError, of } from \"rxjs\";\nimport { standardizeError } from \"./standardize-error\";\n@Injectable({\n    providedIn: 'root' \n})\nexport class GraphQLComponent {\n    \n    constructor(public apollo: Apollo) {}\n\n    // READ\n    // `context` es opcional: p. ej. `{ httpContext: new HttpContext().set(KIF_PUBLIC_REQUEST, true) }`\n    // para una query que no debe llevar token (la de configuración del cliente).\n    read(query: string, variables: any, fetchPolicy?: any, newVersion:boolean=false, context?: DefaultContext) {\n        const request = this.apollo.query({\n            query: gql`${query}`,\n            variables: variables,\n            fetchPolicy: fetchPolicy,\n            context\n        });\n        return !newVersion ? request : request.pipe(catchError((err:any)=> this.getCatchError(err) ));      \n    }\n\n    // UPDATE\n    update(query: string, variables:any, newVersion:boolean=false){\n        const request =  this.apollo\n            .mutate({\n                mutation: gql`${query}`,\n                variables\n            });\n        return !newVersion ? request : request.pipe(catchError((err:any)=> this.getCatchError(err) ));\n    }\n\n    // WATCH\n    watchQuery(query: string, variables: any) {\n        return this.apollo\n            .watchQuery({\n                query: gql`${query}`,\n                variables: variables\n            });\n    }\n\n    resetCacheApollo() {\n        this.apollo.client.resetStore();\n    }\n\n    // DEPRECAR METODOS - create & delete\n    create(query: any, variables?: any, newVersion:boolean=false) {\n        const request = this.apollo\n            .mutate({\n                mutation: gql`${query}`,\n                variables\n            });\n        return !newVersion ? request : request.pipe(catchError((err:any)=> this.getCatchError(err) ));\n    }\n    delete(query: string, variables:any, newVersion:boolean=false){\n        const request = this.apollo\n            .mutate({\n                mutation: gql`${query}`,\n                variables\n            });\n        return !newVersion ? request : request.pipe(catchError((err:any)=> this.getCatchError(err) ));\n    }\n\n    private getCatchError(err:any){\n        return of( standardizeError(err) ) \n    }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface IAuthConfig {\n    refresh_url?: string;\n    /**\n     * Clave del token en la respuesta del endpoint de refresh.\n     * AWS Cognito retorna 'access_token' por defecto.\n     */\n    refresh_token_key?: string;\n    /**\n     * Función provista por el consumidor para renovar el token silenciosamente.\n     * Debe retornar el nuevo access token o null si la renovación falló.\n     * Ejemplo con Amplify: () => fetchAuthSession({ forceRefresh: true })\n     *   .then(s => s.tokens?.accessToken?.toString() ?? null)\n     */\n    onRefresh?: () => Promise<string | null>;\n}\n\nexport const AUTH_CONFIG = new InjectionToken<IAuthConfig>('AUTH_CONFIG');\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { BehaviorSubject, catchError, map, Observable, tap, throwError } from 'rxjs';\nimport { IRoleActive } from '../interfaces/role-active.interface';\nimport { HttpBackend, HttpClient } from '@angular/common/http';\nimport { AUTH_CONFIG, IAuthConfig } from '../interfaces/auth-config.interface';\n\n@Injectable()\nexport class AuthService {\n    private readonly TOKEN_KEY = 'authToken';\n    private readonly TOKEN = 'token';\n    private readonly REFRESH_TOKEN_KEY = 'refreshToken';\n    private readonly ROLE_ACTIVE_KEY = 'role-active';\n    private readonly USER_KEY = 'user';\n    private readonly USER_CAPABILITIES_KEY = 'userCapabilities';\n    private readonly CIA_KEY = 'cia';\n\n    private tokenSubject = new BehaviorSubject<string | null>(this.getToken());\n\n    /** Indica si hay un refresh en curso para serializar peticiones concurrentes */\n    isRefreshing = false;\n    /** Emite el nuevo token cuando el refresh finaliza; null mientras está en curso */\n    refreshTokenSubject = new BehaviorSubject<string | null>(null);\n\n    private http: HttpClient;\n\n    constructor(\n        handler: HttpBackend,\n        @Optional() @Inject(AUTH_CONFIG) private authConfig: IAuthConfig | null,\n    ) {\n        this.http = new HttpClient(handler);\n    }\n\n    // ── Token de acceso ──────────────────────────────────────────────────────\n\n    setToken(token: string): void {\n        localStorage.setItem(this.TOKEN_KEY, token);\n        this.tokenSubject.next(token);\n    }\n\n    getToken(): string | null {\n        return localStorage.getItem(this.TOKEN_KEY);\n    }\n\n    clearToken(): void {\n        localStorage.removeItem(this.TOKEN_KEY);\n        this.tokenSubject.next(null);\n    }\n\n    getTokenObservable(): Observable<string | null> {\n        return this.tokenSubject.asObservable();\n    }\n\n    isLoggedIn(): boolean {\n        return !!this.getToken();\n    }\n\n    /**\n     * Parsea el JWT y comprueba si el claim `exp` ya venció.\n     * Retorna true si no hay token, si no es un JWT válido o si expiró.\n     */\n    isTokenExpired(): boolean {\n        const token = this.getToken();\n        if (!token) return true;\n        try {\n            const payload = JSON.parse(atob(token.split('.')[1]));\n            return payload.exp * 1000 < Date.now();\n        } catch {\n            return true;\n        }\n    }\n\n    // ── Refresh token ────────────────────────────────────────────────────────\n\n    setRefreshToken(token: string): void {\n        localStorage.setItem(this.REFRESH_TOKEN_KEY, token);\n    }\n\n    getRefreshToken(): string | null {\n        return localStorage.getItem(this.REFRESH_TOKEN_KEY);\n    }\n\n    clearRefreshToken(): void {\n        localStorage.removeItem(this.REFRESH_TOKEN_KEY);\n    }\n\n    refreshAccessToken(): Observable<string> {\n        const refreshUrl = this.authConfig?.refresh_url;\n        const tokenKey = this.authConfig?.refresh_token_key ?? 'access_token';\n        const refreshToken = this.getRefreshToken();\n\n        if (!refreshUrl || !refreshToken) {\n            return throwError(() => new Error('AUTH_CONFIG.refresh_url o refreshToken no configurados'));\n        }\n\n        return this.http.post<Record<string, string>>(refreshUrl, { refreshToken }).pipe(\n            tap(response => {\n                const newToken = response[tokenKey];\n                this.setToken(newToken);\n                this.refreshTokenSubject.next(newToken);\n            }),\n            map(response => response[tokenKey]),\n            catchError(error => {\n                this.clearToken();\n                this.clearRefreshToken();\n                return throwError(() => error);\n            })\n        );\n    }\n\n    // ── Rol activo ───────────────────────────────────────────────────────────\n\n    removeActiveRole() {\n        localStorage.removeItem(this.ROLE_ACTIVE_KEY);\n    }\n\n    setActiveRole(roleCode: IRoleActive) {\n        localStorage.setItem(this.ROLE_ACTIVE_KEY, JSON.stringify(roleCode));\n    }\n\n    getActiveRole(): IRoleActive|null {\n        const sessionRoleActive = localStorage.getItem(this.ROLE_ACTIVE_KEY) || ''; \n        return sessionRoleActive ? JSON.parse(sessionRoleActive) : null;\n    }\n\n    logout(): void {\n        localStorage.removeItem(this.TOKEN_KEY);\n        localStorage.removeItem(this.REFRESH_TOKEN_KEY);\n        localStorage.removeItem(this.ROLE_ACTIVE_KEY);\n        localStorage.removeItem(this.USER_KEY);\n        localStorage.removeItem(this.USER_CAPABILITIES_KEY);\n        localStorage.removeItem(this.CIA_KEY);\n        localStorage.removeItem(this.TOKEN);\n\n        Object.keys(localStorage)\n            .filter(key => key.startsWith('CognitoIdentityServiceProvider'))\n            .forEach(key => localStorage.removeItem(key));\n\n        this.tokenSubject.next(null);\n        this.isRefreshing = false;\n        this.refreshTokenSubject.next(null);\n    }\n\n    // ── Subdominio ───────────────────────────────────────────────────────────\n\n    getSubDomain(): string {\n        return window.location.hostname.split('.')[0];\n    }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class SessionExpiredService {\n    private readonly expired$ = new Subject<void>();\n    private hasEmitted = false;\n\n    readonly sessionExpired: Observable<void> = this.expired$.asObservable();\n\n    emit(): void {\n        if (this.hasEmitted) return;\n        this.hasEmitted = true;\n        this.expired$.next();\n    }\n\n    reset(): void {\n        this.hasEmitted = false;\n    }\n}\n","import { HttpContextToken } from '@angular/common/http';\n\n/**\n * Marca una request HTTP como pública: el `AuthInterceptor` la deja pasar\n * sin `authorization` ni `active-role` y sin intentar refrescar el token.\n *\n * Caso de uso: la query de configuración del cliente (CLVDKIF-1858), que\n * corre antes de que Amplify esté configurado. Con un token vencido en el\n * storage, el refresh fallaría (Amplify todavía no existe) y el arranque\n * quedaría trabado en la pantalla de error.\n *\n * Con Apollo: `context: { httpContext: new HttpContext().set(KIF_PUBLIC_REQUEST, true) }`.\n */\nexport const KIF_PUBLIC_REQUEST = new HttpContextToken<boolean>(() => false);\n","import { Observable, from, throwError } from 'rxjs';\nimport { catchError, filter, map, take, tap } from 'rxjs/operators';\nimport { IAuthConfig } from '../interfaces/auth-config.interface';\nimport { AuthService } from './auth.service';\nimport { SessionExpiredService } from './session-expired.service';\n\n/**\n * Refresca el access token y emite el nuevo. Lo comparten el AuthInterceptor\n * (token vencido o HTTP 401) y el ErrorLink de Apollo (UNAUTHENTICATED de\n * GraphQL), para que los dos refresquen igual.\n *\n * - Usa `AUTH_CONFIG.onRefresh` (en el shell: `fetchAuthSession` de Amplify);\n *   si no está configurado, cae a `refresh_url` (`AuthService.refreshAccessToken`).\n * - Si ya hay un refresh en curso, espera ese token en vez de lanzar otro.\n * - Si falla, emite `sessionExpired` y propaga el error.\n */\nexport function refreshSession(\n    authService: AuthService,\n    authConfig: IAuthConfig | null,\n    sessionExpired: SessionExpiredService\n): Observable<string> {\n    if (authService.isRefreshing) {\n        return authService.refreshTokenSubject.pipe(\n            filter((token): token is string => token !== null),\n            take(1)\n        );\n    }\n\n    authService.isRefreshing = true;\n    authService.refreshTokenSubject.next(null);\n\n    const refresh$: Observable<string | null> = authConfig?.onRefresh\n        ? from(authConfig.onRefresh())\n        : authService.refreshAccessToken();\n\n    return refresh$.pipe(\n        map(newToken => {\n            if (!newToken) throw new Error('No token after refresh');\n            return newToken;\n        }),\n        tap(newToken => {\n            authService.setToken(newToken);\n            authService.isRefreshing = false;\n            authService.refreshTokenSubject.next(newToken);\n        }),\n        catchError(error => {\n            // Sin esto el motivo se pierde: el usuario sólo ve \"Tu sesión ha expirado\".\n            console.warn('[auth] No se pudo refrescar la sesión:', error);\n            authService.isRefreshing = false;\n            sessionExpired.emit();\n            return throwError(() => error);\n        })\n    );\n}\n","import { HttpHandlerFn, HttpInterceptorFn, HttpRequest } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { throwError } from 'rxjs';\nimport { catchError, switchMap } from 'rxjs/operators';\nimport { AUTH_CONFIG } from '../interfaces/auth-config.interface';\nimport { AuthService } from './auth.service';\nimport { SessionExpiredService } from './session-expired.service';\nimport { KIF_PUBLIC_REQUEST } from './public-request.token';\nimport { refreshSession } from './refresh-session';\n\nexport const AuthInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next: HttpHandlerFn) => {\n    // Requests públicas (p. ej. la config del cliente): sin token ni refresh.\n    if (req.context.get(KIF_PUBLIC_REQUEST)) {\n        return next(req);\n    }\n\n    const authService = inject(AuthService);\n    const sessionExpired = inject(SessionExpiredService);\n    const authConfig = inject(AUTH_CONFIG, { optional: true });\n\n    const attachHeaders = (token: string | null) => {\n        const activeRole = authService.getActiveRole();\n        return req.clone({\n            setHeaders: {\n                authorization: token ?? '',\n                'active-role': activeRole?.code ?? ''\n            }\n        });\n    };\n\n    // La sesión se da por expirada sólo si falla el refresh; si después falla\n    // el reintento (p. ej. un 500), el error sube tal cual.\n    const refreshAndRetry = () =>\n        refreshSession(authService, authConfig, sessionExpired).pipe(\n            switchMap(token => next(attachHeaders(token)))\n        );\n\n    const token = authService.getToken();\n    const tokenExpired = token && authService.isTokenExpired();\n\n    if (tokenExpired) {\n        return refreshAndRetry();\n    }\n\n    return next(attachHeaders(token)).pipe(\n        catchError(error => {\n            if (error.status === 401) {\n                return refreshAndRetry();\n            }\n            return throwError(() => error);\n        })\n    );\n};\n","import { CombinedGraphQLErrors } from '@apollo/client/errors';\nimport { ErrorLink } from '@apollo/client/link/error';\nimport { switchMap, tap } from 'rxjs';\nimport { IAuthConfig } from '../interfaces/auth-config.interface';\nimport { AuthService } from './auth.service';\nimport { KIF_PUBLIC_REQUEST } from './public-request.token';\nimport { refreshSession } from './refresh-session';\nimport { SessionExpiredService } from './session-expired.service';\n\nexport interface AuthErrorLinkDeps {\n    authService: AuthService;\n    authConfig: IAuthConfig | null;\n    sessionExpired: SessionExpiredService;\n}\n\nconst isUnauthenticated = (errors: ReadonlyArray<{ extensions?: Record<string, unknown> }> | undefined) =>\n    !!errors?.some(e => e.extensions?.['code'] === 'UNAUTHENTICATED');\n\n/**\n * Maneja el UNAUTHENTICATED que llega a nivel GraphQL (HTTP 200 con `errors[]`),\n * que no pasa por el AuthInterceptor: refresca la sesión igual que el\n * interceptor y reintenta la operación una sola vez.\n *\n * - Una request pública (`KIF_PUBLIC_REQUEST`) no se toca: no lleva sesión.\n * - Si el reintento vuelve a dar UNAUTHENTICATED, la sesión se da por expirada.\n *   No hay bucle posible: ErrorLink conecta el reintento directo al observador\n *   y no lo vuelve a pasar por este handler; por eso el chequeo va en el `tap`.\n *\n * Reemplaza al `onError` anterior, que leía `graphQLErrors`: en Apollo 4 esa\n * clave ya no existe y el manejo nunca se ejecutaba.\n */\nexport function handleAuthError(\n    { error, operation, forward }: ErrorLink.ErrorHandlerOptions,\n    { authService, authConfig, sessionExpired }: AuthErrorLinkDeps\n): ReturnType<ErrorLink.ErrorHandler> {\n    if (operation.getContext()['httpContext']?.get(KIF_PUBLIC_REQUEST)) return;\n    if (!CombinedGraphQLErrors.is(error) || !isUnauthenticated(error.errors)) return;\n\n    return refreshSession(authService, authConfig, sessionExpired).pipe(\n        // El AuthInterceptor adjunta el token nuevo al reintento (lo lee del storage).\n        switchMap(() => forward(operation)),\n        tap(result => {\n            if (isUnauthenticated(result.errors)) {\n                console.warn('[auth] El backend rechazó el token refrescado:', result.errors?.[0]?.message);\n                sessionExpired.emit();\n            }\n        })\n    );\n}\n\nexport function createAuthErrorLink(deps: AuthErrorLinkDeps): ErrorLink {\n    return new ErrorLink(options => handleAuthError(options, deps));\n}\n","import type { HttpContext } from '@angular/common/http';\nimport { KIF_PUBLIC_REQUEST } from './auth/public-request.token';\n\nexport interface GraphQLEndpoints {\n    base_url_public: string;\n    base_url_private: string;\n}\n\n/**\n * Endpoint GraphQL de una operación. Una request pública (`KIF_PUBLIC_REQUEST`)\n * va siempre al público, aunque haya token: el AuthInterceptor ya le quitó el\n * `authorization`, así que mandarla al privado sería una request sin\n * credenciales contra el endpoint autenticado.\n */\nexport function resolveGraphQLUri(\n    httpContext: HttpContext | undefined,\n    hasToken: boolean,\n    endpoints: GraphQLEndpoints\n): string {\n    const isPublic = httpContext?.get(KIF_PUBLIC_REQUEST) ?? false;\n    return isPublic || !hasToken ? endpoints.base_url_public : endpoints.base_url_private;\n}\n","import { ClientConfig } from './client-config.model';\n\n/**\n * Holder global de la configuración del cliente.\n *\n * Vive en `globalThis` y no en un servicio de DI porque native-federation\n * sólo comparte kif-lib entre shell y MFE cuando la versión coincide EXACTA:\n * con versiones distintas habría dos `ClientConfigService` y el MFE embebido\n * no vería la config que resolvió el shell. El holder es uno solo pase lo que\n * pase con las versiones. `v` permite cambiar el shape a futuro.\n */\nconst HOLDER_KEY = '__KIF_CLIENT_CONFIG__';\n\ninterface ClientConfigHolder {\n    readonly v: 1;\n    config?: Readonly<ClientConfig>;\n    promise?: Promise<Readonly<ClientConfig>>;\n}\n\nfunction holder(): ClientConfigHolder {\n    const g = globalThis as unknown as Record<string, ClientConfigHolder | undefined>;\n    return (g[HOLDER_KEY] ??= { v: 1 });\n}\n\nfunction deepFreeze<T extends object>(value: T): Readonly<T> {\n    Object.values(value).forEach(v => {\n        if (v && typeof v === 'object') deepFreeze(v);\n    });\n    return Object.freeze(value);\n}\n\nexport const clientConfigStore = {\n    /** Config ya resuelta, o `undefined` si todavía no se cargó. */\n    get(): Readonly<ClientConfig> | undefined {\n        return holder().config;\n    },\n\n    /** Carga en curso (la comparten todas las llamadas concurrentes). */\n    pending(): Promise<Readonly<ClientConfig>> | undefined {\n        return holder().promise;\n    },\n\n    /**\n     * Registra una carga. Al resolver congela y publica la config; si falla\n     * limpia la promesa para que el siguiente intento vuelva a consultar.\n     */\n    track(load: Promise<ClientConfig>): Promise<Readonly<ClientConfig>> {\n        const h = holder();\n        const tracked = load.then(\n            config => (h.config = deepFreeze(config)),\n            error => {\n                if (h.promise === tracked) h.promise = undefined;\n                throw error;\n            }\n        );\n        h.promise = tracked;\n        return tracked;\n    },\n\n    /** Sólo para tests. */\n    reset(): void {\n        delete (globalThis as unknown as Record<string, unknown>)[HOLDER_KEY];\n    }\n};\n\n/** sessionStorage donde se recuerda el `?subdomain=` de localhost. */\nexport const LOCAL_SUBDOMAIN_STORAGE_KEY = 'kif-local-subdomain';\n\n/** Formato que acepta back: una sola etiqueta, minúsculas, números y guiones, hasta 63 caracteres. */\nconst SUBDOMAIN_PATTERN = /^[a-z0-9-]{1,63}$/;\n\n/** Mismo criterio que back: minúsculas y sin espacios. */\nexport function normalizeSubdomain(value: string | null | undefined): string {\n    return (value ?? '').replace(/\\s+/g, '').toLowerCase();\n}\n\nexport function isValidSubdomain(value: string): boolean {\n    return SUBDOMAIN_PATTERN.test(value);\n}\n\nfunction rememberedLocalSubdomain(search: string, fallback: string): string {\n    const fromQuery = normalizeSubdomain(new URLSearchParams(search).get('subdomain'));\n    try {\n        // El `?subdomain=` se pierde en el redirect de Cognito (login con\n        // Google/Microsoft) y al navegar: se recuerda por pestaña.\n        if (fromQuery) {\n            sessionStorage.setItem(LOCAL_SUBDOMAIN_STORAGE_KEY, fromQuery);\n            return fromQuery;\n        }\n        return sessionStorage.getItem(LOCAL_SUBDOMAIN_STORAGE_KEY) || fallback;\n    } catch {\n        return fromQuery || fallback;\n    }\n}\n\n/**\n * Subdominio del cliente: primera etiqueta del host (`sura-dev.kipinsurtech.com`\n * → `sura-dev`), normalizada como la normaliza back. En localhost se puede\n * simular con `?subdomain=` (queda recordado en la pestaña); sin el parámetro\n * devuelve `localFallback` (default `localhost`). Dominio desnudo o `www` → `''`.\n */\nexport function resolveSubdomain(\n    hostname: string = globalThis.location?.hostname ?? '',\n    search: string = globalThis.location?.search ?? '',\n    localFallback: string = 'localhost'\n): string {\n    if (/^(localhost|127\\.0\\.0\\.1)$/i.test(hostname)) {\n        return rememberedLocalSubdomain(search, normalizeSubdomain(localFallback) || 'localhost');\n    }\n    const parts = hostname.split('.');\n    if (parts.length > 2 && parts[0].toLowerCase() !== 'www') {\n        return normalizeSubdomain(parts[0]);\n    }\n    return '';\n}\n","import { ModuleWithProviders, NgModule, inject } from '@angular/core';\nimport { provideApollo } from 'apollo-angular';\nimport { HttpLink } from 'apollo-angular/http';\nimport { InMemoryCache } from '@apollo/client/core';\nimport { HttpHeaders, provideHttpClient, withInterceptors } from '@angular/common/http';\nimport { SetContextLink } from '@apollo/client/link/context';\nimport { AuthService } from './auth/auth.service';\nimport { AuthInterceptor } from './auth/auth-interceptor';\nimport { createAuthErrorLink } from './auth/auth-error-link';\nimport { resolveGraphQLUri } from './graphql-uri';\nimport { SessionExpiredService } from './auth/session-expired.service';\nimport { IDomainKeys } from './interfaces/domain-key.interface';\nimport { AUTH_CONFIG, IAuthConfig } from './interfaces/auth-config.interface';\nimport { clientConfigStore } from './client-config/client-config.store';\n\n@NgModule({\n    declarations: [],\n    providers: [\n        provideHttpClient(\n            withInterceptors([AuthInterceptor])\n        ),\n        AuthService,\n        SessionExpiredService\n    ],\n})\nexport class GraphQLModule {\n    static forRoot(environment: any): ModuleWithProviders<GraphQLModule> {\n        // No reemplazar por resolveSubdomain(): este algoritmo devuelve 'kipinsurtech'\n        // para el dominio desnudo y prod tiene { domain: 'kipinsurtech' } en domainKeys;\n        // resolveSubdomain() devuelve '' ahí. Migrar esas entradas antes de unificar.\n        const currentSubdomain = window.location.hostname.includes('.')\n            ? window.location.hostname.split('.')[0]\n            : window.location.hostname;\n        // Seed (CLVDKIF-1858): respaldo para apps que todavía no migraron a la config\n        // del cliente. La query de config no lo necesita (back la habilita sin\n        // api-key), así que una app migrada puede quitar domainKeys de sus environments.\n        const seedApiKey = (environment.domainKeys as IDomainKeys[] | undefined)?.find(\n            (apiKey: IDomainKeys) => apiKey.domain === currentSubdomain\n        )?.key;\n\n        // Se resuelve por request: la config del cliente llega después del forRoot().\n        // `||` y no `??`: con required: [] el parser deja apiKey: '' y debe caer al seed.\n        const authLink = new SetContextLink(prevContext => {\n            const apiKey = clientConfigStore.get()?.apiKey || seedApiKey;\n            if (!apiKey) return {};\n            const headers = prevContext.headers ?? new HttpHeaders();\n            return { headers: headers.set('api-key', apiKey) };\n        });\n\n        return {\n            ngModule: GraphQLModule,\n            providers: [\n                {\n                    provide: AUTH_CONFIG,\n                    useValue: {\n                        refresh_url: environment.refresh_url,\n                        refresh_token_key: environment.refresh_token_key ?? 'access_token',\n                        onRefresh: environment.onRefresh\n                    } as IAuthConfig\n                },\n                provideApollo(() => {\n                    const httpLink = inject(HttpLink);\n                    const authService = inject(AuthService);\n                    const sessionExpiredService = inject(SessionExpiredService);\n\n                    const httpLinkHandler = httpLink.create({\n                        uri: operation => resolveGraphQLUri(\n                            operation.getContext()['httpContext'],\n                            !!authService.getToken(),\n                            environment\n                        ),\n                    });\n\n                    const errorLink = createAuthErrorLink({\n                        authService,\n                        authConfig: inject(AUTH_CONFIG, { optional: true }),\n                        sessionExpired: sessionExpiredService\n                    });\n\n                    return {\n                        cache: new InMemoryCache(),\n                        link: errorLink.concat(authLink.concat(httpLinkHandler)),\n                    };\n                })\n            ]\n        };\n    }\n}","export enum ErrorTypeCodeEnumeration {\n    MICROSERVICE_CONNECTION_ERROR=\"MICROSERVICE_CONNECTION_ERROR\",\n    DATABASE_CONNECTION_ERROR=\"DATABASE_CONNECTION_ERROR\",\n    INSERTION_FAILED=\"INSERTION_FAILED\",\n    UPDATE_FAILED=\"UPDATE_FAILED\",\n    DELETED_FAILED=\"DELETED_FAILED\",\n    NOT_FOUND=\"NOT_FOUND\",\n    PARTIALLY_FOUND=\"PARTIALLY_FOUND\",\n    UNAUTHORIZED=\"UNAUTHORIZED\",\n    FORBIDDEN=\"FORBIDDEN\",\n    INVALID_FILTERS=\"INVALID_FILTERS\",\n    HANDLED_ERROR=\"HANDLED_ERROR\",\n    UNKNOWN_ERROR=\"UNKNOWN_ERROR\"\n}\n","export enum ErrorKindCodeEnumeration {\n    ERROR=\"ERROR\",\n    WARNING=\"WARNING\",\n    SUCCESS=\"SUCCESS\"\n}\n","import { GraphQLComponent } from '../graphql.component';\n\n/** Config de Cognito del cliente (bloque `aws` del JSON de configuración). */\nexport interface ClientAwsConfig {\n    region?: string;\n    cognitoRegion?: string;\n    userPoolId: string;\n    userPoolWebClientId: string;\n    oauthDomain?: string;\n}\n\n/**\n * Configuración multicliente resuelta en el arranque (CLVDKIF-1858).\n * Todo es opcional salvo `apiKey`: cada app declara en `required` lo que\n * necesita para arrancar (el shell exige además `aws`).\n */\nexport interface ClientConfig {\n    apiKey: string;\n    /** Ya decodificada: el parser hace el `atob` del base64 que entrega back. */\n    googlePlacesApiKey?: string;\n    urlAws?: string;\n    urlPublish?: string;\n    gtm?: string;\n    aws?: ClientAwsConfig;\n}\n\nexport interface ClientConfigFetchContext {\n    /** Subdominio del host (`sura-dev`, `dev`...) o el `?subdomain=` en localhost. */\n    subdomain: string;\n    graphQL: GraphQLComponent;\n}\n\n/**\n * Obtiene el JSON crudo de la configuración; el parseo y la validación los\n * hace `ClientConfigService`. Por defecto es `defaultClientConfigFetcher`\n * (query GraphQL de la lib). El shell sólo lo reemplaza ante un hotfix.\n */\nexport type ClientConfigFetcher = (ctx: ClientConfigFetchContext) => Promise<unknown>;\n\nexport interface ClientConfigOptions {\n    /** Reemplaza la query por defecto. Sólo para hotfix desde el shell. */\n    fetch?: ClientConfigFetcher;\n    /**\n     * Si viene, se usa en lugar de la query (mientras back no defina la\n     * query definitiva, o para desarrollo local sin back).\n     */\n    mock?: ClientConfigFetcher;\n    /** Campos sin los cuales la app no puede arrancar. Default: `['apiKey']`. */\n    required?: ReadonlyArray<keyof ClientConfig>;\n    /**\n     * Sólo desarrollo local: subdominio que se consulta en localhost cuando la\n     * URL no trae `?subdomain=` ni hay uno recordado en la pestaña. En un host\n     * real no tiene efecto. Default: `localhost` (back responde NOT_FOUND).\n     */\n    localSubdomain?: string;\n    /** Tiempo máximo de espera de la consulta. Default: 8000 ms. */\n    timeoutMs?: number;\n}\n\nexport type ClientConfigErrorReason = 'query' | 'invalid' | 'missing' | 'timeout';\n\nexport class ClientConfigError extends Error {\n    constructor(\n        readonly reason: ClientConfigErrorReason,\n        message: string,\n        readonly missingFields: ReadonlyArray<keyof ClientConfig> = [],\n        override readonly cause?: unknown\n    ) {\n        super(message);\n        this.name = 'ClientConfigError';\n    }\n}\n","import { ClientAwsConfig, ClientConfig, ClientConfigError } from './client-config.model';\n\ntype RawObject = Record<string, unknown>;\n\nconst isObject = (value: unknown): value is RawObject =>\n    !!value && typeof value === 'object' && !Array.isArray(value);\n\nconst text = (value: unknown): string | undefined =>\n    typeof value === 'string' && value.trim() !== '' ? value.trim() : undefined;\n\n/**\n * Back entrega la key de Google en base64. Si ya viene en claro (`AIza...`)\n * se usa tal cual; si el base64 es inválido se descarta con un warning, sin\n * bloquear el arranque (Google es opcional).\n */\nfunction decodeGoogleKey(value: unknown): string | undefined {\n    const raw = text(value);\n    if (!raw) return undefined;\n    if (raw.startsWith('AIza')) return raw;\n    try {\n        return text(atob(raw));\n    } catch {\n        console.warn('[client-config] googlePlacesApiKey no es base64 válido; se ignora.');\n        return undefined;\n    }\n}\n\nfunction parseAws(value: unknown): ClientAwsConfig | undefined {\n    if (!isObject(value)) return undefined;\n    const userPoolId = text(value['userPoolId']);\n    const userPoolWebClientId = text(value['userPoolWebClientId']);\n    if (!userPoolId || !userPoolWebClientId) return undefined;\n    return withoutUndefined({\n        region: text(value['region']),\n        cognitoRegion: text(value['cognitoRegion']),\n        userPoolId,\n        userPoolWebClientId,\n        oauthDomain: text(value['oauthDomain'])\n    });\n}\n\nfunction withoutUndefined<T extends object>(value: T): T {\n    return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== undefined)) as T;\n}\n\n/**\n * Normaliza el JSON crudo a `ClientConfig`: acepta objeto o string JSON,\n * ignora campos desconocidos y valida que estén los `required`.\n *\n * @throws ClientConfigError `invalid` si no es un objeto JSON, `missing` si falta un requerido.\n */\nexport function parseClientConfig(\n    raw: unknown,\n    required: ReadonlyArray<keyof ClientConfig> = ['apiKey']\n): ClientConfig {\n    let source = raw;\n    if (typeof source === 'string') {\n        try {\n            source = JSON.parse(source);\n        } catch (error) {\n            throw new ClientConfigError('invalid', 'La configuración del cliente no es un JSON válido.', [], error);\n        }\n    }\n    if (!isObject(source)) {\n        throw new ClientConfigError('invalid', 'La configuración del cliente no es un objeto JSON.');\n    }\n\n    const config = withoutUndefined<ClientConfig>({\n        apiKey: text(source['apiKey']) ?? '',\n        googlePlacesApiKey: decodeGoogleKey(source['googlePlacesApiKey']),\n        urlAws: text(source['urlAws']),\n        urlPublish: text(source['urlPublish']),\n        gtm: text(source['gtm']),\n        aws: parseAws(source['aws'])\n    });\n\n    return assertRequired(config, required);\n}\n\n/**\n * Valida que la config traiga los campos que necesita quien la pide. Se usa\n * también sobre una config ya resuelta: cada app puede exigir campos distintos\n * (el shell `aws`, un MFE sólo `apiKey`) sobre la misma config compartida.\n *\n * @throws ClientConfigError `missing` con los campos que faltan.\n */\nexport function assertRequired<T extends Readonly<ClientConfig>>(\n    config: T,\n    required: ReadonlyArray<keyof ClientConfig>\n): T {\n    const missing = required.filter(field => !config[field]);\n    if (missing.length) {\n        throw new ClientConfigError(\n            'missing',\n            `Faltan campos en la configuración del cliente: ${missing.join(', ')}.`,\n            missing\n        );\n    }\n    return config;\n}\n","import { HttpContext, HttpHeaders } from '@angular/common/http';\nimport { firstValueFrom } from 'rxjs';\nimport { KIF_PUBLIC_REQUEST } from '../auth/public-request.token';\nimport { ApolloQueryResult, GraphQlResult } from '../models';\nimport { ClientConfigError, ClientConfigFetcher } from './client-config.model';\n\n/**\n * Query de configuración del cliente (CLVDKIF-1858). Es el único punto que\n * cambia si back modifica el contrato.\n *\n * Contrato de back:\n * - Pública: no necesita api-key ni token. Si se combina con otra operación en\n *   la misma request, el gateway vuelve a exigir api-key, así que va sola.\n * - El subdominio viaja en el header `subdomain` (no como variable). Back lo\n *   normaliza a minúsculas y sin espacios.\n * - `data` es un array con un objeto tipado. Los errores vienen en `errors`\n *   con `data: null`: NOT_FOUND (no existe) o INVALID_FILTERS (falta el header\n *   o tiene un formato inválido).\n *\n * Viaja como request pública (`KIF_PUBLIC_REQUEST`): sin token, para que un\n * token vencido no dispare un refresh antes de configurar Amplify.\n */\nexport const CLIENT_CONFIG_QUERY = `\n    query ClientConfig_BySubdomain {\n        result: ClientConfig_BySubdomain {\n            data {\n                subdomain\n                apiKey\n                googlePlacesApiKey\n                gtm\n                urlAws\n                urlPublish\n                aws {\n                    region\n                    cognitoRegion\n                    userPoolId\n                    userPoolWebClientId\n                    oauthDomain\n                }\n            }\n            errors {\n                errorCode\n                messageCode\n                message\n            }\n        }\n    }`;\n\n/** Header con el que back identifica al cliente. */\nexport const CLIENT_CONFIG_SUBDOMAIN_HEADER = 'subdomain';\n\n/**\n * Query por defecto. No usa `ApolloResponseUtils.handleResponse` porque corre\n * dentro del initializer, antes de que exista la UI donde mostrar un snackbar:\n * los errores suben como `ClientConfigError` y los maneja quien arranca la app.\n */\nexport const defaultClientConfigFetcher: ClientConfigFetcher = async ({ subdomain, graphQL }) => {\n    // newVersion = true: los errores de Apollo vuelven estandarizados en `error`, sin lanzar.\n    const response = await firstValueFrom(graphQL.read(\n        CLIENT_CONFIG_QUERY,\n        {},\n        'network-only',\n        true,\n        {\n            httpContext: new HttpContext().set(KIF_PUBLIC_REQUEST, true),\n            headers: new HttpHeaders({ [CLIENT_CONFIG_SUBDOMAIN_HEADER]: subdomain })\n        }\n    )) as ApolloQueryResult<GraphQlResult<Record<string, unknown>>>;\n\n    if (response.error) {\n        throw new ClientConfigError('query', `No se pudo consultar la configuración del cliente: ${response.error.errorMessage}`, [], response.error);\n    }\n    const result = response.data?.result;\n    if (result?.errors?.length) {\n        const [first] = result.errors;\n        const code = first.errorCode ? ` [${first.errorCode}]` : '';\n        throw new ClientConfigError('query', `La consulta de configuración devolvió errores${code}: ${first.message}`, [], result.errors);\n    }\n    const config = result?.data?.[0];\n    if (!config) {\n        throw new ClientConfigError('query', `No hay configuración para el subdominio \"${subdomain}\".`);\n    }\n    return config;\n};\n","import {\n    EnvironmentProviders,\n    Injectable,\n    InjectionToken,\n    inject,\n    makeEnvironmentProviders,\n    provideAppInitializer,\n    signal\n} from '@angular/core';\nimport { GraphQLComponent } from '../graphql.component';\nimport { ClientConfig, ClientConfigError, ClientConfigOptions } from './client-config.model';\nimport { assertRequired, parseClientConfig } from './client-config.parser';\nimport { defaultClientConfigFetcher } from './client-config.query';\nimport { clientConfigStore, isValidSubdomain, resolveSubdomain } from './client-config.store';\n\nconst DEFAULT_TIMEOUT_MS = 8000;\nconst DEFAULT_REQUIRED: ReadonlyArray<keyof ClientConfig> = ['apiKey'];\n\n/** Opciones con las que se registró `provideClientConfig` (para llamadas lazy a `load()`). */\nexport const CLIENT_CONFIG_OPTIONS = new InjectionToken<ClientConfigOptions>('CLIENT_CONFIG_OPTIONS');\n\n@Injectable({ providedIn: 'root' })\nexport class ClientConfigService {\n    private readonly graphQL = inject(GraphQLComponent);\n    private readonly defaultOptions = inject(CLIENT_CONFIG_OPTIONS, { optional: true }) ?? {};\n    private readonly _config = signal<Readonly<ClientConfig> | undefined>(clientConfigStore.get());\n\n    /** Config resuelta; `undefined` hasta que termine la carga. */\n    readonly config = this._config.asReadonly();\n\n    /**\n     * Idempotente: si el shell (u otra llamada) ya resolvió la config o la\n     * está resolviendo, la reutiliza sin volver a consultar. Los `required` de\n     * quien llama se validan siempre, también sobre la config compartida: si\n     * faltan, se rechaza esta llamada sin tocar la config de las demás.\n     */\n    load(options: ClientConfigOptions = this.defaultOptions): Promise<Readonly<ClientConfig>> {\n        const required = options.required ?? DEFAULT_REQUIRED;\n        const loaded = clientConfigStore.get();\n        const shared = loaded\n            ? Promise.resolve(loaded)\n            : clientConfigStore.pending() ?? clientConfigStore.track(this.fetchConfig(options));\n        return shared.then(config => {\n            this._config.set(config);\n            return assertRequired(config, required);\n        });\n    }\n\n    private async fetchConfig(options: ClientConfigOptions): Promise<ClientConfig> {\n        const fetcher = options.mock ?? options.fetch ?? defaultClientConfigFetcher;\n        const subdomain = resolveSubdomain(undefined, undefined, options.localSubdomain);\n        // Sin request: back respondería INVALID_FILTERS igual (falta o formato inválido).\n        if (!options.mock && !isValidSubdomain(subdomain)) {\n            throw new ClientConfigError('invalid', `Subdominio inválido para la configuración del cliente: \"${subdomain}\".`);\n        }\n        const raw = await withTimeout(\n            fetcher({ subdomain, graphQL: this.graphQL }),\n            options.timeoutMs ?? DEFAULT_TIMEOUT_MS\n        );\n        // Sin `required`: la config se comparte y cada llamador valida los suyos en load().\n        return parseClientConfig(raw, []);\n    }\n}\n\nfunction withTimeout<T>(promise: Promise<T>, ms: number): Promise<T> {\n    let timer: ReturnType<typeof setTimeout> | undefined;\n    const timeout = new Promise<never>((_, reject) => {\n        timer = setTimeout(\n            () => reject(new ClientConfigError('timeout', `La configuración del cliente no respondió en ${ms} ms.`)),\n            ms\n        );\n    });\n    return Promise.race([promise, timeout]).finally(() => clearTimeout(timer));\n}\n\n/**\n * Resuelve la configuración del cliente antes del bootstrap.\n *\n * En un MFE embebido el `app.config.ts` no se ejecuta (el shell sólo importa\n * sus rutas), así que este initializer corre únicamente en standalone; en\n * embebido la config ya la dejó el shell en el holder global.\n */\nexport function provideClientConfig(options: ClientConfigOptions = {}): EnvironmentProviders {\n    return makeEnvironmentProviders([\n        { provide: CLIENT_CONFIG_OPTIONS, useValue: options },\n        provideAppInitializer(() => inject(ClientConfigService).load(options).then(() => undefined))\n    ]);\n}\n","import { Injectable } from '@angular/core';\nimport { clientConfigStore } from './client-config.store';\n\nconst SCRIPT_ID = 'kif-google-maps';\n\ntype ScriptState = 'loading' | 'loaded' | 'error';\n\n/**\n * Carga el script de Google Maps/Places con la key de la configuración del\n * cliente. Reemplaza las copias locales de `GoogleMapsLoaderService` de cada\n * MFE (que leían `environment.google_api_hash`).\n *\n * El estado de la carga vive en el propio `<script>` (`data-kif-state`) y no\n * sólo en el servicio: el DOM es uno solo aunque haya varias copias de\n * kif-lib (shell y MFE en versiones distintas), igual que el holder de config.\n */\n@Injectable({ providedIn: 'root' })\nexport class GoogleMapsLoaderService {\n    private loading?: Promise<void>;\n\n    load(): Promise<void> {\n        if ((globalThis as any).google?.maps) return Promise.resolve();\n        this.loading ??= this.injectScript().catch(error => {\n            this.loading = undefined;\n            throw error;\n        });\n        return this.loading;\n    }\n\n    private async injectScript(): Promise<void> {\n        const config = clientConfigStore.get() ?? (await clientConfigStore.pending());\n        const key = config?.googlePlacesApiKey;\n        if (!key) {\n            throw new Error('[google-maps] La configuración del cliente no trae googlePlacesApiKey.');\n        }\n\n        let script = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n        const state = script?.dataset['kifState'] as ScriptState | undefined;\n        if (script && state === 'loaded') return;\n        if (script && state !== 'loading') {\n            // Un script que ya falló no vuelve a emitir eventos: hay que reemplazarlo.\n            script.remove();\n            script = null;\n        }\n\n        const target = script ?? this.createScript(key);\n        await new Promise<void>((resolve, reject) => {\n            target.addEventListener('load', () => resolve(), { once: true });\n            target.addEventListener('error', () => reject(new Error('[google-maps] No se pudo cargar el script.')), { once: true });\n        });\n    }\n\n    private createScript(key: string): HTMLScriptElement {\n        const script = document.createElement('script');\n        script.id = SCRIPT_ID;\n        script.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(key)}&libraries=places`;\n        script.async = true;\n        script.dataset['kifState'] = 'loading' satisfies ScriptState;\n        // Registrados antes que los de cualquier llamador: el estado queda\n        // actualizado para otras copias de kif-lib antes de resolver.\n        script.addEventListener('load', () => (script.dataset['kifState'] = 'loaded' satisfies ScriptState), { once: true });\n        script.addEventListener('error', () => {\n            script.dataset['kifState'] = 'error' satisfies ScriptState;\n            script.remove();\n        }, { once: true });\n        document.body.appendChild(script);\n        return script;\n    }\n}\n","import { ClientAwsConfig } from './client-config.model';\n\nexport interface AmplifyRedirects {\n    /** URL absoluta del callback de login (p. ej. `appUrl('login/call-back')` en el shell). */\n    redirectSignIn: string;\n    /** URL absoluta a la que vuelve el logout. */\n    redirectSignOut: string;\n}\n\n/** Shape \"gen1\" (aws-exports) que hoy aceptan shell y policy en `Amplify.configure()`. */\nexport interface AmplifyGen1Config {\n    aws_project_region?: string;\n    aws_cognito_region?: string;\n    aws_user_pools_id: string;\n    aws_user_pools_web_client_id: string;\n    oauth?: {\n        domain: string;\n        scope: string[];\n        redirectSignIn: string;\n        redirectSignOut: string;\n        responseType: 'code';\n    };\n}\n\nconst DEFAULT_SCOPES = ['openid', 'profile', 'email', 'phone'];\n\n/**\n * Convierte el bloque `aws` de la config del cliente al formato de los\n * antiguos `assets/aws/<cliente>-<env>.json`. Es una función pura para no\n * acoplar kif-lib a aws-amplify: cada app hace `Amplify.configure(...)`.\n * Los redirects nunca vienen de back: los calcula la app según donde corre.\n */\nexport function toAmplifyGen1Config(aws: ClientAwsConfig, redirects: AmplifyRedirects): AmplifyGen1Config {\n    const config: AmplifyGen1Config = {\n        aws_project_region: aws.region,\n        aws_cognito_region: aws.cognitoRegion ?? aws.region,\n        aws_user_pools_id: aws.userPoolId,\n        aws_user_pools_web_client_id: aws.userPoolWebClientId\n    };\n    if (aws.oauthDomain) {\n        config.oauth = {\n            domain: aws.oauthDomain,\n            scope: [...DEFAULT_SCOPES],\n            redirectSignIn: redirects.redirectSignIn,\n            redirectSignOut: redirects.redirectSignOut,\n            responseType: 'code'\n        };\n    }\n    return config;\n}\n","/**\n * Recursos gráficos de la pantalla de error de configuración (CLVDKIF-1858),\n * del Figma \"Kip.it - Backoffice Home\" (nodos 75:3597, 75:5923, 75:6172 y 75:6313).\n *\n * Van embebidos como data URI y no como archivos en `assets/`: la pantalla se\n * dibuja sin Angular, en el shell o en cualquier MFE (cada uno con su base href),\n * y justo cuando algo falló (incluso sin conexión). Un archivo externo dependería\n * de que cada app lo copie y de que la URL resuelva.\n *\n * El SVG se guarda tal cual para que se pueda leer y revisar en un diff; se\n * codifica al cargar el módulo.\n */\n\nconst svg = (markup: string): string => `data:image/svg+xml;charset=utf-8,${encodeURIComponent(markup)}`;\n\nexport const LOGO_KIPIT = svg(`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" height=\"29.368\" viewBox=\"0 0 80.0002 29.3683\" fill=\"none\">\n<path d=\"M45.9945 11.0112C46.4422 10.381 47.0558 9.85865 47.8352 9.44408C48.6312 9.01292 49.5349 8.79735 50.5465 8.79735C51.7239 8.79735 52.7852 9.08755 53.7304 9.66794C54.6922 10.2483 55.4467 11.0775 55.9939 12.1554C56.5577 13.2167 56.8397 14.4521 56.8397 15.8616C56.8397 17.2712 56.5577 18.5232 55.9939 19.6176C55.4467 20.6955 54.6922 21.5329 53.7304 22.1299C52.7852 22.7269 51.7239 23.0254 50.5465 23.0254C49.5349 23.0254 48.6395 22.8181 47.8601 22.4035C47.0973 21.989 46.4754 21.4666 45.9945 20.8365V29.3683H42.5121V9.02121H45.9945V11.0112ZM53.2826 15.8616C53.2826 15.0325 53.1085 14.3194 52.7603 13.7224C52.4286 13.1089 51.9809 12.6446 51.4171 12.3295C50.8698 12.0144 50.2729 11.8569 49.6261 11.8569C48.996 11.8569 48.399 12.0227 47.8352 12.3544C47.288 12.6694 46.8402 13.1338 46.492 13.7473C46.1603 14.3609 45.9945 15.0822 45.9945 15.9114C45.9945 16.7405 46.1603 17.4619 46.492 18.0754C46.8402 18.689 47.288 19.1616 47.8352 19.4933C48.399 19.8083 48.996 19.9659 49.6261 19.9659C50.2729 19.9659 50.8698 19.8 51.4171 19.4684C51.9809 19.1367 52.4286 18.6641 52.7603 18.0506C53.1085 17.437 53.2826 16.7073 53.2826 15.8616Z\" fill=\"#20272F\"/>\n<path d=\"M37.3552 7.3795C36.7416 7.3795 36.2276 7.18879 35.813 6.80739C35.415 6.4094 35.216 5.92021 35.216 5.33981C35.216 4.75941 35.415 4.27851 35.813 3.89711C36.2276 3.49912 36.7416 3.30013 37.3552 3.30013C37.9688 3.30013 38.4745 3.49912 38.8725 3.89711C39.2871 4.27851 39.4944 4.75941 39.4944 5.33981C39.4944 5.92021 39.2871 6.4094 38.8725 6.80739C38.4745 7.18879 37.9688 7.3795 37.3552 7.3795ZM39.0715 9.0212V22.8015H35.5891V9.0212H39.0715Z\" fill=\"#20272F\"/>\n<path d=\"M29.2216 22.8016L24.5453 16.9312V22.8016H21.0629V4.39464H24.5453V14.8667L29.1719 9.02124H33.699L27.6297 15.9363L33.7487 22.8016H29.2216Z\" fill=\"#20272F\"/>\n<path d=\"M76.2689 10.6878V19.1201C76.2689 19.9493 76.4265 20.5214 76.7415 20.8364C77.0566 21.1515 77.6121 21.3091 78.4081 21.3091H80.0001V22.8015H78.1345C76.9074 22.8015 75.9953 22.5196 75.3983 21.9558C74.8013 21.3754 74.5029 20.4302 74.5029 19.1201V10.6878H72.6124V9.22019H74.5029V5.81242H76.2689V9.22019H80.0001V10.6878H76.2689Z\" fill=\"#20272F\"/>\n<path d=\"M69.1918 6.65814C68.8436 6.65814 68.5451 6.53377 68.2963 6.28503C68.0476 6.03629 67.9232 5.72951 67.9232 5.36469C67.9232 4.99986 68.0476 4.70137 68.2963 4.46921C68.5451 4.22047 68.8436 4.0961 69.1918 4.0961C69.54 4.0961 69.8385 4.22047 70.0873 4.46921C70.336 4.70137 70.4604 4.99986 70.4604 5.36469C70.4604 5.72951 70.336 6.03629 70.0873 6.28503C69.8385 6.53377 69.54 6.65814 69.1918 6.65814ZM70.0624 9.22019V22.8015H68.3212V9.22019H70.0624Z\" fill=\"#20272F\"/>\n<g clip-path=\"url(#kip-clip)\">\n<path d=\"M5.60828 13.5146L2.03692e-05 10.41C2.03692e-05 8.54955 0.996876 6.83733 2.59108 5.95196L13.2597 0.0469344C13.5146 -0.0934758 13.8228 0.0937378 13.8228 0.390159V8.74847C13.8228 8.89278 13.7467 9.02539 13.6212 9.09169L5.60828 13.5185V13.5146Z\" fill=\"#ACB4FB\"/>\n<path d=\"M13.2636 26.9043L2.81183 21.2879C1.08445 20.3597 8.85664e-05 18.5265 8.85664e-05 16.5296V10.4139C8.85664e-05 10.4139 -0.079812 9.03714 0.696366 7.81635C0.696366 7.81635 0.175109 10.5114 3.17329 12.1691L5.60455 13.5147L13.6098 17.8908C13.7354 17.9571 13.8115 18.0897 13.8115 18.234V26.5572C13.8115 26.8497 13.5109 27.0408 13.2598 26.9043H13.2636Z\" fill=\"url(#kip-gradient)\"/>\n</g>\n<path d=\"M60.1126 20.1317C60.1126 19.3166 60.7734 18.6557 61.5886 18.6557H62.7823C63.5975 18.6557 64.2583 19.3166 64.2583 20.1317V21.3254C64.2583 22.1406 63.5975 22.8014 62.7823 22.8014H61.5886C60.7734 22.8014 60.1126 22.1406 60.1126 21.3254V20.1317Z\" fill=\"#5B62DA\"/>\n<defs>\n<linearGradient id=\"kip-gradient\" x1=\"17.3309\" y1=\"32.3569\" x2=\"-13.5052\" y2=\"-7.45505\" gradientUnits=\"userSpaceOnUse\">\n<stop stop-color=\"#ACB4FB\"/>\n<stop offset=\"0.5\" stop-color=\"#7A70F0\"/>\n</linearGradient>\n<clipPath id=\"kip-clip\"><rect width=\"13.819\" height=\"26.9471\" fill=\"white\"/></clipPath>\n</defs>\n</svg>`);\n\nexport const ICON_TRIANGLE_ALERT = svg(`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"53\" height=\"53\" viewBox=\"0 0 53 53\" fill=\"none\">\n<path d=\"M26.5 19.875V28.7083M26.5 37.5417H26.5221M47.9869 39.75L30.3203 8.83329C29.935 8.15357 29.3764 7.5882 28.7014 7.19486C28.0263 6.80151 27.259 6.59427 26.4778 6.59427C25.6965 6.59427 24.9292 6.80151 24.2541 7.19486C23.5791 7.5882 23.0205 8.15357 22.6353 8.83329L4.96859 39.75C4.57923 40.4243 4.37506 41.1896 4.37678 41.9682C4.37851 42.7469 4.58606 43.5113 4.97841 44.1839C5.37076 44.8565 5.93396 45.4134 6.61092 45.7982C7.28788 46.183 8.05454 46.382 8.83318 46.375H44.1665C44.9414 46.3742 45.7025 46.1695 46.3733 45.7815C47.044 45.3936 47.601 44.8359 47.9881 44.1647C48.3752 43.4934 48.5789 42.7321 48.5787 41.9572C48.5785 41.1823 48.3744 40.421 47.9869 39.75Z\" stroke=\"#5B62DA\" stroke-width=\"3.3125\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>`);\n\nexport const ICON_WIFI_OFF = svg(`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"53\" height=\"53\" viewBox=\"0 0 53 53\" fill=\"none\">\n<path d=\"M26.5 44.1667H26.5221M18.7708 36.2808C20.8348 34.2577 23.6098 33.1245 26.5 33.1245C29.3902 33.1245 32.1652 34.2577 34.2292 36.2808M11.0417 28.3968C14.1731 25.3271 18.1477 23.2591 22.4588 22.4564M41.9582 28.3968C40.6285 27.0934 39.1393 25.9633 37.526 25.0335M4.41667 19.4775C7.14748 17.0353 10.2645 15.0629 13.6409 13.6409M48.5831 19.4773C45.2148 16.4647 41.2657 14.1732 36.9788 12.7437C32.6918 11.3142 28.1578 10.777 23.6555 11.1651M4.41667 4.41667L48.5833 48.5833\" stroke=\"#5B62DA\" stroke-width=\"3.3125\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>`);\n","/**\n * Estilos de la pantalla de error de configuración (CLVDKIF-1858), con los valores\n * del Figma. Es un string y no un .css porque la pantalla no es un componente de\n * Angular (el bootstrap falló) y ng-packagr no empaqueta CSS suelto para código\n * que no es componente.\n *\n * Se aplican dentro de un shadow root: el CSS global de la app (que sí está cargado)\n * no los pisa, y estos no afectan a la app. `:host { all: initial }` corta además\n * lo que se hereda del documento (font-weight, letter-spacing, line-height...).\n */\nexport const CLIENT_CONFIG_ERROR_SCREEN_CSS = `\n:host { all: initial; display: block; }\n*, *::before, *::after { box-sizing: border-box; }\n\n.screen {\n    position: fixed; inset: 0; z-index: 2000;\n    display: flex; flex-direction: column; align-items: center;\n    overflow: auto;\n    font-family: \"Figtree\", sans-serif; letter-spacing: 0; -webkit-font-smoothing: antialiased;\n    background: linear-gradient(0deg, rgba(91, 98, 218, 0.10) 0%, rgba(91, 98, 218, 0) 72.181%), #FFF;\n}\n\n.header {\n    position: sticky; top: 0; z-index: 2; width: 100%;\n    display: flex; align-items: center;\n    padding: 16px 24px; background: #FFF; border-bottom: 1px solid #A2B5CD;\n}\n.logo { display: flex; padding: 7px 2px; }\nimg { display: block; }\n\n.body {\n    flex: 1 0 auto; width: 100%;\n    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px;\n    padding: 24px;\n}\n.icon {\n    width: 100px; height: 100px; flex-shrink: 0;\n    display: flex; align-items: center; justify-content: center;\n    border-radius: 1000px; background: #EBE8FF;\n}\n\n.titles {\n    width: 100%; max-width: 864px;\n    display: flex; flex-direction: column; gap: 16px; text-align: center;\n}\n.title { margin: 0; color: #2A323C; font-size: 28px; font-weight: 600; line-height: 36.4px; }\n.message { margin: 0; color: #343F4B; font-size: 16px; font-weight: 400; line-height: 22.4px; }\n.code { margin: 0; color: #343F4B; font-size: 16px; font-weight: 600; line-height: 22.4px; }\n\n.support {\n    width: 100%; max-width: 500px; padding: 16px;\n    display: flex; align-items: center; gap: 12px;\n    background: #FFF; border: 1px solid #E1E7EF; border-radius: 8px;\n}\n.contact { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }\n.contact-label { color: #343F4B; font-size: 16px; font-weight: 400; line-height: 22.4px; }\n.contact-value {\n    color: #5B62DA; font-size: 18px; font-weight: 600; line-height: 25.2px;\n    text-decoration: none; overflow-wrap: anywhere;\n}\n.contact-value--email { text-decoration: underline; text-underline-position: from-font; }\n.divider { align-self: stretch; flex-shrink: 0; border-left: 1px solid #C3D0DF; }\n\n.retry {\n    height: 48px; min-width: 101px; padding: 16px 12px; border: none; border-radius: 8px; cursor: pointer;\n    display: inline-flex; align-items: center; justify-content: center;\n    background: #5B62DA; color: #FFF; font-family: inherit; font-size: 16px; font-weight: 600; line-height: 22.4px;\n    white-space: nowrap;\n    box-shadow: 0px 10px 20px -12px #5B62DA, inset 0px 1px 1px 0px rgba(255, 255, 255, 0.50), inset 0px -1px 1px 0px #5B62DA;\n}\n.retry[aria-busy=\"true\"] { cursor: default; padding: 16px 8px; }\n\n/* Mismo loader que kit-button (.loader-dots) */\n.dots { display: flex; align-items: center; gap: 4px; }\n.dot { width: 6px; height: 6px; border-radius: 50%; background: #FFF; animation: bounce 1.4s infinite; }\n.dot:nth-child(2) { animation-delay: 0.2s; }\n.dot:nth-child(3) { animation-delay: 0.4s; }\n@keyframes bounce {\n    0%, 80%, 100% { transform: translateY(0); }\n    40% { transform: translateY(-10px); }\n}\n`;\n","import { ICON_TRIANGLE_ALERT, ICON_WIFI_OFF, LOGO_KIPIT } from './client-config-error-assets';\nimport { CLIENT_CONFIG_ERROR_SCREEN_CSS } from './client-config-error-screen.styles';\nimport { ClientConfigError, ClientConfigErrorReason } from './client-config.model';\n\n/**\n * Pantalla de error cuando no se pudo cargar la configuración del cliente\n * (CLVDKIF-1858). La usan el shell y los MFEs en su `bootstrap.ts`:\n *\n * ```ts\n * bootstrapApplication(AppComponent, appConfig)\n *     .catch(error => handleBootstrapError(error, { support: SUPPORT_CONTACT }));\n * ```\n *\n * Diseño de UX: Figma \"Kip.it - Backoffice Home\", nodos 75:3597 (error inicial),\n * 75:5923 (reintentando), 75:6172 (vuelve a fallar: datos de soporte) y 75:6313\n * (sin conexión). Se arma sin Angular (el bootstrap falló) dentro de un shadow\n * root con sus propios estilos: el CSS global de la app no la altera.\n *\n * Reintentar recarga la página: si vuelve a fallar dentro de RETRY_WINDOW_MS se\n * muestra el estado con los datos de soporte (marca en sessionStorage).\n */\n\nexport type ClientConfigErrorScreenState = 'initial' | 'persistent' | 'offline';\n\nexport interface SupportContact {\n    email: string;\n    phone: string;\n}\n\nexport interface ClientConfigErrorScreenOptions {\n    /** Dónde se dibuja. Default: `app-root` (o `body` si no existe). */\n    host?: Element | null;\n    /** Datos de soporte del estado \"vuelve a fallar\". Default: valores de ejemplo del diseño. */\n    support?: SupportContact;\n    /** Error que provocó la pantalla (para el código de error). */\n    error?: unknown;\n    /**\n     * Muestra el código de error (CFG-00x) en el estado \"vuelve a fallar\".\n     * Apagado hasta que UX y soporte validen los códigos.\n     */\n    showErrorCode?: boolean;\n    /** Fuerza un estado (si no, se deduce de la conexión y de la marca de reintento). */\n    state?: ClientConfigErrorScreenState;\n}\n\n/** Datos de ejemplo del diseño. Cada app pasa los reales en `support`. */\nexport const DEFAULT_SUPPORT_CONTACT: SupportContact = {\n    email: 'soporte@kipit.com',\n    phone: '(+56) 9 1234 5678'\n};\n\nconst RETRY_KEY = 'kif-cfg-err-retry';\n/** Ventana para considerar que el fallo viene de un reintento (recarga + timeout de 8 s). */\nconst RETRY_WINDOW_MS = 60_000;\n\nconst ERROR_CODES: Record<ClientConfigErrorReason, string> = {\n    query: 'CFG-001',\n    timeout: 'CFG-002',\n    missing: 'CFG-003',\n    invalid: 'CFG-004'\n};\n\n/** Código de error entendible para soporte, según la causa del ClientConfigError. */\nexport function clientConfigErrorCode(error: unknown): string | undefined {\n    return isClientConfigError(error) ? ERROR_CODES[error.reason] : undefined;\n}\n\nconst TEXTS: Record<ClientConfigErrorScreenState, { title: string; message: string; icon: string }> = {\n    initial: {\n        title: 'No pudimos cargar la configuración',\n        message: 'Ocurrió un problema al iniciar. Inténtalo de nuevo en unos segundos',\n        icon: ICON_TRIANGLE_ALERT\n    },\n    persistent: {\n        title: 'No pudimos cargar la configuración',\n        message: 'El problema continúa. Escribe a soporte de Kip.it e indica el código de error.',\n        icon: ICON_TRIANGLE_ALERT\n    },\n    offline: {\n        title: 'Sin conexión a internet',\n        message: 'Revisa la conexión e inténtalo de nuevo.',\n        icon: ICON_WIFI_OFF\n    }\n};\n\n/** `instanceof` y además `name`: con federación puede haber más de una copia de kif-lib. */\nexport function isClientConfigError(error: unknown): error is ClientConfigError {\n    return error instanceof ClientConfigError || (error as { name?: unknown } | null)?.name === 'ClientConfigError';\n}\n\n/** Lee y consume la marca que deja \"Reintentar\" antes de recargar. */\nfunction consumeRetryMark(): boolean {\n    try {\n        const mark = Number(sessionStorage.getItem(RETRY_KEY));\n        sessionStorage.removeItem(RETRY_KEY);\n        return !!mark && Date.now() - mark < RETRY_WINDOW_MS;\n    } catch {\n        return false;\n    }\n}\n\nfunction resolveState(): ClientConfigErrorScreenState {\n    const retried = consumeRetryMark();\n    if (globalThis.navigator?.onLine === false) return 'offline';\n    return retried ? 'persistent' : 'initial';\n}\n\nfunction el<K extends keyof HTMLElementTagNameMap>(tag: K, className: string, text?: string): HTMLElementTagNameMap[K] {\n    const node = document.createElement(tag);\n    node.className = className;\n    if (text !== undefined) node.textContent = text;\n    return node;\n}\n\nfunction img(src: string, width: number, height: number): HTMLImageElement {\n    const image = document.createElement('img');\n    image.src = src;\n    image.alt = '';\n    image.width = width;\n    image.height = height;\n    return image;\n}\n\nfunction supportCard(support: SupportContact): HTMLElement {\n    const card = el('div', 'support');\n\n    const email = el('div', 'contact');\n    const emailLink = el('a', 'contact-value contact-value--email', support.email);\n    emailLink.href = `mailto:${support.email}`;\n    email.append(el('span', 'contact-label', 'Correo electrónico'), emailLink);\n\n    const divider = el('div', 'divider');\n\n    const phone = el('div', 'contact');\n    const phoneLink = el('a', 'contact-value', support.phone);\n    phoneLink.href = `tel:${support.phone.replace(/[^\\d+]/g, '')}`;\n    phone.append(el('span', 'contact-label', 'Teléfono de contacto'), phoneLink);\n\n    card.append(email, divider, phone);\n    return card;\n}\n\nfunction retryButton(): HTMLButtonElement {\n    const button = el('button', 'retry', 'Reintentar');\n    button.type = 'button';\n    button.addEventListener('click', () => {\n        if (button.getAttribute('aria-busy') === 'true') return;\n        button.setAttribute('aria-busy', 'true');\n        button.setAttribute('aria-label', 'Reintentando');\n        const dots = el('span', 'dots');\n        dots.append(el('span', 'dot'), el('span', 'dot'), el('span', 'dot'));\n        button.replaceChildren(dots);\n        try {\n            sessionStorage.setItem(RETRY_KEY, String(Date.now()));\n        } catch {\n            // Sin sessionStorage igual se reintenta; sólo no se distingue el segundo fallo.\n        }\n        globalThis.location.reload();\n    });\n    return button;\n}\n\nexport function renderClientConfigErrorScreen(options: ClientConfigErrorScreenOptions = {}): ClientConfigErrorScreenState {\n    const host = options.host ?? document.querySelector('app-root') ?? document.body;\n    const state = options.state ?? resolveState();\n    const texts = TEXTS[state];\n\n    // El host queda en el DOM de la app (role, data-state); el contenido va en su shadow root.\n    const screenHost = el('div', 'kif-cfg-err');\n    screenHost.setAttribute('role', 'alert');\n    screenHost.dataset['state'] = state;\n    const root = screenHost.attachShadow({ mode: 'open' });\n    const style = document.createElement('style');\n    style.textContent = CLIENT_CONFIG_ERROR_SCREEN_CSS;\n    const screen = el('div', 'screen');\n\n    const header = el('header', 'header');\n    const logo = el('div', 'logo');\n    const logoImg = img(LOGO_KIPIT, 80, 29.368);\n    logoImg.alt = 'Kip.it';\n    logo.append(logoImg);\n    header.append(logo);\n\n    const body = el('main', 'body');\n    const icon = el('div', 'icon');\n    icon.append(img(texts.icon, 53, 53));\n\n    const titles = el('div', 'titles');\n    titles.append(el('h1', 'title', texts.title), el('p', 'message', texts.message));\n    const code = options.showErrorCode && state === 'persistent' ? clientConfigErrorCode(options.error) : undefined;\n    if (code) titles.append(el('p', 'code', `Código de error: ${code}`));\n\n    body.append(icon, titles);\n    if (state === 'persistent') body.append(supportCard(options.support ?? DEFAULT_SUPPORT_CONTACT));\n    body.append(retryButton());\n\n    screen.append(header, body);\n    root.append(style, screen);\n    host.replaceChildren(screenHost);\n    return state;\n}\n\n/**\n * `catch` estándar del `bootstrapApplication` del shell y de los MFEs: si falló\n * la config del cliente muestra la pantalla de error; cualquier otro error se\n * loguea como hasta ahora.\n */\nexport function handleBootstrapError(\n    error: unknown,\n    options: Omit<ClientConfigErrorScreenOptions, 'error'> = {}\n): void {\n    if (isClientConfigError(error)) {\n        renderClientConfigErrorScreen({ ...options, error });\n        console.error(`[client-config] ${error.reason}: ${error.message}`, error.cause ?? '');\n        return;\n    }\n    console.error(error);\n}\n","/*\n * Public API Surface of kif-lib-input\n */\n\nexport * from './graphql.component';\nexport * from './graphql.module';\nexport * from './enum/index';\nexport * from './models/index'\nexport * from './auth/auth.service'\nexport * from './interfaces/role-active.interface'\nexport * from './interfaces/auth-config.interface'\nexport * from './auth/session-expired.service'\nexport * from './auth/public-request.token'\nexport * from './client-config/index'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["map","tap","catchError","switchMap"],"mappings":";;;;;;;;;;;;;;AAAA,IAAY,aAoCX;AApCD,CAAA,UAAY,aAAa,EAAA;AACrB;;;;AAIG;AACH,IAAA,aAAA,CAAA,aAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW;AACX;;;AAGG;AACH,IAAA,aAAA,CAAA,aAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAgB;AAChB;;;AAGG;AACH,IAAA,aAAA,CAAA,aAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAa;AACb;;;AAGG;AACH,IAAA,aAAA,CAAA,aAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW;AACX;;;;AAIG;AACH,IAAA,aAAA,CAAA,aAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MA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