import { withHttpTransferCache } from "./chunk-GND3ZHQO.js"; import { CommonModule, DomAdapter, PLATFORM_BROWSER_ID, getDOM, setRootDomAdapter } from "./chunk-QTXEQHHS.js"; import { XhrFactory, parseCookieValue } from "./chunk-OUSM42MY.js"; import { ANIMATIONS_DISABLED, APP_ID, ApplicationModule, ApplicationRef, CSP_NONCE, Console, IS_ENABLED_BLOCKING_INITIAL_NAVIGATION, Inject, Injectable, MAX_ANIMATION_TIMEOUT, NgModule, NgZone, Optional, PLATFORM_ID, PLATFORM_INITIALIZER, RendererFactory2, RendererStyleFlags2, SecurityContext, TESTABILITY, TESTABILITY_GETTER, Testability, TestabilityRegistry, TracingService, Version, ViewEncapsulation, _sanitizeHtml, _sanitizeUrl, allowSanitizationBypassAndThrow, bypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript, bypassSanitizationTrustStyle, bypassSanitizationTrustUrl, createPlatformFactory, internalCreateApplication, platformCore, setClassMetadata, setDocument, unwrapSafeValue, withDomHydration, withEventReplay, withI18nSupport, withIncrementalHydration, ɵɵdefineNgModule } from "./chunk-XYAQCRC2.js"; import { DOCUMENT, ENVIRONMENT_INITIALIZER, ErrorHandler, INJECTOR_SCOPE, InjectionToken, Injector, RuntimeError, XSS_SECURITY_URL, ZONELESS_ENABLED, _global, formatRuntimeError, forwardRef, getAnimationElementRemovalRegistry, inject, makeEnvironmentProviders, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵinject } from "./chunk-GFLMLXUS.js"; import { __spreadValues } from "./chunk-GOMI4DH3.js"; // node_modules/@angular/platform-browser/fesm2022/dom_renderer.mjs var EVENT_MANAGER_PLUGINS = new InjectionToken(ngDevMode ? "EventManagerPlugins" : ""); var EventManager = class _EventManager { _zone; _plugins; _eventNameToPlugin = /* @__PURE__ */ new Map(); /** * Initializes an instance of the event-manager service. */ constructor(plugins, _zone) { this._zone = _zone; plugins.forEach((plugin) => { plugin.manager = this; }); this._plugins = plugins.slice().reverse(); } /** * Registers a handler for a specific element and event. * * @param element The HTML element to receive event notifications. * @param eventName The name of the event to listen for. * @param handler A function to call when the notification occurs. Receives the * event object as an argument. * @param options Options that configure how the event listener is bound. * @returns A callback function that can be used to remove the handler. */ addEventListener(element, eventName, handler, options) { const plugin = this._findPluginFor(eventName); return plugin.addEventListener(element, eventName, handler, options); } /** * Retrieves the compilation zone in which event listeners are registered. */ getZone() { return this._zone; } /** @internal */ _findPluginFor(eventName) { let plugin = this._eventNameToPlugin.get(eventName); if (plugin) { return plugin; } const plugins = this._plugins; plugin = plugins.find((plugin2) => plugin2.supports(eventName)); if (!plugin) { throw new RuntimeError(5101, (typeof ngDevMode === "undefined" || ngDevMode) && `No event manager plugin found for event ${eventName}`); } this._eventNameToPlugin.set(eventName, plugin); return plugin; } static ɵfac = function EventManager_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || _EventManager)(ɵɵinject(EVENT_MANAGER_PLUGINS), ɵɵinject(NgZone)); }; static ɵprov = ɵɵdefineInjectable({ token: _EventManager, factory: _EventManager.ɵfac }); }; (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(EventManager, [{ type: Injectable }], () => [{ type: void 0, decorators: [{ type: Inject, args: [EVENT_MANAGER_PLUGINS] }] }, { type: NgZone }], null); })(); var EventManagerPlugin = class { _doc; // TODO: remove (has some usage in G3) constructor(_doc) { this._doc = _doc; } // Using non-null assertion because it's set by EventManager's constructor manager; }; var APP_ID_ATTRIBUTE_NAME = "ng-app-id"; function removeElements(elements) { for (const element of elements) { element.remove(); } } function createStyleElement(style, doc) { const styleElement = doc.createElement("style"); styleElement.textContent = style; return styleElement; } function addServerStyles(doc, appId, inline, external) { const elements = doc.head?.querySelectorAll(`style[${APP_ID_ATTRIBUTE_NAME}="${appId}"],link[${APP_ID_ATTRIBUTE_NAME}="${appId}"]`); if (elements) { for (const styleElement of elements) { styleElement.removeAttribute(APP_ID_ATTRIBUTE_NAME); if (styleElement instanceof HTMLLinkElement) { external.set(styleElement.href.slice(styleElement.href.lastIndexOf("/") + 1), { usage: 0, elements: [styleElement] }); } else if (styleElement.textContent) { inline.set(styleElement.textContent, { usage: 0, elements: [styleElement] }); } } } } function createLinkElement(url, doc) { const linkElement = doc.createElement("link"); linkElement.setAttribute("rel", "stylesheet"); linkElement.setAttribute("href", url); return linkElement; } var SharedStylesHost = class _SharedStylesHost { doc; appId; nonce; /** * Provides usage information for active inline style content and associated HTML