{"version":3,"file":"chunk-f1yt03z6.js","sources":["node_modules/ng-dynamic-component/fesm2020/ng-dynamic-component.mjs"],"sourcesContent":["import * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Injector, Inject, Optional, Directive, Input, Host, NgModule, EventEmitter, ElementRef, Output, Component } from '@angular/core';\nimport { isObservable, Subject, merge } from 'rxjs';\nimport { tap, takeUntil } from 'rxjs/operators';\nimport * as i1 from '@angular/common';\n\n/**\n * @public\n */\nconst DynamicComponentInjectorToken = new InjectionToken('DynamicComponentInjector');\n\n/** @internal */\nlet ClassicComponentIO = /*#__PURE__*/(() => {\n class ClassicComponentIO {\n setInput(componentRef, name, value) {\n componentRef.setInput(name, value);\n }\n getOutput(componentRef, name) {\n const output = componentRef.instance[name];\n if (!isObservable(output)) {\n throw new Error(`Component ${name} is not an output!`);\n }\n return output;\n }\n }\n /** @nocollapse */\n /** @nocollapse */ClassicComponentIO.ɵfac = function ClassicComponentIO_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ClassicComponentIO)();\n };\n ClassicComponentIO.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ClassicComponentIO,\n factory: ClassicComponentIO.ɵfac\n });\n return ClassicComponentIO;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** @public */\nlet ComponentIO = /*#__PURE__*/(() => {\n class ComponentIO {}\n /** @nocollapse */\n /** @nocollapse */ComponentIO.ɵfac = function ComponentIO_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ComponentIO)();\n };\n ComponentIO.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ComponentIO,\n factory: __ngFactoryType__ => ClassicComponentIO.ɵfac(__ngFactoryType__),\n providedIn: 'root'\n });\n return ComponentIO;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nfunction defaultEventArgumentFactory() {\n return '$event';\n}\n/**\n * @public\n */\nconst IoEventArgumentToken = new InjectionToken('EventArgument', {\n providedIn: 'root',\n factory: defaultEventArgumentFactory\n});\n/**\n * @public\n * @deprecated Since v10.4.0 - Use {@link IoEventArgumentToken} instead!\n */\nconst EventArgumentToken = IoEventArgumentToken;\n\n/**\n * A token that holds custom context of the output handlers\n *\n * @public\n */\nconst IoEventContextToken = new InjectionToken('IoEventContext');\n/**\n * A token that holds provider for custom context of the output handlers\n * which should be provided using {@link IoEventContextToken} token\n *\n * @public\n */\nconst IoEventContextProviderToken = new InjectionToken('IoEventContextProvider');\n\n/**\n * @public\n */\nlet IoServiceOptions = /*#__PURE__*/(() => {\n class IoServiceOptions {\n constructor() {\n this.trackOutputChanges = false;\n }\n }\n /** @nocollapse */\n /** @nocollapse */IoServiceOptions.ɵfac = function IoServiceOptions_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || IoServiceOptions)();\n };\n IoServiceOptions.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: IoServiceOptions,\n factory: IoServiceOptions.ɵfac,\n providedIn: 'root'\n });\n return IoServiceOptions;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @public\n */\nlet IoService = /*#__PURE__*/(() => {\n class IoService {\n constructor(injector, differs,\n // TODO: Replace ComponentFactoryResolver once new API is created\n // @see https://github.com/angular/angular/issues/44926\n // eslint-disable-next-line deprecation/deprecation\n cfr, options, compInjector, eventArgument, cdr, eventContextProvider, componentIO) {\n this.injector = injector;\n this.differs = differs;\n this.cfr = cfr;\n this.options = options;\n this.compInjector = compInjector;\n this.eventArgument = eventArgument;\n this.cdr = cdr;\n this.eventContextProvider = eventContextProvider;\n this.componentIO = componentIO;\n this.lastChangedInputs = new Set();\n this.inputsDiffer = this.differs.find({}).create();\n this.outputsShouldDisconnect$ = new Subject();\n this.inputs = {};\n this.outputs = {};\n if (this.options.trackOutputChanges) {\n const outputsDiffer = this.differs.find({}).create();\n this.outputsChanged = outputs => !!outputsDiffer.diff(outputs);\n }\n }\n get compRef() {\n return this.compInjector.componentRef;\n }\n get componentInst() {\n return this.compRef?.instance;\n }\n ngOnDestroy() {\n this.disconnectOutputs();\n }\n /**\n * Call update whenever inputs/outputs may or did change.\n *\n * It will detect both new and mutated changes.\n */\n update(inputs, outputs) {\n if (!this.compRef) {\n this.disconnectOutputs();\n return;\n }\n const changes = this.updateIO(inputs, outputs);\n const compChanged = this.isComponentInstChanged();\n const inputsChanges = this.getInputsChanges(compChanged);\n const outputsChanged = this.outputsChanged(this.outputs);\n if (inputsChanges) {\n this.updateChangedInputs(inputsChanges);\n }\n if (compChanged || inputsChanges) {\n this.updateInputs(compChanged || !this.lastChangedInputs.size);\n }\n if (compChanged || outputsChanged || changes.outputsChanged) {\n this.bindOutputs();\n }\n }\n outputsChanged(outputs) {\n return false;\n }\n isComponentInstChanged() {\n if (this.lastComponentInst !== this.componentInst) {\n this.lastComponentInst = this.componentInst;\n return true;\n } else {\n return false;\n }\n }\n updateIO(inputs, outputs) {\n if (!inputs) {\n inputs = {};\n }\n if (!outputs) {\n outputs = {};\n }\n const inputsChanged = this.inputs !== inputs;\n const outputsChanged = this.outputs !== outputs;\n this.inputs = inputs;\n this.outputs = outputs;\n return {\n inputsChanged,\n outputsChanged\n };\n }\n updateInputs(isFirstChange = false) {\n if (isFirstChange) {\n this.updateCompFactory();\n }\n const compRef = this.compRef;\n const inputs = this.inputs;\n if (!inputs || !compRef) {\n return;\n }\n const ifInputChanged = this.lastChangedInputs.size ? name => this.lastChangedInputs.has(name) : () => true;\n const componentIO = this.componentIO;\n for (const name of Object.keys(inputs)) {\n if (ifInputChanged(name)) {\n componentIO.setInput(compRef, name, inputs[name]);\n }\n }\n }\n bindOutputs() {\n this.disconnectOutputs();\n const compRef = this.compRef;\n const outputs = this.outputs;\n if (!outputs || !compRef) {\n return;\n }\n const resolvedOutputs = this.resolveOutputs(outputs);\n const componentIO = this.componentIO;\n merge(...Object.keys(resolvedOutputs).map(name => componentIO.getOutput(compRef, name).pipe(tap(event => resolvedOutputs[name](event))))).pipe(takeUntil(this.outputsShouldDisconnect$)).subscribe(() => this.cdr.markForCheck());\n }\n disconnectOutputs() {\n this.outputsShouldDisconnect$.next();\n }\n getInputsChanges(isCompChanged) {\n if (isCompChanged) {\n this.inputsDiffer.diff({});\n }\n return this.inputsDiffer.diff(this.inputs);\n }\n updateChangedInputs(differ) {\n this.lastChangedInputs.clear();\n const addRecordKeyToSet = record => this.lastChangedInputs.add(record.key);\n differ.forEachAddedItem(addRecordKeyToSet);\n differ.forEachChangedItem(addRecordKeyToSet);\n differ.forEachRemovedItem(addRecordKeyToSet);\n }\n // TODO: Replace ComponentFactory once new API is created\n // @see https://github.com/angular/angular/issues/44926\n // eslint-disable-next-line deprecation/deprecation\n resolveCompFactory() {\n if (!this.compRef) {\n return;\n }\n try {\n try {\n return this.cfr.resolveComponentFactory(this.compRef.componentType);\n } catch (e) {\n // Fallback if componentType does not exist (happens on NgComponentOutlet)\n return this.cfr.resolveComponentFactory(this.compRef.instance.constructor);\n }\n } catch (e) {\n // Factory not available - bailout\n return;\n }\n }\n updateCompFactory() {\n this.compFactory = this.resolveCompFactory();\n }\n resolveOutputs(outputs) {\n this.updateOutputsEventContext();\n const processedOutputs = this.processOutputs(outputs);\n if (!this.compFactory) {\n return processedOutputs;\n }\n return this.remapIO(processedOutputs, this.compFactory.outputs);\n }\n updateOutputsEventContext() {\n if (this.eventContextProvider) {\n // Resolve custom context from local provider\n const eventContextInjector = Injector.create({\n name: 'EventContext',\n parent: this.injector,\n providers: [this.eventContextProvider]\n });\n this.outputsEventContext = eventContextInjector.get(IoEventContextToken);\n } else {\n // Try to get global context\n this.outputsEventContext = this.injector.get(IoEventContextToken, null);\n }\n }\n processOutputs(outputs) {\n const processedOutputs = {};\n Object.keys(outputs).forEach(key => {\n const outputExpr = outputs[key];\n let outputHandler;\n if (typeof outputExpr === 'function') {\n outputHandler = outputExpr;\n } else {\n outputHandler = outputExpr && this.processOutputArgs(outputExpr);\n }\n if (this.outputsEventContext && outputHandler) {\n outputHandler = outputHandler.bind(this.outputsEventContext);\n }\n processedOutputs[key] = outputHandler;\n });\n return processedOutputs;\n }\n processOutputArgs(output) {\n const eventArgument = this.eventArgument;\n const args = 'args' in output ? output.args || [] : [eventArgument];\n const eventIdx = args.indexOf(eventArgument);\n const handler = output.handler;\n // When there is no event argument - use just arguments\n if (eventIdx === -1) {\n return function () {\n return handler.apply(this, args);\n };\n }\n return function (event) {\n const argsWithEvent = [...args];\n argsWithEvent[eventIdx] = event;\n return handler.apply(this, argsWithEvent);\n };\n }\n remapIO(io, mapping) {\n const newIO = {};\n Object.keys(io).forEach(key => {\n const newKey = this.findPropByTplInMapping(key, mapping) || key;\n newIO[newKey] = io[key];\n });\n return newIO;\n }\n findPropByTplInMapping(tplName, mapping) {\n for (const map of mapping) {\n if (map.templateName === tplName) {\n return map.propName;\n }\n }\n return null;\n }\n }\n /** @nocollapse */\n /** @nocollapse */IoService.ɵfac = function IoService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || IoService)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(i0.KeyValueDiffers), i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(IoServiceOptions), i0.ɵɵinject(DynamicComponentInjectorToken), i0.ɵɵinject(IoEventArgumentToken), i0.ɵɵinject(i0.ChangeDetectorRef), i0.ɵɵinject(IoEventContextProviderToken, 8), i0.ɵɵinject(ComponentIO));\n };\n IoService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: IoService,\n factory: IoService.ɵfac\n });\n return IoService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet IoFactoryService = /*#__PURE__*/(() => {\n class IoFactoryService {\n constructor(injector) {\n this.injector = injector;\n }\n create(componentInjector, ioOptions) {\n const providers = [{\n provide: IoService,\n useClass: IoService\n }, {\n provide: DynamicComponentInjectorToken,\n useValue: componentInjector\n }];\n if (ioOptions) {\n providers.push({\n provide: IoServiceOptions,\n useValue: ioOptions\n });\n }\n const ioInjector = Injector.create({\n name: 'IoInjector',\n parent: ioOptions?.injector ?? this.injector,\n providers\n });\n return ioInjector.get(IoService);\n }\n }\n /** @nocollapse */\n /** @nocollapse */IoFactoryService.ɵfac = function IoFactoryService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || IoFactoryService)(i0.ɵɵinject(i0.Injector));\n };\n IoFactoryService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: IoFactoryService,\n factory: IoFactoryService.ɵfac,\n providedIn: 'root'\n });\n return IoFactoryService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet ComponentOutletIoDirective = /*#__PURE__*/(() => {\n class ComponentOutletIoDirective {\n constructor(ioService) {\n this.ioService = ioService;\n }\n ngDoCheck() {\n this.ioService.update(this.ngComponentOutletNdcDynamicInputs, this.ngComponentOutletNdcDynamicOutputs);\n }\n }\n /** @nocollapse */\n /** @nocollapse */ComponentOutletIoDirective.ɵfac = function ComponentOutletIoDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ComponentOutletIoDirective)(i0.ɵɵdirectiveInject(IoService));\n };\n ComponentOutletIoDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: ComponentOutletIoDirective,\n selectors: [[\"\", \"ngComponentOutletNdcDynamicInputs\", \"\"], [\"\", \"ngComponentOutletNdcDynamicOutputs\", \"\"]],\n inputs: {\n ngComponentOutletNdcDynamicInputs: \"ngComponentOutletNdcDynamicInputs\",\n ngComponentOutletNdcDynamicOutputs: \"ngComponentOutletNdcDynamicOutputs\"\n },\n exportAs: [\"ndcDynamicIo\"],\n features: [i0.ɵɵProvidersFeature([IoService])]\n });\n return ComponentOutletIoDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet ComponentOutletInjectorDirective = /*#__PURE__*/(() => {\n class ComponentOutletInjectorDirective {\n constructor(componentOutlet) {\n this.componentOutlet = componentOutlet;\n }\n get componentRef() {\n // NOTE: Accessing private APIs of Angular\n return this.componentOutlet._componentRef;\n }\n }\n /** @nocollapse */\n /** @nocollapse */ComponentOutletInjectorDirective.ɵfac = function ComponentOutletInjectorDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ComponentOutletInjectorDirective)(i0.ɵɵdirectiveInject(i1.NgComponentOutlet, 1));\n };\n ComponentOutletInjectorDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: ComponentOutletInjectorDirective,\n selectors: [[\"\", \"ngComponentOutlet\", \"\"]],\n exportAs: [\"ndcComponentOutletInjector\"],\n features: [i0.ɵɵProvidersFeature([{\n provide: DynamicComponentInjectorToken,\n useExisting: ComponentOutletInjectorDirective\n }])]\n });\n return ComponentOutletInjectorDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet ComponentOutletInjectorModule = /*#__PURE__*/(() => {\n class ComponentOutletInjectorModule {}\n /** @nocollapse */\n /** @nocollapse */\n /** @nocollapse */ComponentOutletInjectorModule.ɵfac = function ComponentOutletInjectorModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ComponentOutletInjectorModule)();\n };\n ComponentOutletInjectorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: ComponentOutletInjectorModule\n });\n ComponentOutletInjectorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return ComponentOutletInjectorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet DynamicAttributesDirective = /*#__PURE__*/(() => {\n class DynamicAttributesDirective {\n constructor(renderer, differs, componentInjector) {\n this.renderer = renderer;\n this.differs = differs;\n this.componentInjector = componentInjector;\n this.attrsDiffer = this.differs.find({}).create();\n }\n get _attributes() {\n return this.ndcDynamicAttributes || this.ngComponentOutletNdcDynamicAttributes || {};\n }\n get nativeElement() {\n return this.componentInjector?.componentRef?.location.nativeElement;\n }\n get compType() {\n return this.componentInjector?.componentRef?.componentType;\n }\n get isCompChanged() {\n if (this.lastCompType !== this.compType) {\n this.lastCompType = this.compType;\n return true;\n }\n return false;\n }\n ngDoCheck() {\n const isCompChanged = this.isCompChanged;\n const changes = this.attrsDiffer.diff(this._attributes);\n if (changes) {\n this.lastAttrActions = this.changesToAttrActions(changes);\n }\n if (changes || isCompChanged && this.lastAttrActions) {\n this.updateAttributes(this.lastAttrActions);\n }\n }\n setAttribute(name, value, namespace) {\n if (this.nativeElement) {\n this.renderer.setAttribute(this.nativeElement, name, value, namespace);\n }\n }\n removeAttribute(name, namespace) {\n if (this.nativeElement) {\n this.renderer.removeAttribute(this.nativeElement, name, namespace);\n }\n }\n updateAttributes(actions) {\n if (!this.compType || !actions) {\n return;\n }\n Object.keys(actions.set).forEach(key => this.setAttribute(key, actions.set[key]));\n actions.remove.forEach(key => this.removeAttribute(key));\n }\n changesToAttrActions(changes) {\n const attrActions = {\n set: {},\n remove: []\n };\n changes.forEachAddedItem(r => attrActions.set[r.key] = r.currentValue);\n changes.forEachChangedItem(r => attrActions.set[r.key] = r.currentValue);\n changes.forEachRemovedItem(r => attrActions.remove.push(r.key));\n return attrActions;\n }\n }\n /** @nocollapse */\n /** @nocollapse */DynamicAttributesDirective.ɵfac = function DynamicAttributesDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || DynamicAttributesDirective)(i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.KeyValueDiffers), i0.ɵɵdirectiveInject(DynamicComponentInjectorToken, 8));\n };\n DynamicAttributesDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: DynamicAttributesDirective,\n selectors: [[\"\", \"ndcDynamicAttributes\", \"\"], [\"\", \"ngComponentOutletNdcDynamicAttributes\", \"\"]],\n inputs: {\n ndcDynamicAttributes: \"ndcDynamicAttributes\",\n ngComponentOutletNdcDynamicAttributes: \"ngComponentOutletNdcDynamicAttributes\"\n },\n exportAs: [\"ndcDynamicAttributes\"]\n });\n return DynamicAttributesDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet DynamicAttributesModule = /*#__PURE__*/(() => {\n class DynamicAttributesModule {}\n /** @nocollapse */\n /** @nocollapse */\n /** @nocollapse */DynamicAttributesModule.ɵfac = function DynamicAttributesModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || DynamicAttributesModule)();\n };\n DynamicAttributesModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: DynamicAttributesModule\n });\n DynamicAttributesModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [ComponentOutletInjectorModule]\n });\n return DynamicAttributesModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Extract type arguments from Angular Directive/Component\n *\n * @internal\n */\nfunction extractNgParamTypes(type) {\n // NOTE: Accessing private APIs of Angular\n return type?.ctorParameters?.()?.map(param => param.type);\n}\n/**\n * @internal\n */\nfunction isOnDestroy(obj) {\n return !!obj && typeof obj.ngOnDestroy === 'function';\n}\n\n/**\n * @public\n */\nconst ReflectRef = new InjectionToken('ReflectRef', {\n providedIn: 'root',\n factory: () => window.Reflect\n});\n/**\n * @public\n */\nlet ReflectService = /*#__PURE__*/(() => {\n class ReflectService {\n constructor(reflect) {\n this.reflect = reflect;\n }\n getCtorParamTypes(ctor) {\n return this.reflect.getMetadata('design:paramtypes', ctor);\n }\n }\n /** @nocollapse */\n /** @nocollapse */ReflectService.ɵfac = function ReflectService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ReflectService)(i0.ɵɵinject(ReflectRef));\n };\n ReflectService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ReflectService,\n factory: ReflectService.ɵfac,\n providedIn: 'root'\n });\n return ReflectService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nfunction dynamicDirectiveDef(type, inputs, outputs) {\n return {\n type,\n inputs,\n outputs\n };\n}\n/**\n * @public\n * @experimental Dynamic directives is an experimental API that may not work as expected.\n *\n * NOTE: There is a known issue with OnChanges hook not beign triggered on dynamic directives\n * since this part of functionality has been removed from the core as Angular now\n * supports this out of the box for dynamic components.\n */\nlet DynamicDirectivesDirective = /*#__PURE__*/(() => {\n class DynamicDirectivesDirective {\n constructor(injector, iterableDiffers, ioFactoryService, reflectService, componentInjector) {\n this.injector = injector;\n this.iterableDiffers = iterableDiffers;\n this.ioFactoryService = ioFactoryService;\n this.reflectService = reflectService;\n this.componentInjector = componentInjector;\n this.ndcDynamicDirectivesCreated = new EventEmitter();\n this.dirRef = new Map();\n this.dirIo = new Map();\n this.dirsDiffer = this.iterableDiffers.find([]).create((_, def) => def.type);\n }\n get directives() {\n return this.ndcDynamicDirectives || this.ngComponentOutletNdcDynamicDirectives;\n }\n get componentRef() {\n return this.componentInjector?.componentRef;\n }\n get compInstance() {\n return this.componentRef && this.componentRef.instance;\n }\n get isCompChanged() {\n if (this.lastCompInstance !== this.compInstance) {\n this.lastCompInstance = this.compInstance;\n return true;\n }\n return false;\n }\n get hostInjector() {\n return this.componentRef?.injector;\n }\n ngDoCheck() {\n if (this.maybeDestroyDirectives()) {\n return;\n }\n const dirsChanges = this.dirsDiffer.diff(this.directives);\n if (!dirsChanges) {\n return this.updateDirectives();\n }\n this.processDirChanges(dirsChanges);\n }\n ngOnDestroy() {\n this.destroyAllDirectives();\n }\n maybeDestroyDirectives() {\n if (this.isCompChanged || !this.componentRef) {\n this.dirsDiffer.diff([]);\n this.destroyAllDirectives();\n }\n return !this.componentRef;\n }\n processDirChanges(changes) {\n changes.forEachRemovedItem(({\n item\n }) => this.destroyDirective(item));\n const createdDirs = [];\n changes.forEachAddedItem(({\n item\n }) => {\n const dirRef = this.initDirective(item);\n if (dirRef) {\n createdDirs.push(dirRef);\n }\n });\n if (createdDirs.length) {\n this.ndcDynamicDirectivesCreated.emit(createdDirs);\n }\n }\n updateDirectives() {\n this.directives?.forEach(dir => this.updateDirective(dir));\n }\n updateDirective(dirDef) {\n const io = this.dirIo.get(dirDef.type);\n io?.update(dirDef.inputs, dirDef.outputs);\n }\n initDirective(dirDef) {\n if (this.dirRef.has(dirDef.type)) {\n return;\n }\n const instance = this.createDirective(dirDef.type);\n const directiveRef = {\n instance,\n type: dirDef.type,\n injector: this.hostInjector,\n hostComponent: this.componentRef.instance,\n hostView: this.componentRef.hostView,\n location: this.componentRef.location,\n changeDetectorRef: this.componentRef.changeDetectorRef,\n onDestroy: this.componentRef.onDestroy\n };\n this.initDirIO(directiveRef, dirDef);\n this.callInitHooks(instance);\n this.dirRef.set(directiveRef.type, directiveRef);\n return directiveRef;\n }\n destroyAllDirectives() {\n this.dirRef.forEach(dir => this.destroyDirRef(dir));\n this.dirRef.clear();\n this.dirIo.clear();\n }\n destroyDirective(dirDef) {\n const dirRef = this.dirRef.get(dirDef.type);\n if (dirRef) {\n this.destroyDirRef(dirRef);\n }\n this.dirRef.delete(dirDef.type);\n this.dirIo.delete(dirDef.type);\n }\n initDirIO(dirRef, dirDef) {\n const io = this.ioFactoryService.create({\n componentRef: this.dirToCompDef(dirRef)\n }, {\n trackOutputChanges: true,\n injector: this.injector\n });\n io.update(dirDef.inputs, dirDef.outputs);\n this.dirIo.set(dirRef.type, io);\n }\n dirToCompDef(dirRef) {\n return {\n changeDetectorRef: this.componentRef.changeDetectorRef,\n hostView: this.componentRef.hostView,\n location: this.componentRef.location,\n destroy: this.componentRef.destroy,\n onDestroy: this.componentRef.onDestroy,\n injector: this.componentRef.injector,\n instance: dirRef.instance,\n componentType: dirRef.type,\n setInput: (name, value) => dirRef.instance[name] = value\n };\n }\n destroyDirRef(dirRef) {\n this.dirIo.get(dirRef.type)?.ngOnDestroy();\n if (isOnDestroy(dirRef.instance)) {\n dirRef.instance.ngOnDestroy();\n }\n }\n createDirective(dirType) {\n const directiveInjector = Injector.create({\n providers: [{\n provide: dirType,\n useClass: dirType,\n deps: this.resolveDirParamTypes(dirType)\n }, {\n provide: ElementRef,\n useValue: this.componentRef.location\n }],\n parent: this.hostInjector,\n name: `DynamicDirectiveInjector:${dirType.name}@${this.componentRef.componentType.name}`\n });\n return directiveInjector.get(dirType);\n }\n resolveDirParamTypes(dirType) {\n return (\n // First try Angular Compiler's metadata\n extractNgParamTypes(dirType) ??\n // Then fallback to Reflect API\n this.reflectService.getCtorParamTypes(dirType) ??\n // Bailout\n []\n );\n }\n callInitHooks(obj) {\n this.callHook(obj, 'ngOnInit');\n this.callHook(obj, 'ngDoCheck');\n this.callHook(obj, 'ngAfterContentInit');\n this.callHook(obj, 'ngAfterContentChecked');\n this.callHook(obj, 'ngAfterViewInit');\n this.callHook(obj, 'ngAfterViewChecked');\n }\n callHook(obj, hook, args = []) {\n if (obj[hook]) {\n obj[hook](...args);\n }\n }\n }\n /** @nocollapse */\n /** @nocollapse */DynamicDirectivesDirective.ɵfac = function DynamicDirectivesDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || DynamicDirectivesDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.IterableDiffers), i0.ɵɵdirectiveInject(IoFactoryService), i0.ɵɵdirectiveInject(ReflectService), i0.ɵɵdirectiveInject(DynamicComponentInjectorToken, 8));\n };\n DynamicDirectivesDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: DynamicDirectivesDirective,\n selectors: [[\"\", \"ndcDynamicDirectives\", \"\"], [\"\", \"ngComponentOutletNdcDynamicDirectives\", \"\"]],\n inputs: {\n ndcDynamicDirectives: \"ndcDynamicDirectives\",\n ngComponentOutletNdcDynamicDirectives: \"ngComponentOutletNdcDynamicDirectives\"\n },\n outputs: {\n ndcDynamicDirectivesCreated: \"ndcDynamicDirectivesCreated\"\n },\n features: [i0.ɵɵProvidersFeature([IoFactoryService])]\n });\n return DynamicDirectivesDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet DynamicDirectivesModule = /*#__PURE__*/(() => {\n class DynamicDirectivesModule {}\n /** @nocollapse */\n /** @nocollapse */\n /** @nocollapse */DynamicDirectivesModule.ɵfac = function DynamicDirectivesModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || DynamicDirectivesModule)();\n };\n DynamicDirectivesModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: DynamicDirectivesModule\n });\n DynamicDirectivesModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [ComponentOutletInjectorModule]\n });\n return DynamicDirectivesModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet DynamicIoDirective = /*#__PURE__*/(() => {\n class DynamicIoDirective {\n constructor(ioService) {\n this.ioService = ioService;\n }\n ngDoCheck() {\n this.ioService.update(this.ndcDynamicInputs, this.ndcDynamicOutputs);\n }\n }\n /** @nocollapse */\n /** @nocollapse */DynamicIoDirective.ɵfac = function DynamicIoDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || DynamicIoDirective)(i0.ɵɵdirectiveInject(IoService));\n };\n DynamicIoDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: DynamicIoDirective,\n selectors: [[\"\", \"ndcDynamicInputs\", \"\"], [\"\", \"ndcDynamicOutputs\", \"\"]],\n inputs: {\n ndcDynamicInputs: \"ndcDynamicInputs\",\n ndcDynamicOutputs: \"ndcDynamicOutputs\"\n },\n exportAs: [\"ndcDynamicIo\"],\n features: [i0.ɵɵProvidersFeature([IoService])]\n });\n return DynamicIoDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet DynamicIoModule = /*#__PURE__*/(() => {\n class DynamicIoModule {}\n /** @nocollapse */\n /** @nocollapse */\n /** @nocollapse */DynamicIoModule.ɵfac = function DynamicIoModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || DynamicIoModule)();\n };\n DynamicIoModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: DynamicIoModule\n });\n DynamicIoModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [ComponentOutletInjectorModule]\n });\n return DynamicIoModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet DynamicComponent = /*#__PURE__*/(() => {\n class DynamicComponent {\n constructor(vcr) {\n this.vcr = vcr;\n this.ndcDynamicCreated = new EventEmitter();\n this.componentRef = null;\n }\n ngOnChanges(changes) {\n if (DynamicComponent.UpdateOnInputs.some(input => changes.hasOwnProperty(input))) {\n this.createDynamicComponent();\n }\n }\n createDynamicComponent() {\n this.vcr.clear();\n this.componentRef = null;\n if (this.ndcDynamicComponent) {\n this.componentRef = this.vcr.createComponent(this.ndcDynamicComponent, {\n index: 0,\n injector: this._resolveInjector(),\n projectableNodes: this.ndcDynamicContent,\n ngModuleRef: this.ndcDynamicNgModuleRef,\n environmentInjector: this.ndcDynamicEnvironmentInjector\n });\n this.ndcDynamicCreated.emit(this.componentRef);\n }\n }\n _resolveInjector() {\n let injector = this.ndcDynamicInjector || this.vcr.injector;\n if (this.ndcDynamicProviders) {\n injector = Injector.create({\n providers: this.ndcDynamicProviders,\n parent: injector\n });\n }\n return injector;\n }\n }\n DynamicComponent.UpdateOnInputs = ['ndcDynamicComponent', 'ndcDynamicInjector', 'ndcDynamicProviders', 'ndcDynamicContent', 'ndcDynamicNgModuleRef', 'ndcDynamicEnvironmentInjector'];\n /** @nocollapse */\n /** @nocollapse */\n DynamicComponent.ɵfac = function DynamicComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || DynamicComponent)(i0.ɵɵdirectiveInject(i0.ViewContainerRef));\n };\n DynamicComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: DynamicComponent,\n selectors: [[\"ndc-dynamic\"]],\n inputs: {\n ndcDynamicComponent: \"ndcDynamicComponent\",\n ndcDynamicInjector: \"ndcDynamicInjector\",\n ndcDynamicProviders: \"ndcDynamicProviders\",\n ndcDynamicContent: \"ndcDynamicContent\",\n ndcDynamicNgModuleRef: \"ndcDynamicNgModuleRef\",\n ndcDynamicEnvironmentInjector: \"ndcDynamicEnvironmentInjector\"\n },\n outputs: {\n ndcDynamicCreated: \"ndcDynamicCreated\"\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: DynamicComponentInjectorToken,\n useExisting: DynamicComponent\n }]), i0.ɵɵNgOnChangesFeature],\n decls: 0,\n vars: 0,\n template: function DynamicComponent_Template(rf, ctx) {},\n encapsulation: 2\n });\n return DynamicComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @public\n */\nlet DynamicModule = /*#__PURE__*/(() => {\n class DynamicModule {}\n /** @nocollapse */\n /** @nocollapse */\n /** @nocollapse */DynamicModule.ɵfac = function DynamicModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || DynamicModule)();\n };\n DynamicModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: DynamicModule\n });\n DynamicModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [DynamicIoModule, DynamicComponent, DynamicIoModule]\n });\n return DynamicModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/*\n * Public API Surface of ng-dynamic-component\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ComponentIO, ComponentOutletInjectorDirective, ComponentOutletInjectorModule, ComponentOutletIoDirective, DynamicAttributesDirective, DynamicAttributesModule, DynamicComponent, DynamicComponentInjectorToken, DynamicDirectivesDirective, DynamicDirectivesModule, DynamicIoDirective, DynamicIoModule, DynamicModule, EventArgumentToken, IoEventArgumentToken, IoEventContextProviderToken, IoEventContextToken, IoFactoryService, IoService, IoServiceOptions, ReflectRef, ReflectService, defaultEventArgumentFactory, dynamicDirectiveDef };\n"],"names":["DynamicComponentInjectorToken","InjectionToken","ClassicComponentIO","componentRef","name","value","output","isObservable","__ngFactoryType__","ɵɵdefineInjectable","ComponentIO","defaultEventArgumentFactory","IoEventArgumentToken","IoEventContextToken","IoEventContextProviderToken","IoServiceOptions","IoService","injector","differs","cfr","options","compInjector","eventArgument","cdr","eventContextProvider","componentIO","Subject","outputsDiffer","outputs","_a","inputs","changes","compChanged","inputsChanges","outputsChanged","inputsChanged","isFirstChange","compRef","ifInputChanged","resolvedOutputs","merge","tap","event","takeUntil","isCompChanged","differ","addRecordKeyToSet","record","processedOutputs","eventContextInjector","Injector","key","outputExpr","outputHandler","args","eventIdx","handler","argsWithEvent","io","mapping","newIO","newKey","tplName","map","ɵɵinject","KeyValueDiffers","ComponentFactoryResolver$1","ChangeDetectorRef","DynamicIoDirective","ioService","ɵɵdirectiveInject","ɵɵdefineDirective","ɵɵProvidersFeature","DynamicComponent","vcr","EventEmitter","input","ViewContainerRef","ɵɵdefineComponent","ɵɵNgOnChangesFeature","rf","ctx"],"mappings":"iMASA,IAAMA,CAAgC,CAAA,IAAIC,CAAe,CAAA,0BAA0B,EAG/EC,CAAmC,CAAA,CAAA,IAAM,CAC3C,MAAMA,CAAmB,CACvB,QAASC,CAAAA,CAAAA,CAAcC,EAAMC,CAAO,CAAA,CAClCF,CAAa,CAAA,QAAA,CAASC,CAAMC,CAAAA,CAAK,EACnC,CACA,UAAUF,CAAcC,CAAAA,CAAAA,CAAM,CAC5B,IAAME,EAASH,CAAa,CAAA,QAAA,CAASC,CAAI,CAAA,CACzC,GAAI,CAACG,EAAAA,CAAaD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