UNPKG

@angular/core

Version:

Angular - the core framework

1,041 lines (1,013 loc) 115 kB
/** * @license Angular v21.0.5 * (c) 2010-2025 Google LLC. https://angular.dev/ * License: MIT */ import { RuntimeError, InjectionToken, getCurrentTNode, assertInInjectionContext, signalAsReadonlyFn, assertNgModuleType, Injector, inject, NgZone, ChangeDetectionScheduler, INTERNAL_APPLICATION_ERROR_HANDLER, ɵɵdefineInjectable as __defineInjectable, ZONELESS_ENABLED, ENVIRONMENT_INITIALIZER, SCHEDULE_IN_ROOT_ZONE, SCHEDULE_IN_ROOT_ZONE_DEFAULT, makeEnvironmentProviders, PendingTasksInternal, formatRuntimeError, PROVIDED_ZONELESS, stringify, ɵɵinject as __inject, errorHandlerEnvironmentInitializer, INJECTOR_SCOPE, runInInjectionContext, provideEnvironmentInitializer, ErrorHandler, _global, isComponentHost, getComponentLViewByIndex, getLView, DECLARATION_COMPONENT_VIEW, ɵɵdefineInjector as __defineInjector, unwrapRNode, CLEANUP, isLContainer, HOST, hasI18n, unwrapLView, RENDERER, assertTNode, isProjectionTNode, PARENT, isRootView, HEADER_OFFSET, TVIEW, CONTEXT, getComponentDef, CONTAINER_HEADER_OFFSET, DOCUMENT, isLView, getTNode, assertNotInReactiveContext, ViewContext, DestroyRef, setInjectorProfilerContext, emitAfterRenderEffectPhaseCreatedEvent, getNullInjector } from './_untracked-chunk.mjs'; export { EnvironmentInjector, EventEmitter, INJECTOR, PendingTasks, VERSION, Version, effect, forwardRef, importProvidersFrom, isStandalone, provideBrowserGlobalErrorListeners, resolveForwardRef, signal, untracked, EffectScheduler as ɵEffectScheduler, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NoopNgZone as ɵNoopNgZone, R3Injector as ɵR3Injector, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, getInjectableDef as ɵgetInjectableDef, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, store as ɵstore, truncateMiddle as ɵtruncateMiddle, ɵunwrapWritableSignal, ɵɵdisableBindings, ɵɵenableBindings, ɵɵinvalidFactoryDep, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵresetView, ɵɵrestoreView } from './_untracked-chunk.mjs'; import { SIGNAL_NODE, signalSetFn, SIGNAL, producerAccessed, consumerDestroy, consumerPollProducersForChange, consumerBeforeComputation, consumerAfterComputation } from './_effect-chunk.mjs'; import { ɵɵinjectAttribute as __injectAttribute, createMultiResultQuerySignalFn, createSingleResultOptionalQuerySignalFn, createSingleResultRequiredQuerySignalFn, makePropDecorator, NgModuleFactory, COMPILER_OPTIONS, setJitOptions, isComponentResourceResolutionQueueEmpty, getCompilerFacade, resolveComponentResources, ApplicationRef, setClassMetadata, Injectable, performanceMarkFeature, IMAGE_CONFIG, getDocument, remove, isPromise, ApplicationInitStatus, LOCALE_ID, DEFAULT_LOCALE_ID, setLocaleId, createNgModuleRefWithProviders, optionsReducer, provideZonelessChangeDetectionInternal, validAppIdInitializer, publishDefaultGlobalUtils, PLATFORM_INITIALIZER, publishSignalConfiguration, ChangeDetectionSchedulerImpl, checkNoChangesInternal, UseExhaustiveCheckNoChanges, getRegisteredNgModuleType, ViewRef as ViewRef$1, isListLikeIterable, iterateListLike, isJsObject, ɵɵdefineNgModule as __defineNgModule, NgModule, profiler, assertStandaloneComponentType, EnvironmentNgModuleRefAdapter, ProfilerEvent, JSACTION_BLOCK_ELEMENT_MAP, APP_ID, setStashFn, APP_BOOTSTRAP_LISTENER, JSACTION_EVENT_CONTRACT, removeListeners, isIncrementalHydrationEnabled, DEFER_BLOCK_SSR_ID_ATTRIBUTE, invokeListeners, triggerHydrationFromBlockName, IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT, sharedStashFunction, sharedMapFunction, enableStashEventListenerImpl, isI18nHydrationEnabled, TransferState, NGH_DATA_KEY, NGH_DEFER_BLOCKS_KEY, SKIP_HYDRATION_ATTR_NAME, NGH_ATTR_NAME, getLNodeForHydration, isI18nHydrationSupportEnabled, getOrComputeI18nChildren, trySerializeI18nBlock, I18N_DATA, isTNodeShape, isDetachedByI18n, TEMPLATES, isDisconnectedNode, isInSkipHydrationBlock, unsupportedProjectionOfDomNodes, CONTAINERS, isLetDeclaration, ELEMENT_CONTAINERS, processTextNodeBeforeSerialization, setJSActionAttributes, ViewEncapsulation as ViewEncapsulation$1, collectNativeNodes, TEMPLATE_ID, NUM_ROOT_NODES, isDeferBlock, getLDeferBlockDetails, getTDeferBlockDetails, collectNativeNodesInLContainer, validateNodeExists, validateMatchingNode, DEFER_BLOCK_ID, DEFER_BLOCK_STATE, DEFER_BLOCK_STATE$1, MULTIPLIER, NODES, calcPathForNode, DISCONNECTED_NODES, convertHydrateTriggersToJsAction, DEFER_HYDRATE_TRIGGERS, DEFER_PARENT_BLOCK_ID, IS_I18N_HYDRATION_ENABLED, IS_HYDRATION_DOM_REUSE_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED, DEHYDRATED_BLOCK_REGISTRY, DehydratedBlockRegistry, processBlockData, gatherDeferBlocksCommentNodes, processAndInitTriggers, appendDeferBlocksToJSActionMap, verifySsrContentsIntegrity, Console, PRESERVE_HOST_CONTENT, cleanupDehydratedViews, countBlocksSkippedByHydration, enableRetrieveHydrationInfoImpl, enableLocateOrCreateElementNodeImpl, enableLocateOrCreateTextNodeImpl, enableLocateOrCreateElementContainerNodeImpl, enableLocateOrCreateContainerAnchorImpl, enableLocateOrCreateContainerRefImpl, enableFindMatchingDehydratedViewImpl, enableApplyRootElementTransformImpl, enableLocateOrCreateI18nNodeImpl, enablePrepareI18nBlockForHydrationImpl, setIsI18nHydrationSupportEnabled, enableClaimDehydratedIcuCaseImpl, enableRetrieveDeferBlockDataImpl, readPatchedLView, angularCoreEnv, setClassMetadataAsync, NOOP_AFTER_RENDER_REF, AfterRenderManager, TracingService, AfterRenderImpl, AfterRenderSequence, AFTER_RENDER_PHASES, assertComponentDef, ComponentFactory } from './_debug_node-chunk.mjs'; export { ANIMATION_MODULE_TYPE, APP_INITIALIZER, Attribute, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver, ComponentRef, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, Directive, ElementRef, Host, HostBinding, HostListener, Inject, Input, MAX_ANIMATION_TIMEOUT, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, Optional, Output, PLATFORM_ID, Pipe, QueryList, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, ViewContainerRef, afterEveryRender, afterNextRender, asNativeElements, createEnvironmentInjector, createNgModule, createNgModuleRef, enableProfiling, getDebugNode, inputBinding, isSignal, isWritableSignal, makeStateKey, outputBinding, provideAppInitializer, provideNgReflectAttributes, provideZonelessChangeDetection, setTestabilityGetter, twoWayBinding, ANIMATIONS_DISABLED as ɵANIMATIONS_DISABLED, AcxChangeDetectionStrategy as ɵAcxChangeDetectionStrategy, AcxViewEncapsulation as ɵAcxViewEncapsulation, ɵCONTROL, ComponentFactory$1 as ɵComponentFactory, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, HydrationStatus as ɵHydrationStatus, IMAGE_CONFIG_DEFAULTS as ɵIMAGE_CONFIG_DEFAULTS, IS_ENABLED_BLOCKING_INITIAL_NAVIGATION as ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION, LContext as ɵLContext, LocaleDataIndex as ɵLocaleDataIndex, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, ReflectionCapabilities as ɵReflectionCapabilities, ComponentRef$1 as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, TimerScheduler as ɵTimerScheduler, TracingAction as ɵTracingAction, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allLeavingAnimations as ɵallLeavingAnimations, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compilePipe as ɵcompilePipe, ɵcontrolUpdate, depsTracker as ɵdepsTracker, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getDebugNode as ɵgetDebugNode, getDeferBlocks as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, getTransferState as ɵgetTransferState, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, inferTagNameFromDefinition as ɵinferTagNameFromDefinition, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isNgModule as ɵisNgModule, isSubscribable as ɵisSubscribable, isViewDirty as ɵisViewDirty, markForRefresh as ɵmarkForRefresh, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishExternalGlobalUtil as ɵpublishExternalGlobalUtil, readHydrationInfo as ɵreadHydrationInfo, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetIncrementalHydrationEnabledWarnedForTests as ɵresetIncrementalHydrationEnabledWarnedForTests, resetJitOptions as ɵresetJitOptions, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, ɵsetClassDebugInfo, setDocument as ɵsetDocument, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵɵExternalStylesFeature, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵanimateEnter, ɵɵanimateEnterListener, ɵɵanimateLeave, ɵɵanimateLeaveListener, ɵɵariaProperty, ɵɵattachSourceLocations, ɵɵattribute, ɵɵclassMap, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵconditionalBranchCreate, ɵɵconditionalCreate, ɵɵcontentQuery, ɵɵcontentQuerySignal, ɵɵcontrol, ɵɵcontrolCreate, ɵɵdeclareLet, ɵɵdefer, ɵɵdeferEnableTimerScheduling, ɵɵdeferHydrateNever, ɵɵdeferHydrateOnHover, ɵɵdeferHydrateOnIdle, ɵɵdeferHydrateOnImmediate, ɵɵdeferHydrateOnInteraction, ɵɵdeferHydrateOnTimer, ɵɵdeferHydrateOnViewport, ɵɵdeferHydrateWhen, ɵɵdeferOnHover, ɵɵdeferOnIdle, ɵɵdeferOnImmediate, ɵɵdeferOnInteraction, ɵɵdeferOnTimer, ɵɵdeferOnViewport, ɵɵdeferPrefetchOnHover, ɵɵdeferPrefetchOnIdle, ɵɵdeferPrefetchOnImmediate, ɵɵdeferPrefetchOnInteraction, ɵɵdeferPrefetchOnTimer, ɵɵdeferPrefetchOnViewport, ɵɵdeferPrefetchWhen, ɵɵdeferWhen, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdomElement, ɵɵdomElementContainer, ɵɵdomElementContainerEnd, ɵɵdomElementContainerStart, ɵɵdomElementEnd, ɵɵdomElementStart, ɵɵdomListener, ɵɵdomProperty, ɵɵdomTemplate, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵgetComponentDepsFactory, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵgetReplaceMetadataURL, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinterpolate, ɵɵinterpolate1, ɵɵinterpolate2, ɵɵinterpolate3, ɵɵinterpolate4, ɵɵinterpolate5, ɵɵinterpolate6, ɵɵinterpolate7, ɵɵinterpolate8, ɵɵinterpolateV, ɵɵinvalidFactory, ɵɵlistener, ɵɵloadQuery, ɵɵnextContext, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryAdvance, ɵɵqueryRefresh, ɵɵreadContextLet, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵreplaceMetadata, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstoreLet, ɵɵstyleMap, ɵɵstyleProp, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵtwoWayBindingSet, ɵɵtwoWayListener, ɵɵtwoWayProperty, ɵɵvalidateAttribute, ɵɵviewQuery, ɵɵviewQuerySignal } from './_debug_node-chunk.mjs'; import { OutputEmitterRef } from './_resource-chunk.mjs'; export { computed, linkedSignal, resource, ResourceImpl as ɵResourceImpl, encapsulateResourceError as ɵencapsulateResourceError, getOutputDestroyRef as ɵgetOutputDestroyRef } from './_resource-chunk.mjs'; import { Subscription } from 'rxjs'; export { setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl } from './_weak_ref-chunk.mjs'; export { setCurrentInjector as ɵsetCurrentInjector } from './_not_found-chunk.mjs'; import { clearAppScopedEarlyEventContract, EventContract, EventContractContainer, EventDispatcher, registerDispatcher, EventPhase, getAppScopedQueuedEventInfos, isEarlyEventType, isCaptureEventType } from './primitives-event-dispatch.mjs'; import '@angular/core/primitives/signals'; import '@angular/core/primitives/di'; import 'rxjs/operators'; import './_attribute-chunk.mjs'; import './_linked_signal-chunk.mjs'; const REQUIRED_UNSET_VALUE = /* @__PURE__ */Symbol('InputSignalNode#UNSET'); const INPUT_SIGNAL_NODE = /* @__PURE__ */(() => { return { ...SIGNAL_NODE, transformFn: undefined, applyValueToInputSignal(node, value) { signalSetFn(node, value); } }; })(); const ɵINPUT_SIGNAL_BRAND_WRITE_TYPE = /* @__PURE__ */Symbol(); function createInputSignal(initialValue, options) { const node = Object.create(INPUT_SIGNAL_NODE); node.value = initialValue; node.transformFn = options?.transform; function inputValueFn() { producerAccessed(node); if (node.value === REQUIRED_UNSET_VALUE) { let message = null; if (ngDevMode) { const name = options?.debugName ?? options?.alias; message = `Input${name ? ` "${name}"` : ''} is required but no value is available yet.`; } throw new RuntimeError(-950, message); } return node.value; } inputValueFn[SIGNAL] = node; if (ngDevMode) { inputValueFn.toString = () => `[Input Signal: ${inputValueFn()}]`; node.debugName = options?.debugName; } return inputValueFn; } var FactoryTarget; (function (FactoryTarget) { FactoryTarget[FactoryTarget["Directive"] = 0] = "Directive"; FactoryTarget[FactoryTarget["Component"] = 1] = "Component"; FactoryTarget[FactoryTarget["Injectable"] = 2] = "Injectable"; FactoryTarget[FactoryTarget["Pipe"] = 3] = "Pipe"; FactoryTarget[FactoryTarget["NgModule"] = 4] = "NgModule"; })(FactoryTarget || (FactoryTarget = {})); var R3TemplateDependencyKind; (function (R3TemplateDependencyKind) { R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive"; R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe"; R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule"; })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {})); var ViewEncapsulation; (function (ViewEncapsulation) { ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None"; ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom"; ViewEncapsulation[ViewEncapsulation["ExperimentalIsolatedShadowDom"] = 4] = "ExperimentalIsolatedShadowDom"; })(ViewEncapsulation || (ViewEncapsulation = {})); var Framework; (function (Framework) { Framework["Angular"] = "angular"; Framework["ACX"] = "acx"; Framework["Wiz"] = "wiz"; })(Framework || (Framework = {})); class HostAttributeToken { attributeName; constructor(attributeName) { this.attributeName = attributeName; } __NG_ELEMENT_ID__ = () => __injectAttribute(this.attributeName); toString() { return `HostAttributeToken ${this.attributeName}`; } } const HOST_TAG_NAME = /* @__PURE__ */(() => { const HOST_TAG_NAME_TOKEN = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'HOST_TAG_NAME' : ''); HOST_TAG_NAME_TOKEN.__NG_ELEMENT_ID__ = flags => { const tNode = getCurrentTNode(); if (tNode === null) { throw new RuntimeError(204, ngDevMode && 'HOST_TAG_NAME can only be injected in directives and components ' + 'during construction time (in a class constructor or as a class field initializer)'); } if (tNode.type & 2) { return tNode.value; } if (flags & 8) { return null; } throw new RuntimeError(204, ngDevMode && `HOST_TAG_NAME was used on ${getDevModeNodeName(tNode)} which doesn't have an underlying element in the DOM. ` + `This is invalid, and so the dependency should be marked as optional.`); }; return HOST_TAG_NAME_TOKEN; })(); function getDevModeNodeName(tNode) { if (tNode.type & 8) { return 'an <ng-container>'; } else if (tNode.type & 4) { return 'an <ng-template>'; } else if (tNode.type & 128) { return 'an @let declaration'; } else { return 'a node'; } } function output(opts) { ngDevMode && assertInInjectionContext(output); return new OutputEmitterRef(); } function inputFunction(initialValue, opts) { ngDevMode && assertInInjectionContext(input); return createInputSignal(initialValue, opts); } function inputRequiredFunction(opts) { ngDevMode && assertInInjectionContext(input); return createInputSignal(REQUIRED_UNSET_VALUE, opts); } const input = (() => { inputFunction.required = inputRequiredFunction; return inputFunction; })(); function viewChildFn(locator, opts) { ngDevMode && assertInInjectionContext(viewChild); return createSingleResultOptionalQuerySignalFn(opts); } function viewChildRequiredFn(locator, opts) { ngDevMode && assertInInjectionContext(viewChild); return createSingleResultRequiredQuerySignalFn(opts); } const viewChild = (() => { viewChildFn.required = viewChildRequiredFn; return viewChildFn; })(); function viewChildren(locator, opts) { ngDevMode && assertInInjectionContext(viewChildren); return createMultiResultQuerySignalFn(opts); } function contentChildFn(locator, opts) { ngDevMode && assertInInjectionContext(contentChild); return createSingleResultOptionalQuerySignalFn(opts); } function contentChildRequiredFn(locator, opts) { ngDevMode && assertInInjectionContext(contentChildren); return createSingleResultRequiredQuerySignalFn(opts); } const contentChild = (() => { contentChildFn.required = contentChildRequiredFn; return contentChildFn; })(); function contentChildren(locator, opts) { return createMultiResultQuerySignalFn(opts); } function createModelSignal(initialValue, opts) { const node = Object.create(INPUT_SIGNAL_NODE); const emitterRef = new OutputEmitterRef(); node.value = initialValue; function getter() { producerAccessed(node); assertModelSet(node.value); return node.value; } getter[SIGNAL] = node; getter.asReadonly = signalAsReadonlyFn.bind(getter); getter.set = newValue => { if (!node.equal(node.value, newValue)) { signalSetFn(node, newValue); emitterRef.emit(newValue); } }; getter.update = updateFn => { assertModelSet(node.value); getter.set(updateFn(node.value)); }; getter.subscribe = emitterRef.subscribe.bind(emitterRef); getter.destroyRef = emitterRef.destroyRef; if (ngDevMode) { getter.toString = () => `[Model Signal: ${getter()}]`; node.debugName = opts?.debugName; } return getter; } function assertModelSet(value) { if (value === REQUIRED_UNSET_VALUE) { throw new RuntimeError(952, ngDevMode && 'Model is required but no value is available yet.'); } } function modelFunction(initialValue, opts) { ngDevMode && assertInInjectionContext(model); return createModelSignal(initialValue, opts); } function modelRequiredFunction(opts) { ngDevMode && assertInInjectionContext(model); return createModelSignal(REQUIRED_UNSET_VALUE, opts); } const model = (() => { modelFunction.required = modelRequiredFunction; return modelFunction; })(); const emitDistinctChangesOnlyDefaultValue = true; class Query {} const ContentChildren = makePropDecorator('ContentChildren', (selector, opts = {}) => ({ selector, first: false, isViewQuery: false, descendants: false, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue, ...opts }), Query); const ContentChild = makePropDecorator('ContentChild', (selector, opts = {}) => ({ selector, first: true, isViewQuery: false, descendants: true, ...opts }), Query); const ViewChildren = makePropDecorator('ViewChildren', (selector, opts = {}) => ({ selector, first: false, isViewQuery: true, descendants: true, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue, ...opts }), Query); const ViewChild = makePropDecorator('ViewChild', (selector, opts) => ({ selector, first: true, isViewQuery: true, descendants: true, ...opts }), Query); function compileNgModuleFactory(injector, options, moduleType) { ngDevMode && assertNgModuleType(moduleType); const moduleFactory = new NgModuleFactory(moduleType); if (typeof ngJitMode !== 'undefined' && !ngJitMode) { return Promise.resolve(moduleFactory); } const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options); setJitOptions({ defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)), preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces)) }); if (isComponentResourceResolutionQueueEmpty()) { return Promise.resolve(moduleFactory); } const compilerProviders = compilerOptions.flatMap(option => option.providers ?? []); if (compilerProviders.length === 0) { return Promise.resolve(moduleFactory); } const compiler = getCompilerFacade({ usage: 0, kind: 'NgModule', type: moduleType }); const compilerInjector = Injector.create({ providers: compilerProviders }); const resourceLoader = compilerInjector.get(compiler.ResourceLoader); return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url))).then(() => moduleFactory); } function _lastDefined(args) { for (let i = args.length - 1; i >= 0; i--) { if (args[i] !== undefined) { return args[i]; } } return undefined; } class NgZoneChangeDetectionScheduler { zone = inject(NgZone); changeDetectionScheduler = inject(ChangeDetectionScheduler); applicationRef = inject(ApplicationRef); applicationErrorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER); _onMicrotaskEmptySubscription; initialize() { if (this._onMicrotaskEmptySubscription) { return; } this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({ next: () => { if (this.changeDetectionScheduler.runningTick) { return; } this.zone.run(() => { try { this.applicationRef.dirtyFlags |= 1; this.applicationRef._tick(); } catch (e) { this.applicationErrorHandler(e); } }); } }); } ngOnDestroy() { this._onMicrotaskEmptySubscription?.unsubscribe(); } static ɵfac = function NgZoneChangeDetectionScheduler_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NgZoneChangeDetectionScheduler)(); }; static ɵprov = /*@__PURE__*/__defineInjectable({ token: NgZoneChangeDetectionScheduler, factory: NgZoneChangeDetectionScheduler.ɵfac, providedIn: 'root' }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{ type: Injectable, args: [{ providedIn: 'root' }] }], null, null); })(); const PROVIDED_NG_ZONE = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'provideZoneChangeDetection token' : '', { factory: () => false }); function internalProvideZoneChangeDetection({ ngZoneFactory, scheduleInRootZone }) { ngZoneFactory ??= () => new NgZone({ ...getNgZoneOptions(), scheduleInRootZone }); return [{ provide: ZONELESS_ENABLED, useValue: false }, { provide: NgZone, useFactory: ngZoneFactory }, { provide: ENVIRONMENT_INITIALIZER, multi: true, useFactory: () => { const ngZoneChangeDetectionScheduler = inject(NgZoneChangeDetectionScheduler, { optional: true }); if ((typeof ngDevMode === 'undefined' || ngDevMode) && ngZoneChangeDetectionScheduler === null) { throw new RuntimeError(402, `A required Injectable was not found in the dependency injection tree. ` + 'If you are bootstrapping an NgModule, make sure that the `BrowserModule` is imported.'); } return () => ngZoneChangeDetectionScheduler.initialize(); } }, { provide: ENVIRONMENT_INITIALIZER, multi: true, useFactory: () => { const service = inject(ZoneStablePendingTask); return () => { service.initialize(); }; } }, { provide: SCHEDULE_IN_ROOT_ZONE, useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT }]; } function provideZoneChangeDetection(options) { const scheduleInRootZone = options?.scheduleInRootZone; const zoneProviders = internalProvideZoneChangeDetection({ ngZoneFactory: () => { const ngZoneOptions = getNgZoneOptions(options); ngZoneOptions.scheduleInRootZone = scheduleInRootZone; if (ngZoneOptions.shouldCoalesceEventChangeDetection) { performanceMarkFeature('NgZone_CoalesceEvent'); } return new NgZone(ngZoneOptions); }, scheduleInRootZone }); return makeEnvironmentProviders([{ provide: PROVIDED_NG_ZONE, useValue: true }, zoneProviders]); } function getNgZoneOptions(options) { return { enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode, shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? false, shouldCoalesceRunChangeDetection: options?.runCoalescing ?? false }; } class ZoneStablePendingTask { subscription = new Subscription(); initialized = false; zone = inject(NgZone); pendingTasks = inject(PendingTasksInternal); initialize() { if (this.initialized) { return; } this.initialized = true; let task = null; if (!this.zone.isStable && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) { task = this.pendingTasks.add(); } this.zone.runOutsideAngular(() => { this.subscription.add(this.zone.onStable.subscribe(() => { NgZone.assertNotInAngularZone(); queueMicrotask(() => { if (task !== null && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) { this.pendingTasks.remove(task); task = null; } }); })); }); this.subscription.add(this.zone.onUnstable.subscribe(() => { NgZone.assertInAngularZone(); task ??= this.pendingTasks.add(); })); } ngOnDestroy() { this.subscription.unsubscribe(); } static ɵfac = function ZoneStablePendingTask_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ZoneStablePendingTask)(); }; static ɵprov = /*@__PURE__*/__defineInjectable({ token: ZoneStablePendingTask, factory: ZoneStablePendingTask.ɵfac, providedIn: 'root' }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ZoneStablePendingTask, [{ type: Injectable, args: [{ providedIn: 'root' }] }], null, null); })(); const SCAN_DELAY = 200; const OVERSIZED_IMAGE_TOLERANCE = 1200; class ImagePerformanceWarning { window = null; observer = null; options = inject(IMAGE_CONFIG); lcpImageUrl; start() { if (typeof ngServerMode !== 'undefined' && ngServerMode || typeof PerformanceObserver === 'undefined' || this.options?.disableImageSizeWarning && this.options?.disableImageLazyLoadWarning) { return; } this.observer = this.initPerformanceObserver(); const doc = getDocument(); const win = doc.defaultView; if (win) { this.window = win; const waitToScan = () => { setTimeout(this.scanImages.bind(this), SCAN_DELAY); }; const setup = () => { if (doc.readyState === 'complete') { waitToScan(); } else { this.window?.addEventListener('load', waitToScan, { once: true }); } }; if (typeof Zone !== 'undefined') { Zone.root.run(() => setup()); } else { setup(); } } } ngOnDestroy() { this.observer?.disconnect(); } initPerformanceObserver() { if (typeof PerformanceObserver === 'undefined') { return null; } const observer = new PerformanceObserver(entryList => { const entries = entryList.getEntries(); if (entries.length === 0) return; const lcpElement = entries[entries.length - 1]; const imgSrc = lcpElement.element?.src ?? ''; if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:')) return; this.lcpImageUrl = imgSrc; }); observer.observe({ type: 'largest-contentful-paint', buffered: true }); return observer; } scanImages() { const images = getDocument().querySelectorAll('img'); let lcpElementFound, lcpElementLoadedCorrectly = false; for (let index = 0; index < images.length; index++) { const image = images[index]; if (!image) { continue; } if (!this.options?.disableImageSizeWarning) { if (!image.getAttribute('ng-img') && this.isOversized(image)) { logOversizedImageWarning(image.src); } } if (!this.options?.disableImageLazyLoadWarning && this.lcpImageUrl) { if (image.src === this.lcpImageUrl) { lcpElementFound = true; if (image.loading !== 'lazy' || image.getAttribute('ng-img')) { lcpElementLoadedCorrectly = true; } } } } if (lcpElementFound && !lcpElementLoadedCorrectly && this.lcpImageUrl && !this.options?.disableImageLazyLoadWarning) { logLazyLCPWarning(this.lcpImageUrl); } } isOversized(image) { if (!this.window) { return false; } const nonOversizedImageExtentions = ['.svg']; const imageSource = (image.src || '').toLowerCase(); if (nonOversizedImageExtentions.some(extension => imageSource.endsWith(extension))) { return false; } const computedStyle = this.window.getComputedStyle(image); let renderedWidth = parseFloat(computedStyle.getPropertyValue('width')); let renderedHeight = parseFloat(computedStyle.getPropertyValue('height')); const boxSizing = computedStyle.getPropertyValue('box-sizing'); const objectFit = computedStyle.getPropertyValue('object-fit'); if (objectFit === `cover`) { return false; } if (boxSizing === 'border-box') { const paddingTop = computedStyle.getPropertyValue('padding-top'); const paddingRight = computedStyle.getPropertyValue('padding-right'); const paddingBottom = computedStyle.getPropertyValue('padding-bottom'); const paddingLeft = computedStyle.getPropertyValue('padding-left'); renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft); renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom); } const intrinsicWidth = image.naturalWidth; const intrinsicHeight = image.naturalHeight; const recommendedWidth = this.window.devicePixelRatio * renderedWidth; const recommendedHeight = this.window.devicePixelRatio * renderedHeight; const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE; const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE; return oversizedWidth || oversizedHeight; } static ɵfac = function ImagePerformanceWarning_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ImagePerformanceWarning)(); }; static ɵprov = /*@__PURE__*/__defineInjectable({ token: ImagePerformanceWarning, factory: ImagePerformanceWarning.ɵfac, providedIn: 'root' }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ImagePerformanceWarning, [{ type: Injectable, args: [{ providedIn: 'root' }] }], null, null); })(); function logLazyLCPWarning(src) { console.warn(formatRuntimeError(-913, `An image with src ${src} is the Largest Contentful Paint (LCP) element ` + `but was given a "loading" value of "lazy", which can negatively impact ` + `application loading performance. This warning can be addressed by ` + `changing the loading value of the LCP image to "eager", or by using the ` + `NgOptimizedImage directive's prioritization utilities. For more ` + `information about addressing or disabling this warning, see ` + `https://angular.dev/errors/NG0913`)); } function logOversizedImageWarning(src) { console.warn(formatRuntimeError(-913, `An image with src ${src} has intrinsic file dimensions much larger than its ` + `rendered size. This can negatively impact application loading performance. ` + `For more information about addressing or disabling this warning, see ` + `https://angular.dev/errors/NG0913`)); } const PLATFORM_DESTROY_LISTENERS = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'PlatformDestroyListeners' : ''); const ENABLE_ROOT_COMPONENT_BOOTSTRAP = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'ENABLE_ROOT_COMPONENT_BOOTSTRAP' : ''); function isApplicationBootstrapConfig(config) { return !config.moduleRef; } function bootstrap(config) { const envInjector = isApplicationBootstrapConfig(config) ? config.r3Injector : config.moduleRef.injector; const ngZone = envInjector.get(NgZone); return ngZone.run(() => { if (isApplicationBootstrapConfig(config)) { config.r3Injector.resolveInjectorInitializers(); } else { config.moduleRef.resolveInjectorInitializers(); } const exceptionHandler = envInjector.get(INTERNAL_APPLICATION_ERROR_HANDLER); if (typeof ngDevMode === 'undefined' || ngDevMode) { if (envInjector.get(PROVIDED_ZONELESS) && envInjector.get(PROVIDED_NG_ZONE)) { console.warn(formatRuntimeError(408, 'Both provideZoneChangeDetection and provideZonelessChangeDetection are provided. ' + 'This is likely a mistake. Update the application providers to use only one of the two.')); } } let onErrorSubscription; ngZone.runOutsideAngular(() => { onErrorSubscription = ngZone.onError.subscribe({ next: exceptionHandler }); }); if (isApplicationBootstrapConfig(config)) { const destroyListener = () => envInjector.destroy(); const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS); onPlatformDestroyListeners.add(destroyListener); envInjector.onDestroy(() => { onErrorSubscription.unsubscribe(); onPlatformDestroyListeners.delete(destroyListener); }); } else { const destroyListener = () => config.moduleRef.destroy(); const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS); onPlatformDestroyListeners.add(destroyListener); config.moduleRef.onDestroy(() => { remove(config.allPlatformModules, config.moduleRef); onErrorSubscription.unsubscribe(); onPlatformDestroyListeners.delete(destroyListener); }); } return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => { const pendingTasks = envInjector.get(PendingTasksInternal); const taskId = pendingTasks.add(); const initStatus = envInjector.get(ApplicationInitStatus); initStatus.runInitializers(); return initStatus.donePromise.then(() => { const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID); setLocaleId(localeId || DEFAULT_LOCALE_ID); const enableRootComponentbootstrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true); if (!enableRootComponentbootstrap) { if (isApplicationBootstrapConfig(config)) { return envInjector.get(ApplicationRef); } config.allPlatformModules.push(config.moduleRef); return config.moduleRef; } if (typeof ngDevMode === 'undefined' || ngDevMode) { const imagePerformanceService = envInjector.get(ImagePerformanceWarning); imagePerformanceService.start(); } if (isApplicationBootstrapConfig(config)) { const appRef = envInjector.get(ApplicationRef); if (config.rootComponent !== undefined) { appRef.bootstrap(config.rootComponent); } return appRef; } else { moduleBootstrapImpl?.(config.moduleRef, config.allPlatformModules); return config.moduleRef; } }).finally(() => void pendingTasks.remove(taskId)); }); }); } let moduleBootstrapImpl; function setModuleBootstrapImpl() { moduleBootstrapImpl = _moduleDoBootstrap; } function _moduleDoBootstrap(moduleRef, allPlatformModules) { const appRef = moduleRef.injector.get(ApplicationRef); if (moduleRef._bootstrapComponents.length > 0) { moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f)); } else if (moduleRef.instance.ngDoBootstrap) { moduleRef.instance.ngDoBootstrap(appRef); } else { throw new RuntimeError(-403, ngDevMode && `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` + `but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ` + `Please define one of these.`); } allPlatformModules.push(moduleRef); } function _callAndReportToErrorHandler(errorHandler, ngZone, callback) { try { const result = callback(); if (isPromise(result)) { return result.catch(e => { ngZone.runOutsideAngular(() => errorHandler(e)); throw e; }); } return result; } catch (e) { ngZone.runOutsideAngular(() => errorHandler(e)); throw e; } } class PlatformRef { _injector; _modules = []; _destroyListeners = []; _destroyed = false; constructor(_injector) { this._injector = _injector; } bootstrapModuleFactory(moduleFactory, options) { const allAppProviders = [provideZonelessChangeDetectionInternal(), ...(options?.applicationProviders ?? []), errorHandlerEnvironmentInitializer, ...(ngDevMode ? [validAppIdInitializer] : [])]; const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, allAppProviders); setModuleBootstrapImpl(); return bootstrap({ moduleRef, allPlatformModules: this._modules, platformInjector: this.injector }); } bootstrapModule(moduleType, compilerOptions = []) { const options = optionsReducer({}, compilerOptions); setModuleBootstrapImpl(); return compileNgModuleFactory(this.injector, options, moduleType).then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options)); } onDestroy(callback) { this._destroyListeners.push(callback); } get injector() { return this._injector; } destroy() { if (this._destroyed) { throw new RuntimeError(404, ngDevMode && 'The platform has already been destroyed!'); } this._modules.slice().forEach(module => module.destroy()); this._destroyListeners.forEach(listener => listener()); const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null); if (destroyListeners) { destroyListeners.forEach(listener => listener()); destroyListeners.clear(); } this._destroyed = true; } get destroyed() { return this._destroyed; } static ɵfac = function PlatformRef_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PlatformRef)(__inject(Injector)); }; static ɵprov = /*@__PURE__*/__defineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac, providedIn: 'platform' }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{ type: Injectable, args: [{ providedIn: 'platform' }] }], () => [{ type: Injector }], null); })(); let _platformInjector = null; function createPlatform(injector) { if (getPlatform()) { throw new RuntimeError(400, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.'); } publishDefaultGlobalUtils(); publishSignalConfiguration(); _platformInjector = typeof ngServerMode === 'undefined' || !ngServerMode ? injector : null; const platform = injector.get(PlatformRef); runPlatformInitializers(injector); return platform; } function createPlatformFactory(parentPlatformFactory, name, providers = []) { const desc = `Platform: ${name}`; const marker = new InjectionToken(desc); return (extraProviders = []) => { let platform = getPlatform(); if (!platform) { const platformProviders = [...providers, ...extraProviders, { provide: marker, useValue: true }]; platform = parentPlatformFactory?.(platformProviders) ?? createPlatform(createPlatformInjector(platformProviders, desc)); } return typeof ngServerMode !== 'undefined' && ngServerMode ? platform : assertPlatform(marker); }; } function createPlatformInjector(providers = [], name) { return Injector.create({ name, providers: [{ provide: INJECTOR_SCOPE, useValue: 'platform' }, { provide: PLATFORM_DESTROY_LISTENERS, useValue: new Set([() => _platformInjector = null]) }, ...providers] }); } function assertPlatform(requiredToken) { const platform = getPlatform(); if (!platform) { throw new RuntimeError(-401, ngDevMode && 'No platform exists!'); } if ((typeof ngDevMode === 'undefined' || ngDevMode) && !platform.injector.get(requiredToken, null)) { throw new RuntimeError(400, 'A platform with a different configuration has been created. Please destroy it first.'); } return platform; } function getPlatform() { if (typeof ngServerMode !== 'undefined' && ngServerMode) { return null; } return _platformInjector?.get(PlatformRef) ?? null; } function destroyPlatform() { getPlatform()?.destroy(); } function createOrReusePlatformInjector(providers = []) { if (_platformInjector) return _platformInjector; publishDefaultGlobalUtils(); const injector = createPlatformInjector(providers); if (typeof ngServerMode === 'undefined' || !ngServerMode) { _platformInjector = injector; } publishSignalConfiguration(); runPlatformInitializers(injector); return injector; } function providePlatformInitializer(initializerFn) { return makeEnvironmentProviders([{ provide: PLATFORM_INITIALIZER, useValue: initializerFn, multi: true }]); } function runPlatformInitializers(injector) { const inits = injector.get(PLATFORM_INITIALIZER, null); runInInjectionContext(injector, () => { inits?.forEach(init => init()); }); } function exhaustiveCheckNoChangesInterval(interval) { return provideEnvironmentInitializer(() => { const applicationRef = inject(ApplicationRef); const errorHandler = inject(ErrorHandler); const scheduler = inject(ChangeDetectionSchedulerImpl); const ngZone = inject(NgZone); function scheduleCheckNoChanges() { ngZone.runOutsideAngular(() => { setTimeout(() => { if (applicationRef.destroyed) { return; } if (scheduler.pendingRenderTaskId || scheduler.runningTick) { scheduleCheckNoChanges(); return; } for (const view of applicationRef.allViews) { try { checkNoChangesInternal(view._lView, true); } catch (e) { errorHandler.handleError(e); } } scheduleCheckNoChanges(); }, interval); }); } scheduleCheckNoChanges(); }); } function provideCheckNoChangesConfig(options) { return makeEnvironmentProviders(typeof ngDevMode === 'undefined' || ngDevMode ? [{ provide: UseExhaustiveCheckNoChanges, useValue: options.exhaustive }, options?.interval !== undefined ? exhaustiveCheckNoChangesInterval(options.interval) : []] : []); } function isDevMode() { return typeof ngDevMode === 'undefined' || !!ngDevMode; } function enableProdMode() { if (typeof ngDevMode === 'undefined' || ngDevMode) { _global['ngDevMode'] = false; } } function getModuleFactory(id) { const type = getRegisteredNgModuleType(id); if (!type) throw noModuleError(id); return new NgModuleFactory(type); } function getNgModuleById(id) { const type = getRegisteredNgModuleType(id); if (!type) throw noModuleError(id); return type; } function noModuleError(id) { return new Error(`No module with ID ${id} loaded`); } class ChangeDetectorRef { static __NG_ELEMENT_ID__ = injectChangeDetectorRef; } function injectChangeDetectorRef(flags) { return createViewRef(getCurrentTNode(), getLView(), (flags & 16) === 16); } function createViewRef(tNode, lView, isPipe) { if (isComponentHost(tNode) && !isPipe) { const componentView = getComponentLViewByIndex(tNode.index, lView); return new ViewRef$1(componentView, componentView); } else if (tNode.type & (3 | 12 | 32 | 128)) { const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; return new ViewRef$1(hostComponentView, lView); } return null; } class ViewRef extends ChangeDetectorRef {} class EmbeddedViewRef extends ViewRef {} class DefaultIterableDifferFactory { constructor() {} supports(obj) { return isListLikeIterable(obj); } create(trackByFn) { return new DefaultIterableDiffer(trackByFn); } } const trackByIdentity = (index, item) => item; class DefaultIterableDiffer { length = 0; collection; _linkedRecords = null; _unlinkedRecords = null; _previousItHead = null; _itHead = null; _itTail = null; _additionsHead = null; _additionsTail = null; _movesHead = null; _movesTail = null; _removalsHead = null; _removalsTail = null; _identityChangesHead = null; _identityChangesTail = null; _trackByFn; constructor(trackByFn) { this._trackByFn = trackByFn || trackByIdentity; } forEachItem(fn) { let record; for (record = this._itHead; record !== null; record = record._next) { fn(record); } } forEachOperation(fn) { let nextIt = this._itHead; let nextRemove = this._removalsHead; let addRemoveOffset = 0; let moveOffsets = null; while (nextIt || nextRemove) { const record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove; const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets); const currentIndex = record.currentIndex; if (record === nextRemove) { addRemoveOffset--; nextRemove = nextRemove._nextRemoved; } else { nextIt = nextIt._next; if (record.previousIndex == null) { addRemoveOffset++; } else { if (!moveOffsets) moveOffsets = []; const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset; const localCurrentIndex = currentIndex - addRemoveOffset; if (localMovePreviousIndex != localCurrentIndex) { for (let i = 0; i < localMovePreviousIndex; i++) { const offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0; const index = offset + i; if (localCurrentIndex <= index && index < localMovePreviousIndex) { moveOffsets[i] = offset + 1; } } const previousIndex = record.previousIndex; moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex; } } } if (adjPreviousIndex !== currentIndex) { fn(record, adjPreviousIndex, currentIndex); } } } forEachPreviousItem(fn) { let record; for (record = this._previousItHead; record !== null; record = record._nextPrevious) { fn(record); } } forEachAddedItem(fn) { let record; for (record = this._additionsHead; record !== null; record = record._nextAdded) { fn(record); } } forEachMovedItem(fn) { let record; for (record = this._movesHead; record !== null; record = record._nextMoved) { fn(record); } } forEachRemovedItem(fn) { let record; for (record = this._removalsHead; record !== null; record = record._nextRemoved) { fn(record); } } forEachId